@efficiency-point/design-system 0.0.6 → 0.0.7

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,9 +1,9 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { cloneElement as r, forwardRef as i, isValidElement as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
3
- import { createColumnHelper as d, createSortedRowModel as f, rowSortingFeature as p, tableFeatures as m, useTable as h } from "@tanstack/react-table";
4
- import { createPortal as g } from "react-dom";
5
- import { create as _ } from "zustand";
6
- var v = {
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
7
  badge: "_badge_l4qbw_1",
8
8
  sm: "_sm_l4qbw_2",
9
9
  md: "_md_l4qbw_3",
@@ -15,36 +15,36 @@ var v = {
15
15
  dot: "_dot_l4qbw_9",
16
16
  icon: "_icon_l4qbw_10",
17
17
  label: "_label_l4qbw_11"
18
- }, y = ({ children: e, variant: r = "neutral", size: i = "md", dot: a = !1, icon: o, className: s = "" }) => /* @__PURE__ */ n("span", {
19
- className: `${v.badge} ${v[r]} ${v[i]} ${s}`,
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}`,
20
20
  children: [
21
21
  a && /* @__PURE__ */ t("span", {
22
- className: v.dot,
22
+ className: y.dot,
23
23
  "aria-hidden": "true"
24
24
  }),
25
25
  o && /* @__PURE__ */ t("span", {
26
- className: v.icon,
26
+ className: y.icon,
27
27
  "aria-hidden": "true",
28
28
  children: o
29
29
  }),
30
30
  /* @__PURE__ */ t("span", {
31
- className: v.label,
31
+ className: y.label,
32
32
  children: e
33
33
  })
34
34
  ]
35
- }), b = {
35
+ }), x = {
36
36
  loader: "_loader_pslm9_1",
37
37
  "ds-spin": "_ds-spin_pslm9_1",
38
38
  primary: "_primary_pslm9_11",
39
39
  secondary: "_secondary_pslm9_12",
40
40
  light: "_light_pslm9_13",
41
41
  danger: "_danger_pslm9_14"
42
- }, x = ({ variant: e = "primary", label: n = "Загрузка", className: r = "", decorative: i = !1 }) => /* @__PURE__ */ t("span", {
43
- className: `${b.loader} ${b[e]} ${r}`,
42
+ }, S = ({ variant: e = "primary", label: n = "Загрузка", className: r = "", decorative: i = !1 }) => /* @__PURE__ */ t("span", {
43
+ className: `${x.loader} ${x[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
- }), S = {
47
+ }), C = {
48
48
  button: "_button_higub_1",
49
49
  sm: "_sm_higub_16",
50
50
  md: "_md_higub_17",
@@ -56,20 +56,20 @@ var v = {
56
56
  empty: "_empty_higub_29",
57
57
  destructive: "_destructive_higub_34",
58
58
  destructiveOutline: "_destructiveOutline_higub_35"
59
- }, C = 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", {
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", {
60
60
  ref: u,
61
61
  type: s,
62
- className: `${S.button} ${S[n]} ${S[r]} ${c}`,
62
+ className: `${C.button} ${C[n]} ${C[r]} ${c}`,
63
63
  disabled: o || i,
64
64
  "aria-busy": i || void 0,
65
65
  ...l,
66
- children: i ? /* @__PURE__ */ t(x, {
66
+ children: i ? /* @__PURE__ */ t(S, {
67
67
  variant: "light",
68
68
  label: a
69
69
  }) : e
70
70
  }));
71
- C.displayName = "DSButton";
72
- var w = {
71
+ w.displayName = "DSButton";
72
+ var T = {
73
73
  label: "_label_5v0ym_1",
74
74
  required: "_required_5v0ym_12",
75
75
  error: "_error_5v0ym_13",
@@ -78,43 +78,43 @@ var w = {
78
78
  disabled: "_disabled_5v0ym_24",
79
79
  message: "_message_5v0ym_28",
80
80
  success: "_success_5v0ym_36"
81
- }, T = ({ children: e, required: r = !1, optionalText: i, disabled: a = !1, className: o = "", ...s }) => /* @__PURE__ */ n("label", {
82
- className: `${w.label} ${a ? w.disabled : ""} ${o}`,
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}`,
83
83
  ...s,
84
84
  children: [
85
85
  /* @__PURE__ */ t("span", { children: e }),
86
86
  r && /* @__PURE__ */ t("span", {
87
- className: w.required,
87
+ className: T.required,
88
88
  "aria-hidden": "true",
89
89
  children: "*"
90
90
  }),
91
91
  i && /* @__PURE__ */ t("span", {
92
- className: w.optional,
92
+ className: T.optional,
93
93
  children: i
94
94
  })
95
95
  ]
96
- }), E = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
96
+ }), D = ({ children: e, variant: n = "hint", id: r, live: i = !1, className: a = "" }) => /* @__PURE__ */ t("span", {
97
97
  id: r,
98
- className: `${w.message} ${w[n]} ${a}`,
98
+ className: `${T.message} ${T[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
- }), D = {
102
+ }), O = {
103
103
  wrapper: "_wrapper_1l5cg_1",
104
104
  label: "_label_1l5cg_2",
105
105
  input: "_input_1l5cg_3",
106
106
  control: "_control_1l5cg_4",
107
107
  disabled: "_disabled_1l5cg_7",
108
108
  controlError: "_controlError_1l5cg_9"
109
- }, O = ({ checked: e, onChange: r, label: i, hint: a, error: c, disabled: u = !1, readOnly: d = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
110
- let _ = s(), v = m ?? `ds-checkbox-${p ?? _}`, y = l(null), b = a ? `${v}-hint` : void 0, x = c ? `${v}-error` : void 0;
111
- return o(() => {
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 }) => {
110
+ let _ = c(), v = m ?? `ds-checkbox-${p ?? _}`, y = u(null), b = a ? `${v}-hint` : void 0, x = o ? `${v}-error` : void 0;
111
+ return s(() => {
112
112
  y.current && (y.current.indeterminate = h && !e);
113
113
  }, [e, h]), /* @__PURE__ */ n("div", {
114
- className: `${D.wrapper} ${f}`,
114
+ className: `${O.wrapper} ${f}`,
115
115
  children: [
116
116
  /* @__PURE__ */ n("label", {
117
- className: `${D.label} ${u ? D.disabled : ""}`,
117
+ className: `${O.label} ${l ? O.disabled : ""}`,
118
118
  htmlFor: v,
119
119
  children: [
120
120
  /* @__PURE__ */ t("input", {
@@ -123,36 +123,36 @@ var w = {
123
123
  name: p,
124
124
  type: "checkbox",
125
125
  checked: e,
126
- disabled: u,
126
+ disabled: l,
127
127
  "aria-readonly": d || void 0,
128
- "aria-invalid": !!c,
128
+ "aria-invalid": !!o,
129
129
  "aria-describedby": [b, x].filter(Boolean).join(" ") || void 0,
130
- className: D.input,
130
+ className: O.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: `${D.control} ${c ? D.controlError : ""}`,
137
+ className: `${O.control} ${o ? O.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 && !c && /* @__PURE__ */ t(E, {
144
+ a && !o && /* @__PURE__ */ t(D, {
145
145
  id: b,
146
146
  children: a
147
147
  }),
148
- c && /* @__PURE__ */ t(E, {
148
+ o && /* @__PURE__ */ t(D, {
149
149
  id: x,
150
150
  variant: "error",
151
- children: c
151
+ children: o
152
152
  })
153
153
  ]
154
154
  });
155
- }, k = {
155
+ }, A = {
156
156
  wrapper: "_wrapper_phf7i_1",
157
157
  trigger: "_trigger_phf7i_9",
158
158
  nav: "_nav_phf7i_27",
@@ -170,7 +170,7 @@ var w = {
170
170
  outside: "_outside_phf7i_132",
171
171
  selected: "_selected_phf7i_136",
172
172
  timeLabel: "_timeLabel_phf7i_146"
173
- }, A = [
173
+ }, j = [
174
174
  "Пн",
175
175
  "Вт",
176
176
  "Ср",
@@ -178,7 +178,7 @@ var w = {
178
178
  "Пт",
179
179
  "Сб",
180
180
  "Вс"
181
- ], j = [
181
+ ], M = [
182
182
  "Январь",
183
183
  "Февраль",
184
184
  "Март",
@@ -191,9 +191,9 @@ var w = {
191
191
  "Октябрь",
192
192
  "Ноябрь",
193
193
  "Декабрь"
194
- ], M = (e) => String(e).padStart(2, "0"), N = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), P = (e, t) => {
194
+ ], N = (e) => String(e).padStart(2, "0"), P = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), F = (e, t) => {
195
195
  if (!e) return "";
196
- let n = `${e.getFullYear()}-${M(e.getMonth() + 1)}-${M(e.getDate())}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
196
+ let n = `${e.getFullYear()}-${N(e.getMonth() + 1)}-${N(e.getDate())}`, r = `${N(e.getHours())}:${N(e.getMinutes())}`;
197
197
  return t === "date" ? n : t === "time" ? r : `${n}T${r}`;
198
198
  }, ee = (e, t) => {
199
199
  if (!e) return null;
@@ -209,7 +209,7 @@ var w = {
209
209
  return Number.isNaN(n.getTime()) ? null : n;
210
210
  }, te = (e, t) => {
211
211
  if (!e) return "";
212
- let n = `${M(e.getDate())}.${M(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${M(e.getHours())}:${M(e.getMinutes())}`;
212
+ let n = `${N(e.getDate())}.${N(e.getMonth() + 1)}.${e.getFullYear()}`, r = `${N(e.getHours())}:${N(e.getMinutes())}`;
213
213
  return t === "date" ? n : t === "time" ? r : `${n} ${r}`;
214
214
  }, ne = (e) => {
215
215
  let t = new Date(e.getFullYear(), e.getMonth(), 1), n = (t.getDay() + 6) % 7, r = new Date(t);
@@ -218,15 +218,15 @@ var w = {
218
218
  return n.setDate(r.getDate() + t), n;
219
219
  });
220
220
  }, re = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ie = (e, t, n) => {
221
- let r = N(e).getTime();
222
- return !!(t && r < N(t).getTime() || n && r > N(n).getTime());
223
- }, F = ({ value: r, onChange: i, mode: a = "date", label: d, 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 = s(), w = b ?? `ds-date-time-${x ?? C}`, D = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, M = l(null), N = l(null), [F, I] = u(!1), [L, R] = u(r ?? /* @__PURE__ */ new Date()), [z, B] = u(P(r, "time")), V = c(() => ne(L), [L]), H = a !== "time", U = a !== "date";
225
- o(() => {
226
- r && R(r), B(P(r, "time"));
227
- }, [r]), o(() => {
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";
225
+ s(() => {
226
+ r && R(r), z(F(r, "time"));
227
+ }, [r]), s(() => {
228
228
  let e = (e) => {
229
- M.current?.contains(e.target) || I(!1);
229
+ k.current?.contains(e.target) || I(!1);
230
230
  }, t = (e) => {
231
231
  e.key === "Escape" && (I(!1), N.current?.focus());
232
232
  };
@@ -234,12 +234,12 @@ var w = {
234
234
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
235
235
  };
236
236
  }, []);
237
- let ae = (e) => {
237
+ let V = (e) => {
238
238
  if (ie(e, v, y)) return;
239
239
  let t = new Date(e);
240
240
  t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && I(!1);
241
- }, oe = (e) => {
242
- if (B(e), !e) {
241
+ }, H = (e) => {
242
+ if (z(e), !e) {
243
243
  i?.(null);
244
244
  return;
245
245
  }
@@ -247,66 +247,66 @@ var w = {
247
247
  if (!t) return;
248
248
  let n = new Date(a === "datetime" ? r ?? L : /* @__PURE__ */ new Date());
249
249
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(v && n < v || y && n > y) && i?.(n);
250
- }, W = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), se = [D, O].filter(Boolean).join(" ") || void 0;
250
+ }, U = f ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), W = [T, O].filter(Boolean).join(" ") || void 0;
251
251
  return /* @__PURE__ */ n("div", {
252
- ref: M,
253
- className: `${k.wrapper} ${S}`,
252
+ ref: k,
253
+ className: `${A.wrapper} ${S}`,
254
254
  children: [
255
- d && /* @__PURE__ */ t(T, {
255
+ o && /* @__PURE__ */ t(E, {
256
256
  htmlFor: w,
257
257
  required: _,
258
258
  disabled: h,
259
- children: d
259
+ children: o
260
260
  }),
261
261
  /* @__PURE__ */ n("button", {
262
262
  ref: N,
263
263
  id: w,
264
264
  name: x,
265
265
  type: "button",
266
- className: `${k.trigger} ${m ? k.error : ""}`,
266
+ className: `${A.trigger} ${m ? A.error : ""}`,
267
267
  disabled: h,
268
268
  "aria-readonly": g || void 0,
269
- "aria-expanded": F,
269
+ "aria-expanded": P,
270
270
  "aria-haspopup": "dialog",
271
- "aria-describedby": se,
271
+ "aria-describedby": W,
272
272
  onClick: () => {
273
273
  g || I((e) => !e);
274
274
  },
275
275
  children: [/* @__PURE__ */ t("span", {
276
- className: r ? k.value : k.placeholder,
277
- children: te(r, a) || W
276
+ className: r ? A.value : A.placeholder,
277
+ children: te(r, a) || U
278
278
  }), /* @__PURE__ */ t("span", {
279
279
  "aria-hidden": "true",
280
280
  children: "▾"
281
281
  })]
282
282
  }),
283
- F && !g && /* @__PURE__ */ n("div", {
284
- className: k.panel,
283
+ P && !g && /* @__PURE__ */ n("div", {
284
+ className: A.panel,
285
285
  role: "dialog",
286
- "aria-label": d ?? W,
287
- children: [H && /* @__PURE__ */ n(e, { children: [
286
+ "aria-label": o ?? U,
287
+ children: [B && /* @__PURE__ */ n(e, { children: [
288
288
  /* @__PURE__ */ n("div", {
289
- className: k.calendarHeader,
289
+ className: A.calendarHeader,
290
290
  children: [
291
291
  /* @__PURE__ */ t("button", {
292
292
  type: "button",
293
- className: k.nav,
293
+ className: A.nav,
294
294
  "aria-label": "Предыдущий месяц",
295
295
  onClick: () => R(new Date(L.getFullYear(), L.getMonth() - 1, 1)),
296
296
  children: "‹"
297
297
  }),
298
298
  /* @__PURE__ */ t("select", {
299
- className: k.monthSelect,
299
+ className: A.monthSelect,
300
300
  "aria-label": "Месяц",
301
301
  value: L.getMonth(),
302
302
  onChange: (e) => R(new Date(L.getFullYear(), Number(e.target.value), 1)),
303
- children: j.map((e, n) => /* @__PURE__ */ t("option", {
303
+ children: M.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: k.yearInput,
309
+ className: A.yearInput,
310
310
  type: "number",
311
311
  "aria-label": "Год",
312
312
  value: L.getFullYear(),
@@ -314,7 +314,7 @@ var w = {
314
314
  }),
315
315
  /* @__PURE__ */ t("button", {
316
316
  type: "button",
317
- className: k.nav,
317
+ className: A.nav,
318
318
  "aria-label": "Следующий месяц",
319
319
  onClick: () => R(new Date(L.getFullYear(), L.getMonth() + 1, 1)),
320
320
  children: "›"
@@ -322,58 +322,58 @@ var w = {
322
322
  ]
323
323
  }),
324
324
  /* @__PURE__ */ t("div", {
325
- className: k.weekdays,
326
- children: A.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
325
+ className: A.weekdays,
326
+ children: j.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
327
327
  }),
328
328
  /* @__PURE__ */ t("div", {
329
- className: k.days,
330
- children: V.map((e) => {
329
+ className: A.days,
330
+ children: oe.map((e) => {
331
331
  let n = re(r, e);
332
332
  return /* @__PURE__ */ t("button", {
333
333
  type: "button",
334
- className: `${k.day} ${e.getMonth() === L.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
334
+ className: `${A.day} ${e.getMonth() === L.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
335
335
  disabled: ie(e, v, y),
336
336
  "aria-pressed": n,
337
- onClick: () => ae(e),
337
+ onClick: () => V(e),
338
338
  children: e.getDate()
339
339
  }, e.toISOString());
340
340
  })
341
341
  })
342
- ] }), U && /* @__PURE__ */ n("label", {
343
- className: k.timeLabel,
342
+ ] }), se && /* @__PURE__ */ n("label", {
343
+ className: A.timeLabel,
344
344
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
345
- className: k.timeInput,
345
+ className: A.timeInput,
346
346
  type: "time",
347
- value: z,
348
- onChange: (e) => oe(e.target.value)
347
+ value: ae,
348
+ onChange: (e) => H(e.target.value)
349
349
  })]
350
350
  })]
351
351
  }),
352
- p && !m && /* @__PURE__ */ t(E, {
353
- id: D,
352
+ p && !m && /* @__PURE__ */ t(D, {
353
+ id: T,
354
354
  children: p
355
355
  }),
356
- m && /* @__PURE__ */ t(E, {
356
+ m && /* @__PURE__ */ t(D, {
357
357
  id: O,
358
358
  variant: "error",
359
359
  children: m
360
360
  })
361
361
  ]
362
362
  });
363
- }, I = {
363
+ }, L = {
364
364
  root: "_root_9h2e2_1",
365
365
  legend: "_legend_9h2e2_2",
366
366
  range: "_range_9h2e2_3"
367
- }, L = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), R = ({ 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 = "" }) => {
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 = "" }) => {
368
368
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
369
- i?.(e), L(e) && r?.(e);
369
+ i?.(e), R(e) && r?.(e);
370
370
  };
371
371
  return /* @__PURE__ */ n("fieldset", {
372
- className: `${I.root} ${h}`,
372
+ className: `${L.root} ${h}`,
373
373
  disabled: f,
374
374
  children: [/* @__PURE__ */ n("div", {
375
- className: I.range,
376
- children: [/* @__PURE__ */ t(F, {
375
+ className: L.range,
376
+ children: [/* @__PURE__ */ t(I, {
377
377
  value: e.from,
378
378
  mode: a === "datetime" ? "datetime" : a,
379
379
  label: o,
@@ -387,7 +387,7 @@ var w = {
387
387
  ...e,
388
388
  from: t
389
389
  })
390
- }), /* @__PURE__ */ t(F, {
390
+ }), /* @__PURE__ */ t(I, {
391
391
  value: e.to,
392
392
  mode: a === "datetime" ? "datetime" : a,
393
393
  label: s,
@@ -402,7 +402,7 @@ var w = {
402
402
  to: t
403
403
  })
404
404
  })]
405
- }), c && !g && /* @__PURE__ */ t(E, { children: c })]
405
+ }), c && !g && /* @__PURE__ */ t(D, { children: c })]
406
406
  });
407
407
  }, z = {
408
408
  group: "_group_1st6r_1",
@@ -412,7 +412,7 @@ var w = {
412
412
  circular: "_circular_1st6r_5",
413
413
  animated: "_animated_1st6r_6",
414
414
  "ds-skeleton": "_ds-skeleton_1st6r_1"
415
- }, B = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
415
+ }, oe = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
416
  className: `${z.group} ${o}`,
417
417
  "aria-hidden": "true",
418
418
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
@@ -422,7 +422,7 @@ var w = {
422
422
  height: r
423
423
  }
424
424
  }, s))
425
- }), V = {
425
+ }), B = {
426
426
  wrapper: "_wrapper_dkn63_1",
427
427
  label: "_label_dkn63_17",
428
428
  container: "_container_dkn63_29",
@@ -438,15 +438,15 @@ var w = {
438
438
  message: "_message_dkn63_265",
439
439
  error: "_error_dkn63_267",
440
440
  errorState: "_errorState_dkn63_293"
441
- }, H = (e, t, n) => {
441
+ }, se = (e, t, n) => {
442
442
  for (let r = 0; r < e.length; r += 1) {
443
443
  let i = (t + r * n + e.length) % e.length;
444
444
  if (!e[i]?.disabled) return i;
445
445
  }
446
446
  return -1;
447
- }, U = ({ options: r, value: i, onChange: a, placeholder: d = "Выберите опцию", disabled: f = !1, stringWhileDisabled: p = !1, label: m, error: h, hint: g, className: _ = "", name: v, id: y, needMark: b = !0, maxMenuHeight: x }) => {
448
- let S = s(), C = y ?? `ds-dropdown-${v ?? S}`, [w, T] = u(!1), E = l(null), D = l(null), O = l([]), k = c(() => 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
- o(() => {
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 }) => {
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
+ s(() => {
450
450
  let e = (e) => {
451
451
  E.current?.contains(e.target) || T(!1);
452
452
  }, t = (e) => {
@@ -457,37 +457,37 @@ var w = {
457
457
  };
458
458
  }, [w]);
459
459
  let P = (e, t) => {
460
- let n = H(r, e, t);
460
+ let n = se(r, e, t);
461
461
  O.current[n]?.focus(), O.current[n]?.scrollIntoView({ block: "nearest" });
462
- }, ee = (e) => {
462
+ }, F = (e) => {
463
463
  e.disabled || (a?.(e.value, e), T(!1), D.current?.focus());
464
464
  };
465
465
  return /* @__PURE__ */ n("div", {
466
466
  ref: E,
467
467
  className: [
468
- V.wrapper,
469
- h ? V.errorState : "",
468
+ B.wrapper,
469
+ h ? B.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: V.label,
475
+ className: B.label,
476
476
  children: m
477
477
  }),
478
478
  /* @__PURE__ */ t("div", {
479
- className: V.container,
479
+ className: B.container,
480
480
  children: N ? /* @__PURE__ */ t("div", {
481
481
  id: C,
482
- className: V.disabledText,
482
+ className: B.disabledText,
483
483
  "aria-describedby": M,
484
- children: k?.label ?? d
484
+ children: k?.label ?? o
485
485
  }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("button", {
486
486
  ref: D,
487
487
  id: C,
488
488
  type: "button",
489
489
  name: v,
490
- className: V.trigger,
490
+ className: B.trigger,
491
491
  disabled: f,
492
492
  "aria-haspopup": "listbox",
493
493
  "aria-expanded": w,
@@ -503,10 +503,10 @@ var w = {
503
503
  }
504
504
  },
505
505
  children: [/* @__PURE__ */ t("span", {
506
- className: k ? V.value : V.placeholder,
507
- children: k?.label ?? d
506
+ className: k ? B.value : B.placeholder,
507
+ children: k?.label ?? o
508
508
  }), /* @__PURE__ */ t("span", {
509
- className: `${V.chevron} ${w ? V.chevronOpen : ""}`,
509
+ className: `${B.chevron} ${w ? B.chevronOpen : ""}`,
510
510
  "aria-hidden": "true",
511
511
  children: /* @__PURE__ */ t("svg", {
512
512
  viewBox: "0 0 20 20",
@@ -522,7 +522,7 @@ var w = {
522
522
  })]
523
523
  }), w && /* @__PURE__ */ t("ul", {
524
524
  id: `${C}-listbox`,
525
- className: V.menu,
525
+ className: B.menu,
526
526
  role: "listbox",
527
527
  "aria-label": m,
528
528
  style: { maxHeight: x },
@@ -538,8 +538,8 @@ var w = {
538
538
  role: "option",
539
539
  "aria-selected": o,
540
540
  disabled: e.disabled,
541
- className: `${V.option} ${o ? V.selected : ""}`,
542
- onClick: () => ee(e),
541
+ className: `${B.option} ${o ? B.selected : ""}`,
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") {
545
545
  e.preventDefault();
@@ -558,35 +558,35 @@ var w = {
558
558
  }),
559
559
  g && !h && /* @__PURE__ */ t("span", {
560
560
  id: A,
561
- className: V.message,
561
+ className: B.message,
562
562
  children: g
563
563
  }),
564
564
  h && /* @__PURE__ */ t("span", {
565
565
  id: j,
566
- className: V.error,
566
+ className: B.error,
567
567
  children: h
568
568
  })
569
569
  ]
570
570
  });
571
- }, ae = (e) => `${e.id}:${e.direction}`, oe = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
571
+ }, H = (e) => `${e.id}:${e.direction}`, U = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
572
572
  let c = e.flatMap((e) => [{
573
- value: ae({
573
+ value: H({
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: ae({
580
+ value: H({
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(U, {
587
+ return /* @__PURE__ */ t(V, {
588
588
  options: c,
589
- value: n ? ae(n) : "",
589
+ value: n ? H(n) : "",
590
590
  label: i,
591
591
  placeholder: a,
592
592
  disabled: o,
@@ -613,10 +613,10 @@ var w = {
613
613
  default: "_default_i4d62_21",
614
614
  tableOnMobile: "_tableOnMobile_i4d62_21",
615
615
  wide: "_wide_i4d62_23"
616
- }, se = m({
617
- rowSortingFeature: p,
618
- sortedRowModel: f()
619
- }), ce = (e, t) => {
616
+ }, ce = h({
617
+ rowSortingFeature: m,
618
+ sortedRowModel: p()
619
+ }), le = (e, t) => {
620
620
  let n = /* @__PURE__ */ new Set();
621
621
  for (let t of e) {
622
622
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -625,8 +625,8 @@ var w = {
625
625
  }
626
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}»`;
627
627
  return null;
628
- }, le = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: l, getRowId: f, caption: p, ariaLabel: m, loading: g = !1, error: _, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "" }) => {
629
- let [S, C] = u([]), w = o ?? S, T = c(() => ce(e, r), [e, r]), E = c(() => d(), []), D = c(() => E.columns(e.map((e) => {
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
630
  let t = e.accessor;
631
631
  return E.accessor(typeof t == "function" ? t : (e) => e[t], {
632
632
  id: e.id,
@@ -635,8 +635,8 @@ var w = {
635
635
  enableSorting: !0,
636
636
  sortDescFirst: e.sortDescFirst
637
637
  });
638
- })), [e, E]), O = h({
639
- features: se,
638
+ })), [e, E]), O = g({
639
+ features: ce,
640
640
  columns: D,
641
641
  data: r,
642
642
  state: { sorting: w },
@@ -644,7 +644,7 @@ var w = {
644
644
  let t = typeof e == "function" ? e(w) : e;
645
645
  o === void 0 && C(t), s?.(t);
646
646
  },
647
- getRowId: f
647
+ getRowId: u
648
648
  }), k = O.getRowModel().rows, A = e.map((e) => ({
649
649
  id: e.id,
650
650
  label: typeof e.header == "string" ? e.header : e.id
@@ -656,9 +656,9 @@ var w = {
656
656
  ].filter(Boolean).join(" "), M = T ?? _;
657
657
  return /* @__PURE__ */ n("section", {
658
658
  className: j,
659
- "aria-busy": g,
659
+ "aria-busy": h,
660
660
  children: [
661
- !i && !g && !M && k.length > 0 && /* @__PURE__ */ t(oe, {
661
+ !i && !h && !M && k.length > 0 && /* @__PURE__ */ t(U, {
662
662
  className: W.mobileSort,
663
663
  options: A,
664
664
  value: w[0] ? {
@@ -697,9 +697,9 @@ var w = {
697
697
  }, e.id);
698
698
  }) }, e.id))
699
699
  }),
700
- /* @__PURE__ */ t("tbody", { children: g ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
700
+ /* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
701
701
  colSpan: e.length,
702
- children: /* @__PURE__ */ t(B, { lines: 3 })
702
+ children: /* @__PURE__ */ t(oe, { lines: 3 })
703
703
  }) }) : M ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
704
704
  className: W.state,
705
705
  colSpan: e.length,
@@ -716,16 +716,16 @@ var w = {
716
716
  className: W.cards,
717
717
  role: "list",
718
718
  "aria-label": m ?? p,
719
- children: g ? /* @__PURE__ */ t(B, { lines: 4 }) : M ? /* @__PURE__ */ t("div", {
719
+ children: h ? /* @__PURE__ */ t(oe, { lines: 4 }) : M ? /* @__PURE__ */ t("div", {
720
720
  className: W.state,
721
721
  children: M
722
722
  }) : k.length === 0 ? /* @__PURE__ */ t("div", {
723
723
  className: W.state,
724
724
  children: v
725
725
  }) : k.map((r) => {
726
- if (l) return /* @__PURE__ */ t("div", {
726
+ if (c) return /* @__PURE__ */ t("div", {
727
727
  role: "listitem",
728
- children: l({
728
+ children: c({
729
729
  row: r.original,
730
730
  columns: e
731
731
  })
@@ -747,9 +747,9 @@ var w = {
747
747
  })
748
748
  ]
749
749
  });
750
- }, ue = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: d = !1, label: f, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
751
- let b = s(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = u(!1), w = l(null), T = l(null), E = l([]), D = c(() => 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
- o(() => {
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 }) => {
751
+ 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
+ s(() => {
753
753
  let e = (e) => {
754
754
  w.current?.contains(e.target) || C(!1);
755
755
  }, t = (e) => {
@@ -764,31 +764,31 @@ var w = {
764
764
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
765
765
  i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
766
766
  }, M = (t, n) => {
767
- let r = H(e, t, n);
767
+ let r = se(e, t, n);
768
768
  E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
769
769
  };
770
770
  return /* @__PURE__ */ n("div", {
771
771
  ref: w,
772
772
  className: [
773
- V.wrapper,
774
- p ? V.errorState : "",
773
+ B.wrapper,
774
+ p ? B.errorState : "",
775
775
  h
776
776
  ].filter(Boolean).join(" "),
777
777
  children: [
778
778
  f && /* @__PURE__ */ t("label", {
779
779
  htmlFor: x,
780
- className: V.label,
780
+ className: B.label,
781
781
  children: f
782
782
  }),
783
783
  /* @__PURE__ */ n("div", {
784
- className: V.container,
784
+ className: B.container,
785
785
  children: [/* @__PURE__ */ n("button", {
786
786
  ref: T,
787
787
  id: x,
788
788
  type: "button",
789
789
  name: g,
790
- className: V.trigger,
791
- disabled: d,
790
+ className: B.trigger,
791
+ disabled: o,
792
792
  "aria-haspopup": "listbox",
793
793
  "aria-expanded": S,
794
794
  "aria-controls": `${x}-listbox`,
@@ -803,16 +803,16 @@ var w = {
803
803
  }
804
804
  },
805
805
  children: [/* @__PURE__ */ t("span", {
806
- className: D.length ? V.value : V.placeholder,
806
+ className: D.length ? B.value : B.placeholder,
807
807
  children: O || a
808
808
  }), /* @__PURE__ */ t("span", {
809
- className: `${V.chevron} ${S ? V.chevronOpen : ""}`,
809
+ className: `${B.chevron} ${S ? B.chevronOpen : ""}`,
810
810
  "aria-hidden": "true",
811
811
  children: "⌄"
812
812
  })]
813
813
  }), S && /* @__PURE__ */ t("ul", {
814
814
  id: `${x}-listbox`,
815
- className: V.menu,
815
+ className: B.menu,
816
816
  role: "listbox",
817
817
  "aria-label": f,
818
818
  "aria-multiselectable": "true",
@@ -829,7 +829,7 @@ var w = {
829
829
  role: "option",
830
830
  "aria-selected": o,
831
831
  disabled: i.disabled,
832
- className: `${V.option} ${o ? V.selected : ""}`,
832
+ className: `${B.option} ${o ? B.selected : ""}`,
833
833
  onClick: () => j(i),
834
834
  onKeyDown: (t) => {
835
835
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
@@ -855,17 +855,17 @@ var w = {
855
855
  }),
856
856
  m && !p && /* @__PURE__ */ t("span", {
857
857
  id: k,
858
- className: V.message,
858
+ className: B.message,
859
859
  children: m
860
860
  }),
861
861
  p && /* @__PURE__ */ t("span", {
862
862
  id: A,
863
- className: V.error,
863
+ className: B.error,
864
864
  children: p
865
865
  })
866
866
  ]
867
867
  });
868
- }, de = {
868
+ }, fe = {
869
869
  approve: "M4 12l5 5L20 6",
870
870
  reject: "M5 5l14 14M19 5L5 19",
871
871
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -874,7 +874,7 @@ var w = {
874
874
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
875
875
  info: "M12 10v7m0-10v.01",
876
876
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
877
- }, fe = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
877
+ }, pe = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
878
878
  viewBox: "0 0 24 24",
879
879
  width: i,
880
880
  height: a,
@@ -887,21 +887,21 @@ var w = {
887
887
  "aria-hidden": !r || void 0,
888
888
  focusable: "false",
889
889
  ...o,
890
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: de[e] })]
890
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: fe[e] })]
891
891
  }), G = {
892
892
  root: "_root_1897l_1",
893
893
  header: "_header_1897l_11",
894
894
  title: "_title_1897l_21",
895
895
  dismiss: "_dismiss_1897l_28",
896
896
  content: "_content_1897l_57"
897
- }, pe = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: c = "h3", className: l = "" }) => {
898
- let u = `ds-info-block-${s()}`;
897
+ }, me = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
898
+ let u = `ds-info-block-${c()}`;
899
899
  return /* @__PURE__ */ n("section", {
900
900
  className: `${G.root} ${l}`,
901
901
  "aria-labelledby": u,
902
902
  children: [/* @__PURE__ */ n("header", {
903
903
  className: G.header,
904
- children: [/* @__PURE__ */ t(c, {
904
+ children: [/* @__PURE__ */ t(s, {
905
905
  id: u,
906
906
  className: G.title,
907
907
  children: e
@@ -934,18 +934,18 @@ var w = {
934
934
  disabledText: "_disabledText_1bpdz_5",
935
935
  inputError: "_inputError_1bpdz_11",
936
936
  clear: "_clear_1bpdz_13"
937
- }, me = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: c = !1, stringWhileDisabled: u = !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 = s(), C = g ?? `ds-input-${h ?? S}`, w = l(null), D = p ? `${C}-hint` : void 0, O = f ? `${C}-error` : void 0, k = String(e ?? ""), A = [D, O].filter(Boolean).join(" ") || void 0;
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
939
  return /* @__PURE__ */ n("div", {
940
940
  className: `${K.wrapper} ${m}`,
941
941
  children: [
942
- d && /* @__PURE__ */ t(T, {
942
+ d && /* @__PURE__ */ t(E, {
943
943
  htmlFor: C,
944
944
  required: v,
945
945
  disabled: o,
946
946
  children: d
947
947
  }),
948
- o && u ? /* @__PURE__ */ t("div", {
948
+ o && l ? /* @__PURE__ */ t("div", {
949
949
  id: C,
950
950
  className: K.disabledText,
951
951
  "aria-describedby": A,
@@ -960,7 +960,7 @@ var w = {
960
960
  value: k,
961
961
  placeholder: a,
962
962
  disabled: o,
963
- readOnly: c,
963
+ readOnly: s,
964
964
  required: v,
965
965
  "aria-invalid": !!f,
966
966
  "aria-describedby": A,
@@ -977,7 +977,7 @@ var w = {
977
977
  y && e.currentTarget.value && e.currentTarget.select(), b?.(e);
978
978
  },
979
979
  ...x
980
- }), _ && k && !o && !c && /* @__PURE__ */ t("button", {
980
+ }), _ && k && !o && !s && /* @__PURE__ */ t("button", {
981
981
  type: "button",
982
982
  className: K.clear,
983
983
  "aria-label": "Очистить поле",
@@ -988,11 +988,11 @@ var w = {
988
988
  children: "×"
989
989
  })]
990
990
  }),
991
- p && !f && /* @__PURE__ */ t(E, {
992
- id: D,
991
+ p && !f && /* @__PURE__ */ t(D, {
992
+ id: T,
993
993
  children: p
994
994
  }),
995
- f && /* @__PURE__ */ t(E, {
995
+ f && /* @__PURE__ */ t(D, {
996
996
  id: O,
997
997
  variant: "error",
998
998
  children: f
@@ -1006,11 +1006,11 @@ var w = {
1006
1006
  thumb: "_thumb_8srjz_34",
1007
1007
  label: "_label_8srjz_56",
1008
1008
  disabled: "_disabled_8srjz_62"
1009
- }, he = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: c = "", name: l, id: u, value: d }) => {
1010
- let f = s(), p = u ?? `ds-radio-button-${l ?? f}`;
1009
+ }, ge = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1010
+ let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1011
1011
  return /* @__PURE__ */ n("label", {
1012
1012
  htmlFor: p,
1013
- className: `${q.wrapper} ${a ? q.disabled : ""} ${c}`,
1013
+ className: `${q.wrapper} ${a ? q.disabled : ""} ${s}`,
1014
1014
  children: [
1015
1015
  /* @__PURE__ */ t("input", {
1016
1016
  id: p,
@@ -1037,11 +1037,11 @@ var w = {
1037
1037
  })
1038
1038
  ]
1039
1039
  });
1040
- }, ge = {
1040
+ }, _e = {
1041
1041
  root: "_root_kepgo_1",
1042
1042
  grid: "_grid_kepgo_3",
1043
1043
  actions: "_actions_kepgo_5"
1044
- }, _e = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1044
+ }, ve = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1045
1045
  let d = (e, t) => {
1046
1046
  let n = {
1047
1047
  ...r,
@@ -1050,11 +1050,11 @@ var w = {
1050
1050
  i?.(n, e), s === "instant" && a?.(n);
1051
1051
  };
1052
1052
  return /* @__PURE__ */ n("section", {
1053
- className: `${ge.root} ${u}`,
1053
+ className: `${_e.root} ${u}`,
1054
1054
  "aria-label": "Фильтры",
1055
1055
  "aria-busy": c,
1056
1056
  children: [/* @__PURE__ */ t("div", {
1057
- className: ge.grid,
1057
+ className: _e.grid,
1058
1058
  children: e.filter((e) => !e.hidden).map((e) => {
1059
1059
  let n = l || c || e.disabled, i = r[e.id];
1060
1060
  if (e.type === "input") {
@@ -1065,19 +1065,19 @@ var w = {
1065
1065
  placeholder: e.placeholder,
1066
1066
  disabled: n
1067
1067
  };
1068
- return e.inputType === "number" ? /* @__PURE__ */ t(me, {
1068
+ return e.inputType === "number" ? /* @__PURE__ */ t(he, {
1069
1069
  ...r,
1070
1070
  type: "number",
1071
1071
  value: i ?? "",
1072
1072
  onChange: (t) => d(e.id, t)
1073
- }) : /* @__PURE__ */ t(me, {
1073
+ }) : /* @__PURE__ */ t(he, {
1074
1074
  ...r,
1075
1075
  type: "text",
1076
1076
  value: String(i ?? ""),
1077
1077
  onChange: (t) => d(e.id, t)
1078
1078
  });
1079
1079
  }
1080
- if (e.type === "dropdown") return /* @__PURE__ */ t(U, {
1080
+ if (e.type === "dropdown") return /* @__PURE__ */ t(V, {
1081
1081
  label: e.label,
1082
1082
  hint: e.hint,
1083
1083
  placeholder: e.placeholder,
@@ -1086,7 +1086,7 @@ var w = {
1086
1086
  disabled: n,
1087
1087
  onChange: (t) => d(e.id, t)
1088
1088
  }, e.id);
1089
- if (e.type === "multiple") return /* @__PURE__ */ t(ue, {
1089
+ if (e.type === "multiple") return /* @__PURE__ */ t(de, {
1090
1090
  label: e.label,
1091
1091
  hint: e.hint,
1092
1092
  placeholder: e.placeholder,
@@ -1095,14 +1095,14 @@ var w = {
1095
1095
  disabled: n,
1096
1096
  onChange: (t) => d(e.id, t)
1097
1097
  }, e.id);
1098
- if (e.type === "checkbox") return /* @__PURE__ */ t(O, {
1098
+ if (e.type === "checkbox") return /* @__PURE__ */ t(k, {
1099
1099
  label: e.label,
1100
1100
  hint: e.hint,
1101
1101
  checked: !!i,
1102
1102
  disabled: n,
1103
1103
  onChange: (t) => d(e.id, t)
1104
1104
  }, e.id);
1105
- if (e.type === "radio") return /* @__PURE__ */ t(he, {
1105
+ if (e.type === "radio") return /* @__PURE__ */ t(ge, {
1106
1106
  label: e.label,
1107
1107
  checked: !!i,
1108
1108
  disabled: n,
@@ -1112,7 +1112,7 @@ var w = {
1112
1112
  from: null,
1113
1113
  to: null
1114
1114
  };
1115
- return /* @__PURE__ */ t(R, {
1115
+ return /* @__PURE__ */ t(ae, {
1116
1116
  hint: e.hint,
1117
1117
  mode: e.mode,
1118
1118
  min: e.min,
@@ -1123,13 +1123,13 @@ var w = {
1123
1123
  }, e.id);
1124
1124
  })
1125
1125
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1126
- className: ge.actions,
1127
- children: [o && /* @__PURE__ */ t(C, {
1126
+ className: _e.actions,
1127
+ children: [o && /* @__PURE__ */ t(w, {
1128
1128
  variant: "destructiveOutline",
1129
1129
  disabled: l || c,
1130
1130
  onClick: o,
1131
1131
  children: "Сбросить"
1132
- }), s === "manual" && /* @__PURE__ */ t(C, {
1132
+ }), s === "manual" && /* @__PURE__ */ t(w, {
1133
1133
  isLoading: c,
1134
1134
  disabled: l,
1135
1135
  onClick: () => a?.(r),
@@ -1137,11 +1137,11 @@ var w = {
1137
1137
  })]
1138
1138
  })]
1139
1139
  });
1140
- }, ve = 0, J = _((e) => ({
1140
+ }, ye = 0, J = v((e) => ({
1141
1141
  modals: [],
1142
1142
  openModal: (t, n = {}, r = {}) => {
1143
- ve += 1;
1144
- let i = `ds-modal-${ve}`;
1143
+ ye += 1;
1144
+ let i = `ds-modal-${ye}`;
1145
1145
  return e((e) => ({ modals: [...e.modals, {
1146
1146
  id: i,
1147
1147
  name: t,
@@ -1153,7 +1153,7 @@ var w = {
1153
1153
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1154
1154
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1155
1155
  closeAllModals: () => e({ modals: [] })
1156
- })), ye = () => J.setState({ modals: [] }), Y = {
1156
+ })), be = () => J.setState({ modals: [] }), Y = {
1157
1157
  layer: "_layer_bl99k_1",
1158
1158
  backdrop: "_backdrop_bl99k_2",
1159
1159
  panel: "_panel_bl99k_3",
@@ -1161,14 +1161,14 @@ var w = {
1161
1161
  title: "_title_bl99k_6",
1162
1162
  description: "_description_bl99k_7",
1163
1163
  content: "_content_bl99k_8"
1164
- }, be = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", xe = ({ children: e, title: r, description: i, modalId: a, closeLabel: c = "Закрыть модальное окно", className: u = "", role: d = "dialog" }) => {
1165
- let f = s(), p = s(), m = l(null), h = J((e) => e.closeModal);
1166
- return o(() => {
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);
1166
+ return s(() => {
1167
1167
  let e = document.activeElement, t = m.current;
1168
- return (t?.querySelector(be) ?? t)?.focus(), () => e?.focus();
1168
+ return (t?.querySelector(xe) ?? t)?.focus(), () => e?.focus();
1169
1169
  }, []), /* @__PURE__ */ n("div", {
1170
1170
  ref: m,
1171
- className: `${Y.panel} ${u}`,
1171
+ className: `${Y.panel} ${l}`,
1172
1172
  role: d,
1173
1173
  "aria-modal": "true",
1174
1174
  "aria-labelledby": r ? f : void 0,
@@ -1176,7 +1176,7 @@ var w = {
1176
1176
  tabIndex: -1,
1177
1177
  onKeyDown: (e) => {
1178
1178
  if (e.key !== "Tab") return;
1179
- let t = Array.from(m.current?.querySelectorAll(be) ?? []);
1179
+ let t = Array.from(m.current?.querySelectorAll(xe) ?? []);
1180
1180
  if (!t.length) {
1181
1181
  e.preventDefault();
1182
1182
  return;
@@ -1185,16 +1185,16 @@ var w = {
1185
1185
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
1186
1186
  },
1187
1187
  children: [
1188
- (r || c) && /* @__PURE__ */ n("header", {
1188
+ (r || o) && /* @__PURE__ */ n("header", {
1189
1189
  className: Y.header,
1190
1190
  children: [r && /* @__PURE__ */ t("h2", {
1191
1191
  id: f,
1192
1192
  className: Y.title,
1193
1193
  children: r
1194
- }), /* @__PURE__ */ t(C, {
1194
+ }), /* @__PURE__ */ t(w, {
1195
1195
  variant: "empty",
1196
1196
  size: "sm",
1197
- "aria-label": c,
1197
+ "aria-label": o,
1198
1198
  onClick: () => h(a),
1199
1199
  children: "×"
1200
1200
  })]
@@ -1210,16 +1210,16 @@ var w = {
1210
1210
  })
1211
1211
  ]
1212
1212
  });
1213
- }, Se = ({ registry: e }) => {
1213
+ }, Ce = ({ registry: e }) => {
1214
1214
  let n = J((e) => e.modals), r = J((e) => e.closeModal), i = J((e) => e.closeAllModals);
1215
- return o(() => {
1215
+ return s(() => {
1216
1216
  let e = (e) => {
1217
1217
  if (e.key !== "Escape") return;
1218
1218
  let t = J.getState().modals.at(-1);
1219
1219
  t?.closeOnEscape && r(t.id);
1220
1220
  };
1221
1221
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1222
- }, [r]), !n.length || typeof document > "u" ? null : g(/* @__PURE__ */ t("div", {
1222
+ }, [r]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
1223
1223
  className: Y.layer,
1224
1224
  "aria-label": "Модальные окна",
1225
1225
  children: n.map((a, o) => {
@@ -1239,23 +1239,23 @@ var w = {
1239
1239
  }, a.id) : null;
1240
1240
  })
1241
1241
  }), document.body);
1242
- }, Ce = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1243
- let s = J((e) => e.modals.length);
1244
- return o(() => {
1245
- if (!a || s === 0) return;
1242
+ }, we = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1243
+ let o = J((e) => e.modals.length);
1244
+ return s(() => {
1245
+ if (!a || o === 0) return;
1246
1246
  let e = document.body.style.overflow;
1247
1247
  return document.body.style.overflow = "hidden", () => {
1248
1248
  document.body.style.overflow = e;
1249
1249
  };
1250
- }, [a, s]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Se, { registry: r })] });
1251
- }, we = (e) => e, X = {
1250
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Ce, { registry: r })] });
1251
+ }, Te = (e) => e, X = {
1252
1252
  message: "_message_187g8_1",
1253
1253
  actions: "_actions_187g8_2"
1254
- }, Te = /* @__PURE__ */ new Map(), Ee = 0, De = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
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 }) => {
1255
1255
  let u = (e) => {
1256
- Te.get(l)?.(e), Te.delete(l), r();
1256
+ Ee.get(l)?.(e), Ee.delete(l), r();
1257
1257
  };
1258
- return /* @__PURE__ */ n(xe, {
1258
+ return /* @__PURE__ */ n(Se, {
1259
1259
  modalId: e,
1260
1260
  title: i,
1261
1261
  role: "alertdialog",
@@ -1264,18 +1264,18 @@ var w = {
1264
1264
  children: a
1265
1265
  }), /* @__PURE__ */ n("div", {
1266
1266
  className: X.actions,
1267
- children: [/* @__PURE__ */ t(C, {
1267
+ children: [/* @__PURE__ */ t(w, {
1268
1268
  variant: "outline",
1269
1269
  onClick: () => u(!1),
1270
1270
  children: s
1271
- }), /* @__PURE__ */ t(C, {
1271
+ }), /* @__PURE__ */ t(w, {
1272
1272
  variant: c === "danger" ? "destructive" : "primary",
1273
1273
  onClick: () => u(!0),
1274
1274
  children: o
1275
1275
  })]
1276
1276
  })]
1277
1277
  });
1278
- }, Oe = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(xe, {
1278
+ }, ke = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Se, {
1279
1279
  modalId: e,
1280
1280
  title: i,
1281
1281
  role: "alertdialog",
@@ -1284,31 +1284,31 @@ var w = {
1284
1284
  children: a
1285
1285
  }), /* @__PURE__ */ t("div", {
1286
1286
  className: X.actions,
1287
- children: /* @__PURE__ */ t(C, {
1287
+ children: /* @__PURE__ */ t(w, {
1288
1288
  onClick: r,
1289
1289
  children: o
1290
1290
  })
1291
1291
  })]
1292
- }), ke = we({
1293
- ConfirmModal: De,
1294
- ErrorModal: Oe
1295
- }), Ae = () => {
1292
+ }), Ae = Te({
1293
+ ConfirmModal: Oe,
1294
+ ErrorModal: ke
1295
+ }), je = () => {
1296
1296
  let e = J((e) => e.openModal);
1297
1297
  return (t = {}) => new Promise((n) => {
1298
- Ee += 1;
1299
- let r = `confirm-${Ee}`;
1300
- Te.set(r, n), e("ConfirmModal", {
1298
+ De += 1;
1299
+ let r = `confirm-${De}`;
1300
+ Ee.set(r, n), e("ConfirmModal", {
1301
1301
  ...t,
1302
1302
  requestId: r
1303
1303
  }, { closeOnEscape: !1 });
1304
1304
  });
1305
- }, je = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Me = () => {
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
1306
  let e = J((e) => e.openModal);
1307
1307
  return { showError: (t, n) => e("ErrorModal", {
1308
1308
  title: n,
1309
- message: je(t)
1309
+ message: Me(t)
1310
1310
  }) };
1311
- }, Ne = _(() => ({})), Pe = _(() => ({})), Fe = () => {
1311
+ }, Pe = v(() => ({})), Fe = v(() => ({})), Ie = () => {
1312
1312
  let e = J((e) => e.modals), t = J((e) => e.openModal);
1313
1313
  return {
1314
1314
  openModal: (e, n = {}, r) => t(e, n, r),
@@ -1318,16 +1318,16 @@ var w = {
1318
1318
  isOpen: (t) => e.some((e) => e.name === t),
1319
1319
  count: e.length
1320
1320
  };
1321
- }, Ie = { root: "_root_1j70j_1" }, Le = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1322
- className: `${Ie.root} ${r}`,
1321
+ }, Le = { root: "_root_1j70j_1" }, Re = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1322
+ className: `${Le.root} ${r}`,
1323
1323
  role: "status",
1324
1324
  "aria-label": e,
1325
- children: [/* @__PURE__ */ t(x, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1326
- }), Re = {
1325
+ children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1326
+ }), ze = {
1327
1327
  root: "_root_ig8lp_1",
1328
1328
  legend: "_legend_ig8lp_2",
1329
1329
  range: "_range_ig8lp_3"
1330
- }, ze = [
1330
+ }, Be = [
1331
1331
  {
1332
1332
  value: "1",
1333
1333
  label: "День"
@@ -1340,19 +1340,19 @@ var w = {
1340
1340
  value: "3",
1341
1341
  label: "Месяц"
1342
1342
  }
1343
- ], Be = {
1343
+ ], Ve = {
1344
1344
  day: 1,
1345
1345
  week: 2,
1346
1346
  month: 3
1347
- }, Ve = ({ value: e, onChange: r, label: i, hint: a, error: o, disabled: s = !1, min: c, max: l, className: u = "", periodTypeOptions: d = ze }) => /* @__PURE__ */ n("fieldset", {
1348
- className: `${Re.root} ${u}`,
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}`,
1349
1349
  disabled: s,
1350
1350
  children: [
1351
1351
  i && /* @__PURE__ */ t("legend", {
1352
- className: Re.legend,
1352
+ className: ze.legend,
1353
1353
  children: i
1354
1354
  }),
1355
- /* @__PURE__ */ t(U, {
1355
+ /* @__PURE__ */ t(V, {
1356
1356
  options: d,
1357
1357
  value: String(e.periodType),
1358
1358
  disabled: s,
@@ -1363,8 +1363,8 @@ var w = {
1363
1363
  label: "Тип периода"
1364
1364
  }),
1365
1365
  /* @__PURE__ */ n("div", {
1366
- className: Re.range,
1367
- children: [/* @__PURE__ */ t(F, {
1366
+ className: ze.range,
1367
+ children: [/* @__PURE__ */ t(I, {
1368
1368
  value: e.startDate,
1369
1369
  onChange: (t) => r?.({
1370
1370
  ...e,
@@ -1374,7 +1374,7 @@ var w = {
1374
1374
  min: c,
1375
1375
  max: l,
1376
1376
  disabled: s
1377
- }), /* @__PURE__ */ t(F, {
1377
+ }), /* @__PURE__ */ t(I, {
1378
1378
  value: e.endDate,
1379
1379
  onChange: (t) => r?.({
1380
1380
  ...e,
@@ -1386,8 +1386,8 @@ var w = {
1386
1386
  disabled: s
1387
1387
  })]
1388
1388
  }),
1389
- a && !o && /* @__PURE__ */ t(E, { children: a }),
1390
- o && /* @__PURE__ */ t(E, {
1389
+ a && !o && /* @__PURE__ */ t(D, { children: a }),
1390
+ o && /* @__PURE__ */ t(D, {
1391
1391
  variant: "error",
1392
1392
  children: o
1393
1393
  })
@@ -1405,14 +1405,14 @@ var w = {
1405
1405
  success: "_success_v7rog_10",
1406
1406
  warning: "_warning_v7rog_11",
1407
1407
  error: "_error_v7rog_12"
1408
- }, He = ({ toast: e, onClose: r }) => {
1409
- let [i, a] = u(!1), s = l(e.duration), c = l(Date.now());
1410
- return o(() => {
1408
+ }, Ue = ({ toast: e, onClose: r }) => {
1409
+ let [i, a] = d(!1), o = u(e.duration), c = u(Date.now());
1410
+ return s(() => {
1411
1411
  if (i || e.duration <= 0) return;
1412
1412
  c.current = Date.now();
1413
- let t = setTimeout(() => r(e.id), s.current);
1413
+ let t = setTimeout(() => r(e.id), o.current);
1414
1414
  return () => {
1415
- clearTimeout(t), s.current = Math.max(0, s.current - (Date.now() - c.current));
1415
+ clearTimeout(t), o.current = Math.max(0, o.current - (Date.now() - c.current));
1416
1416
  };
1417
1417
  }, [
1418
1418
  r,
@@ -1428,7 +1428,7 @@ var w = {
1428
1428
  onFocus: () => a(!0),
1429
1429
  onBlur: () => a(!1),
1430
1430
  children: [
1431
- /* @__PURE__ */ t(fe, {
1431
+ /* @__PURE__ */ t(pe, {
1432
1432
  name: e.variant === "warning" ? "warning" : "info",
1433
1433
  className: Z.icon
1434
1434
  }),
@@ -1437,7 +1437,7 @@ var w = {
1437
1437
  children: [
1438
1438
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1439
1439
  /* @__PURE__ */ t("div", { children: e.message }),
1440
- e.action && /* @__PURE__ */ t(C, {
1440
+ e.action && /* @__PURE__ */ t(w, {
1441
1441
  variant: "empty",
1442
1442
  size: "sm",
1443
1443
  onClick: () => {
@@ -1447,7 +1447,7 @@ var w = {
1447
1447
  })
1448
1448
  ]
1449
1449
  }),
1450
- e.closable && /* @__PURE__ */ t(C, {
1450
+ e.closable && /* @__PURE__ */ t(w, {
1451
1451
  variant: "empty",
1452
1452
  size: "sm",
1453
1453
  "aria-label": "Закрыть уведомление",
@@ -1456,11 +1456,11 @@ var w = {
1456
1456
  })
1457
1457
  ]
1458
1458
  });
1459
- }, Ue = 0, Q = _((e) => ({
1459
+ }, We = 0, Q = v((e) => ({
1460
1460
  toasts: [],
1461
1461
  showToast: (t) => {
1462
- Ue += 1;
1463
- let n = `ds-toast-${Ue}`;
1462
+ We += 1;
1463
+ let n = `ds-toast-${We}`;
1464
1464
  return e((e) => ({ toasts: [...e.toasts, {
1465
1465
  variant: "info",
1466
1466
  duration: 5e3,
@@ -1471,31 +1471,48 @@ var w = {
1471
1471
  },
1472
1472
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1473
1473
  clearToasts: () => e({ toasts: [] })
1474
- })), We = () => Q.setState({ toasts: [] }), Ge = ({ position: e = "top-right" }) => {
1474
+ })), Ge = () => Q.setState({ toasts: [] }), Ke = ({ position: e = "top-right" }) => {
1475
1475
  let n = Q((e) => e.toasts), r = Q((e) => e.removeToast);
1476
1476
  return /* @__PURE__ */ t("div", {
1477
1477
  className: `${Z.viewport} ${Z[e]}`,
1478
1478
  "aria-label": "Уведомления",
1479
- children: n.map((e) => /* @__PURE__ */ t(He, {
1479
+ children: n.map((e) => /* @__PURE__ */ t(Ue, {
1480
1480
  toast: e,
1481
1481
  onClose: r
1482
1482
  }, e.id))
1483
1483
  });
1484
- }, Ke = () => {
1485
- let e = Q((e) => e.showToast), t = Q((e) => e.removeToast), n = Q((e) => e.clearToasts), r = (t) => (n) => e({
1486
- ...n,
1487
- variant: t
1488
- });
1489
- return {
1484
+ }, qe = () => {
1485
+ let e = Q((e) => e.showToast), t = Q((e) => e.removeToast), n = Q((e) => e.clearToasts), r = o((t) => e({
1486
+ ...t,
1487
+ variant: "info"
1488
+ }), [e]), i = o((t) => e({
1489
+ ...t,
1490
+ variant: "success"
1491
+ }), [e]), a = o((t) => e({
1492
+ ...t,
1493
+ variant: "warning"
1494
+ }), [e]), s = o((t) => e({
1495
+ ...t,
1496
+ variant: "error"
1497
+ }), [e]);
1498
+ return l(() => ({
1490
1499
  showToast: e,
1491
- infoToast: r("info"),
1492
- successToast: r("success"),
1493
- warningToast: r("warning"),
1494
- errorToast: r("error"),
1500
+ infoToast: r,
1501
+ successToast: i,
1502
+ warningToast: a,
1503
+ errorToast: s,
1495
1504
  removeToast: t,
1496
1505
  clearToasts: n
1497
- };
1498
- }, qe = {
1506
+ }), [
1507
+ n,
1508
+ s,
1509
+ r,
1510
+ t,
1511
+ e,
1512
+ i,
1513
+ a
1514
+ ]);
1515
+ }, Je = {
1499
1516
  root: "_root_2bxal_1",
1500
1517
  tooltip: "_tooltip_2bxal_2",
1501
1518
  "ds-tooltip-in": "_ds-tooltip-in_2bxal_1",
@@ -1503,13 +1520,13 @@ var w = {
1503
1520
  bottom: "_bottom_2bxal_4",
1504
1521
  left: "_left_2bxal_5",
1505
1522
  right: "_right_2bxal_6"
1506
- }, Je = ({ content: e, children: i, placement: c = "top", delay: d = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1507
- let h = s(), [g, _] = u(!1), v = l(null), y = () => {
1508
- f || !e || (v.current = setTimeout(() => _(!0), d));
1523
+ }, Ye = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1524
+ let h = c(), [g, _] = d(!1), v = u(null), y = () => {
1525
+ f || !e || (v.current = setTimeout(() => _(!0), l));
1509
1526
  }, b = () => {
1510
1527
  v.current && clearTimeout(v.current), _(!1);
1511
1528
  };
1512
- if (o(() => {
1529
+ if (s(() => {
1513
1530
  let e = (e) => {
1514
1531
  e.key === "Escape" && b();
1515
1532
  };
@@ -1525,12 +1542,12 @@ var w = {
1525
1542
  onBlur: b
1526
1543
  });
1527
1544
  return /* @__PURE__ */ n("span", {
1528
- className: `${qe.root} ${m}`,
1545
+ className: `${Je.root} ${m}`,
1529
1546
  onPointerDown: g ? b : y,
1530
1547
  children: [x, g && /* @__PURE__ */ t("span", {
1531
1548
  id: h,
1532
1549
  role: "tooltip",
1533
- className: `${qe.tooltip} ${qe[c]}`,
1550
+ className: `${Je.tooltip} ${Je[o]}`,
1534
1551
  style: { maxWidth: p },
1535
1552
  children: e
1536
1553
  })]
@@ -1542,10 +1559,10 @@ var w = {
1542
1559
  overlay: "_overlay_tgni1_4",
1543
1560
  error: "_error_tgni1_4",
1544
1561
  caption: "_caption_tgni1_7"
1545
- }, Ye = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: d = "", controls: f = !0, playsInline: p = !0, ...m }) => {
1546
- let [h, g] = u(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
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 }) => {
1563
+ let [h, g] = d(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
1547
1564
  return /* @__PURE__ */ n("figure", {
1548
- className: `${$.root} ${d}`,
1565
+ className: `${$.root} ${u}`,
1549
1566
  children: [/* @__PURE__ */ n("div", {
1550
1567
  className: $.frame,
1551
1568
  style: { aspectRatio: a },
@@ -1564,7 +1581,7 @@ var w = {
1564
1581
  }),
1565
1582
  s && /* @__PURE__ */ t("div", {
1566
1583
  className: $.overlay,
1567
- children: /* @__PURE__ */ t(x, { label: "Загрузка видео" })
1584
+ children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
1568
1585
  }),
1569
1586
  (_ || e.length === 0) && /* @__PURE__ */ t("div", {
1570
1587
  className: $.error,
@@ -1579,4 +1596,4 @@ var w = {
1579
1596
  });
1580
1597
  };
1581
1598
  //#endregion
1582
- export { De as ConfirmModal, y as DSBadge, C as DSButton, O as DSCheckbox, le as DSDataTable, R as DSDateRange, F as DSDateTimePicker, U as DSDropDown, ue as DSDropDownMultiple, T as DSFieldLabel, E as DSFieldMessage, _e as DSFilters, fe as DSIcon, pe as DSInfoBlock, me as DSInput, x as DSLoader, Se as DSModal, xe as DSModalFrame, Le as DSPageLoader, he as DSRadioButton, B as DSSkeleton, oe as DSSort, Ve as DSTimePeriodPicker, He as DSToast, Ge as DSToastProvider, Je as DSTooltip, Ye as DSVideoPlayerFrame, Be as DS_PERIOD_TYPE_CODES, Oe as ErrorModal, Ce as ModalSystemProvider, ke as builtInModalRegistry, we as defineModalRegistry, P as formatDateTimeLocalValue, je as getErrorMessage, H as getNextEnabledOptionIndex, L as isValidDateRange, ee as parseDateTimeLocalValue, ye as resetModalStore, We as resetToastStore, Ae as useConfirmModal, Ne as useConfirmModalStore, Me as useErrorModal, Pe as useErrorModalStore, Fe as useModals, J as useModalsStore, Ke as useToast, Q as useToastStore, ce as validateDSDataTableData };
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 };