bi-components-library 1.0.77 → 1.0.79
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.es.js +1129 -1104
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +7 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as L, jsxs as de, Fragment as qn } from "react/jsx-runtime";
|
|
2
2
|
import An, { useState as ie, useRef as te, useMemo as Mt, useCallback as ue, useEffect as me, useLayoutEffect as je } from "react";
|
|
3
3
|
import { Button as Ve, Card as It, Modal as _n, Table as Dt, Flex as Zt, Spin as Ln, Empty as Mn, Select as wt, Form as ht, Input as on, Space as In, DatePicker as Dn, message as Bn, Dropdown as Hn, Tooltip as Pn, Progress as Vn, Pagination as Rn, theme as On } from "antd";
|
|
4
|
-
import { createFromIconfontCN as Gn, LeftOutlined as Fn, SearchOutlined as zn, ReloadOutlined as Yn, InfoCircleOutlined as jn, SendOutlined as
|
|
4
|
+
import { createFromIconfontCN as Gn, LeftOutlined as Fn, SearchOutlined as zn, ReloadOutlined as Yn, InfoCircleOutlined as jn, SendOutlined as Un, PauseCircleOutlined as Wn, PlayCircleOutlined as Kn } from "@ant-design/icons";
|
|
5
5
|
import { createPortal as Bt } from "react-dom";
|
|
6
6
|
const Xn = ({
|
|
7
7
|
variant: t = "primary",
|
|
@@ -12,8 +12,8 @@ const Xn = ({
|
|
|
12
12
|
Ve,
|
|
13
13
|
{
|
|
14
14
|
...o,
|
|
15
|
-
type: ((
|
|
16
|
-
switch (
|
|
15
|
+
type: ((q) => {
|
|
16
|
+
switch (q) {
|
|
17
17
|
case "primary":
|
|
18
18
|
return "primary";
|
|
19
19
|
case "ghost":
|
|
@@ -83,11 +83,11 @@ const Jn = ({
|
|
|
83
83
|
bordered: i = !0,
|
|
84
84
|
hoverable: o = !1,
|
|
85
85
|
size: b = "default",
|
|
86
|
-
...
|
|
86
|
+
...q
|
|
87
87
|
}) => /* @__PURE__ */ L(
|
|
88
88
|
It,
|
|
89
89
|
{
|
|
90
|
-
...
|
|
90
|
+
...q,
|
|
91
91
|
title: t,
|
|
92
92
|
bordered: i,
|
|
93
93
|
hoverable: o,
|
|
@@ -150,9 +150,9 @@ const Qn = ({
|
|
|
150
150
|
showDefaultFooter: t = !0,
|
|
151
151
|
...y
|
|
152
152
|
}) => {
|
|
153
|
-
const i = y.footer !== void 0 ? y.footer : t ? (o, { OkBtn: b, CancelBtn:
|
|
153
|
+
const i = y.footer !== void 0 ? y.footer : t ? (o, { OkBtn: b, CancelBtn: q }) => /* @__PURE__ */ de(qn, { children: [
|
|
154
154
|
/* @__PURE__ */ L(b, {}),
|
|
155
|
-
/* @__PURE__ */ L(
|
|
155
|
+
/* @__PURE__ */ L(q, {})
|
|
156
156
|
] }) : null;
|
|
157
157
|
return /* @__PURE__ */ L(
|
|
158
158
|
_n,
|
|
@@ -304,7 +304,7 @@ const er = Gn({
|
|
|
304
304
|
style: o,
|
|
305
305
|
...b
|
|
306
306
|
}) => {
|
|
307
|
-
const
|
|
307
|
+
const q = {
|
|
308
308
|
fontSize: y,
|
|
309
309
|
color: i,
|
|
310
310
|
...o
|
|
@@ -314,7 +314,7 @@ const er = Gn({
|
|
|
314
314
|
{
|
|
315
315
|
...b,
|
|
316
316
|
type: t,
|
|
317
|
-
style:
|
|
317
|
+
style: q
|
|
318
318
|
}
|
|
319
319
|
);
|
|
320
320
|
};
|
|
@@ -360,7 +360,7 @@ const nr = ({
|
|
|
360
360
|
className: i,
|
|
361
361
|
emptyChildren: o,
|
|
362
362
|
loadingText: b,
|
|
363
|
-
emptyImage:
|
|
363
|
+
emptyImage: q
|
|
364
364
|
}) => t ? /* @__PURE__ */ de(
|
|
365
365
|
Zt,
|
|
366
366
|
{
|
|
@@ -382,7 +382,7 @@ const nr = ({
|
|
|
382
382
|
children: /* @__PURE__ */ L(
|
|
383
383
|
Mn,
|
|
384
384
|
{
|
|
385
|
-
image:
|
|
385
|
+
image: q,
|
|
386
386
|
description: y,
|
|
387
387
|
imageStyle: { height: 180 },
|
|
388
388
|
children: o
|
|
@@ -542,36 +542,36 @@ ar.__docgenInfo = {
|
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
|
-
const { Option: or } = wt,
|
|
545
|
+
const { Option: or } = wt, lr = ({
|
|
546
546
|
columns: t,
|
|
547
547
|
request: y,
|
|
548
548
|
searchFields: i = [],
|
|
549
549
|
showSearch: o = !0,
|
|
550
550
|
showRefresh: b = !0,
|
|
551
|
-
defaultPageSize:
|
|
552
|
-
pageSizeOptions:
|
|
551
|
+
defaultPageSize: q = 10,
|
|
552
|
+
pageSizeOptions: M = ["10", "20", "50", "100"],
|
|
553
553
|
autoLoad: A = !0,
|
|
554
554
|
externalParams: $ = {},
|
|
555
|
-
...
|
|
555
|
+
...w
|
|
556
556
|
}) => {
|
|
557
|
-
const [
|
|
557
|
+
const [C, k] = ie([]), [H, E] = ie(!1), [e, n] = ie({
|
|
558
558
|
current: 1,
|
|
559
|
-
pageSize:
|
|
559
|
+
pageSize: q,
|
|
560
560
|
total: 0
|
|
561
|
-
}), [a, u] = ie({}), [d, D] = ie({}), [
|
|
561
|
+
}), [a, u] = ie({}), [d, D] = ie({}), [T] = ht.useForm(), F = te(e);
|
|
562
562
|
F.current = e;
|
|
563
563
|
const Y = te($);
|
|
564
564
|
Y.current = $;
|
|
565
565
|
const z = te(!1), O = Mt(() => t.map((f) => {
|
|
566
|
-
const { sortable: c, render: v, ...
|
|
566
|
+
const { sortable: c, render: v, ...P } = f;
|
|
567
567
|
return {
|
|
568
|
-
...
|
|
568
|
+
...P,
|
|
569
569
|
sorter: c ? !0 : void 0,
|
|
570
570
|
render: v || ((B) => B)
|
|
571
571
|
};
|
|
572
572
|
}), [t]), _ = ue(async (f = {}) => {
|
|
573
573
|
if (y) {
|
|
574
|
-
|
|
574
|
+
E(!0);
|
|
575
575
|
try {
|
|
576
576
|
const c = {
|
|
577
577
|
page: F.current.current,
|
|
@@ -581,34 +581,34 @@ const { Option: or } = wt, sr = ({
|
|
|
581
581
|
searchParams: { ...a, ...Y.current },
|
|
582
582
|
...f
|
|
583
583
|
}, v = await y(c);
|
|
584
|
-
v.success && (
|
|
585
|
-
...
|
|
584
|
+
v.success && (k(v.data), n((P) => ({
|
|
585
|
+
...P,
|
|
586
586
|
total: v.total,
|
|
587
|
-
current: c.page ||
|
|
587
|
+
current: c.page || P.current
|
|
588
588
|
})));
|
|
589
589
|
} catch (c) {
|
|
590
590
|
console.error("加载数据失败:", c);
|
|
591
591
|
} finally {
|
|
592
|
-
|
|
592
|
+
E(!1);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
}, [y, d, a]), G = ue((f) => {
|
|
596
596
|
u(f), n((c) => ({ ...c, current: 1 }));
|
|
597
|
-
}, []),
|
|
598
|
-
|
|
599
|
-
}, [
|
|
597
|
+
}, []), I = ue(() => {
|
|
598
|
+
T.resetFields(), u({}), n((f) => ({ ...f, current: 1 }));
|
|
599
|
+
}, [T]), V = ue(() => {
|
|
600
600
|
_();
|
|
601
|
-
}, [_]),
|
|
602
|
-
const
|
|
601
|
+
}, [_]), J = ue((f, c, v) => {
|
|
602
|
+
const P = {
|
|
603
603
|
current: f.current || 1,
|
|
604
|
-
pageSize: f.pageSize ||
|
|
604
|
+
pageSize: f.pageSize || q,
|
|
605
605
|
total: f.total || 0
|
|
606
606
|
}, B = {
|
|
607
607
|
field: v?.field,
|
|
608
608
|
order: v?.order
|
|
609
609
|
};
|
|
610
|
-
n(
|
|
611
|
-
}, [
|
|
610
|
+
n(P), D(B);
|
|
611
|
+
}, [q]);
|
|
612
612
|
return me(() => {
|
|
613
613
|
const f = Object.keys($).length > 0;
|
|
614
614
|
(A && !z.current || f) && (_(), z.current = !0);
|
|
@@ -616,7 +616,7 @@ const { Option: or } = wt, sr = ({
|
|
|
616
616
|
o && i.length > 0 && /* @__PURE__ */ L(It, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ de(
|
|
617
617
|
ht,
|
|
618
618
|
{
|
|
619
|
-
form:
|
|
619
|
+
form: T,
|
|
620
620
|
layout: "inline",
|
|
621
621
|
onFinish: G,
|
|
622
622
|
initialValues: i.reduce((f, c) => (c.defaultValue !== void 0 && (f[c.key] = c.defaultValue), f), {}),
|
|
@@ -638,7 +638,7 @@ const { Option: or } = wt, sr = ({
|
|
|
638
638
|
) }, f.key)),
|
|
639
639
|
/* @__PURE__ */ L(ht.Item, { children: /* @__PURE__ */ de(In, { children: [
|
|
640
640
|
/* @__PURE__ */ L(Ve, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ L(zn, {}), children: "查询" }),
|
|
641
|
-
/* @__PURE__ */ L(Ve, { onClick:
|
|
641
|
+
/* @__PURE__ */ L(Ve, { onClick: I, children: "重置" }),
|
|
642
642
|
b && /* @__PURE__ */ L(Ve, { icon: /* @__PURE__ */ L(Yn, {}), onClick: V, children: "刷新" })
|
|
643
643
|
] }) })
|
|
644
644
|
]
|
|
@@ -647,24 +647,24 @@ const { Option: or } = wt, sr = ({
|
|
|
647
647
|
/* @__PURE__ */ L(
|
|
648
648
|
Dt,
|
|
649
649
|
{
|
|
650
|
-
...
|
|
650
|
+
...w,
|
|
651
651
|
columns: O,
|
|
652
|
-
dataSource:
|
|
653
|
-
loading:
|
|
652
|
+
dataSource: C,
|
|
653
|
+
loading: H,
|
|
654
654
|
pagination: {
|
|
655
655
|
...e,
|
|
656
656
|
showSizeChanger: !0,
|
|
657
657
|
showQuickJumper: !0,
|
|
658
658
|
showTotal: (f, c) => `第 ${c[0]}-${c[1]} 条/共 ${f} 条`,
|
|
659
|
-
pageSizeOptions:
|
|
659
|
+
pageSizeOptions: M
|
|
660
660
|
},
|
|
661
|
-
onChange:
|
|
661
|
+
onChange: J,
|
|
662
662
|
scroll: { x: "max-content", y: "50vh" }
|
|
663
663
|
}
|
|
664
664
|
)
|
|
665
665
|
] });
|
|
666
666
|
};
|
|
667
|
-
|
|
667
|
+
lr.__docgenInfo = {
|
|
668
668
|
displayName: "AdvancedTable",
|
|
669
669
|
description: "高阶表格组件,支持异步请求、搜索、排序等功能",
|
|
670
670
|
props: {
|
|
@@ -734,63 +734,63 @@ sr.__docgenInfo = {
|
|
|
734
734
|
function _t(t, y, i) {
|
|
735
735
|
if (!t.current) return;
|
|
736
736
|
const o = /* @__PURE__ */ new Set(), b = {};
|
|
737
|
-
for (const
|
|
738
|
-
|
|
739
|
-
type:
|
|
740
|
-
key:
|
|
741
|
-
exclusionGroup:
|
|
737
|
+
for (const k of y)
|
|
738
|
+
k.exclusionGroup && k.exclusionGroup !== "separator" && (o.add(k.exclusionGroup), b[k.exclusionGroup] || (b[k.exclusionGroup] = []), b[k.exclusionGroup].push({
|
|
739
|
+
type: k.type,
|
|
740
|
+
key: k.key,
|
|
741
|
+
exclusionGroup: k.exclusionGroup
|
|
742
742
|
}));
|
|
743
|
-
const
|
|
744
|
-
for (const
|
|
745
|
-
|
|
746
|
-
for (const
|
|
747
|
-
if (
|
|
748
|
-
if (i[
|
|
749
|
-
|
|
743
|
+
const q = {};
|
|
744
|
+
for (const k of o) {
|
|
745
|
+
q[k] = !1;
|
|
746
|
+
for (const H of b[k])
|
|
747
|
+
if (H.type === "upload" && H.key) {
|
|
748
|
+
if (i[H.key] !== null && i[H.key] !== void 0) {
|
|
749
|
+
q[k] = !0;
|
|
750
750
|
break;
|
|
751
751
|
}
|
|
752
|
-
} else if ((
|
|
753
|
-
const
|
|
754
|
-
`[data-type="variable"][data-multi-key="${
|
|
752
|
+
} else if ((H.type === "variable" || H.type === "multi-variable") && H.key) {
|
|
753
|
+
const E = H.type === "multi-variable" ? t.current.querySelectorAll(
|
|
754
|
+
`[data-type="variable"][data-multi-key="${H.key}"]`
|
|
755
755
|
) : [t.current.querySelector(
|
|
756
|
-
`[data-type="variable"][data-key="${
|
|
756
|
+
`[data-type="variable"][data-key="${H.key}"]`
|
|
757
757
|
)].filter(Boolean);
|
|
758
|
-
for (const e of
|
|
758
|
+
for (const e of E)
|
|
759
759
|
if (!e.classList.contains("show-placeholder") && e.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
|
|
760
|
-
|
|
760
|
+
q[k] = !0;
|
|
761
761
|
break;
|
|
762
762
|
}
|
|
763
|
-
if (
|
|
763
|
+
if (q[k])
|
|
764
764
|
break;
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
const
|
|
768
|
-
(
|
|
767
|
+
const M = y.some((k) => k.exclusionGroup === "separator"), $ = Object.keys(q).filter(
|
|
768
|
+
(k) => q[k]
|
|
769
769
|
).length > 0;
|
|
770
|
-
let
|
|
771
|
-
if ($ &&
|
|
772
|
-
for (const
|
|
773
|
-
if (
|
|
774
|
-
|
|
770
|
+
let w = null;
|
|
771
|
+
if ($ && M) {
|
|
772
|
+
for (const k of y)
|
|
773
|
+
if (k.exclusionGroup && k.exclusionGroup !== "separator" && q[k.exclusionGroup]) {
|
|
774
|
+
w = k.exclusionGroup;
|
|
775
775
|
break;
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
for (const
|
|
779
|
-
const
|
|
780
|
-
`[data-group="${
|
|
778
|
+
for (const k of o) {
|
|
779
|
+
const H = t.current.querySelectorAll(
|
|
780
|
+
`[data-group="${k}"]`
|
|
781
781
|
);
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
}) :
|
|
785
|
-
|
|
786
|
-
}) :
|
|
787
|
-
|
|
782
|
+
M && $ && w ? k === w ? H.forEach((E) => {
|
|
783
|
+
E.closest('[data-rte-force-hidden="1"]') || (E.classList.contains("required-upload-group") ? E.style.setProperty("display", "inline-flex", "important") : (E.classList.contains("exclusion-wrapper"), E.style.setProperty("display", "inline-block", "important")));
|
|
784
|
+
}) : H.forEach((E) => {
|
|
785
|
+
E.closest('[data-rte-force-hidden="1"]') || (E.style.display = "none", E.style.setProperty("display", "none", "important"));
|
|
786
|
+
}) : H.forEach((E) => {
|
|
787
|
+
E.closest('[data-rte-force-hidden="1"]') || (E.classList.contains("required-upload-group") ? E.style.setProperty("display", "inline-flex", "important") : (E.classList.contains("exclusion-wrapper"), E.style.setProperty("display", "inline-block", "important")));
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
790
|
t.current.querySelectorAll(
|
|
791
791
|
'[data-group="separator"]'
|
|
792
|
-
).forEach((
|
|
793
|
-
|
|
792
|
+
).forEach((k) => {
|
|
793
|
+
k.style.display = $ ? "none" : "inline";
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
function Lt(t, y, i, o) {
|
|
@@ -812,11 +812,11 @@ function Lt(t, y, i, o) {
|
|
|
812
812
|
}
|
|
813
813
|
return u.filter((F, Y) => Y !== d).map((F) => (F.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
|
|
814
814
|
`).trim() || a;
|
|
815
|
-
},
|
|
815
|
+
}, q = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, M = [];
|
|
816
816
|
for (let e = 0; e < y.length; e++) {
|
|
817
817
|
const n = y[e];
|
|
818
818
|
if ((n.type === "variable" || n.type === "report-url" || n.type === "upload" || n.type === "multi-variable" || n.type === "select" || n.type === "textarea" || n.type === "richtext" || n.type === "report-module" || n.type === "datepicker") && n.required && n.key) {
|
|
819
|
-
|
|
819
|
+
M.push({
|
|
820
820
|
exclusionGroup: n.exclusionGroup || "",
|
|
821
821
|
key: n.key,
|
|
822
822
|
type: n.type === "multi-variable" || n.type === "report-url" ? "variable" : n.type === "report-module" ? "richtext" : n.type,
|
|
@@ -831,7 +831,7 @@ function Lt(t, y, i, o) {
|
|
|
831
831
|
for (let a = e + 1; a < y.length; a++) {
|
|
832
832
|
const u = y[a];
|
|
833
833
|
if (u.exclusionGroup === n.exclusionGroup && (u.type === "variable" || u.type === "upload" || u.type === "select" || u.type === "textarea" || u.type === "richtext" || u.type === "datepicker") && u.key) {
|
|
834
|
-
|
|
834
|
+
M.push({
|
|
835
835
|
exclusionGroup: n.exclusionGroup,
|
|
836
836
|
key: u.key,
|
|
837
837
|
type: u.type,
|
|
@@ -844,7 +844,7 @@ function Lt(t, y, i, o) {
|
|
|
844
844
|
for (let a = e + 1; a < y.length; a++) {
|
|
845
845
|
const u = y[a];
|
|
846
846
|
if ((u.type === "variable" || u.type === "upload" || u.type === "select" || u.type === "textarea" || u.type === "richtext" || u.type === "datepicker") && u.key) {
|
|
847
|
-
|
|
847
|
+
M.push({
|
|
848
848
|
exclusionGroup: u.exclusionGroup || "",
|
|
849
849
|
key: u.key,
|
|
850
850
|
type: u.type,
|
|
@@ -855,17 +855,17 @@ function Lt(t, y, i, o) {
|
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
const A = y.some((e) => e.exclusionGroup === "separator"), $ = [];
|
|
858
|
-
if (A &&
|
|
858
|
+
if (A && M.length > 1) {
|
|
859
859
|
const e = [];
|
|
860
860
|
y.forEach((n, a) => {
|
|
861
861
|
n.exclusionGroup === "separator" && e.push(a);
|
|
862
862
|
});
|
|
863
863
|
for (const n of e) {
|
|
864
|
-
const u =
|
|
864
|
+
const u = M.filter((T) => typeof T.__index == "number" && T.__index < n).sort((T, F) => (F.__index ?? 0) - (T.__index ?? 0))[0], D = M.filter((T) => typeof T.__index == "number" && T.__index > n).sort((T, F) => (T.__index ?? 0) - (F.__index ?? 0))[0];
|
|
865
865
|
u && D && $.push([u, D]);
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
if (
|
|
868
|
+
if (M.length === 0) {
|
|
869
869
|
if (y.length === 0) {
|
|
870
870
|
if (!t.current) {
|
|
871
871
|
o(!1);
|
|
@@ -878,7 +878,7 @@ function Lt(t, y, i, o) {
|
|
|
878
878
|
o(!0);
|
|
879
879
|
return;
|
|
880
880
|
}
|
|
881
|
-
const
|
|
881
|
+
const w = M.filter((e) => {
|
|
882
882
|
if (!t.current) return !1;
|
|
883
883
|
if (e.exclusionGroup) {
|
|
884
884
|
const n = t.current.querySelectorAll(
|
|
@@ -886,14 +886,14 @@ function Lt(t, y, i, o) {
|
|
|
886
886
|
);
|
|
887
887
|
if (n.length > 0) {
|
|
888
888
|
const a = n[0];
|
|
889
|
-
return
|
|
889
|
+
return q(a) ? !0 : a.style.display !== "none";
|
|
890
890
|
}
|
|
891
891
|
}
|
|
892
892
|
if (e.type === "upload" && e.key) {
|
|
893
893
|
const n = t.current.querySelector(`[data-type="upload"][data-key="${e.key}"]`) || t.current.querySelector(`[data-type="upload"][data-batch-key="${e.key}"]`);
|
|
894
894
|
if (n) {
|
|
895
895
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
896
|
-
return
|
|
896
|
+
return q(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
897
897
|
}
|
|
898
898
|
} else if (e.type === "variable" && e.key)
|
|
899
899
|
if (e.isMultiVariable) {
|
|
@@ -902,7 +902,7 @@ function Lt(t, y, i, o) {
|
|
|
902
902
|
);
|
|
903
903
|
if (n.length > 0) {
|
|
904
904
|
const a = n[0], u = a.closest("[data-group]") || a.parentElement;
|
|
905
|
-
return
|
|
905
|
+
return q(u) ? !0 : u ? u.style.display !== "none" : !0;
|
|
906
906
|
}
|
|
907
907
|
} else {
|
|
908
908
|
const n = t.current.querySelector(
|
|
@@ -910,7 +910,7 @@ function Lt(t, y, i, o) {
|
|
|
910
910
|
);
|
|
911
911
|
if (n) {
|
|
912
912
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
913
|
-
return
|
|
913
|
+
return q(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
else if (e.type === "select" && e.key) {
|
|
@@ -919,7 +919,7 @@ function Lt(t, y, i, o) {
|
|
|
919
919
|
);
|
|
920
920
|
if (n) {
|
|
921
921
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
922
|
-
return
|
|
922
|
+
return q(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
923
923
|
}
|
|
924
924
|
} else if (e.type === "textarea" && e.key) {
|
|
925
925
|
const n = t.current.querySelector(
|
|
@@ -927,7 +927,7 @@ function Lt(t, y, i, o) {
|
|
|
927
927
|
);
|
|
928
928
|
if (n) {
|
|
929
929
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
930
|
-
return
|
|
930
|
+
return q(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
931
931
|
}
|
|
932
932
|
} else if (e.type === "richtext" && e.key) {
|
|
933
933
|
const n = t.current.querySelector(
|
|
@@ -935,7 +935,7 @@ function Lt(t, y, i, o) {
|
|
|
935
935
|
);
|
|
936
936
|
if (n) {
|
|
937
937
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
938
|
-
return
|
|
938
|
+
return q(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
939
939
|
}
|
|
940
940
|
} else if (e.type === "datepicker" && e.key) {
|
|
941
941
|
const n = t.current.querySelector(
|
|
@@ -943,25 +943,25 @@ function Lt(t, y, i, o) {
|
|
|
943
943
|
);
|
|
944
944
|
if (n) {
|
|
945
945
|
const a = n.closest("[data-group]") || n.parentElement;
|
|
946
|
-
return
|
|
946
|
+
return q(a) ? !0 : a ? a.style.display !== "none" : !0;
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
return !1;
|
|
950
950
|
});
|
|
951
|
-
if (
|
|
951
|
+
if (w.length === 0) {
|
|
952
952
|
o(!0);
|
|
953
953
|
return;
|
|
954
954
|
}
|
|
955
|
-
const
|
|
955
|
+
const C = /* @__PURE__ */ new Set();
|
|
956
956
|
$.forEach((e) => {
|
|
957
957
|
e.forEach((n) => {
|
|
958
|
-
n.key &&
|
|
958
|
+
n.key && C.add(n.key);
|
|
959
959
|
});
|
|
960
960
|
});
|
|
961
|
-
const
|
|
962
|
-
(e) => !e.key || !
|
|
961
|
+
const k = w.filter(
|
|
962
|
+
(e) => !e.key || !C.has(e.key)
|
|
963
963
|
);
|
|
964
|
-
let
|
|
964
|
+
let H = ($.length === 0, !0);
|
|
965
965
|
for (const e of $) {
|
|
966
966
|
const n = e.filter((u) => {
|
|
967
967
|
if (!t.current) return !1;
|
|
@@ -971,7 +971,7 @@ function Lt(t, y, i, o) {
|
|
|
971
971
|
);
|
|
972
972
|
if (d.length > 0) {
|
|
973
973
|
const D = d[0];
|
|
974
|
-
return
|
|
974
|
+
return q(D) ? !0 : D.style.display !== "none";
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
977
|
return !0;
|
|
@@ -988,8 +988,8 @@ function Lt(t, y, i, o) {
|
|
|
988
988
|
);
|
|
989
989
|
if (D.length === 0)
|
|
990
990
|
continue;
|
|
991
|
-
for (let
|
|
992
|
-
const Y = D[
|
|
991
|
+
for (let T = 0; T < D.length; T++) {
|
|
992
|
+
const Y = D[T].dataset.key;
|
|
993
993
|
Y && i[Y] != null && (d += 1);
|
|
994
994
|
}
|
|
995
995
|
if (d >= u.minCount) {
|
|
@@ -1011,8 +1011,8 @@ function Lt(t, y, i, o) {
|
|
|
1011
1011
|
continue;
|
|
1012
1012
|
F.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (D += 1);
|
|
1013
1013
|
}
|
|
1014
|
-
const
|
|
1015
|
-
if (D >=
|
|
1014
|
+
const T = u.minCount && u.minCount > 0 ? u.minCount : 1;
|
|
1015
|
+
if (D >= T) {
|
|
1016
1016
|
a = !0;
|
|
1017
1017
|
break;
|
|
1018
1018
|
}
|
|
@@ -1063,12 +1063,12 @@ function Lt(t, y, i, o) {
|
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
1065
|
if (!a) {
|
|
1066
|
-
|
|
1066
|
+
H = !1;
|
|
1067
1067
|
break;
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
|
-
let
|
|
1071
|
-
for (const e of
|
|
1070
|
+
let E = !0;
|
|
1071
|
+
for (const e of k)
|
|
1072
1072
|
if (e.type === "upload" && e.key) {
|
|
1073
1073
|
if (e.minCount && e.minCount > 0) {
|
|
1074
1074
|
let n = 0;
|
|
@@ -1076,7 +1076,7 @@ function Lt(t, y, i, o) {
|
|
|
1076
1076
|
`[data-type="upload"][data-batch-key="${e.key}"]`
|
|
1077
1077
|
);
|
|
1078
1078
|
if (a.length === 0) {
|
|
1079
|
-
|
|
1079
|
+
E = !1;
|
|
1080
1080
|
break;
|
|
1081
1081
|
}
|
|
1082
1082
|
for (let u = 0; u < a.length; u++) {
|
|
@@ -1084,11 +1084,11 @@ function Lt(t, y, i, o) {
|
|
|
1084
1084
|
D && i[D] != null && (n += 1);
|
|
1085
1085
|
}
|
|
1086
1086
|
if (n < e.minCount) {
|
|
1087
|
-
|
|
1087
|
+
E = !1;
|
|
1088
1088
|
break;
|
|
1089
1089
|
}
|
|
1090
1090
|
} else if (i[e.key] === null || i[e.key] === void 0) {
|
|
1091
|
-
|
|
1091
|
+
E = !1;
|
|
1092
1092
|
break;
|
|
1093
1093
|
}
|
|
1094
1094
|
} else if (e.type === "variable" && e.key)
|
|
@@ -1104,7 +1104,7 @@ function Lt(t, y, i, o) {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
const u = e.minCount && e.minCount > 0 ? e.minCount : 1;
|
|
1106
1106
|
if (a < u) {
|
|
1107
|
-
|
|
1107
|
+
E = !1;
|
|
1108
1108
|
break;
|
|
1109
1109
|
}
|
|
1110
1110
|
} else {
|
|
@@ -1112,15 +1112,15 @@ function Lt(t, y, i, o) {
|
|
|
1112
1112
|
`[data-type="variable"][data-key="${e.key}"]`
|
|
1113
1113
|
);
|
|
1114
1114
|
if (!n) {
|
|
1115
|
-
|
|
1115
|
+
E = !1;
|
|
1116
1116
|
break;
|
|
1117
1117
|
}
|
|
1118
1118
|
if (n.classList.contains("show-placeholder")) {
|
|
1119
|
-
|
|
1119
|
+
E = !1;
|
|
1120
1120
|
break;
|
|
1121
1121
|
}
|
|
1122
1122
|
if (n.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
|
|
1123
|
-
|
|
1123
|
+
E = !1;
|
|
1124
1124
|
break;
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
@@ -1129,7 +1129,7 @@ function Lt(t, y, i, o) {
|
|
|
1129
1129
|
`[data-type="select"][data-key="${e.key}"]`
|
|
1130
1130
|
);
|
|
1131
1131
|
if (!n || (n.getAttribute("data-value") || "").trim().length === 0) {
|
|
1132
|
-
|
|
1132
|
+
E = !1;
|
|
1133
1133
|
break;
|
|
1134
1134
|
}
|
|
1135
1135
|
} else if (e.type === "textarea" && e.key) {
|
|
@@ -1137,7 +1137,7 @@ function Lt(t, y, i, o) {
|
|
|
1137
1137
|
`[data-type="textarea"][data-key="${e.key}"]`
|
|
1138
1138
|
);
|
|
1139
1139
|
if (!n || (n.value || "").trim().length === 0) {
|
|
1140
|
-
|
|
1140
|
+
E = !1;
|
|
1141
1141
|
break;
|
|
1142
1142
|
}
|
|
1143
1143
|
} else if (e.type === "richtext" && e.key) {
|
|
@@ -1145,7 +1145,7 @@ function Lt(t, y, i, o) {
|
|
|
1145
1145
|
`[data-type="richtext"][data-key="${e.key}"]`
|
|
1146
1146
|
);
|
|
1147
1147
|
if (!n || b(n).length === 0) {
|
|
1148
|
-
|
|
1148
|
+
E = !1;
|
|
1149
1149
|
break;
|
|
1150
1150
|
}
|
|
1151
1151
|
} else if (e.type === "datepicker" && e.key) {
|
|
@@ -1153,11 +1153,11 @@ function Lt(t, y, i, o) {
|
|
|
1153
1153
|
`[data-type="datepicker"][data-key="${e.key}"]`
|
|
1154
1154
|
);
|
|
1155
1155
|
if (!n || (n.getAttribute("data-value") || "").trim().length === 0) {
|
|
1156
|
-
|
|
1156
|
+
E = !1;
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
o(
|
|
1160
|
+
o(H && E);
|
|
1161
1161
|
}
|
|
1162
1162
|
function At(t, y) {
|
|
1163
1163
|
if (!t.current) return;
|
|
@@ -1166,42 +1166,42 @@ function At(t, y) {
|
|
|
1166
1166
|
b.replace(/\u200B/g, "").trim().length === 0 ? (b !== "" && (o.innerText = ""), o.classList.add("show-placeholder")) : o.classList.remove("show-placeholder");
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
|
-
const
|
|
1170
|
-
const i = t.dataset.key, o = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]",
|
|
1169
|
+
const sr = ({ host: t, onChange: y }) => {
|
|
1170
|
+
const i = t.dataset.key, o = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", q = t.dataset.required === "true", M = t.dataset.value || "", A = An.useMemo(() => {
|
|
1171
1171
|
try {
|
|
1172
1172
|
return JSON.parse(b);
|
|
1173
1173
|
} catch {
|
|
1174
1174
|
return [];
|
|
1175
1175
|
}
|
|
1176
|
-
}, [b]), [$,
|
|
1176
|
+
}, [b]), [$, w] = ie(M || void 0), [C, k] = ie(80), H = (e) => {
|
|
1177
1177
|
const a = document.createElement("canvas").getContext("2d");
|
|
1178
1178
|
return a ? (a.font = '14px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif', a.measureText(e).width) : e.length * 14;
|
|
1179
1179
|
};
|
|
1180
1180
|
me(() => {
|
|
1181
|
-
const e = $ ? A.find((u) => u.value === $)?.label || $ : o || "请选择", n =
|
|
1182
|
-
|
|
1181
|
+
const e = $ ? A.find((u) => u.value === $)?.label || $ : o || "请选择", n = H(e), a = Math.max(64, Math.ceil(n + 40));
|
|
1182
|
+
k(a);
|
|
1183
1183
|
}, [$, A, o]);
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1184
|
+
const E = (e) => {
|
|
1185
|
+
w(e), t.setAttribute("data-value", e), y(i, e);
|
|
1186
1186
|
};
|
|
1187
1187
|
return me(() => {
|
|
1188
|
-
|
|
1189
|
-
}, [
|
|
1188
|
+
w(M || void 0);
|
|
1189
|
+
}, [M]), Bt(
|
|
1190
1190
|
/* @__PURE__ */ L(
|
|
1191
1191
|
"div",
|
|
1192
1192
|
{
|
|
1193
1193
|
className: "rte-select-wrapper",
|
|
1194
1194
|
contentEditable: !1,
|
|
1195
|
-
style: { display: "inline-block", minWidth:
|
|
1195
|
+
style: { display: "inline-block", minWidth: C, width: C },
|
|
1196
1196
|
children: /* @__PURE__ */ L(
|
|
1197
1197
|
wt,
|
|
1198
1198
|
{
|
|
1199
1199
|
value: $,
|
|
1200
|
-
onChange:
|
|
1200
|
+
onChange: E,
|
|
1201
1201
|
placeholder: o || "请选择",
|
|
1202
|
-
style: { width: "100%", minWidth:
|
|
1202
|
+
style: { width: "100%", minWidth: C },
|
|
1203
1203
|
options: A,
|
|
1204
|
-
allowClear: !
|
|
1204
|
+
allowClear: !q,
|
|
1205
1205
|
size: "small",
|
|
1206
1206
|
dropdownClassName: "rte-select-dropdown",
|
|
1207
1207
|
getPopupContainer: () => document.body,
|
|
@@ -1219,187 +1219,187 @@ const lr = ({ host: t, onChange: y }) => {
|
|
|
1219
1219
|
const o = t.current;
|
|
1220
1220
|
if (!o) return;
|
|
1221
1221
|
const b = () => {
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1222
|
+
const M = o.querySelectorAll(".rte-select-host"), A = [];
|
|
1223
|
+
M.forEach(($) => {
|
|
1224
|
+
const w = $.getAttribute("data-key");
|
|
1225
|
+
w && A.push(
|
|
1226
1226
|
/* @__PURE__ */ L(
|
|
1227
|
-
|
|
1227
|
+
sr,
|
|
1228
1228
|
{
|
|
1229
1229
|
host: $,
|
|
1230
1230
|
onChange: () => {
|
|
1231
1231
|
if (t.current) {
|
|
1232
|
-
const
|
|
1233
|
-
t.current.dispatchEvent(
|
|
1232
|
+
const C = new Event("input", { bubbles: !0 });
|
|
1233
|
+
t.current.dispatchEvent(C);
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
1236
|
},
|
|
1237
|
-
`select-${
|
|
1237
|
+
`select-${w}`
|
|
1238
1238
|
)
|
|
1239
1239
|
);
|
|
1240
1240
|
}), i(A);
|
|
1241
1241
|
};
|
|
1242
1242
|
b();
|
|
1243
|
-
const
|
|
1243
|
+
const q = new MutationObserver((M) => {
|
|
1244
1244
|
let A = !1;
|
|
1245
|
-
for (const $ of
|
|
1245
|
+
for (const $ of M)
|
|
1246
1246
|
if ($.type === "childList") {
|
|
1247
|
-
let
|
|
1248
|
-
if ($.addedNodes.forEach((
|
|
1249
|
-
if (
|
|
1250
|
-
const
|
|
1251
|
-
(
|
|
1247
|
+
let w = !1;
|
|
1248
|
+
if ($.addedNodes.forEach((C) => {
|
|
1249
|
+
if (C.nodeType === Node.ELEMENT_NODE) {
|
|
1250
|
+
const k = C;
|
|
1251
|
+
(k.classList?.contains("rte-select-host") || k.querySelector?.(".rte-select-host")) && (w = !0);
|
|
1252
1252
|
}
|
|
1253
|
-
}), $.removedNodes.forEach((
|
|
1254
|
-
if (
|
|
1255
|
-
const
|
|
1256
|
-
(
|
|
1253
|
+
}), $.removedNodes.forEach((C) => {
|
|
1254
|
+
if (C.nodeType === Node.ELEMENT_NODE) {
|
|
1255
|
+
const k = C;
|
|
1256
|
+
(k.classList?.contains("rte-select-host") || k.querySelector?.(".rte-select-host")) && (w = !0);
|
|
1257
1257
|
}
|
|
1258
|
-
}),
|
|
1258
|
+
}), w) {
|
|
1259
1259
|
A = !0;
|
|
1260
1260
|
break;
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
A && b();
|
|
1264
1264
|
});
|
|
1265
|
-
return
|
|
1265
|
+
return q.observe(o, { childList: !0, subtree: !0 }), () => q.disconnect();
|
|
1266
1266
|
}, [t]), y;
|
|
1267
1267
|
}, gt = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1268
|
-
function cr(t, y, i, o, b,
|
|
1268
|
+
function cr(t, y, i, o, b, q = {}, M, A) {
|
|
1269
1269
|
if (!t.current) return;
|
|
1270
|
-
const $ = /[;;,,。.!!??::、]/,
|
|
1270
|
+
const $ = /[;;,,。.!!??::、]/, w = (e) => {
|
|
1271
1271
|
const n = (e ?? "").trim();
|
|
1272
1272
|
return n.length === 1 && $.test(n);
|
|
1273
|
-
},
|
|
1273
|
+
}, C = (e) => {
|
|
1274
1274
|
const n = e ?? "", a = n.match(new RegExp(`^\\s*(${$.source})`));
|
|
1275
1275
|
if (!a) return null;
|
|
1276
1276
|
const u = a[1], d = n.replace(new RegExp(`^\\s*${$.source}`), "");
|
|
1277
1277
|
return { punct: u, rest: d };
|
|
1278
|
-
},
|
|
1279
|
-
let
|
|
1280
|
-
for (;
|
|
1281
|
-
const e = y[
|
|
1278
|
+
}, k = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, H = [];
|
|
1279
|
+
let E = 0;
|
|
1280
|
+
for (; E < y.length; ) {
|
|
1281
|
+
const e = y[E], n = E + 1 < y.length ? y[E + 1] : null;
|
|
1282
1282
|
if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && n) {
|
|
1283
1283
|
const Y = n.type === "upload" && n.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === n.exclusionGroup, z = n.type === "variable" && n.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === n.exclusionGroup;
|
|
1284
1284
|
if (Y) {
|
|
1285
1285
|
const O = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", _ = `<span ${O} class="exclusion-wrapper required-upload-group">`, G = "</span>";
|
|
1286
|
-
let
|
|
1287
|
-
e.className ?
|
|
1288
|
-
const V = n,
|
|
1289
|
-
let
|
|
1290
|
-
|
|
1291
|
-
const ae = (V.text || "").trim(), he =
|
|
1292
|
-
|
|
1286
|
+
let I = "";
|
|
1287
|
+
e.className ? I = `<span class="${e.className}">${e.text ?? ""}</span>` : I = e.text ?? "";
|
|
1288
|
+
const V = n, J = i[V.key] !== null && i[V.key] !== void 0, f = J ? i[V.key] : null, c = J ? i[V.key]?.name : V.text, v = J ? "" : "hidden", P = V.tooltip && !J ? "" : "hidden", B = J ? "has-file" : "", j = J && c ? ` data-file-name="${c.replace(/"/g, """)}"` : "";
|
|
1289
|
+
let K = "";
|
|
1290
|
+
J && f ? f.type?.startsWith("image/") ? K = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(f)}" alt="preview" />` : K = "<i class='iconfont icon-exlwenjian'></i>" : K = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1291
|
+
const ae = (V.text || "").trim(), he = J && ae.length >= 12 ? `<span ${O} contenteditable="false" class="exclusion-wrapper upload-hint">${ae}</span>` : "", ye = `<span contenteditable="false" data-type="upload" data-key="${V.key}" class="upload-chip"><span class="upload-inner-wrapper ${B}"><span class="upload-icon">${K}</span><span class="upload-label"${j}>${c || V.text}</span>${V.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${V.key}" data-tooltip="${V.tooltip}"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
|
|
1292
|
+
H.push(_ + I + ye + G + he), E += 2;
|
|
1293
1293
|
continue;
|
|
1294
1294
|
}
|
|
1295
1295
|
if (z) {
|
|
1296
1296
|
const _ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, G = "</span>";
|
|
1297
|
-
let
|
|
1298
|
-
e.className ?
|
|
1299
|
-
const V = n, f = (V.key ? b[V.key] : void 0) || V.text || "", c = !f, v = c ? "" : f,
|
|
1300
|
-
|
|
1297
|
+
let I = "";
|
|
1298
|
+
e.className ? I = `<span class="${e.className}">${e.text ?? ""}</span>` : I = e.text ?? "";
|
|
1299
|
+
const V = n, f = (V.key ? b[V.key] : void 0) || V.text || "", c = !f, v = c ? "" : f, P = c ? "show-placeholder" : "", B = V.exclusionGroup ? ` data-group="${V.exclusionGroup}"` : "", j = V.tooltip ? ` data-tooltip="${V.tooltip.replace(/"/g, """)}" data-variable-key="${V.key || ""}"` : "", K = V.tooltip && c ? "" : "hidden", ae = `<span contenteditable="true" data-type="variable" data-key="${V.key}" data-placeholder="${V.placeholder || ""}"${B}${j} class="variable-chip ${P}">${v}${V.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${K}" data-variable-key="${V.key}" data-tooltip="${V.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1300
|
+
H.push(_ + I + ae + G), E += 2;
|
|
1301
1301
|
continue;
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
const u = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", d = e.exclusionGroup ? `<span ${u} class="exclusion-wrapper">` : "", D = e.exclusionGroup ? "</span>" : "";
|
|
1305
|
-
let
|
|
1305
|
+
let T = "";
|
|
1306
1306
|
if (e.type === "tag") {
|
|
1307
|
-
const z = o ||
|
|
1308
|
-
|
|
1307
|
+
const z = o || M === "hideTagClose" ? "" : '<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>', O = o ? ' data-locked="true"' : "", _ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-tag-key="${e.key || ""}"` : "";
|
|
1308
|
+
T = `<span contenteditable="false" class="tag-node group"${O}${_}><span class="tag-label">${e.text}</span>${z}</span>`;
|
|
1309
1309
|
} else if (e.type === "text") {
|
|
1310
1310
|
const Y = o ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', O = (e.text ?? "").replace(/\n/g, "<br/>");
|
|
1311
|
-
e.className ?
|
|
1311
|
+
e.className ? T = `<span data-type="text" class="${e.className}"${Y}>${O}</span>` : T = o ? `<span data-type="text"${Y}>${O}</span>` : `<span data-type="text" contenteditable="false">${O}</span>`;
|
|
1312
1312
|
} else if (e.type === "variable" && e.key) {
|
|
1313
|
-
const z = b[e.key] || e.text || "", O = !z, _ = O ? "" : z, G = O ? "show-placeholder" : "",
|
|
1314
|
-
e.required ?
|
|
1313
|
+
const z = b[e.key] || e.text || "", O = !z, _ = O ? "" : z, G = O ? "show-placeholder" : "", I = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", V = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", J = e.tooltip && O ? "" : "hidden", f = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${I}${V} class="variable-chip ${G}">${_}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${J}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1314
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${f}</span>` : T = f;
|
|
1315
1315
|
} else if (e.type === "report-url" && e.key) {
|
|
1316
|
-
const z = b[e.key] || e.text || "", O = !z, _ = O ? "" : z, G = O ? "show-placeholder" : "",
|
|
1317
|
-
e.required ?
|
|
1316
|
+
const z = b[e.key] || e.text || "", O = !z, _ = O ? "" : z, G = O ? "show-placeholder" : "", I = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", V = e.tooltip ? ` data-tooltip="${gt(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", J = e.tooltip && O ? "" : "hidden", f = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${gt(e.placeholder || "")}"${I}${V} class="variable-chip rte-report-url ${G}">${_}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${J}" data-variable-key="${e.key}" data-tooltip="${gt(e.tooltip)}" ></i>` : ""}</span>`;
|
|
1317
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${f}</span>` : T = f;
|
|
1318
1318
|
} else if (e.type === "upload" && e.key)
|
|
1319
1319
|
if (typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
|
|
1320
1320
|
const z = e.minCount || 1, O = e.maxCount || 3;
|
|
1321
1321
|
let _ = 0;
|
|
1322
1322
|
for (let V = 0; V < O; V++) {
|
|
1323
|
-
const
|
|
1324
|
-
i[
|
|
1323
|
+
const J = `${e.key}-${V}`;
|
|
1324
|
+
i[J] != null && (_ += 1);
|
|
1325
1325
|
}
|
|
1326
1326
|
const G = Math.min(
|
|
1327
1327
|
O,
|
|
1328
1328
|
Math.max(z, _ + (_ < O ? 1 : 0))
|
|
1329
1329
|
);
|
|
1330
|
-
let
|
|
1330
|
+
let I = "";
|
|
1331
1331
|
for (let V = 0; V < G; V++) {
|
|
1332
|
-
const
|
|
1332
|
+
const J = `${e.key}-${V}`, f = i[J] !== null && i[J] !== void 0, c = f ? i[J] : null, v = f ? i[J]?.name : e.text, P = f ? "" : "hidden", B = e.tooltip && !f ? "" : "hidden", j = f ? "has-file" : "", K = f && v ? ` data-file-name="${v.replace(/"/g, """)}"` : "";
|
|
1333
1333
|
let ae = "";
|
|
1334
1334
|
f && c ? c.type?.startsWith("image/") ? ae = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(c)}" alt="preview" />` : ae = "<i class='iconfont icon-exlwenjian'></i>" : ae = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1335
|
-
const pe = ` data-batch-key="${e.key}"`, he = ` data-batch-index="${V}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${
|
|
1336
|
-
|
|
1335
|
+
const pe = ` data-batch-key="${e.key}"`, he = ` data-batch-index="${V}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${J}"${pe}${he} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${j}"><span class="upload-icon">${ae}</span><span class="upload-label"${K}>${v || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${B}" data-upload-key="${J}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
|
|
1336
|
+
I += ye;
|
|
1337
1337
|
}
|
|
1338
|
-
e.required ?
|
|
1338
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-required-upload-batch"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span><span class="rte-upload-batch-chips">${I}</span></span>` : T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${I}</span>`;
|
|
1339
1339
|
} else {
|
|
1340
|
-
const z = i[e.key] !== null && i[e.key] !== void 0, O = z ? i[e.key] : null, _ = z ? i[e.key]?.name : e.text, G = z ? "" : "hidden",
|
|
1340
|
+
const z = i[e.key] !== null && i[e.key] !== void 0, O = z ? i[e.key] : null, _ = z ? i[e.key]?.name : e.text, G = z ? "" : "hidden", I = e.tooltip && !z ? "" : "hidden", V = z ? "has-file" : "", J = z && _ ? ` data-file-name="${_.replace(/"/g, """)}"` : "";
|
|
1341
1341
|
let f = "";
|
|
1342
1342
|
z && O ? O.type?.startsWith("image/") ? f = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(O)}" alt="preview" />` : f = "<i class='iconfont icon-exlwenjian'></i>" : f = "<i class='iconfont icon-shangchuan1'></i>";
|
|
1343
|
-
const c = (e.text || "").trim(),
|
|
1344
|
-
e.required ?
|
|
1343
|
+
const c = (e.text || "").trim(), P = z && e.showHint === !0 && c.length >= 12 ? `<span ${u} contenteditable="false" class="exclusion-wrapper upload-hint">${c}</span>` : "", B = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${V}"><span class="upload-icon">${f}</span><span class="upload-label"${J}>${_ || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${I}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${G}" title="移除文件">×</span></span></span>`;
|
|
1344
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${B}</span>${P}` : T = B + P;
|
|
1345
1345
|
}
|
|
1346
1346
|
else if (e.type === "select" && e.key) {
|
|
1347
|
-
const Y = b[e.key] || e.defaultValue || "", z = encodeURIComponent(JSON.stringify(e.options || [])), O = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", G = e.required ? ' data-required="true"' : "",
|
|
1348
|
-
e.required ?
|
|
1347
|
+
const Y = b[e.key] || e.defaultValue || "", z = encodeURIComponent(JSON.stringify(e.options || [])), O = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", G = e.required ? ' data-required="true"' : "", I = `<div data-type="select" data-key="${e.key}" data-value="${Y}" data-options="${z}"${O}${_}${G} class="rte-select-host"></div>`;
|
|
1348
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${I}</span>` : T = I;
|
|
1349
1349
|
} else if (e.type === "textarea" && e.key) {
|
|
1350
|
-
const Y = b[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0, _ = e.placeholder ? ` placeholder="${e.placeholder}"` : "", G = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${z}" style="max-height:${z}px;"${_}>${Y}</textarea>`,
|
|
1351
|
-
e.required ?
|
|
1350
|
+
const Y = b[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0, _ = e.placeholder ? ` placeholder="${e.placeholder}"` : "", G = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${z}" style="max-height:${z}px;"${_}>${Y}</textarea>`, I = O ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", V = `<div class="rte-textarea-wrapper" data-key="${e.key}">${G}${I}</div>`;
|
|
1351
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${V}</span>` : T = V;
|
|
1352
1352
|
} else if (e.type === "richtext" && e.key) {
|
|
1353
|
-
const Y = b[e.key] || e.text || "", z = typeof e.minHeight == "number" ? e.minHeight : A?.richtext?.minHeight ?? 40, O = typeof e.maxHeight == "number" ? e.maxHeight : A?.richtext?.maxHeight ?? 160, _ = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "",
|
|
1354
|
-
e.required ?
|
|
1353
|
+
const Y = b[e.key] || e.text || "", z = typeof e.minHeight == "number" ? e.minHeight : A?.richtext?.minHeight ?? 40, O = typeof e.maxHeight == "number" ? e.maxHeight : A?.richtext?.maxHeight ?? 160, _ = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", I = typeof e.expandable == "boolean" ? e.expandable : A?.richtext?.expandable ?? !0, V = Y, J = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${G} style="min-height:${z}px;max-height:${_}px;overflow:auto;">${V}</div>`, f = I ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>` : "", c = `<div class="rte-richtext-wrapper" data-key="${e.key}">${J}${f}</div>`, v = `<div class="rte-richtext-container" data-key="${e.key}">${c}</div>`;
|
|
1354
|
+
e.required ? T = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${v}</div>` : T = v;
|
|
1355
1355
|
} else if (e.type === "report-module" && e.key) {
|
|
1356
|
-
const z = Object.prototype.hasOwnProperty.call(b, e.key) ? b[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, _ = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(_, O),
|
|
1357
|
-
e.required ?
|
|
1356
|
+
const z = Object.prototype.hasOwnProperty.call(b, e.key) ? b[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, _ = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(_, O), I = e.placeholder ? ` data-placeholder="${gt(e.placeholder)}"` : "", V = z, J = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${I} style="min-height:${O}px;max-height:${G}px;overflow:auto;">${V}</div>`, f = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${J}</div>`, c = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${f}</div>`;
|
|
1357
|
+
e.required ? T = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${c}</div>` : T = c;
|
|
1358
1358
|
} else if (e.type === "datepicker" && e.key) {
|
|
1359
1359
|
const Y = b[e.key] || "", z = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", O = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", _ = e.disableFuture ? ' data-disable-future="true"' : "", G = `<div data-type="datepicker" data-key="${e.key}" data-value="${Y}" class="rte-datepicker-host"${z}${O}${_}></div>`;
|
|
1360
|
-
e.required ?
|
|
1360
|
+
e.required ? T = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${G}</span>` : T = G;
|
|
1361
1361
|
} else if (e.type === "multi-variable" && e.key) {
|
|
1362
|
-
const Y = e.maxCount || 9, z =
|
|
1362
|
+
const Y = e.maxCount || 9, z = q[e.key] || 1, O = Math.min(z, Y);
|
|
1363
1363
|
if (e.required) {
|
|
1364
1364
|
const _ = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, G = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
|
|
1365
|
-
let
|
|
1365
|
+
let I = "";
|
|
1366
1366
|
for (let V = 0; V < O; V++) {
|
|
1367
|
-
const
|
|
1368
|
-
V === 0 ?
|
|
1367
|
+
const J = `${e.key}_${V}`, f = b[J] || "", c = !f, v = c ? "" : f, P = c ? "show-placeholder" : "", B = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", j = e.tooltip && c ? "" : "hidden", K = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", ae = `<span contenteditable="true" data-type="variable" data-key="${J}" data-multi-key="${e.key}" data-index="${V}" data-placeholder="${e.placeholder || ""}"${K}${B} class="variable-chip ${P}">${v}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${j}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1368
|
+
V === 0 ? I += `<span ${G} class="exclusion-wrapper required-upload-group required-multi-first">${_}${ae}</span>` : I += ae;
|
|
1369
1369
|
}
|
|
1370
|
-
|
|
1370
|
+
T = I;
|
|
1371
1371
|
} else {
|
|
1372
1372
|
let _ = "";
|
|
1373
1373
|
for (let G = 0; G < O; G++) {
|
|
1374
|
-
const
|
|
1374
|
+
const I = `${e.key}_${G}`, V = b[I] || "", J = !V, f = J ? "" : V, c = J ? "show-placeholder" : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, """)}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && J ? "" : "hidden", B = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", j = `<span contenteditable="true" data-type="variable" data-key="${I}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${B}${v} class="variable-chip ${c}">${f}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, """)}" ></i>` : ""}</span>`;
|
|
1375
1375
|
_ += j;
|
|
1376
1376
|
}
|
|
1377
|
-
|
|
1377
|
+
T = _;
|
|
1378
1378
|
}
|
|
1379
1379
|
}
|
|
1380
|
-
const F = d +
|
|
1380
|
+
const F = d + T + D;
|
|
1381
1381
|
if (e.type === "text" && !e.className && !e.exclusionGroup) {
|
|
1382
|
-
if (
|
|
1383
|
-
const z =
|
|
1384
|
-
|
|
1382
|
+
if (w(e.text) && H.length > 0) {
|
|
1383
|
+
const z = H[H.length - 1], O = (e.text ?? "").trim();
|
|
1384
|
+
H[H.length - 1] = `<span class="rte-inline-group">${z}${k(O)}</span>`, E++;
|
|
1385
1385
|
continue;
|
|
1386
1386
|
}
|
|
1387
|
-
const Y =
|
|
1388
|
-
if (Y &&
|
|
1389
|
-
const z =
|
|
1390
|
-
|
|
1387
|
+
const Y = C(e.text);
|
|
1388
|
+
if (Y && H.length > 0) {
|
|
1389
|
+
const z = H[H.length - 1];
|
|
1390
|
+
H[H.length - 1] = `<span class="rte-inline-group">${z}${k(Y.punct)}</span>`;
|
|
1391
1391
|
const O = Y.rest;
|
|
1392
1392
|
if (O) {
|
|
1393
1393
|
const _ = O.replace(/\n/g, "<br/>");
|
|
1394
|
-
|
|
1394
|
+
H.push(`<span data-type="text" contenteditable="false">${_}</span>`);
|
|
1395
1395
|
}
|
|
1396
|
-
|
|
1396
|
+
E++;
|
|
1397
1397
|
continue;
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
|
|
1400
|
+
H.push(F), E++;
|
|
1401
1401
|
}
|
|
1402
|
-
t.current && (t.current.innerHTML =
|
|
1402
|
+
t.current && (t.current.innerHTML = H.join(""), setTimeout(() => {
|
|
1403
1403
|
if (!t.current) return;
|
|
1404
1404
|
t.current.querySelectorAll('[data-type="variable"]').forEach((n) => {
|
|
1405
1405
|
const a = n.innerText.replace(/\n/g, "");
|
|
@@ -1407,65 +1407,65 @@ function cr(t, y, i, o, b, T = {}, I, A) {
|
|
|
1407
1407
|
});
|
|
1408
1408
|
}, 0));
|
|
1409
1409
|
}
|
|
1410
|
-
function ur(t, y, i, o, b = {},
|
|
1411
|
-
const
|
|
1410
|
+
function ur(t, y, i, o, b = {}, q, M, A, $) {
|
|
1411
|
+
const w = ue(() => {
|
|
1412
1412
|
if (!t.current) return;
|
|
1413
1413
|
if (y.length === 0) {
|
|
1414
1414
|
t.current.innerHTML = "";
|
|
1415
1415
|
return;
|
|
1416
1416
|
}
|
|
1417
|
-
let
|
|
1418
|
-
const
|
|
1419
|
-
if (
|
|
1417
|
+
let C = {};
|
|
1418
|
+
const H = t.current.__tempVariableValues;
|
|
1419
|
+
if (H ? (C = H, setTimeout(() => {
|
|
1420
1420
|
if (t.current) {
|
|
1421
|
-
const
|
|
1422
|
-
|
|
1421
|
+
const E = t.current;
|
|
1422
|
+
E.__tempVariableValues === H && delete E.__tempVariableValues;
|
|
1423
1423
|
}
|
|
1424
1424
|
}, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((d) => {
|
|
1425
1425
|
const D = d.dataset.key;
|
|
1426
1426
|
if (D) {
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1427
|
+
const T = d.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
1428
|
+
T && (C[D] = T);
|
|
1429
1429
|
}
|
|
1430
1430
|
}), t.current.querySelectorAll('[data-type="select"]').forEach((d) => {
|
|
1431
1431
|
const D = d.dataset.key;
|
|
1432
1432
|
if (D) {
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1433
|
+
const T = (d.getAttribute("data-value") || "").trim();
|
|
1434
|
+
T && (C[D] = T);
|
|
1435
1435
|
}
|
|
1436
1436
|
}), t.current.querySelectorAll('[data-type="textarea"]').forEach((d) => {
|
|
1437
1437
|
const D = d.dataset.key;
|
|
1438
1438
|
if (D) {
|
|
1439
|
-
const
|
|
1440
|
-
|
|
1439
|
+
const T = d.value.replace(/[\u200B]/g, "").trim();
|
|
1440
|
+
T && (C[D] = T);
|
|
1441
1441
|
}
|
|
1442
1442
|
}), t.current.querySelectorAll('[data-type="richtext"]').forEach((d) => {
|
|
1443
1443
|
const D = d.dataset.key;
|
|
1444
1444
|
if (D) {
|
|
1445
|
-
const
|
|
1446
|
-
(
|
|
1445
|
+
const T = d.getAttribute("data-node-type") || "", F = T === "report-module" ? (d.innerHTML || "").replace(/[\u200B]/g, "").trim() : (d.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
1446
|
+
(T === "report-module" || F) && (C[D] = F);
|
|
1447
1447
|
}
|
|
1448
1448
|
}), t.current.querySelectorAll('[data-type="datepicker"]').forEach((d) => {
|
|
1449
1449
|
const D = d.dataset.key;
|
|
1450
1450
|
if (D) {
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1451
|
+
const T = (d.getAttribute("data-value") || "").trim();
|
|
1452
|
+
T && (C[D] = T);
|
|
1453
1453
|
}
|
|
1454
1454
|
})), cr(
|
|
1455
1455
|
t,
|
|
1456
1456
|
y,
|
|
1457
1457
|
i,
|
|
1458
1458
|
o,
|
|
1459
|
-
|
|
1459
|
+
C,
|
|
1460
1460
|
b,
|
|
1461
1461
|
A,
|
|
1462
1462
|
$
|
|
1463
|
-
),
|
|
1464
|
-
const { key:
|
|
1463
|
+
), q?.current) {
|
|
1464
|
+
const { key: E, offset: e } = q.current;
|
|
1465
1465
|
setTimeout(() => {
|
|
1466
1466
|
if (!t.current) return;
|
|
1467
1467
|
const n = t.current.querySelector(
|
|
1468
|
-
`[data-type="variable"][data-key="${
|
|
1468
|
+
`[data-type="variable"][data-key="${E}"]`
|
|
1469
1469
|
);
|
|
1470
1470
|
if (n) {
|
|
1471
1471
|
try {
|
|
@@ -1474,17 +1474,17 @@ function ur(t, y, i, o, b = {}, T, I, A, $) {
|
|
|
1474
1474
|
NodeFilter.SHOW_TEXT,
|
|
1475
1475
|
null
|
|
1476
1476
|
);
|
|
1477
|
-
let d = 0, D = null,
|
|
1477
|
+
let d = 0, D = null, T = 0;
|
|
1478
1478
|
for (; u.nextNode(); ) {
|
|
1479
1479
|
const F = u.currentNode, Y = F.textContent?.length || 0;
|
|
1480
1480
|
if (d + Y >= e) {
|
|
1481
|
-
D = F,
|
|
1481
|
+
D = F, T = e - d;
|
|
1482
1482
|
break;
|
|
1483
1483
|
}
|
|
1484
1484
|
d += Y;
|
|
1485
1485
|
}
|
|
1486
1486
|
if (D) {
|
|
1487
|
-
a.setStart(D, Math.min(
|
|
1487
|
+
a.setStart(D, Math.min(T, D.textContent?.length || 0)), a.collapse(!0);
|
|
1488
1488
|
const F = window.getSelection();
|
|
1489
1489
|
F && (F.removeAllRanges(), F.addRange(a), n.focus());
|
|
1490
1490
|
} else {
|
|
@@ -1498,61 +1498,61 @@ function ur(t, y, i, o, b = {}, T, I, A, $) {
|
|
|
1498
1498
|
const u = window.getSelection();
|
|
1499
1499
|
u && (u.removeAllRanges(), u.addRange(a), n.focus());
|
|
1500
1500
|
}
|
|
1501
|
-
|
|
1501
|
+
q.current = null;
|
|
1502
1502
|
}
|
|
1503
1503
|
}, 0);
|
|
1504
1504
|
}
|
|
1505
|
-
}, [y, i, o, t, b,
|
|
1505
|
+
}, [y, i, o, t, b, q, M, A, $]);
|
|
1506
1506
|
me(() => {
|
|
1507
|
-
|
|
1508
|
-
}, [
|
|
1507
|
+
w();
|
|
1508
|
+
}, [w]);
|
|
1509
1509
|
}
|
|
1510
1510
|
function dr(t, y, i, o) {
|
|
1511
1511
|
me(() => {
|
|
1512
1512
|
const b = t.current;
|
|
1513
1513
|
if (!b) return;
|
|
1514
|
-
const
|
|
1515
|
-
const
|
|
1516
|
-
if (
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1519
|
-
const
|
|
1520
|
-
o(
|
|
1514
|
+
const q = ($) => $.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test($.name || ""), M = ($) => {
|
|
1515
|
+
const w = $.target?.closest(".upload-info-icon");
|
|
1516
|
+
if (w && w.classList.contains("upload-info-icon")) {
|
|
1517
|
+
const k = w.dataset.uploadKey;
|
|
1518
|
+
if (k) {
|
|
1519
|
+
const H = w.closest('[data-type="upload"]');
|
|
1520
|
+
o(H ? { key: k, anchorEl: H, type: "upload" } : { key: k, anchorEl: w, type: "upload" });
|
|
1521
1521
|
}
|
|
1522
1522
|
return;
|
|
1523
1523
|
}
|
|
1524
|
-
const
|
|
1525
|
-
if (
|
|
1526
|
-
const
|
|
1527
|
-
if (
|
|
1528
|
-
const
|
|
1529
|
-
|
|
1524
|
+
const C = $.target?.closest('[data-type="upload"]');
|
|
1525
|
+
if (C) {
|
|
1526
|
+
const k = C.dataset.key;
|
|
1527
|
+
if (k) {
|
|
1528
|
+
const H = i[k];
|
|
1529
|
+
H && q(H) && o({ key: k, anchorEl: C, type: "upload-preview" });
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
}, A = ($) => {
|
|
1533
|
-
const
|
|
1534
|
-
if (
|
|
1535
|
-
const
|
|
1536
|
-
if (
|
|
1533
|
+
const w = $.target?.closest(".upload-info-icon"), C = $.relatedTarget;
|
|
1534
|
+
if (w && w.classList.contains("upload-info-icon")) {
|
|
1535
|
+
const H = w.closest('[data-type="upload"]');
|
|
1536
|
+
if (C && H && H.contains(C))
|
|
1537
1537
|
return;
|
|
1538
|
-
if (!
|
|
1538
|
+
if (!C || !b.contains(C))
|
|
1539
1539
|
o(null);
|
|
1540
1540
|
else {
|
|
1541
|
-
const
|
|
1542
|
-
(!
|
|
1541
|
+
const E = C.closest('[data-type="upload"]');
|
|
1542
|
+
(!E || E !== H) && o(null);
|
|
1543
1543
|
}
|
|
1544
1544
|
return;
|
|
1545
1545
|
}
|
|
1546
|
-
const
|
|
1547
|
-
if (
|
|
1548
|
-
const
|
|
1549
|
-
if (
|
|
1546
|
+
const k = $.target?.closest('[data-type="upload"]');
|
|
1547
|
+
if (k) {
|
|
1548
|
+
const H = C;
|
|
1549
|
+
if (H && k.contains(H))
|
|
1550
1550
|
return;
|
|
1551
1551
|
o(null);
|
|
1552
1552
|
}
|
|
1553
1553
|
};
|
|
1554
|
-
return b.addEventListener("mouseover",
|
|
1555
|
-
b.removeEventListener("mouseover",
|
|
1554
|
+
return b.addEventListener("mouseover", M, !0), b.addEventListener("mouseout", A, !0), () => {
|
|
1555
|
+
b.removeEventListener("mouseover", M, !0), b.removeEventListener("mouseout", A, !0);
|
|
1556
1556
|
};
|
|
1557
1557
|
}, [y, i, t, o]);
|
|
1558
1558
|
}
|
|
@@ -1562,27 +1562,27 @@ function pr(t, y, i, o) {
|
|
|
1562
1562
|
const b = ($) => {
|
|
1563
1563
|
if (o === "hideTagClose")
|
|
1564
1564
|
return;
|
|
1565
|
-
const
|
|
1566
|
-
|
|
1567
|
-
},
|
|
1565
|
+
const w = $.currentTarget, C = w.dataset.tooltip, k = w.dataset.tagKey || "";
|
|
1566
|
+
C && i({ key: k, anchorEl: w, type: "tag" });
|
|
1567
|
+
}, q = () => {
|
|
1568
1568
|
i(null);
|
|
1569
1569
|
};
|
|
1570
|
-
let
|
|
1570
|
+
let M;
|
|
1571
1571
|
const A = () => {
|
|
1572
1572
|
if (!t.current) return;
|
|
1573
1573
|
t.current.querySelectorAll(
|
|
1574
1574
|
".tag-node[data-tooltip]"
|
|
1575
|
-
).forEach((
|
|
1576
|
-
|
|
1575
|
+
).forEach((w) => {
|
|
1576
|
+
w.addEventListener("mouseenter", b), w.addEventListener("mouseleave", q);
|
|
1577
1577
|
});
|
|
1578
1578
|
};
|
|
1579
|
-
return
|
|
1580
|
-
|
|
1579
|
+
return M = requestAnimationFrame(() => {
|
|
1580
|
+
M = requestAnimationFrame(A);
|
|
1581
1581
|
}), () => {
|
|
1582
|
-
cancelAnimationFrame(
|
|
1582
|
+
cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
|
|
1583
1583
|
".tag-node[data-tooltip]"
|
|
1584
|
-
).forEach((
|
|
1585
|
-
|
|
1584
|
+
).forEach((w) => {
|
|
1585
|
+
w.removeEventListener("mouseenter", b), w.removeEventListener("mouseleave", q);
|
|
1586
1586
|
});
|
|
1587
1587
|
};
|
|
1588
1588
|
}, [y, t, i, o]);
|
|
@@ -1591,32 +1591,51 @@ function fr(t, y, i) {
|
|
|
1591
1591
|
me(() => {
|
|
1592
1592
|
const o = t.current;
|
|
1593
1593
|
if (!o) return;
|
|
1594
|
-
const b = (
|
|
1595
|
-
const A =
|
|
1594
|
+
const b = (M) => {
|
|
1595
|
+
const A = M.target?.closest(".variable-info-icon");
|
|
1596
1596
|
if (A && A.classList.contains("variable-info-icon")) {
|
|
1597
|
-
const
|
|
1598
|
-
|
|
1597
|
+
const w = A.dataset.variableKey;
|
|
1598
|
+
w && i({ key: w, anchorEl: A, type: "variable" });
|
|
1599
|
+
return;
|
|
1600
|
+
}
|
|
1601
|
+
const $ = M.target?.closest(
|
|
1602
|
+
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
1603
|
+
);
|
|
1604
|
+
if ($) {
|
|
1605
|
+
const w = $.dataset.key;
|
|
1606
|
+
w && i({ key: w, anchorEl: $, type: "variable" });
|
|
1607
|
+
}
|
|
1608
|
+
}, q = (M) => {
|
|
1609
|
+
const A = M.target, $ = M.relatedTarget, w = A?.closest?.(".variable-info-icon"), C = A?.closest?.(
|
|
1610
|
+
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
1611
|
+
);
|
|
1612
|
+
if (w || C) {
|
|
1613
|
+
if (!$ || !o.contains($)) {
|
|
1614
|
+
i(null);
|
|
1615
|
+
return;
|
|
1616
|
+
}
|
|
1617
|
+
const k = !!$.closest?.(".variable-info-icon"), H = !!$.closest?.(
|
|
1618
|
+
'[data-type="variable"][data-node-type="report-url"][data-tooltip]'
|
|
1619
|
+
);
|
|
1620
|
+
!k && !H && i(null);
|
|
1599
1621
|
}
|
|
1600
|
-
}, T = (I) => {
|
|
1601
|
-
const A = I.target?.closest(".variable-info-icon"), $ = I.relatedTarget;
|
|
1602
|
-
A && A.classList.contains("variable-info-icon") && (!$ || !o.contains($) ? i(null) : $.closest(".variable-info-icon") || i(null));
|
|
1603
1622
|
};
|
|
1604
|
-
return o.addEventListener("mouseover", b, !0), o.addEventListener("mouseout",
|
|
1605
|
-
o.removeEventListener("mouseover", b, !0), o.removeEventListener("mouseout",
|
|
1623
|
+
return o.addEventListener("mouseover", b, !0), o.addEventListener("mouseout", q, !0), () => {
|
|
1624
|
+
o.removeEventListener("mouseover", b, !0), o.removeEventListener("mouseout", q, !0);
|
|
1606
1625
|
};
|
|
1607
1626
|
}, [y, t, i]);
|
|
1608
1627
|
}
|
|
1609
1628
|
function mr(t, y, i, o) {
|
|
1610
1629
|
me(() => {
|
|
1611
1630
|
if (!t.current) return;
|
|
1612
|
-
const b = (
|
|
1613
|
-
const
|
|
1631
|
+
const b = (w) => w.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(w.name || ""), q = (w) => {
|
|
1632
|
+
const C = w.currentTarget, k = C.dataset.fileName, H = C.closest('[data-type="upload"]'), E = H?.dataset.key || "", e = E ? i[E] : null;
|
|
1614
1633
|
if (e && b(e)) {
|
|
1615
|
-
o({ key:
|
|
1634
|
+
o({ key: E, anchorEl: H || C, type: "upload-preview" });
|
|
1616
1635
|
return;
|
|
1617
1636
|
}
|
|
1618
|
-
|
|
1619
|
-
},
|
|
1637
|
+
k && o({ key: E, anchorEl: H || C, type: "upload-label" });
|
|
1638
|
+
}, M = () => {
|
|
1620
1639
|
o(null);
|
|
1621
1640
|
};
|
|
1622
1641
|
let A;
|
|
@@ -1624,8 +1643,8 @@ function mr(t, y, i, o) {
|
|
|
1624
1643
|
if (!t.current) return;
|
|
1625
1644
|
t.current.querySelectorAll(
|
|
1626
1645
|
".upload-label[data-file-name]"
|
|
1627
|
-
).forEach((
|
|
1628
|
-
|
|
1646
|
+
).forEach((C) => {
|
|
1647
|
+
C.addEventListener("mouseenter", q), C.addEventListener("mouseleave", M);
|
|
1629
1648
|
});
|
|
1630
1649
|
};
|
|
1631
1650
|
return A = requestAnimationFrame(() => {
|
|
@@ -1633,8 +1652,8 @@ function mr(t, y, i, o) {
|
|
|
1633
1652
|
}), () => {
|
|
1634
1653
|
cancelAnimationFrame(A), t.current && t.current.querySelectorAll(
|
|
1635
1654
|
".upload-label[data-file-name]"
|
|
1636
|
-
).forEach((
|
|
1637
|
-
|
|
1655
|
+
).forEach((C) => {
|
|
1656
|
+
C.removeEventListener("mouseenter", q), C.removeEventListener("mouseleave", M);
|
|
1638
1657
|
});
|
|
1639
1658
|
};
|
|
1640
1659
|
}, [y, i, t, o]);
|
|
@@ -1651,21 +1670,21 @@ function hr(t, y) {
|
|
|
1651
1670
|
const i = te(0), o = te(0);
|
|
1652
1671
|
me(() => {
|
|
1653
1672
|
if (!t.current) return;
|
|
1654
|
-
let b = !1,
|
|
1655
|
-
const
|
|
1656
|
-
b = !0,
|
|
1657
|
-
},
|
|
1658
|
-
b = !1,
|
|
1673
|
+
let b = !1, q = 0;
|
|
1674
|
+
const M = (d) => d instanceof HTMLElement ? !!(d.closest(".rte-datepicker-wrapper") || d.closest(".rte-datepicker-host") || d.closest(".ant-picker") || d.closest(".ant-picker-dropdown")) : !1, A = (d) => d instanceof HTMLElement ? !!(d.closest(".rte-select-wrapper") || d.closest(".rte-select-host") || d.closest(".ant-select") || d.closest(".ant-select-dropdown")) : !1, $ = (d) => {
|
|
1675
|
+
b = !0, M(d.target) && (i.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), A(d.target) && (o.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
|
|
1676
|
+
}, w = () => {
|
|
1677
|
+
b = !1, q = Date.now();
|
|
1659
1678
|
};
|
|
1660
|
-
let
|
|
1661
|
-
const
|
|
1662
|
-
|
|
1663
|
-
},
|
|
1664
|
-
|
|
1679
|
+
let C = !1, k = 0;
|
|
1680
|
+
const H = () => {
|
|
1681
|
+
C = !0;
|
|
1682
|
+
}, E = () => {
|
|
1683
|
+
C = !1, k = Date.now();
|
|
1665
1684
|
}, e = () => {
|
|
1666
|
-
|
|
1685
|
+
k = Date.now();
|
|
1667
1686
|
}, n = (d) => {
|
|
1668
|
-
|
|
1687
|
+
M(d.target) && (i.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), A(d.target) && (o.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
|
|
1669
1688
|
}, a = () => {
|
|
1670
1689
|
if (Date.now() - i.current < 800 || Date.now() - o.current < 800) {
|
|
1671
1690
|
console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");
|
|
@@ -1679,11 +1698,11 @@ function hr(t, y) {
|
|
|
1679
1698
|
}
|
|
1680
1699
|
if (!t.current) return;
|
|
1681
1700
|
const D = window.getSelection();
|
|
1682
|
-
if (!D || D.rangeCount === 0 || y.current || b ||
|
|
1701
|
+
if (!D || D.rangeCount === 0 || y.current || b || C || Date.now() - k < 500)
|
|
1683
1702
|
return;
|
|
1684
|
-
const
|
|
1685
|
-
if (!
|
|
1686
|
-
return t.current.contains(
|
|
1703
|
+
const T = D.getRangeAt(0);
|
|
1704
|
+
if (!T.collapsed)
|
|
1705
|
+
return t.current.contains(T.commonAncestorContainer), void 0;
|
|
1687
1706
|
const F = D.anchorNode;
|
|
1688
1707
|
if (!F || !t.current.contains(F))
|
|
1689
1708
|
return;
|
|
@@ -1699,28 +1718,28 @@ function hr(t, y) {
|
|
|
1699
1718
|
return;
|
|
1700
1719
|
let O = null;
|
|
1701
1720
|
if (F.nodeType === Node.ELEMENT_NODE ? O = F.closest('[data-type="variable"]') : F.nodeType === Node.TEXT_NODE && F.parentElement && (O = F.parentElement.closest('[data-type="variable"]')), !O) {
|
|
1702
|
-
if (Date.now() -
|
|
1721
|
+
if (Date.now() - q > 500)
|
|
1703
1722
|
return;
|
|
1704
1723
|
const _ = t.current.querySelectorAll('[data-type="variable"]');
|
|
1705
1724
|
if (_.length > 0) {
|
|
1706
1725
|
let G = null;
|
|
1707
|
-
for (const
|
|
1708
|
-
if (
|
|
1709
|
-
G =
|
|
1726
|
+
for (const I of Array.from(_))
|
|
1727
|
+
if (I.style.display !== "none") {
|
|
1728
|
+
G = I;
|
|
1710
1729
|
break;
|
|
1711
1730
|
}
|
|
1712
1731
|
if (!G && _.length > 0 && (G = _[0]), G) {
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1732
|
+
const I = document.createRange();
|
|
1733
|
+
I.selectNodeContents(G), I.collapse(!1), D.removeAllRanges(), D.addRange(I), G.focus();
|
|
1715
1734
|
} else
|
|
1716
1735
|
D.removeAllRanges();
|
|
1717
1736
|
} else
|
|
1718
1737
|
D.removeAllRanges();
|
|
1719
1738
|
}
|
|
1720
1739
|
}, u = t.current;
|
|
1721
|
-
return u && (u.addEventListener("compositionstart",
|
|
1740
|
+
return u && (u.addEventListener("compositionstart", H), u.addEventListener("compositionend", E), u.addEventListener("input", e)), document.addEventListener("mousedown", $), document.addEventListener("mouseup", w), document.addEventListener("focusin", n), document.addEventListener("selectionchange", a), () => {
|
|
1722
1741
|
const d = t.current;
|
|
1723
|
-
d && (d.removeEventListener("compositionstart",
|
|
1742
|
+
d && (d.removeEventListener("compositionstart", H), d.removeEventListener("compositionend", E), d.removeEventListener("input", e)), document.removeEventListener("mousedown", $), document.removeEventListener("mouseup", w), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", a);
|
|
1724
1743
|
};
|
|
1725
1744
|
}, [t, y]);
|
|
1726
1745
|
}
|
|
@@ -1728,53 +1747,53 @@ function gr(t) {
|
|
|
1728
1747
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
1729
1748
|
}
|
|
1730
1749
|
var bt = { exports: {} }, br = bt.exports, en;
|
|
1731
|
-
function
|
|
1750
|
+
function ln() {
|
|
1732
1751
|
return en || (en = 1, function(t, y) {
|
|
1733
1752
|
(function(i, o) {
|
|
1734
1753
|
t.exports = o();
|
|
1735
1754
|
})(br, function() {
|
|
1736
|
-
var i = 1e3, o = 6e4, b = 36e5,
|
|
1755
|
+
var i = 1e3, o = 6e4, b = 36e5, q = "millisecond", M = "second", A = "minute", $ = "hour", w = "day", C = "week", k = "month", H = "quarter", E = "year", e = "date", n = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, u = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, d = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(f) {
|
|
1737
1756
|
var c = ["th", "st", "nd", "rd"], v = f % 100;
|
|
1738
1757
|
return "[" + f + (c[(v - 20) % 10] || c[v] || c[0]) + "]";
|
|
1739
1758
|
} }, D = function(f, c, v) {
|
|
1740
|
-
var
|
|
1741
|
-
return !
|
|
1742
|
-
},
|
|
1743
|
-
var c = -f.utcOffset(), v = Math.abs(c),
|
|
1744
|
-
return (c <= 0 ? "+" : "-") + D(
|
|
1759
|
+
var P = String(f);
|
|
1760
|
+
return !P || P.length >= c ? f : "" + Array(c + 1 - P.length).join(v) + f;
|
|
1761
|
+
}, T = { s: D, z: function(f) {
|
|
1762
|
+
var c = -f.utcOffset(), v = Math.abs(c), P = Math.floor(v / 60), B = v % 60;
|
|
1763
|
+
return (c <= 0 ? "+" : "-") + D(P, 2, "0") + ":" + D(B, 2, "0");
|
|
1745
1764
|
}, m: function f(c, v) {
|
|
1746
1765
|
if (c.date() < v.date()) return -f(v, c);
|
|
1747
|
-
var
|
|
1748
|
-
return +(-(
|
|
1766
|
+
var P = 12 * (v.year() - c.year()) + (v.month() - c.month()), B = c.clone().add(P, k), j = v - B < 0, K = c.clone().add(P + (j ? -1 : 1), k);
|
|
1767
|
+
return +(-(P + (v - B) / (j ? B - K : K - B)) || 0);
|
|
1749
1768
|
}, a: function(f) {
|
|
1750
1769
|
return f < 0 ? Math.ceil(f) || 0 : Math.floor(f);
|
|
1751
1770
|
}, p: function(f) {
|
|
1752
|
-
return { M:
|
|
1771
|
+
return { M: k, y: E, w: C, d: w, D: e, h: $, m: A, s: M, ms: q, Q: H }[f] || String(f || "").toLowerCase().replace(/s$/, "");
|
|
1753
1772
|
}, u: function(f) {
|
|
1754
1773
|
return f === void 0;
|
|
1755
1774
|
} }, F = "en", Y = {};
|
|
1756
1775
|
Y[F] = d;
|
|
1757
1776
|
var z = "$isDayjsObject", O = function(f) {
|
|
1758
1777
|
return f instanceof V || !(!f || !f[z]);
|
|
1759
|
-
}, _ = function f(c, v,
|
|
1778
|
+
}, _ = function f(c, v, P) {
|
|
1760
1779
|
var B;
|
|
1761
1780
|
if (!c) return F;
|
|
1762
1781
|
if (typeof c == "string") {
|
|
1763
1782
|
var j = c.toLowerCase();
|
|
1764
1783
|
Y[j] && (B = j), v && (Y[j] = v, B = j);
|
|
1765
|
-
var
|
|
1766
|
-
if (!B &&
|
|
1784
|
+
var K = c.split("-");
|
|
1785
|
+
if (!B && K.length > 1) return f(K[0]);
|
|
1767
1786
|
} else {
|
|
1768
1787
|
var ae = c.name;
|
|
1769
1788
|
Y[ae] = c, B = ae;
|
|
1770
1789
|
}
|
|
1771
|
-
return !
|
|
1790
|
+
return !P && B && (F = B), B || !P && F;
|
|
1772
1791
|
}, G = function(f, c) {
|
|
1773
1792
|
if (O(f)) return f.clone();
|
|
1774
1793
|
var v = typeof c == "object" ? c : {};
|
|
1775
1794
|
return v.date = f, v.args = arguments, new V(v);
|
|
1776
|
-
},
|
|
1777
|
-
|
|
1795
|
+
}, I = T;
|
|
1796
|
+
I.l = _, I.i = O, I.w = function(f, c) {
|
|
1778
1797
|
return G(f, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
|
|
1779
1798
|
};
|
|
1780
1799
|
var V = function() {
|
|
@@ -1783,16 +1802,16 @@ function sn() {
|
|
|
1783
1802
|
}
|
|
1784
1803
|
var c = f.prototype;
|
|
1785
1804
|
return c.parse = function(v) {
|
|
1786
|
-
this.$d = function(
|
|
1787
|
-
var B =
|
|
1805
|
+
this.$d = function(P) {
|
|
1806
|
+
var B = P.date, j = P.utc;
|
|
1788
1807
|
if (B === null) return /* @__PURE__ */ new Date(NaN);
|
|
1789
|
-
if (
|
|
1808
|
+
if (I.u(B)) return /* @__PURE__ */ new Date();
|
|
1790
1809
|
if (B instanceof Date) return new Date(B);
|
|
1791
1810
|
if (typeof B == "string" && !/Z$/i.test(B)) {
|
|
1792
|
-
var
|
|
1793
|
-
if (
|
|
1794
|
-
var ae =
|
|
1795
|
-
return j ? new Date(Date.UTC(
|
|
1811
|
+
var K = B.match(a);
|
|
1812
|
+
if (K) {
|
|
1813
|
+
var ae = K[2] - 1 || 0, pe = (K[7] || "0").substring(0, 3);
|
|
1814
|
+
return j ? new Date(Date.UTC(K[1], ae, K[3] || 1, K[4] || 0, K[5] || 0, K[6] || 0, pe)) : new Date(K[1], ae, K[3] || 1, K[4] || 0, K[5] || 0, K[6] || 0, pe);
|
|
1796
1815
|
}
|
|
1797
1816
|
}
|
|
1798
1817
|
return new Date(B);
|
|
@@ -1801,84 +1820,84 @@ function sn() {
|
|
|
1801
1820
|
var v = this.$d;
|
|
1802
1821
|
this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
|
|
1803
1822
|
}, c.$utils = function() {
|
|
1804
|
-
return
|
|
1823
|
+
return I;
|
|
1805
1824
|
}, c.isValid = function() {
|
|
1806
1825
|
return this.$d.toString() !== n;
|
|
1807
|
-
}, c.isSame = function(v,
|
|
1826
|
+
}, c.isSame = function(v, P) {
|
|
1808
1827
|
var B = G(v);
|
|
1809
|
-
return this.startOf(
|
|
1810
|
-
}, c.isAfter = function(v,
|
|
1811
|
-
return G(v) < this.startOf(
|
|
1812
|
-
}, c.isBefore = function(v,
|
|
1813
|
-
return this.endOf(
|
|
1814
|
-
}, c.$g = function(v,
|
|
1815
|
-
return
|
|
1828
|
+
return this.startOf(P) <= B && B <= this.endOf(P);
|
|
1829
|
+
}, c.isAfter = function(v, P) {
|
|
1830
|
+
return G(v) < this.startOf(P);
|
|
1831
|
+
}, c.isBefore = function(v, P) {
|
|
1832
|
+
return this.endOf(P) < G(v);
|
|
1833
|
+
}, c.$g = function(v, P, B) {
|
|
1834
|
+
return I.u(v) ? this[P] : this.set(B, v);
|
|
1816
1835
|
}, c.unix = function() {
|
|
1817
1836
|
return Math.floor(this.valueOf() / 1e3);
|
|
1818
1837
|
}, c.valueOf = function() {
|
|
1819
1838
|
return this.$d.getTime();
|
|
1820
|
-
}, c.startOf = function(v,
|
|
1821
|
-
var B = this, j = !!
|
|
1822
|
-
var Ce =
|
|
1823
|
-
return j ? Ce : Ce.endOf(
|
|
1839
|
+
}, c.startOf = function(v, P) {
|
|
1840
|
+
var B = this, j = !!I.u(P) || P, K = I.p(v), ae = function(xe, ke) {
|
|
1841
|
+
var Ce = I.w(B.$u ? Date.UTC(B.$y, ke, xe) : new Date(B.$y, ke, xe), B);
|
|
1842
|
+
return j ? Ce : Ce.endOf(w);
|
|
1824
1843
|
}, pe = function(xe, ke) {
|
|
1825
|
-
return
|
|
1844
|
+
return I.w(B.toDate()[xe].apply(B.toDate("s"), (j ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ke)), B);
|
|
1826
1845
|
}, he = this.$W, ye = this.$M, ge = this.$D, R = "set" + (this.$u ? "UTC" : "");
|
|
1827
|
-
switch (
|
|
1828
|
-
case
|
|
1846
|
+
switch (K) {
|
|
1847
|
+
case E:
|
|
1829
1848
|
return j ? ae(1, 0) : ae(31, 11);
|
|
1830
|
-
case
|
|
1849
|
+
case k:
|
|
1831
1850
|
return j ? ae(1, ye) : ae(0, ye + 1);
|
|
1832
|
-
case
|
|
1833
|
-
var
|
|
1834
|
-
return ae(j ? ge -
|
|
1835
|
-
case
|
|
1851
|
+
case C:
|
|
1852
|
+
var W = this.$locale().weekStart || 0, se = (he < W ? he + 7 : he) - W;
|
|
1853
|
+
return ae(j ? ge - se : ge + (6 - se), ye);
|
|
1854
|
+
case w:
|
|
1836
1855
|
case e:
|
|
1837
1856
|
return pe(R + "Hours", 0);
|
|
1838
1857
|
case $:
|
|
1839
1858
|
return pe(R + "Minutes", 1);
|
|
1840
1859
|
case A:
|
|
1841
1860
|
return pe(R + "Seconds", 2);
|
|
1842
|
-
case
|
|
1861
|
+
case M:
|
|
1843
1862
|
return pe(R + "Milliseconds", 3);
|
|
1844
1863
|
default:
|
|
1845
1864
|
return this.clone();
|
|
1846
1865
|
}
|
|
1847
1866
|
}, c.endOf = function(v) {
|
|
1848
1867
|
return this.startOf(v, !1);
|
|
1849
|
-
}, c.$set = function(v,
|
|
1850
|
-
var B, j =
|
|
1851
|
-
if (j ===
|
|
1868
|
+
}, c.$set = function(v, P) {
|
|
1869
|
+
var B, j = I.p(v), K = "set" + (this.$u ? "UTC" : ""), ae = (B = {}, B[w] = K + "Date", B[e] = K + "Date", B[k] = K + "Month", B[E] = K + "FullYear", B[$] = K + "Hours", B[A] = K + "Minutes", B[M] = K + "Seconds", B[q] = K + "Milliseconds", B)[j], pe = j === w ? this.$D + (P - this.$W) : P;
|
|
1870
|
+
if (j === k || j === E) {
|
|
1852
1871
|
var he = this.clone().set(e, 1);
|
|
1853
1872
|
he.$d[ae](pe), he.init(), this.$d = he.set(e, Math.min(this.$D, he.daysInMonth())).$d;
|
|
1854
1873
|
} else ae && this.$d[ae](pe);
|
|
1855
1874
|
return this.init(), this;
|
|
1856
|
-
}, c.set = function(v,
|
|
1857
|
-
return this.clone().$set(v,
|
|
1875
|
+
}, c.set = function(v, P) {
|
|
1876
|
+
return this.clone().$set(v, P);
|
|
1858
1877
|
}, c.get = function(v) {
|
|
1859
|
-
return this[
|
|
1860
|
-
}, c.add = function(v,
|
|
1878
|
+
return this[I.p(v)]();
|
|
1879
|
+
}, c.add = function(v, P) {
|
|
1861
1880
|
var B, j = this;
|
|
1862
1881
|
v = Number(v);
|
|
1863
|
-
var
|
|
1882
|
+
var K = I.p(P), ae = function(ye) {
|
|
1864
1883
|
var ge = G(j);
|
|
1865
|
-
return
|
|
1884
|
+
return I.w(ge.date(ge.date() + Math.round(ye * v)), j);
|
|
1866
1885
|
};
|
|
1867
|
-
if (
|
|
1868
|
-
if (
|
|
1869
|
-
if (
|
|
1870
|
-
if (
|
|
1871
|
-
var pe = (B = {}, B[A] = o, B[$] = b, B[
|
|
1872
|
-
return
|
|
1873
|
-
}, c.subtract = function(v,
|
|
1874
|
-
return this.add(-1 * v,
|
|
1886
|
+
if (K === k) return this.set(k, this.$M + v);
|
|
1887
|
+
if (K === E) return this.set(E, this.$y + v);
|
|
1888
|
+
if (K === w) return ae(1);
|
|
1889
|
+
if (K === C) return ae(7);
|
|
1890
|
+
var pe = (B = {}, B[A] = o, B[$] = b, B[M] = i, B)[K] || 1, he = this.$d.getTime() + v * pe;
|
|
1891
|
+
return I.w(he, this);
|
|
1892
|
+
}, c.subtract = function(v, P) {
|
|
1893
|
+
return this.add(-1 * v, P);
|
|
1875
1894
|
}, c.format = function(v) {
|
|
1876
|
-
var
|
|
1895
|
+
var P = this, B = this.$locale();
|
|
1877
1896
|
if (!this.isValid()) return B.invalidDate || n;
|
|
1878
|
-
var j = v || "YYYY-MM-DDTHH:mm:ssZ",
|
|
1879
|
-
return ke && (ke[Ce] || ke(
|
|
1880
|
-
},
|
|
1881
|
-
return
|
|
1897
|
+
var j = v || "YYYY-MM-DDTHH:mm:ssZ", K = I.z(this), ae = this.$H, pe = this.$m, he = this.$M, ye = B.weekdays, ge = B.months, R = B.meridiem, W = function(ke, Ce, Me, Ne) {
|
|
1898
|
+
return ke && (ke[Ce] || ke(P, j)) || Me[Ce].slice(0, Ne);
|
|
1899
|
+
}, se = function(ke) {
|
|
1900
|
+
return I.s(ae % 12 || 12, ke, "0");
|
|
1882
1901
|
}, xe = R || function(ke, Ce, Me) {
|
|
1883
1902
|
var Ne = ke < 12 ? "AM" : "PM";
|
|
1884
1903
|
return Me ? Ne.toLowerCase() : Ne;
|
|
@@ -1887,37 +1906,37 @@ function sn() {
|
|
|
1887
1906
|
return Ce || function(Me) {
|
|
1888
1907
|
switch (Me) {
|
|
1889
1908
|
case "YY":
|
|
1890
|
-
return String(
|
|
1909
|
+
return String(P.$y).slice(-2);
|
|
1891
1910
|
case "YYYY":
|
|
1892
|
-
return
|
|
1911
|
+
return I.s(P.$y, 4, "0");
|
|
1893
1912
|
case "M":
|
|
1894
1913
|
return he + 1;
|
|
1895
1914
|
case "MM":
|
|
1896
|
-
return
|
|
1915
|
+
return I.s(he + 1, 2, "0");
|
|
1897
1916
|
case "MMM":
|
|
1898
|
-
return
|
|
1917
|
+
return W(B.monthsShort, he, ge, 3);
|
|
1899
1918
|
case "MMMM":
|
|
1900
|
-
return
|
|
1919
|
+
return W(ge, he);
|
|
1901
1920
|
case "D":
|
|
1902
|
-
return
|
|
1921
|
+
return P.$D;
|
|
1903
1922
|
case "DD":
|
|
1904
|
-
return
|
|
1923
|
+
return I.s(P.$D, 2, "0");
|
|
1905
1924
|
case "d":
|
|
1906
|
-
return String(
|
|
1925
|
+
return String(P.$W);
|
|
1907
1926
|
case "dd":
|
|
1908
|
-
return
|
|
1927
|
+
return W(B.weekdaysMin, P.$W, ye, 2);
|
|
1909
1928
|
case "ddd":
|
|
1910
|
-
return
|
|
1929
|
+
return W(B.weekdaysShort, P.$W, ye, 3);
|
|
1911
1930
|
case "dddd":
|
|
1912
|
-
return ye[
|
|
1931
|
+
return ye[P.$W];
|
|
1913
1932
|
case "H":
|
|
1914
1933
|
return String(ae);
|
|
1915
1934
|
case "HH":
|
|
1916
|
-
return
|
|
1935
|
+
return I.s(ae, 2, "0");
|
|
1917
1936
|
case "h":
|
|
1918
|
-
return
|
|
1937
|
+
return se(1);
|
|
1919
1938
|
case "hh":
|
|
1920
|
-
return
|
|
1939
|
+
return se(2);
|
|
1921
1940
|
case "a":
|
|
1922
1941
|
return xe(ae, pe, !0);
|
|
1923
1942
|
case "A":
|
|
@@ -1925,39 +1944,39 @@ function sn() {
|
|
|
1925
1944
|
case "m":
|
|
1926
1945
|
return String(pe);
|
|
1927
1946
|
case "mm":
|
|
1928
|
-
return
|
|
1947
|
+
return I.s(pe, 2, "0");
|
|
1929
1948
|
case "s":
|
|
1930
|
-
return String(
|
|
1949
|
+
return String(P.$s);
|
|
1931
1950
|
case "ss":
|
|
1932
|
-
return
|
|
1951
|
+
return I.s(P.$s, 2, "0");
|
|
1933
1952
|
case "SSS":
|
|
1934
|
-
return
|
|
1953
|
+
return I.s(P.$ms, 3, "0");
|
|
1935
1954
|
case "Z":
|
|
1936
|
-
return
|
|
1955
|
+
return K;
|
|
1937
1956
|
}
|
|
1938
1957
|
return null;
|
|
1939
|
-
}(ke) ||
|
|
1958
|
+
}(ke) || K.replace(":", "");
|
|
1940
1959
|
});
|
|
1941
1960
|
}, c.utcOffset = function() {
|
|
1942
1961
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1943
|
-
}, c.diff = function(v,
|
|
1944
|
-
var j,
|
|
1945
|
-
return
|
|
1962
|
+
}, c.diff = function(v, P, B) {
|
|
1963
|
+
var j, K = this, ae = I.p(P), pe = G(v), he = (pe.utcOffset() - this.utcOffset()) * o, ye = this - pe, ge = function() {
|
|
1964
|
+
return I.m(K, pe);
|
|
1946
1965
|
};
|
|
1947
1966
|
switch (ae) {
|
|
1948
|
-
case
|
|
1967
|
+
case E:
|
|
1949
1968
|
j = ge() / 12;
|
|
1950
1969
|
break;
|
|
1951
|
-
case
|
|
1970
|
+
case k:
|
|
1952
1971
|
j = ge();
|
|
1953
1972
|
break;
|
|
1954
|
-
case
|
|
1973
|
+
case H:
|
|
1955
1974
|
j = ge() / 3;
|
|
1956
1975
|
break;
|
|
1957
|
-
case
|
|
1976
|
+
case C:
|
|
1958
1977
|
j = (ye - he) / 6048e5;
|
|
1959
1978
|
break;
|
|
1960
|
-
case
|
|
1979
|
+
case w:
|
|
1961
1980
|
j = (ye - he) / 864e5;
|
|
1962
1981
|
break;
|
|
1963
1982
|
case $:
|
|
@@ -1966,23 +1985,23 @@ function sn() {
|
|
|
1966
1985
|
case A:
|
|
1967
1986
|
j = ye / o;
|
|
1968
1987
|
break;
|
|
1969
|
-
case
|
|
1988
|
+
case M:
|
|
1970
1989
|
j = ye / i;
|
|
1971
1990
|
break;
|
|
1972
1991
|
default:
|
|
1973
1992
|
j = ye;
|
|
1974
1993
|
}
|
|
1975
|
-
return B ? j :
|
|
1994
|
+
return B ? j : I.a(j);
|
|
1976
1995
|
}, c.daysInMonth = function() {
|
|
1977
|
-
return this.endOf(
|
|
1996
|
+
return this.endOf(k).$D;
|
|
1978
1997
|
}, c.$locale = function() {
|
|
1979
1998
|
return Y[this.$L];
|
|
1980
|
-
}, c.locale = function(v,
|
|
1999
|
+
}, c.locale = function(v, P) {
|
|
1981
2000
|
if (!v) return this.$L;
|
|
1982
|
-
var B = this.clone(), j = _(v,
|
|
2001
|
+
var B = this.clone(), j = _(v, P, !0);
|
|
1983
2002
|
return j && (B.$L = j), B;
|
|
1984
2003
|
}, c.clone = function() {
|
|
1985
|
-
return
|
|
2004
|
+
return I.w(this.$d, this);
|
|
1986
2005
|
}, c.toDate = function() {
|
|
1987
2006
|
return new Date(this.valueOf());
|
|
1988
2007
|
}, c.toJSON = function() {
|
|
@@ -1992,9 +2011,9 @@ function sn() {
|
|
|
1992
2011
|
}, c.toString = function() {
|
|
1993
2012
|
return this.$d.toUTCString();
|
|
1994
2013
|
}, f;
|
|
1995
|
-
}(),
|
|
1996
|
-
return G.prototype =
|
|
1997
|
-
|
|
2014
|
+
}(), J = V.prototype;
|
|
2015
|
+
return G.prototype = J, [["$ms", q], ["$s", M], ["$m", A], ["$H", $], ["$W", w], ["$M", k], ["$y", E], ["$D", e]].forEach(function(f) {
|
|
2016
|
+
J[f[1]] = function(c) {
|
|
1998
2017
|
return this.$g(c, f[0], f[1]);
|
|
1999
2018
|
};
|
|
2000
2019
|
}), G.extend = function(f, c) {
|
|
@@ -2005,24 +2024,24 @@ function sn() {
|
|
|
2005
2024
|
});
|
|
2006
2025
|
}(bt)), bt.exports;
|
|
2007
2026
|
}
|
|
2008
|
-
var vr =
|
|
2027
|
+
var vr = ln();
|
|
2009
2028
|
const vt = /* @__PURE__ */ gr(vr);
|
|
2010
2029
|
var xt = { exports: {} }, xr = xt.exports, tn;
|
|
2011
2030
|
function wr() {
|
|
2012
2031
|
return tn || (tn = 1, function(t, y) {
|
|
2013
2032
|
(function(i, o) {
|
|
2014
|
-
t.exports = o(
|
|
2033
|
+
t.exports = o(ln());
|
|
2015
2034
|
})(xr, function(i) {
|
|
2016
|
-
function o(
|
|
2017
|
-
return
|
|
2035
|
+
function o(M) {
|
|
2036
|
+
return M && typeof M == "object" && "default" in M ? M : { default: M };
|
|
2018
2037
|
}
|
|
2019
|
-
var b = o(i),
|
|
2020
|
-
return A === "W" ?
|
|
2021
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(
|
|
2022
|
-
var $ = 100 *
|
|
2038
|
+
var b = o(i), q = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(M, A) {
|
|
2039
|
+
return A === "W" ? M + "周" : M + "日";
|
|
2040
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(M, A) {
|
|
2041
|
+
var $ = 100 * M + A;
|
|
2023
2042
|
return $ < 600 ? "凌晨" : $ < 900 ? "早上" : $ < 1100 ? "上午" : $ < 1300 ? "中午" : $ < 1800 ? "下午" : "晚上";
|
|
2024
2043
|
} };
|
|
2025
|
-
return b.default.locale(
|
|
2044
|
+
return b.default.locale(q, null, !0), q;
|
|
2026
2045
|
});
|
|
2027
2046
|
}(xt)), xt.exports;
|
|
2028
2047
|
}
|
|
@@ -2083,7 +2102,7 @@ var Cr = {
|
|
|
2083
2102
|
dayFormat: "D",
|
|
2084
2103
|
cellMeridiemFormat: "A",
|
|
2085
2104
|
monthBeforeYear: !0
|
|
2086
|
-
},
|
|
2105
|
+
}, Tr = rn(rn({}, Cr), {}, {
|
|
2087
2106
|
locale: "zh_CN",
|
|
2088
2107
|
today: "今天",
|
|
2089
2108
|
now: "此刻",
|
|
@@ -2111,10 +2130,10 @@ var Cr = {
|
|
|
2111
2130
|
cellDateFormat: "D",
|
|
2112
2131
|
monthBeforeYear: !1
|
|
2113
2132
|
});
|
|
2114
|
-
const
|
|
2133
|
+
const Sr = {
|
|
2115
2134
|
placeholder: "请选择时间",
|
|
2116
2135
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
2117
|
-
},
|
|
2136
|
+
}, sn = {
|
|
2118
2137
|
lang: Object.assign({
|
|
2119
2138
|
placeholder: "请选择日期",
|
|
2120
2139
|
yearPlaceholder: "请选择年份",
|
|
@@ -2126,41 +2145,41 @@ const Tr = {
|
|
|
2126
2145
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
2127
2146
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
2128
2147
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
2129
|
-
},
|
|
2130
|
-
timePickerLocale: Object.assign({},
|
|
2148
|
+
}, Tr),
|
|
2149
|
+
timePickerLocale: Object.assign({}, Sr)
|
|
2131
2150
|
};
|
|
2132
|
-
|
|
2151
|
+
sn.lang.ok = "确定";
|
|
2133
2152
|
vt.locale("zh-cn");
|
|
2134
2153
|
const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
2135
|
-
const i = t.dataset.key, o = t.dataset.value, b = t.dataset.placeholder,
|
|
2154
|
+
const i = t.dataset.key, o = t.dataset.value, b = t.dataset.placeholder, q = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, M = t.dataset.disableFuture === "true", [A, $] = ie(() => {
|
|
2136
2155
|
if (!o) return null;
|
|
2137
2156
|
const n = o.split(",");
|
|
2138
2157
|
return n.length === 2 && n[0] && n[1] ? [vt(n[0]), vt(n[1])] : null;
|
|
2139
|
-
}), [
|
|
2158
|
+
}), [w, C] = ie(null);
|
|
2140
2159
|
return Bt(
|
|
2141
2160
|
/* @__PURE__ */ L("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "260px", marginLeft: "4px", marginRight: "4px", fontSize: "16px", height: "30px", lineHeight: "30px" }, children: /* @__PURE__ */ L(
|
|
2142
2161
|
Nr,
|
|
2143
2162
|
{
|
|
2144
2163
|
value: A,
|
|
2145
|
-
disabledDate: (n) => n ?
|
|
2164
|
+
disabledDate: (n) => n ? M && n.isAfter(vt(), "day") ? !0 : !q || !w || !w[0] ? !1 : Math.abs(n.diff(w[0], "days")) > q : !1,
|
|
2146
2165
|
onCalendarChange: (n) => {
|
|
2147
|
-
console.log("[DatePicker] onCalendarChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)),
|
|
2166
|
+
console.log("[DatePicker] onCalendarChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)), C(n);
|
|
2148
2167
|
},
|
|
2149
2168
|
onChange: (n) => {
|
|
2150
|
-
if (console.log("[DatePicker] onChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)), $(n),
|
|
2169
|
+
if (console.log("[DatePicker] onChange", n?.map((a) => a?.format("YYYY-MM-DD") || null)), $(n), C(null), n && n[0] && n[1]) {
|
|
2151
2170
|
const a = `${n[0].format("YYYY-MM-DD")},${n[1].format("YYYY-MM-DD")}`;
|
|
2152
2171
|
t.setAttribute("data-value", a), y(i, a);
|
|
2153
2172
|
} else
|
|
2154
2173
|
t.setAttribute("data-value", ""), y(i, "");
|
|
2155
2174
|
},
|
|
2156
2175
|
onOpenChange: (n) => {
|
|
2157
|
-
console.log("[DatePicker] onOpenChange", n),
|
|
2176
|
+
console.log("[DatePicker] onOpenChange", n), C(n ? A : null);
|
|
2158
2177
|
},
|
|
2159
2178
|
placeholder: [b || "开始日期", b || "结束日期"],
|
|
2160
2179
|
style: { width: "100%" },
|
|
2161
2180
|
size: "small",
|
|
2162
2181
|
allowClear: !0,
|
|
2163
|
-
locale:
|
|
2182
|
+
locale: sn,
|
|
2164
2183
|
getPopupContainer: () => document.body,
|
|
2165
2184
|
popupClassName: "rte-datepicker-dropdown"
|
|
2166
2185
|
}
|
|
@@ -2173,50 +2192,50 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2173
2192
|
const o = t.current;
|
|
2174
2193
|
if (!o) return;
|
|
2175
2194
|
const b = () => {
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2195
|
+
const M = o.querySelectorAll(".rte-datepicker-host"), A = [];
|
|
2196
|
+
M.forEach(($) => {
|
|
2197
|
+
const w = $.getAttribute("data-key");
|
|
2198
|
+
w && A.push(
|
|
2180
2199
|
/* @__PURE__ */ L(
|
|
2181
2200
|
qr,
|
|
2182
2201
|
{
|
|
2183
2202
|
host: $,
|
|
2184
2203
|
onChange: () => {
|
|
2185
2204
|
if (t.current) {
|
|
2186
|
-
const
|
|
2187
|
-
t.current.dispatchEvent(
|
|
2205
|
+
const C = new Event("input", { bubbles: !0 });
|
|
2206
|
+
t.current.dispatchEvent(C);
|
|
2188
2207
|
}
|
|
2189
2208
|
}
|
|
2190
2209
|
},
|
|
2191
|
-
`datepicker-${
|
|
2210
|
+
`datepicker-${w}`
|
|
2192
2211
|
)
|
|
2193
2212
|
);
|
|
2194
2213
|
}), i(A);
|
|
2195
2214
|
};
|
|
2196
2215
|
b();
|
|
2197
|
-
const
|
|
2216
|
+
const q = new MutationObserver((M) => {
|
|
2198
2217
|
let A = !1;
|
|
2199
|
-
for (const $ of
|
|
2218
|
+
for (const $ of M)
|
|
2200
2219
|
if ($.type === "childList") {
|
|
2201
|
-
let
|
|
2202
|
-
if ($.addedNodes.forEach((
|
|
2203
|
-
if (
|
|
2204
|
-
const
|
|
2205
|
-
(
|
|
2220
|
+
let w = !1;
|
|
2221
|
+
if ($.addedNodes.forEach((C) => {
|
|
2222
|
+
if (C.nodeType === Node.ELEMENT_NODE) {
|
|
2223
|
+
const k = C;
|
|
2224
|
+
(k.classList?.contains("rte-datepicker-host") || k.querySelector?.(".rte-datepicker-host")) && (w = !0);
|
|
2206
2225
|
}
|
|
2207
|
-
}), $.removedNodes.forEach((
|
|
2208
|
-
if (
|
|
2209
|
-
const
|
|
2210
|
-
(
|
|
2226
|
+
}), $.removedNodes.forEach((C) => {
|
|
2227
|
+
if (C.nodeType === Node.ELEMENT_NODE) {
|
|
2228
|
+
const k = C;
|
|
2229
|
+
(k.classList?.contains("rte-datepicker-host") || k.querySelector?.(".rte-datepicker-host")) && (w = !0);
|
|
2211
2230
|
}
|
|
2212
|
-
}),
|
|
2231
|
+
}), w) {
|
|
2213
2232
|
A = !0;
|
|
2214
2233
|
break;
|
|
2215
2234
|
}
|
|
2216
2235
|
}
|
|
2217
2236
|
A && b();
|
|
2218
2237
|
});
|
|
2219
|
-
return
|
|
2238
|
+
return q.observe(o, { childList: !0, subtree: !0 }), () => q.disconnect();
|
|
2220
2239
|
}, [t]), y;
|
|
2221
2240
|
}, _r = ({
|
|
2222
2241
|
config: t,
|
|
@@ -2224,53 +2243,53 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2224
2243
|
isProcessing: i = !1,
|
|
2225
2244
|
disabled: o = !1,
|
|
2226
2245
|
width: b,
|
|
2227
|
-
lockStructure:
|
|
2228
|
-
agentOptions:
|
|
2246
|
+
lockStructure: q = !1,
|
|
2247
|
+
agentOptions: M = [],
|
|
2229
2248
|
onAgentSelect: A,
|
|
2230
2249
|
onAgentExit: $,
|
|
2231
|
-
loading:
|
|
2232
|
-
placeholder:
|
|
2233
|
-
border:
|
|
2234
|
-
background:
|
|
2235
|
-
hideButtons:
|
|
2250
|
+
loading: w = !1,
|
|
2251
|
+
placeholder: C,
|
|
2252
|
+
border: k,
|
|
2253
|
+
background: H = "transparent",
|
|
2254
|
+
hideButtons: E,
|
|
2236
2255
|
maxHeight: e,
|
|
2237
2256
|
minHeight: n,
|
|
2238
2257
|
className: a = "",
|
|
2239
2258
|
onEditorAreaClick: u,
|
|
2240
2259
|
autoCollapseOnScroll: d,
|
|
2241
2260
|
scrollContainerRef: D,
|
|
2242
|
-
scrollCollapseMode:
|
|
2261
|
+
scrollCollapseMode: T = "default",
|
|
2243
2262
|
atBottomOffset: F = 10,
|
|
2244
2263
|
atBottomExitOffset: Y,
|
|
2245
2264
|
collapseOnScrollAtBottom: z = !1,
|
|
2246
2265
|
scrollEndDebounceMs: O = 120,
|
|
2247
2266
|
collapseTransitionMs: _ = 0,
|
|
2248
2267
|
lockDuringCollapseTransition: G = !0,
|
|
2249
|
-
collapseAutoToggleThrottleMs:
|
|
2268
|
+
collapseAutoToggleThrottleMs: I = 0,
|
|
2250
2269
|
collapsedTotalHeight: V = 132,
|
|
2251
|
-
clickOverrideAutoCollapseMs:
|
|
2270
|
+
clickOverrideAutoCollapseMs: J = 360,
|
|
2252
2271
|
toggleOnBlankClick: f,
|
|
2253
2272
|
scrollThrottleMs: c,
|
|
2254
2273
|
collapsed: v,
|
|
2255
|
-
defaultCollapsed:
|
|
2274
|
+
defaultCollapsed: P,
|
|
2256
2275
|
onCollapsedChange: B,
|
|
2257
2276
|
onExpandedHeightChange: j,
|
|
2258
|
-
reportAnalyze:
|
|
2277
|
+
reportAnalyze: K,
|
|
2259
2278
|
nodeDefaults: ae
|
|
2260
2279
|
}) => {
|
|
2261
|
-
const [pe, he] = Bn.useMessage(), ye = te(null), ge = te(null), R = te(null),
|
|
2262
|
-
}), Fe = te({}), rt = te({}), at = te(null), [un, ot] = ie(!0), $t = te(null), [
|
|
2263
|
-
|
|
2264
|
-
), [
|
|
2265
|
-
|
|
2266
|
-
}, []),
|
|
2280
|
+
const [pe, he] = Bn.useMessage(), ye = te(null), ge = te(null), R = te(null), W = te(null), [se, xe] = ie({}), [ke, Ce] = ie(null), [Me, Ne] = ie(null), [ve, Ue] = ie(null), Ht = te({}), Re = te(!1), Oe = te(null), [Pt, Ge] = ie(!1), [tt, nt] = ie({}), kt = te(() => {
|
|
2281
|
+
}), Fe = te({}), rt = te({}), at = te(null), [un, ot] = ie(!0), $t = te(null), [lt, dn] = ie(0), st = typeof v == "boolean", [it, pn] = ie(
|
|
2282
|
+
P ?? !1
|
|
2283
|
+
), [We, fn] = ie(!1), Ke = te(!1), Vt = te(it), Rt = te(window), Et = te(null), ct = te(!1), [mn, Ot] = ie(!1), Ct = te(null), ut = te(null), dt = te(null), Be = te(0), _e = te(null), Tt = te(0), Xe = te(0), ze = te(null), pt = te(null), Gt = ue(() => {
|
|
2284
|
+
Tt.current = 0;
|
|
2285
|
+
}, []), St = ue(() => {
|
|
2267
2286
|
ze.current != null && (window.clearTimeout(ze.current), ze.current = null);
|
|
2268
2287
|
}, []), Je = ue(
|
|
2269
|
-
(r,
|
|
2270
|
-
if ((
|
|
2288
|
+
(r, l, s = !1) => {
|
|
2289
|
+
if ((st ? v : Vt.current) === r) return;
|
|
2271
2290
|
const m = G && typeof _ == "number" && _ > 0;
|
|
2272
|
-
if (!
|
|
2273
|
-
Ct.current = { next: r, reason:
|
|
2291
|
+
if (!s && m && ct.current) {
|
|
2292
|
+
Ct.current = { next: r, reason: l };
|
|
2274
2293
|
return;
|
|
2275
2294
|
}
|
|
2276
2295
|
m && (ct.current = !0, Ot(!0), ut.current && window.clearTimeout(ut.current), ut.current = window.setTimeout(() => {
|
|
@@ -2281,10 +2300,10 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2281
2300
|
dt.current?.();
|
|
2282
2301
|
} catch {
|
|
2283
2302
|
}
|
|
2284
|
-
}, _)),
|
|
2303
|
+
}, _)), st || pn(r), B?.(r, l);
|
|
2285
2304
|
},
|
|
2286
2305
|
[
|
|
2287
|
-
|
|
2306
|
+
st,
|
|
2288
2307
|
v,
|
|
2289
2308
|
G,
|
|
2290
2309
|
_,
|
|
@@ -2294,28 +2313,28 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2294
2313
|
me(() => {
|
|
2295
2314
|
Vt.current = it;
|
|
2296
2315
|
}, [it]), me(() => {
|
|
2297
|
-
Ke.current =
|
|
2298
|
-
}, [
|
|
2316
|
+
Ke.current = We;
|
|
2317
|
+
}, [We]), je(() => {
|
|
2299
2318
|
const r = $t.current;
|
|
2300
2319
|
if (!r) return;
|
|
2301
|
-
const
|
|
2320
|
+
const l = () => {
|
|
2302
2321
|
const x = Math.ceil(r.getBoundingClientRect().height || 0);
|
|
2303
2322
|
dn((m) => m === x ? m : x);
|
|
2304
2323
|
};
|
|
2305
|
-
if (
|
|
2306
|
-
const
|
|
2307
|
-
return
|
|
2324
|
+
if (l(), typeof ResizeObserver > "u") return;
|
|
2325
|
+
const s = new ResizeObserver(() => l());
|
|
2326
|
+
return s.observe(r), () => s.disconnect();
|
|
2308
2327
|
}, []), me(() => {
|
|
2309
2328
|
if (!d) return;
|
|
2310
|
-
const r = D?.current ?? null,
|
|
2329
|
+
const r = D?.current ?? null, s = ((ee) => {
|
|
2311
2330
|
let ce = ee;
|
|
2312
2331
|
for (; ce && ce !== document.body; ) {
|
|
2313
|
-
const we = window.getComputedStyle(ce), be = we.overflowY, qe = we.overflowX, $e = (be === "auto" || be === "scroll") && ce.scrollHeight > ce.clientHeight + 1,
|
|
2314
|
-
if ($e ||
|
|
2332
|
+
const we = window.getComputedStyle(ce), be = we.overflowY, qe = we.overflowX, $e = (be === "auto" || be === "scroll") && ce.scrollHeight > ce.clientHeight + 1, Te = (qe === "auto" || qe === "scroll") && ce.scrollWidth > ce.clientWidth + 1;
|
|
2333
|
+
if ($e || Te) return ce;
|
|
2315
2334
|
ce = ce.parentElement;
|
|
2316
2335
|
}
|
|
2317
2336
|
return null;
|
|
2318
|
-
})(ye.current?.parentElement ?? null), x =
|
|
2337
|
+
})(ye.current?.parentElement ?? null), x = T === "approach-input" ? r ?? window : r ?? s ?? window;
|
|
2319
2338
|
Rt.current = x;
|
|
2320
2339
|
const m = () => {
|
|
2321
2340
|
Gt();
|
|
@@ -2324,8 +2343,8 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2324
2343
|
ce && (x !== window ? x.contains(ce) && m() : ye.current?.contains(ce) && m());
|
|
2325
2344
|
};
|
|
2326
2345
|
window.addEventListener("wheel", m, { passive: !0 }), window.addEventListener("touchmove", m, { passive: !0 }), window.addEventListener("pointerdown", S, { passive: !0 });
|
|
2327
|
-
let g = 0, h = 0,
|
|
2328
|
-
const
|
|
2346
|
+
let g = 0, h = 0, N = null, p = -1, ne = "none", Q = -1;
|
|
2347
|
+
const U = () => {
|
|
2329
2348
|
if (x === window) {
|
|
2330
2349
|
const ce = document.documentElement;
|
|
2331
2350
|
return {
|
|
@@ -2348,7 +2367,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2348
2367
|
const ee = x;
|
|
2349
2368
|
ee.scrollTop = Math.max(0, ee.scrollHeight - ee.clientHeight);
|
|
2350
2369
|
}
|
|
2351
|
-
},
|
|
2370
|
+
}, X = () => {
|
|
2352
2371
|
const ee = F, ce = Math.max(
|
|
2353
2372
|
ee + 1,
|
|
2354
2373
|
typeof Y == "number" ? Y : ee + 16
|
|
@@ -2356,26 +2375,26 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2356
2375
|
if (Date.now() < Be.current) return !0;
|
|
2357
2376
|
if (x === window) {
|
|
2358
2377
|
const $e = document.documentElement;
|
|
2359
|
-
if ($e.scrollHeight <= $e.clientHeight + F) return !
|
|
2360
|
-
const
|
|
2361
|
-
return we ?
|
|
2378
|
+
if ($e.scrollHeight <= $e.clientHeight + F) return !0;
|
|
2379
|
+
const Te = $e.scrollHeight - $e.scrollTop - $e.clientHeight;
|
|
2380
|
+
return we ? Te <= ce : Te <= ee;
|
|
2362
2381
|
}
|
|
2363
2382
|
const be = x;
|
|
2364
|
-
if (be.scrollHeight <= be.clientHeight + F) return !
|
|
2383
|
+
if (be.scrollHeight <= be.clientHeight + F) return !0;
|
|
2365
2384
|
const qe = be.scrollHeight - be.scrollTop - be.clientHeight;
|
|
2366
2385
|
return we ? qe <= ce : qe <= ee;
|
|
2367
|
-
},
|
|
2386
|
+
}, le = (ee) => {
|
|
2368
2387
|
Be.current = Math.max(Be.current, Date.now() + ee);
|
|
2369
2388
|
const ce = () => {
|
|
2370
2389
|
_e.current = null, !(Date.now() >= Be.current) && (Z(), _e.current = window.requestAnimationFrame(ce));
|
|
2371
2390
|
};
|
|
2372
2391
|
_e.current == null && (Z(), _e.current = window.requestAnimationFrame(ce));
|
|
2373
|
-
},
|
|
2392
|
+
}, oe = () => {
|
|
2374
2393
|
Be.current = 0, _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null);
|
|
2375
2394
|
}, re = (ee, ce) => {
|
|
2376
|
-
if (typeof
|
|
2395
|
+
if (typeof J == "number" && J > 0 && Date.now() < Tt.current)
|
|
2377
2396
|
return;
|
|
2378
|
-
const we = typeof
|
|
2397
|
+
const we = typeof I == "number" ? I : 0;
|
|
2379
2398
|
if (we > 0) {
|
|
2380
2399
|
const be = Date.now();
|
|
2381
2400
|
if (be < Xe.current) {
|
|
@@ -2389,7 +2408,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2389
2408
|
}
|
|
2390
2409
|
return;
|
|
2391
2410
|
}
|
|
2392
|
-
Xe.current = be + we,
|
|
2411
|
+
Xe.current = be + we, St();
|
|
2393
2412
|
}
|
|
2394
2413
|
Je(ee, ce);
|
|
2395
2414
|
}, fe = (ee = !1) => {
|
|
@@ -2398,17 +2417,17 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2398
2417
|
if (be - h < c) return;
|
|
2399
2418
|
h = be;
|
|
2400
2419
|
}
|
|
2401
|
-
const ce = Ke.current, we =
|
|
2402
|
-
if (Ke.current = we, fn((be) => be === we ? be : we),
|
|
2403
|
-
const { scrollTop: be, scrollHeight: qe, clientHeight: $e } =
|
|
2404
|
-
if (
|
|
2420
|
+
const ce = Ke.current, we = X();
|
|
2421
|
+
if (Ke.current = we, fn((be) => be === we ? be : we), T === "approach-input" && x !== window) {
|
|
2422
|
+
const { scrollTop: be, scrollHeight: qe, clientHeight: $e } = U(), Te = qe - be - $e, Ze = Q >= 0 && Te < Q - 2;
|
|
2423
|
+
if (Q = Te, ee) {
|
|
2405
2424
|
we ? re(!1, "bottom") : re(!0, "scroll");
|
|
2406
2425
|
return;
|
|
2407
2426
|
}
|
|
2408
2427
|
if (we) {
|
|
2409
|
-
if (re(!1, "bottom"),
|
|
2428
|
+
if (re(!1, "bottom"), ne !== "up" && !ce) {
|
|
2410
2429
|
const Qt = Math.max(200, Le + 80);
|
|
2411
|
-
|
|
2430
|
+
le(Qt);
|
|
2412
2431
|
}
|
|
2413
2432
|
return;
|
|
2414
2433
|
}
|
|
@@ -2416,38 +2435,38 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2416
2435
|
return;
|
|
2417
2436
|
}
|
|
2418
2437
|
if (we) {
|
|
2419
|
-
if (!(z &&
|
|
2438
|
+
if (!(z && ne === "up") && (re(!1, "bottom"), ne !== "up" && !ce)) {
|
|
2420
2439
|
const be = Math.max(200, Le + 80);
|
|
2421
|
-
|
|
2440
|
+
le(be);
|
|
2422
2441
|
}
|
|
2423
2442
|
return;
|
|
2424
2443
|
}
|
|
2425
|
-
Be.current &&
|
|
2444
|
+
Be.current && oe(), re(!0, "scroll");
|
|
2426
2445
|
};
|
|
2427
2446
|
dt.current = () => fe(!0);
|
|
2428
2447
|
const Ee = () => {
|
|
2429
2448
|
if (G && typeof _ == "number" && _ > 0 && ct.current) {
|
|
2430
|
-
const { scrollTop: ee } =
|
|
2431
|
-
p >= 0 && (ee > p ?
|
|
2449
|
+
const { scrollTop: ee } = U();
|
|
2450
|
+
p >= 0 && (ee > p ? ne = "down" : ee < p && (ne = "up")), p >= 0 && ee < p && oe(), p = ee;
|
|
2432
2451
|
return;
|
|
2433
2452
|
}
|
|
2434
2453
|
{
|
|
2435
|
-
const { scrollTop: ee } =
|
|
2436
|
-
p >= 0 && (ee > p ?
|
|
2454
|
+
const { scrollTop: ee } = U();
|
|
2455
|
+
p >= 0 && (ee > p ? ne = "down" : ee < p && (ne = "up")), p >= 0 && ee < p && oe(), z && p >= 0 && Ke.current && ee < p && (Et.current = ye.current?.getBoundingClientRect().height ?? null, re(!0, "scroll")), p = ee;
|
|
2437
2456
|
}
|
|
2438
2457
|
g || (g = window.requestAnimationFrame(() => {
|
|
2439
2458
|
g = 0, fe();
|
|
2440
|
-
}), O && O > 0 && (
|
|
2459
|
+
}), O && O > 0 && (N && window.clearTimeout(N), N = window.setTimeout(() => {
|
|
2441
2460
|
fe(!0);
|
|
2442
2461
|
}, O)));
|
|
2443
2462
|
};
|
|
2444
|
-
x === window ? window.addEventListener("scroll", Ee, { passive: !0 }) : x.addEventListener("scroll", Ee, { passive: !0 }), p =
|
|
2463
|
+
x === window ? window.addEventListener("scroll", Ee, { passive: !0 }) : x.addEventListener("scroll", Ee, { passive: !0 }), p = U().scrollTop;
|
|
2445
2464
|
{
|
|
2446
|
-
const ee =
|
|
2447
|
-
|
|
2465
|
+
const ee = U();
|
|
2466
|
+
Q = ee.scrollHeight - ee.scrollTop - ee.clientHeight;
|
|
2448
2467
|
}
|
|
2449
2468
|
return fe(!0), () => {
|
|
2450
|
-
dt.current && (dt.current = null), _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null), Be.current = 0,
|
|
2469
|
+
dt.current && (dt.current = null), _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null), Be.current = 0, St(), Xe.current = 0, pt.current = null, window.removeEventListener("wheel", m), window.removeEventListener("touchmove", m), window.removeEventListener("pointerdown", S), x === window ? window.removeEventListener("scroll", Ee) : x.removeEventListener("scroll", Ee), N && window.clearTimeout(N), g && window.cancelAnimationFrame(g);
|
|
2451
2470
|
};
|
|
2452
2471
|
}, [
|
|
2453
2472
|
d,
|
|
@@ -2459,59 +2478,59 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2459
2478
|
O,
|
|
2460
2479
|
Je,
|
|
2461
2480
|
Gt,
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2481
|
+
J,
|
|
2482
|
+
I,
|
|
2483
|
+
St
|
|
2465
2484
|
]);
|
|
2466
2485
|
const [He, Ie] = ie(() => {
|
|
2467
2486
|
const r = {};
|
|
2468
|
-
return t.forEach((
|
|
2469
|
-
|
|
2487
|
+
return t.forEach((l) => {
|
|
2488
|
+
l.type === "multi-variable" && l.key && (r[l.key] = 1);
|
|
2470
2489
|
}), r;
|
|
2471
2490
|
}), Nt = te({}), Ft = te({}), zt = te({});
|
|
2472
2491
|
me(() => {
|
|
2473
|
-
Ft.current =
|
|
2474
|
-
}, [
|
|
2492
|
+
Ft.current = se;
|
|
2493
|
+
}, [se]), me(() => {
|
|
2475
2494
|
zt.current = He;
|
|
2476
2495
|
}, [He]);
|
|
2477
|
-
const Qe = ue((r) => r.find((
|
|
2496
|
+
const Qe = ue((r) => r.find((s) => s.type === "tag")?.text || null, []), Yt = te(t), Pe = te(null);
|
|
2478
2497
|
me(() => {
|
|
2479
|
-
const r = Qe(Yt.current),
|
|
2480
|
-
if (r && r !==
|
|
2481
|
-
const
|
|
2498
|
+
const r = Qe(Yt.current), l = Qe(t);
|
|
2499
|
+
if (r && r !== l && R.current) {
|
|
2500
|
+
const s = {};
|
|
2482
2501
|
R.current.querySelectorAll('[data-type="variable"]').forEach((g) => {
|
|
2483
2502
|
const h = g.dataset.key;
|
|
2484
2503
|
if (h) {
|
|
2485
|
-
const
|
|
2486
|
-
|
|
2504
|
+
const N = g.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2505
|
+
N && (s[h] = N);
|
|
2487
2506
|
}
|
|
2488
2507
|
}), R.current.querySelectorAll('[data-type="select"]').forEach((g) => {
|
|
2489
2508
|
const h = g.dataset.key;
|
|
2490
2509
|
if (h) {
|
|
2491
|
-
const
|
|
2492
|
-
|
|
2510
|
+
const N = (g.getAttribute("data-value") || "").trim();
|
|
2511
|
+
N && (s[h] = N);
|
|
2493
2512
|
}
|
|
2494
2513
|
}), R.current.querySelectorAll('[data-type="textarea"]').forEach((g) => {
|
|
2495
2514
|
const h = g.dataset.key;
|
|
2496
2515
|
if (h) {
|
|
2497
|
-
const
|
|
2498
|
-
|
|
2516
|
+
const N = g.value.replace(/[\u200B]/g, "").trim();
|
|
2517
|
+
N && (s[h] = N);
|
|
2499
2518
|
}
|
|
2500
2519
|
}), Nt.current[r] = {
|
|
2501
|
-
variableValues:
|
|
2520
|
+
variableValues: s,
|
|
2502
2521
|
files: { ...Ft.current },
|
|
2503
2522
|
multiVariableCounts: { ...zt.current }
|
|
2504
2523
|
};
|
|
2505
2524
|
}
|
|
2506
|
-
if (
|
|
2507
|
-
const
|
|
2508
|
-
Pe.current =
|
|
2509
|
-
} else if (
|
|
2525
|
+
if (l && Nt.current[l]) {
|
|
2526
|
+
const s = Nt.current[l];
|
|
2527
|
+
Pe.current = s, xe(s.files), Ie(s.multiVariableCounts);
|
|
2528
|
+
} else if (l) {
|
|
2510
2529
|
Pe.current = null;
|
|
2511
|
-
const
|
|
2530
|
+
const s = {};
|
|
2512
2531
|
t.forEach((x) => {
|
|
2513
|
-
x.type === "multi-variable" && x.key && (
|
|
2514
|
-
}), Ie(
|
|
2532
|
+
x.type === "multi-variable" && x.key && (s[x.key] = 1);
|
|
2533
|
+
}), Ie(s), xe({});
|
|
2515
2534
|
} else
|
|
2516
2535
|
Pe.current = null, Ie({}), xe({});
|
|
2517
2536
|
Yt.current = t;
|
|
@@ -2520,12 +2539,12 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2520
2539
|
Pe.current && (Pe.current = null);
|
|
2521
2540
|
}, 0));
|
|
2522
2541
|
});
|
|
2523
|
-
const
|
|
2542
|
+
const Se = Mt(() => {
|
|
2524
2543
|
if (!t || t.length === 0) return t;
|
|
2525
|
-
const r = [],
|
|
2526
|
-
for (const
|
|
2527
|
-
if (r.push(
|
|
2528
|
-
const x = tt[
|
|
2544
|
+
const r = [], l = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2545
|
+
for (const s of t) {
|
|
2546
|
+
if (r.push(s), s.type !== "report-url" || !s.key) continue;
|
|
2547
|
+
const x = tt[s.key], m = x?.status ?? "idle", S = x?.modules ?? [];
|
|
2529
2548
|
m === "loading" && r.push({
|
|
2530
2549
|
type: "text",
|
|
2531
2550
|
className: "rte-report-parsing",
|
|
@@ -2534,12 +2553,12 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2534
2553
|
}), m === "error" && x?.error && r.push({
|
|
2535
2554
|
type: "text",
|
|
2536
2555
|
className: "rte-report-error",
|
|
2537
|
-
text: `解析失败:${
|
|
2556
|
+
text: `解析失败:${l(x.error)}
|
|
2538
2557
|
`
|
|
2539
2558
|
}), S.length > 0 && (S.forEach((g, h) => {
|
|
2540
2559
|
r.push({
|
|
2541
2560
|
type: "report-module",
|
|
2542
|
-
key: `${
|
|
2561
|
+
key: `${s.key}__module_${h}`,
|
|
2543
2562
|
placeholder: "可编辑,内容不能为空",
|
|
2544
2563
|
required: !0,
|
|
2545
2564
|
minHeight: 80,
|
|
@@ -2554,85 +2573,85 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2554
2573
|
je(() => {
|
|
2555
2574
|
if (!j) return;
|
|
2556
2575
|
const r = window.requestAnimationFrame(() => {
|
|
2557
|
-
const
|
|
2558
|
-
if (!
|
|
2559
|
-
const
|
|
2576
|
+
const l = ge.current;
|
|
2577
|
+
if (!l) return;
|
|
2578
|
+
const s = $t.current?.getBoundingClientRect().height ?? lt, x = l.scrollHeight, m = Math.max(0, Math.ceil(x + s)), S = Qe(t), g = S ?? "__default__";
|
|
2560
2579
|
Ht.current[g] !== m && (Ht.current[g] = m, j(m, S));
|
|
2561
2580
|
});
|
|
2562
2581
|
return () => window.cancelAnimationFrame(r);
|
|
2563
2582
|
}, [
|
|
2564
2583
|
j,
|
|
2565
|
-
|
|
2566
|
-
|
|
2584
|
+
lt,
|
|
2585
|
+
Se,
|
|
2567
2586
|
Qe,
|
|
2568
2587
|
t
|
|
2569
2588
|
]), ur(
|
|
2570
2589
|
R,
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2590
|
+
Se,
|
|
2591
|
+
se,
|
|
2592
|
+
q,
|
|
2574
2593
|
He,
|
|
2575
2594
|
at,
|
|
2576
2595
|
void 0,
|
|
2577
|
-
|
|
2596
|
+
E,
|
|
2578
2597
|
ae
|
|
2579
|
-
), dr(R,
|
|
2598
|
+
), dr(R, Se, se, Ue), pr(R, Se, Ue, E), mr(R, Se, se, Ue), fr(R, Se, Ue), yr(R, Se, se, Ge), hr(R, Re);
|
|
2580
2599
|
const hn = ir(R), gn = Ar(R), qt = ue((r) => {
|
|
2581
|
-
const
|
|
2582
|
-
if (!
|
|
2583
|
-
let
|
|
2600
|
+
const l = r.trim();
|
|
2601
|
+
if (!l) return { url: "" };
|
|
2602
|
+
let s = null;
|
|
2584
2603
|
try {
|
|
2585
|
-
|
|
2604
|
+
s = new URL(l);
|
|
2586
2605
|
} catch {
|
|
2587
2606
|
try {
|
|
2588
|
-
|
|
2607
|
+
s = new URL(`https://${l}`);
|
|
2589
2608
|
} catch {
|
|
2590
|
-
return { url:
|
|
2609
|
+
return { url: l };
|
|
2591
2610
|
}
|
|
2592
2611
|
}
|
|
2593
|
-
const x =
|
|
2594
|
-
return { url:
|
|
2612
|
+
const x = s.pathname.split("/").filter(Boolean), m = x.findIndex((N) => N === "report"), S = m >= 0 ? x[m + 1] : void 0, g = x[0] && x[0].length <= 5 ? x[0] : void 0, h = s.searchParams.get("agentId") || void 0;
|
|
2613
|
+
return { url: l, reportId: S, agentId: h, lang: g };
|
|
2595
2614
|
}, []), jt = ue(() => {
|
|
2596
2615
|
const r = {};
|
|
2597
2616
|
if (!R.current) return r;
|
|
2598
|
-
const
|
|
2599
|
-
return
|
|
2600
|
-
const
|
|
2601
|
-
if (!
|
|
2617
|
+
const l = R.current;
|
|
2618
|
+
return l.querySelectorAll('[data-type="variable"]').forEach((h) => {
|
|
2619
|
+
const N = h.dataset.key;
|
|
2620
|
+
if (!N) return;
|
|
2602
2621
|
const p = h.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2603
|
-
p && (r[
|
|
2604
|
-
}),
|
|
2605
|
-
const
|
|
2606
|
-
if (!
|
|
2622
|
+
p && (r[N] = p);
|
|
2623
|
+
}), l.querySelectorAll('[data-type="select"]').forEach((h) => {
|
|
2624
|
+
const N = h.dataset.key;
|
|
2625
|
+
if (!N) return;
|
|
2607
2626
|
const p = (h.getAttribute("data-value") || "").trim();
|
|
2608
|
-
p && (r[
|
|
2609
|
-
}),
|
|
2610
|
-
const
|
|
2611
|
-
if (!
|
|
2627
|
+
p && (r[N] = p);
|
|
2628
|
+
}), l.querySelectorAll('[data-type="textarea"]').forEach((h) => {
|
|
2629
|
+
const N = h.dataset.key;
|
|
2630
|
+
if (!N) return;
|
|
2612
2631
|
const p = h.value.replace(/[\u200B]/g, "").trim();
|
|
2613
|
-
p && (r[
|
|
2614
|
-
}),
|
|
2615
|
-
const
|
|
2616
|
-
if (!
|
|
2632
|
+
p && (r[N] = p);
|
|
2633
|
+
}), l.querySelectorAll('[data-type="richtext"]').forEach((h) => {
|
|
2634
|
+
const N = h.dataset.key;
|
|
2635
|
+
if (!N) return;
|
|
2617
2636
|
const p = (h.textContent || "").replace(/[\u200B]/g, "").trim();
|
|
2618
|
-
p && (r[
|
|
2619
|
-
}),
|
|
2620
|
-
const
|
|
2621
|
-
if (!
|
|
2637
|
+
p && (r[N] = p);
|
|
2638
|
+
}), l.querySelectorAll('[data-type="datepicker"]').forEach((h) => {
|
|
2639
|
+
const N = h.dataset.key;
|
|
2640
|
+
if (!N) return;
|
|
2622
2641
|
const p = (h.getAttribute("data-value") || "").trim();
|
|
2623
|
-
p && (r[
|
|
2642
|
+
p && (r[N] = p);
|
|
2624
2643
|
}), r;
|
|
2625
|
-
}, []),
|
|
2626
|
-
(r) => (r?.modules || []).map((
|
|
2627
|
-
const m = (
|
|
2644
|
+
}, []), Ut = ue(
|
|
2645
|
+
(r) => (r?.modules || []).map((s, x) => {
|
|
2646
|
+
const m = (s?.title || `模块${x + 1}`).trim() || `模块${x + 1}`, S = (s?.content || "").trim(), g = S.length > 0 ? S : `请补充:${m}`;
|
|
2628
2647
|
return { title: m, content: g };
|
|
2629
2648
|
}),
|
|
2630
2649
|
[]
|
|
2631
|
-
),
|
|
2632
|
-
(r,
|
|
2633
|
-
const
|
|
2650
|
+
), Wt = ue(
|
|
2651
|
+
(r, l) => {
|
|
2652
|
+
const s = (l || "").trim();
|
|
2634
2653
|
if (!r) return;
|
|
2635
|
-
if (!
|
|
2654
|
+
if (!s) {
|
|
2636
2655
|
nt((g) => ({
|
|
2637
2656
|
...g,
|
|
2638
2657
|
[r]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
|
|
@@ -2642,29 +2661,29 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2642
2661
|
try {
|
|
2643
2662
|
const g = window.getSelection();
|
|
2644
2663
|
if (g && g.rangeCount > 0) {
|
|
2645
|
-
const h = g.getRangeAt(0),
|
|
2664
|
+
const h = g.getRangeAt(0), N = h.startContainer, p = N.nodeType === Node.ELEMENT_NODE ? N.closest(`[data-type="variable"][data-key="${r}"]`) : N.parentElement?.closest(`[data-type="variable"][data-key="${r}"]`);
|
|
2646
2665
|
if (p && R.current?.contains(p)) {
|
|
2647
|
-
const
|
|
2648
|
-
|
|
2649
|
-
const
|
|
2650
|
-
at.current = { key: r, offset:
|
|
2666
|
+
const ne = document.createRange();
|
|
2667
|
+
ne.setStartBefore(p), ne.setEnd(h.startContainer, h.startOffset);
|
|
2668
|
+
const Q = ne.toString().length;
|
|
2669
|
+
at.current = { key: r, offset: Q };
|
|
2651
2670
|
}
|
|
2652
2671
|
}
|
|
2653
2672
|
} catch {
|
|
2654
2673
|
}
|
|
2655
2674
|
const x = tt[r];
|
|
2656
|
-
if (x?.lastParsedUrl && x.lastParsedUrl ===
|
|
2675
|
+
if (x?.lastParsedUrl && x.lastParsedUrl === s && x.status === "loading") return;
|
|
2657
2676
|
nt((g) => ({
|
|
2658
2677
|
...g,
|
|
2659
2678
|
[r]: {
|
|
2660
2679
|
...g[r] || { modules: [] },
|
|
2661
2680
|
status: "loading",
|
|
2662
2681
|
error: void 0,
|
|
2663
|
-
lastParsedUrl:
|
|
2682
|
+
lastParsedUrl: s
|
|
2664
2683
|
}
|
|
2665
2684
|
}));
|
|
2666
|
-
const m = qt(
|
|
2667
|
-
(
|
|
2685
|
+
const m = qt(s);
|
|
2686
|
+
(K || (async (g) => ({
|
|
2668
2687
|
modules: [
|
|
2669
2688
|
{
|
|
2670
2689
|
title: "第1张:人群+场景直击图",
|
|
@@ -2677,40 +2696,40 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2677
2696
|
}
|
|
2678
2697
|
]
|
|
2679
2698
|
})))(m).then((g) => {
|
|
2680
|
-
const h =
|
|
2699
|
+
const h = Ut(g);
|
|
2681
2700
|
if (R.current) {
|
|
2682
|
-
const
|
|
2683
|
-
h.forEach((p,
|
|
2684
|
-
|
|
2685
|
-
}), R.current.__tempVariableValues =
|
|
2701
|
+
const N = jt();
|
|
2702
|
+
h.forEach((p, ne) => {
|
|
2703
|
+
N[`${r}__module_${ne}`] = p.content;
|
|
2704
|
+
}), R.current.__tempVariableValues = N;
|
|
2686
2705
|
}
|
|
2687
|
-
nt((
|
|
2688
|
-
...
|
|
2689
|
-
[r]: { status: "success", error: void 0, lastParsedUrl:
|
|
2706
|
+
nt((N) => ({
|
|
2707
|
+
...N,
|
|
2708
|
+
[r]: { status: "success", error: void 0, lastParsedUrl: s, modules: h }
|
|
2690
2709
|
}));
|
|
2691
2710
|
}).catch((g) => {
|
|
2692
2711
|
const h = g instanceof Error ? g.message : String(g);
|
|
2693
|
-
nt((
|
|
2694
|
-
...
|
|
2712
|
+
nt((N) => ({
|
|
2713
|
+
...N,
|
|
2695
2714
|
[r]: {
|
|
2696
|
-
...
|
|
2715
|
+
...N[r] || { modules: [] },
|
|
2697
2716
|
status: "error",
|
|
2698
2717
|
error: h || "解析失败",
|
|
2699
|
-
lastParsedUrl:
|
|
2718
|
+
lastParsedUrl: s,
|
|
2700
2719
|
modules: []
|
|
2701
2720
|
}
|
|
2702
2721
|
}));
|
|
2703
2722
|
});
|
|
2704
2723
|
},
|
|
2705
|
-
[jt,
|
|
2724
|
+
[jt, Ut, qt, K, tt]
|
|
2706
2725
|
);
|
|
2707
2726
|
me(() => {
|
|
2708
|
-
kt.current =
|
|
2709
|
-
}, [
|
|
2727
|
+
kt.current = Wt;
|
|
2728
|
+
}, [Wt]), me(() => () => {
|
|
2710
2729
|
const r = Fe.current;
|
|
2711
|
-
Object.keys(r).forEach((
|
|
2730
|
+
Object.keys(r).forEach((l) => window.clearTimeout(r[l])), Fe.current = {}, rt.current = {};
|
|
2712
2731
|
}, []), me(() => {
|
|
2713
|
-
if (
|
|
2732
|
+
if (Se.length > 0) {
|
|
2714
2733
|
ot(!1);
|
|
2715
2734
|
return;
|
|
2716
2735
|
}
|
|
@@ -2719,74 +2738,74 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2719
2738
|
ot(!0);
|
|
2720
2739
|
return;
|
|
2721
2740
|
}
|
|
2722
|
-
const
|
|
2741
|
+
const s = R.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", x = R.current.querySelectorAll('[data-type="variable"]'), m = R.current.querySelectorAll('[data-type="upload"]');
|
|
2723
2742
|
let S = !1;
|
|
2724
2743
|
x.forEach((h) => {
|
|
2725
2744
|
(h.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (S = !0);
|
|
2726
2745
|
}), m.forEach((h) => {
|
|
2727
2746
|
h.querySelector(".upload-inner-wrapper.has-file") && (S = !0);
|
|
2728
2747
|
});
|
|
2729
|
-
const g = !
|
|
2730
|
-
ot(g),
|
|
2748
|
+
const g = !s && !S;
|
|
2749
|
+
ot(g), Se.length === 0 && Ge(!g);
|
|
2731
2750
|
};
|
|
2732
2751
|
r();
|
|
2733
|
-
const
|
|
2734
|
-
return R.current &&
|
|
2752
|
+
const l = new MutationObserver(r);
|
|
2753
|
+
return R.current && l.observe(R.current, {
|
|
2735
2754
|
childList: !0,
|
|
2736
2755
|
subtree: !0,
|
|
2737
2756
|
characterData: !0
|
|
2738
2757
|
}), () => {
|
|
2739
|
-
|
|
2758
|
+
l.disconnect();
|
|
2740
2759
|
};
|
|
2741
|
-
}, [
|
|
2760
|
+
}, [Se]);
|
|
2742
2761
|
const bn = (r) => {
|
|
2743
2762
|
if (o) {
|
|
2744
2763
|
r.preventDefault();
|
|
2745
2764
|
return;
|
|
2746
2765
|
}
|
|
2747
2766
|
r.preventDefault();
|
|
2748
|
-
const
|
|
2749
|
-
if (
|
|
2750
|
-
const x =
|
|
2767
|
+
const l = r.clipboardData.getData("text/plain"), s = window.getSelection();
|
|
2768
|
+
if (s && s.rangeCount > 0) {
|
|
2769
|
+
const x = s.anchorNode;
|
|
2751
2770
|
if (x) {
|
|
2752
2771
|
let m = null;
|
|
2753
2772
|
if (x.nodeType === Node.ELEMENT_NODE ? m = x.closest('[data-type="variable"]') : x.nodeType === Node.TEXT_NODE && x.parentElement && (m = x.parentElement.closest('[data-type="variable"]')), m) {
|
|
2754
2773
|
const S = m.dataset.multiKey;
|
|
2755
2774
|
if (S) {
|
|
2756
|
-
const g = /[、,,\s\n\r\t]+/, h =
|
|
2757
|
-
if (console.log("[Paste Event] 粘贴的内容:",
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2775
|
+
const g = /[、,,\s\n\r\t]+/, h = l.split(g).map((N) => N.trim()).filter((N) => N.length > 0);
|
|
2776
|
+
if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", h), h.length > 1) {
|
|
2777
|
+
const N = parseInt(m.dataset.index || "0", 10), p = t.find((fe) => fe.type === "multi-variable" && fe.key === S)?.maxCount || 9, ne = He[S] || 1, Q = Math.min(N + h.length, p);
|
|
2778
|
+
Q > ne && Ie((re) => ({
|
|
2760
2779
|
...re,
|
|
2761
|
-
[S]:
|
|
2780
|
+
[S]: Q
|
|
2762
2781
|
}));
|
|
2763
|
-
const
|
|
2764
|
-
for (let re = 0; re <
|
|
2782
|
+
const U = [];
|
|
2783
|
+
for (let re = 0; re < ne; re++) {
|
|
2765
2784
|
const fe = `${S}_${re}`, Ee = R.current.querySelector(
|
|
2766
2785
|
`[data-type="variable"][data-key="${fe}"][data-multi-key="${S}"]`
|
|
2767
2786
|
);
|
|
2768
2787
|
if (Ee) {
|
|
2769
2788
|
const ee = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2770
|
-
|
|
2789
|
+
U.push(ee);
|
|
2771
2790
|
}
|
|
2772
2791
|
}
|
|
2773
|
-
|
|
2774
|
-
const Z =
|
|
2792
|
+
U.splice(N, 1, ...h.slice(0, p - N));
|
|
2793
|
+
const Z = U.slice(0, p);
|
|
2775
2794
|
Z.length > 0 && Z[Z.length - 1] !== "" && Z.length < p && Z.push("");
|
|
2776
|
-
const
|
|
2795
|
+
const X = Math.max(Z.length, 1), le = {};
|
|
2777
2796
|
Z.forEach((re, fe) => {
|
|
2778
|
-
re && (
|
|
2797
|
+
re && (le[`${S}_${fe}`] = re);
|
|
2779
2798
|
}), R.current.querySelectorAll(
|
|
2780
2799
|
'[data-type="variable"]'
|
|
2781
2800
|
).forEach((re) => {
|
|
2782
2801
|
const fe = re.dataset.key, Ee = re.dataset.multiKey;
|
|
2783
2802
|
if (fe && Ee !== S) {
|
|
2784
2803
|
const ee = re.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
2785
|
-
ee && (
|
|
2804
|
+
ee && (le[fe] = ee);
|
|
2786
2805
|
}
|
|
2787
|
-
}), R.current.__tempVariableValues =
|
|
2806
|
+
}), R.current.__tempVariableValues = le, Ie((re) => ({
|
|
2788
2807
|
...re,
|
|
2789
|
-
[S]:
|
|
2808
|
+
[S]: X
|
|
2790
2809
|
})), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", Z);
|
|
2791
2810
|
return;
|
|
2792
2811
|
} else h.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
|
|
@@ -2794,7 +2813,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2794
2813
|
}
|
|
2795
2814
|
}
|
|
2796
2815
|
}
|
|
2797
|
-
document.execCommand("insertText", !1,
|
|
2816
|
+
document.execCommand("insertText", !1, l), Xt(), setTimeout(() => {
|
|
2798
2817
|
const x = window.getSelection();
|
|
2799
2818
|
if (x && x.rangeCount > 0) {
|
|
2800
2819
|
const m = x.anchorNode;
|
|
@@ -2812,22 +2831,22 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2812
2831
|
r.target && (r.target.value = ""), Ce(null), Ne(null);
|
|
2813
2832
|
return;
|
|
2814
2833
|
}
|
|
2815
|
-
const
|
|
2834
|
+
const l = 10 * 1024 * 1024, s = (m) => m.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(m.name || ""), x = (m) => s(m) && m.size > l;
|
|
2816
2835
|
if (Me && r.target.files && r.target.files.length > 0) {
|
|
2817
|
-
const m = Me, S = t.find((p) => p.type === "upload" && p.key === m), g = Array.from(r.target.files), h = g.filter((p) => !x(p)),
|
|
2818
|
-
if (
|
|
2836
|
+
const m = Me, S = t.find((p) => p.type === "upload" && p.key === m), g = Array.from(r.target.files), h = g.filter((p) => !x(p)), N = g.length - h.length;
|
|
2837
|
+
if (N > 0 && pe.error(`已自动过滤 ${N} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), S && typeof S.maxCount == "number" && typeof S.minCount == "number") {
|
|
2819
2838
|
const p = S.maxCount;
|
|
2820
|
-
let
|
|
2821
|
-
xe((
|
|
2822
|
-
for (let
|
|
2823
|
-
const
|
|
2824
|
-
|
|
2839
|
+
let ne = 0;
|
|
2840
|
+
xe((Q) => {
|
|
2841
|
+
for (let le = 0; le < p; le++) {
|
|
2842
|
+
const oe = `${m}-${le}`;
|
|
2843
|
+
Q[oe] && (ne = le + 1);
|
|
2825
2844
|
}
|
|
2826
|
-
const
|
|
2827
|
-
return Z.forEach((
|
|
2828
|
-
const re = `${m}-${
|
|
2829
|
-
|
|
2830
|
-
}),
|
|
2845
|
+
const U = p - ne, Z = h.slice(0, U), X = { ...Q };
|
|
2846
|
+
return Z.forEach((le, oe) => {
|
|
2847
|
+
const re = `${m}-${ne + oe}`;
|
|
2848
|
+
X[re] = le;
|
|
2849
|
+
}), X;
|
|
2831
2850
|
});
|
|
2832
2851
|
}
|
|
2833
2852
|
} else if (ke && r.target.files[0]) {
|
|
@@ -2836,22 +2855,22 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2836
2855
|
}
|
|
2837
2856
|
r.target && (r.target.value = ""), Ce(null), Ne(null);
|
|
2838
2857
|
}, Kt = (r) => {
|
|
2839
|
-
xe((
|
|
2840
|
-
const
|
|
2841
|
-
return delete
|
|
2858
|
+
xe((l) => {
|
|
2859
|
+
const s = { ...l };
|
|
2860
|
+
return delete s[r], s;
|
|
2842
2861
|
});
|
|
2843
2862
|
}, xn = (r) => {
|
|
2844
|
-
const
|
|
2845
|
-
if (
|
|
2863
|
+
const l = r.target;
|
|
2864
|
+
if (l.closest(".rte-datepicker-wrapper") || l.closest(".rte-datepicker-host") || l.closest(".rte-select-wrapper") || l.closest(".rte-select-host") || l.closest(".ant-select-dropdown"))
|
|
2846
2865
|
return;
|
|
2847
|
-
if (
|
|
2848
|
-
if (r.preventDefault(), r.stopPropagation(),
|
|
2866
|
+
if (l.closest(".tag-close-btn")) {
|
|
2867
|
+
if (r.preventDefault(), r.stopPropagation(), q)
|
|
2849
2868
|
return;
|
|
2850
|
-
|
|
2869
|
+
Ue(null), $ ? $() : R.current && (R.current.innerHTML = "", R.current.focus());
|
|
2851
2870
|
return;
|
|
2852
2871
|
}
|
|
2853
|
-
if (
|
|
2854
|
-
const m =
|
|
2872
|
+
if (q) {
|
|
2873
|
+
const m = l.closest(".tag-node"), S = l.closest('[data-type="text"]');
|
|
2855
2874
|
if (m || S) {
|
|
2856
2875
|
r.preventDefault(), r.stopPropagation();
|
|
2857
2876
|
const g = window.getSelection();
|
|
@@ -2859,7 +2878,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2859
2878
|
return;
|
|
2860
2879
|
}
|
|
2861
2880
|
}
|
|
2862
|
-
|
|
2881
|
+
l.closest('[data-type="variable"]') || (Oe.current = { x: r.clientX, y: r.clientY }, Re.current = !1, l.closest(".file-remove-btn") && (r.preventDefault(), r.stopPropagation()));
|
|
2863
2882
|
}, wn = (r) => {
|
|
2864
2883
|
if (!r.target.closest('[data-type="variable"]') && Oe.current) {
|
|
2865
2884
|
const x = Math.abs(r.clientX - Oe.current.x), m = Math.abs(r.clientY - Oe.current.y);
|
|
@@ -2874,56 +2893,56 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2874
2893
|
}, $n = (r) => {
|
|
2875
2894
|
if (o)
|
|
2876
2895
|
return;
|
|
2877
|
-
const
|
|
2878
|
-
if (
|
|
2896
|
+
const l = r.target;
|
|
2897
|
+
if (l.closest('[data-type="datepicker"]'))
|
|
2879
2898
|
return;
|
|
2880
|
-
if (
|
|
2899
|
+
if (l.closest(".tag-close-btn")) {
|
|
2881
2900
|
r.preventDefault(), r.stopPropagation();
|
|
2882
2901
|
return;
|
|
2883
2902
|
}
|
|
2884
2903
|
if (t.length === 0)
|
|
2885
2904
|
return;
|
|
2886
|
-
if (
|
|
2905
|
+
if (l.closest('[data-type="text"]')) {
|
|
2887
2906
|
r.preventDefault(), r.stopPropagation();
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2907
|
+
const N = window.getSelection();
|
|
2908
|
+
N && N.removeAllRanges();
|
|
2890
2909
|
return;
|
|
2891
2910
|
}
|
|
2892
|
-
if (
|
|
2911
|
+
if (q && l.closest(".tag-node")) {
|
|
2893
2912
|
r.preventDefault(), r.stopPropagation();
|
|
2894
2913
|
const p = window.getSelection();
|
|
2895
2914
|
p && p.removeAllRanges();
|
|
2896
2915
|
return;
|
|
2897
2916
|
}
|
|
2898
|
-
if (
|
|
2917
|
+
if (l.closest('[data-type="variable"]')) {
|
|
2899
2918
|
if (Re.current)
|
|
2900
2919
|
return;
|
|
2901
2920
|
setTimeout(() => {
|
|
2902
|
-
const
|
|
2903
|
-
|
|
2921
|
+
const N = window.getSelection();
|
|
2922
|
+
N && !N.isCollapsed || At(R);
|
|
2904
2923
|
}, 10);
|
|
2905
2924
|
return;
|
|
2906
2925
|
}
|
|
2907
|
-
const g =
|
|
2926
|
+
const g = l.closest(".file-remove-btn");
|
|
2908
2927
|
if (g) {
|
|
2909
2928
|
r.preventDefault(), r.stopPropagation();
|
|
2910
|
-
const
|
|
2929
|
+
const N = g.closest('[data-type="upload"]'), p = N?.dataset.key, ne = N?.dataset.batchKey;
|
|
2911
2930
|
if (p)
|
|
2912
|
-
if (
|
|
2913
|
-
const
|
|
2914
|
-
if (
|
|
2915
|
-
const
|
|
2931
|
+
if (ne) {
|
|
2932
|
+
const Q = t.find((U) => U.type === "upload" && U.key === ne);
|
|
2933
|
+
if (Q && typeof Q.maxCount == "number" && typeof Q.minCount == "number") {
|
|
2934
|
+
const U = Q.maxCount;
|
|
2916
2935
|
xe((Z) => {
|
|
2917
|
-
const
|
|
2918
|
-
for (let
|
|
2919
|
-
const re = `${
|
|
2920
|
-
fe != null && re !== p &&
|
|
2936
|
+
const X = { ...Z }, le = [];
|
|
2937
|
+
for (let oe = 0; oe < U; oe++) {
|
|
2938
|
+
const re = `${ne}-${oe}`, fe = X[re];
|
|
2939
|
+
fe != null && re !== p && le.push(fe);
|
|
2921
2940
|
}
|
|
2922
|
-
for (let
|
|
2923
|
-
delete
|
|
2924
|
-
return
|
|
2925
|
-
|
|
2926
|
-
}),
|
|
2941
|
+
for (let oe = 0; oe < U; oe++)
|
|
2942
|
+
delete X[`${ne}-${oe}`];
|
|
2943
|
+
return le.forEach((oe, re) => {
|
|
2944
|
+
X[`${ne}-${re}`] = oe;
|
|
2945
|
+
}), X;
|
|
2927
2946
|
});
|
|
2928
2947
|
} else
|
|
2929
2948
|
Kt(p);
|
|
@@ -2931,59 +2950,65 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
2931
2950
|
Kt(p);
|
|
2932
2951
|
return;
|
|
2933
2952
|
}
|
|
2934
|
-
const h =
|
|
2953
|
+
const h = l.closest('[data-type="upload"]');
|
|
2935
2954
|
if (h) {
|
|
2936
|
-
const
|
|
2937
|
-
if (
|
|
2955
|
+
const N = h.dataset.key, p = h.dataset.batchKey;
|
|
2956
|
+
if (N) {
|
|
2957
|
+
const ne = p || N, Q = t.find((U) => U.type === "upload" && U.key === ne);
|
|
2958
|
+
if (W.current) {
|
|
2959
|
+
const U = (Q?.accept || "").trim();
|
|
2960
|
+
U ? W.current.accept = U : Q?.acceptType === "image" ? W.current.accept = "image/*" : Q?.acceptType === "file" ? W.current.accept = ".pdf,.doc,.docx,.xls,.xlsx,.csv,.ppt,.pptx,.txt,.zip,.rar,.7z" : W.current.accept = "";
|
|
2961
|
+
}
|
|
2938
2962
|
if (p) {
|
|
2939
|
-
const
|
|
2940
|
-
if (
|
|
2941
|
-
const
|
|
2942
|
-
if (
|
|
2943
|
-
|
|
2963
|
+
const U = t.find((Z) => Z.type === "upload" && Z.key === p);
|
|
2964
|
+
if (U && typeof U.maxCount == "number" && typeof U.minCount == "number") {
|
|
2965
|
+
const Z = U.maxCount;
|
|
2966
|
+
if (se[N] != null) {
|
|
2967
|
+
W.current && (W.current.multiple = !1), Ne(null), Ce(N), W.current?.click();
|
|
2944
2968
|
return;
|
|
2945
2969
|
}
|
|
2946
|
-
let
|
|
2947
|
-
for (let
|
|
2948
|
-
|
|
2949
|
-
|
|
2970
|
+
let le = 0;
|
|
2971
|
+
for (let oe = 0; oe < Z; oe++)
|
|
2972
|
+
se[`${p}-${oe}`] != null && (le += 1);
|
|
2973
|
+
le < Z && W.current ? (W.current.multiple = !0, Ne(p), Ce(null), W.current.click()) : (W.current && (W.current.multiple = !1), Ne(null), Ce(N), W.current?.click());
|
|
2950
2974
|
} else
|
|
2951
|
-
|
|
2975
|
+
W.current && (W.current.multiple = !1), Ne(null), Ce(N), W.current?.click();
|
|
2952
2976
|
} else
|
|
2953
|
-
|
|
2977
|
+
W.current && (W.current.multiple = !1), Ne(null), Ce(N), W.current?.click();
|
|
2978
|
+
}
|
|
2954
2979
|
return;
|
|
2955
2980
|
}
|
|
2956
2981
|
}, En = (r) => {
|
|
2957
|
-
const
|
|
2958
|
-
if (
|
|
2982
|
+
const s = r.target.closest('[data-type="variable"]');
|
|
2983
|
+
if (s) {
|
|
2959
2984
|
const x = window.getSelection();
|
|
2960
2985
|
if (x) {
|
|
2961
|
-
const m = document.createRange(), S =
|
|
2986
|
+
const m = document.createRange(), S = s.textContent || "";
|
|
2962
2987
|
if (S.replace(/\u200B/g, "")) {
|
|
2963
|
-
let h = 0,
|
|
2964
|
-
S.startsWith("") && (h = 1), S.endsWith("") && S.length > 1 && (
|
|
2965
|
-
const p =
|
|
2966
|
-
p && p.nodeType === Node.TEXT_NODE ? (m.setStart(p, h), m.setEnd(p,
|
|
2988
|
+
let h = 0, N = S.length;
|
|
2989
|
+
S.startsWith("") && (h = 1), S.endsWith("") && S.length > 1 && (N = S.length - 1);
|
|
2990
|
+
const p = s.firstChild;
|
|
2991
|
+
p && p.nodeType === Node.TEXT_NODE ? (m.setStart(p, h), m.setEnd(p, N)) : m.selectNodeContents(s);
|
|
2967
2992
|
} else
|
|
2968
|
-
m.selectNodeContents(
|
|
2993
|
+
m.selectNodeContents(s), m.collapse(!0);
|
|
2969
2994
|
x.removeAllRanges(), x.addRange(m);
|
|
2970
2995
|
}
|
|
2971
2996
|
}
|
|
2972
2997
|
}, Xt = () => {
|
|
2973
2998
|
if (t.length === 0) {
|
|
2974
2999
|
if (R.current) {
|
|
2975
|
-
const
|
|
2976
|
-
ot(
|
|
3000
|
+
const s = !(R.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
|
|
3001
|
+
ot(s), Ge(!s);
|
|
2977
3002
|
}
|
|
2978
3003
|
return;
|
|
2979
3004
|
}
|
|
2980
3005
|
At(R);
|
|
2981
3006
|
try {
|
|
2982
|
-
const
|
|
3007
|
+
const s = window.getSelection()?.anchorNode ?? null;
|
|
2983
3008
|
let x = null;
|
|
2984
|
-
if (
|
|
3009
|
+
if (s && (s.nodeType === Node.ELEMENT_NODE ? x = s.closest(
|
|
2985
3010
|
'[data-type="variable"][data-node-type="report-url"]'
|
|
2986
|
-
) :
|
|
3011
|
+
) : s.nodeType === Node.TEXT_NODE && s.parentElement && (x = s.parentElement.closest(
|
|
2987
3012
|
'[data-type="variable"][data-node-type="report-url"]'
|
|
2988
3013
|
))), x) {
|
|
2989
3014
|
const m = x.dataset.key;
|
|
@@ -3004,12 +3029,12 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3004
3029
|
}
|
|
3005
3030
|
} catch {
|
|
3006
3031
|
}
|
|
3007
|
-
if (R.current && R.current.querySelectorAll('[data-type="variable"]').forEach((
|
|
3008
|
-
const x =
|
|
3032
|
+
if (R.current && R.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
|
|
3033
|
+
const x = s.querySelector(".variable-info-icon");
|
|
3009
3034
|
if (x) {
|
|
3010
3035
|
let m = !1;
|
|
3011
3036
|
const S = document.createTreeWalker(
|
|
3012
|
-
|
|
3037
|
+
s,
|
|
3013
3038
|
NodeFilter.SHOW_TEXT,
|
|
3014
3039
|
{
|
|
3015
3040
|
acceptNode: (g) => x.contains(g) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
|
|
@@ -3022,84 +3047,84 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3022
3047
|
}
|
|
3023
3048
|
m ? x.classList.add("hidden") : x.classList.remove("hidden");
|
|
3024
3049
|
}
|
|
3025
|
-
}), _t(R, t,
|
|
3026
|
-
t.filter((
|
|
3027
|
-
if (!
|
|
3028
|
-
const
|
|
3050
|
+
}), _t(R, t, se), Lt(R, Se, se, Ge), !R.current) return;
|
|
3051
|
+
t.filter((l) => l.type === "multi-variable" && l.key).forEach((l) => {
|
|
3052
|
+
if (!l.key) return;
|
|
3053
|
+
const s = l.maxCount || 9, x = He[l.key] || 1, m = [];
|
|
3029
3054
|
for (let p = 0; p < x; p++) {
|
|
3030
|
-
const
|
|
3031
|
-
`[data-type="variable"][data-key="${
|
|
3055
|
+
const ne = `${l.key}_${p}`, Q = R.current.querySelector(
|
|
3056
|
+
`[data-type="variable"][data-key="${ne}"][data-multi-key="${l.key}"]`
|
|
3032
3057
|
);
|
|
3033
|
-
if (
|
|
3034
|
-
const
|
|
3035
|
-
m.push(
|
|
3058
|
+
if (Q) {
|
|
3059
|
+
const U = Q.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3060
|
+
m.push(U);
|
|
3036
3061
|
}
|
|
3037
3062
|
}
|
|
3038
3063
|
const g = (m[m.length - 1] || "") === "";
|
|
3039
|
-
let h = !1,
|
|
3064
|
+
let h = !1, N = -1;
|
|
3040
3065
|
for (let p = 0; p < m.length - 1; p++)
|
|
3041
3066
|
if (m[p] === "") {
|
|
3042
|
-
h = !0,
|
|
3067
|
+
h = !0, N = p;
|
|
3043
3068
|
break;
|
|
3044
3069
|
}
|
|
3045
|
-
if (h &&
|
|
3070
|
+
if (h && N >= 0) {
|
|
3046
3071
|
const p = window.getSelection();
|
|
3047
3072
|
if (p && p.rangeCount > 0) {
|
|
3048
|
-
const
|
|
3049
|
-
if (
|
|
3050
|
-
const re =
|
|
3073
|
+
const X = p.getRangeAt(0), le = X.startContainer, oe = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
3074
|
+
if (oe) {
|
|
3075
|
+
const re = oe.dataset.key;
|
|
3051
3076
|
if (re) {
|
|
3052
3077
|
const fe = document.createRange();
|
|
3053
|
-
fe.setStartBefore(
|
|
3078
|
+
fe.setStartBefore(oe), fe.setEnd(X.startContainer, X.startOffset);
|
|
3054
3079
|
const Ee = fe.toString().length;
|
|
3055
3080
|
at.current = { key: re, offset: Ee };
|
|
3056
3081
|
}
|
|
3057
3082
|
}
|
|
3058
3083
|
}
|
|
3059
|
-
const
|
|
3060
|
-
for (let
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
const
|
|
3064
|
-
|
|
3065
|
-
|
|
3084
|
+
const ne = [...m];
|
|
3085
|
+
for (let X = N; X < ne.length - 1; X++)
|
|
3086
|
+
ne[X] = ne[X + 1];
|
|
3087
|
+
ne.pop();
|
|
3088
|
+
const Q = {};
|
|
3089
|
+
ne.forEach((X, le) => {
|
|
3090
|
+
X && (Q[`${l.key}_${le}`] = X);
|
|
3066
3091
|
});
|
|
3067
|
-
const
|
|
3092
|
+
const U = Math.max(g ? ne.length : ne.length + 1, 1);
|
|
3068
3093
|
R.current.querySelectorAll(
|
|
3069
3094
|
'[data-type="variable"]'
|
|
3070
|
-
).forEach((
|
|
3071
|
-
const
|
|
3072
|
-
if (
|
|
3073
|
-
const re =
|
|
3074
|
-
re && (
|
|
3095
|
+
).forEach((X) => {
|
|
3096
|
+
const le = X.dataset.key, oe = X.dataset.multiKey;
|
|
3097
|
+
if (le && oe !== l.key) {
|
|
3098
|
+
const re = X.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3099
|
+
re && (Q[le] = re);
|
|
3075
3100
|
}
|
|
3076
|
-
}), R.current.__tempVariableValues =
|
|
3077
|
-
...
|
|
3078
|
-
[
|
|
3101
|
+
}), R.current.__tempVariableValues = Q, Ie((X) => ({
|
|
3102
|
+
...X,
|
|
3103
|
+
[l.key]: U
|
|
3079
3104
|
}));
|
|
3080
3105
|
return;
|
|
3081
3106
|
}
|
|
3082
3107
|
if (!g) {
|
|
3083
|
-
const p = x - 1,
|
|
3084
|
-
`[data-type="variable"][data-key="${
|
|
3108
|
+
const p = x - 1, ne = `${l.key}_${p}`, Q = R.current.querySelector(
|
|
3109
|
+
`[data-type="variable"][data-key="${ne}"][data-multi-key="${l.key}"]`
|
|
3085
3110
|
);
|
|
3086
|
-
if (
|
|
3111
|
+
if (Q && Q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && x < s) {
|
|
3087
3112
|
const Z = window.getSelection();
|
|
3088
3113
|
if (Z && Z.rangeCount > 0) {
|
|
3089
|
-
const
|
|
3090
|
-
if (
|
|
3091
|
-
const re =
|
|
3114
|
+
const X = Z.getRangeAt(0), le = X.startContainer, oe = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
|
|
3115
|
+
if (oe) {
|
|
3116
|
+
const re = oe.dataset.key;
|
|
3092
3117
|
if (re) {
|
|
3093
3118
|
const fe = document.createRange();
|
|
3094
|
-
fe.setStartBefore(
|
|
3119
|
+
fe.setStartBefore(oe), fe.setEnd(X.startContainer, X.startOffset);
|
|
3095
3120
|
const Ee = fe.toString().length;
|
|
3096
3121
|
at.current = { key: re, offset: Ee };
|
|
3097
3122
|
}
|
|
3098
3123
|
}
|
|
3099
3124
|
}
|
|
3100
|
-
Ie((
|
|
3101
|
-
...
|
|
3102
|
-
[
|
|
3125
|
+
Ie((X) => ({
|
|
3126
|
+
...X,
|
|
3127
|
+
[l.key]: x + 1
|
|
3103
3128
|
}));
|
|
3104
3129
|
}
|
|
3105
3130
|
}
|
|
@@ -3108,64 +3133,64 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3108
3133
|
je(() => {
|
|
3109
3134
|
const r = R.current;
|
|
3110
3135
|
if (!r) return;
|
|
3111
|
-
const
|
|
3136
|
+
const l = /* @__PURE__ */ new Map(), s = (S) => {
|
|
3112
3137
|
const g = S.target, h = S.relatedTarget;
|
|
3113
3138
|
!g || !R.current || !R.current.contains(g) || h && R.current.contains(h) || setTimeout(() => {
|
|
3114
3139
|
if (R.current) {
|
|
3115
|
-
if (
|
|
3116
|
-
const
|
|
3117
|
-
Ge(
|
|
3140
|
+
if (Se.length === 0) {
|
|
3141
|
+
const N = R.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
3142
|
+
Ge(N.length > 0);
|
|
3118
3143
|
return;
|
|
3119
3144
|
}
|
|
3120
|
-
At(R), _t(R,
|
|
3145
|
+
At(R), _t(R, Se, se), Lt(R, Se, se, Ge);
|
|
3121
3146
|
}
|
|
3122
3147
|
}, 0);
|
|
3123
3148
|
};
|
|
3124
|
-
r.addEventListener("blur",
|
|
3149
|
+
r.addEventListener("blur", s, !0);
|
|
3125
3150
|
const x = () => {
|
|
3126
3151
|
if (!R.current) return;
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
}),
|
|
3152
|
+
l.forEach((h, N) => {
|
|
3153
|
+
N.removeEventListener("blur", h, !1);
|
|
3154
|
+
}), l.clear();
|
|
3130
3155
|
const S = R.current.querySelectorAll(
|
|
3131
3156
|
'[data-type="variable"][data-multi-key]'
|
|
3132
3157
|
), g = (h) => {
|
|
3133
3158
|
h.stopPropagation(), h.stopImmediatePropagation();
|
|
3134
|
-
const
|
|
3135
|
-
if (!
|
|
3159
|
+
const N = h.target;
|
|
3160
|
+
if (!N || !R.current || !R.current.contains(N))
|
|
3136
3161
|
return;
|
|
3137
|
-
const p =
|
|
3162
|
+
const p = N.closest('[data-type="variable"][data-multi-key]');
|
|
3138
3163
|
if (!p || !R.current.contains(p))
|
|
3139
3164
|
return;
|
|
3140
|
-
let
|
|
3141
|
-
if (
|
|
3142
|
-
(Ee === p || Ee.contains(
|
|
3143
|
-
}), !
|
|
3165
|
+
let ne = !1;
|
|
3166
|
+
if (l.forEach((fe, Ee) => {
|
|
3167
|
+
(Ee === p || Ee.contains(N)) && (ne = !0);
|
|
3168
|
+
}), !ne)
|
|
3144
3169
|
return;
|
|
3145
|
-
const
|
|
3146
|
-
if (!
|
|
3147
|
-
const
|
|
3148
|
-
if (!(!
|
|
3170
|
+
const Q = p.dataset.multiKey, U = p.dataset.key, Z = p.dataset.index;
|
|
3171
|
+
if (!Q || !U || Z === void 0) return;
|
|
3172
|
+
const X = h.relatedTarget;
|
|
3173
|
+
if (!(!X || !R.current.contains(X)))
|
|
3149
3174
|
return;
|
|
3150
|
-
const
|
|
3175
|
+
const oe = p.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3151
3176
|
console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
|
|
3152
|
-
multiKey:
|
|
3153
|
-
currentKey:
|
|
3177
|
+
multiKey: Q,
|
|
3178
|
+
currentKey: U,
|
|
3154
3179
|
index: Z,
|
|
3155
|
-
content:
|
|
3180
|
+
content: oe
|
|
3156
3181
|
});
|
|
3157
3182
|
const re = /[、,,\s]+/;
|
|
3158
|
-
if (re.test(
|
|
3159
|
-
const fe =
|
|
3160
|
-
console.log("[Blur Event] 拆分前的内容:",
|
|
3183
|
+
if (re.test(oe)) {
|
|
3184
|
+
const fe = oe.split(re).map((ce) => ce.trim()).filter((ce) => ce.length > 0);
|
|
3185
|
+
console.log("[Blur Event] 拆分前的内容:", oe), console.log("[Blur Event] 拆分后的部分:", fe);
|
|
3161
3186
|
const ee = fe.slice(0, 9);
|
|
3162
3187
|
if (console.log("[Blur Event] 有效的部分(最多9个):", ee), ee.length > 1) {
|
|
3163
|
-
const ce = t.find((we) => we.type === "multi-variable" && we.key ===
|
|
3188
|
+
const ce = t.find((we) => we.type === "multi-variable" && we.key === Q);
|
|
3164
3189
|
if (ce) {
|
|
3165
|
-
const we = He[
|
|
3190
|
+
const we = He[Q] || 1, be = parseInt(Z, 10), qe = ce.maxCount || 9, $e = [];
|
|
3166
3191
|
for (let Ae = 0; Ae < we; Ae++) {
|
|
3167
|
-
const Ye = `${
|
|
3168
|
-
`[data-type="variable"][data-key="${Ye}"][data-multi-key="${
|
|
3192
|
+
const Ye = `${Q}_${Ae}`, mt = R.current.querySelector(
|
|
3193
|
+
`[data-type="variable"][data-key="${Ye}"][data-multi-key="${Q}"]`
|
|
3169
3194
|
);
|
|
3170
3195
|
if (mt) {
|
|
3171
3196
|
const yt = mt.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
@@ -3173,39 +3198,39 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3173
3198
|
}
|
|
3174
3199
|
}
|
|
3175
3200
|
console.log("[Blur Event] 拆分前的所有值:", $e), console.log("[Blur Event] 当前索引:", be), console.log("[Blur Event] 要插入的值:", ee), $e.splice(be, 1, ...ee);
|
|
3176
|
-
const
|
|
3177
|
-
console.log("[Blur Event] 拆分后的所有值:",
|
|
3178
|
-
const Jt = Math.max(
|
|
3179
|
-
|
|
3180
|
-
Ae && (Ze[`${
|
|
3201
|
+
const Te = $e.slice(0, qe);
|
|
3202
|
+
console.log("[Blur Event] 拆分后的所有值:", Te), Te.length > 0 && Te[Te.length - 1] !== "" && Te.length < qe && Te.push("");
|
|
3203
|
+
const Jt = Math.max(Te.length, 1), Ze = {};
|
|
3204
|
+
Te.forEach((Ae, Ye) => {
|
|
3205
|
+
Ae && (Ze[`${Q}_${Ye}`] = Ae);
|
|
3181
3206
|
}), R.current.querySelectorAll(
|
|
3182
3207
|
'[data-type="variable"]'
|
|
3183
3208
|
).forEach((Ae) => {
|
|
3184
3209
|
const Ye = Ae.dataset.key, mt = Ae.dataset.multiKey;
|
|
3185
|
-
if (Ye && mt !==
|
|
3210
|
+
if (Ye && mt !== Q) {
|
|
3186
3211
|
const yt = Ae.innerText.replace(/[\u200B\n]/g, "").trim();
|
|
3187
3212
|
yt && (Ze[Ye] = yt);
|
|
3188
3213
|
}
|
|
3189
3214
|
}), R.current.__tempVariableValues = Ze, Ie((Ae) => ({
|
|
3190
3215
|
...Ae,
|
|
3191
|
-
[
|
|
3216
|
+
[Q]: Jt
|
|
3192
3217
|
}));
|
|
3193
3218
|
}
|
|
3194
3219
|
}
|
|
3195
3220
|
}
|
|
3196
3221
|
};
|
|
3197
3222
|
S.forEach((h) => {
|
|
3198
|
-
h.addEventListener("blur", g, !1),
|
|
3223
|
+
h.addEventListener("blur", g, !1), l.set(h, g);
|
|
3199
3224
|
});
|
|
3200
3225
|
}, m = setTimeout(() => {
|
|
3201
3226
|
x();
|
|
3202
3227
|
}, 0);
|
|
3203
3228
|
return () => {
|
|
3204
|
-
clearTimeout(m), r.removeEventListener("blur",
|
|
3229
|
+
clearTimeout(m), r.removeEventListener("blur", s, !0), l.forEach((S, g) => {
|
|
3205
3230
|
g.removeEventListener("blur", S, !1);
|
|
3206
|
-
}),
|
|
3231
|
+
}), l.clear();
|
|
3207
3232
|
};
|
|
3208
|
-
}, [t,
|
|
3233
|
+
}, [t, Se, He, se]);
|
|
3209
3234
|
const Cn = (r) => {
|
|
3210
3235
|
if (o) {
|
|
3211
3236
|
r.preventDefault();
|
|
@@ -3215,11 +3240,11 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3215
3240
|
r.preventDefault();
|
|
3216
3241
|
return;
|
|
3217
3242
|
}
|
|
3218
|
-
const
|
|
3219
|
-
if (
|
|
3220
|
-
const
|
|
3243
|
+
const l = window.getSelection();
|
|
3244
|
+
if (l && l.rangeCount > 0) {
|
|
3245
|
+
const s = l.anchorNode;
|
|
3221
3246
|
let x = null;
|
|
3222
|
-
if (
|
|
3247
|
+
if (s && (s.nodeType === Node.ELEMENT_NODE ? x = s.closest('[data-type="text"]') : s.nodeType === Node.TEXT_NODE && s.parentElement && (x = s.parentElement.closest('[data-type="text"]'))), x) {
|
|
3223
3248
|
if (r.preventDefault(), r.stopPropagation(), R.current) {
|
|
3224
3249
|
const m = R.current.querySelector(
|
|
3225
3250
|
'[data-type="variable"], [data-type="upload"]'
|
|
@@ -3229,10 +3254,10 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3229
3254
|
return;
|
|
3230
3255
|
}
|
|
3231
3256
|
}
|
|
3232
|
-
if (
|
|
3233
|
-
const
|
|
3257
|
+
if (q && l && l.rangeCount > 0) {
|
|
3258
|
+
const s = l.anchorNode;
|
|
3234
3259
|
let x = null;
|
|
3235
|
-
if (
|
|
3260
|
+
if (s && (s.nodeType === Node.ELEMENT_NODE ? x = s.closest(".tag-node") : s.nodeType === Node.TEXT_NODE && s.parentElement && (x = s.parentElement.closest(".tag-node"))), x) {
|
|
3236
3261
|
if (r.preventDefault(), r.stopPropagation(), R.current) {
|
|
3237
3262
|
const m = R.current.querySelector(
|
|
3238
3263
|
'[data-type="variable"], [data-type="upload"]'
|
|
@@ -3243,17 +3268,17 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3243
3268
|
}
|
|
3244
3269
|
}
|
|
3245
3270
|
if (r.key === "Escape" && R.current) {
|
|
3246
|
-
if (
|
|
3271
|
+
if (q) {
|
|
3247
3272
|
r.preventDefault();
|
|
3248
3273
|
return;
|
|
3249
3274
|
}
|
|
3250
3275
|
R.current.innerHTML = "", R.current.focus();
|
|
3251
3276
|
}
|
|
3252
3277
|
if (r.key === "Backspace") {
|
|
3253
|
-
const
|
|
3254
|
-
if (
|
|
3255
|
-
const x =
|
|
3256
|
-
if (
|
|
3278
|
+
const s = window.getSelection();
|
|
3279
|
+
if (s && s.rangeCount > 0) {
|
|
3280
|
+
const x = s.getRangeAt(0), m = s.anchorNode;
|
|
3281
|
+
if (q) {
|
|
3257
3282
|
let g = null, h = null;
|
|
3258
3283
|
if (m && (m.nodeType === Node.ELEMENT_NODE ? (g = m.closest(".tag-node"), h = m.closest('[data-type="text"]')) : m.nodeType === Node.TEXT_NODE && m.parentElement && (g = m.parentElement.closest(".tag-node"), h = m.parentElement.closest('[data-type="text"]'))), (g || h) && x.collapsed && x.startOffset === 0) {
|
|
3259
3284
|
r.preventDefault();
|
|
@@ -3284,8 +3309,8 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3284
3309
|
}
|
|
3285
3310
|
}
|
|
3286
3311
|
}
|
|
3287
|
-
},
|
|
3288
|
-
if (i || o ||
|
|
3312
|
+
}, Tn = () => {
|
|
3313
|
+
if (i || o || w || !Pt || !R.current) return;
|
|
3289
3314
|
if (t.length === 0) {
|
|
3290
3315
|
const g = R.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
|
|
3291
3316
|
if (!g) return;
|
|
@@ -3297,104 +3322,104 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3297
3322
|
return;
|
|
3298
3323
|
}
|
|
3299
3324
|
const r = R.current;
|
|
3300
|
-
let
|
|
3301
|
-
const
|
|
3325
|
+
let l = "";
|
|
3326
|
+
const s = {}, x = /* @__PURE__ */ new Set(), m = (g) => {
|
|
3302
3327
|
if (!(g.nodeType === Node.ELEMENT_NODE && g.style.display === "none")) {
|
|
3303
3328
|
if (g.nodeType === Node.TEXT_NODE)
|
|
3304
|
-
|
|
3329
|
+
l += (g.textContent || "").replace(/\u200B/g, "");
|
|
3305
3330
|
else if (g.nodeType === Node.ELEMENT_NODE) {
|
|
3306
|
-
const h = g,
|
|
3307
|
-
if (
|
|
3308
|
-
let
|
|
3309
|
-
const
|
|
3331
|
+
const h = g, N = h.dataset.type, p = h.dataset.key, ne = h.getAttribute("data-node-type") || "";
|
|
3332
|
+
if (N === "variable" && p) {
|
|
3333
|
+
let Q = "";
|
|
3334
|
+
const U = document.createTreeWalker(
|
|
3310
3335
|
h,
|
|
3311
3336
|
NodeFilter.SHOW_TEXT,
|
|
3312
3337
|
{
|
|
3313
|
-
acceptNode: (
|
|
3314
|
-
const
|
|
3315
|
-
return
|
|
3338
|
+
acceptNode: (X) => {
|
|
3339
|
+
const le = h.querySelector(".variable-info-icon");
|
|
3340
|
+
return le && le.contains(X) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
3316
3341
|
}
|
|
3317
3342
|
}
|
|
3318
3343
|
);
|
|
3319
|
-
for (;
|
|
3320
|
-
|
|
3321
|
-
const Z =
|
|
3344
|
+
for (; U.nextNode(); )
|
|
3345
|
+
Q += U.currentNode.textContent || "";
|
|
3346
|
+
const Z = Q.replace(/[\u200B\n]/g, "").trim();
|
|
3322
3347
|
if (Z) {
|
|
3323
|
-
const
|
|
3324
|
-
if (
|
|
3325
|
-
(!
|
|
3326
|
-
const
|
|
3327
|
-
|
|
3328
|
-
} else if (
|
|
3329
|
-
|
|
3330
|
-
const
|
|
3331
|
-
|
|
3348
|
+
const X = h.dataset.multiKey;
|
|
3349
|
+
if (X) {
|
|
3350
|
+
(!s[X] || !Array.isArray(s[X])) && (s[X] = []);
|
|
3351
|
+
const le = s[X];
|
|
3352
|
+
le.push(Z), le.length > 1 && (l += " "), l += Z;
|
|
3353
|
+
} else if (ne === "report-url") {
|
|
3354
|
+
s[`${p}__sourceUrl`] = Z;
|
|
3355
|
+
const oe = (t.find((re) => re.type === "report-url" && re.key === p)?.sourceUrlKey || "").trim();
|
|
3356
|
+
oe ? s[oe] = Z : s.url === void 0 && (s.url = Z), l += Z;
|
|
3332
3357
|
} else
|
|
3333
|
-
|
|
3358
|
+
s[p] = Z, l += Z;
|
|
3334
3359
|
}
|
|
3335
|
-
} else if (
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3338
|
-
} else if (
|
|
3339
|
-
const
|
|
3340
|
-
|
|
3341
|
-
} else if (
|
|
3342
|
-
const
|
|
3343
|
-
if (
|
|
3344
|
-
if (
|
|
3345
|
-
const
|
|
3346
|
-
(!
|
|
3360
|
+
} else if (N === "select" && p) {
|
|
3361
|
+
const Q = (h.getAttribute("data-value") || "").trim();
|
|
3362
|
+
Q && (s[p] = Q, l += Q);
|
|
3363
|
+
} else if (N === "textarea" && p) {
|
|
3364
|
+
const U = (h.value || "").replace(/\u200B/g, "").trim();
|
|
3365
|
+
U && (s[p] = U, l += U);
|
|
3366
|
+
} else if (N === "richtext" && p) {
|
|
3367
|
+
const U = (h.textContent || "").replace(/\u200B/g, "").trim();
|
|
3368
|
+
if (U)
|
|
3369
|
+
if (ne === "report-module") {
|
|
3370
|
+
const X = (p.match(/^(.*)__module_\d+$/)?.[1] || p).trim();
|
|
3371
|
+
(!s[X] || !Array.isArray(s[X])) && (s[X] = []), s[X].push(U), x.add(X), l += U;
|
|
3347
3372
|
} else
|
|
3348
|
-
|
|
3349
|
-
} else if (
|
|
3350
|
-
const
|
|
3351
|
-
if (
|
|
3352
|
-
if (
|
|
3353
|
-
const Z =
|
|
3354
|
-
Z.length === 2 ? (
|
|
3373
|
+
s[p] = U, l += U;
|
|
3374
|
+
} else if (N === "datepicker" && p) {
|
|
3375
|
+
const U = (h.getAttribute("data-value") || "").trim();
|
|
3376
|
+
if (U)
|
|
3377
|
+
if (U.includes(",")) {
|
|
3378
|
+
const Z = U.split(",");
|
|
3379
|
+
Z.length === 2 ? (s[p] = Z, l += `[${Z[0]}, ${Z[1]}]`) : (s[p] = U, l += U);
|
|
3355
3380
|
} else
|
|
3356
|
-
|
|
3357
|
-
} else if (
|
|
3358
|
-
const
|
|
3359
|
-
if (
|
|
3360
|
-
const
|
|
3361
|
-
if (
|
|
3381
|
+
s[p] = U, l += U;
|
|
3382
|
+
} else if (N === "upload" && p) {
|
|
3383
|
+
const Q = h.dataset.batchKey;
|
|
3384
|
+
if (Q) {
|
|
3385
|
+
const U = t.find((Z) => Z.type === "upload" && Z.key === Q);
|
|
3386
|
+
if (U && typeof U.maxCount == "number" && typeof U.minCount == "number") {
|
|
3362
3387
|
const Z = [];
|
|
3363
|
-
for (let
|
|
3364
|
-
const
|
|
3365
|
-
|
|
3388
|
+
for (let X = 0; X < U.maxCount; X++) {
|
|
3389
|
+
const le = `${Q}-${X}`, oe = se[le];
|
|
3390
|
+
oe && Z.push(oe);
|
|
3366
3391
|
}
|
|
3367
|
-
|
|
3392
|
+
s[Q] || (s[Q] = Z.length > 0 ? Z : null, Z.length > 0 && (l += ` [附带${Z.length}个文件: ${Z.map((X) => X.name).join(", ")}] `));
|
|
3368
3393
|
} else
|
|
3369
|
-
|
|
3394
|
+
s[p] = se[p] ?? null, se[p] && (l += ` [附带文件: ${se[p]?.name}] `);
|
|
3370
3395
|
} else
|
|
3371
|
-
|
|
3396
|
+
s[p] = se[p] ?? null, se[p] && (l += ` [附带文件: ${se[p]?.name}] `);
|
|
3372
3397
|
} else {
|
|
3373
3398
|
if (h.classList.contains("tag-close-btn") || h.classList.contains("file-remove-btn")) return;
|
|
3374
|
-
h.getAttribute("contenteditable") === "false" && !
|
|
3399
|
+
h.getAttribute("contenteditable") === "false" && !N && h.classList.contains("tag-node") ? l += h.innerText : h.childNodes.forEach(m);
|
|
3375
3400
|
}
|
|
3376
3401
|
}
|
|
3377
3402
|
}
|
|
3378
3403
|
};
|
|
3379
|
-
if (r.childNodes.forEach(m),
|
|
3404
|
+
if (r.childNodes.forEach(m), l = l.trim(), !l) return;
|
|
3380
3405
|
const S = new FormData();
|
|
3381
|
-
S.append("fullPrompt",
|
|
3382
|
-
const h =
|
|
3406
|
+
S.append("fullPrompt", l), Object.keys(s).forEach((g) => {
|
|
3407
|
+
const h = s[g];
|
|
3383
3408
|
h != null && (h instanceof File ? S.append(g, h) : Array.isArray(h) ? t.some(
|
|
3384
3409
|
(p) => p.type === "multi-variable" && p.key === g
|
|
3385
3410
|
) || x.has(g) ? h.forEach((p) => {
|
|
3386
3411
|
p != null && p !== "" && S.append(g, String(p));
|
|
3387
|
-
}) : h.forEach((p,
|
|
3388
|
-
p != null && (p instanceof File ? S.append(`${g}[${
|
|
3412
|
+
}) : h.forEach((p, ne) => {
|
|
3413
|
+
p != null && (p instanceof File ? S.append(`${g}[${ne}]`, p) : typeof p == "string" ? S.append(`${g}[${ne}]`, p) : S.append(`${g}[${ne}]`, String(p)));
|
|
3389
3414
|
}) : typeof h == "string" ? S.append(g, h) : S.append(g, String(h)));
|
|
3390
|
-
}), y(S,
|
|
3391
|
-
}, De =
|
|
3415
|
+
}), y(S, l);
|
|
3416
|
+
}, De = We ? !1 : st ? v : it, Sn = Math.max(
|
|
3392
3417
|
0,
|
|
3393
|
-
V -
|
|
3394
|
-
), ft = typeof e == "number" ? Math.max(0, e -
|
|
3418
|
+
V - lt
|
|
3419
|
+
), ft = typeof e == "number" ? Math.max(0, e - lt) : void 0, Le = typeof _ == "number" && _ > 0 ? _ : 0, Nn = {
|
|
3395
3420
|
...b ? { width: typeof b == "number" ? `${b}px` : b } : {},
|
|
3396
|
-
...
|
|
3397
|
-
...
|
|
3421
|
+
...k ? { border: k } : {},
|
|
3422
|
+
...H ? { background: H } : {},
|
|
3398
3423
|
...Le ? {
|
|
3399
3424
|
transition: `height ${Le}ms cubic-bezier(0.2, 0, 0, 1), max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)`
|
|
3400
3425
|
} : {},
|
|
@@ -3412,23 +3437,23 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3412
3437
|
};
|
|
3413
3438
|
return je(() => {
|
|
3414
3439
|
if (!De || !ge.current) return;
|
|
3415
|
-
const
|
|
3440
|
+
const l = window.requestAnimationFrame(() => {
|
|
3416
3441
|
ge.current && (ge.current.scrollTop = 0, ge.current.scrollLeft = 0);
|
|
3417
3442
|
});
|
|
3418
|
-
return () => window.cancelAnimationFrame(
|
|
3443
|
+
return () => window.cancelAnimationFrame(l);
|
|
3419
3444
|
}, [De]), je(() => {
|
|
3420
3445
|
if (!De) return;
|
|
3421
3446
|
const r = Et.current;
|
|
3422
3447
|
if (!r) return;
|
|
3423
|
-
const
|
|
3424
|
-
if (
|
|
3448
|
+
const l = ye.current?.getBoundingClientRect().height ?? 0, s = Math.max(0, r - l);
|
|
3449
|
+
if (s > 0) {
|
|
3425
3450
|
const x = Rt.current;
|
|
3426
3451
|
if (x === window) {
|
|
3427
3452
|
const m = document.documentElement;
|
|
3428
|
-
m.scrollTop = Math.max(0, m.scrollTop -
|
|
3453
|
+
m.scrollTop = Math.max(0, m.scrollTop - s);
|
|
3429
3454
|
} else {
|
|
3430
3455
|
const m = x;
|
|
3431
|
-
m.scrollTop = Math.max(0, m.scrollTop -
|
|
3456
|
+
m.scrollTop = Math.max(0, m.scrollTop - s);
|
|
3432
3457
|
}
|
|
3433
3458
|
}
|
|
3434
3459
|
Et.current = null;
|
|
@@ -3448,7 +3473,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3448
3473
|
ref: ge,
|
|
3449
3474
|
style: De ? {
|
|
3450
3475
|
// 折叠态:只裁切内容区(footer 保持),高度由 collapsedTotalHeight - footerHeight 得出
|
|
3451
|
-
maxHeight: `${
|
|
3476
|
+
maxHeight: `${Sn}px`,
|
|
3452
3477
|
overflow: "hidden",
|
|
3453
3478
|
...Le ? {
|
|
3454
3479
|
transition: `max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)`
|
|
@@ -3462,17 +3487,17 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3462
3487
|
"div",
|
|
3463
3488
|
{
|
|
3464
3489
|
ref: R,
|
|
3465
|
-
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${un &&
|
|
3490
|
+
className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${un && C ? "rte-editor-empty" : ""}`,
|
|
3466
3491
|
contentEditable: t.length === 0,
|
|
3467
3492
|
suppressContentEditableWarning: !0,
|
|
3468
|
-
"data-placeholder":
|
|
3493
|
+
"data-placeholder": C,
|
|
3469
3494
|
onMouseDown: xn,
|
|
3470
3495
|
onMouseMove: wn,
|
|
3471
3496
|
onMouseUp: kn,
|
|
3472
3497
|
onClick: (r) => {
|
|
3473
3498
|
$n(r);
|
|
3474
|
-
const
|
|
3475
|
-
if (
|
|
3499
|
+
const l = r.target;
|
|
3500
|
+
if (l) {
|
|
3476
3501
|
const x = [
|
|
3477
3502
|
"button",
|
|
3478
3503
|
"a",
|
|
@@ -3498,11 +3523,11 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3498
3523
|
".rte-agent-badge",
|
|
3499
3524
|
".rich-text-editor-send-button"
|
|
3500
3525
|
].join(",");
|
|
3501
|
-
if (
|
|
3526
|
+
if (l.closest(x)) return;
|
|
3502
3527
|
}
|
|
3503
|
-
if (f || d && !
|
|
3504
|
-
if (mn || d &&
|
|
3505
|
-
d && typeof
|
|
3528
|
+
if (f || d && !We) {
|
|
3529
|
+
if (mn || d && We) return;
|
|
3530
|
+
d && typeof J == "number" && J > 0 && (Tt.current = Date.now() + J), yn(!De, "click");
|
|
3506
3531
|
}
|
|
3507
3532
|
u && u(r);
|
|
3508
3533
|
},
|
|
@@ -3516,7 +3541,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3516
3541
|
"input",
|
|
3517
3542
|
{
|
|
3518
3543
|
type: "file",
|
|
3519
|
-
ref:
|
|
3544
|
+
ref: W,
|
|
3520
3545
|
className: "rte-file-input",
|
|
3521
3546
|
accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
|
|
3522
3547
|
onChange: vn
|
|
@@ -3531,12 +3556,12 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3531
3556
|
/* @__PURE__ */ L("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
|
|
3532
3557
|
/* @__PURE__ */ L("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
|
|
3533
3558
|
] }),
|
|
3534
|
-
|
|
3559
|
+
E !== "hideAgent" && /* @__PURE__ */ L(
|
|
3535
3560
|
Hn,
|
|
3536
3561
|
{
|
|
3537
3562
|
placement: "topLeft",
|
|
3538
3563
|
menu: {
|
|
3539
|
-
items:
|
|
3564
|
+
items: M.filter((r) => r.isShowNew !== 1).map((r) => ({
|
|
3540
3565
|
key: r.key,
|
|
3541
3566
|
label: /* @__PURE__ */ de("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3542
3567
|
r.icon && /* @__PURE__ */ L("i", { className: r.icon }),
|
|
@@ -3550,7 +3575,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3550
3575
|
trigger: ["click"],
|
|
3551
3576
|
disabled: o || i,
|
|
3552
3577
|
overlayClassName: "rte-agent-dropdown",
|
|
3553
|
-
children: /* @__PURE__ */ de("div", { className: "rte-agent-badge", style: { cursor:
|
|
3578
|
+
children: /* @__PURE__ */ de("div", { className: "rte-agent-badge", style: { cursor: M.length > 0 ? "pointer" : "default" }, children: [
|
|
3554
3579
|
/* @__PURE__ */ L("i", { className: "iconfont icon-zhinengti", style: { fontSize: "16px" } }),
|
|
3555
3580
|
/* @__PURE__ */ L("span", { className: "rte-agent-text", children: "智能体" })
|
|
3556
3581
|
] })
|
|
@@ -3559,14 +3584,14 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3559
3584
|
] }) }),
|
|
3560
3585
|
/* @__PURE__ */ de("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
3561
3586
|
(() => {
|
|
3562
|
-
const r = t.find((
|
|
3587
|
+
const r = t.find((s) => s.type === "tag");
|
|
3563
3588
|
if (!r || !r.text) return null;
|
|
3564
|
-
const
|
|
3565
|
-
return !
|
|
3589
|
+
const l = M.find((s) => s.label === r.text);
|
|
3590
|
+
return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ de("div", { className: "rte-points-badge", children: [
|
|
3566
3591
|
/* @__PURE__ */ L("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
|
|
3567
3592
|
/* @__PURE__ */ de("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
|
|
3568
3593
|
"-",
|
|
3569
|
-
String(
|
|
3594
|
+
String(l.points)
|
|
3570
3595
|
] })
|
|
3571
3596
|
] });
|
|
3572
3597
|
})(),
|
|
@@ -3574,10 +3599,10 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3574
3599
|
"button",
|
|
3575
3600
|
{
|
|
3576
3601
|
type: "button",
|
|
3577
|
-
onClick:
|
|
3578
|
-
disabled: i || o ||
|
|
3602
|
+
onClick: Tn,
|
|
3603
|
+
disabled: i || o || w || !Pt,
|
|
3579
3604
|
className: "rich-text-editor-send-button",
|
|
3580
|
-
children: i ||
|
|
3605
|
+
children: i || w ? /* @__PURE__ */ L("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ L("i", { className: "iconfont icon-fasong" })
|
|
3581
3606
|
}
|
|
3582
3607
|
)
|
|
3583
3608
|
] })
|
|
@@ -3585,7 +3610,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3585
3610
|
ve?.anchorEl && (() => {
|
|
3586
3611
|
if (!document.body.contains(ve.anchorEl))
|
|
3587
3612
|
return null;
|
|
3588
|
-
let r = "",
|
|
3613
|
+
let r = "", l = {
|
|
3589
3614
|
background: "var(--neutral-800, #262626)"
|
|
3590
3615
|
};
|
|
3591
3616
|
if (ve.type === "upload")
|
|
@@ -3599,10 +3624,10 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3599
3624
|
else if (ve.type === "variable")
|
|
3600
3625
|
r = ve.anchorEl.dataset.tooltip || "";
|
|
3601
3626
|
else if (ve.type === "upload-preview") {
|
|
3602
|
-
const S =
|
|
3627
|
+
const S = se[ve.key], g = !!S && (S.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(S.name || ""));
|
|
3603
3628
|
if (S && g) {
|
|
3604
3629
|
const h = URL.createObjectURL(S);
|
|
3605
|
-
r = /* @__PURE__ */ L("div", { className: "rte-upload-preview", children: /* @__PURE__ */ L("img", { className: "rte-upload-preview-img", src: h, alt: S.name }) }),
|
|
3630
|
+
r = /* @__PURE__ */ L("div", { className: "rte-upload-preview", children: /* @__PURE__ */ L("img", { className: "rte-upload-preview-img", src: h, alt: S.name }) }), l = {
|
|
3606
3631
|
background: "#fff",
|
|
3607
3632
|
padding: 0,
|
|
3608
3633
|
borderRadius: 4,
|
|
@@ -3612,7 +3637,7 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3612
3637
|
r = "";
|
|
3613
3638
|
}
|
|
3614
3639
|
if (!r) return null;
|
|
3615
|
-
const
|
|
3640
|
+
const s = ve.type === "upload-preview" ? "#0A0A0A" : "#fff", x = [
|
|
3616
3641
|
"rte-tooltip",
|
|
3617
3642
|
ve.type === "upload-preview" ? "rte-tooltip-preview" : "",
|
|
3618
3643
|
ve.type === "tag" ? "rte-tooltip-tag" : ""
|
|
@@ -3623,11 +3648,11 @@ const { RangePicker: Nr } = Dn, qr = ({ host: t, onChange: y }) => {
|
|
|
3623
3648
|
{
|
|
3624
3649
|
arrow: !1,
|
|
3625
3650
|
overlayClassName: x,
|
|
3626
|
-
title: ve.type === "upload-preview" ? r : /* @__PURE__ */ L("div", { style: { maxWidth: "200px", fontSize: "12px", color:
|
|
3651
|
+
title: ve.type === "upload-preview" ? r : /* @__PURE__ */ L("div", { style: { maxWidth: "200px", fontSize: "12px", color: s }, children: r }),
|
|
3627
3652
|
open: !0,
|
|
3628
3653
|
placement: ve.type === "upload-preview" ? "topLeft" : "top",
|
|
3629
3654
|
getPopupContainer: () => document.body,
|
|
3630
|
-
overlayInnerStyle:
|
|
3655
|
+
overlayInnerStyle: l,
|
|
3631
3656
|
children: /* @__PURE__ */ L(
|
|
3632
3657
|
"div",
|
|
3633
3658
|
{
|
|
@@ -3692,8 +3717,8 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3692
3717
|
loadingProgress: i,
|
|
3693
3718
|
loadIcon: o,
|
|
3694
3719
|
onBatchSizeChange: b,
|
|
3695
|
-
onLoadNextPage:
|
|
3696
|
-
onStartAutoLoad:
|
|
3720
|
+
onLoadNextPage: q,
|
|
3721
|
+
onStartAutoLoad: M,
|
|
3697
3722
|
onStopLoad: A
|
|
3698
3723
|
}) => t && i ? /* @__PURE__ */ de("div", { className: "auto_load_progress", children: [
|
|
3699
3724
|
o || /* @__PURE__ */ L("img", { src: an, alt: "自动加载", width: 14, height: 14 }),
|
|
@@ -3717,7 +3742,7 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3717
3742
|
/* @__PURE__ */ L(
|
|
3718
3743
|
"div",
|
|
3719
3744
|
{
|
|
3720
|
-
onClick:
|
|
3745
|
+
onClick: q,
|
|
3721
3746
|
className: "auto_load_next_btn",
|
|
3722
3747
|
style: {
|
|
3723
3748
|
backgroundColor: t ? "#f5f5f5" : "#2563eb"
|
|
@@ -3737,7 +3762,7 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3737
3762
|
"div",
|
|
3738
3763
|
{
|
|
3739
3764
|
className: "auto_load_btn",
|
|
3740
|
-
onClick: t ? void 0 :
|
|
3765
|
+
onClick: t ? void 0 : M,
|
|
3741
3766
|
children: [
|
|
3742
3767
|
o || /* @__PURE__ */ L("img", { src: an, alt: "自动加载", width: 14, height: 14 }),
|
|
3743
3768
|
/* @__PURE__ */ L("span", { children: "自动加载" })
|
|
@@ -3765,18 +3790,18 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3765
3790
|
pageSize: i,
|
|
3766
3791
|
total: o,
|
|
3767
3792
|
cachedPages: b,
|
|
3768
|
-
loadedCount:
|
|
3769
|
-
autoLoading:
|
|
3793
|
+
loadedCount: q,
|
|
3794
|
+
autoLoading: M = !1,
|
|
3770
3795
|
loadingProgress: A,
|
|
3771
3796
|
onChange: $,
|
|
3772
|
-
onLoadNextPage:
|
|
3773
|
-
onStartAutoLoad:
|
|
3774
|
-
onStopLoading:
|
|
3797
|
+
onLoadNextPage: w,
|
|
3798
|
+
onStartAutoLoad: C,
|
|
3799
|
+
onStopLoading: k
|
|
3775
3800
|
}) => {
|
|
3776
|
-
const [
|
|
3801
|
+
const [H, E] = ie(5), e = Math.ceil(o / i), n = Mt(() => b.length >= e, [b, e]), a = () => Array.from(
|
|
3777
3802
|
{ length: e },
|
|
3778
|
-
(D,
|
|
3779
|
-
).filter((D) => !b.includes(D)).slice(0,
|
|
3803
|
+
(D, T) => T + 1
|
|
3804
|
+
).filter((D) => !b.includes(D)).slice(0, H);
|
|
3780
3805
|
return /* @__PURE__ */ de("div", { className: "pagination_footer", children: [
|
|
3781
3806
|
/* @__PURE__ */ de("div", { className: "pagination_leftWrap", children: [
|
|
3782
3807
|
/* @__PURE__ */ de("span", { className: "pagination_total", children: [
|
|
@@ -3787,7 +3812,7 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3787
3812
|
}
|
|
3788
3813
|
),
|
|
3789
3814
|
"已加载: ",
|
|
3790
|
-
|
|
3815
|
+
q,
|
|
3791
3816
|
"/",
|
|
3792
3817
|
o,
|
|
3793
3818
|
"条数据"
|
|
@@ -3796,17 +3821,17 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3796
3821
|
Mr,
|
|
3797
3822
|
{
|
|
3798
3823
|
loadIcon: y || void 0,
|
|
3799
|
-
autoLoading:
|
|
3800
|
-
batchSize:
|
|
3824
|
+
autoLoading: M,
|
|
3825
|
+
batchSize: H,
|
|
3801
3826
|
loadingProgress: A,
|
|
3802
|
-
disabled: !
|
|
3803
|
-
onBatchSizeChange:
|
|
3804
|
-
onLoadNextPage: () =>
|
|
3827
|
+
disabled: !w || !C,
|
|
3828
|
+
onBatchSizeChange: E,
|
|
3829
|
+
onLoadNextPage: () => w?.(),
|
|
3805
3830
|
onStartAutoLoad: () => {
|
|
3806
3831
|
const d = a();
|
|
3807
|
-
|
|
3832
|
+
C?.(d);
|
|
3808
3833
|
},
|
|
3809
|
-
onStopLoad: () =>
|
|
3834
|
+
onStopLoad: () => k?.()
|
|
3810
3835
|
}
|
|
3811
3836
|
)
|
|
3812
3837
|
] }),
|
|
@@ -3820,9 +3845,9 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3820
3845
|
showSizeChanger: !1,
|
|
3821
3846
|
showQuickJumper: !1,
|
|
3822
3847
|
showTotal: () => "",
|
|
3823
|
-
itemRender: (d, D,
|
|
3848
|
+
itemRender: (d, D, T) => {
|
|
3824
3849
|
const F = b.includes(d);
|
|
3825
|
-
return D === "prev" || D === "next" || D === "jump-prev" || D === "jump-next" ? /* @__PURE__ */ L("div", { className: "pageBox", children:
|
|
3850
|
+
return D === "prev" || D === "next" || D === "jump-prev" || D === "jump-next" ? /* @__PURE__ */ L("div", { className: "pageBox", children: T }) : /* @__PURE__ */ de(
|
|
3826
3851
|
"div",
|
|
3827
3852
|
{
|
|
3828
3853
|
className: "pageBox",
|
|
@@ -3846,23 +3871,23 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3846
3871
|
autoLoading: i,
|
|
3847
3872
|
loadingProgress: o,
|
|
3848
3873
|
columns: b = [],
|
|
3849
|
-
dataSource:
|
|
3850
|
-
total:
|
|
3874
|
+
dataSource: q = [],
|
|
3875
|
+
total: M,
|
|
3851
3876
|
current: A,
|
|
3852
3877
|
pageSize: $,
|
|
3853
|
-
cachedPages:
|
|
3854
|
-
onChangePage:
|
|
3855
|
-
onLoadNextPage:
|
|
3856
|
-
onStartAutoLoad:
|
|
3857
|
-
onStopLoading:
|
|
3878
|
+
cachedPages: w,
|
|
3879
|
+
onChangePage: C,
|
|
3880
|
+
onLoadNextPage: k,
|
|
3881
|
+
onStartAutoLoad: H,
|
|
3882
|
+
onStopLoading: E,
|
|
3858
3883
|
...e
|
|
3859
3884
|
} = t, n = te(null), a = ue(
|
|
3860
3885
|
(u) => {
|
|
3861
|
-
|
|
3886
|
+
C(u), w.includes(u) && n.current?.scrollTo({
|
|
3862
3887
|
key: `${(u - 1) * $ + 1}`
|
|
3863
3888
|
});
|
|
3864
3889
|
},
|
|
3865
|
-
[
|
|
3890
|
+
[w, C, $]
|
|
3866
3891
|
);
|
|
3867
3892
|
return /* @__PURE__ */ de("div", { className: "flex flex-col", children: [
|
|
3868
3893
|
/* @__PURE__ */ L(
|
|
@@ -3871,7 +3896,7 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3871
3896
|
ref: n,
|
|
3872
3897
|
...e,
|
|
3873
3898
|
columns: b,
|
|
3874
|
-
dataSource:
|
|
3899
|
+
dataSource: q,
|
|
3875
3900
|
pagination: !1,
|
|
3876
3901
|
virtual: !0
|
|
3877
3902
|
}
|
|
@@ -3884,13 +3909,13 @@ const an = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
|
|
|
3884
3909
|
loadingProgress: o,
|
|
3885
3910
|
current: A,
|
|
3886
3911
|
pageSize: $,
|
|
3887
|
-
total:
|
|
3888
|
-
loadedCount:
|
|
3889
|
-
cachedPages:
|
|
3912
|
+
total: M,
|
|
3913
|
+
loadedCount: q.length,
|
|
3914
|
+
cachedPages: w,
|
|
3890
3915
|
onChange: a,
|
|
3891
|
-
onLoadNextPage:
|
|
3892
|
-
onStartAutoLoad:
|
|
3893
|
-
onStopLoading:
|
|
3916
|
+
onLoadNextPage: k,
|
|
3917
|
+
onStartAutoLoad: H,
|
|
3918
|
+
onStopLoading: E
|
|
3894
3919
|
}
|
|
3895
3920
|
)
|
|
3896
3921
|
] });
|
|
@@ -4008,20 +4033,20 @@ const Br = ({
|
|
|
4008
4033
|
animationSpeed: i = 100,
|
|
4009
4034
|
autoPlay: o = !0,
|
|
4010
4035
|
value: b,
|
|
4011
|
-
onChange:
|
|
4012
|
-
...
|
|
4036
|
+
onChange: q,
|
|
4037
|
+
...M
|
|
4013
4038
|
}) => {
|
|
4014
|
-
const [A, $] = ie(""), [
|
|
4039
|
+
const [A, $] = ie(""), [w, C] = ie(0), [k, H] = ie(!1), [E, e] = ie(!1), [n, a] = ie(!1), u = te(void 0), d = te(void 0), D = te(t), T = te(w), F = te(E), Y = te(A);
|
|
4015
4040
|
me(() => {
|
|
4016
|
-
D.current = t,
|
|
4041
|
+
D.current = t, T.current = w, F.current = E, Y.current = A;
|
|
4017
4042
|
});
|
|
4018
4043
|
const z = ue((f, c) => {
|
|
4019
4044
|
let v = 0;
|
|
4020
4045
|
a(!0);
|
|
4021
|
-
const
|
|
4022
|
-
v < f.length ? ($(f.slice(0, v + 1)), v++, d.current = window.setTimeout(
|
|
4046
|
+
const P = () => {
|
|
4047
|
+
v < f.length ? ($(f.slice(0, v + 1)), v++, d.current = window.setTimeout(P, i)) : (a(!1), c?.());
|
|
4023
4048
|
};
|
|
4024
|
-
|
|
4049
|
+
P();
|
|
4025
4050
|
}, [i]), O = ue((f) => {
|
|
4026
4051
|
let c = Y.current.length;
|
|
4027
4052
|
const v = () => {
|
|
@@ -4030,49 +4055,49 @@ const Br = ({
|
|
|
4030
4055
|
v();
|
|
4031
4056
|
}, [i]), _ = ue(() => {
|
|
4032
4057
|
if (D.current.length === 0 || F.current) return;
|
|
4033
|
-
|
|
4034
|
-
const f = D.current[
|
|
4058
|
+
H(!0);
|
|
4059
|
+
const f = D.current[T.current];
|
|
4035
4060
|
Y.current ? O(() => {
|
|
4036
4061
|
z(f, () => {
|
|
4037
4062
|
u.current = window.setTimeout(() => {
|
|
4038
|
-
|
|
4063
|
+
C((c) => (c + 1) % D.current.length), H(!1);
|
|
4039
4064
|
}, 2e3);
|
|
4040
4065
|
});
|
|
4041
4066
|
}) : z(f, () => {
|
|
4042
4067
|
u.current = window.setTimeout(() => {
|
|
4043
|
-
|
|
4068
|
+
C((c) => (c + 1) % D.current.length), H(!1);
|
|
4044
4069
|
}, 2e3);
|
|
4045
4070
|
});
|
|
4046
4071
|
}, [O, z]);
|
|
4047
|
-
return me(() => (o && t.length > 0 && !
|
|
4072
|
+
return me(() => (o && t.length > 0 && !E && _(), () => {
|
|
4048
4073
|
u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current);
|
|
4049
|
-
}), [
|
|
4050
|
-
!
|
|
4051
|
-
}, [
|
|
4074
|
+
}), [w, E, o, t.length, _]), me(() => {
|
|
4075
|
+
!k && o && t.length > 0 && !E && _();
|
|
4076
|
+
}, [w, k, o, t.length, E, _]), /* @__PURE__ */ de("div", { style: { position: "relative" }, children: [
|
|
4052
4077
|
/* @__PURE__ */ L(
|
|
4053
4078
|
on,
|
|
4054
4079
|
{
|
|
4055
|
-
...
|
|
4080
|
+
...M,
|
|
4056
4081
|
value: b,
|
|
4057
4082
|
onChange: (f) => {
|
|
4058
|
-
|
|
4083
|
+
q?.(f.target.value), M.onChange?.(f);
|
|
4059
4084
|
},
|
|
4060
4085
|
onFocus: (f) => {
|
|
4061
|
-
e(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current),
|
|
4086
|
+
e(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), H(!1), a(!1), M.onFocus?.(f);
|
|
4062
4087
|
},
|
|
4063
4088
|
onBlur: (f) => {
|
|
4064
|
-
e(!1), !b && t.length > 0 && ($(""),
|
|
4089
|
+
e(!1), !b && t.length > 0 && ($(""), C(0)), M.onBlur?.(f);
|
|
4065
4090
|
},
|
|
4066
|
-
placeholder:
|
|
4091
|
+
placeholder: E || b ? y : A || y,
|
|
4067
4092
|
style: {
|
|
4068
4093
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4069
|
-
...
|
|
4094
|
+
...M.style,
|
|
4070
4095
|
position: "relative",
|
|
4071
4096
|
zIndex: 1
|
|
4072
4097
|
}
|
|
4073
4098
|
}
|
|
4074
4099
|
),
|
|
4075
|
-
!
|
|
4100
|
+
!E && !b && A && /* @__PURE__ */ de(
|
|
4076
4101
|
"div",
|
|
4077
4102
|
{
|
|
4078
4103
|
style: {
|
|
@@ -4173,98 +4198,98 @@ const Hr = ({
|
|
|
4173
4198
|
// 是否自动播放动画
|
|
4174
4199
|
value: b = "",
|
|
4175
4200
|
// 受控模式的值
|
|
4176
|
-
onChange:
|
|
4201
|
+
onChange: q,
|
|
4177
4202
|
// 受控模式的变化回调
|
|
4178
|
-
onSubmit:
|
|
4203
|
+
onSubmit: M,
|
|
4179
4204
|
// 提交回调
|
|
4180
4205
|
maxLength: A = 500,
|
|
4181
4206
|
// 最大字符数限制
|
|
4182
4207
|
showCount: $ = !0,
|
|
4183
4208
|
// 是否显示字数统计
|
|
4184
|
-
submitText:
|
|
4209
|
+
submitText: w = "发送",
|
|
4185
4210
|
// 提交按钮文本
|
|
4186
|
-
disabled:
|
|
4211
|
+
disabled: C = !1,
|
|
4187
4212
|
// 是否禁用组件
|
|
4188
|
-
rows:
|
|
4213
|
+
rows: k = 4,
|
|
4189
4214
|
// 文本域行数
|
|
4190
|
-
style:
|
|
4215
|
+
style: H,
|
|
4191
4216
|
// 自定义样式
|
|
4192
|
-
...
|
|
4217
|
+
...E
|
|
4193
4218
|
// 其他原生属性
|
|
4194
4219
|
}) => {
|
|
4195
|
-
const [e, n] = ie(""), [a, u] = ie(0), [d, D] = ie(!1), [
|
|
4220
|
+
const [e, n] = ie(""), [a, u] = ie(0), [d, D] = ie(!1), [T, F] = ie(!1), [Y, z] = ie(!1), [O, _] = ie(b || ""), G = te(void 0), I = te(void 0), V = te(t), J = te(a), f = te(T), c = te(e), v = te(null);
|
|
4196
4221
|
me(() => {
|
|
4197
|
-
V.current = t,
|
|
4222
|
+
V.current = t, J.current = a, f.current = T, c.current = e;
|
|
4198
4223
|
});
|
|
4199
|
-
const
|
|
4224
|
+
const P = ue((W, se) => {
|
|
4200
4225
|
let xe = 0;
|
|
4201
4226
|
z(!0);
|
|
4202
4227
|
const ke = () => {
|
|
4203
|
-
xe <
|
|
4228
|
+
xe < W.length ? (n(W.slice(0, xe + 1)), xe++, I.current = window.setTimeout(ke, i)) : (z(!1), se?.());
|
|
4204
4229
|
};
|
|
4205
4230
|
ke();
|
|
4206
|
-
}, [i]), B = ue((
|
|
4207
|
-
let
|
|
4231
|
+
}, [i]), B = ue((W) => {
|
|
4232
|
+
let se = c.current.length;
|
|
4208
4233
|
const xe = () => {
|
|
4209
|
-
|
|
4234
|
+
se > 0 ? (n(c.current.slice(0, se - 1)), se--, I.current = window.setTimeout(xe, i / 2)) : W?.();
|
|
4210
4235
|
};
|
|
4211
4236
|
xe();
|
|
4212
4237
|
}, [i]), j = ue(() => {
|
|
4213
4238
|
if (V.current.length === 0 || f.current) return;
|
|
4214
4239
|
D(!0);
|
|
4215
|
-
const
|
|
4240
|
+
const W = V.current[J.current];
|
|
4216
4241
|
c.current ? B(() => {
|
|
4217
|
-
|
|
4242
|
+
P(W, () => {
|
|
4218
4243
|
G.current = window.setTimeout(() => {
|
|
4219
|
-
u((
|
|
4244
|
+
u((se) => (se + 1) % V.current.length), D(!1);
|
|
4220
4245
|
}, 2e3);
|
|
4221
4246
|
});
|
|
4222
|
-
}) :
|
|
4247
|
+
}) : P(W, () => {
|
|
4223
4248
|
G.current = window.setTimeout(() => {
|
|
4224
|
-
u((
|
|
4249
|
+
u((se) => (se + 1) % V.current.length), D(!1);
|
|
4225
4250
|
}, 2e3);
|
|
4226
4251
|
});
|
|
4227
|
-
}, [B,
|
|
4228
|
-
me(() => (o && t.length > 0 && !
|
|
4229
|
-
G.current && window.clearTimeout(G.current),
|
|
4230
|
-
}), [a,
|
|
4231
|
-
!d && o && t.length > 0 && !
|
|
4232
|
-
}, [a, d, o, t.length,
|
|
4233
|
-
const
|
|
4234
|
-
F(!0), G.current && window.clearTimeout(G.current),
|
|
4235
|
-
}, ae = (
|
|
4236
|
-
F(!1), !b && t.length > 0 && (n(""), u(0)),
|
|
4237
|
-
}, pe = (
|
|
4238
|
-
const
|
|
4239
|
-
A &&
|
|
4252
|
+
}, [B, P]);
|
|
4253
|
+
me(() => (o && t.length > 0 && !T && j(), () => {
|
|
4254
|
+
G.current && window.clearTimeout(G.current), I.current && window.clearTimeout(I.current);
|
|
4255
|
+
}), [a, T, o, t.length, j]), me(() => {
|
|
4256
|
+
!d && o && t.length > 0 && !T && j();
|
|
4257
|
+
}, [a, d, o, t.length, T, j]);
|
|
4258
|
+
const K = (W) => {
|
|
4259
|
+
F(!0), G.current && window.clearTimeout(G.current), I.current && window.clearTimeout(I.current), D(!1), z(!1), E.onFocus?.(W);
|
|
4260
|
+
}, ae = (W) => {
|
|
4261
|
+
F(!1), !b && t.length > 0 && (n(""), u(0)), E.onBlur?.(W);
|
|
4262
|
+
}, pe = (W) => {
|
|
4263
|
+
const se = W.target.value;
|
|
4264
|
+
A && se.length > A || (q ? q(se) : _(se), E.onChange?.(W));
|
|
4240
4265
|
}, he = () => {
|
|
4241
|
-
const
|
|
4242
|
-
|
|
4243
|
-
}, ye = (
|
|
4244
|
-
(
|
|
4245
|
-
}, ge =
|
|
4246
|
-
return /* @__PURE__ */ de("div", { style: { position: "relative", ...
|
|
4266
|
+
const W = q ? b : O;
|
|
4267
|
+
W.trim() && !C && (M?.(W), q || _(""));
|
|
4268
|
+
}, ye = (W) => {
|
|
4269
|
+
(W.ctrlKey || W.metaKey) && W.key === "Enter" && (W.preventDefault(), he()), E.onKeyDown?.(W);
|
|
4270
|
+
}, ge = q ? b : O, R = C || !ge.trim() || (A ? ge.length > A : !1);
|
|
4271
|
+
return /* @__PURE__ */ de("div", { style: { position: "relative", ...H }, children: [
|
|
4247
4272
|
/* @__PURE__ */ de("div", { style: { position: "relative" }, children: [
|
|
4248
4273
|
/* @__PURE__ */ L(
|
|
4249
4274
|
"textarea",
|
|
4250
4275
|
{
|
|
4251
4276
|
ref: v,
|
|
4252
|
-
value:
|
|
4277
|
+
value: q ? b : O,
|
|
4253
4278
|
onChange: pe,
|
|
4254
|
-
onFocus: (
|
|
4255
|
-
|
|
4279
|
+
onFocus: (W) => {
|
|
4280
|
+
W.target.style.borderColor = "#1890ff", W.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", K(W);
|
|
4256
4281
|
},
|
|
4257
|
-
onBlur: (
|
|
4258
|
-
|
|
4282
|
+
onBlur: (W) => {
|
|
4283
|
+
W.target.style.borderColor = "#d9d9d9", W.target.style.boxShadow = "none", ae(W);
|
|
4259
4284
|
},
|
|
4260
4285
|
onKeyDown: ye,
|
|
4261
|
-
placeholder:
|
|
4286
|
+
placeholder: T || ge ? y : "",
|
|
4262
4287
|
maxLength: A,
|
|
4263
|
-
rows:
|
|
4264
|
-
disabled:
|
|
4288
|
+
rows: k,
|
|
4289
|
+
disabled: C,
|
|
4265
4290
|
style: {
|
|
4266
4291
|
width: "100%",
|
|
4267
|
-
minHeight: `${
|
|
4292
|
+
minHeight: `${k * 24 + 16}px`,
|
|
4268
4293
|
padding: "8px 60px 8px 12px",
|
|
4269
4294
|
// 右侧留出按钮空间
|
|
4270
4295
|
border: "1px solid #d9d9d9",
|
|
@@ -4277,12 +4302,12 @@ const Hr = ({
|
|
|
4277
4302
|
transition: "border-color 0.3s, box-shadow 0.3s",
|
|
4278
4303
|
backgroundColor: "#fff",
|
|
4279
4304
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4280
|
-
...
|
|
4305
|
+
...E.style
|
|
4281
4306
|
},
|
|
4282
|
-
...
|
|
4307
|
+
...E
|
|
4283
4308
|
}
|
|
4284
4309
|
),
|
|
4285
|
-
!
|
|
4310
|
+
!T && !ge && e && /* @__PURE__ */ de(
|
|
4286
4311
|
"div",
|
|
4287
4312
|
{
|
|
4288
4313
|
style: {
|
|
@@ -4335,7 +4360,7 @@ const Hr = ({
|
|
|
4335
4360
|
{
|
|
4336
4361
|
type: "primary",
|
|
4337
4362
|
size: "small",
|
|
4338
|
-
icon: /* @__PURE__ */ L(
|
|
4363
|
+
icon: /* @__PURE__ */ L(Un, {}),
|
|
4339
4364
|
onClick: he,
|
|
4340
4365
|
disabled: R,
|
|
4341
4366
|
style: {
|
|
@@ -4346,7 +4371,7 @@ const Hr = ({
|
|
|
4346
4371
|
alignItems: "center",
|
|
4347
4372
|
justifyContent: "center"
|
|
4348
4373
|
},
|
|
4349
|
-
children:
|
|
4374
|
+
children: w
|
|
4350
4375
|
}
|
|
4351
4376
|
)
|
|
4352
4377
|
}
|
|
@@ -4469,45 +4494,45 @@ const cn = ({
|
|
|
4469
4494
|
height: o,
|
|
4470
4495
|
videoWidth: b,
|
|
4471
4496
|
// 参数保留但不使用,由CSS控制
|
|
4472
|
-
videoHeight:
|
|
4497
|
+
videoHeight: q,
|
|
4473
4498
|
// 参数保留但不使用,由CSS控制
|
|
4474
|
-
showPlayButton:
|
|
4499
|
+
showPlayButton: M = !0,
|
|
4475
4500
|
autoPlayOnHover: A = !0,
|
|
4476
4501
|
onClick: $,
|
|
4477
|
-
onVideoLoaded:
|
|
4478
|
-
onVideoPlay:
|
|
4479
|
-
onVideoPause:
|
|
4480
|
-
onVideoEnded:
|
|
4481
|
-
className:
|
|
4502
|
+
onVideoLoaded: w,
|
|
4503
|
+
onVideoPlay: C,
|
|
4504
|
+
onVideoPause: k,
|
|
4505
|
+
onVideoEnded: H,
|
|
4506
|
+
className: E,
|
|
4482
4507
|
style: e,
|
|
4483
4508
|
...n
|
|
4484
4509
|
}) => {
|
|
4485
|
-
const a = te(null), [u, d] = ie(!1), [D,
|
|
4486
|
-
a.current && (a.current.play(), d(!0),
|
|
4487
|
-
}, [
|
|
4488
|
-
a.current && (a.current.pause(), d(!1),
|
|
4489
|
-
}, [
|
|
4490
|
-
|
|
4510
|
+
const a = te(null), [u, d] = ie(!1), [D, T] = ie(!1), [F, Y] = ie(!1), z = ue(() => {
|
|
4511
|
+
a.current && (a.current.play(), d(!0), C?.());
|
|
4512
|
+
}, [C]), O = ue(() => {
|
|
4513
|
+
a.current && (a.current.pause(), d(!1), k?.());
|
|
4514
|
+
}, [k]), _ = ue((P) => {
|
|
4515
|
+
P.stopPropagation(), u ? O() : z();
|
|
4491
4516
|
}, [u, z, O]), G = ue(() => {
|
|
4492
|
-
|
|
4493
|
-
}, [A, u, z]),
|
|
4494
|
-
|
|
4517
|
+
T(!0), A && !u && z();
|
|
4518
|
+
}, [A, u, z]), I = ue(() => {
|
|
4519
|
+
T(!1), A && u && O();
|
|
4495
4520
|
}, [A, u, O]), V = ue(() => {
|
|
4496
|
-
Y(!0),
|
|
4497
|
-
}, [
|
|
4498
|
-
d(!0),
|
|
4499
|
-
}, [
|
|
4500
|
-
d(!1),
|
|
4501
|
-
}, [
|
|
4502
|
-
d(!1),
|
|
4503
|
-
}, [
|
|
4504
|
-
$?.(
|
|
4521
|
+
Y(!0), w?.();
|
|
4522
|
+
}, [w]), J = ue(() => {
|
|
4523
|
+
d(!0), C?.();
|
|
4524
|
+
}, [C]), f = ue(() => {
|
|
4525
|
+
d(!1), k?.();
|
|
4526
|
+
}, [k]), c = ue(() => {
|
|
4527
|
+
d(!1), H?.();
|
|
4528
|
+
}, [H]), v = ue((P) => {
|
|
4529
|
+
$?.(P);
|
|
4505
4530
|
}, [$]);
|
|
4506
4531
|
return /* @__PURE__ */ L(
|
|
4507
4532
|
It,
|
|
4508
4533
|
{
|
|
4509
4534
|
...n,
|
|
4510
|
-
className: `video-card ${
|
|
4535
|
+
className: `video-card ${E || ""}`,
|
|
4511
4536
|
style: {
|
|
4512
4537
|
width: i,
|
|
4513
4538
|
height: o,
|
|
@@ -4520,7 +4545,7 @@ const cn = ({
|
|
|
4520
4545
|
},
|
|
4521
4546
|
bordered: !1,
|
|
4522
4547
|
onMouseEnter: G,
|
|
4523
|
-
onMouseLeave:
|
|
4548
|
+
onMouseLeave: I,
|
|
4524
4549
|
onClick: v,
|
|
4525
4550
|
children: /* @__PURE__ */ de("div", { className: "video-card-container", children: [
|
|
4526
4551
|
/* @__PURE__ */ L(
|
|
@@ -4531,19 +4556,19 @@ const cn = ({
|
|
|
4531
4556
|
poster: y,
|
|
4532
4557
|
preload: "metadata",
|
|
4533
4558
|
onLoadedData: V,
|
|
4534
|
-
onPlay:
|
|
4559
|
+
onPlay: J,
|
|
4535
4560
|
onPause: f,
|
|
4536
4561
|
onEnded: c,
|
|
4537
4562
|
muted: !0,
|
|
4538
4563
|
loop: !0
|
|
4539
4564
|
}
|
|
4540
4565
|
),
|
|
4541
|
-
|
|
4566
|
+
M && /* @__PURE__ */ L(
|
|
4542
4567
|
"div",
|
|
4543
4568
|
{
|
|
4544
4569
|
className: `video-play-button ${D ? "hovered" : ""}`,
|
|
4545
4570
|
onClick: _,
|
|
4546
|
-
children: u ? /* @__PURE__ */ L(
|
|
4571
|
+
children: u ? /* @__PURE__ */ L(Wn, { className: "play-icon" }) : /* @__PURE__ */ L(Kn, { className: "play-icon" })
|
|
4547
4572
|
}
|
|
4548
4573
|
),
|
|
4549
4574
|
!F && /* @__PURE__ */ L("div", { className: "video-loading-mask", children: /* @__PURE__ */ L("div", { className: "loading-spinner" }) })
|
|
@@ -4665,62 +4690,62 @@ const Pr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
|
|
|
4665
4690
|
xl: 5,
|
|
4666
4691
|
xxl: 6
|
|
4667
4692
|
},
|
|
4668
|
-
className:
|
|
4669
|
-
style:
|
|
4693
|
+
className: q,
|
|
4694
|
+
style: M,
|
|
4670
4695
|
onClick: A
|
|
4671
4696
|
}) => {
|
|
4672
|
-
const $ = te(null), [
|
|
4697
|
+
const $ = te(null), [w, C] = ie(y || b.md || 3), k = te(/* @__PURE__ */ new Map()), H = ue(() => {
|
|
4673
4698
|
if (!o || y)
|
|
4674
4699
|
return y || b.md || 3;
|
|
4675
4700
|
const a = window.innerWidth;
|
|
4676
4701
|
return a < 576 ? b.xs || 1 : a < 768 ? b.sm || 2 : a < 992 ? b.md || 3 : a < 1200 ? b.lg || 4 : a < 1600 ? b.xl || 5 : b.xxl || 6;
|
|
4677
|
-
}, [o, y, b]),
|
|
4702
|
+
}, [o, y, b]), E = ue(() => {
|
|
4678
4703
|
if (!$.current) return;
|
|
4679
|
-
const a =
|
|
4704
|
+
const a = w, u = $.current, D = (u.offsetWidth - i * (a - 1)) / a, T = new Array(a).fill(0);
|
|
4680
4705
|
t.forEach((Y, z) => {
|
|
4681
|
-
const O = Y.id || z, _ =
|
|
4706
|
+
const O = Y.id || z, _ = k.current.get(O);
|
|
4682
4707
|
if (!_) return;
|
|
4683
|
-
const G = Math.min(...
|
|
4684
|
-
_.style.position = "absolute", _.style.left = `${V}px`, _.style.top = `${
|
|
4708
|
+
const G = Math.min(...T), I = T.indexOf(G), V = I * (D + i), J = T[I];
|
|
4709
|
+
_.style.position = "absolute", _.style.left = `${V}px`, _.style.top = `${J}px`, _.style.width = `${D}px`, T[I] += _.offsetHeight + i;
|
|
4685
4710
|
});
|
|
4686
|
-
const F = Math.max(...
|
|
4711
|
+
const F = Math.max(...T);
|
|
4687
4712
|
u.style.height = `${F}px`;
|
|
4688
|
-
}, [t,
|
|
4713
|
+
}, [t, w, i]);
|
|
4689
4714
|
me(() => {
|
|
4690
4715
|
const a = () => {
|
|
4691
|
-
const u =
|
|
4692
|
-
u !==
|
|
4716
|
+
const u = H();
|
|
4717
|
+
u !== w && C(u);
|
|
4693
4718
|
};
|
|
4694
4719
|
if (o)
|
|
4695
4720
|
return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
|
|
4696
|
-
}, [o,
|
|
4721
|
+
}, [o, H, w]), me(() => {
|
|
4697
4722
|
const a = setTimeout(() => {
|
|
4698
|
-
|
|
4723
|
+
E();
|
|
4699
4724
|
}, 100);
|
|
4700
4725
|
return () => clearTimeout(a);
|
|
4701
|
-
}, [t,
|
|
4726
|
+
}, [t, w, E]);
|
|
4702
4727
|
const e = ue(() => {
|
|
4703
|
-
|
|
4704
|
-
}, [
|
|
4728
|
+
E();
|
|
4729
|
+
}, [E]), n = ue((a) => {
|
|
4705
4730
|
A && A(a), a.onClick?.(a);
|
|
4706
4731
|
}, [A]);
|
|
4707
4732
|
return /* @__PURE__ */ L(
|
|
4708
4733
|
"div",
|
|
4709
4734
|
{
|
|
4710
4735
|
ref: $,
|
|
4711
|
-
className: `waterfall-container ${
|
|
4736
|
+
className: `waterfall-container ${q || ""}`,
|
|
4712
4737
|
style: {
|
|
4713
4738
|
position: "relative",
|
|
4714
4739
|
width: "100%",
|
|
4715
|
-
...
|
|
4740
|
+
...M
|
|
4716
4741
|
},
|
|
4717
4742
|
children: t.map((a, u) => {
|
|
4718
4743
|
const d = a.id || u, D = Vr(a);
|
|
4719
4744
|
return /* @__PURE__ */ L(
|
|
4720
4745
|
"div",
|
|
4721
4746
|
{
|
|
4722
|
-
ref: (
|
|
4723
|
-
|
|
4747
|
+
ref: (T) => {
|
|
4748
|
+
T ? k.current.set(d, T) : k.current.delete(d);
|
|
4724
4749
|
},
|
|
4725
4750
|
className: "waterfall-item",
|
|
4726
4751
|
children: D === "video" ? /* @__PURE__ */ L("div", { style: {
|
|
@@ -4889,7 +4914,7 @@ const jr = {
|
|
|
4889
4914
|
}
|
|
4890
4915
|
};
|
|
4891
4916
|
export {
|
|
4892
|
-
|
|
4917
|
+
lr as AdvancedTable,
|
|
4893
4918
|
Qn as AppModal,
|
|
4894
4919
|
rr as BackButton,
|
|
4895
4920
|
Xn as Button,
|