@efficiency-point/design-system 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,120 +1,120 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { cloneElement as r, forwardRef as i, isValidElement as a, useCallback as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { createColumnHelper as f, createSortedRowModel as p, rowSortingFeature as m, tableFeatures as h, useTable as g } from "@tanstack/react-table";
4
- import { createPortal as _ } from "react-dom";
5
- import { create as v } from "zustand";
6
- var y = {
7
- badge: "_badge_l4qbw_1",
8
- sm: "_sm_l4qbw_2",
9
- md: "_md_l4qbw_3",
10
- neutral: "_neutral_l4qbw_4",
11
- info: "_info_l4qbw_5",
12
- success: "_success_l4qbw_6",
13
- warning: "_warning_l4qbw_7",
14
- error: "_error_l4qbw_8",
15
- dot: "_dot_l4qbw_9",
16
- icon: "_icon_l4qbw_10",
17
- label: "_label_l4qbw_11"
18
- }, b = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
- className: `${y.badge} ${y[r]} ${y[i]} ${s}`,
3
+ import { createSortedRowModel as f, rowSortingFeature as p, sortFn_alphanumeric as m, sortFn_basic as h, sortFn_text as g, tableFeatures as _, useTable as v } from "@tanstack/react-table";
4
+ import { createPortal as y } from "react-dom";
5
+ import { create as b } from "zustand";
6
+ var x = {
7
+ badge: "_badge_1pk53_1",
8
+ sm: "_sm_1pk53_3",
9
+ md: "_md_1pk53_5",
10
+ neutral: "_neutral_1pk53_7",
11
+ info: "_info_1pk53_9",
12
+ success: "_success_1pk53_11",
13
+ warning: "_warning_1pk53_13",
14
+ error: "_error_1pk53_15",
15
+ dot: "_dot_1pk53_17",
16
+ icon: "_icon_1pk53_19",
17
+ label: "_label_1pk53_21"
18
+ }, S = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
+ className: `${x.badge} ${x[r]} ${x[i]} ${s}`,
20
20
  children: [
21
21
  a && /* @__PURE__ */ t("span", {
22
- className: y.dot,
22
+ className: x.dot,
23
23
  "aria-hidden": "true"
24
24
  }),
25
25
  o && /* @__PURE__ */ t("span", {
26
- className: y.icon,
26
+ className: x.icon,
27
27
  "aria-hidden": "true",
28
28
  children: o
29
29
  }),
30
30
  /* @__PURE__ */ t("span", {
31
- className: y.label,
31
+ className: x.label,
32
32
  children: e
33
33
  })
34
34
  ]
35
- }), x = {
36
- loader: "_loader_pslm9_1",
37
- "ds-spin": "_ds-spin_pslm9_1",
38
- primary: "_primary_pslm9_11",
39
- secondary: "_secondary_pslm9_12",
40
- light: "_light_pslm9_13",
41
- danger: "_danger_pslm9_14"
42
- }, S = ({ variant: e = "primary", label: n = "Загрузка", className: r = "", decorative: i = !1 }) => /* @__PURE__ */ t("span", {
43
- className: `${x.loader} ${x[e]} ${r}`,
35
+ }), C = {
36
+ loader: "_loader_1tjcf_1",
37
+ "ds-spin": "_ds-spin_1tjcf_1",
38
+ primary: "_primary_1tjcf_21",
39
+ secondary: "_secondary_1tjcf_23",
40
+ light: "_light_1tjcf_25",
41
+ danger: "_danger_1tjcf_27"
42
+ }, w = ({ variant: e = "primary", label: n = "Загрузка", className: r = "", decorative: i = !1 }) => /* @__PURE__ */ t("span", {
43
+ className: `${C.loader} ${C[e]} ${r}`,
44
44
  role: i ? void 0 : "status",
45
45
  "aria-label": i ? void 0 : n,
46
46
  "aria-hidden": i || void 0
47
- }), C = {
48
- button: "_button_higub_1",
49
- sm: "_sm_higub_16",
50
- md: "_md_higub_17",
51
- lg: "_lg_higub_18",
52
- primary: "_primary_higub_19",
53
- secondary: "_secondary_higub_20",
54
- outline: "_outline_higub_21",
55
- ghost: "_ghost_higub_23",
56
- empty: "_empty_higub_29",
57
- destructive: "_destructive_higub_34",
58
- destructiveOutline: "_destructiveOutline_higub_35"
59
- }, w = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, loadingLabel: a = "Загрузка", disabled: o, type: s = "button", className: c = "", ...l }, u) => /* @__PURE__ */ t("button", {
47
+ }), T = {
48
+ button: "_button_1jisp_1",
49
+ sm: "_sm_1jisp_31",
50
+ md: "_md_1jisp_33",
51
+ lg: "_lg_1jisp_35",
52
+ primary: "_primary_1jisp_37",
53
+ secondary: "_secondary_1jisp_39",
54
+ outline: "_outline_1jisp_41",
55
+ ghost: "_ghost_1jisp_45",
56
+ empty: "_empty_1jisp_57",
57
+ destructive: "_destructive_1jisp_67",
58
+ destructiveOutline: "_destructiveOutline_1jisp_69"
59
+ }, E = i(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, loadingLabel: a = "Загрузка", disabled: o, type: s = "button", className: c = "", ...l }, u) => /* @__PURE__ */ t("button", {
60
60
  ref: u,
61
61
  type: s,
62
- className: `${C.button} ${C[n]} ${C[r]} ${c}`,
62
+ className: `${T.button} ${T[n]} ${T[r]} ${c}`,
63
63
  disabled: o || i,
64
64
  "aria-busy": i || void 0,
65
65
  ...l,
66
- children: i ? /* @__PURE__ */ t(S, {
66
+ children: i ? /* @__PURE__ */ t(w, {
67
67
  variant: "light",
68
68
  label: a
69
69
  }) : e
70
70
  }));
71
- w.displayName = "DSButton";
72
- var T = {
73
- label: "_label_5v0ym_1",
74
- required: "_required_5v0ym_12",
75
- error: "_error_5v0ym_13",
76
- optional: "_optional_5v0ym_17",
77
- hint: "_hint_5v0ym_18",
78
- disabled: "_disabled_5v0ym_24",
79
- message: "_message_5v0ym_28",
80
- success: "_success_5v0ym_36"
81
- }, E = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
82
- className: `${T.label} ${a ? T.disabled : ""} ${o}`,
71
+ E.displayName = "DSButton";
72
+ var D = {
73
+ label: "_label_1lsqq_1",
74
+ required: "_required_1lsqq_23",
75
+ error: "_error_1lsqq_25",
76
+ optional: "_optional_1lsqq_33",
77
+ hint: "_hint_1lsqq_35",
78
+ disabled: "_disabled_1lsqq_47",
79
+ message: "_message_1lsqq_55",
80
+ success: "_success_1lsqq_71"
81
+ }, O = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
82
+ className: `${D.label} ${a ? D.disabled : ""} ${o}`,
83
83
  ...s,
84
84
  children: [
85
85
  /* @__PURE__ */ t("span", { children: e }),
86
86
  r && /* @__PURE__ */ t("span", {
87
- className: T.required,
87
+ className: D.required,
88
88
  "aria-hidden": "true",
89
89
  children: "*"
90
90
  }),
91
91
  i && /* @__PURE__ */ t("span", {
92
- className: T.optional,
92
+ className: D.optional,
93
93
  children: i
94
94
  })
95
95
  ]
96
- }), D = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
96
+ }), k = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
97
97
  id: r,
98
- className: `${T.message} ${T[n]} ${a}`,
98
+ className: `${D.message} ${D[n]} ${a}`,
99
99
  role: i && n === "error" ? "alert" : void 0,
100
100
  "aria-live": i && n !== "error" ? "polite" : void 0,
101
101
  children: e
102
- }), O = {
103
- wrapper: "_wrapper_1l5cg_1",
104
- label: "_label_1l5cg_2",
105
- input: "_input_1l5cg_3",
106
- control: "_control_1l5cg_4",
107
- disabled: "_disabled_1l5cg_7",
108
- controlError: "_controlError_1l5cg_9"
109
- }, k = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: d = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
102
+ }), A = {
103
+ wrapper: "_wrapper_1gq36_1",
104
+ label: "_label_1gq36_3",
105
+ input: "_input_1gq36_5",
106
+ control: "_control_1gq36_7",
107
+ disabled: "_disabled_1gq36_13",
108
+ controlError: "_controlError_1gq36_17"
109
+ }, j = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: d = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
110
110
  let _ = c(), v = m ?? `ds-checkbox-${p ?? _}`, y = u(null), b = a ? `${v}-hint` : void 0, x = o ? `${v}-error` : void 0;
111
111
  return s(() => {
112
112
  y.current && (y.current.indeterminate = h && !e);
113
113
  }, [e, h]), /* @__PURE__ */ n("div", {
114
- className: `${O.wrapper} ${f}`,
114
+ className: `${A.wrapper} ${f}`,
115
115
  children: [
116
116
  /* @__PURE__ */ n("label", {
117
- className: `${O.label} ${l ? O.disabled : ""}`,
117
+ className: `${A.label} ${l ? A.disabled : ""}`,
118
118
  htmlFor: v,
119
119
  children: [
120
120
  /* @__PURE__ */ t("input", {
@@ -127,50 +127,50 @@ var T = {
127
127
  "aria-readonly": d || void 0,
128
128
  "aria-invalid": !!o,
129
129
  "aria-describedby": [b, x].filter(Boolean).join(" ") || void 0,
130
- className: O.input,
130
+ className: A.input,
131
131
  onChange: (e) => {
132
132
  d || r?.(e.target.checked, e);
133
133
  },
134
134
  ...g
135
135
  }),
136
136
  /* @__PURE__ */ t("span", {
137
- className: `${O.control} ${o ? O.controlError : ""}`,
137
+ className: `${A.control} ${o ? A.controlError : ""}`,
138
138
  "aria-hidden": "true",
139
139
  children: h && !e ? "−" : e ? "✓" : ""
140
140
  }),
141
141
  i && /* @__PURE__ */ t("span", { children: i })
142
142
  ]
143
143
  }),
144
- a && !o && /* @__PURE__ */ t(D, {
144
+ a && !o && /* @__PURE__ */ t(k, {
145
145
  id: b,
146
146
  children: a
147
147
  }),
148
- o && /* @__PURE__ */ t(D, {
148
+ o && /* @__PURE__ */ t(k, {
149
149
  id: x,
150
150
  variant: "error",
151
151
  children: o
152
152
  })
153
153
  ]
154
154
  });
155
- }, A = {
156
- wrapper: "_wrapper_phf7i_1",
157
- trigger: "_trigger_phf7i_9",
158
- nav: "_nav_phf7i_27",
159
- day: "_day_phf7i_28",
160
- monthSelect: "_monthSelect_phf7i_29",
161
- yearInput: "_yearInput_phf7i_30",
162
- timeInput: "_timeInput_phf7i_31",
163
- value: "_value_phf7i_43",
164
- placeholder: "_placeholder_phf7i_47",
165
- error: "_error_phf7i_51",
166
- panel: "_panel_phf7i_55",
167
- calendarHeader: "_calendarHeader_phf7i_68",
168
- weekdays: "_weekdays_phf7i_113",
169
- days: "_days_phf7i_114",
170
- outside: "_outside_phf7i_132",
171
- selected: "_selected_phf7i_136",
172
- timeLabel: "_timeLabel_phf7i_146"
173
- }, j = [
155
+ }, M = {
156
+ wrapper: "_wrapper_1528c_1",
157
+ trigger: "_trigger_1528c_17",
158
+ nav: "_nav_1528c_53",
159
+ day: "_day_1528c_55",
160
+ monthSelect: "_monthSelect_1528c_57",
161
+ yearInput: "_yearInput_1528c_59",
162
+ timeInput: "_timeInput_1528c_61",
163
+ value: "_value_1528c_85",
164
+ placeholder: "_placeholder_1528c_93",
165
+ error: "_error_1528c_101",
166
+ panel: "_panel_1528c_109",
167
+ calendarHeader: "_calendarHeader_1528c_135",
168
+ weekdays: "_weekdays_1528c_225",
169
+ days: "_days_1528c_227",
170
+ outside: "_outside_1528c_263",
171
+ selected: "_selected_1528c_271",
172
+ timeLabel: "_timeLabel_1528c_291"
173
+ }, N = [
174
174
  "Пн",
175
175
  "Вт",
176
176
  "Ср",
@@ -178,7 +178,7 @@ var T = {
178
178
  "Пт",
179
179
  "Сб",
180
180
  "Вс"
181
- ], M = [
181
+ ], P = [
182
182
  "Январь",
183
183
  "Февраль",
184
184
  "Март",
@@ -191,11 +191,11 @@ var T = {
191
191
  "Октябрь",
192
192
  "Ноябрь",
193
193
  "Декабрь"
194
- ], N = (e) => String(e).padStart(2, "0"), P = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), F = (e, t) => {
194
+ ], F = (e) => String(e).padStart(2, "0"), I = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), L = (e, t) => {
195
195
  if (!e) return "";
196
- let n = `${e.getFullYear()}-${N(e.getMonth() + 1)}-${N(e.getDate())}`, r = `${N(e.getHours())}:${N(e.getMinutes())}`;
196
+ let n = `${e.getFullYear()}-${F(e.getMonth() + 1)}-${F(e.getDate())}`, r = `${F(e.getHours())}:${F(e.getMinutes())}`;
197
197
  return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
198
- }, ee = (e, t) => {
198
+ }, R = (e, t) => {
199
199
  if (!e) return null;
200
200
  if (t === "time") {
201
201
  let t = /^(\d{2}):(\d{2})$/.exec(e);
@@ -207,173 +207,173 @@ var T = {
207
207
  }
208
208
  let n = new Date(t === "date" ? `${e}T00:00` : e);
209
209
  return Number.isNaN(n.getTime()) ? null : n;
210
- }, te = (e, t) => {
210
+ }, ee = (e, t) => {
211
211
  if (!e) return "";
212
- let n = `${N(e.getDate())}.${N(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${N(e.getHours())}:${N(e.getMinutes())}`;
212
+ let n = `${F(e.getDate())}.${F(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${F(e.getHours())}:${F(e.getMinutes())}`;
213
213
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
214
- }, ne = (e) => {
214
+ }, te = (e) => {
215
215
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
216
216
  return r.setDate(t.getDate() - n), Array.from({ length: 42 }, (e, t) => {
217
217
  let n = new Date(r);
218
218
  return n.setDate(r.getDate() + t), n;
219
219
  });
220
- }, re = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ie = (e, t, n) => {
221
- let r = P(e).getTime();
222
- return !!(t && r < P(t).getTime() || n && r > P(n).getTime());
223
- }, I = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: f, hint: p, error: m, disabled: h = !1, readOnly: g = !1, required: _ = !1, min: v, max: y, id: b, name: x, className: S = "" }) => {
224
- let C = c(), w = b ?? `ds-date-time-${x ?? C}`, T = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, k = u(null), N = u(null), [P, I] = d(!1), [L, R] = d(r ?? /* @__PURE__ */ new Date()), [ae, z] = d(F(r, "time")), oe = l(() => ne(L), [L]), B = a !== "time", se = a !== "date";
220
+ }, ne = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), re = (e, t, n) => {
221
+ let r = I(e).getTime();
222
+ return !!(t && r < I(t).getTime() || n && r > I(n).getTime());
223
+ }, z = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: f, hint: p, error: m, disabled: h = !1, readOnly: g = !1, required: _ = !1, min: v, max: y, id: b, name: x, className: S = "" }) => {
224
+ let C = c(), w = b ?? `ds-date-time-${x ?? C}`, T = p ? `${w}-hint` : void 0, E = m ? `${w}-error` : void 0, D = u(null), A = u(null), [j, F] = d(!1), [I, z] = d(r ?? /* @__PURE__ */ new Date()), [ie, ae] = d(L(r, "time")), oe = l(() => te(I), [I]), B = a !== "time", V = a !== "date";
225
225
  s(() => {
226
- r && R(r), z(F(r, "time"));
226
+ r && z(r), ae(L(r, "time"));
227
227
  }, [r]), s(() => {
228
228
  let e = (e) => {
229
- k.current?.contains(e.target) || I(!1);
229
+ D.current?.contains(e.target) || F(!1);
230
230
  }, t = (e) => {
231
- e.key === "Escape" && (I(!1), N.current?.focus());
231
+ e.key === "Escape" && (F(!1), A.current?.focus());
232
232
  };
233
233
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
234
234
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
235
235
  };
236
236
  }, []);
237
- let V = (e) => {
238
- if (ie(e, v, y)) return;
237
+ let H = (e) => {
238
+ if (re(e, v, y)) return;
239
239
  let t = new Date(e);
240
- t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && I(!1);
241
- }, H = (e) => {
242
- if (z(e), !e) {
240
+ t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && F(!1);
241
+ }, se = (e) => {
242
+ if (ae(e), !e) {
243
243
  i?.(null);
244
244
  return;
245
245
  }
246
- let t = ee(e, "time");
246
+ let t = R(e, "time");
247
247
  if (!t) return;
248
- let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
248
+ let n = new Date(a === "datetime" ? r ?? I : /* @__PURE__ */ new Date());
249
249
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(v && n < v || y && n > y) && i?.(n);
250
- }, U = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), W = [T, O].filter(Boolean).join(" ") || void 0;
250
+ }, U = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), ce = [T, E].filter(Boolean).join(" ") || void 0;
251
251
  return /* @__PURE__ */ n("div", {
252
- ref: k,
253
- className: `${A.wrapper} ${S}`,
252
+ ref: D,
253
+ className: `${M.wrapper} ${S}`,
254
254
  children: [
255
- o && /* @__PURE__ */ t(E, {
255
+ o && /* @__PURE__ */ t(O, {
256
256
  htmlFor: w,
257
257
  required: _,
258
258
  disabled: h,
259
259
  children: o
260
260
  }),
261
261
  /* @__PURE__ */ n("button", {
262
- ref: N,
262
+ ref: A,
263
263
  id: w,
264
264
  name: x,
265
265
  type: "button",
266
- className: `${A.trigger} ${m ? A.error : ""}`,
266
+ className: `${M.trigger} ${m ? M.error : ""}`,
267
267
  disabled: h,
268
268
  "aria-readonly": g || void 0,
269
- "aria-expanded": P,
269
+ "aria-expanded": j,
270
270
  "aria-haspopup": "dialog",
271
- "aria-describedby": W,
271
+ "aria-describedby": ce,
272
272
  onClick: () => {
273
- g || I((e) => !e);
273
+ g || F((e) => !e);
274
274
  },
275
275
  children: [/* @__PURE__ */ t("span", {
276
- className: r ? A.value : A.placeholder,
277
- children: te(r, a) || U
276
+ className: r ? M.value : M.placeholder,
277
+ children: ee(r, a) || U
278
278
  }), /* @__PURE__ */ t("span", {
279
279
  "aria-hidden": "true",
280
280
  children: "▾"
281
281
  })]
282
282
  }),
283
- P && !g && /* @__PURE__ */ n("div", {
284
- className: A.panel,
283
+ j && !g && /* @__PURE__ */ n("div", {
284
+ className: M.panel,
285
285
  role: "dialog",
286
286
  "aria-label": o ?? U,
287
287
  children: [B && /* @__PURE__ */ n(e, { children: [
288
288
  /* @__PURE__ */ n("div", {
289
- className: A.calendarHeader,
289
+ className: M.calendarHeader,
290
290
  children: [
291
291
  /* @__PURE__ */ t("button", {
292
292
  type: "button",
293
- className: A.nav,
293
+ className: M.nav,
294
294
  "aria-label": "Предыдущий месяц",
295
- onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
295
+ onClick: () => z(new Date(I.getFullYear(), I.getMonth() - 1, 1)),
296
296
  children: "‹"
297
297
  }),
298
298
  /* @__PURE__ */ t("select", {
299
- className: A.monthSelect,
299
+ className: M.monthSelect,
300
300
  "aria-label": "Месяц",
301
- value: L.getMonth(),
302
- onChange: (e) => R(new Date(L.getFullYear(), Number(e.target.value), 1)),
303
- children: M.map((e, n) => /* @__PURE__ */ t("option", {
301
+ value: I.getMonth(),
302
+ onChange: (e) => z(new Date(I.getFullYear(), Number(e.target.value), 1)),
303
+ children: P.map((e, n) => /* @__PURE__ */ t("option", {
304
304
  value: n,
305
305
  children: e
306
306
  }, e))
307
307
  }),
308
308
  /* @__PURE__ */ t("input", {
309
- className: A.yearInput,
309
+ className: M.yearInput,
310
310
  type: "number",
311
311
  "aria-label": "Год",
312
- value: L.getFullYear(),
313
- onChange: (e) => R(new Date(Number(e.target.value), L.getMonth(), 1))
312
+ value: I.getFullYear(),
313
+ onChange: (e) => z(new Date(Number(e.target.value), I.getMonth(), 1))
314
314
  }),
315
315
  /* @__PURE__ */ t("button", {
316
316
  type: "button",
317
- className: A.nav,
317
+ className: M.nav,
318
318
  "aria-label": "Следующий месяц",
319
- onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
319
+ onClick: () => z(new Date(I.getFullYear(), I.getMonth() + 1, 1)),
320
320
  children: "›"
321
321
  })
322
322
  ]
323
323
  }),
324
324
  /* @__PURE__ */ t("div", {
325
- className: A.weekdays,
326
- children: j.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
325
+ className: M.weekdays,
326
+ children: N.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
327
327
  }),
328
328
  /* @__PURE__ */ t("div", {
329
- className: A.days,
329
+ className: M.days,
330
330
  children: oe.map((e) => {
331
- let n = re(r, e);
331
+ let n = ne(r, e);
332
332
  return /* @__PURE__ */ t("button", {
333
333
  type: "button",
334
- className: `${A.day} ${e.getMonth() === L.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
335
- disabled: ie(e, v, y),
334
+ className: `${M.day} ${e.getMonth() === I.getMonth() ? "" : M.outside} ${n ? M.selected : ""}`,
335
+ disabled: re(e, v, y),
336
336
  "aria-pressed": n,
337
- onClick: () => V(e),
337
+ onClick: () => H(e),
338
338
  children: e.getDate()
339
339
  }, e.toISOString());
340
340
  })
341
341
  })
342
- ] }), se && /* @__PURE__ */ n("label", {
343
- className: A.timeLabel,
342
+ ] }), V && /* @__PURE__ */ n("label", {
343
+ className: M.timeLabel,
344
344
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
345
- className: A.timeInput,
345
+ className: M.timeInput,
346
346
  type: "time",
347
- value: ae,
348
- onChange: (e) => H(e.target.value)
347
+ value: ie,
348
+ onChange: (e) => se(e.target.value)
349
349
  })]
350
350
  })]
351
351
  }),
352
- p && !m && /* @__PURE__ */ t(D, {
352
+ p && !m && /* @__PURE__ */ t(k, {
353
353
  id: T,
354
354
  children: p
355
355
  }),
356
- m && /* @__PURE__ */ t(D, {
357
- id: O,
356
+ m && /* @__PURE__ */ t(k, {
357
+ id: E,
358
358
  variant: "error",
359
359
  children: m
360
360
  })
361
361
  ]
362
362
  });
363
- }, L = {
364
- root: "_root_9h2e2_1",
365
- legend: "_legend_9h2e2_2",
366
- range: "_range_9h2e2_3"
367
- }, R = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), ae = ({ 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 = "" }) => {
363
+ }, ie = {
364
+ root: "_root_1q42e_1",
365
+ legend: "_legend_1q42e_3",
366
+ range: "_range_1q42e_5"
367
+ }, ae = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), oe = ({ 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 = "" }) => {
368
368
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
369
- i?.(e), R(e) && r?.(e);
369
+ i?.(e), ae(e) && r?.(e);
370
370
  };
371
371
  return /* @__PURE__ */ n("fieldset", {
372
- className: `${L.root} ${h}`,
372
+ className: `${ie.root} ${h}`,
373
373
  disabled: f,
374
374
  children: [/* @__PURE__ */ n("div", {
375
- className: L.range,
376
- children: [/* @__PURE__ */ t(I, {
375
+ className: ie.range,
376
+ children: [/* @__PURE__ */ t(z, {
377
377
  value: e.from,
378
378
  mode: a === "datetime" ? "datetime" : a,
379
379
  label: o,
@@ -387,7 +387,7 @@ var T = {
387
387
  ...e,
388
388
  from: t
389
389
  })
390
- }), /* @__PURE__ */ t(I, {
390
+ }), /* @__PURE__ */ t(z, {
391
391
  value: e.to,
392
392
  mode: a === "datetime" ? "datetime" : a,
393
393
  label: s,
@@ -402,27 +402,27 @@ var T = {
402
402
  to: t
403
403
  })
404
404
  })]
405
- }), c && !g && /* @__PURE__ */ t(D, { children: c })]
405
+ }), c && !g && /* @__PURE__ */ t(k, { children: c })]
406
406
  });
407
- }, z = {
408
- group: "_group_1st6r_1",
409
- skeleton: "_skeleton_1st6r_2",
410
- text: "_text_1st6r_3",
411
- rectangular: "_rectangular_1st6r_4",
412
- circular: "_circular_1st6r_5",
413
- animated: "_animated_1st6r_6",
414
- "ds-skeleton": "_ds-skeleton_1st6r_1"
415
- }, oe = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
- className: `${z.group} ${o}`,
407
+ }, B = {
408
+ group: "_group_1fs9e_1",
409
+ skeleton: "_skeleton_1fs9e_3",
410
+ text: "_text_1fs9e_5",
411
+ rectangular: "_rectangular_1fs9e_7",
412
+ circular: "_circular_1fs9e_9",
413
+ animated: "_animated_1fs9e_11",
414
+ "ds-skeleton": "_ds-skeleton_1fs9e_1"
415
+ }, V = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
+ className: `${B.group} ${o}`,
417
417
  "aria-hidden": "true",
418
418
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
419
- className: `${z.skeleton} ${z[e]} ${a ? z.animated : ""}`,
419
+ className: `${B.skeleton} ${B[e]} ${a ? B.animated : ""}`,
420
420
  style: {
421
421
  width: s === i - 1 && i > 1 ? "70%" : n,
422
422
  height: r
423
423
  }
424
424
  }, s))
425
- }), B = {
425
+ }), H = {
426
426
  wrapper: "_wrapper_dkn63_1",
427
427
  label: "_label_dkn63_17",
428
428
  container: "_container_dkn63_29",
@@ -444,7 +444,7 @@ var T = {
444
444
  if (!e[i]?.disabled) return i;
445
445
  }
446
446
  return -1;
447
- }, V = ({ options: r, value: i, onChange: a, placeholder: o = "Выберите опцию", disabled: f = !1, stringWhileDisabled: p = !1, label: m, error: h, hint: g, className: _ = "", name: v, id: y, needMark: b = !0, maxMenuHeight: x }) => {
447
+ }, U = ({ options: r, value: i, onChange: a, placeholder: o = "Выберите опцию", disabled: f = !1, stringWhileDisabled: p = !1, label: m, error: h, hint: g, className: _ = "", name: v, id: y, needMark: b = !0, maxMenuHeight: x }) => {
448
448
  let S = c(), C = y ?? `ds-dropdown-${v ?? S}`, [w, T] = d(!1), E = u(null), D = u(null), O = u([]), k = l(() => r.find((e) => e.value === i), [r, i]), A = g ? `${C}-hint` : void 0, j = h ? `${C}-error` : void 0, M = [A, j].filter(Boolean).join(" ") || void 0, N = f && p;
449
449
  s(() => {
450
450
  let e = (e) => {
@@ -465,21 +465,21 @@ var T = {
465
465
  return /* @__PURE__ */ n("div", {
466
466
  ref: E,
467
467
  className: [
468
- B.wrapper,
469
- h ? B.errorState : "",
468
+ H.wrapper,
469
+ h ? H.errorState : "",
470
470
  _
471
471
  ].filter(Boolean).join(" "),
472
472
  children: [
473
473
  m && /* @__PURE__ */ t("label", {
474
474
  htmlFor: N ? void 0 : C,
475
- className: B.label,
475
+ className: H.label,
476
476
  children: m
477
477
  }),
478
478
  /* @__PURE__ */ t("div", {
479
- className: B.container,
479
+ className: H.container,
480
480
  children: N ? /* @__PURE__ */ t("div", {
481
481
  id: C,
482
- className: B.disabledText,
482
+ className: H.disabledText,
483
483
  "aria-describedby": M,
484
484
  children: k?.label ?? o
485
485
  }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("button", {
@@ -487,7 +487,7 @@ var T = {
487
487
  id: C,
488
488
  type: "button",
489
489
  name: v,
490
- className: B.trigger,
490
+ className: H.trigger,
491
491
  disabled: f,
492
492
  "aria-haspopup": "listbox",
493
493
  "aria-expanded": w,
@@ -503,10 +503,10 @@ var T = {
503
503
  }
504
504
  },
505
505
  children: [/* @__PURE__ */ t("span", {
506
- className: k ? B.value : B.placeholder,
506
+ className: k ? H.value : H.placeholder,
507
507
  children: k?.label ?? o
508
508
  }), /* @__PURE__ */ t("span", {
509
- className: `${B.chevron} ${w ? B.chevronOpen : ""}`,
509
+ className: `${H.chevron} ${w ? H.chevronOpen : ""}`,
510
510
  "aria-hidden": "true",
511
511
  children: /* @__PURE__ */ t("svg", {
512
512
  viewBox: "0 0 20 20",
@@ -522,7 +522,7 @@ var T = {
522
522
  })]
523
523
  }), w && /* @__PURE__ */ t("ul", {
524
524
  id: `${C}-listbox`,
525
- className: B.menu,
525
+ className: H.menu,
526
526
  role: "listbox",
527
527
  "aria-label": m,
528
528
  style: { maxHeight: x },
@@ -538,7 +538,7 @@ var T = {
538
538
  role: "option",
539
539
  "aria-selected": o,
540
540
  disabled: e.disabled,
541
- className: `${B.option} ${o ? B.selected : ""}`,
541
+ className: `${H.option} ${o ? H.selected : ""}`,
542
542
  onClick: () => F(e),
543
543
  onKeyDown: (e) => {
544
544
  if ((e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), P(a + (e.key === "ArrowDown" ? 1 : -1), e.key === "ArrowDown" ? 1 : -1)), e.key === "Tab" && T(!1), e.key === "Home" || e.key === "End") {
@@ -558,35 +558,35 @@ var T = {
558
558
  }),
559
559
  g && !h && /* @__PURE__ */ t("span", {
560
560
  id: A,
561
- className: B.message,
561
+ className: H.message,
562
562
  children: g
563
563
  }),
564
564
  h && /* @__PURE__ */ t("span", {
565
565
  id: j,
566
- className: B.error,
566
+ className: H.error,
567
567
  children: h
568
568
  })
569
569
  ]
570
570
  });
571
- }, H = (e) => `${e.id}:${e.direction}`, U = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
571
+ }, ce = (e) => `${e.id}:${e.direction}`, le = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
572
572
  let c = e.flatMap((e) => [{
573
- value: H({
573
+ value: ce({
574
574
  id: e.id,
575
575
  direction: "asc"
576
576
  }),
577
577
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
578
578
  disabled: e.disabled
579
579
  }, {
580
- value: H({
580
+ value: ce({
581
581
  id: e.id,
582
582
  direction: "desc"
583
583
  }),
584
584
  label: e.descLabel ?? `${e.label} · по убыванию`,
585
585
  disabled: e.disabled
586
586
  }]);
587
- return /* @__PURE__ */ t(V, {
587
+ return /* @__PURE__ */ t(U, {
588
588
  options: c,
589
- value: n ? H(n) : "",
589
+ value: n ? ce(n) : "",
590
590
  label: i,
591
591
  placeholder: a,
592
592
  disabled: o,
@@ -600,96 +600,132 @@ var T = {
600
600
  }
601
601
  });
602
602
  }, W = {
603
- root: "_root_i4d62_1",
604
- tableWrap: "_tableWrap_i4d62_2",
605
- table: "_table_i4d62_2",
606
- sticky: "_sticky_i4d62_8",
607
- sortButton: "_sortButton_i4d62_9",
608
- state: "_state_i4d62_11",
609
- cards: "_cards_i4d62_12",
610
- mobileSort: "_mobileSort_i4d62_12",
611
- card: "_card_i4d62_12",
612
- spanTwo: "_spanTwo_i4d62_19",
613
- default: "_default_i4d62_21",
614
- tableOnMobile: "_tableOnMobile_i4d62_21",
615
- wide: "_wide_i4d62_23"
616
- }, ce = h({
617
- rowSortingFeature: m,
618
- sortedRowModel: p()
619
- }), le = (e, t) => {
603
+ root: "_root_1h9ti_1",
604
+ tableWrap: "_tableWrap_1h9ti_3",
605
+ table: "_table_1h9ti_3",
606
+ sticky: "_sticky_1h9ti_15",
607
+ sortButton: "_sortButton_1h9ti_17",
608
+ state: "_state_1h9ti_21",
609
+ cards: "_cards_1h9ti_23",
610
+ mobileSort: "_mobileSort_1h9ti_23",
611
+ card: "_card_1h9ti_23",
612
+ spanTwo: "_spanTwo_1h9ti_37",
613
+ default: "_default_1h9ti_41",
614
+ tableOnMobile: "_tableOnMobile_1h9ti_41",
615
+ wide: "_wide_1h9ti_45"
616
+ }, ue = _({
617
+ rowSortingFeature: p,
618
+ sortedRowModel: f(),
619
+ sortFns: {
620
+ alphanumeric: m,
621
+ basic: h,
622
+ text: g
623
+ }
624
+ }), de = (e, t) => {
620
625
  let n = /* @__PURE__ */ new Set();
621
626
  for (let t of e) {
622
627
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
623
628
  if (n.has(t.id)) return `Идентификатор колонки «${t.id}» повторяется`;
624
629
  n.add(t.id);
625
630
  }
626
- for (let n = 0; n < t.length; n += 1) for (let r of e) if (typeof r.accessor == "string" && !(r.accessor in t[n])) return `В строке ${n + 1} отсутствует колонка «${r.id}»`;
631
+ for (let n = 0; n < t.length; n += 1) {
632
+ let r = t[n];
633
+ for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
634
+ }
627
635
  return null;
628
- }, ue = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: p, ariaLabel: m, loading: h = !1, error: _, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "" }) => {
629
- let [S, C] = d([]), w = o ?? S, T = l(() => le(e, r), [e, r]), E = l(() => f(), []), D = l(() => E.columns(e.map((e) => {
630
- let t = e.accessor;
631
- return E.accessor(typeof t == "function" ? t : (e) => e[t], {
632
- id: e.id,
633
- header: () => e.header,
634
- cell: (t) => e.cell?.(t.row.original, t.getValue()) ?? String(t.getValue() ?? ""),
635
- enableSorting: !0,
636
- sortDescFirst: e.sortDescFirst
637
- });
638
- })), [e, E]), O = g({
639
- features: ce,
640
- columns: D,
636
+ }, fe = (e) => {
637
+ if (e == null || e === "") return null;
638
+ let t = Date.parse(String(e));
639
+ return Number.isNaN(t) ? null : t;
640
+ }, pe = (e, t, n) => {
641
+ let r = fe(e.getValue(n)), i = fe(t.getValue(n));
642
+ return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
643
+ }, me = (e, t, n) => {
644
+ let r = e.getValue(n), i = t.getValue(n);
645
+ return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
646
+ }, he = (e, t, n) => {
647
+ let r = e.getValue(n), i = t.getValue(n);
648
+ return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
649
+ }, ge = (e) => {
650
+ switch (e) {
651
+ case "date": return pe;
652
+ case "number": return me;
653
+ case "boolean": return he;
654
+ case "text": return "text";
655
+ default: return;
656
+ }
657
+ }, _e = (e) => typeof e == "function" ? e : (t) => t[e], ve = (e) => {
658
+ let t = _e(e.accessor), n = e.enableSorting ?? (e.dataType !== void 0 && e.dataType !== "custom"), r = ge(e.dataType), i = {
659
+ id: e.id,
660
+ accessorFn: t,
661
+ header: () => e.header,
662
+ cell: (t) => {
663
+ let n = t.getValue();
664
+ return e.cell?.(t.row.original, n) ?? String(n ?? "");
665
+ },
666
+ enableSorting: n,
667
+ sortDescFirst: e.sortDescFirst
668
+ };
669
+ return r !== void 0 && (i.sortFn = r), i;
670
+ }, ye = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: u, caption: f, ariaLabel: p, loading: m = !1, error: h, emptyState: g = "Нет данных", stickyHeader: _ = !1, maxHeight: y, className: b = "" }) => {
671
+ let [x, S] = d([]), C = o ?? x, w = l(() => de(e, r), [e, r]), T = l(() => e.map((e) => ve(e)), [e]), E = v({
672
+ features: ue,
673
+ columns: T,
641
674
  data: r,
642
- state: { sorting: w },
675
+ state: { sorting: C },
643
676
  onSortingChange: (e) => {
644
- let t = typeof e == "function" ? e(w) : e;
645
- o === void 0 && C(t), s?.(t);
677
+ let t = typeof e == "function" ? e(C) : e;
678
+ o === void 0 && S(t), s?.(t);
646
679
  },
647
680
  getRowId: u
648
- }), k = O.getRowModel().rows, A = e.map((e) => ({
681
+ }, (e) => e), D = E.getRowModel().rows, O = e.filter((e) => e.enableSorting ?? (e.dataType !== void 0 && e.dataType !== "custom")).map((e) => ({
649
682
  id: e.id,
650
683
  label: typeof e.header == "string" ? e.header : e.id
651
- })), j = [
684
+ })), k = [
652
685
  W.root,
653
686
  a === "wide" ? W.wide : W.default,
654
687
  i ? W.tableOnMobile : "",
655
- x
656
- ].filter(Boolean).join(" "), M = T ?? _;
688
+ b
689
+ ].filter(Boolean).join(" "), A = w ?? h;
657
690
  return /* @__PURE__ */ n("section", {
658
- className: j,
659
- "aria-busy": h,
691
+ className: k,
692
+ "aria-busy": m,
660
693
  children: [
661
- !i && !h && !M && k.length > 0 && /* @__PURE__ */ t(U, {
694
+ !i && !m && !A && D.length > 0 && O.length > 0 && /* @__PURE__ */ t(le, {
662
695
  className: W.mobileSort,
663
- options: A,
664
- value: w[0] ? {
665
- id: w[0].id,
666
- direction: w[0].desc ? "desc" : "asc"
696
+ options: O,
697
+ value: C[0] ? {
698
+ id: C[0].id,
699
+ direction: C[0].desc ? "desc" : "asc"
667
700
  } : null,
668
- onChange: (e) => O.setSorting([{
669
- id: e.id,
670
- desc: e.direction === "desc"
671
- }])
701
+ onChange: (e) => {
702
+ E.setSorting([{
703
+ id: e.id,
704
+ desc: e.direction === "desc"
705
+ }]);
706
+ }
672
707
  }),
673
708
  /* @__PURE__ */ t("div", {
674
709
  className: W.tableWrap,
675
- style: { maxHeight: b },
710
+ style: { maxHeight: y },
676
711
  children: /* @__PURE__ */ n("table", {
677
712
  className: W.table,
678
- "aria-label": m,
713
+ "aria-label": p,
679
714
  children: [
680
- p && /* @__PURE__ */ t("caption", { children: p }),
715
+ f && /* @__PURE__ */ t("caption", { children: f }),
681
716
  /* @__PURE__ */ t("thead", {
682
- className: y ? W.sticky : "",
683
- children: O.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
684
- let r = e.column.getIsSorted();
717
+ className: _ ? W.sticky : "",
718
+ children: E.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
719
+ let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
685
720
  return /* @__PURE__ */ t("th", {
686
721
  scope: "col",
687
722
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
688
723
  children: /* @__PURE__ */ n("button", {
689
724
  type: "button",
690
725
  className: W.sortButton,
691
- onClick: e.column.getToggleSortingHandler(),
692
- children: [/* @__PURE__ */ t(O.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
726
+ disabled: !i,
727
+ onClick: a,
728
+ children: [/* @__PURE__ */ t(E.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
693
729
  "aria-hidden": "true",
694
730
  children: r === "asc" ? "↑" : r === "desc" ? "↓" : "↕"
695
731
  })]
@@ -697,32 +733,32 @@ var T = {
697
733
  }, e.id);
698
734
  }) }, e.id))
699
735
  }),
700
- /* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
736
+ /* @__PURE__ */ t("tbody", { children: m ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
701
737
  colSpan: e.length,
702
- children: /* @__PURE__ */ t(oe, { lines: 3 })
703
- }) }) : M ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
738
+ children: /* @__PURE__ */ t(V, { lines: 3 })
739
+ }) }) : A ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
704
740
  className: W.state,
705
741
  colSpan: e.length,
706
- children: M
707
- }) }) : k.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
742
+ children: A
743
+ }) }) : D.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
708
744
  className: W.state,
709
745
  colSpan: e.length,
710
- children: v
711
- }) }) : k.map((e) => /* @__PURE__ */ t("tr", { children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(O.FlexRender, { cell: e }) }, e.id)) }, e.id)) })
746
+ children: g
747
+ }) }) : D.map((e) => /* @__PURE__ */ t("tr", { children: e.getAllCells().map((e) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(E.FlexRender, { cell: e }) }, e.id)) }, e.id)) })
712
748
  ]
713
749
  })
714
750
  }),
715
751
  !i && /* @__PURE__ */ t("div", {
716
752
  className: W.cards,
717
753
  role: "list",
718
- "aria-label": m ?? p,
719
- children: h ? /* @__PURE__ */ t(oe, { lines: 4 }) : M ? /* @__PURE__ */ t("div", {
754
+ "aria-label": p ?? f,
755
+ children: m ? /* @__PURE__ */ t(V, { lines: 4 }) : A ? /* @__PURE__ */ t("div", {
720
756
  className: W.state,
721
- children: M
722
- }) : k.length === 0 ? /* @__PURE__ */ t("div", {
757
+ children: A
758
+ }) : D.length === 0 ? /* @__PURE__ */ t("div", {
723
759
  className: W.state,
724
- children: v
725
- }) : k.map((r) => {
760
+ children: g
761
+ }) : D.map((r) => {
726
762
  if (c) return /* @__PURE__ */ t("div", {
727
763
  role: "listitem",
728
764
  children: c({
@@ -747,7 +783,7 @@ var T = {
747
783
  })
748
784
  ]
749
785
  });
750
- }, de = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
786
+ }, be = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
751
787
  let b = c(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = d(!1), w = u(null), T = u(null), E = u([]), D = l(() => e.filter((e) => r.includes(e.value)), [e, r]), O = D.map((e) => e.label).join(", "), k = m ? `${x}-hint` : void 0, A = p ? `${x}-error` : void 0;
752
788
  s(() => {
753
789
  let e = (e) => {
@@ -770,24 +806,24 @@ var T = {
770
806
  return /* @__PURE__ */ n("div", {
771
807
  ref: w,
772
808
  className: [
773
- B.wrapper,
774
- p ? B.errorState : "",
809
+ H.wrapper,
810
+ p ? H.errorState : "",
775
811
  h
776
812
  ].filter(Boolean).join(" "),
777
813
  children: [
778
814
  f && /* @__PURE__ */ t("label", {
779
815
  htmlFor: x,
780
- className: B.label,
816
+ className: H.label,
781
817
  children: f
782
818
  }),
783
819
  /* @__PURE__ */ n("div", {
784
- className: B.container,
820
+ className: H.container,
785
821
  children: [/* @__PURE__ */ n("button", {
786
822
  ref: T,
787
823
  id: x,
788
824
  type: "button",
789
825
  name: g,
790
- className: B.trigger,
826
+ className: H.trigger,
791
827
  disabled: o,
792
828
  "aria-haspopup": "listbox",
793
829
  "aria-expanded": S,
@@ -803,16 +839,16 @@ var T = {
803
839
  }
804
840
  },
805
841
  children: [/* @__PURE__ */ t("span", {
806
- className: D.length ? B.value : B.placeholder,
842
+ className: D.length ? H.value : H.placeholder,
807
843
  children: O || a
808
844
  }), /* @__PURE__ */ t("span", {
809
- className: `${B.chevron} ${S ? B.chevronOpen : ""}`,
845
+ className: `${H.chevron} ${S ? H.chevronOpen : ""}`,
810
846
  "aria-hidden": "true",
811
847
  children: "⌄"
812
848
  })]
813
849
  }), S && /* @__PURE__ */ t("ul", {
814
850
  id: `${x}-listbox`,
815
- className: B.menu,
851
+ className: H.menu,
816
852
  role: "listbox",
817
853
  "aria-label": f,
818
854
  "aria-multiselectable": "true",
@@ -829,7 +865,7 @@ var T = {
829
865
  role: "option",
830
866
  "aria-selected": o,
831
867
  disabled: i.disabled,
832
- className: `${B.option} ${o ? B.selected : ""}`,
868
+ className: `${H.option} ${o ? H.selected : ""}`,
833
869
  onClick: () => j(i),
834
870
  onKeyDown: (t) => {
835
871
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
@@ -855,17 +891,17 @@ var T = {
855
891
  }),
856
892
  m && !p && /* @__PURE__ */ t("span", {
857
893
  id: k,
858
- className: B.message,
894
+ className: H.message,
859
895
  children: m
860
896
  }),
861
897
  p && /* @__PURE__ */ t("span", {
862
898
  id: A,
863
- className: B.error,
899
+ className: H.error,
864
900
  children: p
865
901
  })
866
902
  ]
867
903
  });
868
- }, fe = {
904
+ }, xe = {
869
905
  approve: "M4 12l5 5L20 6",
870
906
  reject: "M5 5l14 14M19 5L5 19",
871
907
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -874,7 +910,7 @@ var T = {
874
910
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
875
911
  info: "M12 10v7m0-10v.01",
876
912
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
877
- }, pe = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
913
+ }, Se = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
878
914
  viewBox: "0 0 24 24",
879
915
  width: i,
880
916
  height: a,
@@ -887,14 +923,14 @@ var T = {
887
923
  "aria-hidden": !r || void 0,
888
924
  focusable: "false",
889
925
  ...o,
890
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: fe[e] })]
926
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: xe[e] })]
891
927
  }), G = {
892
- root: "_root_1897l_1",
893
- header: "_header_1897l_11",
894
- title: "_title_1897l_21",
895
- dismiss: "_dismiss_1897l_28",
896
- content: "_content_1897l_57"
897
- }, me = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
928
+ root: "_root_1y2s8_1",
929
+ header: "_header_1y2s8_21",
930
+ title: "_title_1y2s8_41",
931
+ dismiss: "_dismiss_1y2s8_55",
932
+ content: "_content_1y2s8_113"
933
+ }, Ce = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
898
934
  let u = `ds-info-block-${c()}`;
899
935
  return /* @__PURE__ */ n("section", {
900
936
  className: `${G.root} ${l}`,
@@ -928,85 +964,111 @@ var T = {
928
964
  })]
929
965
  });
930
966
  }, K = {
931
- wrapper: "_wrapper_1bpdz_1",
932
- control: "_control_1bpdz_3",
933
- input: "_input_1bpdz_5",
934
- disabledText: "_disabledText_1bpdz_5",
935
- inputError: "_inputError_1bpdz_11",
936
- clear: "_clear_1bpdz_13"
937
- }, he = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: s = !1, stringWhileDisabled: l = !1, label: d, error: f, hint: p, className: m = "", name: h, id: g, clearable: _ = !0, required: v = !1, selectTextOnFocus: y = !1, onFocus: b, ...x }) => {
938
- let S = c(), C = g ?? `ds-input-${h ?? S}`, w = u(null), T = p ? `${C}-hint` : void 0, O = f ? `${C}-error` : void 0, k = String(e ?? ""), A = [T, O].filter(Boolean).join(" ") || void 0;
939
- return /* @__PURE__ */ n("div", {
940
- className: `${K.wrapper} ${m}`,
967
+ wrapper: "_wrapper_1tz82_1",
968
+ control: "_control_1tz82_3",
969
+ input: "_input_1tz82_5",
970
+ disabledText: "_disabledText_1tz82_5",
971
+ inputError: "_inputError_1tz82_11",
972
+ trailingAction: "_trailingAction_1tz82_13"
973
+ }, we = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: f = !1, label: p, error: m, hint: h, className: g = "", name: _, id: v, clearable: y = !0, required: b = !1, selectTextOnFocus: x = !1, isPassword: S = !1, passwordVisibleLabel: C = "Скрыть пароль", passwordHiddenLabel: w = "Показать пароль", onFocus: T, ...E }) => {
974
+ let D = c(), A = v ?? `ds-input-${_ ?? D}`, j = u(null), [M, N] = d(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, R = S ? M ? "text" : "password" : i;
975
+ return s(() => {
976
+ S || N(!1);
977
+ }, [S]), /* @__PURE__ */ n("div", {
978
+ className: `${K.wrapper} ${g}`,
941
979
  children: [
942
- d && /* @__PURE__ */ t(E, {
943
- htmlFor: C,
944
- required: v,
980
+ p && /* @__PURE__ */ t(O, {
981
+ htmlFor: A,
982
+ required: b,
945
983
  disabled: o,
946
- children: d
984
+ children: p
947
985
  }),
948
- o && l ? /* @__PURE__ */ t("div", {
949
- id: C,
986
+ o && f ? /* @__PURE__ */ t("div", {
987
+ id: A,
950
988
  className: K.disabledText,
951
- "aria-describedby": A,
952
- children: k || a
989
+ "aria-describedby": L,
990
+ children: I || a
953
991
  }) : /* @__PURE__ */ n("div", {
954
992
  className: K.control,
955
- children: [/* @__PURE__ */ t("input", {
956
- ref: w,
957
- id: C,
958
- name: h,
959
- type: i,
960
- value: k,
961
- placeholder: a,
962
- disabled: o,
963
- readOnly: s,
964
- required: v,
965
- "aria-invalid": !!f,
966
- "aria-describedby": A,
967
- className: `${K.input} ${f ? K.inputError : ""}`,
968
- onChange: (e) => {
969
- if (i === "number") {
970
- let t = e.target.value === "" ? "" : Number(e.target.value);
971
- r?.(t, e);
972
- return;
973
- }
974
- r?.(e.target.value, e);
975
- },
976
- onFocus: (e) => {
977
- y && e.currentTarget.value && e.currentTarget.select(), b?.(e);
978
- },
979
- ...x
980
- }), _ && k && !o && !s && /* @__PURE__ */ t("button", {
981
- type: "button",
982
- className: K.clear,
983
- "aria-label": "Очистить поле",
984
- onClick: () => {
985
- let e = w.current;
986
- e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
987
- },
988
- children: "×"
989
- })]
993
+ children: [
994
+ /* @__PURE__ */ t("input", {
995
+ ref: j,
996
+ id: A,
997
+ name: _,
998
+ type: R,
999
+ value: I,
1000
+ placeholder: a,
1001
+ disabled: o,
1002
+ readOnly: l,
1003
+ required: b,
1004
+ "aria-invalid": !!m,
1005
+ "aria-describedby": L,
1006
+ className: `${K.input} ${m ? K.inputError : ""}`,
1007
+ onChange: (e) => {
1008
+ if (i === "number" && !S) {
1009
+ let t = e.target.value === "" ? "" : Number(e.target.value);
1010
+ r?.(t, e);
1011
+ return;
1012
+ }
1013
+ r?.(e.target.value, e);
1014
+ },
1015
+ onFocus: (e) => {
1016
+ x && e.currentTarget.value && e.currentTarget.select(), T?.(e);
1017
+ },
1018
+ ...E
1019
+ }),
1020
+ S && /* @__PURE__ */ t("button", {
1021
+ type: "button",
1022
+ className: K.trailingAction,
1023
+ disabled: o,
1024
+ "aria-label": M ? C : w,
1025
+ "aria-pressed": M,
1026
+ onClick: () => N((e) => !e),
1027
+ children: M ? /* @__PURE__ */ t("svg", {
1028
+ viewBox: "0 0 24 24",
1029
+ "aria-hidden": "true",
1030
+ children: /* @__PURE__ */ t("path", { d: "M3 3l18 18M10.6 10.7a2 2 0 0 0 2.7 2.7M9.9 4.2A10.7 10.7 0 0 1 12 4c5.5 0 9 5.3 9 5.3a14 14 0 0 1-2.3 2.8M6.6 6.6C4.3 8.1 3 10 3 10s3.5 5 9 5c1 0 2-.2 2.8-.5" })
1031
+ }) : /* @__PURE__ */ n("svg", {
1032
+ viewBox: "0 0 24 24",
1033
+ "aria-hidden": "true",
1034
+ children: [/* @__PURE__ */ t("path", { d: "M3 12s3.5-5 9-5 9 5 9 5-3.5 5-9 5-9-5-9-5Z" }), /* @__PURE__ */ t("circle", {
1035
+ cx: "12",
1036
+ cy: "12",
1037
+ r: "2.5"
1038
+ })]
1039
+ })
1040
+ }),
1041
+ !S && y && I && !o && !l && /* @__PURE__ */ t("button", {
1042
+ type: "button",
1043
+ className: K.trailingAction,
1044
+ "aria-label": "Очистить поле",
1045
+ onClick: () => {
1046
+ let e = j.current;
1047
+ e && ((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
1048
+ },
1049
+ children: "×"
1050
+ })
1051
+ ]
990
1052
  }),
991
- p && !f && /* @__PURE__ */ t(D, {
992
- id: T,
993
- children: p
1053
+ h && !m && /* @__PURE__ */ t(k, {
1054
+ id: P,
1055
+ children: h
994
1056
  }),
995
- f && /* @__PURE__ */ t(D, {
996
- id: O,
1057
+ m && /* @__PURE__ */ t(k, {
1058
+ id: F,
997
1059
  variant: "error",
998
- children: f
1060
+ children: m
999
1061
  })
1000
1062
  ]
1001
1063
  });
1002
1064
  }, q = {
1003
- wrapper: "_wrapper_8srjz_1",
1004
- input: "_input_8srjz_11",
1005
- switch: "_switch_8srjz_18",
1006
- thumb: "_thumb_8srjz_34",
1007
- label: "_label_8srjz_56",
1008
- disabled: "_disabled_8srjz_62"
1009
- }, ge = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1065
+ wrapper: "_wrapper_vu1ob_1",
1066
+ input: "_input_vu1ob_21",
1067
+ switch: "_switch_vu1ob_35",
1068
+ thumb: "_thumb_vu1ob_67",
1069
+ label: "_label_vu1ob_111",
1070
+ disabled: "_disabled_vu1ob_123"
1071
+ }, Te = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1010
1072
  let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1011
1073
  return /* @__PURE__ */ n("label", {
1012
1074
  htmlFor: p,
@@ -1037,11 +1099,11 @@ var T = {
1037
1099
  })
1038
1100
  ]
1039
1101
  });
1040
- }, _e = {
1102
+ }, Ee = {
1041
1103
  root: "_root_kepgo_1",
1042
1104
  grid: "_grid_kepgo_3",
1043
1105
  actions: "_actions_kepgo_5"
1044
- }, ve = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1106
+ }, De = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1045
1107
  let d = (e, t) => {
1046
1108
  let n = {
1047
1109
  ...r,
@@ -1050,11 +1112,11 @@ var T = {
1050
1112
  i?.(n, e), s === "instant" && a?.(n);
1051
1113
  };
1052
1114
  return /* @__PURE__ */ n("section", {
1053
- className: `${_e.root} ${u}`,
1115
+ className: `${Ee.root} ${u}`,
1054
1116
  "aria-label": "Фильтры",
1055
1117
  "aria-busy": c,
1056
1118
  children: [/* @__PURE__ */ t("div", {
1057
- className: _e.grid,
1119
+ className: Ee.grid,
1058
1120
  children: e.filter((e) => !e.hidden).map((e) => {
1059
1121
  let n = l || c || e.disabled, i = r[e.id];
1060
1122
  if (e.type === "input") {
@@ -1065,19 +1127,19 @@ var T = {
1065
1127
  placeholder: e.placeholder,
1066
1128
  disabled: n
1067
1129
  };
1068
- return e.inputType === "number" ? /* @__PURE__ */ t(he, {
1130
+ return e.inputType === "number" ? /* @__PURE__ */ t(we, {
1069
1131
  ...r,
1070
1132
  type: "number",
1071
1133
  value: i ?? "",
1072
1134
  onChange: (t) => d(e.id, t)
1073
- }) : /* @__PURE__ */ t(he, {
1135
+ }) : /* @__PURE__ */ t(we, {
1074
1136
  ...r,
1075
1137
  type: "text",
1076
1138
  value: String(i ?? ""),
1077
1139
  onChange: (t) => d(e.id, t)
1078
1140
  });
1079
1141
  }
1080
- if (e.type === "dropdown") return /* @__PURE__ */ t(V, {
1142
+ if (e.type === "dropdown") return /* @__PURE__ */ t(U, {
1081
1143
  label: e.label,
1082
1144
  hint: e.hint,
1083
1145
  placeholder: e.placeholder,
@@ -1086,7 +1148,7 @@ var T = {
1086
1148
  disabled: n,
1087
1149
  onChange: (t) => d(e.id, t)
1088
1150
  }, e.id);
1089
- if (e.type === "multiple") return /* @__PURE__ */ t(de, {
1151
+ if (e.type === "multiple") return /* @__PURE__ */ t(be, {
1090
1152
  label: e.label,
1091
1153
  hint: e.hint,
1092
1154
  placeholder: e.placeholder,
@@ -1095,14 +1157,14 @@ var T = {
1095
1157
  disabled: n,
1096
1158
  onChange: (t) => d(e.id, t)
1097
1159
  }, e.id);
1098
- if (e.type === "checkbox") return /* @__PURE__ */ t(k, {
1160
+ if (e.type === "checkbox") return /* @__PURE__ */ t(j, {
1099
1161
  label: e.label,
1100
1162
  hint: e.hint,
1101
1163
  checked: !!i,
1102
1164
  disabled: n,
1103
1165
  onChange: (t) => d(e.id, t)
1104
1166
  }, e.id);
1105
- if (e.type === "radio") return /* @__PURE__ */ t(ge, {
1167
+ if (e.type === "radio") return /* @__PURE__ */ t(Te, {
1106
1168
  label: e.label,
1107
1169
  checked: !!i,
1108
1170
  disabled: n,
@@ -1112,7 +1174,7 @@ var T = {
1112
1174
  from: null,
1113
1175
  to: null
1114
1176
  };
1115
- return /* @__PURE__ */ t(ae, {
1177
+ return /* @__PURE__ */ t(oe, {
1116
1178
  hint: e.hint,
1117
1179
  mode: e.mode,
1118
1180
  min: e.min,
@@ -1123,13 +1185,13 @@ var T = {
1123
1185
  }, e.id);
1124
1186
  })
1125
1187
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1126
- className: _e.actions,
1127
- children: [o && /* @__PURE__ */ t(w, {
1188
+ className: Ee.actions,
1189
+ children: [o && /* @__PURE__ */ t(E, {
1128
1190
  variant: "destructiveOutline",
1129
1191
  disabled: l || c,
1130
1192
  onClick: o,
1131
1193
  children: "Сбросить"
1132
- }), s === "manual" && /* @__PURE__ */ t(w, {
1194
+ }), s === "manual" && /* @__PURE__ */ t(E, {
1133
1195
  isLoading: c,
1134
1196
  disabled: l,
1135
1197
  onClick: () => a?.(r),
@@ -1137,11 +1199,140 @@ var T = {
1137
1199
  })]
1138
1200
  })]
1139
1201
  });
1140
- }, ye = 0, J = v((e) => ({
1202
+ }, J = {
1203
+ wrapper: "_wrapper_1ymdr_1",
1204
+ dropzone: "_dropzone_1ymdr_3",
1205
+ dragActive: "_dragActive_1ymdr_5",
1206
+ disabled: "_disabled_1ymdr_7",
1207
+ error: "_error_1ymdr_9",
1208
+ nativeInput: "_nativeInput_1ymdr_11",
1209
+ empty: "_empty_1ymdr_13",
1210
+ uploadIcon: "_uploadIcon_1ymdr_15",
1211
+ browseButton: "_browseButton_1ymdr_17",
1212
+ files: "_files_1ymdr_19",
1213
+ file: "_file_1ymdr_19",
1214
+ fileName: "_fileName_1ymdr_23",
1215
+ fileSize: "_fileSize_1ymdr_25"
1216
+ }, Oe = (e) => `${e.name}:${e.size}:${e.lastModified}`, ke = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Ae = (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), je = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: f, hint: p, error: m, required: h = !1, disabled: g = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
1217
+ let T = c(), D = y ?? `ds-file-input-${v ?? T}`, A = u(null), j = u(0), [M, N] = d(!1), P = p ? `${D}-hint` : void 0, F = m ? `${D}-error` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = !g && !_, R = (e) => {
1218
+ let t = [], n = new Set(r.map(Oe)), c = e.filter((e) => Ae(e, o) ? s !== void 0 && e.size > s ? (t.push({
1219
+ file: e,
1220
+ reason: "maxSize"
1221
+ }), !1) : !n.has(Oe(e)) && (n.add(Oe(e)), !0) : (t.push({
1222
+ file: e,
1223
+ reason: "accept"
1224
+ }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
1225
+ u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
1226
+ file: e,
1227
+ reason: "maxFiles"
1228
+ })), d = d.slice(0, u)), t.length && w?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1229
+ };
1230
+ return /* @__PURE__ */ n("div", {
1231
+ className: `${J.wrapper} ${b}`,
1232
+ children: [
1233
+ f && /* @__PURE__ */ t(O, {
1234
+ htmlFor: D,
1235
+ required: h,
1236
+ disabled: g,
1237
+ children: f
1238
+ }),
1239
+ /* @__PURE__ */ n("div", {
1240
+ className: `${J.dropzone} ${M ? J.dragActive : ""} ${g ? J.disabled : ""} ${m ? J.error : ""}`,
1241
+ onDragEnter: (e) => {
1242
+ e.preventDefault(), L && ++j.current === 1 && N(!0);
1243
+ },
1244
+ onDragOver: (e) => e.preventDefault(),
1245
+ onDragLeave: (e) => {
1246
+ e.preventDefault(), --j.current <= 0 && (j.current = 0, N(!1));
1247
+ },
1248
+ onDrop: (e) => {
1249
+ e.preventDefault(), j.current = 0, N(!1), L && R(Array.from(e.dataTransfer.files));
1250
+ },
1251
+ children: [/* @__PURE__ */ t("input", {
1252
+ ref: A,
1253
+ id: D,
1254
+ name: v,
1255
+ className: J.nativeInput,
1256
+ type: "file",
1257
+ multiple: a,
1258
+ accept: o,
1259
+ required: h && r.length === 0,
1260
+ disabled: !L,
1261
+ "aria-describedby": I,
1262
+ "aria-invalid": !!m,
1263
+ onChange: (e) => R(Array.from(e.target.files ?? []))
1264
+ }), r.length ? /* @__PURE__ */ n(e, { children: [
1265
+ /* @__PURE__ */ t("ul", {
1266
+ className: J.files,
1267
+ "aria-live": "polite",
1268
+ children: r.map((e, a) => /* @__PURE__ */ n("li", {
1269
+ className: J.file,
1270
+ children: [
1271
+ /* @__PURE__ */ t("span", {
1272
+ className: J.fileName,
1273
+ title: e.name,
1274
+ children: e.name
1275
+ }),
1276
+ /* @__PURE__ */ t("span", {
1277
+ className: J.fileSize,
1278
+ children: ke(e.size)
1279
+ }),
1280
+ L && /* @__PURE__ */ t(E, {
1281
+ variant: "empty",
1282
+ size: "sm",
1283
+ "aria-label": `Удалить файл ${e.name}`,
1284
+ onClick: () => i?.(r.filter((e, t) => t !== a)),
1285
+ children: "×"
1286
+ })
1287
+ ]
1288
+ }, Oe(e)))
1289
+ }),
1290
+ L && (a || r.length === 0) && /* @__PURE__ */ t(E, {
1291
+ className: J.browseButton,
1292
+ size: "sm",
1293
+ onClick: () => A.current?.click(),
1294
+ children: C
1295
+ }),
1296
+ L && !a && /* @__PURE__ */ t(E, {
1297
+ className: J.browseButton,
1298
+ size: "sm",
1299
+ onClick: () => A.current?.click(),
1300
+ children: S
1301
+ })
1302
+ ] }) : /* @__PURE__ */ n("div", {
1303
+ className: J.empty,
1304
+ children: [
1305
+ /* @__PURE__ */ t("span", {
1306
+ className: J.uploadIcon,
1307
+ "aria-hidden": "true",
1308
+ children: "↑"
1309
+ }),
1310
+ /* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
1311
+ !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(E, {
1312
+ className: J.browseButton,
1313
+ onClick: () => A.current?.click(),
1314
+ children: S
1315
+ })] })
1316
+ ]
1317
+ })]
1318
+ }),
1319
+ p && !m && /* @__PURE__ */ t(k, {
1320
+ id: P,
1321
+ children: p
1322
+ }),
1323
+ m && /* @__PURE__ */ t(k, {
1324
+ id: F,
1325
+ variant: "error",
1326
+ live: !0,
1327
+ children: m
1328
+ })
1329
+ ]
1330
+ });
1331
+ }, Me = 0, Y = b((e) => ({
1141
1332
  modals: [],
1142
1333
  openModal: (t, n = {}, r = {}) => {
1143
- ye += 1;
1144
- let i = `ds-modal-${ye}`;
1334
+ Me += 1;
1335
+ let i = `ds-modal-${Me}`;
1145
1336
  return e((e) => ({ modals: [...e.modals, {
1146
1337
  id: i,
1147
1338
  name: t,
@@ -1153,22 +1344,22 @@ var T = {
1153
1344
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1154
1345
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1155
1346
  closeAllModals: () => e({ modals: [] })
1156
- })), be = () => J.setState({ modals: [] }), Y = {
1157
- layer: "_layer_bl99k_1",
1158
- backdrop: "_backdrop_bl99k_2",
1159
- panel: "_panel_bl99k_3",
1160
- header: "_header_bl99k_5",
1161
- title: "_title_bl99k_6",
1162
- description: "_description_bl99k_7",
1163
- content: "_content_bl99k_8"
1164
- }, xe = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Se = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1165
- let f = c(), p = c(), m = u(null), h = J((e) => e.closeModal);
1347
+ })), Ne = () => Y.setState({ modals: [] }), X = {
1348
+ layer: "_layer_1nb2z_1",
1349
+ backdrop: "_backdrop_1nb2z_3",
1350
+ panel: "_panel_1nb2z_5",
1351
+ header: "_header_1nb2z_9",
1352
+ title: "_title_1nb2z_11",
1353
+ description: "_description_1nb2z_13",
1354
+ content: "_content_1nb2z_15"
1355
+ }, Pe = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Fe = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1356
+ let f = c(), p = c(), m = u(null), h = Y((e) => e.closeModal);
1166
1357
  return s(() => {
1167
1358
  let e = document.activeElement, t = m.current;
1168
- return (t?.querySelector(xe) ?? t)?.focus(), () => e?.focus();
1359
+ return (t?.querySelector(Pe) ?? t)?.focus(), () => e?.focus();
1169
1360
  }, []), /* @__PURE__ */ n("div", {
1170
1361
  ref: m,
1171
- className: `${Y.panel} ${l}`,
1362
+ className: `${X.panel} ${l}`,
1172
1363
  role: d,
1173
1364
  "aria-modal": "true",
1174
1365
  "aria-labelledby": r ? f : void 0,
@@ -1176,7 +1367,7 @@ var T = {
1176
1367
  tabIndex: -1,
1177
1368
  onKeyDown: (e) => {
1178
1369
  if (e.key !== "Tab") return;
1179
- let t = Array.from(m.current?.querySelectorAll(xe) ?? []);
1370
+ let t = Array.from(m.current?.querySelectorAll(Pe) ?? []);
1180
1371
  if (!t.length) {
1181
1372
  e.preventDefault();
1182
1373
  return;
@@ -1186,12 +1377,12 @@ var T = {
1186
1377
  },
1187
1378
  children: [
1188
1379
  (r || o) && /* @__PURE__ */ n("header", {
1189
- className: Y.header,
1380
+ className: X.header,
1190
1381
  children: [r && /* @__PURE__ */ t("h2", {
1191
1382
  id: f,
1192
- className: Y.title,
1383
+ className: X.title,
1193
1384
  children: r
1194
- }), /* @__PURE__ */ t(w, {
1385
+ }), /* @__PURE__ */ t(E, {
1195
1386
  variant: "empty",
1196
1387
  size: "sm",
1197
1388
  "aria-label": o,
@@ -1201,31 +1392,31 @@ var T = {
1201
1392
  }),
1202
1393
  i && /* @__PURE__ */ t("p", {
1203
1394
  id: p,
1204
- className: Y.description,
1395
+ className: X.description,
1205
1396
  children: i
1206
1397
  }),
1207
1398
  /* @__PURE__ */ t("div", {
1208
- className: Y.content,
1399
+ className: X.content,
1209
1400
  children: e
1210
1401
  })
1211
1402
  ]
1212
1403
  });
1213
- }, Ce = ({ registry: e }) => {
1214
- let n = J((e) => e.modals), r = J((e) => e.closeModal), i = J((e) => e.closeAllModals);
1404
+ }, Ie = ({ registry: e }) => {
1405
+ let n = Y((e) => e.modals), r = Y((e) => e.closeModal), i = Y((e) => e.closeAllModals);
1215
1406
  return s(() => {
1216
1407
  let e = (e) => {
1217
1408
  if (e.key !== "Escape") return;
1218
- let t = J.getState().modals.at(-1);
1409
+ let t = Y.getState().modals.at(-1);
1219
1410
  t?.closeOnEscape && r(t.id);
1220
1411
  };
1221
1412
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1222
- }, [r]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
1223
- className: Y.layer,
1413
+ }, [r]), !n.length || typeof document > "u" ? null : y(/* @__PURE__ */ t("div", {
1414
+ className: X.layer,
1224
1415
  "aria-label": "Модальные окна",
1225
1416
  children: n.map((a, o) => {
1226
1417
  let s = e[a.name];
1227
1418
  return s ? /* @__PURE__ */ t("div", {
1228
- className: Y.backdrop,
1419
+ className: X.backdrop,
1229
1420
  "aria-hidden": o !== n.length - 1 || void 0,
1230
1421
  onMouseDown: (e) => {
1231
1422
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
@@ -1239,95 +1430,95 @@ var T = {
1239
1430
  }, a.id) : null;
1240
1431
  })
1241
1432
  }), document.body);
1242
- }, we = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1243
- let o = J((e) => e.modals.length);
1433
+ }, Le = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1434
+ let o = Y((e) => e.modals.length);
1244
1435
  return s(() => {
1245
1436
  if (!a || o === 0) return;
1246
1437
  let e = document.body.style.overflow;
1247
1438
  return document.body.style.overflow = "hidden", () => {
1248
1439
  document.body.style.overflow = e;
1249
1440
  };
1250
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Ce, { registry: r })] });
1251
- }, Te = (e) => e, X = {
1252
- message: "_message_187g8_1",
1253
- actions: "_actions_187g8_2"
1254
- }, Ee = /* @__PURE__ */ new Map(), De = 0, Oe = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1441
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Ie, { registry: r })] });
1442
+ }, Re = (e) => e, ze = {
1443
+ message: "_message_1vtru_1",
1444
+ actions: "_actions_1vtru_3"
1445
+ }, Be = /* @__PURE__ */ new Map(), Ve = 0, He = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1255
1446
  let u = (e) => {
1256
- Ee.get(l)?.(e), Ee.delete(l), r();
1447
+ Be.get(l)?.(e), Be.delete(l), r();
1257
1448
  };
1258
- return /* @__PURE__ */ n(Se, {
1449
+ return /* @__PURE__ */ n(Fe, {
1259
1450
  modalId: e,
1260
1451
  title: i,
1261
1452
  role: "alertdialog",
1262
1453
  children: [/* @__PURE__ */ t("p", {
1263
- className: X.message,
1454
+ className: ze.message,
1264
1455
  children: a
1265
1456
  }), /* @__PURE__ */ n("div", {
1266
- className: X.actions,
1267
- children: [/* @__PURE__ */ t(w, {
1457
+ className: ze.actions,
1458
+ children: [/* @__PURE__ */ t(E, {
1268
1459
  variant: "outline",
1269
1460
  onClick: () => u(!1),
1270
1461
  children: s
1271
- }), /* @__PURE__ */ t(w, {
1462
+ }), /* @__PURE__ */ t(E, {
1272
1463
  variant: c === "danger" ? "destructive" : "primary",
1273
1464
  onClick: () => u(!0),
1274
1465
  children: o
1275
1466
  })]
1276
1467
  })]
1277
1468
  });
1278
- }, ke = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Se, {
1469
+ }, Ue = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Fe, {
1279
1470
  modalId: e,
1280
1471
  title: i,
1281
1472
  role: "alertdialog",
1282
1473
  children: [/* @__PURE__ */ t("p", {
1283
- className: X.message,
1474
+ className: ze.message,
1284
1475
  children: a
1285
1476
  }), /* @__PURE__ */ t("div", {
1286
- className: X.actions,
1287
- children: /* @__PURE__ */ t(w, {
1477
+ className: ze.actions,
1478
+ children: /* @__PURE__ */ t(E, {
1288
1479
  onClick: r,
1289
1480
  children: o
1290
1481
  })
1291
1482
  })]
1292
- }), Ae = Te({
1293
- ConfirmModal: Oe,
1294
- ErrorModal: ke
1295
- }), je = () => {
1296
- let e = J((e) => e.openModal);
1483
+ }), We = Re({
1484
+ ConfirmModal: He,
1485
+ ErrorModal: Ue
1486
+ }), Ge = () => {
1487
+ let e = Y((e) => e.openModal);
1297
1488
  return (t = {}) => new Promise((n) => {
1298
- De += 1;
1299
- let r = `confirm-${De}`;
1300
- Ee.set(r, n), e("ConfirmModal", {
1489
+ Ve += 1;
1490
+ let r = `confirm-${Ve}`;
1491
+ Be.set(r, n), e("ConfirmModal", {
1301
1492
  ...t,
1302
1493
  requestId: r
1303
1494
  }, { closeOnEscape: !1 });
1304
1495
  });
1305
- }, Me = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ne = () => {
1306
- let e = J((e) => e.openModal);
1496
+ }, Ke = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", qe = () => {
1497
+ let e = Y((e) => e.openModal);
1307
1498
  return { showError: (t, n) => e("ErrorModal", {
1308
1499
  title: n,
1309
- message: Me(t)
1500
+ message: Ke(t)
1310
1501
  }) };
1311
- }, Pe = v(() => ({})), Fe = v(() => ({})), Ie = () => {
1312
- let e = J((e) => e.modals), t = J((e) => e.openModal);
1502
+ }, Je = b(() => ({})), Ye = b(() => ({})), Xe = () => {
1503
+ let e = Y((e) => e.modals), t = Y((e) => e.openModal);
1313
1504
  return {
1314
1505
  openModal: (e, n = {}, r) => t(e, n, r),
1315
- closeModal: J((e) => e.closeModal),
1316
- closeTopModal: J((e) => e.closeTopModal),
1317
- closeAllModals: J((e) => e.closeAllModals),
1506
+ closeModal: Y((e) => e.closeModal),
1507
+ closeTopModal: Y((e) => e.closeTopModal),
1508
+ closeAllModals: Y((e) => e.closeAllModals),
1318
1509
  isOpen: (t) => e.some((e) => e.name === t),
1319
1510
  count: e.length
1320
1511
  };
1321
- }, Le = { root: "_root_1j70j_1" }, Re = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1322
- className: `${Le.root} ${r}`,
1512
+ }, Ze = { root: "_root_1x7h7_1" }, Qe = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1513
+ className: `${Ze.root} ${r}`,
1323
1514
  role: "status",
1324
1515
  "aria-label": e,
1325
- children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1326
- }), ze = {
1327
- root: "_root_ig8lp_1",
1328
- legend: "_legend_ig8lp_2",
1329
- range: "_range_ig8lp_3"
1330
- }, Be = [
1516
+ children: [/* @__PURE__ */ t(w, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1517
+ }), $e = {
1518
+ root: "_root_elask_1",
1519
+ legend: "_legend_elask_3",
1520
+ range: "_range_elask_5"
1521
+ }, et = [
1331
1522
  {
1332
1523
  value: "1",
1333
1524
  label: "День"
@@ -1340,19 +1531,19 @@ var T = {
1340
1531
  value: "3",
1341
1532
  label: "Месяц"
1342
1533
  }
1343
- ], Ve = {
1534
+ ], tt = {
1344
1535
  day: 1,
1345
1536
  week: 2,
1346
1537
  month: 3
1347
- }, He = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = Be }) => /* @__PURE__ */ n("fieldset", {
1348
- className: `${ze.root} ${u}`,
1538
+ }, nt = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = et }) => /* @__PURE__ */ n("fieldset", {
1539
+ className: `${$e.root} ${u}`,
1349
1540
  disabled: s,
1350
1541
  children: [
1351
1542
  i && /* @__PURE__ */ t("legend", {
1352
- className: ze.legend,
1543
+ className: $e.legend,
1353
1544
  children: i
1354
1545
  }),
1355
- /* @__PURE__ */ t(V, {
1546
+ /* @__PURE__ */ t(U, {
1356
1547
  options: d,
1357
1548
  value: String(e.periodType),
1358
1549
  disabled: s,
@@ -1363,8 +1554,8 @@ var T = {
1363
1554
  label: "Тип периода"
1364
1555
  }),
1365
1556
  /* @__PURE__ */ n("div", {
1366
- className: ze.range,
1367
- children: [/* @__PURE__ */ t(I, {
1557
+ className: $e.range,
1558
+ children: [/* @__PURE__ */ t(z, {
1368
1559
  value: e.startDate,
1369
1560
  onChange: (t) => r?.({
1370
1561
  ...e,
@@ -1374,7 +1565,7 @@ var T = {
1374
1565
  min: c,
1375
1566
  max: l,
1376
1567
  disabled: s
1377
- }), /* @__PURE__ */ t(I, {
1568
+ }), /* @__PURE__ */ t(z, {
1378
1569
  value: e.endDate,
1379
1570
  onChange: (t) => r?.({
1380
1571
  ...e,
@@ -1386,26 +1577,26 @@ var T = {
1386
1577
  disabled: s
1387
1578
  })]
1388
1579
  }),
1389
- a && !o && /* @__PURE__ */ t(D, { children: a }),
1390
- o && /* @__PURE__ */ t(D, {
1580
+ a && !o && /* @__PURE__ */ t(k, { children: a }),
1581
+ o && /* @__PURE__ */ t(k, {
1391
1582
  variant: "error",
1392
1583
  children: o
1393
1584
  })
1394
1585
  ]
1395
1586
  }), Z = {
1396
- viewport: "_viewport_v7rog_1",
1397
- "top-right": "_top-right_v7rog_2",
1398
- "top-left": "_top-left_v7rog_3",
1399
- "bottom-right": "_bottom-right_v7rog_4",
1400
- "bottom-left": "_bottom-left_v7rog_5",
1401
- toast: "_toast_v7rog_6",
1402
- body: "_body_v7rog_7",
1403
- icon: "_icon_v7rog_8",
1404
- info: "_info_v7rog_9",
1405
- success: "_success_v7rog_10",
1406
- warning: "_warning_v7rog_11",
1407
- error: "_error_v7rog_12"
1408
- }, Ue = ({ toast: e, onClose: r }) => {
1587
+ viewport: "_viewport_15mi5_1",
1588
+ "top-right": "_top-right_15mi5_3",
1589
+ "top-left": "_top-left_15mi5_5",
1590
+ "bottom-right": "_bottom-right_15mi5_7",
1591
+ "bottom-left": "_bottom-left_15mi5_9",
1592
+ toast: "_toast_15mi5_11",
1593
+ body: "_body_15mi5_13",
1594
+ icon: "_icon_15mi5_15",
1595
+ info: "_info_15mi5_17",
1596
+ success: "_success_15mi5_19",
1597
+ warning: "_warning_15mi5_21",
1598
+ error: "_error_15mi5_23"
1599
+ }, rt = ({ toast: e, onClose: r }) => {
1409
1600
  let [i, a] = d(!1), o = u(e.duration), c = u(Date.now());
1410
1601
  return s(() => {
1411
1602
  if (i || e.duration <= 0) return;
@@ -1428,7 +1619,7 @@ var T = {
1428
1619
  onFocus: () => a(!0),
1429
1620
  onBlur: () => a(!1),
1430
1621
  children: [
1431
- /* @__PURE__ */ t(pe, {
1622
+ /* @__PURE__ */ t(Se, {
1432
1623
  name: e.variant === "warning" ? "warning" : "info",
1433
1624
  className: Z.icon
1434
1625
  }),
@@ -1437,7 +1628,7 @@ var T = {
1437
1628
  children: [
1438
1629
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1439
1630
  /* @__PURE__ */ t("div", { children: e.message }),
1440
- e.action && /* @__PURE__ */ t(w, {
1631
+ e.action && /* @__PURE__ */ t(E, {
1441
1632
  variant: "empty",
1442
1633
  size: "sm",
1443
1634
  onClick: () => {
@@ -1447,7 +1638,7 @@ var T = {
1447
1638
  })
1448
1639
  ]
1449
1640
  }),
1450
- e.closable && /* @__PURE__ */ t(w, {
1641
+ e.closable && /* @__PURE__ */ t(E, {
1451
1642
  variant: "empty",
1452
1643
  size: "sm",
1453
1644
  "aria-label": "Закрыть уведомление",
@@ -1456,11 +1647,11 @@ var T = {
1456
1647
  })
1457
1648
  ]
1458
1649
  });
1459
- }, We = 0, Q = v((e) => ({
1650
+ }, it = 0, Q = b((e) => ({
1460
1651
  toasts: [],
1461
1652
  showToast: (t) => {
1462
- We += 1;
1463
- let n = `ds-toast-${We}`;
1653
+ it += 1;
1654
+ let n = `ds-toast-${it}`;
1464
1655
  return e((e) => ({ toasts: [...e.toasts, {
1465
1656
  variant: "info",
1466
1657
  duration: 5e3,
@@ -1471,17 +1662,17 @@ var T = {
1471
1662
  },
1472
1663
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1473
1664
  clearToasts: () => e({ toasts: [] })
1474
- })), Ge = () => Q.setState({ toasts: [] }), Ke = ({ position: e = "top-right" }) => {
1665
+ })), at = () => Q.setState({ toasts: [] }), ot = ({ position: e = "top-right" }) => {
1475
1666
  let n = Q((e) => e.toasts), r = Q((e) => e.removeToast);
1476
1667
  return /* @__PURE__ */ t("div", {
1477
1668
  className: `${Z.viewport} ${Z[e]}`,
1478
1669
  "aria-label": "Уведомления",
1479
- children: n.map((e) => /* @__PURE__ */ t(Ue, {
1670
+ children: n.map((e) => /* @__PURE__ */ t(rt, {
1480
1671
  toast: e,
1481
1672
  onClose: r
1482
1673
  }, e.id))
1483
1674
  });
1484
- }, qe = () => {
1675
+ }, st = () => {
1485
1676
  let e = Q((e) => e.showToast), t = Q((e) => e.removeToast), n = Q((e) => e.clearToasts), r = o((t) => e({
1486
1677
  ...t,
1487
1678
  variant: "info"
@@ -1512,15 +1703,15 @@ var T = {
1512
1703
  i,
1513
1704
  a
1514
1705
  ]);
1515
- }, Je = {
1516
- root: "_root_2bxal_1",
1517
- tooltip: "_tooltip_2bxal_2",
1518
- "ds-tooltip-in": "_ds-tooltip-in_2bxal_1",
1519
- top: "_top_2bxal_3",
1520
- bottom: "_bottom_2bxal_4",
1521
- left: "_left_2bxal_5",
1522
- right: "_right_2bxal_6"
1523
- }, Ye = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1706
+ }, ct = {
1707
+ root: "_root_s9o0g_1",
1708
+ tooltip: "_tooltip_s9o0g_3",
1709
+ "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
1710
+ top: "_top_s9o0g_5",
1711
+ bottom: "_bottom_s9o0g_7",
1712
+ left: "_left_s9o0g_9",
1713
+ right: "_right_s9o0g_11"
1714
+ }, lt = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1524
1715
  let h = c(), [g, _] = d(!1), v = u(null), y = () => {
1525
1716
  f || !e || (v.current = setTimeout(() => _(!0), l));
1526
1717
  }, b = () => {
@@ -1542,24 +1733,24 @@ var T = {
1542
1733
  onBlur: b
1543
1734
  });
1544
1735
  return /* @__PURE__ */ n("span", {
1545
- className: `${Je.root} ${m}`,
1736
+ className: `${ct.root} ${m}`,
1546
1737
  onPointerDown: g ? b : y,
1547
1738
  children: [x, g && /* @__PURE__ */ t("span", {
1548
1739
  id: h,
1549
1740
  role: "tooltip",
1550
- className: `${Je.tooltip} ${Je[o]}`,
1741
+ className: `${ct.tooltip} ${ct[o]}`,
1551
1742
  style: { maxWidth: p },
1552
1743
  children: e
1553
1744
  })]
1554
1745
  });
1555
1746
  }, $ = {
1556
- root: "_root_tgni1_1",
1557
- frame: "_frame_tgni1_2",
1558
- video: "_video_tgni1_3",
1559
- overlay: "_overlay_tgni1_4",
1560
- error: "_error_tgni1_4",
1561
- caption: "_caption_tgni1_7"
1562
- }, Xe = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1747
+ root: "_root_1ue3g_1",
1748
+ frame: "_frame_1ue3g_3",
1749
+ video: "_video_1ue3g_5",
1750
+ overlay: "_overlay_1ue3g_7",
1751
+ error: "_error_1ue3g_7",
1752
+ caption: "_caption_1ue3g_13"
1753
+ }, ut = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1563
1754
  let [h, g] = d(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
1564
1755
  return /* @__PURE__ */ n("figure", {
1565
1756
  className: `${$.root} ${u}`,
@@ -1581,7 +1772,7 @@ var T = {
1581
1772
  }),
1582
1773
  s && /* @__PURE__ */ t("div", {
1583
1774
  className: $.overlay,
1584
- children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
1775
+ children: /* @__PURE__ */ t(w, { label: "Загрузка видео" })
1585
1776
  }),
1586
1777
  (_ || e.length === 0) && /* @__PURE__ */ t("div", {
1587
1778
  className: $.error,
@@ -1596,4 +1787,4 @@ var T = {
1596
1787
  });
1597
1788
  };
1598
1789
  //#endregion
1599
- export { Oe as ConfirmModal, b as DSBadge, w as DSButton, k as DSCheckbox, ue as DSDataTable, ae as DSDateRange, I as DSDateTimePicker, V as DSDropDown, de as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, ve as DSFilters, pe as DSIcon, me as DSInfoBlock, he as DSInput, S as DSLoader, Ce as DSModal, Se as DSModalFrame, Re as DSPageLoader, ge as DSRadioButton, oe as DSSkeleton, U as DSSort, He as DSTimePeriodPicker, Ue as DSToast, Ke as DSToastProvider, Ye as DSTooltip, Xe as DSVideoPlayerFrame, Ve as DS_PERIOD_TYPE_CODES, ke as ErrorModal, we as ModalSystemProvider, Ae as builtInModalRegistry, Te as defineModalRegistry, F as formatDateTimeLocalValue, Me as getErrorMessage, se as getNextEnabledOptionIndex, R as isValidDateRange, ee as parseDateTimeLocalValue, be as resetModalStore, Ge as resetToastStore, je as useConfirmModal, Pe as useConfirmModalStore, Ne as useErrorModal, Fe as useErrorModalStore, Ie as useModals, J as useModalsStore, qe as useToast, Q as useToastStore, le as validateDSDataTableData };
1790
+ export { He as ConfirmModal, S as DSBadge, E as DSButton, j as DSCheckbox, ye as DSDataTable, oe as DSDateRange, z as DSDateTimePicker, U as DSDropDown, be as DSDropDownMultiple, O as DSFieldLabel, k as DSFieldMessage, je as DSFileInput, De as DSFilters, Se as DSIcon, Ce as DSInfoBlock, we as DSInput, w as DSLoader, Ie as DSModal, Fe as DSModalFrame, Qe as DSPageLoader, Te as DSRadioButton, V as DSSkeleton, le as DSSort, nt as DSTimePeriodPicker, rt as DSToast, ot as DSToastProvider, lt as DSTooltip, ut as DSVideoPlayerFrame, tt as DS_PERIOD_TYPE_CODES, Ue as ErrorModal, Le as ModalSystemProvider, We as builtInModalRegistry, Re as defineModalRegistry, L as formatDateTimeLocalValue, Ke as getErrorMessage, se as getNextEnabledOptionIndex, ae as isValidDateRange, R as parseDateTimeLocalValue, Ne as resetModalStore, at as resetToastStore, Ge as useConfirmModal, Je as useConfirmModalStore, qe as useErrorModal, Ye as useErrorModalStore, Xe as useModals, Y as useModalsStore, st as useToast, Q as useToastStore, de as validateDSDataTableData };