PyWxDump/pywxdump/ui/web/assets/ChatView-I97tceRE.js
2024-01-04 12:07:05 +08:00

6 lines
38 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as L,r as C,o as Q,a as x,b as w,c as S,e as y,f as b,w as Ye,g as A,h as H,t as k,i as ae,F as ce,j as I,_ as z,k as et,l as tt,H as nt}from"./index-ct5HAHRh.js";function Pe(e,t){return function(){return e.apply(t,arguments)}}const{toString:rt}=Object.prototype,{getPrototypeOf:pe}=Object,Z=(e=>t=>{const n=rt.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),P=e=>(e=e.toLowerCase(),t=>Z(t)===e),Y=e=>t=>typeof t===e,{isArray:$}=Array,q=Y("undefined");function st(e){return e!==null&&!q(e)&&e.constructor!==null&&!q(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ve=P("ArrayBuffer");function ot(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ve(e.buffer),t}const it=Y("string"),T=Y("function"),De=Y("number"),ee=e=>e!==null&&typeof e=="object",at=e=>e===!0||e===!1,W=e=>{if(Z(e)!=="object")return!1;const t=pe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ct=P("Date"),lt=P("File"),ut=P("Blob"),dt=P("FileList"),ft=e=>ee(e)&&T(e.pipe),ht=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=Z(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},pt=P("URLSearchParams"),mt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function V(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),$(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let c;for(r=0;r<i;r++)c=o[r],t.call(null,e[c],c,e)}}function Ue(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Fe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Le=e=>!q(e)&&e!==Fe;function le(){const{caseless:e}=Le(this)&&this||{},t={},n=(r,s)=>{const o=e&&Ue(t,s)||s;W(t[o])&&W(r)?t[o]=le(t[o],r):W(r)?t[o]=le({},r):$(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&V(arguments[r],n);return t}const _t=(e,t,n,{allOwnKeys:r}={})=>(V(t,(s,o)=>{n&&T(s)?e[o]=Pe(s,n):e[o]=s},{allOwnKeys:r}),e),yt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),wt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},bt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&pe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Et=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},St=e=>{if(!e)return null;if($(e))return e;let t=e.length;if(!De(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},gt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pe(Uint8Array)),Rt=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},xt=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ot=P("HTMLFormElement"),At=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ee=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tt=P("RegExp"),Be=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};V(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},Ct=e=>{Be(e,(t,n)=>{if(T(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(T(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Nt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return $(e)?r(e):r(String(e).split(t)),n},kt=()=>{},Pt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),re="abcdefghijklmnopqrstuvwxyz",Se="0123456789",je={DIGIT:Se,ALPHA:re,ALPHA_DIGIT:re+re.toUpperCase()+Se},vt=(e=16,t=je.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Dt(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Ut=e=>{const t=new Array(10),n=(r,s)=>{if(ee(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=$(r)?[]:{};return V(r,(i,c)=>{const p=n(i,s+1);!q(p)&&(o[c]=p)}),t[s]=void 0,o}}return r};return n(e,0)},Ft=P("AsyncFunction"),Lt=e=>e&&(ee(e)||T(e))&&T(e.then)&&T(e.catch),a={isArray:$,isArrayBuffer:ve,isBuffer:st,isFormData:ht,isArrayBufferView:ot,isString:it,isNumber:De,isBoolean:at,isObject:ee,isPlainObject:W,isUndefined:q,isDate:ct,isFile:lt,isBlob:ut,isRegExp:Tt,isFunction:T,isStream:ft,isURLSearchParams:pt,isTypedArray:gt,isFileList:dt,forEach:V,merge:le,extend:_t,trim:mt,stripBOM:yt,inherits:wt,toFlatObject:bt,kindOf:Z,kindOfTest:P,endsWith:Et,toArray:St,forEachEntry:Rt,matchAll:xt,isHTMLForm:Ot,hasOwnProperty:Ee,hasOwnProp:Ee,reduceDescriptors:Be,freezeMethods:Ct,toObjectSet:Nt,toCamelCase:At,noop:kt,toFiniteNumber:Pt,findKey:Ue,global:Fe,isContextDefined:Le,ALPHABET:je,generateString:vt,isSpecCompliantForm:Dt,toJSONObject:Ut,isAsyncFn:Ft,isThenable:Lt};function _(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const $e=_.prototype,Me={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Me[e]={value:e}});Object.defineProperties(_,Me);Object.defineProperty($e,"isAxiosError",{value:!0});_.from=(e,t,n,r,s,o)=>{const i=Object.create($e);return a.toFlatObject(e,i,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),_.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Bt=null;function ue(e){return a.isPlainObject(e)||a.isArray(e)}function He(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ge(e,t,n){return e?e.concat(t).map(function(s,o){return s=He(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function jt(e){return a.isArray(e)&&!e.some(ue)}const $t=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function te(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,R){return!a.isUndefined(R[u])});const r=n.metaTokens,s=n.visitor||f,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function h(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!p&&a.isBlob(d))throw new _("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?p&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,u,R){let O=d;if(d&&!R&&typeof d=="object"){if(a.endsWith(u,"{}"))u=r?u:u.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&jt(d)||(a.isFileList(d)||a.endsWith(u,"[]"))&&(O=a.toArray(d)))return u=He(u),O.forEach(function(U,Ze){!(a.isUndefined(U)||U===null)&&t.append(i===!0?ge([u],Ze,o):i===null?u:u+"[]",h(U))}),!1}return ue(d)?!0:(t.append(ge(R,u,o),h(d)),!1)}const l=[],m=Object.assign($t,{defaultVisitor:f,convertValue:h,isVisitable:ue});function E(d,u){if(!a.isUndefined(d)){if(l.indexOf(d)!==-1)throw Error("Circular reference detected in "+u.join("."));l.push(d),a.forEach(d,function(O,D){(!(a.isUndefined(O)||O===null)&&s.call(t,O,a.isString(D)?D.trim():D,u,m))===!0&&E(O,u?u.concat(D):[D])}),l.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function me(e,t){this._pairs=[],e&&te(e,this,t)}const Ie=me.prototype;Ie.append=function(t,n){this._pairs.push([t,n])};Ie.toString=function(t){const n=t?function(r){return t.call(this,r,Re)}:Re;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Mt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function qe(e,t,n){if(!t)return e;const r=n&&n.encode||Mt,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new me(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class xe{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ht=typeof URLSearchParams<"u"?URLSearchParams:me,It=typeof FormData<"u"?FormData:null,qt=typeof Blob<"u"?Blob:null,zt={isBrowser:!0,classes:{URLSearchParams:Ht,FormData:It,Blob:qt},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Vt=(e=>Ve&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Jt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:Vt,hasStandardBrowserWebWorkerEnv:Jt},Symbol.toStringTag,{value:"Module"})),N={...Wt,...zt};function Kt(e,t){return te(e,new N.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return N.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Gt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Xt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Je(e){function t(n,r,s,o){let i=n[o++];const c=Number.isFinite(+i),p=o>=n.length;return i=!i&&a.isArray(s)?s.length:i,p?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Xt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Gt(r),s,n,0)}),n}return null}function Qt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:ze,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s&&s?JSON.stringify(Je(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kt(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return te(c?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Qt(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?_.from(c,_.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const ye=_e,Zt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yt=e=>{const t={};let n,r,s;return e&&e.split(`
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Zt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Oe=Symbol("internals");function M(e){return e&&String(e).trim().toLowerCase()}function K(e){return e===!1||e==null?e:a.isArray(e)?e.map(K):String(e)}function en(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const tn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function se(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function nn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function rn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class ne{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,p,h){const f=M(p);if(!f)throw new Error("header name must be a non-empty string");const l=a.findKey(s,f);(!l||s[l]===void 0||h===!0||h===void 0&&s[l]!==!1)&&(s[l||p]=K(c))}const i=(c,p)=>a.forEach(c,(h,f)=>o(h,f,p));return a.isPlainObject(t)||t instanceof this.constructor?i(t,n):a.isString(t)&&(t=t.trim())&&!tn(t)?i(Yt(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=M(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return en(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=M(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||se(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=M(i),i){const c=a.findKey(r,i);c&&(!n||se(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||se(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=K(s),delete n[o];return}const c=t?nn(o):String(o).trim();c!==o&&delete n[o],n[c]=K(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Oe]=this[Oe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=M(i);r[c]||(rn(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(ne.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(ne);const v=ne;function oe(e,t){const n=this||ye,r=t||n,s=v.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function We(e){return!!(e&&e.__CANCEL__)}function J(e,t,n){_.call(this,e??"canceled",_.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(J,_,{__CANCEL__:!0});function sn(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new _("Request failed with status code "+n.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const on=N.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function an(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ke(e,t){return e&&!an(t)?cn(e,t):t}const ln=N.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function un(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(p){const h=Date.now(),f=r[o];i||(i=h),n[s]=p,r[s]=h;let l=o,m=0;for(;l!==s;)m+=n[l++],l=l%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),h-i<t)return;const E=f&&h-f;return E?Math.round(m*1e3/E):void 0}}function Ae(e,t){let n=0;const r=dn(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,c=o-n,p=r(c),h=o<=i;n=o;const f={loaded:o,total:i,progress:i?o/i:void 0,bytes:c,rate:p||void 0,estimated:p&&i&&h?(i-o)/p:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}const fn=typeof XMLHttpRequest<"u",hn=fn&&function(e){return new Promise(function(n,r){let s=e.data;const o=v.from(e.headers).normalize();let{responseType:i,withXSRFToken:c}=e,p;function h(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}let f;if(a.isFormData(s)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[u,...R]=f?f.split(";").map(O=>O.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...R].join("; "))}}let l=new XMLHttpRequest;if(e.auth){const u=e.auth.username||"",R=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(u+":"+R))}const m=Ke(e.baseURL,e.url);l.open(e.method.toUpperCase(),qe(m,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function E(){if(!l)return;const u=v.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),O={data:!i||i==="text"||i==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:u,config:e,request:l};sn(function(U){n(U),h()},function(U){r(U),h()},O),l=null}if("onloadend"in l?l.onloadend=E:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(E)},l.onabort=function(){l&&(r(new _("Request aborted",_.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new _("Network Error",_.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const O=e.transitional||ze;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),r(new _(R,O.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,l)),l=null},N.hasStandardBrowserEnv&&(c&&a.isFunction(c)&&(c=c(e)),c||c!==!1&&ln(m))){const u=e.xsrfHeaderName&&e.xsrfCookieName&&on.read(e.xsrfCookieName);u&&o.set(e.xsrfHeaderName,u)}s===void 0&&o.setContentType(null),"setRequestHeader"in l&&a.forEach(o.toJSON(),function(R,O){l.setRequestHeader(O,R)}),a.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),i&&i!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",Ae(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",Ae(e.onUploadProgress)),(e.cancelToken||e.signal)&&(p=u=>{l&&(r(!u||u.type?new J(null,e,l):u),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p)));const d=un(m);if(d&&N.protocols.indexOf(d)===-1){r(new _("Unsupported protocol "+d+":",_.ERR_BAD_REQUEST,e));return}l.send(s||null)})},de={http:Bt,xhr:hn};a.forEach(de,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Te=e=>`- ${e}`,pn=e=>a.isFunction(e)||e===null||e===!1,Ge={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!pn(n)&&(r=de[(i=String(n)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${i}'`);if(r)break;s[i||"#"+o]=r}if(!r){const o=Object.entries(s).map(([c,p])=>`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
`+o.map(Te).join(`
`):" "+Te(o[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:de};function ie(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new J(null,e)}function Ce(e){return ie(e),e.headers=v.from(e.headers),e.data=oe.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ge.getAdapter(e.adapter||ye.adapter)(e).then(function(r){return ie(e),r.data=oe.call(e,e.transformResponse,r),r.headers=v.from(r.headers),r},function(r){return We(r)||(ie(e),r&&r.response&&(r.response.data=oe.call(e,e.transformResponse,r.response),r.response.headers=v.from(r.response.headers))),Promise.reject(r)})}const Ne=e=>e instanceof v?e.toJSON():e;function j(e,t){t=t||{};const n={};function r(h,f,l){return a.isPlainObject(h)&&a.isPlainObject(f)?a.merge.call({caseless:l},h,f):a.isPlainObject(f)?a.merge({},f):a.isArray(f)?f.slice():f}function s(h,f,l){if(a.isUndefined(f)){if(!a.isUndefined(h))return r(void 0,h,l)}else return r(h,f,l)}function o(h,f){if(!a.isUndefined(f))return r(void 0,f)}function i(h,f){if(a.isUndefined(f)){if(!a.isUndefined(h))return r(void 0,h)}else return r(void 0,f)}function c(h,f,l){if(l in t)return r(h,f);if(l in e)return r(void 0,h)}const p={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(h,f)=>s(Ne(h),Ne(f),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(f){const l=p[f]||s,m=l(e[f],t[f],f);a.isUndefined(m)&&l!==c||(n[f]=m)}),n}const Xe="1.6.3",we={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{we[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ke={};we.transitional=function(t,n,r){function s(o,i){return"[Axios v"+Xe+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new _(s(i," has been removed"+(n?" in "+n:"")),_.ERR_DEPRECATED);return n&&!ke[i]&&(ke[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function mn(e,t,n){if(typeof e!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],p=c===void 0||i(c,o,e);if(p!==!0)throw new _("option "+o+" must be "+p,_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _("Unknown option "+o,_.ERR_BAD_OPTION)}}const fe={assertOptions:mn,validators:we},F=fe.validators;class X{constructor(t){this.defaults=t,this.interceptors={request:new xe,response:new xe}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=j(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:fe.assertOptions(s,{encode:F.function,serialize:F.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete o[d]}),n.headers=v.concat(i,o);const c=[];let p=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(n)===!1||(p=p&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const h=[];this.interceptors.response.forEach(function(u){h.push(u.fulfilled,u.rejected)});let f,l=0,m;if(!p){const d=[Ce.bind(this),void 0];for(d.unshift.apply(d,c),d.push.apply(d,h),m=d.length,f=Promise.resolve(n);l<m;)f=f.then(d[l++],d[l++]);return f}m=c.length;let E=n;for(l=0;l<m;){const d=c[l++],u=c[l++];try{E=d(E)}catch(R){u.call(this,R);break}}try{f=Ce.call(this,E)}catch(d){return Promise.reject(d)}for(l=0,m=h.length;l<m;)f=f.then(h[l++],h[l++]);return f}getUri(t){t=j(this.defaults,t);const n=Ke(t.baseURL,t.url);return qe(n,t.params,t.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){X.prototype[t]=function(n,r){return this.request(j(r||{},{method:t,url:n,data:(r||{}).data}))}});a.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,c){return this.request(j(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}X.prototype[t]=n(),X.prototype[t+"Form"]=n(!0)});const G=X;class be{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new J(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new be(function(s){t=s}),cancel:t}}}const _n=be;function yn(e){return function(n){return e.apply(null,n)}}function wn(e){return a.isObject(e)&&e.isAxiosError===!0}const he={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(he).forEach(([e,t])=>{he[t]=e});const bn=he;function Qe(e){const t=new G(e),n=Pe(G.prototype.request,t);return a.extend(n,G.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Qe(j(e,s))},n}const g=Qe(ye);g.Axios=G;g.CanceledError=J;g.CancelToken=_n;g.isCancel=We;g.VERSION=Xe;g.toFormData=te;g.AxiosError=_;g.Cancel=g.CanceledError;g.all=function(t){return Promise.all(t)};g.spread=yn;g.isAxiosError=wn;g.mergeConfig=j;g.AxiosHeaders=v;g.formToJSON=e=>Je(a.isHTMLForm(e)?new FormData(e):e);g.getAdapter=Ge.getAdapter;g.HttpStatusCode=bn;g.default=g;const B=g.create({baseURL:"http://localhost:5000",withCredentials:!0});B.interceptors.request.use(e=>(e.headers["Content-Type"]="application/json",e),e=>Promise.reject(e));B.interceptors.response.use(e=>e.data.code===0?e.data.body:(console.error("Error Message:",e.data.msg),Promise.reject(e.data.msg)),e=>(e.response?console.error("HTTP Error Response:",e.response.status):e.request?console.error("No response received:",e.request):console.error("Error sending request:",e.message),Promise.reject(e)));const En={style:{padding:"10px 10px"}},Sn={key:0},gn={key:1},Rn=L({__name:"ContactsList",props:["tableData"],emits:["userData"],setup(e,{emit:t}){const n=C([]),r=async(h,f,l="")=>{try{return await B.post("/api/contact_count_list",{start:h,limit:f,word:l})}catch(m){return console.error("Error fetching data:",m),[]}};Q(async()=>{try{const h=await r(0,800);n.value=h}catch(h){return console.error("Error fetching data:",h),[]}});const o=C(""),i=async()=>{try{const h=await r(0,100,o.value);n.value=h}catch(h){return console.error("Error fetching data:",h),[]}},c=t,p=h=>{h!==void 0&&c("userData",h)};return(h,f)=>{const l=x("el-input"),m=x("el-button"),E=x("el-table-column"),d=x("el-table");return w(),S("div",null,[y("div",En,[b(l,{placeholder:"请输入关键字",modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=u=>o.value=u),onKeyup:Ye(i,["enter"]),style:{width:"160px"}},null,8,["modelValue"]),b(m,{type:"primary",onClick:i,style:{width:"70px"}},{default:A(()=>[H("搜索")]),_:1})]),b(d,{data:n.value,stripe:"",style:{width:"100%"},"max-height":"100%",height:"100%","highlight-current-row":"",onCurrentChange:p},{default:A(()=>[b(E,{label:"name",width:"180"},{default:A(({row:u})=>[u.remark!==null&&u.remark!==""?(w(),S("span",Sn,k(u.remark),1)):(w(),S("span",gn,k(u.nickname),1))]),_:1}),b(E,{prop:"chat_count",label:"num",width:"70"})]),_:1},8,["data"])])}}}),xn=L({__name:"ChatRecprdsHeader",props:{userData:{type:Object,required:!0}},setup(e){const t=[{wxid:"username",账号:"account",昵称:"nickname"},{备注:"remark",描述:"describe",数量:"chat_count"}];return(n,r)=>{const s=x("el-text"),o=x("el-col"),i=x("el-row");return w(),S(ce,null,ae(t,(c,p)=>b(i,{gutter:5,style:{width:"100%"},key:p},{default:A(()=>[(w(!0),S(ce,null,ae(c,(h,f)=>(w(),I(o,{key:f,span:8,style:{"white-space":"nowrap"}},{default:A(()=>[b(s,{class:"label_color mx-1",truncated:""},{default:A(()=>[H(k(f)+":",1)]),_:2},1024),H(" "),b(s,{class:"data_color mx-1",truncated:"",title:e.userData[h]},{default:A(()=>[H(k(e.userData[h]),1)]),_:2},1032,["title"])]),_:2},1024))),128))]),_:2},1024)),64)}}}),On=z(xn,[["__scopeId","data-v-cb8b8fa3"]]),An={class:"chat-content"},Tn={key:0,class:"word"},Cn=["src"],Nn={class:"info"},kn={class:"time"},Pn=["innerHTML"],vn={key:1,class:"word-my"},Dn={class:"info"},Un={class:"time"},Fn=["innerHTML"],Ln=["src"],Bn=L({__name:"MessageText",props:{is_sender:{type:Number,default:0},content:{type:String,default:""},headUrl:{type:String,default:""},direction:{type:String,default:""}},setup(e){const t=n=>(n=n.replace(/\n/g,"<br>"),new DOMParser().parseFromString(n,"text/html").body.innerHTML);return(n,r)=>(w(),S("div",An,[e.is_sender?(w(),S("div",vn,[y("div",Dn,[y("p",Un,k(e.direction),1),y("div",{class:"info-content",innerHTML:t(e.content)},null,8,Fn)]),y("img",{src:e.headUrl},null,8,Ln)])):(w(),S("div",Tn,[y("img",{src:e.headUrl},null,8,Cn),y("div",Nn,[y("p",kn,k(e.direction),1),y("div",{class:"info-content",innerHTML:t(e.content)},null,8,Pn)])]))]))}}),jn=z(Bn,[["__scopeId","data-v-36141b84"]]),$n={class:"chat-content"},Mn={key:0,class:"word"},Hn=["src"],In={class:"info"},qn={class:"time"},zn={class:"demo-image__preview"},Vn={key:1,class:"word-my"},Jn={class:"info"},Wn={class:"time"},Kn={class:"demo-image__preview"},Gn=["src"],Xn=L({__name:"MessageImg",props:{is_sender:{type:Number,default:0},content:{type:String,default:""},headUrl:{type:String,default:""},direction:{type:String,default:""},src:{type:String,default:""}},setup(e){const t=e,n=C("");Q(async()=>{n.value=await r(t.src)});const r=async s=>{try{return await B.post("/api/img",{img_path:s})}catch(o){return console.error("Error fetching data:",o),""}};return(s,o)=>{const i=x("el-image");return w(),S("div",$n,[e.is_sender?(w(),S("div",Vn,[y("div",Jn,[y("p",Wn,k(e.direction),1),y("div",Kn,[b(i,{style:{"max-width":"150px","max-height":"150px"},src:n.value,"zoom-rate":1.2,"max-scale":7,"min-scale":.2,"preview-src-list":[n.value],"initial-index":4,fit:"cover"},null,8,["src","preview-src-list"])])]),y("img",{src:e.headUrl},null,8,Gn)])):(w(),S("div",Mn,[y("img",{src:e.headUrl},null,8,Hn),y("div",In,[y("p",qn,k(e.direction),1),y("div",zn,[b(i,{style:{"max-width":"150px","max-height":"150px"},src:n.value,"zoom-rate":1.2,"max-scale":7,"min-scale":.2,"preview-src-list":[n.value],"initial-index":4,fit:"cover"},null,8,["src","preview-src-list"])])])]))])}}}),Qn=z(Xn,[["__scopeId","data-v-5bacfdce"]]),Zn={class:"chat-content"},Yn={key:0,class:"word"},er=["src"],tr={class:"info"},nr={class:"time"},rr={controls:"",style:{"background-color":"#fff"}},sr=["src"],or={key:1,class:"word-my"},ir={class:"info"},ar={class:"time"},cr={controls:"",style:{"background-color":"#95EC69"}},lr=["src"],ur=["src"],dr=L({__name:"MessageAudio",props:{is_sender:{type:Number,default:0},headUrl:{type:String,default:""},direction:{type:String,default:""},src:{type:String,default:""},msg:{type:String,default:""}},setup(e){const t=e,n=C("");Q(async()=>{n.value=await r(t.src)});const r=async s=>{try{return await B.post("/api/audio",{MsgSvrID:s})}catch(o){return console.error("Error fetching data:",o),""}};return(s,o)=>{const i=x("el-textarea");return w(),S("div",Zn,[e.is_sender?(w(),S("div",or,[y("div",ir,[y("p",ar,k(e.direction),1),y("audio",cr,[y("source",{src:n.value,type:"audio/wav"},null,8,lr)]),b(i,{rows:1,readonly:!0,value:e.msg,style:{width:"100%"}},null,8,["value"])]),y("img",{src:e.headUrl},null,8,ur)])):(w(),S("div",Yn,[y("img",{src:e.headUrl},null,8,er),y("div",tr,[y("p",nr,k(e.direction),1),y("audio",rr,[y("source",{src:n.value,type:"audio/wav"},null,8,sr)]),b(i,{rows:1,readonly:!0,value:e.msg,style:{width:"100%"}},null,8,["value"])])]))])}}}),fr=z(dr,[["__scopeId","data-v-ee21176a"]]),hr={id:"chat"},pr={class:"chat_body"},mr={class:"chat_window",ref:"chatWindow"},_r={class:"load_more",style:{display:"flex","justify-content":"center","margin-top":"10px","margin-bottom":"10px"}},yr=L({__name:"ChatRecordsMain",props:{userData:{type:Object,required:!0}},setup(e){const t=e,n=C([]),r=C({}),s=C(""),o=C(500),i=C(0),c=async(m,E,d)=>{try{const u=await B.post("/api/msgs",{start:m,limit:E,wxid:d});return n.value=u.msg_list,r.value=u.user_list,s.value=u.my_wxid,u}catch(u){return console.error("Error fetching data:",u),[]}},p=async()=>{try{await c(i.value,o.value,t.userData.username)}catch(m){return console.error("Error fetching data:",m),[]}};Q(p),et(()=>t.userData.username,(m,E)=>{n.value=[],p()});const h=m=>(m.talker=="我"&&(m.talker=s.value),`${(d=>r.value.hasOwnProperty(d.talker)?r.value[d.talker].remark?r.value[d.talker].remark:r.value[d.talker].nickname?r.value[d.talker].nickname:r.value[d.talker].account?r.value[d.talker].account:d.talker:d.talker)(m)} [${m.type_name}] ${m.CreateTime}`),f=m=>(m.talker=="我"&&(m.talker=s.value),r.value.hasOwnProperty(m.talker)?r.value[m.talker].headImgUrl:""),l=async()=>{let m=i.value+o.value,E=o.value;const d=await B.post("/api/msgs",{start:m,limit:E,wxid:t.userData.username});n.value=n.value.concat(d.msg_list),r.value=Object.assign(r.value,d.user_list)};return(m,E)=>{const d=x("el-button");return w(),S("div",hr,[y("div",pr,[y("div",mr,[(w(!0),S(ce,null,ae(n.value,(u,R)=>(w(),S("div",{class:"message",key:R},[u.type_name=="文本"?(w(),I(jn,{key:0,is_sender:u.is_sender,direction:h(u),headUrl:f(u),content:u.content.msg},null,8,["is_sender","direction","headUrl","content"])):u.type_name=="图片"?(w(),I(Qn,{key:1,is_sender:u.is_sender,direction:h(u),headUrl:f(u),src:u.content.src},null,8,["is_sender","direction","headUrl","src"])):u.type_name=="语音"?(w(),I(fr,{key:2,is_sender:u.is_sender,direction:h(u),headUrl:f(u),src:u.MsgSvrID,msg:u.content.msg},null,8,["is_sender","direction","headUrl","src","msg"])):tt("",!0)]))),128)),y("div",_r,[b(d,{type:"primary",onClick:l},{default:A(()=>[H("加载更多")]),_:1})])],512)])])}}}),wr=z(yr,[["__scopeId","data-v-8da1fa43"]]),br=L({__name:"ChatRecords",props:{userData:{type:Object,required:!0}},setup(e){return(t,n)=>{const r=x("el-header"),s=x("el-scrollbar"),o=x("el-main"),i=x("el-container");return w(),I(i,null,{default:A(()=>[b(r,{style:{height:"65px","max-height":"65px",width:"100%","background-color":"#d2d2fa","padding-top":"5px"}},{default:A(()=>[b(On,{userData:e.userData},null,8,["userData"])]),_:1}),b(o,{style:{"overflow-y":"auto",height:"calc(100vh - 65px)"}},{default:A(()=>[b(s,null,{default:A(()=>[b(wr,{userData:e.userData},null,8,["userData"])]),_:1})]),_:1})]),_:1})}}}),Er={id:"chat_view",class:"common-layout"},Sr={key:0,style:{height:"calc(100vh)",width:"100%"}},gr={key:1,style:{width:"100%",height:"100%"}},xr=L({__name:"ChatView",setup(e){const t=C({account:"",describe:"",headImgUrl:"",nickname:"",remark:"",username:"",chat_count:0}),n=r=>{t.value=r};return(r,s)=>{const o=x("el-aside"),i=x("el-container");return w(),S("div",Er,[b(i,null,{default:A(()=>[b(o,{width:"266px",style:{"overflow-y":"auto",height:"calc(100vh)"}},{default:A(()=>[b(Rn,{onUserData:n})]),_:1}),t.value.username!=""?(w(),S("div",Sr,[b(br,{userData:t.value},null,8,["userData"])])):(w(),S("div",gr,[b(nt)]))]),_:1})])}}});export{xr as default};