osocna-react-tailwind 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +509 -501
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsxs as sA, jsx as I, Fragment as JA } from "react/jsx-runtime";
2
- import iA, { useState as M, useEffect as mA, createContext as Wr, useCallback as yA, useMemo as je, useContext as Me, useRef as Ze } from "react";
1
+ import { jsxs as nA, jsx as I, Fragment as JA } from "react/jsx-runtime";
2
+ import rA, { useState as M, useEffect as mA, createContext as Wr, useCallback as yA, useMemo as je, useContext as Me, useRef as Ze } from "react";
3
3
  import Sr from "osocna-shared/OsocnaProvider";
4
4
  import { promiseMapper as wA, apiClient as KA, setApiClientTokenProvider as Ur, useAsyncRequest as ee, Card as re, Collection as PA, Filter as HA, DataTable as Ge, DropdownMenu as _e, DropdownPanel as gr, Avatar as Rr, Button as TA, useCrud as Cr, Loader as kA, Dialog as jA, Input as Tr, Checkbox as Kr, CrudProvider as Fr } from "flysoft-react-ui";
5
5
  import { useInRouterContext as $e, MemoryRouter as Ar, useSearchParams as er } from "react-router-dom";
@@ -16,7 +16,7 @@ const Lr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
16
16
  let v = [];
17
17
  e?.membership?.origin?.id === 97 ? v = [`url(${oe})`] : e?.membership?.origin?.id === 9 ? (v = [`url(${Qr})`], (e?.membership?.credential?.plan === "TOTAL" || e?.membership?.credential?.plan === "GLOBAL") && v.push(`url(${yr})`, `url(${oe})`)) : v = [`url(${Dr})`], A(v);
18
18
  };
19
- return /* @__PURE__ */ sA(
19
+ return /* @__PURE__ */ nA(
20
20
  "div",
21
21
  {
22
22
  className: `
@@ -52,13 +52,13 @@ const Lr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
52
52
  a
53
53
  )
54
54
  ) }),
55
- /* @__PURE__ */ sA("div", { className: "flex flex-col items-center mb-3 text-white", children: [
55
+ /* @__PURE__ */ nA("div", { className: "flex flex-col items-center mb-3 text-white", children: [
56
56
  /* @__PURE__ */ I("p", { className: "text-center text-textPrimary font-bold", style: { fontSize: "clamp(20px, 2vw, 22px)" }, children: e?.name?.toLocaleUpperCase() || "" }),
57
57
  /* @__PURE__ */ I("p", { className: "text-center text-textSecondary font-bold", style: { whiteSpace: "nowrap", fontSize: "clamp(20px, 2vw, 22px)" }, children: e?.membership?.credential?.number || 0 }),
58
58
  /* @__PURE__ */ I("div", { className: "flex justify-center", children: e.membership?.origin?.id === 9 ? e.membership?.credential?.plan?.toUpperCase() === "INTEGRAL" ? /* @__PURE__ */ I("p", { style: { color: "white", backgroundColor: "red", borderRadius: "15px", marginLeft: "auto", marginRight: "auto", textAlign: "center", width: "100px", fontSize: "10px", padding: "2px", marginTop: "4px" }, children: "INTEGRAL" }) : e.membership?.credential?.plan?.toUpperCase() === "GLOBAL" ? /* @__PURE__ */ I("p", { style: { color: "white", backgroundColor: "red", borderRadius: "15px", marginLeft: "auto", marginRight: "auto", textAlign: "center", width: "100px", fontSize: "10px", padding: "2px", marginTop: "4px" }, children: "GLOBAL" }) : /* @__PURE__ */ I("p", { style: { color: "white", backgroundColor: "red", borderRadius: "15px", marginLeft: "auto", marginRight: "auto", textAlign: "center", width: "100px", fontSize: "10px", padding: "2px", marginTop: "4px" }, children: "TOTAL" }) : null }),
59
59
  /* @__PURE__ */ I("p", { className: "text-center text-textSecondary mt-2 h-[12px]", style: { whiteSpace: "nowrap", fontSize: "clamp(12px, 1.5vw, 12px)" }, children: e?.membership?.credential?.observation || "" })
60
60
  ] }),
61
- /* @__PURE__ */ sA("div", { className: "text-center text-white", children: [
61
+ /* @__PURE__ */ nA("div", { className: "text-center text-white", children: [
62
62
  /* @__PURE__ */ I("p", { style: { width: "90%", whiteSpace: "nowrap", fontSize: "clamp(8px, 1.5vw, 10px)" }, children: "Superintendencia de Servicios de Salud - Órgano de Control" }),
63
63
  /* @__PURE__ */ I("p", { style: { width: "100%", whiteSpace: "nowrap", fontSize: "clamp(8px, 1.5vw, 10px)" }, children: "0800-222-SALUD(72583) - www.sssalud.gov.ar" })
64
64
  ] })
@@ -83,15 +83,15 @@ var fr = { exports: {} };
83
83
  (function(A, i) {
84
84
  e.exports = i();
85
85
  })(zr, function() {
86
- var A = 1e3, i = 6e4, v = 36e5, a = "millisecond", d = "second", f = "minute", C = "hour", F = "day", B = "week", P = "month", H = "quarter", E = "year", K = "date", U = "Invalid Date", Y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, k = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
86
+ var A = 1e3, i = 6e4, v = 36e5, a = "millisecond", d = "second", f = "minute", R = "hour", F = "day", Y = "week", P = "month", T = "quarter", E = "year", C = "date", K = "Invalid Date", z = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, X = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
87
87
  var o = ["th", "st", "nd", "rd"], l = b % 100;
88
88
  return "[" + b + (o[(l - 20) % 10] || o[l] || o[0]) + "]";
89
- } }, $ = function(b, o, l) {
89
+ } }, H = function(b, o, l) {
90
90
  var V = String(b);
91
91
  return !V || V.length >= o ? b : "" + Array(o + 1 - V.length).join(l) + b;
92
- }, X = { s: $, z: function(b) {
92
+ }, S = { s: H, z: function(b) {
93
93
  var o = -b.utcOffset(), l = Math.abs(o), V = Math.floor(l / 60), p = l % 60;
94
- return (o <= 0 ? "+" : "-") + $(V, 2, "0") + ":" + $(p, 2, "0");
94
+ return (o <= 0 ? "+" : "-") + H(V, 2, "0") + ":" + H(p, 2, "0");
95
95
  }, m: function b(o, l) {
96
96
  if (o.date() < l.date()) return -b(l, o);
97
97
  var V = 12 * (l.year() - o.year()) + (l.month() - o.month()), p = o.clone().add(V, P), m = l - p < 0, W = o.clone().add(V + (m ? -1 : 1), P);
@@ -99,50 +99,50 @@ var fr = { exports: {} };
99
99
  }, a: function(b) {
100
100
  return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
101
101
  }, p: function(b) {
102
- return { M: P, y: E, w: B, d: F, D: K, h: C, m: f, s: d, ms: a, Q: H }[b] || String(b || "").toLowerCase().replace(/s$/, "");
102
+ return { M: P, y: E, w: Y, d: F, D: C, h: R, m: f, s: d, ms: a, Q: T }[b] || String(b || "").toLowerCase().replace(/s$/, "");
103
103
  }, u: function(b) {
104
104
  return b === void 0;
105
- } }, S = "en", z = {};
106
- z[S] = g;
107
- var w = "$isDayjsObject", AA = function(b) {
108
- return b instanceof R || !(!b || !b[w]);
109
- }, vA = function b(o, l, V) {
105
+ } }, U = "en", k = {};
106
+ k[U] = X;
107
+ var IA = "$isDayjsObject", aA = function(b) {
108
+ return b instanceof g || !(!b || !b[IA]);
109
+ }, sA = function b(o, l, V) {
110
110
  var p;
111
- if (!o) return S;
111
+ if (!o) return U;
112
112
  if (typeof o == "string") {
113
113
  var m = o.toLowerCase();
114
- z[m] && (p = m), l && (z[m] = l, p = m);
114
+ k[m] && (p = m), l && (k[m] = l, p = m);
115
115
  var W = o.split("-");
116
116
  if (!p && W.length > 1) return b(W[0]);
117
117
  } else {
118
- var Q = o.name;
119
- z[Q] = o, p = Q;
118
+ var y = o.name;
119
+ k[y] = o, p = y;
120
120
  }
121
- return !V && p && (S = p), p || !V && S;
122
- }, L = function(b, o) {
123
- if (AA(b)) return b.clone();
121
+ return !V && p && (U = p), p || !V && U;
122
+ }, Q = function(b, o) {
123
+ if (aA(b)) return b.clone();
124
124
  var l = typeof o == "object" ? o : {};
125
- return l.date = b, l.args = arguments, new R(l);
126
- }, T = X;
127
- T.l = vA, T.i = AA, T.w = function(b, o) {
128
- return L(b, { locale: o.$L, utc: o.$u, x: o.$x, $offset: o.$offset });
125
+ return l.date = b, l.args = arguments, new g(l);
126
+ }, L = S;
127
+ L.l = sA, L.i = aA, L.w = function(b, o) {
128
+ return Q(b, { locale: o.$L, utc: o.$u, x: o.$x, $offset: o.$offset });
129
129
  };
130
- var R = function() {
130
+ var g = function() {
131
131
  function b(l) {
132
- this.$L = vA(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[w] = !0;
132
+ this.$L = sA(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[IA] = !0;
133
133
  }
134
134
  var o = b.prototype;
135
135
  return o.parse = function(l) {
136
136
  this.$d = function(V) {
137
137
  var p = V.date, m = V.utc;
138
138
  if (p === null) return /* @__PURE__ */ new Date(NaN);
139
- if (T.u(p)) return /* @__PURE__ */ new Date();
139
+ if (L.u(p)) return /* @__PURE__ */ new Date();
140
140
  if (p instanceof Date) return new Date(p);
141
141
  if (typeof p == "string" && !/Z$/i.test(p)) {
142
- var W = p.match(Y);
142
+ var W = p.match(z);
143
143
  if (W) {
144
- var Q = W[2] - 1 || 0, O = (W[7] || "0").substring(0, 3);
145
- return m ? new Date(Date.UTC(W[1], Q, W[3] || 1, W[4] || 0, W[5] || 0, W[6] || 0, O)) : new Date(W[1], Q, W[3] || 1, W[4] || 0, W[5] || 0, W[6] || 0, O);
144
+ var y = W[2] - 1 || 0, O = (W[7] || "0").substring(0, 3);
145
+ return m ? new Date(Date.UTC(W[1], y, W[3] || 1, W[4] || 0, W[5] || 0, W[6] || 0, O)) : new Date(W[1], y, W[3] || 1, W[4] || 0, W[5] || 0, W[6] || 0, O);
146
146
  }
147
147
  }
148
148
  return new Date(p);
@@ -151,41 +151,41 @@ var fr = { exports: {} };
151
151
  var l = this.$d;
152
152
  this.$y = l.getFullYear(), this.$M = l.getMonth(), this.$D = l.getDate(), this.$W = l.getDay(), this.$H = l.getHours(), this.$m = l.getMinutes(), this.$s = l.getSeconds(), this.$ms = l.getMilliseconds();
153
153
  }, o.$utils = function() {
154
- return T;
154
+ return L;
155
155
  }, o.isValid = function() {
156
- return this.$d.toString() !== U;
156
+ return this.$d.toString() !== K;
157
157
  }, o.isSame = function(l, V) {
158
- var p = L(l);
158
+ var p = Q(l);
159
159
  return this.startOf(V) <= p && p <= this.endOf(V);
160
160
  }, o.isAfter = function(l, V) {
161
- return L(l) < this.startOf(V);
161
+ return Q(l) < this.startOf(V);
162
162
  }, o.isBefore = function(l, V) {
163
- return this.endOf(V) < L(l);
163
+ return this.endOf(V) < Q(l);
164
164
  }, o.$g = function(l, V, p) {
165
- return T.u(l) ? this[V] : this.set(p, l);
165
+ return L.u(l) ? this[V] : this.set(p, l);
166
166
  }, o.unix = function() {
167
167
  return Math.floor(this.valueOf() / 1e3);
168
168
  }, o.valueOf = function() {
169
169
  return this.$d.getTime();
170
170
  }, o.startOf = function(l, V) {
171
- var p = this, m = !!T.u(V) || V, W = T.p(l), Q = function(EA, tA) {
172
- var lA = T.w(p.$u ? Date.UTC(p.$y, tA, EA) : new Date(p.$y, tA, EA), p);
173
- return m ? lA : lA.endOf(F);
174
- }, O = function(EA, tA) {
175
- return T.w(p.toDate()[EA].apply(p.toDate("s"), (m ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(tA)), p);
176
- }, Z = this.$W, eA = this.$M, dA = this.$D, qA = "set" + (this.$u ? "UTC" : "");
171
+ var p = this, m = !!L.u(V) || V, W = L.p(l), y = function(EA, eA) {
172
+ var uA = L.w(p.$u ? Date.UTC(p.$y, eA, EA) : new Date(p.$y, eA, EA), p);
173
+ return m ? uA : uA.endOf(F);
174
+ }, O = function(EA, eA) {
175
+ return L.w(p.toDate()[EA].apply(p.toDate("s"), (m ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(eA)), p);
176
+ }, Z = this.$W, $ = this.$M, vA = this.$D, qA = "set" + (this.$u ? "UTC" : "");
177
177
  switch (W) {
178
178
  case E:
179
- return m ? Q(1, 0) : Q(31, 11);
179
+ return m ? y(1, 0) : y(31, 11);
180
180
  case P:
181
- return m ? Q(1, eA) : Q(0, eA + 1);
182
- case B:
181
+ return m ? y(1, $) : y(0, $ + 1);
182
+ case Y:
183
183
  var XA = this.$locale().weekStart || 0, VA = (Z < XA ? Z + 7 : Z) - XA;
184
- return Q(m ? dA - VA : dA + (6 - VA), eA);
184
+ return y(m ? vA - VA : vA + (6 - VA), $);
185
185
  case F:
186
- case K:
187
- return O(qA + "Hours", 0);
188
186
  case C:
187
+ return O(qA + "Hours", 0);
188
+ case R:
189
189
  return O(qA + "Minutes", 1);
190
190
  case f:
191
191
  return O(qA + "Seconds", 2);
@@ -197,142 +197,142 @@ var fr = { exports: {} };
197
197
  }, o.endOf = function(l) {
198
198
  return this.startOf(l, !1);
199
199
  }, o.$set = function(l, V) {
200
- var p, m = T.p(l), W = "set" + (this.$u ? "UTC" : ""), Q = (p = {}, p[F] = W + "Date", p[K] = W + "Date", p[P] = W + "Month", p[E] = W + "FullYear", p[C] = W + "Hours", p[f] = W + "Minutes", p[d] = W + "Seconds", p[a] = W + "Milliseconds", p)[m], O = m === F ? this.$D + (V - this.$W) : V;
200
+ var p, m = L.p(l), W = "set" + (this.$u ? "UTC" : ""), y = (p = {}, p[F] = W + "Date", p[C] = W + "Date", p[P] = W + "Month", p[E] = W + "FullYear", p[R] = W + "Hours", p[f] = W + "Minutes", p[d] = W + "Seconds", p[a] = W + "Milliseconds", p)[m], O = m === F ? this.$D + (V - this.$W) : V;
201
201
  if (m === P || m === E) {
202
- var Z = this.clone().set(K, 1);
203
- Z.$d[Q](O), Z.init(), this.$d = Z.set(K, Math.min(this.$D, Z.daysInMonth())).$d;
204
- } else Q && this.$d[Q](O);
202
+ var Z = this.clone().set(C, 1);
203
+ Z.$d[y](O), Z.init(), this.$d = Z.set(C, Math.min(this.$D, Z.daysInMonth())).$d;
204
+ } else y && this.$d[y](O);
205
205
  return this.init(), this;
206
206
  }, o.set = function(l, V) {
207
207
  return this.clone().$set(l, V);
208
208
  }, o.get = function(l) {
209
- return this[T.p(l)]();
209
+ return this[L.p(l)]();
210
210
  }, o.add = function(l, V) {
211
211
  var p, m = this;
212
212
  l = Number(l);
213
- var W = T.p(V), Q = function(eA) {
214
- var dA = L(m);
215
- return T.w(dA.date(dA.date() + Math.round(eA * l)), m);
213
+ var W = L.p(V), y = function($) {
214
+ var vA = Q(m);
215
+ return L.w(vA.date(vA.date() + Math.round($ * l)), m);
216
216
  };
217
217
  if (W === P) return this.set(P, this.$M + l);
218
218
  if (W === E) return this.set(E, this.$y + l);
219
- if (W === F) return Q(1);
220
- if (W === B) return Q(7);
221
- var O = (p = {}, p[f] = i, p[C] = v, p[d] = A, p)[W] || 1, Z = this.$d.getTime() + l * O;
222
- return T.w(Z, this);
219
+ if (W === F) return y(1);
220
+ if (W === Y) return y(7);
221
+ var O = (p = {}, p[f] = i, p[R] = v, p[d] = A, p)[W] || 1, Z = this.$d.getTime() + l * O;
222
+ return L.w(Z, this);
223
223
  }, o.subtract = function(l, V) {
224
224
  return this.add(-1 * l, V);
225
225
  }, o.format = function(l) {
226
226
  var V = this, p = this.$locale();
227
- if (!this.isValid()) return p.invalidDate || U;
228
- var m = l || "YYYY-MM-DDTHH:mm:ssZ", W = T.z(this), Q = this.$H, O = this.$m, Z = this.$M, eA = p.weekdays, dA = p.months, qA = p.meridiem, XA = function(tA, lA, WA, SA) {
229
- return tA && (tA[lA] || tA(V, m)) || WA[lA].slice(0, SA);
230
- }, VA = function(tA) {
231
- return T.s(Q % 12 || 12, tA, "0");
232
- }, EA = qA || function(tA, lA, WA) {
233
- var SA = tA < 12 ? "AM" : "PM";
227
+ if (!this.isValid()) return p.invalidDate || K;
228
+ var m = l || "YYYY-MM-DDTHH:mm:ssZ", W = L.z(this), y = this.$H, O = this.$m, Z = this.$M, $ = p.weekdays, vA = p.months, qA = p.meridiem, XA = function(eA, uA, WA, SA) {
229
+ return eA && (eA[uA] || eA(V, m)) || WA[uA].slice(0, SA);
230
+ }, VA = function(eA) {
231
+ return L.s(y % 12 || 12, eA, "0");
232
+ }, EA = qA || function(eA, uA, WA) {
233
+ var SA = eA < 12 ? "AM" : "PM";
234
234
  return WA ? SA.toLowerCase() : SA;
235
235
  };
236
- return m.replace(k, function(tA, lA) {
237
- return lA || function(WA) {
236
+ return m.replace(B, function(eA, uA) {
237
+ return uA || function(WA) {
238
238
  switch (WA) {
239
239
  case "YY":
240
240
  return String(V.$y).slice(-2);
241
241
  case "YYYY":
242
- return T.s(V.$y, 4, "0");
242
+ return L.s(V.$y, 4, "0");
243
243
  case "M":
244
244
  return Z + 1;
245
245
  case "MM":
246
- return T.s(Z + 1, 2, "0");
246
+ return L.s(Z + 1, 2, "0");
247
247
  case "MMM":
248
- return XA(p.monthsShort, Z, dA, 3);
248
+ return XA(p.monthsShort, Z, vA, 3);
249
249
  case "MMMM":
250
- return XA(dA, Z);
250
+ return XA(vA, Z);
251
251
  case "D":
252
252
  return V.$D;
253
253
  case "DD":
254
- return T.s(V.$D, 2, "0");
254
+ return L.s(V.$D, 2, "0");
255
255
  case "d":
256
256
  return String(V.$W);
257
257
  case "dd":
258
- return XA(p.weekdaysMin, V.$W, eA, 2);
258
+ return XA(p.weekdaysMin, V.$W, $, 2);
259
259
  case "ddd":
260
- return XA(p.weekdaysShort, V.$W, eA, 3);
260
+ return XA(p.weekdaysShort, V.$W, $, 3);
261
261
  case "dddd":
262
- return eA[V.$W];
262
+ return $[V.$W];
263
263
  case "H":
264
- return String(Q);
264
+ return String(y);
265
265
  case "HH":
266
- return T.s(Q, 2, "0");
266
+ return L.s(y, 2, "0");
267
267
  case "h":
268
268
  return VA(1);
269
269
  case "hh":
270
270
  return VA(2);
271
271
  case "a":
272
- return EA(Q, O, !0);
272
+ return EA(y, O, !0);
273
273
  case "A":
274
- return EA(Q, O, !1);
274
+ return EA(y, O, !1);
275
275
  case "m":
276
276
  return String(O);
277
277
  case "mm":
278
- return T.s(O, 2, "0");
278
+ return L.s(O, 2, "0");
279
279
  case "s":
280
280
  return String(V.$s);
281
281
  case "ss":
282
- return T.s(V.$s, 2, "0");
282
+ return L.s(V.$s, 2, "0");
283
283
  case "SSS":
284
- return T.s(V.$ms, 3, "0");
284
+ return L.s(V.$ms, 3, "0");
285
285
  case "Z":
286
286
  return W;
287
287
  }
288
288
  return null;
289
- }(tA) || W.replace(":", "");
289
+ }(eA) || W.replace(":", "");
290
290
  });
291
291
  }, o.utcOffset = function() {
292
292
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
293
293
  }, o.diff = function(l, V, p) {
294
- var m, W = this, Q = T.p(V), O = L(l), Z = (O.utcOffset() - this.utcOffset()) * i, eA = this - O, dA = function() {
295
- return T.m(W, O);
294
+ var m, W = this, y = L.p(V), O = Q(l), Z = (O.utcOffset() - this.utcOffset()) * i, $ = this - O, vA = function() {
295
+ return L.m(W, O);
296
296
  };
297
- switch (Q) {
297
+ switch (y) {
298
298
  case E:
299
- m = dA() / 12;
299
+ m = vA() / 12;
300
300
  break;
301
301
  case P:
302
- m = dA();
302
+ m = vA();
303
303
  break;
304
- case H:
305
- m = dA() / 3;
304
+ case T:
305
+ m = vA() / 3;
306
306
  break;
307
- case B:
308
- m = (eA - Z) / 6048e5;
307
+ case Y:
308
+ m = ($ - Z) / 6048e5;
309
309
  break;
310
310
  case F:
311
- m = (eA - Z) / 864e5;
311
+ m = ($ - Z) / 864e5;
312
312
  break;
313
- case C:
314
- m = eA / v;
313
+ case R:
314
+ m = $ / v;
315
315
  break;
316
316
  case f:
317
- m = eA / i;
317
+ m = $ / i;
318
318
  break;
319
319
  case d:
320
- m = eA / A;
320
+ m = $ / A;
321
321
  break;
322
322
  default:
323
- m = eA;
323
+ m = $;
324
324
  }
325
- return p ? m : T.a(m);
325
+ return p ? m : L.a(m);
326
326
  }, o.daysInMonth = function() {
327
327
  return this.endOf(P).$D;
328
328
  }, o.$locale = function() {
329
- return z[this.$L];
329
+ return k[this.$L];
330
330
  }, o.locale = function(l, V) {
331
331
  if (!l) return this.$L;
332
- var p = this.clone(), m = vA(l, V, !0);
332
+ var p = this.clone(), m = sA(l, V, !0);
333
333
  return m && (p.$L = m), p;
334
334
  }, o.clone = function() {
335
- return T.w(this.$d, this);
335
+ return L.w(this.$d, this);
336
336
  }, o.toDate = function() {
337
337
  return new Date(this.valueOf());
338
338
  }, o.toJSON = function() {
@@ -342,23 +342,23 @@ var fr = { exports: {} };
342
342
  }, o.toString = function() {
343
343
  return this.$d.toUTCString();
344
344
  }, b;
345
- }(), D = R.prototype;
346
- return L.prototype = D, [["$ms", a], ["$s", d], ["$m", f], ["$H", C], ["$W", F], ["$M", P], ["$y", E], ["$D", K]].forEach(function(b) {
345
+ }(), D = g.prototype;
346
+ return Q.prototype = D, [["$ms", a], ["$s", d], ["$m", f], ["$H", R], ["$W", F], ["$M", P], ["$y", E], ["$D", C]].forEach(function(b) {
347
347
  D[b[1]] = function(o) {
348
348
  return this.$g(o, b[0], b[1]);
349
349
  };
350
- }), L.extend = function(b, o) {
351
- return b.$i || (b(o, R, L), b.$i = !0), L;
352
- }, L.locale = vA, L.isDayjs = AA, L.unix = function(b) {
353
- return L(1e3 * b);
354
- }, L.en = z[S], L.Ls = z, L.p = {}, L;
350
+ }), Q.extend = function(b, o) {
351
+ return b.$i || (b(o, g, Q), b.$i = !0), Q;
352
+ }, Q.locale = sA, Q.isDayjs = aA, Q.unix = function(b) {
353
+ return Q(1e3 * b);
354
+ }, Q.en = k[U], Q.Ls = k, Q.p = {}, Q;
355
355
  });
356
356
  })(fr);
357
357
  var Nr = fr.exports;
358
- const IA = /* @__PURE__ */ Or(Nr), ce = () => ({
358
+ const cA = /* @__PURE__ */ Or(Nr), ce = () => ({
359
359
  mapFromDto: (A) => ({
360
360
  ...A,
361
- lastUpdate: A.lastUpdate ? IA(A.lastUpdate) : void 0,
361
+ lastUpdate: A.lastUpdate ? cA(A.lastUpdate) : void 0,
362
362
  zipCode: A.zipCode ? Se().mapFromDto(A.zipCode) : void 0
363
363
  }),
364
364
  mapToDto: (A) => ({
@@ -390,7 +390,7 @@ const IA = /* @__PURE__ */ Or(Nr), ce = () => ({
390
390
  }), qe = () => ({
391
391
  mapFromDto: (A) => ({
392
392
  ...A,
393
- lastUpdate: A.lastUpdate ? IA(A.lastUpdate) : void 0
393
+ lastUpdate: A.lastUpdate ? cA(A.lastUpdate) : void 0
394
394
  }),
395
395
  mapToDto: (A) => ({
396
396
  ...A,
@@ -401,7 +401,7 @@ var Br = /* @__PURE__ */ ((e) => (e[e.Particular = 1] = "Particular", e[e.Labora
401
401
  const Xe = () => ({
402
402
  mapFromDto: (A) => ({
403
403
  ...A,
404
- lastUpdate: A.lastUpdate ? IA(A.lastUpdate) : void 0,
404
+ lastUpdate: A.lastUpdate ? cA(A.lastUpdate) : void 0,
405
405
  plan: A.plan ? _A().mapFromDto(A.plan) : void 0
406
406
  }),
407
407
  mapToDto: (A) => ({
@@ -419,9 +419,9 @@ const Xe = () => ({
419
419
  }), be = () => ({
420
420
  mapFromDto: (A) => ({
421
421
  ...A,
422
- startDate: A.startDate ? IA(A.startDate) : void 0,
423
- endDate: A.endDate ? IA(A.endDate) : void 0,
424
- lastUpdate: A.lastUpdate ? IA(A.lastUpdate) : void 0,
422
+ startDate: A.startDate ? cA(A.startDate) : void 0,
423
+ endDate: A.endDate ? cA(A.endDate) : void 0,
424
+ lastUpdate: A.lastUpdate ? cA(A.lastUpdate) : void 0,
425
425
  origin: A.origin ? xe().mapFromDto(A.origin) : void 0,
426
426
  familyGroup: A.familyGroup ? Xe().mapFromDto(A.familyGroup) : void 0,
427
427
  relationship: A.relationship ? We().mapFromDto(A.relationship) : void 0,
@@ -457,9 +457,9 @@ const Xe = () => ({
457
457
  mapFromDto: (A) => ({
458
458
  ...A,
459
459
  address: A.address ? ce().mapFromDto(A.address) : void 0,
460
- birthdate: A.birthdate ? IA(A.birthdate) : void 0,
460
+ birthdate: A.birthdate ? cA(A.birthdate) : void 0,
461
461
  documentType: A.documentType ? pe().mapFromDto(A.documentType) : void 0,
462
- lastUpdate: A.lastUpdate ? IA(A.lastUpdate) : void 0,
462
+ lastUpdate: A.lastUpdate ? cA(A.lastUpdate) : void 0,
463
463
  maritalStatus: A.maritalStatus ? Ve().mapFromDto(A.maritalStatus) : void 0,
464
464
  membership: A.membership ? be().mapFromDto(A.membership) : void 0,
465
465
  nationality: A.nationality ? he().mapFromDto(A.nationality) : void 0,
@@ -481,7 +481,7 @@ const Xe = () => ({
481
481
  }), Pe = () => ({
482
482
  mapFromDto: (A) => ({
483
483
  ...A,
484
- lastUpdate: A.lastUpdate ? IA(A.lastUpdate) : void 0
484
+ lastUpdate: A.lastUpdate ? cA(A.lastUpdate) : void 0
485
485
  }),
486
486
  mapToDto: (A) => ({
487
487
  ...A,
@@ -521,7 +521,7 @@ const Xe = () => ({
521
521
  mapFromDto: (A) => ({
522
522
  archivada: A.archivada,
523
523
  destacada: A.destacada,
524
- fecha: IA(A.fecha),
524
+ fecha: cA(A.fecha),
525
525
  idNotificacion: A.idNotificacion,
526
526
  idPersona: A.idPersona,
527
527
  ssoUserId: A.ssoUserId,
@@ -567,7 +567,7 @@ const Xe = () => ({
567
567
  username: A.username,
568
568
  nombre: A.nombre,
569
569
  apellido: A.apellido,
570
- fechaBaja: IA(A.fechaBaja),
570
+ fechaBaja: cA(A.fechaBaja),
571
571
  idEntidad: A.idEntidad,
572
572
  idUsuarioSAP: A.idUsuarioSAP,
573
573
  businessPartner: A.businessPartner ? Ue().mapFromDto(A.businessPartner) : void 0
@@ -588,34 +588,34 @@ const Xe = () => ({
588
588
  children: A,
589
589
  oidcConfig: i
590
590
  }) => {
591
- const [v, a] = M(e), [d, f] = M(""), [C, F] = M(null), [B, P] = M([]), [H, E] = M(void 0), K = yA((X) => {
592
- a(X);
593
- }, []), U = yA((X) => {
594
- f(X);
595
- }, []), Y = yA((X) => {
596
- F(X);
597
- }, []), k = async (X) => {
598
- if (B.length && !X)
599
- return B;
600
- const S = await Mr();
601
- return P(S || []), new Promise((z) => {
602
- z(S || []);
591
+ const [v, a] = M(e), [d, f] = M(""), [R, F] = M(null), [Y, P] = M([]), [T, E] = M(void 0), C = yA((S) => {
592
+ a(S);
593
+ }, []), K = yA((S) => {
594
+ f(S);
595
+ }, []), z = yA((S) => {
596
+ F(S);
597
+ }, []), B = async (S) => {
598
+ if (Y.length && !S)
599
+ return Y;
600
+ const U = await Mr();
601
+ return P(U || []), new Promise((k) => {
602
+ k(U || []);
603
603
  });
604
- }, g = je(
604
+ }, X = je(
605
605
  () => ({
606
- setAppTitle: K,
607
- setTabTitle: U,
608
- setAppHeaderTools: Y,
609
- getCareLevels: k
606
+ setAppTitle: C,
607
+ setTabTitle: K,
608
+ setAppHeaderTools: z,
609
+ getCareLevels: B
610
610
  }),
611
- [K, U, Y]
612
- ), $ = yA(
613
- (X) => {
614
- E(X), Ur(() => X?.token?.token);
611
+ [C, K, z]
612
+ ), H = yA(
613
+ (S) => {
614
+ E(S), Ur(() => S?.token?.token);
615
615
  },
616
616
  []
617
617
  );
618
- return /* @__PURE__ */ I(dr.Provider, { value: g, children: /* @__PURE__ */ I(
618
+ return /* @__PURE__ */ I(dr.Provider, { value: X, children: /* @__PURE__ */ I(
619
619
  Sr,
620
620
  {
621
621
  appTitle: v,
@@ -623,9 +623,9 @@ const Xe = () => ({
623
623
  tabTitle: d,
624
624
  oidcSettings: i,
625
625
  requiredPermissions: ["afiliados.ver"],
626
- appHeaderTools: C,
627
- onAuthChanged: $,
628
- children: H?.token?.token ? A : null
626
+ appHeaderTools: R,
627
+ onAuthChanged: H,
628
+ children: T?.token?.token ? A : null
629
629
  }
630
630
  ) });
631
631
  }, ge = () => {
@@ -635,62 +635,70 @@ const Xe = () => ({
635
635
  const e = /* @__PURE__ */ new Date();
636
636
  return e.getFullYear() * 100 + (e.getMonth() + 1);
637
637
  }, Ce = () => {
638
- const [e, r] = M("chart"), [A, i] = M([]), [v, a] = M(
639
- ge()
640
- ), [d, f] = M(
641
- Re()
642
- ), [C, F] = M([]), { getCareLevels: B } = Me(dr), [P, H] = M([]), [E, K] = M([]), [U] = er(), Y = Ze(""), k = ee({
638
+ const [e, r] = M("chart"), [A, i] = M([]), [v] = er(), [a, d] = M({
639
+ periodoDesde: Number(
640
+ v.get("periodoDesde") || ge()
641
+ ),
642
+ periodoHasta: Number(
643
+ v.get("periodoHasta") || Re()
644
+ ),
645
+ nivelDeAtencion: v.get("nivelDeAtencion") || ""
646
+ }), [f, R] = M([]), { getCareLevels: F } = Me(dr), [Y, P] = M([]), [T, E] = M([]), C = Ze(""), K = ee({
643
647
  errorMessage: "Error al cargar las afiliaciones por período y nivel de atención"
644
648
  });
645
649
  mA(() => {
646
- const X = Number(U.get("periodoDesde") || ge()), S = Number(U.get("periodoHasta") || Re());
647
- a(X), f(S);
648
- const z = U.get("nivelDeAtencion") || "", w = `${X}-${S}-${z}`;
649
- if (Y.current !== w) {
650
- Y.current = w;
651
- const AA = {
650
+ const X = Number(
651
+ v.get("periodoDesde") || ge()
652
+ ), H = Number(
653
+ v.get("periodoHasta") || Re()
654
+ ), S = v.get("nivelDeAtencion") || "";
655
+ d({ periodoDesde: X, periodoHasta: H, nivelDeAtencion: S });
656
+ const U = `${X}-${H}-${S}`;
657
+ if (C.current !== U) {
658
+ C.current = U;
659
+ const k = {
652
660
  periodoDesde: X,
653
- periodoHasta: S
661
+ periodoHasta: H
654
662
  };
655
- z && (AA.nivelDeAtencion = z), $(AA);
663
+ S && (k.nivelDeAtencion = S), B(k);
656
664
  }
657
- }, [U]), mA(() => {
658
- B().then((X) => {
659
- H(X);
665
+ }, [v]), mA(() => {
666
+ F().then((X) => {
667
+ P(X);
660
668
  });
661
669
  }, []);
662
- const g = () => {
663
- const X = U.get("nivelDeAtencion")?.split("|") || [], S = X.length > 0 ? P.filter((w) => X.includes(w.id.toString())) : P;
664
- return A.map((w) => {
665
- const AA = {
666
- name: w
670
+ const z = () => {
671
+ const X = a.nivelDeAtencion ? a.nivelDeAtencion.split("|") : [], H = X.length > 0 ? Y.filter((U) => X.includes(U.id.toString())) : Y;
672
+ return A.map((U) => {
673
+ const k = {
674
+ name: U
667
675
  };
668
- return S.forEach((vA) => {
669
- const L = C.find(
670
- (T) => T.periodo === w && T.idNivelDeAtencion === vA.id
676
+ return H.forEach((IA) => {
677
+ const aA = f.find(
678
+ (sA) => sA.periodo === U && sA.idNivelDeAtencion === IA.id
671
679
  );
672
- AA[`plan-${vA.id}`] = L ? L.cantidadAfiliados : 0;
673
- }), AA;
680
+ k[`plan-${IA.id}`] = aA ? aA.cantidadAfiliados : 0;
681
+ }), k;
674
682
  });
675
- }, $ = async (X) => {
676
- const S = await k.execute(
683
+ }, B = async (X) => {
684
+ const H = await K.execute(
677
685
  () => KA.get({
678
686
  url: "https://intranet.osocna.com.ar/kpi/backend/api/KPI/NivelDeAtencion/AfiliacionesPorPeriodo",
679
687
  params: X
680
688
  })
681
689
  );
682
- if (S) {
683
- F(S);
684
- const z = [...new Set(S.map((w) => w.periodo))].sort(
685
- (w, AA) => w - AA
690
+ if (H) {
691
+ R(H);
692
+ const S = [...new Set(H.map((U) => U.periodo))].sort(
693
+ (U, k) => U - k
686
694
  );
687
- i(z);
695
+ i(S);
688
696
  }
689
697
  };
690
698
  return mA(() => {
691
- const X = U.get("nivelDeAtencion")?.split("|") || [], S = X.length > 0 ? P.filter((w) => X.includes(w.id.toString())) : P, z = [...new Set(C.map((w) => w.idNivelDeAtencion))];
692
- K(S.filter((w) => z.includes(w.id)));
693
- }, [C, P, U]), /* @__PURE__ */ I(
699
+ const X = a.nivelDeAtencion ? a.nivelDeAtencion.split("|") : [], H = X.length > 0 ? Y.filter((U) => X.includes(U.id.toString())) : Y, S = [...new Set(f.map((U) => U.idNivelDeAtencion))];
700
+ E(H.filter((U) => S.includes(U.id)));
701
+ }, [f, Y, a.nivelDeAtencion]), /* @__PURE__ */ I(
694
702
  re,
695
703
  {
696
704
  title: "Afiliaciones por periodo y nivel de atención",
@@ -706,15 +714,15 @@ const Xe = () => ({
706
714
  onOptionSelected: (X) => r(X.value)
707
715
  }
708
716
  ),
709
- children: /* @__PURE__ */ sA(PA, { children: [
710
- /* @__PURE__ */ sA(PA, { direction: "row", children: [
717
+ children: /* @__PURE__ */ nA(PA, { children: [
718
+ /* @__PURE__ */ nA(PA, { direction: "row", children: [
711
719
  /* @__PURE__ */ I(
712
720
  HA,
713
721
  {
714
722
  filterType: "number",
715
723
  label: "Periodo desde",
716
724
  paramName: "periodoDesde",
717
- value: v.toString()
725
+ value: a.periodoDesde.toString()
718
726
  }
719
727
  ),
720
728
  /* @__PURE__ */ I(
@@ -723,7 +731,7 @@ const Xe = () => ({
723
731
  filterType: "number",
724
732
  label: "Periodo hasta",
725
733
  paramName: "periodoHasta",
726
- value: d.toString()
734
+ value: a.periodoHasta.toString()
727
735
  }
728
736
  ),
729
737
  /* @__PURE__ */ I(
@@ -733,8 +741,8 @@ const Xe = () => ({
733
741
  multiple: !0,
734
742
  label: "Nivel de atención",
735
743
  paramName: "nivelDeAtencion",
736
- value: U.get("nivelDeAtencion") || "",
737
- options: P.map((X) => ({
744
+ value: a.nivelDeAtencion,
745
+ options: Y.map((X) => ({
738
746
  label: X.name || `Plan ${X.id}`,
739
747
  value: X.id.toString()
740
748
  }))
@@ -750,10 +758,10 @@ const Xe = () => ({
750
758
  maxHeight: "70vh",
751
759
  aspectRatio: 1.618
752
760
  },
753
- children: /* @__PURE__ */ I(rr, { width: "100%", height: "100%", children: /* @__PURE__ */ sA(
761
+ children: /* @__PURE__ */ I(rr, { width: "100%", height: "100%", children: /* @__PURE__ */ nA(
754
762
  tr,
755
763
  {
756
- data: g(),
764
+ data: z(),
757
765
  className: "focus:outline-none",
758
766
  style: { outline: "none" },
759
767
  margin: {
@@ -768,7 +776,7 @@ const Xe = () => ({
768
776
  /* @__PURE__ */ I(ar, {}),
769
777
  /* @__PURE__ */ I(sr, {}),
770
778
  /* @__PURE__ */ I(vr, {}),
771
- E.map((X, S) => /* @__PURE__ */ I(
779
+ T.map((X, H) => /* @__PURE__ */ I(
772
780
  GA,
773
781
  {
774
782
  dataKey: `plan-${X.id}`,
@@ -783,7 +791,7 @@ const Xe = () => ({
783
791
  "#00c49f",
784
792
  "#ffbb28",
785
793
  "#fb8072"
786
- ][S % 8],
794
+ ][H % 8],
787
795
  background: !0
788
796
  },
789
797
  X.id
@@ -796,13 +804,13 @@ const Xe = () => ({
796
804
  Ge,
797
805
  {
798
806
  compact: !0,
799
- rows: g(),
807
+ rows: z(),
800
808
  columns: [
801
809
  { header: "Periodo", value: (X) => X.name },
802
- ...E.map((X) => ({
810
+ ...T.map((X) => ({
803
811
  header: X.name || `Plan ${X.id}`,
804
812
  align: "right",
805
- value: (S) => S[`plan-${X.id}`]
813
+ value: (H) => H[`plan-${X.id}`]
806
814
  }))
807
815
  ]
808
816
  }
@@ -836,19 +844,19 @@ const Xe = () => ({
836
844
  const e = /* @__PURE__ */ new Date();
837
845
  return e.getFullYear() * 100 + (e.getMonth() + 1);
838
846
  }, Fe = () => {
839
- const [e, r] = M([]), [A, i] = M("chart"), [v, a] = M(Te()), [d, f] = M(Ke()), [C] = er(), F = Ze(""), B = ee({
847
+ const [e, r] = M([]), [A, i] = M("chart"), [v, a] = M(Te()), [d, f] = M(Ke()), [R] = er(), F = Ze(""), Y = ee({
840
848
  errorMessage: "Error al cargar las estadísticas de altas"
841
849
  });
842
850
  mA(() => {
843
- const E = Number(C.get("periodoDesde") || Te()), K = Number(C.get("periodoHasta") || Ke());
844
- a(E), f(K);
845
- const U = `${E}-${K}`;
846
- F.current !== U && (F.current = U, P(E, K));
847
- }, [C]);
848
- const P = async (E, K) => {
849
- const U = await B.execute(() => _r({ periodoDesde: E, periodoHasta: K }));
850
- U && r(U);
851
- }, H = e.map((E) => ({ ...E, period: String(E.period) }));
851
+ const E = Number(R.get("periodoDesde") || Te()), C = Number(R.get("periodoHasta") || Ke());
852
+ a(E), f(C);
853
+ const K = `${E}-${C}`;
854
+ F.current !== K && (F.current = K, P(E, C));
855
+ }, [R]);
856
+ const P = async (E, C) => {
857
+ const K = await Y.execute(() => _r({ periodoDesde: E, periodoHasta: C }));
858
+ K && r(K);
859
+ }, T = e.map((E) => ({ ...E, period: String(E.period) }));
852
860
  return /* @__PURE__ */ I(JA, { children: /* @__PURE__ */ I(
853
861
  re,
854
862
  {
@@ -865,8 +873,8 @@ const Xe = () => ({
865
873
  onOptionSelected: (E) => i(E.value)
866
874
  }
867
875
  ),
868
- children: /* @__PURE__ */ sA(PA, { children: [
869
- /* @__PURE__ */ sA(PA, { direction: "row", children: [
876
+ children: /* @__PURE__ */ nA(PA, { children: [
877
+ /* @__PURE__ */ nA(PA, { direction: "row", children: [
870
878
  /* @__PURE__ */ I(
871
879
  HA,
872
880
  {
@@ -895,10 +903,10 @@ const Xe = () => ({
895
903
  maxHeight: "70vh",
896
904
  aspectRatio: 1.618
897
905
  },
898
- children: /* @__PURE__ */ I(rr, { width: "100%", height: "100%", children: /* @__PURE__ */ sA(
906
+ children: /* @__PURE__ */ I(rr, { width: "100%", height: "100%", children: /* @__PURE__ */ nA(
899
907
  tr,
900
908
  {
901
- data: H,
909
+ data: T,
902
910
  className: "focus:outline-none",
903
911
  style: { outline: "none" },
904
912
  margin: { top: 20, right: 30, left: 20, bottom: 5 },
@@ -918,7 +926,7 @@ const Xe = () => ({
918
926
  Ge,
919
927
  {
920
928
  compact: !0,
921
- rows: H,
929
+ rows: T,
922
930
  columns: [
923
931
  { header: "Periodo", value: (E) => E.period, align: "left" },
924
932
  { header: "Procesados", value: (E) => E.processed, align: "right" },
@@ -973,7 +981,7 @@ const Xe = () => ({
973
981
  ] : void 0,
974
982
  className: "w-full",
975
983
  subtitle: /* @__PURE__ */ I("span", { className: "text-xs", children: e.persona.name }),
976
- footer: /* @__PURE__ */ sA("div", { className: "flex justify-between items-center w-full", children: [
984
+ footer: /* @__PURE__ */ nA("div", { className: "flex justify-between items-center w-full", children: [
977
985
  /* @__PURE__ */ I("span", { className: "text-xs", children: e.fecha.format("DD/MM/YYYY") }),
978
986
  /* @__PURE__ */ I("div", { children: /* @__PURE__ */ I(gr, { renderNode: /* @__PURE__ */ I(Rr, { size: "sm", text: "Juan Pablo" }), children: "TEST" }) })
979
987
  ] }),
@@ -981,13 +989,13 @@ const Xe = () => ({
981
989
  }
982
990
  );
983
991
  };
984
- var QA = (e) => e.type === "checkbox", gA = (e) => e instanceof Date, fA = (e) => e == null;
992
+ var QA = (e) => e.type === "checkbox", gA = (e) => e instanceof Date, dA = (e) => e == null;
985
993
  const ur = (e) => typeof e == "object";
986
- var _ = (e) => !fA(e) && !Array.isArray(e) && ur(e) && !gA(e), $r = (e) => _(e) && e.target ? QA(e.target) ? e.target.checked : e.target.value : e, At = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, et = (e, r) => e.has(At(r)), rt = (e) => {
994
+ var _ = (e) => !dA(e) && !Array.isArray(e) && ur(e) && !gA(e), $r = (e) => _(e) && e.target ? QA(e.target) ? e.target.checked : e.target.value : e, At = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, et = (e, r) => e.has(At(r)), rt = (e) => {
987
995
  const r = e.constructor && e.constructor.prototype;
988
996
  return _(r) && r.hasOwnProperty("isPrototypeOf");
989
997
  }, te = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
990
- function rA(e) {
998
+ function AA(e) {
991
999
  if (e instanceof Date)
992
1000
  return new Date(e);
993
1001
  const r = typeof FileList < "u" && e instanceof FileList;
@@ -998,33 +1006,33 @@ function rA(e) {
998
1006
  return e;
999
1007
  const i = A ? [] : Object.create(Object.getPrototypeOf(e));
1000
1008
  for (const v in e)
1001
- Object.prototype.hasOwnProperty.call(e, v) && (i[v] = rA(e[v]));
1009
+ Object.prototype.hasOwnProperty.call(e, v) && (i[v] = AA(e[v]));
1002
1010
  return i;
1003
1011
  }
1004
1012
  var OA = (e) => /^\w*$/.test(e), j = (e) => e === void 0, ie = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ne = (e) => ie(e.replace(/["|']|\]/g, "").split(/\.|\[/)), h = (e, r, A) => {
1005
1013
  if (!r || !_(e))
1006
1014
  return A;
1007
- const i = (OA(r) ? [r] : ne(r)).reduce((v, a) => fA(v) ? v : v[a], e);
1015
+ const i = (OA(r) ? [r] : ne(r)).reduce((v, a) => dA(v) ? v : v[a], e);
1008
1016
  return j(i) || i === e ? j(e[r]) ? A : e[r] : i;
1009
- }, pA = (e) => typeof e == "boolean", oA = (e) => typeof e == "function", N = (e, r, A) => {
1017
+ }, pA = (e) => typeof e == "boolean", lA = (e) => typeof e == "function", N = (e, r, A) => {
1010
1018
  let i = -1;
1011
1019
  const v = OA(r) ? [r] : ne(r), a = v.length, d = a - 1;
1012
1020
  for (; ++i < a; ) {
1013
1021
  const f = v[i];
1014
- let C = A;
1022
+ let R = A;
1015
1023
  if (i !== d) {
1016
1024
  const F = e[f];
1017
- C = _(F) || Array.isArray(F) ? F : isNaN(+v[i + 1]) ? {} : [];
1025
+ R = _(F) || Array.isArray(F) ? F : isNaN(+v[i + 1]) ? {} : [];
1018
1026
  }
1019
1027
  if (f === "__proto__" || f === "constructor" || f === "prototype")
1020
1028
  return;
1021
- e[f] = C, e = e[f];
1029
+ e[f] = R, e = e[f];
1022
1030
  }
1023
1031
  };
1024
1032
  const Le = {
1025
1033
  BLUR: "blur",
1026
1034
  FOCUS_OUT: "focusout"
1027
- }, cA = {
1035
+ }, oA = {
1028
1036
  onBlur: "onBlur",
1029
1037
  onChange: "onChange",
1030
1038
  onSubmit: "onSubmit",
@@ -1038,7 +1046,7 @@ const Le = {
1038
1046
  pattern: "pattern",
1039
1047
  required: "required",
1040
1048
  validate: "validate"
1041
- }, lr = iA.createContext(null);
1049
+ }, lr = rA.createContext(null);
1042
1050
  lr.displayName = "HookFormControlContext";
1043
1051
  var tt = (e, r, A, i = !0) => {
1044
1052
  const v = {
@@ -1048,13 +1056,13 @@ var tt = (e, r, A, i = !0) => {
1048
1056
  Object.defineProperty(v, a, {
1049
1057
  get: () => {
1050
1058
  const d = a;
1051
- return r._proxyFormState[d] !== cA.all && (r._proxyFormState[d] = !i || cA.all), e[d];
1059
+ return r._proxyFormState[d] !== oA.all && (r._proxyFormState[d] = !i || oA.all), e[d];
1052
1060
  }
1053
1061
  });
1054
1062
  return v;
1055
1063
  };
1056
- const it = typeof window < "u" ? iA.useLayoutEffect : iA.useEffect;
1057
- var uA = (e) => typeof e == "string", nt = (e, r, A, i, v) => uA(e) ? (i && r.watch.add(e), h(A, e, v)) : Array.isArray(e) ? e.map((a) => (i && r.watch.add(a), h(A, a))) : (i && (r.watchAll = !0), A), $A = (e) => fA(e) || !ur(e);
1064
+ const it = typeof window < "u" ? rA.useLayoutEffect : rA.useEffect;
1065
+ var fA = (e) => typeof e == "string", nt = (e, r, A, i, v) => fA(e) ? (i && r.watch.add(e), h(A, e, v)) : Array.isArray(e) ? e.map((a) => (i && r.watch.add(a), h(A, a))) : (i && (r.watchAll = !0), A), $A = (e) => dA(e) || !ur(e);
1058
1066
  function xA(e, r, A = /* @__PURE__ */ new WeakSet()) {
1059
1067
  if ($A(e) || $A(r))
1060
1068
  return Object.is(e, r);
@@ -1078,48 +1086,48 @@ function xA(e, r, A = /* @__PURE__ */ new WeakSet()) {
1078
1086
  }
1079
1087
  return !0;
1080
1088
  }
1081
- const or = iA.createContext(null);
1089
+ const or = rA.createContext(null);
1082
1090
  or.displayName = "HookFormContext";
1083
1091
  const at = (e) => {
1084
- const { children: r, watch: A, getValues: i, getFieldState: v, setError: a, clearErrors: d, setValue: f, trigger: C, formState: F, resetField: B, reset: P, handleSubmit: H, unregister: E, control: K, register: U, setFocus: Y, subscribe: k } = e;
1085
- return iA.createElement(
1092
+ const { children: r, watch: A, getValues: i, getFieldState: v, setError: a, clearErrors: d, setValue: f, trigger: R, formState: F, resetField: Y, reset: P, handleSubmit: T, unregister: E, control: C, register: K, setFocus: z, subscribe: B } = e;
1093
+ return rA.createElement(
1086
1094
  or.Provider,
1087
- { value: iA.useMemo(() => ({
1095
+ { value: rA.useMemo(() => ({
1088
1096
  watch: A,
1089
1097
  getValues: i,
1090
1098
  getFieldState: v,
1091
1099
  setError: a,
1092
1100
  clearErrors: d,
1093
1101
  setValue: f,
1094
- trigger: C,
1102
+ trigger: R,
1095
1103
  formState: F,
1096
- resetField: B,
1104
+ resetField: Y,
1097
1105
  reset: P,
1098
- handleSubmit: H,
1106
+ handleSubmit: T,
1099
1107
  unregister: E,
1100
- control: K,
1101
- register: U,
1102
- setFocus: Y,
1103
- subscribe: k
1108
+ control: C,
1109
+ register: K,
1110
+ setFocus: z,
1111
+ subscribe: B
1104
1112
  }), [
1105
1113
  d,
1106
- K,
1114
+ C,
1107
1115
  F,
1108
1116
  v,
1109
1117
  i,
1110
- H,
1111
- U,
1118
+ T,
1119
+ K,
1112
1120
  P,
1113
- B,
1114
- a,
1115
1121
  Y,
1122
+ a,
1123
+ z,
1116
1124
  f,
1117
- k,
1118
- C,
1125
+ B,
1126
+ R,
1119
1127
  E,
1120
1128
  A
1121
1129
  ]) },
1122
- iA.createElement(lr.Provider, { value: K }, r)
1130
+ rA.createElement(lr.Provider, { value: C }, r)
1123
1131
  );
1124
1132
  };
1125
1133
  var st = (e, r, A, i, v) => r ? {
@@ -1160,7 +1168,7 @@ function cr(e, r) {
1160
1168
  }
1161
1169
  return A;
1162
1170
  }
1163
- var aA = (e) => _(e) && !Object.keys(e).length, ae = (e) => e.type === "file", YA = (e) => {
1171
+ var iA = (e) => _(e) && !Object.keys(e).length, ae = (e) => e.type === "file", YA = (e) => {
1164
1172
  if (!te)
1165
1173
  return !1;
1166
1174
  const r = e ? e.ownerDocument : 0;
@@ -1181,11 +1189,11 @@ function ft(e) {
1181
1189
  }
1182
1190
  function G(e, r) {
1183
1191
  const A = Array.isArray(r) ? r : OA(r) ? [r] : ne(r), i = A.length === 1 ? e : dt(e, A), v = A.length - 1, a = A[v];
1184
- return i && delete i[a], v !== 0 && (_(i) && aA(i) || Array.isArray(i) && ft(i)) && G(e, A.slice(0, -1)), e;
1192
+ return i && delete i[a], v !== 0 && (_(i) && iA(i) || Array.isArray(i) && ft(i)) && G(e, A.slice(0, -1)), e;
1185
1193
  }
1186
1194
  var ut = (e) => {
1187
1195
  for (const r in e)
1188
- if (oA(e[r]))
1196
+ if (lA(e[r]))
1189
1197
  return !0;
1190
1198
  return !1;
1191
1199
  };
@@ -1204,7 +1212,7 @@ function CA(e, r, A) {
1204
1212
  for (const i in e) {
1205
1213
  const v = e[i];
1206
1214
  if (Er(v))
1207
- j(r) || $A(A[i]) ? A[i] = Ae(v, Array.isArray(v) ? [] : {}) : CA(v, fA(r) ? {} : r[i], A[i]);
1215
+ j(r) || $A(A[i]) ? A[i] = Ae(v, Array.isArray(v) ? [] : {}) : CA(v, dA(r) ? {} : r[i], A[i]);
1208
1216
  else {
1209
1217
  const a = r[i];
1210
1218
  A[i] = !xA(v, a);
@@ -1228,7 +1236,7 @@ var pr = (e) => {
1228
1236
  ) : Qe;
1229
1237
  }
1230
1238
  return Qe;
1231
- }, qr = (e, { valueAsNumber: r, valueAsDate: A, setValueAs: i }) => j(e) ? e : r ? e === "" ? NaN : e && +e : A && uA(e) ? new Date(e) : i ? i(e) : e;
1239
+ }, qr = (e, { valueAsNumber: r, valueAsDate: A, setValueAs: i }) => j(e) ? e : r ? e === "" ? NaN : e && +e : A && fA(e) ? new Date(e) : i ? i(e) : e;
1232
1240
  const Je = {
1233
1241
  isValid: !1,
1234
1242
  value: null
@@ -1254,14 +1262,14 @@ var lt = (e, r, A, i) => {
1254
1262
  shouldUseNativeValidation: i
1255
1263
  };
1256
1264
  }, zA = (e) => e instanceof RegExp, FA = (e) => j(e) ? e : zA(e) ? e.source : _(e) ? zA(e.value) ? e.value.source : e.value : e, Ye = (e) => ({
1257
- isOnSubmit: !e || e === cA.onSubmit,
1258
- isOnBlur: e === cA.onBlur,
1259
- isOnChange: e === cA.onChange,
1260
- isOnAll: e === cA.all,
1261
- isOnTouch: e === cA.onTouched
1265
+ isOnSubmit: !e || e === oA.onSubmit,
1266
+ isOnBlur: e === oA.onBlur,
1267
+ isOnChange: e === oA.onChange,
1268
+ isOnAll: e === oA.all,
1269
+ isOnTouch: e === oA.onTouched
1262
1270
  });
1263
1271
  const ze = "AsyncFunction";
1264
- var ot = (e) => !!e && !!e.validate && !!(oA(e.validate) && e.validate.constructor.name === ze || _(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === ze)), ct = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Oe = (e, r, A) => !A && (r.watchAll || r.watch.has(e) || [...r.watch].some((i) => e.startsWith(i) && /^\.\w+/.test(e.slice(i.length))));
1272
+ var ot = (e) => !!e && !!e.validate && !!(lA(e.validate) && e.validate.constructor.name === ze || _(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === ze)), ct = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Oe = (e, r, A) => !A && (r.watchAll || r.watch.has(e) || [...r.watch].some((i) => e.startsWith(i) && /^\.\w+/.test(e.slice(i.length))));
1265
1273
  const DA = (e, r, A, i) => {
1266
1274
  for (const v of A || Object.keys(e)) {
1267
1275
  const a = h(e, v);
@@ -1310,16 +1318,16 @@ function Ne(e, r, A) {
1310
1318
  var It = (e, r, A, i) => {
1311
1319
  A(e);
1312
1320
  const { name: v, ...a } = e;
1313
- return aA(a) || Object.keys(a).length >= Object.keys(r).length || Object.keys(a).find((d) => r[d] === (!i || cA.all));
1321
+ return iA(a) || Object.keys(a).length >= Object.keys(r).length || Object.keys(a).find((d) => r[d] === (!i || oA.all));
1314
1322
  }, Et = (e, r, A) => !e || !r || e === r || LA(e).some((i) => i && (A ? i === r : i.startsWith(r) || r.startsWith(i))), pt = (e, r, A, i, v) => v.isOnAll ? !1 : !A && v.isOnTouch ? !(r || e) : (A ? i.isOnBlur : v.isOnBlur) ? !e : (A ? i.isOnChange : v.isOnChange) ? e : !0, qt = (e, r) => !ie(h(e, r)).length && G(e, r), Xt = (e, r, A) => {
1315
1323
  const i = LA(h(e, A));
1316
1324
  return N(i, "root", r[A]), N(e, A, i), e;
1317
1325
  };
1318
1326
  function Be(e, r, A = "validate") {
1319
- if (uA(e) || Array.isArray(e) && e.every(uA) || pA(e) && !e)
1327
+ if (fA(e) || Array.isArray(e) && e.every(fA) || pA(e) && !e)
1320
1328
  return {
1321
1329
  type: A,
1322
- message: uA(e) ? e : "",
1330
+ message: fA(e) ? e : "",
1323
1331
  ref: r
1324
1332
  };
1325
1333
  }
@@ -1327,89 +1335,89 @@ var RA = (e) => _(e) && !zA(e) ? e : {
1327
1335
  value: e,
1328
1336
  message: ""
1329
1337
  }, ke = async (e, r, A, i, v, a) => {
1330
- const { ref: d, refs: f, required: C, maxLength: F, minLength: B, min: P, max: H, pattern: E, validate: K, name: U, valueAsNumber: Y, mount: k } = e._f, g = h(A, U);
1331
- if (!k || r.has(U))
1338
+ const { ref: d, refs: f, required: R, maxLength: F, minLength: Y, min: P, max: T, pattern: E, validate: C, name: K, valueAsNumber: z, mount: B } = e._f, X = h(A, K);
1339
+ if (!B || r.has(K))
1332
1340
  return {};
1333
- const $ = f ? f[0] : d, X = (R) => {
1334
- v && $.reportValidity && ($.setCustomValidity(pA(R) ? "" : R || ""), $.reportValidity());
1335
- }, S = {}, z = se(d), w = QA(d), AA = z || w, vA = (Y || ae(d)) && j(d.value) && j(g) || YA(d) && d.value === "" || g === "" || Array.isArray(g) && !g.length, L = st.bind(null, U, i, S), T = (R, D, b, o = bA.maxLength, l = bA.minLength) => {
1336
- const V = R ? D : b;
1337
- S[U] = {
1338
- type: R ? o : l,
1341
+ const H = f ? f[0] : d, S = (g) => {
1342
+ v && H.reportValidity && (H.setCustomValidity(pA(g) ? "" : g || ""), H.reportValidity());
1343
+ }, U = {}, k = se(d), IA = QA(d), aA = k || IA, sA = (z || ae(d)) && j(d.value) && j(X) || YA(d) && d.value === "" || X === "" || Array.isArray(X) && !X.length, Q = st.bind(null, K, i, U), L = (g, D, b, o = bA.maxLength, l = bA.minLength) => {
1344
+ const V = g ? D : b;
1345
+ U[K] = {
1346
+ type: g ? o : l,
1339
1347
  message: V,
1340
1348
  ref: d,
1341
- ...L(R ? o : l, V)
1349
+ ...Q(g ? o : l, V)
1342
1350
  };
1343
1351
  };
1344
- if (a ? !Array.isArray(g) || !g.length : C && (!AA && (vA || fA(g)) || pA(g) && !g || w && !pr(f).isValid || z && !Xr(f).isValid)) {
1345
- const { value: R, message: D } = uA(C) ? { value: !!C, message: C } : RA(C);
1346
- if (R && (S[U] = {
1352
+ if (a ? !Array.isArray(X) || !X.length : R && (!aA && (sA || dA(X)) || pA(X) && !X || IA && !pr(f).isValid || k && !Xr(f).isValid)) {
1353
+ const { value: g, message: D } = fA(R) ? { value: !!R, message: R } : RA(R);
1354
+ if (g && (U[K] = {
1347
1355
  type: bA.required,
1348
1356
  message: D,
1349
- ref: $,
1350
- ...L(bA.required, D)
1357
+ ref: H,
1358
+ ...Q(bA.required, D)
1351
1359
  }, !i))
1352
- return X(D), S;
1360
+ return S(D), U;
1353
1361
  }
1354
- if (!vA && (!fA(P) || !fA(H))) {
1355
- let R, D;
1356
- const b = RA(H), o = RA(P);
1357
- if (!fA(g) && !isNaN(g)) {
1358
- const l = d.valueAsNumber || g && +g;
1359
- fA(b.value) || (R = l > b.value), fA(o.value) || (D = l < o.value);
1362
+ if (!sA && (!dA(P) || !dA(T))) {
1363
+ let g, D;
1364
+ const b = RA(T), o = RA(P);
1365
+ if (!dA(X) && !isNaN(X)) {
1366
+ const l = d.valueAsNumber || X && +X;
1367
+ dA(b.value) || (g = l > b.value), dA(o.value) || (D = l < o.value);
1360
1368
  } else {
1361
- const l = d.valueAsDate || new Date(g), V = (W) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + W), p = d.type == "time", m = d.type == "week";
1362
- uA(b.value) && g && (R = p ? V(g) > V(b.value) : m ? g > b.value : l > new Date(b.value)), uA(o.value) && g && (D = p ? V(g) < V(o.value) : m ? g < o.value : l < new Date(o.value));
1369
+ const l = d.valueAsDate || new Date(X), V = (W) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + W), p = d.type == "time", m = d.type == "week";
1370
+ fA(b.value) && X && (g = p ? V(X) > V(b.value) : m ? X > b.value : l > new Date(b.value)), fA(o.value) && X && (D = p ? V(X) < V(o.value) : m ? X < o.value : l < new Date(o.value));
1363
1371
  }
1364
- if ((R || D) && (T(!!R, b.message, o.message, bA.max, bA.min), !i))
1365
- return X(S[U].message), S;
1372
+ if ((g || D) && (L(!!g, b.message, o.message, bA.max, bA.min), !i))
1373
+ return S(U[K].message), U;
1366
1374
  }
1367
- if ((F || B) && !vA && (uA(g) || a && Array.isArray(g))) {
1368
- const R = RA(F), D = RA(B), b = !fA(R.value) && g.length > +R.value, o = !fA(D.value) && g.length < +D.value;
1369
- if ((b || o) && (T(b, R.message, D.message), !i))
1370
- return X(S[U].message), S;
1375
+ if ((F || Y) && !sA && (fA(X) || a && Array.isArray(X))) {
1376
+ const g = RA(F), D = RA(Y), b = !dA(g.value) && X.length > +g.value, o = !dA(D.value) && X.length < +D.value;
1377
+ if ((b || o) && (L(b, g.message, D.message), !i))
1378
+ return S(U[K].message), U;
1371
1379
  }
1372
- if (E && !vA && uA(g)) {
1373
- const { value: R, message: D } = RA(E);
1374
- if (zA(R) && !g.match(R) && (S[U] = {
1380
+ if (E && !sA && fA(X)) {
1381
+ const { value: g, message: D } = RA(E);
1382
+ if (zA(g) && !X.match(g) && (U[K] = {
1375
1383
  type: bA.pattern,
1376
1384
  message: D,
1377
1385
  ref: d,
1378
- ...L(bA.pattern, D)
1386
+ ...Q(bA.pattern, D)
1379
1387
  }, !i))
1380
- return X(D), S;
1388
+ return S(D), U;
1381
1389
  }
1382
- if (K) {
1383
- if (oA(K)) {
1384
- const R = await K(g, A), D = Be(R, $);
1385
- if (D && (S[U] = {
1390
+ if (C) {
1391
+ if (lA(C)) {
1392
+ const g = await C(X, A), D = Be(g, H);
1393
+ if (D && (U[K] = {
1386
1394
  ...D,
1387
- ...L(bA.validate, D.message)
1395
+ ...Q(bA.validate, D.message)
1388
1396
  }, !i))
1389
- return X(D.message), S;
1390
- } else if (_(K)) {
1391
- let R = {};
1392
- for (const D in K) {
1393
- if (!aA(R) && !i)
1397
+ return S(D.message), U;
1398
+ } else if (_(C)) {
1399
+ let g = {};
1400
+ for (const D in C) {
1401
+ if (!iA(g) && !i)
1394
1402
  break;
1395
- const b = Be(await K[D](g, A), $, D);
1396
- b && (R = {
1403
+ const b = Be(await C[D](X, A), H, D);
1404
+ b && (g = {
1397
1405
  ...b,
1398
- ...L(D, b.message)
1399
- }, X(b.message), i && (S[U] = R));
1406
+ ...Q(D, b.message)
1407
+ }, S(b.message), i && (U[K] = g));
1400
1408
  }
1401
- if (!aA(R) && (S[U] = {
1402
- ref: $,
1403
- ...R
1409
+ if (!iA(g) && (U[K] = {
1410
+ ref: H,
1411
+ ...g
1404
1412
  }, !i))
1405
- return S;
1413
+ return U;
1406
1414
  }
1407
1415
  }
1408
- return X(!0), S;
1416
+ return S(!0), U;
1409
1417
  };
1410
1418
  const Vt = {
1411
- mode: cA.onSubmit,
1412
- reValidateMode: cA.onChange,
1419
+ mode: oA.onSubmit,
1420
+ reValidateMode: oA.onChange,
1413
1421
  shouldFocusError: !0
1414
1422
  };
1415
1423
  function bt(e = {}) {
@@ -1420,7 +1428,7 @@ function bt(e = {}) {
1420
1428
  submitCount: 0,
1421
1429
  isDirty: !1,
1422
1430
  isReady: !1,
1423
- isLoading: oA(r.defaultValues),
1431
+ isLoading: lA(r.defaultValues),
1424
1432
  isValidating: !1,
1425
1433
  isSubmitted: !1,
1426
1434
  isSubmitting: !1,
@@ -1431,7 +1439,7 @@ function bt(e = {}) {
1431
1439
  validatingFields: {},
1432
1440
  errors: r.errors || {},
1433
1441
  disabled: r.disabled || !1
1434
- }, i = {}, v = _(r.defaultValues) || _(r.values) ? rA(r.defaultValues || r.values) || {} : {}, a = r.shouldUnregister ? {} : rA(v), d = {
1442
+ }, i = {}, v = _(r.defaultValues) || _(r.values) ? AA(r.defaultValues || r.values) || {} : {}, a = r.shouldUnregister ? {} : AA(v), d = {
1435
1443
  action: !1,
1436
1444
  mount: !1,
1437
1445
  watch: !1,
@@ -1442,8 +1450,8 @@ function bt(e = {}) {
1442
1450
  unMount: /* @__PURE__ */ new Set(),
1443
1451
  array: /* @__PURE__ */ new Set(),
1444
1452
  watch: /* @__PURE__ */ new Set()
1445
- }, C, F = 0;
1446
- const B = {
1453
+ }, R, F = 0;
1454
+ const Y = {
1447
1455
  isDirty: !1,
1448
1456
  dirtyFields: !1,
1449
1457
  validatingFields: !1,
@@ -1452,31 +1460,31 @@ function bt(e = {}) {
1452
1460
  isValid: !1,
1453
1461
  errors: !1
1454
1462
  }, P = {
1455
- ...B
1463
+ ...Y
1456
1464
  };
1457
- let H = {
1465
+ let T = {
1458
1466
  ...P
1459
1467
  };
1460
1468
  const E = {
1461
1469
  array: De(),
1462
1470
  state: De()
1463
- }, K = r.criteriaMode === cA.all, U = (t) => (n) => {
1471
+ }, C = r.criteriaMode === oA.all, K = (t) => (n) => {
1464
1472
  clearTimeout(F), F = setTimeout(t, n);
1465
- }, Y = async (t) => {
1466
- if (!d.keepIsValid && !r.disabled && (P.isValid || H.isValid || t)) {
1473
+ }, z = async (t) => {
1474
+ if (!d.keepIsValid && !r.disabled && (P.isValid || T.isValid || t)) {
1467
1475
  let n;
1468
- r.resolver ? (n = aA((await AA()).errors), k()) : n = await L(i, !0), n !== A.isValid && E.state.next({
1476
+ r.resolver ? (n = iA((await aA()).errors), B()) : n = await Q(i, !0), n !== A.isValid && E.state.next({
1469
1477
  isValid: n
1470
1478
  });
1471
1479
  }
1472
- }, k = (t, n) => {
1473
- !r.disabled && (P.isValidating || P.validatingFields || H.isValidating || H.validatingFields) && ((t || Array.from(f.mount)).forEach((s) => {
1480
+ }, B = (t, n) => {
1481
+ !r.disabled && (P.isValidating || P.validatingFields || T.isValidating || T.validatingFields) && ((t || Array.from(f.mount)).forEach((s) => {
1474
1482
  s && (n ? N(A.validatingFields, s, n) : G(A.validatingFields, s));
1475
1483
  }), E.state.next({
1476
1484
  validatingFields: A.validatingFields,
1477
- isValidating: !aA(A.validatingFields)
1485
+ isValidating: !iA(A.validatingFields)
1478
1486
  }));
1479
- }, g = (t, n = [], s, q, c = !0, u = !0) => {
1487
+ }, X = (t, n = [], s, q, c = !0, u = !0) => {
1480
1488
  if (q && s && !r.disabled) {
1481
1489
  if (d.action = !0, u && Array.isArray(h(i, t))) {
1482
1490
  const x = s(h(i, t), q.argA, q.argB);
@@ -1486,55 +1494,55 @@ function bt(e = {}) {
1486
1494
  const x = s(h(A.errors, t), q.argA, q.argB);
1487
1495
  c && N(A.errors, t, x), qt(A.errors, t);
1488
1496
  }
1489
- if ((P.touchedFields || H.touchedFields) && u && Array.isArray(h(A.touchedFields, t))) {
1497
+ if ((P.touchedFields || T.touchedFields) && u && Array.isArray(h(A.touchedFields, t))) {
1490
1498
  const x = s(h(A.touchedFields, t), q.argA, q.argB);
1491
1499
  c && N(A.touchedFields, t, x);
1492
1500
  }
1493
- (P.dirtyFields || H.dirtyFields) && (A.dirtyFields = CA(v, a)), E.state.next({
1501
+ (P.dirtyFields || T.dirtyFields) && (A.dirtyFields = CA(v, a)), E.state.next({
1494
1502
  name: t,
1495
- isDirty: R(t, n),
1503
+ isDirty: g(t, n),
1496
1504
  dirtyFields: A.dirtyFields,
1497
1505
  errors: A.errors,
1498
1506
  isValid: A.isValid
1499
1507
  });
1500
1508
  } else
1501
1509
  N(a, t, n);
1502
- }, $ = (t, n) => {
1510
+ }, H = (t, n) => {
1503
1511
  N(A.errors, t, n), E.state.next({
1504
1512
  errors: A.errors
1505
1513
  });
1506
- }, X = (t) => {
1514
+ }, S = (t) => {
1507
1515
  A.errors = t, E.state.next({
1508
1516
  errors: A.errors,
1509
1517
  isValid: !1
1510
1518
  });
1511
- }, S = (t, n, s, q) => {
1519
+ }, U = (t, n, s, q) => {
1512
1520
  const c = h(i, t);
1513
1521
  if (c) {
1514
1522
  const u = h(a, t, j(s) ? h(v, t) : s);
1515
- j(u) || q && q.defaultChecked || n ? N(a, t, n ? u : we(c._f)) : o(t, u), d.mount && !d.action && Y();
1523
+ j(u) || q && q.defaultChecked || n ? N(a, t, n ? u : we(c._f)) : o(t, u), d.mount && !d.action && z();
1516
1524
  }
1517
- }, z = (t, n, s, q, c) => {
1525
+ }, k = (t, n, s, q, c) => {
1518
1526
  let u = !1, x = !1;
1519
- const y = {
1527
+ const J = {
1520
1528
  name: t
1521
1529
  };
1522
1530
  if (!r.disabled) {
1523
1531
  if (!s || q) {
1524
- (P.isDirty || H.isDirty) && (x = A.isDirty, A.isDirty = y.isDirty = R(), u = x !== y.isDirty);
1525
- const J = xA(h(v, t), n);
1526
- x = !!h(A.dirtyFields, t), J ? G(A.dirtyFields, t) : N(A.dirtyFields, t, !0), y.dirtyFields = A.dirtyFields, u = u || (P.dirtyFields || H.dirtyFields) && x !== !J;
1532
+ (P.isDirty || T.isDirty) && (x = A.isDirty, A.isDirty = J.isDirty = g(), u = x !== J.isDirty);
1533
+ const w = xA(h(v, t), n);
1534
+ x = !!h(A.dirtyFields, t), w ? G(A.dirtyFields, t) : N(A.dirtyFields, t, !0), J.dirtyFields = A.dirtyFields, u = u || (P.dirtyFields || T.dirtyFields) && x !== !w;
1527
1535
  }
1528
1536
  if (s) {
1529
- const J = h(A.touchedFields, t);
1530
- J || (N(A.touchedFields, t, s), y.touchedFields = A.touchedFields, u = u || (P.touchedFields || H.touchedFields) && J !== s);
1537
+ const w = h(A.touchedFields, t);
1538
+ w || (N(A.touchedFields, t, s), J.touchedFields = A.touchedFields, u = u || (P.touchedFields || T.touchedFields) && w !== s);
1531
1539
  }
1532
- u && c && E.state.next(y);
1540
+ u && c && E.state.next(J);
1533
1541
  }
1534
- return u ? y : {};
1535
- }, w = (t, n, s, q) => {
1536
- const c = h(A.errors, t), u = (P.isValid || H.isValid) && pA(n) && A.isValid !== n;
1537
- if (r.delayError && s ? (C = U(() => $(t, s)), C(r.delayError)) : (clearTimeout(F), C = null, s ? N(A.errors, t, s) : G(A.errors, t)), (s ? !xA(c, s) : c) || !aA(q) || u) {
1542
+ return u ? J : {};
1543
+ }, IA = (t, n, s, q) => {
1544
+ const c = h(A.errors, t), u = (P.isValid || T.isValid) && pA(n) && A.isValid !== n;
1545
+ if (r.delayError && s ? (R = K(() => H(t, s)), R(r.delayError)) : (clearTimeout(F), R = null, s ? N(A.errors, t, s) : G(A.errors, t)), (s ? !xA(c, s) : c) || !iA(q) || u) {
1538
1546
  const x = {
1539
1547
  ...q,
1540
1548
  ...u && pA(n) ? { isValid: n } : {},
@@ -1546,9 +1554,9 @@ function bt(e = {}) {
1546
1554
  ...x
1547
1555
  }, E.state.next(x);
1548
1556
  }
1549
- }, AA = async (t) => (k(t, !0), await r.resolver(a, r.context, lt(t || f.mount, i, r.criteriaMode, r.shouldUseNativeValidation))), vA = async (t) => {
1550
- const { errors: n } = await AA(t);
1551
- if (k(t), t)
1557
+ }, aA = async (t) => (B(t, !0), await r.resolver(a, r.context, lt(t || f.mount, i, r.criteriaMode, r.shouldUseNativeValidation))), sA = async (t) => {
1558
+ const { errors: n } = await aA(t);
1559
+ if (B(t), t)
1552
1560
  for (const s of t) {
1553
1561
  const q = h(n, s);
1554
1562
  q ? N(A.errors, s, q) : G(A.errors, s);
@@ -1556,7 +1564,7 @@ function bt(e = {}) {
1556
1564
  else
1557
1565
  A.errors = n;
1558
1566
  return n;
1559
- }, L = async (t, n, s = {
1567
+ }, Q = async (t, n, s = {
1560
1568
  valid: !0
1561
1569
  }) => {
1562
1570
  for (const q in t) {
@@ -1564,38 +1572,38 @@ function bt(e = {}) {
1564
1572
  if (c) {
1565
1573
  const { _f: u, ...x } = c;
1566
1574
  if (u) {
1567
- const y = f.array.has(u.name), J = c._f && ot(c._f);
1568
- J && P.validatingFields && k([u.name], !0);
1569
- const nA = await ke(c, f.disabled, a, K, r.shouldUseNativeValidation && !n, y);
1570
- if (J && P.validatingFields && k([u.name]), nA[u.name] && (s.valid = !1, n || e.shouldUseNativeValidation))
1575
+ const J = f.array.has(u.name), w = c._f && ot(c._f);
1576
+ w && P.validatingFields && B([u.name], !0);
1577
+ const tA = await ke(c, f.disabled, a, C, r.shouldUseNativeValidation && !n, J);
1578
+ if (w && P.validatingFields && B([u.name]), tA[u.name] && (s.valid = !1, n || e.shouldUseNativeValidation))
1571
1579
  break;
1572
- !n && (h(nA, u.name) ? y ? Xt(A.errors, nA, u.name) : N(A.errors, u.name, nA[u.name]) : G(A.errors, u.name));
1580
+ !n && (h(tA, u.name) ? J ? Xt(A.errors, tA, u.name) : N(A.errors, u.name, tA[u.name]) : G(A.errors, u.name));
1573
1581
  }
1574
- !aA(x) && await L(x, n, s);
1582
+ !iA(x) && await Q(x, n, s);
1575
1583
  }
1576
1584
  }
1577
1585
  return s.valid;
1578
- }, T = () => {
1586
+ }, L = () => {
1579
1587
  for (const t of f.unMount) {
1580
1588
  const n = h(i, t);
1581
1589
  n && (n._f.refs ? n._f.refs.every((s) => !ZA(s)) : !ZA(n._f.ref)) && VA(t);
1582
1590
  }
1583
1591
  f.unMount = /* @__PURE__ */ new Set();
1584
- }, R = (t, n) => !r.disabled && (t && n && N(a, t, n), !xA(Q(), v)), D = (t, n, s) => nt(t, f, {
1585
- ...d.mount ? a : j(n) ? v : uA(t) ? { [t]: n } : n
1592
+ }, g = (t, n) => !r.disabled && (t && n && N(a, t, n), !xA(y(), v)), D = (t, n, s) => nt(t, f, {
1593
+ ...d.mount ? a : j(n) ? v : fA(t) ? { [t]: n } : n
1586
1594
  }, s, n), b = (t) => ie(h(d.mount ? a : v, t, r.shouldUnregister ? h(v, t, []) : [])), o = (t, n, s = {}) => {
1587
1595
  const q = h(i, t);
1588
1596
  let c = n;
1589
1597
  if (q) {
1590
1598
  const u = q._f;
1591
- u && (!u.disabled && N(a, t, qr(n, u)), c = YA(u.ref) && fA(n) ? "" : n, Ir(u.ref) ? [...u.ref.options].forEach((x) => x.selected = c.includes(x.value)) : u.refs ? QA(u.ref) ? u.refs.forEach((x) => {
1592
- (!x.defaultChecked || !x.disabled) && (Array.isArray(c) ? x.checked = !!c.find((y) => y === x.value) : x.checked = c === x.value || !!c);
1599
+ u && (!u.disabled && N(a, t, qr(n, u)), c = YA(u.ref) && dA(n) ? "" : n, Ir(u.ref) ? [...u.ref.options].forEach((x) => x.selected = c.includes(x.value)) : u.refs ? QA(u.ref) ? u.refs.forEach((x) => {
1600
+ (!x.defaultChecked || !x.disabled) && (Array.isArray(c) ? x.checked = !!c.find((J) => J === x.value) : x.checked = c === x.value || !!c);
1593
1601
  }) : u.refs.forEach((x) => x.checked = x.value === c) : ae(u.ref) ? u.ref.value = "" : (u.ref.value = c, u.ref.type || E.state.next({
1594
1602
  name: t,
1595
- values: rA(a)
1603
+ values: AA(a)
1596
1604
  })));
1597
1605
  }
1598
- (s.shouldDirty || s.shouldTouch) && z(t, c, s.shouldTouch, s.shouldDirty, !0), s.shouldValidate && W(t);
1606
+ (s.shouldDirty || s.shouldTouch) && k(t, c, s.shouldTouch, s.shouldDirty, !0), s.shouldValidate && W(t);
1599
1607
  }, l = (t, n, s) => {
1600
1608
  for (const q in n) {
1601
1609
  if (!n.hasOwnProperty(q))
@@ -1604,49 +1612,49 @@ function bt(e = {}) {
1604
1612
  (f.array.has(t) || _(c) || x && !x._f) && !gA(c) ? l(u, c, s) : o(u, c, s);
1605
1613
  }
1606
1614
  }, V = (t, n, s = {}) => {
1607
- const q = h(i, t), c = f.array.has(t), u = rA(n);
1615
+ const q = h(i, t), c = f.array.has(t), u = AA(n);
1608
1616
  N(a, t, u), c ? (E.array.next({
1609
1617
  name: t,
1610
- values: rA(a)
1611
- }), (P.isDirty || P.dirtyFields || H.isDirty || H.dirtyFields) && s.shouldDirty && E.state.next({
1618
+ values: AA(a)
1619
+ }), (P.isDirty || P.dirtyFields || T.isDirty || T.dirtyFields) && s.shouldDirty && E.state.next({
1612
1620
  name: t,
1613
1621
  dirtyFields: CA(v, a),
1614
- isDirty: R(t, u)
1615
- })) : q && !q._f && !fA(u) ? l(t, u, s) : o(t, u, s), Oe(t, f) ? E.state.next({
1622
+ isDirty: g(t, u)
1623
+ })) : q && !q._f && !dA(u) ? l(t, u, s) : o(t, u, s), Oe(t, f) ? E.state.next({
1616
1624
  ...A,
1617
1625
  name: t,
1618
- values: rA(a)
1626
+ values: AA(a)
1619
1627
  }) : E.state.next({
1620
1628
  name: d.mount ? t : void 0,
1621
- values: rA(a)
1629
+ values: AA(a)
1622
1630
  });
1623
1631
  }, p = async (t) => {
1624
1632
  d.mount = !0;
1625
1633
  const n = t.target;
1626
1634
  let s = n.name, q = !0;
1627
- const c = h(i, s), u = (J) => {
1628
- q = Number.isNaN(J) || gA(J) && isNaN(J.getTime()) || xA(J, h(a, s, J));
1629
- }, x = Ye(r.mode), y = Ye(r.reValidateMode);
1635
+ const c = h(i, s), u = (w) => {
1636
+ q = Number.isNaN(w) || gA(w) && isNaN(w.getTime()) || xA(w, h(a, s, w));
1637
+ }, x = Ye(r.mode), J = Ye(r.reValidateMode);
1630
1638
  if (c) {
1631
- let J, nA;
1632
- const UA = n.type ? we(c._f) : $r(t), hA = t.type === Le.BLUR || t.type === Le.FOCUS_OUT, xr = !ct(c._f) && !r.resolver && !h(A.errors, s) && !c._f.deps || pt(hA, h(A.touchedFields, s), A.isSubmitted, y, x), NA = Oe(s, f, hA);
1633
- N(a, s, UA), hA ? (!n || !n.readOnly) && (c._f.onBlur && c._f.onBlur(t), C && C(0)) : c._f.onChange && c._f.onChange(t);
1634
- const BA = z(s, UA, hA), Pr = !aA(BA) || NA;
1639
+ let w, tA;
1640
+ const UA = n.type ? we(c._f) : $r(t), hA = t.type === Le.BLUR || t.type === Le.FOCUS_OUT, xr = !ct(c._f) && !r.resolver && !h(A.errors, s) && !c._f.deps || pt(hA, h(A.touchedFields, s), A.isSubmitted, J, x), NA = Oe(s, f, hA);
1641
+ N(a, s, UA), hA ? (!n || !n.readOnly) && (c._f.onBlur && c._f.onBlur(t), R && R(0)) : c._f.onChange && c._f.onChange(t);
1642
+ const BA = k(s, UA, hA), Pr = !iA(BA) || NA;
1635
1643
  if (!hA && E.state.next({
1636
1644
  name: s,
1637
1645
  type: t.type,
1638
- values: rA(a)
1646
+ values: AA(a)
1639
1647
  }), xr)
1640
- return (P.isValid || H.isValid) && (r.mode === "onBlur" ? hA && Y() : hA || Y()), Pr && E.state.next({ name: s, ...NA ? {} : BA });
1648
+ return (P.isValid || T.isValid) && (r.mode === "onBlur" ? hA && z() : hA || z()), Pr && E.state.next({ name: s, ...NA ? {} : BA });
1641
1649
  if (!hA && NA && E.state.next({ ...A }), r.resolver) {
1642
- const { errors: ue } = await AA([s]);
1643
- if (k([s]), u(UA), q) {
1650
+ const { errors: ue } = await aA([s]);
1651
+ if (B([s]), u(UA), q) {
1644
1652
  const mr = Ne(A.errors, i, s), le = Ne(ue, i, mr.name || s);
1645
- J = le.error, s = le.name, nA = aA(ue);
1653
+ w = le.error, s = le.name, tA = iA(ue);
1646
1654
  }
1647
1655
  } else
1648
- k([s], !0), J = (await ke(c, f.disabled, a, K, r.shouldUseNativeValidation))[s], k([s]), u(UA), q && (J ? nA = !1 : (P.isValid || H.isValid) && (nA = await L(i, !0)));
1649
- q && (c._f.deps && (!Array.isArray(c._f.deps) || c._f.deps.length > 0) && W(c._f.deps), w(s, nA, J, BA));
1656
+ B([s], !0), w = (await ke(c, f.disabled, a, C, r.shouldUseNativeValidation))[s], B([s]), u(UA), q && (w ? tA = !1 : (P.isValid || T.isValid) && (tA = await Q(i, !0)));
1657
+ q && (c._f.deps && (!Array.isArray(c._f.deps) || c._f.deps.length > 0) && W(c._f.deps), IA(s, tA, w, BA));
1650
1658
  }
1651
1659
  }, m = (t, n) => {
1652
1660
  if (h(A.errors, n) && t.focus)
@@ -1655,22 +1663,22 @@ function bt(e = {}) {
1655
1663
  let s, q;
1656
1664
  const c = LA(t);
1657
1665
  if (r.resolver) {
1658
- const u = await vA(j(t) ? t : c);
1659
- s = aA(u), q = t ? !c.some((x) => h(u, x)) : s;
1666
+ const u = await sA(j(t) ? t : c);
1667
+ s = iA(u), q = t ? !c.some((x) => h(u, x)) : s;
1660
1668
  } else t ? (q = (await Promise.all(c.map(async (u) => {
1661
1669
  const x = h(i, u);
1662
- return await L(x && x._f ? { [u]: x } : x);
1663
- }))).every(Boolean), !(!q && !A.isValid) && Y()) : q = s = await L(i);
1670
+ return await Q(x && x._f ? { [u]: x } : x);
1671
+ }))).every(Boolean), !(!q && !A.isValid) && z()) : q = s = await Q(i);
1664
1672
  return E.state.next({
1665
- ...!uA(t) || (P.isValid || H.isValid) && s !== A.isValid ? {} : { name: t },
1673
+ ...!fA(t) || (P.isValid || T.isValid) && s !== A.isValid ? {} : { name: t },
1666
1674
  ...r.resolver || !t ? { isValid: s } : {},
1667
1675
  errors: A.errors
1668
1676
  }), n.shouldFocus && !q && DA(i, m, t ? c : f.mount), q;
1669
- }, Q = (t, n) => {
1677
+ }, y = (t, n) => {
1670
1678
  let s = {
1671
1679
  ...d.mount ? a : v
1672
1680
  };
1673
- return n && (s = cr(n.dirtyFields ? A.dirtyFields : A.touchedFields, s)), j(t) ? s : uA(t) ? h(s, t) : t.map((q) => h(s, q));
1681
+ return n && (s = cr(n.dirtyFields ? A.dirtyFields : A.touchedFields, s)), j(t) ? s : fA(t) ? h(s, t) : t.map((q) => h(s, q));
1674
1682
  }, O = (t, n) => ({
1675
1683
  invalid: !!h((n || A).errors, t),
1676
1684
  isDirty: !!h((n || A).dirtyFields, t),
@@ -1681,10 +1689,10 @@ function bt(e = {}) {
1681
1689
  t && LA(t).forEach((n) => G(A.errors, n)), E.state.next({
1682
1690
  errors: t ? A.errors : {}
1683
1691
  });
1684
- }, eA = (t, n, s) => {
1685
- const q = (h(i, t, { _f: {} })._f || {}).ref, c = h(A.errors, t) || {}, { ref: u, message: x, type: y, ...J } = c;
1692
+ }, $ = (t, n, s) => {
1693
+ const q = (h(i, t, { _f: {} })._f || {}).ref, c = h(A.errors, t) || {}, { ref: u, message: x, type: J, ...w } = c;
1686
1694
  N(A.errors, t, {
1687
- ...J,
1695
+ ...w,
1688
1696
  ...n,
1689
1697
  ref: q
1690
1698
  }), E.state.next({
@@ -1692,7 +1700,7 @@ function bt(e = {}) {
1692
1700
  errors: A.errors,
1693
1701
  isValid: !1
1694
1702
  }), s && s.shouldFocus && q && q.focus && q.focus();
1695
- }, dA = (t, n) => oA(t) ? E.state.subscribe({
1703
+ }, vA = (t, n) => lA(t) ? E.state.subscribe({
1696
1704
  next: (s) => "values" in s && t(D(void 0, n), s)
1697
1705
  }) : D(t, n, !0), qA = (t) => E.state.subscribe({
1698
1706
  next: (n) => {
@@ -1703,30 +1711,30 @@ function bt(e = {}) {
1703
1711
  defaultValues: v
1704
1712
  });
1705
1713
  }
1706
- }).unsubscribe, XA = (t) => (d.mount = !0, H = {
1707
- ...H,
1714
+ }).unsubscribe, XA = (t) => (d.mount = !0, T = {
1715
+ ...T,
1708
1716
  ...t.formState
1709
1717
  }, qA({
1710
1718
  ...t,
1711
1719
  formState: {
1712
- ...B,
1720
+ ...Y,
1713
1721
  ...t.formState
1714
1722
  }
1715
1723
  })), VA = (t, n = {}) => {
1716
1724
  for (const s of t ? LA(t) : f.mount)
1717
1725
  f.mount.delete(s), f.array.delete(s), n.keepValue || (G(i, s), G(a, s)), !n.keepError && G(A.errors, s), !n.keepDirty && G(A.dirtyFields, s), !n.keepTouched && G(A.touchedFields, s), !n.keepIsValidating && G(A.validatingFields, s), !r.shouldUnregister && !n.keepDefaultValue && G(v, s);
1718
1726
  E.state.next({
1719
- values: rA(a)
1727
+ values: AA(a)
1720
1728
  }), E.state.next({
1721
1729
  ...A,
1722
- ...n.keepDirty ? { isDirty: R() } : {}
1723
- }), !n.keepIsValid && Y();
1730
+ ...n.keepDirty ? { isDirty: g() } : {}
1731
+ }), !n.keepIsValid && z();
1724
1732
  }, EA = ({ disabled: t, name: n }) => {
1725
1733
  if (pA(t) && d.mount || t || f.disabled.has(n)) {
1726
1734
  const c = f.disabled.has(n) !== !!t;
1727
- t ? f.disabled.add(n) : f.disabled.delete(n), c && d.mount && !d.action && Y();
1735
+ t ? f.disabled.add(n) : f.disabled.delete(n), c && d.mount && !d.action && z();
1728
1736
  }
1729
- }, tA = (t, n = {}) => {
1737
+ }, eA = (t, n = {}) => {
1730
1738
  let s = h(i, t);
1731
1739
  const q = pA(n.disabled) || pA(r.disabled);
1732
1740
  return N(i, t, {
@@ -1740,7 +1748,7 @@ function bt(e = {}) {
1740
1748
  }), f.mount.add(t), s ? EA({
1741
1749
  disabled: pA(n.disabled) ? n.disabled : r.disabled,
1742
1750
  name: t
1743
- }) : S(t, !0, n.value), {
1751
+ }) : U(t, !0, n.value), {
1744
1752
  ...q ? { disabled: n.disabled || r.disabled } : {},
1745
1753
  ...r.progressive ? {
1746
1754
  required: !!n.required,
@@ -1755,28 +1763,28 @@ function bt(e = {}) {
1755
1763
  onBlur: p,
1756
1764
  ref: (c) => {
1757
1765
  if (c) {
1758
- tA(t, n), s = h(i, t);
1759
- const u = j(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, x = vt(u), y = s._f.refs || [];
1760
- if (x ? y.find((J) => J === u) : u === s._f.ref)
1766
+ eA(t, n), s = h(i, t);
1767
+ const u = j(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, x = vt(u), J = s._f.refs || [];
1768
+ if (x ? J.find((w) => w === u) : u === s._f.ref)
1761
1769
  return;
1762
1770
  N(i, t, {
1763
1771
  _f: {
1764
1772
  ...s._f,
1765
1773
  ...x ? {
1766
1774
  refs: [
1767
- ...y.filter(ZA),
1775
+ ...J.filter(ZA),
1768
1776
  u,
1769
1777
  ...Array.isArray(h(v, t)) ? [{}] : []
1770
1778
  ],
1771
1779
  ref: { type: u.type, name: t }
1772
1780
  } : { ref: u }
1773
1781
  }
1774
- }), S(t, !1, void 0, u);
1782
+ }), U(t, !1, void 0, u);
1775
1783
  } else
1776
1784
  s = h(i, t, {}), s._f && (s._f.mount = !1), (r.shouldUnregister || n.shouldUnregister) && !(et(f.array, t) && d.action) && f.unMount.add(t);
1777
1785
  }
1778
1786
  };
1779
- }, lA = () => r.shouldFocusError && DA(i, m, f.mount), WA = (t) => {
1787
+ }, uA = () => r.shouldFocusError && DA(i, m, f.mount), WA = (t) => {
1780
1788
  pA(t) && (E.state.next({ disabled: t }), DA(i, (n, s) => {
1781
1789
  const q = h(i, s);
1782
1790
  q && (n.disabled = q._f.disabled || t, Array.isArray(q._f.refs) && q._f.refs.forEach((c) => {
@@ -1786,18 +1794,18 @@ function bt(e = {}) {
1786
1794
  }, SA = (t, n) => async (s) => {
1787
1795
  let q;
1788
1796
  s && (s.preventDefault && s.preventDefault(), s.persist && s.persist());
1789
- let c = rA(a);
1797
+ let c = AA(a);
1790
1798
  if (E.state.next({
1791
1799
  isSubmitting: !0
1792
1800
  }), r.resolver) {
1793
- const { errors: u, values: x } = await AA();
1794
- k(), A.errors = u, c = rA(x);
1801
+ const { errors: u, values: x } = await aA();
1802
+ B(), A.errors = u, c = AA(x);
1795
1803
  } else
1796
- await L(i);
1804
+ await Q(i);
1797
1805
  if (f.disabled.size)
1798
1806
  for (const u of f.disabled)
1799
1807
  G(c, u);
1800
- if (G(A.errors, "root"), aA(A.errors)) {
1808
+ if (G(A.errors, "root"), iA(A.errors)) {
1801
1809
  E.state.next({
1802
1810
  errors: {}
1803
1811
  });
@@ -1807,39 +1815,39 @@ function bt(e = {}) {
1807
1815
  q = u;
1808
1816
  }
1809
1817
  } else
1810
- n && await n({ ...A.errors }, s), lA(), setTimeout(lA);
1818
+ n && await n({ ...A.errors }, s), uA(), setTimeout(uA);
1811
1819
  if (E.state.next({
1812
1820
  isSubmitted: !0,
1813
1821
  isSubmitting: !1,
1814
- isSubmitSuccessful: aA(A.errors) && !q,
1822
+ isSubmitSuccessful: iA(A.errors) && !q,
1815
1823
  submitCount: A.submitCount + 1,
1816
1824
  errors: A.errors
1817
1825
  }), q)
1818
1826
  throw q;
1819
1827
  }, Vr = (t, n = {}) => {
1820
- h(i, t) && (j(n.defaultValue) ? V(t, rA(h(v, t))) : (V(t, n.defaultValue), N(v, t, rA(n.defaultValue))), n.keepTouched || G(A.touchedFields, t), n.keepDirty || (G(A.dirtyFields, t), A.isDirty = n.defaultValue ? R(t, rA(h(v, t))) : R()), n.keepError || (G(A.errors, t), P.isValid && Y()), E.state.next({ ...A }));
1828
+ h(i, t) && (j(n.defaultValue) ? V(t, AA(h(v, t))) : (V(t, n.defaultValue), N(v, t, AA(n.defaultValue))), n.keepTouched || G(A.touchedFields, t), n.keepDirty || (G(A.dirtyFields, t), A.isDirty = n.defaultValue ? g(t, AA(h(v, t))) : g()), n.keepError || (G(A.errors, t), P.isValid && z()), E.state.next({ ...A }));
1821
1829
  }, ve = (t, n = {}) => {
1822
- const s = t ? rA(t) : v, q = rA(s), c = aA(t), u = c ? v : q;
1830
+ const s = t ? AA(t) : v, q = AA(s), c = iA(t), u = c ? v : q;
1823
1831
  if (n.keepDefaultValues || (v = s), !n.keepValues) {
1824
1832
  if (n.keepDirtyValues) {
1825
1833
  const x = /* @__PURE__ */ new Set([
1826
1834
  ...f.mount,
1827
1835
  ...Object.keys(CA(v, a))
1828
1836
  ]);
1829
- for (const y of Array.from(x)) {
1830
- const J = h(A.dirtyFields, y), nA = h(a, y), UA = h(u, y);
1831
- J && !j(nA) ? N(u, y, nA) : !J && !j(UA) && V(y, UA);
1837
+ for (const J of Array.from(x)) {
1838
+ const w = h(A.dirtyFields, J), tA = h(a, J), UA = h(u, J);
1839
+ w && !j(tA) ? N(u, J, tA) : !w && !j(UA) && V(J, UA);
1832
1840
  }
1833
1841
  } else {
1834
1842
  if (te && j(t))
1835
1843
  for (const x of f.mount) {
1836
- const y = h(i, x);
1837
- if (y && y._f) {
1838
- const J = Array.isArray(y._f.refs) ? y._f.refs[0] : y._f.ref;
1839
- if (YA(J)) {
1840
- const nA = J.closest("form");
1841
- if (nA) {
1842
- nA.reset();
1844
+ const J = h(i, x);
1845
+ if (J && J._f) {
1846
+ const w = Array.isArray(J._f.refs) ? J._f.refs[0] : J._f.ref;
1847
+ if (YA(w)) {
1848
+ const tA = w.closest("form");
1849
+ if (tA) {
1850
+ tA.reset();
1843
1851
  break;
1844
1852
  }
1845
1853
  }
@@ -1851,7 +1859,7 @@ function bt(e = {}) {
1851
1859
  else
1852
1860
  i = {};
1853
1861
  }
1854
- a = r.shouldUnregister ? n.keepDefaultValues ? rA(v) : {} : rA(u), E.array.next({
1862
+ a = r.shouldUnregister ? n.keepDefaultValues ? AA(v) : {} : AA(u), E.array.next({
1855
1863
  values: { ...u }
1856
1864
  }), E.state.next({
1857
1865
  values: { ...u }
@@ -1865,7 +1873,7 @@ function bt(e = {}) {
1865
1873
  watch: /* @__PURE__ */ new Set(),
1866
1874
  watchAll: !1,
1867
1875
  focus: ""
1868
- }, d.mount = !P.isValid || !!n.keepIsValid || !!n.keepDirtyValues || !r.shouldUnregister && !aA(u), d.watch = !!r.shouldUnregister, d.keepIsValid = !!n.keepIsValid, d.action = !1, n.keepErrors || (A.errors = {}), E.state.next({
1876
+ }, d.mount = !P.isValid || !!n.keepIsValid || !!n.keepDirtyValues || !r.shouldUnregister && !iA(u), d.watch = !!r.shouldUnregister, d.keepIsValid = !!n.keepIsValid, d.action = !1, n.keepErrors || (A.errors = {}), E.state.next({
1869
1877
  submitCount: n.keepSubmitCount ? A.submitCount : 0,
1870
1878
  isDirty: c ? !1 : n.keepDirty ? A.isDirty : !!(n.keepDefaultValues && !xA(t, v)),
1871
1879
  isSubmitted: n.keepIsSubmitted ? A.isSubmitted : !1,
@@ -1876,12 +1884,12 @@ function bt(e = {}) {
1876
1884
  isSubmitting: !1,
1877
1885
  defaultValues: v
1878
1886
  });
1879
- }, de = (t, n) => ve(oA(t) ? t(a) : t, { ...r.resetOptions, ...n }), br = (t, n = {}) => {
1887
+ }, de = (t, n) => ve(lA(t) ? t(a) : t, { ...r.resetOptions, ...n }), br = (t, n = {}) => {
1880
1888
  const s = h(i, t), q = s && s._f;
1881
1889
  if (q) {
1882
1890
  const c = q.refs ? q.refs[0] : q.ref;
1883
1891
  c.focus && setTimeout(() => {
1884
- c.focus(), n.shouldSelect && oA(c.select) && c.select();
1892
+ c.focus(), n.shouldSelect && lA(c.select) && c.select();
1885
1893
  });
1886
1894
  }
1887
1895
  }, hr = (t) => {
@@ -1891,29 +1899,29 @@ function bt(e = {}) {
1891
1899
  };
1892
1900
  }, fe = {
1893
1901
  control: {
1894
- register: tA,
1902
+ register: eA,
1895
1903
  unregister: VA,
1896
1904
  getFieldState: O,
1897
1905
  handleSubmit: SA,
1898
- setError: eA,
1906
+ setError: $,
1899
1907
  _subscribe: qA,
1900
- _runSchema: AA,
1901
- _updateIsValidating: k,
1902
- _focusError: lA,
1908
+ _runSchema: aA,
1909
+ _updateIsValidating: B,
1910
+ _focusError: uA,
1903
1911
  _getWatch: D,
1904
- _getDirty: R,
1905
- _setValid: Y,
1906
- _setFieldArray: g,
1912
+ _getDirty: g,
1913
+ _setValid: z,
1914
+ _setFieldArray: X,
1907
1915
  _setDisabledField: EA,
1908
- _setErrors: X,
1916
+ _setErrors: S,
1909
1917
  _getFieldArray: b,
1910
1918
  _reset: ve,
1911
- _resetDefaultValues: () => oA(r.defaultValues) && r.defaultValues().then((t) => {
1919
+ _resetDefaultValues: () => lA(r.defaultValues) && r.defaultValues().then((t) => {
1912
1920
  de(t, r.resetOptions), E.state.next({
1913
1921
  isLoading: !1
1914
1922
  });
1915
1923
  }),
1916
- _removeUnmounted: T,
1924
+ _removeUnmounted: L,
1917
1925
  _disableForm: WA,
1918
1926
  _subjects: E,
1919
1927
  _proxyFormState: P,
@@ -1953,16 +1961,16 @@ function bt(e = {}) {
1953
1961
  },
1954
1962
  subscribe: XA,
1955
1963
  trigger: W,
1956
- register: tA,
1964
+ register: eA,
1957
1965
  handleSubmit: SA,
1958
- watch: dA,
1966
+ watch: vA,
1959
1967
  setValue: V,
1960
- getValues: Q,
1968
+ getValues: y,
1961
1969
  reset: de,
1962
1970
  resetField: Vr,
1963
1971
  clearErrors: Z,
1964
1972
  unregister: VA,
1965
- setError: eA,
1973
+ setError: $,
1966
1974
  setFocus: br,
1967
1975
  getFieldState: O
1968
1976
  };
@@ -1972,10 +1980,10 @@ function bt(e = {}) {
1972
1980
  };
1973
1981
  }
1974
1982
  function ht(e = {}) {
1975
- const r = iA.useRef(void 0), A = iA.useRef(void 0), [i, v] = iA.useState({
1983
+ const r = rA.useRef(void 0), A = rA.useRef(void 0), [i, v] = rA.useState({
1976
1984
  isDirty: !1,
1977
1985
  isValidating: !1,
1978
- isLoading: oA(e.defaultValues),
1986
+ isLoading: lA(e.defaultValues),
1979
1987
  isSubmitted: !1,
1980
1988
  isSubmitting: !1,
1981
1989
  isSubmitSuccessful: !1,
@@ -1987,14 +1995,14 @@ function ht(e = {}) {
1987
1995
  errors: e.errors || {},
1988
1996
  disabled: e.disabled || !1,
1989
1997
  isReady: !1,
1990
- defaultValues: oA(e.defaultValues) ? void 0 : e.defaultValues
1998
+ defaultValues: lA(e.defaultValues) ? void 0 : e.defaultValues
1991
1999
  });
1992
2000
  if (!r.current)
1993
2001
  if (e.formControl)
1994
2002
  r.current = {
1995
2003
  ...e.formControl,
1996
2004
  formState: i
1997
- }, e.defaultValues && !oA(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
2005
+ }, e.defaultValues && !lA(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
1998
2006
  else {
1999
2007
  const { formControl: d, ...f } = bt(e);
2000
2008
  r.current = {
@@ -2013,70 +2021,70 @@ function ht(e = {}) {
2013
2021
  ...f,
2014
2022
  isReady: !0
2015
2023
  })), a._formState.isReady = !0, d;
2016
- }, [a]), iA.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), iA.useEffect(() => {
2024
+ }, [a]), rA.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), rA.useEffect(() => {
2017
2025
  e.mode && (a._options.mode = e.mode), e.reValidateMode && (a._options.reValidateMode = e.reValidateMode);
2018
- }, [a, e.mode, e.reValidateMode]), iA.useEffect(() => {
2026
+ }, [a, e.mode, e.reValidateMode]), rA.useEffect(() => {
2019
2027
  e.errors && (a._setErrors(e.errors), a._focusError());
2020
- }, [a, e.errors]), iA.useEffect(() => {
2028
+ }, [a, e.errors]), rA.useEffect(() => {
2021
2029
  e.shouldUnregister && a._subjects.state.next({
2022
2030
  values: a._getWatch()
2023
2031
  });
2024
- }, [a, e.shouldUnregister]), iA.useEffect(() => {
2032
+ }, [a, e.shouldUnregister]), rA.useEffect(() => {
2025
2033
  if (a._proxyFormState.isDirty) {
2026
2034
  const d = a._getDirty();
2027
2035
  d !== i.isDirty && a._subjects.state.next({
2028
2036
  isDirty: d
2029
2037
  });
2030
2038
  }
2031
- }, [a, i.isDirty]), iA.useEffect(() => {
2039
+ }, [a, i.isDirty]), rA.useEffect(() => {
2032
2040
  var d;
2033
2041
  e.values && !xA(e.values, A.current) ? (a._reset(e.values, {
2034
2042
  keepFieldsRef: !0,
2035
2043
  ...a._options.resetOptions
2036
2044
  }), !((d = a._options.resetOptions) === null || d === void 0) && d.keepIsValid || a._setValid(), A.current = e.values, v((f) => ({ ...f }))) : a._resetDefaultValues();
2037
- }, [a, e.values]), iA.useEffect(() => {
2045
+ }, [a, e.values]), rA.useEffect(() => {
2038
2046
  a._state.mount || (a._setValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted();
2039
- }), r.current.formState = iA.useMemo(() => tt(i, a), [a, i]), r.current;
2047
+ }), r.current.formState = rA.useMemo(() => tt(i, a), [a, i]), r.current;
2040
2048
  }
2041
2049
  const xt = () => {
2042
- const { list: e, updateItem: r, fetchItems: A } = Cr(), [i, v] = M(!1), [a, d] = M(!1), [f, C] = M(!1), [F, B] = M(), [
2050
+ const { list: e, updateItem: r, fetchItems: A } = Cr(), [i, v] = M(!1), [a, d] = M(!1), [f, R] = M(!1), [F, Y] = M(), [
2043
2051
  P,
2044
- H
2045
- ] = M(!1), E = ht(), K = je(
2046
- () => e?.filter((X) => X.destacada) || [],
2052
+ T
2053
+ ] = M(!1), E = ht(), C = je(
2054
+ () => e?.filter((S) => S.destacada) || [],
2047
2055
  [e]
2048
- ), U = ee({
2056
+ ), K = ee({
2049
2057
  successMessage: "Notificación archivada",
2050
2058
  errorMessage: "Error al archivar notificación"
2051
2059
  });
2052
2060
  mA(() => {
2053
- K?.length > 0 && !P && (H(!0), v(!0));
2054
- }, [K]), mA(() => {
2061
+ C?.length > 0 && !P && (T(!0), v(!0));
2062
+ }, [C]), mA(() => {
2055
2063
  F && E.reset(F);
2056
2064
  }, [F]);
2057
- const Y = (X) => {
2058
- B(X), d(!0);
2059
- }, k = async (X) => {
2060
- await r.execute(X), d(!1), A.execute();
2061
- }, g = (X) => {
2062
- B(X), C(!0);
2063
- }, $ = async () => {
2064
- await U.execute(
2065
+ const z = (S) => {
2066
+ Y(S), d(!0);
2067
+ }, B = async (S) => {
2068
+ await r.execute(S), d(!1), A.execute();
2069
+ }, X = (S) => {
2070
+ Y(S), R(!0);
2071
+ }, H = async () => {
2072
+ await K.execute(
2065
2073
  () => KA.put({
2066
2074
  url: `https://intranet.osocna.com.ar/padron/backend/api/Persons/Notificacion/${F?.idNotificacion}/Archivar`,
2067
2075
  body: null
2068
2076
  })
2069
- ), C(!1), A.execute();
2077
+ ), R(!1), A.execute();
2070
2078
  };
2071
- return /* @__PURE__ */ sA(JA, { children: [
2072
- /* @__PURE__ */ I(kA, { isLoading: A.isLoading, children: /* @__PURE__ */ I(PA, { children: e?.map((X) => /* @__PURE__ */ I(
2079
+ return /* @__PURE__ */ nA(JA, { children: [
2080
+ /* @__PURE__ */ I(kA, { isLoading: A.isLoading, children: /* @__PURE__ */ I(PA, { children: e?.map((S) => /* @__PURE__ */ I(
2073
2081
  He,
2074
2082
  {
2075
- notificacion: X,
2076
- onEditNotificacion: Y,
2077
- onArchiveNotificacion: g
2083
+ notificacion: S,
2084
+ onEditNotificacion: z,
2085
+ onArchiveNotificacion: X
2078
2086
  },
2079
- X.idNotificacion
2087
+ S.idNotificacion
2080
2088
  )) }) }),
2081
2089
  i && /* @__PURE__ */ I(
2082
2090
  jA,
@@ -2084,24 +2092,24 @@ const xt = () => {
2084
2092
  isOpen: i,
2085
2093
  onClose: () => v(!1),
2086
2094
  title: "Notificaciones Críticas",
2087
- children: /* @__PURE__ */ I(PA, { children: K?.map((X) => /* @__PURE__ */ I(
2095
+ children: /* @__PURE__ */ I(PA, { children: C?.map((S) => /* @__PURE__ */ I(
2088
2096
  He,
2089
2097
  {
2090
- notificacion: X,
2091
- onEditNotificacion: Y,
2092
- onArchiveNotificacion: g
2098
+ notificacion: S,
2099
+ onEditNotificacion: z,
2100
+ onArchiveNotificacion: X
2093
2101
  },
2094
- X.idNotificacion
2102
+ S.idNotificacion
2095
2103
  )) })
2096
2104
  }
2097
2105
  ),
2098
- a && /* @__PURE__ */ I(at, { ...E, children: /* @__PURE__ */ I("form", { onSubmit: E.handleSubmit(k), children: /* @__PURE__ */ I(
2106
+ a && /* @__PURE__ */ I(at, { ...E, children: /* @__PURE__ */ I("form", { onSubmit: E.handleSubmit(B), children: /* @__PURE__ */ I(
2099
2107
  jA,
2100
2108
  {
2101
2109
  isOpen: a,
2102
2110
  onClose: () => d(!1),
2103
2111
  title: "Editar Notificación",
2104
- footer: /* @__PURE__ */ sA(JA, { children: [
2112
+ footer: /* @__PURE__ */ nA(JA, { children: [
2105
2113
  /* @__PURE__ */ I(
2106
2114
  TA,
2107
2115
  {
@@ -2113,7 +2121,7 @@ const xt = () => {
2113
2121
  ),
2114
2122
  /* @__PURE__ */ I(TA, { type: "submit", disabled: r.isLoading, children: "Guardar" })
2115
2123
  ] }),
2116
- children: /* @__PURE__ */ sA(PA, { children: [
2124
+ children: /* @__PURE__ */ nA(PA, { children: [
2117
2125
  /* @__PURE__ */ I(
2118
2126
  Tr,
2119
2127
  {
@@ -2139,15 +2147,15 @@ const xt = () => {
2139
2147
  jA,
2140
2148
  {
2141
2149
  isOpen: f,
2142
- onClose: () => C(!1),
2150
+ onClose: () => R(!1),
2143
2151
  title: "Archivar Notificación",
2144
- footer: /* @__PURE__ */ sA(JA, { children: [
2152
+ footer: /* @__PURE__ */ nA(JA, { children: [
2145
2153
  /* @__PURE__ */ I(
2146
2154
  TA,
2147
2155
  {
2148
- onClick: () => C(!1),
2156
+ onClick: () => R(!1),
2149
2157
  variant: "outline",
2150
- disabled: U.isLoading,
2158
+ disabled: K.isLoading,
2151
2159
  children: "No"
2152
2160
  }
2153
2161
  ),
@@ -2155,15 +2163,15 @@ const xt = () => {
2155
2163
  TA,
2156
2164
  {
2157
2165
  type: "submit",
2158
- onClick: $,
2159
- disabled: U.isLoading,
2166
+ onClick: H,
2167
+ disabled: K.isLoading,
2160
2168
  children: "Sí"
2161
2169
  }
2162
2170
  )
2163
2171
  ] }),
2164
- children: /* @__PURE__ */ sA(PA, { children: [
2172
+ children: /* @__PURE__ */ nA(PA, { children: [
2165
2173
  /* @__PURE__ */ I("p", { children: "¿Desea archivar la notificación?" }),
2166
- /* @__PURE__ */ I(kA, { isLoading: U.isLoading })
2174
+ /* @__PURE__ */ I(kA, { isLoading: K.isLoading })
2167
2175
  ] })
2168
2176
  }
2169
2177
  )