@mxmweb/zui-components 1.2.5 → 1.2.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.
Files changed (2) hide show
  1. package/index.js +849 -841
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { jsxs as O, jsx as o, Fragment as na } from "react/jsx-runtime";
1
+ import { jsxs as L, jsx as o, Fragment as na } from "react/jsx-runtime";
2
2
  import me, { useState as ie, useMemo as Se, useEffect as we, useRef as Te, useCallback as he } from "react";
3
3
  import J, { createGlobalStyle as pa } from "styled-components";
4
4
  import { useTheme as Fe, deepMergeTheme as $e, defaultTheme as B } from "@mxmweb/zui-theme";
5
5
  import zr from "animejs/lib/anime.es.js";
6
- import { CircleHelp as oa, Trash as fa, File as ke, AlertCircle as _r, Upload as ma, ChevronDown as ba, ChevronRight as ga, Search as xa, CircleX as ya } from "lucide-react";
7
- import { Form as K, Input as fe, Select as tr, InputNumber as nr, Slider as Ar, Switch as Br, DatePicker as or, Radio as Wr, Checkbox as Rr, TimePicker as qr, Tooltip as cr, Button as Lr, Tag as $a } from "antd";
6
+ import { CircleHelp as oa, Trash as fa, File as ke, AlertCircle as Ar, Upload as ma, ChevronDown as ba, ChevronRight as ga, Search as xa, CircleX as ya } from "lucide-react";
7
+ import { Form as K, Input as fe, Select as tr, InputNumber as nr, Slider as _r, Switch as Br, DatePicker as or, Radio as Wr, Checkbox as Rr, TimePicker as qr, Tooltip as cr, Button as Lr, Tag as $a } from "antd";
8
8
  import { Button as er, DropdownMenu as va, SharedPagination as wa } from "@mxmweb/zui-elements";
9
9
  const ka = J.div`
10
10
  background-color: #ffffff;
@@ -47,38 +47,38 @@ const ka = J.div`
47
47
  style: f,
48
48
  styles: N
49
49
  }) => {
50
- const M = Fe(), C = $e(
50
+ const F = Fe(), M = $e(
51
51
  // 基础:默认主题 + useTheme的配置
52
- $e({ theme: B, mode: "light" }, M),
52
+ $e({ theme: B, mode: "light" }, F),
53
53
  // 最高层:用户手动传入的styles
54
54
  N
55
55
  );
56
56
  Sa();
57
- const [W, l] = ie(t), _ = typeof s == "boolean" ? s : W, U = (v) => {
58
- typeof s == "boolean" || l(v), h == null || h(v);
59
- }, [ae, te] = ie(!1), a = (v) => v ? typeof v == "string" ? /* @__PURE__ */ o("img", { src: v, className: "w-6 h-6 transition-all duration-200", alt: "nav" }) : v : null, T = Se(() => ({
60
- width: _ ? "60px" : "20px",
61
- minWidth: _ ? "60px" : "20px",
57
+ const [O, l] = ie(t), $ = typeof s == "boolean" ? s : O, H = (w) => {
58
+ typeof s == "boolean" || l(w), h == null || h(w);
59
+ }, [P, te] = ie(!1), a = (w) => w ? typeof w == "string" ? /* @__PURE__ */ o("img", { src: w, className: "w-6 h-6 transition-all duration-200", alt: "nav" }) : w : null, T = Se(() => ({
60
+ width: $ ? "60px" : "20px",
61
+ minWidth: $ ? "60px" : "20px",
62
62
  transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"
63
- }), [_]);
64
- return /* @__PURE__ */ O(ka, { $theme: C.theme || B, className: `relative ${d || ""}`, style: { ...T, ...f }, children: [
63
+ }), [$]);
64
+ return /* @__PURE__ */ L(ka, { $theme: M.theme || B, className: `relative ${d || ""}`, style: { ...T, ...f }, children: [
65
65
  /* @__PURE__ */ o(
66
66
  "div",
67
67
  {
68
68
  onMouseEnter: () => te(!0),
69
69
  onMouseLeave: () => te(!1),
70
70
  className: "absolute top-1/2 -translate-y-1/2 right-1 w-6 h-6 cursor-pointer z-20 transition-all duration-300",
71
- onClick: () => U(!_),
72
- "aria-label": _ ? "收起" : "展开",
71
+ onClick: () => H(!$),
72
+ "aria-label": $ ? "收起" : "展开",
73
73
  role: "button",
74
- children: /* @__PURE__ */ o("div", { className: "group flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200", children: /* @__PURE__ */ O("div", { className: "relative w-4 h-4 flex items-center justify-center", children: [
75
- /* @__PURE__ */ o("div", { className: `absolute w-[2px] h-3 bg-gray-400 rounded-full transition-all duration-300 ${ae ? "opacity-0 scale-0" : "opacity-100 scale-100"}` }),
74
+ children: /* @__PURE__ */ o("div", { className: "group flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200", children: /* @__PURE__ */ L("div", { className: "relative w-4 h-4 flex items-center justify-center", children: [
75
+ /* @__PURE__ */ o("div", { className: `absolute w-[2px] h-3 bg-gray-400 rounded-full transition-all duration-300 ${P ? "opacity-0 scale-0" : "opacity-100 scale-100"}` }),
76
76
  /* @__PURE__ */ o(
77
77
  "svg",
78
78
  {
79
79
  viewBox: "0 0 24 24",
80
80
  fill: "none",
81
- className: `absolute w-4 h-4 stroke-gray-400 transition-all duration-300 ${ae ? "opacity-100 scale-100" : "opacity-0 scale-0"} ${_ ? "rotate-0" : "rotate-180"}`,
81
+ className: `absolute w-4 h-4 stroke-gray-400 transition-all duration-300 ${P ? "opacity-100 scale-100" : "opacity-0 scale-0"} ${$ ? "rotate-0" : "rotate-180"}`,
82
82
  strokeWidth: "2",
83
83
  strokeLinecap: "round",
84
84
  strokeLinejoin: "round",
@@ -88,33 +88,33 @@ const ka = J.div`
88
88
  ] }) })
89
89
  }
90
90
  ),
91
- /* @__PURE__ */ O(
91
+ /* @__PURE__ */ L(
92
92
  "div",
93
93
  {
94
94
  className: "h-full py-6 px-[2px] flex flex-col items-center",
95
95
  style: {
96
- opacity: _ ? 1 : 0,
97
- transform: _ ? "translateX(0)" : "translateX(-10px)",
96
+ opacity: $ ? 1 : 0,
97
+ transform: $ ? "translateX(0)" : "translateX(-10px)",
98
98
  transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)"
99
99
  },
100
100
  children: [
101
101
  /* @__PURE__ */ o("div", { className: "mb-6 transition-transform duration-300 hover:scale-105", children: typeof p == "string" ? /* @__PURE__ */ o("img", { src: p, className: "w-7 h-7", alt: "logo" }) : p || /* @__PURE__ */ o("div", { className: "w-7 h-7 rounded bg-gray-100 flex items-center justify-center text-xs text-gray-500", children: "G" }) }),
102
- /* @__PURE__ */ o("div", { className: "w-full gap-y-[2px] mb-10 flex-1 overflow-x-hidden overflow-y-auto scrollbar-none flex flex-col items-center", children: e.map((v) => {
103
- const V = !!(r && v.path && r.startsWith(v.path)), A = V && v.activeIcon ? v.activeIcon : v.icon;
104
- return /* @__PURE__ */ O(
102
+ /* @__PURE__ */ o("div", { className: "w-full gap-y-[2px] mb-10 flex-1 overflow-x-hidden overflow-y-auto scrollbar-none flex flex-col items-center", children: e.map((w) => {
103
+ const V = !!(r && w.path && r.startsWith(w.path)), _ = V && w.activeIcon ? w.activeIcon : w.icon;
104
+ return /* @__PURE__ */ L(
105
105
  "div",
106
106
  {
107
- onClick: () => !v.disabled && (b == null ? void 0 : b(v)),
107
+ onClick: () => !w.disabled && (b == null ? void 0 : b(w)),
108
108
  className: `g-nav-item group relative w-full flex flex-col items-center justify-center py-3 px-2 rounded-lg cursor-pointer transition-all duration-200 ${V ? "active bg-blue-50" : "text-gray-500 hover:bg-gray-50"}`,
109
109
  children: [
110
- /* @__PURE__ */ O("div", { className: "relative g-nav-icon transition-transform duration-200 group-hover:scale-105", children: [
111
- a(A),
112
- v.badge && v.badge > 0 && /* @__PURE__ */ o("span", { className: "absolute -top-1 -right-1 min-w-[16px] h-4 px-1 rounded-full bg-red-500 text-white text-[10px] leading-4 text-center", children: v.badge > 99 ? "99+" : v.badge })
110
+ /* @__PURE__ */ L("div", { className: "relative g-nav-icon transition-transform duration-200 group-hover:scale-105", children: [
111
+ a(_),
112
+ w.badge && w.badge > 0 && /* @__PURE__ */ o("span", { className: "absolute -top-1 -right-1 min-w-[16px] h-4 px-1 rounded-full bg-red-500 text-white text-[10px] leading-4 text-center", children: w.badge > 99 ? "99+" : w.badge })
113
113
  ] }),
114
- /* @__PURE__ */ o("div", { className: "mt-1 text-xs text-center g-nav-text transition-colors duration-200", children: v.name })
114
+ /* @__PURE__ */ o("div", { className: "mt-1 text-xs text-center g-nav-text transition-colors duration-200", children: w.name })
115
115
  ]
116
116
  },
117
- v.key
117
+ w.key
118
118
  );
119
119
  }) })
120
120
  ]
@@ -241,92 +241,92 @@ const ka = J.div`
241
241
  defaultActiveIds: d = [],
242
242
  onItemClick: f,
243
243
  onActiveChange: N,
244
- onActiveChangeMultiple: M,
245
- className: C,
246
- styles: W
244
+ onActiveChangeMultiple: F,
245
+ className: M,
246
+ styles: O
247
247
  }) => {
248
- const l = Fe(), _ = $e(
248
+ const l = Fe(), $ = $e(
249
249
  // 基础:默认主题 + useTheme的配置
250
250
  $e({ theme: B, mode: "light" }, l),
251
251
  // 最高层:用户手动传入的styles
252
- W
253
- ), [U, ae] = ie(null), [te, a] = ie(null), T = () => b === "multiple" ? d || [] : p || (e.length > 0 ? e[0].id : null), [v, V] = ie(
252
+ O
253
+ ), [H, P] = ie(null), [te, a] = ie(null), T = () => b === "multiple" ? d || [] : p || (e.length > 0 ? e[0].id : null), [w, V] = ie(
254
254
  b === "single" ? T() : null
255
- ), [A, E] = ie(
255
+ ), [_, E] = ie(
256
256
  b === "multiple" ? T() : []
257
- ), j = Te(null), Q = Te([]), X = (G) => {
258
- ae(G), a(G);
259
- const S = Q.current[G];
260
- S && zr({
261
- targets: S,
257
+ ), j = Te(null), ee = Te([]), Z = (G) => {
258
+ P(G), a(G);
259
+ const C = ee.current[G];
260
+ C && zr({
261
+ targets: C,
262
262
  scale: s,
263
263
  duration: 200,
264
264
  easing: "easeOutCubic"
265
265
  });
266
- }, R = (G) => {
267
- ae(null), a(null);
268
- const S = Q.current[G];
269
- S && zr({
270
- targets: S,
266
+ }, W = (G) => {
267
+ P(null), a(null);
268
+ const C = ee.current[G];
269
+ C && zr({
270
+ targets: C,
271
271
  scale: 1,
272
272
  duration: 200,
273
273
  easing: "easeOutCubic"
274
274
  });
275
- }, ee = (G, S) => {
275
+ }, re = (G, C) => {
276
276
  if (b === "single")
277
- v !== G.id && (V(G.id), N && N(G.id, G));
277
+ w !== G.id && (V(G.id), N && N(G.id, G));
278
278
  else {
279
- const y = A.includes(G.id) ? A.filter((x) => x !== G.id) : [...A, G.id];
280
- if (E(y), M) {
281
- const x = e.filter((D) => y.includes(D.id));
282
- M(y, x);
279
+ const y = _.includes(G.id) ? _.filter((x) => x !== G.id) : [..._, G.id];
280
+ if (E(y), F) {
281
+ const x = e.filter((z) => y.includes(z.id));
282
+ F(y, x);
283
283
  }
284
284
  }
285
- f && f(G, S), G.onClick && G.onClick();
285
+ f && f(G, C), G.onClick && G.onClick();
286
286
  };
287
287
  return we(() => {
288
- Q.current = Q.current.slice(0, e.length);
288
+ ee.current = ee.current.slice(0, e.length);
289
289
  }, [e.length]), /* @__PURE__ */ o(
290
290
  Na,
291
291
  {
292
292
  ref: j,
293
293
  itemWidth: r,
294
294
  itemGap: h,
295
- theme: _.theme || B,
296
- className: C,
297
- children: e.map((G, S) => /* @__PURE__ */ O(
295
+ theme: $.theme || B,
296
+ className: M,
297
+ children: e.map((G, C) => /* @__PURE__ */ L(
298
298
  Ca,
299
299
  {
300
- ref: (y) => Q.current[S] = y,
300
+ ref: (y) => ee.current[C] = y,
301
301
  itemWidth: r,
302
302
  itemHeight: t,
303
303
  itemGap: h,
304
- isHovered: U === S,
304
+ isHovered: H === C,
305
305
  magnification: s,
306
- onMouseEnter: () => X(S),
307
- onMouseLeave: () => R(S),
308
- onClick: () => ee(G, S),
306
+ onMouseEnter: () => Z(C),
307
+ onMouseLeave: () => W(C),
308
+ onClick: () => re(G, C),
309
309
  children: [
310
310
  /* @__PURE__ */ o(
311
311
  Ma,
312
312
  {
313
313
  src: G.icon,
314
314
  alt: G.label,
315
- isActive: b === "single" ? v === G.id : A.includes(G.id)
315
+ isActive: b === "single" ? w === G.id : _.includes(G.id)
316
316
  }
317
317
  ),
318
318
  /* @__PURE__ */ o(
319
319
  Ta,
320
320
  {
321
- isActive: b === "single" ? v === G.id : A.includes(G.id),
322
- theme: _.theme || B
321
+ isActive: b === "single" ? w === G.id : _.includes(G.id),
322
+ theme: $.theme || B
323
323
  }
324
324
  ),
325
325
  /* @__PURE__ */ o(
326
326
  Fa,
327
327
  {
328
- visible: te === S,
329
- theme: _.theme || B,
328
+ visible: te === C,
329
+ theme: $.theme || B,
330
330
  children: G.label
331
331
  }
332
332
  )
@@ -340,72 +340,80 @@ const ka = J.div`
340
340
  if (e === 0) return "0 B";
341
341
  const r = 1024, t = ["B", "KB", "MB", "GB"], s = Math.floor(Math.log(e) / Math.log(r));
342
342
  return parseFloat((e / Math.pow(r, s)).toFixed(2)) + " " + t[s];
343
- }, Or = () => Math.random().toString(36).substr(2, 9), Da = (e, r) => {
343
+ }, jr = () => Math.random().toString(36).substr(2, 9), Da = (e, r) => {
344
344
  const t = { ...e.formData }, s = ["name", "filename", "title", "displayName", "fileName"], h = ["size", "fileSize", "file_size"], b = ["type", "fileType", "mimeType", "contentType"];
345
345
  return r.forEach((p) => {
346
346
  const d = p.name || p.field;
347
347
  d && (s.includes(d.toLowerCase()) && !t[d] && (t[d] = e.name), h.includes(d.toLowerCase()) && !t[d] && (t[d] = sa(e.size)), b.includes(d.toLowerCase()) && !t[d] && (t[d] = e.type));
348
348
  }), t;
349
349
  }, za = async (e, r, t = {}, s = {}, h) => new Promise((b, p) => {
350
- var C;
351
- const d = new XMLHttpRequest(), f = new URL(r);
352
- if (Object.entries(s).forEach(([W, l]) => {
353
- f.searchParams.append(W, l);
354
- }), (C = t["Content-Type"]) == null ? void 0 : C.includes("application/json")) {
355
- const W = new FileReader();
356
- W.onload = () => {
357
- const l = W.result, _ = JSON.stringify({
358
- file: l.split(",")[1]
350
+ var O;
351
+ const d = new XMLHttpRequest(), f = /^https?:\/\//i.test(r);
352
+ let N;
353
+ if (f) {
354
+ const l = new URL(r);
355
+ Object.entries(s).forEach(([$, H]) => {
356
+ l.searchParams.append($, H);
357
+ }), N = l.toString();
358
+ } else {
359
+ const l = Object.entries(s).map(([$, H]) => `${encodeURIComponent($)}=${encodeURIComponent(H)}`).join("&");
360
+ N = l ? `${r}${r.includes("?") ? "&" : "?"}${l}` : r;
361
+ }
362
+ if ((O = t["Content-Type"]) == null ? void 0 : O.includes("application/json")) {
363
+ const l = new FileReader();
364
+ l.onload = () => {
365
+ const $ = l.result, H = JSON.stringify({
366
+ file: $.split(",")[1]
359
367
  // 移除 data:application/octet-stream;base64, 前缀
360
368
  });
361
- M(_);
362
- }, W.onerror = () => p(new Error("文件读取失败")), W.readAsDataURL(e);
369
+ M(H);
370
+ }, l.onerror = () => p(new Error("文件读取失败")), l.readAsDataURL(e);
363
371
  } else {
364
- const W = new FormData();
365
- W.append("tableFile", e), M(W);
372
+ const l = new FormData();
373
+ l.append("tableFile", e), M(l);
366
374
  }
367
- function M(W) {
368
- d.upload.addEventListener("progress", (l) => {
369
- if (l.lengthComputable) {
370
- const _ = Math.round(l.loaded / l.total * 100);
371
- h == null || h(_);
375
+ function M(l) {
376
+ d.upload.addEventListener("progress", ($) => {
377
+ if ($.lengthComputable) {
378
+ const H = Math.round($.loaded / $.total * 100);
379
+ h == null || h(H);
372
380
  }
373
381
  }), d.addEventListener("load", () => {
374
382
  if (d.status >= 200 && d.status < 300)
375
383
  try {
376
- const l = JSON.parse(d.responseText);
377
- l.data ? b(l.data) : b(d.responseText);
384
+ const $ = JSON.parse(d.responseText);
385
+ $.data ? b($.data) : b(d.responseText);
378
386
  } catch {
379
387
  b(d.responseText);
380
388
  }
381
389
  else {
382
390
  console.log("====xhr.responseText", d.responseText);
383
- let l = "";
391
+ let $ = "";
384
392
  try {
385
- const U = JSON.parse(d.responseText);
386
- U.errorMsg ? l = U.errorMsg : U.message ? l = U.message : U.error ? l = U.error : l = `上传失败: ${d.status} ${d.statusText}`;
393
+ const P = JSON.parse(d.responseText);
394
+ P.errorMsg ? $ = P.errorMsg : P.message ? $ = P.message : P.error ? $ = P.error : $ = `上传失败: ${d.status} ${d.statusText}`;
387
395
  } catch {
388
- l = `上传失败: ${d.status} ${d.statusText}`;
396
+ $ = `上传失败: ${d.status} ${d.statusText}`;
389
397
  }
390
- const _ = new Error(l);
391
- _.response = {
398
+ const H = new Error($);
399
+ H.response = {
392
400
  status: d.status,
393
401
  statusText: d.statusText,
394
402
  data: d.responseText ? JSON.parse(d.responseText) : null,
395
403
  headers: d.getAllResponseHeaders()
396
- }, p(_);
404
+ }, p(H);
397
405
  }
398
406
  }), d.addEventListener("error", () => {
399
- const l = new Error("网络错误,上传失败");
400
- l.request = d, l.type = "network", p(l);
407
+ const $ = new Error("网络错误,上传失败");
408
+ $.request = d, $.type = "network", p($);
401
409
  }), d.addEventListener("timeout", () => {
402
- const l = new Error("请求超时,上传失败");
403
- l.request = d, l.type = "timeout", p(l);
404
- }), d.open("POST", f.toString()), Object.entries(t).forEach(([l, _]) => {
405
- d.setRequestHeader(l, _);
406
- }), d.send(W);
410
+ const $ = new Error("请求超时,上传失败");
411
+ $.request = d, $.type = "timeout", p($);
412
+ }), d.open("POST", N), Object.entries(t).forEach(([$, H]) => {
413
+ d.setRequestHeader($, H);
414
+ }), d.send(l);
407
415
  }
408
- }), _a = J.div`
416
+ }), Aa = J.div`
409
417
  border: 2px dashed ${(e) => {
410
418
  var r, t, s, h;
411
419
  return e.$isDragOver ? ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.primary) || "#007bff" : ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.border) || "#dee2e6";
@@ -436,7 +444,7 @@ const ka = J.div`
436
444
  return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.background) || "#f8f9fa";
437
445
  }};
438
446
  }
439
- `, Aa = J.div`
447
+ `, _a = J.div`
440
448
  color: ${(e) => {
441
449
  var r, t;
442
450
  return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.primary) || "#007bff";
@@ -451,7 +459,7 @@ const ka = J.div`
451
459
  font-size: 16px;
452
460
  font-weight: 500;
453
461
  margin-bottom: 4px;
454
- `, jr = J.div`
462
+ `, Or = J.div`
455
463
  color: ${(e) => {
456
464
  var r, t, s, h;
457
465
  return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.textSecondary) || ((h = (s = e.$theme) == null ? void 0 : s.colors) == null ? void 0 : h.disabledText) || "#6b7280";
@@ -497,10 +505,10 @@ const ka = J.div`
497
505
  }};
498
506
  margin-right: 12px;
499
507
  flex-shrink: 0;
500
- `, Oa = J.div`
508
+ `, ja = J.div`
501
509
  flex: 1;
502
510
  min-width: 0;
503
- `, ja = J.div`
511
+ `, Oa = J.div`
504
512
  color: ${(e) => {
505
513
  var r, t;
506
514
  return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.text) || "#343a40";
@@ -546,7 +554,7 @@ const ka = J.div`
546
554
  margin-left: 12px;
547
555
  flex-shrink: 0;
548
556
  color: ${(e) => {
549
- var r, t, s, h, b, p, d, f, N, M;
557
+ var r, t, s, h, b, p, d, f, N, F;
550
558
  switch (e.$status) {
551
559
  case "success":
552
560
  return ((t = (r = e.$theme) == null ? void 0 : r.colors) == null ? void 0 : t.success) || "#008000";
@@ -557,7 +565,7 @@ const ka = J.div`
557
565
  case "pending":
558
566
  return ((f = (d = e.$theme) == null ? void 0 : d.colors) == null ? void 0 : f.warning) || "#FFA500";
559
567
  default:
560
- return ((M = (N = e.$theme) == null ? void 0 : N.colors) == null ? void 0 : M.disabledText) || "#808080";
568
+ return ((F = (N = e.$theme) == null ? void 0 : N.colors) == null ? void 0 : F.disabledText) || "#808080";
561
569
  }
562
570
  }};
563
571
  `, Ua = J.button`
@@ -740,7 +748,7 @@ const Ea = J.div`
740
748
  }
741
749
  `;
742
750
  function le(e) {
743
- return e.label ? /* @__PURE__ */ O("div", { className: "flex items-center gap-2", children: [
751
+ return e.label ? /* @__PURE__ */ L("div", { className: "flex items-center gap-2", children: [
744
752
  /* @__PURE__ */ o("span", { className: "font-medium text-gray-800 text-sm", children: e.label }),
745
753
  e.required && /* @__PURE__ */ o("span", { className: "text-red-500 font-bold text-sm", children: "*" }),
746
754
  (e.helpText || e.description) && /* @__PURE__ */ o(cr, { title: e.helpText || e.description, placement: "top", children: /* @__PURE__ */ o(
@@ -755,9 +763,9 @@ function le(e) {
755
763
  function Ja(e = [], r, t = {}, s = "md") {
756
764
  const h = s === "sm" ? "28px" : "40px", b = s === "sm" ? "28px" : "40px", p = s === "sm" ? "0 8px" : "0 12px", d = s === "sm" ? "16px" : "24px", f = s === "sm" ? "12px" : "14px", N = me.useMemo(
757
765
  () => {
758
- var v, V, A, E, j, Q;
759
- (V = (v = r == null ? void 0 : r.theme) == null ? void 0 : v.colors) != null && V.border;
760
- const a = ((E = (A = r == null ? void 0 : r.theme) == null ? void 0 : A.colors) == null ? void 0 : E.primary) || "#3b82f6", T = ((Q = (j = r == null ? void 0 : r.theme) == null ? void 0 : j.colors) == null ? void 0 : Q.textSecondary) || "#9ca3af";
766
+ var w, V, _, E, j, ee;
767
+ (V = (w = r == null ? void 0 : r.theme) == null ? void 0 : w.colors) != null && V.border;
768
+ const a = ((E = (_ = r == null ? void 0 : r.theme) == null ? void 0 : _.colors) == null ? void 0 : E.primary) || "#3b82f6", T = ((ee = (j = r == null ? void 0 : r.theme) == null ? void 0 : j.colors) == null ? void 0 : ee.textSecondary) || "#9ca3af";
761
769
  return `
762
770
  .dynamic-form .ant-form-item-label > label {
763
771
  height: auto !important;
@@ -922,67 +930,67 @@ function Ja(e = [], r, t = {}, s = "md") {
922
930
  document.head.removeChild(a);
923
931
  };
924
932
  }, [N]);
925
- const [M, C] = me.useState(() => {
933
+ const [F, M] = me.useState(() => {
926
934
  const a = {};
927
935
  return e.forEach((T) => {
928
936
  T.name && (T.type === "switch" ? a[T.name] = t[T.name] ?? T.defaultValue ?? !1 : ["select", "radio", "checkbox"].includes(T.type) && (a[T.name] = t[T.name] ?? T.defaultValue ?? (T.type === "checkbox" ? [] : "")));
929
937
  }), a;
930
- }), W = me.useRef();
938
+ }), O = me.useRef();
931
939
  me.useEffect(() => {
932
- r && r.formInstance && !W.current && (W.current = r.formInstance);
940
+ r && r.formInstance && !O.current && (O.current = r.formInstance);
933
941
  }, [r]);
934
- const l = (a, T, v) => {
942
+ const l = (a, T, w) => {
935
943
  var V;
936
- if (C((A) => ({ ...A, [a]: T })), W.current && v) {
937
- let A = [];
938
- if (Array.isArray(v))
939
- A = v;
940
- else if (typeof v == "object") {
944
+ if (M((_) => ({ ..._, [a]: T })), O.current && w) {
945
+ let _ = [];
946
+ if (Array.isArray(w))
947
+ _ = w;
948
+ else if (typeof w == "object") {
941
949
  const E = String(T);
942
- Object.keys(v).forEach((j) => {
943
- j !== E && v[j].forEach((Q) => {
944
- Q && W.current.setFieldsValue({ [Q]: void 0 });
950
+ Object.keys(w).forEach((j) => {
951
+ j !== E && w[j].forEach((ee) => {
952
+ ee && O.current.setFieldsValue({ [ee]: void 0 });
945
953
  });
946
954
  });
947
955
  }
948
- Array.isArray(v) && ((V = e.find((j) => j.name === a)) == null ? void 0 : V.type) === "switch" && !T && A.forEach((j) => {
949
- j && W.current.setFieldsValue({ [j]: void 0 });
956
+ Array.isArray(w) && ((V = e.find((j) => j.name === a)) == null ? void 0 : V.type) === "switch" && !T && _.forEach((j) => {
957
+ j && O.current.setFieldsValue({ [j]: void 0 });
950
958
  });
951
959
  }
952
- }, _ = /* @__PURE__ */ new Set(), U = (() => {
960
+ }, $ = /* @__PURE__ */ new Set(), H = (() => {
953
961
  var a, T;
954
962
  try {
955
963
  return ((T = (a = r == null ? void 0 : r.formInstance) == null ? void 0 : a.getFieldsValue) == null ? void 0 : T.call(a)) || {};
956
964
  } catch {
957
965
  return {};
958
966
  }
959
- })(), ae = (a) => {
967
+ })(), P = (a) => {
960
968
  a.forEach((T) => {
961
969
  if (!T) return;
962
970
  if (T.controlledItems && T.name) {
963
- const V = M[T.name];
971
+ const V = F[T.name];
964
972
  if (Array.isArray(T.controlledItems))
965
- T.type === "switch" && V === !1 && T.controlledItems.forEach((A) => {
966
- A && _.add(A);
973
+ T.type === "switch" && V === !1 && T.controlledItems.forEach((_) => {
974
+ _ && $.add(_);
967
975
  });
968
976
  else if (typeof T.controlledItems == "object") {
969
- const A = /* @__PURE__ */ new Set();
970
- Object.values(T.controlledItems).forEach((Q) => {
971
- (Q || []).forEach((X) => X && A.add(X));
977
+ const _ = /* @__PURE__ */ new Set();
978
+ Object.values(T.controlledItems).forEach((ee) => {
979
+ (ee || []).forEach((Z) => Z && _.add(Z));
972
980
  });
973
981
  const E = String(V ?? ""), j = new Set((T.controlledItems[E] || []).filter(Boolean));
974
- A.forEach((Q) => {
975
- j.has(Q) || _.add(Q);
982
+ _.forEach((ee) => {
983
+ j.has(ee) || $.add(ee);
976
984
  });
977
985
  }
978
986
  }
979
- (typeof T.hidden == "function" ? T.hidden(U) : T.hidden === !0) && T.name && _.add(T.name), T.type === "col" && Array.isArray(T.children) && ae(T.children);
987
+ (typeof T.hidden == "function" ? T.hidden(H) : T.hidden === !0) && T.name && $.add(T.name), T.type === "col" && Array.isArray(T.children) && P(T.children);
980
988
  });
981
989
  };
982
- ae(e);
990
+ P(e);
983
991
  const te = e.map((a, T) => {
984
- var v, V, A, E, j, Q, X, R, ee, G, S, y, x, D, w, L, q, Z, P, k, H, Y;
985
- if (a.name && _.has(a.name)) return null;
992
+ var w, V, _, E, j, ee, Z, W, re, G, C, y, x, z, k, q, R, Q, X, S, Y, I;
993
+ if (a.name && $.has(a.name)) return null;
986
994
  if (a.type === "divider")
987
995
  return /* @__PURE__ */ o(
988
996
  "div",
@@ -1007,7 +1015,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1007
1015
  fontWeight: i === 1 ? 700 : i === 2 ? 600 : 500,
1008
1016
  animationDelay: `${T * 30}ms`
1009
1017
  },
1010
- children: /* @__PURE__ */ O("div", { className: "flex items-center", children: [
1018
+ children: /* @__PURE__ */ L("div", { className: "flex items-center", children: [
1011
1019
  /* @__PURE__ */ o("span", { className: "mr-3", children: a.label }),
1012
1020
  /* @__PURE__ */ o(
1013
1021
  "div",
@@ -1027,10 +1035,10 @@ function Ja(e = [], r, t = {}, s = "md") {
1027
1035
  }
1028
1036
  if (a.type === "col") {
1029
1037
  if (!a.children || a.children.length === 0) return null;
1030
- const i = (n, z) => {
1031
- var ye, De, ze, _e, Ae, Be, We, Re, qe, Le, Oe, je, He, Ye, Ie, Ue, Ve, Ee, Je, Ge, Ke, Pe;
1032
- const F = typeof n.hidden == "function" ? n.hidden(U) : n.hidden === !0;
1033
- if (n.name && _.has(n.name) || F) return null;
1038
+ const i = (n, A) => {
1039
+ var ye, De, ze, Ae, _e, Be, We, Re, qe, Le, je, Oe, He, Ye, Ie, Ue, Ve, Ee, Je, Ge, Ke, Xe;
1040
+ const D = typeof n.hidden == "function" ? n.hidden(H) : n.hidden === !0;
1041
+ if (n.name && $.has(n.name) || D) return null;
1034
1042
  const m = {
1035
1043
  label: n.label ? le(n) : void 0,
1036
1044
  name: n.name,
@@ -1041,11 +1049,11 @@ function Ja(e = [], r, t = {}, s = "md") {
1041
1049
  }
1042
1050
  ] : void 0,
1043
1051
  className: "mb-6 df-stagger",
1044
- style: { animationDelay: `${z * 30}ms` },
1052
+ style: { animationDelay: `${A * 30}ms` },
1045
1053
  labelCol: { span: 24 },
1046
1054
  wrapperCol: { span: 24 },
1047
1055
  required: !1
1048
- }, g = n.name || n.id || `form-item-${z}`, re = `${n.className || ""} ${s === "sm" ? "h-7" : "h-10"}`;
1056
+ }, g = n.name || n.id || `form-item-${A}`, ae = `${n.className || ""} ${s === "sm" ? "h-7" : "h-10"}`;
1049
1057
  switch (n.type) {
1050
1058
  case "divider":
1051
1059
  return /* @__PURE__ */ o(
@@ -1053,7 +1061,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1053
1061
  {
1054
1062
  className: "my-3 border-b border-solid border-gray-200"
1055
1063
  },
1056
- n.name || n.id || `divider-${z}`
1064
+ n.name || n.id || `divider-${A}`
1057
1065
  );
1058
1066
  case "input":
1059
1067
  return /* @__PURE__ */ o(K.Item, { ...m, children: /* @__PURE__ */ o(
@@ -1061,7 +1069,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1061
1069
  {
1062
1070
  placeholder: n.placeholder,
1063
1071
  disabled: n.disabled,
1064
- className: re
1072
+ className: ae
1065
1073
  }
1066
1074
  ) }, g);
1067
1075
  case "select":
@@ -1070,8 +1078,8 @@ function Ja(e = [], r, t = {}, s = "md") {
1070
1078
  {
1071
1079
  placeholder: n.placeholder,
1072
1080
  disabled: n.disabled,
1073
- className: re,
1074
- value: M[n.name || ""],
1081
+ className: ae,
1082
+ value: F[n.name || ""],
1075
1083
  onChange: (pe) => l(n.name || "", pe, n.controlledItems),
1076
1084
  children: (ye = n.options) == null ? void 0 : ye.map((pe, Ce) => /* @__PURE__ */ o(tr.Option, { value: pe.value, children: pe.render ? pe.render() : pe.label }, pe.value || Ce))
1077
1085
  }
@@ -1086,7 +1094,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1086
1094
  step: n.step,
1087
1095
  placeholder: n.placeholder,
1088
1096
  disabled: n.disabled,
1089
- className: re,
1097
+ className: ae,
1090
1098
  style: { width: "100%" }
1091
1099
  }
1092
1100
  ) }, g);
@@ -1096,7 +1104,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1096
1104
  {
1097
1105
  placeholder: n.placeholder,
1098
1106
  disabled: n.disabled,
1099
- className: re
1107
+ className: ae
1100
1108
  }
1101
1109
  ) }, g);
1102
1110
  case "textarea":
@@ -1105,7 +1113,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1105
1113
  {
1106
1114
  placeholder: n.placeholder,
1107
1115
  disabled: n.disabled,
1108
- className: re,
1116
+ className: ae,
1109
1117
  rows: s === "sm" ? 3 : 4
1110
1118
  }
1111
1119
  ) }, g);
@@ -1115,7 +1123,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1115
1123
  {
1116
1124
  placeholder: n.placeholder,
1117
1125
  disabled: n.disabled,
1118
- className: re,
1126
+ className: ae,
1119
1127
  style: { width: "100%" }
1120
1128
  }
1121
1129
  ) }, g);
@@ -1137,13 +1145,13 @@ function Ja(e = [], r, t = {}, s = "md") {
1137
1145
  className: "mb-6",
1138
1146
  labelCol: { span: 24 },
1139
1147
  wrapperCol: { span: 24 },
1140
- children: /* @__PURE__ */ O("div", { className: "flex items-center justify-between", children: [
1148
+ children: /* @__PURE__ */ L("div", { className: "flex items-center justify-between", children: [
1141
1149
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: n.label ? le(n) : null }),
1142
1150
  /* @__PURE__ */ o(K.Item, { name: n.name, valuePropName: "checked", noStyle: !0, children: /* @__PURE__ */ o(
1143
1151
  Br,
1144
1152
  {
1145
1153
  disabled: n.disabled,
1146
- checked: M[n.name || ""],
1154
+ checked: F[n.name || ""],
1147
1155
  onChange: (pe) => l(n.name || "", pe, n.controlledItems)
1148
1156
  }
1149
1157
  ) })
@@ -1152,15 +1160,15 @@ function Ja(e = [], r, t = {}, s = "md") {
1152
1160
  n.name || `switch-${Math.random()}`
1153
1161
  );
1154
1162
  case "slider":
1155
- return /* @__PURE__ */ O("div", { className: "mb-6", children: [
1156
- /* @__PURE__ */ O("div", { className: "flex items-center justify-between mb-3", children: [
1163
+ return /* @__PURE__ */ L("div", { className: "mb-6", children: [
1164
+ /* @__PURE__ */ L("div", { className: "flex items-center justify-between mb-3", children: [
1157
1165
  /* @__PURE__ */ o("div", { className: "flex items-center", children: n.label ? le(n) : null }),
1158
- /* @__PURE__ */ O("div", { className: "flex items-center gap-2", children: [
1166
+ /* @__PURE__ */ L("div", { className: "flex items-center gap-2", children: [
1159
1167
  /* @__PURE__ */ o(K.Item, { name: n.name, noStyle: !0, children: /* @__PURE__ */ o(
1160
1168
  nr,
1161
1169
  {
1162
- min: (_e = n.range) == null ? void 0 : _e.min,
1163
- max: (Ae = n.range) == null ? void 0 : Ae.max,
1170
+ min: (Ae = n.range) == null ? void 0 : Ae.min,
1171
+ max: (_e = n.range) == null ? void 0 : _e.max,
1164
1172
  step: n.step,
1165
1173
  disabled: n.disabled,
1166
1174
  className: "h-8 w-20"
@@ -1170,7 +1178,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1170
1178
  ] })
1171
1179
  ] }),
1172
1180
  /* @__PURE__ */ o(K.Item, { name: n.name, noStyle: !0, children: /* @__PURE__ */ o(
1173
- Ar,
1181
+ _r,
1174
1182
  {
1175
1183
  min: (Be = n.range) == null ? void 0 : Be.min,
1176
1184
  max: (We = n.range) == null ? void 0 : We.max,
@@ -1196,7 +1204,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1196
1204
  type: "email",
1197
1205
  placeholder: n.placeholder,
1198
1206
  disabled: n.disabled,
1199
- className: re
1207
+ className: ae
1200
1208
  }
1201
1209
  ) }, g);
1202
1210
  case "time":
@@ -1205,7 +1213,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1205
1213
  {
1206
1214
  placeholder: n.placeholder,
1207
1215
  disabled: n.disabled,
1208
- className: re,
1216
+ className: ae,
1209
1217
  style: { width: "100%" }
1210
1218
  }
1211
1219
  ) }, g);
@@ -1216,7 +1224,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1216
1224
  showTime: !0,
1217
1225
  placeholder: n.placeholder,
1218
1226
  disabled: n.disabled,
1219
- className: re,
1227
+ className: ae,
1220
1228
  style: { width: "100%" }
1221
1229
  }
1222
1230
  ) }, g);
@@ -1227,7 +1235,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1227
1235
  type: "file",
1228
1236
  placeholder: n.placeholder,
1229
1237
  disabled: n.disabled,
1230
- className: re
1238
+ className: ae
1231
1239
  }
1232
1240
  ) }, g);
1233
1241
  case "color":
@@ -1237,7 +1245,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1237
1245
  type: "color",
1238
1246
  placeholder: n.placeholder,
1239
1247
  disabled: n.disabled,
1240
- className: re,
1248
+ className: ae,
1241
1249
  style: {
1242
1250
  width: "65px",
1243
1251
  height: "40px",
@@ -1251,7 +1259,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1251
1259
  {
1252
1260
  placeholder: n.placeholder,
1253
1261
  disabled: n.disabled,
1254
- className: re,
1262
+ className: ae,
1255
1263
  rows: 4
1256
1264
  }
1257
1265
  ) }, g);
@@ -1261,7 +1269,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1261
1269
  {
1262
1270
  placeholder: n.placeholder,
1263
1271
  disabled: n.disabled,
1264
- className: re,
1272
+ className: ae,
1265
1273
  rows: 6
1266
1274
  }
1267
1275
  ) }, g);
@@ -1272,8 +1280,8 @@ function Ja(e = [], r, t = {}, s = "md") {
1272
1280
  multiple: ((Re = n.uploaderConfig) == null ? void 0 : Re.multiple) ?? !0,
1273
1281
  accept: ((qe = n.uploaderConfig) == null ? void 0 : qe.accept) ?? "*/*",
1274
1282
  maxSize: ((Le = n.uploaderConfig) == null ? void 0 : Le.maxSize) ?? 100,
1275
- maxFiles: ((Oe = n.uploaderConfig) == null ? void 0 : Oe.maxFiles) ?? 10,
1276
- autoUpload: ((je = n.uploaderConfig) == null ? void 0 : je.autoUpload) ?? !0,
1283
+ maxFiles: ((je = n.uploaderConfig) == null ? void 0 : je.maxFiles) ?? 10,
1284
+ autoUpload: ((Oe = n.uploaderConfig) == null ? void 0 : Oe.autoUpload) ?? !0,
1277
1285
  url: (He = n.uploaderConfig) == null ? void 0 : He.url,
1278
1286
  headers: ((Ye = n.uploaderConfig) == null ? void 0 : Ye.headers) ?? {},
1279
1287
  queryParams: ((Ie = n.uploaderConfig) == null ? void 0 : Ie.queryParams) ?? {},
@@ -1283,7 +1291,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1283
1291
  placeholder: (Je = n.uploaderConfig) == null ? void 0 : Je.placeholder,
1284
1292
  listName: (Ge = n.uploaderConfig) == null ? void 0 : Ge.listName,
1285
1293
  errorMessages: (Ke = n.uploaderConfig) == null ? void 0 : Ke.errorMessages,
1286
- onRef: (Pe = n.uploaderConfig) == null ? void 0 : Pe.onRef,
1294
+ onRef: (Xe = n.uploaderConfig) == null ? void 0 : Xe.onRef,
1287
1295
  styles: r,
1288
1296
  eventsEmit: (pe, Ce) => {
1289
1297
  if (r && typeof r.eventsEmit == "function") {
@@ -1299,11 +1307,11 @@ function Ja(e = [], r, t = {}, s = "md") {
1299
1307
  default:
1300
1308
  return null;
1301
1309
  }
1302
- }, u = a.children.map((n, z) => i(n, z)), c = (n) => {
1310
+ }, u = a.children.map((n, A) => i(n, A)), c = (n) => {
1303
1311
  if (!a.percentage || a.percentage.length === 0)
1304
1312
  return "flex-1";
1305
- const z = a.percentage[n];
1306
- return z && z > 0 ? `${z / 12 * 100}%` : "flex-1";
1313
+ const A = a.percentage[n];
1314
+ return A && A > 0 ? `${A / 12 * 100}%` : "flex-1";
1307
1315
  };
1308
1316
  return /* @__PURE__ */ o(
1309
1317
  "div",
@@ -1316,17 +1324,17 @@ function Ja(e = [], r, t = {}, s = "md") {
1316
1324
  justifyContent: a.justify || "space-between",
1317
1325
  alignItems: a.align || "start"
1318
1326
  },
1319
- children: u.map((n, z) => /* @__PURE__ */ o(
1327
+ children: u.map((n, A) => /* @__PURE__ */ o(
1320
1328
  "div",
1321
1329
  {
1322
1330
  style: {
1323
- width: c(z),
1331
+ width: c(A),
1324
1332
  flex: a.percentage ? "none" : "1"
1325
1333
  // 有比例时固定宽度,无比例时弹性
1326
1334
  },
1327
1335
  children: n
1328
1336
  },
1329
- `col-child-${z}`
1337
+ `col-child-${A}`
1330
1338
  ))
1331
1339
  },
1332
1340
  a.name || `col-${Math.random()}`
@@ -1383,9 +1391,9 @@ function Ja(e = [], r, t = {}, s = "md") {
1383
1391
  placeholder: a.placeholder,
1384
1392
  disabled: a.disabled,
1385
1393
  className: `${a.className || ""} ${s === "sm" ? "h-7" : "h-10"}`,
1386
- value: M[a.name || ""],
1394
+ value: F[a.name || ""],
1387
1395
  onChange: (i) => l(a.name || "", i, a.controlledItems),
1388
- children: (v = a.options) == null ? void 0 : v.map((i, u) => /* @__PURE__ */ o(tr.Option, { value: i.value, children: i.render ? i.render() : i.label }, i.value || u))
1396
+ children: (w = a.options) == null ? void 0 : w.map((i, u) => /* @__PURE__ */ o(tr.Option, { value: i.value, children: i.render ? i.render() : i.label }, i.value || u))
1389
1397
  }
1390
1398
  )
1391
1399
  },
@@ -1407,7 +1415,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1407
1415
  {
1408
1416
  addonAfter: a.unit ? /* @__PURE__ */ o("span", { className: "text-[10px] text-gray-300", children: a.unit }) : null,
1409
1417
  min: (V = a.range) == null ? void 0 : V.min,
1410
- max: (A = a.range) == null ? void 0 : A.max,
1418
+ max: (_ = a.range) == null ? void 0 : _.max,
1411
1419
  step: a.step,
1412
1420
  placeholder: a.placeholder,
1413
1421
  disabled: a.disabled,
@@ -1419,10 +1427,10 @@ function Ja(e = [], r, t = {}, s = "md") {
1419
1427
  a.name || `number-${Math.random()}`
1420
1428
  );
1421
1429
  if (a.type === "slider")
1422
- return /* @__PURE__ */ O("div", { className: "mb-6", children: [
1423
- /* @__PURE__ */ O("div", { className: "flex items-center justify-between mb-3", children: [
1430
+ return /* @__PURE__ */ L("div", { className: "mb-6", children: [
1431
+ /* @__PURE__ */ L("div", { className: "flex items-center justify-between mb-3", children: [
1424
1432
  /* @__PURE__ */ o("div", { className: "flex items-center", children: a.label ? le(a) : null }),
1425
- /* @__PURE__ */ O("div", { className: "flex items-center gap-2", children: [
1433
+ /* @__PURE__ */ L("div", { className: "flex items-center gap-2", children: [
1426
1434
  /* @__PURE__ */ o(K.Item, { name: a.name, noStyle: !0, children: /* @__PURE__ */ o(
1427
1435
  nr,
1428
1436
  {
@@ -1437,10 +1445,10 @@ function Ja(e = [], r, t = {}, s = "md") {
1437
1445
  ] })
1438
1446
  ] }),
1439
1447
  /* @__PURE__ */ o(K.Item, { name: a.name, noStyle: !0, children: /* @__PURE__ */ o(
1440
- Ar,
1448
+ _r,
1441
1449
  {
1442
- min: (Q = a.range) == null ? void 0 : Q.min,
1443
- max: (X = a.range) == null ? void 0 : X.max,
1450
+ min: (ee = a.range) == null ? void 0 : ee.min,
1451
+ max: (Z = a.range) == null ? void 0 : Z.max,
1444
1452
  step: a.step,
1445
1453
  disabled: a.disabled,
1446
1454
  className: a.className
@@ -1456,13 +1464,13 @@ function Ja(e = [], r, t = {}, s = "md") {
1456
1464
  className: "mb-6",
1457
1465
  labelCol: { span: 24 },
1458
1466
  wrapperCol: { span: 24 },
1459
- children: /* @__PURE__ */ O("div", { className: "flex items-center justify-between", children: [
1467
+ children: /* @__PURE__ */ L("div", { className: "flex items-center justify-between", children: [
1460
1468
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: a.label ? le(a) : null }),
1461
1469
  /* @__PURE__ */ o(K.Item, { name: a.name, valuePropName: "checked", noStyle: !0, children: /* @__PURE__ */ o(
1462
1470
  Br,
1463
1471
  {
1464
1472
  disabled: a.disabled,
1465
- checked: a.name ? M[a.name] : !1,
1473
+ checked: a.name ? F[a.name] : !1,
1466
1474
  className: a.className,
1467
1475
  onChange: (i) => a.name && l(a.name, i, a.controlledItems)
1468
1476
  }
@@ -1759,21 +1767,21 @@ function Ja(e = [], r, t = {}, s = "md") {
1759
1767
  children: /* @__PURE__ */ o(
1760
1768
  Yr,
1761
1769
  {
1762
- multiple: ((R = a.uploaderConfig) == null ? void 0 : R.multiple) ?? !0,
1763
- accept: ((ee = a.uploaderConfig) == null ? void 0 : ee.accept) ?? "*/*",
1770
+ multiple: ((W = a.uploaderConfig) == null ? void 0 : W.multiple) ?? !0,
1771
+ accept: ((re = a.uploaderConfig) == null ? void 0 : re.accept) ?? "*/*",
1764
1772
  maxSize: ((G = a.uploaderConfig) == null ? void 0 : G.maxSize) ?? 100,
1765
- maxFiles: ((S = a.uploaderConfig) == null ? void 0 : S.maxFiles) ?? 10,
1773
+ maxFiles: ((C = a.uploaderConfig) == null ? void 0 : C.maxFiles) ?? 10,
1766
1774
  autoUpload: ((y = a.uploaderConfig) == null ? void 0 : y.autoUpload) ?? !0,
1767
1775
  url: (x = a.uploaderConfig) == null ? void 0 : x.url,
1768
- headers: ((D = a.uploaderConfig) == null ? void 0 : D.headers) ?? {},
1769
- queryParams: ((w = a.uploaderConfig) == null ? void 0 : w.queryParams) ?? {},
1770
- itemForm: ((L = a.uploaderConfig) == null ? void 0 : L.itemForm) ?? [],
1771
- buttons: ((q = a.uploaderConfig) == null ? void 0 : q.buttons) || [],
1772
- icons: (Z = a.uploaderConfig) == null ? void 0 : Z.icons,
1773
- placeholder: (P = a.uploaderConfig) == null ? void 0 : P.placeholder,
1774
- listName: (k = a.uploaderConfig) == null ? void 0 : k.listName,
1775
- errorMessages: (H = a.uploaderConfig) == null ? void 0 : H.errorMessages,
1776
- onRef: (Y = a.uploaderConfig) == null ? void 0 : Y.onRef,
1776
+ headers: ((z = a.uploaderConfig) == null ? void 0 : z.headers) ?? {},
1777
+ queryParams: ((k = a.uploaderConfig) == null ? void 0 : k.queryParams) ?? {},
1778
+ itemForm: ((q = a.uploaderConfig) == null ? void 0 : q.itemForm) ?? [],
1779
+ buttons: ((R = a.uploaderConfig) == null ? void 0 : R.buttons) || [],
1780
+ icons: (Q = a.uploaderConfig) == null ? void 0 : Q.icons,
1781
+ placeholder: (X = a.uploaderConfig) == null ? void 0 : X.placeholder,
1782
+ listName: (S = a.uploaderConfig) == null ? void 0 : S.listName,
1783
+ errorMessages: (Y = a.uploaderConfig) == null ? void 0 : Y.errorMessages,
1784
+ onRef: (I = a.uploaderConfig) == null ? void 0 : I.onRef,
1777
1785
  styles: r,
1778
1786
  eventsEmit: (i, u) => {
1779
1787
  if (r && typeof r.eventsEmit == "function") {
@@ -1791,7 +1799,7 @@ function Ja(e = [], r, t = {}, s = "md") {
1791
1799
  ) : null;
1792
1800
  });
1793
1801
  return me.useEffect(() => {
1794
- r && typeof r.setFormRef == "function" && r.setFormRef(W);
1802
+ r && typeof r.setFormRef == "function" && r.setFormRef(O);
1795
1803
  }, [r]), te;
1796
1804
  }
1797
1805
  const Ga = `
@@ -1825,31 +1833,31 @@ const Ga = `
1825
1833
  formConfig: d,
1826
1834
  title: f,
1827
1835
  description: N,
1828
- formWidth: M,
1829
- ...C
1830
- }, W) => {
1831
- var G, S, y, x, D, w, L, q, Z, P, k, H, Y, i;
1832
- const [l] = K.useForm(), _ = Fe(), U = $e(
1836
+ formWidth: F,
1837
+ ...M
1838
+ }, O) => {
1839
+ var G, C, y, x, z, k, q, R, Q, X, S, Y, I, i;
1840
+ const [l] = K.useForm(), $ = Fe(), H = $e(
1833
1841
  // 基础:默认主题 + useTheme的配置
1834
- $e({ theme: B, mode: "light" }, _),
1842
+ $e({ theme: B, mode: "light" }, $),
1835
1843
  // 最高层:用户手动传入的styles
1836
1844
  b
1837
- ), ae = Te({}), te = () => {
1838
- const u = l.getFieldsValue(), c = [], n = (F) => {
1839
- F == null || F.forEach((m) => {
1845
+ ), P = Te({}), te = () => {
1846
+ const u = l.getFieldsValue(), c = [], n = (D) => {
1847
+ D == null || D.forEach((m) => {
1840
1848
  m && (m.type === "col" && Array.isArray(m.children) ? n(m.children) : m.name && c.push({ name: m.name, type: m.type }));
1841
1849
  });
1842
1850
  };
1843
1851
  n(e);
1844
- const z = c.map((F) => {
1845
- const g = F.type === "uploader" ? ae.current[F.name] || u[F.name] || [] : u[F.name];
1846
- return { name: F.name, type: F.type, value: g };
1852
+ const A = c.map((D) => {
1853
+ const g = D.type === "uploader" ? P.current[D.name] || u[D.name] || [] : u[D.name];
1854
+ return { name: D.name, type: D.type, value: g };
1847
1855
  });
1848
1856
  return {
1849
1857
  formName: (r == null ? void 0 : r.name) || "",
1850
1858
  values: u,
1851
- fields: z,
1852
- files: ae.current,
1859
+ fields: A,
1860
+ files: P.current,
1853
1861
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1854
1862
  };
1855
1863
  }, a = (u, c) => {
@@ -1869,8 +1877,8 @@ const Ga = `
1869
1877
  if (u.startsWith("uploader:")) {
1870
1878
  const n = c == null ? void 0 : c.fieldName;
1871
1879
  if (n) {
1872
- const z = ae.current[n] || [];
1873
- let F = z;
1880
+ const A = P.current[n] || [];
1881
+ let D = A;
1874
1882
  switch (u) {
1875
1883
  case "uploader:success": {
1876
1884
  const m = c == null ? void 0 : c.item;
@@ -1882,23 +1890,23 @@ const Ga = `
1882
1890
  type: m.type,
1883
1891
  uploadApiRes: m.uploadApiRes || {},
1884
1892
  formData: m.formData || {}
1885
- }, re = z.findIndex((ye) => ye.id === g.id);
1886
- re >= 0 ? (z[re] = g, F = [...z]) : F = [...z, g];
1893
+ }, ae = A.findIndex((ye) => ye.id === g.id);
1894
+ ae >= 0 ? (A[ae] = g, D = [...A]) : D = [...A, g];
1887
1895
  }
1888
1896
  break;
1889
1897
  }
1890
1898
  case "uploader:remove": {
1891
1899
  const m = c == null ? void 0 : c.itemId;
1892
- F = z.filter((g) => g.id !== m);
1900
+ D = A.filter((g) => g.id !== m);
1893
1901
  break;
1894
1902
  }
1895
1903
  case "uploader:formDataChange": {
1896
1904
  const m = c == null ? void 0 : c.itemId, g = (c == null ? void 0 : c.formData) || {};
1897
- F = z.map((re) => re.id === m ? { ...re, formData: g } : re);
1905
+ D = A.map((ae) => ae.id === m ? { ...ae, formData: g } : ae);
1898
1906
  break;
1899
1907
  }
1900
1908
  case "uploader:dataChange": {
1901
- Array.isArray(c == null ? void 0 : c.items) && (F = c.items.map((m) => ({
1909
+ Array.isArray(c == null ? void 0 : c.items) && (D = c.items.map((m) => ({
1902
1910
  id: m.id,
1903
1911
  name: m.name,
1904
1912
  size: m.size,
@@ -1909,7 +1917,7 @@ const Ga = `
1909
1917
  break;
1910
1918
  }
1911
1919
  }
1912
- ae.current[n] = F, l.setFieldsValue({ [n]: F });
1920
+ P.current[n] = D, l.setFieldsValue({ [n]: D });
1913
1921
  }
1914
1922
  }
1915
1923
  if (typeof s == "function") {
@@ -1919,15 +1927,15 @@ const Ga = `
1919
1927
  };
1920
1928
  u === "uploader:error" && n.data === void 0 && (n.data = te()), s(u, n);
1921
1929
  }
1922
- }, [v, V] = ie(e);
1930
+ }, [w, V] = ie(e);
1923
1931
  we(() => {
1924
1932
  V(e);
1925
1933
  }, [e]);
1926
- const A = (u, c) => {
1927
- const n = (z) => z.map((F) => F && (F.type === "col" && Array.isArray(F.children) ? { ...F, children: n(F.children) } : F.name === u ? { ...F, ...c } : F));
1928
- V((z) => n(z));
1934
+ const _ = (u, c) => {
1935
+ const n = (A) => A.map((D) => D && (D.type === "col" && Array.isArray(D.children) ? { ...D, children: n(D.children) } : D.name === u ? { ...D, ...c } : D));
1936
+ V((A) => n(A));
1929
1937
  }, E = (u) => {
1930
- const c = [...v];
1938
+ const c = [...w];
1931
1939
  for (; c.length; ) {
1932
1940
  const n = c.shift();
1933
1941
  if (n) {
@@ -1938,11 +1946,11 @@ const Ga = `
1938
1946
  }
1939
1947
  }
1940
1948
  }, j = Ja(
1941
- v,
1949
+ w,
1942
1950
  { ...b, eventsEmit: T, formInstance: l },
1943
1951
  t,
1944
1952
  p
1945
- ), Q = async () => {
1953
+ ), ee = async () => {
1946
1954
  try {
1947
1955
  const u = await l.validateFields();
1948
1956
  typeof s == "function" ? s("form:submit", {
@@ -1957,50 +1965,50 @@ const Ga = `
1957
1965
  data: te()
1958
1966
  });
1959
1967
  }
1960
- }, X = () => {
1968
+ }, Z = () => {
1961
1969
  l.resetFields(), typeof s == "function" && s("form:reset", {
1962
1970
  formName: (r == null ? void 0 : r.name) || "",
1963
1971
  data: te()
1964
1972
  }), d != null && d.onReset && d.onReset();
1965
- }, R = () => {
1973
+ }, W = () => {
1966
1974
  l.resetFields(), typeof s == "function" && s("form:cancel", {
1967
1975
  formName: (r == null ? void 0 : r.name) || "",
1968
1976
  data: te()
1969
1977
  });
1970
- }, ee = async () => {
1978
+ }, re = async () => {
1971
1979
  try {
1972
- const u = await l.validateFields(), c = [], n = (F) => {
1973
- F == null || F.forEach((m) => {
1980
+ const u = await l.validateFields(), c = [], n = (D) => {
1981
+ D == null || D.forEach((m) => {
1974
1982
  m && (m.type === "col" && Array.isArray(m.children) ? n(m.children) : m.name && c.push({ name: m.name, type: m.type }));
1975
1983
  });
1976
1984
  };
1977
1985
  n(e);
1978
- const z = c.map((F) => {
1979
- const g = F.type === "uploader" ? ae.current[F.name] || u[F.name] || [] : u[F.name];
1980
- return { name: F.name, type: F.type, value: g };
1986
+ const A = c.map((D) => {
1987
+ const g = D.type === "uploader" ? P.current[D.name] || u[D.name] || [] : u[D.name];
1988
+ return { name: D.name, type: D.type, value: g };
1981
1989
  });
1982
1990
  return {
1983
- fields: z,
1991
+ fields: A,
1984
1992
  formName: (r == null ? void 0 : r.name) || "",
1985
- fieldCount: z.length,
1993
+ fieldCount: A.length,
1986
1994
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1987
1995
  isValid: !0
1988
1996
  };
1989
1997
  } catch (u) {
1990
- const c = l.getFieldsValue(), n = [], z = (m) => {
1998
+ const c = l.getFieldsValue(), n = [], A = (m) => {
1991
1999
  m == null || m.forEach((g) => {
1992
- g && (g.type === "col" && Array.isArray(g.children) ? z(g.children) : g.name && n.push({ name: g.name, type: g.type }));
2000
+ g && (g.type === "col" && Array.isArray(g.children) ? A(g.children) : g.name && n.push({ name: g.name, type: g.type }));
1993
2001
  });
1994
2002
  };
1995
- z(e);
1996
- const F = n.map((m) => {
1997
- const re = m.type === "uploader" ? ae.current[m.name] || c[m.name] || [] : c[m.name];
1998
- return { name: m.name, type: m.type, value: re };
2003
+ A(e);
2004
+ const D = n.map((m) => {
2005
+ const ae = m.type === "uploader" ? P.current[m.name] || c[m.name] || [] : c[m.name];
2006
+ return { name: m.name, type: m.type, value: ae };
1999
2007
  });
2000
2008
  return {
2001
- fields: F,
2009
+ fields: D,
2002
2010
  formName: (r == null ? void 0 : r.name) || "",
2003
- fieldCount: F.length,
2011
+ fieldCount: D.length,
2004
2012
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2005
2013
  isValid: !1,
2006
2014
  errors: u
@@ -2008,44 +2016,44 @@ const Ga = `
2008
2016
  }
2009
2017
  };
2010
2018
  return me.useImperativeHandle(
2011
- W,
2019
+ O,
2012
2020
  () => ({
2013
2021
  form: l,
2014
- getAllData: ee,
2015
- submit: Q,
2016
- reset: X,
2017
- cancel: R,
2022
+ getAllData: re,
2023
+ submit: ee,
2024
+ reset: Z,
2025
+ cancel: W,
2018
2026
  validate: () => l.validateFields(),
2019
2027
  getValue: (u) => l.getFieldValue(u),
2020
2028
  getValues: () => l.getFieldsValue(),
2021
2029
  setValues: (u) => l.setFieldsValue(u),
2022
- setFieldProps: (u, c) => A(u, c),
2030
+ setFieldProps: (u, c) => _(u, c),
2023
2031
  getFieldProps: (u) => E(u)
2024
2032
  }),
2025
- [l, ee, Q, X, R]
2026
- ), /* @__PURE__ */ O(na, { children: [
2033
+ [l, re, ee, Z, W]
2034
+ ), /* @__PURE__ */ L(na, { children: [
2027
2035
  /* @__PURE__ */ o("style", { children: Ga }),
2028
- /* @__PURE__ */ O(
2036
+ /* @__PURE__ */ L(
2029
2037
  "div",
2030
2038
  {
2031
2039
  style: {
2032
2040
  position: "relative",
2033
2041
  height: "100%",
2034
2042
  padding: "24px",
2035
- width: M || "100%",
2043
+ width: F || "100%",
2036
2044
  // 使用传入的表单宽度或默认100%
2037
- maxWidth: M || "100%"
2045
+ maxWidth: F || "100%"
2038
2046
  // 确保最大宽度不超过设定值
2039
2047
  },
2040
2048
  children: [
2041
- (f || N) && /* @__PURE__ */ O("div", { style: { marginBottom: "24px" }, children: [
2049
+ (f || N) && /* @__PURE__ */ L("div", { style: { marginBottom: "24px" }, children: [
2042
2050
  f && /* @__PURE__ */ o(
2043
2051
  "h2",
2044
2052
  {
2045
2053
  style: {
2046
2054
  fontSize: "24px",
2047
2055
  fontWeight: "600",
2048
- color: ((S = (G = U.theme) == null ? void 0 : G.colors) == null ? void 0 : S.text) || "#1f2937",
2056
+ color: ((C = (G = H.theme) == null ? void 0 : G.colors) == null ? void 0 : C.text) || "#1f2937",
2049
2057
  margin: "0 0 8px 0"
2050
2058
  },
2051
2059
  children: f
@@ -2056,7 +2064,7 @@ const Ga = `
2056
2064
  {
2057
2065
  style: {
2058
2066
  fontSize: "14px",
2059
- color: ((x = (y = U.theme) == null ? void 0 : y.colors) == null ? void 0 : x.secondary) || "#6b7280",
2067
+ color: ((x = (y = H.theme) == null ? void 0 : y.colors) == null ? void 0 : x.secondary) || "#6b7280",
2060
2068
  margin: "0",
2061
2069
  lineHeight: "1.5"
2062
2070
  },
@@ -2064,14 +2072,14 @@ const Ga = `
2064
2072
  }
2065
2073
  )
2066
2074
  ] }),
2067
- /* @__PURE__ */ O(
2075
+ /* @__PURE__ */ L(
2068
2076
  K,
2069
2077
  {
2070
2078
  form: l,
2071
2079
  ...r,
2072
2080
  initialValues: t,
2073
2081
  onValuesChange: a,
2074
- ...C,
2082
+ ...M,
2075
2083
  style: {
2076
2084
  ...r == null ? void 0 : r.style,
2077
2085
  width: "100%",
@@ -2082,13 +2090,13 @@ const Ga = `
2082
2090
  loading: (r == null ? void 0 : r.loading) === !0 ? !0 : void 0,
2083
2091
  children: [
2084
2092
  j,
2085
- ((d == null ? void 0 : d.showSubmit) || (d == null ? void 0 : d.showReset)) && /* @__PURE__ */ O(
2093
+ ((d == null ? void 0 : d.showSubmit) || (d == null ? void 0 : d.showReset)) && /* @__PURE__ */ L(
2086
2094
  "div",
2087
2095
  {
2088
2096
  style: {
2089
2097
  marginTop: "32px",
2090
2098
  paddingTop: "24px",
2091
- borderTop: `1px solid ${((w = (D = U.theme) == null ? void 0 : D.colors) == null ? void 0 : w.border) || "#e5e7eb"}`,
2099
+ borderTop: `1px solid ${((k = (z = H.theme) == null ? void 0 : z.colors) == null ? void 0 : k.border) || "#e5e7eb"}`,
2092
2100
  display: "flex",
2093
2101
  gap: "12px",
2094
2102
  justifyContent: "flex-end"
@@ -2097,10 +2105,10 @@ const Ga = `
2097
2105
  (d == null ? void 0 : d.showReset) && /* @__PURE__ */ o(
2098
2106
  Lr,
2099
2107
  {
2100
- onClick: X,
2108
+ onClick: Z,
2101
2109
  style: {
2102
- borderColor: ((q = (L = U.theme) == null ? void 0 : L.colors) == null ? void 0 : q.border) || "#e5e7eb",
2103
- color: ((P = (Z = U.theme) == null ? void 0 : Z.colors) == null ? void 0 : P.text) || "#1f2937"
2110
+ borderColor: ((R = (q = H.theme) == null ? void 0 : q.colors) == null ? void 0 : R.border) || "#e5e7eb",
2111
+ color: ((X = (Q = H.theme) == null ? void 0 : Q.colors) == null ? void 0 : X.text) || "#1f2937"
2104
2112
  },
2105
2113
  children: (d == null ? void 0 : d.resetText) || "重置"
2106
2114
  }
@@ -2109,10 +2117,10 @@ const Ga = `
2109
2117
  Lr,
2110
2118
  {
2111
2119
  type: "primary",
2112
- onClick: Q,
2120
+ onClick: ee,
2113
2121
  style: {
2114
- backgroundColor: ((H = (k = U.theme) == null ? void 0 : k.colors) == null ? void 0 : H.primary) || "#2563eb",
2115
- borderColor: ((i = (Y = U.theme) == null ? void 0 : Y.colors) == null ? void 0 : i.primary) || "#2563eb"
2122
+ backgroundColor: ((Y = (S = H.theme) == null ? void 0 : S.colors) == null ? void 0 : Y.primary) || "#2563eb",
2123
+ borderColor: ((i = (I = H.theme) == null ? void 0 : I.colors) == null ? void 0 : i.primary) || "#2563eb"
2116
2124
  },
2117
2125
  children: (d == null ? void 0 : d.submitText) || "提交"
2118
2126
  }
@@ -2130,12 +2138,12 @@ const Ga = `
2130
2138
  }
2131
2139
  );
2132
2140
  me.memo(la);
2133
- const Hr = !1, Ka = (e, r) => r != null && r.fileType ? e.startsWith("image/") ? r.fileType.image || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("document") || e.includes("pdf") || e.includes("text") ? r.fileType.document || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("spreadsheet") || e.includes("excel") || e.includes("csv") ? r.fileType.spreadsheet || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("zip") || e.includes("rar") || e.includes("7z") ? r.fileType.archive || /* @__PURE__ */ o(ke, { size: 20 }) : e.startsWith("video/") ? r.fileType.video || /* @__PURE__ */ o(ke, { size: 20 }) : e.startsWith("audio/") ? r.fileType.audio || /* @__PURE__ */ o(ke, { size: 20 }) : r.fileType.default || /* @__PURE__ */ o(ke, { size: 20 }) : /* @__PURE__ */ o(ke, { size: 20 }), Pa = (e, r, t) => {
2141
+ const Hr = !1, Ka = (e, r) => r != null && r.fileType ? e.startsWith("image/") ? r.fileType.image || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("document") || e.includes("pdf") || e.includes("text") ? r.fileType.document || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("spreadsheet") || e.includes("excel") || e.includes("csv") ? r.fileType.spreadsheet || /* @__PURE__ */ o(ke, { size: 20 }) : e.includes("zip") || e.includes("rar") || e.includes("7z") ? r.fileType.archive || /* @__PURE__ */ o(ke, { size: 20 }) : e.startsWith("video/") ? r.fileType.video || /* @__PURE__ */ o(ke, { size: 20 }) : e.startsWith("audio/") ? r.fileType.audio || /* @__PURE__ */ o(ke, { size: 20 }) : r.fileType.default || /* @__PURE__ */ o(ke, { size: 20 }) : /* @__PURE__ */ o(ke, { size: 20 }), Xa = (e, r, t) => {
2134
2142
  var s, h, b, p;
2135
2143
  if (t != null && t.itemStatus)
2136
2144
  switch (e) {
2137
2145
  case "error":
2138
- return t.itemStatus.error || /* @__PURE__ */ o(_r, { size: 20 });
2146
+ return t.itemStatus.error || /* @__PURE__ */ o(Ar, { size: 20 });
2139
2147
  case "uploading":
2140
2148
  return t.itemStatus.uploading || /* @__PURE__ */ o("span", { style: { fontSize: "12px", color: ((s = r == null ? void 0 : r.colors) == null ? void 0 : s.primary) || "#007bff" }, children: "上传中..." });
2141
2149
  case "success":
@@ -2147,7 +2155,7 @@ const Hr = !1, Ka = (e, r) => r != null && r.fileType ? e.startsWith("image/") ?
2147
2155
  }
2148
2156
  switch (e) {
2149
2157
  case "error":
2150
- return /* @__PURE__ */ o(_r, { size: 20 });
2158
+ return /* @__PURE__ */ o(Ar, { size: 20 });
2151
2159
  case "uploading":
2152
2160
  return /* @__PURE__ */ o("span", { style: { fontSize: "12px", color: ((b = r == null ? void 0 : r.colors) == null ? void 0 : b.primary) || "#007bff" }, children: "上传中..." });
2153
2161
  case "pending":
@@ -2165,7 +2173,7 @@ pa`
2165
2173
  padding: 0px !important;
2166
2174
  }
2167
2175
  `;
2168
- const Xa = ({
2176
+ const Pa = ({
2169
2177
  item: e,
2170
2178
  index: r,
2171
2179
  theme: t,
@@ -2176,19 +2184,19 @@ const Xa = ({
2176
2184
  icons: d
2177
2185
  }) => {
2178
2186
  var f;
2179
- return /* @__PURE__ */ O(Ea, { $theme: t, $status: e.status, $hasForm: s.length > 0, children: [
2180
- /* @__PURE__ */ O(qa, { $theme: t, $status: e.status, $hasForm: s.length > 0, children: [
2187
+ return /* @__PURE__ */ L(Ea, { $theme: t, $status: e.status, $hasForm: s.length > 0, children: [
2188
+ /* @__PURE__ */ L(qa, { $theme: t, $status: e.status, $hasForm: s.length > 0, children: [
2181
2189
  /* @__PURE__ */ o(La, { $theme: t, children: Ka(e.type, d) }),
2182
- /* @__PURE__ */ O(Oa, { children: [
2183
- /* @__PURE__ */ O("div", { className: "flex items-center gap-1 line-clamp-1", children: [
2184
- /* @__PURE__ */ o(ja, { $theme: t, children: e.name }),
2190
+ /* @__PURE__ */ L(ja, { children: [
2191
+ /* @__PURE__ */ L("div", { className: "flex items-center gap-1 line-clamp-1", children: [
2192
+ /* @__PURE__ */ o(Oa, { $theme: t, children: e.name }),
2185
2193
  /* @__PURE__ */ o(Ha, { $theme: t, children: sa(e.size) })
2186
2194
  ] }),
2187
2195
  e.status === "uploading" && /* @__PURE__ */ o(Ya, { $theme: t, $progress: e.progress }),
2188
2196
  e.status === "error" && e.error && /* @__PURE__ */ o("div", { style: { color: ((f = t == null ? void 0 : t.colors) == null ? void 0 : f.error) || "#FF0000", fontSize: "12px", marginTop: "4px" }, children: typeof e.error == "string" ? e.error : String(e.error) })
2189
2197
  ] }),
2190
2198
  (() => {
2191
- const N = Pa(e.status, t, d);
2199
+ const N = Xa(e.status, t, d);
2192
2200
  return N && /* @__PURE__ */ o(Ia, { $theme: t, $status: e.status, children: N });
2193
2201
  })(),
2194
2202
  Hr,
@@ -2215,28 +2223,28 @@ const Xa = ({
2215
2223
  initialValues: e.formData || {},
2216
2224
  size: "sm",
2217
2225
  formProps: { component: !1 },
2218
- eventsEmit: (N, M) => {
2219
- switch (console.log("DynamicForm Event:", N, M), N) {
2226
+ eventsEmit: (N, F) => {
2227
+ switch (console.log("DynamicForm Event:", N, F), N) {
2220
2228
  case "form:submit":
2221
- p(e.id, M.values);
2229
+ p(e.id, F.values);
2222
2230
  break;
2223
2231
  case "form:change":
2224
- p(e.id, M.values);
2232
+ p(e.id, F.values);
2225
2233
  break;
2226
2234
  case "form:fieldChange":
2227
- if (M.field && M.value !== void 0) {
2228
- const C = {
2235
+ if (F.field && F.value !== void 0) {
2236
+ const M = {
2229
2237
  ...e.formData,
2230
- [M.field]: M.value
2238
+ [F.field]: F.value
2231
2239
  };
2232
- p(e.id, C);
2240
+ p(e.id, M);
2233
2241
  }
2234
2242
  break;
2235
2243
  case "form:reset":
2236
2244
  p(e.id, {});
2237
2245
  break;
2238
2246
  case "form:validate":
2239
- M.values && p(e.id, M.values);
2247
+ F.values && p(e.id, F.values);
2240
2248
  break;
2241
2249
  }
2242
2250
  },
@@ -2266,24 +2274,24 @@ const Xa = ({
2266
2274
  // 默认查询参数
2267
2275
  itemForm: f = [],
2268
2276
  styles: N,
2269
- buttons: M = [],
2277
+ buttons: F = [],
2270
2278
  // 新增:自定义按钮数组
2271
- errorMessages: C = {},
2279
+ errorMessages: M = {},
2272
2280
  // 新增:错误提示配置
2273
- icons: W,
2281
+ icons: O,
2274
2282
  // 新增:图标配置
2275
2283
  eventsEmit: l,
2276
- onRef: _,
2277
- placeholder: U,
2278
- listName: ae
2284
+ onRef: $,
2285
+ placeholder: H,
2286
+ listName: P
2279
2287
  }) => {
2280
- var H, Y;
2288
+ var Y, I;
2281
2289
  const te = Fe(), a = $e(
2282
2290
  // 基础:默认主题 + useTheme的配置
2283
2291
  $e({ theme: B, mode: "light" }, te),
2284
2292
  // 最高层:用户手动传入的styles
2285
2293
  N
2286
- ), T = Te(null), [v, V] = ie(!1), [A, E] = ie([]), j = he((i) => (i ?? A).map((c) => ({
2294
+ ), T = Te(null), [w, V] = ie(!1), [_, E] = ie([]), j = he((i) => (i ?? _).map((c) => ({
2287
2295
  id: c.id,
2288
2296
  name: c.name,
2289
2297
  status: c.status,
@@ -2293,15 +2301,15 @@ const Xa = ({
2293
2301
  file: c.file,
2294
2302
  size: c.size,
2295
2303
  type: c.type
2296
- })), [A]), Q = Se(() => {
2297
- if (!U) return null;
2298
- if (typeof U == "string") {
2299
- let i = U;
2304
+ })), [_]), ee = Se(() => {
2305
+ if (!H) return null;
2306
+ if (typeof H == "string") {
2307
+ let i = H;
2300
2308
  return i = i.replace(/<br\s*\/?>(?=\s*)/gi, `
2301
2309
  `), i = i.replace(/\s*\/n\s*/gi, `
2302
2310
  `), i = i.replace(/\\n/g, `
2303
2311
  `), /* @__PURE__ */ o(
2304
- jr,
2312
+ Or,
2305
2313
  {
2306
2314
  $theme: a.theme || B,
2307
2315
  style: {
@@ -2312,32 +2320,32 @@ const Xa = ({
2312
2320
  }
2313
2321
  );
2314
2322
  }
2315
- return U;
2316
- }, [U, a.theme]), X = {
2323
+ return H;
2324
+ }, [H, a.theme]), Z = {
2317
2325
  noUrl: "请提供上传接口地址 (url)",
2318
2326
  uploadFailed: "上传失败,请重试",
2319
2327
  fileTooLarge: `文件大小不能超过 ${t}MB`,
2320
2328
  invalidFileType: "不支持的文件类型"
2321
- }, R = { ...X, ...C }, ee = (i, u) => R[i] ? R[i] : u || X[i], G = (i) => {
2329
+ }, W = { ...Z, ...M }, re = (i, u) => W[i] ? W[i] : u || Z[i], G = (i) => {
2322
2330
  const u = i / 1048576;
2323
2331
  return `${Number(u.toFixed(2))}MB`;
2324
- }, S = he(
2332
+ }, C = he(
2325
2333
  (i, u) => {
2326
- const c = t * 1024 * 1024, n = [], z = [];
2334
+ const c = t * 1024 * 1024, n = [], A = [];
2327
2335
  if (i.forEach((g) => {
2328
- g.size > c ? n.push(g) : z.push(g);
2336
+ g.size > c ? n.push(g) : A.push(g);
2329
2337
  }), n.length > 0) {
2330
- const g = n.map((ye) => `${ye.name}(${G(ye.size)})`).join("、"), re = `${ee("fileTooLarge")}:${g}`;
2338
+ const g = n.map((ye) => `${ye.name}(${G(ye.size)})`).join("、"), ae = `${re("fileTooLarge")}:${g}`;
2331
2339
  l == null || l("uploader:error", {
2332
2340
  type: "fileTooLarge",
2333
- message: re,
2341
+ message: ae,
2334
2342
  files: n.map((ye) => ({ name: ye.name, size: ye.size })),
2335
2343
  limit: `${t}MB`,
2336
2344
  data: j()
2337
2345
  });
2338
2346
  }
2339
- const F = Math.max(0, s - u);
2340
- if (F <= 0) {
2347
+ const D = Math.max(0, s - u);
2348
+ if (D <= 0) {
2341
2349
  const g = `最多只能上传 ${s} 个文件,已存在 ${u} 个,无法继续添加。`;
2342
2350
  return l == null || l("uploader:error", {
2343
2351
  type: "tooManyFiles",
@@ -2348,12 +2356,12 @@ const Xa = ({
2348
2356
  data: j()
2349
2357
  }), [];
2350
2358
  }
2351
- const m = z.slice(0, F);
2352
- if (z.length > F) {
2353
- const g = z.length - m.length, re = `最多只能上传 ${s} 个文件,本次仅接受 ${m.length} 个,忽略 ${g} 个。`;
2359
+ const m = A.slice(0, D);
2360
+ if (A.length > D) {
2361
+ const g = A.length - m.length, ae = `最多只能上传 ${s} 个文件,本次仅接受 ${m.length} 个,忽略 ${g} 个。`;
2354
2362
  l == null || l("uploader:error", {
2355
2363
  type: "tooManyFiles",
2356
- message: re,
2364
+ message: ae,
2357
2365
  currentCount: u,
2358
2366
  accepted: m.length,
2359
2367
  dropped: g,
@@ -2363,14 +2371,14 @@ const Xa = ({
2363
2371
  }
2364
2372
  return m;
2365
2373
  },
2366
- [t, s, ee, l, j]
2374
+ [t, s, re, l, j]
2367
2375
  ), y = Se(
2368
2376
  () => ({
2369
2377
  // 获取所有上传项
2370
- getUploadItems: () => A,
2378
+ getUploadItems: () => _,
2371
2379
  // 获取所有上传项的数据(包含表单数据)
2372
2380
  getUploadItemsData: (i) => {
2373
- let u = A;
2381
+ let u = _;
2374
2382
  return i != null && i.includeStatus && (u = u.filter(
2375
2383
  (c) => i.includeStatus.includes(c.status)
2376
2384
  )), i != null && i.excludeStatus && (u = u.filter(
@@ -2406,10 +2414,10 @@ const Xa = ({
2406
2414
  },
2407
2415
  // 添加新的上传项(对外方法也应用限流)
2408
2416
  addUploadItems: (i) => {
2409
- const u = S(i, A.length);
2417
+ const u = C(i, _.length);
2410
2418
  if (u.length === 0) return;
2411
2419
  const c = u.map((n) => ({
2412
- id: Or(),
2420
+ id: jr(),
2413
2421
  file: n,
2414
2422
  name: n.name,
2415
2423
  size: n.size,
@@ -2419,7 +2427,7 @@ const Xa = ({
2419
2427
  formData: {},
2420
2428
  isExpanded: !1
2421
2429
  }));
2422
- E((n) => [...n, ...c]), h && q(c);
2430
+ E((n) => [...n, ...c]), h && R(c);
2423
2431
  },
2424
2432
  // 移除指定上传项
2425
2433
  removeUploadItem: (i) => {
@@ -2433,20 +2441,20 @@ const Xa = ({
2433
2441
  });
2434
2442
  },
2435
2443
  // 验证表单数据
2436
- validateFormData: async () => !(A.some((n) => n.status === "error") || A.some((n) => n.status === "uploading") || !A.some((n) => n.status === "success"))
2444
+ validateFormData: async () => !(_.some((n) => n.status === "error") || _.some((n) => n.status === "uploading") || !_.some((n) => n.status === "success"))
2437
2445
  }),
2438
- [A, h, l, S, j]
2446
+ [_, h, l, C, j]
2439
2447
  );
2440
2448
  we(() => {
2441
- _ && _(y);
2442
- }, [y, _]);
2449
+ $ && $(y);
2450
+ }, [y, $]);
2443
2451
  const x = he(
2444
2452
  (i) => {
2445
2453
  if (!i) return;
2446
- const u = S(Array.from(i), A.length);
2454
+ const u = C(Array.from(i), _.length);
2447
2455
  if (u.length === 0) return;
2448
2456
  const c = u.map((n) => ({
2449
- id: Or(),
2457
+ id: jr(),
2450
2458
  file: n,
2451
2459
  name: n.name,
2452
2460
  size: n.size,
@@ -2457,22 +2465,22 @@ const Xa = ({
2457
2465
  // 每个item独立的表单数据
2458
2466
  isExpanded: !1
2459
2467
  }));
2460
- E((n) => [...n, ...c]), h && q(c);
2468
+ E((n) => [...n, ...c]), h && R(c);
2461
2469
  },
2462
- [h, A.length, S]
2463
- ), D = he((i) => {
2470
+ [h, _.length, C]
2471
+ ), z = he((i) => {
2464
2472
  i.preventDefault(), V(!0);
2465
- }, []), w = he((i) => {
2473
+ }, []), k = he((i) => {
2466
2474
  i.preventDefault(), V(!1);
2467
- }, []), L = he(
2475
+ }, []), q = he(
2468
2476
  (i) => {
2469
2477
  i.preventDefault(), V(!1), x(i.dataTransfer.files);
2470
2478
  },
2471
2479
  [x]
2472
- ), q = he(
2480
+ ), R = he(
2473
2481
  async (i) => {
2474
2482
  if (!b) {
2475
- console.error(ee("noUrl"));
2483
+ console.error(re("noUrl"));
2476
2484
  return;
2477
2485
  }
2478
2486
  l == null || l("uploader:start", { items: i, data: j() });
@@ -2482,8 +2490,8 @@ const Xa = ({
2482
2490
  (m) => m.map((g) => g.id === u.id ? { ...g, status: "uploading" } : g)
2483
2491
  );
2484
2492
  const c = await za(u.file, b, p, d, (m) => {
2485
- E((g) => g.map((re) => re.id === u.id ? { ...re, progress: m } : re)), l == null || l("uploader:progress", { item: { ...u, progress: m }, data: j() });
2486
- }), n = Da(u, f), z = {
2493
+ E((g) => g.map((ae) => ae.id === u.id ? { ...ae, progress: m } : ae)), l == null || l("uploader:progress", { item: { ...u, progress: m }, data: j() });
2494
+ }), n = Da(u, f), A = {
2487
2495
  ...u,
2488
2496
  status: "success",
2489
2497
  uploadApiRes: c,
@@ -2492,8 +2500,8 @@ const Xa = ({
2492
2500
  // 使用自动填充后的表单数据
2493
2501
  isExpanded: f.length > 0
2494
2502
  // 上传成功后,如果有表单配置则默认展开
2495
- }, F = A.map((m) => m.id === u.id ? z : m);
2496
- E((m) => m.map((g) => g.id === u.id ? z : g)), l == null || l("uploader:success", { item: z, data: j(F) });
2503
+ }, D = _.map((m) => m.id === u.id ? A : m);
2504
+ E((m) => m.map((g) => g.id === u.id ? A : g)), l == null || l("uploader:success", { item: A, data: j(D) });
2497
2505
  } catch (c) {
2498
2506
  let n = "";
2499
2507
  if (console.log("上传错误详情:", c), c && typeof c == "object") {
@@ -2553,14 +2561,14 @@ const Xa = ({
2553
2561
  console.log("错误消息解析失败:", g), n = m.message;
2554
2562
  }
2555
2563
  }
2556
- n || (n = ee("uploadFailed")), console.log("最终使用的错误信息:", n);
2557
- const z = { ...u, status: "error", error: n }, F = A.map((m) => m.id === u.id ? z : m);
2558
- E((m) => m.map((g) => g.id === u.id ? z : g)), l == null || l("uploader:error", { item: z, error: n, data: j(F) });
2564
+ n || (n = re("uploadFailed")), console.log("最终使用的错误信息:", n);
2565
+ const A = { ...u, status: "error", error: n }, D = _.map((m) => m.id === u.id ? A : m);
2566
+ E((m) => m.map((g) => g.id === u.id ? A : g)), l == null || l("uploader:error", { item: A, error: n, data: j(D) });
2559
2567
  }
2560
- l == null || l("uploader:complete", { items: A, data: j() });
2568
+ l == null || l("uploader:complete", { items: _, data: j() });
2561
2569
  },
2562
- [b, p, d, l, A, f, R.uploadFailed, j]
2563
- ), Z = he(
2570
+ [b, p, d, l, _, f, W.uploadFailed, j]
2571
+ ), Q = he(
2564
2572
  (i) => {
2565
2573
  E((u) => {
2566
2574
  const c = u.find((n) => n.id === i);
@@ -2572,7 +2580,7 @@ const Xa = ({
2572
2580
  });
2573
2581
  },
2574
2582
  [l, j]
2575
- ), P = he(
2583
+ ), X = he(
2576
2584
  (i) => {
2577
2585
  E(
2578
2586
  (u) => u.map((c) => {
@@ -2593,24 +2601,24 @@ const Xa = ({
2593
2601
  );
2594
2602
  },
2595
2603
  [l, j]
2596
- ), k = he(
2604
+ ), S = he(
2597
2605
  (i, u) => {
2598
2606
  console.log("FormData Change:", i, u), E((c) => {
2599
- const n = c.map((z) => {
2600
- if (z.id === i) {
2601
- const F = {
2602
- ...z,
2607
+ const n = c.map((A) => {
2608
+ if (A.id === i) {
2609
+ const D = {
2610
+ ...A,
2603
2611
  formData: { ...u }
2604
2612
  // 确保数据是深拷贝
2605
2613
  };
2606
2614
  return l == null || l("uploader:formDataChange", {
2607
2615
  itemId: i,
2608
- formData: F.formData,
2609
- item: F,
2616
+ formData: D.formData,
2617
+ item: D,
2610
2618
  data: j(c)
2611
- }), F;
2619
+ }), D;
2612
2620
  }
2613
- return z;
2621
+ return A;
2614
2622
  });
2615
2623
  return l == null || l("uploader:dataChange", {
2616
2624
  items: n,
@@ -2622,30 +2630,30 @@ const Xa = ({
2622
2630
  },
2623
2631
  [l, j]
2624
2632
  );
2625
- return /* @__PURE__ */ O("div", { children: [
2626
- /* @__PURE__ */ O(
2627
- _a,
2633
+ return /* @__PURE__ */ L("div", { children: [
2634
+ /* @__PURE__ */ L(
2635
+ Aa,
2628
2636
  {
2629
2637
  $theme: a.theme || B,
2630
- $isDragOver: v,
2631
- onDragOver: D,
2632
- onDragLeave: w,
2633
- onDrop: L,
2638
+ $isDragOver: w,
2639
+ onDragOver: z,
2640
+ onDragLeave: k,
2641
+ onDrop: q,
2634
2642
  onClick: () => {
2635
2643
  var i;
2636
2644
  T.current && (T.current.value = ""), (i = T.current) == null || i.click();
2637
2645
  },
2638
2646
  children: [
2639
- /* @__PURE__ */ o(Aa, { $theme: a.theme || B, children: (W == null ? void 0 : W.dragUpload) || /* @__PURE__ */ o(ma, { size: 48 }) }),
2640
- Q || /* @__PURE__ */ O(na, { children: [
2647
+ /* @__PURE__ */ o(_a, { $theme: a.theme || B, children: (O == null ? void 0 : O.dragUpload) || /* @__PURE__ */ o(ma, { size: 48 }) }),
2648
+ ee || /* @__PURE__ */ L(na, { children: [
2641
2649
  /* @__PURE__ */ o(Ba, { $theme: a.theme || B, children: "拖拽文件到此处或点击选择文件" }),
2642
- /* @__PURE__ */ O(jr, { $theme: a.theme || B, children: [
2650
+ /* @__PURE__ */ L(Or, { $theme: a.theme || B, children: [
2643
2651
  "支持 ",
2644
2652
  r,
2645
2653
  " 格式,单个文件最大 ",
2646
2654
  t,
2647
2655
  "MB",
2648
- !b && /* @__PURE__ */ o("div", { style: { color: ((Y = (H = a.theme) == null ? void 0 : H.colors) == null ? void 0 : Y.error) || "#FF0000", marginTop: "8px", fontSize: "12px" }, children: ee("noUrl") })
2656
+ !b && /* @__PURE__ */ o("div", { style: { color: ((I = (Y = a.theme) == null ? void 0 : Y.colors) == null ? void 0 : I.error) || "#FF0000", marginTop: "8px", fontSize: "12px" }, children: re("noUrl") })
2649
2657
  ] })
2650
2658
  ] })
2651
2659
  ]
@@ -2663,19 +2671,19 @@ const Xa = ({
2663
2671
  }
2664
2672
  }
2665
2673
  ),
2666
- A.length > 0 && /* @__PURE__ */ O("div", { children: [
2667
- /* @__PURE__ */ O("div", { style: {
2674
+ _.length > 0 && /* @__PURE__ */ L("div", { children: [
2675
+ /* @__PURE__ */ L("div", { style: {
2668
2676
  display: "flex",
2669
2677
  justifyContent: "space-between",
2670
2678
  alignItems: "center",
2671
2679
  margin: "6px 0px"
2672
2680
  }, children: [
2673
- /* @__PURE__ */ o("div", { className: "text-[14px] font-bold opacity-60", children: ae || "上传文件列表" }),
2674
- M.length > 0 && /* @__PURE__ */ o("div", { style: {
2681
+ /* @__PURE__ */ o("div", { className: "text-[14px] font-bold opacity-60", children: P || "上传文件列表" }),
2682
+ F.length > 0 && /* @__PURE__ */ o("div", { style: {
2675
2683
  display: "flex",
2676
2684
  gap: "8px",
2677
2685
  alignItems: "center"
2678
- }, children: M.map((i, u) => /* @__PURE__ */ o(
2686
+ }, children: F.map((i, u) => /* @__PURE__ */ o(
2679
2687
  er,
2680
2688
  {
2681
2689
  mode: i.mode || "default",
@@ -2688,17 +2696,17 @@ const Xa = ({
2688
2696
  u
2689
2697
  )) })
2690
2698
  ] }),
2691
- /* @__PURE__ */ o(Ra, { $theme: a.theme || B, children: A.map((i, u) => /* @__PURE__ */ o(
2692
- Xa,
2699
+ /* @__PURE__ */ o(Ra, { $theme: a.theme || B, children: _.map((i, u) => /* @__PURE__ */ o(
2700
+ Pa,
2693
2701
  {
2694
2702
  item: i,
2695
2703
  index: u,
2696
2704
  itemForm: f,
2697
- onRemove: Z,
2698
- onToggleExpand: P,
2699
- onFormDataChange: k,
2705
+ onRemove: Q,
2706
+ onToggleExpand: X,
2707
+ onFormDataChange: S,
2700
2708
  theme: a.theme || B,
2701
- icons: W
2709
+ icons: O
2702
2710
  },
2703
2711
  i.id
2704
2712
  )) })
@@ -2710,7 +2718,7 @@ const Xa = ({
2710
2718
  const s = t.name ?? t.key;
2711
2719
  t.defaultValue !== void 0 && s && (r[s] = t.defaultValue);
2712
2720
  }), r;
2713
- }, _t = (e, r) => {
2721
+ }, At = (e, r) => {
2714
2722
  const t = {};
2715
2723
  return r.forEach((s) => {
2716
2724
  var d;
@@ -2745,7 +2753,7 @@ const Xa = ({
2745
2753
  }
2746
2754
  });
2747
2755
  }), t;
2748
- }, At = (e = 5) => {
2756
+ }, _t = (e = 5) => {
2749
2757
  const r = [];
2750
2758
  for (let t = 0; t < e; t++) {
2751
2759
  const s = ["input", "select", "radio", "checkbox", "date", "number"], h = s[t % s.length];
@@ -2787,256 +2795,256 @@ function da() {
2787
2795
  (function(t, s) {
2788
2796
  e.exports = s();
2789
2797
  })(Za, (function() {
2790
- var t = 1e3, s = 6e4, h = 36e5, b = "millisecond", p = "second", d = "minute", f = "hour", N = "day", M = "week", C = "month", W = "quarter", l = "year", _ = "date", U = "Invalid Date", ae = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, te = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, a = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(S) {
2791
- var y = ["th", "st", "nd", "rd"], x = S % 100;
2792
- return "[" + S + (y[(x - 20) % 10] || y[x] || y[0]) + "]";
2793
- } }, T = function(S, y, x) {
2794
- var D = String(S);
2795
- return !D || D.length >= y ? S : "" + Array(y + 1 - D.length).join(x) + S;
2796
- }, v = { s: T, z: function(S) {
2797
- var y = -S.utcOffset(), x = Math.abs(y), D = Math.floor(x / 60), w = x % 60;
2798
- return (y <= 0 ? "+" : "-") + T(D, 2, "0") + ":" + T(w, 2, "0");
2799
- }, m: function S(y, x) {
2800
- if (y.date() < x.date()) return -S(x, y);
2801
- var D = 12 * (x.year() - y.year()) + (x.month() - y.month()), w = y.clone().add(D, C), L = x - w < 0, q = y.clone().add(D + (L ? -1 : 1), C);
2802
- return +(-(D + (x - w) / (L ? w - q : q - w)) || 0);
2803
- }, a: function(S) {
2804
- return S < 0 ? Math.ceil(S) || 0 : Math.floor(S);
2805
- }, p: function(S) {
2806
- return { M: C, y: l, w: M, d: N, D: _, h: f, m: d, s: p, ms: b, Q: W }[S] || String(S || "").toLowerCase().replace(/s$/, "");
2807
- }, u: function(S) {
2808
- return S === void 0;
2809
- } }, V = "en", A = {};
2810
- A[V] = a;
2811
- var E = "$isDayjsObject", j = function(S) {
2812
- return S instanceof ee || !(!S || !S[E]);
2813
- }, Q = function S(y, x, D) {
2814
- var w;
2798
+ var t = 1e3, s = 6e4, h = 36e5, b = "millisecond", p = "second", d = "minute", f = "hour", N = "day", F = "week", M = "month", O = "quarter", l = "year", $ = "date", H = "Invalid Date", P = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, te = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, a = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(C) {
2799
+ var y = ["th", "st", "nd", "rd"], x = C % 100;
2800
+ return "[" + C + (y[(x - 20) % 10] || y[x] || y[0]) + "]";
2801
+ } }, T = function(C, y, x) {
2802
+ var z = String(C);
2803
+ return !z || z.length >= y ? C : "" + Array(y + 1 - z.length).join(x) + C;
2804
+ }, w = { s: T, z: function(C) {
2805
+ var y = -C.utcOffset(), x = Math.abs(y), z = Math.floor(x / 60), k = x % 60;
2806
+ return (y <= 0 ? "+" : "-") + T(z, 2, "0") + ":" + T(k, 2, "0");
2807
+ }, m: function C(y, x) {
2808
+ if (y.date() < x.date()) return -C(x, y);
2809
+ var z = 12 * (x.year() - y.year()) + (x.month() - y.month()), k = y.clone().add(z, M), q = x - k < 0, R = y.clone().add(z + (q ? -1 : 1), M);
2810
+ return +(-(z + (x - k) / (q ? k - R : R - k)) || 0);
2811
+ }, a: function(C) {
2812
+ return C < 0 ? Math.ceil(C) || 0 : Math.floor(C);
2813
+ }, p: function(C) {
2814
+ return { M, y: l, w: F, d: N, D: $, h: f, m: d, s: p, ms: b, Q: O }[C] || String(C || "").toLowerCase().replace(/s$/, "");
2815
+ }, u: function(C) {
2816
+ return C === void 0;
2817
+ } }, V = "en", _ = {};
2818
+ _[V] = a;
2819
+ var E = "$isDayjsObject", j = function(C) {
2820
+ return C instanceof re || !(!C || !C[E]);
2821
+ }, ee = function C(y, x, z) {
2822
+ var k;
2815
2823
  if (!y) return V;
2816
2824
  if (typeof y == "string") {
2817
- var L = y.toLowerCase();
2818
- A[L] && (w = L), x && (A[L] = x, w = L);
2819
- var q = y.split("-");
2820
- if (!w && q.length > 1) return S(q[0]);
2825
+ var q = y.toLowerCase();
2826
+ _[q] && (k = q), x && (_[q] = x, k = q);
2827
+ var R = y.split("-");
2828
+ if (!k && R.length > 1) return C(R[0]);
2821
2829
  } else {
2822
- var Z = y.name;
2823
- A[Z] = y, w = Z;
2830
+ var Q = y.name;
2831
+ _[Q] = y, k = Q;
2824
2832
  }
2825
- return !D && w && (V = w), w || !D && V;
2826
- }, X = function(S, y) {
2827
- if (j(S)) return S.clone();
2833
+ return !z && k && (V = k), k || !z && V;
2834
+ }, Z = function(C, y) {
2835
+ if (j(C)) return C.clone();
2828
2836
  var x = typeof y == "object" ? y : {};
2829
- return x.date = S, x.args = arguments, new ee(x);
2830
- }, R = v;
2831
- R.l = Q, R.i = j, R.w = function(S, y) {
2832
- return X(S, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
2837
+ return x.date = C, x.args = arguments, new re(x);
2838
+ }, W = w;
2839
+ W.l = ee, W.i = j, W.w = function(C, y) {
2840
+ return Z(C, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
2833
2841
  };
2834
- var ee = (function() {
2835
- function S(x) {
2836
- this.$L = Q(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[E] = !0;
2842
+ var re = (function() {
2843
+ function C(x) {
2844
+ this.$L = ee(x.locale, null, !0), this.parse(x), this.$x = this.$x || x.x || {}, this[E] = !0;
2837
2845
  }
2838
- var y = S.prototype;
2846
+ var y = C.prototype;
2839
2847
  return y.parse = function(x) {
2840
- this.$d = (function(D) {
2841
- var w = D.date, L = D.utc;
2842
- if (w === null) return /* @__PURE__ */ new Date(NaN);
2843
- if (R.u(w)) return /* @__PURE__ */ new Date();
2844
- if (w instanceof Date) return new Date(w);
2845
- if (typeof w == "string" && !/Z$/i.test(w)) {
2846
- var q = w.match(ae);
2847
- if (q) {
2848
- var Z = q[2] - 1 || 0, P = (q[7] || "0").substring(0, 3);
2849
- return L ? new Date(Date.UTC(q[1], Z, q[3] || 1, q[4] || 0, q[5] || 0, q[6] || 0, P)) : new Date(q[1], Z, q[3] || 1, q[4] || 0, q[5] || 0, q[6] || 0, P);
2848
+ this.$d = (function(z) {
2849
+ var k = z.date, q = z.utc;
2850
+ if (k === null) return /* @__PURE__ */ new Date(NaN);
2851
+ if (W.u(k)) return /* @__PURE__ */ new Date();
2852
+ if (k instanceof Date) return new Date(k);
2853
+ if (typeof k == "string" && !/Z$/i.test(k)) {
2854
+ var R = k.match(P);
2855
+ if (R) {
2856
+ var Q = R[2] - 1 || 0, X = (R[7] || "0").substring(0, 3);
2857
+ return q ? new Date(Date.UTC(R[1], Q, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, X)) : new Date(R[1], Q, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, X);
2850
2858
  }
2851
2859
  }
2852
- return new Date(w);
2860
+ return new Date(k);
2853
2861
  })(x), this.init();
2854
2862
  }, y.init = function() {
2855
2863
  var x = this.$d;
2856
2864
  this.$y = x.getFullYear(), this.$M = x.getMonth(), this.$D = x.getDate(), this.$W = x.getDay(), this.$H = x.getHours(), this.$m = x.getMinutes(), this.$s = x.getSeconds(), this.$ms = x.getMilliseconds();
2857
2865
  }, y.$utils = function() {
2858
- return R;
2866
+ return W;
2859
2867
  }, y.isValid = function() {
2860
- return this.$d.toString() !== U;
2861
- }, y.isSame = function(x, D) {
2862
- var w = X(x);
2863
- return this.startOf(D) <= w && w <= this.endOf(D);
2864
- }, y.isAfter = function(x, D) {
2865
- return X(x) < this.startOf(D);
2866
- }, y.isBefore = function(x, D) {
2867
- return this.endOf(D) < X(x);
2868
- }, y.$g = function(x, D, w) {
2869
- return R.u(x) ? this[D] : this.set(w, x);
2868
+ return this.$d.toString() !== H;
2869
+ }, y.isSame = function(x, z) {
2870
+ var k = Z(x);
2871
+ return this.startOf(z) <= k && k <= this.endOf(z);
2872
+ }, y.isAfter = function(x, z) {
2873
+ return Z(x) < this.startOf(z);
2874
+ }, y.isBefore = function(x, z) {
2875
+ return this.endOf(z) < Z(x);
2876
+ }, y.$g = function(x, z, k) {
2877
+ return W.u(x) ? this[z] : this.set(k, x);
2870
2878
  }, y.unix = function() {
2871
2879
  return Math.floor(this.valueOf() / 1e3);
2872
2880
  }, y.valueOf = function() {
2873
2881
  return this.$d.getTime();
2874
- }, y.startOf = function(x, D) {
2875
- var w = this, L = !!R.u(D) || D, q = R.p(x), Z = function(n, z) {
2876
- var F = R.w(w.$u ? Date.UTC(w.$y, z, n) : new Date(w.$y, z, n), w);
2877
- return L ? F : F.endOf(N);
2878
- }, P = function(n, z) {
2879
- return R.w(w.toDate()[n].apply(w.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(z)), w);
2880
- }, k = this.$W, H = this.$M, Y = this.$D, i = "set" + (this.$u ? "UTC" : "");
2881
- switch (q) {
2882
+ }, y.startOf = function(x, z) {
2883
+ var k = this, q = !!W.u(z) || z, R = W.p(x), Q = function(n, A) {
2884
+ var D = W.w(k.$u ? Date.UTC(k.$y, A, n) : new Date(k.$y, A, n), k);
2885
+ return q ? D : D.endOf(N);
2886
+ }, X = function(n, A) {
2887
+ return W.w(k.toDate()[n].apply(k.toDate("s"), (q ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(A)), k);
2888
+ }, S = this.$W, Y = this.$M, I = this.$D, i = "set" + (this.$u ? "UTC" : "");
2889
+ switch (R) {
2882
2890
  case l:
2883
- return L ? Z(1, 0) : Z(31, 11);
2884
- case C:
2885
- return L ? Z(1, H) : Z(0, H + 1);
2891
+ return q ? Q(1, 0) : Q(31, 11);
2886
2892
  case M:
2887
- var u = this.$locale().weekStart || 0, c = (k < u ? k + 7 : k) - u;
2888
- return Z(L ? Y - c : Y + (6 - c), H);
2893
+ return q ? Q(1, Y) : Q(0, Y + 1);
2894
+ case F:
2895
+ var u = this.$locale().weekStart || 0, c = (S < u ? S + 7 : S) - u;
2896
+ return Q(q ? I - c : I + (6 - c), Y);
2889
2897
  case N:
2890
- case _:
2891
- return P(i + "Hours", 0);
2898
+ case $:
2899
+ return X(i + "Hours", 0);
2892
2900
  case f:
2893
- return P(i + "Minutes", 1);
2901
+ return X(i + "Minutes", 1);
2894
2902
  case d:
2895
- return P(i + "Seconds", 2);
2903
+ return X(i + "Seconds", 2);
2896
2904
  case p:
2897
- return P(i + "Milliseconds", 3);
2905
+ return X(i + "Milliseconds", 3);
2898
2906
  default:
2899
2907
  return this.clone();
2900
2908
  }
2901
2909
  }, y.endOf = function(x) {
2902
2910
  return this.startOf(x, !1);
2903
- }, y.$set = function(x, D) {
2904
- var w, L = R.p(x), q = "set" + (this.$u ? "UTC" : ""), Z = (w = {}, w[N] = q + "Date", w[_] = q + "Date", w[C] = q + "Month", w[l] = q + "FullYear", w[f] = q + "Hours", w[d] = q + "Minutes", w[p] = q + "Seconds", w[b] = q + "Milliseconds", w)[L], P = L === N ? this.$D + (D - this.$W) : D;
2905
- if (L === C || L === l) {
2906
- var k = this.clone().set(_, 1);
2907
- k.$d[Z](P), k.init(), this.$d = k.set(_, Math.min(this.$D, k.daysInMonth())).$d;
2908
- } else Z && this.$d[Z](P);
2911
+ }, y.$set = function(x, z) {
2912
+ var k, q = W.p(x), R = "set" + (this.$u ? "UTC" : ""), Q = (k = {}, k[N] = R + "Date", k[$] = R + "Date", k[M] = R + "Month", k[l] = R + "FullYear", k[f] = R + "Hours", k[d] = R + "Minutes", k[p] = R + "Seconds", k[b] = R + "Milliseconds", k)[q], X = q === N ? this.$D + (z - this.$W) : z;
2913
+ if (q === M || q === l) {
2914
+ var S = this.clone().set($, 1);
2915
+ S.$d[Q](X), S.init(), this.$d = S.set($, Math.min(this.$D, S.daysInMonth())).$d;
2916
+ } else Q && this.$d[Q](X);
2909
2917
  return this.init(), this;
2910
- }, y.set = function(x, D) {
2911
- return this.clone().$set(x, D);
2918
+ }, y.set = function(x, z) {
2919
+ return this.clone().$set(x, z);
2912
2920
  }, y.get = function(x) {
2913
- return this[R.p(x)]();
2914
- }, y.add = function(x, D) {
2915
- var w, L = this;
2921
+ return this[W.p(x)]();
2922
+ }, y.add = function(x, z) {
2923
+ var k, q = this;
2916
2924
  x = Number(x);
2917
- var q = R.p(D), Z = function(H) {
2918
- var Y = X(L);
2919
- return R.w(Y.date(Y.date() + Math.round(H * x)), L);
2925
+ var R = W.p(z), Q = function(Y) {
2926
+ var I = Z(q);
2927
+ return W.w(I.date(I.date() + Math.round(Y * x)), q);
2920
2928
  };
2921
- if (q === C) return this.set(C, this.$M + x);
2922
- if (q === l) return this.set(l, this.$y + x);
2923
- if (q === N) return Z(1);
2924
- if (q === M) return Z(7);
2925
- var P = (w = {}, w[d] = s, w[f] = h, w[p] = t, w)[q] || 1, k = this.$d.getTime() + x * P;
2926
- return R.w(k, this);
2927
- }, y.subtract = function(x, D) {
2928
- return this.add(-1 * x, D);
2929
+ if (R === M) return this.set(M, this.$M + x);
2930
+ if (R === l) return this.set(l, this.$y + x);
2931
+ if (R === N) return Q(1);
2932
+ if (R === F) return Q(7);
2933
+ var X = (k = {}, k[d] = s, k[f] = h, k[p] = t, k)[R] || 1, S = this.$d.getTime() + x * X;
2934
+ return W.w(S, this);
2935
+ }, y.subtract = function(x, z) {
2936
+ return this.add(-1 * x, z);
2929
2937
  }, y.format = function(x) {
2930
- var D = this, w = this.$locale();
2931
- if (!this.isValid()) return w.invalidDate || U;
2932
- var L = x || "YYYY-MM-DDTHH:mm:ssZ", q = R.z(this), Z = this.$H, P = this.$m, k = this.$M, H = w.weekdays, Y = w.months, i = w.meridiem, u = function(z, F, m, g) {
2933
- return z && (z[F] || z(D, L)) || m[F].slice(0, g);
2934
- }, c = function(z) {
2935
- return R.s(Z % 12 || 12, z, "0");
2936
- }, n = i || function(z, F, m) {
2937
- var g = z < 12 ? "AM" : "PM";
2938
+ var z = this, k = this.$locale();
2939
+ if (!this.isValid()) return k.invalidDate || H;
2940
+ var q = x || "YYYY-MM-DDTHH:mm:ssZ", R = W.z(this), Q = this.$H, X = this.$m, S = this.$M, Y = k.weekdays, I = k.months, i = k.meridiem, u = function(A, D, m, g) {
2941
+ return A && (A[D] || A(z, q)) || m[D].slice(0, g);
2942
+ }, c = function(A) {
2943
+ return W.s(Q % 12 || 12, A, "0");
2944
+ }, n = i || function(A, D, m) {
2945
+ var g = A < 12 ? "AM" : "PM";
2938
2946
  return m ? g.toLowerCase() : g;
2939
2947
  };
2940
- return L.replace(te, (function(z, F) {
2941
- return F || (function(m) {
2948
+ return q.replace(te, (function(A, D) {
2949
+ return D || (function(m) {
2942
2950
  switch (m) {
2943
2951
  case "YY":
2944
- return String(D.$y).slice(-2);
2952
+ return String(z.$y).slice(-2);
2945
2953
  case "YYYY":
2946
- return R.s(D.$y, 4, "0");
2954
+ return W.s(z.$y, 4, "0");
2947
2955
  case "M":
2948
- return k + 1;
2956
+ return S + 1;
2949
2957
  case "MM":
2950
- return R.s(k + 1, 2, "0");
2958
+ return W.s(S + 1, 2, "0");
2951
2959
  case "MMM":
2952
- return u(w.monthsShort, k, Y, 3);
2960
+ return u(k.monthsShort, S, I, 3);
2953
2961
  case "MMMM":
2954
- return u(Y, k);
2962
+ return u(I, S);
2955
2963
  case "D":
2956
- return D.$D;
2964
+ return z.$D;
2957
2965
  case "DD":
2958
- return R.s(D.$D, 2, "0");
2966
+ return W.s(z.$D, 2, "0");
2959
2967
  case "d":
2960
- return String(D.$W);
2968
+ return String(z.$W);
2961
2969
  case "dd":
2962
- return u(w.weekdaysMin, D.$W, H, 2);
2970
+ return u(k.weekdaysMin, z.$W, Y, 2);
2963
2971
  case "ddd":
2964
- return u(w.weekdaysShort, D.$W, H, 3);
2972
+ return u(k.weekdaysShort, z.$W, Y, 3);
2965
2973
  case "dddd":
2966
- return H[D.$W];
2974
+ return Y[z.$W];
2967
2975
  case "H":
2968
- return String(Z);
2976
+ return String(Q);
2969
2977
  case "HH":
2970
- return R.s(Z, 2, "0");
2978
+ return W.s(Q, 2, "0");
2971
2979
  case "h":
2972
2980
  return c(1);
2973
2981
  case "hh":
2974
2982
  return c(2);
2975
2983
  case "a":
2976
- return n(Z, P, !0);
2984
+ return n(Q, X, !0);
2977
2985
  case "A":
2978
- return n(Z, P, !1);
2986
+ return n(Q, X, !1);
2979
2987
  case "m":
2980
- return String(P);
2988
+ return String(X);
2981
2989
  case "mm":
2982
- return R.s(P, 2, "0");
2990
+ return W.s(X, 2, "0");
2983
2991
  case "s":
2984
- return String(D.$s);
2992
+ return String(z.$s);
2985
2993
  case "ss":
2986
- return R.s(D.$s, 2, "0");
2994
+ return W.s(z.$s, 2, "0");
2987
2995
  case "SSS":
2988
- return R.s(D.$ms, 3, "0");
2996
+ return W.s(z.$ms, 3, "0");
2989
2997
  case "Z":
2990
- return q;
2998
+ return R;
2991
2999
  }
2992
3000
  return null;
2993
- })(z) || q.replace(":", "");
3001
+ })(A) || R.replace(":", "");
2994
3002
  }));
2995
3003
  }, y.utcOffset = function() {
2996
3004
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
2997
- }, y.diff = function(x, D, w) {
2998
- var L, q = this, Z = R.p(D), P = X(x), k = (P.utcOffset() - this.utcOffset()) * s, H = this - P, Y = function() {
2999
- return R.m(q, P);
3005
+ }, y.diff = function(x, z, k) {
3006
+ var q, R = this, Q = W.p(z), X = Z(x), S = (X.utcOffset() - this.utcOffset()) * s, Y = this - X, I = function() {
3007
+ return W.m(R, X);
3000
3008
  };
3001
- switch (Z) {
3009
+ switch (Q) {
3002
3010
  case l:
3003
- L = Y() / 12;
3011
+ q = I() / 12;
3004
3012
  break;
3005
- case C:
3006
- L = Y();
3013
+ case M:
3014
+ q = I();
3007
3015
  break;
3008
- case W:
3009
- L = Y() / 3;
3016
+ case O:
3017
+ q = I() / 3;
3010
3018
  break;
3011
- case M:
3012
- L = (H - k) / 6048e5;
3019
+ case F:
3020
+ q = (Y - S) / 6048e5;
3013
3021
  break;
3014
3022
  case N:
3015
- L = (H - k) / 864e5;
3023
+ q = (Y - S) / 864e5;
3016
3024
  break;
3017
3025
  case f:
3018
- L = H / h;
3026
+ q = Y / h;
3019
3027
  break;
3020
3028
  case d:
3021
- L = H / s;
3029
+ q = Y / s;
3022
3030
  break;
3023
3031
  case p:
3024
- L = H / t;
3032
+ q = Y / t;
3025
3033
  break;
3026
3034
  default:
3027
- L = H;
3035
+ q = Y;
3028
3036
  }
3029
- return w ? L : R.a(L);
3037
+ return k ? q : W.a(q);
3030
3038
  }, y.daysInMonth = function() {
3031
- return this.endOf(C).$D;
3039
+ return this.endOf(M).$D;
3032
3040
  }, y.$locale = function() {
3033
- return A[this.$L];
3034
- }, y.locale = function(x, D) {
3041
+ return _[this.$L];
3042
+ }, y.locale = function(x, z) {
3035
3043
  if (!x) return this.$L;
3036
- var w = this.clone(), L = Q(x, D, !0);
3037
- return L && (w.$L = L), w;
3044
+ var k = this.clone(), q = ee(x, z, !0);
3045
+ return q && (k.$L = q), k;
3038
3046
  }, y.clone = function() {
3039
- return R.w(this.$d, this);
3047
+ return W.w(this.$d, this);
3040
3048
  }, y.toDate = function() {
3041
3049
  return new Date(this.valueOf());
3042
3050
  }, y.toJSON = function() {
@@ -3045,17 +3053,17 @@ function da() {
3045
3053
  return this.$d.toISOString();
3046
3054
  }, y.toString = function() {
3047
3055
  return this.$d.toUTCString();
3048
- }, S;
3049
- })(), G = ee.prototype;
3050
- return X.prototype = G, [["$ms", b], ["$s", p], ["$m", d], ["$H", f], ["$W", N], ["$M", C], ["$y", l], ["$D", _]].forEach((function(S) {
3051
- G[S[1]] = function(y) {
3052
- return this.$g(y, S[0], S[1]);
3056
+ }, C;
3057
+ })(), G = re.prototype;
3058
+ return Z.prototype = G, [["$ms", b], ["$s", p], ["$m", d], ["$H", f], ["$W", N], ["$M", M], ["$y", l], ["$D", $]].forEach((function(C) {
3059
+ G[C[1]] = function(y) {
3060
+ return this.$g(y, C[0], C[1]);
3053
3061
  };
3054
- })), X.extend = function(S, y) {
3055
- return S.$i || (S(y, ee, X), S.$i = !0), X;
3056
- }, X.locale = Q, X.isDayjs = j, X.unix = function(S) {
3057
- return X(1e3 * S);
3058
- }, X.en = A[V], X.Ls = A, X.p = {}, X;
3062
+ })), Z.extend = function(C, y) {
3063
+ return C.$i || (C(y, re, Z), C.$i = !0), Z;
3064
+ }, Z.locale = ee, Z.isDayjs = j, Z.unix = function(C) {
3065
+ return Z(1e3 * C);
3066
+ }, Z.en = _[V], Z.Ls = _, Z.p = {}, Z;
3059
3067
  }));
3060
3068
  })(sr)), sr.exports;
3061
3069
  }
@@ -3070,28 +3078,28 @@ function rt() {
3070
3078
  return function(t, s, h) {
3071
3079
  t = t || {};
3072
3080
  var b = s.prototype, p = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
3073
- function d(N, M, C, W) {
3074
- return b.fromToBase(N, M, C, W);
3081
+ function d(N, F, M, O) {
3082
+ return b.fromToBase(N, F, M, O);
3075
3083
  }
3076
- h.en.relativeTime = p, b.fromToBase = function(N, M, C, W, l) {
3077
- for (var _, U, ae, te = C.$locale().relativeTime || p, a = t.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], T = a.length, v = 0; v < T; v += 1) {
3078
- var V = a[v];
3079
- V.d && (_ = W ? h(N).diff(C, V.d, !0) : C.diff(N, V.d, !0));
3080
- var A = (t.rounding || Math.round)(Math.abs(_));
3081
- if (ae = _ > 0, A <= V.r || !V.r) {
3082
- A <= 1 && v > 0 && (V = a[v - 1]);
3084
+ h.en.relativeTime = p, b.fromToBase = function(N, F, M, O, l) {
3085
+ for (var $, H, P, te = M.$locale().relativeTime || p, a = t.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], T = a.length, w = 0; w < T; w += 1) {
3086
+ var V = a[w];
3087
+ V.d && ($ = O ? h(N).diff(M, V.d, !0) : M.diff(N, V.d, !0));
3088
+ var _ = (t.rounding || Math.round)(Math.abs($));
3089
+ if (P = $ > 0, _ <= V.r || !V.r) {
3090
+ _ <= 1 && w > 0 && (V = a[w - 1]);
3083
3091
  var E = te[V.l];
3084
- l && (A = l("" + A)), U = typeof E == "string" ? E.replace("%d", A) : E(A, M, V.l, ae);
3092
+ l && (_ = l("" + _)), H = typeof E == "string" ? E.replace("%d", _) : E(_, F, V.l, P);
3085
3093
  break;
3086
3094
  }
3087
3095
  }
3088
- if (M) return U;
3089
- var j = ae ? te.future : te.past;
3090
- return typeof j == "function" ? j(U) : j.replace("%s", U);
3091
- }, b.to = function(N, M) {
3092
- return d(N, M, this, !0);
3093
- }, b.from = function(N, M) {
3094
- return d(N, M, this);
3096
+ if (F) return H;
3097
+ var j = P ? te.future : te.past;
3098
+ return typeof j == "function" ? j(H) : j.replace("%s", H);
3099
+ }, b.to = function(N, F) {
3100
+ return d(N, F, this, !0);
3101
+ }, b.from = function(N, F) {
3102
+ return d(N, F, this);
3095
3103
  };
3096
3104
  var f = function(N) {
3097
3105
  return N.$u ? h.utc() : h();
@@ -3176,35 +3184,35 @@ function it(e, r, t = {}) {
3176
3184
  render: (b, p, d) => {
3177
3185
  var te, a;
3178
3186
  const f = d == null ? void 0 : d.value;
3179
- let M = f && typeof f == "object" && (f.component || f.Comp) ? f.component || f.Comp : h.component;
3180
- if (typeof M == "string" && (M = ((te = r == null ? void 0 : r.customizeComponents) == null ? void 0 : te[M]) || ((a = t == null ? void 0 : t.customizeComponents) == null ? void 0 : a[M])), !M)
3187
+ let F = f && typeof f == "object" && (f.component || f.Comp) ? f.component || f.Comp : h.component;
3188
+ if (typeof F == "string" && (F = ((te = r == null ? void 0 : r.customizeComponents) == null ? void 0 : te[F]) || ((a = t == null ? void 0 : t.customizeComponents) == null ? void 0 : a[F])), !F)
3181
3189
  return h.fallback ?? null;
3182
- const C = f && typeof f == "object" && "data" in f ? f.data : d == null ? void 0 : d.value, W = typeof h.componentProps == "function" ? h.componentProps({ value: C, row: p, cell: d, col: h }) : h.componentProps || {}, l = f && typeof f == "object" && "props" in f ? f.props || {} : {};
3183
- let _ = {};
3190
+ const M = f && typeof f == "object" && "data" in f ? f.data : d == null ? void 0 : d.value, O = typeof h.componentProps == "function" ? h.componentProps({ value: M, row: p, cell: d, col: h }) : h.componentProps || {}, l = f && typeof f == "object" && "props" in f ? f.props || {} : {};
3191
+ let $ = {};
3184
3192
  if (f && typeof f == "object") {
3185
3193
  const T = /* @__PURE__ */ new Set(["component", "Comp", "props"]);
3186
- Object.keys(f).forEach((v) => {
3187
- T.has(v) || (_[v] = f[v]);
3194
+ Object.keys(f).forEach((w) => {
3195
+ T.has(w) || ($[w] = f[w]);
3188
3196
  });
3189
3197
  }
3190
- const ae = {
3191
- value: C,
3198
+ const P = {
3199
+ value: M,
3192
3200
  row: p,
3193
3201
  cell: d,
3194
3202
  col: h,
3195
- emit: (T, v) => {
3203
+ emit: (T, w) => {
3196
3204
  var V;
3197
- return (V = r == null ? void 0 : r.eventsEmit) == null ? void 0 : V.call(r, T, { row: p, cell: d, col: h, data: v });
3205
+ return (V = r == null ? void 0 : r.eventsEmit) == null ? void 0 : V.call(r, T, { row: p, cell: d, col: h, data: w });
3198
3206
  },
3199
- ...W,
3200
- ..._,
3207
+ ...O,
3208
+ ...$,
3201
3209
  ...l
3202
3210
  };
3203
- if (me.isValidElement(M))
3204
- return me.cloneElement(M, ae);
3205
- if (typeof M == "function") {
3206
- const T = M;
3207
- return me.createElement(T, ae);
3211
+ if (me.isValidElement(F))
3212
+ return me.cloneElement(F, P);
3213
+ if (typeof F == "function") {
3214
+ const T = F;
3215
+ return me.createElement(T, P);
3208
3216
  }
3209
3217
  return h.fallback ?? null;
3210
3218
  }
@@ -3264,15 +3272,15 @@ function it(e, r, t = {}) {
3264
3272
  return {
3265
3273
  ...h,
3266
3274
  render: (b) => {
3267
- const p = h.maxRow || 1, d = h.maxWidth || 240, f = h.areaStyle || "default", N = 13, M = 1.6, C = N * M, W = p * C;
3275
+ const p = h.maxRow || 1, d = h.maxWidth || 240, f = h.areaStyle || "default", N = 13, F = 1.6, M = N * F, O = p * M;
3268
3276
  let l = {
3269
3277
  maxWidth: typeof d == "number" ? `${d}px` : d,
3270
- maxHeight: W,
3278
+ maxHeight: O,
3271
3279
  overflowY: "auto",
3272
3280
  color: f === "code" ? "#d4d4d4" : "#666",
3273
3281
  opacity: f === "code" ? 1 : 0.85,
3274
3282
  fontSize: N,
3275
- lineHeight: M,
3283
+ lineHeight: F,
3276
3284
  padding: "6px 10px",
3277
3285
  background: f === "code" ? "#1e1e1e" : "#f6f8fa",
3278
3286
  borderRadius: 6,
@@ -3330,16 +3338,16 @@ function it(e, r, t = {}) {
3330
3338
  render: (b, p, d) => {
3331
3339
  const f = r != null && r.isPending ? r.isPending(p.id) : !1;
3332
3340
  if (Array.isArray(b)) {
3333
- const M = b.map((C) => C && typeof C == "object" && (C.columnId === "actions" || C.type === "action") && "value" in C && !("mode" in C) ? {
3334
- value: C.value,
3335
- label: C.label || C.value,
3336
- icon: C.icon,
3337
- disabled: C.disabled,
3338
- key: C.key
3339
- } : C);
3340
- if (M.length >= 3) {
3341
- const C = M.slice(0, 2), W = M.slice(2);
3342
- return /* @__PURE__ */ O(
3341
+ const F = b.map((M) => M && typeof M == "object" && (M.columnId === "actions" || M.type === "action") && "value" in M && !("mode" in M) ? {
3342
+ value: M.value,
3343
+ label: M.label || M.value,
3344
+ icon: M.icon,
3345
+ disabled: M.disabled,
3346
+ key: M.key
3347
+ } : M);
3348
+ if (F.length >= 3) {
3349
+ const M = F.slice(0, 2), O = F.slice(2);
3350
+ return /* @__PURE__ */ L(
3343
3351
  "div",
3344
3352
  {
3345
3353
  style: {
@@ -3349,7 +3357,7 @@ function it(e, r, t = {}) {
3349
3357
  alignItems: "center"
3350
3358
  },
3351
3359
  children: [
3352
- C.map((l, _) => /* @__PURE__ */ o(
3360
+ M.map((l, $) => /* @__PURE__ */ o(
3353
3361
  er,
3354
3362
  {
3355
3363
  mode: l.mode || "text",
@@ -3360,20 +3368,20 @@ function it(e, r, t = {}) {
3360
3368
  style: { padding: "0 8px", minWidth: 0 },
3361
3369
  onClick: () => s == null ? void 0 : s(`table_action_${l.value}`, p)
3362
3370
  },
3363
- _
3371
+ $
3364
3372
  )),
3365
3373
  /* @__PURE__ */ o(
3366
3374
  va,
3367
3375
  {
3368
- actions: W.map((l, _) => ({
3369
- key: l.value || String(_),
3376
+ actions: O.map((l, $) => ({
3377
+ key: l.value || String($),
3370
3378
  label: l.label || l.value || "",
3371
3379
  icon: l.icon,
3372
3380
  disabled: l.disabled || f && l.value === "delete"
3373
3381
  })),
3374
3382
  onAction: (l) => {
3375
- const _ = W.find((U) => (U.value || String(U.key)) === l);
3376
- _ && !_.disabled && !(f && _.value === "delete") && (s == null || s(`table_action_${_.value}`, p));
3383
+ const $ = O.find((H) => (H.value || String(H.key)) === l);
3384
+ $ && !$.disabled && !(f && $.value === "delete") && (s == null || s(`table_action_${$.value}`, p));
3377
3385
  }
3378
3386
  }
3379
3387
  )
@@ -3381,18 +3389,18 @@ function it(e, r, t = {}) {
3381
3389
  }
3382
3390
  );
3383
3391
  } else
3384
- return /* @__PURE__ */ o("div", { style: { display: "flex", gap: 4, justifyContent: "center" }, children: M.map((C, W) => /* @__PURE__ */ o(
3392
+ return /* @__PURE__ */ o("div", { style: { display: "flex", gap: 4, justifyContent: "center" }, children: F.map((M, O) => /* @__PURE__ */ o(
3385
3393
  er,
3386
3394
  {
3387
- mode: C.mode || "text",
3388
- label: C.label || C.value || "",
3389
- icon: C.icon,
3390
- disabled: C.disabled || f && C.value === "delete",
3395
+ mode: M.mode || "text",
3396
+ label: M.label || M.value || "",
3397
+ icon: M.icon,
3398
+ disabled: M.disabled || f && M.value === "delete",
3391
3399
  styles: t,
3392
3400
  style: { padding: "0 8px", minWidth: 0 },
3393
- onClick: () => s == null ? void 0 : s(`table_action_${C.value}`, p)
3401
+ onClick: () => s == null ? void 0 : s(`table_action_${M.value}`, p)
3394
3402
  },
3395
- W
3403
+ O
3396
3404
  )) });
3397
3405
  }
3398
3406
  const N = d || {};
@@ -3424,11 +3432,11 @@ function it(e, r, t = {}) {
3424
3432
  1: "text-xl font-bold",
3425
3433
  2: "text-lg font-semibold",
3426
3434
  3: "text-base font-medium"
3427
- }, M = N[f] || N[1];
3428
- return /* @__PURE__ */ O(
3435
+ }, F = N[f] || N[1];
3436
+ return /* @__PURE__ */ L(
3429
3437
  "div",
3430
3438
  {
3431
- className: `${M} text-gray-800 ${(d == null ? void 0 : d.className) || ""}`,
3439
+ className: `${F} text-gray-800 ${(d == null ? void 0 : d.className) || ""}`,
3432
3440
  style: {
3433
3441
  color: "#1f2937",
3434
3442
  lineHeight: "1.4",
@@ -3476,7 +3484,7 @@ function it(e, r, t = {}) {
3476
3484
  );
3477
3485
  }
3478
3486
  function dt(e) {
3479
- return /* @__PURE__ */ O("div", { className: "flex items-center gap-2", children: [
3487
+ return /* @__PURE__ */ L("div", { className: "flex items-center gap-2", children: [
3480
3488
  /* @__PURE__ */ o("span", { className: "font-medium text-gray-800 text-sm", children: e.title }),
3481
3489
  e.helpText && /* @__PURE__ */ o(cr, { title: e.helpText, placement: "top", children: /* @__PURE__ */ o(
3482
3490
  oa,
@@ -3635,21 +3643,21 @@ if (typeof window < "u" && !document.getElementById("dynamic-table-sticky-shadow
3635
3643
  e.id = "dynamic-table-sticky-shadow", e.innerHTML = mt, document.head.appendChild(e);
3636
3644
  }
3637
3645
  const bt = me.memo((e) => {
3638
- var F, m, g, re, ye, De, ze, _e, Ae, Be, We, Re, qe, Le, Oe, je, He, Ye, Ie, Ue, Ve, Ee, Je, Ge, Ke, Pe, pe, Ce, rr;
3646
+ var D, m, g, ae, ye, De, ze, Ae, _e, Be, We, Re, qe, Le, je, Oe, He, Ye, Ie, Ue, Ve, Ee, Je, Ge, Ke, Xe, pe, Ce, rr;
3639
3647
  const r = e.dataSource || [], t = e.columns || [], s = e.size || "md", h = e.level || 0, b = Fe(), p = $e(
3640
3648
  // 基础:默认主题 + useTheme的配置
3641
3649
  $e({ theme: B, mode: "light" }, b),
3642
3650
  // 最高层:用户手动传入的styles
3643
3651
  e.styles
3644
- ), d = ((F = p.theme) == null ? void 0 : F.colors) || B.colors, f = d.tableBackground || d.background || B.colors.background, N = d.tableFirstColumnBg || d.surfaceSubtle || f, M = d.tableLastColumnBg || d.surfaceSubtle || f, { viewId: C, total: W, requestPagesize: l = 50, viewPageSize: _ } = e, [U, ae] = ie(_);
3652
+ ), d = ((D = p.theme) == null ? void 0 : D.colors) || B.colors, f = d.tableBackground || d.background || B.colors.background, N = d.tableFirstColumnBg || d.surfaceSubtle || f, F = d.tableLastColumnBg || d.surfaceSubtle || f, { viewId: M, total: O, requestPagesize: l = 50, viewPageSize: $ } = e, [H, P] = ie($);
3645
3653
  we(() => {
3646
- typeof _ == "number" && _ > 0 && ae(_);
3647
- }, [_]);
3654
+ typeof $ == "number" && $ > 0 && P($);
3655
+ }, [$]);
3648
3656
  const [te, a] = ie(/* @__PURE__ */ new Set());
3649
3657
  we(() => {
3650
3658
  a(/* @__PURE__ */ new Set());
3651
- }, [C]);
3652
- const [T, v] = ie(!1), [V, A] = ie(!1), [E, j] = ie(/* @__PURE__ */ new Set()), Q = Te(null), X = Te(null), [R, ee] = ie(0), G = s === "sm" ? 0.7 : 1, S = it(
3659
+ }, [M]);
3660
+ const [T, w] = ie(!1), [V, _] = ie(!1), [E, j] = ie(/* @__PURE__ */ new Set()), ee = Te(null), Z = Te(null), [W, re] = ie(0), G = s === "sm" ? 0.7 : 1, C = it(
3653
3661
  t,
3654
3662
  {
3655
3663
  eventsEmit: e.eventsEmit,
@@ -3657,59 +3665,59 @@ const bt = me.memo((e) => {
3657
3665
  customizeComponents: e.customizeComponents
3658
3666
  },
3659
3667
  e.styles
3660
- ), [y, x] = ie([]), D = he(
3661
- ($, ne) => {
3668
+ ), [y, x] = ie([]), z = he(
3669
+ (v, ne) => {
3662
3670
  var de;
3663
3671
  x((ce) => {
3664
3672
  let be;
3665
- return ne ? be = [...ce, $] : be = ce.filter((Ne) => Ne !== $), be;
3673
+ return ne ? be = [...ce, v] : be = ce.filter((Ne) => Ne !== v), be;
3666
3674
  });
3667
- const se = ne ? [...y, $] : y.filter((ce) => ce !== $), oe = r.filter((ce) => se.includes(ce.id));
3675
+ const se = ne ? [...y, v] : y.filter((ce) => ce !== v), oe = r.filter((ce) => se.includes(ce.id));
3668
3676
  (de = e.eventsEmit) == null || de.call(e, "table_row_select", {
3669
- rowId: $,
3677
+ rowId: v,
3670
3678
  checked: ne,
3671
3679
  selectedItems: oe
3672
3680
  });
3673
3681
  },
3674
3682
  [y, r, e.eventsEmit]
3675
- ), w = Se(
3683
+ ), k = Se(
3676
3684
  () => r.length > 0 && y.length === r.length,
3677
3685
  [r.length, y.length]
3678
- ), L = he(
3679
- ($) => {
3686
+ ), q = he(
3687
+ (v) => {
3680
3688
  var oe;
3681
- const ne = $ ? r.map((de) => de.id) : [];
3689
+ const ne = v ? r.map((de) => de.id) : [];
3682
3690
  x(ne);
3683
- const se = $ ? r : [];
3691
+ const se = v ? r : [];
3684
3692
  (oe = e.eventsEmit) == null || oe.call(e, "table_select_all", {
3685
- checked: $,
3693
+ checked: v,
3686
3694
  selectedItems: se,
3687
3695
  totalCount: r.length
3688
3696
  });
3689
3697
  },
3690
3698
  [r, e.eventsEmit]
3691
- ), [q, Z] = ie(1), P = typeof U == "number" && U > 0 ? U : _ ?? (e.isSubTable ? 5 : 10), k = W || r.length;
3699
+ ), [R, Q] = ie(1), X = typeof H == "number" && H > 0 ? H : $ ?? (e.isSubTable ? 5 : 10), S = O || r.length;
3692
3700
  Se(
3693
- () => Math.ceil(k / P),
3694
- [k, P]
3701
+ () => Math.ceil(S / X),
3702
+ [S, X]
3695
3703
  );
3696
- const H = Se(() => {
3704
+ const Y = Se(() => {
3697
3705
  if (e.viewBehavior !== "pagination") return r;
3698
- const $ = (q - 1) * P, ne = $ + P;
3706
+ const v = (R - 1) * X, ne = v + X;
3699
3707
  if (r.some((oe) => typeof oe.__absIndex == "number")) {
3700
3708
  const oe = [];
3701
- for (let de = $; de < ne; de++) {
3709
+ for (let de = v; de < ne; de++) {
3702
3710
  const ce = r.find((be) => be.__absIndex === de);
3703
3711
  ce && oe.push(ce);
3704
3712
  }
3705
3713
  return oe;
3706
3714
  }
3707
- return r.slice($, ne);
3708
- }, [e.viewBehavior, r, q, P]), Y = he(
3709
- ($) => {
3715
+ return r.slice(v, ne);
3716
+ }, [e.viewBehavior, r, R, X]), I = he(
3717
+ (v) => {
3710
3718
  var ne;
3711
- if (Z($), W && l && C) {
3712
- const se = ($ - 1) * P, oe = Math.floor(se / l) + 1;
3719
+ if (Q(v), O && l && M) {
3720
+ const se = (v - 1) * X, oe = Math.floor(se / l) + 1;
3713
3721
  (!te.has(oe) || se >= r.length) && (a((ce) => {
3714
3722
  const be = new Set(ce);
3715
3723
  return be.add(oe), be;
@@ -3717,7 +3725,7 @@ const bt = me.memo((e) => {
3717
3725
  e,
3718
3726
  "pagination:request_merge_data",
3719
3727
  {
3720
- viewId: C,
3728
+ viewId: M,
3721
3729
  request: {
3722
3730
  pageNo: oe,
3723
3731
  pageSize: l
@@ -3727,47 +3735,47 @@ const bt = me.memo((e) => {
3727
3735
  ));
3728
3736
  }
3729
3737
  },
3730
- [W, l, C, P, r.length, e.eventsEmit, te]
3731
- ), i = he(($) => {
3738
+ [O, l, M, X, r.length, e.eventsEmit, te]
3739
+ ), i = he((v) => {
3732
3740
  j((ne) => {
3733
3741
  const se = new Set(ne);
3734
- return se.has($) ? se.delete($) : (se.add($), setTimeout(() => {
3742
+ return se.has(v) ? se.delete(v) : (se.add(v), setTimeout(() => {
3735
3743
  var oe, de;
3736
3744
  (de = e.eventsEmit) == null || de.call(e, "table_expand", {
3737
- tableId: $,
3738
- children: ((oe = r.find((ce) => ce.id === $)) == null ? void 0 : oe.children) || []
3745
+ tableId: v,
3746
+ children: ((oe = r.find((ce) => ce.id === v)) == null ? void 0 : oe.children) || []
3739
3747
  });
3740
3748
  }, 0)), se;
3741
3749
  });
3742
- }, [r, e.eventsEmit]), u = he(($) => $.hasOwnProperty("children") && $.children !== void 0, []), c = he(
3743
- ($) => E.has($),
3750
+ }, [r, e.eventsEmit]), u = he((v) => v.hasOwnProperty("children") && v.children !== void 0, []), c = he(
3751
+ (v) => E.has(v),
3744
3752
  [E]
3745
3753
  ), n = he(() => {
3746
- const $ = Q.current;
3747
- $ && (e.isSubTable || (v($.scrollLeft > 0), A($.scrollLeft < $.scrollWidth - $.offsetWidth - 1)));
3754
+ const v = ee.current;
3755
+ v && (e.isSubTable || (w(v.scrollLeft > 0), _(v.scrollLeft < v.scrollWidth - v.offsetWidth - 1)));
3748
3756
  }, [e.isSubTable]);
3749
3757
  we(() => {
3750
- const $ = Q.current;
3751
- if ($)
3752
- return n(), $.addEventListener("scroll", n), window.addEventListener("resize", n), () => {
3753
- $.removeEventListener("scroll", n), window.removeEventListener("resize", n);
3758
+ const v = ee.current;
3759
+ if (v)
3760
+ return n(), v.addEventListener("scroll", n), window.addEventListener("resize", n), () => {
3761
+ v.removeEventListener("scroll", n), window.removeEventListener("resize", n);
3754
3762
  };
3755
3763
  }, [n]), we(() => {
3756
- const $ = Q.current;
3757
- if (!$) return;
3764
+ const v = ee.current;
3765
+ if (!v) return;
3758
3766
  const ne = () => {
3759
- const oe = $.getBoundingClientRect();
3760
- ee(oe.width);
3767
+ const oe = v.getBoundingClientRect();
3768
+ re(oe.width);
3761
3769
  };
3762
3770
  ne(), window.addEventListener("resize", ne);
3763
3771
  const se = new ResizeObserver(ne);
3764
- return se.observe($), () => {
3772
+ return se.observe(v), () => {
3765
3773
  window.removeEventListener("resize", ne), se.disconnect();
3766
3774
  };
3767
3775
  }, []);
3768
- const z = e.isSubTable ? ut : ct;
3769
- return /* @__PURE__ */ O(
3770
- z,
3776
+ const A = e.isSubTable ? ut : ct;
3777
+ return /* @__PURE__ */ L(
3778
+ A,
3771
3779
  {
3772
3780
  theme: p.theme || B,
3773
3781
  className: "w-full",
@@ -3810,7 +3818,7 @@ const bt = me.memo((e) => {
3810
3818
  /* @__PURE__ */ o(
3811
3819
  "div",
3812
3820
  {
3813
- ref: Q,
3821
+ ref: ee,
3814
3822
  style: {
3815
3823
  width: (e.isSubTable, "100%"),
3816
3824
  maxWidth: (e.isSubTable, "100%"),
@@ -3822,10 +3830,10 @@ const bt = me.memo((e) => {
3822
3830
  position: "relative",
3823
3831
  boxSizing: "border-box"
3824
3832
  },
3825
- children: /* @__PURE__ */ O(
3833
+ children: /* @__PURE__ */ L(
3826
3834
  "table",
3827
3835
  {
3828
- ref: X,
3836
+ ref: Z,
3829
3837
  className: "border-collapse",
3830
3838
  style: {
3831
3839
  minWidth: "max-content",
@@ -3840,9 +3848,9 @@ const bt = me.memo((e) => {
3840
3848
  position: e.isSubTable ? void 0 : "sticky",
3841
3849
  top: 0,
3842
3850
  zIndex: 3,
3843
- background: ((g = (m = p.theme) == null ? void 0 : m.colors) == null ? void 0 : g.tableHeaderBg) || ((ye = (re = p.theme) == null ? void 0 : re.colors) == null ? void 0 : ye.disabledBackground) || B.colors.disabledBackground
3851
+ background: ((g = (m = p.theme) == null ? void 0 : m.colors) == null ? void 0 : g.tableHeaderBg) || ((ye = (ae = p.theme) == null ? void 0 : ae.colors) == null ? void 0 : ye.disabledBackground) || B.colors.disabledBackground
3844
3852
  },
3845
- children: /* @__PURE__ */ O("tr", { children: [
3853
+ children: /* @__PURE__ */ L("tr", { children: [
3846
3854
  e.allowMultiSelect && /* @__PURE__ */ o(
3847
3855
  Gr,
3848
3856
  {
@@ -3851,7 +3859,7 @@ const bt = me.memo((e) => {
3851
3859
  position: "sticky",
3852
3860
  left: 0,
3853
3861
  zIndex: 3,
3854
- background: ((ze = (De = p.theme) == null ? void 0 : De.colors) == null ? void 0 : ze.tableHeaderBg) || ((Ae = (_e = p.theme) == null ? void 0 : _e.colors) == null ? void 0 : Ae.disabledBackground) || B.colors.disabledBackground,
3862
+ background: ((ze = (De = p.theme) == null ? void 0 : De.colors) == null ? void 0 : ze.tableHeaderBg) || ((_e = (Ae = p.theme) == null ? void 0 : Ae.colors) == null ? void 0 : _e.disabledBackground) || B.colors.disabledBackground,
3855
3863
  width: 40,
3856
3864
  minWidth: 40,
3857
3865
  maxWidth: 40,
@@ -3862,15 +3870,15 @@ const bt = me.memo((e) => {
3862
3870
  "input",
3863
3871
  {
3864
3872
  type: "checkbox",
3865
- checked: w,
3866
- onChange: ($) => L($.target.checked)
3873
+ checked: k,
3874
+ onChange: (v) => q(v.target.checked)
3867
3875
  }
3868
3876
  )
3869
3877
  }
3870
3878
  ),
3871
- S.map(($, ne) => {
3872
- var be, Ne, Xe, Ze;
3873
- const se = ne === 0, oe = ne === S.length - 1, de = ((Ne = (be = p.theme) == null ? void 0 : be.colors) == null ? void 0 : Ne.tableHeaderBg) || ((Ze = (Xe = p.theme) == null ? void 0 : Xe.colors) == null ? void 0 : Ze.disabledBackground) || B.colors.disabledBackground, ce = se ? {
3879
+ C.map((v, ne) => {
3880
+ var be, Ne, Pe, Ze;
3881
+ const se = ne === 0, oe = ne === C.length - 1, de = ((Ne = (be = p.theme) == null ? void 0 : be.colors) == null ? void 0 : Ne.tableHeaderBg) || ((Ze = (Pe = p.theme) == null ? void 0 : Pe.colors) == null ? void 0 : Ze.disabledBackground) || B.colors.disabledBackground, ce = se ? {
3874
3882
  position: "sticky",
3875
3883
  left: e.allowMultiSelect ? 40 : 0,
3876
3884
  zIndex: 2,
@@ -3886,46 +3894,46 @@ const bt = me.memo((e) => {
3886
3894
  {
3887
3895
  theme: p.theme || B,
3888
3896
  style: {
3889
- ...Jr($.type),
3897
+ ...Jr(v.type),
3890
3898
  ...ce,
3891
- ...$.maxWidth !== void 0 ? {
3892
- maxWidth: typeof $.maxWidth == "number" ? `${$.maxWidth}px` : $.maxWidth
3899
+ ...v.maxWidth !== void 0 ? {
3900
+ maxWidth: typeof v.maxWidth == "number" ? `${v.maxWidth}px` : v.maxWidth
3893
3901
  } : {}
3894
3902
  },
3895
3903
  className: se && T ? "sticky-shadow-left" : oe && V ? "sticky-shadow-right" : "",
3896
- children: dt($)
3904
+ children: dt(v)
3897
3905
  },
3898
- $.id
3906
+ v.id
3899
3907
  );
3900
3908
  })
3901
3909
  ] })
3902
3910
  }
3903
3911
  ),
3904
- /* @__PURE__ */ o("tbody", { children: H.map(($, ne) => {
3905
- var ce, be, Ne, Xe, Ze, hr, pr, fr, mr, br, gr, xr, yr, $r, vr, wr, kr, Sr, Nr, Cr, Mr, Tr;
3906
- const se = e.rowProps ? e.rowProps($, ne) : {}, oe = u($), de = c($.id) || $.__autoExpand && oe;
3907
- return /* @__PURE__ */ O(me.Fragment, { children: [
3908
- /* @__PURE__ */ O(
3912
+ /* @__PURE__ */ o("tbody", { children: Y.map((v, ne) => {
3913
+ var ce, be, Ne, Pe, Ze, hr, pr, fr, mr, br, gr, xr, yr, $r, vr, wr, kr, Sr, Nr, Cr, Mr, Tr;
3914
+ const se = e.rowProps ? e.rowProps(v, ne) : {}, oe = u(v), de = c(v.id) || v.__autoExpand && oe;
3915
+ return /* @__PURE__ */ L(me.Fragment, { children: [
3916
+ /* @__PURE__ */ L(
3909
3917
  ft,
3910
3918
  {
3911
3919
  theme: p.theme || B,
3912
3920
  ...se,
3913
- className: `${se.className || ""} ${(ce = e.addingIds) != null && ce.includes($.id) ? "adding-row" : ""} ${$.removing ? "removing-row" : ""}`,
3921
+ className: `${se.className || ""} ${(ce = e.addingIds) != null && ce.includes(v.id) ? "adding-row" : ""} ${v.removing ? "removing-row" : ""}`,
3914
3922
  style: {
3915
3923
  ...se.style,
3916
- ...$.removing ? {
3924
+ ...v.removing ? {
3917
3925
  opacity: 0,
3918
3926
  transform: "translateX(100px)",
3919
3927
  transition: "opacity 0.3s ease, transform 0.3s ease"
3920
3928
  } : {}
3921
3929
  },
3922
- onAnimationEnd: (I) => {
3930
+ onAnimationEnd: (U) => {
3923
3931
  var ue, ge;
3924
- I.animationName === "row-slide-in" && ((ue = e.addingIds) != null && ue.includes($.id)) && ((ge = e.onRowAddAnimationComplete) == null || ge.call(e, $.id));
3932
+ U.animationName === "row-slide-in" && ((ue = e.addingIds) != null && ue.includes(v.id)) && ((ge = e.onRowAddAnimationComplete) == null || ge.call(e, v.id));
3925
3933
  },
3926
- onTransitionEnd: (I) => {
3934
+ onTransitionEnd: (U) => {
3927
3935
  var ue;
3928
- $.removing && I.propertyName === "transform" && ((ue = e.onRowAnimationComplete) == null || ue.call(e, $.id));
3936
+ v.removing && U.propertyName === "transform" && ((ue = e.onRowAnimationComplete) == null || ue.call(e, v.id));
3929
3937
  },
3930
3938
  children: [
3931
3939
  e.allowMultiSelect && /* @__PURE__ */ o(
@@ -3947,15 +3955,15 @@ const bt = me.memo((e) => {
3947
3955
  "input",
3948
3956
  {
3949
3957
  type: "checkbox",
3950
- checked: y.includes($.id),
3951
- onChange: (I) => D($.id, I.target.checked)
3958
+ checked: y.includes(v.id),
3959
+ onChange: (U) => z(v.id, U.target.checked)
3952
3960
  }
3953
3961
  )
3954
3962
  }
3955
3963
  ),
3956
- S.map((I, ue) => {
3964
+ C.map((U, ue) => {
3957
3965
  var Fr;
3958
- const ge = ue === 0, Qe = ue === S.length - 1, Me = ge ? N : Qe ? M : f, ca = ge ? {
3966
+ const ge = ue === 0, Qe = ue === C.length - 1, Me = ge ? N : Qe ? F : f, ca = ge ? {
3959
3967
  position: "sticky",
3960
3968
  left: e.allowMultiSelect ? 40 : 0,
3961
3969
  zIndex: 1,
@@ -3965,21 +3973,21 @@ const bt = me.memo((e) => {
3965
3973
  right: 0,
3966
3974
  zIndex: 1,
3967
3975
  background: Me
3968
- } : {}, xe = ((Fr = $.data) == null ? void 0 : Fr.filter((ar) => ar.columnId === I.id)) || [], ua = Object.assign(
3976
+ } : {}, xe = ((Fr = v.data) == null ? void 0 : Fr.filter((ar) => ar.columnId === U.id)) || [], ua = Object.assign(
3969
3977
  {},
3970
- Jr(I.type),
3978
+ Jr(U.type),
3971
3979
  ca,
3972
- I.maxWidth !== void 0 ? {
3973
- maxWidth: typeof I.maxWidth == "number" ? `${I.maxWidth}px` : I.maxWidth
3980
+ U.maxWidth !== void 0 ? {
3981
+ maxWidth: typeof U.maxWidth == "number" ? `${U.maxWidth}px` : U.maxWidth
3974
3982
  } : {},
3975
3983
  { background: Me }
3976
3984
  ), ha = () => {
3977
3985
  var ar, Dr;
3978
- return ge && oe ? /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3986
+ return ge && oe ? /* @__PURE__ */ L("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
3979
3987
  /* @__PURE__ */ o(
3980
3988
  "button",
3981
3989
  {
3982
- onClick: () => i($.id),
3990
+ onClick: () => i(v.id),
3983
3991
  style: {
3984
3992
  background: "none",
3985
3993
  border: "none",
@@ -3993,11 +4001,11 @@ const bt = me.memo((e) => {
3993
4001
  children: de ? /* @__PURE__ */ o(ba, { size: 16 }) : /* @__PURE__ */ o(ga, { size: 16 })
3994
4002
  }
3995
4003
  ),
3996
- /* @__PURE__ */ O("span", { style: { paddingLeft: h * 16 }, children: [
4004
+ /* @__PURE__ */ L("span", { style: { paddingLeft: h * 16 }, children: [
3997
4005
  " ",
3998
- xe.length > 0 ? I.type === "action" ? I.render ? I.render(
4006
+ xe.length > 0 ? U.type === "action" ? U.render ? U.render(
3999
4007
  xe.length > 1 ? xe.map((ve) => ve) : xe[0],
4000
- $,
4008
+ v,
4001
4009
  xe.length > 1 ? void 0 : xe[0]
4002
4010
  ) : null : xe.map((ve, dr) => /* @__PURE__ */ o(
4003
4011
  "span",
@@ -4005,21 +4013,21 @@ const bt = me.memo((e) => {
4005
4013
  style: {
4006
4014
  marginRight: 4,
4007
4015
  display: "inline-block",
4008
- maxWidth: I.maxWidth ? typeof I.maxWidth == "number" ? `${I.maxWidth}px` : I.maxWidth : void 0,
4016
+ maxWidth: U.maxWidth ? typeof U.maxWidth == "number" ? `${U.maxWidth}px` : U.maxWidth : void 0,
4009
4017
  overflow: "hidden",
4010
4018
  textOverflow: "ellipsis",
4011
4019
  verticalAlign: "middle"
4012
4020
  },
4013
- children: I.render ? I.render(ve.value, $, ve) : /* @__PURE__ */ o("span", { children: ve.value })
4021
+ children: U.render ? U.render(ve.value, v, ve) : /* @__PURE__ */ o("span", { children: ve.value })
4014
4022
  },
4015
4023
  dr
4016
4024
  )) : null
4017
4025
  ] })
4018
- ] }) : /* @__PURE__ */ O("span", { style: { paddingLeft: h * 16 }, children: [
4026
+ ] }) : /* @__PURE__ */ L("span", { style: { paddingLeft: h * 16 }, children: [
4019
4027
  " ",
4020
- xe.length > 0 ? I.type === "action" ? I.render ? I.render(
4028
+ xe.length > 0 ? U.type === "action" ? U.render ? U.render(
4021
4029
  xe.length > 1 ? xe.map((ve) => ve) : xe[0],
4022
- $,
4030
+ v,
4023
4031
  xe.length > 1 ? void 0 : xe[0]
4024
4032
  ) : null : xe.map((ve, dr) => /* @__PURE__ */ o(
4025
4033
  "span",
@@ -4027,12 +4035,12 @@ const bt = me.memo((e) => {
4027
4035
  style: {
4028
4036
  marginRight: 4,
4029
4037
  display: "inline-block",
4030
- maxWidth: I.maxWidth ? typeof I.maxWidth == "number" ? `${I.maxWidth}px` : I.maxWidth : void 0,
4038
+ maxWidth: U.maxWidth ? typeof U.maxWidth == "number" ? `${U.maxWidth}px` : U.maxWidth : void 0,
4031
4039
  overflow: "hidden",
4032
4040
  textOverflow: "ellipsis",
4033
4041
  verticalAlign: "middle"
4034
4042
  },
4035
- children: I.render ? I.render(ve.value, $, ve) : /* @__PURE__ */ o("span", { children: ve.value })
4043
+ children: U.render ? U.render(ve.value, v, ve) : /* @__PURE__ */ o("span", { children: ve.value })
4036
4044
  },
4037
4045
  dr
4038
4046
  )) : null
@@ -4046,28 +4054,28 @@ const bt = me.memo((e) => {
4046
4054
  className: ge && T ? "sticky-shadow-left" : Qe && V ? "sticky-shadow-right" : "",
4047
4055
  children: ha()
4048
4056
  },
4049
- I.id
4057
+ U.id
4050
4058
  );
4051
4059
  })
4052
4060
  ]
4053
4061
  }
4054
4062
  ),
4055
- oe && de && $.children !== void 0 && /* @__PURE__ */ o(
4063
+ oe && de && v.children !== void 0 && /* @__PURE__ */ o(
4056
4064
  "tr",
4057
4065
  {
4058
4066
  className: "dynamic-table-sub-row relative",
4059
4067
  style: {
4060
- width: R > 0 ? `${R}px` : "100%"
4068
+ width: W > 0 ? `${W}px` : "100%"
4061
4069
  },
4062
4070
  children: /* @__PURE__ */ o(
4063
4071
  "td",
4064
4072
  {
4065
4073
  className: "dynamic-table-sub-cell",
4066
4074
  style: {
4067
- width: R > 0 ? `${R}px` : "100%"
4075
+ width: W > 0 ? `${W}px` : "100%"
4068
4076
  },
4069
- colSpan: S.length + (e.allowMultiSelect ? 1 : 0),
4070
- children: /* @__PURE__ */ O(
4077
+ colSpan: C.length + (e.allowMultiSelect ? 1 : 0),
4078
+ children: /* @__PURE__ */ L(
4071
4079
  "div",
4072
4080
  {
4073
4081
  className: "dynamic-table-sub-container",
@@ -4075,17 +4083,17 @@ const bt = me.memo((e) => {
4075
4083
  position: "sticky",
4076
4084
  left: 0,
4077
4085
  padding: "0px 8px",
4078
- width: R > 0 ? `${R}px` : "100%",
4086
+ width: W > 0 ? `${W}px` : "100%",
4079
4087
  // 使用父容器实际宽度
4080
4088
  minWidth: "800px",
4081
4089
  // 最小宽度确保内容显示
4082
4090
  maxWidth: "100%",
4083
4091
  // 最大宽度不超过父容器
4084
- background: ((Ne = (be = p.theme) == null ? void 0 : be.colors) == null ? void 0 : Ne.subTableBackground) || ((Ze = (Xe = p.theme) == null ? void 0 : Xe.colors) == null ? void 0 : Ze.disabledBackground) || B.colors.subTableBackground || B.colors.disabledBackground,
4092
+ background: ((Ne = (be = p.theme) == null ? void 0 : be.colors) == null ? void 0 : Ne.subTableBackground) || ((Ze = (Pe = p.theme) == null ? void 0 : Pe.colors) == null ? void 0 : Ze.disabledBackground) || B.colors.subTableBackground || B.colors.disabledBackground,
4085
4093
  boxSizing: "border-box"
4086
4094
  },
4087
4095
  children: [
4088
- $.tableLoading && /* @__PURE__ */ o(
4096
+ v.tableLoading && /* @__PURE__ */ o(
4089
4097
  "div",
4090
4098
  {
4091
4099
  className: "dynamic-table-sub-loading-overlay",
@@ -4103,7 +4111,7 @@ const bt = me.memo((e) => {
4103
4111
  zIndex: 10,
4104
4112
  borderRadius: p.space.radius
4105
4113
  },
4106
- children: /* @__PURE__ */ O(
4114
+ children: /* @__PURE__ */ L(
4107
4115
  "div",
4108
4116
  {
4109
4117
  className: "dynamic-table-sub-loading-content",
@@ -4134,7 +4142,7 @@ const bt = me.memo((e) => {
4134
4142
  )
4135
4143
  }
4136
4144
  ),
4137
- /* @__PURE__ */ O("div", { className: "dynamic-table-sub-content", style: { marginBottom: "16px" }, children: [
4145
+ /* @__PURE__ */ L("div", { className: "dynamic-table-sub-content", style: { marginBottom: "16px" }, children: [
4138
4146
  Array.isArray((wr = e.subTableConfig) == null ? void 0 : wr.toolbar) && e.subTableConfig.toolbar.length > 0 && /* @__PURE__ */ o(
4139
4147
  "div",
4140
4148
  {
@@ -4145,23 +4153,23 @@ const bt = me.memo((e) => {
4145
4153
  alignItems: "center",
4146
4154
  marginBottom: 8
4147
4155
  },
4148
- children: e.subTableConfig.toolbar.map((I, ue) => {
4156
+ children: e.subTableConfig.toolbar.map((U, ue) => {
4149
4157
  const Qe = {
4150
4158
  primary: "primary",
4151
4159
  error: "danger",
4152
4160
  default: "text"
4153
- }[I.btnType] || "text";
4161
+ }[U.btnType] || "text";
4154
4162
  return /* @__PURE__ */ o(
4155
4163
  er,
4156
4164
  {
4157
4165
  mode: Qe,
4158
- label: I.label,
4159
- icon: I.icon,
4166
+ label: U.label,
4167
+ icon: U.icon,
4160
4168
  onClick: () => {
4161
4169
  var Me;
4162
4170
  return (Me = e.eventsEmit) == null ? void 0 : Me.call(e, "table_action_add", {
4163
- tableId: $.id,
4164
- action: I
4171
+ tableId: v.id,
4172
+ action: U
4165
4173
  });
4166
4174
  }
4167
4175
  },
@@ -4174,11 +4182,11 @@ const bt = me.memo((e) => {
4174
4182
  ht,
4175
4183
  {
4176
4184
  theme: p.theme || B,
4177
- onWheel: (I) => {
4178
- I.stopPropagation();
4185
+ onWheel: (U) => {
4186
+ U.stopPropagation();
4179
4187
  },
4180
- onScroll: (I) => {
4181
- I.stopPropagation();
4188
+ onScroll: (U) => {
4189
+ U.stopPropagation();
4182
4190
  },
4183
4191
  style: {
4184
4192
  position: "relative",
@@ -4191,22 +4199,22 @@ const bt = me.memo((e) => {
4191
4199
  bt,
4192
4200
  {
4193
4201
  columns: ((kr = e.subTableConfig) == null ? void 0 : kr.columns) || [],
4194
- dataSource: $.children || [],
4202
+ dataSource: v.children || [],
4195
4203
  isSubTable: !0,
4196
- isPending: (I) => {
4204
+ isPending: (U) => {
4197
4205
  var ue, ge;
4198
- return ((ge = (ue = e.subTablePendingIds) == null ? void 0 : ue[$.id]) == null ? void 0 : ge.includes(I)) || !1;
4206
+ return ((ge = (ue = e.subTablePendingIds) == null ? void 0 : ue[v.id]) == null ? void 0 : ge.includes(U)) || !1;
4199
4207
  },
4200
- onRowAnimationComplete: (I) => {
4208
+ onRowAnimationComplete: (U) => {
4201
4209
  var ue;
4202
- (ue = e.onSubTableRowAnimationComplete) == null || ue.call(e, $.id, I), e.eventsEmit && e.eventsEmit("_internal:subtable_animation_complete", {
4203
- rowId: I,
4204
- tableId: $.id
4210
+ (ue = e.onSubTableRowAnimationComplete) == null || ue.call(e, v.id, U), e.eventsEmit && e.eventsEmit("_internal:subtable_animation_complete", {
4211
+ rowId: U,
4212
+ tableId: v.id
4205
4213
  });
4206
4214
  },
4207
- eventsEmit: (I, ue) => {
4215
+ eventsEmit: (U, ue) => {
4208
4216
  var ge;
4209
- (ge = e.eventsEmit) == null || ge.call(e, I, { ...ue, tableId: $.id });
4217
+ (ge = e.eventsEmit) == null || ge.call(e, U, { ...ue, tableId: v.id });
4210
4218
  },
4211
4219
  allowMultiSelect: (Sr = e.subTableConfig) == null ? void 0 : Sr.allowMultiSelect,
4212
4220
  size: e.size,
@@ -4231,7 +4239,7 @@ const bt = me.memo((e) => {
4231
4239
  )
4232
4240
  }
4233
4241
  )
4234
- ] }, $.id ?? ne);
4242
+ ] }, v.id ?? ne);
4235
4243
  }) })
4236
4244
  ]
4237
4245
  }
@@ -4247,37 +4255,37 @@ const bt = me.memo((e) => {
4247
4255
  justifyContent: "end",
4248
4256
  alignItems: "center",
4249
4257
  background: ((We = (Be = p.theme) == null ? void 0 : Be.colors) == null ? void 0 : We.paginationBackground) || ((qe = (Re = p.theme) == null ? void 0 : Re.colors) == null ? void 0 : qe.background) || B.colors.paginationBackground || B.colors.background,
4250
- borderTop: `1px solid ${((Oe = (Le = p.theme) == null ? void 0 : Le.colors) == null ? void 0 : Oe.border) || B.colors.border}`,
4258
+ borderTop: `1px solid ${((je = (Le = p.theme) == null ? void 0 : Le.colors) == null ? void 0 : je.border) || B.colors.border}`,
4251
4259
  flexShrink: 0,
4252
4260
  paddingRight: 16
4253
4261
  },
4254
4262
  children: /* @__PURE__ */ o(
4255
4263
  wa,
4256
4264
  {
4257
- current: q,
4258
- pageSize: P,
4259
- total: k,
4260
- onChange: Y,
4261
- onPageSizeChange: ($) => {
4265
+ current: R,
4266
+ pageSize: X,
4267
+ total: S,
4268
+ onChange: I,
4269
+ onPageSizeChange: (v) => {
4262
4270
  var ne;
4263
- Z(1), ae($), W && l && C && e.eventsEmit && (a(/* @__PURE__ */ new Set()), e.eventsEmit(
4271
+ Q(1), P(v), O && l && M && e.eventsEmit && (a(/* @__PURE__ */ new Set()), e.eventsEmit(
4264
4272
  "pagination:request_merge_data",
4265
4273
  {
4266
- viewId: C,
4274
+ viewId: M,
4267
4275
  request: { pageNo: 1, pageSize: l }
4268
4276
  },
4269
4277
  void 0
4270
- )), (ne = e.eventsEmit) == null || ne.call(e, "pagination:pageSizeChange", { viewId: C, pageSize: $ });
4278
+ )), (ne = e.eventsEmit) == null || ne.call(e, "pagination:pageSizeChange", { viewId: M, pageSize: v });
4271
4279
  },
4272
4280
  showSizeChanger: !0,
4273
4281
  pageSizeOptions: [5, 10, 20, 30, 50],
4274
4282
  theme: {
4275
4283
  colors: {
4276
- background: ((He = (je = p.theme) == null ? void 0 : je.colors) == null ? void 0 : He.paginationBackground) || ((Ie = (Ye = p.theme) == null ? void 0 : Ye.colors) == null ? void 0 : Ie.background) || B.colors.paginationBackground || B.colors.background,
4284
+ background: ((He = (Oe = p.theme) == null ? void 0 : Oe.colors) == null ? void 0 : He.paginationBackground) || ((Ie = (Ye = p.theme) == null ? void 0 : Ye.colors) == null ? void 0 : Ie.background) || B.colors.paginationBackground || B.colors.background,
4277
4285
  text: ((Ve = (Ue = p.theme) == null ? void 0 : Ue.colors) == null ? void 0 : Ve.text) || B.colors.text,
4278
4286
  border: ((Je = (Ee = p.theme) == null ? void 0 : Ee.colors) == null ? void 0 : Je.border) || B.colors.border,
4279
4287
  disabledBackground: ((Ke = (Ge = p.theme) == null ? void 0 : Ge.colors) == null ? void 0 : Ke.disabledBackground) || B.colors.disabledBackground,
4280
- primary: ((pe = (Pe = p.theme) == null ? void 0 : Pe.colors) == null ? void 0 : pe.primary) || B.colors.primary
4288
+ primary: ((pe = (Xe = p.theme) == null ? void 0 : Xe.colors) == null ? void 0 : pe.primary) || B.colors.primary
4281
4289
  },
4282
4290
  space: { radius: ((rr = (Ce = p.theme) == null ? void 0 : Ce.space) == null ? void 0 : rr.radius) || B.space.radius }
4283
4291
  },
@@ -4305,7 +4313,7 @@ const bt = me.memo((e) => {
4305
4313
  width: ${(e) => e.$width || "600px"};
4306
4314
  height: ${(e) => e.$height || "400px"};
4307
4315
  position: relative;
4308
- `, Pr = J.div`
4316
+ `, Xr = J.div`
4309
4317
  display: flex;
4310
4318
  flex-direction: column;
4311
4319
  border-right: 1px solid ${(e) => {
@@ -4317,7 +4325,7 @@ const bt = me.memo((e) => {
4317
4325
  &:last-child {
4318
4326
  border-right: none;
4319
4327
  }
4320
- `, Xr = J.div`
4328
+ `, Pr = J.div`
4321
4329
  padding: 12px 16px;
4322
4330
  border-bottom: 1px solid ${(e) => {
4323
4331
  var r, t, s;
@@ -4495,167 +4503,167 @@ const bt = me.memo((e) => {
4495
4503
  rightTitle: d = "已选",
4496
4504
  showSearch: f = !0,
4497
4505
  filterOption: N,
4498
- renderItem: M,
4499
- renderSelectedItem: C,
4500
- onItemDataChange: W,
4506
+ renderItem: F,
4507
+ renderSelectedItem: M,
4508
+ onItemDataChange: O,
4501
4509
  itemDataMap: l,
4502
- className: _,
4503
- style: U,
4504
- styles: ae,
4510
+ className: $,
4511
+ style: H,
4512
+ styles: P,
4505
4513
  height: te,
4506
4514
  width: a
4507
4515
  }) => {
4508
- const T = Fe(), v = $e(
4516
+ const T = Fe(), w = $e(
4509
4517
  $e({ theme: B, mode: "light" }, T),
4510
- ae
4511
- ), [V, A] = ie(t), [E, j] = ie(""), [Q, X] = ie(l || {}), R = l !== void 0 ? l : Q, ee = r !== void 0 ? r : V, G = (k) => {
4512
- r === void 0 && A(k), s == null || s(k);
4513
- }, y = N || ((k, H) => k ? H.label.toLowerCase().includes(k.toLowerCase()) : !0), x = Se(() => e.filter((k) => y(E, k)), [e, E, y]), D = Se(() => e.filter((k) => ee.includes(k.key)), [e, ee]), w = (k, H) => {
4514
- const Y = { ...R[k], ...H }, i = { ...R, [k]: Y };
4515
- l === void 0 && X(i), W == null || W(k, Y);
4516
- }, L = (k) => {
4517
- const H = ee.filter((Y) => Y !== k.key);
4518
- if (G(H), l === void 0) {
4519
- if (R[k.key]) {
4520
- const Y = { ...R };
4521
- delete Y[k.key], X(Y);
4518
+ P
4519
+ ), [V, _] = ie(t), [E, j] = ie(""), [ee, Z] = ie(l || {}), W = l !== void 0 ? l : ee, re = r !== void 0 ? r : V, G = (S) => {
4520
+ r === void 0 && _(S), s == null || s(S);
4521
+ }, y = N || ((S, Y) => S ? Y.label.toLowerCase().includes(S.toLowerCase()) : !0), x = Se(() => e.filter((S) => y(E, S)), [e, E, y]), z = Se(() => e.filter((S) => re.includes(S.key)), [e, re]), k = (S, Y) => {
4522
+ const I = { ...W[S], ...Y }, i = { ...W, [S]: I };
4523
+ l === void 0 && Z(i), O == null || O(S, I);
4524
+ }, q = (S) => {
4525
+ const Y = re.filter((I) => I !== S.key);
4526
+ if (G(Y), l === void 0) {
4527
+ if (W[S.key]) {
4528
+ const I = { ...W };
4529
+ delete I[S.key], Z(I);
4522
4530
  }
4523
4531
  } else
4524
- R[k.key] && (W == null || W(k.key, void 0));
4532
+ W[S.key] && (O == null || O(S.key, void 0));
4525
4533
  };
4526
4534
  we(() => {
4527
4535
  if (l === void 0) {
4528
- const k = new Set(ee), H = Object.keys(R).filter(
4529
- (Y) => !k.has(Y)
4536
+ const S = new Set(re), Y = Object.keys(W).filter(
4537
+ (I) => !S.has(I)
4530
4538
  );
4531
- if (H.length > 0) {
4532
- const Y = { ...R };
4533
- H.forEach((i) => {
4534
- delete Y[i];
4535
- }), X(Y);
4539
+ if (Y.length > 0) {
4540
+ const I = { ...W };
4541
+ Y.forEach((i) => {
4542
+ delete I[i];
4543
+ }), Z(I);
4536
4544
  }
4537
4545
  } else {
4538
- const k = new Set(ee);
4539
- Object.keys(R).filter(
4540
- (Y) => !k.has(Y)
4541
- ).forEach((Y) => {
4542
- W == null || W(Y, void 0);
4546
+ const S = new Set(re);
4547
+ Object.keys(W).filter(
4548
+ (I) => !S.has(I)
4549
+ ).forEach((I) => {
4550
+ O == null || O(I, void 0);
4543
4551
  });
4544
4552
  }
4545
- }, [ee]);
4546
- const q = (k) => {
4547
- if (k.disabled) return;
4548
- const H = [...ee], Y = H.indexOf(k.key);
4549
- if (Y > -1)
4550
- H.splice(Y, 1);
4553
+ }, [re]);
4554
+ const R = (S) => {
4555
+ if (S.disabled) return;
4556
+ const Y = [...re], I = Y.indexOf(S.key);
4557
+ if (I > -1)
4558
+ Y.splice(I, 1);
4551
4559
  else {
4552
- if (h > 0 && H.length >= h)
4560
+ if (h > 0 && Y.length >= h)
4553
4561
  return;
4554
- H.push(k.key);
4562
+ Y.push(S.key);
4555
4563
  }
4556
- G(H);
4557
- }, Z = (k) => ee.includes(k), P = h > 0 && ee.length >= h;
4558
- return /* @__PURE__ */ O(
4564
+ G(Y);
4565
+ }, Q = (S) => re.includes(S), X = h > 0 && re.length >= h;
4566
+ return /* @__PURE__ */ L(
4559
4567
  gt,
4560
4568
  {
4561
- $theme: v.theme || B,
4569
+ $theme: w.theme || B,
4562
4570
  $width: a,
4563
4571
  $height: te,
4564
- className: _,
4565
- style: U,
4572
+ className: $,
4573
+ style: H,
4566
4574
  children: [
4567
- /* @__PURE__ */ O(Pr, { $theme: v.theme || B, style: { flex: 1 }, children: [
4568
- /* @__PURE__ */ O(Xr, { $theme: v.theme || B, children: [
4575
+ /* @__PURE__ */ L(Xr, { $theme: w.theme || B, style: { flex: 1 }, children: [
4576
+ /* @__PURE__ */ L(Pr, { $theme: w.theme || B, children: [
4569
4577
  p,
4570
- h > 0 && /* @__PURE__ */ O(ta, { $theme: v.theme || B, children: [
4571
- ee.length,
4578
+ h > 0 && /* @__PURE__ */ L(ta, { $theme: w.theme || B, children: [
4579
+ re.length,
4572
4580
  "/",
4573
4581
  h
4574
4582
  ] })
4575
4583
  ] }),
4576
- f && /* @__PURE__ */ o(xt, { $theme: v.theme || B, children: /* @__PURE__ */ O("div", { style: { position: "relative" }, children: [
4584
+ f && /* @__PURE__ */ o(xt, { $theme: w.theme || B, children: /* @__PURE__ */ L("div", { style: { position: "relative" }, children: [
4577
4585
  /* @__PURE__ */ o($t, { children: /* @__PURE__ */ o(xa, { size: 16 }) }),
4578
4586
  /* @__PURE__ */ o(
4579
4587
  yt,
4580
4588
  {
4581
- $theme: v.theme || B,
4589
+ $theme: w.theme || B,
4582
4590
  type: "text",
4583
4591
  placeholder: b,
4584
4592
  value: E,
4585
- onChange: (k) => j(k.target.value)
4593
+ onChange: (S) => j(S.target.value)
4586
4594
  }
4587
4595
  )
4588
4596
  ] }) }),
4589
- /* @__PURE__ */ o(Zr, { children: x.length === 0 ? /* @__PURE__ */ o(aa, { $theme: v.theme || B, children: E ? "未找到匹配项" : "暂无数据" }) : x.map((k) => {
4590
- const H = Z(k.key), Y = k.disabled || P && !H;
4591
- return /* @__PURE__ */ O(
4597
+ /* @__PURE__ */ o(Zr, { children: x.length === 0 ? /* @__PURE__ */ o(aa, { $theme: w.theme || B, children: E ? "未找到匹配项" : "暂无数据" }) : x.map((S) => {
4598
+ const Y = Q(S.key), I = S.disabled || X && !Y;
4599
+ return /* @__PURE__ */ L(
4592
4600
  Qr,
4593
4601
  {
4594
- $theme: v.theme || B,
4595
- $disabled: Y,
4596
- $selected: H,
4597
- onClick: () => q(k),
4602
+ $theme: w.theme || B,
4603
+ $disabled: I,
4604
+ $selected: Y,
4605
+ onClick: () => R(S),
4598
4606
  children: [
4599
- /* @__PURE__ */ o(ea, { $theme: v.theme || B, children: M ? M(k) : k.label }),
4600
- H && /* @__PURE__ */ o(
4607
+ /* @__PURE__ */ o(ea, { $theme: w.theme || B, children: F ? F(S) : S.label }),
4608
+ Y && /* @__PURE__ */ o(
4601
4609
  ra,
4602
4610
  {
4603
- $theme: v.theme || B,
4611
+ $theme: w.theme || B,
4604
4612
  onClick: (i) => {
4605
- i.stopPropagation(), L(k);
4613
+ i.stopPropagation(), q(S);
4606
4614
  },
4607
4615
  disabled: !0,
4608
4616
  children: "已添加"
4609
4617
  }
4610
4618
  ),
4611
- !H && /* @__PURE__ */ o(
4619
+ !Y && /* @__PURE__ */ o(
4612
4620
  ra,
4613
4621
  {
4614
- $theme: v.theme || B,
4615
- disabled: Y,
4622
+ $theme: w.theme || B,
4623
+ disabled: I,
4616
4624
  onClick: (i) => {
4617
- i.stopPropagation(), q(k);
4625
+ i.stopPropagation(), R(S);
4618
4626
  },
4619
4627
  children: "添加"
4620
4628
  }
4621
4629
  )
4622
4630
  ]
4623
4631
  },
4624
- k.key
4632
+ S.key
4625
4633
  );
4626
4634
  }) })
4627
4635
  ] }),
4628
- /* @__PURE__ */ O(Pr, { $theme: v.theme || B, style: { flex: 1 }, children: [
4629
- /* @__PURE__ */ O(Xr, { $theme: v.theme || B, children: [
4636
+ /* @__PURE__ */ L(Xr, { $theme: w.theme || B, style: { flex: 1 }, children: [
4637
+ /* @__PURE__ */ L(Pr, { $theme: w.theme || B, children: [
4630
4638
  d,
4631
- ee.length > 0 && /* @__PURE__ */ o(ta, { $theme: v.theme || B, children: ee.length })
4639
+ re.length > 0 && /* @__PURE__ */ o(ta, { $theme: w.theme || B, children: re.length })
4632
4640
  ] }),
4633
- /* @__PURE__ */ o(Zr, { children: D.length === 0 ? /* @__PURE__ */ o(aa, { $theme: v.theme || B, children: "暂无已选项" }) : D.map((k) => {
4641
+ /* @__PURE__ */ o(Zr, { children: z.length === 0 ? /* @__PURE__ */ o(aa, { $theme: w.theme || B, children: "暂无已选项" }) : z.map((S) => {
4634
4642
  var i, u, c;
4635
- const H = R[k.key] || {}, Y = (n) => w(k.key, n);
4636
- return /* @__PURE__ */ O(
4643
+ const Y = W[S.key] || {}, I = (n) => k(S.key, n);
4644
+ return /* @__PURE__ */ L(
4637
4645
  Qr,
4638
4646
  {
4639
- $theme: v.theme || B,
4647
+ $theme: w.theme || B,
4640
4648
  children: [
4641
- /* @__PURE__ */ o(ea, { $theme: v.theme || B, children: C ? C(k, Y, H) : k.label }),
4649
+ /* @__PURE__ */ o(ea, { $theme: w.theme || B, children: M ? M(S, I, Y) : S.label }),
4642
4650
  /* @__PURE__ */ o(
4643
4651
  ya,
4644
4652
  {
4645
4653
  size: 14,
4646
- color: ((c = (u = (i = v.theme) == null ? void 0 : i.colors) == null ? void 0 : u.text) == null ? void 0 : c.secondary) || "#86909C",
4654
+ color: ((c = (u = (i = w.theme) == null ? void 0 : i.colors) == null ? void 0 : u.text) == null ? void 0 : c.secondary) || "#86909C",
4647
4655
  style: {
4648
4656
  cursor: "pointer",
4649
4657
  marginLeft: "8px"
4650
4658
  },
4651
4659
  onClick: (n) => {
4652
- n.stopPropagation(), L(k);
4660
+ n.stopPropagation(), q(S);
4653
4661
  }
4654
4662
  }
4655
4663
  )
4656
4664
  ]
4657
4665
  },
4658
- k.key
4666
+ S.key
4659
4667
  );
4660
4668
  }) })
4661
4669
  ] })
@@ -4670,11 +4678,11 @@ export {
4670
4678
  Ft as GoogleNavbar,
4671
4679
  Rt as SearchableSelector,
4672
4680
  Yr as Uploader,
4673
- At as generateFormItems,
4681
+ _t as generateFormItems,
4674
4682
  zt as getFormDefaultValues,
4675
4683
  Wt as getFormErrors,
4676
4684
  Bt as isFormValid,
4677
4685
  Ja as useDynamicFormItems,
4678
4686
  it as useDynamicTableColumns,
4679
- _t as validateFormData
4687
+ At as validateFormData
4680
4688
  };