@mci-ui/mci-ui 0.0.67 → 0.0.69

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.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as e, jsxs as i, Fragment as he } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as c, Fragment as he } from "react/jsx-runtime";
2
2
  import { AltArrowRight as ge, Star2 as Be, AltArrowDown as Se, EyeClosed as Qe, Eye as Pe, Calendar as et, AltArrowLeft as ye, DoubleAltArrowLeft as tt, DoubleAltArrowRight as rt, ConfoundedSquare as nt, SortVertical as lt, SortFromTopToBottom as at, SortFromBottomToTop as st, Upload as ot, File as je, Download as it, FileText as Me, MusicNote as ct, VideoFramePlayHorizontal as dt, Gallery as ut, MenuDots as ht, Refresh as ft, InfoCircle as mt, DangerCircle as pt, CloseCircle as gt, CheckCircle as bt, Phone as xt, TransferVertical as wt } from "@solar-icons/react";
3
3
  import { clsx as vt } from "clsx";
4
4
  import { twMerge as yt } from "tailwind-merge";
@@ -23,14 +23,14 @@ function Zt({
23
23
  variant: a = "blue",
24
24
  className: r
25
25
  }) {
26
- const l = a === "blue", m = l ? "hover:text-blue-600" : "hover:text-yellow-500", c = l ? "text-blue-600" : "text-yellow-500";
26
+ const l = a === "blue", m = l ? "hover:text-blue-600" : "hover:text-yellow-500", u = l ? "text-blue-600" : "text-yellow-500";
27
27
  return /* @__PURE__ */ e("nav", { className: n("flex items-center", r), "aria-label": "Breadcrumb", children: t.map((s, o) => {
28
28
  const C = o === t.length - 1;
29
- return /* @__PURE__ */ i("div", { className: "flex items-center", children: [
30
- C ? /* @__PURE__ */ i("span", { className: n("flex items-center gap-x-2 font-medium", c), children: [
29
+ return /* @__PURE__ */ c("div", { className: "flex items-center", children: [
30
+ C ? /* @__PURE__ */ c("span", { className: n("flex items-center gap-x-2 font-medium", u), children: [
31
31
  s.icon,
32
32
  /* @__PURE__ */ e("span", { children: s.label })
33
- ] }) : /* @__PURE__ */ i(
33
+ ] }) : /* @__PURE__ */ c(
34
34
  "a",
35
35
  {
36
36
  href: s.href ?? "#",
@@ -57,19 +57,19 @@ function qt({
57
57
  icon: r,
58
58
  iconPosition: l = "left",
59
59
  size: m = "base",
60
- variant: c = "primary",
60
+ variant: u = "primary",
61
61
  color: s = "yellow",
62
62
  loading: o = !1,
63
63
  disabled: C = !1,
64
64
  onClick: y,
65
- className: k,
66
- type: M = "button"
65
+ className: M,
66
+ type: k = "button"
67
67
  }) {
68
- const j = t ?? a, T = {
68
+ const L = t ?? a, I = {
69
69
  sm: "h-9 px-2 text-sm gap-1.5 rounded-lg leading-9 min-w-9",
70
70
  md: "h-10 px-2 text-base gap-2 rounded-lg leading-10 min-w-10",
71
71
  base: "h-12 px-4 text-base gap-2 rounded-xl leading-12 min-w-12"
72
- }, d = c === "primary" || c === "secondary" || c === "outline" ? {
72
+ }, i = u === "primary" || u === "secondary" || u === "outline" ? {
73
73
  blue: {
74
74
  primary: "bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",
75
75
  secondary: "bg-blue-100 text-blue-600 hover:bg-blue-200 active:bg-blue-200 active:border active:border-blue-600 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",
@@ -80,27 +80,27 @@ function qt({
80
80
  secondary: "bg-yellow-50 text-yellow-500 hover:bg-yellow-100 active:bg-yellow-100 active:border active:border-yellow-500 focus:ring-2 focus:ring-yellow-200",
81
81
  outline: "border border-yellow-500 text-yellow-500 hover:border-yellow-600 hover:text-yellow-600 active:border-yellow-700 active:text-yellow-700 focus:ring-2 focus:ring-yellow-200"
82
82
  }
83
- }[s][c] : {
83
+ }[s][u] : {
84
84
  danger: "bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:shadow-red",
85
85
  tertiary: "bg-slate-100 text-black hover:bg-slate-200 active:bg-slate-300 focus:ring-2 focus:shadow-slate"
86
- }[c], x = C || o, b = x ? c === "outline" ? "border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0" : "bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 active:bg-slate-200 focus:ring-0" : "";
87
- return /* @__PURE__ */ i(
86
+ }[u], x = C || o, b = x ? u === "outline" ? "border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0" : "bg-slate-200 text-slate-400 cursor-not-allowed hover:bg-slate-200 active:bg-slate-200 focus:ring-0" : "";
87
+ return /* @__PURE__ */ c(
88
88
  "button",
89
89
  {
90
- type: M,
90
+ type: k,
91
91
  onClick: y,
92
92
  disabled: x,
93
93
  className: n(
94
94
  "inline-flex items-center justify-center font-medium transition-all duration-200 cursor-pointer",
95
- T[m],
96
- d,
97
- !x && d,
95
+ I[m],
96
+ i,
97
+ !x && i,
98
98
  b,
99
- k
99
+ M
100
100
  ),
101
101
  children: [
102
102
  r && l === "left" && !o && /* @__PURE__ */ e("span", { className: "flex items-center", children: r }),
103
- j && /* @__PURE__ */ e("span", { children: j }),
103
+ L && /* @__PURE__ */ e("span", { children: L }),
104
104
  r && l === "right" && !o && /* @__PURE__ */ e("span", { className: "flex items-center", children: r }),
105
105
  o && /* @__PURE__ */ e(Be, { weight: "Linear", size: 20, className: "animate-spin" })
106
106
  ]
@@ -125,47 +125,47 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
125
125
  label: r,
126
126
  supportText: l,
127
127
  checked: m,
128
- onChange: c,
128
+ onChange: u,
129
129
  error: s,
130
130
  disabled: o = !1,
131
131
  required: C = !1,
132
132
  className: y,
133
- variant: k = "yellow",
134
- name: M,
135
- value: j
133
+ variant: M = "yellow",
134
+ name: k,
135
+ value: L
136
136
  }) {
137
- const [T, v] = Y(!1), u = a === "radio", d = _(
138
- () => m ?? T,
139
- [m, T]
137
+ const [I, w] = Y(!1), d = a === "radio", i = _(
138
+ () => m ?? I,
139
+ [m, I]
140
140
  ), x = z(
141
- (w) => {
142
- o || (m === void 0 && v(w.target.checked), c?.(w));
141
+ (v) => {
142
+ o || (m === void 0 && w(v.target.checked), u?.(v));
143
143
  },
144
- [m, c, o]
144
+ [m, u, o]
145
145
  ), b = _(() => {
146
146
  if (o) {
147
147
  const S = "border-slate-200 bg-slate-100";
148
- return u ? {
148
+ return d ? {
149
149
  container: S,
150
- dot: d ? "bg-slate-300" : "bg-transparent",
150
+ dot: i ? "bg-slate-300" : "bg-transparent",
151
151
  check: "text-slate-400"
152
152
  } : {
153
153
  container: S,
154
154
  dot: "",
155
- check: d ? "text-slate-400" : "text-transparent"
155
+ check: i ? "text-slate-400" : "text-transparent"
156
156
  };
157
157
  }
158
- const w = Mt[k];
159
- if (u) {
158
+ const v = Mt[M];
159
+ if (d) {
160
160
  const S = n(
161
161
  "border transition-all duration-200",
162
- d ? w.border : "border-slate-400",
163
- !d && w.hover,
164
- w.focus,
165
- d && ""
162
+ i ? v.border : "border-slate-400",
163
+ !i && v.hover,
164
+ v.focus,
165
+ i && ""
166
166
  ), E = n(
167
167
  "transition-all duration-200 rounded-full",
168
- d ? w.bg : "bg-transparent"
168
+ i ? v.bg : "bg-transparent"
169
169
  );
170
170
  return {
171
171
  container: S,
@@ -176,15 +176,15 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
176
176
  return {
177
177
  container: n(
178
178
  "border transition-all duration-200",
179
- d ? n(w.bg, w.border) : "border-slate-400",
180
- !d && w.hover,
181
- w.focus
179
+ i ? n(v.bg, v.border) : "border-slate-400",
180
+ !i && v.hover,
181
+ v.focus
182
182
  ),
183
183
  dot: "",
184
- check: d ? "text-white" : "text-transparent"
184
+ check: i ? "text-white" : "text-transparent"
185
185
  };
186
- }, [u, d, o, k]), p = _(() => !r && !l ? null : /* @__PURE__ */ i("div", { className: "flex flex-col", children: [
187
- r && /* @__PURE__ */ i(
186
+ }, [d, i, o, M]), p = _(() => !r && !l ? null : /* @__PURE__ */ c("div", { className: "flex flex-col", children: [
187
+ r && /* @__PURE__ */ c(
188
188
  "span",
189
189
  {
190
190
  className: n(
@@ -209,8 +209,8 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
209
209
  }
210
210
  )
211
211
  ] }), [r, l, s, o, C]);
212
- return /* @__PURE__ */ i("div", { className: n("flex items-start", y), children: [
213
- /* @__PURE__ */ i(
212
+ return /* @__PURE__ */ c("div", { className: n("flex items-start", y), children: [
213
+ /* @__PURE__ */ c(
214
214
  "label",
215
215
  {
216
216
  className: n(
@@ -222,15 +222,15 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
222
222
  "input",
223
223
  {
224
224
  type: a,
225
- checked: d,
225
+ checked: i,
226
226
  onChange: x,
227
227
  disabled: o,
228
228
  required: C,
229
229
  className: "sr-only",
230
230
  "aria-invalid": !!s,
231
- "aria-describedby": s ? `${M}-error` : void 0,
232
- name: M,
233
- value: j
231
+ "aria-describedby": s ? `${k}-error` : void 0,
232
+ name: k,
233
+ value: L
234
234
  }
235
235
  ),
236
236
  /* @__PURE__ */ e(
@@ -238,16 +238,16 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
238
238
  {
239
239
  className: n(
240
240
  "relative flex items-center justify-center",
241
- u ? "w-5 h-5 rounded-full" : "w-5 h-5 rounded",
241
+ d ? "w-5 h-5 rounded-full" : "w-5 h-5 rounded",
242
242
  b.container
243
243
  ),
244
- children: u ? /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(
244
+ children: d ? /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(
245
245
  "span",
246
246
  {
247
247
  className: n(
248
248
  "w-3 h-3 rounded-full transition-all duration-200",
249
249
  b.dot,
250
- d ? "opacity-100 scale-100" : "opacity-0 scale-50"
250
+ i ? "opacity-100 scale-100" : "opacity-0 scale-50"
251
251
  )
252
252
  }
253
253
  ) }) : /* @__PURE__ */ e(
@@ -256,7 +256,7 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
256
256
  className: n(
257
257
  "w-4 h-4 stroke-[2.5px] transition-opacity duration-200",
258
258
  b.check,
259
- d ? "opacity-100" : "opacity-0"
259
+ i ? "opacity-100" : "opacity-0"
260
260
  )
261
261
  }
262
262
  )
@@ -266,7 +266,7 @@ const Ct = (t) => /* @__PURE__ */ te.createElement("svg", { xmlns: "http://www.w
266
266
  ]
267
267
  }
268
268
  ),
269
- s && /* @__PURE__ */ e("p", { id: `${M}-error`, className: "mt-1 text-extra-small text-red-600", children: s })
269
+ s && /* @__PURE__ */ e("p", { id: `${k}-error`, className: "mt-1 text-extra-small text-red-600", children: s })
270
270
  ] });
271
271
  });
272
272
  ke.displayName = "MciCheck";
@@ -276,13 +276,13 @@ function Kt({
276
276
  defaultOpen: r = !1,
277
277
  icon: l,
278
278
  className: m,
279
- contentClassName: c
279
+ contentClassName: u
280
280
  }) {
281
- const [s, o] = Y(r), [C, y] = Y(0), k = se(null);
281
+ const [s, o] = Y(r), [C, y] = Y(0), M = se(null);
282
282
  return J(() => {
283
- k.current && y(s ? k.current.scrollHeight : 0);
284
- }, [s]), /* @__PURE__ */ i("div", { className: n("overflow-hidden rounded-xl border border-slate-200", m), children: [
285
- /* @__PURE__ */ i(
283
+ M.current && y(s ? M.current.scrollHeight : 0);
284
+ }, [s]), /* @__PURE__ */ c("div", { className: n("overflow-hidden rounded-xl border border-slate-200", m), children: [
285
+ /* @__PURE__ */ c(
286
286
  "button",
287
287
  {
288
288
  onClick: () => o(!s),
@@ -291,7 +291,7 @@ function Kt({
291
291
  s ? "border-b border-slate-200" : "border-b border-transparent"
292
292
  ),
293
293
  children: [
294
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
294
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
295
295
  l && /* @__PURE__ */ e("span", { className: "shrink-0", children: l }),
296
296
  /* @__PURE__ */ e("div", { className: n("text-base font-medium text-black"), children: t })
297
297
  ] }),
@@ -318,7 +318,7 @@ function Kt({
318
318
  style: {
319
319
  height: `${C}px`
320
320
  },
321
- children: /* @__PURE__ */ e("div", { ref: k, className: n("p-5", c), children: a })
321
+ children: /* @__PURE__ */ e("div", { ref: M, className: n("p-5", u), children: a })
322
322
  }
323
323
  )
324
324
  ] });
@@ -330,30 +330,30 @@ function Jt({
330
330
  position: r = "right",
331
331
  children: l,
332
332
  footer: m,
333
- title: c,
333
+ title: u,
334
334
  description: s,
335
335
  showCloseButton: o = !0,
336
336
  drawerClassName: C,
337
337
  closeOnOverlayClick: y = !0,
338
- closeOnEscape: k = !0,
339
- width: M = 572
338
+ closeOnEscape: M = !0,
339
+ width: k = 572
340
340
  }) {
341
- const j = se(null), T = se(null), v = z(() => {
341
+ const L = se(null), I = se(null), w = z(() => {
342
342
  a();
343
343
  }, [a]);
344
344
  J(() => {
345
- t ? (T.current = document.activeElement, j.current?.focus()) : T.current?.focus();
345
+ t ? (I.current = document.activeElement, L.current?.focus()) : I.current?.focus();
346
346
  }, [t]), J(() => (t && (document.body.style.overflow = "hidden"), () => {
347
347
  document.body.style.overflow = "unset";
348
348
  }), [t]);
349
- const u = _(() => ({
350
- width: typeof M == "number" ? `${M}px` : M,
349
+ const d = _(() => ({
350
+ width: typeof k == "number" ? `${k}px` : k,
351
351
  transform: t ? "translateX(0)" : r === "right" ? "translateX(calc(100% + 48px))" : "translateX(calc(-100% - 48px))"
352
- }), [t, M, r]), d = {
352
+ }), [t, k, r]), i = {
353
353
  left: "top-6 left-6 bottom-6",
354
354
  right: "top-6 right-6 bottom-6"
355
355
  };
356
- return /* @__PURE__ */ i(he, { children: [
356
+ return /* @__PURE__ */ c(he, { children: [
357
357
  /* @__PURE__ */ e(
358
358
  "div",
359
359
  {
@@ -361,35 +361,35 @@ function Jt({
361
361
  "fixed inset-0 z-50 bg-black/40 transition-opacity duration-300",
362
362
  t ? "opacity-100 visible cursor-pointer" : "opacity-0 invisible pointer-events-none"
363
363
  ),
364
- onClick: y ? v : void 0,
364
+ onClick: y ? w : void 0,
365
365
  "aria-hidden": "true"
366
366
  }
367
367
  ),
368
- /* @__PURE__ */ i(
368
+ /* @__PURE__ */ c(
369
369
  "div",
370
370
  {
371
- ref: j,
371
+ ref: L,
372
372
  tabIndex: -1,
373
- style: u,
373
+ style: d,
374
374
  className: n(
375
375
  "fixed flex flex-col z-50 w-full rounded-2xl bg-white transition-transform duration-300 ease-in-out outline-none",
376
- d[r],
376
+ i[r],
377
377
  C
378
378
  ),
379
379
  role: "dialog",
380
380
  "aria-modal": "true",
381
- "aria-labelledby": c ? "drawer-title" : void 0,
381
+ "aria-labelledby": u ? "drawer-title" : void 0,
382
382
  children: [
383
- (c || o || s) && /* @__PURE__ */ i("div", { className: "flex items-start justify-between border-b border-slate-200 p-6 shrink-0", children: [
384
- c && /* @__PURE__ */ i("div", { className: "block", children: [
385
- /* @__PURE__ */ e("h2", { id: "drawer-title", className: "text-h3 font-semibold text-black", children: c }),
383
+ (u || o || s) && /* @__PURE__ */ c("div", { className: "flex items-start justify-between border-b border-slate-200 p-6 shrink-0", children: [
384
+ u && /* @__PURE__ */ c("div", { className: "block", children: [
385
+ /* @__PURE__ */ e("h2", { id: "drawer-title", className: "text-h3 font-semibold text-black", children: u }),
386
386
  s && /* @__PURE__ */ e("p", { className: "text-base text-slate-base font-normal mt-2", children: s })
387
387
  ] }),
388
388
  o && /* @__PURE__ */ e(
389
389
  "button",
390
390
  {
391
391
  type: "button",
392
- onClick: v,
392
+ onClick: w,
393
393
  className: "bg-slate-100 rounded-xl w-12 h-12 hover:cursor-pointer text-black transition flex items-center justify-center group active:scale-95",
394
394
  children: /* @__PURE__ */ e(me, { className: "h-6 w-6 transition-transform duration-300 group-hover:rotate-180" })
395
395
  }
@@ -409,32 +409,32 @@ const Fe = fe(
409
409
  type: r = "text",
410
410
  icon: l,
411
411
  rightIcon: m,
412
- iconPosition: c = "left",
412
+ iconPosition: u = "left",
413
413
  size: s = "base",
414
414
  error: o,
415
415
  disabled: C = !1,
416
416
  required: y = !1,
417
- value: k,
418
- onChange: M,
419
- onFocus: j,
420
- onBlur: T,
421
- className: v,
422
- name: u,
423
- maxLength: d = 250,
417
+ value: M,
418
+ onChange: k,
419
+ onFocus: L,
420
+ onBlur: I,
421
+ className: w,
422
+ name: d,
423
+ maxLength: i = 250,
424
424
  onClear: x,
425
425
  showClearButton: b = !1,
426
426
  step: p,
427
- autoComplete: w = "off"
428
- }, L) => {
429
- const [S, E] = Y(!1), [h, F] = Y(""), [I, B] = Y(!1), H = k ?? h, W = r === "password", U = b && !!H && !C, K = l && c === "left", ne = l && c === "right" || m || W, re = ne || U, X = () => {
430
- E(!0), j?.();
427
+ autoComplete: v = "off"
428
+ }, j) => {
429
+ const [S, E] = Y(!1), [h, F] = Y(""), [T, B] = Y(!1), H = M ?? h, W = r === "password", U = b && !!H && !C, K = l && u === "left", ne = l && u === "right" || m || W, re = ne || U, X = () => {
430
+ E(!0), L?.();
431
431
  }, le = () => {
432
- E(!1), T?.();
432
+ E(!1), I?.();
433
433
  }, ie = (Z) => {
434
434
  let q = Z.target.value;
435
- r === "number" && d && q.length > d && (q = q.slice(0, d), Z.target.value = q), k === void 0 && F(q), M?.(Z);
435
+ r === "number" && i && q.length > i && (q = q.slice(0, i), Z.target.value = q), M === void 0 && F(q), k?.(Z);
436
436
  }, Q = () => B((Z) => !Z), N = () => {
437
- k === void 0 && F(""), x?.();
437
+ M === void 0 && F(""), x?.();
438
438
  }, D = _(
439
439
  () => ({
440
440
  sm: {
@@ -466,12 +466,12 @@ const Fe = fe(
466
466
  }
467
467
  }),
468
468
  [K, ne]
469
- ), $ = _(() => o ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [o]), R = _(() => C ? "text-slate-400" : o ? "text-red-600" : S ? "text-black" : "text-slate-400", [o, S, C]);
470
- return /* @__PURE__ */ i("div", { className: n("w-full", v), children: [
471
- t && /* @__PURE__ */ i(
469
+ ), R = _(() => o ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [o]), $ = _(() => C ? "text-slate-400" : o ? "text-red-600" : S ? "text-black" : "text-slate-400", [o, S, C]);
470
+ return /* @__PURE__ */ c("div", { className: n("w-full", w), children: [
471
+ t && /* @__PURE__ */ c(
472
472
  "label",
473
473
  {
474
- htmlFor: u,
474
+ htmlFor: d,
475
475
  className: n(
476
476
  "mb-2 block text-base font-medium",
477
477
  o ? "text-red-600" : "text-slate-700",
@@ -483,20 +483,20 @@ const Fe = fe(
483
483
  ]
484
484
  }
485
485
  ),
486
- /* @__PURE__ */ i("div", { className: "relative flex items-center", children: [
486
+ /* @__PURE__ */ c("div", { className: "relative flex items-center", children: [
487
487
  /* @__PURE__ */ e(
488
488
  "input",
489
489
  {
490
- ref: L,
491
- name: u,
492
- type: W && I ? "text" : r,
490
+ ref: j,
491
+ name: d,
492
+ type: W && T ? "text" : r,
493
493
  value: H,
494
494
  onChange: ie,
495
495
  onFocus: X,
496
496
  onBlur: le,
497
497
  disabled: C,
498
498
  required: y,
499
- autoComplete: w,
499
+ autoComplete: v,
500
500
  placeholder: a,
501
501
  step: p,
502
502
  className: n(
@@ -506,9 +506,9 @@ const Fe = fe(
506
506
  "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
507
507
  D[s].input,
508
508
  D[s].padding,
509
- $
509
+ R
510
510
  ),
511
- maxLength: d
511
+ maxLength: i
512
512
  }
513
513
  ),
514
514
  K && /* @__PURE__ */ e(
@@ -518,7 +518,7 @@ const Fe = fe(
518
518
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center",
519
519
  "transition-all duration-300",
520
520
  D[s].leftIcon,
521
- R
521
+ $
522
522
  ),
523
523
  children: /* @__PURE__ */ e(
524
524
  "div",
@@ -529,7 +529,7 @@ const Fe = fe(
529
529
  )
530
530
  }
531
531
  ),
532
- re && /* @__PURE__ */ i(
532
+ re && /* @__PURE__ */ c(
533
533
  "div",
534
534
  {
535
535
  className: n(
@@ -562,14 +562,14 @@ const Fe = fe(
562
562
  className: n(
563
563
  "flex items-center justify-center",
564
564
  D[s].icon,
565
- R
565
+ $
566
566
  ),
567
567
  children: m
568
568
  }
569
569
  )
570
570
  }
571
571
  ),
572
- W && /* @__PURE__ */ i(he, { children: [
572
+ W && /* @__PURE__ */ c(he, { children: [
573
573
  m && /* @__PURE__ */ e(
574
574
  "div",
575
575
  {
@@ -583,7 +583,7 @@ const Fe = fe(
583
583
  className: n(
584
584
  "flex items-center justify-center",
585
585
  D[s].icon,
586
- R
586
+ $
587
587
  ),
588
588
  children: m
589
589
  }
@@ -598,19 +598,19 @@ const Fe = fe(
598
598
  className: n(
599
599
  "flex items-center justify-center",
600
600
  D[s].iconWrapper,
601
- R
601
+ $
602
602
  ),
603
603
  children: /* @__PURE__ */ e(
604
604
  "span",
605
605
  {
606
606
  className: n("flex items-center justify-center cursor-pointer", D[s].icon),
607
- children: I ? /* @__PURE__ */ e(Qe, { weight: "Linear", className: n("h-full w-full") }) : /* @__PURE__ */ e(Pe, { weight: "Linear", className: n("h-full w-full") })
607
+ children: T ? /* @__PURE__ */ e(Qe, { weight: "Linear", className: n("h-full w-full") }) : /* @__PURE__ */ e(Pe, { weight: "Linear", className: n("h-full w-full") })
608
608
  }
609
609
  )
610
610
  }
611
611
  )
612
612
  ] }),
613
- l && c === "right" && !W && /* @__PURE__ */ e(
613
+ l && u === "right" && !W && /* @__PURE__ */ e(
614
614
  "div",
615
615
  {
616
616
  className: n("flex items-center justify-center", D[s].iconWrapper),
@@ -620,7 +620,7 @@ const Fe = fe(
620
620
  className: n(
621
621
  "flex items-center justify-center",
622
622
  D[s].icon,
623
- R
623
+ $
624
624
  ),
625
625
  children: l
626
626
  }
@@ -740,39 +740,39 @@ const Dt = {
740
740
  onChange: r,
741
741
  placeholder: l,
742
742
  label: m,
743
- disabled: c = !1,
743
+ disabled: u = !1,
744
744
  required: s = !1,
745
745
  className: o,
746
746
  format: C = "DD.MM.YYYY",
747
747
  minDate: y,
748
- maxDate: k,
749
- error: M,
750
- showClear: j = !0,
751
- allowManualInput: T = !0,
752
- locale: v = "uz",
753
- startView: u = "day",
754
- iconPosition: d = "left",
748
+ maxDate: M,
749
+ error: k,
750
+ showClear: L = !0,
751
+ allowManualInput: I = !0,
752
+ locale: w = "uz",
753
+ startView: d = "day",
754
+ iconPosition: i = "left",
755
755
  align: x = "auto"
756
756
  }, b) => {
757
- const [p, w] = Y(!1), [L, S] = Y(
757
+ const [p, v] = Y(!1), [j, S] = Y(
758
758
  t === "range" ? [null, null] : null
759
759
  ), [E, h] = Y([null, null]), F = z((f) => {
760
760
  if (!f) return null;
761
761
  const g = new Date(f);
762
762
  return isNaN(g.getTime()) ? null : g;
763
- }, []), [I, B] = Y(/* @__PURE__ */ new Date()), [H, W] = Y(u), [U, K] = Y(0), [ne, re] = Y(""), [X, le] = Y(x), ie = se(null), Q = _(() => {
764
- const f = a !== void 0 ? a : L;
763
+ }, []), [T, B] = Y(/* @__PURE__ */ new Date()), [H, W] = Y(d), [U, K] = Y(0), [ne, re] = Y(""), [X, le] = Y(x), ie = se(null), Q = _(() => {
764
+ const f = a !== void 0 ? a : j;
765
765
  if (t === "date") return F(f);
766
766
  const g = f;
767
767
  return [F(g[0]), F(g[1])];
768
- }, [a, L, t, F]), N = Dt[v], D = z((f) => new Date(f.getFullYear(), f.getMonth(), f.getDate()), []), $ = z(
768
+ }, [a, j, t, F]), N = Dt[w], D = z((f) => new Date(f.getFullYear(), f.getMonth(), f.getDate()), []), R = z(
769
769
  (f) => {
770
770
  if (!f) return "";
771
771
  const g = f.getDate().toString().padStart(2, "0"), A = (f.getMonth() + 1).toString().padStart(2, "0"), O = f.getFullYear();
772
772
  return C.replace("DD", g).replace("MM", A).replace("YYYY", O.toString());
773
773
  },
774
774
  [C]
775
- ), R = z((f) => {
775
+ ), $ = z((f) => {
776
776
  if (!f || f.length !== 10) return null;
777
777
  const g = f.replace(/\D/g, "");
778
778
  if (g.length !== 8) return null;
@@ -783,14 +783,14 @@ const Dt = {
783
783
  }, []), Z = z(
784
784
  (f) => {
785
785
  const g = D(f);
786
- return !!(y && g < D(y) || k && g > D(k));
786
+ return !!(y && g < D(y) || M && g > D(M));
787
787
  },
788
- [y, k, D]
788
+ [y, M, D]
789
789
  ), q = _(() => {
790
- if (t === "date") return $(Q);
790
+ if (t === "date") return R(Q);
791
791
  const [f, g] = Q;
792
- return !f && !g ? "" : f && g ? `${$(f)} - ${$(g)}` : f ? `${$(f)} - ...` : "...";
793
- }, [t, Q, $]);
792
+ return !f && !g ? "" : f && g ? `${R(f)} - ${R(g)}` : f ? `${R(f)} - ...` : "...";
793
+ }, [t, Q, R]);
794
794
  J(() => {
795
795
  p ? ne === "" && q !== "" && re(q) : re(q);
796
796
  }, [q, p]), J(() => {
@@ -809,10 +809,10 @@ const Dt = {
809
809
  }
810
810
  }, [p, x]);
811
811
  const G = z(() => {
812
- w(!1), W(u), K(0), re(q);
813
- }, [u, q]), ue = z((f) => {
814
- c || (f.preventDefault(), f.stopPropagation(), w((g) => !g));
815
- }, [c]), { handleClick: P } = Ce(ie, G), { handleEscape: ce } = Ae(G);
812
+ v(!1), W(d), K(0), re(q);
813
+ }, [d, q]), ue = z((f) => {
814
+ u || (f.preventDefault(), f.stopPropagation(), v((g) => !g));
815
+ }, [u]), { handleClick: P } = Ce(ie, G), { handleEscape: ce } = Ae(G);
816
816
  J(() => {
817
817
  if (p)
818
818
  return document.addEventListener("mousedown", P), document.addEventListener("keydown", ce), () => {
@@ -820,14 +820,14 @@ const Dt = {
820
820
  };
821
821
  }, [p, P, ce]);
822
822
  const We = () => {
823
- c || p || (t === "range" || !T) && (w(!0), W(u));
823
+ u || p || (t === "range" || !I) && (v(!0), W(d));
824
824
  }, Ye = (f) => {
825
825
  if (t !== "date") return;
826
826
  let A = f.target.value.replace(/\D/g, "");
827
827
  A.length > 8 && (A = A.slice(0, 8));
828
828
  let O = "";
829
829
  if (A.length > 4 ? O = `${A.slice(0, 2)}.${A.slice(2, 4)}.${A.slice(4)}` : A.length > 2 ? O = `${A.slice(0, 2)}.${A.slice(2)}` : O = A, re(O), O.length === 10) {
830
- const V = R(O);
830
+ const V = $(O);
831
831
  V && !Z(V) && (S(V), r?.(V), B(V));
832
832
  } else O === "" && (S(null), r?.(null));
833
833
  }, Oe = z(() => {
@@ -838,27 +838,27 @@ const Dt = {
838
838
  if (Z(f)) return;
839
839
  const g = D(f);
840
840
  if (t === "date")
841
- S(g), r?.(g), re($(g)), G();
841
+ S(g), r?.(g), re(R(g)), G();
842
842
  else {
843
843
  const [A, O] = E;
844
844
  if (!A && !O || A && O)
845
- h([g, null]), re(`${$(g)} - ...`);
845
+ h([g, null]), re(`${R(g)} - ...`);
846
846
  else if (A && !O) {
847
847
  const V = g < A ? [g, A] : [A, g];
848
848
  h(V), S(V), r?.(V);
849
849
  const [ee, de] = V;
850
- re(`${$(ee)} - ${$(de)}`), G();
850
+ re(`${R(ee)} - ${R(de)}`), G();
851
851
  }
852
852
  }
853
853
  },
854
- [t, E, Z, D, r, G, $]
854
+ [t, E, Z, D, r, G, R]
855
855
  ), _e = z((f) => {
856
- const g = new Date(I.getFullYear(), f, 1);
857
- B(g), u === "month" && t === "date" ? (S(g), r?.(g), re($(g)), G()) : W("day");
858
- }, [I, u, r, G, t, $]), He = z((f) => {
859
- const g = new Date(f, I.getMonth(), 1);
860
- B(g), u === "year" && t === "date" ? (S(g), r?.(g), re($(g)), G()) : W("month");
861
- }, [I, u, r, G, t, $]), Ee = (f) => {
856
+ const g = new Date(T.getFullYear(), f, 1);
857
+ B(g), d === "month" && t === "date" ? (S(g), r?.(g), re(R(g)), G()) : W("day");
858
+ }, [T, d, r, G, t, R]), He = z((f) => {
859
+ const g = new Date(f, T.getMonth(), 1);
860
+ B(g), d === "year" && t === "date" ? (S(g), r?.(g), re(R(g)), G()) : W("month");
861
+ }, [T, d, r, G, t, R]), Ee = (f) => {
862
862
  B((g) => new Date(g.getFullYear(), g.getMonth() + f, 1));
863
863
  }, be = (f) => {
864
864
  B((g) => new Date(g.getFullYear() + f, g.getMonth(), 1));
@@ -884,17 +884,17 @@ const Dt = {
884
884
  return V && !ee ? !1 : V && ee && g > D(V) && g < D(ee);
885
885
  }, Le = (f, g, A) => {
886
886
  const O = Ue(f);
887
- return /* @__PURE__ */ i("div", { className: "w-[300px] p-2 select-none", children: [
888
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4 py-1", children: [
889
- /* @__PURE__ */ e("div", { className: "flex gap-2 w-16", children: g && /* @__PURE__ */ i(he, { children: [
887
+ return /* @__PURE__ */ c("div", { className: "w-[300px] p-2 select-none", children: [
888
+ /* @__PURE__ */ c("div", { className: "flex items-center justify-between mb-4 py-1", children: [
889
+ /* @__PURE__ */ e("div", { className: "flex gap-2 w-16", children: g && /* @__PURE__ */ c(he, { children: [
890
890
  /* @__PURE__ */ e("button", { onClick: () => be(-1), type: "button", className: "hover:bg-slate-100 p-1 rounded transition-colors text-slate-500", children: /* @__PURE__ */ e(tt, { size: 18 }) }),
891
891
  /* @__PURE__ */ e("button", { onClick: () => Ee(-1), type: "button", className: "hover:bg-slate-100 p-1 rounded transition-colors text-slate-500", children: /* @__PURE__ */ e(ye, { size: 18 }) })
892
892
  ] }) }),
893
- /* @__PURE__ */ i("div", { className: "flex gap-1 font-semibold text-slate-700 text-sm whitespace-nowrap", children: [
893
+ /* @__PURE__ */ c("div", { className: "flex gap-1 font-semibold text-slate-700 text-sm whitespace-nowrap", children: [
894
894
  /* @__PURE__ */ e("span", { className: "cursor-pointer hover:text-blue-600 transition-colors p-1 rounded hover:bg-slate-50", onClick: () => W("month"), children: N.months[f.getMonth()] }),
895
895
  /* @__PURE__ */ e("span", { className: "cursor-pointer hover:text-blue-600 transition-colors p-1 rounded hover:bg-slate-50", onClick: () => W("year"), children: f.getFullYear() })
896
896
  ] }),
897
- /* @__PURE__ */ e("div", { className: "flex gap-2 w-16 justify-end", children: A && /* @__PURE__ */ i(he, { children: [
897
+ /* @__PURE__ */ e("div", { className: "flex gap-2 w-16 justify-end", children: A && /* @__PURE__ */ c(he, { children: [
898
898
  /* @__PURE__ */ e("button", { onClick: () => Ee(1), type: "button", className: "hover:bg-slate-100 p-1 rounded transition-colors text-slate-500", children: /* @__PURE__ */ e(ge, { size: 18 }) }),
899
899
  /* @__PURE__ */ e("button", { onClick: () => be(1), type: "button", className: "hover:bg-slate-100 p-1 rounded transition-colors text-slate-500", children: /* @__PURE__ */ e(rt, { size: 18 }) })
900
900
  ] }) })
@@ -905,26 +905,26 @@ const Dt = {
905
905
  return /* @__PURE__ */ e("div", { className: n("h-10 flex items-center justify-center relative", Xe && "bg-blue-50", we && t === "range" && ve ? "bg-blue-50 rounded-full" : we && t === "range" ? "bg-gradient-to-r from-transparent to-blue-50 rounded-l-full" : "", ve && t === "range" ? "bg-gradient-to-l from-transparent to-blue-50 rounded-r-full" : ""), children: /* @__PURE__ */ e("button", { type: "button", onClick: () => Ve(de), disabled: ae, className: n("w-9 h-9 cursor-pointer rounded-full flex items-center justify-center text-sm font-medium transition-all z-10", V.isCurrentMonth ? "text-slate-700" : "text-slate-300", ae && "opacity-20 cursor-not-allowed", we || ve ? "bg-blue-600 text-white shadow-md shadow-blue-200 hover:bg-blue-700" : "hover:bg-blue-50", xe(de, /* @__PURE__ */ new Date()) && !we && !ve && "text-blue-600 border border-blue-600"), children: de.getDate() }) }, ee);
906
906
  }) })
907
907
  ] });
908
- }, Je = () => /* @__PURE__ */ i("div", { className: "w-[300px] p-3", children: [
909
- /* @__PURE__ */ i("div", { className: "flex justify-between items-center mb-4 px-2", children: [
908
+ }, Je = () => /* @__PURE__ */ c("div", { className: "w-[300px] p-3", children: [
909
+ /* @__PURE__ */ c("div", { className: "flex justify-between items-center mb-4 px-2", children: [
910
910
  /* @__PURE__ */ e("button", { type: "button", onClick: () => be(-1), className: "p-1 hover:bg-slate-100 rounded text-slate-500", children: /* @__PURE__ */ e(ye, { size: 20 }) }),
911
- /* @__PURE__ */ e("span", { className: "font-bold text-slate-800", children: I.getFullYear() }),
911
+ /* @__PURE__ */ e("span", { className: "font-bold text-slate-800", children: T.getFullYear() }),
912
912
  /* @__PURE__ */ e("button", { type: "button", onClick: () => be(1), className: "p-1 hover:bg-slate-100 rounded text-slate-500", children: /* @__PURE__ */ e(ge, { size: 20 }) })
913
913
  ] }),
914
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: N.monthsShort.map((f, g) => /* @__PURE__ */ e("button", { type: "button", onClick: () => _e(g), className: n("hover:cursor-pointer py-3 rounded-lg text-sm font-semibold transition-colors", I.getMonth() === g ? "bg-blue-600 text-white" : "hover:bg-blue-50 text-slate-600"), children: f }, f)) })
914
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: N.monthsShort.map((f, g) => /* @__PURE__ */ e("button", { type: "button", onClick: () => _e(g), className: n("hover:cursor-pointer py-3 rounded-lg text-sm font-semibold transition-colors", T.getMonth() === g ? "bg-blue-600 text-white" : "hover:bg-blue-50 text-slate-600"), children: f }, f)) })
915
915
  ] }), Ge = () => {
916
- const f = Math.floor(I.getFullYear() / 12) * 12 + U * 12, g = Array.from({ length: 12 }, (A, O) => f + O);
917
- return /* @__PURE__ */ i("div", { className: "w-[300px] p-3", children: [
918
- /* @__PURE__ */ i("div", { className: "flex justify-between items-center mb-4 px-2", children: [
916
+ const f = Math.floor(T.getFullYear() / 12) * 12 + U * 12, g = Array.from({ length: 12 }, (A, O) => f + O);
917
+ return /* @__PURE__ */ c("div", { className: "w-[300px] p-3", children: [
918
+ /* @__PURE__ */ c("div", { className: "flex justify-between items-center mb-4 px-2", children: [
919
919
  /* @__PURE__ */ e("button", { type: "button", onClick: () => K((A) => A - 1), className: "p-1 hover:bg-slate-100 rounded text-slate-500", children: /* @__PURE__ */ e(ye, { size: 20 }) }),
920
- /* @__PURE__ */ i("span", { className: "font-bold text-slate-800", children: [
920
+ /* @__PURE__ */ c("span", { className: "font-bold text-slate-800", children: [
921
921
  g[0],
922
922
  " - ",
923
923
  g[11]
924
924
  ] }),
925
925
  /* @__PURE__ */ e("button", { type: "button", onClick: () => K((A) => A + 1), className: "p-1 hover:bg-slate-100 rounded text-slate-500", children: /* @__PURE__ */ e(ge, { size: 20 }) })
926
926
  ] }),
927
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: g.map((A) => /* @__PURE__ */ e("button", { type: "button", onClick: () => He(A), className: n("hover:cursor-pointer py-3 rounded-lg text-sm font-semibold transition-colors", I.getFullYear() === A ? "bg-blue-600 text-white" : "hover:bg-blue-50 text-slate-600"), children: A }, A)) })
927
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-2", children: g.map((A) => /* @__PURE__ */ e("button", { type: "button", onClick: () => He(A), className: n("hover:cursor-pointer py-3 rounded-lg text-sm font-semibold transition-colors", T.getFullYear() === A ? "bg-blue-600 text-white" : "hover:bg-blue-50 text-slate-600"), children: A }, A)) })
928
928
  ] });
929
929
  }, Ie = /* @__PURE__ */ e(
930
930
  "div",
@@ -932,12 +932,12 @@ const Dt = {
932
932
  onClick: ue,
933
933
  className: n(
934
934
  "cursor-pointer flex items-center justify-center p-1 rounded-md transition-colors",
935
- c ? "pointer-events-none opacity-50" : "hover:bg-slate-100 active:bg-slate-200"
935
+ u ? "pointer-events-none opacity-50" : "hover:bg-slate-100 active:bg-slate-200"
936
936
  ),
937
937
  children: /* @__PURE__ */ e(et, { weight: "Linear", size: 20, className: "text-slate-400" })
938
938
  }
939
939
  );
940
- return /* @__PURE__ */ i("div", { ref: ie, className: n("relative w-full group", o), children: [
940
+ return /* @__PURE__ */ c("div", { ref: ie, className: n("relative w-full group", o), children: [
941
941
  /* @__PURE__ */ e("div", { ref: b, children: /* @__PURE__ */ e(
942
942
  Fe,
943
943
  {
@@ -945,15 +945,15 @@ const Dt = {
945
945
  placeholder: Array.isArray(l) ? l[0] : l,
946
946
  value: ne,
947
947
  onChange: Ye,
948
- icon: d === "left" ? Ie : void 0,
949
- rightIcon: d === "right" ? Ie : void 0,
950
- disabled: c,
948
+ icon: i === "left" ? Ie : void 0,
949
+ rightIcon: i === "right" ? Ie : void 0,
950
+ disabled: u,
951
951
  required: s,
952
- error: M,
952
+ error: k,
953
953
  maxLength: t === "date" ? 10 : void 0,
954
954
  onFocus: We,
955
- readOnly: !T || t === "range",
956
- showClearButton: j,
955
+ readOnly: !I || t === "range",
956
+ showClearButton: L,
957
957
  onClear: Oe
958
958
  }
959
959
  ) }),
@@ -969,9 +969,9 @@ const Dt = {
969
969
  ),
970
970
  style: { width: "max-content" },
971
971
  onMouseDown: (f) => f.stopPropagation(),
972
- children: H === "day" ? /* @__PURE__ */ i(he, { children: [
973
- Le(I, !0, t !== "range"),
974
- t === "range" && /* @__PURE__ */ e("div", { className: "hidden md:block border-l border-slate-100", children: Le(new Date(I.getFullYear(), I.getMonth() + 1, 1), !1, !0) })
972
+ children: H === "day" ? /* @__PURE__ */ c(he, { children: [
973
+ Le(T, !0, t !== "range"),
974
+ t === "range" && /* @__PURE__ */ e("div", { className: "hidden md:block border-l border-slate-100", children: Le(new Date(T.getFullYear(), T.getMonth() + 1, 1), !1, !0) })
975
975
  ] }) : H === "month" ? Je() : Ge()
976
976
  }
977
977
  )
@@ -1020,42 +1020,42 @@ const At = {
1020
1020
  options: r = [],
1021
1021
  icon: l,
1022
1022
  iconPosition: m = "left",
1023
- size: c = "base",
1023
+ size: u = "base",
1024
1024
  error: s,
1025
1025
  disabled: o = !1,
1026
1026
  required: C = !1,
1027
1027
  value: y,
1028
- onChange: k,
1029
- onFocus: M,
1030
- onBlur: j,
1031
- className: T,
1032
- clearable: v = !1,
1033
- searchable: u = !1,
1034
- onSearch: d,
1028
+ onChange: M,
1029
+ onFocus: k,
1030
+ onBlur: L,
1031
+ className: I,
1032
+ clearable: w = !1,
1033
+ searchable: d = !1,
1034
+ onSearch: i,
1035
1035
  name: x
1036
1036
  }, b) => {
1037
- const [p, w] = Y(!1), [L, S] = Y(!1), [E, h] = Y(""), [F, I] = Y(""), [B, H] = Y(-1), W = se(null), U = se(null), K = y !== void 0 ? y : E, ne = r.find((P) => P.value === K), re = K !== "" && K !== void 0, X = At[c], le = _(() => {
1038
- if (!u || d) return r;
1037
+ const [p, v] = Y(!1), [j, S] = Y(!1), [E, h] = Y(""), [F, T] = Y(""), [B, H] = Y(-1), W = se(null), U = se(null), K = y !== void 0 ? y : E, ne = r.find((P) => P.value === K), re = K !== "" && K !== void 0, X = At[u], le = _(() => {
1038
+ if (!d || i) return r;
1039
1039
  const P = F.toLowerCase();
1040
1040
  return r.filter(
1041
1041
  (ce) => ce.label.toLowerCase().includes(P)
1042
1042
  );
1043
- }, [r, F, u, d]), ie = z(() => {
1044
- w(!1), S(!1), I(""), H(-1), j?.();
1045
- }, [j]), { handleClick: Q } = Ce(W, ie), { handleEscape: N } = Ae(ie);
1043
+ }, [r, F, d, i]), ie = z(() => {
1044
+ v(!1), S(!1), T(""), H(-1), L?.();
1045
+ }, [L]), { handleClick: Q } = Ce(W, ie), { handleEscape: N } = Ae(ie);
1046
1046
  J(() => {
1047
1047
  if (p)
1048
1048
  return document.addEventListener("mousedown", Q), document.addEventListener("keydown", N), () => {
1049
1049
  document.removeEventListener("mousedown", Q), document.removeEventListener("keydown", N);
1050
1050
  };
1051
1051
  }, [p, Q, N]), J(() => {
1052
- p && u && U.current && U.current.focus();
1053
- }, [p, u]);
1052
+ p && d && U.current && U.current.focus();
1053
+ }, [p, d]);
1054
1054
  const D = z(
1055
1055
  (P) => {
1056
1056
  if (!o) {
1057
1057
  if (!p && (P.key === "ArrowDown" || P.key === "ArrowUp" || P.key === "Enter")) {
1058
- P.preventDefault(), w(!0);
1058
+ P.preventDefault(), v(!0);
1059
1059
  return;
1060
1060
  }
1061
1061
  if (p)
@@ -1071,32 +1071,32 @@ const At = {
1071
1071
  );
1072
1072
  break;
1073
1073
  case "Enter":
1074
- P.preventDefault(), B >= 0 && le[B] && R(le[B].value);
1074
+ P.preventDefault(), B >= 0 && le[B] && $(le[B].value);
1075
1075
  break;
1076
1076
  }
1077
1077
  }
1078
1078
  },
1079
1079
  [p, le, B, o]
1080
- ), $ = z(() => {
1081
- o || (w((P) => !P), p ? (I(""), H(-1)) : (S(!0), M?.()));
1082
- }, [o, p, M]), R = z(
1080
+ ), R = z(() => {
1081
+ o || (v((P) => !P), p ? (T(""), H(-1)) : (S(!0), k?.()));
1082
+ }, [o, p, k]), $ = z(
1083
1083
  (P) => {
1084
- y === void 0 && h(P), k?.(P), w(!1), S(!1), I(""), H(-1), j?.();
1084
+ y === void 0 && h(P), M?.(P), v(!1), S(!1), T(""), H(-1), L?.();
1085
1085
  },
1086
- [y, k, j]
1086
+ [y, M, L]
1087
1087
  ), Z = z(
1088
1088
  (P) => {
1089
- P.stopPropagation(), !o && (y === void 0 && h(""), k?.(""), I(""), H(-1));
1089
+ P.stopPropagation(), !o && (y === void 0 && h(""), M?.(""), T(""), H(-1));
1090
1090
  },
1091
- [y, k, o]
1091
+ [y, M, o]
1092
1092
  ), q = z(
1093
1093
  (P) => {
1094
- I(P), d?.(P), H(0);
1094
+ T(P), i?.(P), H(0);
1095
1095
  },
1096
- [d]
1097
- ), G = _(() => o ? "border-slate-200 bg-slate-100 text-slate-400 cursor-not-allowed" : s ? "border-red-600 focus:border-red-600 shadow-red bg-white" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600 bg-white", [s, o]), ue = _(() => o ? "text-slate-400" : s ? "text-red-600" : p || L ? "text-black" : "text-slate-400", [o, s, p, L]);
1098
- return /* @__PURE__ */ i("div", { className: n("w-full", T), ref: b, children: [
1099
- t && /* @__PURE__ */ i(
1096
+ [i]
1097
+ ), G = _(() => o ? "border-slate-200 bg-slate-100 text-slate-400 cursor-not-allowed" : s ? "border-red-600 focus:border-red-600 shadow-red bg-white" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600 bg-white", [s, o]), ue = _(() => o ? "text-slate-400" : s ? "text-red-600" : p || j ? "text-black" : "text-slate-400", [o, s, p, j]);
1098
+ return /* @__PURE__ */ c("div", { className: n("w-full", I), ref: b, children: [
1099
+ t && /* @__PURE__ */ c(
1100
1100
  "label",
1101
1101
  {
1102
1102
  htmlFor: x,
@@ -1111,14 +1111,14 @@ const At = {
1111
1111
  ]
1112
1112
  }
1113
1113
  ),
1114
- /* @__PURE__ */ i(
1114
+ /* @__PURE__ */ c(
1115
1115
  "div",
1116
1116
  {
1117
1117
  ref: W,
1118
1118
  className: "relative",
1119
1119
  onKeyDown: D,
1120
1120
  children: [
1121
- /* @__PURE__ */ i(
1121
+ /* @__PURE__ */ c(
1122
1122
  "div",
1123
1123
  {
1124
1124
  role: "combobox",
@@ -1127,14 +1127,14 @@ const At = {
1127
1127
  "aria-controls": `${x}-listbox`,
1128
1128
  "aria-disabled": o,
1129
1129
  tabIndex: o ? -1 : 0,
1130
- onClick: $,
1130
+ onClick: R,
1131
1131
  className: n(
1132
1132
  "flex w-full items-center border font-normal transition-all duration-300 ease-in-out",
1133
- c === "base" ? "rounded-xl" : "rounded-lg",
1133
+ u === "base" ? "rounded-xl" : "rounded-lg",
1134
1134
  X.container,
1135
1135
  l ? m === "left" ? X.iconPaddingLeft : X.iconPaddingRight : X.padding,
1136
1136
  G,
1137
- !o && L && "shadow-blue border-blue-600"
1137
+ !o && j && "shadow-blue border-blue-600"
1138
1138
  ),
1139
1139
  children: [
1140
1140
  l && /* @__PURE__ */ e(
@@ -1148,7 +1148,7 @@ const At = {
1148
1148
  children: l
1149
1149
  }
1150
1150
  ),
1151
- u && p ? /* @__PURE__ */ e(
1151
+ d && p ? /* @__PURE__ */ e(
1152
1152
  "input",
1153
1153
  {
1154
1154
  ref: U,
@@ -1169,7 +1169,7 @@ const At = {
1169
1169
  children: ne?.label || a
1170
1170
  }
1171
1171
  ),
1172
- v && re && !o && /* @__PURE__ */ e(
1172
+ w && re && !o && /* @__PURE__ */ e(
1173
1173
  "button",
1174
1174
  {
1175
1175
  type: "button",
@@ -1210,7 +1210,7 @@ const At = {
1210
1210
  {
1211
1211
  role: "option",
1212
1212
  "aria-selected": K === P.value,
1213
- onClick: () => R(P.value),
1213
+ onClick: () => $(P.value),
1214
1214
  className: n(
1215
1215
  "cursor-pointer px-3 py-2 font-normal transition-colors hover:bg-slate-100 rounded-sm",
1216
1216
  K === P.value ? "bg-slate-100" : ""
@@ -1235,49 +1235,49 @@ function Gt({
1235
1235
  loading: r = !1,
1236
1236
  skeletonRows: l = 5,
1237
1237
  noDataText: m = "",
1238
- sort: c,
1238
+ sort: u,
1239
1239
  onSortChange: s,
1240
1240
  className: o,
1241
1241
  headerClassName: C,
1242
1242
  bodyClassName: y,
1243
- rowKey: k = "id",
1244
- rowSelection: M
1243
+ rowKey: M = "id",
1244
+ rowSelection: k
1245
1245
  }) {
1246
- const [j, T] = Y(
1246
+ const [L, I] = Y(
1247
1247
  null
1248
- ), v = c ?? j, u = _(() => Array.isArray(a) ? a : [], [a]), d = _(() => !v || c ? u : [...u].sort((h, F) => {
1249
- const I = h[v.key], B = F[v.key];
1250
- return I == null ? 1 : B == null ? -1 : I < B ? v.direction === "asc" ? -1 : 1 : I > B ? v.direction === "asc" ? 1 : -1 : 0;
1251
- }), [u, v, c]), x = (h) => {
1248
+ ), w = u ?? L, d = _(() => Array.isArray(a) ? a : [], [a]), i = _(() => !w || u ? d : [...d].sort((h, F) => {
1249
+ const T = h[w.key], B = F[w.key];
1250
+ return T == null ? 1 : B == null ? -1 : T < B ? w.direction === "asc" ? -1 : 1 : T > B ? w.direction === "asc" ? 1 : -1 : 0;
1251
+ }), [d, w, u]), x = (h) => {
1252
1252
  if (!h.sortable) return;
1253
1253
  let F = null;
1254
- v?.key !== h.key ? F = { key: h.key, direction: "asc" } : v.direction === "asc" && (F = { key: h.key, direction: "desc" }), c !== void 0 ? s?.(F) : T(F);
1254
+ w?.key !== h.key ? F = { key: h.key, direction: "asc" } : w.direction === "asc" && (F = { key: h.key, direction: "desc" }), u !== void 0 ? s?.(F) : I(F);
1255
1255
  };
1256
1256
  J(() => {
1257
- c !== void 0 && T(null);
1258
- }, [c]);
1259
- const b = r ? [] : c ? u : d, p = (h) => {
1260
- if (!M) return;
1261
- const { onChange: F, getCheckboxProps: I } = M;
1257
+ u !== void 0 && I(null);
1258
+ }, [u]);
1259
+ const b = r ? [] : u ? d : i, p = (h) => {
1260
+ if (!k) return;
1261
+ const { onChange: F, getCheckboxProps: T } = k;
1262
1262
  if (h.target.checked) {
1263
- const W = b.filter((U) => !I?.(U)?.disabled).map((U) => U[k]);
1263
+ const W = b.filter((U) => !T?.(U)?.disabled).map((U) => U[M]);
1264
1264
  F(W);
1265
1265
  } else
1266
1266
  F([]);
1267
- }, w = (h, F) => {
1268
- if (!M) return;
1269
- const { selectedRowKeys: I, onChange: B } = M, H = h[k], W = F ? [...I, H] : I.filter((U) => U !== H);
1267
+ }, v = (h, F) => {
1268
+ if (!k) return;
1269
+ const { selectedRowKeys: T, onChange: B } = k, H = h[M], W = F ? [...T, H] : T.filter((U) => U !== H);
1270
1270
  B(W);
1271
- }, L = _(() => {
1272
- if (!M || b.length === 0) return !1;
1271
+ }, j = _(() => {
1272
+ if (!k || b.length === 0) return !1;
1273
1273
  const h = b.filter(
1274
- (F) => !M.getCheckboxProps?.(F)?.disabled
1274
+ (F) => !k.getCheckboxProps?.(F)?.disabled
1275
1275
  );
1276
1276
  return h.length === 0 ? !1 : h.every(
1277
- (F) => M.selectedRowKeys.includes(F[k])
1277
+ (F) => k.selectedRowKeys.includes(F[M])
1278
1278
  );
1279
- }, [M, b, k]), S = (h) => h.sortable ? !v || v.key !== h.key ? /* @__PURE__ */ e(lt, { weight: "Linear", size: 20, className: "text-slate-base" }) : v.direction === "asc" ? /* @__PURE__ */ e(at, { weight: "Linear", size: 20, className: "text-slate-base" }) : /* @__PURE__ */ e(st, { weight: "Linear", size: 20, className: "text-slate-base" }) : null, E = () => /* @__PURE__ */ i("colgroup", { children: [
1280
- M && /* @__PURE__ */ e("col", { style: { width: 48 } }),
1279
+ }, [k, b, M]), S = (h) => h.sortable ? !w || w.key !== h.key ? /* @__PURE__ */ e(lt, { weight: "Linear", size: 20, className: "text-slate-base" }) : w.direction === "asc" ? /* @__PURE__ */ e(at, { weight: "Linear", size: 20, className: "text-slate-base" }) : /* @__PURE__ */ e(st, { weight: "Linear", size: 20, className: "text-slate-base" }) : null, E = () => /* @__PURE__ */ c("colgroup", { children: [
1280
+ k && /* @__PURE__ */ e("col", { style: { width: 48 } }),
1281
1281
  t.map((h) => /* @__PURE__ */ e("col", { style: { width: h.width || "auto" } }, h.key))
1282
1282
  ] });
1283
1283
  return /* @__PURE__ */ e(
@@ -1296,14 +1296,14 @@ function Gt({
1296
1296
  "hover:[&::-webkit-scrollbar-thumb]:bg-slate-300",
1297
1297
  o
1298
1298
  ),
1299
- children: /* @__PURE__ */ i("div", { className: "inline-block min-w-full align-middle", children: [
1300
- /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-slate-100", children: /* @__PURE__ */ i("table", { className: "w-full table-fixed", children: [
1299
+ children: /* @__PURE__ */ c("div", { className: "inline-block min-w-full align-middle", children: [
1300
+ /* @__PURE__ */ e("div", { className: "overflow-hidden rounded-xl border border-slate-200 bg-slate-100", children: /* @__PURE__ */ c("table", { className: "w-full table-fixed", children: [
1301
1301
  E(),
1302
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
1303
- M && /* @__PURE__ */ e("th", { className: n("w-12 px-4 py-3", C), children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
1302
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ c("tr", { children: [
1303
+ k && /* @__PURE__ */ e("th", { className: n("w-12 px-4 py-3", C), children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
1304
1304
  ke,
1305
1305
  {
1306
- checked: L,
1306
+ checked: j,
1307
1307
  onChange: p,
1308
1308
  variant: "yellow",
1309
1309
  disabled: r || b.length === 0
@@ -1320,7 +1320,7 @@ function Gt({
1320
1320
  h.sortable && "cursor-pointer hover:bg-slate-200",
1321
1321
  C
1322
1322
  ),
1323
- children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1323
+ children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1324
1324
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate", title: h.title, children: h.title }),
1325
1325
  S(h)
1326
1326
  ] })
@@ -1329,12 +1329,12 @@ function Gt({
1329
1329
  ))
1330
1330
  ] }) })
1331
1331
  ] }) }),
1332
- /* @__PURE__ */ e("div", { className: "rounded-xl border border-t-0 border-slate-200 bg-white overflow-hidden", children: /* @__PURE__ */ i("table", { className: "w-full table-fixed", children: [
1332
+ /* @__PURE__ */ e("div", { className: "rounded-xl border border-t-0 border-slate-200 bg-white overflow-hidden", children: /* @__PURE__ */ c("table", { className: "w-full table-fixed", children: [
1333
1333
  E(),
1334
- /* @__PURE__ */ e("tbody", { className: "divide-y divide-slate-200", children: r ? Array.from({ length: l }).map((h, F) => /* @__PURE__ */ i("tr", { children: [
1335
- M && /* @__PURE__ */ e("td", { className: "w-12 px-4 py-3", children: /* @__PURE__ */ e(Te, { height: 20, width: 20, variant: "rounded" }) }),
1336
- t.map((I) => /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ e(Te, { height: 30, variant: "rounded" }) }, I.key))
1337
- ] }, F)) : b.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (M ? 1 : 0), className: "py-20", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center", children: [
1334
+ /* @__PURE__ */ e("tbody", { className: "divide-y divide-slate-200", children: r ? Array.from({ length: l }).map((h, F) => /* @__PURE__ */ c("tr", { children: [
1335
+ k && /* @__PURE__ */ e("td", { className: "w-12 px-4 py-3", children: /* @__PURE__ */ e(Te, { height: 20, width: 20, variant: "rounded" }) }),
1336
+ t.map((T) => /* @__PURE__ */ e("td", { className: "px-4 py-3", children: /* @__PURE__ */ e(Te, { height: 30, variant: "rounded" }) }, T.key))
1337
+ ] }, F)) : b.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (k ? 1 : 0), className: "py-20", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center", children: [
1338
1338
  /* @__PURE__ */ e("div", { className: "relative mb-4", children: /* @__PURE__ */ e(
1339
1339
  nt,
1340
1340
  {
@@ -1345,15 +1345,15 @@ function Gt({
1345
1345
  ) }),
1346
1346
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-400", children: m })
1347
1347
  ] }) }) }) : b.map((h, F) => {
1348
- const I = h[k], B = M?.selectedRowKeys.includes(I), H = M?.getCheckboxProps?.(h)?.disabled;
1349
- return /* @__PURE__ */ i("tr", { className: n("group transition-colors hover:bg-slate-50"), children: [
1350
- M && /* @__PURE__ */ e("td", { className: n("w-12 px-4 py-3 align-top", y), children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center pt-1", children: /* @__PURE__ */ e(
1348
+ const T = h[M], B = k?.selectedRowKeys.includes(T), H = k?.getCheckboxProps?.(h)?.disabled;
1349
+ return /* @__PURE__ */ c("tr", { className: n("group transition-colors hover:bg-slate-50"), children: [
1350
+ k && /* @__PURE__ */ e("td", { className: n("w-12 px-4 py-3 align-top", y), children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center pt-1", children: /* @__PURE__ */ e(
1351
1351
  ke,
1352
1352
  {
1353
1353
  checked: B,
1354
1354
  disabled: H,
1355
1355
  variant: "yellow",
1356
- onChange: (W) => w(h, W.target.checked)
1356
+ onChange: (W) => v(h, W.target.checked)
1357
1357
  }
1358
1358
  ) }) }),
1359
1359
  t.map((W) => {
@@ -1466,19 +1466,19 @@ const Et = {
1466
1466
  maxSize: r = 10,
1467
1467
  maxFiles: l = 5,
1468
1468
  disabled: m = !1,
1469
- label: c,
1469
+ label: u,
1470
1470
  required: s = !1,
1471
1471
  error: o,
1472
1472
  className: C,
1473
1473
  onFilesChange: y,
1474
- onUpload: k,
1475
- showPreview: M = !0,
1476
- locale: j = "uz",
1477
- showFileTypeIcon: T = !0,
1478
- variant: v = "yellow",
1479
- customValidator: u
1474
+ onUpload: M,
1475
+ showPreview: k = !0,
1476
+ locale: L = "uz",
1477
+ showFileTypeIcon: I = !0,
1478
+ variant: w = "yellow",
1479
+ customValidator: d
1480
1480
  }) => {
1481
- const [d, x] = Y([]), [b, p] = Y(!1), [w, L] = Y(!1), S = se(null), E = Et[j], h = v === "blue" ? {
1481
+ const [i, x] = Y([]), [b, p] = Y(!1), [v, j] = Y(!1), S = se(null), E = Et[L], h = w === "blue" ? {
1482
1482
  dropBorder: "border-blue-200 hover:border-blue-300",
1483
1483
  dropBg: "bg-blue-50/40 hover:bg-blue-50/60",
1484
1484
  dropActive: "border-blue-600 bg-blue-50",
@@ -1509,67 +1509,67 @@ const Et = {
1509
1509
  default:
1510
1510
  return N.type.includes("pdf") ? /* @__PURE__ */ e(Me, { className: "h-5 w-5 text-red-500" }) : N.type.includes("word") || N.type.includes("document") ? /* @__PURE__ */ e(Me, { className: "h-5 w-5 text-blue-600" }) : N.type.includes("excel") || N.type.includes("spreadsheet") ? /* @__PURE__ */ e(Me, { className: "h-5 w-5 text-green-600" }) : /* @__PURE__ */ e(je, { className: "h-5 w-5 text-gray-500" });
1511
1511
  }
1512
- }, I = (N) => {
1512
+ }, T = (N) => {
1513
1513
  if (N === 0) return "0 Bytes";
1514
- const D = 1024, $ = ["Bytes", "KB", "MB", "GB"], R = Math.floor(Math.log(N) / Math.log(D));
1515
- return parseFloat((N / Math.pow(D, R)).toFixed(2)) + " " + $[R];
1514
+ const D = 1024, R = ["Bytes", "KB", "MB", "GB"], $ = Math.floor(Math.log(N) / Math.log(D));
1515
+ return parseFloat((N / Math.pow(D, $)).toFixed(2)) + " " + R[$];
1516
1516
  }, B = (N) => {
1517
1517
  const D = r * 1024 * 1024;
1518
1518
  return N.size <= D;
1519
- }, H = (N) => a === "*/*" ? !0 : a.split(",").map(($) => $.trim()).some(($) => {
1520
- if ($.endsWith("/*")) {
1521
- const R = $.replace("/*", "");
1522
- return N.type.startsWith(R);
1519
+ }, H = (N) => a === "*/*" ? !0 : a.split(",").map((R) => R.trim()).some((R) => {
1520
+ if (R.endsWith("/*")) {
1521
+ const $ = R.replace("/*", "");
1522
+ return N.type.startsWith($);
1523
1523
  }
1524
- return N.type === $ || N.name.toLowerCase().endsWith($.replace("*.", "."));
1524
+ return N.type === R || N.name.toLowerCase().endsWith(R.replace("*.", "."));
1525
1525
  }), W = (N) => new Promise((D) => {
1526
1526
  if (N.type.startsWith("image/")) {
1527
- const $ = new FileReader();
1528
- $.onload = (R) => D(R.target?.result), $.readAsDataURL(N);
1527
+ const R = new FileReader();
1528
+ R.onload = ($) => D($.target?.result), R.readAsDataURL(N);
1529
1529
  } else
1530
1530
  D("");
1531
1531
  }), U = z(
1532
1532
  async (N) => {
1533
- const D = Array.from(N), $ = [];
1534
- for (const R of D) {
1535
- if (d.length + $.length >= l) {
1533
+ const D = Array.from(N), R = [];
1534
+ for (const $ of D) {
1535
+ if (i.length + R.length >= l) {
1536
1536
  alert(E.maxFilesError(l));
1537
1537
  break;
1538
1538
  }
1539
- if (!B(R)) {
1540
- alert(E.fileSizeError(R.name, r));
1539
+ if (!B($)) {
1540
+ alert(E.fileSizeError($.name, r));
1541
1541
  continue;
1542
1542
  }
1543
- if (!H(R)) {
1544
- alert(E.fileTypeError(R.name));
1543
+ if (!H($)) {
1544
+ alert(E.fileTypeError($.name));
1545
1545
  continue;
1546
1546
  }
1547
- if (u) {
1548
- const ue = u(R);
1547
+ if (d) {
1548
+ const ue = d($);
1549
1549
  if (ue) {
1550
1550
  alert(ue);
1551
1551
  continue;
1552
1552
  }
1553
1553
  }
1554
- const Z = await W(R), q = k ? "uploading" : "success", G = k ? 0 : 100;
1555
- $.push({
1554
+ const Z = await W($), q = M ? "uploading" : "success", G = M ? 0 : 100;
1555
+ R.push({
1556
1556
  id: Math.random().toString(36).substr(2, 9),
1557
- file: R,
1557
+ file: $,
1558
1558
  preview: Z,
1559
1559
  progress: G,
1560
1560
  status: q
1561
1561
  });
1562
1562
  }
1563
- if ($.length > 0) {
1564
- const R = t ? [...d, ...$] : $;
1565
- if (x(R), y?.(R.map((Z) => Z.file)), k) {
1566
- L(!0);
1563
+ if (R.length > 0) {
1564
+ const $ = t ? [...i, ...R] : R;
1565
+ if (x($), y?.($.map((Z) => Z.file)), M) {
1566
+ j(!0);
1567
1567
  try {
1568
- const Z = R.map((q, G) => ({
1568
+ const Z = $.map((q, G) => ({
1569
1569
  ...q,
1570
- progress: Math.min(100, (G + 1) / R.length * 100)
1570
+ progress: Math.min(100, (G + 1) / $.length * 100)
1571
1571
  }));
1572
- x(Z), await k(Z), x(
1572
+ x(Z), await M(Z), x(
1573
1573
  (q) => q.map((G) => ({
1574
1574
  ...G,
1575
1575
  status: "success",
@@ -1585,22 +1585,22 @@ const Et = {
1585
1585
  }))
1586
1586
  );
1587
1587
  } finally {
1588
- L(!1);
1588
+ j(!1);
1589
1589
  }
1590
1590
  }
1591
1591
  }
1592
1592
  },
1593
1593
  [
1594
- d,
1594
+ i,
1595
1595
  l,
1596
1596
  B,
1597
1597
  H,
1598
- u,
1598
+ d,
1599
1599
  E,
1600
1600
  r,
1601
1601
  t,
1602
1602
  y,
1603
- k
1603
+ M
1604
1604
  ]
1605
1605
  ), K = z(
1606
1606
  (N) => {
@@ -1625,8 +1625,8 @@ const Et = {
1625
1625
  ), le = z(
1626
1626
  (N) => {
1627
1627
  x((D) => {
1628
- const $ = D.filter((R) => R.id !== N);
1629
- return y?.($.map((R) => R.file)), $;
1628
+ const R = D.filter(($) => $.id !== N);
1629
+ return y?.(R.map(($) => $.file)), R;
1630
1630
  });
1631
1631
  },
1632
1632
  [y]
@@ -1635,8 +1635,8 @@ const Et = {
1635
1635
  }, [y]), Q = z(() => {
1636
1636
  S.current?.click();
1637
1637
  }, []);
1638
- return /* @__PURE__ */ i("div", { className: n("w-full", C), children: [
1639
- c && /* @__PURE__ */ i(
1638
+ return /* @__PURE__ */ c("div", { className: n("w-full", C), children: [
1639
+ u && /* @__PURE__ */ c(
1640
1640
  "label",
1641
1641
  {
1642
1642
  className: n(
@@ -1644,12 +1644,12 @@ const Et = {
1644
1644
  o ? "text-red-600" : "text-slate-700"
1645
1645
  ),
1646
1646
  children: [
1647
- c,
1647
+ u,
1648
1648
  s && /* @__PURE__ */ e("span", { className: "ml-1 text-extra-small text-red-600", children: "*" })
1649
1649
  ]
1650
1650
  }
1651
1651
  ),
1652
- /* @__PURE__ */ i(
1652
+ /* @__PURE__ */ c(
1653
1653
  "div",
1654
1654
  {
1655
1655
  className: n(
@@ -1677,7 +1677,7 @@ const Et = {
1677
1677
  className: "hidden"
1678
1678
  }
1679
1679
  ),
1680
- /* @__PURE__ */ i("div", { className: "flex flex-col items-center gap-3", children: [
1680
+ /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-3", children: [
1681
1681
  /* @__PURE__ */ e("div", { className: n("flex h-12 w-12 items-center justify-center rounded-xl", h.iconWrap), children: /* @__PURE__ */ e(ot, { size: 20 }) }),
1682
1682
  /* @__PURE__ */ e("p", { className: n("text-base font-medium", h.title), children: E.dropHereTitle }),
1683
1683
  /* @__PURE__ */ e("p", { className: n("text-sm font-normal", h.hint), children: E.fileRequirements(t, l, r, a) })
@@ -1685,28 +1685,28 @@ const Et = {
1685
1685
  ]
1686
1686
  }
1687
1687
  ),
1688
- d.length > 0 && /* @__PURE__ */ i("div", { className: "mt-4 space-y-3", children: [
1689
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
1690
- /* @__PURE__ */ i("span", { className: "text-sm font-medium text-slate-700", children: [
1688
+ i.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4 space-y-3", children: [
1689
+ /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
1690
+ /* @__PURE__ */ c("span", { className: "text-sm font-medium text-slate-700", children: [
1691
1691
  E.selectedFiles,
1692
1692
  " (",
1693
- d.length,
1693
+ i.length,
1694
1694
  ")"
1695
1695
  ] }),
1696
- d.length > 1 && /* @__PURE__ */ e(
1696
+ i.length > 1 && /* @__PURE__ */ e(
1697
1697
  "button",
1698
1698
  {
1699
1699
  type: "button",
1700
1700
  onClick: ie,
1701
- disabled: m || w,
1701
+ disabled: m || v,
1702
1702
  className: "text-sm font-medium text-red-600 disabled:opacity-50",
1703
1703
  children: E.clearAll
1704
1704
  }
1705
1705
  )
1706
1706
  ] }),
1707
- /* @__PURE__ */ e("div", { className: "space-y-3", children: d.map((N) => {
1708
- const $ = !!N.preview ? h.fileIconImg : h.fileIconDoc;
1709
- return /* @__PURE__ */ i(
1707
+ /* @__PURE__ */ e("div", { className: "space-y-3", children: i.map((N) => {
1708
+ const R = !!N.preview ? h.fileIconImg : h.fileIconDoc;
1709
+ return /* @__PURE__ */ c(
1710
1710
  "div",
1711
1711
  {
1712
1712
  className: n(
@@ -1714,27 +1714,27 @@ const Et = {
1714
1714
  N.status === "error" && "border-red-600"
1715
1715
  ),
1716
1716
  children: [
1717
- /* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-4", children: [
1718
- /* @__PURE__ */ e("div", { className: n("flex h-14 w-14 items-center justify-center rounded-2xl", $), children: M && N.preview ? /* @__PURE__ */ e(
1717
+ /* @__PURE__ */ c("div", { className: "flex min-w-0 items-center gap-4", children: [
1718
+ /* @__PURE__ */ e("div", { className: n("flex h-14 w-14 items-center justify-center rounded-2xl", R), children: k && N.preview ? /* @__PURE__ */ e(
1719
1719
  "img",
1720
1720
  {
1721
1721
  src: N.preview,
1722
1722
  alt: N.file.name,
1723
1723
  className: "h-10 w-10 rounded-xl object-cover"
1724
1724
  }
1725
- ) : T ? F(N.file) : /* @__PURE__ */ e(je, { className: "h-6 w-6 text-slate-500" }) }),
1726
- /* @__PURE__ */ i("div", { className: "min-w-0", children: [
1725
+ ) : I ? F(N.file) : /* @__PURE__ */ e(je, { className: "h-6 w-6 text-slate-500" }) }),
1726
+ /* @__PURE__ */ c("div", { className: "min-w-0", children: [
1727
1727
  /* @__PURE__ */ e("p", { className: "truncate text-lg font-semibold text-primary", children: N.file.name }),
1728
- /* @__PURE__ */ i("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-sm text-slate-500", children: [
1729
- /* @__PURE__ */ e("span", { children: I(N.file.size) }),
1730
- N.status === "uploading" && /* @__PURE__ */ i(he, { children: [
1728
+ /* @__PURE__ */ c("div", { className: "mt-1 flex flex-wrap items-center gap-2 text-sm text-slate-500", children: [
1729
+ /* @__PURE__ */ e("span", { children: T(N.file.size) }),
1730
+ N.status === "uploading" && /* @__PURE__ */ c(he, { children: [
1731
1731
  /* @__PURE__ */ e("span", { children: "•" }),
1732
- /* @__PURE__ */ i("span", { className: "inline-flex items-center", children: [
1732
+ /* @__PURE__ */ c("span", { className: "inline-flex items-center", children: [
1733
1733
  /* @__PURE__ */ e(Be, { className: "mr-1 h-5 w-5 animate-spin" }),
1734
1734
  E.uploading
1735
1735
  ] })
1736
1736
  ] }),
1737
- N.status === "success" && /* @__PURE__ */ i(he, { children: [
1737
+ N.status === "success" && /* @__PURE__ */ c(he, { children: [
1738
1738
  /* @__PURE__ */ e("span", { children: "•" }),
1739
1739
  /* @__PURE__ */ e("span", { className: "font-normal text-green-600", children: E.success })
1740
1740
  ] })
@@ -1749,12 +1749,12 @@ const Et = {
1749
1749
  N.status === "error" && N.error && /* @__PURE__ */ e("p", { className: "mt-2 text-sm font-normal text-red-600", children: N.error })
1750
1750
  ] })
1751
1751
  ] }),
1752
- /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1752
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1753
1753
  /* @__PURE__ */ e(
1754
1754
  "button",
1755
1755
  {
1756
1756
  type: "button",
1757
- onClick: (R) => R.stopPropagation(),
1757
+ onClick: ($) => $.stopPropagation(),
1758
1758
  className: "rounded-xl p-2 hover:bg-slate-100 hover:cursor-pointer",
1759
1759
  title: E.preview,
1760
1760
  children: /* @__PURE__ */ e(Pe, { size: 20, className: "text-slate-400" })
@@ -1764,7 +1764,7 @@ const Et = {
1764
1764
  "button",
1765
1765
  {
1766
1766
  type: "button",
1767
- onClick: (R) => R.stopPropagation(),
1767
+ onClick: ($) => $.stopPropagation(),
1768
1768
  className: "rounded-xl p-2 hover:bg-slate-100 hover:cursor-pointer",
1769
1769
  title: E.download,
1770
1770
  children: /* @__PURE__ */ e(it, { size: 20, className: "text-slate-400" })
@@ -1774,10 +1774,10 @@ const Et = {
1774
1774
  "button",
1775
1775
  {
1776
1776
  type: "button",
1777
- onClick: (R) => {
1778
- R.stopPropagation(), le(N.id);
1777
+ onClick: ($) => {
1778
+ $.stopPropagation(), le(N.id);
1779
1779
  },
1780
- disabled: m || w,
1780
+ disabled: m || v,
1781
1781
  className: "rounded-xl p-2 text-slate-base hover:bg-slate-100 disabled:opacity-50 hover:cursor-pointer",
1782
1782
  title: E.remove,
1783
1783
  children: /* @__PURE__ */ e(me, { className: "h-6 w-6" })
@@ -1799,48 +1799,78 @@ function Qt({
1799
1799
  title: r,
1800
1800
  description: l,
1801
1801
  Header: m,
1802
- Body: c,
1802
+ Body: u,
1803
1803
  footer: s,
1804
- handleClickOutside: o = !1
1804
+ handleClickOutside: o = !1,
1805
+ showCloseIcon: C = !0,
1806
+ showHeader: y = !0,
1807
+ overlayClassName: M,
1808
+ containerClassName: k,
1809
+ bodyClassName: L,
1810
+ footerClassName: I
1805
1811
  }) {
1806
- const C = se(null), { handleEscape: y } = Ae(() => a(!1));
1807
- J(() => (t ? (document.addEventListener("keydown", y), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => document.removeEventListener("keydown", y)), [t, y]);
1808
- const { handleClick: k } = Ce(C, () => {
1812
+ const w = se(null), { handleEscape: d } = Ae(() => a(!1));
1813
+ J(() => (t ? (document.addEventListener("keydown", d), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => document.removeEventListener("keydown", d)), [t, d]);
1814
+ const { handleClick: i } = Ce(w, () => {
1809
1815
  o && a(!1);
1810
1816
  });
1811
- return J(() => (t && o && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k)), [t, k, o]), /* @__PURE__ */ e(
1817
+ J(() => (t && o && document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i)), [t, i, o]);
1818
+ const b = y && !!(m || r || l);
1819
+ return /* @__PURE__ */ e(
1812
1820
  "div",
1813
1821
  {
1814
1822
  className: n(
1815
1823
  "bg-black/40 fixed inset-0 z-50 flex items-center justify-center transition-all duration-500 ease-in-out",
1816
- t ? "opacity-100" : "pointer-events-none opacity-0"
1824
+ t ? "opacity-100" : "pointer-events-none opacity-0",
1825
+ M
1817
1826
  ),
1818
- children: /* @__PURE__ */ i(
1827
+ children: /* @__PURE__ */ c(
1819
1828
  "div",
1820
1829
  {
1821
- ref: C,
1830
+ ref: w,
1822
1831
  className: n(
1823
1832
  "relative bg-white w-full max-w-[720px] rounded-2xl",
1824
1833
  "transform transition-all duration-500 ease-out",
1825
- t ? "scale-100 opacity-100" : "scale-90 opacity-0"
1834
+ t ? "scale-100 opacity-100" : "scale-90 opacity-0",
1835
+ k
1826
1836
  ),
1827
1837
  children: [
1828
- (m || r || l) && /* @__PURE__ */ i("div", { className: "border-b border-slate-200 flex items-start justify-between p-6 mb-4", children: [
1829
- m || /* @__PURE__ */ i("div", { className: "block", children: [
1838
+ b && /* @__PURE__ */ c("div", { className: "border-b border-slate-200 flex items-start justify-between p-6 mb-4", children: [
1839
+ m || /* @__PURE__ */ c("div", { className: "block", children: [
1830
1840
  /* @__PURE__ */ e("h2", { className: "text-h3 font-semibold text-black", children: r }),
1831
1841
  l && /* @__PURE__ */ e("p", { className: "text-base text-slate-base font-normal mt-2", children: l })
1832
1842
  ] }),
1833
- /* @__PURE__ */ e(
1843
+ C && /* @__PURE__ */ e(
1834
1844
  "button",
1835
1845
  {
1836
1846
  onClick: () => a(!1),
1837
1847
  className: "bg-slate-100 rounded-xl w-12 h-12 hover:cursor-pointer text-black transition flex items-center justify-center group",
1848
+ "aria-label": "Close modal",
1849
+ type: "button",
1838
1850
  children: /* @__PURE__ */ e(me, { className: "h-6 w-6 transition-transform duration-300 group-hover:rotate-180" })
1839
1851
  }
1840
1852
  )
1841
1853
  ] }),
1842
- c && /* @__PURE__ */ e("div", { className: "scrollbar-thin scrollbar-thumb-slate-200 max-h-96 px-6 overflow-y-auto mb-2", children: c }),
1843
- s && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-3 border-t border-slate-200 p-6", children: s })
1854
+ u && /* @__PURE__ */ e(
1855
+ "div",
1856
+ {
1857
+ className: n(
1858
+ "scrollbar-thin scrollbar-thumb-slate-200 max-h-96 px-6 overflow-y-auto mb-2",
1859
+ L
1860
+ ),
1861
+ children: u
1862
+ }
1863
+ ),
1864
+ s && /* @__PURE__ */ e(
1865
+ "div",
1866
+ {
1867
+ className: n(
1868
+ "flex items-center justify-end gap-3 border-t border-slate-200 p-6",
1869
+ I
1870
+ ),
1871
+ children: s
1872
+ }
1873
+ )
1844
1874
  ]
1845
1875
  }
1846
1876
  )
@@ -1853,23 +1883,23 @@ function er({
1853
1883
  perPage: r,
1854
1884
  onPageChange: l,
1855
1885
  onPerPageChange: m,
1856
- siblingCount: c = 1,
1886
+ siblingCount: u = 1,
1857
1887
  perPageOptions: s = [10, 30, 50, 100],
1858
1888
  showPerPage: o = !0,
1859
1889
  variant: C = "yellow",
1860
1890
  size: y = "large",
1861
- paginationClassName: k
1891
+ paginationClassName: M
1862
1892
  }) {
1863
- const M = Number.isFinite(t) && t > 0 ? t : 0, j = Number.isFinite(r) && r > 0 ? r : 10, T = Math.max(1, Number.isFinite(a) ? a : 1), v = Math.ceil(M / j);
1864
- if (v <= 1 || M === 0) return null;
1865
- const d = (() => {
1866
- const p = [], w = c * 2 + 5;
1867
- if (v <= w)
1868
- return Array.from({ length: v }, (E, h) => h + 1);
1869
- const L = Math.max(T - c, 2), S = Math.min(T + c, v - 1);
1870
- p.push(1), L > 2 && p.push("...");
1871
- for (let E = L; E <= S; E++) p.push(E);
1872
- return S < v - 1 && p.push("..."), v > 1 && p.push(v), p;
1893
+ const k = Number.isFinite(t) && t > 0 ? t : 0, L = Number.isFinite(r) && r > 0 ? r : 10, I = Math.max(1, Number.isFinite(a) ? a : 1), w = Math.ceil(k / L);
1894
+ if (w <= 1 || k === 0) return null;
1895
+ const i = (() => {
1896
+ const p = [], v = u * 2 + 5;
1897
+ if (w <= v)
1898
+ return Array.from({ length: w }, (E, h) => h + 1);
1899
+ const j = Math.max(I - u, 2), S = Math.min(I + u, w - 1);
1900
+ p.push(1), j > 2 && p.push("...");
1901
+ for (let E = j; E <= S; E++) p.push(E);
1902
+ return S < w - 1 && p.push("..."), w > 1 && p.push(w), p;
1873
1903
  })(), x = {
1874
1904
  medium: "h-9 text-sm",
1875
1905
  large: "h-10 text-base"
@@ -1887,11 +1917,11 @@ function er({
1887
1917
  arrow: "text-black"
1888
1918
  }
1889
1919
  }[C ?? "yellow"];
1890
- return /* @__PURE__ */ i("div", { className: n(
1920
+ return /* @__PURE__ */ c("div", { className: n(
1891
1921
  "flex items-center justify-between gap-4 w-full",
1892
- k
1922
+ M
1893
1923
  ), children: [
1894
- o && m && /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1924
+ o && m && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1895
1925
  /* @__PURE__ */ e(
1896
1926
  "span",
1897
1927
  {
@@ -1899,11 +1929,11 @@ function er({
1899
1929
  children: "Строк на странице:"
1900
1930
  }
1901
1931
  ),
1902
- /* @__PURE__ */ i("div", { className: "relative", children: [
1932
+ /* @__PURE__ */ c("div", { className: "relative", children: [
1903
1933
  /* @__PURE__ */ e(
1904
1934
  "select",
1905
1935
  {
1906
- value: j,
1936
+ value: L,
1907
1937
  onChange: (p) => m(Number(p.target.value)),
1908
1938
  className: n(
1909
1939
  "appearance-none bg-white border border-slate-200 rounded-lg pl-3 pr-8 text-base text-black font-medium focus:outline-none cursor-pointer",
@@ -1923,22 +1953,22 @@ function er({
1923
1953
  )
1924
1954
  ] })
1925
1955
  ] }),
1926
- /* @__PURE__ */ i("nav", { "aria-label": "Пагинация", className: "flex items-center gap-1 shrink-0 whitespace-nowrap", children: [
1956
+ /* @__PURE__ */ c("nav", { "aria-label": "Пагинация", className: "flex items-center gap-1 shrink-0 whitespace-nowrap", children: [
1927
1957
  /* @__PURE__ */ e(
1928
1958
  "button",
1929
1959
  {
1930
- onClick: () => l(T - 1),
1931
- disabled: T === 1,
1960
+ onClick: () => l(I - 1),
1961
+ disabled: I === 1,
1932
1962
  "aria-label": "Предыдущая страница",
1933
1963
  className: n(
1934
1964
  "flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",
1935
1965
  x,
1936
- T === 1 ? n("cursor-not-allowed opacity-50", b.disabled) : n("hover:cursor-pointer", b.arrow, "border-slate-200")
1966
+ I === 1 ? n("cursor-not-allowed opacity-50", b.disabled) : n("hover:cursor-pointer", b.arrow, "border-slate-200")
1937
1967
  ),
1938
1968
  children: /* @__PURE__ */ e(ye, { weight: "Linear", size: 20 })
1939
1969
  }
1940
1970
  ),
1941
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: d.map((p, w) => {
1971
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: i.map((p, v) => {
1942
1972
  if (p === "...")
1943
1973
  return /* @__PURE__ */ e(
1944
1974
  "span",
@@ -1947,35 +1977,35 @@ function er({
1947
1977
  "aria-hidden": "true",
1948
1978
  children: /* @__PURE__ */ e(ht, { weight: "Bold", size: 20 })
1949
1979
  },
1950
- w
1980
+ v
1951
1981
  );
1952
- const L = p === T;
1982
+ const j = p === I;
1953
1983
  return /* @__PURE__ */ e(
1954
1984
  "button",
1955
1985
  {
1956
1986
  onClick: () => l(p),
1957
- "aria-label": `Страница ${p}${L ? ", текущая" : ""}`,
1958
- "aria-current": L ? "page" : void 0,
1987
+ "aria-label": `Страница ${p}${j ? ", текущая" : ""}`,
1988
+ "aria-current": j ? "page" : void 0,
1959
1989
  className: n(
1960
1990
  "flex items-center justify-center rounded-lg border font-medium transition-all hover:cursor-pointer min-w-10 px-2",
1961
1991
  x,
1962
- L ? b.active : b.inactive
1992
+ j ? b.active : b.inactive
1963
1993
  ),
1964
1994
  children: p
1965
1995
  },
1966
- w
1996
+ v
1967
1997
  );
1968
1998
  }) }),
1969
1999
  /* @__PURE__ */ e(
1970
2000
  "button",
1971
2001
  {
1972
- onClick: () => l(T + 1),
1973
- disabled: T === v,
2002
+ onClick: () => l(I + 1),
2003
+ disabled: I === w,
1974
2004
  "aria-label": "Следующая страница",
1975
2005
  className: n(
1976
2006
  "flex items-center justify-center rounded-lg border transition-all bg-slate-100 min-w-10",
1977
2007
  x,
1978
- T === v ? n("cursor-not-allowed opacity-50", b.disabled) : n("hover:cursor-pointer", b.arrow, "border-slate-200")
2008
+ I === w ? n("cursor-not-allowed opacity-50", b.disabled) : n("hover:cursor-pointer", b.arrow, "border-slate-200")
1979
2009
  ),
1980
2010
  children: /* @__PURE__ */ e(ge, { size: 20, weight: "Linear" })
1981
2011
  }
@@ -2013,18 +2043,18 @@ function tr({
2013
2043
  position: r = "top",
2014
2044
  className: l,
2015
2045
  tabListClassName: m,
2016
- contentClassName: c,
2046
+ contentClassName: u,
2017
2047
  extra: s,
2018
2048
  onChange: o
2019
2049
  }) {
2020
- const [C, y] = Y(a || t[0]?.id), [k, M] = Y({}), j = se([]), T = () => {
2050
+ const [C, y] = Y(a || t[0]?.id), [M, k] = Y({}), L = se([]), I = () => {
2021
2051
  requestAnimationFrame(() => {
2022
- const b = t.findIndex((w) => w?.id === C), p = j.current[b];
2052
+ const b = t.findIndex((v) => v?.id === C), p = L.current[b];
2023
2053
  if (p) {
2024
- const { offsetLeft: w, offsetTop: L, offsetWidth: S, offsetHeight: E } = p;
2025
- M({
2026
- left: `${w}px`,
2027
- top: `${L}px`,
2054
+ const { offsetLeft: v, offsetTop: j, offsetWidth: S, offsetHeight: E } = p;
2055
+ k({
2056
+ left: `${v}px`,
2057
+ top: `${j}px`,
2028
2058
  width: `${S}px`,
2029
2059
  height: `${E}px`,
2030
2060
  transition: "all 0.35s cubic-bezier(0.25, 1, 0.5, 1)"
@@ -2032,15 +2062,15 @@ function tr({
2032
2062
  }
2033
2063
  });
2034
2064
  };
2035
- J(() => (T(), window.addEventListener("resize", T), "fonts" in document && document.fonts.ready.then(T), () => window.removeEventListener("resize", T)), [C, r, t]), J(() => {
2036
- j.current = j.current.slice(0, t.length);
2065
+ J(() => (I(), window.addEventListener("resize", I), "fonts" in document && document.fonts.ready.then(I), () => window.removeEventListener("resize", I)), [C, r, t]), J(() => {
2066
+ L.current = L.current.slice(0, t.length);
2037
2067
  }, [t]);
2038
- const v = r === "left" || r === "right", u = {
2068
+ const w = r === "left" || r === "right", d = {
2039
2069
  top: "flex-col",
2040
2070
  bottom: "flex-col-reverse",
2041
2071
  left: "flex-row",
2042
2072
  right: "flex-row-reverse"
2043
- }, d = {
2073
+ }, i = {
2044
2074
  top: "flex-row",
2045
2075
  bottom: "flex-row",
2046
2076
  left: "flex-col",
@@ -2051,13 +2081,13 @@ function tr({
2051
2081
  left: "ml-4",
2052
2082
  right: "mr-4"
2053
2083
  };
2054
- return /* @__PURE__ */ i("div", { className: n("flex w-full", u[r], l), children: [
2055
- /* @__PURE__ */ i(
2084
+ return /* @__PURE__ */ c("div", { className: n("flex w-full", d[r], l), children: [
2085
+ /* @__PURE__ */ c(
2056
2086
  "div",
2057
2087
  {
2058
2088
  className: n(
2059
2089
  "flex w-full gap-4",
2060
- v ? "flex-col items-start" : "flex-row flex-wrap items-center"
2090
+ w ? "flex-col items-start" : "flex-row flex-wrap items-center"
2061
2091
  ),
2062
2092
  children: [
2063
2093
  /* @__PURE__ */ e(
@@ -2065,46 +2095,45 @@ function tr({
2065
2095
  {
2066
2096
  className: n(
2067
2097
  "flex-1",
2068
- v ? "w-full" : "min-w-[520px]"
2098
+ w ? "w-full" : "min-w-[520px]"
2069
2099
  ),
2070
- children: /* @__PURE__ */ i(
2100
+ children: /* @__PURE__ */ c(
2071
2101
  "div",
2072
2102
  {
2073
2103
  className: n(
2074
2104
  "relative flex rounded-xl bg-slate-100 p-1",
2075
- d[r],
2076
- !v && "w-full overflow-hidden",
2077
- v ? "min-w-48" : "",
2105
+ i[r],
2106
+ !w && "w-full overflow-hidden",
2107
+ w ? "min-w-48" : "",
2078
2108
  m
2079
2109
  ),
2080
2110
  children: [
2081
2111
  /* @__PURE__ */ e(
2082
2112
  "div",
2083
2113
  {
2084
- className: n("absolute rounded-lg bg-white", v ? "w-full" : "h-full"),
2085
- style: k
2114
+ className: n("absolute rounded-lg bg-white", w ? "w-full" : "h-full"),
2115
+ style: M
2086
2116
  }
2087
2117
  ),
2088
2118
  t?.map((b, p) => {
2089
- const w = C === b.id;
2090
- return /* @__PURE__ */ i(
2119
+ const v = C === b.id;
2120
+ return /* @__PURE__ */ c(
2091
2121
  "button",
2092
2122
  {
2093
- ref: (L) => {
2094
- j.current[p] = L;
2123
+ ref: (j) => {
2124
+ L.current[p] = j;
2095
2125
  },
2096
2126
  onClick: () => {
2097
2127
  b?.disabled || (y(b?.id), o?.(b?.id));
2098
2128
  },
2099
2129
  disabled: b?.disabled,
2100
2130
  className: n(
2101
- "relative z-10 flex items-center justify-center whitespace-nowrap px-3 py-2 text-base font-normal text-black transition-colors duration-300",
2131
+ "relative z-10 flex items-center justify-center whitespace-nowrap px-3 py-2 text-base font-normal text-black transition-colors duration-300 hover:cursor-pointer",
2102
2132
  b?.disabled && "cursor-not-allowed opacity-50",
2103
- v ? "w-full justify-start" : "flex-1 min-w-0"
2104
- // ✅
2133
+ w ? "w-full justify-start" : "flex-1 min-w-0"
2105
2134
  ),
2106
2135
  children: [
2107
- b?.icon && /* @__PURE__ */ e("span", { className: n("shrink-0 transition-transform duration-200", w && "scale-110"), children: b?.icon }),
2136
+ b?.icon && /* @__PURE__ */ e("span", { className: n("shrink-0 transition-transform duration-200", v && "scale-110"), children: b?.icon }),
2108
2137
  /* @__PURE__ */ e("span", { className: "relative z-10 truncate", title: b?.label, children: b?.label })
2109
2138
  ]
2110
2139
  },
@@ -2121,7 +2150,7 @@ function tr({
2121
2150
  {
2122
2151
  className: n(
2123
2152
  "shrink-0 ml-auto",
2124
- v ? "w-full" : "max-w-full"
2153
+ w ? "w-full" : "max-w-full"
2125
2154
  ),
2126
2155
  children: /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center justify-end gap-2", children: s })
2127
2156
  }
@@ -2129,14 +2158,14 @@ function tr({
2129
2158
  ]
2130
2159
  }
2131
2160
  ),
2132
- /* @__PURE__ */ e("div", { className: n("w-full flex-1 overflow-hidden", x[r], c), children: /* @__PURE__ */ e("div", { className: "animate-fade-in w-full", style: { animationDuration: "0.35s" }, children: t?.find((b) => b.id === C)?.content }, C) })
2161
+ /* @__PURE__ */ e("div", { className: n("w-full flex-1 overflow-hidden", x[r], u), children: /* @__PURE__ */ e("div", { className: "animate-fade-in w-full", style: { animationDuration: "0.35s" }, children: t?.find((b) => b.id === C)?.content }, C) })
2133
2162
  ] });
2134
2163
  }
2135
2164
  const Lt = {
2136
2165
  sm: "px-2 py-0.5",
2137
2166
  md: "px-2 py-1",
2138
2167
  lg: "px-3 py-2"
2139
- }, $e = {
2168
+ }, Re = {
2140
2169
  sm: "w-3 h-3",
2141
2170
  md: "w-3 h-3",
2142
2171
  lg: "w-3 h-3"
@@ -2153,9 +2182,9 @@ function rr({
2153
2182
  size: r = "lg",
2154
2183
  icon: l,
2155
2184
  iconPosition: m = "left",
2156
- className: c
2185
+ className: u
2157
2186
  }) {
2158
- return /* @__PURE__ */ i(
2187
+ return /* @__PURE__ */ c(
2159
2188
  "span",
2160
2189
  {
2161
2190
  className: n(
@@ -2163,12 +2192,12 @@ function rr({
2163
2192
  Lt[r],
2164
2193
  It[a],
2165
2194
  l && "gap-[2px]",
2166
- c
2195
+ u
2167
2196
  ),
2168
2197
  children: [
2169
- l && m === "left" && /* @__PURE__ */ e("span", { className: `flex items-center ${n($e[r])}`, children: l }),
2198
+ l && m === "left" && /* @__PURE__ */ e("span", { className: `flex items-center ${n(Re[r])}`, children: l }),
2170
2199
  /* @__PURE__ */ e("span", { children: t }),
2171
- l && m === "right" && /* @__PURE__ */ e("span", { className: `flex items-center ${n($e[r])}`, children: l })
2200
+ l && m === "right" && /* @__PURE__ */ e("span", { className: `flex items-center ${n(Re[r])}`, children: l })
2172
2201
  ]
2173
2202
  }
2174
2203
  );
@@ -2180,15 +2209,15 @@ const jt = fe(
2180
2209
  value: r = "",
2181
2210
  onChange: l,
2182
2211
  required: m = !1,
2183
- disabled: c = !1,
2212
+ disabled: u = !1,
2184
2213
  error: s,
2185
2214
  className: o,
2186
2215
  rows: C = 4,
2187
2216
  name: y
2188
- }, k) => {
2189
- const M = _(() => s ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [s]);
2190
- return /* @__PURE__ */ i("div", { className: n("relative w-full", o), children: [
2191
- t && /* @__PURE__ */ i(
2217
+ }, M) => {
2218
+ const k = _(() => s ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [s]);
2219
+ return /* @__PURE__ */ c("div", { className: n("relative w-full", o), children: [
2220
+ t && /* @__PURE__ */ c(
2192
2221
  "label",
2193
2222
  {
2194
2223
  className: n(
@@ -2204,17 +2233,17 @@ const jt = fe(
2204
2233
  /* @__PURE__ */ e(
2205
2234
  "textarea",
2206
2235
  {
2207
- ref: k,
2236
+ ref: M,
2208
2237
  name: y,
2209
2238
  rows: C,
2210
2239
  value: r,
2211
- onChange: (j) => l?.(j.target.value),
2212
- disabled: c,
2240
+ onChange: (L) => l?.(L.target.value),
2241
+ disabled: u,
2213
2242
  placeholder: a,
2214
2243
  className: n(
2215
2244
  "w-full resize-none rounded-xl border bg-white text-base font-normal transition-all duration-300 ease-in-out outline-none",
2216
2245
  "p-3 disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
2217
- M
2246
+ k
2218
2247
  )
2219
2248
  }
2220
2249
  ),
@@ -2227,19 +2256,19 @@ const Tt = (() => {
2227
2256
  let t = document.getElementById("mci-toast-container");
2228
2257
  return t || (t = document.createElement("div"), t.id = "mci-toast-container", t.className = "fixed top-4 right-4 z-[9999] flex flex-col gap-3 pointer-events-none", document.body.appendChild(t)), t;
2229
2258
  })();
2230
- let De = null, $t = 0;
2231
- const Ne = [], Re = () => {
2259
+ let De = null, Rt = 0;
2260
+ const Ne = [], $e = () => {
2232
2261
  De || (De = kt(Tt)), De.render(
2233
2262
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-3", children: Ne.map(({ id: t, element: a }) => /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: a }, t)) })
2234
2263
  );
2235
2264
  };
2236
- function Rt({
2265
+ function $t({
2237
2266
  title: t,
2238
2267
  description: a,
2239
2268
  type: r = "info",
2240
2269
  duration: l = 3e3,
2241
2270
  action: m,
2242
- onClose: c
2271
+ onClose: u
2243
2272
  }) {
2244
2273
  const [s, o] = Y(100);
2245
2274
  J(() => {
@@ -2247,14 +2276,14 @@ function Rt({
2247
2276
  o(100);
2248
2277
  return;
2249
2278
  }
2250
- let k = null;
2251
- const M = (T) => {
2252
- k || (k = T);
2253
- const v = T - k, u = Math.max(0, (l - v) / l * 100);
2254
- o(u), u > 0 ? requestAnimationFrame(M) : c?.();
2255
- }, j = requestAnimationFrame(M);
2256
- return () => cancelAnimationFrame(j);
2257
- }, [l, c]);
2279
+ let M = null;
2280
+ const k = (I) => {
2281
+ M || (M = I);
2282
+ const w = I - M, d = Math.max(0, (l - w) / l * 100);
2283
+ o(d), d > 0 ? requestAnimationFrame(k) : u?.();
2284
+ }, L = requestAnimationFrame(k);
2285
+ return () => cancelAnimationFrame(L);
2286
+ }, [l, u]);
2258
2287
  const C = {
2259
2288
  success: /* @__PURE__ */ e(bt, { weight: "Bold", className: "w-5 h-5" }),
2260
2289
  error: /* @__PURE__ */ e(gt, { weight: "Bold", className: "w-5 h-5" }),
@@ -2291,7 +2320,7 @@ function Rt({
2291
2320
  loading: "text-slate-600"
2292
2321
  }
2293
2322
  };
2294
- return /* @__PURE__ */ i(
2323
+ return /* @__PURE__ */ c(
2295
2324
  "div",
2296
2325
  {
2297
2326
  className: n(
@@ -2310,9 +2339,9 @@ function Rt({
2310
2339
  }
2311
2340
  }
2312
2341
  ),
2313
- /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ i("div", { className: "flex items-start gap-2", children: [
2342
+ /* @__PURE__ */ e("div", { className: "p-4", children: /* @__PURE__ */ c("div", { className: "flex items-start gap-2", children: [
2314
2343
  /* @__PURE__ */ e("div", { className: n("flex-shrink-0", y.text[r]), children: C[r] }),
2315
- /* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: [
2344
+ /* @__PURE__ */ c("div", { className: "flex-1 min-w-0", children: [
2316
2345
  /* @__PURE__ */ e("h4", { className: "text-base font-medium mb-1", children: t }),
2317
2346
  a && /* @__PURE__ */ e("p", { className: "text-sm text-[#82828C]", children: a }),
2318
2347
  m && /* @__PURE__ */ e("div", { className: "mt-3", children: /* @__PURE__ */ e("div", { className: n("underline font-medium text-sm", y.action[r]), children: m }) })
@@ -2320,7 +2349,7 @@ function Rt({
2320
2349
  /* @__PURE__ */ e(
2321
2350
  "button",
2322
2351
  {
2323
- onClick: c,
2352
+ onClick: u,
2324
2353
  className: "flex-shrink-0 rounded-full transition cursor-pointer active:animate-spin",
2325
2354
  children: /* @__PURE__ */ e(me, { className: "w-6 h-6 text-slate-base" })
2326
2355
  }
@@ -2331,11 +2360,11 @@ function Rt({
2331
2360
  );
2332
2361
  }
2333
2362
  const pe = (t) => {
2334
- const a = $t++, r = () => {
2335
- const m = Ne.findIndex((c) => c?.id === a);
2336
- m !== -1 && (Ne.splice(m, 1), Re());
2337
- }, l = /* @__PURE__ */ e(Rt, { ...t, onClose: r });
2338
- return Ne.push({ id: a, element: l }), Re(), t.duration !== 1 / 0 && setTimeout(r, (t.duration || 3e3) + 300), { close: r };
2363
+ const a = Rt++, r = () => {
2364
+ const m = Ne.findIndex((u) => u?.id === a);
2365
+ m !== -1 && (Ne.splice(m, 1), $e());
2366
+ }, l = /* @__PURE__ */ e($t, { ...t, onClose: r });
2367
+ return Ne.push({ id: a, element: l }), $e(), t.duration !== 1 / 0 && setTimeout(r, (t.duration || 3e3) + 300), { close: r };
2339
2368
  }, nr = {
2340
2369
  success: (t, a, r) => pe(typeof t == "string" ? { title: t, description: a, type: "success", action: r } : {
2341
2370
  ...t,
@@ -2367,7 +2396,7 @@ function lr({
2367
2396
  delay: l = 200,
2368
2397
  className: m
2369
2398
  }) {
2370
- const c = {
2399
+ const u = {
2371
2400
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
2372
2401
  bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
2373
2402
  left: "right-full top-1/2 -translate-y-1/2 mr-2",
@@ -2378,16 +2407,16 @@ function lr({
2378
2407
  left: "top-1/2 -translate-y-1/2 left-full",
2379
2408
  right: "top-1/2 -translate-y-1/2 right-full"
2380
2409
  };
2381
- return /* @__PURE__ */ i("div", { className: "group relative inline-block", children: [
2410
+ return /* @__PURE__ */ c("div", { className: "group relative inline-block", children: [
2382
2411
  a,
2383
- /* @__PURE__ */ i(
2412
+ /* @__PURE__ */ c(
2384
2413
  "div",
2385
2414
  {
2386
2415
  className: n(
2387
2416
  "absolute z-50 rounded-md bg-slate-400 px-2 py-1 text-xs whitespace-nowrap text-white shadow-md",
2388
2417
  "scale-95 opacity-0 transition-all group-hover:scale-100 group-hover:opacity-100",
2389
2418
  "duration-200 ease-out group-hover:delay-200",
2390
- c[r],
2419
+ u[r],
2391
2420
  m
2392
2421
  ),
2393
2422
  style: { transitionDelay: `${l}ms` },
@@ -2413,7 +2442,7 @@ function ar({
2413
2442
  disabled: r = !1,
2414
2443
  variant: l = "yellow",
2415
2444
  label: m,
2416
- supportText: c,
2445
+ supportText: u,
2417
2446
  className: s
2418
2447
  }) {
2419
2448
  const o = () => {
@@ -2430,7 +2459,7 @@ function ar({
2430
2459
  focus: "focus:ring-2 focus:ring-yellow-200"
2431
2460
  }
2432
2461
  };
2433
- return /* @__PURE__ */ i(
2462
+ return /* @__PURE__ */ c(
2434
2463
  "div",
2435
2464
  {
2436
2465
  className: n(
@@ -2462,7 +2491,7 @@ function ar({
2462
2491
  )
2463
2492
  }
2464
2493
  ),
2465
- (m || c) && /* @__PURE__ */ i("div", { className: "flex flex-col leading-tight", children: [
2494
+ (m || u) && /* @__PURE__ */ c("div", { className: "flex flex-col leading-tight", children: [
2466
2495
  m && /* @__PURE__ */ e(
2467
2496
  "span",
2468
2497
  {
@@ -2472,7 +2501,7 @@ function ar({
2472
2501
  children: m
2473
2502
  }
2474
2503
  ),
2475
- c && /* @__PURE__ */ e("span", { className: "text-sm font-normal text-slate-500", children: c })
2504
+ u && /* @__PURE__ */ e("span", { className: "text-sm font-normal text-slate-500", children: u })
2476
2505
  ] })
2477
2506
  ]
2478
2507
  }
@@ -2517,16 +2546,16 @@ const Bt = fe(
2517
2546
  size: r = "base",
2518
2547
  error: l,
2519
2548
  disabled: m = !1,
2520
- required: c = !1,
2549
+ required: u = !1,
2521
2550
  value: s = "",
2522
2551
  onChange: o,
2523
2552
  onFocus: C,
2524
2553
  onBlur: y,
2525
- className: k,
2526
- name: M,
2527
- showIcon: j = !1
2528
- }, T) => {
2529
- const [v, u] = Y(!1), d = z((E) => {
2554
+ className: M,
2555
+ name: k,
2556
+ showIcon: L = !1
2557
+ }, I) => {
2558
+ const [w, d] = Y(!1), i = z((E) => {
2530
2559
  let h = E.replace(/\D/g, "");
2531
2560
  h.startsWith("998") || (h = "998" + h), h = h.substring(0, 12);
2532
2561
  let F = "+998";
@@ -2537,16 +2566,16 @@ const Bt = fe(
2537
2566
  o?.("+998");
2538
2567
  return;
2539
2568
  }
2540
- const F = d(h);
2569
+ const F = i(h);
2541
2570
  o?.(F);
2542
2571
  }, b = () => {
2543
- u(!0), (!s || s === "") && o?.("+998"), C?.();
2572
+ d(!0), (!s || s === "") && o?.("+998"), C?.();
2544
2573
  }, p = () => {
2545
- u(!1), y?.();
2546
- }, w = _(() => ({
2574
+ d(!1), y?.();
2575
+ }, v = _(() => ({
2547
2576
  sm: {
2548
2577
  input: "h-9 text-sm",
2549
- padding: j ? "pl-8 pr-2" : "px-2",
2578
+ padding: L ? "pl-8 pr-2" : "px-2",
2550
2579
  iconSize: "w-4 h-4",
2551
2580
  iconLeft: "left-2",
2552
2581
  labelFont: "text-sm",
@@ -2554,7 +2583,7 @@ const Bt = fe(
2554
2583
  },
2555
2584
  md: {
2556
2585
  input: "h-10 text-sm",
2557
- padding: j ? "pl-10 pr-4" : "px-4",
2586
+ padding: L ? "pl-10 pr-4" : "px-4",
2558
2587
  iconSize: "w-4 h-4",
2559
2588
  iconLeft: "left-3",
2560
2589
  labelFont: "text-base",
@@ -2562,33 +2591,33 @@ const Bt = fe(
2562
2591
  },
2563
2592
  base: {
2564
2593
  input: "h-12 text-base",
2565
- padding: j ? "pl-11 pr-4" : "px-4",
2594
+ padding: L ? "pl-11 pr-4" : "px-4",
2566
2595
  iconSize: "w-5 h-5",
2567
2596
  iconLeft: "left-3",
2568
2597
  labelFont: "text-base",
2569
2598
  iconWrapper: "h-5"
2570
2599
  }
2571
- }), [j]), L = _(() => l ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [l]), S = _(() => m ? "text-slate-400" : l ? "text-red-600" : v ? "text-black" : "text-slate-400", [l, v, m]);
2572
- return /* @__PURE__ */ i("div", { className: n("w-full", k), children: [
2573
- t && /* @__PURE__ */ i("label", { className: n(
2600
+ }), [L]), j = _(() => l ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [l]), S = _(() => m ? "text-slate-400" : l ? "text-red-600" : w ? "text-black" : "text-slate-400", [l, w, m]);
2601
+ return /* @__PURE__ */ c("div", { className: n("w-full", M), children: [
2602
+ t && /* @__PURE__ */ c("label", { className: n(
2574
2603
  "mb-2 block font-medium transition-colors duration-200",
2575
- l ? "text-red-600" : v ? "text-blue-600" : "text-slate-700",
2576
- w[r].labelFont
2604
+ l ? "text-red-600" : w ? "text-blue-600" : "text-slate-700",
2605
+ v[r].labelFont
2577
2606
  ), children: [
2578
2607
  t,
2579
- c && /* @__PURE__ */ e("span", { className: "text-red-600 ml-1", children: "*" })
2608
+ u && /* @__PURE__ */ e("span", { className: "text-red-600 ml-1", children: "*" })
2580
2609
  ] }),
2581
- /* @__PURE__ */ i("div", { className: "relative flex items-center", children: [
2582
- j && /* @__PURE__ */ e("div", { className: n(
2610
+ /* @__PURE__ */ c("div", { className: "relative flex items-center", children: [
2611
+ L && /* @__PURE__ */ e("div", { className: n(
2583
2612
  "absolute top-1/2 flex -translate-y-1/2 items-center justify-center transition-all duration-300",
2584
- w[r].iconLeft,
2613
+ v[r].iconLeft,
2585
2614
  S
2586
- ), children: /* @__PURE__ */ e("div", { className: n("flex items-center justify-center", w[r].iconWrapper), children: /* @__PURE__ */ e(xt, { className: n(w[r].iconSize), weight: "Linear" }) }) }),
2615
+ ), children: /* @__PURE__ */ e("div", { className: n("flex items-center justify-center", v[r].iconWrapper), children: /* @__PURE__ */ e(xt, { className: n(v[r].iconSize), weight: "Linear" }) }) }),
2587
2616
  /* @__PURE__ */ e(
2588
2617
  "input",
2589
2618
  {
2590
- ref: T,
2591
- name: M,
2619
+ ref: I,
2620
+ name: k,
2592
2621
  type: "tel",
2593
2622
  value: s,
2594
2623
  onChange: x,
@@ -2600,9 +2629,9 @@ const Bt = fe(
2600
2629
  "w-full border bg-white font-normal transition-all duration-300 outline-none",
2601
2630
  r === "base" ? "rounded-xl" : "rounded-lg",
2602
2631
  "disabled:bg-slate-100 disabled:text-slate-400 disabled:cursor-not-allowed",
2603
- w[r].input,
2604
- w[r].padding,
2605
- L
2632
+ v[r].input,
2633
+ v[r].padding,
2634
+ j
2606
2635
  )
2607
2636
  }
2608
2637
  )
@@ -2614,22 +2643,22 @@ const Bt = fe(
2614
2643
  Bt.displayName = "MciPhone";
2615
2644
  const Pt = fe(
2616
2645
  ({ mode: t, onChange: a, value: r, ...l }, m) => {
2617
- const [c, s] = Y(""), o = r !== void 0 ? r : c, C = (v) => {
2618
- const u = v.replace(/\s/g, "").toUpperCase();
2619
- let d = "";
2620
- for (let x = 0; x < u.length; x++) {
2621
- const b = u[x];
2622
- if (d.length < 2 ? /[A-Z]/.test(b) && (d += b) : /[0-9]/.test(b) && (d += b), d.length >= 9) break;
2646
+ const [u, s] = Y(""), o = r !== void 0 ? r : u, C = (w) => {
2647
+ const d = w.replace(/\s/g, "").toUpperCase();
2648
+ let i = "";
2649
+ for (let x = 0; x < d.length; x++) {
2650
+ const b = d[x];
2651
+ if (i.length < 2 ? /[A-Z]/.test(b) && (i += b) : /[0-9]/.test(b) && (i += b), i.length >= 9) break;
2623
2652
  }
2624
- return d.length > 2 ? d.slice(0, 2) + " " + d.slice(2) : d;
2625
- }, y = (v) => v.replace(/\D/g, "").slice(0, 14), k = (v) => v.toUpperCase().replace(/[^A-Z0-9\-\s]/g, "").replace(/\s+/g, " ").slice(0, 15), M = z(
2626
- (v) => {
2627
- const u = v.target.value;
2628
- let d = "";
2629
- t === "passport" ? d = C(u) : t === "pinfl" ? d = y(u) : t === "metirka" && (d = k(u)), r === void 0 && s(d), v.target.value = d, a?.(d, v);
2653
+ return i.length > 2 ? i.slice(0, 2) + " " + i.slice(2) : i;
2654
+ }, y = (w) => w.replace(/\D/g, "").slice(0, 14), M = (w) => w.toUpperCase().replace(/[^A-Z0-9\-\s]/g, "").replace(/\s+/g, " ").slice(0, 15), k = z(
2655
+ (w) => {
2656
+ const d = w.target.value;
2657
+ let i = "";
2658
+ t === "passport" ? i = C(d) : t === "pinfl" ? i = y(d) : t === "metirka" && (i = M(d)), r === void 0 && s(i), w.target.value = i, a?.(i, w);
2630
2659
  },
2631
2660
  [t, a, r]
2632
- ), j = () => {
2661
+ ), L = () => {
2633
2662
  if (l.placeholder) return l.placeholder;
2634
2663
  switch (t) {
2635
2664
  case "passport":
@@ -2648,7 +2677,7 @@ const Pt = fe(
2648
2677
  ref: m,
2649
2678
  ...l,
2650
2679
  value: o,
2651
- onChange: M,
2680
+ onChange: k,
2652
2681
  maxLength: (() => {
2653
2682
  if (l.maxLength) return l.maxLength;
2654
2683
  switch (t) {
@@ -2662,7 +2691,7 @@ const Pt = fe(
2662
2691
  return 255;
2663
2692
  }
2664
2693
  })(),
2665
- placeholder: j()
2694
+ placeholder: L()
2666
2695
  }
2667
2696
  );
2668
2697
  }
@@ -2674,37 +2703,37 @@ function or({
2674
2703
  columns: r,
2675
2704
  hidden: l,
2676
2705
  onToggle: m,
2677
- onMove: c
2706
+ onMove: u
2678
2707
  }) {
2679
2708
  const s = se(null), { handleClick: o } = Ce(s, a);
2680
2709
  J(() => {
2681
2710
  if (t)
2682
2711
  return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
2683
2712
  }, [t, o]);
2684
- const C = _(() => new Set(l), [l]), y = se(null), k = se(null), M = se(!1), [j, T] = Y(null), [v, u] = Y(null), d = se(null), x = z((L) => {
2685
- k.current = L, d.current == null && (d.current = requestAnimationFrame(() => {
2686
- d.current = null, T(k.current);
2713
+ const C = _(() => new Set(l), [l]), y = se(null), M = se(null), k = se(!1), [L, I] = Y(null), [w, d] = Y(null), i = se(null), x = z((j) => {
2714
+ M.current = j, i.current == null && (i.current = requestAnimationFrame(() => {
2715
+ i.current = null, I(M.current);
2687
2716
  }));
2688
2717
  }, []);
2689
2718
  J(() => () => {
2690
- d.current != null && cancelAnimationFrame(d.current);
2719
+ i.current != null && cancelAnimationFrame(i.current);
2691
2720
  }, []);
2692
2721
  const b = z(
2693
- (L) => {
2694
- M.current = !0, y.current = L, u(r[L]?.key ?? null);
2722
+ (j) => {
2723
+ k.current = !0, y.current = j, d(r[j]?.key ?? null);
2695
2724
  },
2696
2725
  [r]
2697
2726
  ), p = z(() => {
2698
- M.current = !1;
2727
+ k.current = !1;
2699
2728
  }, []);
2700
2729
  J(() => {
2701
2730
  if (t)
2702
2731
  return document.addEventListener("mouseup", p), () => document.removeEventListener("mouseup", p);
2703
2732
  }, [t, p]);
2704
- const w = z(() => {
2705
- y.current = null, M.current = !1, u(null), x(null);
2733
+ const v = z(() => {
2734
+ y.current = null, k.current = !1, d(null), x(null);
2706
2735
  }, [x]);
2707
- return t ? /* @__PURE__ */ i(
2736
+ return t ? /* @__PURE__ */ c(
2708
2737
  "div",
2709
2738
  {
2710
2739
  ref: s,
@@ -2714,7 +2743,7 @@ function or({
2714
2743
  "border border-slate-200"
2715
2744
  ),
2716
2745
  children: [
2717
- /* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-4", children: [
2746
+ /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-4", children: [
2718
2747
  /* @__PURE__ */ e("h4", { className: "text-slate-600 text-large font-normal", children: "Settings" }),
2719
2748
  /* @__PURE__ */ e(
2720
2749
  "button",
@@ -2739,34 +2768,34 @@ function or({
2739
2768
  "[&::-webkit-scrollbar-thumb]:rounded-full",
2740
2769
  "hover:[&::-webkit-scrollbar-thumb]:bg-slate-300"
2741
2770
  ),
2742
- children: r.map((L, S) => {
2743
- const E = !C.has(L.key), h = j === S, F = v === L.key;
2744
- return /* @__PURE__ */ i("div", { children: [
2745
- /* @__PURE__ */ i(
2771
+ children: r.map((j, S) => {
2772
+ const E = !C.has(j.key), h = L === S, F = w === j.key;
2773
+ return /* @__PURE__ */ c("div", { children: [
2774
+ /* @__PURE__ */ c(
2746
2775
  "div",
2747
2776
  {
2748
2777
  draggable: !0,
2749
- onDragStart: (I) => {
2750
- if (!M.current) {
2751
- I.preventDefault();
2778
+ onDragStart: (T) => {
2779
+ if (!k.current) {
2780
+ T.preventDefault();
2752
2781
  return;
2753
2782
  }
2754
- I.dataTransfer.setData("text/plain", String(S)), I.dataTransfer.effectAllowed = "move", u(L.key), x(null);
2783
+ T.dataTransfer.setData("text/plain", String(S)), T.dataTransfer.effectAllowed = "move", d(j.key), x(null);
2755
2784
  const B = new Image();
2756
- B.src = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=", I.dataTransfer.setDragImage(B, 0, 0);
2785
+ B.src = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=", T.dataTransfer.setDragImage(B, 0, 0);
2757
2786
  },
2758
- onDragOver: (I) => {
2759
- y.current != null && (I.preventDefault(), I.dataTransfer.dropEffect = "move", x(S));
2787
+ onDragOver: (T) => {
2788
+ y.current != null && (T.preventDefault(), T.dataTransfer.dropEffect = "move", x(S));
2760
2789
  },
2761
2790
  onDragLeave: () => {
2762
- k.current === S && x(null);
2791
+ M.current === S && x(null);
2763
2792
  },
2764
- onDrop: (I) => {
2765
- I.preventDefault();
2766
- const B = y.current ?? Number(I.dataTransfer.getData("text/plain"));
2767
- Number.isFinite(B) && B !== S && c(B, S), w();
2793
+ onDrop: (T) => {
2794
+ T.preventDefault();
2795
+ const B = y.current ?? Number(T.dataTransfer.getData("text/plain"));
2796
+ Number.isFinite(B) && B !== S && u(B, S), v();
2768
2797
  },
2769
- onDragEnd: w,
2798
+ onDragEnd: v,
2770
2799
  className: n(
2771
2800
  "group flex items-center py-2 px-1 gap-4",
2772
2801
  "rounded-md box-border overflow-visible",
@@ -2791,13 +2820,13 @@ function or({
2791
2820
  children: /* @__PURE__ */ e(wt, { weight: "Linear", size: 20 })
2792
2821
  }
2793
2822
  ),
2794
- /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(ke, { checked: E, onChange: () => m(L.key), variant: "blue" }) }),
2795
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("h4", { className: "truncate text-slate-700 text-base font-medium", title: L.title, children: L.title }) })
2823
+ /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(ke, { checked: E, onChange: () => m(j.key), variant: "blue" }) }),
2824
+ /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("h4", { className: "truncate text-slate-700 text-base font-medium", title: j.title, children: j.title }) })
2796
2825
  ]
2797
2826
  }
2798
2827
  ),
2799
2828
  S !== r.length - 1 && /* @__PURE__ */ e("div", { className: "mx-2 h-px bg-slate-100" })
2800
- ] }, L.key);
2829
+ ] }, j.key);
2801
2830
  })
2802
2831
  }
2803
2832
  )
@@ -2822,17 +2851,17 @@ const ze = (t) => Array.isArray(t) && t.every((a) => typeof a == "string"), Wt =
2822
2851
  return r;
2823
2852
  };
2824
2853
  function ir(t) {
2825
- const { storageKey: a, columns: r, defaultVisibleKeys: l, defaultOrder: m } = t, c = _(() => r.map((u) => String(u.key)), [r]), s = _(() => new Set(c), [c]), [o, C] = Y(() => {
2854
+ const { storageKey: a, columns: r, defaultVisibleKeys: l, defaultOrder: m } = t, u = _(() => r.map((d) => String(d.key)), [r]), s = _(() => new Set(u), [u]), [o, C] = Y(() => {
2826
2855
  if (typeof window > "u") {
2827
- const S = m?.map(String) ?? c, E = l && l.length ? c.filter((h) => !new Set(l.map(String)).has(h)) : [];
2856
+ const S = m?.map(String) ?? u, E = l && l.length ? u.filter((h) => !new Set(l.map(String)).has(h)) : [];
2828
2857
  return { order: oe(S), hidden: oe(E) };
2829
2858
  }
2830
- const u = Wt(window.localStorage.getItem(a)), d = m?.map(String) ?? c, x = oe(d), b = oe((u?.order ?? []).filter((S) => s.has(S))), p = oe([
2859
+ const d = Wt(window.localStorage.getItem(a)), i = m?.map(String) ?? u, x = oe(i), b = oe((d?.order ?? []).filter((S) => s.has(S))), p = oe([
2831
2860
  ...b,
2832
2861
  ...x.filter((S) => !b.includes(S)),
2833
- ...c.filter((S) => !b.includes(S) && !x.includes(S))
2834
- ]), w = oe((u?.hidden ?? []).filter((S) => s.has(S))), L = w.length === 0 && l && l.length ? c.filter((S) => !new Set(l.map(String)).has(S)) : w;
2835
- return { order: p, hidden: oe(L) };
2862
+ ...u.filter((S) => !b.includes(S) && !x.includes(S))
2863
+ ]), v = oe((d?.hidden ?? []).filter((S) => s.has(S))), j = v.length === 0 && l && l.length ? u.filter((S) => !new Set(l.map(String)).has(S)) : v;
2864
+ return { order: p, hidden: oe(j) };
2836
2865
  });
2837
2866
  J(() => {
2838
2867
  if (!(typeof window > "u"))
@@ -2841,48 +2870,48 @@ function ir(t) {
2841
2870
  } catch {
2842
2871
  }
2843
2872
  }, [a, o]), J(() => {
2844
- C((u) => {
2845
- const d = oe([
2846
- ...u.order.filter((w) => s.has(w)),
2847
- ...c.filter((w) => !u.order.includes(w))
2848
- ]), x = oe(u.hidden.filter((w) => s.has(w))), b = d.length === u.order.length && d.every((w, L) => w === u.order[L]), p = x.length === u.hidden.length && x.every((w, L) => w === u.hidden[L]);
2849
- return b && p ? u : { order: d, hidden: x };
2873
+ C((d) => {
2874
+ const i = oe([
2875
+ ...d.order.filter((v) => s.has(v)),
2876
+ ...u.filter((v) => !d.order.includes(v))
2877
+ ]), x = oe(d.hidden.filter((v) => s.has(v))), b = i.length === d.order.length && i.every((v, j) => v === d.order[j]), p = x.length === d.hidden.length && x.every((v, j) => v === d.hidden[j]);
2878
+ return b && p ? d : { order: i, hidden: x };
2850
2879
  });
2851
- }, [c, s]);
2852
- const y = _(() => new Set(o.hidden), [o.hidden]), k = _(() => {
2853
- const u = /* @__PURE__ */ new Map();
2854
- return o.order.forEach((x, b) => u.set(x, b)), [...r.filter((x) => !y.has(String(x.key)))].sort((x, b) => {
2855
- const p = u.get(String(x.key)) ?? Number.MAX_SAFE_INTEGER, w = u.get(String(b.key)) ?? Number.MAX_SAFE_INTEGER;
2856
- return p - w;
2880
+ }, [u, s]);
2881
+ const y = _(() => new Set(o.hidden), [o.hidden]), M = _(() => {
2882
+ const d = /* @__PURE__ */ new Map();
2883
+ return o.order.forEach((x, b) => d.set(x, b)), [...r.filter((x) => !y.has(String(x.key)))].sort((x, b) => {
2884
+ const p = d.get(String(x.key)) ?? Number.MAX_SAFE_INTEGER, v = d.get(String(b.key)) ?? Number.MAX_SAFE_INTEGER;
2885
+ return p - v;
2857
2886
  });
2858
- }, [r, y, o.order]), M = _(
2859
- () => o.hidden.filter((u) => s.has(u)),
2887
+ }, [r, y, o.order]), k = _(
2888
+ () => o.hidden.filter((d) => s.has(d)),
2860
2889
  [o.hidden, s]
2861
- ), j = z((u) => {
2862
- const d = String(u);
2890
+ ), L = z((d) => {
2891
+ const i = String(d);
2863
2892
  C((x) => {
2864
- const p = x.hidden.includes(d) ? x.hidden.filter((w) => w !== d) : [...x.hidden, d];
2893
+ const p = x.hidden.includes(i) ? x.hidden.filter((v) => v !== i) : [...x.hidden, i];
2865
2894
  return { ...x, hidden: oe(p) };
2866
2895
  });
2867
- }, []), T = z((u, d) => {
2896
+ }, []), I = z((d, i) => {
2868
2897
  C((x) => {
2869
2898
  const b = x.order.slice();
2870
- if (u < 0 || d < 0 || u >= b.length || d >= b.length) return x;
2871
- const [p] = b.splice(u, 1);
2872
- return b.splice(d, 0, p), { ...x, order: b };
2899
+ if (d < 0 || i < 0 || d >= b.length || i >= b.length) return x;
2900
+ const [p] = b.splice(d, 1);
2901
+ return b.splice(i, 0, p), { ...x, order: b };
2873
2902
  });
2874
- }, []), v = z(() => {
2903
+ }, []), w = z(() => {
2875
2904
  C(() => {
2876
- const u = oe(m?.map(String) ?? c), d = l && l.length ? oe(c.filter((x) => !new Set(l.map(String)).has(x))) : [];
2877
- return { order: u, hidden: d };
2905
+ const d = oe(m?.map(String) ?? u), i = l && l.length ? oe(u.filter((x) => !new Set(l.map(String)).has(x))) : [];
2906
+ return { order: d, hidden: i };
2878
2907
  });
2879
- }, [m, l, c]);
2908
+ }, [m, l, u]);
2880
2909
  return {
2881
- orderedColumns: k,
2882
- hiddenKeys: M,
2883
- toggleColumn: j,
2884
- moveColumn: T,
2885
- reset: v
2910
+ orderedColumns: M,
2911
+ hiddenKeys: k,
2912
+ toggleColumn: L,
2913
+ moveColumn: I,
2914
+ reset: w
2886
2915
  };
2887
2916
  }
2888
2917
  export {