@efficiency-point/design-system 0.1.11 → 0.1.15

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
@@ -4,17 +4,17 @@ import { createPortal as h } from "react-dom";
4
4
  import { createSortedRowModel as g, rowSortingFeature as _, tableFeatures as v, useTable as y } from "@tanstack/react-table";
5
5
  import { create as b } from "zustand";
6
6
  var x = {
7
- badge: "_badge_1umok_1",
8
- sm: "_sm_1umok_2",
9
- md: "_md_1umok_4",
10
- neutral: "_neutral_1umok_6",
11
- info: "_info_1umok_7",
12
- success: "_success_1umok_8",
13
- warning: "_warning_1umok_9",
14
- error: "_error_1umok_10",
15
- dot: "_dot_1umok_11",
16
- icon: "_icon_1umok_13",
17
- label: "_label_1umok_15"
7
+ badge: "_badge_q710w_1",
8
+ sm: "_sm_q710w_3",
9
+ md: "_md_q710w_5",
10
+ neutral: "_neutral_q710w_7",
11
+ info: "_info_q710w_9",
12
+ success: "_success_q710w_11",
13
+ warning: "_warning_q710w_13",
14
+ error: "_error_q710w_15",
15
+ dot: "_dot_q710w_17",
16
+ icon: "_icon_q710w_19",
17
+ label: "_label_q710w_21"
18
18
  }, S = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
19
  className: `${x.badge} ${x[r]} ${x[i]} ${s}`,
20
20
  children: [
@@ -56,17 +56,17 @@ var x = {
56
56
  ]
57
57
  })
58
58
  }), w = {
59
- button: "_button_1g18h_1",
60
- sm: "_sm_1g18h_42",
61
- md: "_md_1g18h_53",
62
- lg: "_lg_1g18h_64",
63
- primary: "_primary_1g18h_74",
64
- secondary: "_secondary_1g18h_86",
65
- outline: "_outline_1g18h_98",
66
- ghost: "_ghost_1g18h_110",
67
- empty: "_empty_1g18h_122",
68
- destructive: "_destructive_1g18h_134",
69
- destructiveOutline: "_destructiveOutline_1g18h_142"
59
+ button: "_button_15zz4_1",
60
+ sm: "_sm_15zz4_47",
61
+ md: "_md_15zz4_61",
62
+ lg: "_lg_15zz4_75",
63
+ primary: "_primary_15zz4_89",
64
+ secondary: "_secondary_15zz4_103",
65
+ outline: "_outline_15zz4_117",
66
+ ghost: "_ghost_15zz4_131",
67
+ empty: "_empty_15zz4_145",
68
+ destructive: "_destructive_15zz4_159",
69
+ destructiveOutline: "_destructiveOutline_15zz4_169"
70
70
  }, T = a(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
71
71
  ref: l,
72
72
  className: `${w.button} ${w[n]} ${w[r]} ${s}`,
@@ -78,14 +78,14 @@ var x = {
78
78
  }));
79
79
  T.displayName = "DSButton";
80
80
  var E = {
81
- label: "_label_12b26_1",
82
- required: "_required_12b26_21",
83
- error: "_error_12b26_23",
84
- optional: "_optional_12b26_31",
85
- hint: "_hint_12b26_33",
86
- disabled: "_disabled_12b26_45",
87
- message: "_message_12b26_53",
88
- success: "_success_12b26_69"
81
+ label: "_label_1uvpq_1",
82
+ required: "_required_1uvpq_23",
83
+ error: "_error_1uvpq_25",
84
+ optional: "_optional_1uvpq_33",
85
+ hint: "_hint_1uvpq_35",
86
+ disabled: "_disabled_1uvpq_47",
87
+ message: "_message_1uvpq_55",
88
+ success: "_success_1uvpq_71"
89
89
  }, te = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
90
90
  className: `${E.label} ${a ? E.disabled : ""} ${o}`,
91
91
  ...s,
@@ -264,12 +264,12 @@ var E = {
264
264
  let r = k[e];
265
265
  return /* @__PURE__ */ t(r, { ...n });
266
266
  }, j = {
267
- wrapper: "_wrapper_1bk2j_1",
268
- label: "_label_1bk2j_3",
269
- input: "_input_1bk2j_4",
270
- control: "_control_1bk2j_6",
271
- disabled: "_disabled_1bk2j_9",
272
- controlError: "_controlError_1bk2j_14"
267
+ wrapper: "_wrapper_zhpug_1",
268
+ label: "_label_zhpug_3",
269
+ input: "_input_zhpug_5",
270
+ control: "_control_zhpug_7",
271
+ disabled: "_disabled_zhpug_21",
272
+ controlError: "_controlError_zhpug_27"
273
273
  }, M = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, readOnly: c = !1, className: d = "", name: f, id: m, indeterminate: h = !1, ...g }) => {
274
274
  let _ = u(), v = m ?? `ds-checkbox-${f ?? _}`, y = p(null), b = a ? `${v}-hint` : void 0, x = o ? `${v}-error` : void 0;
275
275
  return l(() => {
@@ -325,28 +325,36 @@ var E = {
325
325
  ]
326
326
  });
327
327
  }, N = {
328
- wrapper: "_wrapper_hydb6_1",
329
- trigger: "_trigger_hydb6_17",
330
- lg: "_lg_hydb6_49",
331
- chevron: "_chevron_hydb6_61",
332
- chevronOpen: "_chevronOpen_hydb6_86",
333
- nav: "_nav_hydb6_96",
334
- day: "_day_hydb6_98",
335
- monthSelect: "_monthSelect_hydb6_100",
336
- yearInput: "_yearInput_hydb6_102",
337
- timeInput: "_timeInput_hydb6_104",
338
- value: "_value_hydb6_126",
339
- placeholder: "_placeholder_hydb6_135",
340
- error: "_error_hydb6_143",
341
- panel: "_panel_hydb6_151",
342
- calendarHeader: "_calendarHeader_hydb6_176",
343
- weekdays: "_weekdays_hydb6_265",
344
- days: "_days_hydb6_267",
345
- outside: "_outside_hydb6_303",
346
- selected: "_selected_hydb6_311",
347
- timeLabel: "_timeLabel_hydb6_331",
348
- previousMonth: "_previousMonth_hydb6_377",
349
- nextMonth: "_nextMonth_hydb6_381"
328
+ wrapper: "_wrapper_1dsog_1",
329
+ trigger: "_trigger_1dsog_17",
330
+ sm: "_sm_1dsog_53",
331
+ md: "_md_1dsog_65",
332
+ lg: "_lg_1dsog_75",
333
+ chevron: "_chevron_1dsog_89",
334
+ chevronOpen: "_chevronOpen_1dsog_115",
335
+ nav: "_nav_1dsog_127",
336
+ day: "_day_1dsog_129",
337
+ monthSelect: "_monthSelect_1dsog_131",
338
+ yearInput: "_yearInput_1dsog_133",
339
+ timeInput: "_timeInput_1dsog_135",
340
+ dateInput: "_dateInput_1dsog_147",
341
+ timeValue: "_timeValue_1dsog_189",
342
+ chevronButton: "_chevronButton_1dsog_201",
343
+ disabled: "_disabled_1dsog_235",
344
+ validationTooltip: "_validationTooltip_1dsog_249",
345
+ "validation-tooltip-lifetime": "_validation-tooltip-lifetime_1dsog_1",
346
+ value: "_value_1dsog_319",
347
+ placeholder: "_placeholder_1dsog_335",
348
+ error: "_error_1dsog_343",
349
+ panel: "_panel_1dsog_351",
350
+ calendarHeader: "_calendarHeader_1dsog_377",
351
+ weekdays: "_weekdays_1dsog_467",
352
+ days: "_days_1dsog_469",
353
+ outside: "_outside_1dsog_505",
354
+ selected: "_selected_1dsog_513",
355
+ timeLabel: "_timeLabel_1dsog_533",
356
+ previousMonth: "_previousMonth_1dsog_593",
357
+ nextMonth: "_nextMonth_1dsog_601"
350
358
  }, P = [
351
359
  "Пн",
352
360
  "Вт",
@@ -368,11 +376,33 @@ var E = {
368
376
  "Октябрь",
369
377
  "Ноябрь",
370
378
  "Декабрь"
371
- ], I = (e) => String(e).padStart(2, "0"), L = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), R = (e, t) => {
379
+ ], I = (e) => String(e).padStart(2, "0"), L = 8, R = "Некорректная дата", z = (e) => e ? `${I(e.getDate())}.${I(e.getMonth() + 1)}.${e.getFullYear()}` : "", B = (e) => {
380
+ let t = e.replace(/\D/g, "").slice(0, L);
381
+ return [
382
+ t.slice(0, 2),
383
+ t.slice(2, 4),
384
+ t.slice(4, 8)
385
+ ].filter(Boolean).join(".");
386
+ }, V = (e) => {
387
+ if (!e) return !0;
388
+ let t = Number(e.padEnd(4, "0"));
389
+ return Number(e.padEnd(4, "9")) >= 1800 && t <= 2500;
390
+ }, H = (e) => {
391
+ if (!/^\d{0,8}$/.test(e)) return !1;
392
+ let t = e.slice(0, 2), n = e.slice(2, 4), r = e.slice(4, 8);
393
+ return t.length === 1 && Number(t) > 3 || t.length === 2 && (Number(t) < 1 || Number(t) > 31) || n.length === 1 && Number(n) > 1 || n.length === 2 && (Number(n) < 1 || Number(n) > 12) ? !1 : V(r);
394
+ }, U = (e) => {
395
+ let t = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);
396
+ if (!t) return null;
397
+ let n = Number(t[1]), r = Number(t[2]) - 1, i = Number(t[3]);
398
+ if (i < 1800 || i > 2500) return null;
399
+ let a = new Date(i, r, n, 12);
400
+ return a.getFullYear() !== i || a.getMonth() !== r || a.getDate() !== n ? null : a;
401
+ }, W = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), G = (e, t) => {
372
402
  if (!e) return "";
373
403
  let n = `${e.getFullYear()}-${I(e.getMonth() + 1)}-${I(e.getDate())}`, r = `${I(e.getHours())}:${I(e.getMinutes())}`;
374
404
  return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
375
- }, z = (e, t) => {
405
+ }, ne = (e, t) => {
376
406
  if (!e) return null;
377
407
  if (t === "time") {
378
408
  let t = /^(\d{2}):(\d{2})$/.exec(e);
@@ -390,87 +420,115 @@ var E = {
390
420
  }
391
421
  let n = new Date(e);
392
422
  return Number.isNaN(n.getTime()) ? null : n;
393
- }, B = (e, t) => {
423
+ }, re = (e, t) => {
394
424
  if (!e) return "";
395
425
  let n = `${I(e.getDate())}.${I(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${I(e.getHours())}:${I(e.getMinutes())}`;
396
426
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
397
- }, ne = (e) => {
427
+ }, ie = (e) => {
398
428
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
399
429
  return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
400
430
  let n = new Date(r);
401
431
  return n.setDate(r.getDate() + t), n;
402
432
  });
403
- }, V = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), H = (e, t, n) => {
404
- let r = L(e).getTime();
405
- return !!(t && r < L(t).getTime() || n && r > L(n).getTime());
406
- }, U = 8, re = 6, W = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: c, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: ee, name: w, className: T = "" }) => {
407
- let E = u(), O = ee ?? `ds-date-time-${w ?? E}`, k = g ? `${O}-hint` : void 0, j = _ ? `${O}-error` : void 0, M = p(null), I = p(null), L = p(null), [W, G] = m(!1), [K, ie] = m(r ?? /* @__PURE__ */ new Date()), [q, ae] = m(R(r, "time")), [J, Y] = m(null), oe = f(() => ne(K), [K]), se = a !== "time", ce = a !== "date";
433
+ }, ae = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), oe = (e, t, n) => {
434
+ let r = W(e).getTime();
435
+ return !!(t && r < W(t).getTime() || n && r > W(n).getTime());
436
+ }, se = 8, ce = 6, K = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: c, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: ee, name: w, className: T = "" }) => {
437
+ let E = u(), O = ee ?? `ds-date-time-${w ?? E}`, k = g ? `${O}-hint` : void 0, j = _ ? `${O}-error` : void 0, M = p(null), I = p(null), V = p(null), W = p(null), [K, q] = m(!1), [J, le] = m(r ?? /* @__PURE__ */ new Date()), [ue, de] = m(G(r, "time")), [Y, X] = m(z(r)), [fe, pe] = m(""), [me, he] = m(0), [ge, _e] = m(null), ve = f(() => ie(J), [J]), Z = a !== "time", ye = a !== "date";
408
438
  l(() => {
409
- r && ie(r), ae(R(r, "time"));
410
- }, [r]);
411
- let le = s(() => {
412
- let e = I.current, t = L.current;
439
+ r && le(r), de(G(r, "time")), X(z(r));
440
+ }, [r]), l(() => () => {
441
+ W.current && clearTimeout(W.current);
442
+ }, []);
443
+ let be = s(() => {
444
+ let e = I.current, t = V.current;
413
445
  if (!e || !t) return;
414
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - U, o = n.top - U, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(U, n.top - r.height - re) : n.bottom + re, u = n.left, d = i - r.width - U;
415
- Y({
446
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - se, o = n.top - se, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(se, n.top - r.height - ce) : n.bottom + ce, u = n.left, d = i - r.width - se;
447
+ _e({
416
448
  top: l,
417
- left: Math.max(U, Math.min(u, d)),
449
+ left: Math.max(se, Math.min(u, d)),
418
450
  maxHeight: c
419
451
  });
420
452
  }, []);
421
453
  d(() => {
422
- if (!W) {
423
- Y(null);
454
+ if (!K) {
455
+ _e(null);
424
456
  return;
425
457
  }
426
- return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
427
- window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
458
+ return be(), window.addEventListener("resize", be), window.addEventListener("scroll", be, !0), () => {
459
+ window.removeEventListener("resize", be), window.removeEventListener("scroll", be, !0);
428
460
  };
429
461
  }, [
430
- W,
431
- le,
432
462
  K,
433
- q
463
+ be,
464
+ J,
465
+ ue
434
466
  ]), l(() => {
435
- if (!W) return;
467
+ if (!K) return;
436
468
  let e = (e) => {
437
- let t = e.target, n = M.current?.contains(t), r = L.current?.contains(t);
438
- !n && !r && G(!1);
469
+ let t = e.target, n = M.current?.contains(t), r = V.current?.contains(t);
470
+ !n && !r && q(!1);
439
471
  }, t = (e) => {
440
- e.key === "Escape" && (G(!1), I.current?.focus());
472
+ e.key === "Escape" && (q(!1), I.current?.focus());
441
473
  };
442
474
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
443
475
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
444
476
  };
445
- }, [W]);
446
- let ue = (e) => {
447
- if (H(e, x, S)) return;
448
- let t = a === "date" ? z(R(e, "date"), "date") : new Date(e);
449
- t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && G(!1));
450
- }, de = (e) => {
451
- if (ae(e), !e) {
477
+ }, [K]);
478
+ let xe = (e) => {
479
+ if (oe(e, x, S)) return;
480
+ let t = a === "date" ? ne(G(e, "date"), "date") : new Date(e);
481
+ t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), X(z(t)), a === "date" && q(!1));
482
+ }, Se = () => {
483
+ pe(R), he((e) => e + 1), W.current && clearTimeout(W.current), W.current = setTimeout(() => {
484
+ pe(""), W.current = null;
485
+ }, 3e3);
486
+ }, Ce = (e) => {
487
+ let t = e.replace(/\D/g, "").slice(0, L);
488
+ if (!H(t)) {
489
+ Se();
490
+ return;
491
+ }
492
+ let n = B(t);
493
+ if (X(n), !t) {
452
494
  i?.(null);
453
495
  return;
454
496
  }
455
- let t = z(e, "time");
497
+ if (t.length < L) return;
498
+ let o = U(n);
499
+ if (!o || oe(o, x, S)) {
500
+ Se();
501
+ return;
502
+ }
503
+ a === "datetime" && o.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(o), le(o), q(!1), requestAnimationFrame(() => I.current?.blur());
504
+ }, we = (e) => {
505
+ if (de(e), !e) {
506
+ i?.(null);
507
+ return;
508
+ }
509
+ let t = ne(e, "time");
456
510
  if (!t) return;
457
- let n = new Date(a === "datetime" ? r ?? K : /* @__PURE__ */ new Date());
511
+ let n = new Date(a === "datetime" ? r ?? J : /* @__PURE__ */ new Date());
458
512
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
459
- }, fe = c ?? (a === "date" ? "--.--.----" : a === "time" ? "--:--" : "--.--.---- --:--"), X = [k, j].filter(Boolean).join(" ") || void 0, pe = W && !y ? /* @__PURE__ */ n("div", {
460
- ref: L,
513
+ }, Te = c ?? (a === "date" ? "--.--.----" : a === "time" ? "--:--" : "--.--.---- --:--"), Ee = fe ? `${O}-validation` : void 0, De = [
514
+ k,
515
+ j,
516
+ Ee
517
+ ].filter(Boolean).join(" ") || void 0, Oe = K && !y ? /* @__PURE__ */ n("div", {
518
+ ref: V,
461
519
  className: N.panel,
462
520
  role: "dialog",
463
- "aria-label": o ?? fe,
464
- style: J ? {
465
- top: J.top,
466
- left: J.left,
467
- maxHeight: J.maxHeight
521
+ "aria-label": o ?? Te,
522
+ style: ge ? {
523
+ top: ge.top,
524
+ left: ge.left,
525
+ maxHeight: ge.maxHeight
468
526
  } : {
469
527
  visibility: "hidden",
470
528
  top: 0,
471
529
  left: 0
472
530
  },
473
- children: [se && /* @__PURE__ */ n(e, { children: [
531
+ children: [Z && /* @__PURE__ */ n(e, { children: [
474
532
  /* @__PURE__ */ n("div", {
475
533
  className: N.calendarHeader,
476
534
  children: [
@@ -478,7 +536,7 @@ var E = {
478
536
  type: "button",
479
537
  className: N.nav,
480
538
  "aria-label": "Предыдущий месяц",
481
- onClick: () => ie(new Date(K.getFullYear(), K.getMonth() - 1, 1)),
539
+ onClick: () => le(new Date(J.getFullYear(), J.getMonth() - 1, 1)),
482
540
  children: /* @__PURE__ */ t(A, {
483
541
  name: "IconChevron",
484
542
  width: 20,
@@ -489,8 +547,8 @@ var E = {
489
547
  /* @__PURE__ */ t("select", {
490
548
  className: N.monthSelect,
491
549
  "aria-label": "Месяц",
492
- value: K.getMonth(),
493
- onChange: (e) => ie(new Date(K.getFullYear(), Number(e.target.value), 1)),
550
+ value: J.getMonth(),
551
+ onChange: (e) => le(new Date(J.getFullYear(), Number(e.target.value), 1)),
494
552
  children: F.map((e, n) => /* @__PURE__ */ t("option", {
495
553
  value: n,
496
554
  children: e
@@ -500,14 +558,14 @@ var E = {
500
558
  className: N.yearInput,
501
559
  type: "number",
502
560
  "aria-label": "Год",
503
- value: K.getFullYear(),
504
- onChange: (e) => ie(new Date(Number(e.target.value), K.getMonth(), 1))
561
+ value: J.getFullYear(),
562
+ onChange: (e) => le(new Date(Number(e.target.value), J.getMonth(), 1))
505
563
  }),
506
564
  /* @__PURE__ */ t("button", {
507
565
  type: "button",
508
566
  className: N.nav,
509
567
  "aria-label": "Следующий месяц",
510
- onClick: () => ie(new Date(K.getFullYear(), K.getMonth() + 1, 1)),
568
+ onClick: () => le(new Date(J.getFullYear(), J.getMonth() + 1, 1)),
511
569
  children: /* @__PURE__ */ t(A, {
512
570
  name: "IconChevron",
513
571
  width: 20,
@@ -523,25 +581,25 @@ var E = {
523
581
  }),
524
582
  /* @__PURE__ */ t("div", {
525
583
  className: N.days,
526
- children: oe.map((e) => {
527
- let n = V(r, e);
584
+ children: ve.map((e) => {
585
+ let n = ae(r, e);
528
586
  return /* @__PURE__ */ t("button", {
529
587
  type: "button",
530
- className: `${N.day} ${e.getMonth() === K.getMonth() ? "" : N.outside} ${n ? N.selected : ""}`,
531
- disabled: H(e, x, S),
588
+ className: `${N.day} ${e.getMonth() === J.getMonth() ? "" : N.outside} ${n ? N.selected : ""}`,
589
+ disabled: oe(e, x, S),
532
590
  "aria-pressed": n,
533
- onClick: () => ue(e),
591
+ onClick: () => xe(e),
534
592
  children: e.getDate()
535
593
  }, e.toISOString());
536
594
  })
537
595
  })
538
- ] }), ce && /* @__PURE__ */ n("label", {
596
+ ] }), ye && /* @__PURE__ */ n("label", {
539
597
  className: N.timeLabel,
540
598
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
541
599
  className: N.timeInput,
542
600
  type: "time",
543
- value: q,
544
- onChange: (e) => de(e.target.value)
601
+ value: ue,
602
+ onChange: (e) => we(e.target.value)
545
603
  })]
546
604
  })]
547
605
  }) : null;
@@ -555,7 +613,59 @@ var E = {
555
613
  disabled: v,
556
614
  children: o
557
615
  }),
558
- /* @__PURE__ */ n("button", {
616
+ Z ? /* @__PURE__ */ n("div", {
617
+ className: `${N.trigger} ${N[C]} ${_ ? N.error : ""} ${v ? N.disabled : ""}`,
618
+ children: [
619
+ /* @__PURE__ */ t("input", {
620
+ ref: I,
621
+ id: O,
622
+ name: w,
623
+ className: N.dateInput,
624
+ value: Y,
625
+ placeholder: Te.split(" ")[0],
626
+ inputMode: "numeric",
627
+ autoComplete: "off",
628
+ maxLength: 10,
629
+ disabled: v,
630
+ readOnly: y,
631
+ "aria-expanded": K,
632
+ "aria-haspopup": "dialog",
633
+ "aria-describedby": De,
634
+ "aria-invalid": !!(_ || fe) || void 0,
635
+ onFocus: () => {
636
+ y || q(!0);
637
+ },
638
+ onClick: () => {
639
+ y || q(!0);
640
+ },
641
+ onChange: (e) => Ce(e.target.value)
642
+ }),
643
+ a === "datetime" && ue && /* @__PURE__ */ t("span", {
644
+ className: N.timeValue,
645
+ children: ue
646
+ }),
647
+ /* @__PURE__ */ t("button", {
648
+ type: "button",
649
+ className: N.chevronButton,
650
+ disabled: v || y,
651
+ "aria-label": K ? "Закрыть календарь" : "Открыть календарь",
652
+ tabIndex: -1,
653
+ onMouseDown: (e) => e.preventDefault(),
654
+ onClick: () => {
655
+ q((e) => !e), I.current?.focus();
656
+ },
657
+ children: /* @__PURE__ */ t("span", {
658
+ className: `${N.chevron} ${Oe ? N.chevronOpen : ""}`,
659
+ "aria-hidden": "true",
660
+ children: /* @__PURE__ */ t(A, {
661
+ name: "IconChevron",
662
+ width: 20,
663
+ height: 20
664
+ })
665
+ })
666
+ })
667
+ ]
668
+ }) : /* @__PURE__ */ n("button", {
559
669
  ref: I,
560
670
  id: O,
561
671
  name: w,
@@ -563,17 +673,17 @@ var E = {
563
673
  className: `${N.trigger} ${N[C]} ${_ ? N.error : ""}`,
564
674
  disabled: v,
565
675
  "aria-readonly": y || void 0,
566
- "aria-expanded": W,
676
+ "aria-expanded": K,
567
677
  "aria-haspopup": "dialog",
568
- "aria-describedby": X,
678
+ "aria-describedby": De,
569
679
  onClick: () => {
570
- y || G((e) => !e);
680
+ y || q((e) => !e);
571
681
  },
572
682
  children: [/* @__PURE__ */ t("span", {
573
683
  className: r ? N.value : N.placeholder,
574
- children: B(r, a) || fe
684
+ children: re(r, a) || Te
575
685
  }), /* @__PURE__ */ t("span", {
576
- className: [N.chevron, pe ? N.chevronOpen : ""].filter(Boolean).join(" "),
686
+ className: `${N.chevron} ${Oe ? N.chevronOpen : ""}`,
577
687
  "aria-hidden": "true",
578
688
  children: /* @__PURE__ */ t(A, {
579
689
  name: "IconChevron",
@@ -582,7 +692,14 @@ var E = {
582
692
  })
583
693
  })]
584
694
  }),
585
- pe && h(pe, document.body),
695
+ fe && /* @__PURE__ */ t("span", {
696
+ id: Ee,
697
+ className: N.validationTooltip,
698
+ role: "status",
699
+ "aria-live": "polite",
700
+ children: fe
701
+ }, me),
702
+ Oe && h(Oe, document.body),
586
703
  g && !_ && /* @__PURE__ */ t(D, {
587
704
  id: k,
588
705
  children: g
@@ -594,19 +711,19 @@ var E = {
594
711
  })
595
712
  ]
596
713
  });
597
- }, G = {
714
+ }, q = {
598
715
  root: "_root_q0cvp_1",
599
716
  range: "_range_q0cvp_3"
600
- }, K = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), ie = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
717
+ }, J = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), le = ({ value: e, onChange: r, onDraftChange: i, mode: a = "date", fromLabel: o = "От", toLabel: s = "До", hint: c, error: l, min: u, max: d, disabled: f = !1, readOnly: p = !1, required: m = !1, className: h = "" }) => {
601
718
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
602
- i?.(e), K(e) && r?.(e);
719
+ i?.(e), J(e) && r?.(e);
603
720
  };
604
721
  return /* @__PURE__ */ n("fieldset", {
605
- className: `${G.root} ${h}`,
722
+ className: `${q.root} ${h}`,
606
723
  disabled: f,
607
724
  children: [/* @__PURE__ */ n("div", {
608
- className: G.range,
609
- children: [/* @__PURE__ */ t(W, {
725
+ className: q.range,
726
+ children: [/* @__PURE__ */ t(K, {
610
727
  value: e.from,
611
728
  mode: a === "datetime" ? "datetime" : a,
612
729
  label: o,
@@ -620,7 +737,7 @@ var E = {
620
737
  ...e,
621
738
  from: t
622
739
  })
623
- }), /* @__PURE__ */ t(W, {
740
+ }), /* @__PURE__ */ t(K, {
624
741
  value: e.to,
625
742
  mode: a === "datetime" ? "datetime" : a,
626
743
  label: s,
@@ -637,7 +754,7 @@ var E = {
637
754
  })]
638
755
  }), c && !g && /* @__PURE__ */ t(D, { children: c })]
639
756
  });
640
- }, q = {
757
+ }, ue = {
641
758
  group: "_group_1fs9e_1",
642
759
  skeleton: "_skeleton_1fs9e_3",
643
760
  text: "_text_1fs9e_5",
@@ -645,53 +762,53 @@ var E = {
645
762
  circular: "_circular_1fs9e_9",
646
763
  animated: "_animated_1fs9e_11",
647
764
  "ds-skeleton": "_ds-skeleton_1fs9e_1"
648
- }, ae = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
649
- className: `${q.group} ${o}`,
765
+ }, de = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
766
+ className: `${ue.group} ${o}`,
650
767
  "aria-hidden": "true",
651
768
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
652
- className: `${q.skeleton} ${q[e]} ${a ? q.animated : ""}`,
769
+ className: `${ue.skeleton} ${ue[e]} ${a ? ue.animated : ""}`,
653
770
  style: {
654
771
  width: s === i - 1 && i > 1 ? "70%" : n,
655
772
  height: r
656
773
  }
657
774
  }, s))
658
- }), J = {
659
- wrapper: "_wrapper_18tox_1",
660
- container: "_container_18tox_17",
661
- trigger: "_trigger_18tox_25",
662
- disabledText: "_disabledText_18tox_27",
663
- sm: "_sm_18tox_49",
664
- md: "_md_18tox_58",
665
- lg: "_lg_18tox_69",
666
- value: "_value_18tox_126",
667
- placeholder: "_placeholder_18tox_128",
668
- chevron: "_chevron_18tox_184",
669
- chevronOpen: "_chevronOpen_18tox_209",
670
- menu: "_menu_18tox_217",
671
- option: "_option_18tox_244",
672
- selected: "_selected_18tox_310",
673
- message: "_message_18tox_329",
674
- error: "_error_18tox_331",
675
- errorState: "_errorState_18tox_357"
676
- }, Y = 8, oe = 6, se = 120, ce = (e, t, n) => {
775
+ }), Y = {
776
+ wrapper: "_wrapper_c47na_1",
777
+ container: "_container_c47na_17",
778
+ trigger: "_trigger_c47na_25",
779
+ disabledText: "_disabledText_c47na_27",
780
+ sm: "_sm_c47na_53",
781
+ md: "_md_c47na_67",
782
+ lg: "_lg_c47na_81",
783
+ value: "_value_c47na_147",
784
+ placeholder: "_placeholder_c47na_149",
785
+ chevron: "_chevron_c47na_205",
786
+ chevronOpen: "_chevronOpen_c47na_231",
787
+ menu: "_menu_c47na_239",
788
+ option: "_option_c47na_269",
789
+ selected: "_selected_c47na_339",
790
+ message: "_message_c47na_359",
791
+ error: "_error_c47na_361",
792
+ errorState: "_errorState_c47na_387"
793
+ }, X = 8, fe = 6, pe = 120, me = (e, t, n) => {
677
794
  if (!e.length) return -1;
678
795
  for (let r = 0; r < e.length; r += 1) {
679
796
  let i = (t + r * n + e.length) % e.length;
680
797
  if (!e[i]?.disabled) return i;
681
798
  }
682
799
  return -1;
683
- }, le = (e) => {
800
+ }, he = (e) => {
684
801
  if (typeof e == "number") return e;
685
802
  if (typeof e == "string") {
686
803
  let t = Number.parseFloat(e);
687
804
  if (Number.isFinite(t)) return t;
688
805
  }
689
806
  return Infinity;
690
- }, ue = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: c = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: ee = !0, maxMenuHeight: w }) => {
691
- let T = u(), E = C ?? `ds-dropdown-${S ?? T}`, D = `${E}-listbox`, [O, k] = m(!1), [j, M] = m(null), N = p(null), P = p(null), F = p(null), I = p([]), L = f(() => e.find((e) => e.value === r), [e, r]), R = y ? `${E}-hint` : void 0, z = _ ? `${E}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, ne = o && c, V = s(() => {
807
+ }, ge = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: o = !1, stringWhileDisabled: c = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: ee = !0, maxMenuHeight: w }) => {
808
+ let T = u(), E = C ?? `ds-dropdown-${S ?? T}`, D = `${E}-listbox`, [O, k] = m(!1), [j, M] = m(null), N = p(null), P = p(null), F = p(null), I = p([]), L = f(() => e.find((e) => e.value === r), [e, r]), R = y ? `${E}-hint` : void 0, z = _ ? `${E}-error` : void 0, B = [R, z].filter(Boolean).join(" ") || void 0, V = o && c, H = s(() => {
692
809
  let e = P.current, t = F.current;
693
810
  if (!e || !t) return;
694
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Y, o = n.top - Y, s = a < r.height && o > a, c = Math.max(se, s ? o : a), l = le(w), u = Math.min(c, l), d = n.left, f = i - n.width - Y, p = Math.max(Y, Math.min(d, f)), m = s ? Math.max(Y, n.top - r.height - oe) : n.bottom + oe;
811
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - X, o = n.top - X, s = a < r.height && o > a, c = Math.max(pe, s ? o : a), l = he(w), u = Math.min(c, l), d = n.left, f = i - n.width - X, p = Math.max(X, Math.min(d, f)), m = s ? Math.max(X, n.top - r.height - fe) : n.bottom + fe;
695
812
  M({
696
813
  top: m,
697
814
  left: p,
@@ -704,12 +821,12 @@ var E = {
704
821
  M(null);
705
822
  return;
706
823
  }
707
- return V(), window.addEventListener("resize", V), window.addEventListener("scroll", V, !0), () => {
708
- window.removeEventListener("resize", V), window.removeEventListener("scroll", V, !0);
824
+ return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
825
+ window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
709
826
  };
710
827
  }, [
711
828
  O,
712
- V,
829
+ H,
713
830
  e.length
714
831
  ]), l(() => {
715
832
  if (!O) return;
@@ -723,17 +840,17 @@ var E = {
723
840
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
724
841
  };
725
842
  }, [O]);
726
- let H = (t, n) => {
727
- let r = ce(e, t, n);
843
+ let U = (t, n) => {
844
+ let r = me(e, t, n);
728
845
  if (r === -1) return;
729
846
  let i = I.current[r];
730
847
  i?.focus(), i?.scrollIntoView({ block: "nearest" });
731
- }, U = (e) => {
848
+ }, W = (e) => {
732
849
  e.disabled || (i?.(e.value, e), k(!1), P.current?.focus());
733
- }, re = O ? /* @__PURE__ */ t("ul", {
850
+ }, G = O ? /* @__PURE__ */ t("ul", {
734
851
  ref: F,
735
852
  id: D,
736
- className: J.menu,
853
+ className: Y.menu,
737
854
  role: "listbox",
738
855
  "aria-label": g,
739
856
  style: j ? {
@@ -762,23 +879,23 @@ var E = {
762
879
  "aria-selected": o,
763
880
  disabled: i.disabled,
764
881
  className: [
765
- J[v],
766
- J.option,
767
- o ? J.selected : ""
882
+ Y[v],
883
+ Y.option,
884
+ o ? Y.selected : ""
768
885
  ].filter(Boolean).join(" "),
769
- onClick: () => U(i),
886
+ onClick: () => W(i),
770
887
  onKeyDown: (t) => {
771
888
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
772
889
  t.preventDefault();
773
890
  let e = t.key === "ArrowDown" ? 1 : -1;
774
- H(a + e, e);
891
+ U(a + e, e);
775
892
  }
776
893
  if (t.key === "Tab" && k(!1), t.key === "Home" || t.key === "End") {
777
894
  t.preventDefault();
778
895
  let n = t.key === "Home" ? 1 : -1;
779
- H(t.key === "Home" ? 0 : e.length - 1, n);
896
+ U(t.key === "Home" ? 0 : e.length - 1, n);
780
897
  }
781
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), U(i));
898
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
782
899
  },
783
900
  children: [/* @__PURE__ */ t("span", { children: i.label }), o && ee && /* @__PURE__ */ t(A, {
784
901
  name: "IconCheck",
@@ -792,22 +909,22 @@ var E = {
792
909
  return /* @__PURE__ */ n("div", {
793
910
  ref: N,
794
911
  className: [
795
- J.wrapper,
796
- _ ? J.errorState : "",
912
+ Y.wrapper,
913
+ _ ? Y.errorState : "",
797
914
  b
798
915
  ].filter(Boolean).join(" "),
799
916
  children: [
800
917
  g && /* @__PURE__ */ t(te, {
801
918
  required: x,
802
919
  disabled: o,
803
- htmlFor: ne ? void 0 : E,
920
+ htmlFor: V ? void 0 : E,
804
921
  children: g
805
922
  }),
806
923
  /* @__PURE__ */ t("div", {
807
- className: J.container,
808
- children: ne ? /* @__PURE__ */ t("div", {
924
+ className: Y.container,
925
+ children: V ? /* @__PURE__ */ t("div", {
809
926
  id: E,
810
- className: J.disabledText,
927
+ className: Y.disabledText,
811
928
  "aria-describedby": B,
812
929
  children: L?.label ?? a
813
930
  }) : /* @__PURE__ */ n("button", {
@@ -815,7 +932,7 @@ var E = {
815
932
  id: E,
816
933
  type: "button",
817
934
  name: S,
818
- className: `${J.trigger} ${J[v]}`,
935
+ className: `${Y.trigger} ${Y[v]}`,
819
936
  disabled: o,
820
937
  "aria-haspopup": "listbox",
821
938
  "aria-expanded": O,
@@ -828,21 +945,21 @@ var E = {
828
945
  t.preventDefault(), k(!0);
829
946
  let n = t.key === "ArrowDown" ? 1 : -1;
830
947
  requestAnimationFrame(() => {
831
- H(t.key === "ArrowDown" ? 0 : e.length - 1, n);
948
+ U(t.key === "ArrowDown" ? 0 : e.length - 1, n);
832
949
  });
833
950
  }
834
951
  if (t.key === "Enter" && O) {
835
952
  t.preventDefault();
836
953
  let n = e.findIndex((e) => e.value === r);
837
- H(n >= 0 ? n : 0, 1);
954
+ U(n >= 0 ? n : 0, 1);
838
955
  }
839
956
  },
840
957
  children: [/* @__PURE__ */ t("span", {
841
- className: `${L ? J.value : J.placeholder}
842
- ${J[v]}`,
958
+ className: `${L ? Y.value : Y.placeholder}
959
+ ${Y[v]}`,
843
960
  children: L?.label ?? a
844
961
  }), /* @__PURE__ */ t("span", {
845
- className: [J.chevron, O ? J.chevronOpen : ""].filter(Boolean).join(" "),
962
+ className: [Y.chevron, O ? Y.chevronOpen : ""].filter(Boolean).join(" "),
846
963
  "aria-hidden": "true",
847
964
  children: /* @__PURE__ */ t(A, {
848
965
  name: "IconChevron",
@@ -852,38 +969,38 @@ var E = {
852
969
  })]
853
970
  })
854
971
  }),
855
- O && h(re, document.body),
972
+ O && h(G, document.body),
856
973
  y && !_ && /* @__PURE__ */ t("span", {
857
974
  id: R,
858
- className: J.message,
975
+ className: Y.message,
859
976
  children: y
860
977
  }),
861
978
  _ && /* @__PURE__ */ t("span", {
862
979
  id: z,
863
- className: J.error,
980
+ className: Y.error,
864
981
  children: _
865
982
  })
866
983
  ]
867
984
  });
868
- }, de = (e) => `${e.id}:${e.direction}`, fe = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
985
+ }, _e = (e) => `${e.id}:${e.direction}`, ve = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
869
986
  let c = e.flatMap((e) => [{
870
- value: de({
987
+ value: _e({
871
988
  id: e.id,
872
989
  direction: "asc"
873
990
  }),
874
991
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
875
992
  disabled: e.disabled
876
993
  }, {
877
- value: de({
994
+ value: _e({
878
995
  id: e.id,
879
996
  direction: "desc"
880
997
  }),
881
998
  label: e.descLabel ?? `${e.label} · по убыванию`,
882
999
  disabled: e.disabled
883
1000
  }]);
884
- return /* @__PURE__ */ t(ue, {
1001
+ return /* @__PURE__ */ t(ge, {
885
1002
  options: c,
886
- value: n ? de(n) : "",
1003
+ value: n ? _e(n) : "",
887
1004
  label: i,
888
1005
  placeholder: a,
889
1006
  disabled: o,
@@ -896,33 +1013,39 @@ var E = {
896
1013
  });
897
1014
  }
898
1015
  });
899
- }, X = {
900
- root: "_root_osyhx_1",
901
- tableWrap: "_tableWrap_osyhx_3",
902
- table: "_table_osyhx_3",
903
- sticky: "_sticky_osyhx_15",
904
- sortButton: "_sortButton_osyhx_17",
905
- state: "_state_osyhx_21",
906
- cards: "_cards_osyhx_23",
907
- mobileSort: "_mobileSort_osyhx_23",
908
- card: "_card_osyhx_23",
909
- spanTwo: "_spanTwo_osyhx_37",
910
- clickableRow: "_clickableRow_osyhx_39",
911
- pagination: "_pagination_osyhx_43",
912
- paginationRange: "_paginationRange_osyhx_56",
913
- paginationControls: "_paginationControls_osyhx_62",
914
- pageNumbers: "_pageNumbers_osyhx_63",
915
- pageButton: "_pageButton_osyhx_69",
916
- ellipsis: "_ellipsis_osyhx_74",
917
- previousIcon: "_previousIcon_osyhx_80",
918
- nextIcon: "_nextIcon_osyhx_84",
919
- default: "_default_osyhx_104",
920
- tableOnMobile: "_tableOnMobile_osyhx_104",
921
- wide: "_wide_osyhx_108"
922
- }, pe = v({
1016
+ }, Z = {
1017
+ root: "_root_l2civ_1",
1018
+ tableWrap: "_tableWrap_l2civ_3",
1019
+ table: "_table_l2civ_3",
1020
+ sticky: "_sticky_l2civ_15",
1021
+ sortButton: "_sortButton_l2civ_17",
1022
+ state: "_state_l2civ_21",
1023
+ cards: "_cards_l2civ_23",
1024
+ mobileSort: "_mobileSort_l2civ_23",
1025
+ card: "_card_l2civ_23",
1026
+ spanTwo: "_spanTwo_l2civ_37",
1027
+ clickableRow: "_clickableRow_l2civ_41",
1028
+ pagination: "_pagination_l2civ_49",
1029
+ paginationRange: "_paginationRange_l2civ_75",
1030
+ paginationControls: "_paginationControls_l2civ_87",
1031
+ pageNumbers: "_pageNumbers_l2civ_89",
1032
+ pageButton: "_pageButton_l2civ_101",
1033
+ ellipsis: "_ellipsis_l2civ_111",
1034
+ previousIcon: "_previousIcon_l2civ_123",
1035
+ nextIcon: "_nextIcon_l2civ_131",
1036
+ default: "_default_l2civ_169",
1037
+ tableOnMobile: "_tableOnMobile_l2civ_169",
1038
+ wide: "_wide_l2civ_173"
1039
+ }, ye = v({
923
1040
  rowSortingFeature: _,
924
1041
  sortedRowModel: g()
925
- }), me = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
1042
+ }), be = (e) => {
1043
+ if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
1044
+ width: e.width,
1045
+ minWidth: e.minWidth,
1046
+ maxWidth: e.maxWidth
1047
+ };
1048
+ }, xe = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
926
1049
  0,
927
1050
  1,
928
1051
  2,
@@ -946,7 +1069,7 @@ var E = {
946
1069
  e + 1,
947
1070
  "ellipsis-end",
948
1071
  t - 1
949
- ], he = (e, t) => {
1072
+ ], Se = (e, t) => {
950
1073
  let n = /* @__PURE__ */ new Set();
951
1074
  for (let t of e) {
952
1075
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -958,36 +1081,36 @@ var E = {
958
1081
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
959
1082
  }
960
1083
  return null;
961
- }, ge = (e, t) => typeof e == "function" ? e(t) : t[e], _e = (e) => {
1084
+ }, Ce = (e, t) => typeof e == "function" ? e(t) : t[e], we = (e) => {
962
1085
  if (e == null || e === "") return null;
963
1086
  let t = Date.parse(String(e));
964
1087
  return Number.isNaN(t) ? null : t;
965
- }, ve = (e, t, n) => {
966
- let r = _e(e.getValue(n)), i = _e(t.getValue(n));
1088
+ }, Te = (e, t, n) => {
1089
+ let r = we(e.getValue(n)), i = we(t.getValue(n));
967
1090
  return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
968
- }, ye = (e, t, n) => {
1091
+ }, Ee = (e, t, n) => {
969
1092
  let r = e.getValue(n), i = t.getValue(n);
970
1093
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
971
- }, be = (e, t, n) => {
1094
+ }, De = (e, t, n) => {
972
1095
  let r = e.getValue(n), i = t.getValue(n);
973
1096
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
974
- }, xe = (e, t, n) => {
1097
+ }, Oe = (e, t, n) => {
975
1098
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
976
1099
  return r.localeCompare(i, void 0, {
977
1100
  numeric: !0,
978
1101
  sensitivity: "base"
979
1102
  });
980
- }, Se = (e) => {
1103
+ }, ke = (e) => {
981
1104
  switch (e) {
982
- case "date": return ve;
983
- case "number": return ye;
984
- case "boolean": return be;
1105
+ case "date": return Te;
1106
+ case "number": return Ee;
1107
+ case "boolean": return De;
985
1108
  case "text":
986
- case void 0: return xe;
1109
+ case void 0: return Oe;
987
1110
  case "custom": return;
988
1111
  }
989
- }, Ce = (e) => {
990
- let t = (t) => ge(e.accessor, t), n = e.sortFn ?? Se(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
1112
+ }, Ae = (e) => {
1113
+ let t = (t) => Ce(e.accessor, t), n = e.sortFn ?? ke(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
991
1114
  id: e.id,
992
1115
  accessorFn: t,
993
1116
  header: () => e.header,
@@ -999,13 +1122,13 @@ var E = {
999
1122
  sortDescFirst: e.sortDescFirst
1000
1123
  };
1001
1124
  return n !== void 0 && (i.sortFn = n), i;
1002
- }, we = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: d, ariaLabel: p, loading: h = !1, error: g, emptyState: _ = "Нет данных", stickyHeader: v = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: ee = 30, visibleColumnIds: w }) => {
1125
+ }, je = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: d, ariaLabel: p, loading: h = !1, error: g, emptyState: _ = "Нет данных", stickyHeader: v = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: ee = 30, visibleColumnIds: w }) => {
1003
1126
  let [E, te] = m([]), [D, O] = m(0), k = o ?? E, j = k.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), M = Number.isFinite(ee) && ee > 0 ? Math.floor(ee) : 30, N = f(() => {
1004
1127
  if (w === void 0) return e;
1005
1128
  let t = new Set(w);
1006
1129
  return e.filter((e) => t.has(e.id));
1007
- }, [e, w]), P = f(() => N.length === 0 ? "Должна быть видима хотя бы одна колонка" : he(N, r), [r, N]), F = f(() => N.map(Ce), [N]), I = y({
1008
- features: pe,
1130
+ }, [e, w]), P = f(() => N.length === 0 ? "Должна быть видима хотя бы одна колонка" : Se(N, r), [r, N]), F = f(() => N.map(Ae), [N]), I = N.some((e) => be(e) !== void 0), L = y({
1131
+ features: ye,
1009
1132
  columns: F,
1010
1133
  data: r,
1011
1134
  state: { sorting: k },
@@ -1014,20 +1137,20 @@ var E = {
1014
1137
  o === void 0 && te(t), O(0), s?.(t);
1015
1138
  },
1016
1139
  getRowId: u
1017
- }), L = I.getRowModel().rows, R = C ? Math.max(1, Math.ceil(L.length / M)) : 1, z = Math.min(D, R - 1), B = f(() => C ? L.slice(z * M, (z + 1) * M) : L, [
1140
+ }), R = L.getRowModel().rows, z = C ? Math.max(1, Math.ceil(R.length / M)) : 1, B = Math.min(D, z - 1), V = f(() => C ? R.slice(B * M, (B + 1) * M) : R, [
1018
1141
  M,
1019
1142
  C,
1020
- z,
1021
- L
1022
- ]), ne = f(() => N.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
1143
+ B,
1144
+ R
1145
+ ]), H = f(() => N.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
1023
1146
  id: e.id,
1024
1147
  label: typeof e.header == "string" ? e.header : e.id
1025
- })), [N]), V = f(() => me(z, R), [R, z]), H = [
1026
- X.root,
1027
- a === "wide" ? X.wide : X.default,
1028
- i ? X.tableOnMobile : "",
1148
+ })), [N]), U = f(() => xe(B, z), [z, B]), W = [
1149
+ Z.root,
1150
+ a === "wide" ? Z.wide : Z.default,
1151
+ i ? Z.tableOnMobile : "",
1029
1152
  x
1030
- ].filter(Boolean).join(" "), U = P ?? g, re = C && !h && !U && L.length > M, W = z * M + 1, G = Math.min((z + 1) * M, L.length);
1153
+ ].filter(Boolean).join(" "), G = P ?? g, ne = C && !h && !G && R.length > M, re = B * M + 1, ie = Math.min((B + 1) * M, R.length);
1031
1154
  return l(() => {
1032
1155
  O(0);
1033
1156
  }, [
@@ -1036,44 +1159,46 @@ var E = {
1036
1159
  C,
1037
1160
  j
1038
1161
  ]), l(() => {
1039
- D >= R && O(R - 1);
1040
- }, [R, D]), /* @__PURE__ */ n("section", {
1041
- className: H,
1162
+ D >= z && O(z - 1);
1163
+ }, [z, D]), /* @__PURE__ */ n("section", {
1164
+ className: W,
1042
1165
  "aria-busy": h,
1043
1166
  children: [
1044
- !i && !h && !U && B.length > 0 && ne.length > 0 && /* @__PURE__ */ t(fe, {
1045
- className: X.mobileSort,
1046
- options: ne,
1167
+ !i && !h && !G && V.length > 0 && H.length > 0 && /* @__PURE__ */ t(ve, {
1168
+ className: Z.mobileSort,
1169
+ options: H,
1047
1170
  value: k[0] ? {
1048
1171
  id: k[0].id,
1049
1172
  direction: k[0].desc ? "desc" : "asc"
1050
1173
  } : null,
1051
- onChange: (e) => I.setSorting([{
1174
+ onChange: (e) => L.setSorting([{
1052
1175
  id: e.id,
1053
1176
  desc: e.direction === "desc"
1054
1177
  }])
1055
1178
  }),
1056
1179
  /* @__PURE__ */ t("div", {
1057
- className: X.tableWrap,
1180
+ className: Z.tableWrap,
1058
1181
  style: { maxHeight: b },
1059
1182
  children: /* @__PURE__ */ n("table", {
1060
- className: X.table,
1183
+ className: Z.table,
1061
1184
  "aria-label": p,
1062
1185
  children: [
1063
1186
  d && /* @__PURE__ */ t("caption", { children: d }),
1187
+ I && /* @__PURE__ */ t("colgroup", { children: N.map((e) => /* @__PURE__ */ t("col", { style: be(e) }, e.id)) }),
1064
1188
  /* @__PURE__ */ t("thead", {
1065
- className: v ? X.sticky : "",
1066
- children: I.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
1189
+ className: v ? Z.sticky : "",
1190
+ children: L.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
1067
1191
  let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
1068
1192
  return /* @__PURE__ */ t("th", {
1069
1193
  scope: "col",
1070
1194
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
1195
+ style: be(N.find((t) => t.id === e.column.id)),
1071
1196
  children: /* @__PURE__ */ n("button", {
1072
1197
  type: "button",
1073
- className: X.sortButton,
1198
+ className: Z.sortButton,
1074
1199
  disabled: !i,
1075
1200
  onClick: a,
1076
- children: [/* @__PURE__ */ t(I.FlexRender, { header: e }), /* @__PURE__ */ t(A, {
1201
+ children: [/* @__PURE__ */ t(L.FlexRender, { header: e }), /* @__PURE__ */ t(A, {
1077
1202
  name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
1078
1203
  width: 16,
1079
1204
  height: 16
@@ -1084,39 +1209,42 @@ var E = {
1084
1209
  }),
1085
1210
  /* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1086
1211
  colSpan: N.length,
1087
- children: /* @__PURE__ */ t(ae, { lines: 3 })
1088
- }) }) : U ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1089
- className: X.state,
1212
+ children: /* @__PURE__ */ t(de, { lines: 3 })
1213
+ }) }) : G ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1214
+ className: Z.state,
1090
1215
  colSpan: N.length,
1091
- children: U
1092
- }) }) : B.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1093
- className: X.state,
1216
+ children: G
1217
+ }) }) : V.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
1218
+ className: Z.state,
1094
1219
  colSpan: N.length,
1095
1220
  children: _
1096
- }) }) : B.map((e) => /* @__PURE__ */ t("tr", {
1097
- className: S ? X.clickableRow : void 0,
1221
+ }) }) : V.map((e) => /* @__PURE__ */ t("tr", {
1222
+ className: S ? Z.clickableRow : void 0,
1098
1223
  onClick: () => S?.(e.original),
1099
1224
  onKeyDown: (t) => {
1100
1225
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), S?.(e.original));
1101
1226
  },
1102
1227
  tabIndex: S ? 0 : void 0,
1103
1228
  role: S ? "button" : void 0,
1104
- children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(I.FlexRender, { cell: e }) }, e.id))
1229
+ children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
1230
+ style: be(N.find((t) => t.id === e.column.id)),
1231
+ children: /* @__PURE__ */ t(L.FlexRender, { cell: e })
1232
+ }, e.id))
1105
1233
  }, e.id)) })
1106
1234
  ]
1107
1235
  })
1108
1236
  }),
1109
1237
  !i && /* @__PURE__ */ t("div", {
1110
- className: X.cards,
1238
+ className: Z.cards,
1111
1239
  role: "list",
1112
1240
  "aria-label": p ?? d,
1113
- children: h ? /* @__PURE__ */ t(ae, { lines: 4 }) : U ? /* @__PURE__ */ t("div", {
1114
- className: X.state,
1115
- children: U
1116
- }) : B.length === 0 ? /* @__PURE__ */ t("div", {
1117
- className: X.state,
1241
+ children: h ? /* @__PURE__ */ t(de, { lines: 4 }) : G ? /* @__PURE__ */ t("div", {
1242
+ className: Z.state,
1243
+ children: G
1244
+ }) : V.length === 0 ? /* @__PURE__ */ t("div", {
1245
+ className: Z.state,
1118
1246
  children: _
1119
- }) : B.map((e) => {
1247
+ }) : V.map((e) => {
1120
1248
  if (c) return /* @__PURE__ */ t("div", {
1121
1249
  role: "listitem",
1122
1250
  children: c({
@@ -1124,14 +1252,14 @@ var E = {
1124
1252
  columns: N
1125
1253
  })
1126
1254
  }, e.id);
1127
- let r = N.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => ge(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
1255
+ let r = N.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => Ce(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
1128
1256
  return /* @__PURE__ */ n("article", {
1129
1257
  role: "listitem",
1130
- className: X.card,
1258
+ className: Z.card,
1131
1259
  children: [
1132
1260
  /* @__PURE__ */ t("h3", { children: i ? o(i) : `Строка ${e.index + 1}` }),
1133
1261
  /* @__PURE__ */ t("dl", { children: r.filter((e) => e !== i && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
1134
- className: e.mobile?.mobileSpan === 2 ? X.spanTwo : "",
1262
+ className: e.mobile?.mobileSpan === 2 ? Z.spanTwo : "",
1135
1263
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: o(e) })]
1136
1264
  }, e.id)) }),
1137
1265
  r.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: o(e) }, e.id))
@@ -1139,26 +1267,26 @@ var E = {
1139
1267
  }, e.id);
1140
1268
  })
1141
1269
  }),
1142
- re && /* @__PURE__ */ n("nav", {
1143
- className: X.pagination,
1270
+ ne && /* @__PURE__ */ n("nav", {
1271
+ className: Z.pagination,
1144
1272
  "aria-label": "Пагинация таблицы",
1145
1273
  children: [/* @__PURE__ */ n("span", {
1146
- className: X.paginationRange,
1274
+ className: Z.paginationRange,
1147
1275
  "aria-live": "polite",
1148
1276
  children: [
1149
- W,
1277
+ re,
1150
1278
  "–",
1151
- G,
1279
+ ie,
1152
1280
  " из ",
1153
- L.length
1281
+ R.length
1154
1282
  ]
1155
1283
  }), /* @__PURE__ */ n("div", {
1156
- className: X.paginationControls,
1284
+ className: Z.paginationControls,
1157
1285
  children: [
1158
1286
  /* @__PURE__ */ n(T, {
1159
1287
  variant: "empty",
1160
1288
  size: "md",
1161
- disabled: z === 0,
1289
+ disabled: B === 0,
1162
1290
  "aria-label": "Предыдущая страница",
1163
1291
  onClick: () => {
1164
1292
  O((e) => Math.max(0, e - 1));
@@ -1167,26 +1295,26 @@ var E = {
1167
1295
  name: "IconChevron",
1168
1296
  width: 18,
1169
1297
  height: 18,
1170
- className: X.previousIcon
1298
+ className: Z.previousIcon
1171
1299
  }), /* @__PURE__ */ t("span", {
1172
- className: X.paginationButtonLabel,
1300
+ className: Z.paginationButtonLabel,
1173
1301
  children: "Назад"
1174
1302
  })]
1175
1303
  }),
1176
1304
  /* @__PURE__ */ t("div", {
1177
- className: X.pageNumbers,
1178
- children: V.map((e) => typeof e == "number" ? /* @__PURE__ */ t(T, {
1179
- variant: e === z ? "secondary" : "empty",
1305
+ className: Z.pageNumbers,
1306
+ children: U.map((e) => typeof e == "number" ? /* @__PURE__ */ t(T, {
1307
+ variant: e === B ? "secondary" : "empty",
1180
1308
  size: "md",
1181
- className: X.pageButton,
1309
+ className: Z.pageButton,
1182
1310
  "aria-label": `Перейти на страницу ${e + 1}`,
1183
- "aria-current": e === z ? "page" : void 0,
1311
+ "aria-current": e === B ? "page" : void 0,
1184
1312
  onClick: () => {
1185
1313
  O(e);
1186
1314
  },
1187
1315
  children: e + 1
1188
1316
  }, e) : /* @__PURE__ */ t("span", {
1189
- className: X.ellipsis,
1317
+ className: Z.ellipsis,
1190
1318
  "aria-hidden": "true",
1191
1319
  children: "…"
1192
1320
  }, e))
@@ -1194,19 +1322,19 @@ var E = {
1194
1322
  /* @__PURE__ */ n(T, {
1195
1323
  variant: "empty",
1196
1324
  size: "md",
1197
- disabled: z === R - 1,
1325
+ disabled: B === z - 1,
1198
1326
  "aria-label": "Следующая страница",
1199
1327
  onClick: () => {
1200
- O((e) => Math.min(R - 1, e + 1));
1328
+ O((e) => Math.min(z - 1, e + 1));
1201
1329
  },
1202
1330
  children: [/* @__PURE__ */ t("span", {
1203
- className: X.paginationButtonLabel,
1331
+ className: Z.paginationButtonLabel,
1204
1332
  children: "Вперёд"
1205
1333
  }), /* @__PURE__ */ t(A, {
1206
1334
  name: "IconChevron",
1207
1335
  width: 18,
1208
1336
  height: 18,
1209
- className: X.nextIcon
1337
+ className: Z.nextIcon
1210
1338
  })]
1211
1339
  })
1212
1340
  ]
@@ -1214,23 +1342,23 @@ var E = {
1214
1342
  })
1215
1343
  ]
1216
1344
  });
1217
- }, Te = 8, Ee = 6, De = 120, Oe = (e) => {
1345
+ }, Me = 8, Ne = 6, Pe = 120, Fe = (e) => {
1218
1346
  if (typeof e == "number") return e;
1219
1347
  if (typeof e == "string") {
1220
1348
  let t = Number.parseFloat(e);
1221
1349
  if (Number.isFinite(t)) return t;
1222
1350
  }
1223
1351
  return Infinity;
1224
- }, ke = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: c = !1, label: g, error: _, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: ee = !1, needMark: w = !0, maxMenuHeight: T }) => {
1225
- let E = u(), D = C ?? `ds-dropdown-multiple-${S ?? E}`, O = `${D}-listbox`, [k, j] = m(!1), [M, N] = m(null), P = p(null), F = p(null), I = p(null), L = p([]), R = f(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${D}-hint` : void 0, B = _ ? `${D}-error` : void 0, ne = [z, B].filter(Boolean).join(" ") || void 0, V = o && c, H = s(() => {
1352
+ }, Ie = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, stringWhileDisabled: c = !1, label: g, error: _, size: v = "md", required: y = !1, hint: b, className: x = "", name: S, id: C, closeOnSelect: ee = !1, needMark: w = !0, maxMenuHeight: T }) => {
1353
+ let E = u(), D = C ?? `ds-dropdown-multiple-${S ?? E}`, O = `${D}-listbox`, [k, j] = m(!1), [M, N] = m(null), P = p(null), F = p(null), I = p(null), L = p([]), R = f(() => e.filter((e) => r.includes(e.value)), [e, r]).map((e) => e.label).join(", "), z = b ? `${D}-hint` : void 0, B = _ ? `${D}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, H = o && c, U = s(() => {
1226
1354
  let e = F.current, t = I.current;
1227
1355
  if (!e || !t) return;
1228
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - Te, a = n.top - Te, o = i < r.height && a > i, s = Math.max(De, o ? a : i), c = window.innerWidth - n.width - Te;
1356
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerHeight - n.bottom - Me, a = n.top - Me, o = i < r.height && a > i, s = Math.max(Pe, o ? a : i), c = window.innerWidth - n.width - Me;
1229
1357
  N({
1230
- top: o ? Math.max(Te, n.top - r.height - Ee) : n.bottom + Ee,
1231
- left: Math.max(Te, Math.min(n.left, c)),
1358
+ top: o ? Math.max(Me, n.top - r.height - Ne) : n.bottom + Ne,
1359
+ left: Math.max(Me, Math.min(n.left, c)),
1232
1360
  width: n.width,
1233
- maxHeight: Math.min(s, Oe(T))
1361
+ maxHeight: Math.min(s, Fe(T))
1234
1362
  });
1235
1363
  }, [T]);
1236
1364
  d(() => {
@@ -1238,13 +1366,13 @@ var E = {
1238
1366
  N(null);
1239
1367
  return;
1240
1368
  }
1241
- return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
1242
- window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
1369
+ return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
1370
+ window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
1243
1371
  };
1244
1372
  }, [
1245
1373
  k,
1246
1374
  e.length,
1247
- H
1375
+ U
1248
1376
  ]), l(() => {
1249
1377
  if (!k) return;
1250
1378
  let e = (e) => {
@@ -1257,17 +1385,17 @@ var E = {
1257
1385
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
1258
1386
  };
1259
1387
  }, [k]);
1260
- let U = (t, n) => {
1261
- let r = ce(e, t, n);
1388
+ let W = (t, n) => {
1389
+ let r = me(e, t, n);
1262
1390
  r !== -1 && (L.current[r]?.focus(), L.current[r]?.scrollIntoView({ block: "nearest" }));
1263
- }, re = (t) => {
1391
+ }, G = (t) => {
1264
1392
  if (t.disabled) return;
1265
1393
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
1266
1394
  i?.(n, e.filter((e) => n.includes(e.value))), ee && (j(!1), F.current?.focus());
1267
- }, W = k ? /* @__PURE__ */ t("ul", {
1395
+ }, ne = k ? /* @__PURE__ */ t("ul", {
1268
1396
  ref: I,
1269
1397
  id: O,
1270
- className: J.menu,
1398
+ className: Y.menu,
1271
1399
  role: "listbox",
1272
1400
  "aria-label": g,
1273
1401
  "aria-multiselectable": "true",
@@ -1297,23 +1425,23 @@ var E = {
1297
1425
  "aria-selected": o,
1298
1426
  disabled: i.disabled,
1299
1427
  className: [
1300
- J[v],
1301
- J.option,
1302
- o ? J.selected : ""
1428
+ Y[v],
1429
+ Y.option,
1430
+ o ? Y.selected : ""
1303
1431
  ].filter(Boolean).join(" "),
1304
- onClick: () => re(i),
1432
+ onClick: () => G(i),
1305
1433
  onKeyDown: (t) => {
1306
1434
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1307
1435
  t.preventDefault();
1308
1436
  let e = t.key === "ArrowDown" ? 1 : -1;
1309
- U(a + e, e);
1437
+ W(a + e, e);
1310
1438
  }
1311
1439
  if (t.key === "Home" || t.key === "End") {
1312
1440
  t.preventDefault();
1313
1441
  let n = t.key === "Home" ? 1 : -1;
1314
- U(t.key === "Home" ? 0 : e.length - 1, n);
1442
+ W(t.key === "Home" ? 0 : e.length - 1, n);
1315
1443
  }
1316
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), re(i)), t.key === "Tab" && j(!1);
1444
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), G(i)), t.key === "Tab" && j(!1);
1317
1445
  },
1318
1446
  children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t(A, {
1319
1447
  name: "IconCheck",
@@ -1327,49 +1455,49 @@ var E = {
1327
1455
  return /* @__PURE__ */ n("div", {
1328
1456
  ref: P,
1329
1457
  className: [
1330
- J.wrapper,
1331
- _ ? J.errorState : "",
1458
+ Y.wrapper,
1459
+ _ ? Y.errorState : "",
1332
1460
  x
1333
1461
  ].filter(Boolean).join(" "),
1334
1462
  children: [
1335
1463
  g && /* @__PURE__ */ t(te, {
1336
- htmlFor: V ? void 0 : D,
1464
+ htmlFor: H ? void 0 : D,
1337
1465
  required: y,
1338
1466
  disabled: o,
1339
1467
  children: g
1340
1468
  }),
1341
1469
  /* @__PURE__ */ t("div", {
1342
- className: J.container,
1343
- children: V ? /* @__PURE__ */ t("div", {
1470
+ className: Y.container,
1471
+ children: H ? /* @__PURE__ */ t("div", {
1344
1472
  id: D,
1345
- className: `${J.disabledText} ${J[v]}`,
1346
- "aria-describedby": ne,
1473
+ className: `${Y.disabledText} ${Y[v]}`,
1474
+ "aria-describedby": V,
1347
1475
  children: R || a
1348
1476
  }) : /* @__PURE__ */ n("button", {
1349
1477
  ref: F,
1350
1478
  id: D,
1351
1479
  type: "button",
1352
1480
  name: S,
1353
- className: `${J.trigger} ${J[v]}`,
1481
+ className: `${Y.trigger} ${Y[v]}`,
1354
1482
  disabled: o,
1355
1483
  "aria-haspopup": "listbox",
1356
1484
  "aria-expanded": k,
1357
1485
  "aria-controls": O,
1358
- "aria-describedby": ne,
1486
+ "aria-describedby": V,
1359
1487
  "aria-invalid": !!_,
1360
1488
  onClick: () => j((e) => !e),
1361
1489
  onKeyDown: (t) => {
1362
1490
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
1363
1491
  t.preventDefault(), j(!0);
1364
1492
  let n = t.key === "ArrowDown" ? 1 : -1;
1365
- requestAnimationFrame(() => U(t.key === "ArrowDown" ? 0 : e.length - 1, n));
1493
+ requestAnimationFrame(() => W(t.key === "ArrowDown" ? 0 : e.length - 1, n));
1366
1494
  }
1367
1495
  },
1368
1496
  children: [/* @__PURE__ */ t("span", {
1369
- className: `${R ? J.value : J.placeholder} ${J[v]}`,
1497
+ className: `${R ? Y.value : Y.placeholder} ${Y[v]}`,
1370
1498
  children: R || a
1371
1499
  }), /* @__PURE__ */ t("span", {
1372
- className: [J.chevron, k ? J.chevronOpen : ""].filter(Boolean).join(" "),
1500
+ className: [Y.chevron, k ? Y.chevronOpen : ""].filter(Boolean).join(" "),
1373
1501
  "aria-hidden": "true",
1374
1502
  children: /* @__PURE__ */ t(A, {
1375
1503
  name: "IconChevron",
@@ -1379,35 +1507,35 @@ var E = {
1379
1507
  })]
1380
1508
  })
1381
1509
  }),
1382
- k && h(W, document.body),
1510
+ k && h(ne, document.body),
1383
1511
  b && !_ && /* @__PURE__ */ t("span", {
1384
1512
  id: z,
1385
- className: J.message,
1513
+ className: Y.message,
1386
1514
  children: b
1387
1515
  }),
1388
1516
  _ && /* @__PURE__ */ t("span", {
1389
1517
  id: B,
1390
- className: J.error,
1518
+ className: Y.error,
1391
1519
  children: _
1392
1520
  })
1393
1521
  ]
1394
1522
  });
1395
- }, Ae = {
1396
- wrapper: "_wrapper_1i9vt_1",
1397
- control: "_control_1i9vt_3",
1398
- input: "_input_1i9vt_7",
1399
- disabledText: "_disabledText_1i9vt_7",
1400
- sm: "_sm_1i9vt_43",
1401
- md: "_md_1i9vt_54",
1402
- lg: "_lg_1i9vt_65",
1403
- inputError: "_inputError_1i9vt_75",
1404
- trailingAction: "_trailingAction_1i9vt_77"
1405
- }, je = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: d, error: f, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: ee = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...E }) => {
1523
+ }, Le = {
1524
+ wrapper: "_wrapper_nptih_1",
1525
+ control: "_control_nptih_3",
1526
+ input: "_input_nptih_7",
1527
+ disabledText: "_disabledText_nptih_7",
1528
+ sm: "_sm_nptih_51",
1529
+ md: "_md_nptih_67",
1530
+ lg: "_lg_nptih_83",
1531
+ inputError: "_inputError_nptih_99",
1532
+ trailingAction: "_trailingAction_nptih_101"
1533
+ }, Re = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: c = !1, label: d, error: f, hint: h, className: g = "", name: _, id: v, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: ee = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...E }) => {
1406
1534
  let O = u(), k = v ?? `ds-input-${_ ?? O}`, j = p(null), [M, N] = m(!1), P = h ? `${k}-hint` : void 0, F = f ? `${k}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = C ? M ? "text" : "password" : i;
1407
1535
  return l(() => {
1408
1536
  C || N(!1);
1409
1537
  }, [C]), /* @__PURE__ */ n("div", {
1410
- className: `${Ae.wrapper} ${g}`,
1538
+ className: `${Le.wrapper} ${g}`,
1411
1539
  children: [
1412
1540
  d && /* @__PURE__ */ t(te, {
1413
1541
  htmlFor: k,
@@ -1417,11 +1545,11 @@ var E = {
1417
1545
  }),
1418
1546
  o && c ? /* @__PURE__ */ t("div", {
1419
1547
  id: k,
1420
- className: Ae.disabledText,
1548
+ className: Le.disabledText,
1421
1549
  "aria-describedby": L,
1422
1550
  children: I || a
1423
1551
  }) : /* @__PURE__ */ n("div", {
1424
- className: Ae.control,
1552
+ className: Le.control,
1425
1553
  children: [
1426
1554
  /* @__PURE__ */ t("input", {
1427
1555
  ref: j,
@@ -1435,7 +1563,7 @@ var E = {
1435
1563
  required: x,
1436
1564
  "aria-invalid": !!f,
1437
1565
  "aria-describedby": L,
1438
- className: `${Ae.input} ${Ae[y]} ${f ? Ae.inputError : ""}`,
1566
+ className: `${Le.input} ${Le[y]} ${f ? Le.inputError : ""}`,
1439
1567
  onChange: (e) => {
1440
1568
  if (i === "number" && !C) {
1441
1569
  let t = e.target.value === "" ? "" : Number(e.target.value);
@@ -1451,7 +1579,7 @@ var E = {
1451
1579
  }),
1452
1580
  C && /* @__PURE__ */ t("button", {
1453
1581
  type: "button",
1454
- className: Ae.trailingAction,
1582
+ className: Le.trailingAction,
1455
1583
  disabled: o,
1456
1584
  "aria-label": M ? ee : w,
1457
1585
  "aria-pressed": M,
@@ -1464,7 +1592,7 @@ var E = {
1464
1592
  }),
1465
1593
  !C && b && I && !o && !s && /* @__PURE__ */ t("button", {
1466
1594
  type: "button",
1467
- className: Ae.trailingAction,
1595
+ className: Le.trailingAction,
1468
1596
  "aria-label": "Очистить поле",
1469
1597
  onClick: () => {
1470
1598
  let e = j.current;
@@ -1489,103 +1617,103 @@ var E = {
1489
1617
  })
1490
1618
  ]
1491
1619
  });
1492
- }, Me = (e, t) => {
1620
+ }, ze = (e, t) => {
1493
1621
  let n = t.trim().toLocaleLowerCase();
1494
1622
  return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
1495
- }, Ne = (e, t, n) => {
1623
+ }, Be = (e, t, n) => {
1496
1624
  if (!e.length) return -1;
1497
1625
  for (let r = 0; r < e.length; r += 1) {
1498
1626
  let i = (t + r * n + e.length) % e.length;
1499
1627
  if (!e[i]?.disabled) return i;
1500
1628
  }
1501
1629
  return -1;
1502
- }, Z = {
1503
- wrapper: "_wrapper_1mjm4_1",
1504
- control: "_control_1mjm4_3",
1505
- inputHost: "_inputHost_1mjm4_5",
1506
- sm: "_sm_1mjm4_13",
1507
- md: "_md_1mjm4_18",
1508
- lg: "_lg_1mjm4_22",
1509
- errorState: "_errorState_1mjm4_29",
1510
- disabledText: "_disabledText_1mjm4_33",
1511
- chevron: "_chevron_1mjm4_53",
1512
- chevronOpen: "_chevronOpen_1mjm4_65",
1513
- menu: "_menu_1mjm4_67",
1514
- option: "_option_1mjm4_81",
1515
- empty: "_empty_1mjm4_81",
1516
- selected: "_selected_1mjm4_103",
1517
- active: "_active_1mjm4_103",
1518
- visuallyHidden: "_visuallyHidden_1mjm4_109"
1519
- }, Pe = 8, Fe = 6, Ie = 5, Le = {
1630
+ }, Q = {
1631
+ wrapper: "_wrapper_13nh5_1",
1632
+ control: "_control_13nh5_5",
1633
+ inputHost: "_inputHost_13nh5_9",
1634
+ sm: "_sm_13nh5_25",
1635
+ md: "_md_13nh5_41",
1636
+ lg: "_lg_13nh5_55",
1637
+ errorState: "_errorState_13nh5_69",
1638
+ disabledText: "_disabledText_13nh5_77",
1639
+ chevron: "_chevron_13nh5_119",
1640
+ chevronOpen: "_chevronOpen_13nh5_143",
1641
+ menu: "_menu_13nh5_147",
1642
+ option: "_option_13nh5_175",
1643
+ empty: "_empty_13nh5_175",
1644
+ selected: "_selected_13nh5_219",
1645
+ active: "_active_13nh5_219",
1646
+ visuallyHidden: "_visuallyHidden_13nh5_231"
1647
+ }, Ve = 8, He = 6, Ue = 5, We = {
1520
1648
  sm: 20,
1521
1649
  md: 30,
1522
1650
  lg: 40
1523
- }, Re = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: c = !1, readOnly: g = !1, stringWhileDisabled: _ = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: ee, id: w, needMark: T = !0 }) => {
1651
+ }, Ge = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: c = !1, readOnly: g = !1, stringWhileDisabled: _ = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: ee, id: w, needMark: T = !0 }) => {
1524
1652
  let E = u(), O = w ?? `ds-search-dropdown-${ee ?? E}`, k = `${O}-listbox`, j = `${O}-status`, M = b ? `${O}-hint` : void 0, N = y ? `${O}-error` : void 0, P = [
1525
1653
  j,
1526
1654
  M,
1527
1655
  N
1528
- ].filter(Boolean).join(" "), F = p(null), I = p(null), L = p([]), [R, z] = m(!1), [B, ne] = m(""), [V, H] = m(-1), [U, re] = m(null), W = f(() => e.find((e) => e.value === r), [e, r]), G = f(() => Me(e, B), [e, B]), K = c && _, ie = V >= 0 ? G[V] : void 0;
1529
- l(() => ne(W?.label ?? ""), [W?.label, r]);
1530
- let q = s(() => F.current?.querySelector("input") ?? null, []), ae = s((e, t) => Ne(G, e, t), [G]), J = s((e) => {
1531
- H(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
1532
- }, []), Y = s(() => {
1533
- let e = q();
1656
+ ].filter(Boolean).join(" "), F = p(null), I = p(null), L = p([]), [R, z] = m(!1), [B, V] = m(""), [H, U] = m(-1), [W, G] = m(null), ne = f(() => e.find((e) => e.value === r), [e, r]), re = f(() => ze(e, B), [e, B]), ie = c && _, ae = H >= 0 ? re[H] : void 0;
1657
+ l(() => V(ne?.label ?? ""), [ne?.label, r]);
1658
+ let oe = s(() => F.current?.querySelector("input") ?? null, []), se = s((e, t) => Be(re, e, t), [re]), ce = s((e) => {
1659
+ U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
1660
+ }, []), K = s(() => {
1661
+ let e = oe();
1534
1662
  if (!e) return;
1535
- let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(G.length, Ie)) * Le[x] + 2, r = window.innerHeight - t.bottom - Pe, i = t.top - Pe, a = r < n && i > r, o = a ? i : r, s = Math.max(Le[x] + 2, Math.min(n, o)), c = window.innerWidth - t.width - Pe, l = Math.max(Pe, Math.min(t.left, c)), u = a ? Math.max(Pe, t.top - s - Fe) : t.bottom + Fe;
1536
- re({
1663
+ let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, Ue)) * We[x] + 2, r = window.innerHeight - t.bottom - Ve, i = t.top - Ve, a = r < n && i > r, o = a ? i : r, s = Math.max(We[x] + 2, Math.min(n, o)), c = window.innerWidth - t.width - Ve, l = Math.max(Ve, Math.min(t.left, c)), u = a ? Math.max(Ve, t.top - s - He) : t.bottom + He;
1664
+ G({
1537
1665
  top: u,
1538
1666
  left: l,
1539
1667
  width: t.width,
1540
1668
  maxHeight: s
1541
1669
  });
1542
1670
  }, [
1543
- G.length,
1544
- q,
1671
+ re.length,
1672
+ oe,
1545
1673
  x
1546
1674
  ]);
1547
1675
  d(() => {
1548
1676
  if (!R) {
1549
- re(null);
1677
+ G(null);
1550
1678
  return;
1551
1679
  }
1552
- return Y(), window.addEventListener("resize", Y), window.addEventListener("scroll", Y, !0), () => {
1553
- window.removeEventListener("resize", Y), window.removeEventListener("scroll", Y, !0);
1680
+ return K(), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), () => {
1681
+ window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
1554
1682
  };
1555
- }, [R, Y]), l(() => {
1683
+ }, [R, K]), l(() => {
1556
1684
  if (!R) return;
1557
1685
  let e = (e) => {
1558
1686
  let t = e.target;
1559
- !F.current?.contains(t) && !I.current?.contains(t) && (z(!1), H(-1));
1687
+ !F.current?.contains(t) && !I.current?.contains(t) && (z(!1), U(-1));
1560
1688
  };
1561
1689
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1562
1690
  }, [R]);
1563
- let oe = () => {
1564
- c || g || (z(!0), H(ae(0, 1)));
1565
- }, se = (e) => {
1566
- e.disabled || (ne(e.label), z(!1), H(-1), i?.(e.value, e), q()?.focus());
1567
- }, ce = R ? /* @__PURE__ */ t("ul", {
1691
+ let q = () => {
1692
+ c || g || (z(!0), U(se(0, 1)));
1693
+ }, J = (e) => {
1694
+ e.disabled || (V(e.label), z(!1), U(-1), i?.(e.value, e), oe()?.focus());
1695
+ }, le = R ? /* @__PURE__ */ t("ul", {
1568
1696
  ref: I,
1569
1697
  id: k,
1570
- className: Z.menu,
1698
+ className: Q.menu,
1571
1699
  role: "listbox",
1572
1700
  "aria-label": v,
1573
- style: U ? {
1574
- top: U.top,
1575
- left: U.left,
1576
- width: U.width,
1577
- maxHeight: U.maxHeight
1701
+ style: W ? {
1702
+ top: W.top,
1703
+ left: W.left,
1704
+ width: W.width,
1705
+ maxHeight: W.maxHeight
1578
1706
  } : {
1579
1707
  top: 0,
1580
1708
  left: 0,
1581
1709
  visibility: "hidden",
1582
1710
  maxHeight: 0
1583
1711
  },
1584
- children: G.length === 0 ? /* @__PURE__ */ t("li", {
1585
- className: `${Z.empty} ${Z[x]}`,
1712
+ children: re.length === 0 ? /* @__PURE__ */ t("li", {
1713
+ className: `${Q.empty} ${Q[x]}`,
1586
1714
  children: o
1587
- }) : G.map((e, i) => {
1588
- let a = e.value === r, o = i === V;
1715
+ }) : re.map((e, i) => {
1716
+ let a = e.value === r, o = i === H;
1589
1717
  return /* @__PURE__ */ t("li", {
1590
1718
  role: "presentation",
1591
1719
  children: /* @__PURE__ */ n("button", {
@@ -1600,15 +1728,15 @@ var E = {
1600
1728
  "aria-disabled": e.disabled,
1601
1729
  "aria-selected": a,
1602
1730
  className: [
1603
- Z.option,
1604
- Z[x],
1605
- a ? Z.selected : "",
1606
- o ? Z.active : ""
1731
+ Q.option,
1732
+ Q[x],
1733
+ a ? Q.selected : "",
1734
+ o ? Q.active : ""
1607
1735
  ].filter(Boolean).join(" "),
1608
1736
  onPointerMove: () => {
1609
- e.disabled || H(i);
1737
+ e.disabled || U(i);
1610
1738
  },
1611
- onClick: () => se(e),
1739
+ onClick: () => J(e),
1612
1740
  children: [/* @__PURE__ */ t("span", { children: e.label }), a && T && /* @__PURE__ */ t(A, {
1613
1741
  name: "IconCheck",
1614
1742
  width: 16,
@@ -1621,23 +1749,23 @@ var E = {
1621
1749
  return /* @__PURE__ */ n("div", {
1622
1750
  ref: F,
1623
1751
  className: [
1624
- Z.wrapper,
1625
- y ? Z.errorState : "",
1752
+ Q.wrapper,
1753
+ y ? Q.errorState : "",
1626
1754
  C
1627
1755
  ].filter(Boolean).join(" "),
1628
1756
  children: [
1629
1757
  v && /* @__PURE__ */ t(te, {
1630
- htmlFor: K ? void 0 : O,
1758
+ htmlFor: ie ? void 0 : O,
1631
1759
  required: S,
1632
1760
  disabled: c,
1633
1761
  children: v
1634
1762
  }),
1635
- K ? /* @__PURE__ */ t("div", {
1636
- className: `${Z.disabledText} ${Z[x]}`,
1637
- children: W?.label ?? a
1763
+ ie ? /* @__PURE__ */ t("div", {
1764
+ className: `${Q.disabledText} ${Q[x]}`,
1765
+ children: ne?.label ?? a
1638
1766
  }) : /* @__PURE__ */ n("div", {
1639
- className: Z.control,
1640
- children: [/* @__PURE__ */ t(je, {
1767
+ className: Q.control,
1768
+ children: [/* @__PURE__ */ t(Re, {
1641
1769
  id: O,
1642
1770
  name: ee,
1643
1771
  value: B,
@@ -1648,36 +1776,36 @@ var E = {
1648
1776
  size: x,
1649
1777
  clearable: !1,
1650
1778
  autoComplete: "off",
1651
- className: `${Z.inputHost} ${Z[x]}`,
1652
- onFocus: oe,
1779
+ className: `${Q.inputHost} ${Q[x]}`,
1780
+ onFocus: q,
1653
1781
  onChange: (t) => {
1654
- let n = String(t), r = Me(e, n);
1655
- ne(n), z(!0), H(Ne(r, 0, 1));
1782
+ let n = String(t), r = ze(e, n);
1783
+ V(n), z(!0), U(Be(r, 0, 1));
1656
1784
  },
1657
1785
  role: "combobox",
1658
1786
  "aria-autocomplete": "list",
1659
1787
  "aria-expanded": R,
1660
1788
  "aria-controls": k,
1661
- "aria-activedescendant": ie ? `${O}-option-${V}` : void 0,
1789
+ "aria-activedescendant": ae ? `${O}-option-${H}` : void 0,
1662
1790
  "aria-invalid": !!y,
1663
1791
  "aria-describedby": P,
1664
- onClick: oe,
1792
+ onClick: q,
1665
1793
  onKeyDown: (e) => {
1666
1794
  if (!(c || g)) {
1667
1795
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
1668
1796
  e.preventDefault();
1669
- let t = e.key === "ArrowDown" ? 1 : -1, n = V >= 0 ? V + t : t === 1 ? 0 : G.length - 1;
1670
- z(!0), J(ae(n, t));
1797
+ let t = e.key === "ArrowDown" ? 1 : -1, n = H >= 0 ? H + t : t === 1 ? 0 : re.length - 1;
1798
+ z(!0), ce(se(n, t));
1671
1799
  } else if (e.key === "Home" || e.key === "End") {
1672
1800
  if (!R) return;
1673
1801
  e.preventDefault();
1674
1802
  let t = e.key === "Home" ? 1 : -1;
1675
- J(ae(e.key === "Home" ? 0 : G.length - 1, t));
1676
- } else e.key === "Enter" && R && ie ? (e.preventDefault(), se(ie)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), H(-1)) : e.key === "Tab" && (z(!1), H(-1));
1803
+ ce(se(e.key === "Home" ? 0 : re.length - 1, t));
1804
+ } else e.key === "Enter" && R && ae ? (e.preventDefault(), J(ae)) : e.key === "Escape" && R ? (e.preventDefault(), z(!1), U(-1)) : e.key === "Tab" && (z(!1), U(-1));
1677
1805
  }
1678
1806
  }
1679
1807
  }), /* @__PURE__ */ t("span", {
1680
- className: `${Z.chevron} ${R ? Z.chevronOpen : ""}`,
1808
+ className: `${Q.chevron} ${R ? Q.chevronOpen : ""}`,
1681
1809
  "aria-hidden": "true",
1682
1810
  children: /* @__PURE__ */ t(A, {
1683
1811
  name: "IconChevron",
@@ -1686,12 +1814,12 @@ var E = {
1686
1814
  })
1687
1815
  })]
1688
1816
  }),
1689
- R && typeof document < "u" && h(ce, document.body),
1817
+ R && typeof document < "u" && h(le, document.body),
1690
1818
  /* @__PURE__ */ n("span", {
1691
1819
  id: j,
1692
- className: Z.visuallyHidden,
1820
+ className: Q.visuallyHidden,
1693
1821
  "aria-live": "polite",
1694
- children: ["Найдено вариантов: ", G.length]
1822
+ children: ["Найдено вариантов: ", re.length]
1695
1823
  }),
1696
1824
  b && !y && /* @__PURE__ */ t(D, {
1697
1825
  id: M,
@@ -1704,25 +1832,25 @@ var E = {
1704
1832
  })
1705
1833
  ]
1706
1834
  });
1707
- }, ze = {
1835
+ }, Ke = {
1708
1836
  root: "_root_1gjqg_1",
1709
1837
  header: "_header_1gjqg_21",
1710
1838
  title: "_title_1gjqg_41",
1711
1839
  dismiss: "_dismiss_1gjqg_55",
1712
1840
  content: "_content_1gjqg_65"
1713
- }, Be = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
1841
+ }, qe = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
1714
1842
  let l = `ds-info-block-${u()}`;
1715
1843
  return /* @__PURE__ */ n("section", {
1716
- className: `${ze.root} ${c}`,
1844
+ className: `${Ke.root} ${c}`,
1717
1845
  "aria-labelledby": l,
1718
1846
  children: [/* @__PURE__ */ n("header", {
1719
- className: ze.header,
1847
+ className: Ke.header,
1720
1848
  children: [/* @__PURE__ */ t(s, {
1721
1849
  id: l,
1722
- className: ze.title,
1850
+ className: Ke.title,
1723
1851
  children: e
1724
1852
  }), i && /* @__PURE__ */ t(T, {
1725
- className: ze.dismiss,
1853
+ className: Ke.dismiss,
1726
1854
  variant: "empty",
1727
1855
  onClick: a,
1728
1856
  "aria-label": o,
@@ -1733,26 +1861,26 @@ var E = {
1733
1861
  })
1734
1862
  })]
1735
1863
  }), /* @__PURE__ */ t("div", {
1736
- className: ze.content,
1864
+ className: Ke.content,
1737
1865
  children: r
1738
1866
  })]
1739
1867
  });
1740
- }, Ve = {
1741
- wrapper: "_wrapper_1rx2j_1",
1742
- input: "_input_1rx2j_21",
1743
- switch: "_switch_1rx2j_35",
1744
- thumb: "_thumb_1rx2j_65",
1745
- label: "_label_1rx2j_110",
1746
- disabled: "_disabled_1rx2j_121"
1747
- }, He = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: d }) => {
1868
+ }, Je = {
1869
+ wrapper: "_wrapper_1o3hg_1",
1870
+ input: "_input_1o3hg_21",
1871
+ switch: "_switch_1o3hg_35",
1872
+ thumb: "_thumb_1o3hg_67",
1873
+ label: "_label_1o3hg_113",
1874
+ disabled: "_disabled_1o3hg_125"
1875
+ }, Ye = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: d }) => {
1748
1876
  let f = u(), p = l ?? `ds-radio-button-${c ?? f}`;
1749
1877
  return /* @__PURE__ */ n("label", {
1750
1878
  htmlFor: p,
1751
- className: `${Ve.wrapper} ${a ? Ve.disabled : ""} ${s}`,
1879
+ className: `${Je.wrapper} ${a ? Je.disabled : ""} ${s}`,
1752
1880
  children: [
1753
1881
  /* @__PURE__ */ t("input", {
1754
1882
  id: p,
1755
- className: Ve.input,
1883
+ className: Je.input,
1756
1884
  type: "checkbox",
1757
1885
  role: "switch",
1758
1886
  name: c,
@@ -1765,21 +1893,21 @@ var E = {
1765
1893
  }
1766
1894
  }),
1767
1895
  /* @__PURE__ */ t("span", {
1768
- className: Ve.switch,
1896
+ className: Je.switch,
1769
1897
  "aria-hidden": "true",
1770
- children: /* @__PURE__ */ t("span", { className: Ve.thumb })
1898
+ children: /* @__PURE__ */ t("span", { className: Je.thumb })
1771
1899
  }),
1772
1900
  i && /* @__PURE__ */ t("span", {
1773
- className: Ve.label,
1901
+ className: Je.label,
1774
1902
  children: i
1775
1903
  })
1776
1904
  ]
1777
1905
  });
1778
- }, Ue = {
1779
- root: "_root_3q2p2_1",
1780
- grid: "_grid_3q2p2_2",
1781
- actions: "_actions_3q2p2_3"
1782
- }, We = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1906
+ }, Xe = {
1907
+ root: "_root_1vmtf_1",
1908
+ grid: "_grid_1vmtf_3",
1909
+ actions: "_actions_1vmtf_5"
1910
+ }, Ze = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1783
1911
  let d = (e, t) => {
1784
1912
  let n = {
1785
1913
  ...r,
@@ -1788,11 +1916,11 @@ var E = {
1788
1916
  i?.(n, e), s === "instant" && a?.(n);
1789
1917
  };
1790
1918
  return /* @__PURE__ */ n("section", {
1791
- className: `${Ue.root} ${u}`,
1919
+ className: `${Xe.root} ${u}`,
1792
1920
  "aria-label": "Фильтры",
1793
1921
  "aria-busy": c,
1794
1922
  children: [/* @__PURE__ */ t("div", {
1795
- className: Ue.grid,
1923
+ className: Xe.grid,
1796
1924
  children: e.filter((e) => !e.hidden).map((e) => {
1797
1925
  let n = l || c || e.disabled, i = r[e.id];
1798
1926
  if (e.type === "input") {
@@ -1802,20 +1930,19 @@ var E = {
1802
1930
  placeholder: e.placeholder,
1803
1931
  disabled: n
1804
1932
  };
1805
- return e.inputType === "number" ? /* @__PURE__ */ t(je, {
1933
+ return e.inputType === "number" ? /* @__PURE__ */ t(Re, {
1806
1934
  ...r,
1807
1935
  type: "number",
1808
1936
  value: i ?? "",
1809
1937
  onChange: (t) => d(e.id, t)
1810
- }, e.id) : /* @__PURE__ */ t(je, {
1938
+ }, e.id) : /* @__PURE__ */ t(Re, {
1811
1939
  ...r,
1812
1940
  type: "text",
1813
1941
  value: String(i ?? ""),
1814
1942
  onChange: (t) => d(e.id, t)
1815
1943
  }, e.id);
1816
1944
  }
1817
- if (e.type === "dropdown") return /* @__PURE__ */ t(ue, {
1818
- size: "lg",
1945
+ if (e.type === "dropdown") return /* @__PURE__ */ t(ge, {
1819
1946
  label: e.label,
1820
1947
  hint: e.hint,
1821
1948
  placeholder: e.placeholder,
@@ -1824,8 +1951,7 @@ var E = {
1824
1951
  disabled: n,
1825
1952
  onChange: (t) => d(e.id, t)
1826
1953
  }, e.id);
1827
- if (e.type === "multiple") return /* @__PURE__ */ t(ke, {
1828
- size: "lg",
1954
+ if (e.type === "multiple") return /* @__PURE__ */ t(Ie, {
1829
1955
  label: e.label,
1830
1956
  hint: e.hint,
1831
1957
  placeholder: e.placeholder,
@@ -1841,7 +1967,7 @@ var E = {
1841
1967
  disabled: n,
1842
1968
  onChange: (t) => d(e.id, t)
1843
1969
  }, e.id);
1844
- if (e.type === "radio") return /* @__PURE__ */ t(He, {
1970
+ if (e.type === "radio") return /* @__PURE__ */ t(Ye, {
1845
1971
  label: e.label,
1846
1972
  checked: !!i,
1847
1973
  disabled: n,
@@ -1851,7 +1977,7 @@ var E = {
1851
1977
  from: null,
1852
1978
  to: null
1853
1979
  };
1854
- return /* @__PURE__ */ t(ie, {
1980
+ return /* @__PURE__ */ t(le, {
1855
1981
  hint: e.hint,
1856
1982
  mode: e.mode,
1857
1983
  min: e.min,
@@ -1862,7 +1988,7 @@ var E = {
1862
1988
  }, e.id);
1863
1989
  })
1864
1990
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1865
- className: Ue.actions,
1991
+ className: Xe.actions,
1866
1992
  children: [o && /* @__PURE__ */ t(T, {
1867
1993
  variant: "destructiveOutline",
1868
1994
  disabled: l || c,
@@ -1876,7 +2002,7 @@ var E = {
1876
2002
  })]
1877
2003
  })]
1878
2004
  });
1879
- }, Ge = {
2005
+ }, Qe = {
1880
2006
  wrapper: "_wrapper_8w6xl_1",
1881
2007
  dropzone: "_dropzone_8w6xl_3",
1882
2008
  dragActive: "_dragActive_8w6xl_5",
@@ -1889,12 +2015,12 @@ var E = {
1889
2015
  file: "_file_8w6xl_17",
1890
2016
  fileName: "_fileName_8w6xl_21",
1891
2017
  fileSize: "_fileSize_8w6xl_23"
1892
- }, Ke = (e) => `${e.name}:${e.size}:${e.lastModified}`, qe = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Je = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), Ye = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: d, error: f, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: ee }) => {
2018
+ }, $e = (e) => `${e.name}:${e.size}:${e.lastModified}`, et = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, tt = (e, t) => !t || t.split(",").map((e) => e.trim().toLowerCase()).some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t), nt = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: d, error: f, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: ee }) => {
1893
2019
  let w = u(), E = y ?? `ds-file-input-${v ?? w}`, O = p(null), k = p(0), [j, M] = m(!1), N = d ? `${E}-hint` : void 0, P = f ? `${E}-error` : void 0, F = [N, P].filter(Boolean).join(" ") || void 0, I = !g && !_, L = (e) => {
1894
- let t = [], n = new Set(r.map(Ke)), l = e.filter((e) => Je(e, o) ? s !== void 0 && e.size > s ? (t.push({
2020
+ let t = [], n = new Set(r.map($e)), l = e.filter((e) => tt(e, o) ? s !== void 0 && e.size > s ? (t.push({
1895
2021
  file: e,
1896
2022
  reason: "maxSize"
1897
- }), !1) : !n.has(Ke(e)) && (n.add(Ke(e)), !0) : (t.push({
2023
+ }), !1) : !n.has($e(e)) && (n.add($e(e)), !0) : (t.push({
1898
2024
  file: e,
1899
2025
  reason: "accept"
1900
2026
  }), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
@@ -1904,7 +2030,7 @@ var E = {
1904
2030
  })), d = d.slice(0, u)), t.length && ee?.(t), l.length && i?.(d), O.current && (O.current.value = "");
1905
2031
  };
1906
2032
  return /* @__PURE__ */ n("div", {
1907
- className: `${Ge.wrapper} ${b}`,
2033
+ className: `${Qe.wrapper} ${b}`,
1908
2034
  children: [
1909
2035
  l && /* @__PURE__ */ t(te, {
1910
2036
  htmlFor: E,
@@ -1913,7 +2039,7 @@ var E = {
1913
2039
  children: l
1914
2040
  }),
1915
2041
  /* @__PURE__ */ n("div", {
1916
- className: `${Ge.dropzone} ${j ? Ge.dragActive : ""} ${g ? Ge.disabled : ""} ${f ? Ge.error : ""}`,
2042
+ className: `${Qe.dropzone} ${j ? Qe.dragActive : ""} ${g ? Qe.disabled : ""} ${f ? Qe.error : ""}`,
1917
2043
  onDragEnter: (e) => {
1918
2044
  e.preventDefault(), I && ++k.current === 1 && M(!0);
1919
2045
  },
@@ -1928,7 +2054,7 @@ var E = {
1928
2054
  ref: O,
1929
2055
  id: E,
1930
2056
  name: v,
1931
- className: Ge.nativeInput,
2057
+ className: Qe.nativeInput,
1932
2058
  type: "file",
1933
2059
  multiple: a,
1934
2060
  accept: o,
@@ -1939,19 +2065,19 @@ var E = {
1939
2065
  onChange: (e) => L(Array.from(e.target.files ?? []))
1940
2066
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1941
2067
  /* @__PURE__ */ t("ul", {
1942
- className: Ge.files,
2068
+ className: Qe.files,
1943
2069
  "aria-live": "polite",
1944
2070
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
1945
- className: Ge.file,
2071
+ className: Qe.file,
1946
2072
  children: [
1947
2073
  /* @__PURE__ */ t("span", {
1948
- className: Ge.fileName,
2074
+ className: Qe.fileName,
1949
2075
  title: e.name,
1950
2076
  children: e.name
1951
2077
  }),
1952
2078
  /* @__PURE__ */ t("span", {
1953
- className: Ge.fileSize,
1954
- children: qe(e.size)
2079
+ className: Qe.fileSize,
2080
+ children: et(e.size)
1955
2081
  }),
1956
2082
  I && /* @__PURE__ */ t(T, {
1957
2083
  variant: "empty",
@@ -1965,25 +2091,25 @@ var E = {
1965
2091
  })
1966
2092
  })
1967
2093
  ]
1968
- }, Ke(e)))
2094
+ }, $e(e)))
1969
2095
  }),
1970
2096
  I && (a || r.length === 0) && /* @__PURE__ */ t(T, {
1971
- className: Ge.browseButton,
2097
+ className: Qe.browseButton,
1972
2098
  size: "sm",
1973
2099
  onClick: () => O.current?.click(),
1974
2100
  children: C
1975
2101
  }),
1976
2102
  I && !a && /* @__PURE__ */ t(T, {
1977
- className: Ge.browseButton,
2103
+ className: Qe.browseButton,
1978
2104
  size: "sm",
1979
2105
  onClick: () => O.current?.click(),
1980
2106
  children: S
1981
2107
  })
1982
2108
  ] }) : /* @__PURE__ */ n("div", {
1983
- className: Ge.empty,
2109
+ className: Qe.empty,
1984
2110
  children: [
1985
2111
  /* @__PURE__ */ t("span", {
1986
- className: Ge.uploadIcon,
2112
+ className: Qe.uploadIcon,
1987
2113
  "aria-hidden": "true",
1988
2114
  children: /* @__PURE__ */ t(A, {
1989
2115
  name: "IconUpload",
@@ -2011,26 +2137,26 @@ var E = {
2011
2137
  })
2012
2138
  ]
2013
2139
  });
2014
- }, Xe = {
2015
- wrapper: "_wrapper_8osw8_1",
2016
- control: "_control_8osw8_8",
2017
- textarea: "_textarea_8osw8_13",
2018
- disabledText: "_disabledText_8osw8_14",
2019
- sm: "_sm_8osw8_52",
2020
- md: "_md_8osw8_59",
2021
- lg: "_lg_8osw8_66",
2022
- autoResize: "_autoResize_8osw8_73",
2023
- manualResize: "_manualResize_8osw8_78",
2024
- textareaError: "_textareaError_8osw8_82",
2025
- clearAction: "_clearAction_8osw8_86",
2026
- messages: "_messages_8osw8_126",
2027
- counter: "_counter_8osw8_133"
2028
- }, Ze = 2;
2029
- function Qe(e) {
2140
+ }, rt = {
2141
+ wrapper: "_wrapper_1bwdq_1",
2142
+ control: "_control_1bwdq_15",
2143
+ textarea: "_textarea_1bwdq_25",
2144
+ disabledText: "_disabledText_1bwdq_27",
2145
+ sm: "_sm_1bwdq_103",
2146
+ md: "_md_1bwdq_117",
2147
+ lg: "_lg_1bwdq_131",
2148
+ autoResize: "_autoResize_1bwdq_145",
2149
+ manualResize: "_manualResize_1bwdq_155",
2150
+ textareaError: "_textareaError_1bwdq_163",
2151
+ clearAction: "_clearAction_1bwdq_171",
2152
+ messages: "_messages_1bwdq_251",
2153
+ counter: "_counter_1bwdq_265"
2154
+ }, it = 2;
2155
+ function at(e) {
2030
2156
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
2031
2157
  return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
2032
2158
  }
2033
- function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: c = !1, label: d, error: f, hint: m, className: h = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = Ze, maxRows: ee, autoResize: w = !0, ...T }) {
2159
+ function ot({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: c = !1, label: d, error: f, hint: m, className: h = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = it, maxRows: ee, autoResize: w = !0, ...T }) {
2034
2160
  let E = u(), O = _ ?? `ds-textarea-${g ?? E}`, k = p(null), j = m ? `${O}-hint` : void 0, M = f ? `${O}-error` : void 0, N = S && x ? `${O}-count` : void 0, P = [
2035
2161
  j,
2036
2162
  M,
@@ -2038,7 +2164,7 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2038
2164
  ].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = ee === void 0 ? void 0 : Math.max(F, ee), L = s(() => {
2039
2165
  let e = k.current;
2040
2166
  if (!e || !w) return;
2041
- let t = window.getComputedStyle(e), n = Qe(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
2167
+ let t = window.getComputedStyle(e), n = at(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
2042
2168
  e.style.height = "auto";
2043
2169
  let o = Math.min(Math.max(e.scrollHeight, i), a);
2044
2170
  e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
@@ -2070,7 +2196,7 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2070
2196
  e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
2071
2197
  }, B = { "--ds-textarea-min-rows": F };
2072
2198
  return /* @__PURE__ */ n("div", {
2073
- className: `${Xe.wrapper} ${h}`,
2199
+ className: `${rt.wrapper} ${h}`,
2074
2200
  children: [
2075
2201
  d && /* @__PURE__ */ t(te, {
2076
2202
  htmlFor: O,
@@ -2080,12 +2206,12 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2080
2206
  }),
2081
2207
  a && c ? /* @__PURE__ */ t("div", {
2082
2208
  id: O,
2083
- className: `${Xe.disabledText} ${Xe[v]}`,
2209
+ className: `${rt.disabledText} ${rt[v]}`,
2084
2210
  style: B,
2085
2211
  "aria-describedby": P,
2086
2212
  children: e || i
2087
2213
  }) : /* @__PURE__ */ n("div", {
2088
- className: Xe.control,
2214
+ className: rt.control,
2089
2215
  children: [/* @__PURE__ */ t("textarea", {
2090
2216
  ref: k,
2091
2217
  id: O,
@@ -2100,12 +2226,12 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2100
2226
  style: B,
2101
2227
  "aria-invalid": !!f,
2102
2228
  "aria-describedby": P,
2103
- className: `${Xe.textarea} ${Xe[v]} ${w ? Xe.autoResize : Xe.manualResize} ${f ? Xe.textareaError : ""}`,
2229
+ className: `${rt.textarea} ${rt[v]} ${w ? rt.autoResize : rt.manualResize} ${f ? rt.textareaError : ""}`,
2104
2230
  onChange: R,
2105
2231
  ...T
2106
2232
  }), y && e && !a && !o && /* @__PURE__ */ t("button", {
2107
2233
  type: "button",
2108
- className: Xe.clearAction,
2234
+ className: rt.clearAction,
2109
2235
  "aria-label": "Очистить поле",
2110
2236
  onClick: z,
2111
2237
  children: /* @__PURE__ */ t(A, {
@@ -2116,7 +2242,7 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2116
2242
  })]
2117
2243
  }),
2118
2244
  (m || f || N) && /* @__PURE__ */ n("div", {
2119
- className: Xe.messages,
2245
+ className: rt.messages,
2120
2246
  children: [
2121
2247
  m && !f && /* @__PURE__ */ t(D, {
2122
2248
  id: j,
@@ -2129,7 +2255,7 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2129
2255
  }),
2130
2256
  N && /* @__PURE__ */ n("span", {
2131
2257
  id: N,
2132
- className: Xe.counter,
2258
+ className: rt.counter,
2133
2259
  children: [
2134
2260
  e.length,
2135
2261
  " / ",
@@ -2143,11 +2269,11 @@ function $e({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
2143
2269
  }
2144
2270
  //#endregion
2145
2271
  //#region src/components/DSModal/modal.store.ts
2146
- var et = 0, Q = b((e, t) => ({
2272
+ var st = 0, ct = b((e, t) => ({
2147
2273
  modals: [],
2148
2274
  openModal: (t, n = {}, r = {}) => {
2149
- et += 1;
2150
- let i = `ds-modal-${et}`;
2275
+ st += 1;
2276
+ let i = `ds-modal-${st}`;
2151
2277
  return e((e) => ({ modals: [...e.modals, {
2152
2278
  id: i,
2153
2279
  name: t,
@@ -2171,21 +2297,21 @@ var et = 0, Q = b((e, t) => ({
2171
2297
  let n = t().modals;
2172
2298
  n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
2173
2299
  }
2174
- })), tt = () => {
2175
- Q.getState().closeAllModals(), et = 0;
2176
- }, nt = {
2177
- layer: "_layer_pykxs_1",
2178
- backdrop: "_backdrop_pykxs_3",
2179
- panel: "_panel_pykxs_5",
2180
- header: "_header_pykxs_9",
2181
- title: "_title_pykxs_11",
2182
- description: "_description_pykxs_13",
2183
- content: "_content_pykxs_15",
2184
- close: "_close_pykxs_17"
2185
- }, rt = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", it = i({});
2186
- function at(e) {
2300
+ })), lt = () => {
2301
+ ct.getState().closeAllModals(), st = 0;
2302
+ }, ut = {
2303
+ layer: "_layer_d4mga_1",
2304
+ backdrop: "_backdrop_d4mga_3",
2305
+ panel: "_panel_d4mga_5",
2306
+ header: "_header_d4mga_9",
2307
+ title: "_title_d4mga_11",
2308
+ description: "_description_d4mga_13",
2309
+ content: "_content_d4mga_15",
2310
+ close: "_close_d4mga_19"
2311
+ }, dt = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ft = i({});
2312
+ function pt(e) {
2187
2313
  if (e.key !== "Tab") return;
2188
- let t = Array.from(e.currentTarget.querySelectorAll(rt));
2314
+ let t = Array.from(e.currentTarget.querySelectorAll(dt));
2189
2315
  if (!t.length) {
2190
2316
  e.preventDefault();
2191
2317
  return;
@@ -2193,29 +2319,29 @@ function at(e) {
2193
2319
  let n = t[0], r = t.at(-1);
2194
2320
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
2195
2321
  }
2196
- var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: d = "dialog" }) => {
2197
- let f = c(it), m = r ?? f.title, h = i ?? f.description, g = u(), _ = u(), v = p(null), y = Q((e) => e.closeModal), b = m != null, x = h != null;
2322
+ var mt = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: d = "dialog" }) => {
2323
+ let f = c(ft), m = r ?? f.title, h = i ?? f.description, g = u(), _ = u(), v = p(null), y = ct((e) => e.closeModal), b = m != null, x = h != null;
2198
2324
  return l(() => {
2199
2325
  let e = document.activeElement, t = v.current;
2200
- return (t?.querySelector(rt) ?? t)?.focus(), () => e?.focus();
2326
+ return (t?.querySelector(dt) ?? t)?.focus(), () => e?.focus();
2201
2327
  }, []), /* @__PURE__ */ n("div", {
2202
2328
  ref: v,
2203
- className: `${nt.panel} ${s}`,
2329
+ className: `${ut.panel} ${s}`,
2204
2330
  role: d,
2205
2331
  "aria-modal": "true",
2206
2332
  "aria-labelledby": b ? g : void 0,
2207
2333
  "aria-describedby": x ? _ : void 0,
2208
2334
  tabIndex: -1,
2209
- onKeyDown: at,
2335
+ onKeyDown: pt,
2210
2336
  children: [
2211
2337
  (b || o) && /* @__PURE__ */ n("header", {
2212
- className: nt.header,
2338
+ className: ut.header,
2213
2339
  children: [b && /* @__PURE__ */ t("h2", {
2214
2340
  id: g,
2215
- className: nt.title,
2341
+ className: ut.title,
2216
2342
  children: m
2217
2343
  }), /* @__PURE__ */ t(T, {
2218
- className: nt.close,
2344
+ className: ut.close,
2219
2345
  variant: "empty",
2220
2346
  size: "sm",
2221
2347
  "aria-label": o,
@@ -2229,21 +2355,21 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2229
2355
  }),
2230
2356
  x && /* @__PURE__ */ t("p", {
2231
2357
  id: _,
2232
- className: nt.description,
2358
+ className: ut.description,
2233
2359
  children: h
2234
2360
  }),
2235
2361
  /* @__PURE__ */ t("div", {
2236
- className: nt.content,
2362
+ className: ut.content,
2237
2363
  children: e
2238
2364
  })
2239
2365
  ]
2240
2366
  });
2241
- }, st = ({ registry: e }) => {
2242
- let n = Q((e) => e.modals), r = Q((e) => e.closeModal), i = Q((e) => e.closeAllModals);
2367
+ }, ht = ({ registry: e }) => {
2368
+ let n = ct((e) => e.modals), r = ct((e) => e.closeModal), i = ct((e) => e.closeAllModals);
2243
2369
  return l(() => {
2244
2370
  let e = (e) => {
2245
2371
  if (e.key !== "Escape") return;
2246
- let t = Q.getState().modals.at(-1);
2372
+ let t = ct.getState().modals.at(-1);
2247
2373
  t?.closeOnEscape && r(t.id);
2248
2374
  };
2249
2375
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
@@ -2256,18 +2382,18 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2256
2382
  n,
2257
2383
  e
2258
2384
  ]), !n.length || typeof document > "u" ? null : h(/* @__PURE__ */ t("div", {
2259
- className: nt.layer,
2385
+ className: ut.layer,
2260
2386
  "aria-label": "Модальные окна",
2261
2387
  children: n.map((a, o) => {
2262
2388
  let s = e[a.name];
2263
2389
  return s ? /* @__PURE__ */ t("div", {
2264
- className: nt.backdrop,
2390
+ className: ut.backdrop,
2265
2391
  "aria-hidden": o !== n.length - 1 || void 0,
2266
2392
  inert: o !== n.length - 1 || void 0,
2267
2393
  onMouseDown: (e) => {
2268
2394
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
2269
2395
  },
2270
- children: /* @__PURE__ */ t(it.Provider, {
2396
+ children: /* @__PURE__ */ t(ft.Provider, {
2271
2397
  value: {
2272
2398
  title: a.title ?? a.payload.title,
2273
2399
  description: a.description ?? a.payload.description
@@ -2282,31 +2408,31 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2282
2408
  }, a.id) : null;
2283
2409
  })
2284
2410
  }), document.body);
2285
- }, ct = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
2286
- let o = Q((e) => e.modals.length);
2411
+ }, gt = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
2412
+ let o = ct((e) => e.modals.length);
2287
2413
  return l(() => {
2288
2414
  if (!a || o === 0) return;
2289
2415
  let e = document.body.style.overflow;
2290
2416
  return document.body.style.overflow = "hidden", () => {
2291
2417
  document.body.style.overflow = e;
2292
2418
  };
2293
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(st, { registry: r })] });
2294
- }, lt = (e) => e, ut = {
2419
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(ht, { registry: r })] });
2420
+ }, _t = (e) => e, vt = {
2295
2421
  message: "_message_1vtru_1",
2296
2422
  actions: "_actions_1vtru_3"
2297
- }, dt = /* @__PURE__ */ new Map(), ft = 0, pt = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
2423
+ }, yt = /* @__PURE__ */ new Map(), bt = 0, xt = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
2298
2424
  let u = (e) => {
2299
- dt.get(l)?.(e), dt.delete(l), r();
2425
+ yt.get(l)?.(e), yt.delete(l), r();
2300
2426
  };
2301
- return /* @__PURE__ */ n(ot, {
2427
+ return /* @__PURE__ */ n(mt, {
2302
2428
  modalId: e,
2303
2429
  title: i,
2304
2430
  role: "alertdialog",
2305
2431
  children: [/* @__PURE__ */ t("p", {
2306
- className: ut.message,
2432
+ className: vt.message,
2307
2433
  children: a
2308
2434
  }), /* @__PURE__ */ n("div", {
2309
- className: ut.actions,
2435
+ className: vt.actions,
2310
2436
  children: [/* @__PURE__ */ t(T, {
2311
2437
  variant: "outline",
2312
2438
  onClick: () => u(!1),
@@ -2318,46 +2444,46 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2318
2444
  })]
2319
2445
  })]
2320
2446
  });
2321
- }, mt = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(ot, {
2447
+ }, St = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(mt, {
2322
2448
  modalId: e,
2323
2449
  title: i,
2324
2450
  role: "alertdialog",
2325
2451
  children: [/* @__PURE__ */ t("p", {
2326
- className: ut.message,
2452
+ className: vt.message,
2327
2453
  children: a
2328
2454
  }), /* @__PURE__ */ t("div", {
2329
- className: ut.actions,
2455
+ className: vt.actions,
2330
2456
  children: /* @__PURE__ */ t(T, {
2331
2457
  onClick: r,
2332
2458
  children: o
2333
2459
  })
2334
2460
  })]
2335
- }), ht = lt({
2336
- ConfirmModal: pt,
2337
- ErrorModal: mt
2338
- }), gt = () => {
2339
- let e = Q((e) => e.openModal);
2461
+ }), Ct = _t({
2462
+ ConfirmModal: xt,
2463
+ ErrorModal: St
2464
+ }), wt = () => {
2465
+ let e = ct((e) => e.openModal);
2340
2466
  return (t = {}) => new Promise((n) => {
2341
- ft += 1;
2342
- let r = `confirm-${ft}`;
2343
- dt.set(r, n), e("ConfirmModal", {
2467
+ bt += 1;
2468
+ let r = `confirm-${bt}`;
2469
+ yt.set(r, n), e("ConfirmModal", {
2344
2470
  ...t,
2345
2471
  requestId: r
2346
2472
  }, {
2347
2473
  closeOnEscape: !1,
2348
2474
  onClose: () => {
2349
- dt.get(r)?.(!1), dt.delete(r);
2475
+ yt.get(r)?.(!1), yt.delete(r);
2350
2476
  }
2351
2477
  });
2352
2478
  });
2353
- }, _t = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", vt = () => {
2354
- let e = Q((e) => e.openModal);
2479
+ }, Tt = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Et = () => {
2480
+ let e = ct((e) => e.openModal);
2355
2481
  return { showError: (t, n) => e("ErrorModal", {
2356
2482
  title: n,
2357
- message: _t(t)
2483
+ message: Tt(t)
2358
2484
  }) };
2359
- }, yt = b(() => ({})), bt = b(() => ({})), xt = () => {
2360
- let e = Q((e) => e.modals), t = Q((e) => e.openModal), n = Q((e) => e.closeModal), r = Q((e) => e.closeTopModal), i = Q((e) => e.closeAllModals), a = s((e, n = {}, r) => t(e, n, r), [t]), o = s((t) => e.some((e) => e.name === t), [e]);
2485
+ }, Dt = b(() => ({})), Ot = b(() => ({})), kt = () => {
2486
+ let e = ct((e) => e.modals), t = ct((e) => e.openModal), n = ct((e) => e.closeModal), r = ct((e) => e.closeTopModal), i = ct((e) => e.closeAllModals), a = s((e, n = {}, r) => t(e, n, r), [t]), o = s((t) => e.some((e) => e.name === t), [e]);
2361
2487
  return f(() => ({
2362
2488
  openModal: a,
2363
2489
  closeModal: n,
@@ -2373,7 +2499,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2373
2499
  e.length,
2374
2500
  a
2375
2501
  ]);
2376
- }, St = {
2502
+ }, At = {
2377
2503
  wrapper: "_wrapper_1qbyz_1",
2378
2504
  container: "_container_1qbyz_15",
2379
2505
  inner: "_inner_1qbyz_35",
@@ -2381,29 +2507,29 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2381
2507
  jump: "_jump_1qbyz_1",
2382
2508
  cube__inner: "_cube__inner_1qbyz_67",
2383
2509
  morph: "_morph_1qbyz_1"
2384
- }, Ct = () => /* @__PURE__ */ t("div", {
2385
- className: St.wrapper,
2510
+ }, jt = () => /* @__PURE__ */ t("div", {
2511
+ className: At.wrapper,
2386
2512
  children: /* @__PURE__ */ t("div", {
2387
- className: St.container,
2513
+ className: At.container,
2388
2514
  children: /* @__PURE__ */ n("div", {
2389
- className: St.inner,
2515
+ className: At.inner,
2390
2516
  children: [
2391
2517
  /* @__PURE__ */ t("div", {
2392
- className: St.cube,
2393
- children: /* @__PURE__ */ t("div", { className: St.cube__inner })
2518
+ className: At.cube,
2519
+ children: /* @__PURE__ */ t("div", { className: At.cube__inner })
2394
2520
  }),
2395
2521
  /* @__PURE__ */ t("div", {
2396
- className: St.cube,
2397
- children: /* @__PURE__ */ t("div", { className: St.cube__inner })
2522
+ className: At.cube,
2523
+ children: /* @__PURE__ */ t("div", { className: At.cube__inner })
2398
2524
  }),
2399
2525
  /* @__PURE__ */ t("div", {
2400
- className: St.cube,
2401
- children: /* @__PURE__ */ t("div", { className: St.cube__inner })
2526
+ className: At.cube,
2527
+ children: /* @__PURE__ */ t("div", { className: At.cube__inner })
2402
2528
  })
2403
2529
  ]
2404
2530
  })
2405
2531
  })
2406
- }), wt = {
2532
+ }), Mt = {
2407
2533
  viewport: "_viewport_joq18_1",
2408
2534
  "top-right": "_top-right_joq18_3",
2409
2535
  "top-left": "_top-left_joq18_5",
@@ -2415,7 +2541,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2415
2541
  success: "_success_joq18_17",
2416
2542
  warning: "_warning_joq18_19",
2417
2543
  error: "_error_joq18_21"
2418
- }, Tt = {
2544
+ }, Nt = {
2419
2545
  info: {
2420
2546
  name: "IconInfoCircle",
2421
2547
  color: "var(--color-primary)"
@@ -2432,7 +2558,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2432
2558
  name: "IconWarning",
2433
2559
  color: "var(--color-error)"
2434
2560
  }
2435
- }, Et = ({ toast: e, onClose: r }) => {
2561
+ }, Pt = ({ toast: e, onClose: r }) => {
2436
2562
  let [i, a] = m(!1), o = p(e.duration), s = p(Date.now());
2437
2563
  return l(() => {
2438
2564
  if (i || e.duration <= 0) return;
@@ -2447,7 +2573,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2447
2573
  e.duration,
2448
2574
  e.id
2449
2575
  ]), /* @__PURE__ */ n("article", {
2450
- className: `${wt.toast} ${wt[e.variant]}`,
2576
+ className: `${Mt.toast} ${Mt[e.variant]}`,
2451
2577
  role: e.variant === "error" ? "alert" : "status",
2452
2578
  "aria-live": e.variant === "error" ? "assertive" : "polite",
2453
2579
  onMouseEnter: () => a(!0),
@@ -2456,12 +2582,12 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2456
2582
  onBlur: () => a(!1),
2457
2583
  children: [
2458
2584
  /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(A, {
2459
- ...Tt[e.variant],
2585
+ ...Nt[e.variant],
2460
2586
  width: 24,
2461
2587
  height: 24
2462
2588
  }) }),
2463
2589
  /* @__PURE__ */ n("div", {
2464
- className: wt.body,
2590
+ className: Mt.body,
2465
2591
  children: [
2466
2592
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
2467
2593
  /* @__PURE__ */ t("div", { children: e.message }),
@@ -2488,11 +2614,11 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2488
2614
  })
2489
2615
  ]
2490
2616
  });
2491
- }, Dt = 0, Ot = b((e) => ({
2617
+ }, Ft = 0, It = b((e) => ({
2492
2618
  toasts: [],
2493
2619
  showToast: (t) => {
2494
- Dt += 1;
2495
- let n = `ds-toast-${Dt}`;
2620
+ Ft += 1;
2621
+ let n = `ds-toast-${Ft}`;
2496
2622
  return e((e) => ({ toasts: [...e.toasts, {
2497
2623
  variant: "info",
2498
2624
  duration: 5e3,
@@ -2503,18 +2629,18 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2503
2629
  },
2504
2630
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
2505
2631
  clearToasts: () => e({ toasts: [] })
2506
- })), kt = () => Ot.setState({ toasts: [] }), At = ({ position: e = "top-right" }) => {
2507
- let n = Ot((e) => e.toasts), r = Ot((e) => e.removeToast);
2632
+ })), Lt = () => It.setState({ toasts: [] }), Rt = ({ position: e = "top-right" }) => {
2633
+ let n = It((e) => e.toasts), r = It((e) => e.removeToast);
2508
2634
  return /* @__PURE__ */ t("div", {
2509
- className: `${wt.viewport} ${wt[e]}`,
2635
+ className: `${Mt.viewport} ${Mt[e]}`,
2510
2636
  "aria-label": "Уведомления",
2511
- children: n.map((e) => /* @__PURE__ */ t(Et, {
2637
+ children: n.map((e) => /* @__PURE__ */ t(Pt, {
2512
2638
  toast: e,
2513
2639
  onClose: r
2514
2640
  }, e.id))
2515
2641
  });
2516
- }, jt = () => {
2517
- let e = Ot((e) => e.showToast), t = Ot((e) => e.removeToast), n = Ot((e) => e.clearToasts), r = s((t) => e({
2642
+ }, zt = () => {
2643
+ let e = It((e) => e.showToast), t = It((e) => e.removeToast), n = It((e) => e.clearToasts), r = s((t) => e({
2518
2644
  ...t,
2519
2645
  variant: "info"
2520
2646
  }), [e]), i = s((t) => e({
@@ -2544,7 +2670,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2544
2670
  i,
2545
2671
  a
2546
2672
  ]);
2547
- }, Mt = {
2673
+ }, Bt = {
2548
2674
  root: "_root_s9o0g_1",
2549
2675
  tooltip: "_tooltip_s9o0g_3",
2550
2676
  "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
@@ -2552,7 +2678,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2552
2678
  bottom: "_bottom_s9o0g_7",
2553
2679
  left: "_left_s9o0g_9",
2554
2680
  right: "_right_s9o0g_11"
2555
- }, Nt = ({ content: e, children: i, placement: a = "top", delay: s = 450, disabled: c = !1, maxWidth: d = 280, className: f = "" }) => {
2681
+ }, Vt = ({ content: e, children: i, placement: a = "top", delay: s = 450, disabled: c = !1, maxWidth: d = 280, className: f = "" }) => {
2556
2682
  let h = u(), [g, _] = m(!1), v = p(null), y = () => {
2557
2683
  c || !e || (v.current = setTimeout(() => _(!0), s));
2558
2684
  }, b = () => {
@@ -2574,80 +2700,80 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2574
2700
  onBlur: b
2575
2701
  });
2576
2702
  return /* @__PURE__ */ n("span", {
2577
- className: `${Mt.root} ${f}`,
2703
+ className: `${Bt.root} ${f}`,
2578
2704
  onPointerDown: g ? b : y,
2579
2705
  children: [x, g && /* @__PURE__ */ t("span", {
2580
2706
  id: h,
2581
2707
  role: "tooltip",
2582
- className: `${Mt.tooltip} ${Mt[a]}`,
2708
+ className: `${Bt.tooltip} ${Bt[a]}`,
2583
2709
  style: { maxWidth: d },
2584
2710
  children: e
2585
2711
  })]
2586
2712
  });
2587
- }, Pt = (e) => {
2713
+ }, Ht = (e) => {
2588
2714
  if (!Number.isFinite(e) || e < 0) return "00:00";
2589
2715
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
2590
2716
  return n ? `${n}:${a}` : a;
2591
2717
  }, $ = {
2592
- root: "_root_16v7i_1",
2593
- frame: "_frame_16v7i_18",
2594
- video: "_video_16v7i_33",
2595
- overlay: "_overlay_16v7i_40",
2596
- state: "_state_16v7i_41",
2597
- buffering: "_buffering_16v7i_42",
2598
- loaderViewport: "_loaderViewport_16v7i_72",
2599
- loaderScale: "_loaderScale_16v7i_78",
2600
- stateIcon: "_stateIcon_16v7i_85",
2601
- empty: "_empty_16v7i_101",
2602
- error: "_error_16v7i_106",
2603
- replay: "_replay_16v7i_112",
2604
- controlsLayer: "_controlsLayer_16v7i_130",
2605
- controlsVisible: "_controlsVisible_16v7i_143",
2606
- controls: "_controls_16v7i_130",
2607
- controlGroup: "_controlGroup_16v7i_155",
2608
- controlButton: "_controlButton_16v7i_168",
2609
- settingsAction: "_settingsAction_16v7i_184",
2610
- timeline: "_timeline_16v7i_193",
2611
- volume: "_volume_16v7i_194",
2612
- settings: "_settings_16v7i_184",
2613
- playButton: "_playButton_16v7i_201",
2614
- volumeGroup: "_volumeGroup_16v7i_208",
2615
- timelineGroup: "_timelineGroup_16v7i_220",
2616
- time: "_time_16v7i_193",
2617
- settingsActionLabel: "_settingsActionLabel_16v7i_339",
2618
- caption: "_caption_16v7i_345",
2619
- fullscreen: "_fullscreen_16v7i_352"
2620
- }, Ft = 2500, It = 5, Lt = .05, Rt = [
2718
+ root: "_root_1oxvl_1",
2719
+ frame: "_frame_1oxvl_35",
2720
+ video: "_video_1oxvl_65",
2721
+ overlay: "_overlay_1oxvl_79",
2722
+ state: "_state_1oxvl_81",
2723
+ buffering: "_buffering_1oxvl_83",
2724
+ loaderViewport: "_loaderViewport_1oxvl_143",
2725
+ loaderScale: "_loaderScale_1oxvl_155",
2726
+ stateIcon: "_stateIcon_1oxvl_169",
2727
+ empty: "_empty_1oxvl_201",
2728
+ error: "_error_1oxvl_211",
2729
+ replay: "_replay_1oxvl_223",
2730
+ controlsLayer: "_controlsLayer_1oxvl_259",
2731
+ controlsVisible: "_controlsVisible_1oxvl_285",
2732
+ controls: "_controls_1oxvl_259",
2733
+ controlGroup: "_controlGroup_1oxvl_309",
2734
+ controlButton: "_controlButton_1oxvl_335",
2735
+ settingsAction: "_settingsAction_1oxvl_367",
2736
+ timeline: "_timeline_1oxvl_385",
2737
+ volume: "_volume_1oxvl_387",
2738
+ settings: "_settings_1oxvl_367",
2739
+ playButton: "_playButton_1oxvl_401",
2740
+ volumeGroup: "_volumeGroup_1oxvl_415",
2741
+ timelineGroup: "_timelineGroup_1oxvl_439",
2742
+ time: "_time_1oxvl_385",
2743
+ settingsActionLabel: "_settingsActionLabel_1oxvl_677",
2744
+ caption: "_caption_1oxvl_689",
2745
+ fullscreen: "_fullscreen_1oxvl_703"
2746
+ }, Ut = 2500, Wt = 5, Gt = .05, Kt = [
2621
2747
  .5,
2622
2748
  .75,
2623
2749
  1,
2624
2750
  1.25,
2625
2751
  1.5,
2626
2752
  2
2627
- ], zt = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: c = "contain", loading: u = !1, error: d, fallback: f, className: h = "", controls: g = !0, playsInline: _ = !0, ...v }) => {
2628
- let y = p(null), b = p(null), x = p(null), S = p(void 0), [C, w] = m(!1), [E, te] = m(r.length > 0), [D, O] = m(!1), [k, j] = m(!1), [M, N] = m(!1), [P, F] = m(0), [I, L] = m(0), [R, z] = m(0), [B, ne] = m(1), [V, H] = m(!!v.muted), [U, re] = m(1), [W, G] = m(!!v.loop), [K, ie] = m(-1), [q, ae] = m(!1), [J, Y] = m(!0), [oe, se] = m(!1), [ce, le] = m(!1), ue = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), de = i.map((e, t) => ({
2753
+ ], qt = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: c = "contain", loading: u = !1, error: d, fallback: f, className: h = "", controls: g = !0, playsInline: _ = !0, ...v }) => {
2754
+ let y = p(null), b = p(null), x = p(null), S = p(void 0), [C, w] = m(!1), [E, te] = m(r.length > 0), [D, O] = m(!1), [k, j] = m(!1), [M, N] = m(!1), [P, F] = m(0), [I, L] = m(0), [R, z] = m(0), [B, V] = m(1), [H, U] = m(!!v.muted), [W, G] = m(1), [ne, re] = m(!!v.loop), [ie, ae] = m(-1), [oe, se] = m(!1), [ce, K] = m(!0), [q, J] = m(!1), [le, ue] = m(!1), de = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), Y = i.map((e, t) => ({
2629
2755
  track: e,
2630
2756
  index: t
2631
- })).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), fe = d ?? (C ? "Не удалось воспроизвести видео" : void 0), X = u || E && !fe && r.length > 0, pe = !X && !fe && r.length === 0, me = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, he = s(() => {
2632
- Y(!0), window.clearTimeout(S.current), k && !q && (S.current = window.setTimeout(() => Y(!1), Ft));
2633
- }, [k, q]);
2757
+ })).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), X = d ?? (C ? "Не удалось воспроизвести видео" : void 0), fe = u || E && !X && r.length > 0, pe = !fe && !X && r.length === 0, me = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, he = s(() => {
2758
+ K(!0), window.clearTimeout(S.current), k && !oe && (S.current = window.setTimeout(() => K(!1), Ut));
2759
+ }, [k, oe]);
2634
2760
  l(() => {
2635
2761
  w(!1), te(r.length > 0), O(!1), j(!1), N(!1), F(0), L(0), z(0);
2636
- }, [ue, r.length]), l(() => (he(), () => window.clearTimeout(S.current)), [he]), l(() => {
2637
- let e = () => se(document.fullscreenElement === b.current), t = () => le(document.pictureInPictureElement === x.current);
2762
+ }, [de, r.length]), l(() => (he(), () => window.clearTimeout(S.current)), [he]), l(() => {
2763
+ let e = () => J(document.fullscreenElement === b.current), t = () => ue(document.pictureInPictureElement === x.current);
2638
2764
  return document.addEventListener("fullscreenchange", e), document.addEventListener("enterpictureinpicture", t), document.addEventListener("leavepictureinpicture", t), () => {
2639
2765
  document.removeEventListener("fullscreenchange", e), document.removeEventListener("enterpictureinpicture", t), document.removeEventListener("leavepictureinpicture", t);
2640
2766
  };
2641
2767
  }, []), l(() => {
2642
- if (!q) return;
2768
+ if (!oe) return;
2643
2769
  let e = (e) => {
2644
- y.current?.contains(e.target) || ae(!1);
2770
+ y.current?.contains(e.target) || se(!1);
2645
2771
  };
2646
2772
  return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
2647
- }, [q]);
2773
+ }, [oe]);
2648
2774
  let ge = async () => {
2649
2775
  let e = x.current;
2650
- if (!(!e || fe || X)) {
2776
+ if (!(!e || X || fe)) {
2651
2777
  if (e.paused || e.ended) {
2652
2778
  e.ended && (e.currentTime = 0);
2653
2779
  try {
@@ -2663,54 +2789,54 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2663
2789
  }, ve = (e) => {
2664
2790
  let t = x.current;
2665
2791
  t && (t.volume = Math.min(1, Math.max(0, e)), t.muted = t.volume === 0);
2666
- }, ye = (e) => {
2792
+ }, Z = (e) => {
2667
2793
  let t = x.current;
2668
2794
  !t || !I || (t.currentTime = Math.min(I, Math.max(0, e)), F(t.currentTime));
2669
- }, be = async () => {
2795
+ }, ye = async () => {
2670
2796
  if (b.current) try {
2671
2797
  document.fullscreenElement ? await document.exitFullscreen() : await b.current.requestFullscreen();
2672
2798
  } catch {
2673
- se(!1);
2799
+ J(!1);
2674
2800
  }
2675
- }, xe = async () => {
2801
+ }, be = async () => {
2676
2802
  let e = x.current;
2677
2803
  if (!(!e || !me)) try {
2678
2804
  document.pictureInPictureElement ? await document.exitPictureInPicture() : await e.requestPictureInPicture();
2679
2805
  } catch {
2680
- le(!1);
2806
+ ue(!1);
2681
2807
  }
2682
- }, Se = (e) => {
2808
+ }, xe = (e) => {
2683
2809
  let t = x.current;
2684
2810
  t && (Array.from(t.textTracks).forEach((t, n) => {
2685
2811
  t.mode = n === e ? "showing" : "disabled";
2686
- }), ie(e));
2687
- }, Ce = (e) => {
2812
+ }), ae(e));
2813
+ }, Se = (e) => {
2688
2814
  let t = e.target;
2689
2815
  if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
2690
2816
  let n = e.key.toLowerCase();
2691
- n === " " || n === "k" ? (e.preventDefault(), ge()) : n === "m" ? (e.preventDefault(), _e()) : n === "f" ? (e.preventDefault(), be()) : n === "c" && de.length ? (e.preventDefault(), Se(K === -1 ? de[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), ye(P + (e.key === "ArrowRight" ? It : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), ve(B + (e.key === "ArrowUp" ? Lt : -.05))) : e.key === "Escape" && ae(!1), he();
2692
- }, we = () => {
2817
+ n === " " || n === "k" ? (e.preventDefault(), ge()) : n === "m" ? (e.preventDefault(), _e()) : n === "f" ? (e.preventDefault(), ye()) : n === "c" && Y.length ? (e.preventDefault(), xe(ie === -1 ? Y[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Z(P + (e.key === "ArrowRight" ? Wt : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), ve(B + (e.key === "ArrowUp" ? Gt : -.05))) : e.key === "Escape" && se(!1), he();
2818
+ }, Ce = () => {
2693
2819
  let e = x.current;
2694
2820
  w(!1), te(!0), e?.load();
2695
- }, Te = {
2821
+ }, we = {
2696
2822
  "--video-progress": `${I ? P / I * 100 : 0}%`,
2697
2823
  "--video-buffered": `${R * 100}%`
2698
2824
  };
2699
2825
  return /* @__PURE__ */ n("figure", {
2700
2826
  ref: y,
2701
2827
  className: `${$.root} ${h}`,
2702
- onKeyDown: Ce,
2828
+ onKeyDown: Se,
2703
2829
  children: [/* @__PURE__ */ n("div", {
2704
2830
  ref: b,
2705
- className: `${$.frame} ${oe ? $.fullscreen : ""}`,
2831
+ className: `${$.frame} ${q ? $.fullscreen : ""}`,
2706
2832
  style: { aspectRatio: o },
2707
- "aria-busy": X || void 0,
2833
+ "aria-busy": fe || void 0,
2708
2834
  tabIndex: g && r.length ? 0 : void 0,
2709
2835
  onPointerMove: he,
2710
2836
  onPointerDown: he,
2711
2837
  onFocusCapture: he,
2712
2838
  onMouseLeave: () => {
2713
- k && !q && Y(!1);
2839
+ k && !oe && K(!1);
2714
2840
  },
2715
2841
  children: [
2716
2842
  r.length > 0 && /* @__PURE__ */ n("video", {
@@ -2719,22 +2845,22 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2719
2845
  "aria-label": a,
2720
2846
  controls: !1,
2721
2847
  playsInline: _,
2722
- loop: W,
2848
+ loop: ne,
2723
2849
  className: $.video,
2724
2850
  style: { objectFit: c },
2725
2851
  onClick: (e) => {
2726
2852
  v.onClick?.(e), ge();
2727
2853
  },
2728
2854
  onDoubleClick: (e) => {
2729
- v.onDoubleClick?.(e), be();
2855
+ v.onDoubleClick?.(e), ye();
2730
2856
  },
2731
2857
  onLoadStart: (e) => {
2732
2858
  te(!0), v.onLoadStart?.(e);
2733
2859
  },
2734
2860
  onLoadedMetadata: (e) => {
2735
2861
  L(e.currentTarget.duration || 0);
2736
- let t = de.find(({ track: e }) => e.default);
2737
- Se(t?.index ?? -1), v.onLoadedMetadata?.(e);
2862
+ let t = Y.find(({ track: e }) => e.default);
2863
+ xe(t?.index ?? -1), v.onLoadedMetadata?.(e);
2738
2864
  },
2739
2865
  onDurationChange: (e) => {
2740
2866
  L(e.currentTarget.duration || 0), v.onDurationChange?.(e);
@@ -2765,20 +2891,20 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2765
2891
  j(!1), v.onPause?.(e);
2766
2892
  },
2767
2893
  onEnded: (e) => {
2768
- j(!1), N(!0), Y(!0), v.onEnded?.(e);
2894
+ j(!1), N(!0), K(!0), v.onEnded?.(e);
2769
2895
  },
2770
2896
  onVolumeChange: (e) => {
2771
- ne(e.currentTarget.volume), H(e.currentTarget.muted), v.onVolumeChange?.(e);
2897
+ V(e.currentTarget.volume), U(e.currentTarget.muted), v.onVolumeChange?.(e);
2772
2898
  },
2773
2899
  onRateChange: (e) => {
2774
- re(e.currentTarget.playbackRate), v.onRateChange?.(e);
2900
+ G(e.currentTarget.playbackRate), v.onRateChange?.(e);
2775
2901
  },
2776
2902
  onError: (e) => {
2777
2903
  te(!1), O(!1), w(!0), v.onError?.(e);
2778
2904
  },
2779
2905
  children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
2780
2906
  }),
2781
- X && /* @__PURE__ */ n("div", {
2907
+ fe && /* @__PURE__ */ n("div", {
2782
2908
  className: $.overlay,
2783
2909
  role: "status",
2784
2910
  "aria-live": "polite",
@@ -2787,11 +2913,11 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2787
2913
  "aria-hidden": "true",
2788
2914
  children: /* @__PURE__ */ t("div", {
2789
2915
  className: $.loaderScale,
2790
- children: /* @__PURE__ */ t(Ct, {})
2916
+ children: /* @__PURE__ */ t(jt, {})
2791
2917
  })
2792
2918
  }), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
2793
2919
  }),
2794
- !X && D && !fe && /* @__PURE__ */ t("div", {
2920
+ !fe && D && !X && /* @__PURE__ */ t("div", {
2795
2921
  className: $.buffering,
2796
2922
  role: "status",
2797
2923
  "aria-label": "Буферизация видео",
@@ -2811,7 +2937,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2811
2937
  f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
2812
2938
  ]
2813
2939
  }),
2814
- !X && fe && /* @__PURE__ */ n("div", {
2940
+ !fe && X && /* @__PURE__ */ n("div", {
2815
2941
  className: `${$.state} ${$.error}`,
2816
2942
  role: "alert",
2817
2943
  children: [
@@ -2821,16 +2947,16 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2821
2947
  width: 40,
2822
2948
  height: 40
2823
2949
  }),
2824
- f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: fe })] }),
2950
+ f ?? /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("strong", { children: "Видео недоступно" }), /* @__PURE__ */ t("span", { children: X })] }),
2825
2951
  r.length > 0 && /* @__PURE__ */ t(T, {
2826
2952
  size: "sm",
2827
2953
  variant: "secondary",
2828
- onClick: we,
2954
+ onClick: Ce,
2829
2955
  children: "Повторить"
2830
2956
  })
2831
2957
  ]
2832
2958
  }),
2833
- !X && !fe && M && /* @__PURE__ */ t("button", {
2959
+ !fe && !X && M && /* @__PURE__ */ t("button", {
2834
2960
  type: "button",
2835
2961
  className: $.replay,
2836
2962
  "aria-label": "Воспроизвести заново",
@@ -2841,32 +2967,32 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2841
2967
  height: 28
2842
2968
  })
2843
2969
  }),
2844
- g && r.length > 0 && !X && !fe && /* @__PURE__ */ n("div", {
2845
- className: `${$.controlsLayer} ${J || !k ? $.controlsVisible : ""}`,
2970
+ g && r.length > 0 && !fe && !X && /* @__PURE__ */ n("div", {
2971
+ className: `${$.controlsLayer} ${ce || !k ? $.controlsVisible : ""}`,
2846
2972
  onClick: (e) => e.stopPropagation(),
2847
- children: [q && /* @__PURE__ */ n("div", {
2973
+ children: [oe && /* @__PURE__ */ n("div", {
2848
2974
  className: $.settings,
2849
2975
  role: "dialog",
2850
2976
  "aria-label": "Настройки видео",
2851
2977
  children: [
2852
2978
  /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Скорость" }), /* @__PURE__ */ t("select", {
2853
- value: U,
2979
+ value: W,
2854
2980
  onChange: (e) => {
2855
2981
  let t = Number(e.target.value);
2856
2982
  x.current && (x.current.playbackRate = t);
2857
2983
  },
2858
- children: Rt.map((e) => /* @__PURE__ */ n("option", {
2984
+ children: Kt.map((e) => /* @__PURE__ */ n("option", {
2859
2985
  value: e,
2860
2986
  children: [e, "×"]
2861
2987
  }, e))
2862
2988
  })] }),
2863
- de.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
2864
- value: K,
2865
- onChange: (e) => Se(Number(e.target.value)),
2989
+ Y.length > 0 && /* @__PURE__ */ n("label", { children: [/* @__PURE__ */ t("span", { children: "Субтитры" }), /* @__PURE__ */ n("select", {
2990
+ value: ie,
2991
+ onChange: (e) => xe(Number(e.target.value)),
2866
2992
  children: [/* @__PURE__ */ t("option", {
2867
2993
  value: -1,
2868
2994
  children: "Выключены"
2869
- }), de.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
2995
+ }), Y.map(({ track: e, index: n }) => /* @__PURE__ */ t("option", {
2870
2996
  value: n,
2871
2997
  children: e.label
2872
2998
  }, `${e.srcLang}-${e.label}`))]
@@ -2874,15 +3000,15 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2874
3000
  /* @__PURE__ */ n("button", {
2875
3001
  type: "button",
2876
3002
  className: $.settingsAction,
2877
- "aria-pressed": W,
2878
- onClick: () => G((e) => !e),
2879
- children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: W ? "Вкл." : "Выкл." })]
3003
+ "aria-pressed": ne,
3004
+ onClick: () => re((e) => !e),
3005
+ children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: ne ? "Вкл." : "Выкл." })]
2880
3006
  }),
2881
3007
  me && /* @__PURE__ */ t("button", {
2882
3008
  type: "button",
2883
3009
  className: $.settingsAction,
2884
- "aria-pressed": ce,
2885
- onClick: () => void xe(),
3010
+ "aria-pressed": le,
3011
+ onClick: () => void be(),
2886
3012
  children: /* @__PURE__ */ n("span", {
2887
3013
  className: $.settingsActionLabel,
2888
3014
  children: [/* @__PURE__ */ t(A, {
@@ -2916,12 +3042,12 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2916
3042
  children: [/* @__PURE__ */ t("button", {
2917
3043
  type: "button",
2918
3044
  className: $.controlButton,
2919
- "aria-label": V ? "Включить звук" : "Выключить звук",
2920
- "aria-pressed": V,
3045
+ "aria-label": H ? "Включить звук" : "Выключить звук",
3046
+ "aria-pressed": H,
2921
3047
  title: "Звук (M)",
2922
3048
  onClick: _e,
2923
3049
  children: /* @__PURE__ */ t(A, {
2924
- name: V || B === 0 ? "IconVolumeMuted" : "IconVolume",
3050
+ name: H || B === 0 ? "IconVolumeMuted" : "IconVolume",
2925
3051
  width: 22,
2926
3052
  height: 22
2927
3053
  })
@@ -2931,9 +3057,9 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2931
3057
  min: 0,
2932
3058
  max: 1,
2933
3059
  step: .05,
2934
- value: V ? 0 : B,
3060
+ value: H ? 0 : B,
2935
3061
  "aria-label": "Громкость",
2936
- "aria-valuetext": `${Math.round((V ? 0 : B) * 100)}%`,
3062
+ "aria-valuetext": `${Math.round((H ? 0 : B) * 100)}%`,
2937
3063
  onChange: (e) => ve(Number(e.target.value))
2938
3064
  })]
2939
3065
  }),
@@ -2942,23 +3068,23 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2942
3068
  children: [
2943
3069
  /* @__PURE__ */ t("span", {
2944
3070
  className: $.time,
2945
- children: Pt(P)
3071
+ children: Ht(P)
2946
3072
  }),
2947
3073
  /* @__PURE__ */ t("input", {
2948
3074
  className: $.timeline,
2949
- style: Te,
3075
+ style: we,
2950
3076
  type: "range",
2951
3077
  min: 0,
2952
3078
  max: I || 0,
2953
3079
  step: .01,
2954
3080
  value: Math.min(P, I || 0),
2955
3081
  "aria-label": "Позиция воспроизведения",
2956
- "aria-valuetext": `${Pt(P)} из ${Pt(I)}`,
2957
- onChange: (e) => ye(Number(e.target.value))
3082
+ "aria-valuetext": `${Ht(P)} из ${Ht(I)}`,
3083
+ onChange: (e) => Z(Number(e.target.value))
2958
3084
  }),
2959
3085
  /* @__PURE__ */ t("span", {
2960
3086
  className: $.time,
2961
- children: Pt(I)
3087
+ children: Ht(I)
2962
3088
  })
2963
3089
  ]
2964
3090
  }),
@@ -2968,9 +3094,9 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2968
3094
  type: "button",
2969
3095
  className: $.controlButton,
2970
3096
  "aria-label": "Настройки",
2971
- "aria-expanded": q,
3097
+ "aria-expanded": oe,
2972
3098
  title: "Настройки",
2973
- onClick: () => ae((e) => !e),
3099
+ onClick: () => se((e) => !e),
2974
3100
  children: /* @__PURE__ */ t(A, {
2975
3101
  name: "IconSettings",
2976
3102
  width: 22,
@@ -2979,11 +3105,11 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2979
3105
  }), /* @__PURE__ */ t("button", {
2980
3106
  type: "button",
2981
3107
  className: $.controlButton,
2982
- "aria-label": oe ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
3108
+ "aria-label": q ? "Выйти из полноэкранного режима" : "Полноэкранный режим",
2983
3109
  title: "Полноэкранный режим (F)",
2984
- onClick: () => void be(),
3110
+ onClick: () => void ye(),
2985
3111
  children: /* @__PURE__ */ t(A, {
2986
- name: oe ? "IconFullscreenExit" : "IconFullscreen",
3112
+ name: q ? "IconFullscreenExit" : "IconFullscreen",
2987
3113
  width: 22,
2988
3114
  height: 22
2989
3115
  })
@@ -2998,7 +3124,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
2998
3124
  children: a
2999
3125
  })]
3000
3126
  });
3001
- }, Bt = {
3127
+ }, Jt = {
3002
3128
  root: "_root_1tdda_1",
3003
3129
  trigger: "_trigger_1tdda_15",
3004
3130
  heading: "_heading_1tdda_41",
@@ -3008,7 +3134,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3008
3134
  open: "_open_1tdda_91",
3009
3135
  content: "_content_1tdda_99",
3010
3136
  contentInner: "_contentInner_1tdda_119"
3011
- }, Vt = (e, t, n, r = 16) => {
3137
+ }, Yt = (e, t, n, r = 16) => {
3012
3138
  if (t > Math.max(0, n - r * 2)) {
3013
3139
  let t = e - r;
3014
3140
  return Math.abs(t) <= 1 ? {
@@ -3030,7 +3156,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3030
3156
  alignment: "none",
3031
3157
  delta: 0
3032
3158
  };
3033
- }, Ht = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: d = 16, className: f = "" }) => {
3159
+ }, Xt = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: d = 16, className: f = "" }) => {
3034
3160
  let h = u(), [g, _] = m(a), v = o ?? g, y = p(null), b = p(null), x = p(v);
3035
3161
  return l(() => {
3036
3162
  let e = x.current;
@@ -3040,7 +3166,7 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3040
3166
  let r = !1, i = () => {
3041
3167
  if (r) return;
3042
3168
  r = !0;
3043
- let e = t.getBoundingClientRect(), n = Vt(e.top, e.height, window.innerHeight, d);
3169
+ let e = t.getBoundingClientRect(), n = Yt(e.top, e.height, window.innerHeight, d);
3044
3170
  if (n.alignment === "none") return;
3045
3171
  let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
3046
3172
  window.scrollBy({
@@ -3061,10 +3187,10 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3061
3187
  d
3062
3188
  ]), /* @__PURE__ */ n("section", {
3063
3189
  ref: y,
3064
- className: `${Bt.root} ${v ? Bt.open : ""} ${f}`,
3190
+ className: `${Jt.root} ${v ? Jt.open : ""} ${f}`,
3065
3191
  children: [/* @__PURE__ */ n("button", {
3066
3192
  type: "button",
3067
- className: Bt.trigger,
3193
+ className: Jt.trigger,
3068
3194
  "aria-expanded": v,
3069
3195
  "aria-controls": h,
3070
3196
  onClick: () => {
@@ -3072,16 +3198,16 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3072
3198
  o === void 0 && _(e), s?.(e);
3073
3199
  },
3074
3200
  children: [/* @__PURE__ */ n("span", {
3075
- className: Bt.heading,
3201
+ className: Jt.heading,
3076
3202
  children: [/* @__PURE__ */ t("span", {
3077
- className: Bt.title,
3203
+ className: Jt.title,
3078
3204
  children: e
3079
3205
  }), r && /* @__PURE__ */ t("span", {
3080
- className: Bt.subtitle,
3206
+ className: Jt.subtitle,
3081
3207
  children: r
3082
3208
  })]
3083
3209
  }), /* @__PURE__ */ t("span", {
3084
- className: Bt.icon,
3210
+ className: Jt.icon,
3085
3211
  "aria-hidden": "true",
3086
3212
  children: /* @__PURE__ */ t(A, {
3087
3213
  name: "IconChevron",
@@ -3092,15 +3218,15 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3092
3218
  }), /* @__PURE__ */ t("div", {
3093
3219
  ref: b,
3094
3220
  id: h,
3095
- className: Bt.content,
3221
+ className: Jt.content,
3096
3222
  "aria-hidden": !v,
3097
3223
  children: /* @__PURE__ */ t("div", {
3098
- className: Bt.contentInner,
3224
+ className: Jt.contentInner,
3099
3225
  children: i
3100
3226
  })
3101
3227
  })]
3102
3228
  });
3103
- }, Ut = ({ children: e, containerId: t = "overlay-root" }) => {
3229
+ }, Zt = ({ children: e, containerId: t = "overlay-root" }) => {
3104
3230
  let [n, r] = m(null);
3105
3231
  return l(() => {
3106
3232
  let e = document.getElementById(t);
@@ -3115,4 +3241,4 @@ var ot = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3115
3241
  }, [t]), n ? h(e, n) : null;
3116
3242
  };
3117
3243
  //#endregion
3118
- export { pt as ConfirmModal, Ht as DSAccordion, S as DSBadge, T as DSButton, M as DSCheckbox, we as DSDataTable, ie as DSDateRange, W as DSDateTimePicker, ue as DSDropDown, ke as DSDropDownMultiple, te as DSFieldLabel, D as DSFieldMessage, Ye as DSFileInput, We as DSFilters, A as DSIcon, Be as DSInfoBlock, je as DSInput, ee as DSLoader, st as DSModal, ot as DSModalFrame, Ct as DSPageLoader, Ut as DSPortal, He as DSRadioButton, Re as DSSearchDropDown, ae as DSSkeleton, fe as DSSort, $e as DSTextarea, Et as DSToast, At as DSToastProvider, Nt as DSTooltip, zt as DSVideoPlayerFrame, mt as ErrorModal, ct as ModalSystemProvider, ht as builtInModalRegistry, lt as defineModalRegistry, R as formatDateTimeLocalValue, Vt as getDSAccordionScrollTarget, me as getDSDataTablePaginationItems, _t as getErrorMessage, ce as getNextEnabledOptionIndex, K as isValidDateRange, z as parseDateTimeLocalValue, tt as resetModalStore, kt as resetToastStore, gt as useConfirmModal, yt as useConfirmModalStore, vt as useErrorModal, bt as useErrorModalStore, xt as useModals, Q as useModalsStore, jt as useToast, Ot as useToastStore, he as validateDSDataTableData };
3244
+ export { xt as ConfirmModal, Xt as DSAccordion, S as DSBadge, T as DSButton, M as DSCheckbox, je as DSDataTable, le as DSDateRange, K as DSDateTimePicker, ge as DSDropDown, Ie as DSDropDownMultiple, te as DSFieldLabel, D as DSFieldMessage, nt as DSFileInput, Ze as DSFilters, A as DSIcon, qe as DSInfoBlock, Re as DSInput, ee as DSLoader, ht as DSModal, mt as DSModalFrame, jt as DSPageLoader, Zt as DSPortal, Ye as DSRadioButton, Ge as DSSearchDropDown, de as DSSkeleton, ve as DSSort, ot as DSTextarea, Pt as DSToast, Rt as DSToastProvider, Vt as DSTooltip, qt as DSVideoPlayerFrame, St as ErrorModal, gt as ModalSystemProvider, Ct as builtInModalRegistry, _t as defineModalRegistry, z as formatDateInputValue, G as formatDateTimeLocalValue, Yt as getDSAccordionScrollTarget, be as getDSDataTableColumnStyle, xe as getDSDataTablePaginationItems, Tt as getErrorMessage, me as getNextEnabledOptionIndex, H as isValidDateInputPrefix, J as isValidDateRange, B as maskDateInputValue, U as parseDateInputValue, ne as parseDateTimeLocalValue, lt as resetModalStore, Lt as resetToastStore, wt as useConfirmModal, Dt as useConfirmModalStore, Et as useErrorModal, Ot as useErrorModalStore, kt as useModals, ct as useModalsStore, zt as useToast, It as useToastStore, Se as validateDSDataTableData };