stone-kit 0.0.411 → 0.0.413

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.
@@ -1,61 +1,62 @@
1
- import { jsx as U, jsxs as Se } from "react/jsx-runtime";
2
- import { I as xt } from "../../../index-BaVdWc7x.js";
3
- import { M as Vt } from "../../../Modal-DbD1tgiF.js";
4
- import { Flex as Ft } from "../../Flex/ui/Flex.js";
1
+ import { jsx as M, jsxs as ve } from "react/jsx-runtime";
2
+ import { I as bt } from "../../../index-BaVdWc7x.js";
3
+ import { M as xt } from "../../../Modal-DbD1tgiF.js";
4
+ import { Flex as Vt } from "../../Flex/ui/Flex.js";
5
5
  import { Input as Ee } from "../../Input/ui/Input.js";
6
6
  import W from "react";
7
7
  import { Button as Ke } from "../../Button/ui/Button.js";
8
- import { NewIcon as At } from "../../NewIcon/ui/NewIcon.js";
9
- import { phoneReg as wt, nameReg as pt, emailReg as Dt } from "../utils/reg.js";
8
+ import { NewIcon as Ft } from "../../NewIcon/ui/NewIcon.js";
9
+ import { phoneReg as At, nameReg as pt, emailReg as wt } from "../utils/reg.js";
10
10
  import { CheckBox as Ge } from "../../CheckBox/CheckBox.js";
11
11
  import { TextArea as kt } from "../../TextArea/TextArea.js";
12
- import { useClientWidth as St } from "../../../shared/useClientWidth.js";
13
- const Et = "_btn_1uiov_1", Ct = "_modal_1uiov_9", Bt = "_modalBody_1uiov_16", Tt = "_root_1uiov_21", Rt = "_title_1uiov_31", Lt = "_description_1uiov_38", Mt = "_inputWrapper_1uiov_45", ee = {
14
- btn: Et,
15
- modal: Ct,
16
- modalBody: Bt,
17
- root: Tt,
18
- title: Rt,
19
- description: Lt,
20
- inputWrapper: Mt
12
+ import { useClientWidth as Dt } from "../../../shared/useClientWidth.js";
13
+ const St = "_btn_1omxm_1", Et = "_modal_1omxm_9", Ct = "_modalBody_1omxm_16", Bt = "_root_1omxm_21", Tt = "_title_1omxm_31", Rt = "_description_1omxm_38", Lt = "_inputWrapper_1omxm_45", Mt = "_linkPolicy_1omxm_52", X = {
14
+ btn: St,
15
+ modal: Et,
16
+ modalBody: Ct,
17
+ root: Bt,
18
+ title: Tt,
19
+ description: Rt,
20
+ inputWrapper: Lt,
21
+ linkPolicy: Mt
21
22
  };
22
- var ge = (e) => e.type === "checkbox", oe = (e) => e instanceof Date, T = (e) => e == null;
23
- const lt = (e) => typeof e == "object";
24
- var S = (e) => !T(e) && !Array.isArray(e) && lt(e) && !oe(e), Ot = (e) => S(e) && e.target ? ge(e.target) ? e.target.checked : e.target.value : e, Nt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Ut = (e, s) => e.has(Nt(s)), It = (e) => {
23
+ var ge = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, T = (e) => e == null;
24
+ const it = (e) => typeof e == "object";
25
+ var E = (e) => !T(e) && !Array.isArray(e) && it(e) && !ue(e), Ot = (e) => E(e) && e.target ? ge(e.target) ? e.target.checked : e.target.value : e, Nt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Ut = (e, s) => e.has(Nt(s)), It = (e) => {
25
26
  const s = e.constructor && e.constructor.prototype;
26
- return S(s) && s.hasOwnProperty("isPrototypeOf");
27
+ return E(s) && s.hasOwnProperty("isPrototypeOf");
27
28
  }, Re = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
28
- function P(e) {
29
+ function q(e) {
29
30
  let s;
30
31
  const r = Array.isArray(e);
31
32
  if (e instanceof Date)
32
33
  s = new Date(e);
33
34
  else if (e instanceof Set)
34
35
  s = new Set(e);
35
- else if (!(Re && (e instanceof Blob || e instanceof FileList)) && (r || S(e)))
36
+ else if (!(Re && (e instanceof Blob || e instanceof FileList)) && (r || E(e)))
36
37
  if (s = r ? [] : {}, !r && !It(e))
37
38
  s = e;
38
39
  else
39
40
  for (const n in e)
40
- e.hasOwnProperty(n) && (s[n] = P(e[n]));
41
+ e.hasOwnProperty(n) && (s[n] = q(e[n]));
41
42
  else
42
43
  return e;
43
44
  return s;
44
45
  }
45
- var Ae = (e) => Array.isArray(e) ? e.filter(Boolean) : [], p = (e) => e === void 0, d = (e, s, r) => {
46
- if (!s || !S(e))
46
+ var pe = (e) => Array.isArray(e) ? e.filter(Boolean) : [], w = (e) => e === void 0, d = (e, s, r) => {
47
+ if (!s || !E(e))
47
48
  return r;
48
- const n = Ae(s.split(/[,[\].]+?/)).reduce((u, a) => T(u) ? u : u[a], e);
49
- return p(n) || n === e ? p(e[s]) ? r : e[s] : n;
50
- }, te = (e) => typeof e == "boolean", Le = (e) => /^\w*$/.test(e), at = (e) => Ae(e.replace(/["|']|\]/g, "").split(/\.|\[/)), F = (e, s, r) => {
49
+ const n = pe(s.split(/[,[\].]+?/)).reduce((o, a) => T(o) ? o : o[a], e);
50
+ return w(n) || n === e ? w(e[s]) ? r : e[s] : n;
51
+ }, te = (e) => typeof e == "boolean", Le = (e) => /^\w*$/.test(e), lt = (e) => pe(e.replace(/["|']|\]/g, "").split(/\.|\[/)), V = (e, s, r) => {
51
52
  let n = -1;
52
- const u = Le(s) ? [s] : at(s), a = u.length, y = a - 1;
53
+ const o = Le(s) ? [s] : lt(s), a = o.length, y = a - 1;
53
54
  for (; ++n < a; ) {
54
- const g = u[n];
55
+ const g = o[n];
55
56
  let R = r;
56
57
  if (n !== y) {
57
58
  const I = e[g];
58
- R = S(I) || Array.isArray(I) ? I : isNaN(+u[n + 1]) ? {} : [];
59
+ R = E(I) || Array.isArray(I) ? I : isNaN(+o[n + 1]) ? {} : [];
59
60
  }
60
61
  if (g === "__proto__")
61
62
  return;
@@ -83,23 +84,23 @@ const Je = {
83
84
  validate: "validate"
84
85
  };
85
86
  W.createContext(null);
86
- var qt = (e, s, r, n = !0) => {
87
- const u = {
87
+ var Pt = (e, s, r, n = !0) => {
88
+ const o = {
88
89
  defaultValues: s._defaultValues
89
90
  };
90
91
  for (const a in e)
91
- Object.defineProperty(u, a, {
92
+ Object.defineProperty(o, a, {
92
93
  get: () => {
93
94
  const y = a;
94
95
  return s._proxyFormState[y] !== $.all && (s._proxyFormState[y] = !n || $.all), e[y];
95
96
  }
96
97
  });
97
- return u;
98
- }, M = (e) => S(e) && !Object.keys(e).length, Pt = (e, s, r, n) => {
98
+ return o;
99
+ }, O = (e) => E(e) && !Object.keys(e).length, qt = (e, s, r, n) => {
99
100
  r(e);
100
- const { name: u, ...a } = e;
101
- return M(a) || Object.keys(a).length >= Object.keys(s).length || Object.keys(a).find((y) => s[y] === $.all);
102
- }, _e = (e) => Array.isArray(e) ? e : [e];
101
+ const { name: o, ...a } = e;
102
+ return O(a) || Object.keys(a).length >= Object.keys(s).length || Object.keys(a).find((y) => s[y] === $.all);
103
+ }, me = (e) => Array.isArray(e) ? e : [e];
103
104
  function Wt(e) {
104
105
  const s = W.useRef(e);
105
106
  s.current = e, W.useEffect(() => {
@@ -111,11 +112,11 @@ function Wt(e) {
111
112
  };
112
113
  }, [e.disabled]);
113
114
  }
114
- var G = (e) => typeof e == "string", Ht = (e, s, r, n, u) => G(e) ? (n && s.watch.add(e), d(r, e, u)) : Array.isArray(e) ? e.map((a) => (n && s.watch.add(a), d(r, a))) : (n && (s.watchAll = !0), r), zt = (e, s, r, n, u) => s ? {
115
+ var J = (e) => typeof e == "string", Ht = (e, s, r, n, o) => J(e) ? (n && s.watch.add(e), d(r, e, o)) : Array.isArray(e) ? e.map((a) => (n && s.watch.add(a), d(r, a))) : (n && (s.watchAll = !0), r), zt = (e, s, r, n, o) => s ? {
115
116
  ...r[e],
116
117
  types: {
117
118
  ...r[e] && r[e].types ? r[e].types : {},
118
- [n]: u || !0
119
+ [n]: o || !0
119
120
  }
120
121
  } : {}, Qe = (e) => ({
121
122
  isOnSubmit: !e || e === $.onSubmit,
@@ -125,35 +126,35 @@ var G = (e) => typeof e == "string", Ht = (e, s, r, n, u) => G(e) ? (n && s.watc
125
126
  isOnTouch: e === $.onTouched
126
127
  }), Xe = (e, s, r) => !r && (s.watchAll || s.watch.has(e) || [...s.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
127
128
  const he = (e, s, r, n) => {
128
- for (const u of r || Object.keys(e)) {
129
- const a = d(e, u);
129
+ for (const o of r || Object.keys(e)) {
130
+ const a = d(e, o);
130
131
  if (a) {
131
132
  const { _f: y, ...g } = a;
132
133
  if (y) {
133
- if (y.refs && y.refs[0] && s(y.refs[0], u) && !n)
134
+ if (y.refs && y.refs[0] && s(y.refs[0], o) && !n)
134
135
  break;
135
136
  if (y.ref && s(y.ref, y.name) && !n)
136
137
  break;
137
138
  he(g, s);
138
139
  } else
139
- S(g) && he(g, s);
140
+ E(g) && he(g, s);
140
141
  }
141
142
  }
142
143
  };
143
144
  var $t = (e, s, r) => {
144
- const n = _e(d(e, r));
145
- return F(n, "root", s[r]), F(e, r, n), e;
146
- }, Me = (e) => e.type === "file", re = (e) => typeof e == "function", be = (e) => {
145
+ const n = me(d(e, r));
146
+ return V(n, "root", s[r]), V(e, r, n), e;
147
+ }, Me = (e) => e.type === "file", re = (e) => typeof e == "function", xe = (e) => {
147
148
  if (!Re)
148
149
  return !1;
149
150
  const s = e ? e.ownerDocument : 0;
150
151
  return e instanceof (s && s.defaultView ? s.defaultView.HTMLElement : HTMLElement);
151
- }, me = (e) => G(e), Oe = (e) => e.type === "radio", xe = (e) => e instanceof RegExp;
152
+ }, be = (e) => J(e), Oe = (e) => e.type === "radio", Ve = (e) => e instanceof RegExp;
152
153
  const Ye = {
153
154
  value: !1,
154
155
  isValid: !1
155
156
  }, Ze = { value: !0, isValid: !0 };
156
- var nt = (e) => {
157
+ var at = (e) => {
157
158
  if (Array.isArray(e)) {
158
159
  if (e.length > 1) {
159
160
  const s = e.filter((r) => r && r.checked && !r.disabled).map((r) => r.value);
@@ -161,7 +162,7 @@ var nt = (e) => {
161
162
  }
162
163
  return e[0].checked && !e[0].disabled ? (
163
164
  // @ts-expect-error expected to work in the browser
164
- e[0].attributes && !p(e[0].attributes.value) ? p(e[0].value) || e[0].value === "" ? Ze : { value: e[0].value, isValid: !0 } : Ze
165
+ e[0].attributes && !w(e[0].attributes.value) ? w(e[0].value) || e[0].value === "" ? Ze : { value: e[0].value, isValid: !0 } : Ze
165
166
  ) : Ye;
166
167
  }
167
168
  return Ye;
@@ -170,118 +171,118 @@ const et = {
170
171
  isValid: !1,
171
172
  value: null
172
173
  };
173
- var ut = (e) => Array.isArray(e) ? e.reduce((s, r) => r && r.checked && !r.disabled ? {
174
+ var nt = (e) => Array.isArray(e) ? e.reduce((s, r) => r && r.checked && !r.disabled ? {
174
175
  isValid: !0,
175
176
  value: r.value
176
177
  } : s, et) : et;
177
178
  function tt(e, s, r = "validate") {
178
- if (me(e) || Array.isArray(e) && e.every(me) || te(e) && !e)
179
+ if (be(e) || Array.isArray(e) && e.every(be) || te(e) && !e)
179
180
  return {
180
181
  type: r,
181
- message: me(e) ? e : "",
182
+ message: be(e) ? e : "",
182
183
  ref: s
183
184
  };
184
185
  }
185
- var ue = (e) => S(e) && !xe(e) ? e : {
186
+ var oe = (e) => E(e) && !Ve(e) ? e : {
186
187
  value: e,
187
188
  message: ""
188
- }, rt = async (e, s, r, n, u) => {
189
- const { ref: a, refs: y, required: g, maxLength: R, minLength: I, min: A, max: _, pattern: ie, validate: j, name: C, valueAsNumber: J, mount: B, disabled: K } = e._f, m = d(s, C);
190
- if (!B || K)
189
+ }, rt = async (e, s, r, n, o) => {
190
+ const { ref: a, refs: y, required: g, maxLength: R, minLength: I, min: F, max: _, pattern: ie, validate: j, name: D, valueAsNumber: H, mount: K, disabled: G } = e._f, m = d(s, D);
191
+ if (!K || G)
191
192
  return {};
192
- const H = y ? y[0] : a, O = (v) => {
193
- n && H.reportValidity && (H.setCustomValidity(te(v) ? "" : v || ""), H.reportValidity());
194
- }, V = {}, Q = Oe(a), le = ge(a), X = Q || le, Z = (J || Me(a)) && p(a.value) && p(m) || be(a) && a.value === "" || m === "" || Array.isArray(m) && !m.length, L = zt.bind(null, C, r, V), ae = (v, b, w, E = Y.maxLength, z = Y.minLength) => {
195
- const q = v ? b : w;
196
- V[C] = {
197
- type: v ? E : z,
198
- message: q,
193
+ const N = y ? y[0] : a, B = (v) => {
194
+ n && N.reportValidity && (N.setCustomValidity(te(v) ? "" : v || ""), N.reportValidity());
195
+ }, A = {}, Z = Oe(a), le = ge(a), Q = Z || le, ee = (H || Me(a)) && w(a.value) && w(m) || xe(a) && a.value === "" || m === "" || Array.isArray(m) && !m.length, L = zt.bind(null, D, r, A), ae = (v, b, p, C = Y.maxLength, z = Y.minLength) => {
196
+ const P = v ? b : p;
197
+ A[D] = {
198
+ type: v ? C : z,
199
+ message: P,
199
200
  ref: a,
200
- ...L(v ? E : z, q)
201
+ ...L(v ? C : z, P)
201
202
  };
202
203
  };
203
- if (u ? !Array.isArray(m) || !m.length : g && (!X && (Z || T(m)) || te(m) && !m || le && !nt(y).isValid || Q && !ut(y).isValid)) {
204
- const { value: v, message: b } = me(g) ? { value: !!g, message: g } : ue(g);
205
- if (v && (V[C] = {
204
+ if (o ? !Array.isArray(m) || !m.length : g && (!Q && (ee || T(m)) || te(m) && !m || le && !at(y).isValid || Z && !nt(y).isValid)) {
205
+ const { value: v, message: b } = be(g) ? { value: !!g, message: g } : oe(g);
206
+ if (v && (A[D] = {
206
207
  type: Y.required,
207
208
  message: b,
208
- ref: H,
209
+ ref: N,
209
210
  ...L(Y.required, b)
210
211
  }, !r))
211
- return O(b), V;
212
+ return B(b), A;
212
213
  }
213
- if (!Z && (!T(A) || !T(_))) {
214
+ if (!ee && (!T(F) || !T(_))) {
214
215
  let v, b;
215
- const w = ue(_), E = ue(A);
216
+ const p = oe(_), C = oe(F);
216
217
  if (!T(m) && !isNaN(m)) {
217
218
  const z = a.valueAsNumber || m && +m;
218
- T(w.value) || (v = z > w.value), T(E.value) || (b = z < E.value);
219
+ T(p.value) || (v = z > p.value), T(C.value) || (b = z < C.value);
219
220
  } else {
220
- const z = a.valueAsDate || new Date(m), q = (de) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + de), ce = a.type == "time", fe = a.type == "week";
221
- G(w.value) && m && (v = ce ? q(m) > q(w.value) : fe ? m > w.value : z > new Date(w.value)), G(E.value) && m && (b = ce ? q(m) < q(E.value) : fe ? m < E.value : z < new Date(E.value));
221
+ const z = a.valueAsDate || new Date(m), P = (de) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + de), ce = a.type == "time", fe = a.type == "week";
222
+ J(p.value) && m && (v = ce ? P(m) > P(p.value) : fe ? m > p.value : z > new Date(p.value)), J(C.value) && m && (b = ce ? P(m) < P(C.value) : fe ? m < C.value : z < new Date(C.value));
222
223
  }
223
- if ((v || b) && (ae(!!v, w.message, E.message, Y.max, Y.min), !r))
224
- return O(V[C].message), V;
224
+ if ((v || b) && (ae(!!v, p.message, C.message, Y.max, Y.min), !r))
225
+ return B(A[D].message), A;
225
226
  }
226
- if ((R || I) && !Z && (G(m) || u && Array.isArray(m))) {
227
- const v = ue(R), b = ue(I), w = !T(v.value) && m.length > +v.value, E = !T(b.value) && m.length < +b.value;
228
- if ((w || E) && (ae(w, v.message, b.message), !r))
229
- return O(V[C].message), V;
227
+ if ((R || I) && !ee && (J(m) || o && Array.isArray(m))) {
228
+ const v = oe(R), b = oe(I), p = !T(v.value) && m.length > +v.value, C = !T(b.value) && m.length < +b.value;
229
+ if ((p || C) && (ae(p, v.message, b.message), !r))
230
+ return B(A[D].message), A;
230
231
  }
231
- if (ie && !Z && G(m)) {
232
- const { value: v, message: b } = ue(ie);
233
- if (xe(v) && !m.match(v) && (V[C] = {
232
+ if (ie && !ee && J(m)) {
233
+ const { value: v, message: b } = oe(ie);
234
+ if (Ve(v) && !m.match(v) && (A[D] = {
234
235
  type: Y.pattern,
235
236
  message: b,
236
237
  ref: a,
237
238
  ...L(Y.pattern, b)
238
239
  }, !r))
239
- return O(b), V;
240
+ return B(b), A;
240
241
  }
241
242
  if (j) {
242
243
  if (re(j)) {
243
- const v = await j(m, s), b = tt(v, H);
244
- if (b && (V[C] = {
244
+ const v = await j(m, s), b = tt(v, N);
245
+ if (b && (A[D] = {
245
246
  ...b,
246
247
  ...L(Y.validate, b.message)
247
248
  }, !r))
248
- return O(b.message), V;
249
- } else if (S(j)) {
249
+ return B(b.message), A;
250
+ } else if (E(j)) {
250
251
  let v = {};
251
252
  for (const b in j) {
252
- if (!M(v) && !r)
253
+ if (!O(v) && !r)
253
254
  break;
254
- const w = tt(await j[b](m, s), H, b);
255
- w && (v = {
256
- ...w,
257
- ...L(b, w.message)
258
- }, O(w.message), r && (V[C] = v));
255
+ const p = tt(await j[b](m, s), N, b);
256
+ p && (v = {
257
+ ...p,
258
+ ...L(b, p.message)
259
+ }, B(p.message), r && (A[D] = v));
259
260
  }
260
- if (!M(v) && (V[C] = {
261
- ref: H,
261
+ if (!O(v) && (A[D] = {
262
+ ref: N,
262
263
  ...v
263
264
  }, !r))
264
- return V;
265
+ return A;
265
266
  }
266
267
  }
267
- return O(!0), V;
268
+ return B(!0), A;
268
269
  };
269
270
  function jt(e, s) {
270
271
  const r = s.slice(0, -1).length;
271
272
  let n = 0;
272
273
  for (; n < r; )
273
- e = p(e) ? n++ : e[s[n++]];
274
+ e = w(e) ? n++ : e[s[n++]];
274
275
  return e;
275
276
  }
276
277
  function Kt(e) {
277
278
  for (const s in e)
278
- if (e.hasOwnProperty(s) && !p(e[s]))
279
+ if (e.hasOwnProperty(s) && !w(e[s]))
279
280
  return !1;
280
281
  return !0;
281
282
  }
282
- function k(e, s) {
283
- const r = Array.isArray(s) ? s : Le(s) ? [s] : at(s), n = r.length === 1 ? e : jt(e, r), u = r.length - 1, a = r[u];
284
- return n && delete n[a], u !== 0 && (S(n) && M(n) || Array.isArray(n) && Kt(n)) && k(e, r.slice(0, -1)), e;
283
+ function S(e, s) {
284
+ const r = Array.isArray(s) ? s : Le(s) ? [s] : lt(s), n = r.length === 1 ? e : jt(e, r), o = r.length - 1, a = r[o];
285
+ return n && delete n[a], o !== 0 && (E(n) && O(n) || Array.isArray(n) && Kt(n)) && S(e, r.slice(0, -1)), e;
285
286
  }
286
287
  var Ce = () => {
287
288
  let e = [];
@@ -289,79 +290,79 @@ var Ce = () => {
289
290
  get observers() {
290
291
  return e;
291
292
  },
292
- next: (u) => {
293
+ next: (o) => {
293
294
  for (const a of e)
294
- a.next && a.next(u);
295
+ a.next && a.next(o);
295
296
  },
296
- subscribe: (u) => (e.push(u), {
297
+ subscribe: (o) => (e.push(o), {
297
298
  unsubscribe: () => {
298
- e = e.filter((a) => a !== u);
299
+ e = e.filter((a) => a !== o);
299
300
  }
300
301
  }),
301
302
  unsubscribe: () => {
302
303
  e = [];
303
304
  }
304
305
  };
305
- }, Ve = (e) => T(e) || !lt(e);
306
+ }, Fe = (e) => T(e) || !it(e);
306
307
  function se(e, s) {
307
- if (Ve(e) || Ve(s))
308
+ if (Fe(e) || Fe(s))
308
309
  return e === s;
309
- if (oe(e) && oe(s))
310
+ if (ue(e) && ue(s))
310
311
  return e.getTime() === s.getTime();
311
312
  const r = Object.keys(e), n = Object.keys(s);
312
313
  if (r.length !== n.length)
313
314
  return !1;
314
- for (const u of r) {
315
- const a = e[u];
316
- if (!n.includes(u))
315
+ for (const o of r) {
316
+ const a = e[o];
317
+ if (!n.includes(o))
317
318
  return !1;
318
- if (u !== "ref") {
319
- const y = s[u];
320
- if (oe(a) && oe(y) || S(a) && S(y) || Array.isArray(a) && Array.isArray(y) ? !se(a, y) : a !== y)
319
+ if (o !== "ref") {
320
+ const y = s[o];
321
+ if (ue(a) && ue(y) || E(a) && E(y) || Array.isArray(a) && Array.isArray(y) ? !se(a, y) : a !== y)
321
322
  return !1;
322
323
  }
323
324
  }
324
325
  return !0;
325
326
  }
326
- var ot = (e) => e.type === "select-multiple", Gt = (e) => Oe(e) || ge(e), Be = (e) => be(e) && e.isConnected, ct = (e) => {
327
+ var ot = (e) => e.type === "select-multiple", Gt = (e) => Oe(e) || ge(e), Be = (e) => xe(e) && e.isConnected, ut = (e) => {
327
328
  for (const s in e)
328
329
  if (re(e[s]))
329
330
  return !0;
330
331
  return !1;
331
332
  };
332
- function Fe(e, s = {}) {
333
+ function Ae(e, s = {}) {
333
334
  const r = Array.isArray(e);
334
- if (S(e) || r)
335
+ if (E(e) || r)
335
336
  for (const n in e)
336
- Array.isArray(e[n]) || S(e[n]) && !ct(e[n]) ? (s[n] = Array.isArray(e[n]) ? [] : {}, Fe(e[n], s[n])) : T(e[n]) || (s[n] = !0);
337
+ Array.isArray(e[n]) || E(e[n]) && !ut(e[n]) ? (s[n] = Array.isArray(e[n]) ? [] : {}, Ae(e[n], s[n])) : T(e[n]) || (s[n] = !0);
337
338
  return s;
338
339
  }
339
- function ft(e, s, r) {
340
+ function ct(e, s, r) {
340
341
  const n = Array.isArray(e);
341
- if (S(e) || n)
342
- for (const u in e)
343
- Array.isArray(e[u]) || S(e[u]) && !ct(e[u]) ? p(s) || Ve(r[u]) ? r[u] = Array.isArray(e[u]) ? Fe(e[u], []) : { ...Fe(e[u]) } : ft(e[u], T(s) ? {} : s[u], r[u]) : r[u] = !se(e[u], s[u]);
342
+ if (E(e) || n)
343
+ for (const o in e)
344
+ Array.isArray(e[o]) || E(e[o]) && !ut(e[o]) ? w(s) || Fe(r[o]) ? r[o] = Array.isArray(e[o]) ? Ae(e[o], []) : { ...Ae(e[o]) } : ct(e[o], T(s) ? {} : s[o], r[o]) : r[o] = !se(e[o], s[o]);
344
345
  return r;
345
346
  }
346
- var ve = (e, s) => ft(e, s, Fe(s)), dt = (e, { valueAsNumber: s, valueAsDate: r, setValueAs: n }) => p(e) ? e : s ? e === "" ? NaN : e && +e : r && G(e) ? new Date(e) : n ? n(e) : e;
347
+ var _e = (e, s) => ct(e, s, Ae(s)), ft = (e, { valueAsNumber: s, valueAsDate: r, setValueAs: n }) => w(e) ? e : s ? e === "" ? NaN : e && +e : r && J(e) ? new Date(e) : n ? n(e) : e;
347
348
  function Te(e) {
348
349
  const s = e.ref;
349
350
  if (!(e.refs ? e.refs.every((r) => r.disabled) : s.disabled))
350
- return Me(s) ? s.files : Oe(s) ? ut(e.refs).value : ot(s) ? [...s.selectedOptions].map(({ value: r }) => r) : ge(s) ? nt(e.refs).value : dt(p(s.value) ? e.ref.value : s.value, e);
351
+ return Me(s) ? s.files : Oe(s) ? nt(e.refs).value : ot(s) ? [...s.selectedOptions].map(({ value: r }) => r) : ge(s) ? at(e.refs).value : ft(w(s.value) ? e.ref.value : s.value, e);
351
352
  }
352
353
  var Jt = (e, s, r, n) => {
353
- const u = {};
354
+ const o = {};
354
355
  for (const a of e) {
355
356
  const y = d(s, a);
356
- y && F(u, a, y._f);
357
+ y && V(o, a, y._f);
357
358
  }
358
359
  return {
359
360
  criteriaMode: r,
360
361
  names: [...e],
361
- fields: u,
362
+ fields: o,
362
363
  shouldUseNativeValidation: n
363
364
  };
364
- }, ye = (e) => p(e) ? e : xe(e) ? e.source : S(e) ? xe(e.value) ? e.value.source : e.value : e, Qt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
365
+ }, ye = (e) => w(e) ? e : Ve(e) ? e.source : E(e) ? Ve(e.value) ? e.value.source : e.value : e, Qt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
365
366
  function st(e, s, r) {
366
367
  const n = d(e, r);
367
368
  if (n || Le(r))
@@ -369,9 +370,9 @@ function st(e, s, r) {
369
370
  error: n,
370
371
  name: r
371
372
  };
372
- const u = r.split(".");
373
- for (; u.length; ) {
374
- const a = u.join("."), y = d(s, a), g = d(e, a);
373
+ const o = r.split(".");
374
+ for (; o.length; ) {
375
+ const a = o.join("."), y = d(s, a), g = d(e, a);
375
376
  if (y && !Array.isArray(y) && r !== a)
376
377
  return { name: r };
377
378
  if (g && g.type)
@@ -379,13 +380,13 @@ function st(e, s, r) {
379
380
  name: a,
380
381
  error: g
381
382
  };
382
- u.pop();
383
+ o.pop();
383
384
  }
384
385
  return {
385
386
  name: r
386
387
  };
387
388
  }
388
- var Xt = (e, s, r, n, u) => u.isOnAll ? !1 : !r && u.isOnTouch ? !(s || e) : (r ? n.isOnBlur : u.isOnBlur) ? !e : (r ? n.isOnChange : u.isOnChange) ? e : !0, Yt = (e, s) => !Ae(d(e, s)).length && k(e, s);
389
+ var Xt = (e, s, r, n, o) => o.isOnAll ? !1 : !r && o.isOnTouch ? !(s || e) : (r ? n.isOnBlur : o.isOnBlur) ? !e : (r ? n.isOnChange : o.isOnChange) ? e : !0, Yt = (e, s) => !pe(d(e, s)).length && S(e, s);
389
390
  const Zt = {
390
391
  mode: $.onSubmit,
391
392
  reValidateMode: $.onChange,
@@ -409,7 +410,7 @@ function er(e = {}) {
409
410
  validatingFields: {},
410
411
  errors: s.errors || {},
411
412
  disabled: s.disabled || !1
412
- }, n = {}, u = S(s.defaultValues) || S(s.values) ? P(s.defaultValues || s.values) || {} : {}, a = s.shouldUnregister ? {} : P(u), y = {
413
+ }, n = {}, o = E(s.defaultValues) || E(s.values) ? q(s.defaultValues || s.values) || {} : {}, a = s.shouldUnregister ? {} : q(o), y = {
413
414
  action: !1,
414
415
  mount: !1,
415
416
  watch: !1
@@ -419,7 +420,7 @@ function er(e = {}) {
419
420
  array: /* @__PURE__ */ new Set(),
420
421
  watch: /* @__PURE__ */ new Set()
421
422
  }, R, I = 0;
422
- const A = {
423
+ const F = {
423
424
  isDirty: !1,
424
425
  dirtyFields: !1,
425
426
  validatingFields: !1,
@@ -431,37 +432,37 @@ function er(e = {}) {
431
432
  values: Ce(),
432
433
  array: Ce(),
433
434
  state: Ce()
434
- }, ie = Qe(s.mode), j = Qe(s.reValidateMode), C = s.criteriaMode === $.all, J = (t) => (i) => {
435
+ }, ie = Qe(s.mode), j = Qe(s.reValidateMode), D = s.criteriaMode === $.all, H = (t) => (i) => {
435
436
  clearTimeout(I), I = setTimeout(t, i);
436
- }, B = async (t) => {
437
- if (A.isValid || t) {
438
- const i = s.resolver ? M((await X()).errors) : await L(n, !0);
437
+ }, K = async (t) => {
438
+ if (F.isValid || t) {
439
+ const i = s.resolver ? O((await Q()).errors) : await L(n, !0);
439
440
  i !== r.isValid && _.state.next({
440
441
  isValid: i
441
442
  });
442
443
  }
443
- }, K = (t, i) => {
444
- (A.isValidating || A.validatingFields) && ((t || Array.from(g.mount)).forEach((l) => {
445
- l && (i ? F(r.validatingFields, l, i) : k(r.validatingFields, l));
444
+ }, G = (t, i) => {
445
+ (F.isValidating || F.validatingFields) && ((t || Array.from(g.mount)).forEach((l) => {
446
+ l && (i ? V(r.validatingFields, l, i) : S(r.validatingFields, l));
446
447
  }), _.state.next({
447
448
  validatingFields: r.validatingFields,
448
- isValidating: !M(r.validatingFields)
449
+ isValidating: !O(r.validatingFields)
449
450
  }));
450
- }, m = (t, i = [], l, f, c = !0, o = !0) => {
451
+ }, m = (t, i = [], l, f, c = !0, u = !0) => {
451
452
  if (f && l) {
452
- if (y.action = !0, o && Array.isArray(d(n, t))) {
453
+ if (y.action = !0, u && Array.isArray(d(n, t))) {
453
454
  const h = l(d(n, t), f.argA, f.argB);
454
- c && F(n, t, h);
455
+ c && V(n, t, h);
455
456
  }
456
- if (o && Array.isArray(d(r.errors, t))) {
457
+ if (u && Array.isArray(d(r.errors, t))) {
457
458
  const h = l(d(r.errors, t), f.argA, f.argB);
458
- c && F(r.errors, t, h), Yt(r.errors, t);
459
+ c && V(r.errors, t, h), Yt(r.errors, t);
459
460
  }
460
- if (A.touchedFields && o && Array.isArray(d(r.touchedFields, t))) {
461
+ if (F.touchedFields && u && Array.isArray(d(r.touchedFields, t))) {
461
462
  const h = l(d(r.touchedFields, t), f.argA, f.argB);
462
- c && F(r.touchedFields, t, h);
463
+ c && V(r.touchedFields, t, h);
463
464
  }
464
- A.dirtyFields && (r.dirtyFields = ve(u, a)), _.state.next({
465
+ F.dirtyFields && (r.dirtyFields = _e(o, a)), _.state.next({
465
466
  name: t,
466
467
  isDirty: v(t, i),
467
468
  dirtyFields: r.dirtyFields,
@@ -469,43 +470,43 @@ function er(e = {}) {
469
470
  isValid: r.isValid
470
471
  });
471
472
  } else
472
- F(a, t, i);
473
- }, H = (t, i) => {
474
- F(r.errors, t, i), _.state.next({
473
+ V(a, t, i);
474
+ }, N = (t, i) => {
475
+ V(r.errors, t, i), _.state.next({
475
476
  errors: r.errors
476
477
  });
477
- }, O = (t) => {
478
+ }, B = (t) => {
478
479
  r.errors = t, _.state.next({
479
480
  errors: r.errors,
480
481
  isValid: !1
481
482
  });
482
- }, V = (t, i, l, f) => {
483
+ }, A = (t, i, l, f) => {
483
484
  const c = d(n, t);
484
485
  if (c) {
485
- const o = d(a, t, p(l) ? d(u, t) : l);
486
- p(o) || f && f.defaultChecked || i ? F(a, t, i ? o : Te(c._f)) : E(t, o), y.mount && B();
486
+ const u = d(a, t, w(l) ? d(o, t) : l);
487
+ w(u) || f && f.defaultChecked || i ? V(a, t, i ? u : Te(c._f)) : C(t, u), y.mount && K();
487
488
  }
488
- }, Q = (t, i, l, f, c) => {
489
- let o = !1, h = !1;
489
+ }, Z = (t, i, l, f, c) => {
490
+ let u = !1, h = !1;
490
491
  const x = {
491
492
  name: t
492
- }, D = !!(d(n, t) && d(n, t)._f && d(n, t)._f.disabled);
493
+ }, k = !!(d(n, t) && d(n, t)._f && d(n, t)._f.disabled);
493
494
  if (!l || f) {
494
- A.isDirty && (h = r.isDirty, r.isDirty = x.isDirty = v(), o = h !== x.isDirty);
495
- const N = D || se(d(u, t), i);
496
- h = !!(!D && d(r.dirtyFields, t)), N || D ? k(r.dirtyFields, t) : F(r.dirtyFields, t, !0), x.dirtyFields = r.dirtyFields, o = o || A.dirtyFields && h !== !N;
495
+ F.isDirty && (h = r.isDirty, r.isDirty = x.isDirty = v(), u = h !== x.isDirty);
496
+ const U = k || se(d(o, t), i);
497
+ h = !!(!k && d(r.dirtyFields, t)), U || k ? S(r.dirtyFields, t) : V(r.dirtyFields, t, !0), x.dirtyFields = r.dirtyFields, u = u || F.dirtyFields && h !== !U;
497
498
  }
498
499
  if (l) {
499
- const N = d(r.touchedFields, t);
500
- N || (F(r.touchedFields, t, l), x.touchedFields = r.touchedFields, o = o || A.touchedFields && N !== l);
500
+ const U = d(r.touchedFields, t);
501
+ U || (V(r.touchedFields, t, l), x.touchedFields = r.touchedFields, u = u || F.touchedFields && U !== l);
501
502
  }
502
- return o && c && _.state.next(x), o ? x : {};
503
+ return u && c && _.state.next(x), u ? x : {};
503
504
  }, le = (t, i, l, f) => {
504
- const c = d(r.errors, t), o = A.isValid && te(i) && r.isValid !== i;
505
- if (e.delayError && l ? (R = J(() => H(t, l)), R(e.delayError)) : (clearTimeout(I), R = null, l ? F(r.errors, t, l) : k(r.errors, t)), (l ? !se(c, l) : c) || !M(f) || o) {
505
+ const c = d(r.errors, t), u = F.isValid && te(i) && r.isValid !== i;
506
+ if (e.delayError && l ? (R = H(() => N(t, l)), R(e.delayError)) : (clearTimeout(I), R = null, l ? V(r.errors, t, l) : S(r.errors, t)), (l ? !se(c, l) : c) || !O(f) || u) {
506
507
  const h = {
507
508
  ...f,
508
- ...o && te(i) ? { isValid: i } : {},
509
+ ...u && te(i) ? { isValid: i } : {},
509
510
  errors: r.errors,
510
511
  name: t
511
512
  };
@@ -514,16 +515,16 @@ function er(e = {}) {
514
515
  ...h
515
516
  }, _.state.next(h);
516
517
  }
517
- }, X = async (t) => {
518
- K(t, !0);
518
+ }, Q = async (t) => {
519
+ G(t, !0);
519
520
  const i = await s.resolver(a, s.context, Jt(t || g.mount, n, s.criteriaMode, s.shouldUseNativeValidation));
520
- return K(t), i;
521
- }, Z = async (t) => {
522
- const { errors: i } = await X(t);
521
+ return G(t), i;
522
+ }, ee = async (t) => {
523
+ const { errors: i } = await Q(t);
523
524
  if (t)
524
525
  for (const l of t) {
525
526
  const f = d(i, l);
526
- f ? F(r.errors, l, f) : k(r.errors, l);
527
+ f ? V(r.errors, l, f) : S(r.errors, l);
527
528
  }
528
529
  else
529
530
  r.errors = i;
@@ -534,16 +535,16 @@ function er(e = {}) {
534
535
  for (const f in t) {
535
536
  const c = t[f];
536
537
  if (c) {
537
- const { _f: o, ...h } = c;
538
- if (o) {
539
- const x = g.array.has(o.name);
540
- K([f], !0);
541
- const D = await rt(c, a, C, s.shouldUseNativeValidation && !i, x);
542
- if (K([f]), D[o.name] && (l.valid = !1, i))
538
+ const { _f: u, ...h } = c;
539
+ if (u) {
540
+ const x = g.array.has(u.name);
541
+ G([f], !0);
542
+ const k = await rt(c, a, D, s.shouldUseNativeValidation && !i, x);
543
+ if (G([f]), k[u.name] && (l.valid = !1, i))
543
544
  break;
544
- !i && (d(D, o.name) ? x ? $t(r.errors, D, o.name) : F(r.errors, o.name, D[o.name]) : k(r.errors, o.name));
545
+ !i && (d(k, u.name) ? x ? $t(r.errors, k, u.name) : V(r.errors, u.name, k[u.name]) : S(r.errors, u.name));
545
546
  }
546
- !M(h) && await L(h, i, l);
547
+ !O(h) && await L(h, i, l);
547
548
  }
548
549
  }
549
550
  return l.valid;
@@ -553,34 +554,34 @@ function er(e = {}) {
553
554
  i && (i._f.refs ? i._f.refs.every((l) => !Be(l)) : !Be(i._f.ref)) && we(t);
554
555
  }
555
556
  g.unMount = /* @__PURE__ */ new Set();
556
- }, v = (t, i) => (t && i && F(a, t, i), !se(Ne(), u)), b = (t, i, l) => Ht(t, g, {
557
- ...y.mount ? a : p(i) ? u : G(t) ? { [t]: i } : i
558
- }, l, i), w = (t) => Ae(d(y.mount ? a : u, t, e.shouldUnregister ? d(u, t, []) : [])), E = (t, i, l = {}) => {
557
+ }, v = (t, i) => (t && i && V(a, t, i), !se(Ne(), o)), b = (t, i, l) => Ht(t, g, {
558
+ ...y.mount ? a : w(i) ? o : J(t) ? { [t]: i } : i
559
+ }, l, i), p = (t) => pe(d(y.mount ? a : o, t, e.shouldUnregister ? d(o, t, []) : [])), C = (t, i, l = {}) => {
559
560
  const f = d(n, t);
560
561
  let c = i;
561
562
  if (f) {
562
- const o = f._f;
563
- o && (!o.disabled && F(a, t, dt(i, o)), c = be(o.ref) && T(i) ? "" : i, ot(o.ref) ? [...o.ref.options].forEach((h) => h.selected = c.includes(h.value)) : o.refs ? ge(o.ref) ? o.refs.length > 1 ? o.refs.forEach((h) => (!h.defaultChecked || !h.disabled) && (h.checked = Array.isArray(c) ? !!c.find((x) => x === h.value) : c === h.value)) : o.refs[0] && (o.refs[0].checked = !!c) : o.refs.forEach((h) => h.checked = h.value === c) : Me(o.ref) ? o.ref.value = "" : (o.ref.value = c, o.ref.type || _.values.next({
563
+ const u = f._f;
564
+ u && (!u.disabled && V(a, t, ft(i, u)), c = xe(u.ref) && T(i) ? "" : i, ot(u.ref) ? [...u.ref.options].forEach((h) => h.selected = c.includes(h.value)) : u.refs ? ge(u.ref) ? u.refs.length > 1 ? u.refs.forEach((h) => (!h.defaultChecked || !h.disabled) && (h.checked = Array.isArray(c) ? !!c.find((x) => x === h.value) : c === h.value)) : u.refs[0] && (u.refs[0].checked = !!c) : u.refs.forEach((h) => h.checked = h.value === c) : Me(u.ref) ? u.ref.value = "" : (u.ref.value = c, u.ref.type || _.values.next({
564
565
  name: t,
565
566
  values: { ...a }
566
567
  })));
567
568
  }
568
- (l.shouldDirty || l.shouldTouch) && Q(t, c, l.shouldTouch, l.shouldDirty, !0), l.shouldValidate && de(t);
569
+ (l.shouldDirty || l.shouldTouch) && Z(t, c, l.shouldTouch, l.shouldDirty, !0), l.shouldValidate && de(t);
569
570
  }, z = (t, i, l) => {
570
571
  for (const f in i) {
571
- const c = i[f], o = `${t}.${f}`, h = d(n, o);
572
- (g.array.has(t) || !Ve(c) || h && !h._f) && !oe(c) ? z(o, c, l) : E(o, c, l);
572
+ const c = i[f], u = `${t}.${f}`, h = d(n, u);
573
+ (g.array.has(t) || !Fe(c) || h && !h._f) && !ue(c) ? z(u, c, l) : C(u, c, l);
573
574
  }
574
- }, q = (t, i, l = {}) => {
575
- const f = d(n, t), c = g.array.has(t), o = P(i);
576
- F(a, t, o), c ? (_.array.next({
575
+ }, P = (t, i, l = {}) => {
576
+ const f = d(n, t), c = g.array.has(t), u = q(i);
577
+ V(a, t, u), c ? (_.array.next({
577
578
  name: t,
578
579
  values: { ...a }
579
- }), (A.isDirty || A.dirtyFields) && l.shouldDirty && _.state.next({
580
+ }), (F.isDirty || F.dirtyFields) && l.shouldDirty && _.state.next({
580
581
  name: t,
581
- dirtyFields: ve(u, a),
582
- isDirty: v(t, o)
583
- })) : f && !f._f && !T(o) ? z(t, o, l) : E(t, o, l), Xe(t, g) && _.state.next({ ...r }), _.values.next({
582
+ dirtyFields: _e(o, a),
583
+ isDirty: v(t, u)
584
+ })) : f && !f._f && !T(u) ? z(t, u, l) : C(t, u, l), Xe(t, g) && _.state.next({ ...r }), _.values.next({
584
585
  name: y.mount ? t : void 0,
585
586
  values: { ...a }
586
587
  });
@@ -588,68 +589,68 @@ function er(e = {}) {
588
589
  y.mount = !0;
589
590
  const i = t.target;
590
591
  let l = i.name, f = !0;
591
- const c = d(n, l), o = () => i.type ? Te(c._f) : Ot(t), h = (x) => {
592
+ const c = d(n, l), u = () => i.type ? Te(c._f) : Ot(t), h = (x) => {
592
593
  f = Number.isNaN(x) || x === d(a, l, x);
593
594
  };
594
595
  if (c) {
595
- let x, D;
596
- const N = o(), ne = t.type === Je.BLUR || t.type === Je.FOCUS_OUT, _t = !Qt(c._f) && !s.resolver && !d(r.errors, l) && !c._f.deps || Xt(ne, d(r.touchedFields, l), r.isSubmitted, j, ie), De = Xe(l, g, ne);
597
- F(a, l, N), ne ? (c._f.onBlur && c._f.onBlur(t), R && R(0)) : c._f.onChange && c._f.onChange(t);
598
- const ke = Q(l, N, ne, !1), mt = !M(ke) || De;
596
+ let x, k;
597
+ const U = u(), ne = t.type === Je.BLUR || t.type === Je.FOCUS_OUT, vt = !Qt(c._f) && !s.resolver && !d(r.errors, l) && !c._f.deps || Xt(ne, d(r.touchedFields, l), r.isSubmitted, j, ie), De = Xe(l, g, ne);
598
+ V(a, l, U), ne ? (c._f.onBlur && c._f.onBlur(t), R && R(0)) : c._f.onChange && c._f.onChange(t);
599
+ const Se = Z(l, U, ne, !1), _t = !O(Se) || De;
599
600
  if (!ne && _.values.next({
600
601
  name: l,
601
602
  type: t.type,
602
603
  values: { ...a }
603
- }), _t)
604
- return A.isValid && B(), mt && _.state.next({ name: l, ...De ? {} : ke });
604
+ }), vt)
605
+ return F.isValid && K(), _t && _.state.next({ name: l, ...De ? {} : Se });
605
606
  if (!ne && De && _.state.next({ ...r }), s.resolver) {
606
- const { errors: $e } = await X([l]);
607
- if (h(N), f) {
608
- const bt = st(r.errors, n, l), je = st($e, n, bt.name || l);
609
- x = je.error, l = je.name, D = M($e);
607
+ const { errors: $e } = await Q([l]);
608
+ if (h(U), f) {
609
+ const mt = st(r.errors, n, l), je = st($e, n, mt.name || l);
610
+ x = je.error, l = je.name, k = O($e);
610
611
  }
611
612
  } else
612
- K([l], !0), x = (await rt(c, a, C, s.shouldUseNativeValidation))[l], K([l]), h(N), f && (x ? D = !1 : A.isValid && (D = await L(n, !0)));
613
- f && (c._f.deps && de(c._f.deps), le(l, D, x, ke));
613
+ G([l], !0), x = (await rt(c, a, D, s.shouldUseNativeValidation))[l], G([l]), h(U), f && (x ? k = !1 : F.isValid && (k = await L(n, !0)));
614
+ f && (c._f.deps && de(c._f.deps), le(l, k, x, Se));
614
615
  }
615
616
  }, fe = (t, i) => {
616
617
  if (d(r.errors, i) && t.focus)
617
618
  return t.focus(), 1;
618
619
  }, de = async (t, i = {}) => {
619
620
  let l, f;
620
- const c = _e(t);
621
+ const c = me(t);
621
622
  if (s.resolver) {
622
- const o = await Z(p(t) ? t : c);
623
- l = M(o), f = t ? !c.some((h) => d(o, h)) : l;
623
+ const u = await ee(w(t) ? t : c);
624
+ l = O(u), f = t ? !c.some((h) => d(u, h)) : l;
624
625
  } else
625
- t ? (f = (await Promise.all(c.map(async (o) => {
626
- const h = d(n, o);
627
- return await L(h && h._f ? { [o]: h } : h);
628
- }))).every(Boolean), !(!f && !r.isValid) && B()) : f = l = await L(n);
626
+ t ? (f = (await Promise.all(c.map(async (u) => {
627
+ const h = d(n, u);
628
+ return await L(h && h._f ? { [u]: h } : h);
629
+ }))).every(Boolean), !(!f && !r.isValid) && K()) : f = l = await L(n);
629
630
  return _.state.next({
630
- ...!G(t) || A.isValid && l !== r.isValid ? {} : { name: t },
631
+ ...!J(t) || F.isValid && l !== r.isValid ? {} : { name: t },
631
632
  ...s.resolver || !t ? { isValid: l } : {},
632
633
  errors: r.errors
633
634
  }), i.shouldFocus && !f && he(n, fe, t ? c : g.mount), f;
634
635
  }, Ne = (t) => {
635
636
  const i = {
636
- ...y.mount ? a : u
637
+ ...y.mount ? a : o
637
638
  };
638
- return p(t) ? i : G(t) ? d(i, t) : t.map((l) => d(i, l));
639
+ return w(t) ? i : J(t) ? d(i, t) : t.map((l) => d(i, l));
639
640
  }, Ue = (t, i) => ({
640
641
  invalid: !!d((i || r).errors, t),
641
642
  isDirty: !!d((i || r).dirtyFields, t),
642
643
  error: d((i || r).errors, t),
643
644
  isValidating: !!d(r.validatingFields, t),
644
645
  isTouched: !!d((i || r).touchedFields, t)
645
- }), yt = (t) => {
646
- t && _e(t).forEach((i) => k(r.errors, i)), _.state.next({
646
+ }), dt = (t) => {
647
+ t && me(t).forEach((i) => S(r.errors, i)), _.state.next({
647
648
  errors: t ? r.errors : {}
648
649
  });
649
650
  }, Ie = (t, i, l) => {
650
- const f = (d(n, t, { _f: {} })._f || {}).ref, c = d(r.errors, t) || {}, { ref: o, message: h, type: x, ...D } = c;
651
- F(r.errors, t, {
652
- ...D,
651
+ const f = (d(n, t, { _f: {} })._f || {}).ref, c = d(r.errors, t) || {}, { ref: u, message: h, type: x, ...k } = c;
652
+ V(r.errors, t, {
653
+ ...k,
653
654
  ...i,
654
655
  ref: f
655
656
  }), _.state.next({
@@ -657,26 +658,26 @@ function er(e = {}) {
657
658
  errors: r.errors,
658
659
  isValid: !1
659
660
  }), l && l.shouldFocus && f && f.focus && f.focus();
660
- }, ht = (t, i) => re(t) ? _.values.subscribe({
661
+ }, yt = (t, i) => re(t) ? _.values.subscribe({
661
662
  next: (l) => t(b(void 0, i), l)
662
663
  }) : b(t, i, !0), we = (t, i = {}) => {
663
- for (const l of t ? _e(t) : g.mount)
664
- g.mount.delete(l), g.array.delete(l), i.keepValue || (k(n, l), k(a, l)), !i.keepError && k(r.errors, l), !i.keepDirty && k(r.dirtyFields, l), !i.keepTouched && k(r.touchedFields, l), !i.keepIsValidating && k(r.validatingFields, l), !s.shouldUnregister && !i.keepDefaultValue && k(u, l);
664
+ for (const l of t ? me(t) : g.mount)
665
+ g.mount.delete(l), g.array.delete(l), i.keepValue || (S(n, l), S(a, l)), !i.keepError && S(r.errors, l), !i.keepDirty && S(r.dirtyFields, l), !i.keepTouched && S(r.touchedFields, l), !i.keepIsValidating && S(r.validatingFields, l), !s.shouldUnregister && !i.keepDefaultValue && S(o, l);
665
666
  _.values.next({
666
667
  values: { ...a }
667
668
  }), _.state.next({
668
669
  ...r,
669
670
  ...i.keepDirty ? { isDirty: v() } : {}
670
- }), !i.keepIsValid && B();
671
- }, qe = ({ disabled: t, name: i, field: l, fields: f, value: c }) => {
671
+ }), !i.keepIsValid && K();
672
+ }, Pe = ({ disabled: t, name: i, field: l, fields: f, value: c }) => {
672
673
  if (te(t) && y.mount || t) {
673
- const o = t ? void 0 : p(c) ? Te(l ? l._f : d(f, i)._f) : c;
674
- F(a, i, o), Q(i, o, !1, !1, !0);
674
+ const u = t ? void 0 : w(c) ? Te(l ? l._f : d(f, i)._f) : c;
675
+ V(a, i, u), Z(i, u, !1, !1, !0);
675
676
  }
676
- }, pe = (t, i = {}) => {
677
+ }, ke = (t, i = {}) => {
677
678
  let l = d(n, t);
678
679
  const f = te(i.disabled);
679
- return F(n, t, {
680
+ return V(n, t, {
680
681
  ...l || {},
681
682
  _f: {
682
683
  ...l && l._f ? l._f : { ref: { name: t } },
@@ -684,12 +685,12 @@ function er(e = {}) {
684
685
  mount: !0,
685
686
  ...i
686
687
  }
687
- }), g.mount.add(t), l ? qe({
688
+ }), g.mount.add(t), l ? Pe({
688
689
  field: l,
689
690
  disabled: i.disabled,
690
691
  name: t,
691
692
  value: i.value
692
- }) : V(t, !0, i.value), {
693
+ }) : A(t, !0, i.value), {
693
694
  ...f ? { disabled: i.disabled } : {},
694
695
  ...s.progressive ? {
695
696
  required: !!i.required,
@@ -704,28 +705,28 @@ function er(e = {}) {
704
705
  onBlur: ce,
705
706
  ref: (c) => {
706
707
  if (c) {
707
- pe(t, i), l = d(n, t);
708
- const o = p(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, h = Gt(o), x = l._f.refs || [];
709
- if (h ? x.find((D) => D === o) : o === l._f.ref)
708
+ ke(t, i), l = d(n, t);
709
+ const u = w(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, h = Gt(u), x = l._f.refs || [];
710
+ if (h ? x.find((k) => k === u) : u === l._f.ref)
710
711
  return;
711
- F(n, t, {
712
+ V(n, t, {
712
713
  _f: {
713
714
  ...l._f,
714
715
  ...h ? {
715
716
  refs: [
716
717
  ...x.filter(Be),
717
- o,
718
- ...Array.isArray(d(u, t)) ? [{}] : []
718
+ u,
719
+ ...Array.isArray(d(o, t)) ? [{}] : []
719
720
  ],
720
- ref: { type: o.type, name: t }
721
- } : { ref: o }
721
+ ref: { type: u.type, name: t }
722
+ } : { ref: u }
722
723
  }
723
- }), V(t, !1, void 0, o);
724
+ }), A(t, !1, void 0, u);
724
725
  } else
725
726
  l = d(n, t, {}), l._f && (l._f.mount = !1), (s.shouldUnregister || i.shouldUnregister) && !(Ut(g.array, t) && y.action) && g.unMount.add(t);
726
727
  }
727
728
  };
728
- }, Pe = () => s.shouldFocusError && he(n, fe, g.mount), gt = (t) => {
729
+ }, qe = () => s.shouldFocusError && he(n, fe, g.mount), ht = (t) => {
729
730
  te(t) && (_.state.next({ disabled: t }), he(n, (i, l) => {
730
731
  const f = d(n, l);
731
732
  f && (i.disabled = f._f.disabled || t, Array.isArray(f._f.refs) && f._f.refs.forEach((c) => {
@@ -735,51 +736,51 @@ function er(e = {}) {
735
736
  }, We = (t, i) => async (l) => {
736
737
  let f;
737
738
  l && (l.preventDefault && l.preventDefault(), l.persist && l.persist());
738
- let c = P(a);
739
+ let c = q(a);
739
740
  if (_.state.next({
740
741
  isSubmitting: !0
741
742
  }), s.resolver) {
742
- const { errors: o, values: h } = await X();
743
- r.errors = o, c = h;
743
+ const { errors: u, values: h } = await Q();
744
+ r.errors = u, c = h;
744
745
  } else
745
746
  await L(n);
746
- if (k(r.errors, "root"), M(r.errors)) {
747
+ if (S(r.errors, "root"), O(r.errors)) {
747
748
  _.state.next({
748
749
  errors: {}
749
750
  });
750
751
  try {
751
752
  await t(c, l);
752
- } catch (o) {
753
- f = o;
753
+ } catch (u) {
754
+ f = u;
754
755
  }
755
756
  } else
756
- i && await i({ ...r.errors }, l), Pe(), setTimeout(Pe);
757
+ i && await i({ ...r.errors }, l), qe(), setTimeout(qe);
757
758
  if (_.state.next({
758
759
  isSubmitted: !0,
759
760
  isSubmitting: !1,
760
- isSubmitSuccessful: M(r.errors) && !f,
761
+ isSubmitSuccessful: O(r.errors) && !f,
761
762
  submitCount: r.submitCount + 1,
762
763
  errors: r.errors
763
764
  }), f)
764
765
  throw f;
765
- }, vt = (t, i = {}) => {
766
- d(n, t) && (p(i.defaultValue) ? q(t, P(d(u, t))) : (q(t, i.defaultValue), F(u, t, P(i.defaultValue))), i.keepTouched || k(r.touchedFields, t), i.keepDirty || (k(r.dirtyFields, t), r.isDirty = i.defaultValue ? v(t, P(d(u, t))) : v()), i.keepError || (k(r.errors, t), A.isValid && B()), _.state.next({ ...r }));
766
+ }, gt = (t, i = {}) => {
767
+ d(n, t) && (w(i.defaultValue) ? P(t, q(d(o, t))) : (P(t, i.defaultValue), V(o, t, q(i.defaultValue))), i.keepTouched || S(r.touchedFields, t), i.keepDirty || (S(r.dirtyFields, t), r.isDirty = i.defaultValue ? v(t, q(d(o, t))) : v()), i.keepError || (S(r.errors, t), F.isValid && K()), _.state.next({ ...r }));
767
768
  }, He = (t, i = {}) => {
768
- const l = t ? P(t) : u, f = P(l), c = M(t), o = c ? u : f;
769
- if (i.keepDefaultValues || (u = l), !i.keepValues) {
769
+ const l = t ? q(t) : o, f = q(l), c = O(t), u = c ? o : f;
770
+ if (i.keepDefaultValues || (o = l), !i.keepValues) {
770
771
  if (i.keepDirtyValues)
771
772
  for (const h of g.mount)
772
- d(r.dirtyFields, h) ? F(o, h, d(a, h)) : q(h, d(o, h));
773
+ d(r.dirtyFields, h) ? V(u, h, d(a, h)) : P(h, d(u, h));
773
774
  else {
774
- if (Re && p(t))
775
+ if (Re && w(t))
775
776
  for (const h of g.mount) {
776
777
  const x = d(n, h);
777
778
  if (x && x._f) {
778
- const D = Array.isArray(x._f.refs) ? x._f.refs[0] : x._f.ref;
779
- if (be(D)) {
780
- const N = D.closest("form");
781
- if (N) {
782
- N.reset();
779
+ const k = Array.isArray(x._f.refs) ? x._f.refs[0] : x._f.ref;
780
+ if (xe(k)) {
781
+ const U = k.closest("form");
782
+ if (U) {
783
+ U.reset();
783
784
  break;
784
785
  }
785
786
  }
@@ -787,10 +788,10 @@ function er(e = {}) {
787
788
  }
788
789
  n = {};
789
790
  }
790
- a = e.shouldUnregister ? i.keepDefaultValues ? P(u) : {} : P(o), _.array.next({
791
- values: { ...o }
791
+ a = e.shouldUnregister ? i.keepDefaultValues ? q(o) : {} : q(u), _.array.next({
792
+ values: { ...u }
792
793
  }), _.values.next({
793
- values: { ...o }
794
+ values: { ...u }
794
795
  });
795
796
  }
796
797
  g = {
@@ -800,11 +801,11 @@ function er(e = {}) {
800
801
  watch: /* @__PURE__ */ new Set(),
801
802
  watchAll: !1,
802
803
  focus: ""
803
- }, y.mount = !A.isValid || !!i.keepIsValid || !!i.keepDirtyValues, y.watch = !!e.shouldUnregister, _.state.next({
804
+ }, y.mount = !F.isValid || !!i.keepIsValid || !!i.keepDirtyValues, y.watch = !!e.shouldUnregister, _.state.next({
804
805
  submitCount: i.keepSubmitCount ? r.submitCount : 0,
805
- isDirty: c ? !1 : i.keepDirty ? r.isDirty : !!(i.keepDefaultValues && !se(t, u)),
806
+ isDirty: c ? !1 : i.keepDirty ? r.isDirty : !!(i.keepDefaultValues && !se(t, o)),
806
807
  isSubmitted: i.keepIsSubmitted ? r.isSubmitted : !1,
807
- dirtyFields: c ? {} : i.keepDirtyValues ? i.keepDefaultValues && a ? ve(u, a) : r.dirtyFields : i.keepDefaultValues && t ? ve(u, t) : i.keepDirty ? r.dirtyFields : {},
808
+ dirtyFields: c ? {} : i.keepDirtyValues ? i.keepDefaultValues && a ? _e(o, a) : r.dirtyFields : i.keepDefaultValues && t ? _e(o, t) : i.keepDirty ? r.dirtyFields : {},
808
809
  touchedFields: i.keepTouched ? r.touchedFields : {},
809
810
  errors: i.keepErrors ? r.errors : {},
810
811
  isSubmitSuccessful: i.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
@@ -813,19 +814,19 @@ function er(e = {}) {
813
814
  }, ze = (t, i) => He(re(t) ? t(a) : t, i);
814
815
  return {
815
816
  control: {
816
- register: pe,
817
+ register: ke,
817
818
  unregister: we,
818
819
  getFieldState: Ue,
819
820
  handleSubmit: We,
820
821
  setError: Ie,
821
- _executeSchema: X,
822
+ _executeSchema: Q,
822
823
  _getWatch: b,
823
824
  _getDirty: v,
824
- _updateValid: B,
825
+ _updateValid: K,
825
826
  _removeUnmounted: ae,
826
827
  _updateFieldArray: m,
827
- _updateDisabledField: qe,
828
- _getFieldArray: w,
828
+ _updateDisabledField: Pe,
829
+ _getFieldArray: p,
829
830
  _reset: He,
830
831
  _resetDefaultValues: () => re(s.defaultValues) && s.defaultValues().then((t) => {
831
832
  ze(t, s.resetOptions), _.state.next({
@@ -838,10 +839,10 @@ function er(e = {}) {
838
839
  ...t
839
840
  };
840
841
  },
841
- _disableForm: gt,
842
+ _disableForm: ht,
842
843
  _subjects: _,
843
- _proxyFormState: A,
844
- _setErrors: O,
844
+ _proxyFormState: F,
845
+ _setErrors: B,
845
846
  get _fields() {
846
847
  return n;
847
848
  },
@@ -855,7 +856,7 @@ function er(e = {}) {
855
856
  y = t;
856
857
  },
857
858
  get _defaultValues() {
858
- return u;
859
+ return o;
859
860
  },
860
861
  get _names() {
861
862
  return g;
@@ -880,14 +881,14 @@ function er(e = {}) {
880
881
  }
881
882
  },
882
883
  trigger: de,
883
- register: pe,
884
+ register: ke,
884
885
  handleSubmit: We,
885
- watch: ht,
886
- setValue: q,
886
+ watch: yt,
887
+ setValue: P,
887
888
  getValues: Ne,
888
889
  reset: ze,
889
- resetField: vt,
890
- clearErrors: yt,
890
+ resetField: gt,
891
+ clearErrors: dt,
891
892
  unregister: we,
892
893
  setError: Ie,
893
894
  setFocus: (t, i = {}) => {
@@ -901,7 +902,7 @@ function er(e = {}) {
901
902
  };
902
903
  }
903
904
  function tr(e = {}) {
904
- const s = W.useRef(), r = W.useRef(), [n, u] = W.useState({
905
+ const s = W.useRef(), r = W.useRef(), [n, o] = W.useState({
905
906
  isDirty: !1,
906
907
  isValidating: !1,
907
908
  isLoading: re(e.defaultValues),
@@ -925,7 +926,7 @@ function tr(e = {}) {
925
926
  return a._options = e, Wt({
926
927
  subject: a._subjects.state,
927
928
  next: (y) => {
928
- Pt(y, a._proxyFormState, a._updateFormState) && u({ ...a._formState });
929
+ qt(y, a._proxyFormState, a._updateFormState) && o({ ...a._formState });
929
930
  }
930
931
  }), W.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), W.useEffect(() => {
931
932
  if (a._proxyFormState.isDirty) {
@@ -935,7 +936,7 @@ function tr(e = {}) {
935
936
  });
936
937
  }
937
938
  }, [a, n.isDirty]), W.useEffect(() => {
938
- e.values && !se(e.values, r.current) ? (a._reset(e.values, a._options.resetOptions), r.current = e.values, u((y) => ({ ...y }))) : a._resetDefaultValues();
939
+ e.values && !se(e.values, r.current) ? (a._reset(e.values, a._options.resetOptions), r.current = e.values, o((y) => ({ ...y }))) : a._resetDefaultValues();
939
940
  }, [e.values, a]), W.useEffect(() => {
940
941
  e.errors && a._setErrors(e.errors);
941
942
  }, [e.errors, a]), W.useEffect(() => {
@@ -944,76 +945,73 @@ function tr(e = {}) {
944
945
  e.shouldUnregister && a._subjects.values.next({
945
946
  values: a._getWatch()
946
947
  });
947
- }, [e.shouldUnregister, a]), s.current.formState = qt(n, a), s.current;
948
+ }, [e.shouldUnregister, a]), s.current.formState = Pt(n, a), s.current;
948
949
  }
949
- const it = принимаю условия Политики обработки
950
- и защиты персональных данных, даю согласия на обработку персональных
951
- данных`, _r = ({
950
+ const rr = принимаю условия Политики обработки и защиты персональных данных, даю согласия на обработку персональных данных", mr = ({
952
951
  isFormOpen: e,
953
952
  setIsFormOpen: s,
954
953
  title: r,
955
954
  isEmail: n,
956
- isPhone: u,
955
+ isPhone: o,
957
956
  isTextArea: a,
958
957
  isRequiredPhone: y = !0,
959
958
  isRequiredEmail: g = !1,
960
959
  isRequiredPhoneOrEmail: R,
961
960
  textAreaPlaceholder: I,
962
- subTitle: A,
961
+ subTitle: F,
963
962
  submitHandler: _,
964
963
  modalWidth: ie = "442px",
965
964
  rowsTextArea: j = 2,
966
- personalCheckBox: C = { text: it, isRequired: !0 },
967
- advCheckBox: J = { text: it, isRequired: !0 }
965
+ advCheckBox: D = { text: rr, isRequired: !0 }
968
966
  }) => {
969
967
  const {
970
- register: B,
968
+ register: H,
971
969
  handleSubmit: K,
972
- trigger: m,
973
- reset: H,
974
- watch: O,
975
- formState: { errors: V }
976
- } = tr(), Q = !!O("email"), { onChange: le, onBlur: X, ...Z } = B("phone", {
977
- required: y || R ? !Q : !0,
978
- pattern: { value: wt, message: "" },
979
- onBlur: () => m("phone")
980
- }), { isMobile: L, currentClientWidth: ae } = St(), v = O("personalCheckBox"), b = O("advCheckBox"), w = (E) => {
981
- _(E), H();
970
+ trigger: G,
971
+ reset: m,
972
+ watch: N,
973
+ formState: { errors: B }
974
+ } = tr(), A = !!N("email"), { onChange: Z, onBlur: le, ...Q } = H("phone", {
975
+ required: y || R ? !A : !0,
976
+ pattern: { value: At, message: "" },
977
+ onBlur: () => G("phone")
978
+ }), { isMobile: ee, currentClientWidth: L } = Dt(), ae = N("personalCheckBox"), v = N("advCheckBox"), b = (p) => {
979
+ _(p), m();
982
980
  };
983
- return ae ? /* @__PURE__ */ U(
984
- Vt,
981
+ return L ? /* @__PURE__ */ M(
982
+ xt,
985
983
  {
986
984
  isOpen: e,
987
985
  emitIsOpen: () => s(!1),
988
- additionalClass: ee.modal,
986
+ additionalClass: X.modal,
989
987
  opacity: 0.7,
990
988
  isTransparentBack: !0,
991
- additionalClassModalBody: ee.modalBody,
992
- children: /* @__PURE__ */ Se(
989
+ additionalClassModalBody: X.modalBody,
990
+ children: /* @__PURE__ */ ve(
993
991
  "div",
994
992
  {
995
- className: ee.root,
996
- style: { width: L ? "100%" : ie },
993
+ className: X.root,
994
+ style: { width: ee ? "100%" : ie },
997
995
  children: [
998
- /* @__PURE__ */ U(
996
+ /* @__PURE__ */ M(
999
997
  "div",
1000
998
  {
1001
- className: ee.title,
999
+ className: X.title,
1002
1000
  dangerouslySetInnerHTML: { __html: r ?? "Оставить обращение" }
1003
1001
  }
1004
1002
  ),
1005
- /* @__PURE__ */ U(
1003
+ /* @__PURE__ */ M(
1006
1004
  "div",
1007
1005
  {
1008
- className: ee.description,
1006
+ className: X.description,
1009
1007
  dangerouslySetInnerHTML: {
1010
- __html: A ?? "Оставьте номер телефона для получения консультации"
1008
+ __html: F ?? "Оставьте номер телефона для получения консультации"
1011
1009
  }
1012
1010
  }
1013
1011
  ),
1014
- /* @__PURE__ */ Se("form", { onSubmit: K(w), children: [
1015
- /* @__PURE__ */ Se(Ft, { className: ee.inputWrapper, children: [
1016
- /* @__PURE__ */ U(
1012
+ /* @__PURE__ */ ve("form", { onSubmit: K(b), children: [
1013
+ /* @__PURE__ */ ve(Vt, { className: X.inputWrapper, children: [
1014
+ /* @__PURE__ */ M(
1017
1015
  Ee,
1018
1016
  {
1019
1017
  width: "full",
@@ -1021,20 +1019,20 @@ const it = `Я принимаю условия Политики обработк
1021
1019
  variant: "light",
1022
1020
  placeholder: "Введите имя",
1023
1021
  "data-testid": "modal_name",
1024
- ...B("name", { required: !0, pattern: pt }),
1025
- error: !!V.name
1022
+ ...H("name", { required: !0, pattern: pt }),
1023
+ error: !!B.name
1026
1024
  }
1027
1025
  ),
1028
- u && /* @__PURE__ */ U(
1029
- xt,
1026
+ o && /* @__PURE__ */ M(
1027
+ bt,
1030
1028
  {
1031
1029
  inputMode: "numeric",
1032
1030
  name: "phone",
1033
1031
  mask: "+7 (999) 999-99-99",
1034
- onChange: le,
1032
+ onChange: Z,
1035
1033
  placeholder: "+7 (- - -) - - - - - - -",
1036
- onBlur: X,
1037
- children: /* @__PURE__ */ U(
1034
+ onBlur: le,
1035
+ children: /* @__PURE__ */ M(
1038
1036
  Ee,
1039
1037
  {
1040
1038
  width: "full",
@@ -1042,14 +1040,14 @@ const it = `Я принимаю условия Политики обработк
1042
1040
  type: "tel",
1043
1041
  size_s: "small",
1044
1042
  variant: "light",
1045
- ...Z,
1046
- ...B("phone"),
1047
- error: !!V.phone
1043
+ ...Q,
1044
+ ...H("phone"),
1045
+ error: !!B.phone
1048
1046
  }
1049
1047
  )
1050
1048
  }
1051
1049
  ),
1052
- n && /* @__PURE__ */ U(
1050
+ n && /* @__PURE__ */ M(
1053
1051
  Ee,
1054
1052
  {
1055
1053
  width: "full",
@@ -1057,44 +1055,48 @@ const it = `Я принимаю условия Политики обработк
1057
1055
  variant: "light",
1058
1056
  placeholder: "Введите email",
1059
1057
  "data-testid": "modal_email",
1060
- ...B("email", {
1061
- required: g || R ? Q : !1,
1062
- pattern: Dt
1058
+ ...H("email", {
1059
+ required: g || R ? A : !1,
1060
+ pattern: wt
1063
1061
  }),
1064
- error: !!V.email
1062
+ error: !!B.email
1065
1063
  }
1066
1064
  ),
1067
- a && /* @__PURE__ */ U(
1065
+ a && /* @__PURE__ */ M(
1068
1066
  kt,
1069
1067
  {
1070
1068
  "data-testid": "modal_textarea",
1071
1069
  placeholder: I,
1072
1070
  rows: j,
1073
1071
  width: "full",
1074
- ...B("textarea")
1072
+ ...H("textarea")
1075
1073
  }
1076
1074
  ),
1077
- J && /* @__PURE__ */ U(
1075
+ D && /* @__PURE__ */ M(
1078
1076
  Ge,
1079
1077
  {
1080
1078
  "data-testid": "modal_advCheckBox",
1081
- isChecked: b,
1082
- error: !!V.advCheckBox,
1083
- text: J.text,
1084
- ...B("advCheckBox", { required: J == null ? void 0 : J.isRequired })
1079
+ isChecked: v,
1080
+ error: !!B.advCheckBox,
1081
+ text: D.text,
1082
+ ...H("advCheckBox", { required: D == null ? void 0 : D.isRequired })
1085
1083
  }
1086
1084
  ),
1087
- /* @__PURE__ */ U(
1085
+ /* @__PURE__ */ M(
1088
1086
  Ge,
1089
1087
  {
1090
1088
  "data-testid": "modal_personalCheckBox",
1091
- isChecked: v,
1092
- error: !!V.personalCheckBox,
1093
- text: C.text,
1094
- ...B("personalCheckBox", { required: C.isRequired })
1089
+ isChecked: ae,
1090
+ error: !!B.personalCheckBox,
1091
+ ...H("personalCheckBox", { required: !0 }),
1092
+ children: /* @__PURE__ */ ve("div", { children: [
1093
+ "Я принимаю условия ",
1094
+ /* @__PURE__ */ M("a", { className: X.linkPolicy, href: "/documents/docs", children: "Политики обработки и защиты персональных данных" }),
1095
+ ", даю согласия на обработку персональных данных"
1096
+ ] })
1095
1097
  }
1096
1098
  ),
1097
- /* @__PURE__ */ U(
1099
+ /* @__PURE__ */ M(
1098
1100
  Ke,
1099
1101
  {
1100
1102
  "data-testid": "modal_submit",
@@ -1103,22 +1105,22 @@ const it = `Я принимаю условия Политики обработк
1103
1105
  type: "submit",
1104
1106
  size: "large",
1105
1107
  as: "button",
1106
- additionalClass: ee.modalBtn,
1108
+ additionalClass: X.modalBtn,
1107
1109
  children: "Отправить"
1108
1110
  }
1109
1111
  )
1110
1112
  ] }),
1111
- /* @__PURE__ */ U(
1113
+ /* @__PURE__ */ M(
1112
1114
  Ke,
1113
1115
  {
1114
- additionalClass: ee.btn,
1116
+ additionalClass: X.btn,
1115
1117
  onClick: () => s(!1),
1116
1118
  as: "button",
1117
1119
  variant: "gray",
1118
1120
  type: "button",
1119
1121
  size: "small",
1120
- children: /* @__PURE__ */ U(
1121
- At,
1122
+ children: /* @__PURE__ */ M(
1123
+ Ft,
1122
1124
  {
1123
1125
  name: "close",
1124
1126
  size: "16",
@@ -1135,5 +1137,5 @@ const it = `Я принимаю условия Политики обработк
1135
1137
  ) : null;
1136
1138
  };
1137
1139
  export {
1138
- _r as ModalForm
1140
+ mr as ModalForm
1139
1141
  };