@xto/form 1.6.5 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/es/index.mjs +402 -394
  2. package/lib/index.cjs +1 -1
  3. package/package.json +1 -1
package/es/index.mjs CHANGED
@@ -281,24 +281,24 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
281
281
  const $ = B("");
282
282
  ie(
283
283
  [() => e.modelValue, () => e.value],
284
- ([A, F]) => {
285
- const Y = A ?? F ?? "";
284
+ ([A, I]) => {
285
+ const Y = A ?? I ?? "";
286
286
  Y !== $.value && ($.value = Y);
287
287
  },
288
288
  { immediate: !0 }
289
289
  );
290
290
  const z = (A) => {
291
291
  $.value = A, t("update:modelValue", A), t("update:value", A), t("input", A);
292
- }, I = V(() => String($.value).length), y = V(() => [
292
+ }, E = V(() => String($.value).length), y = V(() => [
293
293
  l.b(),
294
294
  e.size !== "default" ? l.m(e.size) : "",
295
295
  l.is("disabled", e.disabled),
296
296
  l.is("focus", m.value),
297
297
  l.is("has-prefix", e.prefixIcon || T.prefix),
298
298
  l.is("has-suffix", e.suffixIcon || T.suffix || e.clearable || S.value || e.showWordLimit)
299
- ]), L = (A) => {
300
- const F = A.target.value;
301
- t("change", F);
299
+ ]), R = (A) => {
300
+ const I = A.target.value;
301
+ t("change", I);
302
302
  }, H = (A) => {
303
303
  m.value = !0, t("focus", A);
304
304
  }, O = (A) => {
@@ -318,7 +318,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
318
318
  (A = c.value) == null || A.blur();
319
319
  },
320
320
  inputRef: c
321
- }), (A, F) => (i(), d("div", {
321
+ }), (A, I) => (i(), d("div", {
322
322
  class: u(y.value)
323
323
  }, [
324
324
  A.$slots.prefix || s.prefixIcon ? (i(), d("span", {
@@ -334,7 +334,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
334
334
  oe(r("input", {
335
335
  ref_key: "inputRef",
336
336
  ref: c,
337
- "onUpdate:modelValue": F[0] || (F[0] = (Y) => $.value = Y),
337
+ "onUpdate:modelValue": I[0] || (I[0] = (Y) => $.value = Y),
338
338
  type: D.value,
339
339
  placeholder: s.placeholder,
340
340
  disabled: s.disabled,
@@ -342,8 +342,8 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
342
342
  maxlength: s.maxlength,
343
343
  minlength: s.minlength,
344
344
  class: u(n(l).e("inner")),
345
- onInput: F[1] || (F[1] = (Y) => z(Y.target.value)),
346
- onChange: L,
345
+ onInput: I[1] || (I[1] = (Y) => z(Y.target.value)),
346
+ onChange: R,
347
347
  onFocus: H,
348
348
  onBlur: O
349
349
  }, null, 42, ll), [
@@ -377,7 +377,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
377
377
  s.showWordLimit && s.maxlength ? (i(), d("span", {
378
378
  key: 2,
379
379
  class: u(n(l).e("count"))
380
- }, N(I.value) + "/" + N(s.maxlength), 3)) : U("", !0)
380
+ }, N(E.value) + "/" + N(s.maxlength), 3)) : U("", !0)
381
381
  ])
382
382
  ], 2)) : U("", !0)
383
383
  ], 2));
@@ -421,7 +421,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
421
421
  function z(o) {
422
422
  return o > e.max ? e.max : o < e.min ? e.min : o;
423
423
  }
424
- const I = V(() => e.modelValue ?? e.value ?? void 0), y = V(() => b.value !== null ? b.value : I.value === void 0 || I.value === null ? "" : $(I.value)), L = V(() => e.disabled ? !0 : I.value === void 0 ? e.min !== -1 / 0 : I.value <= e.min), H = V(() => e.disabled ? !0 : I.value === void 0 ? e.max !== 1 / 0 : I.value >= e.max), O = V(() => [
424
+ const E = V(() => e.modelValue ?? e.value ?? void 0), y = V(() => b.value !== null ? b.value : E.value === void 0 || E.value === null ? "" : $(E.value)), R = V(() => e.disabled ? !0 : E.value === void 0 ? e.min !== -1 / 0 : E.value <= e.min), H = V(() => e.disabled ? !0 : E.value === void 0 ? e.max !== 1 / 0 : E.value >= e.max), O = V(() => [
425
425
  l.b(),
426
426
  e.size !== "default" ? l.m(e.size) : "",
427
427
  l.is("disabled", e.disabled),
@@ -430,12 +430,12 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
430
430
  ]);
431
431
  function M() {
432
432
  if (e.disabled || H.value) return;
433
- const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o + e.step), g = z(f);
433
+ const o = E.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o + e.step), g = z(f);
434
434
  v(g);
435
435
  }
436
436
  function h() {
437
- if (e.disabled || L.value) return;
438
- const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o - e.step), g = z(f);
437
+ if (e.disabled || R.value) return;
438
+ const o = E.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o - e.step), g = z(f);
439
439
  v(g);
440
440
  }
441
441
  function v(o) {
@@ -466,7 +466,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
466
466
  const f = o.target.value;
467
467
  b.value = f;
468
468
  }
469
- function F(o) {
469
+ function I(o) {
470
470
  if (m.value = !1, b.value !== null) {
471
471
  const f = x(b.value);
472
472
  f === void 0 ? e.valueOnClear !== null ? v(e.valueOnClear) : b.value = null : v(f);
@@ -516,8 +516,8 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
516
516
  s.controls ? (i(), d("button", {
517
517
  key: 0,
518
518
  type: "button",
519
- class: u([n(l).e("decrease"), n(l).is("disabled", L.value)]),
520
- disabled: L.value,
519
+ class: u([n(l).e("decrease"), n(l).is("disabled", R.value)]),
520
+ disabled: R.value,
521
521
  onClick: h
522
522
  }, " − ", 10, al)) : U("", !0),
523
523
  r("div", {
@@ -534,7 +534,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
534
534
  autocomplete: "off",
535
535
  onInput: A,
536
536
  onFocus: Y,
537
- onBlur: F,
537
+ onBlur: I,
538
538
  onKeydown: G
539
539
  }, null, 42, tl)
540
540
  ], 2),
@@ -591,12 +591,12 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
591
591
  ]), z = (M) => {
592
592
  const h = M.target.value;
593
593
  T(h), e.autosize && c.value && (c.value.style.height = "auto", c.value.style.height = `${c.value.scrollHeight}px`);
594
- }, I = (M) => {
594
+ }, E = (M) => {
595
595
  const h = M.target.value;
596
596
  t("change", h);
597
597
  }, y = (M) => {
598
598
  m.value = !0, t("focus", M);
599
- }, L = (M) => {
599
+ }, R = (M) => {
600
600
  m.value = !1, t("blur", M);
601
601
  };
602
602
  return k({
@@ -626,9 +626,9 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
626
626
  style: te(D.value),
627
627
  class: u(n(l).e("inner")),
628
628
  onInput: z,
629
- onChange: I,
629
+ onChange: E,
630
630
  onFocus: y,
631
- onBlur: L
631
+ onBlur: R
632
632
  }, null, 46, sl), [
633
633
  [Ve, b.value]
634
634
  ]),
@@ -701,7 +701,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
701
701
  ]), z = () => {
702
702
  S.value || (c.value ? l.changeValue(b.value) : (e("update:modelValue", b.value), e("change", b.value)));
703
703
  };
704
- return (I, y) => (i(), d("label", {
704
+ return (E, y) => (i(), d("label", {
705
705
  class: u($.value),
706
706
  onClick: ue(z, ["prevent"])
707
707
  }, [
@@ -716,11 +716,11 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
716
716
  value: b.value
717
717
  }, null, 8, ul)
718
718
  ], 2),
719
- I.$slots.default || s.label ? (i(), d("span", {
719
+ E.$slots.default || s.label ? (i(), d("span", {
720
720
  key: 0,
721
721
  class: u(n(t).e("label"))
722
722
  }, [
723
- se(I.$slots, "default", {}, () => [
723
+ se(E.$slots, "default", {}, () => [
724
724
  de(N(s.label), 1)
725
725
  ])
726
726
  ], 2)) : U("", !0)
@@ -806,8 +806,8 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
806
806
  const a = s, e = k, t = ae("checkbox"), l = xe("checkboxGroup", null), c = V(() => !!l), m = V(() => a.value ?? a.label), b = V(() => c.value ? l.modelValue.value.includes(m.value) : Array.isArray(a.modelValue) ? a.modelValue.includes(m.value) : !!a.modelValue), T = V(() => {
807
807
  if (a.disabled) return !0;
808
808
  if (c.value) {
809
- const $ = l.disabled, z = l.min > 0 && l.modelValue.value.length <= l.min, I = l.max > 0 && l.modelValue.value.length >= l.max;
810
- return b.value && z || !b.value && I ? !0 : $;
809
+ const $ = l.disabled, z = l.min > 0 && l.modelValue.value.length <= l.min, E = l.max > 0 && l.modelValue.value.length >= l.max;
810
+ return b.value && z || !b.value && E ? !0 : $;
811
811
  }
812
812
  return !1;
813
813
  }), S = V(() => [
@@ -912,7 +912,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
912
912
  for (const v of c.value)
913
913
  await v.validate() || (h = !1);
914
914
  return h;
915
- }, I = async (h) => {
915
+ }, E = async (h) => {
916
916
  const v = Array.isArray(h) ? h : [h];
917
917
  let x = !0;
918
918
  for (const A of c.value)
@@ -922,7 +922,7 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
922
922
  c.value.forEach((h) => {
923
923
  h.resetField();
924
924
  });
925
- }, L = (h) => {
925
+ }, R = (h) => {
926
926
  if (h) {
927
927
  const v = Array.isArray(h) ? h : [h];
928
928
  c.value.forEach((x) => {
@@ -950,9 +950,9 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
950
950
  emit: t
951
951
  }), k({
952
952
  validate: z,
953
- validateField: I,
953
+ validateField: E,
954
954
  resetFields: y,
955
- clearValidate: L
955
+ clearValidate: R
956
956
  }), (h, v) => (i(), d("form", {
957
957
  class: u(T.value),
958
958
  onSubmit: H,
@@ -1011,9 +1011,9 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
1011
1011
  }
1012
1012
  if (x.validator)
1013
1013
  try {
1014
- await new Promise((A, F) => {
1014
+ await new Promise((A, I) => {
1015
1015
  x.validator(x, M, (Y) => {
1016
- Y ? F(Y) : A();
1016
+ Y ? I(Y) : A();
1017
1017
  });
1018
1018
  });
1019
1019
  } catch (A) {
@@ -1023,15 +1023,15 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
1023
1023
  }
1024
1024
  return c.value = h ? "valid" : "invalid", m.value = v, l && a.prop && l.emit("validate", a.prop, h, v), h;
1025
1025
  }, z = () => {
1026
- D(void 0), I();
1027
- }, I = () => {
1026
+ D(void 0), E();
1027
+ }, E = () => {
1028
1028
  c.value = "", m.value = "";
1029
1029
  }, y = V(() => [
1030
1030
  t.b(),
1031
1031
  t.is("required", b.value),
1032
1032
  t.is("error", c.value === "invalid"),
1033
1033
  t.is("success", c.value === "valid")
1034
- ]), L = V(() => {
1034
+ ]), R = V(() => {
1035
1035
  const H = a.labelWidth ?? (l == null ? void 0 : l.labelWidth) ?? "100px";
1036
1036
  return { width: typeof H == "number" ? `${H}px` : H };
1037
1037
  });
@@ -1042,26 +1042,26 @@ const Qe = ["aria-hidden", "aria-label"], _e = ["stroke-width"], el = ["d"], ee
1042
1042
  prop: a.prop,
1043
1043
  validate: $,
1044
1044
  resetField: z,
1045
- clearValidate: I
1045
+ clearValidate: E
1046
1046
  });
1047
1047
  }), De(() => {
1048
1048
  l && a.prop && l.removeField({
1049
1049
  prop: a.prop,
1050
1050
  validate: $,
1051
1051
  resetField: z,
1052
- clearValidate: I
1052
+ clearValidate: E
1053
1053
  });
1054
1054
  }), k({
1055
1055
  validate: $,
1056
1056
  resetField: z,
1057
- clearValidate: I
1057
+ clearValidate: E
1058
1058
  }), (H, O) => (i(), d("div", {
1059
1059
  class: u(y.value)
1060
1060
  }, [
1061
1061
  s.label || n(e).label ? (i(), d("label", {
1062
1062
  key: 0,
1063
1063
  class: u(n(t).e("label")),
1064
- style: te(L.value)
1064
+ style: te(R.value)
1065
1065
  }, [
1066
1066
  se(H.$slots, "label", {}, () => [
1067
1067
  de(N(s.label), 1)
@@ -1190,9 +1190,9 @@ const bl = [
1190
1190
  if (a.selectionMode !== "range") return !1;
1191
1191
  const { startDate: v, endDate: x, selecting: A } = a.rangeState || {};
1192
1192
  if (A && v) {
1193
- const F = l.value;
1194
- if (F) {
1195
- const Y = v < F ? v : F, G = v < F ? F : v;
1193
+ const I = l.value;
1194
+ if (I) {
1195
+ const Y = v < I ? v : I, G = v < I ? I : v;
1196
1196
  return Ue(h, Y, G);
1197
1197
  }
1198
1198
  return pe(h, v);
@@ -1202,7 +1202,7 @@ const bl = [
1202
1202
  if (a.selectionMode !== "range") return !1;
1203
1203
  const { startDate: v, selecting: x } = a.rangeState || {};
1204
1204
  return x && v && l.value ? pe(h, v < l.value ? v : l.value) : v ? pe(h, v) : !1;
1205
- }, I = (h) => {
1205
+ }, E = (h) => {
1206
1206
  if (a.selectionMode !== "range") return !1;
1207
1207
  const { endDate: v, selecting: x } = a.rangeState || {};
1208
1208
  if (x && l.value) {
@@ -1210,14 +1210,14 @@ const bl = [
1210
1210
  return pe(h, A < l.value ? l.value : A);
1211
1211
  }
1212
1212
  return v ? pe(h, v) : !1;
1213
- }, y = (h) => gl(h, a.disabledDate, a.minDate, a.maxDate), L = (h) => [
1213
+ }, y = (h) => gl(h, a.disabledDate, a.minDate, a.maxDate), R = (h) => [
1214
1214
  t.e("cell"),
1215
1215
  t.is("selected", T(h)),
1216
1216
  t.is("today", S(h)),
1217
1217
  t.is("disabled", y(h)),
1218
1218
  t.is("in-range", $(h)),
1219
1219
  t.is("range-start", z(h)),
1220
- t.is("range-end", I(h)),
1220
+ t.is("range-end", E(h)),
1221
1221
  t.is("prev-month", !D(h) && h.getMonth() < m.value),
1222
1222
  t.is("next-month", !D(h) && h.getMonth() > m.value)
1223
1223
  ], H = (h) => {
@@ -1242,16 +1242,16 @@ const bl = [
1242
1242
  ]),
1243
1243
  r("tbody", null, [
1244
1244
  (i(!0), d(J, null, _(b.value, (x, A) => (i(), d("tr", { key: A }, [
1245
- (i(!0), d(J, null, _(x, (F, Y) => (i(), d("td", {
1245
+ (i(!0), d(J, null, _(x, (I, Y) => (i(), d("td", {
1246
1246
  key: Y,
1247
- class: u(L(F)),
1248
- onClick: (G) => H(F),
1249
- onMouseenter: (G) => O(F),
1247
+ class: u(R(I)),
1248
+ onClick: (G) => H(I),
1249
+ onMouseenter: (G) => O(I),
1250
1250
  onMouseleave: M
1251
1251
  }, [
1252
1252
  r("span", {
1253
1253
  class: u(n(t).e("cell-text"))
1254
- }, N(F.getDate()), 3)
1254
+ }, N(I.getDate()), 3)
1255
1255
  ], 42, kl))), 128))
1256
1256
  ]))), 128))
1257
1257
  ])
@@ -1295,11 +1295,11 @@ const bl = [
1295
1295
  cellpadding: "0"
1296
1296
  }, [
1297
1297
  r("tbody", null, [
1298
- (i(!0), d(J, null, _(S.value, (z, I) => (i(), d("tr", { key: I }, [
1298
+ (i(!0), d(J, null, _(S.value, (z, E) => (i(), d("tr", { key: E }, [
1299
1299
  (i(!0), d(J, null, _(z, (y) => (i(), d("td", {
1300
1300
  key: y,
1301
1301
  class: u(b(y)),
1302
- onClick: (L) => T(y)
1302
+ onClick: (R) => T(y)
1303
1303
  }, [
1304
1304
  r("span", {
1305
1305
  class: u(n(t).e("cell-text"))
@@ -1320,33 +1320,33 @@ const bl = [
1320
1320
  emits: ["pick"],
1321
1321
  setup(s, { emit: k }) {
1322
1322
  const a = s, e = k, t = ae("year-table"), l = V(() => (/* @__PURE__ */ new Date()).getFullYear()), c = V(() => Ke(a.viewedYear)), m = V(() => {
1323
- const [y] = c.value, L = [];
1324
- L.push(y - 1);
1323
+ const [y] = c.value, R = [];
1324
+ R.push(y - 1);
1325
1325
  for (let H = 0; H < 10; H++)
1326
- L.push(y + H);
1327
- return L.push(y + 10), L;
1326
+ R.push(y + H);
1327
+ return R.push(y + 10), R;
1328
1328
  }), b = V(() => {
1329
1329
  const y = [];
1330
- for (let L = 0; L < m.value.length; L += 3)
1331
- y.push(m.value.slice(L, L + 3));
1330
+ for (let R = 0; R < m.value.length; R += 3)
1331
+ y.push(m.value.slice(R, R + 3));
1332
1332
  return y;
1333
1333
  }), T = (y) => a.modelValue ? a.modelValue.getFullYear() === y : !1, S = (y) => y === l.value, D = (y) => {
1334
- const [L, H] = c.value;
1335
- return y >= L && y <= H;
1334
+ const [R, H] = c.value;
1335
+ return y >= R && y <= H;
1336
1336
  }, $ = (y) => {
1337
1337
  if (!a.disabledDate) return !1;
1338
- const L = new Date(y, 0, 1), H = new Date(y, 11, 31);
1339
- return a.disabledDate(L) && a.disabledDate(H);
1338
+ const R = new Date(y, 0, 1), H = new Date(y, 11, 31);
1339
+ return a.disabledDate(R) && a.disabledDate(H);
1340
1340
  }, z = (y) => [
1341
1341
  t.e("cell"),
1342
1342
  t.is("selected", T(y)),
1343
1343
  t.is("current", S(y)),
1344
1344
  t.is("disabled", $(y)),
1345
1345
  t.is("in-decade", D(y))
1346
- ], I = (y) => {
1346
+ ], E = (y) => {
1347
1347
  $(y) || e("pick", y);
1348
1348
  };
1349
- return (y, L) => (i(), d("table", {
1349
+ return (y, R) => (i(), d("table", {
1350
1350
  class: u(n(t).b()),
1351
1351
  cellspacing: "0",
1352
1352
  cellpadding: "0"
@@ -1356,7 +1356,7 @@ const bl = [
1356
1356
  (i(!0), d(J, null, _(H, (M) => (i(), d("td", {
1357
1357
  key: M,
1358
1358
  class: u(z(M)),
1359
- onClick: (h) => I(M)
1359
+ onClick: (h) => E(M)
1360
1360
  }, [
1361
1361
  r("span", {
1362
1362
  class: u(n(t).e("cell-text"))
@@ -1389,12 +1389,12 @@ const bl = [
1389
1389
  },
1390
1390
  emits: ["update:modelValue", "update:value", "change", "focus", "blur", "clear"],
1391
1391
  setup(s, { expose: k, emit: a }) {
1392
- const e = s, t = a, l = ae("date-picker"), c = B(!1), m = B(2e3), b = B(), T = () => e.modelValue !== void 0 && e.modelValue !== null ? e.modelValue : e.value !== void 0 && e.value !== null ? e.value : null, S = (R) => {
1393
- e.modelValue !== void 0 && t("update:modelValue", R), e.value !== void 0 && t("update:value", R), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", R), t("change", R);
1392
+ const e = s, t = a, l = ae("date-picker"), c = B(!1), m = B(2e3), b = B(), T = () => e.modelValue !== void 0 && e.modelValue !== null ? e.modelValue : e.value !== void 0 && e.value !== null ? e.value : null, S = (L) => {
1393
+ e.modelValue !== void 0 && t("update:modelValue", L), e.value !== void 0 && t("update:value", L), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", L), t("change", L);
1394
1394
  }, D = B(), $ = B(), z = B({
1395
1395
  top: "0px",
1396
1396
  left: "0px"
1397
- }), I = () => Ee().next(), y = B("date"), L = B(/* @__PURE__ */ new Date()), H = B({
1397
+ }), E = () => Ee().next(), y = B("date"), R = B(/* @__PURE__ */ new Date()), H = B({
1398
1398
  hours: (/* @__PURE__ */ new Date()).getHours(),
1399
1399
  minutes: (/* @__PURE__ */ new Date()).getMinutes(),
1400
1400
  seconds: (/* @__PURE__ */ new Date()).getSeconds()
@@ -1403,43 +1403,43 @@ const bl = [
1403
1403
  startDate: null,
1404
1404
  endDate: null
1405
1405
  }), M = V(() => {
1406
- const R = T();
1407
- if (!R) return null;
1406
+ const L = T();
1407
+ if (!L) return null;
1408
1408
  if (e.type === "daterange") {
1409
- if (!Array.isArray(R)) return null;
1410
- const [P, W] = R;
1409
+ if (!Array.isArray(L)) return null;
1410
+ const [F, W] = L;
1411
1411
  return [
1412
- P instanceof Date ? P : ve(P),
1412
+ F instanceof Date ? F : ve(F),
1413
1413
  W instanceof Date ? W : ve(W)
1414
1414
  ];
1415
1415
  }
1416
- return R instanceof Date ? R : ve(R);
1416
+ return L instanceof Date ? L : ve(L);
1417
1417
  }), h = V(() => {
1418
1418
  if (e.type === "daterange") return "";
1419
- const R = T();
1420
- if (!R) return "";
1421
- const P = R instanceof Date ? R : ve(R);
1422
- if (!P) return "";
1419
+ const L = T();
1420
+ if (!L) return "";
1421
+ const F = L instanceof Date ? L : ve(L);
1422
+ if (!F) return "";
1423
1423
  const W = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.format;
1424
- return ce(P, W);
1424
+ return ce(F, W);
1425
1425
  }), v = V(() => {
1426
- const R = T();
1427
- if (!R || !Array.isArray(R)) return "";
1428
- const [P] = R;
1429
- if (!P) return "";
1430
- const W = P instanceof Date ? P : ve(P);
1426
+ const L = T();
1427
+ if (!L || !Array.isArray(L)) return "";
1428
+ const [F] = L;
1429
+ if (!F) return "";
1430
+ const W = F instanceof Date ? F : ve(F);
1431
1431
  return W ? ce(W, e.format) : "";
1432
1432
  }), x = V(() => {
1433
- const R = T();
1434
- if (!R || !Array.isArray(R)) return "";
1435
- const [, P] = R;
1436
- if (!P) return "";
1437
- const W = P instanceof Date ? P : ve(P);
1433
+ const L = T();
1434
+ if (!L || !Array.isArray(L)) return "";
1435
+ const [, F] = L;
1436
+ if (!F) return "";
1437
+ const W = F instanceof Date ? F : ve(F);
1438
1438
  return W ? ce(W, e.format) : "";
1439
1439
  }), A = V(() => {
1440
- const R = T();
1441
- return !R || Array.isArray(R) ? null : R instanceof Date ? R : ve(R);
1442
- }), F = V(() => L.value.getFullYear()), Y = V(() => L.value.getMonth()), G = V(() => Ke(F.value)), p = V(() => y.value === "year" ? `${G.value[0]} 年 - ${G.value[1]} 年` : y.value === "month" ? `${F.value} 年` : `${F.value} 年 ${Y.value + 1} 月`), w = V(() => [
1440
+ const L = T();
1441
+ return !L || Array.isArray(L) ? null : L instanceof Date ? L : ve(L);
1442
+ }), I = V(() => R.value.getFullYear()), Y = V(() => R.value.getMonth()), G = V(() => Ke(I.value)), p = V(() => y.value === "year" ? `${G.value[0]} 年 - ${G.value[1]} 年` : y.value === "month" ? `${I.value} 年` : `${I.value} 年 ${Y.value + 1} 月`), w = V(() => [
1443
1443
  l.b(),
1444
1444
  l.m(e.size),
1445
1445
  l.is("disabled", e.disabled),
@@ -1451,11 +1451,11 @@ const bl = [
1451
1451
  ]), o = () => {
1452
1452
  e.disabled || e.readonly || (c.value ? g() : f());
1453
1453
  }, f = () => {
1454
- c.value = !0, m.value = I(), Se(() => {
1454
+ c.value = !0, m.value = E(), Se(() => {
1455
1455
  if (b.value && D.value) {
1456
- const R = b.value.getBoundingClientRect(), P = D.value.getBoundingClientRect();
1457
- let W = R.bottom + 8, he = R.left;
1458
- he + P.width > window.innerWidth && (he = window.innerWidth - P.width - 8), W + P.height > window.innerHeight && (W = R.top - P.height - 8), z.value = {
1456
+ const L = b.value.getBoundingClientRect(), F = D.value.getBoundingClientRect();
1457
+ let W = L.bottom + 8, he = L.left;
1458
+ he + F.width > window.innerWidth && (he = window.innerWidth - F.width - 8), W + F.height > window.innerHeight && (W = L.top - F.height - 8), z.value = {
1459
1459
  top: `${W}px`,
1460
1460
  left: `${he}px`
1461
1461
  };
@@ -1463,105 +1463,105 @@ const bl = [
1463
1463
  }), t("focus", {});
1464
1464
  }, g = () => {
1465
1465
  c.value = !1, y.value = "date", t("blur", {});
1466
- }, X = (R) => {
1466
+ }, X = (L) => {
1467
1467
  if (e.type === "date") {
1468
- e.showTime && (R.setHours(H.value.hours), R.setMinutes(H.value.minutes), R.setSeconds(H.value.seconds));
1469
- const P = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.valueFormat, W = P ? ce(R, P) : R;
1468
+ e.showTime && (L.setHours(H.value.hours), L.setMinutes(H.value.minutes), L.setSeconds(H.value.seconds));
1469
+ const F = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.valueFormat, W = F ? ce(L, F) : L;
1470
1470
  S(W), e.showTime || g();
1471
1471
  }
1472
1472
  }, ne = () => {
1473
- const R = T();
1474
- if (R) {
1475
- const P = R instanceof Date ? R : ve(R);
1476
- if (P) {
1477
- P.setHours(H.value.hours), P.setMinutes(H.value.minutes), P.setSeconds(H.value.seconds);
1478
- const W = e.valueFormat ? ce(P, e.valueFormat) : P;
1473
+ const L = T();
1474
+ if (L) {
1475
+ const F = L instanceof Date ? L : ve(L);
1476
+ if (F) {
1477
+ F.setHours(H.value.hours), F.setMinutes(H.value.minutes), F.setSeconds(H.value.seconds);
1478
+ const W = e.valueFormat ? ce(F, e.valueFormat) : F;
1479
1479
  S(W);
1480
1480
  }
1481
1481
  } else {
1482
- const P = /* @__PURE__ */ new Date();
1483
- P.setHours(H.value.hours), P.setMinutes(H.value.minutes), P.setSeconds(H.value.seconds);
1484
- const W = e.valueFormat ? ce(P, e.valueFormat) : P;
1482
+ const F = /* @__PURE__ */ new Date();
1483
+ F.setHours(H.value.hours), F.setMinutes(H.value.minutes), F.setSeconds(H.value.seconds);
1484
+ const W = e.valueFormat ? ce(F, e.valueFormat) : F;
1485
1485
  S(W);
1486
1486
  }
1487
1487
  g();
1488
- }, K = (R) => {
1488
+ }, K = (L) => {
1489
1489
  if (!O.value.selecting)
1490
- O.value.selecting = !0, O.value.startDate = R, O.value.endDate = null;
1490
+ O.value.selecting = !0, O.value.startDate = L, O.value.endDate = null;
1491
1491
  else {
1492
- O.value.selecting = !1, O.value.startDate && R < O.value.startDate ? [O.value.startDate, O.value.endDate] = [R, O.value.startDate] : O.value.endDate = R;
1493
- const P = e.valueFormat ? ce(O.value.startDate, e.valueFormat) : O.value.startDate, W = e.valueFormat ? ce(O.value.endDate, e.valueFormat) : O.value.endDate;
1494
- S([P, W]), g();
1492
+ O.value.selecting = !1, O.value.startDate && L < O.value.startDate ? [O.value.startDate, O.value.endDate] = [L, O.value.startDate] : O.value.endDate = L;
1493
+ const F = e.valueFormat ? ce(O.value.startDate, e.valueFormat) : O.value.startDate, W = e.valueFormat ? ce(O.value.endDate, e.valueFormat) : O.value.endDate;
1494
+ S([F, W]), g();
1495
1495
  }
1496
- }, re = (R) => {
1497
- if (L.value = new Date(F.value, R, 1), e.type === "month") {
1498
- const P = new Date(F.value, R, 1), W = e.valueFormat ? ce(P, e.valueFormat) : P;
1496
+ }, re = (L) => {
1497
+ if (R.value = new Date(I.value, L, 1), e.type === "month") {
1498
+ const F = new Date(I.value, L, 1), W = e.valueFormat ? ce(F, e.valueFormat) : F;
1499
1499
  S(W), g();
1500
1500
  } else
1501
1501
  y.value = "date";
1502
- }, q = (R) => {
1503
- if (L.value = new Date(R, Y.value, 1), e.type === "year") {
1504
- const P = new Date(R, 0, 1), W = e.valueFormat ? ce(P, e.valueFormat) : P;
1502
+ }, j = (L) => {
1503
+ if (R.value = new Date(L, Y.value, 1), e.type === "year") {
1504
+ const F = new Date(L, 0, 1), W = e.valueFormat ? ce(F, e.valueFormat) : F;
1505
1505
  S(W), g();
1506
1506
  } else
1507
1507
  y.value = "month";
1508
1508
  }, me = () => {
1509
- L.value = fl(L.value);
1509
+ R.value = fl(R.value);
1510
1510
  }, ye = () => {
1511
- L.value = ml(L.value);
1511
+ R.value = ml(R.value);
1512
1512
  }, ze = () => {
1513
- y.value === "year" ? L.value = new Date(F.value - 10, Y.value, 1) : L.value = hl(L.value);
1513
+ y.value === "year" ? R.value = new Date(I.value - 10, Y.value, 1) : R.value = hl(R.value);
1514
1514
  }, we = () => {
1515
- y.value === "year" ? L.value = new Date(F.value + 10, Y.value, 1) : L.value = pl(L.value);
1515
+ y.value === "year" ? R.value = new Date(I.value + 10, Y.value, 1) : R.value = pl(R.value);
1516
1516
  }, Te = () => {
1517
1517
  y.value = "month";
1518
1518
  }, Re = () => {
1519
1519
  y.value = "year";
1520
- }, E = () => {
1520
+ }, P = () => {
1521
1521
  S(null), t("clear"), O.value = {
1522
1522
  selecting: !1,
1523
1523
  startDate: null,
1524
1524
  endDate: null
1525
1525
  };
1526
- }, j = (R) => {
1526
+ }, q = (L) => {
1527
1527
  if (!b.value) return;
1528
- const P = R.target;
1529
- b.value.contains(P) || D.value && D.value.contains(P) || g();
1528
+ const F = L.target;
1529
+ b.value.contains(F) || D.value && D.value.contains(F) || g();
1530
1530
  };
1531
1531
  ie(
1532
1532
  T,
1533
- (R) => {
1534
- if (R)
1533
+ (L) => {
1534
+ if (L)
1535
1535
  if (Array.isArray(M.value)) {
1536
- const [P] = M.value;
1537
- P && (L.value = new Date(P));
1538
- } else M.value && (L.value = new Date(M.value));
1536
+ const [F] = M.value;
1537
+ F && (R.value = new Date(F));
1538
+ } else M.value && (R.value = new Date(M.value));
1539
1539
  },
1540
1540
  { immediate: !0 }
1541
- ), ie(c, (R) => {
1542
- R && (y.value = "date", e.type === "daterange" && (O.value = {
1541
+ ), ie(c, (L) => {
1542
+ L && (y.value = "date", e.type === "daterange" && (O.value = {
1543
1543
  selecting: !1,
1544
1544
  startDate: Array.isArray(M.value) ? M.value[0] : null,
1545
1545
  endDate: Array.isArray(M.value) ? M.value[1] : null
1546
1546
  }));
1547
1547
  });
1548
- const Z = (R) => {
1549
- R.key === "Escape" && g();
1548
+ const Z = (L) => {
1549
+ L.key === "Escape" && g();
1550
1550
  };
1551
1551
  return ge(() => {
1552
- document.addEventListener("click", j), document.addEventListener("keydown", Z);
1552
+ document.addEventListener("click", q), document.addEventListener("keydown", Z);
1553
1553
  }), De(() => {
1554
- document.removeEventListener("click", j), document.removeEventListener("keydown", Z);
1554
+ document.removeEventListener("click", q), document.removeEventListener("keydown", Z);
1555
1555
  }), k({
1556
1556
  focus: () => {
1557
- var R;
1558
- return (R = $.value) == null ? void 0 : R.focus();
1557
+ var L;
1558
+ return (L = $.value) == null ? void 0 : L.focus();
1559
1559
  },
1560
1560
  blur: () => {
1561
- var R;
1562
- return (R = $.value) == null ? void 0 : R.blur();
1561
+ var L;
1562
+ return (L = $.value) == null ? void 0 : L.blur();
1563
1563
  }
1564
- }), (R, P) => (i(), d("div", {
1564
+ }), (L, F) => (i(), d("div", {
1565
1565
  ref_key: "pickerRef",
1566
1566
  ref: b,
1567
1567
  class: u(w.value)
@@ -1587,7 +1587,7 @@ const bl = [
1587
1587
  s.clearable && h.value && !s.disabled ? (i(), d("span", {
1588
1588
  key: 0,
1589
1589
  class: u(n(l).e("clear")),
1590
- onClick: ue(E, ["stop"])
1590
+ onClick: ue(P, ["stop"])
1591
1591
  }, [
1592
1592
  Q(n(ee), {
1593
1593
  name: "close",
@@ -1633,7 +1633,7 @@ const bl = [
1633
1633
  s.clearable && (v.value || x.value) && !s.disabled ? (i(), d("span", {
1634
1634
  key: 0,
1635
1635
  class: u(n(l).e("clear")),
1636
- onClick: ue(E, ["stop"])
1636
+ onClick: ue(P, ["stop"])
1637
1637
  }, [
1638
1638
  Q(n(ee), {
1639
1639
  name: "close",
@@ -1665,16 +1665,16 @@ const bl = [
1665
1665
  r("button", {
1666
1666
  type: "button",
1667
1667
  class: u(n(l).e("prev-btn")),
1668
- onClick: P[0] || (P[0] = (W) => y.value === "date" ? me() : ze())
1668
+ onClick: F[0] || (F[0] = (W) => y.value === "date" ? me() : ze())
1669
1669
  }, " ‹ ", 2),
1670
1670
  r("div", {
1671
1671
  class: u(n(l).e("header-title"))
1672
1672
  }, [
1673
1673
  y.value === "year" ? (i(), d("span", {
1674
1674
  key: 0,
1675
- onClick: P[1] || (P[1] = (W) => y.value = "month")
1675
+ onClick: F[1] || (F[1] = (W) => y.value = "month")
1676
1676
  }, N(p.value), 1)) : (i(), d(J, { key: 1 }, [
1677
- r("span", { onClick: Re }, N(F.value) + " 年", 1),
1677
+ r("span", { onClick: Re }, N(I.value) + " 年", 1),
1678
1678
  y.value === "date" ? (i(), d("span", {
1679
1679
  key: 0,
1680
1680
  onClick: Te
@@ -1684,7 +1684,7 @@ const bl = [
1684
1684
  r("button", {
1685
1685
  type: "button",
1686
1686
  class: u(n(l).e("next-btn")),
1687
- onClick: P[2] || (P[2] = (W) => y.value === "date" ? ye() : we())
1687
+ onClick: F[2] || (F[2] = (W) => y.value === "date" ? ye() : we())
1688
1688
  }, " › ", 2)
1689
1689
  ], 2),
1690
1690
  r("div", {
@@ -1693,7 +1693,7 @@ const bl = [
1693
1693
  y.value === "date" ? (i(), fe(Ml, {
1694
1694
  key: 0,
1695
1695
  "model-value": A.value,
1696
- "viewed-month": L.value,
1696
+ "viewed-month": R.value,
1697
1697
  "disabled-date": s.disabledDate,
1698
1698
  "min-date": s.minDate ? n(ve)(s.minDate) : null,
1699
1699
  "max-date": s.maxDate ? n(ve)(s.maxDate) : null,
@@ -1704,15 +1704,15 @@ const bl = [
1704
1704
  }, null, 8, ["model-value", "viewed-month", "disabled-date", "min-date", "max-date", "selection-mode", "range-state"])) : y.value === "month" ? (i(), fe(xl, {
1705
1705
  key: 1,
1706
1706
  "model-value": A.value,
1707
- "viewed-year": F.value,
1707
+ "viewed-year": I.value,
1708
1708
  "disabled-date": s.disabledDate,
1709
1709
  onPick: re
1710
1710
  }, null, 8, ["model-value", "viewed-year", "disabled-date"])) : y.value === "year" ? (i(), fe(Cl, {
1711
1711
  key: 2,
1712
1712
  "model-value": A.value,
1713
- "viewed-year": F.value,
1713
+ "viewed-year": I.value,
1714
1714
  "disabled-date": s.disabledDate,
1715
- onPick: q
1715
+ onPick: j
1716
1716
  }, null, 8, ["model-value", "viewed-year", "disabled-date"])) : U("", !0)
1717
1717
  ], 2),
1718
1718
  s.showTime && s.type !== "daterange" ? (i(), d("div", {
@@ -1723,7 +1723,7 @@ const bl = [
1723
1723
  class: u(n(l).e("time-item"))
1724
1724
  }, [
1725
1725
  oe(r("select", {
1726
- "onUpdate:modelValue": P[3] || (P[3] = (W) => H.value.hours = W),
1726
+ "onUpdate:modelValue": F[3] || (F[3] = (W) => H.value.hours = W),
1727
1727
  class: u(n(l).e("time-select"))
1728
1728
  }, [
1729
1729
  (i(), d(J, null, _(24, (W) => r("option", {
@@ -1738,13 +1738,13 @@ const bl = [
1738
1738
  { number: !0 }
1739
1739
  ]
1740
1740
  ]),
1741
- P[6] || (P[6] = r("span", null, "时", -1))
1741
+ F[6] || (F[6] = r("span", null, "时", -1))
1742
1742
  ], 2),
1743
1743
  r("div", {
1744
1744
  class: u(n(l).e("time-item"))
1745
1745
  }, [
1746
1746
  oe(r("select", {
1747
- "onUpdate:modelValue": P[4] || (P[4] = (W) => H.value.minutes = W),
1747
+ "onUpdate:modelValue": F[4] || (F[4] = (W) => H.value.minutes = W),
1748
1748
  class: u(n(l).e("time-select"))
1749
1749
  }, [
1750
1750
  (i(), d(J, null, _(60, (W) => r("option", {
@@ -1759,13 +1759,13 @@ const bl = [
1759
1759
  { number: !0 }
1760
1760
  ]
1761
1761
  ]),
1762
- P[7] || (P[7] = r("span", null, "分", -1))
1762
+ F[7] || (F[7] = r("span", null, "分", -1))
1763
1763
  ], 2),
1764
1764
  r("div", {
1765
1765
  class: u(n(l).e("time-item"))
1766
1766
  }, [
1767
1767
  oe(r("select", {
1768
- "onUpdate:modelValue": P[5] || (P[5] = (W) => H.value.seconds = W),
1768
+ "onUpdate:modelValue": F[5] || (F[5] = (W) => H.value.seconds = W),
1769
1769
  class: u(n(l).e("time-select"))
1770
1770
  }, [
1771
1771
  (i(), d(J, null, _(60, (W) => r("option", {
@@ -1780,7 +1780,7 @@ const bl = [
1780
1780
  { number: !0 }
1781
1781
  ]
1782
1782
  ]),
1783
- P[8] || (P[8] = r("span", null, "秒", -1))
1783
+ F[8] || (F[8] = r("span", null, "秒", -1))
1784
1784
  ], 2)
1785
1785
  ], 2)) : U("", !0),
1786
1786
  s.showTime && s.type !== "daterange" ? (i(), d("div", {
@@ -1844,41 +1844,41 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
1844
1844
  setup(s, { emit: k }) {
1845
1845
  const a = s, e = k, t = ae("time-panel"), l = B(0), c = B(0), m = B(0), b = B(), T = B(), S = B(), D = V(() => a.format.includes("ss") || a.format.includes("s")), $ = V(() => {
1846
1846
  const K = [], re = Math.max(1, a.hourStep);
1847
- for (let q = 0; q < 24; q += re)
1848
- K.push(q);
1847
+ for (let j = 0; j < 24; j += re)
1848
+ K.push(j);
1849
1849
  return K;
1850
1850
  }), z = V(() => {
1851
1851
  const K = [], re = Math.max(1, a.minuteStep);
1852
- for (let q = 0; q < 60; q += re)
1853
- K.push(q);
1852
+ for (let j = 0; j < 60; j += re)
1853
+ K.push(j);
1854
1854
  return K;
1855
- }), I = V(() => {
1855
+ }), E = V(() => {
1856
1856
  const K = [], re = Math.max(1, a.secondStep);
1857
- for (let q = 0; q < 60; q += re)
1858
- K.push(q);
1857
+ for (let j = 0; j < 60; j += re)
1858
+ K.push(j);
1859
1859
  return K;
1860
- }), y = V(() => a.disabledHours ? new Set(a.disabledHours()) : /* @__PURE__ */ new Set()), L = V(() => a.disabledMinutes ? new Set(a.disabledMinutes(l.value)) : /* @__PURE__ */ new Set()), H = V(() => a.disabledSeconds ? new Set(a.disabledSeconds(l.value, c.value)) : /* @__PURE__ */ new Set()), O = V(() => `${Me(l.value)}:${Me(c.value)}${D.value ? ":" + Me(m.value) : ""}`), M = (K) => y.value.has(K), h = (K) => L.value.has(K), v = (K) => H.value.has(K), x = (K) => {
1860
+ }), y = V(() => a.disabledHours ? new Set(a.disabledHours()) : /* @__PURE__ */ new Set()), R = V(() => a.disabledMinutes ? new Set(a.disabledMinutes(l.value)) : /* @__PURE__ */ new Set()), H = V(() => a.disabledSeconds ? new Set(a.disabledSeconds(l.value, c.value)) : /* @__PURE__ */ new Set()), O = V(() => `${Me(l.value)}:${Me(c.value)}${D.value ? ":" + Me(m.value) : ""}`), M = (K) => y.value.has(K), h = (K) => R.value.has(K), v = (K) => H.value.has(K), x = (K) => {
1861
1861
  M(K) || (l.value = K, w(b.value, Y(K)));
1862
1862
  }, A = (K) => {
1863
1863
  h(K) || (c.value = K, w(T.value, G(K)));
1864
- }, F = (K) => {
1864
+ }, I = (K) => {
1865
1865
  v(K) || (m.value = K, w(S.value, p(K)));
1866
- }, Y = (K) => $.value.indexOf(K), G = (K) => z.value.indexOf(K), p = (K) => I.value.indexOf(K), w = (K, re) => {
1866
+ }, Y = (K) => $.value.indexOf(K), G = (K) => z.value.indexOf(K), p = (K) => E.value.indexOf(K), w = (K, re) => {
1867
1867
  if (!K) return;
1868
- const q = 32, ye = re * q + 84 - 200 / 2 + q / 2;
1868
+ const j = 32, ye = re * j + 84 - 200 / 2 + j / 2;
1869
1869
  K.scrollTop = Math.max(0, ye);
1870
1870
  }, C = () => {
1871
1871
  if (!b.value) return;
1872
- const K = b.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = $.value[Math.max(0, Math.min(re, $.value.length - 1))];
1873
- q !== void 0 && !M(q) && (l.value = q);
1872
+ const K = b.value.scrollTop, re = Math.round((K - 84 + 100) / 32), j = $.value[Math.max(0, Math.min(re, $.value.length - 1))];
1873
+ j !== void 0 && !M(j) && (l.value = j);
1874
1874
  }, o = () => {
1875
1875
  if (!T.value) return;
1876
- const K = T.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = z.value[Math.max(0, Math.min(re, z.value.length - 1))];
1877
- q !== void 0 && !h(q) && (c.value = q);
1876
+ const K = T.value.scrollTop, re = Math.round((K - 84 + 100) / 32), j = z.value[Math.max(0, Math.min(re, z.value.length - 1))];
1877
+ j !== void 0 && !h(j) && (c.value = j);
1878
1878
  }, f = () => {
1879
1879
  if (!S.value) return;
1880
- const K = S.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = I.value[Math.max(0, Math.min(re, I.value.length - 1))];
1881
- q !== void 0 && !v(q) && (m.value = q);
1880
+ const K = S.value.scrollTop, re = Math.round((K - 84 + 100) / 32), j = E.value[Math.max(0, Math.min(re, E.value.length - 1))];
1881
+ j !== void 0 && !v(j) && (m.value = j);
1882
1882
  }, g = () => {
1883
1883
  const K = a.modelValue ? new Date(a.modelValue) : /* @__PURE__ */ new Date();
1884
1884
  K.setHours(l.value, c.value, m.value, 0), e("confirm", K);
@@ -1921,11 +1921,11 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
1921
1921
  r("div", {
1922
1922
  class: u(n(t).e("padding"))
1923
1923
  }, null, 2),
1924
- (i(!0), d(J, null, _($.value, (q) => (i(), d("div", {
1925
- key: q,
1926
- class: u([n(t).e("item"), n(t).is("selected", l.value === q), n(t).is("disabled", M(q))]),
1927
- onClick: (me) => x(q)
1928
- }, N(n(Me)(q)), 11, Ll))), 128)),
1924
+ (i(!0), d(J, null, _($.value, (j) => (i(), d("div", {
1925
+ key: j,
1926
+ class: u([n(t).e("item"), n(t).is("selected", l.value === j), n(t).is("disabled", M(j))]),
1927
+ onClick: (me) => x(j)
1928
+ }, N(n(Me)(j)), 11, Ll))), 128)),
1929
1929
  r("div", {
1930
1930
  class: u(n(t).e("padding"))
1931
1931
  }, null, 2)
@@ -1939,11 +1939,11 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
1939
1939
  r("div", {
1940
1940
  class: u(n(t).e("padding"))
1941
1941
  }, null, 2),
1942
- (i(!0), d(J, null, _(z.value, (q) => (i(), d("div", {
1943
- key: q,
1944
- class: u([n(t).e("item"), n(t).is("selected", c.value === q), n(t).is("disabled", h(q))]),
1945
- onClick: (me) => A(q)
1946
- }, N(n(Me)(q)), 11, Rl))), 128)),
1942
+ (i(!0), d(J, null, _(z.value, (j) => (i(), d("div", {
1943
+ key: j,
1944
+ class: u([n(t).e("item"), n(t).is("selected", c.value === j), n(t).is("disabled", h(j))]),
1945
+ onClick: (me) => A(j)
1946
+ }, N(n(Me)(j)), 11, Rl))), 128)),
1947
1947
  r("div", {
1948
1948
  class: u(n(t).e("padding"))
1949
1949
  }, null, 2)
@@ -1958,11 +1958,11 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
1958
1958
  r("div", {
1959
1959
  class: u(n(t).e("padding"))
1960
1960
  }, null, 2),
1961
- (i(!0), d(J, null, _(I.value, (q) => (i(), d("div", {
1962
- key: q,
1963
- class: u([n(t).e("item"), n(t).is("selected", m.value === q), n(t).is("disabled", v(q))]),
1964
- onClick: (me) => F(q)
1965
- }, N(n(Me)(q)), 11, Bl))), 128)),
1961
+ (i(!0), d(J, null, _(E.value, (j) => (i(), d("div", {
1962
+ key: j,
1963
+ class: u([n(t).e("item"), n(t).is("selected", m.value === j), n(t).is("disabled", v(j))]),
1964
+ onClick: (me) => I(j)
1965
+ }, N(n(Me)(j)), 11, Bl))), 128)),
1966
1966
  r("div", {
1967
1967
  class: u(n(t).e("padding"))
1968
1968
  }, null, 2)
@@ -2019,14 +2019,14 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2019
2019
  }), z = B({
2020
2020
  startTime: null,
2021
2021
  endTime: null
2022
- }), I = B("start"), y = V(() => {
2022
+ }), E = B("start"), y = V(() => {
2023
2023
  if (!e.modelValue) return null;
2024
2024
  if (e.type === "timerange") {
2025
2025
  const [f, g] = e.modelValue;
2026
2026
  return [Ae(f), Ae(g)];
2027
2027
  }
2028
2028
  return Ae(e.modelValue);
2029
- }), L = V(() => !y.value || Array.isArray(y.value) ? "" : ke(y.value, e.format)), H = V(() => {
2029
+ }), R = V(() => !y.value || Array.isArray(y.value) ? "" : ke(y.value, e.format)), H = V(() => {
2030
2030
  if (!Array.isArray(y.value)) return "";
2031
2031
  const [f] = y.value;
2032
2032
  return f ? ke(f, e.format) : "";
@@ -2034,7 +2034,7 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2034
2034
  if (!Array.isArray(y.value)) return "";
2035
2035
  const [, f] = y.value;
2036
2036
  return f ? ke(f, e.format) : "";
2037
- }), M = V(() => e.type === "timerange" ? I.value === "start" ? z.value.startTime : z.value.endTime || z.value.startTime : y.value), h = V(() => [
2037
+ }), M = V(() => e.type === "timerange" ? E.value === "start" ? z.value.startTime : z.value.endTime || z.value.startTime : y.value), h = V(() => [
2038
2038
  l.b(),
2039
2039
  l.m(e.size),
2040
2040
  l.is("disabled", e.disabled),
@@ -2043,10 +2043,10 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2043
2043
  l.e("input"),
2044
2044
  l.is("focus", m.value)
2045
2045
  ]), x = () => {
2046
- e.disabled || e.readonly || (m.value ? Y() : F());
2046
+ e.disabled || e.readonly || (m.value ? Y() : I());
2047
2047
  }, A = (f) => {
2048
- e.disabled || e.readonly || (I.value = f, m.value || F());
2049
- }, F = () => {
2048
+ e.disabled || e.readonly || (E.value = f, m.value || I());
2049
+ }, I = () => {
2050
2050
  m.value = !0, b.value = c(), Se(() => {
2051
2051
  if (T.value && S.value) {
2052
2052
  const f = T.value.getBoundingClientRect(), g = S.value.getBoundingClientRect();
@@ -2061,8 +2061,8 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2061
2061
  m.value = !1, t("blur", {});
2062
2062
  }, G = (f) => {
2063
2063
  if (e.type === "timerange")
2064
- if (I.value === "start")
2065
- z.value.startTime = f, I.value = "end", z.value.endTime && z.value.endTime < f && (z.value.endTime = null);
2064
+ if (E.value === "start")
2065
+ z.value.startTime = f, E.value = "end", z.value.endTime && z.value.endTime < f && (z.value.endTime = null);
2066
2066
  else {
2067
2067
  z.value.startTime && f < z.value.startTime ? (z.value.endTime = z.value.startTime, z.value.startTime = f) : z.value.endTime = f;
2068
2068
  const g = e.valueFormat ? ke(z.value.startTime, e.valueFormat) : z.value.startTime, X = e.valueFormat ? ke(z.value.endTime, e.valueFormat) : z.value.endTime;
@@ -2100,7 +2100,7 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2100
2100
  f && e.type === "timerange" && (z.value = {
2101
2101
  startTime: Array.isArray(y.value) ? y.value[0] : null,
2102
2102
  endTime: Array.isArray(y.value) ? y.value[1] : null
2103
- }, I.value = "start");
2103
+ }, E.value = "start");
2104
2104
  });
2105
2105
  const o = (f) => {
2106
2106
  f.key === "Escape" && Y();
@@ -2135,13 +2135,13 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2135
2135
  placeholder: s.placeholder,
2136
2136
  disabled: s.disabled,
2137
2137
  readonly: !0,
2138
- value: L.value,
2138
+ value: R.value,
2139
2139
  class: u(n(l).e("input-inner"))
2140
2140
  }, null, 10, Fl),
2141
2141
  r("span", {
2142
2142
  class: u(n(l).e("suffix"))
2143
2143
  }, [
2144
- s.clearable && L.value && !s.disabled ? (i(), d("span", {
2144
+ s.clearable && R.value && !s.disabled ? (i(), d("span", {
2145
2145
  key: 0,
2146
2146
  class: u(n(l).e("clear")),
2147
2147
  onClick: ue(w, ["stop"])
@@ -2171,7 +2171,7 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2171
2171
  disabled: s.disabled,
2172
2172
  readonly: !0,
2173
2173
  value: H.value,
2174
- class: u([n(l).e("input-inner"), n(l).is("active", I.value === "start")]),
2174
+ class: u([n(l).e("input-inner"), n(l).is("active", E.value === "start")]),
2175
2175
  onClick: g[0] || (g[0] = ue((X) => A("start"), ["stop"]))
2176
2176
  }, null, 10, Il),
2177
2177
  r("span", {
@@ -2183,7 +2183,7 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2183
2183
  disabled: s.disabled,
2184
2184
  readonly: !0,
2185
2185
  value: O.value,
2186
- class: u([n(l).e("input-inner"), n(l).is("active", I.value === "end")]),
2186
+ class: u([n(l).e("input-inner"), n(l).is("active", E.value === "end")]),
2187
2187
  onClick: g[1] || (g[1] = ue((X) => A("end"), ["stop"]))
2188
2188
  }, null, 10, Pl),
2189
2189
  r("span", {
@@ -2221,7 +2221,7 @@ const Ll = ["onClick"], Rl = ["onClick"], Bl = ["onClick"], Al = /* @__PURE__ */
2221
2221
  s.type === "timerange" ? (i(), d("div", {
2222
2222
  key: 0,
2223
2223
  class: u(n(l).e("popper-header"))
2224
- }, N(I.value === "start" ? "请选择开始时间" : "请选择结束时间"), 3)) : U("", !0),
2224
+ }, N(E.value === "start" ? "请选择开始时间" : "请选择结束时间"), 3)) : U("", !0),
2225
2225
  Q(Al, {
2226
2226
  "model-value": M.value,
2227
2227
  format: s.format,
@@ -2311,51 +2311,59 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2311
2311
  setup(s, { emit: k }) {
2312
2312
  const a = le({
2313
2313
  name: "XSelectPopperContent",
2314
- setup(E, { slots: j }) {
2314
+ setup(P, { slots: q }) {
2315
2315
  const Z = xe("select");
2316
2316
  return Z && $e("select", Z), () => {
2317
- var R;
2318
- return (R = j.default) == null ? void 0 : R.call(j);
2317
+ var L;
2318
+ return (L = q.default) == null ? void 0 : L.call(q);
2319
2319
  };
2320
2320
  }
2321
2321
  }), e = s, t = k, l = ae("select"), c = Le(), m = () => {
2322
- const E = Ee();
2323
- let j = E.current;
2322
+ const P = Ee();
2323
+ let q = P.current;
2324
2324
  document.querySelectorAll(
2325
2325
  ".x-drawer__overlay, .x-modal__overlay, .x-select__popper, .x-dropdown__popper, .x-popover__popper"
2326
- ).forEach((P) => {
2327
- const W = parseInt(getComputedStyle(P).zIndex, 10);
2328
- !isNaN(W) && W > j && (j = W);
2326
+ ).forEach((F) => {
2327
+ const W = parseInt(getComputedStyle(F).zIndex, 10);
2328
+ !isNaN(W) && W > q && (q = W);
2329
2329
  });
2330
- const R = j + 1;
2331
- return E.set(R), R;
2332
- }, b = B(), T = B(), S = B(), D = B(!1), $ = B(2e3), z = B(""), I = B(-1), y = B({ top: "0px", left: "0px" }), L = B([]), H = (E) => {
2333
- L.value.find((j) => j.value === E.value) || L.value.push(E);
2334
- }, O = V(() => e.type === "multiple" || e.mode === "multiple"), M = V(() => e.type === "cascader"), h = B([]), v = V(() => e.options && e.options.length > 0 ? e.options : L.value), x = (E) => {
2335
- t("update:modelValue", E), t("update:value", E), t("change", E);
2330
+ const L = q + 1;
2331
+ return P.set(L), L;
2332
+ }, b = B(), T = B(), S = B(), D = B(!1), $ = B(2e3), z = B(""), E = B(-1), y = B({ top: "0px", left: "0px" }), R = B([]), H = (P) => {
2333
+ R.value.find((q) => q.value === P.value) || R.value.push(P);
2334
+ }, O = V(() => e.type === "multiple" || e.mode === "multiple"), M = V(() => e.type === "cascader"), h = B([]), v = V(() => {
2335
+ const P = e.options && e.options.length > 0 ? e.options : [], q = R.value;
2336
+ if (q.length === 0) return P;
2337
+ if (P.length === 0) return q;
2338
+ const Z = new Set(q.map((F) => F.value)), L = [...q];
2339
+ for (const F of P)
2340
+ Z.has(F.value) || L.push(F);
2341
+ return L;
2342
+ }), x = (P) => {
2343
+ t("update:modelValue", P), t("update:value", P), t("change", P);
2336
2344
  }, A = V(() => {
2337
- const E = e.modelValue ?? e.value;
2338
- return O.value ? Array.isArray(E) ? E : [] : M.value ? Array.isArray(E) ? E : E != null && E !== "" ? [E] : [] : E != null && E !== "" ? [E] : [];
2339
- }), F = V(() => {
2340
- const E = v.value;
2341
- return M.value ? Ol(E, e.childrenKey) : E.map((j) => ({ ...j, level: 0 }));
2342
- }), Y = V(() => !e.filterable || !z.value ? F.value : F.value.filter((E) => {
2343
- const j = E[e.labelKey] || "";
2344
- return El(j, z.value, e.filterMethod);
2345
+ const P = e.modelValue ?? e.value;
2346
+ return O.value ? Array.isArray(P) ? P : [] : M.value ? Array.isArray(P) ? P : P != null && P !== "" ? [P] : [] : P != null && P !== "" ? [P] : [];
2347
+ }), I = V(() => {
2348
+ const P = v.value;
2349
+ return M.value ? Ol(P, e.childrenKey) : P.map((q) => ({ ...q, level: 0 }));
2350
+ }), Y = V(() => !e.filterable || !z.value ? I.value : I.value.filter((P) => {
2351
+ const q = P[e.labelKey] || "";
2352
+ return El(q, z.value, e.filterMethod);
2345
2353
  })), G = V(() => {
2346
- const E = [];
2347
- for (const j of A.value) {
2348
- const Z = We(v.value, j, e.valueKey, e.childrenKey);
2349
- Z && E.push(Z);
2354
+ const P = [];
2355
+ for (const q of A.value) {
2356
+ const Z = We(v.value, q, e.valueKey, e.childrenKey);
2357
+ Z && P.push(Z);
2350
2358
  }
2351
- return E;
2359
+ return P;
2352
2360
  }), p = V(() => {
2353
2361
  if (O.value)
2354
2362
  return "";
2355
2363
  if (M.value)
2356
2364
  return Fe(v.value, A.value[A.value.length - 1], e.valueKey, e.childrenKey).map((Z) => Z[e.labelKey]).join(e.separator);
2357
- const E = G.value[0];
2358
- return E ? E[e.labelKey] : "";
2365
+ const P = G.value[0];
2366
+ return P ? P[e.labelKey] : "";
2359
2367
  }), w = V(() => O.value ? G.value : []), C = V(() => e.collapseTags ? w.value.slice(0, e.maxCollapseTags) : w.value), o = V(() => e.collapseTags ? Math.max(0, w.value.length - e.maxCollapseTags) : 0), f = V(() => [
2360
2368
  l.b(),
2361
2369
  l.m(e.size),
@@ -2366,24 +2374,24 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2366
2374
  l.is("focus", D.value)
2367
2375
  ]), g = () => {
2368
2376
  if (!b.value || !S.value || !D.value) return;
2369
- const E = b.value.getBoundingClientRect(), j = S.value;
2370
- j.offsetHeight;
2371
- const Z = j.getBoundingClientRect();
2372
- let R = E.bottom + 4, P = E.left;
2373
- P + Z.width > window.innerWidth && (P = window.innerWidth - Z.width - 8);
2377
+ const P = b.value.getBoundingClientRect(), q = S.value;
2378
+ q.offsetHeight;
2379
+ const Z = q.getBoundingClientRect();
2380
+ let L = P.bottom + 4, F = P.left;
2381
+ F + Z.width > window.innerWidth && (F = window.innerWidth - Z.width - 8);
2374
2382
  let W = 274;
2375
- if (R + Z.height > window.innerHeight) {
2376
- const he = E.top - Z.height - 4;
2383
+ if (L + Z.height > window.innerHeight) {
2384
+ const he = P.top - Z.height - 4;
2377
2385
  if (he >= 8)
2378
- R = he;
2386
+ L = he;
2379
2387
  else {
2380
- const Oe = window.innerHeight - E.bottom - 8, Ye = E.top - 8;
2381
- Ye > Oe ? (R = 8, W = Math.max(120, Ye)) : W = Math.max(120, Oe);
2388
+ const Oe = window.innerHeight - P.bottom - 8, Ye = P.top - 8;
2389
+ Ye > Oe ? (L = 8, W = Math.max(120, Ye)) : W = Math.max(120, Oe);
2382
2390
  }
2383
2391
  }
2384
2392
  y.value = {
2385
- top: `${R}px`,
2386
- left: `${P}px`,
2393
+ top: `${L}px`,
2394
+ left: `${F}px`,
2387
2395
  maxHeight: `${W}px`
2388
2396
  };
2389
2397
  }, X = () => {
@@ -2394,79 +2402,79 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2394
2402
  }), t("visible-change", !0), t("focus", {}));
2395
2403
  }, ne = () => {
2396
2404
  D.value = !1, z.value = "", h.value = [], t("visible-change", !1), t("blur", {});
2397
- }, K = (E) => {
2398
- if (!E.disabled)
2405
+ }, K = (P) => {
2406
+ if (!P.disabled)
2399
2407
  if (O.value) {
2400
- const j = [...A.value], Z = E[e.valueKey], R = j.indexOf(Z);
2401
- if (R > -1)
2402
- j.splice(R, 1), t("remove-tag", Z);
2408
+ const q = [...A.value], Z = P[e.valueKey], L = q.indexOf(Z);
2409
+ if (L > -1)
2410
+ q.splice(L, 1), t("remove-tag", Z);
2403
2411
  else {
2404
- if (e.multipleLimit > 0 && j.length >= e.multipleLimit)
2412
+ if (e.multipleLimit > 0 && q.length >= e.multipleLimit)
2405
2413
  return;
2406
- j.push(Z);
2414
+ q.push(Z);
2407
2415
  }
2408
- x(j);
2416
+ x(q);
2409
2417
  } else if (M.value)
2410
- if (E.children && E.children.length > 0) {
2411
- const j = Fe(v.value, E[e.valueKey], e.valueKey, e.childrenKey);
2412
- h.value = j;
2418
+ if (P.children && P.children.length > 0) {
2419
+ const q = Fe(v.value, P[e.valueKey], e.valueKey, e.childrenKey);
2420
+ h.value = q;
2413
2421
  } else {
2414
- const Z = Fe(v.value, E[e.valueKey], e.valueKey, e.childrenKey).map((R) => R[e.valueKey]);
2422
+ const Z = Fe(v.value, P[e.valueKey], e.valueKey, e.childrenKey).map((L) => L[e.valueKey]);
2415
2423
  x(Z), ne();
2416
2424
  }
2417
2425
  else
2418
- x(E[e.valueKey]), ne();
2419
- }, re = (E) => {
2420
- const j = A.value.filter((Z) => Z !== E[e.valueKey]);
2421
- x(j), t("remove-tag", E[e.valueKey]);
2422
- }, q = () => {
2423
- const E = O.value ? [] : "";
2424
- x(E), t("clear");
2425
- }, me = (E) => {
2426
- z.value = E.target.value;
2427
- }, ye = (E) => {
2426
+ x(P[e.valueKey]), ne();
2427
+ }, re = (P) => {
2428
+ const q = A.value.filter((Z) => Z !== P[e.valueKey]);
2429
+ x(q), t("remove-tag", P[e.valueKey]);
2430
+ }, j = () => {
2431
+ const P = O.value ? [] : "";
2432
+ x(P), t("clear");
2433
+ }, me = (P) => {
2434
+ z.value = P.target.value;
2435
+ }, ye = (P) => {
2428
2436
  if (!b.value) return;
2429
- const j = E.target, Z = S.value && S.value.contains(j);
2430
- b.value.contains(j) || Z || ne();
2431
- }, ze = (E) => {
2432
- if (E.key === "Escape")
2437
+ const q = P.target, Z = S.value && S.value.contains(q);
2438
+ b.value.contains(q) || Z || ne();
2439
+ }, ze = (P) => {
2440
+ if (P.key === "Escape")
2433
2441
  ne();
2434
- else if (E.key === "Enter" && D.value) {
2435
- const j = Y.value[I.value];
2436
- j && K(j);
2437
- } else E.key === "ArrowDown" && D.value ? (E.preventDefault(), I.value = Math.min(I.value + 1, Y.value.length - 1)) : E.key === "ArrowUp" && D.value && (E.preventDefault(), I.value = Math.max(I.value - 1, 0));
2438
- }, we = (E) => A.value.includes(E[e.valueKey]), Te = (E, j) => [
2442
+ else if (P.key === "Enter" && D.value) {
2443
+ const q = Y.value[E.value];
2444
+ q && K(q);
2445
+ } else P.key === "ArrowDown" && D.value ? (P.preventDefault(), E.value = Math.min(E.value + 1, Y.value.length - 1)) : P.key === "ArrowUp" && D.value && (P.preventDefault(), E.value = Math.max(E.value - 1, 0));
2446
+ }, we = (P) => A.value.includes(P[e.valueKey]), Te = (P, q) => [
2439
2447
  l.e("option"),
2440
- l.is("selected", we(E)),
2441
- l.is("disabled", E.disabled === !0),
2442
- l.is("hover", I.value === j),
2443
- l.is("group", !!(E.children && E.children.length > 0))
2448
+ l.is("selected", we(P)),
2449
+ l.is("disabled", P.disabled === !0),
2450
+ l.is("hover", E.value === q),
2451
+ l.is("group", !!(P.children && P.children.length > 0))
2444
2452
  ], Re = V(() => {
2445
2453
  if (!M.value) return [];
2446
- const E = [v.value];
2447
- for (const j of h.value)
2448
- j.children && j.children.length > 0 && E.push(j.children);
2449
- return E;
2454
+ const P = [v.value];
2455
+ for (const q of h.value)
2456
+ q.children && q.children.length > 0 && P.push(q.children);
2457
+ return P;
2450
2458
  });
2451
2459
  return ge(() => {
2452
2460
  document.addEventListener("mousedown", ye), document.addEventListener("keydown", ze);
2453
2461
  }), De(() => {
2454
2462
  document.removeEventListener("mousedown", ye), document.removeEventListener("keydown", ze), document.removeEventListener("scroll", g, !0);
2455
- }), ie(D, (E) => {
2456
- E ? document.addEventListener("scroll", g, !0) : document.removeEventListener("scroll", g, !0);
2463
+ }), ie(D, (P) => {
2464
+ P ? document.addEventListener("scroll", g, !0) : document.removeEventListener("scroll", g, !0);
2457
2465
  }), $e("select", {
2458
2466
  selectedValues: A,
2459
2467
  handleSelect: K,
2460
2468
  isSelected: we,
2461
2469
  registerOption: H
2462
- }), (E, j) => (i(), d("div", {
2470
+ }), (P, q) => (i(), d("div", {
2463
2471
  ref_key: "selectRef",
2464
2472
  ref: b,
2465
2473
  class: u(f.value)
2466
2474
  }, [
2467
2475
  r("div", {
2468
2476
  class: u(n(l).e("wrapper")),
2469
- onClick: j[0] || (j[0] = (Z) => D.value ? ne() : X())
2477
+ onClick: q[0] || (q[0] = (Z) => D.value ? ne() : X())
2470
2478
  }, [
2471
2479
  O.value && w.value.length > 0 ? (i(), d("div", {
2472
2480
  key: 0,
@@ -2481,7 +2489,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2481
2489
  }, N(Z[s.labelKey]), 3),
2482
2490
  r("span", {
2483
2491
  class: u(n(l).e("tag-close")),
2484
- onClick: ue((R) => re(Z), ["stop"])
2492
+ onClick: ue((L) => re(Z), ["stop"])
2485
2493
  }, "×", 10, Yl)
2486
2494
  ], 2))), 128)),
2487
2495
  o.value > 0 ? (i(), d("span", {
@@ -2505,7 +2513,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2505
2513
  s.clearable && A.value.length > 0 && !s.disabled ? (i(), d("span", {
2506
2514
  key: 0,
2507
2515
  class: u(n(l).e("clear")),
2508
- onClick: ue(q, ["stop"])
2516
+ onClick: ue(j, ["stop"])
2509
2517
  }, "×", 2)) : (i(), d("span", {
2510
2518
  key: 1,
2511
2519
  class: u([n(l).e("arrow"), n(l).is("reverse", D.value)])
@@ -2530,19 +2538,19 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2530
2538
  key: 0,
2531
2539
  class: u(n(l).e("cascader-panels"))
2532
2540
  }, [
2533
- (i(!0), d(J, null, _(Re.value, (Z, R) => (i(), d("div", {
2534
- key: R,
2541
+ (i(!0), d(J, null, _(Re.value, (Z, L) => (i(), d("div", {
2542
+ key: L,
2535
2543
  class: u(n(l).e("cascader-panel"))
2536
2544
  }, [
2537
- (i(!0), d(J, null, _(Z, (P, W) => (i(), d("div", {
2538
- key: P[s.valueKey],
2539
- class: u(Te(P, W)),
2540
- onClick: ue((he) => K(P), ["stop", "prevent"])
2545
+ (i(!0), d(J, null, _(Z, (F, W) => (i(), d("div", {
2546
+ key: F[s.valueKey],
2547
+ class: u(Te(F, W)),
2548
+ onClick: ue((he) => K(F), ["stop", "prevent"])
2541
2549
  }, [
2542
2550
  r("span", {
2543
2551
  class: u(n(l).e("option-label"))
2544
- }, N(P[s.labelKey]), 3),
2545
- P.children && P.children.length > 0 ? (i(), d("span", {
2552
+ }, N(F[s.labelKey]), 3),
2553
+ F.children && F.children.length > 0 ? (i(), d("span", {
2546
2554
  key: 0,
2547
2555
  class: u(n(l).e("option-arrow"))
2548
2556
  }, "›", 2)) : U("", !0)
@@ -2553,13 +2561,13 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2553
2561
  key: 0,
2554
2562
  class: u(n(l).e("empty"))
2555
2563
  }, N(z.value ? s.noMatchText : s.noDataText), 3)) : (i(), d(J, { key: 1 }, [
2556
- E.$slots.default ? (i(), d("div", {
2564
+ P.$slots.default ? (i(), d("div", {
2557
2565
  key: 0,
2558
2566
  class: u(n(l).e("options"))
2559
2567
  }, [
2560
2568
  Q(n(a), null, {
2561
2569
  default: He(() => [
2562
- se(E.$slots, "default")
2570
+ se(P.$slots, "default")
2563
2571
  ]),
2564
2572
  _: 3
2565
2573
  })
@@ -2567,10 +2575,10 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2567
2575
  key: 1,
2568
2576
  class: u(n(l).e("options"))
2569
2577
  }, [
2570
- (i(!0), d(J, null, _(Y.value, (Z, R) => (i(), d("div", {
2578
+ (i(!0), d(J, null, _(Y.value, (Z, L) => (i(), d("div", {
2571
2579
  key: Z[s.valueKey],
2572
- class: u(Te(Z, R)),
2573
- onClick: ue((P) => K(Z), ["stop", "prevent"])
2580
+ class: u(Te(Z, L)),
2581
+ onClick: ue((F) => K(Z), ["stop", "prevent"])
2574
2582
  }, [
2575
2583
  r("span", {
2576
2584
  class: u(n(l).e("option-label"))
@@ -2660,17 +2668,17 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2660
2668
  }), b = V(() => {
2661
2669
  var o;
2662
2670
  return ((o = e.props) == null ? void 0 : o.disabled) || "disabled";
2663
- }), T = B(""), S = B(""), D = B([]), $ = B([]), z = (o) => o[c.value], I = (o) => o[m.value], y = (o) => o[b.value] || !1, L = V(() => e.data.filter((o) => {
2671
+ }), T = B(""), S = B(""), D = B([]), $ = B([]), z = (o) => o[c.value], E = (o) => o[m.value], y = (o) => o[b.value] || !1, R = V(() => e.data.filter((o) => {
2664
2672
  const f = z(o);
2665
- return e.modelValue.includes(f) ? !1 : e.filterable && T.value ? e.filterMethod ? e.filterMethod(T.value, o) : I(o).toLowerCase().includes(T.value.toLowerCase()) : !0;
2673
+ return e.modelValue.includes(f) ? !1 : e.filterable && T.value ? e.filterMethod ? e.filterMethod(T.value, o) : E(o).toLowerCase().includes(T.value.toLowerCase()) : !0;
2666
2674
  })), H = V(() => {
2667
2675
  const o = e.modelValue;
2668
2676
  let f = e.data.filter((g) => {
2669
2677
  const X = z(g);
2670
2678
  return o.includes(X);
2671
2679
  });
2672
- return e.filterable && S.value && (f = f.filter((g) => e.filterMethod ? e.filterMethod(S.value, g) : I(g).toLowerCase().includes(S.value.toLowerCase()))), e.targetOrder === "push" ? f.sort((g, X) => o.indexOf(z(g)) - o.indexOf(z(X))) : e.targetOrder === "unshift" ? f.sort((g, X) => o.indexOf(z(X)) - o.indexOf(z(g))) : f;
2673
- }), O = V(() => L.value.filter((o) => D.value.includes(z(o))).every((o) => y(o))), M = V(() => H.value.filter((o) => $.value.includes(z(o))).every((o) => y(o))), h = V(() => D.value.length === 0 || O.value), v = V(() => $.value.length === 0 || M.value), x = () => {
2680
+ return e.filterable && S.value && (f = f.filter((g) => e.filterMethod ? e.filterMethod(S.value, g) : E(g).toLowerCase().includes(S.value.toLowerCase()))), e.targetOrder === "push" ? f.sort((g, X) => o.indexOf(z(g)) - o.indexOf(z(X))) : e.targetOrder === "unshift" ? f.sort((g, X) => o.indexOf(z(X)) - o.indexOf(z(g))) : f;
2681
+ }), O = V(() => R.value.filter((o) => D.value.includes(z(o))).every((o) => y(o))), M = V(() => H.value.filter((o) => $.value.includes(z(o))).every((o) => y(o))), h = V(() => D.value.length === 0 || O.value), v = V(() => $.value.length === 0 || M.value), x = () => {
2674
2682
  const o = D.value.filter((g) => {
2675
2683
  const X = e.data.find((ne) => z(ne) === g);
2676
2684
  return X && !y(X);
@@ -2683,14 +2691,14 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2683
2691
  return X && !y(X);
2684
2692
  }), f = e.modelValue.filter((g) => !o.includes(g));
2685
2693
  t("update:modelValue", f), t("change", f, "left", o), $.value = [];
2686
- }, F = (o) => {
2694
+ }, I = (o) => {
2687
2695
  const f = D.value.indexOf(o);
2688
2696
  f > -1 ? D.value.splice(f, 1) : D.value.push(o), t("left-check-change", [...D.value]);
2689
2697
  }, Y = (o) => {
2690
2698
  const f = $.value.indexOf(o);
2691
2699
  f > -1 ? $.value.splice(f, 1) : $.value.push(o), t("right-check-change", [...$.value]);
2692
2700
  }, G = () => {
2693
- D.value.length === L.value.filter((o) => !y(o)).length ? D.value = [] : D.value = L.value.filter((o) => !y(o)).map((o) => z(o)), t("left-check-change", [...D.value]);
2701
+ D.value.length === R.value.filter((o) => !y(o)).length ? D.value = [] : D.value = R.value.filter((o) => !y(o)).map((o) => z(o)), t("left-check-change", [...D.value]);
2694
2702
  }, p = () => {
2695
2703
  $.value.length === H.value.filter((o) => !y(o)).length ? $.value = [] : $.value = H.value.filter((o) => !y(o)).map((o) => z(o)), t("right-check-change", [...$.value]);
2696
2704
  }, w = (o) => {
@@ -2712,15 +2720,15 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2712
2720
  }, [
2713
2721
  r("input", {
2714
2722
  type: "checkbox",
2715
- checked: D.value.length > 0 && D.value.length === L.value.filter((g) => !y(g)).length,
2716
- indeterminate: D.value.length > 0 && D.value.length < L.value.filter((g) => !y(g)).length,
2723
+ checked: D.value.length > 0 && D.value.length === R.value.filter((g) => !y(g)).length,
2724
+ indeterminate: D.value.length > 0 && D.value.length < R.value.filter((g) => !y(g)).length,
2717
2725
  onChange: G
2718
2726
  }, null, 40, Kl),
2719
2727
  r("span", null, N(s.titles[0]), 1)
2720
2728
  ], 2),
2721
2729
  r("span", {
2722
2730
  class: u(n(l).e("count"))
2723
- }, N(D.value.length) + " / " + N(L.value.length), 3)
2731
+ }, N(D.value.length) + " / " + N(R.value.length), 3)
2724
2732
  ], 2),
2725
2733
  s.filterable ? (i(), d("div", {
2726
2734
  key: 0,
@@ -2742,14 +2750,14 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2742
2750
  r("div", {
2743
2751
  class: u(n(l).e("body"))
2744
2752
  }, [
2745
- (i(!0), d(J, null, _(L.value, (g) => (i(), d("div", {
2753
+ (i(!0), d(J, null, _(R.value, (g) => (i(), d("div", {
2746
2754
  key: z(g),
2747
2755
  class: u([
2748
2756
  n(l).e("item"),
2749
2757
  n(l).is("disabled", y(g)),
2750
2758
  n(l).is("checked", D.value.includes(z(g)))
2751
2759
  ]),
2752
- onClick: (X) => !y(g) && F(z(g))
2760
+ onClick: (X) => !y(g) && I(z(g))
2753
2761
  }, [
2754
2762
  r("label", {
2755
2763
  class: u(n(l).e("checkbox"))
@@ -2760,12 +2768,12 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2760
2768
  disabled: y(g),
2761
2769
  onClick: f[2] || (f[2] = ue(() => {
2762
2770
  }, ["stop"])),
2763
- onChange: (X) => F(z(g))
2771
+ onChange: (X) => I(z(g))
2764
2772
  }, null, 40, jl),
2765
- r("span", null, N(I(g)), 1)
2773
+ r("span", null, N(E(g)), 1)
2766
2774
  ], 2)
2767
2775
  ], 10, ql))), 128)),
2768
- L.value.length === 0 ? (i(), d("div", {
2776
+ R.value.length === 0 ? (i(), d("div", {
2769
2777
  key: 0,
2770
2778
  class: u(n(l).e("empty"))
2771
2779
  }, [
@@ -2850,7 +2858,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2850
2858
  }, ["stop"])),
2851
2859
  onChange: (X) => Y(z(g))
2852
2860
  }, null, 40, ea),
2853
- r("span", null, N(I(g)), 1)
2861
+ r("span", null, N(E(g)), 1)
2854
2862
  ], 2)
2855
2863
  ], 10, _l))), 128)),
2856
2864
  H.value.length === 0 ? (i(), d("div", {
@@ -2898,7 +2906,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2898
2906
  const C = Number(w), o = a.marks[C], f = (C - a.min) / (a.max - a.min) * 100;
2899
2907
  let g, X = {};
2900
2908
  return typeof o == "string" ? g = o : (g = o.label || String(C), X = o.style || {}), { value: C, pos: f, label: g, style: X };
2901
- }) : []), z = () => l.value ? a.vertical ? l.value.offsetHeight : l.value.offsetWidth : 0, I = (w, C) => {
2909
+ }) : []), z = () => l.value ? a.vertical ? l.value.offsetHeight : l.value.offsetWidth : 0, E = (w, C) => {
2902
2910
  if (!l.value) return a.modelValue;
2903
2911
  const o = l.value.getBoundingClientRect(), f = z();
2904
2912
  let g;
@@ -2909,25 +2917,25 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2909
2917
  if (a.disabled) return;
2910
2918
  const C = Math.max(a.min, Math.min(a.max, w));
2911
2919
  C !== a.modelValue && (e("update:modelValue", C), e("input", C));
2912
- }, L = (w) => {
2920
+ }, R = (w) => {
2913
2921
  if (a.disabled) return;
2914
2922
  w.preventDefault(), b.value = !0, m.value = !0;
2915
- const C = I(w.clientX, w.clientY);
2923
+ const C = E(w.clientX, w.clientY);
2916
2924
  y(C), document.addEventListener("mousemove", H), document.addEventListener("mouseup", O);
2917
2925
  }, H = (w) => {
2918
2926
  if (!b.value) return;
2919
- const C = I(w.clientX, w.clientY);
2927
+ const C = E(w.clientX, w.clientY);
2920
2928
  y(C);
2921
2929
  }, O = () => {
2922
2930
  b.value = !1, e("change", a.modelValue), document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", O);
2923
2931
  }, M = (w) => {
2924
2932
  if (a.disabled) return;
2925
2933
  w.preventDefault(), b.value = !0, m.value = !0;
2926
- const C = w.touches[0], o = I(C.clientX, C.clientY);
2934
+ const C = w.touches[0], o = E(C.clientX, C.clientY);
2927
2935
  y(o);
2928
2936
  }, h = (w) => {
2929
2937
  if (!b.value) return;
2930
- const C = w.touches[0], o = I(C.clientX, C.clientY);
2938
+ const C = w.touches[0], o = E(C.clientX, C.clientY);
2931
2939
  y(o);
2932
2940
  }, v = () => {
2933
2941
  b.value = !1, e("change", a.modelValue);
@@ -2939,20 +2947,20 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
2939
2947
  De(() => {
2940
2948
  document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", O);
2941
2949
  });
2942
- const F = V(() => [
2950
+ const I = V(() => [
2943
2951
  t.b(),
2944
2952
  t.is("disabled", a.disabled),
2945
2953
  t.is("vertical", a.vertical)
2946
2954
  ]), Y = V(() => a.vertical && a.height ? { height: typeof a.height == "number" ? `${a.height}px` : a.height } : {}), G = V(() => a.vertical ? { height: `${T.value}%` } : { width: `${T.value}%` }), p = V(() => a.vertical ? { bottom: `${T.value}%` } : { left: `${T.value}%` });
2947
2955
  return (w, C) => (i(), d("div", {
2948
- class: u(F.value),
2956
+ class: u(I.value),
2949
2957
  style: te(Y.value)
2950
2958
  }, [
2951
2959
  r("div", {
2952
2960
  ref_key: "sliderRef",
2953
2961
  ref: l,
2954
2962
  class: u(n(t).e("runway")),
2955
- onMousedown: L,
2963
+ onMousedown: R,
2956
2964
  onTouchstart: M
2957
2965
  }, [
2958
2966
  r("div", {
@@ -3069,7 +3077,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3069
3077
  l.is("disabled", e.disabled),
3070
3078
  l.is("drag", e.drag),
3071
3079
  l.m(e.listType)
3072
- ]), I = (p) => {
3080
+ ]), E = (p) => {
3073
3081
  const w = p.target.files;
3074
3082
  !w || w.length === 0 || (y(Array.from(w)), c.value && (c.value.value = ""));
3075
3083
  }, y = async (p) => {
@@ -3089,9 +3097,9 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3089
3097
  uid: S(),
3090
3098
  raw: o
3091
3099
  };
3092
- o.type.startsWith("image/") && (f.thumbUrl = await L(o), f.url = f.thumbUrl), m.value.push(f), t("update:fileList", m.value), t("change", f, m.value), (C = e.onChange) == null || C.call(e, f, m.value), e.autoUpload && H(f);
3100
+ o.type.startsWith("image/") && (f.thumbUrl = await R(o), f.url = f.thumbUrl), m.value.push(f), t("update:fileList", m.value), t("change", f, m.value), (C = e.onChange) == null || C.call(e, f, m.value), e.autoUpload && H(f);
3093
3101
  }
3094
- }, L = (p) => new Promise((w) => {
3102
+ }, R = (p) => new Promise((w) => {
3095
3103
  const C = new FileReader();
3096
3104
  C.onload = (o) => {
3097
3105
  var f;
@@ -3158,7 +3166,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3158
3166
  e.disabled || (p = c.value) == null || p.click();
3159
3167
  }, A = (p) => {
3160
3168
  p.preventDefault(), !e.disabled && e.drag && (b.value = !0);
3161
- }, F = () => {
3169
+ }, I = () => {
3162
3170
  b.value = !1;
3163
3171
  }, Y = (p) => {
3164
3172
  var C;
@@ -3185,7 +3193,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3185
3193
  class: u([n(l).e("drag"), n(l).is("dragover", b.value)]),
3186
3194
  onClick: x,
3187
3195
  onDragover: A,
3188
- onDragleave: F,
3196
+ onDragleave: I,
3189
3197
  onDrop: Y
3190
3198
  }, [
3191
3199
  se(p.$slots, "drag", {}, () => [
@@ -3393,7 +3401,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3393
3401
  multiple: s.multiple,
3394
3402
  accept: s.accept,
3395
3403
  disabled: s.disabled,
3396
- onChange: I
3404
+ onChange: E
3397
3405
  }, null, 42, ga),
3398
3406
  p.$slots.tip ? (i(), d("div", {
3399
3407
  key: 3,
@@ -3435,8 +3443,8 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3435
3443
  t.is("disabled", a.disabled),
3436
3444
  t.is("readonly", a.readonly)
3437
3445
  ]), b = (y) => a.disabled ? a.disabledVoidColor : y <= a.lowThreshold ? a.colors[0] : y <= a.highThreshold ? a.colors[1] || a.colors[0] : a.colors[2] || a.colors[1] || a.colors[0], T = (y) => {
3438
- const L = c.value;
3439
- return L >= y ? 100 : a.allowHalf && L >= y - 0.5 ? 50 : 0;
3446
+ const R = c.value;
3447
+ return R >= y ? 100 : a.allowHalf && R >= y - 0.5 ? 50 : 0;
3440
3448
  }, S = (y) => T(y) > 0 ? b(c.value) : a.disabled ? a.disabledVoidColor : a.voidColor, D = V(() => {
3441
3449
  if (a.showScore)
3442
3450
  return a.scoreTemplate.replace("{value}", String(a.modelValue));
@@ -3445,26 +3453,26 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3445
3453
  return a.texts[Math.max(0, y)] || "";
3446
3454
  }
3447
3455
  return "";
3448
- }), $ = (y, L) => {
3456
+ }), $ = (y, R) => {
3449
3457
  if (!(a.disabled || a.readonly))
3450
3458
  if (a.allowHalf) {
3451
- const O = L.currentTarget.getBoundingClientRect(), M = L.clientX - O.left < O.width / 2;
3459
+ const O = R.currentTarget.getBoundingClientRect(), M = R.clientX - O.left < O.width / 2;
3452
3460
  l.value = M ? y - 0.5 : y;
3453
3461
  } else
3454
3462
  l.value = y;
3455
3463
  }, z = () => {
3456
3464
  a.disabled || a.readonly || (l.value = -1);
3457
- }, I = (y, L) => {
3465
+ }, E = (y, R) => {
3458
3466
  if (a.disabled || a.readonly) return;
3459
3467
  let H;
3460
3468
  if (a.allowHalf) {
3461
- const M = L.currentTarget.getBoundingClientRect();
3462
- H = L.clientX - M.left < M.width / 2 ? y - 0.5 : y;
3469
+ const M = R.currentTarget.getBoundingClientRect();
3470
+ H = R.clientX - M.left < M.width / 2 ? y - 0.5 : y;
3463
3471
  } else
3464
3472
  H = y;
3465
3473
  e("update:modelValue", H), e("change", H);
3466
3474
  };
3467
- return (y, L) => (i(), d("div", {
3475
+ return (y, R) => (i(), d("div", {
3468
3476
  class: u(m.value),
3469
3477
  onMouseleave: z
3470
3478
  }, [
@@ -3475,7 +3483,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3475
3483
  key: H,
3476
3484
  class: u(n(t).e("item")),
3477
3485
  onMousemove: (O) => $(H, O),
3478
- onClick: (O) => I(H, O)
3486
+ onClick: (O) => E(H, O)
3479
3487
  }, [
3480
3488
  r("span", {
3481
3489
  class: u(n(t).e("void")),
@@ -3547,7 +3555,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3547
3555
  const x = l.value[v];
3548
3556
  l.value[v] = l.value[v - 1], l.value[v - 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3549
3557
  }
3550
- }, I = (h) => {
3558
+ }, E = (h) => {
3551
3559
  const v = l.value.findIndex((x) => x.id === h);
3552
3560
  if (v < l.value.length - 1) {
3553
3561
  const x = l.value[v];
@@ -3557,7 +3565,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3557
3565
  l.value.forEach((h, v) => {
3558
3566
  h.order = v;
3559
3567
  });
3560
- }, L = (h) => {
3568
+ }, R = (h) => {
3561
3569
  c.value = { ...h };
3562
3570
  }, H = () => {
3563
3571
  if (c.value) {
@@ -3627,7 +3635,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3627
3635
  key: 1,
3628
3636
  class: "action-btn",
3629
3637
  title: "下移",
3630
- onClick: (A) => I(x.id)
3638
+ onClick: (A) => E(x.id)
3631
3639
  }, [
3632
3640
  Q(n(ee), {
3633
3641
  name: "move-down",
@@ -3637,7 +3645,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3637
3645
  r("button", {
3638
3646
  class: "action-btn",
3639
3647
  title: "编辑",
3640
- onClick: (A) => L(x)
3648
+ onClick: (A) => R(x)
3641
3649
  }, [
3642
3650
  Q(n(ee), {
3643
3651
  name: "edit",
@@ -3859,12 +3867,12 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3859
3867
  }
3860
3868
  })), z = (v) => {
3861
3869
  m.value = v;
3862
- }, I = (v) => {
3870
+ }, E = (v) => {
3863
3871
  const x = v.getHtml();
3864
3872
  b.value = x, t("update:modelValue", x), t("change", x);
3865
3873
  }, y = (v) => {
3866
3874
  t("focus", v);
3867
- }, L = (v) => {
3875
+ }, R = (v) => {
3868
3876
  t("blur", v);
3869
3877
  };
3870
3878
  return k({
@@ -3902,9 +3910,9 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3902
3910
  style: te(S.value),
3903
3911
  class: "x-rich-editor__content",
3904
3912
  onOnCreated: z,
3905
- onOnChange: I,
3913
+ onOnChange: E,
3906
3914
  onOnFocus: y,
3907
- onOnBlur: L
3915
+ onOnBlur: R
3908
3916
  }, null, 8, ["modelValue", "default-config", "mode", "style"])
3909
3917
  ], 64)) : (i(), d("div", {
3910
3918
  key: 1,
@@ -3944,9 +3952,9 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3944
3952
  return m.value.length === 0 ? "" : m.value.map((w) => y(w)).join(", ");
3945
3953
  if (c.value.length === 0) return "";
3946
3954
  if (a.showAllLevels)
3947
- return c.value.map((w) => L(w, c.value)).join(a.separator);
3955
+ return c.value.map((w) => R(w, c.value)).join(a.separator);
3948
3956
  const p = c.value[c.value.length - 1];
3949
- return L(p, c.value);
3957
+ return R(p, c.value);
3950
3958
  }), z = V(() => {
3951
3959
  var w;
3952
3960
  const p = [a.options];
@@ -3961,7 +3969,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3961
3969
  }
3962
3970
  }
3963
3971
  return p;
3964
- }), I = V(() => {
3972
+ }), E = V(() => {
3965
3973
  if (!a.filterable || !b.value) return null;
3966
3974
  const p = [], w = (C, o = []) => {
3967
3975
  var f;
@@ -3974,7 +3982,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
3974
3982
  }
3975
3983
  };
3976
3984
  return w(a.options), p;
3977
- }), y = (p) => p.map((w, C) => L(w, p.slice(0, C + 1))).join(a.separator), L = (p, w) => {
3985
+ }), y = (p) => p.map((w, C) => R(w, p.slice(0, C + 1))).join(a.separator), R = (p, w) => {
3978
3986
  let C = a.options;
3979
3987
  for (let f = 0; f < w.length - 1; f++) {
3980
3988
  const g = C.find((X) => X.value === w[f]);
@@ -4001,7 +4009,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4001
4009
  e("update:modelValue", p), e("change", p);
4002
4010
  }, A = () => {
4003
4011
  c.value = [], m.value = [], e("update:modelValue", S.value ? [] : ""), e("change", S.value ? [] : "");
4004
- }, F = (p) => {
4012
+ }, I = (p) => {
4005
4013
  b.value = p.target.value;
4006
4014
  }, Y = (p) => {
4007
4015
  c.value = p.map((w) => w.value), b.value = "", l.value = !1, v(c.value);
@@ -4026,7 +4034,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4026
4034
  value: b.value,
4027
4035
  placeholder: $.value || s.placeholder,
4028
4036
  class: u(n(t).e("filter-input")),
4029
- onInput: F
4037
+ onInput: I
4030
4038
  }, null, 42, Ia)) : (i(), d("span", {
4031
4039
  key: 1,
4032
4040
  class: u(n(t).e("text"))
@@ -4060,16 +4068,16 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4060
4068
  oe(r("div", {
4061
4069
  class: u(n(t).e("dropdown"))
4062
4070
  }, [
4063
- I.value ? (i(), d("div", {
4071
+ E.value ? (i(), d("div", {
4064
4072
  key: 0,
4065
4073
  class: u(n(t).e("filter-list"))
4066
4074
  }, [
4067
- (i(!0), d(J, null, _(I.value, (C, o) => (i(), d("div", {
4075
+ (i(!0), d(J, null, _(E.value, (C, o) => (i(), d("div", {
4068
4076
  key: o,
4069
4077
  class: u(n(t).e("filter-item")),
4070
4078
  onClick: (f) => Y(C.path)
4071
4079
  }, N(C.label), 11, Pa))), 128)),
4072
- I.value.length === 0 ? (i(), d("div", {
4080
+ E.value.length === 0 ? (i(), d("div", {
4073
4081
  key: 0,
4074
4082
  class: u(n(t).e("empty"))
4075
4083
  }, " 无匹配数据 ", 2)) : U("", !0)
@@ -4139,16 +4147,16 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4139
4147
  },
4140
4148
  emits: ["update:modelValue", "change"],
4141
4149
  setup(s, { emit: k }) {
4142
- const a = s, e = k, t = ae("color-picker"), l = B(!1), c = B(0), m = B(100), b = B(100), T = B(100), S = B(), D = B(), $ = V(() => y(c.value, m.value, b.value)), z = V(() => a.showAlpha ? `${$.value}${Math.round(T.value * 2.55).toString(16).padStart(2, "0")}` : $.value), I = V(() => a.modelValue || $.value), y = (F, Y, G) => {
4150
+ const a = s, e = k, t = ae("color-picker"), l = B(!1), c = B(0), m = B(100), b = B(100), T = B(100), S = B(), D = B(), $ = V(() => y(c.value, m.value, b.value)), z = V(() => a.showAlpha ? `${$.value}${Math.round(T.value * 2.55).toString(16).padStart(2, "0")}` : $.value), E = V(() => a.modelValue || $.value), y = (I, Y, G) => {
4143
4151
  Y /= 100, G /= 100;
4144
- const p = G * Y, w = p * (1 - Math.abs(F / 60 % 2 - 1)), C = G - p;
4152
+ const p = G * Y, w = p * (1 - Math.abs(I / 60 % 2 - 1)), C = G - p;
4145
4153
  let o = 0, f = 0, g = 0;
4146
- F >= 0 && F < 60 ? (o = p, f = w, g = 0) : F >= 60 && F < 120 ? (o = w, f = p, g = 0) : F >= 120 && F < 180 ? (o = 0, f = p, g = w) : F >= 180 && F < 240 ? (o = 0, f = w, g = p) : F >= 240 && F < 300 ? (o = w, f = 0, g = p) : (o = p, f = 0, g = w);
4154
+ I >= 0 && I < 60 ? (o = p, f = w, g = 0) : I >= 60 && I < 120 ? (o = w, f = p, g = 0) : I >= 120 && I < 180 ? (o = 0, f = p, g = w) : I >= 180 && I < 240 ? (o = 0, f = w, g = p) : I >= 240 && I < 300 ? (o = w, f = 0, g = p) : (o = p, f = 0, g = w);
4147
4155
  const X = (ne) => Math.round((ne + C) * 255).toString(16).padStart(2, "0");
4148
4156
  return `#${X(o)}${X(f)}${X(g)}`;
4149
- }, L = (F) => {
4150
- F = F.replace("#", "");
4151
- const Y = parseInt(F.slice(0, 2), 16) / 255, G = parseInt(F.slice(2, 4), 16) / 255, p = parseInt(F.slice(4, 6), 16) / 255, w = Math.max(Y, G, p), C = Math.min(Y, G, p), o = w - C;
4157
+ }, R = (I) => {
4158
+ I = I.replace("#", "");
4159
+ const Y = parseInt(I.slice(0, 2), 16) / 255, G = parseInt(I.slice(2, 4), 16) / 255, p = parseInt(I.slice(4, 6), 16) / 255, w = Math.max(Y, G, p), C = Math.min(Y, G, p), o = w - C;
4152
4160
  let f = 0;
4153
4161
  const g = w === 0 ? 0 : o / w, X = w;
4154
4162
  if (o !== 0)
@@ -4164,37 +4172,37 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4164
4172
  break;
4165
4173
  }
4166
4174
  return { h: f, s: g * 100, v: X * 100 };
4167
- }, H = (F) => {
4175
+ }, H = (I) => {
4168
4176
  if (!S.value) return;
4169
- const Y = S.value.getBoundingClientRect(), G = Math.max(0, Math.min(1, (F.clientX - Y.left) / Y.width)), p = Math.max(0, Math.min(1, (F.clientY - Y.top) / Y.height));
4177
+ const Y = S.value.getBoundingClientRect(), G = Math.max(0, Math.min(1, (I.clientX - Y.left) / Y.width)), p = Math.max(0, Math.min(1, (I.clientY - Y.top) / Y.height));
4170
4178
  m.value = Math.round(G * 100), b.value = Math.round((1 - p) * 100);
4171
- }, O = (F) => {
4179
+ }, O = (I) => {
4172
4180
  if (!D.value) return;
4173
- const Y = D.value.getBoundingClientRect(), G = Math.max(0, Math.min(1, (F.clientX - Y.left) / Y.width));
4181
+ const Y = D.value.getBoundingClientRect(), G = Math.max(0, Math.min(1, (I.clientX - Y.left) / Y.width));
4174
4182
  c.value = Math.round(G * 360);
4175
- }, M = (F) => {
4183
+ }, M = (I) => {
4176
4184
  if (!D.value) return;
4177
- const Y = D.value.getBoundingClientRect(), G = Math.max(0, Math.min(1, (F.clientX - Y.left) / Y.width));
4185
+ const Y = D.value.getBoundingClientRect(), G = Math.max(0, Math.min(1, (I.clientX - Y.left) / Y.width));
4178
4186
  T.value = Math.round(G * 100);
4179
- }, h = (F) => {
4180
- const Y = L(F);
4181
- c.value = Y.h, m.value = Y.s, b.value = Y.v, e("update:modelValue", F), e("change", F);
4187
+ }, h = (I) => {
4188
+ const Y = R(I);
4189
+ c.value = Y.h, m.value = Y.s, b.value = Y.v, e("update:modelValue", I), e("change", I);
4182
4190
  }, v = () => {
4183
4191
  e("update:modelValue", z.value), e("change", z.value), l.value = !1;
4184
4192
  }, x = () => {
4185
4193
  e("update:modelValue", ""), e("change", ""), l.value = !1;
4186
- }, A = (F) => {
4187
- F.target.closest(`.${t.b()}`) || (l.value = !1);
4194
+ }, A = (I) => {
4195
+ I.target.closest(`.${t.b()}`) || (l.value = !1);
4188
4196
  };
4189
- return ie(l, (F) => {
4190
- if (F) {
4197
+ return ie(l, (I) => {
4198
+ if (I) {
4191
4199
  if (document.addEventListener("click", A), a.modelValue) {
4192
- const Y = L(a.modelValue.slice(0, 7));
4200
+ const Y = R(a.modelValue.slice(0, 7));
4193
4201
  c.value = Y.h, m.value = Y.s, b.value = Y.v, a.showAlpha && a.modelValue.length === 9 && (T.value = Math.round(parseInt(a.modelValue.slice(7, 9), 16) / 2.55));
4194
4202
  }
4195
4203
  } else
4196
4204
  document.removeEventListener("click", A);
4197
- }), (F, Y) => (i(), d("div", {
4205
+ }), (I, Y) => (i(), d("div", {
4198
4206
  class: u([n(t).b(), n(t).m(s.size), n(t).is("disabled", s.disabled)]),
4199
4207
  onClick: Y[1] || (Y[1] = ue(() => {
4200
4208
  }, ["stop"]))
@@ -4205,9 +4213,9 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4205
4213
  }, [
4206
4214
  r("div", {
4207
4215
  class: u(n(t).e("color")),
4208
- style: te({ backgroundColor: I.value })
4216
+ style: te({ backgroundColor: E.value })
4209
4217
  }, [
4210
- I.value ? U("", !0) : (i(), fe(n(ee), {
4218
+ E.value ? U("", !0) : (i(), fe(n(ee), {
4211
4219
  key: 0,
4212
4220
  name: "close",
4213
4221
  size: 12
@@ -4337,11 +4345,11 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4337
4345
  c.value = h, e("update:modelValue", h), b.value = -1, D && clearTimeout(D), D = setTimeout(() => {
4338
4346
  h || a.triggerOnFocus ? $(h) : l.value = !1;
4339
4347
  }, a.debounce);
4340
- }, I = () => {
4348
+ }, E = () => {
4341
4349
  a.triggerOnFocus && c.value === "" && $("");
4342
4350
  }, y = (M) => {
4343
4351
  c.value = M[a.valueKey], e("update:modelValue", c.value), e("select", M), l.value = !1;
4344
- }, L = (M) => {
4352
+ }, R = (M) => {
4345
4353
  if (l.value)
4346
4354
  switch (M.key) {
4347
4355
  case "ArrowDown":
@@ -4386,8 +4394,8 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4386
4394
  disabled: s.disabled,
4387
4395
  class: u(n(t).e("inner")),
4388
4396
  onInput: z,
4389
- onFocus: I,
4390
- onKeydown: L
4397
+ onFocus: E,
4398
+ onKeydown: R
4391
4399
  }, null, 42, Na),
4392
4400
  s.clearable && c.value ? (i(), d("span", {
4393
4401
  key: 0,
@@ -4476,7 +4484,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4476
4484
  n(t).is("selected", z === m.value),
4477
4485
  n(t).is("disabled", $.disabled)
4478
4486
  ]),
4479
- onClick: (I) => T($)
4487
+ onClick: (E) => T($)
4480
4488
  }, [
4481
4489
  se(S.$slots, "default", { option: $ }, () => [
4482
4490
  de(N($.label), 1)
@@ -4501,7 +4509,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4501
4509
  setup(s, { emit: k }) {
4502
4510
  const a = s, e = k, t = ae("mention"), l = B(a.modelValue), c = B(!1), m = B([]), b = B(-1), T = B(), S = B(), D = B(0), $ = B(-1), z = (M) => {
4503
4511
  m.value = a.options.filter((h) => h.disabled ? !1 : (h.label || h.value).toLowerCase().includes(M.toLowerCase())), c.value = m.value.length > 0, b.value = -1;
4504
- }, I = (M) => {
4512
+ }, E = (M) => {
4505
4513
  const h = M.target;
4506
4514
  l.value = h.value, D.value = h.selectionStart || 0;
4507
4515
  const v = l.value.slice(0, D.value), x = v.lastIndexOf(a.prefix);
@@ -4517,7 +4525,7 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4517
4525
  const A = h.length + x.length;
4518
4526
  T.value && (T.value.setSelectionRange(A, A), T.value.focus()), S.value && (S.value.setSelectionRange(A, A), S.value.focus());
4519
4527
  });
4520
- }, L = (M) => {
4528
+ }, R = (M) => {
4521
4529
  if (c.value)
4522
4530
  switch (M.key) {
4523
4531
  case "ArrowDown":
@@ -4560,8 +4568,8 @@ const Yl = ["onClick"], Nl = ["placeholder", "disabled", "readonly", "value"], U
4560
4568
  placeholder: s.placeholder,
4561
4569
  disabled: s.disabled,
4562
4570
  class: u(n(t).e("inner")),
4563
- onInput: I,
4564
- onKeydown: L
4571
+ onInput: E,
4572
+ onKeydown: R
4565
4573
  }, null, 42, Ka),
4566
4574
  s.clearable && l.value ? (i(), d("span", {
4567
4575
  key: 0,