@svar-ui/react-core 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as l, jsxs as R, Fragment as _ } from "react/jsx-runtime";
2
- import { createContext as fe, useContext as K, useState as B, useCallback as D, useRef as S, useEffect as W, useMemo as A, useLayoutEffect as me, memo as Ue, useId as _e, forwardRef as Qe, useImperativeHandle as qe } from "react";
1
+ import { jsx as l, jsxs as $, Fragment as _ } from "react/jsx-runtime";
2
+ import { createContext as fe, useContext as K, useState as B, useCallback as D, useRef as C, useEffect as E, useMemo as A, useLayoutEffect as me, memo as Ue, useId as _e, forwardRef as Qe, useImperativeHandle as qe } from "react";
3
3
  import { useWritableProp as J, snippet as ae, useHotkeys as Ke } from "@svar-ui/lib-react";
4
4
  import { uid as oe, env as pe, calculatePosition as Ze, getAbsParent as ze, clickOutside as ve, locale as Ae, locateID as Xe, getDuodecade as Be, dateToString as ne, delegateClick as Ee, setEnv as et } from "@svar-ui/lib-dom";
5
5
  import { locale as bn } from "@svar-ui/lib-dom";
@@ -27,23 +27,23 @@ function _t({
27
27
  readonly: i = !1,
28
28
  onChange: c
29
29
  }) {
30
- const a = z(n), [o, f] = J(e), d = D(
30
+ const a = z(n), [o, w] = J(e), d = D(
31
31
  (x) => {
32
- const w = x.target.value;
33
- f(w), c && c({ value: w, input: !0 });
32
+ const f = x.target.value;
33
+ w(f), c && c({ value: f, input: !0 });
34
34
  },
35
35
  [c]
36
36
  ), p = D(
37
37
  (x) => {
38
- const w = x.target.value;
39
- f(w), c && c({ value: w });
38
+ const f = x.target.value;
39
+ w(f), c && c({ value: f });
40
40
  },
41
41
  [c]
42
- ), v = S(null);
43
- return W(() => {
44
- const x = p, w = v.current;
45
- return w.addEventListener("change", x), () => {
46
- w && w.removeEventListener("change", x);
42
+ ), v = C(null);
43
+ return E(() => {
44
+ const x = p, f = v.current;
45
+ return f.addEventListener("change", x), () => {
46
+ f && f.removeEventListener("change", x);
47
47
  };
48
48
  }, [p]), /* @__PURE__ */ l(
49
49
  "textarea",
@@ -71,12 +71,12 @@ function re({
71
71
  onClick: c
72
72
  }) {
73
73
  const a = A(() => {
74
- let f = e ? e.split(" ").filter((d) => d !== "").map((d) => "wx-" + d).join(" ") : "";
75
- return n + (n ? " " : "") + f;
76
- }, [e, n]), o = (f) => {
77
- c && c(f);
74
+ let w = e ? e.split(" ").filter((d) => d !== "").map((d) => "wx-" + d).join(" ") : "";
75
+ return n + (n ? " " : "") + w;
76
+ }, [e, n]), o = (w) => {
77
+ c && c(w);
78
78
  };
79
- return /* @__PURE__ */ R(
79
+ return /* @__PURE__ */ $(
80
80
  "button",
81
81
  {
82
82
  title: r,
@@ -100,7 +100,7 @@ function Ye({
100
100
  style: i
101
101
  }) {
102
102
  const c = z(e), [a, o] = J(s);
103
- return /* @__PURE__ */ R("div", { style: i, className: "wx-2IvefP wx-checkbox", children: [
103
+ return /* @__PURE__ */ $("div", { style: i, className: "wx-2IvefP wx-checkbox", children: [
104
104
  /* @__PURE__ */ l(
105
105
  "input",
106
106
  {
@@ -116,7 +116,7 @@ function Ye({
116
116
  }
117
117
  }
118
118
  ),
119
- /* @__PURE__ */ R("label", { htmlFor: c, className: "wx-2IvefP wx-label", children: [
119
+ /* @__PURE__ */ $("label", { htmlFor: c, className: "wx-2IvefP wx-label", children: [
120
120
  /* @__PURE__ */ l("span", { className: "wx-2IvefP wx-before" }),
121
121
  n && /* @__PURE__ */ l("span", { className: "wx-2IvefP wx-after", children: n })
122
122
  ] })
@@ -146,14 +146,14 @@ function Qt({
146
146
  ) }, u.id)) }) });
147
147
  }
148
148
  function nt({ theme: e = "", target: n, children: t }) {
149
- const s = S(null), r = S(null), [u, i] = B(null);
149
+ const s = C(null), r = C(null), [u, i] = B(null);
150
150
  s.current || (s.current = document.createElement("div"));
151
151
  const c = K(ie);
152
- return W(() => {
152
+ return E(() => {
153
153
  i(
154
154
  n || rt(r.current) || pe.getTopNode(r.current)
155
155
  );
156
- }, [r.current]), /* @__PURE__ */ R(_, { children: [
156
+ }, [r.current]), /* @__PURE__ */ $(_, { children: [
157
157
  /* @__PURE__ */ l("span", { ref: r, style: { display: "none" } }),
158
158
  r.current && u ? tt(
159
159
  /* @__PURE__ */ l(
@@ -184,40 +184,43 @@ function lt({
184
184
  children: c,
185
185
  trackScroll: a = !1
186
186
  }) {
187
- const [o, f] = B(0), [d, p] = B(0), [v, x] = B("auto"), [w, h] = B(!1), m = S(null), g = S(null);
188
- function T(N) {
189
- return s && (r + "").indexOf("%") > -1 ? r.replace(/(\d+)%/, (k, M) => (M = M * s.offsetWidth / 100 + "px", r.replace(k, M))) : r && r !== "auto" ? r : N;
187
+ const [o, w] = B(0), [d, p] = B(0), [v, x] = B("auto"), [f, h] = B(!1), m = C(null), g = C(null), V = C(i);
188
+ E(() => {
189
+ V.current = i;
190
+ }, [i]);
191
+ function b(N) {
192
+ return s && (r + "").indexOf("%") > -1 ? r.replace(/(\d+)%/, (M, T) => (T = T * s.offsetWidth / 100 + "px", r.replace(M, T))) : r && r !== "auto" ? r : N;
190
193
  }
191
- const b = D(() => {
194
+ const y = D(() => {
192
195
  if (!m.current) return;
193
196
  const N = Ze(m.current, s, t, e, n);
194
- N && (f(N.x), p(N.y), x(T(N.width)));
197
+ N && (w(N.x), p(N.y), x(b(N.width)));
195
198
  }, [m, s, t, e, n, r]);
196
199
  return me(() => {
197
- const N = (k) => {
198
- i && k.target !== g.current && m.current && !m.current.contains(k.target) && i(k);
200
+ const N = (M) => {
201
+ V.current && M.target !== g.current && m.current && !m.current.contains(M.target) && V.current(M);
199
202
  };
200
203
  return requestAnimationFrame(() => {
201
- b(), h(!0), a && m.current && (g.current = ze(m.current), g.current && g.current.addEventListener("scroll", N, !0));
204
+ y(), h(!0), a && m.current && (g.current = ze(m.current), g.current && g.current.addEventListener("scroll", N, !0));
202
205
  }), () => {
203
206
  a && g.current && g.current.removeEventListener("scroll", N, !0);
204
207
  };
205
208
  }, []), me(() => {
206
- b();
207
- }, [s, t, e, n]), W(() => {
208
- const N = (k) => {
209
- i && i(k);
209
+ y();
210
+ }, [s, t, e, n]), E(() => {
211
+ const N = (M) => {
212
+ V.current && V.current(M);
210
213
  };
211
214
  if (m.current)
212
215
  return ve(m.current, N).destroy;
213
- }, [i]), /* @__PURE__ */ l(
216
+ }, []), /* @__PURE__ */ l(
214
217
  "div",
215
218
  {
216
219
  ref: m,
217
220
  className: ["wx-37M6Fj", "wx-popup", u].filter(Boolean).join(" "),
218
221
  style: {
219
222
  position: "absolute",
220
- visibility: w ? "visible" : "hidden",
223
+ visibility: f ? "visible" : "hidden",
221
224
  top: d + "px",
222
225
  left: o + "px",
223
226
  width: v
@@ -235,29 +238,31 @@ function ct({
235
238
  css: u = "",
236
239
  children: i
237
240
  }) {
238
- const c = S(null), [a, o] = B(e), [f, d] = B(n);
239
- return W(() => {
241
+ const c = C(null), [a, o] = B(e), [w, d] = B(n), p = C(s);
242
+ return E(() => {
243
+ p.current = s;
244
+ }, [s]), E(() => {
240
245
  if (t) {
241
- const p = c.current;
242
- if (p) {
243
- const v = p.getBoundingClientRect(), x = document.body.getBoundingClientRect();
244
- v.right >= x.right && d("end"), v.bottom >= x.bottom && o("top");
246
+ const v = c.current;
247
+ if (v) {
248
+ const x = v.getBoundingClientRect(), f = document.body.getBoundingClientRect();
249
+ x.right >= f.right && d("end"), x.bottom >= f.bottom && o("top");
245
250
  }
246
251
  }
247
- }, []), W(() => {
252
+ }, []), E(() => {
248
253
  if (c.current) {
249
- const p = (v) => {
250
- s && s(v);
254
+ const v = (x) => {
255
+ p.current && p.current(x);
251
256
  };
252
- return ve(c.current, p).destroy;
257
+ return ve(c.current, v).destroy;
253
258
  }
254
- }, [s]), /* @__PURE__ */ l(
259
+ }, []), /* @__PURE__ */ l(
255
260
  "div",
256
261
  {
257
262
  ref: c,
258
263
  className: [
259
264
  "wx-dropdown",
260
- `wx-${a}-${f}`,
265
+ `wx-${a}-${w}`,
261
266
  u || "",
262
267
  "wx-aaaVytZW"
263
268
  ].filter(Boolean).join(" "),
@@ -276,10 +281,10 @@ function le({
276
281
  children: i,
277
282
  ...c
278
283
  }) {
279
- const [a, o] = B(void 0), f = S(null), d = A(() => `${e}-${n}`, [e, n]);
284
+ const [a, o] = B(void 0), w = C(null), d = A(() => `${e}-${n}`, [e, n]);
280
285
  return me(() => {
281
- f.current && o(f.current.parentNode);
282
- }, []), /* @__PURE__ */ R(_, { children: [
286
+ w.current && o(w.current.parentNode);
287
+ }, []), /* @__PURE__ */ $(_, { children: [
283
288
  a && (s ? /* @__PURE__ */ l(
284
289
  ct,
285
290
  {
@@ -292,7 +297,7 @@ function le({
292
297
  children: i
293
298
  }
294
299
  ) : /* @__PURE__ */ l(nt, { children: /* @__PURE__ */ l(lt, { parent: a, at: d, onCancel: r, width: u, ...c, children: i }) })),
295
- /* @__PURE__ */ l("span", { ref: f, className: "wx-portal-node wx-32GZ52" })
300
+ /* @__PURE__ */ l("span", { ref: w, className: "wx-portal-node wx-32GZ52" })
296
301
  ] });
297
302
  }
298
303
  const st = [
@@ -316,9 +321,9 @@ function qt({
316
321
  error: a = !1,
317
322
  dropdown: o = {}
318
323
  }) {
319
- const f = z(s), [d, p] = B(n), [v, x] = B(!1), w = D(
320
- (g, T) => {
321
- g.stopPropagation(), p(T), x(!1), t && t({ value: T });
324
+ const w = z(s), [d, p] = B(n), [v, x] = B(!1), f = D(
325
+ (g, V) => {
326
+ g.stopPropagation(), p(V), x(!1), t && t({ value: V });
322
327
  },
323
328
  [t]
324
329
  ), h = D(
@@ -330,7 +335,7 @@ function qt({
330
335
  if (c) return !1;
331
336
  x(!0);
332
337
  }, [c]);
333
- return /* @__PURE__ */ R("div", { className: "wx-121TgJ wx-colorselect", onClick: m, children: [
338
+ return /* @__PURE__ */ $("div", { className: "wx-121TgJ wx-colorselect", onClick: m, children: [
334
339
  /* @__PURE__ */ l(
335
340
  "input",
336
341
  {
@@ -338,7 +343,7 @@ function qt({
338
343
  title: i,
339
344
  value: d,
340
345
  readOnly: !0,
341
- id: f,
346
+ id: w,
342
347
  placeholder: u,
343
348
  disabled: c
344
349
  }
@@ -351,22 +356,22 @@ function qt({
351
356
  style: { backgroundColor: d || "#00a037" }
352
357
  }
353
358
  ) : /* @__PURE__ */ l("div", { className: "wx-121TgJ wx-empty wx-selected" }),
354
- v && /* @__PURE__ */ l(le, { onCancel: () => x(!1), ...o, children: /* @__PURE__ */ R("div", { className: "wx-121TgJ wx-colors", children: [
359
+ v && /* @__PURE__ */ l(le, { onCancel: () => x(!1), ...o, children: /* @__PURE__ */ $("div", { className: "wx-121TgJ wx-colors", children: [
355
360
  /* @__PURE__ */ l(
356
361
  "div",
357
362
  {
358
363
  className: "wx-121TgJ wx-empty",
359
- onClick: (g) => w(g, "")
364
+ onClick: (g) => f(g, "")
360
365
  }
361
366
  ),
362
- e.map((g, T) => /* @__PURE__ */ l(
367
+ e.map((g, V) => /* @__PURE__ */ l(
363
368
  "div",
364
369
  {
365
370
  className: "wx-121TgJ wx-color",
366
371
  style: { backgroundColor: g },
367
- onClick: (b) => w(b, g)
372
+ onClick: (b) => f(b, g)
368
373
  },
369
- T
374
+ V
370
375
  ))
371
376
  ] }) })
372
377
  ] });
@@ -377,9 +382,9 @@ function be(e, n) {
377
382
  i(a), t.focus(), window.addEventListener("mousemove", i), window.addEventListener("mouseup", c);
378
383
  }
379
384
  function i(a) {
380
- let o, f, d, p;
385
+ let o, w, d, p;
381
386
  const v = e.getBoundingClientRect();
382
- o = v.left, f = v.top, d = a.clientX - o, p = a.clientY - f, s && n.moveBlockSlider(d, p), r && n.moveLineSlider(d);
387
+ o = v.left, w = v.top, d = a.clientX - o, p = a.clientY - w, s && n.moveBlockSlider(d, p), r && n.moveLineSlider(d);
383
388
  }
384
389
  function c() {
385
390
  t.blur(), window.removeEventListener("mousemove", i), window.removeEventListener("mouseup", c);
@@ -432,28 +437,28 @@ const se = {
432
437
  return t = this.hexToDec(t), s = this.hexToDec(s), r = this.hexToDec(r), [t, s, r];
433
438
  },
434
439
  hsvToRgb(e, n, t) {
435
- let s, r, u, i, c, a, o, f;
436
- switch (s = Math.floor(e / 60) % 6, r = e / 60 - s, u = t * (1 - n), i = t * (1 - r * n), c = t * (1 - (1 - r) * n), a = 0, o = 0, f = 0, s) {
440
+ let s, r, u, i, c, a, o, w;
441
+ switch (s = Math.floor(e / 60) % 6, r = e / 60 - s, u = t * (1 - n), i = t * (1 - r * n), c = t * (1 - (1 - r) * n), a = 0, o = 0, w = 0, s) {
437
442
  case 0:
438
- a = t, o = c, f = u;
443
+ a = t, o = c, w = u;
439
444
  break;
440
445
  case 1:
441
- a = i, o = t, f = u;
446
+ a = i, o = t, w = u;
442
447
  break;
443
448
  case 2:
444
- a = u, o = t, f = c;
449
+ a = u, o = t, w = c;
445
450
  break;
446
451
  case 3:
447
- a = u, o = i, f = t;
452
+ a = u, o = i, w = t;
448
453
  break;
449
454
  case 4:
450
- a = c, o = u, f = t;
455
+ a = c, o = u, w = t;
451
456
  break;
452
457
  case 5:
453
- a = t, o = u, f = i;
458
+ a = t, o = u, w = i;
454
459
  break;
455
460
  }
456
- return a = Math.floor(a * 255), o = Math.floor(o * 255), f = Math.floor(f * 255), [a, o, f];
461
+ return a = Math.floor(a * 255), o = Math.floor(o * 255), w = Math.floor(w * 255), [a, o, w];
457
462
  },
458
463
  rgbToHsv(e, n, t) {
459
464
  let s, r, u;
@@ -476,58 +481,58 @@ function De(e) {
476
481
  function X() {
477
482
  return Ae(We);
478
483
  }
479
- const Ve = "Block", Te = "Line";
484
+ const Ve = "Block", Re = "Line";
480
485
  function ot({
481
486
  value: e = "#65D3B3",
482
487
  button: n = !1,
483
488
  onChange: t
484
489
  }) {
485
- const s = (K(q) || X()).getGroup("core"), r = S(null), u = S(null), [i, c] = B(), [a, o] = B(), [f, d] = B(), [p, v] = B(), [x, w] = J(e), [h, m] = B(e), g = S(null), T = S(null), b = A(() => De(x) || "#65D3B3", [x]), N = A(
486
- () => se.hvsToHex(f || 0, 1, 1),
487
- [f]
488
- ), k = D(
490
+ const s = (K(q) || X()).getGroup("core"), r = C(null), u = C(null), [i, c] = B(), [a, o] = B(), [w, d] = B(), [p, v] = B(), [x, f] = J(e), [h, m] = B(e), g = C(null), V = C(null), b = A(() => De(x) || "#65D3B3", [x]), y = A(
491
+ () => se.hvsToHex(w || 0, 1, 1),
492
+ [w]
493
+ ), N = D(
489
494
  (L, P) => {
490
- const { width: C, height: O } = r.current.getBoundingClientRect();
491
- P < 0 ? P = 0 : P > O && (P = O), L < 0 ? L = 0 : L > C && (L = C), c(P), o(L);
495
+ const { width: S, height: O } = r.current.getBoundingClientRect();
496
+ P < 0 ? P = 0 : P > O && (P = O), L < 0 ? L = 0 : L > S && (L = S), c(P), o(L);
492
497
  let U, Y;
493
- const I = C / 100, G = O / 100;
498
+ const I = S / 100, G = O / 100;
494
499
  U = Math.ceil(L / I) / 100, Y = Math.ceil(Math.abs(P / G - 100)) / 100;
495
500
  const Q = se.hvsToHex(
496
- f,
501
+ w,
497
502
  U,
498
503
  Y
499
504
  );
500
- w(Q), m(Q), t && t({ value: Q, input: !0 });
505
+ f(Q), m(Q), t && t({ value: Q, input: !0 });
501
506
  },
502
- [b, f, t]
507
+ [b, w, t]
503
508
  ), M = D(
504
509
  (L) => {
505
510
  const P = u.current.getBoundingClientRect().width;
506
511
  L < 0 ? L = 0 : L > P && (L = P);
507
- const C = Math.round(L * 359 / P), O = Math.max(Math.min(C, 359), 0);
512
+ const S = Math.round(L * 359 / P), O = Math.max(Math.min(S, 359), 0);
508
513
  d(O), v(L);
509
514
  let U, Y;
510
515
  [, U, Y] = se.hexToHvs(b);
511
516
  const I = se.hvsToHex(O, U, Y);
512
- w(I), m(I), t && t({ value: I, input: !0 });
517
+ f(I), m(I), t && t({ value: I, input: !0 });
513
518
  },
514
519
  [b, t]
515
520
  );
516
- g.current = k, T.current = M;
517
- const $ = D((L) => {
518
- const [P, C, O] = se.hexToHvs(L || b);
521
+ g.current = N, V.current = M;
522
+ const T = D((L) => {
523
+ const [P, S, O] = se.hexToHvs(L || b);
519
524
  if (d(P), r.current) {
520
525
  const { width: U, height: Y } = r.current.getBoundingClientRect();
521
526
  u.current && v(
522
527
  P * u.current.getBoundingClientRect().width / 359
523
- ), o(C * U), c(Math.abs(Y * (O - 1)));
528
+ ), o(S * U), c(Math.abs(Y * (O - 1)));
524
529
  }
525
- }, [b]), V = D(
530
+ }, [b]), R = D(
526
531
  ({ target: L }) => {
527
532
  const P = De(L.value);
528
- m(L.value), P && (w(P), t && t({ value: P, input: !0 }), $(P));
533
+ m(L.value), P && (f(P), t && t({ value: P, input: !0 }), T(P));
529
534
  },
530
- [t, $]
535
+ [t, T]
531
536
  ), F = D(
532
537
  (L) => {
533
538
  L.stopPropagation(), t && t({ value: b });
@@ -535,10 +540,10 @@ function ot({
535
540
  [b, t]
536
541
  ), j = D(
537
542
  (L) => {
538
- const P = L.target, C = P.getAttribute("data-slider") === Ve, O = P.getAttribute("data-slider") === Te;
543
+ const P = L.target, S = P.getAttribute("data-slider") === Ve, O = P.getAttribute("data-slider") === Re;
539
544
  let U = window.getComputedStyle(P), Y = parseFloat(U.left), I = parseFloat(U.top);
540
545
  const G = L.code;
541
- if (C) {
546
+ if (S) {
542
547
  switch (G) {
543
548
  case "ArrowLeft": {
544
549
  Y--;
@@ -559,7 +564,7 @@ function ot({
559
564
  default:
560
565
  return;
561
566
  }
562
- k(Y, I);
567
+ N(Y, I);
563
568
  }
564
569
  if (O) {
565
570
  if (G === "ArrowLeft" || G === "ArrowDown") Y--;
@@ -569,33 +574,33 @@ function ot({
569
574
  }
570
575
  L.preventDefault();
571
576
  },
572
- [k, M]
577
+ [N, M]
573
578
  );
574
- W(() => {
579
+ E(() => {
575
580
  const L = [];
576
581
  return r.current && L.push(
577
582
  be(r.current, {
578
- moveBlockSlider: (P, C) => {
579
- g.current?.(P, C);
583
+ moveBlockSlider: (P, S) => {
584
+ g.current?.(P, S);
580
585
  }
581
586
  }).destroy
582
587
  ), u.current && L.push(
583
588
  be(u.current, {
584
589
  moveLineSlider: (P) => {
585
- T.current?.(P);
590
+ V.current?.(P);
586
591
  }
587
592
  }).destroy
588
- ), requestAnimationFrame(() => $()), () => {
593
+ ), requestAnimationFrame(() => T()), () => {
589
594
  L.forEach((P) => P());
590
595
  };
591
596
  }, []);
592
597
  const H = "wx-1yoKzq";
593
- return /* @__PURE__ */ R("div", { className: H + " wx-colorboard", children: [
598
+ return /* @__PURE__ */ $("div", { className: H + " wx-colorboard", children: [
594
599
  /* @__PURE__ */ l(
595
600
  "div",
596
601
  {
597
602
  className: H + " wx-color-block",
598
- style: { background: N },
603
+ style: { background: y },
599
604
  ref: r,
600
605
  children: /* @__PURE__ */ l(
601
606
  "div",
@@ -617,13 +622,13 @@ function ot({
617
622
  "div",
618
623
  {
619
624
  className: H + " wx-color-line-slider wx-slider",
620
- style: { background: N, left: p + "px" },
625
+ style: { background: y, left: p + "px" },
621
626
  tabIndex: 0,
622
- "data-slider": Te,
627
+ "data-slider": Re,
623
628
  onKeyDown: j
624
629
  }
625
630
  ) }),
626
- /* @__PURE__ */ R("div", { className: H + " wx-color-controls", children: [
631
+ /* @__PURE__ */ $("div", { className: H + " wx-color-controls", children: [
627
632
  /* @__PURE__ */ l(
628
633
  "div",
629
634
  {
@@ -637,7 +642,7 @@ function ot({
637
642
  type: "text",
638
643
  className: H + " wx-text",
639
644
  value: h,
640
- onChange: V
645
+ onChange: R
641
646
  }
642
647
  )
643
648
  ] }),
@@ -656,13 +661,13 @@ function Kt({
656
661
  dropdown: a = {}
657
662
  }) {
658
663
  const o = z(n);
659
- let [f, d] = J(e);
664
+ let [w, d] = J(e);
660
665
  const [p, v] = B(!1);
661
666
  function x() {
662
667
  if (r) return !1;
663
668
  v(!0);
664
669
  }
665
- function w(m) {
670
+ function f(m) {
666
671
  if (m.input) return;
667
672
  v(!1);
668
673
  const g = m.value;
@@ -671,42 +676,42 @@ function Kt({
671
676
  function h(m) {
672
677
  m.stopPropagation(), d(""), c && c({ value: "" });
673
678
  }
674
- return /* @__PURE__ */ R("div", { className: "wx-mmT8WH wx-colorpicker", onClick: x, children: [
679
+ return /* @__PURE__ */ $("div", { className: "wx-mmT8WH wx-colorpicker", onClick: x, children: [
675
680
  /* @__PURE__ */ l(
676
681
  "input",
677
682
  {
678
683
  className: "wx-mmT8WH wx-input" + (u ? " wx-error" : "") + (p ? " wx-focus" : ""),
679
684
  title: s,
680
- value: f,
685
+ value: w,
681
686
  readOnly: !0,
682
687
  id: o,
683
688
  placeholder: t,
684
689
  disabled: r
685
690
  }
686
691
  ),
687
- /* @__PURE__ */ l("div", { className: "wx-mmT8WH wx-color", style: { background: f } }),
688
- i && !r && f && /* @__PURE__ */ l("i", { className: "wx-mmT8WH wxi-close", onClick: h }),
689
- p && /* @__PURE__ */ l(le, { onCancel: () => v(!1), ...a, children: /* @__PURE__ */ l(ot, { value: f, button: "true", onChange: w }) })
692
+ /* @__PURE__ */ l("div", { className: "wx-mmT8WH wx-color", style: { background: w } }),
693
+ i && !r && w && /* @__PURE__ */ l("i", { className: "wx-mmT8WH wxi-close", onClick: h }),
694
+ p && /* @__PURE__ */ l(le, { onCancel: () => v(!1), ...a, children: /* @__PURE__ */ l(ot, { value: w, button: "true", onChange: f }) })
690
695
  ] });
691
696
  }
692
697
  function it() {
693
698
  let e = null, n = !1, t = !1, s, r, u, i;
694
- const c = (v, x, w, h, m) => {
695
- s = v, r = x, u = w, i = h, t = m;
699
+ const c = (v, x, f, h, m) => {
700
+ s = v, r = x, u = f, i = h, t = m;
696
701
  }, a = (v) => {
697
702
  e = v, n = e !== null, u(e);
698
703
  }, o = (v, x) => {
699
704
  if (!t && v !== null && s) {
700
- const w = s.querySelectorAll(".wx-list > .wx-item")[v];
701
- w && (w.scrollIntoView({ block: "nearest" }), x && x.preventDefault());
705
+ const f = s.querySelectorAll(".wx-list > .wx-item")[v];
706
+ f && (f.scrollIntoView({ block: "nearest" }), x && x.preventDefault());
702
707
  }
703
- }, f = (v, x) => {
704
- const w = v === null ? null : Math.max(0, Math.min(e + v, r.length - 1));
705
- w !== e && (a(w), s ? o(w, x) : requestAnimationFrame(() => o(w, x)));
708
+ }, w = (v, x) => {
709
+ const f = v === null ? null : Math.max(0, Math.min(e + v, r.length - 1));
710
+ f !== e && (a(f), s ? o(f, x) : requestAnimationFrame(() => o(f, x)));
706
711
  };
707
712
  return { move: (v) => {
708
- const x = Xe(v), w = r.findIndex((h) => h.id === x);
709
- w !== e && a(w);
713
+ const x = Xe(v), f = r.findIndex((h) => h.id === x);
714
+ f !== e && a(f);
710
715
  }, keydown: (v, x) => {
711
716
  switch (v.code) {
712
717
  case "Enter":
@@ -722,16 +727,16 @@ function it() {
722
727
  u(e = null);
723
728
  break;
724
729
  case "ArrowDown":
725
- f(n ? 1 : x || 0, v);
730
+ w(n ? 1 : x || 0, v);
726
731
  break;
727
732
  case "ArrowUp":
728
- f(n ? -1 : x || 0, v);
733
+ w(n ? -1 : x || 0, v);
729
734
  break;
730
735
  }
731
- }, init: c, navigate: f };
736
+ }, init: c, navigate: w };
732
737
  }
733
- const Re = 10, ut = Ue(function({ data: n, checkboxes: t, children: s, value: r }) {
734
- return /* @__PURE__ */ R(_, { children: [
738
+ const Te = 10, ut = Ue(function({ data: n, checkboxes: t, children: s, value: r }) {
739
+ return /* @__PURE__ */ $(_, { children: [
735
740
  t && /* @__PURE__ */ l(
736
741
  Ye,
737
742
  {
@@ -785,103 +790,103 @@ function ge({
785
790
  value: c,
786
791
  ...a
787
792
  }) {
788
- const o = S(), f = S(!1), d = S(it()), [p, v] = B(null), x = S(p), [w, h] = B(0), [m, g] = B(24), T = S(!1), b = (K(q) || X()).getGroup("core"), N = S(e);
789
- W(() => {
790
- N.current = e;
793
+ const o = C(), w = C(!1), d = C(it()), [p, v] = B(null), x = C(p), [f, h] = B(0), [m, g] = B(24), V = C(!1), b = (K(q) || X()).getGroup("core"), y = C(e);
794
+ E(() => {
795
+ y.current = e;
791
796
  }, [e]);
792
- const k = S(c);
793
- W(() => {
794
- k.current = c;
797
+ const N = C(c);
798
+ E(() => {
799
+ N.current = c;
795
800
  }, [c]);
796
- const M = S(0);
797
- W(() => {
801
+ const M = C(0);
802
+ E(() => {
798
803
  M.current = m;
799
804
  }, [m]);
800
- const $ = D((y) => {
801
- y && y.stopPropagation();
802
- const E = N.current, Z = k.current, ce = x.current;
805
+ const T = D((k) => {
806
+ k && k.stopPropagation();
807
+ const W = y.current, Z = N.current, ce = x.current;
803
808
  let ee;
804
- const te = E[ce]?.id;
809
+ const te = W[ce]?.id;
805
810
  i ? Z && Z.includes(te) ? ee = Z.filter((we) => we !== te) : ee = [...Z || [], te] : ee = te, t && t({ id: ee });
806
- }, [i, t]), V = S($);
807
- W(() => {
808
- V.current = $;
809
- }, [$]);
810
- const F = D((y) => {
811
+ }, [i, t]), R = C(T);
812
+ E(() => {
813
+ R.current = T;
814
+ }, [T]);
815
+ const F = D((k) => {
811
816
  if (o.current) {
812
- let E = y * M.current - o.current.clientHeight + M.current;
813
- h(E), o.current.scrollTop = E;
817
+ let W = k * M.current - o.current.clientHeight + M.current;
818
+ h(W), o.current.scrollTop = W;
814
819
  }
815
820
  }, [M.current]), j = D(
816
- (y) => {
817
- o.current = y, r && (y && !f.current && x.current !== null && requestAnimationFrame(() => {
818
- o.current && (F(x.current), f.current = !0);
819
- }), y || (f.current = !1));
821
+ (k) => {
822
+ o.current = k, r && (k && !w.current && x.current !== null && requestAnimationFrame(() => {
823
+ o.current && (F(x.current), w.current = !0);
824
+ }), k || (w.current = !1));
820
825
  },
821
826
  [F]
822
- ), H = D((y) => {
823
- if (!y || T.current) return;
824
- const E = y.getBoundingClientRect().height;
825
- E && (g(E), M.current = E, T.current = !0);
827
+ ), H = D((k) => {
828
+ if (!k || V.current) return;
829
+ const W = k.getBoundingClientRect().height;
830
+ W && (g(W), M.current = W, V.current = !0);
826
831
  }, []);
827
- W(() => {
832
+ E(() => {
828
833
  d.current.init(
829
834
  o.current,
830
835
  e,
831
- (y) => {
832
- v(y), x.current = y;
836
+ (k) => {
837
+ v(k), x.current = k;
833
838
  },
834
- (y) => V.current(y),
839
+ (k) => R.current(k),
835
840
  r
836
841
  );
837
- }, [e, o.current, r]), W(() => {
838
- const y = (Z, ce) => {
842
+ }, [e, o.current, r]), E(() => {
843
+ const k = (Z, ce) => {
839
844
  d.current.navigate(Z, ce), F(x.current);
840
- }, E = (Z, ce) => {
841
- const ee = x.current, te = N.current;
845
+ }, W = (Z, ce) => {
846
+ const ee = x.current, te = y.current;
842
847
  if (ee !== 0 && ee !== te.length - 1 && (Z.key === "ArrowDown" || Z.key === "ArrowUp") && Z.preventDefault(), d.current.keydown(Z, ce), o.current) {
843
848
  const we = o.current.scrollTop <= x.current * M.current, Ge = o.current.scrollTop + o.current.clientHeight >= x.current * M.current + M.current;
844
849
  we ? Ge || F(x.current) : (o.current.scrollTop = x.current * M.current, h(o.current.scrollTop));
845
850
  }
846
851
  };
847
852
  s && s({
848
- navigate: r ? y : d.current.navigate,
849
- keydown: r ? E : d.current.keydown,
853
+ navigate: r ? k : d.current.navigate,
854
+ keydown: r ? W : d.current.keydown,
850
855
  move: d.current.move
851
856
  });
852
857
  }, []);
853
- const L = S(0), P = S(e);
858
+ const L = C(0), P = C(e);
854
859
  P.current !== e && (P.current = e, L.current += 1);
855
- const C = D(() => {
860
+ const S = D(() => {
856
861
  d.current.navigate(null);
857
- }, [d]), O = D((y) => {
858
- r && h(y.target.scrollTop);
862
+ }, [d]), O = D((k) => {
863
+ r && h(k.target.scrollTop);
859
864
  }, [r]), U = A(
860
865
  () => Math.ceil((o.current?.clientHeight || 0) / m),
861
- [m, w]
866
+ [m, f]
862
867
  ), Y = A(() => {
863
868
  if (!r) return { start: 0, end: e.length };
864
869
  if (!e.length) return { start: 0, end: 0 };
865
- const y = Math.floor(w / m), E = y + U;
870
+ const k = Math.floor(f / m), W = k + U;
866
871
  return {
867
- start: Math.max(0, y - Re),
868
- end: Math.min(e.length, E + Re)
872
+ start: Math.max(0, k - Te),
873
+ end: Math.min(e.length, W + Te)
869
874
  };
870
- }, [r, e, w, m, U]), I = A(() => {
875
+ }, [r, e, f, m, U]), I = A(() => {
871
876
  if (!r) return e;
872
- const { start: y, end: E } = Y;
873
- return e.slice(y, E).map((Z) => ({
877
+ const { start: k, end: W } = Y;
878
+ return e.slice(k, W).map((Z) => ({
874
879
  ...Z
875
880
  }));
876
881
  }, [r, e, Y]), G = Y.start * m, Q = e.length * m;
877
- return W(() => {
878
- p === null && (f.current = !1);
879
- }, [p]), p === null ? null : /* @__PURE__ */ l(le, { onCancel: C, ...a, children: /* @__PURE__ */ l(
882
+ return E(() => {
883
+ p === null && (w.current = !1);
884
+ }, [p]), p === null ? null : /* @__PURE__ */ l(le, { onCancel: S, ...a, children: /* @__PURE__ */ l(
880
885
  "div",
881
886
  {
882
887
  className: "wx-233fr7 wx-list",
883
888
  ref: j,
884
- onClick: $,
889
+ onClick: T,
885
890
  onMouseMove: d.current.move,
886
891
  onScroll: O,
887
892
  children: e.length ? r ? /* @__PURE__ */ l(
@@ -935,34 +940,34 @@ function Zt({
935
940
  disabled: c = !1,
936
941
  error: a = !1,
937
942
  clear: o = !1,
938
- children: f,
943
+ children: w,
939
944
  onChange: d,
940
945
  dropdown: p = {}
941
946
  }) {
942
- const v = z(n), x = S(null), w = S(null), [h, m] = J(e), [g, T] = B(!1), [b, N] = B(""), k = S(null), M = S(!1), $ = A(() => {
947
+ const v = z(n), x = C(null), f = C(null), [h, m] = J(e), [g, V] = B(!1), [b, y] = B(""), N = C(null), M = C(!1), T = A(() => {
943
948
  if (g) return b;
944
949
  if (h || h === 0) {
945
950
  const I = (s || t).find((G) => G.id === h);
946
951
  if (I) return I[r];
947
952
  }
948
953
  return "";
949
- }, [g, b, h, s, t, r]), V = A(() => !$ || !g ? t : t.filter(
950
- (I) => I[r].toLowerCase().includes($.toLowerCase())
951
- ), [$, g, t, r]), F = D(
952
- () => V.findIndex((I) => I.id === h),
953
- [V, h]
954
+ }, [g, b, h, s, t, r]), R = A(() => !T || !g ? t : t.filter(
955
+ (I) => I[r].toLowerCase().includes(T.toLowerCase())
956
+ ), [T, g, t, r]), F = D(
957
+ () => R.findIndex((I) => I.id === h),
958
+ [R, h]
954
959
  ), j = D((I) => {
955
- x.current = I.navigate, w.current = I.keydown;
960
+ x.current = I.navigate, f.current = I.keydown;
956
961
  }, []), H = D(
957
962
  (I, G) => {
958
963
  if (I || I === 0) {
959
- let Q = t.find((y) => y.id === I);
960
- if (T(!1), G && x.current(null), Q && h !== Q.id) {
961
- const y = Q.id;
962
- m(y), d && d({ value: y });
964
+ let Q = t.find((k) => k.id === I);
965
+ if (V(!1), G && x.current(null), Q && h !== Q.id) {
966
+ const k = Q.id;
967
+ m(k), d && d({ value: k });
963
968
  }
964
969
  }
965
- !M.current && G && k.current.focus();
970
+ !M.current && G && N.current.focus();
966
971
  },
967
972
  [t, h, d]
968
973
  ), L = D(
@@ -972,39 +977,39 @@ function Zt({
972
977
  [H]
973
978
  ), P = D(
974
979
  (I) => {
975
- I && I.stopPropagation(), m(""), T(!1), d && d({ value: "" });
980
+ I && I.stopPropagation(), m(""), V(!1), d && d({ value: "" });
976
981
  },
977
982
  [d]
978
- ), C = D(
983
+ ), S = D(
979
984
  (I) => {
980
985
  if (!t.length) return;
981
986
  if (I === "" && o) {
982
987
  P();
983
988
  return;
984
989
  }
985
- let G = t.find((y) => y[r] === I);
990
+ let G = t.find((k) => k[r] === I);
986
991
  G || (G = t.find(
987
- (y) => y[r].toLowerCase().includes(I.toLowerCase())
992
+ (k) => k[r].toLowerCase().includes(I.toLowerCase())
988
993
  ));
989
994
  const Q = G ? G.id : h || t[0].id;
990
995
  H(Q, !1);
991
996
  },
992
997
  [t, r, o, h, H, P]
993
998
  ), O = D(() => {
994
- N(k.current.value), T(!0), V.length && x.current(0);
995
- }, [V.length, x]), U = D(() => {
999
+ y(N.current.value), V(!0), R.length && x.current(0);
1000
+ }, [R.length, x]), U = D(() => {
996
1001
  M.current = !0;
997
1002
  }, []), Y = D(() => {
998
1003
  M.current = !1, setTimeout(() => {
999
- M.current || C($);
1004
+ M.current || S(T);
1000
1005
  }, 200);
1001
- }, [C, $]);
1002
- return /* @__PURE__ */ R(
1006
+ }, [S, T]);
1007
+ return /* @__PURE__ */ $(
1003
1008
  "div",
1004
1009
  {
1005
1010
  className: "wx-1j11Jk wx-combo",
1006
1011
  onClick: () => x.current(F()),
1007
- onKeyDown: (I) => w.current(I, F()),
1012
+ onKeyDown: (I) => f.current(I, F()),
1008
1013
  title: i,
1009
1014
  children: [
1010
1015
  /* @__PURE__ */ l(
@@ -1012,8 +1017,8 @@ function Zt({
1012
1017
  {
1013
1018
  className: "wx-1j11Jk wx-input " + (a ? "wx-error" : ""),
1014
1019
  id: v,
1015
- ref: k,
1016
- value: $,
1020
+ ref: N,
1021
+ value: T,
1017
1022
  disabled: c,
1018
1023
  placeholder: u,
1019
1024
  onFocus: U,
@@ -1022,7 +1027,7 @@ function Zt({
1022
1027
  }
1023
1028
  ),
1024
1029
  o && !c && h ? /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-close", onClick: P }) : /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-angle-down" }),
1025
- !c && /* @__PURE__ */ l(ge, { items: V, onReady: j, onSelect: L, ...p, children: ({ option: I }) => /* @__PURE__ */ l(_, { children: f ? f({ option: I }) : I[r] }) })
1030
+ !c && /* @__PURE__ */ l(ge, { items: R, onReady: j, onSelect: L, ...p, children: ({ option: I }) => /* @__PURE__ */ l(_, { children: w ? w({ option: I }) : I[r] }) })
1026
1031
  ]
1027
1032
  }
1028
1033
  );
@@ -1038,66 +1043,66 @@ function Ne({
1038
1043
  disabled: c = !1,
1039
1044
  error: a = !1,
1040
1045
  inputStyle: o = {},
1041
- title: f = "",
1046
+ title: w = "",
1042
1047
  css: d = "",
1043
1048
  icon: p = "",
1044
1049
  clear: v = !1,
1045
1050
  onChange: x
1046
1051
  }) {
1047
- const w = z(n), [h, m] = J(e), g = S(null), T = A(
1052
+ const f = z(n), [h, m] = J(e), g = C(null), V = A(
1048
1053
  () => p && d.indexOf("wx-icon-left") === -1 ? "wx-icon-right " + d : d,
1049
1054
  [p, d]
1050
1055
  ), b = A(
1051
1056
  () => p && d.indexOf("wx-icon-left") !== -1,
1052
1057
  [p, d]
1053
1058
  );
1054
- W(() => {
1055
- const V = setTimeout(() => {
1059
+ E(() => {
1060
+ const R = setTimeout(() => {
1056
1061
  s && g.current && g.current.focus(), r && g.current && g.current.select();
1057
1062
  }, 1);
1058
- return () => clearTimeout(V);
1063
+ return () => clearTimeout(R);
1059
1064
  }, [s, r]);
1060
- const N = D(
1061
- (V) => {
1062
- const F = V.target.value;
1065
+ const y = D(
1066
+ (R) => {
1067
+ const F = R.target.value;
1063
1068
  m(F), x && x({ value: F, input: !0 });
1064
1069
  },
1065
1070
  [x]
1066
- ), k = D(
1067
- (V) => x && x({ value: V.target.value }),
1071
+ ), N = D(
1072
+ (R) => x && x({ value: R.target.value }),
1068
1073
  [x]
1069
1074
  );
1070
- function M(V) {
1071
- V.stopPropagation(), m(""), x && x({ value: "" });
1075
+ function M(R) {
1076
+ R.stopPropagation(), m(""), x && x({ value: "" });
1072
1077
  }
1073
- let $ = u;
1074
- return u !== "password" && u !== "number" && ($ = "text"), W(() => {
1075
- const V = k, F = g.current;
1076
- return F.addEventListener("change", V), () => {
1077
- F && F.removeEventListener("change", V);
1078
+ let T = u;
1079
+ return u !== "password" && u !== "number" && (T = "text"), E(() => {
1080
+ const R = N, F = g.current;
1081
+ return F.addEventListener("change", R), () => {
1082
+ F && F.removeEventListener("change", R);
1078
1083
  };
1079
- }, [k]), /* @__PURE__ */ R(
1084
+ }, [N]), /* @__PURE__ */ $(
1080
1085
  "div",
1081
1086
  {
1082
- className: `wx-hQ64J4 wx-text ${T} ${a ? "wx-error" : ""} ${c ? "wx-disabled" : ""} ${v ? "wx-clear" : ""}`,
1087
+ className: `wx-hQ64J4 wx-text ${V} ${a ? "wx-error" : ""} ${c ? "wx-disabled" : ""} ${v ? "wx-clear" : ""}`,
1083
1088
  children: [
1084
1089
  /* @__PURE__ */ l(
1085
1090
  "input",
1086
1091
  {
1087
1092
  className: "wx-hQ64J4 wx-input",
1088
1093
  ref: g,
1089
- id: w,
1094
+ id: f,
1090
1095
  readOnly: t,
1091
1096
  disabled: c,
1092
1097
  placeholder: i,
1093
- type: $,
1098
+ type: T,
1094
1099
  style: o,
1095
- title: f,
1100
+ title: w,
1096
1101
  value: h,
1097
- onInput: N
1102
+ onInput: y
1098
1103
  }
1099
1104
  ),
1100
- v && !c && h ? /* @__PURE__ */ R(_, { children: [
1105
+ v && !c && h ? /* @__PURE__ */ $(_, { children: [
1101
1106
  /* @__PURE__ */ l("i", { className: "wx-hQ64J4 wx-icon wxi-close", onClick: M }),
1102
1107
  b && /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${p}` })
1103
1108
  ] }) : p ? /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${p}` }) : null
@@ -1113,8 +1118,8 @@ function dt({ date: e, type: n, part: t, onShift: s }) {
1113
1118
  case "year":
1114
1119
  return ne(u.yearFormat, r)(e);
1115
1120
  case "duodecade": {
1116
- const { start: o, end: f } = Be(i), d = ne(u.yearFormat, r);
1117
- return `${d(new Date(o, 0, 1))} - ${d(new Date(f, 11, 31))}`;
1121
+ const { start: o, end: w } = Be(i), d = ne(u.yearFormat, r);
1122
+ return `${d(new Date(o, 0, 1))} - ${d(new Date(w, 11, 31))}`;
1118
1123
  }
1119
1124
  default:
1120
1125
  return "";
@@ -1123,7 +1128,7 @@ function dt({ date: e, type: n, part: t, onShift: s }) {
1123
1128
  function a() {
1124
1129
  s && s({ diff: 0, type: n });
1125
1130
  }
1126
- return /* @__PURE__ */ R("div", { className: "wx-8HQVQV wx-header", children: [
1131
+ return /* @__PURE__ */ $("div", { className: "wx-8HQVQV wx-header", children: [
1127
1132
  t !== "right" ? /* @__PURE__ */ l(
1128
1133
  "i",
1129
1134
  {
@@ -1152,15 +1157,15 @@ function ft({
1152
1157
  onCancel: r,
1153
1158
  onChange: u
1154
1159
  }) {
1155
- const i = (K(q) || X()).getRaw().calendar, c = (i.weekStart || 7) % 7, a = i.dayShort.slice(c).concat(i.dayShort.slice(0, c)), o = (b, N, k) => new Date(
1160
+ const i = (K(q) || X()).getRaw().calendar, c = (i.weekStart || 7) % 7, a = i.dayShort.slice(c).concat(i.dayShort.slice(0, c)), o = (b, y, N) => new Date(
1156
1161
  b.getFullYear(),
1157
- b.getMonth() + (N || 0),
1158
- b.getDate() + (k || 0)
1162
+ b.getMonth() + (y || 0),
1163
+ b.getDate() + (N || 0)
1159
1164
  );
1160
- let f = t !== "normal";
1165
+ let w = t !== "normal";
1161
1166
  function d(b) {
1162
- const N = b.getDay();
1163
- return N === 0 || N === 6;
1167
+ const y = b.getDay();
1168
+ return y === 0 || y === 6;
1164
1169
  }
1165
1170
  function p() {
1166
1171
  const b = o(n, 0, 1 - n.getDate());
@@ -1170,39 +1175,39 @@ function ft({
1170
1175
  const b = o(n, 1, -n.getDate());
1171
1176
  return b.setDate(b.getDate() + (6 - b.getDay() + c) % 7), b;
1172
1177
  }
1173
- const x = S(0);
1174
- function w(b, N) {
1175
- N.timeStamp !== x.current && (x.current = N.timeStamp, N.stopPropagation(), u && u(new Date(b)), r && r());
1178
+ const x = C(0);
1179
+ function f(b, y) {
1180
+ y.timeStamp !== x.current && (x.current = y.timeStamp, y.stopPropagation(), u && u(new Date(b)), r && r());
1176
1181
  }
1177
1182
  const h = A(() => t == "normal" ? [e ? o(e).valueOf() : 0] : e ? [
1178
1183
  e.start ? o(e.start).valueOf() : 0,
1179
1184
  e.end ? o(e.end).valueOf() : 0
1180
1185
  ] : [0, 0], [t, e]), m = A(() => {
1181
- const b = p(), N = v(), k = n.getMonth();
1186
+ const b = p(), y = v(), N = n.getMonth();
1182
1187
  let M = [];
1183
- for (let $ = b; $ <= N; $.setDate($.getDate() + 1)) {
1184
- const V = {
1185
- day: $.getDate(),
1186
- in: $.getMonth() === k,
1187
- date: $.valueOf()
1188
+ for (let T = b; T <= y; T.setDate(T.getDate() + 1)) {
1189
+ const R = {
1190
+ day: T.getDate(),
1191
+ in: T.getMonth() === N,
1192
+ date: T.valueOf()
1188
1193
  };
1189
1194
  let F = "";
1190
- if (F += V.in ? "" : " wx-inactive", F += h.indexOf(V.date) > -1 ? " wx-selected" : "", f) {
1191
- const j = V.date == h[0], H = V.date == h[1];
1192
- j && !H ? F += " wx-left" : H && !j && (F += " wx-right"), V.date > h[0] && V.date < h[1] && (F += " wx-inrange");
1195
+ if (F += R.in ? "" : " wx-inactive", F += h.indexOf(R.date) > -1 ? " wx-selected" : "", w) {
1196
+ const j = R.date == h[0], H = R.date == h[1];
1197
+ j && !H ? F += " wx-left" : H && !j && (F += " wx-right"), R.date > h[0] && R.date < h[1] && (F += " wx-inrange");
1193
1198
  }
1194
- if (F += d($) ? " wx-weekend" : "", s) {
1195
- const j = s($);
1199
+ if (F += d(T) ? " wx-weekend" : "", s) {
1200
+ const j = s(T);
1196
1201
  j && (F += " " + j);
1197
1202
  }
1198
- M.push({ ...V, css: F });
1203
+ M.push({ ...R, css: F });
1199
1204
  }
1200
1205
  return M;
1201
- }, [n, h, f, s]), g = S(null);
1202
- let T = S({});
1203
- return T.current.click = w, W(() => {
1204
- Ee(g.current, T.current);
1205
- }, []), /* @__PURE__ */ R("div", { children: [
1206
+ }, [n, h, w, s]), g = C(null);
1207
+ let V = C({});
1208
+ return V.current.click = f, E(() => {
1209
+ Ee(g.current, V.current);
1210
+ }, []), /* @__PURE__ */ $("div", { children: [
1206
1211
  /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekdays", children: a.map((b) => /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekday", children: b }, b)) }),
1207
1212
  /* @__PURE__ */ l("div", { className: "wx-398RBS wx-days", ref: g, children: m.map((b) => /* @__PURE__ */ l(
1208
1213
  "div",
@@ -1223,30 +1228,30 @@ function wt({
1223
1228
  onChange: r,
1224
1229
  onShift: u
1225
1230
  }) {
1226
- const i = S(/* @__PURE__ */ new Date()), [c, a] = J(e || i.current), [o, f] = J(n || i.current), d = K(q).getRaw().calendar, p = d.monthShort || [], v = A(() => o.getMonth(), [o]), x = D(
1231
+ const i = C(/* @__PURE__ */ new Date()), [c, a] = J(e || i.current), [o, w] = J(n || i.current), d = K(q).getRaw().calendar, p = d.monthShort || [], v = A(() => o.getMonth(), [o]), x = D(
1227
1232
  (m, g) => {
1228
1233
  if (m != null) {
1229
1234
  g.stopPropagation();
1230
- const T = new Date(o);
1231
- T.setMonth(m), f(T), u && u({ current: T });
1235
+ const V = new Date(o);
1236
+ V.setMonth(m), w(V), u && u({ current: V });
1232
1237
  }
1233
1238
  t === "normal" && a(new Date(o)), s && s();
1234
1239
  },
1235
1240
  [o, t, u, s]
1236
- ), w = D(() => {
1241
+ ), f = D(() => {
1237
1242
  const m = new Date(je(c, t) || o);
1238
1243
  m.setMonth(o.getMonth()), m.setFullYear(o.getFullYear()), r && r(m);
1239
1244
  }, [c, o, t, r]), h = D(
1240
1245
  (m) => {
1241
1246
  const g = m.target.closest("[data-id]");
1242
1247
  if (g) {
1243
- const T = parseInt(g.getAttribute("data-id"), 10);
1244
- x(T, m);
1248
+ const V = parseInt(g.getAttribute("data-id"), 10);
1249
+ x(V, m);
1245
1250
  }
1246
1251
  },
1247
1252
  [x]
1248
1253
  );
1249
- return /* @__PURE__ */ R(_, { children: [
1254
+ return /* @__PURE__ */ $(_, { children: [
1250
1255
  /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-months", onClick: h, children: p.map((m, g) => /* @__PURE__ */ l(
1251
1256
  "div",
1252
1257
  {
@@ -1256,34 +1261,34 @@ function wt({
1256
1261
  },
1257
1262
  g
1258
1263
  )) }),
1259
- /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-buttons", children: /* @__PURE__ */ l(ke, { onClick: w, children: d.done }) })
1264
+ /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-buttons", children: /* @__PURE__ */ l(ke, { onClick: f, children: d.done }) })
1260
1265
  ] });
1261
1266
  }
1262
1267
  const xe = "wx-1XEF33", xt = ({ value: e, current: n, onCancel: t, onChange: s, onShift: r, part: u }) => {
1263
- const i = K(q).getRaw().calendar, [c, a] = J(n), [o, f] = J(e), d = A(() => c.getFullYear(), [c]), p = A(() => {
1264
- const { start: m, end: g } = Be(d), T = [];
1268
+ const i = K(q).getRaw().calendar, [c, a] = J(n), [o, w] = J(e), d = A(() => c.getFullYear(), [c]), p = A(() => {
1269
+ const { start: m, end: g } = Be(d), V = [];
1265
1270
  for (let b = m; b <= g; ++b)
1266
- T.push(b);
1267
- return T;
1271
+ V.push(b);
1272
+ return V;
1268
1273
  }, [d]), v = {
1269
1274
  click: x
1270
1275
  };
1271
1276
  function x(m, g) {
1272
1277
  if (m) {
1273
1278
  g.stopPropagation();
1274
- const T = new Date(c);
1275
- T.setFullYear(m), a(T), r && r({ current: T });
1279
+ const V = new Date(c);
1280
+ V.setFullYear(m), a(V), r && r({ current: V });
1276
1281
  }
1277
- u === "normal" && f(new Date(c)), t && t();
1282
+ u === "normal" && w(new Date(c)), t && t();
1278
1283
  }
1279
- function w() {
1284
+ function f() {
1280
1285
  const m = new Date(je(o, u) || c);
1281
1286
  m.setFullYear(c.getFullYear()), s && s(m);
1282
1287
  }
1283
- const h = S(null);
1284
- return W(() => {
1288
+ const h = C(null);
1289
+ return E(() => {
1285
1290
  h.current && Ee(h.current, v);
1286
- }, []), /* @__PURE__ */ R(_, { children: [
1291
+ }, []), /* @__PURE__ */ $(_, { children: [
1287
1292
  /* @__PURE__ */ l("div", { className: xe + " wx-years", ref: h, children: p.map((m, g) => /* @__PURE__ */ l(
1288
1293
  "div",
1289
1294
  {
@@ -1293,7 +1298,7 @@ const xe = "wx-1XEF33", xt = ({ value: e, current: n, onCancel: t, onChange: s,
1293
1298
  },
1294
1299
  g
1295
1300
  )) }),
1296
- /* @__PURE__ */ l("div", { className: xe + " wx-buttons", children: /* @__PURE__ */ l(ke, { onClick: w, children: i.done }) })
1301
+ /* @__PURE__ */ l("div", { className: xe + " wx-buttons", children: /* @__PURE__ */ l(ke, { onClick: f, children: i.done }) })
1297
1302
  ] });
1298
1303
  }, Me = {
1299
1304
  month: {
@@ -1355,31 +1360,31 @@ function de({
1355
1360
  onShift: i,
1356
1361
  onChange: c
1357
1362
  }) {
1358
- const a = K(q).getGroup("calendar"), [o, f] = B("month"), d = Array.isArray(u) ? u : u ? kt : [], p = (m, g) => {
1363
+ const a = K(q).getGroup("calendar"), [o, w] = B("month"), d = Array.isArray(u) ? u : u ? kt : [], p = (m, g) => {
1359
1364
  m.preventDefault(), c && c({ value: g });
1360
1365
  }, v = () => {
1361
- o === "duodecade" ? f("year") : o === "year" && f("month");
1366
+ o === "duodecade" ? w("year") : o === "year" && w("month");
1362
1367
  }, x = (m) => {
1363
- const { diff: g, current: T } = m;
1368
+ const { diff: g, current: V } = m;
1364
1369
  if (g === 0) {
1365
- o === "month" ? f("year") : o === "year" && f("duodecade");
1370
+ o === "month" ? w("year") : o === "year" && w("duodecade");
1366
1371
  return;
1367
1372
  }
1368
1373
  if (g) {
1369
1374
  const b = Me[o];
1370
1375
  t(g > 0 ? b.next(n) : b.prev(n));
1371
- } else T && t(T);
1376
+ } else V && t(V);
1372
1377
  i && i();
1373
- }, w = (m) => {
1374
- f("month"), c && c({ select: !0, value: m });
1378
+ }, f = (m) => {
1379
+ w("month"), c && c({ select: !0, value: m });
1375
1380
  }, h = A(() => Me[o].component, [o]);
1376
1381
  return /* @__PURE__ */ l(
1377
1382
  "div",
1378
1383
  {
1379
1384
  className: `wx-2Gr4AS wx-calendar ${s !== "normal" && s !== "both" ? "wx-part" : ""}`,
1380
- children: /* @__PURE__ */ R("div", { className: "wx-2Gr4AS wx-wrap", children: [
1385
+ children: /* @__PURE__ */ $("div", { className: "wx-2Gr4AS wx-wrap", children: [
1381
1386
  /* @__PURE__ */ l(dt, { date: n, part: s, type: o, onShift: x }),
1382
- /* @__PURE__ */ R("div", { children: [
1387
+ /* @__PURE__ */ $("div", { children: [
1383
1388
  /* @__PURE__ */ l(
1384
1389
  h,
1385
1390
  {
@@ -1389,7 +1394,7 @@ function de({
1389
1394
  part: s,
1390
1395
  markers: r,
1391
1396
  onCancel: v,
1392
- onChange: w,
1397
+ onChange: f,
1393
1398
  onShift: x
1394
1399
  }
1395
1400
  ),
@@ -1431,7 +1436,7 @@ function Dt({
1431
1436
  onChange: r
1432
1437
  }) {
1433
1438
  const [u, i] = J(e), [c, a] = J(n);
1434
- W(() => {
1439
+ E(() => {
1435
1440
  Ie(c, u, a, !1);
1436
1441
  }, [u, c]);
1437
1442
  const o = D(
@@ -1440,7 +1445,7 @@ function Dt({
1440
1445
  p ? (i(new Date(p)), Ie(c, new Date(p), a, !0)) : i(null), r && r({ value: p ? new Date(p) : null });
1441
1446
  },
1442
1447
  [r, c]
1443
- ), f = D(
1448
+ ), w = D(
1444
1449
  (d) => {
1445
1450
  a(d);
1446
1451
  },
@@ -1454,7 +1459,7 @@ function Dt({
1454
1459
  markers: t,
1455
1460
  buttons: s,
1456
1461
  onChange: o,
1457
- onCurrentChange: f
1462
+ onCurrentChange: w
1458
1463
  }
1459
1464
  ) }) : null;
1460
1465
  }
@@ -1473,36 +1478,36 @@ function zt({
1473
1478
  css: c = "",
1474
1479
  title: a = "",
1475
1480
  editable: o = !1,
1476
- clear: f = !1,
1481
+ clear: w = !1,
1477
1482
  onChange: d,
1478
1483
  dropdown: p = {}
1479
1484
  }) {
1480
- const { calendar: v, formats: x } = (K(q) || X()).getRaw(), w = u || x?.dateFormat;
1481
- let h = typeof w == "function" ? w : ne(w, v);
1482
- const [m, g] = B(e), [T, b] = B(!1);
1483
- W(() => {
1485
+ const { calendar: v, formats: x } = (K(q) || X()).getRaw(), f = u || x?.dateFormat;
1486
+ let h = typeof f == "function" ? f : ne(f, v);
1487
+ const [m, g] = B(e), [V, b] = B(!1);
1488
+ E(() => {
1484
1489
  g(e);
1485
1490
  }, [e]);
1486
- function N() {
1491
+ function y() {
1487
1492
  b(!1);
1488
1493
  }
1489
- function k(V) {
1490
- const F = V === m || V && m && V.valueOf() === m.valueOf() || !V && !m;
1491
- g(V), F || d && d({ value: V }), setTimeout(N, 1);
1494
+ function N(R) {
1495
+ const F = R === m || R && m && R.valueOf() === m.valueOf() || !R && !m;
1496
+ g(R), F || d && d({ value: R }), setTimeout(y, 1);
1492
1497
  }
1493
1498
  const M = A(
1494
1499
  () => m ? h(m) : "",
1495
1500
  [m, h]
1496
1501
  );
1497
- function $({ value: V, input: F }) {
1498
- if (!o && !f || F) return;
1499
- let j = typeof o == "function" ? o(V) : V ? new Date(V) : null;
1500
- j = isNaN(j) ? m || null : j || null, k(j);
1502
+ function T({ value: R, input: F }) {
1503
+ if (!o && !w || F) return;
1504
+ let j = typeof o == "function" ? o(R) : R ? new Date(R) : null;
1505
+ j = isNaN(j) ? m || null : j || null, N(j);
1501
1506
  }
1502
- return W(() => {
1503
- const V = N;
1504
- return window.addEventListener("scroll", V), () => window.removeEventListener("scroll", V);
1505
- }, []), /* @__PURE__ */ R("div", { className: "wx-1lKOFG wx-datepicker", onClick: () => b(!0), children: [
1507
+ return E(() => {
1508
+ const R = y;
1509
+ return window.addEventListener("scroll", R), () => window.removeEventListener("scroll", R);
1510
+ }, []), /* @__PURE__ */ $("div", { className: "wx-1lKOFG wx-datepicker", onClick: () => b(!0), children: [
1506
1511
  /* @__PURE__ */ l(
1507
1512
  Ne,
1508
1513
  {
@@ -1514,85 +1519,85 @@ function zt({
1514
1519
  disabled: t,
1515
1520
  error: s,
1516
1521
  placeholder: r,
1517
- onInput: N,
1518
- onChange: $,
1522
+ onInput: y,
1523
+ onChange: T,
1519
1524
  icon: "wxi-calendar",
1520
1525
  inputStyle: {
1521
1526
  cursor: "pointer",
1522
1527
  width: "100%",
1523
1528
  paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
1524
1529
  },
1525
- clear: f
1530
+ clear: w
1526
1531
  }
1527
1532
  ),
1528
- T && !t && /* @__PURE__ */ l(
1533
+ V && !t && /* @__PURE__ */ l(
1529
1534
  le,
1530
1535
  {
1531
- onCancel: N,
1536
+ onCancel: y,
1532
1537
  ...ye(p),
1533
1538
  children: /* @__PURE__ */ l(
1534
1539
  Dt,
1535
1540
  {
1536
1541
  buttons: i,
1537
1542
  value: m,
1538
- onChange: (V) => k(V.value)
1543
+ onChange: (R) => N(R.value)
1539
1544
  }
1540
1545
  )
1541
1546
  }
1542
1547
  )
1543
1548
  ] });
1544
1549
  }
1545
- const Tt = ["clear", "today"], Rt = ({
1550
+ const Rt = ["clear", "today"], Tt = ({
1546
1551
  start: e,
1547
1552
  end: n,
1548
1553
  current: t,
1549
1554
  months: s = 2,
1550
1555
  markers: r = null,
1551
- buttons: u = Tt,
1556
+ buttons: u = Rt,
1552
1557
  onChange: i
1553
1558
  }) => {
1554
- const [c, a] = J(e), [o, f] = J(n), [d, p] = B(), [v, x] = B(), w = D((N, k, M) => {
1555
- const $ = new Date(N);
1556
- return $.setMonth($.getMonth() + k), M && $.valueOf() === M.valueOf() ? M : $;
1559
+ const [c, a] = J(e), [o, w] = J(n), [d, p] = B(), [v, x] = B(), f = D((y, N, M) => {
1560
+ const T = new Date(y);
1561
+ return T.setMonth(T.getMonth() + N), M && T.valueOf() === M.valueOf() ? M : T;
1557
1562
  }, []), h = D(
1558
- (N) => {
1563
+ (y) => {
1559
1564
  p(() => {
1560
- const k = new Date(N);
1561
- return k.setDate(1), x(w(k, 1)), k;
1565
+ const N = new Date(y);
1566
+ return N.setDate(1), x(f(N, 1)), N;
1562
1567
  });
1563
1568
  },
1564
- [w]
1569
+ [f]
1565
1570
  ), m = D(
1566
- (N) => {
1571
+ (y) => {
1567
1572
  x(() => {
1568
- const k = new Date(N);
1569
- return k.setDate(1), p(w(k, -1)), k;
1573
+ const N = new Date(y);
1574
+ return N.setDate(1), p(f(N, -1)), N;
1570
1575
  });
1571
1576
  },
1572
- [w]
1577
+ [f]
1573
1578
  );
1574
- W(() => {
1575
- const N = c;
1576
- d || h(N ? new Date(N) : t || /* @__PURE__ */ new Date());
1579
+ E(() => {
1580
+ const y = c;
1581
+ d || h(y ? new Date(y) : t || /* @__PURE__ */ new Date());
1577
1582
  }, [c, t, d, h]);
1578
1583
  const g = D(
1579
- (N) => {
1580
- const k = N.value;
1581
- let M = c, $ = o;
1582
- const V = k === -1;
1583
- return V || (N.select ? !c || o ? (a(M = k), f($ = null)) : c > k ? (f($ = c), a(M = k)) : f($ = k) : k ? (a(M = new Date(k)), f($ = new Date(k))) : (a(M = null), f($ = null))), (V || !u.includes("done")) && i && i({ start: M, end: $ }), [M, $];
1584
+ (y) => {
1585
+ const N = y.value;
1586
+ let M = c, T = o;
1587
+ const R = N === -1;
1588
+ return R || (y.select ? !c || o ? (a(M = N), w(T = null)) : c > N ? (w(T = c), a(M = N)) : w(T = N) : N ? (a(M = new Date(N)), w(T = new Date(N))) : (a(M = null), w(T = null))), (R || !u.includes("done")) && i && i({ start: M, end: T }), [M, T];
1584
1589
  },
1585
1590
  [c, o, u, i]
1586
- ), T = D(
1587
- (N) => {
1588
- const [k] = g(N);
1589
- k && h(new Date(k));
1591
+ ), V = D(
1592
+ (y) => {
1593
+ const [N] = g(y);
1594
+ N && h(new Date(N));
1590
1595
  },
1591
1596
  [h, c, o]
1592
1597
  ), b = D(
1593
- (N) => {
1594
- const [, k] = g(N);
1595
- k && m(new Date(k));
1598
+ (y) => {
1599
+ const [, N] = g(y);
1600
+ N && m(new Date(N));
1596
1601
  },
1597
1602
  [m, c, o]
1598
1603
  );
@@ -1604,10 +1609,10 @@ const Tt = ["clear", "today"], Rt = ({
1604
1609
  markers: r,
1605
1610
  buttons: u,
1606
1611
  part: "both",
1607
- onChange: T,
1612
+ onChange: V,
1608
1613
  onCurrentChange: h
1609
1614
  }
1610
- ) }) : /* @__PURE__ */ l(he, { children: /* @__PURE__ */ R("div", { className: "wx-p2jCaW wx-rangecalendar", children: [
1615
+ ) }) : /* @__PURE__ */ l(he, { children: /* @__PURE__ */ $("div", { className: "wx-p2jCaW wx-rangecalendar", children: [
1611
1616
  /* @__PURE__ */ l("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ l(
1612
1617
  de,
1613
1618
  {
@@ -1616,7 +1621,7 @@ const Tt = ["clear", "today"], Rt = ({
1616
1621
  markers: r,
1617
1622
  buttons: !1,
1618
1623
  part: "left",
1619
- onChange: T,
1624
+ onChange: V,
1620
1625
  onCurrentChange: h
1621
1626
  }
1622
1627
  ) }),
@@ -1644,45 +1649,45 @@ const Tt = ["clear", "today"], Rt = ({
1644
1649
  title: c = "",
1645
1650
  format: a = "",
1646
1651
  months: o = 2,
1647
- buttons: f = $t,
1652
+ buttons: w = $t,
1648
1653
  editable: d = !1,
1649
1654
  clear: p = !1,
1650
1655
  dropdown: v
1651
1656
  }) => {
1652
- const [x, w] = J(e), { calendar: h, formats: m } = (K(q) || X()).getRaw(), g = a || m?.dateFormat, T = typeof g == "function" ? g : ne(g, h), [b, N] = B(!1), k = D(() => {
1653
- N(!1);
1654
- }, []), M = A(() => x ? x.start ? T(x.start) + (x.end ? ` - ${T(x.end)}` : "") : T(x) : "", [x, T]), $ = A(() => x && x.start || null, [x]), V = A(() => x && x.end || null, [x]), F = D(
1657
+ const [x, f] = J(e), { calendar: h, formats: m } = (K(q) || X()).getRaw(), g = a || m?.dateFormat, V = typeof g == "function" ? g : ne(g, h), [b, y] = B(!1), N = D(() => {
1658
+ y(!1);
1659
+ }, []), M = A(() => x ? x.start ? V(x.start) + (x.end ? ` - ${V(x.end)}` : "") : V(x) : "", [x, V]), T = A(() => x && x.start || null, [x]), R = A(() => x && x.end || null, [x]), F = D(
1655
1660
  (H) => {
1656
1661
  const L = H.start || H.end ? { start: H.start, end: H.end } : null;
1657
- w && w(L), (H.start && H.end || !H.start && !H.end) && (n && n({ value: L }), setTimeout(k, 1));
1662
+ f && f(L), (H.start && H.end || !H.start && !H.end) && (n && n({ value: L }), setTimeout(N, 1));
1658
1663
  },
1659
- [n, k, w]
1664
+ [n, N, f]
1660
1665
  ), j = D(
1661
1666
  (H) => {
1662
1667
  if (!d && !p) return;
1663
1668
  const { value: L, input: P } = H;
1664
1669
  if (P) return;
1665
- const [C, O] = L.split(" -").map((U, Y) => {
1670
+ const [S, O] = L.split(" -").map((U, Y) => {
1666
1671
  const I = U.trim();
1667
- let G = typeof d == "function" ? d(I) : I ? new Date(I) : null, Q = Y === 0 ? $ : V;
1672
+ let G = typeof d == "function" ? d(I) : I ? new Date(I) : null, Q = Y === 0 ? T : R;
1668
1673
  return isNaN(G) ? Q || null : G || null;
1669
1674
  });
1670
- F({ start: C, end: O });
1675
+ F({ start: S, end: O });
1671
1676
  },
1672
- [d, p, $, V, F]
1677
+ [d, p, T, R, F]
1673
1678
  );
1674
- return W(() => {
1679
+ return E(() => {
1675
1680
  const H = () => {
1676
- k();
1681
+ N();
1677
1682
  };
1678
1683
  return window.addEventListener("scroll", H), () => {
1679
1684
  window.removeEventListener("scroll", H);
1680
1685
  };
1681
- }, [k]), /* @__PURE__ */ R(
1686
+ }, [N]), /* @__PURE__ */ $(
1682
1687
  "div",
1683
1688
  {
1684
1689
  className: `wx-1b0WDQ wx-daterangepicker ${s ? "wx-disabled" : ""} ${r ? "wx-error" : ""}`,
1685
- onClick: () => N(!0),
1690
+ onClick: () => y(!0),
1686
1691
  children: [
1687
1692
  /* @__PURE__ */ l(
1688
1693
  Ne,
@@ -1708,15 +1713,15 @@ const Tt = ["clear", "today"], Rt = ({
1708
1713
  b && !s && /* @__PURE__ */ l(
1709
1714
  le,
1710
1715
  {
1711
- onCancel: k,
1716
+ onCancel: N,
1712
1717
  ...ye(v),
1713
1718
  children: /* @__PURE__ */ l(
1714
- Rt,
1719
+ Tt,
1715
1720
  {
1716
- onCancel: k,
1717
- buttons: f,
1718
- start: $,
1719
- end: V,
1721
+ onCancel: N,
1722
+ buttons: w,
1723
+ start: T,
1724
+ end: R,
1720
1725
  months: o,
1721
1726
  onChange: F
1722
1727
  }
@@ -1732,21 +1737,21 @@ function en({
1732
1737
  toggleButton: n,
1733
1738
  children: t
1734
1739
  }) {
1735
- const s = S(null), [r, u] = B(!1), i = A(
1740
+ const s = C(null), [r, u] = B(!1), i = A(
1736
1741
  () => `wxi-${r ? "collapse" : "expand"}`,
1737
1742
  [r]
1738
- ), c = S(null);
1743
+ ), c = C(null);
1739
1744
  return c.current = () => {
1740
1745
  const a = s.current;
1741
1746
  !r && a ? a.requestFullscreen() : r && document.exitFullscreen(), u((o) => !o);
1742
- }, Ke({ [e]: () => c.current() }, s), W(() => {
1747
+ }, Ke({ [e]: () => c.current() }, s), E(() => {
1743
1748
  const a = () => {
1744
1749
  u(document.fullscreenElement === s.current);
1745
1750
  };
1746
1751
  return document.addEventListener("fullscreenchange", a), () => {
1747
1752
  document.removeEventListener("fullscreenchange", a);
1748
1753
  };
1749
- }, []), /* @__PURE__ */ R("div", { className: "wx-13aa5W wx-fullscreen", ref: s, tabIndex: -1, children: [
1754
+ }, []), /* @__PURE__ */ $("div", { className: "wx-13aa5W wx-fullscreen", ref: s, tabIndex: -1, children: [
1750
1755
  t,
1751
1756
  n ? n(c.current, r) : /* @__PURE__ */ l(re, { css: "wx-13aa5W wx-fullscreen-button", onClick: c.current, children: /* @__PURE__ */ l("i", { className: `wx-13aa5W ${i} wx-fullscreen-icon`, children: " " }) })
1752
1757
  ] });
@@ -1782,56 +1787,56 @@ function nn({
1782
1787
  disabled: c = !1,
1783
1788
  error: a = !1,
1784
1789
  checkboxes: o = !1,
1785
- onChange: f,
1790
+ onChange: w,
1786
1791
  children: d,
1787
1792
  dropdown: p = {}
1788
1793
  }) {
1789
- const v = z(e), x = S(null), w = S(null), [h, m] = J(n), [g, T] = B(""), [b, N] = B(!1), k = S(null), M = A(() => h ? (s || t).filter((C) => h.includes(C.id)) : [], [h, s, t]), $ = A(() => {
1790
- const C = t;
1791
- return g ? C.filter((O) => O[r].toLowerCase().includes(g.toLowerCase())) : C;
1792
- }, [g, t, r]), V = D((C) => {
1793
- x.current = C.navigate, w.current = C.keydown;
1794
+ const v = z(e), x = C(null), f = C(null), [h, m] = J(n), [g, V] = B(""), [b, y] = B(!1), N = C(null), M = A(() => h ? (s || t).filter((S) => h.includes(S.id)) : [], [h, s, t]), T = A(() => {
1795
+ const S = t;
1796
+ return g ? S.filter((O) => O[r].toLowerCase().includes(g.toLowerCase())) : S;
1797
+ }, [g, t, r]), R = D((S) => {
1798
+ x.current = S.navigate, f.current = S.keydown;
1794
1799
  }, []), F = D(() => {
1795
- $.length ? x.current(0) : x.current(null);
1796
- }, [$]), j = D(
1797
- (C) => {
1798
- const { id: O } = C;
1799
- O && (m(O), f && f({ value: O }), k.current.focus());
1800
+ T.length ? x.current(0) : x.current(null);
1801
+ }, [T]), j = D(
1802
+ (S) => {
1803
+ const { id: O } = S;
1804
+ O && (m(O), w && w({ value: O }), N.current.focus());
1800
1805
  },
1801
- [f]
1806
+ [w]
1802
1807
  ), H = D(
1803
- (C, O) => {
1808
+ (S, O) => {
1804
1809
  O && O.stopPropagation();
1805
- const U = h.filter((Y) => Y !== C);
1806
- m(U), f && f({ value: U });
1810
+ const U = h.filter((Y) => Y !== S);
1811
+ m(U), w && w({ value: U });
1807
1812
  },
1808
- [h, f]
1813
+ [h, w]
1809
1814
  ), L = D(
1810
- () => h && h.length ? $.findIndex((C) => C.id === h[0]) : 0,
1811
- [h, $]
1815
+ () => h && h.length ? T.findIndex((S) => S.id === h[0]) : 0,
1816
+ [h, T]
1812
1817
  ), P = D(() => {
1813
- c || (k.current.focus(), x.current(L()));
1818
+ c || (N.current.focus(), x.current(L()));
1814
1819
  }, [c, L]);
1815
- return /* @__PURE__ */ R(
1820
+ return /* @__PURE__ */ $(
1816
1821
  "div",
1817
1822
  {
1818
1823
  title: i,
1819
1824
  className: `wx-12Wj21 wx-multicombo ${a ? "wx-error" : ""} ${c ? "wx-disabled" : ""} ${M.length ? "wx-not-empty" : ""} ${b && !c ? "wx-focus" : ""}`,
1820
1825
  onClick: P,
1821
- onKeyDown: (C) => w.current(C, L()),
1826
+ onKeyDown: (S) => f.current(S, L()),
1822
1827
  children: [
1823
- /* @__PURE__ */ R("div", { className: "wx-12Wj21 wx-wrapper", children: [
1824
- /* @__PURE__ */ l("div", { className: "wx-12Wj21 wx-tags", children: M.map((C) => /* @__PURE__ */ R("div", { className: "wx-12Wj21 wx-tag", children: [
1825
- d ? ae(d, { option: C }) : C[r],
1828
+ /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-wrapper", children: [
1829
+ /* @__PURE__ */ l("div", { className: "wx-12Wj21 wx-tags", children: M.map((S) => /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-tag", children: [
1830
+ d ? ae(d, { option: S }) : S[r],
1826
1831
  !c && /* @__PURE__ */ l(
1827
1832
  "i",
1828
1833
  {
1829
1834
  className: "wx-12Wj21 wx-icon wxi-close",
1830
- onClick: (O) => H(C.id, O)
1835
+ onClick: (O) => H(S.id, O)
1831
1836
  }
1832
1837
  )
1833
- ] }, C.id)) }),
1834
- /* @__PURE__ */ R("div", { className: "wx-12Wj21 wx-select", children: [
1838
+ ] }, S.id)) }),
1839
+ /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-select", children: [
1835
1840
  /* @__PURE__ */ l(
1836
1841
  "input",
1837
1842
  {
@@ -1839,13 +1844,13 @@ function nn({
1839
1844
  id: v,
1840
1845
  type: "text",
1841
1846
  value: g,
1842
- onChange: (C) => T(C.target.value),
1847
+ onChange: (S) => V(S.target.value),
1843
1848
  onInput: F,
1844
1849
  placeholder: u,
1845
1850
  disabled: c,
1846
- onFocus: () => N(!0),
1847
- onBlur: () => N(!1),
1848
- ref: k
1851
+ onFocus: () => y(!0),
1852
+ onBlur: () => y(!1),
1853
+ ref: N
1849
1854
  }
1850
1855
  ),
1851
1856
  /* @__PURE__ */ l("i", { className: "wx-12Wj21 wx-icon wxi-angle-down" })
@@ -1854,14 +1859,14 @@ function nn({
1854
1859
  !c && /* @__PURE__ */ l(
1855
1860
  ge,
1856
1861
  {
1857
- items: $,
1862
+ items: T,
1858
1863
  multiselect: !0,
1859
- onReady: V,
1864
+ onReady: R,
1860
1865
  onSelect: j,
1861
1866
  checkboxes: o,
1862
1867
  value: h,
1863
1868
  ...p,
1864
- children: ({ option: C }) => /* @__PURE__ */ l(_, { children: d ? ae(d, { option: C }) : C[r] })
1869
+ children: ({ option: S }) => /* @__PURE__ */ l(_, { children: d ? ae(d, { option: S }) : S[r] })
1865
1870
  }
1866
1871
  )
1867
1872
  ]
@@ -1874,18 +1879,18 @@ const rn = ({
1874
1879
  value: t = 1,
1875
1880
  onChange: s
1876
1881
  }) => {
1877
- const [r, u] = J(n), [i, c] = J(t), a = (K(q) || X()).getGroup("core"), o = Math.ceil(e / r), f = (i - 1) * r, d = Math.min(i * r, e), p = (w, h) => {
1878
- Number.isNaN(w) || (h || c(w), w = Math.max(1, Math.min(w, o)), h && c(w), w !== i && setTimeout(() => {
1882
+ const [r, u] = J(n), [i, c] = J(t), a = (K(q) || X()).getGroup("core"), o = Math.ceil(e / r), w = (i - 1) * r, d = Math.min(i * r, e), p = (f, h) => {
1883
+ Number.isNaN(f) || (h || c(f), f = Math.max(1, Math.min(f, o)), h && c(f), f !== i && setTimeout(() => {
1879
1884
  s && s({
1880
- value: w,
1881
- from: (w - 1) * r,
1882
- to: Math.min(w * r, e),
1885
+ value: f,
1886
+ from: (f - 1) * r,
1887
+ to: Math.min(f * r, e),
1883
1888
  pageSize: r
1884
1889
  });
1885
1890
  }));
1886
1891
  };
1887
- function v(w) {
1888
- switch (w) {
1892
+ function v(f) {
1893
+ switch (f) {
1889
1894
  case "first":
1890
1895
  p(1);
1891
1896
  break;
@@ -1900,13 +1905,13 @@ const rn = ({
1900
1905
  break;
1901
1906
  }
1902
1907
  }
1903
- const x = (w) => {
1904
- const h = w.target.value * 1;
1905
- Number.isNaN(h) || (u(h), s && s({ value: i, from: f, to: d, pageSize: h }));
1908
+ const x = (f) => {
1909
+ const h = f.target.value * 1;
1910
+ Number.isNaN(h) || (u(h), s && s({ value: i, from: w, to: d, pageSize: h }));
1906
1911
  };
1907
- return /* @__PURE__ */ R("div", { className: "wx-35Np0p wx-pager", children: [
1908
- /* @__PURE__ */ R("div", { className: "wx-35Np0p wx-left", children: [
1909
- /* @__PURE__ */ R("span", { children: [
1912
+ return /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-pager", children: [
1913
+ /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-left", children: [
1914
+ /* @__PURE__ */ $("span", { children: [
1910
1915
  a("Rows per page"),
1911
1916
  ": "
1912
1917
  ] }),
@@ -1921,7 +1926,7 @@ const rn = ({
1921
1926
  }
1922
1927
  )
1923
1928
  ] }),
1924
- /* @__PURE__ */ R("div", { className: "wx-35Np0p wx-center", children: [
1929
+ /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-center", children: [
1925
1930
  /* @__PURE__ */ l(
1926
1931
  "i",
1927
1932
  {
@@ -1942,8 +1947,8 @@ const rn = ({
1942
1947
  type: "text",
1943
1948
  value: i,
1944
1949
  className: "wx-35Np0p wx-input",
1945
- onChange: (w) => p(w.target.value * 1),
1946
- onBlur: (w) => p(w.target.value * 1, !0)
1950
+ onChange: (f) => p(f.target.value * 1),
1951
+ onBlur: (f) => p(f.target.value * 1, !0)
1947
1952
  }
1948
1953
  ),
1949
1954
  /* @__PURE__ */ l(
@@ -1961,7 +1966,7 @@ const rn = ({
1961
1966
  }
1962
1967
  )
1963
1968
  ] }),
1964
- /* @__PURE__ */ R("div", { className: "wx-35Np0p wx-right", children: [
1969
+ /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-right", children: [
1965
1970
  a("Total pages"),
1966
1971
  ": ",
1967
1972
  o
@@ -1977,12 +1982,12 @@ function It({
1977
1982
  disabled: u = !1,
1978
1983
  onChange: i
1979
1984
  }) {
1980
- const c = _e(), a = z(e) || c, [o, f] = B(!1), d = t !== void 0, p = d ? t : o;
1985
+ const c = _e(), a = z(e) || c, [o, w] = B(!1), d = t !== void 0, p = d ? t : o;
1981
1986
  function v(x) {
1982
- const w = x.target.checked;
1983
- d || f(w), w && i && i({ value: !0, inputValue: r });
1987
+ const f = x.target.checked;
1988
+ d || w(f), f && i && i({ value: !0, inputValue: r });
1984
1989
  }
1985
- return /* @__PURE__ */ R("div", { className: "wx-3lDF1s wx-radio", children: [
1990
+ return /* @__PURE__ */ $("div", { className: "wx-3lDF1s wx-radio", children: [
1986
1991
  /* @__PURE__ */ l(
1987
1992
  "input",
1988
1993
  {
@@ -1996,7 +2001,7 @@ function It({
1996
2001
  onChange: v
1997
2002
  }
1998
2003
  ),
1999
- /* @__PURE__ */ R("label", { htmlFor: a, className: "wx-3lDF1s wx-label", children: [
2004
+ /* @__PURE__ */ $("label", { htmlFor: a, className: "wx-3lDF1s wx-label", children: [
2000
2005
  /* @__PURE__ */ l("span", { className: "wx-3lDF1s wx-circle" }),
2001
2006
  n && /* @__PURE__ */ l("span", { className: "wx-3lDF1s wx-radio-text", children: n })
2002
2007
  ] })
@@ -2009,7 +2014,7 @@ function ln({
2009
2014
  type: s = ""
2010
2015
  }) {
2011
2016
  const r = oe(), [u, i] = B(n);
2012
- W(() => {
2017
+ E(() => {
2013
2018
  i(n);
2014
2019
  }, [n]);
2015
2020
  function c(a) {
@@ -2038,37 +2043,37 @@ function cn({
2038
2043
  textField: c = "label",
2039
2044
  clear: a = !1,
2040
2045
  children: o,
2041
- onChange: f,
2046
+ onChange: w,
2042
2047
  dropdown: d = {}
2043
2048
  }) {
2044
- const p = S(null), v = S(null);
2045
- let [x, w] = J(e);
2046
- function h(N) {
2047
- p.current = N.navigate, v.current = N.keydown;
2049
+ const p = C(null), v = C(null);
2050
+ let [x, f] = J(e);
2051
+ function h(y) {
2052
+ p.current = y.navigate, v.current = y.keydown;
2048
2053
  }
2049
- const m = A(() => x || x === 0 ? (t || n).find((N) => N.id === x) : null, [x, t, n]), g = D(
2050
- ({ id: N }) => {
2051
- (N || N === 0) && (w(N), p.current(null), f && f({ value: N }));
2054
+ const m = A(() => x || x === 0 ? (t || n).find((y) => y.id === x) : null, [x, t, n]), g = D(
2055
+ ({ id: y }) => {
2056
+ (y || y === 0) && (f(y), p.current(null), w && w({ value: y }));
2052
2057
  },
2053
- [w, f]
2054
- ), T = D(
2055
- (N) => {
2056
- N.stopPropagation(), w(""), f && f({ value: "" });
2058
+ [f, w]
2059
+ ), V = D(
2060
+ (y) => {
2061
+ y.stopPropagation(), f(""), w && w({ value: "" });
2057
2062
  },
2058
- [w, f]
2059
- ), b = D(() => n.findIndex((N) => N.id === x), [n, x]);
2060
- return /* @__PURE__ */ R(
2063
+ [f, w]
2064
+ ), b = D(() => n.findIndex((y) => y.id === x), [n, x]);
2065
+ return /* @__PURE__ */ $(
2061
2066
  "div",
2062
2067
  {
2063
2068
  className: `wx-2YgblL wx-richselect ${u ? "wx-2YgblL wx-error" : ""} ${r ? "wx-2YgblL wx-disabled" : ""} ${o ? "" : "wx-2YgblL wx-nowrap"}`,
2064
2069
  title: i,
2065
2070
  onClick: () => p.current(b()),
2066
- onKeyDown: (N) => v.current(N, b()),
2071
+ onKeyDown: (y) => v.current(y, b()),
2067
2072
  tabIndex: 0,
2068
2073
  children: [
2069
2074
  /* @__PURE__ */ l("div", { className: "wx-2YgblL wx-label", children: m ? o ? o(m) : m[c] : s ? /* @__PURE__ */ l("span", { className: "wx-2YgblL wx-placeholder", children: s }) : " " }),
2070
- a && !r && x ? /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: T }) : /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
2071
- !r && /* @__PURE__ */ l(ge, { items: n, onReady: h, onSelect: g, ...d, children: ({ option: N }) => o ? o(N) : N[c] })
2075
+ a && !r && x ? /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: V }) : /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
2076
+ !r && /* @__PURE__ */ l(ge, { items: n, onReady: h, onSelect: g, ...d, children: ({ option: y }) => o ? o(y) : y[c] })
2072
2077
  ]
2073
2078
  }
2074
2079
  );
@@ -2083,7 +2088,7 @@ const sn = ({
2083
2088
  const [u, i] = B(n), c = (a) => {
2084
2089
  i(a), r && r({ value: a });
2085
2090
  };
2086
- return W(() => {
2091
+ return E(() => {
2087
2092
  i(n);
2088
2093
  }, [n]), /* @__PURE__ */ l("div", { className: `wx-0hMO7P wx-segmented ${t}`, children: e.map((a) => /* @__PURE__ */ l(
2089
2094
  "button",
@@ -2091,7 +2096,7 @@ const sn = ({
2091
2096
  className: `wx-0hMO7P wx-segment ${a.css} ${a.id === u ? "wx-selected" : ""}`,
2092
2097
  title: a.title,
2093
2098
  onClick: () => c(a.id),
2094
- children: s ? ae(s, { option: a }) : /* @__PURE__ */ R(_, { children: [
2099
+ children: s ? ae(s, { option: a }) : /* @__PURE__ */ $(_, { children: [
2095
2100
  a.icon && /* @__PURE__ */ l(
2096
2101
  "i",
2097
2102
  {
@@ -2116,20 +2121,20 @@ function an({
2116
2121
  id: a,
2117
2122
  onChange: o
2118
2123
  }) {
2119
- const f = z(a), [d, p] = B(e || ""), v = D(
2120
- (w) => {
2121
- const h = w.target.value;
2124
+ const w = z(a), [d, p] = B(e || ""), v = D(
2125
+ (f) => {
2126
+ const h = f.target.value;
2122
2127
  p(h), o && o({ value: h });
2123
2128
  },
2124
2129
  [o]
2125
2130
  ), x = D(() => {
2126
2131
  p(""), o && o({ value: "" });
2127
2132
  }, [o]);
2128
- return /* @__PURE__ */ R("div", { className: "wx-2yx1Fo wx-select-box", children: [
2129
- /* @__PURE__ */ R(
2133
+ return /* @__PURE__ */ $("div", { className: "wx-2yx1Fo wx-select-box", children: [
2134
+ /* @__PURE__ */ $(
2130
2135
  "select",
2131
2136
  {
2132
- id: f,
2137
+ id: w,
2133
2138
  value: d,
2134
2139
  disabled: r,
2135
2140
  className: `wx-2yx1Fo wx-select ${u ? "wx-2yx1Fo wx-error" : ""}`,
@@ -2137,7 +2142,7 @@ function an({
2137
2142
  onChange: v,
2138
2143
  children: [
2139
2144
  /* @__PURE__ */ l("option", { value: "", children: t }),
2140
- n.map((w) => /* @__PURE__ */ l("option", { value: w.id, children: w[i] }, w.id))
2145
+ n.map((f) => /* @__PURE__ */ l("option", { value: f.id, children: f[i] }, f.id))
2141
2146
  ]
2142
2147
  }
2143
2148
  ),
@@ -2155,36 +2160,36 @@ function Ce({
2155
2160
  title: c = "",
2156
2161
  disabled: a = !1,
2157
2162
  onChange: o,
2158
- width: f = ""
2163
+ width: w = ""
2159
2164
  }) {
2160
- const d = z(e), [p, v] = J(u), x = S({ value: p, input: p }), w = A(
2165
+ const d = z(e), [p, v] = J(u), x = C({ value: p, input: p }), f = A(
2161
2166
  () => (p - s) / (r - s) * 100 + "%",
2162
2167
  [p, s, r]
2163
- ), h = A(() => a ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${w}, var(--wx-slider-background) ${w} 100%)`, [a, w]);
2164
- function m({ target: N }) {
2165
- const k = N.value * 1;
2166
- v(k), o && o({
2167
- value: k,
2168
+ ), h = A(() => a ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${f}, var(--wx-slider-background) ${f} 100%)`, [a, f]);
2169
+ function m({ target: y }) {
2170
+ const N = y.value * 1;
2171
+ v(N), o && o({
2172
+ value: N,
2168
2173
  previous: x.current.input,
2169
2174
  input: !0
2170
- }), x.current.input = k;
2175
+ }), x.current.input = N;
2171
2176
  }
2172
- function g({ target: N }) {
2173
- const k = N.value * 1;
2174
- v(k), o && o({ value: k, previous: x.current.value }), x.current.value = k;
2177
+ function g({ target: y }) {
2178
+ const N = y.value * 1;
2179
+ v(N), o && o({ value: N, previous: x.current.value }), x.current.value = N;
2175
2180
  }
2176
- W(() => {
2181
+ E(() => {
2177
2182
  v(u);
2178
2183
  }, [u]);
2179
- const T = S(null);
2180
- W(() => {
2181
- if (T.current)
2182
- return T.current.addEventListener("change", g), () => {
2183
- T.current && T.current.removeEventListener("change", g);
2184
+ const V = C(null);
2185
+ E(() => {
2186
+ if (V.current)
2187
+ return V.current.addEventListener("change", g), () => {
2188
+ V.current && V.current.removeEventListener("change", g);
2184
2189
  };
2185
- }, [T, g]);
2186
- const b = { ...f && { width: f } };
2187
- return /* @__PURE__ */ R("div", { className: `wx-2EDJ8G wx-slider ${t}`, style: b, title: c, children: [
2190
+ }, [V, g]);
2191
+ const b = { ...w && { width: w } };
2192
+ return /* @__PURE__ */ $("div", { className: `wx-2EDJ8G wx-slider ${t}`, style: b, title: c, children: [
2188
2193
  n && /* @__PURE__ */ l("label", { className: "wx-2EDJ8G wx-label", htmlFor: d, children: n }),
2189
2194
  /* @__PURE__ */ l("div", { className: "wx-2EDJ8G wx-inner", children: /* @__PURE__ */ l(
2190
2195
  "input",
@@ -2199,7 +2204,7 @@ function Ce({
2199
2204
  value: p,
2200
2205
  onInput: m,
2201
2206
  style: { background: h },
2202
- ref: T
2207
+ ref: V
2203
2208
  }
2204
2209
  ) })
2205
2210
  ] });
@@ -2217,7 +2222,7 @@ function on({
2217
2222
  },
2218
2223
  [s]
2219
2224
  );
2220
- return /* @__PURE__ */ R("label", { className: "wx-2dAR5c wx-switch", children: [
2225
+ return /* @__PURE__ */ $("label", { className: "wx-2dAR5c wx-switch", children: [
2221
2226
  /* @__PURE__ */ l(
2222
2227
  "input",
2223
2228
  {
@@ -2242,7 +2247,7 @@ const un = ({
2242
2247
  const [u, i] = J(n), c = (a) => {
2243
2248
  i(a), r && r({ value: a });
2244
2249
  };
2245
- return /* @__PURE__ */ l("div", { className: `wx-138fWJ wx-tabs wx-${t} ${s}`, children: e.map((a) => /* @__PURE__ */ R(
2250
+ return /* @__PURE__ */ l("div", { className: `wx-138fWJ wx-tabs wx-${t} ${s}`, children: e.map((a) => /* @__PURE__ */ $(
2246
2251
  "button",
2247
2252
  {
2248
2253
  className: `wx-138fWJ wx-tab ${a.css} ${a.id === u ? "wx-active" : ""}`,
@@ -2271,27 +2276,27 @@ const un = ({
2271
2276
  readonly: c = !1,
2272
2277
  onChange: a
2273
2278
  }) => {
2274
- const o = z(e), [f, d] = J(n), p = D(() => {
2275
- if (c || f <= s) return;
2276
- const h = f - t;
2279
+ const o = z(e), [w, d] = J(n), p = D(() => {
2280
+ if (c || w <= s) return;
2281
+ const h = w - t;
2277
2282
  d(h), a && a({ value: h });
2278
- }, [f, c, s, t, a]), v = D(() => {
2279
- if (c || f >= r) return;
2280
- const h = f + t;
2283
+ }, [w, c, s, t, a]), v = D(() => {
2284
+ if (c || w >= r) return;
2285
+ const h = w + t;
2281
2286
  d(h), a && a({ value: h });
2282
- }, [f, c, r, t, a]), x = D(() => {
2287
+ }, [w, c, r, t, a]), x = D(() => {
2283
2288
  if (!c) {
2284
- const h = Math.round(Math.min(r, Math.max(f, s)) / t) * t, m = isNaN(h) ? Math.max(s, 0) : h;
2289
+ const h = Math.round(Math.min(r, Math.max(w, s)) / t) * t, m = isNaN(h) ? Math.max(s, 0) : h;
2285
2290
  d(m), a && a({ value: m });
2286
2291
  }
2287
- }, [c, f, r, s, t, a]), w = D(
2292
+ }, [c, w, r, s, t, a]), f = D(
2288
2293
  (h) => {
2289
2294
  const m = h.target.value * 1;
2290
2295
  d(m), a && a({ value: m, input: !0 });
2291
2296
  },
2292
2297
  [a]
2293
2298
  );
2294
- return /* @__PURE__ */ R(
2299
+ return /* @__PURE__ */ $(
2295
2300
  "div",
2296
2301
  {
2297
2302
  className: `wx-22t21n wx-counter ${i ? "wx-disabled" : ""} ${c ? "wx-readonly" : ""} ${u ? "wx-error" : ""}`,
@@ -2326,9 +2331,9 @@ const un = ({
2326
2331
  disabled: i,
2327
2332
  readOnly: c,
2328
2333
  required: !0,
2329
- value: f,
2334
+ value: w,
2330
2335
  onBlur: x,
2331
- onInput: w
2336
+ onInput: f
2332
2337
  }
2333
2338
  ),
2334
2339
  /* @__PURE__ */ l(
@@ -2366,7 +2371,7 @@ function Ct({ notice: e = {} }) {
2366
2371
  function n() {
2367
2372
  e.remove && e.remove();
2368
2373
  }
2369
- return /* @__PURE__ */ R(
2374
+ return /* @__PURE__ */ $(
2370
2375
  "div",
2371
2376
  {
2372
2377
  className: `wx-11sNg5 wx-notice wx-${e.type ? e.type : ""}`,
@@ -2391,8 +2396,8 @@ function Lt({
2391
2396
  onConfirm: u,
2392
2397
  onCancel: i
2393
2398
  }) {
2394
- const c = (K(q) || X()).getGroup("core"), a = S(null);
2395
- W(() => {
2399
+ const c = (K(q) || X()).getGroup("core"), a = C(null);
2400
+ E(() => {
2396
2401
  a.current?.focus();
2397
2402
  }, []);
2398
2403
  function o(d) {
@@ -2408,7 +2413,7 @@ function Lt({
2408
2413
  break;
2409
2414
  }
2410
2415
  }
2411
- function f(d, p) {
2416
+ function w(d, p) {
2412
2417
  const v = { event: d, button: p };
2413
2418
  p === "cancel" ? i && i(v) : u && u(v);
2414
2419
  }
@@ -2419,14 +2424,14 @@ function Lt({
2419
2424
  ref: a,
2420
2425
  tabIndex: 0,
2421
2426
  onKeyDown: o,
2422
- children: /* @__PURE__ */ R("div", { className: "wx-1FxkZa wx-window", children: [
2427
+ children: /* @__PURE__ */ $("div", { className: "wx-1FxkZa wx-window", children: [
2423
2428
  t || (e ? /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-header", children: e }) : null),
2424
2429
  /* @__PURE__ */ l("div", { children: s }),
2425
2430
  r || n && /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-buttons", children: n.map((d) => /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-button", children: /* @__PURE__ */ l(
2426
2431
  re,
2427
2432
  {
2428
2433
  type: `block ${d === "ok" ? "primary" : "secondary"}`,
2429
- onClick: (p) => f(p, d),
2434
+ onClick: (p) => w(p, d),
2430
2435
  children: c(d)
2431
2436
  }
2432
2437
  ) }, d)) })
@@ -2442,10 +2447,10 @@ function Ft({ children: e }, n) {
2442
2447
  showModal: (i) => {
2443
2448
  const c = { ...i };
2444
2449
  return s(c), new Promise((a, o) => {
2445
- c.resolve = (f) => {
2446
- s(null), a(f);
2447
- }, c.reject = (f) => {
2448
- s(null), o(f);
2450
+ c.resolve = (w) => {
2451
+ s(null), a(w);
2452
+ }, c.reject = (w) => {
2453
+ s(null), o(w);
2449
2454
  };
2450
2455
  });
2451
2456
  },
@@ -2454,7 +2459,7 @@ function Ft({ children: e }, n) {
2454
2459
  }
2455
2460
  }),
2456
2461
  []
2457
- ), /* @__PURE__ */ R(_, { children: [
2462
+ ), /* @__PURE__ */ $(_, { children: [
2458
2463
  e,
2459
2464
  t && /* @__PURE__ */ l(
2460
2465
  Lt,
@@ -2471,7 +2476,7 @@ function Ft({ children: e }, n) {
2471
2476
  }
2472
2477
  const Ht = Qe(Ft);
2473
2478
  function fn(e) {
2474
- let { children: n } = e, t = S();
2479
+ let { children: n } = e, t = C();
2475
2480
  const s = A(() => ({
2476
2481
  showNotice: (r) => t.current.showNotice(r),
2477
2482
  showModal: (r) => t.current.showModal(r)
@@ -2489,7 +2494,7 @@ function Se({
2489
2494
  width: c = ""
2490
2495
  }) {
2491
2496
  const a = A(() => u === void 0 ? oe() : u, [u]), o = { ...c && { width: c } };
2492
- return /* @__PURE__ */ l(ue.Provider, { value: a, children: /* @__PURE__ */ R(
2497
+ return /* @__PURE__ */ l(ue.Provider, { value: a, children: /* @__PURE__ */ $(
2493
2498
  "div",
2494
2499
  {
2495
2500
  style: o,
@@ -2512,11 +2517,11 @@ const Pt = ({
2512
2517
  css: c = "",
2513
2518
  text: a = "",
2514
2519
  textActive: o = "",
2515
- children: f,
2520
+ children: w,
2516
2521
  active: d,
2517
2522
  onChange: p
2518
2523
  }) => {
2519
- const [v, x] = J(e), w = A(() => (v ? "pressed" : "") + (n ? " " + n : ""), [v, n]), h = D(
2524
+ const [v, x] = J(e), f = A(() => (v ? "pressed" : "") + (n ? " " + n : ""), [v, n]), h = D(
2520
2525
  (m) => {
2521
2526
  let g = !v;
2522
2527
  u && u(m), m.defaultPrevented || (x(g), p && p({ value: g }));
@@ -2529,23 +2534,23 @@ const Pt = ({
2529
2534
  title: i,
2530
2535
  text: v && o || a,
2531
2536
  css: c,
2532
- type: w,
2537
+ type: f,
2533
2538
  icon: v && r || t,
2534
2539
  onClick: h,
2535
2540
  disabled: s,
2536
2541
  children: ae(d, { value: v })
2537
2542
  }
2538
- ) : f ? /* @__PURE__ */ l(
2543
+ ) : w ? /* @__PURE__ */ l(
2539
2544
  re,
2540
2545
  {
2541
2546
  title: i,
2542
2547
  text: v && o || a,
2543
2548
  css: c,
2544
- type: w,
2549
+ type: f,
2545
2550
  icon: v && r || t,
2546
2551
  onClick: h,
2547
2552
  disabled: s,
2548
- children: f
2553
+ children: w
2549
2554
  }
2550
2555
  ) : /* @__PURE__ */ l(
2551
2556
  re,
@@ -2553,7 +2558,7 @@ const Pt = ({
2553
2558
  title: i,
2554
2559
  text: v && o || a,
2555
2560
  css: c,
2556
- type: w,
2561
+ type: f,
2557
2562
  icon: v && r || t,
2558
2563
  onClick: h,
2559
2564
  disabled: s
@@ -2571,39 +2576,39 @@ function wn({
2571
2576
  onChange: c,
2572
2577
  dropdown: a
2573
2578
  }) {
2574
- let [o, f] = J(e);
2575
- const { calendar: d, formats: p } = (K(q) || X()).getRaw(), v = d.clockFormat == 12, x = 23, w = 59, h = A(() => {
2576
- const y = i || p?.timeFormat;
2577
- return typeof y == "function" ? y : ne(y, d);
2578
- }, [i, p, d]), m = A(() => h(new Date(0, 0, 0, 1)).indexOf("01") != -1, [h]), g = (y, E) => (y < 10 && E ? `0${y}` : `${y}`).slice(-2), T = (y) => g(y, !0), b = (y) => `${y}`.replace(/[^\d]/g, "") || 0, N = (y) => v && (y = y % 12, y === 0) ? "12" : g(y, m), k = D((y, E) => (y = b(y), Math.min(y, E)), []), [M, $] = B(null), V = o || Le, F = k(V.getHours(), x), j = k(V.getMinutes(), w), H = F > 12, L = N(F), P = T(j), C = A(
2579
+ let [o, w] = J(e);
2580
+ const { calendar: d, formats: p } = (K(q) || X()).getRaw(), v = d.clockFormat == 12, x = 23, f = 59, h = A(() => {
2581
+ const k = i || p?.timeFormat;
2582
+ return typeof k == "function" ? k : ne(k, d);
2583
+ }, [i, p, d]), m = A(() => h(new Date(0, 0, 0, 1)).indexOf("01") != -1, [h]), g = (k, W) => (k < 10 && W ? `0${k}` : `${k}`).slice(-2), V = (k) => g(k, !0), b = (k) => `${k}`.replace(/[^\d]/g, "") || 0, y = (k) => v && (k = k % 12, k === 0) ? "12" : g(k, m), N = D((k, W) => (k = b(k), Math.min(k, W)), []), [M, T] = B(null), R = o || Le, F = N(R.getHours(), x), j = N(R.getMinutes(), f), H = F > 12, L = y(F), P = V(j), S = A(
2579
2584
  () => h(new Date(0, 0, 0, F, j)),
2580
2585
  [F, j, h]
2581
2586
  ), O = D(() => {
2582
- $(!0);
2587
+ T(!0);
2583
2588
  }, []), U = D(() => {
2584
- const y = new Date(V);
2585
- y.setHours(y.getHours() + (H ? -12 : 12)), f(y), c && c({ value: y });
2586
- }, [V, H, c]), Y = D(
2587
- ({ value: y }) => {
2588
- if (V.getHours() === y) return;
2589
- const E = new Date(V);
2590
- E.setHours(y), f(E), c && c({ value: E });
2589
+ const k = new Date(R);
2590
+ k.setHours(k.getHours() + (H ? -12 : 12)), w(k), c && c({ value: k });
2591
+ }, [R, H, c]), Y = D(
2592
+ ({ value: k }) => {
2593
+ if (R.getHours() === k) return;
2594
+ const W = new Date(R);
2595
+ W.setHours(k), w(W), c && c({ value: W });
2591
2596
  },
2592
- [V, c]
2597
+ [R, c]
2593
2598
  ), I = D(
2594
- ({ value: y }) => {
2595
- if (V.getMinutes() === y) return;
2596
- const E = new Date(V);
2597
- E.setMinutes(y), f(E), c && c({ value: E });
2599
+ ({ value: k }) => {
2600
+ if (R.getMinutes() === k) return;
2601
+ const W = new Date(R);
2602
+ W.setMinutes(k), w(W), c && c({ value: W });
2598
2603
  },
2599
- [V, c]
2604
+ [R, c]
2600
2605
  ), G = D(
2601
- (y) => (y = k(y, x), v && (y = y * 1, y === 12 && (y = 0), H && (y += 12)), y),
2602
- [k, v, H]
2606
+ (k) => (k = N(k, x), v && (k = k * 1, k === 12 && (k = 0), H && (k += 12)), k),
2607
+ [N, v, H]
2603
2608
  ), Q = D(() => {
2604
- $(null);
2609
+ T(null);
2605
2610
  }, []);
2606
- return /* @__PURE__ */ R(
2611
+ return /* @__PURE__ */ $(
2607
2612
  "div",
2608
2613
  {
2609
2614
  className: `wx-7f497i wx-timepicker ${u ? "wx-7f497i wx-error" : ""} ${r ? "wx-7f497i wx-disabled" : ""}`,
@@ -2616,7 +2621,7 @@ function wn({
2616
2621
  id: n,
2617
2622
  css: s,
2618
2623
  title: t,
2619
- value: C,
2624
+ value: S,
2620
2625
  readonly: !0,
2621
2626
  disabled: r,
2622
2627
  error: u,
@@ -2628,16 +2633,16 @@ function wn({
2628
2633
  }
2629
2634
  }
2630
2635
  ),
2631
- M && !r && /* @__PURE__ */ l(le, { onCancel: Q, ...ye(a), children: /* @__PURE__ */ R("div", { className: "wx-7f497i wx-wrapper", children: [
2632
- /* @__PURE__ */ R("div", { className: "wx-7f497i wx-timer", children: [
2636
+ M && !r && /* @__PURE__ */ l(le, { onCancel: Q, ...ye(a), children: /* @__PURE__ */ $("div", { className: "wx-7f497i wx-wrapper", children: [
2637
+ /* @__PURE__ */ $("div", { className: "wx-7f497i wx-timer", children: [
2633
2638
  /* @__PURE__ */ l(
2634
2639
  "input",
2635
2640
  {
2636
2641
  className: "wx-7f497i wx-digit",
2637
2642
  value: L,
2638
- onChange: (y) => {
2639
- const E = G(y.target.value);
2640
- Y({ value: E });
2643
+ onChange: (k) => {
2644
+ const W = G(k.target.value);
2645
+ Y({ value: W });
2641
2646
  }
2642
2647
  }
2643
2648
  ),
@@ -2647,9 +2652,9 @@ function wn({
2647
2652
  {
2648
2653
  className: "wx-7f497i wx-digit",
2649
2654
  value: P,
2650
- onChange: (y) => {
2651
- const E = k(y.target.value, w);
2652
- I({ value: E });
2655
+ onChange: (k) => {
2656
+ const W = N(k.target.value, f);
2657
+ I({ value: W });
2653
2658
  }
2654
2659
  }
2655
2660
  ),
@@ -2680,7 +2685,7 @@ function wn({
2680
2685
  value: j,
2681
2686
  width: "unset",
2682
2687
  onChange: I,
2683
- max: w
2688
+ max: f
2684
2689
  }
2685
2690
  ) })
2686
2691
  ] }) })
@@ -2692,8 +2697,8 @@ function xn({ children: e }) {
2692
2697
  return /* @__PURE__ */ l("div", { className: "wx-KgpO9N wx-modal", children: /* @__PURE__ */ l("div", { className: "wx-KgpO9N wx-window", children: e }) });
2693
2698
  }
2694
2699
  function mn({ position: e = "right", children: n, onCancel: t }) {
2695
- const s = S(null);
2696
- return W(() => ve(s.current, t).destroy, []), /* @__PURE__ */ l("div", { ref: s, className: `wx-2L733M wx-sidearea wx-pos-${e}`, children: n });
2700
+ const s = C(null);
2701
+ return E(() => ve(s.current, t).destroy, []), /* @__PURE__ */ l("div", { ref: s, className: `wx-2L733M wx-sidearea wx-pos-${e}`, children: n });
2697
2702
  }
2698
2703
  const Fe = "#dfe2e6", He = "#2c2f3c", At = 0.75;
2699
2704
  function Pe(e) {
@@ -2708,23 +2713,23 @@ function Bt(e) {
2708
2713
  return 0.299 * t + 0.587 * s + 0.114 * r > 0.5 ? He : "#ffffff";
2709
2714
  }
2710
2715
  function hn(e) {
2711
- const { value: n, size: t = 32, limit: s } = e, r = S(null), [u, i] = B(null), c = A(() => n ? Array.isArray(n) ? n : [n] : [], [n]), a = A(() => {
2716
+ const { value: n, size: t = 32, limit: s } = e, r = C(null), [u, i] = B(null), c = A(() => n ? Array.isArray(n) ? n : [n] : [], [n]), a = A(() => {
2712
2717
  if (u == null || u <= 0)
2713
2718
  return null;
2714
- const w = 1 + (u / t - 1) / At;
2715
- return Math.max(1, Math.floor(w));
2719
+ const f = 1 + (u / t - 1) / At;
2720
+ return Math.max(1, Math.floor(f));
2716
2721
  }, [u, t]), o = A(() => {
2717
- const w = s != null ? Math.min(c.length, s) : c.length;
2718
- return a != null ? Math.min(w, a) : w;
2719
- }, [c, s, a]), f = A(() => c.slice(0, o), [c, o]), d = A(() => Math.max(0, c.length - o), [c, o]);
2720
- W(() => {
2721
- const w = r.current;
2722
- if (!w) return;
2722
+ const f = s != null ? Math.min(c.length, s) : c.length;
2723
+ return a != null ? Math.min(f, a) : f;
2724
+ }, [c, s, a]), w = A(() => c.slice(0, o), [c, o]), d = A(() => Math.max(0, c.length - o), [c, o]);
2725
+ E(() => {
2726
+ const f = r.current;
2727
+ if (!f) return;
2723
2728
  const h = new ResizeObserver((m) => {
2724
2729
  const g = m[0];
2725
2730
  g && i(g.contentRect.width);
2726
2731
  });
2727
- return h.observe(w), () => h.disconnect();
2732
+ return h.observe(f), () => h.disconnect();
2728
2733
  }, []);
2729
2734
  const p = Math.round(t * 0.4), v = {
2730
2735
  width: t + "px",
@@ -2733,29 +2738,29 @@ function hn(e) {
2733
2738
  minHeight: t + "px",
2734
2739
  fontSize: p + "px"
2735
2740
  };
2736
- function x(w, h) {
2737
- const m = h === 0 ? "0" : `${t * -0.25}px`, g = w.avatar ? "transparent" : w.color || Fe, T = w.avatar ? "transparent" : Bt(w.color || Fe);
2738
- return { marginLeft: m, backgroundColor: g, color: T };
2741
+ function x(f, h) {
2742
+ const m = h === 0 ? "0" : `${t * -0.25}px`, g = f.avatar ? "transparent" : f.color || Fe, V = f.avatar ? "transparent" : Bt(f.color || Fe);
2743
+ return { marginLeft: m, backgroundColor: g, color: V };
2739
2744
  }
2740
- return /* @__PURE__ */ l("div", { className: "wx-avatar-root wx-aadkRiRf", ref: r, children: f.length > 0 && /* @__PURE__ */ l("div", { className: "wx-avatar-stack wx-aadkRiRf", children: f.map((w, h) => /* @__PURE__ */ R(
2745
+ return /* @__PURE__ */ l("div", { className: "wx-avatar-root wx-aadkRiRf", ref: r, children: w.length > 0 && /* @__PURE__ */ l("div", { className: "wx-avatar-stack wx-aadkRiRf", children: w.map((f, h) => /* @__PURE__ */ $(
2741
2746
  "div",
2742
2747
  {
2743
2748
  className: [
2744
2749
  "wx-avatar",
2745
2750
  "wx-avatar-item",
2746
- h === f.length - 1 && d > 0 ? "wx-avatar-overflow" : "",
2751
+ h === w.length - 1 && d > 0 ? "wx-avatar-overflow" : "",
2747
2752
  "wx-aadkRiRf"
2748
2753
  ].filter(Boolean).join(" "),
2749
- style: { ...v, ...x(w, h) },
2754
+ style: { ...v, ...x(f, h) },
2750
2755
  children: [
2751
- w.avatar ? /* @__PURE__ */ l("img", { src: w.avatar, alt: "", loading: "lazy" }) : Pe(w.name) ? /* @__PURE__ */ l("span", { className: "wx-aadkRiRf", children: Pe(w.name) }) : null,
2752
- h === f.length - 1 && d > 0 && /* @__PURE__ */ R("span", { className: "wx-avatar-overflow-badge wx-aadkRiRf", children: [
2756
+ f.avatar ? /* @__PURE__ */ l("img", { src: f.avatar, alt: "", loading: "lazy" }) : Pe(f.name) ? /* @__PURE__ */ l("span", { className: "wx-aadkRiRf", children: Pe(f.name) }) : null,
2757
+ h === w.length - 1 && d > 0 && /* @__PURE__ */ $("span", { className: "wx-avatar-overflow-badge wx-aadkRiRf", children: [
2753
2758
  "+",
2754
2759
  d
2755
2760
  ] })
2756
2761
  ]
2757
2762
  },
2758
- w.id
2763
+ f.id
2759
2764
  )) }) });
2760
2765
  }
2761
2766
  function Et() {
@@ -2763,9 +2768,9 @@ function Et() {
2763
2768
  }
2764
2769
  function pn(e) {
2765
2770
  const { fonts: n = !0, children: t } = e;
2766
- return /* @__PURE__ */ l(ie.Provider, { value: "material", children: /* @__PURE__ */ R(_, { children: [
2771
+ return /* @__PURE__ */ l(ie.Provider, { value: "material", children: /* @__PURE__ */ $(_, { children: [
2767
2772
  t && /* @__PURE__ */ l("div", { className: "wx-theme wx-material-theme", children: t }),
2768
- n && /* @__PURE__ */ R(_, { children: [
2773
+ n && /* @__PURE__ */ $(_, { children: [
2769
2774
  /* @__PURE__ */ l(
2770
2775
  "link",
2771
2776
  {
@@ -2790,9 +2795,9 @@ function Je() {
2790
2795
  }
2791
2796
  function vn(e) {
2792
2797
  const { fonts: n = !0, children: t } = e;
2793
- return /* @__PURE__ */ l(ie.Provider, { value: "willow", children: /* @__PURE__ */ R(_, { children: [
2798
+ return /* @__PURE__ */ l(ie.Provider, { value: "willow", children: /* @__PURE__ */ $(_, { children: [
2794
2799
  t && t && /* @__PURE__ */ l("div", { className: "wx-theme wx-willow-theme", children: t }),
2795
- n && /* @__PURE__ */ R(_, { children: [
2800
+ n && /* @__PURE__ */ $(_, { children: [
2796
2801
  /* @__PURE__ */ l(
2797
2802
  "link",
2798
2803
  {
@@ -2814,9 +2819,9 @@ function vn(e) {
2814
2819
  }
2815
2820
  function gn(e) {
2816
2821
  const { fonts: n = !0, children: t } = e;
2817
- return /* @__PURE__ */ l(ie.Provider, { value: "willow-dark", children: /* @__PURE__ */ R(_, { children: [
2822
+ return /* @__PURE__ */ l(ie.Provider, { value: "willow-dark", children: /* @__PURE__ */ $(_, { children: [
2818
2823
  t && t && /* @__PURE__ */ l("div", { className: "wx-theme wx-willow-dark-theme", children: t }),
2819
- n && /* @__PURE__ */ R(_, { children: [
2824
+ n && /* @__PURE__ */ $(_, { children: [
2820
2825
  /* @__PURE__ */ l(
2821
2826
  "link",
2822
2827
  {
@@ -2870,7 +2875,7 @@ export {
2870
2875
  nt as Portal,
2871
2876
  It as RadioButton,
2872
2877
  ln as RadioButtonGroup,
2873
- Rt as RangeCalendar,
2878
+ Tt as RangeCalendar,
2874
2879
  cn as RichSelect,
2875
2880
  sn as Segmented,
2876
2881
  an as Select,