corp-chat-library-antd-react-socket 1.1.2 → 1.1.4
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/CHAT/context/ChatSocketContext.d.ts +0 -1
- package/dist/index.js +194 -197
- package/package.json +1 -1
|
@@ -31,7 +31,6 @@ interface ChatSocketContextType {
|
|
|
31
31
|
SET_PRODMODE: (mode: boolean) => void;
|
|
32
32
|
SET_BFF_PORT: (port: number) => void;
|
|
33
33
|
PROD_AXIOS_INSTANCE: AxiosInstance | null;
|
|
34
|
-
SET_PROD_AXIOS_INSTANCE: (instance: AxiosInstance) => void;
|
|
35
34
|
setFetchChatsListPath: (path: string | null) => void;
|
|
36
35
|
setFetchChatMessagesPath: (path: string | null) => void;
|
|
37
36
|
setSendSmsPath: (path: string | null) => void;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as N, jsxs as Ee } from "react/jsx-runtime";
|
|
2
2
|
import * as T from "react";
|
|
3
|
-
import
|
|
3
|
+
import te, { useRef as he, cloneElement as tc, forwardRef as Xo, useState as Q, useImperativeHandle as rc, useEffect as fe, version as nc, isValidElement as ac, useMemo as Ft, useContext as pt, createContext as Zr, useLayoutEffect as oc, useCallback as Ke } from "react";
|
|
4
4
|
import { Badge as ic, Space as Yo, Popover as ir, Button as Je, Layout as Bt, Upload as sc, Input as cc, Divider as lc, Empty as Wr, FloatButton as uc, Modal as dc, Dropdown as fc } from "antd";
|
|
5
5
|
import { SearchOutlined as gc, DragOutlined as Na, SettingOutlined as hc, BellOutlined as vc, DownloadOutlined as pc, LockOutlined as mc, EyeInvisibleOutlined as yc, PaperClipOutlined as bc, UploadOutlined as Sc, SmileOutlined as Cc, SendOutlined as xc, CalendarOutlined as Ec, CheckOutlined as ja, FileFilled as Qo, FileTextFilled as Zo, FileZipFilled as Jo, FileMarkdownFilled as ei, FilePptFilled as ti, FileExcelFilled as ri, FileWordFilled as ni, FilePdfFilled as ai, FileImageFilled as oi, LoadingOutlined as wc, ArrowDownOutlined as _c, CloseOutlined as $c, MessageOutlined as Oc } from "@ant-design/icons";
|
|
6
6
|
import Fc from "react-draggable";
|
|
@@ -195,7 +195,7 @@ function cl(e, t) {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
var ll = /* @__PURE__ */
|
|
198
|
+
var ll = /* @__PURE__ */ te.forwardRef(function(e, t) {
|
|
199
199
|
var r, n, a, o = e.inputElement, i = e.children, s = e.prefixCls, l = e.prefix, c = e.suffix, u = e.addonBefore, d = e.addonAfter, g = e.className, m = e.style, v = e.disabled, h = e.readOnly, f = e.focused, y = e.triggerFocus, p = e.allowClear, S = e.value, O = e.handleReset, C = e.hidden, _ = e.classes, b = e.classNames, P = e.dataAttrs, A = e.styles, M = e.components, I = e.onClear, D = i ?? o, $ = M?.affixWrapper || "span", E = M?.groupWrapper || "span", F = M?.wrapper || "span", w = M?.groupAddon || "span", R = he(null), j = function(je) {
|
|
200
200
|
var Ce;
|
|
201
201
|
(Ce = R.current) !== null && Ce !== void 0 && Ce.contains(je.target) && y?.();
|
|
@@ -203,15 +203,15 @@ var ll = /* @__PURE__ */ ee.forwardRef(function(e, t) {
|
|
|
203
203
|
value: S,
|
|
204
204
|
className: Me((r = D.props) === null || r === void 0 ? void 0 : r.className, !k && b?.variant) || null
|
|
205
205
|
}), H = he(null);
|
|
206
|
-
if (
|
|
206
|
+
if (te.useImperativeHandle(t, function() {
|
|
207
207
|
return {
|
|
208
208
|
nativeElement: H.current || R.current
|
|
209
209
|
};
|
|
210
210
|
}), k) {
|
|
211
211
|
var B = null;
|
|
212
212
|
if (p) {
|
|
213
|
-
var W = !v && !h && S, U = "".concat(s, "-clear-icon"),
|
|
214
|
-
B = /* @__PURE__ */
|
|
213
|
+
var W = !v && !h && S, U = "".concat(s, "-clear-icon"), ee = Z(p) === "object" && p !== null && p !== void 0 && p.clearIcon ? p.clearIcon : "✖";
|
|
214
|
+
B = /* @__PURE__ */ te.createElement("button", {
|
|
215
215
|
type: "button",
|
|
216
216
|
tabIndex: -1,
|
|
217
217
|
onClick: function(je) {
|
|
@@ -221,37 +221,37 @@ var ll = /* @__PURE__ */ ee.forwardRef(function(e, t) {
|
|
|
221
221
|
return je.preventDefault();
|
|
222
222
|
},
|
|
223
223
|
className: Me(U, x(x({}, "".concat(U, "-hidden"), !W), "".concat(U, "-has-suffix"), !!c))
|
|
224
|
-
},
|
|
224
|
+
}, ee);
|
|
225
225
|
}
|
|
226
|
-
var oe = "".concat(s, "-affix-wrapper"), le = Me(oe, x(x(x(x(x({}, "".concat(s, "-disabled"), v), "".concat(oe, "-disabled"), v), "".concat(oe, "-focused"), f), "".concat(oe, "-readonly"), h), "".concat(oe, "-input-with-clear-btn"), c && p && S), _?.affixWrapper, b?.affixWrapper, b?.variant), de = (c || p) && /* @__PURE__ */
|
|
226
|
+
var oe = "".concat(s, "-affix-wrapper"), le = Me(oe, x(x(x(x(x({}, "".concat(s, "-disabled"), v), "".concat(oe, "-disabled"), v), "".concat(oe, "-focused"), f), "".concat(oe, "-readonly"), h), "".concat(oe, "-input-with-clear-btn"), c && p && S), _?.affixWrapper, b?.affixWrapper, b?.variant), de = (c || p) && /* @__PURE__ */ te.createElement("span", {
|
|
227
227
|
className: Me("".concat(s, "-suffix"), b?.suffix),
|
|
228
228
|
style: A?.suffix
|
|
229
229
|
}, B, c);
|
|
230
|
-
L = /* @__PURE__ */
|
|
230
|
+
L = /* @__PURE__ */ te.createElement($, lt({
|
|
231
231
|
className: le,
|
|
232
232
|
style: A?.affixWrapper,
|
|
233
233
|
onClick: j
|
|
234
234
|
}, P?.affixWrapper, {
|
|
235
235
|
ref: R
|
|
236
|
-
}), l && /* @__PURE__ */
|
|
236
|
+
}), l && /* @__PURE__ */ te.createElement("span", {
|
|
237
237
|
className: Me("".concat(s, "-prefix"), b?.prefix),
|
|
238
238
|
style: A?.prefix
|
|
239
239
|
}, l), L, de);
|
|
240
240
|
}
|
|
241
241
|
if (il(e)) {
|
|
242
242
|
var ue = "".concat(s, "-group"), se = "".concat(ue, "-addon"), me = "".concat(ue, "-wrapper"), be = Me("".concat(s, "-wrapper"), ue, _?.wrapper, b?.wrapper), Te = Me(me, x({}, "".concat(me, "-disabled"), v), _?.group, b?.groupWrapper);
|
|
243
|
-
L = /* @__PURE__ */
|
|
243
|
+
L = /* @__PURE__ */ te.createElement(E, {
|
|
244
244
|
className: Te,
|
|
245
245
|
ref: H
|
|
246
|
-
}, /* @__PURE__ */
|
|
246
|
+
}, /* @__PURE__ */ te.createElement(F, {
|
|
247
247
|
className: be
|
|
248
|
-
}, u && /* @__PURE__ */
|
|
248
|
+
}, u && /* @__PURE__ */ te.createElement(w, {
|
|
249
249
|
className: se
|
|
250
|
-
}, u), L, d && /* @__PURE__ */
|
|
250
|
+
}, u), L, d && /* @__PURE__ */ te.createElement(w, {
|
|
251
251
|
className: se
|
|
252
252
|
}, d)));
|
|
253
253
|
}
|
|
254
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ te.cloneElement(L, {
|
|
255
255
|
className: Me((n = L.props) === null || n === void 0 ? void 0 : n.className, g) || null,
|
|
256
256
|
style: V(V({}, (a = L.props) === null || a === void 0 ? void 0 : a.style), m),
|
|
257
257
|
hidden: C
|
|
@@ -279,7 +279,7 @@ function dl() {
|
|
|
279
279
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
280
280
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function X(e) {
|
|
283
283
|
return ul(e) || ci(e) || va(e) || dl();
|
|
284
284
|
}
|
|
285
285
|
function li(e) {
|
|
@@ -411,11 +411,11 @@ function ml(e, t) {
|
|
|
411
411
|
}, [e, t]);
|
|
412
412
|
}
|
|
413
413
|
var yl = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "onKeyUp", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"], bl = /* @__PURE__ */ Xo(function(e, t) {
|
|
414
|
-
var r = e.autoComplete, n = e.onChange, a = e.onFocus, o = e.onBlur, i = e.onPressEnter, s = e.onKeyDown, l = e.onKeyUp, c = e.prefixCls, u = c === void 0 ? "rc-input" : c, d = e.disabled, g = e.htmlSize, m = e.className, v = e.maxLength, h = e.suffix, f = e.showCount, y = e.count, p = e.type, S = p === void 0 ? "text" : p, O = e.classes, C = e.classNames, _ = e.styles, b = e.onCompositionStart, P = e.onCompositionEnd, A = mt(e, yl), M = Q(!1), I = K(M, 2), D = I[0], $ = I[1], E = he(!1), F = he(!1), w = he(null), R = he(null), j = function(
|
|
415
|
-
w.current && cl(w.current,
|
|
414
|
+
var r = e.autoComplete, n = e.onChange, a = e.onFocus, o = e.onBlur, i = e.onPressEnter, s = e.onKeyDown, l = e.onKeyUp, c = e.prefixCls, u = c === void 0 ? "rc-input" : c, d = e.disabled, g = e.htmlSize, m = e.className, v = e.maxLength, h = e.suffix, f = e.showCount, y = e.count, p = e.type, S = p === void 0 ? "text" : p, O = e.classes, C = e.classNames, _ = e.styles, b = e.onCompositionStart, P = e.onCompositionEnd, A = mt(e, yl), M = Q(!1), I = K(M, 2), D = I[0], $ = I[1], E = he(!1), F = he(!1), w = he(null), R = he(null), j = function(re) {
|
|
415
|
+
w.current && cl(w.current, re);
|
|
416
416
|
}, k = hl(e.defaultValue, {
|
|
417
417
|
value: e.value
|
|
418
|
-
}), L = K(k, 2), H = L[0], B = L[1], W = H == null ? "" : String(H), U = Q(null),
|
|
418
|
+
}), L = K(k, 2), H = L[0], B = L[1], W = H == null ? "" : String(H), U = Q(null), ee = K(U, 2), oe = ee[0], le = ee[1], de = ml(y, f), ue = de.max || v, se = de.strategy(W), me = !!ue && se > ue;
|
|
419
419
|
rc(t, function() {
|
|
420
420
|
var ie;
|
|
421
421
|
return {
|
|
@@ -440,7 +440,7 @@ var yl = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
|
|
|
440
440
|
return ie && d ? !1 : ie;
|
|
441
441
|
});
|
|
442
442
|
}, [d]);
|
|
443
|
-
var be = function(
|
|
443
|
+
var be = function(re, Se, ut) {
|
|
444
444
|
var nt = Se;
|
|
445
445
|
if (!E.current && de.exceedFormatter && de.max && de.strategy(Se) > de.max) {
|
|
446
446
|
if (nt = de.exceedFormatter(Se, {
|
|
@@ -451,34 +451,34 @@ var yl = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
|
|
|
451
451
|
}
|
|
452
452
|
} else if (ut.source === "compositionEnd")
|
|
453
453
|
return;
|
|
454
|
-
B(nt), w.current && Ha(w.current,
|
|
454
|
+
B(nt), w.current && Ha(w.current, re, n, nt);
|
|
455
455
|
};
|
|
456
456
|
fe(function() {
|
|
457
457
|
if (oe) {
|
|
458
458
|
var ie;
|
|
459
|
-
(ie = w.current) === null || ie === void 0 || ie.setSelectionRange.apply(ie,
|
|
459
|
+
(ie = w.current) === null || ie === void 0 || ie.setSelectionRange.apply(ie, X(oe));
|
|
460
460
|
}
|
|
461
461
|
}, [oe]);
|
|
462
|
-
var Te = function(
|
|
463
|
-
be(
|
|
462
|
+
var Te = function(re) {
|
|
463
|
+
be(re, re.target.value, {
|
|
464
464
|
source: "change"
|
|
465
465
|
});
|
|
466
|
-
}, z = function(
|
|
467
|
-
E.current = !1, be(
|
|
466
|
+
}, z = function(re) {
|
|
467
|
+
E.current = !1, be(re, re.currentTarget.value, {
|
|
468
468
|
source: "compositionEnd"
|
|
469
|
-
}), P?.(
|
|
470
|
-
}, je = function(
|
|
471
|
-
i &&
|
|
472
|
-
}, Ce = function(
|
|
473
|
-
|
|
474
|
-
}, ke = function(
|
|
475
|
-
$(!0), a?.(
|
|
476
|
-
}, rt = function(
|
|
477
|
-
F.current && (F.current = !1), $(!1), o?.(
|
|
478
|
-
}, _e = function(
|
|
479
|
-
B(""), j(), w.current && Ha(w.current,
|
|
469
|
+
}), P?.(re);
|
|
470
|
+
}, je = function(re) {
|
|
471
|
+
i && re.key === "Enter" && !F.current && (F.current = !0, i(re)), s?.(re);
|
|
472
|
+
}, Ce = function(re) {
|
|
473
|
+
re.key === "Enter" && (F.current = !1), l?.(re);
|
|
474
|
+
}, ke = function(re) {
|
|
475
|
+
$(!0), a?.(re);
|
|
476
|
+
}, rt = function(re) {
|
|
477
|
+
F.current && (F.current = !1), $(!1), o?.(re);
|
|
478
|
+
}, _e = function(re) {
|
|
479
|
+
B(""), j(), w.current && Ha(w.current, re, n);
|
|
480
480
|
}, Ae = me && "".concat(u, "-out-of-range"), $e = function() {
|
|
481
|
-
var
|
|
481
|
+
var re = vl(e, [
|
|
482
482
|
"prefixCls",
|
|
483
483
|
"onPressEnter",
|
|
484
484
|
"addonBefore",
|
|
@@ -497,9 +497,9 @@ var yl = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
|
|
|
497
497
|
"classNames",
|
|
498
498
|
"onClear"
|
|
499
499
|
]);
|
|
500
|
-
return /* @__PURE__ */
|
|
500
|
+
return /* @__PURE__ */ te.createElement("input", lt({
|
|
501
501
|
autoComplete: r
|
|
502
|
-
},
|
|
502
|
+
}, re, {
|
|
503
503
|
onChange: Te,
|
|
504
504
|
onFocus: ke,
|
|
505
505
|
onBlur: rt,
|
|
@@ -516,21 +516,21 @@ var yl = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKe
|
|
|
516
516
|
onCompositionEnd: z
|
|
517
517
|
}));
|
|
518
518
|
}, Oe = function() {
|
|
519
|
-
var
|
|
519
|
+
var re = Number(ue) > 0;
|
|
520
520
|
if (h || de.show) {
|
|
521
521
|
var Se = de.showFormatter ? de.showFormatter({
|
|
522
522
|
value: W,
|
|
523
523
|
count: se,
|
|
524
524
|
maxLength: ue
|
|
525
|
-
}) : "".concat(se).concat(
|
|
526
|
-
return /* @__PURE__ */
|
|
525
|
+
}) : "".concat(se).concat(re ? " / ".concat(ue) : "");
|
|
526
|
+
return /* @__PURE__ */ te.createElement(te.Fragment, null, de.show && /* @__PURE__ */ te.createElement("span", {
|
|
527
527
|
className: Me("".concat(u, "-show-count-suffix"), x({}, "".concat(u, "-show-count-has-suffix"), !!h), C?.count),
|
|
528
528
|
style: V({}, _?.count)
|
|
529
529
|
}, Se), h);
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
};
|
|
533
|
-
return /* @__PURE__ */
|
|
533
|
+
return /* @__PURE__ */ te.createElement(ll, lt({}, A, {
|
|
534
534
|
prefixCls: u,
|
|
535
535
|
className: Me(m, Ae),
|
|
536
536
|
handleReset: _e,
|
|
@@ -674,7 +674,7 @@ function Cl() {
|
|
|
674
674
|
function U(z) {
|
|
675
675
|
return typeof z == "object" && z !== null && z.$$typeof === e;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function ee(z) {
|
|
678
678
|
return C(z) === l;
|
|
679
679
|
}
|
|
680
680
|
function oe(z) {
|
|
@@ -701,7 +701,7 @@ function Cl() {
|
|
|
701
701
|
function Te(z) {
|
|
702
702
|
return C(z) === u;
|
|
703
703
|
}
|
|
704
|
-
pe.ContextConsumer = _, pe.ContextProvider = b, pe.Element = P, pe.ForwardRef = A, pe.Fragment = M, pe.Lazy = I, pe.Memo = D, pe.Portal = $, pe.Profiler = E, pe.StrictMode = F, pe.Suspense = w, pe.SuspenseList = R, pe.isAsyncMode = L, pe.isConcurrentMode = H, pe.isContextConsumer = B, pe.isContextProvider = W, pe.isElement = U, pe.isForwardRef =
|
|
704
|
+
pe.ContextConsumer = _, pe.ContextProvider = b, pe.Element = P, pe.ForwardRef = A, pe.Fragment = M, pe.Lazy = I, pe.Memo = D, pe.Portal = $, pe.Profiler = E, pe.StrictMode = F, pe.Suspense = w, pe.SuspenseList = R, pe.isAsyncMode = L, pe.isConcurrentMode = H, pe.isContextConsumer = B, pe.isContextProvider = W, pe.isElement = U, pe.isForwardRef = ee, pe.isFragment = oe, pe.isLazy = le, pe.isMemo = de, pe.isPortal = ue, pe.isProfiler = se, pe.isStrictMode = me, pe.isSuspense = be, pe.isSuspenseList = Te, pe.isValidElementType = O, pe.typeOf = C;
|
|
705
705
|
})()), pe;
|
|
706
706
|
}
|
|
707
707
|
var qa;
|
|
@@ -1068,7 +1068,7 @@ function Yt(e) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
function $n(e) {
|
|
1070
1070
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [];
|
|
1071
|
-
return
|
|
1071
|
+
return te.Children.forEach(e, function(n) {
|
|
1072
1072
|
n == null && !t.keepEmpty || (Array.isArray(n) ? r = r.concat($n(n)) : gi(n) && n.props ? r = r.concat($n(n.props.children, t)) : r.push(n));
|
|
1073
1073
|
}), r;
|
|
1074
1074
|
}
|
|
@@ -1323,7 +1323,7 @@ function Ve(e, t) {
|
|
|
1323
1323
|
function Hl(e, t, r) {
|
|
1324
1324
|
var n = [], a = 0, o = e.length;
|
|
1325
1325
|
function i(s) {
|
|
1326
|
-
n.push.apply(n,
|
|
1326
|
+
n.push.apply(n, X(s || [])), a++, a === o && r(n);
|
|
1327
1327
|
}
|
|
1328
1328
|
e.forEach(function(s) {
|
|
1329
1329
|
t(s, i);
|
|
@@ -1344,7 +1344,7 @@ function Ya(e, t, r) {
|
|
|
1344
1344
|
function Bl(e) {
|
|
1345
1345
|
var t = [];
|
|
1346
1346
|
return Object.keys(e).forEach(function(r) {
|
|
1347
|
-
t.push.apply(t,
|
|
1347
|
+
t.push.apply(t, X(e[r] || []));
|
|
1348
1348
|
}), t;
|
|
1349
1349
|
}
|
|
1350
1350
|
var Qa = /* @__PURE__ */ (function(e) {
|
|
@@ -1703,7 +1703,7 @@ var br = /* @__PURE__ */ (function() {
|
|
|
1703
1703
|
function y(S) {
|
|
1704
1704
|
if (Array.isArray(S)) {
|
|
1705
1705
|
var O;
|
|
1706
|
-
h = (O = h).concat.apply(O,
|
|
1706
|
+
h = (O = h).concat.apply(O, X(S));
|
|
1707
1707
|
} else
|
|
1708
1708
|
h.push(S);
|
|
1709
1709
|
}
|
|
@@ -1738,7 +1738,7 @@ var br = /* @__PURE__ */ (function() {
|
|
|
1738
1738
|
function p(b, P) {
|
|
1739
1739
|
return V(V({}, P), {}, {
|
|
1740
1740
|
fullField: "".concat(f.fullField, ".").concat(b),
|
|
1741
|
-
fullFields: f.fullFields ? [].concat(
|
|
1741
|
+
fullFields: f.fullFields ? [].concat(X(f.fullFields), [b]) : [b]
|
|
1742
1742
|
});
|
|
1743
1743
|
}
|
|
1744
1744
|
function S() {
|
|
@@ -1764,7 +1764,7 @@ var br = /* @__PURE__ */ (function() {
|
|
|
1764
1764
|
var D = new e(I);
|
|
1765
1765
|
D.messages(s.messages), v.rule.options && (v.rule.options.messages = s.messages, v.rule.options.error = s.error), D.validate(v.value, v.rule.options || s, function($) {
|
|
1766
1766
|
var E = [];
|
|
1767
|
-
A && A.length && E.push.apply(E,
|
|
1767
|
+
A && A.length && E.push.apply(E, X(A)), $ && $.length && E.push.apply(E, X($)), h(E.length ? E : null);
|
|
1768
1768
|
});
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
@@ -1878,7 +1878,7 @@ function Ei(e, t, r, n) {
|
|
|
1878
1878
|
if (!t.length)
|
|
1879
1879
|
return r;
|
|
1880
1880
|
var a = gu(t), o = a[0], i = a.slice(1), s;
|
|
1881
|
-
return !e && typeof o == "number" ? s = [] : Array.isArray(e) ? s =
|
|
1881
|
+
return !e && typeof o == "number" ? s = [] : Array.isArray(e) ? s = X(e) : s = V({}, e), n && r === void 0 && i.length === 1 ? delete s[o][i[0]] : s[o] = Ei(s[o], i, r, n), s;
|
|
1882
1882
|
}
|
|
1883
1883
|
function ot(e, t, r) {
|
|
1884
1884
|
var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
@@ -1903,7 +1903,7 @@ function Vt() {
|
|
|
1903
1903
|
l.add(c);
|
|
1904
1904
|
var d = vt(n, i);
|
|
1905
1905
|
u ? n = ot(n, i, []) : (!d || Z(d) !== "object") && (n = ot(n, i, to(c))), vu(c).forEach(function(g) {
|
|
1906
|
-
o([].concat(
|
|
1906
|
+
o([].concat(X(i), [g]), l);
|
|
1907
1907
|
});
|
|
1908
1908
|
}
|
|
1909
1909
|
} else
|
|
@@ -1962,7 +1962,7 @@ function Nn() {
|
|
|
1962
1962
|
}));
|
|
1963
1963
|
case 21:
|
|
1964
1964
|
return g = f.sent, f.abrupt("return", g.reduce(function(y, p) {
|
|
1965
|
-
return [].concat(
|
|
1965
|
+
return [].concat(X(y), X(p));
|
|
1966
1966
|
}, []));
|
|
1967
1967
|
case 23:
|
|
1968
1968
|
return m = V(V({}, n), {}, {
|
|
@@ -2065,7 +2065,7 @@ function jn() {
|
|
|
2065
2065
|
for (; ; ) switch (n.prev = n.next) {
|
|
2066
2066
|
case 0:
|
|
2067
2067
|
return n.abrupt("return", Promise.all(t).then(function(a) {
|
|
2068
|
-
var o, i = (o = []).concat.apply(o,
|
|
2068
|
+
var o, i = (o = []).concat.apply(o, X(a));
|
|
2069
2069
|
return i;
|
|
2070
2070
|
}));
|
|
2071
2071
|
case 1:
|
|
@@ -2126,7 +2126,7 @@ function Su(e, t) {
|
|
|
2126
2126
|
if (!e && t || e && !t || !e || !t || Z(e) !== "object" || Z(t) !== "object")
|
|
2127
2127
|
return !1;
|
|
2128
2128
|
var r = Object.keys(e), n = Object.keys(t), a = new Set([].concat(r, n));
|
|
2129
|
-
return
|
|
2129
|
+
return X(a).every(function(o) {
|
|
2130
2130
|
var i = e[o], s = t[o];
|
|
2131
2131
|
return typeof i == "function" && typeof s == "function" ? !0 : i === s;
|
|
2132
2132
|
});
|
|
@@ -2140,7 +2140,7 @@ function oo(e, t, r) {
|
|
|
2140
2140
|
if (t < 0 || t >= n || r < 0 || r >= n)
|
|
2141
2141
|
return e;
|
|
2142
2142
|
var a = e[t], o = t - r;
|
|
2143
|
-
return o > 0 ? [].concat(
|
|
2143
|
+
return o > 0 ? [].concat(X(e.slice(0, r)), [a], X(e.slice(r, t)), X(e.slice(t + 1, n))) : o < 0 ? [].concat(X(e.slice(0, t)), X(e.slice(t + 1, r + 1)), [a], X(e.slice(r + 1, n))) : e;
|
|
2144
2144
|
}
|
|
2145
2145
|
var xu = ["name"], Qe = [];
|
|
2146
2146
|
function hn(e, t, r, n, a, o) {
|
|
@@ -2160,7 +2160,7 @@ var Sa = /* @__PURE__ */ (function(e) {
|
|
|
2160
2160
|
a.cancelRegisterFunc && a.cancelRegisterFunc(u, c, Pe(d)), a.cancelRegisterFunc = null;
|
|
2161
2161
|
}), x(ae(a), "getNamePath", function() {
|
|
2162
2162
|
var l = a.props, c = l.name, u = l.fieldContext, d = u.prefixName, g = d === void 0 ? [] : d;
|
|
2163
|
-
return c !== void 0 ? [].concat(
|
|
2163
|
+
return c !== void 0 ? [].concat(X(g), X(c)) : [];
|
|
2164
2164
|
}), x(ae(a), "getRules", function() {
|
|
2165
2165
|
var l = a.props, c = l.rules, u = c === void 0 ? [] : c, d = l.fieldContext;
|
|
2166
2166
|
return u.map(function(g) {
|
|
@@ -2281,7 +2281,7 @@ var Sa = /* @__PURE__ */ (function(e) {
|
|
|
2281
2281
|
var D = [], $ = [];
|
|
2282
2282
|
(I = M.forEach) === null || I === void 0 || I.call(M, function(E) {
|
|
2283
2283
|
var F = E.rule.warningOnly, w = E.errors, R = w === void 0 ? Qe : w;
|
|
2284
|
-
F ? $.push.apply($,
|
|
2284
|
+
F ? $.push.apply($, X(R)) : D.push.apply(D, X(R));
|
|
2285
2285
|
}), a.errors = D, a.warnings = $, a.triggerMetaEvent(), a.reRender();
|
|
2286
2286
|
}
|
|
2287
2287
|
}), A.abrupt("return", b);
|
|
@@ -2428,7 +2428,7 @@ function Eu(e) {
|
|
|
2428
2428
|
id: 0
|
|
2429
2429
|
}), u = c.current, d = T.useMemo(function() {
|
|
2430
2430
|
var h = Pe(s.prefixName) || [];
|
|
2431
|
-
return [].concat(
|
|
2431
|
+
return [].concat(X(h), X(Pe(t)));
|
|
2432
2432
|
}, [s.prefixName, t]), g = T.useMemo(function() {
|
|
2433
2433
|
return V(V({}, s), {}, {
|
|
2434
2434
|
prefixName: d
|
|
@@ -2466,7 +2466,7 @@ function Eu(e) {
|
|
|
2466
2466
|
}, _ = {
|
|
2467
2467
|
add: function(A, M) {
|
|
2468
2468
|
var I = C();
|
|
2469
|
-
M >= 0 && M <= I.length ? (u.keys = [].concat(
|
|
2469
|
+
M >= 0 && M <= I.length ? (u.keys = [].concat(X(u.keys.slice(0, M)), [u.id], X(u.keys.slice(M))), S([].concat(X(I.slice(0, M)), [A], X(I.slice(M))))) : (process.env.NODE_ENV !== "production" && (M < 0 || M > I.length) && we(!1, "The second parameter of the add function should be a valid positive number."), u.keys = [].concat(X(u.keys), [u.id]), S([].concat(X(I), [A]))), u.id += 1;
|
|
2470
2470
|
},
|
|
2471
2471
|
remove: function(A) {
|
|
2472
2472
|
var M = C(), I = new Set(Array.isArray(A) ? A : [A]);
|
|
@@ -2540,7 +2540,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2540
2540
|
}, {
|
|
2541
2541
|
key: "map",
|
|
2542
2542
|
value: function(r) {
|
|
2543
|
-
return
|
|
2543
|
+
return X(this.kvs.entries()).map(function(n) {
|
|
2544
2544
|
var a = K(n, 2), o = a[0], i = a[1], s = o.split($i);
|
|
2545
2545
|
return r({
|
|
2546
2546
|
key: s.map(function(l) {
|
|
@@ -2736,7 +2736,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2736
2736
|
y.every(function(p, S) {
|
|
2737
2737
|
return f[S] === p;
|
|
2738
2738
|
}) && g.update(y, function(p) {
|
|
2739
|
-
return [].concat(
|
|
2739
|
+
return [].concat(X(p), [h]);
|
|
2740
2740
|
});
|
|
2741
2741
|
});
|
|
2742
2742
|
});
|
|
@@ -2788,7 +2788,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2788
2788
|
we(!1, "Multiple Field with path '".concat(g.join("."), "' set 'initialValue'. Can not decide which one to pick."));
|
|
2789
2789
|
else if (v) {
|
|
2790
2790
|
var h = r.getFieldValue(g), f = u.isListField();
|
|
2791
|
-
!f && (!n.skipExist || h === void 0) && r.updateStore(ot(r.store, g,
|
|
2791
|
+
!f && (!n.skipExist || h === void 0) && r.updateStore(ot(r.store, g, X(v)[0].value));
|
|
2792
2792
|
}
|
|
2793
2793
|
}
|
|
2794
2794
|
}
|
|
@@ -2798,7 +2798,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2798
2798
|
var c = a.get(l);
|
|
2799
2799
|
if (c) {
|
|
2800
2800
|
var u;
|
|
2801
|
-
(u = s).push.apply(u,
|
|
2801
|
+
(u = s).push.apply(u, X(X(c).map(function(d) {
|
|
2802
2802
|
return d.entity;
|
|
2803
2803
|
})));
|
|
2804
2804
|
}
|
|
@@ -2914,7 +2914,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2914
2914
|
var o = r.getDependencyChildrenFields(a);
|
|
2915
2915
|
return o.length && r.validateFields(o), r.notifyObservers(n, o, {
|
|
2916
2916
|
type: "dependenciesUpdate",
|
|
2917
|
-
relatedFields: [a].concat(
|
|
2917
|
+
relatedFields: [a].concat(X(o))
|
|
2918
2918
|
}), o;
|
|
2919
2919
|
}), x(this, "updateValue", function(n, a) {
|
|
2920
2920
|
var o = Pe(n), i = r.store;
|
|
@@ -2927,7 +2927,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2927
2927
|
var c = ao(r.store, [o]);
|
|
2928
2928
|
l(c, r.getFieldsValue());
|
|
2929
2929
|
}
|
|
2930
|
-
r.triggerOnFieldsChange([o].concat(
|
|
2930
|
+
r.triggerOnFieldsChange([o].concat(X(s)));
|
|
2931
2931
|
}), x(this, "setFieldsValue", function(n) {
|
|
2932
2932
|
r.warningUnhooked();
|
|
2933
2933
|
var a = r.store;
|
|
@@ -3010,7 +3010,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
3010
3010
|
var _, b = [], P = [];
|
|
3011
3011
|
return (_ = C.forEach) === null || _ === void 0 || _.call(C, function(A) {
|
|
3012
3012
|
var M = A.rule.warningOnly, I = A.errors;
|
|
3013
|
-
M ? P.push.apply(P,
|
|
3013
|
+
M ? P.push.apply(P, X(I)) : b.push.apply(b, X(I));
|
|
3014
3014
|
}), b.length ? Promise.reject({
|
|
3015
3015
|
name: S,
|
|
3016
3016
|
errors: b,
|
|
@@ -3135,7 +3135,7 @@ var Ln = /* @__PURE__ */ T.createContext({
|
|
|
3135
3135
|
onValuesChange: v,
|
|
3136
3136
|
onFieldsChange: function(U) {
|
|
3137
3137
|
if (C.triggerFormChange(n, U), h) {
|
|
3138
|
-
for (var
|
|
3138
|
+
for (var ee = arguments.length, oe = new Array(ee > 1 ? ee - 1 : 0), le = 1; le < ee; le++)
|
|
3139
3139
|
oe[le - 1] = arguments[le];
|
|
3140
3140
|
h.apply(void 0, [U].concat(oe));
|
|
3141
3141
|
}
|
|
@@ -3181,8 +3181,8 @@ var Ln = /* @__PURE__ */ T.createContext({
|
|
|
3181
3181
|
U.preventDefault(), U.stopPropagation(), P.submit();
|
|
3182
3182
|
},
|
|
3183
3183
|
onReset: function(U) {
|
|
3184
|
-
var
|
|
3185
|
-
U.preventDefault(), P.resetFields(), (
|
|
3184
|
+
var ee;
|
|
3185
|
+
U.preventDefault(), P.resetFields(), (ee = S.onReset) === null || ee === void 0 || ee.call(S, U);
|
|
3186
3186
|
}
|
|
3187
3187
|
}), B);
|
|
3188
3188
|
};
|
|
@@ -3636,7 +3636,7 @@ if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && mo
|
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
3638
3638
|
function Ea(e, t, r, n, a) {
|
|
3639
|
-
var o = T.useContext(Cr), i = o.cache, s = [e].concat(
|
|
3639
|
+
var o = T.useContext(Cr), i = o.cache, s = [e].concat(X(t)), l = kn(s), c = ed([l]), u = nd(), d = function(h) {
|
|
3640
3640
|
i.opUpdate(l, function(f) {
|
|
3641
3641
|
var y = f || [void 0, void 0], p = K(y, 2), S = p[0], O = S === void 0 ? 0 : S, C = p[1], _ = C;
|
|
3642
3642
|
process.env.NODE_ENV !== "production" && C && u && (n?.(_, u), _ = null);
|
|
@@ -3702,7 +3702,7 @@ var dd = function(t, r, n, a) {
|
|
|
3702
3702
|
}, Ii = "token";
|
|
3703
3703
|
function fd(e, t) {
|
|
3704
3704
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = pt(Cr), a = n.cache.instanceId, o = n.container, i = r.salt, s = i === void 0 ? "" : i, l = r.override, c = l === void 0 ? od : l, u = r.formatToken, d = r.getComputedToken, g = r.cssVar, m = Uu(function() {
|
|
3705
|
-
return Object.assign.apply(Object, [{}].concat(
|
|
3705
|
+
return Object.assign.apply(Object, [{}].concat(X(t)));
|
|
3706
3706
|
}, t), v = cr(m), h = cr(c), f = g ? cr(g) : "", y = Ea(Ii, [s, e.id, v, h, f], function() {
|
|
3707
3707
|
var p, S = d ? d(m, c, e) : dd(m, c, e, u), O = V({}, S), C = "";
|
|
3708
3708
|
if (g) {
|
|
@@ -4133,7 +4133,7 @@ function mo(e, t, r) {
|
|
|
4133
4133
|
return e;
|
|
4134
4134
|
var n = ".".concat(t), a = r === "low" ? ":where(".concat(n, ")") : n, o = e.split(",").map(function(i) {
|
|
4135
4135
|
var s, l = i.trim().split(/\s+/), c = l[0] || "", u = ((s = c.match(/^\w+/)) === null || s === void 0 ? void 0 : s[0]) || "";
|
|
4136
|
-
return c = "".concat(u).concat(a).concat(c.slice(u.length)), [c].concat(
|
|
4136
|
+
return c = "".concat(u).concat(a).concat(c.slice(u.length)), [c].concat(X(l.slice(1))).join(" ");
|
|
4137
4137
|
});
|
|
4138
4138
|
return o.join(",");
|
|
4139
4139
|
}
|
|
@@ -4179,12 +4179,12 @@ var Ld = function e(t) {
|
|
|
4179
4179
|
var D = e(P, r, {
|
|
4180
4180
|
root: I,
|
|
4181
4181
|
injectHash: A,
|
|
4182
|
-
parentSelectors: [].concat(
|
|
4182
|
+
parentSelectors: [].concat(X(i), [M])
|
|
4183
4183
|
}), $ = K(D, 2), E = $[0], F = $[1];
|
|
4184
4184
|
f = V(V({}, f), F), h += "".concat(M).concat(E);
|
|
4185
4185
|
} else {
|
|
4186
4186
|
let j = function(k, L) {
|
|
4187
|
-
process.env.NODE_ENV !== "production" && (Z(P) !== "object" || !(P != null && P[Wi])) && [Rd, Ad].concat(
|
|
4187
|
+
process.env.NODE_ENV !== "production" && (Z(P) !== "object" || !(P != null && P[Wi])) && [Rd, Ad].concat(X(v)).forEach(function(W) {
|
|
4188
4188
|
return W(k, L, {
|
|
4189
4189
|
path: c,
|
|
4190
4190
|
hashId: s,
|
|
@@ -4217,7 +4217,7 @@ function Dd() {
|
|
|
4217
4217
|
var Gi = "style";
|
|
4218
4218
|
function qn(e, t) {
|
|
4219
4219
|
var r = e.token, n = e.path, a = e.hashId, o = e.layer, i = e.nonce, s = e.clientOnly, l = e.order, c = l === void 0 ? 0 : l, u = T.useContext(Cr), d = u.autoClear, g = u.mock, m = u.defaultCache, v = u.hashPriority, h = u.container, f = u.ssrInline, y = u.transformers, p = u.linters, S = u.cache, O = u.layer, C = r._tokenKey, _ = [C];
|
|
4220
|
-
O && _.push("layer"), _.push.apply(_,
|
|
4220
|
+
O && _.push("layer"), _.push.apply(_, X(n));
|
|
4221
4221
|
var b = Bn;
|
|
4222
4222
|
process.env.NODE_ENV !== "production" && g !== void 0 && (b = g === "client");
|
|
4223
4223
|
var P = Ea(
|
|
@@ -4304,7 +4304,7 @@ var kd = function(t, r, n) {
|
|
|
4304
4304
|
}
|
|
4305
4305
|
}), [u, s, m];
|
|
4306
4306
|
}, Ki = "cssVar", Hd = function(t, r) {
|
|
4307
|
-
var n = t.key, a = t.prefix, o = t.unitless, i = t.ignore, s = t.token, l = t.scope, c = l === void 0 ? "" : l, u = pt(Cr), d = u.cache.instanceId, g = u.container, m = s._tokenKey, v = [].concat(
|
|
4307
|
+
var n = t.key, a = t.prefix, o = t.unitless, i = t.ignore, s = t.token, l = t.scope, c = l === void 0 ? "" : l, u = pt(Cr), d = u.cache.instanceId, g = u.container, m = s._tokenKey, v = [].concat(X(t.path), [n, c, m]), h = Ea(Ki, v, function() {
|
|
4308
4308
|
var f = r(), y = Ai(f, n, {
|
|
4309
4309
|
prefix: a,
|
|
4310
4310
|
unitless: o,
|
|
@@ -5210,7 +5210,7 @@ const as = Hn(sf), oa = {
|
|
|
5210
5210
|
override: pr
|
|
5211
5211
|
},
|
|
5212
5212
|
hashed: !0
|
|
5213
|
-
}, os = /* @__PURE__ */
|
|
5213
|
+
}, os = /* @__PURE__ */ te.createContext(oa), ia = "ant", Oa = "anticon", cf = ["outlined", "borderless", "filled", "underlined"], lf = (e, t) => t || (e ? `${ia}-${e}` : ia), _t = /* @__PURE__ */ T.createContext({
|
|
5214
5214
|
// We provide a default function for Context without provider
|
|
5215
5215
|
getPrefixCls: lf,
|
|
5216
5216
|
iconPrefixCls: Oa
|
|
@@ -5515,7 +5515,7 @@ var wf = 1e3 * 60 * 10, _f = /* @__PURE__ */ (function() {
|
|
|
5515
5515
|
}]), e;
|
|
5516
5516
|
})(), To = new _f();
|
|
5517
5517
|
function $f(e, t) {
|
|
5518
|
-
return
|
|
5518
|
+
return te.useMemo(function() {
|
|
5519
5519
|
var r = To.get(t);
|
|
5520
5520
|
if (r)
|
|
5521
5521
|
return r;
|
|
@@ -5568,7 +5568,7 @@ function Ff(e) {
|
|
|
5568
5568
|
}, C = function(b) {
|
|
5569
5569
|
var P = n(), A = P.cssVar;
|
|
5570
5570
|
return [function(M) {
|
|
5571
|
-
return y && A ? /* @__PURE__ */
|
|
5571
|
+
return y && A ? /* @__PURE__ */ te.createElement(te.Fragment, null, /* @__PURE__ */ te.createElement(O, {
|
|
5572
5572
|
rootCls: b,
|
|
5573
5573
|
cssVar: A,
|
|
5574
5574
|
component: g
|
|
@@ -5584,8 +5584,8 @@ function Ff(e) {
|
|
|
5584
5584
|
return function(C) {
|
|
5585
5585
|
var _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : C, b = n(), P = b.theme, A = b.realToken, M = b.hashId, I = b.token, D = b.cssVar, $ = a(), E = $.rootPrefixCls, F = $.iconPrefixCls, w = r(), R = D ? "css" : "js", j = $f(function() {
|
|
5586
5586
|
var U = /* @__PURE__ */ new Set();
|
|
5587
|
-
return D && Object.keys(h.unitless || {}).forEach(function(
|
|
5588
|
-
U.add(Vr(
|
|
5587
|
+
return D && Object.keys(h.unitless || {}).forEach(function(ee) {
|
|
5588
|
+
U.add(Vr(ee, D.prefix)), U.add(Vr(ee, _o(p, D.prefix)));
|
|
5589
5589
|
}), Sf(R, U);
|
|
5590
5590
|
}, [R, p, D?.prefix]), k = Ef(R), L = k.max, H = k.min, B = {
|
|
5591
5591
|
theme: P,
|
|
@@ -5616,13 +5616,13 @@ function Ff(e) {
|
|
|
5616
5616
|
}), function() {
|
|
5617
5617
|
if (h.injectStyle === !1)
|
|
5618
5618
|
return [];
|
|
5619
|
-
var U = xf(I),
|
|
5619
|
+
var U = xf(I), ee = U.token, oe = U.flush, le = Fo(p, A, v), de = ".".concat(C), ue = $o(p, A, le, {
|
|
5620
5620
|
deprecatedTokens: h.deprecatedTokens
|
|
5621
5621
|
});
|
|
5622
5622
|
D && le && Z(le) === "object" && Object.keys(le).forEach(function(Te) {
|
|
5623
5623
|
le[Te] = "var(".concat(Vr(Te, _o(p, D.prefix)), ")");
|
|
5624
5624
|
});
|
|
5625
|
-
var se = Zt(
|
|
5625
|
+
var se = Zt(ee, {
|
|
5626
5626
|
componentCls: de,
|
|
5627
5627
|
prefixCls: C,
|
|
5628
5628
|
iconCls: ".".concat(F),
|
|
@@ -5913,7 +5913,7 @@ function nn() {
|
|
|
5913
5913
|
theme: r,
|
|
5914
5914
|
override: n,
|
|
5915
5915
|
cssVar: a
|
|
5916
|
-
} =
|
|
5916
|
+
} = te.useContext(os), o = `${Tf}-${t || ""}`, i = r || as, [s, l, c] = fd(i, [pr, e], {
|
|
5917
5917
|
salt: o,
|
|
5918
5918
|
override: n,
|
|
5919
5919
|
getComputedToken: ds,
|
|
@@ -6120,7 +6120,7 @@ function zf(e) {
|
|
|
6120
6120
|
var t = Bf(e);
|
|
6121
6121
|
if (t)
|
|
6122
6122
|
return t;
|
|
6123
|
-
if (e instanceof
|
|
6123
|
+
if (e instanceof te.Component) {
|
|
6124
6124
|
var r;
|
|
6125
6125
|
return (r = Va.findDOMNode) === null || r === void 0 ? void 0 : r.call(Va, e);
|
|
6126
6126
|
}
|
|
@@ -6302,7 +6302,7 @@ function ng(e, t, r, n) {
|
|
|
6302
6302
|
function U() {
|
|
6303
6303
|
return r();
|
|
6304
6304
|
}
|
|
6305
|
-
var
|
|
6305
|
+
var ee = he(!1);
|
|
6306
6306
|
function oe() {
|
|
6307
6307
|
w(xt), L(null, !0);
|
|
6308
6308
|
}
|
|
@@ -6311,8 +6311,8 @@ function ng(e, t, r, n) {
|
|
|
6311
6311
|
if (Oe !== xt) {
|
|
6312
6312
|
var ie = U();
|
|
6313
6313
|
if (!($e && !$e.deadline && $e.target !== ie)) {
|
|
6314
|
-
var
|
|
6315
|
-
Oe === Ar &&
|
|
6314
|
+
var re = ee.current, Se;
|
|
6315
|
+
Oe === Ar && re ? Se = C?.(ie, $e) : Oe === Ir && re ? Se = _?.(ie, $e) : Oe === Nr && re && (Se = b?.(ie, $e)), re && Se !== !1 && oe();
|
|
6316
6316
|
}
|
|
6317
6317
|
}
|
|
6318
6318
|
}), de = Qf(le), ue = K(de, 1), se = ue[0], me = function(Oe) {
|
|
@@ -6343,7 +6343,7 @@ function ng(e, t, r, n) {
|
|
|
6343
6343
|
});
|
|
6344
6344
|
}, u))), Ce === ps && oe(), tg;
|
|
6345
6345
|
}), z = K(Te, 2), je = z[0], Ce = z[1], ke = Os(Ce);
|
|
6346
|
-
|
|
6346
|
+
ee.current = ke;
|
|
6347
6347
|
var rt = he(null);
|
|
6348
6348
|
xs(function() {
|
|
6349
6349
|
if (!(B.current && rt.current === t)) {
|
|
@@ -6646,7 +6646,7 @@ const yg = (e) => {
|
|
|
6646
6646
|
mentions: B,
|
|
6647
6647
|
modal: W,
|
|
6648
6648
|
progress: U,
|
|
6649
|
-
result:
|
|
6649
|
+
result: ee,
|
|
6650
6650
|
slider: oe,
|
|
6651
6651
|
breadcrumb: le,
|
|
6652
6652
|
menu: de,
|
|
@@ -6665,7 +6665,7 @@ const yg = (e) => {
|
|
|
6665
6665
|
table: $e,
|
|
6666
6666
|
card: Oe,
|
|
6667
6667
|
tabs: ie,
|
|
6668
|
-
timeline:
|
|
6668
|
+
timeline: re,
|
|
6669
6669
|
timePicker: Se,
|
|
6670
6670
|
upload: ut,
|
|
6671
6671
|
notification: nt,
|
|
@@ -6673,8 +6673,8 @@ const yg = (e) => {
|
|
|
6673
6673
|
colorPicker: Ct,
|
|
6674
6674
|
datePicker: sn,
|
|
6675
6675
|
rangePicker: q,
|
|
6676
|
-
flex:
|
|
6677
|
-
wave:
|
|
6676
|
+
flex: Y,
|
|
6677
|
+
wave: J,
|
|
6678
6678
|
dropdown: ne,
|
|
6679
6679
|
warning: ge,
|
|
6680
6680
|
tour: xe,
|
|
@@ -6737,7 +6737,7 @@ const yg = (e) => {
|
|
|
6737
6737
|
mentions: B,
|
|
6738
6738
|
modal: W,
|
|
6739
6739
|
progress: U,
|
|
6740
|
-
result:
|
|
6740
|
+
result: ee,
|
|
6741
6741
|
slider: oe,
|
|
6742
6742
|
breadcrumb: le,
|
|
6743
6743
|
menu: de,
|
|
@@ -6754,7 +6754,7 @@ const yg = (e) => {
|
|
|
6754
6754
|
table: $e,
|
|
6755
6755
|
card: Oe,
|
|
6756
6756
|
tabs: ie,
|
|
6757
|
-
timeline:
|
|
6757
|
+
timeline: re,
|
|
6758
6758
|
timePicker: Se,
|
|
6759
6759
|
upload: ut,
|
|
6760
6760
|
notification: nt,
|
|
@@ -6762,8 +6762,8 @@ const yg = (e) => {
|
|
|
6762
6762
|
colorPicker: Ct,
|
|
6763
6763
|
datePicker: sn,
|
|
6764
6764
|
rangePicker: q,
|
|
6765
|
-
flex:
|
|
6766
|
-
wave:
|
|
6765
|
+
flex: Y,
|
|
6766
|
+
wave: J,
|
|
6767
6767
|
dropdown: ne,
|
|
6768
6768
|
warning: ge,
|
|
6769
6769
|
tour: xe,
|
|
@@ -6860,8 +6860,8 @@ Object.defineProperty(Jt, "SizeContext", {
|
|
|
6860
6860
|
});
|
|
6861
6861
|
process.env.NODE_ENV !== "production" && (Jt.displayName = "ConfigProvider");
|
|
6862
6862
|
const Sg = (e) => {
|
|
6863
|
-
const t =
|
|
6864
|
-
return
|
|
6863
|
+
const t = te.useContext(Kt);
|
|
6864
|
+
return te.useMemo(() => e ? typeof e == "string" ? e ?? t : typeof e == "function" ? e(t) : t : t, [e, t]);
|
|
6865
6865
|
}, Ps = /* @__PURE__ */ T.createContext(null), Cg = (e, t) => {
|
|
6866
6866
|
const r = T.useContext(Ps), n = T.useMemo(() => {
|
|
6867
6867
|
if (!r)
|
|
@@ -6898,10 +6898,10 @@ const Sg = (e) => {
|
|
|
6898
6898
|
if (n == null)
|
|
6899
6899
|
return null;
|
|
6900
6900
|
let a = n;
|
|
6901
|
-
return r && (a = /* @__PURE__ */
|
|
6901
|
+
return r && (a = /* @__PURE__ */ te.createElement(Au, {
|
|
6902
6902
|
override: !0,
|
|
6903
6903
|
status: !0
|
|
6904
|
-
}, a)), t && (a = /* @__PURE__ */
|
|
6904
|
+
}, a)), t && (a = /* @__PURE__ */ te.createElement(xg, null, a)), a;
|
|
6905
6905
|
};
|
|
6906
6906
|
var Eg = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, name: "close-circle", theme: "filled" };
|
|
6907
6907
|
function Ms(e) {
|
|
@@ -6940,11 +6940,11 @@ function Ho() {
|
|
|
6940
6940
|
}, {});
|
|
6941
6941
|
}
|
|
6942
6942
|
function ha(e, t, r) {
|
|
6943
|
-
return r ? /* @__PURE__ */
|
|
6943
|
+
return r ? /* @__PURE__ */ te.createElement(e.tag, V(V({
|
|
6944
6944
|
key: t
|
|
6945
6945
|
}, Ho(e.attrs)), r), (e.children || []).map(function(n, a) {
|
|
6946
6946
|
return ha(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
|
|
6947
|
-
})) : /* @__PURE__ */
|
|
6947
|
+
})) : /* @__PURE__ */ te.createElement(e.tag, V({
|
|
6948
6948
|
key: t
|
|
6949
6949
|
}, Ho(e.attrs)), (e.children || []).map(function(n, a) {
|
|
6950
6950
|
return ha(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
|
|
@@ -7109,7 +7109,7 @@ process.env.NODE_ENV !== "production" && (Ns.displayName = "CloseCircleFilled");
|
|
|
7109
7109
|
const jg = (e) => {
|
|
7110
7110
|
let t;
|
|
7111
7111
|
return typeof e == "object" && e?.clearIcon ? t = e : e && (t = {
|
|
7112
|
-
clearIcon: /* @__PURE__ */
|
|
7112
|
+
clearIcon: /* @__PURE__ */ te.createElement(Ns, null)
|
|
7113
7113
|
}), t;
|
|
7114
7114
|
};
|
|
7115
7115
|
function Bo(e, t, r) {
|
|
@@ -8219,11 +8219,11 @@ const Ws = /* @__PURE__ */ Xo((e, t) => {
|
|
|
8219
8219
|
} = Cg($, _), B = Sg((_e) => {
|
|
8220
8220
|
var Ae;
|
|
8221
8221
|
return (Ae = o ?? L) !== null && Ae !== void 0 ? Ae : _e;
|
|
8222
|
-
}), W =
|
|
8223
|
-
status:
|
|
8222
|
+
}), W = te.useContext(Yr), U = i ?? W, {
|
|
8223
|
+
status: ee,
|
|
8224
8224
|
hasFeedback: oe,
|
|
8225
8225
|
feedbackIcon: le
|
|
8226
|
-
} = pt(Gr), de = Vg(
|
|
8226
|
+
} = pt(Gr), de = Vg(ee, a), ue = sh(e) || !!oe, se = he(ue);
|
|
8227
8227
|
if (process.env.NODE_ENV !== "production") {
|
|
8228
8228
|
const _e = Gt("Input");
|
|
8229
8229
|
fe(() => {
|
|
@@ -8237,8 +8237,8 @@ const Ws = /* @__PURE__ */ Xo((e, t) => {
|
|
|
8237
8237
|
me(), l?.(_e);
|
|
8238
8238
|
}, z = (_e) => {
|
|
8239
8239
|
me(), y?.(_e);
|
|
8240
|
-
}, je = (oe || c) && /* @__PURE__ */
|
|
8241
|
-
return w(k(/* @__PURE__ */
|
|
8240
|
+
}, je = (oe || c) && /* @__PURE__ */ te.createElement(te.Fragment, null, c, oe && le), Ce = jg(u ?? b), [ke, rt] = Dg("input", S, n);
|
|
8241
|
+
return w(k(/* @__PURE__ */ te.createElement(bl, Object.assign({
|
|
8242
8242
|
ref: Ol(t, E),
|
|
8243
8243
|
prefixCls: $,
|
|
8244
8244
|
autoComplete: P
|
|
@@ -8252,11 +8252,11 @@ const Ws = /* @__PURE__ */ Xo((e, t) => {
|
|
|
8252
8252
|
allowClear: Ce,
|
|
8253
8253
|
className: Me(m, f, j, F, H, A),
|
|
8254
8254
|
onChange: z,
|
|
8255
|
-
addonBefore: g && /* @__PURE__ */
|
|
8255
|
+
addonBefore: g && /* @__PURE__ */ te.createElement(Do, {
|
|
8256
8256
|
form: !0,
|
|
8257
8257
|
space: !0
|
|
8258
8258
|
}, g),
|
|
8259
|
-
addonAfter: d && /* @__PURE__ */
|
|
8259
|
+
addonAfter: d && /* @__PURE__ */ te.createElement(Do, {
|
|
8260
8260
|
form: !0,
|
|
8261
8261
|
space: !0
|
|
8262
8262
|
}, d),
|
|
@@ -8401,7 +8401,7 @@ function dh() {
|
|
|
8401
8401
|
return k ? me : me.endOf(c);
|
|
8402
8402
|
}, B = function(ue, se) {
|
|
8403
8403
|
return I.w(j.toDate()[ue].apply(j.toDate("s"), (k ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(se)), j);
|
|
8404
|
-
}, W = this.$W, U = this.$M,
|
|
8404
|
+
}, W = this.$W, U = this.$M, ee = this.$D, oe = "set" + (this.$u ? "UTC" : "");
|
|
8405
8405
|
switch (L) {
|
|
8406
8406
|
case m:
|
|
8407
8407
|
return k ? H(1, 0) : H(31, 11);
|
|
@@ -8409,7 +8409,7 @@ function dh() {
|
|
|
8409
8409
|
return k ? H(1, U) : H(0, U + 1);
|
|
8410
8410
|
case u:
|
|
8411
8411
|
var le = this.$locale().weekStart || 0, de = (W < le ? W + 7 : W) - le;
|
|
8412
|
-
return H(k ?
|
|
8412
|
+
return H(k ? ee - de : ee + (6 - de), U);
|
|
8413
8413
|
case c:
|
|
8414
8414
|
case v:
|
|
8415
8415
|
return B(oe + "Hours", 0);
|
|
@@ -8439,8 +8439,8 @@ function dh() {
|
|
|
8439
8439
|
var j, k = this;
|
|
8440
8440
|
w = Number(w);
|
|
8441
8441
|
var L = I.p(R), H = function(U) {
|
|
8442
|
-
var
|
|
8443
|
-
return I.w(
|
|
8442
|
+
var ee = M(k);
|
|
8443
|
+
return I.w(ee.date(ee.date() + Math.round(U * w)), k);
|
|
8444
8444
|
};
|
|
8445
8445
|
if (L === d) return this.set(d, this.$M + w);
|
|
8446
8446
|
if (L === m) return this.set(m, this.$y + w);
|
|
@@ -8453,7 +8453,7 @@ function dh() {
|
|
|
8453
8453
|
}, F.format = function(w) {
|
|
8454
8454
|
var R = this, j = this.$locale();
|
|
8455
8455
|
if (!this.isValid()) return j.invalidDate || h;
|
|
8456
|
-
var k = w || "YYYY-MM-DDTHH:mm:ssZ", L = I.z(this), H = this.$H, B = this.$m, W = this.$M, U = j.weekdays,
|
|
8456
|
+
var k = w || "YYYY-MM-DDTHH:mm:ssZ", L = I.z(this), H = this.$H, B = this.$m, W = this.$M, U = j.weekdays, ee = j.months, oe = j.meridiem, le = function(se, me, be, Te) {
|
|
8457
8457
|
return se && (se[me] || se(R, k)) || be[me].slice(0, Te);
|
|
8458
8458
|
}, de = function(se) {
|
|
8459
8459
|
return I.s(H % 12 || 12, se, "0");
|
|
@@ -8473,9 +8473,9 @@ function dh() {
|
|
|
8473
8473
|
case "MM":
|
|
8474
8474
|
return I.s(W + 1, 2, "0");
|
|
8475
8475
|
case "MMM":
|
|
8476
|
-
return le(j.monthsShort, W,
|
|
8476
|
+
return le(j.monthsShort, W, ee, 3);
|
|
8477
8477
|
case "MMMM":
|
|
8478
|
-
return le(
|
|
8478
|
+
return le(ee, W);
|
|
8479
8479
|
case "D":
|
|
8480
8480
|
return R.$D;
|
|
8481
8481
|
case "DD":
|
|
@@ -8519,18 +8519,18 @@ function dh() {
|
|
|
8519
8519
|
}, F.utcOffset = function() {
|
|
8520
8520
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
8521
8521
|
}, F.diff = function(w, R, j) {
|
|
8522
|
-
var k, L = this, H = I.p(R), B = M(w), W = (B.utcOffset() - this.utcOffset()) * n, U = this - B,
|
|
8522
|
+
var k, L = this, H = I.p(R), B = M(w), W = (B.utcOffset() - this.utcOffset()) * n, U = this - B, ee = function() {
|
|
8523
8523
|
return I.m(L, B);
|
|
8524
8524
|
};
|
|
8525
8525
|
switch (H) {
|
|
8526
8526
|
case m:
|
|
8527
|
-
k =
|
|
8527
|
+
k = ee() / 12;
|
|
8528
8528
|
break;
|
|
8529
8529
|
case d:
|
|
8530
|
-
k =
|
|
8530
|
+
k = ee();
|
|
8531
8531
|
break;
|
|
8532
8532
|
case g:
|
|
8533
|
-
k =
|
|
8533
|
+
k = ee() / 3;
|
|
8534
8534
|
break;
|
|
8535
8535
|
case u:
|
|
8536
8536
|
k = (U - W) / 6048e5;
|
|
@@ -8585,7 +8585,7 @@ function dh() {
|
|
|
8585
8585
|
}
|
|
8586
8586
|
var fh = dh();
|
|
8587
8587
|
const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
8588
|
-
const t = he(null), [r, n] = Q(!1), [a, o] = Q("disconnected"), [i, s] = Q(null), l = he(i), [c, u] = Q(""), [d, g] = Q(""), [m, v] = Q(!1), [h, f] = Q(0), [y, p] = Q(null), [S, O] = Q(null), [C, _] = Q(null), [b, P] = Q(null), [A, M] = Q(null), [I, D] = Q(null), [$, E] = Q(null), [F, w] = Q(null), [R, j] = Q([]), k = he(R), [L, H] = Q([]), B = he(L), [W, U] = Q(0), [
|
|
8588
|
+
const t = he(null), [r, n] = Q(!1), [a, o] = Q("disconnected"), [i, s] = Q(null), l = he(i), [c, u] = Q(""), [d, g] = Q(""), [m, v] = Q(!1), [h, f] = Q(0), [y, p] = Q(null), [S, O] = Q(null), [C, _] = Q(null), [b, P] = Q(null), [A, M] = Q(null), [I, D] = Q(null), [$, E] = Q(null), [F, w] = Q(null), [R, j] = Q([]), k = he(R), [L, H] = Q([]), B = he(L), [W, U] = Q(0), [ee, oe] = Q(0), [le, de] = Q(!1), [ue, se] = Q(!1), [me, be] = Q(!1), [Te, z] = Q(0), [je, Ce] = Q({
|
|
8589
8589
|
message: "",
|
|
8590
8590
|
description: "",
|
|
8591
8591
|
type: "info"
|
|
@@ -8598,20 +8598,20 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8598
8598
|
const q = ke ? Tc(`${c}:${h}`, { transports: ["websocket", "polling"], withCredentials: !0 }) : null;
|
|
8599
8599
|
t.current = q, q && (q.on("connect", () => {
|
|
8600
8600
|
console.log("CHAT WEBSOCKET CONNECTED"), n(!0), o("connected");
|
|
8601
|
-
const
|
|
8602
|
-
if (!
|
|
8601
|
+
const Y = l.current?.user?.id;
|
|
8602
|
+
if (!Y) {
|
|
8603
8603
|
console.error("User ID is undefined");
|
|
8604
8604
|
return;
|
|
8605
8605
|
}
|
|
8606
|
-
q.emit(I ?? "",
|
|
8607
|
-
}), q.on($ ?? "", (
|
|
8608
|
-
console.log(`WS ${$}`,
|
|
8606
|
+
q.emit(I ?? "", Y);
|
|
8607
|
+
}), q.on($ ?? "", (Y) => {
|
|
8608
|
+
console.log(`WS ${$}`, Y), Y.left && ut(Y.left, !1), Y.left && oe(Y.left?.total_unread), Y.right && nt(Y.right), z(Mt().unix()), Ce({
|
|
8609
8609
|
message: "Новое уведомление.",
|
|
8610
8610
|
description: "",
|
|
8611
8611
|
type: "success"
|
|
8612
8612
|
});
|
|
8613
|
-
}), q.on(F ?? "", (
|
|
8614
|
-
console.log(`WS ${F}`,
|
|
8613
|
+
}), q.on(F ?? "", (Y) => {
|
|
8614
|
+
console.log(`WS ${F}`, Y), Y.sms && Ct(Y.sms, Y.sms.to, !0), z(Mt().unix()), Ce({
|
|
8615
8615
|
message: "Новое уведомление.",
|
|
8616
8616
|
description: "",
|
|
8617
8617
|
type: "success"
|
|
@@ -8649,7 +8649,7 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8649
8649
|
baseURL: c,
|
|
8650
8650
|
timeout: 3e5
|
|
8651
8651
|
});
|
|
8652
|
-
p(q);
|
|
8652
|
+
console.log(q), p(q);
|
|
8653
8653
|
}, [c]);
|
|
8654
8654
|
const Ae = Ke(async (q = null) => {
|
|
8655
8655
|
if (console.log("fetchChatsList"), console.log("PROD_AXIOS_INSTANCE:", y), console.log("post method exists:", y?.post), console.log("typeof post:", typeof y?.post), de(!0), m)
|
|
@@ -8659,25 +8659,25 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8659
8659
|
return;
|
|
8660
8660
|
}
|
|
8661
8661
|
console.log("fetchChatsList true");
|
|
8662
|
-
const
|
|
8662
|
+
const J = await (await y).post(S, {
|
|
8663
8663
|
data: { search: q },
|
|
8664
8664
|
_token: d
|
|
8665
8665
|
});
|
|
8666
|
-
|
|
8667
|
-
} catch (
|
|
8668
|
-
console.log(
|
|
8666
|
+
J?.data?.content && (j(J?.data?.content?.sms), oe(J?.data?.content?.total_unread));
|
|
8667
|
+
} catch (Y) {
|
|
8668
|
+
console.log(Y);
|
|
8669
8669
|
} finally {
|
|
8670
8670
|
de(!1);
|
|
8671
8671
|
}
|
|
8672
8672
|
else
|
|
8673
8673
|
console.log("fetchChatsList PRODMODE false");
|
|
8674
|
-
}, [le, d, y, S]), $e = Ke(async (q,
|
|
8674
|
+
}, [le, d, y, S]), $e = Ke(async (q, Y = null) => {
|
|
8675
8675
|
if (console.log("fetchChatMessages"), !ue && (se(!0), m))
|
|
8676
8676
|
try {
|
|
8677
8677
|
if (!y || !C || !d) return;
|
|
8678
|
-
const
|
|
8678
|
+
const J = `${C}/${q}`, ne = await y.post(J, {
|
|
8679
8679
|
data: {
|
|
8680
|
-
last_id:
|
|
8680
|
+
last_id: Y
|
|
8681
8681
|
},
|
|
8682
8682
|
_token: d
|
|
8683
8683
|
});
|
|
@@ -8687,13 +8687,13 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8687
8687
|
messages: ne?.data?.content?.messages,
|
|
8688
8688
|
total: ne?.data?.content?.total
|
|
8689
8689
|
}));
|
|
8690
|
-
} catch (
|
|
8691
|
-
console.log(
|
|
8690
|
+
} catch (J) {
|
|
8691
|
+
console.log(J);
|
|
8692
8692
|
} finally {
|
|
8693
8693
|
se(!1);
|
|
8694
8694
|
}
|
|
8695
|
-
}, [ue, d, y, C]), Oe = Ke(async ({ to: q, text:
|
|
8696
|
-
console.log("sendSms"),
|
|
8695
|
+
}, [ue, d, y, C]), Oe = Ke(async ({ to: q, text: Y, files: J, answer: ne, timestamp: ge, from_id: xe }) => {
|
|
8696
|
+
console.log("sendSms"), re({ to: q, text: Y, answer: ne, timestamp: ge, from_id: xe }), be(!0);
|
|
8697
8697
|
try {
|
|
8698
8698
|
if (!y || !b || !d) return;
|
|
8699
8699
|
const Le = new FormData();
|
|
@@ -8701,11 +8701,11 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8701
8701
|
"data",
|
|
8702
8702
|
JSON.stringify({
|
|
8703
8703
|
to: q,
|
|
8704
|
-
text:
|
|
8704
|
+
text: Y,
|
|
8705
8705
|
answer: ne,
|
|
8706
8706
|
timestamp: ge
|
|
8707
8707
|
})
|
|
8708
|
-
),
|
|
8708
|
+
), J && J.length > 0 && J.forEach((dt) => {
|
|
8709
8709
|
dt.originFileObj && Le.append("file[]", dt.originFileObj);
|
|
8710
8710
|
}), console.log(q);
|
|
8711
8711
|
const Ye = await y.post(b, Le);
|
|
@@ -8717,73 +8717,73 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8717
8717
|
}
|
|
8718
8718
|
}, [me, d, y, b]), ie = Ke(async (q) => {
|
|
8719
8719
|
console.log("markMessagesAsRead");
|
|
8720
|
-
for (const
|
|
8720
|
+
for (const Y of q)
|
|
8721
8721
|
if (m)
|
|
8722
8722
|
try {
|
|
8723
8723
|
if (!y || !A || !d) return;
|
|
8724
|
-
const
|
|
8724
|
+
const J = `${A}/${Y}`, ne = await y.post(J, {
|
|
8725
8725
|
_token: d
|
|
8726
8726
|
});
|
|
8727
8727
|
ne?.data && (Ct(ne?.data?.sms, ne?.data?.from, !1), sn(ne?.data?.sms?.from, ne?.data?.sms?.count_unread), oe(ne?.data?.sms?.total_unread));
|
|
8728
|
-
} catch (
|
|
8729
|
-
console.log(
|
|
8728
|
+
} catch (J) {
|
|
8729
|
+
console.log(J);
|
|
8730
8730
|
}
|
|
8731
8731
|
else
|
|
8732
|
-
console.log(`/api/sms/read/${
|
|
8733
|
-
}, [d, y, A]),
|
|
8732
|
+
console.log(`/api/sms/read/${Y}`);
|
|
8733
|
+
}, [d, y, A]), re = ({ to: q, text: Y, answer: J, timestamp: ne, from_id: ge }) => {
|
|
8734
8734
|
nt({
|
|
8735
8735
|
from_id: ge,
|
|
8736
8736
|
id: ne,
|
|
8737
|
-
text:
|
|
8737
|
+
text: Y,
|
|
8738
8738
|
files: [],
|
|
8739
8739
|
created_at: ne,
|
|
8740
8740
|
updated_at: ne,
|
|
8741
|
-
answer:
|
|
8741
|
+
answer: J,
|
|
8742
8742
|
status: !1,
|
|
8743
8743
|
isLocal: !0,
|
|
8744
8744
|
isSending: !0
|
|
8745
8745
|
}, q);
|
|
8746
8746
|
}, Se = (q) => {
|
|
8747
|
-
const
|
|
8748
|
-
if (!
|
|
8749
|
-
console.log("BEFORE UPDATE CHATS fetchChatMessages", B.current), H((
|
|
8747
|
+
const Y = B.current.find((J) => +J.chat_id == +q.chat_id);
|
|
8748
|
+
if (!Y)
|
|
8749
|
+
console.log("BEFORE UPDATE CHATS fetchChatMessages", B.current), H((J) => [...J, q]);
|
|
8750
8750
|
else {
|
|
8751
|
-
const
|
|
8752
|
-
...
|
|
8753
|
-
messages: [...q.messages, ...
|
|
8751
|
+
const J = {
|
|
8752
|
+
...Y,
|
|
8753
|
+
messages: [...q.messages, ...Y.messages]
|
|
8754
8754
|
};
|
|
8755
|
-
H((ne) => ne.map((ge) => ge.chat_id ===
|
|
8755
|
+
H((ne) => ne.map((ge) => ge.chat_id === J.chat_id ? J : ge));
|
|
8756
8756
|
}
|
|
8757
|
-
}, ut = (q,
|
|
8758
|
-
j((
|
|
8757
|
+
}, ut = (q, Y = !0) => {
|
|
8758
|
+
j((J) => {
|
|
8759
8759
|
let ne = -1;
|
|
8760
|
-
return
|
|
8761
|
-
|
|
8760
|
+
return Y ? ne = J.findIndex((ge) => ge.chat_id === q.chat_id) : ne = J.findIndex((ge) => ge.chat_id === q.from.id), ne === -1 ? [
|
|
8761
|
+
J[0],
|
|
8762
8762
|
q,
|
|
8763
|
-
...
|
|
8764
|
-
] :
|
|
8763
|
+
...J.slice(1)
|
|
8764
|
+
] : J.map((ge, xe) => xe === ne ? {
|
|
8765
8765
|
...q,
|
|
8766
|
-
count_unread:
|
|
8766
|
+
count_unread: Y ? ge.count_unread : q.count_unread
|
|
8767
8767
|
} : ge);
|
|
8768
8768
|
});
|
|
8769
|
-
}, nt = (q,
|
|
8770
|
-
H((
|
|
8771
|
-
const ne =
|
|
8772
|
-
return ge === -1 ? (console.log("Chat not found, might need to fetch chats list"),
|
|
8769
|
+
}, nt = (q, Y = null) => {
|
|
8770
|
+
H((J) => {
|
|
8771
|
+
const ne = Y || q.from_id, ge = J.findIndex((xe) => xe.chat_id === ne);
|
|
8772
|
+
return ge === -1 ? (console.log("Chat not found, might need to fetch chats list"), J) : J.map((xe, Le) => Le === ge ? {
|
|
8773
8773
|
...xe,
|
|
8774
8774
|
messages: [...xe.messages, q]
|
|
8775
8775
|
} : xe);
|
|
8776
8776
|
});
|
|
8777
|
-
}, at = (q,
|
|
8777
|
+
}, at = (q, Y, J, ne) => {
|
|
8778
8778
|
H((ge) => {
|
|
8779
8779
|
const xe = ge.findIndex((Le) => Le.chat_id === ne);
|
|
8780
8780
|
return xe === -1 ? (console.log("Chat not found, might need to fetch chats list"), ge) : ge.map((Le, Ye) => {
|
|
8781
8781
|
if (Ye === xe) {
|
|
8782
|
-
const dt = Le.messages.map((rr) => rr.created_at ===
|
|
8782
|
+
const dt = Le.messages.map((rr) => rr.created_at === Y ? {
|
|
8783
8783
|
...rr,
|
|
8784
8784
|
id: q,
|
|
8785
8785
|
isSending: !1,
|
|
8786
|
-
files:
|
|
8786
|
+
files: J
|
|
8787
8787
|
} : rr);
|
|
8788
8788
|
return {
|
|
8789
8789
|
...Le,
|
|
@@ -8793,10 +8793,10 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8793
8793
|
return Le;
|
|
8794
8794
|
});
|
|
8795
8795
|
});
|
|
8796
|
-
}, Ct = (q,
|
|
8796
|
+
}, Ct = (q, Y, J = !0) => {
|
|
8797
8797
|
H((ne) => {
|
|
8798
8798
|
let ge = -1;
|
|
8799
|
-
return
|
|
8799
|
+
return J ? ge = ne.findIndex((xe) => xe.chat_id === Y) : ge = ne.findIndex((xe) => xe.chat_id === q.from), ge === -1 ? (console.log("Chat not found, might need to fetch chats list"), ne) : ne.map((xe, Le) => {
|
|
8800
8800
|
if (Le === ge) {
|
|
8801
8801
|
const Ye = xe.messages.map((dt) => dt.created_at === q.created_at ? {
|
|
8802
8802
|
...dt,
|
|
@@ -8810,12 +8810,12 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8810
8810
|
return xe;
|
|
8811
8811
|
});
|
|
8812
8812
|
});
|
|
8813
|
-
}, sn = (q,
|
|
8814
|
-
j((
|
|
8813
|
+
}, sn = (q, Y) => {
|
|
8814
|
+
j((J) => {
|
|
8815
8815
|
let ne = -1;
|
|
8816
|
-
return ne =
|
|
8816
|
+
return ne = J.findIndex((ge) => ge.chat_id === q), J.map((ge, xe) => xe === ne ? {
|
|
8817
8817
|
...ge,
|
|
8818
|
-
count_unread:
|
|
8818
|
+
count_unread: Y
|
|
8819
8819
|
} : ge);
|
|
8820
8820
|
});
|
|
8821
8821
|
};
|
|
@@ -8830,7 +8830,7 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8830
8830
|
isAlertVisibleKey: Te,
|
|
8831
8831
|
alertInfo: je,
|
|
8832
8832
|
/* chats info */
|
|
8833
|
-
totalUnread:
|
|
8833
|
+
totalUnread: ee,
|
|
8834
8834
|
chatsList: R,
|
|
8835
8835
|
chats: L,
|
|
8836
8836
|
currentChatId: W,
|
|
@@ -8852,7 +8852,6 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8852
8852
|
SET_CSRF_TOKEN: g,
|
|
8853
8853
|
SET_PRODMODE: v,
|
|
8854
8854
|
SET_BFF_PORT: f,
|
|
8855
|
-
SET_PROD_AXIOS_INSTANCE: p,
|
|
8856
8855
|
setFetchChatsListPath: O,
|
|
8857
8856
|
setFetchChatMessagesPath: _,
|
|
8858
8857
|
setSendSmsPath: P,
|
|
@@ -9380,7 +9379,7 @@ const xh = ({
|
|
|
9380
9379
|
}, [e, t, r]);
|
|
9381
9380
|
};
|
|
9382
9381
|
function _h({ chatId: e }) {
|
|
9383
|
-
const t = he(null), r =
|
|
9382
|
+
const t = he(null), r = te.memo(Sh), n = te.memo(Ch), a = te.memo(bh), [o, i] = Q(null), { Content: s, Footer: l } = Bt, [c, u] = Q({
|
|
9384
9383
|
chat_id: 0,
|
|
9385
9384
|
who: "",
|
|
9386
9385
|
messages: [],
|
|
@@ -9722,20 +9721,19 @@ const Th = ({ open: e, onOk: t, onCancel: r, positionCorner: n }) => {
|
|
|
9722
9721
|
SET_CSRF_TOKEN: s,
|
|
9723
9722
|
SET_PRODMODE: l,
|
|
9724
9723
|
SET_BFF_PORT: c,
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
setInit: p
|
|
9724
|
+
setFetchChatsListPath: u,
|
|
9725
|
+
setFetchChatMessagesPath: d,
|
|
9726
|
+
setSendSmsPath: g,
|
|
9727
|
+
setMarkMessagesAsReadPath: m,
|
|
9728
|
+
setSubscribeToChat: v,
|
|
9729
|
+
setNewSms: h,
|
|
9730
|
+
setUpdateSms: f,
|
|
9731
|
+
setInit: y
|
|
9734
9732
|
} = tr();
|
|
9735
9733
|
return fe(() => {
|
|
9736
9734
|
console.log("CORP-CHAT userdata", e), console.log("CORP-CHAT httpParams", t), console.log("CORP-CHAT fetchParams", r), console.log("CORP-CHAT socketSubscribe", n), console.log("CORP-CHAT socketActions", a);
|
|
9737
|
-
let
|
|
9738
|
-
e && o(e), e && (
|
|
9735
|
+
let p = !1, S = !1, O = !1, C = !1, _ = !1;
|
|
9736
|
+
e && o(e), e && (p = !0), t && t?.HTTP_HOST && i(t?.HTTP_HOST), t && t?.CSRF_TOKEN && s(t?.CSRF_TOKEN), t && t?.PRODMODE && l(t?.PRODMODE), t && t?.BFF_PORT && c(t?.BFF_PORT), t && t?.HTTP_HOST && t?.CSRF_TOKEN && t?.PRODMODE && t?.BFF_PORT && (S = !0), r && r?.fetchChatsListPath && u(r?.fetchChatsListPath), r && r?.fetchChatMessagesPath && d(r?.fetchChatMessagesPath), r && r?.sendSmsPath && g(r?.sendSmsPath), r && r?.markMessagesAsReadPath && m(r?.markMessagesAsReadPath), r && r?.fetchChatsListPath && r?.fetchChatMessagesPath && r?.sendSmsPath && r?.markMessagesAsReadPath && (O = !0), n && n?.subscribeToChat && v(n?.subscribeToChat), n && n?.subscribeToChat && (C = !0), a && a?.newSms && h(a?.newSms), a && a?.updateSms && f(a?.updateSms), a && a?.newSms && a?.updateSms && (_ = !0), p && S && O && C && _ && y(!0);
|
|
9739
9737
|
}, [
|
|
9740
9738
|
e,
|
|
9741
9739
|
t,
|
|
@@ -9754,8 +9752,7 @@ const Th = ({ open: e, onOk: t, onCancel: r, positionCorner: n }) => {
|
|
|
9754
9752
|
v,
|
|
9755
9753
|
h,
|
|
9756
9754
|
f,
|
|
9757
|
-
y
|
|
9758
|
-
p
|
|
9755
|
+
y
|
|
9759
9756
|
]), /* @__PURE__ */ N(Ph, { userdata: e });
|
|
9760
9757
|
}, Bh = (e) => {
|
|
9761
9758
|
const {
|
package/package.json
CHANGED