@max-ts/components 1.4.5 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.mjs +520 -524
  2. package/package.json +1 -1
package/lib/index.mjs CHANGED
@@ -68,28 +68,28 @@ function Kl() {
68
68
  return "Suspense";
69
69
  case M:
70
70
  return "SuspenseList";
71
- case j:
71
+ case T:
72
72
  return "Activity";
73
73
  }
74
74
  if (typeof E == "object")
75
75
  switch (typeof E.tag == "number" && console.error(
76
76
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
77
77
  ), E.$$typeof) {
78
- case w:
78
+ case x:
79
79
  return "Portal";
80
80
  case S:
81
81
  return (E.displayName || "Context") + ".Provider";
82
82
  case m:
83
83
  return (E._context.displayName || "Context") + ".Consumer";
84
84
  case A:
85
- var F = E.render;
86
- return E = E.displayName, E || (E = F.displayName || F.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
85
+ var _ = E.render;
86
+ return E = E.displayName, E || (E = _.displayName || _.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
87
87
  case C:
88
- return F = E.displayName || null, F !== null ? F : e(E.type) || "Memo";
89
- case T:
90
- F = E._payload, E = E._init;
88
+ return _ = E.displayName || null, _ !== null ? _ : e(E.type) || "Memo";
89
+ case j:
90
+ _ = E._payload, E = E._init;
91
91
  try {
92
- return e(E(F));
92
+ return e(E(_));
93
93
  } catch {
94
94
  }
95
95
  }
@@ -101,15 +101,15 @@ function Kl() {
101
101
  function n(E) {
102
102
  try {
103
103
  t(E);
104
- var F = !1;
104
+ var _ = !1;
105
105
  } catch {
106
- F = !0;
106
+ _ = !0;
107
107
  }
108
- if (F) {
109
- F = console;
110
- var H = F.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
108
+ if (_) {
109
+ _ = console;
110
+ var H = _.error, G = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
111
111
  return H.call(
112
- F,
112
+ _,
113
113
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
114
114
  G
115
115
  ), t(E);
@@ -117,11 +117,11 @@ function Kl() {
117
117
  }
118
118
  function r(E) {
119
119
  if (E === $) return "<>";
120
- if (typeof E == "object" && E !== null && E.$$typeof === T)
120
+ if (typeof E == "object" && E !== null && E.$$typeof === j)
121
121
  return "<...>";
122
122
  try {
123
- var F = e(E);
124
- return F ? "<" + F + ">" : "<...>";
123
+ var _ = e(E);
124
+ return _ ? "<" + _ + ">" : "<...>";
125
125
  } catch {
126
126
  return "<...>";
127
127
  }
@@ -134,17 +134,17 @@ function Kl() {
134
134
  return Error("react-stack-top-frame");
135
135
  }
136
136
  function i(E) {
137
- if (_.call(E, "key")) {
138
- var F = Object.getOwnPropertyDescriptor(E, "key").get;
139
- if (F && F.isReactWarning) return !1;
137
+ if (N.call(E, "key")) {
138
+ var _ = Object.getOwnPropertyDescriptor(E, "key").get;
139
+ if (_ && _.isReactWarning) return !1;
140
140
  }
141
141
  return E.key !== void 0;
142
142
  }
143
- function s(E, F) {
143
+ function s(E, _) {
144
144
  function H() {
145
145
  Y || (Y = !0, console.error(
146
146
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
147
- F
147
+ _
148
148
  ));
149
149
  }
150
150
  H.isReactWarning = !0, Object.defineProperty(E, "key", {
@@ -158,11 +158,11 @@ function Kl() {
158
158
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
159
159
  )), E = this.props.ref, E !== void 0 ? E : null;
160
160
  }
161
- function d(E, F, H, G, le, se, re, we) {
161
+ function d(E, _, H, G, le, se, re, we) {
162
162
  return H = se.ref, E = {
163
163
  $$typeof: b,
164
164
  type: E,
165
- key: F,
165
+ key: _,
166
166
  props: se,
167
167
  _owner: le
168
168
  }, (H !== void 0 ? H : null) !== null ? Object.defineProperty(E, "ref", {
@@ -190,8 +190,8 @@ function Kl() {
190
190
  value: we
191
191
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
192
192
  }
193
- function f(E, F, H, G, le, se, re, we) {
194
- var ae = F.children;
193
+ function f(E, _, H, G, le, se, re, we) {
194
+ var ae = _.children;
195
195
  if (ae !== void 0)
196
196
  if (G)
197
197
  if (W(ae)) {
@@ -203,9 +203,9 @@ function Kl() {
203
203
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
204
204
  );
205
205
  else u(ae);
206
- if (_.call(F, "key")) {
206
+ if (N.call(_, "key")) {
207
207
  ae = e(E);
208
- var Se = Object.keys(F).filter(function(Ue) {
208
+ var Se = Object.keys(_).filter(function(Ue) {
209
209
  return Ue !== "key";
210
210
  });
211
211
  G = 0 < Se.length ? "{key: someKey, " + Se.join(": ..., ") + ": ...}" : "{key: someKey}", te[ae + G] || (Se = 0 < Se.length ? "{" + Se.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -221,11 +221,11 @@ React keys must be passed directly to JSX without using spread:
221
221
  ae
222
222
  ), te[ae + G] = !0);
223
223
  }
224
- if (ae = null, H !== void 0 && (n(H), ae = "" + H), i(F) && (n(F.key), ae = "" + F.key), "key" in F) {
224
+ if (ae = null, H !== void 0 && (n(H), ae = "" + H), i(_) && (n(_.key), ae = "" + _.key), "key" in _) {
225
225
  H = {};
226
- for (var Ee in F)
227
- Ee !== "key" && (H[Ee] = F[Ee]);
228
- } else H = F;
226
+ for (var Ee in _)
227
+ Ee !== "key" && (H[Ee] = _[Ee]);
228
+ } else H = _;
229
229
  return ae && s(
230
230
  H,
231
231
  typeof E == "function" ? E.displayName || E.name || "Unknown" : E
@@ -243,7 +243,7 @@ React keys must be passed directly to JSX without using spread:
243
243
  function u(E) {
244
244
  typeof E == "object" && E !== null && E.$$typeof === b && E._store && (E._store.validated = 1);
245
245
  }
246
- var p = g, b = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), S = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), B = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, W = Array.isArray, U = console.createTask ? console.createTask : function() {
246
+ var p = g, b = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), S = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), T = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), B = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, N = Object.prototype.hasOwnProperty, W = Array.isArray, U = console.createTask ? console.createTask : function() {
247
247
  return null;
248
248
  };
249
249
  p = {
@@ -255,11 +255,11 @@ React keys must be passed directly to JSX without using spread:
255
255
  p,
256
256
  a
257
257
  )(), oe = U(r(a)), te = {};
258
- ln.Fragment = $, ln.jsx = function(E, F, H, G, le) {
258
+ ln.Fragment = $, ln.jsx = function(E, _, H, G, le) {
259
259
  var se = 1e4 > B.recentlyCreatedOwnerStacks++;
260
260
  return f(
261
261
  E,
262
- F,
262
+ _,
263
263
  H,
264
264
  !1,
265
265
  G,
@@ -267,11 +267,11 @@ React keys must be passed directly to JSX without using spread:
267
267
  se ? Error("react-stack-top-frame") : Z,
268
268
  se ? U(r(E)) : oe
269
269
  );
270
- }, ln.jsxs = function(E, F, H, G, le) {
270
+ }, ln.jsxs = function(E, _, H, G, le) {
271
271
  var se = 1e4 > B.recentlyCreatedOwnerStacks++;
272
272
  return f(
273
273
  E,
274
- F,
274
+ _,
275
275
  H,
276
276
  !0,
277
277
  G,
@@ -1684,8 +1684,8 @@ const eu = ({
1684
1684
  if (c)
1685
1685
  r?.(!n, b);
1686
1686
  else {
1687
- const w = !i;
1688
- s(w), r?.(w, b);
1687
+ const x = !i;
1688
+ s(x), r?.(x, b);
1689
1689
  }
1690
1690
  }, p = typeof e == "string" ? au : Es;
1691
1691
  return /* @__PURE__ */ l.jsxs("div", { ref: a, children: [
@@ -1711,19 +1711,19 @@ const eu = ({
1711
1711
  isDisabled: r
1712
1712
  }) => {
1713
1713
  if ("actions" in e) {
1714
- const { icon: b, disabled: w, disabledReason: $, name: k, actions: v } = e;
1714
+ const { icon: b, disabled: x, disabledReason: $, name: k, actions: v } = e;
1715
1715
  return /* @__PURE__ */ l.jsx(
1716
1716
  Te,
1717
1717
  {
1718
1718
  title: $ || k,
1719
1719
  placement: n,
1720
- withoutContainer: !(r || w),
1720
+ withoutContainer: !(r || x),
1721
1721
  children: /* @__PURE__ */ l.jsx(
1722
1722
  Dn,
1723
1723
  {
1724
1724
  icon: b,
1725
1725
  variant: "text",
1726
- disabled: r || w,
1726
+ disabled: r || x,
1727
1727
  children: v.map(
1728
1728
  ({ name: m, onClick: S, ...A }) => /* @__PURE__ */ At(
1729
1729
  st,
@@ -2111,7 +2111,7 @@ const yu = y(
2111
2111
  isNested: u,
2112
2112
  actions: p,
2113
2113
  disabled: b,
2114
- disabledReason: w,
2114
+ disabledReason: x,
2115
2115
  note: $,
2116
2116
  isBlockingOperation: k,
2117
2117
  ...v
@@ -2119,7 +2119,7 @@ const yu = y(
2119
2119
  return /* @__PURE__ */ l.jsx(
2120
2120
  Te,
2121
2121
  {
2122
- title: b ? w : $,
2122
+ title: b ? x : $,
2123
2123
  withoutContainer: !(t || b),
2124
2124
  children: /* @__PURE__ */ l.jsx(
2125
2125
  Cu,
@@ -2279,13 +2279,13 @@ const yu = y(
2279
2279
  ...i
2280
2280
  }) => {
2281
2281
  const { severity: s = "info", slots: c, ...d } = i, f = (u) => {
2282
- const { variant: p, color: b, ...w } = u;
2282
+ const { variant: p, color: b, ...x } = u;
2283
2283
  return /* @__PURE__ */ l.jsx(
2284
2284
  Pu,
2285
2285
  {
2286
2286
  variant: "text",
2287
2287
  color: "primary",
2288
- ...w
2288
+ ...x
2289
2289
  }
2290
2290
  );
2291
2291
  };
@@ -2760,7 +2760,7 @@ const Iu = {
2760
2760
  return /* @__PURE__ */ l.jsx(Ar, { error: !0, children: n });
2761
2761
  if (n)
2762
2762
  return n;
2763
- }, [n, e, t]), w = ($) => {
2763
+ }, [n, e, t]), x = ($) => {
2764
2764
  if (d) {
2765
2765
  const k = $.target.value?.trim();
2766
2766
  u.onChange?.({
@@ -2787,7 +2787,7 @@ const Iu = {
2787
2787
  maxLength: c,
2788
2788
  ...i
2789
2789
  },
2790
- onBlur: w,
2790
+ onBlur: x,
2791
2791
  ...u
2792
2792
  }
2793
2793
  );
@@ -2809,7 +2809,7 @@ const Iu = {
2809
2809
  noOptionsText: c = "Нет данных",
2810
2810
  onInputChange: d
2811
2811
  }) => {
2812
- const [f, u] = ge(""), p = Zu(e), b = f.length >= 1, w = o.length > 0, $ = b || w || a || i, k = be(
2812
+ const [f, u] = ge(""), p = Zu(e), b = f.length >= 1, x = o.length > 0, $ = b || x || a || i, k = be(
2813
2813
  (m, S) => t ? t(m, S) : JSON.stringify(m) === JSON.stringify(S),
2814
2814
  [t]
2815
2815
  );
@@ -2837,7 +2837,7 @@ const Iu = {
2837
2837
  multiple: u,
2838
2838
  size: p = "medium",
2839
2839
  placeholder: b = Xu,
2840
- overflowOption: w,
2840
+ overflowOption: x,
2841
2841
  closeText: $ = "Закрыть",
2842
2842
  openText: k = "Открыть",
2843
2843
  clearText: v = "Очистить",
@@ -2847,8 +2847,8 @@ const Iu = {
2847
2847
  noOptionsText: O,
2848
2848
  autoHighlight: M,
2849
2849
  renderInput: C,
2850
- renderTags: T,
2851
- renderOption: j,
2850
+ renderTags: j,
2851
+ renderOption: T,
2852
2852
  ...V
2853
2853
  } = e, B = be(
2854
2854
  (Y) => {
@@ -2877,10 +2877,10 @@ const Iu = {
2877
2877
  d,
2878
2878
  p
2879
2879
  ]
2880
- ), _ = be(
2880
+ ), N = be(
2881
2881
  (Y, L, Z, oe) => {
2882
- if (j)
2883
- return j(
2882
+ if (T)
2883
+ return T(
2884
2884
  Y,
2885
2885
  L,
2886
2886
  Z,
@@ -2891,14 +2891,14 @@ const Iu = {
2891
2891
  Nt,
2892
2892
  {
2893
2893
  rowsCount: qu,
2894
- ...w,
2894
+ ...x,
2895
2895
  children: Y.key
2896
2896
  }
2897
2897
  ));
2898
2898
  },
2899
- [u, w, j]
2899
+ [u, x, T]
2900
2900
  ), W = be(
2901
- (Y, L, Z) => T ? T(Y, L, Z) : Y.map((oe, te) => {
2901
+ (Y, L, Z) => j ? j(Y, L, Z) : Y.map((oe, te) => {
2902
2902
  const E = c?.(oe) || "";
2903
2903
  return /* @__PURE__ */ At(
2904
2904
  no,
@@ -2911,7 +2911,7 @@ const Iu = {
2911
2911
  }
2912
2912
  );
2913
2913
  }),
2914
- [c, T]
2914
+ [c, j]
2915
2915
  ), U = be(
2916
2916
  (Y) => n ? /* @__PURE__ */ l.jsx(ul, { ...Y }) : null,
2917
2917
  [n]
@@ -2939,7 +2939,7 @@ const Iu = {
2939
2939
  getOptionLabel: c,
2940
2940
  renderInput: B,
2941
2941
  renderTags: W,
2942
- renderOption: _,
2942
+ renderOption: N,
2943
2943
  ...r
2944
2944
  }
2945
2945
  );
@@ -2953,14 +2953,14 @@ const Iu = {
2953
2953
  onOpen: i,
2954
2954
  onInputChange: s
2955
2955
  }) => {
2956
- const [c, d] = ge(!1), [f, u] = ge(!0), [p, b] = ge(!0), w = Le(null), [$, k] = ge([]), v = be(
2956
+ const [c, d] = ge(!1), [f, u] = ge(!0), [p, b] = ge(!0), x = Le(null), [$, k] = ge([]), v = be(
2957
2957
  Ra((O) => {
2958
- w.current?.abort();
2958
+ x.current?.abort();
2959
2959
  const M = new AbortController();
2960
- w.current = M, e(O, M?.signal).then((C) => {
2960
+ x.current = M, e(O, M?.signal).then((C) => {
2961
2961
  k(C), b(C.length === 0);
2962
2962
  }).finally(() => {
2963
- d(!1), w.current = null;
2963
+ d(!1), x.current = null;
2964
2964
  });
2965
2965
  }, t),
2966
2966
  [e, t, a]
@@ -2999,7 +2999,7 @@ const Iu = {
2999
2999
  isSuccess: u,
3000
3000
  isError: p,
3001
3001
  isLoading: b,
3002
- isFullWidth: w,
3002
+ isFullWidth: x,
3003
3003
  onOpen: $,
3004
3004
  noOptionsText: k,
3005
3005
  onInputChange: v,
@@ -3010,7 +3010,7 @@ const Iu = {
3010
3010
  {
3011
3011
  options: t,
3012
3012
  disabled: d,
3013
- fullWidth: w,
3013
+ fullWidth: x,
3014
3014
  loading: b || n,
3015
3015
  onOpen: r,
3016
3016
  error: p,
@@ -3346,12 +3346,12 @@ const Iu = {
3346
3346
  text: u,
3347
3347
  variant: p,
3348
3348
  onClick: b,
3349
- ...w
3349
+ ...x
3350
3350
  } = i.cancel || {};
3351
3351
  return /* @__PURE__ */ l.jsxs(Sd, { title: o, open: r, onClose: s, ...c, children: [
3352
3352
  a && /* @__PURE__ */ l.jsx(Od, { children: /* @__PURE__ */ l.jsx(jd, { children: a }) }),
3353
3353
  /* @__PURE__ */ l.jsxs(Md, { children: [
3354
- t && /* @__PURE__ */ l.jsx(Td, { ...w, ...n, children: u }),
3354
+ t && /* @__PURE__ */ l.jsx(Td, { ...x, ...n, children: u }),
3355
3355
  /* @__PURE__ */ l.jsx(Fe, { ...f, children: d })
3356
3356
  ] })
3357
3357
  ] });
@@ -3590,12 +3590,12 @@ const qd = y("div")`
3590
3590
  errorList: u,
3591
3591
  onRetry: p,
3592
3592
  actions: b = /* @__PURE__ */ l.jsx(Fe, { onClick: p, children: "Попробовать снова" })
3593
- } = r, w = u.map(($) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: $ }, $));
3593
+ } = r, x = u.map(($) => /* @__PURE__ */ l.jsx(ye, { component: "p", children: $ }, $));
3594
3594
  return /* @__PURE__ */ l.jsx(
3595
3595
  vn,
3596
3596
  {
3597
3597
  title: c,
3598
- description: w,
3598
+ description: x,
3599
3599
  imgAlt: d,
3600
3600
  imgSrc: f,
3601
3601
  Actions: b
@@ -3832,7 +3832,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3832
3832
  onSelectRow: s,
3833
3833
  onRowClick: c
3834
3834
  }) => {
3835
- const [d, f] = ge(!1), u = n[e], { isDisabled: p, disabledReason: b } = o || {}, w = a && !!i?.find((S) => S[e] === u);
3835
+ const [d, f] = ge(!1), u = n[e], { isDisabled: p, disabledReason: b } = o || {}, x = a && !!i?.find((S) => S[e] === u);
3836
3836
  return {
3837
3837
  rowId: u,
3838
3838
  disabled: p,
@@ -3858,7 +3858,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3858
3858
  onClose: () => f(!1)
3859
3859
  },
3860
3860
  checkboxProps: {
3861
- checked: w,
3861
+ checked: x,
3862
3862
  disabled: p,
3863
3863
  onChange: s(n)
3864
3864
  }
@@ -3873,7 +3873,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3873
3873
  columns: u,
3874
3874
  emptyCellValue: p,
3875
3875
  selectedRows: b,
3876
- activeRowId: w,
3876
+ activeRowId: x,
3877
3877
  keyId: $,
3878
3878
  onSelectRow: k,
3879
3879
  onRowClick: v,
@@ -3889,19 +3889,19 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3889
3889
  }
3890
3890
  ), M = be(() => {
3891
3891
  const C = S ? void 0 : [u.length - 1];
3892
- return u?.map((T, j) => {
3893
- const V = `${t}-${j}`, B = wf(
3892
+ return u?.map((j, T) => {
3893
+ const V = `${t}-${T}`, B = wf(
3894
3894
  a,
3895
3895
  C,
3896
- j
3897
- ), _ = !j;
3896
+ T
3897
+ ), N = !T;
3898
3898
  return /* @__PURE__ */ l.jsx(
3899
3899
  mf,
3900
3900
  {
3901
3901
  row: s,
3902
- cell: T,
3902
+ cell: j,
3903
3903
  emptyCellValue: p,
3904
- startAdornment: _ && O(),
3904
+ startAdornment: N && O(),
3905
3905
  isDisabled: B
3906
3906
  },
3907
3907
  V
@@ -3953,7 +3953,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3953
3953
  noDataPlaceholder: u,
3954
3954
  onRetry: p,
3955
3955
  ...b
3956
- } = e, w = Re(() => o.map(({ children: $, options: k, ...v }) => {
3956
+ } = e, x = Re(() => o.map(({ children: $, options: k, ...v }) => {
3957
3957
  const m = v[f];
3958
3958
  return /* @__PURE__ */ l.jsx(
3959
3959
  kf,
@@ -3977,7 +3977,7 @@ const ir = () => tt(ai), si = 44, li = 36, ff = 10, Ro = "start", pf = {
3977
3977
  imgSrc: t.defaultErrorImgSrc,
3978
3978
  onRetry: p
3979
3979
  },
3980
- children: o.length ? w : u
3980
+ children: o.length ? x : u
3981
3981
  }
3982
3982
  ) });
3983
3983
  }, Mf = y("footer", {
@@ -4105,7 +4105,7 @@ const Of = y("div", {
4105
4105
  };
4106
4106
  }, Nf = (e) => {
4107
4107
  const { checkboxProps: t, handleSort: n } = Ff(e), { columns: r, gridColumns: o, isSelectable: a, sorting: i, onSelectAllRows: s } = e, c = Re(() => r.map(({ field: d, label: f, sortable: u, align: p }, b) => {
4108
- const w = !b, $ = () => !w || !a ? null : /* @__PURE__ */ l.jsx(_f, { children: /* @__PURE__ */ l.jsx(or, { ...t, onChange: s }) });
4108
+ const x = !b, $ = () => !x || !a ? null : /* @__PURE__ */ l.jsx(_f, { children: /* @__PURE__ */ l.jsx(or, { ...t, onChange: s }) });
4109
4109
  return /* @__PURE__ */ l.jsx(
4110
4110
  Pf,
4111
4111
  {
@@ -4208,7 +4208,7 @@ const Of = y("div", {
4208
4208
  }, [n, o]);
4209
4209
  const p = Hf(t), b = Re(() => f.filter(
4210
4210
  (m) => !r.find((S) => S[e] === m[e])
4211
- ).length, [f, r, e]), w = be(() => n.length <= 1 ? t.map((m) => ({ ...m, sortable: !1 })) : t, [t, n]), $ = o ? u.current : n, k = (m) => {
4211
+ ).length, [f, r, e]), x = be(() => n.length <= 1 ? t.map((m) => ({ ...m, sortable: !1 })) : t, [t, n]), $ = o ? u.current : n, k = (m) => {
4212
4212
  if (!i)
4213
4213
  return;
4214
4214
  if (m.target.checked) {
@@ -4244,7 +4244,7 @@ const Of = y("div", {
4244
4244
  uncheckedRowsCount: b,
4245
4245
  gridColumns: p,
4246
4246
  isSelectable: c,
4247
- columns: w(),
4247
+ columns: x(),
4248
4248
  onSelectAllRows: k
4249
4249
  },
4250
4250
  bodyProps: {
@@ -4266,7 +4266,7 @@ const Of = y("div", {
4266
4266
  minDisplayRows: u = ff,
4267
4267
  errorMsg: p,
4268
4268
  footer: b,
4269
- noDataPlaceholder: w,
4269
+ noDataPlaceholder: x,
4270
4270
  isLoading: $,
4271
4271
  isError: k,
4272
4272
  keyId: v,
@@ -4276,10 +4276,10 @@ const Of = y("div", {
4276
4276
  onRowClick: O,
4277
4277
  onSort: M,
4278
4278
  noDataOptions: C,
4279
- onRetry: T
4280
- } = e, j = t ? zf : ui, V = be(() => $ ? null : w || /* @__PURE__ */ l.jsx(Lf, { ...C }), [w, C, $]);
4279
+ onRetry: j
4280
+ } = e, T = t ? zf : ui, V = be(() => $ ? null : x || /* @__PURE__ */ l.jsx(Lf, { ...C }), [x, C, $]);
4281
4281
  return /* @__PURE__ */ l.jsxs(Vf, { $maxHeight: f, className: A, children: [
4282
- /* @__PURE__ */ l.jsxs(j, { inert: t ? !0 : void 0, children: [
4282
+ /* @__PURE__ */ l.jsxs(T, { inert: t ? !0 : void 0, children: [
4283
4283
  /* @__PURE__ */ l.jsx(
4284
4284
  Nf,
4285
4285
  {
@@ -4304,7 +4304,7 @@ const Of = y("div", {
4304
4304
  errorMsg: p,
4305
4305
  noDataPlaceholder: V(),
4306
4306
  onRowClick: O,
4307
- onRetry: T
4307
+ onRetry: j
4308
4308
  }
4309
4309
  )
4310
4310
  ] }),
@@ -4333,7 +4333,7 @@ const Of = y("div", {
4333
4333
  disabledReason: u,
4334
4334
  disabled: p,
4335
4335
  loading: b,
4336
- isBlockingOperation: w,
4336
+ isBlockingOperation: x,
4337
4337
  loadingNote: $,
4338
4338
  onClick: k,
4339
4339
  ...v
@@ -4534,7 +4534,7 @@ const Of = y("div", {
4534
4534
  getOptionLabel: n,
4535
4535
  onChange: r
4536
4536
  }) => {
4537
- const [o, a] = ge(1), i = Le(!1), s = Le(null), c = (p, b, w) => {
4537
+ const [o, a] = ge(1), i = Le(!1), s = Le(null), c = (p, b, x) => {
4538
4538
  const $ = n(e[0]);
4539
4539
  document.body.appendChild(p);
4540
4540
  let k = 0, v = 0;
@@ -4545,7 +4545,7 @@ const Of = y("div", {
4545
4545
  if (!O)
4546
4546
  throw new Error("Could not find text node");
4547
4547
  O.textContent = A, p.appendChild(S);
4548
- const C = S.getBoundingClientRect().width + w;
4548
+ const C = S.getBoundingClientRect().width + x;
4549
4549
  if (k + C > b)
4550
4550
  break;
4551
4551
  v += 1, k += C;
@@ -4555,11 +4555,11 @@ const Of = y("div", {
4555
4555
  const p = s.current;
4556
4556
  if (!p)
4557
4557
  throw new Error("Tags container ref is not set");
4558
- const b = window.getComputedStyle(p), w = Number.parseInt(b.columnGap), $ = p.firstElementChild?.getBoundingClientRect().width || 0, k = p.getBoundingClientRect().width - $, v = p.cloneNode(!0);
4558
+ const b = window.getComputedStyle(p), x = Number.parseInt(b.columnGap), $ = p.firstElementChild?.getBoundingClientRect().width || 0, k = p.getBoundingClientRect().width - $, v = p.cloneNode(!0);
4559
4559
  for (; v.lastElementChild && v.children.length > 1; )
4560
4560
  v.removeChild(v.lastElementChild);
4561
4561
  v.style.visibility = "hidden";
4562
- const m = c(v, k, w);
4562
+ const m = c(v, k, x);
4563
4563
  a(1 + m);
4564
4564
  };
4565
4565
  Yr(() => {
@@ -4579,8 +4579,8 @@ const Of = y("div", {
4579
4579
  return p.observe(s.current), () => p.disconnect();
4580
4580
  }, [e]);
4581
4581
  const f = (p, b) => {
4582
- const w = n(p), $ = b === o - 1 && o <= e.length;
4583
- return { label: w, shrinks: $, onDelete: () => {
4582
+ const x = n(p), $ = b === o - 1 && o <= e.length;
4583
+ return { label: x, shrinks: $, onDelete: () => {
4584
4584
  const v = e?.filter((m) => typeof m == "string" ? m !== p : m[t] !== p[t]);
4585
4585
  r(v?.length ? v : []);
4586
4586
  } };
@@ -4680,10 +4680,10 @@ function up({
4680
4680
  }
4681
4681
  };
4682
4682
  t?.call({}, $);
4683
- }, b = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0), w = !Ts.count(n);
4683
+ }, b = i && !(!e || Array.isArray(e) && e.length === 0 || typeof e == "string" && e.length === 0), x = !Ts.count(n);
4684
4684
  return {
4685
4685
  isOpened: s,
4686
- isNoData: w,
4686
+ isNoData: x,
4687
4687
  isShowingClearButton: b,
4688
4688
  resetButtonRef: d,
4689
4689
  openSelect: f,
@@ -4718,7 +4718,7 @@ function pi({
4718
4718
  id: u,
4719
4719
  onChange: p,
4720
4720
  isShowClearButton: b,
4721
- ...w
4721
+ ...x
4722
4722
  }) {
4723
4723
  const {
4724
4724
  isOpened: $,
@@ -4729,15 +4729,15 @@ function pi({
4729
4729
  closeSelect: A,
4730
4730
  resetButtonRef: O
4731
4731
  } = up({
4732
- ...w,
4732
+ ...x,
4733
4733
  children: i,
4734
4734
  onChange: p,
4735
4735
  isShowClearButton: b
4736
4736
  }), M = (C) => {
4737
4737
  if (Array.isArray(C) && C.length) {
4738
- const T = (j) => p?.(j ? {
4738
+ const j = (T) => p?.(T ? {
4739
4739
  target: {
4740
- value: j
4740
+ value: T
4741
4741
  }
4742
4742
  } : {
4743
4743
  target: {
@@ -4750,7 +4750,7 @@ function pi({
4750
4750
  data: C,
4751
4751
  keyId: "value",
4752
4752
  getOptionLabel: t,
4753
- onChange: T,
4753
+ onChange: j,
4754
4754
  onClick: S
4755
4755
  }
4756
4756
  );
@@ -4762,7 +4762,7 @@ function pi({
4762
4762
  /* @__PURE__ */ l.jsxs(
4763
4763
  cp,
4764
4764
  {
4765
- ...w,
4765
+ ...x,
4766
4766
  open: $,
4767
4767
  id: u || d,
4768
4768
  disabled: s,
@@ -4869,7 +4869,7 @@ const hi = 20, fp = [20, 50, 100], pp = y("div")`
4869
4869
  disabled: u,
4870
4870
  isShowClearButton: !1,
4871
4871
  onChange: o,
4872
- children: d.map((w) => /* @__PURE__ */ l.jsx(st, { value: w, children: w }, w))
4872
+ children: d.map((x) => /* @__PURE__ */ l.jsx(st, { value: x, children: x }, x))
4873
4873
  }
4874
4874
  )
4875
4875
  ] }),
@@ -4978,8 +4978,8 @@ function gi(e) {
4978
4978
  const c = gn(e.timeZone, e), f = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - c, u = c !== t, p = f - s;
4979
4979
  if (u && p) {
4980
4980
  Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + p);
4981
- const b = gn(e.timeZone, e), w = c - b;
4982
- w && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + w), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + w));
4981
+ const b = gn(e.timeZone, e), x = c - b;
4982
+ x && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + x), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + x));
4983
4983
  }
4984
4984
  }
4985
4985
  class Pt extends xt {
@@ -6718,8 +6718,8 @@ function Mg(e, t, n, r, o) {
6718
6718
  start: i(e),
6719
6719
  end: s(e)
6720
6720
  }).map((p) => {
6721
- const b = r.formatMonthDropdown(p, o), w = d(p), $ = t && p < a(t) || n && p > a(n) || !1;
6722
- return { value: w, label: b, disabled: $ };
6721
+ const b = r.formatMonthDropdown(p, o), x = d(p), $ = t && p < a(t) || n && p > a(n) || !1;
6722
+ return { value: x, label: b, disabled: $ };
6723
6723
  });
6724
6724
  }
6725
6725
  function Dg(e, t = {}, n = {}) {
@@ -6746,10 +6746,10 @@ function Eg(e, t, n, r) {
6746
6746
  let b = f;
6747
6747
  for (; c(b, u) || d(b, u); )
6748
6748
  p.push(b), b = i(b, 1);
6749
- return p.map((w) => {
6750
- const $ = n.formatYearDropdown(w, r);
6749
+ return p.map((x) => {
6750
+ const $ = n.formatYearDropdown(x, r);
6751
6751
  return {
6752
- value: s(w),
6752
+ value: s(x),
6753
6753
  label: $,
6754
6754
  disabled: !1
6755
6755
  };
@@ -6803,7 +6803,7 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
6803
6803
  !(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
6804
6804
  r.length === 0 || d.length === 0 || r.length !== d.length)
6805
6805
  return;
6806
- const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Ke.caption_after_enter] : n[Ke.caption_before_enter], b = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter], w = i.current, $ = e.current.cloneNode(!0);
6806
+ const f = a.isSameMonth(r[0].date, d[0].date), u = a.isAfter(r[0].date, d[0].date), p = u ? n[Ke.caption_after_enter] : n[Ke.caption_before_enter], b = u ? n[Ke.weeks_after_enter] : n[Ke.weeks_before_enter], x = i.current, $ = e.current.cloneNode(!0);
6807
6807
  if ($ instanceof HTMLElement ? (gr($).forEach((S) => {
6808
6808
  if (!(S instanceof HTMLElement))
6809
6809
  return;
@@ -6816,7 +6816,7 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
6816
6816
  }), i.current = $) : i.current = null, c.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
6817
6817
  o)
6818
6818
  return;
6819
- const k = w instanceof HTMLElement ? gr(w) : [], v = gr(e.current);
6819
+ const k = x instanceof HTMLElement ? gr(x) : [], v = gr(e.current);
6820
6820
  if (v && v.every((m) => m instanceof HTMLElement) && k && k.every((m) => m instanceof HTMLElement)) {
6821
6821
  c.current = !0, e.current.style.isolation = "isolate";
6822
6822
  const m = zg(e.current);
@@ -6829,14 +6829,14 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
6829
6829
  M && M.classList.add(p);
6830
6830
  const C = yr(S);
6831
6831
  C && C.classList.add(b);
6832
- const T = () => {
6832
+ const j = () => {
6833
6833
  c.current = !1, e.current && (e.current.style.isolation = ""), m && (m.style.zIndex = ""), M && M.classList.remove(p), C && C.classList.remove(b), S.style.position = "", S.style.overflow = "", S.contains(O) && S.removeChild(O);
6834
6834
  };
6835
6835
  O.style.pointerEvents = "none", O.style.position = "absolute", O.style.overflow = "hidden", O.setAttribute("aria-hidden", "true");
6836
- const j = Hg(O);
6837
- j && (j.style.opacity = "0");
6836
+ const T = Hg(O);
6837
+ T && (T.style.opacity = "0");
6838
6838
  const V = mr(O);
6839
- V && (V.classList.add(u ? n[Ke.caption_before_exit] : n[Ke.caption_after_exit]), V.addEventListener("animationend", T));
6839
+ V && (V.classList.add(u ? n[Ke.caption_before_exit] : n[Ke.caption_after_exit]), V.addEventListener("animationend", j));
6840
6840
  const B = yr(O);
6841
6841
  B && B.classList.add(u ? n[Ke.weeks_before_exit] : n[Ke.weeks_after_exit]), S.insertBefore(O, S.firstChild);
6842
6842
  });
@@ -6844,22 +6844,22 @@ function Yg(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
6844
6844
  });
6845
6845
  }
6846
6846
  function Gg(e, t, n, r) {
6847
- const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: b, endOfMonth: w, endOfWeek: $, isAfter: k, startOfBroadcastWeek: v, startOfISOWeek: m, startOfWeek: S } = r, A = c ? v(o, r) : i ? m(o) : S(o), O = c ? p(a, r) : i ? b(w(a)) : $(w(a)), M = f(O, A), C = u(a, o) + 1, T = [];
6847
+ const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: c } = n ?? {}, { addDays: d, differenceInCalendarDays: f, differenceInCalendarMonths: u, endOfBroadcastWeek: p, endOfISOWeek: b, endOfMonth: x, endOfWeek: $, isAfter: k, startOfBroadcastWeek: v, startOfISOWeek: m, startOfWeek: S } = r, A = c ? v(o, r) : i ? m(o) : S(o), O = c ? p(a, r) : i ? b(x(a)) : $(x(a)), M = f(O, A), C = u(a, o) + 1, j = [];
6848
6848
  for (let B = 0; B <= M; B++) {
6849
- const _ = d(A, B);
6850
- if (t && k(_, t))
6849
+ const N = d(A, B);
6850
+ if (t && k(N, t))
6851
6851
  break;
6852
- T.push(_);
6852
+ j.push(N);
6853
6853
  }
6854
6854
  const V = (c ? 35 : 42) * C;
6855
- if (s && T.length < V) {
6856
- const B = V - T.length;
6857
- for (let _ = 0; _ < B; _++) {
6858
- const W = d(T[T.length - 1], 1);
6859
- T.push(W);
6855
+ if (s && j.length < V) {
6856
+ const B = V - j.length;
6857
+ for (let N = 0; N < B; N++) {
6858
+ const W = d(j[j.length - 1], 1);
6859
+ j.push(W);
6860
6860
  }
6861
6861
  }
6862
- return T;
6862
+ return j;
6863
6863
  }
6864
6864
  function Ug(e) {
6865
6865
  const t = [];
@@ -6911,27 +6911,27 @@ class Qg {
6911
6911
  }
6912
6912
  }
6913
6913
  function Zg(e, t, n, r) {
6914
- const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: b } = r, w = e.reduce(($, k) => {
6914
+ const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: c, getISOWeek: d, getWeek: f, startOfBroadcastWeek: u, startOfISOWeek: p, startOfWeek: b } = r, x = e.reduce(($, k) => {
6915
6915
  const v = n.broadcastCalendar ? u(k, r) : n.ISOWeek ? p(k) : b(k), m = n.broadcastCalendar ? a(k, r) : n.ISOWeek ? i(s(k)) : c(s(k)), S = t.filter((C) => C >= v && C <= m), A = n.broadcastCalendar ? 35 : 42;
6916
6916
  if (n.fixedWeeks && S.length < A) {
6917
- const C = t.filter((T) => {
6918
- const j = A - S.length;
6919
- return T > m && T <= o(m, j);
6917
+ const C = t.filter((j) => {
6918
+ const T = A - S.length;
6919
+ return j > m && j <= o(m, T);
6920
6920
  });
6921
6921
  S.push(...C);
6922
6922
  }
6923
- const O = S.reduce((C, T) => {
6924
- const j = n.ISOWeek ? d(T) : f(T), V = C.find((_) => _.weekNumber === j), B = new Ri(T, k, r);
6925
- return V ? V.days.push(B) : C.push(new Qg(j, [B])), C;
6923
+ const O = S.reduce((C, j) => {
6924
+ const T = n.ISOWeek ? d(j) : f(j), V = C.find((N) => N.weekNumber === T), B = new Ri(j, k, r);
6925
+ return V ? V.days.push(B) : C.push(new Qg(T, [B])), C;
6926
6926
  }, []), M = new Xg(k, O);
6927
6927
  return $.push(M), $;
6928
6928
  }, []);
6929
- return n.reverseMonths ? w.reverse() : w;
6929
+ return n.reverseMonths ? x.reverse() : x;
6930
6930
  }
6931
6931
  function Jg(e, t) {
6932
6932
  let { startMonth: n, endMonth: r } = e;
6933
- const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: b, fromMonth: w, toMonth: $ } = e;
6934
- !n && w && (n = w), !n && p && (n = t.newDate(p, 0, 1)), !r && $ && (r = $), !r && b && (r = f(b, 11, 31));
6933
+ const { startOfYear: o, startOfDay: a, startOfMonth: i, endOfMonth: s, addYears: c, endOfYear: d, newDate: f, today: u } = t, { fromYear: p, toYear: b, fromMonth: x, toMonth: $ } = e;
6934
+ !n && x && (n = x), !n && p && (n = t.newDate(p, 0, 1)), !r && $ && (r = $), !r && b && (r = f(b, 11, 31));
6935
6935
  const k = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
6936
6936
  return n ? n = i(n) : p ? n = f(p, 0, 1) : !n && k && (n = o(c(e.today ?? u(), -100))), r ? r = s(r) : b ? r = f(b, 11, 31) : !r && k && (r = d(e.today ?? u())), [
6937
6937
  n && a(n),
@@ -6974,7 +6974,7 @@ function nm(e, t) {
6974
6974
  const M = Ko(e, t);
6975
6975
  c(M);
6976
6976
  }, [e.timeZone]);
6977
- const d = qg(s, r, e, t), f = Gg(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = Zg(d, f, e, t), p = tm(u), b = Ug(u), w = em(s, n, e, t), $ = Kg(s, r, e, t), { disableNavigation: k, onMonthChange: v } = e, m = (M) => p.some((C) => C.days.some((T) => T.isEqualTo(M))), S = (M) => {
6977
+ const d = qg(s, r, e, t), f = Gg(d, e.endMonth ? a(e.endMonth) : void 0, e, t), u = Zg(d, f, e, t), p = tm(u), b = Ug(u), x = em(s, n, e, t), $ = Kg(s, r, e, t), { disableNavigation: k, onMonthChange: v } = e, m = (M) => p.some((C) => C.days.some((j) => j.isEqualTo(M))), S = (M) => {
6978
6978
  if (k)
6979
6979
  return;
6980
6980
  let C = o(M);
@@ -6986,7 +6986,7 @@ function nm(e, t) {
6986
6986
  days: b,
6987
6987
  navStart: n,
6988
6988
  navEnd: r,
6989
- previousMonth: w,
6989
+ previousMonth: x,
6990
6990
  nextMonth: $,
6991
6991
  goToMonth: S,
6992
6992
  goToDay: (M) => {
@@ -7053,14 +7053,14 @@ function $t(e, t, n = Ot) {
7053
7053
  });
7054
7054
  }
7055
7055
  function om(e, t, n, r, o, a, i) {
7056
- const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: b, endOfISOWeek: w, endOfWeek: $, max: k, min: v, startOfBroadcastWeek: m, startOfISOWeek: S, startOfWeek: A } = i;
7056
+ const { ISOWeek: s, broadcastCalendar: c } = a, { addDays: d, addMonths: f, addWeeks: u, addYears: p, endOfBroadcastWeek: b, endOfISOWeek: x, endOfWeek: $, max: k, min: v, startOfBroadcastWeek: m, startOfISOWeek: S, startOfWeek: A } = i;
7057
7057
  let M = {
7058
7058
  day: d,
7059
7059
  week: u,
7060
7060
  month: f,
7061
7061
  year: p,
7062
7062
  startOfWeek: (C) => c ? m(C, i) : s ? S(C) : A(C),
7063
- endOfWeek: (C) => c ? b(C, i) : s ? w(C) : $(C)
7063
+ endOfWeek: (C) => c ? b(C, i) : s ? x(C) : $(C)
7064
7064
  }[e](n, t === "after" ? 1 : -1);
7065
7065
  return t === "before" && r ? M = k([r, M]) : t === "after" && o && (M = v([o, M])), M;
7066
7066
  }
@@ -7097,7 +7097,7 @@ function am(e, t, n, r, o) {
7097
7097
  };
7098
7098
  }
7099
7099
  function im(e, t, n) {
7100
- const { disabled: r, hidden: o, modifiers: a, showOutsideDays: i, broadcastCalendar: s, today: c } = t, { isSameDay: d, isSameMonth: f, startOfMonth: u, isBefore: p, endOfMonth: b, isAfter: w } = n, $ = t.startMonth && u(t.startMonth), k = t.endMonth && b(t.endMonth), v = {
7100
+ const { disabled: r, hidden: o, modifiers: a, showOutsideDays: i, broadcastCalendar: s, today: c } = t, { isSameDay: d, isSameMonth: f, startOfMonth: u, isBefore: p, endOfMonth: b, isAfter: x } = n, $ = t.startMonth && u(t.startMonth), k = t.endMonth && b(t.endMonth), v = {
7101
7101
  [De.focused]: [],
7102
7102
  [De.outside]: [],
7103
7103
  [De.disabled]: [],
@@ -7105,11 +7105,11 @@ function im(e, t, n) {
7105
7105
  [De.today]: []
7106
7106
  }, m = {};
7107
7107
  for (const S of e) {
7108
- const { date: A, displayMonth: O } = S, M = !!(O && !f(A, O)), C = !!($ && p(A, $)), T = !!(k && w(A, k)), j = !!(r && $t(A, r, n)), V = !!(o && $t(A, o, n)) || C || T || // Broadcast calendar will show outside days as default
7108
+ const { date: A, displayMonth: O } = S, M = !!(O && !f(A, O)), C = !!($ && p(A, $)), j = !!(k && x(A, k)), T = !!(r && $t(A, r, n)), V = !!(o && $t(A, o, n)) || C || j || // Broadcast calendar will show outside days as default
7109
7109
  !s && !i && M || s && i === !1 && M, B = d(A, c ?? n.today());
7110
- M && v.outside.push(S), j && v.disabled.push(S), V && v.hidden.push(S), B && v.today.push(S), a && Object.keys(a).forEach((_) => {
7111
- const W = a?.[_];
7112
- W && $t(A, W, n) && (m[_] ? m[_].push(S) : m[_] = [S]);
7110
+ M && v.outside.push(S), T && v.disabled.push(S), V && v.hidden.push(S), B && v.today.push(S), a && Object.keys(a).forEach((N) => {
7111
+ const W = a?.[N];
7112
+ W && $t(A, W, n) && (m[N] ? m[N].push(S) : m[N] = [S]);
7113
7113
  });
7114
7114
  }
7115
7115
  return (S) => {
@@ -7122,7 +7122,7 @@ function im(e, t, n) {
7122
7122
  }, O = {};
7123
7123
  for (const M in v) {
7124
7124
  const C = v[M];
7125
- A[M] = C.some((T) => T === S);
7125
+ A[M] = C.some((j) => j === S);
7126
7126
  }
7127
7127
  for (const M in m)
7128
7128
  O[M] = m[M].some((C) => C === S);
@@ -7134,10 +7134,10 @@ function im(e, t, n) {
7134
7134
  };
7135
7135
  }
7136
7136
  function sm(e, t) {
7137
- const { selected: n, required: r, onSelect: o } = e, [a, i] = sr(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, d = (b) => s?.some((w) => c(w, b)) ?? !1, { min: f, max: u } = e;
7137
+ const { selected: n, required: r, onSelect: o } = e, [a, i] = sr(n, o ? n : void 0), s = o ? n : a, { isSameDay: c } = t, d = (b) => s?.some((x) => c(x, b)) ?? !1, { min: f, max: u } = e;
7138
7138
  return {
7139
7139
  selected: s,
7140
- select: (b, w, $) => {
7140
+ select: (b, x, $) => {
7141
7141
  let k = [...s ?? []];
7142
7142
  if (d(b)) {
7143
7143
  if (s?.length === f || r && s?.length === 1)
@@ -7145,7 +7145,7 @@ function sm(e, t) {
7145
7145
  k = s?.filter((v) => !c(v, b));
7146
7146
  } else
7147
7147
  s?.length === u ? k = [b] : k = [...k, b];
7148
- return o || i(k), o?.(k, b, w, $), k;
7148
+ return o || i(k), o?.(k, b, x, $), k;
7149
7149
  },
7150
7150
  isSelected: d
7151
7151
  };
@@ -7215,9 +7215,9 @@ function dm(e, t) {
7215
7215
  const { disabled: n, excludeDisabled: r, selected: o, required: a, onSelect: i } = e, [s, c] = sr(o, i ? o : void 0), d = i ? o : s;
7216
7216
  return {
7217
7217
  selected: d,
7218
- select: (p, b, w) => {
7218
+ select: (p, b, x) => {
7219
7219
  const { min: $, max: k } = e, v = p ? lm(p, d, $, k, a, t) : void 0;
7220
- return r && n && v?.from && v.to && um({ from: v.from, to: v.to }, n, t) && (v.from = p, v.to = void 0), i || c(v), i?.(v, p, b, w), v;
7220
+ return r && n && v?.from && v.to && um({ from: v.from, to: v.to }, n, t) && (v.from = p, v.to = void 0), i || c(v), i?.(v, p, b, x), v;
7221
7221
  },
7222
7222
  isSelected: (p) => d && St(d, p, !1, t)
7223
7223
  };
@@ -7227,8 +7227,8 @@ function fm(e, t) {
7227
7227
  return {
7228
7228
  selected: s,
7229
7229
  select: (u, p, b) => {
7230
- let w = u;
7231
- return !r && s && s && c(u, s) && (w = void 0), o || i(w), o?.(w, u, p, b), w;
7230
+ let x = u;
7231
+ return !r && s && s && c(u, s) && (x = void 0), o || i(x), o?.(x, u, p, b), x;
7232
7232
  },
7233
7233
  isSelected: (u) => s ? c(s, u) : !1
7234
7234
  };
@@ -7279,7 +7279,7 @@ function hm(e) {
7279
7279
  e.formatters,
7280
7280
  e.labels,
7281
7281
  e.classNames
7282
- ]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: b, onDayMouseLeave: w, onNextClick: $, onPrevClick: k, showWeekNumber: v, styles: m } = e, { formatCaption: S, formatDay: A, formatMonthDropdown: O, formatWeekNumber: M, formatWeekNumberHeader: C, formatWeekdayName: T, formatYearDropdown: j } = n, V = nm(e, o), { days: B, months: _, navStart: W, navEnd: U, previousMonth: Y, nextMonth: L, goToMonth: Z } = V, oe = im(B, e, o), { isSelected: te, select: E, selected: F } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, V, oe, te ?? (() => !1), o), { labelDayButton: we, labelGridcell: ae, labelGrid: Se, labelMonthDropdown: Ee, labelNav: Ue, labelWeekday: lt, labelWeekNumber: Wt, labelWeekNumberHeader: q, labelYearDropdown: J } = r, $e = Re(() => Og(o, e.ISOWeek), [o, e.ISOWeek]), ke = c !== void 0 || f !== void 0, Ne = be(() => {
7282
+ ]), { captionLayout: s, mode: c, onDayBlur: d, onDayClick: f, onDayFocus: u, onDayKeyDown: p, onDayMouseEnter: b, onDayMouseLeave: x, onNextClick: $, onPrevClick: k, showWeekNumber: v, styles: m } = e, { formatCaption: S, formatDay: A, formatMonthDropdown: O, formatWeekNumber: M, formatWeekNumberHeader: C, formatWeekdayName: j, formatYearDropdown: T } = n, V = nm(e, o), { days: B, months: N, navStart: W, navEnd: U, previousMonth: Y, nextMonth: L, goToMonth: Z } = V, oe = im(B, e, o), { isSelected: te, select: E, selected: _ } = pm(e, o) ?? {}, { blur: H, focused: G, isFocusTarget: le, moveFocus: se, setFocused: re } = am(e, V, oe, te ?? (() => !1), o), { labelDayButton: we, labelGridcell: ae, labelGrid: Se, labelMonthDropdown: Ee, labelNav: Ue, labelWeekday: lt, labelWeekNumber: Wt, labelWeekNumberHeader: q, labelYearDropdown: J } = r, $e = Re(() => Og(o, e.ISOWeek), [o, e.ISOWeek]), ke = c !== void 0 || f !== void 0, Ne = be(() => {
7283
7283
  Y && (Z(Y), k?.(Y));
7284
7284
  }, [Y, Z, k]), ie = be(() => {
7285
7285
  L && (Z(L), $?.(L));
@@ -7289,7 +7289,7 @@ function hm(e) {
7289
7289
  re(Q), u?.(Q.date, de, ce);
7290
7290
  }, [u, re]), h = be((Q, de) => (ce) => {
7291
7291
  H(), d?.(Q.date, de, ce);
7292
- }, [H, d]), x = be((Q, de) => (ce) => {
7292
+ }, [H, d]), w = be((Q, de) => (ce) => {
7293
7293
  const qe = {
7294
7294
  ArrowLeft: ["day", e.dir === "rtl" ? "after" : "before"],
7295
7295
  ArrowRight: ["day", e.dir === "rtl" ? "before" : "after"],
@@ -7309,8 +7309,8 @@ function hm(e) {
7309
7309
  }, [se, p, e.dir]), D = be((Q, de) => (ce) => {
7310
7310
  b?.(Q.date, de, ce);
7311
7311
  }, [b]), I = be((Q, de) => (ce) => {
7312
- w?.(Q.date, de, ce);
7313
- }, [w]), N = be((Q) => (de) => {
7312
+ x?.(Q.date, de, ce);
7313
+ }, [x]), F = be((Q) => (de) => {
7314
7314
  const ce = Number(de.target.value), qe = o.setMonth(o.startOfMonth(Q), ce);
7315
7315
  Z(qe);
7316
7316
  }, [o, Z]), P = be((Q) => (de) => {
@@ -7322,16 +7322,16 @@ function hm(e) {
7322
7322
  }), [i, e.className, e.style, m]), ue = gg(e), Ce = Le(null);
7323
7323
  Yg(Ce, !!e.animate, {
7324
7324
  classNames: i,
7325
- months: _,
7325
+ months: N,
7326
7326
  focused: G,
7327
7327
  dateLib: o
7328
7328
  });
7329
7329
  const rt = {
7330
7330
  dayPickerProps: e,
7331
- selected: F,
7331
+ selected: _,
7332
7332
  select: E,
7333
7333
  isSelected: te,
7334
- months: _,
7334
+ months: N,
7335
7335
  nextMonth: L,
7336
7336
  previousMonth: Y,
7337
7337
  goToMonth: Z,
@@ -7352,7 +7352,7 @@ function hm(e) {
7352
7352
  t.Months,
7353
7353
  { className: i[X.Months], style: m?.[X.Months] },
7354
7354
  !e.hideNavigation && g.createElement(t.Nav, { "data-animated-nav": e.animate ? "true" : void 0, className: i[X.Nav], style: m?.[X.Nav], "aria-label": Ue(), onPreviousClick: Ne, onNextClick: ie, previousMonth: Y, nextMonth: L }),
7355
- _.map((Q, de) => {
7355
+ N.map((Q, de) => {
7356
7356
  const ce = Mg(Q.date, W, U, n, o), qe = Eg(W, U, n, o);
7357
7357
  return g.createElement(
7358
7358
  t.Month,
@@ -7360,8 +7360,8 @@ function hm(e) {
7360
7360
  g.createElement(t.MonthCaption, { "data-animated-caption": e.animate ? "true" : void 0, className: i[X.MonthCaption], style: m?.[X.MonthCaption], calendarMonth: Q, displayIndex: de }, s?.startsWith("dropdown") ? g.createElement(
7361
7361
  t.DropdownNav,
7362
7362
  { className: i[X.Dropdowns], style: m?.[X.Dropdowns] },
7363
- s === "dropdown" || s === "dropdown-months" ? g.createElement(t.MonthsDropdown, { className: i[X.MonthsDropdown], "aria-label": Ee(), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: N(Q.date), options: ce, style: m?.[X.Dropdown], value: o.getMonth(Q.date) }) : g.createElement("span", null, O(Q.date, o)),
7364
- s === "dropdown" || s === "dropdown-years" ? g.createElement(t.YearsDropdown, { className: i[X.YearsDropdown], "aria-label": J(o.options), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: P(Q.date), options: qe, style: m?.[X.Dropdown], value: o.getYear(Q.date) }) : g.createElement("span", null, j(Q.date, o)),
7363
+ s === "dropdown" || s === "dropdown-months" ? g.createElement(t.MonthsDropdown, { className: i[X.MonthsDropdown], "aria-label": Ee(), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: F(Q.date), options: ce, style: m?.[X.Dropdown], value: o.getMonth(Q.date) }) : g.createElement("span", null, O(Q.date, o)),
7364
+ s === "dropdown" || s === "dropdown-years" ? g.createElement(t.YearsDropdown, { className: i[X.YearsDropdown], "aria-label": J(o.options), classNames: i, components: t, disabled: !!e.disableNavigation, onChange: P(Q.date), options: qe, style: m?.[X.Dropdown], value: o.getYear(Q.date) }) : g.createElement("span", null, T(Q.date, o)),
7365
7365
  g.createElement("span", { role: "status", "aria-live": "polite", style: {
7366
7366
  border: 0,
7367
7367
  clip: "rect(0 0 0 0)",
@@ -7382,7 +7382,7 @@ function hm(e) {
7382
7382
  t.Weekdays,
7383
7383
  { "data-animated-weekdays": e.animate ? "true" : void 0, className: i[X.Weekdays], style: m?.[X.Weekdays] },
7384
7384
  v && g.createElement(t.WeekNumberHeader, { "aria-label": q(o.options), className: i[X.WeekNumberHeader], style: m?.[X.WeekNumberHeader], scope: "col" }, C()),
7385
- $e.map((He, ut) => g.createElement(t.Weekday, { "aria-label": lt(He, o.options, o), className: i[X.Weekday], key: ut, style: m?.[X.Weekday], scope: "col" }, T(He, o.options, o)))
7385
+ $e.map((He, ut) => g.createElement(t.Weekday, { "aria-label": lt(He, o.options, o), className: i[X.Weekday], key: ut, style: m?.[X.Weekday], scope: "col" }, j(He, o.options, o)))
7386
7386
  ),
7387
7387
  g.createElement(t.Weeks, { "data-animated-weeks": e.animate ? "true" : void 0, className: i[X.Weeks], style: m?.[X.Weeks] }, Q.weeks.map((He, ut) => g.createElement(
7388
7388
  t.Week,
@@ -7392,12 +7392,12 @@ function hm(e) {
7392
7392
  }), className: i[X.WeekNumber], scope: "row", role: "rowheader" }, M(He.weekNumber)),
7393
7393
  He.days.map((ve) => {
7394
7394
  const { date: ot } = ve, fe = oe(ve);
7395
- if (fe[De.focused] = !fe.hidden && !!G?.isEqualTo(ve), fe[ht.selected] = te?.(ot) || fe.selected, ao(F)) {
7396
- const { from: Oe, to: Pe } = F;
7397
- fe[ht.range_start] = !!(Oe && Pe && o.isSameDay(ot, Oe)), fe[ht.range_end] = !!(Oe && Pe && o.isSameDay(ot, Pe)), fe[ht.range_middle] = St(F, ot, !0, o);
7395
+ if (fe[De.focused] = !fe.hidden && !!G?.isEqualTo(ve), fe[ht.selected] = te?.(ot) || fe.selected, ao(_)) {
7396
+ const { from: Oe, to: Pe } = _;
7397
+ fe[ht.range_start] = !!(Oe && Pe && o.isSameDay(ot, Oe)), fe[ht.range_end] = !!(Oe && Pe && o.isSameDay(ot, Pe)), fe[ht.range_middle] = St(_, ot, !0, o);
7398
7398
  }
7399
7399
  const Fn = Dg(fe, m, e.modifiersStyles), Nn = Hh(fe, i, e.modifiersClassNames), ee = !ke && !fe.hidden ? ae(ot, fe, o.options, o) : void 0;
7400
- return g.createElement(t.Day, { key: `${o.format(ot, "yyyy-MM-dd")}_${o.format(ve.displayMonth, "yyyy-MM")}`, day: ve, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(ot, "yyyy-MM-dd"), "data-month": ve.outside ? o.format(ot, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": ve.outside || void 0, "data-focused": fe.focused || void 0, "data-today": fe.today || void 0 }, !fe.hidden && ke ? g.createElement(t.DayButton, { className: i[X.DayButton], style: m?.[X.DayButton], type: "button", day: ve, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(ve) ? 0 : -1, "aria-label": we(ot, fe, o.options, o), onClick: Ie(ve, fe), onBlur: h(ve, fe), onFocus: ct(ve, fe), onKeyDown: x(ve, fe), onMouseEnter: D(ve, fe), onMouseLeave: I(ve, fe) }, A(ot, o.options, o)) : !fe.hidden && A(ve.date, o.options, o));
7400
+ return g.createElement(t.Day, { key: `${o.format(ot, "yyyy-MM-dd")}_${o.format(ve.displayMonth, "yyyy-MM")}`, day: ve, modifiers: fe, className: Nn.join(" "), style: Fn, role: "gridcell", "aria-selected": fe.selected || void 0, "aria-label": ee, "data-day": o.format(ot, "yyyy-MM-dd"), "data-month": ve.outside ? o.format(ot, "yyyy-MM") : void 0, "data-selected": fe.selected || void 0, "data-disabled": fe.disabled || void 0, "data-hidden": fe.hidden || void 0, "data-outside": ve.outside || void 0, "data-focused": fe.focused || void 0, "data-today": fe.today || void 0 }, !fe.hidden && ke ? g.createElement(t.DayButton, { className: i[X.DayButton], style: m?.[X.DayButton], type: "button", day: ve, modifiers: fe, disabled: fe.disabled || void 0, tabIndex: le(ve) ? 0 : -1, "aria-label": we(ot, fe, o.options, o), onClick: Ie(ve, fe), onBlur: h(ve, fe), onFocus: ct(ve, fe), onKeyDown: w(ve, fe), onMouseEnter: D(ve, fe), onMouseLeave: I(ve, fe) }, A(ot, o.options, o)) : !fe.hidden && A(ve.date, o.options, o));
7401
7401
  })
7402
7402
  )))
7403
7403
  )
@@ -8438,37 +8438,37 @@ var yn = function(e) {
8438
8438
  this.register = function(a) {
8439
8439
  var i;
8440
8440
  if (ua.includes(a.type)) {
8441
- var s = (i = a._wrapperState) !== null && i !== void 0 ? i : {}, c = s.initialValue, d = c === void 0 ? "" : c, f = s.controlled, u = f !== void 0 && f, p = n({ initialValue: a.value || d, controlled: u }), b = p.value, w = p.options, $ = { value: b, options: w, fallbackOptions: w }, k = { id: -1, cachedId: -1 }, v = { value: "", selectionStart: 0, selectionEnd: 0 }, m = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
8441
+ var s = (i = a._wrapperState) !== null && i !== void 0 ? i : {}, c = s.initialValue, d = c === void 0 ? "" : c, f = s.controlled, u = f !== void 0 && f, p = n({ initialValue: a.value || d, controlled: u }), b = p.value, x = p.options, $ = { value: b, options: x, fallbackOptions: x }, k = { id: -1, cachedId: -1 }, v = { value: "", selectionStart: 0, selectionEnd: 0 }, m = Object.getOwnPropertyDescriptor("_valueTracker" in a ? a : HTMLInputElement.prototype, "value");
8442
8442
  Object.defineProperty(a, "value", la(la({}, m), {}, { set: function(M) {
8443
8443
  var C;
8444
8444
  v.value = M, m == null || (C = m.set) === null || C === void 0 || C.call(a, M);
8445
8445
  } })), a.value = b;
8446
8446
  var S = function() {
8447
8447
  var M = function() {
8448
- var C, T;
8449
- v.selectionStart = (C = a.selectionStart) !== null && C !== void 0 ? C : 0, v.selectionEnd = (T = a.selectionEnd) !== null && T !== void 0 ? T : 0, k.id = window.setTimeout(M);
8448
+ var C, j;
8449
+ v.selectionStart = (C = a.selectionStart) !== null && C !== void 0 ? C : 0, v.selectionEnd = (j = a.selectionEnd) !== null && j !== void 0 ? j : 0, k.id = window.setTimeout(M);
8450
8450
  };
8451
8451
  k.id = window.setTimeout(M);
8452
8452
  }, A = function() {
8453
8453
  window.clearTimeout(k.id), k.id = -1, k.cachedId = -1;
8454
8454
  }, O = function(M) {
8455
8455
  try {
8456
- var C, T;
8456
+ var C, j;
8457
8457
  if (k.cachedId === k.id) throw new yn("The input selection has not been updated.");
8458
8458
  k.cachedId = k.id;
8459
- var j = a.value, V = a.selectionStart, B = a.selectionEnd;
8459
+ var T = a.value, V = a.selectionStart, B = a.selectionEnd;
8460
8460
  if (V === null || B === null) throw new yn("The selection attributes have not been initialized.");
8461
- var _, W = v.value;
8462
- if (M.inputType === void 0 && (v.selectionStart = 0, v.selectionEnd = W.length), V > v.selectionStart ? _ = "insert" : V <= v.selectionStart && V < v.selectionEnd ? _ = "deleteBackward" : V === v.selectionEnd && j.length < W.length && (_ = "deleteForward"), _ === void 0 || (_ === "deleteBackward" || _ === "deleteForward") && j.length > W.length) throw new yn("Input type detection error.");
8461
+ var N, W = v.value;
8462
+ if (M.inputType === void 0 && (v.selectionStart = 0, v.selectionEnd = W.length), V > v.selectionStart ? N = "insert" : V <= v.selectionStart && V < v.selectionEnd ? N = "deleteBackward" : V === v.selectionEnd && T.length < W.length && (N = "deleteForward"), N === void 0 || (N === "deleteBackward" || N === "deleteForward") && T.length > W.length) throw new yn("Input type detection error.");
8463
8463
  var U = "", Y = v.selectionStart, L = v.selectionEnd;
8464
- if (_ === "insert") U = j.slice(v.selectionStart, V);
8464
+ if (N === "insert") U = T.slice(v.selectionStart, V);
8465
8465
  else {
8466
- var Z = W.length - j.length;
8466
+ var Z = W.length - T.length;
8467
8467
  Y = V, L = V + Z;
8468
8468
  }
8469
8469
  $.value !== W ? $.options = $.fallbackOptions : $.fallbackOptions = $.options;
8470
- var oe = $.options, te = r({ inputType: _, previousValue: W, previousOptions: oe, value: j, addedValue: U, changeStart: Y, changeEnd: L, selectionStart: V, selectionEnd: B }), E = te.options, F = gy(te, my);
8471
- a.value = F.value, a.setSelectionRange(F.selectionStart, F.selectionEnd), $.value = F.value, $.options = E, v.selectionStart = F.selectionStart, v.selectionEnd = F.selectionEnd, (C = a._valueTracker) === null || C === void 0 || (T = C.setValue) === null || T === void 0 || T.call(C, W);
8470
+ var oe = $.options, te = r({ inputType: N, previousValue: W, previousOptions: oe, value: T, addedValue: U, changeStart: Y, changeEnd: L, selectionStart: V, selectionEnd: B }), E = te.options, _ = gy(te, my);
8471
+ a.value = _.value, a.setSelectionRange(_.selectionStart, _.selectionEnd), $.value = _.value, $.options = E, v.selectionStart = _.selectionStart, v.selectionEnd = _.selectionEnd, (C = a._valueTracker) === null || C === void 0 || (j = C.setValue) === null || j === void 0 || j.call(C, W);
8472
8472
  } catch (H) {
8473
8473
  if (a.value = v.value, a.setSelectionRange(v.selectionStart, v.selectionEnd), M.preventDefault(), M.stopPropagation(), H.name !== "SyntheticChangeError") throw H;
8474
8474
  }
@@ -8500,13 +8500,13 @@ var ts = function(e) {
8500
8500
  return ry(this, t), (n = ny(this, t, [{ init: function(o) {
8501
8501
  var a = o.initialValue, i = o.controlled, s = Zt(r), c = s.mask, d = s.replacement, f = s.separate, u = s.showMask;
8502
8502
  return a = i || a ? a : u ? c : "", process.env.NODE_ENV !== "production" && function(p) {
8503
- var b = p.initialValue, w = p.mask, $ = p.replacement;
8504
- b.length > w.length && console.error(br(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(b, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8503
+ var b = p.initialValue, x = p.mask, $ = p.replacement;
8504
+ b.length > x.length && console.error(br(Error)("The initialized value of the `value` or `defaultValue` property is longer than the value specified in the `mask` property. Check the correctness of the initialized value in the specified property.", 'Invalid value: "'.concat(b, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8505
8505
  var k = Object.keys($).filter(function(O) {
8506
8506
  return O.length > 1;
8507
8507
  });
8508
8508
  k.length > 0 && console.error(br(Error)("Object keys in the `replacement` property are longer than one character. Replacement keys must be one character long. Check the correctness of the value in the specified property.", "Invalid keys: ".concat(k.join(", "), "."), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8509
- for (var v = w.slice(0, b.length), m = -1, S = 0; S < v.length; S++) {
8509
+ for (var v = x.slice(0, b.length), m = -1, S = 0; S < v.length; S++) {
8510
8510
  var A = Object.prototype.hasOwnProperty.call($, v[S]);
8511
8511
  if (!(v[S] === b[S] || A && $[v[S]].test(b[S]))) {
8512
8512
  m = S;
@@ -8516,23 +8516,23 @@ var ts = function(e) {
8516
8516
  m !== -1 && console.error(br(Error)("An invalid character was found in the initialized property value `value` or `defaultValue` (index: ".concat(m, "). Check the correctness of the initialized value in the specified property."), 'Invalid value: "'.concat(b, '".'), "To initialize an unmasked value, use the `format` utility. More details https://github.com/GoncharukOrg/react-input/tree/main/packages/mask#initializing-the-value."));
8517
8517
  }({ initialValue: a, mask: c, replacement: d }), { value: a, options: { mask: c, replacement: d, separate: f } };
8518
8518
  }, tracking: function(o) {
8519
- var a = o.inputType, i = o.previousValue, s = o.previousOptions, c = o.addedValue, d = o.changeStart, f = o.changeEnd, u = Zt(r), p = u.track, b = u.modify, w = iy(u, yy), $ = w.mask, k = w.replacement, v = w.showMask, m = w.separate, S = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), A = p?.(S);
8519
+ var a = o.inputType, i = o.previousValue, s = o.previousOptions, c = o.addedValue, d = o.changeStart, f = o.changeEnd, u = Zt(r), p = u.track, b = u.modify, x = iy(u, yy), $ = x.mask, k = x.replacement, v = x.showMask, m = x.separate, S = Ln(Ln({}, a === "insert" ? { inputType: a, data: c } : { inputType: a, data: null }), {}, { value: i, selectionStart: d, selectionEnd: f }), A = p?.(S);
8520
8520
  if (A === !1) throw new yn("Custom tracking stop.");
8521
8521
  A === null ? c = "" : A !== !0 && A !== void 0 && (c = A);
8522
8522
  var O = b?.(S);
8523
8523
  O?.mask !== void 0 && ($ = O.mask), O?.replacement !== void 0 && (k = typeof O?.replacement == "string" ? on(O?.replacement) : O.replacement), O?.showMask !== void 0 && (v = O.showMask), O?.separate !== void 0 && (m = O.separate);
8524
- var M = Wr(i, Ln({ end: d }, s)), C = Wr(i, Ln({ start: f }, s)), T = RegExp("[^".concat(Object.keys(k).join(""), "]"), "g"), j = $.replace(T, "");
8525
- if (M && (M = mn(M, { replacementChars: j, replacement: k, separate: m }), j = j.slice(M.length)), c && (c = mn(c, { replacementChars: j, replacement: k, separate: !1 }), j = j.slice(c.length)), a === "insert" && c === "") throw new yn("The character does not match the key value of the `replacement` object.");
8524
+ var M = Wr(i, Ln({ end: d }, s)), C = Wr(i, Ln({ start: f }, s)), j = RegExp("[^".concat(Object.keys(k).join(""), "]"), "g"), T = $.replace(j, "");
8525
+ if (M && (M = mn(M, { replacementChars: T, replacement: k, separate: m }), T = T.slice(M.length)), c && (c = mn(c, { replacementChars: T, replacement: k, separate: !1 }), T = T.slice(c.length)), a === "insert" && c === "") throw new yn("The character does not match the key value of the `replacement` object.");
8526
8526
  if (m) {
8527
- var V = $.slice(d, f).replace(T, ""), B = V.length - c.length;
8527
+ var V = $.slice(d, f).replace(j, ""), B = V.length - c.length;
8528
8528
  B < 0 ? C = C.slice(-B) : B > 0 && (C = V.slice(-B) + C);
8529
8529
  }
8530
- C && (C = mn(C, { replacementChars: j, replacement: k, separate: m }));
8531
- var _ = Xi(M + c + C, { mask: $, replacement: k, separate: m, showMask: v }), W = function(U) {
8532
- var Y, L, Z, oe = U.inputType, te = U.value, E = U.addedValue, F = U.beforeChangeValue, H = U.mask, G = U.replacement, le = U.separate, se = Qi(te, { mask: H, replacement: G }).filter(function(Ee) {
8530
+ C && (C = mn(C, { replacementChars: T, replacement: k, separate: m }));
8531
+ var N = Xi(M + c + C, { mask: $, replacement: k, separate: m, showMask: v }), W = function(U) {
8532
+ var Y, L, Z, oe = U.inputType, te = U.value, E = U.addedValue, _ = U.beforeChangeValue, H = U.mask, G = U.replacement, le = U.separate, se = Qi(te, { mask: H, replacement: G }).filter(function(Ee) {
8533
8533
  var Ue = Ee.type;
8534
8534
  return Ue === "input" || le && Ue === "replacement";
8535
- }), re = (Y = se[F.length + E.length - 1]) === null || Y === void 0 ? void 0 : Y.index, we = (L = se[F.length - 1]) === null || L === void 0 ? void 0 : L.index, ae = (Z = se[F.length + E.length]) === null || Z === void 0 ? void 0 : Z.index;
8535
+ }), re = (Y = se[_.length + E.length - 1]) === null || Y === void 0 ? void 0 : Y.index, we = (L = se[_.length - 1]) === null || L === void 0 ? void 0 : L.index, ae = (Z = se[_.length + E.length]) === null || Z === void 0 ? void 0 : Z.index;
8536
8536
  if (oe === "insert") {
8537
8537
  if (re !== void 0) return re + 1;
8538
8538
  if (ae !== void 0) return ae;
@@ -8550,8 +8550,8 @@ var ts = function(e) {
8550
8550
  return Object.prototype.hasOwnProperty.call(G, Ee);
8551
8551
  });
8552
8552
  return Se !== -1 ? Se : te.length;
8553
- }({ inputType: a, value: _, addedValue: c, beforeChangeValue: M, mask: $, replacement: k, separate: m });
8554
- return { value: _, selectionStart: W, selectionEnd: W, options: { mask: $, replacement: k, separate: m } };
8553
+ }({ inputType: a, value: N, addedValue: c, beforeChangeValue: M, mask: $, replacement: k, separate: m });
8554
+ return { value: N, selectionStart: W, selectionEnd: W, options: { mask: $, replacement: k, separate: m } };
8555
8555
  } }])).format = function(o) {
8556
8556
  return Zi(o, Zt(r));
8557
8557
  }, n.formatToParts = function(o) {
@@ -8591,26 +8591,26 @@ const ns = ({ maskProps: e, ...t }) => {
8591
8591
  size: u,
8592
8592
  name: p,
8593
8593
  ...b
8594
- } = e, [w, $] = ge(null), [k, v] = ge(null), [m, S] = ge(/* @__PURE__ */ new Date()), [A, O] = ge(""), M = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", C = (B) => {
8594
+ } = e, [x, $] = ge(null), [k, v] = ge(null), [m, S] = ge(/* @__PURE__ */ new Date()), [A, O] = ge(""), M = () => a && i ? "dropdown" : a ? "dropdown-months" : i ? "dropdown-years" : "label", C = (B) => {
8595
8595
  v(B.currentTarget);
8596
- }, T = () => {
8596
+ }, j = () => {
8597
8597
  v(null);
8598
- }, j = (B) => {
8598
+ }, T = (B) => {
8599
8599
  B ? (o?.(B), S(B), O(
8600
8600
  B.toLocaleString("ru-RU", {
8601
8601
  day: "2-digit",
8602
8602
  month: "2-digit",
8603
8603
  year: "numeric"
8604
8604
  })
8605
- )) : (O(""), o?.(void 0)), T();
8605
+ )) : (O(""), o?.(void 0)), j();
8606
8606
  }, V = (B) => {
8607
8607
  $(null), O(B.target.value);
8608
- const [_, W, U] = B.target.value.split(".").map(Number);
8609
- if (Number.isNaN(_) || Number.isNaN(W) || Number.isNaN(U) || _ < 1 || _ > 31 || W < 1 || W > 12 || U < 1e3) {
8608
+ const [N, W, U] = B.target.value.split(".").map(Number);
8609
+ if (Number.isNaN(N) || Number.isNaN(W) || Number.isNaN(U) || N < 1 || N > 31 || W < 1 || W > 12 || U < 1e3) {
8610
8610
  $("Некорректная дата");
8611
8611
  return;
8612
8612
  }
8613
- const Y = new Date(U, W - 1, _);
8613
+ const Y = new Date(U, W - 1, N);
8614
8614
  o?.(Y), S(Y);
8615
8615
  };
8616
8616
  return nt(() => {
@@ -8640,8 +8640,8 @@ const ns = ({ maskProps: e, ...t }) => {
8640
8640
  showMask: !0
8641
8641
  },
8642
8642
  placeholder: "дд.мм.гггг",
8643
- error: !!w || s,
8644
- helperText: s || c
8643
+ error: !!x || s,
8644
+ helperText: x || c
8645
8645
  }
8646
8646
  ),
8647
8647
  /* @__PURE__ */ l.jsx(
@@ -8650,7 +8650,7 @@ const ns = ({ maskProps: e, ...t }) => {
8650
8650
  title: "Заголовок",
8651
8651
  open: !!k,
8652
8652
  anchorEl: k,
8653
- onClose: T,
8653
+ onClose: j,
8654
8654
  anchorOrigin: {
8655
8655
  vertical: "bottom",
8656
8656
  horizontal: "right"
@@ -8665,7 +8665,7 @@ const ns = ({ maskProps: e, ...t }) => {
8665
8665
  month: m,
8666
8666
  onMonthChange: S,
8667
8667
  selected: r,
8668
- onSelect: j,
8668
+ onSelect: T,
8669
8669
  ...b,
8670
8670
  mode: "single",
8671
8671
  captionLayout: M()
@@ -8886,7 +8886,7 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
8886
8886
  }) => {
8887
8887
  const a = be(
8888
8888
  (s, c) => {
8889
- const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: b, copyText: w } = c;
8889
+ const { renderValue: d, color: f, canCopy: u, copyPosition: p, variant: b, copyText: x } = c;
8890
8890
  if (d)
8891
8891
  return d(s, c);
8892
8892
  if (b === "tag")
@@ -8900,7 +8900,7 @@ const Py = (e) => /* @__PURE__ */ l.jsx(Nt, { visibleLastSymbolsCount: 4, ...e }
8900
8900
  $isCopy: u,
8901
8901
  color: f,
8902
8902
  copyPosition: p,
8903
- copyText: w,
8903
+ copyText: x,
8904
8904
  children: /* @__PURE__ */ l.jsx(Py, { tooltipProps: $, children: s })
8905
8905
  }
8906
8906
  );
@@ -9129,7 +9129,7 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
9129
9129
  let [o, a] = K.useState(!1), [i, s] = K.useState(!1), [c, d] = K.useState(!1), f = K.useMemo(() => n === "none" ? !1 : (n === "increase-width" || n === "experimental-no-flickering") && o && i, [o, i, n]), u = K.useCallback(() => {
9130
9130
  let p = e.current, b = t.current;
9131
9131
  if (!p || !b || c || n === "none") return;
9132
- let w = p, $ = w.getBoundingClientRect().left + w.offsetWidth, k = w.getBoundingClientRect().top + w.offsetHeight / 2, v = $ - o0, m = k;
9132
+ let x = p, $ = x.getBoundingClientRect().left + x.offsetWidth, k = x.getBoundingClientRect().top + x.offsetHeight / 2, v = $ - o0, m = k;
9133
9133
  document.querySelectorAll(i0).length === 0 && document.elementFromPoint(v, m) === p || (a(!0), d(!0));
9134
9134
  }, [e, t, c, n]);
9135
9135
  return K.useEffect(() => {
@@ -9140,26 +9140,26 @@ function s0({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFo
9140
9140
  s($ >= is);
9141
9141
  }
9142
9142
  b();
9143
- let w = setInterval(b, 1e3);
9143
+ let x = setInterval(b, 1e3);
9144
9144
  return () => {
9145
- clearInterval(w);
9145
+ clearInterval(x);
9146
9146
  };
9147
9147
  }, [e, n]), K.useEffect(() => {
9148
9148
  let p = r || document.activeElement === t.current;
9149
9149
  if (n === "none" || !p) return;
9150
- let b = setTimeout(u, 0), w = setTimeout(u, 2e3), $ = setTimeout(u, 5e3), k = setTimeout(() => {
9150
+ let b = setTimeout(u, 0), x = setTimeout(u, 2e3), $ = setTimeout(u, 5e3), k = setTimeout(() => {
9151
9151
  d(!0);
9152
9152
  }, 6e3);
9153
9153
  return () => {
9154
- clearTimeout(b), clearTimeout(w), clearTimeout($), clearTimeout(k);
9154
+ clearTimeout(b), clearTimeout(x), clearTimeout($), clearTimeout(k);
9155
9155
  };
9156
9156
  }, [t, r, n, u]), { hasPWMBadge: o, willPushPWMBadge: f, PWM_BADGE_SPACE_WIDTH: a0 };
9157
9157
  }
9158
9158
  var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9159
- var n = e, { value: r, onChange: o, maxLength: a, textAlign: i = "left", pattern: s, placeholder: c, inputMode: d = "numeric", onComplete: f, pushPasswordManagerStrategy: u = "increase-width", pasteTransformer: p, containerClassName: b, noScriptCSSFallback: w = c0, render: $, children: k } = n, v = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), m, S, A, O, M;
9160
- let [C, T] = K.useState(typeof v.defaultValue == "string" ? v.defaultValue : ""), j = r ?? C, V = r0(j), B = K.useCallback((q) => {
9161
- o?.(q), T(q);
9162
- }, [o]), _ = K.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), W = K.useRef(null), U = K.useRef(null), Y = K.useRef({ value: j, onChange: B, isIOS: typeof window < "u" && ((S = (m = window?.CSS) == null ? void 0 : m.supports) == null ? void 0 : S.call(m, "-webkit-touch-callout", "none")) }), L = K.useRef({ prev: [(A = W.current) == null ? void 0 : A.selectionStart, (O = W.current) == null ? void 0 : O.selectionEnd, (M = W.current) == null ? void 0 : M.selectionDirection] });
9159
+ var n = e, { value: r, onChange: o, maxLength: a, textAlign: i = "left", pattern: s, placeholder: c, inputMode: d = "numeric", onComplete: f, pushPasswordManagerStrategy: u = "increase-width", pasteTransformer: p, containerClassName: b, noScriptCSSFallback: x = c0, render: $, children: k } = n, v = t0(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), m, S, A, O, M;
9160
+ let [C, j] = K.useState(typeof v.defaultValue == "string" ? v.defaultValue : ""), T = r ?? C, V = r0(T), B = K.useCallback((q) => {
9161
+ o?.(q), j(q);
9162
+ }, [o]), N = K.useMemo(() => s ? typeof s == "string" ? new RegExp(s) : s : null, [s]), W = K.useRef(null), U = K.useRef(null), Y = K.useRef({ value: T, onChange: B, isIOS: typeof window < "u" && ((S = (m = window?.CSS) == null ? void 0 : m.supports) == null ? void 0 : S.call(m, "-webkit-touch-callout", "none")) }), L = K.useRef({ prev: [(A = W.current) == null ? void 0 : A.selectionStart, (O = W.current) == null ? void 0 : O.selectionEnd, (M = W.current) == null ? void 0 : M.selectionDirection] });
9163
9163
  K.useImperativeHandle(t, () => W.current, []), K.useEffect(() => {
9164
9164
  let q = W.current, J = U.current;
9165
9165
  if (!q || !J) return;
@@ -9169,26 +9169,26 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9169
9169
  H(null), le(null);
9170
9170
  return;
9171
9171
  }
9172
- let ie = q.selectionStart, Ie = q.selectionEnd, ct = q.selectionDirection, h = q.maxLength, x = q.value, D = L.current.prev, I = -1, N = -1, P;
9173
- if (x.length !== 0 && ie !== null && Ie !== null) {
9174
- let Ce = ie === Ie, rt = ie === x.length && x.length < h;
9172
+ let ie = q.selectionStart, Ie = q.selectionEnd, ct = q.selectionDirection, h = q.maxLength, w = q.value, D = L.current.prev, I = -1, F = -1, P;
9173
+ if (w.length !== 0 && ie !== null && Ie !== null) {
9174
+ let Ce = ie === Ie, rt = ie === w.length && w.length < h;
9175
9175
  if (Ce && !rt) {
9176
9176
  let Q = ie;
9177
- if (Q === 0) I = 0, N = 1, P = "forward";
9178
- else if (Q === h) I = Q - 1, N = Q, P = "backward";
9179
- else if (h > 1 && x.length > 1) {
9177
+ if (Q === 0) I = 0, F = 1, P = "forward";
9178
+ else if (Q === h) I = Q - 1, F = Q, P = "backward";
9179
+ else if (h > 1 && w.length > 1) {
9180
9180
  let de = 0;
9181
9181
  if (D[0] !== null && D[1] !== null) {
9182
9182
  P = Q < D[1] ? "backward" : "forward";
9183
9183
  let ce = D[0] === D[1] && D[0] < h;
9184
9184
  P === "backward" && !ce && (de = -1);
9185
9185
  }
9186
- I = de + Q, N = de + Q + 1;
9186
+ I = de + Q, F = de + Q + 1;
9187
9187
  }
9188
9188
  }
9189
- I !== -1 && N !== -1 && I !== N && W.current.setSelectionRange(I, N, P);
9189
+ I !== -1 && F !== -1 && I !== F && W.current.setSelectionRange(I, F, P);
9190
9190
  }
9191
- let z = I !== -1 ? I : ie, ne = N !== -1 ? N : Ie, ue = P ?? ct;
9191
+ let z = I !== -1 ? I : ie, ne = F !== -1 ? F : Ie, ue = P ?? ct;
9192
9192
  H(z), le(ne), L.current.prev = [z, ne, ue];
9193
9193
  }
9194
9194
  if (document.addEventListener("selectionchange", $e, { capture: !0 }), $e(), document.activeElement === q && E(!0), !document.getElementById("input-otp-style")) {
@@ -9207,7 +9207,7 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9207
9207
  document.removeEventListener("selectionchange", $e, { capture: !0 }), Ne.disconnect();
9208
9208
  };
9209
9209
  }, []);
9210
- let [Z, oe] = K.useState(!1), [te, E] = K.useState(!1), [F, H] = K.useState(null), [G, le] = K.useState(null);
9210
+ let [Z, oe] = K.useState(!1), [te, E] = K.useState(!1), [_, H] = K.useState(null), [G, le] = K.useState(null);
9211
9211
  K.useEffect(() => {
9212
9212
  n0(() => {
9213
9213
  var q, J, $e, ke;
@@ -9215,17 +9215,17 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9215
9215
  let Ne = (J = W.current) == null ? void 0 : J.selectionStart, ie = ($e = W.current) == null ? void 0 : $e.selectionEnd, Ie = (ke = W.current) == null ? void 0 : ke.selectionDirection;
9216
9216
  Ne !== null && ie !== null && (H(Ne), le(ie), L.current.prev = [Ne, ie, Ie]);
9217
9217
  });
9218
- }, [j, te]), K.useEffect(() => {
9219
- V !== void 0 && j !== V && V.length < a && j.length === a && f?.(j);
9220
- }, [a, f, V, j]);
9218
+ }, [T, te]), K.useEffect(() => {
9219
+ V !== void 0 && T !== V && V.length < a && T.length === a && f?.(T);
9220
+ }, [a, f, V, T]);
9221
9221
  let se = s0({ containerRef: U, inputRef: W, pushPasswordManagerStrategy: u, isFocused: te }), re = K.useCallback((q) => {
9222
9222
  let J = q.currentTarget.value.slice(0, a);
9223
- if (J.length > 0 && _ && !_.test(J)) {
9223
+ if (J.length > 0 && N && !N.test(J)) {
9224
9224
  q.preventDefault();
9225
9225
  return;
9226
9226
  }
9227
9227
  typeof V == "string" && J.length < V.length && document.dispatchEvent(new Event("selectionchange")), B(J);
9228
- }, [a, B, V, _]), we = K.useCallback(() => {
9228
+ }, [a, B, V, N]), we = K.useCallback(() => {
9229
9229
  var q;
9230
9230
  if (W.current) {
9231
9231
  let J = Math.min(W.current.value.length, a - 1), $e = W.current.value.length;
@@ -9238,12 +9238,12 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9238
9238
  if (!p && (!Y.current.isIOS || !q.clipboardData || !ke)) return;
9239
9239
  let Ne = q.clipboardData.getData("text/plain"), ie = p ? p(Ne) : Ne;
9240
9240
  q.preventDefault();
9241
- let Ie = (J = W.current) == null ? void 0 : J.selectionStart, ct = ($e = W.current) == null ? void 0 : $e.selectionEnd, h = (Ie !== ct ? j.slice(0, Ie) + ie + j.slice(ct) : j.slice(0, Ie) + ie + j.slice(Ie)).slice(0, a);
9242
- if (h.length > 0 && _ && !_.test(h)) return;
9241
+ let Ie = (J = W.current) == null ? void 0 : J.selectionStart, ct = ($e = W.current) == null ? void 0 : $e.selectionEnd, h = (Ie !== ct ? T.slice(0, Ie) + ie + T.slice(ct) : T.slice(0, Ie) + ie + T.slice(Ie)).slice(0, a);
9242
+ if (h.length > 0 && N && !N.test(h)) return;
9243
9243
  ke.value = h, B(h);
9244
- let x = Math.min(h.length, a - 1), D = h.length;
9245
- ke.setSelectionRange(x, D), H(x), le(D);
9246
- }, [a, B, _, j]), Se = K.useMemo(() => ({ position: "relative", cursor: v.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [v.disabled]), Ee = K.useMemo(() => ({ position: "absolute", inset: 0, width: se.willPushPWMBadge ? `calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: se.willPushPWMBadge ? `inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: i, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [se.PWM_BADGE_SPACE_WIDTH, se.willPushPWMBadge, i]), Ue = K.useMemo(() => K.createElement("input", e0(Ky({ autoComplete: v.autoComplete || "one-time-code" }, v), { "data-input-otp": !0, "data-input-otp-placeholder-shown": j.length === 0 || void 0, "data-input-otp-mss": F, "data-input-otp-mse": G, inputMode: d, pattern: _?.source, "aria-placeholder": c, style: Ee, maxLength: a, value: j, ref: W, onPaste: (q) => {
9244
+ let w = Math.min(h.length, a - 1), D = h.length;
9245
+ ke.setSelectionRange(w, D), H(w), le(D);
9246
+ }, [a, B, N, T]), Se = K.useMemo(() => ({ position: "relative", cursor: v.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [v.disabled]), Ee = K.useMemo(() => ({ position: "absolute", inset: 0, width: se.willPushPWMBadge ? `calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: se.willPushPWMBadge ? `inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: i, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [se.PWM_BADGE_SPACE_WIDTH, se.willPushPWMBadge, i]), Ue = K.useMemo(() => K.createElement("input", e0(Ky({ autoComplete: v.autoComplete || "one-time-code" }, v), { "data-input-otp": !0, "data-input-otp-placeholder-shown": T.length === 0 || void 0, "data-input-otp-mss": _, "data-input-otp-mse": G, inputMode: d, pattern: N?.source, "aria-placeholder": c, style: Ee, maxLength: a, value: T, ref: W, onPaste: (q) => {
9247
9247
  var J;
9248
9248
  ae(q), (J = v.onPaste) == null || J.call(v, q);
9249
9249
  }, onChange: re, onMouseOver: (q) => {
@@ -9258,12 +9258,12 @@ var l0 = K.createContext({}), ss = K.forwardRef((e, t) => {
9258
9258
  }, onBlur: (q) => {
9259
9259
  var J;
9260
9260
  E(!1), (J = v.onBlur) == null || J.call(v, q);
9261
- } })), [re, we, ae, d, Ee, a, G, F, v, _?.source, j]), lt = K.useMemo(() => ({ slots: Array.from({ length: a }).map((q, J) => {
9261
+ } })), [re, we, ae, d, Ee, a, G, _, v, N?.source, T]), lt = K.useMemo(() => ({ slots: Array.from({ length: a }).map((q, J) => {
9262
9262
  var $e;
9263
- let ke = te && F !== null && G !== null && (F === G && J === F || J >= F && J < G), Ne = j[J] !== void 0 ? j[J] : null, ie = j[0] !== void 0 ? null : ($e = c?.[J]) != null ? $e : null;
9263
+ let ke = te && _ !== null && G !== null && (_ === G && J === _ || J >= _ && J < G), Ne = T[J] !== void 0 ? T[J] : null, ie = T[0] !== void 0 ? null : ($e = c?.[J]) != null ? $e : null;
9264
9264
  return { char: Ne, placeholderChar: ie, isActive: ke, hasFakeCaret: ke && Ne === null };
9265
- }), isFocused: te, isHovering: !v.disabled && Z }), [te, Z, a, G, F, v.disabled, j]), Wt = K.useMemo(() => $ ? $(lt) : K.createElement(l0.Provider, { value: lt }, k), [k, lt, $]);
9266
- return K.createElement(K.Fragment, null, w !== null && K.createElement("noscript", null, K.createElement("style", null, w)), K.createElement("div", { ref: U, "data-input-otp-container": !0, style: Se, className: b }, Wt, K.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ue)));
9265
+ }), isFocused: te, isHovering: !v.disabled && Z }), [te, Z, a, G, _, v.disabled, T]), Wt = K.useMemo(() => $ ? $(lt) : K.createElement(l0.Provider, { value: lt }, k), [k, lt, $]);
9266
+ return K.createElement(K.Fragment, null, x !== null && K.createElement("noscript", null, K.createElement("style", null, x)), K.createElement("div", { ref: U, "data-input-otp-container": !0, style: Se, className: b }, Wt, K.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, Ue)));
9267
9267
  });
9268
9268
  ss.displayName = "Input";
9269
9269
  function dn(e, t) {
@@ -9674,36 +9674,36 @@ class _0 {
9674
9674
  });
9675
9675
  else if (N0(d) && !d.ok) {
9676
9676
  a = !1;
9677
- const u = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, p = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description, w = typeof u == "object" && !g.isValidElement(u) ? u : {
9677
+ const u = typeof n.error == "function" ? await n.error(`HTTP error! status: ${d.status}`) : n.error, p = typeof n.description == "function" ? await n.description(`HTTP error! status: ${d.status}`) : n.description, x = typeof u == "object" && !g.isValidElement(u) ? u : {
9678
9678
  message: u
9679
9679
  };
9680
9680
  this.create({
9681
9681
  id: r,
9682
9682
  type: "error",
9683
9683
  description: p,
9684
- ...w
9684
+ ...x
9685
9685
  });
9686
9686
  } else if (d instanceof Error) {
9687
9687
  a = !1;
9688
- const u = typeof n.error == "function" ? await n.error(d) : n.error, p = typeof n.description == "function" ? await n.description(d) : n.description, w = typeof u == "object" && !g.isValidElement(u) ? u : {
9688
+ const u = typeof n.error == "function" ? await n.error(d) : n.error, p = typeof n.description == "function" ? await n.description(d) : n.description, x = typeof u == "object" && !g.isValidElement(u) ? u : {
9689
9689
  message: u
9690
9690
  };
9691
9691
  this.create({
9692
9692
  id: r,
9693
9693
  type: "error",
9694
9694
  description: p,
9695
- ...w
9695
+ ...x
9696
9696
  });
9697
9697
  } else if (n.success !== void 0) {
9698
9698
  a = !1;
9699
- const u = typeof n.success == "function" ? await n.success(d) : n.success, p = typeof n.description == "function" ? await n.description(d) : n.description, w = typeof u == "object" && !g.isValidElement(u) ? u : {
9699
+ const u = typeof n.success == "function" ? await n.success(d) : n.success, p = typeof n.description == "function" ? await n.description(d) : n.description, x = typeof u == "object" && !g.isValidElement(u) ? u : {
9700
9700
  message: u
9701
9701
  };
9702
9702
  this.create({
9703
9703
  id: r,
9704
9704
  type: "success",
9705
9705
  description: p,
9706
- ...w
9706
+ ...x
9707
9707
  });
9708
9708
  }
9709
9709
  }).catch(async (d) => {
@@ -9775,7 +9775,7 @@ function q0(e) {
9775
9775
  }
9776
9776
  const X0 = (e) => {
9777
9777
  var t, n, r, o, a, i, s, c, d;
9778
- const { invert: f, toast: u, unstyled: p, interacting: b, setHeights: w, visibleToasts: $, heights: k, index: v, toasts: m, expanded: S, removeToast: A, defaultRichColors: O, closeButton: M, style: C, cancelButtonStyle: T, actionButtonStyle: j, className: V = "", descriptionClassName: B = "", duration: _, position: W, gap: U, expandByDefault: Y, classNames: L, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, E] = g.useState(null), [F, H] = g.useState(null), [G, le] = g.useState(!1), [se, re] = g.useState(!1), [we, ae] = g.useState(!1), [Se, Ee] = g.useState(!1), [Ue, lt] = g.useState(!1), [Wt, q] = g.useState(0), [J, $e] = g.useState(0), ke = g.useRef(u.duration || _ || ga), Ne = g.useRef(null), ie = g.useRef(null), Ie = v === 0, ct = v + 1 <= $, h = u.type, x = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", N = g.useMemo(() => k.findIndex((ee) => ee.toastId === u.id) || 0, [
9778
+ const { invert: f, toast: u, unstyled: p, interacting: b, setHeights: x, visibleToasts: $, heights: k, index: v, toasts: m, expanded: S, removeToast: A, defaultRichColors: O, closeButton: M, style: C, cancelButtonStyle: j, actionButtonStyle: T, className: V = "", descriptionClassName: B = "", duration: N, position: W, gap: U, expandByDefault: Y, classNames: L, icons: Z, closeButtonAriaLabel: oe = "Close toast" } = e, [te, E] = g.useState(null), [_, H] = g.useState(null), [G, le] = g.useState(!1), [se, re] = g.useState(!1), [we, ae] = g.useState(!1), [Se, Ee] = g.useState(!1), [Ue, lt] = g.useState(!1), [Wt, q] = g.useState(0), [J, $e] = g.useState(0), ke = g.useRef(u.duration || N || ga), Ne = g.useRef(null), ie = g.useRef(null), Ie = v === 0, ct = v + 1 <= $, h = u.type, w = u.dismissible !== !1, D = u.className || "", I = u.descriptionClassName || "", F = g.useMemo(() => k.findIndex((ee) => ee.toastId === u.id) || 0, [
9779
9779
  k,
9780
9780
  u.id
9781
9781
  ]), P = g.useMemo(() => {
@@ -9784,15 +9784,15 @@ const X0 = (e) => {
9784
9784
  }, [
9785
9785
  u.closeButton,
9786
9786
  M
9787
- ]), z = g.useMemo(() => u.duration || _ || ga, [
9787
+ ]), z = g.useMemo(() => u.duration || N || ga, [
9788
9788
  u.duration,
9789
- _
9790
- ]), ne = g.useRef(0), ue = g.useRef(0), Ce = g.useRef(0), rt = g.useRef(null), [Q, de] = W.split("-"), ce = g.useMemo(() => k.reduce((ee, Oe, Pe) => Pe >= N ? ee : ee + Oe.height, 0), [
9791
- k,
9792
9789
  N
9790
+ ]), ne = g.useRef(0), ue = g.useRef(0), Ce = g.useRef(0), rt = g.useRef(null), [Q, de] = W.split("-"), ce = g.useMemo(() => k.reduce((ee, Oe, Pe) => Pe >= F ? ee : ee + Oe.height, 0), [
9791
+ k,
9792
+ F
9793
9793
  ]), qe = A0(), He = u.invert || f, ut = h === "loading";
9794
- ue.current = g.useMemo(() => N * U + ce, [
9795
- N,
9794
+ ue.current = g.useMemo(() => F * U + ce, [
9795
+ F,
9796
9796
  ce
9797
9797
  ]), g.useEffect(() => {
9798
9798
  ke.current = z;
@@ -9804,24 +9804,24 @@ const X0 = (e) => {
9804
9804
  const ee = ie.current;
9805
9805
  if (ee) {
9806
9806
  const Oe = ee.getBoundingClientRect().height;
9807
- return $e(Oe), w((Pe) => [
9807
+ return $e(Oe), x((Pe) => [
9808
9808
  {
9809
9809
  toastId: u.id,
9810
9810
  height: Oe,
9811
9811
  position: u.position
9812
9812
  },
9813
9813
  ...Pe
9814
- ]), () => w((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
9814
+ ]), () => x((Pe) => Pe.filter((Je) => Je.toastId !== u.id));
9815
9815
  }
9816
9816
  }, [
9817
- w,
9817
+ x,
9818
9818
  u.id
9819
9819
  ]), g.useLayoutEffect(() => {
9820
9820
  if (!G) return;
9821
9821
  const ee = ie.current, Oe = ee.style.height;
9822
9822
  ee.style.height = "auto";
9823
9823
  const Pe = ee.getBoundingClientRect().height;
9824
- ee.style.height = Oe, $e(Pe), w((Je) => Je.find((Be) => Be.toastId === u.id) ? Je.map((Be) => Be.toastId === u.id ? {
9824
+ ee.style.height = Oe, $e(Pe), x((Je) => Je.find((Be) => Be.toastId === u.id) ? Je.map((Be) => Be.toastId === u.id ? {
9825
9825
  ...Be,
9826
9826
  height: Pe
9827
9827
  } : Be) : [
@@ -9836,17 +9836,17 @@ const X0 = (e) => {
9836
9836
  G,
9837
9837
  u.title,
9838
9838
  u.description,
9839
- w,
9839
+ x,
9840
9840
  u.id
9841
9841
  ]);
9842
9842
  const ve = g.useCallback(() => {
9843
- re(!0), q(ue.current), w((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
9843
+ re(!0), q(ue.current), x((ee) => ee.filter((Oe) => Oe.toastId !== u.id)), setTimeout(() => {
9844
9844
  A(u);
9845
9845
  }, U0);
9846
9846
  }, [
9847
9847
  u,
9848
9848
  A,
9849
- w,
9849
+ x,
9850
9850
  ue
9851
9851
  ]);
9852
9852
  g.useEffect(() => {
@@ -9909,11 +9909,11 @@ const X0 = (e) => {
9909
9909
  "data-index": v,
9910
9910
  "data-front": Ie,
9911
9911
  "data-swiping": we,
9912
- "data-dismissible": x,
9912
+ "data-dismissible": w,
9913
9913
  "data-type": h,
9914
9914
  "data-invert": He,
9915
9915
  "data-swipe-out": Se,
9916
- "data-swipe-direction": F,
9916
+ "data-swipe-direction": _,
9917
9917
  "data-expanded": !!(S || Y && G),
9918
9918
  style: {
9919
9919
  "--index": v,
@@ -9928,14 +9928,14 @@ const X0 = (e) => {
9928
9928
  ae(!1), E(null), rt.current = null;
9929
9929
  },
9930
9930
  onPointerDown: (ee) => {
9931
- ut || !x || (Ne.current = /* @__PURE__ */ new Date(), q(ue.current), ee.target.setPointerCapture(ee.pointerId), ee.target.tagName !== "BUTTON" && (ae(!0), rt.current = {
9931
+ ut || !w || (Ne.current = /* @__PURE__ */ new Date(), q(ue.current), ee.target.setPointerCapture(ee.pointerId), ee.target.tagName !== "BUTTON" && (ae(!0), rt.current = {
9932
9932
  x: ee.clientX,
9933
9933
  y: ee.clientY
9934
9934
  }));
9935
9935
  },
9936
9936
  onPointerUp: () => {
9937
9937
  var ee, Oe, Pe;
9938
- if (Se || !x) return;
9938
+ if (Se || !w) return;
9939
9939
  rt.current = null;
9940
9940
  const Je = Number(((ee = ie.current) == null ? void 0 : ee.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Wn = Number(((Oe = ie.current) == null ? void 0 : Oe.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Be = (/* @__PURE__ */ new Date()).getTime() - ((Pe = Ne.current) == null ? void 0 : Pe.getTime()), at = te === "x" ? Je : Wn, In = Math.abs(at) / Be;
9941
9941
  if (Math.abs(at) >= G0 || In > 0.11) {
@@ -9949,7 +9949,7 @@ const X0 = (e) => {
9949
9949
  },
9950
9950
  onPointerMove: (ee) => {
9951
9951
  var Oe, Pe, Je;
9952
- if (!rt.current || !x || ((Oe = window.getSelection()) == null ? void 0 : Oe.toString().length) > 0) return;
9952
+ if (!rt.current || !w || ((Oe = window.getSelection()) == null ? void 0 : Oe.toString().length) > 0) return;
9953
9953
  const Be = ee.clientY - rt.current.y, at = ee.clientX - rt.current.x;
9954
9954
  var In;
9955
9955
  const dt = (In = e.swipeDirections) != null ? In : q0(W);
@@ -9980,7 +9980,7 @@ const X0 = (e) => {
9980
9980
  "aria-label": oe,
9981
9981
  "data-disabled": ut,
9982
9982
  "data-close-button": !0,
9983
- onClick: ut || !x ? () => {
9983
+ onClick: ut || !w ? () => {
9984
9984
  } : () => {
9985
9985
  ve(), u.onDismiss == null || u.onDismiss.call(u, u);
9986
9986
  },
@@ -10000,15 +10000,15 @@ const X0 = (e) => {
10000
10000
  }, typeof u.description == "function" ? u.description() : u.description) : null), /* @__PURE__ */ g.isValidElement(u.cancel) ? u.cancel : u.cancel && Vn(u.cancel) ? /* @__PURE__ */ g.createElement("button", {
10001
10001
  "data-button": !0,
10002
10002
  "data-cancel": !0,
10003
- style: u.cancelButtonStyle || T,
10003
+ style: u.cancelButtonStyle || j,
10004
10004
  onClick: (ee) => {
10005
- Vn(u.cancel) && x && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, ee), ve());
10005
+ Vn(u.cancel) && w && (u.cancel.onClick == null || u.cancel.onClick.call(u.cancel, ee), ve());
10006
10006
  },
10007
10007
  className: gt(L?.cancelButton, u == null || (c = u.classNames) == null ? void 0 : c.cancelButton)
10008
10008
  }, u.cancel.label) : null, /* @__PURE__ */ g.isValidElement(u.action) ? u.action : u.action && Vn(u.action) ? /* @__PURE__ */ g.createElement("button", {
10009
10009
  "data-button": !0,
10010
10010
  "data-action": !0,
10011
- style: u.actionButtonStyle || j,
10011
+ style: u.actionButtonStyle || T,
10012
10012
  onClick: (ee) => {
10013
10013
  Vn(u.action) && (u.action.onClick == null || u.action.onClick.call(u.action, ee), !ee.defaultPrevented && ve());
10014
10014
  },
@@ -10051,21 +10051,21 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10051
10051
  const { invert: r, position: o = "bottom-right", hotkey: a = [
10052
10052
  "altKey",
10053
10053
  "KeyT"
10054
- ], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: b, style: w, visibleToasts: $ = L0, toastOptions: k, dir: v = ma(), gap: m = Y0, icons: S, containerAriaLabel: A = "Notifications" } = t, [O, M] = g.useState([]), C = g.useMemo(() => Array.from(new Set([
10054
+ ], expand: i, closeButton: s, className: c, offset: d, mobileOffset: f, theme: u = "light", richColors: p, duration: b, style: x, visibleToasts: $ = L0, toastOptions: k, dir: v = ma(), gap: m = Y0, icons: S, containerAriaLabel: A = "Notifications" } = t, [O, M] = g.useState([]), C = g.useMemo(() => Array.from(new Set([
10055
10055
  o
10056
- ].concat(O.filter((F) => F.position).map((F) => F.position)))), [
10056
+ ].concat(O.filter((_) => _.position).map((_) => _.position)))), [
10057
10057
  O,
10058
10058
  o
10059
- ]), [T, j] = g.useState([]), [V, B] = g.useState(!1), [_, W] = g.useState(!1), [U, Y] = g.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), L = g.useRef(null), Z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), oe = g.useRef(null), te = g.useRef(!1), E = g.useCallback((F) => {
10059
+ ]), [j, T] = g.useState([]), [V, B] = g.useState(!1), [N, W] = g.useState(!1), [U, Y] = g.useState(u !== "system" ? u : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), L = g.useRef(null), Z = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), oe = g.useRef(null), te = g.useRef(!1), E = g.useCallback((_) => {
10060
10060
  M((H) => {
10061
10061
  var G;
10062
- return (G = H.find((le) => le.id === F.id)) != null && G.delete || Xe.dismiss(F.id), H.filter(({ id: le }) => le !== F.id);
10062
+ return (G = H.find((le) => le.id === _.id)) != null && G.delete || Xe.dismiss(_.id), H.filter(({ id: le }) => le !== _.id);
10063
10063
  });
10064
10064
  }, []);
10065
- return g.useEffect(() => Xe.subscribe((F) => {
10066
- if (F.dismiss) {
10065
+ return g.useEffect(() => Xe.subscribe((_) => {
10066
+ if (_.dismiss) {
10067
10067
  requestAnimationFrame(() => {
10068
- M((H) => H.map((G) => G.id === F.id ? {
10068
+ M((H) => H.map((G) => G.id === _.id ? {
10069
10069
  ...G,
10070
10070
  delete: !0
10071
10071
  } : G));
@@ -10075,16 +10075,16 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10075
10075
  setTimeout(() => {
10076
10076
  Zl.flushSync(() => {
10077
10077
  M((H) => {
10078
- const G = H.findIndex((le) => le.id === F.id);
10078
+ const G = H.findIndex((le) => le.id === _.id);
10079
10079
  return G !== -1 ? [
10080
10080
  ...H.slice(0, G),
10081
10081
  {
10082
10082
  ...H[G],
10083
- ...F
10083
+ ..._
10084
10084
  },
10085
10085
  ...H.slice(G + 1)
10086
10086
  ] : [
10087
- F,
10087
+ _,
10088
10088
  ...H
10089
10089
  ];
10090
10090
  });
@@ -10098,13 +10098,13 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10098
10098
  return;
10099
10099
  }
10100
10100
  if (u === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? Y("dark") : Y("light")), typeof window > "u") return;
10101
- const F = window.matchMedia("(prefers-color-scheme: dark)");
10101
+ const _ = window.matchMedia("(prefers-color-scheme: dark)");
10102
10102
  try {
10103
- F.addEventListener("change", ({ matches: H }) => {
10103
+ _.addEventListener("change", ({ matches: H }) => {
10104
10104
  Y(H ? "dark" : "light");
10105
10105
  });
10106
10106
  } catch {
10107
- F.addListener(({ matches: G }) => {
10107
+ _.addListener(({ matches: G }) => {
10108
10108
  try {
10109
10109
  Y(G ? "dark" : "light");
10110
10110
  } catch (le) {
@@ -10119,7 +10119,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10119
10119
  }, [
10120
10120
  O
10121
10121
  ]), g.useEffect(() => {
10122
- const F = (H) => {
10122
+ const _ = (H) => {
10123
10123
  var G;
10124
10124
  if (a.every((re) => H[re] || H.code === re)) {
10125
10125
  var se;
@@ -10127,7 +10127,7 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10127
10127
  }
10128
10128
  H.code === "Escape" && (document.activeElement === L.current || (G = L.current) != null && G.contains(document.activeElement)) && B(!1);
10129
10129
  };
10130
- return document.addEventListener("keydown", F), () => document.removeEventListener("keydown", F);
10130
+ return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
10131
10131
  }, [
10132
10132
  a
10133
10133
  ]), g.useEffect(() => {
@@ -10148,11 +10148,11 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10148
10148
  "aria-relevant": "additions text",
10149
10149
  "aria-atomic": "false",
10150
10150
  suppressHydrationWarning: !0
10151
- }, C.map((F, H) => {
10151
+ }, C.map((_, H) => {
10152
10152
  var G;
10153
- const [le, se] = F.split("-");
10153
+ const [le, se] = _.split("-");
10154
10154
  return O.length ? /* @__PURE__ */ g.createElement("ol", {
10155
- key: F,
10155
+ key: _,
10156
10156
  dir: v === "auto" ? ma() : v,
10157
10157
  tabIndex: -1,
10158
10158
  ref: L,
@@ -10163,10 +10163,10 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10163
10163
  "data-lifted": V && O.length > 1 && !i,
10164
10164
  "data-x-position": se,
10165
10165
  style: {
10166
- "--front-toast-height": `${((G = T[0]) == null ? void 0 : G.height) || 0}px`,
10166
+ "--front-toast-height": `${((G = j[0]) == null ? void 0 : G.height) || 0}px`,
10167
10167
  "--width": `${H0}px`,
10168
10168
  "--gap": `${m}px`,
10169
- ...w,
10169
+ ...x,
10170
10170
  ...Q0(d, f)
10171
10171
  },
10172
10172
  onBlur: (re) => {
@@ -10180,14 +10180,14 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10180
10180
  onMouseEnter: () => B(!0),
10181
10181
  onMouseMove: () => B(!0),
10182
10182
  onMouseLeave: () => {
10183
- _ || B(!1);
10183
+ N || B(!1);
10184
10184
  },
10185
10185
  onDragEnd: () => B(!1),
10186
10186
  onPointerDown: (re) => {
10187
10187
  re.target instanceof HTMLElement && re.target.dataset.dismissible === "false" || W(!0);
10188
10188
  },
10189
10189
  onPointerUp: () => W(!1)
10190
- }, O.filter((re) => !re.position && H === 0 || re.position === F).map((re, we) => {
10190
+ }, O.filter((re) => !re.position && H === 0 || re.position === _).map((re, we) => {
10191
10191
  var ae, Se;
10192
10192
  return /* @__PURE__ */ g.createElement(X0, {
10193
10193
  key: re.id,
@@ -10201,8 +10201,8 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10201
10201
  invert: r,
10202
10202
  visibleToasts: $,
10203
10203
  closeButton: (Se = k?.closeButton) != null ? Se : s,
10204
- interacting: _,
10205
- position: F,
10204
+ interacting: N,
10205
+ position: _,
10206
10206
  style: k?.style,
10207
10207
  unstyled: k?.unstyled,
10208
10208
  classNames: k?.classNames,
@@ -10211,8 +10211,8 @@ const Z0 = /* @__PURE__ */ g.forwardRef(function(t, n) {
10211
10211
  closeButtonAriaLabel: k?.closeButtonAriaLabel,
10212
10212
  removeToast: E,
10213
10213
  toasts: O.filter((Ee) => Ee.position == re.position),
10214
- heights: T.filter((Ee) => Ee.position == re.position),
10215
- setHeights: j,
10214
+ heights: j.filter((Ee) => Ee.position == re.position),
10215
+ setHeights: T,
10216
10216
  expandByDefault: i,
10217
10217
  gap: m,
10218
10218
  expanded: V,
@@ -10505,18 +10505,14 @@ const kb = [
10505
10505
  className: u,
10506
10506
  size: p,
10507
10507
  fullWidth: b,
10508
- name: w
10508
+ name: x
10509
10509
  } = e, $ = /* @__PURE__ */ new Date(), [k, v] = ge(null), [m, S] = ge($.getFullYear()), A = (j) => {
10510
10510
  v(j.currentTarget);
10511
10511
  }, O = () => {
10512
10512
  v(null);
10513
10513
  }, M = (j) => {
10514
- S(j);
10515
- const V = new Date(j, r?.getMonth() || 0, r?.getDate() || 1);
10516
- o?.(V);
10517
- }, C = (j) => {
10518
10514
  o?.(j), O();
10519
- }, T = a === "month" ? r?.toLocaleDateString("ru-RU", {
10515
+ }, C = a === "month" ? r?.toLocaleDateString("ru-RU", {
10520
10516
  month: "long",
10521
10517
  year: "numeric"
10522
10518
  }) : Mb(r);
@@ -10527,11 +10523,11 @@ const kb = [
10527
10523
  rn,
10528
10524
  {
10529
10525
  label: t,
10530
- value: T,
10526
+ value: C,
10531
10527
  disabled: n,
10532
10528
  size: p,
10533
10529
  fullWidth: b,
10534
- name: w,
10530
+ name: x,
10535
10531
  endAdornment: /* @__PURE__ */ l.jsx(Ze, { disabled: n, variant: "text", onClick: A, children: /* @__PURE__ */ l.jsx(_a, {}) }),
10536
10532
  placeholder: i,
10537
10533
  error: s,
@@ -10558,35 +10554,35 @@ const kb = [
10558
10554
  wb,
10559
10555
  {
10560
10556
  year: m,
10561
- onSelect: M,
10557
+ onSelect: S,
10562
10558
  minDate: f,
10563
10559
  maxDate: d
10564
10560
  }
10565
10561
  ),
10566
- a === "month" ? /* @__PURE__ */ l.jsx(Sb, { children: kb.map((j, V) => {
10567
- const B = new Date(m, V, r?.getDate() || 1);
10562
+ a === "month" ? /* @__PURE__ */ l.jsx(Sb, { children: kb.map((j, T) => {
10563
+ const V = new Date(m, T, r?.getDate() || 1);
10568
10564
  return /* @__PURE__ */ l.jsx(
10569
10565
  Fe,
10570
10566
  {
10571
10567
  variant: "text",
10572
10568
  size: "small",
10573
- disabled: B < f || B > d,
10574
- onClick: () => C(B),
10575
- selected: r?.getMonth() === V,
10569
+ disabled: V < f || V > d,
10570
+ onClick: () => M(V),
10571
+ selected: r?.getMonth() === T && r.getFullYear() === V.getFullYear(),
10576
10572
  children: j
10577
10573
  },
10578
10574
  j
10579
10575
  );
10580
- }) }) : /* @__PURE__ */ l.jsx($b, { children: fs.map((j, V) => {
10581
- const B = V * 3, _ = new Date(m, B, 1);
10576
+ }) }) : /* @__PURE__ */ l.jsx($b, { children: fs.map((j, T) => {
10577
+ const V = T * 3, B = new Date(m, V, 1);
10582
10578
  return /* @__PURE__ */ l.jsx(
10583
10579
  Fe,
10584
10580
  {
10585
10581
  variant: "text",
10586
10582
  size: "small",
10587
- disabled: _ < f || _ > d,
10588
- onClick: () => C(_),
10589
- selected: r ? ps(r.getMonth()) === V : !1,
10583
+ disabled: B < f || B > d,
10584
+ onClick: () => M(B),
10585
+ selected: r ? ps(r.getMonth()) === T && r.getFullYear() === B.getFullYear() : !1,
10590
10586
  children: j
10591
10587
  },
10592
10588
  j
@@ -10980,7 +10976,7 @@ function gx({
10980
10976
  }) {
10981
10977
  const [d, f] = ge(e), [u, p] = ge(t), b = (m, S) => {
10982
10978
  Array.isArray(S) && (f(S[0]), p(S[1]));
10983
- }, w = (m) => {
10979
+ }, x = (m) => {
10984
10980
  const { value: S } = m.target;
10985
10981
  Number.isNaN(+S) || f(+S);
10986
10982
  }, $ = (m) => {
@@ -11006,7 +11002,7 @@ function gx({
11006
11002
  type: "text",
11007
11003
  name: "minVal",
11008
11004
  value: d,
11009
- onChange: w,
11005
+ onChange: x,
11010
11006
  onKeyDown: k
11011
11007
  }
11012
11008
  ),
@@ -11073,7 +11069,7 @@ const Ub = y(zs)`
11073
11069
  f(v.target.value), u.current && clearTimeout(u.current), u.current = setTimeout(() => {
11074
11070
  n?.(v);
11075
11071
  }, i);
11076
- }, w = () => {
11072
+ }, x = () => {
11077
11073
  f(""), p.current && (p.current.value = ""), u.current && clearTimeout(u.current);
11078
11074
  const v = new InputEvent("input", {
11079
11075
  bubbles: !0,
@@ -11097,7 +11093,7 @@ const Ub = y(zs)`
11097
11093
  qb,
11098
11094
  {
11099
11095
  variant: "text",
11100
- onClick: w,
11096
+ onClick: x,
11101
11097
  disabled: r || !k,
11102
11098
  $isActive: k,
11103
11099
  children: /* @__PURE__ */ l.jsx(Qb, {})
@@ -11544,7 +11540,7 @@ function hv(e) {
11544
11540
  name: n
11545
11541
  },
11546
11542
  type: Qn.BLUR
11547
- }), [n, o._formValues]), w = g.useCallback((k) => {
11543
+ }), [n, o._formValues]), x = g.useCallback((k) => {
11548
11544
  const v = R(o._fields, n);
11549
11545
  v && k && (v._f.ref = k);
11550
11546
  }, [o._fields, n]), $ = g.useMemo(() => ({
@@ -11553,8 +11549,8 @@ function hv(e) {
11553
11549
  ...et(r) || c.disabled ? { disabled: c.disabled || r } : {},
11554
11550
  onChange: p,
11555
11551
  onBlur: b,
11556
- ref: w
11557
- }), [n, r, c.disabled, p, b, w, s]);
11552
+ ref: x
11553
+ }), [n, r, c.disabled, p, b, x, s]);
11558
11554
  return g.useEffect(() => {
11559
11555
  const k = o._options.shouldUnregister || a;
11560
11556
  o.register(n, {
@@ -11784,23 +11780,23 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
11784
11780
  value: e,
11785
11781
  message: ""
11786
11782
  }, Hr = async (e, t, n, r, o, a) => {
11787
- const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: b, validate: w, name: $, valueAsNumber: k, mount: v } = e._f, m = R(n, $);
11783
+ const { ref: i, refs: s, required: c, maxLength: d, minLength: f, min: u, max: p, pattern: b, validate: x, name: $, valueAsNumber: k, mount: v } = e._f, m = R(n, $);
11788
11784
  if (!v || t.has($))
11789
11785
  return {};
11790
- const S = s ? s[0] : i, A = (_) => {
11791
- o && S.reportValidity && (S.setCustomValidity(et(_) ? "" : _ || ""), S.reportValidity());
11792
- }, O = {}, M = ho(i), C = Tn(i), T = M || C, j = (k || po(i)) && xe(i.value) && xe(m) || Zn(i) && i.value === "" || m === "" || Array.isArray(m) && !m.length, V = gv.bind(null, $, r, O), B = (_, W, U, Y = Ct.maxLength, L = Ct.minLength) => {
11793
- const Z = _ ? W : U;
11786
+ const S = s ? s[0] : i, A = (N) => {
11787
+ o && S.reportValidity && (S.setCustomValidity(et(N) ? "" : N || ""), S.reportValidity());
11788
+ }, O = {}, M = ho(i), C = Tn(i), j = M || C, T = (k || po(i)) && xe(i.value) && xe(m) || Zn(i) && i.value === "" || m === "" || Array.isArray(m) && !m.length, V = gv.bind(null, $, r, O), B = (N, W, U, Y = Ct.maxLength, L = Ct.minLength) => {
11789
+ const Z = N ? W : U;
11794
11790
  O[$] = {
11795
- type: _ ? Y : L,
11791
+ type: N ? Y : L,
11796
11792
  message: Z,
11797
11793
  ref: i,
11798
- ...V(_ ? Y : L, Z)
11794
+ ...V(N ? Y : L, Z)
11799
11795
  };
11800
11796
  };
11801
- if (a ? !Array.isArray(m) || !m.length : c && (!T && (j || Ge(m)) || et(m) && !m || C && !$s(s).isValid || M && !Ds(s).isValid)) {
11802
- const { value: _, message: W } = Yn(c) ? { value: !!c, message: c } : Jt(c);
11803
- if (_ && (O[$] = {
11797
+ if (a ? !Array.isArray(m) || !m.length : c && (!j && (T || Ge(m)) || et(m) && !m || C && !$s(s).isValid || M && !Ds(s).isValid)) {
11798
+ const { value: N, message: W } = Yn(c) ? { value: !!c, message: c } : Jt(c);
11799
+ if (N && (O[$] = {
11804
11800
  type: Ct.required,
11805
11801
  message: W,
11806
11802
  ref: S,
@@ -11808,27 +11804,27 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
11808
11804
  }, !r))
11809
11805
  return A(W), O;
11810
11806
  }
11811
- if (!j && (!Ge(u) || !Ge(p))) {
11812
- let _, W;
11807
+ if (!T && (!Ge(u) || !Ge(p))) {
11808
+ let N, W;
11813
11809
  const U = Jt(p), Y = Jt(u);
11814
11810
  if (!Ge(m) && !isNaN(m)) {
11815
11811
  const L = i.valueAsNumber || m && +m;
11816
- Ge(U.value) || (_ = L > U.value), Ge(Y.value) || (W = L < Y.value);
11812
+ Ge(U.value) || (N = L > U.value), Ge(Y.value) || (W = L < Y.value);
11817
11813
  } else {
11818
11814
  const L = i.valueAsDate || new Date(m), Z = (E) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + E), oe = i.type == "time", te = i.type == "week";
11819
- wt(U.value) && m && (_ = oe ? Z(m) > Z(U.value) : te ? m > U.value : L > new Date(U.value)), wt(Y.value) && m && (W = oe ? Z(m) < Z(Y.value) : te ? m < Y.value : L < new Date(Y.value));
11815
+ wt(U.value) && m && (N = oe ? Z(m) > Z(U.value) : te ? m > U.value : L > new Date(U.value)), wt(Y.value) && m && (W = oe ? Z(m) < Z(Y.value) : te ? m < Y.value : L < new Date(Y.value));
11820
11816
  }
11821
- if ((_ || W) && (B(!!_, U.message, Y.message, Ct.max, Ct.min), !r))
11817
+ if ((N || W) && (B(!!N, U.message, Y.message, Ct.max, Ct.min), !r))
11822
11818
  return A(O[$].message), O;
11823
11819
  }
11824
- if ((d || f) && !j && (wt(m) || a && Array.isArray(m))) {
11825
- const _ = Jt(d), W = Jt(f), U = !Ge(_.value) && m.length > +_.value, Y = !Ge(W.value) && m.length < +W.value;
11826
- if ((U || Y) && (B(U, _.message, W.message), !r))
11820
+ if ((d || f) && !T && (wt(m) || a && Array.isArray(m))) {
11821
+ const N = Jt(d), W = Jt(f), U = !Ge(N.value) && m.length > +N.value, Y = !Ge(W.value) && m.length < +W.value;
11822
+ if ((U || Y) && (B(U, N.message, W.message), !r))
11827
11823
  return A(O[$].message), O;
11828
11824
  }
11829
- if (b && !j && wt(m)) {
11830
- const { value: _, message: W } = Jt(b);
11831
- if (Kn(_) && !m.match(_) && (O[$] = {
11825
+ if (b && !T && wt(m)) {
11826
+ const { value: N, message: W } = Jt(b);
11827
+ if (Kn(N) && !m.match(N) && (O[$] = {
11832
11828
  type: Ct.pattern,
11833
11829
  message: W,
11834
11830
  ref: i,
@@ -11836,28 +11832,28 @@ var Jt = (e) => je(e) && !Kn(e) ? e : {
11836
11832
  }, !r))
11837
11833
  return A(W), O;
11838
11834
  }
11839
- if (w) {
11840
- if (pt(w)) {
11841
- const _ = await w(m, n), W = Oa(_, S);
11835
+ if (x) {
11836
+ if (pt(x)) {
11837
+ const N = await x(m, n), W = Oa(N, S);
11842
11838
  if (W && (O[$] = {
11843
11839
  ...W,
11844
11840
  ...V(Ct.validate, W.message)
11845
11841
  }, !r))
11846
11842
  return A(W.message), O;
11847
- } else if (je(w)) {
11848
- let _ = {};
11849
- for (const W in w) {
11850
- if (!Ve(_) && !r)
11843
+ } else if (je(x)) {
11844
+ let N = {};
11845
+ for (const W in x) {
11846
+ if (!Ve(N) && !r)
11851
11847
  break;
11852
- const U = Oa(await w[W](m, n), S, W);
11853
- U && (_ = {
11848
+ const U = Oa(await x[W](m, n), S, W);
11849
+ U && (N = {
11854
11850
  ...U,
11855
11851
  ...V(W, U.message)
11856
- }, A(U.message), r && (O[$] = _));
11852
+ }, A(U.message), r && (O[$] = N));
11857
11853
  }
11858
- if (!Ve(_) && (O[$] = {
11854
+ if (!Ve(N) && (O[$] = {
11859
11855
  ref: S,
11860
- ..._
11856
+ ...N
11861
11857
  }, !r))
11862
11858
  return O;
11863
11859
  }
@@ -11916,47 +11912,47 @@ function Dv(e = {}) {
11916
11912
  const p = {
11917
11913
  array: wa(),
11918
11914
  state: wa()
11919
- }, b = en(t.mode), w = en(t.reValidateMode), $ = t.criteriaMode === it.all, k = (h) => (x) => {
11920
- clearTimeout(d), d = setTimeout(h, x);
11915
+ }, b = en(t.mode), x = en(t.reValidateMode), $ = t.criteriaMode === it.all, k = (h) => (w) => {
11916
+ clearTimeout(d), d = setTimeout(h, w);
11921
11917
  }, v = async (h) => {
11922
11918
  if (!t.disabled && (f.isValid || u.isValid || h)) {
11923
- const x = t.resolver ? Ve((await j()).errors) : await B(r, !0);
11924
- x !== n.isValid && p.state.next({
11925
- isValid: x
11919
+ const w = t.resolver ? Ve((await T()).errors) : await B(r, !0);
11920
+ w !== n.isValid && p.state.next({
11921
+ isValid: w
11926
11922
  });
11927
11923
  }
11928
- }, m = (h, x) => {
11924
+ }, m = (h, w) => {
11929
11925
  !t.disabled && (f.isValidating || f.validatingFields || u.isValidating || u.validatingFields) && ((h || Array.from(s.mount)).forEach((D) => {
11930
- D && (x ? pe(n.validatingFields, D, x) : Ae(n.validatingFields, D));
11926
+ D && (w ? pe(n.validatingFields, D, w) : Ae(n.validatingFields, D));
11931
11927
  }), p.state.next({
11932
11928
  validatingFields: n.validatingFields,
11933
11929
  isValidating: !Ve(n.validatingFields)
11934
11930
  }));
11935
- }, S = (h, x = [], D, I, N = !0, P = !0) => {
11931
+ }, S = (h, w = [], D, I, F = !0, P = !0) => {
11936
11932
  if (I && D && !t.disabled) {
11937
11933
  if (i.action = !0, P && Array.isArray(R(r, h))) {
11938
11934
  const z = D(R(r, h), I.argA, I.argB);
11939
- N && pe(r, h, z);
11935
+ F && pe(r, h, z);
11940
11936
  }
11941
11937
  if (P && Array.isArray(R(n.errors, h))) {
11942
11938
  const z = D(R(n.errors, h), I.argA, I.argB);
11943
- N && pe(n.errors, h, z), $v(n.errors, h);
11939
+ F && pe(n.errors, h, z), $v(n.errors, h);
11944
11940
  }
11945
11941
  if ((f.touchedFields || u.touchedFields) && P && Array.isArray(R(n.touchedFields, h))) {
11946
11942
  const z = D(R(n.touchedFields, h), I.argA, I.argB);
11947
- N && pe(n.touchedFields, h, z);
11943
+ F && pe(n.touchedFields, h, z);
11948
11944
  }
11949
11945
  (f.dirtyFields || u.dirtyFields) && (n.dirtyFields = fn(o, a)), p.state.next({
11950
11946
  name: h,
11951
- isDirty: W(h, x),
11947
+ isDirty: W(h, w),
11952
11948
  dirtyFields: n.dirtyFields,
11953
11949
  errors: n.errors,
11954
11950
  isValid: n.isValid
11955
11951
  });
11956
11952
  } else
11957
- pe(a, h, x);
11958
- }, A = (h, x) => {
11959
- pe(n.errors, h, x), p.state.next({
11953
+ pe(a, h, w);
11954
+ }, A = (h, w) => {
11955
+ pe(n.errors, h, w), p.state.next({
11960
11956
  errors: n.errors
11961
11957
  });
11962
11958
  }, O = (h) => {
@@ -11964,13 +11960,13 @@ function Dv(e = {}) {
11964
11960
  errors: n.errors,
11965
11961
  isValid: !1
11966
11962
  });
11967
- }, M = (h, x, D, I) => {
11968
- const N = R(r, h);
11969
- if (N) {
11963
+ }, M = (h, w, D, I) => {
11964
+ const F = R(r, h);
11965
+ if (F) {
11970
11966
  const P = R(a, h, xe(D) ? R(o, h) : D);
11971
- xe(P) || I && I.defaultChecked || x ? pe(a, h, x ? P : $a(N._f)) : L(h, P), i.mount && v();
11967
+ xe(P) || I && I.defaultChecked || w ? pe(a, h, w ? P : $a(F._f)) : L(h, P), i.mount && v();
11972
11968
  }
11973
- }, C = (h, x, D, I, N) => {
11969
+ }, C = (h, w, D, I, F) => {
11974
11970
  let P = !1, z = !1;
11975
11971
  const ne = {
11976
11972
  name: h
@@ -11978,22 +11974,22 @@ function Dv(e = {}) {
11978
11974
  if (!t.disabled) {
11979
11975
  if (!D || I) {
11980
11976
  (f.isDirty || u.isDirty) && (z = n.isDirty, n.isDirty = ne.isDirty = W(), P = z !== ne.isDirty);
11981
- const ue = Tt(R(o, h), x);
11977
+ const ue = Tt(R(o, h), w);
11982
11978
  z = !!R(n.dirtyFields, h), ue ? Ae(n.dirtyFields, h) : pe(n.dirtyFields, h, !0), ne.dirtyFields = n.dirtyFields, P = P || (f.dirtyFields || u.dirtyFields) && z !== !ue;
11983
11979
  }
11984
11980
  if (D) {
11985
11981
  const ue = R(n.touchedFields, h);
11986
11982
  ue || (pe(n.touchedFields, h, D), ne.touchedFields = n.touchedFields, P = P || (f.touchedFields || u.touchedFields) && ue !== D);
11987
11983
  }
11988
- P && N && p.state.next(ne);
11984
+ P && F && p.state.next(ne);
11989
11985
  }
11990
11986
  return P ? ne : {};
11991
- }, T = (h, x, D, I) => {
11992
- const N = R(n.errors, h), P = (f.isValid || u.isValid) && et(x) && n.isValid !== x;
11993
- if (t.delayError && D ? (c = k(() => A(h, D)), c(t.delayError)) : (clearTimeout(d), c = null, D ? pe(n.errors, h, D) : Ae(n.errors, h)), (D ? !Tt(N, D) : N) || !Ve(I) || P) {
11987
+ }, j = (h, w, D, I) => {
11988
+ const F = R(n.errors, h), P = (f.isValid || u.isValid) && et(w) && n.isValid !== w;
11989
+ if (t.delayError && D ? (c = k(() => A(h, D)), c(t.delayError)) : (clearTimeout(d), c = null, D ? pe(n.errors, h, D) : Ae(n.errors, h)), (D ? !Tt(F, D) : F) || !Ve(I) || P) {
11994
11990
  const z = {
11995
11991
  ...I,
11996
- ...P && et(x) ? { isValid: x } : {},
11992
+ ...P && et(w) ? { isValid: w } : {},
11997
11993
  errors: n.errors,
11998
11994
  name: h
11999
11995
  };
@@ -12002,66 +11998,66 @@ function Dv(e = {}) {
12002
11998
  ...z
12003
11999
  }, p.state.next(z);
12004
12000
  }
12005
- }, j = async (h) => {
12001
+ }, T = async (h) => {
12006
12002
  m(h, !0);
12007
- const x = await t.resolver(a, t.context, vv(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
12008
- return m(h), x;
12003
+ const w = await t.resolver(a, t.context, vv(h || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
12004
+ return m(h), w;
12009
12005
  }, V = async (h) => {
12010
- const { errors: x } = await j(h);
12006
+ const { errors: w } = await T(h);
12011
12007
  if (h)
12012
12008
  for (const D of h) {
12013
- const I = R(x, D);
12009
+ const I = R(w, D);
12014
12010
  I ? pe(n.errors, D, I) : Ae(n.errors, D);
12015
12011
  }
12016
12012
  else
12017
- n.errors = x;
12018
- return x;
12019
- }, B = async (h, x, D = {
12013
+ n.errors = w;
12014
+ return w;
12015
+ }, B = async (h, w, D = {
12020
12016
  valid: !0
12021
12017
  }) => {
12022
12018
  for (const I in h) {
12023
- const N = h[I];
12024
- if (N) {
12025
- const { _f: P, ...z } = N;
12019
+ const F = h[I];
12020
+ if (F) {
12021
+ const { _f: P, ...z } = F;
12026
12022
  if (P) {
12027
- const ne = s.array.has(P.name), ue = N._f && xv(N._f);
12023
+ const ne = s.array.has(P.name), ue = F._f && xv(F._f);
12028
12024
  ue && f.validatingFields && m([I], !0);
12029
- const Ce = await Hr(N, s.disabled, a, $, t.shouldUseNativeValidation && !x, ne);
12030
- if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1, x))
12025
+ const Ce = await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation && !w, ne);
12026
+ if (ue && f.validatingFields && m([I]), Ce[P.name] && (D.valid = !1, w))
12031
12027
  break;
12032
- !x && (R(Ce, P.name) ? ne ? Os(n.errors, Ce, P.name) : pe(n.errors, P.name, Ce[P.name]) : Ae(n.errors, P.name));
12028
+ !w && (R(Ce, P.name) ? ne ? Os(n.errors, Ce, P.name) : pe(n.errors, P.name, Ce[P.name]) : Ae(n.errors, P.name));
12033
12029
  }
12034
- !Ve(z) && await B(z, x, D);
12030
+ !Ve(z) && await B(z, w, D);
12035
12031
  }
12036
12032
  }
12037
12033
  return D.valid;
12038
- }, _ = () => {
12034
+ }, N = () => {
12039
12035
  for (const h of s.unMount) {
12040
- const x = R(r, h);
12041
- x && (x._f.refs ? x._f.refs.every((D) => !kr(D)) : !kr(x._f.ref)) && Se(h);
12036
+ const w = R(r, h);
12037
+ w && (w._f.refs ? w._f.refs.every((D) => !kr(D)) : !kr(w._f.ref)) && Se(h);
12042
12038
  }
12043
12039
  s.unMount = /* @__PURE__ */ new Set();
12044
- }, W = (h, x) => !t.disabled && (h && x && pe(a, h, x), !Tt(H(), o)), U = (h, x, D) => ws(h, s, {
12045
- ...i.mount ? a : xe(x) ? o : wt(h) ? { [h]: x } : x
12046
- }, D, x), Y = (h) => Pn(R(i.mount ? a : o, h, t.shouldUnregister ? R(o, h, []) : [])), L = (h, x, D = {}) => {
12040
+ }, W = (h, w) => !t.disabled && (h && w && pe(a, h, w), !Tt(H(), o)), U = (h, w, D) => ws(h, s, {
12041
+ ...i.mount ? a : xe(w) ? o : wt(h) ? { [h]: w } : w
12042
+ }, D, w), Y = (h) => Pn(R(i.mount ? a : o, h, t.shouldUnregister ? R(o, h, []) : [])), L = (h, w, D = {}) => {
12047
12043
  const I = R(r, h);
12048
- let N = x;
12044
+ let F = w;
12049
12045
  if (I) {
12050
12046
  const P = I._f;
12051
- P && (!P.disabled && pe(a, h, Ms(x, P)), N = Zn(P.ref) && Ge(x) ? "" : x, ks(P.ref) ? [...P.ref.options].forEach((z) => z.selected = N.includes(z.value)) : P.refs ? Tn(P.ref) ? P.refs.length > 1 ? P.refs.forEach((z) => (!z.defaultChecked || !z.disabled) && (z.checked = Array.isArray(N) ? !!N.find((ne) => ne === z.value) : N === z.value)) : P.refs[0] && (P.refs[0].checked = !!N) : P.refs.forEach((z) => z.checked = z.value === N) : po(P.ref) ? P.ref.value = "" : (P.ref.value = N, P.ref.type || p.state.next({
12047
+ P && (!P.disabled && pe(a, h, Ms(w, P)), F = Zn(P.ref) && Ge(w) ? "" : w, ks(P.ref) ? [...P.ref.options].forEach((z) => z.selected = F.includes(z.value)) : P.refs ? Tn(P.ref) ? P.refs.length > 1 ? P.refs.forEach((z) => (!z.defaultChecked || !z.disabled) && (z.checked = Array.isArray(F) ? !!F.find((ne) => ne === z.value) : F === z.value)) : P.refs[0] && (P.refs[0].checked = !!F) : P.refs.forEach((z) => z.checked = z.value === F) : po(P.ref) ? P.ref.value = "" : (P.ref.value = F, P.ref.type || p.state.next({
12052
12048
  name: h,
12053
12049
  values: Me(a)
12054
12050
  })));
12055
12051
  }
12056
- (D.shouldDirty || D.shouldTouch) && C(h, N, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && F(h);
12057
- }, Z = (h, x, D) => {
12058
- for (const I in x) {
12059
- const N = x[I], P = `${h}.${I}`, z = R(r, P);
12060
- (s.array.has(h) || je(N) || z && !z._f) && !zt(N) ? Z(P, N, D) : L(P, N, D);
12052
+ (D.shouldDirty || D.shouldTouch) && C(h, F, D.shouldTouch, D.shouldDirty, !0), D.shouldValidate && _(h);
12053
+ }, Z = (h, w, D) => {
12054
+ for (const I in w) {
12055
+ const F = w[I], P = `${h}.${I}`, z = R(r, P);
12056
+ (s.array.has(h) || je(F) || z && !z._f) && !zt(F) ? Z(P, F, D) : L(P, F, D);
12061
12057
  }
12062
- }, oe = (h, x, D = {}) => {
12063
- const I = R(r, h), N = s.array.has(h), P = Me(x);
12064
- pe(a, h, P), N ? (p.array.next({
12058
+ }, oe = (h, w, D = {}) => {
12059
+ const I = R(r, h), F = s.array.has(h), P = Me(w);
12060
+ pe(a, h, P), F ? (p.array.next({
12065
12061
  name: h,
12066
12062
  values: Me(a)
12067
12063
  }), (f.isDirty || f.dirtyFields || u.isDirty || u.dirtyFields) && D.shouldDirty && p.state.next({
@@ -12074,15 +12070,15 @@ function Dv(e = {}) {
12074
12070
  });
12075
12071
  }, te = async (h) => {
12076
12072
  i.mount = !0;
12077
- const x = h.target;
12078
- let D = x.name, I = !0;
12079
- const N = R(r, D), P = (z) => {
12073
+ const w = h.target;
12074
+ let D = w.name, I = !0;
12075
+ const F = R(r, D), P = (z) => {
12080
12076
  I = Number.isNaN(z) || zt(z) && isNaN(z.getTime()) || Tt(z, R(a, D, z));
12081
12077
  };
12082
- if (N) {
12078
+ if (F) {
12083
12079
  let z, ne;
12084
- const ue = x.type ? $a(N._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, rt = !wv(N._f) && !t.resolver && !R(n.errors, D) && !N._f.deps || Sv(Ce, R(n.touchedFields, D), n.isSubmitted, w, b), Q = zr(D, s, Ce);
12085
- pe(a, D, ue), Ce ? (N._f.onBlur && N._f.onBlur(h), c && c(0)) : N._f.onChange && N._f.onChange(h);
12080
+ const ue = w.type ? $a(F._f) : ms(h), Ce = h.type === Qn.BLUR || h.type === Qn.FOCUS_OUT, rt = !wv(F._f) && !t.resolver && !R(n.errors, D) && !F._f.deps || Sv(Ce, R(n.touchedFields, D), n.isSubmitted, x, b), Q = zr(D, s, Ce);
12081
+ pe(a, D, ue), Ce ? (F._f.onBlur && F._f.onBlur(h), c && c(0)) : F._f.onChange && F._f.onChange(h);
12086
12082
  const de = C(D, ue, Ce), ce = !Ve(de) || Q;
12087
12083
  if (!Ce && p.state.next({
12088
12084
  name: D,
@@ -12091,25 +12087,25 @@ function Dv(e = {}) {
12091
12087
  }), rt)
12092
12088
  return (f.isValid || u.isValid) && (t.mode === "onBlur" ? Ce && v() : Ce || v()), ce && p.state.next({ name: D, ...Q ? {} : de });
12093
12089
  if (!Ce && Q && p.state.next({ ...n }), t.resolver) {
12094
- const { errors: qe } = await j([D]);
12090
+ const { errors: qe } = await T([D]);
12095
12091
  if (P(ue), I) {
12096
12092
  const He = Da(n.errors, r, D), ut = Da(qe, r, He.name || D);
12097
12093
  z = ut.error, D = ut.name, ne = Ve(qe);
12098
12094
  }
12099
12095
  } else
12100
- m([D], !0), z = (await Hr(N, s.disabled, a, $, t.shouldUseNativeValidation))[D], m([D]), P(ue), I && (z ? ne = !1 : (f.isValid || u.isValid) && (ne = await B(r, !0)));
12101
- I && (N._f.deps && F(N._f.deps), T(D, ne, z, de));
12096
+ m([D], !0), z = (await Hr(F, s.disabled, a, $, t.shouldUseNativeValidation))[D], m([D]), P(ue), I && (z ? ne = !1 : (f.isValid || u.isValid) && (ne = await B(r, !0)));
12097
+ I && (F._f.deps && _(F._f.deps), j(D, ne, z, de));
12102
12098
  }
12103
- }, E = (h, x) => {
12104
- if (R(n.errors, x) && h.focus)
12099
+ }, E = (h, w) => {
12100
+ if (R(n.errors, w) && h.focus)
12105
12101
  return h.focus(), 1;
12106
- }, F = async (h, x = {}) => {
12102
+ }, _ = async (h, w = {}) => {
12107
12103
  let D, I;
12108
- const N = Qe(h);
12104
+ const F = Qe(h);
12109
12105
  if (t.resolver) {
12110
- const P = await V(xe(h) ? h : N);
12111
- D = Ve(P), I = h ? !N.some((z) => R(P, z)) : D;
12112
- } else h ? (I = (await Promise.all(N.map(async (P) => {
12106
+ const P = await V(xe(h) ? h : F);
12107
+ D = Ve(P), I = h ? !F.some((z) => R(P, z)) : D;
12108
+ } else h ? (I = (await Promise.all(F.map(async (P) => {
12113
12109
  const z = R(r, P);
12114
12110
  return await B(z && z._f ? { [P]: z } : z);
12115
12111
  }))).every(Boolean), !(!I && !n.isValid) && v()) : I = D = await B(r);
@@ -12117,41 +12113,41 @@ function Dv(e = {}) {
12117
12113
  ...!wt(h) || (f.isValid || u.isValid) && D !== n.isValid ? {} : { name: h },
12118
12114
  ...t.resolver || !h ? { isValid: D } : {},
12119
12115
  errors: n.errors
12120
- }), x.shouldFocus && !I && nn(r, E, h ? N : s.mount), I;
12116
+ }), w.shouldFocus && !I && nn(r, E, h ? F : s.mount), I;
12121
12117
  }, H = (h) => {
12122
- const x = {
12118
+ const w = {
12123
12119
  ...i.mount ? a : o
12124
12120
  };
12125
- return xe(h) ? x : wt(h) ? R(x, h) : h.map((D) => R(x, D));
12126
- }, G = (h, x) => ({
12127
- invalid: !!R((x || n).errors, h),
12128
- isDirty: !!R((x || n).dirtyFields, h),
12129
- error: R((x || n).errors, h),
12121
+ return xe(h) ? w : wt(h) ? R(w, h) : h.map((D) => R(w, D));
12122
+ }, G = (h, w) => ({
12123
+ invalid: !!R((w || n).errors, h),
12124
+ isDirty: !!R((w || n).dirtyFields, h),
12125
+ error: R((w || n).errors, h),
12130
12126
  isValidating: !!R(n.validatingFields, h),
12131
- isTouched: !!R((x || n).touchedFields, h)
12127
+ isTouched: !!R((w || n).touchedFields, h)
12132
12128
  }), le = (h) => {
12133
- h && Qe(h).forEach((x) => Ae(n.errors, x)), p.state.next({
12129
+ h && Qe(h).forEach((w) => Ae(n.errors, w)), p.state.next({
12134
12130
  errors: h ? n.errors : {}
12135
12131
  });
12136
- }, se = (h, x, D) => {
12137
- const I = (R(r, h, { _f: {} })._f || {}).ref, N = R(n.errors, h) || {}, { ref: P, message: z, type: ne, ...ue } = N;
12132
+ }, se = (h, w, D) => {
12133
+ const I = (R(r, h, { _f: {} })._f || {}).ref, F = R(n.errors, h) || {}, { ref: P, message: z, type: ne, ...ue } = F;
12138
12134
  pe(n.errors, h, {
12139
12135
  ...ue,
12140
- ...x,
12136
+ ...w,
12141
12137
  ref: I
12142
12138
  }), p.state.next({
12143
12139
  name: h,
12144
12140
  errors: n.errors,
12145
12141
  isValid: !1
12146
12142
  }), D && D.shouldFocus && I && I.focus && I.focus();
12147
- }, re = (h, x) => pt(h) ? p.state.subscribe({
12148
- next: (D) => h(U(void 0, x), D)
12149
- }) : U(h, x, !0), we = (h) => p.state.subscribe({
12150
- next: (x) => {
12151
- Cv(h.name, x.name, h.exact) && kv(x, h.formState || f, ie, h.reRenderRoot) && h.callback({
12143
+ }, re = (h, w) => pt(h) ? p.state.subscribe({
12144
+ next: (D) => h(U(void 0, w), D)
12145
+ }) : U(h, w, !0), we = (h) => p.state.subscribe({
12146
+ next: (w) => {
12147
+ Cv(h.name, w.name, h.exact) && kv(w, h.formState || f, ie, h.reRenderRoot) && h.callback({
12152
12148
  values: { ...a },
12153
12149
  ...n,
12154
- ...x
12150
+ ...w
12155
12151
  });
12156
12152
  }
12157
12153
  }).unsubscribe, ae = (h) => (i.mount = !0, u = {
@@ -12160,48 +12156,48 @@ function Dv(e = {}) {
12160
12156
  }, we({
12161
12157
  ...h,
12162
12158
  formState: u
12163
- })), Se = (h, x = {}) => {
12159
+ })), Se = (h, w = {}) => {
12164
12160
  for (const D of h ? Qe(h) : s.mount)
12165
- s.mount.delete(D), s.array.delete(D), x.keepValue || (Ae(r, D), Ae(a, D)), !x.keepError && Ae(n.errors, D), !x.keepDirty && Ae(n.dirtyFields, D), !x.keepTouched && Ae(n.touchedFields, D), !x.keepIsValidating && Ae(n.validatingFields, D), !t.shouldUnregister && !x.keepDefaultValue && Ae(o, D);
12161
+ s.mount.delete(D), s.array.delete(D), w.keepValue || (Ae(r, D), Ae(a, D)), !w.keepError && Ae(n.errors, D), !w.keepDirty && Ae(n.dirtyFields, D), !w.keepTouched && Ae(n.touchedFields, D), !w.keepIsValidating && Ae(n.validatingFields, D), !t.shouldUnregister && !w.keepDefaultValue && Ae(o, D);
12166
12162
  p.state.next({
12167
12163
  values: Me(a)
12168
12164
  }), p.state.next({
12169
12165
  ...n,
12170
- ...x.keepDirty ? { isDirty: W() } : {}
12171
- }), !x.keepIsValid && v();
12172
- }, Ee = ({ disabled: h, name: x }) => {
12173
- (et(h) && i.mount || h || s.disabled.has(x)) && (h ? s.disabled.add(x) : s.disabled.delete(x));
12174
- }, Ue = (h, x = {}) => {
12166
+ ...w.keepDirty ? { isDirty: W() } : {}
12167
+ }), !w.keepIsValid && v();
12168
+ }, Ee = ({ disabled: h, name: w }) => {
12169
+ (et(h) && i.mount || h || s.disabled.has(w)) && (h ? s.disabled.add(w) : s.disabled.delete(w));
12170
+ }, Ue = (h, w = {}) => {
12175
12171
  let D = R(r, h);
12176
- const I = et(x.disabled) || et(t.disabled);
12172
+ const I = et(w.disabled) || et(t.disabled);
12177
12173
  return pe(r, h, {
12178
12174
  ...D || {},
12179
12175
  _f: {
12180
12176
  ...D && D._f ? D._f : { ref: { name: h } },
12181
12177
  name: h,
12182
12178
  mount: !0,
12183
- ...x
12179
+ ...w
12184
12180
  }
12185
12181
  }), s.mount.add(h), D ? Ee({
12186
- disabled: et(x.disabled) ? x.disabled : t.disabled,
12182
+ disabled: et(w.disabled) ? w.disabled : t.disabled,
12187
12183
  name: h
12188
- }) : M(h, !0, x.value), {
12189
- ...I ? { disabled: x.disabled || t.disabled } : {},
12184
+ }) : M(h, !0, w.value), {
12185
+ ...I ? { disabled: w.disabled || t.disabled } : {},
12190
12186
  ...t.progressive ? {
12191
- required: !!x.required,
12192
- min: pn(x.min),
12193
- max: pn(x.max),
12194
- minLength: pn(x.minLength),
12195
- maxLength: pn(x.maxLength),
12196
- pattern: pn(x.pattern)
12187
+ required: !!w.required,
12188
+ min: pn(w.min),
12189
+ max: pn(w.max),
12190
+ minLength: pn(w.minLength),
12191
+ maxLength: pn(w.maxLength),
12192
+ pattern: pn(w.pattern)
12197
12193
  } : {},
12198
12194
  name: h,
12199
12195
  onChange: te,
12200
12196
  onBlur: te,
12201
- ref: (N) => {
12202
- if (N) {
12203
- Ue(h, x), D = R(r, h);
12204
- const P = xe(N.value) && N.querySelectorAll && N.querySelectorAll("input,select,textarea")[0] || N, z = mv(P), ne = D._f.refs || [];
12197
+ ref: (F) => {
12198
+ if (F) {
12199
+ Ue(h, w), D = R(r, h);
12200
+ const P = xe(F.value) && F.querySelectorAll && F.querySelectorAll("input,select,textarea")[0] || F, z = mv(P), ne = D._f.refs || [];
12205
12201
  if (z ? ne.find((ue) => ue === P) : P === D._f.ref)
12206
12202
  return;
12207
12203
  pe(r, h, {
@@ -12218,41 +12214,41 @@ function Dv(e = {}) {
12218
12214
  }
12219
12215
  }), M(h, !1, void 0, P);
12220
12216
  } else
12221
- D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister || x.shouldUnregister) && !(ys(s.array, h) && i.action) && s.unMount.add(h);
12217
+ D = R(r, h, {}), D._f && (D._f.mount = !1), (t.shouldUnregister || w.shouldUnregister) && !(ys(s.array, h) && i.action) && s.unMount.add(h);
12222
12218
  }
12223
12219
  };
12224
12220
  }, lt = () => t.shouldFocusError && nn(r, E, s.mount), Wt = (h) => {
12225
- et(h) && (p.state.next({ disabled: h }), nn(r, (x, D) => {
12221
+ et(h) && (p.state.next({ disabled: h }), nn(r, (w, D) => {
12226
12222
  const I = R(r, D);
12227
- I && (x.disabled = I._f.disabled || h, Array.isArray(I._f.refs) && I._f.refs.forEach((N) => {
12228
- N.disabled = I._f.disabled || h;
12223
+ I && (w.disabled = I._f.disabled || h, Array.isArray(I._f.refs) && I._f.refs.forEach((F) => {
12224
+ F.disabled = I._f.disabled || h;
12229
12225
  }));
12230
12226
  }, 0, !1));
12231
- }, q = (h, x) => async (D) => {
12227
+ }, q = (h, w) => async (D) => {
12232
12228
  let I;
12233
12229
  D && (D.preventDefault && D.preventDefault(), D.persist && D.persist());
12234
- let N = Me(a);
12230
+ let F = Me(a);
12235
12231
  if (p.state.next({
12236
12232
  isSubmitting: !0
12237
12233
  }), t.resolver) {
12238
- const { errors: P, values: z } = await j();
12239
- n.errors = P, N = z;
12234
+ const { errors: P, values: z } = await T();
12235
+ n.errors = P, F = z;
12240
12236
  } else
12241
12237
  await B(r);
12242
12238
  if (s.disabled.size)
12243
12239
  for (const P of s.disabled)
12244
- pe(N, P, void 0);
12240
+ pe(F, P, void 0);
12245
12241
  if (Ae(n.errors, "root"), Ve(n.errors)) {
12246
12242
  p.state.next({
12247
12243
  errors: {}
12248
12244
  });
12249
12245
  try {
12250
- await h(N, D);
12246
+ await h(F, D);
12251
12247
  } catch (P) {
12252
12248
  I = P;
12253
12249
  }
12254
12250
  } else
12255
- x && await x({ ...n.errors }, D), lt(), setTimeout(lt);
12251
+ w && await w({ ...n.errors }, D), lt(), setTimeout(lt);
12256
12252
  if (p.state.next({
12257
12253
  isSubmitted: !0,
12258
12254
  isSubmitting: !1,
@@ -12261,12 +12257,12 @@ function Dv(e = {}) {
12261
12257
  errors: n.errors
12262
12258
  }), I)
12263
12259
  throw I;
12264
- }, J = (h, x = {}) => {
12265
- R(r, h) && (xe(x.defaultValue) ? oe(h, Me(R(o, h))) : (oe(h, x.defaultValue), pe(o, h, Me(x.defaultValue))), x.keepTouched || Ae(n.touchedFields, h), x.keepDirty || (Ae(n.dirtyFields, h), n.isDirty = x.defaultValue ? W(h, Me(R(o, h))) : W()), x.keepError || (Ae(n.errors, h), f.isValid && v()), p.state.next({ ...n }));
12266
- }, $e = (h, x = {}) => {
12267
- const D = h ? Me(h) : o, I = Me(D), N = Ve(h), P = N ? o : I;
12268
- if (x.keepDefaultValues || (o = D), !x.keepValues) {
12269
- if (x.keepDirtyValues) {
12260
+ }, J = (h, w = {}) => {
12261
+ R(r, h) && (xe(w.defaultValue) ? oe(h, Me(R(o, h))) : (oe(h, w.defaultValue), pe(o, h, Me(w.defaultValue))), w.keepTouched || Ae(n.touchedFields, h), w.keepDirty || (Ae(n.dirtyFields, h), n.isDirty = w.defaultValue ? W(h, Me(R(o, h))) : W()), w.keepError || (Ae(n.errors, h), f.isValid && v()), p.state.next({ ...n }));
12262
+ }, $e = (h, w = {}) => {
12263
+ const D = h ? Me(h) : o, I = Me(D), F = Ve(h), P = F ? o : I;
12264
+ if (w.keepDefaultValues || (o = D), !w.keepValues) {
12265
+ if (w.keepDirtyValues) {
12270
12266
  const z = /* @__PURE__ */ new Set([
12271
12267
  ...s.mount,
12272
12268
  ...Object.keys(fn(o, a))
@@ -12298,28 +12294,28 @@ function Dv(e = {}) {
12298
12294
  });
12299
12295
  }
12300
12296
  s = {
12301
- mount: x.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
12297
+ mount: w.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
12302
12298
  unMount: /* @__PURE__ */ new Set(),
12303
12299
  array: /* @__PURE__ */ new Set(),
12304
12300
  disabled: /* @__PURE__ */ new Set(),
12305
12301
  watch: /* @__PURE__ */ new Set(),
12306
12302
  watchAll: !1,
12307
12303
  focus: ""
12308
- }, i.mount = !f.isValid || !!x.keepIsValid || !!x.keepDirtyValues, i.watch = !!t.shouldUnregister, p.state.next({
12309
- submitCount: x.keepSubmitCount ? n.submitCount : 0,
12310
- isDirty: N ? !1 : x.keepDirty ? n.isDirty : !!(x.keepDefaultValues && !Tt(h, o)),
12311
- isSubmitted: x.keepIsSubmitted ? n.isSubmitted : !1,
12312
- dirtyFields: N ? {} : x.keepDirtyValues ? x.keepDefaultValues && a ? fn(o, a) : n.dirtyFields : x.keepDefaultValues && h ? fn(o, h) : x.keepDirty ? n.dirtyFields : {},
12313
- touchedFields: x.keepTouched ? n.touchedFields : {},
12314
- errors: x.keepErrors ? n.errors : {},
12315
- isSubmitSuccessful: x.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
12304
+ }, i.mount = !f.isValid || !!w.keepIsValid || !!w.keepDirtyValues, i.watch = !!t.shouldUnregister, p.state.next({
12305
+ submitCount: w.keepSubmitCount ? n.submitCount : 0,
12306
+ isDirty: F ? !1 : w.keepDirty ? n.isDirty : !!(w.keepDefaultValues && !Tt(h, o)),
12307
+ isSubmitted: w.keepIsSubmitted ? n.isSubmitted : !1,
12308
+ dirtyFields: F ? {} : w.keepDirtyValues ? w.keepDefaultValues && a ? fn(o, a) : n.dirtyFields : w.keepDefaultValues && h ? fn(o, h) : w.keepDirty ? n.dirtyFields : {},
12309
+ touchedFields: w.keepTouched ? n.touchedFields : {},
12310
+ errors: w.keepErrors ? n.errors : {},
12311
+ isSubmitSuccessful: w.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
12316
12312
  isSubmitting: !1
12317
12313
  });
12318
- }, ke = (h, x) => $e(pt(h) ? h(a) : h, x), Ne = (h, x = {}) => {
12314
+ }, ke = (h, w) => $e(pt(h) ? h(a) : h, w), Ne = (h, w = {}) => {
12319
12315
  const D = R(r, h), I = D && D._f;
12320
12316
  if (I) {
12321
- const N = I.refs ? I.refs[0] : I.ref;
12322
- N.focus && (N.focus(), x.shouldSelect && pt(N.select) && N.select());
12317
+ const F = I.refs ? I.refs[0] : I.ref;
12318
+ F.focus && (F.focus(), w.shouldSelect && pt(F.select) && F.select());
12323
12319
  }
12324
12320
  }, ie = (h) => {
12325
12321
  n = {
@@ -12334,7 +12330,7 @@ function Dv(e = {}) {
12334
12330
  handleSubmit: q,
12335
12331
  setError: se,
12336
12332
  _subscribe: we,
12337
- _runSchema: j,
12333
+ _runSchema: T,
12338
12334
  _getWatch: U,
12339
12335
  _getDirty: W,
12340
12336
  _setValid: v,
@@ -12348,7 +12344,7 @@ function Dv(e = {}) {
12348
12344
  isLoading: !1
12349
12345
  });
12350
12346
  }),
12351
- _removeUnmounted: _,
12347
+ _removeUnmounted: N,
12352
12348
  _disableForm: Wt,
12353
12349
  _subjects: p,
12354
12350
  _proxyFormState: f,
@@ -12387,7 +12383,7 @@ function Dv(e = {}) {
12387
12383
  }
12388
12384
  },
12389
12385
  subscribe: ae,
12390
- trigger: F,
12386
+ trigger: _,
12391
12387
  register: Ue,
12392
12388
  handleSubmit: q,
12393
12389
  watch: re,
@@ -12443,21 +12439,21 @@ function Mx(e) {
12443
12439
  u.current = r, f.current = s, n._names.array.add(r), i && n.register(r, i), g.useEffect(() => n._subjects.array.subscribe({
12444
12440
  next: ({ values: M, name: C }) => {
12445
12441
  if (C === u.current || !C) {
12446
- const T = R(M, u.current);
12447
- Array.isArray(T) && (c(T), d.current = T.map(jt));
12442
+ const j = R(M, u.current);
12443
+ Array.isArray(j) && (c(j), d.current = j.map(jt));
12448
12444
  }
12449
12445
  }
12450
12446
  }).unsubscribe, [n]);
12451
12447
  const b = g.useCallback((M) => {
12452
12448
  p.current = !0, n._setFieldArray(r, M);
12453
- }, [n, r]), w = (M, C) => {
12454
- const T = Qe(Me(M)), j = Sr(n._getFieldArray(r), T);
12455
- n._names.focus = Cr(r, j.length - 1, C), d.current = Sr(d.current, T.map(jt)), b(j), c(j), n._setFieldArray(r, j, Sr, {
12449
+ }, [n, r]), x = (M, C) => {
12450
+ const j = Qe(Me(M)), T = Sr(n._getFieldArray(r), j);
12451
+ n._names.focus = Cr(r, T.length - 1, C), d.current = Sr(d.current, j.map(jt)), b(T), c(T), n._setFieldArray(r, T, Sr, {
12456
12452
  argA: $r(M)
12457
12453
  });
12458
12454
  }, $ = (M, C) => {
12459
- const T = Qe(Me(M)), j = Or(n._getFieldArray(r), T);
12460
- n._names.focus = Cr(r, 0, C), d.current = Or(d.current, T.map(jt)), b(j), c(j), n._setFieldArray(r, j, Or, {
12455
+ const j = Qe(Me(M)), T = Or(n._getFieldArray(r), j);
12456
+ n._names.focus = Cr(r, 0, C), d.current = Or(d.current, j.map(jt)), b(T), c(T), n._setFieldArray(r, T, Or, {
12461
12457
  argA: $r(M)
12462
12458
  });
12463
12459
  }, k = (M) => {
@@ -12465,33 +12461,33 @@ function Mx(e) {
12465
12461
  d.current = Er(d.current, M), b(C), c(C), !Array.isArray(R(n._fields, r)) && pe(n._fields, r, void 0), n._setFieldArray(r, C, Er, {
12466
12462
  argA: M
12467
12463
  });
12468
- }, v = (M, C, T) => {
12469
- const j = Qe(Me(C)), V = Mr(n._getFieldArray(r), M, j);
12470
- n._names.focus = Cr(r, M, T), d.current = Mr(d.current, M, j.map(jt)), b(V), c(V), n._setFieldArray(r, V, Mr, {
12464
+ }, v = (M, C, j) => {
12465
+ const T = Qe(Me(C)), V = Mr(n._getFieldArray(r), M, T);
12466
+ n._names.focus = Cr(r, M, j), d.current = Mr(d.current, M, T.map(jt)), b(V), c(V), n._setFieldArray(r, V, Mr, {
12471
12467
  argA: M,
12472
12468
  argB: $r(C)
12473
12469
  });
12474
12470
  }, m = (M, C) => {
12475
- const T = n._getFieldArray(r);
12476
- jr(T, M, C), jr(d.current, M, C), b(T), c(T), n._setFieldArray(r, T, jr, {
12471
+ const j = n._getFieldArray(r);
12472
+ jr(j, M, C), jr(d.current, M, C), b(j), c(j), n._setFieldArray(r, j, jr, {
12477
12473
  argA: M,
12478
12474
  argB: C
12479
12475
  }, !1);
12480
12476
  }, S = (M, C) => {
12481
- const T = n._getFieldArray(r);
12482
- Dr(T, M, C), Dr(d.current, M, C), b(T), c(T), n._setFieldArray(r, T, Dr, {
12477
+ const j = n._getFieldArray(r);
12478
+ Dr(j, M, C), Dr(d.current, M, C), b(j), c(j), n._setFieldArray(r, j, Dr, {
12483
12479
  argA: M,
12484
12480
  argB: C
12485
12481
  }, !1);
12486
12482
  }, A = (M, C) => {
12487
- const T = Me(C), j = Ea(n._getFieldArray(r), M, T);
12488
- d.current = [...j].map((V, B) => !V || B === M ? jt() : d.current[B]), b(j), c([...j]), n._setFieldArray(r, j, Ea, {
12483
+ const j = Me(C), T = Ea(n._getFieldArray(r), M, j);
12484
+ d.current = [...T].map((V, B) => !V || B === M ? jt() : d.current[B]), b(T), c([...T]), n._setFieldArray(r, T, Ea, {
12489
12485
  argA: M,
12490
- argB: T
12486
+ argB: j
12491
12487
  }, !0, !1);
12492
12488
  }, O = (M) => {
12493
12489
  const C = Qe(Me(M));
12494
- d.current = C.map(jt), b([...C]), c([...C]), n._setFieldArray(r, [...C], (T) => T, {}, !0, !1);
12490
+ d.current = C.map(jt), b([...C]), c([...C]), n._setFieldArray(r, [...C], (j) => j, {}, !0, !1);
12495
12491
  };
12496
12492
  return g.useEffect(() => {
12497
12493
  if (n._state.action = !1, zr(r, n._names) && n._subjects.state.next({
@@ -12499,8 +12495,8 @@ function Mx(e) {
12499
12495
  }), p.current && (!en(n._options.mode).isOnSubmit || n._formState.isSubmitted) && !en(n._options.reValidateMode).isOnSubmit)
12500
12496
  if (n._options.resolver)
12501
12497
  n._runSchema([r]).then((M) => {
12502
- const C = R(M.errors, r), T = R(n._formState.errors, r);
12503
- (T ? !C && T.type || C && (T.type !== C.type || T.message !== C.message) : C && C.type) && (C ? pe(n._formState.errors, r, C) : Ae(n._formState.errors, r), n._subjects.state.next({
12498
+ const C = R(M.errors, r), j = R(n._formState.errors, r);
12499
+ (j ? !C && j.type || C && (j.type !== C.type || j.message !== C.message) : C && C.type) && (C ? pe(n._formState.errors, r, C) : Ae(n._formState.errors, r), n._subjects.state.next({
12504
12500
  errors: n._formState.errors
12505
12501
  }));
12506
12502
  });
@@ -12518,16 +12514,16 @@ function Mx(e) {
12518
12514
  return M.focus(), 1;
12519
12515
  }), n._names.focus = "", n._setValid(), p.current = !1;
12520
12516
  }, [s, r, n]), g.useEffect(() => (!R(n._formValues, r) && n._setFieldArray(r), () => {
12521
- const M = (C, T) => {
12522
- const j = R(n._fields, C);
12523
- j && j._f && (j._f.mount = T);
12517
+ const M = (C, j) => {
12518
+ const T = R(n._fields, C);
12519
+ T && T._f && (T._f.mount = j);
12524
12520
  };
12525
12521
  n._options.shouldUnregister || a ? n.unregister(r) : M(r, !1);
12526
12522
  }), [r, n, o, a]), {
12527
12523
  swap: g.useCallback(m, [b, r, n]),
12528
12524
  move: g.useCallback(S, [b, r, n]),
12529
12525
  prepend: g.useCallback($, [b, r, n]),
12530
- append: g.useCallback(w, [b, r, n]),
12526
+ append: g.useCallback(x, [b, r, n]),
12531
12527
  remove: g.useCallback(k, [b, r, n]),
12532
12528
  insert: g.useCallback(v, [b, r, n]),
12533
12529
  update: g.useCallback(A, [b, r, n]),