bi-components-library 1.0.28 → 1.0.29

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 CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as E, jsxs as Z, Fragment as Ze } from "react/jsx-runtime";
2
2
  import { useState as ne, useRef as Q, useMemo as Ye, useCallback as ae, useEffect as de, useLayoutEffect as ze } from "react";
3
- import { Button as $e, Card as Oe, Modal as et, Table as Re, Flex as We, Spin as tt, Empty as nt, Select as Ge, Form as Ie, Input as Ke, Space as at, DatePicker as rt, Dropdown as ot, Tooltip as st, Progress as lt, Pagination as it, theme as ct } from "antd";
3
+ import { Button as $e, Card as Oe, Modal as et, Table as Re, Flex as We, Spin as tt, Empty as nt, Select as Ge, Form as _e, Input as Ke, Space as at, DatePicker as rt, Dropdown as ot, Tooltip as st, Progress as it, Pagination as lt, theme as ct } from "antd";
4
4
  import { createFromIconfontCN as ut, LeftOutlined as dt, SearchOutlined as pt, ReloadOutlined as ft, InfoCircleOutlined as yt, SendOutlined as mt, PauseCircleOutlined as ht, PlayCircleOutlined as gt } from "@ant-design/icons";
5
5
  import { createPortal as Xe } from "react-dom";
6
6
  const vt = ({
7
7
  variant: t = "primary",
8
- loading: b = !1,
9
- children: p,
10
- ...l
8
+ loading: x = !1,
9
+ children: d,
10
+ ...i
11
11
  }) => /* @__PURE__ */ E(
12
12
  $e,
13
13
  {
14
- ...l,
14
+ ...i,
15
15
  type: ((T) => {
16
16
  switch (T) {
17
17
  case "primary":
@@ -28,9 +28,9 @@ const vt = ({
28
28
  return "primary";
29
29
  }
30
30
  })(t),
31
- loading: b,
31
+ loading: x,
32
32
  ghost: t === "ghost",
33
- children: p
33
+ children: d
34
34
  }
35
35
  );
36
36
  vt.__docgenInfo = {
@@ -79,20 +79,20 @@ vt.__docgenInfo = {
79
79
  };
80
80
  const bt = ({
81
81
  title: t,
82
- children: b,
83
- bordered: p = !0,
84
- hoverable: l = !1,
85
- size: f = "default",
82
+ children: x,
83
+ bordered: d = !0,
84
+ hoverable: i = !1,
85
+ size: u = "default",
86
86
  ...T
87
87
  }) => /* @__PURE__ */ E(
88
88
  Oe,
89
89
  {
90
90
  ...T,
91
91
  title: t,
92
- bordered: p,
93
- hoverable: l,
94
- size: f,
95
- children: b
92
+ bordered: d,
93
+ hoverable: i,
94
+ size: u,
95
+ children: x
96
96
  }
97
97
  );
98
98
  bt.__docgenInfo = {
@@ -148,17 +148,17 @@ bt.__docgenInfo = {
148
148
  };
149
149
  const xt = ({
150
150
  showDefaultFooter: t = !0,
151
- ...b
151
+ ...x
152
152
  }) => {
153
- const p = b.footer !== void 0 ? b.footer : t ? (l, { OkBtn: f, CancelBtn: T }) => /* @__PURE__ */ Z(Ze, { children: [
154
- /* @__PURE__ */ E(f, {}),
153
+ const d = x.footer !== void 0 ? x.footer : t ? (i, { OkBtn: u, CancelBtn: T }) => /* @__PURE__ */ Z(Ze, { children: [
154
+ /* @__PURE__ */ E(u, {}),
155
155
  /* @__PURE__ */ E(T, {})
156
156
  ] }) : null;
157
157
  return /* @__PURE__ */ E(
158
158
  et,
159
159
  {
160
- ...b,
161
- footer: p
160
+ ...x,
161
+ footer: d
162
162
  }
163
163
  );
164
164
  };
@@ -225,23 +225,23 @@ xt.__docgenInfo = {
225
225
  };
226
226
  const kt = ({
227
227
  scrollX: t,
228
- showPagination: b = !0,
229
- defaultPageSize: p = 10,
230
- ...l
228
+ showPagination: x = !0,
229
+ defaultPageSize: d = 10,
230
+ ...i
231
231
  }) => /* @__PURE__ */ E(
232
232
  Re,
233
233
  {
234
- ...l,
234
+ ...i,
235
235
  scroll: {
236
236
  x: t || "max-content",
237
237
  y: "50vh"
238
238
  },
239
- pagination: b ? {
239
+ pagination: x ? {
240
240
  hideOnSinglePage: !0,
241
241
  showSizeChanger: !0,
242
242
  showQuickJumper: !0,
243
- defaultPageSize: p,
244
- ...l.pagination
243
+ defaultPageSize: d,
244
+ ...i.pagination
245
245
  } : !1
246
246
  }
247
247
  );
@@ -299,20 +299,20 @@ const wt = ut({
299
299
  scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
300
300
  }), Et = ({
301
301
  name: t,
302
- size: b,
303
- color: p,
304
- style: l,
305
- ...f
302
+ size: x,
303
+ color: d,
304
+ style: i,
305
+ ...u
306
306
  }) => {
307
307
  const T = {
308
- fontSize: b,
309
- color: p,
310
- ...l
308
+ fontSize: x,
309
+ color: d,
310
+ ...i
311
311
  };
312
312
  return /* @__PURE__ */ E(
313
313
  wt,
314
314
  {
315
- ...f,
315
+ ...u,
316
316
  type: t,
317
317
  style: T
318
318
  }
@@ -356,36 +356,36 @@ Et.__docgenInfo = {
356
356
  };
357
357
  const $t = ({
358
358
  loading: t,
359
- description: b = "暂无数据",
360
- className: p,
361
- emptyChildren: l,
362
- loadingText: f,
359
+ description: x = "暂无数据",
360
+ className: d,
361
+ emptyChildren: i,
362
+ loadingText: u,
363
363
  emptyImage: T
364
364
  }) => t ? /* @__PURE__ */ Z(
365
365
  We,
366
366
  {
367
- className: `pt-10 w-full ${p || ""}`,
367
+ className: `pt-10 w-full ${d || ""}`,
368
368
  align: "center",
369
369
  justify: "center",
370
370
  vertical: !0,
371
371
  children: [
372
372
  /* @__PURE__ */ E(tt, { size: "large" }),
373
- f && /* @__PURE__ */ E("div", { className: "mt-4 text-gray-500", children: f })
373
+ u && /* @__PURE__ */ E("div", { className: "mt-4 text-gray-500", children: u })
374
374
  ]
375
375
  }
376
376
  ) : /* @__PURE__ */ E(
377
377
  We,
378
378
  {
379
- className: `pt-10 w-full ${p || ""}`,
379
+ className: `pt-10 w-full ${d || ""}`,
380
380
  align: "center",
381
381
  justify: "center",
382
382
  children: /* @__PURE__ */ E(
383
383
  nt,
384
384
  {
385
385
  image: T,
386
- description: b,
386
+ description: x,
387
387
  imageStyle: { height: 180 },
388
- children: l
388
+ children: i
389
389
  }
390
390
  )
391
391
  }
@@ -435,19 +435,19 @@ $t.__docgenInfo = {
435
435
  };
436
436
  const Ct = ({
437
437
  onClick: t,
438
- showText: b = !1,
439
- className: p,
440
- size: l = "small",
441
- type: f = "default"
438
+ showText: x = !1,
439
+ className: d,
440
+ size: i = "small",
441
+ type: u = "default"
442
442
  }) => /* @__PURE__ */ E(
443
443
  $e,
444
444
  {
445
- size: l,
446
- type: f,
445
+ size: i,
446
+ type: u,
447
447
  icon: /* @__PURE__ */ E(dt, {}),
448
- className: `cursor-pointer ${p || ""}`,
448
+ className: `cursor-pointer ${d || ""}`,
449
449
  onClick: t,
450
- children: b && "返回"
450
+ children: x && "返回"
451
451
  }
452
452
  );
453
453
  Ct.__docgenInfo = {
@@ -491,17 +491,17 @@ Ct.__docgenInfo = {
491
491
  };
492
492
  const Tt = ({
493
493
  removePadding: t = !0,
494
- className: b,
495
- ...p
494
+ className: x,
495
+ ...d
496
496
  }) => {
497
- const l = t ? `px-0 h-auto ${b || ""}` : b;
497
+ const i = t ? `px-0 h-auto ${x || ""}` : x;
498
498
  return /* @__PURE__ */ E(
499
499
  $e,
500
500
  {
501
501
  type: "link",
502
- ...p,
503
- className: l,
504
- children: p.children
502
+ ...d,
503
+ className: i,
504
+ children: d.children
505
505
  }
506
506
  );
507
507
  };
@@ -542,48 +542,48 @@ Tt.__docgenInfo = {
542
542
  }
543
543
  }
544
544
  };
545
- const { Option: qt } = Ge, St = ({
545
+ const { Option: qt } = Ge, Nt = ({
546
546
  columns: t,
547
- request: b,
548
- searchFields: p = [],
549
- showSearch: l = !0,
550
- showRefresh: f = !0,
547
+ request: x,
548
+ searchFields: d = [],
549
+ showSearch: i = !0,
550
+ showRefresh: u = !0,
551
551
  defaultPageSize: T = 10,
552
- pageSizeOptions: M = ["10", "20", "50", "100"],
552
+ pageSizeOptions: I = ["10", "20", "50", "100"],
553
553
  autoLoad: $ = !0,
554
554
  externalParams: w = {},
555
555
  ...e
556
556
  }) => {
557
- const [q, y] = ne([]), [s, r] = ne(!1), [n, o] = ne({
557
+ const [q, f] = ne([]), [s, r] = ne(!1), [n, o] = ne({
558
558
  current: 1,
559
559
  pageSize: T,
560
560
  total: 0
561
- }), [a, u] = ne({}), [d, x] = ne({}), [v] = Ie.useForm(), _ = Q(n);
562
- _.current = n;
561
+ }), [a, p] = ne({}), [y, g] = ne({}), [b] = _e.useForm(), V = Q(n);
562
+ V.current = n;
563
563
  const k = Q(w);
564
564
  k.current = w;
565
- const P = Q(!1), H = Ye(() => t.map((i) => {
566
- const { sortable: c, render: g, ...L } = i;
565
+ const P = Q(!1), H = Ye(() => t.map((l) => {
566
+ const { sortable: c, render: v, ...L } = l;
567
567
  return {
568
568
  ...L,
569
569
  sorter: c ? !0 : void 0,
570
- render: g || ((S) => S)
570
+ render: v || ((N) => N)
571
571
  };
572
- }), [t]), F = ae(async (i = {}) => {
573
- if (b) {
572
+ }), [t]), F = ae(async (l = {}) => {
573
+ if (x) {
574
574
  r(!0);
575
575
  try {
576
576
  const c = {
577
- page: _.current.current,
578
- pageSize: _.current.pageSize,
579
- sortField: d.field,
580
- sortOrder: d.order,
577
+ page: V.current.current,
578
+ pageSize: V.current.pageSize,
579
+ sortField: y.field,
580
+ sortOrder: y.order,
581
581
  searchParams: { ...a, ...k.current },
582
- ...i
583
- }, g = await b(c);
584
- g.success && (y(g.data), o((L) => ({
582
+ ...l
583
+ }, v = await x(c);
584
+ v.success && (f(v.data), o((L) => ({
585
585
  ...L,
586
- total: g.total,
586
+ total: v.total,
587
587
  current: c.page || L.current
588
588
  })));
589
589
  } catch (c) {
@@ -592,54 +592,54 @@ const { Option: qt } = Ge, St = ({
592
592
  r(!1);
593
593
  }
594
594
  }
595
- }, [b, d, a]), U = ae((i) => {
596
- u(i), o((c) => ({ ...c, current: 1 }));
595
+ }, [x, y, a]), U = ae((l) => {
596
+ p(l), o((c) => ({ ...c, current: 1 }));
597
597
  }, []), R = ae(() => {
598
- v.resetFields(), u({}), o((i) => ({ ...i, current: 1 }));
599
- }, [v]), ee = ae(() => {
598
+ b.resetFields(), p({}), o((l) => ({ ...l, current: 1 }));
599
+ }, [b]), ee = ae(() => {
600
600
  F();
601
- }, [F]), re = ae((i, c, g) => {
601
+ }, [F]), re = ae((l, c, v) => {
602
602
  const L = {
603
- current: i.current || 1,
604
- pageSize: i.pageSize || T,
605
- total: i.total || 0
606
- }, S = {
607
- field: g?.field,
608
- order: g?.order
603
+ current: l.current || 1,
604
+ pageSize: l.pageSize || T,
605
+ total: l.total || 0
606
+ }, N = {
607
+ field: v?.field,
608
+ order: v?.order
609
609
  };
610
- o(L), x(S);
610
+ o(L), g(N);
611
611
  }, [T]);
612
612
  return de(() => {
613
- const i = Object.keys(w).length > 0;
614
- ($ && !P.current || i) && (F(), P.current = !0);
613
+ const l = Object.keys(w).length > 0;
614
+ ($ && !P.current || l) && (F(), P.current = !0);
615
615
  }, [$, w, F]), /* @__PURE__ */ Z("div", { children: [
616
- l && p.length > 0 && /* @__PURE__ */ E(Oe, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
617
- Ie,
616
+ i && d.length > 0 && /* @__PURE__ */ E(Oe, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
617
+ _e,
618
618
  {
619
- form: v,
619
+ form: b,
620
620
  layout: "inline",
621
621
  onFinish: U,
622
- initialValues: p.reduce((i, c) => (c.defaultValue !== void 0 && (i[c.key] = c.defaultValue), i), {}),
622
+ initialValues: d.reduce((l, c) => (c.defaultValue !== void 0 && (l[c.key] = c.defaultValue), l), {}),
623
623
  children: [
624
- p.map((i) => /* @__PURE__ */ E(Ie.Item, { name: i.key, label: i.label, children: i.type === "input" ? /* @__PURE__ */ E(
624
+ d.map((l) => /* @__PURE__ */ E(_e.Item, { name: l.key, label: l.label, children: l.type === "input" ? /* @__PURE__ */ E(
625
625
  Ke,
626
626
  {
627
- placeholder: i.placeholder || `请输入${i.label}`,
627
+ placeholder: l.placeholder || `请输入${l.label}`,
628
628
  style: { width: 200 }
629
629
  }
630
630
  ) : /* @__PURE__ */ E(
631
631
  Ge,
632
632
  {
633
- placeholder: i.placeholder || `请选择${i.label}`,
633
+ placeholder: l.placeholder || `请选择${l.label}`,
634
634
  style: { width: 200 },
635
635
  allowClear: !0,
636
- children: i.options?.map((c) => /* @__PURE__ */ E(qt, { value: c.value, children: c.label }, c.value))
636
+ children: l.options?.map((c) => /* @__PURE__ */ E(qt, { value: c.value, children: c.label }, c.value))
637
637
  }
638
- ) }, i.key)),
639
- /* @__PURE__ */ E(Ie.Item, { children: /* @__PURE__ */ Z(at, { children: [
638
+ ) }, l.key)),
639
+ /* @__PURE__ */ E(_e.Item, { children: /* @__PURE__ */ Z(at, { children: [
640
640
  /* @__PURE__ */ E($e, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ E(pt, {}), children: "查询" }),
641
641
  /* @__PURE__ */ E($e, { onClick: R, children: "重置" }),
642
- f && /* @__PURE__ */ E($e, { icon: /* @__PURE__ */ E(ft, {}), onClick: ee, children: "刷新" })
642
+ u && /* @__PURE__ */ E($e, { icon: /* @__PURE__ */ E(ft, {}), onClick: ee, children: "刷新" })
643
643
  ] }) })
644
644
  ]
645
645
  }
@@ -655,8 +655,8 @@ const { Option: qt } = Ge, St = ({
655
655
  ...n,
656
656
  showSizeChanger: !0,
657
657
  showQuickJumper: !0,
658
- showTotal: (i, c) => `第 ${c[0]}-${c[1]} 条/共 ${i} 条`,
659
- pageSizeOptions: M
658
+ showTotal: (l, c) => `第 ${c[0]}-${c[1]} 条/共 ${l} 条`,
659
+ pageSizeOptions: I
660
660
  },
661
661
  onChange: re,
662
662
  scroll: { x: "max-content", y: "50vh" }
@@ -664,7 +664,7 @@ const { Option: qt } = Ge, St = ({
664
664
  )
665
665
  ] });
666
666
  };
667
- St.__docgenInfo = {
667
+ Nt.__docgenInfo = {
668
668
  displayName: "AdvancedTable",
669
669
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
670
670
  props: {
@@ -731,22 +731,22 @@ St.__docgenInfo = {
731
731
  }
732
732
  }
733
733
  };
734
- function Be(t, b, p) {
734
+ function Be(t, x, d) {
735
735
  if (!t.current) return;
736
- const l = /* @__PURE__ */ new Set(), f = {};
737
- for (const y of b)
738
- y.exclusionGroup && y.exclusionGroup !== "separator" && (l.add(y.exclusionGroup), f[y.exclusionGroup] || (f[y.exclusionGroup] = []), f[y.exclusionGroup].push({
739
- type: y.type,
740
- key: y.key,
741
- exclusionGroup: y.exclusionGroup
736
+ const i = /* @__PURE__ */ new Set(), u = {};
737
+ for (const f of x)
738
+ f.exclusionGroup && f.exclusionGroup !== "separator" && (i.add(f.exclusionGroup), u[f.exclusionGroup] || (u[f.exclusionGroup] = []), u[f.exclusionGroup].push({
739
+ type: f.type,
740
+ key: f.key,
741
+ exclusionGroup: f.exclusionGroup
742
742
  }));
743
743
  const T = {};
744
- for (const y of l) {
745
- T[y] = !1;
746
- for (const s of f[y])
744
+ for (const f of i) {
745
+ T[f] = !1;
746
+ for (const s of u[f])
747
747
  if (s.type === "upload" && s.key) {
748
- if (p[s.key] !== null && p[s.key] !== void 0) {
749
- T[y] = !0;
748
+ if (d[s.key] !== null && d[s.key] !== void 0) {
749
+ T[f] = !0;
750
750
  break;
751
751
  }
752
752
  } else if (s.type === "variable" && s.key) {
@@ -754,27 +754,27 @@ function Be(t, b, p) {
754
754
  `[data-type="variable"][data-key="${s.key}"]`
755
755
  );
756
756
  if (r && r.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
757
- T[y] = !0;
757
+ T[f] = !0;
758
758
  break;
759
759
  }
760
760
  }
761
761
  }
762
- const M = b.some((y) => y.exclusionGroup === "separator"), w = Object.keys(T).filter(
763
- (y) => T[y]
762
+ const I = x.some((f) => f.exclusionGroup === "separator"), w = Object.keys(T).filter(
763
+ (f) => T[f]
764
764
  ).length > 0;
765
765
  let e = null;
766
- if (w && M) {
767
- for (const y of b)
768
- if (y.exclusionGroup && y.exclusionGroup !== "separator" && T[y.exclusionGroup]) {
769
- e = y.exclusionGroup;
766
+ if (w && I) {
767
+ for (const f of x)
768
+ if (f.exclusionGroup && f.exclusionGroup !== "separator" && T[f.exclusionGroup]) {
769
+ e = f.exclusionGroup;
770
770
  break;
771
771
  }
772
772
  }
773
- for (const y of l) {
773
+ for (const f of i) {
774
774
  const s = t.current.querySelectorAll(
775
- `[data-group="${y}"]`
775
+ `[data-group="${f}"]`
776
776
  );
777
- M && w && e ? y === e ? s.forEach((r) => {
777
+ I && w && e ? f === e ? s.forEach((r) => {
778
778
  r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
779
779
  }) : s.forEach((r) => {
780
780
  r.style.display = "none", r.style.setProperty("display", "none", "important");
@@ -784,89 +784,82 @@ function Be(t, b, p) {
784
784
  }
785
785
  t.current.querySelectorAll(
786
786
  '[data-group="separator"]'
787
- ).forEach((y) => {
788
- y.style.display = w ? "none" : "inline";
787
+ ).forEach((f) => {
788
+ f.style.display = w ? "none" : "inline";
789
789
  });
790
790
  }
791
- function Pe(t, b, p, l) {
791
+ function Pe(t, x, d, i) {
792
792
  if (!t.current) {
793
- l(!1);
793
+ i(!1);
794
794
  return;
795
795
  }
796
- const f = [];
797
- for (let s = 0; s < b.length; s++) {
798
- const r = b[s];
796
+ const u = [];
797
+ for (let s = 0; s < x.length; s++) {
798
+ const r = x[s];
799
799
  if ((r.type === "variable" || r.type === "upload" || r.type === "multi-variable" || r.type === "select" || r.type === "textarea" || r.type === "richtext" || r.type === "datepicker") && r.required && r.key) {
800
- f.push({
800
+ u.push({
801
801
  exclusionGroup: r.exclusionGroup || "",
802
802
  key: r.key,
803
803
  type: r.type === "multi-variable" ? "variable" : r.type,
804
804
  isMultiVariable: r.type === "multi-variable",
805
- minCount: r.type === "multi-variable" ? r.minCount : void 0
805
+ minCount: r.type === "multi-variable" ? r.minCount : void 0,
806
+ __index: s
806
807
  });
807
808
  continue;
808
809
  }
809
810
  if (r.type === "text" && r.className?.includes("rte-text-required"))
810
811
  if (r.exclusionGroup)
811
- for (let n = s + 1; n < b.length; n++) {
812
- const o = b[n];
812
+ for (let n = s + 1; n < x.length; n++) {
813
+ const o = x[n];
813
814
  if (o.exclusionGroup === r.exclusionGroup && (o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
814
- f.push({
815
+ u.push({
815
816
  exclusionGroup: r.exclusionGroup,
816
817
  key: o.key,
817
- type: o.type
818
+ type: o.type,
819
+ __index: n
818
820
  });
819
821
  break;
820
822
  }
821
823
  }
822
824
  else
823
- for (let n = s + 1; n < b.length; n++) {
824
- const o = b[n];
825
+ for (let n = s + 1; n < x.length; n++) {
826
+ const o = x[n];
825
827
  if ((o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
826
- f.push({
828
+ u.push({
827
829
  exclusionGroup: o.exclusionGroup || "",
828
830
  key: o.key,
829
- type: o.type
831
+ type: o.type,
832
+ __index: n
830
833
  });
831
834
  break;
832
835
  }
833
836
  }
834
837
  }
835
- const T = b.some((s) => s.exclusionGroup === "separator"), M = [];
836
- if (T && f.length > 1) {
838
+ const T = x.some((s) => s.exclusionGroup === "separator"), I = [];
839
+ if (T && u.length > 1) {
837
840
  const s = [];
838
- b.forEach((r, n) => {
841
+ x.forEach((r, n) => {
839
842
  r.exclusionGroup === "separator" && s.push(n);
840
843
  });
841
844
  for (const r of s) {
842
- const n = f.filter((a) => {
843
- const u = b.findIndex(
844
- (d) => (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key === a.key
845
- );
846
- return u >= 0 && u < r;
847
- }), o = f.filter((a) => {
848
- const u = b.findIndex(
849
- (d) => (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key === a.key
850
- );
851
- return u >= 0 && u > r;
852
- });
853
- n.length > 0 && o.length > 0 && M.push([...n, ...o]);
845
+ const o = u.filter((y) => typeof y.__index == "number" && y.__index < r).sort((y, g) => (g.__index ?? 0) - (y.__index ?? 0))[0], p = u.filter((y) => typeof y.__index == "number" && y.__index > r).sort((y, g) => (y.__index ?? 0) - (g.__index ?? 0))[0];
846
+ o && p && I.push([o, p]);
854
847
  }
855
848
  }
856
- if (f.length === 0) {
857
- if (b.length === 0) {
849
+ if (u.length === 0) {
850
+ if (x.length === 0) {
858
851
  if (!t.current) {
859
- l(!1);
852
+ i(!1);
860
853
  return;
861
854
  }
862
855
  const s = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
863
- l(s.length > 0);
856
+ i(s.length > 0);
864
857
  return;
865
858
  }
866
- l(!0);
859
+ i(!0);
867
860
  return;
868
861
  }
869
- const $ = f.filter((s) => {
862
+ const $ = u.filter((s) => {
870
863
  if (!t.current) return !1;
871
864
  if (s.exclusionGroup) {
872
865
  const r = t.current.querySelectorAll(
@@ -937,11 +930,11 @@ function Pe(t, b, p, l) {
937
930
  return !1;
938
931
  });
939
932
  if ($.length === 0) {
940
- l(!0);
933
+ i(!0);
941
934
  return;
942
935
  }
943
936
  const w = /* @__PURE__ */ new Set();
944
- M.forEach((s) => {
937
+ I.forEach((s) => {
945
938
  s.forEach((r) => {
946
939
  r.key && w.add(r.key);
947
940
  });
@@ -949,8 +942,8 @@ function Pe(t, b, p, l) {
949
942
  const e = $.filter(
950
943
  (s) => !s.key || !w.has(s.key)
951
944
  );
952
- let q = (M.length === 0, !0);
953
- for (const s of M) {
945
+ let q = (I.length === 0, !0);
946
+ for (const s of I) {
954
947
  const r = s.filter((o) => {
955
948
  if (!t.current) return !1;
956
949
  if (o.exclusionGroup) {
@@ -967,7 +960,7 @@ function Pe(t, b, p, l) {
967
960
  let n = !1;
968
961
  for (const o of r)
969
962
  if (o.type === "upload" && o.key) {
970
- if (p[o.key] !== null && p[o.key] !== void 0) {
963
+ if (d[o.key] !== null && d[o.key] !== void 0) {
971
964
  n = !0;
972
965
  break;
973
966
  }
@@ -976,11 +969,14 @@ function Pe(t, b, p, l) {
976
969
  const a = t.current.querySelectorAll(
977
970
  `[data-type="variable"][data-multi-key="${o.key}"]`
978
971
  );
979
- let u = 0;
980
- for (const x of Array.from(a))
981
- x.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (u += 1);
982
- const d = o.minCount && o.minCount > 0 ? o.minCount : 1;
983
- if (u >= d) {
972
+ let p = 0;
973
+ for (const g of Array.from(a)) {
974
+ if (g.classList.contains("show-placeholder"))
975
+ continue;
976
+ g.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (p += 1);
977
+ }
978
+ const y = o.minCount && o.minCount > 0 ? o.minCount : 1;
979
+ if (p >= y) {
984
980
  n = !0;
985
981
  break;
986
982
  }
@@ -988,9 +984,13 @@ function Pe(t, b, p, l) {
988
984
  const a = t.current.querySelector(
989
985
  `[data-type="variable"][data-key="${o.key}"]`
990
986
  );
991
- if (a && a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
992
- n = !0;
993
- break;
987
+ if (a) {
988
+ if (a.classList.contains("show-placeholder"))
989
+ continue;
990
+ if (a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
991
+ n = !0;
992
+ break;
993
+ }
994
994
  }
995
995
  }
996
996
  else if (o.type === "select" && o.key) {
@@ -1031,11 +1031,11 @@ function Pe(t, b, p, l) {
1031
1031
  break;
1032
1032
  }
1033
1033
  }
1034
- let y = !0;
1034
+ let f = !0;
1035
1035
  for (const s of e)
1036
1036
  if (s.type === "upload" && s.key) {
1037
- if (p[s.key] === null || p[s.key] === void 0) {
1038
- y = !1;
1037
+ if (d[s.key] === null || d[s.key] === void 0) {
1038
+ f = !1;
1039
1039
  break;
1040
1040
  }
1041
1041
  } else if (s.type === "variable" && s.key)
@@ -1044,11 +1044,14 @@ function Pe(t, b, p, l) {
1044
1044
  `[data-type="variable"][data-multi-key="${s.key}"]`
1045
1045
  );
1046
1046
  let n = 0;
1047
- for (const a of Array.from(r))
1047
+ for (const a of Array.from(r)) {
1048
+ if (a.classList.contains("show-placeholder"))
1049
+ continue;
1048
1050
  a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (n += 1);
1051
+ }
1049
1052
  const o = s.minCount && s.minCount > 0 ? s.minCount : 1;
1050
1053
  if (n < o) {
1051
- y = !1;
1054
+ f = !1;
1052
1055
  break;
1053
1056
  }
1054
1057
  } else {
@@ -1056,11 +1059,15 @@ function Pe(t, b, p, l) {
1056
1059
  `[data-type="variable"][data-key="${s.key}"]`
1057
1060
  );
1058
1061
  if (!r) {
1059
- y = !1;
1062
+ f = !1;
1063
+ break;
1064
+ }
1065
+ if (r.classList.contains("show-placeholder")) {
1066
+ f = !1;
1060
1067
  break;
1061
1068
  }
1062
1069
  if (r.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1063
- y = !1;
1070
+ f = !1;
1064
1071
  break;
1065
1072
  }
1066
1073
  }
@@ -1069,7 +1076,7 @@ function Pe(t, b, p, l) {
1069
1076
  `[data-type="select"][data-key="${s.key}"]`
1070
1077
  );
1071
1078
  if (!r || (r.value || "").trim().length === 0) {
1072
- y = !1;
1079
+ f = !1;
1073
1080
  break;
1074
1081
  }
1075
1082
  } else if (s.type === "textarea" && s.key) {
@@ -1077,7 +1084,7 @@ function Pe(t, b, p, l) {
1077
1084
  `[data-type="textarea"][data-key="${s.key}"]`
1078
1085
  );
1079
1086
  if (!r || (r.value || "").trim().length === 0) {
1080
- y = !1;
1087
+ f = !1;
1081
1088
  break;
1082
1089
  }
1083
1090
  } else if (s.type === "richtext" && s.key) {
@@ -1085,7 +1092,7 @@ function Pe(t, b, p, l) {
1085
1092
  `[data-type="richtext"][data-key="${s.key}"]`
1086
1093
  );
1087
1094
  if (!r || (r.textContent || "").replace(/[\u200B]/g, "").trim().length === 0) {
1088
- y = !1;
1095
+ f = !1;
1089
1096
  break;
1090
1097
  }
1091
1098
  } else if (s.type === "datepicker" && s.key) {
@@ -1093,95 +1100,95 @@ function Pe(t, b, p, l) {
1093
1100
  `[data-type="datepicker"][data-key="${s.key}"]`
1094
1101
  );
1095
1102
  if (!r || (r.getAttribute("data-value") || "").trim().length === 0) {
1096
- y = !1;
1103
+ f = !1;
1097
1104
  break;
1098
1105
  }
1099
1106
  }
1100
- l(q && y);
1107
+ i(q && f);
1101
1108
  }
1102
- function Ve(t, b) {
1109
+ function Me(t, x) {
1103
1110
  if (!t.current) return;
1104
- t.current.querySelectorAll('[data-type="variable"]').forEach((l) => {
1105
- const f = l.innerText.replace(/\n/g, "");
1106
- f.replace(/\u200B/g, "") ? l.classList.remove("show-placeholder") : (f !== "​" && (l.innerText = "​"), l.classList.add("show-placeholder"));
1111
+ t.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
1112
+ const u = i.innerText.replace(/\n/g, "");
1113
+ u.replace(/\u200B/g, "") ? i.classList.remove("show-placeholder") : (u !== "​" && (i.innerText = "​"), i.classList.add("show-placeholder"));
1107
1114
  });
1108
1115
  }
1109
- function Nt(t, b, p, l, f, T = {}, M) {
1116
+ function St(t, x, d, i, u, T = {}, I) {
1110
1117
  if (!t.current) return;
1111
1118
  let $ = "", w = 0;
1112
- for (; w < b.length; ) {
1113
- const e = b[w], q = w + 1 < b.length ? b[w + 1] : null;
1119
+ for (; w < x.length; ) {
1120
+ const e = x[w], q = w + 1 < x.length ? x[w + 1] : null;
1114
1121
  if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && q) {
1115
- const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup, u = q.type === "variable" && q.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === q.exclusionGroup;
1122
+ const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup, p = q.type === "variable" && q.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === q.exclusionGroup;
1116
1123
  if (a) {
1117
- const x = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1118
- let _ = "";
1119
- e.className ? _ = `<span class="${e.className}">${e.text ?? ""}</span>` : _ = e.text ?? "";
1120
- const k = q, P = p[k.key] !== null && p[k.key] !== void 0, H = P ? p[k.key] : null, F = P ? p[k.key]?.name : k.text, U = P ? "" : "hidden", R = k.tooltip && !P ? "" : "hidden", ee = P ? "has-file" : "", re = P && F ? ` data-file-name="${F.replace(/"/g, "&quot;")}"` : "";
1121
- let i = "";
1122
- P && H && (H.type?.startsWith("image/") ? i = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(H)}" alt="preview" />` : i = "<i class='iconfont icon-exlwenjian'></i>");
1123
- const c = `<span contenteditable="false" data-type="upload" data-key="${k.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${i}</span><span class="upload-label"${re}>${F || k.text}</span>${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${R}" data-upload-key="${k.key}" data-tooltip="${k.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${U}" title="移除文件">×</span></span></span>`;
1124
- $ += x + _ + c + v, w += 2;
1124
+ const g = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
1125
+ let V = "";
1126
+ e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
1127
+ const k = q, P = d[k.key] !== null && d[k.key] !== void 0, H = P ? d[k.key] : null, F = P ? d[k.key]?.name : k.text, U = P ? "" : "hidden", R = k.tooltip && !P ? "" : "hidden", ee = P ? "has-file" : "", re = P && F ? ` data-file-name="${F.replace(/"/g, "&quot;")}"` : "";
1128
+ let l = "";
1129
+ P && H && (H.type?.startsWith("image/") ? l = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(H)}" alt="preview" />` : l = "<i class='iconfont icon-exlwenjian'></i>");
1130
+ const c = `<span contenteditable="false" data-type="upload" data-key="${k.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${l}</span><span class="upload-label"${re}>${F || k.text}</span>${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${R}" data-upload-key="${k.key}" data-tooltip="${k.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${U}" title="移除文件">×</span></span></span>`;
1131
+ $ += g + V + c + b, w += 2;
1125
1132
  continue;
1126
1133
  }
1127
- if (u) {
1128
- const x = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1129
- let _ = "";
1130
- e.className ? _ = `<span class="${e.className}">${e.text ?? ""}</span>` : _ = e.text ?? "";
1131
- const k = q, H = (k.key ? f[k.key] : void 0) || k.text || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = k.exclusionGroup ? ` data-group="${k.exclusionGroup}"` : "", re = k.tooltip ? ` data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${k.key || ""}"` : "", i = k.tooltip && F ? "" : "hidden", c = `<span contenteditable="true" data-type="variable" data-key="${k.key}" data-placeholder="${k.placeholder || ""}"${ee}${re} class="variable-chip ${R}">${U}${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${i}" data-variable-key="${k.key}" data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1132
- $ += x + _ + c + v, w += 2;
1134
+ if (p) {
1135
+ const g = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
1136
+ let V = "";
1137
+ e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
1138
+ const k = q, H = (k.key ? u[k.key] : void 0) || k.text || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = k.exclusionGroup ? ` data-group="${k.exclusionGroup}"` : "", re = k.tooltip ? ` data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${k.key || ""}"` : "", l = k.tooltip && F ? "" : "hidden", c = `<span contenteditable="true" data-type="variable" data-key="${k.key}" data-placeholder="${k.placeholder || ""}"${ee}${re} class="variable-chip ${R}">${U}${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${l}" data-variable-key="${k.key}" data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1139
+ $ += g + V + c + b, w += 2;
1133
1140
  continue;
1134
1141
  }
1135
1142
  }
1136
1143
  const s = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", r = e.exclusionGroup ? `<span ${s} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
1137
1144
  let o = "";
1138
1145
  if (e.type === "tag") {
1139
- const u = l || 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>', d = l ? ' data-locked="true"' : "", x = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1140
- o = `<span contenteditable="false" class="tag-node group"${d}${x}><span class="tag-label">${e.text}</span>${u}</span>`;
1146
+ const p = i || I === "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>', y = i ? ' data-locked="true"' : "", g = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1147
+ o = `<span contenteditable="false" class="tag-node group"${y}${g}><span class="tag-label">${e.text}</span>${p}</span>`;
1141
1148
  } else if (e.type === "text") {
1142
- const a = l ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', d = (e.text ?? "").replace(/\n/g, "<br/>");
1143
- e.className ? o = `<span class="${e.className}"${a}>${d}</span>` : o = l ? `<span${a}>${d}</span>` : `<span contenteditable="false">${d}</span>`;
1149
+ const a = i ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', y = (e.text ?? "").replace(/\n/g, "<br/>");
1150
+ e.className ? o = `<span class="${e.className}"${a}>${y}</span>` : o = i ? `<span${a}>${y}</span>` : `<span contenteditable="false">${y}</span>`;
1144
1151
  } else if (e.type === "variable" && e.key) {
1145
- const u = f[e.key] || e.text || "", d = !u, x = d ? "​" : u, v = d ? "show-placeholder" : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", k = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && d ? "" : "hidden", H = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${_}${k} class="variable-chip ${v}">${x}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1152
+ const p = u[e.key] || e.text || "", y = !p, g = y ? "​" : p, b = y ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", k = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && y ? "" : "hidden", H = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${k} class="variable-chip ${b}">${g}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1146
1153
  e.required ? o = `<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>${H}</span>` : o = H;
1147
1154
  } else if (e.type === "upload" && e.key) {
1148
- const a = p[e.key] !== null && p[e.key] !== void 0, u = a ? p[e.key] : null, d = a ? p[e.key]?.name : e.text, x = a ? "" : "hidden", v = e.tooltip && !a ? "" : "hidden", _ = a ? "has-file" : "", k = a && d ? ` data-file-name="${d.replace(/"/g, "&quot;")}"` : "";
1155
+ const a = d[e.key] !== null && d[e.key] !== void 0, p = a ? d[e.key] : null, y = a ? d[e.key]?.name : e.text, g = a ? "" : "hidden", b = e.tooltip && !a ? "" : "hidden", V = a ? "has-file" : "", k = a && y ? ` data-file-name="${y.replace(/"/g, "&quot;")}"` : "";
1149
1156
  let P = "";
1150
- a && u && (u.type?.startsWith("image/") ? P = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(u)}" alt="preview" />` : P = "<i class='iconfont icon-exlwenjian'></i>");
1151
- const H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${_}"><span class="upload-icon">${P}</span><span class="upload-label"${k}>${d || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${v}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${x}" title="移除文件">×</span></span></span>`;
1157
+ a && p && (p.type?.startsWith("image/") ? P = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(p)}" alt="preview" />` : P = "<i class='iconfont icon-exlwenjian'></i>");
1158
+ const H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${V}"><span class="upload-icon">${P}</span><span class="upload-label"${k}>${y || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${b}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${g}" title="移除文件">×</span></span></span>`;
1152
1159
  e.required ? o = `<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>${H}</span>` : o = H;
1153
1160
  } else if (e.type === "select" && e.key) {
1154
- const a = f[e.key] || "", u = (e.options || []).map((v) => {
1155
- const _ = a === v.value ? "selected" : "";
1156
- return `<option value="${v.value}" ${_}>${v.label}</option>`;
1157
- }).join(""), d = e.placeholder ? `<option value="" ${a ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", x = `<select data-type="select" data-key="${e.key}" class="rte-select">${d}${u}</select>`;
1158
- e.required ? o = `<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>${x}</span>` : o = x;
1161
+ const a = u[e.key] || e.defaultValue || "", p = (e.options || []).map((b) => {
1162
+ const V = a === b.value ? "selected" : "";
1163
+ return `<option value="${b.value}" ${V}>${b.label}</option>`;
1164
+ }).join(""), y = e.placeholder ? `<option value="" ${a ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", g = `<select data-type="select" data-key="${e.key}" class="rte-select">${y}${p}</select>`;
1165
+ e.required ? o = `<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>` : o = g;
1159
1166
  } else if (e.type === "textarea" && e.key) {
1160
- const a = f[e.key] || "", u = e.maxHeight || 252, d = e.expandable !== !1, x = e.placeholder ? ` placeholder="${e.placeholder}"` : "", v = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${u}" style="max-height:${u}px;"${x}>${a}</textarea>`, _ = d ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", k = `<div class="rte-textarea-wrapper" data-key="${e.key}">${v}${_}</div>`;
1167
+ const a = u[e.key] || "", p = e.maxHeight || 252, y = e.expandable !== !1, g = e.placeholder ? ` placeholder="${e.placeholder}"` : "", b = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${p}" style="max-height:${p}px;"${g}>${a}</textarea>`, V = y ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", k = `<div class="rte-textarea-wrapper" data-key="${e.key}">${b}${V}</div>`;
1161
1168
  e.required ? o = `<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>${k}</span>` : o = k;
1162
1169
  } else if (e.type === "richtext" && e.key) {
1163
- const a = f[e.key] || e.text || "", u = e.minHeight || 140, d = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", x = e.expandable !== !1, v = a, _ = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${d} style="min-height:${u}px;">${v}</div>`, k = x ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", P = `<div class="rte-richtext-wrapper" data-key="${e.key}">${_}${k}</div>`, H = `<div class="rte-richtext-container" data-key="${e.key}">${P}</div>`;
1170
+ const a = u[e.key] || e.text || "", p = e.minHeight || 140, y = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", g = e.expandable !== !1, b = a, V = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${y} style="min-height:${p}px;">${b}</div>`, k = g ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", P = `<div class="rte-richtext-wrapper" data-key="${e.key}">${V}${k}</div>`, H = `<div class="rte-richtext-container" data-key="${e.key}">${P}</div>`;
1164
1171
  e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${H}</div>` : o = H;
1165
1172
  } else if (e.type === "datepicker" && e.key) {
1166
- const a = f[e.key] || "", u = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", d = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", x = e.disableFuture ? ' data-disable-future="true"' : "", v = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${u}${d}${x}></div>`;
1167
- e.required ? o = `<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>` : o = v;
1173
+ const a = u[e.key] || "", p = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", y = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", g = e.disableFuture ? ' data-disable-future="true"' : "", b = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${p}${y}${g}></div>`;
1174
+ e.required ? o = `<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>` : o = b;
1168
1175
  } else if (e.type === "multi-variable" && e.key) {
1169
- const a = e.maxCount || 9, u = T[e.key] || 1, d = Math.min(u, a);
1176
+ const a = e.maxCount || 9, p = T[e.key] || 1, y = Math.min(p, a);
1170
1177
  if (e.required) {
1171
- const x = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, v = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1172
- let _ = "";
1173
- for (let k = 0; k < d; k++) {
1174
- const P = `${e.key}_${k}`, H = f[P] || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", i = `<span contenteditable="true" data-type="variable" data-key="${P}" data-multi-key="${e.key}" data-index="${k}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${R}">${U}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1175
- k === 0 ? _ += `<span ${v} class="exclusion-wrapper required-upload-group required-multi-first">${x}${i}</span>` : _ += i;
1178
+ const g = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, b = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1179
+ let V = "";
1180
+ for (let k = 0; k < y; k++) {
1181
+ const P = `${e.key}_${k}`, H = u[P] || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", l = `<span contenteditable="true" data-type="variable" data-key="${P}" data-multi-key="${e.key}" data-index="${k}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${R}">${U}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1182
+ k === 0 ? V += `<span ${b} class="exclusion-wrapper required-upload-group required-multi-first">${g}${l}</span>` : V += l;
1176
1183
  }
1177
- o = _;
1184
+ o = V;
1178
1185
  } else {
1179
- let x = "";
1180
- for (let v = 0; v < d; v++) {
1181
- const _ = `${e.key}_${v}`, k = f[_] || "", P = !k, H = P ? "​" : k, F = P ? "show-placeholder" : "", U = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", R = e.tooltip && P ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${_}" data-multi-key="${e.key}" data-index="${v}" data-placeholder="${e.placeholder || ""}"${U} class="variable-chip ${F}">${H}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${R}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1182
- x += ee;
1186
+ let g = "";
1187
+ for (let b = 0; b < y; b++) {
1188
+ const V = `${e.key}_${b}`, k = u[V] || "", P = !k, H = P ? "​" : k, F = P ? "show-placeholder" : "", U = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", R = e.tooltip && P ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${b}" data-placeholder="${e.placeholder || ""}"${U} class="variable-chip ${F}">${H}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${R}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1189
+ g += ee;
1183
1190
  }
1184
- o = x;
1191
+ o = g;
1185
1192
  }
1186
1193
  }
1187
1194
  $ += r + o + n, w++;
@@ -1189,56 +1196,56 @@ function Nt(t, b, p, l, f, T = {}, M) {
1189
1196
  t.current && (t.current.innerHTML = $, setTimeout(() => {
1190
1197
  if (!t.current) return;
1191
1198
  t.current.querySelectorAll('[data-type="variable"]').forEach((q) => {
1192
- const y = q.innerText.replace(/\n/g, "");
1193
- y.replace(/\u200B/g, "") ? q.classList.remove("show-placeholder") : (y !== "​" && (q.innerText = "​"), q.classList.add("show-placeholder"));
1199
+ const f = q.innerText.replace(/\n/g, "");
1200
+ f.replace(/\u200B/g, "") ? q.classList.remove("show-placeholder") : (f !== "​" && (q.innerText = "​"), q.classList.add("show-placeholder"));
1194
1201
  });
1195
1202
  }, 0));
1196
1203
  }
1197
- function At(t, b, p, l, f = {}, T, M, $) {
1204
+ function At(t, x, d, i, u = {}, T, I, $) {
1198
1205
  const w = ae(() => {
1199
1206
  if (!t.current) return;
1200
- if (b.length === 0) {
1207
+ if (x.length === 0) {
1201
1208
  t.current.innerHTML = "";
1202
1209
  return;
1203
1210
  }
1204
1211
  let e = {};
1205
- const y = t.current.__tempVariableValues;
1206
- if (y ? (e = y, setTimeout(() => {
1212
+ const f = t.current.__tempVariableValues;
1213
+ if (f ? (e = f, setTimeout(() => {
1207
1214
  if (t.current) {
1208
1215
  const s = t.current;
1209
- s.__tempVariableValues === y && delete s.__tempVariableValues;
1210
- }
1211
- }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((u) => {
1212
- const d = u.dataset.key;
1213
- if (d) {
1214
- const x = u.innerText.replace(/[\u200B\n]/g, "").trim();
1215
- x && (e[d] = x);
1216
- }
1217
- }), t.current.querySelectorAll('[data-type="select"]').forEach((u) => {
1218
- const d = u.dataset.key;
1219
- if (d) {
1220
- const x = u.value.trim();
1221
- x && (e[d] = x);
1222
- }
1223
- }), t.current.querySelectorAll('[data-type="textarea"]').forEach((u) => {
1224
- const d = u.dataset.key;
1225
- if (d) {
1226
- const x = u.value.replace(/[\u200B]/g, "").trim();
1227
- x && (e[d] = x);
1228
- }
1229
- }), t.current.querySelectorAll('[data-type="richtext"]').forEach((u) => {
1230
- const d = u.dataset.key;
1231
- if (d) {
1232
- const x = (u.textContent || "").replace(/[\u200B]/g, "").trim();
1233
- x && (e[d] = x);
1234
- }
1235
- }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((u) => {
1236
- const d = u.dataset.key;
1237
- if (d) {
1238
- const x = (u.getAttribute("data-value") || "").trim();
1239
- x && (e[d] = x);
1240
- }
1241
- })), Nt(t, b, p, l, e, f, $), T?.current) {
1216
+ s.__tempVariableValues === f && delete s.__tempVariableValues;
1217
+ }
1218
+ }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((p) => {
1219
+ const y = p.dataset.key;
1220
+ if (y) {
1221
+ const g = p.innerText.replace(/[\u200B\n]/g, "").trim();
1222
+ g && (e[y] = g);
1223
+ }
1224
+ }), t.current.querySelectorAll('[data-type="select"]').forEach((p) => {
1225
+ const y = p.dataset.key;
1226
+ if (y) {
1227
+ const g = p.value.trim();
1228
+ g && (e[y] = g);
1229
+ }
1230
+ }), t.current.querySelectorAll('[data-type="textarea"]').forEach((p) => {
1231
+ const y = p.dataset.key;
1232
+ if (y) {
1233
+ const g = p.value.replace(/[\u200B]/g, "").trim();
1234
+ g && (e[y] = g);
1235
+ }
1236
+ }), t.current.querySelectorAll('[data-type="richtext"]').forEach((p) => {
1237
+ const y = p.dataset.key;
1238
+ if (y) {
1239
+ const g = (p.textContent || "").replace(/[\u200B]/g, "").trim();
1240
+ g && (e[y] = g);
1241
+ }
1242
+ }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((p) => {
1243
+ const y = p.dataset.key;
1244
+ if (y) {
1245
+ const g = (p.getAttribute("data-value") || "").trim();
1246
+ g && (e[y] = g);
1247
+ }
1248
+ })), St(t, x, d, i, e, u, $), T?.current) {
1242
1249
  const { key: s, offset: r } = T.current;
1243
1250
  setTimeout(() => {
1244
1251
  if (!t.current) return;
@@ -1252,23 +1259,23 @@ function At(t, b, p, l, f = {}, T, M, $) {
1252
1259
  NodeFilter.SHOW_TEXT,
1253
1260
  null
1254
1261
  );
1255
- let u = 0, d = null, x = 0;
1262
+ let p = 0, y = null, g = 0;
1256
1263
  for (; a.nextNode(); ) {
1257
- const v = a.currentNode, _ = v.textContent?.length || 0;
1258
- if (u + _ >= r) {
1259
- d = v, x = r - u;
1264
+ const b = a.currentNode, V = b.textContent?.length || 0;
1265
+ if (p + V >= r) {
1266
+ y = b, g = r - p;
1260
1267
  break;
1261
1268
  }
1262
- u += _;
1269
+ p += V;
1263
1270
  }
1264
- if (d) {
1265
- o.setStart(d, Math.min(x, d.textContent?.length || 0)), o.collapse(!0);
1266
- const v = window.getSelection();
1267
- v && (v.removeAllRanges(), v.addRange(o), n.focus());
1271
+ if (y) {
1272
+ o.setStart(y, Math.min(g, y.textContent?.length || 0)), o.collapse(!0);
1273
+ const b = window.getSelection();
1274
+ b && (b.removeAllRanges(), b.addRange(o), n.focus());
1268
1275
  } else {
1269
1276
  o.selectNodeContents(n), o.collapse(!1);
1270
- const v = window.getSelection();
1271
- v && (v.removeAllRanges(), v.addRange(o), n.focus());
1277
+ const b = window.getSelection();
1278
+ b && (b.removeAllRanges(), b.addRange(o), n.focus());
1272
1279
  }
1273
1280
  } catch {
1274
1281
  const o = document.createRange();
@@ -1280,154 +1287,157 @@ function At(t, b, p, l, f = {}, T, M, $) {
1280
1287
  }
1281
1288
  }, 0);
1282
1289
  }
1283
- }, [b, p, l, t, f, T, M, $]);
1290
+ }, [x, d, i, t, u, T, I, $]);
1284
1291
  de(() => {
1285
1292
  w();
1286
1293
  }, [w]);
1287
1294
  }
1288
- function Lt(t, b, p, l) {
1295
+ function Lt(t, x, d, i) {
1289
1296
  de(() => {
1290
- const f = t.current;
1291
- if (!f) return;
1297
+ const u = t.current;
1298
+ if (!u) return;
1292
1299
  const T = ($) => {
1293
1300
  const w = $.target?.closest(".upload-info-icon");
1294
1301
  if (w && w.classList.contains("upload-info-icon")) {
1295
1302
  const q = w.dataset.uploadKey;
1296
- q && l({ key: q, anchorEl: w, type: "upload" });
1303
+ q && i({ key: q, anchorEl: w, type: "upload" });
1297
1304
  return;
1298
1305
  }
1299
1306
  const e = $.target?.closest('[data-type="upload"]');
1300
1307
  if (e) {
1301
1308
  const q = e.dataset.key;
1302
1309
  if (q) {
1303
- const y = p[q];
1304
- y && y.type && y.type.startsWith("image/") && l({ key: q, anchorEl: e, type: "upload-preview" });
1310
+ const f = d[q];
1311
+ f && f.type && f.type.startsWith("image/") && i({ key: q, anchorEl: e, type: "upload-preview" });
1305
1312
  }
1306
1313
  }
1307
- }, M = ($) => {
1314
+ }, I = ($) => {
1308
1315
  const w = $.target?.closest(".upload-info-icon"), e = $.relatedTarget;
1309
1316
  if (w && w.classList.contains("upload-info-icon")) {
1310
- !e || !f.contains(e) ? l(null) : e.closest(".upload-info-icon") || l(null);
1317
+ !e || !u.contains(e) ? i(null) : e.closest(".upload-info-icon") || i(null);
1311
1318
  return;
1312
1319
  }
1313
1320
  const q = $.target?.closest('[data-type="upload"]');
1314
1321
  if (q) {
1315
- const y = e;
1316
- if (y && q.contains(y))
1322
+ const f = e;
1323
+ if (f && q.contains(f))
1317
1324
  return;
1318
- l(null);
1325
+ i(null);
1319
1326
  }
1320
1327
  };
1321
- return f.addEventListener("mouseover", T, !0), f.addEventListener("mouseout", M, !0), () => {
1322
- f.removeEventListener("mouseover", T, !0), f.removeEventListener("mouseout", M, !0);
1328
+ return u.addEventListener("mouseover", T, !0), u.addEventListener("mouseout", I, !0), () => {
1329
+ u.removeEventListener("mouseover", T, !0), u.removeEventListener("mouseout", I, !0);
1323
1330
  };
1324
- }, [b, p, t, l]);
1331
+ }, [x, d, t, i]);
1325
1332
  }
1326
- function It(t, b, p, l) {
1333
+ function _t(t, x, d, i) {
1327
1334
  de(() => {
1328
1335
  if (!t.current) return;
1329
- const f = (w) => {
1330
- if (l === "hideTagClose")
1336
+ const u = (w) => {
1337
+ if (i === "hideTagClose")
1331
1338
  return;
1332
- const e = w.currentTarget, q = e.dataset.tooltip, y = e.dataset.tagKey || "";
1333
- q && p({ key: y, anchorEl: e, type: "tag" });
1339
+ const e = w.currentTarget, q = e.dataset.tooltip, f = e.dataset.tagKey || "";
1340
+ q && d({ key: f, anchorEl: e, type: "tag" });
1334
1341
  }, T = () => {
1335
- p(null);
1342
+ d(null);
1336
1343
  };
1337
- let M;
1344
+ let I;
1338
1345
  const $ = () => {
1339
1346
  if (!t.current) return;
1340
1347
  t.current.querySelectorAll(
1341
1348
  ".tag-node[data-tooltip]"
1342
1349
  ).forEach((e) => {
1343
- e.addEventListener("mouseenter", f), e.addEventListener("mouseleave", T);
1350
+ e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", T);
1344
1351
  });
1345
1352
  };
1346
- return M = requestAnimationFrame(() => {
1347
- M = requestAnimationFrame($);
1353
+ return I = requestAnimationFrame(() => {
1354
+ I = requestAnimationFrame($);
1348
1355
  }), () => {
1349
- cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
1356
+ cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
1350
1357
  ".tag-node[data-tooltip]"
1351
1358
  ).forEach((e) => {
1352
- e.removeEventListener("mouseenter", f), e.removeEventListener("mouseleave", T);
1359
+ e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", T);
1353
1360
  });
1354
1361
  };
1355
- }, [b, t, p, l]);
1362
+ }, [x, t, d, i]);
1356
1363
  }
1357
- function Dt(t, b, p) {
1364
+ function Dt(t, x, d) {
1358
1365
  de(() => {
1359
- const l = t.current;
1360
- if (!l) return;
1361
- const f = (M) => {
1362
- const $ = M.target?.closest(".variable-info-icon");
1366
+ const i = t.current;
1367
+ if (!i) return;
1368
+ const u = (I) => {
1369
+ const $ = I.target?.closest(".variable-info-icon");
1363
1370
  if ($ && $.classList.contains("variable-info-icon")) {
1364
1371
  const w = $.dataset.variableKey;
1365
- w && p({ key: w, anchorEl: $, type: "variable" });
1372
+ w && d({ key: w, anchorEl: $, type: "variable" });
1366
1373
  }
1367
- }, T = (M) => {
1368
- const $ = M.target?.closest(".variable-info-icon"), w = M.relatedTarget;
1369
- $ && $.classList.contains("variable-info-icon") && (!w || !l.contains(w) ? p(null) : w.closest(".variable-info-icon") || p(null));
1374
+ }, T = (I) => {
1375
+ const $ = I.target?.closest(".variable-info-icon"), w = I.relatedTarget;
1376
+ $ && $.classList.contains("variable-info-icon") && (!w || !i.contains(w) ? d(null) : w.closest(".variable-info-icon") || d(null));
1370
1377
  };
1371
- return l.addEventListener("mouseover", f, !0), l.addEventListener("mouseout", T, !0), () => {
1372
- l.removeEventListener("mouseover", f, !0), l.removeEventListener("mouseout", T, !0);
1378
+ return i.addEventListener("mouseover", u, !0), i.addEventListener("mouseout", T, !0), () => {
1379
+ i.removeEventListener("mouseover", u, !0), i.removeEventListener("mouseout", T, !0);
1373
1380
  };
1374
- }, [b, t, p]);
1381
+ }, [x, t, d]);
1375
1382
  }
1376
- function Mt(t, b, p, l) {
1383
+ function It(t, x, d, i) {
1377
1384
  de(() => {
1378
1385
  if (!t.current) return;
1379
- const f = (w) => {
1386
+ const u = (w) => {
1380
1387
  const e = w.currentTarget;
1381
- e.dataset.fileName && l({ key: "", anchorEl: e, type: "upload-label" });
1388
+ e.dataset.fileName && i({ key: "", anchorEl: e, type: "upload-label" });
1382
1389
  }, T = () => {
1383
- l(null);
1390
+ i(null);
1384
1391
  };
1385
- let M;
1392
+ let I;
1386
1393
  const $ = () => {
1387
1394
  if (!t.current) return;
1388
1395
  t.current.querySelectorAll(
1389
1396
  ".upload-label[data-file-name]"
1390
1397
  ).forEach((e) => {
1391
- e.addEventListener("mouseenter", f), e.addEventListener("mouseleave", T);
1398
+ e.addEventListener("mouseenter", u), e.addEventListener("mouseleave", T);
1392
1399
  });
1393
1400
  };
1394
- return M = requestAnimationFrame(() => {
1395
- M = requestAnimationFrame($);
1401
+ return I = requestAnimationFrame(() => {
1402
+ I = requestAnimationFrame($);
1396
1403
  }), () => {
1397
- cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
1404
+ cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
1398
1405
  ".upload-label[data-file-name]"
1399
1406
  ).forEach((e) => {
1400
- e.removeEventListener("mouseenter", f), e.removeEventListener("mouseleave", T);
1407
+ e.removeEventListener("mouseenter", u), e.removeEventListener("mouseleave", T);
1401
1408
  });
1402
1409
  };
1403
- }, [b, p, t, l]);
1410
+ }, [x, d, t, i]);
1404
1411
  }
1405
- function Vt(t, b, p, l) {
1412
+ function Mt(t, x, d, i) {
1406
1413
  de(() => {
1407
- Be(t, b, p), Pe(t, b, p, l);
1408
- }, [p, b, t, l]);
1414
+ const u = setTimeout(() => {
1415
+ Be(t, x, d), Pe(t, x, d, i);
1416
+ }, 0);
1417
+ return () => clearTimeout(u);
1418
+ }, [d, x, t, i]);
1409
1419
  }
1410
- function _t(t, b) {
1411
- const p = Q(0);
1420
+ function Vt(t, x) {
1421
+ const d = Q(0);
1412
1422
  de(() => {
1413
1423
  if (!t.current) return;
1414
- let l = !1, f = 0;
1415
- const T = (a) => a instanceof HTMLElement ? !!(a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker") || a.closest(".ant-picker-dropdown")) : !1, M = (a) => {
1416
- l = !0, T(a.target) && (p.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target"));
1424
+ let i = !1, u = 0;
1425
+ const T = (a) => a instanceof HTMLElement ? !!(a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker") || a.closest(".ant-picker-dropdown")) : !1, I = (a) => {
1426
+ i = !0, T(a.target) && (d.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target"));
1417
1427
  }, $ = () => {
1418
- l = !1, f = Date.now();
1428
+ i = !1, u = Date.now();
1419
1429
  };
1420
1430
  let w = !1, e = 0;
1421
1431
  const q = () => {
1422
1432
  w = !0;
1423
- }, y = () => {
1433
+ }, f = () => {
1424
1434
  w = !1, e = Date.now();
1425
1435
  }, s = () => {
1426
1436
  e = Date.now();
1427
1437
  }, r = (a) => {
1428
- T(a.target) && (p.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
1438
+ T(a.target) && (d.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
1429
1439
  }, n = () => {
1430
- if (Date.now() - p.current < 800) {
1440
+ if (Date.now() - d.current < 800) {
1431
1441
  console.log("[SelectionCtrl] skip selectionchange due to recent datepicker interaction");
1432
1442
  return;
1433
1443
  }
@@ -1438,28 +1448,28 @@ function _t(t, b) {
1438
1448
  return;
1439
1449
  }
1440
1450
  if (!t.current) return;
1441
- const u = window.getSelection();
1442
- if (!u || u.rangeCount === 0 || b.current || l || w || Date.now() - e < 500)
1451
+ const p = window.getSelection();
1452
+ if (!p || p.rangeCount === 0 || x.current || i || w || Date.now() - e < 500)
1443
1453
  return;
1444
- const d = u.getRangeAt(0);
1445
- if (!d.collapsed)
1446
- return t.current.contains(d.commonAncestorContainer), void 0;
1447
- const x = u.anchorNode;
1448
- if (!x || !t.current.contains(x))
1454
+ const y = p.getRangeAt(0);
1455
+ if (!y.collapsed)
1456
+ return t.current.contains(y.commonAncestorContainer), void 0;
1457
+ const g = p.anchorNode;
1458
+ if (!g || !t.current.contains(g))
1449
1459
  return;
1450
- let v = !1;
1451
- if (x.nodeType === Node.ELEMENT_NODE) {
1452
- const k = x;
1453
- (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (v = !0);
1454
- } else if (x.parentElement) {
1455
- const k = x.parentElement;
1456
- (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (v = !0);
1457
- }
1458
- if (v)
1460
+ let b = !1;
1461
+ if (g.nodeType === Node.ELEMENT_NODE) {
1462
+ const k = g;
1463
+ (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (b = !0);
1464
+ } else if (g.parentElement) {
1465
+ const k = g.parentElement;
1466
+ (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (b = !0);
1467
+ }
1468
+ if (b)
1459
1469
  return;
1460
- let _ = null;
1461
- if (x.nodeType === Node.ELEMENT_NODE ? _ = x.closest('[data-type="variable"]') : x.nodeType === Node.TEXT_NODE && x.parentElement && (_ = x.parentElement.closest('[data-type="variable"]')), !_) {
1462
- if (Date.now() - f > 500)
1470
+ let V = null;
1471
+ if (g.nodeType === Node.ELEMENT_NODE ? V = g.closest('[data-type="variable"]') : g.nodeType === Node.TEXT_NODE && g.parentElement && (V = g.parentElement.closest('[data-type="variable"]')), !V) {
1472
+ if (Date.now() - u > 500)
1463
1473
  return;
1464
1474
  const k = t.current.querySelectorAll('[data-type="variable"]');
1465
1475
  if (k.length > 0) {
@@ -1471,123 +1481,123 @@ function _t(t, b) {
1471
1481
  }
1472
1482
  if (!P && k.length > 0 && (P = k[0]), P) {
1473
1483
  const H = document.createRange();
1474
- H.selectNodeContents(P), H.collapse(!1), u.removeAllRanges(), u.addRange(H), P.focus();
1484
+ H.selectNodeContents(P), H.collapse(!1), p.removeAllRanges(), p.addRange(H), P.focus();
1475
1485
  } else
1476
- u.removeAllRanges();
1486
+ p.removeAllRanges();
1477
1487
  } else
1478
- u.removeAllRanges();
1488
+ p.removeAllRanges();
1479
1489
  }
1480
1490
  }, o = t.current;
1481
- return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", y), o.addEventListener("input", s)), document.addEventListener("mousedown", M), document.addEventListener("mouseup", $), document.addEventListener("focusin", r), document.addEventListener("selectionchange", n), () => {
1491
+ return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", f), o.addEventListener("input", s)), document.addEventListener("mousedown", I), document.addEventListener("mouseup", $), document.addEventListener("focusin", r), document.addEventListener("selectionchange", n), () => {
1482
1492
  const a = t.current;
1483
- a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", y), a.removeEventListener("input", s)), document.removeEventListener("mousedown", M), document.removeEventListener("mouseup", $), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", n);
1493
+ a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", f), a.removeEventListener("input", s)), document.removeEventListener("mousedown", I), document.removeEventListener("mouseup", $), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", n);
1484
1494
  };
1485
- }, [t, b]);
1495
+ }, [t, x]);
1486
1496
  }
1487
1497
  function Bt(t) {
1488
1498
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1489
1499
  }
1490
1500
  var De = { exports: {} }, Pt = De.exports, je;
1491
1501
  function Ot() {
1492
- return je || (je = 1, function(t, b) {
1493
- (function(p, l) {
1494
- t.exports = l();
1502
+ return je || (je = 1, function(t, x) {
1503
+ (function(d, i) {
1504
+ t.exports = i();
1495
1505
  })(Pt, function() {
1496
- var p = 1e3, l = 6e4, f = 36e5, T = "millisecond", M = "second", $ = "minute", w = "hour", e = "day", q = "week", y = "month", s = "quarter", r = "year", n = "date", o = "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(i) {
1497
- var c = ["th", "st", "nd", "rd"], g = i % 100;
1498
- return "[" + i + (c[(g - 20) % 10] || c[g] || c[0]) + "]";
1499
- } }, x = function(i, c, g) {
1500
- var L = String(i);
1501
- return !L || L.length >= c ? i : "" + Array(c + 1 - L.length).join(g) + i;
1502
- }, v = { s: x, z: function(i) {
1503
- var c = -i.utcOffset(), g = Math.abs(c), L = Math.floor(g / 60), S = g % 60;
1504
- return (c <= 0 ? "+" : "-") + x(L, 2, "0") + ":" + x(S, 2, "0");
1505
- }, m: function i(c, g) {
1506
- if (c.date() < g.date()) return -i(g, c);
1507
- var L = 12 * (g.year() - c.year()) + (g.month() - c.month()), S = c.clone().add(L, y), W = g - S < 0, z = c.clone().add(L + (W ? -1 : 1), y);
1508
- return +(-(L + (g - S) / (W ? S - z : z - S)) || 0);
1509
- }, a: function(i) {
1510
- return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
1511
- }, p: function(i) {
1512
- return { M: y, y: r, w: q, d: e, D: n, h: w, m: $, s: M, ms: T, Q: s }[i] || String(i || "").toLowerCase().replace(/s$/, "");
1513
- }, u: function(i) {
1514
- return i === void 0;
1515
- } }, _ = "en", k = {};
1516
- k[_] = d;
1517
- var P = "$isDayjsObject", H = function(i) {
1518
- return i instanceof ee || !(!i || !i[P]);
1519
- }, F = function i(c, g, L) {
1520
- var S;
1521
- if (!c) return _;
1506
+ var d = 1e3, i = 6e4, u = 36e5, T = "millisecond", I = "second", $ = "minute", w = "hour", e = "day", q = "week", f = "month", s = "quarter", r = "year", n = "date", o = "Invalid Date", a = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, p = /\[([^\]]+)]|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, y = { 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(l) {
1507
+ var c = ["th", "st", "nd", "rd"], v = l % 100;
1508
+ return "[" + l + (c[(v - 20) % 10] || c[v] || c[0]) + "]";
1509
+ } }, g = function(l, c, v) {
1510
+ var L = String(l);
1511
+ return !L || L.length >= c ? l : "" + Array(c + 1 - L.length).join(v) + l;
1512
+ }, b = { s: g, z: function(l) {
1513
+ var c = -l.utcOffset(), v = Math.abs(c), L = Math.floor(v / 60), N = v % 60;
1514
+ return (c <= 0 ? "+" : "-") + g(L, 2, "0") + ":" + g(N, 2, "0");
1515
+ }, m: function l(c, v) {
1516
+ if (c.date() < v.date()) return -l(v, c);
1517
+ var L = 12 * (v.year() - c.year()) + (v.month() - c.month()), N = c.clone().add(L, f), W = v - N < 0, z = c.clone().add(L + (W ? -1 : 1), f);
1518
+ return +(-(L + (v - N) / (W ? N - z : z - N)) || 0);
1519
+ }, a: function(l) {
1520
+ return l < 0 ? Math.ceil(l) || 0 : Math.floor(l);
1521
+ }, p: function(l) {
1522
+ return { M: f, y: r, w: q, d: e, D: n, h: w, m: $, s: I, ms: T, Q: s }[l] || String(l || "").toLowerCase().replace(/s$/, "");
1523
+ }, u: function(l) {
1524
+ return l === void 0;
1525
+ } }, V = "en", k = {};
1526
+ k[V] = y;
1527
+ var P = "$isDayjsObject", H = function(l) {
1528
+ return l instanceof ee || !(!l || !l[P]);
1529
+ }, F = function l(c, v, L) {
1530
+ var N;
1531
+ if (!c) return V;
1522
1532
  if (typeof c == "string") {
1523
1533
  var W = c.toLowerCase();
1524
- k[W] && (S = W), g && (k[W] = g, S = W);
1534
+ k[W] && (N = W), v && (k[W] = v, N = W);
1525
1535
  var z = c.split("-");
1526
- if (!S && z.length > 1) return i(z[0]);
1536
+ if (!N && z.length > 1) return l(z[0]);
1527
1537
  } else {
1528
1538
  var te = c.name;
1529
- k[te] = c, S = te;
1539
+ k[te] = c, N = te;
1530
1540
  }
1531
- return !L && S && (_ = S), S || !L && _;
1532
- }, U = function(i, c) {
1533
- if (H(i)) return i.clone();
1534
- var g = typeof c == "object" ? c : {};
1535
- return g.date = i, g.args = arguments, new ee(g);
1536
- }, R = v;
1537
- R.l = F, R.i = H, R.w = function(i, c) {
1538
- return U(i, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1541
+ return !L && N && (V = N), N || !L && V;
1542
+ }, U = function(l, c) {
1543
+ if (H(l)) return l.clone();
1544
+ var v = typeof c == "object" ? c : {};
1545
+ return v.date = l, v.args = arguments, new ee(v);
1546
+ }, R = b;
1547
+ R.l = F, R.i = H, R.w = function(l, c) {
1548
+ return U(l, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1539
1549
  };
1540
1550
  var ee = function() {
1541
- function i(g) {
1542
- this.$L = F(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[P] = !0;
1551
+ function l(v) {
1552
+ this.$L = F(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[P] = !0;
1543
1553
  }
1544
- var c = i.prototype;
1545
- return c.parse = function(g) {
1554
+ var c = l.prototype;
1555
+ return c.parse = function(v) {
1546
1556
  this.$d = function(L) {
1547
- var S = L.date, W = L.utc;
1548
- if (S === null) return /* @__PURE__ */ new Date(NaN);
1549
- if (R.u(S)) return /* @__PURE__ */ new Date();
1550
- if (S instanceof Date) return new Date(S);
1551
- if (typeof S == "string" && !/Z$/i.test(S)) {
1552
- var z = S.match(a);
1557
+ var N = L.date, W = L.utc;
1558
+ if (N === null) return /* @__PURE__ */ new Date(NaN);
1559
+ if (R.u(N)) return /* @__PURE__ */ new Date();
1560
+ if (N instanceof Date) return new Date(N);
1561
+ if (typeof N == "string" && !/Z$/i.test(N)) {
1562
+ var z = N.match(a);
1553
1563
  if (z) {
1554
1564
  var te = z[2] - 1 || 0, se = (z[7] || "0").substring(0, 3);
1555
1565
  return W ? new Date(Date.UTC(z[1], te, z[3] || 1, z[4] || 0, z[5] || 0, z[6] || 0, se)) : new Date(z[1], te, z[3] || 1, z[4] || 0, z[5] || 0, z[6] || 0, se);
1556
1566
  }
1557
1567
  }
1558
- return new Date(S);
1559
- }(g), this.init();
1568
+ return new Date(N);
1569
+ }(v), this.init();
1560
1570
  }, c.init = function() {
1561
- var g = this.$d;
1562
- this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
1571
+ var v = this.$d;
1572
+ 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();
1563
1573
  }, c.$utils = function() {
1564
1574
  return R;
1565
1575
  }, c.isValid = function() {
1566
1576
  return this.$d.toString() !== o;
1567
- }, c.isSame = function(g, L) {
1568
- var S = U(g);
1569
- return this.startOf(L) <= S && S <= this.endOf(L);
1570
- }, c.isAfter = function(g, L) {
1571
- return U(g) < this.startOf(L);
1572
- }, c.isBefore = function(g, L) {
1573
- return this.endOf(L) < U(g);
1574
- }, c.$g = function(g, L, S) {
1575
- return R.u(g) ? this[L] : this.set(S, g);
1577
+ }, c.isSame = function(v, L) {
1578
+ var N = U(v);
1579
+ return this.startOf(L) <= N && N <= this.endOf(L);
1580
+ }, c.isAfter = function(v, L) {
1581
+ return U(v) < this.startOf(L);
1582
+ }, c.isBefore = function(v, L) {
1583
+ return this.endOf(L) < U(v);
1584
+ }, c.$g = function(v, L, N) {
1585
+ return R.u(v) ? this[L] : this.set(N, v);
1576
1586
  }, c.unix = function() {
1577
1587
  return Math.floor(this.valueOf() / 1e3);
1578
1588
  }, c.valueOf = function() {
1579
1589
  return this.$d.getTime();
1580
- }, c.startOf = function(g, L) {
1581
- var S = this, W = !!R.u(L) || L, z = R.p(g), te = function(he, ye) {
1582
- var xe = R.w(S.$u ? Date.UTC(S.$y, ye, he) : new Date(S.$y, ye, he), S);
1590
+ }, c.startOf = function(v, L) {
1591
+ var N = this, W = !!R.u(L) || L, z = R.p(v), te = function(he, ye) {
1592
+ var xe = R.w(N.$u ? Date.UTC(N.$y, ye, he) : new Date(N.$y, ye, he), N);
1583
1593
  return W ? xe : xe.endOf(e);
1584
1594
  }, se = function(he, ye) {
1585
- return R.w(S.toDate()[he].apply(S.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), S);
1595
+ return R.w(N.toDate()[he].apply(N.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), N);
1586
1596
  }, ce = this.$W, pe = this.$M, fe = this.$D, be = "set" + (this.$u ? "UTC" : "");
1587
1597
  switch (z) {
1588
1598
  case r:
1589
1599
  return W ? te(1, 0) : te(31, 11);
1590
- case y:
1600
+ case f:
1591
1601
  return W ? te(1, pe) : te(0, pe + 1);
1592
1602
  case q:
1593
1603
  var X = this.$locale().weekStart || 0, ue = (ce < X ? ce + 7 : ce) - X;
@@ -1599,43 +1609,43 @@ function Ot() {
1599
1609
  return se(be + "Minutes", 1);
1600
1610
  case $:
1601
1611
  return se(be + "Seconds", 2);
1602
- case M:
1612
+ case I:
1603
1613
  return se(be + "Milliseconds", 3);
1604
1614
  default:
1605
1615
  return this.clone();
1606
1616
  }
1607
- }, c.endOf = function(g) {
1608
- return this.startOf(g, !1);
1609
- }, c.$set = function(g, L) {
1610
- var S, W = R.p(g), z = "set" + (this.$u ? "UTC" : ""), te = (S = {}, S[e] = z + "Date", S[n] = z + "Date", S[y] = z + "Month", S[r] = z + "FullYear", S[w] = z + "Hours", S[$] = z + "Minutes", S[M] = z + "Seconds", S[T] = z + "Milliseconds", S)[W], se = W === e ? this.$D + (L - this.$W) : L;
1611
- if (W === y || W === r) {
1617
+ }, c.endOf = function(v) {
1618
+ return this.startOf(v, !1);
1619
+ }, c.$set = function(v, L) {
1620
+ var N, W = R.p(v), z = "set" + (this.$u ? "UTC" : ""), te = (N = {}, N[e] = z + "Date", N[n] = z + "Date", N[f] = z + "Month", N[r] = z + "FullYear", N[w] = z + "Hours", N[$] = z + "Minutes", N[I] = z + "Seconds", N[T] = z + "Milliseconds", N)[W], se = W === e ? this.$D + (L - this.$W) : L;
1621
+ if (W === f || W === r) {
1612
1622
  var ce = this.clone().set(n, 1);
1613
1623
  ce.$d[te](se), ce.init(), this.$d = ce.set(n, Math.min(this.$D, ce.daysInMonth())).$d;
1614
1624
  } else te && this.$d[te](se);
1615
1625
  return this.init(), this;
1616
- }, c.set = function(g, L) {
1617
- return this.clone().$set(g, L);
1618
- }, c.get = function(g) {
1619
- return this[R.p(g)]();
1620
- }, c.add = function(g, L) {
1621
- var S, W = this;
1622
- g = Number(g);
1626
+ }, c.set = function(v, L) {
1627
+ return this.clone().$set(v, L);
1628
+ }, c.get = function(v) {
1629
+ return this[R.p(v)]();
1630
+ }, c.add = function(v, L) {
1631
+ var N, W = this;
1632
+ v = Number(v);
1623
1633
  var z = R.p(L), te = function(pe) {
1624
1634
  var fe = U(W);
1625
- return R.w(fe.date(fe.date() + Math.round(pe * g)), W);
1635
+ return R.w(fe.date(fe.date() + Math.round(pe * v)), W);
1626
1636
  };
1627
- if (z === y) return this.set(y, this.$M + g);
1628
- if (z === r) return this.set(r, this.$y + g);
1637
+ if (z === f) return this.set(f, this.$M + v);
1638
+ if (z === r) return this.set(r, this.$y + v);
1629
1639
  if (z === e) return te(1);
1630
1640
  if (z === q) return te(7);
1631
- var se = (S = {}, S[$] = l, S[w] = f, S[M] = p, S)[z] || 1, ce = this.$d.getTime() + g * se;
1641
+ var se = (N = {}, N[$] = i, N[w] = u, N[I] = d, N)[z] || 1, ce = this.$d.getTime() + v * se;
1632
1642
  return R.w(ce, this);
1633
- }, c.subtract = function(g, L) {
1634
- return this.add(-1 * g, L);
1635
- }, c.format = function(g) {
1636
- var L = this, S = this.$locale();
1637
- if (!this.isValid()) return S.invalidDate || o;
1638
- var W = g || "YYYY-MM-DDTHH:mm:ssZ", z = R.z(this), te = this.$H, se = this.$m, ce = this.$M, pe = S.weekdays, fe = S.months, be = S.meridiem, X = function(ye, xe, we, Ce) {
1643
+ }, c.subtract = function(v, L) {
1644
+ return this.add(-1 * v, L);
1645
+ }, c.format = function(v) {
1646
+ var L = this, N = this.$locale();
1647
+ if (!this.isValid()) return N.invalidDate || o;
1648
+ var W = v || "YYYY-MM-DDTHH:mm:ssZ", z = R.z(this), te = this.$H, se = this.$m, ce = this.$M, pe = N.weekdays, fe = N.months, be = N.meridiem, X = function(ye, xe, we, Ce) {
1639
1649
  return ye && (ye[xe] || ye(L, W)) || we[xe].slice(0, Ce);
1640
1650
  }, ue = function(ye) {
1641
1651
  return R.s(te % 12 || 12, ye, "0");
@@ -1643,7 +1653,7 @@ function Ot() {
1643
1653
  var Ce = ye < 12 ? "AM" : "PM";
1644
1654
  return we ? Ce.toLowerCase() : Ce;
1645
1655
  };
1646
- return W.replace(u, function(ye, xe) {
1656
+ return W.replace(p, function(ye, xe) {
1647
1657
  return xe || function(we) {
1648
1658
  switch (we) {
1649
1659
  case "YY":
@@ -1655,7 +1665,7 @@ function Ot() {
1655
1665
  case "MM":
1656
1666
  return R.s(ce + 1, 2, "0");
1657
1667
  case "MMM":
1658
- return X(S.monthsShort, ce, fe, 3);
1668
+ return X(N.monthsShort, ce, fe, 3);
1659
1669
  case "MMMM":
1660
1670
  return X(fe, ce);
1661
1671
  case "D":
@@ -1665,9 +1675,9 @@ function Ot() {
1665
1675
  case "d":
1666
1676
  return String(L.$W);
1667
1677
  case "dd":
1668
- return X(S.weekdaysMin, L.$W, pe, 2);
1678
+ return X(N.weekdaysMin, L.$W, pe, 2);
1669
1679
  case "ddd":
1670
- return X(S.weekdaysShort, L.$W, pe, 3);
1680
+ return X(N.weekdaysShort, L.$W, pe, 3);
1671
1681
  case "dddd":
1672
1682
  return pe[L.$W];
1673
1683
  case "H":
@@ -1700,15 +1710,15 @@ function Ot() {
1700
1710
  });
1701
1711
  }, c.utcOffset = function() {
1702
1712
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1703
- }, c.diff = function(g, L, S) {
1704
- var W, z = this, te = R.p(L), se = U(g), ce = (se.utcOffset() - this.utcOffset()) * l, pe = this - se, fe = function() {
1713
+ }, c.diff = function(v, L, N) {
1714
+ var W, z = this, te = R.p(L), se = U(v), ce = (se.utcOffset() - this.utcOffset()) * i, pe = this - se, fe = function() {
1705
1715
  return R.m(z, se);
1706
1716
  };
1707
1717
  switch (te) {
1708
1718
  case r:
1709
1719
  W = fe() / 12;
1710
1720
  break;
1711
- case y:
1721
+ case f:
1712
1722
  W = fe();
1713
1723
  break;
1714
1724
  case s:
@@ -1721,26 +1731,26 @@ function Ot() {
1721
1731
  W = (pe - ce) / 864e5;
1722
1732
  break;
1723
1733
  case w:
1724
- W = pe / f;
1734
+ W = pe / u;
1725
1735
  break;
1726
1736
  case $:
1727
- W = pe / l;
1737
+ W = pe / i;
1728
1738
  break;
1729
- case M:
1730
- W = pe / p;
1739
+ case I:
1740
+ W = pe / d;
1731
1741
  break;
1732
1742
  default:
1733
1743
  W = pe;
1734
1744
  }
1735
- return S ? W : R.a(W);
1745
+ return N ? W : R.a(W);
1736
1746
  }, c.daysInMonth = function() {
1737
- return this.endOf(y).$D;
1747
+ return this.endOf(f).$D;
1738
1748
  }, c.$locale = function() {
1739
1749
  return k[this.$L];
1740
- }, c.locale = function(g, L) {
1741
- if (!g) return this.$L;
1742
- var S = this.clone(), W = F(g, L, !0);
1743
- return W && (S.$L = W), S;
1750
+ }, c.locale = function(v, L) {
1751
+ if (!v) return this.$L;
1752
+ var N = this.clone(), W = F(v, L, !0);
1753
+ return W && (N.$L = W), N;
1744
1754
  }, c.clone = function() {
1745
1755
  return R.w(this.$d, this);
1746
1756
  }, c.toDate = function() {
@@ -1751,47 +1761,47 @@ function Ot() {
1751
1761
  return this.$d.toISOString();
1752
1762
  }, c.toString = function() {
1753
1763
  return this.$d.toUTCString();
1754
- }, i;
1764
+ }, l;
1755
1765
  }(), re = ee.prototype;
1756
- return U.prototype = re, [["$ms", T], ["$s", M], ["$m", $], ["$H", w], ["$W", e], ["$M", y], ["$y", r], ["$D", n]].forEach(function(i) {
1757
- re[i[1]] = function(c) {
1758
- return this.$g(c, i[0], i[1]);
1766
+ return U.prototype = re, [["$ms", T], ["$s", I], ["$m", $], ["$H", w], ["$W", e], ["$M", f], ["$y", r], ["$D", n]].forEach(function(l) {
1767
+ re[l[1]] = function(c) {
1768
+ return this.$g(c, l[0], l[1]);
1759
1769
  };
1760
- }), U.extend = function(i, c) {
1761
- return i.$i || (i(c, ee, U), i.$i = !0), U;
1762
- }, U.locale = F, U.isDayjs = H, U.unix = function(i) {
1763
- return U(1e3 * i);
1764
- }, U.en = k[_], U.Ls = k, U.p = {}, U;
1770
+ }), U.extend = function(l, c) {
1771
+ return l.$i || (l(c, ee, U), l.$i = !0), U;
1772
+ }, U.locale = F, U.isDayjs = H, U.unix = function(l) {
1773
+ return U(1e3 * l);
1774
+ }, U.en = k[V], U.Ls = k, U.p = {}, U;
1765
1775
  });
1766
1776
  }(De)), De.exports;
1767
1777
  }
1768
1778
  var Rt = Ot();
1769
- const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, onChange: b }) => {
1770
- const p = t.dataset.key, l = t.dataset.value, f = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, M = t.dataset.disableFuture === "true", [$, w] = ne(() => {
1771
- if (!l) return null;
1772
- const o = l.split(",");
1773
- return o.length === 2 && o[0] && o[1] ? [_e(o[0]), _e(o[1])] : null;
1779
+ const Ve = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, onChange: x }) => {
1780
+ const d = t.dataset.key, i = t.dataset.value, u = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [$, w] = ne(() => {
1781
+ if (!i) return null;
1782
+ const o = i.split(",");
1783
+ return o.length === 2 && o[0] && o[1] ? [Ve(o[0]), Ve(o[1])] : null;
1774
1784
  }), [e, q] = ne(null);
1775
1785
  return Xe(
1776
1786
  /* @__PURE__ */ E("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "240px" }, children: /* @__PURE__ */ E(
1777
1787
  Gt,
1778
1788
  {
1779
1789
  value: $,
1780
- disabledDate: (o) => o ? M && o.isAfter(_e(), "day") ? !0 : !T || !e || !e[0] ? !1 : Math.abs(o.diff(e[0], "days")) > T : !1,
1790
+ disabledDate: (o) => o ? I && o.isAfter(Ve(), "day") ? !0 : !T || !e || !e[0] ? !1 : Math.abs(o.diff(e[0], "days")) > T : !1,
1781
1791
  onCalendarChange: (o) => {
1782
1792
  console.log("[DatePicker] onCalendarChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), q(o);
1783
1793
  },
1784
1794
  onChange: (o) => {
1785
1795
  if (console.log("[DatePicker] onChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), w(o), q(null), o && o[0] && o[1]) {
1786
1796
  const a = `${o[0].format("YYYY-MM-DD")},${o[1].format("YYYY-MM-DD")}`;
1787
- t.setAttribute("data-value", a), b(p, a);
1797
+ t.setAttribute("data-value", a), x(d, a);
1788
1798
  } else
1789
- t.setAttribute("data-value", ""), b(p, "");
1799
+ t.setAttribute("data-value", ""), x(d, "");
1790
1800
  },
1791
1801
  onOpenChange: (o) => {
1792
1802
  console.log("[DatePicker] onOpenChange", o), q(o ? $ : null);
1793
1803
  },
1794
- placeholder: [f || "开始日期", f || "结束日期"],
1804
+ placeholder: [u || "开始日期", u || "结束日期"],
1795
1805
  style: { width: "100%" },
1796
1806
  size: "small",
1797
1807
  allowClear: !0,
@@ -1802,86 +1812,86 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
1802
1812
  t
1803
1813
  );
1804
1814
  }, Ft = (t) => {
1805
- const [b, p] = ne([]);
1815
+ const [x, d] = ne([]);
1806
1816
  return de(() => {
1807
- const l = t.current;
1808
- if (!l) return;
1809
- const f = () => {
1810
- const M = l.querySelectorAll(".rte-datepicker-host"), $ = [];
1811
- M.forEach((w) => {
1817
+ const i = t.current;
1818
+ if (!i) return;
1819
+ const u = () => {
1820
+ const I = i.querySelectorAll(".rte-datepicker-host"), $ = [];
1821
+ I.forEach((w) => {
1812
1822
  const e = w.getAttribute("data-key");
1813
1823
  e && $.push(
1814
1824
  /* @__PURE__ */ E(
1815
1825
  Ht,
1816
1826
  {
1817
1827
  host: w,
1818
- onChange: (q, y) => {
1828
+ onChange: () => {
1819
1829
  if (t.current) {
1820
- const s = new Event("input", { bubbles: !0 });
1821
- t.current.dispatchEvent(s);
1830
+ const q = new Event("input", { bubbles: !0 });
1831
+ t.current.dispatchEvent(q);
1822
1832
  }
1823
1833
  }
1824
1834
  },
1825
1835
  `datepicker-${e}`
1826
1836
  )
1827
1837
  );
1828
- }), p($);
1838
+ }), d($);
1829
1839
  };
1830
- f();
1831
- const T = new MutationObserver((M) => {
1840
+ u();
1841
+ const T = new MutationObserver((I) => {
1832
1842
  let $ = !1;
1833
- for (const w of M)
1843
+ for (const w of I)
1834
1844
  if (w.type === "childList") {
1835
1845
  let e = !1;
1836
1846
  if (w.addedNodes.forEach((q) => {
1837
1847
  if (q.nodeType === Node.ELEMENT_NODE) {
1838
- const y = q;
1839
- (y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
1848
+ const f = q;
1849
+ (f.classList?.contains("rte-datepicker-host") || f.querySelector?.(".rte-datepicker-host")) && (e = !0);
1840
1850
  }
1841
1851
  }), w.removedNodes.forEach((q) => {
1842
1852
  if (q.nodeType === Node.ELEMENT_NODE) {
1843
- const y = q;
1844
- (y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
1853
+ const f = q;
1854
+ (f.classList?.contains("rte-datepicker-host") || f.querySelector?.(".rte-datepicker-host")) && (e = !0);
1845
1855
  }
1846
1856
  }), e) {
1847
1857
  $ = !0;
1848
1858
  break;
1849
1859
  }
1850
1860
  }
1851
- $ && f();
1861
+ $ && u();
1852
1862
  });
1853
- return T.observe(l, { childList: !0, subtree: !0 }), () => T.disconnect();
1854
- }, [t]), b;
1863
+ return T.observe(i, { childList: !0, subtree: !0 }), () => T.disconnect();
1864
+ }, [t]), x;
1855
1865
  }, zt = ({
1856
1866
  config: t,
1857
- onSend: b,
1858
- isProcessing: p = !1,
1859
- disabled: l = !1,
1860
- width: f,
1867
+ onSend: x,
1868
+ isProcessing: d = !1,
1869
+ disabled: i = !1,
1870
+ width: u,
1861
1871
  lockStructure: T = !1,
1862
- agentOptions: M = [],
1872
+ agentOptions: I = [],
1863
1873
  onAgentSelect: $,
1864
1874
  onAgentExit: w,
1865
1875
  loading: e = !1,
1866
1876
  placeholder: q,
1867
- border: y,
1877
+ border: f,
1868
1878
  background: s = "transparent",
1869
1879
  hideButtons: r
1870
1880
  }) => {
1871
- const n = Q(null), o = Q(null), [a, u] = ne({}), [d, x] = ne(null), [v, _] = ne(null), k = Q(!1), P = Q(null), [H, F] = ne(!1), U = Q(null), [R, ee] = ne(!0), [re, i] = ne(() => {
1881
+ const n = Q(null), o = Q(null), [a, p] = ne({}), [y, g] = ne(null), [b, V] = ne(null), k = Q(!1), P = Q(null), [H, F] = ne(!1), U = Q(null), [R, ee] = ne(!0), [re, l] = ne(() => {
1872
1882
  const h = {};
1873
1883
  return t.forEach((m) => {
1874
1884
  m.type === "multi-variable" && m.key && (h[m.key] = 1);
1875
1885
  }), h;
1876
- }), c = Q({}), g = Q({}), L = Q({});
1886
+ }), c = Q({}), v = Q({}), L = Q({});
1877
1887
  de(() => {
1878
- g.current = a;
1888
+ v.current = a;
1879
1889
  }, [a]), de(() => {
1880
1890
  L.current = re;
1881
1891
  }, [re]);
1882
- const S = ae((h) => h.find((C) => C.type === "tag")?.text || null, []), W = Q(t), z = Q(null);
1892
+ const N = ae((h) => h.find((C) => C.type === "tag")?.text || null, []), W = Q(t), z = Q(null);
1883
1893
  de(() => {
1884
- const h = S(W.current), m = S(t);
1894
+ const h = N(W.current), m = N(t);
1885
1895
  if (h && h !== m && n.current) {
1886
1896
  const C = {};
1887
1897
  n.current.querySelectorAll('[data-type="variable"]').forEach((A) => {
@@ -1904,27 +1914,27 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
1904
1914
  }
1905
1915
  }), c.current[h] = {
1906
1916
  variableValues: C,
1907
- files: { ...g.current },
1917
+ files: { ...v.current },
1908
1918
  multiVariableCounts: { ...L.current }
1909
1919
  };
1910
1920
  }
1911
1921
  if (m && c.current[m]) {
1912
1922
  const C = c.current[m];
1913
- z.current = C, u(C.files), i(C.multiVariableCounts);
1923
+ z.current = C, p(C.files), l(C.multiVariableCounts);
1914
1924
  } else if (m) {
1915
1925
  z.current = null;
1916
1926
  const C = {};
1917
- t.forEach((V) => {
1918
- V.type === "multi-variable" && V.key && (C[V.key] = 1);
1919
- }), i(C), u({});
1927
+ t.forEach((M) => {
1928
+ M.type === "multi-variable" && M.key && (C[M.key] = 1);
1929
+ }), l(C), p({});
1920
1930
  } else
1921
- z.current = null, i({}), u({});
1931
+ z.current = null, l({}), p({});
1922
1932
  W.current = t;
1923
- }, [t, S]), ze(() => {
1933
+ }, [t, N]), ze(() => {
1924
1934
  z.current && n.current && (n.current.__tempVariableValues = z.current.variableValues, setTimeout(() => {
1925
1935
  z.current && (z.current = null);
1926
1936
  }, 0));
1927
- }), At(n, t, a, T, re, U, void 0, r), Lt(n, t, a, _), It(n, t, _, r), Mt(n, t, a, _), Dt(n, t, _), Vt(n, t, a, F), _t(n, k);
1937
+ }), At(n, t, a, T, re, U, void 0, r), Lt(n, t, a, V), _t(n, t, V, r), It(n, t, a, V), Dt(n, t, V), Mt(n, t, a, F), Vt(n, k);
1928
1938
  const te = Ft(n);
1929
1939
  de(() => {
1930
1940
  if (t.length > 0) {
@@ -1936,14 +1946,14 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
1936
1946
  ee(!0);
1937
1947
  return;
1938
1948
  }
1939
- const C = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", V = n.current.querySelectorAll('[data-type="variable"]'), N = n.current.querySelectorAll('[data-type="upload"]');
1940
- let I = !1;
1941
- V.forEach((G) => {
1942
- (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (I = !0);
1943
- }), N.forEach((G) => {
1944
- G.querySelector(".upload-inner-wrapper.has-file") && (I = !0);
1949
+ const C = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", M = n.current.querySelectorAll('[data-type="variable"]'), S = n.current.querySelectorAll('[data-type="upload"]');
1950
+ let _ = !1;
1951
+ M.forEach((G) => {
1952
+ (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (_ = !0);
1953
+ }), S.forEach((G) => {
1954
+ G.querySelector(".upload-inner-wrapper.has-file") && (_ = !0);
1945
1955
  });
1946
- const A = !C && !I;
1956
+ const A = !C && !_;
1947
1957
  ee(A), t.length === 0 && F(!A);
1948
1958
  };
1949
1959
  h();
@@ -1957,30 +1967,30 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
1957
1967
  };
1958
1968
  }, [t]);
1959
1969
  const se = (h) => {
1960
- if (l) {
1970
+ if (i) {
1961
1971
  h.preventDefault();
1962
1972
  return;
1963
1973
  }
1964
1974
  h.preventDefault();
1965
1975
  const m = h.clipboardData.getData("text/plain"), C = window.getSelection();
1966
1976
  if (C && C.rangeCount > 0) {
1967
- const V = C.anchorNode;
1968
- if (V) {
1969
- let N = null;
1970
- if (V.nodeType === Node.ELEMENT_NODE ? N = V.closest('[data-type="variable"]') : V.nodeType === Node.TEXT_NODE && V.parentElement && (N = V.parentElement.closest('[data-type="variable"]')), N) {
1971
- const I = N.dataset.multiKey;
1972
- if (I) {
1977
+ const M = C.anchorNode;
1978
+ if (M) {
1979
+ let S = null;
1980
+ if (M.nodeType === Node.ELEMENT_NODE ? S = M.closest('[data-type="variable"]') : M.nodeType === Node.TEXT_NODE && M.parentElement && (S = M.parentElement.closest('[data-type="variable"]')), S) {
1981
+ const _ = S.dataset.multiKey;
1982
+ if (_) {
1973
1983
  const A = /[、,,\s\n\r\t]+/, G = m.split(A).map((D) => D.trim()).filter((D) => D.length > 0);
1974
1984
  if (console.log("[Paste Event] 粘贴的内容:", m), console.log("[Paste Event] 拆分后的值:", G), G.length > 1) {
1975
- const D = parseInt(N.dataset.index || "0", 10), j = t.find((ie) => ie.type === "multi-variable" && ie.key === I)?.maxCount || 9, Y = re[I] || 1, B = Math.min(D + G.length, j);
1976
- B > Y && i((J) => ({
1985
+ const D = parseInt(S.dataset.index || "0", 10), j = t.find((le) => le.type === "multi-variable" && le.key === _)?.maxCount || 9, Y = re[_] || 1, B = Math.min(D + G.length, j);
1986
+ B > Y && l((J) => ({
1977
1987
  ...J,
1978
- [I]: B
1988
+ [_]: B
1979
1989
  }));
1980
1990
  const K = [];
1981
1991
  for (let J = 0; J < Y; J++) {
1982
- const ie = `${I}_${J}`, ge = n.current.querySelector(
1983
- `[data-type="variable"][data-key="${ie}"][data-multi-key="${I}"]`
1992
+ const le = `${_}_${J}`, ge = n.current.querySelector(
1993
+ `[data-type="variable"][data-key="${le}"][data-multi-key="${_}"]`
1984
1994
  );
1985
1995
  if (ge) {
1986
1996
  const ke = ge.innerText.replace(/[\u200B\n]/g, "").trim();
@@ -1990,20 +2000,20 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
1990
2000
  K.splice(D, 1, ...G.slice(0, j - D));
1991
2001
  const oe = K.slice(0, j);
1992
2002
  oe.length > 0 && oe[oe.length - 1] !== "" && oe.length < j && oe.push("");
1993
- const O = Math.max(oe.length, 1), le = {};
1994
- oe.forEach((J, ie) => {
1995
- J && (le[`${I}_${ie}`] = J);
2003
+ const O = Math.max(oe.length, 1), ie = {};
2004
+ oe.forEach((J, le) => {
2005
+ J && (ie[`${_}_${le}`] = J);
1996
2006
  }), n.current.querySelectorAll(
1997
2007
  '[data-type="variable"]'
1998
2008
  ).forEach((J) => {
1999
- const ie = J.dataset.key, ge = J.dataset.multiKey;
2000
- if (ie && ge !== I) {
2009
+ const le = J.dataset.key, ge = J.dataset.multiKey;
2010
+ if (le && ge !== _) {
2001
2011
  const ke = J.innerText.replace(/[\u200B\n]/g, "").trim();
2002
- ke && (le[ie] = ke);
2012
+ ke && (ie[le] = ke);
2003
2013
  }
2004
- }), n.current.__tempVariableValues = le, i((J) => ({
2014
+ }), n.current.__tempVariableValues = ie, l((J) => ({
2005
2015
  ...J,
2006
- [I]: O
2016
+ [_]: O
2007
2017
  })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", oe);
2008
2018
  return;
2009
2019
  } else G.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
@@ -2012,26 +2022,26 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2012
2022
  }
2013
2023
  }
2014
2024
  document.execCommand("insertText", !1, m), ye(), setTimeout(() => {
2015
- const V = window.getSelection();
2016
- if (V && V.rangeCount > 0) {
2017
- const N = V.anchorNode;
2018
- if (N) {
2019
- let I = null;
2020
- if (N.nodeType === Node.ELEMENT_NODE ? I = N.closest('[data-type="variable"][data-multi-key]') : N.nodeType === Node.TEXT_NODE && N.parentElement && (I = N.parentElement.closest('[data-type="variable"][data-multi-key]')), I) {
2021
- const A = I.innerText.replace(/[\u200B\n]/g, "").trim();
2025
+ const M = window.getSelection();
2026
+ if (M && M.rangeCount > 0) {
2027
+ const S = M.anchorNode;
2028
+ if (S) {
2029
+ let _ = null;
2030
+ if (S.nodeType === Node.ELEMENT_NODE ? _ = S.closest('[data-type="variable"][data-multi-key]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (_ = S.parentElement.closest('[data-type="variable"][data-multi-key]')), _) {
2031
+ const A = _.innerText.replace(/[\u200B\n]/g, "").trim();
2022
2032
  /[、,,\s]+/.test(A) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", A), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2023
2033
  }
2024
2034
  }
2025
2035
  }
2026
2036
  }, 0);
2027
2037
  }, ce = (h) => {
2028
- if (h.target.files && h.target.files[0] && d) {
2029
- const m = h.target.files[0], C = d;
2030
- u((V) => ({ ...V, [C]: m }));
2038
+ if (h.target.files && h.target.files[0] && y) {
2039
+ const m = h.target.files[0], C = y;
2040
+ p((M) => ({ ...M, [C]: m }));
2031
2041
  }
2032
- h.target && (h.target.value = ""), x(null);
2042
+ h.target && (h.target.value = ""), g(null);
2033
2043
  }, pe = (h) => {
2034
- u((m) => {
2044
+ p((m) => {
2035
2045
  const C = { ...m };
2036
2046
  return delete C[h], C;
2037
2047
  });
@@ -2042,12 +2052,12 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2042
2052
  if (m.closest(".tag-close-btn")) {
2043
2053
  if (h.preventDefault(), h.stopPropagation(), T)
2044
2054
  return;
2045
- _(null), w ? w() : n.current && (n.current.innerHTML = "", n.current.focus());
2055
+ V(null), w ? w() : n.current && (n.current.innerHTML = "", n.current.focus());
2046
2056
  return;
2047
2057
  }
2048
2058
  if (T) {
2049
- const N = m.closest(".tag-node"), I = m.closest('[data-type="text"]');
2050
- if (N || I) {
2059
+ const S = m.closest(".tag-node"), _ = m.closest('[data-type="text"]');
2060
+ if (S || _) {
2051
2061
  h.preventDefault(), h.stopPropagation();
2052
2062
  const A = window.getSelection();
2053
2063
  A && A.removeAllRanges();
@@ -2057,8 +2067,8 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2057
2067
  m.closest('[data-type="variable"]') || (P.current = { x: h.clientX, y: h.clientY }, k.current = !1, m.closest(".file-remove-btn") && (h.preventDefault(), h.stopPropagation()));
2058
2068
  }, be = (h) => {
2059
2069
  if (!h.target.closest('[data-type="variable"]') && P.current) {
2060
- const V = Math.abs(h.clientX - P.current.x), N = Math.abs(h.clientY - P.current.y);
2061
- (V > 3 || N > 3) && (k.current = !0);
2070
+ const M = Math.abs(h.clientX - P.current.x), S = Math.abs(h.clientY - P.current.y);
2071
+ (M > 3 || S > 3) && (k.current = !0);
2062
2072
  }
2063
2073
  }, X = (h) => {
2064
2074
  if (h.target.closest('[data-type="variable"]')) {
@@ -2067,7 +2077,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2067
2077
  }
2068
2078
  P.current = null, k.current = !1;
2069
2079
  }, ue = (h) => {
2070
- if (l)
2080
+ if (i)
2071
2081
  return;
2072
2082
  const m = h.target;
2073
2083
  if (m.closest('[data-type="datepicker"]'))
@@ -2078,25 +2088,25 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2078
2088
  }
2079
2089
  if (t.length === 0)
2080
2090
  return;
2081
- const N = (B, K) => {
2091
+ const S = (B, K) => {
2082
2092
  if (!n.current) return;
2083
2093
  Array.from(n.current.children).forEach((O) => {
2084
2094
  if (O !== B)
2085
2095
  if (K)
2086
2096
  O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.style.setProperty("display", "none", "important");
2087
2097
  else if (O.dataset.prevDisplay !== void 0) {
2088
- const le = O.dataset.prevDisplay;
2089
- le ? O.style.display = le : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
2098
+ const ie = O.dataset.prevDisplay;
2099
+ ie ? O.style.display = ie : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
2090
2100
  } else
2091
2101
  O.style.removeProperty("display");
2092
2102
  });
2093
- }, I = m.closest(".rte-textarea-toggle");
2094
- if (I) {
2103
+ }, _ = m.closest(".rte-textarea-toggle");
2104
+ if (_) {
2095
2105
  h.preventDefault(), h.stopPropagation();
2096
- const B = I.closest(".rte-textarea-wrapper"), K = B?.querySelector('[data-type="textarea"]'), O = !(I.getAttribute("data-expanded") === "true");
2097
- I.setAttribute("data-expanded", String(O)), I.textContent = O ? "收起" : "展开", B && B.classList.toggle("rte-textarea-expanded", O);
2098
- const le = B?.closest(".rte-textarea-required");
2099
- if (le ? le.classList.toggle("rte-textarea-overlay", O) : B && B.classList.toggle("rte-textarea-overlay", O), K)
2106
+ const B = _.closest(".rte-textarea-wrapper"), K = B?.querySelector('[data-type="textarea"]'), O = !(_.getAttribute("data-expanded") === "true");
2107
+ _.setAttribute("data-expanded", String(O)), _.textContent = O ? "收起" : "展开", B && B.classList.toggle("rte-textarea-expanded", O);
2108
+ const ie = B?.closest(".rte-textarea-required");
2109
+ if (ie ? ie.classList.toggle("rte-textarea-overlay", O) : B && B.classList.toggle("rte-textarea-overlay", O), K)
2100
2110
  if (O)
2101
2111
  K.classList.add("rte-textarea-expanded"), K.style.maxHeight = "none", K.style.height = "100%";
2102
2112
  else {
@@ -2111,13 +2121,13 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2111
2121
  if (A) {
2112
2122
  h.preventDefault(), h.stopPropagation();
2113
2123
  const B = A.closest(".rte-richtext-wrapper"), K = B?.querySelector('[data-type="richtext"]'), O = !(A.getAttribute("data-expanded") === "true");
2114
- ((ie, ge) => {
2115
- ie.setAttribute("data-expanded", String(ge)), ie.innerHTML = ge ? '<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>' : '<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>';
2124
+ ((le, ge) => {
2125
+ le.setAttribute("data-expanded", String(ge)), le.innerHTML = ge ? '<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>' : '<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>';
2116
2126
  })(A, O);
2117
2127
  const me = B?.closest(".rte-richtext-required");
2118
2128
  me ? me.classList.toggle("rte-richtext-expanded", O) : B && B.classList.toggle("rte-richtext-expanded", O);
2119
2129
  const J = B?.closest(".exclusion-wrapper") || B?.parentElement;
2120
- K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O), N(J, O)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", O);
2130
+ K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O), S(J, O)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", O);
2121
2131
  return;
2122
2132
  }
2123
2133
  if (m.closest('[data-type="text"]')) {
@@ -2137,7 +2147,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2137
2147
  return;
2138
2148
  setTimeout(() => {
2139
2149
  const B = window.getSelection();
2140
- B && !B.isCollapsed || Ve(n);
2150
+ B && !B.isCollapsed || Me(n);
2141
2151
  }, 10);
2142
2152
  return;
2143
2153
  }
@@ -2151,23 +2161,23 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2151
2161
  const Y = m.closest('[data-type="upload"]');
2152
2162
  if (Y) {
2153
2163
  const B = Y.dataset.key;
2154
- B && (x(B), o.current?.click());
2164
+ B && (g(B), o.current?.click());
2155
2165
  return;
2156
2166
  }
2157
2167
  }, he = (h) => {
2158
2168
  const C = h.target.closest('[data-type="variable"]');
2159
2169
  if (C) {
2160
- const V = window.getSelection();
2161
- if (V) {
2162
- const N = document.createRange(), I = C.textContent || "";
2163
- if (I.replace(/\u200B/g, "")) {
2164
- let G = 0, D = I.length;
2165
- I.startsWith("​") && (G = 1), I.endsWith("​") && I.length > 1 && (D = I.length - 1);
2170
+ const M = window.getSelection();
2171
+ if (M) {
2172
+ const S = document.createRange(), _ = C.textContent || "";
2173
+ if (_.replace(/\u200B/g, "")) {
2174
+ let G = 0, D = _.length;
2175
+ _.startsWith("​") && (G = 1), _.endsWith("​") && _.length > 1 && (D = _.length - 1);
2166
2176
  const j = C.firstChild;
2167
- j && j.nodeType === Node.TEXT_NODE ? (N.setStart(j, G), N.setEnd(j, D)) : N.selectNodeContents(C);
2177
+ j && j.nodeType === Node.TEXT_NODE ? (S.setStart(j, G), S.setEnd(j, D)) : S.selectNodeContents(C);
2168
2178
  } else
2169
- N.selectNodeContents(C), N.collapse(!0);
2170
- V.removeAllRanges(), V.addRange(N);
2179
+ S.selectNodeContents(C), S.collapse(!0);
2180
+ M.removeAllRanges(), M.addRange(S);
2171
2181
  }
2172
2182
  }
2173
2183
  }, ye = () => {
@@ -2178,102 +2188,102 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2178
2188
  }
2179
2189
  return;
2180
2190
  }
2181
- if (Ve(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((C) => {
2182
- const V = C.querySelector(".variable-info-icon");
2183
- if (V) {
2184
- let N = !1;
2185
- const I = document.createTreeWalker(
2191
+ if (Me(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((C) => {
2192
+ const M = C.querySelector(".variable-info-icon");
2193
+ if (M) {
2194
+ let S = !1;
2195
+ const _ = document.createTreeWalker(
2186
2196
  C,
2187
2197
  NodeFilter.SHOW_TEXT,
2188
2198
  {
2189
- acceptNode: (A) => V.contains(A) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2199
+ acceptNode: (A) => M.contains(A) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2190
2200
  }
2191
2201
  );
2192
- for (; I.nextNode(); )
2193
- if (I.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2194
- N = !0;
2202
+ for (; _.nextNode(); )
2203
+ if (_.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2204
+ S = !0;
2195
2205
  break;
2196
2206
  }
2197
- N ? V.classList.add("hidden") : V.classList.remove("hidden");
2207
+ S ? M.classList.add("hidden") : M.classList.remove("hidden");
2198
2208
  }
2199
2209
  }), Be(n, t, a), Pe(n, t, a, F), !n.current) return;
2200
2210
  t.filter((m) => m.type === "multi-variable" && m.key).forEach((m) => {
2201
2211
  if (!m.key) return;
2202
- const C = m.maxCount || 9, V = re[m.key] || 1, N = [];
2203
- for (let j = 0; j < V; j++) {
2212
+ const C = m.maxCount || 9, M = re[m.key] || 1, S = [];
2213
+ for (let j = 0; j < M; j++) {
2204
2214
  const Y = `${m.key}_${j}`, B = n.current.querySelector(
2205
2215
  `[data-type="variable"][data-key="${Y}"][data-multi-key="${m.key}"]`
2206
2216
  );
2207
2217
  if (B) {
2208
2218
  const K = B.innerText.replace(/[\u200B\n]/g, "").trim();
2209
- N.push(K);
2219
+ S.push(K);
2210
2220
  }
2211
2221
  }
2212
- const A = (N[N.length - 1] || "") === "";
2222
+ const A = (S[S.length - 1] || "") === "";
2213
2223
  let G = !1, D = -1;
2214
- for (let j = 0; j < N.length - 1; j++)
2215
- if (N[j] === "") {
2224
+ for (let j = 0; j < S.length - 1; j++)
2225
+ if (S[j] === "") {
2216
2226
  G = !0, D = j;
2217
2227
  break;
2218
2228
  }
2219
2229
  if (G && D >= 0) {
2220
2230
  const j = window.getSelection();
2221
2231
  if (j && j.rangeCount > 0) {
2222
- const O = j.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
2232
+ const O = j.getRangeAt(0), ie = O.startContainer, me = ie.nodeType === Node.ELEMENT_NODE ? ie.closest('[data-type="variable"][data-multi-key]') : ie.parentElement?.closest('[data-type="variable"][data-multi-key]');
2223
2233
  if (me) {
2224
2234
  const J = me.dataset.key;
2225
2235
  if (J) {
2226
- const ie = document.createRange();
2227
- ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
2228
- const ge = ie.toString().length;
2236
+ const le = document.createRange();
2237
+ le.setStartBefore(me), le.setEnd(O.startContainer, O.startOffset);
2238
+ const ge = le.toString().length;
2229
2239
  U.current = { key: J, offset: ge };
2230
2240
  }
2231
2241
  }
2232
2242
  }
2233
- const Y = [...N];
2243
+ const Y = [...S];
2234
2244
  for (let O = D; O < Y.length - 1; O++)
2235
2245
  Y[O] = Y[O + 1];
2236
2246
  Y.pop();
2237
2247
  const B = {};
2238
- Y.forEach((O, le) => {
2239
- O && (B[`${m.key}_${le}`] = O);
2248
+ Y.forEach((O, ie) => {
2249
+ O && (B[`${m.key}_${ie}`] = O);
2240
2250
  });
2241
2251
  const K = Math.max(A ? Y.length : Y.length + 1, 1);
2242
2252
  n.current.querySelectorAll(
2243
2253
  '[data-type="variable"]'
2244
2254
  ).forEach((O) => {
2245
- const le = O.dataset.key, me = O.dataset.multiKey;
2246
- if (le && me !== m.key) {
2255
+ const ie = O.dataset.key, me = O.dataset.multiKey;
2256
+ if (ie && me !== m.key) {
2247
2257
  const J = O.innerText.replace(/[\u200B\n]/g, "").trim();
2248
- J && (B[le] = J);
2258
+ J && (B[ie] = J);
2249
2259
  }
2250
- }), n.current.__tempVariableValues = B, i((O) => ({
2260
+ }), n.current.__tempVariableValues = B, l((O) => ({
2251
2261
  ...O,
2252
2262
  [m.key]: K
2253
2263
  }));
2254
2264
  return;
2255
2265
  }
2256
2266
  if (!A) {
2257
- const j = V - 1, Y = `${m.key}_${j}`, B = n.current.querySelector(
2267
+ const j = M - 1, Y = `${m.key}_${j}`, B = n.current.querySelector(
2258
2268
  `[data-type="variable"][data-key="${Y}"][data-multi-key="${m.key}"]`
2259
2269
  );
2260
- if (B && B.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && V < C) {
2270
+ if (B && B.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && M < C) {
2261
2271
  const oe = window.getSelection();
2262
2272
  if (oe && oe.rangeCount > 0) {
2263
- const O = oe.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
2273
+ const O = oe.getRangeAt(0), ie = O.startContainer, me = ie.nodeType === Node.ELEMENT_NODE ? ie.closest('[data-type="variable"][data-multi-key]') : ie.parentElement?.closest('[data-type="variable"][data-multi-key]');
2264
2274
  if (me) {
2265
2275
  const J = me.dataset.key;
2266
2276
  if (J) {
2267
- const ie = document.createRange();
2268
- ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
2269
- const ge = ie.toString().length;
2277
+ const le = document.createRange();
2278
+ le.setStartBefore(me), le.setEnd(O.startContainer, O.startOffset);
2279
+ const ge = le.toString().length;
2270
2280
  U.current = { key: J, offset: ge };
2271
2281
  }
2272
2282
  }
2273
2283
  }
2274
- i((O) => ({
2284
+ l((O) => ({
2275
2285
  ...O,
2276
- [m.key]: V + 1
2286
+ [m.key]: M + 1
2277
2287
  }));
2278
2288
  }
2279
2289
  }
@@ -2282,8 +2292,8 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2282
2292
  ze(() => {
2283
2293
  const h = n.current;
2284
2294
  if (!h) return;
2285
- const m = /* @__PURE__ */ new Map(), C = (I) => {
2286
- const A = I.target, G = I.relatedTarget;
2295
+ const m = /* @__PURE__ */ new Map(), C = (_) => {
2296
+ const A = _.target, G = _.relatedTarget;
2287
2297
  !A || !n.current || !n.current.contains(A) || G && n.current.contains(G) || setTimeout(() => {
2288
2298
  if (n.current) {
2289
2299
  if (t.length === 0) {
@@ -2291,17 +2301,17 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2291
2301
  F(D.length > 0);
2292
2302
  return;
2293
2303
  }
2294
- Ve(n), Be(n, t, a), Pe(n, t, a, F);
2304
+ Me(n), Be(n, t, a), Pe(n, t, a, F);
2295
2305
  }
2296
2306
  }, 0);
2297
2307
  };
2298
2308
  h.addEventListener("blur", C, !0);
2299
- const V = () => {
2309
+ const M = () => {
2300
2310
  if (!n.current) return;
2301
2311
  m.forEach((G, D) => {
2302
2312
  D.removeEventListener("blur", G, !1);
2303
2313
  }), m.clear();
2304
- const I = n.current.querySelectorAll(
2314
+ const _ = n.current.querySelectorAll(
2305
2315
  '[data-type="variable"][data-multi-key]'
2306
2316
  ), A = (G) => {
2307
2317
  G.stopPropagation(), G.stopImmediatePropagation();
@@ -2312,7 +2322,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2312
2322
  if (!j || !n.current.contains(j))
2313
2323
  return;
2314
2324
  let Y = !1;
2315
- if (m.forEach((ie, ge) => {
2325
+ if (m.forEach((le, ge) => {
2316
2326
  (ge === j || ge.contains(D)) && (Y = !0);
2317
2327
  }), !Y)
2318
2328
  return;
@@ -2330,37 +2340,37 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2330
2340
  });
2331
2341
  const J = /[、,,\s]+/;
2332
2342
  if (J.test(me)) {
2333
- const ie = me.split(J).map((Te) => Te.trim()).filter((Te) => Te.length > 0);
2334
- console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", ie);
2335
- const ke = ie.slice(0, 9);
2343
+ const le = me.split(J).map((Te) => Te.trim()).filter((Te) => Te.length > 0);
2344
+ console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", le);
2345
+ const ke = le.slice(0, 9);
2336
2346
  if (console.log("[Blur Event] 有效的部分(最多9个):", ke), ke.length > 1) {
2337
- const Te = t.find((Se) => Se.type === "multi-variable" && Se.key === B);
2347
+ const Te = t.find((Ne) => Ne.type === "multi-variable" && Ne.key === B);
2338
2348
  if (Te) {
2339
- const Se = re[B] || 1, He = parseInt(oe, 10), Fe = Te.maxCount || 9, Ne = [];
2340
- for (let ve = 0; ve < Se; ve++) {
2349
+ const Ne = re[B] || 1, He = parseInt(oe, 10), Fe = Te.maxCount || 9, Se = [];
2350
+ for (let ve = 0; ve < Ne; ve++) {
2341
2351
  const qe = `${B}_${ve}`, Ae = n.current.querySelector(
2342
2352
  `[data-type="variable"][data-key="${qe}"][data-multi-key="${B}"]`
2343
2353
  );
2344
2354
  if (Ae) {
2345
2355
  const Le = Ae.innerText.replace(/[\u200B\n]/g, "").trim();
2346
- Ne.push(Le);
2356
+ Se.push(Le);
2347
2357
  }
2348
2358
  }
2349
- console.log("[Blur Event] 拆分前的所有值:", Ne), console.log("[Blur Event] 当前索引:", He), console.log("[Blur Event] 要插入的值:", ke), Ne.splice(He, 1, ...ke);
2350
- const Ee = Ne.slice(0, Fe);
2359
+ console.log("[Blur Event] 拆分前的所有值:", Se), console.log("[Blur Event] 当前索引:", He), console.log("[Blur Event] 要插入的值:", ke), Se.splice(He, 1, ...ke);
2360
+ const Ee = Se.slice(0, Fe);
2351
2361
  console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length < Fe && Ee.push("");
2352
- const Qe = Math.max(Ee.length, 1), Me = {};
2362
+ const Qe = Math.max(Ee.length, 1), Ie = {};
2353
2363
  Ee.forEach((ve, qe) => {
2354
- ve && (Me[`${B}_${qe}`] = ve);
2364
+ ve && (Ie[`${B}_${qe}`] = ve);
2355
2365
  }), n.current.querySelectorAll(
2356
2366
  '[data-type="variable"]'
2357
2367
  ).forEach((ve) => {
2358
2368
  const qe = ve.dataset.key, Ae = ve.dataset.multiKey;
2359
2369
  if (qe && Ae !== B) {
2360
2370
  const Le = ve.innerText.replace(/[\u200B\n]/g, "").trim();
2361
- Le && (Me[qe] = Le);
2371
+ Le && (Ie[qe] = Le);
2362
2372
  }
2363
- }), n.current.__tempVariableValues = Me, i((ve) => ({
2373
+ }), n.current.__tempVariableValues = Ie, l((ve) => ({
2364
2374
  ...ve,
2365
2375
  [B]: Qe
2366
2376
  }));
@@ -2368,46 +2378,46 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2368
2378
  }
2369
2379
  }
2370
2380
  };
2371
- I.forEach((G) => {
2381
+ _.forEach((G) => {
2372
2382
  G.addEventListener("blur", A, !1), m.set(G, A);
2373
2383
  });
2374
- }, N = setTimeout(() => {
2375
- V();
2384
+ }, S = setTimeout(() => {
2385
+ M();
2376
2386
  }, 0);
2377
2387
  return () => {
2378
- clearTimeout(N), h.removeEventListener("blur", C, !0), m.forEach((I, A) => {
2379
- A.removeEventListener("blur", I, !1);
2388
+ clearTimeout(S), h.removeEventListener("blur", C, !0), m.forEach((_, A) => {
2389
+ A.removeEventListener("blur", _, !1);
2380
2390
  }), m.clear();
2381
2391
  };
2382
2392
  }, [t, re, a]);
2383
2393
  const xe = (h) => {
2384
- if (l) {
2394
+ if (i) {
2385
2395
  h.preventDefault();
2386
2396
  return;
2387
2397
  }
2388
2398
  const m = window.getSelection();
2389
2399
  if (m && m.rangeCount > 0) {
2390
2400
  const C = m.anchorNode;
2391
- let V = null;
2392
- if (C && (C.nodeType === Node.ELEMENT_NODE ? V = C.closest('[data-type="text"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (V = C.parentElement.closest('[data-type="text"]'))), V) {
2401
+ let M = null;
2402
+ if (C && (C.nodeType === Node.ELEMENT_NODE ? M = C.closest('[data-type="text"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (M = C.parentElement.closest('[data-type="text"]'))), M) {
2393
2403
  if (h.preventDefault(), h.stopPropagation(), n.current) {
2394
- const N = n.current.querySelector(
2404
+ const S = n.current.querySelector(
2395
2405
  '[data-type="variable"], [data-type="upload"]'
2396
2406
  );
2397
- N && N.focus();
2407
+ S && S.focus();
2398
2408
  }
2399
2409
  return;
2400
2410
  }
2401
2411
  }
2402
2412
  if (T && m && m.rangeCount > 0) {
2403
2413
  const C = m.anchorNode;
2404
- let V = null;
2405
- if (C && (C.nodeType === Node.ELEMENT_NODE ? V = C.closest(".tag-node") : C.nodeType === Node.TEXT_NODE && C.parentElement && (V = C.parentElement.closest(".tag-node"))), V) {
2414
+ let M = null;
2415
+ if (C && (C.nodeType === Node.ELEMENT_NODE ? M = C.closest(".tag-node") : C.nodeType === Node.TEXT_NODE && C.parentElement && (M = C.parentElement.closest(".tag-node"))), M) {
2406
2416
  if (h.preventDefault(), h.stopPropagation(), n.current) {
2407
- const N = n.current.querySelector(
2417
+ const S = n.current.querySelector(
2408
2418
  '[data-type="variable"], [data-type="upload"]'
2409
2419
  );
2410
- N && N.focus();
2420
+ S && S.focus();
2411
2421
  }
2412
2422
  return;
2413
2423
  }
@@ -2422,32 +2432,32 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2422
2432
  if (h.key === "Backspace") {
2423
2433
  const C = window.getSelection();
2424
2434
  if (C && C.rangeCount > 0) {
2425
- const V = C.getRangeAt(0), N = C.anchorNode;
2435
+ const M = C.getRangeAt(0), S = C.anchorNode;
2426
2436
  if (T) {
2427
2437
  let A = null, G = null;
2428
- if (N && (N.nodeType === Node.ELEMENT_NODE ? (A = N.closest(".tag-node"), G = N.closest('[data-type="text"]')) : N.nodeType === Node.TEXT_NODE && N.parentElement && (A = N.parentElement.closest(".tag-node"), G = N.parentElement.closest('[data-type="text"]'))), (A || G) && V.collapsed && V.startOffset === 0) {
2438
+ if (S && (S.nodeType === Node.ELEMENT_NODE ? (A = S.closest(".tag-node"), G = S.closest('[data-type="text"]')) : S.nodeType === Node.TEXT_NODE && S.parentElement && (A = S.parentElement.closest(".tag-node"), G = S.parentElement.closest('[data-type="text"]'))), (A || G) && M.collapsed && M.startOffset === 0) {
2429
2439
  h.preventDefault();
2430
2440
  return;
2431
2441
  }
2432
2442
  }
2433
- let I = null;
2434
- if (N && (N.nodeType === Node.ELEMENT_NODE ? I = N.closest(
2443
+ let _ = null;
2444
+ if (S && (S.nodeType === Node.ELEMENT_NODE ? _ = S.closest(
2435
2445
  '[data-type="variable"]'
2436
- ) : N.nodeType === Node.TEXT_NODE && N.parentElement && (I = N.parentElement.closest(
2446
+ ) : S.nodeType === Node.TEXT_NODE && S.parentElement && (_ = S.parentElement.closest(
2437
2447
  '[data-type="variable"]'
2438
- ))), I) {
2439
- if (!V.collapsed)
2448
+ ))), _) {
2449
+ if (!M.collapsed)
2440
2450
  return;
2441
- const A = I.innerText;
2451
+ const A = _.innerText;
2442
2452
  if (A === "​" || A === "") {
2443
2453
  h.preventDefault();
2444
2454
  return;
2445
2455
  }
2446
- if (V.startOffset === 0) {
2456
+ if (M.startOffset === 0) {
2447
2457
  h.preventDefault();
2448
2458
  return;
2449
2459
  }
2450
- if (A.startsWith("​") && V.startOffset === 1) {
2460
+ if (A.startsWith("​") && M.startOffset === 1) {
2451
2461
  h.preventDefault();
2452
2462
  return;
2453
2463
  }
@@ -2455,21 +2465,21 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2455
2465
  }
2456
2466
  }
2457
2467
  }, we = () => {
2458
- if (p || l || e || !H || !n.current) return;
2468
+ if (d || i || e || !H || !n.current) return;
2459
2469
  if (t.length === 0) {
2460
- const I = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2461
- if (!I) return;
2462
- b(I, I);
2470
+ const _ = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2471
+ if (!_) return;
2472
+ x(_, _);
2463
2473
  return;
2464
2474
  }
2465
2475
  const h = n.current;
2466
2476
  let m = "";
2467
- const C = {}, V = (I) => {
2468
- if (!(I.nodeType === Node.ELEMENT_NODE && I.style.display === "none")) {
2469
- if (I.nodeType === Node.TEXT_NODE)
2470
- m += (I.textContent || "").replace(/\u200B/g, "");
2471
- else if (I.nodeType === Node.ELEMENT_NODE) {
2472
- const A = I, G = A.dataset.type, D = A.dataset.key;
2477
+ const C = {}, M = (_) => {
2478
+ if (!(_.nodeType === Node.ELEMENT_NODE && _.style.display === "none")) {
2479
+ if (_.nodeType === Node.TEXT_NODE)
2480
+ m += (_.textContent || "").replace(/\u200B/g, "");
2481
+ else if (_.nodeType === Node.ELEMENT_NODE) {
2482
+ const A = _, G = A.dataset.type, D = A.dataset.key;
2473
2483
  if (G === "variable" && D) {
2474
2484
  let j = "";
2475
2485
  const Y = document.createTreeWalker(
@@ -2519,26 +2529,26 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2519
2529
  C[D] = a[D] ?? null, a[D] && (m += ` [附带文件: ${a[D]?.name}] `);
2520
2530
  else {
2521
2531
  if (A.classList.contains("tag-close-btn") || A.classList.contains("file-remove-btn")) return;
2522
- A.getAttribute("contenteditable") === "false" && !G && A.classList.contains("tag-node") ? m += A.innerText : A.childNodes.forEach(V);
2532
+ A.getAttribute("contenteditable") === "false" && !G && A.classList.contains("tag-node") ? m += A.innerText : A.childNodes.forEach(M);
2523
2533
  }
2524
2534
  }
2525
2535
  }
2526
2536
  };
2527
- if (h.childNodes.forEach(V), m = m.trim(), !m) return;
2528
- const N = new FormData();
2529
- N.append("fullPrompt", m), Object.keys(C).forEach((I) => {
2530
- const A = C[I];
2531
- A != null && (A instanceof File ? N.append(I, A) : Array.isArray(A) ? t.some(
2532
- (D) => D.type === "multi-variable" && D.key === I
2537
+ if (h.childNodes.forEach(M), m = m.trim(), !m) return;
2538
+ const S = new FormData();
2539
+ S.append("fullPrompt", m), Object.keys(C).forEach((_) => {
2540
+ const A = C[_];
2541
+ A != null && (A instanceof File ? S.append(_, A) : Array.isArray(A) ? t.some(
2542
+ (D) => D.type === "multi-variable" && D.key === _
2533
2543
  ) ? A.forEach((D) => {
2534
- D != null && D !== "" && N.append(I, String(D));
2544
+ D != null && D !== "" && S.append(_, String(D));
2535
2545
  }) : A.forEach((D, j) => {
2536
- D != null && (D instanceof File ? N.append(`${I}[${j}]`, D) : typeof D == "string" ? N.append(`${I}[${j}]`, D) : N.append(`${I}[${j}]`, String(D)));
2537
- }) : typeof A == "string" ? N.append(I, A) : N.append(I, String(A)));
2538
- }), b(N, m);
2546
+ D != null && (D instanceof File ? S.append(`${_}[${j}]`, D) : typeof D == "string" ? S.append(`${_}[${j}]`, D) : S.append(`${_}[${j}]`, String(D)));
2547
+ }) : typeof A == "string" ? S.append(_, A) : S.append(_, String(A)));
2548
+ }), x(S, m);
2539
2549
  }, Ce = {
2540
- ...f ? { width: typeof f == "number" ? `${f}px` : f } : {},
2541
- ...y ? { border: y } : {},
2550
+ ...u ? { width: typeof u == "number" ? `${u}px` : u } : {},
2551
+ ...f ? { border: f } : {},
2542
2552
  ...s ? { background: s } : {}
2543
2553
  };
2544
2554
  return /* @__PURE__ */ Z(
@@ -2546,7 +2556,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2546
2556
  {
2547
2557
  className: "rich-text-editor",
2548
2558
  style: Ce,
2549
- "data-disabled": l,
2559
+ "data-disabled": i,
2550
2560
  children: [
2551
2561
  /* @__PURE__ */ E(
2552
2562
  "div",
@@ -2587,7 +2597,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2587
2597
  {
2588
2598
  placement: "top",
2589
2599
  menu: {
2590
- items: M.map((h) => ({
2600
+ items: I.map((h) => ({
2591
2601
  key: h.key,
2592
2602
  label: /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2593
2603
  h.icon && /* @__PURE__ */ E("i", { className: h.icon }),
@@ -2599,8 +2609,8 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2599
2609
  }))
2600
2610
  },
2601
2611
  trigger: ["click"],
2602
- disabled: l || p,
2603
- children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor: M.length > 0 ? "pointer" : "default" }, children: [
2612
+ disabled: i || d,
2613
+ children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor: I.length > 0 ? "pointer" : "default" }, children: [
2604
2614
  /* @__PURE__ */ E("i", { className: "iconfont icon-zhinengti" }),
2605
2615
  /* @__PURE__ */ E("span", { className: "rte-agent-text", children: "智能体" })
2606
2616
  ] })
@@ -2611,7 +2621,7 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2611
2621
  (() => {
2612
2622
  const h = t.find((C) => C.type === "tag");
2613
2623
  if (!h || !h.text) return null;
2614
- const m = M.find((C) => C.label === h.text);
2624
+ const m = I.find((C) => C.label === h.text);
2615
2625
  return !m || m.points === void 0 || m.points === null ? null : /* @__PURE__ */ Z("div", { className: "rte-points-badge", children: [
2616
2626
  /* @__PURE__ */ E("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
2617
2627
  /* @__PURE__ */ Z("span", { style: { fontSize: "16px" }, children: [
@@ -2625,42 +2635,42 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2625
2635
  {
2626
2636
  type: "button",
2627
2637
  onClick: we,
2628
- disabled: p || l || e || !H,
2638
+ disabled: d || i || e || !H,
2629
2639
  className: "rich-text-editor-send-button",
2630
- children: p || e ? /* @__PURE__ */ E("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ E("i", { className: "iconfont icon-fasong" })
2640
+ children: d || e ? /* @__PURE__ */ E("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ E("i", { className: "iconfont icon-fasong" })
2631
2641
  }
2632
2642
  )
2633
2643
  ] })
2634
2644
  ] }),
2635
- v?.anchorEl && (() => {
2636
- if (!document.body.contains(v.anchorEl))
2645
+ b?.anchorEl && (() => {
2646
+ if (!document.body.contains(b.anchorEl))
2637
2647
  return null;
2638
2648
  let h = "", m = {
2639
2649
  background: "var(--neutral-800, #262626)"
2640
2650
  };
2641
- if (v.type === "upload")
2651
+ if (b.type === "upload")
2642
2652
  h = t.find(
2643
- (N) => N.type === "upload" && N.key === v.key
2653
+ (S) => S.type === "upload" && S.key === b.key
2644
2654
  )?.tooltip || "";
2645
- else if (v.type === "tag")
2646
- h = v.anchorEl.dataset.tooltip || "";
2647
- else if (v.type === "upload-label")
2648
- h = v.anchorEl.dataset.fileName || "";
2649
- else if (v.type === "variable")
2650
- h = v.anchorEl.dataset.tooltip || "";
2651
- else if (v.type === "upload-preview") {
2652
- const V = a[v.key];
2653
- if (V && V.type && V.type.startsWith("image/")) {
2654
- const N = URL.createObjectURL(V);
2655
- h = /* @__PURE__ */ E("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ E("img", { src: N, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), m = {
2655
+ else if (b.type === "tag")
2656
+ h = b.anchorEl.dataset.tooltip || "";
2657
+ else if (b.type === "upload-label")
2658
+ h = b.anchorEl.dataset.fileName || "";
2659
+ else if (b.type === "variable")
2660
+ h = b.anchorEl.dataset.tooltip || "";
2661
+ else if (b.type === "upload-preview") {
2662
+ const M = a[b.key];
2663
+ if (M && M.type && M.type.startsWith("image/")) {
2664
+ const S = URL.createObjectURL(M);
2665
+ h = /* @__PURE__ */ E("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ E("img", { src: S, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), m = {
2656
2666
  background: "#fff",
2657
2667
  padding: 4
2658
- }, setTimeout(() => URL.revokeObjectURL(N), 1e3);
2668
+ }, setTimeout(() => URL.revokeObjectURL(S), 1e3);
2659
2669
  } else
2660
2670
  h = "";
2661
2671
  }
2662
2672
  if (!h) return null;
2663
- const C = v.type === "upload-preview" ? "#0A0A0A" : "#fff";
2673
+ const C = b.type === "upload-preview" ? "#0A0A0A" : "#fff";
2664
2674
  return Xe(
2665
2675
  /* @__PURE__ */ E(
2666
2676
  st,
@@ -2676,10 +2686,10 @@ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, on
2676
2686
  {
2677
2687
  style: {
2678
2688
  position: "fixed",
2679
- left: `${v.anchorEl.getBoundingClientRect().left}px`,
2680
- top: `${v.anchorEl.getBoundingClientRect().top}px`,
2681
- width: `${v.anchorEl.offsetWidth}px`,
2682
- height: `${v.anchorEl.offsetHeight}px`,
2689
+ left: `${b.anchorEl.getBoundingClientRect().left}px`,
2690
+ top: `${b.anchorEl.getBoundingClientRect().top}px`,
2691
+ width: `${b.anchorEl.offsetWidth}px`,
2692
+ height: `${b.anchorEl.offsetHeight}px`,
2683
2693
  pointerEvents: "none"
2684
2694
  }
2685
2695
  }
@@ -2729,26 +2739,26 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2729
2739
  { label: "30页", value: 30 }
2730
2740
  ], jt = ({
2731
2741
  autoLoading: t,
2732
- batchSize: b,
2733
- loadingProgress: p,
2734
- loadIcon: l,
2735
- onBatchSizeChange: f,
2742
+ batchSize: x,
2743
+ loadingProgress: d,
2744
+ loadIcon: i,
2745
+ onBatchSizeChange: u,
2736
2746
  onLoadNextPage: T,
2737
- onStartAutoLoad: M,
2747
+ onStartAutoLoad: I,
2738
2748
  onStopLoad: $
2739
- }) => t && p ? /* @__PURE__ */ Z("div", { className: "auto_load_progress", children: [
2740
- l || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2749
+ }) => t && d ? /* @__PURE__ */ Z("div", { className: "auto_load_progress", children: [
2750
+ i || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2741
2751
  /* @__PURE__ */ Z("span", { children: [
2742
2752
  "正在加载第",
2743
- p.currentPage,
2753
+ d.currentPage,
2744
2754
  "/",
2745
- p.totalPages,
2755
+ d.totalPages,
2746
2756
  "页"
2747
2757
  ] }),
2748
2758
  /* @__PURE__ */ E(
2749
- lt,
2759
+ it,
2750
2760
  {
2751
- percent: p.percentage,
2761
+ percent: d.percentage,
2752
2762
  type: "line",
2753
2763
  size: [160, 8]
2754
2764
  }
@@ -2778,9 +2788,9 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2778
2788
  "div",
2779
2789
  {
2780
2790
  className: "auto_load_btn",
2781
- onClick: t ? void 0 : M,
2791
+ onClick: t ? void 0 : I,
2782
2792
  children: [
2783
- l || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2793
+ i || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2784
2794
  /* @__PURE__ */ E("span", { children: "自动加载" })
2785
2795
  ]
2786
2796
  }
@@ -2788,8 +2798,8 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2788
2798
  /* @__PURE__ */ E(
2789
2799
  Ge,
2790
2800
  {
2791
- value: b,
2792
- onChange: f,
2801
+ value: x,
2802
+ onChange: u,
2793
2803
  options: Wt,
2794
2804
  disabled: t,
2795
2805
  size: "small",
@@ -2802,22 +2812,22 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2802
2812
  )
2803
2813
  ] }), Ut = ({
2804
2814
  current: t,
2805
- loadIcon: b,
2806
- pageSize: p,
2807
- total: l,
2808
- cachedPages: f,
2815
+ loadIcon: x,
2816
+ pageSize: d,
2817
+ total: i,
2818
+ cachedPages: u,
2809
2819
  loadedCount: T,
2810
- autoLoading: M = !1,
2820
+ autoLoading: I = !1,
2811
2821
  loadingProgress: $,
2812
2822
  onChange: w,
2813
2823
  onLoadNextPage: e,
2814
2824
  onStartAutoLoad: q,
2815
- onStopLoading: y
2825
+ onStopLoading: f
2816
2826
  }) => {
2817
- const [s, r] = ne(5), n = Math.ceil(l / p), o = Ye(() => f.length >= n, [f, n]), a = () => Array.from(
2827
+ const [s, r] = ne(5), n = Math.ceil(i / d), o = Ye(() => u.length >= n, [u, n]), a = () => Array.from(
2818
2828
  { length: n },
2819
- (x, v) => v + 1
2820
- ).filter((x) => !f.includes(x)).slice(0, s);
2829
+ (g, b) => b + 1
2830
+ ).filter((g) => !u.includes(g)).slice(0, s);
2821
2831
  return /* @__PURE__ */ Z("div", { className: "pagination_footer", children: [
2822
2832
  /* @__PURE__ */ Z("div", { className: "pagination_leftWrap", children: [
2823
2833
  /* @__PURE__ */ Z("span", { className: "pagination_total", children: [
@@ -2830,50 +2840,50 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2830
2840
  "已加载: ",
2831
2841
  T,
2832
2842
  "/",
2833
- l,
2843
+ i,
2834
2844
  "条数据"
2835
2845
  ] }),
2836
2846
  !o && /* @__PURE__ */ E(
2837
2847
  jt,
2838
2848
  {
2839
- loadIcon: b || void 0,
2840
- autoLoading: M,
2849
+ loadIcon: x || void 0,
2850
+ autoLoading: I,
2841
2851
  batchSize: s,
2842
2852
  loadingProgress: $,
2843
2853
  disabled: !e || !q,
2844
2854
  onBatchSizeChange: r,
2845
2855
  onLoadNextPage: () => e?.(),
2846
2856
  onStartAutoLoad: () => {
2847
- const d = a();
2848
- q?.(d);
2857
+ const y = a();
2858
+ q?.(y);
2849
2859
  },
2850
- onStopLoad: () => y?.()
2860
+ onStopLoad: () => f?.()
2851
2861
  }
2852
2862
  )
2853
2863
  ] }),
2854
2864
  /* @__PURE__ */ E(
2855
- it,
2865
+ lt,
2856
2866
  {
2857
2867
  current: t,
2858
- pageSize: p,
2859
- total: l,
2860
- onChange: (d) => w(d),
2868
+ pageSize: d,
2869
+ total: i,
2870
+ onChange: (y) => w(y),
2861
2871
  showSizeChanger: !1,
2862
2872
  showQuickJumper: !1,
2863
- showTotal: (d, x) => "",
2864
- itemRender: (d, x, v) => {
2865
- const _ = f.includes(d);
2866
- return x === "prev" || x === "next" || x === "jump-prev" || x === "jump-next" ? /* @__PURE__ */ E("div", { className: "pageBox", children: v }) : /* @__PURE__ */ Z(
2873
+ showTotal: (y, g) => "",
2874
+ itemRender: (y, g, b) => {
2875
+ const V = u.includes(y);
2876
+ return g === "prev" || g === "next" || g === "jump-prev" || g === "jump-next" ? /* @__PURE__ */ E("div", { className: "pageBox", children: b }) : /* @__PURE__ */ Z(
2867
2877
  "div",
2868
2878
  {
2869
2879
  className: "pageBox",
2870
2880
  style: {
2871
- backgroundColor: t === d ? "#2563EB" : "#f5f5f5",
2872
- color: t === d ? "#fff" : _ ? "#171717" : "#a3a3a3"
2881
+ backgroundColor: t === y ? "#2563EB" : "#f5f5f5",
2882
+ color: t === y ? "#fff" : V ? "#171717" : "#a3a3a3"
2873
2883
  },
2874
2884
  children: [
2875
- d,
2876
- !_ && /* @__PURE__ */ E("span", { className: "unload_spot" })
2885
+ y,
2886
+ !V && /* @__PURE__ */ E("span", { className: "unload_spot" })
2877
2887
  ]
2878
2888
  }
2879
2889
  );
@@ -2883,24 +2893,24 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2883
2893
  ] });
2884
2894
  }, Yt = (t) => {
2885
2895
  const {
2886
- loading: b,
2887
- autoLoading: p,
2888
- loadingProgress: l,
2889
- columns: f = [],
2896
+ loading: x,
2897
+ autoLoading: d,
2898
+ loadingProgress: i,
2899
+ columns: u = [],
2890
2900
  dataSource: T = [],
2891
- total: M,
2901
+ total: I,
2892
2902
  current: $,
2893
2903
  pageSize: w,
2894
2904
  cachedPages: e,
2895
2905
  onChangePage: q,
2896
- onLoadNextPage: y,
2906
+ onLoadNextPage: f,
2897
2907
  onStartAutoLoad: s,
2898
2908
  onStopLoading: r,
2899
2909
  ...n
2900
2910
  } = t, o = Q(null), a = ae(
2901
- (u) => {
2902
- q(u), e.includes(u) && o.current?.scrollTo({
2903
- key: `${(u - 1) * w + 1}`
2911
+ (p) => {
2912
+ q(p), e.includes(p) && o.current?.scrollTo({
2913
+ key: `${(p - 1) * w + 1}`
2904
2914
  });
2905
2915
  },
2906
2916
  [$]
@@ -2911,7 +2921,7 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2911
2921
  {
2912
2922
  ref: o,
2913
2923
  ...n,
2914
- columns: f,
2924
+ columns: u,
2915
2925
  dataSource: T,
2916
2926
  pagination: !1,
2917
2927
  virtual: !0
@@ -2920,16 +2930,16 @@ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2920
2930
  /* @__PURE__ */ E(
2921
2931
  Ut,
2922
2932
  {
2923
- loading: b,
2924
- autoLoading: p,
2925
- loadingProgress: l,
2933
+ loading: x,
2934
+ autoLoading: d,
2935
+ loadingProgress: i,
2926
2936
  current: $,
2927
2937
  pageSize: w,
2928
- total: M,
2938
+ total: I,
2929
2939
  loadedCount: T.length,
2930
2940
  cachedPages: e,
2931
2941
  onChange: a,
2932
- onLoadNextPage: y,
2942
+ onLoadNextPage: f,
2933
2943
  onStartAutoLoad: s,
2934
2944
  onStopLoading: r
2935
2945
  }
@@ -3045,75 +3055,75 @@ Yt.__docgenInfo = {
3045
3055
  };
3046
3056
  const Kt = ({
3047
3057
  texts: t = [],
3048
- placeholder: b = "请输入内容",
3049
- animationSpeed: p = 100,
3050
- autoPlay: l = !0,
3051
- value: f,
3058
+ placeholder: x = "请输入内容",
3059
+ animationSpeed: d = 100,
3060
+ autoPlay: i = !0,
3061
+ value: u,
3052
3062
  onChange: T,
3053
- ...M
3063
+ ...I
3054
3064
  }) => {
3055
- const [$, w] = ne(""), [e, q] = ne(0), [y, s] = ne(!1), [r, n] = ne(!1), [o, a] = ne(!1), u = Q(void 0), d = Q(void 0), x = Q(t), v = Q(e), _ = Q(r), k = Q($);
3065
+ const [$, w] = ne(""), [e, q] = ne(0), [f, s] = ne(!1), [r, n] = ne(!1), [o, a] = ne(!1), p = Q(void 0), y = Q(void 0), g = Q(t), b = Q(e), V = Q(r), k = Q($);
3056
3066
  de(() => {
3057
- x.current = t, v.current = e, _.current = r, k.current = $;
3067
+ g.current = t, b.current = e, V.current = r, k.current = $;
3058
3068
  });
3059
- const P = ae((i, c) => {
3060
- let g = 0;
3069
+ const P = ae((l, c) => {
3070
+ let v = 0;
3061
3071
  a(!0);
3062
3072
  const L = () => {
3063
- g < i.length ? (w(i.slice(0, g + 1)), g++, d.current = window.setTimeout(L, p)) : (a(!1), c?.());
3073
+ v < l.length ? (w(l.slice(0, v + 1)), v++, y.current = window.setTimeout(L, d)) : (a(!1), c?.());
3064
3074
  };
3065
3075
  L();
3066
- }, [p]), H = ae((i) => {
3076
+ }, [d]), H = ae((l) => {
3067
3077
  let c = k.current.length;
3068
- const g = () => {
3069
- c > 0 ? (w(k.current.slice(0, c - 1)), c--, d.current = window.setTimeout(g, p / 2)) : i?.();
3078
+ const v = () => {
3079
+ c > 0 ? (w(k.current.slice(0, c - 1)), c--, y.current = window.setTimeout(v, d / 2)) : l?.();
3070
3080
  };
3071
- g();
3072
- }, [p]), F = ae(() => {
3073
- if (x.current.length === 0 || _.current) return;
3081
+ v();
3082
+ }, [d]), F = ae(() => {
3083
+ if (g.current.length === 0 || V.current) return;
3074
3084
  s(!0);
3075
- const i = x.current[v.current];
3085
+ const l = g.current[b.current];
3076
3086
  k.current ? H(() => {
3077
- P(i, () => {
3078
- u.current = window.setTimeout(() => {
3079
- q((c) => (c + 1) % x.current.length), s(!1);
3087
+ P(l, () => {
3088
+ p.current = window.setTimeout(() => {
3089
+ q((c) => (c + 1) % g.current.length), s(!1);
3080
3090
  }, 2e3);
3081
3091
  });
3082
- }) : P(i, () => {
3083
- u.current = window.setTimeout(() => {
3084
- q((c) => (c + 1) % x.current.length), s(!1);
3092
+ }) : P(l, () => {
3093
+ p.current = window.setTimeout(() => {
3094
+ q((c) => (c + 1) % g.current.length), s(!1);
3085
3095
  }, 2e3);
3086
3096
  });
3087
3097
  }, [H, P]);
3088
- return de(() => (l && t.length > 0 && !r && F(), () => {
3089
- u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current);
3090
- }), [e, r, l, t.length, F]), de(() => {
3091
- !y && l && t.length > 0 && !r && F();
3092
- }, [e, y, l, t.length, r, F]), /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3098
+ return de(() => (i && t.length > 0 && !r && F(), () => {
3099
+ p.current && window.clearTimeout(p.current), y.current && window.clearTimeout(y.current);
3100
+ }), [e, r, i, t.length, F]), de(() => {
3101
+ !f && i && t.length > 0 && !r && F();
3102
+ }, [e, f, i, t.length, r, F]), /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3093
3103
  /* @__PURE__ */ E(
3094
3104
  Ke,
3095
3105
  {
3096
- ...M,
3097
- value: f,
3098
- onChange: (i) => {
3099
- T?.(i.target.value), M.onChange?.(i);
3106
+ ...I,
3107
+ value: u,
3108
+ onChange: (l) => {
3109
+ T?.(l.target.value), I.onChange?.(l);
3100
3110
  },
3101
- onFocus: (i) => {
3102
- n(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), s(!1), a(!1), M.onFocus?.(i);
3111
+ onFocus: (l) => {
3112
+ n(!0), p.current && window.clearTimeout(p.current), y.current && window.clearTimeout(y.current), s(!1), a(!1), I.onFocus?.(l);
3103
3113
  },
3104
- onBlur: (i) => {
3105
- n(!1), !f && t.length > 0 && (w(""), q(0)), M.onBlur?.(i);
3114
+ onBlur: (l) => {
3115
+ n(!1), !u && t.length > 0 && (w(""), q(0)), I.onBlur?.(l);
3106
3116
  },
3107
- placeholder: r || f ? b : $ || b,
3117
+ placeholder: r || u ? x : $ || x,
3108
3118
  style: {
3109
3119
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3110
- ...M.style,
3120
+ ...I.style,
3111
3121
  position: "relative",
3112
3122
  zIndex: 1
3113
3123
  }
3114
3124
  }
3115
3125
  ),
3116
- !r && !f && $ && /* @__PURE__ */ Z(
3126
+ !r && !u && $ && /* @__PURE__ */ Z(
3117
3127
  "div",
3118
3128
  {
3119
3129
  style: {
@@ -3206,17 +3216,17 @@ Kt.__docgenInfo = {
3206
3216
  const Xt = ({
3207
3217
  texts: t = [],
3208
3218
  // 动态文案数组,默认为空数组
3209
- placeholder: b = "请输入内容",
3219
+ placeholder: x = "请输入内容",
3210
3220
  // 占位符文本
3211
- animationSpeed: p = 100,
3221
+ animationSpeed: d = 100,
3212
3222
  // 打字机动画速度,毫秒
3213
- autoPlay: l = !0,
3223
+ autoPlay: i = !0,
3214
3224
  // 是否自动播放动画
3215
- value: f = "",
3225
+ value: u = "",
3216
3226
  // 受控模式的值
3217
3227
  onChange: T,
3218
3228
  // 受控模式的变化回调
3219
- onSubmit: M,
3229
+ onSubmit: I,
3220
3230
  // 提交回调
3221
3231
  maxLength: $ = 500,
3222
3232
  // 最大字符数限制
@@ -3226,71 +3236,71 @@ const Xt = ({
3226
3236
  // 提交按钮文本
3227
3237
  disabled: q = !1,
3228
3238
  // 是否禁用组件
3229
- rows: y = 4,
3239
+ rows: f = 4,
3230
3240
  // 文本域行数
3231
3241
  style: s,
3232
3242
  // 自定义样式
3233
3243
  ...r
3234
3244
  // 其他原生属性
3235
3245
  }) => {
3236
- const [n, o] = ne(""), [a, u] = ne(0), [d, x] = ne(!1), [v, _] = ne(!1), [k, P] = ne(!1), [H, F] = ne(f || ""), U = Q(void 0), R = Q(void 0), ee = Q(t), re = Q(a), i = Q(v), c = Q(n), g = Q(null);
3246
+ const [n, o] = ne(""), [a, p] = ne(0), [y, g] = ne(!1), [b, V] = ne(!1), [k, P] = ne(!1), [H, F] = ne(u || ""), U = Q(void 0), R = Q(void 0), ee = Q(t), re = Q(a), l = Q(b), c = Q(n), v = Q(null);
3237
3247
  de(() => {
3238
- ee.current = t, re.current = a, i.current = v, c.current = n;
3248
+ ee.current = t, re.current = a, l.current = b, c.current = n;
3239
3249
  });
3240
3250
  const L = ae((X, ue) => {
3241
3251
  let he = 0;
3242
3252
  P(!0);
3243
3253
  const ye = () => {
3244
- he < X.length ? (o(X.slice(0, he + 1)), he++, R.current = window.setTimeout(ye, p)) : (P(!1), ue?.());
3254
+ he < X.length ? (o(X.slice(0, he + 1)), he++, R.current = window.setTimeout(ye, d)) : (P(!1), ue?.());
3245
3255
  };
3246
3256
  ye();
3247
- }, [p]), S = ae((X) => {
3257
+ }, [d]), N = ae((X) => {
3248
3258
  let ue = c.current.length;
3249
3259
  const he = () => {
3250
- ue > 0 ? (o(c.current.slice(0, ue - 1)), ue--, R.current = window.setTimeout(he, p / 2)) : X?.();
3260
+ ue > 0 ? (o(c.current.slice(0, ue - 1)), ue--, R.current = window.setTimeout(he, d / 2)) : X?.();
3251
3261
  };
3252
3262
  he();
3253
- }, [p]), W = ae(() => {
3254
- if (ee.current.length === 0 || i.current) return;
3255
- x(!0);
3263
+ }, [d]), W = ae(() => {
3264
+ if (ee.current.length === 0 || l.current) return;
3265
+ g(!0);
3256
3266
  const X = ee.current[re.current];
3257
- c.current ? S(() => {
3267
+ c.current ? N(() => {
3258
3268
  L(X, () => {
3259
3269
  U.current = window.setTimeout(() => {
3260
- u((ue) => (ue + 1) % ee.current.length), x(!1);
3270
+ p((ue) => (ue + 1) % ee.current.length), g(!1);
3261
3271
  }, 2e3);
3262
3272
  });
3263
3273
  }) : L(X, () => {
3264
3274
  U.current = window.setTimeout(() => {
3265
- u((ue) => (ue + 1) % ee.current.length), x(!1);
3275
+ p((ue) => (ue + 1) % ee.current.length), g(!1);
3266
3276
  }, 2e3);
3267
3277
  });
3268
- }, [S, L]);
3269
- de(() => (l && t.length > 0 && !v && W(), () => {
3278
+ }, [N, L]);
3279
+ de(() => (i && t.length > 0 && !b && W(), () => {
3270
3280
  U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current);
3271
- }), [a, v, l, t.length, W]), de(() => {
3272
- !d && l && t.length > 0 && !v && W();
3273
- }, [a, d, l, t.length, v, W]);
3281
+ }), [a, b, i, t.length, W]), de(() => {
3282
+ !y && i && t.length > 0 && !b && W();
3283
+ }, [a, y, i, t.length, b, W]);
3274
3284
  const z = (X) => {
3275
- _(!0), U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current), x(!1), P(!1), r.onFocus?.(X);
3285
+ V(!0), U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current), g(!1), P(!1), r.onFocus?.(X);
3276
3286
  }, te = (X) => {
3277
- _(!1), !f && t.length > 0 && (o(""), u(0)), r.onBlur?.(X);
3287
+ V(!1), !u && t.length > 0 && (o(""), p(0)), r.onBlur?.(X);
3278
3288
  }, se = (X) => {
3279
3289
  const ue = X.target.value;
3280
3290
  $ && ue.length > $ || (T ? T(ue) : F(ue), r.onChange?.(X));
3281
3291
  }, ce = () => {
3282
- const X = T ? f : H;
3283
- X.trim() && !q && (M?.(X), T || F(""));
3292
+ const X = T ? u : H;
3293
+ X.trim() && !q && (I?.(X), T || F(""));
3284
3294
  }, pe = (X) => {
3285
3295
  (X.ctrlKey || X.metaKey) && X.key === "Enter" && (X.preventDefault(), ce()), r.onKeyDown?.(X);
3286
- }, fe = T ? f : H, be = q || !fe.trim() || ($ ? fe.length > $ : !1);
3296
+ }, fe = T ? u : H, be = q || !fe.trim() || ($ ? fe.length > $ : !1);
3287
3297
  return /* @__PURE__ */ Z("div", { style: { position: "relative", ...s }, children: [
3288
3298
  /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3289
3299
  /* @__PURE__ */ E(
3290
3300
  "textarea",
3291
3301
  {
3292
- ref: g,
3293
- value: T ? f : H,
3302
+ ref: v,
3303
+ value: T ? u : H,
3294
3304
  onChange: se,
3295
3305
  onFocus: (X) => {
3296
3306
  X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", z(X);
@@ -3299,13 +3309,13 @@ const Xt = ({
3299
3309
  X.target.style.borderColor = "#d9d9d9", X.target.style.boxShadow = "none", te(X);
3300
3310
  },
3301
3311
  onKeyDown: pe,
3302
- placeholder: v || fe ? b : "",
3312
+ placeholder: b || fe ? x : "",
3303
3313
  maxLength: $,
3304
- rows: y,
3314
+ rows: f,
3305
3315
  disabled: q,
3306
3316
  style: {
3307
3317
  width: "100%",
3308
- minHeight: `${y * 24 + 16}px`,
3318
+ minHeight: `${f * 24 + 16}px`,
3309
3319
  padding: "8px 60px 8px 12px",
3310
3320
  // 右侧留出按钮空间
3311
3321
  border: "1px solid #d9d9d9",
@@ -3323,7 +3333,7 @@ const Xt = ({
3323
3333
  ...r
3324
3334
  }
3325
3335
  ),
3326
- !v && !fe && n && /* @__PURE__ */ Z(
3336
+ !b && !fe && n && /* @__PURE__ */ Z(
3327
3337
  "div",
3328
3338
  {
3329
3339
  style: {
@@ -3505,43 +3515,43 @@ Xt.__docgenInfo = {
3505
3515
  };
3506
3516
  const Je = ({
3507
3517
  src: t,
3508
- poster: b,
3509
- width: p = 300,
3510
- height: l,
3511
- videoWidth: f,
3518
+ poster: x,
3519
+ width: d = 300,
3520
+ height: i,
3521
+ videoWidth: u,
3512
3522
  // 参数保留但不使用,由CSS控制
3513
3523
  videoHeight: T,
3514
3524
  // 参数保留但不使用,由CSS控制
3515
- showPlayButton: M = !0,
3525
+ showPlayButton: I = !0,
3516
3526
  autoPlayOnHover: $ = !0,
3517
3527
  onClick: w,
3518
3528
  onVideoLoaded: e,
3519
3529
  onVideoPlay: q,
3520
- onVideoPause: y,
3530
+ onVideoPause: f,
3521
3531
  onVideoEnded: s,
3522
3532
  className: r,
3523
3533
  style: n,
3524
3534
  ...o
3525
3535
  }) => {
3526
- const a = Q(null), [u, d] = ne(!1), [x, v] = ne(!1), [_, k] = ne(!1), P = ae(() => {
3527
- a.current && (a.current.play(), d(!0), q?.());
3536
+ const a = Q(null), [p, y] = ne(!1), [g, b] = ne(!1), [V, k] = ne(!1), P = ae(() => {
3537
+ a.current && (a.current.play(), y(!0), q?.());
3528
3538
  }, [q]), H = ae(() => {
3529
- a.current && (a.current.pause(), d(!1), y?.());
3530
- }, [y]), F = ae((L) => {
3531
- L.stopPropagation(), u ? H() : P();
3532
- }, [u, P, H]), U = ae(() => {
3533
- v(!0), $ && !u && P();
3534
- }, [$, u, P]), R = ae(() => {
3535
- v(!1), $ && u && H();
3536
- }, [$, u, H]), ee = ae(() => {
3539
+ a.current && (a.current.pause(), y(!1), f?.());
3540
+ }, [f]), F = ae((L) => {
3541
+ L.stopPropagation(), p ? H() : P();
3542
+ }, [p, P, H]), U = ae(() => {
3543
+ b(!0), $ && !p && P();
3544
+ }, [$, p, P]), R = ae(() => {
3545
+ b(!1), $ && p && H();
3546
+ }, [$, p, H]), ee = ae(() => {
3537
3547
  k(!0), e?.();
3538
3548
  }, [e]), re = ae(() => {
3539
- d(!0), q?.();
3540
- }, [q]), i = ae(() => {
3541
- d(!1), y?.();
3542
- }, [y]), c = ae(() => {
3543
- d(!1), s?.();
3544
- }, [s]), g = ae((L) => {
3549
+ y(!0), q?.();
3550
+ }, [q]), l = ae(() => {
3551
+ y(!1), f?.();
3552
+ }, [f]), c = ae(() => {
3553
+ y(!1), s?.();
3554
+ }, [s]), v = ae((L) => {
3545
3555
  w?.(L);
3546
3556
  }, [w]);
3547
3557
  return /* @__PURE__ */ E(
@@ -3550,8 +3560,8 @@ const Je = ({
3550
3560
  ...o,
3551
3561
  className: `video-card ${r || ""}`,
3552
3562
  style: {
3553
- width: p,
3554
- height: l,
3563
+ width: d,
3564
+ height: i,
3555
3565
  padding: 0,
3556
3566
  overflow: "hidden",
3557
3567
  cursor: w ? "pointer" : "default",
@@ -3562,32 +3572,32 @@ const Je = ({
3562
3572
  bordered: !1,
3563
3573
  onMouseEnter: U,
3564
3574
  onMouseLeave: R,
3565
- onClick: g,
3575
+ onClick: v,
3566
3576
  children: /* @__PURE__ */ Z("div", { className: "video-card-container", children: [
3567
3577
  /* @__PURE__ */ E(
3568
3578
  "video",
3569
3579
  {
3570
3580
  ref: a,
3571
3581
  src: t,
3572
- poster: b,
3582
+ poster: x,
3573
3583
  preload: "metadata",
3574
3584
  onLoadedData: ee,
3575
3585
  onPlay: re,
3576
- onPause: i,
3586
+ onPause: l,
3577
3587
  onEnded: c,
3578
3588
  muted: !0,
3579
3589
  loop: !0
3580
3590
  }
3581
3591
  ),
3582
- M && /* @__PURE__ */ E(
3592
+ I && /* @__PURE__ */ E(
3583
3593
  "div",
3584
3594
  {
3585
- className: `video-play-button ${x ? "hovered" : ""}`,
3595
+ className: `video-play-button ${g ? "hovered" : ""}`,
3586
3596
  onClick: F,
3587
- children: u ? /* @__PURE__ */ E(ht, { className: "play-icon" }) : /* @__PURE__ */ E(gt, { className: "play-icon" })
3597
+ children: p ? /* @__PURE__ */ E(ht, { className: "play-icon" }) : /* @__PURE__ */ E(gt, { className: "play-icon" })
3588
3598
  }
3589
3599
  ),
3590
- !_ && /* @__PURE__ */ E("div", { className: "video-loading-mask", children: /* @__PURE__ */ E("div", { className: "loading-spinner" }) })
3600
+ !V && /* @__PURE__ */ E("div", { className: "video-loading-mask", children: /* @__PURE__ */ E("div", { className: "loading-spinner" }) })
3591
3601
  ] })
3592
3602
  }
3593
3603
  );
@@ -3693,12 +3703,12 @@ Je.__docgenInfo = {
3693
3703
  }
3694
3704
  }
3695
3705
  };
3696
- const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((p) => t.toLowerCase().includes(p)), Qt = (t) => t.type ? t.type : Jt(t.url) ? "video" : "image", Zt = ({
3706
+ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((d) => t.toLowerCase().includes(d)), Qt = (t) => t.type ? t.type : Jt(t.url) ? "video" : "image", Zt = ({
3697
3707
  items: t,
3698
- columns: b,
3699
- gap: p = 0,
3700
- responsive: l = !0,
3701
- breakpoints: f = {
3708
+ columns: x,
3709
+ gap: d = 0,
3710
+ responsive: i = !0,
3711
+ breakpoints: u = {
3702
3712
  xs: 1,
3703
3713
  sm: 2,
3704
3714
  md: 3,
@@ -3707,34 +3717,34 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3707
3717
  xxl: 6
3708
3718
  },
3709
3719
  className: T,
3710
- style: M,
3720
+ style: I,
3711
3721
  onClick: $
3712
3722
  }) => {
3713
- const w = Q(null), [e, q] = ne(b || f.md || 3), y = Q(/* @__PURE__ */ new Map()), s = ae(() => {
3714
- if (!l || b)
3715
- return b || f.md || 3;
3723
+ const w = Q(null), [e, q] = ne(x || u.md || 3), f = Q(/* @__PURE__ */ new Map()), s = ae(() => {
3724
+ if (!i || x)
3725
+ return x || u.md || 3;
3716
3726
  const a = window.innerWidth;
3717
- return a < 576 ? f.xs || 1 : a < 768 ? f.sm || 2 : a < 992 ? f.md || 3 : a < 1200 ? f.lg || 4 : a < 1600 ? f.xl || 5 : f.xxl || 6;
3718
- }, [l, b, f]), r = ae(() => {
3727
+ return a < 576 ? u.xs || 1 : a < 768 ? u.sm || 2 : a < 992 ? u.md || 3 : a < 1200 ? u.lg || 4 : a < 1600 ? u.xl || 5 : u.xxl || 6;
3728
+ }, [i, x, u]), r = ae(() => {
3719
3729
  if (!w.current) return;
3720
- const a = e, u = w.current, x = (u.offsetWidth - p * (a - 1)) / a, v = new Array(a).fill(0);
3730
+ const a = e, p = w.current, g = (p.offsetWidth - d * (a - 1)) / a, b = new Array(a).fill(0);
3721
3731
  t.forEach((k, P) => {
3722
- const H = k.id || P, F = y.current.get(H);
3732
+ const H = k.id || P, F = f.current.get(H);
3723
3733
  if (!F) return;
3724
- const U = Math.min(...v), R = v.indexOf(U), ee = R * (x + p), re = v[R];
3725
- F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${x}px`, v[R] += F.offsetHeight + p;
3734
+ const U = Math.min(...b), R = b.indexOf(U), ee = R * (g + d), re = b[R];
3735
+ F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${g}px`, b[R] += F.offsetHeight + d;
3726
3736
  });
3727
- const _ = Math.max(...v);
3728
- u.style.height = `${_}px`;
3729
- }, [t, e, p]);
3737
+ const V = Math.max(...b);
3738
+ p.style.height = `${V}px`;
3739
+ }, [t, e, d]);
3730
3740
  de(() => {
3731
3741
  const a = () => {
3732
- const u = s();
3733
- u !== e && q(u);
3742
+ const p = s();
3743
+ p !== e && q(p);
3734
3744
  };
3735
- if (l)
3745
+ if (i)
3736
3746
  return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
3737
- }, [l, s, e]), de(() => {
3747
+ }, [i, s, e]), de(() => {
3738
3748
  const a = setTimeout(() => {
3739
3749
  r();
3740
3750
  }, 100);
@@ -3753,18 +3763,18 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3753
3763
  style: {
3754
3764
  position: "relative",
3755
3765
  width: "100%",
3756
- ...M
3766
+ ...I
3757
3767
  },
3758
- children: t.map((a, u) => {
3759
- const d = a.id || u, x = Qt(a);
3768
+ children: t.map((a, p) => {
3769
+ const y = a.id || p, g = Qt(a);
3760
3770
  return /* @__PURE__ */ E(
3761
3771
  "div",
3762
3772
  {
3763
- ref: (v) => {
3764
- v ? y.current.set(d, v) : y.current.delete(d);
3773
+ ref: (b) => {
3774
+ b ? f.current.set(y, b) : f.current.delete(y);
3765
3775
  },
3766
3776
  className: "waterfall-item",
3767
- children: x === "video" ? /* @__PURE__ */ E("div", { style: {
3777
+ children: g === "video" ? /* @__PURE__ */ E("div", { style: {
3768
3778
  width: "100%",
3769
3779
  position: "relative",
3770
3780
  paddingBottom: "56.25%",
@@ -3791,7 +3801,7 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3791
3801
  "img",
3792
3802
  {
3793
3803
  src: a.url,
3794
- alt: `瀑布流图片 ${u + 1}`,
3804
+ alt: `瀑布流图片 ${p + 1}`,
3795
3805
  className: "waterfall-image",
3796
3806
  onLoad: n,
3797
3807
  onError: n,
@@ -3801,7 +3811,7 @@ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3801
3811
  }
3802
3812
  )
3803
3813
  },
3804
- d
3814
+ y
3805
3815
  );
3806
3816
  })
3807
3817
  }
@@ -3930,7 +3940,7 @@ const sn = {
3930
3940
  }
3931
3941
  };
3932
3942
  export {
3933
- St as AdvancedTable,
3943
+ Nt as AdvancedTable,
3934
3944
  xt as AppModal,
3935
3945
  Ct as BackButton,
3936
3946
  vt as Button,