@medipha/chat 1.0.16 → 1.0.17
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.
- package/dist/index.cjs +9 -9
- package/dist/index.js +310 -294
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import o, { Component as s, Fragment as c, Suspense as l, createContext as u, cr
|
|
|
4
4
|
import { Link as E, Route as D, Routes as O, useNavigate as k, useParams as A } from "react-router-dom";
|
|
5
5
|
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
6
6
|
import * as P from "react-dom";
|
|
7
|
-
import
|
|
7
|
+
import F, { createPortal as I } from "react-dom";
|
|
8
8
|
//#region \0rolldown/runtime.js
|
|
9
|
-
var
|
|
9
|
+
var ee = Object.create, L = Object.defineProperty, te = Object.getOwnPropertyDescriptor, ne = Object.getOwnPropertyNames, re = Object.getPrototypeOf, ie = Object.prototype.hasOwnProperty, R = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ae = (e, t) => {
|
|
10
10
|
let n = {};
|
|
11
11
|
for (var r in e) L(n, r, {
|
|
12
12
|
get: e[r],
|
|
@@ -19,7 +19,7 @@ var I = Object.create, L = Object.defineProperty, te = Object.getOwnPropertyDesc
|
|
|
19
19
|
enumerable: !(r = te(t, s)) || r.enumerable
|
|
20
20
|
});
|
|
21
21
|
return e;
|
|
22
|
-
}, z = (e, t, n) => (n = e == null ? {} :
|
|
22
|
+
}, z = (e, t, n) => (n = e == null ? {} : ee(re(e)), oe(t || !e || !e.__esModule || !ie.call(e, "default") ? L(n, "default", {
|
|
23
23
|
value: e,
|
|
24
24
|
enumerable: !0
|
|
25
25
|
}) : n, e)), se = {
|
|
@@ -2931,7 +2931,7 @@ var ya = /*#__PURE__*/ a.forwardRef((e, t) => /*#__PURE__*/ a.createElement(Ur,
|
|
|
2931
2931
|
})));
|
|
2932
2932
|
process.env.NODE_ENV !== "production" && (ya.displayName = "PaperClipOutlined");
|
|
2933
2933
|
//#endregion
|
|
2934
|
-
//#region node_modules/.pnpm/@ant-design+icons@6.3.2_rea_2993242dac191668ff517cb365996d3d/node_modules/@ant-design/icons/es/icons/
|
|
2934
|
+
//#region node_modules/.pnpm/@ant-design+icons@6.3.2_rea_2993242dac191668ff517cb365996d3d/node_modules/@ant-design/icons/es/icons/PictureOutlined.js
|
|
2935
2935
|
var ba = /* @__PURE__ */ z((/* @__PURE__ */ R(((e) => {
|
|
2936
2936
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
2937
2937
|
icon: {
|
|
@@ -2942,10 +2942,10 @@ var ba = /* @__PURE__ */ z((/* @__PURE__ */ R(((e) => {
|
|
|
2942
2942
|
},
|
|
2943
2943
|
children: [{
|
|
2944
2944
|
tag: "path",
|
|
2945
|
-
attrs: { d: "
|
|
2945
|
+
attrs: { d: "M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z" }
|
|
2946
2946
|
}]
|
|
2947
2947
|
},
|
|
2948
|
-
name: "
|
|
2948
|
+
name: "picture",
|
|
2949
2949
|
theme: "outlined"
|
|
2950
2950
|
};
|
|
2951
2951
|
})))());
|
|
@@ -2962,9 +2962,9 @@ var Sa = /*#__PURE__*/ a.forwardRef((e, t) => /*#__PURE__*/ a.createElement(Ur,
|
|
|
2962
2962
|
ref: t,
|
|
2963
2963
|
icon: ba.default
|
|
2964
2964
|
})));
|
|
2965
|
-
process.env.NODE_ENV !== "production" && (Sa.displayName = "
|
|
2965
|
+
process.env.NODE_ENV !== "production" && (Sa.displayName = "PictureOutlined");
|
|
2966
2966
|
//#endregion
|
|
2967
|
-
//#region node_modules/.pnpm/@ant-design+icons@6.3.2_rea_2993242dac191668ff517cb365996d3d/node_modules/@ant-design/icons/es/icons/
|
|
2967
|
+
//#region node_modules/.pnpm/@ant-design+icons@6.3.2_rea_2993242dac191668ff517cb365996d3d/node_modules/@ant-design/icons/es/icons/ProfileOutlined.js
|
|
2968
2968
|
var Ca = /* @__PURE__ */ z((/* @__PURE__ */ R(((e) => {
|
|
2969
2969
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = {
|
|
2970
2970
|
icon: {
|
|
@@ -2975,10 +2975,10 @@ var Ca = /* @__PURE__ */ z((/* @__PURE__ */ R(((e) => {
|
|
|
2975
2975
|
},
|
|
2976
2976
|
children: [{
|
|
2977
2977
|
tag: "path",
|
|
2978
|
-
attrs: { d: "
|
|
2978
|
+
attrs: { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z" }
|
|
2979
2979
|
}]
|
|
2980
2980
|
},
|
|
2981
|
-
name: "
|
|
2981
|
+
name: "profile",
|
|
2982
2982
|
theme: "outlined"
|
|
2983
2983
|
};
|
|
2984
2984
|
})))());
|
|
@@ -2995,7 +2995,7 @@ var Ta = /*#__PURE__*/ a.forwardRef((e, t) => /*#__PURE__*/ a.createElement(Ur,
|
|
|
2995
2995
|
ref: t,
|
|
2996
2996
|
icon: Ca.default
|
|
2997
2997
|
})));
|
|
2998
|
-
process.env.NODE_ENV !== "production" && (Ta.displayName = "
|
|
2998
|
+
process.env.NODE_ENV !== "production" && (Ta.displayName = "ProfileOutlined");
|
|
2999
2999
|
//#endregion
|
|
3000
3000
|
//#region node_modules/.pnpm/@ant-design+icons@6.3.2_rea_2993242dac191668ff517cb365996d3d/node_modules/@ant-design/icons/es/icons/PushpinFilled.js
|
|
3001
3001
|
var Ea = /* @__PURE__ */ z((/* @__PURE__ */ R(((e) => {
|
|
@@ -4044,7 +4044,10 @@ function ks({ label: e, value: t, options: n, onChange: r, disabled: i }) {
|
|
|
4044
4044
|
g.current = !1;
|
|
4045
4045
|
return;
|
|
4046
4046
|
}
|
|
4047
|
-
o(
|
|
4047
|
+
o((e) => {
|
|
4048
|
+
let t = !e;
|
|
4049
|
+
return t && (b(), x()), t;
|
|
4050
|
+
});
|
|
4048
4051
|
}
|
|
4049
4052
|
}, T = (e) => {
|
|
4050
4053
|
e.target === e.currentTarget && (i || a || (g.current = !0, b(), x(), o(!0)));
|
|
@@ -4172,17 +4175,20 @@ function Ms({ label: e, value: t, options: n, onChange: r, disabled: i }) {
|
|
|
4172
4175
|
u("");
|
|
4173
4176
|
let e = n.findIndex((e) => t.includes(e.value));
|
|
4174
4177
|
f(Math.max(e, 0));
|
|
4175
|
-
},
|
|
4178
|
+
}, F = () => {
|
|
4176
4179
|
if (!i) {
|
|
4177
4180
|
if (T.current) {
|
|
4178
4181
|
T.current = !1;
|
|
4179
4182
|
return;
|
|
4180
4183
|
}
|
|
4181
|
-
o(
|
|
4184
|
+
o((e) => {
|
|
4185
|
+
let t = !e;
|
|
4186
|
+
return t && (j(), P()), t;
|
|
4187
|
+
});
|
|
4182
4188
|
}
|
|
4183
|
-
}, F = (e) => {
|
|
4184
|
-
e.target === e.currentTarget && (i || a || (T.current = !0, j(), P(), o(!0)));
|
|
4185
4189
|
}, I = (e) => {
|
|
4190
|
+
e.target === e.currentTarget && (i || a || (T.current = !0, j(), P(), o(!0)));
|
|
4191
|
+
}, ee = (e) => {
|
|
4186
4192
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), !i && o((e) => {
|
|
4187
4193
|
let t = !e;
|
|
4188
4194
|
return t && (j(), P()), t;
|
|
@@ -4209,9 +4215,9 @@ function Ms({ label: e, value: t, options: n, onChange: r, disabled: i }) {
|
|
|
4209
4215
|
role: "button",
|
|
4210
4216
|
tabIndex: i ? -1 : 0,
|
|
4211
4217
|
"aria-disabled": i || void 0,
|
|
4212
|
-
onClick:
|
|
4213
|
-
onFocus:
|
|
4214
|
-
onKeyDown:
|
|
4218
|
+
onClick: F,
|
|
4219
|
+
onFocus: I,
|
|
4220
|
+
onKeyDown: ee,
|
|
4215
4221
|
children: O ? /* @__PURE__ */ N("div", {
|
|
4216
4222
|
className: "multi-select-filter-tags",
|
|
4217
4223
|
ref: _,
|
|
@@ -4470,7 +4476,7 @@ function Qs({ message: e, className: t }) {
|
|
|
4470
4476
|
//#endregion
|
|
4471
4477
|
//#region src/pages/Setting/members/settings-modal.tsx
|
|
4472
4478
|
function $s({ title: e, children: t, onClose: n, medium: r }) {
|
|
4473
|
-
return zs(n),
|
|
4479
|
+
return zs(n), I(/* @__PURE__ */ M("div", {
|
|
4474
4480
|
className: "med-chat-root med-chat-root--portal",
|
|
4475
4481
|
children: /* @__PURE__ */ M("div", {
|
|
4476
4482
|
className: "chat-modal-backdrop chat-modal-backdrop--layered",
|
|
@@ -4763,7 +4769,7 @@ function oc({ users: e, isCreating: t, isLoadingUsers: n, error: r, onSelectUser
|
|
|
4763
4769
|
function sc({ currentUserId: e, onClose: t, onCreated: n }) {
|
|
4764
4770
|
let [r, i] = w("direct"), [a, o] = w([]), [s, c] = w(!0), [l, u] = w(!1), [d, f] = w(""), [p, m] = w(""), [h, g] = w(""), _ = go(p, 450), [v, b] = w(""), [x, S] = w(!1), [T, E] = w(Ks), D = C(null);
|
|
4765
4771
|
zs(t);
|
|
4766
|
-
let { branchId: O, departmentId: k, branchOptions: A, departmentOptions: j, handleBranchChange: P, setDepartmentId:
|
|
4772
|
+
let { branchId: O, departmentId: k, branchOptions: A, departmentOptions: j, handleBranchChange: P, setDepartmentId: F } = Ls();
|
|
4767
4773
|
y(() => {
|
|
4768
4774
|
let t = !0;
|
|
4769
4775
|
return c(!0), f(""), pn({
|
|
@@ -4789,9 +4795,9 @@ function sc({ currentUserId: e, onClose: t, onCreated: n }) {
|
|
|
4789
4795
|
]), y(() => {
|
|
4790
4796
|
g(_.trim());
|
|
4791
4797
|
}, [_]);
|
|
4792
|
-
let
|
|
4798
|
+
let I = (e) => {
|
|
4793
4799
|
e.preventDefault(), g(p.trim());
|
|
4794
|
-
},
|
|
4800
|
+
}, ee = async (e) => {
|
|
4795
4801
|
u(!0), f("");
|
|
4796
4802
|
try {
|
|
4797
4803
|
let t = await _n(e), r = Fo(t);
|
|
@@ -4869,7 +4875,7 @@ function sc({ currentUserId: e, onClose: t, onCreated: n }) {
|
|
|
4869
4875
|
label: "Phòng ban",
|
|
4870
4876
|
value: k,
|
|
4871
4877
|
options: j,
|
|
4872
|
-
onChange:
|
|
4878
|
+
onChange: F,
|
|
4873
4879
|
disabled: !O
|
|
4874
4880
|
}),
|
|
4875
4881
|
/* @__PURE__ */ M(Ms, {
|
|
@@ -4882,7 +4888,7 @@ function sc({ currentUserId: e, onClose: t, onCreated: n }) {
|
|
|
4882
4888
|
}),
|
|
4883
4889
|
/* @__PURE__ */ N("form", {
|
|
4884
4890
|
className: "chat-modal-search chat-modal-search--pill",
|
|
4885
|
-
onSubmit:
|
|
4891
|
+
onSubmit: I,
|
|
4886
4892
|
children: [/* @__PURE__ */ M(Ba, { "aria-hidden": "true" }), /* @__PURE__ */ M("input", {
|
|
4887
4893
|
value: p,
|
|
4888
4894
|
onChange: (e) => m(e.target.value),
|
|
@@ -4897,7 +4903,7 @@ function sc({ currentUserId: e, onClose: t, onCreated: n }) {
|
|
|
4897
4903
|
error: d,
|
|
4898
4904
|
onSelectUser: (e) => {
|
|
4899
4905
|
let t = Fo(e);
|
|
4900
|
-
!t || l ||
|
|
4906
|
+
!t || l || ee({
|
|
4901
4907
|
type: "DIRECT",
|
|
4902
4908
|
title: "",
|
|
4903
4909
|
memberIds: [t]
|
|
@@ -4910,7 +4916,7 @@ function sc({ currentUserId: e, onClose: t, onCreated: n }) {
|
|
|
4910
4916
|
isLoadingUsers: s,
|
|
4911
4917
|
error: d,
|
|
4912
4918
|
onSubmit: (e, t, n) => {
|
|
4913
|
-
|
|
4919
|
+
ee({
|
|
4914
4920
|
type: "GROUP",
|
|
4915
4921
|
title: e,
|
|
4916
4922
|
memberIds: t,
|
|
@@ -5105,15 +5111,11 @@ function Ec({ state: e, onClose: t, onIndexChange: n }) {
|
|
|
5105
5111
|
};
|
|
5106
5112
|
if (y(() => {
|
|
5107
5113
|
u(1);
|
|
5108
|
-
}, [i]), y(() => {
|
|
5114
|
+
}, [i]), zs(t), y(() => {
|
|
5109
5115
|
let e = (e) => {
|
|
5110
|
-
if (e.key === "Escape") {
|
|
5111
|
-
e.stopPropagation(), t();
|
|
5112
|
-
return;
|
|
5113
|
-
}
|
|
5114
5116
|
e.key === "ArrowLeft" && d(), e.key === "ArrowRight" && f();
|
|
5115
5117
|
};
|
|
5116
|
-
return document.addEventListener("keydown", e
|
|
5118
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
5117
5119
|
}, [r, i]), y(() => {
|
|
5118
5120
|
o.current?.scrollIntoView({
|
|
5119
5121
|
block: "nearest",
|
|
@@ -5261,12 +5263,7 @@ function Ac({ userId: e, fallbackName: t, onClose: n, onStartChat: r }) {
|
|
|
5261
5263
|
}), () => {
|
|
5262
5264
|
t = !1;
|
|
5263
5265
|
};
|
|
5264
|
-
}, [e]),
|
|
5265
|
-
let e = (e) => {
|
|
5266
|
-
e.key === "Escape" && n();
|
|
5267
|
-
};
|
|
5268
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
5269
|
-
}, [n]);
|
|
5266
|
+
}, [e]), zs(n);
|
|
5270
5267
|
let u = (i ? Io(i) : void 0) ?? t ?? "Người dùng", d = un(i?.avatarUrl ?? i?.avatar ?? null), f = [
|
|
5271
5268
|
{
|
|
5272
5269
|
label: "Họ tên",
|
|
@@ -5298,7 +5295,7 @@ function Ac({ userId: e, fallbackName: t, onClose: n, onStartChat: r }) {
|
|
|
5298
5295
|
value: Dc(i?.jobTitleName)
|
|
5299
5296
|
}
|
|
5300
5297
|
];
|
|
5301
|
-
return
|
|
5298
|
+
return I(/* @__PURE__ */ N("div", {
|
|
5302
5299
|
className: "med-chat-root med-chat-root--portal",
|
|
5303
5300
|
children: [/* @__PURE__ */ M("div", {
|
|
5304
5301
|
className: "chat-modal-backdrop chat-modal-backdrop--layered",
|
|
@@ -6265,7 +6262,7 @@ var Fl = 1e5, Il = 1e3, Ll = {
|
|
|
6265
6262
|
return /^\d+$/.test(t) ? BigInt(t) : null;
|
|
6266
6263
|
};
|
|
6267
6264
|
function zl(e) {
|
|
6268
|
-
let [t, n] = w([]), [r, i] = w(Ll), [a, o] = w(Fl), [s, c] = w("latest"), [l, u] = w(null), [d, f] = w(null), [p, m] = w(0), [h, _] = w(!1), [v, b] = w(!1), [S, T] = w(!1), [E, D] = w(!1), [O, k] = w(!1), A = C(!1), [j, M] = w(!0), [N, P] = w(""),
|
|
6265
|
+
let [t, n] = w([]), [r, i] = w(Ll), [a, o] = w(Fl), [s, c] = w("latest"), [l, u] = w(null), [d, f] = w(null), [p, m] = w(0), [h, _] = w(!1), [v, b] = w(!1), [S, T] = w(!1), [E, D] = w(!1), [O, k] = w(!1), A = C(!1), [j, M] = w(!0), [N, P] = w(""), F = C(/* @__PURE__ */ new Map()), I = C(e), ee = C([]), L = C(Ll), te = C("latest"), ne = C(!0), re = C(null), ie = C({
|
|
6269
6266
|
latest: !1,
|
|
6270
6267
|
older: !1,
|
|
6271
6268
|
newer: !1,
|
|
@@ -6275,8 +6272,8 @@ function zl(e) {
|
|
|
6275
6272
|
older: null,
|
|
6276
6273
|
newer: null
|
|
6277
6274
|
}), ae = C(0), oe = C(!1), [z, se] = w(e);
|
|
6278
|
-
z !== e && (se(e), n([]), i(Ll), o(Fl), c("latest"), u(null), f(null), k(!1), A.current = !1, M(!0), P(""),
|
|
6279
|
-
|
|
6275
|
+
z !== e && (se(e), n([]), i(Ll), o(Fl), c("latest"), u(null), f(null), k(!1), A.current = !1, M(!0), P(""), F.current.clear()), x(() => {
|
|
6276
|
+
I.current = e, ae.current += 1, ee.current = [], L.current = Ll, te.current = "latest", ne.current = !0, re.current = null, oe.current = !1, ie.current = {
|
|
6280
6277
|
latest: !1,
|
|
6281
6278
|
older: !1,
|
|
6282
6279
|
newer: !1,
|
|
@@ -6285,12 +6282,12 @@ function zl(e) {
|
|
|
6285
6282
|
};
|
|
6286
6283
|
}, [e]);
|
|
6287
6284
|
let B = g((e) => {
|
|
6288
|
-
let t = e.id ?
|
|
6285
|
+
let t = e.id ? F.current.get(String(e.id)) : void 0, n = e.replyTo ? F.current.get(String(e.replyTo.id)) : void 0, r = t ? vs(e, t) : e;
|
|
6289
6286
|
return n && r.replyTo ? {
|
|
6290
6287
|
...r,
|
|
6291
6288
|
replyTo: _s(r.replyTo, n)
|
|
6292
6289
|
} : r;
|
|
6293
|
-
}, []), ce = g((e, t) => String(
|
|
6290
|
+
}, []), ce = g((e, t) => String(I.current ?? "") === String(e ?? "") && ae.current === t, []), le = g((e) => {
|
|
6294
6291
|
L.current = e, i(e);
|
|
6295
6292
|
}, []), ue = g((e) => {
|
|
6296
6293
|
A.current = e, k(e);
|
|
@@ -6316,15 +6313,15 @@ function zl(e) {
|
|
|
6316
6313
|
pe
|
|
6317
6314
|
]), he = g((e, t, r = null) => {
|
|
6318
6315
|
let i = me(e), a = Ts(i.messages), s = r ?? i.targetMessageId ?? null;
|
|
6319
|
-
return
|
|
6316
|
+
return ee.current = a, n(a), le({
|
|
6320
6317
|
oldestSequence: i.oldestSequence,
|
|
6321
6318
|
newestSequence: i.newestSequence,
|
|
6322
6319
|
hasOlderMessages: i.hasOlderMessages,
|
|
6323
6320
|
hasNewerMessages: i.hasNewerMessages
|
|
6324
6321
|
}), o(Fl), te.current = t, c(t), u(s), f(s ? a.findIndex((e) => String(e.id) === String(s)) : null), i;
|
|
6325
6322
|
}, [me, le]), ge = g((e, t) => {
|
|
6326
|
-
let r = me(e), i =
|
|
6327
|
-
return
|
|
6323
|
+
let r = me(e), i = ee.current, a = Ds(i, r.messages), s = Math.max(0, a.length - i.length);
|
|
6324
|
+
return ee.current = a, n(a), t === "older" ? (o((e) => e - s), le({
|
|
6328
6325
|
...L.current,
|
|
6329
6326
|
oldestSequence: r.oldestSequence,
|
|
6330
6327
|
hasOlderMessages: r.hasOlderMessages
|
|
@@ -6442,8 +6439,8 @@ function zl(e) {
|
|
|
6442
6439
|
ue(!0);
|
|
6443
6440
|
return;
|
|
6444
6441
|
}
|
|
6445
|
-
let c = o !== null && s !== null && o > s + 1n, l = Ds(
|
|
6446
|
-
if (
|
|
6442
|
+
let c = o !== null && s !== null && o > s + 1n, l = Ds(ee.current, [i]);
|
|
6443
|
+
if (ee.current = l, n(l), c) {
|
|
6447
6444
|
le({
|
|
6448
6445
|
...L.current,
|
|
6449
6446
|
hasNewerMessages: !0
|
|
@@ -6464,28 +6461,28 @@ function zl(e) {
|
|
|
6464
6461
|
le,
|
|
6465
6462
|
ue
|
|
6466
6463
|
]), we = g((e) => {
|
|
6467
|
-
let t = Ds(
|
|
6468
|
-
|
|
6464
|
+
let t = Ds(ee.current, [B(e)]);
|
|
6465
|
+
ee.current = t, n(t);
|
|
6469
6466
|
}, [B]), Te = g((e) => {
|
|
6470
|
-
let t =
|
|
6471
|
-
|
|
6467
|
+
let t = ee.current.filter((t) => t.clientMessageId !== e);
|
|
6468
|
+
ee.current = t, n(t);
|
|
6472
6469
|
}, []), Ee = g((t) => {
|
|
6473
6470
|
if (String(t.conversationId) !== String(e)) return;
|
|
6474
|
-
|
|
6475
|
-
let r =
|
|
6471
|
+
F.current.set(String(t.messageId), t);
|
|
6472
|
+
let r = ee.current.map((e) => {
|
|
6476
6473
|
let n = String(e.id) === String(t.messageId) ? vs(e, t) : e;
|
|
6477
6474
|
return n.replyTo && String(n.replyTo.id) === String(t.messageId) ? {
|
|
6478
6475
|
...n,
|
|
6479
6476
|
replyTo: _s(n.replyTo, t)
|
|
6480
6477
|
} : n;
|
|
6481
6478
|
});
|
|
6482
|
-
|
|
6483
|
-
}, [e]), De = g((e) =>
|
|
6484
|
-
let r =
|
|
6479
|
+
ee.current = r, n(r);
|
|
6480
|
+
}, [e]), De = g((e) => F.current.has(String(e)) || ee.current.some((t) => String(t.id) === String(e) && gs(t)), []), Oe = g((e, t) => {
|
|
6481
|
+
let r = ee.current.map((n) => String(n.id) === String(e) && !gs(n) ? {
|
|
6485
6482
|
...n,
|
|
6486
6483
|
reactionSummary: typeof t == "function" ? t(n.reactionSummary) : t
|
|
6487
6484
|
} : n);
|
|
6488
|
-
|
|
6485
|
+
ee.current = r, n(r);
|
|
6489
6486
|
}, []), ke = g(() => {
|
|
6490
6487
|
u(null), f(null);
|
|
6491
6488
|
}, []), Ae = g(() => {
|
|
@@ -6498,7 +6495,7 @@ function zl(e) {
|
|
|
6498
6495
|
e && L.current.hasNewerMessages && be();
|
|
6499
6496
|
}, [_e, be]);
|
|
6500
6497
|
return y(() => {
|
|
6501
|
-
|
|
6498
|
+
I.current = e, ae.current += 1, ee.current = [], L.current = Ll, te.current = "latest", ne.current = !0, re.current = null, F.current.clear(), oe.current = !1, ie.current = {
|
|
6502
6499
|
latest: !1,
|
|
6503
6500
|
older: !1,
|
|
6504
6501
|
newer: !1,
|
|
@@ -6956,7 +6953,7 @@ function iu({ title: e, avatarUrl: t, isGroup: n, isVerified: i, groupMemberCoun
|
|
|
6956
6953
|
"aria-label": "Thông tin",
|
|
6957
6954
|
"aria-pressed": d,
|
|
6958
6955
|
onClick: f,
|
|
6959
|
-
children: /* @__PURE__ */ M(
|
|
6956
|
+
children: /* @__PURE__ */ M(Ta, {})
|
|
6960
6957
|
})
|
|
6961
6958
|
})]
|
|
6962
6959
|
})
|
|
@@ -10553,7 +10550,7 @@ function vm(e, t, n, r = Od, i, a) {
|
|
|
10553
10550
|
viewportHeight: i
|
|
10554
10551
|
});
|
|
10555
10552
|
};
|
|
10556
|
-
n.suppressFlushSync === !0 ? u() :
|
|
10553
|
+
n.suppressFlushSync === !0 ? u() : F.flushSync(u), c.current !== null && (o === c.current || o <= 0 || o === r - i) && (c.current = null, t(!0), l.current &&= (clearTimeout(l.current), null));
|
|
10557
10554
|
}, [
|
|
10558
10555
|
e,
|
|
10559
10556
|
t,
|
|
@@ -11177,18 +11174,18 @@ var yh = /* @__PURE__ */ Qd(([{ increaseViewportBy: e, listBoundary: t, overscan
|
|
|
11177
11174
|
}), D = Yd(), O = Yd(), k = G(0), A = G(null), j = G({
|
|
11178
11175
|
column: 0,
|
|
11179
11176
|
row: 0
|
|
11180
|
-
}), M = Yd(), N = Yd(), P = G(!1),
|
|
11181
|
-
Md(W(m, Gd(
|
|
11182
|
-
Nd(
|
|
11183
|
-
}), Md(W(tf(m,
|
|
11177
|
+
}), M = Yd(), N = Yd(), P = G(!1), F = G(0), I = G(!0), ee = G(!1), L = G(!1);
|
|
11178
|
+
Md(W(m, Gd(F), Bd(([e, t]) => !xp(t))), () => {
|
|
11179
|
+
Nd(I, !1);
|
|
11180
|
+
}), Md(W(tf(m, I, E, T, F, ee), Bd(([e, t, n, r, , i]) => e && !t && n.height !== 0 && r.height !== 0 && !i)), ([, , , , e]) => {
|
|
11184
11181
|
if (e === void 0) {
|
|
11185
|
-
Nd(
|
|
11182
|
+
Nd(I, !0);
|
|
11186
11183
|
return;
|
|
11187
11184
|
}
|
|
11188
|
-
Nd(
|
|
11185
|
+
Nd(ee, !0), yp(1, () => {
|
|
11189
11186
|
Nd(D, e);
|
|
11190
11187
|
}), Id(W(l), () => {
|
|
11191
|
-
Nd(t, [0, 0]), Nd(
|
|
11188
|
+
Nd(t, [0, 0]), Nd(I, !0);
|
|
11192
11189
|
});
|
|
11193
11190
|
}), H(W(N, Bd((e) => e != null && e.scrollTop > 0), Vd(0)), C), Md(W(m, Gd(N), Bd(([, e]) => e != null)), ([, e]) => {
|
|
11194
11191
|
e && (Nd(T, e.viewport), Nd(E, e.item), Nd(j, e.gap), e.scrollTop > 0 && (Nd(P, !0), Id(W(l, Ud(1)), (e) => {
|
|
@@ -11199,7 +11196,7 @@ var yh = /* @__PURE__ */ Qd(([{ increaseViewportBy: e, listBoundary: t, overscan
|
|
|
11199
11196
|
item: t,
|
|
11200
11197
|
scrollTop: r,
|
|
11201
11198
|
viewport: e
|
|
11202
|
-
}))), M), H(W(tf(nf(S), r, nf(j, vh), nf(E, _h), nf(T, _h), nf(A), nf(C), nf(P), nf(
|
|
11199
|
+
}))), M), H(W(tf(nf(S), r, nf(j, vh), nf(E, _h), nf(T, _h), nf(A), nf(C), nf(P), nf(I), nf(F)), Bd(([, , , , , , , e]) => !e), U(([e, [t, n], r, i, a, o, s, , c, l]) => {
|
|
11203
11200
|
let { column: u, row: d } = r, { height: f, width: p } = i, { width: m } = a;
|
|
11204
11201
|
if (s === 0 && (e === 0 || m === 0)) return ch;
|
|
11205
11202
|
if (p === 0) {
|
|
@@ -11272,7 +11269,7 @@ var yh = /* @__PURE__ */ Qd(([{ increaseViewportBy: e, listBoundary: t, overscan
|
|
|
11272
11269
|
...p,
|
|
11273
11270
|
gridState: w,
|
|
11274
11271
|
horizontalDirection: L,
|
|
11275
|
-
initialTopMostItemIndex:
|
|
11272
|
+
initialTopMostItemIndex: F,
|
|
11276
11273
|
totalListHeight: R,
|
|
11277
11274
|
...f,
|
|
11278
11275
|
endReached: ne,
|
|
@@ -11613,7 +11610,7 @@ function Vh({ conversationId: e, canManagePins: n, onJump: r, timelineRef: i })
|
|
|
11613
11610
|
children: [a.length, " ghim"]
|
|
11614
11611
|
})]
|
|
11615
11612
|
}),
|
|
11616
|
-
s && i.current ?
|
|
11613
|
+
s && i.current ? I(/* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
|
|
11617
11614
|
className: "pinned-dropdown-scrim",
|
|
11618
11615
|
onClick: () => c(!1)
|
|
11619
11616
|
}), /* @__PURE__ */ N("div", {
|
|
@@ -11822,7 +11819,7 @@ var Gh = (e, t, n, r) => {
|
|
|
11822
11819
|
//#region src/features/message-list/overlays/reaction/reaction-modal.tsx
|
|
11823
11820
|
function Jh({ message: e, filter: t, items: n, isLoading: r, error: i, hasMore: a, onFilterChange: o, onLoadMore: s, onRetry: c, onClose: l, members: u, onOpenProfile: d }) {
|
|
11824
11821
|
let f = e.reactionSummary.byType;
|
|
11825
|
-
return /* @__PURE__ */ M("div", {
|
|
11822
|
+
return zs(l), /* @__PURE__ */ M("div", {
|
|
11826
11823
|
className: "chat-modal-backdrop",
|
|
11827
11824
|
role: "presentation",
|
|
11828
11825
|
onClick: l,
|
|
@@ -11976,7 +11973,7 @@ function Zh({ enabled: e, isLoading: t, onLoadMore: n }) {
|
|
|
11976
11973
|
//#endregion
|
|
11977
11974
|
//#region src/features/message-list/overlays/system-members/system-members-modal.tsx
|
|
11978
11975
|
function Qh({ totalCount: e, actionLabel: t, items: n, isLoading: r, error: i, hasMore: a, onLoadMore: o, onRetry: s, onClose: c, members: l, onOpenProfile: u }) {
|
|
11979
|
-
return /* @__PURE__ */ M("div", {
|
|
11976
|
+
return zs(c), /* @__PURE__ */ M("div", {
|
|
11980
11977
|
className: "chat-modal-backdrop",
|
|
11981
11978
|
role: "presentation",
|
|
11982
11979
|
onClick: c,
|
|
@@ -12124,7 +12121,7 @@ function ng(e, t, n) {
|
|
|
12124
12121
|
//#region src/features/message-list/overlays/message-details/message-details-modal.tsx
|
|
12125
12122
|
function rg({ message: e, isGroup: t, members: n, otherMember: r, currentUserId: i, authUser: a, seenBy: o, onClose: s }) {
|
|
12126
12123
|
let c = Gh(e.senderId, n, i, a), l = qh(e.senderId, n), u = r?.lastReadSequence !== void 0 && e.sequence !== void 0 && BigInt(r.lastReadSequence) >= BigInt(e.sequence);
|
|
12127
|
-
return /* @__PURE__ */ M("div", {
|
|
12124
|
+
return zs(s), /* @__PURE__ */ M("div", {
|
|
12128
12125
|
className: "chat-modal-backdrop",
|
|
12129
12126
|
role: "presentation",
|
|
12130
12127
|
onClick: s,
|
|
@@ -12319,7 +12316,7 @@ function cg({ canRemove: e, removeLabel: t, isRemoving: n, canManagePins: r, can
|
|
|
12319
12316
|
s ? f() : d(e.currentTarget.getBoundingClientRect());
|
|
12320
12317
|
},
|
|
12321
12318
|
children: /* @__PURE__ */ M(Li, {})
|
|
12322
|
-
}), s && c ?
|
|
12319
|
+
}), s && c ? I(/* @__PURE__ */ M("div", {
|
|
12323
12320
|
className: "med-chat-root med-chat-root--portal",
|
|
12324
12321
|
children: /* @__PURE__ */ N("div", {
|
|
12325
12322
|
className: "message-options-menu",
|
|
@@ -24307,7 +24304,7 @@ function CM() {
|
|
|
24307
24304
|
setRenderer(e, n) {
|
|
24308
24305
|
t = {
|
|
24309
24306
|
...t,
|
|
24310
|
-
[e]:
|
|
24307
|
+
[e]: F.createPortal(n.reactElement, n.element, e)
|
|
24311
24308
|
}, r();
|
|
24312
24309
|
},
|
|
24313
24310
|
removeRenderer(e) {
|
|
@@ -27588,7 +27585,7 @@ function iI(e) {
|
|
|
27588
27585
|
var aI = 10, oI = 650;
|
|
27589
27586
|
function sI({ emoji: e, x: t, y: n }) {
|
|
27590
27587
|
let [r] = w(() => Array.from({ length: aI }, (e, t) => 360 / aI * t + (Math.random() * 24 - 12)));
|
|
27591
|
-
return
|
|
27588
|
+
return I(/* @__PURE__ */ M("div", {
|
|
27592
27589
|
className: "reaction-burst-viewport",
|
|
27593
27590
|
"aria-hidden": "true",
|
|
27594
27591
|
children: /* @__PURE__ */ M("div", {
|
|
@@ -27734,7 +27731,7 @@ function dI(e, t, n) {
|
|
|
27734
27731
|
children: i.value.replace(/^@/, "")
|
|
27735
27732
|
}, i.key) : /* @__PURE__ */ M("span", { children: i.value }, i.key));
|
|
27736
27733
|
}
|
|
27737
|
-
function fI({ message: e, isMine: t, isGroup: n, isFocused: r, isLatestMessage: i, showDayDivider: a, isReactionPickerOpen: o, myReactionType: s, onOpenReactionPicker: c, onCloseReactionPickerIfSelf: l, onApplyReaction: u, onRemoveReaction: d, onOpenReactionModal: f, canManagePins: p, isPinned: m, onTogglePin: h, isMenuOpen: g, menuPosition: _, onOpenMenu: v, onCloseMenu: y, onCopyMessage: b, onViewDetails: x, canRemove: S, removeLabel: C, isRemoving: w, onRemove: T, onReply: E, onForward: D, onJumpToReply: O, onOpenMentionCard: k, onOpenSystemMembers: A, onOpenImageLightbox: P, onImageSettled:
|
|
27734
|
+
function fI({ message: e, isMine: t, isGroup: n, isFocused: r, isLatestMessage: i, showDayDivider: a, isReactionPickerOpen: o, myReactionType: s, onOpenReactionPicker: c, onCloseReactionPickerIfSelf: l, onApplyReaction: u, onRemoveReaction: d, onOpenReactionModal: f, canManagePins: p, isPinned: m, onTogglePin: h, isMenuOpen: g, menuPosition: _, onOpenMenu: v, onCloseMenu: y, onCopyMessage: b, onViewDetails: x, canRemove: S, removeLabel: C, isRemoving: w, onRemove: T, onReply: E, onForward: D, onJumpToReply: O, onOpenMentionCard: k, onOpenSystemMembers: A, onOpenImageLightbox: P, onImageSettled: F, onRetry: I, onDeleteFailed: ee, resolveUserAvatar: L, onOpenUserProfile: te }) {
|
|
27738
27735
|
let ne = gs(e), re = a ? Hc(e.createdAt) : null, ie = re ? /* @__PURE__ */ M("div", {
|
|
27739
27736
|
className: "message-day-divider",
|
|
27740
27737
|
children: /* @__PURE__ */ N("span", { children: [re === "Hôm nay" ? "" : `${Bc(e.createdAt)} · `, re] })
|
|
@@ -27821,7 +27818,7 @@ function fI({ message: e, isMine: t, isGroup: n, isFocused: r, isLatestMessage:
|
|
|
27821
27818
|
message: e,
|
|
27822
27819
|
isLatestMessage: i,
|
|
27823
27820
|
onOpenImageLightbox: P,
|
|
27824
|
-
onImageSettled:
|
|
27821
|
+
onImageSettled: F,
|
|
27825
27822
|
onOpenMentionCard: k
|
|
27826
27823
|
}),
|
|
27827
27824
|
R ? null : /* @__PURE__ */ N("time", {
|
|
@@ -27863,12 +27860,12 @@ function fI({ message: e, isMine: t, isGroup: n, isFocused: r, isLatestMessage:
|
|
|
27863
27860
|
children: [/* @__PURE__ */ M("button", {
|
|
27864
27861
|
className: "message-retry",
|
|
27865
27862
|
type: "button",
|
|
27866
|
-
onClick:
|
|
27863
|
+
onClick: I,
|
|
27867
27864
|
children: "Thử lại"
|
|
27868
27865
|
}), /* @__PURE__ */ M("button", {
|
|
27869
27866
|
className: "message-delete-failed",
|
|
27870
27867
|
type: "button",
|
|
27871
|
-
onClick:
|
|
27868
|
+
onClick: ee,
|
|
27872
27869
|
children: "Xóa"
|
|
27873
27870
|
})]
|
|
27874
27871
|
}) : null]
|
|
@@ -27877,38 +27874,38 @@ function fI({ message: e, isMine: t, isGroup: n, isFocused: r, isLatestMessage:
|
|
|
27877
27874
|
}
|
|
27878
27875
|
//#endregion
|
|
27879
27876
|
//#region src/pages/conversation/conversation-detail/conversation-detail.tsx
|
|
27880
|
-
var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError: i, isTimelineReady: a, isFollowingLatest: o, messageWindow: s, isRemovedMessageId: c, virtuosoRef: l, setScrollerRef: u, handleTimelineScrolling: d, handleVisibleRangeChanged: f, visibleDayLabel: p, isNearBottomOfList: m, onCatchUp: h, members: _, isGroup: v, groupMemberCount: x, currentUserId: S, authUser: C, composerError:
|
|
27881
|
-
let
|
|
27882
|
-
b(
|
|
27883
|
-
let
|
|
27877
|
+
var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError: i, isTimelineReady: a, isFollowingLatest: o, messageWindow: s, isRemovedMessageId: c, virtuosoRef: l, setScrollerRef: u, handleTimelineScrolling: d, handleVisibleRangeChanged: f, visibleDayLabel: p, isNearBottomOfList: m, onCatchUp: h, members: _, isGroup: v, groupMemberCount: x, currentUserId: S, authUser: C, composerError: T, pendingAttachments: E, onRemovePendingAttachment: D, canModerateMessages: O, canManagePins: k, dayDividerKeys: A, replyTargetState: P, onForward: F, onJumpToReply: I, onOpenMentionCard: ee, onOpenUserProfile: L, onOpenImageLightbox: te, onRetry: ne, onDeleteFailed: re, stickToLatestRef: ie, readIsFollowingLatest: R, scrollToLatest: ae, loadAround: oe, onMessageRemoved: z }, se) {
|
|
27878
|
+
let [B, ce] = w(null), le = E.filter((e) => e.previewUrl), ue = Hh(), de = zh(e, () => ue.closePicker()), fe = Wh(), pe = Xh(), me = tg(t), he = ng(_, v, x);
|
|
27879
|
+
b(se, () => ({ closeMessageMenu: me.closeMenu }), [me.closeMenu]);
|
|
27880
|
+
let ge = g((t) => {
|
|
27884
27881
|
if (String(t.conversationId) !== String(e)) return;
|
|
27885
27882
|
let n = String(t.messageId);
|
|
27886
|
-
|
|
27883
|
+
me.clearIfTarget(n), ue.clearIfTarget(n), fe.clearIfTarget(n), he.clearIfTarget(n), de.clearIfTarget(n), z(t);
|
|
27887
27884
|
}, [
|
|
27888
27885
|
e,
|
|
27886
|
+
he.clearIfTarget,
|
|
27887
|
+
z,
|
|
27889
27888
|
de.clearIfTarget,
|
|
27890
|
-
|
|
27891
|
-
|
|
27892
|
-
ce.clearIfTarget
|
|
27893
|
-
]), pe = ig(e, S, D, fe, (e) => ue.setOpenId(e.id ?? null));
|
|
27889
|
+
fe.clearIfTarget
|
|
27890
|
+
]), _e = ig(e, S, O, ge, (e) => me.setOpenId(e.id ?? null));
|
|
27894
27891
|
y(() => {
|
|
27895
|
-
|
|
27896
|
-
}, [e,
|
|
27892
|
+
de.reset(), Promise.resolve().then(de.refreshPinned);
|
|
27893
|
+
}, [e, de.refreshPinned]), y(() => e ? Kn({
|
|
27897
27894
|
onMessagePinned: (t) => {
|
|
27898
27895
|
let n = xs(t?.data ?? t, e);
|
|
27899
|
-
String(n.conversationId) === String(e) && !gs(n) && !c(String(n.id)) &&
|
|
27896
|
+
String(n.conversationId) === String(e) && !gs(n) && !c(String(n.id)) && de.applyPinnedUpdate(n);
|
|
27900
27897
|
},
|
|
27901
27898
|
onMessageRemoved: (e) => {
|
|
27902
27899
|
let t = e?.data ?? e;
|
|
27903
|
-
!t?.conversationId || !t.messageId || !t.removedAt || !t.removedById ||
|
|
27900
|
+
!t?.conversationId || !t.messageId || !t.removedAt || !t.removedById || ge(t);
|
|
27904
27901
|
}
|
|
27905
27902
|
}) : void 0, [
|
|
27906
27903
|
e,
|
|
27907
27904
|
c,
|
|
27908
|
-
|
|
27909
|
-
|
|
27905
|
+
de.applyPinnedUpdate,
|
|
27906
|
+
ge
|
|
27910
27907
|
]);
|
|
27911
|
-
let
|
|
27908
|
+
let ve = g((t, n) => {
|
|
27912
27909
|
if (!(!e || !t)) try {
|
|
27913
27910
|
Hs(tr({
|
|
27914
27911
|
conversationId: e,
|
|
@@ -27918,7 +27915,7 @@ var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError
|
|
|
27918
27915
|
} catch (e) {
|
|
27919
27916
|
console.warn("Unable to apply reaction", e);
|
|
27920
27917
|
}
|
|
27921
|
-
}, [e]),
|
|
27918
|
+
}, [e]), ye = g((t) => {
|
|
27922
27919
|
if (!(!e || !t)) try {
|
|
27923
27920
|
Hs(nr({
|
|
27924
27921
|
conversationId: e,
|
|
@@ -27927,8 +27924,8 @@ var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError
|
|
|
27927
27924
|
} catch (e) {
|
|
27928
27925
|
console.warn("Unable to remove reaction", e);
|
|
27929
27926
|
}
|
|
27930
|
-
}, [e]),
|
|
27931
|
-
|
|
27927
|
+
}, [e]), be = s.messages.find((e) => String(e.id) === String(fe.messageId)) ?? null, xe = (e) => qh(e, _), Se = (e) => Gh(e, _, S, C), Ce = async (e) => {
|
|
27928
|
+
me.closeMenu();
|
|
27932
27929
|
let t = ps(e);
|
|
27933
27930
|
if (t) try {
|
|
27934
27931
|
await navigator.clipboard.writeText(t), Vs.copied("Đã sao chép tin nhắn");
|
|
@@ -27944,8 +27941,8 @@ var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError
|
|
|
27944
27941
|
children: [
|
|
27945
27942
|
/* @__PURE__ */ M(Vh, {
|
|
27946
27943
|
conversationId: e,
|
|
27947
|
-
canManagePins:
|
|
27948
|
-
onJump: (e) =>
|
|
27944
|
+
canManagePins: k,
|
|
27945
|
+
onJump: (e) => oe(e),
|
|
27949
27946
|
timelineRef: t
|
|
27950
27947
|
}),
|
|
27951
27948
|
r || s.messages.length > 0 && !a ? /* @__PURE__ */ M("div", {
|
|
@@ -27995,51 +27992,51 @@ var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError
|
|
|
27995
27992
|
rangeChanged: f,
|
|
27996
27993
|
computeItemKey: (e, t) => t.id ?? t.clientMessageId ?? String(t.sequence),
|
|
27997
27994
|
itemContent: (e, t) => {
|
|
27998
|
-
let n = t.id ?? t.clientMessageId ?? String(t.sequence), r = String(t.senderId) === String(S), i = r ||
|
|
27995
|
+
let n = t.id ?? t.clientMessageId ?? String(t.sequence), r = String(t.senderId) === String(S), i = r || O, a = r ? "Thu hồi tin nhắn" : "Gỡ tin nhắn", o = String(t.id) === String(s.focusedMessageId), c = s.messages.at(-1)?.clientMessageId === t.clientMessageId;
|
|
27999
27996
|
return /* @__PURE__ */ M(fI, {
|
|
28000
27997
|
message: t,
|
|
28001
27998
|
isMine: r,
|
|
28002
27999
|
isGroup: v,
|
|
28003
28000
|
isFocused: o,
|
|
28004
28001
|
isLatestMessage: c,
|
|
28005
|
-
showDayDivider:
|
|
28006
|
-
isReactionPickerOpen:
|
|
28002
|
+
showDayDivider: A.has(n),
|
|
28003
|
+
isReactionPickerOpen: ue.reactionPickerMessageId === t.id,
|
|
28007
28004
|
myReactionType: t.reactionSummary.mine?.type ?? null,
|
|
28008
|
-
onOpenReactionPicker: () =>
|
|
28009
|
-
onCloseReactionPickerIfSelf: () => t.id &&
|
|
28010
|
-
onApplyReaction: (e) =>
|
|
28011
|
-
onRemoveReaction: () =>
|
|
28012
|
-
onOpenReactionModal: () =>
|
|
28013
|
-
onOpenSystemMembers:
|
|
28014
|
-
resolveUserAvatar:
|
|
28015
|
-
canManagePins:
|
|
28016
|
-
isPinned:
|
|
28005
|
+
onOpenReactionPicker: () => ue.openPicker(t.id ?? null),
|
|
28006
|
+
onCloseReactionPickerIfSelf: () => t.id && ue.clearIfTarget(t.id),
|
|
28007
|
+
onApplyReaction: (e) => ve(t.id, e),
|
|
28008
|
+
onRemoveReaction: () => ye(t.id),
|
|
28009
|
+
onOpenReactionModal: () => fe.open(t.id, null),
|
|
28010
|
+
onOpenSystemMembers: pe.open,
|
|
28011
|
+
resolveUserAvatar: xe,
|
|
28012
|
+
canManagePins: k,
|
|
28013
|
+
isPinned: de.pinnedIds.has(String(t.id)),
|
|
28017
28014
|
onTogglePin: () => {
|
|
28018
|
-
|
|
28015
|
+
me.closeMenu(), de.togglePin(t, !de.pinnedIds.has(String(t.id)));
|
|
28019
28016
|
},
|
|
28020
|
-
isMenuOpen:
|
|
28021
|
-
menuPosition:
|
|
28022
|
-
onOpenMenu: (e) =>
|
|
28023
|
-
onCloseMenu: () =>
|
|
28024
|
-
onCopyMessage: () =>
|
|
28017
|
+
isMenuOpen: me.openMessageMenuId === t.id,
|
|
28018
|
+
menuPosition: me.messageMenuPosition,
|
|
28019
|
+
onOpenMenu: (e) => me.openMenu(t.id ?? "", e),
|
|
28020
|
+
onCloseMenu: () => me.closeMenu(),
|
|
28021
|
+
onCopyMessage: () => Ce(t),
|
|
28025
28022
|
onViewDetails: () => {
|
|
28026
|
-
|
|
28023
|
+
me.closeMenu(), he.openDetails(t);
|
|
28027
28024
|
},
|
|
28028
28025
|
canRemove: i,
|
|
28029
28026
|
removeLabel: a,
|
|
28030
|
-
isRemoving: t.id ?
|
|
28031
|
-
onRemove: () =>
|
|
28032
|
-
onReply: () =>
|
|
28033
|
-
onForward: () =>
|
|
28034
|
-
onJumpToReply:
|
|
28035
|
-
onOpenMentionCard:
|
|
28036
|
-
onOpenUserProfile:
|
|
28037
|
-
onOpenImageLightbox: (e, n) =>
|
|
28027
|
+
isRemoving: t.id ? _e.removalInFlightIds.has(t.id) : !1,
|
|
28028
|
+
onRemove: () => _e.requestRemoval(t),
|
|
28029
|
+
onReply: () => P.startReply(t),
|
|
28030
|
+
onForward: () => F(t),
|
|
28031
|
+
onJumpToReply: I,
|
|
28032
|
+
onOpenMentionCard: ee,
|
|
28033
|
+
onOpenUserProfile: L,
|
|
28034
|
+
onOpenImageLightbox: (e, n) => te(t, e, n),
|
|
28038
28035
|
onImageSettled: () => {
|
|
28039
|
-
(
|
|
28036
|
+
(ie.current || R()) && requestAnimationFrame(() => requestAnimationFrame(() => ae("auto")));
|
|
28040
28037
|
},
|
|
28041
|
-
onRetry: () =>
|
|
28042
|
-
onDeleteFailed: () =>
|
|
28038
|
+
onRetry: () => ne(t),
|
|
28039
|
+
onDeleteFailed: () => re(t)
|
|
28043
28040
|
});
|
|
28044
28041
|
}
|
|
28045
28042
|
}, s.timelineRevision)
|
|
@@ -28074,25 +28071,31 @@ var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError
|
|
|
28074
28071
|
}) : null
|
|
28075
28072
|
]
|
|
28076
28073
|
}),
|
|
28077
|
-
|
|
28078
|
-
target:
|
|
28079
|
-
avatarUrl:
|
|
28080
|
-
senderName:
|
|
28081
|
-
onCancel: () =>
|
|
28074
|
+
P.replyTarget ? /* @__PURE__ */ M(ag, {
|
|
28075
|
+
target: P.replyTarget,
|
|
28076
|
+
avatarUrl: xe(P.replyTarget.senderId),
|
|
28077
|
+
senderName: Se(P.replyTarget.senderId),
|
|
28078
|
+
onCancel: () => P.clearReply()
|
|
28082
28079
|
}) : null,
|
|
28083
|
-
|
|
28080
|
+
T ? /* @__PURE__ */ M("p", {
|
|
28084
28081
|
className: "conversation-error composer-error",
|
|
28085
|
-
children:
|
|
28082
|
+
children: T
|
|
28086
28083
|
}) : null,
|
|
28087
|
-
|
|
28084
|
+
E.length > 0 ? /* @__PURE__ */ M("div", {
|
|
28088
28085
|
className: "composer-attachments-preview",
|
|
28089
|
-
children:
|
|
28090
|
-
let n = e.previewUrl ? null : hc(e.file.name);
|
|
28086
|
+
children: E.map((e, t) => {
|
|
28087
|
+
let n = e.previewUrl ? null : hc(e.file.name), r = le.indexOf(e);
|
|
28091
28088
|
return /* @__PURE__ */ N("div", {
|
|
28092
28089
|
className: "composer-attachment-thumb",
|
|
28093
|
-
children: [e.previewUrl ? /* @__PURE__ */ M("
|
|
28094
|
-
|
|
28095
|
-
|
|
28090
|
+
children: [e.previewUrl ? /* @__PURE__ */ M("button", {
|
|
28091
|
+
type: "button",
|
|
28092
|
+
className: "composer-attachment-thumb-preview",
|
|
28093
|
+
"aria-label": `Xem trước ${e.file.name}`,
|
|
28094
|
+
onClick: () => ce(r),
|
|
28095
|
+
children: /* @__PURE__ */ M("img", {
|
|
28096
|
+
src: e.previewUrl,
|
|
28097
|
+
alt: e.file.name
|
|
28098
|
+
})
|
|
28096
28099
|
}) : /* @__PURE__ */ N("span", {
|
|
28097
28100
|
className: "composer-attachment-file",
|
|
28098
28101
|
title: e.file.name,
|
|
@@ -28109,48 +28112,61 @@ var pI = p(function({ conversationId: e, timelineRef: t, isLoading: r, chatError
|
|
|
28109
28112
|
className: "composer-attachment-remove",
|
|
28110
28113
|
"aria-label": "Bỏ tệp",
|
|
28111
28114
|
title: "Bỏ tệp",
|
|
28112
|
-
onClick: () =>
|
|
28115
|
+
onClick: () => D(t),
|
|
28113
28116
|
children: /* @__PURE__ */ M(Ti, {})
|
|
28114
28117
|
})]
|
|
28115
28118
|
}, `${e.file.name}-${t}`);
|
|
28116
28119
|
})
|
|
28117
28120
|
}) : null,
|
|
28118
|
-
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28121
|
+
B === null ? null : /* @__PURE__ */ M(Ec, {
|
|
28122
|
+
state: {
|
|
28123
|
+
items: le.map((e, t) => ({
|
|
28124
|
+
id: `${e.file.name}-${t}`,
|
|
28125
|
+
url: e.previewUrl,
|
|
28126
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
28127
|
+
name: e.file.name
|
|
28128
|
+
})),
|
|
28129
|
+
index: B
|
|
28130
|
+
},
|
|
28131
|
+
onClose: () => ce(null),
|
|
28132
|
+
onIndexChange: ce
|
|
28133
|
+
}),
|
|
28134
|
+
pe.messageId ? /* @__PURE__ */ M(Qh, {
|
|
28135
|
+
totalCount: pe.totalCount,
|
|
28136
|
+
actionLabel: pe.actionLabel,
|
|
28137
|
+
items: pe.items,
|
|
28138
|
+
isLoading: pe.isLoading,
|
|
28139
|
+
error: pe.error,
|
|
28140
|
+
hasMore: pe.hasMore,
|
|
28141
|
+
onLoadMore: pe.loadMore,
|
|
28142
|
+
onRetry: pe.retry,
|
|
28143
|
+
onClose: pe.close,
|
|
28128
28144
|
members: _,
|
|
28129
|
-
onOpenProfile:
|
|
28145
|
+
onOpenProfile: L
|
|
28130
28146
|
}) : null,
|
|
28131
|
-
|
|
28132
|
-
message:
|
|
28133
|
-
filter:
|
|
28134
|
-
items:
|
|
28135
|
-
isLoading:
|
|
28136
|
-
error:
|
|
28137
|
-
hasMore:
|
|
28138
|
-
onFilterChange:
|
|
28139
|
-
onLoadMore:
|
|
28140
|
-
onRetry:
|
|
28141
|
-
onClose:
|
|
28147
|
+
be ? /* @__PURE__ */ M(Jh, {
|
|
28148
|
+
message: be,
|
|
28149
|
+
filter: fe.filter,
|
|
28150
|
+
items: fe.items,
|
|
28151
|
+
isLoading: fe.isLoading,
|
|
28152
|
+
error: fe.error,
|
|
28153
|
+
hasMore: fe.hasMore,
|
|
28154
|
+
onFilterChange: fe.changeFilter,
|
|
28155
|
+
onLoadMore: fe.loadMore,
|
|
28156
|
+
onRetry: fe.retry,
|
|
28157
|
+
onClose: fe.close,
|
|
28142
28158
|
members: _,
|
|
28143
|
-
onOpenProfile:
|
|
28159
|
+
onOpenProfile: L
|
|
28144
28160
|
}) : null,
|
|
28145
|
-
|
|
28146
|
-
message:
|
|
28161
|
+
he.detailsMessage ? /* @__PURE__ */ M(rg, {
|
|
28162
|
+
message: he.detailsMessage,
|
|
28147
28163
|
isGroup: v,
|
|
28148
28164
|
members: _,
|
|
28149
28165
|
otherMember: v ? void 0 : _?.find((e) => String(e.userId) !== String(S)),
|
|
28150
28166
|
currentUserId: S,
|
|
28151
28167
|
authUser: C,
|
|
28152
|
-
seenBy:
|
|
28153
|
-
onClose: () =>
|
|
28168
|
+
seenBy: he.detailsSeenBy,
|
|
28169
|
+
onClose: () => he.closeDetails()
|
|
28154
28170
|
}) : null
|
|
28155
28171
|
] });
|
|
28156
28172
|
}), mI = Math.min, hI = Math.max, gI = Math.round, _I = Math.floor, vI = (e) => ({
|
|
@@ -30068,7 +30084,7 @@ function rz({ onAttach: e, onAttachImages: t }) {
|
|
|
30068
30084
|
type: "button",
|
|
30069
30085
|
"aria-label": "Ảnh",
|
|
30070
30086
|
onClick: t ?? e,
|
|
30071
|
-
children: /* @__PURE__ */ M(
|
|
30087
|
+
children: /* @__PURE__ */ M(Sa, {})
|
|
30072
30088
|
})
|
|
30073
30089
|
})] });
|
|
30074
30090
|
}
|
|
@@ -54432,12 +54448,12 @@ var fK = p(function({ conversationName: e, members: t, canMentionAll: n, enableM
|
|
|
54432
54448
|
onTransaction: () => O((e) => e + 1)
|
|
54433
54449
|
}, [j, r]);
|
|
54434
54450
|
y(() => () => P?.destroy(), [P]), b(p, () => ({ focus: () => P?.commands.focus() }), [P]);
|
|
54435
|
-
function
|
|
54451
|
+
function F(e) {
|
|
54436
54452
|
e.preventDefault();
|
|
54437
54453
|
let t = cs(P?.getJSON());
|
|
54438
54454
|
!t && !a || (s?.(""), o(t ?? []), P?.commands.clearContent(), A());
|
|
54439
54455
|
}
|
|
54440
|
-
let
|
|
54456
|
+
let I = /* @__PURE__ */ M("button", {
|
|
54441
54457
|
className: "message-send-button",
|
|
54442
54458
|
type: "submit",
|
|
54443
54459
|
"aria-label": "Gửi tin nhắn",
|
|
@@ -54446,7 +54462,7 @@ var fK = p(function({ conversationName: e, members: t, canMentionAll: n, enableM
|
|
|
54446
54462
|
});
|
|
54447
54463
|
return /* @__PURE__ */ N("form", {
|
|
54448
54464
|
className: "message-composer",
|
|
54449
|
-
onSubmit:
|
|
54465
|
+
onSubmit: F,
|
|
54450
54466
|
children: [/* @__PURE__ */ M(sK, {
|
|
54451
54467
|
editor: P,
|
|
54452
54468
|
onAttach: c,
|
|
@@ -54460,13 +54476,13 @@ var fK = p(function({ conversationName: e, members: t, canMentionAll: n, enableM
|
|
|
54460
54476
|
},
|
|
54461
54477
|
isEnlarged: E,
|
|
54462
54478
|
onToggleEnlarged: () => D((e) => !e),
|
|
54463
|
-
sendButton:
|
|
54479
|
+
sendButton: I
|
|
54464
54480
|
}), /* @__PURE__ */ N("div", {
|
|
54465
54481
|
className: "message-input-row",
|
|
54466
54482
|
children: [/* @__PURE__ */ M("div", {
|
|
54467
54483
|
className: `message-editor${x && E ? " is-expanded" : ""}`,
|
|
54468
54484
|
children: /* @__PURE__ */ M(EM, { editor: P })
|
|
54469
|
-
}), x ? null :
|
|
54485
|
+
}), x ? null : I]
|
|
54470
54486
|
})]
|
|
54471
54487
|
});
|
|
54472
54488
|
});
|
|
@@ -54617,7 +54633,7 @@ function mK({ typingNames: e }) {
|
|
|
54617
54633
|
//#endregion
|
|
54618
54634
|
//#region src/pages/conversation/index.tsx
|
|
54619
54635
|
var hK = p(function({ conversationId: e, conversation: t, isLoadingConversation: n, currentUserId: r, authUser: i, accessToken: a, isSettingsOpen: o, onToggleSettings: s, onOpenSearch: c, onEditTitle: l, onOpenMembers: u, onOpenUserProfile: d, onNavigateBack: f }, p) {
|
|
54620
|
-
let [m, h] = w(""), _ = String(t?.type ?? "").toUpperCase(), v = _ === "GROUP", x = ru(e, _, r, h), T = ic((e) => e.hasUpdateGroupVerified), E = !!t?.isVerified && !T, [D, O] = w(!1), k = Cl(), A = Nl(), P = hl(),
|
|
54636
|
+
let [m, h] = w(""), _ = String(t?.type ?? "").toUpperCase(), v = _ === "GROUP", x = ru(e, _, r, h), T = ic((e) => e.hasUpdateGroupVerified), E = !!t?.isVerified && !T, [D, O] = w(!1), k = Cl(), A = Nl(), P = hl(), F = C(null), I = C(null), ee = C(null), L = C(null), te = C(null), [ne, re] = w(e);
|
|
54621
54637
|
ne !== e && (re(e), x.reset(), O(!1));
|
|
54622
54638
|
let ie = Hl(e), R = zl(e), { virtuosoRef: ae, stickToLatestRef: oe, visibleDayLabel: z, isNearBottomOfList: se, scrollToLatest: B, stickToLatest: ce, handleTimelineScrolling: le, handleVisibleRangeChanged: ue, setScrollerRef: de } = Sl(R.messages, R.firstItemIndex, () => L.current?.closeMessageMenu()), { clearFocusedMessage: fe, completeAroundFocus: pe, handleRealtimeMessage: me, isFollowingLatest: he, loadAround: ge, loadLatest: _e, reconcile: ve, applyMessageRemoved: ye, isRemovedMessageId: be, updateMessageReactionSummary: xe } = R, Se = eu({ onForwarded: ce });
|
|
54623
54639
|
b(p, () => ({ loadAround: ge }), [ge]);
|
|
@@ -54851,7 +54867,7 @@ var hK = p(function({ conversationId: e, conversation: t, isLoadingConversation:
|
|
|
54851
54867
|
/* @__PURE__ */ M(pI, {
|
|
54852
54868
|
ref: L,
|
|
54853
54869
|
conversationId: e,
|
|
54854
|
-
timelineRef:
|
|
54870
|
+
timelineRef: ee,
|
|
54855
54871
|
isLoading: Ve,
|
|
54856
54872
|
chatError: Be,
|
|
54857
54873
|
isTimelineReady: D,
|
|
@@ -54908,12 +54924,12 @@ var hK = p(function({ conversationId: e, conversation: t, isLoadingConversation:
|
|
|
54908
54924
|
mergeOutgoingMessage: R.mergeOutgoingMessage,
|
|
54909
54925
|
stickToLatest: ce,
|
|
54910
54926
|
onComposerError: h,
|
|
54911
|
-
onAttach: () =>
|
|
54912
|
-
onAttachImages: () =>
|
|
54927
|
+
onAttach: () => F.current?.click(),
|
|
54928
|
+
onAttachImages: () => I.current?.click(),
|
|
54913
54929
|
onTypingStart: () => e && or({ conversationId: e }),
|
|
54914
54930
|
onTypingStop: () => e && sr({ conversationId: e }),
|
|
54915
|
-
uploadInputRef:
|
|
54916
|
-
imageUploadInputRef:
|
|
54931
|
+
uploadInputRef: F,
|
|
54932
|
+
imageUploadInputRef: I,
|
|
54917
54933
|
acceptAttribute: wl
|
|
54918
54934
|
}),
|
|
54919
54935
|
P.imageLightbox ? /* @__PURE__ */ M(Ec, {
|
|
@@ -58773,11 +58789,11 @@ var MX = /* @__PURE__ */ R(((e, t) => {
|
|
|
58773
58789
|
x,
|
|
58774
58790
|
S,
|
|
58775
58791
|
C
|
|
58776
|
-
].join("|") + ")" + j + A + ")*", N = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", P = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",
|
|
58792
|
+
].join("|") + ")" + j + A + ")*", N = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", P = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", F = j + A + M, I = "(?:" + [
|
|
58777
58793
|
_,
|
|
58778
58794
|
S,
|
|
58779
58795
|
C
|
|
58780
|
-
].join("|") + ")" +
|
|
58796
|
+
].join("|") + ")" + F, ee = RegExp([
|
|
58781
58797
|
w + "?" + v + "+" + O + "(?=" + [
|
|
58782
58798
|
m,
|
|
58783
58799
|
w,
|
|
@@ -58793,10 +58809,10 @@ var MX = /* @__PURE__ */ R(((e, t) => {
|
|
|
58793
58809
|
P,
|
|
58794
58810
|
N,
|
|
58795
58811
|
g,
|
|
58796
|
-
|
|
58812
|
+
I
|
|
58797
58813
|
].join("|"), "g");
|
|
58798
58814
|
function L(e) {
|
|
58799
|
-
return e.match(
|
|
58815
|
+
return e.match(ee) || [];
|
|
58800
58816
|
}
|
|
58801
58817
|
t.exports = L;
|
|
58802
58818
|
})), oZ = /* @__PURE__ */ R(((e, t) => {
|
|
@@ -59001,7 +59017,7 @@ function jZ(e) {
|
|
|
59001
59017
|
return e && vK(e) === "object" && AZ(e.nativeElement) ? e.nativeElement : AZ(e) ? e : null;
|
|
59002
59018
|
}
|
|
59003
59019
|
function MZ(e) {
|
|
59004
|
-
return jZ(e) || (e instanceof o.Component ?
|
|
59020
|
+
return jZ(e) || (e instanceof o.Component ? F.findDOMNode?.call(F, e) : null);
|
|
59005
59021
|
}
|
|
59006
59022
|
//#endregion
|
|
59007
59023
|
//#region node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.production.min.js
|
|
@@ -59106,13 +59122,13 @@ var NZ = /* @__PURE__ */ R(((e) => {
|
|
|
59106
59122
|
function P(e) {
|
|
59107
59123
|
return _(e) === s;
|
|
59108
59124
|
}
|
|
59109
|
-
function
|
|
59125
|
+
function F(e) {
|
|
59110
59126
|
return _(e) === o;
|
|
59111
59127
|
}
|
|
59112
|
-
function
|
|
59128
|
+
function I(e) {
|
|
59113
59129
|
return typeof e == "object" && !!e && e.$$typeof === t;
|
|
59114
59130
|
}
|
|
59115
|
-
function
|
|
59131
|
+
function ee(e) {
|
|
59116
59132
|
return _(e) === l;
|
|
59117
59133
|
}
|
|
59118
59134
|
function L(e) {
|
|
@@ -59139,7 +59155,7 @@ var NZ = /* @__PURE__ */ R(((e) => {
|
|
|
59139
59155
|
function oe(e) {
|
|
59140
59156
|
return _(e) === d;
|
|
59141
59157
|
}
|
|
59142
|
-
e.ContextConsumer = v, e.ContextProvider = y, e.Element = b, e.ForwardRef = x, e.Fragment = S, e.Lazy = C, e.Memo = w, e.Portal = T, e.Profiler = E, e.StrictMode = D, e.Suspense = O, e.SuspenseList = k, e.isAsyncMode = M, e.isConcurrentMode = N, e.isContextConsumer = P, e.isContextProvider =
|
|
59158
|
+
e.ContextConsumer = v, e.ContextProvider = y, e.Element = b, e.ForwardRef = x, e.Fragment = S, e.Lazy = C, e.Memo = w, e.Portal = T, e.Profiler = E, e.StrictMode = D, e.Suspense = O, e.SuspenseList = k, e.isAsyncMode = M, e.isConcurrentMode = N, e.isContextConsumer = P, e.isContextProvider = F, e.isElement = I, e.isForwardRef = ee, e.isFragment = L, e.isLazy = te, e.isMemo = ne, e.isPortal = re, e.isProfiler = ie, e.isStrictMode = R, e.isSuspense = ae, e.isSuspenseList = oe, e.isValidElementType = g, e.typeOf = _;
|
|
59143
59159
|
})();
|
|
59144
59160
|
})), FZ = (/* @__PURE__ */ R(((e, t) => {
|
|
59145
59161
|
t.exports = process.env.NODE_ENV === "production" ? NZ() : PZ();
|
|
@@ -59390,13 +59406,13 @@ var jQ = (function(e, t, n) {
|
|
|
59390
59406
|
//#endregion
|
|
59391
59407
|
//#region node_modules/.pnpm/rc-motion@2.9.5_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/rc-motion/es/hooks/useStatus.js
|
|
59392
59408
|
function MQ(e, t, n, r) {
|
|
59393
|
-
var i = r.motionEnter, o = i === void 0 || i, s = r.motionAppear, c = s === void 0 || s, l = r.motionLeave, u = l === void 0 || l, d = r.motionDeadline, f = r.motionLeaveImmediately, p = r.onAppearPrepare, m = r.onEnterPrepare, h = r.onLeavePrepare, g = r.onAppearStart, _ = r.onEnterStart, v = r.onLeaveStart, b = r.onAppearActive, x = r.onEnterActive, S = r.onLeaveActive, w = r.onAppearEnd, T = r.onEnterEnd, E = r.onLeaveEnd, D = r.onVisibleChanged, O = Z(JZ(), 2), k = O[0], A = O[1], j = Z(ZZ(QZ), 2), M = j[0], N = j[1], P = Z(JZ(null), 2),
|
|
59409
|
+
var i = r.motionEnter, o = i === void 0 || i, s = r.motionAppear, c = s === void 0 || s, l = r.motionLeave, u = l === void 0 || l, d = r.motionDeadline, f = r.motionLeaveImmediately, p = r.onAppearPrepare, m = r.onEnterPrepare, h = r.onLeavePrepare, g = r.onAppearStart, _ = r.onEnterStart, v = r.onLeaveStart, b = r.onAppearActive, x = r.onEnterActive, S = r.onLeaveActive, w = r.onAppearEnd, T = r.onEnterEnd, E = r.onLeaveEnd, D = r.onVisibleChanged, O = Z(JZ(), 2), k = O[0], A = O[1], j = Z(ZZ(QZ), 2), M = j[0], N = j[1], P = Z(JZ(null), 2), F = P[0], I = P[1], ee = M(), L = C(!1), te = C(null);
|
|
59394
59410
|
function ne() {
|
|
59395
59411
|
return n();
|
|
59396
59412
|
}
|
|
59397
59413
|
var re = C(!1);
|
|
59398
59414
|
function ie() {
|
|
59399
|
-
N(QZ),
|
|
59415
|
+
N(QZ), I(null, !0);
|
|
59400
59416
|
}
|
|
59401
59417
|
var R = WZ(function(e) {
|
|
59402
59418
|
var t = M();
|
|
@@ -59415,13 +59431,13 @@ function MQ(e, t, n, r) {
|
|
|
59415
59431
|
default: return {};
|
|
59416
59432
|
}
|
|
59417
59433
|
}, z = a.useMemo(function() {
|
|
59418
|
-
return oe(
|
|
59419
|
-
}, [
|
|
59434
|
+
return oe(ee);
|
|
59435
|
+
}, [ee]), se = Z(jQ(ee, !e, function(e) {
|
|
59420
59436
|
if (e === "prepare") {
|
|
59421
59437
|
var t = z[rQ];
|
|
59422
59438
|
return t ? t(ne()) : !1;
|
|
59423
59439
|
}
|
|
59424
|
-
return ce in z &&
|
|
59440
|
+
return ce in z && I(z[ce]?.call(z, ne(), null) || null), ce === "active" && ee !== "none" && (ae(ne()), d > 0 && (clearTimeout(te.current), te.current = setTimeout(function() {
|
|
59425
59441
|
R({ deadline: !0 });
|
|
59426
59442
|
}, d))), ce === "prepared" && ie(), !0;
|
|
59427
59443
|
}), 2), B = se[0], ce = se[1];
|
|
@@ -59438,7 +59454,7 @@ function MQ(e, t, n, r) {
|
|
|
59438
59454
|
r && (e || i.prepare) ? (N(r), B()) : N(QZ), le.current = t;
|
|
59439
59455
|
}
|
|
59440
59456
|
}, [t]), y(function() {
|
|
59441
|
-
(
|
|
59457
|
+
(ee === "appear" && !c || ee === "enter" && !o || ee === "leave" && !u) && N(QZ);
|
|
59442
59458
|
}, [
|
|
59443
59459
|
c,
|
|
59444
59460
|
o,
|
|
@@ -59450,11 +59466,11 @@ function MQ(e, t, n, r) {
|
|
|
59450
59466
|
}, []);
|
|
59451
59467
|
var ue = a.useRef(!1);
|
|
59452
59468
|
y(function() {
|
|
59453
|
-
k && (ue.current = !0), k !== void 0 &&
|
|
59454
|
-
}, [k,
|
|
59455
|
-
var de =
|
|
59469
|
+
k && (ue.current = !0), k !== void 0 && ee === "none" && ((ue.current || k) && D?.(k), ue.current = !0);
|
|
59470
|
+
}, [k, ee]);
|
|
59471
|
+
var de = F;
|
|
59456
59472
|
return z.prepare && ce === "start" && (de = Q({ transition: "none" }, de)), [
|
|
59457
|
-
|
|
59473
|
+
ee,
|
|
59458
59474
|
ce,
|
|
59459
59475
|
de,
|
|
59460
59476
|
k ?? t
|
|
@@ -59894,10 +59910,10 @@ var w$ = /*#__PURE__*/ a.forwardRef(function(e, t) {
|
|
|
59894
59910
|
"ghost",
|
|
59895
59911
|
"block",
|
|
59896
59912
|
"htmlType"
|
|
59897
|
-
]), w = a.useContext(ZQ), T = a.useContext(XQ), E = p || T, D = a.useContext(d$), O = Z(a.useState(!!i), 2), k = O[0], A = O[1], j = Z(a.useState(!1), 2), M = j[0], N = j[1], P = a.useContext(JQ),
|
|
59913
|
+
]), w = a.useContext(ZQ), T = a.useContext(XQ), E = p || T, D = a.useContext(d$), O = Z(a.useState(!!i), 2), k = O[0], A = O[1], j = Z(a.useState(!1), 2), M = j[0], N = j[1], P = a.useContext(JQ), F = P.getPrefixCls, I = P.autoInsertSpaceInButton, ee = P.direction, L = t || /*#__PURE__*/ a.createRef(), te = function() {
|
|
59898
59914
|
return a.Children.count(h) === 1 && !g && !b$(c);
|
|
59899
59915
|
}, ne = function() {
|
|
59900
|
-
if (!(!L || !L.current ||
|
|
59916
|
+
if (!(!L || !L.current || I === !1)) {
|
|
59901
59917
|
var e = L.current.textContent;
|
|
59902
59918
|
te() && v$(e) ? M || N(!0) : M && N(!1);
|
|
59903
59919
|
}
|
|
@@ -59919,11 +59935,11 @@ var w$ = /*#__PURE__*/ a.forwardRef(function(e, t) {
|
|
|
59919
59935
|
n?.(t);
|
|
59920
59936
|
};
|
|
59921
59937
|
process.env.NODE_ENV !== "production" && xY(!(typeof g == "string" && g.length > 2), "Button", `\`icon\` is using ReactNode instead of string naming in v4. Please check \`${g}\` at https://ant.design/components/icon`), process.env.NODE_ENV !== "production" && xY(!(v && b$(c)), "Button", "`link` or `text` button can't be a `ghost` button.");
|
|
59922
|
-
var R =
|
|
59938
|
+
var R = F("btn", o), ae = I !== !1, oe = {
|
|
59923
59939
|
large: "lg",
|
|
59924
59940
|
small: "sm",
|
|
59925
59941
|
middle: void 0
|
|
59926
|
-
}, z = D || f || w, se = z && oe[z] || "", ce = k ? "loading" : g, le = DK(C, ["navigate"]), ue = (0, EK.default)(R, (n = {}, X(n, `${R}-${d}`, d !== "default" && d), X(n, `${R}-${c}`, c), X(n, `${R}-${se}`, se), X(n, `${R}-icon-only`, !h && h !== 0 && !!ce), X(n, `${R}-background-ghost`, v && !b$(c)), X(n, `${R}-loading`, k), X(n, `${R}-two-chinese-chars`, M && ae && !k), X(n, `${R}-block`, b), X(n, `${R}-dangerous`, !!l), X(n, `${R}-rtl`,
|
|
59942
|
+
}, z = D || f || w, se = z && oe[z] || "", ce = k ? "loading" : g, le = DK(C, ["navigate"]), ue = (0, EK.default)(R, (n = {}, X(n, `${R}-${d}`, d !== "default" && d), X(n, `${R}-${c}`, c), X(n, `${R}-${se}`, se), X(n, `${R}-icon-only`, !h && h !== 0 && !!ce), X(n, `${R}-background-ghost`, v && !b$(c)), X(n, `${R}-loading`, k), X(n, `${R}-two-chinese-chars`, M && ae && !k), X(n, `${R}-block`, b), X(n, `${R}-dangerous`, !!l), X(n, `${R}-rtl`, ee === "rtl"), X(n, `${R}-disabled`, le.href !== void 0 && E), n), m), de = g && !k ? g : /*#__PURE__*/ a.createElement(h$, {
|
|
59927
59943
|
existIcon: !!g,
|
|
59928
59944
|
prefixCls: R,
|
|
59929
59945
|
loading: !!k
|
|
@@ -60769,12 +60785,12 @@ function z1(e) {
|
|
|
60769
60785
|
y,
|
|
60770
60786
|
b,
|
|
60771
60787
|
j
|
|
60772
|
-
]), 3), N = M[0], P = M[1],
|
|
60788
|
+
]), 3), N = M[0], P = M[1], F = M[2], I = function(e, n, r, i) {
|
|
60773
60789
|
var a = o || t.getNow(), s = Math.max(0, n), c = Math.max(0, r), l = Math.max(0, i);
|
|
60774
60790
|
return a = K$(t, a, !u || !e ? s : s + 12, c, l), a;
|
|
60775
|
-
},
|
|
60776
|
-
return
|
|
60777
|
-
},
|
|
60791
|
+
}, ee = R1(0, 23, f, N && N()), L = vY(function() {
|
|
60792
|
+
return ee;
|
|
60793
|
+
}, ee, L1);
|
|
60778
60794
|
u && (E = O >= 12, O %= 12);
|
|
60779
60795
|
var te = Z(a.useMemo(function() {
|
|
60780
60796
|
if (!u) return [!1, !1];
|
|
@@ -60799,7 +60815,7 @@ function z1(e) {
|
|
|
60799
60815
|
u,
|
|
60800
60816
|
E,
|
|
60801
60817
|
L
|
|
60802
|
-
]), R = R1(0, 59, m, P && P(D)), ae = R1(0, 59, g,
|
|
60818
|
+
]), R = R1(0, 59, m, P && P(D)), ae = R1(0, 59, g, F && F(D, k));
|
|
60803
60819
|
r.current = { onUpDown: function(e) {
|
|
60804
60820
|
var t = C[i];
|
|
60805
60821
|
if (t) for (var n = t.units.findIndex(function(e) {
|
|
@@ -60828,11 +60844,11 @@ function z1(e) {
|
|
|
60828
60844
|
});
|
|
60829
60845
|
}
|
|
60830
60846
|
oe(s, /*#__PURE__*/ a.createElement(A1, { key: "hour" }), O, ie, function(e) {
|
|
60831
|
-
S(
|
|
60847
|
+
S(I(E, e, k, A), "mouse");
|
|
60832
60848
|
}), oe(c, /*#__PURE__*/ a.createElement(A1, { key: "minute" }), k, R, function(e) {
|
|
60833
|
-
S(
|
|
60849
|
+
S(I(E, O, e, A), "mouse");
|
|
60834
60850
|
}), oe(l, /*#__PURE__*/ a.createElement(A1, { key: "second" }), A, ae, function(e) {
|
|
60835
|
-
S(
|
|
60851
|
+
S(I(E, O, k, e), "mouse");
|
|
60836
60852
|
});
|
|
60837
60853
|
var z = -1;
|
|
60838
60854
|
return typeof E == "boolean" && (z = +!!E), oe(u === !0, /*#__PURE__*/ a.createElement(A1, { key: "12hours" }), z, [{
|
|
@@ -60844,7 +60860,7 @@ function z1(e) {
|
|
|
60844
60860
|
value: 1,
|
|
60845
60861
|
disabled: re
|
|
60846
60862
|
}], function(e) {
|
|
60847
|
-
S(
|
|
60863
|
+
S(I(!!e, O, k, A), "mouse");
|
|
60848
60864
|
}), /*#__PURE__*/ a.createElement("div", { className: w }, C.map(function(e) {
|
|
60849
60865
|
return e.node;
|
|
60850
60866
|
}));
|
|
@@ -61453,8 +61469,8 @@ function u0(e) {
|
|
|
61453
61469
|
//#endregion
|
|
61454
61470
|
//#region node_modules/.pnpm/rc-picker@2.6.11_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/rc-picker/es/PickerPanel.js
|
|
61455
61471
|
function d0(e) {
|
|
61456
|
-
var t, n = e.prefixCls, r = n === void 0 ? "rc-picker" : n, i = e.className, o = e.style, s = e.locale, c = e.generateConfig, l = e.value, u = e.defaultValue, d = e.pickerValue, f = e.defaultPickerValue, p = e.disabledDate, m = e.mode, h = e.picker, g = h === void 0 ? "date" : h, _ = e.tabIndex, v = _ === void 0 ? 0 : _, y = e.showNow, b = e.showTime, x = e.showToday, S = e.renderExtraFooter, C = e.hideHeader, w = e.onSelect, T = e.onChange, E = e.onPanelChange, D = e.onMouseDown, O = e.onPickerValueChange, k = e.onOk, A = e.components, j = e.direction, M = e.hourStep, N = M === void 0 ? 1 : M, P = e.minuteStep,
|
|
61457
|
-
process.env.NODE_ENV !== "production" && (iq(!l || c.isValidate(l), "Invalidate date pass to `value`."), iq(!l || c.isValidate(l), "Invalidate date pass to `defaultValue`."), iq(te, `\`hourStep\` ${N} is invalid. It should be a factor of 24.`), iq(ne, `\`minuteStep\` ${
|
|
61472
|
+
var t, n = e.prefixCls, r = n === void 0 ? "rc-picker" : n, i = e.className, o = e.style, s = e.locale, c = e.generateConfig, l = e.value, u = e.defaultValue, d = e.pickerValue, f = e.defaultPickerValue, p = e.disabledDate, m = e.mode, h = e.picker, g = h === void 0 ? "date" : h, _ = e.tabIndex, v = _ === void 0 ? 0 : _, y = e.showNow, b = e.showTime, x = e.showToday, S = e.renderExtraFooter, C = e.hideHeader, w = e.onSelect, T = e.onChange, E = e.onPanelChange, D = e.onMouseDown, O = e.onPickerValueChange, k = e.onOk, A = e.components, j = e.direction, M = e.hourStep, N = M === void 0 ? 1 : M, P = e.minuteStep, F = P === void 0 ? 1 : P, I = e.secondStep, ee = I === void 0 ? 1 : I, L = g === "date" && !!b || g === "time", te = 24 % N == 0, ne = 60 % F == 0, re = 60 % ee == 0;
|
|
61473
|
+
process.env.NODE_ENV !== "production" && (iq(!l || c.isValidate(l), "Invalidate date pass to `value`."), iq(!l || c.isValidate(l), "Invalidate date pass to `defaultValue`."), iq(te, `\`hourStep\` ${N} is invalid. It should be a factor of 24.`), iq(ne, `\`minuteStep\` ${F} is invalid. It should be a factor of 60.`), iq(re, `\`secondStep\` ${ee} is invalid. It should be a factor of 60.`));
|
|
61458
61474
|
var ie = a.useContext(H$), R = ie.operationRef, ae = ie.panelRef, oe = ie.onSelect, z = ie.hideRanges, se = ie.defaultOpenValue, ce = a.useContext(H1), le = ce.inRange, ue = ce.panelPosition, de = ce.rangedValue, fe = ce.hoverRangedValue, pe = a.useRef({}), me = a.useRef(!0), he = Z(XZ(null, {
|
|
61459
61475
|
value: l,
|
|
61460
61476
|
defaultValue: u,
|
|
@@ -61571,7 +61587,7 @@ function d0(e) {
|
|
|
61571
61587
|
locale: s,
|
|
61572
61588
|
showNow: y,
|
|
61573
61589
|
onNow: L && function() {
|
|
61574
|
-
var e = c.getNow(), t = J$(c.getHour(e), c.getMinute(e), c.getSecond(e), te ? N : 1, ne ?
|
|
61590
|
+
var e = c.getNow(), t = J$(c.getHour(e), c.getMinute(e), c.getSecond(e), te ? N : 1, ne ? F : 1, re ? ee : 1);
|
|
61575
61591
|
Ae(K$(c, e, t[0], t[1], t[2]), "submit");
|
|
61576
61592
|
},
|
|
61577
61593
|
onOk: function() {
|
|
@@ -61607,8 +61623,8 @@ function d0(e) {
|
|
|
61607
61623
|
//#endregion
|
|
61608
61624
|
//#region node_modules/.pnpm/rc-util@5.44.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/rc-util/es/Dom/addEventListener.js
|
|
61609
61625
|
function f0(e, t, n, r) {
|
|
61610
|
-
var i =
|
|
61611
|
-
|
|
61626
|
+
var i = F.unstable_batchedUpdates ? function(e) {
|
|
61627
|
+
F.unstable_batchedUpdates(n, e);
|
|
61612
61628
|
} : n;
|
|
61613
61629
|
return e != null && e.addEventListener && e.addEventListener(t, i, r), { remove: function() {
|
|
61614
61630
|
e != null && e.removeEventListener && e.removeEventListener(t, i, r);
|
|
@@ -61629,7 +61645,7 @@ var p0 = /*#__PURE__*/ p(function(e, t) {
|
|
|
61629
61645
|
var e;
|
|
61630
61646
|
(e = o.current) == null || (e = e.parentNode) == null || e.removeChild(o.current);
|
|
61631
61647
|
};
|
|
61632
|
-
}, []), o.current ? /*#__PURE__*/
|
|
61648
|
+
}, []), o.current ? /*#__PURE__*/ F.createPortal(i, o.current) : null;
|
|
61633
61649
|
});
|
|
61634
61650
|
//#endregion
|
|
61635
61651
|
//#region node_modules/.pnpm/rc-trigger@5.3.4_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/rc-trigger/es/utils/alignUtil.js
|
|
@@ -62622,7 +62638,7 @@ var T4 = w4, E4 = [
|
|
|
62622
62638
|
function M() {
|
|
62623
62639
|
l && j(m());
|
|
62624
62640
|
}
|
|
62625
|
-
var N = Z(D4(n, M), 2), P = N[0],
|
|
62641
|
+
var N = Z(D4(n, M), 2), P = N[0], F = N[1], I = Z(w(0), 2), ee = I[0], L = I[1], te = C();
|
|
62626
62642
|
KZ(function() {
|
|
62627
62643
|
P === "alignPre" && L(0);
|
|
62628
62644
|
}, [P]);
|
|
@@ -62640,11 +62656,11 @@ var T4 = w4, E4 = [
|
|
|
62640
62656
|
}), P === "align" && g?.(e, t);
|
|
62641
62657
|
}
|
|
62642
62658
|
KZ(function() {
|
|
62643
|
-
P === "align" && (
|
|
62659
|
+
P === "align" && (ee < 3 ? re() : F(function() {
|
|
62644
62660
|
var e;
|
|
62645
62661
|
(e = te.current) == null || e.call(te);
|
|
62646
62662
|
}));
|
|
62647
|
-
}, [
|
|
62663
|
+
}, [ee]);
|
|
62648
62664
|
var R = Q({}, v0(e));
|
|
62649
62665
|
[
|
|
62650
62666
|
"onAppearEnd",
|
|
@@ -62653,7 +62669,7 @@ var T4 = w4, E4 = [
|
|
|
62653
62669
|
].forEach(function(e) {
|
|
62654
62670
|
var t = R[e];
|
|
62655
62671
|
R[e] = function(e, n) {
|
|
62656
|
-
return
|
|
62672
|
+
return F(), t?.(e, n);
|
|
62657
62673
|
};
|
|
62658
62674
|
});
|
|
62659
62675
|
function ae() {
|
|
@@ -62662,7 +62678,7 @@ var T4 = w4, E4 = [
|
|
|
62662
62678
|
});
|
|
62663
62679
|
}
|
|
62664
62680
|
a.useEffect(function() {
|
|
62665
|
-
!R.motionName && P === "motion" &&
|
|
62681
|
+
!R.motionName && P === "motion" && F();
|
|
62666
62682
|
}, [R.motionName, P]), a.useImperativeHandle(t, function() {
|
|
62667
62683
|
return {
|
|
62668
62684
|
forceAlign: re,
|
|
@@ -62833,7 +62849,7 @@ function R4(e) {
|
|
|
62833
62849
|
var n = MZ(t.triggerRef.current);
|
|
62834
62850
|
if (n) return n;
|
|
62835
62851
|
} catch {}
|
|
62836
|
-
return
|
|
62852
|
+
return F.findDOMNode(zK(t));
|
|
62837
62853
|
}), X(zK(t), "getPopupClassNameFromAlign", function(e) {
|
|
62838
62854
|
var n = [], r = t.props, i = r.popupPlacement, a = r.builtinPlacements, o = r.prefixCls, s = r.alignPoint, c = r.getPopupClassNameFromAlign;
|
|
62839
62855
|
return i && a && n.push(g0(a, o, e, s)), c && n.push(c(e)), n.join(" ");
|
|
@@ -63320,7 +63336,7 @@ function q4(e) {
|
|
|
63320
63336
|
//#endregion
|
|
63321
63337
|
//#region node_modules/.pnpm/rc-picker@2.6.11_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/rc-picker/es/Picker.js
|
|
63322
63338
|
function J4(e) {
|
|
63323
|
-
var t, n = e.prefixCls, r = n === void 0 ? "rc-picker" : n, i = e.id, o = e.tabIndex, s = e.style, c = e.className, l = e.dropdownClassName, u = e.dropdownAlign, d = e.popupStyle, f = e.transitionName, p = e.generateConfig, m = e.locale, h = e.inputReadOnly, g = e.allowClear, _ = e.autoFocus, v = e.showTime, y = e.picker, b = y === void 0 ? "date" : y, x = e.format, S = e.use12Hours, C = e.value, w = e.defaultValue, T = e.open, E = e.defaultOpen, D = e.defaultOpenValue, O = e.suffixIcon, k = e.clearIcon, A = e.disabled, j = e.disabledDate, M = e.placeholder, N = e.getPopupContainer, P = e.pickerRef,
|
|
63339
|
+
var t, n = e.prefixCls, r = n === void 0 ? "rc-picker" : n, i = e.id, o = e.tabIndex, s = e.style, c = e.className, l = e.dropdownClassName, u = e.dropdownAlign, d = e.popupStyle, f = e.transitionName, p = e.generateConfig, m = e.locale, h = e.inputReadOnly, g = e.allowClear, _ = e.autoFocus, v = e.showTime, y = e.picker, b = y === void 0 ? "date" : y, x = e.format, S = e.use12Hours, C = e.value, w = e.defaultValue, T = e.open, E = e.defaultOpen, D = e.defaultOpenValue, O = e.suffixIcon, k = e.clearIcon, A = e.disabled, j = e.disabledDate, M = e.placeholder, N = e.getPopupContainer, P = e.pickerRef, F = e.panelRender, I = e.onChange, ee = e.onOpenChange, L = e.onFocus, te = e.onBlur, ne = e.onMouseDown, re = e.onMouseUp, ie = e.onMouseEnter, R = e.onMouseLeave, ae = e.onContextMenu, oe = e.onClick, z = e.onKeyDown, se = e.onSelect, ce = e.direction, le = e.autoComplete, ue = le === void 0 ? "off" : le, de = e.inputRender, fe = a.useRef(null), pe = b === "date" && !!v || b === "time";
|
|
63324
63340
|
process.env.NODE_ENV !== "production" && q4(e);
|
|
63325
63341
|
var me = N1(i1(x, b, v, S)), he = a.useRef(null), ge = a.useRef(null), _e = a.useRef(null), ve = Z(XZ(null, {
|
|
63326
63342
|
value: C,
|
|
@@ -63332,7 +63348,7 @@ function J4(e) {
|
|
|
63332
63348
|
return !A && e;
|
|
63333
63349
|
},
|
|
63334
63350
|
onChange: function(e) {
|
|
63335
|
-
|
|
63351
|
+
ee && ee(e), !e && we.current && we.current.onClose && we.current.onClose();
|
|
63336
63352
|
}
|
|
63337
63353
|
}), 2), Ee = Te[0], De = Te[1], Oe = Z(G4(Se, {
|
|
63338
63354
|
formatList: me,
|
|
@@ -63349,7 +63365,7 @@ function J4(e) {
|
|
|
63349
63365
|
t && (!j || !j(t)) && Ce(t);
|
|
63350
63366
|
}
|
|
63351
63367
|
}), 3), Me = je[0], Ne = je[1], Pe = je[2], Fe = function(e) {
|
|
63352
|
-
Ce(e), be(e),
|
|
63368
|
+
Ce(e), be(e), I && !S1(p, ye, e) && I(e, e ? E1(e, {
|
|
63353
63369
|
generateConfig: p,
|
|
63354
63370
|
locale: m,
|
|
63355
63371
|
format: me[0]
|
|
@@ -63424,7 +63440,7 @@ function J4(e) {
|
|
|
63424
63440
|
qe(!0), r?.(t, n);
|
|
63425
63441
|
}
|
|
63426
63442
|
}));
|
|
63427
|
-
|
|
63443
|
+
F && (Ye = F(Ye));
|
|
63428
63444
|
var Xe = /*#__PURE__*/ a.createElement("div", {
|
|
63429
63445
|
className: `${r}-panel-container`,
|
|
63430
63446
|
onMouseDown: function(e) {
|
|
@@ -63619,7 +63635,7 @@ function t3(e, t, n, r) {
|
|
|
63619
63635
|
return !!(e || r && r[t] || n[(t + 1) % 2]);
|
|
63620
63636
|
}
|
|
63621
63637
|
function n3(e) {
|
|
63622
|
-
var t, n, r, i = e.prefixCls, o = i === void 0 ? "rc-picker" : i, s = e.id, c = e.style, l = e.className, u = e.popupStyle, d = e.dropdownClassName, f = e.transitionName, p = e.dropdownAlign, m = e.getPopupContainer, h = e.generateConfig, g = e.locale, _ = e.placeholder, v = e.autoFocus, b = e.disabled, x = e.format, S = e.picker, T = S === void 0 ? "date" : S, E = e.showTime, D = e.use12Hours, O = e.separator, k = O === void 0 ? "~" : O, A = e.value, j = e.defaultValue, M = e.defaultPickerValue, N = e.open, P = e.defaultOpen,
|
|
63638
|
+
var t, n, r, i = e.prefixCls, o = i === void 0 ? "rc-picker" : i, s = e.id, c = e.style, l = e.className, u = e.popupStyle, d = e.dropdownClassName, f = e.transitionName, p = e.dropdownAlign, m = e.getPopupContainer, h = e.generateConfig, g = e.locale, _ = e.placeholder, v = e.autoFocus, b = e.disabled, x = e.format, S = e.picker, T = S === void 0 ? "date" : S, E = e.showTime, D = e.use12Hours, O = e.separator, k = O === void 0 ? "~" : O, A = e.value, j = e.defaultValue, M = e.defaultPickerValue, N = e.open, P = e.defaultOpen, F = e.disabledDate, I = e.disabledTime, ee = e.dateRender, L = e.panelRender, te = e.ranges, ne = e.allowEmpty, re = e.allowClear, ie = e.suffixIcon, R = e.clearIcon, ae = e.pickerRef, oe = e.inputReadOnly, z = e.mode, se = e.renderExtraFooter, ce = e.onChange, le = e.onOpenChange, ue = e.onPanelChange, de = e.onCalendarChange, fe = e.onFocus, pe = e.onBlur, me = e.onMouseDown, he = e.onMouseUp, ge = e.onMouseEnter, _e = e.onMouseLeave, ve = e.onClick, ye = e.onOk, be = e.onKeyDown, xe = e.components, Se = e.order, Ce = e.direction, we = e.activePickerIndex, Te = e.autoComplete, Ee = Te === void 0 ? "off" : Te, De = T === "date" && !!E || T === "time", Oe = C({}), ke = C(null), Ae = C(null), je = C(null), Me = C(null), Ne = C(null), Pe = C(null), Fe = C(null), Ie = C(null);
|
|
63623
63639
|
process.env.NODE_ENV !== "production" && q4(e);
|
|
63624
63640
|
var Le = N1(i1(x, T, E, D)), Re = Z(XZ(0, { value: we }), 2), ze = Re[0], Be = Re[1], Ve = C(null), He = a.useMemo(function() {
|
|
63625
63641
|
return Array.isArray(b) ? b : [b || !1, b || !1];
|
|
@@ -63650,7 +63666,7 @@ function n3(e) {
|
|
|
63650
63666
|
selectedValue: Xe,
|
|
63651
63667
|
locale: g,
|
|
63652
63668
|
disabled: He,
|
|
63653
|
-
disabledDate:
|
|
63669
|
+
disabledDate: F,
|
|
63654
63670
|
generateConfig: h
|
|
63655
63671
|
}, Oe.current[1], Oe.current[0]), 2), rt = nt[0], it = nt[1], at = Z(XZ(!1, {
|
|
63656
63672
|
value: N,
|
|
@@ -63755,7 +63771,7 @@ function n3(e) {
|
|
|
63755
63771
|
mt(t, e);
|
|
63756
63772
|
},
|
|
63757
63773
|
onSubmit: function() {
|
|
63758
|
-
if (!Xe ||
|
|
63774
|
+
if (!Xe || F && F(Xe[e])) return !1;
|
|
63759
63775
|
gt(Xe, e), t();
|
|
63760
63776
|
},
|
|
63761
63777
|
onCancel: function() {
|
|
@@ -63827,8 +63843,8 @@ function n3(e) {
|
|
|
63827
63843
|
i = Q(Q({}, E), {}, { defaultValue: F1(s, ze) || void 0 });
|
|
63828
63844
|
}
|
|
63829
63845
|
var c = null;
|
|
63830
|
-
return
|
|
63831
|
-
return
|
|
63846
|
+
return ee && (c = function(e, t) {
|
|
63847
|
+
return ee(e, t, { range: ze ? "end" : "start" });
|
|
63832
63848
|
}), /*#__PURE__*/ a.createElement(H1.Provider, { value: {
|
|
63833
63849
|
inRange: !0,
|
|
63834
63850
|
panelPosition: t,
|
|
@@ -63843,7 +63859,7 @@ function n3(e) {
|
|
|
63843
63859
|
direction: Ce,
|
|
63844
63860
|
disabledDate: ze === 0 ? rt : it,
|
|
63845
63861
|
disabledTime: function(e) {
|
|
63846
|
-
return
|
|
63862
|
+
return I ? I(e, ze === 0 ? "start" : "end") : !1;
|
|
63847
63863
|
},
|
|
63848
63864
|
className: (0, EK.default)(X({}, `${o}-panel-focused`, ze === 0 ? !tn : !sn)),
|
|
63849
63865
|
value: F1(Xe, ze),
|
|
@@ -63872,7 +63888,7 @@ function n3(e) {
|
|
|
63872
63888
|
prefixCls: o,
|
|
63873
63889
|
components: xe,
|
|
63874
63890
|
needConfirmButton: De,
|
|
63875
|
-
okDisabled: !F1(Xe, ze) ||
|
|
63891
|
+
okDisabled: !F1(Xe, ze) || F && F(Xe[ze]),
|
|
63876
63892
|
locale: g,
|
|
63877
63893
|
rangeList: fn,
|
|
63878
63894
|
onOk: function() {
|
|
@@ -64090,7 +64106,7 @@ function f3(e) {
|
|
|
64090
64106
|
format: T,
|
|
64091
64107
|
picker: D
|
|
64092
64108
|
}, E)) : {}), D === "time" ? _3(B(B({ format: T }, t), { picker: D })) : {}), process.env.NODE_ENV !== "production" && xY(!m, "RangePicker", "`dropdownClassName` is deprecated which will be removed in next major version. Please use `popupClassName` instead.");
|
|
64093
|
-
var A = a.useContext(ZQ), j = c || A, M = a.useContext(XQ), N = l || M, P = _(a3),
|
|
64109
|
+
var A = a.useContext(ZQ), j = c || A, M = a.useContext(XQ), N = l || M, P = _(a3), F = P.hasFeedback, I = P.status, ee = P.feedbackIcon, L = /*#__PURE__*/ a.createElement(a.Fragment, null, D === "time" ? /*#__PURE__*/ a.createElement(z$, null) : /*#__PURE__*/ a.createElement(L$, null), F && ee);
|
|
64094
64110
|
return b(n, function() {
|
|
64095
64111
|
return {
|
|
64096
64112
|
focus: function() {
|
|
@@ -64124,7 +64140,7 @@ function f3(e) {
|
|
|
64124
64140
|
allowClear: !0,
|
|
64125
64141
|
transitionName: `${O}-slide-up`
|
|
64126
64142
|
}, g, k, {
|
|
64127
|
-
className: (0, EK.default)((r = {}, X(r, `${w}-${j}`, j), X(r, `${w}-borderless`, !d), r), o3(w, s3(
|
|
64143
|
+
className: (0, EK.default)((r = {}, X(r, `${w}-${j}`, j), X(r, `${w}-borderless`, !d), r), o3(w, s3(I, h), F), o),
|
|
64128
64144
|
locale: c.lang,
|
|
64129
64145
|
prefixCls: w,
|
|
64130
64146
|
getPopupContainer: i || C,
|
|
@@ -64178,7 +64194,7 @@ function m3(e) {
|
|
|
64178
64194
|
}, O)) : {}), j === "time" ? _3(B(B({ format: D }, r), { picker: j })) : {});
|
|
64179
64195
|
var M = S();
|
|
64180
64196
|
process.env.NODE_ENV !== "production" && xY(t !== "quarter", n, `DatePicker.${n} is legacy usage. Please use DatePicker[picker='${t}'] directly.`), process.env.NODE_ENV !== "production" && xY(!h, "DatePicker", "`dropdownClassName` is deprecated which will be removed in next major version. Please use `popupClassName` instead.");
|
|
64181
|
-
var N = a.useContext(ZQ), P = l || N,
|
|
64197
|
+
var N = a.useContext(ZQ), P = l || N, F = a.useContext(XQ), I = g || F, ee = _(a3), L = ee.hasFeedback, te = ee.status, ne = ee.feedbackIcon, re = /*#__PURE__*/ a.createElement(a.Fragment, null, j === "time" ? /*#__PURE__*/ a.createElement(z$, null) : /*#__PURE__*/ a.createElement(L$, null), L && ne);
|
|
64182
64198
|
return /*#__PURE__*/ a.createElement(jY, {
|
|
64183
64199
|
componentName: "DatePicker",
|
|
64184
64200
|
defaultLocale: TY
|
|
@@ -64205,7 +64221,7 @@ function m3(e) {
|
|
|
64205
64221
|
generateConfig: e,
|
|
64206
64222
|
components: h3,
|
|
64207
64223
|
direction: C,
|
|
64208
|
-
disabled:
|
|
64224
|
+
disabled: I
|
|
64209
64225
|
}));
|
|
64210
64226
|
});
|
|
64211
64227
|
});
|
|
@@ -64841,7 +64857,7 @@ function W3({ conversationId: e, members: t, initialQuery: n = "", onClose: r, o
|
|
|
64841
64857
|
}, ...(t ?? []).map((e) => ({
|
|
64842
64858
|
value: Lc(e) ?? "",
|
|
64843
64859
|
label: Io(Ic(e))
|
|
64844
|
-
}))],
|
|
64860
|
+
}))], F = g(async ({ nextQuery: t, tab: n = null }) => {
|
|
64845
64861
|
let r = String(t ?? "").trim();
|
|
64846
64862
|
if (!e || !r) return;
|
|
64847
64863
|
let i = k.current + 1;
|
|
@@ -64880,11 +64896,11 @@ function W3({ conversationId: e, members: t, initialQuery: n = "", onClose: r, o
|
|
|
64880
64896
|
}
|
|
64881
64897
|
}, [e]);
|
|
64882
64898
|
y(() => {
|
|
64883
|
-
n.trim() &&
|
|
64884
|
-
}, [n,
|
|
64885
|
-
s &&
|
|
64899
|
+
n.trim() && F({ nextQuery: n });
|
|
64900
|
+
}, [n, F]), y(() => {
|
|
64901
|
+
s && F({ nextQuery: s });
|
|
64886
64902
|
}, [d, p]);
|
|
64887
|
-
let
|
|
64903
|
+
let I = (e) => {
|
|
64888
64904
|
e.preventDefault();
|
|
64889
64905
|
let t = a.trim();
|
|
64890
64906
|
if (!t) {
|
|
@@ -64894,8 +64910,8 @@ function W3({ conversationId: e, members: t, initialQuery: n = "", onClose: r, o
|
|
|
64894
64910
|
}), E("");
|
|
64895
64911
|
return;
|
|
64896
64912
|
}
|
|
64897
|
-
|
|
64898
|
-
},
|
|
64913
|
+
F({ nextQuery: t });
|
|
64914
|
+
}, ee = () => {
|
|
64899
64915
|
o(""), c(""), _({
|
|
64900
64916
|
messages: B3,
|
|
64901
64917
|
documents: B3
|
|
@@ -64927,7 +64943,7 @@ function W3({ conversationId: e, members: t, initialQuery: n = "", onClose: r, o
|
|
|
64927
64943
|
}),
|
|
64928
64944
|
/* @__PURE__ */ M("form", {
|
|
64929
64945
|
className: "message-search-form",
|
|
64930
|
-
onSubmit:
|
|
64946
|
+
onSubmit: I,
|
|
64931
64947
|
children: /* @__PURE__ */ N("div", {
|
|
64932
64948
|
className: "chat-modal-search chat-modal-search--pill message-search-input-pill",
|
|
64933
64949
|
children: [
|
|
@@ -64943,7 +64959,7 @@ function W3({ conversationId: e, members: t, initialQuery: n = "", onClose: r, o
|
|
|
64943
64959
|
a || s ? /* @__PURE__ */ M("button", {
|
|
64944
64960
|
type: "button",
|
|
64945
64961
|
className: "message-search-clear",
|
|
64946
|
-
onClick:
|
|
64962
|
+
onClick: ee,
|
|
64947
64963
|
"aria-label": "Xóa từ khóa",
|
|
64948
64964
|
children: /* @__PURE__ */ M(pi, { "aria-hidden": "true" })
|
|
64949
64965
|
}) : null
|
|
@@ -65034,7 +65050,7 @@ function W3({ conversationId: e, members: t, initialQuery: n = "", onClose: r, o
|
|
|
65034
65050
|
className: "message-search-more",
|
|
65035
65051
|
type: "button",
|
|
65036
65052
|
disabled: x === l || !s,
|
|
65037
|
-
onClick: () =>
|
|
65053
|
+
onClick: () => F({
|
|
65038
65054
|
nextQuery: s,
|
|
65039
65055
|
tab: l
|
|
65040
65056
|
}),
|
|
@@ -65208,7 +65224,7 @@ function X3({ conversationId: e, initialTab: t, members: n, onBack: r, onForward
|
|
|
65208
65224
|
T,
|
|
65209
65225
|
E
|
|
65210
65226
|
]);
|
|
65211
|
-
let D = go(f, 450).trim().toLocaleLowerCase("vi"), O = v.mediaItems, k = uc(v.fileItems).filter(({ attachment: e }) => (u === "all" || mc(e) === u) && (!D || (e.name ?? "").toLocaleLowerCase("vi").includes(D))), A = o === "media" ? O : k, j = v.loadingTab === o, P = !j && A.length === 0,
|
|
65227
|
+
let D = go(f, 450).trim().toLocaleLowerCase("vi"), O = v.mediaItems, k = uc(v.fileItems).filter(({ attachment: e }) => (u === "all" || mc(e) === u) && (!D || (e.name ?? "").toLocaleLowerCase("vi").includes(D))), A = o === "media" ? O : k, j = v.loadingTab === o, P = !j && A.length === 0, F = yc(O, (e) => e.createdAt), I = yc(k, (e) => e.message.createdAt), ee = [{
|
|
65212
65228
|
value: "",
|
|
65213
65229
|
label: "Tất cả người gửi"
|
|
65214
65230
|
}, ...n.map((e) => ({
|
|
@@ -65267,7 +65283,7 @@ function X3({ conversationId: e, initialTab: t, members: n, onBack: r, onForward
|
|
|
65267
65283
|
/* @__PURE__ */ M(ks, {
|
|
65268
65284
|
label: "Người gửi",
|
|
65269
65285
|
value: v.senderId ?? "",
|
|
65270
|
-
options:
|
|
65286
|
+
options: ee,
|
|
65271
65287
|
onChange: (e) => v.setSenderId(e || null)
|
|
65272
65288
|
})
|
|
65273
65289
|
]
|
|
@@ -65282,14 +65298,14 @@ function X3({ conversationId: e, initialTab: t, members: n, onBack: r, onForward
|
|
|
65282
65298
|
}) : null,
|
|
65283
65299
|
P ? /* @__PURE__ */ M(Qs, { message: "Không có nội dung" }) : null,
|
|
65284
65300
|
!j && o === "media" ? /* @__PURE__ */ M(J3, {
|
|
65285
|
-
groups:
|
|
65301
|
+
groups: F,
|
|
65286
65302
|
resolveSenderName: x,
|
|
65287
65303
|
onSelect: C,
|
|
65288
65304
|
onShare: i,
|
|
65289
65305
|
onJumpToMessage: a
|
|
65290
65306
|
}) : null,
|
|
65291
65307
|
!j && o === "file" ? /* @__PURE__ */ M(q3, {
|
|
65292
|
-
groups:
|
|
65308
|
+
groups: I,
|
|
65293
65309
|
resolveSenderName: x,
|
|
65294
65310
|
onSelect: C,
|
|
65295
65311
|
onShare: i,
|
|
@@ -65347,12 +65363,12 @@ function Z3({ currentUserId: e, memberUserIds: t, onClose: n, onConfirm: r }) {
|
|
|
65347
65363
|
]);
|
|
65348
65364
|
let P = (e) => {
|
|
65349
65365
|
e.preventDefault(), x(_.trim());
|
|
65350
|
-
},
|
|
65366
|
+
}, F = (e) => {
|
|
65351
65367
|
E((t) => {
|
|
65352
65368
|
let n = String(Fo(e) ?? "");
|
|
65353
65369
|
return t.some((e) => String(Fo(e)) === n) ? t.filter((e) => String(Fo(e)) !== n) : [...t, e];
|
|
65354
65370
|
});
|
|
65355
|
-
},
|
|
65371
|
+
}, I = u.length > 0 && u.every((e) => T.some((t) => String(Fo(t)) === String(Fo(e) ?? "")));
|
|
65356
65372
|
return /* @__PURE__ */ N($s, {
|
|
65357
65373
|
title: "Thêm thành viên",
|
|
65358
65374
|
onClose: n,
|
|
@@ -65409,7 +65425,7 @@ function Z3({ currentUserId: e, memberUserIds: t, onClose: n, onConfirm: r }) {
|
|
|
65409
65425
|
return /* @__PURE__ */ N("button", {
|
|
65410
65426
|
className: `chat-modal-user-row chat-modal-user-row--selectable${n ? " is-selected" : ""}`,
|
|
65411
65427
|
type: "button",
|
|
65412
|
-
onClick: () =>
|
|
65428
|
+
onClick: () => F(e),
|
|
65413
65429
|
children: [/* @__PURE__ */ M("span", {
|
|
65414
65430
|
className: `chat-modal-user-checkbox${n ? " is-checked" : ""}`,
|
|
65415
65431
|
"aria-hidden": "true",
|
|
@@ -65431,12 +65447,12 @@ function Z3({ currentUserId: e, memberUserIds: t, onClose: n, onConfirm: r }) {
|
|
|
65431
65447
|
className: "chat-modal-selected-count",
|
|
65432
65448
|
disabled: u.length === 0 || D,
|
|
65433
65449
|
onClick: () => {
|
|
65434
|
-
E(
|
|
65450
|
+
E(I ? [] : u);
|
|
65435
65451
|
},
|
|
65436
65452
|
children: [/* @__PURE__ */ M(ti, {
|
|
65437
65453
|
className: "chat-modal-selected-tick",
|
|
65438
65454
|
"aria-hidden": "true"
|
|
65439
|
-
}),
|
|
65455
|
+
}), I ? "Bỏ chọn tất cả" : "Chọn tất cả"]
|
|
65440
65456
|
}), /* @__PURE__ */ N("button", {
|
|
65441
65457
|
type: "button",
|
|
65442
65458
|
className: "chat-modal-selected-count",
|
|
@@ -65481,7 +65497,7 @@ function Z3({ currentUserId: e, memberUserIds: t, onClose: n, onConfirm: r }) {
|
|
|
65481
65497
|
k ? /* @__PURE__ */ M(rc, {
|
|
65482
65498
|
users: T,
|
|
65483
65499
|
onClose: () => A(!1),
|
|
65484
|
-
onRemove:
|
|
65500
|
+
onRemove: F
|
|
65485
65501
|
}) : null
|
|
65486
65502
|
]
|
|
65487
65503
|
});
|
|
@@ -65675,7 +65691,7 @@ var n6 = (e) => {
|
|
|
65675
65691
|
};
|
|
65676
65692
|
}, r6 = (e, t) => String(e ?? "") === String(t ?? "");
|
|
65677
65693
|
function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onDeleteSuccess: r, onLeaveSuccess: i, onMembersChanged: a }) {
|
|
65678
|
-
let [o, s] = w([]), [c, l] = w(null), [u, d] = w(""), [f, p] = w(!1), [m, h] = w(!1), [_, v] = w(""), [b, x] = w(""), [C, T] = w(null), [E, D] = w(null), [O, k] = w(!1), [A, j] = w(!1), [M, N] = w(!1), [P,
|
|
65694
|
+
let [o, s] = w([]), [c, l] = w(null), [u, d] = w(""), [f, p] = w(!1), [m, h] = w(!1), [_, v] = w(""), [b, x] = w(""), [C, T] = w(null), [E, D] = w(null), [O, k] = w(!1), [A, j] = w(!1), [M, N] = w(!1), [P, F] = w(!1), I = g(async ({ cursor: t = null, search: n = "", append: r = !1 } = {}) => {
|
|
65679
65695
|
if (e) {
|
|
65680
65696
|
r ? h(!0) : p(!0), v("");
|
|
65681
65697
|
try {
|
|
@@ -65695,46 +65711,46 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65695
65711
|
y(() => {
|
|
65696
65712
|
let e = !0;
|
|
65697
65713
|
return Promise.resolve().then(() => {
|
|
65698
|
-
e &&
|
|
65714
|
+
e && I({
|
|
65699
65715
|
search: "",
|
|
65700
65716
|
append: !1
|
|
65701
65717
|
});
|
|
65702
65718
|
}), () => {
|
|
65703
65719
|
e = !1;
|
|
65704
65720
|
};
|
|
65705
|
-
}, [
|
|
65721
|
+
}, [I]), y(() => {
|
|
65706
65722
|
if (e) return Kn({ onConversationMembershipChanged: (t) => {
|
|
65707
65723
|
let n = t?.data ?? t;
|
|
65708
|
-
String(n?.conversationId) === String(e) &&
|
|
65724
|
+
String(n?.conversationId) === String(e) && I({
|
|
65709
65725
|
search: u,
|
|
65710
65726
|
append: !1
|
|
65711
65727
|
});
|
|
65712
65728
|
} });
|
|
65713
65729
|
}, [
|
|
65714
65730
|
e,
|
|
65715
|
-
|
|
65731
|
+
I,
|
|
65716
65732
|
u
|
|
65717
65733
|
]);
|
|
65718
|
-
let
|
|
65719
|
-
d(e), await
|
|
65734
|
+
let ee = S(() => new Set(o.map((e) => Lc(e)).filter(Boolean).map(String)), [o]), L = S(() => o.find((e) => r6(Lc(e), t)) ?? null, [t, o]), te = Rc(L) === "OWNER", ne = S(() => o.filter((e) => !r6(Lc(e), t)), [t, o]), re = `${o.length}${c ? "+" : ""}`, ie = g(async (e) => {
|
|
65735
|
+
d(e), await I({
|
|
65720
65736
|
search: e,
|
|
65721
65737
|
append: !1
|
|
65722
65738
|
});
|
|
65723
|
-
}, [
|
|
65724
|
-
c && await
|
|
65739
|
+
}, [I]), R = g(async () => {
|
|
65740
|
+
c && await I({
|
|
65725
65741
|
cursor: c,
|
|
65726
65742
|
search: u,
|
|
65727
65743
|
append: !0
|
|
65728
65744
|
});
|
|
65729
65745
|
}, [
|
|
65730
|
-
|
|
65746
|
+
I,
|
|
65731
65747
|
u,
|
|
65732
65748
|
c
|
|
65733
65749
|
]), ae = g(async (t) => {
|
|
65734
65750
|
if (!e || !t || C) return !1;
|
|
65735
65751
|
T(t), x("");
|
|
65736
65752
|
try {
|
|
65737
|
-
return await xn(e, t), await
|
|
65753
|
+
return await xn(e, t), await I({
|
|
65738
65754
|
search: u,
|
|
65739
65755
|
append: !1
|
|
65740
65756
|
}), a?.(), !0;
|
|
@@ -65746,14 +65762,14 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65746
65762
|
}, [
|
|
65747
65763
|
C,
|
|
65748
65764
|
e,
|
|
65749
|
-
|
|
65765
|
+
I,
|
|
65750
65766
|
u,
|
|
65751
65767
|
a
|
|
65752
65768
|
]), oe = g(async (t) => {
|
|
65753
65769
|
if (!e || t.length === 0 || C) return !1;
|
|
65754
65770
|
T(t[0]), x("");
|
|
65755
65771
|
try {
|
|
65756
|
-
return await Sn(e, t), await
|
|
65772
|
+
return await Sn(e, t), await I({
|
|
65757
65773
|
search: u,
|
|
65758
65774
|
append: !1
|
|
65759
65775
|
}), a?.(), !0;
|
|
@@ -65765,14 +65781,14 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65765
65781
|
}, [
|
|
65766
65782
|
C,
|
|
65767
65783
|
e,
|
|
65768
|
-
|
|
65784
|
+
I,
|
|
65769
65785
|
u,
|
|
65770
65786
|
a
|
|
65771
65787
|
]), z = g(async (t) => {
|
|
65772
65788
|
if (!e || t.length === 0 || E) return !1;
|
|
65773
65789
|
D(t[0]), x("");
|
|
65774
65790
|
try {
|
|
65775
|
-
return await Cn(e, t), await
|
|
65791
|
+
return await Cn(e, t), await I({
|
|
65776
65792
|
search: u,
|
|
65777
65793
|
append: !1
|
|
65778
65794
|
}), a?.(), !0;
|
|
@@ -65784,14 +65800,14 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65784
65800
|
}, [
|
|
65785
65801
|
e,
|
|
65786
65802
|
E,
|
|
65787
|
-
|
|
65803
|
+
I,
|
|
65788
65804
|
u,
|
|
65789
65805
|
a
|
|
65790
65806
|
]), se = g(async (t) => {
|
|
65791
65807
|
if (!e || !t || E) return !1;
|
|
65792
65808
|
D(t), x("");
|
|
65793
65809
|
try {
|
|
65794
|
-
return await En(e, t), await
|
|
65810
|
+
return await En(e, t), await I({
|
|
65795
65811
|
search: u,
|
|
65796
65812
|
append: !1
|
|
65797
65813
|
}), a?.(), !0;
|
|
@@ -65803,7 +65819,7 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65803
65819
|
}, [
|
|
65804
65820
|
e,
|
|
65805
65821
|
E,
|
|
65806
|
-
|
|
65822
|
+
I,
|
|
65807
65823
|
u,
|
|
65808
65824
|
a
|
|
65809
65825
|
]), B = g(async (t) => {
|
|
@@ -65872,13 +65888,13 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65872
65888
|
isOwner: te,
|
|
65873
65889
|
leave: g(async (t = null) => {
|
|
65874
65890
|
if (!e || P) return !1;
|
|
65875
|
-
|
|
65891
|
+
F(!0), x("");
|
|
65876
65892
|
try {
|
|
65877
65893
|
return await Dn(e, t), i?.(), !0;
|
|
65878
65894
|
} catch {
|
|
65879
65895
|
return Vs.error("Không rời được nhóm"), !1;
|
|
65880
65896
|
} finally {
|
|
65881
|
-
|
|
65897
|
+
F(!1);
|
|
65882
65898
|
}
|
|
65883
65899
|
}, [
|
|
65884
65900
|
e,
|
|
@@ -65887,7 +65903,7 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65887
65903
|
]),
|
|
65888
65904
|
loadMoreMembers: R,
|
|
65889
65905
|
memberCountLabel: re,
|
|
65890
|
-
memberUserIds:
|
|
65906
|
+
memberUserIds: ee,
|
|
65891
65907
|
members: o,
|
|
65892
65908
|
membersError: _,
|
|
65893
65909
|
membersSearch: u,
|
|
@@ -65901,7 +65917,7 @@ function i6({ conversationId: e, currentUserId: t, onConversationUpdated: n, onD
|
|
|
65901
65917
|
//#endregion
|
|
65902
65918
|
//#region src/pages/Setting/conversation-settings-panel.tsx
|
|
65903
65919
|
function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i, onConversationUpdated: a, onDeleteSuccess: o, onLeaveSuccess: s, onMembersChanged: c, onStartChat: l, onForwardMessage: u, onJumpToMessage: d }) {
|
|
65904
|
-
let [f, p] = w(null), [m, h] = w(null), [g, _] = w(""), [v, y] = w(null), [b, x] = w(null), [S, T] = w(""), E = C(null), { filePreview: D, mediaPreview: O } = Ul(t), k = e ? Bo(e, n) : "Cuộc trò chuyện", A = e?.type === "GROUP", P = ic((e) => e.hasUpdateGroupVerified),
|
|
65920
|
+
let [f, p] = w(null), [m, h] = w(null), [g, _] = w(""), [v, y] = w(null), [b, x] = w(null), [S, T] = w(""), E = C(null), { filePreview: D, mediaPreview: O } = Ul(t), k = e ? Bo(e, n) : "Cuộc trò chuyện", A = e?.type === "GROUP", P = ic((e) => e.hasUpdateGroupVerified), F = ic((e) => e.hasDeleteGroupVerified), I = !!e?.isVerified && !P, ee = !!e?.isVerified && !F, L = i6({
|
|
65905
65921
|
conversationId: t,
|
|
65906
65922
|
currentUserId: n,
|
|
65907
65923
|
onConversationUpdated: a,
|
|
@@ -65949,7 +65965,7 @@ function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i,
|
|
|
65949
65965
|
className: "settings-title-block",
|
|
65950
65966
|
children: [
|
|
65951
65967
|
/* @__PURE__ */ N("div", {
|
|
65952
|
-
className: `settings-avatar-edit${A && L.isOwner && !
|
|
65968
|
+
className: `settings-avatar-edit${A && L.isOwner && !I ? " is-editable" : ""}`,
|
|
65953
65969
|
children: [
|
|
65954
65970
|
/* @__PURE__ */ M("button", {
|
|
65955
65971
|
type: "button",
|
|
@@ -65976,7 +65992,7 @@ function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i,
|
|
|
65976
65992
|
className: "conversation-avatar conversation-avatar--settings"
|
|
65977
65993
|
})
|
|
65978
65994
|
}),
|
|
65979
|
-
A && L.isOwner && !
|
|
65995
|
+
A && L.isOwner && !I ? /* @__PURE__ */ M(r, {
|
|
65980
65996
|
title: "Đổi ảnh đại diện",
|
|
65981
65997
|
children: /* @__PURE__ */ M("button", {
|
|
65982
65998
|
type: "button",
|
|
@@ -66002,7 +66018,7 @@ function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i,
|
|
|
66002
66018
|
}),
|
|
66003
66019
|
/* @__PURE__ */ N("div", {
|
|
66004
66020
|
className: "settings-title-row",
|
|
66005
|
-
children: [/* @__PURE__ */ N("h2", { children: [k, A && e?.isVerified ? /* @__PURE__ */ M(Nc, {}) : null] }), A && L.isOwner && !
|
|
66021
|
+
children: [/* @__PURE__ */ N("h2", { children: [k, A && e?.isVerified ? /* @__PURE__ */ M(Nc, {}) : null] }), A && L.isOwner && !I ? /* @__PURE__ */ M("button", {
|
|
66006
66022
|
className: "settings-edit-title-button",
|
|
66007
66023
|
type: "button",
|
|
66008
66024
|
"aria-label": "Sửa tên nhóm",
|
|
@@ -66020,7 +66036,7 @@ function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i,
|
|
|
66020
66036
|
/* @__PURE__ */ N("div", {
|
|
66021
66037
|
className: "settings-row-list",
|
|
66022
66038
|
children: [
|
|
66023
|
-
A && L.isOwner && !
|
|
66039
|
+
A && L.isOwner && !I ? /* @__PURE__ */ N("button", {
|
|
66024
66040
|
className: "settings-row",
|
|
66025
66041
|
type: "button",
|
|
66026
66042
|
onClick: te,
|
|
@@ -66159,7 +66175,7 @@ function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i,
|
|
|
66159
66175
|
}, e.id ?? e.sequence))
|
|
66160
66176
|
})]
|
|
66161
66177
|
}),
|
|
66162
|
-
A ? /* @__PURE__ */ N(j, { children: [L.isOwner && !
|
|
66178
|
+
A ? /* @__PURE__ */ N(j, { children: [L.isOwner && !ee ? /* @__PURE__ */ N("button", {
|
|
66163
66179
|
className: "settings-row danger",
|
|
66164
66180
|
type: "button",
|
|
66165
66181
|
onClick: () => p("delete-group"),
|
|
@@ -66227,7 +66243,7 @@ function a6({ conversation: e, conversationId: t, currentUserId: n, onClose: i,
|
|
|
66227
66243
|
onDeleteMembers: L.removeMembers,
|
|
66228
66244
|
onLoadMore: L.loadMoreMembers,
|
|
66229
66245
|
onOpenProfile: y,
|
|
66230
|
-
updateLocked:
|
|
66246
|
+
updateLocked: I
|
|
66231
66247
|
}) : null,
|
|
66232
66248
|
f === "rename" ? /* @__PURE__ */ M(nc, {
|
|
66233
66249
|
initialTitle: k,
|