zudoku 0.6.2-dev.4 → 0.6.2-dev.5

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 (95) hide show
  1. package/dist/cli/dev/handler.js +5 -1
  2. package/dist/cli/dev/handler.js.map +1 -1
  3. package/dist/config/validators/InputSidebarSchema.d.ts +9 -0
  4. package/dist/config/validators/InputSidebarSchema.js +2 -0
  5. package/dist/config/validators/InputSidebarSchema.js.map +1 -1
  6. package/dist/config/validators/SidebarSchema.d.ts +9 -3
  7. package/dist/config/validators/SidebarSchema.js +7 -3
  8. package/dist/config/validators/SidebarSchema.js.map +1 -1
  9. package/dist/lib/components/navigation/SidebarCategory.js +5 -3
  10. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  11. package/dist/lib/components/navigation/SidebarItem.js +2 -2
  12. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  13. package/dist/lib/icons.d.ts +1 -0
  14. package/dist/lib/icons.js +2 -0
  15. package/dist/lib/icons.js.map +1 -0
  16. package/dist/lib/ui/Button.d.ts +2 -2
  17. package/dist/vite/plugin-icons.d.ts +3 -0
  18. package/dist/vite/plugin-icons.js +47 -0
  19. package/dist/vite/plugin-icons.js.map +1 -0
  20. package/dist/vite/plugin-sidebar.js +10 -1
  21. package/dist/vite/plugin-sidebar.js.map +1 -1
  22. package/dist/vite/plugin.js +2 -0
  23. package/dist/vite/plugin.js.map +1 -1
  24. package/lib/{AuthenticationPlugin-DYnkydqa.js → AuthenticationPlugin-Bx9FK124.js} +3 -3
  25. package/lib/{AuthenticationPlugin-DYnkydqa.js.map → AuthenticationPlugin-Bx9FK124.js.map} +1 -1
  26. package/lib/{CategoryHeading-w2EW676o.js → CategoryHeading-XnFqN2lJ.js} +2 -2
  27. package/lib/{CategoryHeading-w2EW676o.js.map → CategoryHeading-XnFqN2lJ.js.map} +1 -1
  28. package/lib/{DeveloperHint-D87KcpDW.js → DeveloperHint-FBb2uXJe.js} +2 -2
  29. package/lib/{DeveloperHint-D87KcpDW.js.map → DeveloperHint-FBb2uXJe.js.map} +1 -1
  30. package/lib/{ErrorPage-BdHAg3Rg.js → ErrorPage-knunPbKI.js} +4 -4
  31. package/lib/{ErrorPage-BdHAg3Rg.js.map → ErrorPage-knunPbKI.js.map} +1 -1
  32. package/lib/{Input-BmwltPfA.js → Input-BEDZAKw0.js} +350 -366
  33. package/lib/Input-BEDZAKw0.js.map +1 -0
  34. package/lib/{Markdown-BZUoEvL7.js → Markdown-B4aR03g6.js} +2494 -2650
  35. package/lib/Markdown-B4aR03g6.js.map +1 -0
  36. package/lib/{MdxPage-E4NFxzHQ.js → MdxPage-BZyQsH8Z.js} +44 -55
  37. package/lib/MdxPage-BZyQsH8Z.js.map +1 -0
  38. package/lib/{OperationList-DVIuzHN7.js → OperationList-2NeWEM0u.js} +103 -171
  39. package/lib/OperationList-2NeWEM0u.js.map +1 -0
  40. package/lib/{Route-5sI-urRK.js → Route-BZPewmrN.js} +3 -3
  41. package/lib/{Route-5sI-urRK.js.map → Route-BZPewmrN.js.map} +1 -1
  42. package/lib/{SidebarBadge-6EEz-Bwe.js → SidebarBadge-COz0hgfa.js} +39 -39
  43. package/lib/{SidebarBadge-6EEz-Bwe.js.map → SidebarBadge-COz0hgfa.js.map} +1 -1
  44. package/lib/{SlotletProvider-CNyl5wU0.js → SlotletProvider-DJMaOUDs.js} +70 -94
  45. package/lib/SlotletProvider-DJMaOUDs.js.map +1 -0
  46. package/lib/Spinner-3cQDBVGr.js +7 -0
  47. package/lib/Spinner-3cQDBVGr.js.map +1 -0
  48. package/lib/{ZudokuContext-BHNQL3XO.js → ZudokuContext-cr-pTRY1.js} +25 -25
  49. package/lib/{ZudokuContext-BHNQL3XO.js.map → ZudokuContext-cr-pTRY1.js.map} +1 -1
  50. package/lib/{_commonjsHelpers-BVfed4GL.js → _commonjsHelpers-BkfeUUK-.js} +3 -3
  51. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  52. package/lib/{index-CbJpF8Yf.js → index-1EDgIO6b.js} +7 -7
  53. package/lib/{index-CbJpF8Yf.js.map → index-1EDgIO6b.js.map} +1 -1
  54. package/lib/{index-ChhUJhLT.js → index-BG0g4WW0.js} +10 -10
  55. package/lib/{index-ChhUJhLT.js.map → index-BG0g4WW0.js.map} +1 -1
  56. package/lib/{index-DdUotMOQ.js → index-Dv2KZuEw.js} +1113 -1169
  57. package/lib/index-Dv2KZuEw.js.map +1 -0
  58. package/lib/{index-BGY8VjAV.js → index-Zezcv0xb.js} +24 -24
  59. package/lib/{index-BGY8VjAV.js.map → index-Zezcv0xb.js.map} +1 -1
  60. package/lib/{router-BiRCp01d.js → router-D2p7Olpn.js} +22 -22
  61. package/lib/{router-BiRCp01d.js.map → router-D2p7Olpn.js.map} +1 -1
  62. package/lib/{slugify-CiPVjteN.js → slugify-DbLhpSPt.js} +2 -2
  63. package/lib/{slugify-CiPVjteN.js.map → slugify-DbLhpSPt.js.map} +1 -1
  64. package/lib/{state-DsXXkBLH.js → state-lIwt9isb.js} +15 -15
  65. package/lib/{state-DsXXkBLH.js.map → state-lIwt9isb.js.map} +1 -1
  66. package/lib/{utils-BPHLKjns.js → utils-ByIc_KIM.js} +68 -68
  67. package/lib/{utils-BPHLKjns.js.map → utils-ByIc_KIM.js.map} +1 -1
  68. package/lib/zudoku.auth-auth0.js +1 -1
  69. package/lib/zudoku.auth-clerk.js +2 -2
  70. package/lib/zudoku.auth-openid.js +8 -8
  71. package/lib/zudoku.components.js +754 -834
  72. package/lib/zudoku.components.js.map +1 -1
  73. package/lib/zudoku.icons.js +2 -0
  74. package/lib/zudoku.icons.js.map +1 -0
  75. package/lib/zudoku.openapi-worker.js +2 -2
  76. package/lib/zudoku.plugin-api-keys.js +80 -131
  77. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  78. package/lib/zudoku.plugin-custom-page.js +1 -1
  79. package/lib/zudoku.plugin-markdown.js +1 -1
  80. package/lib/zudoku.plugin-openapi.js +9 -8
  81. package/lib/zudoku.plugin-openapi.js.map +1 -1
  82. package/lib/zudoku.plugin-redirect.js +3 -3
  83. package/package.json +6 -2
  84. package/src/lib/components/navigation/SidebarCategory.tsx +43 -31
  85. package/src/lib/components/navigation/SidebarItem.tsx +2 -1
  86. package/src/lib/icons.ts +1 -0
  87. package/lib/Input-BmwltPfA.js.map +0 -1
  88. package/lib/Markdown-BZUoEvL7.js.map +0 -1
  89. package/lib/MdxPage-E4NFxzHQ.js.map +0 -1
  90. package/lib/OperationList-DVIuzHN7.js.map +0 -1
  91. package/lib/SlotletProvider-CNyl5wU0.js.map +0 -1
  92. package/lib/Spinner-B9eFggre.js +0 -15
  93. package/lib/Spinner-B9eFggre.js.map +0 -1
  94. package/lib/_commonjsHelpers-BVfed4GL.js.map +0 -1
  95. package/lib/index-DdUotMOQ.js.map +0 -1
@@ -4,36 +4,21 @@ var zt = (e) => {
4
4
  var St = (e, r, t) => r.has(e) || zt("Cannot " + t);
5
5
  var G = (e, r, t) => (St(e, r, "read from private field"), t ? t.call(e) : r.get(e)), Ue = (e, r, t) => r.has(e) ? zt("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(e) : r.set(e, t), He = (e, r, t, s) => (St(e, r, "write to private field"), s ? s.call(e, t) : r.set(e, t), t), We = (e, r, t) => (St(e, r, "access private method"), t);
6
6
  import * as h from "react";
7
- import R from "react";
8
- import { s as ps, c as hs, a as ms, b as nr, u as xe, A as ys, P as he, d as ne, q as Ne, h as gs, e as vs, R as xs, S as Ss, F as _s, D as bs, C as ws, n as Bt, g as Cs, V as As, f as Vs, m as Es, k as Fs, o as Yt, l as Ts } from "./index-BGY8VjAV.js";
9
- import { S as Is, x as Rs, i as Xt, n as ir, t as Ns, y as Ds, z as Ps } from "./ZudokuContext-BHNQL3XO.js";
7
+ import I from "react";
8
+ import { n as fs, f as ps, c as hs, o as nr, d as xe, A as ms, P as he, b as ne, e as Ne, i as ys, j as gs, R as vs, S as xs, F as Ss, D as _s, C as bs, a as Bt, p as ws, V as As, h as Cs, l as Vs, g as Es, u as Yt, q as Fs } from "./index-Zezcv0xb.js";
9
+ import { S as Ts, s as Rs, h as Xt, n as ir, a as Is, d as Ns, e as Ds } from "./ZudokuContext-cr-pTRY1.js";
10
10
  import { j as b } from "./jsx-runtime-B6kdoens.js";
11
11
  import * as ar from "react-dom";
12
- import { c as lr, a as Ee, C as ks } from "./Markdown-BZUoEvL7.js";
13
- /**
14
- * @license lucide-react v0.378.0 - ISC
15
- *
16
- * This source code is licensed under the ISC license.
17
- * See the LICENSE file in the root directory of this source tree.
18
- */
19
- const cr = lr("ChevronDown", [
20
- ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
21
- ]);
22
- /**
23
- * @license lucide-react v0.378.0 - ISC
24
- *
25
- * This source code is licensed under the ISC license.
26
- * See the LICENSE file in the root directory of this source tree.
27
- */
28
- const Ms = lr("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
29
- var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
12
+ import { ChevronDown as lr, ChevronUp as Ps, Check as ks } from "lucide-react";
13
+ import { a as Ee } from "./Markdown-B4aR03g6.js";
14
+ var Te, Re, ae, Ce, Ve, nt, Nt, or, Ms = (or = class extends Ts {
30
15
  constructor(r, t) {
31
16
  super();
32
17
  Ue(this, Ve);
33
18
  Ue(this, Te);
34
- Ue(this, Ie);
19
+ Ue(this, Re);
35
20
  Ue(this, ae);
36
- Ue(this, Ae);
21
+ Ue(this, Ce);
37
22
  He(this, Te, r), this.setOptions(t), this.bindMethods(), We(this, Ve, nt).call(this);
38
23
  }
39
24
  bindMethods() {
@@ -56,7 +41,7 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
56
41
  We(this, Ve, nt).call(this), We(this, Ve, Nt).call(this, r);
57
42
  }
58
43
  getCurrentResult() {
59
- return G(this, Ie);
44
+ return G(this, Re);
60
45
  }
61
46
  reset() {
62
47
  var r;
@@ -64,12 +49,12 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
64
49
  }
65
50
  mutate(r, t) {
66
51
  var s;
67
- return He(this, Ae, t), (s = G(this, ae)) == null || s.removeObserver(this), He(this, ae, G(this, Te).getMutationCache().build(G(this, Te), this.options)), G(this, ae).addObserver(this), G(this, ae).execute(r);
52
+ return He(this, Ce, t), (s = G(this, ae)) == null || s.removeObserver(this), He(this, ae, G(this, Te).getMutationCache().build(G(this, Te), this.options)), G(this, ae).addObserver(this), G(this, ae).execute(r);
68
53
  }
69
- }, Te = new WeakMap(), Ie = new WeakMap(), ae = new WeakMap(), Ae = new WeakMap(), Ve = new WeakSet(), nt = function() {
54
+ }, Te = new WeakMap(), Re = new WeakMap(), ae = new WeakMap(), Ce = new WeakMap(), Ve = new WeakSet(), nt = function() {
70
55
  var t;
71
- const r = ((t = G(this, ae)) == null ? void 0 : t.state) ?? ps();
72
- He(this, Ie, {
56
+ const r = ((t = G(this, ae)) == null ? void 0 : t.state) ?? fs();
57
+ He(this, Re, {
73
58
  ...r,
74
59
  isPending: r.status === "pending",
75
60
  isSuccess: r.status === "success",
@@ -81,9 +66,9 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
81
66
  }, Nt = function(r) {
82
67
  ir.batch(() => {
83
68
  var t, s, n, i, l, c, d, S;
84
- if (G(this, Ae) && this.hasListeners()) {
85
- const m = G(this, Ie).variables, y = G(this, Ie).context;
86
- (r == null ? void 0 : r.type) === "success" ? ((s = (t = G(this, Ae)).onSuccess) == null || s.call(t, r.data, m, y), (i = (n = G(this, Ae)).onSettled) == null || i.call(n, r.data, null, m, y)) : (r == null ? void 0 : r.type) === "error" && ((c = (l = G(this, Ae)).onError) == null || c.call(l, r.error, m, y), (S = (d = G(this, Ae)).onSettled) == null || S.call(
69
+ if (G(this, Ce) && this.hasListeners()) {
70
+ const m = G(this, Re).variables, y = G(this, Re).context;
71
+ (r == null ? void 0 : r.type) === "success" ? ((s = (t = G(this, Ce)).onSuccess) == null || s.call(t, r.data, m, y), (i = (n = G(this, Ce)).onSettled) == null || i.call(n, r.data, null, m, y)) : (r == null ? void 0 : r.type) === "error" && ((c = (l = G(this, Ce)).onError) == null || c.call(l, r.error, m, y), (S = (d = G(this, Ce)).onSettled) == null || S.call(
87
72
  d,
88
73
  void 0,
89
74
  r.error,
@@ -92,13 +77,13 @@ var Te, Ie, ae, Ae, Ve, nt, Nt, or, Os = (or = class extends Is {
92
77
  ));
93
78
  }
94
79
  this.listeners.forEach((m) => {
95
- m(G(this, Ie));
80
+ m(G(this, Re));
96
81
  });
97
82
  });
98
83
  }, or);
99
84
  function Bo(e, r) {
100
- const t = Ns(), [s] = h.useState(
101
- () => new Os(
85
+ const t = Is(), [s] = h.useState(
86
+ () => new Ms(
102
87
  t,
103
88
  e
104
89
  )
@@ -115,17 +100,17 @@ function Bo(e, r) {
115
100
  () => s.getCurrentResult()
116
101
  ), i = h.useCallback(
117
102
  (l, c) => {
118
- s.mutate(l, c).catch(Ds);
103
+ s.mutate(l, c).catch(Ns);
119
104
  },
120
105
  [s]
121
106
  );
122
- if (n.error && Ps(s.options.throwOnError, [n.error]))
107
+ if (n.error && Ds(s.options.throwOnError, [n.error]))
123
108
  throw n.error;
124
109
  return { ...n, mutate: i, mutateAsync: n.mutate };
125
110
  }
126
111
  var Qe = (e) => e.type === "checkbox", $e = (e) => e instanceof Date, oe = (e) => e == null;
127
- const ur = (e) => typeof e == "object";
128
- var re = (e) => !oe(e) && !Array.isArray(e) && ur(e) && !$e(e), dr = (e) => re(e) && e.target ? Qe(e.target) ? e.target.checked : e.target.value : e, js = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, fr = (e, r) => e.has(js(r)), Ls = (e) => {
112
+ const cr = (e) => typeof e == "object";
113
+ var re = (e) => !oe(e) && !Array.isArray(e) && cr(e) && !$e(e), ur = (e) => re(e) && e.target ? Qe(e.target) ? e.target.checked : e.target.value : e, Os = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, dr = (e, r) => e.has(Os(r)), js = (e) => {
129
114
  const r = e.constructor && e.constructor.prototype;
130
115
  return re(r) && r.hasOwnProperty("isPrototypeOf");
131
116
  }, Ut = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
@@ -137,7 +122,7 @@ function te(e) {
137
122
  else if (e instanceof Set)
138
123
  r = new Set(e);
139
124
  else if (!(Ut && (e instanceof Blob || e instanceof FileList)) && (t || re(e)))
140
- if (r = t ? [] : {}, !t && !Ls(e))
125
+ if (r = t ? [] : {}, !t && !js(e))
141
126
  r = e;
142
127
  else
143
128
  for (const s in e)
@@ -151,9 +136,9 @@ var Je = (e) => Array.isArray(e) ? e.filter(Boolean) : [], $ = (e) => e === void
151
136
  return t;
152
137
  const s = Je(r.split(/[,[\].]+?/)).reduce((n, i) => oe(n) ? n : n[i], e);
153
138
  return $(s) || s === e ? $(e[r]) ? t : e[r] : s;
154
- }, ge = (e) => typeof e == "boolean", Ht = (e) => /^\w*$/.test(e), pr = (e) => Je(e.replace(/["|']|\]/g, "").split(/\.|\[/)), H = (e, r, t) => {
139
+ }, ge = (e) => typeof e == "boolean", Ht = (e) => /^\w*$/.test(e), fr = (e) => Je(e.replace(/["|']|\]/g, "").split(/\.|\[/)), H = (e, r, t) => {
155
140
  let s = -1;
156
- const n = Ht(r) ? [r] : pr(r), i = n.length, l = i - 1;
141
+ const n = Ht(r) ? [r] : fr(r), i = n.length, l = i - 1;
157
142
  for (; ++s < i; ) {
158
143
  const c = n[s];
159
144
  let d = t;
@@ -185,11 +170,11 @@ const at = {
185
170
  pattern: "pattern",
186
171
  required: "required",
187
172
  validate: "validate"
188
- }, hr = R.createContext(null), pt = () => R.useContext(hr), Uo = (e) => {
173
+ }, pr = I.createContext(null), pt = () => I.useContext(pr), Uo = (e) => {
189
174
  const { children: r, ...t } = e;
190
- return R.createElement(hr.Provider, { value: t }, r);
175
+ return I.createElement(pr.Provider, { value: t }, r);
191
176
  };
192
- var mr = (e, r, t, s = !0) => {
177
+ var hr = (e, r, t, s = !0) => {
193
178
  const n = {
194
179
  defaultValues: r._defaultValues
195
180
  };
@@ -201,14 +186,14 @@ var mr = (e, r, t, s = !0) => {
201
186
  }
202
187
  });
203
188
  return n;
204
- }, le = (e) => re(e) && !Object.keys(e).length, yr = (e, r, t, s) => {
189
+ }, le = (e) => re(e) && !Object.keys(e).length, mr = (e, r, t, s) => {
205
190
  t(e);
206
191
  const { name: n, ...i } = e;
207
192
  return le(i) || Object.keys(i).length >= Object.keys(r).length || Object.keys(i).find((l) => r[l] === (!s || pe.all));
208
- }, ce = (e) => Array.isArray(e) ? e : [e], gr = (e, r, t) => !e || !r || e === r || ce(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s)));
193
+ }, ce = (e) => Array.isArray(e) ? e : [e], yr = (e, r, t) => !e || !r || e === r || ce(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s)));
209
194
  function ht(e) {
210
- const r = R.useRef(e);
211
- r.current = e, R.useEffect(() => {
195
+ const r = I.useRef(e);
196
+ r.current = e, I.useEffect(() => {
212
197
  const t = !e.disabled && r.current.subject && r.current.subject.subscribe({
213
198
  next: r.current.next
214
199
  });
@@ -217,8 +202,8 @@ function ht(e) {
217
202
  };
218
203
  }, [e.disabled]);
219
204
  }
220
- function Bs(e) {
221
- const r = pt(), { control: t = r.control, disabled: s, name: n, exact: i } = e || {}, [l, c] = R.useState(t._formState), d = R.useRef(!0), S = R.useRef({
205
+ function Ls(e) {
206
+ const r = pt(), { control: t = r.control, disabled: s, name: n, exact: i } = e || {}, [l, c] = I.useState(t._formState), d = I.useRef(!0), S = I.useRef({
222
207
  isDirty: !1,
223
208
  isLoading: !1,
224
209
  dirtyFields: !1,
@@ -227,46 +212,46 @@ function Bs(e) {
227
212
  isValidating: !1,
228
213
  isValid: !1,
229
214
  errors: !1
230
- }), m = R.useRef(n);
215
+ }), m = I.useRef(n);
231
216
  return m.current = n, ht({
232
217
  disabled: s,
233
- next: (y) => d.current && gr(m.current, y.name, i) && yr(y, S.current, t._updateFormState) && c({
218
+ next: (y) => d.current && yr(m.current, y.name, i) && mr(y, S.current, t._updateFormState) && c({
234
219
  ...t._formState,
235
220
  ...y
236
221
  }),
237
222
  subject: t._subjects.state
238
- }), R.useEffect(() => (d.current = !0, S.current.isValid && t._updateValid(!0), () => {
223
+ }), I.useEffect(() => (d.current = !0, S.current.isValid && t._updateValid(!0), () => {
239
224
  d.current = !1;
240
- }), [t]), mr(l, t, S.current, !1);
225
+ }), [t]), hr(l, t, S.current, !1);
241
226
  }
242
- var ve = (e) => typeof e == "string", vr = (e, r, t, s, n) => ve(e) ? (s && r.watch.add(e), p(t, e, n)) : Array.isArray(e) ? e.map((i) => (s && r.watch.add(i), p(t, i))) : (s && (r.watchAll = !0), t);
243
- function Us(e) {
244
- const r = pt(), { control: t = r.control, name: s, defaultValue: n, disabled: i, exact: l } = e || {}, c = R.useRef(s);
227
+ var ve = (e) => typeof e == "string", gr = (e, r, t, s, n) => ve(e) ? (s && r.watch.add(e), p(t, e, n)) : Array.isArray(e) ? e.map((i) => (s && r.watch.add(i), p(t, i))) : (s && (r.watchAll = !0), t);
228
+ function Bs(e) {
229
+ const r = pt(), { control: t = r.control, name: s, defaultValue: n, disabled: i, exact: l } = e || {}, c = I.useRef(s);
245
230
  c.current = s, ht({
246
231
  disabled: i,
247
232
  subject: t._subjects.values,
248
233
  next: (m) => {
249
- gr(c.current, m.name, l) && S(te(vr(c.current, t._names, m.values || t._formValues, !1, n)));
234
+ yr(c.current, m.name, l) && S(te(gr(c.current, t._names, m.values || t._formValues, !1, n)));
250
235
  }
251
236
  });
252
- const [d, S] = R.useState(t._getWatch(s, n));
253
- return R.useEffect(() => t._removeUnmounted()), d;
237
+ const [d, S] = I.useState(t._getWatch(s, n));
238
+ return I.useEffect(() => t._removeUnmounted()), d;
254
239
  }
255
- function Hs(e) {
256
- const r = pt(), { name: t, disabled: s, control: n = r.control, shouldUnregister: i } = e, l = fr(n._names.array, t), c = Us({
240
+ function Us(e) {
241
+ const r = pt(), { name: t, disabled: s, control: n = r.control, shouldUnregister: i } = e, l = dr(n._names.array, t), c = Bs({
257
242
  control: n,
258
243
  name: t,
259
244
  defaultValue: p(n._formValues, t, p(n._defaultValues, t, e.defaultValue)),
260
245
  exact: !0
261
- }), d = Bs({
246
+ }), d = Ls({
262
247
  control: n,
263
248
  name: t
264
- }), S = R.useRef(n.register(t, {
249
+ }), S = I.useRef(n.register(t, {
265
250
  ...e.rules,
266
251
  value: c,
267
252
  ...ge(e.disabled) ? { disabled: e.disabled } : {}
268
253
  }));
269
- return R.useEffect(() => {
254
+ return I.useEffect(() => {
270
255
  const m = n._options.shouldUnregister || i, y = (E, O) => {
271
256
  const w = p(n._fields, E);
272
257
  w && w._f && (w._f.mount = O);
@@ -278,7 +263,7 @@ function Hs(e) {
278
263
  return () => {
279
264
  (l ? m && !n._state.action : m) ? n.unregister(t) : y(t, !1);
280
265
  };
281
- }, [t, n, l, i]), R.useEffect(() => {
266
+ }, [t, n, l, i]), I.useEffect(() => {
282
267
  p(n._fields, t) && n._updateDisabledField({
283
268
  disabled: s,
284
269
  fields: n._fields,
@@ -290,14 +275,14 @@ function Hs(e) {
290
275
  name: t,
291
276
  value: c,
292
277
  ...ge(s) || d.disabled ? { disabled: d.disabled || s } : {},
293
- onChange: R.useCallback((m) => S.current.onChange({
278
+ onChange: I.useCallback((m) => S.current.onChange({
294
279
  target: {
295
- value: dr(m),
280
+ value: ur(m),
296
281
  name: t
297
282
  },
298
283
  type: at.CHANGE
299
284
  }), [t]),
300
- onBlur: R.useCallback(() => S.current.onBlur({
285
+ onBlur: I.useCallback(() => S.current.onBlur({
301
286
  target: {
302
287
  value: p(n._formValues, t),
303
288
  name: t
@@ -339,8 +324,8 @@ function Hs(e) {
339
324
  })
340
325
  };
341
326
  }
342
- const Ho = (e) => e.render(Hs(e));
343
- var Ws = (e, r, t, s, n) => r ? {
327
+ const Ho = (e) => e.render(Us(e));
328
+ var Hs = (e, r, t, s, n) => r ? {
344
329
  ...t[e],
345
330
  types: {
346
331
  ...t[e] && t[e].types ? t[e].types : {},
@@ -374,10 +359,10 @@ const qe = (e, r, t, s) => {
374
359
  }
375
360
  }
376
361
  };
377
- var xr = (e, r, t) => {
362
+ var vr = (e, r, t) => {
378
363
  const s = ce(p(e, t));
379
364
  return H(s, "root", r[t]), H(e, t, s), e;
380
- }, Wt = (e) => e.type === "file", Re = (e) => typeof e == "function", lt = (e) => {
365
+ }, Wt = (e) => e.type === "file", Ie = (e) => typeof e == "function", lt = (e) => {
381
366
  if (!Ut)
382
367
  return !1;
383
368
  const r = e ? e.ownerDocument : 0;
@@ -387,7 +372,7 @@ const Zt = {
387
372
  value: !1,
388
373
  isValid: !1
389
374
  }, Qt = { value: !0, isValid: !0 };
390
- var Sr = (e) => {
375
+ var xr = (e) => {
391
376
  if (Array.isArray(e)) {
392
377
  if (e.length > 1) {
393
378
  const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
@@ -404,7 +389,7 @@ const Jt = {
404
389
  isValid: !1,
405
390
  value: null
406
391
  };
407
- var _r = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
392
+ var Sr = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
408
393
  isValid: !0,
409
394
  value: t.value
410
395
  } : r, Jt) : Jt;
@@ -425,7 +410,7 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
425
410
  return {};
426
411
  const D = l ? l[0] : i, Z = (F) => {
427
412
  s && D.reportValidity && (D.setCustomValidity(ge(F) ? "" : F || ""), D.reportValidity());
428
- }, v = {}, C = Kt(i), V = Qe(i), k = C || V, Q = (P || Wt(i)) && $(i.value) && $(g) || lt(i) && i.value === "" || g === "" || Array.isArray(g) && !g.length, z = Ws.bind(null, w, t, v), de = (F, N, B, j = we.maxLength, Y = we.minLength) => {
413
+ }, v = {}, A = Kt(i), V = Qe(i), k = A || V, Q = (P || Wt(i)) && $(i.value) && $(g) || lt(i) && i.value === "" || g === "" || Array.isArray(g) && !g.length, z = Hs.bind(null, w, t, v), de = (F, N, B, j = we.maxLength, Y = we.minLength) => {
429
414
  const X = F ? N : B;
430
415
  v[w] = {
431
416
  type: F ? j : Y,
@@ -434,7 +419,7 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
434
419
  ...z(F ? j : Y, X)
435
420
  };
436
421
  };
437
- if (n ? !Array.isArray(g) || !g.length : c && (!k && (Q || oe(g)) || ge(g) && !g || V && !Sr(l).isValid || C && !_r(l).isValid)) {
422
+ if (n ? !Array.isArray(g) || !g.length : c && (!k && (Q || oe(g)) || ge(g) && !g || V && !xr(l).isValid || A && !Sr(l).isValid)) {
438
423
  const { value: F, message: N } = it(c) ? { value: !!c, message: c } : Ke(c);
439
424
  if (F && (v[w] = {
440
425
  type: we.required,
@@ -473,7 +458,7 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
473
458
  return Z(N), v;
474
459
  }
475
460
  if (O) {
476
- if (Re(O)) {
461
+ if (Ie(O)) {
477
462
  const F = await O(g, r), N = er(F, D);
478
463
  if (N && (v[w] = {
479
464
  ...N,
@@ -504,139 +489,139 @@ var Ke = (e) => re(e) && !ct(e) ? e : {
504
489
  ...ce(r)
505
490
  ], wt = (e) => Array.isArray(e) ? e.map(() => {
506
491
  }) : void 0;
507
- function Ct(e, r, t) {
492
+ function At(e, r, t) {
508
493
  return [
509
494
  ...e.slice(0, r),
510
495
  ...ce(t),
511
496
  ...e.slice(r)
512
497
  ];
513
498
  }
514
- var At = (e, r, t) => Array.isArray(e) ? ($(e[t]) && (e[t] = void 0), e.splice(t, 0, e.splice(r, 1)[0]), e) : [], Vt = (e, r) => [
499
+ var Ct = (e, r, t) => Array.isArray(e) ? ($(e[t]) && (e[t] = void 0), e.splice(t, 0, e.splice(r, 1)[0]), e) : [], Vt = (e, r) => [
515
500
  ...ce(r),
516
501
  ...ce(e)
517
502
  ];
518
- function Ks(e, r) {
503
+ function Ws(e, r) {
519
504
  let t = 0;
520
505
  const s = [...e];
521
506
  for (const n of r)
522
507
  s.splice(n - t, 1), t++;
523
508
  return Je(s).length ? s : [];
524
509
  }
525
- var Et = (e, r) => $(r) ? [] : Ks(e, ce(r).sort((t, s) => t - s)), Ft = (e, r, t) => {
510
+ var Et = (e, r) => $(r) ? [] : Ws(e, ce(r).sort((t, s) => t - s)), Ft = (e, r, t) => {
526
511
  [e[r], e[t]] = [e[t], e[r]];
527
512
  };
528
- function $s(e, r) {
513
+ function Ks(e, r) {
529
514
  const t = r.slice(0, -1).length;
530
515
  let s = 0;
531
516
  for (; s < t; )
532
517
  e = $(e) ? s++ : e[r[s++]];
533
518
  return e;
534
519
  }
535
- function qs(e) {
520
+ function $s(e) {
536
521
  for (const r in e)
537
522
  if (e.hasOwnProperty(r) && !$(e[r]))
538
523
  return !1;
539
524
  return !0;
540
525
  }
541
526
  function ee(e, r) {
542
- const t = Array.isArray(r) ? r : Ht(r) ? [r] : pr(r), s = t.length === 1 ? e : $s(e, t), n = t.length - 1, i = t[n];
543
- return s && delete s[i], n !== 0 && (re(s) && le(s) || Array.isArray(s) && qs(s)) && ee(e, t.slice(0, -1)), e;
527
+ const t = Array.isArray(r) ? r : Ht(r) ? [r] : fr(r), s = t.length === 1 ? e : Ks(e, t), n = t.length - 1, i = t[n];
528
+ return s && delete s[i], n !== 0 && (re(s) && le(s) || Array.isArray(s) && $s(s)) && ee(e, t.slice(0, -1)), e;
544
529
  }
545
530
  var tr = (e, r, t) => (e[r] = t, e);
546
531
  function Wo(e) {
547
- const r = pt(), { control: t = r.control, name: s, keyName: n = "id", shouldUnregister: i } = e, [l, c] = R.useState(t._getFieldArray(s)), d = R.useRef(t._getFieldArray(s).map(Fe)), S = R.useRef(l), m = R.useRef(s), y = R.useRef(!1);
532
+ const r = pt(), { control: t = r.control, name: s, keyName: n = "id", shouldUnregister: i } = e, [l, c] = I.useState(t._getFieldArray(s)), d = I.useRef(t._getFieldArray(s).map(Fe)), S = I.useRef(l), m = I.useRef(s), y = I.useRef(!1);
548
533
  m.current = s, S.current = l, t._names.array.add(s), e.rules && t.register(s, e.rules), ht({
549
- next: ({ values: v, name: C }) => {
550
- if (C === m.current || !C) {
534
+ next: ({ values: v, name: A }) => {
535
+ if (A === m.current || !A) {
551
536
  const V = p(v, m.current);
552
537
  Array.isArray(V) && (c(V), d.current = V.map(Fe));
553
538
  }
554
539
  },
555
540
  subject: t._subjects.array
556
541
  });
557
- const E = R.useCallback((v) => {
542
+ const E = I.useCallback((v) => {
558
543
  y.current = !0, t._updateFieldArray(s, v);
559
- }, [t, s]), O = (v, C) => {
544
+ }, [t, s]), O = (v, A) => {
560
545
  const V = ce(te(v)), k = bt(t._getFieldArray(s), V);
561
- t._names.focus = _t(s, k.length - 1, C), d.current = bt(d.current, V.map(Fe)), E(k), c(k), t._updateFieldArray(s, k, bt, {
546
+ t._names.focus = _t(s, k.length - 1, A), d.current = bt(d.current, V.map(Fe)), E(k), c(k), t._updateFieldArray(s, k, bt, {
562
547
  argA: wt(v)
563
548
  });
564
- }, w = (v, C) => {
549
+ }, w = (v, A) => {
565
550
  const V = ce(te(v)), k = Vt(t._getFieldArray(s), V);
566
- t._names.focus = _t(s, 0, C), d.current = Vt(d.current, V.map(Fe)), E(k), c(k), t._updateFieldArray(s, k, Vt, {
551
+ t._names.focus = _t(s, 0, A), d.current = Vt(d.current, V.map(Fe)), E(k), c(k), t._updateFieldArray(s, k, Vt, {
567
552
  argA: wt(v)
568
553
  });
569
554
  }, P = (v) => {
570
- const C = Et(t._getFieldArray(s), v);
571
- d.current = Et(d.current, v), E(C), c(C), t._updateFieldArray(s, C, Et, {
555
+ const A = Et(t._getFieldArray(s), v);
556
+ d.current = Et(d.current, v), E(A), c(A), t._updateFieldArray(s, A, Et, {
572
557
  argA: v
573
558
  });
574
- }, M = (v, C, V) => {
575
- const k = ce(te(C)), Q = Ct(t._getFieldArray(s), v, k);
576
- t._names.focus = _t(s, v, V), d.current = Ct(d.current, v, k.map(Fe)), E(Q), c(Q), t._updateFieldArray(s, Q, Ct, {
559
+ }, M = (v, A, V) => {
560
+ const k = ce(te(A)), Q = At(t._getFieldArray(s), v, k);
561
+ t._names.focus = _t(s, v, V), d.current = At(d.current, v, k.map(Fe)), E(Q), c(Q), t._updateFieldArray(s, Q, At, {
577
562
  argA: v,
578
- argB: wt(C)
563
+ argB: wt(A)
579
564
  });
580
- }, T = (v, C) => {
565
+ }, T = (v, A) => {
581
566
  const V = t._getFieldArray(s);
582
- Ft(V, v, C), Ft(d.current, v, C), E(V), c(V), t._updateFieldArray(s, V, Ft, {
567
+ Ft(V, v, A), Ft(d.current, v, A), E(V), c(V), t._updateFieldArray(s, V, Ft, {
583
568
  argA: v,
584
- argB: C
569
+ argB: A
585
570
  }, !1);
586
- }, g = (v, C) => {
571
+ }, g = (v, A) => {
587
572
  const V = t._getFieldArray(s);
588
- At(V, v, C), At(d.current, v, C), E(V), c(V), t._updateFieldArray(s, V, At, {
573
+ Ct(V, v, A), Ct(d.current, v, A), E(V), c(V), t._updateFieldArray(s, V, Ct, {
589
574
  argA: v,
590
- argB: C
575
+ argB: A
591
576
  }, !1);
592
- }, D = (v, C) => {
593
- const V = te(C), k = tr(t._getFieldArray(s), v, V);
577
+ }, D = (v, A) => {
578
+ const V = te(A), k = tr(t._getFieldArray(s), v, V);
594
579
  d.current = [...k].map((Q, z) => !Q || z === v ? Fe() : d.current[z]), E(k), c([...k]), t._updateFieldArray(s, k, tr, {
595
580
  argA: v,
596
581
  argB: V
597
582
  }, !0, !1);
598
583
  }, Z = (v) => {
599
- const C = ce(te(v));
600
- d.current = C.map(Fe), E([...C]), c([...C]), t._updateFieldArray(s, [...C], (V) => V, {}, !0, !1);
584
+ const A = ce(te(v));
585
+ d.current = A.map(Fe), E([...A]), c([...A]), t._updateFieldArray(s, [...A], (V) => V, {}, !0, !1);
601
586
  };
602
- return R.useEffect(() => {
587
+ return I.useEffect(() => {
603
588
  if (t._state.action = !1, Dt(s, t._names) && t._subjects.state.next({
604
589
  ...t._formState
605
590
  }), y.current && (!Ze(t._options.mode).isOnSubmit || t._formState.isSubmitted))
606
591
  if (t._options.resolver)
607
592
  t._executeSchema([s]).then((v) => {
608
- const C = p(v.errors, s), V = p(t._formState.errors, s);
609
- (V ? !C && V.type || C && (V.type !== C.type || V.message !== C.message) : C && C.type) && (C ? H(t._formState.errors, s, C) : ee(t._formState.errors, s), t._subjects.state.next({
593
+ const A = p(v.errors, s), V = p(t._formState.errors, s);
594
+ (V ? !A && V.type || A && (V.type !== A.type || V.message !== A.message) : A && A.type) && (A ? H(t._formState.errors, s, A) : ee(t._formState.errors, s), t._subjects.state.next({
610
595
  errors: t._formState.errors
611
596
  }));
612
597
  });
613
598
  else {
614
599
  const v = p(t._fields, s);
615
- v && v._f && !(Ze(t._options.reValidateMode).isOnSubmit && Ze(t._options.mode).isOnSubmit) && Pt(v, t._formValues, t._options.criteriaMode === pe.all, t._options.shouldUseNativeValidation, !0).then((C) => !le(C) && t._subjects.state.next({
616
- errors: xr(t._formState.errors, C, s)
600
+ v && v._f && !(Ze(t._options.reValidateMode).isOnSubmit && Ze(t._options.mode).isOnSubmit) && Pt(v, t._formValues, t._options.criteriaMode === pe.all, t._options.shouldUseNativeValidation, !0).then((A) => !le(A) && t._subjects.state.next({
601
+ errors: vr(t._formState.errors, A, s)
617
602
  }));
618
603
  }
619
604
  t._subjects.values.next({
620
605
  name: s,
621
606
  values: { ...t._formValues }
622
- }), t._names.focus && qe(t._fields, (v, C) => {
623
- if (t._names.focus && C.startsWith(t._names.focus) && v.focus)
607
+ }), t._names.focus && qe(t._fields, (v, A) => {
608
+ if (t._names.focus && A.startsWith(t._names.focus) && v.focus)
624
609
  return v.focus(), 1;
625
610
  }), t._names.focus = "", t._updateValid(), y.current = !1;
626
- }, [l, s, t]), R.useEffect(() => (!p(t._formValues, s) && t._updateFieldArray(s), () => {
611
+ }, [l, s, t]), I.useEffect(() => (!p(t._formValues, s) && t._updateFieldArray(s), () => {
627
612
  (t._options.shouldUnregister || i) && t.unregister(s);
628
613
  }), [s, t, n, i]), {
629
- swap: R.useCallback(T, [E, s, t]),
630
- move: R.useCallback(g, [E, s, t]),
631
- prepend: R.useCallback(w, [E, s, t]),
632
- append: R.useCallback(O, [E, s, t]),
633
- remove: R.useCallback(P, [E, s, t]),
634
- insert: R.useCallback(M, [E, s, t]),
635
- update: R.useCallback(D, [E, s, t]),
636
- replace: R.useCallback(Z, [E, s, t]),
637
- fields: R.useMemo(() => l.map((v, C) => ({
614
+ swap: I.useCallback(T, [E, s, t]),
615
+ move: I.useCallback(g, [E, s, t]),
616
+ prepend: I.useCallback(w, [E, s, t]),
617
+ append: I.useCallback(O, [E, s, t]),
618
+ remove: I.useCallback(P, [E, s, t]),
619
+ insert: I.useCallback(M, [E, s, t]),
620
+ update: I.useCallback(D, [E, s, t]),
621
+ replace: I.useCallback(Z, [E, s, t]),
622
+ fields: I.useMemo(() => l.map((v, A) => ({
638
623
  ...v,
639
- [n]: d.current[C] || Fe()
624
+ [n]: d.current[A] || Fe()
640
625
  })), [l, n])
641
626
  };
642
627
  }
@@ -659,7 +644,7 @@ var Tt = () => {
659
644
  e = [];
660
645
  }
661
646
  };
662
- }, ut = (e) => oe(e) || !ur(e);
647
+ }, ut = (e) => oe(e) || !cr(e);
663
648
  function Me(e, r) {
664
649
  if (ut(e) || ut(r))
665
650
  return e === r;
@@ -680,9 +665,9 @@ function Me(e, r) {
680
665
  }
681
666
  return !0;
682
667
  }
683
- var br = (e) => e.type === "select-multiple", Gs = (e) => Kt(e) || Qe(e), It = (e) => lt(e) && e.isConnected, wr = (e) => {
668
+ var _r = (e) => e.type === "select-multiple", qs = (e) => Kt(e) || Qe(e), Rt = (e) => lt(e) && e.isConnected, br = (e) => {
684
669
  for (const r in e)
685
- if (Re(e[r]))
670
+ if (Ie(e[r]))
686
671
  return !0;
687
672
  return !1;
688
673
  };
@@ -690,23 +675,23 @@ function dt(e, r = {}) {
690
675
  const t = Array.isArray(e);
691
676
  if (re(e) || t)
692
677
  for (const s in e)
693
- Array.isArray(e[s]) || re(e[s]) && !wr(e[s]) ? (r[s] = Array.isArray(e[s]) ? [] : {}, dt(e[s], r[s])) : oe(e[s]) || (r[s] = !0);
678
+ Array.isArray(e[s]) || re(e[s]) && !br(e[s]) ? (r[s] = Array.isArray(e[s]) ? [] : {}, dt(e[s], r[s])) : oe(e[s]) || (r[s] = !0);
694
679
  return r;
695
680
  }
696
- function Cr(e, r, t) {
681
+ function wr(e, r, t) {
697
682
  const s = Array.isArray(e);
698
683
  if (re(e) || s)
699
684
  for (const n in e)
700
- Array.isArray(e[n]) || re(e[n]) && !wr(e[n]) ? $(r) || ut(t[n]) ? t[n] = Array.isArray(e[n]) ? dt(e[n], []) : { ...dt(e[n]) } : Cr(e[n], oe(r) ? {} : r[n], t[n]) : t[n] = !Me(e[n], r[n]);
685
+ Array.isArray(e[n]) || re(e[n]) && !br(e[n]) ? $(r) || ut(t[n]) ? t[n] = Array.isArray(e[n]) ? dt(e[n], []) : { ...dt(e[n]) } : wr(e[n], oe(r) ? {} : r[n], t[n]) : t[n] = !Me(e[n], r[n]);
701
686
  return t;
702
687
  }
703
- var ot = (e, r) => Cr(e, r, dt(r)), Ar = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => $(e) ? e : r ? e === "" ? NaN : e && +e : t && ve(e) ? new Date(e) : s ? s(e) : e;
704
- function Rt(e) {
688
+ var ot = (e, r) => wr(e, r, dt(r)), Ar = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => $(e) ? e : r ? e === "" ? NaN : e && +e : t && ve(e) ? new Date(e) : s ? s(e) : e;
689
+ function It(e) {
705
690
  const r = e.ref;
706
691
  if (!(e.refs ? e.refs.every((t) => t.disabled) : r.disabled))
707
- return Wt(r) ? r.files : Kt(r) ? _r(e.refs).value : br(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Qe(r) ? Sr(e.refs).value : Ar($(r.value) ? e.ref.value : r.value, e);
692
+ return Wt(r) ? r.files : Kt(r) ? Sr(e.refs).value : _r(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Qe(r) ? xr(e.refs).value : Ar($(r.value) ? e.ref.value : r.value, e);
708
693
  }
709
- var zs = (e, r, t, s) => {
694
+ var Gs = (e, r, t, s) => {
710
695
  const n = {};
711
696
  for (const i of e) {
712
697
  const l = p(r, i);
@@ -718,7 +703,7 @@ var zs = (e, r, t, s) => {
718
703
  fields: n,
719
704
  shouldUseNativeValidation: s
720
705
  };
721
- }, Ye = (e) => $(e) ? e : ct(e) ? e.source : re(e) ? ct(e.value) ? e.value.source : e.value : e, Ys = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
706
+ }, Ye = (e) => $(e) ? e : ct(e) ? e.source : re(e) ? ct(e.value) ? e.value.source : e.value : e, zs = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
722
707
  function rr(e, r, t) {
723
708
  const s = p(e, t);
724
709
  if (s || Ht(t))
@@ -742,20 +727,20 @@ function rr(e, r, t) {
742
727
  name: t
743
728
  };
744
729
  }
745
- var Xs = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, Zs = (e, r) => !Je(p(e, r)).length && ee(e, r);
746
- const Qs = {
730
+ var Ys = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, Xs = (e, r) => !Je(p(e, r)).length && ee(e, r);
731
+ const Zs = {
747
732
  mode: pe.onSubmit,
748
733
  reValidateMode: pe.onChange,
749
734
  shouldFocusError: !0
750
735
  };
751
- function Js(e = {}) {
736
+ function Qs(e = {}) {
752
737
  let r = {
753
- ...Qs,
738
+ ...Zs,
754
739
  ...e
755
740
  }, t = {
756
741
  submitCount: 0,
757
742
  isDirty: !1,
758
- isLoading: Re(r.defaultValues),
743
+ isLoading: Ie(r.defaultValues),
759
744
  isValidating: !1,
760
745
  isSubmitted: !1,
761
746
  isSubmitting: !1,
@@ -807,16 +792,16 @@ function Js(e = {}) {
807
792
  }, g = (o, a = [], u, _, x = !0, f = !0) => {
808
793
  if (_ && u) {
809
794
  if (l.action = !0, f && Array.isArray(p(s, o))) {
810
- const A = u(p(s, o), _.argA, _.argB);
811
- x && H(s, o, A);
795
+ const C = u(p(s, o), _.argA, _.argB);
796
+ x && H(s, o, C);
812
797
  }
813
798
  if (f && Array.isArray(p(t.errors, o))) {
814
- const A = u(p(t.errors, o), _.argA, _.argB);
815
- x && H(t.errors, o, A), Zs(t.errors, o);
799
+ const C = u(p(t.errors, o), _.argA, _.argB);
800
+ x && H(t.errors, o, C), Xs(t.errors, o);
816
801
  }
817
802
  if (m.touchedFields && f && Array.isArray(p(t.touchedFields, o))) {
818
- const A = u(p(t.touchedFields, o), _.argA, _.argB);
819
- x && H(t.touchedFields, o, A);
803
+ const C = u(p(t.touchedFields, o), _.argA, _.argB);
804
+ x && H(t.touchedFields, o, C);
820
805
  }
821
806
  m.dirtyFields && (t.dirtyFields = ot(n, i)), y.state.next({
822
807
  name: o,
@@ -840,17 +825,17 @@ function Js(e = {}) {
840
825
  const x = p(s, o);
841
826
  if (x) {
842
827
  const f = p(i, o, $(u) ? p(n, o) : u);
843
- $(f) || _ && _.defaultChecked || a ? H(i, o, a ? f : Rt(x._f)) : j(o, f), l.mount && M();
828
+ $(f) || _ && _.defaultChecked || a ? H(i, o, a ? f : It(x._f)) : j(o, f), l.mount && M();
844
829
  }
845
- }, C = (o, a, u, _, x) => {
846
- let f = !1, A = !1;
830
+ }, A = (o, a, u, _, x) => {
831
+ let f = !1, C = !1;
847
832
  const L = {
848
833
  name: o
849
834
  }, J = !!(p(s, o) && p(s, o)._f && p(s, o)._f.disabled);
850
835
  if (!u || _) {
851
- m.isDirty && (A = t.isDirty, t.isDirty = L.isDirty = F(), f = A !== L.isDirty);
836
+ m.isDirty && (C = t.isDirty, t.isDirty = L.isDirty = F(), f = C !== L.isDirty);
852
837
  const ue = J || Me(p(n, o), a);
853
- A = !!(!J && p(t.dirtyFields, o)), ue || J ? ee(t.dirtyFields, o) : H(t.dirtyFields, o, !0), L.dirtyFields = t.dirtyFields, f = f || m.dirtyFields && A !== !ue;
838
+ C = !!(!J && p(t.dirtyFields, o)), ue || J ? ee(t.dirtyFields, o) : H(t.dirtyFields, o, !0), L.dirtyFields = t.dirtyFields, f = f || m.dirtyFields && C !== !ue;
854
839
  }
855
840
  if (u) {
856
841
  const ue = p(t.touchedFields, o);
@@ -860,7 +845,7 @@ function Js(e = {}) {
860
845
  }, V = (o, a, u, _) => {
861
846
  const x = p(t.errors, o), f = m.isValid && ge(a) && t.isValid !== a;
862
847
  if (e.delayError && u ? (d = P(() => D(o, u)), d(e.delayError)) : (clearTimeout(S), d = null, u ? H(t.errors, o, u) : ee(t.errors, o)), (u ? !Me(x, u) : x) || !le(_) || f) {
863
- const A = {
848
+ const C = {
864
849
  ..._,
865
850
  ...f && ge(a) ? { isValid: a } : {},
866
851
  errors: t.errors,
@@ -868,12 +853,12 @@ function Js(e = {}) {
868
853
  };
869
854
  t = {
870
855
  ...t,
871
- ...A
872
- }, y.state.next(A);
856
+ ...C
857
+ }, y.state.next(C);
873
858
  }
874
859
  }, k = async (o) => {
875
860
  T(o, !0);
876
- const a = await r.resolver(i, r.context, zs(o || c.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
861
+ const a = await r.resolver(i, r.context, Gs(o || c.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
877
862
  return T(o), a;
878
863
  }, Q = async (o) => {
879
864
  const { errors: a } = await k(o);
@@ -891,42 +876,42 @@ function Js(e = {}) {
891
876
  for (const _ in o) {
892
877
  const x = o[_];
893
878
  if (x) {
894
- const { _f: f, ...A } = x;
879
+ const { _f: f, ...C } = x;
895
880
  if (f) {
896
881
  const L = c.array.has(f.name);
897
882
  T([_], !0);
898
883
  const J = await Pt(x, i, w, r.shouldUseNativeValidation && !a, L);
899
884
  if (T([_]), J[f.name] && (u.valid = !1, a))
900
885
  break;
901
- !a && (p(J, f.name) ? L ? xr(t.errors, J, f.name) : H(t.errors, f.name, J[f.name]) : ee(t.errors, f.name));
886
+ !a && (p(J, f.name) ? L ? vr(t.errors, J, f.name) : H(t.errors, f.name, J[f.name]) : ee(t.errors, f.name));
902
887
  }
903
- A && await z(A, a, u);
888
+ C && await z(C, a, u);
904
889
  }
905
890
  }
906
891
  return u.valid;
907
892
  }, de = () => {
908
893
  for (const o of c.unMount) {
909
894
  const a = p(s, o);
910
- a && (a._f.refs ? a._f.refs.every((u) => !It(u)) : !It(a._f.ref)) && be(o);
895
+ a && (a._f.refs ? a._f.refs.every((u) => !Rt(u)) : !Rt(a._f.ref)) && be(o);
911
896
  }
912
897
  c.unMount = /* @__PURE__ */ new Set();
913
- }, F = (o, a) => (o && a && H(i, o, a), !Me(ke(), n)), N = (o, a, u) => vr(o, c, {
898
+ }, F = (o, a) => (o && a && H(i, o, a), !Me(ke(), n)), N = (o, a, u) => gr(o, c, {
914
899
  ...l.mount ? i : $(a) ? n : ve(o) ? { [o]: a } : a
915
900
  }, u, a), B = (o) => Je(p(l.mount ? i : n, o, e.shouldUnregister ? p(n, o, []) : [])), j = (o, a, u = {}) => {
916
901
  const _ = p(s, o);
917
902
  let x = a;
918
903
  if (_) {
919
904
  const f = _._f;
920
- f && (!f.disabled && H(i, o, Ar(a, f)), x = lt(f.ref) && oe(a) ? "" : a, br(f.ref) ? [...f.ref.options].forEach((A) => A.selected = x.includes(A.value)) : f.refs ? Qe(f.ref) ? f.refs.length > 1 ? f.refs.forEach((A) => (!A.defaultChecked || !A.disabled) && (A.checked = Array.isArray(x) ? !!x.find((L) => L === A.value) : x === A.value)) : f.refs[0] && (f.refs[0].checked = !!x) : f.refs.forEach((A) => A.checked = A.value === x) : Wt(f.ref) ? f.ref.value = "" : (f.ref.value = x, f.ref.type || y.values.next({
905
+ f && (!f.disabled && H(i, o, Ar(a, f)), x = lt(f.ref) && oe(a) ? "" : a, _r(f.ref) ? [...f.ref.options].forEach((C) => C.selected = x.includes(C.value)) : f.refs ? Qe(f.ref) ? f.refs.length > 1 ? f.refs.forEach((C) => (!C.defaultChecked || !C.disabled) && (C.checked = Array.isArray(x) ? !!x.find((L) => L === C.value) : x === C.value)) : f.refs[0] && (f.refs[0].checked = !!x) : f.refs.forEach((C) => C.checked = C.value === x) : Wt(f.ref) ? f.ref.value = "" : (f.ref.value = x, f.ref.type || y.values.next({
921
906
  name: o,
922
907
  values: { ...i }
923
908
  })));
924
909
  }
925
- (u.shouldDirty || u.shouldTouch) && C(o, x, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && Se(o);
910
+ (u.shouldDirty || u.shouldTouch) && A(o, x, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && Se(o);
926
911
  }, Y = (o, a, u) => {
927
912
  for (const _ in a) {
928
- const x = a[_], f = `${o}.${_}`, A = p(s, f);
929
- (c.array.has(o) || !ut(x) || A && !A._f) && !$e(x) ? Y(f, x, u) : j(f, x, u);
913
+ const x = a[_], f = `${o}.${_}`, C = p(s, f);
914
+ (c.array.has(o) || !ut(x) || C && !C._f) && !$e(x) ? Y(f, x, u) : j(f, x, u);
930
915
  }
931
916
  }, X = (o, a, u = {}) => {
932
917
  const _ = p(s, o), x = c.array.has(o), f = te(a);
@@ -945,28 +930,28 @@ function Js(e = {}) {
945
930
  l.mount = !0;
946
931
  const a = o.target;
947
932
  let u = a.name, _ = !0;
948
- const x = p(s, u), f = () => a.type ? Rt(x._f) : dr(o), A = (L) => {
933
+ const x = p(s, u), f = () => a.type ? It(x._f) : ur(o), C = (L) => {
949
934
  _ = Number.isNaN(L) || L === p(i, u, L);
950
935
  };
951
936
  if (x) {
952
937
  let L, J;
953
- const ue = f(), Be = o.type === at.BLUR || o.type === at.FOCUS_OUT, us = !Ys(x._f) && !r.resolver && !p(t.errors, u) && !x._f.deps || Xs(Be, p(t.touchedFields, u), t.isSubmitted, O, E), vt = Dt(u, c, Be);
938
+ const ue = f(), Be = o.type === at.BLUR || o.type === at.FOCUS_OUT, cs = !zs(x._f) && !r.resolver && !p(t.errors, u) && !x._f.deps || Ys(Be, p(t.touchedFields, u), t.isSubmitted, O, E), vt = Dt(u, c, Be);
954
939
  H(i, u, ue), Be ? (x._f.onBlur && x._f.onBlur(o), d && d(0)) : x._f.onChange && x._f.onChange(o);
955
- const xt = C(u, ue, Be, !1), ds = !le(xt) || vt;
940
+ const xt = A(u, ue, Be, !1), us = !le(xt) || vt;
956
941
  if (!Be && y.values.next({
957
942
  name: u,
958
943
  type: o.type,
959
944
  values: { ...i }
960
- }), us)
961
- return m.isValid && M(), ds && y.state.next({ name: u, ...vt ? {} : xt });
945
+ }), cs)
946
+ return m.isValid && M(), us && y.state.next({ name: u, ...vt ? {} : xt });
962
947
  if (!Be && vt && y.state.next({ ...t }), r.resolver) {
963
948
  const { errors: qt } = await k([u]);
964
- if (A(ue), _) {
965
- const fs = rr(t.errors, s, u), Gt = rr(qt, s, fs.name || u);
949
+ if (C(ue), _) {
950
+ const ds = rr(t.errors, s, u), Gt = rr(qt, s, ds.name || u);
966
951
  L = Gt.error, u = Gt.name, J = le(qt);
967
952
  }
968
953
  } else
969
- T([u], !0), L = (await Pt(x, i, w, r.shouldUseNativeValidation))[u], T([u]), A(ue), _ && (L ? J = !1 : m.isValid && (J = await z(s, !0)));
954
+ T([u], !0), L = (await Pt(x, i, w, r.shouldUseNativeValidation))[u], T([u]), C(ue), _ && (L ? J = !1 : m.isValid && (J = await z(s, !0)));
970
955
  _ && (x._f.deps && Se(x._f.deps), V(u, J, L, xt));
971
956
  }
972
957
  }, ie = (o, a) => {
@@ -977,10 +962,10 @@ function Js(e = {}) {
977
962
  const x = ce(o);
978
963
  if (r.resolver) {
979
964
  const f = await Q($(o) ? o : x);
980
- u = le(f), _ = o ? !x.some((A) => p(f, A)) : u;
965
+ u = le(f), _ = o ? !x.some((C) => p(f, C)) : u;
981
966
  } else o ? (_ = (await Promise.all(x.map(async (f) => {
982
- const A = p(s, f);
983
- return await z(A && A._f ? { [f]: A } : A);
967
+ const C = p(s, f);
968
+ return await z(C && C._f ? { [f]: C } : C);
984
969
  }))).every(Boolean), !(!_ && !t.isValid) && M()) : _ = u = await z(s);
985
970
  return y.state.next({
986
971
  ...!ve(o) || m.isValid && u !== t.isValid ? {} : { name: o },
@@ -1003,7 +988,7 @@ function Js(e = {}) {
1003
988
  errors: o ? t.errors : {}
1004
989
  });
1005
990
  }, _e = (o, a, u) => {
1006
- const _ = (p(s, o, { _f: {} })._f || {}).ref, x = p(t.errors, o) || {}, { ref: f, message: A, type: L, ...J } = x;
991
+ const _ = (p(s, o, { _f: {} })._f || {}).ref, x = p(t.errors, o) || {}, { ref: f, message: C, type: L, ...J } = x;
1007
992
  H(t.errors, o, {
1008
993
  ...J,
1009
994
  ...a,
@@ -1013,7 +998,7 @@ function Js(e = {}) {
1013
998
  errors: t.errors,
1014
999
  isValid: !1
1015
1000
  }), u && u.shouldFocus && _ && _.focus && _.focus();
1016
- }, Le = (o, a) => Re(o) ? y.values.subscribe({
1001
+ }, Le = (o, a) => Ie(o) ? y.values.subscribe({
1017
1002
  next: (u) => o(N(void 0, a), u)
1018
1003
  }) : N(o, a, !0), be = (o, a = {}) => {
1019
1004
  for (const u of o ? ce(o) : c.mount)
@@ -1024,10 +1009,10 @@ function Js(e = {}) {
1024
1009
  ...t,
1025
1010
  ...a.keepDirty ? { isDirty: F() } : {}
1026
1011
  }), !a.keepIsValid && M();
1027
- }, I = ({ disabled: o, name: a, field: u, fields: _, value: x }) => {
1012
+ }, R = ({ disabled: o, name: a, field: u, fields: _, value: x }) => {
1028
1013
  if (ge(o) && l.mount || o) {
1029
- const f = o ? void 0 : $(x) ? Rt(u ? u._f : p(_, a)._f) : x;
1030
- H(i, a, f), C(a, f, !1, !1, !0);
1014
+ const f = o ? void 0 : $(x) ? It(u ? u._f : p(_, a)._f) : x;
1015
+ H(i, a, f), A(a, f, !1, !1, !0);
1031
1016
  }
1032
1017
  }, K = (o, a = {}) => {
1033
1018
  let u = p(s, o);
@@ -1040,7 +1025,7 @@ function Js(e = {}) {
1040
1025
  mount: !0,
1041
1026
  ...a
1042
1027
  }
1043
- }), c.mount.add(o), u ? I({
1028
+ }), c.mount.add(o), u ? R({
1044
1029
  field: u,
1045
1030
  disabled: a.disabled,
1046
1031
  name: o,
@@ -1061,15 +1046,15 @@ function Js(e = {}) {
1061
1046
  ref: (x) => {
1062
1047
  if (x) {
1063
1048
  K(o, a), u = p(s, o);
1064
- const f = $(x.value) && x.querySelectorAll && x.querySelectorAll("input,select,textarea")[0] || x, A = Gs(f), L = u._f.refs || [];
1065
- if (A ? L.find((J) => J === f) : f === u._f.ref)
1049
+ const f = $(x.value) && x.querySelectorAll && x.querySelectorAll("input,select,textarea")[0] || x, C = qs(f), L = u._f.refs || [];
1050
+ if (C ? L.find((J) => J === f) : f === u._f.ref)
1066
1051
  return;
1067
1052
  H(s, o, {
1068
1053
  _f: {
1069
1054
  ...u._f,
1070
- ...A ? {
1055
+ ...C ? {
1071
1056
  refs: [
1072
- ...L.filter(It),
1057
+ ...L.filter(Rt),
1073
1058
  f,
1074
1059
  ...Array.isArray(p(n, o)) ? [{}] : []
1075
1060
  ],
@@ -1078,7 +1063,7 @@ function Js(e = {}) {
1078
1063
  }
1079
1064
  }), v(o, !1, void 0, f);
1080
1065
  } else
1081
- u = p(s, o, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || a.shouldUnregister) && !(fr(c.array, o) && l.action) && c.unMount.add(o);
1066
+ u = p(s, o, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || a.shouldUnregister) && !(dr(c.array, o) && l.action) && c.unMount.add(o);
1082
1067
  }
1083
1068
  };
1084
1069
  }, se = () => r.shouldFocusError && qe(s, ie, c.mount), q = (o) => {
@@ -1095,8 +1080,8 @@ function Js(e = {}) {
1095
1080
  if (y.state.next({
1096
1081
  isSubmitting: !0
1097
1082
  }), r.resolver) {
1098
- const { errors: f, values: A } = await k();
1099
- t.errors = f, x = A;
1083
+ const { errors: f, values: C } = await k();
1084
+ t.errors = f, x = C;
1100
1085
  } else
1101
1086
  await z(s);
1102
1087
  if (ee(t.errors, "root"), le(t.errors)) {
@@ -1124,12 +1109,12 @@ function Js(e = {}) {
1124
1109
  const u = o ? te(o) : n, _ = te(u), x = le(o), f = x ? n : _;
1125
1110
  if (a.keepDefaultValues || (n = u), !a.keepValues) {
1126
1111
  if (a.keepDirtyValues)
1127
- for (const A of c.mount)
1128
- p(t.dirtyFields, A) ? H(f, A, p(i, A)) : X(A, p(f, A));
1112
+ for (const C of c.mount)
1113
+ p(t.dirtyFields, C) ? H(f, C, p(i, C)) : X(C, p(f, C));
1129
1114
  else {
1130
1115
  if (Ut && $(o))
1131
- for (const A of c.mount) {
1132
- const L = p(s, A);
1116
+ for (const C of c.mount) {
1117
+ const L = p(s, C);
1133
1118
  if (L && L._f) {
1134
1119
  const J = Array.isArray(L._f.refs) ? L._f.refs[0] : L._f.ref;
1135
1120
  if (lt(J)) {
@@ -1166,7 +1151,7 @@ function Js(e = {}) {
1166
1151
  isSubmitSuccessful: a.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
1167
1152
  isSubmitting: !1
1168
1153
  });
1169
- }, ye = (o, a) => me(Re(o) ? o(i) : o, a);
1154
+ }, ye = (o, a) => me(Ie(o) ? o(i) : o, a);
1170
1155
  return {
1171
1156
  control: {
1172
1157
  register: K,
@@ -1180,10 +1165,10 @@ function Js(e = {}) {
1180
1165
  _updateValid: M,
1181
1166
  _removeUnmounted: de,
1182
1167
  _updateFieldArray: g,
1183
- _updateDisabledField: I,
1168
+ _updateDisabledField: R,
1184
1169
  _getFieldArray: B,
1185
1170
  _reset: me,
1186
- _resetDefaultValues: () => Re(r.defaultValues) && r.defaultValues().then((o) => {
1171
+ _resetDefaultValues: () => Ie(r.defaultValues) && r.defaultValues().then((o) => {
1187
1172
  ye(o, r.resetOptions), y.state.next({
1188
1173
  isLoading: !1
1189
1174
  });
@@ -1257,10 +1242,10 @@ function Js(e = {}) {
1257
1242
  };
1258
1243
  }
1259
1244
  function Ko(e = {}) {
1260
- const r = R.useRef(), t = R.useRef(), [s, n] = R.useState({
1245
+ const r = I.useRef(), t = I.useRef(), [s, n] = I.useState({
1261
1246
  isDirty: !1,
1262
1247
  isValidating: !1,
1263
- isLoading: Re(e.defaultValues),
1248
+ isLoading: Ie(e.defaultValues),
1264
1249
  isSubmitted: !1,
1265
1250
  isSubmitting: !1,
1266
1251
  isSubmitSuccessful: !1,
@@ -1271,48 +1256,48 @@ function Ko(e = {}) {
1271
1256
  validatingFields: {},
1272
1257
  errors: e.errors || {},
1273
1258
  disabled: e.disabled || !1,
1274
- defaultValues: Re(e.defaultValues) ? void 0 : e.defaultValues
1259
+ defaultValues: Ie(e.defaultValues) ? void 0 : e.defaultValues
1275
1260
  });
1276
1261
  r.current || (r.current = {
1277
- ...Js(e),
1262
+ ...Qs(e),
1278
1263
  formState: s
1279
1264
  });
1280
1265
  const i = r.current.control;
1281
1266
  return i._options = e, ht({
1282
1267
  subject: i._subjects.state,
1283
1268
  next: (l) => {
1284
- yr(l, i._proxyFormState, i._updateFormState, !0) && n({ ...i._formState });
1269
+ mr(l, i._proxyFormState, i._updateFormState, !0) && n({ ...i._formState });
1285
1270
  }
1286
- }), R.useEffect(() => i._disableForm(e.disabled), [i, e.disabled]), R.useEffect(() => {
1271
+ }), I.useEffect(() => i._disableForm(e.disabled), [i, e.disabled]), I.useEffect(() => {
1287
1272
  if (i._proxyFormState.isDirty) {
1288
1273
  const l = i._getDirty();
1289
1274
  l !== s.isDirty && i._subjects.state.next({
1290
1275
  isDirty: l
1291
1276
  });
1292
1277
  }
1293
- }, [i, s.isDirty]), R.useEffect(() => {
1278
+ }, [i, s.isDirty]), I.useEffect(() => {
1294
1279
  e.values && !Me(e.values, t.current) ? (i._reset(e.values, i._options.resetOptions), t.current = e.values, n((l) => ({ ...l }))) : i._resetDefaultValues();
1295
- }, [e.values, i]), R.useEffect(() => {
1280
+ }, [e.values, i]), I.useEffect(() => {
1296
1281
  e.errors && i._setErrors(e.errors);
1297
- }, [e.errors, i]), R.useEffect(() => {
1282
+ }, [e.errors, i]), I.useEffect(() => {
1298
1283
  i._state.mount || (i._updateValid(), i._state.mount = !0), i._state.watch && (i._state.watch = !1, i._subjects.state.next({ ...i._formState })), i._removeUnmounted();
1299
- }), R.useEffect(() => {
1284
+ }), I.useEffect(() => {
1300
1285
  e.shouldUnregister && i._subjects.values.next({
1301
1286
  values: i._getWatch()
1302
1287
  });
1303
- }, [e.shouldUnregister, i]), r.current.formState = mr(s, i), r.current;
1288
+ }, [e.shouldUnregister, i]), r.current.formState = hr(s, i), r.current;
1304
1289
  }
1305
1290
  function sr(e, [r, t]) {
1306
1291
  return Math.min(t, Math.max(r, e));
1307
1292
  }
1308
- function eo(e) {
1293
+ function Js(e) {
1309
1294
  const r = h.useRef({ value: e, previous: e });
1310
1295
  return h.useMemo(() => (r.current.value !== e && (r.current.previous = r.current.value, r.current.value = e), r.current.previous), [e]);
1311
1296
  }
1312
- var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Select", [mt, yt, so] = hs(et), [Ge, $o] = ms(et, [
1313
- so,
1297
+ var eo = [" ", "Enter", "ArrowUp", "ArrowDown"], to = [" ", "Enter"], et = "Select", [mt, yt, ro] = ps(et), [Ge, $o] = hs(et, [
1298
+ ro,
1314
1299
  nr
1315
- ]), gt = nr(), [oo, De] = Ge(et), [no, io] = Ge(et), Vr = (e) => {
1300
+ ]), gt = nr(), [so, De] = Ge(et), [oo, no] = Ge(et), Cr = (e) => {
1316
1301
  const {
1317
1302
  __scopeSelect: r,
1318
1303
  children: t,
@@ -1327,7 +1312,7 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
1327
1312
  autoComplete: y,
1328
1313
  disabled: E,
1329
1314
  required: O
1330
- } = e, w = gt(r), [P, M] = h.useState(null), [T, g] = h.useState(null), [D, Z] = h.useState(!1), v = Fs(S), [C = !1, V] = Yt({
1315
+ } = e, w = gt(r), [P, M] = h.useState(null), [T, g] = h.useState(null), [D, Z] = h.useState(!1), v = Es(S), [A = !1, V] = Yt({
1331
1316
  prop: s,
1332
1317
  defaultProp: n,
1333
1318
  onChange: i
@@ -1336,8 +1321,8 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
1336
1321
  defaultProp: c,
1337
1322
  onChange: d
1338
1323
  }), z = h.useRef(null), de = P ? !!P.closest("form") : !0, [F, N] = h.useState(/* @__PURE__ */ new Set()), B = Array.from(F).map((j) => j.props.value).join(";");
1339
- return /* @__PURE__ */ b.jsx(Ts, { ...w, children: /* @__PURE__ */ b.jsxs(
1340
- oo,
1324
+ return /* @__PURE__ */ b.jsx(Fs, { ...w, children: /* @__PURE__ */ b.jsxs(
1325
+ so,
1341
1326
  {
1342
1327
  required: O,
1343
1328
  scope: r,
@@ -1350,14 +1335,14 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
1350
1335
  contentId: Bt(),
1351
1336
  value: k,
1352
1337
  onValueChange: Q,
1353
- open: C,
1338
+ open: A,
1354
1339
  onOpenChange: V,
1355
1340
  dir: v,
1356
1341
  triggerPointerDownPosRef: z,
1357
1342
  disabled: E,
1358
1343
  children: [
1359
1344
  /* @__PURE__ */ b.jsx(mt.Provider, { scope: r, children: /* @__PURE__ */ b.jsx(
1360
- no,
1345
+ oo,
1361
1346
  {
1362
1347
  scope: e.__scopeSelect,
1363
1348
  onNativeOptionAdd: h.useCallback((j) => {
@@ -1373,7 +1358,7 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
1373
1358
  }
1374
1359
  ) }),
1375
1360
  de ? /* @__PURE__ */ b.jsxs(
1376
- Qr,
1361
+ Zr,
1377
1362
  {
1378
1363
  "aria-hidden": !0,
1379
1364
  required: O,
@@ -1394,16 +1379,16 @@ var to = [" ", "Enter", "ArrowUp", "ArrowDown"], ro = [" ", "Enter"], et = "Sele
1394
1379
  }
1395
1380
  ) });
1396
1381
  };
1397
- Vr.displayName = et;
1398
- var Er = "SelectTrigger", Fr = h.forwardRef(
1382
+ Cr.displayName = et;
1383
+ var Vr = "SelectTrigger", Er = h.forwardRef(
1399
1384
  (e, r) => {
1400
- const { __scopeSelect: t, disabled: s = !1, ...n } = e, i = gt(t), l = De(Er, t), c = l.disabled || s, d = xe(r, l.onTriggerChange), S = yt(t), [m, y, E] = Jr((w) => {
1401
- const P = S().filter((g) => !g.disabled), M = P.find((g) => g.value === l.value), T = es(P, w, M);
1385
+ const { __scopeSelect: t, disabled: s = !1, ...n } = e, i = gt(t), l = De(Vr, t), c = l.disabled || s, d = xe(r, l.onTriggerChange), S = yt(t), [m, y, E] = Qr((w) => {
1386
+ const P = S().filter((g) => !g.disabled), M = P.find((g) => g.value === l.value), T = Jr(P, w, M);
1402
1387
  T !== void 0 && l.onValueChange(T.value);
1403
1388
  }), O = () => {
1404
1389
  c || (l.onOpenChange(!0), E());
1405
1390
  };
1406
- return /* @__PURE__ */ b.jsx(ys, { asChild: !0, ...i, children: /* @__PURE__ */ b.jsx(
1391
+ return /* @__PURE__ */ b.jsx(ms, { asChild: !0, ...i, children: /* @__PURE__ */ b.jsx(
1407
1392
  he.button,
1408
1393
  {
1409
1394
  type: "button",
@@ -1416,7 +1401,7 @@ var Er = "SelectTrigger", Fr = h.forwardRef(
1416
1401
  "data-state": l.open ? "open" : "closed",
1417
1402
  disabled: c,
1418
1403
  "data-disabled": c ? "" : void 0,
1419
- "data-placeholder": Zr(l.value) ? "" : void 0,
1404
+ "data-placeholder": Xr(l.value) ? "" : void 0,
1420
1405
  ...n,
1421
1406
  ref: d,
1422
1407
  onClick: ne(n.onClick, (w) => {
@@ -1431,16 +1416,16 @@ var Er = "SelectTrigger", Fr = h.forwardRef(
1431
1416
  }),
1432
1417
  onKeyDown: ne(n.onKeyDown, (w) => {
1433
1418
  const P = m.current !== "";
1434
- !(w.ctrlKey || w.altKey || w.metaKey) && w.key.length === 1 && y(w.key), !(P && w.key === " ") && to.includes(w.key) && (O(), w.preventDefault());
1419
+ !(w.ctrlKey || w.altKey || w.metaKey) && w.key.length === 1 && y(w.key), !(P && w.key === " ") && eo.includes(w.key) && (O(), w.preventDefault());
1435
1420
  })
1436
1421
  }
1437
1422
  ) });
1438
1423
  }
1439
1424
  );
1440
- Fr.displayName = Er;
1441
- var Tr = "SelectValue", Ir = h.forwardRef(
1425
+ Er.displayName = Vr;
1426
+ var Fr = "SelectValue", Tr = h.forwardRef(
1442
1427
  (e, r) => {
1443
- const { __scopeSelect: t, className: s, style: n, children: i, placeholder: l = "", ...c } = e, d = De(Tr, t), { onValueNodeHasChildrenChange: S } = d, m = i !== void 0, y = xe(r, d.onValueNodeChange);
1428
+ const { __scopeSelect: t, className: s, style: n, children: i, placeholder: l = "", ...c } = e, d = De(Fr, t), { onValueNodeHasChildrenChange: S } = d, m = i !== void 0, y = xe(r, d.onValueNodeChange);
1444
1429
  return Ne(() => {
1445
1430
  S(m);
1446
1431
  }, [S, m]), /* @__PURE__ */ b.jsx(
@@ -1449,22 +1434,22 @@ var Tr = "SelectValue", Ir = h.forwardRef(
1449
1434
  ...c,
1450
1435
  ref: y,
1451
1436
  style: { pointerEvents: "none" },
1452
- children: Zr(d.value) ? /* @__PURE__ */ b.jsx(b.Fragment, { children: l }) : i
1437
+ children: Xr(d.value) ? /* @__PURE__ */ b.jsx(b.Fragment, { children: l }) : i
1453
1438
  }
1454
1439
  );
1455
1440
  }
1456
1441
  );
1457
- Ir.displayName = Tr;
1458
- var ao = "SelectIcon", Rr = h.forwardRef(
1442
+ Tr.displayName = Fr;
1443
+ var io = "SelectIcon", Rr = h.forwardRef(
1459
1444
  (e, r) => {
1460
1445
  const { __scopeSelect: t, children: s, ...n } = e;
1461
1446
  return /* @__PURE__ */ b.jsx(he.span, { "aria-hidden": !0, ...n, ref: r, children: s || "▼" });
1462
1447
  }
1463
1448
  );
1464
- Rr.displayName = ao;
1465
- var lo = "SelectPortal", Nr = (e) => /* @__PURE__ */ b.jsx(Es, { asChild: !0, ...e });
1466
- Nr.displayName = lo;
1467
- var Oe = "SelectContent", Dr = h.forwardRef(
1449
+ Rr.displayName = io;
1450
+ var ao = "SelectPortal", Ir = (e) => /* @__PURE__ */ b.jsx(Vs, { asChild: !0, ...e });
1451
+ Ir.displayName = ao;
1452
+ var Oe = "SelectContent", Nr = h.forwardRef(
1468
1453
  (e, r) => {
1469
1454
  const t = De(Oe, e.__scopeSelect), [s, n] = h.useState();
1470
1455
  if (Ne(() => {
@@ -1472,15 +1457,15 @@ var Oe = "SelectContent", Dr = h.forwardRef(
1472
1457
  }, []), !t.open) {
1473
1458
  const i = s;
1474
1459
  return i ? ar.createPortal(
1475
- /* @__PURE__ */ b.jsx(Pr, { scope: e.__scopeSelect, children: /* @__PURE__ */ b.jsx(mt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ b.jsx("div", { children: e.children }) }) }),
1460
+ /* @__PURE__ */ b.jsx(Dr, { scope: e.__scopeSelect, children: /* @__PURE__ */ b.jsx(mt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ b.jsx("div", { children: e.children }) }) }),
1476
1461
  i
1477
1462
  ) : null;
1478
1463
  }
1479
- return /* @__PURE__ */ b.jsx(kr, { ...e, ref: r });
1464
+ return /* @__PURE__ */ b.jsx(Pr, { ...e, ref: r });
1480
1465
  }
1481
1466
  );
1482
- Dr.displayName = Oe;
1483
- var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1467
+ Nr.displayName = Oe;
1468
+ var Ae = 10, [Dr, Pe] = Ge(Oe), lo = "SelectContentImpl", Pr = h.forwardRef(
1484
1469
  (e, r) => {
1485
1470
  const {
1486
1471
  __scopeSelect: t,
@@ -1502,16 +1487,16 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1502
1487
  avoidCollisions: M,
1503
1488
  //
1504
1489
  ...T
1505
- } = e, g = De(Oe, t), [D, Z] = h.useState(null), [v, C] = h.useState(null), V = xe(r, (I) => Z(I)), [k, Q] = h.useState(null), [z, de] = h.useState(
1490
+ } = e, g = De(Oe, t), [D, Z] = h.useState(null), [v, A] = h.useState(null), V = xe(r, (R) => Z(R)), [k, Q] = h.useState(null), [z, de] = h.useState(
1506
1491
  null
1507
1492
  ), F = yt(t), [N, B] = h.useState(!1), j = h.useRef(!1);
1508
1493
  h.useEffect(() => {
1509
- if (D) return gs(D);
1510
- }, [D]), vs();
1494
+ if (D) return ys(D);
1495
+ }, [D]), gs();
1511
1496
  const Y = h.useCallback(
1512
- (I) => {
1497
+ (R) => {
1513
1498
  const [K, ...se] = F().map((W) => W.ref.current), [q] = se.slice(-1), U = document.activeElement;
1514
- for (const W of I)
1499
+ for (const W of R)
1515
1500
  if (W === U || (W == null || W.scrollIntoView({ block: "nearest" }), W === K && v && (v.scrollTop = 0), W === q && v && (v.scrollTop = v.scrollHeight), W == null || W.focus(), document.activeElement !== U)) return;
1516
1501
  },
1517
1502
  [F, v]
@@ -1525,42 +1510,42 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1525
1510
  const { onOpenChange: fe, triggerPointerDownPosRef: ie } = g;
1526
1511
  h.useEffect(() => {
1527
1512
  if (D) {
1528
- let I = { x: 0, y: 0 };
1513
+ let R = { x: 0, y: 0 };
1529
1514
  const K = (q) => {
1530
1515
  var U, W;
1531
- I = {
1516
+ R = {
1532
1517
  x: Math.abs(Math.round(q.pageX) - (((U = ie.current) == null ? void 0 : U.x) ?? 0)),
1533
1518
  y: Math.abs(Math.round(q.pageY) - (((W = ie.current) == null ? void 0 : W.y) ?? 0))
1534
1519
  };
1535
1520
  }, se = (q) => {
1536
- I.x <= 10 && I.y <= 10 ? q.preventDefault() : D.contains(q.target) || fe(!1), document.removeEventListener("pointermove", K), ie.current = null;
1521
+ R.x <= 10 && R.y <= 10 ? q.preventDefault() : D.contains(q.target) || fe(!1), document.removeEventListener("pointermove", K), ie.current = null;
1537
1522
  };
1538
1523
  return ie.current !== null && (document.addEventListener("pointermove", K), document.addEventListener("pointerup", se, { capture: !0, once: !0 })), () => {
1539
1524
  document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", se, { capture: !0 });
1540
1525
  };
1541
1526
  }
1542
1527
  }, [D, fe, ie]), h.useEffect(() => {
1543
- const I = () => fe(!1);
1544
- return window.addEventListener("blur", I), window.addEventListener("resize", I), () => {
1545
- window.removeEventListener("blur", I), window.removeEventListener("resize", I);
1528
+ const R = () => fe(!1);
1529
+ return window.addEventListener("blur", R), window.addEventListener("resize", R), () => {
1530
+ window.removeEventListener("blur", R), window.removeEventListener("resize", R);
1546
1531
  };
1547
1532
  }, [fe]);
1548
- const [Se, ke] = Jr((I) => {
1549
- const K = F().filter((U) => !U.disabled), se = K.find((U) => U.ref.current === document.activeElement), q = es(K, I, se);
1533
+ const [Se, ke] = Qr((R) => {
1534
+ const K = F().filter((U) => !U.disabled), se = K.find((U) => U.ref.current === document.activeElement), q = Jr(K, R, se);
1550
1535
  q && setTimeout(() => q.ref.current.focus());
1551
1536
  }), je = h.useCallback(
1552
- (I, K, se) => {
1537
+ (R, K, se) => {
1553
1538
  const q = !j.current && !se;
1554
- (g.value !== void 0 && g.value === K || q) && (Q(I), q && (j.current = !0));
1539
+ (g.value !== void 0 && g.value === K || q) && (Q(R), q && (j.current = !0));
1555
1540
  },
1556
1541
  [g.value]
1557
1542
  ), ze = h.useCallback(() => D == null ? void 0 : D.focus(), [D]), _e = h.useCallback(
1558
- (I, K, se) => {
1543
+ (R, K, se) => {
1559
1544
  const q = !j.current && !se;
1560
- (g.value !== void 0 && g.value === K || q) && de(I);
1545
+ (g.value !== void 0 && g.value === K || q) && de(R);
1561
1546
  },
1562
1547
  [g.value]
1563
- ), Le = s === "popper" ? kt : Mr, be = Le === kt ? {
1548
+ ), Le = s === "popper" ? kt : kr, be = Le === kt ? {
1564
1549
  side: c,
1565
1550
  sideOffset: d,
1566
1551
  align: S,
@@ -1573,12 +1558,12 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1573
1558
  avoidCollisions: M
1574
1559
  } : {};
1575
1560
  return /* @__PURE__ */ b.jsx(
1576
- Pr,
1561
+ Dr,
1577
1562
  {
1578
1563
  scope: t,
1579
1564
  content: D,
1580
1565
  viewport: v,
1581
- onViewportChange: C,
1566
+ onViewportChange: A,
1582
1567
  itemRefCallback: je,
1583
1568
  selectedItem: k,
1584
1569
  onItemLeave: ze,
@@ -1588,26 +1573,26 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1588
1573
  position: s,
1589
1574
  isPositioned: N,
1590
1575
  searchRef: Se,
1591
- children: /* @__PURE__ */ b.jsx(xs, { as: Ss, allowPinchZoom: !0, children: /* @__PURE__ */ b.jsx(
1592
- _s,
1576
+ children: /* @__PURE__ */ b.jsx(vs, { as: xs, allowPinchZoom: !0, children: /* @__PURE__ */ b.jsx(
1577
+ Ss,
1593
1578
  {
1594
1579
  asChild: !0,
1595
1580
  trapped: g.open,
1596
- onMountAutoFocus: (I) => {
1597
- I.preventDefault();
1581
+ onMountAutoFocus: (R) => {
1582
+ R.preventDefault();
1598
1583
  },
1599
- onUnmountAutoFocus: ne(n, (I) => {
1584
+ onUnmountAutoFocus: ne(n, (R) => {
1600
1585
  var K;
1601
- (K = g.trigger) == null || K.focus({ preventScroll: !0 }), I.preventDefault();
1586
+ (K = g.trigger) == null || K.focus({ preventScroll: !0 }), R.preventDefault();
1602
1587
  }),
1603
1588
  children: /* @__PURE__ */ b.jsx(
1604
- bs,
1589
+ _s,
1605
1590
  {
1606
1591
  asChild: !0,
1607
1592
  disableOutsidePointerEvents: !0,
1608
1593
  onEscapeKeyDown: i,
1609
1594
  onPointerDownOutside: l,
1610
- onFocusOutside: (I) => I.preventDefault(),
1595
+ onFocusOutside: (R) => R.preventDefault(),
1611
1596
  onDismiss: () => g.onOpenChange(!1),
1612
1597
  children: /* @__PURE__ */ b.jsx(
1613
1598
  Le,
@@ -1616,7 +1601,7 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1616
1601
  id: g.contentId,
1617
1602
  "data-state": g.open ? "open" : "closed",
1618
1603
  dir: g.dir,
1619
- onContextMenu: (I) => I.preventDefault(),
1604
+ onContextMenu: (R) => R.preventDefault(),
1620
1605
  ...T,
1621
1606
  ...be,
1622
1607
  onPlaced: () => B(!0),
@@ -1629,15 +1614,15 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1629
1614
  outline: "none",
1630
1615
  ...T.style
1631
1616
  },
1632
- onKeyDown: ne(T.onKeyDown, (I) => {
1633
- const K = I.ctrlKey || I.altKey || I.metaKey;
1634
- if (I.key === "Tab" && I.preventDefault(), !K && I.key.length === 1 && ke(I.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(I.key)) {
1617
+ onKeyDown: ne(T.onKeyDown, (R) => {
1618
+ const K = R.ctrlKey || R.altKey || R.metaKey;
1619
+ if (R.key === "Tab" && R.preventDefault(), !K && R.key.length === 1 && ke(R.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(R.key)) {
1635
1620
  let q = F().filter((U) => !U.disabled).map((U) => U.ref.current);
1636
- if (["ArrowUp", "End"].includes(I.key) && (q = q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(I.key)) {
1637
- const U = I.target, W = q.indexOf(U);
1621
+ if (["ArrowUp", "End"].includes(R.key) && (q = q.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(R.key)) {
1622
+ const U = R.target, W = q.indexOf(U);
1638
1623
  q = q.slice(W + 1);
1639
1624
  }
1640
- setTimeout(() => Y(q)), I.preventDefault();
1625
+ setTimeout(() => Y(q)), R.preventDefault();
1641
1626
  }
1642
1627
  })
1643
1628
  }
@@ -1650,19 +1635,19 @@ var Ce = 10, [Pr, Pe] = Ge(Oe), co = "SelectContentImpl", kr = h.forwardRef(
1650
1635
  );
1651
1636
  }
1652
1637
  );
1653
- kr.displayName = co;
1654
- var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
1638
+ Pr.displayName = lo;
1639
+ var co = "SelectItemAlignedPosition", kr = h.forwardRef((e, r) => {
1655
1640
  const { __scopeSelect: t, onPlaced: s, ...n } = e, i = De(Oe, t), l = Pe(Oe, t), [c, d] = h.useState(null), [S, m] = h.useState(null), y = xe(r, (V) => m(V)), E = yt(t), O = h.useRef(!1), w = h.useRef(!0), { viewport: P, selectedItem: M, selectedItemText: T, focusSelectedItem: g } = l, D = h.useCallback(() => {
1656
1641
  if (i.trigger && i.valueNode && c && S && P && M && T) {
1657
1642
  const V = i.trigger.getBoundingClientRect(), k = S.getBoundingClientRect(), Q = i.valueNode.getBoundingClientRect(), z = T.getBoundingClientRect();
1658
1643
  if (i.dir !== "rtl") {
1659
- const U = z.left - k.left, W = Q.left - U, me = V.left - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth - Ce, st = sr(W, [Ce, rt - tt]);
1644
+ const U = z.left - k.left, W = Q.left - U, me = V.left - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth - Ae, st = sr(W, [Ae, rt - tt]);
1660
1645
  c.style.minWidth = ye + "px", c.style.left = st + "px";
1661
1646
  } else {
1662
- const U = k.right - z.right, W = window.innerWidth - Q.right - U, me = window.innerWidth - V.right - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth - Ce, st = sr(W, [Ce, rt - tt]);
1647
+ const U = k.right - z.right, W = window.innerWidth - Q.right - U, me = window.innerWidth - V.right - W, ye = V.width + me, tt = Math.max(ye, k.width), rt = window.innerWidth - Ae, st = sr(W, [Ae, rt - tt]);
1663
1648
  c.style.minWidth = ye + "px", c.style.right = st + "px";
1664
1649
  }
1665
- const de = E(), F = window.innerHeight - Ce * 2, N = P.scrollHeight, B = window.getComputedStyle(S), j = parseInt(B.borderTopWidth, 10), Y = parseInt(B.paddingTop, 10), X = parseInt(B.borderBottomWidth, 10), fe = parseInt(B.paddingBottom, 10), ie = j + Y + N + fe + X, Se = Math.min(M.offsetHeight * 5, ie), ke = window.getComputedStyle(P), je = parseInt(ke.paddingTop, 10), ze = parseInt(ke.paddingBottom, 10), _e = V.top + V.height / 2 - Ce, Le = F - _e, be = M.offsetHeight / 2, I = M.offsetTop + be, K = j + Y + I, se = ie - K;
1650
+ const de = E(), F = window.innerHeight - Ae * 2, N = P.scrollHeight, B = window.getComputedStyle(S), j = parseInt(B.borderTopWidth, 10), Y = parseInt(B.paddingTop, 10), X = parseInt(B.borderBottomWidth, 10), fe = parseInt(B.paddingBottom, 10), ie = j + Y + N + fe + X, Se = Math.min(M.offsetHeight * 5, ie), ke = window.getComputedStyle(P), je = parseInt(ke.paddingTop, 10), ze = parseInt(ke.paddingBottom, 10), _e = V.top + V.height / 2 - Ae, Le = F - _e, be = M.offsetHeight / 2, R = M.offsetTop + be, K = j + Y + R, se = ie - K;
1666
1651
  if (K <= _e) {
1667
1652
  const U = M === de[de.length - 1].ref.current;
1668
1653
  c.style.bottom = "0px";
@@ -1682,7 +1667,7 @@ var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
1682
1667
  ) + se;
1683
1668
  c.style.height = me + "px", P.scrollTop = K - _e + P.offsetTop;
1684
1669
  }
1685
- c.style.margin = `${Ce}px 0`, c.style.minHeight = Se + "px", c.style.maxHeight = F + "px", s == null || s(), requestAnimationFrame(() => O.current = !0);
1670
+ c.style.margin = `${Ae}px 0`, c.style.minHeight = Se + "px", c.style.maxHeight = F + "px", s == null || s(), requestAnimationFrame(() => O.current = !0);
1686
1671
  }
1687
1672
  }, [
1688
1673
  E,
@@ -1701,19 +1686,19 @@ var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
1701
1686
  Ne(() => {
1702
1687
  S && v(window.getComputedStyle(S).zIndex);
1703
1688
  }, [S]);
1704
- const C = h.useCallback(
1689
+ const A = h.useCallback(
1705
1690
  (V) => {
1706
1691
  V && w.current === !0 && (D(), g == null || g(), w.current = !1);
1707
1692
  },
1708
1693
  [D, g]
1709
1694
  );
1710
1695
  return /* @__PURE__ */ b.jsx(
1711
- po,
1696
+ fo,
1712
1697
  {
1713
1698
  scope: t,
1714
1699
  contentWrapper: c,
1715
1700
  shouldExpandOnScrollRef: O,
1716
- onScrollButtonChange: C,
1701
+ onScrollButtonChange: A,
1717
1702
  children: /* @__PURE__ */ b.jsx(
1718
1703
  "div",
1719
1704
  {
@@ -1744,16 +1729,16 @@ var uo = "SelectItemAlignedPosition", Mr = h.forwardRef((e, r) => {
1744
1729
  }
1745
1730
  );
1746
1731
  });
1747
- Mr.displayName = uo;
1748
- var fo = "SelectPopperPosition", kt = h.forwardRef((e, r) => {
1732
+ kr.displayName = co;
1733
+ var uo = "SelectPopperPosition", kt = h.forwardRef((e, r) => {
1749
1734
  const {
1750
1735
  __scopeSelect: t,
1751
1736
  align: s = "start",
1752
- collisionPadding: n = Ce,
1737
+ collisionPadding: n = Ae,
1753
1738
  ...i
1754
1739
  } = e, l = gt(t);
1755
1740
  return /* @__PURE__ */ b.jsx(
1756
- ws,
1741
+ bs,
1757
1742
  {
1758
1743
  ...l,
1759
1744
  ...i,
@@ -1773,8 +1758,8 @@ var fo = "SelectPopperPosition", kt = h.forwardRef((e, r) => {
1773
1758
  }
1774
1759
  );
1775
1760
  });
1776
- kt.displayName = fo;
1777
- var [po, $t] = Ge(Oe, {}), Mt = "SelectViewport", Or = h.forwardRef(
1761
+ kt.displayName = uo;
1762
+ var [fo, $t] = Ge(Oe, {}), Mt = "SelectViewport", Mr = h.forwardRef(
1778
1763
  (e, r) => {
1779
1764
  const { __scopeSelect: t, nonce: s, ...n } = e, i = Pe(Mt, t), l = $t(Mt, t), c = xe(r, i.onViewportChange), d = h.useRef(0);
1780
1765
  return /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
@@ -1808,7 +1793,7 @@ var [po, $t] = Ge(Oe, {}), Mt = "SelectViewport", Or = h.forwardRef(
1808
1793
  if (E != null && E.current && y) {
1809
1794
  const O = Math.abs(d.current - m.scrollTop);
1810
1795
  if (O > 0) {
1811
- const w = window.innerHeight - Ce * 2, P = parseFloat(y.style.minHeight), M = parseFloat(y.style.height), T = Math.max(P, M);
1796
+ const w = window.innerHeight - Ae * 2, P = parseFloat(y.style.minHeight), M = parseFloat(y.style.height), T = Math.max(P, M);
1812
1797
  if (T < w) {
1813
1798
  const g = T + O, D = Math.min(w, g), Z = g - D;
1814
1799
  y.style.height = D + "px", y.style.bottom === "0px" && (m.scrollTop = Z > 0 ? Z : 0, y.style.justifyContent = "flex-end");
@@ -1822,22 +1807,22 @@ var [po, $t] = Ge(Oe, {}), Mt = "SelectViewport", Or = h.forwardRef(
1822
1807
  ] });
1823
1808
  }
1824
1809
  );
1825
- Or.displayName = Mt;
1826
- var jr = "SelectGroup", [ho, mo] = Ge(jr), Lr = h.forwardRef(
1810
+ Mr.displayName = Mt;
1811
+ var Or = "SelectGroup", [po, ho] = Ge(Or), jr = h.forwardRef(
1827
1812
  (e, r) => {
1828
1813
  const { __scopeSelect: t, ...s } = e, n = Bt();
1829
- return /* @__PURE__ */ b.jsx(ho, { scope: t, id: n, children: /* @__PURE__ */ b.jsx(he.div, { role: "group", "aria-labelledby": n, ...s, ref: r }) });
1814
+ return /* @__PURE__ */ b.jsx(po, { scope: t, id: n, children: /* @__PURE__ */ b.jsx(he.div, { role: "group", "aria-labelledby": n, ...s, ref: r }) });
1830
1815
  }
1831
1816
  );
1832
- Lr.displayName = jr;
1833
- var Br = "SelectLabel", Ur = h.forwardRef(
1817
+ jr.displayName = Or;
1818
+ var Lr = "SelectLabel", Br = h.forwardRef(
1834
1819
  (e, r) => {
1835
- const { __scopeSelect: t, ...s } = e, n = mo(Br, t);
1820
+ const { __scopeSelect: t, ...s } = e, n = ho(Lr, t);
1836
1821
  return /* @__PURE__ */ b.jsx(he.div, { id: n.id, ...s, ref: r });
1837
1822
  }
1838
1823
  );
1839
- Ur.displayName = Br;
1840
- var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
1824
+ Br.displayName = Lr;
1825
+ var ft = "SelectItem", [mo, Ur] = Ge(ft), Hr = h.forwardRef(
1841
1826
  (e, r) => {
1842
1827
  const {
1843
1828
  __scopeSelect: t,
@@ -1859,7 +1844,7 @@ var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
1859
1844
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
1860
1845
  );
1861
1846
  return /* @__PURE__ */ b.jsx(
1862
- yo,
1847
+ mo,
1863
1848
  {
1864
1849
  scope: t,
1865
1850
  value: s,
@@ -1902,7 +1887,7 @@ var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
1902
1887
  }),
1903
1888
  onKeyDown: ne(l.onKeyDown, (T) => {
1904
1889
  var D;
1905
- ((D = d.searchRef) == null ? void 0 : D.current) !== "" && T.key === " " || (ro.includes(T.key) && M(), T.key === " " && T.preventDefault());
1890
+ ((D = d.searchRef) == null ? void 0 : D.current) !== "" && T.key === " " || (to.includes(T.key) && M(), T.key === " " && T.preventDefault());
1906
1891
  })
1907
1892
  }
1908
1893
  )
@@ -1912,10 +1897,10 @@ var ft = "SelectItem", [yo, Hr] = Ge(ft), Wr = h.forwardRef(
1912
1897
  );
1913
1898
  }
1914
1899
  );
1915
- Wr.displayName = ft;
1916
- var Xe = "SelectItemText", Kr = h.forwardRef(
1900
+ Hr.displayName = ft;
1901
+ var Xe = "SelectItemText", Wr = h.forwardRef(
1917
1902
  (e, r) => {
1918
- const { __scopeSelect: t, className: s, style: n, ...i } = e, l = De(Xe, t), c = Pe(Xe, t), d = Hr(Xe, t), S = io(Xe, t), [m, y] = h.useState(null), E = xe(
1903
+ const { __scopeSelect: t, className: s, style: n, ...i } = e, l = De(Xe, t), c = Pe(Xe, t), d = Ur(Xe, t), S = no(Xe, t), [m, y] = h.useState(null), E = xe(
1919
1904
  r,
1920
1905
  (T) => y(T),
1921
1906
  d.onItemTextChange,
@@ -1933,15 +1918,15 @@ var Xe = "SelectItemText", Kr = h.forwardRef(
1933
1918
  ] });
1934
1919
  }
1935
1920
  );
1936
- Kr.displayName = Xe;
1937
- var $r = "SelectItemIndicator", qr = h.forwardRef(
1921
+ Wr.displayName = Xe;
1922
+ var Kr = "SelectItemIndicator", $r = h.forwardRef(
1938
1923
  (e, r) => {
1939
1924
  const { __scopeSelect: t, ...s } = e;
1940
- return Hr($r, t).isSelected ? /* @__PURE__ */ b.jsx(he.span, { "aria-hidden": !0, ...s, ref: r }) : null;
1925
+ return Ur(Kr, t).isSelected ? /* @__PURE__ */ b.jsx(he.span, { "aria-hidden": !0, ...s, ref: r }) : null;
1941
1926
  }
1942
1927
  );
1943
- qr.displayName = $r;
1944
- var Ot = "SelectScrollUpButton", Gr = h.forwardRef((e, r) => {
1928
+ $r.displayName = Kr;
1929
+ var Ot = "SelectScrollUpButton", qr = h.forwardRef((e, r) => {
1945
1930
  const t = Pe(Ot, e.__scopeSelect), s = $t(Ot, e.__scopeSelect), [n, i] = h.useState(!1), l = xe(r, s.onScrollButtonChange);
1946
1931
  return Ne(() => {
1947
1932
  if (t.viewport && t.isPositioned) {
@@ -1953,7 +1938,7 @@ var Ot = "SelectScrollUpButton", Gr = h.forwardRef((e, r) => {
1953
1938
  return c(), d.addEventListener("scroll", c), () => d.removeEventListener("scroll", c);
1954
1939
  }
1955
1940
  }, [t.viewport, t.isPositioned]), n ? /* @__PURE__ */ b.jsx(
1956
- Yr,
1941
+ zr,
1957
1942
  {
1958
1943
  ...e,
1959
1944
  ref: l,
@@ -1964,8 +1949,8 @@ var Ot = "SelectScrollUpButton", Gr = h.forwardRef((e, r) => {
1964
1949
  }
1965
1950
  ) : null;
1966
1951
  });
1967
- Gr.displayName = Ot;
1968
- var jt = "SelectScrollDownButton", zr = h.forwardRef((e, r) => {
1952
+ qr.displayName = Ot;
1953
+ var jt = "SelectScrollDownButton", Gr = h.forwardRef((e, r) => {
1969
1954
  const t = Pe(jt, e.__scopeSelect), s = $t(jt, e.__scopeSelect), [n, i] = h.useState(!1), l = xe(r, s.onScrollButtonChange);
1970
1955
  return Ne(() => {
1971
1956
  if (t.viewport && t.isPositioned) {
@@ -1977,7 +1962,7 @@ var jt = "SelectScrollDownButton", zr = h.forwardRef((e, r) => {
1977
1962
  return c(), d.addEventListener("scroll", c), () => d.removeEventListener("scroll", c);
1978
1963
  }
1979
1964
  }, [t.viewport, t.isPositioned]), n ? /* @__PURE__ */ b.jsx(
1980
- Yr,
1965
+ zr,
1981
1966
  {
1982
1967
  ...e,
1983
1968
  ref: l,
@@ -1988,8 +1973,8 @@ var jt = "SelectScrollDownButton", zr = h.forwardRef((e, r) => {
1988
1973
  }
1989
1974
  ) : null;
1990
1975
  });
1991
- zr.displayName = jt;
1992
- var Yr = h.forwardRef((e, r) => {
1976
+ Gr.displayName = jt;
1977
+ var zr = h.forwardRef((e, r) => {
1993
1978
  const { __scopeSelect: t, onAutoScroll: s, ...n } = e, i = Pe("SelectScrollButton", t), l = h.useRef(null), c = yt(t), d = h.useCallback(() => {
1994
1979
  l.current !== null && (window.clearInterval(l.current), l.current = null);
1995
1980
  }, []);
@@ -2016,26 +2001,26 @@ var Yr = h.forwardRef((e, r) => {
2016
2001
  })
2017
2002
  }
2018
2003
  );
2019
- }), go = "SelectSeparator", Xr = h.forwardRef(
2004
+ }), yo = "SelectSeparator", Yr = h.forwardRef(
2020
2005
  (e, r) => {
2021
2006
  const { __scopeSelect: t, ...s } = e;
2022
2007
  return /* @__PURE__ */ b.jsx(he.div, { "aria-hidden": !0, ...s, ref: r });
2023
2008
  }
2024
2009
  );
2025
- Xr.displayName = go;
2026
- var Lt = "SelectArrow", vo = h.forwardRef(
2010
+ Yr.displayName = yo;
2011
+ var Lt = "SelectArrow", go = h.forwardRef(
2027
2012
  (e, r) => {
2028
2013
  const { __scopeSelect: t, ...s } = e, n = gt(t), i = De(Lt, t), l = Pe(Lt, t);
2029
- return i.open && l.position === "popper" ? /* @__PURE__ */ b.jsx(Cs, { ...n, ...s, ref: r }) : null;
2014
+ return i.open && l.position === "popper" ? /* @__PURE__ */ b.jsx(ws, { ...n, ...s, ref: r }) : null;
2030
2015
  }
2031
2016
  );
2032
- vo.displayName = Lt;
2033
- function Zr(e) {
2017
+ go.displayName = Lt;
2018
+ function Xr(e) {
2034
2019
  return e === "" || e === void 0;
2035
2020
  }
2036
- var Qr = h.forwardRef(
2021
+ var Zr = h.forwardRef(
2037
2022
  (e, r) => {
2038
- const { value: t, ...s } = e, n = h.useRef(null), i = xe(r, n), l = eo(t);
2023
+ const { value: t, ...s } = e, n = h.useRef(null), i = xe(r, n), l = Js(t);
2039
2024
  return h.useEffect(() => {
2040
2025
  const c = n.current, d = window.HTMLSelectElement.prototype, m = Object.getOwnPropertyDescriptor(
2041
2026
  d,
@@ -2048,9 +2033,9 @@ var Qr = h.forwardRef(
2048
2033
  }, [l, t]), /* @__PURE__ */ b.jsx(As, { asChild: !0, children: /* @__PURE__ */ b.jsx("select", { ...s, ref: i, defaultValue: t }) });
2049
2034
  }
2050
2035
  );
2051
- Qr.displayName = "BubbleSelect";
2052
- function Jr(e) {
2053
- const r = Vs(e), t = h.useRef(""), s = h.useRef(0), n = h.useCallback(
2036
+ Zr.displayName = "BubbleSelect";
2037
+ function Qr(e) {
2038
+ const r = Cs(e), t = h.useRef(""), s = h.useRef(0), n = h.useCallback(
2054
2039
  (l) => {
2055
2040
  const c = t.current + l;
2056
2041
  r(c), function d(S) {
@@ -2063,21 +2048,21 @@ function Jr(e) {
2063
2048
  }, []);
2064
2049
  return h.useEffect(() => () => window.clearTimeout(s.current), []), [t, n, i];
2065
2050
  }
2066
- function es(e, r, t) {
2051
+ function Jr(e, r, t) {
2067
2052
  const n = r.length > 1 && Array.from(r).every((S) => S === r[0]) ? r[0] : r, i = t ? e.indexOf(t) : -1;
2068
- let l = xo(e, Math.max(i, 0));
2053
+ let l = vo(e, Math.max(i, 0));
2069
2054
  n.length === 1 && (l = l.filter((S) => S !== t));
2070
2055
  const d = l.find(
2071
2056
  (S) => S.textValue.toLowerCase().startsWith(n.toLowerCase())
2072
2057
  );
2073
2058
  return d !== t ? d : void 0;
2074
2059
  }
2075
- function xo(e, r) {
2060
+ function vo(e, r) {
2076
2061
  return e.map((t, s) => e[(r + s) % e.length]);
2077
2062
  }
2078
- var So = Vr, ts = Fr, _o = Ir, bo = Rr, wo = Nr, rs = Dr, Co = Or, Ao = Lr, ss = Ur, os = Wr, Vo = Kr, Eo = qr, ns = Gr, is = zr, as = Xr;
2079
- const qo = So, Go = Ao, zo = _o, Fo = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__ */ b.jsxs(
2080
- ts,
2063
+ var xo = Cr, es = Er, So = Tr, _o = Rr, bo = Ir, ts = Nr, wo = Mr, Ao = jr, rs = Br, ss = Hr, Co = Wr, Vo = $r, os = qr, ns = Gr, is = Yr;
2064
+ const qo = xo, Go = Ao, zo = So, Eo = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__ */ b.jsxs(
2065
+ es,
2081
2066
  {
2082
2067
  ref: s,
2083
2068
  className: Ee(
@@ -2087,13 +2072,13 @@ const qo = So, Go = Ao, zo = _o, Fo = h.forwardRef(({ className: e, children: r,
2087
2072
  ...t,
2088
2073
  children: [
2089
2074
  /* @__PURE__ */ b.jsx("span", { className: "truncate", children: r }),
2090
- /* @__PURE__ */ b.jsx(bo, { asChild: !0, children: /* @__PURE__ */ b.jsx(cr, { className: "flex-shrink-0 h-4 w-4 opacity-50" }) })
2075
+ /* @__PURE__ */ b.jsx(_o, { asChild: !0, children: /* @__PURE__ */ b.jsx(lr, { className: "flex-shrink-0 h-4 w-4 opacity-50" }) })
2091
2076
  ]
2092
2077
  }
2093
2078
  ));
2094
- Fo.displayName = ts.displayName;
2095
- const ls = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2096
- ns,
2079
+ Eo.displayName = es.displayName;
2080
+ const as = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2081
+ os,
2097
2082
  {
2098
2083
  ref: t,
2099
2084
  className: Ee(
@@ -2101,12 +2086,12 @@ const ls = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2101
2086
  e
2102
2087
  ),
2103
2088
  ...r,
2104
- children: /* @__PURE__ */ b.jsx(Ms, { className: "h-4 w-4" })
2089
+ children: /* @__PURE__ */ b.jsx(Ps, { className: "h-4 w-4" })
2105
2090
  }
2106
2091
  ));
2107
- ls.displayName = ns.displayName;
2108
- const cs = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2109
- is,
2092
+ as.displayName = os.displayName;
2093
+ const ls = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2094
+ ns,
2110
2095
  {
2111
2096
  ref: t,
2112
2097
  className: Ee(
@@ -2114,12 +2099,12 @@ const cs = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2114
2099
  e
2115
2100
  ),
2116
2101
  ...r,
2117
- children: /* @__PURE__ */ b.jsx(cr, { className: "h-4 w-4" })
2102
+ children: /* @__PURE__ */ b.jsx(lr, { className: "h-4 w-4" })
2118
2103
  }
2119
2104
  ));
2120
- cs.displayName = is.displayName;
2121
- const To = h.forwardRef(({ className: e, children: r, position: t = "popper", ...s }, n) => /* @__PURE__ */ b.jsx(wo, { children: /* @__PURE__ */ b.jsxs(
2122
- rs,
2105
+ ls.displayName = ns.displayName;
2106
+ const Fo = h.forwardRef(({ className: e, children: r, position: t = "popper", ...s }, n) => /* @__PURE__ */ b.jsx(bo, { children: /* @__PURE__ */ b.jsxs(
2107
+ ts,
2123
2108
  {
2124
2109
  ref: n,
2125
2110
  className: Ee(
@@ -2130,9 +2115,9 @@ const To = h.forwardRef(({ className: e, children: r, position: t = "popper", ..
2130
2115
  position: t,
2131
2116
  ...s,
2132
2117
  children: [
2133
- /* @__PURE__ */ b.jsx(ls, {}),
2118
+ /* @__PURE__ */ b.jsx(as, {}),
2134
2119
  /* @__PURE__ */ b.jsx(
2135
- Co,
2120
+ wo,
2136
2121
  {
2137
2122
  className: Ee(
2138
2123
  "p-1",
@@ -2141,22 +2126,22 @@ const To = h.forwardRef(({ className: e, children: r, position: t = "popper", ..
2141
2126
  children: r
2142
2127
  }
2143
2128
  ),
2144
- /* @__PURE__ */ b.jsx(cs, {})
2129
+ /* @__PURE__ */ b.jsx(ls, {})
2145
2130
  ]
2146
2131
  }
2147
2132
  ) }));
2148
- To.displayName = rs.displayName;
2149
- const Io = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2150
- ss,
2133
+ Fo.displayName = ts.displayName;
2134
+ const To = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2135
+ rs,
2151
2136
  {
2152
2137
  ref: t,
2153
2138
  className: Ee("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
2154
2139
  ...r
2155
2140
  }
2156
2141
  ));
2157
- Io.displayName = ss.displayName;
2142
+ To.displayName = rs.displayName;
2158
2143
  const Ro = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__ */ b.jsxs(
2159
- os,
2144
+ ss,
2160
2145
  {
2161
2146
  ref: s,
2162
2147
  className: Ee(
@@ -2165,22 +2150,22 @@ const Ro = h.forwardRef(({ className: e, children: r, ...t }, s) => /* @__PURE__
2165
2150
  ),
2166
2151
  ...t,
2167
2152
  children: [
2168
- /* @__PURE__ */ b.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ b.jsx(Eo, { children: /* @__PURE__ */ b.jsx(ks, { className: "h-4 w-4" }) }) }),
2169
- /* @__PURE__ */ b.jsx(Vo, { children: r })
2153
+ /* @__PURE__ */ b.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ b.jsx(Vo, { children: /* @__PURE__ */ b.jsx(ks, { className: "h-4 w-4" }) }) }),
2154
+ /* @__PURE__ */ b.jsx(Co, { children: r })
2170
2155
  ]
2171
2156
  }
2172
2157
  ));
2173
- Ro.displayName = os.displayName;
2174
- const No = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2175
- as,
2158
+ Ro.displayName = ss.displayName;
2159
+ const Io = h.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ b.jsx(
2160
+ is,
2176
2161
  {
2177
2162
  ref: t,
2178
2163
  className: Ee("-mx-1 my-1 h-px bg-muted", e),
2179
2164
  ...r
2180
2165
  }
2181
2166
  ));
2182
- No.displayName = as.displayName;
2183
- const Do = h.forwardRef(
2167
+ Io.displayName = is.displayName;
2168
+ const No = h.forwardRef(
2184
2169
  ({ className: e, type: r, ...t }, s) => /* @__PURE__ */ b.jsx(
2185
2170
  "input",
2186
2171
  {
@@ -2194,21 +2179,20 @@ const Do = h.forwardRef(
2194
2179
  }
2195
2180
  )
2196
2181
  );
2197
- Do.displayName = "Input";
2182
+ No.displayName = "Input";
2198
2183
  export {
2199
2184
  Ho as C,
2200
2185
  Uo as F,
2201
- Do as I,
2186
+ No as I,
2202
2187
  qo as S,
2203
2188
  Bo as a,
2204
- Fo as b,
2189
+ Eo as b,
2205
2190
  zo as c,
2206
- To as d,
2191
+ Fo as d,
2207
2192
  Go as e,
2208
2193
  Ro as f,
2209
2194
  Wo as g,
2210
2195
  pt as h,
2211
- cr as i,
2212
2196
  Ko as u
2213
2197
  };
2214
- //# sourceMappingURL=Input-BmwltPfA.js.map
2198
+ //# sourceMappingURL=Input-BEDZAKw0.js.map