n-design-readonly-plugin 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,47 +1,47 @@
1
- import { nextTick as Be, h as k, createVNode as ne, defineComponent as ze, inject as ce, ref as H, computed as M, provide as ue, useAttrs as Ue } from "vue";
2
- import { message as B, Form as se, Checkbox as de, Radio as pe, Select as be, Switch as We, TimePicker as Ge, DatePicker as qe, Cascader as Ke, TreeSelect as Ve, Textarea as Ye, InputNumber as Je, Input as Ze } from "n-designv3";
3
- function C(e, t) {
4
- Qe(e) && (e = "100%");
5
- var r = Xe(e);
1
+ import { nextTick as ze, h as T, createVNode as ae, defineComponent as Ue, inject as ue, ref as B, computed as M, provide as se, useAttrs as We } from "vue";
2
+ import { message as z, Form as de, Checkbox as pe, Radio as be, Select as ye, Switch as Ge, TimePicker as qe, DatePicker as Ke, Cascader as Ve, TreeSelect as Ye, Textarea as Je, InputNumber as Ze, Input as Qe } from "n-designv3";
3
+ function S(e, t) {
4
+ Xe(e) && (e = "100%");
5
+ var r = er(e);
6
6
  return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
7
7
  }
8
- function Qe(e) {
8
+ function Xe(e) {
9
9
  return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
10
10
  }
11
- function Xe(e) {
11
+ function er(e) {
12
12
  return typeof e == "string" && e.indexOf("%") !== -1;
13
13
  }
14
- function er(e) {
14
+ function rr(e) {
15
15
  return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
16
16
  }
17
- function z(e) {
17
+ function U(e) {
18
18
  return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
19
19
  }
20
- function J(e) {
20
+ function Z(e) {
21
21
  return e.length === 1 ? "0" + e : String(e);
22
22
  }
23
- function rr(e, t, r) {
23
+ function tr(e, t, r) {
24
24
  return {
25
- r: C(e, 255) * 255,
26
- g: C(t, 255) * 255,
27
- b: C(r, 255) * 255
25
+ r: S(e, 255) * 255,
26
+ g: S(t, 255) * 255,
27
+ b: S(r, 255) * 255
28
28
  };
29
29
  }
30
- function Z(e, t, r) {
30
+ function Q(e, t, r) {
31
31
  return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * (6 * r) : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
32
32
  }
33
- function tr(e, t, r) {
33
+ function nr(e, t, r) {
34
34
  var n, a, o;
35
- if (e = C(e, 360), t = C(t, 100), r = C(r, 100), t === 0)
35
+ if (e = S(e, 360), t = S(t, 100), r = S(r, 100), t === 0)
36
36
  a = r, o = r, n = r;
37
37
  else {
38
38
  var i = r < 0.5 ? r * (1 + t) : r + t - r * t, l = 2 * r - i;
39
- n = Z(l, i, e + 1 / 3), a = Z(l, i, e), o = Z(l, i, e - 1 / 3);
39
+ n = Q(l, i, e + 1 / 3), a = Q(l, i, e), o = Q(l, i, e - 1 / 3);
40
40
  }
41
41
  return { r: n * 255, g: a * 255, b: o * 255 };
42
42
  }
43
- function nr(e, t, r) {
44
- e = C(e, 255), t = C(t, 255), r = C(r, 255);
43
+ function ar(e, t, r) {
44
+ e = S(e, 255), t = S(t, 255), r = S(r, 255);
45
45
  var n = Math.max(e, t, r), a = Math.min(e, t, r), o = 0, i = n, l = n - a, f = n === 0 ? 0 : l / n;
46
46
  if (n === a)
47
47
  o = 0;
@@ -61,26 +61,26 @@ function nr(e, t, r) {
61
61
  }
62
62
  return { h: o, s: f, v: i };
63
63
  }
64
- function ar(e, t, r) {
65
- e = C(e, 360) * 6, t = C(t, 100), r = C(r, 100);
66
- var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), l = r * (1 - (1 - a) * t), f = n % 6, c = [r, i, o, o, l, r][f], s = [l, r, r, i, o, o][f], S = [o, o, l, r, r, i][f];
67
- return { r: c * 255, g: s * 255, b: S * 255 };
64
+ function or(e, t, r) {
65
+ e = S(e, 360) * 6, t = S(t, 100), r = S(r, 100);
66
+ var n = Math.floor(e), a = e - n, o = r * (1 - t), i = r * (1 - a * t), l = r * (1 - (1 - a) * t), f = n % 6, c = [r, i, o, o, l, r][f], s = [l, r, r, i, o, o][f], k = [o, o, l, r, r, i][f];
67
+ return { r: c * 255, g: s * 255, b: k * 255 };
68
68
  }
69
- function or(e, t, r, n) {
69
+ function ir(e, t, r, n) {
70
70
  var a = [
71
- J(Math.round(e).toString(16)),
72
- J(Math.round(t).toString(16)),
73
- J(Math.round(r).toString(16))
71
+ Z(Math.round(e).toString(16)),
72
+ Z(Math.round(t).toString(16)),
73
+ Z(Math.round(r).toString(16))
74
74
  ];
75
75
  return a.join("");
76
76
  }
77
- function ye(e) {
78
- return h(e) / 255;
77
+ function ge(e) {
78
+ return C(e) / 255;
79
79
  }
80
- function h(e) {
80
+ function C(e) {
81
81
  return parseInt(e, 16);
82
82
  }
83
- var ge = {
83
+ var me = {
84
84
  aliceblue: "#f0f8ff",
85
85
  antiquewhite: "#faebd7",
86
86
  aqua: "#00ffff",
@@ -230,9 +230,9 @@ var ge = {
230
230
  yellow: "#ffff00",
231
231
  yellowgreen: "#9acd32"
232
232
  };
233
- function $(e) {
233
+ function R(e) {
234
234
  var t = { r: 0, g: 0, b: 0 }, r = 1, n = null, a = null, o = null, i = !1, l = !1;
235
- return typeof e == "string" && (e = fr(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = rr(e.r, e.g, e.b), i = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (n = z(e.s), a = z(e.v), t = ar(e.h, n, a), i = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (n = z(e.s), o = z(e.l), t = tr(e.h, n, o), i = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = er(r), {
235
+ return typeof e == "string" && (e = cr(e)), typeof e == "object" && (O(e.r) && O(e.g) && O(e.b) ? (t = tr(e.r, e.g, e.b), i = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : O(e.h) && O(e.s) && O(e.v) ? (n = U(e.s), a = U(e.v), t = or(e.h, n, a), i = !0, l = "hsv") : O(e.h) && O(e.s) && O(e.l) && (n = U(e.s), o = U(e.l), t = nr(e.h, n, o), i = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = rr(r), {
236
236
  ok: i,
237
237
  format: e.format || l,
238
238
  r: Math.min(255, Math.max(t.r, 0)),
@@ -241,56 +241,56 @@ function $(e) {
241
241
  a: r
242
242
  };
243
243
  }
244
- var ir = "[-\\+]?\\d+%?", lr = "[-\\+]?\\d*\\.\\d+%?", P = "(?:".concat(lr, ")|(?:").concat(ir, ")"), Q = "[\\s|\\(]+(".concat(P, ")[,|\\s]+(").concat(P, ")[,|\\s]+(").concat(P, ")\\s*\\)?"), X = "[\\s|\\(]+(".concat(P, ")[,|\\s]+(").concat(P, ")[,|\\s]+(").concat(P, ")[,|\\s]+(").concat(P, ")\\s*\\)?"), x = {
245
- CSS_UNIT: new RegExp(P),
246
- rgb: new RegExp("rgb" + Q),
247
- rgba: new RegExp("rgba" + X),
248
- hsl: new RegExp("hsl" + Q),
249
- hsla: new RegExp("hsla" + X),
250
- hsv: new RegExp("hsv" + Q),
251
- hsva: new RegExp("hsva" + X),
244
+ var lr = "[-\\+]?\\d+%?", fr = "[-\\+]?\\d*\\.\\d+%?", N = "(?:".concat(fr, ")|(?:").concat(lr, ")"), X = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), ee = "[\\s|\\(]+(".concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")[,|\\s]+(").concat(N, ")\\s*\\)?"), x = {
245
+ CSS_UNIT: new RegExp(N),
246
+ rgb: new RegExp("rgb" + X),
247
+ rgba: new RegExp("rgba" + ee),
248
+ hsl: new RegExp("hsl" + X),
249
+ hsla: new RegExp("hsla" + ee),
250
+ hsv: new RegExp("hsv" + X),
251
+ hsva: new RegExp("hsva" + ee),
252
252
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
253
253
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
254
254
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
255
255
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
256
256
  };
257
- function fr(e) {
257
+ function cr(e) {
258
258
  if (e = e.trim().toLowerCase(), e.length === 0)
259
259
  return !1;
260
260
  var t = !1;
261
- if (ge[e])
262
- e = ge[e], t = !0;
261
+ if (me[e])
262
+ e = me[e], t = !0;
263
263
  else if (e === "transparent")
264
264
  return { r: 0, g: 0, b: 0, a: 0, format: "name" };
265
265
  var r = x.rgb.exec(e);
266
266
  return r ? { r: r[1], g: r[2], b: r[3] } : (r = x.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = x.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = x.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = x.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = x.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = x.hex8.exec(e), r ? {
267
- r: h(r[1]),
268
- g: h(r[2]),
269
- b: h(r[3]),
270
- a: ye(r[4]),
267
+ r: C(r[1]),
268
+ g: C(r[2]),
269
+ b: C(r[3]),
270
+ a: ge(r[4]),
271
271
  format: t ? "name" : "hex8"
272
272
  } : (r = x.hex6.exec(e), r ? {
273
- r: h(r[1]),
274
- g: h(r[2]),
275
- b: h(r[3]),
273
+ r: C(r[1]),
274
+ g: C(r[2]),
275
+ b: C(r[3]),
276
276
  format: t ? "name" : "hex"
277
277
  } : (r = x.hex4.exec(e), r ? {
278
- r: h(r[1] + r[1]),
279
- g: h(r[2] + r[2]),
280
- b: h(r[3] + r[3]),
281
- a: ye(r[4] + r[4]),
278
+ r: C(r[1] + r[1]),
279
+ g: C(r[2] + r[2]),
280
+ b: C(r[3] + r[3]),
281
+ a: ge(r[4] + r[4]),
282
282
  format: t ? "name" : "hex8"
283
283
  } : (r = x.hex3.exec(e), r ? {
284
- r: h(r[1] + r[1]),
285
- g: h(r[2] + r[2]),
286
- b: h(r[3] + r[3]),
284
+ r: C(r[1] + r[1]),
285
+ g: C(r[2] + r[2]),
286
+ b: C(r[3] + r[3]),
287
287
  format: t ? "name" : "hex"
288
288
  } : !1)))))))));
289
289
  }
290
290
  function O(e) {
291
291
  return !!x.CSS_UNIT.exec(String(e));
292
292
  }
293
- var U = 2, me = 0.16, cr = 0.05, ur = 0.05, sr = 0.15, Ee = 5, Fe = 4, dr = [{
293
+ var W = 2, he = 0.16, ur = 0.05, sr = 0.05, dr = 0.15, Ie = 5, Ee = 4, pr = [{
294
294
  index: 7,
295
295
  opacity: 0.15
296
296
  }, {
@@ -322,18 +322,18 @@ var U = 2, me = 0.16, cr = 0.05, ur = 0.05, sr = 0.15, Ee = 5, Fe = 4, dr = [{
322
322
  opacity: 0.98
323
323
  }];
324
324
  function ve(e) {
325
- var t = e.r, r = e.g, n = e.b, a = nr(t, r, n);
325
+ var t = e.r, r = e.g, n = e.b, a = ar(t, r, n);
326
326
  return {
327
327
  h: a.h * 360,
328
328
  s: a.s,
329
329
  v: a.v
330
330
  };
331
331
  }
332
- function W(e) {
332
+ function G(e) {
333
333
  var t = e.r, r = e.g, n = e.b;
334
- return "#".concat(or(t, r, n));
334
+ return "#".concat(ir(t, r, n));
335
335
  }
336
- function pr(e, t, r) {
336
+ function br(e, t, r) {
337
337
  var n = r / 100, a = {
338
338
  r: (t.r - e.r) * n + e.r,
339
339
  g: (t.g - e.g) * n + e.g,
@@ -341,44 +341,44 @@ function pr(e, t, r) {
341
341
  };
342
342
  return a;
343
343
  }
344
- function he(e, t, r) {
344
+ function Ce(e, t, r) {
345
345
  var n;
346
- return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? n = r ? Math.round(e.h) - U * t : Math.round(e.h) + U * t : n = r ? Math.round(e.h) + U * t : Math.round(e.h) - U * t, n < 0 ? n += 360 : n >= 360 && (n -= 360), n;
346
+ return Math.round(e.h) >= 60 && Math.round(e.h) <= 240 ? n = r ? Math.round(e.h) - W * t : Math.round(e.h) + W * t : n = r ? Math.round(e.h) + W * t : Math.round(e.h) - W * t, n < 0 ? n += 360 : n >= 360 && (n -= 360), n;
347
347
  }
348
348
  function we(e, t, r) {
349
349
  if (e.h === 0 && e.s === 0)
350
350
  return e.s;
351
351
  var n;
352
- return r ? n = e.s - me * t : t === Fe ? n = e.s + me : n = e.s + cr * t, n > 1 && (n = 1), r && t === Ee && n > 0.1 && (n = 0.1), n < 0.06 && (n = 0.06), Number(n.toFixed(2));
352
+ return r ? n = e.s - he * t : t === Ee ? n = e.s + he : n = e.s + ur * t, n > 1 && (n = 1), r && t === Ie && n > 0.1 && (n = 0.1), n < 0.06 && (n = 0.06), Number(n.toFixed(2));
353
353
  }
354
- function Ce(e, t, r) {
354
+ function Se(e, t, r) {
355
355
  var n;
356
- return r ? n = e.v + ur * t : n = e.v - sr * t, n > 1 && (n = 1), Number(n.toFixed(2));
356
+ return r ? n = e.v + sr * t : n = e.v - dr * t, n > 1 && (n = 1), Number(n.toFixed(2));
357
357
  }
358
- function ae(e) {
359
- for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], n = $(e), a = Ee; a > 0; a -= 1) {
360
- var o = ve(n), i = W($({
361
- h: he(o, a, !0),
358
+ function oe(e) {
359
+ for (var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [], n = R(e), a = Ie; a > 0; a -= 1) {
360
+ var o = ve(n), i = G(R({
361
+ h: Ce(o, a, !0),
362
362
  s: we(o, a, !0),
363
- v: Ce(o, a, !0)
363
+ v: Se(o, a, !0)
364
364
  }));
365
365
  r.push(i);
366
366
  }
367
- r.push(W(n));
368
- for (var l = 1; l <= Fe; l += 1) {
369
- var f = ve(n), c = W($({
370
- h: he(f, l),
367
+ r.push(G(n));
368
+ for (var l = 1; l <= Ee; l += 1) {
369
+ var f = ve(n), c = G(R({
370
+ h: Ce(f, l),
371
371
  s: we(f, l),
372
- v: Ce(f, l)
372
+ v: Se(f, l)
373
373
  }));
374
374
  r.push(c);
375
375
  }
376
- return t.theme === "dark" ? dr.map(function(s) {
377
- var S = s.index, g = s.opacity, T = W(pr($(t.backgroundColor || "#141414"), $(r[S]), g * 100));
378
- return T;
376
+ return t.theme === "dark" ? pr.map(function(s) {
377
+ var k = s.index, m = s.opacity, A = G(br(R(t.backgroundColor || "#141414"), R(r[k]), m * 100));
378
+ return A;
379
379
  }) : r;
380
380
  }
381
- var ee = {
381
+ var re = {
382
382
  red: "#F5222D",
383
383
  volcano: "#FA541C",
384
384
  orange: "#FA8C16",
@@ -392,25 +392,25 @@ var ee = {
392
392
  purple: "#722ED1",
393
393
  magenta: "#EB2F96",
394
394
  grey: "#666666"
395
- }, re = {}, te = {};
396
- Object.keys(ee).forEach(function(e) {
397
- re[e] = ae(ee[e]), re[e].primary = re[e][5], te[e] = ae(ee[e], {
395
+ }, te = {}, ne = {};
396
+ Object.keys(re).forEach(function(e) {
397
+ te[e] = oe(re[e]), te[e].primary = te[e][5], ne[e] = oe(re[e], {
398
398
  theme: "dark",
399
399
  backgroundColor: "#141414"
400
- }), te[e].primary = te[e][5];
400
+ }), ne[e].primary = ne[e][5];
401
401
  });
402
- var Se = [], R = [], br = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
403
- function yr() {
402
+ var ke = [], $ = [], yr = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
403
+ function gr() {
404
404
  var e = document.createElement("style");
405
405
  return e.setAttribute("type", "text/css"), e;
406
406
  }
407
- function gr(e, t) {
407
+ function mr(e, t) {
408
408
  if (t = t || {}, e === void 0)
409
- throw new Error(br);
410
- var r = t.prepend === !0 ? "prepend" : "append", n = t.container !== void 0 ? t.container : document.querySelector("head"), a = Se.indexOf(n);
411
- a === -1 && (a = Se.push(n) - 1, R[a] = {});
409
+ throw new Error(yr);
410
+ var r = t.prepend === !0 ? "prepend" : "append", n = t.container !== void 0 ? t.container : document.querySelector("head"), a = ke.indexOf(n);
411
+ a === -1 && (a = ke.push(n) - 1, $[a] = {});
412
412
  var o;
413
- return R[a] !== void 0 && R[a][r] !== void 0 ? o = R[a][r] : (o = R[a][r] = yr(), r === "prepend" ? n.insertBefore(o, n.childNodes[0]) : n.appendChild(o)), e.charCodeAt(0) === 65279 && (e = e.substr(1, e.length)), o.styleSheet ? o.styleSheet.cssText += e : o.textContent += e, o;
413
+ return $[a] !== void 0 && $[a][r] !== void 0 ? o = $[a][r] : (o = $[a][r] = gr(), r === "prepend" ? n.insertBefore(o, n.childNodes[0]) : n.appendChild(o)), e.charCodeAt(0) === 65279 && (e = e.substr(1, e.length)), o.styleSheet ? o.styleSheet.cssText += e : o.textContent += e, o;
414
414
  }
415
415
  function xe(e) {
416
416
  for (var t = 1; t < arguments.length; t++) {
@@ -418,19 +418,19 @@ function xe(e) {
418
418
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
419
419
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
420
420
  })), n.forEach(function(a) {
421
- mr(e, a, r[a]);
421
+ hr(e, a, r[a]);
422
422
  });
423
423
  }
424
424
  return e;
425
425
  }
426
- function mr(e, t, r) {
426
+ function hr(e, t, r) {
427
427
  return t = vr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
428
428
  }
429
429
  function vr(e) {
430
- var t = hr(e, "string");
430
+ var t = Cr(e, "string");
431
431
  return typeof t == "symbol" ? t : String(t);
432
432
  }
433
- function hr(e, t) {
433
+ function Cr(e, t) {
434
434
  if (typeof e != "object" || e === null) return e;
435
435
  var r = e[Symbol.toPrimitive];
436
436
  if (r !== void 0) {
@@ -443,30 +443,30 @@ function hr(e, t) {
443
443
  function wr(e, t) {
444
444
  process.env.NODE_ENV !== "production" && !e && console !== void 0 && console.error("Warning: ".concat(t));
445
445
  }
446
- function Cr(e, t) {
446
+ function Sr(e, t) {
447
447
  wr(e, "[@nancal-icon/icons-vue] ".concat(t));
448
448
  }
449
449
  function Oe(e) {
450
450
  return typeof e == "object" && typeof e.name == "string" && typeof e.theme == "string" && (typeof e.icon == "object" || typeof e.icon == "function");
451
451
  }
452
- function oe(e, t, r) {
453
- return r ? k(e.tag, xe({
452
+ function ie(e, t, r) {
453
+ return r ? T(e.tag, xe({
454
454
  key: t
455
455
  }, r, e.attrs), (e.children || []).map(function(n, a) {
456
- return oe(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
457
- })) : k(e.tag, xe({
456
+ return ie(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
457
+ })) : T(e.tag, xe({
458
458
  key: t
459
459
  }, e.attrs), (e.children || []).map(function(n, a) {
460
- return oe(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
460
+ return ie(n, "".concat(t, "-").concat(e.tag, "-").concat(a));
461
461
  }));
462
462
  }
463
- function Ie(e) {
464
- return ae(e)[0];
463
+ function Fe(e) {
464
+ return oe(e)[0];
465
465
  }
466
466
  function Me(e) {
467
467
  return e ? Array.isArray(e) ? e : [e] : [];
468
468
  }
469
- var Sr = `
469
+ var kr = `
470
470
  .anticon {
471
471
  display: inline-block;
472
472
  color: #8091B7;
@@ -520,17 +520,17 @@ var Sr = `
520
520
  transform: rotate(360deg);
521
521
  }
522
522
  }
523
- `, ke = !1, xr = function() {
524
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Sr;
525
- Be(function() {
526
- ke || (typeof window < "u" && window.document && window.document.documentElement && gr(t, {
523
+ `, Te = !1, xr = function() {
524
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : kr;
525
+ ze(function() {
526
+ Te || (typeof window < "u" && window.document && window.document.documentElement && mr(t, {
527
527
  prepend: !0
528
- }), ke = !0);
528
+ }), Te = !0);
529
529
  });
530
530
  }, Or = ["icon", "primaryColor", "secondaryColor"];
531
- function kr(e, t) {
531
+ function Tr(e, t) {
532
532
  if (e == null) return {};
533
- var r = Tr(e, t), n, a;
533
+ var r = Ar(e, t), n, a;
534
534
  if (Object.getOwnPropertySymbols) {
535
535
  var o = Object.getOwnPropertySymbols(e);
536
536
  for (a = 0; a < o.length; a++)
@@ -538,32 +538,32 @@ function kr(e, t) {
538
538
  }
539
539
  return r;
540
540
  }
541
- function Tr(e, t) {
541
+ function Ar(e, t) {
542
542
  if (e == null) return {};
543
543
  var r = {}, n = Object.keys(e), a, o;
544
544
  for (o = 0; o < n.length; o++)
545
545
  a = n[o], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
546
546
  return r;
547
547
  }
548
- function G(e) {
548
+ function q(e) {
549
549
  for (var t = 1; t < arguments.length; t++) {
550
550
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
551
551
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
552
552
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
553
553
  })), n.forEach(function(a) {
554
- Ar(e, a, r[a]);
554
+ jr(e, a, r[a]);
555
555
  });
556
556
  }
557
557
  return e;
558
558
  }
559
- function Ar(e, t, r) {
560
- return t = jr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
559
+ function jr(e, t, r) {
560
+ return t = Pr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
561
561
  }
562
- function jr(e) {
563
- var t = Pr(e, "string");
562
+ function Pr(e) {
563
+ var t = Nr(e, "string");
564
564
  return typeof t == "symbol" ? t : String(t);
565
565
  }
566
- function Pr(e, t) {
566
+ function Nr(e, t) {
567
567
  if (typeof e != "object" || e === null) return e;
568
568
  var r = e[Symbol.toPrimitive];
569
569
  if (r !== void 0) {
@@ -573,29 +573,29 @@ function Pr(e, t) {
573
573
  }
574
574
  return (t === "string" ? String : Number)(e);
575
575
  }
576
- var N = {
576
+ var _ = {
577
577
  primaryColor: "#333",
578
578
  secondaryColor: "#E6E6E6",
579
579
  calculated: !1
580
580
  };
581
- function Er(e) {
581
+ function Ir(e) {
582
582
  var t = e.primaryColor, r = e.secondaryColor;
583
- N.primaryColor = t, N.secondaryColor = r || Ie(t), N.calculated = !!r;
583
+ _.primaryColor = t, _.secondaryColor = r || Fe(t), _.calculated = !!r;
584
584
  }
585
- function Fr() {
586
- return G({}, N);
585
+ function Er() {
586
+ return q({}, _);
587
587
  }
588
- var E = function(t, r) {
589
- var n = G({}, t, r.attrs), a = n.icon, o = n.primaryColor, i = n.secondaryColor, l = kr(n, Or), f = N;
588
+ var I = function(t, r) {
589
+ var n = q({}, t, r.attrs), a = n.icon, o = n.primaryColor, i = n.secondaryColor, l = Tr(n, Or), f = _;
590
590
  if (o && (f = {
591
591
  primaryColor: o,
592
- secondaryColor: i || Ie(o)
593
- }), xr(), Cr(Oe(a), "icon should be icon definiton, but got ".concat(a)), !Oe(a))
592
+ secondaryColor: i || Fe(o)
593
+ }), xr(), Sr(Oe(a), "icon should be icon definiton, but got ".concat(a)), !Oe(a))
594
594
  return null;
595
595
  var c = a;
596
- return c && typeof c.icon == "function" && (c = G({}, c, {
596
+ return c && typeof c.icon == "function" && (c = q({}, c, {
597
597
  icon: c.icon(f.primaryColor, f.secondaryColor)
598
- })), oe(c.icon, "svg-".concat(c.name), G({}, l, {
598
+ })), ie(c.icon, "svg-".concat(c.name), q({}, l, {
599
599
  "data-icon": c.name,
600
600
  width: "1em",
601
601
  height: "1em",
@@ -603,37 +603,37 @@ var E = function(t, r) {
603
603
  "aria-hidden": "true"
604
604
  }));
605
605
  };
606
- E.props = {
606
+ I.props = {
607
607
  icon: Object,
608
608
  primaryColor: String,
609
609
  secondaryColor: String,
610
610
  focusable: String
611
611
  };
612
- E.inheritAttrs = !1;
613
- E.displayName = "IconBase";
614
- E.getTwoToneColors = Fr;
615
- E.setTwoToneColors = Er;
616
- function Ir(e, t) {
617
- return Nr(e) || Rr(e, t) || $r(e, t) || Mr();
612
+ I.inheritAttrs = !1;
613
+ I.displayName = "IconBase";
614
+ I.getTwoToneColors = Er;
615
+ I.setTwoToneColors = Ir;
616
+ function Fr(e, t) {
617
+ return _r(e) || $r(e, t) || Rr(e, t) || Mr();
618
618
  }
619
619
  function Mr() {
620
620
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
621
621
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
622
622
  }
623
- function $r(e, t) {
623
+ function Rr(e, t) {
624
624
  if (e) {
625
- if (typeof e == "string") return Te(e, t);
625
+ if (typeof e == "string") return Ae(e, t);
626
626
  var r = Object.prototype.toString.call(e).slice(8, -1);
627
627
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
628
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Te(e, t);
628
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Ae(e, t);
629
629
  }
630
630
  }
631
- function Te(e, t) {
631
+ function Ae(e, t) {
632
632
  (t == null || t > e.length) && (t = e.length);
633
633
  for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
634
634
  return n;
635
635
  }
636
- function Rr(e, t) {
636
+ function $r(e, t) {
637
637
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
638
638
  if (r != null) {
639
639
  var n, a, o, i, l = [], f = !0, c = !1;
@@ -651,42 +651,42 @@ function Rr(e, t) {
651
651
  return l;
652
652
  }
653
653
  }
654
- function Nr(e) {
654
+ function _r(e) {
655
655
  if (Array.isArray(e)) return e;
656
656
  }
657
- function $e(e) {
658
- var t = Me(e), r = Ir(t, 2), n = r[0], a = r[1];
659
- return E.setTwoToneColors({
657
+ function Re(e) {
658
+ var t = Me(e), r = Fr(t, 2), n = r[0], a = r[1];
659
+ return I.setTwoToneColors({
660
660
  primaryColor: n,
661
661
  secondaryColor: a
662
662
  });
663
663
  }
664
- function _r() {
665
- var e = E.getTwoToneColors();
664
+ function Dr() {
665
+ var e = I.getTwoToneColors();
666
666
  return e.calculated ? [e.primaryColor, e.secondaryColor] : e.primaryColor;
667
667
  }
668
668
  var Lr = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
669
- function Dr(e, t) {
670
- return Ur(e) || zr(e, t) || Br(e, t) || Hr();
669
+ function Hr(e, t) {
670
+ return Wr(e) || Ur(e, t) || zr(e, t) || Br();
671
671
  }
672
- function Hr() {
672
+ function Br() {
673
673
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
674
674
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
675
675
  }
676
- function Br(e, t) {
676
+ function zr(e, t) {
677
677
  if (e) {
678
- if (typeof e == "string") return Ae(e, t);
678
+ if (typeof e == "string") return je(e, t);
679
679
  var r = Object.prototype.toString.call(e).slice(8, -1);
680
680
  if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
681
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Ae(e, t);
681
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return je(e, t);
682
682
  }
683
683
  }
684
- function Ae(e, t) {
684
+ function je(e, t) {
685
685
  (t == null || t > e.length) && (t = e.length);
686
686
  for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
687
687
  return n;
688
688
  }
689
- function zr(e, t) {
689
+ function Ur(e, t) {
690
690
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
691
691
  if (r != null) {
692
692
  var n, a, o, i, l = [], f = !0, c = !1;
@@ -704,28 +704,28 @@ function zr(e, t) {
704
704
  return l;
705
705
  }
706
706
  }
707
- function Ur(e) {
707
+ function Wr(e) {
708
708
  if (Array.isArray(e)) return e;
709
709
  }
710
- function je(e) {
710
+ function Pe(e) {
711
711
  for (var t = 1; t < arguments.length; t++) {
712
712
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
713
713
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
714
714
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
715
715
  })), n.forEach(function(a) {
716
- ie(e, a, r[a]);
716
+ le(e, a, r[a]);
717
717
  });
718
718
  }
719
719
  return e;
720
720
  }
721
- function ie(e, t, r) {
722
- return t = Wr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
721
+ function le(e, t, r) {
722
+ return t = Gr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
723
723
  }
724
- function Wr(e) {
725
- var t = Gr(e, "string");
724
+ function Gr(e) {
725
+ var t = qr(e, "string");
726
726
  return typeof t == "symbol" ? t : String(t);
727
727
  }
728
- function Gr(e, t) {
728
+ function qr(e, t) {
729
729
  if (typeof e != "object" || e === null) return e;
730
730
  var r = e[Symbol.toPrimitive];
731
731
  if (r !== void 0) {
@@ -735,9 +735,9 @@ function Gr(e, t) {
735
735
  }
736
736
  return (t === "string" ? String : Number)(e);
737
737
  }
738
- function qr(e, t) {
738
+ function Kr(e, t) {
739
739
  if (e == null) return {};
740
- var r = Kr(e, t), n, a;
740
+ var r = Vr(e, t), n, a;
741
741
  if (Object.getOwnPropertySymbols) {
742
742
  var o = Object.getOwnPropertySymbols(e);
743
743
  for (a = 0; a < o.length; a++)
@@ -745,67 +745,67 @@ function qr(e, t) {
745
745
  }
746
746
  return r;
747
747
  }
748
- function Kr(e, t) {
748
+ function Vr(e, t) {
749
749
  if (e == null) return {};
750
750
  var r = {}, n = Object.keys(e), a, o;
751
751
  for (o = 0; o < n.length; o++)
752
752
  a = n[o], !(t.indexOf(a) >= 0) && (r[a] = e[a]);
753
753
  return r;
754
754
  }
755
- $e("#1890ff");
756
- var I = function(t, r) {
757
- var n, a = je({}, t, r.attrs), o = a.class, i = a.icon, l = a.spin, f = a.rotate, c = a.tabindex, s = a.twoToneColor, S = a.onClick, g = qr(a, Lr), T = (n = {
755
+ Re("#1890ff");
756
+ var F = function(t, r) {
757
+ var n, a = Pe({}, t, r.attrs), o = a.class, i = a.icon, l = a.spin, f = a.rotate, c = a.tabindex, s = a.twoToneColor, k = a.onClick, m = Kr(a, Lr), A = (n = {
758
758
  anticon: !0
759
- }, ie(n, "anticon-".concat(i.name), !!i.name), ie(n, o, o), n), p = l === "" || l || i.name === "loading" ? "anticon-spin" : "", b = c;
760
- b === void 0 && S && (b = -1, g.tabindex = b);
759
+ }, le(n, "anticon-".concat(i.name), !!i.name), le(n, o, o), n), p = l === "" || l || i.name === "loading" ? "anticon-spin" : "", b = c;
760
+ b === void 0 && k && (b = -1, m.tabindex = b);
761
761
  var u = f ? {
762
762
  msTransform: "rotate(".concat(f, "deg)"),
763
763
  transform: "rotate(".concat(f, "deg)")
764
- } : void 0, y = Me(s), m = Dr(y, 2), v = m[0], A = m[1];
765
- return ne("span", je({
764
+ } : void 0, y = Me(s), h = Hr(y, 2), v = h[0], j = h[1];
765
+ return ae("span", Pe({
766
766
  role: "img",
767
767
  "aria-label": i.name
768
- }, g, {
769
- onClick: S,
770
- class: T
771
- }), [ne(E, {
768
+ }, m, {
769
+ onClick: k,
770
+ class: A
771
+ }), [ae(I, {
772
772
  class: p,
773
773
  icon: i,
774
774
  primaryColor: v,
775
- secondaryColor: A,
775
+ secondaryColor: j,
776
776
  style: u
777
777
  }, null)]);
778
778
  };
779
- I.props = {
779
+ F.props = {
780
780
  spin: Boolean,
781
781
  rotate: Number,
782
782
  icon: Object,
783
783
  twoToneColor: String
784
784
  };
785
- I.displayName = "AntdIcon";
786
- I.inheritAttrs = !1;
787
- I.getTwoToneColor = _r;
788
- I.setTwoToneColor = $e;
789
- var Vr = { icon: { tag: "svg", attrs: { viewBox: "32 32 960 960", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M384 32a96 96 0 00-96 96v96a32 32 0 0064 0v-96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32h-96a32 32 0 000 64h96a96 96 0 0096-96V128a96 96 0 00-96-96H384z" } }, { tag: "path", attrs: { d: "M128 288a96 96 0 00-96 96v512a96 96 0 0096 96h512a96 96 0 0096-96V384a96 96 0 00-96-96H128zm-32 96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32H128a32 32 0 01-32-32V384z" } }] }, name: "copy", theme: "outlined" };
790
- function Pe(e) {
785
+ F.displayName = "AntdIcon";
786
+ F.inheritAttrs = !1;
787
+ F.getTwoToneColor = Dr;
788
+ F.setTwoToneColor = Re;
789
+ var Yr = { icon: { tag: "svg", attrs: { viewBox: "32 32 960 960", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M384 32a96 96 0 00-96 96v96a32 32 0 0064 0v-96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32h-96a32 32 0 000 64h96a96 96 0 0096-96V128a96 96 0 00-96-96H384z" } }, { tag: "path", attrs: { d: "M128 288a96 96 0 00-96 96v512a96 96 0 0096 96h512a96 96 0 0096-96V384a96 96 0 00-96-96H128zm-32 96a32 32 0 0132-32h512a32 32 0 0132 32v512a32 32 0 01-32 32H128a32 32 0 01-32-32V384z" } }] }, name: "copy", theme: "outlined" };
790
+ function Ne(e) {
791
791
  for (var t = 1; t < arguments.length; t++) {
792
792
  var r = arguments[t] != null ? Object(arguments[t]) : {}, n = Object.keys(r);
793
793
  typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(r).filter(function(a) {
794
794
  return Object.getOwnPropertyDescriptor(r, a).enumerable;
795
795
  })), n.forEach(function(a) {
796
- Yr(e, a, r[a]);
796
+ Jr(e, a, r[a]);
797
797
  });
798
798
  }
799
799
  return e;
800
800
  }
801
- function Yr(e, t, r) {
802
- return t = Jr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
801
+ function Jr(e, t, r) {
802
+ return t = Zr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
803
803
  }
804
- function Jr(e) {
805
- var t = Zr(e, "string");
804
+ function Zr(e) {
805
+ var t = Qr(e, "string");
806
806
  return typeof t == "symbol" ? t : String(t);
807
807
  }
808
- function Zr(e, t) {
808
+ function Qr(e, t) {
809
809
  if (typeof e != "object" || e === null) return e;
810
810
  var r = e[Symbol.toPrimitive];
811
811
  if (r !== void 0) {
@@ -815,31 +815,31 @@ function Zr(e, t) {
815
815
  }
816
816
  return (t === "string" ? String : Number)(e);
817
817
  }
818
- var le = function(t, r) {
819
- var n = Pe({}, t, r.attrs);
820
- return ne(I, Pe({}, n, {
821
- icon: Vr
818
+ var fe = function(t, r) {
819
+ var n = Ne({}, t, r.attrs);
820
+ return ae(F, Ne({}, n, {
821
+ icon: Yr
822
822
  }), null);
823
823
  };
824
- le.displayName = "CopyOutlined";
825
- le.inheritAttrs = !1;
826
- function _(e) {
824
+ fe.displayName = "CopyOutlined";
825
+ fe.inheritAttrs = !1;
826
+ function D(e) {
827
827
  if (e == null) return "";
828
828
  if (typeof e == "string") return e;
829
- if (Array.isArray(e)) return e.map(_).join("");
829
+ if (Array.isArray(e)) return e.map(D).join("");
830
830
  if (typeof e == "object") {
831
831
  if (typeof e.children == "string")
832
832
  return e.children;
833
833
  if (e?.default && typeof e.default == "function") {
834
834
  const t = e.default();
835
835
  if (Array.isArray(t))
836
- return _(t);
836
+ return D(t);
837
837
  }
838
- e.children && _(e.children);
838
+ e.children && D(e.children);
839
839
  }
840
840
  return "";
841
841
  }
842
- function Re(e, t = {}) {
842
+ function $e(e, t = {}) {
843
843
  const r = /* @__PURE__ */ new Map(), { value: n = "value", label: a = "label" } = t;
844
844
  if (!e) return r;
845
845
  const o = Array.isArray(e) ? e : [e];
@@ -850,18 +850,18 @@ function Re(e, t = {}) {
850
850
  if (typeof i.type == "function" ? l = i.type.displayName?.toLowerCase() || "" : typeof i.type == "string" && (l = i.type?.toLowerCase() || ""), /option|radio|checkbox/i.test(l)) {
851
851
  const f = i.props || {}, c = f[n] ?? f.value, s = f[a] ?? f.label;
852
852
  if (c != null) {
853
- const S = _(i.children) || s || String(c);
854
- r.set(c, S);
853
+ const k = D(i.children) || s || String(c);
854
+ r.set(c, k);
855
855
  }
856
856
  }
857
857
  }
858
- i.children && Re(i.children, t).forEach((f, c) => {
858
+ i.children && $e(i.children, t).forEach((f, c) => {
859
859
  r.has(c) || r.set(c, f);
860
860
  });
861
861
  }
862
862
  return r;
863
863
  }
864
- function Qr(e, t, r) {
864
+ function Xr(e, t, r) {
865
865
  const { value: n = "value", label: a = "label", children: o = "children" } = r, i = [];
866
866
  let l = e;
867
867
  for (const f of t) {
@@ -875,7 +875,7 @@ function Qr(e, t, r) {
875
875
  }
876
876
  return i;
877
877
  }
878
- function Xr(e, t, r) {
878
+ function et(e, t, r) {
879
879
  const { value: n = "value", label: a = "title", children: o = "children" } = r, i = [], l = new Set(Array.isArray(t) ? t : [t]);
880
880
  function f(c) {
881
881
  for (const s of c)
@@ -883,7 +883,7 @@ function Xr(e, t, r) {
883
883
  }
884
884
  return f(e), i;
885
885
  }
886
- function et({
886
+ function rt({
887
887
  modelValue: e,
888
888
  options: t,
889
889
  treeData: r,
@@ -895,9 +895,9 @@ function et({
895
895
  isCheckboxGroup: f,
896
896
  isCheckbox: c,
897
897
  isRadio: s,
898
- isCascader: S,
899
- isTreeSelect: g,
900
- isSwitch: T,
898
+ isCascader: k,
899
+ isTreeSelect: m,
900
+ isSwitch: A,
901
901
  attrs: p,
902
902
  emptyText: b
903
903
  }) {
@@ -907,69 +907,69 @@ function et({
907
907
  } catch (u) {
908
908
  console.warn("[ReadonlyHOC] valueToLabel error", u);
909
909
  }
910
- if (T) {
910
+ if (A) {
911
911
  const u = p.checkedValue ?? p["checked-value"] ?? !0, y = p.uncheckedValue ?? p["un-checked-value"] ?? !1;
912
912
  return e === u ? p.checkedChildren ?? p["checked-children"] ?? "开启" : e === y ? p.uncheckedChildren ?? p["un-checked-children"] ?? "关闭" : String(e || b);
913
913
  }
914
- if (S && Array.isArray(e) && t?.length)
915
- return Qr(t, e, a).join(" / ") || b;
916
- if (g && r?.length)
917
- return Xr(r, e, a).join(", ") || b;
914
+ if (k && Array.isArray(e) && t?.length)
915
+ return Xr(t, e, a).join(" / ") || b;
916
+ if (m && r?.length)
917
+ return et(r, e, a).join(", ") || b;
918
918
  if (t?.length) {
919
- const u = a.value || "value", y = a.label || "label", m = (v) => {
920
- const A = t.find((q) => q[u] === v);
921
- return A ? A[y] || A[u] : v == null ? "" : String(v);
919
+ const u = a.value || "value", y = a.label || "label", h = (v) => {
920
+ const j = t.find((K) => K[u] === v);
921
+ return j ? j[y] || j[u] : v == null ? "" : String(v);
922
922
  };
923
- return Array.isArray(e) ? e.map(m).join(", ") || b : m(e) || b;
923
+ return Array.isArray(e) ? e.map(h).join(", ") || b : h(e) || b;
924
924
  } else if ((i || l || f) && o?.default)
925
925
  try {
926
- const u = o.default(), y = Re(u, a);
926
+ const u = o.default(), y = $e(u, a);
927
927
  if (y.size > 0) {
928
- const m = (v) => v == null ? "" : y.get(v) || String(v);
929
- return Array.isArray(e) ? e.map(m).join(", ") || b : m(e) || b;
928
+ const h = (v) => v == null ? "" : y.get(v) || String(v);
929
+ return Array.isArray(e) ? e.map(h).join(", ") || b : h(e) || b;
930
930
  }
931
931
  } catch (u) {
932
932
  console.warn("[ReadonlyHOC] Failed to parse slot options", u);
933
933
  }
934
934
  else if (o?.default && (c || s) && typeof e == "boolean")
935
935
  try {
936
- const u = o.default(), y = _(u);
936
+ const u = o.default(), y = D(u);
937
937
  if (y) return y;
938
938
  } catch {
939
939
  }
940
940
  return e == null || e === "" ? b : Array.isArray(e) ? e.join(", ") : String(e);
941
941
  }
942
- function rt(e) {
942
+ function tt(e) {
943
943
  if (typeof e == "function")
944
944
  return e;
945
- const t = e.name || "", r = t.toLowerCase(), n = /select/i.test(r) && !/tree|cascader/i.test(r), a = /radio/i.test(r) && !/group/i.test(r), o = /radio.*group/i.test(r), i = /checkbox/i.test(r) && !/group/i.test(r), l = /checkbox.*group/i.test(r), f = /switch/i.test(r), c = /cascader/i.test(r), s = /tree.*select/i.test(r), g = i || f || a ? "checked" : "value", T = `update:${g}`, p = /form$/i.test(r), b = /form.*item/i.test(r);
946
- return ze({
945
+ const t = e.name || "", r = t.toLowerCase(), n = /select/i.test(r) && !/tree|cascader/i.test(r), a = /radio/i.test(r) && !/group/i.test(r), o = /radio.*group/i.test(r), i = /checkbox/i.test(r) && !/group/i.test(r), l = /checkbox.*group/i.test(r), f = /switch/i.test(r), c = /cascader/i.test(r), s = /tree.*select/i.test(r), m = i || f || a ? "checked" : "value", A = `update:${m}`, p = /form$/i.test(r), b = /form.*item/i.test(r);
946
+ return Ue({
947
947
  name: t,
948
948
  inheritAttrs: !1,
949
949
  props: {
950
950
  modelValue: { type: [String, Number, Boolean, Array, Object], default: void 0 },
951
- [g]: { type: [String, Number, Boolean, Array, Object], default: void 0 },
951
+ [m]: { type: [String, Number, Boolean, Array, Object], default: void 0 },
952
952
  readonly: { type: Boolean, default: void 0 },
953
953
  emptyText: { type: String, default: "--" },
954
954
  valueToLabel: { type: Function, default: null },
955
955
  copyable: { type: Boolean, default: void 0 }
956
956
  },
957
- emits: ["update:modelValue", T],
958
- setup(u, { emit: y, slots: m, expose: v }) {
959
- const A = ce("nkReadonly", H(!1)), q = ce("copyable", H(!0)), j = M(() => u.readonly ?? A.value), K = M(() => u.readonly ?? A.value), V = M(() => u.copyable ?? q.value ?? !0), L = H(!1);
960
- p && (ue("nkReadonly", K), ue("copyable", V));
961
- const fe = M(() => u[g] !== void 0 ? u[g] : u.modelValue), Ne = (d) => {
962
- y("update:modelValue", d), y(T, d);
963
- }, w = Ue(), D = M(() => {
964
- if (!j.value) return "";
965
- const d = w.fieldNames ?? w["field-names"] ?? {}, Y = w.options, He = w.treeData ?? w["tree-data"];
966
- return et({
967
- modelValue: fe.value,
968
- options: Y,
969
- treeData: He,
957
+ emits: ["update:modelValue", A],
958
+ setup(u, { emit: y, slots: h, expose: v }) {
959
+ const j = ue("nkReadonly", B(!1)), K = ue("copyable", B(!0)), P = M(() => u.readonly ?? j.value), V = M(() => u.readonly ?? j.value), Y = M(() => u.copyable ?? K.value ?? !0), L = B(!1);
960
+ p && (se("nkReadonly", V), se("copyable", Y));
961
+ const ce = M(() => u[m] !== void 0 ? u[m] : u.modelValue), _e = (d) => {
962
+ y("update:modelValue", d), y(A, d);
963
+ }, w = We(), H = M(() => {
964
+ if (!P.value) return "";
965
+ const d = w.fieldNames ?? w["field-names"] ?? {}, J = w.options, Be = w.treeData ?? w["tree-data"];
966
+ return rt({
967
+ modelValue: ce.value,
968
+ options: J,
969
+ treeData: Be,
970
970
  valueToLabel: u.valueToLabel,
971
971
  fieldNames: d,
972
- slots: m,
972
+ slots: h,
973
973
  isSelect: n,
974
974
  isRadioGroup: o,
975
975
  isCheckboxGroup: l,
@@ -981,7 +981,7 @@ function rt(e) {
981
981
  attrs: w,
982
982
  emptyText: u.emptyText
983
983
  });
984
- }), _e = {
984
+ }), De = {
985
985
  lineHeight: "32px",
986
986
  padding: "0 6px",
987
987
  display: "inline-block",
@@ -994,49 +994,49 @@ function rt(e) {
994
994
  border: "none",
995
995
  backgroundColor: "none",
996
996
  whiteSpace: "pre-wrap"
997
- }, F = H();
997
+ }, E = B();
998
998
  p && v({
999
- validate: () => j.value ? Promise.resolve({}) : F.value?.validate?.(),
1000
- validateFields: (d) => j.value ? Promise.resolve({}) : F.value?.validateFields?.(d),
1001
- resetFields: (d) => !j.value && F.value?.resetFields?.(d),
1002
- clearValidate: (d) => !j.value && F.value?.clearValidate?.(d),
1003
- scrollToField: (d) => !j.value && F.value?.scrollToField?.(d)
999
+ validate: () => P.value ? Promise.resolve({}) : E.value?.validate?.(),
1000
+ validateFields: (d) => P.value ? Promise.resolve({}) : E.value?.validateFields?.(d),
1001
+ resetFields: (d) => !P.value && E.value?.resetFields?.(d),
1002
+ clearValidate: (d) => !P.value && E.value?.clearValidate?.(d),
1003
+ scrollToField: (d) => !P.value && E.value?.scrollToField?.(d)
1004
1004
  });
1005
1005
  const Le = () => {
1006
1006
  L.value = !0;
1007
- }, De = () => {
1007
+ }, He = () => {
1008
1008
  L.value = !1;
1009
1009
  };
1010
- return () => b ? k(
1010
+ return () => b ? T(
1011
1011
  e,
1012
1012
  {
1013
1013
  ...w,
1014
- style: { ...w.style || {}, marginBottom: j.value ? "10px" : void 0 }
1014
+ style: { ...w.style || {}, marginBottom: P.value ? "10px" : void 0 }
1015
1015
  },
1016
- m
1017
- ) : p ? k(
1016
+ h
1017
+ ) : p ? T(
1018
1018
  e,
1019
1019
  {
1020
1020
  ...w,
1021
- rules: K.value ? null : w.rules,
1022
- disabled: K.value ? !0 : w.disabled,
1023
- ref: F
1021
+ rules: V.value ? null : w.rules,
1022
+ disabled: V.value ? !0 : w.disabled,
1023
+ ref: E
1024
1024
  },
1025
- m
1026
- ) : j.value ? k(
1025
+ h
1026
+ ) : P.value ? T(
1027
1027
  "span",
1028
1028
  {
1029
1029
  onMouseenter: Le,
1030
- onMouseleave: De,
1030
+ onMouseleave: He,
1031
1031
  class: "nk-readonly-wrapper",
1032
1032
  style: {
1033
- ..._e,
1034
- color: V.value && L.value ? "#6e9eff" : "rgba(0, 0, 0, 0.65)"
1033
+ ...De,
1034
+ color: Y.value && L.value ? "#6e9eff" : "rgba(0, 0, 0, 0.65)"
1035
1035
  }
1036
1036
  },
1037
1037
  [
1038
- k("span", { style: { marginRight: "8px" } }, D.value),
1039
- V.value && D.value !== u.emptyText ? k(
1038
+ T("span", { style: { marginRight: "8px" } }, H.value),
1039
+ Y.value && H.value !== u.emptyText ? T(
1040
1040
  "span",
1041
1041
  {
1042
1042
  class: "copy-icon",
@@ -1046,23 +1046,23 @@ function rt(e) {
1046
1046
  }
1047
1047
  },
1048
1048
  [
1049
- k(
1050
- le,
1049
+ T(
1050
+ fe,
1051
1051
  {
1052
1052
  onClick: async () => {
1053
1053
  try {
1054
1054
  if (window.__POWERED_BY_WUJIE__) {
1055
- if (await window.gvUtil?.clipboard(null, D.value) === !1) {
1056
- B.error("您的浏览器不支持自动复制,请手动复制");
1055
+ if (await window.gvUtil?.clipboard(null, H.value) === !1) {
1056
+ z.error("您的浏览器不支持自动复制,请手动复制");
1057
1057
  return;
1058
1058
  }
1059
- B.success("复制成功");
1059
+ z.success("复制成功");
1060
1060
  } else {
1061
- const d = new Blob([D.value], { type: "text/plain" }), Y = new ClipboardItem({ "text/plain": d });
1062
- await navigator.clipboard.write([Y]), B.success("复制成功");
1061
+ const d = new Blob([H.value], { type: "text/plain" }), J = new ClipboardItem({ "text/plain": d });
1062
+ await navigator.clipboard.write([J]), z.success("复制成功");
1063
1063
  }
1064
1064
  } catch {
1065
- B.error("您的浏览器不支持自动复制,请手动复制");
1065
+ z.error("您的浏览器不支持自动复制,请手动复制");
1066
1066
  }
1067
1067
  },
1068
1068
  style: {
@@ -1078,46 +1078,64 @@ function rt(e) {
1078
1078
  ]
1079
1079
  ) : null
1080
1080
  ]
1081
- ) : k(
1081
+ ) : T(
1082
1082
  e,
1083
1083
  {
1084
1084
  ...w,
1085
- [g]: fe.value,
1086
- [`onUpdate:${g}`]: Ne,
1087
- ref: p ? F : void 0
1085
+ [m]: ce.value,
1086
+ [`onUpdate:${m}`]: _e,
1087
+ ref: p ? E : void 0
1088
1088
  },
1089
- m
1089
+ h
1090
1090
  );
1091
1091
  }
1092
1092
  });
1093
1093
  }
1094
- const tt = {
1095
- Input: Ze,
1096
- InputNumber: Je,
1097
- Textarea: Ye,
1098
- Select: be,
1099
- SelectOption: be.Option,
1100
- TreeSelect: Ve,
1101
- Cascader: Ke,
1102
- DatePicker: qe,
1103
- TimePicker: Ge,
1104
- Radio: pe,
1105
- Checkbox: de,
1106
- RadioGroup: pe.Group,
1107
- CheckboxGroup: de.Group,
1108
- Switch: We,
1109
- Form: se,
1110
- FormItem: se.Item
1111
- }, ot = {
1094
+ const nt = {
1095
+ Input: Qe,
1096
+ InputNumber: Ze,
1097
+ Textarea: Je,
1098
+ Select: ye,
1099
+ SelectOption: ye.Option,
1100
+ TreeSelect: Ye,
1101
+ Cascader: Ve,
1102
+ DatePicker: Ke,
1103
+ TimePicker: qe,
1104
+ Radio: be,
1105
+ Checkbox: pe,
1106
+ RadioGroup: be.Group,
1107
+ CheckboxGroup: pe.Group,
1108
+ Switch: Ge,
1109
+ Form: de,
1110
+ FormItem: de.Item
1111
+ }, g = {};
1112
+ for (const [e, t] of Object.entries(nt))
1113
+ if (t) {
1114
+ const r = tt(t);
1115
+ g[`Nk${e}`] = r;
1116
+ }
1117
+ const it = {
1112
1118
  install(e) {
1113
- for (const [t, r] of Object.entries(tt))
1119
+ for (const [t, r] of Object.entries(g))
1114
1120
  if (r) {
1115
- const n = rt(r);
1116
- e.component(`Nk${t}`, n);
1121
+ const n = r;
1122
+ e.component(t, n);
1117
1123
  }
1118
1124
  }
1119
- };
1125
+ }, lt = g.NkInput, ft = g.NkInputNumber, ct = g.NkSelect, ut = g.NkCascader, st = g.NkTreeSelect, dt = g.NkDatePicker, pt = g.NkTimePicker, bt = g.NkCheckbox, yt = g.NkRadio, gt = g.NkSwitch, mt = g.NkForm, ht = g.NkFormItem;
1120
1126
  export {
1121
- ot as default,
1122
- rt as withReadonly
1127
+ ut as NkCascader,
1128
+ bt as NkCheckbox,
1129
+ dt as NkDatePicker,
1130
+ mt as NkForm,
1131
+ ht as NkFormItem,
1132
+ lt as NkInput,
1133
+ ft as NkInputNumber,
1134
+ yt as NkRadio,
1135
+ ct as NkSelect,
1136
+ gt as NkSwitch,
1137
+ pt as NkTimePicker,
1138
+ st as NkTreeSelect,
1139
+ it as default,
1140
+ tt as withReadonly
1123
1141
  };