@xto/form 1.6.2 → 1.6.3

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 +469 -479
  2. package/lib/index.cjs +1 -1
  3. package/package.json +1 -1
package/es/index.mjs CHANGED
@@ -219,7 +219,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
219
219
  width: t.value,
220
220
  height: t.value,
221
221
  color: a.color
222
- })), v = V(() => ({
222
+ })), c = V(() => ({
223
223
  strokeWidth: a.strokeWidth
224
224
  })), m = V(() => [
225
225
  e.b(),
@@ -229,7 +229,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
229
229
  iconSize: t,
230
230
  iconStyle: l,
231
231
  iconPath: b
232
- }), (T, S) => (i(), d("span", {
232
+ }), (T, z) => (i(), d("span", {
233
233
  class: u(m.value),
234
234
  style: te(l.value),
235
235
  "aria-hidden": !s.name,
@@ -244,7 +244,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
244
244
  "stroke-width": s.strokeWidth,
245
245
  "stroke-linecap": "round",
246
246
  "stroke-linejoin": "round",
247
- style: te(v.value),
247
+ style: te(c.value),
248
248
  "aria-hidden": "true"
249
249
  }, [
250
250
  r("path", { d: b.value }, null, 8, Qe)
@@ -274,9 +274,9 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
274
274
  },
275
275
  emits: ["update:modelValue", "update:value", "input", "change", "focus", "blur", "clear"],
276
276
  setup(s, { expose: k, emit: a }) {
277
- const e = s, t = a, l = ae("input"), v = R(), m = R(!1), b = R(!1), T = Le(), S = V(
277
+ const e = s, t = a, l = ae("input"), c = R(), m = R(!1), b = R(!1), T = Le(), z = V(
278
278
  () => e.type === "password" && e.showPassword && !e.disabled
279
- ), D = V(() => S.value ? b.value ? "text" : "password" : e.type);
279
+ ), D = V(() => z.value ? b.value ? "text" : "password" : e.type);
280
280
  V(() => e.modelValue !== void 0), V(() => e.value !== void 0);
281
281
  const $ = R("");
282
282
  ie(
@@ -287,7 +287,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
287
287
  },
288
288
  { immediate: !0 }
289
289
  );
290
- const z = (B) => {
290
+ const S = (B) => {
291
291
  $.value = B, t("update:modelValue", B), t("update:value", B), t("input", B);
292
292
  }, I = V(() => String($.value).length), y = V(() => [
293
293
  l.b(),
@@ -295,7 +295,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
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
- l.is("has-suffix", e.suffixIcon || T.suffix || e.clearable || S.value || e.showWordLimit)
298
+ l.is("has-suffix", e.suffixIcon || T.suffix || e.clearable || z.value || e.showWordLimit)
299
299
  ]), L = (B) => {
300
300
  const F = B.target.value;
301
301
  t("change", F);
@@ -311,13 +311,13 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
311
311
  return k({
312
312
  focus: () => {
313
313
  var B;
314
- (B = v.value) == null || B.focus();
314
+ (B = c.value) == null || B.focus();
315
315
  },
316
316
  blur: () => {
317
317
  var B;
318
- (B = v.value) == null || B.blur();
318
+ (B = c.value) == null || B.blur();
319
319
  },
320
- inputRef: v
320
+ inputRef: c
321
321
  }), (B, F) => (i(), d("div", {
322
322
  class: u(y.value)
323
323
  }, [
@@ -333,7 +333,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
333
333
  ], 2)) : N("", !0),
334
334
  oe(r("input", {
335
335
  ref_key: "inputRef",
336
- ref: v,
336
+ ref: c,
337
337
  "onUpdate:modelValue": F[0] || (F[0] = (O) => $.value = O),
338
338
  type: D.value,
339
339
  placeholder: s.placeholder,
@@ -342,14 +342,14 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["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] = (O) => z(O.target.value)),
345
+ onInput: F[1] || (F[1] = (O) => S(O.target.value)),
346
346
  onChange: L,
347
347
  onFocus: H,
348
348
  onBlur: P
349
349
  }, null, 42, _e), [
350
350
  [Ke, $.value]
351
351
  ]),
352
- B.$slots.suffix || s.suffixIcon || s.clearable || S.value || s.showWordLimit ? (i(), d("span", {
352
+ B.$slots.suffix || s.suffixIcon || s.clearable || z.value || s.showWordLimit ? (i(), d("span", {
353
353
  key: 1,
354
354
  class: u(n(l).e("suffix"))
355
355
  }, [
@@ -364,7 +364,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
364
364
  size: 14
365
365
  })
366
366
  ], 2)) : N("", !0),
367
- S.value ? (i(), d("span", {
367
+ z.value ? (i(), d("span", {
368
368
  key: 1,
369
369
  class: u([n(l).e("icon"), n(l).e("password")]),
370
370
  onClick: h
@@ -402,7 +402,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
402
402
  },
403
403
  emits: ["update:modelValue", "update:value", "change", "focus", "blur"],
404
404
  setup(s, { expose: k, emit: a }) {
405
- const e = s, t = a, l = ae("input-number"), v = R(), m = R(!1), b = R(null), T = R(e.modelValue), S = V(() => {
405
+ const e = s, t = a, l = ae("input-number"), c = R(), m = R(!1), b = R(null), T = R(e.modelValue), z = V(() => {
406
406
  if (e.precision !== void 0)
407
407
  return e.precision;
408
408
  const o = D(e.step), f = e.modelValue !== void 0 && e.modelValue !== null ? D(e.modelValue) : 0;
@@ -413,12 +413,12 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
413
413
  const f = o.toString(), g = f.indexOf(".");
414
414
  return g === -1 ? 0 : f.length - g - 1;
415
415
  }
416
- function $(o, f = S.value) {
416
+ function $(o, f = z.value) {
417
417
  if (f === 0) return Math.round(o);
418
418
  let g = o.toFixed(f);
419
419
  return Number(g);
420
420
  }
421
- function z(o) {
421
+ function S(o) {
422
422
  return o > e.max ? e.max : o < e.min ? e.min : o;
423
423
  }
424
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), P = V(() => [
@@ -430,20 +430,20 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["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);
434
- c(g);
433
+ const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o + e.step), g = S(f);
434
+ v(g);
435
435
  }
436
436
  function h() {
437
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);
439
- c(g);
438
+ const o = I.value ?? (e.min === -1 / 0 ? 0 : e.min), f = $(o - e.step), g = S(f);
439
+ v(g);
440
440
  }
441
- function c(o) {
441
+ function v(o) {
442
442
  const f = T.value;
443
443
  if (o === void 0)
444
444
  e.modelValue !== void 0 && t("update:modelValue", void 0), e.value !== void 0 && t("update:value", void 0), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", void 0), t("change", void 0, f);
445
445
  else {
446
- const g = $(o), X = z(g);
446
+ const g = $(o), X = S(g);
447
447
  if (e.stepStrictly) {
448
448
  const ne = Math.round((X - e.min) / e.step), K = $(e.min + ne * e.step);
449
449
  e.modelValue !== void 0 && t("update:modelValue", K), e.value !== void 0 && t("update:value", K), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", K), t("change", K, f);
@@ -469,7 +469,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
469
469
  function F(o) {
470
470
  if (m.value = !1, b.value !== null) {
471
471
  const f = x(b.value);
472
- f === void 0 ? e.valueOnClear !== null ? c(e.valueOnClear) : b.value = null : c(f);
472
+ f === void 0 ? e.valueOnClear !== null ? v(e.valueOnClear) : b.value = null : v(f);
473
473
  }
474
474
  t("blur", o);
475
475
  }
@@ -487,20 +487,20 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
487
487
  o.preventDefault(), h();
488
488
  break;
489
489
  case "Enter":
490
- (f = v.value) == null || f.blur();
490
+ (f = c.value) == null || f.blur();
491
491
  break;
492
492
  }
493
493
  }
494
494
  function p() {
495
- b.value = null, e.valueOnClear !== null && e.valueOnClear !== void 0 ? c(e.valueOnClear) : (e.modelValue !== void 0 && t("update:modelValue", void 0), e.value !== void 0 && t("update:value", void 0), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", void 0), t("change", void 0, T.value), T.value = void 0);
495
+ b.value = null, e.valueOnClear !== null && e.valueOnClear !== void 0 ? v(e.valueOnClear) : (e.modelValue !== void 0 && t("update:modelValue", void 0), e.value !== void 0 && t("update:value", void 0), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", void 0), t("change", void 0, T.value), T.value = void 0);
496
496
  }
497
497
  function w() {
498
498
  var o;
499
- (o = v.value) == null || o.focus();
499
+ (o = c.value) == null || o.focus();
500
500
  }
501
501
  function C() {
502
502
  var o;
503
- (o = v.value) == null || o.blur();
503
+ (o = c.value) == null || o.blur();
504
504
  }
505
505
  return ie([() => e.modelValue, () => e.value], ([o, f]) => {
506
506
  T.value = o ?? f, b.value = null;
@@ -525,7 +525,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
525
525
  }, [
526
526
  r("input", {
527
527
  ref_key: "inputRef",
528
- ref: v,
528
+ ref: c,
529
529
  value: y.value,
530
530
  placeholder: s.placeholder,
531
531
  disabled: s.disabled,
@@ -565,32 +565,32 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
565
565
  },
566
566
  emits: ["update:modelValue", "update:value", "input", "change", "focus", "blur"],
567
567
  setup(s, { expose: k, emit: a }) {
568
- const e = s, t = a, l = ae("textarea"), v = R(), m = R(!1), b = R("");
568
+ const e = s, t = a, l = ae("textarea"), c = R(), m = R(!1), b = R("");
569
569
  ie(
570
570
  [() => e.modelValue, () => e.value],
571
571
  ([M, h]) => {
572
- const c = M ?? h ?? "";
573
- c !== b.value && (b.value = c);
572
+ const v = M ?? h ?? "";
573
+ v !== b.value && (b.value = v);
574
574
  },
575
575
  { immediate: !0 }
576
576
  );
577
577
  const T = (M) => {
578
578
  b.value = M, t("update:modelValue", M), t("update:value", M), t("input", M);
579
- }, S = V(() => String(b.value).length), D = V(() => {
579
+ }, z = V(() => String(b.value).length), D = V(() => {
580
580
  const M = {};
581
581
  if (e.resize && (M.resize = e.resize), e.autosize && (M.minHeight = "auto", typeof e.autosize == "object")) {
582
- const h = e.autosize.minRows || 1, c = e.autosize.maxRows;
583
- M.minHeight = `${h * 22 + 12}px`, c && (M.maxHeight = `${c * 22 + 12}px`);
582
+ const h = e.autosize.minRows || 1, v = e.autosize.maxRows;
583
+ M.minHeight = `${h * 22 + 12}px`, v && (M.maxHeight = `${v * 22 + 12}px`);
584
584
  }
585
585
  return M;
586
586
  }), $ = V(() => [
587
587
  l.b(),
588
588
  l.is("disabled", e.disabled),
589
589
  l.is("focus", m.value),
590
- l.is("exceed", e.maxlength && S.value > e.maxlength)
591
- ]), z = (M) => {
590
+ l.is("exceed", e.maxlength && z.value > e.maxlength)
591
+ ]), S = (M) => {
592
592
  const h = M.target.value;
593
- T(h), e.autosize && v.value && (v.value.style.height = "auto", v.value.style.height = `${v.value.scrollHeight}px`);
593
+ T(h), e.autosize && c.value && (c.value.style.height = "auto", c.value.style.height = `${c.value.scrollHeight}px`);
594
594
  }, I = (M) => {
595
595
  const h = M.target.value;
596
596
  t("change", h);
@@ -602,21 +602,21 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
602
602
  return k({
603
603
  focus: () => {
604
604
  var M;
605
- (M = v.value) == null || M.focus();
605
+ (M = c.value) == null || M.focus();
606
606
  },
607
607
  blur: () => {
608
608
  var M;
609
- (M = v.value) == null || M.blur();
609
+ (M = c.value) == null || M.blur();
610
610
  },
611
- textareaRef: v
611
+ textareaRef: c
612
612
  }), (M, h) => (i(), d("div", {
613
613
  class: u($.value),
614
614
  style: te(s.disabled ? void 0 : { cursor: "text" })
615
615
  }, [
616
616
  oe(r("textarea", {
617
617
  ref_key: "textareaRef",
618
- ref: v,
619
- "onUpdate:modelValue": h[0] || (h[0] = (c) => b.value = c),
618
+ ref: c,
619
+ "onUpdate:modelValue": h[0] || (h[0] = (v) => b.value = v),
620
620
  placeholder: s.placeholder,
621
621
  disabled: s.disabled,
622
622
  readonly: s.readonly,
@@ -625,7 +625,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
625
625
  rows: s.rows,
626
626
  style: te(D.value),
627
627
  class: u(n(l).e("inner")),
628
- onInput: z,
628
+ onInput: S,
629
629
  onChange: I,
630
630
  onFocus: y,
631
631
  onBlur: L
@@ -635,7 +635,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
635
635
  s.showWordLimit && s.maxlength ? (i(), d("span", {
636
636
  key: 0,
637
637
  class: u(n(l).e("count"))
638
- }, U(S.value) + "/" + U(s.maxlength), 3)) : N("", !0)
638
+ }, U(z.value) + "/" + U(s.maxlength), 3)) : N("", !0)
639
639
  ], 6));
640
640
  }
641
641
  }), Za = /* @__PURE__ */ le({
@@ -653,20 +653,20 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
653
653
  },
654
654
  emits: ["update:modelValue", "update:checked", "change"],
655
655
  setup(s, { emit: k }) {
656
- const a = s, e = k, t = ae("switch"), l = V(() => a.modelValue !== void 0 ? a.modelValue : a.checked !== void 0 ? a.checked : !1), v = V(() => l.value === a.activeValue), m = V(() => [
656
+ const a = s, e = k, t = ae("switch"), l = V(() => a.modelValue !== void 0 ? a.modelValue : a.checked !== void 0 ? a.checked : !1), c = V(() => l.value === a.activeValue), m = V(() => [
657
657
  t.b(),
658
658
  t.is("disabled", a.disabled),
659
- t.is("checked", v.value)
659
+ t.is("checked", c.value)
660
660
  ]), b = V(() => ({
661
661
  width: typeof a.width == "number" ? `${a.width}px` : a.width,
662
662
  height: "20px",
663
- backgroundColor: v.value ? a.activeColor : a.inactiveColor
663
+ backgroundColor: c.value ? a.activeColor : a.inactiveColor
664
664
  })), T = () => {
665
665
  if (a.disabled) return;
666
- const S = v.value ? a.inactiveValue : a.activeValue;
667
- a.modelValue !== void 0 && e("update:modelValue", S), a.checked !== void 0 && e("update:checked", S), a.modelValue === void 0 && a.checked === void 0 && e("update:modelValue", S), e("change", S);
666
+ const z = c.value ? a.inactiveValue : a.activeValue;
667
+ a.modelValue !== void 0 && e("update:modelValue", z), a.checked !== void 0 && e("update:checked", z), a.modelValue === void 0 && a.checked === void 0 && e("update:modelValue", z), e("change", z);
668
668
  };
669
- return (S, D) => (i(), d("span", {
669
+ return (z, D) => (i(), d("span", {
670
670
  class: u(m.value),
671
671
  onClick: T
672
672
  }, [
@@ -674,11 +674,11 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
674
674
  class: u(n(t).e("core")),
675
675
  style: te(b.value)
676
676
  }, null, 6),
677
- S.$slots.default ? (i(), d("span", {
677
+ z.$slots.default ? (i(), d("span", {
678
678
  key: 0,
679
679
  class: u(n(t).e("text"))
680
680
  }, [
681
- se(S.$slots, "default")
681
+ se(z.$slots, "default")
682
682
  ], 2)) : N("", !0)
683
683
  ], 2));
684
684
  }
@@ -694,16 +694,16 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
694
694
  },
695
695
  emits: ["update:modelValue", "change"],
696
696
  setup(s, { emit: k }) {
697
- const a = s, e = k, t = ae("radio"), l = Ve("radioGroup", null), v = V(() => !!l), m = V(() => v.value ? l.modelValue.value : a.modelValue), b = V(() => a.value ?? a.label), T = V(() => m.value === b.value), S = V(() => a.disabled || v.value && l.disabled), D = V(() => a.name || (v.value ? l.name : void 0)), $ = V(() => [
697
+ const a = s, e = k, t = ae("radio"), l = Ve("radioGroup", null), c = V(() => !!l), m = V(() => c.value ? l.modelValue.value : a.modelValue), b = V(() => a.value ?? a.label), T = V(() => m.value === b.value), z = V(() => a.disabled || c.value && l.disabled), D = V(() => a.name || (c.value ? l.name : void 0)), $ = V(() => [
698
698
  t.b(),
699
699
  t.is("checked", T.value),
700
- t.is("disabled", S.value)
701
- ]), z = () => {
702
- S.value || (v.value ? l.changeValue(b.value) : (e("update:modelValue", b.value), e("change", b.value)));
700
+ t.is("disabled", z.value)
701
+ ]), S = () => {
702
+ z.value || (c.value ? l.changeValue(b.value) : (e("update:modelValue", b.value), e("change", b.value)));
703
703
  };
704
704
  return (I, y) => (i(), d("label", {
705
705
  class: u($.value),
706
- onClick: ue(z, ["prevent"])
706
+ onClick: ue(S, ["prevent"])
707
707
  }, [
708
708
  r("span", {
709
709
  class: u(n(t).e("input"))
@@ -711,7 +711,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
711
711
  r("input", {
712
712
  type: "radio",
713
713
  checked: T.value,
714
- disabled: S.value,
714
+ disabled: z.value,
715
715
  name: D.value,
716
716
  value: b.value
717
717
  }, null, 8, nl)
@@ -737,19 +737,19 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
737
737
  },
738
738
  emits: ["update:modelValue", "update:value", "change"],
739
739
  setup(s, { emit: k }) {
740
- const a = s, e = k, t = ae("radio-group"), l = (v) => {
741
- a.modelValue !== void 0 && e("update:modelValue", v), a.value !== void 0 && e("update:value", v), a.modelValue === void 0 && a.value === void 0 && e("update:modelValue", v), e("change", v);
740
+ const a = s, e = k, t = ae("radio-group"), l = (c) => {
741
+ a.modelValue !== void 0 && e("update:modelValue", c), a.value !== void 0 && e("update:value", c), a.modelValue === void 0 && a.value === void 0 && e("update:modelValue", c), e("change", c);
742
742
  };
743
743
  return Ce("radioGroup", {
744
744
  modelValue: V(() => a.modelValue ?? a.value),
745
745
  name: a.name || `radio-group-${Date.now()}`,
746
746
  disabled: a.disabled,
747
747
  changeValue: l
748
- }), (v, m) => (i(), d("div", {
748
+ }), (c, m) => (i(), d("div", {
749
749
  class: u(n(t).b()),
750
750
  role: "radiogroup"
751
751
  }, [
752
- se(v.$slots, "default")
752
+ se(c.$slots, "default")
753
753
  ], 2));
754
754
  }
755
755
  }), sl = ["checked", "disabled", "value"], et = /* @__PURE__ */ le({
@@ -763,15 +763,15 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
763
763
  },
764
764
  emits: ["update:modelValue", "change"],
765
765
  setup(s, { emit: k }) {
766
- const a = s, e = ae("radio-button"), t = Ve("radioGroup", null), l = V(() => !!t), v = V(() => l.value ? t.modelValue.value : null), m = V(() => a.value ?? a.label), b = V(() => v.value === m.value), T = V(() => a.disabled || l.value && t.disabled), S = V(() => [
766
+ const a = s, e = ae("radio-button"), t = Ve("radioGroup", null), l = V(() => !!t), c = V(() => l.value ? t.modelValue.value : null), m = V(() => a.value ?? a.label), b = V(() => c.value === m.value), T = V(() => a.disabled || l.value && t.disabled), z = V(() => [
767
767
  e.b(),
768
768
  e.is("active", b.value),
769
769
  e.is("disabled", T.value)
770
770
  ]), D = () => {
771
771
  T.value || l.value && t.changeValue(m.value);
772
772
  };
773
- return ($, z) => (i(), d("label", {
774
- class: u(S.value),
773
+ return ($, S) => (i(), d("label", {
774
+ class: u(z.value),
775
775
  onClick: ue(D, ["prevent"])
776
776
  }, [
777
777
  r("input", {
@@ -803,34 +803,34 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
803
803
  },
804
804
  emits: ["update:modelValue", "change"],
805
805
  setup(s, { emit: k }) {
806
- const a = s, e = k, t = ae("checkbox"), l = Ve("checkboxGroup", null), v = V(() => !!l), m = V(() => a.value ?? a.label), b = V(() => v.value ? l.modelValue.value.includes(m.value) : Array.isArray(a.modelValue) ? a.modelValue.includes(m.value) : !!a.modelValue), T = V(() => {
806
+ const a = s, e = k, t = ae("checkbox"), l = Ve("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
- if (v.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 : $;
808
+ if (c.value) {
809
+ const $ = l.disabled, S = l.min > 0 && l.modelValue.value.length <= l.min, I = l.max > 0 && l.modelValue.value.length >= l.max;
810
+ return b.value && S || !b.value && I ? !0 : $;
811
811
  }
812
812
  return !1;
813
- }), S = V(() => [
813
+ }), z = V(() => [
814
814
  t.b(),
815
815
  t.is("checked", b.value),
816
816
  t.is("disabled", T.value),
817
817
  t.is("indeterminate", a.indeterminate && !b.value)
818
818
  ]), D = () => {
819
819
  if (!T.value)
820
- if (v.value)
820
+ if (c.value)
821
821
  l.changeValue(m.value);
822
822
  else {
823
823
  let $;
824
824
  if (Array.isArray(a.modelValue)) {
825
- const z = a.modelValue.indexOf(m.value);
826
- z > -1 ? $ = [...a.modelValue.slice(0, z), ...a.modelValue.slice(z + 1)] : $ = [...a.modelValue, m.value];
825
+ const S = a.modelValue.indexOf(m.value);
826
+ S > -1 ? $ = [...a.modelValue.slice(0, S), ...a.modelValue.slice(S + 1)] : $ = [...a.modelValue, m.value];
827
827
  } else
828
828
  $ = !a.modelValue;
829
829
  e("update:modelValue", $), e("change", $);
830
830
  }
831
831
  };
832
- return ($, z) => (i(), d("label", {
833
- class: u(S.value),
832
+ return ($, S) => (i(), d("label", {
833
+ class: u(z.value),
834
834
  onClick: ue(D, ["prevent"])
835
835
  }, [
836
836
  r("span", {
@@ -865,9 +865,9 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
865
865
  },
866
866
  emits: ["update:modelValue", "change"],
867
867
  setup(s, { emit: k }) {
868
- const a = s, e = k, t = ae("checkbox-group"), l = (v) => {
869
- const m = [...a.modelValue], b = m.indexOf(v);
870
- b > -1 ? m.splice(b, 1) : m.push(v), e("update:modelValue", m), e("change", m);
868
+ const a = s, e = k, t = ae("checkbox-group"), l = (c) => {
869
+ const m = [...a.modelValue], b = m.indexOf(c);
870
+ b > -1 ? m.splice(b, 1) : m.push(c), e("update:modelValue", m), e("change", m);
871
871
  };
872
872
  return Ce("checkboxGroup", {
873
873
  modelValue: V(() => a.modelValue),
@@ -875,11 +875,11 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
875
875
  min: a.min,
876
876
  max: a.max,
877
877
  changeValue: l
878
- }), (v, m) => (i(), d("div", {
878
+ }), (c, m) => (i(), d("div", {
879
879
  class: u(n(t).b()),
880
880
  role: "group"
881
881
  }, [
882
- se(v.$slots, "default")
882
+ se(c.$slots, "default")
883
883
  ], 2));
884
884
  }
885
885
  }), tt = /* @__PURE__ */ le({
@@ -897,40 +897,40 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
897
897
  },
898
898
  emits: ["validate", "submit", "reset"],
899
899
  setup(s, { expose: k, emit: a }) {
900
- const e = s, t = a, l = ae("form"), v = R([]), m = V(() => e.layout === "inline" || e.inline), b = V(() => e.layout === "vertical" || e.labelPosition === "top"), T = V(() => [
900
+ const e = s, t = a, l = ae("form"), c = R([]), m = V(() => e.layout === "inline" || e.inline), b = V(() => e.layout === "vertical" || e.labelPosition === "top"), T = V(() => [
901
901
  l.b(),
902
902
  l.m(`label-${b.value ? "top" : e.labelPosition}`),
903
903
  l.is("inline", m.value),
904
904
  l.is("vertical", b.value)
905
- ]), S = V(() => ({ width: typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth })), D = (h) => {
906
- v.value.push(h);
905
+ ]), z = V(() => ({ width: typeof e.labelWidth == "number" ? `${e.labelWidth}px` : e.labelWidth })), D = (h) => {
906
+ c.value.push(h);
907
907
  }, $ = (h) => {
908
- const c = v.value.indexOf(h);
909
- c > -1 && v.value.splice(c, 1);
910
- }, z = async () => {
908
+ const v = c.value.indexOf(h);
909
+ v > -1 && c.value.splice(v, 1);
910
+ }, S = async () => {
911
911
  let h = !0;
912
- for (const c of v.value)
913
- await c.validate() || (h = !1);
912
+ for (const v of c.value)
913
+ await v.validate() || (h = !1);
914
914
  return h;
915
915
  }, I = async (h) => {
916
- const c = Array.isArray(h) ? h : [h];
916
+ const v = Array.isArray(h) ? h : [h];
917
917
  let x = !0;
918
- for (const B of v.value)
919
- c.includes(B.prop) && (await B.validate() || (x = !1));
918
+ for (const B of c.value)
919
+ v.includes(B.prop) && (await B.validate() || (x = !1));
920
920
  return x;
921
921
  }, y = () => {
922
- v.value.forEach((h) => {
922
+ c.value.forEach((h) => {
923
923
  h.resetField();
924
924
  });
925
925
  }, L = (h) => {
926
926
  if (h) {
927
- const c = Array.isArray(h) ? h : [h];
928
- v.value.forEach((x) => {
929
- c.includes(x.prop) && x.clearValidate();
927
+ const v = Array.isArray(h) ? h : [h];
928
+ c.value.forEach((x) => {
929
+ v.includes(x.prop) && x.clearValidate();
930
930
  });
931
931
  } else
932
- v.value.forEach((c) => {
933
- c.clearValidate();
932
+ c.value.forEach((v) => {
933
+ v.clearValidate();
934
934
  });
935
935
  }, H = (h) => {
936
936
  console.log("[XForm] handleSubmit triggered", h), h.preventDefault(), t("submit");
@@ -944,16 +944,16 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
944
944
  labelPosition: b.value ? "top" : e.labelPosition,
945
945
  disabled: e.disabled,
946
946
  size: e.size,
947
- labelStyle: S,
947
+ labelStyle: z,
948
948
  addField: D,
949
949
  removeField: $,
950
950
  emit: t
951
951
  }), k({
952
- validate: z,
952
+ validate: S,
953
953
  validateField: I,
954
954
  resetFields: y,
955
955
  clearValidate: L
956
- }), (h, c) => (i(), d("form", {
956
+ }), (h, v) => (i(), d("form", {
957
957
  class: u(T.value),
958
958
  onSubmit: H,
959
959
  onReset: P
@@ -973,10 +973,10 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
973
973
  showMessage: { type: Boolean }
974
974
  },
975
975
  setup(s, { expose: k }) {
976
- const a = s, e = Le(), t = ae("form-item"), l = Ve("form", null), v = R(""), m = R(""), b = V(() => a.required ? !0 : T().some((P) => P.required)), T = () => {
976
+ const a = s, e = Le(), t = ae("form-item"), l = Ve("form", null), c = R(""), m = R(""), b = V(() => a.required ? !0 : T().some((P) => P.required)), T = () => {
977
977
  const H = [];
978
978
  return a.rules && H.push(...a.rules), l && a.prop && l.rules[a.prop] && H.push(...l.rules[a.prop]), H;
979
- }, S = () => {
979
+ }, z = () => {
980
980
  var H;
981
981
  if (!(!l || !a.prop))
982
982
  return (H = l.model.value) == null ? void 0 : H[a.prop];
@@ -985,28 +985,28 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
985
985
  }, $ = async (H) => {
986
986
  const P = T();
987
987
  if (P.length === 0)
988
- return v.value = "valid", !0;
989
- const M = S();
990
- let h = !0, c = "";
988
+ return c.value = "valid", !0;
989
+ const M = z();
990
+ let h = !0, v = "";
991
991
  for (const x of P)
992
992
  if (!(H && x.trigger && x.trigger !== H)) {
993
993
  if (x.required && (M == null || M === "" || Array.isArray(M) && M.length === 0)) {
994
- h = !1, c = x.message || "该字段为必填项";
994
+ h = !1, v = x.message || "该字段为必填项";
995
995
  break;
996
996
  }
997
997
  if (x.min !== void 0 || x.max !== void 0) {
998
998
  const B = typeof M == "string" ? M.length : 0;
999
999
  if (x.min !== void 0 && B < x.min) {
1000
- h = !1, c = x.message || `长度不能小于 ${x.min} 个字符`;
1000
+ h = !1, v = x.message || `长度不能小于 ${x.min} 个字符`;
1001
1001
  break;
1002
1002
  }
1003
1003
  if (x.max !== void 0 && B > x.max) {
1004
- h = !1, c = x.message || `长度不能大于 ${x.max} 个字符`;
1004
+ h = !1, v = x.message || `长度不能大于 ${x.max} 个字符`;
1005
1005
  break;
1006
1006
  }
1007
1007
  }
1008
1008
  if (x.pattern && M && !x.pattern.test(M)) {
1009
- h = !1, c = x.message || "格式不正确";
1009
+ h = !1, v = x.message || "格式不正确";
1010
1010
  break;
1011
1011
  }
1012
1012
  if (x.validator)
@@ -1017,43 +1017,43 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
1017
1017
  });
1018
1018
  });
1019
1019
  } catch (B) {
1020
- h = !1, c = B.message || x.message || "验证失败";
1020
+ h = !1, v = B.message || x.message || "验证失败";
1021
1021
  break;
1022
1022
  }
1023
1023
  }
1024
- return v.value = h ? "valid" : "invalid", m.value = c, l && a.prop && l.emit("validate", a.prop, h, c), h;
1025
- }, z = () => {
1024
+ return c.value = h ? "valid" : "invalid", m.value = v, l && a.prop && l.emit("validate", a.prop, h, v), h;
1025
+ }, S = () => {
1026
1026
  D(void 0), I();
1027
1027
  }, I = () => {
1028
- v.value = "", m.value = "";
1028
+ c.value = "", m.value = "";
1029
1029
  }, y = V(() => [
1030
1030
  t.b(),
1031
1031
  t.is("required", b.value),
1032
- t.is("error", v.value === "invalid"),
1033
- t.is("success", v.value === "valid")
1032
+ t.is("error", c.value === "invalid"),
1033
+ t.is("success", c.value === "valid")
1034
1034
  ]), L = 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
  });
1038
- return ie(() => S(), () => {
1039
- v.value === "invalid" && $("change");
1038
+ return ie(() => z(), () => {
1039
+ c.value === "invalid" && $("change");
1040
1040
  }), pe(() => {
1041
1041
  l && a.prop && l.addField({
1042
1042
  prop: a.prop,
1043
1043
  validate: $,
1044
- resetField: z,
1044
+ resetField: S,
1045
1045
  clearValidate: I
1046
1046
  });
1047
1047
  }), $e(() => {
1048
1048
  l && a.prop && l.removeField({
1049
1049
  prop: a.prop,
1050
1050
  validate: $,
1051
- resetField: z,
1051
+ resetField: S,
1052
1052
  clearValidate: I
1053
1053
  });
1054
1054
  }), k({
1055
1055
  validate: $,
1056
- resetField: z,
1056
+ resetField: S,
1057
1057
  clearValidate: I
1058
1058
  }), (H, P) => (i(), d("div", {
1059
1059
  class: u(y.value)
@@ -1071,7 +1071,7 @@ const Je = ["aria-hidden", "aria-label"], Ze = ["stroke-width"], Qe = ["d"], ee
1071
1071
  class: u(n(t).e("content"))
1072
1072
  }, [
1073
1073
  se(H.$slots, "default"),
1074
- s.showMessage !== !1 && v.value === "invalid" ? (i(), d("div", {
1074
+ s.showMessage !== !1 && c.value === "invalid" ? (i(), d("div", {
1075
1075
  key: 0,
1076
1076
  class: u(n(t).e("error"))
1077
1077
  }, U(m.value), 3)) : N("", !0)
@@ -1098,18 +1098,18 @@ function Ye(s, k, a) {
1098
1098
  }
1099
1099
  function dl(s, k, a = 0) {
1100
1100
  const e = [], t = ol(s, k), l = il(s, k);
1101
- let v = new Date(s, k, 1);
1101
+ let c = new Date(s, k, 1);
1102
1102
  const m = (l - a + 7) % 7;
1103
- v.setDate(1 - m);
1104
- let b = [], T = new Date(v);
1103
+ c.setDate(1 - m);
1104
+ let b = [], T = new Date(c);
1105
1105
  for (; (T.getMonth() <= k || T.getMonth() === k && T.getDate() <= t) && (b.push(new Date(T)), !(b.length === 7 && (e.push(b), b = [], T.getMonth() > k) || (T.setDate(T.getDate() + 1), e.length > 7))); )
1106
1106
  ;
1107
1107
  return b.length > 0 && e.push(b), e;
1108
1108
  }
1109
1109
  function ce(s, k = "YYYY-MM-DD") {
1110
1110
  if (!s) return "";
1111
- const a = s.getFullYear(), e = s.getMonth() + 1, t = s.getDate(), l = s.getHours(), v = s.getMinutes(), m = s.getSeconds();
1112
- return k.replace(/YYYY/g, String(a)).replace(/YY/g, String(a).slice(-2)).replace(/MM/g, String(e).padStart(2, "0")).replace(/M/g, String(e)).replace(/DD/g, String(t).padStart(2, "0")).replace(/D/g, String(t)).replace(/HH/g, String(l).padStart(2, "0")).replace(/H/g, String(l)).replace(/mm/g, String(v).padStart(2, "0")).replace(/m/g, String(v)).replace(/ss/g, String(m).padStart(2, "0")).replace(/s/g, String(m));
1111
+ const a = s.getFullYear(), e = s.getMonth() + 1, t = s.getDate(), l = s.getHours(), c = s.getMinutes(), m = s.getSeconds();
1112
+ return k.replace(/YYYY/g, String(a)).replace(/YY/g, String(a).slice(-2)).replace(/MM/g, String(e).padStart(2, "0")).replace(/M/g, String(e)).replace(/DD/g, String(t).padStart(2, "0")).replace(/D/g, String(t)).replace(/HH/g, String(l).padStart(2, "0")).replace(/H/g, String(l)).replace(/mm/g, String(c).padStart(2, "0")).replace(/m/g, String(c)).replace(/ss/g, String(m).padStart(2, "0")).replace(/s/g, String(m));
1113
1113
  }
1114
1114
  function ve(s) {
1115
1115
  if (!s || Array.isArray(s)) return null;
@@ -1186,37 +1186,37 @@ const pl = [
1186
1186
  },
1187
1187
  emits: ["pick", "range-select", "range-move", "update:viewedMonth"],
1188
1188
  setup(s, { emit: k }) {
1189
- const a = s, e = k, t = ae("date-table"), l = R(null), v = V(() => a.viewedMonth.getFullYear()), m = V(() => a.viewedMonth.getMonth()), b = V(() => dl(v.value, m.value, 0)), T = (h) => a.modelValue ? he(h, a.modelValue) : !1, S = (h) => he(h, /* @__PURE__ */ new Date()), D = (h) => rl(h, a.viewedMonth), $ = (h) => {
1189
+ const a = s, e = k, t = ae("date-table"), l = R(null), c = V(() => a.viewedMonth.getFullYear()), m = V(() => a.viewedMonth.getMonth()), b = V(() => dl(c.value, m.value, 0)), T = (h) => a.modelValue ? he(h, a.modelValue) : !1, z = (h) => he(h, /* @__PURE__ */ new Date()), D = (h) => rl(h, a.viewedMonth), $ = (h) => {
1190
1190
  if (a.selectionMode !== "range") return !1;
1191
- const { startDate: c, endDate: x, selecting: B } = a.rangeState || {};
1192
- if (B && c) {
1191
+ const { startDate: v, endDate: x, selecting: B } = a.rangeState || {};
1192
+ if (B && v) {
1193
1193
  const F = l.value;
1194
1194
  if (F) {
1195
- const O = c < F ? c : F, j = c < F ? F : c;
1195
+ const O = v < F ? v : F, j = v < F ? F : v;
1196
1196
  return Ye(h, O, j);
1197
1197
  }
1198
- return he(h, c);
1198
+ return he(h, v);
1199
1199
  }
1200
- return c && x ? Ye(h, c, x) : !1;
1201
- }, z = (h) => {
1200
+ return v && x ? Ye(h, v, x) : !1;
1201
+ }, S = (h) => {
1202
1202
  if (a.selectionMode !== "range") return !1;
1203
- const { startDate: c, selecting: x } = a.rangeState || {};
1204
- return x && c && l.value ? he(h, c < l.value ? c : l.value) : c ? he(h, c) : !1;
1203
+ const { startDate: v, selecting: x } = a.rangeState || {};
1204
+ return x && v && l.value ? he(h, v < l.value ? v : l.value) : v ? he(h, v) : !1;
1205
1205
  }, I = (h) => {
1206
1206
  if (a.selectionMode !== "range") return !1;
1207
- const { endDate: c, selecting: x } = a.rangeState || {};
1207
+ const { endDate: v, selecting: x } = a.rangeState || {};
1208
1208
  if (x && l.value) {
1209
1209
  const { startDate: B } = a.rangeState || {};
1210
1210
  return he(h, B < l.value ? l.value : B);
1211
1211
  }
1212
- return c ? he(h, c) : !1;
1212
+ return v ? he(h, v) : !1;
1213
1213
  }, y = (h) => hl(h, a.disabledDate, a.minDate, a.maxDate), L = (h) => [
1214
1214
  t.e("cell"),
1215
1215
  t.is("selected", T(h)),
1216
- t.is("today", S(h)),
1216
+ t.is("today", z(h)),
1217
1217
  t.is("disabled", y(h)),
1218
1218
  t.is("in-range", $(h)),
1219
- t.is("range-start", z(h)),
1219
+ t.is("range-start", S(h)),
1220
1220
  t.is("range-end", I(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)
@@ -1227,7 +1227,7 @@ const pl = [
1227
1227
  }, M = () => {
1228
1228
  l.value = null;
1229
1229
  };
1230
- return (h, c) => (i(), d("table", {
1230
+ return (h, v) => (i(), d("table", {
1231
1231
  class: u(n(t).b()),
1232
1232
  cellspacing: "0",
1233
1233
  cellpadding: "0"
@@ -1269,21 +1269,21 @@ const pl = [
1269
1269
  setup(s, { emit: k }) {
1270
1270
  const a = s, e = k, t = ae("month-table");
1271
1271
  V(() => a.modelValue ? a.modelValue.getMonth() : -1);
1272
- const l = (D) => a.modelValue ? a.modelValue.getFullYear() === a.viewedYear && a.modelValue.getMonth() === D : !1, v = (D) => {
1272
+ const l = (D) => a.modelValue ? a.modelValue.getFullYear() === a.viewedYear && a.modelValue.getMonth() === D : !1, c = (D) => {
1273
1273
  const $ = /* @__PURE__ */ new Date();
1274
1274
  return $.getFullYear() === a.viewedYear && $.getMonth() === D;
1275
1275
  }, m = (D) => {
1276
1276
  if (!a.disabledDate) return !1;
1277
- const $ = new Date(a.viewedYear, D, 1), z = new Date(a.viewedYear, D + 1, 0);
1278
- return a.disabledDate($) && a.disabledDate(z);
1277
+ const $ = new Date(a.viewedYear, D, 1), S = new Date(a.viewedYear, D + 1, 0);
1278
+ return a.disabledDate($) && a.disabledDate(S);
1279
1279
  }, b = (D) => [
1280
1280
  t.e("cell"),
1281
1281
  t.is("selected", l(D)),
1282
- t.is("current", v(D)),
1282
+ t.is("current", c(D)),
1283
1283
  t.is("disabled", m(D))
1284
1284
  ], T = (D) => {
1285
1285
  m(D) || e("pick", D);
1286
- }, S = V(() => {
1286
+ }, z = V(() => {
1287
1287
  const D = [];
1288
1288
  for (let $ = 0; $ < 12; $ += 3)
1289
1289
  D.push([$, $ + 1, $ + 2]);
@@ -1295,8 +1295,8 @@ const pl = [
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 }, [
1299
- (i(!0), d(J, null, _(z, (y) => (i(), d("td", {
1298
+ (i(!0), d(J, null, _(z.value, (S, I) => (i(), d("tr", { key: I }, [
1299
+ (i(!0), d(J, null, _(S, (y) => (i(), d("td", {
1300
1300
  key: y,
1301
1301
  class: u(b(y)),
1302
1302
  onClick: (L) => T(y)
@@ -1319,8 +1319,8 @@ const pl = [
1319
1319
  },
1320
1320
  emits: ["pick"],
1321
1321
  setup(s, { emit: k }) {
1322
- const a = s, e = k, t = ae("year-table"), l = V(() => (/* @__PURE__ */ new Date()).getFullYear()), v = V(() => Ne(a.viewedYear)), m = V(() => {
1323
- const [y] = v.value, L = [];
1322
+ const a = s, e = k, t = ae("year-table"), l = V(() => (/* @__PURE__ */ new Date()).getFullYear()), c = V(() => Ne(a.viewedYear)), m = V(() => {
1323
+ const [y] = c.value, L = [];
1324
1324
  L.push(y - 1);
1325
1325
  for (let H = 0; H < 10; H++)
1326
1326
  L.push(y + H);
@@ -1330,17 +1330,17 @@ const pl = [
1330
1330
  for (let L = 0; L < m.value.length; L += 3)
1331
1331
  y.push(m.value.slice(L, L + 3));
1332
1332
  return y;
1333
- }), T = (y) => a.modelValue ? a.modelValue.getFullYear() === y : !1, S = (y) => y === l.value, D = (y) => {
1334
- const [L, H] = v.value;
1333
+ }), T = (y) => a.modelValue ? a.modelValue.getFullYear() === y : !1, z = (y) => y === l.value, D = (y) => {
1334
+ const [L, H] = c.value;
1335
1335
  return y >= L && y <= H;
1336
1336
  }, $ = (y) => {
1337
1337
  if (!a.disabledDate) return !1;
1338
1338
  const L = new Date(y, 0, 1), H = new Date(y, 11, 31);
1339
1339
  return a.disabledDate(L) && a.disabledDate(H);
1340
- }, z = (y) => [
1340
+ }, S = (y) => [
1341
1341
  t.e("cell"),
1342
1342
  t.is("selected", T(y)),
1343
- t.is("current", S(y)),
1343
+ t.is("current", z(y)),
1344
1344
  t.is("disabled", $(y)),
1345
1345
  t.is("in-decade", D(y))
1346
1346
  ], I = (y) => {
@@ -1355,7 +1355,7 @@ const pl = [
1355
1355
  (i(!0), d(J, null, _(b.value, (H, P) => (i(), d("tr", { key: P }, [
1356
1356
  (i(!0), d(J, null, _(H, (M) => (i(), d("td", {
1357
1357
  key: M,
1358
- class: u(z(M)),
1358
+ class: u(S(M)),
1359
1359
  onClick: (h) => I(M)
1360
1360
  }, [
1361
1361
  r("span", {
@@ -1366,7 +1366,7 @@ const pl = [
1366
1366
  ])
1367
1367
  ], 2));
1368
1368
  }
1369
- }), wl = ["placeholder", "disabled", "value"], Cl = ["placeholder", "disabled", "value"], $l = ["placeholder", "disabled", "value"], Dl = ["value"], Sl = ["value"], zl = ["value"], st = /* @__PURE__ */ le({
1369
+ }), wl = ["placeholder", "disabled", "value"], Cl = ["placeholder", "disabled", "value"], $l = ["placeholder", "disabled", "value"], Dl = ["value"], zl = ["value"], Sl = ["value"], st = /* @__PURE__ */ le({
1370
1370
  name: "XDatePicker",
1371
1371
  __name: "index",
1372
1372
  props: {
@@ -1389,9 +1389,9 @@ const pl = [
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"), v = R(!1), m = R(2e3), b = R(), T = () => e.modelValue !== void 0 && e.modelValue !== null ? e.modelValue : e.value !== void 0 && e.value !== null ? e.value : null, S = (A) => {
1392
+ const e = s, t = a, l = ae("date-picker"), c = R(!1), m = R(2e3), b = R(), T = () => e.modelValue !== void 0 && e.modelValue !== null ? e.modelValue : e.value !== void 0 && e.value !== null ? e.value : null, z = (A) => {
1393
1393
  e.modelValue !== void 0 && t("update:modelValue", A), e.value !== void 0 && t("update:value", A), e.modelValue === void 0 && e.value === void 0 && t("update:modelValue", A), t("change", A);
1394
- }, D = R(), $ = R(), z = R({
1394
+ }, D = R(), $ = R(), S = R({
1395
1395
  top: "0px",
1396
1396
  left: "0px"
1397
1397
  }), I = () => Oe().next(), y = R("date"), L = R(/* @__PURE__ */ new Date()), H = R({
@@ -1422,7 +1422,7 @@ const pl = [
1422
1422
  if (!Y) return "";
1423
1423
  const W = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.format;
1424
1424
  return ce(Y, W);
1425
- }), c = V(() => {
1425
+ }), v = V(() => {
1426
1426
  const A = T();
1427
1427
  if (!A || !Array.isArray(A)) return "";
1428
1428
  const [Y] = A;
@@ -1446,28 +1446,28 @@ const pl = [
1446
1446
  l.is("range", e.type === "daterange")
1447
1447
  ]), C = V(() => [
1448
1448
  l.e("input"),
1449
- l.is("focus", v.value),
1450
- l.is("has-value", !!h.value || !!(c.value || x.value))
1449
+ l.is("focus", c.value),
1450
+ l.is("has-value", !!h.value || !!(v.value || x.value))
1451
1451
  ]), o = () => {
1452
- e.disabled || e.readonly || (v.value ? g() : f());
1452
+ e.disabled || e.readonly || (c.value ? g() : f());
1453
1453
  }, f = () => {
1454
- v.value = !0, m.value = I(), De(() => {
1454
+ c.value = !0, m.value = I(), De(() => {
1455
1455
  if (b.value && D.value) {
1456
1456
  const A = b.value.getBoundingClientRect(), Y = D.value.getBoundingClientRect();
1457
1457
  let W = A.bottom + 8, Te = A.left;
1458
- Te + Y.width > window.innerWidth && (Te = window.innerWidth - Y.width - 8), W + Y.height > window.innerHeight && (W = A.top - Y.height - 8), z.value = {
1458
+ Te + Y.width > window.innerWidth && (Te = window.innerWidth - Y.width - 8), W + Y.height > window.innerHeight && (W = A.top - Y.height - 8), S.value = {
1459
1459
  top: `${W}px`,
1460
1460
  left: `${Te}px`
1461
1461
  };
1462
1462
  }
1463
1463
  }), t("focus", {});
1464
1464
  }, g = () => {
1465
- v.value = !1, y.value = "date", t("blur", {});
1465
+ c.value = !1, y.value = "date", t("blur", {});
1466
1466
  }, X = (A) => {
1467
1467
  if (e.type === "date") {
1468
1468
  e.showTime && (A.setHours(H.value.hours), A.setMinutes(H.value.minutes), A.setSeconds(H.value.seconds));
1469
1469
  const Y = e.showTime ? "YYYY-MM-DD HH:mm:ss" : e.valueFormat, W = Y ? ce(A, Y) : A;
1470
- S(W), e.showTime || g();
1470
+ z(W), e.showTime || g();
1471
1471
  }
1472
1472
  }, ne = () => {
1473
1473
  const A = T();
@@ -1476,13 +1476,13 @@ const pl = [
1476
1476
  if (Y) {
1477
1477
  Y.setHours(H.value.hours), Y.setMinutes(H.value.minutes), Y.setSeconds(H.value.seconds);
1478
1478
  const W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1479
- S(W);
1479
+ z(W);
1480
1480
  }
1481
1481
  } else {
1482
1482
  const Y = /* @__PURE__ */ new Date();
1483
1483
  Y.setHours(H.value.hours), Y.setMinutes(H.value.minutes), Y.setSeconds(H.value.seconds);
1484
1484
  const W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1485
- S(W);
1485
+ z(W);
1486
1486
  }
1487
1487
  g();
1488
1488
  }, K = (A) => {
@@ -1491,34 +1491,34 @@ const pl = [
1491
1491
  else {
1492
1492
  P.value.selecting = !1, P.value.startDate && A < P.value.startDate ? [P.value.startDate, P.value.endDate] = [A, P.value.startDate] : P.value.endDate = A;
1493
1493
  const Y = e.valueFormat ? ce(P.value.startDate, e.valueFormat) : P.value.startDate, W = e.valueFormat ? ce(P.value.endDate, e.valueFormat) : P.value.endDate;
1494
- S([Y, W]), g();
1494
+ z([Y, W]), g();
1495
1495
  }
1496
1496
  }, re = (A) => {
1497
1497
  if (L.value = new Date(F.value, A, 1), e.type === "month") {
1498
1498
  const Y = new Date(F.value, A, 1), W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1499
- S(W), g();
1499
+ z(W), g();
1500
1500
  } else
1501
1501
  y.value = "date";
1502
1502
  }, q = (A) => {
1503
1503
  if (L.value = new Date(A, O.value, 1), e.type === "year") {
1504
1504
  const Y = new Date(A, 0, 1), W = e.valueFormat ? ce(Y, e.valueFormat) : Y;
1505
- S(W), g();
1505
+ z(W), g();
1506
1506
  } else
1507
1507
  y.value = "month";
1508
1508
  }, me = () => {
1509
1509
  L.value = cl(L.value);
1510
1510
  }, be = () => {
1511
1511
  L.value = vl(L.value);
1512
- }, Se = () => {
1512
+ }, ze = () => {
1513
1513
  y.value === "year" ? L.value = new Date(F.value - 10, O.value, 1) : L.value = fl(L.value);
1514
1514
  }, xe = () => {
1515
1515
  y.value === "year" ? L.value = new Date(F.value + 10, O.value, 1) : L.value = ml(L.value);
1516
- }, ze = () => {
1516
+ }, Se = () => {
1517
1517
  y.value = "month";
1518
1518
  }, Re = () => {
1519
1519
  y.value = "year";
1520
1520
  }, E = () => {
1521
- S(null), t("clear"), P.value = {
1521
+ z(null), t("clear"), P.value = {
1522
1522
  selecting: !1,
1523
1523
  startDate: null,
1524
1524
  endDate: null
@@ -1538,7 +1538,7 @@ const pl = [
1538
1538
  } else M.value && (L.value = new Date(M.value));
1539
1539
  },
1540
1540
  { immediate: !0 }
1541
- ), ie(v, (A) => {
1541
+ ), ie(c, (A) => {
1542
1542
  A && (y.value = "date", e.type === "daterange" && (P.value = {
1543
1543
  selecting: !1,
1544
1544
  startDate: Array.isArray(M.value) ? M.value[0] : null,
@@ -1613,7 +1613,7 @@ const pl = [
1613
1613
  placeholder: s.startPlaceholder,
1614
1614
  disabled: s.disabled,
1615
1615
  readonly: !0,
1616
- value: c.value,
1616
+ value: v.value,
1617
1617
  class: u(n(l).e("input-inner"))
1618
1618
  }, null, 10, Cl),
1619
1619
  r("span", {
@@ -1630,7 +1630,7 @@ const pl = [
1630
1630
  r("span", {
1631
1631
  class: u(n(l).e("suffix"))
1632
1632
  }, [
1633
- s.clearable && (c.value || x.value) && !s.disabled ? (i(), d("span", {
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
1636
  onClick: ue(E, ["stop"])
@@ -1657,7 +1657,7 @@ const pl = [
1657
1657
  ref_key: "popperRef",
1658
1658
  ref: D,
1659
1659
  class: u(n(l).e("popper")),
1660
- style: te({ zIndex: m.value, ...z.value })
1660
+ style: te({ zIndex: m.value, ...S.value })
1661
1661
  }, [
1662
1662
  r("div", {
1663
1663
  class: u(n(l).e("header"))
@@ -1665,7 +1665,7 @@ const pl = [
1665
1665
  r("button", {
1666
1666
  type: "button",
1667
1667
  class: u(n(l).e("prev-btn")),
1668
- onClick: Y[0] || (Y[0] = (W) => y.value === "date" ? me() : Se())
1668
+ onClick: Y[0] || (Y[0] = (W) => y.value === "date" ? me() : ze())
1669
1669
  }, " ‹ ", 2),
1670
1670
  r("div", {
1671
1671
  class: u(n(l).e("header-title"))
@@ -1677,7 +1677,7 @@ const pl = [
1677
1677
  r("span", { onClick: Re }, U(F.value) + " 年", 1),
1678
1678
  y.value === "date" ? (i(), d("span", {
1679
1679
  key: 0,
1680
- onClick: ze
1680
+ onClick: Se
1681
1681
  }, U(O.value + 1) + " 月", 1)) : N("", !0)
1682
1682
  ], 64))
1683
1683
  ], 2),
@@ -1750,7 +1750,7 @@ const pl = [
1750
1750
  (i(), d(J, null, _(60, (W) => r("option", {
1751
1751
  key: W,
1752
1752
  value: W - 1
1753
- }, U(String(W - 1).padStart(2, "0")), 9, Sl)), 64))
1753
+ }, U(String(W - 1).padStart(2, "0")), 9, zl)), 64))
1754
1754
  ], 2), [
1755
1755
  [
1756
1756
  we,
@@ -1771,7 +1771,7 @@ const pl = [
1771
1771
  (i(), d(J, null, _(60, (W) => r("option", {
1772
1772
  key: W,
1773
1773
  value: W - 1
1774
- }, U(String(W - 1).padStart(2, "0")), 9, zl)), 64))
1774
+ }, U(String(W - 1).padStart(2, "0")), 9, Sl)), 64))
1775
1775
  ], 2), [
1776
1776
  [
1777
1777
  we,
@@ -1794,7 +1794,7 @@ const pl = [
1794
1794
  }, "确定", 2)
1795
1795
  ], 2)) : N("", !0)
1796
1796
  ], 6), [
1797
- [ge, v.value]
1797
+ [ge, c.value]
1798
1798
  ])
1799
1799
  ]),
1800
1800
  _: 1
@@ -1842,12 +1842,12 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1842
1842
  },
1843
1843
  emits: ["confirm", "cancel"],
1844
1844
  setup(s, { emit: k }) {
1845
- const a = s, e = k, t = ae("time-panel"), l = R(0), v = R(0), m = R(0), b = R(), T = R(), S = R(), D = V(() => a.format.includes("ss") || a.format.includes("s")), $ = V(() => {
1845
+ const a = s, e = k, t = ae("time-panel"), l = R(0), c = R(0), m = R(0), b = R(), T = R(), z = R(), D = V(() => a.format.includes("ss") || a.format.includes("s")), $ = V(() => {
1846
1846
  const K = [], re = Math.max(1, a.hourStep);
1847
1847
  for (let q = 0; q < 24; q += re)
1848
1848
  K.push(q);
1849
1849
  return K;
1850
- }), z = V(() => {
1850
+ }), S = V(() => {
1851
1851
  const K = [], re = Math.max(1, a.minuteStep);
1852
1852
  for (let q = 0; q < 60; q += re)
1853
1853
  K.push(q);
@@ -1857,13 +1857,13 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1857
1857
  for (let q = 0; q < 60; q += re)
1858
1858
  K.push(q);
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, v.value)) : /* @__PURE__ */ new Set()), P = V(() => `${ke(l.value)}:${ke(v.value)}${D.value ? ":" + ke(m.value) : ""}`), M = (K) => y.value.has(K), h = (K) => L.value.has(K), c = (K) => H.value.has(K), x = (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()), P = V(() => `${ke(l.value)}:${ke(c.value)}${D.value ? ":" + ke(m.value) : ""}`), M = (K) => y.value.has(K), h = (K) => L.value.has(K), v = (K) => H.value.has(K), x = (K) => {
1861
1861
  M(K) || (l.value = K, w(b.value, O(K)));
1862
1862
  }, B = (K) => {
1863
- h(K) || (v.value = K, w(T.value, j(K)));
1863
+ h(K) || (c.value = K, w(T.value, j(K)));
1864
1864
  }, F = (K) => {
1865
- c(K) || (m.value = K, w(S.value, p(K)));
1866
- }, O = (K) => $.value.indexOf(K), j = (K) => z.value.indexOf(K), p = (K) => I.value.indexOf(K), w = (K, re) => {
1865
+ v(K) || (m.value = K, w(z.value, p(K)));
1866
+ }, O = (K) => $.value.indexOf(K), j = (K) => S.value.indexOf(K), p = (K) => I.value.indexOf(K), w = (K, re) => {
1867
1867
  if (!K) return;
1868
1868
  const q = 32, be = re * q + 84 - 200 / 2 + q / 2;
1869
1869
  K.scrollTop = Math.max(0, be);
@@ -1873,26 +1873,26 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1873
1873
  q !== void 0 && !M(q) && (l.value = q);
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) && (v.value = q);
1876
+ const K = T.value.scrollTop, re = Math.round((K - 84 + 100) / 32), q = S.value[Math.max(0, Math.min(re, S.value.length - 1))];
1877
+ q !== void 0 && !h(q) && (c.value = q);
1878
1878
  }, f = () => {
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 && !c(q) && (m.value = q);
1879
+ if (!z.value) return;
1880
+ const K = z.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);
1882
1882
  }, g = () => {
1883
1883
  const K = a.modelValue ? new Date(a.modelValue) : /* @__PURE__ */ new Date();
1884
- K.setHours(l.value, v.value, m.value, 0), e("confirm", K);
1884
+ K.setHours(l.value, c.value, m.value, 0), e("confirm", K);
1885
1885
  }, X = () => {
1886
1886
  e("cancel");
1887
1887
  }, ne = () => {
1888
1888
  if (a.modelValue)
1889
- l.value = a.modelValue.getHours(), v.value = a.modelValue.getMinutes(), m.value = a.modelValue.getSeconds();
1889
+ l.value = a.modelValue.getHours(), c.value = a.modelValue.getMinutes(), m.value = a.modelValue.getSeconds();
1890
1890
  else {
1891
1891
  const K = /* @__PURE__ */ new Date();
1892
- l.value = K.getHours(), v.value = K.getMinutes(), m.value = K.getSeconds();
1892
+ l.value = K.getHours(), c.value = K.getMinutes(), m.value = K.getSeconds();
1893
1893
  }
1894
1894
  De(() => {
1895
- w(b.value, O(l.value)), w(T.value, j(v.value)), D.value && w(S.value, p(m.value));
1895
+ w(b.value, O(l.value)), w(T.value, j(c.value)), D.value && w(z.value, p(m.value));
1896
1896
  });
1897
1897
  };
1898
1898
  return ie(
@@ -1939,9 +1939,9 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__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", {
1942
+ (i(!0), d(J, null, _(S.value, (q) => (i(), d("div", {
1943
1943
  key: q,
1944
- class: u([n(t).e("item"), n(t).is("selected", v.value === q), n(t).is("disabled", h(q))]),
1944
+ class: u([n(t).e("item"), n(t).is("selected", c.value === q), n(t).is("disabled", h(q))]),
1945
1945
  onClick: (me) => B(q)
1946
1946
  }, U(n(ke)(q)), 11, Hl))), 128)),
1947
1947
  r("div", {
@@ -1951,7 +1951,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1951
1951
  D.value ? (i(), d("div", {
1952
1952
  key: 0,
1953
1953
  ref_key: "secondListRef",
1954
- ref: S,
1954
+ ref: z,
1955
1955
  class: u(n(t).e("list")),
1956
1956
  onScroll: f
1957
1957
  }, [
@@ -1960,7 +1960,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
1960
1960
  }, null, 2),
1961
1961
  (i(!0), d(J, null, _(I.value, (q) => (i(), d("div", {
1962
1962
  key: q,
1963
- class: u([n(t).e("item"), n(t).is("selected", m.value === q), n(t).is("disabled", c(q))]),
1963
+ class: u([n(t).e("item"), n(t).is("selected", m.value === q), n(t).is("disabled", v(q))]),
1964
1964
  onClick: (me) => F(q)
1965
1965
  }, U(n(ke)(q)), 11, Ll))), 128)),
1966
1966
  r("div", {
@@ -2013,10 +2013,10 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2013
2013
  },
2014
2014
  emits: ["update:modelValue", "change", "focus", "blur", "clear"],
2015
2015
  setup(s, { expose: k, emit: a }) {
2016
- const e = s, t = a, l = ae("time-picker"), v = () => Oe().next(), m = R(!1), b = R(2e3), T = R(), S = R(), D = R(), $ = R({
2016
+ const e = s, t = a, l = ae("time-picker"), c = () => Oe().next(), m = R(!1), b = R(2e3), T = R(), z = R(), D = R(), $ = R({
2017
2017
  top: "0px",
2018
2018
  left: "0px"
2019
- }), z = R({
2019
+ }), S = R({
2020
2020
  startTime: null,
2021
2021
  endTime: null
2022
2022
  }), I = R("start"), y = V(() => {
@@ -2034,12 +2034,12 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2034
2034
  if (!Array.isArray(y.value)) return "";
2035
2035
  const [, f] = y.value;
2036
2036
  return f ? ye(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" ? I.value === "start" ? S.value.startTime : S.value.endTime || S.value.startTime : y.value), h = V(() => [
2038
2038
  l.b(),
2039
2039
  l.m(e.size),
2040
2040
  l.is("disabled", e.disabled),
2041
2041
  l.is("range", e.type === "timerange")
2042
- ]), c = V(() => [
2042
+ ]), v = V(() => [
2043
2043
  l.e("input"),
2044
2044
  l.is("focus", m.value)
2045
2045
  ]), x = () => {
@@ -2047,9 +2047,9 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2047
2047
  }, B = (f) => {
2048
2048
  e.disabled || e.readonly || (I.value = f, m.value || F());
2049
2049
  }, F = () => {
2050
- m.value = !0, b.value = v(), De(() => {
2051
- if (T.value && S.value) {
2052
- const f = T.value.getBoundingClientRect(), g = S.value.getBoundingClientRect();
2050
+ m.value = !0, b.value = c(), De(() => {
2051
+ if (T.value && z.value) {
2052
+ const f = T.value.getBoundingClientRect(), g = z.value.getBoundingClientRect();
2053
2053
  let X = f.bottom + 8, ne = f.left;
2054
2054
  ne + g.width > window.innerWidth && (ne = window.innerWidth - g.width - 8), X + g.height > window.innerHeight && (X = f.top - g.height - 8), $.value = {
2055
2055
  top: `${X}px`,
@@ -2062,10 +2062,10 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2062
2062
  }, j = (f) => {
2063
2063
  if (e.type === "timerange")
2064
2064
  if (I.value === "start")
2065
- z.value.startTime = f, I.value = "end", z.value.endTime && z.value.endTime < f && (z.value.endTime = null);
2065
+ S.value.startTime = f, I.value = "end", S.value.endTime && S.value.endTime < f && (S.value.endTime = null);
2066
2066
  else {
2067
- z.value.startTime && f < z.value.startTime ? (z.value.endTime = z.value.startTime, z.value.startTime = f) : z.value.endTime = f;
2068
- const g = e.valueFormat ? ye(z.value.startTime, e.valueFormat) : z.value.startTime, X = e.valueFormat ? ye(z.value.endTime, e.valueFormat) : z.value.endTime;
2067
+ S.value.startTime && f < S.value.startTime ? (S.value.endTime = S.value.startTime, S.value.startTime = f) : S.value.endTime = f;
2068
+ const g = e.valueFormat ? ye(S.value.startTime, e.valueFormat) : S.value.startTime, X = e.valueFormat ? ye(S.value.endTime, e.valueFormat) : S.value.endTime;
2069
2069
  t("update:modelValue", [g, X]), t("change", [g, X]), O();
2070
2070
  }
2071
2071
  else {
@@ -2075,21 +2075,21 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2075
2075
  }, p = () => {
2076
2076
  O();
2077
2077
  }, w = () => {
2078
- t("update:modelValue", null), t("change", null), t("clear"), z.value = {
2078
+ t("update:modelValue", null), t("change", null), t("clear"), S.value = {
2079
2079
  startTime: null,
2080
2080
  endTime: null
2081
2081
  };
2082
2082
  }, C = (f) => {
2083
2083
  if (!T.value) return;
2084
2084
  const g = f.target;
2085
- T.value.contains(g) || S.value && S.value.contains(g) || O();
2085
+ T.value.contains(g) || z.value && z.value.contains(g) || O();
2086
2086
  };
2087
2087
  ie(
2088
2088
  () => e.modelValue,
2089
2089
  (f) => {
2090
2090
  if (f && e.type === "timerange") {
2091
2091
  const [g, X] = y.value;
2092
- z.value = {
2092
+ S.value = {
2093
2093
  startTime: g,
2094
2094
  endTime: X
2095
2095
  };
@@ -2097,7 +2097,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2097
2097
  },
2098
2098
  { immediate: !0 }
2099
2099
  ), ie(m, (f) => {
2100
- f && e.type === "timerange" && (z.value = {
2100
+ f && e.type === "timerange" && (S.value = {
2101
2101
  startTime: Array.isArray(y.value) ? y.value[0] : null,
2102
2102
  endTime: Array.isArray(y.value) ? y.value[1] : null
2103
2103
  }, I.value = "start");
@@ -2125,7 +2125,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2125
2125
  }, [
2126
2126
  s.type !== "timerange" ? (i(), d("div", {
2127
2127
  key: 0,
2128
- class: u(c.value),
2128
+ class: u(v.value),
2129
2129
  onClick: x
2130
2130
  }, [
2131
2131
  r("input", {
@@ -2162,7 +2162,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2162
2162
  ], 2)
2163
2163
  ], 2)) : (i(), d("div", {
2164
2164
  key: 1,
2165
- class: u(c.value),
2165
+ class: u(v.value),
2166
2166
  onClick: x
2167
2167
  }, [
2168
2168
  r("input", {
@@ -2214,7 +2214,7 @@ const Tl = ["onClick"], Hl = ["onClick"], Ll = ["onClick"], Rl = /* @__PURE__ */
2214
2214
  default: He(() => [
2215
2215
  oe(r("div", {
2216
2216
  ref_key: "popperRef",
2217
- ref: S,
2217
+ ref: z,
2218
2218
  class: u(n(l).e("popper")),
2219
2219
  style: te({ zIndex: b.value, ...$.value })
2220
2220
  }, [
@@ -2260,8 +2260,8 @@ function Xe(s, k, a = "value", e = "children") {
2260
2260
  }
2261
2261
  function Fe(s, k, a = "value", e = "children") {
2262
2262
  const t = [];
2263
- function l(v) {
2264
- for (const m of v) {
2263
+ function l(c) {
2264
+ for (const m of c) {
2265
2265
  if (m[a] === k)
2266
2266
  return t.push(m), !0;
2267
2267
  if (m[e] && m[e].length > 0) {
@@ -2276,9 +2276,9 @@ function Fe(s, k, a = "value", e = "children") {
2276
2276
  }
2277
2277
  function Pl(s, k = "children") {
2278
2278
  const a = [];
2279
- function e(t, l = 0, v = null) {
2279
+ function e(t, l = 0, c = null) {
2280
2280
  for (const m of t)
2281
- a.push({ ...m, level: l, parent: v }), m[k] && m[k].length > 0 && e(m[k], l + 1, m);
2281
+ a.push({ ...m, level: l, parent: c }), m[k] && m[k].length > 0 && e(m[k], l + 1, m);
2282
2282
  }
2283
2283
  return e(s), a;
2284
2284
  }
@@ -2318,33 +2318,23 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2318
2318
  return (A = G.default) == null ? void 0 : A.call(G);
2319
2319
  };
2320
2320
  }
2321
- }), e = s, t = k, l = ae("select"), v = Le(), m = () => Oe().next(), b = R(), T = R(), S = R(), D = R(!1), $ = R(2e3), z = R(""), I = R(-1), y = R({ top: "0px", left: "0px" }), L = R([]), H = (E) => {
2321
+ }), e = s, t = k, l = ae("select"), c = Le(), m = () => Oe().next(), b = R(), T = R(), z = R(), D = R(!1), $ = R(2e3), S = R(""), I = R(-1), y = R({ top: "0px", left: "0px" }), L = R([]), H = (E) => {
2322
2322
  L.value.find((G) => G.value === E.value) || L.value.push(E);
2323
- }, P = V(() => e.type === "multiple" || e.mode === "multiple"), M = V(() => e.type === "cascader"), h = R([]), c = V(() => e.options && e.options.length > 0 ? e.options : L.value), x = (E) => {
2323
+ }, P = V(() => e.type === "multiple" || e.mode === "multiple"), M = V(() => e.type === "cascader"), h = R([]), v = V(() => e.options && e.options.length > 0 ? e.options : L.value), x = (E) => {
2324
2324
  t("update:modelValue", E), t("update:value", E), t("change", E);
2325
2325
  }, B = V(() => {
2326
2326
  const E = e.modelValue ?? e.value;
2327
2327
  return P.value ? Array.isArray(E) ? E : [] : M.value ? Array.isArray(E) ? E : E != null && E !== "" ? [E] : [] : E != null && E !== "" ? [E] : [];
2328
2328
  }), F = V(() => {
2329
- const E = c.value;
2329
+ const E = v.value;
2330
2330
  return M.value ? Pl(E, e.childrenKey) : E.map((G) => ({ ...G, level: 0 }));
2331
- }), O = V(() => {
2332
- var E;
2333
- return console.log("[XSelect] filteredOptions recalc:", {
2334
- "props.options.length": (E = e.options) == null ? void 0 : E.length,
2335
- "slotOptions.length": L.value.length,
2336
- "mergedOptions.length": c.value.length,
2337
- "flatOptions.length": F.value.length,
2338
- filterable: e.filterable,
2339
- query: z.value
2340
- }), !e.filterable || !z.value ? F.value : F.value.filter((G) => {
2341
- const Z = G[e.labelKey] || "";
2342
- return Il(Z, z.value, e.filterMethod);
2343
- });
2344
- }), j = V(() => {
2331
+ }), O = V(() => !e.filterable || !S.value ? F.value : F.value.filter((E) => {
2332
+ const G = E[e.labelKey] || "";
2333
+ return Il(G, S.value, e.filterMethod);
2334
+ })), j = V(() => {
2345
2335
  const E = [];
2346
2336
  for (const G of B.value) {
2347
- const Z = Xe(c.value, G, e.valueKey, e.childrenKey);
2337
+ const Z = Xe(v.value, G, e.valueKey, e.childrenKey);
2348
2338
  Z && E.push(Z);
2349
2339
  }
2350
2340
  return E;
@@ -2352,7 +2342,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2352
2342
  if (P.value)
2353
2343
  return "";
2354
2344
  if (M.value)
2355
- return Fe(c.value, B.value[B.value.length - 1], e.valueKey, e.childrenKey).map((Z) => Z[e.labelKey]).join(e.separator);
2345
+ return Fe(v.value, B.value[B.value.length - 1], e.valueKey, e.childrenKey).map((Z) => Z[e.labelKey]).join(e.separator);
2356
2346
  const E = j.value[0];
2357
2347
  return E ? E[e.labelKey] : "";
2358
2348
  }), w = V(() => P.value ? j.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(() => [
@@ -2364,19 +2354,19 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2364
2354
  l.is("filterable", e.filterable),
2365
2355
  l.is("focus", D.value)
2366
2356
  ]), g = () => {
2367
- if (!b.value || !S.value || !D.value) return;
2368
- const E = b.value.getBoundingClientRect(), G = S.value.getBoundingClientRect();
2357
+ if (!b.value || !z.value || !D.value) return;
2358
+ const E = b.value.getBoundingClientRect(), G = z.value.getBoundingClientRect();
2369
2359
  let Z = E.bottom + 4, A = E.left;
2370
2360
  A + G.width > window.innerWidth && (A = window.innerWidth - G.width - 8), Z + G.height > window.innerHeight && (Z = E.top - G.height - 4), y.value = {
2371
2361
  top: `${Z}px`,
2372
2362
  left: `${A}px`
2373
2363
  };
2374
2364
  }, X = () => {
2375
- e.disabled || (D.value = !0, $.value = m(), z.value = "", De(() => {
2365
+ e.disabled || (D.value = !0, $.value = m(), S.value = "", De(() => {
2376
2366
  g();
2377
2367
  }), t("visible-change", !0), t("focus", {}));
2378
2368
  }, ne = () => {
2379
- D.value = !1, z.value = "", h.value = [], t("visible-change", !1), t("blur", {});
2369
+ D.value = !1, S.value = "", h.value = [], t("visible-change", !1), t("blur", {});
2380
2370
  }, K = (E) => {
2381
2371
  if (!E.disabled)
2382
2372
  if (P.value) {
@@ -2391,10 +2381,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2391
2381
  x(G);
2392
2382
  } else if (M.value)
2393
2383
  if (E.children && E.children.length > 0) {
2394
- const G = Fe(c.value, E[e.valueKey], e.valueKey, e.childrenKey);
2384
+ const G = Fe(v.value, E[e.valueKey], e.valueKey, e.childrenKey);
2395
2385
  h.value = G;
2396
2386
  } else {
2397
- const Z = Fe(c.value, E[e.valueKey], e.valueKey, e.childrenKey).map((A) => A[e.valueKey]);
2387
+ const Z = Fe(v.value, E[e.valueKey], e.valueKey, e.childrenKey).map((A) => A[e.valueKey]);
2398
2388
  x(Z), ne();
2399
2389
  }
2400
2390
  else
@@ -2406,19 +2396,19 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2406
2396
  const E = P.value ? [] : "";
2407
2397
  x(E), t("clear");
2408
2398
  }, me = (E) => {
2409
- z.value = E.target.value;
2399
+ S.value = E.target.value;
2410
2400
  }, be = (E) => {
2411
2401
  if (!b.value) return;
2412
- const G = E.target, Z = S.value && S.value.contains(G);
2402
+ const G = E.target, Z = z.value && z.value.contains(G);
2413
2403
  b.value.contains(G) || Z || ne();
2414
- }, Se = (E) => {
2404
+ }, ze = (E) => {
2415
2405
  if (E.key === "Escape")
2416
2406
  ne();
2417
2407
  else if (E.key === "Enter" && D.value) {
2418
2408
  const G = O.value[I.value];
2419
2409
  G && K(G);
2420
2410
  } else E.key === "ArrowDown" && D.value ? (E.preventDefault(), I.value = Math.min(I.value + 1, O.value.length - 1)) : E.key === "ArrowUp" && D.value && (E.preventDefault(), I.value = Math.max(I.value - 1, 0));
2421
- }, xe = (E) => B.value.includes(E[e.valueKey]), ze = (E, G) => [
2411
+ }, xe = (E) => B.value.includes(E[e.valueKey]), Se = (E, G) => [
2422
2412
  l.e("option"),
2423
2413
  l.is("selected", xe(E)),
2424
2414
  l.is("disabled", E.disabled === !0),
@@ -2426,15 +2416,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2426
2416
  l.is("group", !!(E.children && E.children.length > 0))
2427
2417
  ], Re = V(() => {
2428
2418
  if (!M.value) return [];
2429
- const E = [c.value];
2419
+ const E = [v.value];
2430
2420
  for (const G of h.value)
2431
2421
  G.children && G.children.length > 0 && E.push(G.children);
2432
2422
  return E;
2433
2423
  });
2434
2424
  return pe(() => {
2435
- document.addEventListener("mousedown", be), document.addEventListener("keydown", Se);
2425
+ document.addEventListener("mousedown", be), document.addEventListener("keydown", ze);
2436
2426
  }), $e(() => {
2437
- document.removeEventListener("mousedown", be), document.removeEventListener("keydown", Se), document.removeEventListener("scroll", g, !0);
2427
+ document.removeEventListener("mousedown", be), document.removeEventListener("keydown", ze), document.removeEventListener("scroll", g, !0);
2438
2428
  }), ie(D, (E) => {
2439
2429
  E ? document.addEventListener("scroll", g, !0) : document.removeEventListener("scroll", g, !0);
2440
2430
  }), Ce("select", {
@@ -2479,7 +2469,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2479
2469
  placeholder: P.value && w.value.length > 0 ? "" : s.placeholder,
2480
2470
  disabled: s.disabled,
2481
2471
  readonly: !s.filterable || !D.value,
2482
- value: s.filterable && D.value ? z.value : p.value,
2472
+ value: s.filterable && D.value ? S.value : p.value,
2483
2473
  onInput: me
2484
2474
  }, null, 42, El),
2485
2475
  r("span", {
@@ -2505,7 +2495,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2505
2495
  default: He(() => [
2506
2496
  oe(r("div", {
2507
2497
  ref_key: "popperRef",
2508
- ref: S,
2498
+ ref: z,
2509
2499
  class: u([n(l).e("popper"), n(l).is("cascader", M.value)]),
2510
2500
  style: te({ zIndex: $.value, ...y.value })
2511
2501
  }, [
@@ -2519,7 +2509,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2519
2509
  }, [
2520
2510
  (i(!0), d(J, null, _(Z, (Y, W) => (i(), d("div", {
2521
2511
  key: Y[s.valueKey],
2522
- class: u(ze(Y, W)),
2512
+ class: u(Se(Y, W)),
2523
2513
  onClick: ue((Te) => K(Y), ["stop", "prevent"])
2524
2514
  }, [
2525
2515
  r("span", {
@@ -2532,10 +2522,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2532
2522
  ], 10, Yl))), 128))
2533
2523
  ], 2))), 128))
2534
2524
  ], 2)) : (i(), d(J, { key: 1 }, [
2535
- O.value.length === 0 && !n(v).default ? (i(), d("div", {
2525
+ O.value.length === 0 && !n(c).default ? (i(), d("div", {
2536
2526
  key: 0,
2537
2527
  class: u(n(l).e("empty"))
2538
- }, U(z.value ? s.noMatchText : s.noDataText), 3)) : (i(), d(J, { key: 1 }, [
2528
+ }, U(S.value ? s.noMatchText : s.noDataText), 3)) : (i(), d(J, { key: 1 }, [
2539
2529
  E.$slots.default ? (i(), d("div", {
2540
2530
  key: 0,
2541
2531
  class: u(n(l).e("options"))
@@ -2552,7 +2542,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2552
2542
  }, [
2553
2543
  (i(!0), d(J, null, _(O.value, (Z, A) => (i(), d("div", {
2554
2544
  key: Z[s.valueKey],
2555
- class: u(ze(Z, A)),
2545
+ class: u(Se(Z, A)),
2556
2546
  onClick: ue((Y) => K(Z), ["stop", "prevent"])
2557
2547
  }, [
2558
2548
  r("span", {
@@ -2592,14 +2582,14 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2592
2582
  disabled: k.disabled
2593
2583
  });
2594
2584
  });
2595
- const t = V(() => !e || !e.selectedValues ? !1 : e.selectedValues.value.includes(k.value)), l = (v) => {
2596
- v.stopPropagation(), v.preventDefault(), !k.disabled && e && e.handleSelect && e.handleSelect({
2585
+ const t = V(() => !e || !e.selectedValues ? !1 : e.selectedValues.value.includes(k.value)), l = (c) => {
2586
+ c.stopPropagation(), c.preventDefault(), !k.disabled && e && e.handleSelect && e.handleSelect({
2597
2587
  value: k.value,
2598
2588
  label: k.label,
2599
2589
  disabled: k.disabled
2600
2590
  });
2601
2591
  };
2602
- return (v, m) => (i(), d("div", {
2592
+ return (c, m) => (i(), d("div", {
2603
2593
  class: u([
2604
2594
  n(a).e("option"),
2605
2595
  n(a).is("selected", t.value),
@@ -2634,7 +2624,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2634
2624
  },
2635
2625
  emits: ["update:modelValue", "change", "left-check-change", "right-check-change"],
2636
2626
  setup(s, { expose: k, emit: a }) {
2637
- const e = s, t = a, l = ae("transfer"), v = V(() => {
2627
+ const e = s, t = a, l = ae("transfer"), c = V(() => {
2638
2628
  var o;
2639
2629
  return ((o = e.props) == null ? void 0 : o.key) || "key";
2640
2630
  }), m = V(() => {
@@ -2643,26 +2633,26 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2643
2633
  }), b = V(() => {
2644
2634
  var o;
2645
2635
  return ((o = e.props) == null ? void 0 : o.disabled) || "disabled";
2646
- }), T = R(""), S = R(""), D = R([]), $ = R([]), z = (o) => o[v.value], I = (o) => o[m.value], y = (o) => o[b.value] || !1, L = V(() => e.data.filter((o) => {
2647
- const f = z(o);
2636
+ }), T = R(""), z = R(""), D = R([]), $ = R([]), S = (o) => o[c.value], I = (o) => o[m.value], y = (o) => o[b.value] || !1, L = V(() => e.data.filter((o) => {
2637
+ const f = S(o);
2648
2638
  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;
2649
2639
  })), H = V(() => {
2650
2640
  const o = e.modelValue;
2651
2641
  let f = e.data.filter((g) => {
2652
- const X = z(g);
2642
+ const X = S(g);
2653
2643
  return o.includes(X);
2654
2644
  });
2655
- 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;
2656
- }), P = 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 || P.value), c = V(() => $.value.length === 0 || M.value), x = () => {
2645
+ return e.filterable && z.value && (f = f.filter((g) => e.filterMethod ? e.filterMethod(z.value, g) : I(g).toLowerCase().includes(z.value.toLowerCase()))), e.targetOrder === "push" ? f.sort((g, X) => o.indexOf(S(g)) - o.indexOf(S(X))) : e.targetOrder === "unshift" ? f.sort((g, X) => o.indexOf(S(X)) - o.indexOf(S(g))) : f;
2646
+ }), P = V(() => L.value.filter((o) => D.value.includes(S(o))).every((o) => y(o))), M = V(() => H.value.filter((o) => $.value.includes(S(o))).every((o) => y(o))), h = V(() => D.value.length === 0 || P.value), v = V(() => $.value.length === 0 || M.value), x = () => {
2657
2647
  const o = D.value.filter((g) => {
2658
- const X = e.data.find((ne) => z(ne) === g);
2648
+ const X = e.data.find((ne) => S(ne) === g);
2659
2649
  return X && !y(X);
2660
2650
  });
2661
2651
  let f;
2662
2652
  e.targetOrder === "unshift" ? f = [...o, ...e.modelValue] : f = [...e.modelValue, ...o], t("update:modelValue", f), t("change", f, "right", o), D.value = [];
2663
2653
  }, B = () => {
2664
2654
  const o = $.value.filter((g) => {
2665
- const X = e.data.find((ne) => z(ne) === g);
2655
+ const X = e.data.find((ne) => S(ne) === g);
2666
2656
  return X && !y(X);
2667
2657
  }), f = e.modelValue.filter((g) => !o.includes(g));
2668
2658
  t("update:modelValue", f), t("change", f, "left", o), $.value = [];
@@ -2673,11 +2663,11 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2673
2663
  const f = $.value.indexOf(o);
2674
2664
  f > -1 ? $.value.splice(f, 1) : $.value.push(o), t("right-check-change", [...$.value]);
2675
2665
  }, j = () => {
2676
- 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]);
2666
+ D.value.length === L.value.filter((o) => !y(o)).length ? D.value = [] : D.value = L.value.filter((o) => !y(o)).map((o) => S(o)), t("left-check-change", [...D.value]);
2677
2667
  }, p = () => {
2678
- $.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]);
2668
+ $.value.length === H.value.filter((o) => !y(o)).length ? $.value = [] : $.value = H.value.filter((o) => !y(o)).map((o) => S(o)), t("right-check-change", [...$.value]);
2679
2669
  }, w = (o) => {
2680
- o === "left" ? T.value = "" : S.value = "";
2670
+ o === "left" ? T.value = "" : z.value = "";
2681
2671
  }, C = V(() => [l.b()]);
2682
2672
  return k({
2683
2673
  clearQuery: w
@@ -2726,24 +2716,24 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2726
2716
  class: u(n(l).e("body"))
2727
2717
  }, [
2728
2718
  (i(!0), d(J, null, _(L.value, (g) => (i(), d("div", {
2729
- key: z(g),
2719
+ key: S(g),
2730
2720
  class: u([
2731
2721
  n(l).e("item"),
2732
2722
  n(l).is("disabled", y(g)),
2733
- n(l).is("checked", D.value.includes(z(g)))
2723
+ n(l).is("checked", D.value.includes(S(g)))
2734
2724
  ]),
2735
- onClick: (X) => !y(g) && F(z(g))
2725
+ onClick: (X) => !y(g) && F(S(g))
2736
2726
  }, [
2737
2727
  r("label", {
2738
2728
  class: u(n(l).e("checkbox"))
2739
2729
  }, [
2740
2730
  r("input", {
2741
2731
  type: "checkbox",
2742
- checked: D.value.includes(z(g)),
2732
+ checked: D.value.includes(S(g)),
2743
2733
  disabled: y(g),
2744
2734
  onClick: f[2] || (f[2] = ue(() => {
2745
2735
  }, ["stop"])),
2746
- onChange: (X) => F(z(g))
2736
+ onChange: (X) => F(S(g))
2747
2737
  }, null, 40, Wl),
2748
2738
  r("span", null, U(I(g)), 1)
2749
2739
  ], 2)
@@ -2767,8 +2757,8 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2767
2757
  onClick: x
2768
2758
  }, U(s.buttonTexts[0] || ">"), 11, ql),
2769
2759
  r("button", {
2770
- class: u([n(l).e("button"), n(l).is("disabled", c.value)]),
2771
- disabled: c.value,
2760
+ class: u([n(l).e("button"), n(l).is("disabled", v.value)]),
2761
+ disabled: v.value,
2772
2762
  onClick: B
2773
2763
  }, U(s.buttonTexts[1] || "<"), 11, jl)
2774
2764
  ], 2),
@@ -2798,13 +2788,13 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2798
2788
  class: u(n(l).e("filter"))
2799
2789
  }, [
2800
2790
  oe(r("input", {
2801
- "onUpdate:modelValue": f[3] || (f[3] = (g) => S.value = g),
2791
+ "onUpdate:modelValue": f[3] || (f[3] = (g) => z.value = g),
2802
2792
  placeholder: s.filterPlaceholder,
2803
2793
  class: u(n(l).e("filter-input"))
2804
2794
  }, null, 10, Jl), [
2805
- [Me, S.value]
2795
+ [Me, z.value]
2806
2796
  ]),
2807
- S.value ? (i(), d("span", {
2797
+ z.value ? (i(), d("span", {
2808
2798
  key: 0,
2809
2799
  class: u(n(l).e("filter-clear")),
2810
2800
  onClick: f[4] || (f[4] = (g) => w("right"))
@@ -2814,24 +2804,24 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2814
2804
  class: u(n(l).e("body"))
2815
2805
  }, [
2816
2806
  (i(!0), d(J, null, _(H.value, (g) => (i(), d("div", {
2817
- key: z(g),
2807
+ key: S(g),
2818
2808
  class: u([
2819
2809
  n(l).e("item"),
2820
2810
  n(l).is("disabled", y(g)),
2821
- n(l).is("checked", $.value.includes(z(g)))
2811
+ n(l).is("checked", $.value.includes(S(g)))
2822
2812
  ]),
2823
- onClick: (X) => !y(g) && O(z(g))
2813
+ onClick: (X) => !y(g) && O(S(g))
2824
2814
  }, [
2825
2815
  r("label", {
2826
2816
  class: u(n(l).e("checkbox"))
2827
2817
  }, [
2828
2818
  r("input", {
2829
2819
  type: "checkbox",
2830
- checked: $.value.includes(z(g)),
2820
+ checked: $.value.includes(S(g)),
2831
2821
  disabled: y(g),
2832
2822
  onClick: f[5] || (f[5] = ue(() => {
2833
2823
  }, ["stop"])),
2834
- onChange: (X) => O(z(g))
2824
+ onChange: (X) => O(S(g))
2835
2825
  }, null, 40, Ql),
2836
2826
  r("span", null, U(I(g)), 1)
2837
2827
  ], 2)
@@ -2866,10 +2856,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2866
2856
  },
2867
2857
  emits: ["update:modelValue", "change", "input"],
2868
2858
  setup(s, { emit: k }) {
2869
- const a = s, e = k, t = ae("slider"), l = R(), v = R(), m = R(!1), b = R(!1), T = V(() => {
2859
+ const a = s, e = k, t = ae("slider"), l = R(), c = R(), m = R(!1), b = R(!1), T = V(() => {
2870
2860
  const w = a.max - a.min;
2871
2861
  return (a.modelValue - a.min) / w * 100;
2872
- }), S = V(() => a.formatTooltip ? a.formatTooltip(a.modelValue) : a.modelValue), D = V(() => {
2862
+ }), z = V(() => a.formatTooltip ? a.formatTooltip(a.modelValue) : a.modelValue), D = V(() => {
2873
2863
  if (!a.showStops || a.min >= a.max) return [];
2874
2864
  const w = [], C = (a.max - a.min) / a.step;
2875
2865
  for (let o = 0; o <= C; o++) {
@@ -2881,9 +2871,9 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2881
2871
  const C = Number(w), o = a.marks[C], f = (C - a.min) / (a.max - a.min) * 100;
2882
2872
  let g, X = {};
2883
2873
  return typeof o == "string" ? g = o : (g = o.label || String(C), X = o.style || {}), { value: C, pos: f, label: g, style: X };
2884
- }) : []), z = () => l.value ? a.vertical ? l.value.offsetHeight : l.value.offsetWidth : 0, I = (w, C) => {
2874
+ }) : []), S = () => l.value ? a.vertical ? l.value.offsetHeight : l.value.offsetWidth : 0, I = (w, C) => {
2885
2875
  if (!l.value) return a.modelValue;
2886
- const o = l.value.getBoundingClientRect(), f = z();
2876
+ const o = l.value.getBoundingClientRect(), f = S();
2887
2877
  let g;
2888
2878
  a.vertical ? g = (o.bottom - C) / f * 100 : g = (w - o.left) / f * 100, g = Math.max(0, Math.min(100, g));
2889
2879
  const X = a.min + g / 100 * (a.max - a.min), ne = Math.round(X / a.step) * a.step;
@@ -2912,7 +2902,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2912
2902
  if (!b.value) return;
2913
2903
  const C = w.touches[0], o = I(C.clientX, C.clientY);
2914
2904
  y(o);
2915
- }, c = () => {
2905
+ }, v = () => {
2916
2906
  b.value = !1, e("change", a.modelValue);
2917
2907
  }, x = () => {
2918
2908
  a.showTooltip && (m.value = !0);
@@ -2962,18 +2952,18 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
2962
2952
  ])) : N("", !0),
2963
2953
  r("div", {
2964
2954
  ref_key: "buttonRef",
2965
- ref: v,
2955
+ ref: c,
2966
2956
  class: u(n(t).e("button-wrapper")),
2967
2957
  style: te(p.value),
2968
2958
  onMouseenter: x,
2969
2959
  onMouseleave: B,
2970
2960
  onTouchmove: h,
2971
- onTouchend: c
2961
+ onTouchend: v
2972
2962
  }, [
2973
2963
  s.showTooltip && m.value ? (i(), d("div", {
2974
2964
  key: 0,
2975
2965
  class: u(n(t).e("tooltip"))
2976
- }, U(S.value), 3)) : N("", !0),
2966
+ }, U(z.value), 3)) : N("", !0),
2977
2967
  r("div", {
2978
2968
  class: u(n(t).e("button"))
2979
2969
  }, null, 2)
@@ -3028,9 +3018,9 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3028
3018
  setup(s, { expose: k, emit: a }) {
3029
3019
  const e = s, t = a, l = ae("upload");
3030
3020
  Le();
3031
- const v = R(), m = R([...e.fileList]), b = R(!1);
3021
+ const c = R(), m = R([...e.fileList]), b = R(!1);
3032
3022
  let T = 1;
3033
- const S = () => Date.now() + T++, D = (p) => {
3023
+ const z = () => Date.now() + T++, D = (p) => {
3034
3024
  var o;
3035
3025
  const w = (o = p.name.split(".").pop()) == null ? void 0 : o.toLowerCase(), C = {
3036
3026
  pdf: "📄",
@@ -3047,14 +3037,14 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3047
3037
  default: "📁"
3048
3038
  };
3049
3039
  return C[w || ""] || C.default;
3050
- }, $ = V(() => e.limit ? m.value.length < e.limit : !0), z = V(() => [
3040
+ }, $ = V(() => e.limit ? m.value.length < e.limit : !0), S = V(() => [
3051
3041
  l.b(),
3052
3042
  l.is("disabled", e.disabled),
3053
3043
  l.is("drag", e.drag),
3054
3044
  l.m(e.listType)
3055
3045
  ]), I = (p) => {
3056
3046
  const w = p.target.files;
3057
- !w || w.length === 0 || (y(Array.from(w)), v.value && (v.value.value = ""));
3047
+ !w || w.length === 0 || (y(Array.from(w)), c.value && (c.value.value = ""));
3058
3048
  }, y = async (p) => {
3059
3049
  var w, C;
3060
3050
  if (e.limit && m.value.length + p.length > e.limit) {
@@ -3069,7 +3059,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3069
3059
  size: o.size,
3070
3060
  status: "ready",
3071
3061
  percentage: 0,
3072
- uid: S(),
3062
+ uid: z(),
3073
3063
  raw: o
3074
3064
  };
3075
3065
  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);
@@ -3134,11 +3124,11 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3134
3124
  w > -1 && (m.value.splice(w, 1), t("update:fileList", m.value), t("remove", p, m.value), (C = e.onRemove) == null || C.call(e, p, m.value));
3135
3125
  }, h = () => {
3136
3126
  m.value.filter((p) => p.status === "ready" && p.raw).forEach((p) => H(p));
3137
- }, c = () => {
3127
+ }, v = () => {
3138
3128
  m.value = [], t("update:fileList", m.value);
3139
3129
  }, x = () => {
3140
3130
  var p;
3141
- e.disabled || (p = v.value) == null || p.click();
3131
+ e.disabled || (p = c.value) == null || p.click();
3142
3132
  }, B = (p) => {
3143
3133
  p.preventDefault(), !e.disabled && e.drag && (b.value = !0);
3144
3134
  }, F = () => {
@@ -3158,10 +3148,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3158
3148
  };
3159
3149
  return k({
3160
3150
  submit: h,
3161
- clearFiles: c,
3151
+ clearFiles: v,
3162
3152
  uploadFiles: m
3163
3153
  }), (p, w) => (i(), d("div", {
3164
- class: u(z.value)
3154
+ class: u(S.value)
3165
3155
  }, [
3166
3156
  s.drag ? (i(), d("div", {
3167
3157
  key: 0,
@@ -3370,7 +3360,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3370
3360
  ], 64)),
3371
3361
  r("input", {
3372
3362
  ref_key: "inputRef",
3373
- ref: v,
3363
+ ref: c,
3374
3364
  type: "file",
3375
3365
  class: u(n(l).e("input")),
3376
3366
  multiple: s.multiple,
@@ -3412,15 +3402,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3412
3402
  },
3413
3403
  emits: ["update:modelValue", "change"],
3414
3404
  setup(s, { emit: k }) {
3415
- const a = s, e = k, t = ae("rate"), l = R(-1), v = V(() => l.value > -1 ? l.value : a.modelValue), m = V(() => [
3405
+ const a = s, e = k, t = ae("rate"), l = R(-1), c = V(() => l.value > -1 ? l.value : a.modelValue), m = V(() => [
3416
3406
  t.b(),
3417
3407
  t.m(a.size),
3418
3408
  t.is("disabled", a.disabled),
3419
3409
  t.is("readonly", a.readonly)
3420
3410
  ]), 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) => {
3421
- const L = v.value;
3411
+ const L = c.value;
3422
3412
  return L >= y ? 100 : a.allowHalf && L >= y - 0.5 ? 50 : 0;
3423
- }, S = (y) => T(y) > 0 ? b(v.value) : a.disabled ? a.disabledVoidColor : a.voidColor, D = V(() => {
3413
+ }, z = (y) => T(y) > 0 ? b(c.value) : a.disabled ? a.disabledVoidColor : a.voidColor, D = V(() => {
3424
3414
  if (a.showScore)
3425
3415
  return a.scoreTemplate.replace("{value}", String(a.modelValue));
3426
3416
  if (a.showText) {
@@ -3435,7 +3425,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3435
3425
  l.value = M ? y - 0.5 : y;
3436
3426
  } else
3437
3427
  l.value = y;
3438
- }, z = () => {
3428
+ }, S = () => {
3439
3429
  a.disabled || a.readonly || (l.value = -1);
3440
3430
  }, I = (y, L) => {
3441
3431
  if (a.disabled || a.readonly) return;
@@ -3449,7 +3439,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3449
3439
  };
3450
3440
  return (y, L) => (i(), d("div", {
3451
3441
  class: u(m.value),
3452
- onMouseleave: z
3442
+ onMouseleave: S
3453
3443
  }, [
3454
3444
  r("div", {
3455
3445
  class: u(n(t).e("items"))
@@ -3467,7 +3457,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3467
3457
  r("span", {
3468
3458
  class: u([n(t).e("fill"), T(H) > 0 ? "is-active" : ""]),
3469
3459
  style: te({
3470
- color: S(H),
3460
+ color: z(H),
3471
3461
  clipPath: `inset(0 ${100 - T(H)}% 0 0)`
3472
3462
  })
3473
3463
  }, U(s.icon), 7)
@@ -3483,7 +3473,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3483
3473
  }), ga = ["value"], ba = { class: "field-type" }, ya = { class: "field-name" }, ka = { class: "field-label" }, Ma = {
3484
3474
  key: 0,
3485
3475
  class: "field-required"
3486
- }, Va = ["onClick"], xa = ["onClick"], wa = ["onClick"], Ca = ["onClick"], $a = { class: "modal-content" }, Da = { class: "modal-header" }, Sa = { class: "modal-body" }, za = { class: "edit-field" }, Ta = { class: "edit-field" }, Ha = { class: "edit-field" }, La = ["value"], Ra = { class: "edit-field" }, Ba = { class: "edit-field" }, ft = /* @__PURE__ */ le({
3476
+ }, Va = ["onClick"], xa = ["onClick"], wa = ["onClick"], Ca = ["onClick"], $a = { class: "modal-content" }, Da = { class: "modal-header" }, za = { class: "modal-body" }, Sa = { class: "edit-field" }, Ta = { class: "edit-field" }, Ha = { class: "edit-field" }, La = ["value"], Ra = { class: "edit-field" }, Ba = { class: "edit-field" }, ft = /* @__PURE__ */ le({
3487
3477
  name: "XDynamicFields",
3488
3478
  __name: "index",
3489
3479
  props: {
@@ -3503,17 +3493,17 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3503
3493
  },
3504
3494
  emits: ["update:fields", "add", "remove", "sort", "update"],
3505
3495
  setup(s, { emit: k }) {
3506
- const a = s, e = k, t = ae("dynamic-fields"), l = R([]), v = R(null), m = R("input"), b = V(() => [
3496
+ const a = s, e = k, t = ae("dynamic-fields"), l = R([]), c = R(null), m = R("input"), b = V(() => [
3507
3497
  t.b(),
3508
3498
  t.is("editable", a.editable)
3509
3499
  ]), T = V(() => l.value.length < a.maxFields);
3510
3500
  ie(() => a.fields, (h) => {
3511
- l.value = [...h].sort((c, x) => (c.order || 0) - (x.order || 0));
3501
+ l.value = [...h].sort((v, x) => (v.order || 0) - (x.order || 0));
3512
3502
  }, { immediate: !0, deep: !0 });
3513
- const S = () => `field_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`, D = () => {
3503
+ const z = () => `field_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`, D = () => {
3514
3504
  if (!T.value) return;
3515
3505
  const h = {
3516
- id: S(),
3506
+ id: z(),
3517
3507
  name: `field_${l.value.length + 1}`,
3518
3508
  label: "新字段",
3519
3509
  type: m.value,
@@ -3522,38 +3512,38 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3522
3512
  };
3523
3513
  l.value.push(h), e("add", h), e("update:fields", l.value);
3524
3514
  }, $ = (h) => {
3525
- const c = l.value.findIndex((x) => x.id === h);
3526
- c !== -1 && (l.value[c], l.value.splice(c, 1), e("remove", h), e("update:fields", l.value));
3527
- }, z = (h) => {
3528
- const c = l.value.findIndex((x) => x.id === h);
3529
- if (c > 0) {
3530
- const x = l.value[c];
3531
- l.value[c] = l.value[c - 1], l.value[c - 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3515
+ const v = l.value.findIndex((x) => x.id === h);
3516
+ v !== -1 && (l.value[v], l.value.splice(v, 1), e("remove", h), e("update:fields", l.value));
3517
+ }, S = (h) => {
3518
+ const v = l.value.findIndex((x) => x.id === h);
3519
+ if (v > 0) {
3520
+ const x = l.value[v];
3521
+ l.value[v] = l.value[v - 1], l.value[v - 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3532
3522
  }
3533
3523
  }, I = (h) => {
3534
- const c = l.value.findIndex((x) => x.id === h);
3535
- if (c < l.value.length - 1) {
3536
- const x = l.value[c];
3537
- l.value[c] = l.value[c + 1], l.value[c + 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3524
+ const v = l.value.findIndex((x) => x.id === h);
3525
+ if (v < l.value.length - 1) {
3526
+ const x = l.value[v];
3527
+ l.value[v] = l.value[v + 1], l.value[v + 1] = x, y(), e("sort", l.value), e("update:fields", l.value);
3538
3528
  }
3539
3529
  }, y = () => {
3540
- l.value.forEach((h, c) => {
3541
- h.order = c;
3530
+ l.value.forEach((h, v) => {
3531
+ h.order = v;
3542
3532
  });
3543
3533
  }, L = (h) => {
3544
- v.value = { ...h };
3534
+ c.value = { ...h };
3545
3535
  }, H = () => {
3546
- if (v.value) {
3547
- const h = l.value.findIndex((c) => c.id === v.value.id);
3548
- h !== -1 && (l.value[h] = v.value, e("update", v.value.id, v.value), e("update:fields", l.value)), v.value = null;
3536
+ if (c.value) {
3537
+ const h = l.value.findIndex((v) => v.id === c.value.id);
3538
+ h !== -1 && (l.value[h] = c.value, e("update", c.value.id, c.value), e("update:fields", l.value)), c.value = null;
3549
3539
  }
3550
3540
  }, P = () => {
3551
- v.value = null;
3541
+ c.value = null;
3552
3542
  }, M = (h) => {
3553
- const c = a.availableTypes.find((x) => x.value === h);
3554
- return (c == null ? void 0 : c.label) || h;
3543
+ const v = a.availableTypes.find((x) => x.value === h);
3544
+ return (v == null ? void 0 : v.label) || h;
3555
3545
  };
3556
- return (h, c) => (i(), d("div", {
3546
+ return (h, v) => (i(), d("div", {
3557
3547
  class: u(b.value)
3558
3548
  }, [
3559
3549
  s.editable && T.value ? (i(), d("div", {
@@ -3561,7 +3551,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3561
3551
  class: u(n(t).e("add"))
3562
3552
  }, [
3563
3553
  oe(r("select", {
3564
- "onUpdate:modelValue": c[0] || (c[0] = (x) => m.value = x),
3554
+ "onUpdate:modelValue": v[0] || (v[0] = (x) => m.value = x),
3565
3555
  class: u(n(t).e("type-select"))
3566
3556
  }, [
3567
3557
  (i(!0), d(J, null, _(s.availableTypes, (x) => (i(), d("option", {
@@ -3599,7 +3589,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3599
3589
  key: 0,
3600
3590
  class: "action-btn",
3601
3591
  title: "上移",
3602
- onClick: (B) => z(x.id)
3592
+ onClick: (B) => S(x.id)
3603
3593
  }, [
3604
3594
  Q(n(ee), {
3605
3595
  name: "move-up",
@@ -3643,16 +3633,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3643
3633
  l.value.length === 0 ? (i(), d("div", {
3644
3634
  key: 1,
3645
3635
  class: u(n(t).e("empty"))
3646
- }, [...c[6] || (c[6] = [
3636
+ }, [...v[6] || (v[6] = [
3647
3637
  r("span", null, "暂无字段配置", -1)
3648
3638
  ])], 2)) : N("", !0),
3649
- v.value ? (i(), d("div", {
3639
+ c.value ? (i(), d("div", {
3650
3640
  key: 2,
3651
3641
  class: u(n(t).e("edit-modal"))
3652
3642
  }, [
3653
3643
  r("div", $a, [
3654
3644
  r("div", Da, [
3655
- c[7] || (c[7] = r("span", null, "编辑字段", -1)),
3645
+ v[7] || (v[7] = r("span", null, "编辑字段", -1)),
3656
3646
  r("button", {
3657
3647
  class: "close-btn",
3658
3648
  onClick: P
@@ -3663,55 +3653,55 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3663
3653
  })
3664
3654
  ])
3665
3655
  ]),
3666
- r("div", Sa, [
3667
- r("div", za, [
3668
- c[8] || (c[8] = r("label", null, "字段名称", -1)),
3656
+ r("div", za, [
3657
+ r("div", Sa, [
3658
+ v[8] || (v[8] = r("label", null, "字段名称", -1)),
3669
3659
  oe(r("input", {
3670
- "onUpdate:modelValue": c[1] || (c[1] = (x) => v.value.name = x),
3660
+ "onUpdate:modelValue": v[1] || (v[1] = (x) => c.value.name = x),
3671
3661
  type: "text",
3672
3662
  placeholder: "变量名称"
3673
3663
  }, null, 512), [
3674
- [Me, v.value.name]
3664
+ [Me, c.value.name]
3675
3665
  ])
3676
3666
  ]),
3677
3667
  r("div", Ta, [
3678
- c[9] || (c[9] = r("label", null, "字段标签", -1)),
3668
+ v[9] || (v[9] = r("label", null, "字段标签", -1)),
3679
3669
  oe(r("input", {
3680
- "onUpdate:modelValue": c[2] || (c[2] = (x) => v.value.label = x),
3670
+ "onUpdate:modelValue": v[2] || (v[2] = (x) => c.value.label = x),
3681
3671
  type: "text",
3682
3672
  placeholder: "显示标签"
3683
3673
  }, null, 512), [
3684
- [Me, v.value.label]
3674
+ [Me, c.value.label]
3685
3675
  ])
3686
3676
  ]),
3687
3677
  r("div", Ha, [
3688
- c[10] || (c[10] = r("label", null, "字段类型", -1)),
3678
+ v[10] || (v[10] = r("label", null, "字段类型", -1)),
3689
3679
  oe(r("select", {
3690
- "onUpdate:modelValue": c[3] || (c[3] = (x) => v.value.type = x)
3680
+ "onUpdate:modelValue": v[3] || (v[3] = (x) => c.value.type = x)
3691
3681
  }, [
3692
3682
  (i(!0), d(J, null, _(s.availableTypes, (x) => (i(), d("option", {
3693
3683
  key: x.value,
3694
3684
  value: x.value
3695
3685
  }, U(x.label), 9, La))), 128))
3696
3686
  ], 512), [
3697
- [we, v.value.type]
3687
+ [we, c.value.type]
3698
3688
  ])
3699
3689
  ]),
3700
3690
  r("div", Ra, [
3701
- c[11] || (c[11] = r("label", null, "是否必填", -1)),
3691
+ v[11] || (v[11] = r("label", null, "是否必填", -1)),
3702
3692
  r("button", {
3703
- class: u(["switch-btn", { "is-on": v.value.required }]),
3704
- onClick: c[4] || (c[4] = (x) => v.value.required = !v.value.required)
3705
- }, U(v.value.required ? "必填" : "可选"), 3)
3693
+ class: u(["switch-btn", { "is-on": c.value.required }]),
3694
+ onClick: v[4] || (v[4] = (x) => c.value.required = !c.value.required)
3695
+ }, U(c.value.required ? "必填" : "可选"), 3)
3706
3696
  ]),
3707
3697
  r("div", Ba, [
3708
- c[12] || (c[12] = r("label", null, "占位文本", -1)),
3698
+ v[12] || (v[12] = r("label", null, "占位文本", -1)),
3709
3699
  oe(r("input", {
3710
- "onUpdate:modelValue": c[5] || (c[5] = (x) => v.value.placeholder = x),
3700
+ "onUpdate:modelValue": v[5] || (v[5] = (x) => c.value.placeholder = x),
3711
3701
  type: "text",
3712
3702
  placeholder: "输入提示"
3713
3703
  }, null, 512), [
3714
- [Me, v.value.placeholder]
3704
+ [Me, c.value.placeholder]
3715
3705
  ])
3716
3706
  ])
3717
3707
  ]),
@@ -3744,20 +3734,20 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3744
3734
  emits: ["update:modelValue", "change", "focus", "blur"],
3745
3735
  setup(s, { expose: k, emit: a }) {
3746
3736
  const e = s, t = a, l = Ee(
3747
- () => import("./index.esm-C9sEwyHF.mjs").then((c) => c.Editor)
3748
- ), v = Ee(
3749
- () => import("./index.esm-C9sEwyHF.mjs").then((c) => c.Toolbar)
3737
+ () => import("./index.esm-C9sEwyHF.mjs").then((v) => v.Editor)
3738
+ ), c = Ee(
3739
+ () => import("./index.esm-C9sEwyHF.mjs").then((v) => v.Toolbar)
3750
3740
  ), m = qe(), b = R(e.modelValue), T = R(!1);
3751
3741
  pe(() => {
3752
3742
  T.value = !0;
3753
3743
  }), ie(
3754
3744
  () => e.modelValue,
3755
- (c) => {
3756
- c !== b.value && (b.value = c);
3745
+ (v) => {
3746
+ v !== b.value && (b.value = v);
3757
3747
  }
3758
3748
  );
3759
- const S = V(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height })), D = V(() => {
3760
- const c = {
3749
+ const z = V(() => ({ height: typeof e.height == "number" ? `${e.height}px` : e.height })), D = V(() => {
3750
+ const v = {
3761
3751
  excludeKeys: []
3762
3752
  };
3763
3753
  if (Array.isArray(e.toolbar)) {
@@ -3816,9 +3806,9 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3816
3806
  "redo",
3817
3807
  "fullScreen"
3818
3808
  ];
3819
- c.excludeKeys = x.filter((B) => !e.toolbar.includes(B));
3809
+ v.excludeKeys = x.filter((B) => !e.toolbar.includes(B));
3820
3810
  }
3821
- return c;
3811
+ return v;
3822
3812
  }), $ = V(() => ({
3823
3813
  placeholder: e.placeholder,
3824
3814
  readOnly: e.disabled,
@@ -3827,50 +3817,50 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3827
3817
  // 上传图片配置
3828
3818
  uploadImage: {
3829
3819
  // 自定义上传
3830
- async customUpload(c, x) {
3831
- const B = URL.createObjectURL(c);
3832
- x(B, c.name, B);
3820
+ async customUpload(v, x) {
3821
+ const B = URL.createObjectURL(v);
3822
+ x(B, v.name, B);
3833
3823
  }
3834
3824
  },
3835
3825
  // 上传视频配置
3836
3826
  uploadVideo: {
3837
- async customUpload(c, x) {
3838
- const B = URL.createObjectURL(c);
3827
+ async customUpload(v, x) {
3828
+ const B = URL.createObjectURL(v);
3839
3829
  x(B, "");
3840
3830
  }
3841
3831
  }
3842
3832
  }
3843
- })), z = (c) => {
3844
- m.value = c;
3845
- }, I = (c) => {
3846
- const x = c.getHtml();
3833
+ })), S = (v) => {
3834
+ m.value = v;
3835
+ }, I = (v) => {
3836
+ const x = v.getHtml();
3847
3837
  b.value = x, t("update:modelValue", x), t("change", x);
3848
- }, y = (c) => {
3849
- t("focus", c);
3850
- }, L = (c) => {
3851
- t("blur", c);
3838
+ }, y = (v) => {
3839
+ t("focus", v);
3840
+ }, L = (v) => {
3841
+ t("blur", v);
3852
3842
  };
3853
3843
  return k({
3854
3844
  getEditor: () => m.value,
3855
3845
  getText: () => {
3856
- var c;
3857
- return ((c = m.value) == null ? void 0 : c.getText()) || "";
3846
+ var v;
3847
+ return ((v = m.value) == null ? void 0 : v.getText()) || "";
3858
3848
  },
3859
- setHtml: (c) => {
3860
- b.value = c;
3849
+ setHtml: (v) => {
3850
+ b.value = v;
3861
3851
  },
3862
3852
  clear: () => {
3863
- var c;
3864
- b.value = "", (c = m.value) == null || c.clear();
3853
+ var v;
3854
+ b.value = "", (v = m.value) == null || v.clear();
3865
3855
  }
3866
3856
  }), je(() => {
3867
- const c = m.value;
3868
- c && c.destroy();
3869
- }), (c, x) => (i(), d("div", {
3857
+ const v = m.value;
3858
+ v && v.destroy();
3859
+ }), (v, x) => (i(), d("div", {
3870
3860
  class: u(["x-rich-editor", { "is-disabled": s.disabled }])
3871
3861
  }, [
3872
3862
  T.value ? (i(), d(J, { key: 0 }, [
3873
- s.toolbar !== !1 ? (i(), fe(n(v), {
3863
+ s.toolbar !== !1 ? (i(), fe(n(c), {
3874
3864
  key: 0,
3875
3865
  editor: m.value,
3876
3866
  "default-config": D.value,
@@ -3882,16 +3872,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3882
3872
  "onUpdate:modelValue": x[0] || (x[0] = (B) => b.value = B),
3883
3873
  "default-config": $.value,
3884
3874
  mode: s.mode,
3885
- style: te(S.value),
3875
+ style: te(z.value),
3886
3876
  class: "x-rich-editor__content",
3887
- onOnCreated: z,
3877
+ onOnCreated: S,
3888
3878
  onOnChange: I,
3889
3879
  onOnFocus: y,
3890
3880
  onOnBlur: L
3891
3881
  }, null, 8, ["modelValue", "default-config", "mode", "style"])
3892
3882
  ], 64)) : (i(), d("div", {
3893
3883
  key: 1,
3894
- style: te(S.value),
3884
+ style: te(z.value),
3895
3885
  class: "x-rich-editor__placeholder"
3896
3886
  }, U(s.placeholder), 5))
3897
3887
  ], 2));
@@ -3913,7 +3903,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3913
3903
  },
3914
3904
  emits: ["update:modelValue", "change"],
3915
3905
  setup(s, { emit: k }) {
3916
- const a = s, e = k, t = ae("cascader"), l = R(!1), v = R([]), m = R([]);
3906
+ const a = s, e = k, t = ae("cascader"), l = R(!1), c = R([]), m = R([]);
3917
3907
  R("");
3918
3908
  const b = R(""), T = R();
3919
3909
  V(() => ({
@@ -3922,20 +3912,20 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3922
3912
  children: a.props.children || "children",
3923
3913
  disabled: a.props.disabled || "disabled"
3924
3914
  }));
3925
- const S = V(() => a.props.multiple), D = V(() => a.props.checkStrictly), $ = V(() => {
3926
- if (S.value)
3915
+ const z = V(() => a.props.multiple), D = V(() => a.props.checkStrictly), $ = V(() => {
3916
+ if (z.value)
3927
3917
  return m.value.length === 0 ? "" : m.value.map((w) => y(w)).join(", ");
3928
- if (v.value.length === 0) return "";
3918
+ if (c.value.length === 0) return "";
3929
3919
  if (a.showAllLevels)
3930
- return v.value.map((w) => L(w, v.value)).join(a.separator);
3931
- const p = v.value[v.value.length - 1];
3932
- return L(p, v.value);
3933
- }), z = V(() => {
3920
+ return c.value.map((w) => L(w, c.value)).join(a.separator);
3921
+ const p = c.value[c.value.length - 1];
3922
+ return L(p, c.value);
3923
+ }), S = V(() => {
3934
3924
  var w;
3935
3925
  const p = [a.options];
3936
- if (v.value.length > 0) {
3926
+ if (c.value.length > 0) {
3937
3927
  let C = a.options;
3938
- for (const o of v.value) {
3928
+ for (const o of c.value) {
3939
3929
  const f = C.find((g) => g.value === o);
3940
3930
  if ((w = f == null ? void 0 : f.children) != null && w.length)
3941
3931
  p.push(f.children), C = f.children;
@@ -3968,33 +3958,33 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
3968
3958
  }, H = (p, w) => {
3969
3959
  var o;
3970
3960
  if (p.disabled) return;
3971
- const C = v.value.slice(0, w);
3972
- C.push(p.value), v.value = C, (!((o = p.children) != null && o.length) || D.value) && (S.value || (l.value = !1, c(C)));
3961
+ const C = c.value.slice(0, w);
3962
+ C.push(p.value), c.value = C, (!((o = p.children) != null && o.length) || D.value) && (z.value || (l.value = !1, v(C)));
3973
3963
  }, P = (p, w, C) => {
3974
- const o = [...v.value.slice(0, w), p.value];
3964
+ const o = [...c.value.slice(0, w), p.value];
3975
3965
  C ? m.value.some((f) => JSON.stringify(f) === JSON.stringify(o)) || m.value.push(o) : m.value = m.value.filter((f) => JSON.stringify(f) !== JSON.stringify(o)), x();
3976
3966
  }, M = (p, w) => {
3977
- const C = [...v.value.slice(0, w), p.value];
3967
+ const C = [...c.value.slice(0, w), p.value];
3978
3968
  return m.value.some((o) => JSON.stringify(o) === JSON.stringify(C));
3979
- }, h = (p, w) => v.value[w] === p.value, c = (p) => {
3969
+ }, h = (p, w) => c.value[w] === p.value, v = (p) => {
3980
3970
  const w = a.props.emitPath !== !1 ? p : p[p.length - 1];
3981
3971
  e("update:modelValue", w), e("change", w);
3982
3972
  }, x = () => {
3983
3973
  const p = a.props.emitPath !== !1 ? m.value : m.value.map((w) => w[w.length - 1]);
3984
3974
  e("update:modelValue", p), e("change", p);
3985
3975
  }, B = () => {
3986
- v.value = [], m.value = [], e("update:modelValue", S.value ? [] : ""), e("change", S.value ? [] : "");
3976
+ c.value = [], m.value = [], e("update:modelValue", z.value ? [] : ""), e("change", z.value ? [] : "");
3987
3977
  }, F = (p) => {
3988
3978
  b.value = p.target.value;
3989
3979
  }, O = (p) => {
3990
- v.value = p.map((w) => w.value), b.value = "", l.value = !1, c(v.value);
3980
+ c.value = p.map((w) => w.value), b.value = "", l.value = !1, v(c.value);
3991
3981
  }, j = (p) => {
3992
3982
  p.target.closest(`.${t.b()}`) || (l.value = !1);
3993
3983
  };
3994
3984
  return ie(l, (p) => {
3995
3985
  p ? document.addEventListener("click", j) : (document.removeEventListener("click", j), b.value = "");
3996
3986
  }), ie(() => a.modelValue, (p) => {
3997
- S.value ? m.value = Array.isArray(p) ? p : [] : Array.isArray(p) ? v.value = p : p !== "" && p !== null && p !== void 0 ? v.value = [p] : v.value = [];
3987
+ z.value ? m.value = Array.isArray(p) ? p : [] : Array.isArray(p) ? c.value = p : p !== "" && p !== null && p !== void 0 ? c.value = [p] : c.value = [];
3998
3988
  }, { immediate: !0 }), (p, w) => (i(), d("div", {
3999
3989
  class: u([n(t).b(), n(t).m(s.size), n(t).is("disabled", s.disabled)]),
4000
3990
  onClick: w[2] || (w[2] = ue(() => {
@@ -4062,7 +4052,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4062
4052
  ref_key: "menuRef",
4063
4053
  ref: T
4064
4054
  }, [
4065
- (i(!0), d(J, null, _(z.value, (C, o) => (i(), d("div", {
4055
+ (i(!0), d(J, null, _(S.value, (C, o) => (i(), d("div", {
4066
4056
  key: o,
4067
4057
  class: u(n(t).e("column"))
4068
4058
  }, [
@@ -4077,7 +4067,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4077
4067
  ]),
4078
4068
  onClick: (X) => H(f, o)
4079
4069
  }, [
4080
- S.value ? (i(), d("span", {
4070
+ z.value ? (i(), d("span", {
4081
4071
  key: 0,
4082
4072
  class: u(n(t).e("checkbox")),
4083
4073
  onClick: w[1] || (w[1] = ue(() => {
@@ -4122,7 +4112,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4122
4112
  },
4123
4113
  emits: ["update:modelValue", "change"],
4124
4114
  setup(s, { emit: k }) {
4125
- const a = s, e = k, t = ae("color-picker"), l = R(!1), v = R(0), m = R(100), b = R(100), T = R(100), S = R(), D = R(), $ = V(() => y(v.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, O, j) => {
4115
+ const a = s, e = k, t = ae("color-picker"), l = R(!1), c = R(0), m = R(100), b = R(100), T = R(100), z = R(), D = R(), $ = V(() => y(c.value, m.value, b.value)), S = V(() => a.showAlpha ? `${$.value}${Math.round(T.value * 2.55).toString(16).padStart(2, "0")}` : $.value), I = V(() => a.modelValue || $.value), y = (F, O, j) => {
4126
4116
  O /= 100, j /= 100;
4127
4117
  const p = j * O, w = p * (1 - Math.abs(F / 60 % 2 - 1)), C = j - p;
4128
4118
  let o = 0, f = 0, g = 0;
@@ -4148,22 +4138,22 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4148
4138
  }
4149
4139
  return { h: f, s: g * 100, v: X * 100 };
4150
4140
  }, H = (F) => {
4151
- if (!S.value) return;
4152
- const O = S.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width)), p = Math.max(0, Math.min(1, (F.clientY - O.top) / O.height));
4141
+ if (!z.value) return;
4142
+ const O = z.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width)), p = Math.max(0, Math.min(1, (F.clientY - O.top) / O.height));
4153
4143
  m.value = Math.round(j * 100), b.value = Math.round((1 - p) * 100);
4154
4144
  }, P = (F) => {
4155
4145
  if (!D.value) return;
4156
4146
  const O = D.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width));
4157
- v.value = Math.round(j * 360);
4147
+ c.value = Math.round(j * 360);
4158
4148
  }, M = (F) => {
4159
4149
  if (!D.value) return;
4160
4150
  const O = D.value.getBoundingClientRect(), j = Math.max(0, Math.min(1, (F.clientX - O.left) / O.width));
4161
4151
  T.value = Math.round(j * 100);
4162
4152
  }, h = (F) => {
4163
4153
  const O = L(F);
4164
- v.value = O.h, m.value = O.s, b.value = O.v, e("update:modelValue", F), e("change", F);
4165
- }, c = () => {
4166
- e("update:modelValue", z.value), e("change", z.value), l.value = !1;
4154
+ c.value = O.h, m.value = O.s, b.value = O.v, e("update:modelValue", F), e("change", F);
4155
+ }, v = () => {
4156
+ e("update:modelValue", S.value), e("change", S.value), l.value = !1;
4167
4157
  }, x = () => {
4168
4158
  e("update:modelValue", ""), e("change", ""), l.value = !1;
4169
4159
  }, B = (F) => {
@@ -4173,7 +4163,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4173
4163
  if (F) {
4174
4164
  if (document.addEventListener("click", B), a.modelValue) {
4175
4165
  const O = L(a.modelValue.slice(0, 7));
4176
- v.value = O.h, m.value = O.s, b.value = O.v, a.showAlpha && a.modelValue.length === 9 && (T.value = Math.round(parseInt(a.modelValue.slice(7, 9), 16) / 2.55));
4166
+ c.value = O.h, m.value = O.s, b.value = O.v, a.showAlpha && a.modelValue.length === 9 && (T.value = Math.round(parseInt(a.modelValue.slice(7, 9), 16) / 2.55));
4177
4167
  }
4178
4168
  } else
4179
4169
  document.removeEventListener("click", B);
@@ -4202,10 +4192,10 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4202
4192
  }, [
4203
4193
  r("div", {
4204
4194
  ref_key: "panelRef",
4205
- ref: S,
4195
+ ref: z,
4206
4196
  class: u(n(t).e("panel")),
4207
4197
  style: te({
4208
- backgroundColor: `hsl(${v.value}, 100%, 50%)`
4198
+ backgroundColor: `hsl(${c.value}, 100%, 50%)`
4209
4199
  }),
4210
4200
  onClick: H
4211
4201
  }, [
@@ -4234,7 +4224,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4234
4224
  }, [
4235
4225
  r("div", {
4236
4226
  class: u(n(t).e("hue-thumb")),
4237
- style: te({ left: `${v.value / 360 * 100}%` })
4227
+ style: te({ left: `${c.value / 360 * 100}%` })
4238
4228
  }, null, 6)
4239
4229
  ], 2)
4240
4230
  ], 2),
@@ -4271,7 +4261,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4271
4261
  }, [
4272
4262
  r("span", {
4273
4263
  class: u(n(t).e("value"))
4274
- }, U(z.value), 3),
4264
+ }, U(S.value), 3),
4275
4265
  r("div", {
4276
4266
  class: u(n(t).e("btns"))
4277
4267
  }, [
@@ -4281,7 +4271,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4281
4271
  }, "清空", 2),
4282
4272
  r("button", {
4283
4273
  class: u([n(t).e("btn"), n(t).e("btn--primary")]),
4284
- onClick: c
4274
+ onClick: v
4285
4275
  }, "确定", 2)
4286
4276
  ], 2)
4287
4277
  ], 2)
@@ -4307,23 +4297,23 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4307
4297
  },
4308
4298
  emits: ["update:modelValue", "select", "clear"],
4309
4299
  setup(s, { emit: k }) {
4310
- const a = s, e = k, t = ae("auto-complete"), l = R(!1), v = R(a.modelValue), m = R([]), b = R(-1), T = R(), S = R(!1);
4300
+ const a = s, e = k, t = ae("auto-complete"), l = R(!1), c = R(a.modelValue), m = R([]), b = R(-1), T = R(), z = R(!1);
4311
4301
  let D = null;
4312
4302
  const $ = (M) => {
4313
- a.fetchSuggestions ? (S.value = !0, a.fetchSuggestions(M, (h) => {
4314
- m.value = h, S.value = !1, l.value = h.length > 0;
4303
+ a.fetchSuggestions ? (z.value = !0, a.fetchSuggestions(M, (h) => {
4304
+ m.value = h, z.value = !1, l.value = h.length > 0;
4315
4305
  })) : a.suggestions.length && (m.value = a.suggestions.filter(
4316
4306
  (h) => h[a.valueKey].toLowerCase().includes(M.toLowerCase())
4317
4307
  ), l.value = m.value.length > 0);
4318
- }, z = (M) => {
4308
+ }, S = (M) => {
4319
4309
  const h = M.target.value;
4320
- v.value = h, e("update:modelValue", h), b.value = -1, D && clearTimeout(D), D = setTimeout(() => {
4310
+ c.value = h, e("update:modelValue", h), b.value = -1, D && clearTimeout(D), D = setTimeout(() => {
4321
4311
  h || a.triggerOnFocus ? $(h) : l.value = !1;
4322
4312
  }, a.debounce);
4323
4313
  }, I = () => {
4324
- a.triggerOnFocus && v.value === "" && $("");
4314
+ a.triggerOnFocus && c.value === "" && $("");
4325
4315
  }, y = (M) => {
4326
- v.value = M[a.valueKey], e("update:modelValue", v.value), e("select", M), l.value = !1;
4316
+ c.value = M[a.valueKey], e("update:modelValue", c.value), e("select", M), l.value = !1;
4327
4317
  }, L = (M) => {
4328
4318
  if (l.value)
4329
4319
  switch (M.key) {
@@ -4345,14 +4335,14 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4345
4335
  }
4346
4336
  }, H = () => {
4347
4337
  var M;
4348
- v.value = "", e("update:modelValue", ""), e("clear"), l.value = !1, (M = T.value) == null || M.focus();
4338
+ c.value = "", e("update:modelValue", ""), e("clear"), l.value = !1, (M = T.value) == null || M.focus();
4349
4339
  }, P = (M) => {
4350
4340
  M.target.closest(`.${t.b()}`) || (l.value = !1);
4351
4341
  };
4352
4342
  return ie(l, (M) => {
4353
4343
  M ? document.addEventListener("click", P) : (document.removeEventListener("click", P), b.value = -1);
4354
4344
  }), ie(() => a.modelValue, (M) => {
4355
- v.value = M;
4345
+ c.value = M;
4356
4346
  }), (M, h) => (i(), d("div", {
4357
4347
  class: u([n(t).b(), n(t).m(s.size)]),
4358
4348
  onClick: h[0] || (h[0] = ue(() => {
@@ -4364,15 +4354,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4364
4354
  r("input", {
4365
4355
  ref_key: "inputRef",
4366
4356
  ref: T,
4367
- value: v.value,
4357
+ value: c.value,
4368
4358
  placeholder: s.placeholder,
4369
4359
  disabled: s.disabled,
4370
4360
  class: u(n(t).e("inner")),
4371
- onInput: z,
4361
+ onInput: S,
4372
4362
  onFocus: I,
4373
4363
  onKeydown: L
4374
4364
  }, null, 42, Ea),
4375
- s.clearable && v.value ? (i(), d("span", {
4365
+ s.clearable && c.value ? (i(), d("span", {
4376
4366
  key: 0,
4377
4367
  class: u(n(t).e("clear")),
4378
4368
  onClick: H
@@ -4382,7 +4372,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4382
4372
  size: 14
4383
4373
  })
4384
4374
  ], 2)) : N("", !0),
4385
- S.value ? (i(), d("span", {
4375
+ z.value ? (i(), d("span", {
4386
4376
  key: 1,
4387
4377
  class: u(n(t).e("loading"))
4388
4378
  }, [
@@ -4398,16 +4388,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4398
4388
  r("ul", {
4399
4389
  class: u(n(t).e("list"))
4400
4390
  }, [
4401
- (i(!0), d(J, null, _(m.value, (c, x) => (i(), d("li", {
4391
+ (i(!0), d(J, null, _(m.value, (v, x) => (i(), d("li", {
4402
4392
  key: x,
4403
4393
  class: u([
4404
4394
  n(t).e("item"),
4405
4395
  n(t).is("highlighted", x === b.value)
4406
4396
  ]),
4407
- onClick: (B) => y(c)
4397
+ onClick: (B) => y(v)
4408
4398
  }, [
4409
- se(M.$slots, "default", { item: c }, () => [
4410
- de(U(c[s.valueKey]), 1)
4399
+ se(M.$slots, "default", { item: v }, () => [
4400
+ de(U(v[s.valueKey]), 1)
4411
4401
  ])
4412
4402
  ], 10, Ya))), 128))
4413
4403
  ], 2)
@@ -4428,17 +4418,17 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4428
4418
  },
4429
4419
  emits: ["update:modelValue", "change"],
4430
4420
  setup(s, { emit: k }) {
4431
- const a = s, e = k, t = ae("segmented"), l = R(), v = V(() => a.options.map((S) => typeof S == "string" || typeof S == "number" ? { label: String(S), value: S } : S)), m = V(() => v.value.findIndex((S) => S.value === a.modelValue)), b = V(() => {
4421
+ const a = s, e = k, t = ae("segmented"), l = R(), c = V(() => a.options.map((z) => typeof z == "string" || typeof z == "number" ? { label: String(z), value: z } : z)), m = V(() => c.value.findIndex((z) => z.value === a.modelValue)), b = V(() => {
4432
4422
  if (!l.value || m.value < 0) return {};
4433
4423
  const D = l.value.querySelectorAll(`.${t.e("item")}`)[m.value];
4434
4424
  return D ? {
4435
4425
  width: `${D.offsetWidth}px`,
4436
4426
  transform: `translateX(${D.offsetLeft}px)`
4437
4427
  } : {};
4438
- }), T = (S) => {
4439
- a.disabled || S.disabled || (e("update:modelValue", S.value), e("change", S.value));
4428
+ }), T = (z) => {
4429
+ a.disabled || z.disabled || (e("update:modelValue", z.value), e("change", z.value));
4440
4430
  };
4441
- return (S, D) => (i(), d("div", {
4431
+ return (z, D) => (i(), d("div", {
4442
4432
  ref_key: "containerRef",
4443
4433
  ref: l,
4444
4434
  class: u([
@@ -4452,16 +4442,16 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4452
4442
  class: u(n(t).e("thumb")),
4453
4443
  style: te(b.value)
4454
4444
  }, null, 6),
4455
- (i(!0), d(J, null, _(v.value, ($, z) => (i(), d("div", {
4456
- key: z,
4445
+ (i(!0), d(J, null, _(c.value, ($, S) => (i(), d("div", {
4446
+ key: S,
4457
4447
  class: u([
4458
4448
  n(t).e("item"),
4459
- n(t).is("selected", z === m.value),
4449
+ n(t).is("selected", S === m.value),
4460
4450
  n(t).is("disabled", $.disabled)
4461
4451
  ]),
4462
4452
  onClick: (I) => T($)
4463
4453
  }, [
4464
- se(S.$slots, "default", { option: $ }, () => [
4454
+ se(z.$slots, "default", { option: $ }, () => [
4465
4455
  de(U($.label), 1)
4466
4456
  ])
4467
4457
  ], 10, Ua))), 128))
@@ -4482,26 +4472,26 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4482
4472
  },
4483
4473
  emits: ["update:modelValue", "select", "change"],
4484
4474
  setup(s, { emit: k }) {
4485
- const a = s, e = k, t = ae("mention"), l = R(a.modelValue), v = R(!1), m = R([]), b = R(-1), T = R(), S = R(), D = R(0), $ = R(-1), z = (M) => {
4486
- m.value = a.options.filter((h) => h.disabled ? !1 : (h.label || h.value).toLowerCase().includes(M.toLowerCase())), v.value = m.value.length > 0, b.value = -1;
4475
+ const a = s, e = k, t = ae("mention"), l = R(a.modelValue), c = R(!1), m = R([]), b = R(-1), T = R(), z = R(), D = R(0), $ = R(-1), S = (M) => {
4476
+ 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;
4487
4477
  }, I = (M) => {
4488
4478
  const h = M.target;
4489
4479
  l.value = h.value, D.value = h.selectionStart || 0;
4490
- const c = l.value.slice(0, D.value), x = c.lastIndexOf(a.prefix);
4480
+ const v = l.value.slice(0, D.value), x = v.lastIndexOf(a.prefix);
4491
4481
  if (x >= 0) {
4492
- const B = c.slice(x + a.prefix.length);
4493
- $.value = x, z(B);
4482
+ const B = v.slice(x + a.prefix.length);
4483
+ $.value = x, S(B);
4494
4484
  } else
4495
- v.value = !1;
4485
+ c.value = !1;
4496
4486
  e("update:modelValue", l.value), e("change", l.value);
4497
4487
  }, y = (M) => {
4498
- const h = l.value.slice(0, $.value), c = l.value.slice(D.value), x = `${a.prefix}${M.value}${a.split}`;
4499
- l.value = h + x + c, e("update:modelValue", l.value), e("select", M, a.prefix), e("change", l.value), v.value = !1, De(() => {
4488
+ const h = l.value.slice(0, $.value), v = l.value.slice(D.value), x = `${a.prefix}${M.value}${a.split}`;
4489
+ l.value = h + x + v, e("update:modelValue", l.value), e("select", M, a.prefix), e("change", l.value), c.value = !1, De(() => {
4500
4490
  const B = h.length + x.length;
4501
- T.value && (T.value.setSelectionRange(B, B), T.value.focus()), S.value && (S.value.setSelectionRange(B, B), S.value.focus());
4491
+ T.value && (T.value.setSelectionRange(B, B), T.value.focus()), z.value && (z.value.setSelectionRange(B, B), z.value.focus());
4502
4492
  });
4503
4493
  }, L = (M) => {
4504
- if (v.value)
4494
+ if (c.value)
4505
4495
  switch (M.key) {
4506
4496
  case "ArrowDown":
4507
4497
  M.preventDefault(), b.value = Math.min(
@@ -4516,15 +4506,15 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4516
4506
  M.preventDefault(), b.value >= 0 && y(m.value[b.value]);
4517
4507
  break;
4518
4508
  case "Escape":
4519
- v.value = !1;
4509
+ c.value = !1;
4520
4510
  break;
4521
4511
  }
4522
4512
  }, H = () => {
4523
4513
  l.value = "", e("update:modelValue", ""), e("change", "");
4524
4514
  }, P = (M) => {
4525
- M.target.closest(`.${t.b()}`) || (v.value = !1);
4515
+ M.target.closest(`.${t.b()}`) || (c.value = !1);
4526
4516
  };
4527
- return ie(v, (M) => {
4517
+ return ie(c, (M) => {
4528
4518
  M ? document.addEventListener("click", P) : document.removeEventListener("click", P);
4529
4519
  }), ie(() => a.modelValue, (M) => {
4530
4520
  l.value = M;
@@ -4534,7 +4524,7 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4534
4524
  }, ["stop"]))
4535
4525
  }, [
4536
4526
  r("div", {
4537
- class: u([n(t).e("input"), n(t).is("focus", v.value)])
4527
+ class: u([n(t).e("input"), n(t).is("focus", c.value)])
4538
4528
  }, [
4539
4529
  r("input", {
4540
4530
  ref_key: "inputRef",
@@ -4563,30 +4553,30 @@ const Ol = ["onClick"], El = ["placeholder", "disabled", "readonly", "value"], Y
4563
4553
  r("ul", {
4564
4554
  class: u(n(t).e("list"))
4565
4555
  }, [
4566
- (i(!0), d(J, null, _(m.value, (c, x) => (i(), d("li", {
4567
- key: c.value,
4556
+ (i(!0), d(J, null, _(m.value, (v, x) => (i(), d("li", {
4557
+ key: v.value,
4568
4558
  class: u([
4569
4559
  n(t).e("item"),
4570
4560
  n(t).is("highlighted", x === b.value),
4571
- n(t).is("disabled", c.disabled)
4561
+ n(t).is("disabled", v.disabled)
4572
4562
  ]),
4573
- onClick: (B) => y(c)
4563
+ onClick: (B) => y(v)
4574
4564
  }, [
4575
- c.avatar ? (i(), d("img", {
4565
+ v.avatar ? (i(), d("img", {
4576
4566
  key: 0,
4577
- src: c.avatar,
4567
+ src: v.avatar,
4578
4568
  class: u(n(t).e("avatar"))
4579
4569
  }, null, 10, Ka)) : N("", !0),
4580
4570
  r("span", {
4581
4571
  class: u(n(t).e("label"))
4582
- }, U(c.label || c.value), 3),
4572
+ }, U(v.label || v.value), 3),
4583
4573
  r("span", {
4584
4574
  class: u(n(t).e("value"))
4585
- }, U(c.value), 3)
4575
+ }, U(v.value), 3)
4586
4576
  ], 10, Xa))), 128))
4587
4577
  ], 2)
4588
4578
  ], 2), [
4589
- [ge, v.value]
4579
+ [ge, c.value]
4590
4580
  ])
4591
4581
  ], 2));
4592
4582
  }