@sunny-base-web/ui 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,32 +1,32 @@
1
- import { getCurrentInstance as Tt, inject as Me, defineComponent as O, computed as b, openBlock as w, createElementBlock as R, normalizeStyle as X, normalizeClass as N, createElementVNode as _, useAttrs as ft, ref as M, createBlock as V, unref as p, mergeProps as L, withCtx as $, renderSlot as j, createTextVNode as D, toDisplayString as T, createCommentVNode as z, createVNode as E, withModifiers as Ee, reactive as pt, h as ye, resolveDynamicComponent as mt, normalizeProps as Y, watch as U, withDirectives as qe, vShow as Ye, Fragment as ce, renderList as Z, resolveComponent as W, createSlots as de, guardReactiveProps as fe, isRef as Ke, toRaw as G, provide as ze, useSlots as jt, nextTick as ge, onMounted as Le, onBeforeUnmount as ht, withKeys as vt, isReactive as Mt } from "vue";
2
- import { Modal as Be, Button as le, Tooltip as zt, Upload as Ae, Checkbox as ve, Progress as Lt, Message as H, Select as Re, Option as Nt, TimePicker as Xe, DatePicker as Ze, Switch as Qe, Radio as Je, TreeSelect as It, Cascader as Dt, Slider as Ut, Rate as Ht, RangePicker as Wt, RadioGroup as Gt, CheckboxGroup as qt, Textarea as Yt, InputNumber as Kt, InputPassword as Xt, Input as Zt } from "@arco-design/web-vue";
3
- import { IconifyIcon as Qt, IconDefault as Jt, Paperclip as eo, CloudUpload as to, Trash2 as oo } from "@sunny-base-web/icons";
4
- import { isString as ie, isHttpUrl as no, isObject as q, isFunction as I, cn as Ne, cloneDeep as me, isBoolean as ke, get as et, isEqual as ro, set as so } from "@sunny-base-web/utils";
5
- import { patterns as Js } from "@sunny-base-web/utils";
6
- import { ScrollAreaScrollbar as ao, ScrollAreaThumb as lo, ScrollAreaRoot as io, ScrollAreaViewport as co, ScrollAreaCorner as uo } from "reka-ui";
7
- import xe from "axios";
8
- import { useStore as fo } from "@tanstack/vue-store";
9
- import { Store as po } from "@tanstack/store";
10
- import { useBreakpoints as mo, useDebounceFn as ho } from "@vueuse/core";
11
- import { useForm as yt, defineRule as vo, useFormValues as gt, Field as yo, useFormContext as go } from "vee-validate";
12
- import { toTypedSchema as bo } from "@vee-validate/zod";
13
- import * as Rs from "zod";
14
- import { VxeGrid as bt, VxeUI as wo } from "vxe-table";
15
- import { VxeSelect as So, VxeInput as ko, VxeButton as Te, VxePager as xo } from "vxe-pc-ui";
16
- const Co = /* @__PURE__ */ Symbol("ArcoConfigProvider"), $o = "arco", _o = "$arco", ee = (e) => {
1
+ import { getCurrentInstance as Tt, inject as Le, defineComponent as O, computed as y, openBlock as w, createElementBlock as A, normalizeStyle as H, normalizeClass as L, createElementVNode as $, useAttrs as pt, ref as T, createBlock as V, unref as p, mergeProps as N, withCtx as _, renderSlot as R, createTextVNode as D, toDisplayString as z, createCommentVNode as M, createVNode as B, withModifiers as Ee, reactive as mt, h as ye, resolveDynamicComponent as ht, normalizeProps as Q, watch as U, withDirectives as Ke, vShow as Xe, Fragment as ce, renderList as ee, resolveComponent as G, createSlots as de, guardReactiveProps as fe, isRef as Ze, toRaw as q, provide as Ne, useSlots as Mt, nextTick as ge, onMounted as Ie, onBeforeUnmount as vt, withKeys as yt, isReactive as Lt } from "vue";
2
+ import { Modal as je, Button as ae, Tooltip as Nt, Upload as ze, Checkbox as ve, Progress as It, Message as W, Select as Re, Option as Dt, TimePicker as Qe, DatePicker as Je, Switch as et, Radio as tt, TreeSelect as Ut, Cascader as Ht, Slider as Wt, Rate as Gt, RangePicker as qt, RadioGroup as Yt, CheckboxGroup as Kt, Textarea as Xt, InputNumber as Zt, InputPassword as Qt, Input as Jt } from "@arco-design/web-vue";
3
+ import { IconifyIcon as eo, IconDefault as to } from "@sunny-base-web/icons";
4
+ import { isString as ie, isHttpUrl as oo, isObject as Y, isFunction as I, cn as De, cloneDeep as me, isBoolean as ke, get as ot, isEqual as no, set as ro } from "@sunny-base-web/utils";
5
+ import { patterns as ll } from "@sunny-base-web/utils";
6
+ import { ScrollAreaScrollbar as so, ScrollAreaThumb as lo, ScrollAreaRoot as ao, ScrollAreaViewport as io, ScrollAreaCorner as co } from "reka-ui";
7
+ import Ce from "axios";
8
+ import { useStore as uo } from "@tanstack/vue-store";
9
+ import { Store as fo } from "@tanstack/store";
10
+ import { useBreakpoints as po, useDebounceFn as mo } from "@vueuse/core";
11
+ import { useForm as gt, defineRule as ho, useFormValues as bt, Field as vo, useFormContext as yo } from "vee-validate";
12
+ import { toTypedSchema as go } from "@vee-validate/zod";
13
+ import * as Is from "zod";
14
+ import { VxeGrid as wt, VxeUI as bo } from "vxe-table";
15
+ import { VxeSelect as wo, VxeInput as So, VxeButton as Te, VxePager as ko } from "vxe-pc-ui";
16
+ const Co = /* @__PURE__ */ Symbol("ArcoConfigProvider"), xo = "arco", $o = "$arco", K = (e) => {
17
17
  var t, o, n;
18
- const r = Tt(), s = Me(Co, void 0);
19
- return `${(n = (o = s?.prefixCls) != null ? o : (t = r?.appContext.config.globalProperties[_o]) == null ? void 0 : t.classPrefix) != null ? n : $o}-${e}`;
20
- }, Fo = Object.prototype.toString;
21
- function te(e) {
22
- return Fo.call(e) === "[object Number]" && e === e;
18
+ const r = Tt(), l = Le(Co, void 0);
19
+ return `${(n = (o = l?.prefixCls) != null ? o : (t = r?.appContext.config.globalProperties[$o]) == null ? void 0 : t.classPrefix) != null ? n : xo}-${e}`;
20
+ }, _o = Object.prototype.toString;
21
+ function X(e) {
22
+ return _o.call(e) === "[object Number]" && e === e;
23
23
  }
24
- var oe = (e, t) => {
24
+ var Z = (e, t) => {
25
25
  for (const [o, n] of t)
26
26
  e[o] = n;
27
27
  return e;
28
28
  };
29
- const Po = O({
29
+ const Fo = O({
30
30
  name: "IconClose",
31
31
  props: {
32
32
  size: {
@@ -53,41 +53,41 @@ const Po = O({
53
53
  click: (e) => !0
54
54
  },
55
55
  setup(e, { emit: t }) {
56
- const o = ee("icon"), n = b(() => [o, `${o}-close`, { [`${o}-spin`]: e.spin }]), r = b(() => {
57
- const a = {};
58
- return e.size && (a.fontSize = te(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
56
+ const o = K("icon"), n = y(() => [o, `${o}-close`, { [`${o}-spin`]: e.spin }]), r = y(() => {
57
+ const s = {};
58
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
59
59
  });
60
60
  return {
61
61
  cls: n,
62
62
  innerStyle: r,
63
- onClick: (a) => {
64
- t("click", a);
63
+ onClick: (s) => {
64
+ t("click", s);
65
65
  }
66
66
  };
67
67
  }
68
- }), Vo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
69
- function Oo(e, t, o, n, r, s) {
70
- return w(), R("svg", {
68
+ }), Po = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
69
+ function Vo(e, t, o, n, r, l) {
70
+ return w(), A("svg", {
71
71
  viewBox: "0 0 48 48",
72
72
  fill: "none",
73
73
  xmlns: "http://www.w3.org/2000/svg",
74
74
  stroke: "currentColor",
75
- class: N(e.cls),
76
- style: X(e.innerStyle),
75
+ class: L(e.cls),
76
+ style: H(e.innerStyle),
77
77
  "stroke-width": e.strokeWidth,
78
78
  "stroke-linecap": e.strokeLinecap,
79
79
  "stroke-linejoin": e.strokeLinejoin,
80
- onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a))
80
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
81
81
  }, t[1] || (t[1] = [
82
- _("path", { d: "M9.857 9.858 24 24m0 0 14.142 14.142M24 24 38.142 9.858M24 24 9.857 38.142" }, null, -1)
83
- ]), 14, Vo);
82
+ $("path", { d: "M9.857 9.858 24 24m0 0 14.142 14.142M24 24 38.142 9.858M24 24 9.857 38.142" }, null, -1)
83
+ ]), 14, Po);
84
84
  }
85
- var Ce = /* @__PURE__ */ oe(Po, [["render", Oo]]);
86
- const Eo = Object.assign(Ce, {
85
+ var xe = /* @__PURE__ */ Z(Fo, [["render", Vo]]);
86
+ const Oo = Object.assign(xe, {
87
87
  install: (e, t) => {
88
88
  var o;
89
89
  const n = (o = t?.iconPrefix) != null ? o : "";
90
- e.component(n + Ce.name, Ce);
90
+ e.component(n + xe.name, xe);
91
91
  }
92
92
  }), Bo = O({
93
93
  name: "IconQuestionCircle",
@@ -116,44 +116,44 @@ const Eo = Object.assign(Ce, {
116
116
  click: (e) => !0
117
117
  },
118
118
  setup(e, { emit: t }) {
119
- const o = ee("icon"), n = b(() => [o, `${o}-question-circle`, { [`${o}-spin`]: e.spin }]), r = b(() => {
120
- const a = {};
121
- return e.size && (a.fontSize = te(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
119
+ const o = K("icon"), n = y(() => [o, `${o}-question-circle`, { [`${o}-spin`]: e.spin }]), r = y(() => {
120
+ const s = {};
121
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
122
122
  });
123
123
  return {
124
124
  cls: n,
125
125
  innerStyle: r,
126
- onClick: (a) => {
127
- t("click", a);
126
+ onClick: (s) => {
127
+ t("click", s);
128
128
  }
129
129
  };
130
130
  }
131
131
  }), Ao = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
132
- function Ro(e, t, o, n, r, s) {
133
- return w(), R("svg", {
132
+ function Eo(e, t, o, n, r, l) {
133
+ return w(), A("svg", {
134
134
  viewBox: "0 0 48 48",
135
135
  fill: "none",
136
136
  xmlns: "http://www.w3.org/2000/svg",
137
137
  stroke: "currentColor",
138
- class: N(e.cls),
139
- style: X(e.innerStyle),
138
+ class: L(e.cls),
139
+ style: H(e.innerStyle),
140
140
  "stroke-width": e.strokeWidth,
141
141
  "stroke-linecap": e.strokeLinecap,
142
142
  "stroke-linejoin": e.strokeLinejoin,
143
- onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a))
143
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
144
144
  }, t[1] || (t[1] = [
145
- _("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z" }, null, -1),
146
- _("path", { d: "M24.006 31v4.008m0-6.008L24 28c0-3 3-4 4.78-6.402C30.558 19.195 28.288 15 23.987 15c-4.014 0-5.382 2.548-5.388 4.514v.465" }, null, -1)
145
+ $("path", { d: "M42 24c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z" }, null, -1),
146
+ $("path", { d: "M24.006 31v4.008m0-6.008L24 28c0-3 3-4 4.78-6.402C30.558 19.195 28.288 15 23.987 15c-4.014 0-5.382 2.548-5.388 4.514v.465" }, null, -1)
147
147
  ]), 14, Ao);
148
148
  }
149
- var $e = /* @__PURE__ */ oe(Bo, [["render", Ro]]);
150
- const wt = Object.assign($e, {
149
+ var $e = /* @__PURE__ */ Z(Bo, [["render", Eo]]);
150
+ const St = Object.assign($e, {
151
151
  install: (e, t) => {
152
152
  var o;
153
153
  const n = (o = t?.iconPrefix) != null ? o : "";
154
154
  e.component(n + $e.name, $e);
155
155
  }
156
- }), To = O({
156
+ }), jo = O({
157
157
  name: "IconSearch",
158
158
  props: {
159
159
  size: {
@@ -180,44 +180,44 @@ const wt = Object.assign($e, {
180
180
  click: (e) => !0
181
181
  },
182
182
  setup(e, { emit: t }) {
183
- const o = ee("icon"), n = b(() => [o, `${o}-search`, { [`${o}-spin`]: e.spin }]), r = b(() => {
184
- const a = {};
185
- return e.size && (a.fontSize = te(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
183
+ const o = K("icon"), n = y(() => [o, `${o}-search`, { [`${o}-spin`]: e.spin }]), r = y(() => {
184
+ const s = {};
185
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
186
186
  });
187
187
  return {
188
188
  cls: n,
189
189
  innerStyle: r,
190
- onClick: (a) => {
191
- t("click", a);
190
+ onClick: (s) => {
191
+ t("click", s);
192
192
  }
193
193
  };
194
194
  }
195
- }), jo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
196
- function Mo(e, t, o, n, r, s) {
197
- return w(), R("svg", {
195
+ }), zo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
196
+ function Ro(e, t, o, n, r, l) {
197
+ return w(), A("svg", {
198
198
  viewBox: "0 0 48 48",
199
199
  fill: "none",
200
200
  xmlns: "http://www.w3.org/2000/svg",
201
201
  stroke: "currentColor",
202
- class: N(e.cls),
203
- style: X(e.innerStyle),
202
+ class: L(e.cls),
203
+ style: H(e.innerStyle),
204
204
  "stroke-width": e.strokeWidth,
205
205
  "stroke-linecap": e.strokeLinecap,
206
206
  "stroke-linejoin": e.strokeLinejoin,
207
- onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a))
207
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
208
208
  }, t[1] || (t[1] = [
209
- _("path", { d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485" }, null, -1)
210
- ]), 14, jo);
209
+ $("path", { d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485" }, null, -1)
210
+ ]), 14, zo);
211
211
  }
212
- var _e = /* @__PURE__ */ oe(To, [["render", Mo]]);
213
- const zo = Object.assign(_e, {
212
+ var _e = /* @__PURE__ */ Z(jo, [["render", Ro]]);
213
+ const To = Object.assign(_e, {
214
214
  install: (e, t) => {
215
215
  var o;
216
216
  const n = (o = t?.iconPrefix) != null ? o : "";
217
217
  e.component(n + _e.name, _e);
218
218
  }
219
- }), Lo = O({
220
- name: "IconDelete",
219
+ }), Mo = O({
220
+ name: "IconUpload",
221
221
  props: {
222
222
  size: {
223
223
  type: [Number, String]
@@ -243,43 +243,169 @@ const zo = Object.assign(_e, {
243
243
  click: (e) => !0
244
244
  },
245
245
  setup(e, { emit: t }) {
246
- const o = ee("icon"), n = b(() => [o, `${o}-delete`, { [`${o}-spin`]: e.spin }]), r = b(() => {
247
- const a = {};
248
- return e.size && (a.fontSize = te(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
246
+ const o = K("icon"), n = y(() => [o, `${o}-upload`, { [`${o}-spin`]: e.spin }]), r = y(() => {
247
+ const s = {};
248
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
249
249
  });
250
250
  return {
251
251
  cls: n,
252
252
  innerStyle: r,
253
- onClick: (a) => {
254
- t("click", a);
253
+ onClick: (s) => {
254
+ t("click", s);
255
255
  }
256
256
  };
257
257
  }
258
- }), No = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
259
- function Io(e, t, o, n, r, s) {
260
- return w(), R("svg", {
258
+ }), Lo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
259
+ function No(e, t, o, n, r, l) {
260
+ return w(), A("svg", {
261
261
  viewBox: "0 0 48 48",
262
262
  fill: "none",
263
263
  xmlns: "http://www.w3.org/2000/svg",
264
264
  stroke: "currentColor",
265
- class: N(e.cls),
266
- style: X(e.innerStyle),
265
+ class: L(e.cls),
266
+ style: H(e.innerStyle),
267
267
  "stroke-width": e.strokeWidth,
268
268
  "stroke-linecap": e.strokeLinecap,
269
269
  "stroke-linejoin": e.strokeLinejoin,
270
- onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a))
270
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
271
271
  }, t[1] || (t[1] = [
272
- _("path", { d: "M5 11h5.5m0 0v29a1 1 0 0 0 1 1h25a1 1 0 0 0 1-1V11m-27 0H16m21.5 0H43m-5.5 0H32m-16 0V7h16v4m-16 0h16M20 18v15m8-15v15" }, null, -1)
273
- ]), 14, No);
272
+ $("path", { d: "M14.93 17.071 24.001 8l9.071 9.071m-9.07 16.071v-25M40 35v6H8v-6" }, null, -1)
273
+ ]), 14, Lo);
274
274
  }
275
- var Fe = /* @__PURE__ */ oe(Lo, [["render", Io]]);
276
- const Do = Object.assign(Fe, {
275
+ var Fe = /* @__PURE__ */ Z(Mo, [["render", No]]);
276
+ const Io = Object.assign(Fe, {
277
277
  install: (e, t) => {
278
278
  var o;
279
279
  const n = (o = t?.iconPrefix) != null ? o : "";
280
280
  e.component(n + Fe.name, Fe);
281
281
  }
282
- }), Uo = O({
282
+ }), Do = O({
283
+ name: "IconAttachment",
284
+ props: {
285
+ size: {
286
+ type: [Number, String]
287
+ },
288
+ strokeWidth: {
289
+ type: Number,
290
+ default: 4
291
+ },
292
+ strokeLinecap: {
293
+ type: String,
294
+ default: "butt",
295
+ validator: (e) => ["butt", "round", "square"].includes(e)
296
+ },
297
+ strokeLinejoin: {
298
+ type: String,
299
+ default: "miter",
300
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
301
+ },
302
+ rotate: Number,
303
+ spin: Boolean
304
+ },
305
+ emits: {
306
+ click: (e) => !0
307
+ },
308
+ setup(e, { emit: t }) {
309
+ const o = K("icon"), n = y(() => [o, `${o}-attachment`, { [`${o}-spin`]: e.spin }]), r = y(() => {
310
+ const s = {};
311
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
312
+ });
313
+ return {
314
+ cls: n,
315
+ innerStyle: r,
316
+ onClick: (s) => {
317
+ t("click", s);
318
+ }
319
+ };
320
+ }
321
+ }), Uo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
322
+ function Ho(e, t, o, n, r, l) {
323
+ return w(), A("svg", {
324
+ viewBox: "0 0 48 48",
325
+ fill: "none",
326
+ stroke: "currentColor",
327
+ xmlns: "http://www.w3.org/2000/svg",
328
+ class: L(e.cls),
329
+ style: H(e.innerStyle),
330
+ "stroke-width": e.strokeWidth,
331
+ "stroke-linecap": e.strokeLinecap,
332
+ "stroke-linejoin": e.strokeLinejoin,
333
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
334
+ }, t[1] || (t[1] = [
335
+ $("path", { d: "M29.037 15.236s-9.174 9.267-11.48 11.594c-2.305 2.327-1.646 4.987-.329 6.316 1.317 1.33 3.994 1.953 6.258-.332L37.32 18.851c3.623-3.657 2.092-8.492 0-10.639-2.093-2.147-6.916-3.657-10.54 0L11.3 23.838c-3.623 3.657-3.953 10.638.329 14.96 4.282 4.322 11.115 4.105 14.821.333 3.706-3.773 8.74-8.822 11.224-11.33" }, null, -1)
336
+ ]), 14, Uo);
337
+ }
338
+ var Pe = /* @__PURE__ */ Z(Do, [["render", Ho]]);
339
+ const Wo = Object.assign(Pe, {
340
+ install: (e, t) => {
341
+ var o;
342
+ const n = (o = t?.iconPrefix) != null ? o : "";
343
+ e.component(n + Pe.name, Pe);
344
+ }
345
+ }), Go = O({
346
+ name: "IconDelete",
347
+ props: {
348
+ size: {
349
+ type: [Number, String]
350
+ },
351
+ strokeWidth: {
352
+ type: Number,
353
+ default: 4
354
+ },
355
+ strokeLinecap: {
356
+ type: String,
357
+ default: "butt",
358
+ validator: (e) => ["butt", "round", "square"].includes(e)
359
+ },
360
+ strokeLinejoin: {
361
+ type: String,
362
+ default: "miter",
363
+ validator: (e) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(e)
364
+ },
365
+ rotate: Number,
366
+ spin: Boolean
367
+ },
368
+ emits: {
369
+ click: (e) => !0
370
+ },
371
+ setup(e, { emit: t }) {
372
+ const o = K("icon"), n = y(() => [o, `${o}-delete`, { [`${o}-spin`]: e.spin }]), r = y(() => {
373
+ const s = {};
374
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
375
+ });
376
+ return {
377
+ cls: n,
378
+ innerStyle: r,
379
+ onClick: (s) => {
380
+ t("click", s);
381
+ }
382
+ };
383
+ }
384
+ }), qo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
385
+ function Yo(e, t, o, n, r, l) {
386
+ return w(), A("svg", {
387
+ viewBox: "0 0 48 48",
388
+ fill: "none",
389
+ xmlns: "http://www.w3.org/2000/svg",
390
+ stroke: "currentColor",
391
+ class: L(e.cls),
392
+ style: H(e.innerStyle),
393
+ "stroke-width": e.strokeWidth,
394
+ "stroke-linecap": e.strokeLinecap,
395
+ "stroke-linejoin": e.strokeLinejoin,
396
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
397
+ }, t[1] || (t[1] = [
398
+ $("path", { d: "M5 11h5.5m0 0v29a1 1 0 0 0 1 1h25a1 1 0 0 0 1-1V11m-27 0H16m21.5 0H43m-5.5 0H32m-16 0V7h16v4m-16 0h16M20 18v15m8-15v15" }, null, -1)
399
+ ]), 14, qo);
400
+ }
401
+ var Ve = /* @__PURE__ */ Z(Go, [["render", Yo]]);
402
+ const kt = Object.assign(Ve, {
403
+ install: (e, t) => {
404
+ var o;
405
+ const n = (o = t?.iconPrefix) != null ? o : "";
406
+ e.component(n + Ve.name, Ve);
407
+ }
408
+ }), Ko = O({
283
409
  name: "IconFullscreenExit",
284
410
  props: {
285
411
  size: {
@@ -306,43 +432,43 @@ const Do = Object.assign(Fe, {
306
432
  click: (e) => !0
307
433
  },
308
434
  setup(e, { emit: t }) {
309
- const o = ee("icon"), n = b(() => [o, `${o}-fullscreen-exit`, { [`${o}-spin`]: e.spin }]), r = b(() => {
310
- const a = {};
311
- return e.size && (a.fontSize = te(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
435
+ const o = K("icon"), n = y(() => [o, `${o}-fullscreen-exit`, { [`${o}-spin`]: e.spin }]), r = y(() => {
436
+ const s = {};
437
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
312
438
  });
313
439
  return {
314
440
  cls: n,
315
441
  innerStyle: r,
316
- onClick: (a) => {
317
- t("click", a);
442
+ onClick: (s) => {
443
+ t("click", s);
318
444
  }
319
445
  };
320
446
  }
321
- }), Ho = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
322
- function Wo(e, t, o, n, r, s) {
323
- return w(), R("svg", {
447
+ }), Xo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
448
+ function Zo(e, t, o, n, r, l) {
449
+ return w(), A("svg", {
324
450
  viewBox: "0 0 48 48",
325
451
  fill: "none",
326
452
  xmlns: "http://www.w3.org/2000/svg",
327
453
  stroke: "currentColor",
328
- class: N(e.cls),
329
- style: X(e.innerStyle),
454
+ class: L(e.cls),
455
+ style: H(e.innerStyle),
330
456
  "stroke-width": e.strokeWidth,
331
457
  "stroke-linecap": e.strokeLinecap,
332
458
  "stroke-linejoin": e.strokeLinejoin,
333
- onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a))
459
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
334
460
  }, t[1] || (t[1] = [
335
- _("path", { d: "M35 6v8a1 1 0 0 0 1 1h8M13 6v8a1 1 0 0 1-1 1H4m31 27v-8a1 1 0 0 1 1-1h8m-31 9v-8a1 1 0 0 0-1-1H4" }, null, -1)
336
- ]), 14, Ho);
461
+ $("path", { d: "M35 6v8a1 1 0 0 0 1 1h8M13 6v8a1 1 0 0 1-1 1H4m31 27v-8a1 1 0 0 1 1-1h8m-31 9v-8a1 1 0 0 0-1-1H4" }, null, -1)
462
+ ]), 14, Xo);
337
463
  }
338
- var Pe = /* @__PURE__ */ oe(Uo, [["render", Wo]]);
339
- const Go = Object.assign(Pe, {
464
+ var Oe = /* @__PURE__ */ Z(Ko, [["render", Zo]]);
465
+ const Qo = Object.assign(Oe, {
340
466
  install: (e, t) => {
341
467
  var o;
342
468
  const n = (o = t?.iconPrefix) != null ? o : "";
343
- e.component(n + Pe.name, Pe);
469
+ e.component(n + Oe.name, Oe);
344
470
  }
345
- }), qo = O({
471
+ }), Jo = O({
346
472
  name: "IconFullscreen",
347
473
  props: {
348
474
  size: {
@@ -369,46 +495,46 @@ const Go = Object.assign(Pe, {
369
495
  click: (e) => !0
370
496
  },
371
497
  setup(e, { emit: t }) {
372
- const o = ee("icon"), n = b(() => [o, `${o}-fullscreen`, { [`${o}-spin`]: e.spin }]), r = b(() => {
373
- const a = {};
374
- return e.size && (a.fontSize = te(e.size) ? `${e.size}px` : e.size), e.rotate && (a.transform = `rotate(${e.rotate}deg)`), a;
498
+ const o = K("icon"), n = y(() => [o, `${o}-fullscreen`, { [`${o}-spin`]: e.spin }]), r = y(() => {
499
+ const s = {};
500
+ return e.size && (s.fontSize = X(e.size) ? `${e.size}px` : e.size), e.rotate && (s.transform = `rotate(${e.rotate}deg)`), s;
375
501
  });
376
502
  return {
377
503
  cls: n,
378
504
  innerStyle: r,
379
- onClick: (a) => {
380
- t("click", a);
505
+ onClick: (s) => {
506
+ t("click", s);
381
507
  }
382
508
  };
383
509
  }
384
- }), Yo = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
385
- function Ko(e, t, o, n, r, s) {
386
- return w(), R("svg", {
510
+ }), en = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
511
+ function tn(e, t, o, n, r, l) {
512
+ return w(), A("svg", {
387
513
  viewBox: "0 0 48 48",
388
514
  fill: "none",
389
515
  xmlns: "http://www.w3.org/2000/svg",
390
516
  stroke: "currentColor",
391
- class: N(e.cls),
392
- style: X(e.innerStyle),
517
+ class: L(e.cls),
518
+ style: H(e.innerStyle),
393
519
  "stroke-width": e.strokeWidth,
394
520
  "stroke-linecap": e.strokeLinecap,
395
521
  "stroke-linejoin": e.strokeLinejoin,
396
- onClick: t[0] || (t[0] = (...a) => e.onClick && e.onClick(...a))
522
+ onClick: t[0] || (t[0] = (...s) => e.onClick && e.onClick(...s))
397
523
  }, t[1] || (t[1] = [
398
- _("path", { d: "M42 17V9a1 1 0 0 0-1-1h-8M6 17V9a1 1 0 0 1 1-1h8m27 23v8a1 1 0 0 1-1 1h-8M6 31v8a1 1 0 0 0 1 1h8" }, null, -1)
399
- ]), 14, Yo);
524
+ $("path", { d: "M42 17V9a1 1 0 0 0-1-1h-8M6 17V9a1 1 0 0 1 1-1h8m27 23v8a1 1 0 0 1-1 1h-8M6 31v8a1 1 0 0 0 1 1h8" }, null, -1)
525
+ ]), 14, en);
400
526
  }
401
- var Ve = /* @__PURE__ */ oe(qo, [["render", Ko]]);
402
- const Xo = Object.assign(Ve, {
527
+ var Be = /* @__PURE__ */ Z(Jo, [["render", tn]]);
528
+ const on = Object.assign(Be, {
403
529
  install: (e, t) => {
404
530
  var o;
405
531
  const n = (o = t?.iconPrefix) != null ? o : "";
406
- e.component(n + Ve.name, Ve);
532
+ e.component(n + Be.name, Be);
407
533
  }
408
- }), Zo = { class: "flex-1 font-semibold text-base text-[var(--color-text-1)] overflow-hidden text-ellipsis whitespace-nowrap" }, Qo = { class: "flex items-center gap-3 ml-3" }, Jo = { class: "cursor-pointer text-[var(--color-text-2)] flex items-center justify-center transition-colors duration-200 text-base hover:text-[var(--color-text-1)]" }, en = {
534
+ }), nn = { class: "flex-1 font-semibold text-base text-[var(--color-text-1)] overflow-hidden text-ellipsis whitespace-nowrap" }, rn = { class: "flex items-center gap-3 ml-3" }, sn = { class: "cursor-pointer text-[var(--color-text-2)] flex items-center justify-center transition-colors duration-200 text-base hover:text-[var(--color-text-1)]" }, ln = {
409
535
  key: 1,
410
536
  class: "flex items-center justify-end gap-2"
411
- }, tn = /* @__PURE__ */ O({
537
+ }, an = /* @__PURE__ */ O({
412
538
  __name: "Modal",
413
539
  props: {
414
540
  modelValue: { type: Boolean, default: !1 },
@@ -434,109 +560,109 @@ const Xo = Object.assign(Ve, {
434
560
  },
435
561
  emits: ["update:modelValue", "close", "ok"],
436
562
  setup(e, { emit: t }) {
437
- const o = e, n = t, r = ft(), s = M(!1), a = b({
563
+ const o = e, n = t, r = pt(), l = T(!1), s = y({
438
564
  get: () => o.modelValue,
439
565
  set: (u) => n("update:modelValue", u)
440
- }), l = M(!1), m = () => {
441
- l.value = !l.value;
442
- }, y = async () => {
566
+ }), a = T(!1), m = () => {
567
+ a.value = !a.value;
568
+ }, g = async () => {
443
569
  const u = o.onBeforeCancel;
444
- typeof u == "function" && await u() === !1 || (a.value = !1, n("close"));
445
- }, v = y, i = async () => {
570
+ typeof u == "function" && await u() === !1 || (s.value = !1, n("close"));
571
+ }, v = g, i = async () => {
446
572
  const u = o.onBeforeOk;
447
573
  if (typeof u == "function")
448
574
  try {
449
- s.value = !0, await u() !== !1 && (n("ok"), a.value = !1);
575
+ l.value = !0, await u() !== !1 && (n("ok"), s.value = !1);
450
576
  } catch (c) {
451
577
  console.error(c);
452
578
  } finally {
453
- s.value = !1;
579
+ l.value = !1;
454
580
  }
455
581
  else
456
- n("ok"), a.value = !1;
582
+ n("ok"), s.value = !1;
457
583
  };
458
- return (u, c) => (w(), V(p(Be), L({
459
- visible: a.value,
460
- "onUpdate:visible": c[0] || (c[0] = (h) => a.value = h),
584
+ return (u, c) => (w(), V(p(je), N({
585
+ visible: s.value,
586
+ "onUpdate:visible": c[0] || (c[0] = (h) => s.value = h),
461
587
  title: e.title,
462
588
  width: e.width,
463
589
  top: e.top,
464
590
  "z-index": e.zIndex,
465
591
  "mask-closable": e.closeOnClickModal,
466
592
  "esc-to-close": e.closeOnEsc,
467
- fullscreen: l.value,
593
+ fullscreen: a.value,
468
594
  closable: !1
469
595
  }, u.$attrs, { class: "k-modal-custom" }), {
470
- title: $(() => [
471
- _("div", {
596
+ title: _(() => [
597
+ $("div", {
472
598
  class: "flex items-center justify-between w-full",
473
599
  onDblclick: m
474
600
  }, [
475
- _("div", Zo, [
476
- j(u.$slots, "title", {}, () => [
477
- D(T(e.title), 1)
601
+ $("div", nn, [
602
+ R(u.$slots, "title", {}, () => [
603
+ D(z(e.title), 1)
478
604
  ])
479
605
  ]),
480
- _("div", Qo, [
481
- e.helpMessage ? (w(), V(p(zt), {
606
+ $("div", rn, [
607
+ e.helpMessage ? (w(), V(p(Nt), {
482
608
  key: 0,
483
609
  content: e.helpMessage
484
610
  }, {
485
- default: $(() => [
486
- _("div", Jo, [
487
- E(p(wt))
611
+ default: _(() => [
612
+ $("div", sn, [
613
+ B(p(St))
488
614
  ])
489
615
  ]),
490
616
  _: 1
491
- }, 8, ["content"])) : z("", !0),
492
- _("div", {
617
+ }, 8, ["content"])) : M("", !0),
618
+ $("div", {
493
619
  class: "cursor-pointer text-[var(--color-text-2)] flex items-center justify-center transition-colors duration-200 text-base hover:text-[var(--color-text-1)]",
494
620
  onClick: Ee(m, ["stop"])
495
621
  }, [
496
- l.value ? (w(), V(p(Go), { key: 0 })) : (w(), V(p(Xo), { key: 1 }))
622
+ a.value ? (w(), V(p(Qo), { key: 0 })) : (w(), V(p(on), { key: 1 }))
497
623
  ]),
498
- _("div", {
624
+ $("div", {
499
625
  class: "cursor-pointer text-[var(--color-text-2)] flex items-center justify-center transition-colors duration-200 text-base hover:text-[rgb(var(--red-6))]",
500
- onClick: Ee(y, ["stop"])
626
+ onClick: Ee(g, ["stop"])
501
627
  }, [
502
- E(p(Eo))
628
+ B(p(Oo))
503
629
  ])
504
630
  ])
505
631
  ], 32)
506
632
  ]),
507
- footer: $(() => [
508
- u.$slots.footer ? j(u.$slots, "footer", { key: 0 }) : (w(), R("div", en, [
509
- j(u.$slots, "insertFooter"),
510
- p(r).hideCancel ? z("", !0) : (w(), V(p(le), L({ key: 0 }, p(r).cancelButtonProps, { onClick: p(v) }), {
511
- default: $(() => [
512
- D(T(p(r).cancelText || "取消"), 1)
633
+ footer: _(() => [
634
+ u.$slots.footer ? R(u.$slots, "footer", { key: 0 }) : (w(), A("div", ln, [
635
+ R(u.$slots, "insertFooter"),
636
+ p(r).hideCancel ? M("", !0) : (w(), V(p(ae), N({ key: 0 }, p(r).cancelButtonProps, { onClick: p(v) }), {
637
+ default: _(() => [
638
+ D(z(p(r).cancelText || "取消"), 1)
513
639
  ]),
514
640
  _: 1
515
641
  }, 16, ["onClick"])),
516
- j(u.$slots, "centerFooter"),
517
- E(p(le), L({
642
+ R(u.$slots, "centerFooter"),
643
+ B(p(ae), N({
518
644
  type: "primary",
519
- loading: s.value || p(r).okLoading || p(r).confirmLoading
645
+ loading: l.value || p(r).okLoading || p(r).confirmLoading
520
646
  }, p(r).okButtonProps, { onClick: i }), {
521
- default: $(() => [
522
- D(T(p(r).okText || "确定"), 1)
647
+ default: _(() => [
648
+ D(z(p(r).okText || "确定"), 1)
523
649
  ]),
524
650
  _: 1
525
651
  }, 16, ["loading"]),
526
- j(u.$slots, "appendFooter")
652
+ R(u.$slots, "appendFooter")
527
653
  ]))
528
654
  ]),
529
- default: $(() => [
530
- j(u.$slots, "default")
655
+ default: _(() => [
656
+ R(u.$slots, "default")
531
657
  ]),
532
658
  _: 3
533
659
  }, 16, ["visible", "title", "width", "top", "z-index", "mask-closable", "esc-to-close", "fullscreen"]));
534
660
  }
535
661
  });
536
- class on {
662
+ class cn {
537
663
  state;
538
664
  constructor(t = {}) {
539
- this.state = pt({
665
+ this.state = mt({
540
666
  modelValue: !1,
541
667
  ...t
542
668
  });
@@ -556,47 +682,47 @@ class on {
556
682
  return this;
557
683
  }
558
684
  }
559
- function Ms(e = {}) {
560
- const t = new on(e);
685
+ function Hs(e = {}) {
686
+ const t = new cn(e);
561
687
  return [O({
562
688
  name: "SunnyConnectedModal",
563
689
  inheritAttrs: !1,
564
- setup(n, { attrs: r, slots: s }) {
690
+ setup(n, { attrs: r, slots: l }) {
565
691
  return () => ye(
566
- tn,
692
+ an,
567
693
  {
568
694
  ...t.state,
569
695
  ...r,
570
- "onUpdate:modelValue": (a) => {
571
- t.setState({ modelValue: a }), t.state.onVisibleChange?.(a), typeof r["onUpdate:modelValue"] == "function" && r["onUpdate:modelValue"](a);
696
+ "onUpdate:modelValue": (s) => {
697
+ t.setState({ modelValue: s }), t.state.onVisibleChange?.(s), typeof r["onUpdate:modelValue"] == "function" && r["onUpdate:modelValue"](s);
572
698
  }
573
699
  },
574
- s
700
+ l
575
701
  );
576
702
  }
577
703
  }), t];
578
704
  }
579
- const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
705
+ const Ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
580
706
  __proto__: null
581
- }, Symbol.toStringTag, { value: "Module" })), nn = ["src"], tt = /* @__PURE__ */ O({
707
+ }, Symbol.toStringTag, { value: "Module" })), un = ["src"], dn = /* @__PURE__ */ O({
582
708
  __name: "icon",
583
709
  props: {
584
710
  fallback: { type: Boolean },
585
711
  icon: { type: [Function, String] }
586
712
  },
587
713
  setup(e) {
588
- const t = e, o = b(() => ie(t.icon) && no(t.icon)), n = b(() => {
714
+ const t = e, o = y(() => ie(t.icon) && oo(t.icon)), n = y(() => {
589
715
  const { icon: r } = t;
590
- return !ie(r) && (q(r) || I(r));
716
+ return !ie(r) && (Y(r) || I(r));
591
717
  });
592
- return (r, s) => n.value ? (w(), V(mt(e.icon), Y(L({ key: 0 }, r.$attrs)), null, 16)) : o.value ? (w(), R("img", L({
718
+ return (r, l) => n.value ? (w(), V(ht(e.icon), Q(N({ key: 0 }, r.$attrs)), null, 16)) : o.value ? (w(), A("img", N({
593
719
  key: 1,
594
720
  src: e.icon
595
- }, r.$attrs), null, 16, nn)) : e.icon ? (w(), V(p(Qt), L({ key: 2 }, r.$attrs, {
721
+ }, r.$attrs), null, 16, un)) : e.icon ? (w(), V(p(eo), N({ key: 2 }, r.$attrs, {
596
722
  icon: e.icon
597
- }), null, 16, ["icon"])) : e.fallback ? (w(), V(p(Jt), Y(L({ key: 3 }, r.$attrs)), null, 16)) : z("", !0);
723
+ }), null, 16, ["icon"])) : e.fallback ? (w(), V(p(to), Q(N({ key: 3 }, r.$attrs)), null, 16)) : M("", !0);
598
724
  }
599
- }), St = /* @__PURE__ */ O({
725
+ }), Ct = /* @__PURE__ */ O({
600
726
  __name: "ScrollBar",
601
727
  props: {
602
728
  orientation: { default: "vertical" },
@@ -606,25 +732,25 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
606
732
  class: {}
607
733
  },
608
734
  setup(e) {
609
- const t = e, o = b(() => {
735
+ const t = e, o = y(() => {
610
736
  const { class: n, ...r } = t;
611
737
  return r;
612
738
  });
613
- return (n, r) => (w(), V(p(ao), L(o.value, {
614
- class: p(Ne)(
739
+ return (n, r) => (w(), V(p(so), N(o.value, {
740
+ class: p(De)(
615
741
  "flex touch-none select-none transition-colors",
616
742
  e.orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
617
743
  e.orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
618
744
  t.class
619
745
  )
620
746
  }), {
621
- default: $(() => [
622
- E(p(lo), { class: "relative flex-1 rounded-full bg-border" })
747
+ default: _(() => [
748
+ B(p(lo), { class: "relative flex-1 rounded-full bg-border" })
623
749
  ]),
624
750
  _: 1
625
751
  }, 16, ["class"]));
626
752
  }
627
- }), rn = /* @__PURE__ */ O({
753
+ }), fn = /* @__PURE__ */ O({
628
754
  __name: "ScrollArea",
629
755
  props: {
630
756
  type: {},
@@ -638,31 +764,31 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
638
764
  viewportProps: {}
639
765
  },
640
766
  setup(e) {
641
- const t = e, o = b(() => {
767
+ const t = e, o = y(() => {
642
768
  const { class: n, ...r } = t;
643
769
  return r;
644
770
  });
645
- return (n, r) => (w(), V(p(io), L(o.value, {
646
- class: p(Ne)("relative overflow-hidden", t.class)
771
+ return (n, r) => (w(), V(p(ao), N(o.value, {
772
+ class: p(De)("relative overflow-hidden", t.class)
647
773
  }), {
648
- default: $(() => [
649
- E(p(co), {
774
+ default: _(() => [
775
+ B(p(io), {
650
776
  "as-child": "",
651
777
  class: "h-full w-full rounded-[inherit] focus:outline-none",
652
778
  onScroll: e.onScroll
653
779
  }, {
654
- default: $(() => [
655
- j(n.$slots, "default")
780
+ default: _(() => [
781
+ R(n.$slots, "default")
656
782
  ]),
657
783
  _: 3
658
784
  }, 8, ["onScroll"]),
659
- E(St),
660
- E(p(uo))
785
+ B(Ct),
786
+ B(p(co))
661
787
  ]),
662
788
  _: 3
663
789
  }, 16, ["class"]));
664
790
  }
665
- }), ot = 1, sn = /* @__PURE__ */ O({
791
+ }), nt = 1, pn = /* @__PURE__ */ O({
666
792
  __name: "scrollbar",
667
793
  props: {
668
794
  class: { default: "" },
@@ -677,55 +803,55 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
677
803
  },
678
804
  emits: ["scrollAt"],
679
805
  setup(e, { emit: t }) {
680
- const o = e, n = t, r = M(!0), s = M(!1), a = M(!1), l = M(!0), m = b(() => o.shadow && o.shadowTop), y = b(() => o.shadow && o.shadowBottom), v = b(() => o.shadow && o.shadowLeft), i = b(() => o.shadow && o.shadowRight), u = b(() => ({
681
- "both-shadow": !l.value && !s.value && v.value && i.value,
682
- "left-shadow": !l.value && v.value,
683
- "right-shadow": !s.value && i.value
806
+ const o = e, n = t, r = T(!0), l = T(!1), s = T(!1), a = T(!0), m = y(() => o.shadow && o.shadowTop), g = y(() => o.shadow && o.shadowBottom), v = y(() => o.shadow && o.shadowLeft), i = y(() => o.shadow && o.shadowRight), u = y(() => ({
807
+ "both-shadow": !a.value && !l.value && v.value && i.value,
808
+ "left-shadow": !a.value && v.value,
809
+ "right-shadow": !l.value && i.value
684
810
  }));
685
811
  function c(h) {
686
- const g = h.target, S = g?.scrollTop ?? 0, F = g?.scrollLeft ?? 0, C = g?.clientHeight ?? 0, x = g?.clientWidth ?? 0, B = g?.scrollHeight ?? 0, d = g?.scrollWidth ?? 0;
687
- r.value = S <= 0, l.value = F <= 0, a.value = Math.abs(S) + C >= B - ot, s.value = Math.abs(F) + x >= d - ot, n("scrollAt", {
688
- bottom: a.value,
689
- left: l.value,
690
- right: s.value,
812
+ const b = h.target, S = b?.scrollTop ?? 0, F = b?.scrollLeft ?? 0, x = b?.clientHeight ?? 0, C = b?.clientWidth ?? 0, E = b?.scrollHeight ?? 0, d = b?.scrollWidth ?? 0;
813
+ r.value = S <= 0, a.value = F <= 0, s.value = Math.abs(S) + x >= E - nt, l.value = Math.abs(F) + C >= d - nt, n("scrollAt", {
814
+ bottom: s.value,
815
+ left: a.value,
816
+ right: l.value,
691
817
  top: r.value
692
818
  });
693
819
  }
694
- return (h, g) => (w(), V(p(rn), {
695
- class: N([[p(Ne)(o.class), u.value], "sunny-scrollbar relative"]),
820
+ return (h, b) => (w(), V(p(fn), {
821
+ class: L([[p(De)(o.class), u.value], "sunny-scrollbar relative"]),
696
822
  "on-scroll": c
697
823
  }, {
698
- default: $(() => [
699
- m.value ? (w(), R("div", {
824
+ default: _(() => [
825
+ m.value ? (w(), A("div", {
700
826
  key: 0,
701
- class: N([{
827
+ class: L([{
702
828
  "opacity-100": !r.value,
703
829
  "border-t border-border": e.shadowBorder && !r.value
704
830
  }, "scrollbar-top-shadow pointer-events-none absolute top-0 z-10 h-12 w-full opacity-0 transition-opacity duration-300 ease-in-out will-change-[opacity]"])
705
- }, null, 2)) : z("", !0),
706
- j(h.$slots, "default", {}, void 0, !0),
707
- y.value ? (w(), R("div", {
831
+ }, null, 2)) : M("", !0),
832
+ R(h.$slots, "default", {}, void 0, !0),
833
+ g.value ? (w(), A("div", {
708
834
  key: 1,
709
- class: N([{
710
- "opacity-100": !r.value && !a.value,
711
- "border-b border-border": e.shadowBorder && !r.value && !a.value
835
+ class: L([{
836
+ "opacity-100": !r.value && !s.value,
837
+ "border-b border-border": e.shadowBorder && !r.value && !s.value
712
838
  }, "scrollbar-bottom-shadow pointer-events-none absolute bottom-0 z-10 h-12 w-full opacity-0 transition-opacity duration-300 ease-in-out will-change-[opacity]"])
713
- }, null, 2)) : z("", !0),
714
- e.horizontal ? (w(), V(p(St), {
839
+ }, null, 2)) : M("", !0),
840
+ e.horizontal ? (w(), V(p(Ct), {
715
841
  key: 2,
716
- class: N(e.scrollBarClass),
842
+ class: L(e.scrollBarClass),
717
843
  orientation: "horizontal"
718
- }, null, 8, ["class"])) : z("", !0)
844
+ }, null, 8, ["class"])) : M("", !0)
719
845
  ]),
720
846
  _: 3
721
847
  }, 8, ["class"]));
722
848
  }
723
- }), kt = (e, t) => {
849
+ }), xt = (e, t) => {
724
850
  const o = e.__vccOpts || e;
725
851
  for (const [n, r] of t)
726
852
  o[n] = r;
727
853
  return o;
728
- }, Ls = /* @__PURE__ */ kt(sn, [["__scopeId", "data-v-913bc4ec"]]), an = { class: "sunny-file-upload" }, ln = { class: "font-bold text-gray-700 mb-2" }, cn = { class: "flex flex-wrap items-center text-sm mb-3 select-none" }, un = { class: "cursor-pointer text-blue-600 hover:text-blue-700 flex items-center mr-4 transition-colors" }, dn = { class: "text-xs text-blue-600" }, fn = { class: "text-xs text-gray-400" }, pn = { class: "border border-dashed border-gray-300 rounded-lg p-4 transition-all duration-300" }, mn = { class: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, hn = { class: "flex-1 min-w-0 pr-8" }, vn = ["title"], yn = { class: "flex items-center text-xs text-gray-500" }, gn = { class: "mr-3 min-w-[3em]" }, bn = { class: "ml-2 w-8 text-right" }, nt = 1024, Ns = /* @__PURE__ */ O({
854
+ }, Gs = /* @__PURE__ */ xt(pn, [["__scopeId", "data-v-913bc4ec"]]), mn = { class: "sunny-file-upload" }, hn = { class: "font-bold text-gray-700 mb-2" }, vn = { class: "flex flex-wrap items-center text-sm mb-3 select-none" }, yn = { class: "cursor-pointer text-blue-600 hover:text-blue-700 flex items-center mr-4 transition-colors" }, gn = { class: "text-xs text-blue-600" }, bn = { class: "text-xs text-gray-400" }, wn = { class: "border border-dashed border-gray-300 rounded-lg p-4 transition-all duration-300" }, Sn = { class: "grid grid-cols-1 sm:grid-cols-2 gap-4" }, kn = { class: "flex-1 min-w-0 pr-8" }, Cn = ["title"], xn = { class: "flex items-center text-xs text-gray-500" }, $n = { class: "mr-3 min-w-[3em]" }, _n = { class: "ml-2 w-8 text-right" }, rt = 1024, qs = /* @__PURE__ */ O({
729
855
  __name: "index",
730
856
  props: {
731
857
  modelValue: { default: "" },
@@ -743,20 +869,20 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
743
869
  },
744
870
  emits: ["update:modelValue", "change"],
745
871
  setup(e, { emit: t }) {
746
- const o = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], n = e, r = t, s = M(!0), a = M(!1), l = M([]), m = M(!1), y = b(() => l.value.every((d) => !!d.url)), v = b(() => l.value.filter((d) => d.checked).length);
872
+ const o = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], n = e, r = t, l = T(!0), s = T(!1), a = T([]), m = T(!1), g = y(() => a.value.every((d) => !!d.url)), v = y(() => a.value.filter((d) => d.checked).length);
747
873
  U(() => n.modelValue, (d) => {
748
874
  try {
749
- l.value = JSON.parse(d || "[]");
875
+ a.value = JSON.parse(d || "[]");
750
876
  } catch (f) {
751
- console.warn("Failed to parse modelValue:", f), l.value = [];
877
+ console.warn("Failed to parse modelValue:", f), a.value = [];
752
878
  }
753
879
  }, { immediate: !0, deep: !0 });
754
880
  const i = (d) => d, u = (d) => {
755
881
  if (d === 0) return "0 B";
756
- const f = Math.floor(Math.log(d) / Math.log(nt));
757
- return (d / Math.pow(nt, f)).toPrecision(3) + " " + o[f];
882
+ const f = Math.floor(Math.log(d) / Math.log(rt));
883
+ return (d / Math.pow(rt, f)).toPrecision(3) + " " + o[f];
758
884
  }, c = (d) => {
759
- const f = d.type || "", P = (d.name || "").split(".").pop()?.toLowerCase() || "", A = {
885
+ const f = d.type || "", P = (d.name || "").split(".").pop()?.toLowerCase() || "", j = {
760
886
  "vscode-icons:file-type-excel": ["xls", "xlsx", "csv"],
761
887
  "vscode-icons:file-type-powerpoint": ["ppt", "pptx"],
762
888
  "vscode-icons:file-type-text": ["txt"],
@@ -764,25 +890,25 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
764
890
  "vscode-icons:file-type-zip": ["zip", "rar", "7z", "tar", "gz"],
765
891
  "vscode-icons:file-type-pdf": ["pdf"]
766
892
  };
767
- for (const [re, pe] of Object.entries(A))
893
+ for (const [re, pe] of Object.entries(j))
768
894
  if (pe.includes(P) || pe.some((Rt) => f.includes(Rt)))
769
895
  return re;
770
896
  return f.includes("excel") || f.includes("spreadsheet") ? "vscode-icons:file-type-excel" : f.includes("powerpoint") || f.includes("presentation") ? "vscode-icons:file-type-powerpoint" : f.includes("text/plain") ? "vscode-icons:file-type-text" : f.includes("word") || f.includes("document") ? "vscode-icons:file-type-word" : f.includes("zip") || f.includes("compressed") ? "vscode-icons:file-type-zip" : f.includes("pdf") ? "vscode-icons:file-type-pdf" : "vscode-icons:default-file";
771
897
  }, h = () => {
772
- const d = JSON.stringify(l.value);
898
+ const d = JSON.stringify(a.value);
773
899
  r("update:modelValue", d), r("change", d);
774
- }, g = (d, f) => {
900
+ }, b = (d, f) => {
775
901
  if (f.status !== "init") return;
776
- if (l.value.length >= n.limit) {
777
- H.error(`最多上传${n.limit}个文件`);
902
+ if (a.value.length >= n.limit) {
903
+ W.error(`最多上传${n.limit}个文件`);
778
904
  return;
779
905
  }
780
906
  const k = n.maxSize * 1024 * 1024;
781
907
  if (f.file.size > k) {
782
- H.error(`文件最大限制${u(k)}`);
908
+ W.error(`文件最大限制${u(k)}`);
783
909
  return;
784
910
  }
785
- l.value.push({
911
+ a.value.push({
786
912
  uid: f.uid,
787
913
  name: f.name,
788
914
  size: f.file?.size,
@@ -792,167 +918,164 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
792
918
  checked: !1
793
919
  });
794
920
  }, S = async () => {
795
- if (l.value.length === 0) return;
796
- const d = l.value.filter((f) => !f.url);
921
+ if (a.value.length === 0) return;
922
+ const d = a.value.filter((f) => !f.url);
797
923
  for (const f of d) {
798
924
  const k = new FormData();
799
- k.append("fileName", f.file), k.append("encryptFile", a.value ? "1" : "0"), n.storeType && k.append("storeType", n.storeType), n.s3FileDir && k.append("s3FileDir", n.s3FileDir), n.preSigned && k.append("preSigned", n.preSigned), n.preSignedExpire && k.append("preSignedExpire", n.preSignedExpire);
925
+ k.append("fileName", f.file), k.append("encryptFile", s.value ? "1" : "0"), n.storeType && k.append("storeType", n.storeType), n.s3FileDir && k.append("s3FileDir", n.s3FileDir), n.preSigned && k.append("preSigned", n.preSigned), n.preSignedExpire && k.append("preSignedExpire", n.preSignedExpire);
800
926
  try {
801
- const P = await xe.post(n.action, k, {
927
+ const P = await Ce.post(n.action, k, {
802
928
  onUploadProgress: (re) => {
803
929
  if (re.total) {
804
930
  const pe = Math.floor(re.loaded / re.total * 100);
805
931
  f.percentage = pe;
806
932
  }
807
933
  }
808
- }), { data: A } = P;
809
- A.code === 200 ? (Object.assign(f, A.result), H.success(A.message || "上传成功")) : (H.error(A.message || "上传失败"), F(f.uid));
934
+ }), { data: j } = P;
935
+ j.code === 200 ? (Object.assign(f, j.result), W.success(j.message || "上传成功")) : (W.error(j.message || "上传失败"), F(f.uid));
810
936
  } catch {
811
- H.error("上传失败"), F(f.uid);
937
+ W.error("上传失败"), F(f.uid);
812
938
  }
813
939
  }
814
940
  h();
815
941
  }, F = (d) => {
816
- const f = l.value.findIndex((k) => k.uid === d);
817
- f > -1 && l.value.splice(f, 1);
818
- }, C = (d, f) => {
819
- d.url ? Be.confirm({
942
+ const f = a.value.findIndex((k) => k.uid === d);
943
+ f > -1 && a.value.splice(f, 1);
944
+ }, x = (d, f) => {
945
+ d.url ? je.confirm({
820
946
  title: i("提示"),
821
947
  content: i("是否删除该文件?"),
822
948
  onOk: () => {
823
- xe.post(n.delAction, {
949
+ Ce.post(n.delAction, {
824
950
  filePathList: [d.url],
825
951
  storeType: n.storeType
826
952
  }).then((k) => {
827
953
  const { data: P } = k;
828
- H[P.success ? "success" : "error"](P.message), P.code === 200 && (l.value.splice(f, 1), h());
954
+ W[P.success ? "success" : "error"](P.message), P.code === 200 && (a.value.splice(f, 1), h());
829
955
  });
830
956
  }
831
- }) : (l.value.splice(f, 1), h());
832
- }, x = () => {
833
- const d = l.value.every((f) => f.checked);
834
- l.value.forEach((f) => f.checked = !d);
835
- }, B = () => {
836
- const d = l.value.filter((f) => f.checked);
837
- d.length !== 0 && Be.confirm({
957
+ }) : (a.value.splice(f, 1), h());
958
+ }, C = () => {
959
+ const d = a.value.every((f) => f.checked);
960
+ a.value.forEach((f) => f.checked = !d);
961
+ }, E = () => {
962
+ const d = a.value.filter((f) => f.checked);
963
+ d.length !== 0 && je.confirm({
838
964
  title: i("提示"),
839
965
  content: i("是否删除选中的文件?"),
840
966
  onOk: () => {
841
967
  m.value = !0;
842
968
  const f = d.map((k) => k.url).filter(Boolean);
843
- f.length > 0 ? xe.post(n.delAction, {
969
+ f.length > 0 ? Ce.post(n.delAction, {
844
970
  filePathList: f,
845
971
  storeType: n.storeType
846
972
  }).then((k) => {
847
973
  const { data: P } = k;
848
- H[P.success ? "success" : "error"](P.message), P.code === 200 && (l.value = l.value.filter((A) => !A.checked), h());
974
+ W[P.success ? "success" : "error"](P.message), P.code === 200 && (a.value = a.value.filter((j) => !j.checked), h());
849
975
  }).finally(() => {
850
976
  m.value = !1;
851
- }) : (l.value = l.value.filter((k) => !k.checked), h(), m.value = !1);
977
+ }) : (a.value = a.value.filter((k) => !k.checked), h(), m.value = !1);
852
978
  }
853
979
  });
854
980
  };
855
- return (d, f) => (w(), R("div", an, [
856
- _("div", ln, T(i("附件")), 1),
857
- qe(_("div", cn, [
858
- E(p(Ae), {
981
+ return (d, f) => (w(), A("div", mn, [
982
+ $("div", hn, z(i("附件")), 1),
983
+ Ke($("div", vn, [
984
+ B(p(ze), {
859
985
  "show-file-list": !1,
860
986
  "auto-upload": !1,
861
987
  multiple: "",
862
988
  accept: e.accept,
863
- onChange: g
989
+ onChange: b
864
990
  }, {
865
- "upload-button": $(() => [
866
- _("span", un, [
867
- E(p(eo), { class: "mr-1 w-4 h-4" }),
868
- D(" " + T(i("选择附件")), 1)
991
+ "upload-button": _(() => [
992
+ $("span", yn, [
993
+ B(p(Wo), { class: "mr-1 w-4 h-4" }),
994
+ D(" " + z(i("选择附件")), 1)
869
995
  ])
870
996
  ]),
871
997
  _: 1
872
998
  }, 8, ["accept"]),
873
- _("span", {
874
- class: N(["flex items-center mr-4 transition-colors", y.value ? "text-gray-300 cursor-not-allowed" : "cursor-pointer text-gray-600 hover:text-gray-800"]),
875
- onClick: f[0] || (f[0] = (k) => !y.value && S())
999
+ $("span", {
1000
+ class: L(["flex items-center mr-4 transition-colors", g.value ? "text-gray-300 cursor-not-allowed" : "cursor-pointer text-gray-600 hover:text-gray-800"]),
1001
+ onClick: f[0] || (f[0] = (k) => !g.value && S())
876
1002
  }, [
877
- E(p(tt), {
878
- icon: p(to),
879
- class: "mr-1 w-4 h-4"
880
- }, null, 8, ["icon"]),
881
- D(" " + T(i("上传附件")), 1)
1003
+ B(p(Io), { class: "mr-1 w-4 h-4" }),
1004
+ D(" " + z(i("上传附件")), 1)
882
1005
  ], 2),
883
- _("span", {
1006
+ $("span", {
884
1007
  class: "cursor-pointer text-blue-600 hover:text-blue-700 mr-4 transition-colors",
885
- onClick: x
886
- }, T(i("全选")), 1),
887
- _("span", {
888
- class: N(["mr-4 transition-colors", v.value === 0 ? "text-gray-300 cursor-not-allowed" : "cursor-pointer text-gray-500 hover:text-red-500"]),
889
- onClick: B
890
- }, T(i("删除")), 3),
1008
+ onClick: C
1009
+ }, z(i("全选")), 1),
1010
+ $("span", {
1011
+ class: L(["mr-4 transition-colors", v.value === 0 ? "text-gray-300 cursor-not-allowed" : "cursor-pointer text-gray-500 hover:text-red-500"]),
1012
+ onClick: E
1013
+ }, z(i("删除")), 3),
891
1014
  e.showEncrypt ? (w(), V(p(ve), {
892
1015
  key: 0,
893
- modelValue: a.value,
894
- "onUpdate:modelValue": f[1] || (f[1] = (k) => a.value = k),
1016
+ modelValue: s.value,
1017
+ "onUpdate:modelValue": f[1] || (f[1] = (k) => s.value = k),
895
1018
  class: "mr-4"
896
1019
  }, {
897
- default: $(() => [
898
- _("span", dn, T(i("是否加密")), 1)
1020
+ default: _(() => [
1021
+ $("span", gn, z(i("是否加密")), 1)
899
1022
  ]),
900
1023
  _: 1
901
- }, 8, ["modelValue"])) : z("", !0),
902
- _("span", fn, " (" + T(i("单个文件最大")) + T(e.maxSize) + "MB," + T(i("最多上传")) + T(e.limit) + T(i("个")) + ") ", 1),
903
- _("span", {
1024
+ }, 8, ["modelValue"])) : M("", !0),
1025
+ $("span", bn, " (" + z(i("单个文件最大")) + z(e.maxSize) + "MB," + z(i("最多上传")) + z(e.limit) + z(i("个")) + ") ", 1),
1026
+ $("span", {
904
1027
  class: "ml-auto cursor-pointer text-blue-600 text-xs hover:text-blue-700 transition-colors",
905
- onClick: f[2] || (f[2] = (k) => s.value = !s.value)
906
- }, T(s.value ? i("隐藏") : i("展开")), 1)
1028
+ onClick: f[2] || (f[2] = (k) => l.value = !l.value)
1029
+ }, z(l.value ? i("隐藏") : i("展开")), 1)
907
1030
  ], 512), [
908
- [Ye, !e.readonly]
1031
+ [Xe, !e.readonly]
909
1032
  ]),
910
- qe(_("div", pn, [
911
- _("div", mn, [
912
- (w(!0), R(ce, null, Z(l.value, (k, P) => (w(), R("div", {
1033
+ Ke($("div", wn, [
1034
+ $("div", Sn, [
1035
+ (w(!0), A(ce, null, ee(a.value, (k, P) => (w(), A("div", {
913
1036
  key: k.uid || P,
914
1037
  class: "bg-gray-50 hover:bg-gray-100 rounded p-3 relative flex items-center border border-transparent hover:border-gray-200 transition-colors group"
915
1038
  }, [
916
- E(p(tt), {
1039
+ B(p(dn), {
917
1040
  icon: c(k),
918
1041
  class: "w-10 h-10 mr-3 flex-shrink-0"
919
1042
  }, null, 8, ["icon"]),
920
- _("div", hn, [
921
- _("div", {
1043
+ $("div", kn, [
1044
+ $("div", {
922
1045
  class: "text-sm truncate font-medium text-gray-700 mb-1",
923
1046
  title: k.name
924
- }, T(k.name), 9, vn),
925
- _("div", yn, [
926
- _("span", gn, T(u(k.size)), 1),
927
- E(p(Lt), {
1047
+ }, z(k.name), 9, Cn),
1048
+ $("div", xn, [
1049
+ $("span", $n, z(u(k.size)), 1),
1050
+ B(p(It), {
928
1051
  percent: k.percentage / 100,
929
1052
  size: "small",
930
1053
  "show-text": !1,
931
1054
  color: k.percentage === 100 ? "#00b42a" : "#165dff",
932
1055
  class: "flex-1"
933
1056
  }, null, 8, ["percent", "color"]),
934
- _("span", bn, T(k.percentage) + "%", 1)
1057
+ $("span", _n, z(k.percentage) + "%", 1)
935
1058
  ])
936
1059
  ]),
937
- e.readonly ? z("", !0) : (w(), V(p(ve), {
1060
+ e.readonly ? M("", !0) : (w(), V(p(ve), {
938
1061
  key: 0,
939
1062
  modelValue: k.checked,
940
- "onUpdate:modelValue": (A) => k.checked = A,
1063
+ "onUpdate:modelValue": (j) => k.checked = j,
941
1064
  class: "absolute top-3 right-3"
942
1065
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
943
- e.readonly ? z("", !0) : (w(), V(p(oo), {
1066
+ e.readonly ? M("", !0) : (w(), V(p(kt), {
944
1067
  key: 1,
945
1068
  class: "absolute bottom-3 right-3 w-4 h-4 cursor-pointer text-gray-400 hover:text-red-500 transition-colors",
946
- onClick: (A) => C(k, P)
1069
+ onClick: (j) => x(k, P)
947
1070
  }, null, 8, ["onClick"]))
948
1071
  ]))), 128))
949
1072
  ])
950
1073
  ], 512), [
951
- [Ye, l.value.length > 0 && s.value]
1074
+ [Xe, a.value.length > 0 && l.value]
952
1075
  ])
953
1076
  ]));
954
1077
  }
955
- }), wn = O({
1078
+ }), Fn = O({
956
1079
  name: "SunnySelect",
957
1080
  inheritAttrs: !1,
958
1081
  props: {
@@ -971,49 +1094,49 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
971
1094
  },
972
1095
  emits: ["update:modelValue"],
973
1096
  setup(e, { emit: t, slots: o, attrs: n }) {
974
- const r = (l) => {
975
- const m = l.cMeta;
976
- return !m || Object.keys(m).length === 0 ? !0 : !e.filterModel || Object.keys(e.filterModel).length === 0 ? !1 : Object.entries(m).every(([y, v]) => {
977
- const i = e.filterModel[y];
1097
+ const r = (a) => {
1098
+ const m = a.cMeta;
1099
+ return !m || Object.keys(m).length === 0 ? !0 : !e.filterModel || Object.keys(e.filterModel).length === 0 ? !1 : Object.entries(m).every(([g, v]) => {
1100
+ const i = e.filterModel[g];
978
1101
  return i == null ? !1 : String(i) === String(v);
979
1102
  });
980
- }, s = b(() => {
981
- const l = e.modelValue;
982
- if (l == null || l === "" || n["allow-create"] === !0 || n["allow-create"] === "")
983
- return l;
984
- const m = (y) => e.options.some((v) => r(v) ? v.value == y || typeof y == "object" && y !== null && "value" in y && v.value == y.value : !1);
985
- if (Array.isArray(l)) {
986
- const y = l.filter((v) => m(v));
987
- return y.length === l.length ? l : y;
1103
+ }, l = y(() => {
1104
+ const a = e.modelValue;
1105
+ if (a == null || a === "" || n["allow-create"] === !0 || n["allow-create"] === "")
1106
+ return a;
1107
+ const m = (g) => e.options.some((v) => r(v) ? v.value == g || typeof g == "object" && g !== null && "value" in g && v.value == g.value : !1);
1108
+ if (Array.isArray(a)) {
1109
+ const g = a.filter((v) => m(v));
1110
+ return g.length === a.length ? a : g;
988
1111
  } else
989
- return m(l) ? l : void 0;
1112
+ return m(a) ? a : void 0;
990
1113
  });
991
- U(s, (l) => {
992
- l !== e.modelValue && t("update:modelValue", l);
1114
+ U(l, (a) => {
1115
+ a !== e.modelValue && t("update:modelValue", a);
993
1116
  });
994
- const a = (l) => {
995
- t("update:modelValue", l);
1117
+ const s = (a) => {
1118
+ t("update:modelValue", a);
996
1119
  };
997
1120
  return () => /* @__PURE__ */ React.createElement(
998
1121
  Re,
999
1122
  {
1000
1123
  ...n,
1001
- modelValue: s.value,
1002
- "onUpdate:modelValue": a
1124
+ modelValue: l.value,
1125
+ "onUpdate:modelValue": s
1003
1126
  },
1004
1127
  {
1005
- default: () => e.options.map((l) => r(l) ? /* @__PURE__ */ React.createElement(Nt, { key: l.value, ...l }, {
1006
- default: () => o.option ? o.option({ data: l }) : l.label
1128
+ default: () => e.options.map((a) => r(a) ? /* @__PURE__ */ React.createElement(Dt, { key: a.value, ...a }, {
1129
+ default: () => o.option ? o.option({ data: a }) : a.label
1007
1130
  }) : null),
1008
1131
  ...Object.fromEntries(
1009
1132
  Object.entries(o).filter(
1010
- ([l]) => l !== "option" && l !== "default"
1133
+ ([a]) => a !== "option" && a !== "default"
1011
1134
  )
1012
1135
  )
1013
1136
  }
1014
1137
  );
1015
1138
  }
1016
- }), Sn = { class: "flex items-center justify-between px-3 py-2 border-b border-[var(--color-neutral-3)] bg-[var(--color-bg-popup)] select-none" }, kn = { class: "flex items-center gap-1" }, xn = { class: "w-6 h-6 flex items-center justify-center rounded cursor-help text-[var(--color-text-3)] hover:text-[var(--color-text-1)] hover:bg-[var(--color-fill-3)] transition-all" }, Is = /* @__PURE__ */ O({
1139
+ }), Pn = { class: "flex items-center justify-between px-3 py-2 border-b border-[var(--color-neutral-3)] bg-[var(--color-bg-popup)] select-none" }, Vn = { class: "flex items-center gap-1" }, On = { class: "w-6 h-6 flex items-center justify-center rounded cursor-help text-[var(--color-text-3)] hover:text-[var(--color-text-1)] hover:bg-[var(--color-fill-3)] transition-all" }, Ys = /* @__PURE__ */ O({
1017
1140
  name: "SunnyBatchSelect",
1018
1141
  inheritAttrs: !1,
1019
1142
  __name: "BatchSelect",
@@ -1025,33 +1148,33 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1025
1148
  },
1026
1149
  emits: ["update:modelValue", "change"],
1027
1150
  setup(e, { emit: t }) {
1028
- const o = e, n = t, r = b(
1151
+ const o = e, n = t, r = y(
1029
1152
  () => o.options.filter((i) => !i.disabled)
1030
- ), s = b(() => r.value.length === 0 ? !1 : r.value.every(
1153
+ ), l = y(() => r.value.length === 0 ? !1 : r.value.every(
1031
1154
  (i) => o.modelValue.includes(i.value)
1032
- )), a = b(() => {
1155
+ )), s = y(() => {
1033
1156
  if (r.value.length === 0) return !1;
1034
1157
  const i = r.value.filter(
1035
1158
  (u) => o.modelValue.includes(u.value)
1036
1159
  ).length;
1037
1160
  return i > 0 && i < r.value.length;
1038
- }), l = (i) => {
1161
+ }), a = (i) => {
1039
1162
  n("update:modelValue", i), n("change", i);
1040
1163
  }, m = (i) => {
1041
1164
  if (i === !0) {
1042
1165
  const c = r.value.map((S) => S.value), h = o.modelValue.filter((S) => {
1043
- const F = o.options.find((C) => C.value === S);
1166
+ const F = o.options.find((x) => x.value === S);
1044
1167
  return F && F.disabled;
1045
- }), g = Array.from(/* @__PURE__ */ new Set([...h, ...c]));
1046
- n("update:modelValue", g), n("change", g);
1168
+ }), b = Array.from(/* @__PURE__ */ new Set([...h, ...c]));
1169
+ n("update:modelValue", b), n("change", b);
1047
1170
  } else {
1048
1171
  const c = o.modelValue.filter((h) => {
1049
- const g = o.options.find((S) => S.value === h);
1050
- return g && g.disabled;
1172
+ const b = o.options.find((S) => S.value === h);
1173
+ return b && b.disabled;
1051
1174
  });
1052
1175
  n("update:modelValue", c), n("change", c);
1053
1176
  }
1054
- }, y = () => {
1177
+ }, g = () => {
1055
1178
  const i = o.modelValue.filter((u) => {
1056
1179
  const c = o.options.find((h) => h.value === u);
1057
1180
  return c && c.disabled;
@@ -1062,79 +1185,79 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1062
1185
  if (!u) return;
1063
1186
  const c = u.getData("text");
1064
1187
  if (!c) return;
1065
- const h = c.split(/\r?\n/).map((C) => C.trim()).filter((C) => C);
1188
+ const h = c.split(/\r?\n/).map((x) => x.trim()).filter((x) => x);
1066
1189
  if (h.length === 0) return;
1067
- const g = [];
1190
+ const b = [];
1068
1191
  let S = 0;
1069
- const F = (C) => {
1070
- const x = C.cMeta;
1071
- return !x || Object.keys(x).length === 0 ? !0 : !o.filterModel || Object.keys(o.filterModel).length === 0 ? !1 : Object.entries(x).every(([B, d]) => {
1072
- const f = o.filterModel[B];
1192
+ const F = (x) => {
1193
+ const C = x.cMeta;
1194
+ return !C || Object.keys(C).length === 0 ? !0 : !o.filterModel || Object.keys(o.filterModel).length === 0 ? !1 : Object.entries(C).every(([E, d]) => {
1195
+ const f = o.filterModel[E];
1073
1196
  return f == null ? !1 : String(f) === String(d);
1074
1197
  });
1075
1198
  };
1076
- if (h.forEach((C) => {
1199
+ if (h.forEach((x) => {
1077
1200
  if (o.matchStrategy === "value" || o.matchStrategy === "both") {
1078
- const x = o.options.find((B) => String(B.value) === C);
1079
- if (x && !x.disabled && F(x)) {
1080
- g.push(x.value), S++;
1201
+ const C = o.options.find((E) => String(E.value) === x);
1202
+ if (C && !C.disabled && F(C)) {
1203
+ b.push(C.value), S++;
1081
1204
  return;
1082
1205
  }
1083
1206
  }
1084
1207
  if (o.matchStrategy === "label" || o.matchStrategy === "both") {
1085
- const x = o.options.find((B) => B.label === C);
1086
- x && !x.disabled && F(x) && (g.push(x.value), S++);
1208
+ const C = o.options.find((E) => E.label === x);
1209
+ C && !C.disabled && F(C) && (b.push(C.value), S++);
1087
1210
  }
1088
- }), g.length > 0) {
1211
+ }), b.length > 0) {
1089
1212
  i.preventDefault();
1090
- const C = Array.from(/* @__PURE__ */ new Set([...o.modelValue, ...g]));
1091
- n("update:modelValue", C), n("change", C), H.success(`成功识别并选中 ${S} 项 (Matched ${S} items)`);
1213
+ const x = Array.from(/* @__PURE__ */ new Set([...o.modelValue, ...b]));
1214
+ n("update:modelValue", x), n("change", x), W.success(`成功识别并选中 ${S} 项 (Matched ${S} items)`);
1092
1215
  }
1093
1216
  };
1094
1217
  return (i, u) => {
1095
- const c = W("a-checkbox"), h = W("a-tooltip");
1096
- return w(), V(p(wn), L(i.$attrs, {
1218
+ const c = G("a-checkbox"), h = G("a-tooltip");
1219
+ return w(), V(p(Fn), N(i.$attrs, {
1097
1220
  "model-value": e.modelValue,
1098
1221
  options: e.options,
1099
1222
  "filter-model": e.filterModel,
1100
1223
  multiple: "",
1101
1224
  "allow-search": "",
1102
- "onUpdate:modelValue": l,
1225
+ "onUpdate:modelValue": a,
1103
1226
  onPaste: v
1104
1227
  }), de({
1105
- header: $(() => [
1106
- _("div", Sn, [
1107
- E(c, {
1108
- "model-value": s.value,
1109
- indeterminate: a.value,
1228
+ header: _(() => [
1229
+ $("div", Pn, [
1230
+ B(c, {
1231
+ "model-value": l.value,
1232
+ indeterminate: s.value,
1110
1233
  onChange: m,
1111
1234
  class: "pl-1"
1112
1235
  }, {
1113
- default: $(() => [...u[0] || (u[0] = [
1114
- _("span", { class: "text-[var(--color-text-1)]" }, "全选", -1)
1236
+ default: _(() => [...u[0] || (u[0] = [
1237
+ $("span", { class: "text-[var(--color-text-1)]" }, "全选", -1)
1115
1238
  ])]),
1116
1239
  _: 1
1117
1240
  }, 8, ["model-value", "indeterminate"]),
1118
- _("div", kn, [
1119
- E(h, { content: "清除所有选中项" }, {
1120
- default: $(() => [
1121
- _("div", {
1241
+ $("div", Vn, [
1242
+ B(h, { content: "清除所有选中项" }, {
1243
+ default: _(() => [
1244
+ $("div", {
1122
1245
  class: "w-6 h-6 flex items-center justify-center rounded cursor-pointer text-[var(--color-text-3)] hover:bg-[var(--color-fill-3)] transition-all",
1123
- onClick: y
1246
+ onClick: g
1124
1247
  }, [
1125
- E(p(Do))
1248
+ B(p(kt))
1126
1249
  ])
1127
1250
  ]),
1128
1251
  _: 1
1129
1252
  }),
1130
- u[1] || (u[1] = _("div", { class: "w-[1px] h-3 bg-[var(--color-neutral-3)] mx-1" }, null, -1)),
1131
- E(h, {
1253
+ u[1] || (u[1] = $("div", { class: "w-[1px] h-3 bg-[var(--color-neutral-3)] mx-1" }, null, -1)),
1254
+ B(h, {
1132
1255
  content: "支持从 Excel 或文本编辑器(↓列数据)复制多行数据,粘贴至搜索框即可自动匹配并选中。",
1133
1256
  position: "left"
1134
1257
  }, {
1135
- default: $(() => [
1136
- _("div", xn, [
1137
- E(p(wt))
1258
+ default: _(() => [
1259
+ $("div", On, [
1260
+ B(p(St))
1138
1261
  ])
1139
1262
  ]),
1140
1263
  _: 1
@@ -1144,16 +1267,16 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1144
1267
  ]),
1145
1268
  _: 2
1146
1269
  }, [
1147
- Z(i.$slots, (g, S) => ({
1270
+ ee(i.$slots, (b, S) => ({
1148
1271
  name: S,
1149
- fn: $((F) => [
1150
- j(i.$slots, S, Y(fe(F || {})))
1272
+ fn: _((F) => [
1273
+ R(i.$slots, S, Q(fe(F || {})))
1151
1274
  ])
1152
1275
  }))
1153
1276
  ]), 1040, ["model-value", "options", "filter-model"]);
1154
1277
  };
1155
1278
  }
1156
- }), Ds = /* @__PURE__ */ O({
1279
+ }), Ks = /* @__PURE__ */ O({
1157
1280
  name: "SunnySearchInputTag",
1158
1281
  inheritAttrs: !1,
1159
1282
  __name: "SearchInputTag",
@@ -1166,26 +1289,26 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1166
1289
  },
1167
1290
  emits: ["update:modelValue", "search", "change", "clear"],
1168
1291
  setup(e, { emit: t }) {
1169
- const o = e, n = t, r = b(() => o.fieldNames?.label || "label"), s = b(() => o.fieldNames?.value || "value"), a = b(() => o.modelValue.map((i) => ({
1292
+ const o = e, n = t, r = y(() => o.fieldNames?.label || "label"), l = y(() => o.fieldNames?.value || "value"), s = y(() => o.modelValue.map((i) => ({
1170
1293
  label: i[r.value],
1171
- value: i[s.value],
1294
+ value: i[l.value],
1172
1295
  closable: !o.disabled,
1173
1296
  tagProps: i.tagProps
1174
1297
  // 透传可能存在的 tagProps
1175
- }))), l = (i) => {
1298
+ }))), a = (i) => {
1176
1299
  o.disabled || ["Backspace", "Delete", "Tab", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(i.key) || i.preventDefault();
1177
1300
  }, m = (i, u) => {
1178
1301
  const c = [...o.modelValue];
1179
1302
  c.splice(u, 1), n("update:modelValue", c), n("change", c);
1180
- }, y = () => {
1303
+ }, g = () => {
1181
1304
  n("update:modelValue", []), n("change", []), n("clear");
1182
1305
  }, v = () => {
1183
1306
  o.disabled || n("search");
1184
1307
  };
1185
1308
  return (i, u) => {
1186
- const c = W("a-input-tag");
1187
- return w(), V(c, L(i.$attrs, {
1188
- "model-value": a.value,
1309
+ const c = G("a-input-tag");
1310
+ return w(), V(c, N(i.$attrs, {
1311
+ "model-value": s.value,
1189
1312
  "input-value": "",
1190
1313
  disabled: e.disabled,
1191
1314
  placeholder: e.placeholder,
@@ -1193,32 +1316,32 @@ const zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1193
1316
  "allow-create": !1,
1194
1317
  class: "w-full group",
1195
1318
  onRemove: m,
1196
- onClear: y,
1197
- onKeydown: l
1319
+ onClear: g,
1320
+ onKeydown: a
1198
1321
  }), de({
1199
- suffix: $(() => [
1200
- _("div", {
1201
- class: N(["flex items-center h-full px-2 border-l border-[var(--color-neutral-3)] group-hover:border-[var(--color-neutral-4)] -mr-3", [
1322
+ suffix: _(() => [
1323
+ $("div", {
1324
+ class: L(["flex items-center h-full px-2 border-l border-[var(--color-neutral-3)] group-hover:border-[var(--color-neutral-4)] -mr-3", [
1202
1325
  e.disabled ? "cursor-not-allowed text-[var(--color-text-4)]" : "cursor-pointer text-[var(--color-text-2)] group"
1203
1326
  ]]),
1204
1327
  onClick: Ee(v, ["stop"])
1205
1328
  }, [
1206
- E(p(zo), { class: "transition-colors group-hover:text-[var(--color-primary-6)]" })
1329
+ B(p(To), { class: "transition-colors group-hover:text-[var(--color-primary-6)]" })
1207
1330
  ], 2)
1208
1331
  ]),
1209
1332
  _: 2
1210
1333
  }, [
1211
- Z(i.$slots, (h, g) => ({
1212
- name: g,
1213
- fn: $((S) => [
1214
- j(i.$slots, g, Y(fe(S || {})))
1334
+ ee(i.$slots, (h, b) => ({
1335
+ name: b,
1336
+ fn: _((S) => [
1337
+ R(i.$slots, b, Q(fe(S || {})))
1215
1338
  ])
1216
1339
  }))
1217
1340
  ]), 1040, ["model-value", "disabled", "placeholder", "max-tag-count"]);
1218
1341
  };
1219
1342
  }
1220
1343
  });
1221
- class Cn {
1344
+ class Bn {
1222
1345
  // 核心 TanStack Store 实例 / Core TanStack Store instance
1223
1346
  store;
1224
1347
  /**
@@ -1229,7 +1352,7 @@ class Cn {
1229
1352
  * @param options 配置项 / Configuration options
1230
1353
  */
1231
1354
  constructor(t, o) {
1232
- this.store = new po(t), o?.onUpdate && this.store.subscribe(() => {
1355
+ this.store = new fo(t), o?.onUpdate && this.store.subscribe(() => {
1233
1356
  o.onUpdate?.();
1234
1357
  });
1235
1358
  }
@@ -1258,31 +1381,31 @@ class Cn {
1258
1381
  return this.store.state;
1259
1382
  }
1260
1383
  }
1261
- function rt(e, t = "YYYY-MM-DD") {
1384
+ function st(e, t = "YYYY-MM-DD") {
1262
1385
  if (!e) return e;
1263
1386
  if (I(e.format))
1264
1387
  return e.format(t);
1265
1388
  if (e instanceof Date) {
1266
- const o = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0"), s = String(e.getHours()).padStart(2, "0"), a = String(e.getMinutes()).padStart(2, "0"), l = String(e.getSeconds()).padStart(2, "0");
1267
- return t.replace("YYYY", String(o)).replace("MM", n).replace("DD", r).replace("HH", s).replace("mm", a).replace("ss", l);
1389
+ const o = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), r = String(e.getDate()).padStart(2, "0"), l = String(e.getHours()).padStart(2, "0"), s = String(e.getMinutes()).padStart(2, "0"), a = String(e.getSeconds()).padStart(2, "0");
1390
+ return t.replace("YYYY", String(o)).replace("MM", n).replace("DD", r).replace("HH", l).replace("mm", s).replace("ss", a);
1268
1391
  }
1269
1392
  return String(e);
1270
1393
  }
1271
- function st(e) {
1394
+ function lt(e) {
1272
1395
  return is(e, "Date");
1273
1396
  }
1274
1397
  function at(e) {
1275
- return q(e) && "$d" in e && "$y" in e && "$M" in e;
1398
+ return Y(e) && "$d" in e && "$y" in e && "$M" in e;
1276
1399
  }
1277
1400
  function he(e, t) {
1278
- if (!q(e) || !q(t) || Array.isArray(t)) return t;
1401
+ if (!Y(e) || !Y(t) || Array.isArray(t)) return t;
1279
1402
  const o = { ...e };
1280
1403
  return Object.keys(t).forEach((n) => {
1281
- const r = o[n], s = t[n];
1282
- q(r) && q(s) ? o[n] = he(r, s) : o[n] = s;
1404
+ const r = o[n], l = t[n];
1405
+ Y(r) && Y(l) ? o[n] = he(r, l) : o[n] = l;
1283
1406
  }), o;
1284
1407
  }
1285
- class $n {
1408
+ class An {
1286
1409
  condition = !1;
1287
1410
  resolveFn = null;
1288
1411
  promise = null;
@@ -1298,14 +1421,14 @@ class $n {
1298
1421
  })), await this.promise);
1299
1422
  }
1300
1423
  }
1301
- function _n(e) {
1424
+ function En(e) {
1302
1425
  const t = Object.getPrototypeOf(e), o = Object.getOwnPropertyNames(t);
1303
1426
  for (const n of o) {
1304
1427
  const r = e[n];
1305
1428
  n !== "constructor" && typeof r == "function" && (e[n] = r.bind(e));
1306
1429
  }
1307
1430
  }
1308
- function Fn() {
1431
+ function jn() {
1309
1432
  return {
1310
1433
  actionWrapperClass: "",
1311
1434
  collapsed: !1,
@@ -1329,7 +1452,7 @@ function Fn() {
1329
1452
  values: {}
1330
1453
  };
1331
1454
  }
1332
- class Pn {
1455
+ class zn {
1333
1456
  // vee-validate 表单上下文
1334
1457
  form = {};
1335
1458
  // 是否已挂载
@@ -1351,8 +1474,8 @@ class Pn {
1351
1474
  // 上一次的状态 (用于 Diff)
1352
1475
  prevState = null;
1353
1476
  constructor(t = {}) {
1354
- const { ...o } = t, n = Fn();
1355
- this.store = new Cn(
1477
+ const { ...o } = t, n = jn();
1478
+ this.store = new Bn(
1356
1479
  {
1357
1480
  ...n,
1358
1481
  ...o
@@ -1362,7 +1485,7 @@ class Pn {
1362
1485
  this.prevState = this.state, this.state = this.store.getState(), this.updateState();
1363
1486
  }
1364
1487
  }
1365
- ), this.state = this.store.getState(), this.stateHandler = new $n(), _n(this);
1488
+ ), this.state = this.store.getState(), this.stateHandler = new An(), En(this);
1366
1489
  }
1367
1490
  /**
1368
1491
  * 获取字段组件实例
@@ -1375,7 +1498,7 @@ class Pn {
1375
1498
  let o = this.componentRefMap.has(t) ? this.componentRefMap.get(t) : void 0;
1376
1499
  if (o && o.$ && o.$.type && o.$.type.name === "AsyncComponentWrapper" && o.$.subTree && o.$.subTree.ref) {
1377
1500
  const n = o.$.subTree.ref;
1378
- Array.isArray(n) ? n.length > 0 && n[0] && Ke(n[0].r) && (o = n[0].r.value) : Ke(n.r) && (o = n.r.value);
1501
+ Array.isArray(n) ? n.length > 0 && n[0] && Ze(n[0].r) && (o = n[0].r.value) : Ze(n.r) && (o = n.r.value);
1379
1502
  }
1380
1503
  return o;
1381
1504
  }
@@ -1432,17 +1555,17 @@ class Pn {
1432
1555
  */
1433
1556
  merge(t) {
1434
1557
  const o = [this, t], n = new Proxy(t, {
1435
- get(r, s) {
1436
- return s === "merge" ? (a) => (o.push(a), n) : s === "submitAllForm" ? async (a = !0) => {
1558
+ get(r, l) {
1559
+ return l === "merge" ? (s) => (o.push(s), n) : l === "submitAllForm" ? async (s = !0) => {
1437
1560
  try {
1438
- const l = await Promise.all(
1439
- o.map(async (m) => (await m.validate()).valid ? G(await m.getValues() || {}) : void 0)
1561
+ const a = await Promise.all(
1562
+ o.map(async (m) => (await m.validate()).valid ? q(await m.getValues() || {}) : void 0)
1440
1563
  );
1441
- return l.some((m) => !m) ? void 0 : a ? Object.assign({}, ...l) : l;
1442
- } catch (l) {
1443
- console.error("Validation error:", l);
1564
+ return a.some((m) => !m) ? void 0 : s ? Object.assign({}, ...a) : a;
1565
+ } catch (a) {
1566
+ console.error("Validation error:", a);
1444
1567
  }
1445
- } : r[s];
1568
+ } : r[l];
1446
1569
  }
1447
1570
  });
1448
1571
  return n;
@@ -1456,7 +1579,7 @@ class Pn {
1456
1579
  */
1457
1580
  mount(t, o) {
1458
1581
  this.isMounted || (Object.assign(this.form, t), this.stateHandler.setConditionTrue(), this.setLatestSubmissionValues({
1459
- ...G(this.handleRangeTimeValue(this.form.values))
1582
+ ...q(this.handleRangeTimeValue(this.form.values))
1460
1583
  }), o && (this.componentRefMap = o), this.isMounted = !0);
1461
1584
  }
1462
1585
  /**
@@ -1464,7 +1587,7 @@ class Pn {
1464
1587
  * Remove schema by fields
1465
1588
  */
1466
1589
  async removeSchemaByFields(t) {
1467
- const o = new Set(t), r = (this.state?.schema ?? []).filter((s) => !o.has(s.fieldName));
1590
+ const o = new Set(t), r = (this.state?.schema ?? []).filter((l) => !o.has(l.fieldName));
1468
1591
  this.setState({
1469
1592
  schema: r
1470
1593
  });
@@ -1519,7 +1642,7 @@ class Pn {
1519
1642
  * Set latest submission values
1520
1643
  */
1521
1644
  setLatestSubmissionValues(t) {
1522
- this.latestSubmissionValues = { ...G(t) };
1645
+ this.latestSubmissionValues = { ...q(t) };
1523
1646
  }
1524
1647
  /**
1525
1648
  * 更新状态
@@ -1542,16 +1665,16 @@ class Pn {
1542
1665
  r.setValues(t, n);
1543
1666
  return;
1544
1667
  }
1545
- const s = r.values || {}, a = (m, y) => {
1668
+ const l = r.values || {}, s = (m, g) => {
1546
1669
  const v = {};
1547
1670
  for (const i in m)
1548
- if (Object.prototype.hasOwnProperty.call(m, i) && i in y) {
1549
- const u = m[i], c = y[i];
1550
- q(u) && !Array.isArray(u) && !st(u) && !at(u) && q(c) && !Array.isArray(c) && !st(c) && !at(c) ? v[i] = a(u, c) : v[i] = u;
1671
+ if (Object.prototype.hasOwnProperty.call(m, i) && i in g) {
1672
+ const u = m[i], c = g[i];
1673
+ Y(u) && !Array.isArray(u) && !lt(u) && !at(u) && Y(c) && !Array.isArray(c) && !lt(c) && !at(c) ? v[i] = s(u, c) : v[i] = u;
1551
1674
  }
1552
1675
  return v;
1553
- }, l = a(t, s);
1554
- r.setValues(l, n);
1676
+ }, a = s(t, l);
1677
+ r.setValues(a, n);
1555
1678
  }
1556
1679
  /**
1557
1680
  * 提交表单
@@ -1559,8 +1682,8 @@ class Pn {
1559
1682
  */
1560
1683
  async submitForm(t) {
1561
1684
  t?.preventDefault(), t?.stopPropagation();
1562
- const o = await this.getForm(), { valid: n, errors: r } = await o.validate(), s = G(await this.getValues());
1563
- return n ? await this.state?.handleSubmit?.(s) : this.state?.scrollToFirstError && this.scrollToFirstError(r), { valid: n, values: s, errors: r };
1685
+ const o = await this.getForm(), { valid: n, errors: r } = await o.validate(), l = q(await this.getValues());
1686
+ return n ? await this.state?.handleSubmit?.(l) : this.state?.scrollToFirstError && this.scrollToFirstError(r), { valid: n, values: l, errors: r };
1564
1687
  }
1565
1688
  /**
1566
1689
  * 卸载表单
@@ -1576,20 +1699,20 @@ class Pn {
1576
1699
  updateSchema(t) {
1577
1700
  const o = [...t];
1578
1701
  if (!o.every(
1579
- (a) => Reflect.has(a, "fieldName") && a.fieldName
1702
+ (s) => Reflect.has(s, "fieldName") && s.fieldName
1580
1703
  )) {
1581
1704
  console.error(
1582
1705
  "All items in the schema array must have a valid `fieldName` property to be updated"
1583
1706
  );
1584
1707
  return;
1585
1708
  }
1586
- const r = me(this.state?.schema ?? []), s = {};
1587
- o.forEach((a) => {
1588
- a.fieldName && (s[a.fieldName] = a);
1589
- }), r.forEach((a, l) => {
1590
- const m = s[a.fieldName];
1591
- m && (r[l] = he(
1592
- a,
1709
+ const r = me(this.state?.schema ?? []), l = {};
1710
+ o.forEach((s) => {
1711
+ s.fieldName && (l[s.fieldName] = s);
1712
+ }), r.forEach((s, a) => {
1713
+ const m = l[s.fieldName];
1714
+ m && (r[a] = he(
1715
+ s,
1593
1716
  m
1594
1717
  ));
1595
1718
  }), this.setState({ schema: r });
@@ -1642,37 +1765,37 @@ class Pn {
1642
1765
  const o = this.state?.arrayToStringFields;
1643
1766
  if (!o || !Array.isArray(o))
1644
1767
  return;
1645
- const n = (r, s = ",") => {
1646
- this.processFields(r, s, t, (a, l) => {
1647
- if (Array.isArray(a))
1648
- return a.join(l);
1649
- if (typeof a == "string") {
1650
- if (a === "")
1768
+ const n = (r, l = ",") => {
1769
+ this.processFields(r, l, t, (s, a) => {
1770
+ if (Array.isArray(s))
1771
+ return s.join(a);
1772
+ if (typeof s == "string") {
1773
+ if (s === "")
1651
1774
  return [];
1652
- const m = l.replaceAll(
1775
+ const m = a.replaceAll(
1653
1776
  /[.*+?^${}()|[\]\\]/g,
1654
1777
  String.raw`\$&`
1655
1778
  );
1656
- return a.split(new RegExp(m));
1779
+ return s.split(new RegExp(m));
1657
1780
  } else
1658
- return a;
1781
+ return s;
1659
1782
  });
1660
1783
  };
1661
1784
  if (o.every((r) => typeof r == "string")) {
1662
- const r = o[o.length - 1] || "", s = r.length === 1 ? o.slice(0, -1) : o, a = r.length === 1 ? r : ",";
1663
- n(s, a);
1785
+ const r = o[o.length - 1] || "", l = r.length === 1 ? o.slice(0, -1) : o, s = r.length === 1 ? r : ",";
1786
+ n(l, s);
1664
1787
  return;
1665
1788
  }
1666
1789
  o.forEach((r) => {
1667
1790
  if (Array.isArray(r)) {
1668
- const [s, a = ","] = r;
1669
- if (!Array.isArray(s)) {
1791
+ const [l, s = ","] = r;
1792
+ if (!Array.isArray(l)) {
1670
1793
  console.warn(
1671
- `Invalid field configuration: fields should be an array of strings, got ${typeof s}`
1794
+ `Invalid field configuration: fields should be an array of strings, got ${typeof l}`
1672
1795
  );
1673
1796
  return;
1674
1797
  }
1675
- n(s, a);
1798
+ n(l, s);
1676
1799
  }
1677
1800
  });
1678
1801
  };
@@ -1683,19 +1806,19 @@ class Pn {
1683
1806
  handleRangeTimeValue = (t) => {
1684
1807
  const o = { ...t }, n = this.state?.fieldMappingTime;
1685
1808
  return this.handleMultiFields(o), !n || !Array.isArray(n) || n.forEach(
1686
- ([r, [s, a], l = "YYYY-MM-DD"]) => {
1687
- if (s && a && o[r] === null && (Reflect.deleteProperty(o, s), Reflect.deleteProperty(o, a)), !o[r]) {
1809
+ ([r, [l, s], a = "YYYY-MM-DD"]) => {
1810
+ if (l && s && o[r] === null && (Reflect.deleteProperty(o, l), Reflect.deleteProperty(o, s)), !o[r]) {
1688
1811
  Reflect.deleteProperty(o, r);
1689
1812
  return;
1690
1813
  }
1691
- const [m, y] = o[r];
1692
- if (l === null)
1693
- o[s] = m, o[a] = y;
1694
- else if (I(l))
1695
- o[s] = l(m), o[a] = l(y);
1814
+ const [m, g] = o[r];
1815
+ if (a === null)
1816
+ o[l] = m, o[s] = g;
1817
+ else if (I(a))
1818
+ o[l] = a(m), o[s] = a(g);
1696
1819
  else {
1697
- const [v, i] = Array.isArray(l) ? l : [l, l];
1698
- o[s] = m ? rt(m, v) : void 0, o[a] = y ? rt(y, i) : void 0;
1820
+ const [v, i] = Array.isArray(a) ? a : [a, a];
1821
+ o[l] = m ? st(m, v) : void 0, o[s] = g ? st(g, i) : void 0;
1699
1822
  }
1700
1823
  Reflect.deleteProperty(o, r);
1701
1824
  }
@@ -1706,9 +1829,9 @@ class Pn {
1706
1829
  * Process fields helper
1707
1830
  */
1708
1831
  processFields = (t, o, n, r) => {
1709
- t.forEach((s) => {
1710
- const a = n[s];
1711
- a != null && (n[s] = r(a, o));
1832
+ t.forEach((l) => {
1833
+ const s = n[l];
1834
+ s != null && (n[l] = r(s, o));
1712
1835
  });
1713
1836
  };
1714
1837
  /**
@@ -1719,31 +1842,31 @@ class Pn {
1719
1842
  const t = this.state?.schema ?? [], o = this.prevState?.schema ?? [];
1720
1843
  if (t.length < o.length) {
1721
1844
  const n = new Set(
1722
- t.map((s) => s.fieldName)
1845
+ t.map((l) => l.fieldName)
1723
1846
  ), r = o.filter(
1724
- (s) => !n.has(s.fieldName)
1847
+ (l) => !n.has(l.fieldName)
1725
1848
  );
1726
- for (const s of r)
1727
- this.form?.setFieldValue?.(s.fieldName, void 0);
1849
+ for (const l of r)
1850
+ this.form?.setFieldValue?.(l.fieldName, void 0);
1728
1851
  }
1729
1852
  }
1730
1853
  // 类型定义占位,实际在 useSunnyForm 中注入实现
1731
1854
  // Type definition placeholder, actual implementation injected in useSunnyForm
1732
1855
  useStore;
1733
1856
  }
1734
- const xt = /* @__PURE__ */ Symbol("FormRenderProps"), Vn = /* @__PURE__ */ Symbol("ComponentRefMap"), On = (e) => {
1735
- ze(xt, e);
1736
- }, Ie = () => {
1737
- const e = Me(xt);
1857
+ const $t = /* @__PURE__ */ Symbol("FormRenderProps"), Rn = /* @__PURE__ */ Symbol("ComponentRefMap"), Tn = (e) => {
1858
+ Ne($t, e);
1859
+ }, Ue = () => {
1860
+ const e = Le($t);
1738
1861
  if (!e)
1739
1862
  throw new Error(
1740
1863
  "injectRenderFormProps must be used within provideFormRenderProps"
1741
1864
  );
1742
1865
  return e;
1743
- }, En = (e) => {
1744
- ze(Vn, e);
1745
- }, Ct = () => {
1746
- const e = Ie(), t = b(
1866
+ }, Mn = (e) => {
1867
+ Ne(Rn, e);
1868
+ }, _t = () => {
1869
+ const e = Ue(), t = y(
1747
1870
  () => e.layout === "vertical"
1748
1871
  );
1749
1872
  return {
@@ -1751,71 +1874,71 @@ const xt = /* @__PURE__ */ Symbol("FormRenderProps"), Vn = /* @__PURE__ */ Symbo
1751
1874
  isVertical: t,
1752
1875
  // 转发配置中的映射,方便子组件使用
1753
1876
  // Forward mappings from config for child components
1754
- componentBindEventMap: b(() => e.config?.modelPropNameMap)
1877
+ componentBindEventMap: y(() => e.config?.modelPropNameMap)
1755
1878
  // 这里如果需要 componentMap,通常从 config.ts 或 props 传递,
1756
1879
  // 但在原参考代码中是通过 import 的。为了解耦,这里可以不返回,
1757
1880
  // 或者在 Form.vue 中处理。
1758
1881
  // In reference code, componentMap is imported. We can stick to that.
1759
1882
  };
1760
- }, $t = /* @__PURE__ */ Symbol("FormPropsKey");
1761
- function _t(e) {
1762
- ze($t, e);
1883
+ }, Ft = /* @__PURE__ */ Symbol("FormPropsKey");
1884
+ function Pt(e) {
1885
+ Ne(Ft, e);
1763
1886
  }
1764
- function Bn() {
1765
- const e = Me($t);
1887
+ function Ln() {
1888
+ const e = Le(Ft);
1766
1889
  if (!e)
1767
1890
  throw new Error("Form context not found (表单上下文未找到,请确保在 SunnyForm 或 SunnyUseForm 内部使用)");
1768
1891
  return e;
1769
1892
  }
1770
- function An(e) {
1771
- const t = jt(), o = b(() => {
1772
- const s = p(e), a = {};
1773
- return (s.schema || []).forEach((l) => {
1774
- l.defaultValue !== void 0 && (a[l.fieldName] = l.defaultValue);
1775
- }), s.values && Object.assign(a, s.values), a;
1776
- }), n = yt({
1893
+ function Nn(e) {
1894
+ const t = Mt(), o = y(() => {
1895
+ const l = p(e), s = {};
1896
+ return (l.schema || []).forEach((a) => {
1897
+ a.defaultValue !== void 0 && (s[a.fieldName] = a.defaultValue);
1898
+ }), l.values && Object.assign(s, l.values), s;
1899
+ }), n = gt({
1777
1900
  initialValues: o.value
1778
- }), r = b(() => {
1779
- const s = [];
1780
- for (const a of Object.keys(t))
1781
- a !== "default" && s.push(a);
1782
- return s;
1901
+ }), r = y(() => {
1902
+ const l = [];
1903
+ for (const s of Object.keys(t))
1904
+ s !== "default" && l.push(s);
1905
+ return l;
1783
1906
  });
1784
1907
  return {
1785
1908
  form: n,
1786
1909
  delegatedSlots: r
1787
1910
  };
1788
1911
  }
1789
- const Rn = {
1790
- Input: Zt,
1791
- InputPassword: Xt,
1792
- InputNumber: Kt,
1793
- Textarea: Yt,
1912
+ const In = {
1913
+ Input: Jt,
1914
+ InputPassword: Qt,
1915
+ InputNumber: Zt,
1916
+ Textarea: Xt,
1794
1917
  Select: Re,
1795
1918
  Checkbox: ve,
1796
- CheckboxGroup: qt,
1797
- Radio: Je,
1798
- RadioGroup: Gt,
1799
- Switch: Qe,
1800
- DatePicker: Ze,
1801
- RangePicker: Wt,
1802
- TimePicker: Xe,
1803
- Upload: Ae,
1804
- Rate: Ht,
1805
- Slider: Ut,
1806
- Cascader: Dt,
1807
- TreeSelect: It,
1919
+ CheckboxGroup: Kt,
1920
+ Radio: tt,
1921
+ RadioGroup: Yt,
1922
+ Switch: et,
1923
+ DatePicker: Je,
1924
+ RangePicker: qt,
1925
+ TimePicker: Qe,
1926
+ Upload: ze,
1927
+ Rate: Gt,
1928
+ Slider: Wt,
1929
+ Cascader: Ht,
1930
+ TreeSelect: Ut,
1808
1931
  // Mentions,
1809
1932
  // Alias for prefix if needed, or map to same
1810
1933
  SunnySelect: Re,
1811
1934
  SunnyCheckbox: ve,
1812
- SunnyRadio: Je,
1813
- SunnySwitch: Qe,
1814
- SunnyDatePicker: Ze,
1815
- SunnyTimePicker: Xe,
1816
- SunnyUpload: Ae
1817
- }, Tn = {};
1818
- function Us(e) {
1935
+ SunnyRadio: tt,
1936
+ SunnySwitch: et,
1937
+ SunnyDatePicker: Je,
1938
+ SunnyTimePicker: Qe,
1939
+ SunnyUpload: ze
1940
+ }, Dn = {};
1941
+ function Xs(e) {
1819
1942
  const { config: t, defineRules: o } = e, {
1820
1943
  // 默认禁用 change 事件监听 (Arco 组件通常不需要手动监听 change)
1821
1944
  // Default disable change listener (Arco components usually don't need manual change listener)
@@ -1825,22 +1948,22 @@ function Us(e) {
1825
1948
  disabledOnInputListener: r = !0,
1826
1949
  // 空状态时的默认值 (通常为 undefined)
1827
1950
  // Default value for empty state (Usually undefined)
1828
- emptyStateValue: s = void 0
1951
+ emptyStateValue: l = void 0
1829
1952
  } = t || {};
1830
- if (Object.assign(Tn, {
1953
+ if (Object.assign(Dn, {
1831
1954
  disabledOnChangeListener: n,
1832
1955
  disabledOnInputListener: r,
1833
- emptyStateValue: s
1956
+ emptyStateValue: l
1834
1957
  }), o)
1835
- for (const a of Object.keys(o))
1836
- vo(a, o[a]);
1958
+ for (const s of Object.keys(o))
1959
+ ho(s, o[s]);
1837
1960
  }
1838
- function jn(e) {
1839
- const t = gt(), n = Ie().form;
1961
+ function Un(e) {
1962
+ const t = bt(), n = Ue().form;
1840
1963
  if (!t)
1841
1964
  throw new Error("useDependencies should be used within <SunnyForm> (VeeValidate Form)");
1842
- const r = M(!0), s = M(!1), a = M(!0), l = M(!1), m = M({}), y = M(), v = b(() => (e()?.triggerFields ?? []).map((c) => t.value[c])), i = () => {
1843
- s.value = !1, r.value = !0, a.value = !0, l.value = !1, y.value = void 0, m.value = {};
1965
+ const r = T(!0), l = T(!1), s = T(!0), a = T(!1), m = T({}), g = T(), v = y(() => (e()?.triggerFields ?? []).map((c) => t.value[c])), i = () => {
1966
+ l.value = !1, r.value = !0, s.value = !0, a.value = !1, g.value = void 0, m.value = {};
1844
1967
  };
1845
1968
  return U(
1846
1969
  [v, e],
@@ -1850,57 +1973,57 @@ function jn(e) {
1850
1973
  i();
1851
1974
  const {
1852
1975
  componentProps: h,
1853
- disabled: g,
1976
+ disabled: b,
1854
1977
  if: S,
1855
1978
  required: F,
1856
- rules: C,
1857
- show: x,
1858
- trigger: B
1979
+ rules: x,
1980
+ show: C,
1981
+ trigger: E
1859
1982
  // 自定义触发器
1860
1983
  } = c, d = t.value;
1861
1984
  if (I(S)) {
1862
1985
  if (r.value = !!await S(d, n), !r.value) return;
1863
1986
  } else if (ke(S) && (r.value = S, !r.value))
1864
1987
  return;
1865
- if (I(x)) {
1866
- if (a.value = !!await x(d, n), !a.value) return;
1867
- } else if (ke(x) && (a.value = x, !a.value))
1988
+ if (I(C)) {
1989
+ if (s.value = !!await C(d, n), !s.value) return;
1990
+ } else if (ke(C) && (s.value = C, !s.value))
1868
1991
  return;
1869
- I(h) && (m.value = await h(d, n)), I(C) && (y.value = await C(d, n)), I(g) ? s.value = !!await g(d, n) : ke(g) && (s.value = g), I(F) && (l.value = !!await F(d, n)), I(B) && await B(d, n);
1992
+ I(h) && (m.value = await h(d, n)), I(x) && (g.value = await x(d, n)), I(b) ? l.value = !!await b(d, n) : ke(b) && (l.value = b), I(F) && (a.value = !!await F(d, n)), I(E) && await E(d, n);
1870
1993
  },
1871
1994
  { deep: !0, immediate: !0 }
1872
1995
  ), {
1873
1996
  dynamicComponentProps: m,
1874
- dynamicRules: y,
1875
- isDisabled: s,
1997
+ dynamicRules: g,
1998
+ isDisabled: l,
1876
1999
  isIf: r,
1877
- isRequired: l,
1878
- isShow: a
2000
+ isRequired: a,
2001
+ isShow: s
1879
2002
  };
1880
2003
  }
1881
- const Mn = /* @__PURE__ */ O({
2004
+ const Hn = /* @__PURE__ */ O({
1882
2005
  __name: "FormField",
1883
2006
  props: {
1884
2007
  schema: {}
1885
2008
  },
1886
2009
  setup(e) {
1887
- const t = e, o = gt(), n = Ie(), { isVertical: r } = Ct(), s = n.form, {
1888
- dynamicComponentProps: a,
2010
+ const t = e, o = bt(), n = Ue(), { isVertical: r } = _t(), l = n.form, {
2011
+ dynamicComponentProps: s,
1889
2012
  // 动态组件属性
1890
- dynamicRules: l,
2013
+ dynamicRules: a,
1891
2014
  // 动态验证规则
1892
2015
  isDisabled: m,
1893
2016
  // 是否禁用
1894
- isIf: y,
2017
+ isIf: g,
1895
2018
  // 是否渲染 (v-if)
1896
2019
  isRequired: v,
1897
2020
  // 是否必填
1898
2021
  isShow: i
1899
2022
  // 是否显示 (v-show)
1900
- } = jn(() => t.schema.dependencies), u = b(() => {
2023
+ } = Un(() => t.schema.dependencies), u = y(() => {
1901
2024
  const { component: d } = t.schema;
1902
- return ie(d) && Rn[d] || d;
1903
- }), c = b(() => t.schema.hidden ? !1 : y.value && i.value), h = b(() => l.value || t.schema.rules), g = b(() => {
2025
+ return ie(d) && In[d] || d;
2026
+ }), c = y(() => t.schema.hidden ? !1 : g.value && i.value), h = y(() => a.value || t.schema.rules), b = y(() => {
1904
2027
  if (!c.value)
1905
2028
  return !1;
1906
2029
  if (!h.value)
@@ -1911,32 +2034,32 @@ const Mn = /* @__PURE__ */ O({
1911
2034
  return h.value.split("|").some(
1912
2035
  (P) => ["required", "selectRequired"].includes(P)
1913
2036
  );
1914
- const d = G(h.value);
2037
+ const d = q(h.value);
1915
2038
  let f = d?.isOptional?.();
1916
2039
  if (d?._def?.typeName === "ZodDefault") {
1917
2040
  const P = d?._def.innerType;
1918
2041
  P && (f = P.isOptional?.());
1919
2042
  }
1920
2043
  return !f;
1921
- }), S = b(() => {
2044
+ }), S = y(() => {
1922
2045
  if (!c.value)
1923
2046
  return null;
1924
- let d = G(h.value);
2047
+ let d = q(h.value);
1925
2048
  if (!d)
1926
2049
  return v.value ? "required" : null;
1927
2050
  if (ie(d))
1928
2051
  return d;
1929
- if (!!g.value) {
2052
+ if (!!b.value) {
1930
2053
  const k = d?.unwrap?.();
1931
2054
  k && (d = k);
1932
2055
  }
1933
- return bo(d);
1934
- }), F = b(() => {
1935
- const { componentProps: d, commonComponentProps: f } = t.schema, k = I(d) ? d(o.value, s) : d;
2056
+ return go(d);
2057
+ }), F = y(() => {
2058
+ const { componentProps: d, commonComponentProps: f } = t.schema, k = I(d) ? d(o.value, l) : d;
1936
2059
  return {
1937
2060
  ...f,
1938
2061
  ...k,
1939
- ...a.value
2062
+ ...s.value
1940
2063
  };
1941
2064
  });
1942
2065
  U(
@@ -1947,14 +2070,14 @@ const Mn = /* @__PURE__ */ O({
1947
2070
  },
1948
2071
  { immediate: !0 }
1949
2072
  );
1950
- const C = b(() => m.value || t.schema.disabled || F.value?.disabled), x = b(() => {
2073
+ const x = y(() => m.value || t.schema.disabled || F.value?.disabled), C = y(() => {
1951
2074
  if (!(r.value || !t.schema.labelWidth))
1952
2075
  return {
1953
2076
  style: {
1954
2077
  flex: 1
1955
2078
  }
1956
2079
  };
1957
- }), B = b(() => {
2080
+ }), E = y(() => {
1958
2081
  if (r.value || !t.schema.labelWidth)
1959
2082
  return;
1960
2083
  const d = t.schema.labelWidth, f = typeof d == "number" ? `${d}px` : d;
@@ -1968,25 +2091,25 @@ const Mn = /* @__PURE__ */ O({
1968
2091
  };
1969
2092
  });
1970
2093
  return (d, f) => {
1971
- const k = W("a-form-item");
1972
- return c.value ? (w(), V(p(yo), {
2094
+ const k = G("a-form-item");
2095
+ return c.value ? (w(), V(p(vo), {
1973
2096
  key: 0,
1974
2097
  name: e.schema.fieldName,
1975
2098
  rules: S.value,
1976
2099
  label: e.schema.label
1977
2100
  }, {
1978
- default: $(({ field: P, errorMessage: A }) => [
1979
- E(k, L({
2101
+ default: _(({ field: P, errorMessage: j }) => [
2102
+ B(k, N({
1980
2103
  label: e.schema.label,
1981
- help: A || e.schema.help,
1982
- "validate-status": A ? "error" : void 0,
1983
- required: g.value,
1984
- "label-col-props": B.value,
1985
- "wrapper-col-props": x.value
2104
+ help: j || e.schema.help,
2105
+ "validate-status": j ? "error" : void 0,
2106
+ required: b.value,
2107
+ "label-col-props": E.value,
2108
+ "wrapper-col-props": C.value
1986
2109
  }, e.schema.formFieldProps), {
1987
- default: $(() => [
1988
- (w(), V(mt(u.value), L({ ...F.value, ...P }, {
1989
- disabled: C.value,
2110
+ default: _(() => [
2111
+ (w(), V(ht(u.value), N({ ...F.value, ...P }, {
2112
+ disabled: x.value,
1990
2113
  "model-value": P.value,
1991
2114
  "onUpdate:modelValue": P.onInput
1992
2115
  }), null, 16, ["disabled", "model-value", "onUpdate:modelValue"]))
@@ -1995,10 +2118,10 @@ const Mn = /* @__PURE__ */ O({
1995
2118
  }, 1040, ["label", "help", "validate-status", "required", "label-col-props", "wrapper-col-props"])
1996
2119
  ]),
1997
2120
  _: 1
1998
- }, 8, ["name", "rules", "label"])) : z("", !0);
2121
+ }, 8, ["name", "rules", "label"])) : M("", !0);
1999
2122
  };
2000
2123
  }
2001
- }), je = /* @__PURE__ */ O({
2124
+ }), Me = /* @__PURE__ */ O({
2002
2125
  __name: "form-actions",
2003
2126
  props: {
2004
2127
  modelValue: { type: Boolean },
@@ -2006,53 +2129,53 @@ const Mn = /* @__PURE__ */ O({
2006
2129
  },
2007
2130
  emits: ["update:modelValue"],
2008
2131
  setup(e, { expose: t, emit: o }) {
2009
- const n = e, r = o, { props: s } = Ct(), a = go(), l = b({
2132
+ const n = e, r = o, { props: l } = _t(), s = yo(), a = y({
2010
2133
  get: () => n.modelValue ?? !1,
2011
2134
  set: (c) => r("update:modelValue", c)
2012
- }), m = b(() => ({
2135
+ }), m = y(() => ({
2013
2136
  content: "重置",
2014
2137
  show: !0,
2015
2138
  type: "outline",
2016
- ...p(s).resetButtonOptions
2017
- })), y = b(() => ({
2139
+ ...p(l).resetButtonOptions
2140
+ })), g = y(() => ({
2018
2141
  content: "查询",
2019
2142
  show: !0,
2020
2143
  // 如果有 formApi,使用普通按钮类型,手动触发提交逻辑
2021
2144
  // 否则使用 submit 类型,利用表单的原生提交机制
2022
2145
  htmlType: n.formApi ? "button" : "submit",
2023
- ...p(s).submitButtonOptions
2146
+ ...p(l).submitButtonOptions
2024
2147
  }));
2025
2148
  async function v(c) {
2026
2149
  if (n.formApi) {
2027
2150
  c?.preventDefault(), c?.stopPropagation();
2028
- const h = p(s), { valid: g } = await n.formApi.validate();
2029
- if (!g)
2151
+ const h = p(l), { valid: b } = await n.formApi.validate();
2152
+ if (!b)
2030
2153
  return;
2031
- const S = G(await n.formApi.getValues()) ?? {};
2154
+ const S = q(await n.formApi.getValues()) ?? {};
2032
2155
  await h.handleSubmit?.(S);
2033
2156
  }
2034
2157
  }
2035
2158
  async function i(c) {
2036
2159
  c?.preventDefault(), c?.stopPropagation();
2037
- const h = p(s);
2160
+ const h = p(l);
2038
2161
  if (n.formApi) {
2039
- const g = G(await n.formApi.getValues()) ?? {};
2040
- h.handleReset ? await h.handleReset(g) : n.formApi.resetForm();
2041
- } else if (a)
2162
+ const b = q(await n.formApi.getValues()) ?? {};
2163
+ h.handleReset ? await h.handleReset(b) : n.formApi.resetForm();
2164
+ } else if (s)
2042
2165
  if (h.handleReset) {
2043
- const g = a.values;
2044
- await h.handleReset(g);
2166
+ const b = s.values;
2167
+ await h.handleReset(b);
2045
2168
  } else
2046
- a.resetForm();
2169
+ s.resetForm();
2047
2170
  }
2048
2171
  U(
2049
- () => l.value,
2172
+ () => a.value,
2050
2173
  () => {
2051
- p(s).collapseTriggerResize && window.dispatchEvent(new Event("resize"));
2174
+ p(l).collapseTriggerResize && window.dispatchEvent(new Event("resize"));
2052
2175
  }
2053
2176
  );
2054
- const u = b(() => {
2055
- const c = p(s), h = c.actionPosition || "right", g = [
2177
+ const u = y(() => {
2178
+ const c = p(l), h = c.actionPosition || "right", b = [
2056
2179
  "flex",
2057
2180
  "items-center",
2058
2181
  "gap-3",
@@ -2065,155 +2188,155 @@ const Mn = /* @__PURE__ */ O({
2065
2188
  ];
2066
2189
  switch (h) {
2067
2190
  case "center": {
2068
- g.push("justify-center");
2191
+ b.push("justify-center");
2069
2192
  break;
2070
2193
  }
2071
2194
  case "left": {
2072
- g.push("justify-start");
2195
+ b.push("justify-start");
2073
2196
  break;
2074
2197
  }
2075
2198
  default: {
2076
- g.push("justify-end");
2199
+ b.push("justify-end");
2077
2200
  break;
2078
2201
  }
2079
2202
  }
2080
- return g.join(" ");
2203
+ return b.join(" ");
2081
2204
  });
2082
2205
  return t({
2083
2206
  handleReset: i,
2084
2207
  handleSubmit: v
2085
- }), (c, h) => (w(), R("div", {
2086
- class: N(u.value)
2208
+ }), (c, h) => (w(), A("div", {
2209
+ class: L(u.value)
2087
2210
  }, [
2088
- p(p(s)).actionButtonsReverse ? z("", !0) : (w(), R(ce, { key: 0 }, [
2089
- j(c.$slots, "submit-before"),
2090
- y.value.show ? (w(), V(p(le), L({
2211
+ p(p(l)).actionButtonsReverse ? M("", !0) : (w(), A(ce, { key: 0 }, [
2212
+ R(c.$slots, "submit-before"),
2213
+ g.value.show ? (w(), V(p(ae), N({
2091
2214
  key: 0,
2092
2215
  type: "primary",
2093
- size: p(p(s)).size,
2216
+ size: p(p(l)).size,
2094
2217
  onClick: v
2095
- }, y.value), {
2096
- default: $(() => [
2097
- D(T(y.value.content), 1)
2218
+ }, g.value), {
2219
+ default: _(() => [
2220
+ D(z(g.value.content), 1)
2098
2221
  ]),
2099
2222
  _: 1
2100
- }, 16, ["size"])) : z("", !0)
2223
+ }, 16, ["size"])) : M("", !0)
2101
2224
  ], 64)),
2102
- j(c.$slots, "reset-before"),
2103
- m.value.show ? (w(), V(p(le), L({
2225
+ R(c.$slots, "reset-before"),
2226
+ m.value.show ? (w(), V(p(ae), N({
2104
2227
  key: 1,
2105
- size: p(p(s)).size,
2228
+ size: p(p(l)).size,
2106
2229
  onClick: i
2107
2230
  }, m.value), {
2108
- default: $(() => [
2109
- D(T(m.value.content), 1)
2231
+ default: _(() => [
2232
+ D(z(m.value.content), 1)
2110
2233
  ]),
2111
2234
  _: 1
2112
- }, 16, ["size"])) : z("", !0),
2113
- p(p(s)).actionButtonsReverse ? (w(), R(ce, { key: 2 }, [
2114
- j(c.$slots, "submit-before"),
2115
- y.value.show ? (w(), V(p(le), L({
2235
+ }, 16, ["size"])) : M("", !0),
2236
+ p(p(l)).actionButtonsReverse ? (w(), A(ce, { key: 2 }, [
2237
+ R(c.$slots, "submit-before"),
2238
+ g.value.show ? (w(), V(p(ae), N({
2116
2239
  key: 0,
2117
2240
  type: "primary",
2118
- size: p(p(s)).size,
2241
+ size: p(p(l)).size,
2119
2242
  onClick: v
2120
- }, y.value), {
2121
- default: $(() => [
2122
- D(T(y.value.content), 1)
2243
+ }, g.value), {
2244
+ default: _(() => [
2245
+ D(z(g.value.content), 1)
2123
2246
  ]),
2124
2247
  _: 1
2125
- }, 16, ["size"])) : z("", !0)
2126
- ], 64)) : z("", !0),
2127
- j(c.$slots, "expand-before"),
2128
- p(p(s)).showCollapseButton ? (w(), R("div", {
2248
+ }, 16, ["size"])) : M("", !0)
2249
+ ], 64)) : M("", !0),
2250
+ R(c.$slots, "expand-before"),
2251
+ p(p(l)).showCollapseButton ? (w(), A("div", {
2129
2252
  key: 3,
2130
2253
  class: "cursor-pointer ml-2 text-primary hover:opacity-80 transition-opacity select-none",
2131
- onClick: h[0] || (h[0] = (g) => l.value = !l.value)
2254
+ onClick: h[0] || (h[0] = (b) => a.value = !a.value)
2132
2255
  }, [
2133
- _("span", null, T(l.value ? "展开" : "收起"), 1)
2134
- ])) : z("", !0),
2135
- j(c.$slots, "expand-after")
2256
+ $("span", null, z(a.value ? "展开" : "收起"), 1)
2257
+ ])) : M("", !0),
2258
+ R(c.$slots, "expand-after")
2136
2259
  ], 2));
2137
2260
  }
2138
2261
  });
2139
- function zn(e) {
2140
- const o = mo({
2262
+ function Wn(e) {
2263
+ const o = po({
2141
2264
  xs: 576,
2142
2265
  sm: 576,
2143
2266
  md: 768,
2144
2267
  lg: 992,
2145
2268
  xl: 1200,
2146
2269
  xxl: 1600
2147
- }), n = b(() => {
2148
- const l = {}, m = e.schema || [], y = s(), v = e.commonConfig?.colProps;
2270
+ }), n = y(() => {
2271
+ const a = {}, m = e.schema || [], g = l(), v = e.commonConfig?.colProps;
2149
2272
  return m.forEach((i) => {
2150
2273
  if (!i.fieldName) return;
2151
2274
  const u = i.colProps || v;
2152
- l[i.fieldName] = a(u, i.colSpan, y);
2153
- }), l;
2154
- }), r = b(() => {
2155
- const l = s();
2275
+ a[i.fieldName] = s(u, i.colSpan, g);
2276
+ }), a;
2277
+ }), r = y(() => {
2278
+ const a = l();
2156
2279
  if (e.layout !== "inline") {
2157
2280
  if (e.actionColProps)
2158
- return a(e.actionColProps, void 0, l);
2281
+ return s(e.actionColProps, void 0, a);
2159
2282
  if (e.showCollapseButton) {
2160
2283
  const m = e.commonConfig?.colProps;
2161
- return a(m || { xs: 12, sm: 12, md: 8, lg: 6 }, void 0, l);
2284
+ return s(m || { xs: 12, sm: 12, md: 8, lg: 6 }, void 0, a);
2162
2285
  }
2163
2286
  return 24;
2164
2287
  }
2165
2288
  });
2166
- function s() {
2289
+ function l() {
2167
2290
  return o.greaterOrEqual("xxl").value ? "xxl" : o.greaterOrEqual("xl").value ? "xl" : o.greaterOrEqual("lg").value ? "lg" : o.greaterOrEqual("md").value ? "md" : o.greaterOrEqual("sm").value ? "sm" : "xs";
2168
2291
  }
2169
- function a(l, m, y) {
2170
- if (l) {
2171
- const v = ["xxl", "xl", "lg", "md", "sm", "xs"], i = v.indexOf(y);
2292
+ function s(a, m, g) {
2293
+ if (a) {
2294
+ const v = ["xxl", "xl", "lg", "md", "sm", "xs"], i = v.indexOf(g);
2172
2295
  for (let u = i; u < v.length; u++) {
2173
- const c = v[u], h = l[c];
2296
+ const c = v[u], h = a[c];
2174
2297
  if (h !== void 0)
2175
2298
  return typeof h == "object" ? h.span ?? 24 : h;
2176
2299
  }
2177
- if (l.span !== void 0)
2178
- return l.span;
2300
+ if (a.span !== void 0)
2301
+ return a.span;
2179
2302
  }
2180
2303
  return m !== void 0 ? m : 24;
2181
2304
  }
2182
2305
  return { spans: n, actionSpan: r };
2183
2306
  }
2184
- const Ft = /* @__PURE__ */ O({
2307
+ const Vt = /* @__PURE__ */ O({
2185
2308
  __name: "Form",
2186
2309
  props: {
2187
2310
  formApi: {},
2188
2311
  form: {}
2189
2312
  },
2190
2313
  setup(e) {
2191
- const t = e, o = Bn(), n = pt({ ...o.value });
2314
+ const t = e, o = Ln(), n = mt({ ...o.value });
2192
2315
  U(
2193
2316
  () => o.value,
2194
- (C) => {
2195
- Object.assign(n, C);
2317
+ (x) => {
2318
+ Object.assign(n, x);
2196
2319
  },
2197
2320
  { deep: !0 }
2198
2321
  // 深度监听,确保对象内部属性变化也能捕获
2199
- ), On(n);
2200
- const { spans: r, actionSpan: s } = zn(n), a = b(() => {
2322
+ ), Tn(n);
2323
+ const { spans: r, actionSpan: l } = Wn(n), s = y(() => {
2201
2324
  const {
2202
- commonConfig: C = {},
2203
- labelWidth: x,
2204
- schema: B = []
2325
+ commonConfig: x = {},
2326
+ labelWidth: C,
2327
+ schema: E = []
2205
2328
  } = n, {
2206
2329
  componentProps: d = {},
2207
2330
  formFieldProps: f = {},
2208
2331
  ...k
2209
- } = C, P = { ...k };
2210
- return x !== void 0 && Object.assign(P, { labelWidth: x }), B.map((A) => ({
2332
+ } = x, P = { ...k };
2333
+ return C !== void 0 && Object.assign(P, { labelWidth: C }), E.map((j) => ({
2211
2334
  // 合并策略:全局配置 (Global) < 表单项自身配置 (Item)
2212
2335
  ...P,
2213
- ...A,
2336
+ ...j,
2214
2337
  // 显隐逻辑:只处理 Item 自身配置的 hide 属性
2215
2338
  // (v-if/v-show 的动态逻辑由 dependencies.ts 处理)
2216
- hidden: A.hide,
2339
+ hidden: j.hide,
2217
2340
  // 注入通用组件属性
2218
2341
  // 注意:这里只是透传,最终合并逻辑在 FormField 组件内部进行
2219
2342
  commonComponentProps: d,
@@ -2221,19 +2344,19 @@ const Ft = /* @__PURE__ */ O({
2221
2344
  // 直接在此处合并全局配置和局部配置,减少下层组件的计算负担
2222
2345
  formFieldProps: {
2223
2346
  ...f,
2224
- ...A.formFieldProps || {}
2347
+ ...j.formFieldProps || {}
2225
2348
  },
2226
2349
  // 显式保留组件原本的 props,防止在合并过程中被意外覆盖
2227
- componentProps: A.componentProps
2350
+ componentProps: j.componentProps
2228
2351
  }));
2229
- }), l = b(() => n.layout === "inline"), { handleSubmit: m, resetForm: y, setValues: v, values: i, validate: u, errors: c, meta: h } = t.form || yt({
2352
+ }), a = y(() => n.layout === "inline"), { handleSubmit: m, resetForm: g, setValues: v, values: i, validate: u, errors: c, meta: h } = t.form || gt({
2230
2353
  // 提取默认值构建初始状态
2231
- initialValues: a.value.reduce((C, x) => ({ ...C, [x.fieldName]: x.defaultValue }), {})
2354
+ initialValues: s.value.reduce((x, C) => ({ ...x, [C.fieldName]: C.defaultValue }), {})
2232
2355
  });
2233
- Le(() => {
2356
+ Ie(() => {
2234
2357
  t.formApi && t.formApi.mount({
2235
2358
  handleSubmit: m,
2236
- resetForm: y,
2359
+ resetForm: g,
2237
2360
  setValues: v,
2238
2361
  values: i,
2239
2362
  validate: u,
@@ -2241,65 +2364,65 @@ const Ft = /* @__PURE__ */ O({
2241
2364
  meta: h
2242
2365
  });
2243
2366
  });
2244
- const g = m((C) => {
2245
- n.handleSubmit ? n.handleSubmit(C) : console.log("Form submitted:", C);
2246
- }), S = (C) => {
2247
- n.collapsed = C, n.handleCollapsedChange?.(C), t.formApi && t.formApi.setState({ collapsed: C });
2248
- }, F = b(() => {
2249
- const { compact: C, gridProps: x } = n, B = C ? 8 : 16, d = x?.xGap ?? x?.["x-gap"] ?? B, f = x?.yGap ?? x?.["y-gap"] ?? B;
2367
+ const b = m((x) => {
2368
+ n.handleSubmit ? n.handleSubmit(x) : console.log("Form submitted:", x);
2369
+ }), S = (x) => {
2370
+ n.collapsed = x, n.handleCollapsedChange?.(x), t.formApi && t.formApi.setState({ collapsed: x });
2371
+ }, F = y(() => {
2372
+ const { compact: x, gridProps: C } = n, E = x ? 8 : 16, d = C?.xGap ?? C?.["x-gap"] ?? E, f = C?.yGap ?? C?.["y-gap"] ?? E;
2250
2373
  return { x: d, y: f };
2251
2374
  });
2252
- return (C, x) => {
2253
- const B = W("a-col"), d = W("a-form-item"), f = W("a-row"), k = W("a-form");
2375
+ return (x, C) => {
2376
+ const E = G("a-col"), d = G("a-form-item"), f = G("a-row"), k = G("a-form");
2254
2377
  return w(), V(k, {
2255
2378
  model: {},
2256
2379
  layout: p(o).layout || "horizontal",
2257
2380
  size: p(o).size,
2258
2381
  class: "arco-form",
2259
- onSubmit: x[0] || (x[0] = (P, A) => p(g)(A))
2382
+ onSubmit: C[0] || (C[0] = (P, j) => p(b)(j))
2260
2383
  }, {
2261
- default: $(() => [
2262
- E(f, {
2384
+ default: _(() => [
2385
+ B(f, {
2263
2386
  gutter: [F.value.x, F.value.y],
2264
- class: N(n.wrapperClass)
2387
+ class: L(n.wrapperClass)
2265
2388
  }, {
2266
- default: $(() => [
2267
- (w(!0), R(ce, null, Z(a.value, (P, A) => (w(), R(ce, {
2389
+ default: _(() => [
2390
+ (w(!0), A(ce, null, ee(s.value, (P, j) => (w(), A(ce, {
2268
2391
  key: P.fieldName
2269
2392
  }, [
2270
- !P.hidden && (!n.collapsed || A < 24 / (p(r)[P.fieldName] ?? 24) * (n.collapsedRows ?? 1) - 1) ? (w(), V(B, {
2393
+ !P.hidden && (!n.collapsed || j < 24 / (p(r)[P.fieldName] ?? 24) * (n.collapsedRows ?? 1) - 1) ? (w(), V(E, {
2271
2394
  key: 0,
2272
- span: p(r)[P.fieldName] ?? (l.value ? void 0 : 24)
2395
+ span: p(r)[P.fieldName] ?? (a.value ? void 0 : 24)
2273
2396
  }, {
2274
- default: $(() => [
2275
- E(Mn, { schema: P }, null, 8, ["schema"])
2397
+ default: _(() => [
2398
+ B(Hn, { schema: P }, null, 8, ["schema"])
2276
2399
  ]),
2277
2400
  _: 2
2278
- }, 1032, ["span"])) : z("", !0)
2401
+ }, 1032, ["span"])) : M("", !0)
2279
2402
  ], 64))), 128)),
2280
- n.showDefaultActions ? (w(), V(B, {
2403
+ n.showDefaultActions ? (w(), V(E, {
2281
2404
  key: 0,
2282
- span: p(s),
2283
- style: X(l.value ? { marginLeft: "16px" } : { flex: 1, textAlign: "right", marginBottom: F.value.y + "px" })
2405
+ span: p(l),
2406
+ style: H(a.value ? { marginLeft: "16px" } : { flex: 1, textAlign: "right", marginBottom: F.value.y + "px" })
2284
2407
  }, {
2285
- default: $(() => [
2408
+ default: _(() => [
2286
2409
  (n.layout || "horizontal") === "vertical" ? (w(), V(d, {
2287
2410
  key: 0,
2288
2411
  class: "mb-0",
2289
2412
  "hide-asterisk": !0
2290
2413
  }, {
2291
- label: $(() => [...x[1] || (x[1] = [
2292
- _("span", { style: { display: "inline-block", width: "100%" } }, " ", -1)
2414
+ label: _(() => [...C[1] || (C[1] = [
2415
+ $("span", { style: { display: "inline-block", width: "100%" } }, " ", -1)
2293
2416
  ])]),
2294
- default: $(() => [
2295
- E(je, {
2417
+ default: _(() => [
2418
+ B(Me, {
2296
2419
  "model-value": n.collapsed,
2297
2420
  "onUpdate:modelValue": S,
2298
2421
  "form-api": t.formApi
2299
2422
  }, null, 8, ["model-value", "form-api"])
2300
2423
  ]),
2301
2424
  _: 1
2302
- })) : (w(), V(je, {
2425
+ })) : (w(), V(Me, {
2303
2426
  key: 1,
2304
2427
  "model-value": n.collapsed,
2305
2428
  "onUpdate:modelValue": S,
@@ -2307,7 +2430,7 @@ const Ft = /* @__PURE__ */ O({
2307
2430
  }, null, 8, ["model-value", "form-api"]))
2308
2431
  ]),
2309
2432
  _: 1
2310
- }, 8, ["span", "style"])) : z("", !0)
2433
+ }, 8, ["span", "style"])) : M("", !0)
2311
2434
  ]),
2312
2435
  _: 1
2313
2436
  }, 8, ["gutter", "class"])
@@ -2316,7 +2439,7 @@ const Ft = /* @__PURE__ */ O({
2316
2439
  }, 8, ["layout", "size"]);
2317
2440
  };
2318
2441
  }
2319
- }), Ln = /* @__PURE__ */ O({
2442
+ }), Gn = /* @__PURE__ */ O({
2320
2443
  __name: "SunnyUseForm",
2321
2444
  props: {
2322
2445
  layout: {},
@@ -2351,25 +2474,25 @@ const Ft = /* @__PURE__ */ O({
2351
2474
  formApi: {}
2352
2475
  },
2353
2476
  setup(e) {
2354
- const t = e, o = t.formApi.useStore?.() || b(() => ({})), n = b(() => {
2477
+ const t = e, o = t.formApi.useStore?.() || y(() => ({})), n = y(() => {
2355
2478
  const v = Object.entries(t).reduce((i, [u, c]) => (c !== void 0 && (i[u] = c), i), {});
2356
2479
  return { ...o.value, ...v };
2357
- }), r = /* @__PURE__ */ new Map(), { delegatedSlots: s, form: a } = An(n);
2358
- _t(n), En(r), ht(() => {
2480
+ }), r = /* @__PURE__ */ new Map(), { delegatedSlots: l, form: s } = Nn(n);
2481
+ Pt(n), Mn(r), vt(() => {
2359
2482
  t.formApi.unmount();
2360
2483
  });
2361
- const l = {};
2362
- Le(async () => {
2363
- t.formApi.mount(a, r), t.formApi.setState({ values: me(a.values) }), await ge(), U(
2364
- () => a.values,
2484
+ const a = {};
2485
+ Ie(async () => {
2486
+ t.formApi.mount(s, r), t.formApi.setState({ values: me(s.values) }), await ge(), U(
2487
+ () => s.values,
2365
2488
  async (v) => {
2366
2489
  if (t.formApi.setState({ values: me(v) }), m(), !n.value.handleValuesChange) return;
2367
2490
  const i = n.value.schema?.map((c) => c.fieldName) || [];
2368
2491
  if (i.length === 0) return;
2369
2492
  const u = [];
2370
2493
  for (const c of i) {
2371
- const h = et(v, c), g = et(l, c);
2372
- ro(h, g) || (u.push(c), so(l, c, h));
2494
+ const h = ot(v, c), b = ot(a, c);
2495
+ no(h, b) || (u.push(c), ro(a, c, h));
2373
2496
  }
2374
2497
  if (u.length > 0) {
2375
2498
  const c = await t.formApi.getValues();
@@ -2382,36 +2505,36 @@ const Ft = /* @__PURE__ */ O({
2382
2505
  { deep: !0 }
2383
2506
  );
2384
2507
  });
2385
- const m = ho(async () => {
2508
+ const m = mo(async () => {
2386
2509
  o.value.submitOnChange && await t.formApi.submitForm();
2387
2510
  }, 300);
2388
- function y(v) {
2511
+ function g(v) {
2389
2512
  o.value.submitOnEnter && (v.target instanceof HTMLTextAreaElement || (v.preventDefault(), t.formApi.submitForm()));
2390
2513
  }
2391
- return (v, i) => (w(), R("div", {
2392
- class: N(n.value.wrapperClass)
2514
+ return (v, i) => (w(), A("div", {
2515
+ class: L(n.value.wrapperClass)
2393
2516
  }, [
2394
- E(Ft, L(n.value, {
2395
- form: p(a),
2517
+ B(Vt, N(n.value, {
2518
+ form: p(s),
2396
2519
  "form-api": t.formApi,
2397
- onKeydown: vt(y, ["enter"])
2520
+ onKeydown: yt(g, ["enter"])
2398
2521
  }), de({
2399
- default: $(() => []),
2522
+ default: _(() => []),
2400
2523
  _: 2
2401
2524
  }, [
2402
- Z(p(s), (u) => ({
2525
+ ee(p(l), (u) => ({
2403
2526
  name: u,
2404
- fn: $((c) => [
2405
- j(v.$slots, u, Y(fe(c)))
2527
+ fn: _((c) => [
2528
+ R(v.$slots, u, Q(fe(c)))
2406
2529
  ])
2407
2530
  }))
2408
2531
  ]), 1040, ["form", "form-api"])
2409
2532
  ], 2));
2410
2533
  }
2411
2534
  });
2412
- function Hs(e = {}) {
2413
- const t = new Pn(e);
2414
- return t.useStore = (n) => fo(t.store.store, n), Mt(e) && U(
2535
+ function Zs(e = {}) {
2536
+ const t = new zn(e);
2537
+ return t.useStore = (n) => uo(t.store.store, n), Lt(e) && U(
2415
2538
  () => e.schema,
2416
2539
  () => {
2417
2540
  e.schema && t.setState({ schema: e.schema });
@@ -2428,8 +2551,8 @@ function Hs(e = {}) {
2428
2551
  }
2429
2552
  ), [O({
2430
2553
  name: "useSunnyFormWrapper",
2431
- setup(n, { attrs: r, slots: s }) {
2432
- return t.setState({ ...n, ...r }), () => ye(Ln, {
2554
+ setup(n, { attrs: r, slots: l }) {
2555
+ return t.setState({ ...n, ...r }), () => ye(Gn, {
2433
2556
  // 1. ...props & ...attrs: 注入组件接收到的属性
2434
2557
  // Inject props and attrs received by the component
2435
2558
  ...n,
@@ -2437,11 +2560,11 @@ function Hs(e = {}) {
2437
2560
  // 2. formApi: 注入 API 实例,供子组件调用
2438
2561
  // Inject API instance for child components to call
2439
2562
  formApi: t
2440
- }, s);
2563
+ }, l);
2441
2564
  }
2442
2565
  }), t];
2443
2566
  }
2444
- const Ws = /* @__PURE__ */ O({
2567
+ const Qs = /* @__PURE__ */ O({
2445
2568
  __name: "SunnyForm",
2446
2569
  props: {
2447
2570
  layout: {},
@@ -2476,44 +2599,44 @@ const Ws = /* @__PURE__ */ O({
2476
2599
  },
2477
2600
  emits: ["submit", "reset", "update:collapsed"],
2478
2601
  setup(e, { emit: t }) {
2479
- const o = e, n = t, r = b(() => o);
2480
- _t(r);
2481
- const s = (l) => {
2482
- n("update:collapsed", l), o.handleCollapsedChange?.(l);
2483
- }, a = (l) => {
2484
- n("submit", l), o.handleSubmit?.(l);
2602
+ const o = e, n = t, r = y(() => o);
2603
+ Pt(r);
2604
+ const l = (a) => {
2605
+ n("update:collapsed", a), o.handleCollapsedChange?.(a);
2606
+ }, s = (a) => {
2607
+ n("submit", a), o.handleSubmit?.(a);
2485
2608
  };
2486
- return (l, m) => (w(), R("div", {
2487
- class: N(o.wrapperClass)
2609
+ return (a, m) => (w(), A("div", {
2610
+ class: L(o.wrapperClass)
2488
2611
  }, [
2489
- E(Ft, { onSubmit: a }, {
2490
- default: $(() => [
2491
- o.showDefaultActions ? (w(), V(je, {
2612
+ B(Vt, { onSubmit: s }, {
2613
+ default: _(() => [
2614
+ o.showDefaultActions ? (w(), V(Me, {
2492
2615
  key: 0,
2493
2616
  "model-value": o.collapsed,
2494
- "onUpdate:modelValue": s
2617
+ "onUpdate:modelValue": l
2495
2618
  }, {
2496
- "reset-before": $(() => [
2497
- j(l.$slots, "reset-before")
2619
+ "reset-before": _(() => [
2620
+ R(a.$slots, "reset-before")
2498
2621
  ]),
2499
- "submit-before": $(() => [
2500
- j(l.$slots, "submit-before")
2622
+ "submit-before": _(() => [
2623
+ R(a.$slots, "submit-before")
2501
2624
  ]),
2502
- "expand-before": $(() => [
2503
- j(l.$slots, "expand-before")
2625
+ "expand-before": _(() => [
2626
+ R(a.$slots, "expand-before")
2504
2627
  ]),
2505
- "expand-after": $(() => [
2506
- j(l.$slots, "expand-after")
2628
+ "expand-after": _(() => [
2629
+ R(a.$slots, "expand-after")
2507
2630
  ]),
2508
2631
  _: 3
2509
- }, 8, ["model-value"])) : z("", !0)
2632
+ }, 8, ["model-value"])) : M("", !0)
2510
2633
  ]),
2511
2634
  _: 3
2512
2635
  })
2513
2636
  ], 2));
2514
2637
  }
2515
2638
  });
2516
- let Nn = class {
2639
+ let qn = class {
2517
2640
  gridRef;
2518
2641
  options;
2519
2642
  constructor(t, o) {
@@ -2530,8 +2653,8 @@ let Nn = class {
2530
2653
  async addEvent(t = {}) {
2531
2654
  const o = this.grid;
2532
2655
  if (o) {
2533
- const { record: n = {}, index: r = -1 } = t, { row: s } = await o.insertAt(n, r);
2534
- await ge(), o.setEditRow(s);
2656
+ const { record: n = {}, index: r = -1 } = t, { row: l } = await o.insertAt(n, r);
2657
+ await ge(), o.setEditRow(l);
2535
2658
  }
2536
2659
  }
2537
2660
  /**
@@ -2545,38 +2668,38 @@ let Nn = class {
2545
2668
  }
2546
2669
  }
2547
2670
  };
2548
- const In = /* @__PURE__ */ O({
2671
+ const Yn = /* @__PURE__ */ O({
2549
2672
  __name: "use-vxe-grid",
2550
2673
  setup(e, { expose: t }) {
2551
- const o = M();
2674
+ const o = T();
2552
2675
  return t({
2553
2676
  getGrid: () => o.value
2554
- }), (n, r) => (w(), V(p(bt), L({
2677
+ }), (n, r) => (w(), V(p(wt), N({
2555
2678
  ref_key: "gridRef",
2556
2679
  ref: o
2557
2680
  }, n.$attrs), de({ _: 2 }, [
2558
- Z(n.$slots, (s, a) => ({
2559
- name: a,
2560
- fn: $((l) => [
2561
- j(n.$slots, a, Y(fe(l || {})))
2681
+ ee(n.$slots, (l, s) => ({
2682
+ name: s,
2683
+ fn: _((a) => [
2684
+ R(n.$slots, s, Q(fe(a || {})))
2562
2685
  ])
2563
2686
  }))
2564
2687
  ]), 1040));
2565
2688
  }
2566
2689
  });
2567
- function qs(e) {
2568
- const t = M(), o = new Nn(t, e);
2690
+ function el(e) {
2691
+ const t = T(), o = new qn(t, e);
2569
2692
  return [O(
2570
- (r, { attrs: s, slots: a }) => {
2571
- const { gridEvents: l, gridOptions: m } = e, y = Object.entries(l || {}).reduce((v, [i, u]) => {
2693
+ (r, { attrs: l, slots: s }) => {
2694
+ const { gridEvents: a, gridOptions: m } = e, g = Object.entries(a || {}).reduce((v, [i, u]) => {
2572
2695
  const c = `on${i.charAt(0).toUpperCase() + i.slice(1)}`;
2573
2696
  return v[c] = u, v;
2574
2697
  }, {});
2575
- return () => ye(In, { ref: t, ...r, ...s, ...m, ...y }, a);
2698
+ return () => ye(Yn, { ref: t, ...r, ...l, ...m, ...g }, s);
2576
2699
  }
2577
2700
  ), o];
2578
2701
  }
2579
- class Dn {
2702
+ class Kn {
2580
2703
  gridRef;
2581
2704
  options;
2582
2705
  constructor(t, o) {
@@ -2593,8 +2716,8 @@ class Dn {
2593
2716
  async addEvent(t = {}) {
2594
2717
  const o = this.grid;
2595
2718
  if (o) {
2596
- const { record: n = {}, index: r = -1 } = t, { row: s } = await o.insertAt(n, r);
2597
- await ge(), o.setEditRow(s);
2719
+ const { record: n = {}, index: r = -1 } = t, { row: l } = await o.insertAt(n, r);
2720
+ await ge(), o.setEditRow(l);
2598
2721
  }
2599
2722
  }
2600
2723
  /**
@@ -2608,11 +2731,11 @@ class Dn {
2608
2731
  }
2609
2732
  }
2610
2733
  }
2611
- function Un(e, t) {
2612
- let o = null, n = null, r = null, s = null, a = null, l = !1, m = !1;
2613
- const y = (g) => {
2614
- if (!g) return window;
2615
- let S = g.parentElement;
2734
+ function Xn(e, t) {
2735
+ let o = null, n = null, r = null, l = null, s = null, a = !1, m = !1;
2736
+ const g = (b) => {
2737
+ if (!b) return window;
2738
+ let S = b.parentElement;
2616
2739
  for (; S; ) {
2617
2740
  const F = window.getComputedStyle(S);
2618
2741
  if (/(auto|scroll)/.test(F.overflow + F.overflowY + F.overflowX))
@@ -2621,114 +2744,114 @@ function Un(e, t) {
2621
2744
  }
2622
2745
  return window;
2623
2746
  }, v = () => {
2624
- o && o.classList.contains("is-sticky") && (o.style.position = "", o.style.top = "", o.style.left = "", o.style.zIndex = "", o.style.width = "", o.classList.remove("is-sticky"), n && n.parentNode && (n.parentNode.removeChild(n), n = null)), s && (s.style.display = "none");
2625
- }, i = (g) => {
2626
- m || s && r && (l = !0, s.scrollLeft = r.scrollLeft, requestAnimationFrame(() => {
2627
- l = !1;
2747
+ o && o.classList.contains("is-sticky") && (o.style.position = "", o.style.top = "", o.style.left = "", o.style.zIndex = "", o.style.width = "", o.classList.remove("is-sticky"), n && n.parentNode && (n.parentNode.removeChild(n), n = null)), l && (l.style.display = "none");
2748
+ }, i = (b) => {
2749
+ m || l && r && (a = !0, l.scrollLeft = r.scrollLeft, requestAnimationFrame(() => {
2750
+ a = !1;
2628
2751
  }));
2629
- }, u = (g) => {
2630
- l || s && r && (m = !0, r.scrollLeft = s.scrollLeft, requestAnimationFrame(() => {
2752
+ }, u = (b) => {
2753
+ a || l && r && (m = !0, r.scrollLeft = l.scrollLeft, requestAnimationFrame(() => {
2631
2754
  m = !1;
2632
2755
  }));
2633
2756
  }, c = () => {
2634
- !e.value || s || (s = document.createElement("div"), s.className = "vxe-table--sticky-scrollbar", s.style.position = "fixed", s.style.bottom = "0", s.style.overflowX = "auto", s.style.overflowY = "hidden", s.style.zIndex = "101", s.style.display = "none", a = document.createElement("div"), s.appendChild(a), s.addEventListener("scroll", u), document.body.appendChild(s), r = e.value.$el.querySelector(".vxe-table--body-wrapper"), r && r.addEventListener("scroll", i));
2757
+ !e.value || l || (l = document.createElement("div"), l.className = "vxe-table--sticky-scrollbar", l.style.position = "fixed", l.style.bottom = "0", l.style.overflowX = "auto", l.style.overflowY = "hidden", l.style.zIndex = "101", l.style.display = "none", s = document.createElement("div"), l.appendChild(s), l.addEventListener("scroll", u), document.body.appendChild(l), r = e.value.$el.querySelector(".vxe-table--body-wrapper"), r && r.addEventListener("scroll", i));
2635
2758
  }, h = () => {
2636
2759
  if (!e.value || !o) return;
2637
2760
  if (!t.sticky) {
2638
2761
  v();
2639
2762
  return;
2640
2763
  }
2641
- const g = e.value.$el, S = g.getBoundingClientRect(), F = o.getBoundingClientRect(), C = y(g);
2642
- let x = { top: 0, bottom: window.innerHeight };
2643
- if (C !== window && C instanceof HTMLElement && (x = C.getBoundingClientRect()), x.bottom > 0 && x.top < window.innerHeight && S.top < x.top && S.bottom > F.height) {
2644
- const d = Math.max(0, x.top);
2764
+ const b = e.value.$el, S = b.getBoundingClientRect(), F = o.getBoundingClientRect(), x = g(b);
2765
+ let C = { top: 0, bottom: window.innerHeight };
2766
+ if (x !== window && x instanceof HTMLElement && (C = x.getBoundingClientRect()), C.bottom > 0 && C.top < window.innerHeight && S.top < C.top && S.bottom > F.height) {
2767
+ const d = Math.max(0, C.top);
2645
2768
  S.bottom - F.height > d ? (!o.classList.contains("is-sticky") || o.style.top !== `${d}px` || o.style.left !== `${S.left}px`) && (o.style.position = "fixed", o.style.top = `${d}px`, o.style.left = `${S.left}px`, o.style.width = `${S.width}px`, o.style.zIndex = "100", o.classList.add("is-sticky"), n || (n = document.createElement("div"), o.parentNode?.insertBefore(n, o)), n.style.height = `${F.height}px`) : v();
2646
2769
  } else
2647
2770
  o.classList.contains("is-sticky") && (o.style.position = "", o.style.top = "", o.style.left = "", o.style.width = "", o.classList.remove("is-sticky"), n && n.parentNode && (n.parentNode.removeChild(n), n = null));
2648
- if ((!s || !r) && c(), s && r && a) {
2771
+ if ((!l || !r) && c(), l && r && s) {
2649
2772
  const d = r.scrollWidth, f = r.clientWidth;
2650
2773
  if (d > f) {
2651
2774
  const k = window.innerHeight;
2652
- S.bottom > k && S.top < k ? (s.style.display = "block", s.style.width = `${S.width}px`, s.style.left = `${S.left}px`, a.style.width = `${d}px`, Math.abs(s.scrollLeft - r.scrollLeft) > 1 && (s.scrollLeft = r.scrollLeft)) : s.style.display = "none";
2775
+ S.bottom > k && S.top < k ? (l.style.display = "block", l.style.width = `${S.width}px`, l.style.left = `${S.left}px`, s.style.width = `${d}px`, Math.abs(l.scrollLeft - r.scrollLeft) > 1 && (l.scrollLeft = r.scrollLeft)) : l.style.display = "none";
2653
2776
  } else
2654
- s.style.display = "none";
2777
+ l.style.display = "none";
2655
2778
  }
2656
2779
  };
2657
2780
  U(() => t.sticky, () => {
2658
2781
  h();
2659
- }), Le(() => {
2782
+ }), Ie(() => {
2660
2783
  setTimeout(() => {
2661
2784
  e.value && (o = e.value.$el.querySelector(".vxe-table--header-wrapper"), o && (window.addEventListener("scroll", h, !0), window.addEventListener("resize", h)), c());
2662
2785
  }, 100);
2663
- }), ht(() => {
2664
- window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h), n && n.parentNode && n.parentNode.removeChild(n), s && s.parentNode && s.parentNode.removeChild(s), r && r.removeEventListener("scroll", i);
2786
+ }), vt(() => {
2787
+ window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h), n && n.parentNode && n.parentNode.removeChild(n), l && l.parentNode && l.parentNode.removeChild(l), r && r.removeEventListener("scroll", i);
2665
2788
  });
2666
2789
  }
2667
- var Hn = typeof global == "object" && global && global.Object === Object && global, Wn = typeof self == "object" && self && self.Object === Object && self, De = Hn || Wn || Function("return this")(), J = De.Symbol, Pt = Object.prototype, Gn = Pt.hasOwnProperty, qn = Pt.toString, se = J ? J.toStringTag : void 0;
2668
- function Yn(e) {
2669
- var t = Gn.call(e, se), o = e[se];
2790
+ var Zn = typeof global == "object" && global && global.Object === Object && global, Qn = typeof self == "object" && self && self.Object === Object && self, He = Zn || Qn || Function("return this")(), oe = He.Symbol, Ot = Object.prototype, Jn = Ot.hasOwnProperty, er = Ot.toString, se = oe ? oe.toStringTag : void 0;
2791
+ function tr(e) {
2792
+ var t = Jn.call(e, se), o = e[se];
2670
2793
  try {
2671
2794
  e[se] = void 0;
2672
2795
  var n = !0;
2673
2796
  } catch {
2674
2797
  }
2675
- var r = qn.call(e);
2798
+ var r = er.call(e);
2676
2799
  return n && (t ? e[se] = o : delete e[se]), r;
2677
2800
  }
2678
- var Kn = Object.prototype, Xn = Kn.toString;
2679
- function Zn(e) {
2680
- return Xn.call(e);
2801
+ var or = Object.prototype, nr = or.toString;
2802
+ function rr(e) {
2803
+ return nr.call(e);
2681
2804
  }
2682
- var Qn = "[object Null]", Jn = "[object Undefined]", lt = J ? J.toStringTag : void 0;
2683
- function Ue(e) {
2684
- return e == null ? e === void 0 ? Jn : Qn : lt && lt in Object(e) ? Yn(e) : Zn(e);
2805
+ var sr = "[object Null]", lr = "[object Undefined]", it = oe ? oe.toStringTag : void 0;
2806
+ function We(e) {
2807
+ return e == null ? e === void 0 ? lr : sr : it && it in Object(e) ? tr(e) : rr(e);
2685
2808
  }
2686
- function He(e) {
2809
+ function Ge(e) {
2687
2810
  return e != null && typeof e == "object";
2688
2811
  }
2689
- var er = "[object Symbol]";
2690
- function We(e) {
2691
- return typeof e == "symbol" || He(e) && Ue(e) == er;
2812
+ var ar = "[object Symbol]";
2813
+ function qe(e) {
2814
+ return typeof e == "symbol" || Ge(e) && We(e) == ar;
2692
2815
  }
2693
- function tr(e, t) {
2816
+ function ir(e, t) {
2694
2817
  for (var o = -1, n = e == null ? 0 : e.length, r = Array(n); ++o < n; )
2695
2818
  r[o] = t(e[o], o, e);
2696
2819
  return r;
2697
2820
  }
2698
- var be = Array.isArray, it = J ? J.prototype : void 0, ct = it ? it.toString : void 0;
2699
- function Vt(e) {
2821
+ var be = Array.isArray, ct = oe ? oe.prototype : void 0, ut = ct ? ct.toString : void 0;
2822
+ function Bt(e) {
2700
2823
  if (typeof e == "string")
2701
2824
  return e;
2702
2825
  if (be(e))
2703
- return tr(e, Vt) + "";
2704
- if (We(e))
2705
- return ct ? ct.call(e) : "";
2826
+ return ir(e, Bt) + "";
2827
+ if (qe(e))
2828
+ return ut ? ut.call(e) : "";
2706
2829
  var t = e + "";
2707
2830
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
2708
2831
  }
2709
- function Ot(e) {
2832
+ function At(e) {
2710
2833
  var t = typeof e;
2711
2834
  return e != null && (t == "object" || t == "function");
2712
2835
  }
2713
- var or = "[object AsyncFunction]", nr = "[object Function]", rr = "[object GeneratorFunction]", sr = "[object Proxy]";
2714
- function ar(e) {
2715
- if (!Ot(e))
2836
+ var cr = "[object AsyncFunction]", ur = "[object Function]", dr = "[object GeneratorFunction]", fr = "[object Proxy]";
2837
+ function pr(e) {
2838
+ if (!At(e))
2716
2839
  return !1;
2717
- var t = Ue(e);
2718
- return t == nr || t == rr || t == or || t == sr;
2840
+ var t = We(e);
2841
+ return t == ur || t == dr || t == cr || t == fr;
2719
2842
  }
2720
- var Oe = De["__core-js_shared__"], ut = (function() {
2721
- var e = /[^.]+$/.exec(Oe && Oe.keys && Oe.keys.IE_PROTO || "");
2843
+ var Ae = He["__core-js_shared__"], dt = (function() {
2844
+ var e = /[^.]+$/.exec(Ae && Ae.keys && Ae.keys.IE_PROTO || "");
2722
2845
  return e ? "Symbol(src)_1." + e : "";
2723
2846
  })();
2724
- function lr(e) {
2725
- return !!ut && ut in e;
2847
+ function mr(e) {
2848
+ return !!dt && dt in e;
2726
2849
  }
2727
- var ir = Function.prototype, cr = ir.toString;
2728
- function ur(e) {
2850
+ var hr = Function.prototype, vr = hr.toString;
2851
+ function yr(e) {
2729
2852
  if (e != null) {
2730
2853
  try {
2731
- return cr.call(e);
2854
+ return vr.call(e);
2732
2855
  } catch {
2733
2856
  }
2734
2857
  try {
@@ -2738,113 +2861,113 @@ function ur(e) {
2738
2861
  }
2739
2862
  return "";
2740
2863
  }
2741
- var dr = /[\\^$.*+?()[\]{}|]/g, fr = /^\[object .+?Constructor\]$/, pr = Function.prototype, mr = Object.prototype, hr = pr.toString, vr = mr.hasOwnProperty, yr = RegExp(
2742
- "^" + hr.call(vr).replace(dr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2864
+ var gr = /[\\^$.*+?()[\]{}|]/g, br = /^\[object .+?Constructor\]$/, wr = Function.prototype, Sr = Object.prototype, kr = wr.toString, Cr = Sr.hasOwnProperty, xr = RegExp(
2865
+ "^" + kr.call(Cr).replace(gr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
2743
2866
  );
2744
- function gr(e) {
2745
- if (!Ot(e) || lr(e))
2867
+ function $r(e) {
2868
+ if (!At(e) || mr(e))
2746
2869
  return !1;
2747
- var t = ar(e) ? yr : fr;
2748
- return t.test(ur(e));
2870
+ var t = pr(e) ? xr : br;
2871
+ return t.test(yr(e));
2749
2872
  }
2750
- function br(e, t) {
2873
+ function _r(e, t) {
2751
2874
  return e?.[t];
2752
2875
  }
2753
2876
  function Et(e, t) {
2754
- var o = br(e, t);
2755
- return gr(o) ? o : void 0;
2877
+ var o = _r(e, t);
2878
+ return $r(o) ? o : void 0;
2756
2879
  }
2757
- var wr = 9007199254740991, Sr = /^(?:0|[1-9]\d*)$/;
2758
- function kr(e, t) {
2880
+ var Fr = 9007199254740991, Pr = /^(?:0|[1-9]\d*)$/;
2881
+ function Vr(e, t) {
2759
2882
  var o = typeof e;
2760
- return t = t ?? wr, !!t && (o == "number" || o != "symbol" && Sr.test(e)) && e > -1 && e % 1 == 0 && e < t;
2883
+ return t = t ?? Fr, !!t && (o == "number" || o != "symbol" && Pr.test(e)) && e > -1 && e % 1 == 0 && e < t;
2761
2884
  }
2762
- function xr(e, t) {
2885
+ function Or(e, t) {
2763
2886
  return e === t || e !== e && t !== t;
2764
2887
  }
2765
- var Cr = 9007199254740991;
2766
- function $r(e) {
2767
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Cr;
2888
+ var Br = 9007199254740991;
2889
+ function Ar(e) {
2890
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Br;
2768
2891
  }
2769
- var _r = "[object Arguments]";
2770
- function dt(e) {
2771
- return He(e) && Ue(e) == _r;
2892
+ var Er = "[object Arguments]";
2893
+ function ft(e) {
2894
+ return Ge(e) && We(e) == Er;
2772
2895
  }
2773
- var Bt = Object.prototype, Fr = Bt.hasOwnProperty, Pr = Bt.propertyIsEnumerable, Vr = dt(/* @__PURE__ */ (function() {
2896
+ var jt = Object.prototype, jr = jt.hasOwnProperty, zr = jt.propertyIsEnumerable, Rr = ft(/* @__PURE__ */ (function() {
2774
2897
  return arguments;
2775
- })()) ? dt : function(e) {
2776
- return He(e) && Fr.call(e, "callee") && !Pr.call(e, "callee");
2777
- }, Or = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Er = /^\w*$/;
2778
- function Br(e, t) {
2898
+ })()) ? ft : function(e) {
2899
+ return Ge(e) && jr.call(e, "callee") && !zr.call(e, "callee");
2900
+ }, Tr = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mr = /^\w*$/;
2901
+ function Lr(e, t) {
2779
2902
  if (be(e))
2780
2903
  return !1;
2781
2904
  var o = typeof e;
2782
- return o == "number" || o == "symbol" || o == "boolean" || e == null || We(e) ? !0 : Er.test(e) || !Or.test(e) || t != null && e in Object(t);
2905
+ return o == "number" || o == "symbol" || o == "boolean" || e == null || qe(e) ? !0 : Mr.test(e) || !Tr.test(e) || t != null && e in Object(t);
2783
2906
  }
2784
2907
  var ue = Et(Object, "create");
2785
- function Ar() {
2908
+ function Nr() {
2786
2909
  this.__data__ = ue ? ue(null) : {}, this.size = 0;
2787
2910
  }
2788
- function Rr(e) {
2911
+ function Ir(e) {
2789
2912
  var t = this.has(e) && delete this.__data__[e];
2790
2913
  return this.size -= t ? 1 : 0, t;
2791
2914
  }
2792
- var Tr = "__lodash_hash_undefined__", jr = Object.prototype, Mr = jr.hasOwnProperty;
2793
- function zr(e) {
2915
+ var Dr = "__lodash_hash_undefined__", Ur = Object.prototype, Hr = Ur.hasOwnProperty;
2916
+ function Wr(e) {
2794
2917
  var t = this.__data__;
2795
2918
  if (ue) {
2796
2919
  var o = t[e];
2797
- return o === Tr ? void 0 : o;
2920
+ return o === Dr ? void 0 : o;
2798
2921
  }
2799
- return Mr.call(t, e) ? t[e] : void 0;
2922
+ return Hr.call(t, e) ? t[e] : void 0;
2800
2923
  }
2801
- var Lr = Object.prototype, Nr = Lr.hasOwnProperty;
2802
- function Ir(e) {
2924
+ var Gr = Object.prototype, qr = Gr.hasOwnProperty;
2925
+ function Yr(e) {
2803
2926
  var t = this.__data__;
2804
- return ue ? t[e] !== void 0 : Nr.call(t, e);
2927
+ return ue ? t[e] !== void 0 : qr.call(t, e);
2805
2928
  }
2806
- var Dr = "__lodash_hash_undefined__";
2807
- function Ur(e, t) {
2929
+ var Kr = "__lodash_hash_undefined__";
2930
+ function Xr(e, t) {
2808
2931
  var o = this.__data__;
2809
- return this.size += this.has(e) ? 0 : 1, o[e] = ue && t === void 0 ? Dr : t, this;
2932
+ return this.size += this.has(e) ? 0 : 1, o[e] = ue && t === void 0 ? Kr : t, this;
2810
2933
  }
2811
- function K(e) {
2934
+ function J(e) {
2812
2935
  var t = -1, o = e == null ? 0 : e.length;
2813
2936
  for (this.clear(); ++t < o; ) {
2814
2937
  var n = e[t];
2815
2938
  this.set(n[0], n[1]);
2816
2939
  }
2817
2940
  }
2818
- K.prototype.clear = Ar;
2819
- K.prototype.delete = Rr;
2820
- K.prototype.get = zr;
2821
- K.prototype.has = Ir;
2822
- K.prototype.set = Ur;
2823
- function Hr() {
2941
+ J.prototype.clear = Nr;
2942
+ J.prototype.delete = Ir;
2943
+ J.prototype.get = Wr;
2944
+ J.prototype.has = Yr;
2945
+ J.prototype.set = Xr;
2946
+ function Zr() {
2824
2947
  this.__data__ = [], this.size = 0;
2825
2948
  }
2826
2949
  function we(e, t) {
2827
2950
  for (var o = e.length; o--; )
2828
- if (xr(e[o][0], t))
2951
+ if (Or(e[o][0], t))
2829
2952
  return o;
2830
2953
  return -1;
2831
2954
  }
2832
- var Wr = Array.prototype, Gr = Wr.splice;
2833
- function qr(e) {
2955
+ var Qr = Array.prototype, Jr = Qr.splice;
2956
+ function es(e) {
2834
2957
  var t = this.__data__, o = we(t, e);
2835
2958
  if (o < 0)
2836
2959
  return !1;
2837
2960
  var n = t.length - 1;
2838
- return o == n ? t.pop() : Gr.call(t, o, 1), --this.size, !0;
2961
+ return o == n ? t.pop() : Jr.call(t, o, 1), --this.size, !0;
2839
2962
  }
2840
- function Yr(e) {
2963
+ function ts(e) {
2841
2964
  var t = this.__data__, o = we(t, e);
2842
2965
  return o < 0 ? void 0 : t[o][1];
2843
2966
  }
2844
- function Kr(e) {
2967
+ function os(e) {
2845
2968
  return we(this.__data__, e) > -1;
2846
2969
  }
2847
- function Xr(e, t) {
2970
+ function ns(e, t) {
2848
2971
  var o = this.__data__, n = we(o, e);
2849
2972
  return n < 0 ? (++this.size, o.push([e, t])) : o[n][1] = t, this;
2850
2973
  }
@@ -2855,119 +2978,119 @@ function ne(e) {
2855
2978
  this.set(n[0], n[1]);
2856
2979
  }
2857
2980
  }
2858
- ne.prototype.clear = Hr;
2859
- ne.prototype.delete = qr;
2860
- ne.prototype.get = Yr;
2861
- ne.prototype.has = Kr;
2862
- ne.prototype.set = Xr;
2863
- var Zr = Et(De, "Map");
2864
- function Qr() {
2981
+ ne.prototype.clear = Zr;
2982
+ ne.prototype.delete = es;
2983
+ ne.prototype.get = ts;
2984
+ ne.prototype.has = os;
2985
+ ne.prototype.set = ns;
2986
+ var rs = Et(He, "Map");
2987
+ function ss() {
2865
2988
  this.size = 0, this.__data__ = {
2866
- hash: new K(),
2867
- map: new (Zr || ne)(),
2868
- string: new K()
2989
+ hash: new J(),
2990
+ map: new (rs || ne)(),
2991
+ string: new J()
2869
2992
  };
2870
2993
  }
2871
- function Jr(e) {
2994
+ function ls(e) {
2872
2995
  var t = typeof e;
2873
2996
  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
2874
2997
  }
2875
2998
  function Se(e, t) {
2876
2999
  var o = e.__data__;
2877
- return Jr(t) ? o[typeof t == "string" ? "string" : "hash"] : o.map;
3000
+ return ls(t) ? o[typeof t == "string" ? "string" : "hash"] : o.map;
2878
3001
  }
2879
- function es(e) {
3002
+ function as(e) {
2880
3003
  var t = Se(this, e).delete(e);
2881
3004
  return this.size -= t ? 1 : 0, t;
2882
3005
  }
2883
- function ts(e) {
3006
+ function cs(e) {
2884
3007
  return Se(this, e).get(e);
2885
3008
  }
2886
- function os(e) {
3009
+ function us(e) {
2887
3010
  return Se(this, e).has(e);
2888
3011
  }
2889
- function ns(e, t) {
3012
+ function ds(e, t) {
2890
3013
  var o = Se(this, e), n = o.size;
2891
3014
  return o.set(e, t), this.size += o.size == n ? 0 : 1, this;
2892
3015
  }
2893
- function Q(e) {
3016
+ function te(e) {
2894
3017
  var t = -1, o = e == null ? 0 : e.length;
2895
3018
  for (this.clear(); ++t < o; ) {
2896
3019
  var n = e[t];
2897
3020
  this.set(n[0], n[1]);
2898
3021
  }
2899
3022
  }
2900
- Q.prototype.clear = Qr;
2901
- Q.prototype.delete = es;
2902
- Q.prototype.get = ts;
2903
- Q.prototype.has = os;
2904
- Q.prototype.set = ns;
2905
- var rs = "Expected a function";
2906
- function Ge(e, t) {
3023
+ te.prototype.clear = ss;
3024
+ te.prototype.delete = as;
3025
+ te.prototype.get = cs;
3026
+ te.prototype.has = us;
3027
+ te.prototype.set = ds;
3028
+ var fs = "Expected a function";
3029
+ function Ye(e, t) {
2907
3030
  if (typeof e != "function" || t != null && typeof t != "function")
2908
- throw new TypeError(rs);
3031
+ throw new TypeError(fs);
2909
3032
  var o = function() {
2910
- var n = arguments, r = t ? t.apply(this, n) : n[0], s = o.cache;
2911
- if (s.has(r))
2912
- return s.get(r);
2913
- var a = e.apply(this, n);
2914
- return o.cache = s.set(r, a) || s, a;
3033
+ var n = arguments, r = t ? t.apply(this, n) : n[0], l = o.cache;
3034
+ if (l.has(r))
3035
+ return l.get(r);
3036
+ var s = e.apply(this, n);
3037
+ return o.cache = l.set(r, s) || l, s;
2915
3038
  };
2916
- return o.cache = new (Ge.Cache || Q)(), o;
3039
+ return o.cache = new (Ye.Cache || te)(), o;
2917
3040
  }
2918
- Ge.Cache = Q;
2919
- var ss = 500;
2920
- function as(e) {
2921
- var t = Ge(e, function(n) {
2922
- return o.size === ss && o.clear(), n;
3041
+ Ye.Cache = te;
3042
+ var ps = 500;
3043
+ function ms(e) {
3044
+ var t = Ye(e, function(n) {
3045
+ return o.size === ps && o.clear(), n;
2923
3046
  }), o = t.cache;
2924
3047
  return t;
2925
3048
  }
2926
- var ls = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, cs = /\\(\\)?/g, us = as(function(e) {
3049
+ var hs = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, vs = /\\(\\)?/g, ys = ms(function(e) {
2927
3050
  var t = [];
2928
- return e.charCodeAt(0) === 46 && t.push(""), e.replace(ls, function(o, n, r, s) {
2929
- t.push(r ? s.replace(cs, "$1") : n || o);
3051
+ return e.charCodeAt(0) === 46 && t.push(""), e.replace(hs, function(o, n, r, l) {
3052
+ t.push(r ? l.replace(vs, "$1") : n || o);
2930
3053
  }), t;
2931
3054
  });
2932
- function ds(e) {
2933
- return e == null ? "" : Vt(e);
3055
+ function gs(e) {
3056
+ return e == null ? "" : Bt(e);
2934
3057
  }
2935
- function fs(e, t) {
2936
- return be(e) ? e : Br(e, t) ? [e] : us(ds(e));
3058
+ function bs(e, t) {
3059
+ return be(e) ? e : Lr(e, t) ? [e] : ys(gs(e));
2937
3060
  }
2938
- function ps(e) {
2939
- if (typeof e == "string" || We(e))
3061
+ function ws(e) {
3062
+ if (typeof e == "string" || qe(e))
2940
3063
  return e;
2941
3064
  var t = e + "";
2942
3065
  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
2943
3066
  }
2944
- function ms(e, t) {
3067
+ function Ss(e, t) {
2945
3068
  return e != null && t in Object(e);
2946
3069
  }
2947
- function hs(e, t, o) {
2948
- t = fs(t, e);
2949
- for (var n = -1, r = t.length, s = !1; ++n < r; ) {
2950
- var a = ps(t[n]);
2951
- if (!(s = e != null && o(e, a)))
3070
+ function ks(e, t, o) {
3071
+ t = bs(t, e);
3072
+ for (var n = -1, r = t.length, l = !1; ++n < r; ) {
3073
+ var s = ws(t[n]);
3074
+ if (!(l = e != null && o(e, s)))
2952
3075
  break;
2953
- e = e[a];
3076
+ e = e[s];
2954
3077
  }
2955
- return s || ++n != r ? s : (r = e == null ? 0 : e.length, !!r && $r(r) && kr(a, r) && (be(e) || Vr(e)));
3078
+ return l || ++n != r ? l : (r = e == null ? 0 : e.length, !!r && Ar(r) && Vr(s, r) && (be(e) || Rr(e)));
2956
3079
  }
2957
- function vs(e, t) {
2958
- return e != null && hs(e, t, ms);
3080
+ function Cs(e, t) {
3081
+ return e != null && ks(e, t, Ss);
2959
3082
  }
2960
- const ys = { class: "my-filter-complex" }, gs = {
3083
+ const xs = { class: "my-filter-complex" }, $s = {
2961
3084
  key: 0,
2962
3085
  class: "my-filter-input"
2963
- }, bs = { class: "my-fc-footer" }, ws = /* @__PURE__ */ O({
3086
+ }, _s = { class: "my-fc-footer" }, Fs = /* @__PURE__ */ O({
2964
3087
  __name: "FilterComplex",
2965
3088
  props: {
2966
3089
  renderOpts: Object,
2967
3090
  renderParams: Object
2968
3091
  },
2969
3092
  setup(e) {
2970
- const t = e, o = M(), n = b(() => {
3093
+ const t = e, o = T(), n = y(() => {
2971
3094
  const { column: i } = t.renderParams || {};
2972
3095
  return i ? i.field : "";
2973
3096
  }), r = () => {
@@ -2980,7 +3103,7 @@ const ys = { class: "my-filter-complex" }, gs = {
2980
3103
  U(n, () => {
2981
3104
  r();
2982
3105
  }), r();
2983
- const s = b(() => t.renderParams.column), a = b(() => vs(s.value.params, "optionlist") ? "select" : "input"), l = () => {
3106
+ const l = y(() => t.renderParams.column), s = y(() => Cs(l.value.params, "optionlist") ? "select" : "input"), a = () => {
2984
3107
  const { renderParams: i } = t, u = o.value;
2985
3108
  if (i && u) {
2986
3109
  const { $table: c } = i, h = !!u.data;
@@ -2990,62 +3113,62 @@ const ys = { class: "my-filter-complex" }, gs = {
2990
3113
  const { renderParams: i } = t, u = {};
2991
3114
  if (i) {
2992
3115
  const { $table: c } = i;
2993
- c.getColumns().forEach((g) => {
2994
- const { field: S, filters: F } = g;
3116
+ c.getColumns().forEach((b) => {
3117
+ const { field: S, filters: F } = b;
2995
3118
  if (S && F && F.length) {
2996
- const C = F[0];
2997
- C.data && (u[S] = C.data);
3119
+ const x = F[0];
3120
+ x.data && (u[S] = x.data);
2998
3121
  }
2999
3122
  });
3000
3123
  }
3001
3124
  return u;
3002
- }, y = () => {
3125
+ }, g = () => {
3003
3126
  const { renderParams: i } = t;
3004
3127
  if (i) {
3005
3128
  const { $table: u, $grid: c } = i, h = o.value;
3006
3129
  h && u.updateFilterOptionStatus(h, !!h.data);
3007
- const g = m();
3008
- c.commitProxy("query", g), c.closeFilter();
3130
+ const b = m();
3131
+ c.commitProxy("query", b), c.closeFilter();
3009
3132
  }
3010
3133
  }, v = () => {
3011
3134
  const { renderParams: i } = t, u = o.value;
3012
3135
  if (i && u) {
3013
3136
  const { $table: c, $grid: h } = i;
3014
3137
  u.data = "", c.updateFilterOptionStatus(u, !1);
3015
- const g = m();
3016
- h.commitProxy("query", g), h.closeFilter();
3138
+ const b = m();
3139
+ h.commitProxy("query", b), h.closeFilter();
3017
3140
  }
3018
3141
  };
3019
- return (i, u) => (w(), R("div", ys, [
3020
- o.value ? (w(), R("div", gs, [
3021
- a.value === "select" ? (w(), V(p(So), {
3142
+ return (i, u) => (w(), A("div", xs, [
3143
+ o.value ? (w(), A("div", $s, [
3144
+ s.value === "select" ? (w(), V(p(wo), {
3022
3145
  key: 0,
3023
3146
  modelValue: o.value.data,
3024
3147
  "onUpdate:modelValue": u[0] || (u[0] = (c) => o.value.data = c),
3025
- options: s.value.params.optionlist,
3148
+ options: l.value.params.optionlist,
3026
3149
  clearable: "",
3027
- onChange: l
3028
- }, null, 8, ["modelValue", "options"])) : (w(), V(p(ko), {
3150
+ onChange: a
3151
+ }, null, 8, ["modelValue", "options"])) : (w(), V(p(So), {
3029
3152
  key: 1,
3030
3153
  modelValue: o.value.data,
3031
3154
  "onUpdate:modelValue": u[1] || (u[1] = (c) => o.value.data = c),
3032
3155
  clearable: "",
3033
- onKeyup: vt(y, ["enter"]),
3034
- onInput: l
3156
+ onKeyup: yt(g, ["enter"]),
3157
+ onInput: a
3035
3158
  }, null, 8, ["modelValue"]))
3036
- ])) : z("", !0),
3037
- _("div", bs, [
3038
- E(p(Te), { onClick: v }, {
3039
- default: $(() => [...u[2] || (u[2] = [
3159
+ ])) : M("", !0),
3160
+ $("div", _s, [
3161
+ B(p(Te), { onClick: v }, {
3162
+ default: _(() => [...u[2] || (u[2] = [
3040
3163
  D("重置", -1)
3041
3164
  ])]),
3042
3165
  _: 1
3043
3166
  }),
3044
- E(p(Te), {
3167
+ B(p(Te), {
3045
3168
  status: "primary",
3046
- onClick: y
3169
+ onClick: g
3047
3170
  }, {
3048
- default: $(() => [...u[3] || (u[3] = [
3171
+ default: _(() => [...u[3] || (u[3] = [
3049
3172
  D("确认", -1)
3050
3173
  ])]),
3051
3174
  _: 1
@@ -3053,81 +3176,81 @@ const ys = { class: "my-filter-complex" }, gs = {
3053
3176
  ])
3054
3177
  ]));
3055
3178
  }
3056
- }), Ss = /* @__PURE__ */ kt(ws, [["__scopeId", "data-v-98a6f5eb"]]);
3057
- wo.renderer.add("MyFilterComplex", {
3179
+ }), Ps = /* @__PURE__ */ xt(Fs, [["__scopeId", "data-v-98a6f5eb"]]);
3180
+ bo.renderer.add("MyFilterComplex", {
3058
3181
  // 不显示底部按钮,使用自定义的按钮
3059
3182
  showTableFilterFooter: !1,
3060
3183
  // 自定义筛选模板
3061
3184
  renderTableFilter(e, t) {
3062
- return /* @__PURE__ */ React.createElement(Ss, { renderOpts: e, renderParams: t });
3185
+ return /* @__PURE__ */ React.createElement(Ps, { renderOpts: e, renderParams: t });
3063
3186
  }
3064
3187
  });
3065
- const ks = /* @__PURE__ */ O({
3188
+ const Vs = /* @__PURE__ */ O({
3066
3189
  components: {
3067
- VxePager: xo,
3190
+ VxePager: ko,
3068
3191
  VxeButton: Te
3069
3192
  },
3070
3193
  __name: "use-query-grid",
3071
3194
  setup(e, { expose: t }) {
3072
- const o = M(), n = ft();
3073
- return Un(o, n), t({
3195
+ const o = T(), n = pt();
3196
+ return Xn(o, n), t({
3074
3197
  getGrid: () => o.value
3075
- }), (r, s) => (w(), V(p(bt), L({
3198
+ }), (r, l) => (w(), V(p(wt), N({
3076
3199
  ref_key: "gridRef",
3077
3200
  ref: o
3078
3201
  }, r.$attrs), de({ _: 2 }, [
3079
- Z(r.$slots, (a, l) => ({
3080
- name: l,
3081
- fn: $((m) => [
3082
- j(r.$slots, l, Y(fe(m || {})))
3202
+ ee(r.$slots, (s, a) => ({
3203
+ name: a,
3204
+ fn: _((m) => [
3205
+ R(r.$slots, a, Q(fe(m || {})))
3083
3206
  ])
3084
3207
  }))
3085
3208
  ]), 1040));
3086
3209
  }
3087
3210
  });
3088
- function Ys(e) {
3089
- const t = M(), o = new Dn(t, e);
3211
+ function tl(e) {
3212
+ const t = T(), o = new Kn(t, e);
3090
3213
  return [O(
3091
- (r, { attrs: s, slots: a }) => {
3092
- const { gridEvents: l, gridOptions: m } = e, y = Object.entries(l || {}).reduce((v, [i, u]) => {
3214
+ (r, { attrs: l, slots: s }) => {
3215
+ const { gridEvents: a, gridOptions: m } = e, g = Object.entries(a || {}).reduce((v, [i, u]) => {
3093
3216
  const c = `on${i.charAt(0).toUpperCase() + i.slice(1)}`;
3094
3217
  return v[c] = u, v;
3095
3218
  }, {});
3096
- return () => ye(ks, { ref: t, ...r, ...s, ...m, ...y }, a);
3219
+ return () => ye(Vs, { ref: t, ...r, ...l, ...m, ...g }, s);
3097
3220
  }
3098
3221
  ), o];
3099
3222
  }
3100
- let ae = null;
3101
- async function At() {
3102
- return ae || (ae = await import("nprogress"), ae.configure({
3223
+ let le = null;
3224
+ async function zt() {
3225
+ return le || (le = await import("nprogress"), le.configure({
3103
3226
  showSpinner: !0,
3104
3227
  speed: 300
3105
- }), ae);
3228
+ }), le);
3106
3229
  }
3107
- async function Ks() {
3108
- (await At())?.start();
3230
+ async function ol() {
3231
+ (await zt())?.start();
3109
3232
  }
3110
- async function Xs() {
3111
- (await At())?.done();
3233
+ async function nl() {
3234
+ (await zt())?.done();
3112
3235
  }
3113
3236
  export {
3114
- Pn as FormApi,
3115
- tn as Modal,
3116
- zs as ModalTypes,
3117
- Is as SunnyBatchSelect,
3118
- Ws as SunnyForm,
3119
- tt as SunnyIcon,
3120
- Ls as SunnyScrollbar,
3121
- Ds as SunnySearchInputTag,
3122
- wn as SunnySelect,
3123
- Ns as SunnyUpload,
3124
- Js as patterns,
3125
- Us as setupSunnyForm,
3126
- Ks as startProgress,
3127
- Xs as stopProgress,
3128
- qs as useSunnyEditGrid,
3129
- Hs as useSunnyForm,
3130
- Ms as useSunnyModal,
3131
- Ys as useSunnyQueryGrid,
3132
- Rs as z
3237
+ zn as FormApi,
3238
+ an as Modal,
3239
+ Ws as ModalTypes,
3240
+ Ys as SunnyBatchSelect,
3241
+ Qs as SunnyForm,
3242
+ dn as SunnyIcon,
3243
+ Gs as SunnyScrollbar,
3244
+ Ks as SunnySearchInputTag,
3245
+ Fn as SunnySelect,
3246
+ qs as SunnyUpload,
3247
+ ll as patterns,
3248
+ Xs as setupSunnyForm,
3249
+ ol as startProgress,
3250
+ nl as stopProgress,
3251
+ el as useSunnyEditGrid,
3252
+ Zs as useSunnyForm,
3253
+ Hs as useSunnyModal,
3254
+ tl as useSunnyQueryGrid,
3255
+ Is as z
3133
3256
  };