@efficiency-point/design-system 0.0.17 → 0.0.18

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, useCallback as o, useEffect as s, useId as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { 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, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
3
+ import { createPortal as p } from "react-dom";
4
+ import { createSortedRowModel as m, rowSortingFeature as h, tableFeatures as g, useTable as _ } from "@tanstack/react-table";
5
+ import { create as v } from "zustand";
6
+ var y = {
7
7
  badge: "_badge_1pk53_1",
8
8
  sm: "_sm_1pk53_3",
9
9
  md: "_md_1pk53_5",
@@ -15,36 +15,36 @@ var v = {
15
15
  dot: "_dot_1pk53_17",
16
16
  icon: "_icon_1pk53_19",
17
17
  label: "_label_1pk53_21"
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_1tjcf_1",
37
37
  "ds-spin": "_ds-spin_1tjcf_1",
38
38
  primary: "_primary_1tjcf_21",
39
39
  secondary: "_secondary_1tjcf_23",
40
40
  light: "_light_1tjcf_25",
41
41
  danger: "_danger_1tjcf_27"
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_1jisp_1",
49
49
  sm: "_sm_1jisp_31",
50
50
  md: "_md_1jisp_33",
@@ -56,20 +56,20 @@ var v = {
56
56
  empty: "_empty_1jisp_57",
57
57
  destructive: "_destructive_1jisp_67",
58
58
  destructiveOutline: "_destructiveOutline_1jisp_69"
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
- className: `${S.button} ${S[n]} ${S[r]} ${c}`,
61
+ className: `${C.button} ${C[n]} ${C[r]} ${c}`,
62
62
  disabled: o || i,
63
63
  "aria-busy": i || void 0,
64
64
  ...l,
65
65
  type: s,
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_1lsqq_1",
74
74
  required: "_required_1lsqq_23",
75
75
  error: "_error_1lsqq_25",
@@ -78,43 +78,43 @@ var w = {
78
78
  disabled: "_disabled_1lsqq_47",
79
79
  message: "_message_1lsqq_55",
80
80
  success: "_success_1lsqq_71"
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_1gq36_1",
104
104
  label: "_label_1gq36_3",
105
105
  input: "_input_1gq36_5",
106
106
  control: "_control_1gq36_7",
107
107
  disabled: "_disabled_1gq36_13",
108
108
  controlError: "_controlError_1gq36_17"
109
- }, O = ({ 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;
109
+ }, k = ({ checked: e, onChange: r, label: i, hint: a, error: o, disabled: l = !1, readOnly: u = !1, className: f = "", name: p, id: m, indeterminate: h = !1, ...g }) => {
110
+ let _ = c(), v = m ?? `ds-checkbox-${p ?? _}`, y = d(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: `${D.wrapper} ${f}`,
114
+ className: `${O.wrapper} ${f}`,
115
115
  children: [
116
116
  /* @__PURE__ */ n("label", {
117
- className: `${D.label} ${l ? D.disabled : ""}`,
117
+ className: `${O.label} ${l ? O.disabled : ""}`,
118
118
  htmlFor: v,
119
119
  children: [
120
120
  /* @__PURE__ */ t("input", {
@@ -124,53 +124,53 @@ var w = {
124
124
  type: "checkbox",
125
125
  checked: e,
126
126
  disabled: l,
127
- "aria-readonly": d || void 0,
127
+ "aria-readonly": u || void 0,
128
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
- d || r?.(e.target.checked, e);
132
+ u || r?.(e.target.checked, e);
133
133
  },
134
134
  ...g
135
135
  }),
136
136
  /* @__PURE__ */ t("span", {
137
- className: `${D.control} ${o ? 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 && !o && /* @__PURE__ */ t(E, {
144
+ a && !o && /* @__PURE__ */ t(D, {
145
145
  id: b,
146
146
  children: a
147
147
  }),
148
- o && /* @__PURE__ */ t(E, {
148
+ o && /* @__PURE__ */ t(D, {
149
149
  id: x,
150
150
  variant: "error",
151
151
  children: o
152
152
  })
153
153
  ]
154
154
  });
155
- }, k = {
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
- }, A = [
155
+ }, A = {
156
+ wrapper: "_wrapper_v84a4_1",
157
+ trigger: "_trigger_v84a4_17",
158
+ nav: "_nav_v84a4_53",
159
+ day: "_day_v84a4_55",
160
+ monthSelect: "_monthSelect_v84a4_57",
161
+ yearInput: "_yearInput_v84a4_59",
162
+ timeInput: "_timeInput_v84a4_61",
163
+ value: "_value_v84a4_85",
164
+ placeholder: "_placeholder_v84a4_93",
165
+ error: "_error_v84a4_101",
166
+ panel: "_panel_v84a4_109",
167
+ calendarHeader: "_calendarHeader_v84a4_135",
168
+ weekdays: "_weekdays_v84a4_225",
169
+ days: "_days_v84a4_227",
170
+ outside: "_outside_v84a4_263",
171
+ selected: "_selected_v84a4_271",
172
+ timeLabel: "_timeLabel_v84a4_291"
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,11 +191,11 @@ 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
- }, F = (e, t) => {
198
+ }, I = (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,209 @@ var w = {
207
207
  }
208
208
  let n = new Date(t === "date" ? `${e}T00:00` : e);
209
209
  return Number.isNaN(n.getTime()) ? null : n;
210
- }, I = (e, t) => {
210
+ }, L = (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
- }, L = (e) => {
214
+ }, ee = (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
- }, ee = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), te = (e, t, n) => {
221
- let r = N(e).getTime();
222
- return !!(t && r < N(t).getTime() || n && r > N(n).getTime());
223
- }, ne = ({ 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}`, D = p ? `${w}-hint` : void 0, O = m ? `${w}-error` : void 0, M = u(null), N = u(null), [ne, R] = d(!1), [z, B] = d(r ?? /* @__PURE__ */ new Date()), [V, H] = d(P(r, "time")), U = l(() => L(z), [z]), re = a !== "time", ie = a !== "date";
220
+ }, te = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), ne = (e, t, n) => {
221
+ let r = P(e).getTime();
222
+ return !!(t && r < P(t).getTime() || n && r > P(n).getTime());
223
+ }, re = 8, ie = 6, ae = ({ value: r, onChange: i, mode: a = "date", label: m, placeholder: h, hint: g, error: _, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, id: C, name: w, className: T = "" }) => {
224
+ let O = c(), k = C ?? `ds-date-time-${w ?? O}`, N = g ? `${k}-hint` : void 0, P = _ ? `${k}-error` : void 0, ae = d(null), oe = d(null), se = d(null), [R, z] = f(!1), [B, V] = f(r ?? /* @__PURE__ */ new Date()), [ce, le] = f(F(r, "time")), [H, ue] = f(null), U = u(() => ee(B), [B]), de = a !== "time", fe = a !== "date";
225
225
  s(() => {
226
- r && B(r), H(P(r, "time"));
227
- }, [r]), s(() => {
226
+ r && V(r), le(F(r, "time"));
227
+ }, [r]);
228
+ let W = o(() => {
229
+ let e = oe.current, t = se.current;
230
+ if (!e || !t) return;
231
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - re, o = n.top - re, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(re, n.top - r.height - ie) : n.bottom + ie, u = n.left, d = i - r.width - re;
232
+ ue({
233
+ top: l,
234
+ left: Math.max(re, Math.min(u, d)),
235
+ maxHeight: c
236
+ });
237
+ }, []);
238
+ l(() => {
239
+ if (!R) {
240
+ ue(null);
241
+ return;
242
+ }
243
+ return W(), window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
244
+ window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
245
+ };
246
+ }, [
247
+ R,
248
+ W,
249
+ B,
250
+ ce
251
+ ]), s(() => {
252
+ if (!R) return;
228
253
  let e = (e) => {
229
- M.current?.contains(e.target) || R(!1);
254
+ let t = e.target, n = ae.current?.contains(t), r = se.current?.contains(t);
255
+ !n && !r && z(!1);
230
256
  }, t = (e) => {
231
- e.key === "Escape" && (R(!1), N.current?.focus());
257
+ e.key === "Escape" && (z(!1), oe.current?.focus());
232
258
  };
233
- return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
234
- document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
259
+ return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
260
+ document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
235
261
  };
236
- }, []);
237
- let ae = (e) => {
238
- if (te(e, v, y)) return;
262
+ }, [R]);
263
+ let pe = (e) => {
264
+ if (ne(e, x, S)) return;
239
265
  let t = new Date(e);
240
- t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && R(!1);
241
- }, oe = (e) => {
242
- if (H(e), !e) {
266
+ t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && z(!1);
267
+ }, me = (e) => {
268
+ if (le(e), !e) {
243
269
  i?.(null);
244
270
  return;
245
271
  }
246
- let t = F(e, "time");
272
+ let t = I(e, "time");
247
273
  if (!t) return;
248
- let n = new Date(a === "datetime" ? r ?? z : /* @__PURE__ */ new Date());
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;
274
+ let n = new Date(a === "datetime" ? r ?? B : /* @__PURE__ */ new Date());
275
+ n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
276
+ }, he = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), ge = [N, P].filter(Boolean).join(" ") || void 0, _e = R && !y ? /* @__PURE__ */ n("div", {
277
+ ref: se,
278
+ className: A.panel,
279
+ role: "dialog",
280
+ "aria-label": m ?? he,
281
+ style: H ? {
282
+ top: H.top,
283
+ left: H.left,
284
+ maxHeight: H.maxHeight
285
+ } : {
286
+ visibility: "hidden",
287
+ top: 0,
288
+ left: 0
289
+ },
290
+ children: [de && /* @__PURE__ */ n(e, { children: [
291
+ /* @__PURE__ */ n("div", {
292
+ className: A.calendarHeader,
293
+ children: [
294
+ /* @__PURE__ */ t("button", {
295
+ type: "button",
296
+ className: A.nav,
297
+ "aria-label": "Предыдущий месяц",
298
+ onClick: () => V(new Date(B.getFullYear(), B.getMonth() - 1, 1)),
299
+ children: "‹"
300
+ }),
301
+ /* @__PURE__ */ t("select", {
302
+ className: A.monthSelect,
303
+ "aria-label": "Месяц",
304
+ value: B.getMonth(),
305
+ onChange: (e) => V(new Date(B.getFullYear(), Number(e.target.value), 1)),
306
+ children: M.map((e, n) => /* @__PURE__ */ t("option", {
307
+ value: n,
308
+ children: e
309
+ }, e))
310
+ }),
311
+ /* @__PURE__ */ t("input", {
312
+ className: A.yearInput,
313
+ type: "number",
314
+ "aria-label": "Год",
315
+ value: B.getFullYear(),
316
+ onChange: (e) => V(new Date(Number(e.target.value), B.getMonth(), 1))
317
+ }),
318
+ /* @__PURE__ */ t("button", {
319
+ type: "button",
320
+ className: A.nav,
321
+ "aria-label": "Следующий месяц",
322
+ onClick: () => V(new Date(B.getFullYear(), B.getMonth() + 1, 1)),
323
+ children: "›"
324
+ })
325
+ ]
326
+ }),
327
+ /* @__PURE__ */ t("div", {
328
+ className: A.weekdays,
329
+ children: j.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
330
+ }),
331
+ /* @__PURE__ */ t("div", {
332
+ className: A.days,
333
+ children: U.map((e) => {
334
+ let n = te(r, e);
335
+ return /* @__PURE__ */ t("button", {
336
+ type: "button",
337
+ className: `${A.day} ${e.getMonth() === B.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
338
+ disabled: ne(e, x, S),
339
+ "aria-pressed": n,
340
+ onClick: () => pe(e),
341
+ children: e.getDate()
342
+ }, e.toISOString());
343
+ })
344
+ })
345
+ ] }), fe && /* @__PURE__ */ n("label", {
346
+ className: A.timeLabel,
347
+ children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
348
+ className: A.timeInput,
349
+ type: "time",
350
+ value: ce,
351
+ onChange: (e) => me(e.target.value)
352
+ })]
353
+ })]
354
+ }) : null;
251
355
  return /* @__PURE__ */ n("div", {
252
- ref: M,
253
- className: `${k.wrapper} ${S}`,
356
+ ref: ae,
357
+ className: `${A.wrapper} ${T}`,
254
358
  children: [
255
- o && /* @__PURE__ */ t(T, {
256
- htmlFor: w,
257
- required: _,
258
- disabled: h,
259
- children: o
359
+ m && /* @__PURE__ */ t(E, {
360
+ htmlFor: k,
361
+ required: b,
362
+ disabled: v,
363
+ children: m
260
364
  }),
261
365
  /* @__PURE__ */ n("button", {
262
- ref: N,
263
- id: w,
264
- name: x,
366
+ ref: oe,
367
+ id: k,
368
+ name: w,
265
369
  type: "button",
266
- className: `${k.trigger} ${m ? k.error : ""}`,
267
- disabled: h,
268
- "aria-readonly": g || void 0,
269
- "aria-expanded": ne,
370
+ className: `${A.trigger} ${_ ? A.error : ""}`,
371
+ disabled: v,
372
+ "aria-readonly": y || void 0,
373
+ "aria-expanded": R,
270
374
  "aria-haspopup": "dialog",
271
- "aria-describedby": se,
375
+ "aria-describedby": ge,
272
376
  onClick: () => {
273
- g || R((e) => !e);
377
+ y || z((e) => !e);
274
378
  },
275
379
  children: [/* @__PURE__ */ t("span", {
276
- className: r ? k.value : k.placeholder,
277
- children: I(r, a) || W
380
+ className: r ? A.value : A.placeholder,
381
+ children: L(r, a) || he
278
382
  }), /* @__PURE__ */ t("span", {
279
383
  "aria-hidden": "true",
280
384
  children: "▾"
281
385
  })]
282
386
  }),
283
- ne && !g && /* @__PURE__ */ n("div", {
284
- className: k.panel,
285
- role: "dialog",
286
- "aria-label": o ?? W,
287
- children: [re && /* @__PURE__ */ n(e, { children: [
288
- /* @__PURE__ */ n("div", {
289
- className: k.calendarHeader,
290
- children: [
291
- /* @__PURE__ */ t("button", {
292
- type: "button",
293
- className: k.nav,
294
- "aria-label": "Предыдущий месяц",
295
- onClick: () => B(new Date(z.getFullYear(), z.getMonth() - 1, 1)),
296
- children: "‹"
297
- }),
298
- /* @__PURE__ */ t("select", {
299
- className: k.monthSelect,
300
- "aria-label": "Месяц",
301
- value: z.getMonth(),
302
- onChange: (e) => B(new Date(z.getFullYear(), Number(e.target.value), 1)),
303
- children: j.map((e, n) => /* @__PURE__ */ t("option", {
304
- value: n,
305
- children: e
306
- }, e))
307
- }),
308
- /* @__PURE__ */ t("input", {
309
- className: k.yearInput,
310
- type: "number",
311
- "aria-label": "Год",
312
- value: z.getFullYear(),
313
- onChange: (e) => B(new Date(Number(e.target.value), z.getMonth(), 1))
314
- }),
315
- /* @__PURE__ */ t("button", {
316
- type: "button",
317
- className: k.nav,
318
- "aria-label": "Следующий месяц",
319
- onClick: () => B(new Date(z.getFullYear(), z.getMonth() + 1, 1)),
320
- children: "›"
321
- })
322
- ]
323
- }),
324
- /* @__PURE__ */ t("div", {
325
- className: k.weekdays,
326
- children: A.map((e) => /* @__PURE__ */ t("span", { children: e }, e))
327
- }),
328
- /* @__PURE__ */ t("div", {
329
- className: k.days,
330
- children: U.map((e) => {
331
- let n = ee(r, e);
332
- return /* @__PURE__ */ t("button", {
333
- type: "button",
334
- className: `${k.day} ${e.getMonth() === z.getMonth() ? "" : k.outside} ${n ? k.selected : ""}`,
335
- disabled: te(e, v, y),
336
- "aria-pressed": n,
337
- onClick: () => ae(e),
338
- children: e.getDate()
339
- }, e.toISOString());
340
- })
341
- })
342
- ] }), ie && /* @__PURE__ */ n("label", {
343
- className: k.timeLabel,
344
- children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
345
- className: k.timeInput,
346
- type: "time",
347
- value: V,
348
- onChange: (e) => oe(e.target.value)
349
- })]
350
- })]
351
- }),
352
- p && !m && /* @__PURE__ */ t(E, {
353
- id: D,
354
- children: p
387
+ _e && p(_e, document.body),
388
+ g && !_ && /* @__PURE__ */ t(D, {
389
+ id: N,
390
+ children: g
355
391
  }),
356
- m && /* @__PURE__ */ t(E, {
357
- id: O,
392
+ _ && /* @__PURE__ */ t(D, {
393
+ id: P,
358
394
  variant: "error",
359
- children: m
395
+ children: _
360
396
  })
361
397
  ]
362
398
  });
363
- }, R = {
399
+ }, oe = {
364
400
  root: "_root_1q42e_1",
365
401
  legend: "_legend_1q42e_3",
366
402
  range: "_range_1q42e_5"
367
- }, z = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), B = ({ 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 = "" }) => {
403
+ }, se = (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 = "" }) => {
368
404
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
369
- i?.(e), z(e) && r?.(e);
405
+ i?.(e), se(e) && r?.(e);
370
406
  };
371
407
  return /* @__PURE__ */ n("fieldset", {
372
- className: `${R.root} ${h}`,
408
+ className: `${oe.root} ${h}`,
373
409
  disabled: f,
374
410
  children: [/* @__PURE__ */ n("div", {
375
- className: R.range,
376
- children: [/* @__PURE__ */ t(ne, {
411
+ className: oe.range,
412
+ children: [/* @__PURE__ */ t(ae, {
377
413
  value: e.from,
378
414
  mode: a === "datetime" ? "datetime" : a,
379
415
  label: o,
@@ -387,7 +423,7 @@ var w = {
387
423
  ...e,
388
424
  from: t
389
425
  })
390
- }), /* @__PURE__ */ t(ne, {
426
+ }), /* @__PURE__ */ t(ae, {
391
427
  value: e.to,
392
428
  mode: a === "datetime" ? "datetime" : a,
393
429
  label: s,
@@ -402,9 +438,9 @@ var w = {
402
438
  to: t
403
439
  })
404
440
  })]
405
- }), c && !g && /* @__PURE__ */ t(E, { children: c })]
441
+ }), c && !g && /* @__PURE__ */ t(D, { children: c })]
406
442
  });
407
- }, V = {
443
+ }, z = {
408
444
  group: "_group_1fs9e_1",
409
445
  skeleton: "_skeleton_1fs9e_3",
410
446
  text: "_text_1fs9e_5",
@@ -412,17 +448,17 @@ var w = {
412
448
  circular: "_circular_1fs9e_9",
413
449
  animated: "_animated_1fs9e_11",
414
450
  "ds-skeleton": "_ds-skeleton_1fs9e_1"
415
- }, H = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
416
- className: `${V.group} ${o}`,
451
+ }, B = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
452
+ className: `${z.group} ${o}`,
417
453
  "aria-hidden": "true",
418
454
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
419
- className: `${V.skeleton} ${V[e]} ${a ? V.animated : ""}`,
455
+ className: `${z.skeleton} ${z[e]} ${a ? z.animated : ""}`,
420
456
  style: {
421
457
  width: s === i - 1 && i > 1 ? "70%" : n,
422
458
  height: r
423
459
  }
424
460
  }, s))
425
- }), U = {
461
+ }), V = {
426
462
  wrapper: "_wrapper_dkn63_1",
427
463
  label: "_label_dkn63_17",
428
464
  container: "_container_dkn63_29",
@@ -438,14 +474,14 @@ var w = {
438
474
  message: "_message_dkn63_265",
439
475
  error: "_error_dkn63_267",
440
476
  errorState: "_errorState_dkn63_293"
441
- }, re = (e, t, n) => {
477
+ }, ce = (e, t, n) => {
442
478
  for (let r = 0; r < e.length; r += 1) {
443
479
  let i = (t + r * n + e.length) % e.length;
444
480
  if (!e[i]?.disabled) return i;
445
481
  }
446
482
  return -1;
447
- }, ie = ({ 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;
483
+ }, le = ({ options: r, value: i, onChange: a, placeholder: o = "Выберите опцию", disabled: l = !1, stringWhileDisabled: p = !1, label: m, error: h, hint: g, className: _ = "", name: v, id: y, needMark: b = !0, maxMenuHeight: x }) => {
484
+ let S = c(), C = y ?? `ds-dropdown-${v ?? S}`, [w, T] = f(!1), E = d(null), D = d(null), O = d([]), k = u(() => 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 = l && p;
449
485
  s(() => {
450
486
  let e = (e) => {
451
487
  E.current?.contains(e.target) || T(!1);
@@ -457,7 +493,7 @@ var w = {
457
493
  };
458
494
  }, [w]);
459
495
  let P = (e, t) => {
460
- let n = re(r, e, t);
496
+ let n = ce(r, e, t);
461
497
  O.current[n]?.focus(), O.current[n]?.scrollIntoView({ block: "nearest" });
462
498
  }, F = (e) => {
463
499
  e.disabled || (a?.(e.value, e), T(!1), D.current?.focus());
@@ -465,21 +501,21 @@ var w = {
465
501
  return /* @__PURE__ */ n("div", {
466
502
  ref: E,
467
503
  className: [
468
- U.wrapper,
469
- h ? U.errorState : "",
504
+ V.wrapper,
505
+ h ? V.errorState : "",
470
506
  _
471
507
  ].filter(Boolean).join(" "),
472
508
  children: [
473
509
  m && /* @__PURE__ */ t("label", {
474
510
  htmlFor: N ? void 0 : C,
475
- className: U.label,
511
+ className: V.label,
476
512
  children: m
477
513
  }),
478
514
  /* @__PURE__ */ t("div", {
479
- className: U.container,
515
+ className: V.container,
480
516
  children: N ? /* @__PURE__ */ t("div", {
481
517
  id: C,
482
- className: U.disabledText,
518
+ className: V.disabledText,
483
519
  "aria-describedby": M,
484
520
  children: k?.label ?? o
485
521
  }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("button", {
@@ -487,8 +523,8 @@ var w = {
487
523
  id: C,
488
524
  type: "button",
489
525
  name: v,
490
- className: U.trigger,
491
- disabled: f,
526
+ className: V.trigger,
527
+ disabled: l,
492
528
  "aria-haspopup": "listbox",
493
529
  "aria-expanded": w,
494
530
  "aria-controls": `${C}-listbox`,
@@ -503,10 +539,10 @@ var w = {
503
539
  }
504
540
  },
505
541
  children: [/* @__PURE__ */ t("span", {
506
- className: k ? U.value : U.placeholder,
542
+ className: k ? V.value : V.placeholder,
507
543
  children: k?.label ?? o
508
544
  }), /* @__PURE__ */ t("span", {
509
- className: `${U.chevron} ${w ? U.chevronOpen : ""}`,
545
+ className: `${V.chevron} ${w ? V.chevronOpen : ""}`,
510
546
  "aria-hidden": "true",
511
547
  children: /* @__PURE__ */ t("svg", {
512
548
  viewBox: "0 0 20 20",
@@ -522,7 +558,7 @@ var w = {
522
558
  })]
523
559
  }), w && /* @__PURE__ */ t("ul", {
524
560
  id: `${C}-listbox`,
525
- className: U.menu,
561
+ className: V.menu,
526
562
  role: "listbox",
527
563
  "aria-label": m,
528
564
  style: { maxHeight: x },
@@ -538,7 +574,7 @@ var w = {
538
574
  role: "option",
539
575
  "aria-selected": o,
540
576
  disabled: e.disabled,
541
- className: `${U.option} ${o ? U.selected : ""}`,
577
+ className: `${V.option} ${o ? V.selected : ""}`,
542
578
  onClick: () => F(e),
543
579
  onKeyDown: (e) => {
544
580
  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 +594,35 @@ var w = {
558
594
  }),
559
595
  g && !h && /* @__PURE__ */ t("span", {
560
596
  id: A,
561
- className: U.message,
597
+ className: V.message,
562
598
  children: g
563
599
  }),
564
600
  h && /* @__PURE__ */ t("span", {
565
601
  id: j,
566
- className: U.error,
602
+ className: V.error,
567
603
  children: h
568
604
  })
569
605
  ]
570
606
  });
571
- }, ae = (e) => `${e.id}:${e.direction}`, oe = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
607
+ }, H = (e) => `${e.id}:${e.direction}`, ue = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
572
608
  let c = e.flatMap((e) => [{
573
- value: ae({
609
+ value: H({
574
610
  id: e.id,
575
611
  direction: "asc"
576
612
  }),
577
613
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
578
614
  disabled: e.disabled
579
615
  }, {
580
- value: ae({
616
+ value: H({
581
617
  id: e.id,
582
618
  direction: "desc"
583
619
  }),
584
620
  label: e.descLabel ?? `${e.label} · по убыванию`,
585
621
  disabled: e.disabled
586
622
  }]);
587
- return /* @__PURE__ */ t(ie, {
623
+ return /* @__PURE__ */ t(le, {
588
624
  options: c,
589
- value: n ? ae(n) : "",
625
+ value: n ? H(n) : "",
590
626
  label: i,
591
627
  placeholder: a,
592
628
  disabled: o,
@@ -599,7 +635,7 @@ var w = {
599
635
  });
600
636
  }
601
637
  });
602
- }, W = {
638
+ }, U = {
603
639
  root: "_root_epm0h_1",
604
640
  tableWrap: "_tableWrap_epm0h_3",
605
641
  table: "_table_epm0h_3",
@@ -614,10 +650,10 @@ var w = {
614
650
  default: "_default_epm0h_47",
615
651
  tableOnMobile: "_tableOnMobile_epm0h_47",
616
652
  wide: "_wide_epm0h_51"
617
- }, se = m({
618
- rowSortingFeature: p,
619
- sortedRowModel: f()
620
- }), ce = (e, t) => {
653
+ }, de = g({
654
+ rowSortingFeature: h,
655
+ sortedRowModel: m()
656
+ }), fe = (e, t) => {
621
657
  let n = /* @__PURE__ */ new Set();
622
658
  for (let t of e) {
623
659
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -629,36 +665,36 @@ var w = {
629
665
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
630
666
  }
631
667
  return null;
632
- }, le = (e, t) => typeof e == "function" ? e(t) : t[e], ue = (e) => {
668
+ }, W = (e, t) => typeof e == "function" ? e(t) : t[e], pe = (e) => {
633
669
  if (e == null || e === "") return null;
634
670
  let t = Date.parse(String(e));
635
671
  return Number.isNaN(t) ? null : t;
636
- }, de = (e, t, n) => {
637
- let r = ue(e.getValue(n)), i = ue(t.getValue(n));
672
+ }, me = (e, t, n) => {
673
+ let r = pe(e.getValue(n)), i = pe(t.getValue(n));
638
674
  return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
639
- }, fe = (e, t, n) => {
675
+ }, he = (e, t, n) => {
640
676
  let r = e.getValue(n), i = t.getValue(n);
641
677
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
642
- }, pe = (e, t, n) => {
678
+ }, ge = (e, t, n) => {
643
679
  let r = e.getValue(n), i = t.getValue(n);
644
680
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
645
- }, me = (e, t, n) => {
681
+ }, _e = (e, t, n) => {
646
682
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
647
683
  return r.localeCompare(i, void 0, {
648
684
  numeric: !0,
649
685
  sensitivity: "base"
650
686
  });
651
- }, he = (e) => {
687
+ }, ve = (e) => {
652
688
  switch (e) {
653
- case "date": return de;
654
- case "number": return fe;
655
- case "boolean": return pe;
689
+ case "date": return me;
690
+ case "number": return he;
691
+ case "boolean": return ge;
656
692
  case "text":
657
- case void 0: return me;
693
+ case void 0: return _e;
658
694
  case "custom": return;
659
695
  }
660
- }, ge = (e) => {
661
- let t = (t) => le(e.accessor, t), n = e.sortFn ?? he(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
696
+ }, ye = (e) => {
697
+ let t = (t) => W(e.accessor, t), n = e.sortFn ?? ve(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
662
698
  id: e.id,
663
699
  accessorFn: t,
664
700
  header: () => e.header,
@@ -670,9 +706,9 @@ var w = {
670
706
  sortDescFirst: e.sortDescFirst
671
707
  };
672
708
  return n !== void 0 && (i.sortFn = n), i;
673
- }, _e = ({ 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: g, emptyState: _ = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "", onRowClick: x }) => {
674
- let [S, C] = d([]), w = o ?? S, T = l(() => ce(e, r), [e, r]), E = l(() => e.map(ge), [e]), D = h({
675
- features: se,
709
+ }, be = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: s, renderMobileCard: c, getRowId: l, caption: d, ariaLabel: p, loading: m = !1, error: h, emptyState: g = "Нет данных", stickyHeader: v = !1, maxHeight: y, className: b = "", onRowClick: x }) => {
710
+ let [S, C] = f([]), w = o ?? S, T = u(() => fe(e, r), [e, r]), E = u(() => e.map(ye), [e]), D = _({
711
+ features: de,
676
712
  columns: E,
677
713
  data: r,
678
714
  state: { sorting: w },
@@ -680,22 +716,22 @@ var w = {
680
716
  let t = typeof e == "function" ? e(w) : e;
681
717
  o === void 0 && C(t), s?.(t);
682
718
  },
683
- getRowId: u
719
+ getRowId: l
684
720
  }), O = D.getRowModel().rows, k = e.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
685
721
  id: e.id,
686
722
  label: typeof e.header == "string" ? e.header : e.id
687
723
  })), A = [
688
- W.root,
689
- a === "wide" ? W.wide : W.default,
690
- i ? W.tableOnMobile : "",
724
+ U.root,
725
+ a === "wide" ? U.wide : U.default,
726
+ i ? U.tableOnMobile : "",
691
727
  b
692
- ].filter(Boolean).join(" "), j = T ?? g;
728
+ ].filter(Boolean).join(" "), j = T ?? h;
693
729
  return /* @__PURE__ */ n("section", {
694
730
  className: A,
695
731
  "aria-busy": m,
696
732
  children: [
697
- !i && !m && !j && O.length > 0 && k.length > 0 && /* @__PURE__ */ t(oe, {
698
- className: W.mobileSort,
733
+ !i && !m && !j && O.length > 0 && k.length > 0 && /* @__PURE__ */ t(ue, {
734
+ className: U.mobileSort,
699
735
  options: k,
700
736
  value: w[0] ? {
701
737
  id: w[0].id,
@@ -707,15 +743,15 @@ var w = {
707
743
  }])
708
744
  }),
709
745
  /* @__PURE__ */ t("div", {
710
- className: W.tableWrap,
746
+ className: U.tableWrap,
711
747
  style: { maxHeight: y },
712
748
  children: /* @__PURE__ */ n("table", {
713
- className: W.table,
749
+ className: U.table,
714
750
  "aria-label": p,
715
751
  children: [
716
- f && /* @__PURE__ */ t("caption", { children: f }),
752
+ d && /* @__PURE__ */ t("caption", { children: d }),
717
753
  /* @__PURE__ */ t("thead", {
718
- className: v ? W.sticky : "",
754
+ className: v ? U.sticky : "",
719
755
  children: D.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
720
756
  let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
721
757
  return /* @__PURE__ */ t("th", {
@@ -723,7 +759,7 @@ var w = {
723
759
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
724
760
  children: /* @__PURE__ */ n("button", {
725
761
  type: "button",
726
- className: W.sortButton,
762
+ className: U.sortButton,
727
763
  disabled: !i,
728
764
  onClick: a,
729
765
  children: [/* @__PURE__ */ t(D.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
@@ -736,17 +772,17 @@ var w = {
736
772
  }),
737
773
  /* @__PURE__ */ t("tbody", { children: m ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
738
774
  colSpan: e.length,
739
- children: /* @__PURE__ */ t(H, { lines: 3 })
775
+ children: /* @__PURE__ */ t(B, { lines: 3 })
740
776
  }) }) : j ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
741
- className: W.state,
777
+ className: U.state,
742
778
  colSpan: e.length,
743
779
  children: j
744
780
  }) }) : O.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
745
- className: W.state,
781
+ className: U.state,
746
782
  colSpan: e.length,
747
- children: _
783
+ children: g
748
784
  }) }) : O.map((e) => /* @__PURE__ */ t("tr", {
749
- className: x ? W.clickableRow : void 0,
785
+ className: x ? U.clickableRow : void 0,
750
786
  onClick: () => x?.(e.original),
751
787
  onKeyDown: (t) => {
752
788
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), x?.(e.original));
@@ -759,15 +795,15 @@ var w = {
759
795
  })
760
796
  }),
761
797
  !i && /* @__PURE__ */ t("div", {
762
- className: W.cards,
798
+ className: U.cards,
763
799
  role: "list",
764
- "aria-label": p ?? f,
765
- children: m ? /* @__PURE__ */ t(H, { lines: 4 }) : j ? /* @__PURE__ */ t("div", {
766
- className: W.state,
800
+ "aria-label": p ?? d,
801
+ children: m ? /* @__PURE__ */ t(B, { lines: 4 }) : j ? /* @__PURE__ */ t("div", {
802
+ className: U.state,
767
803
  children: j
768
804
  }) : O.length === 0 ? /* @__PURE__ */ t("div", {
769
- className: W.state,
770
- children: _
805
+ className: U.state,
806
+ children: g
771
807
  }) : O.map((r) => {
772
808
  if (c) return /* @__PURE__ */ t("div", {
773
809
  role: "listitem",
@@ -776,14 +812,14 @@ var w = {
776
812
  columns: e
777
813
  })
778
814
  }, r.id);
779
- let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => le(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
815
+ let i = e.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), a = i.find((e) => e.mobile?.primary) ?? i.find((e) => e.mobile?.mobileVariant !== "actions"), o = (e) => W(e.accessor, r.original), s = (e) => e.mobile?.renderMobile?.(r.original, o(e)) ?? e.cell?.(r.original, o(e)) ?? String(o(e) ?? "");
780
816
  return /* @__PURE__ */ n("article", {
781
817
  role: "listitem",
782
- className: W.card,
818
+ className: U.card,
783
819
  children: [
784
820
  /* @__PURE__ */ t("h3", { children: a ? s(a) : `Строка ${r.index + 1}` }),
785
821
  /* @__PURE__ */ t("dl", { children: i.filter((e) => e !== a && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
786
- className: e.mobile?.mobileSpan === 2 ? W.spanTwo : "",
822
+ className: e.mobile?.mobileSpan === 2 ? U.spanTwo : "",
787
823
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: s(e) })]
788
824
  }, e.id)) }),
789
825
  i.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: s(e) }, e.id))
@@ -793,8 +829,8 @@ var w = {
793
829
  })
794
830
  ]
795
831
  });
796
- }, ve = ({ 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 }) => {
797
- 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;
832
+ }, xe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опции", disabled: o = !1, label: l, error: p, hint: m, className: h = "", name: g, id: _, closeOnSelect: v = !1, maxMenuHeight: y }) => {
833
+ let b = c(), x = _ ?? `ds-dropdown-multiple-${g ?? b}`, [S, C] = f(!1), w = d(null), T = d(null), E = d([]), D = u(() => 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;
798
834
  s(() => {
799
835
  let e = (e) => {
800
836
  w.current?.contains(e.target) || C(!1);
@@ -810,30 +846,30 @@ var w = {
810
846
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
811
847
  i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
812
848
  }, M = (t, n) => {
813
- let r = re(e, t, n);
849
+ let r = ce(e, t, n);
814
850
  E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
815
851
  };
816
852
  return /* @__PURE__ */ n("div", {
817
853
  ref: w,
818
854
  className: [
819
- U.wrapper,
820
- p ? U.errorState : "",
855
+ V.wrapper,
856
+ p ? V.errorState : "",
821
857
  h
822
858
  ].filter(Boolean).join(" "),
823
859
  children: [
824
- f && /* @__PURE__ */ t("label", {
860
+ l && /* @__PURE__ */ t("label", {
825
861
  htmlFor: x,
826
- className: U.label,
827
- children: f
862
+ className: V.label,
863
+ children: l
828
864
  }),
829
865
  /* @__PURE__ */ n("div", {
830
- className: U.container,
866
+ className: V.container,
831
867
  children: [/* @__PURE__ */ n("button", {
832
868
  ref: T,
833
869
  id: x,
834
870
  type: "button",
835
871
  name: g,
836
- className: U.trigger,
872
+ className: V.trigger,
837
873
  disabled: o,
838
874
  "aria-haspopup": "listbox",
839
875
  "aria-expanded": S,
@@ -849,18 +885,18 @@ var w = {
849
885
  }
850
886
  },
851
887
  children: [/* @__PURE__ */ t("span", {
852
- className: D.length ? U.value : U.placeholder,
888
+ className: D.length ? V.value : V.placeholder,
853
889
  children: O || a
854
890
  }), /* @__PURE__ */ t("span", {
855
- className: `${U.chevron} ${S ? U.chevronOpen : ""}`,
891
+ className: `${V.chevron} ${S ? V.chevronOpen : ""}`,
856
892
  "aria-hidden": "true",
857
893
  children: "⌄"
858
894
  })]
859
895
  }), S && /* @__PURE__ */ t("ul", {
860
896
  id: `${x}-listbox`,
861
- className: U.menu,
897
+ className: V.menu,
862
898
  role: "listbox",
863
- "aria-label": f,
899
+ "aria-label": l,
864
900
  "aria-multiselectable": "true",
865
901
  style: { maxHeight: y },
866
902
  children: e.map((i, a) => {
@@ -875,7 +911,7 @@ var w = {
875
911
  role: "option",
876
912
  "aria-selected": o,
877
913
  disabled: i.disabled,
878
- className: `${U.option} ${o ? U.selected : ""}`,
914
+ className: `${V.option} ${o ? V.selected : ""}`,
879
915
  onClick: () => j(i),
880
916
  onKeyDown: (t) => {
881
917
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
@@ -901,17 +937,17 @@ var w = {
901
937
  }),
902
938
  m && !p && /* @__PURE__ */ t("span", {
903
939
  id: k,
904
- className: U.message,
940
+ className: V.message,
905
941
  children: m
906
942
  }),
907
943
  p && /* @__PURE__ */ t("span", {
908
944
  id: A,
909
- className: U.error,
945
+ className: V.error,
910
946
  children: p
911
947
  })
912
948
  ]
913
949
  });
914
- }, ye = {
950
+ }, Se = {
915
951
  approve: "M4 12l5 5L20 6",
916
952
  reject: "M5 5l14 14M19 5L5 19",
917
953
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -920,7 +956,7 @@ var w = {
920
956
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
921
957
  info: "M12 10v7m0-10v.01",
922
958
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
923
- }, be = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
959
+ }, Ce = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
924
960
  viewBox: "0 0 24 24",
925
961
  width: i,
926
962
  height: a,
@@ -933,27 +969,27 @@ var w = {
933
969
  "aria-hidden": !r || void 0,
934
970
  focusable: "false",
935
971
  ...o,
936
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: ye[e] })]
937
- }), G = {
972
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: Se[e] })]
973
+ }), we = {
938
974
  root: "_root_1y2s8_1",
939
975
  header: "_header_1y2s8_21",
940
976
  title: "_title_1y2s8_41",
941
977
  dismiss: "_dismiss_1y2s8_55",
942
978
  content: "_content_1y2s8_113"
943
- }, xe = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
979
+ }, Te = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
944
980
  let u = `ds-info-block-${c()}`;
945
981
  return /* @__PURE__ */ n("section", {
946
- className: `${G.root} ${l}`,
982
+ className: `${we.root} ${l}`,
947
983
  "aria-labelledby": u,
948
984
  children: [/* @__PURE__ */ n("header", {
949
- className: G.header,
985
+ className: we.header,
950
986
  children: [/* @__PURE__ */ t(s, {
951
987
  id: u,
952
- className: G.title,
988
+ className: we.title,
953
989
  children: e
954
990
  }), i && /* @__PURE__ */ t("button", {
955
991
  type: "button",
956
- className: G.dismiss,
992
+ className: we.dismiss,
957
993
  onClick: a,
958
994
  "aria-label": o,
959
995
  children: /* @__PURE__ */ t("svg", {
@@ -969,37 +1005,37 @@ var w = {
969
1005
  })
970
1006
  })]
971
1007
  }), /* @__PURE__ */ t("div", {
972
- className: G.content,
1008
+ className: we.content,
973
1009
  children: r
974
1010
  })]
975
1011
  });
976
- }, K = {
1012
+ }, G = {
977
1013
  wrapper: "_wrapper_ip6vf_1",
978
1014
  control: "_control_ip6vf_3",
979
1015
  input: "_input_ip6vf_5",
980
1016
  disabledText: "_disabledText_ip6vf_5",
981
1017
  inputError: "_inputError_ip6vf_39",
982
1018
  trailingAction: "_trailingAction_ip6vf_41"
983
- }, Se = ({ 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: D, ...O }) => {
984
- let k = c(), A = v ?? `ds-input-${_ ?? k}`, 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, ee = S ? M ? "text" : "password" : i;
1019
+ }, Ee = ({ value: e, onChange: r, type: i = "text", placeholder: a = "", disabled: o = !1, readOnly: l = !1, stringWhileDisabled: u = !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, ...O }) => {
1020
+ let k = c(), A = v ?? `ds-input-${_ ?? k}`, j = d(null), [M, N] = f(!1), P = h ? `${A}-hint` : void 0, F = m ? `${A}-error` : void 0, I = String(e ?? ""), L = [P, F].filter(Boolean).join(" ") || void 0, ee = S ? M ? "text" : "password" : i;
985
1021
  return s(() => {
986
1022
  S || N(!1);
987
1023
  }, [S]), /* @__PURE__ */ n("div", {
988
- className: `${K.wrapper} ${g}`,
1024
+ className: `${G.wrapper} ${g}`,
989
1025
  children: [
990
- p && /* @__PURE__ */ t(T, {
1026
+ p && /* @__PURE__ */ t(E, {
991
1027
  htmlFor: A,
992
1028
  required: b,
993
1029
  disabled: o,
994
1030
  children: p
995
1031
  }),
996
- o && f ? /* @__PURE__ */ t("div", {
1032
+ o && u ? /* @__PURE__ */ t("div", {
997
1033
  id: A,
998
- className: K.disabledText,
1034
+ className: G.disabledText,
999
1035
  "aria-describedby": L,
1000
1036
  children: I || a
1001
1037
  }) : /* @__PURE__ */ n("div", {
1002
- className: K.control,
1038
+ className: G.control,
1003
1039
  children: [
1004
1040
  /* @__PURE__ */ t("input", {
1005
1041
  ref: j,
@@ -1013,7 +1049,7 @@ var w = {
1013
1049
  required: b,
1014
1050
  "aria-invalid": !!m,
1015
1051
  "aria-describedby": L,
1016
- className: `${K.input} ${m ? K.inputError : ""}`,
1052
+ className: `${G.input} ${m ? G.inputError : ""}`,
1017
1053
  onChange: (e) => {
1018
1054
  if (i === "number" && !S) {
1019
1055
  let t = e.target.value === "" ? "" : Number(e.target.value);
@@ -1023,13 +1059,13 @@ var w = {
1023
1059
  r?.(e.target.value, e);
1024
1060
  },
1025
1061
  onFocus: (e) => {
1026
- x && e.currentTarget.value && e.currentTarget.select(), D?.(e);
1062
+ x && e.currentTarget.value && e.currentTarget.select(), T?.(e);
1027
1063
  },
1028
1064
  ...O
1029
1065
  }),
1030
1066
  S && /* @__PURE__ */ t("button", {
1031
1067
  type: "button",
1032
- className: K.trailingAction,
1068
+ className: G.trailingAction,
1033
1069
  disabled: o,
1034
1070
  "aria-label": M ? C : w,
1035
1071
  "aria-pressed": M,
@@ -1050,7 +1086,7 @@ var w = {
1050
1086
  }),
1051
1087
  !S && y && I && !o && !l && /* @__PURE__ */ t("button", {
1052
1088
  type: "button",
1053
- className: K.trailingAction,
1089
+ className: G.trailingAction,
1054
1090
  "aria-label": "Очистить поле",
1055
1091
  onClick: () => {
1056
1092
  let e = j.current;
@@ -1060,33 +1096,33 @@ var w = {
1060
1096
  })
1061
1097
  ]
1062
1098
  }),
1063
- h && !m && /* @__PURE__ */ t(E, {
1099
+ h && !m && /* @__PURE__ */ t(D, {
1064
1100
  id: P,
1065
1101
  children: h
1066
1102
  }),
1067
- m && /* @__PURE__ */ t(E, {
1103
+ m && /* @__PURE__ */ t(D, {
1068
1104
  id: F,
1069
1105
  variant: "error",
1070
1106
  children: m
1071
1107
  })
1072
1108
  ]
1073
1109
  });
1074
- }, q = {
1110
+ }, K = {
1075
1111
  wrapper: "_wrapper_vu1ob_1",
1076
1112
  input: "_input_vu1ob_21",
1077
1113
  switch: "_switch_vu1ob_35",
1078
1114
  thumb: "_thumb_vu1ob_67",
1079
1115
  label: "_label_vu1ob_111",
1080
1116
  disabled: "_disabled_vu1ob_123"
1081
- }, Ce = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1117
+ }, De = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1082
1118
  let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1083
1119
  return /* @__PURE__ */ n("label", {
1084
1120
  htmlFor: p,
1085
- className: `${q.wrapper} ${a ? q.disabled : ""} ${s}`,
1121
+ className: `${K.wrapper} ${a ? K.disabled : ""} ${s}`,
1086
1122
  children: [
1087
1123
  /* @__PURE__ */ t("input", {
1088
1124
  id: p,
1089
- className: q.input,
1125
+ className: K.input,
1090
1126
  type: "checkbox",
1091
1127
  role: "switch",
1092
1128
  name: l,
@@ -1099,21 +1135,21 @@ var w = {
1099
1135
  }
1100
1136
  }),
1101
1137
  /* @__PURE__ */ t("span", {
1102
- className: q.switch,
1138
+ className: K.switch,
1103
1139
  "aria-hidden": "true",
1104
- children: /* @__PURE__ */ t("span", { className: q.thumb })
1140
+ children: /* @__PURE__ */ t("span", { className: K.thumb })
1105
1141
  }),
1106
1142
  i && /* @__PURE__ */ t("span", {
1107
- className: q.label,
1143
+ className: K.label,
1108
1144
  children: i
1109
1145
  })
1110
1146
  ]
1111
1147
  });
1112
- }, we = {
1148
+ }, Oe = {
1113
1149
  root: "_root_kepgo_1",
1114
1150
  grid: "_grid_kepgo_3",
1115
1151
  actions: "_actions_kepgo_5"
1116
- }, Te = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1152
+ }, ke = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1117
1153
  let d = (e, t) => {
1118
1154
  let n = {
1119
1155
  ...r,
@@ -1122,11 +1158,11 @@ var w = {
1122
1158
  i?.(n, e), s === "instant" && a?.(n);
1123
1159
  };
1124
1160
  return /* @__PURE__ */ n("section", {
1125
- className: `${we.root} ${u}`,
1161
+ className: `${Oe.root} ${u}`,
1126
1162
  "aria-label": "Фильтры",
1127
1163
  "aria-busy": c,
1128
1164
  children: [/* @__PURE__ */ t("div", {
1129
- className: we.grid,
1165
+ className: Oe.grid,
1130
1166
  children: e.filter((e) => !e.hidden).map((e) => {
1131
1167
  let n = l || c || e.disabled, i = r[e.id];
1132
1168
  if (e.type === "input") {
@@ -1136,19 +1172,19 @@ var w = {
1136
1172
  placeholder: e.placeholder,
1137
1173
  disabled: n
1138
1174
  };
1139
- return e.inputType === "number" ? /* @__PURE__ */ t(Se, {
1175
+ return e.inputType === "number" ? /* @__PURE__ */ t(Ee, {
1140
1176
  ...r,
1141
1177
  type: "number",
1142
1178
  value: i ?? "",
1143
1179
  onChange: (t) => d(e.id, t)
1144
- }, e.id) : /* @__PURE__ */ t(Se, {
1180
+ }, e.id) : /* @__PURE__ */ t(Ee, {
1145
1181
  ...r,
1146
1182
  type: "text",
1147
1183
  value: String(i ?? ""),
1148
1184
  onChange: (t) => d(e.id, t)
1149
1185
  }, e.id);
1150
1186
  }
1151
- if (e.type === "dropdown") return /* @__PURE__ */ t(ie, {
1187
+ if (e.type === "dropdown") return /* @__PURE__ */ t(le, {
1152
1188
  label: e.label,
1153
1189
  hint: e.hint,
1154
1190
  placeholder: e.placeholder,
@@ -1157,7 +1193,7 @@ var w = {
1157
1193
  disabled: n,
1158
1194
  onChange: (t) => d(e.id, t)
1159
1195
  }, e.id);
1160
- if (e.type === "multiple") return /* @__PURE__ */ t(ve, {
1196
+ if (e.type === "multiple") return /* @__PURE__ */ t(xe, {
1161
1197
  label: e.label,
1162
1198
  hint: e.hint,
1163
1199
  placeholder: e.placeholder,
@@ -1166,14 +1202,14 @@ var w = {
1166
1202
  disabled: n,
1167
1203
  onChange: (t) => d(e.id, t)
1168
1204
  }, e.id);
1169
- if (e.type === "checkbox") return /* @__PURE__ */ t(O, {
1205
+ if (e.type === "checkbox") return /* @__PURE__ */ t(k, {
1170
1206
  label: e.label,
1171
1207
  hint: e.hint,
1172
1208
  checked: !!i,
1173
1209
  disabled: n,
1174
1210
  onChange: (t) => d(e.id, t)
1175
1211
  }, e.id);
1176
- if (e.type === "radio") return /* @__PURE__ */ t(Ce, {
1212
+ if (e.type === "radio") return /* @__PURE__ */ t(De, {
1177
1213
  label: e.label,
1178
1214
  checked: !!i,
1179
1215
  disabled: n,
@@ -1183,7 +1219,7 @@ var w = {
1183
1219
  from: null,
1184
1220
  to: null
1185
1221
  };
1186
- return /* @__PURE__ */ t(B, {
1222
+ return /* @__PURE__ */ t(R, {
1187
1223
  hint: e.hint,
1188
1224
  mode: e.mode,
1189
1225
  min: e.min,
@@ -1194,13 +1230,13 @@ var w = {
1194
1230
  }, e.id);
1195
1231
  })
1196
1232
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1197
- className: we.actions,
1198
- children: [o && /* @__PURE__ */ t(C, {
1233
+ className: Oe.actions,
1234
+ children: [o && /* @__PURE__ */ t(w, {
1199
1235
  variant: "destructiveOutline",
1200
1236
  disabled: l || c,
1201
1237
  onClick: o,
1202
1238
  children: "Сбросить"
1203
- }), s === "manual" && /* @__PURE__ */ t(C, {
1239
+ }), s === "manual" && /* @__PURE__ */ t(w, {
1204
1240
  isLoading: c,
1205
1241
  disabled: l,
1206
1242
  onClick: () => a?.(r),
@@ -1208,7 +1244,7 @@ var w = {
1208
1244
  })]
1209
1245
  })]
1210
1246
  });
1211
- }, J = {
1247
+ }, q = {
1212
1248
  wrapper: "_wrapper_1ymdr_1",
1213
1249
  dropzone: "_dropzone_1ymdr_3",
1214
1250
  dragActive: "_dragActive_1ymdr_5",
@@ -1222,31 +1258,31 @@ var w = {
1222
1258
  file: "_file_1ymdr_19",
1223
1259
  fileName: "_fileName_1ymdr_23",
1224
1260
  fileSize: "_fileSize_1ymdr_25"
1225
- }, Ee = (e) => `${e.name}:${e.size}:${e.lastModified}`, De = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Oe = (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), ke = ({ 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: w = "Добавить ещё", onReject: D }) => {
1226
- let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = u(null), j = u(0), [M, N] = d(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = !g && !_, ee = (e) => {
1227
- let t = [], n = new Set(r.map(Ee)), c = e.filter((e) => Oe(e, o) ? s !== void 0 && e.size > s ? (t.push({
1261
+ }, Ae = (e) => `${e.name}:${e.size}:${e.lastModified}`, je = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Me = (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), Ne = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: l, label: u, 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: T }) => {
1262
+ let O = c(), k = y ?? `ds-file-input-${v ?? O}`, A = d(null), j = d(0), [M, N] = f(!1), P = p ? `${k}-hint` : void 0, F = m ? `${k}-error` : void 0, I = [P, F].filter(Boolean).join(" ") || void 0, L = !g && !_, ee = (e) => {
1263
+ let t = [], n = new Set(r.map(Ae)), c = e.filter((e) => Me(e, o) ? s !== void 0 && e.size > s ? (t.push({
1228
1264
  file: e,
1229
1265
  reason: "maxSize"
1230
- }), !1) : !n.has(Ee(e)) && (n.add(Ee(e)), !0) : (t.push({
1266
+ }), !1) : !n.has(Ae(e)) && (n.add(Ae(e)), !0) : (t.push({
1231
1267
  file: e,
1232
1268
  reason: "accept"
1233
1269
  }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
1234
1270
  u !== void 0 && d.length > u && (d.slice(u).forEach((e) => t.push({
1235
1271
  file: e,
1236
1272
  reason: "maxFiles"
1237
- })), d = d.slice(0, u)), t.length && D?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1273
+ })), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1238
1274
  };
1239
1275
  return /* @__PURE__ */ n("div", {
1240
- className: `${J.wrapper} ${b}`,
1276
+ className: `${q.wrapper} ${b}`,
1241
1277
  children: [
1242
- f && /* @__PURE__ */ t(T, {
1278
+ u && /* @__PURE__ */ t(E, {
1243
1279
  htmlFor: k,
1244
1280
  required: h,
1245
1281
  disabled: g,
1246
- children: f
1282
+ children: u
1247
1283
  }),
1248
1284
  /* @__PURE__ */ n("div", {
1249
- className: `${J.dropzone} ${M ? J.dragActive : ""} ${g ? J.disabled : ""} ${m ? J.error : ""}`,
1285
+ className: `${q.dropzone} ${M ? q.dragActive : ""} ${g ? q.disabled : ""} ${m ? q.error : ""}`,
1250
1286
  onDragEnter: (e) => {
1251
1287
  e.preventDefault(), L && ++j.current === 1 && N(!0);
1252
1288
  },
@@ -1261,7 +1297,7 @@ var w = {
1261
1297
  ref: A,
1262
1298
  id: k,
1263
1299
  name: v,
1264
- className: J.nativeInput,
1300
+ className: q.nativeInput,
1265
1301
  type: "file",
1266
1302
  multiple: a,
1267
1303
  accept: o,
@@ -1272,21 +1308,21 @@ var w = {
1272
1308
  onChange: (e) => ee(Array.from(e.target.files ?? []))
1273
1309
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1274
1310
  /* @__PURE__ */ t("ul", {
1275
- className: J.files,
1311
+ className: q.files,
1276
1312
  "aria-live": "polite",
1277
1313
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
1278
- className: J.file,
1314
+ className: q.file,
1279
1315
  children: [
1280
1316
  /* @__PURE__ */ t("span", {
1281
- className: J.fileName,
1317
+ className: q.fileName,
1282
1318
  title: e.name,
1283
1319
  children: e.name
1284
1320
  }),
1285
1321
  /* @__PURE__ */ t("span", {
1286
- className: J.fileSize,
1287
- children: De(e.size)
1322
+ className: q.fileSize,
1323
+ children: je(e.size)
1288
1324
  }),
1289
- L && /* @__PURE__ */ t(C, {
1325
+ L && /* @__PURE__ */ t(w, {
1290
1326
  variant: "empty",
1291
1327
  size: "sm",
1292
1328
  "aria-label": `Удалить файл ${e.name}`,
@@ -1294,42 +1330,42 @@ var w = {
1294
1330
  children: "×"
1295
1331
  })
1296
1332
  ]
1297
- }, Ee(e)))
1333
+ }, Ae(e)))
1298
1334
  }),
1299
- L && (a || r.length === 0) && /* @__PURE__ */ t(C, {
1300
- className: J.browseButton,
1335
+ L && (a || r.length === 0) && /* @__PURE__ */ t(w, {
1336
+ className: q.browseButton,
1301
1337
  size: "sm",
1302
1338
  onClick: () => A.current?.click(),
1303
- children: w
1339
+ children: C
1304
1340
  }),
1305
- L && !a && /* @__PURE__ */ t(C, {
1306
- className: J.browseButton,
1341
+ L && !a && /* @__PURE__ */ t(w, {
1342
+ className: q.browseButton,
1307
1343
  size: "sm",
1308
1344
  onClick: () => A.current?.click(),
1309
1345
  children: S
1310
1346
  })
1311
1347
  ] }) : /* @__PURE__ */ n("div", {
1312
- className: J.empty,
1348
+ className: q.empty,
1313
1349
  children: [
1314
1350
  /* @__PURE__ */ t("span", {
1315
- className: J.uploadIcon,
1351
+ className: q.uploadIcon,
1316
1352
  "aria-hidden": "true",
1317
1353
  children: "↑"
1318
1354
  }),
1319
1355
  /* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
1320
- !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(C, {
1321
- className: J.browseButton,
1356
+ !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
1357
+ className: q.browseButton,
1322
1358
  onClick: () => A.current?.click(),
1323
1359
  children: S
1324
1360
  })] })
1325
1361
  ]
1326
1362
  })]
1327
1363
  }),
1328
- p && !m && /* @__PURE__ */ t(E, {
1364
+ p && !m && /* @__PURE__ */ t(D, {
1329
1365
  id: P,
1330
1366
  children: p
1331
1367
  }),
1332
- m && /* @__PURE__ */ t(E, {
1368
+ m && /* @__PURE__ */ t(D, {
1333
1369
  id: F,
1334
1370
  variant: "error",
1335
1371
  live: !0,
@@ -1337,11 +1373,11 @@ var w = {
1337
1373
  })
1338
1374
  ]
1339
1375
  });
1340
- }, Ae = 0, Y = _((e) => ({
1376
+ }, Pe = 0, J = v((e) => ({
1341
1377
  modals: [],
1342
1378
  openModal: (t, n = {}, r = {}) => {
1343
- Ae += 1;
1344
- let i = `ds-modal-${Ae}`;
1379
+ Pe += 1;
1380
+ let i = `ds-modal-${Pe}`;
1345
1381
  return e((e) => ({ modals: [...e.modals, {
1346
1382
  id: i,
1347
1383
  name: t,
@@ -1353,7 +1389,7 @@ var w = {
1353
1389
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1354
1390
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1355
1391
  closeAllModals: () => e({ modals: [] })
1356
- })), je = () => Y.setState({ modals: [] }), X = {
1392
+ })), Fe = () => J.setState({ modals: [] }), Y = {
1357
1393
  layer: "_layer_1nb2z_1",
1358
1394
  backdrop: "_backdrop_1nb2z_3",
1359
1395
  panel: "_panel_1nb2z_5",
@@ -1361,22 +1397,22 @@ var w = {
1361
1397
  title: "_title_1nb2z_11",
1362
1398
  description: "_description_1nb2z_13",
1363
1399
  content: "_content_1nb2z_15"
1364
- }, Me = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Ne = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: d = "dialog" }) => {
1365
- let f = c(), p = c(), m = u(null), h = Y((e) => e.closeModal);
1400
+ }, Ie = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Le = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
1401
+ let f = c(), p = c(), m = d(null), h = J((e) => e.closeModal);
1366
1402
  return s(() => {
1367
1403
  let e = document.activeElement, t = m.current;
1368
- return (t?.querySelector(Me) ?? t)?.focus(), () => e?.focus();
1404
+ return (t?.querySelector(Ie) ?? t)?.focus(), () => e?.focus();
1369
1405
  }, []), /* @__PURE__ */ n("div", {
1370
1406
  ref: m,
1371
- className: `${X.panel} ${l}`,
1372
- role: d,
1407
+ className: `${Y.panel} ${l}`,
1408
+ role: u,
1373
1409
  "aria-modal": "true",
1374
1410
  "aria-labelledby": r ? f : void 0,
1375
1411
  "aria-describedby": i ? p : void 0,
1376
1412
  tabIndex: -1,
1377
1413
  onKeyDown: (e) => {
1378
1414
  if (e.key !== "Tab") return;
1379
- let t = Array.from(m.current?.querySelectorAll(Me) ?? []);
1415
+ let t = Array.from(m.current?.querySelectorAll(Ie) ?? []);
1380
1416
  if (!t.length) {
1381
1417
  e.preventDefault();
1382
1418
  return;
@@ -1386,12 +1422,12 @@ var w = {
1386
1422
  },
1387
1423
  children: [
1388
1424
  (r || o) && /* @__PURE__ */ n("header", {
1389
- className: X.header,
1425
+ className: Y.header,
1390
1426
  children: [r && /* @__PURE__ */ t("h2", {
1391
1427
  id: f,
1392
- className: X.title,
1428
+ className: Y.title,
1393
1429
  children: r
1394
- }), /* @__PURE__ */ t(C, {
1430
+ }), /* @__PURE__ */ t(w, {
1395
1431
  variant: "empty",
1396
1432
  size: "sm",
1397
1433
  "aria-label": o,
@@ -1412,31 +1448,31 @@ var w = {
1412
1448
  }),
1413
1449
  i && /* @__PURE__ */ t("p", {
1414
1450
  id: p,
1415
- className: X.description,
1451
+ className: Y.description,
1416
1452
  children: i
1417
1453
  }),
1418
1454
  /* @__PURE__ */ t("div", {
1419
- className: X.content,
1455
+ className: Y.content,
1420
1456
  children: e
1421
1457
  })
1422
1458
  ]
1423
1459
  });
1424
- }, Pe = ({ registry: e }) => {
1425
- let n = Y((e) => e.modals), r = Y((e) => e.closeModal), i = Y((e) => e.closeAllModals);
1460
+ }, Re = ({ registry: e }) => {
1461
+ let n = J((e) => e.modals), r = J((e) => e.closeModal), i = J((e) => e.closeAllModals);
1426
1462
  return s(() => {
1427
1463
  let e = (e) => {
1428
1464
  if (e.key !== "Escape") return;
1429
- let t = Y.getState().modals.at(-1);
1465
+ let t = J.getState().modals.at(-1);
1430
1466
  t?.closeOnEscape && r(t.id);
1431
1467
  };
1432
1468
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1433
- }, [r]), !n.length || typeof document > "u" ? null : g(/* @__PURE__ */ t("div", {
1434
- className: X.layer,
1469
+ }, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
1470
+ className: Y.layer,
1435
1471
  "aria-label": "Модальные окна",
1436
1472
  children: n.map((a, o) => {
1437
1473
  let s = e[a.name];
1438
1474
  return s ? /* @__PURE__ */ t("div", {
1439
- className: X.backdrop,
1475
+ className: Y.backdrop,
1440
1476
  "aria-hidden": o !== n.length - 1 || void 0,
1441
1477
  onMouseDown: (e) => {
1442
1478
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
@@ -1450,91 +1486,91 @@ var w = {
1450
1486
  }, a.id) : null;
1451
1487
  })
1452
1488
  }), document.body);
1453
- }, Fe = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1454
- let o = Y((e) => e.modals.length);
1489
+ }, ze = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1490
+ let o = J((e) => e.modals.length);
1455
1491
  return s(() => {
1456
1492
  if (!a || o === 0) return;
1457
1493
  let e = document.body.style.overflow;
1458
1494
  return document.body.style.overflow = "hidden", () => {
1459
1495
  document.body.style.overflow = e;
1460
1496
  };
1461
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Pe, { registry: r })] });
1462
- }, Ie = (e) => e, Le = {
1497
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Re, { registry: r })] });
1498
+ }, Be = (e) => e, Ve = {
1463
1499
  message: "_message_1vtru_1",
1464
1500
  actions: "_actions_1vtru_3"
1465
- }, Re = /* @__PURE__ */ new Map(), ze = 0, Be = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1501
+ }, He = /* @__PURE__ */ new Map(), Ue = 0, We = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1466
1502
  let u = (e) => {
1467
- Re.get(l)?.(e), Re.delete(l), r();
1503
+ He.get(l)?.(e), He.delete(l), r();
1468
1504
  };
1469
- return /* @__PURE__ */ n(Ne, {
1505
+ return /* @__PURE__ */ n(Le, {
1470
1506
  modalId: e,
1471
1507
  title: i,
1472
1508
  role: "alertdialog",
1473
1509
  children: [/* @__PURE__ */ t("p", {
1474
- className: Le.message,
1510
+ className: Ve.message,
1475
1511
  children: a
1476
1512
  }), /* @__PURE__ */ n("div", {
1477
- className: Le.actions,
1478
- children: [/* @__PURE__ */ t(C, {
1513
+ className: Ve.actions,
1514
+ children: [/* @__PURE__ */ t(w, {
1479
1515
  variant: "outline",
1480
1516
  onClick: () => u(!1),
1481
1517
  children: s
1482
- }), /* @__PURE__ */ t(C, {
1518
+ }), /* @__PURE__ */ t(w, {
1483
1519
  variant: c === "danger" ? "destructive" : "primary",
1484
1520
  onClick: () => u(!0),
1485
1521
  children: o
1486
1522
  })]
1487
1523
  })]
1488
1524
  });
1489
- }, Ve = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ne, {
1525
+ }, Ge = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Le, {
1490
1526
  modalId: e,
1491
1527
  title: i,
1492
1528
  role: "alertdialog",
1493
1529
  children: [/* @__PURE__ */ t("p", {
1494
- className: Le.message,
1530
+ className: Ve.message,
1495
1531
  children: a
1496
1532
  }), /* @__PURE__ */ t("div", {
1497
- className: Le.actions,
1498
- children: /* @__PURE__ */ t(C, {
1533
+ className: Ve.actions,
1534
+ children: /* @__PURE__ */ t(w, {
1499
1535
  onClick: r,
1500
1536
  children: o
1501
1537
  })
1502
1538
  })]
1503
- }), He = Ie({
1504
- ConfirmModal: Be,
1505
- ErrorModal: Ve
1506
- }), Ue = () => {
1507
- let e = Y((e) => e.openModal);
1539
+ }), Ke = Be({
1540
+ ConfirmModal: We,
1541
+ ErrorModal: Ge
1542
+ }), qe = () => {
1543
+ let e = J((e) => e.openModal);
1508
1544
  return (t = {}) => new Promise((n) => {
1509
- ze += 1;
1510
- let r = `confirm-${ze}`;
1511
- Re.set(r, n), e("ConfirmModal", {
1545
+ Ue += 1;
1546
+ let r = `confirm-${Ue}`;
1547
+ He.set(r, n), e("ConfirmModal", {
1512
1548
  ...t,
1513
1549
  requestId: r
1514
1550
  }, { closeOnEscape: !1 });
1515
1551
  });
1516
- }, We = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ge = () => {
1517
- let e = Y((e) => e.openModal);
1552
+ }, Je = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ye = () => {
1553
+ let e = J((e) => e.openModal);
1518
1554
  return { showError: (t, n) => e("ErrorModal", {
1519
1555
  title: n,
1520
- message: We(t)
1556
+ message: Je(t)
1521
1557
  }) };
1522
- }, Ke = _(() => ({})), qe = _(() => ({})), Je = () => {
1523
- let e = Y((e) => e.modals), t = Y((e) => e.openModal);
1558
+ }, Xe = v(() => ({})), Ze = v(() => ({})), Qe = () => {
1559
+ let e = J((e) => e.modals), t = J((e) => e.openModal);
1524
1560
  return {
1525
1561
  openModal: (e, n = {}, r) => t(e, n, r),
1526
- closeModal: Y((e) => e.closeModal),
1527
- closeTopModal: Y((e) => e.closeTopModal),
1528
- closeAllModals: Y((e) => e.closeAllModals),
1562
+ closeModal: J((e) => e.closeModal),
1563
+ closeTopModal: J((e) => e.closeTopModal),
1564
+ closeAllModals: J((e) => e.closeAllModals),
1529
1565
  isOpen: (t) => e.some((e) => e.name === t),
1530
1566
  count: e.length
1531
1567
  };
1532
- }, Ye = { root: "_root_1x7h7_1" }, Xe = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1533
- className: `${Ye.root} ${r}`,
1568
+ }, $e = { root: "_root_1x7h7_1" }, et = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1569
+ className: `${$e.root} ${r}`,
1534
1570
  role: "status",
1535
1571
  "aria-label": e,
1536
- children: [/* @__PURE__ */ t(x, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1537
- }), Ze = {
1572
+ children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1573
+ }), X = {
1538
1574
  viewport: "_viewport_15mi5_1",
1539
1575
  "top-right": "_top-right_15mi5_3",
1540
1576
  "top-left": "_top-left_15mi5_5",
@@ -1547,7 +1583,7 @@ var w = {
1547
1583
  success: "_success_15mi5_19",
1548
1584
  warning: "_warning_15mi5_21",
1549
1585
  error: "_error_15mi5_23"
1550
- }, Qe = (e) => {
1586
+ }, tt = (e) => {
1551
1587
  let r;
1552
1588
  return r = e === "info" ? /* @__PURE__ */ n("svg", {
1553
1589
  xmlns: "http://www.w3.org/2000/svg",
@@ -1633,8 +1669,8 @@ var w = {
1633
1669
  /* @__PURE__ */ t("path", { d: "m9 9 6 6" })
1634
1670
  ]
1635
1671
  }), r;
1636
- }, $e = ({ toast: e, onClose: r }) => {
1637
- let [i, a] = d(!1), o = u(e.duration), c = u(Date.now());
1672
+ }, nt = ({ toast: e, onClose: r }) => {
1673
+ let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
1638
1674
  return s(() => {
1639
1675
  if (i || e.duration <= 0) return;
1640
1676
  c.current = Date.now();
@@ -1648,7 +1684,7 @@ var w = {
1648
1684
  e.duration,
1649
1685
  e.id
1650
1686
  ]), /* @__PURE__ */ n("article", {
1651
- className: `${Ze.toast} ${Ze[e.variant]}`,
1687
+ className: `${X.toast} ${X[e.variant]}`,
1652
1688
  role: e.variant === "error" ? "alert" : "status",
1653
1689
  "aria-live": e.variant === "error" ? "assertive" : "polite",
1654
1690
  onMouseEnter: () => a(!0),
@@ -1656,13 +1692,13 @@ var w = {
1656
1692
  onFocus: () => a(!0),
1657
1693
  onBlur: () => a(!1),
1658
1694
  children: [
1659
- /* @__PURE__ */ t("div", { children: Qe(e.variant) }),
1695
+ /* @__PURE__ */ t("div", { children: tt(e.variant) }),
1660
1696
  /* @__PURE__ */ n("div", {
1661
- className: Ze.body,
1697
+ className: X.body,
1662
1698
  children: [
1663
1699
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1664
1700
  /* @__PURE__ */ t("div", { children: e.message }),
1665
- e.action && /* @__PURE__ */ t(C, {
1701
+ e.action && /* @__PURE__ */ t(w, {
1666
1702
  variant: "empty",
1667
1703
  size: "sm",
1668
1704
  onClick: () => {
@@ -1672,7 +1708,7 @@ var w = {
1672
1708
  })
1673
1709
  ]
1674
1710
  }),
1675
- e.closable && /* @__PURE__ */ t(C, {
1711
+ e.closable && /* @__PURE__ */ t(w, {
1676
1712
  variant: "empty",
1677
1713
  size: "sm",
1678
1714
  "aria-label": "Закрыть уведомление",
@@ -1692,11 +1728,11 @@ var w = {
1692
1728
  })
1693
1729
  ]
1694
1730
  });
1695
- }, et = 0, Z = _((e) => ({
1731
+ }, rt = 0, Z = v((e) => ({
1696
1732
  toasts: [],
1697
1733
  showToast: (t) => {
1698
- et += 1;
1699
- let n = `ds-toast-${et}`;
1734
+ rt += 1;
1735
+ let n = `ds-toast-${rt}`;
1700
1736
  return e((e) => ({ toasts: [...e.toasts, {
1701
1737
  variant: "info",
1702
1738
  duration: 5e3,
@@ -1707,17 +1743,17 @@ var w = {
1707
1743
  },
1708
1744
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1709
1745
  clearToasts: () => e({ toasts: [] })
1710
- })), tt = () => Z.setState({ toasts: [] }), nt = ({ position: e = "top-right" }) => {
1746
+ })), it = () => Z.setState({ toasts: [] }), at = ({ position: e = "top-right" }) => {
1711
1747
  let n = Z((e) => e.toasts), r = Z((e) => e.removeToast);
1712
1748
  return /* @__PURE__ */ t("div", {
1713
- className: `${Ze.viewport} ${Ze[e]}`,
1749
+ className: `${X.viewport} ${X[e]}`,
1714
1750
  "aria-label": "Уведомления",
1715
- children: n.map((e) => /* @__PURE__ */ t($e, {
1751
+ children: n.map((e) => /* @__PURE__ */ t(nt, {
1716
1752
  toast: e,
1717
1753
  onClose: r
1718
1754
  }, e.id))
1719
1755
  });
1720
- }, rt = () => {
1756
+ }, ot = () => {
1721
1757
  let e = Z((e) => e.showToast), t = Z((e) => e.removeToast), n = Z((e) => e.clearToasts), r = o((t) => e({
1722
1758
  ...t,
1723
1759
  variant: "info"
@@ -1731,7 +1767,7 @@ var w = {
1731
1767
  ...t,
1732
1768
  variant: "error"
1733
1769
  }), [e]);
1734
- return l(() => ({
1770
+ return u(() => ({
1735
1771
  showToast: e,
1736
1772
  infoToast: r,
1737
1773
  successToast: i,
@@ -1748,7 +1784,7 @@ var w = {
1748
1784
  i,
1749
1785
  a
1750
1786
  ]);
1751
- }, it = {
1787
+ }, st = {
1752
1788
  root: "_root_s9o0g_1",
1753
1789
  tooltip: "_tooltip_s9o0g_3",
1754
1790
  "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
@@ -1756,9 +1792,9 @@ var w = {
1756
1792
  bottom: "_bottom_s9o0g_7",
1757
1793
  left: "_left_s9o0g_9",
1758
1794
  right: "_right_s9o0g_11"
1759
- }, at = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: f = !1, maxWidth: p = 280, className: m = "" }) => {
1760
- let h = c(), [g, _] = d(!1), v = u(null), y = () => {
1761
- f || !e || (v.current = setTimeout(() => _(!0), l));
1795
+ }, ct = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
1796
+ let h = c(), [g, _] = f(!1), v = d(null), y = () => {
1797
+ u || !e || (v.current = setTimeout(() => _(!0), l));
1762
1798
  }, b = () => {
1763
1799
  v.current && clearTimeout(v.current), _(!1);
1764
1800
  };
@@ -1778,12 +1814,12 @@ var w = {
1778
1814
  onBlur: b
1779
1815
  });
1780
1816
  return /* @__PURE__ */ n("span", {
1781
- className: `${it.root} ${m}`,
1817
+ className: `${st.root} ${m}`,
1782
1818
  onPointerDown: g ? b : y,
1783
1819
  children: [x, g && /* @__PURE__ */ t("span", {
1784
1820
  id: h,
1785
1821
  role: "tooltip",
1786
- className: `${it.tooltip} ${it[o]}`,
1822
+ className: `${st.tooltip} ${st[o]}`,
1787
1823
  style: { maxWidth: p },
1788
1824
  children: e
1789
1825
  })]
@@ -1795,8 +1831,8 @@ var w = {
1795
1831
  overlay: "_overlay_1ue3g_7",
1796
1832
  error: "_error_1ue3g_7",
1797
1833
  caption: "_caption_1ue3g_13"
1798
- }, ot = ({ 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 }) => {
1799
- let [h, g] = d(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
1834
+ }, lt = ({ sources: e, tracks: r = [], title: i, aspectRatio: a = "16 / 9", objectFit: o = "contain", loading: s = !1, error: c, fallback: l, className: u = "", controls: d = !0, playsInline: p = !0, ...m }) => {
1835
+ let [h, g] = f(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
1800
1836
  return /* @__PURE__ */ n("figure", {
1801
1837
  className: `${Q.root} ${u}`,
1802
1838
  children: [/* @__PURE__ */ n("div", {
@@ -1806,7 +1842,7 @@ var w = {
1806
1842
  !_ && e.length > 0 && /* @__PURE__ */ n("video", {
1807
1843
  ...m,
1808
1844
  "aria-label": i,
1809
- controls: f,
1845
+ controls: d,
1810
1846
  playsInline: p,
1811
1847
  className: Q.video,
1812
1848
  style: { objectFit: o },
@@ -1817,7 +1853,7 @@ var w = {
1817
1853
  }),
1818
1854
  s && /* @__PURE__ */ t("div", {
1819
1855
  className: Q.overlay,
1820
- children: /* @__PURE__ */ t(x, { label: "Загрузка видео" })
1856
+ children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
1821
1857
  }),
1822
1858
  (_ || e.length === 0) && /* @__PURE__ */ t("div", {
1823
1859
  className: Q.error,
@@ -1830,7 +1866,7 @@ var w = {
1830
1866
  children: i
1831
1867
  })]
1832
1868
  });
1833
- }, st = {
1869
+ }, ut = {
1834
1870
  popup: "_popup_15ovj_1",
1835
1871
  trigger: "_trigger_15ovj_15",
1836
1872
  content: "_content_15ovj_23",
@@ -1838,13 +1874,13 @@ var w = {
1838
1874
  right: "_right_15ovj_141",
1839
1875
  bottom: "_bottom_15ovj_175",
1840
1876
  left: "_left_15ovj_209"
1841
- }, ct = ({ content: r, children: i, placement: a = "top", disabled: o = !1 }) => o ? /* @__PURE__ */ t(e, { children: i }) : /* @__PURE__ */ n("span", {
1842
- className: `${st.popup} ${st[a]}`,
1877
+ }, dt = ({ content: r, children: i, placement: a = "top", disabled: o = !1 }) => o ? /* @__PURE__ */ t(e, { children: i }) : /* @__PURE__ */ n("span", {
1878
+ className: `${ut.popup} ${ut[a]}`,
1843
1879
  children: [/* @__PURE__ */ t("span", {
1844
- className: st.trigger,
1880
+ className: ut.trigger,
1845
1881
  children: i
1846
1882
  }), /* @__PURE__ */ t("span", {
1847
- className: st.content,
1883
+ className: ut.content,
1848
1884
  role: "tooltip",
1849
1885
  children: r
1850
1886
  })]
@@ -1858,8 +1894,8 @@ var w = {
1858
1894
  open: "_open_1tdda_91",
1859
1895
  content: "_content_1tdda_99",
1860
1896
  contentInner: "_contentInner_1tdda_119"
1861
- }, lt = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, className: l = "" }) => {
1862
- let u = c(), [f, p] = d(a), m = o ?? f;
1897
+ }, ft = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, className: l = "" }) => {
1898
+ let u = c(), [d, p] = f(a), m = o ?? d;
1863
1899
  return /* @__PURE__ */ n("section", {
1864
1900
  className: `${$.root} ${m ? $.open : ""} ${l}`,
1865
1901
  children: [/* @__PURE__ */ n("button", {
@@ -1905,6 +1941,19 @@ var w = {
1905
1941
  })
1906
1942
  })]
1907
1943
  });
1944
+ }, pt = ({ children: e, containerId: t = "overlay-root" }) => {
1945
+ let [n, r] = f(null);
1946
+ return s(() => {
1947
+ let e = document.getElementById(t);
1948
+ if (e) {
1949
+ r(e);
1950
+ return;
1951
+ }
1952
+ let n = document.createElement("div");
1953
+ return n.id = t, document.body.appendChild(n), r(n), () => {
1954
+ n.childElementCount === 0 && n.parentElement && n.remove();
1955
+ };
1956
+ }, [t]), n ? p(e, n) : null;
1908
1957
  };
1909
1958
  //#endregion
1910
- export { Be as ConfirmModal, lt as DSAccordion, y as DSBadge, C as DSButton, O as DSCheckbox, _e as DSDataTable, B as DSDateRange, ne as DSDateTimePicker, ie as DSDropDown, ve as DSDropDownMultiple, T as DSFieldLabel, E as DSFieldMessage, ke as DSFileInput, Te as DSFilters, be as DSIcon, xe as DSInfoBlock, Se as DSInput, x as DSLoader, Pe as DSModal, Ne as DSModalFrame, Xe as DSPageLoader, ct as DSPopup, Ce as DSRadioButton, H as DSSkeleton, oe as DSSort, $e as DSToast, nt as DSToastProvider, at as DSTooltip, ot as DSVideoPlayerFrame, Ve as ErrorModal, Fe as ModalSystemProvider, He as builtInModalRegistry, Ie as defineModalRegistry, P as formatDateTimeLocalValue, We as getErrorMessage, re as getNextEnabledOptionIndex, z as isValidDateRange, F as parseDateTimeLocalValue, je as resetModalStore, tt as resetToastStore, Ue as useConfirmModal, Ke as useConfirmModalStore, Ge as useErrorModal, qe as useErrorModalStore, Je as useModals, Y as useModalsStore, rt as useToast, Z as useToastStore, ce as validateDSDataTableData };
1959
+ export { We as ConfirmModal, ft as DSAccordion, b as DSBadge, w as DSButton, k as DSCheckbox, be as DSDataTable, R as DSDateRange, ae as DSDateTimePicker, le as DSDropDown, xe as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Ne as DSFileInput, ke as DSFilters, Ce as DSIcon, Te as DSInfoBlock, Ee as DSInput, S as DSLoader, Re as DSModal, Le as DSModalFrame, et as DSPageLoader, dt as DSPopup, pt as DSPortal, De as DSRadioButton, B as DSSkeleton, ue as DSSort, nt as DSToast, at as DSToastProvider, ct as DSTooltip, lt as DSVideoPlayerFrame, Ge as ErrorModal, ze as ModalSystemProvider, Ke as builtInModalRegistry, Be as defineModalRegistry, F as formatDateTimeLocalValue, Je as getErrorMessage, ce as getNextEnabledOptionIndex, se as isValidDateRange, I as parseDateTimeLocalValue, Fe as resetModalStore, it as resetToastStore, qe as useConfirmModal, Xe as useConfirmModalStore, Ye as useErrorModal, Ze as useErrorModalStore, Qe as useModals, J as useModalsStore, ot as useToast, Z as useToastStore, fe as validateDSDataTableData };