vue-chat-kit 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { ref as k, nextTick as rt, computed as ke, watch as _t, resolveComponent as Me, openBlock as l, createBlock as Z, withCtx as v, createElementVNode as s, createElementBlock as m, normalizeStyle as Ee, Fragment as ce, renderList as de, withModifiers as De, normalizeClass as fe, createVNode as i, createTextVNode as A, toDisplayString as G, createCommentVNode as R, onMounted as js, onUnmounted as qs, unref as r, resolveDynamicComponent as Bs, isRef as Ue, withDirectives as Ps, withKeys as ft, vModelText as Os, Transition as Js } from "vue";
2
- import { ChatDotRound as ht, UserFilled as gt, Bell as Qs, Setting as Zs, Search as yt, Plus as je, MoreFilled as Ot, Document as ea, Download as ta, Folder as Jt, Picture as sa, ChatLineRound as aa, Close as na, Edit as qe, ArrowRight as ra, CircleCheck as Qt, Delete as oa, Check as la, Clock as ia, Camera as ua } from "@element-plus/icons-vue";
3
- import bt from "dayjs";
4
- import { ElMessage as X, ElMessageBox as at } from "element-plus";
5
- class ca {
1
+ import { ref as k, nextTick as nt, computed as be, watch as kt, resolveComponent as Ue, openBlock as l, createBlock as Q, withCtx as v, createElementVNode as s, createElementBlock as p, normalizeStyle as Le, Fragment as ue, renderList as ce, withModifiers as Ee, normalizeClass as ve, createVNode as i, createTextVNode as T, toDisplayString as M, createCommentVNode as L, onMounted as Ys, onUnmounted as js, unref as r, resolveDynamicComponent as qs, isRef as xe, withDirectives as Os, withKeys as vt, vModelText as Ps, Transition as Bs } from "vue";
2
+ import { ChatDotRound as ht, UserFilled as ft, Bell as Js, Setting as Qs, Search as gt, Plus as Ye, MoreFilled as Pt, Document as Zs, Download as ea, Folder as Bt, Picture as ta, ChatLineRound as sa, Close as aa, Edit as je, ArrowRight as na, CircleCheck as Jt, Delete as ra, Check as oa, Clock as la, Camera as ia } from "@element-plus/icons-vue";
3
+ import yt from "dayjs";
4
+ import { ElMessage as at } from "element-plus";
5
+ class ua {
6
6
  constructor(t, a = {}) {
7
7
  this.userId = t, this.wsUrl = a.wsUrl || "", this.socket = null, this.reconnectAttempts = 0, this.maxReconnectAttempts = a.maxReconnectAttempts || 5, this.reconnectDelay = a.reconnectDelay || 3e3, this.handlers = {
8
8
  message: [],
@@ -47,20 +47,20 @@ class ca {
47
47
  * @param {number} fileSize - 文件大小
48
48
  * @param {boolean} isGroup - 是否为群聊消息
49
49
  */
50
- send(t, a, o = "text", b = "", E = "", N = 0, te = !1) {
50
+ send(t, a, o = "text", y = "", E = "", N = 0, ee = !1) {
51
51
  if (this.isConnected()) {
52
- const S = JSON.stringify(te ? {
52
+ const S = JSON.stringify(ee ? {
53
53
  toGroupId: t,
54
54
  msg: a,
55
55
  type: o,
56
- fileUrl: b,
56
+ fileUrl: y,
57
57
  fileName: E,
58
58
  fileSize: N
59
59
  } : {
60
60
  to: t,
61
61
  msg: a,
62
62
  type: o,
63
- fileUrl: b,
63
+ fileUrl: y,
64
64
  fileName: E,
65
65
  fileSize: N
66
66
  });
@@ -113,12 +113,12 @@ class ca {
113
113
  return this.socket && this.socket.readyState === WebSocket.OPEN;
114
114
  }
115
115
  }
116
- class nt extends Error {
117
- constructor(t, a, o, b) {
118
- super(t), this.name = "RequestError", this.status = a || 0, this.code = o || 0, this.data = b;
116
+ class st extends Error {
117
+ constructor(t, a, o, y) {
118
+ super(t), this.name = "RequestError", this.status = a || 0, this.code = o || 0, this.data = y;
119
119
  }
120
120
  }
121
- class da {
121
+ class ca {
122
122
  constructor(t = {}) {
123
123
  this.baseUrl = t.baseUrl || "", this.timeout = t.timeout || 1e4, this.headers = t.headers || {}, this.requestInterceptors = [], this.responseInterceptors = [], t.requestInterceptors && Array.isArray(t.requestInterceptors) && t.requestInterceptors.forEach((a) => {
124
124
  this.requestInterceptors.push(a);
@@ -147,7 +147,7 @@ class da {
147
147
  timeoutPromise(t) {
148
148
  return new Promise((a, o) => {
149
149
  setTimeout(() => {
150
- o(new nt("请求超时", 408, 408));
150
+ o(new st("请求超时", 408, 408));
151
151
  }, t);
152
152
  });
153
153
  }
@@ -155,46 +155,46 @@ class da {
155
155
  * 核心请求方法
156
156
  */
157
157
  async request(t, a = {}) {
158
- const { method: o = "GET", headers: b = {}, body: E, params: N } = a;
159
- let te = t.startsWith("http") ? t : `${this.baseUrl}${t}`, S = {
158
+ const { method: o = "GET", headers: y = {}, body: E, params: N } = a;
159
+ let ee = t.startsWith("http") ? t : `${this.baseUrl}${t}`, S = {
160
160
  method: o,
161
- headers: { ...this.headers, ...b },
161
+ headers: { ...this.headers, ...y },
162
162
  body: E,
163
163
  params: N
164
164
  };
165
165
  this.requestInterceptors.forEach((U) => {
166
166
  S = U(S);
167
167
  });
168
- const f = {
168
+ const h = {
169
169
  method: S.method,
170
170
  headers: S.headers,
171
171
  credentials: "include"
172
172
  };
173
- if (S.body && o !== "GET" && (S.body instanceof FormData ? f.body = S.body : typeof S.body == "object" ? f.body = JSON.stringify(S.body) : f.body = S.body), S.params) {
173
+ if (S.body && o !== "GET" && (S.body instanceof FormData ? h.body = S.body : typeof S.body == "object" ? h.body = JSON.stringify(S.body) : h.body = S.body), S.params) {
174
174
  const U = new URLSearchParams();
175
- for (const B in S.params)
176
- S.params[B] !== void 0 && S.params[B] !== null && S.params[B] !== "" && U.append(B, S.params[B]);
175
+ for (const j in S.params)
176
+ S.params[j] !== void 0 && S.params[j] !== null && S.params[j] !== "" && U.append(j, S.params[j]);
177
177
  const $ = U.toString();
178
- $ && (te += (te.includes("?") ? "&" : "?") + $);
178
+ $ && (ee += (ee.includes("?") ? "&" : "?") + $);
179
179
  }
180
180
  try {
181
181
  let $ = await Promise.race([
182
- fetch(te, f),
182
+ fetch(ee, h),
183
183
  this.timeoutPromise(this.timeout)
184
184
  ]);
185
- if (this.responseInterceptors.forEach((pe) => {
186
- $ = pe($);
185
+ if (this.responseInterceptors.forEach((de) => {
186
+ $ = de($);
187
187
  }), !$.ok)
188
- throw new nt(
188
+ throw new st(
189
189
  `HTTP ${$.status}: ${$.statusText}`,
190
190
  $.status,
191
191
  $.status
192
192
  );
193
- const B = $.headers.get("content-type");
193
+ const j = $.headers.get("content-type");
194
194
  let x;
195
- return B && B.includes("application/json") ? x = await $.json() : x = await $.text(), x;
195
+ return j && j.includes("application/json") ? x = await $.json() : x = await $.text(), x;
196
196
  } catch (U) {
197
- throw U instanceof nt ? U : new nt(
197
+ throw U instanceof st ? U : new st(
198
198
  U instanceof Error ? U.message : "网络错误",
199
199
  0,
200
200
  0
@@ -215,9 +215,9 @@ class da {
215
215
  return this.request(t, { ...a, method: "DELETE" });
216
216
  }
217
217
  }
218
- class kt {
218
+ class bt {
219
219
  constructor(t, a = null) {
220
- this.config = t, this.endpoints = t.api.endpoints, this.customAdapter = t.api.adapter, a ? this.http = a : this.http = new da({
220
+ this.config = t, this.endpoints = t.api.endpoints, this.customAdapter = t.api.adapter, a ? this.http = a : this.http = new ca({
221
221
  baseUrl: t.api.baseUrl,
222
222
  headers: t.headers,
223
223
  requestInterceptors: t.requestInterceptors,
@@ -446,20 +446,20 @@ class kt {
446
446
  /**
447
447
  * 修改群基础信息(群主专用)
448
448
  */
449
- async updateGroupInfo(t, a, o, b, E) {
450
- return this._call("updateGroupInfo", t, a, o, b, E);
449
+ async updateGroupInfo(t, a, o, y, E) {
450
+ return this._call("updateGroupInfo", t, a, o, y, E);
451
451
  }
452
- async _updateGroupInfo(t, a, o, b, E) {
453
- return this.http.post(this.endpoints.updateGroupInfo, { groupId: t, currentUser: a, groupNickname: o, remark: b, notice: E });
452
+ async _updateGroupInfo(t, a, o, y, E) {
453
+ return this.http.post(this.endpoints.updateGroupInfo, { groupId: t, currentUser: a, groupNickname: o, remark: y, notice: E });
454
454
  }
455
455
  /**
456
456
  * 修改群成员专属昵称
457
457
  */
458
- async updateMemberNick(t, a, o, b) {
459
- return this._call("updateMemberNick", t, a, o, b);
458
+ async updateMemberNick(t, a, o, y) {
459
+ return this._call("updateMemberNick", t, a, o, y);
460
460
  }
461
- async _updateMemberNick(t, a, o, b) {
462
- return this.http.post(this.endpoints.updateMemberNick, { groupId: t, currentUser: a, targetUsername: o, memberNick: b });
461
+ async _updateMemberNick(t, a, o, y) {
462
+ return this.http.post(this.endpoints.updateMemberNick, { groupId: t, currentUser: a, targetUsername: o, memberNick: y });
463
463
  }
464
464
  /**
465
465
  * 群主解散/删除群聊
@@ -507,34 +507,34 @@ class kt {
507
507
  return this.http.post(this.endpoints.readAllGroupMsg, { groupId: t, currentUser: a });
508
508
  }
509
509
  }
510
- const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
510
+ const da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
511
511
  __proto__: null,
512
- ChatApi: kt,
513
- default: kt
512
+ ChatApi: bt,
513
+ default: bt
514
514
  }, Symbol.toStringTag, { value: "Module" }));
515
- function ma(y, t) {
516
- const a = new kt(y);
515
+ function pa(g, t) {
516
+ const a = new bt(g);
517
517
  let o = null;
518
- const b = y.user.username, E = k(y.user.avatar || `https://api.dicebear.com/7.x/avataaars/svg?seed=${b}`), N = k({
519
- username: b,
520
- nickname: y.user.nickname || "",
521
- email: y.user.email || "",
522
- phone: y.user.phone || "",
523
- bio: y.user.bio || ""
524
- }), te = k(!1), S = k(""), f = k(""), U = k(null), $ = (z) => bt(z).format("HH:mm"), B = (z) => {
518
+ const y = g.user.username, E = k(g.user.avatar || `https://api.dicebear.com/7.x/avataaars/svg?seed=${y}`), N = k({
519
+ username: y,
520
+ nickname: g.user.nickname || "",
521
+ email: g.user.email || "",
522
+ phone: g.user.phone || "",
523
+ bio: g.user.bio || ""
524
+ }), ee = k(!1), S = k(""), h = k(""), U = k(null), $ = (z) => yt(z).format("HH:mm"), j = (z) => {
525
525
  if (!z) return "";
526
- const Q = bt(), C = bt(z);
527
- return Q.isSame(C, "day") ? C.format("HH:mm") : Q.diff(C, "day") === 1 ? "昨天" : Q.diff(C, "day") < 7 ? ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][C.day()] : C.format("MM/DD");
526
+ const B = yt(), C = yt(z);
527
+ return B.isSame(C, "day") ? C.format("HH:mm") : B.diff(C, "day") === 1 ? "昨天" : B.diff(C, "day") < 7 ? ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][C.day()] : C.format("MM/DD");
528
528
  }, x = (z) => {
529
529
  if (!z) return !1;
530
- const Q = ["jpg", "jpeg", "png", "gif", "bmp", "webp", "svg"], C = z.split(".").pop().toLowerCase();
531
- return Q.includes(C);
532
- }, pe = (z) => {
530
+ const B = ["jpg", "jpeg", "png", "gif", "bmp", "webp", "svg"], C = z.split(".").pop().toLowerCase();
531
+ return B.includes(C);
532
+ }, de = (z) => {
533
533
  if (!z) return "default";
534
- const Q = z.split(".").pop().toLowerCase();
535
- return ["xls", "xlsx"].includes(Q) ? "excel" : ["pdf"].includes(Q) ? "pdf" : ["doc", "docx"].includes(Q) ? "docx" : "default";
536
- }, we = () => {
537
- rt(() => {
534
+ const B = z.split(".").pop().toLowerCase();
535
+ return ["xls", "xlsx"].includes(B) ? "excel" : ["pdf"].includes(B) ? "pdf" : ["doc", "docx"].includes(B) ? "docx" : "default";
536
+ }, _e = () => {
537
+ nt(() => {
538
538
  U.value && (U.value.scrollTop = U.value.scrollHeight);
539
539
  });
540
540
  }, D = (z) => {
@@ -554,243 +554,243 @@ function ma(y, t) {
554
554
  };
555
555
  } catch {
556
556
  }
557
- const Q = z.match(/^\[(.+?)\]:(.+)$/);
558
- if (Q)
557
+ const B = z.match(/^\[(.+?)\]:(.+)$/);
558
+ if (B)
559
559
  return {
560
- username: Q[1],
561
- content: Q[2],
560
+ username: B[1],
561
+ content: B[2],
562
562
  type: "text"
563
563
  };
564
- } catch (Q) {
565
- console.error("[VueChatKit] 解析消息失败", Q);
564
+ } catch (B) {
565
+ console.error("[VueChatKit] 解析消息失败", B);
566
566
  }
567
567
  return null;
568
568
  }, _ = (z) => {
569
- const Q = `${y.api.websocketUrl}?userId=${b}`;
570
- o = new ca(b, {
571
- wsUrl: Q,
572
- maxReconnectAttempts: y.websocket.maxReconnectAttempts,
573
- reconnectDelay: y.websocket.reconnectDelay
569
+ const B = `${g.api.websocketUrl}?userId=${y}`;
570
+ o = new ua(y, {
571
+ wsUrl: B,
572
+ maxReconnectAttempts: g.websocket.maxReconnectAttempts,
573
+ reconnectDelay: g.websocket.reconnectDelay
574
574
  }), o.on("message", z), o.connect();
575
575
  }, he = () => {
576
576
  o && (o.close(), o = null);
577
- }, me = () => o, ge = async () => {
577
+ }, pe = () => o, fe = async () => {
578
578
  try {
579
- const z = await a.getUserAvatar(b);
580
- z.code === 200 && z.data && (E.value = `${y.api.baseUrl}${z.data}`);
579
+ const z = await a.getUserAvatar(y);
580
+ z.code === 200 && z.data && (E.value = `${g.api.baseUrl}${z.data}`);
581
581
  } catch (z) {
582
582
  console.warn("[VueChatKit] 加载头像失败", z);
583
583
  }
584
- }, ie = (z) => {
584
+ }, le = (z) => {
585
585
  E.value = z;
586
- }, re = async (z) => {
586
+ }, ne = async (z) => {
587
587
  try {
588
- return (await a.updateUserInfo(b, z)).code === 200 ? (N.value = {
588
+ return (await a.updateUserInfo(y, z)).code === 200 ? (N.value = {
589
589
  ...N.value,
590
590
  ...z
591
591
  }, !0) : !1;
592
- } catch (Q) {
593
- return console.error("[VueChatKit] 更新用户信息失败", Q), !1;
592
+ } catch (B) {
593
+ return console.error("[VueChatKit] 更新用户信息失败", B), !1;
594
594
  }
595
595
  };
596
- return ge(), {
596
+ return fe(), {
597
597
  // 配置
598
598
  api: a,
599
- config: y,
599
+ config: g,
600
600
  // 状态
601
- myUsername: b,
601
+ myUsername: y,
602
602
  myAvatar: E,
603
603
  userInfo: N,
604
- loadingUserInfo: te,
604
+ loadingUserInfo: ee,
605
605
  searchText: S,
606
- inputText: f,
606
+ inputText: h,
607
607
  messagesContainer: U,
608
608
  // 工具函数
609
609
  formatTime: $,
610
- formatLastTime: B,
610
+ formatLastTime: j,
611
611
  isImageFile: x,
612
- getFileIconType: pe,
613
- scrollToBottom: we,
612
+ getFileIconType: de,
613
+ scrollToBottom: _e,
614
614
  // WebSocket
615
615
  parseWsMessage: D,
616
616
  initWebSocket: _,
617
617
  closeWebSocket: he,
618
- getSocket: me,
618
+ getSocket: pe,
619
619
  // 用户信息
620
- initUserAvatar: ge,
621
- updateMyAvatar: ie,
622
- updateUserInfo: re
620
+ initUserAvatar: fe,
621
+ updateMyAvatar: le,
622
+ updateUserInfo: ne
623
623
  };
624
624
  }
625
- function va(y) {
626
- const { api: t, myUsername: a, myAvatar: o, config: b, scrollToBottom: E, getSocket: N } = y, te = k([]), S = k([]), f = k([]), U = k(""), $ = k(!1), B = k(""), x = k([]), pe = k(!1), we = k([]), D = k(!1), _ = ke(() => {
625
+ function ma(g) {
626
+ const { api: t, myUsername: a, myAvatar: o, config: y, scrollToBottom: E, getSocket: N } = g, ee = k([]), S = k([]), h = k([]), U = k(""), $ = k(!1), j = k(""), x = k([]), de = k(!1), _e = k([]), D = k(!1), _ = be(() => {
627
627
  let d = S.value;
628
- if (y.searchText.value) {
629
- const h = y.searchText.value.toLowerCase();
628
+ if (g.searchText.value) {
629
+ const f = g.searchText.value.toLowerCase();
630
630
  d = d.filter(
631
- (M) => {
632
- var F;
633
- return (F = M.username) == null ? void 0 : F.toLowerCase().includes(h);
631
+ (G) => {
632
+ var A;
633
+ return (A = G.username) == null ? void 0 : A.toLowerCase().includes(f);
634
634
  }
635
635
  );
636
636
  }
637
- return d.map((h) => ({
638
- id: h.username,
639
- name: h.username,
640
- avatar: h.avatar ? `${b.api.baseUrl}${h.avatar}` : o.value,
641
- online: h.online,
642
- lastMsg: h.lastMsg || "暂无消息",
643
- lastTime: h.lastTime,
644
- unread: h.unReadNum || 0
637
+ return d.map((f) => ({
638
+ id: f.username,
639
+ name: f.username,
640
+ avatar: f.avatar ? `${y.api.baseUrl}${f.avatar}` : o.value,
641
+ online: f.online,
642
+ lastMsg: f.lastMsg || "暂无消息",
643
+ lastTime: f.lastTime,
644
+ unread: f.unReadNum || 0
645
645
  }));
646
- }), he = ke(() => {
647
- let d = te.value;
648
- if (y.searchText.value) {
649
- const h = y.searchText.value.toLowerCase();
646
+ }), he = be(() => {
647
+ let d = ee.value;
648
+ if (g.searchText.value) {
649
+ const f = g.searchText.value.toLowerCase();
650
650
  d = d.filter(
651
- (M) => {
652
- var F;
653
- return (F = M.username) == null ? void 0 : F.toLowerCase().includes(h);
651
+ (G) => {
652
+ var A;
653
+ return (A = G.username) == null ? void 0 : A.toLowerCase().includes(f);
654
654
  }
655
655
  );
656
656
  }
657
- return d.map((h) => ({
658
- id: h.username,
659
- name: h.username,
660
- avatar: h.avatar ? `${b.api.baseUrl}${h.avatar}` : o.value,
661
- online: h.online,
662
- isChatting: h.isChatting
657
+ return d.map((f) => ({
658
+ id: f.username,
659
+ name: f.username,
660
+ avatar: f.avatar ? `${y.api.baseUrl}${f.avatar}` : o.value,
661
+ online: f.online,
662
+ isChatting: f.isChatting
663
663
  }));
664
- }), me = ke(() => x.value), ge = ke(() => _.value.find((d) => d.id === U.value) || null), ie = ke(() => f.value.map((d) => {
665
- const h = d.type === "file" || d.fileUrl || d.fileName, M = d.fileName || d.msgContent;
666
- let F = "";
664
+ }), pe = be(() => x.value), fe = be(() => _.value.find((d) => d.id === U.value) || null), le = be(() => h.value.map((d) => {
665
+ const f = d.type === "file" || d.fileUrl || d.fileName, G = d.fileName || d.msgContent;
666
+ let A = "";
667
667
  if (d.sendUsername !== a) {
668
- const Y = te.value.find((q) => q.username === d.sendUsername);
669
- F = Y != null && Y.avatar ? `${b.api.baseUrl}${Y.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${d.sendUsername}`;
668
+ const H = ee.value.find((Y) => Y.username === d.sendUsername);
669
+ A = H != null && H.avatar ? `${y.api.baseUrl}${H.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${d.sendUsername}`;
670
670
  } else
671
- F = o.value;
671
+ A = o.value;
672
672
  return {
673
673
  text: d.msgContent,
674
674
  isSelf: d.sendUsername === a,
675
675
  time: d.createTime,
676
676
  sendUsername: d.sendUsername,
677
- avatar: F,
678
- type: h ? "file" : "text",
679
- fileType: y.isImageFile(M) ? "image" : y.getFileIconType(M),
677
+ avatar: A,
678
+ type: f ? "file" : "text",
679
+ fileType: g.isImageFile(G) ? "image" : g.getFileIconType(G),
680
680
  fileUrl: d.fileUrl || "",
681
- fileName: M,
681
+ fileName: G,
682
682
  fileSize: d.fileSize || 0
683
683
  };
684
- })), re = async () => {
684
+ })), ne = async () => {
685
685
  try {
686
- const h = (await t.getFriends(a)).data || [];
687
- te.value = h, S.value = h.filter((M) => M.isChatting === 1);
688
- for (const M of S.value)
686
+ const f = (await t.getFriends(a)).data || [];
687
+ ee.value = f, S.value = f.filter((G) => G.isChatting === 1);
688
+ for (const G of S.value)
689
689
  try {
690
- const Y = (await t.getHistory(a, M.username)).data || [];
691
- M.unReadNum = Y.filter(
692
- (q) => q.isRead === 0 && q.sendUsername === M.username
690
+ const H = (await t.getHistory(a, G.username)).data || [];
691
+ G.unReadNum = H.filter(
692
+ (Y) => Y.isRead === 0 && Y.sendUsername === G.username
693
693
  ).length;
694
694
  } catch {
695
- M.unReadNum = 0;
695
+ G.unReadNum = 0;
696
696
  }
697
697
  } catch (d) {
698
698
  console.error("[VueChatKit] 获取好友列表失败", d);
699
699
  }
700
700
  }, z = async (d) => {
701
701
  try {
702
- const h = await t.getHistory(a, d);
703
- f.value = h.data || [], E();
704
- } catch (h) {
705
- console.error("[VueChatKit] 获取聊天历史失败", h);
702
+ const f = await t.getHistory(a, d);
703
+ h.value = f.data || [], E();
704
+ } catch (f) {
705
+ console.error("[VueChatKit] 获取聊天历史失败", f);
706
706
  }
707
- }, Q = async (d) => {
707
+ }, B = async (d) => {
708
708
  try {
709
- await t.setRead(a, d), re();
710
- } catch (h) {
711
- console.error("[VueChatKit] 标记已读失败", h);
709
+ await t.setRead(a, d), ne();
710
+ } catch (f) {
711
+ console.error("[VueChatKit] 标记已读失败", f);
712
712
  }
713
713
  }, C = async (d) => {
714
- U.value = d.id, await z(d.id), await Q(d.id), E();
715
- }, ye = async (d, h = 1) => {
714
+ U.value = d.id, await z(d.id), await B(d.id), E();
715
+ }, ge = async (d, f = 1) => {
716
716
  try {
717
- return await t.setChatStatus(a, d, h), await re(), !0;
718
- } catch (M) {
719
- return console.error("[VueChatKit] 设置聊天状态失败", M), !1;
717
+ return await t.setChatStatus(a, d, f), await ne(), !0;
718
+ } catch (G) {
719
+ return console.error("[VueChatKit] 设置聊天状态失败", G), !1;
720
720
  }
721
- }, ue = () => {
721
+ }, ie = () => {
722
722
  const d = N();
723
- if (!y.inputText.value.trim() || !U.value || !d) return;
724
- if (d.send(U.value, y.inputText.value.trim(), "text")) {
725
- const M = {
726
- msgContent: y.inputText.value.trim(),
723
+ if (!g.inputText.value.trim() || !U.value || !d) return;
724
+ if (d.send(U.value, g.inputText.value.trim(), "text")) {
725
+ const G = {
726
+ msgContent: g.inputText.value.trim(),
727
727
  sendUsername: a,
728
728
  receiveUsername: U.value,
729
729
  createTime: /* @__PURE__ */ new Date(),
730
730
  isRead: 0,
731
731
  type: "text"
732
732
  };
733
- f.value.push(M), y.inputText.value = "", E(), setTimeout(() => {
734
- z(U.value), re();
733
+ h.value.push(G), g.inputText.value = "", E(), setTimeout(() => {
734
+ z(U.value), ne();
735
735
  }, 300);
736
736
  }
737
737
  }, w = async (d) => {
738
- const h = N();
739
- if (!U.value || !h) return !1;
738
+ const f = N();
739
+ if (!U.value || !f) return !1;
740
740
  try {
741
- const M = await t.uploadFile(d);
742
- if (M.code === 200 && M.data) {
743
- const { fileUrl: F, fileName: Y } = M.data;
744
- if (h.send(
741
+ const G = await t.uploadFile(d);
742
+ if (G.code === 200 && G.data) {
743
+ const { fileUrl: A, fileName: H } = G.data;
744
+ if (f.send(
745
745
  U.value,
746
- Y,
746
+ H,
747
747
  "file",
748
- F,
749
- Y,
748
+ A,
749
+ H,
750
750
  d.size
751
751
  )) {
752
- const oe = {
753
- msgContent: Y,
752
+ const re = {
753
+ msgContent: H,
754
754
  sendUsername: a,
755
755
  receiveUsername: U.value,
756
756
  createTime: /* @__PURE__ */ new Date(),
757
757
  isRead: 0,
758
758
  type: "file",
759
- fileUrl: F,
760
- fileName: Y,
759
+ fileUrl: A,
760
+ fileName: H,
761
761
  fileSize: d.size
762
762
  };
763
- return f.value.push(oe), E(), !0;
763
+ return h.value.push(re), E(), !0;
764
764
  }
765
765
  }
766
766
  return !1;
767
- } catch (M) {
768
- return console.error("[VueChatKit] 发送文件失败", M), !1;
767
+ } catch (G) {
768
+ return console.error("[VueChatKit] 发送文件失败", G), !1;
769
769
  }
770
- }, V = async (d, h) => {
771
- const M = N();
772
- if (!(!U.value || !M)) {
773
- if (h && h.trim() && M.send(U.value, h.trim(), "text")) {
774
- const Y = {
775
- msgContent: h.trim(),
770
+ }, V = async (d, f) => {
771
+ const G = N();
772
+ if (!(!U.value || !G)) {
773
+ if (f && f.trim() && G.send(U.value, f.trim(), "text")) {
774
+ const H = {
775
+ msgContent: f.trim(),
776
776
  sendUsername: a,
777
777
  receiveUsername: U.value,
778
778
  createTime: /* @__PURE__ */ new Date(),
779
779
  isRead: 0,
780
780
  type: "text"
781
781
  };
782
- f.value.push(Y);
782
+ h.value.push(H);
783
783
  }
784
- for (const F of d) {
785
- const Y = F.file || F;
786
- await w(Y);
784
+ for (const A of d) {
785
+ const H = A.file || A;
786
+ await w(H);
787
787
  }
788
788
  setTimeout(() => {
789
- z(U.value), re();
789
+ z(U.value), ne();
790
790
  }, 300);
791
791
  }
792
- }, ee = (d) => {
793
- const h = {
792
+ }, Z = (d) => {
793
+ const f = {
794
794
  content: d.content,
795
795
  username: d.username || d.from || U.value,
796
796
  type: d.type || "text",
@@ -801,9 +801,9 @@ function va(y) {
801
801
  };
802
802
  if (U.value) {
803
803
  try {
804
- let M = {
804
+ let G = {
805
805
  msgContent: d.content,
806
- sendUsername: h.username,
806
+ sendUsername: f.username,
807
807
  receiveUsername: a,
808
808
  createTime: /* @__PURE__ */ new Date(),
809
809
  isRead: 0,
@@ -812,103 +812,103 @@ function va(y) {
812
812
  fileName: d.fileName || "",
813
813
  fileSize: d.fileSize || 0
814
814
  };
815
- f.value.push(M), E();
816
- } catch (M) {
817
- console.error("[VueChatKit] 添加临时消息失败", M);
815
+ h.value.push(G), E();
816
+ } catch (G) {
817
+ console.error("[VueChatKit] 添加临时消息失败", G);
818
818
  }
819
819
  z(U.value);
820
820
  }
821
- re();
822
- }, T = (d, h) => {
823
- const M = te.value.find((F) => F.username === d);
824
- M && (M.online = h);
821
+ ne();
822
+ }, F = (d, f) => {
823
+ const G = ee.value.find((A) => A.username === d);
824
+ G && (G.online = f);
825
825
  }, K = async () => {
826
- $.value = !0, B.value = "", x.value = [];
826
+ $.value = !0, j.value = "", x.value = [];
827
827
  }, I = async (d = "") => {
828
- pe.value = !0;
828
+ de.value = !0;
829
829
  try {
830
- let h;
831
- d ? h = await t.searchUser(d) : h = await t.getAvailableUsers(a), x.value = (h == null ? void 0 : h.data) || [];
832
- } catch (h) {
833
- console.error("[VueChatKit] 获取可用用户失败", h);
830
+ let f;
831
+ d ? f = await t.searchUser(d) : f = await t.getAvailableUsers(a), x.value = (f == null ? void 0 : f.data) || [];
832
+ } catch (f) {
833
+ console.error("[VueChatKit] 获取可用用户失败", f);
834
834
  } finally {
835
- pe.value = !1;
835
+ de.value = !1;
836
836
  }
837
837
  }, W = async (d) => {
838
838
  try {
839
- await t.addFriend(a, d.username), await re(), $.value = !1;
840
- } catch (h) {
841
- console.error("[VueChatKit] 添加好友失败", h);
839
+ await t.addFriend(a, d.username), await ne(), $.value = !1;
840
+ } catch (f) {
841
+ console.error("[VueChatKit] 添加好友失败", f);
842
842
  }
843
- }, se = async () => {
843
+ }, te = async () => {
844
844
  D.value = !0;
845
845
  try {
846
846
  const d = await t.getApplyList(a);
847
- we.value = d.data || [];
847
+ _e.value = d.data || [];
848
848
  } catch (d) {
849
849
  console.error("[VueChatKit] 获取好友申请列表失败", d);
850
850
  } finally {
851
851
  D.value = !1;
852
852
  }
853
- }, ae = async (d) => {
853
+ }, se = async (d) => {
854
854
  try {
855
- await t.agreeFriend(d, a), await se(), await re();
856
- } catch (h) {
857
- console.error("[VueChatKit] 同意好友申请失败", h);
855
+ await t.agreeFriend(d, a), await te(), await ne();
856
+ } catch (f) {
857
+ console.error("[VueChatKit] 同意好友申请失败", f);
858
858
  }
859
- }, P = () => {
860
- U.value = "", f.value = [];
859
+ }, q = () => {
860
+ U.value = "", h.value = [];
861
861
  };
862
- return _t(B, async (d) => {
862
+ return kt(j, async (d) => {
863
863
  await I(d);
864
864
  }), {
865
865
  // 状态
866
- friendList: te,
866
+ friendList: ee,
867
867
  chatList: S,
868
- chatMsgList: f,
868
+ chatMsgList: h,
869
869
  currentSelectName: U,
870
870
  filteredUsers: _,
871
871
  filteredFriendList: he,
872
- filteredAvailableUsers: me,
873
- currentUser: ge,
874
- currentMessages: ie,
872
+ filteredAvailableUsers: pe,
873
+ currentUser: fe,
874
+ currentMessages: le,
875
875
  addFriendDialogVisible: $,
876
- addFriendSearchText: B,
876
+ addFriendSearchText: j,
877
877
  availableUsers: x,
878
- loadingAvailableUsers: pe,
879
- friendApplyList: we,
878
+ loadingAvailableUsers: de,
879
+ friendApplyList: _e,
880
880
  loadingFriendApply: D,
881
881
  // 方法
882
- getFriendList: re,
882
+ getFriendList: ne,
883
883
  getChatHistory: z,
884
- markAsRead: Q,
884
+ markAsRead: B,
885
885
  selectUser: C,
886
- setFriendToChatStatus: ye,
887
- sendMessage: ue,
886
+ setFriendToChatStatus: ge,
887
+ sendMessage: ie,
888
888
  sendFile: w,
889
889
  sendFilesAndText: V,
890
- handleFriendWsMessage: ee,
891
- handleFriendStatusChange: T,
890
+ handleFriendWsMessage: Z,
891
+ handleFriendStatusChange: F,
892
892
  openAddFriendDialog: K,
893
893
  loadAvailableUsers: I,
894
894
  addFriend: W,
895
- loadFriendApplyList: se,
896
- agreeFriend: ae,
897
- resetFriendChat: P
895
+ loadFriendApplyList: te,
896
+ agreeFriend: se,
897
+ resetFriendChat: q
898
898
  };
899
899
  }
900
- function fa(y) {
901
- const { api: t, myUsername: a, myAvatar: o, config: b, scrollToBottom: E, getSocket: N } = y, te = k("friends"), S = k([]), f = k(null), U = k([]), $ = k([]), B = k({}), x = k(!1), pe = k(!1), we = k(""), D = k(""), _ = k([]), he = k(!1), me = k([]), ge = k(!1), ie = k({
900
+ function va(g) {
901
+ const { api: t, myUsername: a, myAvatar: o, config: y, scrollToBottom: E, getSocket: N } = g, ee = k("friends"), S = k([]), h = k(null), U = k([]), $ = k([]), j = k({}), x = k(!1), de = k(!1), _e = k(""), D = k(""), _ = k([]), he = k(!1), pe = k([]), fe = k(!1), le = k({
902
902
  groupNickname: "",
903
903
  remark: "",
904
904
  notice: ""
905
- }), re = k({
905
+ }), ne = k({
906
906
  targetUsername: "",
907
907
  memberNick: ""
908
- }), z = k(!1), Q = k(!1), C = k({
908
+ }), z = k(!1), B = k(!1), C = k({
909
909
  readUserList: [],
910
910
  unreadUserList: []
911
- }), ye = k(null), ue = k({
911
+ }), ge = k(null), ie = k({
912
912
  groupNickname: !1,
913
913
  remark: !1,
914
914
  notice: !1
@@ -916,23 +916,23 @@ function fa(y) {
916
916
  groupNickname: "",
917
917
  remark: "",
918
918
  notice: ""
919
- }), V = ke(() => {
919
+ }), V = be(() => {
920
920
  let u = S.value;
921
- if (y.searchText.value) {
922
- const c = y.searchText.value.toLowerCase();
921
+ if (g.searchText.value) {
922
+ const c = g.searchText.value.toLowerCase();
923
923
  u = u.filter(
924
- (L) => L.groupName && L.groupName.toLowerCase().includes(c) || L.remark && L.remark.toLowerCase().includes(c)
924
+ (R) => R.groupName && R.groupName.toLowerCase().includes(c) || R.remark && R.remark.toLowerCase().includes(c)
925
925
  );
926
926
  }
927
927
  return u.map((c) => {
928
- const ne = (B.value[c.groupId] || []).slice(0, 4).map((Ke) => ({
929
- username: Ke.username,
930
- avatar: Ke.avatar ? `${b.api.baseUrl}${Ke.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${Ke.username}`
928
+ const ae = (j.value[c.groupId] || []).slice(0, 4).map((De) => ({
929
+ username: De.username,
930
+ avatar: De.avatar ? `${y.api.baseUrl}${De.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${De.username}`
931
931
  }));
932
- let ve = "暂无消息";
933
- c.lastMsg ? ve = c.lastMsg : c.lastMessage ? ve = c.lastMessage : c.latestMessage && (ve = c.latestMessage);
934
- let ze = 0;
935
- c.unReadNum !== void 0 && c.unReadNum !== null ? ze = c.unReadNum : c.unreadCount !== void 0 && c.unreadCount !== null ? ze = c.unreadCount : c.unread !== void 0 && c.unread !== null && (ze = c.unread);
932
+ let me = "暂无消息";
933
+ c.lastMsg ? me = c.lastMsg : c.lastMessage ? me = c.lastMessage : c.latestMessage && (me = c.latestMessage);
934
+ let Ie = 0;
935
+ c.unReadNum !== void 0 && c.unReadNum !== null ? Ie = c.unReadNum : c.unreadCount !== void 0 && c.unreadCount !== null ? Ie = c.unreadCount : c.unread !== void 0 && c.unread !== null && (Ie = c.unread);
936
936
  let Ge = c.lastTime;
937
937
  return !Ge && c.latestTime ? Ge = c.latestTime : !Ge && c.lastMsgTime && (Ge = c.lastMsgTime), {
938
938
  id: c.groupId,
@@ -941,42 +941,42 @@ function fa(y) {
941
941
  remark: c.remark,
942
942
  owner: c.ownerUsername,
943
943
  avatar: `https://api.dicebear.com/7.x/avataaars/svg?seed=${c.groupId}`,
944
- memberAvatars: ne,
945
- lastMsg: ve,
944
+ memberAvatars: ae,
945
+ lastMsg: me,
946
946
  lastTime: Ge,
947
- unread: ze,
947
+ unread: Ie,
948
948
  memberCount: c.memberCount || 0,
949
949
  // 保留原始字段用于编辑功能
950
950
  notice: c.notice,
951
951
  groupNickname: c.groupNickname
952
952
  };
953
953
  });
954
- }), ee = ke(() => U.value.map((u) => {
955
- const c = u.type === "file" || u.fileUrl || u.fileName, L = u.fileName || u.msgContent, ne = $.value.find((Ge) => Ge.username === u.sendUsername), ve = (ne == null ? void 0 : ne.memberNick) || u.sendUsername, ze = ne != null && ne.avatar ? `${b.api.baseUrl}${ne.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${u.sendUsername}`;
954
+ }), Z = be(() => U.value.map((u) => {
955
+ const c = u.type === "file" || u.fileUrl || u.fileName, R = u.fileName || u.msgContent, ae = $.value.find((Ge) => Ge.username === u.sendUsername), me = (ae == null ? void 0 : ae.memberNick) || u.sendUsername, Ie = ae != null && ae.avatar ? `${y.api.baseUrl}${ae.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${u.sendUsername}`;
956
956
  return {
957
957
  text: u.msgContent,
958
958
  isSelf: u.sendUsername === a,
959
959
  time: u.createTime,
960
960
  sendUsername: u.sendUsername,
961
- displayName: ve,
961
+ displayName: me,
962
962
  // 添加显示名称字段
963
- avatar: ze,
963
+ avatar: Ie,
964
964
  type: c ? "file" : "text",
965
- fileType: y.isImageFile(L) ? "image" : y.getFileIconType(L),
965
+ fileType: g.isImageFile(R) ? "image" : g.getFileIconType(R),
966
966
  fileUrl: u.fileUrl || "",
967
- fileName: L,
967
+ fileName: R,
968
968
  fileSize: u.fileSize || 0
969
969
  };
970
- })), T = async () => {
970
+ })), F = async () => {
971
971
  try {
972
972
  const u = await t.getMyGroups(a);
973
973
  S.value = u.data || [];
974
974
  for (const c of S.value)
975
975
  try {
976
- const L = await t.getGroupMembers(c.groupId, a);
977
- B.value[c.groupId] = L.data || [];
978
- } catch (L) {
979
- console.error(`[VueChatKit] 获取群 ${c.groupId} 成员失败`, L), B.value[c.groupId] = [];
976
+ const R = await t.getGroupMembers(c.groupId, a);
977
+ j.value[c.groupId] = R.data || [];
978
+ } catch (R) {
979
+ console.error(`[VueChatKit] 获取群 ${c.groupId} 成员失败`, R), j.value[c.groupId] = [];
980
980
  }
981
981
  } catch (u) {
982
982
  console.error("[VueChatKit] 获取群聊列表失败", u);
@@ -996,24 +996,24 @@ function fa(y) {
996
996
  console.error("[VueChatKit] 获取群成员失败", c);
997
997
  }
998
998
  }, W = async (u) => {
999
- await Be(u.groupId), await T(), f.value = u, await K(u.groupId), await I(u.groupId), E();
1000
- }, se = async (u) => {
999
+ await qe(u.groupId), await F(), h.value = u, await K(u.groupId), await I(u.groupId), E();
1000
+ }, te = async (u) => {
1001
1001
  try {
1002
1002
  return (await t.getGroupUnreadCount(u, a)).data || 0;
1003
1003
  } catch (c) {
1004
1004
  return console.error("[VueChatKit] 获取群未读数失败", c), 0;
1005
1005
  }
1006
- }, ae = async (u, c) => {
1006
+ }, se = async (u, c) => {
1007
1007
  try {
1008
- const L = await t.getMsgReadUserList(u, c, a);
1009
- C.value = L.data || { readUserList: [], unreadUserList: [] }, Q.value = !0;
1010
- } catch (L) {
1011
- console.error("[VueChatKit] 获取消息已读成员失败", L);
1008
+ const R = await t.getMsgReadUserList(u, c, a);
1009
+ C.value = R.data || { readUserList: [], unreadUserList: [] }, B.value = !0;
1010
+ } catch (R) {
1011
+ console.error("[VueChatKit] 获取消息已读成员失败", R);
1012
1012
  }
1013
- }, P = async (u) => {
1013
+ }, q = async (u) => {
1014
1014
  try {
1015
1015
  const c = await t.getGroupInfo(u, a);
1016
- c.code === 200 && c.data && (ye.value = c.data, w.value = {
1016
+ c.code === 200 && c.data && (ge.value = c.data, w.value = {
1017
1017
  groupNickname: c.data.groupNickname || c.data.groupName || "",
1018
1018
  remark: c.data.remark || "",
1019
1019
  notice: c.data.notice || ""
@@ -1022,14 +1022,14 @@ function fa(y) {
1022
1022
  console.error("[VueChatKit] 获取群详情失败", c);
1023
1023
  }
1024
1024
  }, d = async (u) => {
1025
- if (!f.value || !ye.value) return !1;
1025
+ if (!h.value || !ge.value) return !1;
1026
1026
  try {
1027
1027
  const c = {
1028
- groupId: f.value.groupId,
1028
+ groupId: h.value.groupId,
1029
1029
  currentUser: a,
1030
- groupNickname: u === "groupNickname" ? w.value.groupNickname : ye.value.groupNickname,
1031
- remark: u === "remark" ? w.value.remark : ye.value.remark,
1032
- notice: u === "notice" ? w.value.notice : ye.value.notice
1030
+ groupNickname: u === "groupNickname" ? w.value.groupNickname : ge.value.groupNickname,
1031
+ remark: u === "remark" ? w.value.remark : ge.value.remark,
1032
+ notice: u === "notice" ? w.value.notice : ge.value.notice
1033
1033
  };
1034
1034
  return (await t._updateGroupInfo(
1035
1035
  c.groupId,
@@ -1037,259 +1037,259 @@ function fa(y) {
1037
1037
  c.groupNickname,
1038
1038
  c.remark,
1039
1039
  c.notice
1040
- )).code === 200 ? (await P(f.value.groupId), await T(), !0) : !1;
1040
+ )).code === 200 ? (await q(h.value.groupId), await F(), !0) : !1;
1041
1041
  } catch (c) {
1042
1042
  return console.error("[VueChatKit] 修改群信息失败", c), !1;
1043
1043
  }
1044
- }, h = (u) => {
1045
- !ye.value && f.value && P(f.value.groupId), ue.value[u] = !0;
1046
- }, M = (u) => {
1047
- ue.value[u] = !1, ye.value && (w.value[u] = ye.value[u] || "");
1048
- }, F = async (u) => {
1044
+ }, f = (u) => {
1045
+ !ge.value && h.value && q(h.value.groupId), ie.value[u] = !0;
1046
+ }, G = (u) => {
1047
+ ie.value[u] = !1, ge.value && (w.value[u] = ge.value[u] || "");
1048
+ }, A = async (u) => {
1049
1049
  const c = await d(u);
1050
- return c && (ue.value[u] = !1), c;
1051
- }, Y = async () => {
1052
- if (!f.value) return !1;
1050
+ return c && (ie.value[u] = !1), c;
1051
+ }, H = async () => {
1052
+ if (!h.value) return !1;
1053
1053
  try {
1054
1054
  return (await t.updateGroupInfo(
1055
- f.value.groupId,
1055
+ h.value.groupId,
1056
1056
  a,
1057
- ie.value.groupNickname,
1058
- ie.value.remark,
1059
- ie.value.notice
1060
- )).code === 200 ? (ge.value = !1, await T(), f.value && await P(f.value.groupId), !0) : !1;
1057
+ le.value.groupNickname,
1058
+ le.value.remark,
1059
+ le.value.notice
1060
+ )).code === 200 ? (fe.value = !1, await F(), h.value && await q(h.value.groupId), !0) : !1;
1061
1061
  } catch (u) {
1062
1062
  return console.error("[VueChatKit] 修改群信息失败", u), !1;
1063
1063
  }
1064
- }, q = async () => {
1065
- if (!f.value) return !1;
1064
+ }, Y = async () => {
1065
+ if (!h.value) return !1;
1066
1066
  try {
1067
1067
  return (await t.updateMemberNick(
1068
- f.value.groupId,
1068
+ h.value.groupId,
1069
1069
  a,
1070
- re.value.targetUsername,
1071
- re.value.memberNick
1072
- )).code === 200 ? (z.value = !1, await I(f.value.groupId), !0) : !1;
1070
+ ne.value.targetUsername,
1071
+ ne.value.memberNick
1072
+ )).code === 200 ? (z.value = !1, await I(h.value.groupId), !0) : !1;
1073
1073
  } catch (u) {
1074
1074
  return console.error("[VueChatKit] 修改群成员昵称失败", u), !1;
1075
1075
  }
1076
- }, oe = async () => {
1077
- if (!f.value) return !1;
1076
+ }, re = async () => {
1077
+ if (!h.value) return !1;
1078
1078
  try {
1079
- return (await t.deleteGroup(f.value.groupId, a)).code === 200 ? (f.value = null, U.value = [], pe.value = !1, await T(), !0) : !1;
1079
+ return (await t.deleteGroup(h.value.groupId, a)).code === 200 ? (h.value = null, U.value = [], de.value = !1, await F(), !0) : !1;
1080
1080
  } catch (u) {
1081
1081
  return console.error("[VueChatKit] 解散群聊失败", u), !1;
1082
1082
  }
1083
- }, be = async (u) => {
1084
- if (!f.value) return !1;
1083
+ }, ye = async (u) => {
1084
+ if (!h.value) return !1;
1085
1085
  try {
1086
1086
  return (await t.removeGroupMember(
1087
- f.value.groupId,
1087
+ h.value.groupId,
1088
1088
  a,
1089
1089
  u
1090
- )).code === 200 ? (await I(f.value.groupId), !0) : !1;
1090
+ )).code === 200 ? (await I(h.value.groupId), !0) : !1;
1091
1091
  } catch (c) {
1092
1092
  return console.error("[VueChatKit] 移除成员失败", c), !1;
1093
1093
  }
1094
- }, xe = async (u) => {
1095
- if (!f.value) return !1;
1094
+ }, Ce = async (u) => {
1095
+ if (!h.value) return !1;
1096
1096
  try {
1097
1097
  return (await t.transferGroupOwner(
1098
- f.value.groupId,
1098
+ h.value.groupId,
1099
1099
  a,
1100
1100
  u
1101
- )).code === 200 ? (await I(f.value.groupId), !0) : !1;
1101
+ )).code === 200 ? (await I(h.value.groupId), !0) : !1;
1102
1102
  } catch (c) {
1103
1103
  return console.error("[VueChatKit] 转让群主失败", c), !1;
1104
1104
  }
1105
1105
  }, Fe = async (u) => {
1106
- if (!f.value) return !1;
1106
+ if (!h.value) return !1;
1107
1107
  try {
1108
1108
  return (await t.readSingleGroupMsg(
1109
- f.value.groupId,
1109
+ h.value.groupId,
1110
1110
  a,
1111
1111
  u
1112
1112
  )).code === 200;
1113
1113
  } catch (c) {
1114
1114
  return console.error("[VueChatKit] 标记消息已读失败", c), !1;
1115
1115
  }
1116
- }, Be = async (u) => {
1117
- var L;
1118
- const c = u || ((L = f.value) == null ? void 0 : L.groupId);
1116
+ }, qe = async (u) => {
1117
+ var R;
1118
+ const c = u || ((R = h.value) == null ? void 0 : R.groupId);
1119
1119
  if (!c) return !1;
1120
1120
  try {
1121
1121
  return (await t.readAllGroupMsg(c, a)).code === 200;
1122
- } catch (ne) {
1123
- return console.error("[VueChatKit] 标记全部已读失败", ne), !1;
1122
+ } catch (ae) {
1123
+ return console.error("[VueChatKit] 标记全部已读失败", ae), !1;
1124
1124
  }
1125
- }, Pe = () => {
1126
- f.value && (ie.value = {
1127
- groupNickname: f.value.name || "",
1128
- remark: f.value.remark || "",
1129
- notice: f.value.notice || ""
1130
- }, ge.value = !0);
1131
- }, Ct = (u) => {
1132
- re.value = {
1125
+ }, Oe = () => {
1126
+ h.value && (le.value = {
1127
+ groupNickname: h.value.name || "",
1128
+ remark: h.value.remark || "",
1129
+ notice: h.value.notice || ""
1130
+ }, fe.value = !0);
1131
+ }, wt = (u) => {
1132
+ ne.value = {
1133
1133
  targetUsername: u.username,
1134
1134
  memberNick: u.memberNick || ""
1135
1135
  }, z.value = !0;
1136
- }, ot = async () => {
1137
- if (!we.value.trim())
1136
+ }, rt = async () => {
1137
+ if (!_e.value.trim())
1138
1138
  return console.warn("[VueChatKit] 请输入群名称"), !1;
1139
1139
  try {
1140
1140
  const u = await t.createGroup({
1141
- groupName: we.value.trim(),
1141
+ groupName: _e.value.trim(),
1142
1142
  remark: D.value.trim(),
1143
1143
  ownerUsername: a
1144
1144
  });
1145
1145
  if (u.code === 200 && u.data) {
1146
1146
  if (_.value.length > 0) {
1147
- const c = _.value.map((L) => L.id);
1147
+ const c = _.value.map((R) => R.id);
1148
1148
  await t.inviteGroupMembers(
1149
1149
  u.data.groupId || u.data,
1150
1150
  a,
1151
1151
  c
1152
1152
  );
1153
1153
  }
1154
- return we.value = "", D.value = "", _.value = [], x.value = !1, await T(), !0;
1154
+ return _e.value = "", D.value = "", _.value = [], x.value = !1, await F(), !0;
1155
1155
  }
1156
1156
  return !1;
1157
1157
  } catch (u) {
1158
1158
  return console.error("[VueChatKit] 创建群聊失败", u), !1;
1159
1159
  }
1160
- }, xt = async () => {
1161
- if (!f.value || me.value.length === 0)
1160
+ }, Ct = async () => {
1161
+ if (!h.value || pe.value.length === 0)
1162
1162
  return !1;
1163
1163
  try {
1164
- const u = me.value.map((c) => c.id);
1164
+ const u = pe.value.map((c) => c.id);
1165
1165
  return await t.inviteGroupMembers(
1166
- f.value.groupId,
1166
+ h.value.groupId,
1167
1167
  a,
1168
1168
  u
1169
- ), me.value = [], he.value = !1, await I(f.value.groupId), !0;
1169
+ ), pe.value = [], he.value = !1, await I(h.value.groupId), !0;
1170
1170
  } catch (u) {
1171
1171
  return console.error("[VueChatKit] 邀请成员失败", u), !1;
1172
1172
  }
1173
- }, Oe = async () => {
1174
- if (!f.value) return !1;
1173
+ }, Pe = async () => {
1174
+ if (!h.value) return !1;
1175
1175
  try {
1176
- return await t.quitGroup(f.value.groupId, a), f.value = null, U.value = [], pe.value = !1, await T(), !0;
1176
+ return await t.quitGroup(h.value.groupId, a), h.value = null, U.value = [], de.value = !1, await F(), !0;
1177
1177
  } catch (u) {
1178
1178
  return console.error("[VueChatKit] 退出群聊失败", u), !1;
1179
1179
  }
1180
- }, lt = () => {
1180
+ }, ot = () => {
1181
1181
  const u = N();
1182
- if (!y.inputText.value.trim() || !f.value || !u) return;
1183
- if (u.send(f.value.groupId, y.inputText.value.trim(), "text", "", "", 0, !0)) {
1184
- const L = {
1185
- msgContent: y.inputText.value.trim(),
1182
+ if (!g.inputText.value.trim() || !h.value || !u) return;
1183
+ if (u.send(h.value.groupId, g.inputText.value.trim(), "text", "", "", 0, !0)) {
1184
+ const R = {
1185
+ msgContent: g.inputText.value.trim(),
1186
1186
  sendUsername: a,
1187
- toGroupId: f.value.groupId,
1187
+ toGroupId: h.value.groupId,
1188
1188
  createTime: /* @__PURE__ */ new Date(),
1189
1189
  isRead: 0,
1190
1190
  type: "text"
1191
1191
  };
1192
- U.value.push(L), y.inputText.value = "", E(), setTimeout(() => {
1193
- K(f.value.groupId), T();
1192
+ U.value.push(R), g.inputText.value = "", E(), setTimeout(() => {
1193
+ K(h.value.groupId), F();
1194
1194
  }, 300);
1195
1195
  }
1196
- }, it = async (u) => {
1196
+ }, lt = async (u) => {
1197
1197
  const c = N();
1198
- if (!f.value || !c) return !1;
1198
+ if (!h.value || !c) return !1;
1199
1199
  try {
1200
- const L = await t.uploadFile(u);
1201
- if (L.code === 200 && L.data) {
1202
- const { fileUrl: ne, fileName: ve } = L.data;
1200
+ const R = await t.uploadFile(u);
1201
+ if (R.code === 200 && R.data) {
1202
+ const { fileUrl: ae, fileName: me } = R.data;
1203
1203
  if (c.send(
1204
- f.value.groupId,
1205
- ve,
1204
+ h.value.groupId,
1205
+ me,
1206
1206
  "file",
1207
- ne,
1208
- ve,
1207
+ ae,
1208
+ me,
1209
1209
  u.size,
1210
1210
  !0
1211
1211
  )) {
1212
1212
  const Ge = {
1213
- msgContent: ve,
1213
+ msgContent: me,
1214
1214
  sendUsername: a,
1215
- toGroupId: f.value.groupId,
1215
+ toGroupId: h.value.groupId,
1216
1216
  createTime: /* @__PURE__ */ new Date(),
1217
1217
  isRead: 0,
1218
1218
  type: "file",
1219
- fileUrl: ne,
1220
- fileName: ve,
1219
+ fileUrl: ae,
1220
+ fileName: me,
1221
1221
  fileSize: u.size
1222
1222
  };
1223
1223
  return U.value.push(Ge), E(), !0;
1224
1224
  }
1225
1225
  }
1226
1226
  return !1;
1227
- } catch (L) {
1228
- return console.error("[VueChatKit] 发送群聊文件失败", L), !1;
1227
+ } catch (R) {
1228
+ return console.error("[VueChatKit] 发送群聊文件失败", R), !1;
1229
1229
  }
1230
1230
  };
1231
1231
  return {
1232
1232
  // 状态
1233
- activeTab: te,
1233
+ activeTab: ee,
1234
1234
  groupList: S,
1235
- currentSelectGroup: f,
1235
+ currentSelectGroup: h,
1236
1236
  groupMsgList: U,
1237
1237
  groupMemberList: $,
1238
- groupMembersMap: B,
1238
+ groupMembersMap: j,
1239
1239
  createGroupDialogVisible: x,
1240
- groupDetailVisible: pe,
1241
- newGroupName: we,
1240
+ groupDetailVisible: de,
1241
+ newGroupName: _e,
1242
1242
  newGroupRemark: D,
1243
1243
  selectedMembersForCreate: _,
1244
1244
  inviteMemberDialogVisible: he,
1245
- selectedMembersForInvite: me,
1246
- groupInfoVisible: ge,
1247
- editingGroupInfo: ie,
1248
- editingMemberNick: re,
1245
+ selectedMembersForInvite: pe,
1246
+ groupInfoVisible: fe,
1247
+ editingGroupInfo: le,
1248
+ editingMemberNick: ne,
1249
1249
  memberNickDialogVisible: z,
1250
- msgReadUserDialogVisible: Q,
1250
+ msgReadUserDialogVisible: B,
1251
1251
  currentMsgReadList: C,
1252
- currentGroupInfo: ye,
1253
- editingFields: ue,
1252
+ currentGroupInfo: ge,
1253
+ editingFields: ie,
1254
1254
  tempEditValues: w,
1255
1255
  // 计算属性
1256
1256
  filteredGroupList: V,
1257
- currentGroupMessages: ee,
1257
+ currentGroupMessages: Z,
1258
1258
  // 方法
1259
- getGroupList: T,
1259
+ getGroupList: F,
1260
1260
  getGroupHistory: K,
1261
1261
  getGroupMembers: I,
1262
1262
  selectGroup: W,
1263
- createGroup: ot,
1264
- inviteGroupMember: xt,
1265
- quitGroup: Oe,
1266
- sendGroupMessage: lt,
1267
- sendGroupFile: it,
1263
+ createGroup: rt,
1264
+ inviteGroupMember: Ct,
1265
+ quitGroup: Pe,
1266
+ sendGroupMessage: ot,
1267
+ sendGroupFile: lt,
1268
1268
  sendGroupFilesAndText: async (u, c) => {
1269
- const L = N();
1270
- if (!(!f.value || !L)) {
1271
- if (c && c.trim() && L.send(f.value.groupId, c.trim(), "text", "", "", 0, !0)) {
1272
- const ve = {
1269
+ const R = N();
1270
+ if (!(!h.value || !R)) {
1271
+ if (c && c.trim() && R.send(h.value.groupId, c.trim(), "text", "", "", 0, !0)) {
1272
+ const me = {
1273
1273
  msgContent: c.trim(),
1274
1274
  sendUsername: a,
1275
- toGroupId: f.value.groupId,
1275
+ toGroupId: h.value.groupId,
1276
1276
  createTime: /* @__PURE__ */ new Date(),
1277
1277
  isRead: 0,
1278
1278
  type: "text"
1279
1279
  };
1280
- U.value.push(ve);
1280
+ U.value.push(me);
1281
1281
  }
1282
- for (const ne of u) {
1283
- const ve = ne.file || ne;
1284
- await it(ve);
1282
+ for (const ae of u) {
1283
+ const me = ae.file || ae;
1284
+ await lt(me);
1285
1285
  }
1286
1286
  setTimeout(() => {
1287
- K(f.value.groupId), T();
1287
+ K(h.value.groupId), F();
1288
1288
  }, 300);
1289
1289
  }
1290
1290
  },
1291
1291
  handleGroupWsMessage: (u) => {
1292
- if (f.value && f.value.groupId === u.toGroupId) {
1292
+ if (h.value && h.value.groupId === u.toGroupId) {
1293
1293
  try {
1294
1294
  let c = {
1295
1295
  msgContent: u.content,
@@ -1308,44 +1308,44 @@ function fa(y) {
1308
1308
  }
1309
1309
  K(u.toGroupId);
1310
1310
  }
1311
- T();
1311
+ F();
1312
1312
  },
1313
1313
  switchTab: (u) => {
1314
- te.value = u, u === "groups" && T();
1314
+ ee.value = u, u === "groups" && F();
1315
1315
  },
1316
1316
  resetGroupChat: () => {
1317
- f.value = null, U.value = [];
1317
+ h.value = null, U.value = [];
1318
1318
  },
1319
- getGroupUnreadCount: se,
1320
- getMsgReadUserList: ae,
1321
- updateGroupInfo: Y,
1322
- updateMemberNick: q,
1323
- deleteGroup: oe,
1324
- removeGroupMember: be,
1325
- transferGroupOwner: xe,
1319
+ getGroupUnreadCount: te,
1320
+ getMsgReadUserList: se,
1321
+ updateGroupInfo: H,
1322
+ updateMemberNick: Y,
1323
+ deleteGroup: re,
1324
+ removeGroupMember: ye,
1325
+ transferGroupOwner: Ce,
1326
1326
  readSingleGroupMsg: Fe,
1327
- readAllGroupMsg: Be,
1328
- openEditGroupInfo: Pe,
1329
- openEditMemberNick: Ct,
1330
- fetchGroupDetail: P,
1327
+ readAllGroupMsg: qe,
1328
+ openEditGroupInfo: Oe,
1329
+ openEditMemberNick: wt,
1330
+ fetchGroupDetail: q,
1331
1331
  updateSingleGroupField: d,
1332
- startEditField: h,
1333
- cancelEditField: M,
1334
- saveEditField: F
1332
+ startEditField: f,
1333
+ cancelEditField: G,
1334
+ saveEditField: A
1335
1335
  };
1336
1336
  }
1337
- function ha(y, t) {
1338
- const a = ma(y), o = va(a), b = fa(a), E = ke(() => b.currentSelectGroup.value ? { type: "group", data: b.currentSelectGroup.value } : o.currentSelectName.value && o.currentUser.value ? { type: "friend", data: o.currentUser.value } : null), N = ke(() => b.currentSelectGroup.value ? b.currentGroupMessages.value : o.currentMessages.value), te = (D) => {
1337
+ function ha(g, t) {
1338
+ const a = pa(g), o = ma(a), y = va(a), E = be(() => y.currentSelectGroup.value ? { type: "group", data: y.currentSelectGroup.value } : o.currentSelectName.value && o.currentUser.value ? { type: "friend", data: o.currentUser.value } : null), N = be(() => y.currentSelectGroup.value ? y.currentGroupMessages.value : o.currentMessages.value), ee = (D) => {
1339
1339
  if (D.includes("【状态变更】")) {
1340
- const he = /【状态变更】(.+?) 已(上线|下线)/, me = D.match(he);
1341
- if (me) {
1342
- const ge = me[1], ie = me[2] === "上线";
1343
- o.handleFriendStatusChange(ge, ie);
1340
+ const he = /【状态变更】(.+?) 已(上线|下线)/, pe = D.match(he);
1341
+ if (pe) {
1342
+ const fe = pe[1], le = pe[2] === "上线";
1343
+ o.handleFriendStatusChange(fe, le);
1344
1344
  }
1345
1345
  return;
1346
1346
  }
1347
1347
  const _ = a.parseWsMessage(D);
1348
- _ && (_.toGroupId ? b.handleGroupWsMessage(_) : o.handleFriendWsMessage(_), t && typeof t == "function" && t({
1348
+ _ && (_.toGroupId ? y.handleGroupWsMessage(_) : o.handleFriendWsMessage(_), t && typeof t == "function" && t({
1349
1349
  ..._,
1350
1350
  isGroup: !!_.toGroupId
1351
1351
  }));
@@ -1354,46 +1354,46 @@ function ha(y, t) {
1354
1354
  // ========== 核心模块 ==========
1355
1355
  ...a,
1356
1356
  initWebSocket: () => {
1357
- a.initWebSocket(te);
1357
+ a.initWebSocket(ee);
1358
1358
  },
1359
1359
  // ========== 私聊模块 ==========
1360
1360
  ...o,
1361
1361
  selectUser: async (D) => {
1362
- b.resetGroupChat(), await o.selectUser(D);
1362
+ y.resetGroupChat(), await o.selectUser(D);
1363
1363
  },
1364
1364
  // ========== 群聊模块 ==========
1365
- ...b,
1365
+ ...y,
1366
1366
  selectGroup: async (D) => {
1367
- o.resetFriendChat(), await b.selectGroup(D);
1367
+ o.resetFriendChat(), await y.selectGroup(D);
1368
1368
  },
1369
1369
  // ========== 共享计算属性 ==========
1370
1370
  currentChatTarget: E,
1371
1371
  currentAllMessages: N,
1372
1372
  // ========== 整合方法 ==========
1373
1373
  switchTab: (D) => {
1374
- b.switchTab(D), D === "apply" && o.loadFriendApplyList();
1374
+ y.switchTab(D), D === "apply" && o.loadFriendApplyList();
1375
1375
  },
1376
1376
  sendMessage: () => {
1377
- b.currentSelectGroup.value ? b.sendGroupMessage() : o.currentSelectName.value && o.sendMessage();
1377
+ y.currentSelectGroup.value ? y.sendGroupMessage() : o.currentSelectName.value && o.sendMessage();
1378
1378
  },
1379
- sendFile: async (D) => b.currentSelectGroup.value ? await b.sendGroupFile(D) : o.currentSelectName.value ? await o.sendFile(D) : !1,
1379
+ sendFile: async (D) => y.currentSelectGroup.value ? await y.sendGroupFile(D) : o.currentSelectName.value ? await o.sendFile(D) : !1,
1380
1380
  sendFilesAndText: async (D, _) => {
1381
- b.currentSelectGroup.value ? await b.sendGroupFilesAndText(D, _) : o.currentSelectName.value && await o.sendFilesAndText(D, _);
1381
+ y.currentSelectGroup.value ? await y.sendGroupFilesAndText(D, _) : o.currentSelectName.value && await o.sendFilesAndText(D, _);
1382
1382
  },
1383
1383
  reset: () => {
1384
- o.resetFriendChat(), b.resetGroupChat(), a.inputText.value = "", a.searchText.value = "";
1384
+ o.resetFriendChat(), y.resetGroupChat(), a.inputText.value = "", a.searchText.value = "";
1385
1385
  }
1386
1386
  };
1387
1387
  }
1388
- const wt = (y, t) => {
1389
- const a = y.__vccOpts || y;
1390
- for (const [o, b] of t)
1391
- a[o] = b;
1388
+ const _t = (g, t) => {
1389
+ const a = g.__vccOpts || g;
1390
+ for (const [o, y] of t)
1391
+ a[o] = y;
1392
1392
  return a;
1393
- }, ga = { class: "avatar-crop-container" }, ya = {
1393
+ }, fa = { class: "avatar-crop-container" }, ga = {
1394
1394
  key: 0,
1395
1395
  class: "crop-wrapper"
1396
- }, ba = ["src"], ka = ["onMousedown", "onTouchstart"], _a = { class: "preview-wrapper" }, wa = ["width", "height"], Ca = { class: "dialog-footer" }, xa = {
1396
+ }, ya = ["src"], ba = ["onMousedown", "onTouchstart"], ka = { class: "preview-wrapper" }, _a = ["width", "height"], wa = { class: "dialog-footer" }, Ca = {
1397
1397
  __name: "AvatarCrop",
1398
1398
  props: {
1399
1399
  modelValue: Boolean,
@@ -1409,15 +1409,15 @@ const wt = (y, t) => {
1409
1409
  minSize: { type: Number, default: 50 }
1410
1410
  },
1411
1411
  emits: ["update:modelValue", "confirm", "cancel", "closed"],
1412
- setup(y, { expose: t, emit: a }) {
1413
- const o = y, b = a, E = ke({
1412
+ setup(g, { expose: t, emit: a }) {
1413
+ const o = g, y = a, E = be({
1414
1414
  get: () => o.modelValue,
1415
- set: (w) => b("update:modelValue", w)
1416
- }), N = ke({
1415
+ set: (w) => y("update:modelValue", w)
1416
+ }), N = be({
1417
1417
  get: () => o.src,
1418
1418
  set: (w) => {
1419
1419
  }
1420
- }), te = ["nw", "n", "ne", "e", "se", "s", "sw", "w"], S = k(!1), f = k(null), U = k(null), $ = k(null), B = k({
1420
+ }), ee = ["nw", "n", "ne", "e", "se", "s", "sw", "w"], S = k(!1), h = k(null), U = k(null), $ = k(null), j = k({
1421
1421
  naturalWidth: 0,
1422
1422
  naturalHeight: 0,
1423
1423
  displayWidth: 0,
@@ -1429,13 +1429,13 @@ const wt = (y, t) => {
1429
1429
  y: 0,
1430
1430
  size: 150,
1431
1431
  minSize: o.minSize
1432
- }), pe = ke(() => ({
1433
- width: `${B.value.displayWidth}px`,
1434
- height: `${B.value.displayHeight}px`,
1432
+ }), de = be(() => ({
1433
+ width: `${j.value.displayWidth}px`,
1434
+ height: `${j.value.displayHeight}px`,
1435
1435
  maxWidth: "none",
1436
1436
  maxHeight: "none",
1437
1437
  display: "block"
1438
- })), we = ke(() => ({
1438
+ })), _e = be(() => ({
1439
1439
  left: `${x.value.x}px`,
1440
1440
  top: `${x.value.y}px`,
1441
1441
  width: `${x.value.size}px`,
@@ -1443,97 +1443,97 @@ const wt = (y, t) => {
1443
1443
  }));
1444
1444
  let D = null, _ = null;
1445
1445
  const he = () => {
1446
- rt(() => {
1447
- const w = U.value, V = f.value;
1446
+ nt(() => {
1447
+ const w = U.value, V = h.value;
1448
1448
  if (!w || !V) return;
1449
- const ee = V.clientWidth, T = V.clientHeight, K = w.naturalWidth / w.naturalHeight, I = ee / T;
1450
- let W, se, ae, P;
1451
- K > I ? (W = ee, se = ee / K, ae = 0, P = (T - se) / 2) : (se = T, W = T * K, ae = (ee - W) / 2, P = 0), B.value = {
1449
+ const Z = V.clientWidth, F = V.clientHeight, K = w.naturalWidth / w.naturalHeight, I = Z / F;
1450
+ let W, te, se, q;
1451
+ K > I ? (W = Z, te = Z / K, se = 0, q = (F - te) / 2) : (te = F, W = F * K, se = (Z - W) / 2, q = 0), j.value = {
1452
1452
  naturalWidth: w.naturalWidth,
1453
1453
  naturalHeight: w.naturalHeight,
1454
1454
  displayWidth: W,
1455
- displayHeight: se,
1456
- offsetX: ae,
1457
- offsetY: P
1455
+ displayHeight: te,
1456
+ offsetX: se,
1457
+ offsetY: q
1458
1458
  };
1459
- const d = Math.min(W, se) * 0.6;
1460
- x.value.size = d, x.value.x = ae + (W - d) / 2, x.value.y = P + (se - d / o.aspectRatio) / 2, me();
1459
+ const d = Math.min(W, te) * 0.6;
1460
+ x.value.size = d, x.value.x = se + (W - d) / 2, x.value.y = q + (te - d / o.aspectRatio) / 2, pe();
1461
1461
  });
1462
- }, me = () => {
1462
+ }, pe = () => {
1463
1463
  const w = $.value, V = U.value;
1464
1464
  if (!w || !V) return;
1465
- const ee = w.getContext("2d"), { naturalWidth: T, naturalHeight: K, displayWidth: I, displayHeight: W, offsetX: se, offsetY: ae } = B.value, P = T / I, d = K / W, h = (x.value.x - se) * P, M = (x.value.y - ae) * d, F = x.value.size * P, Y = x.value.size / o.aspectRatio * d;
1466
- ee.clearRect(0, 0, w.width, w.height), ee.drawImage(V, h, M, F, Y, 0, 0, w.width, w.height);
1467
- }, ge = (w) => {
1465
+ const Z = w.getContext("2d"), { naturalWidth: F, naturalHeight: K, displayWidth: I, displayHeight: W, offsetX: te, offsetY: se } = j.value, q = F / I, d = K / W, f = (x.value.x - te) * q, G = (x.value.y - se) * d, A = x.value.size * q, H = x.value.size / o.aspectRatio * d;
1466
+ Z.clearRect(0, 0, w.width, w.height), Z.drawImage(V, f, G, A, H, 0, 0, w.width, w.height);
1467
+ }, fe = (w) => {
1468
1468
  w.preventDefault();
1469
- const V = w.clientX || w.touches[0].clientX, ee = w.clientY || w.touches[0].clientY;
1469
+ const V = w.clientX || w.touches[0].clientX, Z = w.clientY || w.touches[0].clientY;
1470
1470
  D = {
1471
1471
  startX: V,
1472
- startY: ee,
1472
+ startY: Z,
1473
1473
  boxX: x.value.x,
1474
1474
  boxY: x.value.y
1475
1475
  };
1476
- const T = (I) => {
1477
- const W = I.clientX || I.touches[0].clientX, se = I.clientY || I.touches[0].clientY, ae = W - D.startX, P = se - D.startY, { offsetX: d, offsetY: h, displayWidth: M, displayHeight: F } = B.value, Y = x.value.size / o.aspectRatio, q = Math.max(d, Math.min(d + M - x.value.size, D.boxX + ae)), oe = Math.max(h, Math.min(h + F - Y, D.boxY + P));
1478
- x.value.x = q, x.value.y = oe, me();
1476
+ const F = (I) => {
1477
+ const W = I.clientX || I.touches[0].clientX, te = I.clientY || I.touches[0].clientY, se = W - D.startX, q = te - D.startY, { offsetX: d, offsetY: f, displayWidth: G, displayHeight: A } = j.value, H = x.value.size / o.aspectRatio, Y = Math.max(d, Math.min(d + G - x.value.size, D.boxX + se)), re = Math.max(f, Math.min(f + A - H, D.boxY + q));
1478
+ x.value.x = Y, x.value.y = re, pe();
1479
1479
  }, K = () => {
1480
- D = null, document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", K), document.removeEventListener("touchmove", T), document.removeEventListener("touchend", K);
1480
+ D = null, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", K), document.removeEventListener("touchmove", F), document.removeEventListener("touchend", K);
1481
1481
  };
1482
- document.addEventListener("mousemove", T), document.addEventListener("mouseup", K), document.addEventListener("touchmove", T, { passive: !1 }), document.addEventListener("touchend", K);
1483
- }, ie = (w, V) => {
1482
+ document.addEventListener("mousemove", F), document.addEventListener("mouseup", K), document.addEventListener("touchmove", F, { passive: !1 }), document.addEventListener("touchend", K);
1483
+ }, le = (w, V) => {
1484
1484
  V.preventDefault();
1485
- const ee = V.clientX || V.touches[0].clientX, T = V.clientY || V.touches[0].clientY;
1485
+ const Z = V.clientX || V.touches[0].clientX, F = V.clientY || V.touches[0].clientY;
1486
1486
  _ = {
1487
1487
  handle: w,
1488
- startX: ee,
1489
- startY: T,
1488
+ startX: Z,
1489
+ startY: F,
1490
1490
  boxX: x.value.x,
1491
1491
  boxY: x.value.y,
1492
1492
  boxSize: x.value.size
1493
1493
  };
1494
1494
  const K = (W) => {
1495
- const se = W.clientX || W.touches[0].clientX, ae = W.clientY || W.touches[0].clientY, P = se - _.startX, d = ae - _.startY, { offsetX: h, offsetY: M, displayWidth: F, displayHeight: Y } = B.value;
1496
- let q = _.boxSize, oe = _.boxX, be = _.boxY;
1497
- const xe = _.boxSize / o.aspectRatio;
1495
+ const te = W.clientX || W.touches[0].clientX, se = W.clientY || W.touches[0].clientY, q = te - _.startX, d = se - _.startY, { offsetX: f, offsetY: G, displayWidth: A, displayHeight: H } = j.value;
1496
+ let Y = _.boxSize, re = _.boxX, ye = _.boxY;
1497
+ const Ce = _.boxSize / o.aspectRatio;
1498
1498
  switch (w) {
1499
1499
  case "se":
1500
- q = Math.max(x.value.minSize, Math.min(F - (_.boxX - h), Y - (_.boxY - M), _.boxSize + Math.max(P, d)));
1500
+ Y = Math.max(x.value.minSize, Math.min(A - (_.boxX - f), H - (_.boxY - G), _.boxSize + Math.max(q, d)));
1501
1501
  break;
1502
1502
  case "nw":
1503
- q = Math.max(x.value.minSize, Math.min(_.boxX - h + _.boxSize, _.boxY - M + xe, _.boxSize - Math.max(P, d))), oe = _.boxX + (_.boxSize - q), be = _.boxY + (xe - q / o.aspectRatio);
1503
+ Y = Math.max(x.value.minSize, Math.min(_.boxX - f + _.boxSize, _.boxY - G + Ce, _.boxSize - Math.max(q, d))), re = _.boxX + (_.boxSize - Y), ye = _.boxY + (Ce - Y / o.aspectRatio);
1504
1504
  break;
1505
1505
  case "ne":
1506
- q = Math.max(x.value.minSize, Math.min(h + F - _.boxX, _.boxY - M + xe, _.boxSize + Math.max(P, -d))), be = _.boxY + (xe - q / o.aspectRatio);
1506
+ Y = Math.max(x.value.minSize, Math.min(f + A - _.boxX, _.boxY - G + Ce, _.boxSize + Math.max(q, -d))), ye = _.boxY + (Ce - Y / o.aspectRatio);
1507
1507
  break;
1508
1508
  case "sw":
1509
- q = Math.max(x.value.minSize, Math.min(_.boxX - h + _.boxSize, M + Y - _.boxY, _.boxSize + Math.max(-P, d))), oe = _.boxX + (_.boxSize - q);
1509
+ Y = Math.max(x.value.minSize, Math.min(_.boxX - f + _.boxSize, G + H - _.boxY, _.boxSize + Math.max(-q, d))), re = _.boxX + (_.boxSize - Y);
1510
1510
  break;
1511
1511
  case "n":
1512
- q = Math.max(x.value.minSize, Math.min(_.boxY - M + xe, _.boxSize - d)), be = _.boxY + (xe - q / o.aspectRatio);
1512
+ Y = Math.max(x.value.minSize, Math.min(_.boxY - G + Ce, _.boxSize - d)), ye = _.boxY + (Ce - Y / o.aspectRatio);
1513
1513
  break;
1514
1514
  case "s":
1515
- q = Math.max(x.value.minSize, Math.min(M + Y - _.boxY, _.boxSize + d));
1515
+ Y = Math.max(x.value.minSize, Math.min(G + H - _.boxY, _.boxSize + d));
1516
1516
  break;
1517
1517
  case "w":
1518
- q = Math.max(x.value.minSize, Math.min(_.boxX - h + _.boxSize, _.boxSize - P)), oe = _.boxX + (_.boxSize - q);
1518
+ Y = Math.max(x.value.minSize, Math.min(_.boxX - f + _.boxSize, _.boxSize - q)), re = _.boxX + (_.boxSize - Y);
1519
1519
  break;
1520
1520
  case "e":
1521
- q = Math.max(x.value.minSize, Math.min(h + F - _.boxX, _.boxSize + P));
1521
+ Y = Math.max(x.value.minSize, Math.min(f + A - _.boxX, _.boxSize + q));
1522
1522
  break;
1523
1523
  }
1524
- x.value.size = q, x.value.x = oe, x.value.y = be, me();
1524
+ x.value.size = Y, x.value.x = re, x.value.y = ye, pe();
1525
1525
  }, I = () => {
1526
1526
  _ = null, document.removeEventListener("mousemove", K), document.removeEventListener("mouseup", I), document.removeEventListener("touchmove", K), document.removeEventListener("touchend", I);
1527
1527
  };
1528
1528
  document.addEventListener("mousemove", K), document.addEventListener("mouseup", I), document.addEventListener("touchmove", K, { passive: !1 }), document.addEventListener("touchend", I);
1529
- }, re = () => {
1529
+ }, ne = () => {
1530
1530
  const w = document.createElement("canvas"), V = U.value;
1531
1531
  if (!V) return null;
1532
- const { naturalWidth: ee, naturalHeight: T, displayWidth: K, displayHeight: I, offsetX: W, offsetY: se } = B.value, ae = ee / K, P = T / I, d = (x.value.x - W) * ae, h = (x.value.y - se) * P, M = x.value.size * ae, F = x.value.size / o.aspectRatio * P;
1533
- return w.width = o.outputSize, w.height = o.outputSize / o.aspectRatio, w.getContext("2d").drawImage(V, d, h, M, F, 0, 0, w.width, w.height), new Promise((q) => {
1532
+ const { naturalWidth: Z, naturalHeight: F, displayWidth: K, displayHeight: I, offsetX: W, offsetY: te } = j.value, se = Z / K, q = F / I, d = (x.value.x - W) * se, f = (x.value.y - te) * q, G = x.value.size * se, A = x.value.size / o.aspectRatio * q;
1533
+ return w.width = o.outputSize, w.height = o.outputSize / o.aspectRatio, w.getContext("2d").drawImage(V, d, f, G, A, 0, 0, w.width, w.height), new Promise((Y) => {
1534
1534
  w.toBlob(
1535
- (oe) => {
1536
- q(new File([oe], "avatar.jpg", { type: o.outputType }));
1535
+ (re) => {
1536
+ Y(new File([re], "avatar.jpg", { type: o.outputType }));
1537
1537
  },
1538
1538
  o.outputType,
1539
1539
  o.outputQuality
@@ -1542,116 +1542,116 @@ const wt = (y, t) => {
1542
1542
  }, z = () => {
1543
1543
  const w = document.createElement("canvas"), V = U.value;
1544
1544
  if (!V) return null;
1545
- const { naturalWidth: ee, naturalHeight: T, displayWidth: K, displayHeight: I, offsetX: W, offsetY: se } = B.value, ae = ee / K, P = T / I, d = (x.value.x - W) * ae, h = (x.value.y - se) * P, M = x.value.size * ae, F = x.value.size / o.aspectRatio * P;
1546
- return w.width = o.outputSize, w.height = o.outputSize / o.aspectRatio, w.getContext("2d").drawImage(V, d, h, M, F, 0, 0, w.width, w.height), w.toDataURL(o.outputType, o.outputQuality);
1547
- }, Q = async () => {
1545
+ const { naturalWidth: Z, naturalHeight: F, displayWidth: K, displayHeight: I, offsetX: W, offsetY: te } = j.value, se = Z / K, q = F / I, d = (x.value.x - W) * se, f = (x.value.y - te) * q, G = x.value.size * se, A = x.value.size / o.aspectRatio * q;
1546
+ return w.width = o.outputSize, w.height = o.outputSize / o.aspectRatio, w.getContext("2d").drawImage(V, d, f, G, A, 0, 0, w.width, w.height), w.toDataURL(o.outputType, o.outputQuality);
1547
+ }, B = async () => {
1548
1548
  if (N.value) {
1549
1549
  S.value = !0;
1550
1550
  try {
1551
- const w = await re(), V = z();
1552
- w && b("confirm", { file: w, dataUrl: V });
1551
+ const w = await ne(), V = z();
1552
+ w && y("confirm", { file: w, dataUrl: V });
1553
1553
  } catch (w) {
1554
- console.error(w), X.error("生成图片失败");
1554
+ console.error(w), at.error("生成图片失败");
1555
1555
  } finally {
1556
1556
  S.value = !1;
1557
1557
  }
1558
1558
  }
1559
1559
  }, C = () => {
1560
- b("cancel"), E.value = !1;
1561
- }, ye = () => {
1562
- ue(), b("closed");
1563
- }, ue = () => {
1560
+ y("cancel"), E.value = !1;
1561
+ }, ge = () => {
1562
+ ie(), y("closed");
1563
+ }, ie = () => {
1564
1564
  x.value = { x: 0, y: 0, size: 150, minSize: o.minSize };
1565
1565
  };
1566
- return _t(
1566
+ return kt(
1567
1567
  () => o.src,
1568
1568
  (w) => {
1569
- w && rt(() => {
1569
+ w && nt(() => {
1570
1570
  U.value && U.value.complete && he();
1571
1571
  });
1572
1572
  }
1573
1573
  ), t({
1574
- getCroppedImage: re,
1574
+ getCroppedImage: ne,
1575
1575
  getCroppedImageDataUrl: z,
1576
- reset: ue
1576
+ reset: ie
1577
1577
  }), (w, V) => {
1578
- const ee = Me("el-empty"), T = Me("el-button"), K = Me("el-dialog");
1579
- return l(), Z(K, {
1578
+ const Z = Ue("el-empty"), F = Ue("el-button"), K = Ue("el-dialog");
1579
+ return l(), Q(K, {
1580
1580
  modelValue: E.value,
1581
1581
  "onUpdate:modelValue": V[0] || (V[0] = (I) => E.value = I),
1582
1582
  title: "调整头像",
1583
- width: y.dialogWidth,
1583
+ width: g.dialogWidth,
1584
1584
  "close-on-click-modal": !1,
1585
- "append-to-body": y.appendToBody,
1586
- onClosed: ye
1585
+ "append-to-body": g.appendToBody,
1586
+ onClosed: ge
1587
1587
  }, {
1588
1588
  footer: v(() => [
1589
- s("div", Ca, [
1590
- i(T, { onClick: C }, {
1589
+ s("div", wa, [
1590
+ i(F, { onClick: C }, {
1591
1591
  default: v(() => [...V[2] || (V[2] = [
1592
- A("取消", -1)
1592
+ T("取消", -1)
1593
1593
  ])]),
1594
1594
  _: 1
1595
1595
  }),
1596
- i(T, {
1596
+ i(F, {
1597
1597
  type: "primary",
1598
1598
  loading: S.value,
1599
1599
  disabled: !N.value,
1600
- onClick: Q
1600
+ onClick: B
1601
1601
  }, {
1602
1602
  default: v(() => [...V[3] || (V[3] = [
1603
- A(" 确认 ", -1)
1603
+ T(" 确认 ", -1)
1604
1604
  ])]),
1605
1605
  _: 1
1606
1606
  }, 8, ["loading", "disabled"])
1607
1607
  ])
1608
1608
  ]),
1609
1609
  default: v(() => [
1610
- s("div", ga, [
1611
- N.value ? (l(), m("div", ya, [
1610
+ s("div", fa, [
1611
+ N.value ? (l(), p("div", ga, [
1612
1612
  s("div", {
1613
1613
  ref_key: "cropAreaRef",
1614
- ref: f,
1614
+ ref: h,
1615
1615
  class: "crop-area",
1616
- style: Ee({ height: y.cropAreaHeight })
1616
+ style: Le({ height: g.cropAreaHeight })
1617
1617
  }, [
1618
1618
  s("img", {
1619
1619
  src: N.value,
1620
1620
  ref_key: "imageRef",
1621
1621
  ref: U,
1622
1622
  onLoad: he,
1623
- style: Ee(pe.value)
1624
- }, null, 44, ba),
1623
+ style: Le(de.value)
1624
+ }, null, 44, ya),
1625
1625
  s("div", {
1626
1626
  class: "crop-box",
1627
- style: Ee(we.value),
1628
- onMousedown: ge,
1629
- onTouchstart: ge
1627
+ style: Le(_e.value),
1628
+ onMousedown: fe,
1629
+ onTouchstart: fe
1630
1630
  }, [
1631
- (l(), m(ce, null, de(te, (I) => s("div", {
1631
+ (l(), p(ue, null, ce(ee, (I) => s("div", {
1632
1632
  key: I,
1633
- class: fe(["crop-handle", I]),
1634
- onMousedown: De((W) => ie(I, W), ["stop"]),
1635
- onTouchstart: De((W) => ie(I, W), ["stop"])
1636
- }, null, 42, ka)), 64))
1633
+ class: ve(["crop-handle", I]),
1634
+ onMousedown: Ee((W) => le(I, W), ["stop"]),
1635
+ onTouchstart: Ee((W) => le(I, W), ["stop"])
1636
+ }, null, 42, ba)), 64))
1637
1637
  ], 36)
1638
1638
  ], 4),
1639
- s("div", _a, [
1639
+ s("div", ka, [
1640
1640
  V[1] || (V[1] = s("div", { class: "preview-label" }, "预览", -1)),
1641
1641
  s("div", {
1642
1642
  class: "preview-box",
1643
- style: Ee({ width: y.previewSize + "px", height: y.previewSize + "px" })
1643
+ style: Le({ width: g.previewSize + "px", height: g.previewSize + "px" })
1644
1644
  }, [
1645
1645
  s("canvas", {
1646
1646
  ref_key: "previewCanvasRef",
1647
1647
  ref: $,
1648
- width: y.previewSize,
1649
- height: y.previewSize,
1648
+ width: g.previewSize,
1649
+ height: g.previewSize,
1650
1650
  class: "preview-canvas"
1651
- }, null, 8, wa)
1651
+ }, null, 8, _a)
1652
1652
  ], 4)
1653
1653
  ])
1654
- ])) : (l(), Z(ee, {
1654
+ ])) : (l(), Q(Z, {
1655
1655
  key: 1,
1656
1656
  description: "请上传图片"
1657
1657
  }))
@@ -1661,7 +1661,7 @@ const wt = (y, t) => {
1661
1661
  }, 8, ["modelValue", "width", "append-to-body"]);
1662
1662
  };
1663
1663
  }
1664
- }, Zt = /* @__PURE__ */ wt(xa, [["__scopeId", "data-v-594eeaf3"]]), Ua = { class: "emoji-header" }, Ma = ["onClick"], Ga = { class: "emoji-body" }, Sa = ["onClick"], Va = {
1664
+ }, Qt = /* @__PURE__ */ _t(Ca, [["__scopeId", "data-v-594eeaf3"]]), xa = { class: "emoji-header" }, Ua = ["onClick"], Ga = { class: "emoji-body" }, Ma = ["onClick"], Sa = {
1665
1665
  __name: "EmojiPicker",
1666
1666
  props: {
1667
1667
  visible: {
@@ -1670,8 +1670,8 @@ const wt = (y, t) => {
1670
1670
  }
1671
1671
  },
1672
1672
  emits: ["select", "close"],
1673
- setup(y, { emit: t }) {
1674
- const a = t, o = k(0), b = [
1673
+ setup(g, { emit: t }) {
1674
+ const a = t, o = k(0), y = [
1675
1675
  {
1676
1676
  id: "emoticons",
1677
1677
  icon: "😀",
@@ -2047,531 +2047,467 @@ const wt = (y, t) => {
2047
2047
  ], E = (N) => {
2048
2048
  a("select", N);
2049
2049
  };
2050
- return (N, te) => y.visible ? (l(), m("div", {
2050
+ return (N, ee) => g.visible ? (l(), p("div", {
2051
2051
  key: 0,
2052
2052
  class: "emoji-picker",
2053
- onClick: te[0] || (te[0] = De(() => {
2053
+ onClick: ee[0] || (ee[0] = Ee(() => {
2054
2054
  }, ["stop"]))
2055
2055
  }, [
2056
- s("div", Ua, [
2057
- (l(), m(ce, null, de(b, (S, f) => s("div", {
2056
+ s("div", xa, [
2057
+ (l(), p(ue, null, ce(y, (S, h) => s("div", {
2058
2058
  key: S.id,
2059
- class: fe(["emoji-category-tab", { active: o.value === f }]),
2060
- onClick: (U) => o.value = f
2061
- }, G(S.icon), 11, Ma)), 64))
2059
+ class: ve(["emoji-category-tab", { active: o.value === h }]),
2060
+ onClick: (U) => o.value = h
2061
+ }, M(S.icon), 11, Ua)), 64))
2062
2062
  ]),
2063
2063
  s("div", Ga, [
2064
- (l(!0), m(ce, null, de(b[o.value].emojis, (S) => (l(), m("div", {
2064
+ (l(!0), p(ue, null, ce(y[o.value].emojis, (S) => (l(), p("div", {
2065
2065
  key: S,
2066
2066
  class: "emoji-item",
2067
- onClick: (f) => E(S)
2068
- }, G(S), 9, Sa))), 128))
2067
+ onClick: (h) => E(S)
2068
+ }, M(S), 9, Ma))), 128))
2069
2069
  ])
2070
- ])) : R("", !0);
2070
+ ])) : L("", !0);
2071
2071
  }
2072
- }, Ia = /* @__PURE__ */ wt(Va, [["__scopeId", "data-v-6ca53096"]]), za = { class: "chat-panel" }, Ta = { class: "chat-sidebar" }, Fa = ["src"], Aa = ["onClick"], Na = {
2072
+ }, Va = /* @__PURE__ */ _t(Sa, [["__scopeId", "data-v-6ca53096"]]), Ia = { class: "chat-panel" }, za = { class: "chat-sidebar" }, Fa = ["src"], Aa = ["onClick"], Ta = {
2073
2073
  key: 0,
2074
2074
  class: "sidebar-nav-badge"
2075
- }, $a = { class: "chat-content-panel" }, La = { class: "chat-search-bar" }, Ra = { class: "chat-content-scroll" }, Ea = { key: 0 }, Da = ["onClick", "onContextmenu"], Ka = { class: "chat-list-avatar-wrapper" }, Wa = ["src", "alt"], Ha = {
2075
+ }, Na = { class: "chat-content-panel" }, $a = { class: "chat-search-bar" }, Ra = { class: "chat-content-scroll" }, La = { key: 0 }, Ea = ["onClick", "onContextmenu"], Da = { class: "chat-list-avatar-wrapper" }, Ka = ["src", "alt"], Wa = {
2076
2076
  key: 0,
2077
2077
  class: "chat-list-online-indicator"
2078
- }, Xa = { class: "chat-list-info" }, Ya = { class: "chat-list-header" }, ja = { class: "chat-list-name" }, qa = { class: "chat-list-time" }, Ba = { class: "chat-list-preview" }, Pa = { class: "chat-list-last-msg" }, Oa = {
2078
+ }, Ha = { class: "chat-list-info" }, Xa = { class: "chat-list-header" }, Ya = { class: "chat-list-name" }, ja = { class: "chat-list-time" }, qa = { class: "chat-list-preview" }, Oa = { class: "chat-list-last-msg" }, Pa = {
2079
2079
  key: 0,
2080
2080
  class: "chat-list-unread"
2081
- }, Ja = { key: 1 }, Qa = { class: "add-friend-section" }, Za = { class: "add-friend-icon" }, en = ["onClick"], tn = { class: "chat-list-avatar-wrapper" }, sn = ["src", "alt"], an = { class: "chat-list-info" }, nn = { class: "chat-list-name" }, rn = { key: 2 }, on = { class: "friend-request-info" }, ln = ["src", "alt"], un = { class: "friend-request-details" }, cn = { class: "friend-request-username" }, dn = { key: 3 }, pn = { class: "add-friend-section" }, mn = { class: "add-friend-icon" }, vn = ["onClick"], fn = { class: "chat-list-avatar-wrapper" }, hn = {
2081
+ }, Ba = { key: 1 }, Ja = { class: "add-friend-section" }, Qa = { class: "add-friend-icon" }, Za = ["onClick"], en = { class: "chat-list-avatar-wrapper" }, tn = ["src", "alt"], sn = { class: "chat-list-info" }, an = { class: "chat-list-name" }, nn = { key: 2 }, rn = { class: "friend-request-info" }, on = ["src", "alt"], ln = { class: "friend-request-details" }, un = { class: "friend-request-username" }, cn = { key: 3 }, dn = { class: "add-friend-section" }, pn = { class: "add-friend-icon" }, mn = ["onClick"], vn = { class: "chat-list-avatar-wrapper" }, hn = {
2082
2082
  key: 0,
2083
2083
  class: "group-avatar-grid"
2084
- }, gn = ["src", "alt"], yn = ["src", "alt"], bn = { class: "chat-list-info" }, kn = { class: "chat-list-header" }, _n = { class: "chat-list-name" }, wn = { class: "chat-list-time" }, Cn = { class: "chat-list-preview" }, xn = { class: "chat-list-last-msg" }, Un = {
2084
+ }, fn = ["src", "alt"], gn = ["src", "alt"], yn = { class: "chat-list-info" }, bn = { class: "chat-list-header" }, kn = { class: "chat-list-name" }, _n = { class: "chat-list-time" }, wn = { class: "chat-list-preview" }, Cn = { class: "chat-list-last-msg" }, xn = {
2085
2085
  key: 0,
2086
2086
  class: "chat-list-unread"
2087
- }, Mn = { class: "chat-main-area" }, Gn = {
2087
+ }, Un = { class: "chat-main-area" }, Gn = {
2088
2088
  key: 0,
2089
2089
  class: "friend-profile-area"
2090
- }, Sn = ["src", "alt"], Vn = { class: "profile-name" }, In = { class: "profile-status" }, zn = {
2090
+ }, Mn = ["src", "alt"], Sn = { class: "profile-name" }, Vn = { class: "profile-status" }, In = {
2091
2091
  key: 1,
2092
2092
  class: "chat-window-area"
2093
- }, Tn = { class: "chat-window-header" }, Fn = { class: "chat-window-title" }, An = { class: "chat-window-name" }, Nn = {
2093
+ }, zn = { class: "chat-window-header" }, Fn = { class: "chat-window-title" }, An = { class: "chat-window-name" }, Tn = {
2094
2094
  key: 1,
2095
2095
  class: "chat-window-status"
2096
- }, $n = { class: "chat-window-actions" }, Ln = { class: "message-avatar" }, Rn = ["src"], En = {
2096
+ }, Nn = { class: "chat-window-actions" }, $n = { class: "message-avatar" }, Rn = ["src"], Ln = {
2097
2097
  key: 0,
2098
2098
  class: "message-sender-name"
2099
- }, Dn = { class: "message-bubble-wrapper" }, Kn = ["onClick"], Wn = ["src", "alt"], Hn = {
2099
+ }, En = { class: "message-bubble-wrapper" }, Dn = ["onClick"], Kn = ["src", "alt"], Wn = {
2100
2100
  key: 0,
2101
2101
  class: "message-image-size"
2102
- }, Xn = ["onClick"], Yn = { class: "message-file-content" }, jn = { class: "message-file-icon" }, qn = { class: "message-file-info" }, Bn = { class: "message-file-name" }, Pn = { class: "message-file-meta" }, On = { key: 0 }, Jn = {
2102
+ }, Hn = ["onClick"], Xn = { class: "message-file-content" }, Yn = { class: "message-file-icon" }, jn = { class: "message-file-info" }, qn = { class: "message-file-name" }, On = { class: "message-file-meta" }, Pn = { key: 0 }, Bn = {
2103
2103
  key: 0,
2104
2104
  class: "pending-files-area"
2105
- }, Qn = {
2105
+ }, Jn = {
2106
2106
  key: 0,
2107
2107
  class: "pending-image-wrapper"
2108
- }, Zn = ["src", "alt"], er = ["onClick"], tr = {
2108
+ }, Qn = ["src", "alt"], Zn = ["onClick"], er = {
2109
2109
  key: 1,
2110
2110
  class: "pending-file-wrapper"
2111
- }, sr = { class: "pending-file-name" }, ar = ["onClick"], nr = {
2111
+ }, tr = { class: "pending-file-name" }, sr = ["onClick"], ar = {
2112
2112
  key: 1,
2113
2113
  class: "input-toolbar"
2114
- }, rr = { class: "emoji-button-wrapper" }, or = { class: "input-textarea-wrapper" }, lr = ["onKeydown"], ir = { class: "input-send-wrapper" }, ur = {
2114
+ }, nr = { class: "emoji-button-wrapper" }, rr = { class: "input-textarea-wrapper" }, or = ["onKeydown"], lr = { class: "input-send-wrapper" }, ir = {
2115
2115
  key: 2,
2116
2116
  class: "chat-empty-state"
2117
- }, cr = { class: "empty-state-text" }, dr = {
2117
+ }, ur = { class: "empty-state-text" }, cr = {
2118
2118
  key: 0,
2119
2119
  class: "group-sidebar"
2120
- }, pr = { class: "group-sidebar-header" }, mr = { class: "group-sidebar-content" }, vr = { class: "group-members-avatar-section" }, fr = { class: "group-members-grid" }, hr = ["onClick"], gr = ["src", "alt"], yr = { class: "group-member-nickname" }, br = { class: "group-member-add-icon" }, kr = { class: "group-member-add-icon" }, _r = { class: "group-settings-section" }, wr = {
2120
+ }, dr = { class: "group-sidebar-header" }, pr = { class: "group-sidebar-content" }, mr = { class: "group-members-avatar-section" }, vr = { class: "group-members-grid" }, hr = ["onClick"], fr = ["src", "alt"], gr = { class: "group-member-nickname" }, yr = { class: "group-member-add-icon" }, br = { class: "group-member-add-icon" }, kr = { class: "group-settings-section" }, _r = {
2121
2121
  key: 0,
2122
2122
  class: "group-setting-item"
2123
- }, Cr = { class: "group-setting-value-wrapper" }, xr = {
2123
+ }, wr = { class: "group-setting-value-wrapper" }, Cr = {
2124
2124
  key: 0,
2125
2125
  class: "group-edit-wrapper"
2126
- }, Ur = { class: "group-edit-buttons" }, Mr = {
2126
+ }, xr = { class: "group-edit-buttons" }, Ur = {
2127
2127
  key: 1,
2128
2128
  class: "group-setting-item"
2129
- }, Gr = { class: "group-setting-value-text" }, Sr = {
2129
+ }, Gr = { class: "group-setting-value-text" }, Mr = {
2130
2130
  key: 2,
2131
2131
  class: "group-setting-item"
2132
- }, Vr = { class: "group-setting-value-wrapper" }, Ir = {
2132
+ }, Sr = { class: "group-setting-value-wrapper" }, Vr = {
2133
2133
  key: 0,
2134
2134
  class: "group-edit-wrapper"
2135
- }, zr = { class: "group-edit-buttons" }, Tr = { class: "group-setting-value-text" }, Fr = {
2135
+ }, Ir = { class: "group-edit-buttons" }, zr = { class: "group-setting-value-text" }, Fr = {
2136
2136
  key: 3,
2137
2137
  class: "group-setting-item"
2138
- }, Ar = { class: "group-setting-value-text" }, Nr = {
2138
+ }, Ar = { class: "group-setting-value-text" }, Tr = {
2139
2139
  key: 4,
2140
2140
  class: "group-setting-item"
2141
- }, $r = { class: "group-setting-value-wrapper" }, Lr = {
2141
+ }, Nr = { class: "group-setting-value-wrapper" }, $r = {
2142
2142
  key: 0,
2143
2143
  class: "group-edit-wrapper"
2144
- }, Rr = { class: "group-edit-buttons" }, Er = { class: "group-setting-value-text" }, Dr = {
2144
+ }, Rr = { class: "group-edit-buttons" }, Lr = { class: "group-setting-value-text" }, Er = {
2145
2145
  key: 5,
2146
2146
  class: "group-setting-item"
2147
- }, Kr = { class: "group-setting-value-text" }, Wr = { class: "group-setting-value" }, Hr = { class: "group-setting-value-text" }, Xr = { class: "group-setting-item" }, Yr = { class: "group-setting-item" }, jr = {
2147
+ }, Dr = { class: "group-setting-value-text" }, Kr = { class: "group-setting-value" }, Wr = { class: "group-setting-value-text" }, Hr = { class: "group-setting-item" }, Xr = { class: "group-setting-item" }, Yr = {
2148
2148
  key: 0,
2149
2149
  class: "chat-detail-panel"
2150
- }, qr = { class: "chat-detail-content" }, Br = { class: "chat-detail-profile" }, Pr = ["src", "alt"], Or = { class: "chat-detail-name" }, Jr = { class: "add-friend-search-wrapper" }, Qr = { class: "add-friend-users-list" }, Zr = { class: "add-friend-user-info" }, eo = ["src", "alt"], to = { class: "add-friend-user-name" }, so = { class: "create-group-form" }, ao = { class: "form-item" }, no = { class: "form-item" }, ro = { class: "form-item" }, oo = { class: "member-selection" }, lo = {
2150
+ }, jr = { class: "chat-detail-content" }, qr = { class: "chat-detail-profile" }, Or = ["src", "alt"], Pr = { class: "chat-detail-name" }, Br = { class: "add-friend-search-wrapper" }, Jr = { class: "add-friend-users-list" }, Qr = { class: "add-friend-user-info" }, Zr = ["src", "alt"], eo = { class: "add-friend-user-name" }, to = { class: "create-group-form" }, so = { class: "form-item" }, ao = { class: "form-item" }, no = { class: "form-item" }, ro = { class: "member-selection" }, oo = {
2151
2151
  key: 1,
2152
2152
  class: "member-list"
2153
- }, io = ["onClick"], uo = ["src", "alt"], co = { class: "member-name" }, po = { class: "group-detail-content" }, mo = { class: "group-info-section" }, vo = { class: "group-info-item" }, fo = { class: "info-value" }, ho = { class: "group-info-item" }, go = { class: "info-value" }, yo = { class: "group-info-item" }, bo = { class: "info-value" }, ko = {
2153
+ }, lo = ["onClick"], io = ["src", "alt"], uo = { class: "member-name" }, co = { class: "group-detail-content" }, po = { class: "group-info-section" }, mo = { class: "group-info-item" }, vo = { class: "info-value" }, ho = { class: "group-info-item" }, fo = { class: "info-value" }, go = { class: "group-info-item" }, yo = { class: "info-value" }, bo = {
2154
2154
  key: 0,
2155
2155
  class: "group-actions-section"
2156
- }, _o = { class: "group-actions-list" }, wo = { class: "group-members-section" }, Co = { class: "section-header" }, xo = { class: "group-members-list" }, Uo = ["src", "alt"], Mo = { class: "group-member-info" }, Go = { class: "group-member-name" }, So = {
2156
+ }, ko = { class: "group-actions-list" }, _o = { class: "group-members-section" }, wo = { class: "section-header" }, Co = { class: "group-members-list" }, xo = ["src", "alt"], Uo = { class: "group-member-info" }, Go = { class: "group-member-name" }, Mo = {
2157
2157
  key: 0,
2158
2158
  class: "group-member-badge"
2159
- }, Vo = {
2159
+ }, So = {
2160
2160
  key: 0,
2161
2161
  class: "group-member-actions"
2162
- }, Io = {
2162
+ }, Vo = {
2163
2163
  key: 1,
2164
2164
  class: "group-member-actions"
2165
- }, zo = { class: "msg-read-users-content" }, To = { class: "read-users-section" }, Fo = { class: "section-title" }, Ao = { class: "users-list" }, No = {
2165
+ }, Io = { class: "msg-read-users-content" }, zo = { class: "read-users-section" }, Fo = { class: "section-title" }, Ao = { class: "users-list" }, To = {
2166
2166
  key: 1,
2167
2167
  class: "users-tag-list"
2168
- }, $o = { class: "unread-users-section" }, Lo = { class: "section-title" }, Ro = { class: "users-list" }, Eo = {
2168
+ }, No = { class: "unread-users-section" }, $o = { class: "section-title" }, Ro = { class: "users-list" }, Lo = {
2169
2169
  key: 1,
2170
2170
  class: "users-tag-list"
2171
- }, Do = { class: "invite-member-content" }, Ko = { class: "invite-member-list" }, Wo = {
2171
+ }, Eo = { class: "invite-member-content" }, Do = { class: "invite-member-list" }, Ko = {
2172
2172
  key: 1,
2173
2173
  class: "member-list"
2174
- }, Ho = ["onClick"], Xo = ["src", "alt"], Yo = { class: "member-name" }, jo = { class: "chat-settings-container" }, qo = { class: "chat-settings-avatar-section" }, Bo = { class: "chat-settings-avatar-wrapper" }, Po = ["src"], Oo = { class: "chat-settings-user-display" }, Jo = { class: "chat-settings-nickname" }, Qo = { class: "chat-settings-username" }, Zo = { class: "chat-settings-form-section" }, el = { class: "chat-settings-form-header" }, tl = { class: "chat-settings-form-title" }, sl = { class: "chat-settings-form" }, al = { class: "chat-settings-form-item" }, nl = {
2174
+ }, Wo = ["onClick"], Ho = ["src", "alt"], Xo = { class: "member-name" }, Yo = { class: "chat-settings-container" }, jo = { class: "chat-settings-avatar-section" }, qo = { class: "chat-settings-avatar-wrapper" }, Oo = ["src"], Po = { class: "chat-settings-user-display" }, Bo = { class: "chat-settings-nickname" }, Jo = { class: "chat-settings-username" }, Qo = { class: "chat-settings-form-section" }, Zo = { class: "chat-settings-form-header" }, el = { class: "chat-settings-form-title" }, tl = { class: "chat-settings-form" }, sl = { class: "chat-settings-form-item" }, al = {
2175
2175
  key: 1,
2176
2176
  class: "chat-settings-form-value"
2177
- }, rl = { class: "chat-settings-form-item" }, ol = {
2177
+ }, nl = { class: "chat-settings-form-item" }, rl = {
2178
2178
  key: 1,
2179
2179
  class: "chat-settings-form-value"
2180
- }, ll = { class: "chat-settings-form-item" }, il = {
2180
+ }, ol = { class: "chat-settings-form-item" }, ll = {
2181
2181
  key: 1,
2182
2182
  class: "chat-settings-form-value"
2183
- }, ul = { class: "chat-settings-form-item" }, cl = {
2183
+ }, il = { class: "chat-settings-form-item" }, ul = {
2184
2184
  key: 1,
2185
2185
  class: "chat-settings-form-value bio-value"
2186
- }, dl = {
2186
+ }, cl = {
2187
2187
  key: 0,
2188
2188
  class: "chat-settings-form-actions"
2189
- }, pl = {
2189
+ }, dl = {
2190
2190
  __name: "ChatPanel",
2191
2191
  props: {
2192
2192
  config: { type: Object, required: !0 }
2193
2193
  },
2194
2194
  emits: ["message", "send", "error", "init"],
2195
- setup(y, { emit: t }) {
2196
- const a = y, o = t, {
2197
- myUsername: b,
2195
+ setup(g, { emit: t }) {
2196
+ const a = g, o = t, {
2197
+ myUsername: y,
2198
2198
  myAvatar: E,
2199
2199
  userInfo: N,
2200
- loadingUserInfo: te,
2200
+ loadingUserInfo: ee,
2201
2201
  friendList: S,
2202
- filteredFriendList: f,
2202
+ filteredFriendList: h,
2203
2203
  searchText: U,
2204
2204
  inputText: $,
2205
- messagesContainer: B,
2205
+ messagesContainer: j,
2206
2206
  filteredUsers: x,
2207
- filteredAvailableUsers: pe,
2208
- currentUser: we,
2207
+ filteredAvailableUsers: de,
2208
+ currentUser: _e,
2209
2209
  currentMessages: D,
2210
2210
  addFriendDialogVisible: _,
2211
2211
  addFriendSearchText: he,
2212
- availableUsers: me,
2213
- loadingAvailableUsers: ge,
2214
- friendApplyList: ie,
2215
- loadingFriendApply: re,
2212
+ availableUsers: pe,
2213
+ loadingAvailableUsers: fe,
2214
+ friendApplyList: le,
2215
+ loadingFriendApply: ne,
2216
2216
  // ========== 群聊相关 ==========
2217
2217
  activeTab: z,
2218
- groupList: Q,
2218
+ groupList: B,
2219
2219
  currentSelectGroup: C,
2220
- groupMsgList: ye,
2221
- groupMemberList: ue,
2220
+ groupMsgList: ge,
2221
+ groupMemberList: ie,
2222
2222
  createGroupDialogVisible: w,
2223
2223
  groupDetailVisible: V,
2224
- newGroupName: ee,
2225
- newGroupRemark: T,
2224
+ newGroupName: Z,
2225
+ newGroupRemark: F,
2226
2226
  selectedMembersForCreate: K,
2227
2227
  inviteMemberDialogVisible: I,
2228
2228
  selectedMembersForInvite: W,
2229
- filteredGroupList: se,
2230
- currentChatTarget: ae,
2231
- currentGroupMessages: P,
2229
+ filteredGroupList: te,
2230
+ currentChatTarget: se,
2231
+ currentGroupMessages: q,
2232
2232
  currentAllMessages: d,
2233
- groupInfoVisible: h,
2234
- editingGroupInfo: M,
2235
- editingMemberNick: F,
2236
- memberNickDialogVisible: Y,
2237
- msgReadUserDialogVisible: q,
2238
- currentMsgReadList: oe,
2239
- currentGroupInfo: be,
2240
- editingFields: xe,
2233
+ groupInfoVisible: f,
2234
+ editingGroupInfo: G,
2235
+ editingMemberNick: A,
2236
+ memberNickDialogVisible: H,
2237
+ msgReadUserDialogVisible: Y,
2238
+ currentMsgReadList: re,
2239
+ currentGroupInfo: ye,
2240
+ editingFields: Ce,
2241
2241
  tempEditValues: Fe,
2242
2242
  // ========== 方法 ==========
2243
- formatTime: Be,
2244
- formatLastTime: Pe,
2245
- scrollToBottom: Ct,
2246
- getFriendList: ot,
2247
- getChatHistory: xt,
2248
- setFriendToChatStatus: Oe,
2249
- selectUser: lt,
2250
- sendMessage: it,
2251
- sendFile: ts,
2252
- sendFilesAndText: Ut,
2253
- initWebSocket: Mt,
2243
+ formatTime: qe,
2244
+ formatLastTime: Oe,
2245
+ scrollToBottom: wt,
2246
+ getFriendList: rt,
2247
+ getChatHistory: Ct,
2248
+ setFriendToChatStatus: Pe,
2249
+ selectUser: ot,
2250
+ sendMessage: lt,
2251
+ sendFile: es,
2252
+ sendFilesAndText: xt,
2253
+ initWebSocket: Ut,
2254
2254
  closeWebSocket: Gt,
2255
2255
  reset: u,
2256
2256
  openAddFriendDialog: c,
2257
- addFriend: L,
2258
- loadFriendApplyList: ne,
2259
- agreeFriend: ve,
2260
- updateMyAvatar: ze,
2257
+ addFriend: R,
2258
+ loadFriendApplyList: ae,
2259
+ agreeFriend: me,
2260
+ updateMyAvatar: Ie,
2261
2261
  // ========== 群聊相关方法 ==========
2262
2262
  getGroupList: Ge,
2263
- getGroupHistory: Ke,
2264
- getGroupMembers: fl,
2265
- selectGroup: ss,
2266
- createGroup: as,
2267
- inviteGroupMember: ns,
2268
- quitGroup: rs,
2263
+ getGroupHistory: De,
2264
+ getGroupMembers: vl,
2265
+ selectGroup: ts,
2266
+ createGroup: ss,
2267
+ inviteGroupMember: as,
2268
+ quitGroup: ns,
2269
2269
  sendGroupMessage: hl,
2270
- sendGroupFile: gl,
2271
- sendGroupFilesAndText: os,
2272
- switchTab: yl,
2273
- getGroupUnreadCount: bl,
2274
- getMsgReadUserList: kl,
2275
- updateGroupInfo: ls,
2276
- updateMemberNick: is,
2277
- deleteGroup: us,
2278
- removeGroupMember: cs,
2279
- transferGroupOwner: ds,
2280
- readSingleGroupMsg: _l,
2281
- readAllGroupMsg: wl,
2282
- openEditGroupInfo: ps,
2283
- openEditMemberNick: Je,
2284
- fetchGroupDetail: ms,
2285
- updateSingleGroupField: Cl,
2286
- startEditField: ut,
2287
- cancelEditField: ct,
2288
- saveEditField: vs
2289
- } = ha(a.config, (p) => {
2290
- o("message", p);
2291
- }), fs = ke(() => {
2270
+ sendGroupFile: fl,
2271
+ sendGroupFilesAndText: rs,
2272
+ switchTab: gl,
2273
+ getGroupUnreadCount: yl,
2274
+ getMsgReadUserList: bl,
2275
+ updateGroupInfo: os,
2276
+ updateMemberNick: ls,
2277
+ deleteGroup: is,
2278
+ removeGroupMember: us,
2279
+ transferGroupOwner: cs,
2280
+ readSingleGroupMsg: kl,
2281
+ readAllGroupMsg: _l,
2282
+ openEditGroupInfo: ds,
2283
+ openEditMemberNick: Be,
2284
+ fetchGroupDetail: ps,
2285
+ updateSingleGroupField: wl,
2286
+ startEditField: it,
2287
+ cancelEditField: ut,
2288
+ saveEditField: ms
2289
+ } = ha(a.config, (m) => {
2290
+ o("message", m);
2291
+ }), vs = be(() => {
2292
2292
  var e;
2293
- const p = [{ id: "chat", icon: ht, badge: 0 }];
2294
- return a.config.modules.friends && p.push({ id: "friends", icon: gt, badge: 0 }), a.config.modules.groups && p.push({ id: "groups", icon: gt, badge: 0 }), a.config.modules.apply && p.push({ id: "apply", icon: Qs, badge: ((e = ie.value) == null ? void 0 : e.length) || 0 }), p;
2295
- }), Ae = k("chat"), Le = k(null), Ce = k(null), _e = k(null), We = k(!1), Te = k(!1), Se = k({ nickname: "", email: "", phone: "", bio: "" }), dt = k(!1), Qe = k(!1), Ze = k(!1), St = k(!1), et = k(null), pt = k(""), tt = k(null), Ve = k([]), Ne = k({ visible: !1, x: 0, y: 0, chat: null }), He = k(!1), Re = k(!1), Vt = k(!1);
2296
- k(null), _t(Re, (p) => {
2297
- p && C.value && ms(C.value.groupId);
2293
+ const m = [{ id: "chat", icon: ht, badge: 0 }];
2294
+ return a.config.modules.friends && m.push({ id: "friends", icon: ft, badge: 0 }), a.config.modules.groups && m.push({ id: "groups", icon: ft, badge: 0 }), a.config.modules.apply && m.push({ id: "apply", icon: Js, badge: ((e = le.value) == null ? void 0 : e.length) || 0 }), m;
2295
+ }), Ae = k("chat"), $e = k(null), we = k(null), ke = k(null), Ke = k(!1), ze = k(!1), Me = k({ nickname: "", email: "", phone: "", bio: "" }), ct = k(!1), Je = k(!1), Qe = k(!1), Mt = k(!1), Ze = k(null), dt = k(""), et = k(null), Se = k([]), Te = k({ visible: !1, x: 0, y: 0, chat: null }), We = k(!1), Re = k(!1), St = k(!1);
2296
+ k(null), kt(Re, (m) => {
2297
+ m && C.value && ps(C.value.groupId);
2298
2298
  });
2299
- const hs = ke(() => {
2300
- const p = ue.value.find((e) => e.username === b);
2301
- return (p == null ? void 0 : p.memberNick) || "";
2302
- }), gs = () => {
2303
- const p = ue.value.find((e) => e.username === b);
2304
- p && Je(p);
2305
- }, ys = (p, e) => {
2306
- p.preventDefault(), p.stopPropagation(), Ne.value = { visible: !0, x: p.clientX, y: p.clientY, chat: e };
2307
- }, mt = () => {
2308
- Ne.value.visible = !1;
2309
- }, bs = async () => {
2310
- if (!Ne.value.chat) return;
2311
- await Oe(Ne.value.chat.id, 0) && Le.value === Ne.value.chat.id && (Le.value = null, Ce.value = null), mt();
2312
- }, vt = (p) => {
2313
- Le.value = p.id, Ce.value = p, _e.value = null, C.value = null, We.value = !1, V.value = !1, lt({
2314
- id: p.id,
2315
- name: p.name,
2316
- avatar: p.avatar,
2317
- online: p.online
2299
+ const hs = be(() => {
2300
+ const m = ie.value.find((e) => e.username === y);
2301
+ return (m == null ? void 0 : m.memberNick) || "";
2302
+ }), fs = () => {
2303
+ const m = ie.value.find((e) => e.username === y);
2304
+ m && Be(m);
2305
+ }, gs = (m, e) => {
2306
+ m.preventDefault(), m.stopPropagation(), Te.value = { visible: !0, x: m.clientX, y: m.clientY, chat: e };
2307
+ }, pt = () => {
2308
+ Te.value.visible = !1;
2309
+ }, ys = async () => {
2310
+ if (!Te.value.chat) return;
2311
+ await Pe(Te.value.chat.id, 0) && $e.value === Te.value.chat.id && ($e.value = null, we.value = null), pt();
2312
+ }, mt = (m) => {
2313
+ $e.value = m.id, we.value = m, ke.value = null, C.value = null, Ke.value = !1, V.value = !1, ot({
2314
+ id: m.id,
2315
+ name: m.name,
2316
+ avatar: m.avatar,
2317
+ online: m.online
2318
2318
  });
2319
- }, ks = (p) => {
2320
- _e.value = p, Le.value = null, Ce.value = null, C.value = null;
2321
- }, _s = (p) => {
2322
- C.value = p, Le.value = null, Ce.value = null, _e.value = null, We.value = !1, V.value = !1, ss(p);
2323
- }, ws = async () => {
2324
- if (!_e.value) return;
2325
- if (await Oe(_e.value.id)) {
2326
- Ae.value = "chat", await rt();
2327
- const e = x.value.find((g) => g.id === _e.value.id);
2328
- e && vt(e), _e.value = null;
2319
+ }, bs = (m) => {
2320
+ ke.value = m, $e.value = null, we.value = null, C.value = null;
2321
+ }, ks = (m) => {
2322
+ C.value = m, $e.value = null, we.value = null, ke.value = null, Ke.value = !1, V.value = !1, ts(m);
2323
+ }, _s = async () => {
2324
+ if (!ke.value) return;
2325
+ if (await Pe(ke.value.id)) {
2326
+ Ae.value = "chat", await nt();
2327
+ const e = x.value.find((b) => b.id === ke.value.id);
2328
+ e && mt(e), ke.value = null;
2329
2329
  }
2330
+ }, ws = () => {
2331
+ Je.value = !0;
2330
2332
  }, Cs = () => {
2331
- Qe.value = !0;
2333
+ var m;
2334
+ (m = Ze.value) == null || m.click();
2332
2335
  }, xs = () => {
2333
- var p;
2334
- (p = et.value) == null || p.click();
2335
- }, Us = () => {
2336
- var p;
2337
- (p = tt.value) == null || p.click();
2338
- }, Ms = (p) => {
2339
- const e = Array.from(p.target.files || []);
2336
+ var m;
2337
+ (m = et.value) == null || m.click();
2338
+ }, Us = (m) => {
2339
+ const e = Array.from(m.target.files || []);
2340
2340
  if (e.length !== 0) {
2341
- for (const g of e) {
2342
- if (g.size > 50 * 1024 * 1024) {
2343
- X.warning(`文件 ${g.name} 超过50MB,已跳过`);
2341
+ for (const b of e) {
2342
+ if (b.size > 50 * 1024 * 1024) {
2343
+ at.warning(`文件 ${b.name} 超过50MB,已跳过`);
2344
2344
  continue;
2345
2345
  }
2346
- const H = URL.createObjectURL(g);
2347
- Ve.value.push({
2346
+ const J = URL.createObjectURL(b);
2347
+ Se.value.push({
2348
2348
  id: Date.now() + Math.random(),
2349
- file: g,
2350
- name: g.name,
2351
- size: g.size,
2352
- type: g.type,
2353
- previewUrl: H,
2354
- isImage: g.type.startsWith("image/")
2349
+ file: b,
2350
+ name: b.name,
2351
+ size: b.size,
2352
+ type: b.type,
2353
+ previewUrl: J,
2354
+ isImage: b.type.startsWith("image/")
2355
2355
  });
2356
2356
  }
2357
- tt.value && (tt.value.value = "");
2357
+ et.value && (et.value.value = "");
2358
2358
  }
2359
- }, It = (p) => {
2360
- const e = Ve.value[p];
2361
- e.previewUrl && URL.revokeObjectURL(e.previewUrl), Ve.value.splice(p, 1);
2362
- }, zt = (p) => {
2363
- if (p === 0) return "0 B";
2364
- const e = 1024, g = ["B", "KB", "MB", "GB"], H = Math.floor(Math.log(p) / Math.log(e));
2365
- return parseFloat((p / Math.pow(e, H)).toFixed(2)) + " " + g[H];
2366
- }, Tt = async () => {
2367
- if (!$.value.trim() && Ve.value.length === 0) return;
2368
- const p = [...Ve.value], e = $.value;
2369
- $.value = "", Ve.value.forEach((g) => {
2370
- g.previewUrl && URL.revokeObjectURL(g.previewUrl);
2371
- }), Ve.value = [], C.value ? await os(p, e) : await Ut(p, e), o("send", { text: e, files: p });
2372
- }, Gs = (p) => {
2373
- var g;
2374
- const e = (g = p.clipboardData) == null ? void 0 : g.items;
2359
+ }, Vt = (m) => {
2360
+ const e = Se.value[m];
2361
+ e.previewUrl && URL.revokeObjectURL(e.previewUrl), Se.value.splice(m, 1);
2362
+ }, It = (m) => {
2363
+ if (m === 0) return "0 B";
2364
+ const e = 1024, b = ["B", "KB", "MB", "GB"], J = Math.floor(Math.log(m) / Math.log(e));
2365
+ return parseFloat((m / Math.pow(e, J)).toFixed(2)) + " " + b[J];
2366
+ }, zt = async () => {
2367
+ if (!$.value.trim() && Se.value.length === 0) return;
2368
+ const m = [...Se.value], e = $.value;
2369
+ $.value = "", Se.value.forEach((b) => {
2370
+ b.previewUrl && URL.revokeObjectURL(b.previewUrl);
2371
+ }), Se.value = [], C.value ? await rs(m, e) : await xt(m, e), o("send", { text: e, files: m });
2372
+ }, Gs = (m) => {
2373
+ var b;
2374
+ const e = (b = m.clipboardData) == null ? void 0 : b.items;
2375
2375
  if (e) {
2376
- for (const H of e)
2377
- if (H.kind === "file") {
2378
- const le = H.getAsFile();
2379
- if (le) {
2380
- if (le.size > 50 * 1024 * 1024) {
2381
- X.warning(`文件 ${le.name} 超过50MB,已跳过`);
2376
+ for (const J of e)
2377
+ if (J.kind === "file") {
2378
+ const oe = J.getAsFile();
2379
+ if (oe) {
2380
+ if (oe.size > 50 * 1024 * 1024) {
2381
+ at.warning(`文件 ${oe.name} 超过50MB,已跳过`);
2382
2382
  continue;
2383
2383
  }
2384
- const j = URL.createObjectURL(le);
2385
- Ve.value.push({
2384
+ const X = URL.createObjectURL(oe);
2385
+ Se.value.push({
2386
2386
  id: Date.now() + Math.random(),
2387
- file: le,
2388
- name: le.name,
2389
- size: le.size,
2390
- type: le.type,
2391
- previewUrl: j,
2392
- isImage: le.type.startsWith("image/")
2387
+ file: oe,
2388
+ name: oe.name,
2389
+ size: oe.size,
2390
+ type: oe.type,
2391
+ previewUrl: X,
2392
+ isImage: oe.type.startsWith("image/")
2393
2393
  });
2394
2394
  }
2395
2395
  }
2396
2396
  }
2397
- }, Ft = (p) => {
2398
- if (!p) {
2399
- X.warning("文件地址无效");
2397
+ }, Ft = (m) => {
2398
+ if (!m) {
2399
+ at.warning("文件地址无效");
2400
2400
  return;
2401
2401
  }
2402
- window.open(p, "_blank");
2403
- }, Ss = (p) => {
2404
- console.warn("图片加载失败", p);
2405
- }, Vs = (p) => {
2406
- $.value += p, He.value = !1;
2407
- }, Is = (p, e) => {
2408
- const g = {};
2409
- return p === 1 ? (g.width = "100%", g.height = "100%") : p === 2 ? (g.width = "50%", g.height = "100%") : p === 3 && e === 0 ? (g.width = "100%", g.height = "50%") : (g.width = "50%", g.height = "50%"), g;
2410
- }, zs = (p) => {
2411
- const e = K.value.findIndex((g) => g.id === p.id);
2412
- e !== -1 ? K.value.splice(e, 1) : K.value.push(p);
2413
- }, Ts = (p) => {
2414
- const e = W.value.findIndex((g) => g.id === p.id);
2415
- e !== -1 ? W.value.splice(e, 1) : W.value.push(p);
2402
+ window.open(m, "_blank");
2403
+ }, Ms = (m) => {
2404
+ console.warn("图片加载失败", m);
2405
+ }, Ss = (m) => {
2406
+ $.value += m, We.value = !1;
2407
+ }, Vs = (m, e) => {
2408
+ const b = {};
2409
+ return m === 1 ? (b.width = "100%", b.height = "100%") : m === 2 ? (b.width = "50%", b.height = "100%") : m === 3 && e === 0 ? (b.width = "100%", b.height = "50%") : (b.width = "50%", b.height = "50%"), b;
2410
+ }, Is = (m) => {
2411
+ const e = K.value.findIndex((b) => b.id === m.id);
2412
+ e !== -1 ? K.value.splice(e, 1) : K.value.push(m);
2413
+ }, zs = (m) => {
2414
+ const e = W.value.findIndex((b) => b.id === m.id);
2415
+ e !== -1 ? W.value.splice(e, 1) : W.value.push(m);
2416
2416
  }, Fs = async () => {
2417
- await as() ? X.success("群聊创建成功") : X.error("群聊创建失败");
2417
+ await ss();
2418
2418
  }, As = async () => {
2419
- await ns() ? X.success("邀请成功") : X.error("邀请失败");
2419
+ await as();
2420
2420
  }, At = async () => {
2421
- await at.confirm("确定要退出群聊吗?", "提示", {
2422
- confirmButtonText: "确定",
2423
- cancelButtonText: "取消",
2424
- type: "warning"
2425
- }).catch(() => {
2426
- }) && (await rs() ? X.success("已退出群聊") : X.error("退出失败"));
2427
- }, Nt = async () => {
2428
- await at.confirm(
2429
- "确定要解散该群聊吗?此操作不可恢复!",
2430
- "警告",
2431
- {
2432
- confirmButtonText: "确定",
2433
- cancelButtonText: "取消",
2434
- type: "warning"
2435
- }
2436
- ).catch(() => {
2437
- }) && (await us() ? (X.success("群聊已解散"), Re.value = !1) : X.error("解散失败"));
2438
- }, Xe = async (p) => {
2439
- const e = ElLoading.service({
2440
- lock: !0,
2441
- text: "保存中...",
2442
- background: "rgba(0, 0, 0, 0.7)"
2443
- });
2421
+ await ns();
2422
+ }, Tt = async () => {
2423
+ await is(), Re.value = !1;
2424
+ }, He = async (m) => {
2444
2425
  try {
2445
- await vs(p) ? X.success("保存成功") : X.error("保存失败");
2446
- } catch (g) {
2447
- console.error("保存失败", g), X.error("保存失败");
2448
- } finally {
2449
- e.close();
2426
+ await ms(m);
2427
+ } catch (e) {
2428
+ console.error("保存失败", e);
2450
2429
  }
2451
- }, Ns = async () => {
2452
- const p = ElLoading.service({
2453
- lock: !0,
2454
- text: "保存中...",
2455
- background: "rgba(0, 0, 0, 0.7)"
2456
- });
2430
+ }, Ts = async () => {
2457
2431
  try {
2458
- await is() ? (X.success("群昵称修改成功"), Y.value = !1) : X.error("修改失败");
2459
- } catch (e) {
2460
- console.error("修改失败", e), X.error("修改失败");
2461
- } finally {
2462
- p.close();
2432
+ await ls() && (H.value = !1);
2433
+ } catch (m) {
2434
+ console.error("修改失败", m);
2463
2435
  }
2464
- }, $s = async (p) => {
2465
- if (await at.confirm(
2466
- `确定要移除成员 ${p} 吗?`,
2467
- "提示",
2468
- {
2469
- confirmButtonText: "确定",
2470
- cancelButtonText: "取消",
2471
- type: "warning"
2472
- }
2473
- ).catch(() => {
2474
- })) {
2475
- const g = ElLoading.service({
2476
- lock: !0,
2477
- text: "移除中...",
2478
- background: "rgba(0, 0, 0, 0.7)"
2479
- });
2480
- try {
2481
- await cs(p) ? X.success("成员已移除") : X.error("移除失败");
2482
- } catch (H) {
2483
- console.error("移除失败", H), X.error("移除失败");
2484
- } finally {
2485
- g.close();
2486
- }
2436
+ }, Ns = async (m) => {
2437
+ try {
2438
+ await us(m);
2439
+ } catch (e) {
2440
+ console.error("移除失败", e);
2487
2441
  }
2488
- }, Ls = async (p) => {
2489
- if (await at.confirm(
2490
- `确定要将群主转让给 ${p} 吗?`,
2491
- "提示",
2492
- {
2493
- confirmButtonText: "确定",
2494
- cancelButtonText: "取消",
2495
- type: "warning"
2496
- }
2497
- ).catch(() => {
2498
- })) {
2499
- const g = ElLoading.service({
2500
- lock: !0,
2501
- text: "转让中...",
2502
- background: "rgba(0, 0, 0, 0.7)"
2503
- });
2504
- try {
2505
- await ds(p) ? X.success("群主已转让") : X.error("转让失败");
2506
- } catch (H) {
2507
- console.error("转让失败", H), X.error("转让失败");
2508
- } finally {
2509
- g.close();
2510
- }
2442
+ }, $s = async (m) => {
2443
+ try {
2444
+ await cs(m);
2445
+ } catch (e) {
2446
+ console.error("转让失败", e);
2511
2447
  }
2512
2448
  }, Rs = async () => {
2513
- await ls() ? X.success("群信息已更新") : X.error("更新失败");
2514
- }, Es = (p) => {
2515
- const e = p.target.files[0];
2449
+ await os();
2450
+ }, Ls = (m) => {
2451
+ const e = m.target.files[0];
2516
2452
  if (!e) return;
2517
2453
  if (!e.type.startsWith("image/")) {
2518
- X.error("只能上传图片文件");
2454
+ console.error("只能上传图片文件");
2519
2455
  return;
2520
2456
  }
2521
2457
  if (e.size > 5 * 1024 * 1024) {
2522
- X.error("图片大小不能超过 5MB");
2458
+ console.error("图片大小不能超过 5MB");
2523
2459
  return;
2524
2460
  }
2525
- const g = new FileReader();
2526
- g.onload = (H) => {
2527
- pt.value = H.target.result, Ze.value = !0;
2528
- }, g.readAsDataURL(e);
2529
- }, Ds = async ({ file: p }) => {
2530
- if (p) {
2531
- St.value = !0;
2461
+ const b = new FileReader();
2462
+ b.onload = (J) => {
2463
+ dt.value = J.target.result, Qe.value = !0;
2464
+ }, b.readAsDataURL(e);
2465
+ }, Es = async ({ file: m }) => {
2466
+ if (m) {
2467
+ Mt.value = !0;
2532
2468
  try {
2533
- const { ChatApi: e } = await Promise.resolve().then(() => pa), H = await new e(a.config).uploadAvatar(p, b);
2534
- H.code === 200 ? (X.success("头像上传成功"), ze(H.data), Ks()) : X.error(H.msg || "头像上传失败");
2469
+ const { ChatApi: e } = await Promise.resolve().then(() => da), J = await new e(a.config).uploadAvatar(m, y);
2470
+ J.code === 200 && (Ie(J.data), Ds());
2535
2471
  } catch (e) {
2536
- console.error(e), X.error("头像上传失败");
2472
+ console.error(e);
2537
2473
  } finally {
2538
- St.value = !1;
2474
+ Mt.value = !1;
2539
2475
  }
2540
2476
  }
2477
+ }, Ds = () => {
2478
+ dt.value = "", Qe.value = !1, Ze.value && (Ze.value.value = "");
2541
2479
  }, Ks = () => {
2542
- pt.value = "", Ze.value = !1, et.value && (et.value.value = "");
2543
- }, Ws = () => {
2544
- Se.value = {
2480
+ Me.value = {
2545
2481
  nickname: N.value.nickname || "",
2546
2482
  email: N.value.email || "",
2547
2483
  phone: N.value.phone || "",
2548
2484
  bio: N.value.bio || ""
2549
- }, Te.value = !0;
2550
- }, Hs = () => {
2551
- Te.value = !1, Se.value = { nickname: "", email: "", phone: "", bio: "" };
2552
- }, Xs = async () => {
2553
- dt.value = !0;
2485
+ }, ze.value = !0;
2486
+ }, Ws = () => {
2487
+ ze.value = !1, Me.value = { nickname: "", email: "", phone: "", bio: "" };
2488
+ }, Hs = async () => {
2489
+ ct.value = !0;
2554
2490
  try {
2555
- await updateUserInfo(Se.value) ? (X.success("保存成功"), Te.value = !1) : X.error("保存失败");
2556
- } catch (p) {
2557
- console.error(p), X.error("保存失败");
2491
+ await updateUserInfo(Me.value) && (ze.value = !1);
2492
+ } catch (m) {
2493
+ console.error(m);
2558
2494
  } finally {
2559
- dt.value = !1;
2495
+ ct.value = !1;
2560
2496
  }
2561
2497
  };
2562
- return js(async () => {
2563
- const p = [ot(), ne()];
2564
- a.config.modules.groups && p.push(Ge()), await Promise.all(p), Mt(), x.value.length > 0 && vt(x.value[0]), o("init"), document.addEventListener("click", mt);
2565
- }), qs(() => {
2566
- u(), Gt(), document.removeEventListener("click", mt);
2567
- }), (p, e) => {
2568
- var Rt, Et, Dt;
2569
- const g = Me("el-icon"), H = Me("el-input"), le = Me("el-empty"), j = Me("el-button"), Ys = Me("el-switch"), $e = Me("el-dialog"), Ye = Me("el-form-item"), $t = Me("el-form"), Lt = Me("el-tag");
2570
- return l(), m("div", za, [
2571
- s("div", Ta, [
2498
+ return Ys(async () => {
2499
+ const m = [rt(), ae()];
2500
+ a.config.modules.groups && m.push(Ge()), await Promise.all(m), Ut(), x.value.length > 0 && mt(x.value[0]), o("init"), document.addEventListener("click", pt);
2501
+ }), js(() => {
2502
+ u(), Gt(), document.removeEventListener("click", pt);
2503
+ }), (m, e) => {
2504
+ var Rt, Lt, Et;
2505
+ const b = Ue("el-icon"), J = Ue("el-input"), oe = Ue("el-empty"), X = Ue("el-button"), Xs = Ue("el-switch"), Ne = Ue("el-dialog"), Xe = Ue("el-form-item"), Nt = Ue("el-form"), $t = Ue("el-tag");
2506
+ return l(), p("div", Ia, [
2507
+ s("div", za, [
2572
2508
  s("div", {
2573
2509
  class: "sidebar-avatar",
2574
- onClick: Cs
2510
+ onClick: ws
2575
2511
  }, [
2576
2512
  s("img", {
2577
2513
  src: r(E),
@@ -2579,91 +2515,91 @@ const wt = (y, t) => {
2579
2515
  class: "sidebar-avatar-img"
2580
2516
  }, null, 8, Fa)
2581
2517
  ]),
2582
- (l(!0), m(ce, null, de(fs.value, (n) => (l(), m("div", {
2518
+ (l(!0), p(ue, null, ce(vs.value, (n) => (l(), p("div", {
2583
2519
  key: n.id,
2584
- class: fe([
2520
+ class: ve([
2585
2521
  "sidebar-nav-item",
2586
2522
  Ae.value === n.id ? "sidebar-nav-item-active" : "sidebar-nav-item-inactive"
2587
2523
  ]),
2588
2524
  onClick: (O) => Ae.value = n.id
2589
2525
  }, [
2590
- i(g, { size: 24 }, {
2526
+ i(b, { size: 24 }, {
2591
2527
  default: v(() => [
2592
- (l(), Z(Bs(n.icon)))
2528
+ (l(), Q(qs(n.icon)))
2593
2529
  ]),
2594
2530
  _: 2
2595
2531
  }, 1024),
2596
- n.badge ? (l(), m("span", Na, G(n.badge > 99 ? "99+" : n.badge), 1)) : R("", !0)
2532
+ n.badge ? (l(), p("span", Ta, M(n.badge > 99 ? "99+" : n.badge), 1)) : L("", !0)
2597
2533
  ], 10, Aa))), 128)),
2598
2534
  e[54] || (e[54] = s("div", { class: "sidebar-spacer" }, null, -1)),
2599
- y.config.modules.settings ? (l(), m("div", {
2535
+ g.config.modules.settings ? (l(), p("div", {
2600
2536
  key: 0,
2601
2537
  class: "sidebar-nav-item sidebar-nav-item-inactive",
2602
- onClick: e[0] || (e[0] = (n) => Qe.value = !0),
2538
+ onClick: e[0] || (e[0] = (n) => Je.value = !0),
2603
2539
  title: "设置"
2604
2540
  }, [
2605
- i(g, { size: 24 }, {
2541
+ i(b, { size: 24 }, {
2606
2542
  default: v(() => [
2607
- i(r(Zs))
2543
+ i(r(Qs))
2608
2544
  ]),
2609
2545
  _: 1
2610
2546
  })
2611
- ])) : R("", !0)
2547
+ ])) : L("", !0)
2612
2548
  ]),
2613
- s("div", $a, [
2614
- s("div", La, [
2615
- i(H, {
2549
+ s("div", Na, [
2550
+ s("div", $a, [
2551
+ i(J, {
2616
2552
  modelValue: r(U),
2617
- "onUpdate:modelValue": e[1] || (e[1] = (n) => Ue(U) ? U.value = n : null),
2553
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => xe(U) ? U.value = n : null),
2618
2554
  placeholder: "搜索",
2619
- "prefix-icon": r(yt),
2555
+ "prefix-icon": r(gt),
2620
2556
  class: "chat-search-input"
2621
2557
  }, null, 8, ["modelValue", "prefix-icon"])
2622
2558
  ]),
2623
2559
  s("div", Ra, [
2624
- Ae.value === "chat" ? (l(), m("div", Ea, [
2625
- (l(!0), m(ce, null, de(r(x), (n) => (l(), m("div", {
2560
+ Ae.value === "chat" ? (l(), p("div", La, [
2561
+ (l(!0), p(ue, null, ce(r(x), (n) => (l(), p("div", {
2626
2562
  key: n.id,
2627
- class: fe([
2563
+ class: ve([
2628
2564
  "chat-list-item",
2629
- Le.value === n.id ? "chat-list-item-active" : ""
2565
+ $e.value === n.id ? "chat-list-item-active" : ""
2630
2566
  ]),
2631
- onClick: (O) => vt(n),
2632
- onContextmenu: De((O) => ys(O, n), ["prevent", "stop"])
2567
+ onClick: (O) => mt(n),
2568
+ onContextmenu: Ee((O) => gs(O, n), ["prevent", "stop"])
2633
2569
  }, [
2634
- s("div", Ka, [
2570
+ s("div", Da, [
2635
2571
  s("img", {
2636
2572
  src: n.avatar,
2637
2573
  alt: n.name,
2638
2574
  class: "chat-list-avatar"
2639
- }, null, 8, Wa),
2640
- n.online ? (l(), m("span", Ha)) : R("", !0)
2575
+ }, null, 8, Ka),
2576
+ n.online ? (l(), p("span", Wa)) : L("", !0)
2641
2577
  ]),
2642
- s("div", Xa, [
2643
- s("div", Ya, [
2644
- s("span", ja, G(n.name), 1),
2645
- s("span", qa, G(r(Pe)(n.lastTime)), 1)
2578
+ s("div", Ha, [
2579
+ s("div", Xa, [
2580
+ s("span", Ya, M(n.name), 1),
2581
+ s("span", ja, M(r(Oe)(n.lastTime)), 1)
2646
2582
  ]),
2647
- s("div", Ba, [
2648
- s("span", Pa, G(n.lastMsg), 1),
2649
- n.unread > 0 ? (l(), m("span", Oa, G(n.unread > 99 ? "99+" : n.unread), 1)) : R("", !0)
2583
+ s("div", qa, [
2584
+ s("span", Oa, M(n.lastMsg), 1),
2585
+ n.unread > 0 ? (l(), p("span", Pa, M(n.unread > 99 ? "99+" : n.unread), 1)) : L("", !0)
2650
2586
  ])
2651
2587
  ])
2652
- ], 42, Da))), 128))
2653
- ])) : R("", !0),
2654
- Ae.value === "friends" && y.config.modules.friends ? (l(), m("div", Ja, [
2655
- s("div", Qa, [
2588
+ ], 42, Ea))), 128))
2589
+ ])) : L("", !0),
2590
+ Ae.value === "friends" && g.config.modules.friends ? (l(), p("div", Ba, [
2591
+ s("div", Ja, [
2656
2592
  s("div", {
2657
2593
  class: "add-friend-btn",
2658
2594
  onClick: e[2] || (e[2] = (...n) => r(c) && r(c)(...n))
2659
2595
  }, [
2660
- s("div", Za, [
2661
- i(g, {
2596
+ s("div", Qa, [
2597
+ i(b, {
2662
2598
  class: "text-white",
2663
2599
  size: 20
2664
2600
  }, {
2665
2601
  default: v(() => [
2666
- i(r(je))
2602
+ i(r(Ye))
2667
2603
  ]),
2668
2604
  _: 1
2669
2605
  })
@@ -2671,76 +2607,76 @@ const wt = (y, t) => {
2671
2607
  e[55] || (e[55] = s("span", { class: "add-friend-text" }, "添加好友", -1))
2672
2608
  ])
2673
2609
  ]),
2674
- (l(!0), m(ce, null, de(r(f), (n) => (l(), m("div", {
2610
+ (l(!0), p(ue, null, ce(r(h), (n) => (l(), p("div", {
2675
2611
  key: n.id,
2676
2612
  class: "chat-list-item",
2677
- onClick: (O) => ks(n)
2613
+ onClick: (O) => bs(n)
2678
2614
  }, [
2679
- s("div", tn, [
2615
+ s("div", en, [
2680
2616
  s("img", {
2681
2617
  src: n.avatar,
2682
2618
  alt: n.name,
2683
2619
  class: "chat-list-avatar"
2684
- }, null, 8, sn),
2620
+ }, null, 8, tn),
2685
2621
  s("span", {
2686
- class: fe([
2622
+ class: ve([
2687
2623
  "chat-list-online-indicator",
2688
2624
  n.online ? "chat-list-online" : "chat-list-offline"
2689
2625
  ])
2690
2626
  }, null, 2)
2691
2627
  ]),
2692
- s("div", an, [
2693
- s("span", nn, G(n.name), 1)
2628
+ s("div", sn, [
2629
+ s("span", an, M(n.name), 1)
2694
2630
  ])
2695
- ], 8, en))), 128))
2696
- ])) : R("", !0),
2697
- Ae.value === "apply" && y.config.modules.apply ? (l(), m("div", rn, [
2698
- r(re) ? (l(), Z(le, {
2631
+ ], 8, Za))), 128))
2632
+ ])) : L("", !0),
2633
+ Ae.value === "apply" && g.config.modules.apply ? (l(), p("div", nn, [
2634
+ r(ne) ? (l(), Q(oe, {
2699
2635
  key: 0,
2700
2636
  description: "加载中..."
2701
- })) : r(ie).length === 0 ? (l(), Z(le, {
2637
+ })) : r(le).length === 0 ? (l(), Q(oe, {
2702
2638
  key: 1,
2703
2639
  description: "暂无好友申请"
2704
- })) : (l(!0), m(ce, { key: 2 }, de(r(ie), (n) => (l(), m("div", {
2640
+ })) : (l(!0), p(ue, { key: 2 }, ce(r(le), (n) => (l(), p("div", {
2705
2641
  key: n.applyUser || n.id,
2706
2642
  class: "friend-request-item"
2707
2643
  }, [
2708
- s("div", on, [
2644
+ s("div", rn, [
2709
2645
  s("img", {
2710
2646
  src: `https://api.dicebear.com/7.x/avataaars/svg?seed=${n.applyUser}`,
2711
2647
  alt: n.applyUser,
2712
2648
  class: "friend-request-avatar"
2713
- }, null, 8, ln),
2714
- s("div", un, [
2715
- s("div", cn, G(n.applyUser), 1),
2649
+ }, null, 8, on),
2650
+ s("div", ln, [
2651
+ s("div", un, M(n.applyUser), 1),
2716
2652
  e[56] || (e[56] = s("div", { class: "friend-request-desc" }, "请求添加你为好友", -1))
2717
2653
  ])
2718
2654
  ]),
2719
- i(j, {
2655
+ i(X, {
2720
2656
  type: "primary",
2721
2657
  size: "small",
2722
- onClick: (O) => r(ve)(n.applyUser)
2658
+ onClick: (O) => r(me)(n.applyUser)
2723
2659
  }, {
2724
2660
  default: v(() => [...e[57] || (e[57] = [
2725
- A("同意", -1)
2661
+ T("同意", -1)
2726
2662
  ])]),
2727
2663
  _: 1
2728
2664
  }, 8, ["onClick"])
2729
2665
  ]))), 128))
2730
- ])) : R("", !0),
2731
- Ae.value === "groups" && y.config.modules.groups ? (l(), m("div", dn, [
2732
- s("div", pn, [
2666
+ ])) : L("", !0),
2667
+ Ae.value === "groups" && g.config.modules.groups ? (l(), p("div", cn, [
2668
+ s("div", dn, [
2733
2669
  s("div", {
2734
2670
  class: "add-friend-btn",
2735
2671
  onClick: e[3] || (e[3] = (n) => w.value = !0)
2736
2672
  }, [
2737
- s("div", mn, [
2738
- i(g, {
2673
+ s("div", pn, [
2674
+ i(b, {
2739
2675
  class: "text-white",
2740
2676
  size: 20
2741
2677
  }, {
2742
2678
  default: v(() => [
2743
- i(r(je))
2679
+ i(r(Ye))
2744
2680
  ]),
2745
2681
  _: 1
2746
2682
  })
@@ -2748,76 +2684,76 @@ const wt = (y, t) => {
2748
2684
  e[58] || (e[58] = s("span", { class: "add-friend-text" }, "创建群聊", -1))
2749
2685
  ])
2750
2686
  ]),
2751
- (l(!0), m(ce, null, de(r(se), (n) => {
2687
+ (l(!0), p(ue, null, ce(r(te), (n) => {
2752
2688
  var O;
2753
- return l(), m("div", {
2689
+ return l(), p("div", {
2754
2690
  key: n.groupId,
2755
- class: fe([
2691
+ class: ve([
2756
2692
  "chat-list-item",
2757
2693
  ((O = r(C)) == null ? void 0 : O.groupId) === n.groupId ? "chat-list-item-active" : ""
2758
2694
  ]),
2759
- onClick: (Ie) => _s(n)
2695
+ onClick: (Ve) => ks(n)
2760
2696
  }, [
2761
- s("div", fn, [
2762
- n.memberAvatars && n.memberAvatars.length > 0 ? (l(), m("div", hn, [
2763
- (l(!0), m(ce, null, de(n.memberAvatars, (Ie, st) => (l(), m("div", {
2764
- key: Ie.username,
2697
+ s("div", vn, [
2698
+ n.memberAvatars && n.memberAvatars.length > 0 ? (l(), p("div", hn, [
2699
+ (l(!0), p(ue, null, ce(n.memberAvatars, (Ve, tt) => (l(), p("div", {
2700
+ key: Ve.username,
2765
2701
  class: "group-avatar-item",
2766
- style: Ee(Is(n.memberAvatars.length, st))
2702
+ style: Le(Vs(n.memberAvatars.length, tt))
2767
2703
  }, [
2768
2704
  s("img", {
2769
- src: Ie.avatar,
2770
- alt: Ie.username,
2705
+ src: Ve.avatar,
2706
+ alt: Ve.username,
2771
2707
  class: "group-avatar-img"
2772
- }, null, 8, gn)
2708
+ }, null, 8, fn)
2773
2709
  ], 4))), 128))
2774
- ])) : (l(), m("img", {
2710
+ ])) : (l(), p("img", {
2775
2711
  key: 1,
2776
2712
  src: n.avatar,
2777
2713
  alt: n.name,
2778
2714
  class: "chat-list-avatar"
2779
- }, null, 8, yn))
2715
+ }, null, 8, gn))
2780
2716
  ]),
2781
- s("div", bn, [
2782
- s("div", kn, [
2783
- s("span", _n, G(n.name), 1),
2784
- s("span", wn, G(r(Pe)(n.lastTime)), 1)
2717
+ s("div", yn, [
2718
+ s("div", bn, [
2719
+ s("span", kn, M(n.name), 1),
2720
+ s("span", _n, M(r(Oe)(n.lastTime)), 1)
2785
2721
  ]),
2786
- s("div", Cn, [
2787
- s("span", xn, G(n.lastMsg), 1),
2788
- n.unread > 0 ? (l(), m("span", Un, G(n.unread > 99 ? "99+" : n.unread), 1)) : R("", !0)
2722
+ s("div", wn, [
2723
+ s("span", Cn, M(n.lastMsg), 1),
2724
+ n.unread > 0 ? (l(), p("span", xn, M(n.unread > 99 ? "99+" : n.unread), 1)) : L("", !0)
2789
2725
  ])
2790
2726
  ])
2791
- ], 10, vn);
2727
+ ], 10, mn);
2792
2728
  }), 128))
2793
- ])) : R("", !0)
2729
+ ])) : L("", !0)
2794
2730
  ])
2795
2731
  ]),
2796
- s("div", Mn, [
2797
- _e.value && !Ce.value ? (l(), m("div", Gn, [
2732
+ s("div", Un, [
2733
+ ke.value && !we.value ? (l(), p("div", Gn, [
2798
2734
  s("img", {
2799
- src: _e.value.avatar,
2800
- alt: _e.value.name,
2735
+ src: ke.value.avatar,
2736
+ alt: ke.value.name,
2801
2737
  class: "profile-avatar"
2802
- }, null, 8, Sn),
2803
- s("div", Vn, G(_e.value.name), 1),
2804
- s("div", In, [
2738
+ }, null, 8, Mn),
2739
+ s("div", Sn, M(ke.value.name), 1),
2740
+ s("div", Vn, [
2805
2741
  s("span", {
2806
- class: fe([
2742
+ class: ve([
2807
2743
  "profile-status-dot",
2808
- _e.value.online ? "profile-status-online" : "profile-status-offline"
2744
+ ke.value.online ? "profile-status-online" : "profile-status-offline"
2809
2745
  ])
2810
2746
  }, null, 2),
2811
- s("span", null, G(_e.value.online ? "在线" : "离线"), 1)
2747
+ s("span", null, M(ke.value.online ? "在线" : "离线"), 1)
2812
2748
  ]),
2813
- i(j, {
2749
+ i(X, {
2814
2750
  type: "primary",
2815
2751
  size: "large",
2816
- onClick: ws,
2752
+ onClick: _s,
2817
2753
  class: "profile-start-chat-btn"
2818
2754
  }, {
2819
2755
  default: v(() => [
2820
- i(g, null, {
2756
+ i(b, null, {
2821
2757
  default: v(() => [
2822
2758
  i(r(ht))
2823
2759
  ]),
@@ -2827,43 +2763,43 @@ const wt = (y, t) => {
2827
2763
  ]),
2828
2764
  _: 1
2829
2765
  })
2830
- ])) : R("", !0),
2831
- Ce.value || r(C) ? (l(), m("div", zn, [
2832
- s("div", Tn, [
2766
+ ])) : L("", !0),
2767
+ we.value || r(C) ? (l(), p("div", In, [
2768
+ s("div", zn, [
2833
2769
  s("div", Fn, [
2834
- s("span", An, G(r(C) ? r(C).name : Ce.value.name), 1),
2835
- r(C) ? R("", !0) : (l(), m("span", {
2770
+ s("span", An, M(r(C) ? r(C).name : we.value.name), 1),
2771
+ r(C) ? L("", !0) : (l(), p("span", {
2836
2772
  key: 0,
2837
- class: fe([
2773
+ class: ve([
2838
2774
  "chat-window-status",
2839
- Ce.value.online ? "chat-window-status-online" : "chat-window-status-offline"
2775
+ we.value.online ? "chat-window-status-online" : "chat-window-status-offline"
2840
2776
  ])
2841
- }, G(Ce.value.online ? "在线" : "离线"), 3)),
2842
- r(C) ? (l(), m("span", Nn, G(r(ue).length) + " 人 ", 1)) : R("", !0)
2777
+ }, M(we.value.online ? "在线" : "离线"), 3)),
2778
+ r(C) ? (l(), p("span", Tn, M(r(ie).length) + " 人 ", 1)) : L("", !0)
2843
2779
  ]),
2844
- s("div", $n, [
2845
- i(g, { class: "chat-action-icon" }, {
2780
+ s("div", Nn, [
2781
+ i(b, { class: "chat-action-icon" }, {
2846
2782
  default: v(() => [
2847
- i(r(yt))
2783
+ i(r(gt))
2848
2784
  ]),
2849
2785
  _: 1
2850
2786
  }),
2851
- r(C) ? (l(), Z(g, {
2787
+ r(C) ? (l(), Q(b, {
2852
2788
  key: 0,
2853
2789
  class: "chat-action-icon",
2854
2790
  onClick: e[4] || (e[4] = (n) => Re.value = !Re.value)
2855
2791
  }, {
2856
2792
  default: v(() => [
2857
- i(r(Ot))
2793
+ i(r(Pt))
2858
2794
  ]),
2859
2795
  _: 1
2860
- })) : (l(), Z(g, {
2796
+ })) : (l(), Q(b, {
2861
2797
  key: 1,
2862
2798
  class: "chat-action-icon",
2863
- onClick: e[5] || (e[5] = (n) => We.value = !We.value)
2799
+ onClick: e[5] || (e[5] = (n) => Ke.value = !Ke.value)
2864
2800
  }, {
2865
2801
  default: v(() => [
2866
- i(r(Ot))
2802
+ i(r(Pt))
2867
2803
  ]),
2868
2804
  _: 1
2869
2805
  }))
@@ -2871,263 +2807,263 @@ const wt = (y, t) => {
2871
2807
  ]),
2872
2808
  s("div", {
2873
2809
  ref_key: "messagesContainer",
2874
- ref: B,
2810
+ ref: j,
2875
2811
  class: "chat-messages-container"
2876
2812
  }, [
2877
- (l(!0), m(ce, null, de(r(C) ? r(P) : r(D), (n, O) => (l(), m("div", {
2813
+ (l(!0), p(ue, null, ce(r(C) ? r(q) : r(D), (n, O) => (l(), p("div", {
2878
2814
  key: O,
2879
- class: fe([
2815
+ class: ve([
2880
2816
  "message-wrapper",
2881
2817
  n.isSelf ? "message-self" : "message-other"
2882
2818
  ])
2883
2819
  }, [
2884
- s("div", Ln, [
2820
+ s("div", $n, [
2885
2821
  s("img", {
2886
2822
  src: n.avatar,
2887
2823
  class: "message-avatar-img"
2888
2824
  }, null, 8, Rn)
2889
2825
  ]),
2890
2826
  s("div", {
2891
- class: fe([
2827
+ class: ve([
2892
2828
  "message-content",
2893
2829
  n.isSelf ? "message-content-self" : "message-content-other"
2894
2830
  ])
2895
2831
  }, [
2896
- n.isSelf ? R("", !0) : (l(), m("div", En, G(r(C) ? n.displayName || n.sendUsername : Ce.value.name), 1)),
2897
- s("div", Dn, [
2898
- n.type === "text" ? (l(), m("div", {
2832
+ n.isSelf ? L("", !0) : (l(), p("div", Ln, M(r(C) ? n.displayName || n.sendUsername : we.value.name), 1)),
2833
+ s("div", En, [
2834
+ n.type === "text" ? (l(), p("div", {
2899
2835
  key: 0,
2900
- class: fe([
2836
+ class: ve([
2901
2837
  "message-bubble",
2902
2838
  n.isSelf ? "message-bubble-self" : "message-bubble-other"
2903
2839
  ])
2904
- }, G(n.text), 3)) : n.type === "file" && n.fileType === "image" ? (l(), m("div", {
2840
+ }, M(n.text), 3)) : n.type === "file" && n.fileType === "image" ? (l(), p("div", {
2905
2841
  key: 1,
2906
- class: fe([
2842
+ class: ve([
2907
2843
  "message-bubble",
2908
2844
  "message-image-bubble",
2909
2845
  n.isSelf ? "message-bubble-self" : "message-bubble-other"
2910
2846
  ]),
2911
- onClick: (Ie) => Ft(n.fileUrl)
2847
+ onClick: (Ve) => Ft(n.fileUrl)
2912
2848
  }, [
2913
2849
  s("img", {
2914
2850
  src: n.fileUrl,
2915
2851
  alt: n.fileName,
2916
2852
  class: "message-image",
2917
- onError: Ss
2918
- }, null, 40, Wn),
2919
- n.fileSize ? (l(), m("div", Hn, G(zt(n.fileSize)), 1)) : R("", !0)
2920
- ], 10, Kn)) : n.type === "file" ? (l(), m("div", {
2853
+ onError: Ms
2854
+ }, null, 40, Kn),
2855
+ n.fileSize ? (l(), p("div", Wn, M(It(n.fileSize)), 1)) : L("", !0)
2856
+ ], 10, Dn)) : n.type === "file" ? (l(), p("div", {
2921
2857
  key: 2,
2922
- class: fe([
2858
+ class: ve([
2923
2859
  "message-bubble",
2924
2860
  "message-file-bubble",
2925
2861
  n.isSelf ? "message-bubble-self" : "message-bubble-other"
2926
2862
  ]),
2927
- onClick: (Ie) => Ft(n.fileUrl)
2863
+ onClick: (Ve) => Ft(n.fileUrl)
2928
2864
  }, [
2929
- s("div", Yn, [
2930
- s("div", jn, [
2931
- i(g, { size: 28 }, {
2865
+ s("div", Xn, [
2866
+ s("div", Yn, [
2867
+ i(b, { size: 28 }, {
2932
2868
  default: v(() => [
2933
- i(r(ea))
2869
+ i(r(Zs))
2934
2870
  ]),
2935
2871
  _: 1
2936
2872
  })
2937
2873
  ]),
2938
- s("div", qn, [
2939
- s("div", Bn, G(n.fileName || n.text), 1),
2940
- s("div", Pn, [
2941
- i(g, { size: 12 }, {
2874
+ s("div", jn, [
2875
+ s("div", qn, M(n.fileName || n.text), 1),
2876
+ s("div", On, [
2877
+ i(b, { size: 12 }, {
2942
2878
  default: v(() => [
2943
- i(r(ta))
2879
+ i(r(ea))
2944
2880
  ]),
2945
2881
  _: 1
2946
2882
  }),
2947
2883
  e[60] || (e[60] = s("span", null, "点击下载", -1)),
2948
- n.fileSize ? (l(), m("span", On, "· " + G(zt(n.fileSize)), 1)) : R("", !0)
2884
+ n.fileSize ? (l(), p("span", Pn, "· " + M(It(n.fileSize)), 1)) : L("", !0)
2949
2885
  ])
2950
2886
  ])
2951
2887
  ])
2952
- ], 10, Xn)) : R("", !0),
2888
+ ], 10, Hn)) : L("", !0),
2953
2889
  s("div", {
2954
- class: fe([
2890
+ class: ve([
2955
2891
  "message-time",
2956
2892
  n.isSelf ? "message-time-right" : "message-time-left"
2957
2893
  ])
2958
- }, G(r(Be)(n.time)), 3)
2894
+ }, M(r(qe)(n.time)), 3)
2959
2895
  ])
2960
2896
  ], 2)
2961
2897
  ], 2))), 128))
2962
2898
  ], 512),
2963
2899
  s("div", {
2964
2900
  class: "chat-input-area",
2965
- onClick: e[8] || (e[8] = (n) => He.value = !1)
2901
+ onClick: e[8] || (e[8] = (n) => We.value = !1)
2966
2902
  }, [
2967
- Ve.value.length > 0 ? (l(), m("div", Jn, [
2968
- (l(!0), m(ce, null, de(Ve.value, (n, O) => (l(), m("div", {
2903
+ Se.value.length > 0 ? (l(), p("div", Bn, [
2904
+ (l(!0), p(ue, null, ce(Se.value, (n, O) => (l(), p("div", {
2969
2905
  key: n.id,
2970
2906
  class: "pending-file-item"
2971
2907
  }, [
2972
- n.isImage ? (l(), m("div", Qn, [
2908
+ n.isImage ? (l(), p("div", Jn, [
2973
2909
  s("img", {
2974
2910
  src: n.previewUrl,
2975
2911
  alt: n.name,
2976
2912
  class: "pending-image"
2977
- }, null, 8, Zn),
2913
+ }, null, 8, Qn),
2978
2914
  s("button", {
2979
- onClick: (Ie) => It(O),
2915
+ onClick: (Ve) => Vt(O),
2980
2916
  class: "pending-file-remove-btn"
2981
- }, " × ", 8, er)
2982
- ])) : (l(), m("div", tr, [
2983
- i(g, { class: "pending-file-icon" }, {
2917
+ }, " × ", 8, Zn)
2918
+ ])) : (l(), p("div", er, [
2919
+ i(b, { class: "pending-file-icon" }, {
2984
2920
  default: v(() => [
2985
- i(r(Jt))
2921
+ i(r(Bt))
2986
2922
  ]),
2987
2923
  _: 1
2988
2924
  }),
2989
- s("span", sr, G(n.name), 1),
2925
+ s("span", tr, M(n.name), 1),
2990
2926
  s("button", {
2991
- onClick: (Ie) => It(O),
2927
+ onClick: (Ve) => Vt(O),
2992
2928
  class: "pending-file-remove-btn"
2993
- }, " × ", 8, ar)
2929
+ }, " × ", 8, sr)
2994
2930
  ]))
2995
2931
  ]))), 128))
2996
- ])) : R("", !0),
2997
- y.config.modules.fileUpload ? (l(), m("div", nr, [
2998
- s("div", rr, [
2999
- i(g, {
2932
+ ])) : L("", !0),
2933
+ g.config.modules.fileUpload ? (l(), p("div", ar, [
2934
+ s("div", nr, [
2935
+ i(b, {
3000
2936
  class: "input-toolbar-icon",
3001
- onClick: e[6] || (e[6] = De((n) => He.value = !He.value, ["stop"]))
2937
+ onClick: e[6] || (e[6] = Ee((n) => We.value = !We.value, ["stop"]))
3002
2938
  }, {
3003
2939
  default: v(() => [
3004
2940
  i(r(ht))
3005
2941
  ]),
3006
2942
  _: 1
3007
2943
  }),
3008
- i(Ia, {
3009
- visible: He.value,
3010
- onSelect: Vs
2944
+ i(Va, {
2945
+ visible: We.value,
2946
+ onSelect: Ss
3011
2947
  }, null, 8, ["visible"])
3012
2948
  ]),
3013
- i(g, {
2949
+ i(b, {
3014
2950
  class: "input-toolbar-icon",
3015
- onClick: Us
2951
+ onClick: xs
3016
2952
  }, {
3017
2953
  default: v(() => [
3018
- i(r(Jt))
2954
+ i(r(Bt))
3019
2955
  ]),
3020
2956
  _: 1
3021
2957
  }),
3022
- i(g, { class: "input-toolbar-icon" }, {
2958
+ i(b, { class: "input-toolbar-icon" }, {
3023
2959
  default: v(() => [
3024
- i(r(sa))
2960
+ i(r(ta))
3025
2961
  ]),
3026
2962
  _: 1
3027
2963
  })
3028
- ])) : R("", !0),
3029
- s("div", or, [
3030
- Ps(s("textarea", {
3031
- "onUpdate:modelValue": e[7] || (e[7] = (n) => Ue($) ? $.value = n : null),
3032
- onKeydown: ft(De(Tt, ["prevent"]), ["enter"]),
2964
+ ])) : L("", !0),
2965
+ s("div", rr, [
2966
+ Os(s("textarea", {
2967
+ "onUpdate:modelValue": e[7] || (e[7] = (n) => xe($) ? $.value = n : null),
2968
+ onKeydown: vt(Ee(zt, ["prevent"]), ["enter"]),
3033
2969
  onPaste: Gs,
3034
2970
  placeholder: "输入消息或粘贴文件...",
3035
2971
  class: "message-input-textarea",
3036
2972
  rows: "3"
3037
- }, null, 40, lr), [
3038
- [Os, r($)]
2973
+ }, null, 40, or), [
2974
+ [Ps, r($)]
3039
2975
  ])
3040
2976
  ]),
3041
- s("div", ir, [
3042
- i(j, {
2977
+ s("div", lr, [
2978
+ i(X, {
3043
2979
  type: "primary",
3044
- disabled: !r($).trim() && Ve.value.length === 0,
3045
- onClick: Tt,
2980
+ disabled: !r($).trim() && Se.value.length === 0,
2981
+ onClick: zt,
3046
2982
  class: "send-message-btn"
3047
2983
  }, {
3048
2984
  default: v(() => [...e[61] || (e[61] = [
3049
- A(" 发送 ", -1)
2985
+ T(" 发送 ", -1)
3050
2986
  ])]),
3051
2987
  _: 1
3052
2988
  }, 8, ["disabled"])
3053
2989
  ]),
3054
2990
  s("input", {
3055
2991
  ref_key: "fileInputRef",
3056
- ref: tt,
2992
+ ref: et,
3057
2993
  type: "file",
3058
2994
  multiple: "",
3059
2995
  class: "hidden-file-input",
3060
- onChange: Ms
2996
+ onChange: Us
3061
2997
  }, null, 544)
3062
2998
  ])
3063
- ])) : _e.value ? R("", !0) : (l(), m("div", ur, [
3064
- i(g, {
2999
+ ])) : ke.value ? L("", !0) : (l(), p("div", ir, [
3000
+ i(b, {
3065
3001
  size: 64,
3066
3002
  class: "empty-state-icon"
3067
3003
  }, {
3068
3004
  default: v(() => [
3069
- i(r(aa))
3005
+ i(r(sa))
3070
3006
  ]),
3071
3007
  _: 1
3072
3008
  }),
3073
- s("div", cr, G(Ae.value === "apply" ? "在左侧选择好友申请" : "在左侧选择好友开始聊天"), 1)
3009
+ s("div", ur, M(Ae.value === "apply" ? "在左侧选择好友申请" : "在左侧选择好友开始聊天"), 1)
3074
3010
  ]))
3075
3011
  ]),
3076
- i(Js, { name: "slide" }, {
3012
+ i(Bs, { name: "slide" }, {
3077
3013
  default: v(() => {
3078
- var n, O, Ie, st, Kt, Wt, Ht, Xt, Yt, jt, qt, Bt, Pt;
3014
+ var n, O, Ve, tt, Dt, Kt, Wt, Ht, Xt, Yt, jt, qt, Ot;
3079
3015
  return [
3080
- Re.value && r(C) ? (l(), m("div", dr, [
3081
- s("div", pr, [
3016
+ Re.value && r(C) ? (l(), p("div", cr, [
3017
+ s("div", dr, [
3082
3018
  e[62] || (e[62] = s("span", { class: "group-sidebar-title" }, "群聊信息", -1)),
3083
- i(g, {
3019
+ i(b, {
3084
3020
  class: "group-sidebar-close",
3085
- onClick: e[9] || (e[9] = (J) => Re.value = !1)
3021
+ onClick: e[9] || (e[9] = (P) => Re.value = !1)
3086
3022
  }, {
3087
3023
  default: v(() => [
3088
- i(r(na))
3024
+ i(r(aa))
3089
3025
  ]),
3090
3026
  _: 1
3091
3027
  })
3092
3028
  ]),
3093
- s("div", mr, [
3094
- s("div", vr, [
3095
- s("div", fr, [
3096
- (l(!0), m(ce, null, de(r(ue).slice(0, 12), (J) => (l(), m("div", {
3097
- key: J.username,
3029
+ s("div", pr, [
3030
+ s("div", mr, [
3031
+ s("div", vr, [
3032
+ (l(!0), p(ue, null, ce(r(ie).slice(0, 12), (P) => (l(), p("div", {
3033
+ key: P.username,
3098
3034
  class: "group-member-avatar-item",
3099
- onClick: (xl) => r(Je)(J)
3035
+ onClick: (Cl) => r(Be)(P)
3100
3036
  }, [
3101
3037
  s("img", {
3102
- src: J.avatar ? `${y.config.api.baseUrl}${J.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${J.username}`,
3103
- alt: J.username,
3038
+ src: P.avatar ? `${g.config.api.baseUrl}${P.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${P.username}`,
3039
+ alt: P.username,
3104
3040
  class: "group-member-avatar-small"
3105
- }, null, 8, gr),
3106
- s("span", yr, G(J.memberNick || J.username), 1)
3041
+ }, null, 8, fr),
3042
+ s("span", gr, M(P.memberNick || P.username), 1)
3107
3043
  ], 8, hr))), 128)),
3108
- r(ue).length > 12 ? (l(), m("div", {
3044
+ r(ie).length > 12 ? (l(), p("div", {
3109
3045
  key: 0,
3110
3046
  class: "group-member-avatar-item",
3111
- onClick: e[10] || (e[10] = (J) => I.value = !0)
3047
+ onClick: e[10] || (e[10] = (P) => I.value = !0)
3112
3048
  }, [
3113
- s("div", br, [
3114
- i(g, null, {
3049
+ s("div", yr, [
3050
+ i(b, null, {
3115
3051
  default: v(() => [
3116
- i(r(je))
3052
+ i(r(Ye))
3117
3053
  ]),
3118
3054
  _: 1
3119
3055
  })
3120
3056
  ]),
3121
3057
  e[63] || (e[63] = s("span", { class: "group-member-nickname" }, "邀请", -1))
3122
- ])) : (l(), m("div", {
3058
+ ])) : (l(), p("div", {
3123
3059
  key: 1,
3124
3060
  class: "group-member-avatar-item",
3125
- onClick: e[11] || (e[11] = (J) => I.value = !0)
3061
+ onClick: e[11] || (e[11] = (P) => I.value = !0)
3126
3062
  }, [
3127
- s("div", kr, [
3128
- i(g, null, {
3063
+ s("div", br, [
3064
+ i(b, null, {
3129
3065
  default: v(() => [
3130
- i(r(je))
3066
+ i(r(Ye))
3131
3067
  ]),
3132
3068
  _: 1
3133
3069
  })
@@ -3137,198 +3073,198 @@ const wt = (y, t) => {
3137
3073
  ])
3138
3074
  ]),
3139
3075
  e[84] || (e[84] = s("div", { class: "group-divider" }, null, -1)),
3140
- s("div", _r, [
3141
- ((n = r(C)) == null ? void 0 : n.owner) === r(b) ? (l(), m("div", wr, [
3076
+ s("div", kr, [
3077
+ ((n = r(C)) == null ? void 0 : n.owner) === r(y) ? (l(), p("div", _r, [
3142
3078
  e[67] || (e[67] = s("span", { class: "group-setting-label" }, "群聊名称", -1)),
3143
- s("div", Cr, [
3144
- r(xe).groupNickname ? (l(), m("div", xr, [
3145
- i(H, {
3079
+ s("div", wr, [
3080
+ r(Ce).groupNickname ? (l(), p("div", Cr, [
3081
+ i(J, {
3146
3082
  modelValue: r(Fe).groupNickname,
3147
- "onUpdate:modelValue": e[12] || (e[12] = (J) => r(Fe).groupNickname = J),
3083
+ "onUpdate:modelValue": e[12] || (e[12] = (P) => r(Fe).groupNickname = P),
3148
3084
  placeholder: "请输入群聊名称",
3149
- onKeyup: e[13] || (e[13] = ft((J) => Xe("groupNickname"), ["enter"])),
3085
+ onKeyup: e[13] || (e[13] = vt((P) => He("groupNickname"), ["enter"])),
3150
3086
  class: "group-input-edit"
3151
3087
  }, null, 8, ["modelValue"]),
3152
- s("div", Ur, [
3153
- i(j, {
3088
+ s("div", xr, [
3089
+ i(X, {
3154
3090
  size: "small",
3155
- onClick: e[14] || (e[14] = (J) => r(ct)("groupNickname"))
3091
+ onClick: e[14] || (e[14] = (P) => r(ut)("groupNickname"))
3156
3092
  }, {
3157
3093
  default: v(() => [...e[65] || (e[65] = [
3158
- A("取消", -1)
3094
+ T("取消", -1)
3159
3095
  ])]),
3160
3096
  _: 1
3161
3097
  }),
3162
- i(j, {
3098
+ i(X, {
3163
3099
  size: "small",
3164
3100
  type: "primary",
3165
- onClick: e[15] || (e[15] = (J) => Xe("groupNickname"))
3101
+ onClick: e[15] || (e[15] = (P) => He("groupNickname"))
3166
3102
  }, {
3167
3103
  default: v(() => [...e[66] || (e[66] = [
3168
- A("保存", -1)
3104
+ T("保存", -1)
3169
3105
  ])]),
3170
3106
  _: 1
3171
3107
  })
3172
3108
  ])
3173
- ])) : (l(), m("div", {
3109
+ ])) : (l(), p("div", {
3174
3110
  key: 1,
3175
3111
  class: "group-setting-value",
3176
- onClick: e[16] || (e[16] = (J) => r(ut)("groupNickname"))
3112
+ onClick: e[16] || (e[16] = (P) => r(it)("groupNickname"))
3177
3113
  }, [
3178
- s("span", null, G(((O = r(be)) == null ? void 0 : O.groupNickname) || ((Ie = r(be)) == null ? void 0 : Ie.groupName) || ((st = r(C)) == null ? void 0 : st.name) || ""), 1),
3179
- i(g, null, {
3114
+ s("span", null, M(((O = r(ye)) == null ? void 0 : O.groupNickname) || ((Ve = r(ye)) == null ? void 0 : Ve.groupName) || ((tt = r(C)) == null ? void 0 : tt.name) || ""), 1),
3115
+ i(b, null, {
3180
3116
  default: v(() => [
3181
- i(r(qe))
3117
+ i(r(je))
3182
3118
  ]),
3183
3119
  _: 1
3184
3120
  })
3185
3121
  ]))
3186
3122
  ])
3187
- ])) : (l(), m("div", Mr, [
3123
+ ])) : (l(), p("div", Ur, [
3188
3124
  e[68] || (e[68] = s("span", { class: "group-setting-label" }, "群聊名称", -1)),
3189
- s("span", Gr, G(((Kt = r(be)) == null ? void 0 : Kt.groupNickname) || ((Wt = r(be)) == null ? void 0 : Wt.groupName) || ((Ht = r(C)) == null ? void 0 : Ht.name) || ""), 1)
3125
+ s("span", Gr, M(((Dt = r(ye)) == null ? void 0 : Dt.groupNickname) || ((Kt = r(ye)) == null ? void 0 : Kt.groupName) || ((Wt = r(C)) == null ? void 0 : Wt.name) || ""), 1)
3190
3126
  ])),
3191
- ((Xt = r(C)) == null ? void 0 : Xt.owner) === r(b) ? (l(), m("div", Sr, [
3127
+ ((Ht = r(C)) == null ? void 0 : Ht.owner) === r(y) ? (l(), p("div", Mr, [
3192
3128
  e[71] || (e[71] = s("span", { class: "group-setting-label" }, "群公告", -1)),
3193
- s("div", Vr, [
3194
- r(xe).notice ? (l(), m("div", Ir, [
3195
- i(H, {
3129
+ s("div", Sr, [
3130
+ r(Ce).notice ? (l(), p("div", Vr, [
3131
+ i(J, {
3196
3132
  modelValue: r(Fe).notice,
3197
- "onUpdate:modelValue": e[17] || (e[17] = (J) => r(Fe).notice = J),
3133
+ "onUpdate:modelValue": e[17] || (e[17] = (P) => r(Fe).notice = P),
3198
3134
  type: "textarea",
3199
3135
  rows: 3,
3200
3136
  placeholder: "请输入群公告",
3201
3137
  class: "group-input-edit"
3202
3138
  }, null, 8, ["modelValue"]),
3203
- s("div", zr, [
3204
- i(j, {
3139
+ s("div", Ir, [
3140
+ i(X, {
3205
3141
  size: "small",
3206
- onClick: e[18] || (e[18] = (J) => r(ct)("notice"))
3142
+ onClick: e[18] || (e[18] = (P) => r(ut)("notice"))
3207
3143
  }, {
3208
3144
  default: v(() => [...e[69] || (e[69] = [
3209
- A("取消", -1)
3145
+ T("取消", -1)
3210
3146
  ])]),
3211
3147
  _: 1
3212
3148
  }),
3213
- i(j, {
3149
+ i(X, {
3214
3150
  size: "small",
3215
3151
  type: "primary",
3216
- onClick: e[19] || (e[19] = (J) => Xe("notice"))
3152
+ onClick: e[19] || (e[19] = (P) => He("notice"))
3217
3153
  }, {
3218
3154
  default: v(() => [...e[70] || (e[70] = [
3219
- A("保存", -1)
3155
+ T("保存", -1)
3220
3156
  ])]),
3221
3157
  _: 1
3222
3158
  })
3223
3159
  ])
3224
- ])) : (l(), m("div", {
3160
+ ])) : (l(), p("div", {
3225
3161
  key: 1,
3226
3162
  class: "group-setting-value",
3227
- onClick: e[20] || (e[20] = (J) => r(ut)("notice"))
3163
+ onClick: e[20] || (e[20] = (P) => r(it)("notice"))
3228
3164
  }, [
3229
- s("span", Tr, G(((Yt = r(be)) == null ? void 0 : Yt.notice) || "暂无公告"), 1),
3230
- i(g, null, {
3165
+ s("span", zr, M(((Xt = r(ye)) == null ? void 0 : Xt.notice) || "暂无公告"), 1),
3166
+ i(b, null, {
3231
3167
  default: v(() => [
3232
- i(r(qe))
3168
+ i(r(je))
3233
3169
  ]),
3234
3170
  _: 1
3235
3171
  })
3236
3172
  ]))
3237
3173
  ])
3238
- ])) : (l(), m("div", Fr, [
3174
+ ])) : (l(), p("div", Fr, [
3239
3175
  e[72] || (e[72] = s("span", { class: "group-setting-label" }, "群公告", -1)),
3240
- s("span", Ar, G(((jt = r(be)) == null ? void 0 : jt.notice) || "暂无公告"), 1)
3176
+ s("span", Ar, M(((Yt = r(ye)) == null ? void 0 : Yt.notice) || "暂无公告"), 1)
3241
3177
  ])),
3242
- ((qt = r(C)) == null ? void 0 : qt.owner) === r(b) ? (l(), m("div", Nr, [
3178
+ ((jt = r(C)) == null ? void 0 : jt.owner) === r(y) ? (l(), p("div", Tr, [
3243
3179
  e[75] || (e[75] = s("span", { class: "group-setting-label" }, "备注", -1)),
3244
- s("div", $r, [
3245
- r(xe).remark ? (l(), m("div", Lr, [
3246
- i(H, {
3180
+ s("div", Nr, [
3181
+ r(Ce).remark ? (l(), p("div", $r, [
3182
+ i(J, {
3247
3183
  modelValue: r(Fe).remark,
3248
- "onUpdate:modelValue": e[21] || (e[21] = (J) => r(Fe).remark = J),
3184
+ "onUpdate:modelValue": e[21] || (e[21] = (P) => r(Fe).remark = P),
3249
3185
  placeholder: "请输入备注",
3250
- onKeyup: e[22] || (e[22] = ft((J) => Xe("remark"), ["enter"])),
3186
+ onKeyup: e[22] || (e[22] = vt((P) => He("remark"), ["enter"])),
3251
3187
  class: "group-input-edit"
3252
3188
  }, null, 8, ["modelValue"]),
3253
3189
  s("div", Rr, [
3254
- i(j, {
3190
+ i(X, {
3255
3191
  size: "small",
3256
- onClick: e[23] || (e[23] = (J) => r(ct)("remark"))
3192
+ onClick: e[23] || (e[23] = (P) => r(ut)("remark"))
3257
3193
  }, {
3258
3194
  default: v(() => [...e[73] || (e[73] = [
3259
- A("取消", -1)
3195
+ T("取消", -1)
3260
3196
  ])]),
3261
3197
  _: 1
3262
3198
  }),
3263
- i(j, {
3199
+ i(X, {
3264
3200
  size: "small",
3265
3201
  type: "primary",
3266
- onClick: e[24] || (e[24] = (J) => Xe("remark"))
3202
+ onClick: e[24] || (e[24] = (P) => He("remark"))
3267
3203
  }, {
3268
3204
  default: v(() => [...e[74] || (e[74] = [
3269
- A("保存", -1)
3205
+ T("保存", -1)
3270
3206
  ])]),
3271
3207
  _: 1
3272
3208
  })
3273
3209
  ])
3274
- ])) : (l(), m("div", {
3210
+ ])) : (l(), p("div", {
3275
3211
  key: 1,
3276
3212
  class: "group-setting-value",
3277
- onClick: e[25] || (e[25] = (J) => r(ut)("remark"))
3213
+ onClick: e[25] || (e[25] = (P) => r(it)("remark"))
3278
3214
  }, [
3279
- s("span", Er, G(((Bt = r(be)) == null ? void 0 : Bt.remark) || "群聊的备注仅自己可见"), 1),
3280
- i(g, null, {
3215
+ s("span", Lr, M(((qt = r(ye)) == null ? void 0 : qt.remark) || "群聊的备注仅自己可见"), 1),
3216
+ i(b, null, {
3281
3217
  default: v(() => [
3282
- i(r(qe))
3218
+ i(r(je))
3283
3219
  ]),
3284
3220
  _: 1
3285
3221
  })
3286
3222
  ]))
3287
3223
  ])
3288
- ])) : (l(), m("div", Dr, [
3224
+ ])) : (l(), p("div", Er, [
3289
3225
  e[76] || (e[76] = s("span", { class: "group-setting-label" }, "备注", -1)),
3290
- s("span", Kr, G(((Pt = r(be)) == null ? void 0 : Pt.remark) || "群聊的备注仅自己可见"), 1)
3226
+ s("span", Dr, M(((Ot = r(ye)) == null ? void 0 : Ot.remark) || "群聊的备注仅自己可见"), 1)
3291
3227
  ])),
3292
3228
  s("div", {
3293
3229
  class: "group-setting-item",
3294
- onClick: gs
3230
+ onClick: fs
3295
3231
  }, [
3296
3232
  e[77] || (e[77] = s("span", { class: "group-setting-label" }, "我在本群的昵称", -1)),
3297
- s("div", Wr, [
3298
- s("span", Hr, G(hs.value || r(b)), 1),
3299
- i(g, null, {
3233
+ s("div", Kr, [
3234
+ s("span", Wr, M(hs.value || r(y)), 1),
3235
+ i(b, null, {
3300
3236
  default: v(() => [
3301
- i(r(qe))
3237
+ i(r(je))
3302
3238
  ]),
3303
3239
  _: 1
3304
3240
  })
3305
3241
  ])
3306
3242
  ]),
3307
3243
  e[82] || (e[82] = s("div", { class: "group-divider" }, null, -1)),
3308
- s("div", Xr, [
3244
+ s("div", Hr, [
3309
3245
  e[78] || (e[78] = s("span", { class: "group-setting-label" }, "查找聊天内容", -1)),
3310
- i(g, null, {
3246
+ i(b, null, {
3311
3247
  default: v(() => [
3312
- i(r(ra))
3248
+ i(r(na))
3313
3249
  ]),
3314
3250
  _: 1
3315
3251
  })
3316
3252
  ]),
3317
- s("div", Yr, [
3253
+ s("div", Xr, [
3318
3254
  e[79] || (e[79] = s("span", { class: "group-setting-label" }, "消息免打扰", -1)),
3319
- i(Ys, {
3320
- modelValue: Vt.value,
3321
- "onUpdate:modelValue": e[26] || (e[26] = (J) => Vt.value = J)
3255
+ i(Xs, {
3256
+ modelValue: St.value,
3257
+ "onUpdate:modelValue": e[26] || (e[26] = (P) => St.value = P)
3322
3258
  }, null, 8, ["modelValue"])
3323
3259
  ]),
3324
3260
  e[83] || (e[83] = s("div", { class: "group-divider" }, null, -1)),
3325
- r(C).owner === r(b) ? (l(), m("div", {
3261
+ r(C).owner === r(y) ? (l(), p("div", {
3326
3262
  key: 6,
3327
3263
  class: "group-setting-item danger",
3328
- onClick: Nt
3264
+ onClick: Tt
3329
3265
  }, [...e[80] || (e[80] = [
3330
3266
  s("span", { class: "group-setting-label" }, "解散群聊", -1)
3331
- ])])) : (l(), m("div", {
3267
+ ])])) : (l(), p("div", {
3332
3268
  key: 7,
3333
3269
  class: "group-setting-item danger",
3334
3270
  onClick: At
@@ -3337,71 +3273,71 @@ const wt = (y, t) => {
3337
3273
  ])]))
3338
3274
  ])
3339
3275
  ])
3340
- ])) : R("", !0)
3276
+ ])) : L("", !0)
3341
3277
  ];
3342
3278
  }),
3343
3279
  _: 1
3344
3280
  }),
3345
- We.value ? (l(), m("div", jr, [
3281
+ Ke.value ? (l(), p("div", Yr, [
3346
3282
  e[86] || (e[86] = s("div", { class: "chat-detail-header" }, "聊天详情", -1)),
3347
- s("div", qr, [
3348
- s("div", Br, [
3283
+ s("div", jr, [
3284
+ s("div", qr, [
3349
3285
  s("img", {
3350
- src: (Rt = Ce.value) == null ? void 0 : Rt.avatar,
3351
- alt: (Et = Ce.value) == null ? void 0 : Et.name,
3286
+ src: (Rt = we.value) == null ? void 0 : Rt.avatar,
3287
+ alt: (Lt = we.value) == null ? void 0 : Lt.name,
3352
3288
  class: "chat-detail-avatar"
3353
- }, null, 8, Pr),
3354
- s("div", Or, G((Dt = Ce.value) == null ? void 0 : Dt.name), 1),
3289
+ }, null, 8, Or),
3290
+ s("div", Pr, M((Et = we.value) == null ? void 0 : Et.name), 1),
3355
3291
  e[85] || (e[85] = s("div", { class: "chat-detail-actions" }, [
3356
3292
  s("div", { class: "chat-detail-action-item" }, "查找聊天记录"),
3357
3293
  s("div", { class: "chat-detail-action-item" }, "清空聊天记录")
3358
3294
  ], -1))
3359
3295
  ])
3360
3296
  ])
3361
- ])) : R("", !0),
3362
- i($e, {
3297
+ ])) : L("", !0),
3298
+ i(Ne, {
3363
3299
  modelValue: r(_),
3364
- "onUpdate:modelValue": e[28] || (e[28] = (n) => Ue(_) ? _.value = n : null),
3300
+ "onUpdate:modelValue": e[28] || (e[28] = (n) => xe(_) ? _.value = n : null),
3365
3301
  title: "添加好友",
3366
3302
  width: "500px",
3367
3303
  "append-to-body": ""
3368
3304
  }, {
3369
3305
  default: v(() => [
3370
- s("div", Jr, [
3371
- i(H, {
3306
+ s("div", Br, [
3307
+ i(J, {
3372
3308
  modelValue: r(he),
3373
- "onUpdate:modelValue": e[27] || (e[27] = (n) => Ue(he) ? he.value = n : null),
3309
+ "onUpdate:modelValue": e[27] || (e[27] = (n) => xe(he) ? he.value = n : null),
3374
3310
  placeholder: "搜索用户",
3375
- "prefix-icon": r(yt),
3311
+ "prefix-icon": r(gt),
3376
3312
  class: "add-friend-search-input"
3377
3313
  }, null, 8, ["modelValue", "prefix-icon"])
3378
3314
  ]),
3379
- s("div", Qr, [
3380
- r(ge) ? (l(), Z(le, {
3315
+ s("div", Jr, [
3316
+ r(fe) ? (l(), Q(oe, {
3381
3317
  key: 0,
3382
3318
  description: "加载中..."
3383
- })) : r(pe).length === 0 ? (l(), Z(le, {
3319
+ })) : r(de).length === 0 ? (l(), Q(oe, {
3384
3320
  key: 1,
3385
3321
  description: "暂无用户"
3386
- })) : (l(!0), m(ce, { key: 2 }, de(r(pe), (n) => (l(), m("div", {
3322
+ })) : (l(!0), p(ue, { key: 2 }, ce(r(de), (n) => (l(), p("div", {
3387
3323
  key: n.username,
3388
3324
  class: "add-friend-user-item"
3389
3325
  }, [
3390
- s("div", Zr, [
3326
+ s("div", Qr, [
3391
3327
  s("img", {
3392
3328
  src: `https://api.dicebear.com/7.x/avataaars/svg?seed=${n.username}`,
3393
3329
  alt: n.username,
3394
3330
  class: "add-friend-user-avatar"
3395
- }, null, 8, eo),
3396
- s("div", to, G(n.username), 1)
3331
+ }, null, 8, Zr),
3332
+ s("div", eo, M(n.username), 1)
3397
3333
  ]),
3398
- i(j, {
3334
+ i(X, {
3399
3335
  type: "primary",
3400
3336
  size: "small",
3401
- onClick: (O) => r(L)(n)
3337
+ onClick: (O) => r(R)(n)
3402
3338
  }, {
3403
3339
  default: v(() => [...e[87] || (e[87] = [
3404
- A("添加", -1)
3340
+ T("添加", -1)
3405
3341
  ])]),
3406
3342
  _: 1
3407
3343
  }, 8, ["onClick"])
@@ -3410,86 +3346,86 @@ const wt = (y, t) => {
3410
3346
  ]),
3411
3347
  _: 1
3412
3348
  }, 8, ["modelValue"]),
3413
- i($e, {
3349
+ i(Ne, {
3414
3350
  modelValue: r(w),
3415
- "onUpdate:modelValue": e[32] || (e[32] = (n) => Ue(w) ? w.value = n : null),
3351
+ "onUpdate:modelValue": e[32] || (e[32] = (n) => xe(w) ? w.value = n : null),
3416
3352
  title: "创建群聊",
3417
3353
  width: "600px",
3418
3354
  "append-to-body": ""
3419
3355
  }, {
3420
3356
  footer: v(() => [
3421
- i(j, {
3357
+ i(X, {
3422
3358
  onClick: e[31] || (e[31] = (n) => w.value = !1)
3423
3359
  }, {
3424
3360
  default: v(() => [...e[91] || (e[91] = [
3425
- A("取消", -1)
3361
+ T("取消", -1)
3426
3362
  ])]),
3427
3363
  _: 1
3428
3364
  }),
3429
- i(j, {
3365
+ i(X, {
3430
3366
  type: "primary",
3431
3367
  onClick: Fs,
3432
- disabled: !r(ee).trim()
3368
+ disabled: !r(Z).trim()
3433
3369
  }, {
3434
3370
  default: v(() => [...e[92] || (e[92] = [
3435
- A("创建", -1)
3371
+ T("创建", -1)
3436
3372
  ])]),
3437
3373
  _: 1
3438
3374
  }, 8, ["disabled"])
3439
3375
  ]),
3440
3376
  default: v(() => [
3441
- s("div", so, [
3442
- s("div", ao, [
3377
+ s("div", to, [
3378
+ s("div", so, [
3443
3379
  e[88] || (e[88] = s("label", { class: "form-label" }, "群名称", -1)),
3444
- i(H, {
3445
- modelValue: r(ee),
3446
- "onUpdate:modelValue": e[29] || (e[29] = (n) => Ue(ee) ? ee.value = n : null),
3380
+ i(J, {
3381
+ modelValue: r(Z),
3382
+ "onUpdate:modelValue": e[29] || (e[29] = (n) => xe(Z) ? Z.value = n : null),
3447
3383
  placeholder: "请输入群名称",
3448
3384
  maxlength: "50"
3449
3385
  }, null, 8, ["modelValue"])
3450
3386
  ]),
3451
- s("div", no, [
3387
+ s("div", ao, [
3452
3388
  e[89] || (e[89] = s("label", { class: "form-label" }, "群备注", -1)),
3453
- i(H, {
3454
- modelValue: r(T),
3455
- "onUpdate:modelValue": e[30] || (e[30] = (n) => Ue(T) ? T.value = n : null),
3389
+ i(J, {
3390
+ modelValue: r(F),
3391
+ "onUpdate:modelValue": e[30] || (e[30] = (n) => xe(F) ? F.value = n : null),
3456
3392
  type: "textarea",
3457
3393
  placeholder: "请输入群备注(可选)",
3458
3394
  rows: 3,
3459
3395
  maxlength: "200"
3460
3396
  }, null, 8, ["modelValue"])
3461
3397
  ]),
3462
- s("div", ro, [
3398
+ s("div", no, [
3463
3399
  e[90] || (e[90] = s("label", { class: "form-label" }, "选择成员", -1)),
3464
- s("div", oo, [
3465
- r(f).length === 0 ? (l(), Z(le, {
3400
+ s("div", ro, [
3401
+ r(h).length === 0 ? (l(), Q(oe, {
3466
3402
  key: 0,
3467
3403
  description: "暂无好友可以添加"
3468
- })) : (l(), m("div", lo, [
3469
- (l(!0), m(ce, null, de(r(f), (n) => (l(), m("div", {
3404
+ })) : (l(), p("div", oo, [
3405
+ (l(!0), p(ue, null, ce(r(h), (n) => (l(), p("div", {
3470
3406
  key: n.id,
3471
- class: fe([
3407
+ class: ve([
3472
3408
  "member-item",
3473
3409
  r(K).some((O) => O.id === n.id) ? "member-selected" : ""
3474
3410
  ]),
3475
- onClick: (O) => zs(n)
3411
+ onClick: (O) => Is(n)
3476
3412
  }, [
3477
3413
  s("img", {
3478
3414
  src: n.avatar,
3479
3415
  alt: n.name,
3480
3416
  class: "member-avatar"
3481
- }, null, 8, uo),
3482
- s("span", co, G(n.name), 1),
3483
- r(K).some((O) => O.id === n.id) ? (l(), Z(g, {
3417
+ }, null, 8, io),
3418
+ s("span", uo, M(n.name), 1),
3419
+ r(K).some((O) => O.id === n.id) ? (l(), Q(b, {
3484
3420
  key: 0,
3485
3421
  class: "member-check"
3486
3422
  }, {
3487
3423
  default: v(() => [
3488
- i(r(Qt))
3424
+ i(r(Jt))
3489
3425
  ]),
3490
3426
  _: 1
3491
- })) : R("", !0)
3492
- ], 10, io))), 128))
3427
+ })) : L("", !0)
3428
+ ], 10, lo))), 128))
3493
3429
  ]))
3494
3430
  ])
3495
3431
  ])
@@ -3497,112 +3433,112 @@ const wt = (y, t) => {
3497
3433
  ]),
3498
3434
  _: 1
3499
3435
  }, 8, ["modelValue"]),
3500
- r(C) ? (l(), Z($e, {
3436
+ r(C) ? (l(), Q(Ne, {
3501
3437
  key: 1,
3502
3438
  modelValue: r(V),
3503
- "onUpdate:modelValue": e[35] || (e[35] = (n) => Ue(V) ? V.value = n : null),
3439
+ "onUpdate:modelValue": e[35] || (e[35] = (n) => xe(V) ? V.value = n : null),
3504
3440
  title: r(C).name,
3505
3441
  width: "500px",
3506
3442
  "append-to-body": ""
3507
3443
  }, {
3508
3444
  footer: v(() => [
3509
- i(j, {
3445
+ i(X, {
3510
3446
  onClick: e[34] || (e[34] = (n) => V.value = !1)
3511
3447
  }, {
3512
3448
  default: v(() => [...e[105] || (e[105] = [
3513
- A("关闭", -1)
3449
+ T("关闭", -1)
3514
3450
  ])]),
3515
3451
  _: 1
3516
3452
  }),
3517
- i(j, {
3453
+ i(X, {
3518
3454
  type: "danger",
3519
3455
  onClick: At
3520
3456
  }, {
3521
3457
  default: v(() => [...e[106] || (e[106] = [
3522
- A("退出群聊", -1)
3458
+ T("退出群聊", -1)
3523
3459
  ])]),
3524
3460
  _: 1
3525
3461
  })
3526
3462
  ]),
3527
3463
  default: v(() => [
3528
- s("div", po, [
3529
- s("div", mo, [
3530
- s("div", vo, [
3464
+ s("div", co, [
3465
+ s("div", po, [
3466
+ s("div", mo, [
3531
3467
  e[93] || (e[93] = s("span", { class: "info-label" }, "群ID", -1)),
3532
- s("span", fo, G(r(C).groupId), 1)
3468
+ s("span", vo, M(r(C).groupId), 1)
3533
3469
  ]),
3534
3470
  s("div", ho, [
3535
3471
  e[94] || (e[94] = s("span", { class: "info-label" }, "群主", -1)),
3536
- s("span", go, G(r(C).owner), 1)
3472
+ s("span", fo, M(r(C).owner), 1)
3537
3473
  ]),
3538
- s("div", yo, [
3474
+ s("div", go, [
3539
3475
  e[95] || (e[95] = s("span", { class: "info-label" }, "成员数", -1)),
3540
- s("span", bo, G(r(ue).length), 1)
3476
+ s("span", yo, M(r(ie).length), 1)
3541
3477
  ])
3542
3478
  ]),
3543
- r(C).owner === r(b) ? (l(), m("div", ko, [
3479
+ r(C).owner === r(y) ? (l(), p("div", bo, [
3544
3480
  e[98] || (e[98] = s("div", { class: "section-header" }, [
3545
3481
  s("span", { class: "section-title" }, "群管理")
3546
3482
  ], -1)),
3547
- s("div", _o, [
3548
- i(j, {
3483
+ s("div", ko, [
3484
+ i(X, {
3549
3485
  type: "primary",
3550
3486
  size: "small",
3551
- onClick: r(ps)
3487
+ onClick: r(ds)
3552
3488
  }, {
3553
3489
  default: v(() => [
3554
- i(g, null, {
3490
+ i(b, null, {
3555
3491
  default: v(() => [
3556
- i(r(qe))
3492
+ i(r(je))
3557
3493
  ]),
3558
3494
  _: 1
3559
3495
  }),
3560
- e[96] || (e[96] = A("编辑群信息 ", -1))
3496
+ e[96] || (e[96] = T("编辑群信息 ", -1))
3561
3497
  ]),
3562
3498
  _: 1
3563
3499
  }, 8, ["onClick"]),
3564
- i(j, {
3500
+ i(X, {
3565
3501
  type: "danger",
3566
3502
  size: "small",
3567
- onClick: Nt
3503
+ onClick: Tt
3568
3504
  }, {
3569
3505
  default: v(() => [
3570
- i(g, null, {
3506
+ i(b, null, {
3571
3507
  default: v(() => [
3572
- i(r(oa))
3508
+ i(r(ra))
3573
3509
  ]),
3574
3510
  _: 1
3575
3511
  }),
3576
- e[97] || (e[97] = A("解散群聊 ", -1))
3512
+ e[97] || (e[97] = T("解散群聊 ", -1))
3577
3513
  ]),
3578
3514
  _: 1
3579
3515
  })
3580
3516
  ])
3581
- ])) : R("", !0),
3582
- s("div", wo, [
3583
- s("div", Co, [
3517
+ ])) : L("", !0),
3518
+ s("div", _o, [
3519
+ s("div", wo, [
3584
3520
  e[100] || (e[100] = s("span", { class: "section-title" }, "群成员", -1)),
3585
- i(j, {
3521
+ i(X, {
3586
3522
  size: "small",
3587
3523
  onClick: e[33] || (e[33] = (n) => I.value = !0)
3588
3524
  }, {
3589
3525
  default: v(() => [
3590
- i(g, null, {
3526
+ i(b, null, {
3591
3527
  default: v(() => [
3592
- i(r(je))
3528
+ i(r(Ye))
3593
3529
  ]),
3594
3530
  _: 1
3595
3531
  }),
3596
- e[99] || (e[99] = A("邀请成员 ", -1))
3532
+ e[99] || (e[99] = T("邀请成员 ", -1))
3597
3533
  ]),
3598
3534
  _: 1
3599
3535
  })
3600
3536
  ]),
3601
- s("div", xo, [
3602
- r(ue).length === 0 ? (l(), Z(le, {
3537
+ s("div", Co, [
3538
+ r(ie).length === 0 ? (l(), Q(oe, {
3603
3539
  key: 0,
3604
3540
  description: "暂无成员"
3605
- })) : (l(!0), m(ce, { key: 1 }, de(r(ue), (n) => (l(), m("div", {
3541
+ })) : (l(!0), p(ue, { key: 1 }, ce(r(ie), (n) => (l(), p("div", {
3606
3542
  key: n.id || n.username,
3607
3543
  class: "group-member-item"
3608
3544
  }, [
@@ -3610,108 +3546,108 @@ const wt = (y, t) => {
3610
3546
  src: n.avatar ? `${a.config.api.baseUrl}${n.avatar}` : `https://api.dicebear.com/7.x/avataaars/svg?seed=${n.username}`,
3611
3547
  alt: n.username,
3612
3548
  class: "group-member-avatar"
3613
- }, null, 8, Uo),
3614
- s("div", Mo, [
3615
- s("span", Go, G(n.memberNick || n.username), 1),
3616
- n.username === r(C).owner ? (l(), m("span", So, "群主")) : R("", !0)
3549
+ }, null, 8, xo),
3550
+ s("div", Uo, [
3551
+ s("span", Go, M(n.memberNick || n.username), 1),
3552
+ n.username === r(C).owner ? (l(), p("span", Mo, "群主")) : L("", !0)
3617
3553
  ]),
3618
- r(C).owner === r(b) && n.username !== r(b) ? (l(), m("div", Vo, [
3619
- i(j, {
3554
+ r(C).owner === r(y) && n.username !== r(y) ? (l(), p("div", So, [
3555
+ i(X, {
3620
3556
  size: "small",
3621
3557
  link: "",
3622
- onClick: (O) => r(Je)(n)
3558
+ onClick: (O) => r(Be)(n)
3623
3559
  }, {
3624
3560
  default: v(() => [...e[101] || (e[101] = [
3625
- A(" 改昵称 ", -1)
3561
+ T(" 改昵称 ", -1)
3626
3562
  ])]),
3627
3563
  _: 1
3628
3564
  }, 8, ["onClick"]),
3629
- i(j, {
3565
+ i(X, {
3630
3566
  size: "small",
3631
3567
  link: "",
3632
3568
  type: "danger",
3633
- onClick: (O) => $s(n.username)
3569
+ onClick: (O) => Ns(n.username)
3634
3570
  }, {
3635
3571
  default: v(() => [...e[102] || (e[102] = [
3636
- A(" 移除 ", -1)
3572
+ T(" 移除 ", -1)
3637
3573
  ])]),
3638
3574
  _: 1
3639
3575
  }, 8, ["onClick"]),
3640
- i(j, {
3576
+ i(X, {
3641
3577
  size: "small",
3642
3578
  link: "",
3643
3579
  type: "warning",
3644
- onClick: (O) => Ls(n.username)
3580
+ onClick: (O) => $s(n.username)
3645
3581
  }, {
3646
3582
  default: v(() => [...e[103] || (e[103] = [
3647
- A(" 转让 ", -1)
3583
+ T(" 转让 ", -1)
3648
3584
  ])]),
3649
3585
  _: 1
3650
3586
  }, 8, ["onClick"])
3651
- ])) : n.username === r(b) ? (l(), m("div", Io, [
3652
- i(j, {
3587
+ ])) : n.username === r(y) ? (l(), p("div", Vo, [
3588
+ i(X, {
3653
3589
  size: "small",
3654
3590
  link: "",
3655
- onClick: (O) => r(Je)(n)
3591
+ onClick: (O) => r(Be)(n)
3656
3592
  }, {
3657
3593
  default: v(() => [...e[104] || (e[104] = [
3658
- A(" 改昵称 ", -1)
3594
+ T(" 改昵称 ", -1)
3659
3595
  ])]),
3660
3596
  _: 1
3661
3597
  }, 8, ["onClick"])
3662
- ])) : R("", !0)
3598
+ ])) : L("", !0)
3663
3599
  ]))), 128))
3664
3600
  ])
3665
3601
  ])
3666
3602
  ])
3667
3603
  ]),
3668
3604
  _: 1
3669
- }, 8, ["modelValue", "title"])) : R("", !0),
3670
- r(C) ? (l(), Z($e, {
3605
+ }, 8, ["modelValue", "title"])) : L("", !0),
3606
+ r(C) ? (l(), Q(Ne, {
3671
3607
  key: 2,
3672
- modelValue: r(h),
3673
- "onUpdate:modelValue": e[40] || (e[40] = (n) => Ue(h) ? h.value = n : null),
3608
+ modelValue: r(f),
3609
+ "onUpdate:modelValue": e[40] || (e[40] = (n) => xe(f) ? f.value = n : null),
3674
3610
  title: "编辑群信息",
3675
3611
  width: "500px",
3676
3612
  "append-to-body": ""
3677
3613
  }, {
3678
3614
  footer: v(() => [
3679
- i(j, {
3680
- onClick: e[39] || (e[39] = (n) => h.value = !1)
3615
+ i(X, {
3616
+ onClick: e[39] || (e[39] = (n) => f.value = !1)
3681
3617
  }, {
3682
3618
  default: v(() => [...e[107] || (e[107] = [
3683
- A("取消", -1)
3619
+ T("取消", -1)
3684
3620
  ])]),
3685
3621
  _: 1
3686
3622
  }),
3687
- i(j, {
3623
+ i(X, {
3688
3624
  type: "primary",
3689
3625
  onClick: Rs
3690
3626
  }, {
3691
3627
  default: v(() => [...e[108] || (e[108] = [
3692
- A("保存", -1)
3628
+ T("保存", -1)
3693
3629
  ])]),
3694
3630
  _: 1
3695
3631
  })
3696
3632
  ]),
3697
3633
  default: v(() => [
3698
- i($t, { "label-width": "80px" }, {
3634
+ i(Nt, { "label-width": "80px" }, {
3699
3635
  default: v(() => [
3700
- i(Ye, { label: "群名称" }, {
3636
+ i(Xe, { label: "群名称" }, {
3701
3637
  default: v(() => [
3702
- i(H, {
3703
- modelValue: r(M).groupNickname,
3704
- "onUpdate:modelValue": e[36] || (e[36] = (n) => r(M).groupNickname = n),
3638
+ i(J, {
3639
+ modelValue: r(G).groupNickname,
3640
+ "onUpdate:modelValue": e[36] || (e[36] = (n) => r(G).groupNickname = n),
3705
3641
  placeholder: "请输入群名称"
3706
3642
  }, null, 8, ["modelValue"])
3707
3643
  ]),
3708
3644
  _: 1
3709
3645
  }),
3710
- i(Ye, { label: "群备注" }, {
3646
+ i(Xe, { label: "群备注" }, {
3711
3647
  default: v(() => [
3712
- i(H, {
3713
- modelValue: r(M).remark,
3714
- "onUpdate:modelValue": e[37] || (e[37] = (n) => r(M).remark = n),
3648
+ i(J, {
3649
+ modelValue: r(G).remark,
3650
+ "onUpdate:modelValue": e[37] || (e[37] = (n) => r(G).remark = n),
3715
3651
  type: "textarea",
3716
3652
  rows: 3,
3717
3653
  placeholder: "请输入群备注"
@@ -3719,11 +3655,11 @@ const wt = (y, t) => {
3719
3655
  ]),
3720
3656
  _: 1
3721
3657
  }),
3722
- i(Ye, { label: "群公告" }, {
3658
+ i(Xe, { label: "群公告" }, {
3723
3659
  default: v(() => [
3724
- i(H, {
3725
- modelValue: r(M).notice,
3726
- "onUpdate:modelValue": e[38] || (e[38] = (n) => r(M).notice = n),
3660
+ i(J, {
3661
+ modelValue: r(G).notice,
3662
+ "onUpdate:modelValue": e[38] || (e[38] = (n) => r(G).notice = n),
3727
3663
  type: "textarea",
3728
3664
  rows: 3,
3729
3665
  placeholder: "请输入群公告"
@@ -3736,48 +3672,48 @@ const wt = (y, t) => {
3736
3672
  })
3737
3673
  ]),
3738
3674
  _: 1
3739
- }, 8, ["modelValue"])) : R("", !0),
3740
- r(C) ? (l(), Z($e, {
3675
+ }, 8, ["modelValue"])) : L("", !0),
3676
+ r(C) ? (l(), Q(Ne, {
3741
3677
  key: 3,
3742
- modelValue: r(Y),
3743
- "onUpdate:modelValue": e[43] || (e[43] = (n) => Ue(Y) ? Y.value = n : null),
3678
+ modelValue: r(H),
3679
+ "onUpdate:modelValue": e[43] || (e[43] = (n) => xe(H) ? H.value = n : null),
3744
3680
  title: "编辑群昵称",
3745
3681
  width: "400px",
3746
3682
  "append-to-body": ""
3747
3683
  }, {
3748
3684
  footer: v(() => [
3749
- i(j, {
3750
- onClick: e[42] || (e[42] = (n) => Y.value = !1)
3685
+ i(X, {
3686
+ onClick: e[42] || (e[42] = (n) => H.value = !1)
3751
3687
  }, {
3752
3688
  default: v(() => [...e[109] || (e[109] = [
3753
- A("取消", -1)
3689
+ T("取消", -1)
3754
3690
  ])]),
3755
3691
  _: 1
3756
3692
  }),
3757
- i(j, {
3693
+ i(X, {
3758
3694
  type: "primary",
3759
- onClick: Ns
3695
+ onClick: Ts
3760
3696
  }, {
3761
3697
  default: v(() => [...e[110] || (e[110] = [
3762
- A("保存", -1)
3698
+ T("保存", -1)
3763
3699
  ])]),
3764
3700
  _: 1
3765
3701
  })
3766
3702
  ]),
3767
3703
  default: v(() => [
3768
- i($t, { "label-width": "80px" }, {
3704
+ i(Nt, { "label-width": "80px" }, {
3769
3705
  default: v(() => [
3770
- i(Ye, { label: "成员" }, {
3706
+ i(Xe, { label: "成员" }, {
3771
3707
  default: v(() => [
3772
- s("span", null, G(r(F).targetUsername), 1)
3708
+ s("span", null, M(r(A).targetUsername), 1)
3773
3709
  ]),
3774
3710
  _: 1
3775
3711
  }),
3776
- i(Ye, { label: "群昵称" }, {
3712
+ i(Xe, { label: "群昵称" }, {
3777
3713
  default: v(() => [
3778
- i(H, {
3779
- modelValue: r(F).memberNick,
3780
- "onUpdate:modelValue": e[41] || (e[41] = (n) => r(F).memberNick = n),
3714
+ i(J, {
3715
+ modelValue: r(A).memberNick,
3716
+ "onUpdate:modelValue": e[41] || (e[41] = (n) => r(A).memberNick = n),
3781
3717
  placeholder: "请输入群昵称"
3782
3718
  }, null, 8, ["modelValue"])
3783
3719
  ]),
@@ -3788,76 +3724,76 @@ const wt = (y, t) => {
3788
3724
  })
3789
3725
  ]),
3790
3726
  _: 1
3791
- }, 8, ["modelValue"])) : R("", !0),
3792
- r(C) ? (l(), Z($e, {
3727
+ }, 8, ["modelValue"])) : L("", !0),
3728
+ r(C) ? (l(), Q(Ne, {
3793
3729
  key: 4,
3794
- modelValue: r(q),
3795
- "onUpdate:modelValue": e[45] || (e[45] = (n) => Ue(q) ? q.value = n : null),
3730
+ modelValue: r(Y),
3731
+ "onUpdate:modelValue": e[45] || (e[45] = (n) => xe(Y) ? Y.value = n : null),
3796
3732
  title: "消息已读状态",
3797
3733
  width: "500px",
3798
3734
  "append-to-body": ""
3799
3735
  }, {
3800
3736
  footer: v(() => [
3801
- i(j, {
3802
- onClick: e[44] || (e[44] = (n) => q.value = !1)
3737
+ i(X, {
3738
+ onClick: e[44] || (e[44] = (n) => Y.value = !1)
3803
3739
  }, {
3804
3740
  default: v(() => [...e[111] || (e[111] = [
3805
- A("关闭", -1)
3741
+ T("关闭", -1)
3806
3742
  ])]),
3807
3743
  _: 1
3808
3744
  })
3809
3745
  ]),
3810
3746
  default: v(() => [
3811
- s("div", zo, [
3812
- s("div", To, [
3747
+ s("div", Io, [
3748
+ s("div", zo, [
3813
3749
  s("div", Fo, [
3814
- i(g, null, {
3750
+ i(b, null, {
3815
3751
  default: v(() => [
3816
- i(r(la))
3752
+ i(r(oa))
3817
3753
  ]),
3818
3754
  _: 1
3819
3755
  }),
3820
- A("已读 (" + G(r(oe).readUserList.length) + ") ", 1)
3756
+ T("已读 (" + M(r(re).readUserList.length) + ") ", 1)
3821
3757
  ]),
3822
3758
  s("div", Ao, [
3823
- r(oe).readUserList.length === 0 ? (l(), Z(le, {
3759
+ r(re).readUserList.length === 0 ? (l(), Q(oe, {
3824
3760
  key: 0,
3825
3761
  description: "暂无已读成员"
3826
- })) : (l(), m("div", No, [
3827
- (l(!0), m(ce, null, de(r(oe).readUserList, (n) => (l(), Z(Lt, {
3762
+ })) : (l(), p("div", To, [
3763
+ (l(!0), p(ue, null, ce(r(re).readUserList, (n) => (l(), Q($t, {
3828
3764
  key: n,
3829
3765
  class: "user-tag"
3830
3766
  }, {
3831
3767
  default: v(() => [
3832
- A(G(n), 1)
3768
+ T(M(n), 1)
3833
3769
  ]),
3834
3770
  _: 2
3835
3771
  }, 1024))), 128))
3836
3772
  ]))
3837
3773
  ])
3838
3774
  ]),
3839
- s("div", $o, [
3840
- s("div", Lo, [
3841
- i(g, null, {
3775
+ s("div", No, [
3776
+ s("div", $o, [
3777
+ i(b, null, {
3842
3778
  default: v(() => [
3843
- i(r(ia))
3779
+ i(r(la))
3844
3780
  ]),
3845
3781
  _: 1
3846
3782
  }),
3847
- A("未读 (" + G(r(oe).unreadUserList.length) + ") ", 1)
3783
+ T("未读 (" + M(r(re).unreadUserList.length) + ") ", 1)
3848
3784
  ]),
3849
3785
  s("div", Ro, [
3850
- r(oe).unreadUserList.length === 0 ? (l(), Z(le, {
3786
+ r(re).unreadUserList.length === 0 ? (l(), Q(oe, {
3851
3787
  key: 0,
3852
3788
  description: "全部已读"
3853
- })) : (l(), m("div", Eo, [
3854
- (l(!0), m(ce, null, de(r(oe).unreadUserList, (n) => (l(), Z(Lt, {
3789
+ })) : (l(), p("div", Lo, [
3790
+ (l(!0), p(ue, null, ce(r(re).unreadUserList, (n) => (l(), Q($t, {
3855
3791
  key: n,
3856
3792
  type: "info",
3857
3793
  class: "user-tag"
3858
3794
  }, {
3859
3795
  default: v(() => [
3860
- A(G(n), 1)
3796
+ T(M(n), 1)
3861
3797
  ]),
3862
3798
  _: 2
3863
3799
  }, 1024))), 128))
@@ -3867,75 +3803,75 @@ const wt = (y, t) => {
3867
3803
  ])
3868
3804
  ]),
3869
3805
  _: 1
3870
- }, 8, ["modelValue"])) : R("", !0),
3871
- r(C) ? (l(), Z($e, {
3806
+ }, 8, ["modelValue"])) : L("", !0),
3807
+ r(C) ? (l(), Q(Ne, {
3872
3808
  key: 5,
3873
3809
  modelValue: r(I),
3874
- "onUpdate:modelValue": e[47] || (e[47] = (n) => Ue(I) ? I.value = n : null),
3810
+ "onUpdate:modelValue": e[47] || (e[47] = (n) => xe(I) ? I.value = n : null),
3875
3811
  title: "邀请成员",
3876
3812
  width: "500px",
3877
3813
  "append-to-body": ""
3878
3814
  }, {
3879
3815
  footer: v(() => [
3880
- i(j, {
3816
+ i(X, {
3881
3817
  onClick: e[46] || (e[46] = (n) => I.value = !1)
3882
3818
  }, {
3883
3819
  default: v(() => [...e[112] || (e[112] = [
3884
- A("取消", -1)
3820
+ T("取消", -1)
3885
3821
  ])]),
3886
3822
  _: 1
3887
3823
  }),
3888
- i(j, {
3824
+ i(X, {
3889
3825
  type: "primary",
3890
3826
  onClick: As,
3891
3827
  disabled: r(W).length === 0
3892
3828
  }, {
3893
3829
  default: v(() => [
3894
- A(" 邀请 " + G(r(W).length) + " 人 ", 1)
3830
+ T(" 邀请 " + M(r(W).length) + " 人 ", 1)
3895
3831
  ]),
3896
3832
  _: 1
3897
3833
  }, 8, ["disabled"])
3898
3834
  ]),
3899
3835
  default: v(() => [
3900
- s("div", Do, [
3901
- s("div", Ko, [
3902
- r(f).length === 0 ? (l(), Z(le, {
3836
+ s("div", Eo, [
3837
+ s("div", Do, [
3838
+ r(h).length === 0 ? (l(), Q(oe, {
3903
3839
  key: 0,
3904
3840
  description: "暂无好友可以邀请"
3905
- })) : (l(), m("div", Wo, [
3906
- (l(!0), m(ce, null, de(r(f), (n) => (l(), m("div", {
3841
+ })) : (l(), p("div", Ko, [
3842
+ (l(!0), p(ue, null, ce(r(h), (n) => (l(), p("div", {
3907
3843
  key: n.id,
3908
- class: fe([
3844
+ class: ve([
3909
3845
  "member-item",
3910
3846
  r(W).some((O) => O.id === n.id) ? "member-selected" : ""
3911
3847
  ]),
3912
- onClick: (O) => Ts(n)
3848
+ onClick: (O) => zs(n)
3913
3849
  }, [
3914
3850
  s("img", {
3915
3851
  src: n.avatar,
3916
3852
  alt: n.name,
3917
3853
  class: "member-avatar"
3918
- }, null, 8, Xo),
3919
- s("span", Yo, G(n.name), 1),
3920
- r(W).some((O) => O.id === n.id) ? (l(), Z(g, {
3854
+ }, null, 8, Ho),
3855
+ s("span", Xo, M(n.name), 1),
3856
+ r(W).some((O) => O.id === n.id) ? (l(), Q(b, {
3921
3857
  key: 0,
3922
3858
  class: "member-check"
3923
3859
  }, {
3924
3860
  default: v(() => [
3925
- i(r(Qt))
3861
+ i(r(Jt))
3926
3862
  ]),
3927
3863
  _: 1
3928
- })) : R("", !0)
3929
- ], 10, Ho))), 128))
3864
+ })) : L("", !0)
3865
+ ], 10, Wo))), 128))
3930
3866
  ]))
3931
3867
  ])
3932
3868
  ])
3933
3869
  ]),
3934
3870
  _: 1
3935
- }, 8, ["modelValue"])) : R("", !0),
3936
- i($e, {
3937
- modelValue: Qe.value,
3938
- "onUpdate:modelValue": e[52] || (e[52] = (n) => Qe.value = n),
3871
+ }, 8, ["modelValue"])) : L("", !0),
3872
+ i(Ne, {
3873
+ modelValue: Je.value,
3874
+ "onUpdate:modelValue": e[52] || (e[52] = (n) => Je.value = n),
3939
3875
  title: "个人设置",
3940
3876
  width: "560px",
3941
3877
  "close-on-click-modal": !1,
@@ -3943,158 +3879,158 @@ const wt = (y, t) => {
3943
3879
  class: "chat-settings-dialog"
3944
3880
  }, {
3945
3881
  default: v(() => [
3946
- s("div", jo, [
3947
- s("div", qo, [
3948
- s("div", Bo, [
3882
+ s("div", Yo, [
3883
+ s("div", jo, [
3884
+ s("div", qo, [
3949
3885
  s("img", {
3950
3886
  src: r(E),
3951
3887
  alt: "头像",
3952
3888
  class: "chat-settings-avatar"
3953
- }, null, 8, Po),
3954
- y.config.modules.avatarCrop ? (l(), m("div", {
3889
+ }, null, 8, Oo),
3890
+ g.config.modules.avatarCrop ? (l(), p("div", {
3955
3891
  key: 0,
3956
3892
  class: "chat-settings-avatar-edit",
3957
- onClick: xs
3893
+ onClick: Cs
3958
3894
  }, [
3959
- i(g, {
3895
+ i(b, {
3960
3896
  size: 18,
3961
3897
  class: "chat-settings-avatar-icon"
3962
3898
  }, {
3963
3899
  default: v(() => [
3964
- i(r(ua))
3900
+ i(r(ia))
3965
3901
  ]),
3966
3902
  _: 1
3967
3903
  })
3968
- ])) : R("", !0),
3904
+ ])) : L("", !0),
3969
3905
  s("input", {
3970
3906
  ref_key: "avatarInputRef",
3971
- ref: et,
3907
+ ref: Ze,
3972
3908
  type: "file",
3973
3909
  accept: "image/*",
3974
3910
  class: "hidden-avatar-input",
3975
- onChange: Es
3911
+ onChange: Ls
3976
3912
  }, null, 544)
3977
3913
  ]),
3978
- s("div", Oo, [
3979
- s("div", Jo, G(r(N).nickname || r(b)), 1),
3980
- s("div", Qo, "@" + G(r(b)), 1)
3914
+ s("div", Po, [
3915
+ s("div", Bo, M(r(N).nickname || r(y)), 1),
3916
+ s("div", Jo, "@" + M(r(y)), 1)
3981
3917
  ])
3982
3918
  ]),
3983
- s("div", Zo, [
3984
- s("div", el, [
3985
- s("div", tl, [
3986
- i(g, null, {
3919
+ s("div", Qo, [
3920
+ s("div", Zo, [
3921
+ s("div", el, [
3922
+ i(b, null, {
3987
3923
  default: v(() => [
3988
- i(r(gt))
3924
+ i(r(ft))
3989
3925
  ]),
3990
3926
  _: 1
3991
3927
  }),
3992
- e[113] || (e[113] = A(" 个人信息 ", -1))
3928
+ e[113] || (e[113] = T(" 个人信息 ", -1))
3993
3929
  ]),
3994
- Te.value ? R("", !0) : (l(), Z(j, {
3930
+ ze.value ? L("", !0) : (l(), Q(X, {
3995
3931
  key: 0,
3996
3932
  type: "primary",
3997
3933
  size: "small",
3998
- onClick: Ws,
3934
+ onClick: Ks,
3999
3935
  class: "chat-settings-edit-btn"
4000
3936
  }, {
4001
3937
  default: v(() => [...e[114] || (e[114] = [
4002
- A(" 编辑 ", -1)
3938
+ T(" 编辑 ", -1)
4003
3939
  ])]),
4004
3940
  _: 1
4005
3941
  }))
4006
3942
  ]),
4007
- s("div", sl, [
4008
- s("div", al, [
3943
+ s("div", tl, [
3944
+ s("div", sl, [
4009
3945
  e[115] || (e[115] = s("label", { class: "chat-settings-form-label" }, "昵称", -1)),
4010
- Te.value ? (l(), Z(H, {
3946
+ ze.value ? (l(), Q(J, {
4011
3947
  key: 0,
4012
- modelValue: Se.value.nickname,
4013
- "onUpdate:modelValue": e[48] || (e[48] = (n) => Se.value.nickname = n),
3948
+ modelValue: Me.value.nickname,
3949
+ "onUpdate:modelValue": e[48] || (e[48] = (n) => Me.value.nickname = n),
4014
3950
  placeholder: "请输入昵称",
4015
3951
  size: "large"
4016
- }, null, 8, ["modelValue"])) : (l(), m("div", nl, G(r(N).nickname || "未设置"), 1))
3952
+ }, null, 8, ["modelValue"])) : (l(), p("div", al, M(r(N).nickname || "未设置"), 1))
4017
3953
  ]),
4018
- s("div", rl, [
3954
+ s("div", nl, [
4019
3955
  e[116] || (e[116] = s("label", { class: "chat-settings-form-label" }, "邮箱", -1)),
4020
- Te.value ? (l(), Z(H, {
3956
+ ze.value ? (l(), Q(J, {
4021
3957
  key: 0,
4022
- modelValue: Se.value.email,
4023
- "onUpdate:modelValue": e[49] || (e[49] = (n) => Se.value.email = n),
3958
+ modelValue: Me.value.email,
3959
+ "onUpdate:modelValue": e[49] || (e[49] = (n) => Me.value.email = n),
4024
3960
  placeholder: "请输入邮箱",
4025
3961
  size: "large"
4026
- }, null, 8, ["modelValue"])) : (l(), m("div", ol, G(r(N).email || "未设置"), 1))
3962
+ }, null, 8, ["modelValue"])) : (l(), p("div", rl, M(r(N).email || "未设置"), 1))
4027
3963
  ]),
4028
- s("div", ll, [
3964
+ s("div", ol, [
4029
3965
  e[117] || (e[117] = s("label", { class: "chat-settings-form-label" }, "手机号", -1)),
4030
- Te.value ? (l(), Z(H, {
3966
+ ze.value ? (l(), Q(J, {
4031
3967
  key: 0,
4032
- modelValue: Se.value.phone,
4033
- "onUpdate:modelValue": e[50] || (e[50] = (n) => Se.value.phone = n),
3968
+ modelValue: Me.value.phone,
3969
+ "onUpdate:modelValue": e[50] || (e[50] = (n) => Me.value.phone = n),
4034
3970
  placeholder: "请输入手机号",
4035
3971
  size: "large"
4036
- }, null, 8, ["modelValue"])) : (l(), m("div", il, G(r(N).phone || "未设置"), 1))
3972
+ }, null, 8, ["modelValue"])) : (l(), p("div", ll, M(r(N).phone || "未设置"), 1))
4037
3973
  ]),
4038
- s("div", ul, [
3974
+ s("div", il, [
4039
3975
  e[118] || (e[118] = s("label", { class: "chat-settings-form-label" }, "个人简介", -1)),
4040
- Te.value ? (l(), Z(H, {
3976
+ ze.value ? (l(), Q(J, {
4041
3977
  key: 0,
4042
- modelValue: Se.value.bio,
4043
- "onUpdate:modelValue": e[51] || (e[51] = (n) => Se.value.bio = n),
3978
+ modelValue: Me.value.bio,
3979
+ "onUpdate:modelValue": e[51] || (e[51] = (n) => Me.value.bio = n),
4044
3980
  type: "textarea",
4045
3981
  rows: 4,
4046
3982
  placeholder: "介绍一下自己吧...",
4047
3983
  size: "large"
4048
- }, null, 8, ["modelValue"])) : (l(), m("div", cl, G(r(N).bio || "这个人很懒,什么都没写~"), 1))
3984
+ }, null, 8, ["modelValue"])) : (l(), p("div", ul, M(r(N).bio || "这个人很懒,什么都没写~"), 1))
4049
3985
  ]),
4050
- Te.value ? (l(), m("div", dl, [
4051
- i(j, {
3986
+ ze.value ? (l(), p("div", cl, [
3987
+ i(X, {
4052
3988
  size: "default",
4053
- onClick: Hs
3989
+ onClick: Ws
4054
3990
  }, {
4055
3991
  default: v(() => [...e[119] || (e[119] = [
4056
- A("取消", -1)
3992
+ T("取消", -1)
4057
3993
  ])]),
4058
3994
  _: 1
4059
3995
  }),
4060
- i(j, {
3996
+ i(X, {
4061
3997
  type: "primary",
4062
3998
  size: "default",
4063
- loading: dt.value,
4064
- onClick: Xs
3999
+ loading: ct.value,
4000
+ onClick: Hs
4065
4001
  }, {
4066
4002
  default: v(() => [...e[120] || (e[120] = [
4067
- A("保存更改", -1)
4003
+ T("保存更改", -1)
4068
4004
  ])]),
4069
4005
  _: 1
4070
4006
  }, 8, ["loading"])
4071
- ])) : R("", !0)
4007
+ ])) : L("", !0)
4072
4008
  ])
4073
4009
  ])
4074
4010
  ])
4075
4011
  ]),
4076
4012
  _: 1
4077
4013
  }, 8, ["modelValue"]),
4078
- i(Zt, {
4079
- modelValue: Ze.value,
4080
- "onUpdate:modelValue": e[53] || (e[53] = (n) => Ze.value = n),
4081
- src: pt.value,
4082
- onConfirm: Ds
4014
+ i(Qt, {
4015
+ modelValue: Qe.value,
4016
+ "onUpdate:modelValue": e[53] || (e[53] = (n) => Qe.value = n),
4017
+ src: dt.value,
4018
+ onConfirm: Es
4083
4019
  }, null, 8, ["modelValue", "src"]),
4084
- Ne.value.visible ? (l(), m("div", {
4020
+ Te.value.visible ? (l(), p("div", {
4085
4021
  key: 6,
4086
4022
  class: "chat-context-menu",
4087
- style: Ee({ left: Ne.value.x + "px", top: Ne.value.y + "px" })
4023
+ style: Le({ left: Te.value.x + "px", top: Te.value.y + "px" })
4088
4024
  }, [
4089
4025
  s("div", {
4090
4026
  class: "chat-context-menu-item",
4091
- onClick: bs
4027
+ onClick: ys
4092
4028
  }, "删除聊天")
4093
- ], 4)) : R("", !0)
4029
+ ], 4)) : L("", !0)
4094
4030
  ]);
4095
4031
  };
4096
4032
  }
4097
- }, ml = /* @__PURE__ */ wt(pl, [["__scopeId", "data-v-d3ae5bc1"]]), vl = {
4033
+ }, pl = /* @__PURE__ */ _t(dl, [["__scopeId", "data-v-18e78d30"]]), ml = {
4098
4034
  // API 配置
4099
4035
  api: {
4100
4036
  baseUrl: "",
@@ -4177,29 +4113,29 @@ const wt = (y, t) => {
4177
4113
  allowedTypes: ["*"]
4178
4114
  }
4179
4115
  };
4180
- function Vl(y = {}) {
4181
- const t = es(vl, y);
4116
+ function Sl(g = {}) {
4117
+ const t = Zt(ml, g);
4182
4118
  return t.api.baseUrl || console.warn("[VueChatKit] 请配置 api.baseUrl"), t.api.websocketUrl || console.warn("[VueChatKit] 请配置 api.websocketUrl"), t.user.username || console.warn("[VueChatKit] 请配置 user.username"), t;
4183
4119
  }
4184
- function es(y, t) {
4185
- const a = { ...y };
4120
+ function Zt(g, t) {
4121
+ const a = { ...g };
4186
4122
  for (const o in t)
4187
- t[o] && typeof t[o] == "object" && !Array.isArray(t[o]) ? a[o] = es(y[o] || {}, t[o]) : a[o] = t[o];
4123
+ t[o] && typeof t[o] == "object" && !Array.isArray(t[o]) ? a[o] = Zt(g[o] || {}, t[o]) : a[o] = t[o];
4188
4124
  return a;
4189
4125
  }
4190
- const Il = {
4191
- install(y) {
4192
- y.component("ChatPanel", ml), y.component("AvatarCrop", Zt);
4126
+ const Vl = {
4127
+ install(g) {
4128
+ g.component("ChatPanel", pl), g.component("AvatarCrop", Qt);
4193
4129
  }
4194
4130
  };
4195
4131
  export {
4196
- Zt as AvatarCrop,
4197
- kt as ChatApi,
4198
- ml as ChatPanel,
4199
- ca as ChatWebSocket,
4200
- da as HttpClient,
4201
- Il as VueChatKit,
4202
- Vl as createChatConfig,
4203
- Il as default,
4132
+ Qt as AvatarCrop,
4133
+ bt as ChatApi,
4134
+ pl as ChatPanel,
4135
+ ua as ChatWebSocket,
4136
+ ca as HttpClient,
4137
+ Vl as VueChatKit,
4138
+ Sl as createChatConfig,
4139
+ Vl as default,
4204
4140
  ha as useChat
4205
4141
  };