bi-components-library 1.0.5 → 1.0.6

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,8 +1,8 @@
1
- import Ne, { useState as z, useRef as W, useMemo as Ce, useCallback as B, useEffect as J } from "react";
2
- import { Button as le, Card as he, Modal as qe, Table as we, Flex as ge, Spin as Se, Empty as $e, Select as Ee, Form as ue, Input as ke, Space as Re, Dropdown as Ae, Tooltip as _e, theme as je } from "antd";
3
- import { createFromIconfontCN as Ie, LeftOutlined as Le, SearchOutlined as Ve, ReloadOutlined as Oe, SendOutlined as Pe, PauseCircleOutlined as Me, PlayCircleOutlined as De } from "@ant-design/icons";
4
- import { createPortal as Ge } from "react-dom";
5
- var de = { exports: {} }, ie = {};
1
+ import $e, { useState as z, useRef as K, useMemo as Re, useCallback as F, useEffect as Z } from "react";
2
+ import { Button as de, Card as ve, Modal as Ae, Table as Ne, Flex as we, Spin as Ie, Empty as _e, Select as Ce, Form as me, Input as qe, Space as je, Dropdown as Le, Tooltip as Ve, theme as Oe } from "antd";
3
+ import { createFromIconfontCN as Me, LeftOutlined as Pe, SearchOutlined as De, ReloadOutlined as Be, SendOutlined as Ge, PauseCircleOutlined as Fe, PlayCircleOutlined as ze } from "@ant-design/icons";
4
+ import { createPortal as He } from "react-dom";
5
+ var ye = { exports: {} }, pe = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,29 +12,29 @@ var de = { exports: {} }, ie = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var be;
16
- function Fe() {
17
- if (be) return ie;
18
- be = 1;
19
- var n = Symbol.for("react.transitional.element"), m = Symbol.for("react.fragment");
20
- function c(a, o, h) {
21
- var q = null;
22
- if (h !== void 0 && (q = "" + h), o.key !== void 0 && (q = "" + o.key), "key" in o) {
23
- h = {};
24
- for (var p in o)
25
- p !== "key" && (h[p] = o[p]);
26
- } else h = o;
27
- return o = h.ref, {
28
- $$typeof: n,
29
- type: a,
30
- key: q,
31
- ref: o !== void 0 ? o : null,
32
- props: h
15
+ var Ee;
16
+ function We() {
17
+ if (Ee) return pe;
18
+ Ee = 1;
19
+ var t = Symbol.for("react.transitional.element"), p = Symbol.for("react.fragment");
20
+ function u(s, i, m) {
21
+ var C = null;
22
+ if (m !== void 0 && (C = "" + m), i.key !== void 0 && (C = "" + i.key), "key" in i) {
23
+ m = {};
24
+ for (var h in i)
25
+ h !== "key" && (m[h] = i[h]);
26
+ } else m = i;
27
+ return i = m.ref, {
28
+ $$typeof: t,
29
+ type: s,
30
+ key: C,
31
+ ref: i !== void 0 ? i : null,
32
+ props: m
33
33
  };
34
34
  }
35
- return ie.Fragment = m, ie.jsx = c, ie.jsxs = c, ie;
35
+ return pe.Fragment = p, pe.jsx = u, pe.jsxs = u, pe;
36
36
  }
37
- var ce = {};
37
+ var fe = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,123 +44,123 @@ var ce = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var xe;
48
- function Be() {
49
- return xe || (xe = 1, process.env.NODE_ENV !== "production" && function() {
50
- function n(l) {
47
+ var ke;
48
+ function Xe() {
49
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
50
+ function t(l) {
51
51
  if (l == null) return null;
52
52
  if (typeof l == "function")
53
- return l.$$typeof === H ? null : l.displayName || l.name || null;
53
+ return l.$$typeof === G ? null : l.displayName || l.name || null;
54
54
  if (typeof l == "string") return l;
55
55
  switch (l) {
56
- case v:
56
+ case T:
57
57
  return "Fragment";
58
- case w:
59
- return "Profiler";
60
58
  case x:
59
+ return "Profiler";
60
+ case g:
61
61
  return "StrictMode";
62
- case C:
62
+ case $:
63
63
  return "Suspense";
64
- case O:
64
+ case L:
65
65
  return "SuspenseList";
66
- case P:
66
+ case O:
67
67
  return "Activity";
68
68
  }
69
69
  if (typeof l == "object")
70
70
  switch (typeof l.tag == "number" && console.error(
71
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
72
  ), l.$$typeof) {
73
- case R:
73
+ case A:
74
74
  return "Portal";
75
- case $:
75
+ case v:
76
76
  return (l.displayName || "Context") + ".Provider";
77
- case A:
77
+ case N:
78
78
  return (l._context.displayName || "Context") + ".Consumer";
79
- case S:
80
- var r = l.render;
81
- return l = l.displayName, l || (l = r.displayName || r.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
- case I:
83
- return r = l.displayName || null, r !== null ? r : n(l.type) || "Memo";
84
- case D:
85
- r = l._payload, l = l._init;
79
+ case k:
80
+ var j = l.render;
81
+ return l = l.displayName, l || (l = j.displayName || j.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
82
+ case V:
83
+ return j = l.displayName || null, j !== null ? j : t(l.type) || "Memo";
84
+ case P:
85
+ j = l._payload, l = l._init;
86
86
  try {
87
- return n(l(r));
87
+ return t(l(j));
88
88
  } catch {
89
89
  }
90
90
  }
91
91
  return null;
92
92
  }
93
- function m(l) {
93
+ function p(l) {
94
94
  return "" + l;
95
95
  }
96
- function c(l) {
96
+ function u(l) {
97
97
  try {
98
- m(l);
99
- var r = !1;
98
+ p(l);
99
+ var j = !1;
100
100
  } catch {
101
- r = !0;
101
+ j = !0;
102
102
  }
103
- if (r) {
104
- r = console;
105
- var i = r.error, y = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
- return i.call(
107
- r,
103
+ if (j) {
104
+ j = console;
105
+ var B = j.error, J = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
106
+ return B.call(
107
+ j,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- y
110
- ), m(l);
109
+ J
110
+ ), p(l);
111
111
  }
112
112
  }
113
- function a(l) {
114
- if (l === v) return "<>";
115
- if (typeof l == "object" && l !== null && l.$$typeof === D)
113
+ function s(l) {
114
+ if (l === T) return "<>";
115
+ if (typeof l == "object" && l !== null && l.$$typeof === P)
116
116
  return "<...>";
117
117
  try {
118
- var r = n(l);
119
- return r ? "<" + r + ">" : "<...>";
118
+ var j = t(l);
119
+ return j ? "<" + j + ">" : "<...>";
120
120
  } catch {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
- function o() {
125
- var l = G.A;
124
+ function i() {
125
+ var l = M.A;
126
126
  return l === null ? null : l.getOwner();
127
127
  }
128
- function h() {
128
+ function m() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
- function q(l) {
132
- if (K.call(l, "key")) {
133
- var r = Object.getOwnPropertyDescriptor(l, "key").get;
134
- if (r && r.isReactWarning) return !1;
131
+ function C(l) {
132
+ if (Y.call(l, "key")) {
133
+ var j = Object.getOwnPropertyDescriptor(l, "key").get;
134
+ if (j && j.isReactWarning) return !1;
135
135
  }
136
136
  return l.key !== void 0;
137
137
  }
138
- function p(l, r) {
139
- function i() {
138
+ function h(l, j) {
139
+ function B() {
140
140
  _ || (_ = !0, console.error(
141
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
- r
142
+ j
143
143
  ));
144
144
  }
145
- i.isReactWarning = !0, Object.defineProperty(l, "key", {
146
- get: i,
145
+ B.isReactWarning = !0, Object.defineProperty(l, "key", {
146
+ get: B,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
150
  function e() {
151
- var l = n(this.type);
152
- return F[l] || (F[l] = !0, console.error(
151
+ var l = t(this.type);
152
+ return W[l] || (W[l] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), l = this.props.ref, l !== void 0 ? l : null;
155
155
  }
156
- function t(l, r, i, y, T, g, L, f) {
157
- return i = g.ref, l = {
158
- $$typeof: d,
156
+ function r(l, j, B, J, oe, c, f, o) {
157
+ return B = c.ref, l = {
158
+ $$typeof: a,
159
159
  type: l,
160
- key: r,
161
- props: g,
162
- _owner: T
163
- }, (i !== void 0 ? i : null) !== null ? Object.defineProperty(l, "ref", {
160
+ key: j,
161
+ props: c,
162
+ _owner: oe
163
+ }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(l, "ref", {
164
164
  enumerable: !1,
165
165
  get: e
166
166
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -177,119 +177,119 @@ function Be() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: L
180
+ value: f
181
181
  }), Object.defineProperty(l, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: f
185
+ value: o
186
186
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
187
187
  }
188
- function N(l, r, i, y, T, g, L, f) {
189
- var b = r.children;
190
- if (b !== void 0)
191
- if (y)
192
- if (Q(b)) {
193
- for (y = 0; y < b.length; y++)
194
- s(b[y]);
195
- Object.freeze && Object.freeze(b);
188
+ function q(l, j, B, J, oe, c, f, o) {
189
+ var y = j.children;
190
+ if (y !== void 0)
191
+ if (J)
192
+ if (te(y)) {
193
+ for (J = 0; J < y.length; J++)
194
+ n(y[J]);
195
+ Object.freeze && Object.freeze(y);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
- else s(b);
201
- if (K.call(r, "key")) {
202
- b = n(l);
203
- var V = Object.keys(r).filter(function(Y) {
204
- return Y !== "key";
200
+ else n(y);
201
+ if (Y.call(j, "key")) {
202
+ y = t(l);
203
+ var b = Object.keys(j).filter(function(R) {
204
+ return R !== "key";
205
205
  });
206
- y = 0 < V.length ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}", re[b + y] || (V = 0 < V.length ? "{" + V.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ J = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", le[y + J] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
+ J,
213
214
  y,
214
215
  b,
215
- V,
216
- b
217
- ), re[b + y] = !0);
216
+ y
217
+ ), le[y + J] = !0);
218
218
  }
219
- if (b = null, i !== void 0 && (c(i), b = "" + i), q(r) && (c(r.key), b = "" + r.key), "key" in r) {
220
- i = {};
221
- for (var j in r)
222
- j !== "key" && (i[j] = r[j]);
223
- } else i = r;
224
- return b && p(
225
- i,
219
+ if (y = null, B !== void 0 && (u(B), y = "" + B), C(j) && (u(j.key), y = "" + j.key), "key" in j) {
220
+ B = {};
221
+ for (var E in j)
222
+ E !== "key" && (B[E] = j[E]);
223
+ } else B = j;
224
+ return y && h(
225
+ B,
226
226
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
227
- ), t(
227
+ ), r(
228
228
  l,
229
- b,
230
- g,
231
- T,
232
- o(),
233
- i,
234
- L,
235
- f
229
+ y,
230
+ c,
231
+ oe,
232
+ i(),
233
+ B,
234
+ f,
235
+ o
236
236
  );
237
237
  }
238
- function s(l) {
239
- typeof l == "object" && l !== null && l.$$typeof === d && l._store && (l._store.validated = 1);
238
+ function n(l) {
239
+ typeof l == "object" && l !== null && l.$$typeof === a && l._store && (l._store.validated = 1);
240
240
  }
241
- var k = Ne, d = Symbol.for("react.transitional.element"), R = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), H = Symbol.for("react.client.reference"), G = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, Q = Array.isArray, E = console.createTask ? console.createTask : function() {
241
+ var S = $e, a = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), v = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), L = Symbol.for("react.suspense_list"), V = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), M = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, te = Array.isArray, w = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
- k = {
244
+ S = {
245
245
  react_stack_bottom_frame: function(l) {
246
246
  return l();
247
247
  }
248
248
  };
249
- var _, F = {}, X = k.react_stack_bottom_frame.bind(
250
- k,
251
- h
252
- )(), ne = E(a(h)), re = {};
253
- ce.Fragment = v, ce.jsx = function(l, r, i, y, T) {
254
- var g = 1e4 > G.recentlyCreatedOwnerStacks++;
255
- return N(
249
+ var _, W = {}, U = S.react_stack_bottom_frame.bind(
250
+ S,
251
+ m
252
+ )(), se = w(s(m)), le = {};
253
+ fe.Fragment = T, fe.jsx = function(l, j, B, J, oe) {
254
+ var c = 1e4 > M.recentlyCreatedOwnerStacks++;
255
+ return q(
256
256
  l,
257
- r,
258
- i,
257
+ j,
258
+ B,
259
259
  !1,
260
- y,
261
- T,
262
- g ? Error("react-stack-top-frame") : X,
263
- g ? E(a(l)) : ne
260
+ J,
261
+ oe,
262
+ c ? Error("react-stack-top-frame") : U,
263
+ c ? w(s(l)) : se
264
264
  );
265
- }, ce.jsxs = function(l, r, i, y, T) {
266
- var g = 1e4 > G.recentlyCreatedOwnerStacks++;
267
- return N(
265
+ }, fe.jsxs = function(l, j, B, J, oe) {
266
+ var c = 1e4 > M.recentlyCreatedOwnerStacks++;
267
+ return q(
268
268
  l,
269
- r,
270
- i,
269
+ j,
270
+ B,
271
271
  !0,
272
- y,
273
- T,
274
- g ? Error("react-stack-top-frame") : X,
275
- g ? E(a(l)) : ne
272
+ J,
273
+ oe,
274
+ c ? Error("react-stack-top-frame") : U,
275
+ c ? w(s(l)) : se
276
276
  );
277
277
  };
278
- }()), ce;
278
+ }()), fe;
279
279
  }
280
- var ve;
281
- function ze() {
282
- return ve || (ve = 1, process.env.NODE_ENV === "production" ? de.exports = Fe() : de.exports = Be()), de.exports;
280
+ var Te;
281
+ function Ke() {
282
+ return Te || (Te = 1, process.env.NODE_ENV === "production" ? ye.exports = We() : ye.exports = Xe()), ye.exports;
283
283
  }
284
- var u = ze();
285
- const He = ({
286
- variant: n = "primary",
287
- loading: m = !1,
288
- children: c,
289
- ...a
284
+ var d = Ke();
285
+ const Ye = ({
286
+ variant: t = "primary",
287
+ loading: p = !1,
288
+ children: u,
289
+ ...s
290
290
  }) => {
291
- const o = (h) => {
292
- switch (h) {
291
+ const i = (m) => {
292
+ switch (m) {
293
293
  case "primary":
294
294
  return "primary";
295
295
  case "ghost":
@@ -304,18 +304,18 @@ const He = ({
304
304
  return "primary";
305
305
  }
306
306
  };
307
- return /* @__PURE__ */ u.jsx(
308
- le,
307
+ return /* @__PURE__ */ d.jsx(
308
+ de,
309
309
  {
310
- ...a,
311
- type: o(n),
312
- loading: m,
313
- ghost: n === "ghost",
314
- children: c
310
+ ...s,
311
+ type: i(t),
312
+ loading: p,
313
+ ghost: t === "ghost",
314
+ children: u
315
315
  }
316
316
  );
317
317
  };
318
- He.__docgenInfo = {
318
+ Ye.__docgenInfo = {
319
319
  displayName: "Button",
320
320
  description: "基础按钮,用于触发操作",
321
321
  props: {
@@ -359,25 +359,25 @@ He.__docgenInfo = {
359
359
  }
360
360
  }
361
361
  };
362
- const We = ({
363
- title: n,
364
- children: m,
365
- bordered: c = !0,
366
- hoverable: a = !1,
367
- size: o = "default",
368
- ...h
369
- }) => /* @__PURE__ */ u.jsx(
370
- he,
362
+ const Ue = ({
363
+ title: t,
364
+ children: p,
365
+ bordered: u = !0,
366
+ hoverable: s = !1,
367
+ size: i = "default",
368
+ ...m
369
+ }) => /* @__PURE__ */ d.jsx(
370
+ ve,
371
371
  {
372
- ...h,
373
- title: n,
374
- bordered: c,
375
- hoverable: a,
376
- size: o,
377
- children: m
372
+ ...m,
373
+ title: t,
374
+ bordered: u,
375
+ hoverable: s,
376
+ size: i,
377
+ children: p
378
378
  }
379
379
  );
380
- We.__docgenInfo = {
380
+ Ue.__docgenInfo = {
381
381
  displayName: "Card",
382
382
  description: "卡片容器,用于分组内容",
383
383
  props: {
@@ -428,23 +428,23 @@ We.__docgenInfo = {
428
428
  }
429
429
  }
430
430
  };
431
- const Ke = ({
432
- showDefaultFooter: n = !0,
433
- ...m
431
+ const Je = ({
432
+ showDefaultFooter: t = !0,
433
+ ...p
434
434
  }) => {
435
- const c = m.footer !== void 0 ? m.footer : n ? (a, { OkBtn: o, CancelBtn: h }) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
436
- /* @__PURE__ */ u.jsx(o, {}),
437
- /* @__PURE__ */ u.jsx(h, {})
435
+ const u = p.footer !== void 0 ? p.footer : t ? (s, { OkBtn: i, CancelBtn: m }) => /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
436
+ /* @__PURE__ */ d.jsx(i, {}),
437
+ /* @__PURE__ */ d.jsx(m, {})
438
438
  ] }) : null;
439
- return /* @__PURE__ */ u.jsx(
440
- qe,
439
+ return /* @__PURE__ */ d.jsx(
440
+ Ae,
441
441
  {
442
- ...m,
443
- footer: c
442
+ ...p,
443
+ footer: u
444
444
  }
445
445
  );
446
446
  };
447
- Ke.__docgenInfo = {
447
+ Je.__docgenInfo = {
448
448
  displayName: "AppModal",
449
449
  description: "应用级模态框组件,基于 Ant Design Modal 封装",
450
450
  props: {
@@ -505,29 +505,29 @@ Ke.__docgenInfo = {
505
505
  }
506
506
  }
507
507
  };
508
- const Xe = ({
509
- scrollX: n,
510
- showPagination: m = !0,
511
- defaultPageSize: c = 10,
512
- ...a
513
- }) => /* @__PURE__ */ u.jsx(
514
- we,
508
+ const Qe = ({
509
+ scrollX: t,
510
+ showPagination: p = !0,
511
+ defaultPageSize: u = 10,
512
+ ...s
513
+ }) => /* @__PURE__ */ d.jsx(
514
+ Ne,
515
515
  {
516
- ...a,
516
+ ...s,
517
517
  scroll: {
518
- x: n || "max-content",
518
+ x: t || "max-content",
519
519
  y: "50vh"
520
520
  },
521
- pagination: m ? {
521
+ pagination: p ? {
522
522
  hideOnSinglePage: !0,
523
523
  showSizeChanger: !0,
524
524
  showQuickJumper: !0,
525
- defaultPageSize: c,
526
- ...a.pagination
525
+ defaultPageSize: u,
526
+ ...s.pagination
527
527
  } : !1
528
528
  }
529
529
  );
530
- Xe.__docgenInfo = {
530
+ Qe.__docgenInfo = {
531
531
  displayName: "PageTable",
532
532
  description: "页面级表格组件,高度铺满容器,自动滚动",
533
533
  props: {
@@ -577,30 +577,30 @@ Xe.__docgenInfo = {
577
577
  }
578
578
  }
579
579
  };
580
- const Ye = Ie({
580
+ const Ze = Me({
581
581
  scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
582
- }), Ue = ({
583
- name: n,
584
- size: m,
585
- color: c,
586
- style: a,
587
- ...o
582
+ }), et = ({
583
+ name: t,
584
+ size: p,
585
+ color: u,
586
+ style: s,
587
+ ...i
588
588
  }) => {
589
- const h = {
590
- fontSize: m,
591
- color: c,
592
- ...a
589
+ const m = {
590
+ fontSize: p,
591
+ color: u,
592
+ ...s
593
593
  };
594
- return /* @__PURE__ */ u.jsx(
595
- Ye,
594
+ return /* @__PURE__ */ d.jsx(
595
+ Ze,
596
596
  {
597
- ...o,
598
- type: n,
599
- style: h
597
+ ...i,
598
+ type: t,
599
+ style: m
600
600
  }
601
601
  );
602
602
  };
603
- Ue.__docgenInfo = {
603
+ et.__docgenInfo = {
604
604
  displayName: "XcIcon",
605
605
  description: "自定义图标组件,基于 iconfont",
606
606
  props: {
@@ -636,43 +636,43 @@ Ue.__docgenInfo = {
636
636
  }
637
637
  }
638
638
  };
639
- const Je = ({
640
- loading: n,
641
- description: m = "暂无数据",
642
- className: c,
643
- emptyChildren: a,
644
- loadingText: o,
645
- emptyImage: h
646
- }) => n ? /* @__PURE__ */ u.jsxs(
647
- ge,
639
+ const tt = ({
640
+ loading: t,
641
+ description: p = "暂无数据",
642
+ className: u,
643
+ emptyChildren: s,
644
+ loadingText: i,
645
+ emptyImage: m
646
+ }) => t ? /* @__PURE__ */ d.jsxs(
647
+ we,
648
648
  {
649
- className: `pt-10 w-full ${c || ""}`,
649
+ className: `pt-10 w-full ${u || ""}`,
650
650
  align: "center",
651
651
  justify: "center",
652
652
  vertical: !0,
653
653
  children: [
654
- /* @__PURE__ */ u.jsx(Se, { size: "large" }),
655
- o && /* @__PURE__ */ u.jsx("div", { className: "mt-4 text-gray-500", children: o })
654
+ /* @__PURE__ */ d.jsx(Ie, { size: "large" }),
655
+ i && /* @__PURE__ */ d.jsx("div", { className: "mt-4 text-gray-500", children: i })
656
656
  ]
657
657
  }
658
- ) : /* @__PURE__ */ u.jsx(
659
- ge,
658
+ ) : /* @__PURE__ */ d.jsx(
659
+ we,
660
660
  {
661
- className: `pt-10 w-full ${c || ""}`,
661
+ className: `pt-10 w-full ${u || ""}`,
662
662
  align: "center",
663
663
  justify: "center",
664
- children: /* @__PURE__ */ u.jsx(
665
- $e,
664
+ children: /* @__PURE__ */ d.jsx(
665
+ _e,
666
666
  {
667
- image: h,
668
- description: m,
667
+ image: m,
668
+ description: p,
669
669
  imageStyle: { height: 180 },
670
- children: a
670
+ children: s
671
671
  }
672
672
  )
673
673
  }
674
674
  );
675
- Je.__docgenInfo = {
675
+ tt.__docgenInfo = {
676
676
  displayName: "EmptyAndSpin",
677
677
  description: "空状态和加载状态组合组件",
678
678
  props: {
@@ -715,24 +715,24 @@ Je.__docgenInfo = {
715
715
  }
716
716
  }
717
717
  };
718
- const Qe = ({
719
- onClick: n,
720
- showText: m = !1,
721
- className: c,
722
- size: a = "small",
723
- type: o = "default"
724
- }) => /* @__PURE__ */ u.jsx(
725
- le,
718
+ const nt = ({
719
+ onClick: t,
720
+ showText: p = !1,
721
+ className: u,
722
+ size: s = "small",
723
+ type: i = "default"
724
+ }) => /* @__PURE__ */ d.jsx(
725
+ de,
726
726
  {
727
- size: a,
728
- type: o,
729
- icon: /* @__PURE__ */ u.jsx(Le, {}),
730
- className: `cursor-pointer ${c || ""}`,
731
- onClick: n,
732
- children: m && "返回"
727
+ size: s,
728
+ type: i,
729
+ icon: /* @__PURE__ */ d.jsx(Pe, {}),
730
+ className: `cursor-pointer ${u || ""}`,
731
+ onClick: t,
732
+ children: p && "返回"
733
733
  }
734
734
  );
735
- Qe.__docgenInfo = {
735
+ nt.__docgenInfo = {
736
736
  displayName: "BackButton",
737
737
  description: "返回按钮组件",
738
738
  props: {
@@ -771,23 +771,23 @@ Qe.__docgenInfo = {
771
771
  }
772
772
  }
773
773
  };
774
- const Ze = ({
775
- removePadding: n = !0,
776
- className: m,
777
- ...c
774
+ const rt = ({
775
+ removePadding: t = !0,
776
+ className: p,
777
+ ...u
778
778
  }) => {
779
- const a = n ? `px-0 h-auto ${m || ""}` : m;
780
- return /* @__PURE__ */ u.jsx(
781
- le,
779
+ const s = t ? `px-0 h-auto ${p || ""}` : p;
780
+ return /* @__PURE__ */ d.jsx(
781
+ de,
782
782
  {
783
783
  type: "link",
784
- ...c,
785
- className: a,
786
- children: c.children
784
+ ...u,
785
+ className: s,
786
+ children: u.children
787
787
  }
788
788
  );
789
789
  };
790
- Ze.__docgenInfo = {
790
+ rt.__docgenInfo = {
791
791
  displayName: "LinkButton",
792
792
  description: "链接样式按钮组件,适用于表格操作列",
793
793
  props: {
@@ -824,129 +824,129 @@ Ze.__docgenInfo = {
824
824
  }
825
825
  }
826
826
  };
827
- const { Option: et } = Ee, tt = ({
828
- columns: n,
829
- request: m,
830
- searchFields: c = [],
831
- showSearch: a = !0,
832
- showRefresh: o = !0,
833
- defaultPageSize: h = 10,
834
- pageSizeOptions: q = ["10", "20", "50", "100"],
835
- autoLoad: p = !0,
827
+ const { Option: at } = Ce, ot = ({
828
+ columns: t,
829
+ request: p,
830
+ searchFields: u = [],
831
+ showSearch: s = !0,
832
+ showRefresh: i = !0,
833
+ defaultPageSize: m = 10,
834
+ pageSizeOptions: C = ["10", "20", "50", "100"],
835
+ autoLoad: h = !0,
836
836
  externalParams: e = {},
837
- ...t
837
+ ...r
838
838
  }) => {
839
- const [N, s] = z([]), [k, d] = z(!1), [R, v] = z({
839
+ const [q, n] = z([]), [S, a] = z(!1), [A, T] = z({
840
840
  current: 1,
841
- pageSize: h,
841
+ pageSize: m,
842
842
  total: 0
843
- }), [x, w] = z({}), [A, $] = z({}), [S] = ue.useForm(), C = W(R);
844
- C.current = R;
845
- const O = W(e);
846
- O.current = e;
847
- const I = W(!1), D = Ce(() => n.map((E) => {
848
- const { sortable: _, render: F, ...X } = E;
843
+ }), [g, x] = z({}), [N, v] = z({}), [k] = me.useForm(), $ = K(A);
844
+ $.current = A;
845
+ const L = K(e);
846
+ L.current = e;
847
+ const V = K(!1), P = Re(() => t.map((w) => {
848
+ const { sortable: _, render: W, ...U } = w;
849
849
  return {
850
- ...X,
850
+ ...U,
851
851
  sorter: _ ? !0 : void 0,
852
- render: F || ((ne) => ne)
852
+ render: W || ((se) => se)
853
853
  };
854
- }), [n]), P = B(async (E = {}) => {
855
- if (m) {
856
- d(!0);
854
+ }), [t]), O = F(async (w = {}) => {
855
+ if (p) {
856
+ a(!0);
857
857
  try {
858
858
  const _ = {
859
- page: C.current.current,
860
- pageSize: C.current.pageSize,
861
- sortField: A.field,
862
- sortOrder: A.order,
863
- searchParams: { ...x, ...O.current },
864
- ...E
865
- }, F = await m(_);
866
- F.success && (s(F.data), v((X) => ({
867
- ...X,
868
- total: F.total,
869
- current: _.page || X.current
859
+ page: $.current.current,
860
+ pageSize: $.current.pageSize,
861
+ sortField: N.field,
862
+ sortOrder: N.order,
863
+ searchParams: { ...g, ...L.current },
864
+ ...w
865
+ }, W = await p(_);
866
+ W.success && (n(W.data), T((U) => ({
867
+ ...U,
868
+ total: W.total,
869
+ current: _.page || U.current
870
870
  })));
871
871
  } catch (_) {
872
872
  console.error("加载数据失败:", _);
873
873
  } finally {
874
- d(!1);
874
+ a(!1);
875
875
  }
876
876
  }
877
- }, [m, A, x]), H = B((E) => {
878
- w(E), v((_) => ({ ..._, current: 1 }));
879
- }, []), G = B(() => {
880
- S.resetFields(), w({}), v((E) => ({ ...E, current: 1 }));
881
- }, [S]), K = B(() => {
882
- P();
883
- }, [P]), Q = B((E, _, F) => {
884
- const X = {
885
- current: E.current || 1,
886
- pageSize: E.pageSize || h,
887
- total: E.total || 0
888
- }, ne = {
889
- field: F?.field,
890
- order: F?.order
877
+ }, [p, N, g]), G = F((w) => {
878
+ x(w), T((_) => ({ ..._, current: 1 }));
879
+ }, []), M = F(() => {
880
+ k.resetFields(), x({}), T((w) => ({ ...w, current: 1 }));
881
+ }, [k]), Y = F(() => {
882
+ O();
883
+ }, [O]), te = F((w, _, W) => {
884
+ const U = {
885
+ current: w.current || 1,
886
+ pageSize: w.pageSize || m,
887
+ total: w.total || 0
888
+ }, se = {
889
+ field: W?.field,
890
+ order: W?.order
891
891
  };
892
- v(X), $(ne);
893
- }, [h]);
894
- return J(() => {
895
- const E = Object.keys(e).length > 0;
896
- (p && !I.current || E) && (P(), I.current = !0);
897
- }, [p, e, P]), /* @__PURE__ */ u.jsxs("div", { children: [
898
- a && c.length > 0 && /* @__PURE__ */ u.jsx(he, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ u.jsxs(
899
- ue,
892
+ T(U), v(se);
893
+ }, [m]);
894
+ return Z(() => {
895
+ const w = Object.keys(e).length > 0;
896
+ (h && !V.current || w) && (O(), V.current = !0);
897
+ }, [h, e, O]), /* @__PURE__ */ d.jsxs("div", { children: [
898
+ s && u.length > 0 && /* @__PURE__ */ d.jsx(ve, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ d.jsxs(
899
+ me,
900
900
  {
901
- form: S,
901
+ form: k,
902
902
  layout: "inline",
903
- onFinish: H,
904
- initialValues: c.reduce((E, _) => (_.defaultValue !== void 0 && (E[_.key] = _.defaultValue), E), {}),
903
+ onFinish: G,
904
+ initialValues: u.reduce((w, _) => (_.defaultValue !== void 0 && (w[_.key] = _.defaultValue), w), {}),
905
905
  children: [
906
- c.map((E) => /* @__PURE__ */ u.jsx(ue.Item, { name: E.key, label: E.label, children: E.type === "input" ? /* @__PURE__ */ u.jsx(
907
- ke,
906
+ u.map((w) => /* @__PURE__ */ d.jsx(me.Item, { name: w.key, label: w.label, children: w.type === "input" ? /* @__PURE__ */ d.jsx(
907
+ qe,
908
908
  {
909
- placeholder: E.placeholder || `请输入${E.label}`,
909
+ placeholder: w.placeholder || `请输入${w.label}`,
910
910
  style: { width: 200 }
911
911
  }
912
- ) : /* @__PURE__ */ u.jsx(
913
- Ee,
912
+ ) : /* @__PURE__ */ d.jsx(
913
+ Ce,
914
914
  {
915
- placeholder: E.placeholder || `请选择${E.label}`,
915
+ placeholder: w.placeholder || `请选择${w.label}`,
916
916
  style: { width: 200 },
917
917
  allowClear: !0,
918
- children: E.options?.map((_) => /* @__PURE__ */ u.jsx(et, { value: _.value, children: _.label }, _.value))
918
+ children: w.options?.map((_) => /* @__PURE__ */ d.jsx(at, { value: _.value, children: _.label }, _.value))
919
919
  }
920
- ) }, E.key)),
921
- /* @__PURE__ */ u.jsx(ue.Item, { children: /* @__PURE__ */ u.jsxs(Re, { children: [
922
- /* @__PURE__ */ u.jsx(le, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ u.jsx(Ve, {}), children: "查询" }),
923
- /* @__PURE__ */ u.jsx(le, { onClick: G, children: "重置" }),
924
- o && /* @__PURE__ */ u.jsx(le, { icon: /* @__PURE__ */ u.jsx(Oe, {}), onClick: K, children: "刷新" })
920
+ ) }, w.key)),
921
+ /* @__PURE__ */ d.jsx(me.Item, { children: /* @__PURE__ */ d.jsxs(je, { children: [
922
+ /* @__PURE__ */ d.jsx(de, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ d.jsx(De, {}), children: "查询" }),
923
+ /* @__PURE__ */ d.jsx(de, { onClick: M, children: "重置" }),
924
+ i && /* @__PURE__ */ d.jsx(de, { icon: /* @__PURE__ */ d.jsx(Be, {}), onClick: Y, children: "刷新" })
925
925
  ] }) })
926
926
  ]
927
927
  }
928
928
  ) }),
929
- /* @__PURE__ */ u.jsx(
930
- we,
929
+ /* @__PURE__ */ d.jsx(
930
+ Ne,
931
931
  {
932
- ...t,
933
- columns: D,
934
- dataSource: N,
935
- loading: k,
932
+ ...r,
933
+ columns: P,
934
+ dataSource: q,
935
+ loading: S,
936
936
  pagination: {
937
- ...R,
937
+ ...A,
938
938
  showSizeChanger: !0,
939
939
  showQuickJumper: !0,
940
- showTotal: (E, _) => `第 ${_[0]}-${_[1]} 条/共 ${E} 条`,
941
- pageSizeOptions: q
940
+ showTotal: (w, _) => `第 ${_[0]}-${_[1]} 条/共 ${w} 条`,
941
+ pageSizeOptions: C
942
942
  },
943
- onChange: Q,
943
+ onChange: te,
944
944
  scroll: { x: "max-content", y: "50vh" }
945
945
  }
946
946
  )
947
947
  ] });
948
948
  };
949
- tt.__docgenInfo = {
949
+ ot.__docgenInfo = {
950
950
  displayName: "AdvancedTable",
951
951
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
952
952
  props: {
@@ -1013,519 +1013,563 @@ tt.__docgenInfo = {
1013
1013
  }
1014
1014
  }
1015
1015
  };
1016
- function me(n, m, c) {
1017
- if (!n.current) return;
1018
- const a = /* @__PURE__ */ new Set(), o = {};
1019
- for (const s of m)
1020
- s.exclusionGroup && s.exclusionGroup !== "separator" && (a.add(s.exclusionGroup), o[s.exclusionGroup] || (o[s.exclusionGroup] = []), o[s.exclusionGroup].push({
1021
- type: s.type,
1022
- key: s.key,
1023
- exclusionGroup: s.exclusionGroup
1016
+ function be(t, p, u) {
1017
+ if (!t.current) return;
1018
+ const s = /* @__PURE__ */ new Set(), i = {};
1019
+ for (const n of p)
1020
+ n.exclusionGroup && n.exclusionGroup !== "separator" && (s.add(n.exclusionGroup), i[n.exclusionGroup] || (i[n.exclusionGroup] = []), i[n.exclusionGroup].push({
1021
+ type: n.type,
1022
+ key: n.key,
1023
+ exclusionGroup: n.exclusionGroup
1024
1024
  }));
1025
- const h = {};
1026
- for (const s of a) {
1027
- h[s] = !1;
1028
- for (const k of o[s])
1029
- if (k.type === "upload" && k.key) {
1030
- if (c[k.key] !== null && c[k.key] !== void 0) {
1031
- h[s] = !0;
1025
+ const m = {};
1026
+ for (const n of s) {
1027
+ m[n] = !1;
1028
+ for (const S of i[n])
1029
+ if (S.type === "upload" && S.key) {
1030
+ if (u[S.key] !== null && u[S.key] !== void 0) {
1031
+ m[n] = !0;
1032
1032
  break;
1033
1033
  }
1034
- } else if (k.type === "variable" && k.key) {
1035
- const d = n.current.querySelector(
1036
- `[data-type="variable"][data-key="${k.key}"]`
1034
+ } else if (S.type === "variable" && S.key) {
1035
+ const a = t.current.querySelector(
1036
+ `[data-type="variable"][data-key="${S.key}"]`
1037
1037
  );
1038
- if (d && d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1039
- h[s] = !0;
1038
+ if (a && a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1039
+ m[n] = !0;
1040
1040
  break;
1041
1041
  }
1042
1042
  }
1043
1043
  }
1044
- const q = m.some((s) => s.exclusionGroup === "separator"), e = Object.keys(h).filter(
1045
- (s) => h[s]
1044
+ const C = p.some((n) => n.exclusionGroup === "separator"), e = Object.keys(m).filter(
1045
+ (n) => m[n]
1046
1046
  ).length > 0;
1047
- let t = null;
1048
- if (e && q) {
1049
- for (const s of m)
1050
- if (s.exclusionGroup && s.exclusionGroup !== "separator" && h[s.exclusionGroup]) {
1051
- t = s.exclusionGroup;
1047
+ let r = null;
1048
+ if (e && C) {
1049
+ for (const n of p)
1050
+ if (n.exclusionGroup && n.exclusionGroup !== "separator" && m[n.exclusionGroup]) {
1051
+ r = n.exclusionGroup;
1052
1052
  break;
1053
1053
  }
1054
1054
  }
1055
- for (const s of a) {
1056
- const k = n.current.querySelectorAll(
1057
- `[data-group="${s}"]`
1055
+ for (const n of s) {
1056
+ const S = t.current.querySelectorAll(
1057
+ `[data-group="${n}"]`
1058
1058
  );
1059
- q && e && t ? s === t ? k.forEach((d) => {
1060
- d.classList.contains("required-upload-group") ? d.style.setProperty("display", "inline-flex", "important") : (d.classList.contains("exclusion-wrapper"), d.style.setProperty("display", "inline-block", "important"));
1061
- }) : k.forEach((d) => {
1062
- d.style.display = "none", d.style.setProperty("display", "none", "important");
1063
- }) : k.forEach((d) => {
1064
- d.classList.contains("required-upload-group") ? d.style.setProperty("display", "inline-flex", "important") : (d.classList.contains("exclusion-wrapper"), d.style.setProperty("display", "inline-block", "important"));
1059
+ C && e && r ? n === r ? S.forEach((a) => {
1060
+ a.classList.contains("required-upload-group") ? a.style.setProperty("display", "inline-flex", "important") : (a.classList.contains("exclusion-wrapper"), a.style.setProperty("display", "inline-block", "important"));
1061
+ }) : S.forEach((a) => {
1062
+ a.style.display = "none", a.style.setProperty("display", "none", "important");
1063
+ }) : S.forEach((a) => {
1064
+ a.classList.contains("required-upload-group") ? a.style.setProperty("display", "inline-flex", "important") : (a.classList.contains("exclusion-wrapper"), a.style.setProperty("display", "inline-block", "important"));
1065
1065
  });
1066
1066
  }
1067
- n.current.querySelectorAll(
1067
+ t.current.querySelectorAll(
1068
1068
  '[data-group="separator"]'
1069
- ).forEach((s) => {
1070
- s.style.display = e ? "none" : "inline";
1069
+ ).forEach((n) => {
1070
+ n.style.display = e ? "none" : "inline";
1071
1071
  });
1072
1072
  }
1073
- function ye(n, m, c, a) {
1074
- if (!n.current) {
1075
- a(!1);
1073
+ function xe(t, p, u, s) {
1074
+ if (!t.current) {
1075
+ s(!1);
1076
1076
  return;
1077
1077
  }
1078
- const o = [];
1079
- for (let e = 0; e < m.length; e++) {
1080
- const t = m[e];
1081
- if ((t.type === "variable" || t.type === "upload" || t.type === "multi-variable") && t.required && t.key) {
1082
- o.push({
1083
- exclusionGroup: t.exclusionGroup || "",
1084
- key: t.key,
1085
- type: t.type === "multi-variable" ? "variable" : t.type,
1086
- isMultiVariable: t.type === "multi-variable"
1078
+ const i = [];
1079
+ for (let e = 0; e < p.length; e++) {
1080
+ const r = p[e];
1081
+ if ((r.type === "variable" || r.type === "upload" || r.type === "multi-variable") && r.required && r.key) {
1082
+ i.push({
1083
+ exclusionGroup: r.exclusionGroup || "",
1084
+ key: r.key,
1085
+ type: r.type === "multi-variable" ? "variable" : r.type,
1086
+ isMultiVariable: r.type === "multi-variable"
1087
1087
  });
1088
1088
  continue;
1089
1089
  }
1090
- if (t.type === "text" && t.className?.includes("rte-text-required") && t.exclusionGroup)
1091
- for (let N = e + 1; N < m.length; N++) {
1092
- const s = m[N];
1093
- if (s.exclusionGroup === t.exclusionGroup && (s.type === "variable" || s.type === "upload") && s.key) {
1094
- o.push({
1095
- exclusionGroup: t.exclusionGroup,
1096
- key: s.key,
1097
- type: s.type
1090
+ if (r.type === "text" && r.className?.includes("rte-text-required") && r.exclusionGroup)
1091
+ for (let q = e + 1; q < p.length; q++) {
1092
+ const n = p[q];
1093
+ if (n.exclusionGroup === r.exclusionGroup && (n.type === "variable" || n.type === "upload") && n.key) {
1094
+ i.push({
1095
+ exclusionGroup: r.exclusionGroup,
1096
+ key: n.key,
1097
+ type: n.type
1098
1098
  });
1099
1099
  break;
1100
1100
  }
1101
1101
  }
1102
1102
  }
1103
- const h = m.some((e) => e.exclusionGroup === "separator");
1104
- let q = !1;
1105
- if (h && o.length > 1) {
1106
- const e = m.findIndex((s) => s.exclusionGroup === "separator"), t = o.filter((s) => m.findIndex(
1107
- (d) => (d.type === "variable" || d.type === "upload") && d.key === s.key && d.exclusionGroup === s.exclusionGroup
1108
- ) < e), N = o.filter((s) => m.findIndex(
1109
- (d) => (d.type === "variable" || d.type === "upload") && d.key === s.key && d.exclusionGroup === s.exclusionGroup
1103
+ const m = p.some((e) => e.exclusionGroup === "separator");
1104
+ let C = !1;
1105
+ if (m && i.length > 1) {
1106
+ const e = p.findIndex((n) => n.exclusionGroup === "separator"), r = i.filter((n) => p.findIndex(
1107
+ (a) => (a.type === "variable" || a.type === "upload") && a.key === n.key && a.exclusionGroup === n.exclusionGroup
1108
+ ) < e), q = i.filter((n) => p.findIndex(
1109
+ (a) => (a.type === "variable" || a.type === "upload") && a.key === n.key && a.exclusionGroup === n.exclusionGroup
1110
1110
  ) > e);
1111
- q = t.length > 0 && N.length > 0;
1111
+ C = r.length > 0 && q.length > 0;
1112
1112
  }
1113
- if (o.length === 0) {
1114
- a(!0);
1113
+ if (i.length === 0) {
1114
+ s(!0);
1115
1115
  return;
1116
1116
  }
1117
- const p = o.filter((e) => {
1118
- if (!n.current) return !1;
1119
- const t = n.current.querySelectorAll(
1117
+ const h = i.filter((e) => {
1118
+ if (!t.current) return !1;
1119
+ const r = t.current.querySelectorAll(
1120
1120
  `[data-group="${e.exclusionGroup}"]`
1121
1121
  );
1122
- return t.length === 0 ? !1 : t[0].style.display !== "none";
1122
+ return r.length === 0 ? !1 : r[0].style.display !== "none";
1123
1123
  });
1124
- if (p.length === 0) {
1125
- a(!0);
1124
+ if (h.length === 0) {
1125
+ s(!0);
1126
1126
  return;
1127
1127
  }
1128
- if (q) {
1128
+ if (C) {
1129
1129
  let e = !1;
1130
- for (const t of p)
1131
- if (t.type === "upload" && t.key) {
1132
- if (c[t.key] !== null && c[t.key] !== void 0) {
1130
+ for (const r of h)
1131
+ if (r.type === "upload" && r.key) {
1132
+ if (u[r.key] !== null && u[r.key] !== void 0) {
1133
1133
  e = !0;
1134
1134
  break;
1135
1135
  }
1136
- } else if (t.type === "variable" && t.key)
1137
- if (t.isMultiVariable) {
1138
- const N = n.current.querySelectorAll(
1139
- `[data-type="variable"][data-multi-key="${t.key}"]`
1136
+ } else if (r.type === "variable" && r.key)
1137
+ if (r.isMultiVariable) {
1138
+ const q = t.current.querySelectorAll(
1139
+ `[data-type="variable"][data-multi-key="${r.key}"]`
1140
1140
  );
1141
- let s = !1;
1142
- for (const k of Array.from(N))
1143
- if (k.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1144
- s = !0;
1141
+ let n = !1;
1142
+ for (const S of Array.from(q))
1143
+ if (S.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1144
+ n = !0;
1145
1145
  break;
1146
1146
  }
1147
- if (s) {
1147
+ if (n) {
1148
1148
  e = !0;
1149
1149
  break;
1150
1150
  }
1151
1151
  } else {
1152
- const N = n.current.querySelector(
1153
- `[data-type="variable"][data-key="${t.key}"]`
1152
+ const q = t.current.querySelector(
1153
+ `[data-type="variable"][data-key="${r.key}"]`
1154
1154
  );
1155
- if (N && N.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1155
+ if (q && q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1156
1156
  e = !0;
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
- a(e);
1160
+ s(e);
1161
1161
  } else {
1162
1162
  let e = !0;
1163
- for (const t of p)
1164
- if (t.type === "upload" && t.key) {
1165
- if (c[t.key] === null || c[t.key] === void 0) {
1163
+ for (const r of h)
1164
+ if (r.type === "upload" && r.key) {
1165
+ if (u[r.key] === null || u[r.key] === void 0) {
1166
1166
  e = !1;
1167
1167
  break;
1168
1168
  }
1169
- } else if (t.type === "variable" && t.key)
1170
- if (t.isMultiVariable) {
1171
- const N = n.current.querySelectorAll(
1172
- `[data-type="variable"][data-multi-key="${t.key}"]`
1169
+ } else if (r.type === "variable" && r.key)
1170
+ if (r.isMultiVariable) {
1171
+ const q = t.current.querySelectorAll(
1172
+ `[data-type="variable"][data-multi-key="${r.key}"]`
1173
1173
  );
1174
- let s = !1;
1175
- for (const k of Array.from(N))
1176
- if (k.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1177
- s = !0;
1174
+ let n = !1;
1175
+ for (const S of Array.from(q))
1176
+ if (S.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1177
+ n = !0;
1178
1178
  break;
1179
1179
  }
1180
- if (!s) {
1180
+ if (!n) {
1181
1181
  e = !1;
1182
1182
  break;
1183
1183
  }
1184
1184
  } else {
1185
- const N = n.current.querySelector(
1186
- `[data-type="variable"][data-key="${t.key}"]`
1185
+ const q = t.current.querySelector(
1186
+ `[data-type="variable"][data-key="${r.key}"]`
1187
1187
  );
1188
- if (!N) {
1188
+ if (!q) {
1189
1189
  e = !1;
1190
1190
  break;
1191
1191
  }
1192
- if (N.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1192
+ if (q.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1193
1193
  e = !1;
1194
1194
  break;
1195
1195
  }
1196
1196
  }
1197
- a(e);
1197
+ s(e);
1198
1198
  }
1199
1199
  }
1200
- function fe(n, m) {
1201
- if (!n.current) return;
1202
- n.current.querySelectorAll('[data-type="variable"]').forEach((a) => {
1203
- const o = a.innerText.replace(/\n/g, "");
1204
- o.replace(/\u200B/g, "") ? a.classList.remove("show-placeholder") : (o !== "​" && (a.innerText = "​"), a.classList.add("show-placeholder"));
1200
+ function ge(t, p) {
1201
+ if (!t.current) return;
1202
+ t.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
1203
+ const i = s.innerText.replace(/\n/g, "");
1204
+ i.replace(/\u200B/g, "") ? s.classList.remove("show-placeholder") : (i !== "​" && (s.innerText = "​"), s.classList.add("show-placeholder"));
1205
1205
  });
1206
1206
  }
1207
- function nt(n, m, c, a, o, h = {}) {
1208
- if (!n.current) return;
1209
- let q = "", p = 0;
1210
- for (; p < m.length; ) {
1211
- const e = m[p], t = p + 1 < m.length ? m[p + 1] : null;
1212
- if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && t) {
1213
- const v = t.type === "upload" && t.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === t.exclusionGroup, x = t.type === "variable" && t.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === t.exclusionGroup;
1214
- if (v) {
1215
- const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, $ = "</span>";
1216
- let S = "";
1217
- e.className ? S = `<span class="${e.className}">${e.text ?? ""}</span>` : S = e.text ?? "";
1218
- const C = t, O = c[C.key] !== null && c[C.key] !== void 0, I = O ? c[C.key]?.name : C.text, D = O ? "" : "hidden", P = C.tooltip && !O ? "" : "hidden", H = O ? "has-file" : "", G = O && I ? ` data-file-name="${I.replace(/"/g, "&quot;")}"` : "", K = `<span contenteditable="false" data-type="upload" data-key="${C.key}" class="upload-chip"><span class="upload-inner-wrapper ${H}"><span class="upload-icon">${O ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${G}>${I || C.text}</span>${C.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${C.key}" data-tooltip="${C.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${D}" title="移除文件">×</span></span></span>`;
1219
- q += A + S + K + $, p += 2;
1207
+ function st(t, p, u, s, i, m = {}) {
1208
+ if (!t.current) return;
1209
+ let C = "", h = 0;
1210
+ for (; h < p.length; ) {
1211
+ const e = p[h], r = h + 1 < p.length ? p[h + 1] : null;
1212
+ if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && r) {
1213
+ const T = r.type === "upload" && r.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === r.exclusionGroup, g = r.type === "variable" && r.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === r.exclusionGroup;
1214
+ if (T) {
1215
+ const N = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1216
+ let k = "";
1217
+ e.className ? k = `<span class="${e.className}">${e.text ?? ""}</span>` : k = e.text ?? "";
1218
+ const $ = r, L = u[$.key] !== null && u[$.key] !== void 0, V = L ? u[$.key]?.name : $.text, P = L ? "" : "hidden", O = $.tooltip && !L ? "" : "hidden", G = L ? "has-file" : "", M = L && V ? ` data-file-name="${V.replace(/"/g, "&quot;")}"` : "", Y = `<span contenteditable="false" data-type="upload" data-key="${$.key}" class="upload-chip"><span class="upload-inner-wrapper ${G}"><span class="upload-icon">${L ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${M}>${V || $.text}</span>${$.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${O}" data-upload-key="${$.key}" data-tooltip="${$.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
1219
+ C += N + k + Y + v, h += 2;
1220
1220
  continue;
1221
1221
  }
1222
- if (x) {
1223
- const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, $ = "</span>";
1224
- let S = "";
1225
- e.className ? S = `<span class="${e.className}">${e.text ?? ""}</span>` : S = e.text ?? "";
1226
- const C = t, I = (C.key ? o[C.key] : void 0) || C.text || "", D = !I, P = D ? "​" : I, H = D ? "show-placeholder" : "", G = C.exclusionGroup ? ` data-group="${C.exclusionGroup}"` : "", K = C.tooltip ? ` data-tooltip="${C.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${C.key || ""}"` : "", Q = C.tooltip && D ? "" : "hidden", E = `<span contenteditable="true" data-type="variable" data-key="${C.key}" data-placeholder="${C.placeholder || ""}"${G}${K} class="variable-chip ${H}">${P}${C.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${Q}" data-variable-key="${C.key}" data-tooltip="${C.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1227
- q += A + S + E + $, p += 2;
1222
+ if (g) {
1223
+ const N = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1224
+ let k = "";
1225
+ e.className ? k = `<span class="${e.className}">${e.text ?? ""}</span>` : k = e.text ?? "";
1226
+ const $ = r, V = ($.key ? i[$.key] : void 0) || $.text || "", P = !V, O = P ? "​" : V, G = P ? "show-placeholder" : "", M = $.exclusionGroup ? ` data-group="${$.exclusionGroup}"` : "", Y = $.tooltip ? ` data-tooltip="${$.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${$.key || ""}"` : "", te = $.tooltip && P ? "" : "hidden", w = `<span contenteditable="true" data-type="variable" data-key="${$.key}" data-placeholder="${$.placeholder || ""}"${M}${Y} class="variable-chip ${G}">${O}${$.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${te}" data-variable-key="${$.key}" data-tooltip="${$.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1227
+ C += N + k + w + v, h += 2;
1228
1228
  continue;
1229
1229
  }
1230
1230
  }
1231
- const s = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", k = e.exclusionGroup ? `<span ${s} class="exclusion-wrapper">` : "", d = e.exclusionGroup ? "</span>" : "";
1232
- let R = "";
1231
+ const n = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", S = e.exclusionGroup ? `<span ${n} class="exclusion-wrapper">` : "", a = e.exclusionGroup ? "</span>" : "";
1232
+ let A = "";
1233
1233
  if (e.type === "tag") {
1234
- const v = a ? "" : '<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>', x = a ? ' data-locked="true"' : "", w = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1235
- R = `<span contenteditable="false" class="tag-node group"${x}${w}><span class="tag-label">${e.text}</span>${v}</span>`;
1234
+ const T = s ? "" : '<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>', g = s ? ' data-locked="true"' : "", x = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1235
+ A = `<span contenteditable="false" class="tag-node group"${g}${x}><span class="tag-label">${e.text}</span>${T}</span>`;
1236
1236
  } else if (e.type === "text") {
1237
- const v = a ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
1238
- e.className ? R = `<span class="${e.className}"${v}>${e.text ?? ""}</span>` : R = a ? `<span${v}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
1237
+ const T = s ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
1238
+ e.className ? A = `<span class="${e.className}"${T}>${e.text ?? ""}</span>` : A = s ? `<span${T}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
1239
1239
  } else if (e.type === "variable" && e.key) {
1240
- const x = o[e.key] || e.text || "", w = !x, A = w ? "​" : x, $ = w ? "show-placeholder" : "", S = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", C = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", O = e.tooltip && w ? "" : "hidden", I = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${S}${C} class="variable-chip ${$}">${A}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${O}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1241
- e.required ? R = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${I}</span>` : R = I;
1240
+ const g = i[e.key] || e.text || "", x = !g, N = x ? "​" : g, v = x ? "show-placeholder" : "", k = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", $ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", L = e.tooltip && x ? "" : "hidden", V = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${k}${$} class="variable-chip ${v}">${N}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${L}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1241
+ e.required ? A = `<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>` : A = V;
1242
1242
  } else if (e.type === "upload" && e.key) {
1243
- const v = c[e.key] !== null && c[e.key] !== void 0, x = v ? c[e.key]?.name : e.text, w = v ? "" : "hidden", A = e.tooltip && !v ? "" : "hidden", $ = v ? "has-file" : "", S = v && x ? ` data-file-name="${x.replace(/"/g, "&quot;")}"` : "", C = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${$}"><span class="upload-icon">${v ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${S}>${x || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${A}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${w}" title="移除文件">×</span></span></span>`;
1244
- e.required ? R = `<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>${C}</span>` : R = C;
1243
+ const T = u[e.key] !== null && u[e.key] !== void 0, g = T ? u[e.key]?.name : e.text, x = T ? "" : "hidden", N = e.tooltip && !T ? "" : "hidden", v = T ? "has-file" : "", k = T && g ? ` data-file-name="${g.replace(/"/g, "&quot;")}"` : "", $ = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${v}"><span class="upload-icon">${T ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${k}>${g || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${N}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${x}" title="移除文件">×</span></span></span>`;
1244
+ e.required ? A = `<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>${$}</span>` : A = $;
1245
1245
  } else if (e.type === "multi-variable" && e.key) {
1246
- const v = e.maxCount || 9, x = h[e.key] || 1, w = Math.min(x, v);
1247
- let A = "";
1248
- for (let $ = 0; $ < w; $++) {
1249
- const S = `${e.key}_${$}`, C = o[S] || "", O = !C, I = O ? "​" : C, D = O ? "show-placeholder" : "", P = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", H = e.tooltip && O ? "" : "hidden", G = `<span contenteditable="true" data-type="variable" data-key="${S}" data-multi-key="${e.key}" data-index="${$}" data-placeholder="${e.placeholder || ""}"${P} class="variable-chip ${D}">${I}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${H}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1250
- A += G;
1246
+ const T = e.maxCount || 9, g = m[e.key] || 1, x = Math.min(g, T);
1247
+ let N = "";
1248
+ for (let v = 0; v < x; v++) {
1249
+ const k = `${e.key}_${v}`, $ = i[k] || "", L = !$, V = L ? "​" : $, P = L ? "show-placeholder" : "", O = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", G = e.tooltip && L ? "" : "hidden", M = `<span contenteditable="true" data-type="variable" data-key="${k}" data-multi-key="${e.key}" data-index="${v}" data-placeholder="${e.placeholder || ""}"${O} class="variable-chip ${P}">${V}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${G}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1250
+ N += M;
1251
1251
  }
1252
- e.required ? R = `<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>${A}</span>` : R = A;
1252
+ e.required ? A = `<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>${N}</span>` : A = N;
1253
1253
  }
1254
- q += k + R + d, p++;
1254
+ C += S + A + a, h++;
1255
1255
  }
1256
- n.current && (n.current.innerHTML = q, setTimeout(() => {
1257
- if (!n.current) return;
1258
- n.current.querySelectorAll('[data-type="variable"]').forEach((t) => {
1259
- const N = t.innerText.replace(/\n/g, "");
1260
- N.replace(/\u200B/g, "") ? t.classList.remove("show-placeholder") : (N !== "​" && (t.innerText = "​"), t.classList.add("show-placeholder"));
1256
+ t.current && (t.current.innerHTML = C, setTimeout(() => {
1257
+ if (!t.current) return;
1258
+ t.current.querySelectorAll('[data-type="variable"]').forEach((r) => {
1259
+ const q = r.innerText.replace(/\n/g, "");
1260
+ q.replace(/\u200B/g, "") ? r.classList.remove("show-placeholder") : (q !== "​" && (r.innerText = "​"), r.classList.add("show-placeholder"));
1261
1261
  });
1262
1262
  }, 0));
1263
1263
  }
1264
- function rt(n, m, c, a, o = {}, h, q) {
1265
- const p = B(() => {
1266
- if (!n.current) return;
1264
+ function lt(t, p, u, s, i = {}, m, C) {
1265
+ const h = F(() => {
1266
+ if (!t.current) return;
1267
+ if (p.length === 0) {
1268
+ t.current.innerHTML = "";
1269
+ return;
1270
+ }
1267
1271
  let e = {};
1268
- const t = n.current, N = t.__tempVariableValues;
1269
- if (N ? (e = N, delete t.__tempVariableValues) : n.current.querySelectorAll(
1272
+ const r = t.current, q = r.__tempVariableValues;
1273
+ if (q ? (e = q, delete r.__tempVariableValues) : t.current.querySelectorAll(
1270
1274
  '[data-type="variable"]'
1271
- ).forEach((k) => {
1272
- const d = k.dataset.key;
1273
- if (d) {
1274
- const R = k.innerText.replace(/[\u200B\n]/g, "").trim();
1275
- R && (e[d] = R);
1275
+ ).forEach((S) => {
1276
+ const a = S.dataset.key;
1277
+ if (a) {
1278
+ const A = S.innerText.replace(/[\u200B\n]/g, "").trim();
1279
+ A && (e[a] = A);
1276
1280
  }
1277
- }), nt(n, m, c, a, e, o), h?.current) {
1278
- const { key: s, offset: k } = h.current;
1281
+ }), st(t, p, u, s, e, i), m?.current) {
1282
+ const { key: n, offset: S } = m.current;
1279
1283
  setTimeout(() => {
1280
- if (!n.current) return;
1281
- const d = n.current.querySelector(
1282
- `[data-type="variable"][data-key="${s}"]`
1284
+ if (!t.current) return;
1285
+ const a = t.current.querySelector(
1286
+ `[data-type="variable"][data-key="${n}"]`
1283
1287
  );
1284
- if (d) {
1288
+ if (a) {
1285
1289
  try {
1286
- const R = document.createRange(), v = document.createTreeWalker(
1287
- d,
1290
+ const A = document.createRange(), T = document.createTreeWalker(
1291
+ a,
1288
1292
  NodeFilter.SHOW_TEXT,
1289
1293
  null
1290
1294
  );
1291
- let x = 0, w = null, A = 0;
1292
- for (; v.nextNode(); ) {
1293
- const $ = v.currentNode, S = $.textContent?.length || 0;
1294
- if (x + S >= k) {
1295
- w = $, A = k - x;
1295
+ let g = 0, x = null, N = 0;
1296
+ for (; T.nextNode(); ) {
1297
+ const v = T.currentNode, k = v.textContent?.length || 0;
1298
+ if (g + k >= S) {
1299
+ x = v, N = S - g;
1296
1300
  break;
1297
1301
  }
1298
- x += S;
1302
+ g += k;
1299
1303
  }
1300
- if (w) {
1301
- R.setStart(w, Math.min(A, w.textContent?.length || 0)), R.collapse(!0);
1302
- const $ = window.getSelection();
1303
- $ && ($.removeAllRanges(), $.addRange(R), d.focus());
1304
+ if (x) {
1305
+ A.setStart(x, Math.min(N, x.textContent?.length || 0)), A.collapse(!0);
1306
+ const v = window.getSelection();
1307
+ v && (v.removeAllRanges(), v.addRange(A), a.focus());
1304
1308
  } else {
1305
- R.selectNodeContents(d), R.collapse(!1);
1306
- const $ = window.getSelection();
1307
- $ && ($.removeAllRanges(), $.addRange(R), d.focus());
1309
+ A.selectNodeContents(a), A.collapse(!1);
1310
+ const v = window.getSelection();
1311
+ v && (v.removeAllRanges(), v.addRange(A), a.focus());
1308
1312
  }
1309
1313
  } catch {
1310
- const R = document.createRange();
1311
- R.selectNodeContents(d), R.collapse(!1);
1312
- const v = window.getSelection();
1313
- v && (v.removeAllRanges(), v.addRange(R), d.focus());
1314
+ const A = document.createRange();
1315
+ A.selectNodeContents(a), A.collapse(!1);
1316
+ const T = window.getSelection();
1317
+ T && (T.removeAllRanges(), T.addRange(A), a.focus());
1314
1318
  }
1315
- h.current = null;
1319
+ m.current = null;
1316
1320
  }
1317
1321
  }, 0);
1318
1322
  }
1319
- }, [m, c, a, n, o, h, q]);
1320
- J(() => {
1321
- p();
1322
- }, [p]);
1323
+ }, [p, u, s, t, i, m, C]);
1324
+ Z(() => {
1325
+ h();
1326
+ }, [h]);
1323
1327
  }
1324
- function at(n, m, c, a) {
1325
- J(() => {
1326
- const o = n.current;
1327
- if (!o) return;
1328
- const h = (p) => {
1329
- const e = p.target?.closest(".upload-info-icon");
1328
+ function it(t, p, u, s) {
1329
+ Z(() => {
1330
+ const i = t.current;
1331
+ if (!i) return;
1332
+ const m = (h) => {
1333
+ const e = h.target?.closest(".upload-info-icon");
1330
1334
  if (e && e.classList.contains("upload-info-icon")) {
1331
- const t = e.dataset.uploadKey;
1332
- t && a({ key: t, anchorEl: e, type: "upload" });
1335
+ const r = e.dataset.uploadKey;
1336
+ r && s({ key: r, anchorEl: e, type: "upload" });
1333
1337
  }
1334
- }, q = (p) => {
1335
- const e = p.target?.closest(".upload-info-icon"), t = p.relatedTarget;
1336
- e && e.classList.contains("upload-info-icon") && (!t || !o.contains(t) ? a(null) : t.closest(".upload-info-icon") || a(null));
1338
+ }, C = (h) => {
1339
+ const e = h.target?.closest(".upload-info-icon"), r = h.relatedTarget;
1340
+ e && e.classList.contains("upload-info-icon") && (!r || !i.contains(r) ? s(null) : r.closest(".upload-info-icon") || s(null));
1337
1341
  };
1338
- return o.addEventListener("mouseover", h, !0), o.addEventListener("mouseout", q, !0), () => {
1339
- o.removeEventListener("mouseover", h, !0), o.removeEventListener("mouseout", q, !0);
1342
+ return i.addEventListener("mouseover", m, !0), i.addEventListener("mouseout", C, !0), () => {
1343
+ i.removeEventListener("mouseover", m, !0), i.removeEventListener("mouseout", C, !0);
1340
1344
  };
1341
- }, [m, c, n, a]);
1345
+ }, [p, u, t, s]);
1342
1346
  }
1343
- function ot(n, m, c) {
1344
- J(() => {
1345
- if (!n.current) return;
1346
- const a = (p) => {
1347
- const e = p.currentTarget, t = e.dataset.tooltip, N = e.dataset.tagKey || "";
1348
- t && c({ key: N, anchorEl: e, type: "tag" });
1349
- }, o = () => {
1350
- c(null);
1347
+ function ct(t, p, u) {
1348
+ Z(() => {
1349
+ if (!t.current) return;
1350
+ const s = (h) => {
1351
+ const e = h.currentTarget, r = e.dataset.tooltip, q = e.dataset.tagKey || "";
1352
+ r && u({ key: q, anchorEl: e, type: "tag" });
1353
+ }, i = () => {
1354
+ u(null);
1351
1355
  };
1352
- let h;
1353
- const q = () => {
1354
- if (!n.current) return;
1355
- n.current.querySelectorAll(
1356
+ let m;
1357
+ const C = () => {
1358
+ if (!t.current) return;
1359
+ t.current.querySelectorAll(
1356
1360
  ".tag-node[data-tooltip]"
1357
1361
  ).forEach((e) => {
1358
- e.addEventListener("mouseenter", a), e.addEventListener("mouseleave", o);
1362
+ e.addEventListener("mouseenter", s), e.addEventListener("mouseleave", i);
1359
1363
  });
1360
1364
  };
1361
- return h = requestAnimationFrame(() => {
1362
- h = requestAnimationFrame(q);
1365
+ return m = requestAnimationFrame(() => {
1366
+ m = requestAnimationFrame(C);
1363
1367
  }), () => {
1364
- cancelAnimationFrame(h), n.current && n.current.querySelectorAll(
1368
+ cancelAnimationFrame(m), t.current && t.current.querySelectorAll(
1365
1369
  ".tag-node[data-tooltip]"
1366
1370
  ).forEach((e) => {
1367
- e.removeEventListener("mouseenter", a), e.removeEventListener("mouseleave", o);
1371
+ e.removeEventListener("mouseenter", s), e.removeEventListener("mouseleave", i);
1368
1372
  });
1369
1373
  };
1370
- }, [m, n, c]);
1374
+ }, [p, t, u]);
1371
1375
  }
1372
- function st(n, m, c) {
1373
- J(() => {
1374
- const a = n.current;
1375
- if (!a) return;
1376
- const o = (q) => {
1377
- const p = q.target?.closest(".variable-info-icon");
1378
- if (p && p.classList.contains("variable-info-icon")) {
1379
- const e = p.dataset.variableKey;
1380
- e && c({ key: e, anchorEl: p, type: "variable" });
1376
+ function ut(t, p, u) {
1377
+ Z(() => {
1378
+ const s = t.current;
1379
+ if (!s) return;
1380
+ const i = (C) => {
1381
+ const h = C.target?.closest(".variable-info-icon");
1382
+ if (h && h.classList.contains("variable-info-icon")) {
1383
+ const e = h.dataset.variableKey;
1384
+ e && u({ key: e, anchorEl: h, type: "variable" });
1381
1385
  }
1382
- }, h = (q) => {
1383
- const p = q.target?.closest(".variable-info-icon"), e = q.relatedTarget;
1384
- p && p.classList.contains("variable-info-icon") && (!e || !a.contains(e) ? c(null) : e.closest(".variable-info-icon") || c(null));
1386
+ }, m = (C) => {
1387
+ const h = C.target?.closest(".variable-info-icon"), e = C.relatedTarget;
1388
+ h && h.classList.contains("variable-info-icon") && (!e || !s.contains(e) ? u(null) : e.closest(".variable-info-icon") || u(null));
1385
1389
  };
1386
- return a.addEventListener("mouseover", o, !0), a.addEventListener("mouseout", h, !0), () => {
1387
- a.removeEventListener("mouseover", o, !0), a.removeEventListener("mouseout", h, !0);
1390
+ return s.addEventListener("mouseover", i, !0), s.addEventListener("mouseout", m, !0), () => {
1391
+ s.removeEventListener("mouseover", i, !0), s.removeEventListener("mouseout", m, !0);
1388
1392
  };
1389
- }, [m, n, c]);
1393
+ }, [p, t, u]);
1390
1394
  }
1391
- function lt(n, m, c, a) {
1392
- J(() => {
1393
- if (!n.current) return;
1394
- const o = (e) => {
1395
- const t = e.currentTarget;
1396
- t.dataset.fileName && a({ key: "", anchorEl: t, type: "upload-label" });
1397
- }, h = () => {
1398
- a(null);
1395
+ function dt(t, p, u, s) {
1396
+ Z(() => {
1397
+ if (!t.current) return;
1398
+ const i = (e) => {
1399
+ const r = e.currentTarget;
1400
+ r.dataset.fileName && s({ key: "", anchorEl: r, type: "upload-label" });
1401
+ }, m = () => {
1402
+ s(null);
1399
1403
  };
1400
- let q;
1401
- const p = () => {
1402
- if (!n.current) return;
1403
- n.current.querySelectorAll(
1404
+ let C;
1405
+ const h = () => {
1406
+ if (!t.current) return;
1407
+ t.current.querySelectorAll(
1404
1408
  ".upload-label[data-file-name]"
1405
- ).forEach((t) => {
1406
- t.addEventListener("mouseenter", o), t.addEventListener("mouseleave", h);
1409
+ ).forEach((r) => {
1410
+ r.addEventListener("mouseenter", i), r.addEventListener("mouseleave", m);
1407
1411
  });
1408
1412
  };
1409
- return q = requestAnimationFrame(() => {
1410
- q = requestAnimationFrame(p);
1413
+ return C = requestAnimationFrame(() => {
1414
+ C = requestAnimationFrame(h);
1411
1415
  }), () => {
1412
- cancelAnimationFrame(q), n.current && n.current.querySelectorAll(
1416
+ cancelAnimationFrame(C), t.current && t.current.querySelectorAll(
1413
1417
  ".upload-label[data-file-name]"
1414
- ).forEach((t) => {
1415
- t.removeEventListener("mouseenter", o), t.removeEventListener("mouseleave", h);
1418
+ ).forEach((r) => {
1419
+ r.removeEventListener("mouseenter", i), r.removeEventListener("mouseleave", m);
1416
1420
  });
1417
1421
  };
1418
- }, [m, c, n, a]);
1422
+ }, [p, u, t, s]);
1419
1423
  }
1420
- function it(n, m, c, a) {
1421
- J(() => {
1422
- me(n, m, c), ye(n, m, c, a);
1423
- }, [c, m, n, a]);
1424
+ function pt(t, p, u, s) {
1425
+ Z(() => {
1426
+ be(t, p, u), xe(t, p, u, s);
1427
+ }, [u, p, t, s]);
1424
1428
  }
1425
- function ct(n, m) {
1426
- J(() => {
1427
- if (!n.current) return;
1428
- let c = !1, a = 0;
1429
- const o = () => {
1430
- c = !0;
1431
- }, h = () => {
1432
- c = !1, a = Date.now();
1429
+ function ft(t, p) {
1430
+ Z(() => {
1431
+ if (!t.current) return;
1432
+ let u = !1, s = 0;
1433
+ const i = () => {
1434
+ u = !0;
1435
+ }, m = () => {
1436
+ u = !1, s = Date.now();
1437
+ };
1438
+ let C = !1, h = 0;
1439
+ const e = () => {
1440
+ C = !0;
1441
+ }, r = () => {
1442
+ C = !1, h = Date.now();
1433
1443
  }, q = () => {
1434
- if (!n.current) return;
1435
- const p = window.getSelection();
1436
- if (!p || p.rangeCount === 0 || m.current || c)
1444
+ h = Date.now();
1445
+ }, n = () => {
1446
+ if (!t.current) return;
1447
+ const a = window.getSelection();
1448
+ if (!a || a.rangeCount === 0 || p.current || u || C || Date.now() - h < 500)
1437
1449
  return;
1438
- const e = p.getRangeAt(0);
1439
- if (!e.collapsed) {
1440
- n.current.contains(e.commonAncestorContainer) || p.removeAllRanges();
1450
+ const A = a.getRangeAt(0);
1451
+ if (!A.collapsed) {
1452
+ t.current.contains(A.commonAncestorContainer) || a.removeAllRanges();
1441
1453
  return;
1442
1454
  }
1443
- const t = p.anchorNode;
1444
- if (!t) return;
1445
- if (!n.current.contains(t)) {
1446
- p.removeAllRanges();
1455
+ const T = a.anchorNode;
1456
+ if (!T) return;
1457
+ if (!t.current.contains(T)) {
1458
+ a.removeAllRanges();
1447
1459
  return;
1448
1460
  }
1449
- let N = null;
1450
- if (t.nodeType === Node.ELEMENT_NODE ? N = t.closest('[data-type="variable"]') : t.nodeType === Node.TEXT_NODE && t.parentElement && (N = t.parentElement.closest('[data-type="variable"]')), !N) {
1451
- if (Date.now() - a > 500)
1461
+ let g = null;
1462
+ if (T.nodeType === Node.ELEMENT_NODE ? g = T.closest('[data-type="variable"]') : T.nodeType === Node.TEXT_NODE && T.parentElement && (g = T.parentElement.closest('[data-type="variable"]')), !g) {
1463
+ if (Date.now() - s > 500)
1452
1464
  return;
1453
- const s = n.current.querySelectorAll('[data-type="variable"]');
1454
- if (s.length > 0) {
1455
- let k = null;
1456
- for (const d of Array.from(s))
1457
- if (d.style.display !== "none") {
1458
- k = d;
1465
+ const x = t.current.querySelectorAll('[data-type="variable"]');
1466
+ if (x.length > 0) {
1467
+ let N = null;
1468
+ for (const v of Array.from(x))
1469
+ if (v.style.display !== "none") {
1470
+ N = v;
1459
1471
  break;
1460
1472
  }
1461
- if (!k && s.length > 0 && (k = s[0]), k) {
1462
- const d = document.createRange();
1463
- d.selectNodeContents(k), d.collapse(!1), p.removeAllRanges(), p.addRange(d), k.focus();
1473
+ if (!N && x.length > 0 && (N = x[0]), N) {
1474
+ const v = document.createRange();
1475
+ v.selectNodeContents(N), v.collapse(!1), a.removeAllRanges(), a.addRange(v), N.focus();
1464
1476
  } else
1465
- p.removeAllRanges();
1477
+ a.removeAllRanges();
1466
1478
  } else
1467
- p.removeAllRanges();
1479
+ a.removeAllRanges();
1468
1480
  }
1481
+ }, S = t.current;
1482
+ return S && (S.addEventListener("compositionstart", e), S.addEventListener("compositionend", r), S.addEventListener("input", q)), document.addEventListener("mousedown", i), document.addEventListener("mouseup", m), document.addEventListener("selectionchange", n), () => {
1483
+ const a = t.current;
1484
+ a && (a.removeEventListener("compositionstart", e), a.removeEventListener("compositionend", r), a.removeEventListener("input", q)), document.removeEventListener("mousedown", i), document.removeEventListener("mouseup", m), document.removeEventListener("selectionchange", n);
1469
1485
  };
1470
- return document.addEventListener("mousedown", o), document.addEventListener("mouseup", h), document.addEventListener("selectionchange", q), () => {
1471
- document.removeEventListener("mousedown", o), document.removeEventListener("mouseup", h), document.removeEventListener("selectionchange", q);
1472
- };
1473
- }, [n, m]);
1486
+ }, [t, p]);
1474
1487
  }
1475
- const ut = ({
1476
- config: n,
1477
- onSend: m,
1478
- isProcessing: c = !1,
1479
- disabled: a = !1,
1480
- width: o,
1481
- lockStructure: h = !1,
1482
- agentOptions: q = [],
1483
- onAgentSelect: p,
1484
- loading: e = !1
1488
+ const mt = ({
1489
+ config: t,
1490
+ onSend: p,
1491
+ isProcessing: u = !1,
1492
+ disabled: s = !1,
1493
+ width: i,
1494
+ lockStructure: m = !1,
1495
+ agentOptions: C = [],
1496
+ onAgentSelect: h,
1497
+ onAgentExit: e,
1498
+ loading: r = !1,
1499
+ placeholder: q
1485
1500
  }) => {
1486
- const t = W(null), N = W(null), [s, k] = z({}), [d, R] = z(null), [v, x] = z(null), w = W(!1), A = W(null), [$, S] = z(!1), C = W(null), [O, I] = z(() => {
1487
- const r = {};
1488
- return n.forEach((i) => {
1489
- i.type === "multi-variable" && i.key && (r[i.key] = 1);
1490
- }), r;
1501
+ const n = K(null), S = K(null), [a, A] = z({}), [T, g] = z(null), [x, N] = z(null), v = K(!1), k = K(null), [$, L] = z(!1), V = K(null), [P, O] = z(!0), [G, M] = z(() => {
1502
+ const c = {};
1503
+ return t.forEach((f) => {
1504
+ f.type === "multi-variable" && f.key && (c[f.key] = 1);
1505
+ }), c;
1491
1506
  });
1492
- J(() => {
1493
- I((r) => {
1494
- const i = {};
1495
- return n.forEach((y) => {
1496
- y.type === "multi-variable" && y.key && (i[y.key] = r[y.key] || 1);
1497
- }), i;
1507
+ Z(() => {
1508
+ M((c) => {
1509
+ const f = {};
1510
+ return t.forEach((o) => {
1511
+ o.type === "multi-variable" && o.key && (f[o.key] = c[o.key] || 1);
1512
+ }), f;
1498
1513
  });
1499
- }, [n]), rt(t, n, s, h, O, C), at(t, n, s, x), ot(t, n, x), lt(t, n, s, x), st(t, n, x), it(t, n, s, S), ct(t, w);
1500
- const D = (r) => {
1501
- if (a) {
1502
- r.preventDefault();
1514
+ }, [t]), lt(n, t, a, m, G, V), it(n, t, a, N), ct(n, t, N), dt(n, t, a, N), ut(n, t, N), pt(n, t, a, L), ft(n, v), Z(() => {
1515
+ if (t.length > 0) {
1516
+ O(!1);
1503
1517
  return;
1504
1518
  }
1505
- r.preventDefault();
1506
- const i = r.clipboardData.getData("text/plain"), y = window.getSelection();
1507
- if (y && y.rangeCount > 0) {
1508
- const T = y.anchorNode;
1509
- if (T) {
1510
- let g = null;
1511
- if (T.nodeType === Node.ELEMENT_NODE ? g = T.closest('[data-type="variable"]') : T.nodeType === Node.TEXT_NODE && T.parentElement && (g = T.parentElement.closest('[data-type="variable"]')), g) {
1512
- const L = g.dataset.multiKey;
1513
- if (L) {
1514
- const f = i.split(/[,\n\r\t]+/).map((b) => b.trim()).filter((b) => b.length > 0);
1515
- if (f.length > 1) {
1516
- const b = parseInt(g.dataset.index || "0", 10), V = n.find((ee) => ee.type === "multi-variable" && ee.key === L)?.maxCount || 9, j = O[L] || 1, Y = Math.min(b + f.length, V);
1517
- Y > j && I((U) => ({
1518
- ...U,
1519
- [L]: Y
1519
+ const c = () => {
1520
+ if (!n.current) {
1521
+ O(!0);
1522
+ return;
1523
+ }
1524
+ const o = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", y = n.current.querySelectorAll('[data-type="variable"]'), b = n.current.querySelectorAll('[data-type="upload"]');
1525
+ let E = !1;
1526
+ y.forEach((I) => {
1527
+ (I.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (E = !0);
1528
+ }), b.forEach((I) => {
1529
+ I.querySelector(".upload-inner-wrapper.has-file") && (E = !0);
1530
+ });
1531
+ const R = !o && !E;
1532
+ O(R), t.length === 0 && L(!R);
1533
+ };
1534
+ c();
1535
+ const f = new MutationObserver(c);
1536
+ return n.current && f.observe(n.current, {
1537
+ childList: !0,
1538
+ subtree: !0,
1539
+ characterData: !0
1540
+ }), () => {
1541
+ f.disconnect();
1542
+ };
1543
+ }, [t]);
1544
+ const Y = (c) => {
1545
+ if (s) {
1546
+ c.preventDefault();
1547
+ return;
1548
+ }
1549
+ c.preventDefault();
1550
+ const f = c.clipboardData.getData("text/plain"), o = window.getSelection();
1551
+ if (o && o.rangeCount > 0) {
1552
+ const y = o.anchorNode;
1553
+ if (y) {
1554
+ let b = null;
1555
+ if (y.nodeType === Node.ELEMENT_NODE ? b = y.closest('[data-type="variable"]') : y.nodeType === Node.TEXT_NODE && y.parentElement && (b = y.parentElement.closest('[data-type="variable"]')), b) {
1556
+ const E = b.dataset.multiKey;
1557
+ if (E) {
1558
+ const R = f.split(/[,\n\r\t]+/).map((I) => I.trim()).filter((I) => I.length > 0);
1559
+ if (R.length > 1) {
1560
+ const I = parseInt(b.dataset.index || "0", 10), D = t.find((ne) => ne.type === "multi-variable" && ne.key === E)?.maxCount || 9, X = G[E] || 1, ee = Math.min(I + R.length, D);
1561
+ ee > X && M((Q) => ({
1562
+ ...Q,
1563
+ [E]: ee
1520
1564
  })), setTimeout(() => {
1521
- t.current && (f.forEach((U, ee) => {
1522
- const te = b + ee;
1523
- if (te >= V) return;
1524
- const M = `${L}_${te}`, Z = t.current.querySelector(
1525
- `[data-type="variable"][data-key="${M}"]`
1565
+ n.current && (R.forEach((Q, ne) => {
1566
+ const ae = I + ne;
1567
+ if (ae >= D) return;
1568
+ const H = `${E}_${ae}`, re = n.current.querySelector(
1569
+ `[data-type="variable"][data-key="${H}"]`
1526
1570
  );
1527
- Z && (Z.innerText = U, Z.classList.remove("show-placeholder"));
1528
- }), F());
1571
+ re && (re.innerText = Q, re.classList.remove("show-placeholder"));
1572
+ }), l());
1529
1573
  }, 0);
1530
1574
  return;
1531
1575
  }
@@ -1533,438 +1577,454 @@ const ut = ({
1533
1577
  }
1534
1578
  }
1535
1579
  }
1536
- document.execCommand("insertText", !1, i), F();
1537
- }, P = (r) => {
1538
- if (r.target.files && r.target.files[0] && d) {
1539
- const i = r.target.files[0], y = d;
1540
- k((T) => ({ ...T, [y]: i }));
1580
+ document.execCommand("insertText", !1, f), l();
1581
+ }, te = (c) => {
1582
+ if (c.target.files && c.target.files[0] && T) {
1583
+ const f = c.target.files[0], o = T;
1584
+ A((y) => ({ ...y, [o]: f }));
1541
1585
  }
1542
- r.target && (r.target.value = ""), R(null);
1543
- }, H = (r) => {
1544
- k((i) => {
1545
- const y = { ...i };
1546
- return delete y[r], y;
1586
+ c.target && (c.target.value = ""), g(null);
1587
+ }, w = (c) => {
1588
+ A((f) => {
1589
+ const o = { ...f };
1590
+ return delete o[c], o;
1547
1591
  });
1548
- }, G = (r) => {
1549
- const i = r.target;
1550
- if (h) {
1551
- const T = i.closest(".tag-node"), g = i.closest('[data-type="text"]');
1552
- if (T || g) {
1553
- r.preventDefault(), r.stopPropagation();
1554
- const L = window.getSelection();
1555
- L && L.removeAllRanges();
1592
+ }, _ = (c) => {
1593
+ const f = c.target;
1594
+ if (f.closest(".tag-close-btn")) {
1595
+ if (c.preventDefault(), c.stopPropagation(), m)
1596
+ return;
1597
+ N(null), e ? e() : n.current && (n.current.innerHTML = "", n.current.focus());
1598
+ return;
1599
+ }
1600
+ if (m) {
1601
+ const b = f.closest(".tag-node"), E = f.closest('[data-type="text"]');
1602
+ if (b || E) {
1603
+ c.preventDefault(), c.stopPropagation();
1604
+ const R = window.getSelection();
1605
+ R && R.removeAllRanges();
1556
1606
  return;
1557
1607
  }
1558
1608
  }
1559
- i.closest('[data-type="variable"]') || (A.current = { x: r.clientX, y: r.clientY }, w.current = !1, (i.closest(".tag-close-btn") || i.closest(".file-remove-btn")) && (r.preventDefault(), r.stopPropagation()));
1560
- }, K = (r) => {
1561
- if (!r.target.closest('[data-type="variable"]') && A.current) {
1562
- const T = Math.abs(r.clientX - A.current.x), g = Math.abs(r.clientY - A.current.y);
1563
- (T > 3 || g > 3) && (w.current = !0);
1609
+ f.closest('[data-type="variable"]') || (k.current = { x: c.clientX, y: c.clientY }, v.current = !1, f.closest(".file-remove-btn") && (c.preventDefault(), c.stopPropagation()));
1610
+ }, W = (c) => {
1611
+ if (!c.target.closest('[data-type="variable"]') && k.current) {
1612
+ const y = Math.abs(c.clientX - k.current.x), b = Math.abs(c.clientY - k.current.y);
1613
+ (y > 3 || b > 3) && (v.current = !0);
1564
1614
  }
1565
- }, Q = (r) => {
1566
- if (r.target.closest('[data-type="variable"]')) {
1567
- A.current = null, w.current = !1;
1615
+ }, U = (c) => {
1616
+ if (c.target.closest('[data-type="variable"]')) {
1617
+ k.current = null, v.current = !1;
1568
1618
  return;
1569
1619
  }
1570
- A.current = null, w.current = !1;
1571
- }, E = (r) => {
1572
- if (a)
1620
+ k.current = null, v.current = !1;
1621
+ }, se = (c) => {
1622
+ if (s)
1573
1623
  return;
1574
- const i = r.target;
1575
- if (i.closest('[data-type="text"]')) {
1576
- r.preventDefault(), r.stopPropagation();
1577
- const f = window.getSelection();
1578
- f && f.removeAllRanges();
1624
+ const f = c.target;
1625
+ if (f.closest(".tag-close-btn")) {
1626
+ c.preventDefault(), c.stopPropagation();
1579
1627
  return;
1580
1628
  }
1581
- if (h && i.closest(".tag-node")) {
1582
- r.preventDefault(), r.stopPropagation();
1583
- const b = window.getSelection();
1584
- b && b.removeAllRanges();
1629
+ if (t.length === 0)
1630
+ return;
1631
+ if (f.closest('[data-type="text"]')) {
1632
+ c.preventDefault(), c.stopPropagation();
1633
+ const I = window.getSelection();
1634
+ I && I.removeAllRanges();
1585
1635
  return;
1586
1636
  }
1587
- if (i.closest('[data-type="variable"]')) {
1588
- if (w.current)
1589
- return;
1590
- setTimeout(() => {
1591
- const f = window.getSelection();
1592
- f && !f.isCollapsed || fe(t);
1593
- }, 10);
1637
+ if (m && f.closest(".tag-node")) {
1638
+ c.preventDefault(), c.stopPropagation();
1639
+ const D = window.getSelection();
1640
+ D && D.removeAllRanges();
1594
1641
  return;
1595
1642
  }
1596
- if (i.closest(".tag-close-btn")) {
1597
- if (h) {
1598
- r.preventDefault(), r.stopPropagation();
1643
+ if (f.closest('[data-type="variable"]')) {
1644
+ if (v.current)
1599
1645
  return;
1600
- }
1601
- r.preventDefault(), r.stopPropagation(), x(null), t.current && (t.current.innerHTML = "", t.current.focus());
1646
+ setTimeout(() => {
1647
+ const I = window.getSelection();
1648
+ I && !I.isCollapsed || ge(n);
1649
+ }, 10);
1602
1650
  return;
1603
1651
  }
1604
- const g = i.closest(".file-remove-btn");
1605
- if (g) {
1606
- r.preventDefault(), r.stopPropagation();
1607
- const b = g.closest('[data-type="upload"]')?.dataset.key;
1608
- b && H(b);
1652
+ const E = f.closest(".file-remove-btn");
1653
+ if (E) {
1654
+ c.preventDefault(), c.stopPropagation();
1655
+ const D = E.closest('[data-type="upload"]')?.dataset.key;
1656
+ D && w(D);
1609
1657
  return;
1610
1658
  }
1611
- const L = i.closest('[data-type="upload"]');
1612
- if (L) {
1613
- const f = L.dataset.key;
1614
- f && (R(f), N.current?.click());
1659
+ const R = f.closest('[data-type="upload"]');
1660
+ if (R) {
1661
+ const I = R.dataset.key;
1662
+ I && (g(I), S.current?.click());
1615
1663
  return;
1616
1664
  }
1617
- }, _ = (r) => {
1618
- const y = r.target.closest('[data-type="variable"]');
1619
- if (y) {
1620
- const T = window.getSelection();
1621
- if (T) {
1622
- const g = document.createRange(), L = y.textContent || "";
1623
- if (L.replace(/\u200B/g, "")) {
1624
- let b = 0, V = L.length;
1625
- L.startsWith("​") && (b = 1), L.endsWith("​") && L.length > 1 && (V = L.length - 1);
1626
- const j = y.firstChild;
1627
- j && j.nodeType === Node.TEXT_NODE ? (g.setStart(j, b), g.setEnd(j, V)) : g.selectNodeContents(y);
1665
+ }, le = (c) => {
1666
+ const o = c.target.closest('[data-type="variable"]');
1667
+ if (o) {
1668
+ const y = window.getSelection();
1669
+ if (y) {
1670
+ const b = document.createRange(), E = o.textContent || "";
1671
+ if (E.replace(/\u200B/g, "")) {
1672
+ let I = 0, D = E.length;
1673
+ E.startsWith("​") && (I = 1), E.endsWith("​") && E.length > 1 && (D = E.length - 1);
1674
+ const X = o.firstChild;
1675
+ X && X.nodeType === Node.TEXT_NODE ? (b.setStart(X, I), b.setEnd(X, D)) : b.selectNodeContents(o);
1628
1676
  } else
1629
- g.selectNodeContents(y), g.collapse(!0);
1630
- T.removeAllRanges(), T.addRange(g);
1677
+ b.selectNodeContents(o), b.collapse(!0);
1678
+ y.removeAllRanges(), y.addRange(b);
1631
1679
  }
1632
1680
  }
1633
- }, F = () => {
1634
- if (fe(t), t.current && t.current.querySelectorAll('[data-type="variable"]').forEach((y) => {
1635
- const T = y.querySelector(".variable-info-icon");
1636
- if (T) {
1637
- let g = !1;
1638
- const L = document.createTreeWalker(
1639
- y,
1681
+ }, l = () => {
1682
+ if (t.length === 0) {
1683
+ if (n.current) {
1684
+ const o = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
1685
+ O(o), L(!o);
1686
+ }
1687
+ return;
1688
+ }
1689
+ if (ge(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((o) => {
1690
+ const y = o.querySelector(".variable-info-icon");
1691
+ if (y) {
1692
+ let b = !1;
1693
+ const E = document.createTreeWalker(
1694
+ o,
1640
1695
  NodeFilter.SHOW_TEXT,
1641
1696
  {
1642
- acceptNode: (f) => T.contains(f) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1697
+ acceptNode: (R) => y.contains(R) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1643
1698
  }
1644
1699
  );
1645
- for (; L.nextNode(); )
1646
- if (L.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1647
- g = !0;
1700
+ for (; E.nextNode(); )
1701
+ if (E.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1702
+ b = !0;
1648
1703
  break;
1649
1704
  }
1650
- g ? T.classList.add("hidden") : T.classList.remove("hidden");
1705
+ b ? y.classList.add("hidden") : y.classList.remove("hidden");
1651
1706
  }
1652
- }), me(t, n, s), ye(t, n, s, S), !t.current) return;
1653
- n.filter((i) => i.type === "multi-variable" && i.key).forEach((i) => {
1654
- if (!i.key) return;
1655
- const y = i.maxCount || 9, T = O[i.key] || 1, g = [];
1656
- for (let j = 0; j < T; j++) {
1657
- const Y = `${i.key}_${j}`, U = t.current.querySelector(
1658
- `[data-type="variable"][data-key="${Y}"][data-multi-key="${i.key}"]`
1707
+ }), be(n, t, a), xe(n, t, a, L), !n.current) return;
1708
+ t.filter((f) => f.type === "multi-variable" && f.key).forEach((f) => {
1709
+ if (!f.key) return;
1710
+ const o = f.maxCount || 9, y = G[f.key] || 1, b = [];
1711
+ for (let X = 0; X < y; X++) {
1712
+ const ee = `${f.key}_${X}`, Q = n.current.querySelector(
1713
+ `[data-type="variable"][data-key="${ee}"][data-multi-key="${f.key}"]`
1659
1714
  );
1660
- if (U) {
1661
- const ee = U.innerText.replace(/[\u200B\n]/g, "").trim();
1662
- g.push(ee);
1715
+ if (Q) {
1716
+ const ne = Q.innerText.replace(/[\u200B\n]/g, "").trim();
1717
+ b.push(ne);
1663
1718
  }
1664
1719
  }
1665
- const f = (g[g.length - 1] || "") === "";
1666
- let b = !1, V = -1;
1667
- for (let j = 0; j < g.length - 1; j++)
1668
- if (g[j] === "") {
1669
- b = !0, V = j;
1720
+ const R = (b[b.length - 1] || "") === "";
1721
+ let I = !1, D = -1;
1722
+ for (let X = 0; X < b.length - 1; X++)
1723
+ if (b[X] === "") {
1724
+ I = !0, D = X;
1670
1725
  break;
1671
1726
  }
1672
- if (b && V >= 0) {
1673
- const j = window.getSelection();
1674
- if (j && j.rangeCount > 0) {
1675
- const M = j.getRangeAt(0), Z = M.startContainer, ae = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
1676
- if (ae) {
1677
- const oe = ae.dataset.key;
1678
- if (oe) {
1679
- const se = document.createRange();
1680
- se.setStartBefore(ae), se.setEnd(M.startContainer, M.startOffset);
1681
- const pe = se.toString().length;
1682
- C.current = { key: oe, offset: pe };
1727
+ if (I && D >= 0) {
1728
+ const X = window.getSelection();
1729
+ if (X && X.rangeCount > 0) {
1730
+ const H = X.getRangeAt(0), re = H.startContainer, ie = re.nodeType === Node.ELEMENT_NODE ? re.closest('[data-type="variable"][data-multi-key]') : re.parentElement?.closest('[data-type="variable"][data-multi-key]');
1731
+ if (ie) {
1732
+ const ce = ie.dataset.key;
1733
+ if (ce) {
1734
+ const ue = document.createRange();
1735
+ ue.setStartBefore(ie), ue.setEnd(H.startContainer, H.startOffset);
1736
+ const he = ue.toString().length;
1737
+ V.current = { key: ce, offset: he };
1683
1738
  }
1684
1739
  }
1685
1740
  }
1686
- const Y = [...g];
1687
- for (let M = V; M < Y.length - 1; M++)
1688
- Y[M] = Y[M + 1];
1689
- Y.pop();
1690
- const U = {};
1691
- Y.forEach((M, Z) => {
1692
- M && (U[`${i.key}_${Z}`] = M);
1741
+ const ee = [...b];
1742
+ for (let H = D; H < ee.length - 1; H++)
1743
+ ee[H] = ee[H + 1];
1744
+ ee.pop();
1745
+ const Q = {};
1746
+ ee.forEach((H, re) => {
1747
+ H && (Q[`${f.key}_${re}`] = H);
1693
1748
  });
1694
- const ee = Math.max(f ? Y.length : Y.length + 1, 1);
1695
- t.current.querySelectorAll(
1749
+ const ne = Math.max(R ? ee.length : ee.length + 1, 1);
1750
+ n.current.querySelectorAll(
1696
1751
  '[data-type="variable"]'
1697
- ).forEach((M) => {
1698
- const Z = M.dataset.key, ae = M.dataset.multiKey;
1699
- if (Z && ae !== i.key) {
1700
- const oe = M.innerText.replace(/[\u200B\n]/g, "").trim();
1701
- oe && (U[Z] = oe);
1752
+ ).forEach((H) => {
1753
+ const re = H.dataset.key, ie = H.dataset.multiKey;
1754
+ if (re && ie !== f.key) {
1755
+ const ce = H.innerText.replace(/[\u200B\n]/g, "").trim();
1756
+ ce && (Q[re] = ce);
1702
1757
  }
1703
- }), t.current.__tempVariableValues = U, I((M) => ({
1704
- ...M,
1705
- [i.key]: ee
1758
+ }), n.current.__tempVariableValues = Q, M((H) => ({
1759
+ ...H,
1760
+ [f.key]: ne
1706
1761
  }));
1707
1762
  return;
1708
1763
  }
1709
- if (!f) {
1710
- const j = T - 1, Y = `${i.key}_${j}`, U = t.current.querySelector(
1711
- `[data-type="variable"][data-key="${Y}"][data-multi-key="${i.key}"]`
1764
+ if (!R) {
1765
+ const X = y - 1, ee = `${f.key}_${X}`, Q = n.current.querySelector(
1766
+ `[data-type="variable"][data-key="${ee}"][data-multi-key="${f.key}"]`
1712
1767
  );
1713
- if (U && U.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && T < y) {
1714
- const te = window.getSelection();
1715
- if (te && te.rangeCount > 0) {
1716
- const M = te.getRangeAt(0), Z = M.startContainer, ae = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
1717
- if (ae) {
1718
- const oe = ae.dataset.key;
1719
- if (oe) {
1720
- const se = document.createRange();
1721
- se.setStartBefore(ae), se.setEnd(M.startContainer, M.startOffset);
1722
- const pe = se.toString().length;
1723
- C.current = { key: oe, offset: pe };
1768
+ if (Q && Q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && y < o) {
1769
+ const ae = window.getSelection();
1770
+ if (ae && ae.rangeCount > 0) {
1771
+ const H = ae.getRangeAt(0), re = H.startContainer, ie = re.nodeType === Node.ELEMENT_NODE ? re.closest('[data-type="variable"][data-multi-key]') : re.parentElement?.closest('[data-type="variable"][data-multi-key]');
1772
+ if (ie) {
1773
+ const ce = ie.dataset.key;
1774
+ if (ce) {
1775
+ const ue = document.createRange();
1776
+ ue.setStartBefore(ie), ue.setEnd(H.startContainer, H.startOffset);
1777
+ const he = ue.toString().length;
1778
+ V.current = { key: ce, offset: he };
1724
1779
  }
1725
1780
  }
1726
1781
  }
1727
- I((M) => ({
1728
- ...M,
1729
- [i.key]: T + 1
1782
+ M((H) => ({
1783
+ ...H,
1784
+ [f.key]: y + 1
1730
1785
  }));
1731
1786
  }
1732
1787
  }
1733
1788
  });
1734
- }, X = () => {
1735
- t.current && (fe(t), me(t, n, s), ye(t, n, s, S));
1736
- }, ne = (r) => {
1737
- if (a) {
1738
- r.preventDefault();
1789
+ }, j = () => {
1790
+ n.current && (ge(n), be(n, t, a), xe(n, t, a, L));
1791
+ }, B = (c) => {
1792
+ if (s) {
1793
+ c.preventDefault();
1739
1794
  return;
1740
1795
  }
1741
- const i = window.getSelection();
1742
- if (i && i.rangeCount > 0) {
1743
- const y = i.anchorNode;
1744
- let T = null;
1745
- if (y && (y.nodeType === Node.ELEMENT_NODE ? T = y.closest('[data-type="text"]') : y.nodeType === Node.TEXT_NODE && y.parentElement && (T = y.parentElement.closest('[data-type="text"]'))), T) {
1746
- if (r.preventDefault(), r.stopPropagation(), t.current) {
1747
- const g = t.current.querySelector(
1796
+ const f = window.getSelection();
1797
+ if (f && f.rangeCount > 0) {
1798
+ const o = f.anchorNode;
1799
+ let y = null;
1800
+ if (o && (o.nodeType === Node.ELEMENT_NODE ? y = o.closest('[data-type="text"]') : o.nodeType === Node.TEXT_NODE && o.parentElement && (y = o.parentElement.closest('[data-type="text"]'))), y) {
1801
+ if (c.preventDefault(), c.stopPropagation(), n.current) {
1802
+ const b = n.current.querySelector(
1748
1803
  '[data-type="variable"], [data-type="upload"]'
1749
1804
  );
1750
- g && g.focus();
1805
+ b && b.focus();
1751
1806
  }
1752
1807
  return;
1753
1808
  }
1754
1809
  }
1755
- if (h && i && i.rangeCount > 0) {
1756
- const y = i.anchorNode;
1757
- let T = null;
1758
- if (y && (y.nodeType === Node.ELEMENT_NODE ? T = y.closest(".tag-node") : y.nodeType === Node.TEXT_NODE && y.parentElement && (T = y.parentElement.closest(".tag-node"))), T) {
1759
- if (r.preventDefault(), r.stopPropagation(), t.current) {
1760
- const g = t.current.querySelector(
1810
+ if (m && f && f.rangeCount > 0) {
1811
+ const o = f.anchorNode;
1812
+ let y = null;
1813
+ if (o && (o.nodeType === Node.ELEMENT_NODE ? y = o.closest(".tag-node") : o.nodeType === Node.TEXT_NODE && o.parentElement && (y = o.parentElement.closest(".tag-node"))), y) {
1814
+ if (c.preventDefault(), c.stopPropagation(), n.current) {
1815
+ const b = n.current.querySelector(
1761
1816
  '[data-type="variable"], [data-type="upload"]'
1762
1817
  );
1763
- g && g.focus();
1818
+ b && b.focus();
1764
1819
  }
1765
1820
  return;
1766
1821
  }
1767
1822
  }
1768
- if (r.key === "Enter" && !r.shiftKey && (r.preventDefault(), re()), r.key === "Escape" && t.current) {
1769
- if (h) {
1770
- r.preventDefault();
1823
+ if (c.key === "Enter" && !c.shiftKey && (c.preventDefault(), J()), c.key === "Escape" && n.current) {
1824
+ if (m) {
1825
+ c.preventDefault();
1771
1826
  return;
1772
1827
  }
1773
- t.current.innerHTML = "", t.current.focus();
1828
+ n.current.innerHTML = "", n.current.focus();
1774
1829
  }
1775
- if (r.key === "Backspace") {
1776
- const y = window.getSelection();
1777
- if (y && y.rangeCount > 0) {
1778
- const T = y.getRangeAt(0), g = y.anchorNode;
1779
- if (h) {
1780
- let f = null, b = null;
1781
- if (g && (g.nodeType === Node.ELEMENT_NODE ? (f = g.closest(".tag-node"), b = g.closest('[data-type="text"]')) : g.nodeType === Node.TEXT_NODE && g.parentElement && (f = g.parentElement.closest(".tag-node"), b = g.parentElement.closest('[data-type="text"]'))), (f || b) && T.collapsed && T.startOffset === 0) {
1782
- r.preventDefault();
1830
+ if (c.key === "Backspace") {
1831
+ const o = window.getSelection();
1832
+ if (o && o.rangeCount > 0) {
1833
+ const y = o.getRangeAt(0), b = o.anchorNode;
1834
+ if (m) {
1835
+ let R = null, I = null;
1836
+ if (b && (b.nodeType === Node.ELEMENT_NODE ? (R = b.closest(".tag-node"), I = b.closest('[data-type="text"]')) : b.nodeType === Node.TEXT_NODE && b.parentElement && (R = b.parentElement.closest(".tag-node"), I = b.parentElement.closest('[data-type="text"]'))), (R || I) && y.collapsed && y.startOffset === 0) {
1837
+ c.preventDefault();
1783
1838
  return;
1784
1839
  }
1785
1840
  }
1786
- let L = null;
1787
- if (g && (g.nodeType === Node.ELEMENT_NODE ? L = g.closest(
1841
+ let E = null;
1842
+ if (b && (b.nodeType === Node.ELEMENT_NODE ? E = b.closest(
1788
1843
  '[data-type="variable"]'
1789
- ) : g.nodeType === Node.TEXT_NODE && g.parentElement && (L = g.parentElement.closest(
1844
+ ) : b.nodeType === Node.TEXT_NODE && b.parentElement && (E = b.parentElement.closest(
1790
1845
  '[data-type="variable"]'
1791
- ))), L) {
1792
- if (!T.collapsed)
1846
+ ))), E) {
1847
+ if (!y.collapsed)
1793
1848
  return;
1794
- const f = L.innerText;
1795
- if (f === "​" || f === "") {
1796
- r.preventDefault();
1849
+ const R = E.innerText;
1850
+ if (R === "​" || R === "") {
1851
+ c.preventDefault();
1797
1852
  return;
1798
1853
  }
1799
- if (T.startOffset === 0) {
1800
- r.preventDefault();
1854
+ if (y.startOffset === 0) {
1855
+ c.preventDefault();
1801
1856
  return;
1802
1857
  }
1803
- if (f.startsWith("​") && T.startOffset === 1) {
1804
- r.preventDefault();
1858
+ if (R.startsWith("​") && y.startOffset === 1) {
1859
+ c.preventDefault();
1805
1860
  return;
1806
1861
  }
1807
1862
  }
1808
1863
  }
1809
1864
  }
1810
- }, re = () => {
1811
- if (c || a || e || !$ || !t.current) return;
1812
- const r = t.current;
1813
- let i = "";
1814
- const y = {}, T = (f) => {
1815
- if (!(f.nodeType === Node.ELEMENT_NODE && f.style.display === "none")) {
1816
- if (f.nodeType === Node.TEXT_NODE)
1817
- i += (f.textContent || "").replace(/\u200B/g, "");
1818
- else if (f.nodeType === Node.ELEMENT_NODE) {
1819
- const b = f, V = b.dataset.type, j = b.dataset.key;
1820
- if (V === "variable" && j) {
1821
- let Y = "";
1822
- const U = document.createTreeWalker(
1823
- b,
1865
+ }, J = () => {
1866
+ if (u || s || r || !$ || !n.current) return;
1867
+ if (t.length === 0) {
1868
+ const E = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1869
+ if (!E) return;
1870
+ p(E, E);
1871
+ return;
1872
+ }
1873
+ const c = n.current;
1874
+ let f = "";
1875
+ const o = {}, y = (E) => {
1876
+ if (!(E.nodeType === Node.ELEMENT_NODE && E.style.display === "none")) {
1877
+ if (E.nodeType === Node.TEXT_NODE)
1878
+ f += (E.textContent || "").replace(/\u200B/g, "");
1879
+ else if (E.nodeType === Node.ELEMENT_NODE) {
1880
+ const R = E, I = R.dataset.type, D = R.dataset.key;
1881
+ if (I === "variable" && D) {
1882
+ let X = "";
1883
+ const ee = document.createTreeWalker(
1884
+ R,
1824
1885
  NodeFilter.SHOW_TEXT,
1825
1886
  {
1826
- acceptNode: (te) => {
1827
- const M = b.querySelector(".variable-info-icon");
1828
- return M && M.contains(te) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
1887
+ acceptNode: (ne) => {
1888
+ const ae = R.querySelector(".variable-info-icon");
1889
+ return ae && ae.contains(ne) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
1829
1890
  }
1830
1891
  }
1831
1892
  );
1832
- for (; U.nextNode(); )
1833
- Y += U.currentNode.textContent || "";
1834
- const ee = Y.replace(/[\u200B\n]/g, "").trim();
1835
- if (ee) {
1836
- const te = b.dataset.multiKey;
1837
- if (te) {
1838
- y[te] || (y[te] = []);
1839
- const M = y[te];
1840
- M.push(ee), M.length > 1 && (i += " "), i += ee;
1893
+ for (; ee.nextNode(); )
1894
+ X += ee.currentNode.textContent || "";
1895
+ const Q = X.replace(/[\u200B\n]/g, "").trim();
1896
+ if (Q) {
1897
+ const ne = R.dataset.multiKey;
1898
+ if (ne) {
1899
+ o[ne] || (o[ne] = []);
1900
+ const ae = o[ne];
1901
+ ae.push(Q), ae.length > 1 && (f += " "), f += Q;
1841
1902
  } else
1842
- y[j] = ee, i += ee;
1903
+ o[D] = Q, f += Q;
1843
1904
  }
1844
- } else if (V === "upload" && j)
1845
- y[j] = s[j] ?? null, s[j] && (i += ` [附带文件: ${s[j]?.name}] `);
1905
+ } else if (I === "upload" && D)
1906
+ o[D] = a[D] ?? null, a[D] && (f += ` [附带文件: ${a[D]?.name}] `);
1846
1907
  else {
1847
- if (b.classList.contains("tag-close-btn") || b.classList.contains("file-remove-btn")) return;
1848
- b.getAttribute("contenteditable") === "false" && !V && b.classList.contains("tag-node") ? i += b.innerText : b.childNodes.forEach(T);
1908
+ if (R.classList.contains("tag-close-btn") || R.classList.contains("file-remove-btn")) return;
1909
+ R.getAttribute("contenteditable") === "false" && !I && R.classList.contains("tag-node") ? f += R.innerText : R.childNodes.forEach(y);
1849
1910
  }
1850
1911
  }
1851
1912
  }
1852
1913
  };
1853
- if (r.childNodes.forEach(T), i = i.trim(), !i) return;
1854
- const g = new FormData();
1855
- g.append("fullPrompt", i), Object.keys(y).forEach((f) => {
1856
- const b = y[f];
1857
- b != null && (b instanceof File ? g.append(f, b) : Array.isArray(b) ? b.forEach((V, j) => {
1858
- V != null && (V instanceof File ? g.append(`${f}[${j}]`, V) : typeof V == "string" ? g.append(`${f}[${j}]`, V) : g.append(`${f}[${j}]`, String(V)));
1859
- }) : typeof b == "string" ? g.append(f, b) : g.append(f, String(b)));
1860
- }), console.log("dataPayload:", y);
1861
- const L = Array.from(g.keys());
1862
- console.log("FormData keys:", L), m(g, i);
1863
- }, l = o ? { width: typeof o == "number" ? `${o}px` : o } : {};
1864
- return /* @__PURE__ */ u.jsxs(
1914
+ if (c.childNodes.forEach(y), f = f.trim(), !f) return;
1915
+ const b = new FormData();
1916
+ b.append("fullPrompt", f), Object.keys(o).forEach((E) => {
1917
+ const R = o[E];
1918
+ R != null && (R instanceof File ? b.append(E, R) : Array.isArray(R) ? R.forEach((I, D) => {
1919
+ I != null && (I instanceof File ? b.append(`${E}[${D}]`, I) : typeof I == "string" ? b.append(`${E}[${D}]`, I) : b.append(`${E}[${D}]`, String(I)));
1920
+ }) : typeof R == "string" ? b.append(E, R) : b.append(E, String(R)));
1921
+ }), p(b, f);
1922
+ }, oe = i ? { width: typeof i == "number" ? `${i}px` : i } : {};
1923
+ return /* @__PURE__ */ d.jsxs(
1865
1924
  "div",
1866
1925
  {
1867
1926
  className: "rich-text-editor",
1868
- style: l,
1869
- "data-disabled": a,
1927
+ style: oe,
1928
+ "data-disabled": s,
1870
1929
  children: [
1871
- /* @__PURE__ */ u.jsx(
1930
+ /* @__PURE__ */ d.jsx(
1872
1931
  "div",
1873
1932
  {
1874
- ref: t,
1875
- className: "rte-editor",
1876
- contentEditable: !1,
1933
+ ref: n,
1934
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${P && q ? "rte-editor-empty" : ""}`,
1935
+ contentEditable: t.length === 0,
1877
1936
  suppressContentEditableWarning: !0,
1878
- onMouseDown: G,
1879
- onMouseMove: K,
1880
- onMouseUp: Q,
1881
- onClick: E,
1882
- onDoubleClick: _,
1883
- onInput: F,
1884
- onKeyDown: ne,
1885
- onPaste: D,
1886
- onBlur: X
1937
+ "data-placeholder": q,
1938
+ onMouseDown: _,
1939
+ onMouseMove: W,
1940
+ onMouseUp: U,
1941
+ onClick: se,
1942
+ onDoubleClick: le,
1943
+ onInput: l,
1944
+ onKeyDown: B,
1945
+ onPaste: Y,
1946
+ onBlur: j
1887
1947
  }
1888
1948
  ),
1889
- /* @__PURE__ */ u.jsx(
1949
+ /* @__PURE__ */ d.jsx(
1890
1950
  "input",
1891
1951
  {
1892
1952
  type: "file",
1893
- ref: N,
1953
+ ref: S,
1894
1954
  className: "rte-file-input",
1895
1955
  accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
1896
- onChange: P
1956
+ onChange: te
1897
1957
  }
1898
1958
  ),
1899
- /* @__PURE__ */ u.jsxs("div", { className: "rich-text-editor-footer", children: [
1900
- /* @__PURE__ */ u.jsx("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ u.jsxs("div", { className: "rich-text-editor-brand", children: [
1901
- /* @__PURE__ */ u.jsxs("div", { className: "rte-brand-badge", children: [
1902
- /* @__PURE__ */ u.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
1903
- /* @__PURE__ */ u.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
1959
+ /* @__PURE__ */ d.jsxs("div", { className: "rich-text-editor-footer", children: [
1960
+ /* @__PURE__ */ d.jsx("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ d.jsxs("div", { className: "rich-text-editor-brand", children: [
1961
+ /* @__PURE__ */ d.jsxs("div", { className: "rte-brand-badge", children: [
1962
+ /* @__PURE__ */ d.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
1963
+ /* @__PURE__ */ d.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
1904
1964
  ] }),
1905
- /* @__PURE__ */ u.jsx(
1906
- Ae,
1965
+ /* @__PURE__ */ d.jsx(
1966
+ Le,
1907
1967
  {
1908
1968
  placement: "top",
1909
1969
  menu: {
1910
- items: q.map((r) => ({
1911
- key: r.key,
1912
- label: /* @__PURE__ */ u.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1913
- r.icon && /* @__PURE__ */ u.jsx("i", { className: r.icon }),
1914
- /* @__PURE__ */ u.jsx("span", { children: r.label })
1970
+ items: C.map((c) => ({
1971
+ key: c.key,
1972
+ label: /* @__PURE__ */ d.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1973
+ c.icon && /* @__PURE__ */ d.jsx("i", { className: c.icon }),
1974
+ /* @__PURE__ */ d.jsx("span", { children: c.label })
1915
1975
  ] }),
1916
1976
  onClick: () => {
1917
- p?.(r);
1977
+ h?.(c);
1918
1978
  }
1919
1979
  }))
1920
1980
  },
1921
1981
  trigger: ["click"],
1922
- disabled: a || c,
1923
- children: /* @__PURE__ */ u.jsxs("div", { className: "rte-agent-badge", style: { cursor: q.length > 0 ? "pointer" : "default" }, children: [
1924
- /* @__PURE__ */ u.jsx("i", { className: "iconfont icon-zhinengti" }),
1925
- /* @__PURE__ */ u.jsx("span", { className: "rte-agent-text", children: "智能体" })
1982
+ disabled: s || u,
1983
+ children: /* @__PURE__ */ d.jsxs("div", { className: "rte-agent-badge", style: { cursor: C.length > 0 ? "pointer" : "default" }, children: [
1984
+ /* @__PURE__ */ d.jsx("i", { className: "iconfont icon-zhinengti" }),
1985
+ /* @__PURE__ */ d.jsx("span", { className: "rte-agent-text", children: "智能体" })
1926
1986
  ] })
1927
1987
  }
1928
1988
  )
1929
1989
  ] }) }),
1930
- /* @__PURE__ */ u.jsx(
1990
+ /* @__PURE__ */ d.jsx(
1931
1991
  "button",
1932
1992
  {
1933
1993
  type: "button",
1934
- onClick: re,
1935
- disabled: c || a || e || !$,
1994
+ onClick: J,
1995
+ disabled: u || s || r || !$,
1936
1996
  className: "rich-text-editor-send-button",
1937
- children: c || e ? /* @__PURE__ */ u.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ u.jsx("i", { className: "iconfont icon-fasong" })
1997
+ children: u || r ? /* @__PURE__ */ d.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ d.jsx("i", { className: "iconfont icon-fasong" })
1938
1998
  }
1939
1999
  )
1940
2000
  ] }),
1941
- v?.anchorEl && (() => {
1942
- if (!document.body.contains(v.anchorEl))
2001
+ x?.anchorEl && (() => {
2002
+ if (!document.body.contains(x.anchorEl))
1943
2003
  return null;
1944
- let r = "";
1945
- return v.type === "upload" ? r = n.find(
1946
- (y) => y.type === "upload" && y.key === v.key
1947
- )?.tooltip || "" : v.type === "tag" ? r = v.anchorEl.dataset.tooltip || "" : v.type === "upload-label" ? r = v.anchorEl.dataset.fileName || "" : v.type === "variable" && (r = v.anchorEl.dataset.tooltip || ""), Ge(
1948
- /* @__PURE__ */ u.jsx(
1949
- _e,
2004
+ let c = "";
2005
+ return x.type === "upload" ? c = t.find(
2006
+ (o) => o.type === "upload" && o.key === x.key
2007
+ )?.tooltip || "" : x.type === "tag" ? c = x.anchorEl.dataset.tooltip || "" : x.type === "upload-label" ? c = x.anchorEl.dataset.fileName || "" : x.type === "variable" && (c = x.anchorEl.dataset.tooltip || ""), He(
2008
+ /* @__PURE__ */ d.jsx(
2009
+ Ve,
1950
2010
  {
1951
2011
  arrow: !1,
1952
- title: /* @__PURE__ */ u.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: r }),
2012
+ title: /* @__PURE__ */ d.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: c }),
1953
2013
  open: !0,
1954
2014
  placement: "top",
1955
2015
  getPopupContainer: () => document.body,
1956
2016
  overlayInnerStyle: {
1957
2017
  background: "var(--neutral-800, #262626)"
1958
2018
  },
1959
- children: /* @__PURE__ */ u.jsx(
2019
+ children: /* @__PURE__ */ d.jsx(
1960
2020
  "div",
1961
2021
  {
1962
2022
  style: {
1963
2023
  position: "fixed",
1964
- left: `${v.anchorEl.getBoundingClientRect().left}px`,
1965
- top: `${v.anchorEl.getBoundingClientRect().top}px`,
1966
- width: `${v.anchorEl.offsetWidth}px`,
1967
- height: `${v.anchorEl.offsetHeight}px`,
2024
+ left: `${x.anchorEl.getBoundingClientRect().left}px`,
2025
+ top: `${x.anchorEl.getBoundingClientRect().top}px`,
2026
+ width: `${x.anchorEl.offsetWidth}px`,
2027
+ height: `${x.anchorEl.offsetHeight}px`,
1968
2028
  pointerEvents: "none"
1969
2029
  }
1970
2030
  }
@@ -1978,7 +2038,7 @@ const ut = ({
1978
2038
  }
1979
2039
  );
1980
2040
  };
1981
- ut.__docgenInfo = {
2041
+ mt.__docgenInfo = {
1982
2042
  displayName: "RichTextEditor",
1983
2043
  description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
1984
2044
  props: {
@@ -2006,79 +2066,79 @@ ut.__docgenInfo = {
2006
2066
  }
2007
2067
  }
2008
2068
  };
2009
- const dt = ({
2010
- texts: n = [],
2011
- placeholder: m = "请输入内容",
2012
- animationSpeed: c = 100,
2013
- autoPlay: a = !0,
2014
- value: o,
2015
- onChange: h,
2016
- ...q
2069
+ const yt = ({
2070
+ texts: t = [],
2071
+ placeholder: p = "请输入内容",
2072
+ animationSpeed: u = 100,
2073
+ autoPlay: s = !0,
2074
+ value: i,
2075
+ onChange: m,
2076
+ ...C
2017
2077
  }) => {
2018
- const [p, e] = z(""), [t, N] = z(0), [s, k] = z(!1), [d, R] = z(!1), [v, x] = z(!1), w = W(void 0), A = W(void 0), $ = W(n), S = W(t), C = W(d), O = W(p);
2019
- J(() => {
2020
- $.current = n, S.current = t, C.current = d, O.current = p;
2078
+ const [h, e] = z(""), [r, q] = z(0), [n, S] = z(!1), [a, A] = z(!1), [T, g] = z(!1), x = K(void 0), N = K(void 0), v = K(t), k = K(r), $ = K(a), L = K(h);
2079
+ Z(() => {
2080
+ v.current = t, k.current = r, $.current = a, L.current = h;
2021
2081
  });
2022
- const I = B((E, _) => {
2023
- let F = 0;
2024
- x(!0);
2025
- const X = () => {
2026
- F < E.length ? (e(E.slice(0, F + 1)), F++, A.current = window.setTimeout(X, c)) : (x(!1), _?.());
2082
+ const V = F((w, _) => {
2083
+ let W = 0;
2084
+ g(!0);
2085
+ const U = () => {
2086
+ W < w.length ? (e(w.slice(0, W + 1)), W++, N.current = window.setTimeout(U, u)) : (g(!1), _?.());
2027
2087
  };
2028
- X();
2029
- }, [c]), D = B((E) => {
2030
- let _ = O.current.length;
2031
- const F = () => {
2032
- _ > 0 ? (e(O.current.slice(0, _ - 1)), _--, A.current = window.setTimeout(F, c / 2)) : E?.();
2088
+ U();
2089
+ }, [u]), P = F((w) => {
2090
+ let _ = L.current.length;
2091
+ const W = () => {
2092
+ _ > 0 ? (e(L.current.slice(0, _ - 1)), _--, N.current = window.setTimeout(W, u / 2)) : w?.();
2033
2093
  };
2034
- F();
2035
- }, [c]), P = B(() => {
2036
- if ($.current.length === 0 || C.current) return;
2037
- k(!0);
2038
- const E = $.current[S.current];
2039
- O.current ? D(() => {
2040
- I(E, () => {
2041
- w.current = window.setTimeout(() => {
2042
- N((_) => (_ + 1) % $.current.length), k(!1);
2094
+ W();
2095
+ }, [u]), O = F(() => {
2096
+ if (v.current.length === 0 || $.current) return;
2097
+ S(!0);
2098
+ const w = v.current[k.current];
2099
+ L.current ? P(() => {
2100
+ V(w, () => {
2101
+ x.current = window.setTimeout(() => {
2102
+ q((_) => (_ + 1) % v.current.length), S(!1);
2043
2103
  }, 2e3);
2044
2104
  });
2045
- }) : I(E, () => {
2046
- w.current = window.setTimeout(() => {
2047
- N((_) => (_ + 1) % $.current.length), k(!1);
2105
+ }) : V(w, () => {
2106
+ x.current = window.setTimeout(() => {
2107
+ q((_) => (_ + 1) % v.current.length), S(!1);
2048
2108
  }, 2e3);
2049
2109
  });
2050
- }, [D, I]);
2051
- J(() => (a && n.length > 0 && !d && P(), () => {
2052
- w.current && window.clearTimeout(w.current), A.current && window.clearTimeout(A.current);
2053
- }), [t, d, a, n.length, P]), J(() => {
2054
- !s && a && n.length > 0 && !d && P();
2055
- }, [t, s, a, n.length, d, P]);
2056
- const H = (E) => {
2057
- R(!0), w.current && window.clearTimeout(w.current), A.current && window.clearTimeout(A.current), k(!1), x(!1), q.onFocus?.(E);
2058
- }, G = (E) => {
2059
- R(!1), !o && n.length > 0 && (e(""), N(0)), q.onBlur?.(E);
2060
- }, K = (E) => {
2061
- h?.(E.target.value), q.onChange?.(E);
2062
- }, Q = () => d || o ? m : p || m;
2063
- return /* @__PURE__ */ u.jsxs("div", { style: { position: "relative" }, children: [
2064
- /* @__PURE__ */ u.jsx(
2065
- ke,
2110
+ }, [P, V]);
2111
+ Z(() => (s && t.length > 0 && !a && O(), () => {
2112
+ x.current && window.clearTimeout(x.current), N.current && window.clearTimeout(N.current);
2113
+ }), [r, a, s, t.length, O]), Z(() => {
2114
+ !n && s && t.length > 0 && !a && O();
2115
+ }, [r, n, s, t.length, a, O]);
2116
+ const G = (w) => {
2117
+ A(!0), x.current && window.clearTimeout(x.current), N.current && window.clearTimeout(N.current), S(!1), g(!1), C.onFocus?.(w);
2118
+ }, M = (w) => {
2119
+ A(!1), !i && t.length > 0 && (e(""), q(0)), C.onBlur?.(w);
2120
+ }, Y = (w) => {
2121
+ m?.(w.target.value), C.onChange?.(w);
2122
+ }, te = () => a || i ? p : h || p;
2123
+ return /* @__PURE__ */ d.jsxs("div", { style: { position: "relative" }, children: [
2124
+ /* @__PURE__ */ d.jsx(
2125
+ qe,
2066
2126
  {
2067
- ...q,
2068
- value: o,
2069
- onChange: K,
2070
- onFocus: H,
2071
- onBlur: G,
2072
- placeholder: Q(),
2127
+ ...C,
2128
+ value: i,
2129
+ onChange: Y,
2130
+ onFocus: G,
2131
+ onBlur: M,
2132
+ placeholder: te(),
2073
2133
  style: {
2074
2134
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2075
- ...q.style,
2135
+ ...C.style,
2076
2136
  position: "relative",
2077
2137
  zIndex: 1
2078
2138
  }
2079
2139
  }
2080
2140
  ),
2081
- !d && !o && p && /* @__PURE__ */ u.jsxs(
2141
+ !a && !i && h && /* @__PURE__ */ d.jsxs(
2082
2142
  "div",
2083
2143
  {
2084
2144
  style: {
@@ -2098,8 +2158,8 @@ const dt = ({
2098
2158
  fontFamily: "inherit"
2099
2159
  },
2100
2160
  children: [
2101
- /* @__PURE__ */ u.jsx("span", { children: p }),
2102
- v && /* @__PURE__ */ u.jsx(
2161
+ /* @__PURE__ */ d.jsx("span", { children: h }),
2162
+ T && /* @__PURE__ */ d.jsx(
2103
2163
  "span",
2104
2164
  {
2105
2165
  style: {
@@ -2115,7 +2175,7 @@ const dt = ({
2115
2175
  ]
2116
2176
  }
2117
2177
  ),
2118
- /* @__PURE__ */ u.jsx("style", { children: `
2178
+ /* @__PURE__ */ d.jsx("style", { children: `
2119
2179
  @keyframes blink {
2120
2180
  0%, 50% { opacity: 1; }
2121
2181
  51%, 100% { opacity: 0; }
@@ -2123,7 +2183,7 @@ const dt = ({
2123
2183
  ` })
2124
2184
  ] });
2125
2185
  };
2126
- dt.__docgenInfo = {
2186
+ yt.__docgenInfo = {
2127
2187
  displayName: "DynamicInput",
2128
2188
  description: "动态文案输入框组件,支持流式文字动画效果",
2129
2189
  props: {
@@ -2168,109 +2228,109 @@ dt.__docgenInfo = {
2168
2228
  }
2169
2229
  }
2170
2230
  };
2171
- const pt = ({
2172
- texts: n = [],
2231
+ const ht = ({
2232
+ texts: t = [],
2173
2233
  // 动态文案数组,默认为空数组
2174
- placeholder: m = "请输入内容",
2234
+ placeholder: p = "请输入内容",
2175
2235
  // 占位符文本
2176
- animationSpeed: c = 100,
2236
+ animationSpeed: u = 100,
2177
2237
  // 打字机动画速度,毫秒
2178
- autoPlay: a = !0,
2238
+ autoPlay: s = !0,
2179
2239
  // 是否自动播放动画
2180
- value: o = "",
2240
+ value: i = "",
2181
2241
  // 受控模式的值
2182
- onChange: h,
2242
+ onChange: m,
2183
2243
  // 受控模式的变化回调
2184
- onSubmit: q,
2244
+ onSubmit: C,
2185
2245
  // 提交回调
2186
- maxLength: p = 500,
2246
+ maxLength: h = 500,
2187
2247
  // 最大字符数限制
2188
2248
  showCount: e = !0,
2189
2249
  // 是否显示字数统计
2190
- submitText: t = "发送",
2250
+ submitText: r = "发送",
2191
2251
  // 提交按钮文本
2192
- disabled: N = !1,
2252
+ disabled: q = !1,
2193
2253
  // 是否禁用组件
2194
- rows: s = 4,
2254
+ rows: n = 4,
2195
2255
  // 文本域行数
2196
- style: k,
2256
+ style: S,
2197
2257
  // 自定义样式
2198
- ...d
2258
+ ...a
2199
2259
  // 其他原生属性
2200
2260
  }) => {
2201
- const [R, v] = z(""), [x, w] = z(0), [A, $] = z(!1), [S, C] = z(!1), [O, I] = z(!1), [D, P] = z(o || ""), H = W(void 0), G = W(void 0), K = W(n), Q = W(x), E = W(S), _ = W(R), F = W(null);
2202
- J(() => {
2203
- K.current = n, Q.current = x, E.current = S, _.current = R;
2261
+ const [A, T] = z(""), [g, x] = z(0), [N, v] = z(!1), [k, $] = z(!1), [L, V] = z(!1), [P, O] = z(i || ""), G = K(void 0), M = K(void 0), Y = K(t), te = K(g), w = K(k), _ = K(A), W = K(null);
2262
+ Z(() => {
2263
+ Y.current = t, te.current = g, w.current = k, _.current = A;
2204
2264
  });
2205
- const X = B((f, b) => {
2206
- let V = 0;
2207
- I(!0);
2208
- const j = () => {
2209
- V < f.length ? (v(f.slice(0, V + 1)), V++, G.current = window.setTimeout(j, c)) : (I(!1), b?.());
2265
+ const U = F((o, y) => {
2266
+ let b = 0;
2267
+ V(!0);
2268
+ const E = () => {
2269
+ b < o.length ? (T(o.slice(0, b + 1)), b++, M.current = window.setTimeout(E, u)) : (V(!1), y?.());
2210
2270
  };
2211
- j();
2212
- }, [c]), ne = B((f) => {
2213
- let b = _.current.length;
2214
- const V = () => {
2215
- b > 0 ? (v(_.current.slice(0, b - 1)), b--, G.current = window.setTimeout(V, c / 2)) : f?.();
2271
+ E();
2272
+ }, [u]), se = F((o) => {
2273
+ let y = _.current.length;
2274
+ const b = () => {
2275
+ y > 0 ? (T(_.current.slice(0, y - 1)), y--, M.current = window.setTimeout(b, u / 2)) : o?.();
2216
2276
  };
2217
- V();
2218
- }, [c]), re = B(() => {
2219
- if (K.current.length === 0 || E.current) return;
2220
- $(!0);
2221
- const f = K.current[Q.current];
2222
- _.current ? ne(() => {
2223
- X(f, () => {
2224
- H.current = window.setTimeout(() => {
2225
- w((b) => (b + 1) % K.current.length), $(!1);
2277
+ b();
2278
+ }, [u]), le = F(() => {
2279
+ if (Y.current.length === 0 || w.current) return;
2280
+ v(!0);
2281
+ const o = Y.current[te.current];
2282
+ _.current ? se(() => {
2283
+ U(o, () => {
2284
+ G.current = window.setTimeout(() => {
2285
+ x((y) => (y + 1) % Y.current.length), v(!1);
2226
2286
  }, 2e3);
2227
2287
  });
2228
- }) : X(f, () => {
2229
- H.current = window.setTimeout(() => {
2230
- w((b) => (b + 1) % K.current.length), $(!1);
2288
+ }) : U(o, () => {
2289
+ G.current = window.setTimeout(() => {
2290
+ x((y) => (y + 1) % Y.current.length), v(!1);
2231
2291
  }, 2e3);
2232
2292
  });
2233
- }, [ne, X]);
2234
- J(() => (a && n.length > 0 && !S && re(), () => {
2235
- H.current && window.clearTimeout(H.current), G.current && window.clearTimeout(G.current);
2236
- }), [x, S, a, n.length, re]), J(() => {
2237
- !A && a && n.length > 0 && !S && re();
2238
- }, [x, A, a, n.length, S, re]);
2239
- const l = (f) => {
2240
- C(!0), H.current && window.clearTimeout(H.current), G.current && window.clearTimeout(G.current), $(!1), I(!1), d.onFocus?.(f);
2241
- }, r = (f) => {
2242
- C(!1), !o && n.length > 0 && (v(""), w(0)), d.onBlur?.(f);
2243
- }, i = (f) => {
2244
- const b = f.target.value;
2245
- p && b.length > p || (h ? h(b) : P(b), d.onChange?.(f));
2246
- }, y = () => {
2247
- const f = h ? o : D;
2248
- f.trim() && !N && (q?.(f), h || P(""));
2249
- }, T = (f) => {
2250
- (f.ctrlKey || f.metaKey) && f.key === "Enter" && (f.preventDefault(), y()), d.onKeyDown?.(f);
2251
- }, g = h ? o : D, L = N || !g.trim() || (p ? g.length > p : !1);
2252
- return /* @__PURE__ */ u.jsxs("div", { style: { position: "relative", ...k }, children: [
2253
- /* @__PURE__ */ u.jsxs("div", { style: { position: "relative" }, children: [
2254
- /* @__PURE__ */ u.jsx(
2293
+ }, [se, U]);
2294
+ Z(() => (s && t.length > 0 && !k && le(), () => {
2295
+ G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current);
2296
+ }), [g, k, s, t.length, le]), Z(() => {
2297
+ !N && s && t.length > 0 && !k && le();
2298
+ }, [g, N, s, t.length, k, le]);
2299
+ const l = (o) => {
2300
+ $(!0), G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current), v(!1), V(!1), a.onFocus?.(o);
2301
+ }, j = (o) => {
2302
+ $(!1), !i && t.length > 0 && (T(""), x(0)), a.onBlur?.(o);
2303
+ }, B = (o) => {
2304
+ const y = o.target.value;
2305
+ h && y.length > h || (m ? m(y) : O(y), a.onChange?.(o));
2306
+ }, J = () => {
2307
+ const o = m ? i : P;
2308
+ o.trim() && !q && (C?.(o), m || O(""));
2309
+ }, oe = (o) => {
2310
+ (o.ctrlKey || o.metaKey) && o.key === "Enter" && (o.preventDefault(), J()), a.onKeyDown?.(o);
2311
+ }, c = m ? i : P, f = q || !c.trim() || (h ? c.length > h : !1);
2312
+ return /* @__PURE__ */ d.jsxs("div", { style: { position: "relative", ...S }, children: [
2313
+ /* @__PURE__ */ d.jsxs("div", { style: { position: "relative" }, children: [
2314
+ /* @__PURE__ */ d.jsx(
2255
2315
  "textarea",
2256
2316
  {
2257
- ref: F,
2258
- value: h ? o : D,
2259
- onChange: i,
2260
- onFocus: (f) => {
2261
- f.target.style.borderColor = "#1890ff", f.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", l(f);
2317
+ ref: W,
2318
+ value: m ? i : P,
2319
+ onChange: B,
2320
+ onFocus: (o) => {
2321
+ o.target.style.borderColor = "#1890ff", o.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", l(o);
2262
2322
  },
2263
- onBlur: (f) => {
2264
- f.target.style.borderColor = "#d9d9d9", f.target.style.boxShadow = "none", r(f);
2323
+ onBlur: (o) => {
2324
+ o.target.style.borderColor = "#d9d9d9", o.target.style.boxShadow = "none", j(o);
2265
2325
  },
2266
- onKeyDown: T,
2267
- placeholder: S || g ? m : "",
2268
- maxLength: p,
2269
- rows: s,
2270
- disabled: N,
2326
+ onKeyDown: oe,
2327
+ placeholder: k || c ? p : "",
2328
+ maxLength: h,
2329
+ rows: n,
2330
+ disabled: q,
2271
2331
  style: {
2272
2332
  width: "100%",
2273
- minHeight: `${s * 24 + 16}px`,
2333
+ minHeight: `${n * 24 + 16}px`,
2274
2334
  padding: "8px 60px 8px 12px",
2275
2335
  // 右侧留出按钮空间
2276
2336
  border: "1px solid #d9d9d9",
@@ -2283,12 +2343,12 @@ const pt = ({
2283
2343
  transition: "border-color 0.3s, box-shadow 0.3s",
2284
2344
  backgroundColor: "#fff",
2285
2345
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2286
- ...d.style
2346
+ ...a.style
2287
2347
  },
2288
- ...d
2348
+ ...a
2289
2349
  }
2290
2350
  ),
2291
- !S && !g && R && /* @__PURE__ */ u.jsxs(
2351
+ !k && !c && A && /* @__PURE__ */ d.jsxs(
2292
2352
  "div",
2293
2353
  {
2294
2354
  style: {
@@ -2310,8 +2370,8 @@ const pt = ({
2310
2370
  lineHeight: "1.5"
2311
2371
  },
2312
2372
  children: [
2313
- /* @__PURE__ */ u.jsx("span", { children: R }),
2314
- O && /* @__PURE__ */ u.jsx(
2373
+ /* @__PURE__ */ d.jsx("span", { children: A }),
2374
+ L && /* @__PURE__ */ d.jsx(
2315
2375
  "span",
2316
2376
  {
2317
2377
  style: {
@@ -2327,7 +2387,7 @@ const pt = ({
2327
2387
  ]
2328
2388
  }
2329
2389
  ),
2330
- /* @__PURE__ */ u.jsx(
2390
+ /* @__PURE__ */ d.jsx(
2331
2391
  "div",
2332
2392
  {
2333
2393
  style: {
@@ -2336,14 +2396,14 @@ const pt = ({
2336
2396
  right: 8,
2337
2397
  zIndex: 3
2338
2398
  },
2339
- children: /* @__PURE__ */ u.jsx(
2340
- le,
2399
+ children: /* @__PURE__ */ d.jsx(
2400
+ de,
2341
2401
  {
2342
2402
  type: "primary",
2343
2403
  size: "small",
2344
- icon: /* @__PURE__ */ u.jsx(Pe, {}),
2345
- onClick: y,
2346
- disabled: L,
2404
+ icon: /* @__PURE__ */ d.jsx(Ge, {}),
2405
+ onClick: J,
2406
+ disabled: f,
2347
2407
  style: {
2348
2408
  borderRadius: 6,
2349
2409
  minWidth: 32,
@@ -2352,13 +2412,13 @@ const pt = ({
2352
2412
  alignItems: "center",
2353
2413
  justifyContent: "center"
2354
2414
  },
2355
- children: t
2415
+ children: r
2356
2416
  }
2357
2417
  )
2358
2418
  }
2359
2419
  )
2360
2420
  ] }),
2361
- e && /* @__PURE__ */ u.jsxs(
2421
+ e && /* @__PURE__ */ d.jsxs(
2362
2422
  "div",
2363
2423
  {
2364
2424
  style: {
@@ -2368,13 +2428,13 @@ const pt = ({
2368
2428
  color: "#999"
2369
2429
  },
2370
2430
  children: [
2371
- g.length,
2431
+ c.length,
2372
2432
  "/",
2373
- p
2433
+ h
2374
2434
  ]
2375
2435
  }
2376
2436
  ),
2377
- /* @__PURE__ */ u.jsx("style", { children: `
2437
+ /* @__PURE__ */ d.jsx("style", { children: `
2378
2438
  @keyframes blink {
2379
2439
  0%, 50% { opacity: 1; }
2380
2440
  51%, 100% { opacity: 0; }
@@ -2382,7 +2442,7 @@ const pt = ({
2382
2442
  ` })
2383
2443
  ] });
2384
2444
  };
2385
- pt.__docgenInfo = {
2445
+ ht.__docgenInfo = {
2386
2446
  displayName: "DynamicTextArea",
2387
2447
  description: "动态文案文本域组件,支持流式文字动画效果",
2388
2448
  props: {
@@ -2468,96 +2528,96 @@ pt.__docgenInfo = {
2468
2528
  }
2469
2529
  }
2470
2530
  };
2471
- const Te = ({
2472
- src: n,
2473
- poster: m,
2474
- width: c = 300,
2475
- height: a,
2476
- videoWidth: o,
2531
+ const Se = ({
2532
+ src: t,
2533
+ poster: p,
2534
+ width: u = 300,
2535
+ height: s,
2536
+ videoWidth: i,
2477
2537
  // 参数保留但不使用,由CSS控制
2478
- videoHeight: h,
2538
+ videoHeight: m,
2479
2539
  // 参数保留但不使用,由CSS控制
2480
- showPlayButton: q = !0,
2481
- autoPlayOnHover: p = !0,
2540
+ showPlayButton: C = !0,
2541
+ autoPlayOnHover: h = !0,
2482
2542
  onClick: e,
2483
- onVideoLoaded: t,
2484
- onVideoPlay: N,
2485
- onVideoPause: s,
2486
- onVideoEnded: k,
2487
- className: d,
2488
- style: R,
2489
- ...v
2543
+ onVideoLoaded: r,
2544
+ onVideoPlay: q,
2545
+ onVideoPause: n,
2546
+ onVideoEnded: S,
2547
+ className: a,
2548
+ style: A,
2549
+ ...T
2490
2550
  }) => {
2491
- const x = W(null), [w, A] = z(!1), [$, S] = z(!1), [C, O] = z(!1), I = B(() => {
2492
- x.current && (x.current.play(), A(!0), N?.());
2493
- }, [N]), D = B(() => {
2494
- x.current && (x.current.pause(), A(!1), s?.());
2495
- }, [s]), P = B((X) => {
2496
- X.stopPropagation(), w ? D() : I();
2497
- }, [w, I, D]), H = B(() => {
2498
- S(!0), p && !w && I();
2499
- }, [p, w, I]), G = B(() => {
2500
- S(!1), p && w && D();
2501
- }, [p, w, D]), K = B(() => {
2502
- O(!0), t?.();
2503
- }, [t]), Q = B(() => {
2504
- A(!0), N?.();
2505
- }, [N]), E = B(() => {
2506
- A(!1), s?.();
2507
- }, [s]), _ = B(() => {
2508
- A(!1), k?.();
2509
- }, [k]), F = B((X) => {
2510
- e?.(X);
2551
+ const g = K(null), [x, N] = z(!1), [v, k] = z(!1), [$, L] = z(!1), V = F(() => {
2552
+ g.current && (g.current.play(), N(!0), q?.());
2553
+ }, [q]), P = F(() => {
2554
+ g.current && (g.current.pause(), N(!1), n?.());
2555
+ }, [n]), O = F((U) => {
2556
+ U.stopPropagation(), x ? P() : V();
2557
+ }, [x, V, P]), G = F(() => {
2558
+ k(!0), h && !x && V();
2559
+ }, [h, x, V]), M = F(() => {
2560
+ k(!1), h && x && P();
2561
+ }, [h, x, P]), Y = F(() => {
2562
+ L(!0), r?.();
2563
+ }, [r]), te = F(() => {
2564
+ N(!0), q?.();
2565
+ }, [q]), w = F(() => {
2566
+ N(!1), n?.();
2567
+ }, [n]), _ = F(() => {
2568
+ N(!1), S?.();
2569
+ }, [S]), W = F((U) => {
2570
+ e?.(U);
2511
2571
  }, [e]);
2512
- return /* @__PURE__ */ u.jsx(
2513
- he,
2572
+ return /* @__PURE__ */ d.jsx(
2573
+ ve,
2514
2574
  {
2515
- ...v,
2516
- className: `video-card ${d || ""}`,
2575
+ ...T,
2576
+ className: `video-card ${a || ""}`,
2517
2577
  style: {
2518
- width: c,
2519
- height: a,
2578
+ width: u,
2579
+ height: s,
2520
2580
  padding: 0,
2521
2581
  overflow: "hidden",
2522
2582
  cursor: e ? "pointer" : "default",
2523
2583
  border: "none",
2524
2584
  borderRadius: 0,
2525
- ...R
2585
+ ...A
2526
2586
  },
2527
2587
  bordered: !1,
2528
- onMouseEnter: H,
2529
- onMouseLeave: G,
2530
- onClick: F,
2531
- children: /* @__PURE__ */ u.jsxs("div", { className: "video-card-container", children: [
2532
- /* @__PURE__ */ u.jsx(
2588
+ onMouseEnter: G,
2589
+ onMouseLeave: M,
2590
+ onClick: W,
2591
+ children: /* @__PURE__ */ d.jsxs("div", { className: "video-card-container", children: [
2592
+ /* @__PURE__ */ d.jsx(
2533
2593
  "video",
2534
2594
  {
2535
- ref: x,
2536
- src: n,
2537
- poster: m,
2595
+ ref: g,
2596
+ src: t,
2597
+ poster: p,
2538
2598
  preload: "metadata",
2539
- onLoadedData: K,
2540
- onPlay: Q,
2541
- onPause: E,
2599
+ onLoadedData: Y,
2600
+ onPlay: te,
2601
+ onPause: w,
2542
2602
  onEnded: _,
2543
2603
  muted: !0,
2544
2604
  loop: !0
2545
2605
  }
2546
2606
  ),
2547
- q && /* @__PURE__ */ u.jsx(
2607
+ C && /* @__PURE__ */ d.jsx(
2548
2608
  "div",
2549
2609
  {
2550
- className: `video-play-button ${$ ? "hovered" : ""}`,
2551
- onClick: P,
2552
- children: w ? /* @__PURE__ */ u.jsx(Me, { className: "play-icon" }) : /* @__PURE__ */ u.jsx(De, { className: "play-icon" })
2610
+ className: `video-play-button ${v ? "hovered" : ""}`,
2611
+ onClick: O,
2612
+ children: x ? /* @__PURE__ */ d.jsx(Fe, { className: "play-icon" }) : /* @__PURE__ */ d.jsx(ze, { className: "play-icon" })
2553
2613
  }
2554
2614
  ),
2555
- !C && /* @__PURE__ */ u.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ u.jsx("div", { className: "loading-spinner" }) })
2615
+ !$ && /* @__PURE__ */ d.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ d.jsx("div", { className: "loading-spinner" }) })
2556
2616
  ] })
2557
2617
  }
2558
2618
  );
2559
2619
  };
2560
- Te.__docgenInfo = {
2620
+ Se.__docgenInfo = {
2561
2621
  displayName: "VideoCard",
2562
2622
  description: "视频卡片组件,支持鼠标悬浮播放控制",
2563
2623
  props: {
@@ -2658,12 +2718,12 @@ Te.__docgenInfo = {
2658
2718
  }
2659
2719
  }
2660
2720
  };
2661
- const ft = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((c) => n.toLowerCase().includes(c)), mt = (n) => n.type ? n.type : ft(n.url) ? "video" : "image", yt = ({
2662
- items: n,
2663
- columns: m,
2664
- gap: c = 0,
2665
- responsive: a = !0,
2666
- breakpoints: o = {
2721
+ const gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((u) => t.toLowerCase().includes(u)), bt = (t) => t.type ? t.type : gt(t.url) ? "video" : "image", xt = ({
2722
+ items: t,
2723
+ columns: p,
2724
+ gap: u = 0,
2725
+ responsive: s = !0,
2726
+ breakpoints: i = {
2667
2727
  xs: 1,
2668
2728
  sm: 2,
2669
2729
  md: 3,
@@ -2671,108 +2731,108 @@ const ft = (n) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
2671
2731
  xl: 5,
2672
2732
  xxl: 6
2673
2733
  },
2674
- className: h,
2675
- style: q,
2676
- onClick: p
2734
+ className: m,
2735
+ style: C,
2736
+ onClick: h
2677
2737
  }) => {
2678
- const e = W(null), [t, N] = z(m || o.md || 3), s = W(/* @__PURE__ */ new Map()), k = B(() => {
2679
- if (!a || m)
2680
- return m || o.md || 3;
2681
- const x = window.innerWidth;
2682
- return x < 576 ? o.xs || 1 : x < 768 ? o.sm || 2 : x < 992 ? o.md || 3 : x < 1200 ? o.lg || 4 : x < 1600 ? o.xl || 5 : o.xxl || 6;
2683
- }, [a, m, o]), d = B(() => {
2738
+ const e = K(null), [r, q] = z(p || i.md || 3), n = K(/* @__PURE__ */ new Map()), S = F(() => {
2739
+ if (!s || p)
2740
+ return p || i.md || 3;
2741
+ const g = window.innerWidth;
2742
+ return g < 576 ? i.xs || 1 : g < 768 ? i.sm || 2 : g < 992 ? i.md || 3 : g < 1200 ? i.lg || 4 : g < 1600 ? i.xl || 5 : i.xxl || 6;
2743
+ }, [s, p, i]), a = F(() => {
2684
2744
  if (!e.current) return;
2685
- const x = t, w = e.current, $ = (w.offsetWidth - c * (x - 1)) / x, S = new Array(x).fill(0);
2686
- n.forEach((O, I) => {
2687
- const D = O.id || I, P = s.current.get(D);
2688
- if (!P) return;
2689
- const H = Math.min(...S), G = S.indexOf(H), K = G * ($ + c), Q = S[G];
2690
- P.style.position = "absolute", P.style.left = `${K}px`, P.style.top = `${Q}px`, P.style.width = `${$}px`, S[G] += P.offsetHeight + c;
2745
+ const g = r, x = e.current, v = (x.offsetWidth - u * (g - 1)) / g, k = new Array(g).fill(0);
2746
+ t.forEach((L, V) => {
2747
+ const P = L.id || V, O = n.current.get(P);
2748
+ if (!O) return;
2749
+ const G = Math.min(...k), M = k.indexOf(G), Y = M * (v + u), te = k[M];
2750
+ O.style.position = "absolute", O.style.left = `${Y}px`, O.style.top = `${te}px`, O.style.width = `${v}px`, k[M] += O.offsetHeight + u;
2691
2751
  });
2692
- const C = Math.max(...S);
2693
- w.style.height = `${C}px`;
2694
- }, [n, t, c]);
2695
- J(() => {
2696
- const x = () => {
2697
- const w = k();
2698
- w !== t && N(w);
2752
+ const $ = Math.max(...k);
2753
+ x.style.height = `${$}px`;
2754
+ }, [t, r, u]);
2755
+ Z(() => {
2756
+ const g = () => {
2757
+ const x = S();
2758
+ x !== r && q(x);
2699
2759
  };
2700
- if (a)
2701
- return window.addEventListener("resize", x), x(), () => window.removeEventListener("resize", x);
2702
- }, [a, k, t]), J(() => {
2703
- const x = setTimeout(() => {
2704
- d();
2760
+ if (s)
2761
+ return window.addEventListener("resize", g), g(), () => window.removeEventListener("resize", g);
2762
+ }, [s, S, r]), Z(() => {
2763
+ const g = setTimeout(() => {
2764
+ a();
2705
2765
  }, 100);
2706
- return () => clearTimeout(x);
2707
- }, [n, t, d]);
2708
- const R = B(() => {
2709
- d();
2710
- }, [d]), v = B((x) => {
2711
- p && p(x), x.onClick?.(x);
2712
- }, [p]);
2713
- return /* @__PURE__ */ u.jsx(
2766
+ return () => clearTimeout(g);
2767
+ }, [t, r, a]);
2768
+ const A = F(() => {
2769
+ a();
2770
+ }, [a]), T = F((g) => {
2771
+ h && h(g), g.onClick?.(g);
2772
+ }, [h]);
2773
+ return /* @__PURE__ */ d.jsx(
2714
2774
  "div",
2715
2775
  {
2716
2776
  ref: e,
2717
- className: `waterfall-container ${h || ""}`,
2777
+ className: `waterfall-container ${m || ""}`,
2718
2778
  style: {
2719
2779
  position: "relative",
2720
2780
  width: "100%",
2721
- ...q
2781
+ ...C
2722
2782
  },
2723
- children: n.map((x, w) => {
2724
- const A = x.id || w, $ = mt(x);
2725
- return /* @__PURE__ */ u.jsx(
2783
+ children: t.map((g, x) => {
2784
+ const N = g.id || x, v = bt(g);
2785
+ return /* @__PURE__ */ d.jsx(
2726
2786
  "div",
2727
2787
  {
2728
- ref: (S) => {
2729
- S ? s.current.set(A, S) : s.current.delete(A);
2788
+ ref: (k) => {
2789
+ k ? n.current.set(N, k) : n.current.delete(N);
2730
2790
  },
2731
2791
  className: "waterfall-item",
2732
- children: $ === "video" ? /* @__PURE__ */ u.jsx("div", { style: {
2792
+ children: v === "video" ? /* @__PURE__ */ d.jsx("div", { style: {
2733
2793
  width: "100%",
2734
2794
  position: "relative",
2735
2795
  paddingBottom: "56.25%",
2736
- cursor: p || x.onClick ? "pointer" : "default"
2737
- }, children: /* @__PURE__ */ u.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ u.jsx(
2738
- Te,
2796
+ cursor: h || g.onClick ? "pointer" : "default"
2797
+ }, children: /* @__PURE__ */ d.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ d.jsx(
2798
+ Se,
2739
2799
  {
2740
- src: x.url,
2741
- poster: x.poster,
2800
+ src: g.url,
2801
+ poster: g.poster,
2742
2802
  width: "100%",
2743
2803
  height: "100%",
2744
- onClick: () => v(x),
2745
- onVideoLoaded: R,
2804
+ onClick: () => T(g),
2805
+ onVideoLoaded: A,
2746
2806
  autoPlayOnHover: !0,
2747
2807
  showPlayButton: !1
2748
2808
  }
2749
- ) }) }) : /* @__PURE__ */ u.jsx(
2809
+ ) }) }) : /* @__PURE__ */ d.jsx(
2750
2810
  "div",
2751
2811
  {
2752
2812
  className: "waterfall-image-wrapper",
2753
- onClick: () => v(x),
2754
- style: { cursor: p || x.onClick ? "pointer" : "default" },
2755
- children: /* @__PURE__ */ u.jsx(
2813
+ onClick: () => T(g),
2814
+ style: { cursor: h || g.onClick ? "pointer" : "default" },
2815
+ children: /* @__PURE__ */ d.jsx(
2756
2816
  "img",
2757
2817
  {
2758
- src: x.url,
2759
- alt: `瀑布流图片 ${w + 1}`,
2818
+ src: g.url,
2819
+ alt: `瀑布流图片 ${x + 1}`,
2760
2820
  className: "waterfall-image",
2761
- onLoad: R,
2762
- onError: R,
2821
+ onLoad: A,
2822
+ onError: A,
2763
2823
  style: { display: "block", width: "100%", height: "auto" }
2764
2824
  }
2765
2825
  )
2766
2826
  }
2767
2827
  )
2768
2828
  },
2769
- A
2829
+ N
2770
2830
  );
2771
2831
  })
2772
2832
  }
2773
2833
  );
2774
2834
  };
2775
- yt.__docgenInfo = {
2835
+ xt.__docgenInfo = {
2776
2836
  displayName: "Waterfall",
2777
2837
  description: "瀑布流布局组件,支持图片和视频混合展示",
2778
2838
  props: {
@@ -2828,8 +2888,8 @@ yt.__docgenInfo = {
2828
2888
  }
2829
2889
  }
2830
2890
  };
2831
- const vt = {
2832
- algorithm: je.defaultAlgorithm,
2891
+ const Tt = {
2892
+ algorithm: Oe.defaultAlgorithm,
2833
2893
  token: {
2834
2894
  // 主色
2835
2895
  colorPrimary: "#3b82f6",
@@ -2895,20 +2955,20 @@ const vt = {
2895
2955
  }
2896
2956
  };
2897
2957
  export {
2898
- tt as AdvancedTable,
2899
- Ke as AppModal,
2900
- Qe as BackButton,
2901
- He as Button,
2902
- We as Card,
2903
- dt as DynamicInput,
2904
- pt as DynamicTextArea,
2905
- Je as EmptyAndSpin,
2906
- Ze as LinkButton,
2907
- Xe as PageTable,
2908
- ut as RichTextEditor,
2909
- Te as VideoCard,
2910
- yt as Waterfall,
2911
- Ue as XcIcon,
2912
- vt as lightTheme
2958
+ ot as AdvancedTable,
2959
+ Je as AppModal,
2960
+ nt as BackButton,
2961
+ Ye as Button,
2962
+ Ue as Card,
2963
+ yt as DynamicInput,
2964
+ ht as DynamicTextArea,
2965
+ tt as EmptyAndSpin,
2966
+ rt as LinkButton,
2967
+ Qe as PageTable,
2968
+ mt as RichTextEditor,
2969
+ Se as VideoCard,
2970
+ xt as Waterfall,
2971
+ et as XcIcon,
2972
+ Tt as lightTheme
2913
2973
  };
2914
2974
  //# sourceMappingURL=index.es.js.map