stone-kit 0.0.423 → 0.0.426

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,44 +1,44 @@
1
1
  import { jsx as D, jsxs as ee } 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";
2
+ import { I as xr } from "../../../index-BaVdWc7x.js";
3
+ import { M as Vr } from "../../../Modal-DbD1tgiF.js";
4
+ import { Flex as Fr } from "../../Flex/ui/Flex.js";
5
5
  import { Input as Ee } from "../../Input/ui/Input.js";
6
6
  import $ from "react";
7
7
  import { Button as Ke } from "../../Button/ui/Button.js";
8
8
  import { NewIcon as Ge } from "../../NewIcon/ui/NewIcon.js";
9
- import { phoneReg as At, nameReg as pt, emailReg as kt } from "../utils/reg.js";
9
+ import { phoneReg as pr, nameReg as Ar, emailReg as kr } from "../utils/reg.js";
10
10
  import { CheckBox as Je } from "../../CheckBox/CheckBox.js";
11
- import { TextArea as wt } from "../../TextArea/TextArea.js";
12
- import { useClientWidth as Dt } from "../../../shared/useClientWidth.js";
13
- const St = "_btn_7n08v_1", Et = "_modal_7n08v_9", Ct = "_modalBody_7n08v_16", Bt = "_root_7n08v_21", Tt = "_title_7n08v_34", Lt = "_description_7n08v_41", Mt = "_inputWrapper_7n08v_48", Rt = "_linkPolicy_7n08v_55", Ot = "_telegramLink_7n08v_60", Nt = "_telegramWrapper_7n08v_65", Ut = "_telegram_7n08v_60", It = "_orText_7n08v_88", U = {
14
- btn: St,
15
- modal: Et,
16
- modalBody: Ct,
17
- root: Bt,
18
- title: Tt,
19
- description: Lt,
20
- inputWrapper: Mt,
21
- linkPolicy: Rt,
22
- telegramLink: Ot,
23
- telegramWrapper: Nt,
24
- telegram: Ut,
25
- orText: It
11
+ import { TextArea as wr } from "../../TextArea/TextArea.js";
12
+ import { useClientWidth as Dr } from "../../../shared/useClientWidth.js";
13
+ const Sr = "_btn_7n08v_1", Er = "_modal_7n08v_9", Tr = "_modalBody_7n08v_16", Br = "_root_7n08v_21", Cr = "_title_7n08v_34", Lr = "_description_7n08v_41", Rr = "_inputWrapper_7n08v_48", Mr = "_linkPolicy_7n08v_55", Or = "_telegramLink_7n08v_60", Nr = "_telegramWrapper_7n08v_65", Ur = "_telegram_7n08v_60", Ir = "_orText_7n08v_88", U = {
14
+ btn: Sr,
15
+ modal: Er,
16
+ modalBody: Tr,
17
+ root: Br,
18
+ title: Cr,
19
+ description: Lr,
20
+ inputWrapper: Rr,
21
+ linkPolicy: Mr,
22
+ telegramLink: Or,
23
+ telegramWrapper: Nr,
24
+ telegram: Ur,
25
+ orText: Ir
26
26
  };
27
27
  var ve = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, M = (e) => e == null;
28
- const lt = (e) => typeof e == "object";
29
- var E = (e) => !M(e) && !Array.isArray(e) && lt(e) && !ue(e), Pt = (e) => E(e) && e.target ? ve(e.target) ? e.target.checked : e.target.value : e, Wt = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, qt = (e, s) => e.has(Wt(s)), Ht = (e) => {
28
+ const lr = (e) => typeof e == "object";
29
+ var E = (e) => !M(e) && !Array.isArray(e) && lr(e) && !ue(e), Pr = (e) => E(e) && e.target ? ve(e.target) ? e.target.checked : e.target.value : e, Wr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, qr = (e, s) => e.has(Wr(s)), Hr = (e) => {
30
30
  const s = e.constructor && e.constructor.prototype;
31
31
  return E(s) && s.hasOwnProperty("isPrototypeOf");
32
32
  }, Le = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
33
33
  function z(e) {
34
34
  let s;
35
- const r = Array.isArray(e);
35
+ const t = Array.isArray(e);
36
36
  if (e instanceof Date)
37
37
  s = new Date(e);
38
38
  else if (e instanceof Set)
39
39
  s = new Set(e);
40
- else if (!(Le && (e instanceof Blob || e instanceof FileList)) && (r || E(e)))
41
- if (s = r ? [] : {}, !r && !Ht(e))
40
+ else if (!(Le && (e instanceof Blob || e instanceof FileList)) && (t || E(e)))
41
+ if (s = t ? [] : {}, !t && !Hr(e))
42
42
  s = e;
43
43
  else
44
44
  for (const n in e)
@@ -47,24 +47,24 @@ function z(e) {
47
47
  return e;
48
48
  return s;
49
49
  }
50
- var pe = (e) => Array.isArray(e) ? e.filter(Boolean) : [], k = (e) => e === void 0, f = (e, s, r) => {
50
+ var Ae = (e) => Array.isArray(e) ? e.filter(Boolean) : [], k = (e) => e === void 0, f = (e, s, t) => {
51
51
  if (!s || !E(e))
52
- return r;
53
- const n = pe(s.split(/[,[\].]+?/)).reduce((o, a) => M(o) ? o : o[a], e);
54
- return k(n) || n === e ? k(e[s]) ? r : e[s] : n;
55
- }, te = (e) => typeof e == "boolean", Me = (e) => /^\w*$/.test(e), at = (e) => pe(e.replace(/["|']|\]/g, "").split(/\.|\[/)), V = (e, s, r) => {
52
+ return t;
53
+ const n = Ae(s.split(/[,[\].]+?/)).reduce((o, a) => M(o) ? o : o[a], e);
54
+ return k(n) || n === e ? k(e[s]) ? t : e[s] : n;
55
+ }, re = (e) => typeof e == "boolean", Re = (e) => /^\w*$/.test(e), ar = (e) => Ae(e.replace(/["|']|\]/g, "").split(/\.|\[/)), V = (e, s, t) => {
56
56
  let n = -1;
57
- const o = Me(s) ? [s] : at(s), a = o.length, y = a - 1;
57
+ const o = Re(s) ? [s] : ar(s), a = o.length, y = a - 1;
58
58
  for (; ++n < a; ) {
59
59
  const g = o[n];
60
- let R = r;
60
+ let O = t;
61
61
  if (n !== y) {
62
62
  const P = e[g];
63
- R = E(P) || Array.isArray(P) ? P : isNaN(+o[n + 1]) ? {} : [];
63
+ O = E(P) || Array.isArray(P) ? P : isNaN(+o[n + 1]) ? {} : [];
64
64
  }
65
65
  if (g === "__proto__")
66
66
  return;
67
- e[g] = R, e = e[g];
67
+ e[g] = O, e = e[g];
68
68
  }
69
69
  return e;
70
70
  };
@@ -88,7 +88,7 @@ const Qe = {
88
88
  validate: "validate"
89
89
  };
90
90
  $.createContext(null);
91
- var zt = (e, s, r, n = !0) => {
91
+ var zr = (e, s, t, n = !0) => {
92
92
  const o = {
93
93
  defaultValues: s._defaultValues
94
94
  };
@@ -100,26 +100,26 @@ var zt = (e, s, r, n = !0) => {
100
100
  }
101
101
  });
102
102
  return o;
103
- }, I = (e) => E(e) && !Object.keys(e).length, $t = (e, s, r, n) => {
104
- r(e);
103
+ }, I = (e) => E(e) && !Object.keys(e).length, $r = (e, s, t, n) => {
104
+ t(e);
105
105
  const { name: o, ...a } = e;
106
106
  return I(a) || Object.keys(a).length >= Object.keys(s).length || Object.keys(a).find((y) => s[y] === G.all);
107
107
  }, me = (e) => Array.isArray(e) ? e : [e];
108
- function jt(e) {
108
+ function jr(e) {
109
109
  const s = $.useRef(e);
110
110
  s.current = e, $.useEffect(() => {
111
- const r = !e.disabled && s.current.subject && s.current.subject.subscribe({
111
+ const t = !e.disabled && s.current.subject && s.current.subject.subscribe({
112
112
  next: s.current.next
113
113
  });
114
114
  return () => {
115
- r && r.unsubscribe();
115
+ t && t.unsubscribe();
116
116
  };
117
117
  }, [e.disabled]);
118
118
  }
119
- var Q = (e) => typeof e == "string", Kt = (e, s, r, n, o) => Q(e) ? (n && s.watch.add(e), f(r, e, o)) : Array.isArray(e) ? e.map((a) => (n && s.watch.add(a), f(r, a))) : (n && (s.watchAll = !0), r), Gt = (e, s, r, n, o) => s ? {
120
- ...r[e],
119
+ var Q = (e) => typeof e == "string", Kr = (e, s, t, n, o) => Q(e) ? (n && s.watch.add(e), f(t, e, o)) : Array.isArray(e) ? e.map((a) => (n && s.watch.add(a), f(t, a))) : (n && (s.watchAll = !0), t), Gr = (e, s, t, n, o) => s ? {
120
+ ...t[e],
121
121
  types: {
122
- ...r[e] && r[e].types ? r[e].types : {},
122
+ ...t[e] && t[e].types ? t[e].types : {},
123
123
  [n]: o || !0
124
124
  }
125
125
  } : {}, Xe = (e) => ({
@@ -128,9 +128,9 @@ var Q = (e) => typeof e == "string", Kt = (e, s, r, n, o) => Q(e) ? (n && s.watc
128
128
  isOnChange: e === G.onChange,
129
129
  isOnAll: e === G.all,
130
130
  isOnTouch: e === G.onTouched
131
- }), Ye = (e, s, r) => !r && (s.watchAll || s.watch.has(e) || [...s.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
132
- const ge = (e, s, r, n) => {
133
- for (const o of r || Object.keys(e)) {
131
+ }), Ye = (e, s, t) => !t && (s.watchAll || s.watch.has(e) || [...s.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
132
+ const ge = (e, s, t, n) => {
133
+ for (const o of t || Object.keys(e)) {
134
134
  const a = f(e, o);
135
135
  if (a) {
136
136
  const { _f: y, ...g } = a;
@@ -145,10 +145,10 @@ const ge = (e, s, r, n) => {
145
145
  }
146
146
  }
147
147
  };
148
- var Jt = (e, s, r) => {
149
- const n = me(f(e, r));
150
- return V(n, "root", s[r]), V(e, r, n), e;
151
- }, Re = (e) => e.type === "file", re = (e) => typeof e == "function", xe = (e) => {
148
+ var Jr = (e, s, t) => {
149
+ const n = me(f(e, t));
150
+ return V(n, "root", s[t]), V(e, t, n), e;
151
+ }, Me = (e) => e.type === "file", te = (e) => typeof e == "function", xe = (e) => {
152
152
  if (!Le)
153
153
  return !1;
154
154
  const s = e ? e.ownerDocument : 0;
@@ -157,32 +157,32 @@ var Jt = (e, s, r) => {
157
157
  const Ze = {
158
158
  value: !1,
159
159
  isValid: !1
160
- }, et = { value: !0, isValid: !0 };
161
- var nt = (e) => {
160
+ }, er = { value: !0, isValid: !0 };
161
+ var nr = (e) => {
162
162
  if (Array.isArray(e)) {
163
163
  if (e.length > 1) {
164
- const s = e.filter((r) => r && r.checked && !r.disabled).map((r) => r.value);
164
+ const s = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
165
165
  return { value: s, isValid: !!s.length };
166
166
  }
167
167
  return e[0].checked && !e[0].disabled ? (
168
168
  // @ts-expect-error expected to work in the browser
169
- e[0].attributes && !k(e[0].attributes.value) ? k(e[0].value) || e[0].value === "" ? et : { value: e[0].value, isValid: !0 } : et
169
+ e[0].attributes && !k(e[0].attributes.value) ? k(e[0].value) || e[0].value === "" ? er : { value: e[0].value, isValid: !0 } : er
170
170
  ) : Ze;
171
171
  }
172
172
  return Ze;
173
173
  };
174
- const tt = {
174
+ const rr = {
175
175
  isValid: !1,
176
176
  value: null
177
177
  };
178
- var ot = (e) => Array.isArray(e) ? e.reduce((s, r) => r && r.checked && !r.disabled ? {
178
+ var or = (e) => Array.isArray(e) ? e.reduce((s, t) => t && t.checked && !t.disabled ? {
179
179
  isValid: !0,
180
- value: r.value
181
- } : s, tt) : tt;
182
- function rt(e, s, r = "validate") {
183
- if (be(e) || Array.isArray(e) && e.every(be) || te(e) && !e)
180
+ value: t.value
181
+ } : s, rr) : rr;
182
+ function tr(e, s, t = "validate") {
183
+ if (be(e) || Array.isArray(e) && e.every(be) || re(e) && !e)
184
184
  return {
185
- type: r,
185
+ type: t,
186
186
  message: be(e) ? e : "",
187
187
  ref: s
188
188
  };
@@ -190,105 +190,105 @@ function rt(e, s, r = "validate") {
190
190
  var oe = (e) => E(e) && !Ve(e) ? e : {
191
191
  value: e,
192
192
  message: ""
193
- }, st = async (e, s, r, n, o) => {
194
- const { ref: a, refs: y, required: g, maxLength: R, minLength: P, min: F, max: _, pattern: le, validate: J, name: T, valueAsNumber: ce, mount: O, disabled: B } = e._f, m = f(s, T);
195
- if (!O || B)
193
+ }, sr = async (e, s, t, n, o) => {
194
+ const { ref: a, refs: y, required: g, maxLength: O, minLength: P, min: F, max: _, pattern: le, validate: J, name: R, valueAsNumber: ce, mount: B, disabled: L } = e._f, m = f(s, R);
195
+ if (!B || L)
196
196
  return {};
197
197
  const j = y ? y[0] : a, K = (v) => {
198
- n && j.reportValidity && (j.setCustomValidity(te(v) ? "" : v || ""), j.reportValidity());
199
- }, A = {}, L = Oe(a), se = ve(a), X = L || se, Z = (ce || Re(a)) && k(a.value) && k(m) || xe(a) && a.value === "" || m === "" || Array.isArray(m) && !m.length, N = Gt.bind(null, T, r, A), ae = (v, b, p, C = Y.maxLength, W = Y.minLength) => {
200
- const H = v ? b : p;
201
- A[T] = {
202
- type: v ? C : W,
198
+ n && j.reportValidity && (j.setCustomValidity(re(v) ? "" : v || ""), j.reportValidity());
199
+ }, p = {}, C = Oe(a), se = ve(a), X = C || se, Z = (ce || Me(a)) && k(a.value) && k(m) || xe(a) && a.value === "" || m === "" || Array.isArray(m) && !m.length, N = Gr.bind(null, R, t, p), ae = (v, b, A, T = Y.maxLength, W = Y.minLength) => {
200
+ const H = v ? b : A;
201
+ p[R] = {
202
+ type: v ? T : W,
203
203
  message: H,
204
204
  ref: a,
205
- ...N(v ? C : W, H)
205
+ ...N(v ? T : W, H)
206
206
  };
207
207
  };
208
- if (o ? !Array.isArray(m) || !m.length : g && (!X && (Z || M(m)) || te(m) && !m || se && !nt(y).isValid || L && !ot(y).isValid)) {
208
+ if (o ? !Array.isArray(m) || !m.length : g && (!X && (Z || M(m)) || re(m) && !m || se && !nr(y).isValid || C && !or(y).isValid)) {
209
209
  const { value: v, message: b } = be(g) ? { value: !!g, message: g } : oe(g);
210
- if (v && (A[T] = {
210
+ if (v && (p[R] = {
211
211
  type: Y.required,
212
212
  message: b,
213
213
  ref: j,
214
214
  ...N(Y.required, b)
215
- }, !r))
216
- return K(b), A;
215
+ }, !t))
216
+ return K(b), p;
217
217
  }
218
218
  if (!Z && (!M(F) || !M(_))) {
219
219
  let v, b;
220
- const p = oe(_), C = oe(F);
220
+ const A = oe(_), T = oe(F);
221
221
  if (!M(m) && !isNaN(m)) {
222
222
  const W = a.valueAsNumber || m && +m;
223
- M(p.value) || (v = W > p.value), M(C.value) || (b = W < C.value);
223
+ M(A.value) || (v = W > A.value), M(T.value) || (b = W < T.value);
224
224
  } else {
225
225
  const W = a.valueAsDate || new Date(m), H = (ye) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ye), de = a.type == "time", fe = a.type == "week";
226
- Q(p.value) && m && (v = de ? H(m) > H(p.value) : fe ? m > p.value : W > new Date(p.value)), Q(C.value) && m && (b = de ? H(m) < H(C.value) : fe ? m < C.value : W < new Date(C.value));
226
+ Q(A.value) && m && (v = de ? H(m) > H(A.value) : fe ? m > A.value : W > new Date(A.value)), Q(T.value) && m && (b = de ? H(m) < H(T.value) : fe ? m < T.value : W < new Date(T.value));
227
227
  }
228
- if ((v || b) && (ae(!!v, p.message, C.message, Y.max, Y.min), !r))
229
- return K(A[T].message), A;
228
+ if ((v || b) && (ae(!!v, A.message, T.message, Y.max, Y.min), !t))
229
+ return K(p[R].message), p;
230
230
  }
231
- if ((R || P) && !Z && (Q(m) || o && Array.isArray(m))) {
232
- const v = oe(R), b = oe(P), p = !M(v.value) && m.length > +v.value, C = !M(b.value) && m.length < +b.value;
233
- if ((p || C) && (ae(p, v.message, b.message), !r))
234
- return K(A[T].message), A;
231
+ if ((O || P) && !Z && (Q(m) || o && Array.isArray(m))) {
232
+ const v = oe(O), b = oe(P), A = !M(v.value) && m.length > +v.value, T = !M(b.value) && m.length < +b.value;
233
+ if ((A || T) && (ae(A, v.message, b.message), !t))
234
+ return K(p[R].message), p;
235
235
  }
236
236
  if (le && !Z && Q(m)) {
237
237
  const { value: v, message: b } = oe(le);
238
- if (Ve(v) && !m.match(v) && (A[T] = {
238
+ if (Ve(v) && !m.match(v) && (p[R] = {
239
239
  type: Y.pattern,
240
240
  message: b,
241
241
  ref: a,
242
242
  ...N(Y.pattern, b)
243
- }, !r))
244
- return K(b), A;
243
+ }, !t))
244
+ return K(b), p;
245
245
  }
246
246
  if (J) {
247
- if (re(J)) {
248
- const v = await J(m, s), b = rt(v, j);
249
- if (b && (A[T] = {
247
+ if (te(J)) {
248
+ const v = await J(m, s), b = tr(v, j);
249
+ if (b && (p[R] = {
250
250
  ...b,
251
251
  ...N(Y.validate, b.message)
252
- }, !r))
253
- return K(b.message), A;
252
+ }, !t))
253
+ return K(b.message), p;
254
254
  } else if (E(J)) {
255
255
  let v = {};
256
256
  for (const b in J) {
257
- if (!I(v) && !r)
257
+ if (!I(v) && !t)
258
258
  break;
259
- const p = rt(await J[b](m, s), j, b);
260
- p && (v = {
261
- ...p,
262
- ...N(b, p.message)
263
- }, K(p.message), r && (A[T] = v));
259
+ const A = tr(await J[b](m, s), j, b);
260
+ A && (v = {
261
+ ...A,
262
+ ...N(b, A.message)
263
+ }, K(A.message), t && (p[R] = v));
264
264
  }
265
- if (!I(v) && (A[T] = {
265
+ if (!I(v) && (p[R] = {
266
266
  ref: j,
267
267
  ...v
268
- }, !r))
269
- return A;
268
+ }, !t))
269
+ return p;
270
270
  }
271
271
  }
272
- return K(!0), A;
272
+ return K(!0), p;
273
273
  };
274
- function Qt(e, s) {
275
- const r = s.slice(0, -1).length;
274
+ function Qr(e, s) {
275
+ const t = s.slice(0, -1).length;
276
276
  let n = 0;
277
- for (; n < r; )
277
+ for (; n < t; )
278
278
  e = k(e) ? n++ : e[s[n++]];
279
279
  return e;
280
280
  }
281
- function Xt(e) {
281
+ function Xr(e) {
282
282
  for (const s in e)
283
283
  if (e.hasOwnProperty(s) && !k(e[s]))
284
284
  return !1;
285
285
  return !0;
286
286
  }
287
287
  function S(e, s) {
288
- const r = Array.isArray(s) ? s : Me(s) ? [s] : at(s), n = r.length === 1 ? e : Qt(e, r), o = r.length - 1, a = r[o];
289
- return n && delete n[a], o !== 0 && (E(n) && I(n) || Array.isArray(n) && Xt(n)) && S(e, r.slice(0, -1)), e;
288
+ const t = Array.isArray(s) ? s : Re(s) ? [s] : ar(s), n = t.length === 1 ? e : Qr(e, t), o = t.length - 1, a = t[o];
289
+ return n && delete n[a], o !== 0 && (E(n) && I(n) || Array.isArray(n) && Xr(n)) && S(e, t.slice(0, -1)), e;
290
290
  }
291
- var Ce = () => {
291
+ var Te = () => {
292
292
  let e = [];
293
293
  return {
294
294
  get observers() {
@@ -307,16 +307,16 @@ var Ce = () => {
307
307
  e = [];
308
308
  }
309
309
  };
310
- }, Fe = (e) => M(e) || !lt(e);
310
+ }, Fe = (e) => M(e) || !lr(e);
311
311
  function ie(e, s) {
312
312
  if (Fe(e) || Fe(s))
313
313
  return e === s;
314
314
  if (ue(e) && ue(s))
315
315
  return e.getTime() === s.getTime();
316
- const r = Object.keys(e), n = Object.keys(s);
317
- if (r.length !== n.length)
316
+ const t = Object.keys(e), n = Object.keys(s);
317
+ if (t.length !== n.length)
318
318
  return !1;
319
- for (const o of r) {
319
+ for (const o of t) {
320
320
  const a = e[o];
321
321
  if (!n.includes(o))
322
322
  return !1;
@@ -328,57 +328,57 @@ function ie(e, s) {
328
328
  }
329
329
  return !0;
330
330
  }
331
- var ut = (e) => e.type === "select-multiple", Yt = (e) => Oe(e) || ve(e), Be = (e) => xe(e) && e.isConnected, ct = (e) => {
331
+ var ur = (e) => e.type === "select-multiple", Yr = (e) => Oe(e) || ve(e), Be = (e) => xe(e) && e.isConnected, cr = (e) => {
332
332
  for (const s in e)
333
- if (re(e[s]))
333
+ if (te(e[s]))
334
334
  return !0;
335
335
  return !1;
336
336
  };
337
- function Ae(e, s = {}) {
338
- const r = Array.isArray(e);
339
- if (E(e) || r)
337
+ function pe(e, s = {}) {
338
+ const t = Array.isArray(e);
339
+ if (E(e) || t)
340
340
  for (const n in e)
341
- Array.isArray(e[n]) || E(e[n]) && !ct(e[n]) ? (s[n] = Array.isArray(e[n]) ? [] : {}, Ae(e[n], s[n])) : M(e[n]) || (s[n] = !0);
341
+ Array.isArray(e[n]) || E(e[n]) && !cr(e[n]) ? (s[n] = Array.isArray(e[n]) ? [] : {}, pe(e[n], s[n])) : M(e[n]) || (s[n] = !0);
342
342
  return s;
343
343
  }
344
- function dt(e, s, r) {
344
+ function dr(e, s, t) {
345
345
  const n = Array.isArray(e);
346
346
  if (E(e) || n)
347
347
  for (const o in e)
348
- Array.isArray(e[o]) || E(e[o]) && !ct(e[o]) ? k(s) || Fe(r[o]) ? r[o] = Array.isArray(e[o]) ? Ae(e[o], []) : { ...Ae(e[o]) } : dt(e[o], M(s) ? {} : s[o], r[o]) : r[o] = !ie(e[o], s[o]);
349
- return r;
348
+ Array.isArray(e[o]) || E(e[o]) && !cr(e[o]) ? k(s) || Fe(t[o]) ? t[o] = Array.isArray(e[o]) ? pe(e[o], []) : { ...pe(e[o]) } : dr(e[o], M(s) ? {} : s[o], t[o]) : t[o] = !ie(e[o], s[o]);
349
+ return t;
350
350
  }
351
- var _e = (e, s) => dt(e, s, Ae(s)), ft = (e, { valueAsNumber: s, valueAsDate: r, setValueAs: n }) => k(e) ? e : s ? e === "" ? NaN : e && +e : r && Q(e) ? new Date(e) : n ? n(e) : e;
352
- function Te(e) {
351
+ var _e = (e, s) => dr(e, s, pe(s)), fr = (e, { valueAsNumber: s, valueAsDate: t, setValueAs: n }) => k(e) ? e : s ? e === "" ? NaN : e && +e : t && Q(e) ? new Date(e) : n ? n(e) : e;
352
+ function Ce(e) {
353
353
  const s = e.ref;
354
- if (!(e.refs ? e.refs.every((r) => r.disabled) : s.disabled))
355
- return Re(s) ? s.files : Oe(s) ? ot(e.refs).value : ut(s) ? [...s.selectedOptions].map(({ value: r }) => r) : ve(s) ? nt(e.refs).value : ft(k(s.value) ? e.ref.value : s.value, e);
354
+ if (!(e.refs ? e.refs.every((t) => t.disabled) : s.disabled))
355
+ return Me(s) ? s.files : Oe(s) ? or(e.refs).value : ur(s) ? [...s.selectedOptions].map(({ value: t }) => t) : ve(s) ? nr(e.refs).value : fr(k(s.value) ? e.ref.value : s.value, e);
356
356
  }
357
- var Zt = (e, s, r, n) => {
357
+ var Zr = (e, s, t, n) => {
358
358
  const o = {};
359
359
  for (const a of e) {
360
360
  const y = f(s, a);
361
361
  y && V(o, a, y._f);
362
362
  }
363
363
  return {
364
- criteriaMode: r,
364
+ criteriaMode: t,
365
365
  names: [...e],
366
366
  fields: o,
367
367
  shouldUseNativeValidation: n
368
368
  };
369
- }, he = (e) => k(e) ? e : Ve(e) ? e.source : E(e) ? Ve(e.value) ? e.value.source : e.value : e, er = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
370
- function it(e, s, r) {
371
- const n = f(e, r);
372
- if (n || Me(r))
369
+ }, he = (e) => k(e) ? e : Ve(e) ? e.source : E(e) ? Ve(e.value) ? e.value.source : e.value : e, et = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
370
+ function ir(e, s, t) {
371
+ const n = f(e, t);
372
+ if (n || Re(t))
373
373
  return {
374
374
  error: n,
375
- name: r
375
+ name: t
376
376
  };
377
- const o = r.split(".");
377
+ const o = t.split(".");
378
378
  for (; o.length; ) {
379
379
  const a = o.join("."), y = f(s, a), g = f(e, a);
380
- if (y && !Array.isArray(y) && r !== a)
381
- return { name: r };
380
+ if (y && !Array.isArray(y) && t !== a)
381
+ return { name: t };
382
382
  if (g && g.type)
383
383
  return {
384
384
  name: a,
@@ -387,23 +387,23 @@ function it(e, s, r) {
387
387
  o.pop();
388
388
  }
389
389
  return {
390
- name: r
390
+ name: t
391
391
  };
392
392
  }
393
- var tr = (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, rr = (e, s) => !pe(f(e, s)).length && S(e, s);
394
- const sr = {
393
+ var rt = (e, s, t, n, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(s || e) : (t ? n.isOnBlur : o.isOnBlur) ? !e : (t ? n.isOnChange : o.isOnChange) ? e : !0, tt = (e, s) => !Ae(f(e, s)).length && S(e, s);
394
+ const st = {
395
395
  mode: G.onSubmit,
396
396
  reValidateMode: G.onChange,
397
397
  shouldFocusError: !0
398
398
  };
399
- function ir(e = {}) {
399
+ function it(e = {}) {
400
400
  let s = {
401
- ...sr,
401
+ ...st,
402
402
  ...e
403
- }, r = {
403
+ }, t = {
404
404
  submitCount: 0,
405
405
  isDirty: !1,
406
- isLoading: re(s.defaultValues),
406
+ isLoading: te(s.defaultValues),
407
407
  isValidating: !1,
408
408
  isSubmitted: !1,
409
409
  isSubmitting: !1,
@@ -423,7 +423,7 @@ function ir(e = {}) {
423
423
  unMount: /* @__PURE__ */ new Set(),
424
424
  array: /* @__PURE__ */ new Set(),
425
425
  watch: /* @__PURE__ */ new Set()
426
- }, R, P = 0;
426
+ }, O, P = 0;
427
427
  const F = {
428
428
  isDirty: !1,
429
429
  dirtyFields: !1,
@@ -433,268 +433,268 @@ function ir(e = {}) {
433
433
  isValid: !1,
434
434
  errors: !1
435
435
  }, _ = {
436
- values: Ce(),
437
- array: Ce(),
438
- state: Ce()
439
- }, le = Xe(s.mode), J = Xe(s.reValidateMode), T = s.criteriaMode === G.all, ce = (t) => (i) => {
440
- clearTimeout(P), P = setTimeout(t, i);
441
- }, O = async (t) => {
442
- if (F.isValid || t) {
436
+ values: Te(),
437
+ array: Te(),
438
+ state: Te()
439
+ }, le = Xe(s.mode), J = Xe(s.reValidateMode), R = s.criteriaMode === G.all, ce = (r) => (i) => {
440
+ clearTimeout(P), P = setTimeout(r, i);
441
+ }, B = async (r) => {
442
+ if (F.isValid || r) {
443
443
  const i = s.resolver ? I((await X()).errors) : await N(n, !0);
444
- i !== r.isValid && _.state.next({
444
+ i !== t.isValid && _.state.next({
445
445
  isValid: i
446
446
  });
447
447
  }
448
- }, B = (t, i) => {
449
- (F.isValidating || F.validatingFields) && ((t || Array.from(g.mount)).forEach((l) => {
450
- l && (i ? V(r.validatingFields, l, i) : S(r.validatingFields, l));
448
+ }, L = (r, i) => {
449
+ (F.isValidating || F.validatingFields) && ((r || Array.from(g.mount)).forEach((l) => {
450
+ l && (i ? V(t.validatingFields, l, i) : S(t.validatingFields, l));
451
451
  }), _.state.next({
452
- validatingFields: r.validatingFields,
453
- isValidating: !I(r.validatingFields)
452
+ validatingFields: t.validatingFields,
453
+ isValidating: !I(t.validatingFields)
454
454
  }));
455
- }, m = (t, i = [], l, d, c = !0, u = !0) => {
455
+ }, m = (r, i = [], l, d, c = !0, u = !0) => {
456
456
  if (d && l) {
457
- if (y.action = !0, u && Array.isArray(f(n, t))) {
458
- const h = l(f(n, t), d.argA, d.argB);
459
- c && V(n, t, h);
457
+ if (y.action = !0, u && Array.isArray(f(n, r))) {
458
+ const h = l(f(n, r), d.argA, d.argB);
459
+ c && V(n, r, h);
460
460
  }
461
- if (u && Array.isArray(f(r.errors, t))) {
462
- const h = l(f(r.errors, t), d.argA, d.argB);
463
- c && V(r.errors, t, h), rr(r.errors, t);
461
+ if (u && Array.isArray(f(t.errors, r))) {
462
+ const h = l(f(t.errors, r), d.argA, d.argB);
463
+ c && V(t.errors, r, h), tt(t.errors, r);
464
464
  }
465
- if (F.touchedFields && u && Array.isArray(f(r.touchedFields, t))) {
466
- const h = l(f(r.touchedFields, t), d.argA, d.argB);
467
- c && V(r.touchedFields, t, h);
465
+ if (F.touchedFields && u && Array.isArray(f(t.touchedFields, r))) {
466
+ const h = l(f(t.touchedFields, r), d.argA, d.argB);
467
+ c && V(t.touchedFields, r, h);
468
468
  }
469
- F.dirtyFields && (r.dirtyFields = _e(o, a)), _.state.next({
470
- name: t,
471
- isDirty: v(t, i),
472
- dirtyFields: r.dirtyFields,
473
- errors: r.errors,
474
- isValid: r.isValid
469
+ F.dirtyFields && (t.dirtyFields = _e(o, a)), _.state.next({
470
+ name: r,
471
+ isDirty: v(r, i),
472
+ dirtyFields: t.dirtyFields,
473
+ errors: t.errors,
474
+ isValid: t.isValid
475
475
  });
476
476
  } else
477
- V(a, t, i);
478
- }, j = (t, i) => {
479
- V(r.errors, t, i), _.state.next({
480
- errors: r.errors
477
+ V(a, r, i);
478
+ }, j = (r, i) => {
479
+ V(t.errors, r, i), _.state.next({
480
+ errors: t.errors
481
481
  });
482
- }, K = (t) => {
483
- r.errors = t, _.state.next({
484
- errors: r.errors,
482
+ }, K = (r) => {
483
+ t.errors = r, _.state.next({
484
+ errors: t.errors,
485
485
  isValid: !1
486
486
  });
487
- }, A = (t, i, l, d) => {
488
- const c = f(n, t);
487
+ }, p = (r, i, l, d) => {
488
+ const c = f(n, r);
489
489
  if (c) {
490
- const u = f(a, t, k(l) ? f(o, t) : l);
491
- k(u) || d && d.defaultChecked || i ? V(a, t, i ? u : Te(c._f)) : C(t, u), y.mount && O();
490
+ const u = f(a, r, k(l) ? f(o, r) : l);
491
+ k(u) || d && d.defaultChecked || i ? V(a, r, i ? u : Ce(c._f)) : T(r, u), y.mount && B();
492
492
  }
493
- }, L = (t, i, l, d, c) => {
493
+ }, C = (r, i, l, d, c) => {
494
494
  let u = !1, h = !1;
495
495
  const x = {
496
- name: t
497
- }, w = !!(f(n, t) && f(n, t)._f && f(n, t)._f.disabled);
496
+ name: r
497
+ }, w = !!(f(n, r) && f(n, r)._f && f(n, r)._f.disabled);
498
498
  if (!l || d) {
499
- F.isDirty && (h = r.isDirty, r.isDirty = x.isDirty = v(), u = h !== x.isDirty);
500
- const q = w || ie(f(o, t), i);
501
- h = !!(!w && f(r.dirtyFields, t)), q || w ? S(r.dirtyFields, t) : V(r.dirtyFields, t, !0), x.dirtyFields = r.dirtyFields, u = u || F.dirtyFields && h !== !q;
499
+ F.isDirty && (h = t.isDirty, t.isDirty = x.isDirty = v(), u = h !== x.isDirty);
500
+ const q = w || ie(f(o, r), i);
501
+ h = !!(!w && f(t.dirtyFields, r)), q || w ? S(t.dirtyFields, r) : V(t.dirtyFields, r, !0), x.dirtyFields = t.dirtyFields, u = u || F.dirtyFields && h !== !q;
502
502
  }
503
503
  if (l) {
504
- const q = f(r.touchedFields, t);
505
- q || (V(r.touchedFields, t, l), x.touchedFields = r.touchedFields, u = u || F.touchedFields && q !== l);
504
+ const q = f(t.touchedFields, r);
505
+ q || (V(t.touchedFields, r, l), x.touchedFields = t.touchedFields, u = u || F.touchedFields && q !== l);
506
506
  }
507
507
  return u && c && _.state.next(x), u ? x : {};
508
- }, se = (t, i, l, d) => {
509
- const c = f(r.errors, t), u = F.isValid && te(i) && r.isValid !== i;
510
- if (e.delayError && l ? (R = ce(() => j(t, l)), R(e.delayError)) : (clearTimeout(P), R = null, l ? V(r.errors, t, l) : S(r.errors, t)), (l ? !ie(c, l) : c) || !I(d) || u) {
508
+ }, se = (r, i, l, d) => {
509
+ const c = f(t.errors, r), u = F.isValid && re(i) && t.isValid !== i;
510
+ if (e.delayError && l ? (O = ce(() => j(r, l)), O(e.delayError)) : (clearTimeout(P), O = null, l ? V(t.errors, r, l) : S(t.errors, r)), (l ? !ie(c, l) : c) || !I(d) || u) {
511
511
  const h = {
512
512
  ...d,
513
- ...u && te(i) ? { isValid: i } : {},
514
- errors: r.errors,
515
- name: t
513
+ ...u && re(i) ? { isValid: i } : {},
514
+ errors: t.errors,
515
+ name: r
516
516
  };
517
- r = {
518
- ...r,
517
+ t = {
518
+ ...t,
519
519
  ...h
520
520
  }, _.state.next(h);
521
521
  }
522
- }, X = async (t) => {
523
- B(t, !0);
524
- const i = await s.resolver(a, s.context, Zt(t || g.mount, n, s.criteriaMode, s.shouldUseNativeValidation));
525
- return B(t), i;
526
- }, Z = async (t) => {
527
- const { errors: i } = await X(t);
528
- if (t)
529
- for (const l of t) {
522
+ }, X = async (r) => {
523
+ L(r, !0);
524
+ const i = await s.resolver(a, s.context, Zr(r || g.mount, n, s.criteriaMode, s.shouldUseNativeValidation));
525
+ return L(r), i;
526
+ }, Z = async (r) => {
527
+ const { errors: i } = await X(r);
528
+ if (r)
529
+ for (const l of r) {
530
530
  const d = f(i, l);
531
- d ? V(r.errors, l, d) : S(r.errors, l);
531
+ d ? V(t.errors, l, d) : S(t.errors, l);
532
532
  }
533
533
  else
534
- r.errors = i;
534
+ t.errors = i;
535
535
  return i;
536
- }, N = async (t, i, l = {
536
+ }, N = async (r, i, l = {
537
537
  valid: !0
538
538
  }) => {
539
- for (const d in t) {
540
- const c = t[d];
539
+ for (const d in r) {
540
+ const c = r[d];
541
541
  if (c) {
542
542
  const { _f: u, ...h } = c;
543
543
  if (u) {
544
544
  const x = g.array.has(u.name);
545
- B([d], !0);
546
- const w = await st(c, a, T, s.shouldUseNativeValidation && !i, x);
547
- if (B([d]), w[u.name] && (l.valid = !1, i))
545
+ L([d], !0);
546
+ const w = await sr(c, a, R, s.shouldUseNativeValidation && !i, x);
547
+ if (L([d]), w[u.name] && (l.valid = !1, i))
548
548
  break;
549
- !i && (f(w, u.name) ? x ? Jt(r.errors, w, u.name) : V(r.errors, u.name, w[u.name]) : S(r.errors, u.name));
549
+ !i && (f(w, u.name) ? x ? Jr(t.errors, w, u.name) : V(t.errors, u.name, w[u.name]) : S(t.errors, u.name));
550
550
  }
551
551
  !I(h) && await N(h, i, l);
552
552
  }
553
553
  }
554
554
  return l.valid;
555
555
  }, ae = () => {
556
- for (const t of g.unMount) {
557
- const i = f(n, t);
558
- i && (i._f.refs ? i._f.refs.every((l) => !Be(l)) : !Be(i._f.ref)) && ke(t);
556
+ for (const r of g.unMount) {
557
+ const i = f(n, r);
558
+ i && (i._f.refs ? i._f.refs.every((l) => !Be(l)) : !Be(i._f.ref)) && ke(r);
559
559
  }
560
560
  g.unMount = /* @__PURE__ */ new Set();
561
- }, v = (t, i) => (t && i && V(a, t, i), !ie(Ne(), o)), b = (t, i, l) => Kt(t, g, {
562
- ...y.mount ? a : k(i) ? o : Q(t) ? { [t]: i } : i
563
- }, l, i), p = (t) => pe(f(y.mount ? a : o, t, e.shouldUnregister ? f(o, t, []) : [])), C = (t, i, l = {}) => {
564
- const d = f(n, t);
561
+ }, v = (r, i) => (r && i && V(a, r, i), !ie(Ne(), o)), b = (r, i, l) => Kr(r, g, {
562
+ ...y.mount ? a : k(i) ? o : Q(r) ? { [r]: i } : i
563
+ }, l, i), A = (r) => Ae(f(y.mount ? a : o, r, e.shouldUnregister ? f(o, r, []) : [])), T = (r, i, l = {}) => {
564
+ const d = f(n, r);
565
565
  let c = i;
566
566
  if (d) {
567
567
  const u = d._f;
568
- u && (!u.disabled && V(a, t, ft(i, u)), c = xe(u.ref) && M(i) ? "" : i, ut(u.ref) ? [...u.ref.options].forEach((h) => h.selected = c.includes(h.value)) : u.refs ? ve(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) : Re(u.ref) ? u.ref.value = "" : (u.ref.value = c, u.ref.type || _.values.next({
569
- name: t,
568
+ u && (!u.disabled && V(a, r, fr(i, u)), c = xe(u.ref) && M(i) ? "" : i, ur(u.ref) ? [...u.ref.options].forEach((h) => h.selected = c.includes(h.value)) : u.refs ? ve(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({
569
+ name: r,
570
570
  values: { ...a }
571
571
  })));
572
572
  }
573
- (l.shouldDirty || l.shouldTouch) && L(t, c, l.shouldTouch, l.shouldDirty, !0), l.shouldValidate && ye(t);
574
- }, W = (t, i, l) => {
573
+ (l.shouldDirty || l.shouldTouch) && C(r, c, l.shouldTouch, l.shouldDirty, !0), l.shouldValidate && ye(r);
574
+ }, W = (r, i, l) => {
575
575
  for (const d in i) {
576
- const c = i[d], u = `${t}.${d}`, h = f(n, u);
577
- (g.array.has(t) || !Fe(c) || h && !h._f) && !ue(c) ? W(u, c, l) : C(u, c, l);
576
+ const c = i[d], u = `${r}.${d}`, h = f(n, u);
577
+ (g.array.has(r) || !Fe(c) || h && !h._f) && !ue(c) ? W(u, c, l) : T(u, c, l);
578
578
  }
579
- }, H = (t, i, l = {}) => {
580
- const d = f(n, t), c = g.array.has(t), u = z(i);
581
- V(a, t, u), c ? (_.array.next({
582
- name: t,
579
+ }, H = (r, i, l = {}) => {
580
+ const d = f(n, r), c = g.array.has(r), u = z(i);
581
+ V(a, r, u), c ? (_.array.next({
582
+ name: r,
583
583
  values: { ...a }
584
584
  }), (F.isDirty || F.dirtyFields) && l.shouldDirty && _.state.next({
585
- name: t,
585
+ name: r,
586
586
  dirtyFields: _e(o, a),
587
- isDirty: v(t, u)
588
- })) : d && !d._f && !M(u) ? W(t, u, l) : C(t, u, l), Ye(t, g) && _.state.next({ ...r }), _.values.next({
589
- name: y.mount ? t : void 0,
587
+ isDirty: v(r, u)
588
+ })) : d && !d._f && !M(u) ? W(r, u, l) : T(r, u, l), Ye(r, g) && _.state.next({ ...t }), _.values.next({
589
+ name: y.mount ? r : void 0,
590
590
  values: { ...a }
591
591
  });
592
- }, de = async (t) => {
592
+ }, de = async (r) => {
593
593
  y.mount = !0;
594
- const i = t.target;
594
+ const i = r.target;
595
595
  let l = i.name, d = !0;
596
- const c = f(n, l), u = () => i.type ? Te(c._f) : Pt(t), h = (x) => {
596
+ const c = f(n, l), u = () => i.type ? Ce(c._f) : Pr(r), h = (x) => {
597
597
  d = Number.isNaN(x) || x === f(a, l, x);
598
598
  };
599
599
  if (c) {
600
600
  let x, w;
601
- const q = u(), ne = t.type === Qe.BLUR || t.type === Qe.FOCUS_OUT, _t = !er(c._f) && !s.resolver && !f(r.errors, l) && !c._f.deps || tr(ne, f(r.touchedFields, l), r.isSubmitted, J, le), De = Ye(l, g, ne);
602
- V(a, l, q), ne ? (c._f.onBlur && c._f.onBlur(t), R && R(0)) : c._f.onChange && c._f.onChange(t);
603
- const Se = L(l, q, ne, !1), mt = !I(Se) || De;
601
+ const q = u(), ne = r.type === Qe.BLUR || r.type === Qe.FOCUS_OUT, _r = !et(c._f) && !s.resolver && !f(t.errors, l) && !c._f.deps || rt(ne, f(t.touchedFields, l), t.isSubmitted, J, le), De = Ye(l, g, ne);
602
+ V(a, l, q), ne ? (c._f.onBlur && c._f.onBlur(r), O && O(0)) : c._f.onChange && c._f.onChange(r);
603
+ const Se = C(l, q, ne, !1), mr = !I(Se) || De;
604
604
  if (!ne && _.values.next({
605
605
  name: l,
606
- type: t.type,
606
+ type: r.type,
607
607
  values: { ...a }
608
- }), _t)
609
- return F.isValid && O(), mt && _.state.next({ name: l, ...De ? {} : Se });
610
- if (!ne && De && _.state.next({ ...r }), s.resolver) {
608
+ }), _r)
609
+ return F.isValid && B(), mr && _.state.next({ name: l, ...De ? {} : Se });
610
+ if (!ne && De && _.state.next({ ...t }), s.resolver) {
611
611
  const { errors: $e } = await X([l]);
612
612
  if (h(q), d) {
613
- const bt = it(r.errors, n, l), je = it($e, n, bt.name || l);
613
+ const br = ir(t.errors, n, l), je = ir($e, n, br.name || l);
614
614
  x = je.error, l = je.name, w = I($e);
615
615
  }
616
616
  } else
617
- B([l], !0), x = (await st(c, a, T, s.shouldUseNativeValidation))[l], B([l]), h(q), d && (x ? w = !1 : F.isValid && (w = await N(n, !0)));
617
+ L([l], !0), x = (await sr(c, a, R, s.shouldUseNativeValidation))[l], L([l]), h(q), d && (x ? w = !1 : F.isValid && (w = await N(n, !0)));
618
618
  d && (c._f.deps && ye(c._f.deps), se(l, w, x, Se));
619
619
  }
620
- }, fe = (t, i) => {
621
- if (f(r.errors, i) && t.focus)
622
- return t.focus(), 1;
623
- }, ye = async (t, i = {}) => {
620
+ }, fe = (r, i) => {
621
+ if (f(t.errors, i) && r.focus)
622
+ return r.focus(), 1;
623
+ }, ye = async (r, i = {}) => {
624
624
  let l, d;
625
- const c = me(t);
625
+ const c = me(r);
626
626
  if (s.resolver) {
627
- const u = await Z(k(t) ? t : c);
628
- l = I(u), d = t ? !c.some((h) => f(u, h)) : l;
627
+ const u = await Z(k(r) ? r : c);
628
+ l = I(u), d = r ? !c.some((h) => f(u, h)) : l;
629
629
  } else
630
- t ? (d = (await Promise.all(c.map(async (u) => {
630
+ r ? (d = (await Promise.all(c.map(async (u) => {
631
631
  const h = f(n, u);
632
632
  return await N(h && h._f ? { [u]: h } : h);
633
- }))).every(Boolean), !(!d && !r.isValid) && O()) : d = l = await N(n);
633
+ }))).every(Boolean), !(!d && !t.isValid) && B()) : d = l = await N(n);
634
634
  return _.state.next({
635
- ...!Q(t) || F.isValid && l !== r.isValid ? {} : { name: t },
636
- ...s.resolver || !t ? { isValid: l } : {},
637
- errors: r.errors
638
- }), i.shouldFocus && !d && ge(n, fe, t ? c : g.mount), d;
639
- }, Ne = (t) => {
635
+ ...!Q(r) || F.isValid && l !== t.isValid ? {} : { name: r },
636
+ ...s.resolver || !r ? { isValid: l } : {},
637
+ errors: t.errors
638
+ }), i.shouldFocus && !d && ge(n, fe, r ? c : g.mount), d;
639
+ }, Ne = (r) => {
640
640
  const i = {
641
641
  ...y.mount ? a : o
642
642
  };
643
- return k(t) ? i : Q(t) ? f(i, t) : t.map((l) => f(i, l));
644
- }, Ue = (t, i) => ({
645
- invalid: !!f((i || r).errors, t),
646
- isDirty: !!f((i || r).dirtyFields, t),
647
- error: f((i || r).errors, t),
648
- isValidating: !!f(r.validatingFields, t),
649
- isTouched: !!f((i || r).touchedFields, t)
650
- }), yt = (t) => {
651
- t && me(t).forEach((i) => S(r.errors, i)), _.state.next({
652
- errors: t ? r.errors : {}
643
+ return k(r) ? i : Q(r) ? f(i, r) : r.map((l) => f(i, l));
644
+ }, Ue = (r, i) => ({
645
+ invalid: !!f((i || t).errors, r),
646
+ isDirty: !!f((i || t).dirtyFields, r),
647
+ error: f((i || t).errors, r),
648
+ isValidating: !!f(t.validatingFields, r),
649
+ isTouched: !!f((i || t).touchedFields, r)
650
+ }), yr = (r) => {
651
+ r && me(r).forEach((i) => S(t.errors, i)), _.state.next({
652
+ errors: r ? t.errors : {}
653
653
  });
654
- }, Ie = (t, i, l) => {
655
- const d = (f(n, t, { _f: {} })._f || {}).ref, c = f(r.errors, t) || {}, { ref: u, message: h, type: x, ...w } = c;
656
- V(r.errors, t, {
654
+ }, Ie = (r, i, l) => {
655
+ const d = (f(n, r, { _f: {} })._f || {}).ref, c = f(t.errors, r) || {}, { ref: u, message: h, type: x, ...w } = c;
656
+ V(t.errors, r, {
657
657
  ...w,
658
658
  ...i,
659
659
  ref: d
660
660
  }), _.state.next({
661
- name: t,
662
- errors: r.errors,
661
+ name: r,
662
+ errors: t.errors,
663
663
  isValid: !1
664
664
  }), l && l.shouldFocus && d && d.focus && d.focus();
665
- }, ht = (t, i) => re(t) ? _.values.subscribe({
666
- next: (l) => t(b(void 0, i), l)
667
- }) : b(t, i, !0), ke = (t, i = {}) => {
668
- for (const l of t ? me(t) : g.mount)
669
- 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
+ }, hr = (r, i) => te(r) ? _.values.subscribe({
666
+ next: (l) => r(b(void 0, i), l)
667
+ }) : b(r, i, !0), ke = (r, i = {}) => {
668
+ for (const l of r ? me(r) : g.mount)
669
+ g.mount.delete(l), g.array.delete(l), i.keepValue || (S(n, l), S(a, l)), !i.keepError && S(t.errors, l), !i.keepDirty && S(t.dirtyFields, l), !i.keepTouched && S(t.touchedFields, l), !i.keepIsValidating && S(t.validatingFields, l), !s.shouldUnregister && !i.keepDefaultValue && S(o, l);
670
670
  _.values.next({
671
671
  values: { ...a }
672
672
  }), _.state.next({
673
- ...r,
673
+ ...t,
674
674
  ...i.keepDirty ? { isDirty: v() } : {}
675
- }), !i.keepIsValid && O();
676
- }, Pe = ({ disabled: t, name: i, field: l, fields: d, value: c }) => {
677
- if (te(t) && y.mount || t) {
678
- const u = t ? void 0 : k(c) ? Te(l ? l._f : f(d, i)._f) : c;
679
- V(a, i, u), L(i, u, !1, !1, !0);
675
+ }), !i.keepIsValid && B();
676
+ }, Pe = ({ disabled: r, name: i, field: l, fields: d, value: c }) => {
677
+ if (re(r) && y.mount || r) {
678
+ const u = r ? void 0 : k(c) ? Ce(l ? l._f : f(d, i)._f) : c;
679
+ V(a, i, u), C(i, u, !1, !1, !0);
680
680
  }
681
- }, we = (t, i = {}) => {
682
- let l = f(n, t);
683
- const d = te(i.disabled);
684
- return V(n, t, {
681
+ }, we = (r, i = {}) => {
682
+ let l = f(n, r);
683
+ const d = re(i.disabled);
684
+ return V(n, r, {
685
685
  ...l || {},
686
686
  _f: {
687
- ...l && l._f ? l._f : { ref: { name: t } },
688
- name: t,
687
+ ...l && l._f ? l._f : { ref: { name: r } },
688
+ name: r,
689
689
  mount: !0,
690
690
  ...i
691
691
  }
692
- }), g.mount.add(t), l ? Pe({
692
+ }), g.mount.add(r), l ? Pe({
693
693
  field: l,
694
694
  disabled: i.disabled,
695
- name: t,
695
+ name: r,
696
696
  value: i.value
697
- }) : A(t, !0, i.value), {
697
+ }) : p(r, !0, i.value), {
698
698
  ...d ? { disabled: i.disabled } : {},
699
699
  ...s.progressive ? {
700
700
  required: !!i.required,
@@ -704,40 +704,40 @@ function ir(e = {}) {
704
704
  maxLength: he(i.maxLength),
705
705
  pattern: he(i.pattern)
706
706
  } : {},
707
- name: t,
707
+ name: r,
708
708
  onChange: de,
709
709
  onBlur: de,
710
710
  ref: (c) => {
711
711
  if (c) {
712
- we(t, i), l = f(n, t);
713
- const u = k(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, h = Yt(u), x = l._f.refs || [];
712
+ we(r, i), l = f(n, r);
713
+ const u = k(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, h = Yr(u), x = l._f.refs || [];
714
714
  if (h ? x.find((w) => w === u) : u === l._f.ref)
715
715
  return;
716
- V(n, t, {
716
+ V(n, r, {
717
717
  _f: {
718
718
  ...l._f,
719
719
  ...h ? {
720
720
  refs: [
721
721
  ...x.filter(Be),
722
722
  u,
723
- ...Array.isArray(f(o, t)) ? [{}] : []
723
+ ...Array.isArray(f(o, r)) ? [{}] : []
724
724
  ],
725
- ref: { type: u.type, name: t }
725
+ ref: { type: u.type, name: r }
726
726
  } : { ref: u }
727
727
  }
728
- }), A(t, !1, void 0, u);
728
+ }), p(r, !1, void 0, u);
729
729
  } else
730
- l = f(n, t, {}), l._f && (l._f.mount = !1), (s.shouldUnregister || i.shouldUnregister) && !(qt(g.array, t) && y.action) && g.unMount.add(t);
730
+ l = f(n, r, {}), l._f && (l._f.mount = !1), (s.shouldUnregister || i.shouldUnregister) && !(qr(g.array, r) && y.action) && g.unMount.add(r);
731
731
  }
732
732
  };
733
- }, We = () => s.shouldFocusError && ge(n, fe, g.mount), gt = (t) => {
734
- te(t) && (_.state.next({ disabled: t }), ge(n, (i, l) => {
733
+ }, We = () => s.shouldFocusError && ge(n, fe, g.mount), gr = (r) => {
734
+ re(r) && (_.state.next({ disabled: r }), ge(n, (i, l) => {
735
735
  const d = f(n, l);
736
- d && (i.disabled = d._f.disabled || t, Array.isArray(d._f.refs) && d._f.refs.forEach((c) => {
737
- c.disabled = d._f.disabled || t;
736
+ d && (i.disabled = d._f.disabled || r, Array.isArray(d._f.refs) && d._f.refs.forEach((c) => {
737
+ c.disabled = d._f.disabled || r;
738
738
  }));
739
739
  }, 0, !1));
740
- }, qe = (t, i) => async (l) => {
740
+ }, qe = (r, i) => async (l) => {
741
741
  let d;
742
742
  l && (l.preventDefault && l.preventDefault(), l.persist && l.persist());
743
743
  let c = z(a);
@@ -745,38 +745,38 @@ function ir(e = {}) {
745
745
  isSubmitting: !0
746
746
  }), s.resolver) {
747
747
  const { errors: u, values: h } = await X();
748
- r.errors = u, c = h;
748
+ t.errors = u, c = h;
749
749
  } else
750
750
  await N(n);
751
- if (S(r.errors, "root"), I(r.errors)) {
751
+ if (S(t.errors, "root"), I(t.errors)) {
752
752
  _.state.next({
753
753
  errors: {}
754
754
  });
755
755
  try {
756
- await t(c, l);
756
+ await r(c, l);
757
757
  } catch (u) {
758
758
  d = u;
759
759
  }
760
760
  } else
761
- i && await i({ ...r.errors }, l), We(), setTimeout(We);
761
+ i && await i({ ...t.errors }, l), We(), setTimeout(We);
762
762
  if (_.state.next({
763
763
  isSubmitted: !0,
764
764
  isSubmitting: !1,
765
- isSubmitSuccessful: I(r.errors) && !d,
766
- submitCount: r.submitCount + 1,
767
- errors: r.errors
765
+ isSubmitSuccessful: I(t.errors) && !d,
766
+ submitCount: t.submitCount + 1,
767
+ errors: t.errors
768
768
  }), d)
769
769
  throw d;
770
- }, vt = (t, i = {}) => {
771
- f(n, t) && (k(i.defaultValue) ? H(t, z(f(o, t))) : (H(t, i.defaultValue), V(o, t, z(i.defaultValue))), i.keepTouched || S(r.touchedFields, t), i.keepDirty || (S(r.dirtyFields, t), r.isDirty = i.defaultValue ? v(t, z(f(o, t))) : v()), i.keepError || (S(r.errors, t), F.isValid && O()), _.state.next({ ...r }));
772
- }, He = (t, i = {}) => {
773
- const l = t ? z(t) : o, d = z(l), c = I(t), u = c ? o : d;
770
+ }, vr = (r, i = {}) => {
771
+ f(n, r) && (k(i.defaultValue) ? H(r, z(f(o, r))) : (H(r, i.defaultValue), V(o, r, z(i.defaultValue))), i.keepTouched || S(t.touchedFields, r), i.keepDirty || (S(t.dirtyFields, r), t.isDirty = i.defaultValue ? v(r, z(f(o, r))) : v()), i.keepError || (S(t.errors, r), F.isValid && B()), _.state.next({ ...t }));
772
+ }, He = (r, i = {}) => {
773
+ const l = r ? z(r) : o, d = z(l), c = I(r), u = c ? o : d;
774
774
  if (i.keepDefaultValues || (o = l), !i.keepValues) {
775
775
  if (i.keepDirtyValues)
776
776
  for (const h of g.mount)
777
- f(r.dirtyFields, h) ? V(u, h, f(a, h)) : H(h, f(u, h));
777
+ f(t.dirtyFields, h) ? V(u, h, f(a, h)) : H(h, f(u, h));
778
778
  else {
779
- if (Le && k(t))
779
+ if (Le && k(r))
780
780
  for (const h of g.mount) {
781
781
  const x = f(n, h);
782
782
  if (x && x._f) {
@@ -806,16 +806,16 @@ function ir(e = {}) {
806
806
  watchAll: !1,
807
807
  focus: ""
808
808
  }, y.mount = !F.isValid || !!i.keepIsValid || !!i.keepDirtyValues, y.watch = !!e.shouldUnregister, _.state.next({
809
- submitCount: i.keepSubmitCount ? r.submitCount : 0,
810
- isDirty: c ? !1 : i.keepDirty ? r.isDirty : !!(i.keepDefaultValues && !ie(t, o)),
811
- isSubmitted: i.keepIsSubmitted ? r.isSubmitted : !1,
812
- dirtyFields: c ? {} : i.keepDirtyValues ? i.keepDefaultValues && a ? _e(o, a) : r.dirtyFields : i.keepDefaultValues && t ? _e(o, t) : i.keepDirty ? r.dirtyFields : {},
813
- touchedFields: i.keepTouched ? r.touchedFields : {},
814
- errors: i.keepErrors ? r.errors : {},
815
- isSubmitSuccessful: i.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
809
+ submitCount: i.keepSubmitCount ? t.submitCount : 0,
810
+ isDirty: c ? !1 : i.keepDirty ? t.isDirty : !!(i.keepDefaultValues && !ie(r, o)),
811
+ isSubmitted: i.keepIsSubmitted ? t.isSubmitted : !1,
812
+ dirtyFields: c ? {} : i.keepDirtyValues ? i.keepDefaultValues && a ? _e(o, a) : t.dirtyFields : i.keepDefaultValues && r ? _e(o, r) : i.keepDirty ? t.dirtyFields : {},
813
+ touchedFields: i.keepTouched ? t.touchedFields : {},
814
+ errors: i.keepErrors ? t.errors : {},
815
+ isSubmitSuccessful: i.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
816
816
  isSubmitting: !1
817
817
  });
818
- }, ze = (t, i) => He(re(t) ? t(a) : t, i);
818
+ }, ze = (r, i) => He(te(r) ? r(a) : r, i);
819
819
  return {
820
820
  control: {
821
821
  register: we,
@@ -826,24 +826,24 @@ function ir(e = {}) {
826
826
  _executeSchema: X,
827
827
  _getWatch: b,
828
828
  _getDirty: v,
829
- _updateValid: O,
829
+ _updateValid: B,
830
830
  _removeUnmounted: ae,
831
831
  _updateFieldArray: m,
832
832
  _updateDisabledField: Pe,
833
- _getFieldArray: p,
833
+ _getFieldArray: A,
834
834
  _reset: He,
835
- _resetDefaultValues: () => re(s.defaultValues) && s.defaultValues().then((t) => {
836
- ze(t, s.resetOptions), _.state.next({
835
+ _resetDefaultValues: () => te(s.defaultValues) && s.defaultValues().then((r) => {
836
+ ze(r, s.resetOptions), _.state.next({
837
837
  isLoading: !1
838
838
  });
839
839
  }),
840
- _updateFormState: (t) => {
841
- r = {
842
- ...r,
843
- ...t
840
+ _updateFormState: (r) => {
841
+ t = {
842
+ ...t,
843
+ ...r
844
844
  };
845
845
  },
846
- _disableForm: gt,
846
+ _disableForm: gr,
847
847
  _subjects: _,
848
848
  _proxyFormState: F,
849
849
  _setErrors: K,
@@ -856,8 +856,8 @@ function ir(e = {}) {
856
856
  get _state() {
857
857
  return y;
858
858
  },
859
- set _state(t) {
860
- y = t;
859
+ set _state(r) {
860
+ y = r;
861
861
  },
862
862
  get _defaultValues() {
863
863
  return o;
@@ -865,38 +865,38 @@ function ir(e = {}) {
865
865
  get _names() {
866
866
  return g;
867
867
  },
868
- set _names(t) {
869
- g = t;
868
+ set _names(r) {
869
+ g = r;
870
870
  },
871
871
  get _formState() {
872
- return r;
872
+ return t;
873
873
  },
874
- set _formState(t) {
875
- r = t;
874
+ set _formState(r) {
875
+ t = r;
876
876
  },
877
877
  get _options() {
878
878
  return s;
879
879
  },
880
- set _options(t) {
880
+ set _options(r) {
881
881
  s = {
882
882
  ...s,
883
- ...t
883
+ ...r
884
884
  };
885
885
  }
886
886
  },
887
887
  trigger: ye,
888
888
  register: we,
889
889
  handleSubmit: qe,
890
- watch: ht,
890
+ watch: hr,
891
891
  setValue: H,
892
892
  getValues: Ne,
893
893
  reset: ze,
894
- resetField: vt,
895
- clearErrors: yt,
894
+ resetField: vr,
895
+ clearErrors: yr,
896
896
  unregister: ke,
897
897
  setError: Ie,
898
- setFocus: (t, i = {}) => {
899
- const l = f(n, t), d = l && l._f;
898
+ setFocus: (r, i = {}) => {
899
+ const l = f(n, r), d = l && l._f;
900
900
  if (d) {
901
901
  const c = d.refs ? d.refs[0] : d.ref;
902
902
  c.focus && (c.focus(), i.shouldSelect && c.select());
@@ -905,11 +905,11 @@ function ir(e = {}) {
905
905
  getFieldState: Ue
906
906
  };
907
907
  }
908
- function lr(e = {}) {
909
- const s = $.useRef(), r = $.useRef(), [n, o] = $.useState({
908
+ function lt(e = {}) {
909
+ const s = $.useRef(), t = $.useRef(), [n, o] = $.useState({
910
910
  isDirty: !1,
911
911
  isValidating: !1,
912
- isLoading: re(e.defaultValues),
912
+ isLoading: te(e.defaultValues),
913
913
  isSubmitted: !1,
914
914
  isSubmitting: !1,
915
915
  isSubmitSuccessful: !1,
@@ -920,17 +920,17 @@ function lr(e = {}) {
920
920
  validatingFields: {},
921
921
  errors: e.errors || {},
922
922
  disabled: e.disabled || !1,
923
- defaultValues: re(e.defaultValues) ? void 0 : e.defaultValues
923
+ defaultValues: te(e.defaultValues) ? void 0 : e.defaultValues
924
924
  });
925
925
  s.current || (s.current = {
926
- ...ir(e),
926
+ ...it(e),
927
927
  formState: n
928
928
  });
929
929
  const a = s.current.control;
930
- return a._options = e, jt({
930
+ return a._options = e, jr({
931
931
  subject: a._subjects.state,
932
932
  next: (y) => {
933
- $t(y, a._proxyFormState, a._updateFormState) && o({ ...a._formState });
933
+ $r(y, a._proxyFormState, a._updateFormState) && o({ ...a._formState });
934
934
  }
935
935
  }), $.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), $.useEffect(() => {
936
936
  if (a._proxyFormState.isDirty) {
@@ -940,7 +940,7 @@ function lr(e = {}) {
940
940
  });
941
941
  }
942
942
  }, [a, n.isDirty]), $.useEffect(() => {
943
- e.values && !ie(e.values, r.current) ? (a._reset(e.values, a._options.resetOptions), r.current = e.values, o((y) => ({ ...y }))) : a._resetDefaultValues();
943
+ e.values && !ie(e.values, t.current) ? (a._reset(e.values, a._options.resetOptions), t.current = e.values, o((y) => ({ ...y }))) : a._resetDefaultValues();
944
944
  }, [e.values, a]), $.useEffect(() => {
945
945
  e.errors && a._setErrors(e.errors);
946
946
  }, [e.errors, a]), $.useEffect(() => {
@@ -949,43 +949,43 @@ function lr(e = {}) {
949
949
  e.shouldUnregister && a._subjects.values.next({
950
950
  values: a._getWatch()
951
951
  });
952
- }, [e.shouldUnregister, a]), s.current.formState = zt(n, a), s.current;
952
+ }, [e.shouldUnregister, a]), s.current.formState = zr(n, a), s.current;
953
953
  }
954
- const ar = "Я принимаю условия Политики обработки и защиты персональных данных, даю согласия на обработку персональных данных", Fr = ({
954
+ const at = "Я принимаю условия Политики обработки и защиты персональных данных, даю согласия на обработку персональных данных", Ft = ({
955
955
  isFormOpen: e,
956
956
  setIsFormOpen: s,
957
- isNews: r,
957
+ isNews: t,
958
958
  title: n,
959
959
  isEmail: o,
960
960
  isPhone: a,
961
961
  isTextArea: y,
962
962
  telegramLink: g = "https://t.me/stone_developer",
963
- isRequiredPhone: R = !0,
963
+ isRequiredPhone: O = !0,
964
964
  isRequiredEmail: P = !1,
965
965
  isRequiredPhoneOrEmail: F,
966
966
  textAreaPlaceholder: _,
967
967
  subTitle: le,
968
968
  submitHandler: J,
969
- modalWidth: T = "442px",
969
+ modalWidth: R = "442px",
970
970
  rowsTextArea: ce = 2,
971
- advCheckBox: O = { text: ar, isRequired: !0 }
971
+ advCheckBox: B = { text: at, isRequired: !0 }
972
972
  }) => {
973
973
  const {
974
- register: B,
974
+ register: L,
975
975
  handleSubmit: m,
976
976
  trigger: j,
977
977
  reset: K,
978
- watch: A,
979
- formState: { errors: L }
980
- } = lr(), se = !!A("email"), { onChange: X, onBlur: Z, ...N } = B("phone", {
981
- required: R || F ? !se : !0,
982
- pattern: { value: At, message: "" },
978
+ watch: p,
979
+ formState: { errors: C }
980
+ } = lt(), se = !!p("email"), { onChange: X, onBlur: Z, ...N } = L("phone", {
981
+ required: O || F ? !se : !0,
982
+ pattern: { value: pr, message: "" },
983
983
  onBlur: () => j("phone")
984
- }), { isMobile: ae, currentClientWidth: v } = Dt(), b = A("personalCheckBox"), p = A("advCheckBox"), C = (W) => {
984
+ }), { isMobile: ae, currentClientWidth: v } = Dr(), b = p("personalCheckBox"), A = p("advCheckBox"), T = (W) => {
985
985
  J(W), K();
986
986
  };
987
987
  return v ? /* @__PURE__ */ D(
988
- Vt,
988
+ Vr,
989
989
  {
990
990
  isOpen: e,
991
991
  emitIsOpen: () => s(!1),
@@ -997,7 +997,7 @@ const ar = "Я принимаю условия Политики обработк
997
997
  "div",
998
998
  {
999
999
  className: U.root,
1000
- style: { width: ae ? "100%" : T },
1000
+ style: { width: ae ? "100%" : R },
1001
1001
  children: [
1002
1002
  /* @__PURE__ */ D(
1003
1003
  "div",
@@ -1006,7 +1006,7 @@ const ar = "Я принимаю условия Политики обработк
1006
1006
  dangerouslySetInnerHTML: { __html: n ?? "Оставить обращение" }
1007
1007
  }
1008
1008
  ),
1009
- r && /* @__PURE__ */ ee("div", { className: U.telegramWrapper, children: [
1009
+ t && /* @__PURE__ */ ee("div", { className: U.telegramWrapper, children: [
1010
1010
  /* @__PURE__ */ D(
1011
1011
  "a",
1012
1012
  {
@@ -1021,17 +1021,17 @@ const ar = "Я принимаю условия Политики обработк
1021
1021
  ),
1022
1022
  /* @__PURE__ */ D("div", { className: U.orText, children: "или" })
1023
1023
  ] }),
1024
- !r && /* @__PURE__ */ D(
1024
+ !t && /* @__PURE__ */ D(
1025
1025
  "div",
1026
1026
  {
1027
1027
  className: U.description,
1028
1028
  dangerouslySetInnerHTML: {
1029
- __html: le && !r ? "Оставьте номер телефона для получения консультации" : `${/* @__PURE__ */ D("div", { children: "привет" })}`
1029
+ __html: le && !t ? "Оставьте номер телефона для получения консультации" : `${/* @__PURE__ */ D("div", { children: "привет" })}`
1030
1030
  }
1031
1031
  }
1032
1032
  ),
1033
- /* @__PURE__ */ ee("form", { onSubmit: m(C), children: [
1034
- /* @__PURE__ */ ee(Ft, { className: U.inputWrapper, children: [
1033
+ /* @__PURE__ */ ee("form", { onSubmit: m(T), children: [
1034
+ /* @__PURE__ */ ee(Fr, { className: U.inputWrapper, children: [
1035
1035
  /* @__PURE__ */ D(
1036
1036
  Ee,
1037
1037
  {
@@ -1040,12 +1040,12 @@ const ar = "Я принимаю условия Политики обработк
1040
1040
  variant: "light",
1041
1041
  placeholder: "Введите имя",
1042
1042
  "data-testid": "modal_name",
1043
- ...B("name", { required: !0, pattern: pt }),
1044
- error: !!L.name
1043
+ ...L("name", { required: !0, pattern: Ar }),
1044
+ error: !!C.name
1045
1045
  }
1046
1046
  ),
1047
1047
  a && /* @__PURE__ */ D(
1048
- xt,
1048
+ xr,
1049
1049
  {
1050
1050
  inputMode: "numeric",
1051
1051
  name: "phone",
@@ -1062,8 +1062,8 @@ const ar = "Я принимаю условия Политики обработк
1062
1062
  size_s: "small",
1063
1063
  variant: "light",
1064
1064
  ...N,
1065
- ...B("phone"),
1066
- error: !!L.phone
1065
+ ...L("phone"),
1066
+ error: !!C.phone
1067
1067
  }
1068
1068
  )
1069
1069
  }
@@ -1076,31 +1076,31 @@ const ar = "Я принимаю условия Политики обработк
1076
1076
  variant: "light",
1077
1077
  placeholder: "Введите email",
1078
1078
  "data-testid": "modal_email",
1079
- ...B("email", {
1079
+ ...L("email", {
1080
1080
  required: P || F && !se,
1081
- pattern: kt
1081
+ pattern: kr
1082
1082
  }),
1083
- error: !!L.email
1083
+ error: !!C.email
1084
1084
  }
1085
1085
  ),
1086
1086
  y && /* @__PURE__ */ D(
1087
- wt,
1087
+ wr,
1088
1088
  {
1089
1089
  "data-testid": "modal_textarea",
1090
1090
  placeholder: _,
1091
1091
  rows: ce,
1092
1092
  width: "full",
1093
- ...B("textarea")
1093
+ ...L("textarea")
1094
1094
  }
1095
1095
  ),
1096
- O && !r && /* @__PURE__ */ D(
1096
+ B && !t && /* @__PURE__ */ D(
1097
1097
  Je,
1098
1098
  {
1099
1099
  "data-testid": "modal_advCheckBox",
1100
- isChecked: p,
1101
- error: !!L.advCheckBox,
1102
- text: O.text,
1103
- ...B("advCheckBox", { required: O == null ? void 0 : O.isRequired })
1100
+ isChecked: A,
1101
+ error: !!C.advCheckBox,
1102
+ text: B.text,
1103
+ ...L("advCheckBox", { required: B == null ? void 0 : B.isRequired })
1104
1104
  }
1105
1105
  ),
1106
1106
  /* @__PURE__ */ ee(
@@ -1108,10 +1108,10 @@ const ar = "Я принимаю условия Политики обработк
1108
1108
  {
1109
1109
  "data-testid": "modal_personalCheckBox",
1110
1110
  isChecked: b,
1111
- error: !!L.personalCheckBox,
1112
- ...B("personalCheckBox", { required: !r }),
1111
+ error: !!C.personalCheckBox,
1112
+ ...L("personalCheckBox", { required: !t }),
1113
1113
  children: [
1114
- r && /* @__PURE__ */ ee("div", { children: [
1114
+ t && /* @__PURE__ */ ee("div", { children: [
1115
1115
  "Согласен(-на)",
1116
1116
  " ",
1117
1117
  /* @__PURE__ */ D(
@@ -1125,7 +1125,7 @@ const ar = "Я принимаю условия Политики обработк
1125
1125
  " ",
1126
1126
  "от Stone"
1127
1127
  ] }),
1128
- !r && /* @__PURE__ */ ee("div", { children: [
1128
+ !t && /* @__PURE__ */ ee("div", { children: [
1129
1129
  "Я принимаю условия",
1130
1130
  " ",
1131
1131
  /* @__PURE__ */ D(
@@ -1151,8 +1151,8 @@ const ar = "Я принимаю условия Политики обработк
1151
1151
  size: "large",
1152
1152
  as: "button",
1153
1153
  additionalClass: U.modalBtn,
1154
- disabled: !!L.name || !!L.phone && R || !!L.email && P,
1155
- children: "Отправить"
1154
+ disabled: !!C.name || !!C.phone && O || !!C.email && P || !!C.advCheckBox && (B == null ? void 0 : B.isRequired) || !!C.personalCheckBox && !t,
1155
+ children: "Отправить запрос"
1156
1156
  }
1157
1157
  )
1158
1158
  ] }),
@@ -1183,5 +1183,5 @@ const ar = "Я принимаю условия Политики обработк
1183
1183
  ) : null;
1184
1184
  };
1185
1185
  export {
1186
- Fr as ModalForm
1186
+ Ft as ModalForm
1187
1187
  };