You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
412 KiB

(function(){var t={66:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA7hJREFUWEfVl09oXHUQx7/z25XkonhroQjWQi+KFC/mYDa/eftS6KX+Iz2IRVvFVqVSsVCEQutNbcEqaEjwIIoordiLCKV57/fiKiUY/1CkB21tkV4ED2LSQ+Dtb9xZ94WX8DZ5uxsI/mDZ3bfzm/nM/OY3M0vY5EWbbB//H4AkSfaIyG4Au/qJmvd+loguB0FwMb+/VASiKDpljDkJ4C8Av/QDAODezusCMz+R6VgXIEmSKRF5gYjettYe79N4e1uSJEdE5D0ieslaO6nP1gRwzin1DSK6ZK3V8A+8nHPnAEwAuIeZb60JEEXRfmPMxyLyZBAEXw5sHYBz7jCASSLaZ609XwgQRdEOY8w4APX6cY1eD8ZvAphL03RufHz8p9X74jh+2BijzhwtBIjjWM97qrPxFoBrPRhX0SzZFkXktSAIplfv16NlZgVdmQPOua9b9HuI6JM0TSfDMLzco/G2uHpJRGcAPJKFOtMzOzu73Xv/O4DDzDy1fAQ5z88z875+DBd4ehrAsWazuTUMwz/19/n5+TsWFxe/BXDCWnspD/AdEd3JzA9uhPFMh3NuXnOImY/lnu1i5p+Xj0CpFhYWFgCo9/s3GODzVtZvYWZWvc45q2/e+zfq9fqpdgSiKHrIGPMDgDeZ+fWNBIjj+C0iepGZ7+oKsJpqIwGyMs7MbWedc0cBvAPgADN/lD1cEZY8QAfupPf++Xq9fr2j5LSIfBEEwVwu6zWrD6yGLwCYAVAHsF2vYhkA10oim51ZFi01lPNK9Hsmk4fIA2SfiWjaWntoOQnXOoIsAtVq9dDo6OivuqnToCazTHbOaYt+hplf7RaB7Ln2FSJ6eWxs7LdSAIPmQ95rEfmGmT/N68xugdZ+Lblni7wYBCKO4/eNMY9Za7cV6VkuRM65GyJyJQiCRwcxWFANvyIib63duyZAHMc6KBz5L7e4l+7XlbfM9c5HYGvrejRazeOqiDzHzDp+9b1mZma2VKvVaRHZwcwPdFO0Yh5IkmRCRM4R0R8iokPD9eHh4YsjIyP/FIRWa0fRultEdhLRKwC2VSqV+2u12tVSAJ0rNuG9P0FEWVPSRtKu47p0SqpUKk93JuSuESKiRpqmz4ZhqK23u1y3XxqNxs40TduDydLS0lNDQ0MHReQgEd3Xmmb+9t6/W7TXGHOzUqn8WKvVrpQ5v/WGUq2CutrhJiIdsT601n5QRnkZmTIAavwCEX2mM1wZpb3IrAdgm83m7TAMv+9FaS+y6/4x6UVZP7KbDvAvgbvHMK/vHCkAAAAASUVORK5CYII="},228:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA91JREFUWEfNll1oHFUUx//n7s5MCVWKpmDT7CzVJjPTNqaB+BIjFkpDFAnog4hRoZRWEMWPiGDxRQnBhzYUxA+qSPvgk9QK1gcLvmiDNlhaW5qdaUq7O5tUCiJ+1WZmdu+pM1llN7vZnQyVOo8z5/zP7/7vPXcO4RY/dIvr4/8JYLfjNm5THiOgD6AHGcgScByg71Ikv+kqBKernZvNKn0SYgDM/QxsA5BiwhRApyBx1ip6x5dzus6BXGd6GwnxDoF/AsORhHOCxBwzb2HCVmI8Ioje6i54+0LRmYw6LghjiABhC8YZBiQL9BBjI4ARZkyaRf+NRhA1ALmMNkbE+0C8yywEHzdKyHWqPSQwDmAdgNUAPMl4c1PR/7xRvJNJP8Ak3gOjSJzabcxdn6+O+xcgl00PEIspKvlrjSv4udXhtLPKLkDccZ28D/vy+LVZvNOBdk6rHwEQpuuP1AHMZNvWCS7ZzPyiVQwOtSqe5Lu9QTNQxgkB7Ox2vWP/aEQO5DLqESL6xXS93UnE4+bYuvoagMFqFyIAW1cvC8FPdOeDk3HFksbZunrtz7Tf0X8Jv4UaFLYc2tTfQeJus7BwOalw3LxosRDbu92FSxGAs17p5RSd8Tx/de9VXIsrlDTO1tVpkvy8MRdMRwCzurqpDJxX0v6aeyq2JBWPk2fr6jwLcb+VX8hHAJUz8AdLDFhz/rk4IkljHH3Vdgl5wHL9npousHV1isGHLTc4mFQ8Tp6dUd4FITDd4KXaNtSVPQTaY7p+fxyhJDGzd2FtWVHOM+Ehyw1O1QBUtuEHBh/8r1xwMspzkkSv5XrP1t2E4QtHV55hiP0MOVxNmGS1S3McPT3IoCOlMoa2zAc/NgRYdEF7H8Dm20vecMcV/HUzilfcPUvg/YYbHF6qWfs3XI87SahfE9FJY4lVSWEcXT3G4IvVB29ZB6KtyCj3MdE0QC+brncgaeFIK6uNgTEiVG+o6yK8RloNR7LZjDZUJv7q73njcdP1P00CURlsvkgJ3tGVD75fTmPZmTCkZ+Zw6lkxhN2pDUPwUSI8aRT8o80W0HQonelUHxUCn60EYrGbaJKZRq2iF7rY9Gk5Fc/o2g4Cf0nAaKvtuJDVXpWSXyDIp4xi6dtWxcPvLQHCoHBcA4tDgukDo+hN1vV5B9qR1iYAHkyBn95YddO1gogFEPVydtUGhpwgYA1Yjptuaapy0h9myRMg2D7E3nsr//lWheuu4rgJuYz2ChFPMPC2AJiB14lpbyNn4mjGdqBabPFqTY0u7mH5E8MtnYhTLPY9kFQsSV4iB5IUWvFFdDOLNNO6AUayeTDACMHvAAAAAElFTkSuQmCC"},285:function(t){"use strict";t.exports="data:image/png;base64,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"},535:function(t,e,i){i(4114),i(8111),i(1148),i(2489),i(116),i(7588),i(1701),i(8237),i(3579),i(4603),i(7566),i(8721),function(e,i){t.exports=i()}("undefined"!==typeof self&&self,function(){return function(t){var e={};function i(s){if(e[s])return e[s].exports;var n=e[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(s,n,function(e){return t[e]}.bind(null,n));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({"01f9":function(t,e,i){"use strict";var s=i("2d00"),n=i("5ca1"),a=i("2aba"),o=i("32e9"),r=i("84f2"),c=i("41a0"),l=i("7f20"),d=i("38fd"),u=i("2b4c")("iterator"),h=!([].keys&&"next"in[].keys()),p="@@iterator",m="keys",g="values",f=function(){return this};t.exports=function(t,e,i,v,b,y,C){c(i,e,v);var x,E,w,A=function(t){if(!h&&t in S)return S[t];switch(t){case m:return function(){return new i(this,t)};case g:return function(){return new i(this,t)}}return function(){return new i(this,t)}},k=e+" Iterator",I=b==g,_=!1,S=t.prototype,T=S[u]||S[p]||b&&S[b],D=T||A(b),M=b?I?A("entries"):D:void 0,L="Array"==e&&S.entries||T;if(L&&(w=d(L.call(new t)),w!==Object.prototype&&w.next&&(l(w,k,!0),s||"function"==typeof w[u]||o(w,u,f))),I&&T&&T.name!==g&&(_=!0,D=function(){return T.call(this)}),s&&!C||!h&&!_&&S[u]||o(S,u,D),r[e]=D,r[k]=f,b)if(x={values:I?D:A(g),keys:y?D:A(m),entries:M},C)for(E in x)E in S||a(S,E,x[E]);else n(n.P+n.F*(h||_),e,x);return x}},"02f4":function(t,e,i){var s=i("4588"),n=i("be13");t.exports=function(t){return function(e,i){var a,o,r=String(n(e)),c=s(i),l=r.length;return c<0||c>=l?t?"":void 0:(a=r.charCodeAt(c),a<55296||a>56319||c+1===l||(o=r.charCodeAt(c+1))<56320||o>57343?t?r.charAt(c):a:t?r.slice(c,c+2):o-56320+(a-55296<<10)+65536)}}},"0390":function(t,e,i){"use strict";var s=i("02f4")(!0);t.exports=function(t,e,i){return e+(i?s(t,e).length:1)}},"0a49":function(t,e,i){var s=i("9b43"),n=i("626a"),a=i("4bf8"),o=i("9def"),r=i("cd1c");t.exports=function(t,e){var i=1==t,c=2==t,l=3==t,d=4==t,u=6==t,h=5==t||u,p=e||r;return function(e,r,m){for(var g,f,v=a(e),b=n(v),y=s(r,m,3),C=o(b.length),x=0,E=i?p(e,C):c?p(e,0):void 0;C>x;x++)if((h||x in b)&&(g=b[x],f=y(g,x,v),t))if(i)E[x]=f;else if(f)switch(t){case 3:return!0;case 5:return g;case 6:return x;case 2:E.push(g)}else if(d)return!1;return u?-1:l||d?d:E}}},"0bfb":function(t,e,i){"use strict";var s=i("cb7c");t.exports=function(){var t=s(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,i){var s=i("ce10"),n=i("e11e");t.exports=Object.keys||function(t){return s(t,n)}},1169:function(t,e,i){var s=i("2d95");t.exports=Array.isArray||function(t){return"Array"==s(t)}},"117e":function(t,e,i){},"11e9":function(t,e,i){var s=i("52a7"),n=i("4630"),a=i("6821"),o=i("6a99"),r=i("69a8"),c=i("c69a"),l=Object.getOwnPropertyDescriptor;e.f=i("9e1e")?l:function(t,e){if(t=a(t),e=o(e,!0),c)try{return l(t,e)}catch(i){}if(r(t,e))return n(!s.f.call(t,e),t[e])}},1495:function(t,e,i){var s=i("86cc"),n=i("cb7c"),a=i("0d58");t.exports=i("9e1e")?Object.defineProperties:function(t,e){n(t);var i,o=a(e),r=o.length,c=0;while(r>c)s.f(t,i=o[c++],e[i]);return t}},"1c4c":function(t,e,i){"use strict";var s=i("9b43"),n=i("5ca1"),a=i("4bf8"),o=i("1fa8"),r=i("33a4"),c=i("9def"),l=i("f1ae"),d=i("27ee");n(n.S+n.F*!i("5cc5")(function(t){Array.from(t)}),"Array",{from:function(t){var e,i,n,u,h=a(t),p="function"==typeof this?this:Array,m=arguments.length,g=m>1?arguments[1]:void 0,f=void 0!==g,v=0,b=d(h);if(f&&(g=s(g,m>2?arguments[2]:void 0,2)),void 0==b||p==Array&&r(b))for(e=c(h.length),i=new p(e);e>v;v++)l(i,v,f?g(h[v],v):h[v]);else for(u=b.call(h),i=new p;!(n=u.next()).done;v++)l(i,v,f?o(u,g,[n.value,v],!0):n.value);return i.length=v,i}})},"1fa8":function(t,e,i){var s=i("cb7c");t.exports=function(t,e,i,n){try{return n?e(s(i)[0],i[1]):e(i)}catch(o){var a=t["return"];throw void 0!==a&&s(a.call(t)),o}}},"20d6":function(t,e,i){"use strict";var s=i("5ca1"),n=i("0a49")(6),a="findIndex",o=!0;a in[]&&Array(1)[a](function(){o=!1}),s(s.P+s.F*o,"Array",{findIndex:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(a)},"20e3":function(t,e,i){"use strict";i("ef69")},"214f":function(t,e,i){"use strict";i("b0c5");var s=i("2aba"),n=i("32e9"),a=i("79e5"),o=i("be13"),r=i("2b4c"),c=i("520a"),l=r("species"),d=!a(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),u=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2===i.length&&"a"===i[0]&&"b"===i[1]}();t.exports=function(t,e,i){var h=r(t),p=!a(function(){var e={};return e[h]=function(){return 7},7!=""[t](e)}),m=p?!a(function(){var e=!1,i=/a/;return i.exec=function(){return e=!0,null},"split"===t&&(i.constructor={},i.constructor[l]=function(){return i}),i[h](""),!e}):void 0;if(!p||!m||"replace"===t&&!d||"split"===t&&!u){var g=/./[h],f=i(o,h,""[t],function(t,e,i,s,n){return e.exec===c?p&&!n?{done:!0,value:g.call(e,i,s)}:{done:!0,value:t.call(i,e,s)}:{done:!1}}),v=f[0],b=f[1];s(String.prototype,t,v),n(RegExp.prototype,h,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},"224d":function(t,e,i){},"230e":function(t,e,i){var s=i("d3f4"),n=i("7726").document,a=s(n)&&s(n.createElement);t.exports=function(t){return a?n.createElement(t):{}}},"23c6":function(t,e,i){var s=i("2d95"),n=i("2b4c")("toStringTag"),a="Arguments"==s(function(){return arguments}()),o=function(t,e){try{return t[e]}catch(i){}};t.exports=function(t){var e,i,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=o(e=Object(t),n))?i:a?s(e):"Object"==(r=s(e))&&"function"==typeof e.callee?"Arguments":r}},"260f":function(t,e,i){"use strict";i("43e9")},2621:function(t,e){e.f=Object.getOwnPropertySymbols},2638:function(t,e,i){"use strict";function s(){return s=Object.assign?Object.assign.bind():function(t){for(var e,i=1;i<arguments.length;i++)for(var s in e=arguments[i],e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},s.apply(this,arguments)}var n=["attrs","props","domProps"],a=["class","style","directives"],o=["on","nativeOn"],r=function(t){return t.reduce(function(t,e){for(var i in e)if(t[i])if(-1!==n.indexOf(i))t[i]=s({},t[i],e[i]);else if(-1!==a.indexOf(i)){var r=t[i]instanceof Array?t[i]:[t[i]],l=e[i]instanceof Array?e[i]:[e[i]];t[i]=[].concat(r,l)}else if(-1!==o.indexOf(i))for(var d in e[i])if(t[i][d]){var u=t[i][d]instanceof Array?t[i][d]:[t[i][d]],h=e[i][d]instanceof Array?e[i][d]:[e[i][d]];t[i][d]=[].concat(u,h)}else t[i][d]=e[i][d];else if("hook"===i)for(var p in e[i])t[i][p]=t[i][p]?c(t[i][p],e[i][p]):e[i][p];else t[i]=e[i];else t[i]=e[i];return t},{})},c=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=r},"26fe":function(t,e,i){"use strict";i("224d")},"27ee":function(t,e,i){var s=i("23c6"),n=i("2b4c")("iterator"),a=i("84f2");t.exports=i("8378").getIteratorMethod=function(t){if(void 0!=t)return t[n]||t["@@iterator"]||a[s(t)]}},"2aba":function(t,e,i){var s=i("7726"),n=i("32e9"),a=i("69a8"),o=i("ca5a")("src"),r=i("fa5b"),c="toString",l=(""+r).split(c);i("8378").inspectSource=function(t){return r.call(t)},(t.exports=function(t,e,i,r){var c="function"==typeof i;c&&(a(i,"name")||n(i,"name",e)),t[e]!==i&&(c&&(a(i,o)||n(i,o,t[e]?""+t[e]:l.join(String(e)))),t===s?t[e]=i:r?t[e]?t[e]=i:n(t,e,i):(delete t[e],n(t,e,i)))})(Function.prototype,c,function(){return"function"==typeof this&&this[o]||r.call(this)})},"2aeb":function(t,e,i){var s=i("cb7c"),n=i("1495"),a=i("e11e"),o=i("613b")("IE_PROTO"),r=function(){},c="prototype",l=function(){var t,e=i("230e")("iframe"),s=a.length,n="<",o=">";e.style.display="none",i("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(n+"script"+o+"document.F=Object"+n+"/script"+o),t.close(),l=t.F;while(s--)delete l[c][a[s]];return l()};t.exports=Object.create||function(t,e){var i;return null!==t?(r[c]=s(t),i=new r,r[c]=null,i[o]=t):i=l(),void 0===e?i:n(i,e)}},"2b4c":function(t,e,i){var s=i("5537")("wks"),n=i("ca5a"),a=i("7726").Symbol,o="function"==typeof a,r=t.exports=function(t){return s[t]||(s[t]=o&&a[t]||(o?a:n)("Symbol."+t))};r.store=s},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},"2f21":function(t,e,i){"use strict";var s=i("79e5");t.exports=function(t,e){return!!t&&s(function(){e?t.call(null,function(){},1):t.call(null)})}},"2fdb":function(t,e,i){"use strict";var s=i("5ca1"),n=i("d2c8"),a="includes";s(s.P+s.F*i("5147")(a),"String",{includes:function(t){return!!~n(this,t,a).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"323d":function(t,e,i){},"32e9":function(t,e,i){var s=i("86cc"),n=i("4630");t.exports=i("9e1e")?function(t,e,i){return s.f(t,e,n(1,i))}:function(t,e,i){return t[e]=i,t}},"33a4":function(t,e,i){var s=i("84f2"),n=i("2b4c")("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(s.Array===t||a[n]===t)}},"35f3":function(t,e,i){"use strict";i("dc6d")},3738:function(t,e,i){},3846:function(t,e,i){i("9e1e")&&"g"!=/./g.flags&&i("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:i("0bfb")})},"38fd":function(t,e,i){var s=i("69a8"),n=i("4bf8"),a=i("613b")("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=n(t),s(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},"3b2b":function(t,e,i){var s=i("7726"),n=i("5dbc"),a=i("86cc").f,o=i("9093").f,r=i("aae3"),c=i("0bfb"),l=s.RegExp,d=l,u=l.prototype,h=/a/g,p=/a/g,m=new l(h)!==h;if(i("9e1e")&&(!m||i("79e5")(function(){return p[i("2b4c")("match")]=!1,l(h)!=h||l(p)==p||"/a/i"!=l(h,"i")}))){l=function(t,e){var i=this instanceof l,s=r(t),a=void 0===e;return!i&&s&&t.constructor===l&&a?t:n(m?new d(s&&!a?t.source:t,e):d((s=t instanceof l)?t.source:t,s&&a?c.call(t):e),i?this:u,l)};for(var g=function(t){t in l||a(l,t,{configurable:!0,get:function(){return d[t]},set:function(e){d[t]=e}})},f=o(d),v=0;f.length>v;)g(f[v++]);u.constructor=l,l.prototype=u,i("2aba")(s,"RegExp",l)}i("7a56")("RegExp")},"3d91":function(t,e,i){"use strict";i("622b")},"3dfc":function(t,e,i){"use strict";i("3738")},"41a0":function(t,e,i){"use strict";var s=i("2aeb"),n=i("4630"),a=i("7f20"),o={};i("32e9")(o,i("2b4c")("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=s(o,{next:n(1,i)}),a(t,e+" Iterator")}},"43e9":function(t,e,i){},"456d":function(t,e,i){var s=i("4bf8"),n=i("0d58");i("5eda")("keys",function(){return function(t){return n(s(t))}})},4588:function(t,e){var i=Math.ceil,s=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?s:i)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,i){var s=i("be13");t.exports=function(t){return Object(s(t))}},"504c":function(t,e,i){var s=i("9e1e"),n=i("0d58"),a=i("6821"),o=i("52a7").f;t.exports=function(t){return function(e){var i,r=a(e),c=n(r),l=c.length,d=0,u=[];while(l>d)i=c[d++],s&&!o.call(r,i)||u.push(t?[i,r[i]]:r[i]);return u}}},5147:function(t,e,i){var s=i("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[s]=!1,!"/./"[t](e)}catch(n){}}return!0}},"520a":function(t,e,i){"use strict";var s=i("0bfb"),n=RegExp.prototype.exec,a=String.prototype.replace,o=n,r="lastIndex",c=function(){var t=/a/,e=/b*/g;return n.call(t,"a"),n.call(e,"a"),0!==t[r]||0!==e[r]}(),l=void 0!==/()??/.exec("")[1],d=c||l;d&&(o=function(t){var e,i,o,d,u=this;return l&&(i=new RegExp("^"+u.source+"$(?!\\s)",s.call(u))),c&&(e=u[r]),o=n.call(u,t),c&&o&&(u[r]=u.global?o.index+o[0].length:e),l&&o&&o.length>1&&a.call(o[0],i,function(){for(d=1;d<arguments.length-2;d++)void 0===arguments[d]&&(o[d]=void 0)}),o}),t.exports=o},"52a7":function(t,e){e.f={}.propertyIsEnumerable},5537:function(t,e,i){var s=i("8378"),n=i("7726"),a="__core-js_shared__",o=n[a]||(n[a]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:s.version,mode:i("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"55dd":function(t,e,i){"use strict";var s=i("5ca1"),n=i("d8e8"),a=i("4bf8"),o=i("79e5"),r=[].sort,c=[1,2,3];s(s.P+s.F*(o(function(){c.sort(void 0)})||!o(function(){c.sort(null)})||!i("2f21")(r)),"Array",{sort:function(t){return void 0===t?r.call(a(this)):r.call(a(this),n(t))}})},"5ca1":function(t,e,i){var s=i("7726"),n=i("8378"),a=i("32e9"),o=i("2aba"),r=i("9b43"),c="prototype",l=function(t,e,i){var d,u,h,p,m=t&l.F,g=t&l.G,f=t&l.S,v=t&l.P,b=t&l.B,y=g?s:f?s[e]||(s[e]={}):(s[e]||{})[c],C=g?n:n[e]||(n[e]={}),x=C[c]||(C[c]={});for(d in g&&(i=e),i)u=!m&&y&&void 0!==y[d],h=(u?y:i)[d],p=b&&u?r(h,s):v&&"function"==typeof h?r(Function.call,h):h,y&&o(y,d,h,t&l.U),C[d]!=h&&a(C,d,p),v&&x[d]!=h&&(x[d]=h)};s.core=n,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},"5cc5":function(t,e,i){var s=i("2b4c")("iterator"),n=!1;try{var a=[7][s]();a["return"]=function(){n=!0},Array.from(a,function(){throw 2})}catch(o){}t.exports=function(t,e){if(!e&&!n)return!1;var i=!1;try{var a=[7],r=a[s]();r.next=function(){return{done:i=!0}},a[s]=function(){return r},t(a)}catch(o){}return i}},"5dbc":function(t,e,i){var s=i("d3f4"),n=i("8b97").set;t.exports=function(t,e,i){var a,o=e.constructor;return o!==i&&"function"==typeof o&&(a=o.prototype)!==i.prototype&&s(a)&&n&&n(t,a),t}},"5df3":function(t,e,i){"use strict";var s=i("02f4")(!0);i("01f9")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=s(e,i),this._i+=t.length,{value:t,done:!1})})},"5eda":function(t,e,i){var s=i("5ca1"),n=i("8378"),a=i("79e5");t.exports=function(t,e){var i=(n.Object||{})[t]||Object[t],o={};o[t]=e(i),s(s.S+s.F*a(function(){i(1)}),"Object",o)}},"5f1b":function(t,e,i){"use strict";var s=i("23c6"),n=RegExp.prototype.exec;t.exports=function(t,e){var i=t.exec;if("function"===typeof i){var a=i.call(t,e);if("object"!==typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==s(t))throw new TypeError("RegExp#exec called on incompatible receiver");return n.call(t,e)}},"5fff":function(t,e,i){},"613b":function(t,e,i){var s=i("5537")("keys"),n=i("ca5a");t.exports=function(t){return s[t]||(s[t]=n(t))}},"61c8":function(t,e,i){},"622b":function(t,e,i){},"626a":function(t,e,i){var s=i("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==s(t)?t.split(""):Object(t)}},"628d":function(t,e,i){"use strict";i("5fff")},6762:function(t,e,i){"use strict";var s=i("5ca1"),n=i("c366")(!0);s(s.P,"Array",{includes:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")("includes")},6821:function(t,e,i){var s=i("626a"),n=i("be13");t.exports=function(t){return s(n(t))}},"69a8":function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},"69bb":function(t,e,i){"use strict";i("ba05")},"6a2b":function(t,e,i){},"6a99":function(t,e,i){var s=i("d3f4");t.exports=function(t,e){if(!s(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!s(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!s(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!s(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},"6b54":function(t,e,i){"use strict";i("3846");var s=i("cb7c"),n=i("0bfb"),a=i("9e1e"),o="toString",r=/./[o],c=function(t){i("2aba")(RegExp.prototype,o,t,!0)};i("79e5")(function(){return"/a/b"!=r.call({source:"a",flags:"b"})})?c(function(){var t=s(this);return"/".concat(t.source,"/","flags"in t?t.flags:!a&&t instanceof RegExp?n.call(t):void 0)}):r.name!=o&&c(function(){return r.call(this)})},"6fb5":function(t,e,i){},"718e":function(t,e,i){"use strict";i("e95c")},7333:function(t,e,i){"use strict";var s=i("9e1e"),n=i("0d58"),a=i("2621"),o=i("52a7"),r=i("4bf8"),c=i("626a"),l=Object.assign;t.exports=!l||i("79e5")(function(){var t={},e={},i=Symbol(),s="abcdefghijklmnopqrst";return t[i]=7,s.split("").forEach(function(t){e[t]=t}),7!=l({},t)[i]||Object.keys(l({},e)).join("")!=s})?function(t,e){var i=r(t),l=arguments.length,d=1,u=a.f,h=o.f;while(l>d){var p,m=c(arguments[d++]),g=u?n(m).concat(u(m)):n(m),f=g.length,v=0;while(f>v)p=g[v++],s&&!h.call(m,p)||(i[p]=m[p])}return i}:l},7514:function(t,e,i){"use strict";var s=i("5ca1"),n=i("0a49")(5),a="find",o=!0;a in[]&&Array(1)[a](function(){o=!1}),s(s.P+s.F*o,"Array",{find:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),i("9c6c")(a)},7726:function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},"77f1":function(t,e,i){var s=i("4588"),n=Math.max,a=Math.min;t.exports=function(t,e){return t=s(t),t<0?n(t+e,0):a(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,i){"use strict";var s=i("7726"),n=i("86cc"),a=i("9e1e"),o=i("2b4c")("species");t.exports=function(t){var e=s[t];a&&e&&!e[o]&&n.f(e,o,{configurable:!0,get:function(){return this}})}},"7f20":function(t,e,i){var s=i("86cc").f,n=i("69a8"),a=i("2b4c")("toStringTag");t.exports=function(t,e,i){t&&!n(t=i?t:t.prototype,a)&&s(t,a,{configurable:!0,value:e})}},"7f7f":function(t,e,i){var s=i("86cc").f,n=Function.prototype,a=/^\s*function ([^ (]*)/,o="name";o in n||i("9e1e")&&s(n,o,{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(t){return""}}})},8378:function(t,e){var i=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=i)},"83a1":function(t,e,i){},"84f2":function(t,e){t.exports={}},"85ff":function(t,e,i){"use strict";i("cb50")},8615:function(t,e,i){var s=i("5ca1"),n=i("504c")(!1);s(s.S,"Object",{values:function(t){return n(t)}})},"86cc":function(t,e,i){var s=i("cb7c"),n=i("c69a"),a=i("6a99"),o=Object.defineProperty;e.f=i("9e1e")?Object.defineProperty:function(t,e,i){if(s(t),e=a(e,!0),s(i),n)try{return o(t,e,i)}catch(r){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},"8b97":function(t,e,i){var s=i("d3f4"),n=i("cb7c"),a=function(t,e){if(n(t),!s(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,s){try{s=i("9b43")(Function.call,i("11e9").f(Object.prototype,"__proto__").set,2),s(t,[]),e=!(t instanceof Array)}catch(n){e=!0}return function(t,i){return a(t,i),e?t.__proto__=i:s(t,i),t}}({},!1):void 0),check:a}},"8bcf":function(t,e,i){},"8e6e":function(t,e,i){var s=i("5ca1"),n=i("990b"),a=i("6821"),o=i("11e9"),r=i("f1ae");s(s.S,"Object",{getOwnPropertyDescriptors:function(t){var e,i,s=a(t),c=o.f,l=n(s),d={},u=0;while(l.length>u)i=c(s,e=l[u++]),void 0!==i&&r(d,e,i);return d}})},"8fb6":function(t,e,i){"use strict";i("83a1")},9093:function(t,e,i){var s=i("ce10"),n=i("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return s(t,n)}},9204:function(t,e){var i=Object.defineProperty,s=(t,e,s)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,n=(t,e,i)=>(s(t,"symbol"!=typeof e?e+"":e,i),i);function a(){const t=navigator.userAgent,e=/(?:Windows Phone)/.test(t),i=/(?:SymbianOS)/.test(t)||e,s=/(?:Android)/.test(t),n=/(?:Firefox)/.test(t),a=/(?:iPad|PlayBook)/.test(t)||s&&!/(?:Mobile)/.test(t)||n&&/(?:Tablet)/.test(t),o=/(?:iPhone)/.test(t)&&!a;return{isTablet:a,isPhone:o,isAndroid:s,isPc:!o&&!s&&!i}}function o(t,e=!1,i="block"){t&&(t.className=t.className.replace(/ chat-view-show| chat-view-hidden/g,""),e?(t.style.display=i,t.className+=" chat-view-show"):(t.className+=" chat-view-hidden",t.style.display="none"))}function r(t,e="block"){return t&&t.style.display===e}function c(t,e,i){t.classList[i?"add":"remove"](e)}(function(){const t=document.createElement("link").relList;if(!(t&&t.supports&&t.supports("modulepreload"))){for(const t of document.querySelectorAll('link[rel="modulepreload"]'))i(t);new MutationObserver(t=>{for(const e of t)if("childList"===e.type)for(const t of e.addedNodes)"LINK"===t.tagName&&"modulepreload"===t.rel&&i(t)}).observe(document,{childList:!0,subtree:!0})}function e(t){const e={};return t.integrity&&(e.integrity=t.integrity),t.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),"use-credentials"===t.crossOrigin?e.credentials="include":"anonymous"===t.crossOrigin?e.credentials="omit":e.credentials="same-origin",e}function i(t){if(t.ep)return;t.ep=!0;const i=e(t);fetch(t.href,i)}})();const l=(t=50)=>new Promise(e=>{setTimeout(e,t)}),d=t=>"false"!==String(t)&&"null"!==String(t)&&"0"!==String(t),u=(t,e,i=!1)=>{let s;return function(...n){const a=this,o=()=>{s=null,i||t.apply(a,n)},r=i&&!s;clearTimeout(s),s=setTimeout(o,e),r&&t.apply(a,n)}},h=(t,e)=>{let i;return function(...s){const n=this;i||(t.apply(n,s),i=!0,setTimeout(function(){i=!1},e))}},p=(t,e,i)=>(t=t.toLowerCase(),e=e.toLowerCase(),i=i.toLowerCase(),i=i.replace(/\s/g,""),!/[\p{P}\p{S}]/u.test(i)&&m(t,e||t,i)),m=(t,e,i)=>{if(!i)return!1;const{chinesePart:s,pinyinPart:n,numberPart:a}=g(i);if(s&&!t.startsWith(s)||a&&!t.includes(a))return!1;const o=e.replace(/\s+/g,"").toLowerCase();return!(n&&!v(n,o))},g=t=>{let e="",i="",s="",n=null;for(const a of t)f(a)?(n="chinese",e+=a):/[a-zA-Z]/.test(a)?(n="pinyin",i+=a.toLowerCase()):/\d/.test(a)?(n="number",s+=a):n=null;return{chinesePart:e,pinyinPart:i,numberPart:s,currentType:n}},f=t=>{const e=t.charCodeAt(0);return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791},v=(t,e)=>{let i=0;for(const s of e){if(i>=t.length)break;s===t[i]&&i++}return i===t.length},b=(t,e,i)=>t.getAttribute("data-set-richType")===e?t:i>0?b(t.parentElement,e,i-1):null,y=(t,e,i)=>t&&t[e]?t[e]:i,C='<svg class="check-empty-svg" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',x='<svg class="empty-svg" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',E='<svg class="icon-search" style="vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M684.8 223.530667a326.272 326.272 0 0 1 24.96 433.621333c2.645333 2.133333 5.290667 4.48 7.850667 7.04L870.4 817.066667c24.789333 24.746667 32.896 56.832 18.133333 71.594666-14.762667 14.805333-46.848 6.656-71.637333-18.090666l-152.789333-152.832a106.282667 106.282667 0 0 1-7.210667-7.936 326.101333 326.101333 0 0 1-433.109333-25.173334c-127.445333-127.445333-127.573333-333.952-0.256-461.269333 127.36-127.36 333.866667-127.232 461.269333 0.213333zM275.328 275.114667a252.885333 252.885333 0 0 0 0.256 357.632 252.885333 252.885333 0 0 0 357.632 0.256 252.885333 252.885333 0 0 0-0.256-357.632 252.885333 252.885333 0 0 0-357.632-0.256z" fill="#9B9B9B"></path></svg>',w='<div class="ant-spin ant-spin-spinning" aria-live="polite" aria-busy="true"><span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span></div>',A='<svg class="match-empty-svg" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',k='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="M9.218 17.41 19.83 6.796a.99.99 0 1 1 1.389 1.415c-3.545 3.425-4.251 4.105-11.419 11.074a.997.997 0 0 1-1.375.018c-1.924-1.801-3.709-3.568-5.573-5.43a.999.999 0 0 1 1.414-1.413z"></path></svg>',I='<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="none" viewBox="0 0 24 24"><path fill="currentColor" d="m20.23 8.653-7.795 9.685a1.2 1.2 0 0 1-1.87 0L2.771 8.652C2.14 7.867 2.698 6.7 3.706 6.7h15.588c1.008 0 1.567 1.167.935 1.952"></path></svg>';class _{constructor(t){n(this,"target"),n(this,"richText",document.createElement("div")),n(this,"placeholderElm",document.createElement("div")),n(this,"isExternalCallPopup",!1),n(this,"isPointSearchMode",!1),n(this,"checkboxRows",[]),n(this,"customTags",{}),n(this,"selectTags",{}),n(this,"pcElms",{containerDialogElm:null,pointDialogElm:null,pointDialogCheckElm:null,pointDialogMainElm:null,pointDialogUsersElm:[],pointDialogActiveElm:null,pointDialogLoadingElm:null,pointDialogEmptyElm:null,checkDialogElm:null,checkDialogSearchResultElm:null,checkDialogUsersElm:null,checkDialogSearchInputElm:null,checkDialogTagsElm:null,customTagDialogElms:{},customTagDialogTagKey:"",customTagDialogActiveElm:null,selectDialogElms:{},selectDialogKey:"",selectDialogAim:null}),n(this,"h5Elms",{dialogElm:null,dialogMainElm:null,dialogCheckElm:null,dialogShowElm:null,dialogSearchElm:null,dialogEmptyElm:null,dialogLoadingElm:null}),this.target=t,this.createRichText(),this.createPlaceholder(),t.deviceInfo.isPc?this.createPCDialog():this.createH5Dialog()}createRichText(){const{options:t,deviceInfo:e}=this.target,{elm:i}=t;c(i,"chat-area-"+(e.isPc?"pc":"h5"),!0),c(this.richText,"chat-rich-text",!0),this.richText.setAttribute("data-set-richType","richAllBox"),this.richText.setAttribute("contenteditable","true"),i.appendChild(this.richText)}createPlaceholder(){const{options:t}=this.target,{elm:e}=t;c(this.placeholderElm,"chat-placeholder-wrap",!0),o(this.placeholderElm,!0),e.appendChild(this.placeholderElm)}createPCDialog(){const{options:t}=this.target,{needDialog:e,elm:i,asyncMatch:s}=t;if(!e)return;const{pcElms:n}=this;if(n.containerDialogElm=document.createElement("div"),c(this.pcElms.containerDialogElm,"chat-dialog",!0),!i.parentElement)throw new Error('配置项:"elm" 需要存在一个父级元素,请检查后重新配置!');i.nextElementSibling?i.parentElement.insertBefore(n.containerDialogElm,i.nextElementSibling):i.parentElement.appendChild(n.containerDialogElm),s||this.createPCCheckDialog(),this.createPCPointDialog()}createPCCheckDialog(){const{options:t}=this.target,e=this.target.options.dialogLabels.pcPCheckDialog,{pcElms:i}=this;i.checkDialogElm=document.createElement("div"),c(i.checkDialogElm,"checkbox-dialog",!0),o(i.checkDialogElm),i.checkDialogElm.innerHTML=`\n <div class="checkbox-dialog-container">\n <div class="checkbox-dialog-container-header">\n <span>${e.title}</span>\n <span class="checkbox-dialog-container-header-close">⛌</span>\n </div>\n <div class="checkbox-dialog-container-body">\n <div class="checkbox-dialog-left-box">\n <div class="checkbox-dialog-search">\n <input class="checkbox-dialog-search-input" placeholder="${e.searchPlaceholder}" type="text">\n <div class="checkbox-dialog-search-group"></div>\n </div>\n <div class="checkbox-dialog-tags"></div>\n <div class="checkbox-dialog-option">\n <button class="checkbox-dialog-option-btn btn-submit disabled">${e.confirmLabel}</button>\n <button class="checkbox-dialog-option-btn btn-close">${e.cancelLabel}</button>\n </div>\n </div>\n <div class="checkbox-dialog-right-box">\n <div class="checkbox-dialog-right-box-title">${e.userTagTitle}</div>\n <div class="checkbox-dialog-check-group"></div>\n </div>\n </div>\n </div>\n `,i.containerDialogElm.appendChild(i.checkDialogElm),i.checkDialogUsersElm=i.checkDialogElm.querySelector(".checkbox-dialog-check-group"),i.checkDialogSearchResultElm=i.checkDialogElm.querySelector(".checkbox-dialog-search-group"),i.checkDialogSearchInputElm=i.checkDialogElm.querySelector(".checkbox-dialog-search-input"),i.checkDialogTagsElm=i.checkDialogElm.querySelector(".checkbox-dialog-tags");const s=()=>{o(i.checkDialogElm),c(document.body,"disable-scroll")};i.checkDialogElm.querySelector(".checkbox-dialog-container-header-close").onclick=s,i.checkDialogElm.querySelector(".btn-close").onclick=s;const n=i.checkDialogElm.querySelector(".btn-submit");n.onclick=async()=>{if(n.classList.contains("disabled"))return;const e=this.checkboxRows.map(e=>{const i=Object.create(null);return i[t.userProps.id]=e.id,i[t.userProps.name]=e.name,i});await this.target.batchSetTag(e),s()},o(i.checkDialogSearchResultElm),i.checkDialogSearchResultElm.onclick=t=>{t.stopPropagation()},i.checkDialogSearchInputElm.onclick=t=>{t.stopPropagation()};const a=u(t=>{const e=String(t.target.value||"").replace(/'/g,"").trim();if(!e)return void o(i.checkDialogSearchResultElm);const s=this.target.searchUserList(e).map(t=>t.id);Array.from(i.checkDialogSearchResultElm.children,(t,e)=>{if(e===i.checkDialogSearchResultElm.children.length-1)o(t,0===s.length);else{const e=t.getAttribute("data-set-id");o(t,-1!==s.indexOf(e),"flex")}}),o(i.checkDialogSearchResultElm,!0)},200);i.checkDialogSearchInputElm.oninput=a,i.checkDialogSearchInputElm.onfocus=a}createPCPointDialog(){const{pcElms:t,target:e}=this;t.pointDialogElm=document.createElement("div"),c(t.pointDialogElm,"call-user-dialog",!0),o(t.pointDialogElm);const i=document.createElement("div");c(i,"call-user-dialog-header",!0),i.innerHTML=`<span class="call-user-dialog-header-title">${e.options.dialogLabels.pcPointDialog.title}</span>`,t.pointDialogCheckElm=document.createElement("span"),c(t.pointDialogCheckElm,"call-user-dialog-header-check",!0),t.pointDialogCheckElm.innerText=e.options.dialogLabels.pcPointDialog.checkLabel,t.pointDialogCheckElm.onclick=()=>{this.target.showPCCheckDialog(),this.isExternalCallPopup=!1},i.appendChild(t.pointDialogCheckElm),t.pointDialogElm.appendChild(i),t.pointDialogMainElm=document.createElement("div"),c(t.pointDialogMainElm,"call-user-dialog-main",!0),t.pointDialogElm.appendChild(t.pointDialogMainElm),e.options.asyncMatch&&(t.pointDialogLoadingElm=document.createElement("div"),c(t.pointDialogLoadingElm,"call-user-dialog-loading",!0),t.pointDialogLoadingElm.innerHTML=w,t.pointDialogElm.appendChild(t.pointDialogLoadingElm),o(t.pointDialogLoadingElm),t.pointDialogEmptyElm=document.createElement("div"),c(t.pointDialogEmptyElm,"call-user-dialog-empty",!0),t.pointDialogEmptyElm.innerHTML=`\n ${A}\n <span class="empty-label">${e.options.dialogLabels.pcPointDialog.emptyLabel}</span>\n `,t.pointDialogElm.appendChild(t.pointDialogEmptyElm),o(t.pointDialogEmptyElm)),t.containerDialogElm.appendChild(t.pointDialogElm)}createH5Dialog(){const{options:t,chatEvent:e}=this.target,{needDialog:i,dialogLabels:s}=t;if(!i)return;const{h5Elms:n}=this;n.dialogElm=document.createElement("div"),c(n.dialogElm,"call-user-popup",!0),n.dialogElm.innerHTML=`\n <div class="call-user-popup-main">\n <div class="call-user-popup-header">\n <span class="popup-show">${s.h5Dialog.cancelLabel}</span>\n <span class="popup-title">${s.h5Dialog.title}</span>\n <span class="popup-check">${s.h5Dialog.confirmLabel}</span>\n </div>\n <div class="call-user-popup-search">\n ${E}\n <input class="call-user-popup-search-input"\n placeholder="${s.h5Dialog.searchPlaceholder}"\n type="text">\n </div>\n <div class="call-user-popup-body"></div>\n </div>\n `;const a=async()=>{n.dialogElm.className=n.dialogElm.className.replace(/ chat-view-show/g," chat-view-hidden"),n.dialogSearchElm.value="",await l(260),o(n.dialogElm),c(document.body,"disable-scroll"),t.asyncMatch&&this.target.updateUserList([]),this.target.chatInput.restCursorPos(this.target.chatInput.vnode,this.target.chatInput.cursorIndex),this.target.chatInput.viewIntoPoint()};n.dialogElm.onclick=a;const r=n.dialogElm.querySelector(".call-user-popup-main");r.onclick=t=>{t.stopPropagation()},n.dialogShowElm=n.dialogElm.querySelector(".popup-show"),n.dialogShowElm.onclick=a,n.dialogCheckElm=n.dialogElm.querySelector(".popup-check"),n.dialogCheckElm.onclick=async()=>{if(n.dialogCheckElm.classList.contains("disabled"))return;const e=n.dialogElm.querySelectorAll(".user-popup-check-item-check")||[];if(0===e.length)return void await a();if(Array.prototype.some.call(e,t=>"isALL"===t.getAttribute("data-set-id")))return await this.target.onceSetTag({[t.userProps.id]:"isALL",[t.userProps.name]:t.dialogLabels.h5Dialog.callEveryLabel}),void await a();const i=Array.from(e,t=>t.getAttribute("data-set-id")),s=t.userList.filter(e=>-1!==i.indexOf(String(e[t.userProps.id])));await this.target.batchSetTag(s),await a()},n.dialogMainElm=n.dialogElm.querySelector(".call-user-popup-body"),n.dialogEmptyElm=document.createElement("div"),c(n.dialogEmptyElm,"call-user-popup-empty",!0),this.h5Elms.dialogEmptyElm.innerHTML=`\n ${x}\n <span class="empty-label">${t.dialogLabels.h5Dialog.searchEmptyLabel}</span>\n `,o(n.dialogEmptyElm),r.appendChild(n.dialogEmptyElm),t.asyncMatch&&(n.dialogLoadingElm=document.createElement("div"),c(n.dialogLoadingElm,"call-user-popup-loading",!0),n.dialogLoadingElm.innerHTML=w,o(n.dialogLoadingElm),r.appendChild(n.dialogLoadingElm)),n.dialogSearchElm=n.dialogElm.querySelector(".call-user-popup-search-input"),n.dialogSearchElm.oninput=u(i=>{const s=String(i.target.value||"").replace(/'/g,"").trim();if(t.asyncMatch){e.matchKey++;const t=e.matchKey;this.target.updateUserList([]),o(n.dialogLoadingElm,!0),o(n.dialogEmptyElm);const i=e.triggerChatEvent("atMatch",s).find(t=>t&&t instanceof Promise);return void(i&&i.then(i=>{if(t===e.matchKey){if(o(n.dialogLoadingElm),!i||i.length<=0)return void o(n.dialogEmptyElm,!0,"flex");this.target.updateUserList(i)}}))}const a=[];Array.from(this.h5Elms.dialogMainElm.children,t=>{if(!s)return o(t,!0,"flex"),void a.push(t);const e=t.getAttribute("data-set-name")||"",i=t.getAttribute("data-set-pinyin")||"";p(e,i,s)?(o(t,!0,"flex"),a.push(t)):o(t)}),o(this.h5Elms.dialogEmptyElm,!a.length,"flex")},200),o(n.dialogElm),document.body.appendChild(n.dialogElm)}updatePCUser(){const{pcElms:t,target:e}=this;t.pointDialogMainElm.innerHTML="",t.pointDialogActiveElm=void 0;const i=document.createDocumentFragment();if(this.target.options.needCallEvery){const t=document.createElement("div");c(t,"call-user-dialog-item",!0),t.setAttribute("data-set-id","isALL"),this.userSelectStyleAndEvent(t,{id:"isALL",name:e.options.dialogLabels.pcPointDialog.callEveryLabel}),t.innerHTML=`\n <span class="call-user-dialog-item-sculpture">\n <span style="transform: scale(0.75)">@</span>\n </span>\n <span class="call-user-dialog-item-name">${e.options.dialogLabels.pcPointDialog.callEveryLabel}(${e.options.reformList.length})</span>\n `,i.appendChild(t)}if(e.options.reformList.forEach(t=>{const e=document.createElement("div");c(e,"call-user-dialog-item",!0),e.setAttribute("data-set-id",t.id),this.userSelectStyleAndEvent(e,t),this.getUserHtmlTemplate(e,t),i.appendChild(e)}),t.pointDialogMainElm.appendChild(i),t.pointDialogUsersElm=[],Array.from(t.pointDialogMainElm.children||[],(e,i)=>{t.pointDialogUsersElm.push({index:i,elm:e})}),e.options.asyncMatch)return;t.checkDialogUsersElm.innerHTML=`\n <div class="checkbox-dialog-check-item" data-set-value="ALL">\n <input type="checkbox" value>\n <span class="checkbox-dialog-check-item-inner"></span>\n <div class="checkbox-dialog-check-item-label">${e.options.dialogLabels.pcPCheckDialog.checkAllLabel}</div>\n </div>\n `;const s=document.createDocumentFragment();e.options.reformList.forEach(t=>{const e=document.createElement("div");c(e,"checkbox-dialog-check-item",!0),e.setAttribute("data-set-value",t.id),e.innerHTML='\n <input type="checkbox" value>\n <span class="checkbox-dialog-check-item-inner"></span>\n ',this.getUserHtmlTemplate(e,t),s.appendChild(e)}),t.checkDialogUsersElm.appendChild(s),t.checkDialogUsersElm&&t.checkDialogUsersElm.children.length&&Array.from(t.checkDialogUsersElm.children,t=>{t.onclick=()=>{const i=t.getAttribute("data-set-value")||"",s=e.options.reformList.find(t=>t.id===i),n=-1===t.className.indexOf("checkbox-dialog-check-item-check");"ALL"===i?this.checkboxRows=n?e.options.reformList.map(t=>t):[]:n?this.checkboxRows.push(s):this.checkboxRows=this.checkboxRows.filter(t=>t.id!==i),this.updateCheckDialogTags()}});const n=document.createDocumentFragment();e.options.reformList.forEach(t=>{const i=document.createElement("div");c(i,"checkbox-dialog-check-item",!0),i.setAttribute("data-set-id",t.id);const s=document.createElement("div");c(s,"checkbox-dialog-check-item-label",!0),this.getUserHtmlTemplate(s,t),i.appendChild(s),i.onclick=()=>{o(this.pcElms.checkDialogSearchResultElm);const t=i.getAttribute("data-set-id")||"";if(this.pcElms.checkDialogSearchInputElm.value="",this.pcElms.checkDialogSearchInputElm.focus(),this.checkboxRows.some(e=>e.id===t))return;const s=e.options.reformList.find(e=>e.id===t);s&&this.checkboxRows.push(s),this.updateCheckDialogTags()},n.appendChild(i)});const a=document.createElement("div");c(a,"checkbox-dialog-search-empty",!0),a.innerText=e.options.dialogLabels.pcPCheckDialog.searchEmptyLabel,n.appendChild(a),t.checkDialogSearchResultElm.appendChild(n)}updateH5User(){const{h5Elms:t,target:e}=this;t.dialogMainElm.innerHTML="";const i=e.options.reformList&&e.options.reformList.length>0,s=document.createDocumentFragment(),n=document.createElement("span");if(n.innerHTML='\n <input type="checkbox" value>\n <span class="user-popup-check-item-inner"></span>\n ',i){const t=document.createElement("div");e.options.needCallEvery&&(c(t,"call-user-popup-item",!0),t.setAttribute("data-set-id","isALL"),t.innerHTML=`\n <span class="call-user-dialog-item-sculpture">\n <span style="transform: scale(0.75)">@</span>\n </span>\n <span class="call-user-dialog-item-name">${e.options.dialogLabels.h5Dialog.callEveryLabel}(${e.options.reformList.length})</span>\n `,t.appendChild(n.cloneNode(!0)),t.onclick=()=>{const e=!t.classList.contains("user-popup-check-item-check");Array.from(this.h5Elms.dialogMainElm.children,t=>{c(t,"user-popup-check-item-check",e)}),c(this.h5Elms.dialogCheckElm,"disabled",!e)},s.appendChild(t)),e.options.reformList.forEach((e,i)=>{const a=document.createElement("div");c(a,"call-user-popup-item",!0),a.setAttribute("data-set-id",e.id),a.setAttribute("data-set-name",e.name),a.setAttribute("data-set-pinyin",e.pinyin||""),this.getUserHtmlTemplate(a,e),a.appendChild(n.cloneNode(!0)),s.appendChild(a),a.onclick=e=>{const i=!a.classList.contains("user-popup-check-item-check");c(a,"user-popup-check-item-check",i);const s=Array.prototype.every.call(this.h5Elms.dialogMainElm.children,t=>t.classList.contains("user-popup-check-item-check")||"isALL"===t.getAttribute("data-set-id"));c(t,"user-popup-check-item-check",s);const n=Array.prototype.some.call(this.h5Elms.dialogMainElm.children,t=>t.classList.contains("user-popup-check-item-check"));c(this.h5Elms.dialogCheckElm,"disabled",!n)}})}t.dialogMainElm.appendChild(s)}updateCheckDialogTags(){const t=this.checkboxRows.map(t=>t.id),e=[],i=[],s=document.createElement("div");s.className="check-empty",s.innerHTML=`\n ${C}\n <span class="check-empty-label">${this.target.options.dialogLabels.pcPCheckDialog.checkEmptyLabel}</span>\n `,Array.from(this.pcElms.checkDialogTagsElm.children,s=>{const n=s.getAttribute("data-set-value");-1===t.indexOf(n)?i.push(s):e.push(n)}),Array.from(this.pcElms.checkDialogUsersElm.children,(e,i)=>{if(0===i)return void c(e,"checkbox-dialog-check-item-check",t.length===this.target.options.reformList.length);const s=e.getAttribute("data-set-value");c(e,"checkbox-dialog-check-item-check",-1!==t.indexOf(s))}),i.forEach(t=>{this.pcElms.checkDialogTagsElm.removeChild(t)});const n=this.pcElms.checkDialogElm.querySelector(".btn-submit");c(n,"disabled",t.length<=0),t.length||this.pcElms.checkDialogTagsElm.appendChild(s);const a=this.checkboxRows.filter(t=>-1===e.indexOf(t.id));if(!a.length)return;const o=document.createDocumentFragment();a.forEach(t=>{const e=document.createElement("div");e.setAttribute("class","checkbox-dialog-tag-item"),e.setAttribute("data-set-value",t.id),e.innerHTML=`\n <span>${t.name}</span>\n `;const i=document.createElement("span");i.setAttribute("class","checkbox-dialog-tag-item-close"),i.innerHTML="⛌",i.onclick=()=>{const t=e.getAttribute("data-set-value");this.checkboxRows=this.checkboxRows.filter(e=>e.id!==t),this.updateCheckDialogTags()},e.appendChild(i),o.appendChild(e)}),this.pcElms.checkDialogTagsElm.appendChild(o)}userSelectStyleAndEvent(t,e){t.addEventListener("click",async i=>{const{options:s}=this.target;if(i.stopPropagation(),this.updatePointActiveUserElm(t),this.isPointSearchMode||s.asyncMatch)await this.target.matchSetTag(e);else{const t=s.userList.find(t=>String(t[s.userProps.id])===e.id);await this.target.onceSetTag(t)}this.exitPointDialog()})}bindCustomTrigger(){Object.values(this.pcElms.customTagDialogElms).forEach(t=>{this.pcElms.containerDialogElm.removeChild(t)}),this.pcElms.customTagDialogElms={},this.customTags={},this.target.options.customTrigger.forEach(t=>{t.tagList&&t.tagList.length>0&&(this.customTags[t.prefix]=t.tagList.map(t=>({id:String(t.id),name:String(t.name),pinyin:String(t.pinyin||"")})),this.createCustomTagDialog(t))})}createCustomTagDialog(t){const e=document.createElement("div");e.setAttribute("class","call-tag-dialog"),o(e);const i=document.createElement("div");i.setAttribute("class","call-tag-dialog-header"),i.innerHTML=`<span class="call-tag-dialog-header-title">${t.dialogTitle||t.prefix}</span>`,e.appendChild(i);const s=document.createElement("div");s.setAttribute("class","call-tag-dialog-main"),t.tagList.forEach(t=>{const e=document.createElement("div");e.setAttribute("class","call-tag-dialog-item"),e.setAttribute("data-set-id",t.id);const i=document.createElement("span");i.setAttribute("class","call-tag-dialog-item-name"),i.innerHTML=t.name,e.appendChild(i),e.addEventListener("click",async i=>{i.stopPropagation(),this.updateActiveCustomTagElm(e),this.isPointSearchMode?await this.target.matchSetCustomTag(t):await this.target.onceSetCustomTag(t),this.exitCustomTagDialog()}),s.appendChild(e)}),e.appendChild(s),this.pcElms.containerDialogElm.appendChild(e),this.pcElms.customTagDialogElms[t.prefix]=e}getUserHtmlTemplate(t,e){const i=document.createElement("span");if(i.setAttribute("class","call-user-dialog-item-sculpture "+(e.avatar?"is-avatar":"")),e.avatar){const t=new Image;t.alt="",t.src=String(e.avatar),i.appendChild(t)}else i.innerHTML=`<span style="transform: scale(0.75)">${e.name.slice(-2)}</span>`;t.appendChild(i);const s=document.createElement("span");s.setAttribute("class","call-user-dialog-item-name"),s.innerHTML=e.name,t.appendChild(s)}updatePointActiveUserElm(t,e=!1){if(this.pcElms.pointDialogActiveElm&&c(this.pcElms.pointDialogActiveElm,"call-user-dialog-item-active"),this.pcElms.pointDialogActiveElm=t,t&&(c(t,"call-user-dialog-item-active",!0),e)){const e=Array.prototype.filter.call(this.pcElms.pointDialogMainElm.children,t=>-1===t.className.indexOf("user-no-match")),i=t.clientHeight,s=Array.prototype.indexOf.call(e,t),n=Math.ceil(Math.floor(this.pcElms.pointDialogMainElm.clientHeight/i)/2),a=s+1-n;this.pcElms.pointDialogMainElm.scrollTop=a>0?a*i:0}}updateActiveCustomTagElm(t,e=!1){if(this.pcElms.customTagDialogActiveElm&&c(this.pcElms.customTagDialogActiveElm,"call-tag-dialog-item-active"),this.pcElms.customTagDialogActiveElm=t,t&&(c(t,"call-tag-dialog-item-active",!0),e)){const e=this.pcElms.customTagDialogElms[this.pcElms.customTagDialogTagKey].children[1],i=Array.prototype.filter.call(e.children,t=>-1===t.className.indexOf("tag-no-match")),s=t.clientHeight,n=Array.prototype.indexOf.call(i,t),a=Math.ceil(Math.floor(e.clientHeight/s)/2),o=n+1-a;e.scrollTop=o>0?o*s:0}}showPointDialog(t){this.exitSelectDialog(),this.exitCustomTagDialog(),this.exitPointDialog(),this.isPointSearchMode=!!t;let e=null;this.pcElms.pointDialogUsersElm.forEach(i=>{const s=i.elm,n=s.getAttribute("data-set-id"),a=t&&t.every(t=>t.id!==n);!e&&!a&&(e=s),c(s,"user-no-match",a)}),null!==e&&this.updatePointActiveUserElm(e),o(this.pcElms.pointDialogCheckElm,!this.target.options.asyncMatch&&!this.isPointSearchMode),o(this.pcElms.pointDialogElm,!0),this.target.chatEvent.debounceEvents.dialogMoveToRange(this.pcElms.pointDialogElm),this.pcElms.pointDialogMainElm.scrollTop=0}showCustomTagDialog(t,e){this.exitSelectDialog(),this.exitCustomTagDialog(),this.exitPointDialog(),this.isPointSearchMode=!!e,this.pcElms.customTagDialogTagKey=t;const i=this.pcElms.customTagDialogElms[t],s=i.children[1];let n=null;Array.from(s.children,t=>{const i=t.getAttribute("data-set-id"),s=e&&e.every(t=>t.id!==i);!n&&!s&&(n=t),c(t,"tag-no-match",s)}),null!==n&&this.updateActiveCustomTagElm(n),o(i,!0),this.target.chatEvent.debounceEvents.dialogMoveToRange(i),i.children[1].scrollTop=0}exitPointDialog(){this.updatePointActiveUserElm(),this.target.options.asyncMatch&&this.target.updateUserList([]),o(this.pcElms.pointDialogElm)}exitCustomTagDialog(){this.updateActiveCustomTagElm();for(const t in this.pcElms.customTagDialogElms)o(this.pcElms.customTagDialogElms[t])}ruleShowPointDialog(){const{options:t,chatInput:e}=this.target;t.needDialog&&t.reformList.length>0&&e.showAt()&&(this.isExternalCallPopup=!1,this.showPointDialog())}showPlaceholder(){o(this.placeholderElm,this.target.isEmpty())}bindSelectList(){Object.values(this.pcElms.selectDialogElms).forEach(t=>{this.pcElms.containerDialogElm.removeChild(t)}),this.pcElms.selectDialogElms={},this.selectTags={},this.target.options.selectList.forEach(t=>{t.options&&t.options.length>0&&(this.selectTags[t.key]=t.options.map(t=>({id:String(t.id),name:String(t.name),preview:String(t.preview||"")})),this.createSelectDialog(t))})}createSelectDialog(t){const e=document.createElement("div");e.setAttribute("class","chat-select-dialog"),o(e);const i=document.createElement("div");i.setAttribute("class","chat-select-dialog-header"),i.innerHTML=`<span class="chat-select-dialog-header-title">${t.dialogTitle||t.key}</span>`,e.appendChild(i);const s=document.createElement("div");s.setAttribute("class","chat-select-dialog-main"),t.options.forEach(t=>{const e=document.createElement("div");if(e.setAttribute("class","chat-select-dialog-item"),e.setAttribute("data-set-id",t.id),t.preview){const i=document.createElement("img");i.setAttribute("class","chat-select-dialog-preview"),i.src=String(t.preview),e.appendChild(i)}const i=document.createElement("span");i.setAttribute("class","chat-select-dialog-name"),i.textContent=t.name;const n=document.createElement("span");n.setAttribute("class","chat-select-dialog-check"),n.innerHTML=k,o(n),i.appendChild(n),e.appendChild(i),e.onclick=async()=>{await this.target.setSelectTag(t)},s.appendChild(e)}),e.appendChild(s);const n=document.createElement("div");n.setAttribute("class","chat-select-arrow"),e.appendChild(n),this.pcElms.containerDialogElm.appendChild(e),this.pcElms.selectDialogElms[t.key]=e}exitSelectDialog(){for(const t in this.pcElms.selectDialogElms)o(this.pcElms.selectDialogElms[t]);this.pcElms.selectDialogKey="",this.pcElms.selectDialogAim&&(c(this.pcElms.selectDialogAim,"aim"),this.pcElms.selectDialogAim=null)}}class S{constructor(t){n(this,"target"),n(this,"richText"),n(this,"vnode"),n(this,"cursorIndex"),n(this,"cursorLeft"),n(this,"needCallSpace",!1),n(this,"VOID_KEY","\ufeff"),n(this,"ZERO_WIDTH_KEY","​"),n(this,"IME_RECORD",{MARK:void 0,GRID:void 0,TAG:void 0,NODE:void 0,INDEX:void 0}),this.target=t,this.richText=t.chatElement.richText,this.textInnerHtmlInit()}textInnerHtmlInit(t=!1,e){if(t||this.getNodeEmpty(this.richText)){this.richText.innerHTML="";const t=this.getGridElm();this.richText.appendChild(t);const i=t.children[0].children[0];e&&(i.textContent=e,i.setAttribute("data-set-empty","false"));const s=i.childNodes[0];this.restCursorPos(s,s.textContent===this.VOID_KEY?1:s.textContent.length)}}onceCall(t){return new Promise(e=>{const i=this.createChatTagElm(t,"@","at-user","user-id");this.replaceRegContent(i),e()})}onceSearchCall(t,e){return new Promise(i=>{const s=this.createChatTagElm(t,"@","at-user","user-id");this.replaceRegContent(s,e),i()})}onceCustomCall(t,e,i){return new Promise(s=>{const n=this.createChatTagElm(t,i,"at-tag","tag-id");n.children[0].setAttribute("data-set-prefix",i),this.replaceRegContent(n,e),s()})}upDataNodeOrIndex(){var t,e,i;const{focusNode:s,focusOffset:n,anchorOffset:a}=window.getSelection(),o=(null==s?void 0:s.parentNode)||void 0;!o||!o.getAttribute||"richInput"!==o.getAttribute("data-set-richType")||(null==(i=null==(e=null==(t=null==s?void 0:s.parentNode)?void 0:t.parentNode)?void 0:e.parentNode)?void 0:i.parentNode)!==this.richText||(this.vnode=s,this.cursorIndex=n,this.cursorLeft=a<n?a:n)}showAt(){if(this.upDataNodeOrIndex(),!this.vnode||this.vnode.nodeType!==Node.TEXT_NODE)return!1;const t=this.vnode.textContent||"",e=/@([^@\s]*)$/,i=t.slice(0,this.cursorIndex),s=e.exec(i);return s&&2===s.length&&"@"===i[i.length-1]}getRangeRect(){let t=0,e=0;const i=window.getSelection();if(i.focusNode.nodeType!==Node.TEXT_NODE)return null;const s=i.getRangeAt(0).getClientRects()[0];return s&&(t=s.x,e=s.y),{x:t,y:e}}createChatTagElm(t,e,i,s){const n=document.createElement("span");return n.className=i,n.setAttribute(`data-${s}`,String(t.id)),n.contentEditable="false",n.textContent=`${e}${t.name}${this.needCallSpace?" ":""}`,this.createNewDom(n)}createNewDom(t){const e=document.createElement("span");return e.className="chat-tag",e.setAttribute("contenteditable","false"),e.setAttribute("data-set-richType","chatTag"),t.className+=" chat-stat",e.appendChild(t),e}restCursorPos(t,e){null==e?e=t.textContent===this.VOID_KEY?1:0:e>t.textContent.length&&(e=t.textContent.length);const i=new Range;i.setStart(t,e),i.setEnd(t,e);const s=window.getSelection();s&&(this.vnode=t,this.cursorIndex=e,this.cursorLeft=e,s.removeAllRanges(),s.addRange(i))}replaceRegContent(t,e=!0){const i=this.vnode.textContent;let s;s="boolean"==typeof e?i.slice(0,e?this.cursorIndex-1:this.cursorIndex):i.slice(0,e-1),0===s.length?(this.vnode.parentElement.setAttribute("data-set-empty",!0),this.vnode.textContent=this.VOID_KEY):this.vnode.textContent=s;let n=i.slice(this.cursorIndex);const a=this.vnode.parentNode.parentNode,o=a.nextSibling;o?a.parentNode.insertBefore(t,o):a.parentNode.appendChild(t);const r=t.previousSibling.childNodes[0],c=r.childNodes[1];c&&r.removeChild(c);const l=this.getGridElm(!0),d=l.childNodes[0];n&&n!==this.VOID_KEY&&(d.setAttribute("data-set-empty","false"),d.innerHTML=n);const u=d.childNodes[1];t.nextSibling?(u&&d.removeChild(u),a.parentNode.insertBefore(l,t.nextSibling)):a.parentNode.appendChild(l),this.restCursorPos(d.childNodes[0])}batchReplaceRegContent(t=[],e=!0){return new Promise(i=>{let s=`<span data-set-richType="richMark"><span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="true">${this.VOID_KEY}</span></span>`;t.forEach(t=>{s+=`<span class="chat-tag" contenteditable="false" data-set-richType="chatTag"><span class="at-user chat-stat" data-user-id="${t.id}" contentEditable="false">@${t.name}${this.needCallSpace?" ":""}</span></span><span data-set-richType="richMark"><span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="true">${this.VOID_KEY}</span></span>`});const n=document.createElement("div");n.innerHTML=s,this.insetRangeGrid(n,e?1:0),i()})}switchRange(t){var e,i;let s,n,{focusNode:a,focusOffset:o}=window.getSelection();if(a.getAttribute&&"richInput"===a.getAttribute("data-set-richType")&&(a=a.childNodes[0]),a.nodeType===Node.TEXT_NODE){const r=a.textContent.length,c=a.parentNode.parentNode;switch(t){case"ArrowLeft":if(o>0&&a.textContent!==this.VOID_KEY){n=o-1,s=a;break}const t=null==(e=null==c?void 0:c.previousSibling)?void 0:e.previousSibling;if(t)s=t.childNodes[0].childNodes[0],n=s.textContent.length;else{const t=c.parentNode.previousSibling;t&&(s=t.lastChild.childNodes[0].childNodes[0],n=s.textContent.length)}break;case"ArrowRight":if(o<r&&a.textContent!==this.VOID_KEY){n=o+1,s=a;break}const l=null==(i=null==c?void 0:c.nextSibling)?void 0:i.nextSibling;if(l)s=l.childNodes[0].childNodes[0],n=s.textContent===this.VOID_KEY?1:0;else{const t=c.parentNode.nextSibling;t&&(s=t.childNodes[0].childNodes[0].childNodes[0],n=s.textContent===this.VOID_KEY?1:0)}break}}(n||0===n)&&this.restCursorPos(s,n)}getGridElm(t=!1){const e=document.createElement("span");if(e.setAttribute("data-set-richType","richMark"),e.innerHTML=`<span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="true">${this.VOID_KEY}<br></span>`,t)return e;const i=document.createElement("p");return i.className="chat-grid-wrap",i.setAttribute("data-set-richType","richBox"),i.appendChild(e),i}updateGrid(){const t=window.getSelection(),e=t.focusNode;if(!e)return;const i=e.parentNode,s=i.getAttribute("data-set-richType");let n,a,o,r;switch(s){case"richAllBox":if(n=e.childNodes[t.focusOffset],!n||"chatTag"===n.getAttribute("data-set-richType")){const t=this.getGridElm(!0),i=t.children[0];n?(i.removeChild(i.childNodes[1]),e.insertBefore(t,n)):e.appendChild(t),this.restCursorPos(i.childNodes[0]);break}if("BR"===n.tagName){const t=this.getGridElm(!0),i=t.children[0];e.insertBefore(t,n),e.removeChild(n),this.restCursorPos(i.childNodes[0],i.childNodes[0].textContent.length)}break;case"richMark":const s=i.parentNode,c=Array.prototype.indexOf.call(s.childNodes,i);if(-1===c)break;if(0===c){const e=t.focusNode;e.setAttribute("data-set-empty","true"),e.innerHTML=`${this.VOID_KEY}<br>`,n=e.childNodes[0],this.restCursorPos(n,n.textContent.length);break}let l,d=i.previousSibling;"chatTag"===d.getAttribute("data-set-richType")?(l=d.previousSibling,s.removeChild(d),s.removeChild(i)):(l=i.previousSibling,s.removeChild(i)),n=l.childNodes[0].childNodes[0],n.textContent===this.VOID_KEY&&n.parentNode.appendChild(document.createElement("br")),this.restCursorPos(n,n.textContent.length);break;case"richInput":if(r=i.parentNode,o=r.parentNode,this.getNodeEmpty(i)){i.setAttribute("data-set-empty","true"),o.childNodes[o.childNodes.length-1]===r&&(i.innerHTML=`${this.VOID_KEY}<br>`),n=i.childNodes[0],this.restCursorPos(n,n.textContent.length);break}if("true"===String(i.getAttribute("data-set-empty"))){i.setAttribute("data-set-empty","false"),n=i.childNodes[0],this.target.chatEvent.isIMEModel?(i.childNodes[1]&&i.removeChild(i.childNodes[1]),n.textContent===this.VOID_KEY&&i.setAttribute("data-set-empty","true")):i.textContent=n.textContent.replace(new RegExp(this.VOID_KEY,"g"),"");const t=i.childNodes[0];this.restCursorPos(t,t.textContent.length)}if(a=i.parentNode.nextSibling,a&&a.nodeType===Node.TEXT_NODE){let t=a.textContent,e=this.getGridElm(!0);e.childNodes[0].textContent=t,e.childNodes[0].setAttribute("data-set-empty","false"),a.parentNode.insertBefore(e,a),a.parentNode.removeChild(a),a=e}a&&"richMark"===a.getAttribute("data-set-richType")&&this.markMerge(i.parentNode,a);break}}getNodeEmpty(t){const e=new RegExp(`^(${this.ZERO_WIDTH_KEY}|<br>|${this.VOID_KEY})+$`);return!t.innerHTML||e.test(t.innerHTML)}setWrap(t=!0){const e=window.getSelection();let{focusNode:i,focusOffset:s}=e;if(i.nodeType!==Node.TEXT_NODE){if(!i.getAttribute||"richInput"!==i.getAttribute("data-set-richType"))return;i=i.childNodes[0]}const n=i.textContent.slice(s),a=i.parentNode.parentNode,o=a.parentNode,r=Array.prototype.indexOf.call(o.childNodes,a),c=Array.prototype.slice.call(o.childNodes,r+1),l=this.getGridElm();let d=l.children[0].children[0].childNodes[0],u=1;(n||c.length>0)&&d.parentNode.removeChild(d.parentNode.childNodes[1]),n&&n!==this.VOID_KEY&&(i.textContent=i.textContent.slice(0,s),d.textContent=(d.textContent+n).replace(new RegExp(this.VOID_KEY,"g"),()=>(u--,"")),d.parentElement.setAttribute("data-set-empty","false")),c.forEach(t=>{o.removeChild(t),l.appendChild(t)});const h=o.lastChild.childNodes[0],p=l.lastChild.childNodes[0];if(h.childNodes.length<=1){const t=h.childNodes[0];(!t.textContent||t.textContent===this.VOID_KEY)&&(h.innerHTML=`${this.VOID_KEY}<br>`,h.setAttribute("data-set-empty","true"))}if("richMark"!==p.parentElement.getAttribute("data-set-richType"))l.appendChild(this.getGridElm(!0));else if(p.childNodes.length<=1){const t=p.childNodes[0];(!t.textContent||t.textContent===this.VOID_KEY)&&(p.innerHTML=`${this.VOID_KEY}<br>`,p.setAttribute("data-set-empty","true"),d=l.children[0].children[0].childNodes[0])}o.nextSibling?this.richText.insertBefore(l,o.nextSibling):this.richText.appendChild(l),t&&(this.restCursorPos(d,d.textContent===this.VOID_KEY?1:u),this.viewIntoPoint())}selectRegionMerge(){const t=window.getSelection();if(t.isCollapsed||t.rangeCount<=0)return;const e=t.getRangeAt(0);if(e.startContainer.nodeType===Node.TEXT_NODE&&e.startContainer===e.endContainer){const t=e.startContainer;if(t.length===e.endOffset-e.startOffset){const e=t.parentNode,i=e.parentNode===e.parentNode.parentNode.lastChild;e.setAttribute("data-set-empty","true"),e.innerHTML="\ufeff"+(i?"<br>":""),this.restCursorPos(e.childNodes[0])}else e.deleteContents()}else if(e.commonAncestorContainer&&"richBox"===e.commonAncestorContainer.getAttribute("data-set-richType")){const t=e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentNode.parentNode:e.startContainer,i=e.endContainer.nodeType===Node.TEXT_NODE?e.endContainer.parentNode.parentNode:e.endContainer;e.deleteContents(),t.getAttribute("data-set-richType")===i.getAttribute("data-set-richType")&&this.markMerge(t,i)}else if(e.commonAncestorContainer===e.startContainer&&e.startContainer===e.endContainer)this.textInnerHtmlInit(!0);else{const t=t=>{if(t.nodeType===Node.TEXT_NODE)return t.parentNode.parentNode.parentNode;switch(t.getAttribute("data-set-richType")){case"richInput":return t.parentNode.parentNode;case"richMark":return t.parentNode;case"richBox":return t;default:return null}},i=t(e.startContainer),s=t(e.endContainer);if(!i||!s)return;e.deleteContents(),this.gridMerge(i,s)}return!0}gridElmMerge(){const t=window.getSelection(),{focusNode:e,focusOffset:i,isCollapsed:s}=t;if(i>1||!s)return!1;const n=(t,e)=>(t.parentNode===this.richText||t===t.parentNode.childNodes[0])&&(-1!==Array.prototype.indexOf.call(this.richText.childNodes,t)?t:!(e>=6)&&n(t.parentNode,e+1)),a=n(e,0);if(!a||a===this.richText.childNodes[0]||1===i&&"false"===a.children[0].children[0].getAttribute("data-set-empty"))return!1;const o=a.previousSibling;return this.gridMerge(o,a),!0}delMarkRule(){const t=window.getSelection(),e=t.focusNode,i=e.textContent,s=e.parentNode,n=s.parentNode,a=n.parentNode;if(!t.isCollapsed||"richInput"!==s.getAttribute("data-set-richType"))return!1;if(i&&1===i.length&&n!==a.childNodes[0]&&(0!==t.focusOffset||i===this.VOID_KEY)){if(i===this.VOID_KEY){const t=n.previousSibling.previousSibling;a.removeChild(n.previousSibling),a.removeChild(n);const e=t.childNodes[0],i=e.childNodes[0];i.textContent===this.VOID_KEY&&t===a.lastChild&&e.appendChild(document.createElement("br")),this.restCursorPos(i,i.textContent.length)}else{s.innerHTML=n===a.lastChild?`${this.VOID_KEY}<br>`:this.VOID_KEY,s.setAttribute("data-set-empty","true");const t=s.childNodes[0];this.restCursorPos(t,1)}return!0}if(0===t.focusOffset){const t=s.parentNode,e=null==t?void 0:t.previousSibling;return!(!e||"chatTag"!==e.getAttribute("data-set-richType"))&&(this.delTag(e),!0)}}delTag(t){const e=t.previousSibling,i=t.nextSibling;t.parentNode.removeChild(t),this.markMerge(e,i)}gridMerge(t,e,i=!0){"richMark"!==t.lastChild.getAttribute("data-set-richType")&&t.appendChild(this.getGridElm(!0)),"richMark"!==e.childNodes[0].getAttribute("data-set-richType")&&e.insertBefore(this.getGridElm(!0),e.childNodes[0]);const s=t.lastChild.childNodes[0],n=s.childNodes[0];let a=n.textContent.length;Array.from(e.childNodes,e=>{t.appendChild(e.cloneNode(!0))}),e.childNodes.length>1&&s.childNodes[1]&&s.removeChild(s.childNodes[1]);const o=s.parentNode.nextSibling;if(o){const e=o.children[0].childNodes[0];e&&e.textContent!==this.VOID_KEY&&(s.childNodes[1]&&s.removeChild(s.childNodes[1]),n.textContent=(n.textContent+e.textContent).replace(new RegExp(this.VOID_KEY,"g"),()=>(a--,"")),n.parentElement.setAttribute("data-set-empty","false")),t.removeChild(o)}""===n.textContent&&(n.textContent=this.VOID_KEY,n.parentNode.setAttribute("data-set-empty","true"),a=1),this.richText.removeChild(e),i&&(this.restCursorPos(n,a),this.viewIntoPoint())}markMerge(t,e){const i=t.children[0].childNodes[0];let s=i.textContent.length;if(e){const t=e.children[0].childNodes[0];t&&t.textContent!==this.VOID_KEY&&(i.textContent=(i.textContent+t.textContent).replace(new RegExp(this.VOID_KEY,"g"),()=>(s--,"")),i.parentElement.setAttribute("data-set-empty","false")),e.parentNode.removeChild(e)}""===i.textContent&&(i.textContent=this.VOID_KEY,i.parentNode.setAttribute("data-set-empty","true"),s=1);const n=t.parentNode;i.textContent===this.VOID_KEY&&t===n.lastChild&&(i.parentNode.appendChild(document.createElement("br")),i.parentNode.setAttribute("data-set-empty","true"),s=1),this.restCursorPos(i,s)}setCallSpace(t){this.needCallSpace=t}getWrapNode(t,e=!1){if(t.nodeType===Node.TEXT_NODE)return t.parentNode.parentNode.parentNode;const i=t.getAttribute("data-set-richType");if(e&&"chatTag"===i)return t.parentNode;switch(i){case"richInput":return t.parentNode.parentNode;case"richMark":return t.parentNode;case"richBox":return t}}getMarkNode(t,e=!1){if(t.nodeType===Node.TEXT_NODE)return t.parentNode.parentNode;const i=t.getAttribute("data-set-richType");if(e&&"chatTag"===i)return t;switch(i){case"richInput":return t.parentNode;case"richMark":return t}}getRichTextNodeIndex(t){const e=this.getMarkNode(t),i=e.parentNode;return e&&i?{gridIndex:Array.prototype.indexOf.call(this.richText.childNodes,i),markIndex:Array.prototype.indexOf.call(i.childNodes,e)}:{gridIndex:null,markIndex:null}}setWrapNodeByMark(t){const e=document.createElement("p");return e.className="chat-grid-wrap",e.setAttribute("data-set-richType","richBox"),Array.from(t,t=>{e.appendChild(t)}),e}setRangeLastText(){const t=this.richText.childNodes[this.richText.childNodes.length-1],e=t.childNodes[t.childNodes.length-1].children[0].childNodes[0];this.restCursorPos(e,e.textContent===this.VOID_KEY?1:e.textContent.length),this.viewIntoPoint()}viewIntoPoint(){const t=window.getSelection();if(t.rangeCount>0){const e=t.getRangeAt(0),i=this.getWrapNode(e.endContainer);if(!i)return;const s=this.richText.parentElement,{scrollHeight:n,clientHeight:a,scrollTop:o}=s;if(n<=a)return;const r=i.getBoundingClientRect().top-s.getBoundingClientRect().top+i.clientHeight+o,c=o,l=a+o;if(r<c||r>l){const t=r-a;s.scrollTo(0,t)}}}insetRangeGrid(t,e=0){const i=this.vnode.textContent,s=i.slice(0,this.cursorIndex-e);0===s.length?(this.vnode.parentElement.setAttribute("data-set-empty",!0),this.vnode.textContent=this.VOID_KEY):this.vnode.textContent=s;let n=i.slice(this.cursorIndex);const a=[],o=document.createDocumentFragment();Array.from(t.children).forEach((t,e)=>{a.push(t),0!==e&&o.appendChild(t)});const r=a[a.length-1].children[0];n&&n.length>0&&n!==this.VOID_KEY?(r.setAttribute("data-set-empty","false"),r.innerHTML=r.textContent+n):r.setAttribute("data-set-empty","true");const c=this.getMarkNode(this.vnode),l=c.parentElement,d=c.children[0],u=a[0].textContent;u&&u.length>0&&u!==this.VOID_KEY&&(d.setAttribute("data-set-empty","false"),d.innerHTML=(d.textContent+u).replace(new RegExp(this.VOID_KEY,"g"),"")),d.childNodes[1]&&d.removeChild(d.childNodes[1]),c.nextElementSibling?(r.childNodes[1]&&r.removeChild(r.childNodes[1]),l.insertBefore(o,c.nextElementSibling)):l.appendChild(o);const h=n&&n!==this.VOID_KEY?n.length:0;if(a.length>1){const t=r.childNodes[0];this.restCursorPos(t,t.textContent===this.VOID_KEY?1:t.textContent.length-h)}else{const t=d.childNodes[0];this.restCursorPos(t,t.textContent===this.VOID_KEY?1:t.textContent.length-h)}}insetRangeGrids(t){const e=document.createDocumentFragment();Array.from(t).forEach(t=>{e.appendChild(t)});const i=this.getWrapNode(this.vnode);this.restCursorPos(this.vnode,this.cursorIndex),this.setWrap(!1);const s=i.nextElementSibling;s&&this.richText.insertBefore(e,s),s&&s.previousElementSibling?(this.gridMerge(i,i.nextElementSibling,!1),this.gridMerge(s.previousElementSibling,s,!0)):this.gridMerge(i,i.nextElementSibling,!0)}getOffsetRange(t,e,i=!1){const s=e.children[0].childNodes[0],n=s.textContent;if(0===t)return{rangeNode:s,rangeIndex:i?n.length:n===this.VOID_KEY?1:0};if(n.length>=t)return{rangeNode:s,rangeIndex:i?n.length-t:t};let a,o;if(i?(a=!(!e.previousElementSibling||!e.previousElementSibling.previousElementSibling),o=!!e.parentElement.previousElementSibling):(a=!(!e.nextElementSibling||!e.nextElementSibling.nextElementSibling),o=!!e.parentElement.nextElementSibling),!a&&!o)return{rangeNode:s,rangeIndex:i?n.length===this.VOID_KEY?1:0:n.length===this.VOID_KEY?1:n.length};const r=t-n.length-1,c=i?a?e.previousElementSibling.previousElementSibling:e.parentElement.previousElementSibling.lastElementChild:a?e.nextElementSibling.nextElementSibling:e.parentElement.nextElementSibling.children[0];return this.getOffsetRange(r,c,i)}setIMERecord(){if(this.target.deviceInfo.isPc)return;const t=this.getMarkNode(this.vnode);if(!t)return this.IME_RECORD.MARK=null,this.IME_RECORD.TAG=null,void(this.IME_RECORD.GRID=null);this.target.chatEvent.isIMEModel&&t.children[0].childNodes[0].textContent===this.VOID_KEY&&(t.children[0].childNodes[0].textContent=this.VOID_KEY+this.VOID_KEY,this.restCursorPos(this.vnode,this.cursorIndex+1)),this.IME_RECORD.NODE=this.vnode,this.IME_RECORD.INDEX=this.cursorIndex,this.IME_RECORD.MARK=t,this.IME_RECORD.TAG=this.IME_RECORD.MARK.previousElementSibling,this.IME_RECORD.GRID=this.IME_RECORD.MARK.parentElement}handleIMEDelete(){const t=(this.richText.children[0]||{childNodes:[]}).childNodes[0];if(t&&t.getAttribute&&"richMark"===t.getAttribute("data-set-richType")){if(this.IME_RECORD.INDEX<=2&&this.IME_RECORD.TAG){const t=this.IME_RECORD.TAG.previousElementSibling;this.IME_RECORD.GRID.removeChild(this.IME_RECORD.TAG),this.markMerge(t,this.IME_RECORD.MARK)}this.upDataNodeOrIndex()}else this.textInnerHtmlInit(!0)}handleIMEWrap(){this.upDataNodeOrIndex()}}const T={device:"auto",needDialog:!0,needDebounce:!0,asyncMatch:!1,userList:[],reformList:[],placeholder:"",maxLength:void 0,copyType:["text"],uploadImage:void 0,needCallEvery:!0,needCallSpace:!1,userProps:{},customTrigger:[],dialogLabels:{pcPointDialog:{},pcPCheckDialog:{},h5Dialog:{}},wrapKeyFun:t=>t.ctrlKey&&["Enter"].includes(t.key),sendKeyFun:t=>!t.ctrlKey&&["Enter"].includes(t.key)},D={id:"id",name:"name",avatar:"avatar",pinyin:"pinyin"},M={title:"群成员",callEveryLabel:"所有人",checkLabel:"多选",emptyLabel:"暂无数据"},L={title:"选择要@的人",searchPlaceholder:"搜素人员名称",searchEmptyLabel:"没有匹配到任何结果",userTagTitle:"研讨成员列表",checkAllLabel:"全选",checkEmptyLabel:"请选择需要@的成员",confirmLabel:"确定",cancelLabel:"取消"},N={title:"选择提醒的人",callEveryLabel:"所有人",searchPlaceholder:"搜素人员名称",searchEmptyLabel:"没有匹配到任何结果",confirmLabel:"确定",cancelLabel:"收起"},O={needUserId:!1,needTagId:!1,needSelectId:!1,wrapClassName:void 0,rowClassName:void 0,imgToText:!1,identifyLink:!1},P=["Backspace","Shift","Tab","CapsLock","Control","Meta","Alt","ContextMenu","Enter","NumpadEnter","Escape","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Home","End","PageUp","PageDown","Insert","Delete","NumLock"],U={"!":"!",$:"¥","(":"(",")":")","[":"【","]":"】","-":"——",";":";",":":":","\\":"、","'":"’",'"':"“","`":"·",",":",","<":"《",".":"。",">":"》","?":"?"};class R{constructor(t){n(this,"target"),n(this,"outerApply",!1),n(this,"isComposition",!1),n(this,"matchKey",0),n(this,"startOpenIndex",0),n(this,"textLength",0),n(this,"isIMEModel",!1),n(this,"undoHistory",[]),n(this,"redoHistory",[]),n(this,"doOverHistory",!0),n(this,"notMergeKey",P),n(this,"tagProps",U),n(this,"chatEventModule",{enterSend:[],operate:[],defaultAction:[],atMatch:[],atCheck:[],tagCheck:[],selectCheck:[]}),n(this,"debounceEvents",{recordHistory:()=>{},dialogMoveToRange:t=>{},selectDialogToAim:()=>{},matchPointDialog:()=>{},movePointActiveUserElm:t=>{},moveCustomActiveTagElm:t=>{}}),this.target=t,this.registerEvent(),this.otherEvent()}registerEvent(){const{chatElement:t,options:e,deviceInfo:i,chatInput:s}=this.target;t.richText.addEventListener("keyup",n=>{if(!e.needDialog)return;if(n.stopPropagation(),i.isPc)return void(50===n.keyCode||"Digit2"===n.code||"@"===n.key?t.ruleShowPointDialog():-1!==Object.keys(t.pcElms.customTagDialogElms).indexOf(n.key)&&t.showCustomTagDialog(n.key));const a="Unidentified"===n.key?"android":"ios";let o=!1;switch(a){case"android":o=229===n.keyCode;break;case"ios":o=50===n.keyCode||"Digit2"===n.code||"@"===n.key;break}o&&(e.reformList.length>0||e.asyncMatch)&&s.showAt()&&(this.target.showH5Dialog(),t.isExternalCallPopup=!1)}),t.richText.addEventListener("keydown",async n=>{if(!i.isPc&&"Unidentified"===n.key&&229===n.keyCode)return this.isIMEModel=!0,void s.setIMERecord();if(!this.isIMEModel){if(r(t.pcElms.pointDialogElm))return void(["ArrowUp","ArrowDown","Enter","NumpadEnter"].includes(n.code)?n.preventDefault():["ArrowLeft","ArrowRight"].includes(n.code)&&t.exitPointDialog());if(t.pcElms.customTagDialogTagKey&&r(t.pcElms.customTagDialogElms[t.pcElms.customTagDialogTagKey]))return void(["ArrowUp","ArrowDown","Enter","NumpadEnter"].includes(n.code)?n.preventDefault():["ArrowLeft","ArrowRight"].includes(n.code)&&t.exitCustomTagDialog());"Backspace"===n.code||"Backspace"===n.key?(s.selectRegionMerge()||s.gridElmMerge()||s.delMarkRule())&&(n.preventDefault(),await this.richTextInput()):e.wrapKeyFun(n)||!i.isPc&&"Enter"===n.key?(n.preventDefault(),s.setWrap(),await this.richTextInput()):e.sendKeyFun(n)?(n.preventDefault(),await l(100),this.triggerChatEvent("enterSend")):["ArrowLeft","ArrowRight"].includes(n.code)?(n.preventDefault(),s.switchRange(n.code)):n.ctrlKey&&"KeyA"===n.code?this.target.isEmpty()&&n.preventDefault():n.ctrlKey&&"KeyZ"===n.code?(n.preventDefault(),this.ruleChatEvent(()=>{this.target.undo()},"defaultAction","UNDO")):n.ctrlKey&&"KeyY"===n.code&&(n.preventDefault(),this.ruleChatEvent(()=>{this.target.redo()},"defaultAction","REDO")),-1===this.notMergeKey.indexOf(n.key)&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&s.selectRegionMerge()}}),t.richText.addEventListener("input",async n=>{if(this.isIMEModel)return await l(50),"deleteContentBackward"===n.inputType?s.handleIMEDelete():"insertParagraph"===n.inputType?s.handleIMEWrap():(s.upDataNodeOrIndex(),this.isComposition||s.updateGrid()),void 0!==e.maxLength&&this.ruleMaxLength(),t.showPlaceholder(),this.triggerChatEvent("operate"),void(this.isIMEModel=!1);await this.richTextInput(),i.isPc&&!this.isComposition&&this.debounceEvents.matchPointDialog()}),t.richText.addEventListener("copy",t=>{t.preventDefault(),this.ruleChatEvent(()=>{this.copyRange(t)},"defaultAction","COPY")}),t.richText.addEventListener("cut",t=>{t.preventDefault(),this.ruleChatEvent(()=>{this.copyRange(t),this.removeRange()},"defaultAction","CUT")}),t.richText.addEventListener("paste",t=>{t.preventDefault();const{options:e,chatInput:i}=this.target;this.ruleChatEvent(()=>{const s=t.clipboardData.getData("text/plain");if("string"==typeof s&&""!==s){if(-1===e.copyType.indexOf("text"))return;let n=document.createElement("div");n.innerHTML=t.clipboardData.getData("application/my-custom-format")||"",i.selectRegionMerge(),n.children[0]&&"richBox"===n.children[0].getAttribute("data-set-richType")?this.insertInsideHtml(n.innerHTML):(n.innerHTML=s,this.target.insertText(n.innerText)),n=null}else{if(-1===e.copyType.indexOf("image"))return;const i=(t.clipboardData||t.originalEvent.clipboardData).items||[];Array.from(i,async t=>{if(-1===t.type.indexOf("image"))return;const i=t.getAsFile();if(e.uploadImage){const t=await e.uploadImage(i);this.target.insertHtml(`<img class="chat-img" src="${t}" alt="" />`)}else{const t=new FileReader;t.onload=t=>{this.target.insertHtml(`<img class="chat-img" src="${t.target.result}" alt="" />`)},t.readAsDataURL(i)}})}},"defaultAction","PASTE")}),t.richText.addEventListener("blur",()=>{s.upDataNodeOrIndex(),s.setIMERecord()}),t.richText.addEventListener("focus",()=>{s.upDataNodeOrIndex(),s.setIMERecord()}),t.richText.addEventListener("click",t=>{s.upDataNodeOrIndex(),s.setIMERecord();const e=b(t.target,"chatTag",3);if(e){const t=e.children[0];if(t.classList.contains("at-select")){const e=t.getAttribute("data-select-key");this.target.showPCSelectDialog(e,t)}}}),t.richText.addEventListener("dragstart",t=>{t.stopPropagation(),t.preventDefault()}),t.richText.addEventListener("dragover",t=>{t.stopPropagation(),t.preventDefault()}),t.richText.addEventListener("drop",t=>{t.stopPropagation(),t.preventDefault()}),t.richText.addEventListener("compositionstart",()=>{this.isComposition=!0}),t.richText.addEventListener("compositionend",()=>{this.isComposition=!1}),window.addEventListener("click",this.winClick.bind(this)),window.addEventListener("keydown",this.winKeydown.bind(this))}otherEvent(){const{options:t,chatInput:e,chatElement:i}=this.target,{needDebounce:s}=t,n=()=>{const{gridIndex:t,markIndex:s}=e.getRichTextNodeIndex(e.vnode);if(null===t||null==s)return;const n={html:i.richText.innerHTML,gridIndex:t,markIndex:s,cursorIndex:e.cursorIndex};this.undoHistory.push(n),this.undoHistory.length>50&&this.undoHistory.shift()};this.debounceEvents.recordHistory=s?u(n,200):n;const a=t=>{let s="0",n="100%";const a=e.getRangeRect();if(!a)return;const o=i.pcElms.containerDialogElm.getBoundingClientRect();let r=a.x-o.x,c=o.y-a.y;const{clientWidth:l,clientHeight:d}=t;a.x>window.innerWidth-l-30&&(r=a.x-l-o.x-16,s="100%"),a.y<d&&(c-=d,n="0"),t.style.transform="translate(0, 0)",t.style.transformOrigin=`${s} ${n}`,t.style.left=r+6+"px",t.style.bottom=`${c}px`,t.style.opacity="1"};this.debounceEvents.dialogMoveToRange=s?u(a,120,!0):a;const r=()=>{if(!t.needDialog)return;const s=e.vnode.textContent||"",n=e.cursorIndex,a=s.slice(0,n);let r=-1,c=-1,l="userTag";-1!==a.lastIndexOf("@")&&(r=a.lastIndexOf("@")),i.pcElms.customTagDialogTagKey&&-1!==a.lastIndexOf(i.pcElms.customTagDialogTagKey)&&(c=a.lastIndexOf(i.pcElms.customTagDialogTagKey));const d=this.tagProps[i.pcElms.customTagDialogTagKey];if(d&&-1!==a.lastIndexOf(d)&&(c=a.lastIndexOf(d)),c>r&&(l="customTag"),"userTag"===l&&t.asyncMatch){if(r<0)return void i.exitPointDialog();this.matchKey++;const t=this.matchKey;this.startOpenIndex=r+1;const e=a.slice(this.startOpenIndex)||"";if(/\s/gi.test(e))return void i.exitPointDialog();this.target.updateUserList([]),o(i.pcElms.pointDialogLoadingElm,!0,"flex"),o(i.pcElms.pointDialogEmptyElm),i.showPointDialog();const s=this.triggerChatEvent("atMatch",e).find(t=>t&&t instanceof Promise);return void(s&&s.then(e=>{if(t===this.matchKey){if(o(i.pcElms.pointDialogLoadingElm),!e||e.length<=0)return void o(i.pcElms.pointDialogEmptyElm,!0,"flex");this.target.updateUserList(e),i.pcElms.pointDialogUsersElm&&i.pcElms.pointDialogUsersElm.length>0&&i.updatePointActiveUserElm(i.pcElms.pointDialogUsersElm[0].elm)}}))}if("userTag"===l&&t.reformList.length<=0||"customTag"===l&&i.customTags[i.pcElms.customTagDialogTagKey].length<=0)return;const u=()=>{"userTag"===l?i.exitPointDialog():i.exitCustomTagDialog()},h=()=>{"userTag"===l?i.showPointDialog():i.showCustomTagDialog(i.pcElms.customTagDialogTagKey)};if(r<0&&c<0)return i.exitPointDialog(),void i.exitCustomTagDialog();this.startOpenIndex="userTag"===l?r+1:c+1;const m=new RegExp(`^([${e.ZERO_WIDTH_KEY}${e.VOID_KEY}])+$`);if(!a||m.test(a)||n<this.startOpenIndex)return void u();const g=a.slice(this.startOpenIndex)||"";if(/\s/gi.test(g))u();else if(g)if("userTag"===l){const t=this.target.searchUserList(g);t.length>0?i.showPointDialog(t):u()}else{const t=i.customTags[i.pcElms.customTagDialogTagKey].filter(t=>p(t.name,t.pinyin||"",g));t.length>0?i.showCustomTagDialog(i.pcElms.customTagDialogTagKey,t):u()}else h()};this.debounceEvents.matchPointDialog=s?u(r,200):r;const l=t=>{if(!i.pcElms.pointDialogActiveElm)return;let e=0;const s=i.pcElms.pointDialogActiveElm.getAttribute("data-set-id");i.pcElms.pointDialogUsersElm.some(t=>{const i=t.elm.getAttribute("data-set-id");return e=t.index,s===i});const n=i.pcElms.pointDialogUsersElm.filter(t=>!t.elm.classList.contains("user-no-match")),a=n.map(t=>t.index);let o;"down"===t?o=e===n[n.length-1].index?n[0]:n[a.indexOf(e)+1]:"up"===t&&(o=e===n[0].index?n[n.length-1]:n[a.indexOf(e)-1]),o&&i.updatePointActiveUserElm(o.elm,!0)};this.debounceEvents.movePointActiveUserElm=h(l,80);const d=t=>{if(!i.pcElms.customTagDialogActiveElm)return;const e=i.customTags[i.pcElms.customTagDialogTagKey].map(t=>t.id),s=i.pcElms.customTagDialogActiveElm.getAttribute("data-set-id"),n=e.indexOf(s),a=Array.from(i.pcElms.customTagDialogElms[i.pcElms.customTagDialogTagKey].children[1].children,(t,e)=>({elm:t,index:e})).filter(t=>!t.elm.classList.contains("tag-no-match")),o=a.map(t=>t.index);let r;"down"===t?r=n===a[a.length-1].index?a[0]:a[o.indexOf(n)+1]:"up"===t&&(r=n===a[0].index?a[a.length-1]:a[o.indexOf(n)-1]),r&&i.updateActiveCustomTagElm(r.elm,!0)};this.debounceEvents.moveCustomActiveTagElm=h(d,80);const m=()=>{const t=i.pcElms.selectDialogAim.getClientRects()[0],e=i.pcElms.selectDialogElms[i.pcElms.selectDialogKey];o(e,!0);const s=e.querySelector(".chat-select-arrow");let n=e.clientHeight+16;if(n>t.y?(n=-(t.height+16),s.style.top="-16px",s.style.bottom="auto",s.style.transform="rotate(0deg)"):(s.style.transform="rotate(180deg)",s.style.bottom="-16px",s.style.top="auto"),window.innerWidth-t.x<e.clientWidth){const i=e.clientWidth-(window.innerWidth-t.x)-10;e.style.left="auto",e.style.right="10px",s.style.left="auto",s.style.right=i-s.clientWidth/2+t.width/2+"px"}else e.style.left=t.x+"px",e.style.right="auto",s.style.left=t.width/2-s.clientWidth/2+"px",s.style.right="auto";e.style.top=t.y+"px",e.style.transform=`translateY(${-n}px)`;const a=e.querySelector(".chat-select-dialog-main"),r=e.querySelectorAll(".chat-select-dialog-item");let l=0,d=!1,u=0;if(i.pcElms.selectDialogAim.classList.contains("at-select")){const t=i.pcElms.selectDialogAim.getAttribute("data-select-id");c(i.pcElms.selectDialogAim,"aim",!0),Array.from(r,e=>{const i=e.lastChild.lastChild,s=t===e.getAttribute("data-set-id");s&&(u=e.clientHeight,d=!0),!s&&!d&&(l+=e.clientHeight),o(i,s,"inline-block")});const e=l-a.clientHeight/2+u/2;a.scrollTop=e>0?e:0}else Array.from(r,t=>{const e=t.lastChild.lastChild;o(e,!1,"inline-block")})};this.debounceEvents.selectDialogToAim=s?u(m,120):m;const g={html:i.richText.innerHTML,gridIndex:0,markIndex:0,cursorIndex:e.cursorIndex};this.undoHistory=[g]}winClick(){if(!this.target||this.outerApply)return;const{chatElement:t}=this.target;r(t.pcElms.pointDialogElm)&&t.exitPointDialog(),t.pcElms.checkDialogSearchResultElm&&o(t.pcElms.checkDialogSearchResultElm),t.pcElms.customTagDialogTagKey&&r(t.pcElms.customTagDialogElms[t.pcElms.customTagDialogTagKey])&&t.exitCustomTagDialog(),t.pcElms.selectDialogKey&&r(t.pcElms.selectDialogElms[t.pcElms.selectDialogKey])&&t.exitSelectDialog()}async winKeydown(t){if(!this.target)return;const{chatElement:e,options:i}=this.target;if(t.ctrlKey&&"KeyZ"===t.code&&t.preventDefault(),!this.isComposition)if(r(e.pcElms.pointDialogElm)){if("ArrowDown"===t.code)return t.preventDefault(),void this.debounceEvents.movePointActiveUserElm("down");if("ArrowUp"===t.code)return t.preventDefault(),void this.debounceEvents.movePointActiveUserElm("up");if(("Enter"===t.code||"NumpadEnter"===t.code)&&e.pcElms.pointDialogActiveElm){t.preventDefault();const s=e.pcElms.pointDialogActiveElm.getAttribute("data-set-id");if(await l(100),e.isPointSearchMode||i.asyncMatch)await this.target.matchSetTag(i.reformList.find(t=>t.id===s));else{const t=i.userList.find(t=>String(t[i.userProps.id])===s);await this.target.onceSetTag(t)}e.exitPointDialog()}}else if(e.pcElms.customTagDialogTagKey&&r(e.pcElms.customTagDialogElms[e.pcElms.customTagDialogTagKey])){if("ArrowDown"===t.code)return t.preventDefault(),void this.debounceEvents.moveCustomActiveTagElm("down");if("ArrowUp"===t.code)return t.preventDefault(),void this.debounceEvents.moveCustomActiveTagElm("up");if(("Enter"===t.code||"NumpadEnter"===t.code)&&e.pcElms.customTagDialogActiveElm){t.preventDefault();const i=e.pcElms.customTagDialogActiveElm.getAttribute("data-set-id");await l(100);const s=e.customTags[e.pcElms.customTagDialogTagKey].find(t=>t.id===i);e.isPointSearchMode?await this.target.matchSetCustomTag(s):await this.target.onceSetCustomTag(s),e.exitCustomTagDialog()}}}async richTextInput(t=!0){const{chatInput:e,deviceInfo:i,chatElement:s,options:n}=this.target;e.upDataNodeOrIndex(),i.isPc&&e.selectRegionMerge(),await l(50),this.isComposition||e.updateGrid();const a=(s.richText.children[0]||{childNodes:[]}).childNodes[0];if(!a||!a.getAttribute||"richMark"!==a.getAttribute("data-set-richType"))return e.textInnerHtmlInit(!0),s.showPlaceholder(),void this.triggerChatEvent("operate");void 0!==n.maxLength&&this.ruleMaxLength(),s.showPlaceholder(),this.triggerChatEvent("operate"),t&&this.doOverHistory&&!this.isComposition&&this.debounceEvents.recordHistory(),e.viewIntoPoint()}ruleMaxLength(){const{options:t,chatElement:e}=this.target;if(this.target.isEmpty()||void 0===t.maxLength)return void(this.textLength=0);let i=0,s=0;const n=[];Array.prototype.some.call(e.richText.children,(e,a)=>{const{nodeInfos:o,nodeTextLength:r}=this.getGirdNodeTextInfo(e);if(i+=r,n.push(o),s=a,i>=t.maxLength)return!0});const a=[];Array.from(e.richText.children,(t,e)=>{e>s&&a.push(t)}),a.forEach(t=>e.richText.removeChild(t)),this.deepDelGirdText(n,i)}getGirdNodeTextInfo(t){const{chatInput:e}=this.target,i=[];let s=0;if(1===t.children.length&&t!==t.parentElement.children[0]){const n=t.children[0],a=(n.textContent||"").replace(new RegExp(e.VOID_KEY,"g"),"");s+=a.length||1,i[0]={node:n,textLength:a.length||1,type:"richMark"}}else Array.from(t.children,(t,n)=>{if("richMark"===t.getAttribute("data-set-richType")){const a=(t.textContent||"").replace(new RegExp(e.VOID_KEY,"g"),"");s+=a.length,i[n]={node:t,textLength:a.length,type:"richMark"}}else{const a=(t.textContent||"").replace(new RegExp(e.VOID_KEY,"g"),"");s+=a.length||1,i[n]={node:t,textLength:a.length||1,type:"chatTag"}}});return{nodeInfos:i,nodeTextLength:s}}deepDelGirdText(t,e){if(e>this.target.options.maxLength){const i=t[t.length-1];t.pop(),this.deepDelNode(i,t,e)}else this.textLength=e}deepDelNode(t,e,i){const s=t[0].node.parentElement;if(i>this.target.options.maxLength){let n=i-this.target.options.maxLength,a=t[t.length-1];if("richMark"===a.type)if(0===a.textLength||n>=a.textLength)s.removeChild(a.node),t.pop(),n-=a.textLength,a=t[t.length-1],s.removeChild(a.node),t.pop(),n-=a.textLength;else{const t=a.node.childNodes[0];t.textContent=t.textContent.slice(0,a.textLength-n),0===t.textContent&&(t.setAttribute("data-set-empty","true"),t.innerHTML=`${this.target.chatInput.VOID_KEY}<br>`),n=0}else s.removeChild(a.node),t.pop(),n-=a.textLength;n>0?t.length>0?this.deepDelNode(t,e,n+this.target.options.maxLength):(this.target.chatElement.richText.appendChild(s),this.deepDelGirdText(e,n+this.target.options.maxLength)):(this.textLength=this.target.options.maxLength+n,this.target.enable())}}copyRange(t){const e=window.getSelection();if(e.isCollapsed||e.rangeCount<=0)return t.clipboardData.setData("application/my-custom-format",""),void t.clipboardData.setData("text/plain","");const{chatElement:i,chatInput:s}=this.target,n=e.toString()||"";let a=document.createElement("div");a.innerHTML=n;const o=a.innerText.replace(/\n\n/g,"\n");a=null,t.clipboardData.setData("text/plain",o);const r=e.anchorNode,c=e.focusNode;if(r===c&&r.nodeType===Node.TEXT_NODE){const i=r.textContent.slice(e.anchorOffset,e.focusOffset);return void t.clipboardData.setData("application/my-custom-format",i)}if(r===i.richText&&c===i.richText)return void t.clipboardData.setData("application/my-custom-format",i.richText.innerHTML);const l=s.getWrapNode(r,!0),d=s.getWrapNode(c,!0),u=s.getMarkNode(r,!0),h=s.getMarkNode(c,!0),p="richMark"===u.getAttribute("data-set-richType"),m="richMark"===h.getAttribute("data-set-richType"),g=Array.prototype.indexOf.call(l.childNodes,u),f=Array.prototype.indexOf.call(d.childNodes,h);if(l===d&&l.parentNode===i.richText){const i=g>f,n=Array.prototype.filter.call(l.childNodes,(t,e)=>i?e<g&&e>f:e>g&&e<f).map(t=>t.cloneNode(!0)),a=p?i?r.textContent.slice(0,e.anchorOffset):r.textContent.slice(e.anchorOffset):"",o=m?i?c.textContent.slice(e.focusOffset):c.textContent.slice(0,e.focusOffset):"",d=s.getGridElm(!0),u=s.getGridElm(!0);a&&(d.childNodes[0].innerHTML=a,d.childNodes[0].setAttribute("data-set-empty","false")),o&&(u.childNodes[0].innerHTML=o,u.childNodes[0].setAttribute("data-set-empty","false")),i?("richMark"!==n[0].getAttribute("data-set-richType")&&n.unshift(u),"richMark"!==n[n.length-1].getAttribute("data-set-richType")&&n.push(d)):("richMark"!==n[0].getAttribute("data-set-richType")&&n.unshift(d),"richMark"!==n[n.length-1].getAttribute("data-set-richType")&&n.push(u));let h=document.createElement("div");const v=s.setWrapNodeByMark(n);return h.appendChild(v),t.clipboardData.setData("application/my-custom-format",h.innerHTML),void(h=null)}if(l.parentNode===i.richText&&d.parentNode===i.richText){const n=Array.prototype.indexOf.call(i.richText.childNodes,l),a=Array.prototype.indexOf.call(i.richText.childNodes,d),o=n>a,u=Array.prototype.filter.call(i.richText.childNodes,(t,e)=>o?e<n&&e>a:e>n&&e<a).map(t=>t.cloneNode(!0)),h=p?o?r.textContent.slice(0,e.anchorOffset):r.textContent.slice(e.anchorOffset):"",v=m?o?c.textContent.slice(e.focusOffset):c.textContent.slice(0,e.focusOffset):"",b=s.getGridElm(!0),y=s.getGridElm(!0);h&&(b.childNodes[0].innerHTML=h,b.childNodes[0].setAttribute("data-set-empty","false")),v&&(y.childNodes[0].innerHTML=v,y.childNodes[0].setAttribute("data-set-empty","false"));const C=Array.prototype.filter.call(l.childNodes,(t,e)=>o?e<g:e>g).map(t=>t.cloneNode(!0)),x=Array.prototype.filter.call(d.childNodes,(t,e)=>o?e>f:e<f).map(t=>t.cloneNode(!0));if(o){C.push(b),x.unshift(y);const t=s.setWrapNodeByMark(C),e=s.setWrapNodeByMark(x);u.push(t),u.unshift(e)}else{C.unshift(b),x.push(y);const t=s.setWrapNodeByMark(C),e=s.setWrapNodeByMark(x);u.unshift(t),u.push(e)}let E=document.createElement("div");return Array.from(u,t=>{E.appendChild(t)}),t.clipboardData.setData("application/my-custom-format",E.innerHTML),void(E=null)}}async removeRange(){const{chatInput:t,chatElement:e}=this.target;window.getSelection().getRangeAt(0).deleteContents(),await l(50),t.updateGrid(),e.showPlaceholder()}async setChatHistory(t){const{chatElement:e,chatInput:i}=this.target;this.doOverHistory=!1;const{html:s,gridIndex:n,markIndex:a,cursorIndex:o}=t;e.richText.innerHTML=s;const r=e.richText.childNodes[n].childNodes[a].childNodes[0].childNodes[0];i.restCursorPos(r,o),await this.richTextInput(),this.doOverHistory=!0}async insertInsideHtml(t){const{chatInput:e}=this.target;let i=document.createElement("div");i.innerHTML=t,i.children.length&&(1===i.children.length?e.insetRangeGrid(i.children[0]):e.insetRangeGrids(i.children),i=null,await this.richTextInput())}triggerChatEvent(t,...e){const i=[];return this.chatEventModule[t].forEach(t=>{t&&i.push(t(...e))}),i}ruleChatEvent(t,e,...i){this.triggerChatEvent(e,...i).some(t=>t&&"PREVENT"===t)||(t&&t.bind(this)(),t=null)}}const j=function(t,e,i){return t.forEach(t=>{if(i in t){const s=e.indexOf(String(t[i]));-1!==s&&(e[s]=t)}}),e.filter(t=>t[i])};class B{constructor(t){switch(n(this,"options"),n(this,"deviceInfo",a()),n(this,"chatElement"),n(this,"chatInput"),n(this,"chatEvent"),this.options=Object.assign({},T,t),this.options.device=this.options.device.toLocaleLowerCase(),this.options.device){case"pc":this.deviceInfo.isPc=!0;break;case"h5":this.deviceInfo.isPc=!1;break}this.options.userProps=Object.assign({},D,t.userProps||{}),this.options.dialogLabels.pcPointDialog=Object.assign({},M,y(t.dialogLabels,"pcPointDialog",{})),this.options.dialogLabels.pcPCheckDialog=Object.assign({},L,y(t.dialogLabels,"pcPCheckDialog",{})),this.options.dialogLabels.h5Dialog=Object.assign({},N,y(t.dialogLabels,"h5Dialog",{})),this.chatElement=new _(this),this.chatInput=new S(this),this.chatEvent=new R(this),this.updateConfig(t);const e=this;Object.defineProperty(this,"richText",{get(){return e.chatElement.richText}}),Object.defineProperty(this,"textLength",{get(){return e.chatEvent.textLength}}),this.addEventListener("operate",()=>{this.chatInput.setIMERecord()}),requestAnimationFrame(()=>{this.chatElement.richText.focus()})}updateConfig(t){void 0!==t.copyType&&(this.options.copyType=t.copyType),t.userProps&&(this.options.userProps=Object.assign({},D,t.userProps)),void 0!==t.uploadImage&&(this.options.uploadImage=t.uploadImage),void 0!==t.placeholder&&(this.chatElement.placeholderElm.textContent=t.placeholder),void 0!==t.maxLength&&(this.options.maxLength=t.maxLength,this.chatEvent.ruleMaxLength()),(this.options.asyncMatch||void 0!==t.needCallEvery||t.userList)&&(this.options.needCallEvery=!this.options.asyncMatch&&d(t.needCallEvery),this.updateUserList(this.options.asyncMatch?[]:t.userList)),void 0!==t.needCallSpace&&this.chatInput.setCallSpace(d(t.needCallSpace)),void 0!==t.wrapKeyFun&&(this.options.wrapKeyFun=t.wrapKeyFun),void 0!==t.sendKeyFun&&(this.options.sendKeyFun=t.sendKeyFun),this.options.needDialog&&t.customTrigger&&this.deviceInfo.isPc&&(this.options.customTrigger=t.customTrigger,this.chatElement.bindCustomTrigger()),this.options.needDialog&&t.selectList&&this.deviceInfo.isPc&&(this.options.selectList=t.selectList,this.chatElement.bindSelectList())}updateUserList(t=void 0){const{options:e,chatElement:i}=this;if(t){e.userList=JSON.parse(JSON.stringify(t));const i={[e.userProps.id]:"isALL",[e.userProps.name]:""};e.userList.unshift(i),e.reformList=t.map((t,i)=>{const s=t[e.userProps.id];if(!s&&0!==s)throw new Error(`配置项userList:下标第${i}${e.userProps.id}值异常!`);return{id:String(s),name:String(t[e.userProps.name]||""),avatar:String(t[e.userProps.avatar]||""),pinyin:String(t[e.userProps.pinyin]||"")}})}const s=e.userList[0];s&&"isALL"===s[e.userProps.id]&&(s[e.userProps.name]=this.deviceInfo.isPc?e.dialogLabels.pcPointDialog.callEveryLabel:e.dialogLabels.h5Dialog.callEveryLabel),e.needDialog&&(this.deviceInfo.isPc?i.updatePCUser():i.updateH5User())}searchUserList(t){return this.options.reformList.filter(e=>p(e.name,e.pinyin||"",t))}getReduceNode(t){const e=Object.assign({},O,t||{}),i=/(https?|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g,s=this.chatElement.richText.cloneNode(!0).querySelectorAll(".chat-grid-wrap")||[],n=document.createElement("div");return e.wrapClassName&&(n.className=e.wrapClassName),Array.from(s,(t,s)=>{const a=t.querySelectorAll(".chat-stat")||[],o=document.createElement("p");e.rowClassName&&(o.className=e.rowClassName),Array.from(a,t=>{this.chatInput.getNodeEmpty(t)||(t.removeAttribute("data-set-richType"),t.removeAttribute("contenteditable"),t.removeAttribute("data-set-empty"),e.needUserId||t.removeAttribute("data-user-id"),e.needTagId||(t.removeAttribute("data-set-prefix"),t.removeAttribute("data-tag-id")),e.needSelectId||(t.removeAttribute("data-select-id"),t.removeAttribute("data-select-key")),e.imgToText&&t.firstChild&&"IMG"===t.firstChild.tagName&&(t.classList.add("img-to-text"),t.innerHTML=`[${t.firstChild.getAttribute("data-img-text")||"元素data-img-text未定义"}]`),e.identifyLink&&-1!==t.className.indexOf("chat-grid-input")&&(t.innerHTML=t.innerHTML.replace(i,t=>`<a class="chat-grid-link" href="${t}" target="_blank">${t}</a>`)),t.classList.contains("at-select")&&(t.classList.remove("aim"),t.removeChild(t.lastChild)),o.appendChild(t))}),o.innerHTML||(o.innerHTML="<br>"),n.appendChild(o)}),n}getText(t){let e="";const i=this.getReduceNode(t);return Array.from(i.children,(t,i)=>{e=e+(i>0?"\n":"")+t.textContent}),e}getHtml(t){return this.getReduceNode(t).innerHTML}async reverseAnalysis(t,e){if(!t)return;const i=document.createElement("div");i.innerHTML=t;const s=i.children;Array.from(s,t=>{t.className="chat-grid-wrap",t.setAttribute("data-set-richType","richBox");const e=t.children,i={},s=[];Array.from(e,(n,a)=>{if(-1!==n.className.indexOf("chat-grid-input")){const t=n.textContent||"";return n.className="",n.setAttribute("data-set-richType","richMark"),void(n.innerHTML=`<span class="chat-grid-input chat-stat" data-set-richType="richInput" data-set-empty="false">${t}</span>`)}if("BR"===n.tagName){const e=this.chatInput.getGridElm(!0);return t.removeChild(n),void t.appendChild(e)}const o=n.cloneNode(!0);o.setAttribute("contenteditable","false");const r=document.createElement("span");r.className="chat-tag",r.setAttribute("contenteditable","false"),r.setAttribute("data-set-richType","chatTag"),r.appendChild(o),i[a]=r,a!==e.length-1?-1===e[a+1].className.indexOf("chat-grid-input")&&s.push(a):s.push(a),0===a&&s.push(-1)});for(const o in i){const s=Number(o),n=i[o].lastChild;n.classList.contains("at-select")&&(n.innerHTML=`${n.textContent}${I}`),s===e.length-1?(t.removeChild(e[s]),t.appendChild(i[o])):(t.insertBefore(i[o],e[s+1]),t.removeChild(e[s]))}const n=[],a=t.children;s.forEach(t=>{t===a.length-1?n.push("isEnd"):n.push(a[t+1])}),n.forEach(e=>{const i=this.chatInput.getGridElm(!0);if("isEnd"===e)t.appendChild(i);else{const s=i.children[0];s.childNodes.length>1&&s.removeChild(s.childNodes[1]),t.insertBefore(i,e)}})}),e?(this.enable(),await this.chatEvent.insertInsideHtml(i.innerHTML)):(this.chatElement.richText.innerHTML=i.innerHTML,this.enable(),await this.chatEvent.richTextInput())}async insertHtml(t){if(!t)return;const e=document.createElement("span");e.innerHTML=t,e.className="chat-set-html";const i=this.chatInput.createNewDom(e);return this.chatInput.replaceRegContent(i,!1),await this.chatEvent.richTextInput(),i}async insertText(t){if(!t)return;const e=new RegExp(`[${this.chatInput.ZERO_WIDTH_KEY}|${this.chatInput.VOID_KEY}]`,"ig"),i=t.replace(e,"");if(!i)return;const s=i.split("\n");let n="";s.forEach(t=>{const e=""!==t;n+=`<p class="chat-grid-wrap" data-set-richtype="richBox"><span data-set-richtype="richMark"><span class="chat-grid-input chat-stat" data-set-richtype="richInput" data-set-empty="${e?"false":"true"}">${e?t:this.chatInput.VOID_KEY+"<br>"}</span></span></p>`}),await this.chatEvent.insertInsideHtml(n)}getCallUserList(){const t=this.chatElement.richText.querySelectorAll(".at-user");if(t&&t.length>0){const e=Array.from(t,t=>t.dataset.userId);return j(this.options.userList,e,this.options.userProps.id)}return[]}getCallUserTagList(){const t=this.chatElement.richText.querySelectorAll(".at-user");if(t&&t.length>0){const e=[];return Array.from(t,t=>{e.some(e=>e[this.options.userProps.id]===t.dataset.userId)||e.push({[this.options.userProps.id]:t.dataset.userId,[this.options.userProps.name]:t.textContent.slice(1)})}),e}return[]}getCustomTagList(){const t=Object.keys(this.chatElement.customTags),e={},i=this.chatElement.richText.querySelectorAll(".at-tag");return t.forEach(t=>{let s=Array.prototype.filter.call(i,e=>e.getAttribute("data-set-prefix")===String(t)).map(t=>t.getAttribute("data-tag-id"));s=s.filter((t,e)=>s.indexOf(t)===e),e[t]=j(this.chatElement.customTags[t],s,"id")}),e}getSelectTagList(){const t=Object.keys(this.chatElement.selectTags),e={},i=this.chatElement.richText.querySelectorAll(".at-select");return t.forEach(t=>{let s=Array.prototype.filter.call(i,e=>e.getAttribute("data-select-key")===String(t)).map(t=>t.getAttribute("data-select-id"));s=s.filter((t,e)=>s.indexOf(t)===e),e[t]=j(this.chatElement.selectTags[t],s,"id")}),e}async clear(t){this.chatInput.textInnerHtmlInit(!0,t);const e={html:this.chatElement.richText.innerHTML,gridIndex:0,markIndex:0,cursorIndex:this.chatInput.cursorIndex};this.chatEvent.undoHistory=[e],this.chatEvent.redoHistory=[],await this.chatEvent.richTextInput(!1)}isEmpty(t=!1){if((this.chatElement.richText.querySelectorAll(".chat-tag")||[]).length>0)return!1;const e=new RegExp(`^(${this.chatInput.ZERO_WIDTH_KEY}|<br>|${this.chatInput.VOID_KEY})+$`),i=this.chatElement.richText.querySelectorAll(".chat-grid-input")||[];return t?Array.prototype.every.call(i,t=>!t.innerHTML||!t.textContent||!t.textContent.trim()||e.test(t.innerHTML)):Array.prototype.every.call(i,t=>!t.innerHTML||!t.textContent||e.test(t.innerHTML))}dispose(){if(this.options.elm.removeChild(this.chatElement.richText),this.options.elm.removeChild(this.chatElement.placeholderElm),this.options.needDialog)if(this.deviceInfo.isPc){const t=this.chatElement.pcElms.containerDialogElm.parentElement;t&&t.removeChild(this.chatElement.pcElms.containerDialogElm)}else document.body.removeChild(this.chatElement.h5Elms.dialogElm)}showPCPointDialog(){this.options.needDialog&&(this.insertText("@"),this.options.asyncMatch&&o(this.chatElement.pcElms.pointDialogEmptyElm,!0,"flex"),this.chatEvent.outerApply=!0,this.chatElement.showPointDialog(),l(50).then(()=>{this.chatEvent.outerApply=!1}))}showPCCheckDialog(){!this.options.needDialog||this.options.asyncMatch||(this.chatEvent.winClick(),this.chatElement.checkboxRows=[],o(this.chatElement.pcElms.checkDialogElm,!0),c(document.body,"disable-scroll",!0),this.chatElement.pcElms.checkDialogTagsElm.scrollTop=0,this.chatElement.pcElms.checkDialogUsersElm.scrollTop=0,this.chatElement.pcElms.checkDialogSearchInputElm.value="",this.chatElement.updateCheckDialogTags(),this.chatElement.isExternalCallPopup=!0)}showPCCustomTagDialog(t){!this.options.needDialog||this.options.asyncMatch||(this.insertText(t),this.chatEvent.outerApply=!0,this.chatElement.showCustomTagDialog(t),l(50).then(()=>{this.chatEvent.outerApply=!1}))}showPCSelectDialog(t,e){this.chatElement.exitCustomTagDialog(),this.chatElement.exitPointDialog(),this.chatEvent.outerApply=!0,e&&(this.chatElement.exitSelectDialog(),this.chatElement.pcElms.selectDialogAim=e),this.chatElement.pcElms.selectDialogKey=t,this.chatEvent.debounceEvents.selectDialogToAim(),l(50).then(()=>{this.chatEvent.outerApply=!1})}showH5Dialog(){this.chatElement.richText&&this.chatElement.richText.blur(),Array.from(this.chatElement.h5Elms.dialogMainElm.children,t=>{t.style.display="",c(t,"user-popup-check-item-check")}),c(this.chatElement.h5Elms.dialogCheckElm,"disabled",!0),o(this.chatElement.h5Elms.dialogElm,!0),c(document.body,"disable-scroll",!0),this.options.asyncMatch&&o(this.chatElement.h5Elms.dialogEmptyElm,!0,"flex"),this.chatElement.h5Elms.dialogMainElm.scrollTop=0,this.chatElement.isExternalCallPopup=!0}disabled(){this.chatElement.richText.setAttribute("contenteditable","false"),c(this.chatElement.richText,"chat-rich-text-disabled",!0)}enable(){this.chatElement.richText.setAttribute("contenteditable","true"),c(this.chatElement.richText,"chat-rich-text-disabled"),this.chatInput.setRangeLastText()}async setUserTag(t){this.chatEvent.triggerChatEvent("atCheck",[t]);const e=this.chatInput.createChatTagElm({id:t[this.options.userProps.id],name:t[this.options.userProps.name]},"@","at-user","user-id");this.chatInput.replaceRegContent(e,!1),await this.chatEvent.richTextInput()}async setCustomTag(t,e){this.chatEvent.triggerChatEvent("tagCheck",t,e),await this.chatInput.onceCustomCall(t,!1,e),await this.chatEvent.richTextInput()}async setSelectTag(t,e){if(this.chatEvent.triggerChatEvent("selectCheck",t,e||this.chatElement.pcElms.selectDialogKey),this.chatElement.pcElms.selectDialogAim&&this.chatElement.pcElms.selectDialogAim.classList.contains("at-select")){const e=this.chatElement.pcElms.selectDialogAim.getAttribute("data-select-id"),i=this.chatElement.pcElms.selectDialogAim.parentElement.nextElementSibling.childNodes[0].childNodes[0];if(this.chatInput.restCursorPos(i),e===t.id)return;this.chatElement.pcElms.selectDialogAim.setAttribute("data-select-id",t.id),this.chatElement.pcElms.selectDialogAim.childNodes[0].textContent=t.name}else{const i=document.createElement("span");i.setAttribute("class","at-select"),i.setAttribute("data-select-key",e||this.chatElement.pcElms.selectDialogKey),i.setAttribute("data-select-id",t.id),i.innerHTML=`${t.name}${I}`;const s=this.chatInput.createNewDom(i);this.chatInput.replaceRegContent(s,!1)}await this.chatEvent.richTextInput()}async matchSetTag(t){this.chatEvent.triggerChatEvent("atCheck",[t]),await this.chatInput.onceSearchCall(t,this.chatEvent.startOpenIndex),await this.chatEvent.richTextInput()}async onceSetTag(t){this.chatEvent.triggerChatEvent("atCheck",[t]),await this.chatInput.onceCall({id:t[this.options.userProps.id],name:t[this.options.userProps.name]}),await this.chatEvent.richTextInput()}async batchSetTag(t){this.chatEvent.triggerChatEvent("atCheck",t);const e=[];for(let i=0;i<=t.length-1;)e.push({id:t[i][this.options.userProps.id],name:t[i][this.options.userProps.name]}),i++;await this.chatInput.batchReplaceRegContent(e,!this.chatElement.isExternalCallPopup),await this.chatEvent.richTextInput()}async onceSetCustomTag(t){this.chatEvent.triggerChatEvent("tagCheck",t,this.chatElement.pcElms.customTagDialogTagKey),await this.chatInput.onceCustomCall(t,!0,this.chatElement.pcElms.customTagDialogTagKey),await this.chatEvent.richTextInput()}async matchSetCustomTag(t){this.chatEvent.triggerChatEvent("tagCheck",t,this.chatElement.pcElms.customTagDialogTagKey),await this.chatInput.onceCustomCall(t,this.chatEvent.startOpenIndex,this.chatElement.pcElms.customTagDialogTagKey),await this.chatEvent.richTextInput()}async undo(){const{chatEvent:t}=this;if(!t.doOverHistory||!t.undoHistory||t.undoHistory.length<=1)return;const e=t.undoHistory[t.undoHistory.length-2],i=t.undoHistory[t.undoHistory.length-1];t.redoHistory.push(i),t.undoHistory.pop(),await t.setChatHistory(e)}async redo(){const{chatEvent:t}=this;if(!t.doOverHistory||!t.redoHistory||t.redoHistory.length<1)return;const e=t.redoHistory[t.redoHistory.length-1];t.redoHistory.pop(),t.undoHistory.push(e),await t.setChatHistory(e)}cursorMove(t){if(0===t)return void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const e=new RegExp(`[${this.chatInput.ZERO_WIDTH_KEY}|${this.chatInput.VOID_KEY}]`,"ig");if(t>0){const i=this.chatInput.vnode.textContent.replace(e,"").slice(this.chatInput.cursorIndex);if(i.length>=t)return this.chatInput.cursorIndex+=t,void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const s=this.chatInput.vnode.parentElement.parentElement,n=s.parentElement;let a=!(!s.nextElementSibling||!s.nextElementSibling.nextElementSibling);const o=!!n.nextElementSibling;if(!a&&!o)return this.chatInput.cursorIndex+=i.length,0===this.chatInput.cursorIndex&&(this.chatInput.cursorIndex=1),void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const r=t-i.length-1,c=a?s.nextElementSibling.nextElementSibling:n.nextElementSibling.children[0],{rangeNode:l,rangeIndex:d}=this.chatInput.getOffsetRange(r,c);this.chatInput.restCursorPos(l,d)}else if(t<0){let i=Math.abs(t);const s=this.chatInput.vnode.textContent.replace(e,"").slice(0,this.chatInput.cursorIndex);if(s.length>=i)return this.chatInput.cursorIndex-=i,void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const n=this.chatInput.vnode.parentElement.parentElement,a=n.parentElement,o=!(!n.previousElementSibling||!n.previousElementSibling.previousElementSibling),r=!!a.previousElementSibling;if(!o&&!r)return void this.chatInput.restCursorPos(this.chatInput.vnode);i=i-s.length-1;const c=o?n.previousElementSibling.previousElementSibling:a.previousElementSibling.lastElementChild,{rangeNode:l,rangeIndex:d}=this.chatInput.getOffsetRange(i,c,!0);this.chatInput.restCursorPos(l,d)}}async cursorDel(t){if(0===t)return void this.chatInput.restCursorPos(this.chatInput.vnode,this.chatInput.cursorIndex);const e=this.chatInput.vnode,i=this.chatInput.cursorIndex;this.cursorMove(t);const s=this.chatInput.vnode,n=this.chatInput.cursorIndex,a=document.createRange();t<0?(a.setStart(s,n),a.setEnd(e,i)):(a.setStart(e,i),a.setEnd(s,n));const o=window.getSelection();o.removeAllRanges(),o.addRange(a),(this.chatInput.selectRegionMerge()||this.chatInput.gridElmMerge()||this.chatInput.delMarkRule())&&await this.chatEvent.richTextInput()}async delUserTags(t){const e=t||this.options.userList.map(t=>t[this.options.userProps.id]),i=this.chatElement.richText.querySelectorAll(".at-user"),s=[];Array.from(i,t=>{const i=t.getAttribute("data-user-id");e.some(t=>String(t)===i)&&s.push(t.parentElement)});for(let n=0;n<s.length;){const t=s[n];this.chatInput.delTag(t),n++}this.enable(),await this.chatEvent.richTextInput()}async delCustomTags(t,e){const i=this.options.customTrigger.find(e=>e.prefix===t);if(!i||0===i.tagList.length)return;const s=e||i.tagList.map(t=>t.id),n=this.chatElement.richText.querySelectorAll(".at-tag"),a=[];Array.from(n,e=>{const i=e.getAttribute("data-set-prefix"),n=e.getAttribute("data-tag-id");i===t&&s.some(t=>String(t)===n)&&a.push(e.parentElement)});for(let o=0;o<a.length;){const t=a[o];this.chatInput.delTag(t),o++}this.enable(),await this.chatEvent.richTextInput()}async delSelectTags(t,e){const i=this.options.selectList.find(e=>e.key===t);if(!i||0===i.options.length)return;const s=e||i.options.map(t=>t.id),n=this.chatElement.richText.querySelectorAll(".at-select"),a=[];Array.from(n,e=>{const i=e.getAttribute("data-select-key"),n=e.getAttribute("data-select-id");i===t&&s.some(t=>String(t)===n)&&a.push(e.parentElement)});for(let o=0;o<a.length;){const t=a[o];this.chatInput.delTag(t),o++}this.enable(),await this.chatEvent.richTextInput()}addEventListener(t,e){this.chatEvent.chatEventModule[t].push(e)}removeEventListener(t,e){const i=this.chatEvent.chatEventModule[t],s=i.indexOf(e);-1!==s&&i.splice(s,1)}revisePCPointDialogLabel(t){this.options.needDialog&&(this.options.dialogLabels.pcPointDialog=Object.assign({},M,t||{}),this.chatElement.pcElms.pointDialogElm.querySelector(".call-user-dialog-header-title").textContent=this.options.dialogLabels.pcPointDialog.title,this.chatElement.pcElms.pointDialogCheckElm.textContent=this.options.dialogLabels.pcPointDialog.checkLabel,this.chatElement.pcElms.pointDialogEmptyElm&&(this.chatElement.pcElms.pointDialogEmptyElm.children[1].textContent=this.options.dialogLabels.pcPointDialog.emptyLabel),this.options.asyncMatch||this.updateUserList())}revisePCCheckDialogLabel(t){!this.options.needDialog||this.options.asyncMatch||(this.options.dialogLabels.pcPCheckDialog=Object.assign({},L,t||{}),this.chatElement.pcElms.checkDialogElm.querySelector(".checkbox-dialog-container-header").children[0].textContent=this.options.dialogLabels.pcPCheckDialog.title,this.chatElement.pcElms.checkDialogSearchInputElm.setAttribute("placeholder",this.options.dialogLabels.pcPCheckDialog.searchPlaceholder),this.chatElement.pcElms.checkDialogElm.querySelector(".checkbox-dialog-search-empty").textContent=this.options.dialogLabels.pcPCheckDialog.searchEmptyLabel,this.chatElement.pcElms.checkDialogElm.querySelector(".checkbox-dialog-right-box-title").textContent=this.options.dialogLabels.pcPCheckDialog.userTagTitle,this.chatElement.pcElms.checkDialogUsersElm.children[0].children[2].textContent=this.options.dialogLabels.pcPCheckDialog.checkAllLabel,this.chatElement.pcElms.checkDialogElm.querySelector(".btn-submit").textContent=this.options.dialogLabels.pcPCheckDialog.confirmLabel,this.chatElement.pcElms.checkDialogElm.querySelector(".btn-close").textContent=this.options.dialogLabels.pcPCheckDialog.cancelLabel)}reviseH5DialogLabel(t){this.options.needDialog&&(this.options.dialogLabels.h5Dialog=Object.assign({},N,t||{}),this.chatElement.h5Elms.dialogElm.querySelector(".popup-title").textContent=this.options.dialogLabels.h5Dialog.title,this.chatElement.h5Elms.dialogSearchElm.setAttribute("placeholder",this.options.dialogLabels.h5Dialog.searchPlaceholder),this.chatElement.h5Elms.dialogEmptyElm.children[1].textContent=this.options.dialogLabels.h5Dialog.searchEmptyLabel,this.chatElement.h5Elms.dialogCheckElm.textContent=this.options.dialogLabels.h5Dialog.confirmLabel,this.chatElement.h5Elms.dialogShowElm.textContent=this.options.dialogLabels.h5Dialog.cancelLabel,this.options.asyncMatch||this.updateUserList())}}if(!window)throw new Error("非web环境!");window.console&&window.console.log&&console.log(" %c ".concat("ChatArea"," %c v5.3.6 "),"background: #269AFF; color: #FFFFFF; padding: 4px 0; border-radius: 4px 0px 0px 4px; font-style: italic;","background: #FFFFFF; color: #269AFF; padding: 2px 0; border-radius: 0px 4px 4px 0px; font-style: italic; border: 2px solid #269AFF;"),window.ChatArea=B},"93f9":function(t,e,i){"use strict";i("323d")},"96cf":function(t,e,i){var s=function(t){"use strict";var e,i=Object.prototype,s=i.hasOwnProperty,n=Object.defineProperty||function(t,e,i){t[e]=i.value},a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",r=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(N){l=function(t,e,i){return t[e]=i}}function d(t,e,i,s){var a=e&&e.prototype instanceof v?e:v,o=Object.create(a.prototype),r=new D(s||[]);return n(o,"_invoke",{value:I(t,i,r)}),o}function u(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(N){return{type:"throw",arg:N}}}t.wrap=d;var h="suspendedStart",p="suspendedYield",m="executing",g="completed",f={};function v(){}function b(){}function y(){}var C={};l(C,o,function(){return this});var x=Object.getPrototypeOf,E=x&&x(x(M([])));E&&E!==i&&s.call(E,o)&&(C=E);var w=y.prototype=v.prototype=Object.create(C);function A(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){function i(n,a,o,r){var c=u(t[n],t,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"===typeof d&&s.call(d,"__await")?e.resolve(d.__await).then(function(t){i("next",t,o,r)},function(t){i("throw",t,o,r)}):e.resolve(d).then(function(t){l.value=t,o(l)},function(t){return i("throw",t,o,r)})}r(c.arg)}var a;function o(t,s){function n(){return new e(function(e,n){i(t,s,e,n)})}return a=a?a.then(n,n):n()}n(this,"_invoke",{value:o})}function I(t,e,i){var s=h;return function(n,a){if(s===m)throw new Error("Generator is already running");if(s===g){if("throw"===n)throw a;return L()}i.method=n,i.arg=a;while(1){var o=i.delegate;if(o){var r=_(o,i);if(r){if(r===f)continue;return r}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(s===h)throw s=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s=m;var c=u(t,e,i);if("normal"===c.type){if(s=i.done?g:p,c.arg===f)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(s=g,i.method="throw",i.arg=c.arg)}}}function _(t,i){var s=i.method,n=t.iterator[s];if(n===e)return i.delegate=null,"throw"===s&&t.iterator["return"]&&(i.method="return",i.arg=e,_(t,i),"throw"===i.method)||"return"!==s&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+s+"' method")),f;var a=u(n,t.iterator,i.arg);if("throw"===a.type)return i.method="throw",i.arg=a.arg,i.delegate=null,f;var o=a.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,f):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,f)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function M(t){if(null!=t){var i=t[o];if(i)return i.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function i(){while(++n<t.length)if(s.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=e,i.done=!0,i};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}function L(){return{value:e,done:!0}}return b.prototype=y,n(w,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:b,configurable:!0}),b.displayName=l(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},A(k.prototype),l(k.prototype,r,function(){return this}),t.AsyncIterator=k,t.async=function(e,i,s,n,a){void 0===a&&(a=Promise);var o=new k(d(e,i,s,n),a);return t.isGeneratorFunction(i)?o:o.next().then(function(t){return t.done?t.value:o.next()})},A(w),l(w,c,"Generator"),l(w,o,function(){return this}),l(w,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),i=[];for(var s in e)i.push(s);return i.reverse(),function t(){while(i.length){var s=i.pop();if(s in e)return t.value=s,t.done=!1,t}return t.done=!0,t}},t.values=M,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var i in this)"t"===i.charAt(0)&&s.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var i=this;function n(s,n){return r.type="throw",r.arg=t,i.next=s,n&&(i.method="next",i.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],r=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=s.call(o,"catchLoc"),l=s.call(o,"finallyLoc");if(c&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),T(i),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var s=i.completion;if("throw"===s.type){var n=s.arg;T(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,s){return this.delegate={iterator:M(t),resultName:i,nextLoc:s},"next"===this.method&&(this.arg=e),f}},t}(t.exports);try{regeneratorRuntime=s}catch(n){"object"===typeof globalThis?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}},"990b":function(t,e,i){var s=i("9093"),n=i("2621"),a=i("cb7c"),o=i("7726").Reflect;t.exports=o&&o.ownKeys||function(t){var e=s.f(a(t)),i=n.f;return i?e.concat(i(t)):e}},"9b43":function(t,e,i){var s=i("d8e8");t.exports=function(t,e,i){if(s(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,s){return t.call(e,i,s)};case 3:return function(i,s,n){return t.call(e,i,s,n)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,i){var s=i("2b4c")("unscopables"),n=Array.prototype;void 0==n[s]&&i("32e9")(n,s,{}),t.exports=function(t){n[s][t]=!0}},"9def":function(t,e,i){var s=i("4588"),n=Math.min;t.exports=function(t){return t>0?n(s(t),9007199254740991):0}},"9e1e":function(t,e,i){t.exports=!i("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a481:function(t,e,i){"use strict";var s=i("cb7c"),n=i("4bf8"),a=i("9def"),o=i("4588"),r=i("0390"),c=i("5f1b"),l=Math.max,d=Math.min,u=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g,m=function(t){return void 0===t?t:String(t)};i("214f")("replace",2,function(t,e,i,g){return[function(s,n){var a=t(this),o=void 0==s?void 0:s[e];return void 0!==o?o.call(s,a,n):i.call(String(a),s,n)},function(t,e){var n=g(i,t,this,e);if(n.done)return n.value;var u=s(t),h=String(this),p="function"===typeof e;p||(e=String(e));var v=u.global;if(v){var b=u.unicode;u.lastIndex=0}var y=[];while(1){var C=c(u,h);if(null===C)break;if(y.push(C),!v)break;var x=String(C[0]);""===x&&(u.lastIndex=r(h,a(u.lastIndex),b))}for(var E="",w=0,A=0;A<y.length;A++){C=y[A];for(var k=String(C[0]),I=l(d(o(C.index),h.length),0),_=[],S=1;S<C.length;S++)_.push(m(C[S]));var T=C.groups;if(p){var D=[k].concat(_,I,h);void 0!==T&&D.push(T);var M=String(e.apply(void 0,D))}else M=f(k,h,I,_,T,e);I>=w&&(E+=h.slice(w,I)+M,w=I+k.length)}return E+h.slice(w)}];function f(t,e,s,a,o,r){var c=s+t.length,l=a.length,d=p;return void 0!==o&&(o=n(o),d=h),i.call(r,d,function(i,n){var r;switch(n.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,s);case"'":return e.slice(c);case"<":r=o[n.slice(1,-1)];break;default:var d=+n;if(0===d)return i;if(d>l){var h=u(d/10);return 0===h?i:h<=l?void 0===a[h-1]?n.charAt(1):a[h-1]+n.charAt(1):i}r=a[d-1]}return void 0===r?"":r})}})},aa77:function(t,e,i){var s=i("5ca1"),n=i("be13"),a=i("79e5"),o=i("fdef"),r="["+o+"]",c="​…",l=RegExp("^"+r+r+"*"),d=RegExp(r+r+"*$"),u=function(t,e,i){var n={},r=a(function(){return!!o[t]()||c[t]()!=c}),l=n[t]=r?e(h):o[t];i&&(n[i]=l),s(s.P+s.F*r,"String",n)},h=u.trim=function(t,e){return t=String(n(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(d,"")),t};t.exports=u},aae3:function(t,e,i){var s=i("d3f4"),n=i("2d95"),a=i("2b4c")("match");t.exports=function(t){var e;return s(t)&&(void 0!==(e=t[a])?!!e:"RegExp"==n(t))}},ac6a:function(t,e,i){for(var s=i("cadf"),n=i("0d58"),a=i("2aba"),o=i("7726"),r=i("32e9"),c=i("84f2"),l=i("2b4c"),d=l("iterator"),u=l("toStringTag"),h=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=n(p),g=0;g<m.length;g++){var f,v=m[g],b=p[v],y=o[v],C=y&&y.prototype;if(C&&(C[d]||r(C,d,h),C[u]||r(C,u,v),c[v]=h,b))for(f in s)C[f]||a(C,f,s[f],!0)}},b0c5:function(t,e,i){"use strict";var s=i("520a");i("5ca1")({target:"RegExp",proto:!0,forced:s!==/./.exec},{exec:s})},ba05:function(t,e,i){},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,i){var s=i("6821"),n=i("9def"),a=i("77f1");t.exports=function(t){return function(e,i,o){var r,c=s(e),l=n(c.length),d=a(o,l);if(t&&i!=i){while(l>d)if(r=c[d++],r!=r)return!0}else for(;l>d;d++)if((t||d in c)&&c[d]===i)return t||d||0;return!t&&-1}}},c4d7:function(t,e,i){"use strict";i("d519")},c5f6:function(t,e,i){"use strict";var s=i("7726"),n=i("69a8"),a=i("2d95"),o=i("5dbc"),r=i("6a99"),c=i("79e5"),l=i("9093").f,d=i("11e9").f,u=i("86cc").f,h=i("aa77").trim,p="Number",m=s[p],g=m,f=m.prototype,v=a(i("2aeb")(f))==p,b="trim"in String.prototype,y=function(t){var e=r(t,!1);if("string"==typeof e&&e.length>2){e=b?e.trim():h(e,3);var i,s,n,a=e.charCodeAt(0);if(43===a||45===a){if(i=e.charCodeAt(2),88===i||120===i)return NaN}else if(48===a){switch(e.charCodeAt(1)){case 66:case 98:s=2,n=49;break;case 79:case 111:s=8,n=55;break;default:return+e}for(var o,c=e.slice(2),l=0,d=c.length;l<d;l++)if(o=c.charCodeAt(l),o<48||o>n)return NaN;return parseInt(c,s)}}return+e};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof m&&(v?c(function(){f.valueOf.call(i)}):a(i)!=p)?o(new g(y(e)),i,m):y(e)};for(var C,x=i("9e1e")?l(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;x.length>E;E++)n(g,C=x[E])&&!n(m,C)&&u(m,C,d(g,C));m.prototype=f,f.constructor=m,i("2aba")(s,p,m)}},c69a:function(t,e,i){t.exports=!i("9e1e")&&!i("79e5")(function(){return 7!=Object.defineProperty(i("230e")("div"),"a",{get:function(){return 7}}).a})},ca5a:function(t,e){var i=0,s=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+s).toString(36))}},cadf:function(t,e,i){"use strict";var s=i("9c6c"),n=i("d53b"),a=i("84f2"),o=i("6821");t.exports=i("01f9")(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,n(1)):n(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values"),a.Arguments=a.Array,s("keys"),s("values"),s("entries")},cb50:function(t,e,i){},cb7c:function(t,e,i){var s=i("d3f4");t.exports=function(t){if(!s(t))throw TypeError(t+" is not an object!");return t}},cc9a:function(t,e,i){"use strict";i("8bcf")},cd1c:function(t,e,i){var s=i("e853");t.exports=function(t,e){return new(s(t))(e)}},ce10:function(t,e,i){var s=i("69a8"),n=i("6821"),a=i("c366")(!1),o=i("613b")("IE_PROTO");t.exports=function(t,e){var i,r=n(t),c=0,l=[];for(i in r)i!=o&&s(r,i)&&l.push(i);while(e.length>c)s(r,i=e[c++])&&(~a(l,i)||l.push(i));return l}},d2c8:function(t,e,i){var s=i("aae3"),n=i("be13");t.exports=function(t,e,i){if(s(e))throw TypeError("String#"+i+" doesn't accept regex!");return String(n(t))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d519:function(t,e,i){},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d6dd:function(t,e,i){},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},dc6d:function(t,e,i){},dcc3:function(t,e,i){"use strict";i("117e")},e003:function(t,e,i){"use strict";i("61c8")},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e61c:function(t,e,i){"use strict";i("d6dd")},e853:function(t,e,i){var s=i("d3f4"),n=i("1169"),a=i("2b4c")("species");t.exports=function(t){var e;return n(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!n(e.prototype)||(e=void 0),s(e)&&(e=e[a],null===e&&(e=void 0))),void 0===e?Array:e}},e95c:function(t,e,i){},ef69:function(t,e,i){},f1ae:function(t,e,i){"use strict";var s=i("86cc"),n=i("4630");t.exports=function(t,e,i){e in t?s.f(t,e,n(0,i)):t[e]=i}},f559:function(t,e,i){"use strict";var s=i("5ca1"),n=i("9def"),a=i("d2c8"),o="startsWith",r=""[o];s(s.P+s.F*i("5147")(o),"String",{startsWith:function(t){var e=a(this,t,o),i=n(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),s=String(t);return r?r.call(e,s,i):e.slice(i,i+s.length)===s}})},f6fd:function(t,e){(function(t){var e="currentScript",i=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(s){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(s.stack)||[!1])[1];for(t in i)if(i[t].src==e||"interactive"==i[t].readyState)return i[t];return null}}})})(document)},f751:function(t,e,i){var s=i("5ca1");s(s.S+s.F,"Object",{assign:i("7333")})},fa5b:function(t,e,i){t.exports=i("5537")("native-function-to-string",Function.toString)},fab2:function(t,e,i){var s=i("7726").document;t.exports=s&&s.documentElement},fb15:function(t,e,i){"use strict";var s;(i.r(e),"undefined"!==typeof window)&&(i("f6fd"),(s=window.document.currentScript)&&(s=s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(i.p=s[1]));i("7f7f"),i("ac6a"),i("3b2b"),i("cadf"),i("8615"),i("6b54");function n(t){return"[object Object]"===Object.prototype.toString.call(t)}function a(t){return"string"==typeof t}function o(t){return(new Date).getTime()-t<864e5}function r(t){return!t||(!(!Array.isArray(t)||0!=t.length)||!(!n(t)||0!=Object.values(t).length))}function c(t){return t&&"function"===typeof t}i("96cf");function l(t,e,i,s,n,a,o){try{var r=t[a](o),c=r.value}catch(t){return void i(t)}r.done?e(c):Promise.resolve(c).then(s,n)}function d(t){return function(){var e=this,i=arguments;return new Promise(function(s,n){var a=t.apply(e,i);function o(t){l(a,s,n,o,r,"next",t)}function r(t){l(a,s,n,o,r,"throw",t)}o(void 0)})}}i("456d"),i("6762"),i("2fdb");var u,h,p=[],m={hover:function(t){},focus:function(t){var e=this;t.addEventListener("focus",function(t){e.changeVisible()}),t.addEventListener("blur",function(t){e.changeVisible()})},click:function(t){var e=this;t.addEventListener("click",function(t){e.$emit("popoverClick"),t.stopPropagation(),M.hide(),e.changeVisible()})},contextmenu:function(t){var e=this;t.addEventListener("contextmenu",function(t){t.preventDefault(),e.changeVisible()})}},g={name:"LemonPopover",props:{trigger:{type:String,default:"click",validator:function(t){return Object.keys(m).includes(t)}}},data:function(){return{popoverStyle:{},visible:!1}},created:function(){document.addEventListener("click",this._documentClickEvent),p.push(this.close)},mounted:function(){m[this.trigger].call(this,this.$slots.default[0].elm)},render:function(){var t=arguments[0];return t("span",{style:"position:relative"},[t("transition",{attrs:{name:"lemon-slide-top"}},[this.visible&&t("div",{class:"lemon-popover",ref:"popover",style:this.popoverStyle,on:{click:function(t){return t.stopPropagation()}}},[t("div",{class:"lemon-popover__content"},[this.$slots.content]),t("div",{class:"lemon-popover__arrow"})])]),this.$slots.default])},destroyed:function(){document.removeEventListener("click",this._documentClickEvent)},computed:{},watch:{visible:function(){var t=d(regeneratorRuntime.mark(function t(e){var i,s;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!e){t.next=6;break}return t.next=3,this.$nextTick();case 3:i=this.$slots.default[0].elm,s=this.$refs.popover,this.popoverStyle={top:"-".concat(s.offsetHeight+10,"px"),left:"".concat(i.offsetWidth/2-s.offsetWidth/2,"px")};case 6:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}()},methods:{_documentClickEvent:function(t){this.$emit("popoverClick"),t.stopPropagation(),this.visible&&this.close()},changeVisible:function(){this.visible?this.close():this.open()},open:function(){this.closeAll(),this.visible=!0},closeAll:function(){p.forEach(function(t){return t()})},close:function(){this.visible=!1}}},f=g;i("35f3");function v(t,e,i,s,n,a,o,r){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),s&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):n&&(c=r?function(){n.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:n),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(t,e){return c.call(e),d(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:l}}var b,y=v(f,u,h,!1,null,null,null),C=y.exports,x=function(){b&&(b.style.display="none")},E=function(){b&&(b.style.display="block")};document.addEventListener("click",function(t){x()});var w,A,k,I,_,S,T,D,M={hide:x,bind:function(t,e,i){t.addEventListener(e.modifiers.click?"click":"contextmenu",function(t){if(!r(e.value)&&Array.isArray(e.value)){var s;e.modifiers.click&&t.stopPropagation(),t.preventDefault(),C.methods.closeAll();var n=[];e.modifiers.message?s=i.context:e.modifiers.contact&&(s=i.child),b||(b=document.createElement("div"),b.className="lemon-contextmenu",document.body.appendChild(b)),b.innerHTML=e.value.map(function(t){var e;if(e=c(t.visible)?t.visible(s):void 0===t.visible||t.visible,e){n.push(t);var i=t.icon?'<i class="lemon-contextmenu__icon '.concat(t.icon,'"></i>'):"";return'<div style="color:'.concat(t.color,'" title="').concat(t.text,'" class="lemon-contextmenu__item">').concat(i,"<span>").concat(t.text,"</span></div>")}return""}).join("");var a=b.offsetHeight,o=b.offsetWidth,l=window.innerHeight,d=window.innerWidth,u=t.clientY+a>l?t.pageY-a-5:t.pageY,h=t.clientX+o>d?t.pageX-o-5:t.pageX;b.style.top="".concat(u,"px"),b.style.left="".concat(h,"px"),b.childNodes.forEach(function(t,e){var i=n[e],a=i.click;i.render;t.addEventListener("click",function(t){t.stopPropagation(),c(a)&&a(t,s,x)})}),E()}})}},L={name:"LemonTabs",props:{activeIndex:String},data:function(){return{active:this.activeIndex}},mounted:function(){this.active||(this.active=this.$slots["tab-pane"][0].data.attrs.index)},render:function(){var t=this,e=arguments[0],i=[],s=[];return this.$slots["tab-pane"].map(function(n){var a=n.data.attrs,o=a.tab,r=a.index;i.push(e("div",{class:"lemon-tabs-content__pane",directives:[{name:"show",value:t.active==r}]},[n])),s.push(e("div",{class:["lemon-tabs-nav__item",t.active==r&&"lemon-tabs-nav__item--active"],on:{click:function(){return t._handleNavClick(r)}}},[o]))}),e("div",{class:"lemon-tabs"},[e("div",{class:"lemon-tabs-content"},[i]),e("div",{class:"lemon-tabs-nav"},[s])])},methods:{_handleNavClick:function(t){this.active=t}}},N=L,O=(i("69bb"),v(N,w,A,!1,null,null,null)),P=O.exports,U={name:"LemonButton",props:{color:{type:String,default:"default"},disabled:Boolean},render:function(){var t=arguments[0];return t("button",{class:["lemon-button","lemon-button--color-".concat(this.color)],attrs:{disabled:this.disabled,type:"button"},on:{click:this._handleClick}},[this.$slots.default])},methods:{_handleClick:function(t){this.$emit("click",t)}}},R=U,j=(i("cc9a"),v(R,k,I,!1,null,null,null)),B=j.exports,F=(i("c5f6"),{name:"LemonBadge",props:{count:[Number,Boolean],overflowCount:{type:Number,default:99}},render:function(){var t=arguments[0];return t("span",{class:"lemon-badge"},[this.$slots.default,0!==this.count&&void 0!==this.count&&t("span",{class:["lemon-badge__label",this.isDot&&"lemon-badge__label--dot"]},[this.label])])},computed:{isDot:function(){return!0===this.count},label:function(){return this.isDot?"":this.count>this.overflowCount?"".concat(this.overflowCount,"+"):this.count}},methods:{}}),$=F,V=(i("93f9"),v($,_,S,!1,null,null,null)),H=V.exports,K={name:"LemonAvatar",inject:["IMUI"],props:{src:String,icon:{type:String,default:"lemon-icon-people"},circle:{type:Boolean,default:function(){return!!this.IMUI&&this.IMUI.avatarCricle}},size:{type:Number,default:32}},data:function(){return{imageFinishLoad:!0}},render:function(){var t=this,e=arguments[0];return e("span",{style:this.style,class:["lemon-avatar",{"lemon-avatar--circle":this.circle}],on:{click:function(e){return t.$emit("click",e)}}},[(this.imageFinishLoad||!this.src)&&e("i",{class:this.icon}),e("img",{attrs:{src:this.src},on:{load:this._handleLoad}})])},computed:{style:function(){var t="".concat(this.size,"px");return{width:t,height:t,lineHeight:t,fontSize:"".concat(this.size/2,"px")}}},methods:{_handleLoad:function(){this.imageFinishLoad=!1}}},z=K,G=(i("e003"),v(z,T,D,!1,null,null,null)),q=G.exports,Q=i("2638"),Y=i.n(Q);i("8e6e");function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function W(t,e){if("object"!=J(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=J(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function Z(t){var e=W(t,"string");return"symbol"==J(e)?e:e+""}function X(t,e,i){return(e=Z(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i("a481");function tt(t,e,i){return t?t(i):e}function et(t){return t<10?"0".concat(t):t}function it(t){var e,i=new Date(t),s=new Date,n=function(t){return t.getFullYear()},a=function(t){return"".concat(t.getMonth()+1,"-").concat(t.getDate())},o=n(i),r=n(s);return e=o!==r?"y-m-d h:i":"".concat(o,"-").concat(a(i))==="".concat(r,"-").concat(a(s))?"h:i":"m-d h:i",st(t,e)}function st(t,e){e||(e="y-m-d h:i:s"),t=t?new Date(t):new Date;for(var i=[t.getFullYear().toString(),et((t.getMonth()+1).toString()),et(t.getDate().toString()),et(t.getHours().toString()),et(t.getMinutes().toString()),et(t.getSeconds().toString())],s="ymdhis",n=0;n<i.length;n++)e=e.replace(s.charAt(n),i[n]);return e}function nt(t,e){c(t)?t(function(){e()}):e()}function at(t){return t.replace(/<(?!img).*?>/gi,"")}function ot(t){if(null==t||""==t)return"0 Bytes";var e=["B","K","M","G","T","P","E","Z","Y"],i=0,s=parseFloat(t);i=Math.floor(Math.log(s)/Math.log(1024));var n=s/Math.pow(1024,i);return n=parseFloat(n.toFixed(2)),n+e[i]}function rt(){var t=(new Date).getTime();window.performance&&"function"===typeof window.performance.now&&(t+=performance.now());var e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)});return e}var ct,lt,dt={name:"LemonContact",components:{},inject:{IMUI:{from:"IMUI",default:function(){return this}}},data:function(){return{}},props:{contact:Object,simple:Boolean,timeFormat:{type:Function,default:function(t){return st(t,o(t)?"h:i":"y/m/d")}}},render:function(){var t=this,e=arguments[0];return e("div",{class:["lemon-contact",{"lemon-contact--name-center":this.simple}],attrs:{title:this.contact.displayName},on:{click:function(e){return t._handleClick(e,t.contact)}}},[tt(this.$scopedSlots.default,this._renderInner(),this.contact)])},created:function(){},mounted:function(){},computed:{},watch:{},methods:{_renderInner:function(){var t=this.$createElement,e=this.contact;return[t("lemon-badge",{attrs:{count:this.simple?0:e.unread},class:"lemon-contact__avatar"},[t("lemon-avatar",{attrs:{size:40,src:e.avatar}})]),t("div",{class:"lemon-contact__inner"},[t("p",{class:"lemon-contact__label"},[t("span",{class:"lemon-contact__name"},[e.displayName]),!this.simple&&t("span",{class:"lemon-contact__time"},[this.timeFormat(e.lastSendTime)])]),!this.simple&&t("p",{class:"lemon-contact__content"},[a(e.lastContent)?t("span",Y()([{},{domProps:{innerHTML:e.lastContent}}])):e.lastContent])])]},_handleClick:function(t,e){this.$emit("click",e)}}},ut=dt,ht=(i("8fb6"),v(ut,ct,lt,!1,null,null,null)),pt=ht.exports;i("5df3"),i("1c4c"),i("9204");const mt=window.ChatArea;var gt=mt;i("6fb5");function ft(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function vt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ft(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var bt,yt,Ct,xt,Et,wt,At,kt=JSON.parse(localStorage.getItem("i18n")),It=function(t,e){document.execCommand(t,!1,e)},_t=window.getSelection(),St=[],Tt={name:"LemonEditor",inject:{IMUI:{from:"IMUI",default:function(){return this}}},components:{},props:{tools:{type:Array,default:function(){return[]}},sendText:{type:String,default:kt?kt.sendText:"发 送"},wrapKey:{type:Function,default:function(t){return 13==t.keyCode&&!0===t.ctrlKey}},sendKey:{type:Function,default:function(t){return 13==t.keyCode&&0==t.ctrlKey&&0==t.shiftKey}}},data:function(){return this.clipboardBlob=null,{clipboardUrl:"",submitDisabled:!0,accept:"",chatArea:null,curEmoji:"",i18n:this.IMUI.i18n}},created:function(){var t=this;this.IMUI.$on("change-contact",function(){t.closeClipboardImage()}),this.$nextTick(function(){t.chatArea=new gt({elm:t.$refs.textarea,userList:[],userProps:{id:"id",name:"displayName",avatar:"avatar",pinyin:"name_py"},placeholder:"",needCallSpace:!0,wrapKeyFun:function(e){return t.wrapKey(e)},sendKeyFun:function(e){return t.sendKey(e)}}),t.chatArea.revisePCCheckDialogLabel({title:t.i18n.atTitle,searchPlaceholder:t.i18n.searchPlaceholder,searchEmptyLabel:t.i18n.searchEmptyLabel,userTagTitle:t.i18n.userTagTitle,checkAllLabel:t.i18n.checkAllLabel,confirmLabel:t.i18n.confirmLabel,cancelLabel:t.i18n.cancelLabel}),t.chatArea.revisePCPointDialogLabel({title:t.i18n.groupUserTitle,callEveryLabel:t.i18n.callEveryLabel,checkLabel:t.i18n.checkLabel,emptyLabel:t.i18n.emptyLabel}),t.chatArea.richText.addEventListener("drop",function(e){var i=e.dataTransfer,s=i.files;Array.from(s).forEach(function(e){t.$emit("upload",e)})}),t.chatArea.addEventListener("defaultAction",function(t){switch(t){case"PASTE":return"PREVENT"}}),t.chatArea.richText.addEventListener("paste",function(e){e.preventDefault();var i=e.clipboardData||window.clipboardData,s=i.getData("Text");if(s)/<[^>]*>/g.test(s)?t.chatArea.reverseAnalysis(s,!0):t.chatArea.insertText(s),t.submitDisabled=!1;else{var n=t._getClipboardBlob(i),a=n.blob,o=n.blobUrl;t.clipboardBlob=a,t.clipboardUrl=o}}),t.chatArea.addEventListener("enterSend",function(){0==t.submitDisabled&&t._handleSend()})})},render:function(){var t=this,e=arguments[0],i=[],s=[];return this.proxyTools.forEach(function(n){var a=n.name,o=n.title,r=n.render,c=n.click,l=n.isRight;c=c||new Function;var d,u=["lemon-editor__tool-item",{"lemon-editor__tool-item--right":l}];d="emoji"==a?0==St.length?"":e("lemon-popover",{class:"lemon-editor__emoji",on:{popoverClick:t.closePointPopup}},[e("template",{slot:"content"},[t._renderEmojiTabs()]),e("div",{class:u,attrs:{title:o}},[r()])]):e("div",{class:u,on:{click:c},attrs:{title:o}},[r()]),l?s.push(d):i.push(d)}),e("lemon-resize",{class:"lemon-editor",attrs:{size:200}},[this.clipboardUrl&&e("div",{class:"lemon-editor__clipboard-image"},[e("img",{attrs:{src:this.clipboardUrl}}),e("div",[e("lemon-button",{style:{marginRight:"10px"},on:{click:this.closeClipboardImage},attrs:{color:"grey"}},[this.i18n.cancelLabel]),e("lemon-button",{on:{click:this.sendClipboardImage}},[this.i18n.sendImage])])]),e("input",{style:"display:none",attrs:{type:"file",multiple:"multiple",accept:this.accept},ref:"fileInput",on:{change:this._handleChangeFile}}),e("div",{class:"lemon-editor__tool"},[e("div",{class:"lemon-editor__tool-left"},[i]),e("div",{class:"lemon-editor__tool-right"},[s])]),e("div",{class:"lemon-editor__inner"},[e("div",{class:"lemon-editor__input",ref:"textarea",on:{click:this._handleClick,input:this._handleInput},attrs:{spellcheck:"false"}})]),e("div",{class:"lemon-editor__footer"},[e("div",{class:"lemon-editor__tip"},[tt(this.IMUI.$scopedSlots["editor-footer"],this.i18n.wrapKey)]),e("div",{class:"lemon-editor__submit"},[e("lemon-button",{attrs:{disabled:this.submitDisabled},on:{click:this._handleSend}},[this.sendText])])])])},computed:{proxyTools:function(){var t=this,e=this.$createElement;if(!this.tools)return[];var i=[{name:"emoji",title:this.i18n.emoji,click:null,render:function(t){return e("i",{class:"lemon-icon-emoji"})}},{name:"uploadFile",title:this.i18n.fileUpload,click:function(){return t.selectFile("*")},render:function(t){return e("i",{class:"lemon-icon-folder"})}},{name:"uploadImage",title:this.i18n.imageUpload,click:function(){return t.selectFile("image/*")},render:function(t){return e("i",{class:"lemon-icon-image"})}}],s=[];if(Array.isArray(this.tools)){var n={emoji:0,uploadFile:1,uploadImage:2},a=Object.keys(n);s=this.tools.map(function(t){return a.includes(t.name)?vt(vt({},i[n[t.name]]),t):t})}else s=i;return s}},methods:{closePointPopup:function(){this.chatArea&&this.chatArea.chatEvent.winClick()},_sendEmoji:function(t){this.curEmoji=t,this.$emit("send",t.src)},closeClipboardImage:function(){this.clipboardUrl="",this.clipboardBlob=null},sendClipboardImage:function(){this.clipboardBlob&&(this.$emit("upload",this.clipboardBlob),this.closeClipboardImage())},saveRangeToLast:function(){bt||(bt=document.createRange()),bt.selectNodeContents(textarea.value),bt.collapse(!1),_t.removeAllRanges(),_t.addRange(bt)},inertContent:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&saveRangeToLast(),this.focusRange(),It("insertHTML",t),this.saveRange()},saveRange:function(){bt=_t.getRangeAt(0)},focusRange:function(){this.$refs.textarea.focus(),bt&&(_t.removeAllRanges(),_t.addRange(bt))},_handleClick:function(){this.saveRange()},_handleInput:function(){this._checkSubmitDisabled()},_renderEmojiTabs:function(){var t=this,e=this.$createElement,i=function(i,s){return 1==s?i.map(function(i){return e("img",{attrs:{src:i.src,title:i.title,loading:"lazy"},class:"lemon-editor__emoji-item diy-emoji",on:{click:function(){return t._sendEmoji(i)}}})}):i.map(function(i){return e("img",{attrs:{src:i.src,title:i.title},class:"lemon-editor__emoji-item",on:{click:function(){return t._handleSelectEmoji(i)}}})})};if(St[0].label){var s=St.map(function(t,s){return e("div",{slot:"tab-pane",attrs:{index:s,tab:t.label}},[i(t.children,s)])});return e("lemon-tabs",{style:"width: 412px"},[s])}return e("div",{class:"lemon-tabs-content",style:"width:406px"},[i(St)])},_handleSelectEmoji:function(t){this.chatArea.insertHtml('<img emoji-name="'.concat(t.name,'" src="').concat(t.src,'"></img>')),this._checkSubmitDisabled()},selectFile:function(){var t=d(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return this.accept=e,t.next=3,this.$nextTick();case 3:this.$refs.fileInput.click();case 4:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),_getClipboardBlob:function(t){for(var e,i,s=0;s<t.items.length;++s)"file"==t.items[s].kind&&-1!==t.items[s].type.indexOf("image/")&&(e=t.items[s].getAsFile(),i=(window.URL||window.webkitURL).createObjectURL(e));return{blob:e,blobUrl:i}},getFormatValue:function(){return this.IMUI.emojiImageToName(this.chatArea.getHtml({needUserId:!0}))},_checkSubmitDisabled:function(){this.submitDisabled=!at(this.chatArea.getHtml().trim())},_handleSend:function(t){var e=this.getFormatValue();this.$emit("send",e),this.clear(),this._checkSubmitDisabled()},_handleChangeFile:function(t){var e=this,i=this.$refs.fileInput;Array.from(i.files).forEach(function(t){e.$emit("upload",t)}),i.value=""},clear:function(){this.chatArea.clear()},initEmoji:function(t){St=t,this.$forceUpdate()},setValue:function(t){""==t?this.clear():this.chatArea.reverseAnalysis(this.IMUI.emojiNameToImage(t)),this._checkSubmitDisabled()}}},Dt=Tt,Mt=(i("3dfc"),i("26fe"),v(Dt,yt,Ct,!1,null,null,null)),Lt=Mt.exports,Nt=JSON.parse(localStorage.getItem("i18n")),Ot={name:"LemonMessages",inject:{IMUI:{from:"IMUI",default:function(){return this}}},components:{},props:{hideName:Boolean,hideTime:Boolean,reverseUserId:[String,Number],timeRange:{type:Number,default:1},timeFormat:{type:Function,default:function(t){return it(t)}},loadingText:{type:[String,Function]},loadendText:{type:[String,Function],default:Nt?Nt.noneMsg:"暂无更多消息"},messages:{type:Array,default:function(){return[]}}},data:function(){return this._lockScroll=!1,{_loading:!1,_loadend:!1,isBottom:!0}},render:function(){var t=this,e=arguments[0];return e("div",{class:"lemon-messages",ref:"wrap",on:{scroll:this._handleScroll}},[e("div",{class:["lemon-messages__load","lemon-messages__load--".concat(this._loadend?"end":"ing")]},[e("span",{class:"lemon-messages__loadend"},[a(this.loadendText)?this.loadendText:this.loadendText()]),e("span",{class:"lemon-messages__loading"},[this.loadingText?a(this.loadingText)?this.loadingText:this.loadingText():e("i",{class:"lemon-icon-loading lemonani-spin"})])]),this.messages.map(function(i,s){var n=[],a="["+t.IMUI.i18n.noMsgType+"]",o="lemon-message-".concat(i.type),r=t.toCamelCase(o);t.$options.components[r]||(i.type="text",i.content=a,o="lemon-message-text");var c,l=t.messages[s-1];return l&&t.msecRange&&i.sendTime-l.sendTime>t.msecRange&&n.push(e("lemon-message-event",Y()([{},{attrs:{message:{id:"__time__",type:"event",content:it(i.sendTime)}}}]))),c="event"==i.type?{message:i}:{timeFormat:t.timeFormat,message:i,reverse:t.reverseUserId==i.fromUser.id,hideTime:t.hideTime,hideName:t.hideName},n.push(e(o,Y()([{ref:"message",refInFor:!0},{attrs:c}]))),n})])},computed:{msecRange:function(){return 1e3*this.timeRange*60}},watch:{},methods:{loaded:function(){this._loadend=!0,this.$forceUpdate()},toCamelCase:function(t){return t.replace(/-([a-z])/g,function(t,e){return e.toUpperCase()})},resetLoadState:function(){var t=this;this._lockScroll=!0,this._loading=!1,this._loadend=!1,setTimeout(function(){t._lockScroll=!1},200)},_handleScroll:function(){var t=d(regeneratorRuntime.mark(function t(e){var i,s,n,a,o,r=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!this._lockScroll){t.next=2;break}return t.abrupt("return");case 2:if(i=e.target,M.hide(),0!=i.scrollTop||0!=this._loading||0!=this._loadend){t.next=10;break}return this._loading=!0,t.next=8,this.$nextTick();case 8:s=i.scrollHeight,this.$emit("reach-top",function(){var t=d(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,r.$nextTick();case 2:i.scrollTop=i.scrollHeight-s,r._loading=!1,r._loadend=!!e;case 5:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}());case 10:n=i.scrollTop,a=i.scrollHeight,o=this.$refs.wrap,this.isBottom=n+o.offsetHeight>=a-20,this.$emit("is-bottom",this.isBottom);case 15:case"end":return t.stop()}},t,this)}));function e(e){return t.apply(this,arguments)}return e}(),scrollToBottom:function(){var t=d(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$nextTick();case 2:e=this.$refs.wrap,e&&(e.scrollTop=e.scrollHeight);case 4:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}()},created:function(){},mounted:function(){}},Pt=Ot,Ut=(i("20e3"),v(Pt,xt,Et,!1,null,null,null)),Rt=Ut.exports,jt=function(){var t=this,e=t._self._c;return e("div",{ref:"resize",staticClass:"resize"},[e("div",{ref:"resizeHandle",class:"vertical"==t.direction?"resize-v":"resize-h"}),t._t("default")],2)},Bt=[],Ft={name:"LemonResize",props:{direction:{type:String,default:"vertical"},size:{type:Number,default:250},sizeRange:{type:Array,default:function(){return[200,360]}}},data:function(){return{height:200,width:250}},mounted:function(){this.dragControllerDiv(this.$refs.resize,this.$refs.resizeHandle)},methods:{dragControllerDiv:function(t,e){var i=this;"horizontal"===this.direction?(t.style.width=(localStorage.getItem("horizontalSize")||this.size)+"px",e.onmousedown=function(e){var s=t.offsetWidth,n=e.clientX;document.onmousemove=function(a){var o=a.clientX,r=s+(o-n);i.sizeRange[0]<=r&&i.sizeRange[1]>=r&&(t.style.width=r+"px",i.width=r,i.$emit("box-resize",r,e))},document.onmouseup=function(){localStorage.setItem("horizontalSize",i.width),document.onmousemove=null,document.onmouseup=null}}):(t.style.height=(localStorage.getItem("verticalSize")||this.size)+"px",e.onmousedown=function(e){var s=t.offsetHeight,n=e.clientY;document.onmousemove=function(a){var o=a.clientY,r=s-(o-n);i.sizeRange[0]<=r&&i.sizeRange[1]>=r&&(t.style.height=r+"px",i.height=r,i.$emit("box-resize",r,e))},document.onmouseup=function(){localStorage.setItem("verticalSize",i.height),document.onmousemove=null,document.onmouseup=null}})}}},$t=Ft,Vt=(i("c4d7"),v($t,jt,Bt,!1,null,"3dd7fdc8",null)),Ht=Vt.exports,Kt={name:"lemonMessageBasic",inject:{IMUI:{from:"IMUI",default:function(){return this}}},props:{contextmenu:Array,message:{type:Object,default:function(){return{}}},timeFormat:{type:Function,default:function(){return""}},reverse:Boolean,hideName:Boolean,hideTime:Boolean},data:function(){return{}},render:function(){var t=this,e=arguments[0],i=this.message,s=i.fromUser,n=i.status,a=i.sendTime,o=1==this.hideName&&1==this.hideTime;return e("div",{class:["lemon-message","lemon-message--status-".concat(n),{"lemon-message--reverse":this.reverse,"lemon-message--hide-title":o}]},[e("div",{class:"lemon-message__avatar"},[e("lemon-avatar",{attrs:{size:36,shape:"square",src:s.avatar},on:{click:function(e){t._emitClick(e,"avatar")}}})]),e("div",{class:"lemon-message__inner"},[e("div",{class:"lemon-message__title"},[0==this.hideName&&e("span",{on:{click:function(e){t._emitClick(e,"displayName")}}},[s.displayName]),e("span",{class:"lemon-message__tag"},[tt(this.IMUI.$scopedSlots["message-tag"],null,this.message)]),0==this.hideTime&&e("span",{class:"lemon-message__time",on:{click:function(e){t._emitClick(e,"sendTime")}}},[this.timeFormat(a)])]),e("div",{class:"lemon-message__content-flex"},[e("div",{directives:[{name:"lemon-contextmenu",value:this.IMUI.contextmenu,modifiers:{message:!0}}],class:"lemon-message__content",on:{click:function(e){t._emitClick(e,"content")}}},[tt(this.$scopedSlots["content"],null,this.message)]),e("div",{class:"lemon-message__content-after"},[tt(this.IMUI.$scopedSlots["message-after"],null,this.message)]),e("div",{class:"lemon-message__status",on:{click:function(e){t._emitClick(e,"status")}}},[e("i",{class:"lemon-icon-loading lemonani-spin"}),e("i",{class:"lemon-icon-prompt",attrs:{title:"重发消息"},style:{color:"#ff2525",cursor:"pointer"}})])])])])},created:function(){},mounted:function(){},computed:{},watch:{},methods:{_emitClick:function(t,e){this.IMUI.$emit("message-click",t,e,this.message,this.IMUI)}}},zt=Kt,Gt=(i("628d"),v(zt,wt,At,!1,null,null,null)),qt=Gt.exports;function Qt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function Yt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Qt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Jt,Wt,Zt={name:"lemonMessageText",inheritAttrs:!1,inject:["IMUI"],render:function(){var t=this,e=arguments[0];return e("lemon-message-basic",Y()([{class:"lemon-message-text"},{props:Yt({},this.$attrs)},{scopedSlots:{content:function(i){var s=t.IMUI.emojiNameToImage(i.content);return e("span",Y()([{},{domProps:{innerHTML:s}}]))}}}]))}},Xt=Zt,te=(i("260f"),v(Xt,Jt,Wt,!1,null,null,null)),ee=te.exports;function ie(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function se(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ie(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ie(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ne,ae,oe={name:"lemonMessageContact",inheritAttrs:!1,inject:["IMUI"],render:function(){var t=this,e=arguments[0];return e("lemon-message-basic",Y()([{class:"lemon-message-contact"},{props:se({},this.$attrs)},{scopedSlots:{content:function(i){const{avatar:s,displayName:n,id:a}=i.extends||{},o=e("img",{attrs:{src:s||"",class:"contact-avatar"}}),r=e("span",{class:"contact-name"},[n||"未知用户"]);return e("div",{on:{click:function(e){t._emitClick(e,"avatar",i.extends)}},class:"message-contact-container"},[e("div",{class:"contact-wrapper"},[e("span"," "),o,e("span",{class:"name-spacer"}," "),r]),e("span",{class:"name-spacer1"},"个人名片")])}}}]))},methods:{_emitClick:function(t,e,i){let s={from_user:i.id,fromUser:{id:i.id}};this.IMUI.$emit("message-click",t,e,s,this.IMUI)}}},re=oe,ce=(i("260f"),v(re,ne,ae,!1,null,null,null)),le=ce.exports;function de(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function ue(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?de(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):de(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var he,pe,me={name:"lemonMessageLocation",inheritAttrs:!1,inject:["IMUI"],render:function(){var t=this,e=arguments[0];return e("lemon-message-basic",Y()([{class:"lemon-message-contact"},{props:ue({},this.$attrs)},{scopedSlots:{content:function(i){const{address:s,name:n}=i.extends||{},a=(e("img",{attrs:{src:q||"",class:"contact-avatar"}}),e("span",{class:"contact-name"},[n||"未知用户"]));return e("div",{on:{click:function(e){t._emitClick(e,"avatar",i.extends)}},class:"message-contact-container"},[e("div",{class:"contact_position"},[e("span","[位置]"),e("span",{class:"name-spacer"}," "),a]),e("span",{class:"name-spacer1"},s)])}}}]))},methods:{_emitClick:function(t,e,i){let s={latitude:i.latitude,longitude:i.longitude,name:i.name};this.IMUI.$emit("message-position",t,e,s,this.IMUI)}}},ge=me,fe=(i("260f"),v(ge,he,pe,!1,null,null,null)),ve=fe.exports;function be(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function ye(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?be(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):be(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Ce,xe,Ee={name:"lemonMessageImage",inheritAttrs:!1,render:function(){var t=arguments[0];return t("lemon-message-basic",Y()([{class:"lemon-message-image"},{props:ye({},this.$attrs)},{scopedSlots:{content:function(e){return t("img",{attrs:{src:e.content}})}}}]))}},we=Ee,Ae=(i("e61c"),v(we,Ce,xe,!1,null,null,null)),ke=Ae.exports;function Ie(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function _e(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ie(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ie(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Se,Te,De,Me,Le={name:"lemonMessageFile",inheritAttrs:!1,render:function(){var t=arguments[0];return t("lemon-message-basic",Y()([{class:"lemon-message-file"},{props:_e({},this.$attrs)},{scopedSlots:{content:function(e){return[t("div",{class:"lemon-message-file__inner"},[t("p",{class:"lemon-message-file__name"},[e.fileName]),t("p",{class:"lemon-message-file__byte"},[ot(e.fileSize)])]),t("div",{class:"lemon-message-file__sfx"},[t("i",{class:"lemon-icon-attah"})])]}}}]))}},Ne=Le,Oe=(i("85ff"),v(Ne,Se,Te,!1,null,null,null)),Pe=Oe.exports,Ue={name:"lemonMessageEvent",inheritAttrs:!1,inject:["IMUI"],render:function(){var t=this,e=arguments[0],i=this.$attrs.message.content;return e("div",{class:"lemon-message lemon-message-event"},[e("span",{class:"lemon-message-event__content",on:{click:function(e){return t._emitClick(e,"content")}}},[i])])},methods:{_emitClick:function(t,e){this.IMUI.$emit("message-click",t,e,this.$attrs.message,this.IMUI)}}},Re=Ue,je=(i("dcc3"),v(Re,De,Me,!1,null,null,null)),Be=je.exports;function Fe(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function $e(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Fe(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Fe(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Ve,He,Ke={name:"lemonMessageEmoji",inheritAttrs:!1,render:function(){var t=arguments[0];return t("lemon-message-basic",Y()([{class:"lemon-message-emoji"},{props:$e({},this.$attrs)},{scopedSlots:{content:function(e){return t("img",{attrs:{src:e.content}})}}}]))}},ze=Ke,Ge=(i("718e"),v(ze,Ve,He,!1,null,null,null)),qe=Ge.exports;i("20d6");function Qe(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=Array(e);i<e;i++)s[i]=t[i];return s}function Ye(t){if(Array.isArray(t))return Qe(t)}function Je(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function We(t,e){if(t){if("string"==typeof t)return Qe(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Qe(t,e):void 0}}function Ze(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Xe(t){return Ye(t)||Je(t)||We(t)||Ze()}i("f559"),i("f751"),i("7514"),i("55dd");var ti="messages",ei="contacts",ii=[ti,ei],si={sendText:"发 送",sendMsg:"发送消息",sendImage:"发送图片",imageUpload:"图片上传",fileUpload:"文件上传",noneMsg:"暂无更多消息",moreMsg:"查看更多",sendAgain:"重新发送",chat:"聊天",contact:"通讯录",image:"图片",file:"文件",emoji:"表情",emojiDiy:"自定义表情",noMsgType:"暂时不支持此消息",eventNotice:"通知",checkAllLabel:"全选",confirmLabel:"确定",cancelLabel:"取消",wrapKey:"使用Ctrl + enter换行",sendKey:"按Enter发送",draft:"草稿",atTitle:"选择要@的人",searchPlaceholder:"搜素人员名称",searchEmptyLabel:"没有匹配到任何结果",userTagTitle:"成员列表",groupUserTitle:"群成员",callEveryLabel:"所有人",checkLabel:"多选",emptyLabel:"暂无数据"},ni=JSON.parse(localStorage.getItem("i18n"));ni||(ni=si);var ai={file:function(t){return"["+ni.file+"]"},image:function(t){return"["+ni.image+"]"},emoji:function(t){return"["+ni.emojiDiy+"]"},text:function(t){return this.emojiNameToImage(at(t.content))},contact:function(t){return this.emojiNameToImage(at(t.content))},location:function(t){return this.emojiNameToImage(at(t.content))},event:function(t){return"["+ni.eventNotice+"]"}};function oi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ri(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Z(s.key),s)}}function ci(t,e,i){return e&&ri(t.prototype,e),i&&ri(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}var li=function(){function t(){oi(this,t),this.table={}}return ci(t,[{key:"get",value:function(t){return t?this.table[t]:this.table}},{key:"set",value:function(t,e){this.table[t]=e}},{key:"remove",value:function(t){t?delete this.table[t]:this.table={}}},{key:"has",value:function(t){return!!this.table[t]}}])}();function di(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,s)}return i}function ui(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?di(Object(i),!0).forEach(function(e){X(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):di(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var hi,pi,mi={},gi={},fi=function(t){return a(t)?t:"".concat(t,"px")},vi=function(t){return t.replace("%","")/100},bi=function(){},yi={name:"LemonImui",provide:function(){return{IMUI:this}},props:{width:{type:[String,Number],default:850},height:{type:[String,Number],default:580},theme:{type:String,default:"default"},simple:{type:Boolean,default:!1},loadingText:[String,Function],loadendText:[String,Function],messageTimeFormat:Function,contactTimeFormat:Function,hideDrawer:{type:Boolean,default:!0},hideMenuAvatar:Boolean,hideMenu:Boolean,hideMessageName:Boolean,hideMessageTime:Boolean,sendKey:Function,wrapKey:Function,sendText:String,contextmenu:Array,contactContextmenu:Array,avatarCricle:Boolean,user:{type:Object,default:function(){return{}}},latelyContacts:{type:Function,default:function(t){var e=t.filter(function(t){return!r(t.lastContent)});return e.sort(function(t,e){return e.lastSendTime-t.lastSendTime}),e}}},data:function(){return this.CacheContactContainer=new li,this.CacheMenuContainer=new li,this.CacheMessageLoaded=new li,this.CacheDraft=new li,{drawerVisible:!this.hideDrawer,currentContactId:null,currentContactIdSidebarContact:null,currentMessages:[],activeSidebar:ti,contacts:[],menus:[],i18n:{},editorTools:[{name:"emoji"},{name:"uploadFile"},{name:"uploadImage"}]}},render:function(){return this._renderWrapper([this._renderMenu(),this._renderSidebarMessage(),this._renderSidebarContact(),this._renderContainer(),this._renderDrawer()])},created:function(){this.initMenus(),this.initI18n()},mounted:function(){var t=d(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.$nextTick();case 2:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),computed:{currentContact:function(){var t=this;return this.contacts.find(function(e){return e.id==t.currentContactId})||{}},currentContactSidebarContact:function(){var t=this;return this.contacts.find(function(e){return e.id==t.currentContactIdSidebarContact})||{}},currentMenu:function(){var t=this;return this.menus.find(function(e){return e.name==t.activeSidebar})||{}},currentIsDefSidebar:function(){return ii.includes(this.activeSidebar)},lastMessages:function(){return this.latelyContacts(this.contacts)}},watch:{activeSidebar:function(){}},methods:{_menuIsContacts:function(){return this.activeSidebar==ei},_menuIsMessages:function(){return this.activeSidebar==ti},_createMessage:function(t){return ui(ui({},{id:rt(),type:"text",status:"going",sendTime:(new Date).getTime(),toContactId:this.currentContactId,fromUser:ui({},this.user)}),t)},appendMessage:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i="+1",s=mi[t.toContactId];if("event"!=t.type&&this.user.id!=t.fromUser.id||(i="+0"),void 0===s)this.updateContact({id:t.toContactId,unread:i,lastSendTime:t.sendTime,lastContent:this.lastContentRender(t)});else{var n=s.some(function(e){var i=e.id;return i==t.id});if(n)return;this._addMessage(t,t.toContactId,1);var a={id:t.toContactId,lastContent:this.lastContentRender(t),lastSendTime:t.sendTime};t.toContactId==this.currentContactId?(1==e&&this.messageViewToBottom(),this.CacheDraft.remove(t.toContactId)):a.unread=i,this.updateContact(a)}},_emitSend:function(t,e,i){var s=this;this.$emit("send",t,function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{status:"succeed"};e(),s.updateMessage(Object.assign(t,i))},i)},_handleSend:function(t){var e=this,i=this.$refs.editor.chatArea.getCallUserList(),s=this.$refs.editor.curEmoji.file_id?this.$refs.editor.curEmoji.file_id:0,n=s?"emoji":"text";this.$refs.editor.curEmoji="";var a=i.map(function(t){return t.id}),o=this._createMessage({content:t,at:a,file_id:s,type:n});this.appendMessage(o,!0),this._emitSend(o,function(){e.updateContact({id:o.toContactId,lastContent:e.lastContentRender(o),lastSendTime:o.sendTime}),e.CacheDraft.remove(o.toContactId)})},_handleUpload:function(t){var e,i=this,s=["image/gif","image/jpeg","image/png"];e=s.includes(t.type)?{type:"image",content:URL.createObjectURL(t)}:{type:"file",fileSize:t.size,fileName:t.name,content:""};var n=this._createMessage(e);this.appendMessage(n,!0),this._emitSend(n,function(){i.updateContact({id:n.toContactId,lastContent:i.lastContentRender(n),lastSendTime:n.sendTime})},t)},_emitPullMessages:function(t){var e=this;this._changeContactLock=!0,this.$emit("pull-messages",this.currentContact,function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e._addMessage(i,e.currentContactId,0),e.CacheMessageLoaded.set(e.currentContactId,s),1==s&&e.$refs.messages.loaded(),e.updateCurrentMessages(),e._changeContactLock=!1,t(s)},this)},callIsBottom:function(t){this.$emit("is-bottom",t)},clearCacheContainer:function(t){this.CacheContactContainer.remove(t),this.CacheMenuContainer.remove(t)},_renderWrapper:function(t){var e=this.$createElement;return e("div",{style:{width:fi(this.width),height:fi(this.height)},ref:"wrapper",class:["lemon-wrapper","lemon-wrapper--theme-".concat(this.theme),{"lemon-wrapper--simple":this.simple},this.drawerVisible&&"lemon-wrapper--drawer-show"]},[t])},_renderMenu:function(){var t=this,e=this.$createElement,i=this._renderMenuItem();return e("div",{class:"lemon-menu",directives:[{name:"show",value:!this.hideMenu}]},[e("lemon-avatar",{directives:[{name:"show",value:!this.hideMenuAvatar}],on:{click:function(e){t.$emit("menu-avatar-click",e)}},class:"lemon-menu__avatar",attrs:{src:this.user.avatar}}),i.top,this.$slots.menu,e("div",{class:"lemon-menu__bottom"},[this.$slots["menu-bottom"],i.bottom])])},_renderMenuAvatar:function(){},_renderMenuItem:function(){var t=this,e=this.$createElement,i=[],s=[];return this.menus.forEach(function(n){var a=n.name,o=n.title,r=n.unread,c=n.render,l=n.click,d=e("div",{class:["lemon-menu__item",{"lemon-menu__item--active":t.activeSidebar==a}],on:{click:function(){nt(l,function(){a&&t.changeMenu(a)})}},attrs:{title:o}},[e("lemon-badge",{attrs:{count:r}},[c(n)])]);!0===n.isBottom?s.push(d):i.push(d)}),{top:i,bottom:s}},_renderSidebarMessage:function(){var t=this;return this._renderSidebar([tt(this.$scopedSlots["sidebar-message-top"],null,this),this.lastMessages.map(function(e){return t._renderContact({contact:e,timeFormat:t.contactTimeFormat},function(){return t.changeContact(e.id)},t.$scopedSlots["sidebar-message"])})],ti,tt(this.$scopedSlots["sidebar-message-fixedtop"],null,this))},_renderContact:function(t,e,i){var s=this,n=this.$createElement,a=t.contact,o=a.click,r=a.renderContainer,c=a.id,l=function(){nt(o,function(){e(),s._customContainerReady(r,s.CacheContactContainer,c)})};return n("lemon-contact",Y()([{class:{"lemon-contact--active":this.activeSidebar==ei?this.currentContactIdSidebarContact==t.contact.id:this.currentContactId==t.contact.id},directives:[{name:"lemon-contextmenu",value:this.contactContextmenu,modifiers:{contact:!0}}]},{props:t},{on:{click:l},scopedSlots:{default:i}}]))},_renderSidebarContact:function(){var t,e=this,i=this.$createElement;return this._renderSidebar([tt(this.$scopedSlots["sidebar-contact-top"],null,this),this.contacts.map(function(s){if(s.index){s.index=s.index.replace(/\[[0-9]*\]/,"");var n=[s.index!==t&&i("p",{class:"lemon-sidebar__label"},[s.index]),e._renderContact({contact:s,simple:!0},function(){e.changeContact(s.id)},e.$scopedSlots["sidebar-contact"])];return t=s.index,n}})],ei,tt(this.$scopedSlots["sidebar-contact-fixedtop"],null,this))},_renderSidebar:function(t,e,i){var s=this.$createElement;return s("lemon-resize",{attrs:{direction:"horizontal"},class:"lemon-sidebar",on:{"box-resize":this.boxResize,scroll:this._handleSidebarScroll},directives:[{name:"show",value:this.activeSidebar==e}]},[s("div",{class:"lemon-sidebar__fixed-top"},[i]),s("div",{class:"lemon-sidebar__scroll"},[t])])},_renderDrawer:function(){var t=this.$createElement;return this._menuIsMessages()&&this.currentContactId?t("div",{class:"lemon-drawer",ref:"drawer"},[bi(this.currentContact),tt(this.$scopedSlots.drawer,"",this.currentContact)]):""},_isContactContainerCache:function(t){return t.startsWith("contact#")},_renderContainer:function(){var t=this,e=this.$createElement,i=[],s="lemon-container",n=this.activeSidebar==ei?this.currentContactSidebarContact:this.currentContact,a=!0;for(var o in this.CacheContactContainer.get()){var c=n.id==o&&this.currentIsDefSidebar;c&&(a=!c),i.push(e("div",{class:s,directives:[{name:"show",value:c}]},[this.CacheContactContainer.get(o)]))}for(var l in this.CacheMenuContainer.get())i.push(e("div",{class:s,directives:[{name:"show",value:this.activeSidebar==l&&!this.currentIsDefSidebar}]},[this.CacheMenuContainer.get(l)]));return i.push(e("div",{class:s,directives:[{name:"show",value:this._menuIsMessages()&&a&&n.id}]},[e("div",{class:"lemon-container__title"},[tt(this.$scopedSlots["message-title"],e("div",{class:"lemon-container__displayname"},[n.displayName]),n)]),e("div",{class:"lemon-vessel"},[e("div",{class:"lemon-vessel__left"},[e("lemon-messages",{ref:"messages",attrs:{"loading-text":this.loadingText,"loadend-text":this.loadendText,"hide-time":this.hideMessageTime,"hide-name":this.hideMessageName,"time-format":this.messageTimeFormat,"reverse-user-id":this.user.id,messages:this.currentMessages},on:{"reach-top":this._emitPullMessages,"is-bottom":this.callIsBottom}}),e("lemon-editor",{ref:"editor",attrs:{tools:this.editorTools,sendText:this.sendText,sendKey:this.sendKey,wrapKey:this.wrapKey},on:{send:this._handleSend,upload:this._handleUpload}})]),e("div",{class:"lemon-vessel__right"},[tt(this.$scopedSlots["message-side"],null,n)])])])),i.push(e("div",{class:s,directives:[{name:"show",value:!n.id&&this.currentIsDefSidebar}]},[this.$slots.cover])),i.push(e("div",{class:s,directives:[{name:"show",value:this._menuIsContacts()&&a&&n.id}]},[tt(this.$scopedSlots["contact-info"],e("div",{class:"lemon-contact-info"},[e("lemon-avatar",{attrs:{src:n.avatar,size:90}}),e("h4",[n.displayName]),e("lemon-button",{on:{click:function(){r(n.lastContent)&&t.updateContact({id:n.id,lastContent:" "}),t.changeContact(n.id,ti)}}},[this.i18n.sendMsg])]),n)])),i},_handleSidebarScroll:function(){M.hide()},_addContact:function(t,e){var i={0:"unshift",1:"push"}[e];this.contacts[i](t)},_addMessage:function(t,e,i){var s,n={0:"unshift",1:"push"}[i];Array.isArray(t)||(t=[t]),mi[e]=mi[e]||[],(s=mi[e])[n].apply(s,Xe(t))},setLastContentRender:function(t,e){ai[t]=e},lastContentRender:function(t){return c(ai[t.type])?ai[t.type].call(this,t):"["+this.i18n.noMsgType+"]"},emojiNameToImage:function(t){return t.replace(/\[!(\w+)\]/gi,function(t,e){var i=e;return gi[i]?'<img emoji-name="'.concat(e,'" src="').concat(gi[i],'" />'):"[!".concat(e,"]")})},emojiImageToName:function(t){return t.replace(/<img emoji-name=\"([^\"]*?)\" [^>]*>/gi,"[!$1]")},updateCurrentMessages:function(){mi[this.currentContactId]||(mi[this.currentContactId]=[]),this.currentMessages=mi[this.currentContactId]},messageViewToBottom:function(){this.$refs.messages.scrollToBottom()},setDraft:function(t,e){if(r(t)||r(e))return!1;var i=this.findContact(t),s=i.lastContent;if(r(i))return!1;this.CacheDraft.has(t)&&(s=this.CacheDraft.get(t).lastContent),this.CacheDraft.set(t,{editorValue:e,lastContent:s}),this.updateContact({id:t,lastContent:'<span style="color:red;">['.concat(this.i18n.draft,"]</span><span>").concat(this.lastContentRender({type:"text",content:e}),"</span>")})},clearDraft:function(t){var e=this.CacheDraft.get(t);if(e){var i=this.findContact(t).lastContent;0===i.indexOf('<span style="color:red;">['+this.i18n.draft+"]</span>")&&this.updateContact({id:t,lastContent:e.lastContent}),this.CacheDraft.remove(t)}},changeContact:function(){var t=d(regeneratorRuntime.mark(function t(e,i){var s,n,a,o=this;return regeneratorRuntime.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(!i){t.next=4;break}this.changeMenu(i),t.next=6;break;case 4:if(!(this._changeContactLock||this.activeSidebar==ti&&this.currentContactId==e||this.activeSidebar==ei&&this.currentContactIdSidebarContact==e)){t.next=6;break}return t.abrupt("return",!1);case 6:if(this.currentContactId&&(console.log("🚀 ~ changeContact ~ this.currentContactId:",this.currentContactId),s=this.$refs.editor.chatArea.getHtml({needUserId:!0}),n=this.$refs.editor.chatArea.getText(),n?(this.setDraft(this.currentContactId,s),this.setEditorValue()):this.clearDraft(this.currentContactId)),this.activeSidebar==ei?this.currentContactIdSidebarContact=e:this.currentContactId=e,this.currentContactId){t.next=10;break}return t.abrupt("return",!1);case 10:if(this.$emit("change-contact",this.currentContact,this),!c(this.currentContact.renderContainer)&&this.activeSidebar!=ei){t.next=13;break}return t.abrupt("return");case 13:a=this.CacheDraft.get(e),a&&(this.$refs.editor.chatArea.reverseAnalysis(a.editorValue),this.$refs.editor._checkSubmitDisabled()),this.CacheMessageLoaded.has(e)?this.$refs.messages.loaded():this.$refs.messages.resetLoadState(),mi[e]?setTimeout(function(){o.updateCurrentMessages(),o.messageViewToBottom()},0):(this.updateCurrentMessages(),this._emitPullMessages(function(t){o.messageViewToBottom()}));case 17:case"end":return t.stop()}},t,this)}));function e(e,i){return t.apply(this,arguments)}return e}(),removeMessage:function(t){var e=this.findMessage(t);if(!e)return!1;var i=mi[e.toContactId]?mi[e.toContactId]:mi[e.from_user],s=i.findIndex(function(e){var i=e.id;return i==t});return i.splice(s,1),!0},updateMessage:function(t){if(!t.id)return!1;var e=this.findMessage(t.id);return!!e&&(e=Object.assign(e,t,{toContactId:e.toContactId}),!0)},forceUpdateMessage:function(t){if(t){var e=this.$refs.messages.$refs.message;if(e){var i=e.find(function(e){return e.$attrs.message.id==t});i&&i.$forceUpdate()}}else this.$refs.messages.$forceUpdate()},_customContainerReady:function(t,e,i){c(t)&&!e.has(i)&&e.set(i,t.call(this))},changeMenu:function(t){this.$emit("change-menu",t),this.activeSidebar=t},initEmoji:function(t){var e=[];this.$refs.editor.initEmoji(t),t[0].label?t.forEach(function(t){var i;(i=e).push.apply(i,Xe(t.children))}):e=t,e.forEach(function(t){var e=t.name,i=t.src;return gi[e]=i})},initI18n:function(t){var e=si;if(t)e=Object.assign(si,t);else{var i=JSON.parse(localStorage.getItem("i18n"));i&&(e=i)}localStorage.setItem("i18n",JSON.stringify(e)),this.i18n=e},initEditorTools:function(t){this.editorTools=t},initMenus:function(t){var e=this,i=this.$createElement,s=[{name:ti,title:this.i18n.chat,unread:0,click:null,render:function(t){return i("i",{class:"lemon-icon-message"})},isBottom:!1},{name:ei,title:this.i18n.contact,unread:0,click:null,render:function(t){return i("i",{class:"lemon-icon-addressbook"})},isBottom:!1}],n=[];if(Array.isArray(t)){var a={messages:0,contacts:1},o=Object.keys(a);n=t.map(function(t){return o.includes(t.name)?ui(ui(ui({},s[a[t.name]]),t),{renderContainer:null}):(t.renderContainer&&e._customContainerReady(t.renderContainer,e.CacheMenuContainer,t.name),t)})}else n=s;this.menus=n},initContacts:function(t){this.contacts=t,this.sortContacts()},sortContacts:function(){this.contacts.sort(function(t,e){if(t.index)return t.index.localeCompare(e.index)})},appendContact:function(t){return r(t.id)||r(t.displayName)?(console.error("id | displayName cant be empty"),!1):(this.hasContact(t.id)||this.contacts.push(Object.assign({id:"",displayName:"",avatar:"",index:"",unread:0,lastSendTime:"",lastContent:""},t)),!0)},removeContact:function(t){var e=this.findContactIndexById(t);return-1!==e&&(this.contacts.splice(e,1),this.CacheDraft.remove(t),this.CacheMessageLoaded.remove(t),!0)},updateContact:function(t){var e=t.id;delete t.id;var i=this.findContactIndexById(e);if(-1!==i){var s=t.unread;a(s)&&(0!==s.indexOf("+")&&0!==s.indexOf("-")||(t.unread=parseInt(s)+parseInt(this.contacts[i].unread))),this.$set(this.contacts,i,ui(ui({},this.contacts[i]),t))}},findContactIndexById:function(t){return this.contacts.findIndex(function(e){return e.id==t})},hasContact:function(t){return-1!==this.findContactIndexById(t)},findMessage:function(t){for(var e in mi){var i=mi[e].find(function(e){var i=e.id;return i==t});if(i)return i}},findContact:function(t){return this.getContacts().find(function(e){var i=e.id;return i==t})},getContacts:function(){return this.contacts},getCurrentContact:function(){return this.currentContact},getCurrentMessages:function(){return this.currentMessages},setEditorValue:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!a(t))return!1;this.$refs.editor.setValue(this.emojiNameToImage(t))},getEditorValue:function(){return this.$refs.editor.getFormatValue()},clearMessages:function(t){return t?(delete mi[t],this.CacheMessageLoaded.remove(t),this.CacheDraft.remove(t)):(mi={},this.CacheMessageLoaded.remove(),this.CacheDraft.remove()),!0},getMessages:function(t){return(t?mi[t]:mi)||[]},changeDrawer:function(t){this.drawerVisible=!this.drawerVisible,1==this.drawerVisible&&this.openDrawer(t)},openDrawer:function(t){bi=c(t)?t:t.render||new Function;var e=this.$refs.wrapper.clientWidth,i=this.$refs.wrapper.clientHeight,s=t.width||200,n=t.height||i,o=t.offsetX||0,r=t.offsetY||0,l=t.position||"right";a(s)&&(s=e*vi(s)),a(n)&&(n=i*vi(n)),a(o)&&(o=e*vi(o)),a(r)&&(r=i*vi(r)),this.$refs.drawer.style.width="".concat(s,"px"),this.$refs.drawer.style.height="".concat(n,"px");var d=0,u=0,h="";"right"==l?d=e:"rightInside"==l?(d=e-s,h="-15px 0 16px -14px rgba(0,0,0,0.08)"):"center"==l&&(d=e/2-s/2,u=i/2-n/2,h="0 0 20px rgba(0,0,0,0.08)"),d+=o,u+=r+-1,this.$refs.drawer.style.top="".concat(u,"px"),this.$refs.drawer.style.left="".concat(d,"px"),this.$refs.drawer.style.boxShadow=h,this.drawerVisible=!0},boxResize:function(t,e){this.$emit("sidebar-resize",t,e)},closeDrawer:function(){this.drawerVisible=!1},setAtUserList:function(t,e){this.$refs.editor.chatArea.updateConfig({userList:t,needCallEvery:e})},setUserTag:function(t){this.$refs.editor.chatArea.setUserTag(t),this.$refs.editor._checkSubmitDisabled()},getChatArea:function(){return this.$refs.editor.chatArea}}},Ci=yi,xi=(i("3d91"),v(Ci,hi,pi,!1,null,null,null)),Ei=xi.exports,wi=(i("6a2b"),"2.1.0"),Ai=[Ei,pt,Rt,Lt,q,H,B,C,P,Ht,qt,ee,ke,Pe,Be,qe,le,ve],ki=function(t){t.directive("LemonContextmenu",M),Ai.forEach(function(e){t.component(e.name,e)})};"undefined"!==typeof window&&window.Vue&&ki(window.Vue);var Ii={version:wi,install:ki};e["default"]=Ii},fdef:function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"}})})},1134:function(t){"use strict";t.exports="data:image/png;base64,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"},1735:function(t,e,i){"use strict";function s(t){let e=new Array(" B"," KB"," MB"," GB"," TB"),i=t+"B";for(let s=0;t>=1024&&s<4;s++)t/=1024,i=t.toFixed(2)+e[s+1];return i}function n(t){var e="https://file.lcoce.com/ext/",i=t.split("."),s=i[i.length-1],n=s.toUpperCase(),a=["jpg","jpeg","png","bmp","gif","pdf","mp3","wav","wmv","amr","mp4","3gp","avi","m2v","mkv","mov","webp","ppt","pptx","doc","docx","xls","xlsx","pdf"];return a.includes(n)?e+n+".png":e+"icon/document.svg"}function a(t,e){let i=document.createElement("a"),s=t.split(".").pop(),n=["jpg","jpeg","png","bmp","gif","pdf","mp3","wav","wmv","amr","mp4","3gp","avi","m2v","mkv","mov","webp"];-1!==n.indexOf(s)?i.download=e||"pic":i.download=e||"file",i.href=t,i.click()}i.d(e,{KU:function(){return s},Lm:function(){return n},RG:function(){return a}})},1823:function(t,e,i){"use strict";t.exports=i.p+"assets/media/guaduan.c0b3124b.mp3"},1981:function(t,e,i){"use strict";i.d(e,{DC:function(){return r},Go:function(){return s},Im:function(){return u},cZ:function(){return l},dj:function(){return h},iq:function(){return d},l:function(){return n},lU:function(){return o},mD:function(){return a},p6:function(){return c}});i(4114),i(6573),i(8100),i(7936),i(8111),i(1701),i(9577),i(4979);function s(t){return JSON.parse(JSON.stringify(t))}function n(t,e,i){if("object"!==typeof t)return!1;for(var s=[],n=0;t.length>n;n++)if("object"==typeof e)for(var a=0;e.length>a;a++){var o=e[a],r=t[n][o];if(-1!=r.indexOf(i)){s.push(t[n]);break}}else{r=t[n][e];-1!=r.indexOf(i)&&s.push(t[n])}return s}function a(t,e,i){i="undefined"!==typeof i&&i;for(var s=[],n=0;n<t.length;n++)s.push(t[n][e]);return!0===i?s.join(","):s}function o(t,e,i){for(var s=0;s<t.length;s++)t[s]["disabled"]=!1,t[s][e]==i&&(t[s]["disabled"]=!0);return t}function r(t){const e=new Date,i=new Date(t),s=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(s-864e5),a=new Date(s-24*(s.getDay()-1)*60*60*1e3),o=new Date(e.getFullYear(),0,1);if(i>=s)return c("H:i",t/1e3);if(i>=n&&i<s)return"昨天";if(i>=a&&i<n){const t=["周日","周一","周二","周三","周四","周五","周六"],e=t[i.getDay()];return e}return c(i>=o&&i<a?"m-d":"Y-m-d",t/1e3)}function c(t,e){var i=e?new Date(1e3*e):new Date,s=function(t,e){return(t+="").length<e?new Array(++e-t.length).join("0")+t:t},n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"},o=["","January","February","March","April","May","June","July","August","September","October","November","December"],r={d:function(){return s(r.j(),2)},D:function(){return r.l().substr(0,3)},j:function(){return i.getDate()},l:function(){return n[r.w()]},N:function(){return r.w()+1},S:function(){return a[r.j()]?a[r.j()]:"th"},w:function(){return i.getDay()},z:function(){return(i-new Date(i.getFullYear()+"/1/1"))/864e5|0},W:function(){var t,e=r.z(),s=364+r.L()-e,n=(new Date(i.getFullYear()+"/1/1").getDay()||7)-1;return s<=2&&(i.getDay()||7)-1<=2-s?1:e<=2&&n>=4&&e>=6-n?(t=new Date(i.getFullYear()-1+"/12/31"),c("W",Math.round(t.getTime()/1e3))):1+(n<=3?(e+n)/7:(e-(7-n))/7)|0},F:function(){return o[r.n()]},m:function(){return s(r.n(),2)},M:function(){return r.F().substr(0,3)},n:function(){return i.getMonth()+1},t:function(){var t;return 2===(t=i.getMonth()+1)?28+r.L():1&t&&t<8||!(1&t)&&t>7?31:30},L:function(){var t=r.Y();return 3&t||!(t%100)&&t%400?0:1},Y:function(){return i.getFullYear()},y:function(){return(i.getFullYear()+"").slice(2)},a:function(){return i.getHours()>11?"pm":"am"},A:function(){return r.a().toUpperCase()},B:function(){var t=60*(i.getTimezoneOffset()+60),e=3600*i.getHours()+60*i.getMinutes()+i.getSeconds()+t,s=Math.floor(e/86.4);return s>1e3&&(s-=1e3),s<0&&(s+=1e3),1===String(s).length&&(s="00"+s),2===String(s).length&&(s="0"+s),s},g:function(){return i.getHours()%12||12},G:function(){return i.getHours()},h:function(){return s(r.g(),2)},H:function(){return s(i.getHours(),2)},i:function(){return s(i.getMinutes(),2)},s:function(){return s(i.getSeconds(),2)},O:function(){var t=s(Math.abs(i.getTimezoneOffset()/60*100),4);return t=i.getTimezoneOffset()>0?"-"+t:"+"+t,t},P:function(){var t=r.O();return t.substr(0,3)+":"+t.substr(3,2)},c:function(){return r.Y()+"-"+r.m()+"-"+r.d()+"T"+r.h()+":"+r.i()+":"+r.s()+r.P()},U:function(){return Math.round(i.getTime()/1e3)}};let l="";return t.replace(/[\\]?([a-zA-Z])/g,function(t,e){return l=t!==e?e:r[e]?r[e]():e,l})}function l(){var t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)});return e}function d(t,e){let i="[暂不支持的消息类型]";switch(t){case"text":i="[文本]";break;case"image":i="[图片]";break;case"voice":i="[语音]";break;case"video":i="[视频]";break;case"file":i="[文件]";break;case"location":i="[位置]";break;case"contact":i="[个人名片]";break;case"emoji":i="[表情]";break;case"webrtc":i=e?"[正在请求与您视频通话]":"[正在请求与您语音通话]";break}return i}function u(t){return null===t||(void 0===t||("[object Array]"===Object.prototype.toString.call(t)?0===t.length:"[object Object]"===Object.prototype.toString.call(t)?0===Object.keys(t).length:"string"===typeof t&&""===t.trim()))}function h(t){return t+="",t.includes(".")||(t+="."),t.replace(/(\d)(?=(\d{3})+\.)/g,function(t,e){return e+","}).replace(/\.$/,"")}},2343:function(t,e,i){"use strict";var s=i(6674),n=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},a=[],o=(i(4114),i(3214)),r=i.n(o),c={name:"App",data(){return{msg:"Welcome to Your Vue.js App",getSystemInfoInterval:null}},created(){let t=r().get("UserInfo"),e=r().get("globalConfig");e&&(document.title=e.sysInfo.name,this.$store.commit("setGlobalConfig",e)),t&&this.$store.commit("SET_USERINFO",t),this.getSystemInfo()},methods:{getSystemInfo(){this.$store.dispatch("getSystemInfo").then(t=>{if(0==t.data.sysInfo.state&&"/404"!==this.$router.currentRoute.path)return this.$router.push({path:"/404",query:{msg:t.data.sysInfo.closeTips}}),void(this.getSystemInfoInterval=null);"/404"!=this.$router.currentRoute.path||(this.getSystemInfoInterval=null)})}},watch:{"$store.state.globalConfig"(t){document.title=t.sysInfo.name}}},l=c,d=i(1656),u=(0,d.A)(l,n,a,!1,null,null,null),h=u.exports,p=i(9143),m=i.n(p),g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-card-box"},[e("el-container",{staticClass:"container"},[e("el-header",{staticClass:"no-padding header",attrs:{height:"180px"}},[e("div",{staticClass:"close",staticStyle:{"font-size":"15px",right:"40px",cursor:"pointer"},on:{click:t.tochatdetails}},[t._v("查看朋友圈")]),e("i",{staticClass:"close el-icon-error cur-handle",on:{click:t.closeDialog}}),e("div",{staticClass:"img-banner"}),e("div",{staticClass:"user-header"},[e("div",{staticClass:"avatar"},[e("div",{staticClass:"avatar-box"},[e("img",{attrs:{src:t.detail.avatar}})])]),e("div",{staticClass:"username"},[e("i",{staticClass:"iconfont icon-qianming"}),e("span",[t._v(t._s(t.detail.friend?t.detail.friend.nickname:t.detail.realname))])])])]),e("el-main",{staticClass:"no-padding main"},[e("div",{staticClass:"user-sign"},[e("div",{staticClass:"sign-arrow"}),e("i",{staticClass:"iconfont icon-bianji"}),e("span",[t._v(t._s(t.detail.motto||"这家伙有点懒,什么都没留下!")+" ")])]),e("div",{staticClass:"card-rows no-select"},[e("div",{staticClass:"card-row"},[e("div",{staticClass:"label"},[t._v("账号")]),e("div",[t._v(t._s(t.detail.account))])]),e("div",{staticClass:"card-row"},[e("div",{staticClass:"label"},[t._v(t._s(2==t.globalConfig.sysInfo.runMode?"昵称":"姓名"))]),e("div",[t._v(t._s(t.detail.realname))])]),t.detail.friend&&2==t.globalConfig.sysInfo.runMode?e("div",{staticClass:"card-row"},[e("div",{staticClass:"label"},[t._v("备注")]),e("div",[t._v(t._s(t.detail.friend.nickname||"未设置")+" "),e("i",{staticClass:"el-icon-edit ml-10",attrs:{title:"设置备注"},on:{click:t.setNickname}})])]):t._e(),e("div",{staticClass:"card-row"},[e("div",{staticClass:"label"},[t._v("性别")]),e("div",[t._v(t._s(t._f("sex")(t.detail.sex)))])]),e("div",{staticClass:"card-row"},[e("div",{staticClass:"label"},[t._v("邮箱")]),e("div",[t._v(t._s(t.detail.email||"未设置"))])]),parseInt(t.globalConfig.sysInfo.ipregion)&&t.isFriend?e("div",{staticClass:"card-row"},[e("div",{staticClass:"label"},[t._v("IP")]),t.detail.last_login_ip?e("div",[t._v(t._s(t.detail.last_login_ip||"未知")+" ("+t._s(t.detail.location||"未知")+")")]):e("div",[t._v("未知")])]):t._e()])]),e("el-footer",{staticClass:"footer"},[t.isFriend?e("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",round:""},on:{click:function(e){return t.openChat()}}},[t._v("发消息")]):t._e(),2!=t.globalConfig.sysInfo.runMode||t.detail.friend||t.user_id==t.userInfo.user_id?t._e():e("el-button",{staticStyle:{width:"150px"},attrs:{type:"primary",round:""},on:{click:function(e){return t.addFriend()}}},[t._v("加好友")]),t.options.isManage?e("el-button",{staticStyle:{width:"150px"},attrs:{round:""},on:{click:t.editUser}},[t._v("编辑资料")]):t._e()],1)],1),t.chatbool?e("chatdetails",{attrs:{visible:t.chatbool,userid:t.detail.user_id===t.userInfo.user_id?"":t.detail.user_id},on:{"update:visible":function(e){t.chatbool=e},closedialog:function(e){t.chatbool=e}}}):t._e()],1)},f=[],v=i(3518),b=function(){var t=this,e=t._self._c;return t.visible1?e("div",{staticClass:"modal-overlay"},[e("div",{staticClass:"modal-content"},[e("button",{staticClass:"close-btn",on:{click:t.closedialog}},[t._v("×")]),e("div",{staticStyle:{height:"500px"}},[e("el-scrollbar",{ref:"WechatMomentsscroll",staticStyle:{height:"100%"}},t._l(t.groupedList,function(i,s){return e("div",{key:i.id},[e("div",{staticClass:"year-title"},[e("div",{staticClass:"year-text"},[t._v(t._s(s)+"年")])]),t._l(i,function(i,s){return e("div",{key:i.id},[e("div",{staticStyle:{display:"flex",margin:"15px 0px",cursor:"pointer"},on:{click:function(e){return t.clickshow(i.id,i.user_id)}}},[e("div",{staticStyle:{"font-size":"18px","margin-right":"20px"}},[t._v(t._s(t.formatTime(i.create_time)))]),t._l(i.files,function(s,n){return i.files?e("div",{key:n,staticStyle:{"margin-right":"10px",cursor:"pointer"}},[1==s.type?e("div",[e("img",{staticStyle:{width:"100px",height:"100px"},attrs:{src:"http://192.168.66.16:8007"+s.src}})]):t._e(),2==s.type?e("div",{staticClass:"video-card"},[e("el-image",{staticStyle:{height:"200px"},attrs:{src:"http://192.168.66.16:8007"+s.privacy,fit:"cover"}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("i",{staticClass:"el-icon-picture-outline"})])]),e("div",{staticClass:"video-shadow"},[e("div",{staticClass:"el-icon el-icon-video-play c-white f-28 video-icon"})])],1):t._e()]):t._e()}),e("div",{staticStyle:{"word-break":"break-word",cursor:"pointer"},domProps:{innerHTML:t._s(i.content)}})],2)])})],2)}),0)],1)]),t.dialogVisible?e("fndialog",{attrs:{details:t.details,dialogVisible:t.dialogVisible},on:{dialog:function(e){t.dialogVisible=e}}}):t._e()],1):t._e()},y=[],C=(i(8111),i(8237),function(){var t=this,e=t._self._c;return t.dialogVisible?e("div",{staticClass:"modal-overlay"},[e("div",{staticClass:"modal-content"},[e("button",{staticClass:"close-btn",on:{click:t.fndialog}},[t._v("×")]),e("div",[e("el-scrollbar",{staticStyle:{height:"500px !important"}},[e("div",{staticStyle:{padding:"20px"}},[e("div",{staticStyle:{display:"flex"}},[e("div",[e("el-avatar",{staticClass:"mr-5",attrs:{src:t.detailsList.user?.avatar}})],1),e("div",[e("div",[t._v(t._s(t.detailsList.user?.nickname))]),e("div",{staticStyle:{color:"#aaaaaa","font-size":"12px"}},[t._v(t._s(t.detailsList.create_time))])])]),t.contenthtml(t.detailsList.content)?e("div",{staticClass:"chat-list-text",staticStyle:{cursor:"pointer"},domProps:{innerHTML:t._s(t.detailsList.content)},on:{click:function(e){return t.handleLink(t.detailsList.content)}}}):e("div",{staticClass:"chat-list-text",domProps:{innerHTML:t._s(t.detailsList.content)}}),e("div",{staticStyle:{display:"flex","flex-wrap":"wrap",width:"330px"}},t._l(t.detailsList?.files,function(i,s){return e("div",{key:i.file_id,staticStyle:{"margin-right":"10px","margin-bottom":"10px"}},[1==i.type?e("div",[e("img",{staticStyle:{width:"100px",height:"100px"},attrs:{src:"http://192.168.66.16:8007"+i.src}})]):t._e(),2==i.type?e("div",[e("video",{staticStyle:{"max-width":"150px"},attrs:{src:"http://192.168.66.16:8007"+i.src,controls:""}})]):t._e()])}),0),t.detailsList.location?e("div",{staticStyle:{cursor:"pointer",display:"flex","margin-top":"10px"},on:{click:function(e){return t.openAmap(t.detailsList.location)}}},[e("i",{staticClass:"el-icon-location-outline",staticStyle:{"font-size":"20px"}}),e("div",[t._v(t._s(t.detailsList.location_address))])]):t._e(),e("div",{staticStyle:{display:"flex","justify-content":"right"}},[e("div",{on:{click:function(e){return t.onLike(t.detailsList.id)}}},[1===t.detailsList.is_like?e("img",{staticClass:"mr-10 Like",attrs:{src:i(228)}}):e("img",{staticClass:"mr-10 Like",attrs:{src:i(9865)}})]),e("div",{on:{click:t.oneditor}},[e("img",{staticClass:"mr-10 Like",attrs:{src:i(66)}})]),t.detailsList.user_id==t.userInfo.user_id?e("div",{on:{click:function(e){return t.Delete(t.detailsList.user_id)}}},[e("i",{staticClass:"el-icon-delete",staticStyle:{color:"#bfbfbf","font-size":"19px",cursor:"pointer"}})]):t._e()]),0!=t.detailsList.likes?.length?e("div",{staticClass:"flex Likeview"},t._l(t.detailsList.likes,function(s,n){return e("div",{key:n,staticStyle:{"margin-right":"13px",display:"flex","flex-wrap":"wrap"}},[e("img",{staticClass:"Like",attrs:{src:i(228)}}),e("div",{staticStyle:{"margin-left":"2px"}},[t._v(t._s(s.nickname))])])}),0):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:t.bolle,expression:"bolle"}]},[e("div",{staticStyle:{position:"relative","margin-top":"10px","margin-bottom":"10px",border:"1px solid #ccc"}},[e("div",{style:{"padding-bottom":"45px",width:"455px"}},[e("quill-editor",{ref:"quillEditor1",attrs:{options:t.editorOptions1},on:{change:e=>t.onEditorChange1(e)}})],1),e("div",{staticClass:"emoji"},[e("div",{staticClass:"mr-10"},[e("img",{staticStyle:{cursor:"pointer"},attrs:{src:i(2410),width:"28"},on:{click:function(e){return t.showAppBox1()}}}),t.isFocus1?e("el-scrollbar",{staticClass:"icon"},[e("div",{staticStyle:{display:"flex","flex-wrap":"wrap"}},t._l(t.emoji,function(i,s){return e("div",{key:s,staticClass:"im-emoji-item"},[e("img",{staticStyle:{width:"20px",height:"20px",cursor:"pointer"},attrs:{src:i.src},on:{click:function(e){return t.chooseEmoji1(i)}}})])}),0)]):t._e()],1),e("div",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.sendTextMsg(t.detailsList.id)}}},[t._v("发送")])],1)])])]),t._l(t.detailsList.comment,function(i,s){return e("div",{key:s},[e("div",{staticClass:"comment_view"},[e("div",[e("div",{staticClass:"comment_view1",on:{click:function(e){return e.stopPropagation(),t.onchat(i.id)}}},[e("div",[""!==i.reply_user_name?e("div",{staticStyle:{display:"flex"}},[e("div",[t._v(t._s(i.nickname)+" "),e("span",{staticStyle:{color:"#000","margin-right":"5px"}},[t._v("回复")])]),e("div",[t._v(" "+t._s(i.reply_user_name)+":")])]):e("div",[t._v(t._s(i.nickname)+":")])]),e("div",{staticStyle:{flex:"1","min-width":"0","word-break":"break-word"}},[t.contenthtml(i.content)?e("div",{staticClass:"chat-list-text",staticStyle:{cursor:"pointer"},domProps:{innerHTML:t._s(i.content)},on:{click:function(e){return t.handleLink(i.content)}}}):e("div",{staticClass:"chat-list-text",domProps:{innerHTML:t._s(i.content)}})])])])])])})],2)])],1)])]):t._e()}),x=[];const E=window.location.protocol+"//"+window.location.host+"/";var w=[{label:"表情",type:1,name:"emoji",icon:"cuIcon-emoji",children:[{name:"1f600",title:"emoji",src:E+"/static/img/emoji/twitter/1f600.png"},{name:"1f62c",title:"emoji",src:E+"/static/img/emoji/twitter/1f62c.png"},{name:"1f601",title:"emoji",src:E+"/static/img/emoji/twitter/1f601.png"},{name:"1f602",title:"emoji",src:E+"/static/img/emoji/twitter/1f602.png"},{name:"1f923",title:"emoji",src:E+"/static/img/emoji/twitter/1f923.png"},{name:"1f973",title:"emoji",src:E+"/static/img/emoji/twitter/1f973.png"},{name:"1f974",title:"emoji",src:E+"/static/img/emoji/twitter/1f974.png"},{name:"1f979",title:"emoji",src:E+"/static/img/emoji/twitter/1f979.png"},{name:"1f603",title:"emoji",src:E+"/static/img/emoji/twitter/1f603.png"},{name:"1f604",title:"emoji",src:E+"/static/img/emoji/twitter/1f604.png"},{name:"1f605",title:"emoji",src:E+"/static/img/emoji/twitter/1f605.png"},{name:"1f606",title:"emoji",src:E+"/static/img/emoji/twitter/1f606.png"},{name:"1f607",title:"emoji",src:E+"/static/img/emoji/twitter/1f607.png"},{name:"1f608",title:"emoji",src:E+"/static/img/emoji/twitter/1f608.png"},{name:"1f609",title:"emoji",src:E+"/static/img/emoji/twitter/1f609.png"},{name:"1f60a",title:"emoji",src:E+"/static/img/emoji/twitter/1f60a.png"},{name:"1f642",title:"emoji",src:E+"/static/img/emoji/twitter/1f642.png"},{name:"1f643",title:"emoji",src:E+"/static/img/emoji/twitter/1f643.png"},{name:"1263a",title:"emoji",src:E+"/static/img/emoji/twitter/263a.png"},{name:"1f60b",title:"emoji",src:E+"/static/img/emoji/twitter/1f60b.png"},{name:"1f60c",title:"emoji",src:E+"/static/img/emoji/twitter/1f60c.png"},{name:"1f60d",title:"emoji",src:E+"/static/img/emoji/twitter/1f60d.png"},{name:"1f970",title:"emoji",src:E+"/static/img/emoji/twitter/1f970.png"},{name:"1f618",title:"emoji",src:E+"/static/img/emoji/twitter/1f618.png"},{name:"1f617",title:"emoji",src:E+"/static/img/emoji/twitter/1f617.png"},{name:"1f619",title:"emoji",src:E+"/static/img/emoji/twitter/1f619.png"},{name:"1f61a",title:"emoji",src:E+"/static/img/emoji/twitter/1f61a.png"},{name:"1f61c",title:"emoji",src:E+"/static/img/emoji/twitter/1f61c.png"},{name:"1f92a",title:"emoji",src:E+"/static/img/emoji/twitter/1f92a.png"},{name:"1f928",title:"emoji",src:E+"/static/img/emoji/twitter/1f928.png"},{name:"1f9d0",title:"emoji",src:E+"/static/img/emoji/twitter/1f9d0.png"},{name:"1f61d",title:"emoji",src:E+"/static/img/emoji/twitter/1f61d.png"},{name:"1f61b",title:"emoji",src:E+"/static/img/emoji/twitter/1f61b.png"},{name:"1f911",title:"emoji",src:E+"/static/img/emoji/twitter/1f911.png"},{name:"1f913",title:"emoji",src:E+"/static/img/emoji/twitter/1f913.png"},{name:"1f60e",title:"emoji",src:E+"/static/img/emoji/twitter/1f60e.png"},{name:"1f929",title:"emoji",src:E+"/static/img/emoji/twitter/1f929.png"},{name:"1f921",title:"emoji",src:E+"/static/img/emoji/twitter/1f921.png"},{name:"1f920",title:"emoji",src:E+"/static/img/emoji/twitter/1f920.png"},{name:"1f917",title:"emoji",src:E+"/static/img/emoji/twitter/1f917.png"},{name:"1f60f",title:"emoji",src:E+"/static/img/emoji/twitter/1f60f.png"},{name:"1f636",title:"emoji",src:E+"/static/img/emoji/twitter/1f636.png"},{name:"1f610",title:"emoji",src:E+"/static/img/emoji/twitter/1f610.png"},{name:"1f611",title:"emoji",src:E+"/static/img/emoji/twitter/1f611.png"},{name:"1f612",title:"emoji",src:E+"/static/img/emoji/twitter/1f612.png"},{name:"1f644",title:"emoji",src:E+"/static/img/emoji/twitter/1f644.png"},{name:"1f914",title:"emoji",src:E+"/static/img/emoji/twitter/1f914.png"},{name:"1f925",title:"emoji",src:E+"/static/img/emoji/twitter/1f925.png"},{name:"1f927",title:"emoji",src:E+"/static/img/emoji/twitter/1f927.png"},{name:"1f928",title:"emoji",src:E+"/static/img/emoji/twitter/1f928.png"},{name:"1f929",title:"emoji",src:E+"/static/img/emoji/twitter/1f929.png"},{name:"1f92d",title:"emoji",src:E+"/static/img/emoji/twitter/1f92d.png"},{name:"1f92b",title:"emoji",src:E+"/static/img/emoji/twitter/1f92b.png"},{name:"1f92c",title:"emoji",src:E+"/static/img/emoji/twitter/1f92c.png"},{name:"1f92f",title:"emoji",src:E+"/static/img/emoji/twitter/1f92f.png"},{name:"1f633",title:"emoji",src:E+"/static/img/emoji/twitter/1f633.png"},{name:"1f61e",title:"emoji",src:E+"/static/img/emoji/twitter/1f61e.png"},{name:"1f61f",title:"emoji",src:E+"/static/img/emoji/twitter/1f61f.png"},{name:"1f620",title:"emoji",src:E+"/static/img/emoji/twitter/1f620.png"},{name:"1f621",title:"emoji",src:E+"/static/img/emoji/twitter/1f621.png"},{name:"1fae0",title:"emoji",src:E+"/static/img/emoji/twitter/1fae0.png"},{name:"1fae1",title:"emoji",src:E+"/static/img/emoji/twitter/1fae1.png"},{name:"1fae2",title:"emoji",src:E+"/static/img/emoji/twitter/1fae2.png"},{name:"1fae3",title:"emoji",src:E+"/static/img/emoji/twitter/1fae3.png"},{name:"1fae4",title:"emoji",src:E+"/static/img/emoji/twitter/1fae4.png"},{name:"1fae5",title:"emoji",src:E+"/static/img/emoji/twitter/1fae5.png"},{name:"1faf0",title:"emoji",src:E+"/static/img/emoji/twitter/1faf0.png"},{name:"2639",title:"emoji",src:E+"/static/img/emoji/twitter/2639.png"},{name:"263a",title:"emoji",src:E+"/static/img/emoji/twitter/263a.png"}]},{label:"收藏",type:2,icon:"cuIcon-like",children:[]}],A=i(5771),k={components:{quillEditor:A.quillEditor},props:{details:{type:Object,default:()=>{}},dialogVisible:{type:Boolean,default:!1}},data(){return{bolle:!1,isFocus1:!1,userInfo:{},detailsList:{},emoji:w[0].children,editorOptions1:{theme:"snow",placeholder:"",modules:{toolbar:!1}}}},mounted(){this.userInfo=this.$store.state.userInfo},watch:{details:{handler(t){0!==t.posts_id&&this.clickshow()},deep:!0,immediate:!0}},methods:{fndialog(){localStorage.removeItem("pid1"),this.$emit("dialog",!1)},MessageClick(t){this.$preview("http://192.168.66.16:8007"+t)},oneditor(){this.bolle=!this.bolle,0==this.bolle&&localStorage.removeItem("pid")},contenthtml(t){return t&&(t.includes("http://")||t.includes("https://"))},onchat(t){this.bolle=!this.bolle,t&&1==this.bolle?localStorage.setItem("pid",t):localStorage.removeItem("pid")},handleLink(t){const e=t.replace(/<[^>]+>/g,""),i=/https?:\/\/[^\s"']+/g,s=e.match(i)||[];s.length>0&&(window.electronRequire?window.electronRequire("electron").ipcRenderer.send("open-external-url",s):window.open(s,"_blank"))},showAppBox1(t){this.isFocus1=!this.isFocus1,1==this.isFocus1&&this.$refs.quillEditor1.quill.focus()},chooseEmoji1(t){const e=this.$refs.quillEditor1.quill,i=e.getSelection();i&&(e.insertEmbed(i.index,"image",t.src),e.setSelection(i.index+1)),this.isFocus1=!1},Delete(t){this.$api.messageApi.del({posts_id:t}).then(t=>{0==t.code&&(this.$message.success("删除成功!"),this.friendsCircleList())})},onLike(t){this.$api.messageApi.like({posts_id:t}).then(t=>{this.clickshow()})},clickshow(){this.$api.messageApi.details({posts_id:this.details.posts_id,friend_user_id:this.details.friend_user_id}).then(t=>{this.detailsList=t.data,this.bolle=!1})},onEditorChange1({quill:t,html:e,text:i},s){this.NoticeContent=e},sendTextMsg(t,e){const i=localStorage.getItem("pid");localStorage.getItem("pid1");this.$nextTick(()=>{let e="",s=null;e=this.NoticeContent||"",this.$refs.quillEditor1&&(s=this.$refs.quillEditor1.quill);const n=/^\s*$/.test(e.replace(/<[^>]+>/g,"")),a=/<img\b/i.test(e);if(!e||n&&!a)return void this.$message.error("内容不能为空!");let o={posts_id:t,content:e,pid:i||""};this.$api.messageApi.comment(o).then(t=>{localStorage.removeItem("pid"),this.NoticeContent="",s&&s.setText(""),this.clickshow(),this.bolle=!1})})}}},I=k,_=(0,d.A)(I,C,x,!1,null,"037ac564",null),S=_.exports,T={components:{fndialog:S},props:{visible:{type:Boolean,default:!1},userid:{type:[Number,String],default:0}},data(){return{page:1,limit:20,list:[],bol:!1,details:{},userInfo:{},dialogVisible:!1,user_id:this.userid,visible1:this.visible}},watch:{visible(t){this.visible1=t,1==this.visible1&&this.$nextTick(()=>{this.addScrollListener()})},userid:{handler(t){this.user_id=t,0!==this.user_id&&this.init()},immediate:!0}},computed:{groupedList(){return this.groupDataByYear(this.list)}},mounted(){this.userInfo=this.$store.state.userInfo},methods:{init(){this.bol||this.$api.messageApi.myPosts({friend_user_id:this.user_id,page:this.page,limit:this.limit}).then(t=>{0==t.code&&1==this.page?this.list=t.data:0==t.code&&this.page>1&&(this.list=this.list.concat(t.data)),t.count==this.list.length&&(this.bol=!0)})},addScrollListener(){const t=this.$refs.WechatMomentsscroll.wrap;t.addEventListener("scroll",this.handleScroll)},handleScroll(){const t=this.$refs.WechatMomentsscroll.wrap,e=t.scrollTop,i=t.clientHeight,s=t.scrollHeight;e+i>=s-1&&(this.page++,this.init())},groupDataByYear(t){return t.reduce((t,e)=>{const i=new Date(e.create_time).getFullYear();return t[i]||(t[i]=[]),t[i].push(e),t},{})},formatTime(t){const e=new Date(t);return`${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}`},closedialog(){this.visible1=!1,this.$emit("closedialog",this.visible1)},clickshow(t,e){localStorage.setItem("pid1",e),this.details.posts_id=t,this.details.friend_user_id=this.userInfo.user_id==e?"":e,this.dialogVisible=!0}}},D=T,M=(0,d.A)(D,b,y,!1,null,"68e65538",null),L=M.exports,N={name:"UserCard",components:{chatdetails:L},props:{user_id:{type:[Number,String],default:0},options:{type:Object,default:()=>({isManage:!1})}},computed:{...(0,v.aH)({userInfo:t=>t.userInfo,globalConfig:t=>t.globalConfig}),isFriend(){return this.userInfo.user_id!=this.detail.user_id&&(this.detail.friend||1==this.globalConfig.sysInfo.runMode)}},filters:{sex(t){let e=["女","男","未知"];return e[t]||"未知"}},data(){return{detail:{},chatbool:!1}},mounted(){this.getUserDetal()},methods:{closeDialog(){this.$emit("close")},tochatdetails(){this.chatbool=!0},getUserDetal(){this.$api.imApi.getUserInfo({user_id:this.user_id}).then(t=>{0==t.code&&(this.detail=t.data)})},openChat(){this.closeDialog(),this.$store.commit("openChat",this.detail.user_id)},editUser(){this.$emit("editUser",this.detail)},addFriend(){this.closeDialog(),this.$prompt("请填写验证信息,让朋友知道你!","添加好友",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(({value:t})=>{if(!t)return this.$message.error("请输入验证信息"),!1;this.$api.friendApi.addFriend({user_id:this.detail.user_id,remark:t}).then(t=>{0==t.code&&this.$message.success("已发送好友申请")})}).catch(t=>{this.$message({type:"warning",message:t})})},setNickname(){let t=this.detail.friend.friend_id??"";if(!this.detail.friend)return this.$message.error("该用户不是您的好友"),!1;this.closeDialog();let e=this.detail.friend.nickname?this.detail.friend.nickname:this.detail.realname;this.$prompt("请填写备注信息","设置备注",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then(({value:e})=>{this.$api.friendApi.setNickname({friend_id:t,nickname:e}).then(t=>{0==t.code&&(this.$message.success("设置成功"),this.detail.realname=e,this.$store.commit("openname",this.detail.realname),location.reload())})}).catch(()=>{})}}},O=N,P=(0,d.A)(O,g,f,!1,null,"689c4dfe",null),U=P.exports,R={install(t){function e(e,i){let s=this;const n=new t({router:s.$router,store:s.$store,render(t){return t(U,{on:{close:()=>{n.$destroy(),document.body.removeChild(n.$el)},editUser:t=>{i.editDataCallbak&&i.editDataCallbak(t),n.$destroy(),document.body.removeChild(n.$el)}},props:{user_id:e,options:i}})}}).$mount();document.body.appendChild(n.$el)}t.prototype.$user=e}},j=function(){var t=this,e=t._self._c;return e("div",[e("transition",{attrs:{name:"fade-user"}},[e("div",{staticClass:"previewBox"},[e("el-button",{staticClass:"drawer-close",attrs:{type:"danger",icon:"el-icon-close",circle:""},on:{click:t.closeDrawer}}),e("iframe",{attrs:{src:t.url,frameborder:"0",width:"100%",height:"100%"}})],1)])],1)},B=[],F={name:"preview",props:{url:{type:String,default:""}},data(){return{}},methods:{closeDrawer(){this.$emit("close")}}},$=F,V=(0,d.A)($,j,B,!1,null,"022a2c23",null),H=V.exports,K={install(t){function e(e,i){let s=this;const n=new t({router:s.$router,store:s.$store,render(t){return t(H,{on:{close:()=>{n.$destroy(),document.body.removeChild(n.$el)}},props:{url:e,options:i}})}}).$mount();document.body.appendChild(n.$el)}t.prototype.$preview=e}},z=i(535),G=i.n(z),q=i(6178),Q=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-container"},[e("div",{staticClass:"im-title"},[e("div",{staticClass:"logo"},[e("el-image",{staticStyle:{width:"80px",height:"80px"},attrs:{src:t.$packageData.logo,fit:"cover"}})],1),e("div",{staticClass:"im-content"},[e("div",{staticClass:"im-name"},[e("div",{staticClass:"text f-36"},[t._v(t._s(t.$packageData.name))]),e("div",{staticClass:"version ml-5"},[e("el-tag",{attrs:{size:"mini",type:"primary",effect:"plain"}},[t._v("v"+t._s(t.$packageData.version))])],1)]),e("div",{staticClass:"im-des"},[t._v(t._s(t.$packageData.description))])])]),e("div",{staticClass:"code-url"},[e("div",{staticClass:"ml-15 mb-15"},[t._v(" 前端地址: "),e("a",{attrs:{href:t.$packageData.frontUrl,target:"_blank"}},[e("el-image",{attrs:{src:t.$packageData.frontUrl+"/badge/star.svg?theme=white",alt:"star"}})],1)]),e("div",{staticClass:"ml-15 mb-15"},[t._v(" 后端地址:"),e("a",{attrs:{href:t.$packageData.backstageUrl,target:"_blank"}},[e("el-image",{attrs:{src:t.$packageData.backstageUrl+"/badge/star.svg?theme=dark",alt:"star"}})],1)]),e("div",{staticClass:"ml-15 mb-15"},[e("el-button",{attrs:{type:"warning",plain:"",size:"mini",round:""}},[e("a",{attrs:{href:t.$packageData.qqGroupUrl,target:"_blank"}},[t._v("QQ交流群:1031495465")])])],1)]),e("el-alert",{staticClass:"mt-15 mb-15",attrs:{"show-icon":"",closable:!1,title:"本项目为演示系统,请仔细阅读一下文档!进群请先Star项目。本项目是一款开源的即时通信demo(存在一定的BUG),主要用于学习交流,为大家提供即时通讯的开发思路。",type:"info"}}),e("el-alert",{staticClass:"mt-15 mb-15",attrs:{"show-icon":"",closable:!1,title:"该项目服务端和web端都属于全开源项目,仅用于个人学习,任何个人和单位不得对源码进行售卖;捐赠后获得的移动端源码也仅供学习使用,不可对源码进行二次售卖。",type:"warning"}}),e("el-alert",{staticClass:"mt-15 mb-15",attrs:{"show-icon":"",closable:!1,title:"免责声明:请勿将源码用于木马、病毒、色情、赌博、诈骗等违反国家法律法规行业,如有发现我会协助相关行政执法机关清查!",type:"error"}}),e("el-tabs",{staticClass:"mb-20",attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"📘 程序介绍"}},[e("div",{staticClass:"tip"},t._l(t.introduce,function(i,s){return e("p",{key:s,staticClass:"mb-5"},[e("i",{class:i.icon}),t._v(" "),e("span",{domProps:{innerHTML:t._s(i.text)}})])}),0)]),e("el-tab-pane",{attrs:{label:"🪄 支持功能"}},[e("div",{staticClass:"success"},t._l(t.$packageData.funcList,function(i,s){return e("p",{key:s,staticClass:"mb-5"},[e("i",{class:i.icon}),t._v(" "),e("span",{domProps:{innerHTML:t._s(i.text)}})])}),0)]),e("el-tab-pane",{attrs:{label:"🛒 技术栈"}},[e("div",{staticClass:"info"},t._l(t.techStack,function(i,s){return e("p",{key:s,staticClass:"mb-5"},[e("i",{class:i.icon}),t._v(" "),e("span",{domProps:{innerHTML:t._s(i.text)}})])}),0)])],1),t._m(0),e("div",{staticClass:"demo-btn"},[e("div",{staticClass:"flex-box-center mb-15",on:{click:function(e){return t.showMessageBox()}}},[e("el-badge",{staticClass:"item",attrs:{value:t.unread,max:99,hidden:!t.unread}},[e("el-button",[t._v("窗口模式")])],1)],1),e("div",{staticClass:"mb-15 mr-15",on:{click:function(e){return t.$router.push({path:"/chat"})}}},[e("el-button",[t._v("纯享模式")])],1),e("div",{staticClass:"mb-15 mr-15",on:{click:function(e){return t.$router.push({path:"/manage/index"})}}},[e("el-button",[t._v("管理后台")])],1),e("div",{staticClass:"mb-15 mr-15"},[e("el-tooltip",{attrs:{placement:"right-start",effect:"light"}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("el-image",{staticStyle:{width:"200px"},attrs:{src:"/assets/img/h5.png"}})],1),e("el-button",[e("a",{attrs:{href:t.$packageData.mobileUrl,target:"_blank"}},[t._v("H5体验")])])],1)],1),e("div",{staticClass:"mb-15"},[e("el-button",{on:{click:t.downApp}},[e("a",{attrs:{target:"_blank"}},[t._v("客户端下载")])])],1)]),e("div",{staticClass:"contact-main"},[t._m(1),t._l(t.allContacts,function(i){return 0==i.is_group&&i.id<6?e("div",{key:i.id,staticClass:"contact-box"},[e("div",{staticClass:"contact-item"},[e("el-avatar",{attrs:{src:i.avatar}}),e("span",[t._v(t._s(i.realname))]),e("div",[e("el-button",{attrs:{plain:"",size:"mini",round:""},on:{click:function(e){return t.$store.commit("openChat",i.id)}}},[t._v("发消息")])],1)],1)]):t._e()})],2),e("div",{staticClass:"tip mb-20 mt-10"},[t._m(2),t._m(3),e("p",[t._v("1. 服务端协助部署:仅提供服务端远程 [todesk] 技术指导,需要提供纯净的centOS服务器一台。")]),t._m(4),e("p",[t._v("3. 桌面端源码【付费获取】:使用vue+electron前端技术打包,和web端功能一样,支持后台运行和消息通知。")]),e("p",[t._v("4. webRTC中继服务器:原则上参考底部的教程链接来自行安装,确需服务,也可联系作者协助。")]),e("p",[t._v("5. 技术指导服务:包含远程指导,代码解析,开发思路等,付费之日起一个月内有效。")]),e("p",[t._v("6. 团队安心包:包含上述前4项服务,根据需求选择,以及安卓APP和H5打包(需要提供Dcloud账号【打包】、服务器、域名、证书等,APP还需要提供应用名称和图标)")]),e("p",[t._v("7、其他未列出的服务,请进群咨询作者!作者8年phper,前端水平一般,不接外包和二开!当然除非你要的东西非常简单。")]),e("el-link",{staticClass:"mt-10 mb-10",attrs:{type:"primary",href:t.$packageData.qqGroupUrl,target:"_blank"}},[t._v("有技术问题需要交流或者购买移动端的可以【戳我】加入交流群。"),e("b",{staticClass:"c-red"},[t._v("加群前请先点star,否则不予通过,长时间不活跃的将被定期清理")])]),e("div",[t._v("作者QQ:1072129059 (添加作者咨询,需要购买才加,否则不予通过,源码预算600及以上,安装部署指导预算200及以上)")])],1),t._m(5),e("div",{staticClass:"other-pro"},[e("h2",[t._v("其他项目")]),e("br"),e("div",{staticClass:"mb-15"},[e("el-link",{attrs:{type:"primary",href:"https://gitee.com/raingad/j-preview"}},[t._v("纯JS文件预览插件")])],1)]),e("div",{staticClass:"other-pro"},[e("h2",[t._v("其他资料")]),e("br"),e("div",{staticClass:"mb-15"},[e("el-link",{attrs:{type:"primary",href:"https://lemon.raingad.com"}},[t._v("Lemon-IMUI使用文档")])],1),e("div",{staticClass:"mb-15"},[e("el-link",{attrs:{type:"primary",href:"https://www.npmjs.com/package/chatarea"}},[t._v("聊天输入框插件【chatarea】")])],1),e("div",{staticClass:"mb-15"},[e("el-link",{attrs:{type:"primary",href:"https://blog.csdn.net/ruiye99/article/details/130992960"}},[t._v("WebRTC 网络中继 Coturn 服务安装及部署")])],1)]),e("Message",{ref:"Message",attrs:{dialogTableVisible:t.dialogTableVisible},on:{"update:dialogTableVisible":function(e){t.dialogTableVisible=e},"update:dialog-table-visible":function(e){t.dialogTableVisible=e}}})],1)},Y=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-15"},[e("b",{staticStyle:{"font-size":"20px"}},[t._v("功能演示")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"title"},[e("b",{staticStyle:{"font-size":"20px"}},[t._v("联系人")]),t._v("(仅展示部分用于演示)")])},function(){var t=this,e=t._self._c;return e("h3",{staticClass:"mb-5"},[e("b",[t._v("服务介绍")])])},function(){var t=this,e=t._self._c;return e("p",[t._v(" 详细的使用方法在源码中基本上都有备注,如果您觉得这个项目对您有帮助,欢迎star,如果有问题可以加QQ群交流,如果您有更好的建议,欢迎提出。"),e("b",[t._v(" 开源不易,如果需要以下功能,捐赠相应金额,作者可提供服务,进群后咨询作者!")])])},function(){var t=this,e=t._self._c;return e("p",[t._v("2. uniapp移动端源码【付费获取】(源码无加密,仅提供源码,"),e("b",[t._v("不提供专业指导和部署 ")]),t._v(")")])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"danger mb-20"},[e("h3",{staticClass:"mb-5"},[e("b",[t._v("注意事项")])]),e("p",{staticClass:"m-5"},[t._v(" 1、捐赠购买移动端或者桌面端赠送文档,包含:接口说明、安装教程、常见问题的解决方法等。"),e("br"),t._v(" 2、源码作者不保证无任何问题,可能存在兼容性问题或者一些小的BUG,需要自行优化升级,望悉知。"),e("br"),t._v(" 3、捐赠获得的源码仅供学习或二次开发使用,不可对源码进行二次售卖。"),e("br"),t._v(" 4、价格或服务内容可能会有变动,"),e("b",{staticClass:"c-red"},[t._v("随着功能的增加,价格会上涨")]),t._v(",以咨询作者时给的服务方案为准! ")])])}],J=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.dialogTableVisible,expression:"dialogTableVisible"}],staticClass:"messageBoxStyle"},[e("el-dialog",{attrs:{visible:t.dialogIsShow,modal:!1,"custom-class":"sideMenu-message","show-close":!1,width:"1000px","close-on-press-escape":!0},on:{"update:visible":function(e){t.dialogIsShow=e},close:t.closeDialog}},[e("rainagdIm",{on:{newChat:t.contactSync,close:t.closeDialog}})],1)],1)},W=[],Z=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"chat-box"},[e("lemon-imui",{ref:"IMUI",staticStyle:{"min-height":"600px"},attrs:{user:t.user,width:t.curWidth,height:t.curHeight,contextmenu:t.contextmenu,"contact-contextmenu":t.contactContextmenu,theme:t.setting.theme,"hide-message-name":t.setting.hideMessageName,"hide-message-time":t.setting.hideMessageTime,avatarCricle:t.setting.avatarCricle,sendKey:t.setSendKey,wrapKey:t.wrapKey,latelyContacts:t.latelyContact},on:{"is-bottom":t.eventBottom,"menu-avatar-click":t.openSetting,"change-contact":t.handleChangeContact,"pull-messages":t.handlePullMessages,"message-click":t.handleMessageClick,"message-position":t.handleMessagePosition,send:t.handleSend},scopedSlots:t._u([{key:"cover",fn:function(){return[e("div",[e("div",{staticClass:"cover"},[e("i",{staticClass:"lemon-icon-message"}),e("p",[e("b",[t._v(t._s(t.globalConfig.sysInfo.name??""))])])])])]},proxy:!0},{key:"sidebar-message",fn:function(i){return[e("div",{staticClass:"lemon-contact-item",class:1==i.is_top?"bg-gray":""},[e("el-badge",{staticClass:"lemon-badge lemon-contact__avatar",attrs:{value:i.unread,max:99,"is-dot":0==i.is_notice,hidden:i.unread<=0}},[e("span",{staticClass:"lemon-avatar",class:{"lemon-avatar--circle":t.setting.avatarCricle},staticStyle:{width:"40px",height:"40px","line-height":"40px","font-size":"20px"}},[e("img",{attrs:{src:i.avatar}})]),i.is_online&&0==i.is_group&&1==t.globalConfig.chatInfo.online?e("span",{staticClass:"online-status",attrs:{title:"在线"}}):t._e()]),e("div",{staticClass:"lemon-contact__inner"},[e("p",{staticClass:"lemon-contact__label"},[e("span",{staticClass:"lemon-contact__name"},[t._v(" "+t._s(i.displayName)+" ")]),e("span",{staticClass:"lemon-contact__time",domProps:{textContent:t._s(t.formatTime(i.lastSendTime))}})]),e("p",{staticClass:"lemon-contact__content lemon-last-content"},[e("span",{staticClass:"lastContent"},[i.is_at>0?e("span",{staticClass:"c-red"},[t._v("[有"+t._s(i.is_at)+"人@我] ")]):t._e(),e("span",{domProps:{innerHTML:t._s(i.lastContent)}})]),0==i.is_notice?e("span",{staticClass:"el-icon-close-notification f-16"}):t._e()])])],1)]}},{key:"message-title",fn:function(i){return[e("div",{staticClass:"message-title-box"},[e("div",[0==t.isEdit?e("span",[1==t.is_group?e("span",{staticClass:"displayName",on:{click:function(e){t.isEdit=!0}}},[t._v(" "+t._s(i.displayName)),e("span",{staticClass:"mr-5"},[t._v("("+t._s(t.groupUserCount)+")")]),i.setting&&1==i.setting.nospeak?e("el-tag",{attrs:{size:"mini",type:"warning"}},[t._v("仅群管理员可发言")]):t._e(),i.setting&&2==i.setting.nospeak?e("el-tag",{attrs:{size:"mini",type:"danger"}},[t._v("全员禁言中")]):t._e()],1):t._e(),t.is_group>1?e("span",{staticClass:"displayName"},[2==t.is_group?e("el-tag",{attrs:{size:"mini"}},[t._v("BOT")]):t._e(),t._v(" "+t._s(i.displayName)+" ")],1):t._e(),0==t.is_group?e("span",{staticClass:"displayName"},[1==t.globalConfig.chatInfo.online?e("OnlineStatus",{attrs:{type:i.is_online?"success":"info",pulse:i.is_online}}):t._e(),t._v(" "+t._s(i.displayName))],1):t._e(),parseInt(t.globalConfig.sysInfo.ipregion)&&i.last_login_ip?e("span",{staticClass:"c-999 f-12 ml-5"},[0!=t.globalConfig.chatInfo.online||i.is_online?t._e():e("span",[t._v("(离线)")]),t._v(t._s(i.last_login_ip)+" "+t._s(i.location))]):t._e()]):t._e(),1==t.isEdit?e("input",{directives:[{name:"model",rawName:"v-model",value:t.displayName,expression:"displayName"}],staticClass:"editInput",domProps:{value:t.displayName},on:{blur:function(e){return t.saveGroupName(i)},input:function(e){e.target.composing||(t.displayName=e.target.value)}}}):t._e()]),e("div",{staticClass:"message-title-tools"},[t.globalConfig.chatInfo.webrtc?[!i.is_group&&parseInt(t.globalConfig.chatInfo.webrtc)?e("i",{staticClass:"el-icon-phone-outline ml-10",attrs:{title:"语音通话"},on:{click:function(e){return t.called(0)}}}):t._e(),!i.is_group&&parseInt(t.globalConfig.chatInfo.webrtc)?e("i",{staticClass:"el-icon-video-camera ml-10",attrs:{title:"视频通话"},on:{click:function(e){return t.called(1)}}}):t._e()]:t._e(),1==i.is_group?e("i",{staticClass:"iconfont icon-ico ml-10 f-22",attrs:{title:"群二维码"},on:{click:function(e){t.groupQrShow=!0}}}):t._e(),i.is_group?t._e():e("i",{staticClass:"el-icon-more ml-10",attrs:{title:"基本资料"},on:{click:function(e){return t.$user(i.id)}}}),i.is_group&&1==t.currentChat.role?e("i",{staticClass:"el-icon-more ml-10",attrs:{title:"群管理"},on:{click:function(e){return t.openGroupSetting(!1)}}}):t._e()],2)])]}},{key:"sidebar-message-fixedtop",fn:function(i){return[t.wsStatus?t._e():e("div",{staticClass:"lz-flex no-internet pd-10 mb-10 lz-space-between lz-align-items-center"},[e("div",{staticClass:"el-icon-info"}),e("div",[t._v("当前网络无法实时接收消息")]),e("div",{staticClass:"el-icon-refresh cur-handle",attrs:{title:"重新链接"},on:{click:t.reconnect}})]),e("div",{staticClass:"contact-fixedtop-box"},[e("el-input",{staticClass:"input-with-select",attrs:{placeholder:"搜索联系人","prefix-icon":"el-icon-search"},on:{blur:t.closeSearch,focus:function(e){t.searchResult=!0}},model:{value:t.keywords,callback:function(e){t.keywords=e},expression:"keywords"}}),2==t.globalConfig.sysInfo.runMode?e("div",{staticStyle:{"margin-left":"10px"}},[e("el-dropdown",{on:{command:t.handleCommand}},[e("el-button",{attrs:{icon:"el-icon-plus",circle:""}}),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"addFriend"}},[t._v("添加朋友")]),t.globalConfig.chatInfo.groupChat?e("el-dropdown-item",{attrs:{command:"addGroup"}},[t._v("创建群聊")]):t._e()],1)],1)],1):t._e(),1==t.globalConfig.sysInfo.runMode&&t.globalConfig.chatInfo.groupChat?e("div",{staticStyle:{"margin-left":"10px"}},[e("el-button",{attrs:{title:"创建群聊",icon:"el-icon-plus",circle:""},on:{click:t.openCreateGroup}})],1):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:t.searchResult,expression:"searchResult"}],staticClass:"search-list"},[t._l(t.searchList,function(s,n){return t.searchList.length>0?e("div",{key:n,staticClass:"search-list-item"},[e("lemon-contact",{attrs:{contact:s},on:{click:function(e){return t.openChat(s.id,i)}}})],1):t._e()}),0==t.searchList.length?e("div",{staticStyle:{margin:"20px"},attrs:{align:"center"}},[e("el-empty",{staticStyle:{height:"200px"},attrs:{"image-size":100,description:"暂无数据"}})],1):t._e()],2)],1),e("im-tab",{attrs:{values:t.tabList,height:40},on:{change:t.changeTab}})]}},{key:"sidebar-message-top",fn:function(i){return[t.chatTopList.length>0?e("div",{staticClass:"chat-top-list"},t._l(t.chatTopList,function(s,n){return e("ChatTop",{key:n,attrs:{contact:s,avatarCricle:t.setting.avatarCricle,currentId:t.currentChat.id},nativeOn:{click:function(e){return t.openChat(s.id,i)}}})}),1):t._e()]}},{key:"sidebar-contact-fixedtop",fn:function(i){return[e("div",{staticStyle:{margin:"15px 10px"}},[t._v(" 联系人 ")])]}},{key:"message-side",fn:function(i){return[1==i.is_group?e("div",{staticClass:"slot-group-list lemon-wrapper",class:"blue"==t.setting.theme?"lemon-wrapper--theme-blue":""},[e("div",{staticClass:"group-side-box lemon-container"},[e("div",{staticClass:"group-notice"},[e("div",{staticClass:"group-side-title"},[e("h4",[t._v("群公告")]),e("div",[i.role<3||0==i.setting.manage?e("span",{staticClass:"el-icon-edit f-18 cur-handle",on:{click:function(e){t.noticeBox=!0}}}):t._e()])]),e("hr"),i.notice?e("div",{staticClass:"group-side-body",on:{click:t.openNotice}},[t._v(" "+t._s(i.notice)+" ")]):t._e(),i.notice?t._e():e("div",{staticClass:"group-side-body"},[t._v(" 暂无公告 ")])]),e("div",{staticClass:"group-user"},[e("div",{staticClass:"group-side-title"},[e("h4",[t._v("群成员")]),e("div",[i.role<3||1==i.setting.invite?e("span",{staticClass:"el-icon-circle-plus-outline f-18 cur-handle",on:{click:t.openAddGroupUser}}):t._e()])]),e("hr"),e("div",{staticClass:"group-user-body",style:[{height:"calc("+t.curHeight+" - 230px)",background:"blue"==t.setting.theme?"#ffffff":"#f4f4f4"}],attrs:{id:"group-user"}},[e("el-scrollbar",{staticStyle:{height:"100%"}},t._l(t.groupUser,function(i,s){return e("lemon-contact",{directives:[{name:"lemon-contextmenu",rawName:"v-lemon-contextmenu.contact",value:t.groupMenu,expression:"groupMenu",modifiers:{contact:!0}}],key:s,staticClass:"user-list",attrs:{contact:i}},[e("div",{staticClass:"user-avatar"},[e("el-avatar",{attrs:{size:20,src:i.userInfo.avatar}})],1),e("div",{staticClass:"user-name"},[i.userInfo.id==t.user.id?e("span",{staticClass:"fc-danger"},[t._v(t._s(i.userInfo.displayName)+"(我)")]):t._e(),i.userInfo.id!=t.user.id?e("span",[t._v(t._s(i.userInfo.displayName))]):t._e(),e("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"已禁言至:"+t.noSpeakExp(i.no_speak_time),placement:"top"}},[t.noSpeakExp(i.no_speak_time)?e("span",{staticClass:"c-red ml-5 el-icon el-icon-turn-off-microphone"}):t._e()])],1),e("div",{staticClass:"user-role"},[1==i.role?e("el-tag",{attrs:{type:"danger",size:"mini"}},[t._v("群主")]):t._e(),2==i.role?e("el-tag",{attrs:{type:"warning",size:"mini"}},[t._v("管理员")]):t._e()],1)])}),1)],1)])])]):t._e()]}},{key:"message-after",fn:function(i){return[i.fromUser.id==t.user.id&&0==i.is_group?e("span",{staticStyle:{visibility:"visible"}},[i.is_read||"succeed"!=i.status?t._e():e("span",[t._v(" 未读 ")]),i.is_read&&"succeed"==i.status?e("span",{staticClass:"fc-success"},[t._v(" 已读 ")]):t._e()]):t._e()]}},{key:"editor-footer",fn:function(){return[e("div",{staticClass:"lz-flex lz-space-between lz-align-items-center"},[t.currentChat.is_at?e("div",{staticClass:"at-item cur-handle mr-10",on:{click:function(e){return t.openMsgBox()}}},[t._v("有"+t._s(t.currentChat.is_at)+"人提到你")]):t._e(),t.quote?e("div",{staticClass:"message-quote cur-handle mr-10 lz-flex lz-space-between lz-align-items-center"},[e("div",{staticClass:"text-overflow"},[t._v(t._s(t.quote.content))]),e("div",{staticClass:"el-icon-close",on:{click:function(e){return t.closeQuote()}}})]):t._e(),e("div"),e("div",[t._v(t._s(1==t.setting.sendKey?"使用 Ctrl + Enter 换行":"使用 Ctrl + Enter 发送消息"))])])]},proxy:!0}])})],1),e("Group",{attrs:{visible:t.createChatBox,title:t.dialogTitle,isAdd:t.isAdd,userIds:t.userIds,groupId:t.group_id},on:{"update:visible":function(e){t.createChatBox=e},manageGroup:t.manageGroup}}),e("el-dialog",{attrs:{title:"发布公告",visible:t.noticeBox,modal:!0,width:"500px","append-to-body":""},on:{"update:visible":function(e){t.noticeBox=e}}},[e("el-input",{attrs:{type:"textarea",rows:10,placeholder:"请输入内容"},model:{value:t.notice,callback:function(e){t.notice=e},expression:"notice"}}),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.noticeBox=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.publishNotice}},[t._v("确 定")])],1)],1),e("addFriend",{attrs:{visible:t.addFriendBox},on:{"update:visible":function(e){t.addFriendBox=e}}}),e("ChooseDialog",{attrs:{visible:t.forwardBox,title:"转发聊天",allUser:t.allUser},on:{"update:visible":function(e){t.forwardBox=e},selectChat:t.forwardUser}}),e("el-dialog",{attrs:{title:"消息管理器",visible:t.messageBox,modal:!0,width:"800px","append-to-body":""},on:{"update:visible":function(e){t.messageBox=e}}},[e("ChatRecord",{key:t.componentKey,attrs:{contact:t.currentChat,condition:t.ChatRecordMap}})],1),e("el-dialog",{attrs:{title:"群设置",visible:t.groupSetting,modal:!0,width:"500px","append-to-body":""},on:{"update:visible":function(e){t.groupSetting=e}}},[e("ChatSet",{key:t.componentKey,attrs:{contact:t.contactSetting},on:{changeOwner:t.changeOwner}})],1),e("el-dialog",{attrs:{title:"语音录制","custom-class":"no-padding",visible:t.VoiceStatus,modal:!0,width:"500px","append-to-body":"","destroy-on-close":""},on:{"update:visible":function(e){t.VoiceStatus=e}}},[e("voice-recorder",{on:{send:t.sendVoice}})],1),e("el-dialog",{attrs:{title:"设置禁言",width:"500px","append-to-body":"","destroy-on-close":"",visible:t.noSpeakBox},on:{"update:visible":function(e){t.noSpeakBox=e}}},[e("el-radio-group",{staticClass:"mb-20",attrs:{size:"small"},on:{change:function(e){t.noSpeakData.noSpeakDay=1}},model:{value:t.noSpeakData.noSpeakTimer,callback:function(e){t.$set(t.noSpeakData,"noSpeakTimer",e)},expression:"noSpeakData.noSpeakTimer"}},[e("el-radio",{attrs:{label:"1",border:""}},[t._v("10分钟")]),e("el-radio",{attrs:{label:"2",border:""}},[t._v("1小时")]),e("el-radio",{attrs:{label:"3",border:""}},[t._v("3小时")]),e("el-radio",{attrs:{label:"4",border:""}},[t._v("1天")])],1),e("div",[t._v(" 自定义"),e("el-input-number",{staticClass:"ml-10 mr-10",attrs:{min:1,max:365,label:"自定义"},on:{change:function(e){t.noSpeakData.noSpeakTimer=0}},model:{value:t.noSpeakData.noSpeakDay,callback:function(e){t.$set(t.noSpeakData,"noSpeakDay",e)},expression:"noSpeakData.noSpeakDay"}}),t._v(" 天 ")],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.noSpeakBox=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.setNoSpeak()}}},[t._v("确 定")])],1)],1),e("group-qr",{attrs:{contact:t.currentChat,visible:t.groupQrShow},on:{"update:visible":function(e){t.groupQrShow=e}}}),e("Socket",{ref:"socket"}),e("webrtc",{key:t.componentKey,ref:"webrtc",attrs:{contact:t.currentChat,config:t.webrtcConfig,alias:t.$packageData.name,userInfo:t.user},on:{message:t.rtcMsg}})],1)},X=[],tt=(i(6573),i(8100),i(7936),i(2489),i(116),i(7588),i(1701),i(9577),i(4979),i(4603),i(7566),i(8721),i(1981)),et=function(){var t=this;t._self._c;return t._m(0)},it=[function(){var t=this,e=t._self._c;return e("div",[e("audio",{attrs:{id:"chatAudio"}},[e("source",{attrs:{src:i(3598),type:"audio/ogg"}}),e("source",{attrs:{src:i(8137),type:"audio/wav"}})])])}],st={name:"socket",data(){return{is_open_socket:!1,websocket:null,pingInterval:30,connectNum:1,manMade:!1,timeout:3e4,heartbeatInterval:null,reconnectTimeOut:null}},methods:{getWsUrl(){let t={NODE_ENV:"production",BASE_URL:"app://./",IS_ELECTRON:!0}.VUE_APP_BASE_API,e=window.location.protocol,i="ws://";t=window.location.host,"https:"==e&&(i="wss://");const s=i+t+"/wss";return s},initWebSocket(){const t=this.getWsUrl();this.websocket=new WebSocket(t),this.start(),this.is_open_socket=!0,this.websocket.onmessage=this.websocketOnMessage,this.websocket.onclose=this.websocketClose,s["default"].prototype.$websocket=this.websocket,this.$store.state.wsStatus=!0},websocketOnMessage(t){const e=JSON.parse(t.data);let i=r().get("UserInfo"),s=r().get("authToken");switch(e["type"]){case"ping":this.websocketSend({type:"pong"});break;case"init":r().set("client_id",e["client_id"]),this.$api.commonApi.bindClientIdAPI({client_id:e["client_id"],user_id:i.user_id}).then(t=>{this.websocketSend({type:"bindUid",user_id:i.user_id,token:s}),console.log(e["client_id"],"消息服务启动成功")}).catch(t=>{console.log("连接失败")});break;default:this.$store.commit("catchSocketAction",e);break}},websocketClose(t){if(console.log("websocket连接关闭"),this.is_open_socket=!1,this.manMade)return void console.log("页面关闭连接,不进行重连");if(clearInterval(this.heartbeatInterval),this.connectNum<10)return this.manMade=!1,this.reconnect(),void(this.connectNum+=1);this.$store.state.wsStatus=!1,this.connectNum=1,this.websocket=null;let e=r().get("UserInfo");this.$api.commonApi.offlineAPI({user_id:e.user_id}).then(e=>{console.log("connection closed ("+t.code+")")})},start(){this.heartbeatInterval=setInterval(()=>{this.websocketSend({type:"ping"})},this.timeout)},websocketSend(t){var e=JSON.stringify(t);this.checkStatus&&this.websocket.send(e)},checkStatus(){return!(!this.websocket||[2,3].includes(this.websocket.readyState))||(console.log("未链接!"),!1)},close(){this.is_open_socket&&(clearInterval(this.heartbeatInterval),this.websocket.close())},reconnect(){console.log("正在重连..."),clearInterval(this.heartbeatInterval),this.is_open_socket||0!=this.manMade||(console.log(5*this.connectNum+"秒后重新连接..."),this.reconnectTimeOut=setTimeout(()=>{this.initWebSocket()},5e3*this.connectNum))},playAudio(){const t=document.getElementById("chatAudio");t.currentTime=0,t.play()}},created(){this.initWebSocket()},beforeDestroy(){this.close(),this.manMade=!0,clearInterval(this.heartbeatInterval),clearTimeout(this.reconnectTimeOut)}},nt=st,at=(0,d.A)(nt,et,it,!1,null,null,null),ot=at.exports,rt=i(2889),ct=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"group-item"},[e("div",{staticClass:"group-avatar"},[e("el-avatar",{attrs:{shape:"square",src:t.contact.avatar}})],1),e("div",{staticClass:"group-content"},[e("div",{staticClass:"group-title"},[t._v(t._s(t.contact.displayName)+" "),e("span",[t._v("("+t._s(t.groupInfo.groupUserCount)+")")])]),e("div",{staticClass:"group-user"},[t._v("群主:"+t._s(t.groupInfo.ownerName))])])]),e("div",{staticClass:"setting-item"},[e("div",{staticClass:"setting-title"},[t._v("群管理:")]),e("div",{staticClass:"setting-option"},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:t.groupSetting},model:{value:t.setting.manage,callback:function(e){t.$set(t.setting,"manage",e)},expression:"setting.manage"}})],1),t._m(0)]),e("div",{staticClass:"setting-item"},[e("div",{staticClass:"setting-title"},[t._v("群成员邀请:")]),e("div",{staticClass:"setting-option"},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:t.groupSetting},model:{value:t.setting.invite,callback:function(e){t.$set(t.setting,"invite",e)},expression:"setting.invite"}})],1),t._m(1)]),e("div",{staticClass:"setting-item"},[e("div",{staticClass:"setting-title"},[t._v("群成员隐私:")]),e("div",{staticClass:"setting-option"},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:t.groupSetting},model:{value:t.setting.profile,callback:function(e){t.$set(t.setting,"profile",e)},expression:"setting.profile"}})],1),t._m(2)]),e("div",{staticClass:"setting-item"},[e("div",{staticClass:"setting-title"},[t._v("群历史消息:")]),e("div",{staticClass:"setting-option"},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:t.groupSetting},model:{value:t.setting.history,callback:function(e){t.$set(t.setting,"history",e)},expression:"setting.history"}})],1),t._m(3)]),e("div",{staticClass:"setting-item"},[e("div",{staticClass:"setting-title"},[t._v("群禁言:")]),e("div",{staticClass:"setting-option"},[e("el-radio-group",{attrs:{size:"mini"},on:{change:t.groupSetting},model:{value:t.setting.nospeak,callback:function(e){t.$set(t.setting,"nospeak",e)},expression:"setting.nospeak"}},[e("el-radio-button",{attrs:{label:"0"}},[t._v("关闭")]),e("el-radio-button",{attrs:{label:"1"}},[t._v("仅管理员可发言")]),e("el-radio-button",{attrs:{label:"2"}},[t._v("仅群主可发言")])],1)],1)]),e("div",{staticClass:"setting-item"},[e("div",{staticClass:"setting-title"},[t._v("其他操作:")]),e("div",{staticClass:"setting-option"},[e("el-button",{attrs:{size:"mini"},on:{click:t.changeOwner}},[t._v("转让群主")]),e("el-button",{attrs:{size:"mini",type:"danger"},on:{click:t.clearMessage}},[t._v("清空聊天记录")])],1)])])},lt=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-description"},[e("div",{staticClass:"des-title"},[t._v("仅群主和群管理员可以管理")]),e("div",{staticClass:"des-comment"},[t._v("启用后,其他成员不能修改群名称,编辑公告等")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-description"},[e("div",{staticClass:"des-title"},[t._v("允许群成员邀请")]),e("div",{staticClass:"des-comment"},[t._v("启用后,其他成员可以邀请其他人加入群聊")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-description"},[e("div",{staticClass:"des-title"},[t._v("允许添加群成员为好友")]),e("div",{staticClass:"des-comment"},[t._v("启用后,成员可以互相查看资料并添加为好友或发消息")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"setting-description"},[e("div",{staticClass:"des-title"},[t._v("允许成员查看历史消息")]),e("div",{staticClass:"des-comment"},[t._v("启用后,新入群的成员可以查看所有的历史记录")])])}],dt={name:"chatSet",props:{contact:{type:Object,default:{}}},data(){return{setting:{},groupInfo:{}}},methods:{groupSetting(){this.$api.imApi.groupSettingAPI({id:this.contact.id,setting:this.setting})},changeOwner(){this.$emit("changeOwner",this.contact.id)},clearMessage(){this.$confirm("确定情况该群组的所有聊天记录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.clearMessageAPI({id:this.contact.id})}).catch(()=>{this.$message({type:"info",message:"已取消"})})}},created(){this.$api.imApi.getGroupInfoAPI({group_id:this.contact.id}).then(t=>{var e=t.data;this.groupInfo=e,this.setting=e.setting})}},ut=dt,ht=(0,d.A)(ut,ct,lt,!1,null,"6abb37da",null),pt=ht.exports,mt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chatTop"},[e("el-tooltip",{attrs:{content:t.contact.displayName,placement:"top-start",effect:"light"}},[e("div",{staticClass:"top-item",class:t.currentId==t.contact.id?"active":""},[e("div",{staticClass:"avatar"},[e("el-avatar",{attrs:{shape:t.avatarCricle?"circle":"square",size:"small",src:t.contact.avatar}})],1),e("div",{staticClass:"username"},[t._v(" "+t._s(t.contact.displayName)+" ")])])])],1)},gt=[],ft={name:"chatTop",props:{contact:{type:Object,default:{}},currentId:[String,Number],avatarCricle:{type:Boolean,default:!1}},data(){return{}},methods:{},created(){}},vt=ft,bt=(0,d.A)(vt,mt,gt,!1,null,"069c0360",null),yt=bt.exports,Ct=function(){var t=this,e=t._self._c;return e("div",{staticClass:"lum-dialog-mask animated fadeIn"},[e("el-container",{staticClass:"lum-dialog-box"},[e("el-main",{staticClass:"no-padding mian"},[e("div",{staticClass:"music"},[e("span",{staticClass:"line line1",class:{"line-ani":t.animation}}),e("span",{staticClass:"line line2",class:{"line-ani":t.animation}}),e("span",{staticClass:"line line3",class:{"line-ani":t.animation}}),e("span",{staticClass:"line line4",class:{"line-ani":t.animation}}),e("span",{staticClass:"line line5",class:{"line-ani":t.animation}})]),e("div",{staticStyle:{"margin-top":"35px",color:"#676262","font-weight":"300"}},[0==t.recorderStatus?[e("p",{staticStyle:{"font-size":"13px","margin-top":"5px"}},[e("span",[t._v("语音消息,让聊天更简单方便 ...")])])]:1==t.recorderStatus||2==t.recorderStatus||3==t.recorderStatus?[e("p",[t._v(t._s(t.datetime))]),e("p",{staticStyle:{"font-size":"13px","margin-top":"5px"}},[1==t.recorderStatus?e("span",[t._v("正在录音...")]):2==t.recorderStatus?e("span",[t._v("已暂停录音")]):3==t.recorderStatus?e("span",[t._v("录音时长")]):t._e()])]:4==t.recorderStatus||5==t.recorderStatus||6==t.recorderStatus?[e("p",[t._v(t._s(t.formatPlayTime))]),e("p",{staticStyle:{"font-size":"13px","margin-top":"5px"}},[4==t.recorderStatus?e("span",[t._v("正在播放")]):5==t.recorderStatus?e("span",[t._v("已暂停播放")]):6==t.recorderStatus?e("span",[t._v("播放已结束")]):t._e()])]:t._e()],2)]),e("el-footer",{staticClass:"footer",attrs:{height:"60px"}},[e("el-button",{directives:[{name:"show",rawName:"v-show",value:0==t.recorderStatus,expression:"recorderStatus == 0"}],attrs:{type:"primary",size:"small",round:"",icon:"el-icon-microphone"},on:{click:t.startRecorder}},[t._v("开始录音 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:1==t.recorderStatus,expression:"recorderStatus == 1"}],attrs:{type:"warning",size:"small",round:"",icon:"el-icon-video-pause"},on:{click:t.pauseRecorder}},[t._v("暂停录音 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:2==t.recorderStatus,expression:"recorderStatus == 2"}],attrs:{type:"primary",size:"small",round:"",icon:"el-icon-microphone"},on:{click:t.resumeRecorder}},[t._v("继续录音 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:(2==t.recorderStatus||1==t.recorderStatus)&&t.duration>1,expression:"(recorderStatus == 2 || recorderStatus == 1) && duration>1"}],attrs:{type:"danger",size:"small",round:"",icon:"el-icon-microphone"},on:{click:t.stopRecorder}},[t._v("结束录音 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:3==t.recorderStatus||6==t.recorderStatus,expression:"recorderStatus == 3 || recorderStatus == 6"}],attrs:{type:"success",size:"small",round:"",icon:"el-icon-video-play"},on:{click:t.playRecorder}},[t._v("播放录音 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:3==t.recorderStatus||5==t.recorderStatus||6==t.recorderStatus,expression:"\n recorderStatus == 3 || recorderStatus == 5 || recorderStatus == 6\n "}],attrs:{type:"warning",size:"small",round:"",icon:"el-icon-refresh-right"},on:{click:t.startRecorder}},[t._v("重新录音 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:4==t.recorderStatus,expression:"recorderStatus == 4"}],attrs:{type:"info",size:"small",round:"",icon:"el-icon-video-pause"},on:{click:t.pausePlayRecorder}},[t._v("暂停播放 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:5==t.recorderStatus,expression:"recorderStatus == 5"}],attrs:{type:"success",size:"small",round:"",icon:"el-icon-video-play"},on:{click:t.resumePlayRecorder}},[t._v("继续播放 ")]),e("el-button",{directives:[{name:"show",rawName:"v-show",value:3==t.recorderStatus||5==t.recorderStatus||6==t.recorderStatus,expression:"\n recorderStatus == 3 || recorderStatus == 5 || recorderStatus == 6\n "}],attrs:{type:"primary",size:"small",round:""},on:{click:t.submit}},[t._v("立即发送 ")])],1)],1)],1)},xt=[],Et=i(5055),wt=i.n(Et),At={name:"voiceRecorder",data(){return{recorder:null,duration:0,playTime:0,animation:!1,recorderStatus:0,playTimeout:null}},computed:{datetime(){let t=parseInt(this.duration/60/60%24),e=parseInt(this.duration/60%60),i=parseInt(this.duration%60);return t<10&&(t=`0${t}`),e<10&&(e=`0${e}`),i<10&&(i=`0${i}`),`${t}:${e}:${i}`},formatPlayTime(){let t=parseInt(this.playTime/60/60%24),e=parseInt(this.playTime/60%60),i=parseInt(this.playTime%60);return t<10&&(t=`0${t}`),e<10&&(e=`0${e}`),i<10&&(i=`0${i}`),`${t}:${e}:${i}`}},destroyed(){this.recorder&&this.destroyRecorder()},methods:{closeBox(){null!=this.recorder?(1==this.recorderStatus?this.stopRecorder():4==this.recorderStatus&&this.pausePlayRecorder(),this.destroyRecorder(()=>{this.$emit("close",!1)})):this.$emit("close",!1)},startRecorder(){let t=this;this.recorder=new(wt()),this.recorder.onprocess=e=>{e=parseInt(e),t.duration=e},this.recorder.start().then(()=>{this.recorderStatus=1,this.animation=!0},t=>{console.log(`${t.name} : ${t.message}`)})},pauseRecorder(){this.recorder.pause(),this.recorderStatus=2,this.animation=!1},resumeRecorder(){this.recorderStatus=1,this.recorder.resume(),this.animation=!0},stopRecorder(){this.recorderStatus=3,this.recorder.stop(),this.animation=!1},playRecorder(){this.recorderStatus=4,this.recorder.play(),this.playTimeouts(),this.animation=!0},pausePlayRecorder(){this.recorderStatus=5,this.recorder.pausePlay(),clearInterval(this.playTimeout),this.animation=!1},resumePlayRecorder(){this.recorderStatus=4,this.recorder.resumePlay(),this.playTimeouts(),this.animation=!0},destroyRecorder(t){this.recorder.destroy().then(()=>{this.recorder=null,t&&t()})},recorderSize(){return this.recorder.fileSize},playTimeouts(){this.playTimeout=setInterval(()=>{let t=parseInt(this.recorder.getPlayTime());this.playTime=t,t==this.duration&&(clearInterval(this.playTimeout),this.animation=!1,this.recorderStatus=6)},100)},submit(){let t=this.recorder.getWAVBlob(),e=new File([t],"在线录音.wav",{type:t.type,lastModified:Date.now()});this.$emit("send",this.duration,e)}}},kt=At,It=(0,d.A)(kt,Ct,xt,!1,null,"dcd1bb58",null),_t=It.exports,St=i(9745),Tt=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"群二维码分享",visible:t.visible,modal:!0,width:"340px","append-to-body":""},on:{close:t.closeDialog}},[e("el-image",{staticStyle:{width:"300px",height:"432px"},attrs:{src:t.image}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("i",{staticClass:"el-icon-picture-outline f-20"}),e("p",{staticClass:"ml-10 f-18"},[t._v("二维码生成中...")])])]),e("div",{staticClass:"mt-20",attrs:{align:"center"}},[e("el-button",{on:{click:t.saveBase64Image}},[t._v("保存到电脑")])],1),e("vue-canvas-poster",{staticStyle:{display:"none"},attrs:{widthPixels:1e3,painting:t.painting},on:{success:t.success,fail:t.fail}})],1)},Dt=[],Mt=i(3617),Lt={components:{VueCanvasPoster:Mt.VueCanvasPoster},props:{contact:{type:Object,default:()=>({})},visible:{type:Boolean,default:!1}},data(){return{painting:{width:"500px",height:"720px",background:"#ffffff",views:[]},image:""}},watch:{visible(t){t&&this.getGroupUserInfo()}},methods:{success(t){this.image=t},fail(t){},closeDialog(){this.$emit("update:visible",!1),this.image=""},saveBase64Image(){var t=document.createElement("a");t.href=this.image,t.download=this.contact.displayName+".png",t.click()},getGroupUserInfo(){this.$api.imApi.getGroupInfoAPI({group_id:this.contact.id}).then(t=>{var e=t.data;this.painting.views=[{type:"image",url:e.avatar,css:{top:"40px",left:"200px",borderRadius:"8px",width:"100px",height:"100px"}},{type:"text",text:"群聊:"+e.name,css:{top:"160px",left:"50px",width:"400px",maxLines:1,fontSize:"30px",textAlign:"center",color:"#000000",fontWeight:"bloder"}},{type:"qrcode",content:e.qrUrl,css:{top:"240px",left:"70px",color:"#000",width:"360px",height:"360px"}},{type:"text",text:"该二维码7天内("+e.qrExpire+"前)有效",css:{top:"640px",left:"50px",width:"400px",maxLines:1,fontSize:"20px",textAlign:"center",color:"#999"}}]})}}},Nt=Lt,Ot=(0,d.A)(Nt,Tt,Dt,!1,null,null,null),Pt=Ot.exports,Ut=i(3513),Rt=function(){var t=this,e=t._self._c;return e("el-container",[e("el-header",{staticClass:"slider-aside"},[e("el-tabs",{staticClass:"tab-diy",attrs:{"tab-position":"bottom"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"所有文件",name:"all"}}),e("el-tab-pane",{attrs:{label:"我发送的",name:"send"}}),e("el-tab-pane",{attrs:{label:"我收到的",name:"receive"}})],1)],1),e("el-main",{staticClass:"no-padding"},[e("fileItems",{ref:"fileItem"})],1)],1)},jt=[],Bt=i(5772),Ft={name:"files",components:{fileItems:Bt.A},props:{title:{type:String,default:"创建群聊"}},data(){return{selectUid:[],allUser:[],activeName:"all"}},methods:{handleClick(t){"all"==t.name?this.$refs.fileItem.changeRole(0):"send"==t.name?this.$refs.fileItem.changeRole(1):"receive"==t.name&&this.$refs.fileItem.changeRole(2)}}},$t=Ft,Vt=(0,d.A)($t,Rt,jt,!1,null,"37188710",null),Ht=Vt.exports,Kt=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{height:"100%"}},[e("el-scrollbar",{ref:"scrollbar",staticStyle:{height:"400px"}},[e("div",[e("div",{staticClass:"friend-header"},[e("div",[e("img",{staticStyle:{width:"100%",height:"16rem"},attrs:{src:i(9087)}})]),e("div",{staticStyle:{position:"absolute",bottom:"40px",right:"20px"}},[e("span",{staticClass:"mr-5",staticStyle:{color:"#fff"}},[t._v(t._s(t.userInfo.displayName))]),e("img",{staticStyle:{width:"60px",height:"60px","border-radius":"10px"},attrs:{src:t.userInfo.avatar}})]),e("div",{staticClass:"message1"},[e("img",{staticClass:"imge mr-5",attrs:{src:i(6375)},on:{click:function(e){return e.stopPropagation(),t.onmessage.apply(null,arguments)}}}),e("img",{staticClass:"imge",attrs:{src:i(7259)},on:{click:function(e){return e.stopPropagation(),t.Refresh.apply(null,arguments)}}}),t.countNotice>0?e("div",{staticClass:"message_icon"},[t._v(t._s(t.countNotice))]):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:t.messagebool,expression:"messagebool"}],staticClass:"message_div"},[e("el-scrollbar",{ref:"scrollbar1",staticStyle:{height:"200px"}},[e("div",{staticStyle:{padding:"10px 0px","text-align":"center"}},[t._v("消息")]),t._l(t.NoticeList,function(s,n){return e("div",{key:s.id},[e("div",{staticClass:"message_scrollbar_div",attrs:{slot:"reference"},on:{click:function(e){return t.clickshow(s.posts_id,s.posts_user_id)}},slot:"reference"},[e("div",{staticStyle:{padding:"12px 12px 12px 10px"}},[e("img",{staticStyle:{width:"40px","border-radius":"5px"},attrs:{src:s.option_user.avatar}})]),e("div",{staticClass:"message_scrollbar_div1"},[e("div",[e("div",{staticStyle:{color:"#576b95","font-size":"16px","margin-bottom":"5px"}},[t._v(t._s(s.option_user.nickname))]),s.content?e("div",[e("div",{staticClass:"chat-list-text",staticStyle:{"word-break":"break-word"},domProps:{innerHTML:t._s(s.content)}})]):t._e(),1==s.type?e("div",[e("img",{staticClass:"mr-10",staticStyle:{width:"20px"},attrs:{src:i(9865)}})]):t._e(),e("div",{staticStyle:{"font-size":"10px","margin-top":"5px"}},[t._v(t._s(s.create_time))])]),s.file.src?e("div",{staticStyle:{"margin-left":"10px"}},[e("img",{staticStyle:{width:"40px","border-radius":"5px"},attrs:{src:"http://192.168.66.16:8007"+s.file.src}})]):t._e()])])])})],2)],1)])]),t._l(t.list,function(s,n){return e("div",{key:s.id},[e("div",{staticStyle:{padding:"20px"}},[e("div",{staticStyle:{display:"flex"}},[e("div",[e("el-avatar",{staticClass:"mr-5",attrs:{src:s.user.avatar}})],1),e("div",[e("div",[t._v(t._s(s.user.nickname))]),e("div",{staticStyle:{color:"#aaaaaa","font-size":"12px"}},[t._v(t._s(s.create_time))])])]),t.contenthtml(s.content)?e("div",{staticClass:"text-content",staticStyle:{cursor:"pointer"},on:{click:function(e){return t.handleLink(s.content)}}},[t._v(t._s(s.content))]):e("div",{staticClass:"chat-list-text",domProps:{innerHTML:t._s(s.content)}}),e("div",{staticStyle:{display:"flex","flex-wrap":"wrap",width:"350px","margin-top":"10px"}},t._l(s.files,function(i,s){return e("div",{key:i.file_id,staticStyle:{"margin-right":"10px","margin-bottom":"10px"}},[1==i.type?e("div",{on:{click:function(e){return t.$preview("http://192.168.66.16:8007/view.html?src=http://192.168.66.16:8007"+i.src)}}},[e("img",{staticStyle:{width:"100px",height:"100px"},attrs:{src:"http://192.168.66.16:8007"+i.src}})]):t._e(),2==i.type?e("div",[e("video",{staticStyle:{"max-width":"150px"},attrs:{src:"http://192.168.66.16:8007"+i.src,controls:""}})]):t._e()])}),0),s.location?e("div",{staticStyle:{cursor:"pointer",display:"flex","margin-top":"10px"},on:{click:function(e){return t.openAmap(s.location,s.location_address)}}},[e("i",{staticClass:"el-icon-location-outline",staticStyle:{"font-size":"20px"}}),e("div",[t._v(t._s(s.location_address))])]):t._e(),e("div",{staticStyle:{display:"flex","justify-content":"space-between"}},[e("div"),e("div",{staticStyle:{display:"flex"}},[e("div",{on:{click:function(e){return t.onLike(s.id)}}},[1===s.is_like?e("img",{staticClass:"mr-10 Like",attrs:{src:i(228)}}):e("img",{staticClass:"mr-10 Like",attrs:{src:i(9865)}})]),e("div",{on:{click:function(e){return t.onchat(n)}}},[e("img",{staticClass:"Like mr-10",attrs:{src:i(66)}})]),s.user_id==t.userInfo.user_id?e("div",[e("el-popconfirm",{attrs:{title:"是否要删除该内容"},on:{confirm:function(e){return t.Delete(s.id)}}},[e("el-button",{staticStyle:{"font-size":"20px",color:"#c7c7c7",padding:"0px"},attrs:{slot:"reference",type:"text",icon:"el-icon-delete",circle:""},slot:"reference"})],1)],1):t._e()])]),0!=s.likes.length?e("div",{staticClass:"flex Likeview"},t._l(s.likes,function(s,n){return e("div",{key:n,staticStyle:{"margin-right":"13px",display:"flex","flex-wrap":"wrap"}},[e("img",{staticClass:"Like",attrs:{src:i(228)}}),e("div",{staticStyle:{"margin-left":"2px"}},[t._v(t._s(s.nickname))])])}),0):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:t.numindex===n&&t.boll,expression:"numindex === index&&boll"}]},[e("div",{staticStyle:{position:"relative","margin-top":"10px","margin-bottom":"10px",border:"1px solid #ccc"}},[e("div",{style:{"padding-bottom":"45px",width:t.isFulls?"1150px":"895px"}},[e("quill-editor",{key:`editor-${s.id}-${n}`,ref:"quillEditor",refInFor:!0,attrs:{options:t.editorOptions},on:{change:e=>t.onEditorChange(e,n)}})],1),e("div",{staticClass:"emoji"},[e("div",{staticClass:"mr-10"},[e("img",{staticStyle:{cursor:"pointer"},attrs:{src:i(2410),width:"28"},on:{click:t.showAppBox}}),t.isFocus?e("el-scrollbar",{staticClass:"icon"},[e("div",{staticStyle:{display:"flex","flex-wrap":"wrap"}},t._l(t.emoji,function(i,s){return e("div",{key:s,staticClass:"im-emoji-item"},[e("img",{staticStyle:{width:"20px",height:"20px",cursor:"pointer"},attrs:{src:i.src},on:{click:function(e){return t.chooseEmoji(i)}}})])}),0)]):t._e()],1),e("div",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.sendTextMsg(s.id,n)}}},[t._v("发送")])],1)])])]),t._l(s.comment,function(i,s){return e("div",{key:s},[e("div",{staticClass:"comment_view"},[e("div",[e("div",{staticClass:"comment_view1",on:{click:function(e){return e.stopPropagation(),t.onchat(n,i.id)}}},[e("div",[""!==i.reply_user_name?e("div",{staticStyle:{display:"flex"}},[e("div",[t._v(t._s(i.nickname)+" "),e("span",{staticStyle:{color:"#000","margin-right":"5px"}},[t._v("回复")])]),e("div",[t._v(" "+t._s(i.reply_user_name)+":")])]):e("div",[t._v(t._s(i.nickname)+":")])]),e("div",{staticStyle:{flex:"1","min-width":"0","word-break":"break-word"}},[t.contenthtml(i.content)?e("div",{staticClass:"chat-list-text",staticStyle:{cursor:"pointer"},domProps:{innerHTML:t._s(i.content)},on:{click:function(e){return t.handleLink(i.content)}}}):e("div",{staticClass:"chat-list-text",domProps:{innerHTML:t._s(i.content)}})])])])])])})],2)])})],2)]),t.dialogVisible?e("fndialog",{attrs:{details:t.details,dialogVisible:t.dialogVisible},on:{dialog:function(e){t.dialogVisible=e}}}):t._e()],1)},zt=[],Gt={components:{quillEditor:A.quillEditor,fndialog:S},data(){return{userUrl:{NODE_ENV:"production",BASE_URL:"app://./",IS_ELECTRON:!0}.VUE_APP_BASE_API,userInfo:{},page:1,limit:20,page1:1,limit1:20,list:[],bol:!1,bol1:!1,numindex:-1,boll:!1,bolle:!1,textarea:"",isFocus:!1,isFocus1:!1,countNotice:0,NoticeList:[],messagebool:!1,scrollHeight:!1,details:{},emoji:w[0].children,dialogVisible:!1,NoticeContent:"",editorOptions:{theme:"snow",placeholder:"",modules:{toolbar:!1}}}},computed:{...(0,v.aH)({socketAction:t=>t.socketAction,isFulls:t=>t.isFulls})},watch:{socketAction(t){t.data;switch(t.type){case"postsNotice":this.getNoticeCount();break}}},created(){this.userInfo=this.$store.state.userInfo,this.friendsCircleList(),this.getNoticeCount(),this.getNoticeList()},mounted(){this.addScrollListener(),this.addScrollListener1()},methods:{friendsCircleList(t){this.bol||this.$api.messageApi.friendsCircleList({page:this.page,limit:this.limit}).then(e=>{const i=e.data.map(t=>({...t,commentContent:""}));0==e.code&&1==this.page?this.list=i:0==e.code&&this.page>1&&(this.list=this.list.concat(i)),e.count==this.list.length&&(this.bol=!0),this.$nextTick(this.resetAllEditors),1==t&&this.$message.success("刷新成功!")})},resetAllEditors(){this.$refs.quillEditor&&this.$refs.quillEditor.forEach(t=>{t.quill&&(t.quill.root.innerHTML="")}),this.numindex=-1,this.boll=!1,localStorage.removeItem("pid")},contenthtml(t){return t&&(t.includes("http://")||t.includes("https://"))},handleLink(t){const e=t.replace(/<[^>]+>/g,""),i=/https?:\/\/[^\s"']+/g,s=e.match(i)||[];s.length>0&&(window.electronRequire?window.electronRequire("electron").ipcRenderer.send("open-external-url",s):window.open(s,"_blank"))},getNoticeCount(){this.$api.messageApi.getNoticeCount().then(t=>{this.countNotice=t.data.count})},getNoticeList(){this.bol1||this.$api.messageApi.getNoticeList({page:this.page1,limit:this.limit1}).then(t=>{0==t.code&&1==this.page1?this.NoticeList=t.data:0==t.code&&this.page1>1&&(this.NoticeList=this.NoticeList.concat(t.data)),t.count==this.NoticeList.length&&(this.bol1=!0)})},Refresh(){this.page=1,this.friendsCircleList(1),this.$forceUpdate(),1==this.messagebool&&(this.page1=1,this.getNoticeList(),this.countNotice=0)},addScrollListener(){const t=this.$refs.scrollbar.wrap;t.addEventListener("scroll",this.handleScroll)},addScrollListener1(){const t=this.$refs.scrollbar1.wrap;t.addEventListener("scroll",this.handleScroll1)},handleScroll1(){const t=this.$refs.scrollbar1.wrap,e=t.scrollTop,i=t.clientHeight,s=t.scrollHeight;e+i>=s-1&&(this.page1++,this.getNoticeList())},handleScroll(){const t=this.$refs.scrollbar.wrap,e=t.scrollTop,i=t.clientHeight,s=t.scrollHeight;e>0&&(this.scrollHeight=!1),e+i>=s-1&&0==this.scrollHeight&&(this.page++,this.friendsCircleList())},clickshow(t,e){localStorage.setItem("pid1",e),this.details.posts_id=t,this.details.friend_user_id=this.userInfo.user_id==e?"":e,this.dialogVisible=!0},onEditorChange({quill:t,html:e,text:i},s){this.list[s].commentContent=e},showAppBox(){this.isFocus=!this.isFocus,1==this.isFocus&&this.$refs.quillEditor[this.numindex].quill.focus()},Delete(t){this.$api.messageApi.del({posts_id:t}).then(t=>{0==t.code&&(this.$message.success("删除成功!"),this.friendsCircleList())})},onLike(t){this.$api.messageApi.like({posts_id:t}).then(t=>{this.friendsCircleList()})},onchat(t,e){if(this.numindex===t)return this.boll=!1,localStorage.removeItem("pid"),void(this.numindex=-1);this.numindex=t,this.boll=!this.boll,e&&1==this.boll?localStorage.setItem("pid",e):localStorage.removeItem("pid")},chooseEmoji(t){const e=this.$refs.quillEditor[this.numindex].quill,i=e.getSelection();if(i){const s=`<img src="${t.src}" style="width:20px;height:20px;margin:0 2px;vertical-align:middle;">`;e.clipboard.dangerouslyPasteHTML(i.index,s),e.setSelection(i.index+1)}this.isFocus=!1},sendTextMsg(t,e){const i=localStorage.getItem("pid");localStorage.getItem("pid1");this.$nextTick(()=>{let s="",n=null;this.scrollHeight=!0,s=this.list[e]?.commentContent||"",this.$refs.quillEditor&&this.$refs.quillEditor[e]&&(n=this.$refs.quillEditor[e].quill);const a=/^\s*$/.test(s.replace(/<[^>]+>/g,"")),o=/<img\b/i.test(s);if(!s||a&&!o)return void this.$message.error("内容不能为空!");let r={posts_id:t,content:s,pid:i||""};this.$api.messageApi.comment(r).then(t=>{localStorage.removeItem("pid"),this.$set(this.list[e],"commentContent",""),n&&n.setText(""),this.page=1,this.list=[],this.friendsCircleList(),this.boll=!1})})},onmessage(){this.messagebool=!this.messagebool,1==this.messagebool&&(this.page1=1,this.getNoticeList(),this.countNotice=0)},openAmap(t,e){let[i,s]=t.split("+");const n=e.replace(/\[位置\]\s*/g,""),a=`https://uri.amap.com/marker?position=${s},${i}&name=${encodeURIComponent(n)}`;window.electronRequire?window.electronRequire("electron").ipcRenderer.send("open-external-url",a):window.open(a,"_blank")}}},qt=Gt,Qt=(0,d.A)(qt,Kt,zt,!1,null,"7933bff7",null),Yt=Qt.exports,Jt=function(){var t=this,e=t._self._c;return e("el-tabs",{staticStyle:{height:"100%"},attrs:{"tab-position":"left"}},[e("el-tab-pane",{staticClass:"pd-20",attrs:{label:"账号设置"}},[e("div",{staticClass:"user-center"},[e("div",{staticClass:"user-avatar"},[e("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{multiple:!1,action:t.getUrl,"show-file-list":!1,data:{type:1},headers:t.getToken,"on-success":t.handleAvatarSuccess,"auto-upload":!1,"on-change":t.change,"before-upload":t.before,"http-request":t.request}},[e("el-image",{staticClass:"m-20",staticStyle:{width:"160px","border-radius":"8px",overflow:"hidden"},attrs:{src:t.user.avatar}}),e("el-button",{staticClass:"replace-picture-button mab-30",attrs:{size:"mini"}},[t._v("更换头像")])],1),e("el-dialog",{attrs:{title:"头像剪裁","close-on-click-modal":!1,visible:t.cropperDialogVisible,width:"580px","append-to-body":!0,"show-close":!0},on:{"update:visible":function(e){t.cropperDialogVisible=e},closed:function(e){return t.$refs.upload.clearFiles()}},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:function(e){t.cropperDialogVisible=!1,t.$refs.upload.clearFiles()}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.cropperSave}},[t._v("确 定")])]},proxy:!0}])},[e("Cropper",{key:t.componentsKey,ref:"cropper",attrs:{src:t.cropperImg,compress:t.compress,aspectRatio:t.aspectRatio}})],1),e("div",{staticClass:"mt-20"},[e("el-button",{attrs:{type:"warning"},on:{click:function(e){return t.editInfo(1)}}},[t._v("修改密码")])],1)],1),e("div",{staticClass:"user-info"},[e("el-form",{ref:"userinfo",attrs:{model:t.user,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"登陆账号",prop:"account"}},[t._v(" "+t._s(t.user.account)+" "),e("span",{staticClass:"fc-primary ml-10 cur-handle",on:{click:function(e){return t.editInfo(0)}}},[t._v("修改")])]),1==t.$store.state.globalConfig.sysInfo.runMode&&1!=t.$store.state.globalConfig.sysInfo.diyName?e("el-form-item",{attrs:{label:"姓名"}},[t._v(" "+t._s(t.user.realname)+" ")]):e("el-form-item",{attrs:{label:"昵称"}},[e("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入昵称",maxlength:"20"},model:{value:t.user.realname,callback:function(e){t.$set(t.user,"realname",e)},expression:"user.realname"}})],1),e("el-form-item",{attrs:{label:"e-mail"}},[e("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"请输入邮箱地址",maxlength:"120"},model:{value:t.user.email,callback:function(e){t.$set(t.user,"email",e)},expression:"user.email"}})],1),e("el-form-item",{attrs:{label:"性别"}},[e("el-radio-group",{model:{value:t.user.sex,callback:function(e){t.$set(t.user,"sex",e)},expression:"user.sex"}},[e("el-radio",{attrs:{label:2,border:""}},[t._v("未知")]),e("el-radio",{attrs:{label:1,border:""}},[t._v("男")]),e("el-radio",{attrs:{label:0,border:""}},[t._v("女")])],1)],1),e("el-form-item",{attrs:{label:"个性签名"}},[e("el-input",{staticStyle:{width:"400px"},attrs:{type:"textarea",rows:3,maxlength:"100","show-word-limit":""},model:{value:t.user.motto,callback:function(e){t.$set(t.user,"motto",e)},expression:"user.motto"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm()}}},[t._v("保存")])],1)],1)],1)]),e("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialog,modal:!0,width:"400px","append-to-body":""},on:{"update:visible":function(e){t.dialog=e}}},[e("el-form",{attrs:{"label-width":"100px"}},[e("el-form-item",{attrs:{label:"当前账号"}},[t._v(" "+t._s(t.user.account)+" ")]),e("el-alert",{staticClass:"mb-20",attrs:{title:"验证账户的真实性,绑定后请使用新账户来重新登录!",type:"warning"}}),t.user.is_auth?e("el-form-item",{attrs:{label:"验证码"}},[e("el-input",{staticStyle:{width:"260px"},attrs:{placeholder:"请输入验证码",maxlength:"6"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}},[e("el-button",{attrs:{slot:"append",loading:t.loading},on:{click:function(e){return t.sendCode(!0)}},slot:"append"},[t._v("发送验证码")])],1)],1):t._e(),!t.editPass||t.globalConfig.sysInfo.regauth&&t.user.is_auth?t._e():e("el-form-item",{attrs:{label:"原密码"}},[e("el-input",{attrs:{"show-password":"",placeholder:"请输入原来的密码"},model:{value:t.originalPassword,callback:function(e){t.originalPassword=e},expression:"originalPassword"}})],1),t.editPass?t._e():e("el-form-item",{attrs:{label:"新账号"}},[e("el-input",{attrs:{placeholder:"请输入新的账号"},model:{value:t.account,callback:function(e){t.account=e},expression:"account"}})],1),t.editPass?t._e():e("el-form-item",{attrs:{label:"新账号验证码"}},[e("el-input",{staticStyle:{width:"260px"},attrs:{placeholder:"请输入新账号验证码",maxlength:"6"},model:{value:t.newCode,callback:function(e){t.newCode=e},expression:"newCode"}},[e("el-button",{attrs:{slot:"append",loading:t.loading},on:{click:function(e){return t.sendCode(!1)}},slot:"append"},[t._v("发送验证码")])],1)],1),t.editPass?e("el-form-item",{attrs:{label:"新密码"}},[e("el-input",{attrs:{"show-password":"",placeholder:"请输入密码"},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}})],1):t._e(),t.editPass?e("el-form-item",{attrs:{label:"重复密码"}},[e("el-input",{attrs:{"show-password":"",placeholder:"请输入重复输入密码"},model:{value:t.repass,callback:function(e){t.repass=e},expression:"repass"}})],1):t._e(),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.editPassword()}}},[t._v("保存")])],1)],1)],1),e("div",{staticClass:"mt-40",attrs:{align:"center"}},[e("el-button",{staticStyle:{width:"150px"},attrs:{type:"danger",plain:"",round:""},on:{click:t.logout}},[t._v("退出登录")])],1)],1),e("el-tab-pane",{staticClass:"pd-20",attrs:{label:"通用设置"}},[e("el-form",{ref:"form",attrs:{model:t.setting,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"发送消息:"}},[e("el-radio-group",{model:{value:t.setting.sendKey,callback:function(e){t.$set(t.setting,"sendKey",e)},expression:"setting.sendKey"}},[e("el-radio-button",{attrs:{label:"1"}},[t._v("Enter")]),e("el-radio-button",{attrs:{label:"2"}},[t._v("Ctrl + Enter")])],1)],1),e("el-form-item",{attrs:{label:"系统主题:"}},[e("el-radio-group",{model:{value:t.setting.theme,callback:function(e){t.$set(t.setting,"theme",e)},expression:"setting.theme"}},[e("el-radio-button",{attrs:{label:"default"}}),e("el-radio-button",{attrs:{label:"blue"}})],1)],1)],1),e("div",{staticClass:"setting-switch"},[e("el-switch",{model:{value:t.setting.isVoice,callback:function(e){t.$set(t.setting,"isVoice",e)},expression:"setting.isVoice"}}),t._v(" 开启新消息声音提醒 ")],1),e("div",{staticClass:"setting-switch"},[e("el-switch",{model:{value:t.setting.avatarCricle,callback:function(e){t.$set(t.setting,"avatarCricle",e)},expression:"setting.avatarCricle"}}),t._v(" 开启聊天圆形头像(需要刷新) ")],1),e("div",{staticClass:"setting-switch"},[e("el-switch",{model:{value:t.setting.hideMessageName,callback:function(e){t.$set(t.setting,"hideMessageName",e)},expression:"setting.hideMessageName"}}),t._v(" 是否隐藏聊天窗口内的联系人名字 ")],1),e("div",{staticClass:"setting-switch"},[e("el-switch",{model:{value:t.setting.hideMessageTime,callback:function(e){t.$set(t.setting,"hideMessageTime",e)},expression:"setting.hideMessageTime"}}),t._v(" 是否隐藏聊天窗口内的消息发送时间 ")],1)],1),1==parseInt(t.globalConfig.demon_mode)?e("el-tab-pane",{staticClass:"pd-20",attrs:{label:"关于 IM"}},[e("div",{staticClass:"about-logo"},[e("el-avatar",{attrs:{src:t.$packageData.logo,size:50}}),e("br"),e("br"),e("p",[e("span",{staticClass:"fc-primary"},[t._v(" "+t._s(t.$packageData.name)+" ")]),t._v("for "+t._s(t.$packageData.version)+" ")])],1),e("div",{staticClass:"setting-version"},[e("b",[t._v(" 已经支持功能:")]),t._l(t.$packageData.funcList,function(i){return e("p",{key:i.icon},[e("i",{class:i.icon}),t._v(" "+t._s(i.text))])})],2)]):t._e(),1==parseInt(t.globalConfig.demon_mode)?e("el-tab-pane",{staticClass:"pd-20",attrs:{label:"开源"}},[e("div",{staticClass:"about-logo"},[e("el-avatar",{attrs:{src:t.$packageData.logo,size:50}}),e("br"),e("br"),e("p",[e("span",{staticClass:"fc-primary"},[t._v(" "+t._s(t.$packageData.name)+" ")]),t._v("for "+t._s(t.$packageData.version)+" ")])],1),e("div",{staticClass:"setting-version"},[e("p",[t._v(" 前端地址:"),e("a",{staticClass:"fc-primary",attrs:{href:t.$packageData.frontUrl,target:"_blank"}},[t._v("[链接] im-chat-front")])]),e("p",[t._v(" 后端地址:"),e("a",{staticClass:"fc-primary",attrs:{href:t.$packageData.backstageUrl,target:"_blank"}},[t._v("[链接] im-instant-chat")])])]),e("div",{staticClass:"setting-version",staticStyle:{color:"#a6a6a6"}},[e("p",[t._v("前端技术栈:vue+Lemon-IMUI+element-UI")]),e("p",[t._v("后端技术栈:thinkphp6+workerman")])]),e("div",{staticClass:"setting-version"},[e("p",[t._v(" QQ交流群: "),e("a",{staticClass:"fc-primary",attrs:{href:t.$packageData.qqGroupUrl,target:"_blank"}},[t._v("336921267")])])])]):t._e()],1)},Wt=[],Zt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"sc-cropper"},[e("div",{staticClass:"sc-cropper__img"},[e("img",{ref:"img",attrs:{src:t.src}})]),e("div",{staticClass:"sc-cropper__preview"},[e("h4",[t._v("图像预览")]),e("div",{ref:"preview",staticClass:"sc-cropper__preview__img"})])])},Xt=[],te=i(5492),ee=i.n(te),ie={props:{src:{type:String,default:""},compress:{type:Number,default:1},aspectRatio:{type:Number,default:NaN}},data(){return{crop:null}},watch:{aspectRatio(t){this.crop.setAspectRatio(t)}},mounted(){this.init()},methods:{init(){this.crop=new(ee())(this.$refs.img,{viewMode:2,dragMode:"move",responsive:!1,aspectRatio:this.aspectRatio,preview:this.$refs.preview})},setAspectRatio(t){this.crop.setAspectRatio(t)},getCropData(t,e="image/jpeg"){t(this.crop.getCroppedCanvas().toDataURL(e,this.compress))},getCropBlob(t,e="image/jpeg"){this.crop.getCroppedCanvas().toBlob(e=>{t(e)},e,this.compress)},getCropFile(t,e="fileName.jpg",i="image/jpeg"){this.crop.getCroppedCanvas({width:240,height:240}).toBlob(s=>{let n=new File([s],e,{type:i});t(n)},i,this.compress)}}},se=ie,ne=(0,d.A)(se,Zt,Xt,!1,null,"5f07d210",null),ae=ne.exports;r().get("UserInfo");var oe={name:"manageGroup",props:{},components:{Cropper:ae},data(){return{componentsKey:1,maxSize:5,compress:1,aspectRatio:1,cropperDialogVisible:!1,cropper:!0,cropperImg:"",tempImg:"",dialogVisible:!1,dialog:!1,dialogTitle:"修改密码",editPass:1,originalPassword:"",account:"",password:"",repass:"",code:"",newCode:"",loading:!1}},computed:{...(0,v.aH)({setting:t=>t.setting,user:t=>t.userInfo,globalConfig:t=>t.globalConfig}),getUrl(){return window.BASE_URL+"/common/upload/uploadAvatar"},getToken(){const t=r().get("authToken");return{Authorization:t}}},watch:{setting:{handler(t,e){this.$api.imApi.settingAPI(t);let i=r().get("UserInfo");i.setting=t,r().set("UserInfo",i)},deep:!0},editPass(t){this.dialogTitle=1==t?"修改密码":"修改账号"}},methods:{logout(){this.$confirm("确定退出登录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push("/login")})}).catch(()=>{})},submitForm(){if(""==this.user.realname)return this.$message.error("请输入昵称"),!1;let t={realname:this.user.realname,email:this.user.email,sex:this.user.sex,motto:this.user.motto};this.$api.imApi.updateUserInfo(t).then(t=>{if(0==t.code){this.$message.success("修改成功");let t=JSON.parse(JSON.stringify(this.user));this.$store.commit("SET_USERINFO",t)}})},isImg(t){var e="(.jpg|.png|.gif|.jpeg)$",i=new RegExp(e);i.test(t.toLowerCase())?this.fileIsImg=!0:this.fileIsImg=!1},change(t){if(this.cropper&&"ready"==t.status){if(this.isImg(t.name),!this.fileIsImg)return this.$message.error("选择的文件非图像类文件"),!1;this.componentsKey++,this.cropperDialogVisible=!0,this.cropperImg=URL.createObjectURL(t.raw)}},before(t){t=this.cropper?this.cropperUploadFile:t;const e=t.size/1024/1024<this.maxSize;if(!e)return this.$message.warning(`上传文件大小不能超过 ${this.maxSize}MB!`),!1;this.isImg(t.name),this.tempImg=URL.createObjectURL(t)},request(t){const e=this.$loading({lock:!0,text:"Loading"}),i=new FormData;var s=this.cropper?this.cropperUploadFile:t.file;i.append("file",s),i.append("type",1),this.$api.commonApi.uploadAvatar(i).then(i=>{this.cropperImg="",e.close(),this.handleAvatarSuccess(i),t.onSuccess(i)}).catch(i=>{e.close(),t.onError(i)})},cropperSave(){var t=this.$refs.upload.uploadFiles[0].raw;this.$refs.cropper.getCropFile(t=>{this.cropperUploadFile=t,this.$refs.upload.submit(),this.cropperDialogVisible=!1},t.name,t.type)},handleAvatarSuccess(t,e){let i=this.$store.state.userInfo;this.$set(i,"avatar",t.data),this.$store.commit("SET_USERINFO",i)},editInfo(t){this.dialog=!0,this.editPass=t},editPassword(){if(""==this.code&&this.user.is_auth)return this.$message({message:"请输入验证码",type:"warning"}),!1;if(this.editPass){if(""==this.password||this.password.length<6||this.password.length>16)return this.$message({message:"请输入6-16个字符串的密码",type:"warning"}),!1;if(this.password!=this.repass)return this.$message({message:"两次密码不一致",type:"warning"}),!1;if(!this.originalPassword)return this.$message({message:"请输入原密码",type:"warning"}),!1;let t={password:this.password,code:this.code,originalPassword:this.originalPassword};this.$api.imApi.editPassword(t).then(t=>{0==t.code&&(this.dialog=!1,this.password="",this.repass="",this.$message({message:t.msg,type:"success"}))})}else{if(""==this.account)return this.$message({message:"请输入账号",type:"warning"}),!1;if(""==this.newCode)return this.$message({message:"请输入新账户验证码",type:"warning"}),!1;let t={account:this.account,code:this.code,newCode:this.newCode};this.$api.imApi.editAccount(t).then(t=>{0==t.code&&(this.dialog=!1,this.account="",this.code="",this.newCode="",this.$message({message:t.msg,type:"success"}),this.$store.dispatch("LogOut").then(()=>{this.$router.push("/login")}))})}},sendCode(t){let e=t?this.user.account:this.account,i=this.editPass?3:4;if(""==e)return this.$message({message:"请输入新的账号",type:"warning"}),!1;this.loading=!0,this.$store.dispatch("sendCode",{type:i,account:e}).then(t=>{this.$message.success("发送成功"),this.loading=!1}).catch(()=>{this.loading=!1})}}},re=oe,ce=(0,d.A)(re,Jt,Wt,!1,null,"05277269",null),le=ce.exports,de=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"添加好友",visible:t.visible,modal:!0,width:t.width,"append-to-body":""},on:{close:t.closeDialog}},[e("div",{staticClass:"mb-20"},[e("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入账号进行搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleChange.apply(null,arguments)}},model:{value:t.keywords,callback:function(e){t.keywords=e},expression:"keywords"}},[e("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.handleChange},slot:"append"})],1)],1),e("div",{staticClass:"dialog-main"},[e("div",{staticClass:"member-list"},t._l(t.list,function(i){return e("div",{key:i.user_id,staticClass:"member-item",on:{click:function(e){return t.$user(i.user_id)}}},[e("div",{staticClass:"member-avatar"},[e("img",{attrs:{src:i.avatar,alt:"avatar"}})]),e("div",{staticClass:"member-content"},[e("div",{staticClass:"member-header"},[e("span",{staticClass:"member-name"},[t._v(t._s(i.realname))]),e("span",{staticClass:"member-account"},[t._v(t._s(i.account))])]),e("div",{staticClass:"member-actions"},[e("el-button",{attrs:{type:"primary",size:"mini"}},[t._v("查看")])],1)])])}),0),0==t.list.length?e("el-empty"):t._e()],1)])},ue=[],he={name:"addFriend",props:{visible:{type:Boolean,default:!1},width:{type:String,default:"612px"}},data(){return{keywords:"",list:[]}},mounted(){},methods:{closeDialog(){this.$emit("update:visible",!1),this.selectUid=[]},handleChange(){this.keywords&&this.$api.imApi.searchUser({keywords:this.keywords}).then(t=>{this.list=t.data})}}},pe=he,me=(0,d.A)(pe,de,ue,!1,null,"18f3aea4",null),ge=me.exports,fe=function(){var t=this,e=t._self._c;return e("span",{staticClass:"sc-state",class:[{"sc-status-processing":t.pulse},"sc-state-bg--"+t.type]})},ve=[],be={props:{type:{type:String,default:"primary"},pulse:{type:[Boolean,Number],default:!0}}},ye=be,Ce=(0,d.A)(ye,fe,ve,!1,null,"bf2f9cfc",null),xe=Ce.exports,Ee=function(){var t=this,e=t._self._c;return e("div",{staticClass:"tab-main lz-flex lz-justify-content-start lz-align-items-center",style:{height:t.height+"px"}},t._l(t.values,function(i,s){return e("div",{staticClass:"tab-item",class:t.active==s?"active":"",style:{height:t.itemHeight+"px",borderRadius:t.itemHeight+"px",lineHeight:t.itemHeight+"px"},on:{click:function(e){return t.changeItem(i,s)}}},[t._v(" "+t._s(i.name)+" "),i.count>0?e("span",[t._v(t._s(i.count>99?"99+":i.count))]):t._e()])}),0)},we=[],Ae={name:"im-tab",components:{},props:{values:{type:Array,default:function(){return[]}},height:{type:Number,default:40}},data(){return{active:0,itemHeight:24}},created:function(){this.itemHeight=this.height-16},methods:{changeItem(t,e){this.active=e,this.$emit("change",t,e)}}},ke=Ae,Ie=(0,d.A)(ke,Ee,we,!1,null,"e57a8f0a",null),_e=Ie.exports,Se=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"show",rawName:"v-show",value:t.status,expression:"status"}],staticClass:"webrtc-box",style:{top:t.position.y+"px",left:t.position.x+"px",height:t.boxHeight+"px"}},[t._m(0),t._m(1),e("div",{staticClass:"draggable-div",on:{mousedown:t.startDrag}},[t._v("音视频通话")]),e("video",{directives:[{name:"show",rawName:"v-show",value:t.localStream&&t.is_video,expression:"localStream && is_video"}],ref:"localvideo",staticClass:"localvideo",attrs:{autoplay:"",playsinline:"",muted:""},domProps:{muted:!0}}),e("video",{directives:[{name:"show",rawName:"v-show",value:t.remoteStream&&t.is_video,expression:"remoteStream && is_video"}],ref:"remotevideo",staticClass:"remotevideo",attrs:{autoplay:"",playsinline:""}}),e("div",[t.caller?e("div",{staticClass:"call-user"},[2==t.status&&t.is_video?t._e():e("img",{staticClass:"avatar",attrs:{src:t.caller.avatar,alt:""}}),e("div",{staticClass:"text"},[t.is_video||2!=t.status?t._e():e("b",[t._v(t._s(t.caller.displayName))]),2!=t.status?e("span",[t.isReceived?e("span",[t._v(" "+t._s(t.caller.displayName)+" 正在请求与您"+t._s(t.is_video?"视频":"语音")+"通话")]):e("span",[t._v("您正对 "),e("b",[t._v(t._s(t.caller.displayName))]),t._v(" 发起"+t._s(t.is_video?"视频":"语音")+"通话")])]):t._e()]),t.callTime&&2==t.status?e("div",{staticClass:"call-time"},[t._v(" "+t._s(t.setCallTime())+" ")]):t._e()]):t._e(),e("div",{staticClass:"calling-button"},[t.caller&&3==t.status?e("div",{staticClass:"button"},[e("img",{staticClass:"image",attrs:{src:i(1134)},on:{click:function(e){return t.answer()}}}),e("div",{staticClass:"text"},[t._v("接听")])]):t._e(),2==t.status?e("div",{staticClass:"button"},[e("img",{staticClass:"image-icon",attrs:{src:t.voiceStatus?t.voiceIcon:t.voiceOffIcon},on:{click:function(e){return t.switchVoice()}}})]):t._e(),t.caller&&0!=t.status?e("div",{staticClass:"button"},[e("img",{staticClass:"image",attrs:{src:i(2431)},on:{click:function(e){return t.hangup(!0)}}}),e("div",{staticClass:"text"},[t._v("挂断")])]):t._e(),2==t.status?e("div",{staticClass:"button"},[t.is_video?e("img",{staticClass:"image-icon",attrs:{src:t.videoStatus?t.videoIcon:t.videoOffIcon},on:{click:function(e){return t.switchVideo()}}}):e("div",{staticClass:"image-icon"})]):t._e()])])])},Te=[function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"music1"}},[e("source",{attrs:{src:i(4186)}})])},function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"music2"}},[e("source",{attrs:{src:i(1823)}})])}],De={name:"webrtc",props:{contact:{type:Object,default:{}},userInfo:{type:Object,default:{}},config:{type:Object,default:{}},alias:{type:String,default:"raingad"}},data(){return{position:{x:100,y:100},isDragging:!1,dragOffset:{x:0,y:0},boxWidth:310,boxHeight:300,voiceIcon:i(8028),voiceOffIcon:i(7076),videoIcon:i(3597),videoOffIcon:i(285),pc:null,hasCamera:!1,status:0,localVideo:"",remoteVideo:"",remoteStream:null,localStream:null,caller:null,is_video:1,isReceived:!1,videoStatus:!0,voiceStatus:!0,cutdown:40,timer:null,offerParams:{},callTime:0,timerIntervalId:null}},watch:{status(t){2==t?this.is_video?this.boxHeight=620:this.boxHeight=300:1==t&&this.is_video?this.boxHeight=450:this.boxHeight=250},boxHeight(t){window.innerHeight-t<this.position.y&&(this.position.y=window.innerHeight-t-20)}},mounted(){this.localVideo=this.$refs.localvideo,this.remoteVideo=this.$refs.remotevideo,this.checkForCamera(),this.position={x:window.innerWidth-this.boxWidth-10,y:window.innerHeight-this.boxHeight-20}},methods:{startDrag(t){this.isDragging=!0,this.dragOffset={x:t.clientX-this.position.x,y:t.clientY-this.position.y},document.addEventListener("mousemove",this.onDrag),document.addEventListener("mouseup",this.stopDrag)},onDrag(t){if(this.isDragging){let e=t.clientX-this.dragOffset.x,i=t.clientY-this.dragOffset.y;e=Math.max(0,Math.min(e,window.innerWidth-this.boxWidth)),i=Math.max(0,Math.min(i,window.innerHeight-this.boxHeight-20)),this.position={x:e,y:i}}},stopDrag(){this.isDragging=!1,document.removeEventListener("mousemove",this.onDrag),document.removeEventListener("mouseup",this.stopDrag)},initPeer(t){let e=this.config,i={iceServers:[{urls:["stun:stun.xten.com","stun:stun.l.google.com:19302","stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302","stun:stun3.l.google.com:19302","stun:stun4.l.google.com:19302"]},{urls:e.stun?[e.stun]:["stun:stun.callwithus.com"],username:e.stunUser??null,credential:e.stunPass??null}]};this.pc=new RTCPeerConnection(i),this.pc.ontrack=t=>{this.localVideo&&(this.remoteStream=t.streams[0],this.remoteVideo.srcObject=t.streams[0])},this.localStream=t,t.getTracks().forEach(e=>{this.pc.addTrack(e,t)}),this.localVideo.srcObject=this.localStream},checkForCamera(){navigator.mediaDevices.enumerateDevices().then(t=>{const e=t.filter(t=>"videoinput"===t.kind);this.hasCamera=e.length>0}).catch(t=>{console.error("设备检测错误: "+t.message)})},initLocalStream(t,e){let i=0;this.hasCamera&&(i=1),this.offerParams=e?{offerToRecieveAudio:1,offerToRecieveVideo:1}:{offerToRecieveAudio:1,offerToRecieveVideo:0};let s=1==i;var n=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia;n({video:s,audio:{echoCancellation:!0}},e=>{this.initPeer(e),t?(this.$emit("message",{event:"calling"}),this.status=1,this.timer=setInterval(()=>{this.cutdown--,0==this.cutdown&&this.hangup(!0)},1e3)):(this.$emit("message",{event:"acceptRtc",code:904}),this.startTime())},t=>{let i=1==e?"摄像头":"麦克风";this.$message.error("请连接"+i+"设备,并开启"+i+"权限"),this.caller=null,this.hangup(!1)})},called(t){if(console.log(this.status,this.caller),this.status||this.caller)return!1;this.is_video=t,this.caller=this.contact,this.initLocalStream(!0,t),this.playMusicCall("state")},answer(){this.status=2,this.initLocalStream(!1,this.is_video),this.playMusicCall("close")},startTime(){this.timerIntervalId=setInterval(()=>{this.callTime++},1e3)},setCallTime(){let t=this.callTime;const e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),s=t-3600*e-60*i;return`${e.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`},hangup(t){clearInterval(this.timer),clearInterval(this.timerIntervalId),2!=this.status&&this.playMusicCall("close");let e=902;2==this.status?e=906:3==this.status?e=903:4==this.status&&(e=907),this.status&&(this.status=0,this.closeLocalMedia(),this.remoteStream=null,this.playMusicHandup(),this.isReceived=!1,this.caller=null,this.voiceStatus=!0,this.videoStatus=!0),this.$emit("message",{event:"hangup",code:e,isbtn:t,callTime:this.callTime}),this.callTime=0},closeLocalMedia(){this.localStream&&this.localStream.getTracks()&&this.localStream.getTracks().forEach(t=>{t.stop()}),this.localStream=null},switchVoice(){if(null==this.localStream)return alert("请打开音视频"),!1;const t=this.localStream.getTracks();this.voiceStatus?(t.forEach(t=>{"audio"===t.kind&&(t.enabled=!1)}),this.voiceStatus=!1):(t.forEach(t=>{"audio"===t.kind&&(t.enabled=!0)}),this.voiceStatus=!0)},switchVideo(){if(null==this.localStream)return alert("请打开音视频"),!1;const t=this.localStream.getTracks();this.videoStatus?(t.forEach(t=>{"video"===t.kind&&(t.enabled=!1)}),this.videoStatus=!1):(t.forEach(t=>{"video"===t.kind&&(t.enabled=!0)}),this.videoStatus=!0)},webrtcAction(t){let e=t.extends;switch(e.event){case"calling":this.caller=t.fromUser,this.is_video=parseInt(e.type),this.status=3,this.isReceived=!0,this.playMusicCall("state");break;case"hangup":this.hangup(!1);break;case"busy":this.status=4,this.hangup(!1);break;case"acceptRtc":this.status=2,clearInterval(this.timer),this.startTime(),this.playMusicCall("close"),this.createOffer(),this.onicecandidate();break;case"turndown":break;case"answer":this.pc.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e.sdp}));break;case"iceCandidate":setTimeout(()=>{"object"===typeof e.iceCandidate?this.pc.addIceCandidate(new RTCIceCandidate(e.iceCandidate)):this.pc.addIceCandidate(new RTCIceCandidate(JSON.parse(e.iceCandidate)))},100);break;case"offer":this.pc.setRemoteDescription(new RTCSessionDescription({type:"offer",sdp:e.sdp})),this.createAnswer();break}},createOffer(){this.pc.createOffer(this.offerParams).then(t=>{this.pc.setLocalDescription(t),this.$emit("message",{event:"offer",sdp:t.sdp})})},createAnswer(){this.pc.createAnswer(this.offerParams).then(t=>{this.pc.setLocalDescription(t),this.$emit("message",{event:"answer",sdp:t.sdp}),this.onicecandidate()})},onicecandidate(){this.pc.onicecandidate=t=>{var e=t.candidate;e&&this.$emit("message",{event:"iceCandidate",iceCandidate:JSON.parse(JSON.stringify(e))})}},playMusicCall(t){var e=document.getElementById("music1");if("close"===t)return e.pause();e.loop="state"===t,e.paused?e.play():e.pause()},playMusicHandup(){var t=document.getElementById("music2");t.play()}}},Me=De,Le=(0,d.A)(Me,Se,Te,!1,null,"7c10f7a1",null),Ne=Le.exports,Oe=function(){var t=this,e=t._self._c;return e("el-container",[e("el-header",{staticClass:"slider-aside"},[e("el-tabs",{staticClass:"tab-diy",attrs:{"tab-position":"bottom"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"我收到的",name:"receive"}}),e("el-tab-pane",{attrs:{label:"我发送的",name:"send"}})],1)],1),e("el-main",{staticClass:"no-padding"},[e("div",{staticClass:"apply-list"},[e("div",{staticClass:"apply-list-main"},[e("el-scrollbar",[e("el-alert",{staticClass:"mt-10 mb-10",attrs:{"show-icon":"",title:"未处理的邀请消息会在每次初始化或者页面刷新时会重新提示!",type:"warning"}}),t._l(t.list,function(i,s){return e("div",{key:s,staticClass:"apply-list-item"},[e("div",{staticClass:"avatar"},[t.params.is_mine?t._e():e("el-avatar",{attrs:{src:i.create_user_info.avatar}}),t.params.is_mine?e("el-avatar",{attrs:{src:i.user_id_info.avatar}}):t._e()],1),e("div",{staticClass:"main"},[t.params.is_mine?t._e():e("div",{on:{click:function(e){return t.$user(i.create_user_info.user_id)}}},[e("span",{staticClass:"fc-primary cur-handle"},[t._v(t._s(i.create_user_info.realname))]),t._v(" 申请添加为好友 "),1==i.status?e("el-tag",{attrs:{type:"success"}},[t._v("已同意")]):t._e()],1),t.params.is_mine?e("div",{on:{click:function(e){return t.$user(i.user_id_info.user_id)}}},[t._v(" 请求添加 "),e("span",{staticClass:"fc-primary cur-handle"},[t._v(t._s(i.user_id_info.realname))]),t._v(" 为好友 "),1==i.status?e("el-tag",{attrs:{type:"success"}},[t._v("已同意")]):t._e()],1):t._e(),e("div",{staticClass:"f-12 c-999"},[t._v(t._s(i.remark))])]),t.params.is_mine?e("div",{staticClass:"option"},[1==i.status?e("span",{staticClass:"fc-primary cur-handle",on:{click:function(e){return t.$store.commit("openChat",i.user_id_info.user_id)}}},[t._v("发消息")]):t._e(),2==i.status?e("el-tag",{attrs:{type:"warning"}},[t._v("待同意")]):t._e(),0==i.status?e("el-tag",{attrs:{type:"danger"}},[t._v("已拒绝")]):t._e()],1):e("div",{staticClass:"option"},[2==i.status?e("el-popconfirm",{attrs:{title:"您确定接受该好友的申请吗?"},on:{confirm:function(e){return t.acceptApply(i.friend_id,!0)}}},[e("el-button",{attrs:{slot:"reference",type:"success",circle:"",plain:"",icon:"el-icon-check"},slot:"reference"})],1):t._e(),2==i.status?e("el-popconfirm",{staticClass:"ml-15",attrs:{title:"您确定拒绝该好友的申请吗?"},on:{confirm:function(e){return t.acceptApply(i.friend_id,!1)}}},[e("el-button",{attrs:{slot:"reference",type:"danger",circle:"",plain:"",icon:"el-icon-close"},slot:"reference"})],1):t._e(),1==i.status?e("span",{staticClass:"fc-primary cur-handle",on:{click:function(e){return t.$store.commit("openChat",i.create_user_info.user_id)}}},[t._v("发消息")]):t._e(),0==i.status?e("el-tag",{attrs:{type:"danger"}},[t._v("已拒绝")]):t._e()],1)])}),0==t.list.length?e("div",[e("el-empty",{attrs:{description:"暂无数据"}})],1):t._e()],2)],1),t.singlePage?t._e():e("div",{staticClass:"apply-list-page",attrs:{align:"center"}},[e("el-pagination",{attrs:{background:"","hide-on-single-page":t.singlePage,"current-page":t.params.page,"page-sizes":[20,50,100,200,300,400,500],"page-size":t.params.limit,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleChange,"current-change":t.getList,"update:currentPage":function(e){return t.$set(t.params,"page",e)},"update:current-page":function(e){return t.$set(t.params,"page",e)},"update:pageSize":function(e){return t.$set(t.params,"limit",e)},"update:page-size":function(e){return t.$set(t.params,"limit",e)}}})],1)])])],1)},Pe=[],Ue={name:"apply",data(){return{singlePage:!0,total:0,list:[],activeName:"receive",params:{page:1,limit:20,is_mine:0}}},mounted(){this.getList()},methods:{handleClick(t){"send"==t.name?this.params.is_mine=1:"receive"==t.name&&(this.params.is_mine=0),this.params.page=1,this.getList()},acceptApply(t,e){let i=e?1:0;this.$api.friendApi.acceptFriend({friend_id:t,status:i}).then(t=>{this.$message.success("操作成功"),this.getList()})},getList(){this.$api.friendApi.getApplyList(this.params).then(t=>{this.list=t.data,this.total=t.count,this.singlePage=this.total<=this.params.limit})},handleChange(t){this.params.limit=t,this.getList()}}},Re=Ue,je=(0,d.A)(Re,Oe,Pe,!1,null,"5aced73a",null),Be=je.exports,Fe=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{height:"100% !important"}},[e("el-divider",[t._v("黑名单列表")]),e("el-container",{staticStyle:{"background-color":"#fff",height:"92% !important"}},[e("div",{staticClass:"list-main"},[e("el-scrollbar",{staticStyle:{height:"100% !important"}},t._l(t.contactsList,function(i,s){return 1==i.is_blacklist?e("div",{key:s,staticClass:"list-item"},[e("div",{staticClass:"avatar"},[e("el-avatar",{attrs:{src:i.avatar}})],1),e("div",{staticClass:"main"},[e("div",[t._v(t._s(i.displayName))])]),e("div",[e("span",{staticClass:"fc-danger cur-handle",staticStyle:{"margin-right":"20px"},on:{click:function(e){return t.onblacklist(i)}}},[t._v("移除黑名单")]),e("span",{staticClass:"fc-primary cur-handle",on:{click:function(e){return t.$store.commit("openChat",i.user_id)}}},[t._v("发消息")])])]):t._e()}),0)],1)])],1)},$e=[],Ve={data(){return{list:[]}},mounted(){},computed:{...(0,v.aH)({contactsList:t=>t.allContacts})},methods:{getList(){this.$api.imApi.getContactsAPI().then(t=>{this.$store.commit("initContacts",t.data)})},onblacklist(t){this.$api.messageApi.isBlacklist({friend_user_id:t.user_id}).then(t=>{0==t.code&&(this.$message({type:"success",message:"移除成功!"}),this.getList())})}}},He=Ve,Ke=(0,d.A)(He,Fe,$e,!1,null,"55f617bd",null),ze=Ke.exports,Ge=i.p+"assets/img/invite.108c2fc8.png",qe=i.p+"assets/img/blacklist-red.0041b678.png",Qe=i(6387);const Ye=()=>(new Date).getTime(),Je=r().get("UserInfo");var We={name:"app",components:{Socket:ot,ChatRecord:rt.A,ChatSet:pt,ChatTop:yt,VoiceRecorder:_t,webrtc:Ne,Group:St.A,groupQr:Pt,Files:Ht,addFriend:ge,Setting:le,ChooseDialog:Ut.A,OnlineStatus:xe,imTab:_e,Apply:Be,blacklist:ze},props:{width:{type:String,default:"1000px"},height:{type:String,default:"640px"},fullScreen:{type:Boolean,default:!1}},data(){const t=this.$createElement;var e=this;let i=this.$store.state.globalConfig.chatInfo;return{noSimpleTips:"群已开启禁言,无法发送消息",isFullscreen:!0,curWidth:this.width,curHeight:this.height,unread:0,atUnread:0,webrtcConfig:i,wsData:null,webrtcLock:!1,caller:"",is_video:1,curFile:null,componentKey:1,searchResult:!1,addFriendBox:!1,createChatBox:!1,forwardBox:!1,noticeBox:!1,messageBox:!1,webrtcBox:!1,groupSetting:!1,VoiceStatus:!1,groupQrShow:!1,ChatRecordMap:{},contactSetting:{},groupUserCount:0,dialogTitle:"创建群聊",isAdd:1,userIds:[],emojiGroups:[],noSpeakData:{noSpeakTimer:0,noSpeakDay:1,user_id:0,id:0},curGroupUser:{},notice:"",searchList:[],keywords:"",displayName:"",oldName:"",isEdit:!1,isBottom:!0,user:{id:Je.user_id,displayName:Je.realname,avatar:Je.avatar,account:Je.account},params:{page:1,limit:10},is_group:0,group_id:"",contacts:[],allUser:[],groupUser:[],currentChat:{},currentMessage:{},lastMessages:[],chatTopList:[],playAudio:null,activeTab:0,tabList:[{name:"所有",count:0},{name:"未读",count:0},{name:"@我",count:0}],quote:"",noSpeakBox:!1,IntervalChat:null,groupMenu:[{text:"发送消息",click:(t,e,i)=>{const{IMUI:s,contact:n}=e;s.changeContact(n.user_id),i()},visible:t=>t.contact.user_id!=this.user.id&&1==this.globalConfig.sysInfo.runMode},{text:"@TA",click:(t,e,i)=>{const{IMUI:s,contact:n}=e;s.setUserTag(n.userInfo),i()},visible:t=>t.contact.user_id!=this.user.id},{text:"设置管理员",click:(t,e,i)=>{const{IMUI:s,contact:n}=e;i(),this.$confirm("确定设置该成员为管理员吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.setManagerAPI({id:this.group_id,user_id:n.user_id,role:2}),this.$message({type:"success",message:"设置成功!"})})},visible:t=>3==t.contact.role&&this.currentChat.owner_id==this.user.id},{text:"取消管理员",click:(t,e,i)=>{const{IMUI:s,contact:n}=e;i(),this.$confirm("确定取消该成员的管理员权限吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.setManagerAPI({id:this.group_id,user_id:n.user_id,role:3}),this.$message({type:"success",message:"取消成功!"})})},visible:t=>2==t.contact.role&&this.currentChat.owner_id==this.user.id},{text:"设置禁言",click:(t,e,i)=>{this.noSpeakBox=!0;const{IMUI:s,contact:n}=e;this.noSpeakData.user_id=n.user_id,this.noSpeakData.id=this.group_id,i()},visible:t=>t.contact.user_id!=this.user.id&&t.contact.role>1&&this.currentChat.role<=2},{text:"查看资料",click:(t,e,i)=>{const{IMUI:s,contact:n}=e;i();let a=this.getContact(n.user_id),o=s.getCurrentContact();1==o.setting.profile||o.role<3||a||n.user_id==this.user.id?this.$user(n.user_id):this.$message.error("已开启隐私,无法查看资料")},visible:t=>t.contact.user_id},{text:"移出群聊",color:"red",click:(t,e,i)=>{const{IMUI:s,contact:n}=e;i(),this.$confirm("确定移除该成员吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.removeUserAPI({id:this.group_id,user_id:n.user_id})})},visible:t=>t.contact.user_id!=this.user.id&&this.currentChat.owner_id!=t.contact.user_id&&this.currentChat.role<=2}],contactContextmenu:[{click(t,i,s){const{IMUI:n,contact:a}=i;e.$user(a.user_id),s()},icon:"el-icon-tickets",text:"查看资料",visible:t=>0==t.contact.is_group},{icon:"el-icon-upload2",text:"置顶聊天",click:(t,i,s)=>{const{IMUI:n,contact:a}=i;e.$api.imApi.setChatTopAPI({id:a.id,is_top:1,is_group:a.is_group}).then(t=>{0==t.code&&n.updateContact({id:a.id,is_top:1})}),s()},visible:t=>0==t.contact.is_top&&t.contact.is_group<2},{icon:"el-icon-download",text:"取消置顶",click:(t,i,s)=>{const{IMUI:n,contact:a}=i;e.$api.imApi.setChatTopAPI({id:a.id,is_top:0,is_group:a.is_group}).then(t=>{0==t.code&&n.updateContact({id:a.id,is_top:0})}),s()},visible:t=>1==t.contact.is_top&&t.contact.is_group<2},{click(t,i,s){const{IMUI:n,contact:a}=i;s(),e.$api.imApi.isNoticeAPI({id:a.id,is_notice:0,is_group:a.is_group}),n.updateContact({id:a.id,is_notice:0})},icon:"el-icon-bell",text:"消息免打扰",visible:t=>1==t.contact.is_notice&&t.contact.is_group<2},{click(t,i,s){const{IMUI:n,contact:a}=i;s(),e.$api.messageApi.isBlacklist({friend_user_id:a.user_id}),setTimeout(()=>{e.getSimpleChat()},2e3)},icon:"el-icon-user",text:"加入黑名单",visible:t=>0==t.contact.is_group},{click(t,i,s){const{IMUI:n,contact:a}=i;s(),e.$api.imApi.isNoticeAPI({id:a.id,is_notice:1,is_group:a.is_group}),n.updateContact({id:a.id,is_notice:1})},icon:"el-icon-close-notification",text:"取消免打扰",visible:t=>0==t.contact.is_notice&&t.contact.is_group<2},{click(t,i,s){const{IMUI:n,contact:a}=i;s(),e.$confirm("确定删除该好友吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.$api.friendApi.delFriend({id:a.id}).then(t=>{0==t.code&&(e.$message({type:"success",message:"删除成功!"}),e.getSimpleChat(),e.removeContact(a.id))})}).catch(()=>{})},icon:"el-icon-delete",color:"red",text:"删除好友",visible:t=>2==e.globalConfig.sysInfo.runMode&&0==t.contact.is_group},{click(t,i,s){const{IMUI:n,contact:a}=i;s(),e.$confirm("确定解散该群聊吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.$api.imApi.removeGrouprAPI({id:a.id})}).catch(()=>{})},icon:"el-icon-delete",color:"red",text:"解散群聊",visible:t=>t.contact.owner_id==e.user.id&&1==t.contact.is_group},{click(t,i,s){const{IMUI:n,contact:a}=i;s(),e.$confirm("确定退出该群聊吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e.$api.imApi.removeUserAPI({id:a.id,user_id:e.user.id}).then(t=>{0==t.code&&(e.$message({type:"success",message:"退出成功!"}),e.removeContact(a.id))})}).catch(()=>{})},icon:"el-icon-remove-outline",color:"red",text:"退出群聊",visible:t=>t.contact.owner_id!=e.user.id&&1==t.contact.is_group}],contextmenu:[{click:(e,i,s)=>{const{IMUI:n}=i,a=JSON.parse(JSON.stringify(i.message));this.$api.imApi.undoMessageAPI({id:a.id}).then(e=>{const i={id:a.id,type:"event",content:t("div",[t("span",["你撤回了一条消息"," ",t("span",{directives:[{name:"show",value:"text"==a.type}],style:"color:#409EFF;cursor:pointer",attrs:{content:a.content,data:a.type},on:{click:t=>{n.setEditorValue(t.target.getAttribute("content"))}}},["重新编辑"])])]),toContactId:a.toContactId,sendTime:a.sendTime};n.updateMessage(i);const s=n.getMessages(a.toContactId);a.id==s[s.length-1].id&&n.updateContact({id:a.toContactId,lastContent:"你撤回了一条消息"})}).catch(t=>{this.$message.error("发生错误"+t)}),s()},visible:t=>{const{IMUI:e,message:i}=t;let s=3;if(1==t.message.is_group){let t=e.getCurrentContact();s=t.role}return t.message.fromUser.id==this.user.id&&Ye()-t.message.sendTime<1e3*this.globalConfig.chatInfo.redoTime||s<3},text:"撤回消息"},{text:"@TA",click:(t,e,i)=>{const{IMUI:s,message:n}=e;s.setUserTag(n.fromUser),i()},visible:t=>t.message.fromUser.id!=this.user.id&&1==t.message.is_group},{visible:t=>"emoji"==t.message.type,text:"存表情",click:(t,e,i)=>{this.$api.messageApi.addEmoji({file_id:e.message.file_id}).then(t=>{this.$message({type:"success",message:"添加成功"}),this.loadEmojiData(),i()})}},{text:"转发",click:(t,e,i)=>{this.currentMessage=e.message;const{IMUI:s}=this.$refs,n=s.getContacts(),a=s.getCurrentContact();this.allUser=tt.lU(n,"id",a.id),i(),this.forwardBox=!0}},{text:"引用",click:(t,e,i)=>{let s=e.message,n=/<[^>]+>/g,a=s.content.replace(n,"");"text"!=s.type&&(a=tt.iq(s.type));let o={msg_id:s.msg_id,content:s.fromUser.displayName+":"+a,user_id:s.fromUser.id,realname:s.fromUser.displayName};if(this.quote=o,this.is_group&&o.user_id!=this.user.id){const{IMUI:t}=this.$refs;t.setUserTag(s.fromUser)}i()}},{visible:t=>"image"==t.message.type,text:"复制图片",click:async(t,e,i)=>{i();try{const{message:t}=e,i=await fetch(t.download),s=await i.blob(),n=new Blob([s],{type:"image/png"}),a=new ClipboardItem({"image/png":n});await navigator.clipboard.write([a]),this.$message({type:"success",message:"图片复制成功!"})}catch(s){this.$message.error("复制图片失败: "+s)}}},{visible:t=>"text"==t.message.type,text:"复制文字",click:(t,e,i)=>{this.$clipboard(e.message.content),this.$message({type:"success",message:"复制成功!"}),i()}},{visible:t=>"image"==t.message.type,text:"下载图片",click:(t,e,i)=>{const{message:s}=e;i(),s.download&&(window.location=s.download)}},{visible:t=>"file"==t.message.type,text:"下载文件",click:(t,e,i)=>{const{message:s}=e;window.open(s.download),i()}},{text:"删除消息",color:"red",click:(t,e,i)=>{const{IMUI:s,message:n}=e;this.$confirm("删除消息会从当前聊天记录中抹掉,是否确定?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$api.imApi.removeMessageAPI({id:n.id}).then(t=>{0==t.code&&(this.$message({type:"success",message:"删除成功!"}),s.removeMessage(n.id))})}).catch(()=>{this.$message({type:"info",message:"已取消"})}),i()},visible:t=>t.message.is_group<2&&1==this.globalConfig.chatInfo.dbDelMsg||t.message.is_group<2&&t.message.fromUser.id==this.user.id}]}},computed:{...(0,v.aH)({wsStatus:t=>t.wsStatus,socketAction:t=>t.socketAction,contactId:t=>t.toContactId,contactSync:t=>t.contactSync,setting:t=>t.setting,userInfo:t=>t.userInfo,globalConfig:t=>t.globalConfig,openname:t=>t.name}),formatTime(){return function(t){return tt.DC(t)}}},watch:{isFullscreen(t){void 0==this.isFullscreen?(r().set("isFullscreen",!0),t=!0):r().set("isFullscreen",t),this.curWidth=t?"100vw":this.width,this.curHeight=t?"100vh":this.height},playAudio(t){if(t&&this.currentMessage){let t=this.currentMessage;var e=this;const{IMUI:i}=this.$refs;this.playAudio.addEventListener("ended",function(){console.log("声音停止"),e.playAudio=null,e.currentMessage=null,i.updateMessage({id:t.id,status:"successd",isPlay:0})},!1)}},contactSync(t){this.$emit("newChat",t);const{IMUI:e}=this.$refs;e.changeContact(this.contactId)},openname(){const{IMUI:t}=this.$refs;this.getSimpleChat(),t.forceUpdateMessage()},unread(t){this.tabList[1].count=t,this.$store.commit("updateUnread",t)},atUnread(t){this.tabList[2].count=t},keywords(){const{IMUI:t}=this.$refs,e=t.getContacts();this.searchContact(e)},socketAction(t){const e=this.$createElement;let i=t.data;const{IMUI:s}=this.$refs;let n=r().get("client_id");switch(t.type){case"isOnline":s.updateContact({id:i.id,is_online:i.is_online}),i.is_online||this.webrtcLock!=i.id||(this.webrtcLock=!1);break;case"offline":if(1==parseInt(this.globalConfig.sysInfo.multipleLogin))return;i.id!=this.user.id||i.client_id==n||i.isMobile||(this.$message.error="您的账号在其他地方登录,已被迫下线!",this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})}));break;case"simple":if("admin_notice"==i.to_user&&this.$notify({title:"系统通知",message:i.content,duration:0}),window.electronAPI){window.electronAPI.startFlash();let t=i.fromUser.displayName||i.fromUser.realname,e=s.lastContentRender(i);window.electronAPI.showSystemNotification({title:"收到一条新消息",body:t+":"+e,icon:i.fromUser.avatar})}case"group":if(i.fromUser.id!=this.user.id){let t=this.getContact(i.toContactId,i);if(1==i.is_group&&i.toContactId!=this.currentChat.id){let e=0;i.at.includes(this.user.id)&&(e=1),this.$refs.IMUI.updateContact({id:i.toContactId,is_at:t.is_at+e}),this.atUnread+=e}this.setting.isVoice&&1==t.is_notice&&i.toContactId!=this.currentChat.id&&this.popNotice(i)}this.recieveMsg(i);break;case"undoMessage":if(i.from_user==this.user.id&&0==i.isMobile&&Ye()-i.sendTime<1e3*this.globalConfig.chatInfo.redoTime)return!1;s.updateMessage(i);const a=s.getMessages(i.toContactId);i.id==a[a.length-1].id&&s.updateContact({id:i.toContactId,lastContent:"对方撤回了一条消息"});break;case"delMessage":s.removeMessage(i.id);break;case"updateMessage":s.updateMessage(i);break;case"setChatTop":s.updateContact({id:i.id,is_top:i.is_top});break;case"setIsNotice":s.updateContact({id:i.id,is_notice:i.is_notice});break;case"editGroupName":s.updateContact({id:i.id,displayName:i.displayName});const o={id:tt.cZ(),type:"event",content:e("div",[e("span",[i.editUserName," 修改了群名为 ",i.displayName])]),toContactId:i.id,sendTime:Ye()};s.appendMessage(o,!0);break;case"isRead":this.setLocalMsgIsRead(i);break;case"readAll":let c=s.getMessages(i.toContactId);c.forEach(t=>{if(0==t.is_read){const e={id:t.id,is_read:1,status:"succeed",sendTime:parseInt(t.sendTime)+1,content:t.content};s.updateMessage(e)}});break;case"addGroup":i.owner_id!=this.user.id&&s.appendContact(i),this.$api.commonApi.bindGroupAPI({client_id:n,group_id:i.id});break;case"setManager":case"addGroupUser":case"removeUser":i.group_id==this.group_id&&this.getGroupUserList(i.group_id),"removeUser"==t.type&&i.user_id==this.user.id?this.removeContact(i.group_id):s.updateContact({id:i.group_id,avatar:i.avatar});break;case"setNoSpeak":i.group_id==this.group_id&&this.getGroupUserList(i.group_id);break;case"removeGroup":this.removeContact(i.group_id);break;case"clearMessage":s.clearMessages(i.group_id),this.groupSetting=!1,s.updateContact({id:i.group_id,lastContent:""}),i.group_id==this.currentChat.id&&(s.changeContact(null),setTimeout(()=>{s.changeContact(i.group_id)},100));break;case"updateConfig":0==i.sysInfo.state&&"/404"!==this.$router.currentRoute.path&&this.$router.push({path:"/404",query:{msg:i.sysInfo.closeTips}}),r().set("globalConfig",i),this.$store.commit("setGlobalConfig",i);break;case"setNotice":s.updateContact({id:i.group_id,notice:i.notice}),s.appendMessage({id:tt.cZ(),type:"event",content:e("div",[e("span",["管理员 发布了公告: ",i.notice])]),toContactId:i.group_id,sendTime:Ye()},!0);break;case"groupSetting":s.updateContact({id:i.group_id,setting:i.setting}),this.currentChat.id==i.group_id&&(this.currentChat.setting=i.setting);break;case"appendContact":s.appendContact(i);break;case"webrtc":if(i.fromUser.id==this.user.id){let t=i.extends,e=r().get("wsData");return[902,903,905,906,907].includes(parseInt(t.code))&&(e.content=i.content,s.updateMessage(e),this.webrtcLock=!1),0==t.isMobile||"calling"==t.event?void("calling"==t.event&&(r().set("wsData",i),this.recieveMsg(i))):void("otherOpt"==t.event&&(e.content=i.content,s.updateMessage(e),this.wsData=null,this.caller="",this.webrtcLock=!1,this.$refs.webrtc.hangup(!1)))}if(this.wsData&&this.wsData.id!=i.id)this.$api.imApi.sendToMsg({toContactId:i.fromUser.user_id,type:i.extends.type,event:"busy",status:i.extends.status,code:907,id:i.id,msg_id:i.msg_id});else{if("calling"==i.extends.event)this.recieveMsg(i),this.wsData=i,r().set("wsData",i),this.caller=i.fromUser;else if("offer"==i.extends.event||"answer"==i.extends.event)this.webrtcLock=i.fromUser.user_id;else if("hangup"==i.extends.event){let t=r().get("wsData");t.content=i.content,s.updateMessage(t),this.webrtcLock=!1}this.wsData&&this.wsData.id==i.id&&this.$refs.webrtc.webrtcAction(JSON.parse(JSON.stringify(i)))}break}}},created(){let t=this.$store.state.userInfo;t&&(this.user={id:t.user_id,displayName:t.realname,avatar:t.avatar,account:t.account}),window.Notification?"granted"==Notification.permission?console.log("允许通知"):"denied"!=Notification.permission&&(console.log("需要通知权限"),Notification.requestPermission(t=>{})):console.error("浏览器不支持Notification")},mounted(){this.fullScreen&&(this.curWidth=this.isFullscreen?"100vw":this.width,this.curHeight=this.isFullscreen?"100vh":this.height),this.searchResult&&document.addEventListener("click",function(t){that.$refs.configforms.contains(t.target)||(that.searchResult=!1)}),this.getSimpleChat()},beforeDestroy(){this.stopPolling()},methods:{startPolling(){this.IntervalChat=setInterval(()=>{this.getSimpleChat()},5e3)},stopPolling(){clearInterval(this.IntervalChat),this.IntervalChat=null},called(t){return parseInt(this.globalConfig.chatInfo.webrtc)?this.globalConfig.chatInfo.simpleChat?void(this.webrtcLock?this.$message.error("其他端正在通话中"):(this.webrtcBox=!0,this.is_video=t,this.caller=this.currentChat,this.$refs.webrtc.called(t))):this.$message.error("当前系统已关闭单聊功能"):this.$message.error("当前系统未开启音视频通话功能")},changeTab(t,e){this.activeTab=e},latelyContact(t){let e=[];return e=1==this.activeTab?t.filter(t=>t.unread>0):2==this.activeTab?t.filter(t=>t.is_at>0):t.filter(t=>t.lastContent||t.unread>0),e.sort((t,e)=>e.lastSendTime-t.lastSendTime),e.sort((t,e)=>e.is_top-t.is_top),e},getSimpleChat(t){const e=this.$createElement;this.$nextTick(()=>{const i=this.$refs.IMUI;this.IMUI=i,i.setLastContentRender("voice",t=>"[语音]"),i.setLastContentRender("video",t=>"[视频]"),i.setLastContentRender("webrtc",t=>"[音视频通话]");let s=[{name:"emoji"},{name:"screenShot",title:"发送截屏",click:()=>{this.shotScreen()},render:()=>e("i",{class:"el-icon el-icon-scissors f-18",style:"vertical-align: middle;font-weight: 600;"})},{name:"uploadImage",title:"发送图片"},{name:"sendVoice",title:"发送语音",click:()=>{this.VoiceStatus=!0},render:()=>e("i",{class:"el-icon el-icon-microphone f-18",style:"vertical-align: middle;font-weight: 600;"})},{name:"uploadVideo",title:"发送视频",click:()=>{var t=this.$refs.uploadVideo;t.click()},render:()=>e("i",{class:"el-icon el-icon-video-play f-18",style:"vertical-align: middle;font-weight: 600;"},[e("input",{style:"display:none",attrs:{type:"file",accept:"video/*"},ref:"uploadVideo",on:{change:t=>{this.uploadVideo(t)}}})])},{name:"uploadFile",title:"发送文件"},{name:"msgBox",title:"消息管理器",click:()=>{this.ChatRecordMap={},this.messageBox=!0,this.componentKey+=1},render:()=>e("i",{class:"el-icon el-icon-time f-18",style:"vertical-align: middle;"}),isRight:!0}];i.initEditorTools(s),this.loadEmojiData(),this.$api.imApi.getContactsAPI().then(s=>{const n=s.data;this.contacts=n;var a={};if(this.unread=0,this.atUnread=0,n.forEach((e,s)=>{e.type&&(a.type=e.type,a.content=e.lastContent,n[s]["lastContent"]=i.lastContentRender(a)),e.unread&&!t&&1==e.is_notice&&(this.unread+=e.unread),e.is_at&&(this.atUnread+=e.is_at)}),2==this.globalConfig.sysInfo.runMode){const t={id:"system",displayName:"新邀请",name_py:"xinyaoqing",avatar:Ge,is_group:2,index:"[1]系统消息",click(t){t()},renderContainer:()=>e(Be),lastSendTime:s.page,lastContent:s.page?"新的申请":"",unread:parseInt(s.count),is_notice:1};this.unread+=s.count,n.push({...t})}const o={id:"blacklist",displayName:"黑名单",name_py:"heimingdan",avatar:qe,index:"[1]系统消息",click(t){t()},renderContainer:()=>e(ze)};n.push({...o}),this.$store.commit("initContacts",n),i.initContacts(n),this.lastMessages=i.lastMessages,this.initMenus(i)})})},async shotScreen(){if(window.electronAPI){const t=await window.electronAPI.getWindowSources(),e=await this.getInitStream(t[0]);console.log(e)}new Qe.A({enableWebRtc:!0,level:999999,completeCallback:this.callback,closeCallback:this.closeShotScreen})},async getInitStream(t){const e=await window.electronAPI.getWindowSize();console.log(e);const i=navigator.mediaDevices.getUserMedia({video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t.id}}});return i},closeShotScreen(){console.log("关闭截图")},callback(t){let e=new Image;e.src=t.base64,e.onload=()=>{let t=this.convertImageToCanvas(e),i=t.toDataURL("image/jpeg"),s=window.atob(i.split(",")[1]),n=new ArrayBuffer(s.length),a=new Uint8Array(n);for(let e=0;e<s.length;e++)a[e]=s.charCodeAt(e);let o=new File([n],"screenShot"+tt.cZ()+".jpg",{type:"image/jpeg"});this.$confirm("<img src="+e.src+' style="width:390px;height:100%;max-height:360px;object-fit:contain">',"发送截图",{dangerouslyUseHTMLString:!0,confirmButtonText:"发送",showCancelButton:!0,callback:(t,e)=>{if("confirm"==t){let t={content:URL.createObjectURL(o),fromUser:this.user,id:tt.cZ(),sendTime:Ye(),status:"going",toContactId:this.currentChat.id,type:"image"};this.diySendMessage(t,o)}else e.close()}})}},convertImageToCanvas(t){let e=document.createElement("canvas");return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},initMenus(t){const e=this.$createElement;let i=[{name:"messages",unread:this.unread},{name:"contacts"},{name:"files",title:"文件",unread:0,render:t=>e("i",{class:"el-icon-folder"}),renderContainer:()=>e(Ht,{attrs:{title:this.dialogTitle}})},{name:"wechatmoments",title:"朋友圈",unread:0,render:t=>e("i",{class:"el-icon-orange"}),renderContainer:()=>e(Yt)},{name:"mobile",title:"客户端下载",unread:0,render:t=>e("i",{class:"el-icon-mobile"}),click:()=>{window.open(window.BASE_URL+"downapp","_blank")},isBottom:!0},{name:"setting",title:"设置",unread:0,render:t=>e("i",{class:"el-icon-setting"}),renderContainer:()=>e(le),isBottom:!0}];this.fullScreen&&i.push({name:"fullscrren",title:"全屏/窗口",unread:0,click:()=>{this.isFullscreen=!this.isFullscreen,console.log(this.isFullscreen),r().set("isFullscreen",this.isFullscreen),this.$store.commit("isFullscreen",this.isFullscreen)},render:t=>e("i",{class:"el-icon-full-screen"})}),(Je.role>0||this.globalConfig.demon_mode)&&i.push({name:"manage",title:"后台管理",unread:0,click:()=>{this.$route.path.indexOf("manage")>-1?this.$emit("close"):this.$router.push("/manage/index")},render:t=>e("i",{class:"el-icon-s-operation"}),isBottom:!0}),t.initMenus(i)},getContact(t,e=null){const{IMUI:i}=this.$refs;let s=i.findContact(t);return!s&&e&&e.contactInfo&&(s=e.contactInfo,i.appendContact(s)),s},wrapKey(t){return 1==this.setting.sendKey?13==t.keyCode&&t.ctrlKey:13==t.keyCode&&!t.ctrlKey&&!t.shiftKey},setSendKey(t){return 1==this.setting.sendKey?13==t.keyCode&&!t.ctrlKey&&!t.shiftKey:13==t.keyCode&&t.ctrlKey},handleMessageClick(t,e,i,s){if("status"==e)return s.updateMessage({id:i.id,status:"going"}),i.status="going",void this.diySendMessage(i,this.curFile);if("avatar"==e)return 1==i.is_group&&0==this.currentChat.setting.profile&&this.currentChat.role>2?void this.$message.error("已开启隐私,无法查看资料"):void this.$user(i.fromUser.id);if("voice"==i.type){if(!this.playAudio)return this.currentMessage=i,this.playVoice(i,s);this.playAudio.pause(),this.playAudio=null,s.updateMessage({id:this.currentMessage.id,status:"successd",isPlay:0}),i.id!=this.currentMessage.id&&(this.currentMessage=i,this.playVoice(i,s))}var n=["image","file","video"];if(n.includes(i.type)){if(!i.preview)return this.$message.error("没有配置预览接口");0==i.is_view?this.$api.messageApi.viewOriginalImage({file_id:i.file_id,msg_id:i.msg_id}).then(t=>{this.$preview("http://192.168.66.16:8007/view.html?src="+t.data.src),s.updateMessage({id:i.id,status:"succeed",content:t.data.src})}):this.$preview(i.preview)}else"webrtc"==i.type&&this.called(parseFloat(i.extends.type))},playVoice(t,e){this.playAudio=new Audio(t.content),this.playAudio.play(),e.updateMessage({id:t.id,status:"succeed",isPlay:1})},openChat(t,e){this.keywords="",e.changeContact(t)},handleMessagePosition(t,e,i,s){const n=`https://uri.amap.com/marker?position=${i.longitude},${i.latitude}&name=${encodeURIComponent(i.name)}`;window.electronRequire?window.electronRequire("electron").ipcRenderer.send("open-external-url",n):window.open(n,"_blank")},handleChangeContact(t,e){e.updateContact({id:t.id,unread:0}),1==t.is_notice&&(this.unread-=t.unread);const{IMUI:i}=this.$refs;this.initMenus(i),this.params.page=1,this.displayName=t.displayName,this.oldName=t.displayName,this.currentChat=t,1==t.is_group&&(this.group_id!=t.id?this.getGroupUserList(t.id):this.setAtUserList(this.groupUser)),this.is_group=t.is_group,1==this.is_group?(this.group_id=t.id,this.notice=t.notice):i.setAtUserList([],!1);for(var s=[],n=i.getMessages(t.id),a=0;n.length>a;a++)0==n[a].is_read&&n[a].fromUser.id!=this.user.id&&(n[a]["contactInfo"]={},s.push(n[a]));s.length>0&&(this.$api.imApi.setMsgIsReadAPI({is_group:t.is_group,toContactId:t.id,messages:s,fromUser:t.id}),this.setLocalMsgIsRead(s)),e.closeDrawer()},setAtUserList(t){let e=[],i=!1;t.forEach(t=>{t.user_id!=this.user.id?e.push(t.userInfo):t.role<3&&(i=!0)}),this.$refs.IMUI.setAtUserList(e,i)},uploadVideo(t){if(!this.nospeak())return this.$message.error(this.noSimpleTips),!1;let e,i=t.srcElement.files[0],s=URL.createObjectURL(i),n=new Audio(s);n.addEventListener("loadedmetadata",function(t){e=n.duration});let a={content:s,fromUser:this.user,id:tt.cZ(),sendTime:Ye(),status:"going",toContactId:this.currentChat.id,type:"video",extends:{duration:e}};this.diySendMessage(a,i),this.$refs.uploadVideo.value=""},sendVoice(t,e){if(!this.globalConfig.chatInfo.simpleChat&&0==this.is_group||!this.nospeak())return this.$message.error(this.noSimpleTips),!1;let i={content:URL.createObjectURL(e),fromUser:this.user,id:tt.cZ(),sendTime:Ye(),status:"going",toContactId:this.currentChat.id,type:"voice",isPlay:0,extends:{duration:t}};this.VoiceStatus=!1,this.diySendMessage(i,e)},removeContact(t){const{IMUI:e}=this.$refs,i=e.getCurrentContact();i.id==t&&e.changeContact(null),e.removeContact(t)},diySendMessage(t,e){const{IMUI:i}=this.$refs;i.appendMessage(t,!0),this.handleSend(t,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{status:"succeed"};i.updateContact({id:t.toContactId,lastContent:i.lastContentRender(t),lastSendTime:t.sendTime}),i.CacheDraft.remove(t.toContactId),i.updateMessage(Object.assign(t,e))},e)},nospeak(){return!(1==this.is_group&&this.currentChat.setting.nospeak>0)||(1==this.currentChat.setting.nospeak&&this.currentChat.role<3||2==this.currentChat.setting.nospeak&&1==this.currentChat.role)},handleSend(t,e,i){const{IMUI:s}=this.$refs,n=/^\s*$/.test(t.content.replace(/<[^>]+>/g,""));if(n&&"file"!==t.type||""==t.content&&"file"!==t.type)return this.$message.error("内容不能为空"),s.setEditorValue(""),void s.removeMessage(t.id);const a=t.content.replace(/<[^>]+>/g,""),o=a.replace(/\n/g," ");if(t.plain_text=o,t.is_group=this.is_group,this.curFile=i,!this.nospeak())return s.removeMessage(t.id),this.$message.error(this.noSimpleTips),!1;this.quote&&(t.pid=this.quote.msg_id,t.extends=this.quote);let r=new FormData;if(i){if(i.size>1024*this.globalConfig.fileUpload.size*1024)return s.removeMessage(t.id),this.$message.error("文件大小不能超过"+this.globalConfig.fileUpload.size+"MB!");r.append("file",i),r.append("message",JSON.stringify(t)),this.$api.imApi.sendFileAPI(r).then(t=>{0==t.code?(s.setEditorValue(""),s.updateMessage(t.data),e()):e({status:"failed"})}).catch(t=>{e({status:"failed"})})}else this.closeQuote(),t.is_group?this.$api.imApi.sendMessageAPI(t).then(t=>{0==t.code?(s.setEditorValue(""),s.updateMessage(t.data),e()):e({status:"failed"})}).catch(t=>{e({status:"failed"})}):this.$api.messageApi.getFriendInfo({friend_user_id:t.toContactId}).then(i=>{i.data.is_blacklist?this.$api.imApi.sendMessageAPI(t).then(t=>{0==t.code?(s.setEditorValue(""),s.updateMessage(t.data),e({status:"failed"})):e({status:"failed"})}).catch(t=>{e({status:"failed"})}):this.$api.imApi.sendMessageAPI(t).then(t=>{0==t.code?(s.setEditorValue(""),s.updateMessage(t.data),e()):e({status:"failed"})}).catch(t=>{e({status:"failed"})})})},handlePullMessages(t,e,i){let s=this.params,n=i.getMessages(t.id);return n.length>0?(s.last_id=n[0].msg_id,s.page=1):s.last_id=0,s.toContactId=t.id,s.is_group=t.is_group,this.$api.imApi.getMessageListAPI(s).then(t=>{this.params.page++;let i=!1,s=t.data;s.length<this.params.limit&&(i=!0),e(s,i)}).catch(t=>{e([],!0)}),!0},publishNotice(){this.noticeBox=!1,this.$api.imApi.setNoticeAPI({id:this.group_id,notice:this.notice}).then(t=>{0==t.code&&this.$message({type:"success",message:"发布成功!"})})},openMsgBox(){this.ChatRecordMap={is_at:1},this.messageBox=!0,this.componentKey+=1,this.$refs.IMUI.updateContact({id:this.currentChat.id,is_at:0});let t=this.currentChat.is_at;this.atUnread-=t,this.currentChat.is_at=0},openNotice(){var t="<div style='white-space: break-spaces;word-break:break-all'>"+this.notice+"</div>";this.$alert(t,"群公告",{confirmButtonText:"确定",dangerouslyUseHTMLString:!0}).then(()=>{}).catch(()=>{})},loadEmojiData(){this.$api.messageApi.emojiList({}).then(t=>{const{IMUI:e}=this.$refs;if(0==t.code&&0!=t.data.length){const i=JSON.parse(JSON.stringify(w)),s=this.mergeFavoriteEmojis(i,t.data);this.emojiGroups=s,e.initEmoji(this.emojiGroups)}else this.emojiGroups=[...w],e.initEmoji(this.emojiGroups)})},mergeFavoriteEmojis(t,e){const i=t.find(t=>2===t.type),s=t.find(t=>1===t.type);return i&&(i.children=e.map(t=>({...t}))),[s,i]},openCreateGroup(){this.isAdd=1,this.dialogTitle="创建群聊",this.userIds=[],this.createChatBox=!0},changeOwner(){this.isAdd=2,this.dialogTitle="转让群主",this.createChatBox=!0},openAddGroupUser(){var t=tt.mD(this.groupUser,"user_id");this.isAdd=0,this.userIds=t,this.dialogTitle="添加群成员",this.createChatBox=!0},manageGroup(t,e,i){this.createChatBox=!1;let s=this.globalConfig.chatInfo.groupUserMax;if(0==e){if(t.length+this.groupUser.length>s&&s>0)return this.$message.error("群成员不能大于"+s+"人!");this.$api.imApi.addGroupUserAPI({user_ids:t,id:this.group_id})}else if(1==e){if(t.length>s&&s>0)return this.$message.error("群成员不能大于"+s+"人!");this.$api.imApi.addGroupAPI({user_ids:t,name:i}).then(t=>{const e=t.data,{IMUI:i}=this.$refs;0==t.code&&(i.appendContact(e),i.changeContact(e.id))})}else this.$api.imApi.changeOwnerAPI({user_id:t[0],id:this.group_id}).then(e=>{const{IMUI:i}=this.$refs;0==e.code&&(this.$message({type:"success",message:""==e.msg?"转让成功":e.msg}),this.groupSetting=!1,i.updateContact({id:this.group_id,role:3,owner_id:t[0]}),i.changeContact(null))})},forwardUser(t){if(t.length>5)return this.$message.error("转发的人数不能超过5人!");this.forwardBox=!1;var e=this.currentMessage;const i=e.content.replace(/<a\b[^>]*>(.*?)<\/a>/g,"$1");this.$api.imApi.forwardMessageAPI({user_ids:t,msg_id:e.msg_id,content:i})},getGroupUserList(t){this.$api.imApi.groupUserListAPI({group_id:t}).then(t=>{if(0==t.code){let e=t.data;this.groupUser=e,this.setAtUserList(e),this.groupUserCount=e.length}})},saveGroupName(t){if(this.displayName.length<1)return this.$notify({title:"警告",message:"名称不能为空!",type:"warning"}),this.isEdit=!1,!1;if(this.displayName!=this.oldName){const{IMUI:e}=this.$refs;this.$api.imApi.editGroupNameAPI({id:t.id,displayName:this.displayName}).then(i=>{400!==i.code&&e.updateContact({id:t.id,displayName:this.displayName})})}this.isEdit=!1},openGroupSetting(t){this.groupSetting=!0,this.contactSetting=t||this.currentChat,this.componentKey++},closeSearch(){var t=this;setTimeout(function(){t.searchResult=!1},300)},searchContact(t){""!=this.keywords?this.searchList=tt.l(t,["displayName","name_py"],this.keywords):this.searchList=[]},setLocalMsgIsRead(t){const{IMUI:e}=this.$refs;for(let i=0;t.length>i;i++){const s={id:t[i]["id"],is_read:1,status:"succeed",sendTime:parseInt(t[i]["sendTime"])+1,content:t[i]["content"]};e.updateMessage(s)}},popNotice(t){let e=this;const{IMUI:i}=this.$refs;if("granted"==Notification.permission){let s=t.fromUser.displayName||t.fromUser.realname,n=i.lastContentRender(t),a=new Notification("收到一条新消息",{body:s+":"+n,icon:t.fromUser.avatar});a.onclick=function(t){e.$nextTick(()=>{setTimeout(()=>{},500)}),window.focus(),a.close()}}else{const t=document.getElementById("chatAudio");t.currentTime=0,t.play()}},recieveMsg(t){const{IMUI:e}=this.$refs,i=e.getCurrentContact();if(i.id==t.toContactId&&"system"!=i.id){var s=[];s.push(t),this.$api.imApi.setMsgIsReadAPI({toContactId:i.id,is_group:i.is_group,messages:s,fromUser:t.fromUser.id})}else if(this.user.id!=t.fromUser.id){let i=this.getContact(t.toContactId);1==i.is_notice&&this.unread++,this.initMenus(e)}this.user.id==t.toContactId&&(t.toContactId=t.toUser),"system"==t.toContactId&&e.updateContact({id:t.toContactId,lastContent:e.lastContentRender(t),lastSendTime:t.sendTime,unread:"+1"});const n=e.getContacts();n.forEach(e=>{t.fromUser.id==e.user_id&&(t.fromUser.displayName=e.displayName)}),e.appendMessage(t,this.isBottom)},openMessageBox(){this.messageBox=!0,this.componentKey+=1},openSetting(){const{IMUI:t}=this.$refs;t.changeMenu("setting")},setNoSpeak(){this.noSpeakBox=!1,this.$api.imApi.setNoSpeakAPI(this.noSpeakData)},handleCommand(t){"addGroup"==t?this.openCreateGroup():this.addFriendBox=!0},rtcMsg(t){let e="",i="",s="";this.wsData&&(i=this.wsData.msg_id??"",s=this.wsData.id??"");let n=!0;switch(t.event){case"calling":s=tt.cZ();break;case"hangup":907==t.code&&this.$message.error("对方忙线中"),t.isbtn||(n=!1),this.wsData="",this.webrtcLock=!1;break;case"iceCandidate":let i={};i["candidate"]=t["iceCandidate"]["candidate"],i["sdpMLineIndex"]=t["iceCandidate"]["sdpMLineIndex"],i["sdpMid"]=t["iceCandidate"]["sdpMid"],e=JSON.stringify(i);break;case"mediaDevices":n=!1;break}n&&this.$api.imApi.sendToMsg({id:s,msg_id:i,toContactId:this.caller.id,type:this.is_video?1:0,event:t.event,status:t.status??"",code:t.code??"",callTime:t.callTime??"",sdp:t.sdp??"",iceCandidate:e}).then(e=>{0==e.code&&"calling"==t.event&&(this.wsData=e.data,r().set("wsData",e.data),this.recieveMsg(e.data)),"907"==e.data.extends.code&&this.$message.error("对方不在线")})},reconnect(){this.$refs.socket.initWebSocket()},closeSocket(){this.$refs.socket.close()},closeQuote(){this.quote=""},noSpeakExp(t){return 1e3*t>(new Date).getTime()&&tt.p6("m-d H:i",t)},eventBottom(t){this.isBottom=t},logout(){this.$confirm("你确定要退出聊天室吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})})}).catch(()=>{this.$message({type:"info",message:"已取消退出"})})}}},Ze=We,Xe=(0,d.A)(Ze,Z,X,!1,null,"ec376752",null),ti=Xe.exports;var ei={name:"app",components:{rainagdIm:ti},props:{dialogTableVisible:{type:Boolean,default:!1}},data(){return{unread:0,dialogIsShow:!0}},computed:{formatTime(){return function(t){return timeFormat(t)}}},watch:{dialogTableVisible(t){t&&this.$nextTick(()=>{this.dialogIsShow=t})}},created(){},mounted(){},methods:{closeDialog(){this.appList=!1,this.$nextTick(()=>{this.$emit("update:dialogTableVisible",!1)})},contactSync(t){this.dialogIsShow=!0,this.$emit("update:dialogTableVisible",!0)}}},ii=ei,si=(0,d.A)(ii,J,W,!1,null,"6e7fdceb",null),ni=si.exports,ai={name:"Index",components:{Message:ni},data(){return{dialogTableVisible:!1,unread:0,allContacts:[],activeName:"0",techStack:[{icon:"el-icon-cpu",text:"后端:TP6+Mysql+workerman+webRTC中继服务。 <b class='c-success'>[开源]</b>"},{icon:"el-icon-news",text:"前端:vue2+element-ui+lemon-imui。 <b class='c-success'>[开源]</b>"},{icon:"el-icon-mobile",text:"移动端:uniapp for vue3+pinia。支持编译为小程序+h5+APP。<b class='c-red'>[联系作者,捐赠获取]</b>"},{icon:"el-icon-monitor",text:"桌面端:vue2(web端修改版)+electron。<b class='c-red'>[联系作者,捐赠获取]</b>"}],introduce:[{icon:"el-icon-chat-dot-square",text:this.$packageData.name+"是一个<b class='c-red'>开源的即时通信demo(存在一定的BUG),已取得软件著作权,主要用于学习交流,为大家提供即时通讯的开发思路</b>,许多功能需要自行开发,开发的初衷旨在快速建立企业内部通讯系统、内网交流、社交交流。"},{icon:"el-icon-cpu",text:"不建议用于商业用途,如确有需要商用,请联系作者授权,自行开发代码量必须要高于原代码量的30%以上,并注明相关的版权问题。"},{icon:"el-icon-office-building",text:"支持企业模式:类似于企业微信,初始化联系人是加载企业内的所有人员,无须加好友可以直接进行对话、创建群聊等,适用于企业内部通讯。"},{icon:"el-icon-chat-line-round",text:"支持社交模式:类似于微信或QQ,需要添加好友才能进行对话,适用于社交交流。社交模式支持加好友、删除好友、改备注等功能。"},{icon:"el-icon-discover",text:"选择适合自己项目的模式,然后在后台设置即可。社交模式体验需要自行搭建部署哦,可以在项目地址中看到相关的截图。"}]}},computed:{...(0,v.aH)({chatSocket:t=>t.unread,getContacts:t=>t.allContacts})},watch:{chatSocket(t){this.unread=t},getContacts(t){this.allContacts=t}},methods:{handleClick(t,e){console.log(t,e)},showMessageBox(){this.dialogTableVisible?this.dialogTableVisible=!1:this.dialogTableVisible=!0},scrollTo(){window.scrollTo(0,document.body.scrollHeight)},downApp(){window.open(window.BASE_URL+"downapp")}}},oi=ai,ri=(0,d.A)(oi,Q,Y,!1,null,"65c49d08",null),ci=ri.exports,li=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-container",style:"background-image:url("+t.Background+")"},[e("raingadIm",{attrs:{fullScreen:!0}})],1)},di=[],ui=i.p+"assets/img/login-background.4d69904c.jpg",hi={name:"app",components:{raingadIm:ti},data(){return{Background:ui}}},pi=hi,mi=(0,d.A)(pi,li,di,!1,null,"f0e47f02",null),gi=mi.exports,fi=function(){var t=this,e=t._self._c;return e("div",{staticClass:"login-wrapper",style:"background-image:url("+t.Background+")"},[e("div",{staticClass:"form-box"},[e("div",{staticClass:"form-title"},[e("img",{attrs:{src:t.globalConfig.sysInfo.logo?t.globalConfig.sysInfo.logo:t.$packageData.logo,width:"100",alt:"icon"}}),e("p",{staticClass:"mt-10 f-20"},[t._v(t._s(t.globalConfig.sysInfo.name))])]),e("el-form",{ref:"loginForm",staticClass:"login-form",attrs:{model:t.loginForm,rules:t.loginRules,"label-width":"0px"}},[e("el-form-item",{attrs:{prop:"account"}},[e("el-input",{ref:"account",attrs:{type:"text","auto-complete":"off",placeholder:"请输入账号","prefix-icon":"el-icon-user"},model:{value:t.loginForm.account,callback:function(e){t.$set(t.loginForm,"account",e)},expression:"loginForm.account"}})],1),e("el-form-item",{directives:[{name:"show",rawName:"v-show",value:!t.forget,expression:"!forget"}],attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"请输入密码","prefix-icon":"el-icon-lock"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleLogin.apply(null,arguments)}},model:{value:t.loginForm.password,callback:function(e){t.$set(t.loginForm,"password",e)},expression:"loginForm.password"}})],1),e("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.forget,expression:"forget"}],attrs:{prop:"code"}},[e("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"6"},model:{value:t.loginForm.code,callback:function(e){t.$set(t.loginForm,"code",e)},expression:"loginForm.code"}},[e("el-button",{attrs:{slot:"append",loading:t.coding},on:{click:function(e){return t.sendCode()}},slot:"append"},[t._v("发送验证码")])],1)],1),t.globalConfig.demon_mode?e("div",{staticClass:"c-666",staticStyle:{"font-size":"12px"}},[t._v("演示账号:13800000002~13800000020,密码:123456")]):t._e(),e("el-form-item",[e("div",{staticClass:"remenber"},[e("el-checkbox",{model:{value:t.loginForm.rememberMe,callback:function(e){t.$set(t.loginForm,"rememberMe",e)},expression:"loginForm.rememberMe"}},[t._v("记住我")]),e("el-button",{attrs:{type:"text"},on:{click:function(e){t.forget=!t.forget,t.loginForm.code=""}}},[t._v(t._s(t.forget?"密码登陆":"忘记密码"))])],1)]),e("el-form-item",[e("el-button",{staticStyle:{width:"100%"},attrs:{loading:t.loading,size:"small",type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.handleLogin.apply(null,arguments)}}},[t.loading?e("span",[t._v("登 录 中...")]):e("span",[t._v("登 录")])])],1),1==t.globalConfig.sysInfo.regtype?e("el-form-item",[e("el-button",{staticStyle:{width:"100%"},attrs:{size:"small",plain:""},on:{click:function(e){return t.$router.push("/register")}}},[t._v(" 注册 ")])],1):t._e(),e("div",{staticClass:"c-999",attrs:{align:"center"}},[t._v(t._s(t.globalConfig.sysInfo.name)+" for "+t._s(t.$packageData.version))]),e("el-button",{staticClass:"mt-10",staticStyle:{width:"100%"},attrs:{plain:""},on:{click:function(e){return t.downapp()}}},[e("span",[t._v("下载客户端")])])],1)],1)])},vi=[],bi={name:"Login",data(){return{Background:ui,forget:!1,loginForm:{account:"",password:"",code:"",rememberMe:!0},loginRules:{account:[{required:!0,trigger:"blur",message:"用户名不能为空"}],password:[{required:!0,trigger:"blur",message:"密码不能为空"}]},loading:!1,coding:!1,redirect:void 0}},computed:{...(0,v.aH)({globalConfig:t=>t.globalConfig})},watch:{$route:{handler:function(t){this.redirect=t.query&&t.query.redirect},immediate:!0},forget(t){t&&(this.loginForm.password="123456")}},mounted(){this.$nextTick(()=>{let t=this.$route.query.token;if(t)return this.dologin({token:t});if(this.globalConfig.demon_mode){const t=Math.floor(19*Math.random()+2);this.loginForm.account=138e8+t,this.loginForm.password="123456",this.$refs.account.focus()}const e=r().get("LoginAccount");e&&(this.loginForm.account=e.account,this.loginForm.password=e.password,this.loginForm.rememberMe=!0,this.$refs.account.focus())})},methods:{handleLogin(){!this.forget||this.loginForm.code?this.$refs.loginForm.validate(t=>{const e={account:this.loginForm.account,password:this.loginForm.password,code:this.loginForm.code};this.loginForm.rememberMe?r().set("LoginAccount",e):r().rm("LoginAccount"),t&&this.dologin(e)}):this.$message.error("请输入验证码")},dologin(t){this.loading=!0,this.$store.dispatch("Login",t).then(t=>{window.location.reload()}).catch(()=>{this.loading=!1})},sendCode(){if(!this.loginForm.account)return void this.$message.error("请输入账号");this.coding=!0;let t={account:this.loginForm.account,type:1};this.$store.dispatch("sendCode",t).then(t=>{this.$message.success("发送成功"),this.coding=!1}).catch(()=>{this.coding=!1})},downapp(){window.open(window.BASE_URL+"downapp")}}},yi=bi,Ci=(0,d.A)(yi,fi,vi,!1,null,null,null),xi=Ci.exports,Ei=function(){var t=this,e=t._self._c;return e("div",{staticClass:"login-wrapper",style:"background-image:url("+t.Background+")"},[e("div",{staticClass:"form-box"},[e("div",{staticClass:"form-title"},[e("div",{staticClass:"f-14 cur-handle",on:{click:function(e){return t.$router.push("/login")}}},[e("i",{staticClass:"el-icon-back"},[t._v("返回")])]),t._m(0),e("div")]),e("el-form",{ref:"regForm",staticClass:"login-form",attrs:{model:t.regForm,rules:t.loginRules,"label-width":"0px"}},[e("el-form-item",{attrs:{prop:"account"}},[e("el-input",{ref:"account",attrs:{type:"text","auto-complete":"off",placeholder:t.placeholder,"prefix-icon":"el-icon-user"},on:{input:t.handleInput},model:{value:t.regForm.account,callback:function(e){t.$set(t.regForm,"account",e)},expression:"regForm.account"}})],1),e("el-form-item",{attrs:{prop:"realname"}},[e("el-input",{ref:"realname",attrs:{type:"text","auto-complete":"off",placeholder:"请输入用户名/昵称","prefix-icon":"el-icon-user"},model:{value:t.regForm.realname,callback:function(e){t.$set(t.regForm,"realname",e)},expression:"regForm.realname"}})],1),0!=t.globalConfig.sysInfo.regauth?e("el-form-item",{attrs:{prop:"code"}},[e("el-input",{attrs:{placeholder:"请输入验证码",maxlength:"6"},model:{value:t.regForm.code,callback:function(e){t.$set(t.regForm,"code",e)},expression:"regForm.code"}},[e("el-button",{attrs:{slot:"append",loading:t.loading},on:{click:function(e){return t.sendCode(!0)}},slot:"append"},[t._v("发送验证码")])],1)],1):t._e(),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password","show-password":"","auto-complete":"off",placeholder:"请输入密码","prefix-icon":"el-icon-lock"},model:{value:t.regForm.password,callback:function(e){t.$set(t.regForm,"password",e)},expression:"regForm.password"}})],1),e("el-form-item",{attrs:{prop:"password"}},[e("el-input",{attrs:{type:"password","show-password":"","auto-complete":"off",placeholder:"请再次输入密码","prefix-icon":"el-icon-lock"},model:{value:t.regForm.repass,callback:function(e){t.$set(t.regForm,"repass",e)},expression:"regForm.repass"}})],1),e("el-form-item",[e("el-button",{staticStyle:{width:"100%"},attrs:{loading:t.loading,size:"small",type:"primary"},nativeOn:{click:function(e){return e.preventDefault(),t.handleRegist.apply(null,arguments)}}},[t.loading?e("span",[t._v("注 册 中...")]):e("span",[t._v("注册")])])],1),e("div",{staticClass:"c-999",attrs:{align:"center"}},[t._v(t._s(t.globalConfig.sysInfo.name)+" for "+t._s(t.$packageData.version))])],1)],1)])},wi=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"mr-40"},[e("b",[t._v("注册用户")])])}],Ai={name:"Register",data(){return{Background:ui,placeholder:"请输入账号:4-32个字符",regForm:{account:"",realname:"",password:"",repass:"",code:""},loginRules:{account:[{min:4,max:32,message:"长度在 4 到 32 个字符",trigger:"blur"}],realname:[{required:!0,message:"请输入用户名/昵称",trigger:"blur"},{min:2,max:16,message:"长度在 2 到 16 个字符",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"},{min:6,max:16,message:"长度在 6 到 16 个字符",trigger:"blur"}]},loading:!1,redirect:void 0}},computed:{...(0,v.aH)({globalConfig:t=>t.globalConfig})},watch:{$route:{handler:function(t){this.redirect=t.query&&t.query.redirect},immediate:!0}},mounted(){let t=this.globalConfig.sysInfo.regauth??0,e="请输入账号:4-32个字符";switch(parseInt(t)){case 1:e="请输入正确的手机号";break;case 2:e="请输入正确的邮箱";break;case 3:e="请输入正确的手机号或者邮箱";break;default:e="请输入正确的账号"}let i={required:!0,message:e,trigger:"blur"};this.loginRules.account.push(i);let s={type:"email",message:e,trigger:"blur",validator:this.validateContact},n={type:"phone",message:e,trigger:"blur",validator:this.validateContact};1==t?(this.placeholder="请输入手机号",this.loginRules.account.push(n)):2==t?(this.placeholder="请输入邮箱账号",this.loginRules.account.push(s)):3==t&&(this.placeholder="请输入手机号/邮箱",this.loginRules.account.push(s),this.loginRules.account.push(n))},methods:{handleInput(t){const e=t.replace(/[\u4e00-\u9fa5]/g,"");this.regForm.account=e},validateContact(t,e,i){e?/^1[3456789]\d{9}$/.test(e)||/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test(e)?i():i(new Error("请输入正确的手机号或邮箱")):i()},handleRegist(){this.$refs.regForm.validate(t=>{if(this.regForm.password!=this.regForm.repass)return this.$message.error("两次密码不一致"),!1;const e={account:this.regForm.account,realname:this.regForm.realname,password:this.regForm.password,code:this.regForm.code,inviteCode:this.$route.query.inviteCode??""};if(!t)return this.$message.error("请检查输入项");this.loading=!0,this.$api.commonApi.register(e).then(t=>{this.loading=!1,0===t.code&&(this.$message.success("注册成功"),this.$router.push("/login"))}).catch(t=>{this.loading=!1})})},sendCode(){if(!this.regForm.account)return void this.$message.error("请输入账号");this.coding=!0;let t={account:this.regForm.account,type:2};this.$store.dispatch("sendCode",t).then(t=>{this.$message.success("发送成功"),this.coding=!1}).catch(()=>{this.coding=!1})}}},ki=Ai,Ii=(0,d.A)(ki,Ei,wi,!1,null,"021f4740",null),_i=Ii.exports,Si=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-container"},[e("el-container",{staticStyle:{height:"100vh",border:"1px solid #eee"}},[e("el-header",{staticStyle:{"text-align":"right","font-size":"12px","border-bottom":"1px solid #e6e6e6"}},[e("el-row",{style:{height:"60px"},attrs:{type:"flex",justify:"space-between",align:"middle"}},[e("el-col",{staticClass:"logo",attrs:{span:8}},[e("div",{staticClass:"image"},[e("img",{attrs:{src:t.globalConfig.sysInfo.logo,alt:"logo"}})]),e("div",{staticClass:"f-20 ml-5"},[t._v(t._s(t.globalConfig.sysInfo.name)+" 管理中心")])]),e("el-col",{staticClass:"text-right",attrs:{span:16}},[e("div",{staticClass:"user"},[e("span",{staticClass:"message"},[e("router-link",{attrs:{to:"/chat"}},[e("el-button",[t._v(" 进入聊天 ")])],1)],1),e("span",{staticClass:"message",on:{click:function(e){return t.showMessageBox()}}},[e("el-badge",{attrs:{value:t.unread,max:99,hidden:!t.unread}},[e("i",{staticClass:"el-icon-chat-line-round f-24",attrs:{circle:""}})])],1),e("el-dropdown",{attrs:{trigger:"click"},on:{command:t.handleCommand}},[e("div",{staticClass:"lz-flex lz-align-items-center cur-handle"},[e("span",{staticClass:"avatar"},[e("img",{attrs:{src:t.$store.state.userInfo.avatar,alt:"avatar"}})]),e("span",{staticClass:"username"},[t._v(t._s(t.$store.state.userInfo.realname))]),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"profile"}},[t._v("个人信息")]),e("el-dropdown-item",{attrs:{command:"logout"}},[t._v("退出登录")])],1)],1)],1)])],1)],1),e("el-container",[e("el-aside",{staticClass:"main-aside",style:{width:t.asideWidth}},[e("div",{staticClass:"aside-menu"},[e("el-scrollbar",[e("el-menu",{staticClass:"el-menu-vertical-demo",staticStyle:{border:"none"},attrs:{"default-active":t.active,mode:"vertical","ext-color":"#fff",collapse:t.isCollapse},on:{select:t.handleMenuSelect}},[t._l(t.routes,function(i,s){return[e("el-menu-item",{key:s,attrs:{index:i.path}},[e("i",{class:i.meta.icon}),e("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(i.meta.title))])])]})],2)],1)],1),e("div",{staticClass:"aside-bottom",on:{click:t.handleCollapse}},[e("span",{staticClass:"el-icon-s-fold f-18"})])]),e("el-main",{staticStyle:{"background-color":"#f5f5f5",padding:"0"}},[e("el-scrollbar",[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view",{key:t.key})],1)],1)],1)],1)],1),e("Message",{ref:"Message",attrs:{dialogTableVisible:t.dialogTableVisible},on:{"update:dialogTableVisible":function(e){t.dialogTableVisible=e},"update:dialog-table-visible":function(e){t.dialogTableVisible=e}}})],1)},Ti=[],Di={name:"Index",components:{Message:ni},data(){return{dialogTableVisible:!1,unread:0,allContacts:[],isCollapse:!1,asideWidth:"200px",active:"",routes:[]}},computed:{...(0,v.aH)({chatSocket:t=>t.unread,getContacts:t=>t.allContacts,globalConfig:t=>t.globalConfig}),key(){return this.$route.path}},watch:{chatSocket(t){this.unread=t},getContacts(t){this.allContacts=t},isCollapse(t){this.asideWidth=t?"65px":"200px"}},mounted(){this.isCollapse=r().get("isCollapse")||!1,this.active=this.$route.path;const t=this.$router.options.routes.filter(t=>"manage"==t.name);this.routes=t[0].children,window.addEventListener("resize",this.handleResize)},methods:{handleResize(){window.innerWidth<900?this.isCollapse=!0:this.isCollapse=!1},handleMenuSelect(t){this.active=t,this.$route.path!=t&&this.$router.push(t)},showMessageBox(){this.dialogTableVisible?this.dialogTableVisible=!1:this.dialogTableVisible=!0},handleCommand(t){"profile"==t?this.$user(this.$store.state.userInfo.user_id):this.$confirm("你确定要退出聊天室吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$store.dispatch("LogOut").then(()=>{this.$router.push({path:"/login"})})}).catch(()=>{this.$message({type:"info",message:"已取消退出"})})},handleCollapse(){this.isCollapse=!this.isCollapse,r().set("isCollapse",this.isCollapse)}}},Mi=Di,Li=(0,d.A)(Mi,Si,Ti,!1,null,"482b879c",null),Ni=Li.exports,Oi=[{path:"/manage",name:"manage",component:Ni,meta:{title:"管理"},icon:"el-icon-s-tools",children:[{path:"/manage/index",name:"index",component:()=>i.e(649).then(i.bind(i,649)),meta:{title:"概况",icon:"el-icon-data-line"}},{path:"/manage/setting",name:"setting",component:()=>Promise.all([i.e(515),i.e(924)]).then(i.bind(i,4784)),meta:{title:"设置",icon:"el-icon-setting"}},{path:"/manage/user",name:"user",component:()=>Promise.all([i.e(515),i.e(953)]).then(i.bind(i,1945)),meta:{title:"成员",icon:"el-icon-user"}},{path:"/manage/message",name:"user",component:()=>Promise.all([i.e(515),i.e(36)]).then(i.bind(i,2320)),meta:{title:"消息",icon:"el-icon-chat-dot-round"}},{path:"/manage/group",name:"group",component:()=>i.e(132).then(i.bind(i,3132)),meta:{title:"群聊",icon:"el-icon-chat-dot-square"}},{path:"/manage/files",name:"files",component:()=>i.e(440).then(i.bind(i,7440)),meta:{title:"文件",icon:"el-icon-folder-opened"}}]}];s["default"].use(q.Ay);const Pi=[{path:"/",name:"home",component:gi,meta:{title:"聊天"}},{path:"/chat",name:"chat",component:gi,meta:{title:"聊天演示页"}},{path:"/demo",name:"demo",component:ci,meta:{title:"演示页"}},{path:"/login",name:"login",component:xi,meta:{title:"登录"}},{path:"/register",name:"register",component:_i,meta:{title:"注册"}},{path:"*",redirect:"/404",hidden:!0},{path:"/404",component:()=>i.e(154).then(i.bind(i,2154)),hidden:!0}],Ui=()=>new q.Ay({mode:"hash",scrollBehavior:()=>({y:0}),routes:[...Pi,...Oi]}),Ri=Ui();function ji(){const t=Ui();Ri.matcher=t.matcher}var Bi=Ri,Fi=i(788),$i=i.n(Fi);const Vi={loadingCache:function(){if(r().get("authToken")&&!$i().defaults.headers["authToken"]){const t=r().get("UserInfo");t&&rs.commit("SET_USERINFO",t)}rs.commit("SET_APPNAME",r().get("systemName")),rs.commit("SET_APPLOGO",r().get("systemLogo"))},updateAxiosCache:function(){$i().defaults.headers["authToken"]=r().get("authToken"),$i().defaults.headers["sessionId"]=r().get("sessionId")},updateAxiosHeaders:function(){$i().defaults.headers["authToken"]=r().get("authToken"),$i().defaults.headers["sessionId"]=r().get("sessionId")},rmAxiosCache:function(){r().rm("authToken"),r().rm("sessionId")}};var Hi=Vi;function Ki(){return new Promise((t,e)=>{Hi.rmAxiosCache(),delete $i().defaults.headers["authToken"],delete $i().defaults.headers["sessionId"],t(!0)})}function zi(t,e){return new Promise((i,s)=>{$i().defaults.headers["authToken"]=t,$i().defaults.headers["sessionId"]=e,i(!0)})}function Gi(){return r().get("authToken")&&!$i().defaults.headers["authToken"]&&Hi.updateAxiosCache(),!!r().get("authToken")}var qi=i(9122),Qi=i.n(qi),Yi=i(7534);const Ji=(0,Yi.debounce)(500,()=>{Ki().then(()=>{location.reload()}).catch(()=>{location.reload()})}),Wi=(0,Yi.debounce)(500,(t,e="error")=>{(0,p.Message)({message:t,duration:1500,type:e})}),Zi=(0,Yi.debounce)(1e3,t=>{p.MessageBox.confirm(t,"提示",{confirmButtonText:"确定",showCancelButton:!1,type:"warning"}).then(()=>{Ji()}).catch(()=>{})});$i().defaults.headers.post["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8";const Xi=window.location.protocol+"//"+window.location.host+"/";window.BASE_URL=Xi;const ts=$i().create({baseURL:Xi,timeout:6e4});ts.interceptors.request.use(t=>{const e=r().get("sessionId"),i=r().get("authToken");e&&i&&(t.headers["sessionId"]=e,t.headers["Authorization"]=i);const s=t.headers["Content-Type"]&&-1!==t.headers["Content-Type"].indexOf("application/json");if(s)void 0!==t.data&&null!==t.data||(t.data={});else{const e=t.headers["Content-Type"]&&-1!==t.headers["Content-Type"].indexOf("multipart/form-data");t.data=e?t.data:Qi().stringify(t.data)}return t},t=>Promise.reject(t)),ts.interceptors.response.use(t=>{const e=t.data;if(200!==t.status||"blob"!==t.config.responseType)return 0!==e.code?(-1===e.code?Zi(e.msg):[400,402,403,404,405,502,500].includes(e.code)?Wi(e.msg,"warning"):Wi(e.msg),e):e;if(t.headers["content-disposition"]||t.headers["content-type"]&&-1!=t.headers["content-type"].indexOf("application/pdf"))return t;{const e=new Blob([t.data],{type:"application/json"}),i=new FileReader;i.onload=function(){const t=JSON.parse(this.result);t.msg&&Wi(t.msg,1==t.code?"success":"error")},i.readAsText(e)}},t=>{if(t.response){const e=t.response;500==e.status?Wi("服务器返回错误,请检查!"):e.data&&e.data.msg&&Wi(e.data.msg)}return Promise.reject(t)});var es=ts;const is={loginAPI:t=>es({url:"common/pub/login",method:"post",data:t}),logoutAPI:()=>es({url:"common/pub/logout",method:"post"}),bindClientIdAPI:t=>es({url:"common/pub/bindUid",method:"post",data:t}),offlineAPI:t=>es({url:"common/pub/offline",method:"post",data:t}),bindGroupAPI:t=>es({url:"common/pub/bindGroup",method:"post",data:t}),sendCode:t=>es({url:"common/pub/sendCode",method:"post",data:t}),getSystemInfo:t=>es({url:"common/pub/getSystemInfo",method:"post",data:t}),register:t=>es({url:"common/pub/register",method:"post",data:t}),uploadAvatar:t=>es({url:"common/upload/uploadAvatar",method:"post",data:t,headers:{"Content-Type":"multipart/form-data"}}),publishNotice:t=>es({url:"manage/index/publishNotice",method:"post",data:t}),getNoticeList:t=>es({url:"manage/index/noticeList",method:"post",data:t}),delNotice:t=>es({url:"manage/index/delNotice",method:"post",data:t}),systemSta:t=>es({url:"manage/index/index",method:"post",data:t})};var ss=is;s["default"].use(v.Ay);const ns={userInfo:null,allAuth:null,socketAction:"",contactSync:"",toContactId:0,unread:0,allContacts:[],globalConfig:[],wsStatus:!0,isFulls:!1,setting:{sendKey:"1",theme:"default",isVoice:!0,avatarCricle:!1,hideMessageName:!1,hideMessageTime:!1},name:""},as={SET_USERINFO:(t,e)=>{r().set("UserInfo",e),t.userInfo=e,e.setting&&(t.setting=e.setting)},SET_AUTH:(t,e)=>{const i=e.authToken,s=e.sessionId;r().set("authToken",i),r().set("sessionId",s),zi(i,s)},catchSocketAction(t,e){t.socketAction=e},updateUnread:(t,e)=>{t.unread=parseInt(e)},initContacts:(t,e)=>{t.allContacts=e},openChat:(t,e)=>{t.toContactId=e,t.contactSync=Math.random().toString(36).substr(-8)},openname:(t,e)=>{t.name=e},updateSetting(t,e){t.userInfo.setting=e,t.setting=e},setGlobalConfig(t,e){t.globalConfig=e},taskStatus:(t,e)=>{t.wsStatus=e},isFullscreen:(t,e)=>{t.isFulls=e}},os={Login({commit:t,dispatch:e},i){return new Promise((s,n)=>{ss.loginAPI(i).then(e=>{const i=e.data||i;t("SET_AUTH",i),t("SET_USERINFO",i.userInfo),s(e)}).catch(t=>{e("LogOut"),n(t)})})},LogOut({commit:t}){return new Promise((t,e)=>{ss.logoutAPI().then(()=>{r().rm("authToken"),r().rm("sessionId"),r().rm("UserInfo"),Ki(),ji(),t()}).catch(t=>{e(t)})})},getSystemInfo({commit:t}){return new Promise((e,i)=>{ss.getSystemInfo().then(i=>{0==i.code&&(r().set("globalConfig",i.data),t("setGlobalConfig",i.data),e(i))}).catch(t=>{i(t)})})},sendCode({commit:t},e){return new Promise((t,i)=>{ss.sendCode(e).then(e=>{t(e)}).catch(t=>{i(t)})})}};var rs=new v.Ay.Store({state:ns,mutations:as,actions:os}),cs=i(994),ls=i.n(cs),ds=i(3193);s["default"].directive("outside",ds.A);var us=i(4130),hs=i.n(us);const ps=["/login","/register"],ms=["/","/demo","/chat"];Bi.beforeEach((t,e,i)=>{if(t.meta.disabled)i(!1);else if(hs().start(),Gi()){let e=r().get("globalConfig"),s=e.demon_mode,n="";s&&(n="/demo");let a=r().get("UserInfo");ps.includes(t.path)||"/"==t.path&&n?(i({path:n}),hs().done()):ms.includes(t.path)&&0==e.sysInfo.state?(a&&a.role>0||s?i({path:"/manage/index"}):i({path:"/404",query:{msg:e.sysInfo.closeTips}}),hs().done()):-1!==t.path.indexOf("manage")?a&&a.role>0||s?i():(p.Message.error("您没有权限访问该页面"),i(!1),hs().done()):i()}else-1!==ps.indexOf(t.path)?i():(i("/login"),hs().done())}),Bi.afterEach(()=>{hs().done()}),Bi.onError(t=>{const e=/Loading chunk (\d)+ failed/g,i=t.message.match(e),s=Bi.history.pending.fullPath;i&&Bi.replace(s)});var gs,fs,vs,bs,ys,Cs,xs,Es,ws,As,ks=JSON.parse('{"name":"Raingad-IM","appId":"8007:16.66.168.192","version":"6.0.2","private":true,"description":"一款基于vue2.0的即时聊天工具","author":"Raingad","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build","lint":"vue-cli-service lint","electron:build":"vue-cli-service electron:build","electron:serve":"vue-cli-service electron:serve","postinstall":"electron-builder install-app-deps","postuninstall":"electron-builder install-app-deps"},"main":"background.js","dependencies":{"axios":"^0.21.4","core-js":"^3.8.3","cropperjs":"^1.5.13","element-ui":"^2.15.13","js-audio-recorder":"^1.0.7","js-web-screen-shot":"^1.9.8-rc.3","lockr":"^0.8.5","nprogress":"^0.2.0","quill":"^2.0.3","v-clipboard":"^2.2.3","vue":"^2.6.14","vue-canvas-poster":"^1.2.1","vue-qr":"^4.0.9","vue-quill-editor":"^3.0.6","vue-router":"^3.5.1","vuex":"^3.6.2"},"devDependencies":{"@babel/core":"^7.12.16","@vue/cli-plugin-babel":"~5.0.0","@vue/cli-plugin-router":"~5.0.0","@vue/cli-plugin-vuex":"~5.0.0","@vue/cli-service":"~5.0.0","electron":"^13.0.0","electron-builder":"^22.11.7","electron-devtools-installer":"^3.1.0","prettier":"^2.4.1","sass":"^1.32.7","sass-loader":"^12.0.0","vue-cli-plugin-electron-builder":"~2.1.1","vue-template-compiler":"^2.6.14"},"backstageUrl":"https://gitee.com/raingad/im-instant-chat","frontUrl":"https://gitee.com/raingad/im-chat-front","funcList":[{"icon":"el-icon-chat-line-round","text":"支持单聊和群聊,支持发送表情、图片、语音、视频和文件消息"},{"icon":"el-icon-potato-strips","text":"单聊支持消息已读未读的状态显示,在线状态显示"},{"icon":"el-icon-user","text":"群聊创建、删除和群成员管理、群公告、群禁言、@群成员等"},{"icon":"el-icon-ice-cream-round","text":"支持置顶联系人,消息免打扰;支持设置新消息声音提醒,浏览器通知"},{"icon":"el-icon-video-camera","text":"支持一对一音视频通话(已打通web端和移动端,小程序不支持)"},{"icon":"el-icon-milk-tea","text":"支持文件、图片和绝大部分媒体文件在线预览"},{"icon":"el-icon-mobile-phone","text":"支持移动端(由uniapp开发,可打包H5、APP和小程序),支持简易后台管理"},{"icon":"el-icon-coffee-cup","text":"支持企业模式和社交模式,社交模式支持注册、添加好友功能"}],"license":"Apache2.0","logo":"/assets/img/logo.png","mobileUrl":"https://im.raingad.com/h5","qqGroupUrl":"https://qm.qq.com/q/RgHdvLGiMk","rules":{"generator-star-spacing":"off","no-tabs":"off","no-unused-vars":"off","no-console":"off","no-irregular-whitespace":"off","no-debugger":"off"}}'),Is=i(4250),_s=i.n(Is),Ss={name:"lemonMessageVoice",inheritAttrs:!1,inject:["IMUI"],render(){const t=arguments[0];return t("lemon-message-basic",_s()([{class:"lemon-message-voice"},{props:{...this.$attrs}},{attrs:{reverse:this.$attrs.reverse,message:this.$attrs.message,hideName:this.$attrs.hideName,hideTime:this.$attrs.hideTime},scopedSlots:{content:e=>t("div",{class:["voice-card lz-flex lz-justify-content-start lz-align-items-center",{"im-rows-reverse":this.$attrs.reverse}],style:{width:3*e.extends.duration+"px"}},[t("div",{class:["iconfont icon-im-yuyin f-16",{"voice-icon":e.isPlay},{rotate180:this.$attrs.reverse}]}),"  ",t("div",[e.extends.duration,'"'])])}}]))}},Ts=Ss,Ds=(0,d.A)(Ts,gs,fs,!1,null,null,null),Ms=Ds.exports,Ls={name:"lemonMessageVideo",inheritAttrs:!1,inject:["IMUI"],render(){const t=arguments[0];return t("lemon-message-basic",_s()([{class:"lemon-message-video"},{props:{...this.$attrs}},{attrs:{reverse:this.$attrs.reverse,message:this.$attrs.message,hideName:this.$attrs.hideName,hideTime:this.$attrs.hideTime},scopedSlots:{content:e=>t("div",{class:["video-card"],style:{}},[t("el-image",{style:"max-height: 200px",attrs:{src:e.extends.poster,fit:"cover"}},[t("div",{slot:"error",class:"image-slot"},[t("i",{class:"el-icon-picture-outline"})])]),t("div",{class:"video-shadow"},[t("div",{class:"el-icon el-icon-video-play c-white f-28 video-icon"})])])}}]))}},Ns=Ls,Os=(0,d.A)(Ns,vs,bs,!1,null,null,null),Ps=Os.exports,Us={name:"lemonMessageWebrtc",inheritAttrs:!1,inject:["IMUI"],render(){const t=arguments[0];return t("lemon-message-basic",_s()([{class:"lemon-message-webrtc"},{props:{...this.$attrs}},{attrs:{reverse:this.$attrs.reverse,message:this.$attrs.message,hideName:this.$attrs.hideName,hideTime:this.$attrs.hideTime},scopedSlots:{content:e=>t("div",{class:["voice-card lz-flex lz-justify-content-start lz-align-items-center",{"im-rows-reverse":this.$attrs.reverse}],style:""},[t("div",{class:["el-icon f-16",{"el-icon-phone-outline":0==e.extends.type},{"el-icon-video-camera":1==e.extends.type},{rotate180:this.$attrs.reverse}]}),"  ",t("div",[e.content])])}}]))}},Rs=Us,js=(0,d.A)(Rs,ys,Cs,!1,null,null,null),Bs=js.exports,Fs=i(1735),$s={name:"lemonMessageFile",inheritAttrs:!1,render(){const t=arguments[0];return t("lemon-message-basic",_s()([{class:"lemon-message-file"},{props:{...this.$attrs}},{scopedSlots:{content:e=>[t("div",{class:"lemon-message-file__inner"},[t("p",{class:"lemon-message-file__name"},[e.fileName]),t("p",{class:"lemon-message-file__byte"},[(0,Fs.KU)(e.fileSize)])]),t("div",{class:"lemon-message-file__sfx"},[t("img",{attrs:{src:e.extUrl},style:"width:34px;height:42px"})])]}}]))}},Vs=$s,Hs=(0,d.A)(Vs,xs,Es,!1,null,"8e81f66c",null),Ks=Hs.exports,zs={name:"lemonMessageText",inheritAttrs:!1,inject:["IMUI"],render(){const t=arguments[0];return t("lemon-message-basic",_s()([{class:"lemon-message-text"},{props:{...this.$attrs}},{scopedSlots:{content:e=>{const i=this.IMUI.emojiNameToImage(e.content),s=e.extends&&e.extends.content;return t("div",[t("span",_s()([{},{domProps:{innerHTML:i}}])),s?t("div",{class:"message-quote"},[t("span",[e.extends.content])]):""])}}}]))}},Gs=zs,qs=(0,d.A)(Gs,ws,As,!1,null,"bf5aa10c",null),Qs=qs.exports;const Ys=function(){return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),Js=(function(){document.removeEventListener}(),[]),Ws="@@wkClickoutsideContext";let Zs,Xs=0;function tn(t,e,i){return function(s={},n={}){!(i&&i.context&&s.target&&n.target)||t.contains(s.target)||t.contains(n.target)||t===s.target||i.context.popperElm&&(i.context.popperElm.contains(s.target)||i.context.popperElm.contains(n.target))||(e.expression&&t[Ws].methodName&&i.context[t[Ws].methodName]?i.context[t[Ws].methodName]():t[Ws].bindingFn&&t[Ws].bindingFn())}}!s["default"].prototype.$isServer&&Ys(document,"mousedown",t=>Zs=t),!s["default"].prototype.$isServer&&Ys(document,"mouseup",t=>{Js.forEach(e=>e[Ws].documentHandler(t,Zs))});var en={bind(t,e,i){Js.push(t);const s=Xs++;t[Ws]={id:s,documentHandler:tn(t,e,i),methodName:e.expression,bindingFn:e.value}},update(t,e,i){t[Ws].documentHandler=tn(t,e,i),t[Ws].methodName=e.expression,t[Ws].bindingFn=e.value},unbind(t){const e=Js.length;for(let i=0;i<e;i++)if(Js[i][Ws].id===t[Ws].id){Js.splice(i,1);break}delete t[Ws]}};const sn={getTaskList:t=>es({url:"/manage/Task/getTaskList",method:"post",data:t}),startTask:t=>es({url:"/manage/Task/startTask",method:"post",data:t}),stopTask:t=>es({url:"/manage/Task/stopTask",method:"post",data:t}),getTaskLog:t=>es({url:"/manage/Task/getTaskLog",method:"post",data:t}),clearTaskLog:t=>es({url:"/manage/Task/clearTaskLog",method:"post",data:t})};var nn=sn;const an={setConfig:t=>es({url:"manage/config/setConfig",method:"post",data:t}),getConfig:t=>es({url:"manage/config/getConfig",method:"post",data:t}),getAllConfig:t=>es({url:"manage/config/getAllConfig",method:"post",data:t}),getInviteLink:t=>es({url:"manage/config/getInviteLink",method:"post",data:t}),sendTestEmail:t=>es({url:"manage/config/sendTestEmail",method:"post",data:t})};var on=an;const rn={getUserList:t=>es({url:"/manage/User/index",method:"post",data:t}),addUser:t=>es({url:"/manage/User/add",method:"post",data:t}),editUser:t=>es({url:"/manage/User/edit",method:"post",data:t}),delUser:t=>es({url:"/manage/User/del",method:"post",data:t}),getUserDetail:t=>es({url:"/manage/User/detail",method:"post",data:t}),editPassword:t=>es({url:"/manage/User/editPassword",method:"post",data:t}),setStatus:t=>es({url:"/manage/User/setStatus",method:"post",data:t}),setRole:t=>es({url:"/manage/User/setRole",method:"post",data:t})};var cn=rn;const ln={getGroupList:t=>es({url:"/manage/Group/index",method:"post",data:t}),addGroupUser:t=>es({url:"/manage/Group/addGroupUser",method:"post",data:t}),delGroupUser:t=>es({url:"/manage/Group/delGroupUser",method:"post",data:t}),changeOwner:t=>es({url:"/manage/Group/changeOwner",method:"post",data:t}),setManager:t=>es({url:"/manage/Group/setManager",method:"post",data:t}),delGroup:t=>es({url:"/manage/Group/del",method:"post",data:t})};var dn=ln;const un={getContactsAPI:t=>es({url:"enterprise/im/getContacts",method:"post",data:t}),searchUserListAPI:t=>es({url:"enterprise/im/searchUserList",method:"post",data:t}),sendMessageAPI:t=>es({url:"enterprise/im/sendMessage",method:"post",data:t}),forwardMessageAPI:t=>es({url:"enterprise/im/forwardMessage",method:"post",data:t}),sendToMsg:t=>es({url:"enterprise/im/sendToMsg",method:"post",data:t})};un.forwardMessageAPI=t=>es({url:"enterprise/im/forwardMessage",method:"post",data:t}),un.sendFileAPI=t=>es({url:"common/upload/uploadFile",method:"post",data:t,headers:{"Content-Type":"multipart/form-data"}}),un.getMessageListAPI=t=>es({url:"enterprise/im/getMessageList",method:"post",data:t}),un.setMsgIsReadAPI=t=>es({url:"enterprise/im/setMsgIsRead",method:"post",data:t}),un.undoMessageAPI=t=>es({url:"enterprise/im/undoMessage",method:"post",data:t}),un.delMessageAPI=t=>es({url:"enterprise/im/delMessage",method:"post",data:t}),un.removeMessageAPI=t=>es({url:"enterprise/im/removeMessage",method:"post",data:t}),un.settingAPI=t=>es({url:"enterprise/im/setting",method:"post",data:t}),un.editGroupNameAPI=t=>es({url:"enterprise/group/editGroupName",method:"post",data:t}),un.setNoSpeakAPI=t=>es({url:"enterprise/group/setNoSpeak",method:"post",data:t}),un.groupUserListAPI=t=>es({url:"enterprise/group/groupuserlist",method:"post",data:t}),un.getAllUserAPI=t=>es({url:"enterprise/group/getAllUser",method:"post",data:t}),un.addGroupAPI=t=>es({url:"enterprise/group/add",method:"post",data:t}),un.setManagerAPI=t=>es({url:"enterprise/group/setManager",method:"post",data:t}),un.removeUserAPI=t=>es({url:"enterprise/group/removeUser",method:"post",data:t}),un.addGroupUserAPI=t=>es({url:"enterprise/group/addGroupUser",method:"post",data:t}),un.removeGrouprAPI=t=>es({url:"enterprise/group/removeGroup",method:"post",data:t}),un.setNoticeAPI=t=>es({url:"enterprise/group/setNotice",method:"post",data:t}),un.groupSettingAPI=t=>es({url:"enterprise/group/groupSetting",method:"post",data:t}),un.clearMessageAPI=t=>es({url:"enterprise/group/clearMessage",method:"post",data:t}),un.getGroupInfoAPI=t=>es({url:"enterprise/group/groupInfo",method:"post",data:t}),un.changeOwnerAPI=t=>es({url:"enterprise/group/changeOwner",method:"post",data:t}),un.isNoticeAPI=t=>es({url:"enterprise/im/isNotice",method:"post",data:t}),un.setChatTopAPI=t=>es({url:"enterprise/im/setChatTop",method:"post",data:t}),un.getUserInfo=t=>es({url:"enterprise/im/getUserInfo",method:"post",data:t}),un.getFileList=t=>es({url:"enterprise/files/index",method:"post",data:t}),un.updateUserInfo=t=>es({url:"enterprise/im/updateUserInfo",method:"post",data:t}),un.editAccount=t=>es({url:"enterprise/im/editAccount",method:"post",data:t}),un.editPassword=t=>es({url:"enterprise/im/editpassword",method:"post",data:t}),un.searchUser=t=>es({url:"enterprise/im/searchUser",method:"post",data:t}),un.userList=t=>es({url:"enterprise/im/userList",method:"post",data:t}),un.contactInfo=t=>es({url:"enterprise/im/getContactInfo",method:"post",data:t});var hn=un;const pn={getApplyList:t=>es({url:"enterprise/friend/index",method:"post",data:t}),addFriend:t=>es({url:"enterprise/friend/add",method:"post",data:t}),delFriend:t=>es({url:"enterprise/friend/del",method:"post",data:t}),acceptFriend:t=>es({url:"enterprise/friend/update",method:"post",data:t}),setNickname:t=>es({url:"enterprise/friend/setNickname",method:"post",data:t}),getApplyMsg:t=>es({url:"enterprise/friend/getApplyMsg",method:"post",data:t})};var mn=pn;const gn={getMessageList:t=>es({url:"manage/message/index",method:"post",data:t}),emojiList:t=>es({url:"enterprise/emoji/index",method:"post",data:t}),addEmoji:t=>es({url:"enterprise/emoji/add",method:"post",data:t}),getContacts:t=>es({url:"manage/message/getContacts",method:"post",data:t}),dealMsg:t=>es({url:"manage/message/dealMsg",method:"post",data:t}),isBlacklist:t=>es({url:"/enterprise/friend/isBlacklist",method:"post",data:t}),friendsCircleList:t=>es({url:"/enterprise/posts/index",method:"post",data:t}),like:t=>es({url:"/enterprise/posts/like",method:"post",data:t}),comment:t=>es({url:"/enterprise/posts/comment",method:"post",data:t}),del:t=>es({url:"/enterprise/posts/del",method:"post",data:t}),getNoticeList:t=>es({url:"/enterprise/posts/getNoticeList",method:"post",data:t}),getFriendInfo:t=>es({url:"/enterprise/friend/getFriendInfo",method:"post",data:t}),getNoticeCount:t=>es({url:"enterprise/posts/getNoticeCount",method:"post",data:t}),details:t=>es({url:"/enterprise/posts/details",method:"post",data:t}),myPosts:t=>es({url:"/enterprise/posts/myPosts",method:"post",data:t}),viewOriginalImage:t=>es({url:"/enterprise/files/viewOriginalImage",method:"post",data:t})};var fn=gn,vn={taskApi:nn,configApi:on,userApi:cn,groupApi:dn,imApi:hn,commonApi:ss,friendApi:mn,messageApi:fn};s["default"].use(R),s["default"].use(K),s["default"].use(m(),{size:"small"}),s["default"].use(G()),s["default"].use(rs),s["default"].use(ls()),s["default"].config.productionTip=!1,s["default"].prototype.$packageData=ks,s["default"].component(Ps.name,Ps),s["default"].component(Ms.name,Ms),s["default"].component(Bs.name,Bs),s["default"].component(Ks.name,Ks),s["default"].component(Qs.name,Qs),s["default"].directive("elclickoutside",en),s["default"].prototype.$api=vn,new s["default"]({el:"#app",router:Bi,store:rs,components:{App:h},template:"<App/>"})},2410:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA/5JREFUWEfFV11oHFUU/s7MJgH/ilqtghW1UBExrSiKMU7m7K4Uf6goVlEEqw8tPhQfii+1oII+Kb4UxBaKoqKNokXwB5rMnEk2hoqtaB8Ui9Qqvlh/qRSzyc4c9yyzstlOMtO6JfdhF+79zrnfnfudn0soOMbGxpb19fWtV9V7AFwFYDkRXWjmqvo7gN8AHE6SZHRgYGB8eHj47yKuKQ80MTFxTXODLar6MIBlefh0/U8i2tMkuGNkZOTbxWwWJSAizxORbX5e6mROVWtE9GmSJIdU9WubJ6I1juMMAvCJ6HZV7U/nj6vqDmbevhCJBQmIyLsANqSGB1V1V6lU2ut53q+LnWh6evqCmZmZ+4loE4AbUmyNmb0su0wCIvIDgCvS+91cLpd3Ffz082BhGG4iopcBnG0aYeaLuv2cREBE7ITLDei67hrP8w6dzuZtmzAMr7YrA3AlgJ+ZeWWnv3kERGQSwG0GYOZcgZ4KMRGxg1wH4D1mfqBt+98mJjgAT6fiudP3fWPdsyEidqVfpZH0KjM/0drLftJQ229qV9XTvvM8tmEYPk5EuwH8E8fx2mq1erhFIIqiV1TVGB1k5hvzHP2f9TAMPySi9QBesPCkqampc+fm5n4EcH7e6e0zMvPRPAIi4jNzlIULw/BWIppS1SPlcnkVBUFwbzOJfEBEs/39/ZcODQ390W1osV2v1z8BcHMzPF9n5seynKe499OE9Ibv+49m4dpiV9W7SET2AHgQwMfMfPcCBhsBvNZec133Ws/zvunGikghXBAEzzqO8wyAnUbgSwDXA3iKmV9agIAPQNI1yxOrmfmvDAKFcEEQDDmO8xmAL4zATwBWJkmyrlKp7MsiYDqZnZ3dTkQXE9E+3/ffWQhXr9e3Oo4z0vS5m5nfysIFQbDKcZzvARylKIpOqOpZcRxfUq1Wf8kTWC/WReQcAFauTywJgTTyjrcIFLmCXpy600etVlvdaDS+a11BERH2moDliVTULRHmhuEZIGDRtrUVhkUSkcWtkahUKq3/vCEiawE86brui1n5IoqiaVW9pZWIiqRiEbEc4CdJ8lweiSiKNqiqdVM29jLzfZ2ET0rFtphXjDoyl8FH4zjeVq1Wj3QJ6/JGo7ENwOZ03jrljc3i9lEXgfnFyBaLlOMoit5W1YcMb3VDVY8R0TFVTQCsIKIV7WYUwAEAW5h5f9fm2eXYQEUaklS9jwBYB+CyLi3Yu+BzAG8y82i3TiYnJwfjOG510QDmNyRt8Km0ZOPj44Ou695kX6BUKh3I6x1FRNN9sluyDhI9bUqjKLpDVa2U21i8Ke0g0cu2fGfqt1hb3kFi6R4mHSSW7mnWJrGkj9POUDpTz/N/ATu5b5mLiQb7AAAAAElFTkSuQmCC"},2431:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAYAAAA4E5OyAAAABHNCSVQICAgIfAhkiAAAB95JREFUeF7tXGtsFFUUvnd2Zys1QoCCPH1RAZUEjYCogD8kIMEAiSYi/tAaRSCB7qO8QoPFQATS3S0hBESN9YcRfqjFYLCERAUVFDQQIKKBhAg0KBRojYXu7M71O7Pdpd3udufOzLa74E0mnXbO635zzplzX+Wsm5qYP784Wlw8QXB+P+d8mGBsuBBiOMdPmEAXtXP4+zk8P4e/x+91/ay7peVnvn17S3eYCr25aegM17zex9C5aQBhGrQ8jctjUVsEfD/A2HrI3auGQkdxj1vnm+OAaIHAJKHrbzDOZ8LcEudNNiReZkJ8xRXlAzUY/N5JHY4B0hoIPAwjN0Dg804amE0W3GQ3U5SVRdXVJ7LRmnluGxDh85VqjK2GR7wChYoZpTmg0fEyPlGFWM1ras7akW8ZEOH1DtYUZQ2Ul+Fy2zHCQV7KNdtUTVvLN2++ZEWuJUAigcDjTNf3wCsGWFGacx4hLiGMZniCwV9kdUkDovl8zyFuPwMYxbLKupVeiBZ07gU1HP5aRq8UIBGfj8LjfYDhklHSY7RCxKD7TU84/JFZG0wD0ur3V4H4bbOC84pOCC9A2WTGJlOAIExWoLh614zAfKXhQqxE+KzPZl9WQAAGVZp7evCTmq0PZp/rAGVmtpzSJSBiyZIHNZfrCHJGb7Na85yuSWVsAg+F/shkZ0ZAxLJld0Wi0SMgGJnnnZQyDwPK3z3R6ATUKc3pGNMCIqqq3JHm5t14OF1KW4EQA5Q9SLIz0w0Q0wKCz+sChMnWAumfNTOFWAhQtqUydwKEQkWLRk+DcKA1TQXCJcRfajQ6MjV0OgGCemM9/ri8QLply0xU3GuKQqGq9kI6ACIWLx6gqeqfILjDlqbCYW5SFWUkr67+O2FyB0Aifj/F1FuF0x9HLH3PEwot6ARIq8/3CNA5VjDjFEewgBCMdzCPUpqYR0l6yG3qHXFYhdiEL46XbpOAIJmexS/3OgV8IcmhYq0oHB6dBEQEAqM1IX4rpE44bavK+UM8GDxleMitMJq1C1BiNGwAgsr0EJLpE3aFWuXn/foxceWKVXZn+IT4CXlkIhdLlw5CZdoAQLJOBdjRzEeMYAouNnQo4716Mfo9UxNnzsQBamhgOt1fuGBHtTleJBJ8bYbyaCAwRxfiC3Nc5qnorStjxjBOVxedNyXx+nWmnzjBBC4CiOH3XDSEzQzu5EAuCcK4cYzDE3LV9MOH4+DgcriVcSfmSpXx4xldtj1BsncUVuLAARYDQE54DY1tyENqkT9elbSFMeQB1+TJjBMQCI8ebW0hpe/day85C/ExAfItAHlGpkPkDa7Zsw1QHGk3bmA46cx4ksLJKjDwkHqOMcwpfGBGme2YUlrKXAsXmiXvRCeuXmX68eOMnTzJ9NM07dKxkXxGXyTyvL59remBx8Rqa9PKzyLwGMcY5hqI+pjV7CorM74e0g1eEKurY/QGzTYCR4En8iFDzLLcpAMoWmWlLF+TNCDuRYssJU991y4W279f1kAjP7lXrZLmI4bY1q2yXtIkHTJWPSS6bp3lhOcOBCx5iSwgNMiTTqpUX7j9fqk3JlBxRoNBKZ72xK4pU4zQkWoIUU3Ws4T4jkJmBxS9JKPM+MrMnWuaxWq4JBRYCZvYjh1S+apN107ykBp8dstN966NUAYUI7nZLLdlwsYiGMZEEbcz9M8KioUvS6YXQ182yl/ZmmUw4oJ9FDKv4cb0/olUg1JBoXxh1BcYhDk91qDPMKdxEv1MU6PYBAMOIl7mTsyWUaKlIb1Ow3SboZHNA5J5hXTCaxI1kV5fb/sFGLNmpEC2WjVrdCHRJeZV44DcRqt1mV4SxjEbsIq3Ij6F6PdPxI+DhfRGc2Drk1iwOnRzGcLna8Agb3AOFOW9SHjHRXiH0ff/F6riryu5nHnTQyoqxvBY7OjtuJQJDxmLhaqTHTzEyCVWZ8/yPii6NDD9YjexYP/6fdi/Tit4zkxf5T9QN7Av/p72++I7rcVYHdvkf987W5j41LZ/0nlLVUXFQE3Xadui6Vm0QgQDdXqzqqrD+MaN/3QJSFuhVrjbuE2+nUw7mzNuy9Sammg2ns7J3XpNiINqnz5TeFVVNLVzmTfuBgIlESF+BUHixOQtAQzGLOc9kcijfMuWxnQd6nKBGyX9WMTaQXiKQwswPYwp8gYS6STUHFgHSd+yrvhHvd4XdUXZCfaeOk/nFIq0+X86Nv/v60pgVkCI2c6smlO9sSvHseMhCUMiXu9ihE644Er7+KmqpdgMEzYDqikPSQjS/P5nkZQ+L5jjIsgZGMHPwUnwb8yAQTRSgBCDKC8fFXG56sBo7NrL12YcA+F8VldnY6S/Mpk6axwQ0DTylKn5CAid9va43fNSq1Aztkp7SEIoztQo2rVrrwOUtbjuNqOsG2hoz3ql2rv3hyi6dCv6LAOSBCZ+8qoSWbwcwBRZMcI2D87owiuqPapabcUr2uu3DUgSGJ/vAY3zd1DIzcv1jsZkB5AocP8pzr0sxxD+vG1grSTVbErbJqxp3zj9l4g7s9FbfP4v+HbjqqGJYYsy0rI55iGp0nH2pijmck1FlTsHz2bhsntCi/LDl4qu17lisX3wiFYngUjIyhkgqcaihnkK4TQVZ4AHwc9LkHP6I7T6w+tLUCv0J3rcN+Ke/llKI+gaYdxl0F0E3T7UEj/mAoBUmf8B4MQdVOI4ES0AAAAASUVORK5CYII="},2634:function(){},2889:function(t,e,i){"use strict";i.d(e,{A:function(){return w}});var s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-main"},[e("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入关键字搜索聊天"},on:{input:t.inputval},model:{value:t.params.keywords,callback:function(e){t.$set(t.params,"keywords",e)},expression:"params.keywords"}},[e("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.searchMessage},slot:"append"})],1),e("el-date-picker",{staticStyle:{"margin-left":"10px"},attrs:{type:"date",placeholder:"选择日期","picker-options":t.pickerOptions},on:{change:t.search},model:{value:t.params.search_date,callback:function(e){t.$set(t.params,"search_date",e)},expression:"params.search_date"}}),e("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"全部",name:"all"}},[e("div",{staticClass:"el-tab-body-list"},[e("el-scrollbar",[t.dataList.length?t._l(t.dataList,function(t,i){return e("ChatItem",{key:i,attrs:{data:t}})}):e("div",[e("el-empty",{attrs:{description:"暂无数据"}})],1)],2)],1)]),e("el-tab-pane",{attrs:{label:"文本",name:"text"}},[e("div",{staticClass:"el-tab-body-list"},[t.dataList.length?[e("el-scrollbar",t._l(t.dataList,function(t,i){return e("ChatItem",{key:i,attrs:{data:t}})}),1)]:e("div",[e("el-empty",{attrs:{description:"暂无数据"}})],1)],2)]),e("el-tab-pane",{attrs:{label:"图片",name:"image"}},[e("div",{staticClass:"el-tab-body-list"},[t.dataList.length?[e("el-scrollbar",[e("el-row",{staticStyle:{}},t._l(t.dataList,function(i,s){return e("ChatImage",{key:s,attrs:{data:i,previewUrl:t.previewList}})}),1)],1)]:e("div",[e("el-empty",{attrs:{description:"暂无数据"}})],1)],2)]),e("el-tab-pane",{attrs:{label:"视频",name:"video"}},[e("div",{staticClass:"el-tab-body-list"},[t.dataList.length?[e("el-scrollbar",t._l(t.dataList,function(t,i){return e("ChatItem",{key:i,attrs:{data:t}})}),1)]:e("div",[e("el-empty",{attrs:{description:"暂无数据"}})],1)],2)]),e("el-tab-pane",{attrs:{label:"文件",name:"file"}},[e("div",{staticClass:"el-tab-body-list"},[t.dataList.length?[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.dataList,height:"450"}},[e("el-table-column",{attrs:{prop:"fileName",label:"文件",width:"300"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("div",{staticClass:"chat-file"},[e("div",[e("el-image",{staticClass:"fileExt",attrs:{fit:"cover",src:t.fileExt(i.row.fileName)}})],1),e("div",{staticClass:"fileName"},[t._v(t._s(i.row.fileName))])])]}}],null,!1,1885044645)}),e("el-table-column",{attrs:{prop:"sendTime",label:"上传时间",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.formatTime(e.row.sendTime))+" ")]}}],null,!1,349674723)}),e("el-table-column",{attrs:{prop:"fileSize",label:"大小",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.fileSize(e.row.fileSize))+" ")]}}],null,!1,3523241436)}),e("el-table-column",{attrs:{prop:"fromUser.realname",label:"上传者",width:"100"}}),e("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.downloadFile(i.row)}}},[t._v("下载")])]}}],null,!1,2401469366)})],1)]:e("div",[e("el-empty",{attrs:{description:"暂无数据"}})],1)],2)])],1),e("el-pagination",{staticStyle:{"text-align":"center","padding-top":"10px"},attrs:{background:"","hide-on-single-page":t.singlePage,"page-size":t.params.limit,"current-page":t.params.page,layout:"prev, pager, next",total:t.total},on:{"update:pageSize":function(e){return t.$set(t.params,"limit",e)},"update:page-size":function(e){return t.$set(t.params,"limit",e)},"update:currentPage":function(e){return t.$set(t.params,"page",e)},"update:current-page":function(e){return t.$set(t.params,"page",e)},"current-change":t.handleCurrentChange}})],1)},n=[],a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chat-list-item"},[e("div",{staticClass:"chat-list-avatar",on:{click:function(e){return t.$user(t.data.fromUser.id)}}},[e("el-avatar",{attrs:{shape:"square",size:"medium",src:t.data.fromUser.avatar}})],1),e("div",{staticClass:"chat-list-body"},[e("div",{staticClass:"chat-list-title"},[t._v(" "+t._s(t.data.fromUser.displayName)+" "),e("span",{staticClass:"time"},[t._v(" "+t._s(t.formatTime(t.data.sendTime)))])]),"text"==t.data.type?e("div",{staticClass:"chat-list-text",domProps:{innerHTML:t._s(t.data.content)}}):t._e(),"text"==t.data.type?e("div",{staticClass:"chat-list-tools"},[e("el-tooltip",{attrs:{effect:"dark",content:"复制文本",placement:"top"}},[e("i",{staticClass:"el-icon-document-copy",on:{click:function(e){return t.copyText(t.data.content)}}})])],1):t._e(),"image"==t.data.type?e("div",{staticClass:"chat-list-image"},[e("el-image",{staticStyle:{"max-width":"300px"},attrs:{src:t.data.content,"z-index":3e3,"preview-src-list":[t.data.content],fit:"contain"}})],1):t._e(),"video"==t.data.type?e("div",{staticClass:"chat-list-video"},[e("video",{staticStyle:{"max-width":"300px"},attrs:{src:t.data.content,controls:""}})]):t._e(),"file"==t.data.type?e("div",{staticClass:"chat-list-file"},[e("el-card",{staticStyle:{width:"260px"},attrs:{"body-style":{padding:"10px 10px 0 10px"}}},[e("div",{staticClass:"chat-file-content"},[e("div",{staticClass:"chat-file-ext"},[e("el-image",{staticStyle:{width:"35px"},attrs:{src:t.fileExt(t.data.fileName),fit:"fill"}})],1),e("div",{staticClass:"chat-file-title"},[e("div",{staticClass:"chat-file-name"},[e("span",{staticClass:"fileName"},[t._v(t._s(t.data.fileName)+" ")]),e("span",{staticClass:"fileSize"},[t._v("("+t._s(t.fileSize(t.data.fileSize))+")")])]),e("div",{staticClass:"chat-file-remark"},[t._v(" 文件已成功发送, 文件助手永久保存 ")])])]),e("hr"),e("div",{staticClass:"bottom clearfix",attrs:{align:"right"}},[e("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(e){return t.downloadFile(t.data)}}},[t._v("下载")]),e("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(e){return t.onlinePreview(t.data)}}},[t._v("在线预览")])],1)])],1):t._e()])])},o=[],r=i(1981),c=i(1735),l={name:"chatItem",props:{data:{type:Object,default:{}}},computed:{formatTime(){return function(t){return t=parseInt(t/1e3),(0,r.p6)("Y/m/d H:i:s",t)}},fileSize(){return function(t){return(0,c.KU)(t)}},fileExt(){return function(t){return(0,c.Lm)(t)}}},data(){return{}},methods:{copyText(t){this.$clipboard(t),this.$message({type:"success",message:"复制成功!"})},onlinePreview(t){this.$preview(t.preview)},downloadFile(t){(0,c.RG)(t.content,t.fileName)}},created(){}},d=l,u=i(1656),h=(0,u.A)(d,a,o,!1,null,"255018e4",null),p=h.exports,m=function(){var t=this,e=t._self._c;return e("div",[e("el-col",{staticStyle:{padding:"0 12px 12px 0"},attrs:{span:6}},["image"==t.data.type?e("el-card",{attrs:{"body-style":{padding:"0px"}}},[e("el-image",{staticStyle:{width:"100%",height:"120px"},attrs:{src:t.data.content,"preview-src-list":t.previewUrl,"z-index":9999,fit:"cover"}}),e("div",{staticStyle:{padding:"10px"}},[e("div",{staticClass:"bottom clearfix"},[e("time",{staticClass:"time"},[t._v(t._s(t.data.fromUser.realname)+" 上传于 "+t._s(t.formatTime(t.data.sendTime)))])])])],1):t._e()],1)],1)},g=[],f={name:"chatImage",props:{data:{type:Object,default:{}},previewUrl:{type:Array,default:function(){return[]}}},computed:{formatTime(){return function(t){return t=parseInt(t/1e3),(0,r.p6)("Y/m/d",t)}},fileSize(){return function(t){return(0,c.KU)(t)}},fileExt(){return function(t){return(0,c.Lm)(t)}}},data(){return{currentDate:new Date}},methods:{copyText(t){this.$clipboard(t),this.$message({type:"success",message:"复制成功!"})},downloadFile(t){(0,c.RG)(t.content,t.fileName)}},created(){}},v=f,b=(0,u.A)(v,m,g,!1,null,"94e9276a",null),y=b.exports,C={name:"chatRecord",components:{ChatItem:p,ChatImage:y},props:{contact:{type:Object,default:{}},condition:{type:Object,default:{}},manage:{type:Boolean,default:!1}},computed:{formatTime(){return function(t){return t/=1e3,(0,r.p6)("Y/m/d H:i:s",t)}},fileSize(){return function(t){return(0,c.KU)(t)}},fileExt(){return function(t){return(0,c.Lm)(t)}}},data(){return{activeName:"all",total:0,singlePage:!1,dataList:[],previewList:[],pickerOptions:{disabledDate(t){return t.getTime()>Date.now()}},params:{toContactId:this.contact.id,is_group:this.contact.is_group,type:"all",keywords:"",page:1,limit:20}}},methods:{handleClick(t,e){this.params.page=1,this.params.type=t.name,this.getMessage()},inputval(t){const e=t,i=document.createElement("div");i.innerHTML=e;const s=i.textContent.trim();this.params.keywords=s},searchMessage(){this.getMessage()},search(){this.getMessage()},getMessage(){this.manage?this.$api.messageApi.getMessageList(this.params).then(t=>{this.realData(t)}):this.$api.imApi.getMessageListAPI(this.params).then(t=>{this.realData(t)})},realData(t){this.dataList=t.data,this.total=t.count,t.count<=this.params.limit?this.singlePage=!0:this.singlePage=!1,"image"==this.params.type&&(this.previewList=(0,r.mD)(t.data,"content",!1))},handleCurrentChange(t){this.params.page=t,this.getMessage()},downloadFile(t){(0,c.RG)(t.content,t.fileName,t.type)}},created(){this.params=Object.assign(this.params,this.condition),this.getMessage()},mounted(){}},x=C,E=(0,u.A)(x,s,n,!1,null,"7e2f28fe",null),w=E.exports},3513:function(t,e,i){"use strict";i.d(e,{A:function(){return l}});var s=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.title,visible:t.visible,modal:!0,width:t.width,"append-to-body":""},on:{close:t.closeDialog}},[e("el-transfer",{attrs:{filterable:"",titles:t.createChatTitles,"filter-placeholder":"请输入关键词",props:t.contactsProps,data:t.allUser},model:{value:t.selectUid,callback:function(e){t.selectUid=e},expression:"selectUid"}}),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDialog}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.comfirmChat}},[t._v("确 定")])],1)],1)},n=[],a={name:"manageGroup",props:{title:{type:String,default:"选择聊天"},visible:{type:Boolean,default:!1},width:{type:String,default:"612px"},allUser:{type:Array,default:()=>[]}},data(){return{createChatTitles:["用户列表","已选用户"],selectUid:[],contactsProps:{key:"id",label:"realname"}}},mounted(){},methods:{closeDialog(){this.$emit("update:visible",!1),this.selectUid=[]},comfirmChat(){0!==this.selectUid.length?this.$emit("selectChat",this.selectUid):this.$message.error("请选择聊天对象")}}},o=a,r=i(1656),c=(0,r.A)(o,s,n,!1,null,null,null),l=c.exports},3597:function(t){"use strict";t.exports="data:image/png;base64,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"},3598:function(t,e,i){"use strict";t.exports=i.p+"assets/media/notify.7668dd76.ogg"},4186:function(t,e,i){"use strict";t.exports=i.p+"assets/media/calling.69742e4c.mp3"},5772:function(t,e,i){"use strict";i.d(e,{A:function(){return h}});var s=function(){var t=this,e=t._self._c;return e("el-container",{staticStyle:{height:"100%"}},[e("el-header",{staticClass:"file-header"},[e("div",{staticClass:"file-header-title"},[t._v("文件列表")]),e("div",{staticClass:"file-header-search"},[e("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入关键字搜索","prefix-icon":"el-icon-search"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getFileList.apply(null,arguments)}},model:{value:t.params.keywords,callback:function(e){t.$set(t.params,"keywords",e)},expression:"params.keywords"}},[e("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.getFileList},slot:"append"})],1)],1)]),e("el-container",[e("el-aside",{staticClass:"lz-flex group-box",attrs:{width:"150px"}},[e("div",{staticClass:"group-box-list"},t._l(t.fileType,function(i){return e("div",{key:i.id,staticClass:"chat-item",class:t.params.cate==i.id?"active":"",on:{click:function(e){return t.openFolder(i)}}},[t._v(" "+t._s(i.name)+" ")])}),0)]),e("el-main",{staticClass:"lz-flex group-box group-user-box no-padding"},[t.fileList.length?e("div",{staticClass:"group-box-list"},[e("el-scrollbar",[e("div",{staticClass:"file-list"},t._l(t.fileList,function(i,s){return e("el-tooltip",{key:s,staticClass:"item",attrs:{effect:"dark",placement:"right"}},[e("template",{slot:"content"},[e("p",{staticClass:"mb-5"},[t._v("名称:"+t._s(i.name))]),e("p",[t._v("大小:"+t._s(t.getFileSize(i.size)))])]),e("div",{staticClass:"file-item",on:{dblclick:function(e){return t.openFile(i.preview)}}},[e("div",{staticClass:"file-img"},[e("el-image",{staticClass:"img",attrs:{fit:"contain",src:i.extUrl}})],1),e("div",{staticClass:"file-name mt-5",attrs:{align:"center"}},[t._v(t._s(i.name))]),e("div",{staticClass:"file-opt"},[e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.openFile(i.preview)}}},[t._v("查看")]),e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.downloadFile(i)}}},[t._v("下载")]),e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.openDialog(i)}}},[t._v("发送")])],1)])],2)}),1)])],1):e("div",{staticClass:"pd-40"},[e("el-empty")],1),t.singlePage?t._e():e("div",{staticClass:"group-box-page",attrs:{align:"center"}},[e("el-pagination",{attrs:{background:"","hide-on-single-page":t.singlePage,"current-page":t.params.page,"page-sizes":[20,50,100,200,300,400,500],"page-size":t.params.limit,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleChange,"current-change":t.getFileList,"update:currentPage":function(e){return t.$set(t.params,"page",e)},"update:current-page":function(e){return t.$set(t.params,"page",e)},"update:pageSize":function(e){return t.$set(t.params,"limit",e)},"update:page-size":function(e){return t.$set(t.params,"limit",e)}}})],1),e("ChooseDialog",{attrs:{visible:t.visible,title:"发送到聊天",allUser:t.$store.state.allContacts},on:{"update:visible":function(e){t.visible=e},selectChat:t.sendChat}})],1)],1)],1)},n=[],a=(i(4114),i(8111),i(7588),i(3513)),o=i(1735),r=i(1981),c={components:{ChooseDialog:a.A},props:{isAll:{type:Number,default:0}},computed:{getFileSize(){return function(t){return o.KU(t)}}},data(){return{params:{page:1,limit:20,keywords:"",cate:0,is_all:this.isAll,role:0},visible:!1,singlePage:!0,total:0,curFile:{},fileType:[{id:0,name:"所有文件",icon:""},{id:1,name:"文档",icon:""},{id:2,name:"图片",icon:""},{id:3,name:"音频",icon:""},{id:4,name:"视频",icon:""},{id:5,name:"其他文件",icon:""}],fileList:[]}},mounted(){this.getFileList()},methods:{changeRole(t){this.params.role=t,this.getFileList()},openFolder(t){this.params.cate=t.id,this.getFileList()},getFileList(){this.$api.imApi.getFileList(this.params).then(t=>{0==t.code&&(this.fileList=t.data,this.total=t.count,this.singlePage=t.count<=this.params.limit,this.params.page=t.page)})},handleChange(t){this.params.limit=t,this.getFileList()},openFile(t){t?this.$preview(t):this.$message.error("文件不存在")},downloadFile(t){t.download&&(window.location=t.download)},openDialog(t){this.visible=!0,this.curFile=t},sendChat(t){if(t.length>5)return this.$message.error("转发的人数不能超过5人!");let e=this.$store.state.userInfo;this.forwardBox=!1;let i={type:this.curFile.msg_type,content:this.curFile.src,file_name:this.curFile.name,file_size:this.curFile.size,file_id:this.curFile.file_id,fromUser:{id:e.user_id,displayName:e.realname,avatar:e.avatar,account:e.account}};var s=[];t.forEach(t=>{let e=t.toString(),n=JSON.parse(JSON.stringify(i));n.id=r.cZ(),n.status="successd",n.sendTime=(new Date).getTime(),n.toContactId=e,n.is_group=0,-1!=e.indexOf("group")&&(n.is_group=1),s.push(this.test(n))}),Promise.all(s).then(t=>{}).catch(t=>{console.log("error",t)}),this.$message.success("发送成功!"),this.visible=!1},fn(t){return new Promise((e,i)=>{this.$api.imApi.sendMessageAPI(t).then(t=>{0===t.code?e(t):this.$message.error(t.msg)}).catch(t=>{})})},async test(t){let e=await this.fn(t);return e}}},l=c,d=i(1656),u=(0,d.A)(l,s,n,!1,null,"029f4e7e",null),h=u.exports},6375:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAqtJREFUWEftlj1oFEEUx/9vjlTWFtoKEbQQSSVK9ObtqoWxSCFq4UcTjUYkih+d2oliRIwa0/hRqFhYGAt1Z+YkaCMEtFCIYKuFrV24ed6EXTjj3u3eeZAm2yw78977/96bfY8hLPNDy6yPrgGstRcBHEwTeMLMV7tJpisAa+09AMcbAN9S0X4AU8w82ilERwDOuQHv/QgRjQCYZOZTQdBaexvAmIhMK6WmtdZzZUFKARhjNgA4nQqH2F9EZDiKosUKGGP6iegFgI3hO4AAuBVF0dcikEKAIE5Ez9Pgc0QUMgwC/zzOuRERCdUZSCH3FUG0BWgW995fieP4clFGYT9JkstKqUtlINoCWGtfAhjqRDwDbIKYYea9rcBbAtRqtT3e+5lGOdsGaFeRLAGl1FC1Wn2VZ9sSoIxz0XGUSSIXYHZ2ds3CwsKPcJzMvLNIqKAKbwHEfX19awcHB38utc0FcM5tFZH3zb3eLUQ2I4hom9b6QykAa+0RAA+I6FirlisLlLbmfQBHmflhKYDsD/beV+M4fldWLM8uSZIdSqlaq07KPYIVgJUKrFTAGPOIiA71sg1F5HEURYcL54C1Nly1wpXLMnP0PzMg87XWWgAawCgzTzXH/GsOOOc2iUgwXgVgOzN/7AWAMWYLEdUA/CYi1lp/zuIuBTghIncAjHvvP/VCPItRqVQ2i8gEEZ3UWt/NBUiSZJdS6nUvhZfG8t7vjuP4TS5AWLTWHvDer1/q2LhiCRFdEJG69/5G837Ya8x6UkqdJaJKvV6/lpeEUmqemZ+2/AeKMnfOnROREPw7EZ3XWoebMJxzw+n6unT9elGslhUocnTOTYjIeGr3K32vDm8iuqm1PlMUo+sKZI7GmP1ENAYgO6p5EZmMouhZJ+KL0J069Np+2QH+AFQ3izDKCZrFAAAAAElFTkSuQmCC"},7076:function(t){"use strict";t.exports="data:image/png;base64,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"},7259:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABWUlEQVQ4T6WT0U3DQAyGf/sGoBuQDcjp7p2wQTsBbNCOABMAE5BuwAjpe09XJqAjlAFyRq5yIUkRKuCXSIn92f79h/DPoGl9jLFIKS0BzAEU+l1EdgBqY8zaWnvQnLZtS+/96wgQQrgD8PLDUHsADwAeAbw556oeMCwWkQ8iqpn5NaVUikhJRLcT8KYHdGO/dwkbZp7rqMOCEMKq65xffwFCCE8AltrZGFNMi7sGEcBsAB0BdLdLAM/OOe00ihhjlVK6n7yunXP1UYMQguiTmW+stc1vLjsCiMhCT/MXgN75SkTW3ns95dmRJ+gVZmZrrVXgSWy327kxphmKfATEGGcpJS1SIQ/MvJhqkc+orvTe20zvjRRjLNu2bYjoItuXiBoRKYiozLZWBzJzlacYWVkhKSX1xPV3K6hGxpjVyQrTZN2161qJyJ6Idmpra636ZRQnf+PZ8neJn9q+rxFGGvPWAAAAAElFTkSuQmCC"},8028:function(t){"use strict";t.exports="data:image/png;base64,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"},8137:function(t,e,i){"use strict";t.exports=i.p+"assets/media/notify.e6953ff1.wav"},9087:function(t,e,i){"use strict";t.exports=i.p+"assets/img/h73565320p0.9fbf82b7.jpg"},9745:function(t,e,i){"use strict";i.d(e,{A:function(){return l}});var s=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.title,visible:t.visible,modal:!0,width:t.width,"append-to-body":""},on:{open:t.openDialog,close:t.closeDialog}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isAdd,expression:"isAdd"}],staticClass:"mb-20"},[t._v(" 群聊名称:"),e("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"请输入群聊名称"},model:{value:t.groupName,callback:function(e){t.groupName=e},expression:"groupName"}}),t._v(" "),e("span",{staticClass:"ml-10 c-999"},[t._v(" (必填项)")])],1),e("el-transfer",{attrs:{filterable:"",titles:t.createChatTitles,"filter-placeholder":"请输入关键词",props:t.defaultProps,data:t.allUser},model:{value:t.selectUid,callback:function(e){t.selectUid=e},expression:"selectUid"}}),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDialog}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.manageGroup}},[t._v("确 定")])],1)],1)},n=[],a={name:"manageGroup",props:{title:{type:String,default:"创建群聊"},visible:{type:Boolean,default:!1},userIds:{type:Array,default:()=>[]},isAdd:{type:Number,default:0},width:{type:String,default:"612px"},groupId:{type:String,default:""}},data(){return{createChatTitles:["用户列表","已选用户"],selectUid:[],allUser:[],groupName:"",defaultProps:{key:"user_id",label:"realname",pinyin:"name_py"}}},created(){this.groupName=""},mounted(){},methods:{openDialog(){let t={};this.userIds.length>0&&(t.user_ids=this.userIds),this.groupId&&2==this.isAdd&&(t.group_id=this.groupId),this.getAllUser(t)},closeDialog(){this.$emit("update:visible",!1),this.selectUid=[],this.groupName=""},manageGroup(){switch(this.isAdd){case 0:if(this.selectUid.length<1)return void this.$message.error("请选择要添加的成员");break;case 1:if(this.selectUid.length<1)return void this.$message.error("群聊人数不能少于2人");if(""==this.groupName||this.groupName.length<2||this.groupName.length>20)return void this.$message.error("请输入正确的群聊名称");break;case 2:if(1!=this.selectUid.length)return void this.$message.error("只能选择一位成员!");break}this.$emit("manageGroup",this.selectUid,this.isAdd,this.groupName),this.groupName=""},getAllUser(t){this.$api.imApi.getAllUserAPI(t).then(t=>{const e=t.data;this.allUser=e})}}},o=a,r=i(1656),c=(0,r.A)(o,s,n,!1,null,null,null),l=c.exports},9865:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA7VJREFUWEftVk1oHVUU/s6dkFUDRe2iZiGKQVBLLcRNzDBz7uQlUaSgCxGjgpRWKIo/EcHiRgniog0F8Ycq0i5cSa2gQlry7p15pmiLxdoiRBAraHEj4g8VzMu7xzfDvMdL8pI3HVrqwrOdc77z3e/ec+YjXOOga9wf/00CCwsLA/V6/UEAOwAEAG4CcALAF0qpWhAEX3cqlyTJDufcCIBhACEAD8BJAGecc+eiKEpru8YaBay1KcAbRPSLiHwnIuc9z/tZRO50zt1FRPcDeJWZ96eI1toZANMickIptQjgrIg4ANsA3ApgJ4BZZn65G4MVBKy10wD2i8gurfX73QqSJNnWaDRmiGhrM3cTgH8AvMLMH3fLj+PYF5G3APzknNsdRdHFzrw2gWq1OqKUSmXbwsy/9nqc1tpdRHSdiLzLzL9vlG+tvQHAe0SkwjBMFWlHRmBubm5rf3//IhE9w8yHezUv890YcxsRLQB4gpk/bWFkBIwxR4noN2beXQa8aI0x5kWl1GinChkBa+2Fvr6+h33fP1UUrGxeHMeX6vX6jZVK5Y8Ug/KR+1MpdUsQBBfKAhetyw8b+b7/Q0bAGLOdiM4uLS1tmpiYuFQUqGyetfa0c+6pKIpOZwRqtdrtjUbj2+Xl5c0tWcqCF6mL4/iiiNzDzD9mBPI38JdSaiQIgvNFQMrmGGMiIjrIzOmSyiIjEMfxSefcEa31obLgReqMMW8SUb25N55dPYZ7iGhPcz7TXX5VolarbUmvWkTu1VqfWUEgv4avROTQ1VIhjuO9zrntWusnO0/YXsVJkjzunDsgIpOdDK+EHNbaURE5CmBca/1NVwK5Cm8DuGNgYGByeHj47yvRPMc9p5Q6EATBkdWYK/6G8/Pz13ueVyWiU2EYrpCqLBlrbbr3v+98eOsqkE/E3SKSLonnmPlg2cb5yaeJaOfg4OD40NBQ+tteE10tWZIk486540T0UBiGH5YhkRubT5rOqMLMX66Hsa4nbJmTMiSstZMAjhHRI2EYHtvoABua0mq1+oBS6qPLIZFP06yITGmtj/dSr6crbm7Jioh8RkRTva7DWvsCET3dfHSPhmH4ea/m7VXcKzG3a4eJ6J0wDGdX56eWi4heAzDqed5jvu+3N10v7J4KtACSJLnZOZc22SwiM1rr1D+mbuq+vPlio9HYNzY2lv3ni0ZhAi1AY8zzaUPn3OtKKWm64pdEZJ/Weo0yRUhcNoF8vkcBTOUNPmDm1GyWilIESnVap+h/Av8CSH2FMMkiLh8AAAAASUVORK5CYII="}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var a=e[s]={id:s,loaded:!1,exports:{}};return t[s].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.m=t,function(){i.amdO={}}(),function(){var t=[];i.O=function(e,s,n,a){if(!s){var o=1/0;for(d=0;d<t.length;d++){s=t[d][0],n=t[d][1],a=t[d][2];for(var r=!0,c=0;c<s.length;c++)(!1&a||o>=a)&&Object.keys(i.O).every(function(t){return i.O[t](s[c])})?s.splice(c--,1):(r=!1,a<o&&(o=a));if(r){t.splice(d--,1);var l=n();void 0!==l&&(e=l)}}return e}a=a||0;for(var d=t.length;d>0&&t[d-1][2]>a;d--)t[d]=t[d-1];t[d]=[s,n,a]}}(),function(){i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,{a:e}),e}}(),function(){i.d=function(t,e){for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})}}(),function(){i.f={},i.e=function(t){return Promise.all(Object.keys(i.f).reduce(function(e,s){return i.f[s](t,e),e},[]))}}(),function(){i.u=function(t){return"assets/js/"+t+"."+{36:"d2f13b6c",132:"fe45460b",154:"c72b7513",440:"192a8f63",515:"dc2cab31",649:"c3435f97",924:"2cc2c949",953:"6f1f4332"}[t]+".js"}}(),function(){i.miniCssF=function(t){return"assets/css/"+t+"."+{36:"8b303b78",132:"abaee743",154:"7f9367b6",440:"08ec972a",649:"301c8058",924:"cedc7fbc",953:"e3216808"}[t]+".css"}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){var t={},e="Raingad-IM:";i.l=function(s,n,a,o){if(t[s])t[s].push(n);else{var r,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==s||u.getAttribute("data-webpack")==e+a){r=u;break}}r||(c=!0,r=document.createElement("script"),r.charset="utf-8",r.timeout=120,i.nc&&r.setAttribute("nonce",i.nc),r.setAttribute("data-webpack",e+a),r.src=s),t[s]=[n];var h=function(e,i){r.onerror=r.onload=null,clearTimeout(p);var n=t[s];if(delete t[s],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach(function(t){return t(i)}),e)return e(i)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=h.bind(null,r.onerror),r.onload=h.bind(null,r.onload),c&&document.head.appendChild(r)}}}(),function(){i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){i.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}}(),function(){i.p="app://./"}(),function(){if("undefined"!==typeof document){var t=function(t,e,s,n,a){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",i.nc&&(o.nonce=i.nc);var r=function(i){if(o.onerror=o.onload=null,"load"===i.type)n();else{var s=i&&i.type,r=i&&i.target&&i.target.href||e,c=new Error("Loading CSS chunk "+t+" failed.\n("+s+": "+r+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=r,o.parentNode&&o.parentNode.removeChild(o),a(c)}};return o.onerror=o.onload=r,o.href=e,s?s.parentNode.insertBefore(o,s.nextSibling):document.head.appendChild(o),o},e=function(t,e){for(var i=document.getElementsByTagName("link"),s=0;s<i.length;s++){var n=i[s],a=n.getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===t||a===e))return n}var o=document.getElementsByTagName("style");for(s=0;s<o.length;s++){n=o[s],a=n.getAttribute("data-href");if(a===t||a===e)return n}},s=function(s){return new Promise(function(n,a){var o=i.miniCssF(s),r=i.p+o;if(e(o,r))return n();t(s,r,null,n,a)})},n={524:0};i.f.miniCss=function(t,e){var i={36:1,132:1,154:1,440:1,649:1,924:1,953:1};n[t]?e.push(n[t]):0!==n[t]&&i[t]&&e.push(n[t]=s(t).then(function(){n[t]=0},function(e){throw delete n[t],e}))}}}(),function(){var t={524:0};i.f.j=function(e,s){var n=i.o(t,e)?t[e]:void 0;if(0!==n)if(n)s.push(n[2]);else{var a=new Promise(function(i,s){n=t[e]=[i,s]});s.push(n[2]=a);var o=i.p+i.u(e),r=new Error,c=function(s){if(i.o(t,e)&&(n=t[e],0!==n&&(t[e]=void 0),n)){var a=s&&("load"===s.type?"missing":s.type),o=s&&s.target&&s.target.src;r.message="Loading chunk "+e+" failed.\n("+a+": "+o+")",r.name="ChunkLoadError",r.type=a,r.request=o,n[1](r)}};i.l(o,c,"chunk-"+e,e)}},i.O.j=function(e){return 0===t[e]};var e=function(e,s){var n,a,o=s[0],r=s[1],c=s[2],l=0;if(o.some(function(e){return 0!==t[e]})){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(c)var d=c(i)}for(e&&e(s);l<o.length;l++)a=o[l],i.o(t,a)&&t[a]&&t[a][0](),t[a]=0;return i.O(d)},s=self["webpackChunkRaingad_IM"]=self["webpackChunkRaingad_IM"]||[];s.forEach(e.bind(null,0)),s.push=e.bind(null,s.push.bind(s))}();var s=i.O(void 0,[504],function(){return i(2343)});s=i.O(s)})();