@efficiency-point/design-system 0.1.3 → 0.1.4

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
@@ -223,74 +223,74 @@ var T = {
223
223
  }, z = (e, t) => !!(e && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate()), B = (e, t, n) => {
224
224
  let r = P(e).getTime();
225
225
  return !!(t && r < P(t).getTime() || n && r > P(n).getTime());
226
- }, V = 8, ee = 6, H = ({ 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, size: C = "md", id: w, name: T, className: O = "" }) => {
227
- let k = c(), N = w ?? `ds-date-time-${T ?? k}`, P = g ? `${N}-hint` : void 0, H = _ ? `${N}-error` : void 0, U = d(null), W = d(null), te = d(null), [G, ne] = f(!1), [K, q] = f(r ?? /* @__PURE__ */ new Date()), [re, ie] = f(F(r, "time")), [J, ae] = f(null), oe = u(() => R(K), [K]), se = a !== "time", ce = a !== "date";
226
+ }, V = 8, H = 6, U = ({ 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, size: C = "md", id: w, name: T, className: O = "" }) => {
227
+ let k = c(), N = w ?? `ds-date-time-${T ?? k}`, P = g ? `${N}-hint` : void 0, U = _ ? `${N}-error` : void 0, W = d(null), G = d(null), ee = d(null), [K, q] = f(!1), [J, Y] = f(r ?? /* @__PURE__ */ new Date()), [te, ne] = f(F(r, "time")), [re, ie] = f(null), ae = u(() => R(J), [J]), oe = a !== "time", se = a !== "date";
228
228
  s(() => {
229
- r && q(r), ie(F(r, "time"));
229
+ r && Y(r), ne(F(r, "time"));
230
230
  }, [r]);
231
- let le = o(() => {
232
- let e = W.current, t = te.current;
231
+ let ce = o(() => {
232
+ let e = G.current, t = ee.current;
233
233
  if (!e || !t) return;
234
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - V, o = n.top - V, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(V, n.top - r.height - ee) : n.bottom + ee, u = n.left, d = i - r.width - V;
235
- ae({
234
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - V, o = n.top - V, s = a < r.height && o > a, c = Math.max(120, s ? o : a), l = s ? Math.max(V, n.top - r.height - H) : n.bottom + H, u = n.left, d = i - r.width - V;
235
+ ie({
236
236
  top: l,
237
237
  left: Math.max(V, Math.min(u, d)),
238
238
  maxHeight: c
239
239
  });
240
240
  }, []);
241
241
  l(() => {
242
- if (!G) {
243
- ae(null);
242
+ if (!K) {
243
+ ie(null);
244
244
  return;
245
245
  }
246
- return le(), window.addEventListener("resize", le), window.addEventListener("scroll", le, !0), () => {
247
- window.removeEventListener("resize", le), window.removeEventListener("scroll", le, !0);
246
+ return ce(), window.addEventListener("resize", ce), window.addEventListener("scroll", ce, !0), () => {
247
+ window.removeEventListener("resize", ce), window.removeEventListener("scroll", ce, !0);
248
248
  };
249
249
  }, [
250
- G,
251
- le,
252
250
  K,
253
- re
251
+ ce,
252
+ J,
253
+ te
254
254
  ]), s(() => {
255
- if (!G) return;
255
+ if (!K) return;
256
256
  let e = (e) => {
257
- let t = e.target, n = U.current?.contains(t), r = te.current?.contains(t);
258
- !n && !r && ne(!1);
257
+ let t = e.target, n = W.current?.contains(t), r = ee.current?.contains(t);
258
+ !n && !r && q(!1);
259
259
  }, t = (e) => {
260
- e.key === "Escape" && (ne(!1), W.current?.focus());
260
+ e.key === "Escape" && (q(!1), G.current?.focus());
261
261
  };
262
262
  return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
263
263
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
264
264
  };
265
- }, [G]);
266
- let ue = (e) => {
265
+ }, [K]);
266
+ let le = (e) => {
267
267
  if (B(e, x, S)) return;
268
268
  let t = new Date(e);
269
- t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && ne(!1);
270
- }, Y = (e) => {
271
- if (ie(e), !e) {
269
+ t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), a === "date" && q(!1);
270
+ }, X = (e) => {
271
+ if (ne(e), !e) {
272
272
  i?.(null);
273
273
  return;
274
274
  }
275
275
  let t = I(e, "time");
276
276
  if (!t) return;
277
- let n = new Date(a === "datetime" ? r ?? K : /* @__PURE__ */ new Date());
277
+ let n = new Date(a === "datetime" ? r ?? J : /* @__PURE__ */ new Date());
278
278
  n.setHours(t.getHours(), t.getMinutes(), 0, 0), !(x && n < x || S && n > S) && i?.(n);
279
- }, de = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), fe = [P, H].filter(Boolean).join(" ") || void 0, pe = G && !y ? /* @__PURE__ */ n("div", {
280
- ref: te,
279
+ }, ue = h ?? (a === "date" ? "Выберите дату" : a === "time" ? "Введите время" : "Выберите дату и время"), de = [P, U].filter(Boolean).join(" ") || void 0, fe = K && !y ? /* @__PURE__ */ n("div", {
280
+ ref: ee,
281
281
  className: A.panel,
282
282
  role: "dialog",
283
- "aria-label": m ?? de,
284
- style: J ? {
285
- top: J.top,
286
- left: J.left,
287
- maxHeight: J.maxHeight
283
+ "aria-label": m ?? ue,
284
+ style: re ? {
285
+ top: re.top,
286
+ left: re.left,
287
+ maxHeight: re.maxHeight
288
288
  } : {
289
289
  visibility: "hidden",
290
290
  top: 0,
291
291
  left: 0
292
292
  },
293
- children: [se && /* @__PURE__ */ n(e, { children: [
293
+ children: [oe && /* @__PURE__ */ n(e, { children: [
294
294
  /* @__PURE__ */ n("div", {
295
295
  className: A.calendarHeader,
296
296
  children: [
@@ -298,14 +298,14 @@ var T = {
298
298
  type: "button",
299
299
  className: A.nav,
300
300
  "aria-label": "Предыдущий месяц",
301
- onClick: () => q(new Date(K.getFullYear(), K.getMonth() - 1, 1)),
301
+ onClick: () => Y(new Date(J.getFullYear(), J.getMonth() - 1, 1)),
302
302
  children: "‹"
303
303
  }),
304
304
  /* @__PURE__ */ t("select", {
305
305
  className: A.monthSelect,
306
306
  "aria-label": "Месяц",
307
- value: K.getMonth(),
308
- onChange: (e) => q(new Date(K.getFullYear(), Number(e.target.value), 1)),
307
+ value: J.getMonth(),
308
+ onChange: (e) => Y(new Date(J.getFullYear(), Number(e.target.value), 1)),
309
309
  children: M.map((e, n) => /* @__PURE__ */ t("option", {
310
310
  value: n,
311
311
  children: e
@@ -315,14 +315,14 @@ var T = {
315
315
  className: A.yearInput,
316
316
  type: "number",
317
317
  "aria-label": "Год",
318
- value: K.getFullYear(),
319
- onChange: (e) => q(new Date(Number(e.target.value), K.getMonth(), 1))
318
+ value: J.getFullYear(),
319
+ onChange: (e) => Y(new Date(Number(e.target.value), J.getMonth(), 1))
320
320
  }),
321
321
  /* @__PURE__ */ t("button", {
322
322
  type: "button",
323
323
  className: A.nav,
324
324
  "aria-label": "Следующий месяц",
325
- onClick: () => q(new Date(K.getFullYear(), K.getMonth() + 1, 1)),
325
+ onClick: () => Y(new Date(J.getFullYear(), J.getMonth() + 1, 1)),
326
326
  children: "›"
327
327
  })
328
328
  ]
@@ -333,30 +333,30 @@ var T = {
333
333
  }),
334
334
  /* @__PURE__ */ t("div", {
335
335
  className: A.days,
336
- children: oe.map((e) => {
336
+ children: ae.map((e) => {
337
337
  let n = z(r, e);
338
338
  return /* @__PURE__ */ t("button", {
339
339
  type: "button",
340
- className: `${A.day} ${e.getMonth() === K.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
340
+ className: `${A.day} ${e.getMonth() === J.getMonth() ? "" : A.outside} ${n ? A.selected : ""}`,
341
341
  disabled: B(e, x, S),
342
342
  "aria-pressed": n,
343
- onClick: () => ue(e),
343
+ onClick: () => le(e),
344
344
  children: e.getDate()
345
345
  }, e.toISOString());
346
346
  })
347
347
  })
348
- ] }), ce && /* @__PURE__ */ n("label", {
348
+ ] }), se && /* @__PURE__ */ n("label", {
349
349
  className: A.timeLabel,
350
350
  children: [/* @__PURE__ */ t("span", { children: "Время" }), /* @__PURE__ */ t("input", {
351
351
  className: A.timeInput,
352
352
  type: "time",
353
- value: re,
354
- onChange: (e) => Y(e.target.value)
353
+ value: te,
354
+ onChange: (e) => X(e.target.value)
355
355
  })]
356
356
  })]
357
357
  }) : null;
358
358
  return /* @__PURE__ */ n("div", {
359
- ref: U,
359
+ ref: W,
360
360
  className: `${A.wrapper} ${O}`,
361
361
  children: [
362
362
  m && /* @__PURE__ */ t(E, {
@@ -366,24 +366,24 @@ var T = {
366
366
  children: m
367
367
  }),
368
368
  /* @__PURE__ */ n("button", {
369
- ref: W,
369
+ ref: G,
370
370
  id: N,
371
371
  name: T,
372
372
  type: "button",
373
373
  className: `${A.trigger} ${A[C]} ${_ ? A.error : ""}`,
374
374
  disabled: v,
375
375
  "aria-readonly": y || void 0,
376
- "aria-expanded": G,
376
+ "aria-expanded": K,
377
377
  "aria-haspopup": "dialog",
378
- "aria-describedby": fe,
378
+ "aria-describedby": de,
379
379
  onClick: () => {
380
- y || ne((e) => !e);
380
+ y || q((e) => !e);
381
381
  },
382
382
  children: [/* @__PURE__ */ t("span", {
383
383
  className: r ? A.value : A.placeholder,
384
- children: L(r, a) || de
384
+ children: L(r, a) || ue
385
385
  }), /* @__PURE__ */ t("span", {
386
- className: [A.chevron, pe ? A.chevronOpen : ""].filter(Boolean).join(" "),
386
+ className: [A.chevron, fe ? A.chevronOpen : ""].filter(Boolean).join(" "),
387
387
  "aria-hidden": "true",
388
388
  children: /* @__PURE__ */ t("svg", {
389
389
  viewBox: "0 0 20 20",
@@ -398,32 +398,32 @@ var T = {
398
398
  })
399
399
  })]
400
400
  }),
401
- pe && p(pe, document.body),
401
+ fe && p(fe, document.body),
402
402
  g && !_ && /* @__PURE__ */ t(D, {
403
403
  id: P,
404
404
  children: g
405
405
  }),
406
406
  _ && /* @__PURE__ */ t(D, {
407
- id: H,
407
+ id: U,
408
408
  variant: "error",
409
409
  children: _
410
410
  })
411
411
  ]
412
412
  });
413
- }, U = {
413
+ }, W = {
414
414
  root: "_root_1q42e_1",
415
415
  legend: "_legend_1q42e_3",
416
416
  range: "_range_1q42e_5"
417
- }, W = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), te = ({ 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 = "" }) => {
417
+ }, G = (e) => !!(e.from && e.to && e.from.getTime() <= e.to.getTime()), ee = ({ 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 = "" }) => {
418
418
  let g = l ?? (e.from && e.to && e.from > e.to ? "Дата «От» не может быть позже даты «До»" : void 0), _ = (e) => {
419
- i?.(e), W(e) && r?.(e);
419
+ i?.(e), G(e) && r?.(e);
420
420
  };
421
421
  return /* @__PURE__ */ n("fieldset", {
422
- className: `${U.root} ${h}`,
422
+ className: `${W.root} ${h}`,
423
423
  disabled: f,
424
424
  children: [/* @__PURE__ */ n("div", {
425
- className: U.range,
426
- children: [/* @__PURE__ */ t(H, {
425
+ className: W.range,
426
+ children: [/* @__PURE__ */ t(U, {
427
427
  value: e.from,
428
428
  mode: a === "datetime" ? "datetime" : a,
429
429
  label: o,
@@ -437,7 +437,7 @@ var T = {
437
437
  ...e,
438
438
  from: t
439
439
  })
440
- }), /* @__PURE__ */ t(H, {
440
+ }), /* @__PURE__ */ t(U, {
441
441
  value: e.to,
442
442
  mode: a === "datetime" ? "datetime" : a,
443
443
  label: s,
@@ -454,7 +454,7 @@ var T = {
454
454
  })]
455
455
  }), c && !g && /* @__PURE__ */ t(D, { children: c })]
456
456
  });
457
- }, G = {
457
+ }, K = {
458
458
  group: "_group_1fs9e_1",
459
459
  skeleton: "_skeleton_1fs9e_3",
460
460
  text: "_text_1fs9e_5",
@@ -462,17 +462,17 @@ var T = {
462
462
  circular: "_circular_1fs9e_9",
463
463
  animated: "_animated_1fs9e_11",
464
464
  "ds-skeleton": "_ds-skeleton_1fs9e_1"
465
- }, ne = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
466
- className: `${G.group} ${o}`,
465
+ }, q = ({ variant: e = "text", width: n = "100%", height: r, lines: i = 1, animated: a = !0, className: o = "" }) => /* @__PURE__ */ t("span", {
466
+ className: `${K.group} ${o}`,
467
467
  "aria-hidden": "true",
468
468
  children: Array.from({ length: Math.max(1, i) }, (o, s) => /* @__PURE__ */ t("span", {
469
- className: `${G.skeleton} ${G[e]} ${a ? G.animated : ""}`,
469
+ className: `${K.skeleton} ${K[e]} ${a ? K.animated : ""}`,
470
470
  style: {
471
471
  width: s === i - 1 && i > 1 ? "70%" : n,
472
472
  height: r
473
473
  }
474
474
  }, s))
475
- }), K = {
475
+ }), J = {
476
476
  wrapper: "_wrapper_1f1hc_1",
477
477
  label: "_label_1f1hc_17",
478
478
  container: "_container_1f1hc_29",
@@ -491,25 +491,25 @@ var T = {
491
491
  message: "_message_1f1hc_349",
492
492
  error: "_error_1f1hc_351",
493
493
  errorState: "_errorState_1f1hc_377"
494
- }, q = 8, re = 6, ie = 120, J = (e, t, n) => {
494
+ }, Y = 8, te = 6, ne = 120, re = (e, t, n) => {
495
495
  if (!e.length) return -1;
496
496
  for (let r = 0; r < e.length; r += 1) {
497
497
  let i = (t + r * n + e.length) % e.length;
498
498
  if (!e[i]?.disabled) return i;
499
499
  }
500
500
  return -1;
501
- }, ae = (e) => {
501
+ }, ie = (e) => {
502
502
  if (typeof e == "number") return e;
503
503
  if (typeof e == "string") {
504
504
  let t = Number.parseFloat(e);
505
505
  if (Number.isFinite(t)) return t;
506
506
  }
507
507
  return Infinity;
508
- }, oe = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
509
- let D = c(), O = C ?? `ds-dropdown-${S ?? D}`, k = `${O}-listbox`, [A, j] = f(!1), [M, N] = f(null), P = d(null), F = d(null), I = d(null), L = d([]), R = u(() => e.find((e) => e.value === r), [e, r]), z = y ? `${O}-hint` : void 0, B = _ ? `${O}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, ee = m && h, H = o(() => {
508
+ }, ae = ({ options: e, value: r, onChange: i, placeholder: a = "Выберите опцию", disabled: m = !1, stringWhileDisabled: h = !1, label: g, error: _, size: v = "md", hint: y, className: b = "", required: x = !1, name: S, id: C, needMark: w = !0, maxMenuHeight: T }) => {
509
+ let D = c(), O = C ?? `ds-dropdown-${S ?? D}`, k = `${O}-listbox`, [A, j] = f(!1), [M, N] = f(null), P = d(null), F = d(null), I = d(null), L = d([]), R = u(() => e.find((e) => e.value === r), [e, r]), z = y ? `${O}-hint` : void 0, B = _ ? `${O}-error` : void 0, V = [z, B].filter(Boolean).join(" ") || void 0, H = m && h, U = o(() => {
510
510
  let e = F.current, t = I.current;
511
511
  if (!e || !t) return;
512
- let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - q, o = n.top - q, s = a < r.height && o > a, c = Math.max(ie, s ? o : a), l = ae(T), u = Math.min(c, l), d = n.left, f = i - n.width - q, p = Math.max(q, Math.min(d, f)), m = s ? Math.max(q, n.top - r.height - re) : n.bottom + re;
512
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = window.innerWidth, a = window.innerHeight - n.bottom - Y, o = n.top - Y, s = a < r.height && o > a, c = Math.max(ne, s ? o : a), l = ie(T), u = Math.min(c, l), d = n.left, f = i - n.width - Y, p = Math.max(Y, Math.min(d, f)), m = s ? Math.max(Y, n.top - r.height - te) : n.bottom + te;
513
513
  N({
514
514
  top: m,
515
515
  left: p,
@@ -522,12 +522,12 @@ var T = {
522
522
  N(null);
523
523
  return;
524
524
  }
525
- return H(), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
526
- window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
525
+ return U(), window.addEventListener("resize", U), window.addEventListener("scroll", U, !0), () => {
526
+ window.removeEventListener("resize", U), window.removeEventListener("scroll", U, !0);
527
527
  };
528
528
  }, [
529
529
  A,
530
- H,
530
+ U,
531
531
  e.length
532
532
  ]), s(() => {
533
533
  if (!A) return;
@@ -541,17 +541,17 @@ var T = {
541
541
  document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
542
542
  };
543
543
  }, [A]);
544
- let U = (t, n) => {
545
- let r = J(e, t, n);
544
+ let W = (t, n) => {
545
+ let r = re(e, t, n);
546
546
  if (r === -1) return;
547
547
  let i = L.current[r];
548
548
  i?.focus(), i?.scrollIntoView({ block: "nearest" });
549
- }, W = (e) => {
549
+ }, G = (e) => {
550
550
  e.disabled || (i?.(e.value, e), j(!1), F.current?.focus());
551
- }, te = A ? /* @__PURE__ */ t("ul", {
551
+ }, ee = A ? /* @__PURE__ */ t("ul", {
552
552
  ref: I,
553
553
  id: k,
554
- className: K.menu,
554
+ className: J.menu,
555
555
  role: "listbox",
556
556
  "aria-label": g,
557
557
  style: M ? {
@@ -580,23 +580,23 @@ var T = {
580
580
  "aria-selected": o,
581
581
  disabled: i.disabled,
582
582
  className: [
583
- K[v],
584
- K.option,
585
- o ? K.selected : ""
583
+ J[v],
584
+ J.option,
585
+ o ? J.selected : ""
586
586
  ].filter(Boolean).join(" "),
587
- onClick: () => W(i),
587
+ onClick: () => G(i),
588
588
  onKeyDown: (t) => {
589
589
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
590
590
  t.preventDefault();
591
591
  let e = t.key === "ArrowDown" ? 1 : -1;
592
- U(a + e, e);
592
+ W(a + e, e);
593
593
  }
594
594
  if (t.key === "Tab" && j(!1), t.key === "Home" || t.key === "End") {
595
595
  t.preventDefault();
596
596
  let n = t.key === "Home" ? 1 : -1;
597
- U(t.key === "Home" ? 0 : e.length - 1, n);
597
+ W(t.key === "Home" ? 0 : e.length - 1, n);
598
598
  }
599
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), W(i));
599
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), G(i));
600
600
  },
601
601
  children: [/* @__PURE__ */ t("span", { children: i.label }), o && w && /* @__PURE__ */ t("span", {
602
602
  "aria-hidden": "true",
@@ -609,22 +609,22 @@ var T = {
609
609
  return /* @__PURE__ */ n("div", {
610
610
  ref: P,
611
611
  className: [
612
- K.wrapper,
613
- _ ? K.errorState : "",
612
+ J.wrapper,
613
+ _ ? J.errorState : "",
614
614
  b
615
615
  ].filter(Boolean).join(" "),
616
616
  children: [
617
617
  g && /* @__PURE__ */ t(E, {
618
618
  required: x,
619
619
  disabled: m,
620
- htmlFor: ee ? void 0 : O,
620
+ htmlFor: H ? void 0 : O,
621
621
  children: g
622
622
  }),
623
623
  /* @__PURE__ */ t("div", {
624
- className: K.container,
625
- children: ee ? /* @__PURE__ */ t("div", {
624
+ className: J.container,
625
+ children: H ? /* @__PURE__ */ t("div", {
626
626
  id: O,
627
- className: K.disabledText,
627
+ className: J.disabledText,
628
628
  "aria-describedby": V,
629
629
  children: R?.label ?? a
630
630
  }) : /* @__PURE__ */ n("button", {
@@ -632,7 +632,7 @@ var T = {
632
632
  id: O,
633
633
  type: "button",
634
634
  name: S,
635
- className: `${K.trigger} ${K[v]}`,
635
+ className: `${J.trigger} ${J[v]}`,
636
636
  disabled: m,
637
637
  "aria-haspopup": "listbox",
638
638
  "aria-expanded": A,
@@ -645,21 +645,21 @@ var T = {
645
645
  t.preventDefault(), j(!0);
646
646
  let n = t.key === "ArrowDown" ? 1 : -1;
647
647
  requestAnimationFrame(() => {
648
- U(t.key === "ArrowDown" ? 0 : e.length - 1, n);
648
+ W(t.key === "ArrowDown" ? 0 : e.length - 1, n);
649
649
  });
650
650
  }
651
651
  if (t.key === "Enter" && A) {
652
652
  t.preventDefault();
653
653
  let n = e.findIndex((e) => e.value === r);
654
- U(n >= 0 ? n : 0, 1);
654
+ W(n >= 0 ? n : 0, 1);
655
655
  }
656
656
  },
657
657
  children: [/* @__PURE__ */ t("span", {
658
- className: `${R ? K.value : K.placeholder}
659
- ${K[v]}`,
658
+ className: `${R ? J.value : J.placeholder}
659
+ ${J[v]}`,
660
660
  children: R?.label ?? a
661
661
  }), /* @__PURE__ */ t("span", {
662
- className: [K.chevron, A ? K.chevronOpen : ""].filter(Boolean).join(" "),
662
+ className: [J.chevron, A ? J.chevronOpen : ""].filter(Boolean).join(" "),
663
663
  "aria-hidden": "true",
664
664
  children: /* @__PURE__ */ t("svg", {
665
665
  viewBox: "0 0 20 20",
@@ -675,38 +675,38 @@ var T = {
675
675
  })]
676
676
  })
677
677
  }),
678
- A && p(te, document.body),
678
+ A && p(ee, document.body),
679
679
  y && !_ && /* @__PURE__ */ t("span", {
680
680
  id: z,
681
- className: K.message,
681
+ className: J.message,
682
682
  children: y
683
683
  }),
684
684
  _ && /* @__PURE__ */ t("span", {
685
685
  id: B,
686
- className: K.error,
686
+ className: J.error,
687
687
  children: _
688
688
  })
689
689
  ]
690
690
  });
691
- }, se = (e) => `${e.id}:${e.direction}`, ce = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
691
+ }, oe = (e) => `${e.id}:${e.direction}`, se = ({ options: e, value: n, onChange: r, label: i = "Сортировка", placeholder: a = "Выберите сортировку", disabled: o = !1, className: s }) => {
692
692
  let c = e.flatMap((e) => [{
693
- value: se({
693
+ value: oe({
694
694
  id: e.id,
695
695
  direction: "asc"
696
696
  }),
697
697
  label: e.ascLabel ?? `${e.label} · по возрастанию`,
698
698
  disabled: e.disabled
699
699
  }, {
700
- value: se({
700
+ value: oe({
701
701
  id: e.id,
702
702
  direction: "desc"
703
703
  }),
704
704
  label: e.descLabel ?? `${e.label} · по убыванию`,
705
705
  disabled: e.disabled
706
706
  }]);
707
- return /* @__PURE__ */ t(oe, {
707
+ return /* @__PURE__ */ t(ae, {
708
708
  options: c,
709
- value: n ? se(n) : "",
709
+ value: n ? oe(n) : "",
710
710
  label: i,
711
711
  placeholder: a,
712
712
  disabled: o,
@@ -719,7 +719,7 @@ var T = {
719
719
  });
720
720
  }
721
721
  });
722
- }, le = {
722
+ }, ce = {
723
723
  approve: "M4 12l5 5L20 6",
724
724
  reject: "M5 5l14 14M19 5L5 19",
725
725
  edit: "M4 20h4L19 9l-4-4L4 16v4z",
@@ -728,7 +728,7 @@ var T = {
728
728
  basket: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3",
729
729
  info: "M12 10v7m0-10v.01",
730
730
  warning: "M12 4L3 20h18L12 4zm0 5v5m0 3v.01"
731
- }, ue = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
731
+ }, le = ({ name: e, title: r, width: i = 24, height: a = 24, ...o }) => /* @__PURE__ */ n("svg", {
732
732
  viewBox: "0 0 24 24",
733
733
  width: i,
734
734
  height: a,
@@ -741,34 +741,34 @@ var T = {
741
741
  "aria-hidden": !r || void 0,
742
742
  focusable: "false",
743
743
  ...o,
744
- children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: le[e] })]
745
- }), Y = {
746
- root: "_root_l2civ_1",
747
- tableWrap: "_tableWrap_l2civ_3",
748
- table: "_table_l2civ_3",
749
- sticky: "_sticky_l2civ_15",
750
- sortButton: "_sortButton_l2civ_17",
751
- state: "_state_l2civ_21",
752
- cards: "_cards_l2civ_23",
753
- mobileSort: "_mobileSort_l2civ_23",
754
- card: "_card_l2civ_23",
755
- spanTwo: "_spanTwo_l2civ_37",
756
- clickableRow: "_clickableRow_l2civ_41",
757
- pagination: "_pagination_l2civ_49",
758
- paginationRange: "_paginationRange_l2civ_75",
759
- paginationControls: "_paginationControls_l2civ_87",
760
- pageNumbers: "_pageNumbers_l2civ_89",
761
- pageButton: "_pageButton_l2civ_101",
762
- ellipsis: "_ellipsis_l2civ_111",
763
- previousIcon: "_previousIcon_l2civ_123",
764
- nextIcon: "_nextIcon_l2civ_131",
765
- default: "_default_l2civ_169",
766
- tableOnMobile: "_tableOnMobile_l2civ_169",
767
- wide: "_wide_l2civ_173"
768
- }, de = g({
744
+ children: [r && /* @__PURE__ */ t("title", { children: r }), /* @__PURE__ */ t("path", { d: ce[e] })]
745
+ }), X = {
746
+ root: "_root_osyhx_1",
747
+ tableWrap: "_tableWrap_osyhx_3",
748
+ table: "_table_osyhx_3",
749
+ sticky: "_sticky_osyhx_15",
750
+ sortButton: "_sortButton_osyhx_17",
751
+ state: "_state_osyhx_21",
752
+ cards: "_cards_osyhx_23",
753
+ mobileSort: "_mobileSort_osyhx_23",
754
+ card: "_card_osyhx_23",
755
+ spanTwo: "_spanTwo_osyhx_37",
756
+ clickableRow: "_clickableRow_osyhx_39",
757
+ pagination: "_pagination_osyhx_43",
758
+ paginationRange: "_paginationRange_osyhx_56",
759
+ paginationControls: "_paginationControls_osyhx_62",
760
+ pageNumbers: "_pageNumbers_osyhx_63",
761
+ pageButton: "_pageButton_osyhx_69",
762
+ ellipsis: "_ellipsis_osyhx_74",
763
+ previousIcon: "_previousIcon_osyhx_80",
764
+ nextIcon: "_nextIcon_osyhx_84",
765
+ default: "_default_osyhx_104",
766
+ tableOnMobile: "_tableOnMobile_osyhx_104",
767
+ wide: "_wide_osyhx_108"
768
+ }, ue = g({
769
769
  rowSortingFeature: h,
770
770
  sortedRowModel: m()
771
- }), fe = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
771
+ }), de = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
772
772
  0,
773
773
  1,
774
774
  2,
@@ -792,7 +792,7 @@ var T = {
792
792
  e + 1,
793
793
  "ellipsis-end",
794
794
  t - 1
795
- ], pe = (e, t) => {
795
+ ], fe = (e, t) => {
796
796
  let n = /* @__PURE__ */ new Set();
797
797
  for (let t of e) {
798
798
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -804,36 +804,36 @@ var T = {
804
804
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
805
805
  }
806
806
  return null;
807
- }, me = (e, t) => typeof e == "function" ? e(t) : t[e], he = (e) => {
807
+ }, pe = (e, t) => typeof e == "function" ? e(t) : t[e], me = (e) => {
808
808
  if (e == null || e === "") return null;
809
809
  let t = Date.parse(String(e));
810
810
  return Number.isNaN(t) ? null : t;
811
- }, ge = (e, t, n) => {
812
- let r = he(e.getValue(n)), i = he(t.getValue(n));
811
+ }, he = (e, t, n) => {
812
+ let r = me(e.getValue(n)), i = me(t.getValue(n));
813
813
  return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
814
- }, _e = (e, t, n) => {
814
+ }, ge = (e, t, n) => {
815
815
  let r = e.getValue(n), i = t.getValue(n);
816
816
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
817
- }, ve = (e, t, n) => {
817
+ }, _e = (e, t, n) => {
818
818
  let r = e.getValue(n), i = t.getValue(n);
819
819
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
820
- }, ye = (e, t, n) => {
820
+ }, ve = (e, t, n) => {
821
821
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
822
822
  return r.localeCompare(i, void 0, {
823
823
  numeric: !0,
824
824
  sensitivity: "base"
825
825
  });
826
- }, be = (e) => {
826
+ }, ye = (e) => {
827
827
  switch (e) {
828
- case "date": return ge;
829
- case "number": return _e;
830
- case "boolean": return ve;
828
+ case "date": return he;
829
+ case "number": return ge;
830
+ case "boolean": return _e;
831
831
  case "text":
832
- case void 0: return ye;
832
+ case void 0: return ve;
833
833
  case "custom": return;
834
834
  }
835
- }, xe = (e) => {
836
- let t = (t) => me(e.accessor, t), n = e.sortFn ?? be(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
835
+ }, be = (e) => {
836
+ let t = (t) => pe(e.accessor, t), n = e.sortFn ?? ye(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
837
837
  id: e.id,
838
838
  accessorFn: t,
839
839
  header: () => e.header,
@@ -845,13 +845,13 @@ var T = {
845
845
  sortDescFirst: e.sortDescFirst
846
846
  };
847
847
  return n !== void 0 && (i.sortFn = n), i;
848
- }, Se = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: c, renderMobileCard: l, getRowId: d, caption: p, ariaLabel: m, loading: h = !1, error: g, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: T = 30, visibleColumnIds: E }) => {
848
+ }, xe = ({ columns: e, data: r, tableOnMobile: i = !1, breakpoint: a = "default", sorting: o, onSortingChange: c, renderMobileCard: l, getRowId: d, caption: p, ariaLabel: m, loading: h = !1, error: g, emptyState: v = "Нет данных", stickyHeader: y = !1, maxHeight: b, className: x = "", onRowClick: S, pagination: C = !1, pageSize: T = 30, visibleColumnIds: E }) => {
849
849
  let [D, O] = f([]), [k, A] = f(0), j = o ?? D, M = j.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), N = Number.isFinite(T) && T > 0 ? Math.floor(T) : 30, P = u(() => {
850
850
  if (E === void 0) return e;
851
851
  let t = new Set(E);
852
852
  return e.filter((e) => t.has(e.id));
853
- }, [e, E]), F = u(() => P.length === 0 ? "Должна быть видима хотя бы одна колонка" : pe(P, r), [r, P]), I = u(() => P.map(xe), [P]), L = _({
854
- features: de,
853
+ }, [e, E]), F = u(() => P.length === 0 ? "Должна быть видима хотя бы одна колонка" : fe(P, r), [r, P]), I = u(() => P.map(be), [P]), L = _({
854
+ features: ue,
855
855
  columns: I,
856
856
  data: r,
857
857
  state: { sorting: j },
@@ -865,15 +865,15 @@ var T = {
865
865
  C,
866
866
  B,
867
867
  R
868
- ]), ee = u(() => P.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
868
+ ]), H = u(() => P.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
869
869
  id: e.id,
870
870
  label: typeof e.header == "string" ? e.header : e.id
871
- })), [P]), H = u(() => fe(B, z), [z, B]), U = [
872
- Y.root,
873
- a === "wide" ? Y.wide : Y.default,
874
- i ? Y.tableOnMobile : "",
871
+ })), [P]), U = u(() => de(B, z), [z, B]), W = [
872
+ X.root,
873
+ a === "wide" ? X.wide : X.default,
874
+ i ? X.tableOnMobile : "",
875
875
  x
876
- ].filter(Boolean).join(" "), W = F ?? g, te = C && !h && !W && R.length > N, G = B * N + 1, K = Math.min((B + 1) * N, R.length);
876
+ ].filter(Boolean).join(" "), G = F ?? g, ee = C && !h && !G && R.length > N, K = B * N + 1, J = Math.min((B + 1) * N, R.length);
877
877
  return s(() => {
878
878
  A(0);
879
879
  }, [
@@ -884,12 +884,12 @@ var T = {
884
884
  ]), s(() => {
885
885
  k >= z && A(z - 1);
886
886
  }, [z, k]), /* @__PURE__ */ n("section", {
887
- className: U,
887
+ className: W,
888
888
  "aria-busy": h,
889
889
  children: [
890
- !i && !h && !W && V.length > 0 && ee.length > 0 && /* @__PURE__ */ t(ce, {
891
- className: Y.mobileSort,
892
- options: ee,
890
+ !i && !h && !G && V.length > 0 && H.length > 0 && /* @__PURE__ */ t(se, {
891
+ className: X.mobileSort,
892
+ options: H,
893
893
  value: j[0] ? {
894
894
  id: j[0].id,
895
895
  direction: j[0].desc ? "desc" : "asc"
@@ -900,15 +900,15 @@ var T = {
900
900
  }])
901
901
  }),
902
902
  /* @__PURE__ */ t("div", {
903
- className: Y.tableWrap,
903
+ className: X.tableWrap,
904
904
  style: { maxHeight: b },
905
905
  children: /* @__PURE__ */ n("table", {
906
- className: Y.table,
906
+ className: X.table,
907
907
  "aria-label": m,
908
908
  children: [
909
909
  p && /* @__PURE__ */ t("caption", { children: p }),
910
910
  /* @__PURE__ */ t("thead", {
911
- className: y ? Y.sticky : "",
911
+ className: y ? X.sticky : "",
912
912
  children: L.getHeaderGroups().map((e) => /* @__PURE__ */ t("tr", { children: e.headers.map((e) => {
913
913
  let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler();
914
914
  return /* @__PURE__ */ t("th", {
@@ -916,7 +916,7 @@ var T = {
916
916
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
917
917
  children: /* @__PURE__ */ n("button", {
918
918
  type: "button",
919
- className: Y.sortButton,
919
+ className: X.sortButton,
920
920
  disabled: !i,
921
921
  onClick: a,
922
922
  children: [/* @__PURE__ */ t(L.FlexRender, { header: e }), /* @__PURE__ */ t("span", {
@@ -929,17 +929,17 @@ var T = {
929
929
  }),
930
930
  /* @__PURE__ */ t("tbody", { children: h ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
931
931
  colSpan: P.length,
932
- children: /* @__PURE__ */ t(ne, { lines: 3 })
933
- }) }) : W ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
934
- className: Y.state,
932
+ children: /* @__PURE__ */ t(q, { lines: 3 })
933
+ }) }) : G ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
934
+ className: X.state,
935
935
  colSpan: P.length,
936
- children: W
936
+ children: G
937
937
  }) }) : V.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
938
- className: Y.state,
938
+ className: X.state,
939
939
  colSpan: P.length,
940
940
  children: v
941
941
  }) }) : V.map((e) => /* @__PURE__ */ t("tr", {
942
- className: S ? Y.clickableRow : void 0,
942
+ className: S ? X.clickableRow : void 0,
943
943
  onClick: () => S?.(e.original),
944
944
  onKeyDown: (t) => {
945
945
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), S?.(e.original));
@@ -952,14 +952,14 @@ var T = {
952
952
  })
953
953
  }),
954
954
  !i && /* @__PURE__ */ t("div", {
955
- className: Y.cards,
955
+ className: X.cards,
956
956
  role: "list",
957
957
  "aria-label": m ?? p,
958
- children: h ? /* @__PURE__ */ t(ne, { lines: 4 }) : W ? /* @__PURE__ */ t("div", {
959
- className: Y.state,
960
- children: W
958
+ children: h ? /* @__PURE__ */ t(q, { lines: 4 }) : G ? /* @__PURE__ */ t("div", {
959
+ className: X.state,
960
+ children: G
961
961
  }) : V.length === 0 ? /* @__PURE__ */ t("div", {
962
- className: Y.state,
962
+ className: X.state,
963
963
  children: v
964
964
  }) : V.map((e) => {
965
965
  if (l) return /* @__PURE__ */ t("div", {
@@ -969,14 +969,14 @@ var T = {
969
969
  columns: P
970
970
  })
971
971
  }, e.id);
972
- let r = P.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => me(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
972
+ let r = P.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), i = r.find((e) => e.mobile?.primary) ?? r.find((e) => e.mobile?.mobileVariant !== "actions"), a = (t) => pe(t.accessor, e.original), o = (t) => t.mobile?.renderMobile?.(e.original, a(t)) ?? t.cell?.(e.original, a(t)) ?? String(a(t) ?? "");
973
973
  return /* @__PURE__ */ n("article", {
974
974
  role: "listitem",
975
- className: Y.card,
975
+ className: X.card,
976
976
  children: [
977
977
  /* @__PURE__ */ t("h3", { children: i ? o(i) : `Строка ${e.index + 1}` }),
978
978
  /* @__PURE__ */ t("dl", { children: r.filter((e) => e !== i && e.mobile?.mobileVariant !== "actions").map((e) => /* @__PURE__ */ n("div", {
979
- className: e.mobile?.mobileSpan === 2 ? Y.spanTwo : "",
979
+ className: e.mobile?.mobileSpan === 2 ? X.spanTwo : "",
980
980
  children: [/* @__PURE__ */ t("dt", { children: e.mobile?.mobileLabel ?? e.header }), /* @__PURE__ */ t("dd", { children: o(e) })]
981
981
  }, e.id)) }),
982
982
  r.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: o(e) }, e.id))
@@ -984,21 +984,21 @@ var T = {
984
984
  }, e.id);
985
985
  })
986
986
  }),
987
- te && /* @__PURE__ */ n("nav", {
988
- className: Y.pagination,
987
+ ee && /* @__PURE__ */ n("nav", {
988
+ className: X.pagination,
989
989
  "aria-label": "Пагинация таблицы",
990
990
  children: [/* @__PURE__ */ n("span", {
991
- className: Y.paginationRange,
991
+ className: X.paginationRange,
992
992
  "aria-live": "polite",
993
993
  children: [
994
- G,
995
- "–",
996
994
  K,
995
+ "–",
996
+ J,
997
997
  " из ",
998
998
  R.length
999
999
  ]
1000
1000
  }), /* @__PURE__ */ n("div", {
1001
- className: Y.paginationControls,
1001
+ className: X.paginationControls,
1002
1002
  children: [
1003
1003
  /* @__PURE__ */ n(w, {
1004
1004
  variant: "empty",
@@ -1008,22 +1008,22 @@ var T = {
1008
1008
  onClick: () => {
1009
1009
  A((e) => Math.max(0, e - 1));
1010
1010
  },
1011
- children: [/* @__PURE__ */ t(ue, {
1011
+ children: [/* @__PURE__ */ t(le, {
1012
1012
  name: "chevron",
1013
1013
  width: 18,
1014
1014
  height: 18,
1015
- className: Y.previousIcon
1015
+ className: X.previousIcon
1016
1016
  }), /* @__PURE__ */ t("span", {
1017
- className: Y.paginationButtonLabel,
1017
+ className: X.paginationButtonLabel,
1018
1018
  children: "Назад"
1019
1019
  })]
1020
1020
  }),
1021
1021
  /* @__PURE__ */ t("div", {
1022
- className: Y.pageNumbers,
1023
- children: H.map((e) => typeof e == "number" ? /* @__PURE__ */ t(w, {
1022
+ className: X.pageNumbers,
1023
+ children: U.map((e) => typeof e == "number" ? /* @__PURE__ */ t(w, {
1024
1024
  variant: e === B ? "secondary" : "empty",
1025
1025
  size: "md",
1026
- className: Y.pageButton,
1026
+ className: X.pageButton,
1027
1027
  "aria-label": `Перейти на страницу ${e + 1}`,
1028
1028
  "aria-current": e === B ? "page" : void 0,
1029
1029
  onClick: () => {
@@ -1031,7 +1031,7 @@ var T = {
1031
1031
  },
1032
1032
  children: e + 1
1033
1033
  }, e) : /* @__PURE__ */ t("span", {
1034
- className: Y.ellipsis,
1034
+ className: X.ellipsis,
1035
1035
  "aria-hidden": "true",
1036
1036
  children: "…"
1037
1037
  }, e))
@@ -1045,13 +1045,13 @@ var T = {
1045
1045
  A((e) => Math.min(z - 1, e + 1));
1046
1046
  },
1047
1047
  children: [/* @__PURE__ */ t("span", {
1048
- className: Y.paginationButtonLabel,
1048
+ className: X.paginationButtonLabel,
1049
1049
  children: "Вперёд"
1050
- }), /* @__PURE__ */ t(ue, {
1050
+ }), /* @__PURE__ */ t(le, {
1051
1051
  name: "chevron",
1052
1052
  width: 18,
1053
1053
  height: 18,
1054
- className: Y.nextIcon
1054
+ className: X.nextIcon
1055
1055
  })]
1056
1056
  })
1057
1057
  ]
@@ -1059,7 +1059,7 @@ var T = {
1059
1059
  })
1060
1060
  ]
1061
1061
  });
1062
- }, Ce = ({ 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 }) => {
1062
+ }, Se = ({ 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 }) => {
1063
1063
  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;
1064
1064
  s(() => {
1065
1065
  let e = (e) => {
@@ -1076,30 +1076,30 @@ var T = {
1076
1076
  let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
1077
1077
  i?.(n, e.filter((e) => n.includes(e.value))), v && (C(!1), T.current?.focus());
1078
1078
  }, M = (t, n) => {
1079
- let r = J(e, t, n);
1079
+ let r = re(e, t, n);
1080
1080
  E.current[r]?.focus(), E.current[r]?.scrollIntoView({ block: "nearest" });
1081
1081
  };
1082
1082
  return /* @__PURE__ */ n("div", {
1083
1083
  ref: w,
1084
1084
  className: [
1085
- K.wrapper,
1086
- p ? K.errorState : "",
1085
+ J.wrapper,
1086
+ p ? J.errorState : "",
1087
1087
  h
1088
1088
  ].filter(Boolean).join(" "),
1089
1089
  children: [
1090
1090
  l && /* @__PURE__ */ t("label", {
1091
1091
  htmlFor: x,
1092
- className: K.label,
1092
+ className: J.label,
1093
1093
  children: l
1094
1094
  }),
1095
1095
  /* @__PURE__ */ n("div", {
1096
- className: K.container,
1096
+ className: J.container,
1097
1097
  children: [/* @__PURE__ */ n("button", {
1098
1098
  ref: T,
1099
1099
  id: x,
1100
1100
  type: "button",
1101
1101
  name: g,
1102
- className: K.trigger,
1102
+ className: J.trigger,
1103
1103
  disabled: o,
1104
1104
  "aria-haspopup": "listbox",
1105
1105
  "aria-expanded": S,
@@ -1115,16 +1115,16 @@ var T = {
1115
1115
  }
1116
1116
  },
1117
1117
  children: [/* @__PURE__ */ t("span", {
1118
- className: D.length ? K.value : K.placeholder,
1118
+ className: D.length ? J.value : J.placeholder,
1119
1119
  children: O || a
1120
1120
  }), /* @__PURE__ */ t("span", {
1121
- className: `${K.chevron} ${S ? K.chevronOpen : ""}`,
1121
+ className: `${J.chevron} ${S ? J.chevronOpen : ""}`,
1122
1122
  "aria-hidden": "true",
1123
1123
  children: "⌄"
1124
1124
  })]
1125
1125
  }), S && /* @__PURE__ */ t("ul", {
1126
1126
  id: `${x}-listbox`,
1127
- className: K.menu,
1127
+ className: J.menu,
1128
1128
  role: "listbox",
1129
1129
  "aria-label": l,
1130
1130
  "aria-multiselectable": "true",
@@ -1141,7 +1141,7 @@ var T = {
1141
1141
  role: "option",
1142
1142
  "aria-selected": o,
1143
1143
  disabled: i.disabled,
1144
- className: `${K.option} ${o ? K.selected : ""}`,
1144
+ className: `${J.option} ${o ? J.selected : ""}`,
1145
1145
  onClick: () => j(i),
1146
1146
  onKeyDown: (t) => {
1147
1147
  if (t.key === "ArrowDown" || t.key === "ArrowUp") {
@@ -1167,56 +1167,17 @@ var T = {
1167
1167
  }),
1168
1168
  m && !p && /* @__PURE__ */ t("span", {
1169
1169
  id: k,
1170
- className: K.message,
1170
+ className: J.message,
1171
1171
  children: m
1172
1172
  }),
1173
1173
  p && /* @__PURE__ */ t("span", {
1174
1174
  id: A,
1175
- className: K.error,
1175
+ className: J.error,
1176
1176
  children: p
1177
1177
  })
1178
1178
  ]
1179
1179
  });
1180
- }, we = {
1181
- root: "_root_1y2s8_1",
1182
- header: "_header_1y2s8_21",
1183
- title: "_title_1y2s8_41",
1184
- dismiss: "_dismiss_1y2s8_55",
1185
- content: "_content_1y2s8_113"
1186
- }, Te = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
1187
- let u = `ds-info-block-${c()}`;
1188
- return /* @__PURE__ */ n("section", {
1189
- className: `${we.root} ${l}`,
1190
- "aria-labelledby": u,
1191
- children: [/* @__PURE__ */ n("header", {
1192
- className: we.header,
1193
- children: [/* @__PURE__ */ t(s, {
1194
- id: u,
1195
- className: we.title,
1196
- children: e
1197
- }), i && /* @__PURE__ */ t("button", {
1198
- type: "button",
1199
- className: we.dismiss,
1200
- onClick: a,
1201
- "aria-label": o,
1202
- children: /* @__PURE__ */ t("svg", {
1203
- viewBox: "0 0 20 20",
1204
- "aria-hidden": "true",
1205
- children: /* @__PURE__ */ t("path", {
1206
- d: "M5 5L15 15M15 5L5 15",
1207
- fill: "none",
1208
- stroke: "currentColor",
1209
- strokeWidth: "1.8",
1210
- strokeLinecap: "round"
1211
- })
1212
- })
1213
- })]
1214
- }), /* @__PURE__ */ t("div", {
1215
- className: we.content,
1216
- children: r
1217
- })]
1218
- });
1219
- }, X = {
1180
+ }, Ce = {
1220
1181
  wrapper: "_wrapper_kz2dd_1",
1221
1182
  control: "_control_kz2dd_3",
1222
1183
  input: "_input_kz2dd_5",
@@ -1226,12 +1187,12 @@ var T = {
1226
1187
  lg: "_lg_kz2dd_65",
1227
1188
  inputError: "_inputError_kz2dd_77",
1228
1189
  trailingAction: "_trailingAction_kz2dd_79"
1229
- }, 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, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: O, ...k }) => {
1190
+ }, we = ({ 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, size: y = "md", clearable: b = !0, required: x = !1, selectTextOnFocus: S = !1, isPassword: C = !1, passwordVisibleLabel: w = "Скрыть пароль", passwordHiddenLabel: T = "Показать пароль", onFocus: O, ...k }) => {
1230
1191
  let A = c(), j = v ?? `ds-input-${_ ?? A}`, M = d(null), [N, P] = f(!1), F = h ? `${j}-hint` : void 0, I = m ? `${j}-error` : void 0, L = String(e ?? ""), R = [F, I].filter(Boolean).join(" ") || void 0, z = C ? N ? "text" : "password" : i;
1231
1192
  return s(() => {
1232
1193
  C || P(!1);
1233
1194
  }, [C]), /* @__PURE__ */ n("div", {
1234
- className: `${X.wrapper} ${g}`,
1195
+ className: `${Ce.wrapper} ${g}`,
1235
1196
  children: [
1236
1197
  p && /* @__PURE__ */ t(E, {
1237
1198
  htmlFor: j,
@@ -1241,11 +1202,11 @@ var T = {
1241
1202
  }),
1242
1203
  o && u ? /* @__PURE__ */ t("div", {
1243
1204
  id: j,
1244
- className: X.disabledText,
1205
+ className: Ce.disabledText,
1245
1206
  "aria-describedby": R,
1246
1207
  children: L || a
1247
1208
  }) : /* @__PURE__ */ n("div", {
1248
- className: X.control,
1209
+ className: Ce.control,
1249
1210
  children: [
1250
1211
  /* @__PURE__ */ t("input", {
1251
1212
  ref: M,
@@ -1259,7 +1220,7 @@ var T = {
1259
1220
  required: x,
1260
1221
  "aria-invalid": !!m,
1261
1222
  "aria-describedby": R,
1262
- className: `${X.input} ${X[y]} ${m ? X.inputError : ""}`,
1223
+ className: `${Ce.input} ${Ce[y]} ${m ? Ce.inputError : ""}`,
1263
1224
  onChange: (e) => {
1264
1225
  if (i === "number" && !C) {
1265
1226
  let t = e.target.value === "" ? "" : Number(e.target.value);
@@ -1275,7 +1236,7 @@ var T = {
1275
1236
  }),
1276
1237
  C && /* @__PURE__ */ t("button", {
1277
1238
  type: "button",
1278
- className: X.trailingAction,
1239
+ className: Ce.trailingAction,
1279
1240
  disabled: o,
1280
1241
  "aria-label": N ? w : T,
1281
1242
  "aria-pressed": N,
@@ -1296,7 +1257,7 @@ var T = {
1296
1257
  }),
1297
1258
  !C && b && L && !o && !l && /* @__PURE__ */ t("button", {
1298
1259
  type: "button",
1299
- className: X.trailingAction,
1260
+ className: Ce.trailingAction,
1300
1261
  "aria-label": "Очистить поле",
1301
1262
  onClick: () => {
1302
1263
  let e = M.current;
@@ -1317,22 +1278,281 @@ var T = {
1317
1278
  })
1318
1279
  ]
1319
1280
  });
1320
- }, De = {
1281
+ }, Te = (e, t) => {
1282
+ let n = t.trim().toLocaleLowerCase();
1283
+ return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
1284
+ }, Ee = (e, t, n) => {
1285
+ if (!e.length) return -1;
1286
+ for (let r = 0; r < e.length; r += 1) {
1287
+ let i = (t + r * n + e.length) % e.length;
1288
+ if (!e[i]?.disabled) return i;
1289
+ }
1290
+ return -1;
1291
+ }, Z = {
1292
+ wrapper: "_wrapper_bwlwb_1",
1293
+ control: "_control_bwlwb_3",
1294
+ inputHost: "_inputHost_bwlwb_5",
1295
+ sm: "_sm_bwlwb_13",
1296
+ md: "_md_bwlwb_18",
1297
+ lg: "_lg_bwlwb_22",
1298
+ errorState: "_errorState_bwlwb_29",
1299
+ disabledText: "_disabledText_bwlwb_33",
1300
+ chevron: "_chevron_bwlwb_53",
1301
+ chevronOpen: "_chevronOpen_bwlwb_65",
1302
+ menu: "_menu_bwlwb_67",
1303
+ option: "_option_bwlwb_81",
1304
+ empty: "_empty_bwlwb_81",
1305
+ selected: "_selected_bwlwb_103",
1306
+ active: "_active_bwlwb_103",
1307
+ visuallyHidden: "_visuallyHidden_bwlwb_109"
1308
+ }, De = 8, Oe = 6, ke = 5, Ae = {
1309
+ sm: 20,
1310
+ md: 30,
1311
+ lg: 40
1312
+ }, je = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: m = "Ничего не найдено", disabled: h = !1, readOnly: g = !1, stringWhileDisabled: _ = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: O = !0 }) => {
1313
+ let k = c(), A = T ?? `ds-search-dropdown-${w ?? k}`, j = `${A}-listbox`, M = `${A}-status`, N = b ? `${A}-hint` : void 0, P = y ? `${A}-error` : void 0, F = [
1314
+ M,
1315
+ N,
1316
+ P
1317
+ ].filter(Boolean).join(" "), I = d(null), L = d(null), R = d([]), [z, B] = f(!1), [V, H] = f(""), [U, W] = f(-1), [G, ee] = f(null), K = u(() => e.find((e) => e.value === r), [e, r]), q = u(() => Te(e, V), [e, V]), J = h && _, Y = U >= 0 ? q[U] : void 0;
1318
+ s(() => H(K?.label ?? ""), [K?.label, r]);
1319
+ let te = o(() => I.current?.querySelector("input") ?? null, []), ne = o((e, t) => Ee(q, e, t), [q]), re = o((e) => {
1320
+ W(e), !(e < 0) && requestAnimationFrame(() => R.current[e]?.scrollIntoView({ block: "nearest" }));
1321
+ }, []), ie = o(() => {
1322
+ let e = te();
1323
+ if (!e) return;
1324
+ let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(q.length, ke)) * Ae[x] + 2, r = window.innerHeight - t.bottom - De, i = t.top - De, a = r < n && i > r, o = a ? i : r, s = Math.max(Ae[x] + 2, Math.min(n, o)), c = window.innerWidth - t.width - De, l = Math.max(De, Math.min(t.left, c)), u = a ? Math.max(De, t.top - s - Oe) : t.bottom + Oe;
1325
+ ee({
1326
+ top: u,
1327
+ left: l,
1328
+ width: t.width,
1329
+ maxHeight: s
1330
+ });
1331
+ }, [
1332
+ q.length,
1333
+ te,
1334
+ x
1335
+ ]);
1336
+ l(() => {
1337
+ if (!z) {
1338
+ ee(null);
1339
+ return;
1340
+ }
1341
+ return ie(), window.addEventListener("resize", ie), window.addEventListener("scroll", ie, !0), () => {
1342
+ window.removeEventListener("resize", ie), window.removeEventListener("scroll", ie, !0);
1343
+ };
1344
+ }, [z, ie]), s(() => {
1345
+ if (!z) return;
1346
+ let e = (e) => {
1347
+ let t = e.target;
1348
+ !I.current?.contains(t) && !L.current?.contains(t) && (B(!1), W(-1));
1349
+ };
1350
+ return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
1351
+ }, [z]);
1352
+ let ae = () => {
1353
+ h || g || (B(!0), W(ne(0, 1)));
1354
+ }, oe = (e) => {
1355
+ e.disabled || (H(e.label), B(!1), W(-1), i?.(e.value, e), te()?.focus());
1356
+ }, se = z ? /* @__PURE__ */ t("ul", {
1357
+ ref: L,
1358
+ id: j,
1359
+ className: Z.menu,
1360
+ role: "listbox",
1361
+ "aria-label": v,
1362
+ style: G ? {
1363
+ top: G.top,
1364
+ left: G.left,
1365
+ width: G.width,
1366
+ maxHeight: G.maxHeight
1367
+ } : {
1368
+ top: 0,
1369
+ left: 0,
1370
+ visibility: "hidden",
1371
+ maxHeight: 0
1372
+ },
1373
+ children: q.length === 0 ? /* @__PURE__ */ t("li", {
1374
+ className: `${Z.empty} ${Z[x]}`,
1375
+ children: m
1376
+ }) : q.map((e, i) => {
1377
+ let a = e.value === r, o = i === U;
1378
+ return /* @__PURE__ */ t("li", {
1379
+ role: "presentation",
1380
+ children: /* @__PURE__ */ n("button", {
1381
+ ref: (e) => {
1382
+ R.current[i] = e;
1383
+ },
1384
+ id: `${A}-option-${i}`,
1385
+ type: "button",
1386
+ role: "option",
1387
+ tabIndex: -1,
1388
+ disabled: e.disabled,
1389
+ "aria-disabled": e.disabled,
1390
+ "aria-selected": a,
1391
+ className: [
1392
+ Z.option,
1393
+ Z[x],
1394
+ a ? Z.selected : "",
1395
+ o ? Z.active : ""
1396
+ ].filter(Boolean).join(" "),
1397
+ onPointerMove: () => {
1398
+ e.disabled || W(i);
1399
+ },
1400
+ onClick: () => oe(e),
1401
+ children: [/* @__PURE__ */ t("span", { children: e.label }), a && O && /* @__PURE__ */ t("span", {
1402
+ "aria-hidden": "true",
1403
+ children: "✓"
1404
+ })]
1405
+ })
1406
+ }, e.value);
1407
+ })
1408
+ }) : null;
1409
+ return /* @__PURE__ */ n("div", {
1410
+ ref: I,
1411
+ className: [
1412
+ Z.wrapper,
1413
+ y ? Z.errorState : "",
1414
+ C
1415
+ ].filter(Boolean).join(" "),
1416
+ children: [
1417
+ v && /* @__PURE__ */ t(E, {
1418
+ htmlFor: J ? void 0 : A,
1419
+ required: S,
1420
+ disabled: h,
1421
+ children: v
1422
+ }),
1423
+ J ? /* @__PURE__ */ t("div", {
1424
+ className: `${Z.disabledText} ${Z[x]}`,
1425
+ children: K?.label ?? a
1426
+ }) : /* @__PURE__ */ n("div", {
1427
+ className: Z.control,
1428
+ children: [/* @__PURE__ */ t(we, {
1429
+ id: A,
1430
+ name: w,
1431
+ value: V,
1432
+ placeholder: a,
1433
+ disabled: h,
1434
+ readOnly: g,
1435
+ required: S,
1436
+ size: x,
1437
+ clearable: !1,
1438
+ autoComplete: "off",
1439
+ className: `${Z.inputHost} ${Z[x]}`,
1440
+ onFocus: ae,
1441
+ onChange: (t) => {
1442
+ let n = String(t), r = Te(e, n);
1443
+ H(n), B(!0), W(Ee(r, 0, 1));
1444
+ },
1445
+ role: "combobox",
1446
+ "aria-autocomplete": "list",
1447
+ "aria-expanded": z,
1448
+ "aria-controls": j,
1449
+ "aria-activedescendant": Y ? `${A}-option-${U}` : void 0,
1450
+ "aria-invalid": !!y,
1451
+ "aria-describedby": F,
1452
+ onClick: ae,
1453
+ onKeyDown: (e) => {
1454
+ if (!(h || g)) {
1455
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
1456
+ e.preventDefault();
1457
+ let t = e.key === "ArrowDown" ? 1 : -1, n = U >= 0 ? U + t : t === 1 ? 0 : q.length - 1;
1458
+ B(!0), re(ne(n, t));
1459
+ } else if (e.key === "Home" || e.key === "End") {
1460
+ if (!z) return;
1461
+ e.preventDefault();
1462
+ let t = e.key === "Home" ? 1 : -1;
1463
+ re(ne(e.key === "Home" ? 0 : q.length - 1, t));
1464
+ } else e.key === "Enter" && z && Y ? (e.preventDefault(), oe(Y)) : e.key === "Escape" && z ? (e.preventDefault(), B(!1), W(-1)) : e.key === "Tab" && (B(!1), W(-1));
1465
+ }
1466
+ }
1467
+ }), /* @__PURE__ */ t("span", {
1468
+ className: `${Z.chevron} ${z ? Z.chevronOpen : ""}`,
1469
+ "aria-hidden": "true",
1470
+ children: /* @__PURE__ */ t("svg", {
1471
+ viewBox: "0 0 20 20",
1472
+ fill: "none",
1473
+ children: /* @__PURE__ */ t("path", {
1474
+ d: "M5 7.5L10 12.5L15 7.5",
1475
+ stroke: "currentColor",
1476
+ strokeWidth: "1.8",
1477
+ strokeLinecap: "round",
1478
+ strokeLinejoin: "round"
1479
+ })
1480
+ })
1481
+ })]
1482
+ }),
1483
+ z && typeof document < "u" && p(se, document.body),
1484
+ /* @__PURE__ */ n("span", {
1485
+ id: M,
1486
+ className: Z.visuallyHidden,
1487
+ "aria-live": "polite",
1488
+ children: ["Найдено вариантов: ", q.length]
1489
+ }),
1490
+ b && !y && /* @__PURE__ */ t(D, {
1491
+ id: N,
1492
+ children: b
1493
+ }),
1494
+ y && /* @__PURE__ */ t(D, {
1495
+ id: P,
1496
+ variant: "error",
1497
+ children: y
1498
+ })
1499
+ ]
1500
+ });
1501
+ }, Me = {
1502
+ root: "_root_1y2s8_1",
1503
+ header: "_header_1y2s8_21",
1504
+ title: "_title_1y2s8_41",
1505
+ dismiss: "_dismiss_1y2s8_55",
1506
+ content: "_content_1y2s8_113"
1507
+ }, Ne = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: l = "" }) => {
1508
+ let u = `ds-info-block-${c()}`;
1509
+ return /* @__PURE__ */ n("section", {
1510
+ className: `${Me.root} ${l}`,
1511
+ "aria-labelledby": u,
1512
+ children: [/* @__PURE__ */ n("header", {
1513
+ className: Me.header,
1514
+ children: [/* @__PURE__ */ t(s, {
1515
+ id: u,
1516
+ className: Me.title,
1517
+ children: e
1518
+ }), i && /* @__PURE__ */ t("button", {
1519
+ type: "button",
1520
+ className: Me.dismiss,
1521
+ onClick: a,
1522
+ "aria-label": o,
1523
+ children: /* @__PURE__ */ t("svg", {
1524
+ viewBox: "0 0 20 20",
1525
+ "aria-hidden": "true",
1526
+ children: /* @__PURE__ */ t("path", {
1527
+ d: "M5 5L15 15M15 5L5 15",
1528
+ fill: "none",
1529
+ stroke: "currentColor",
1530
+ strokeWidth: "1.8",
1531
+ strokeLinecap: "round"
1532
+ })
1533
+ })
1534
+ })]
1535
+ }), /* @__PURE__ */ t("div", {
1536
+ className: Me.content,
1537
+ children: r
1538
+ })]
1539
+ });
1540
+ }, Pe = {
1321
1541
  wrapper: "_wrapper_vu1ob_1",
1322
1542
  input: "_input_vu1ob_21",
1323
1543
  switch: "_switch_vu1ob_35",
1324
1544
  thumb: "_thumb_vu1ob_67",
1325
1545
  label: "_label_vu1ob_111",
1326
1546
  disabled: "_disabled_vu1ob_123"
1327
- }, Oe = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1547
+ }, Fe = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: l, id: u, value: d }) => {
1328
1548
  let f = c(), p = u ?? `ds-radio-button-${l ?? f}`;
1329
1549
  return /* @__PURE__ */ n("label", {
1330
1550
  htmlFor: p,
1331
- className: `${De.wrapper} ${a ? De.disabled : ""} ${s}`,
1551
+ className: `${Pe.wrapper} ${a ? Pe.disabled : ""} ${s}`,
1332
1552
  children: [
1333
1553
  /* @__PURE__ */ t("input", {
1334
1554
  id: p,
1335
- className: De.input,
1555
+ className: Pe.input,
1336
1556
  type: "checkbox",
1337
1557
  role: "switch",
1338
1558
  name: l,
@@ -1345,21 +1565,21 @@ var T = {
1345
1565
  }
1346
1566
  }),
1347
1567
  /* @__PURE__ */ t("span", {
1348
- className: De.switch,
1568
+ className: Pe.switch,
1349
1569
  "aria-hidden": "true",
1350
- children: /* @__PURE__ */ t("span", { className: De.thumb })
1570
+ children: /* @__PURE__ */ t("span", { className: Pe.thumb })
1351
1571
  }),
1352
1572
  i && /* @__PURE__ */ t("span", {
1353
- className: De.label,
1573
+ className: Pe.label,
1354
1574
  children: i
1355
1575
  })
1356
1576
  ]
1357
1577
  });
1358
- }, ke = {
1578
+ }, Ie = {
1359
1579
  root: "_root_kepgo_1",
1360
1580
  grid: "_grid_kepgo_3",
1361
1581
  actions: "_actions_kepgo_5"
1362
- }, Ae = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1582
+ }, Le = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
1363
1583
  let d = (e, t) => {
1364
1584
  let n = {
1365
1585
  ...r,
@@ -1368,11 +1588,11 @@ var T = {
1368
1588
  i?.(n, e), s === "instant" && a?.(n);
1369
1589
  };
1370
1590
  return /* @__PURE__ */ n("section", {
1371
- className: `${ke.root} ${u}`,
1591
+ className: `${Ie.root} ${u}`,
1372
1592
  "aria-label": "Фильтры",
1373
1593
  "aria-busy": c,
1374
1594
  children: [/* @__PURE__ */ t("div", {
1375
- className: ke.grid,
1595
+ className: Ie.grid,
1376
1596
  children: e.filter((e) => !e.hidden).map((e) => {
1377
1597
  let n = l || c || e.disabled, i = r[e.id];
1378
1598
  if (e.type === "input") {
@@ -1382,19 +1602,19 @@ var T = {
1382
1602
  placeholder: e.placeholder,
1383
1603
  disabled: n
1384
1604
  };
1385
- return e.inputType === "number" ? /* @__PURE__ */ t(Ee, {
1605
+ return e.inputType === "number" ? /* @__PURE__ */ t(we, {
1386
1606
  ...r,
1387
1607
  type: "number",
1388
1608
  value: i ?? "",
1389
1609
  onChange: (t) => d(e.id, t)
1390
- }, e.id) : /* @__PURE__ */ t(Ee, {
1610
+ }, e.id) : /* @__PURE__ */ t(we, {
1391
1611
  ...r,
1392
1612
  type: "text",
1393
1613
  value: String(i ?? ""),
1394
1614
  onChange: (t) => d(e.id, t)
1395
1615
  }, e.id);
1396
1616
  }
1397
- if (e.type === "dropdown") return /* @__PURE__ */ t(oe, {
1617
+ if (e.type === "dropdown") return /* @__PURE__ */ t(ae, {
1398
1618
  label: e.label,
1399
1619
  hint: e.hint,
1400
1620
  placeholder: e.placeholder,
@@ -1403,7 +1623,7 @@ var T = {
1403
1623
  disabled: n,
1404
1624
  onChange: (t) => d(e.id, t)
1405
1625
  }, e.id);
1406
- if (e.type === "multiple") return /* @__PURE__ */ t(Ce, {
1626
+ if (e.type === "multiple") return /* @__PURE__ */ t(Se, {
1407
1627
  label: e.label,
1408
1628
  hint: e.hint,
1409
1629
  placeholder: e.placeholder,
@@ -1419,7 +1639,7 @@ var T = {
1419
1639
  disabled: n,
1420
1640
  onChange: (t) => d(e.id, t)
1421
1641
  }, e.id);
1422
- if (e.type === "radio") return /* @__PURE__ */ t(Oe, {
1642
+ if (e.type === "radio") return /* @__PURE__ */ t(Fe, {
1423
1643
  label: e.label,
1424
1644
  checked: !!i,
1425
1645
  disabled: n,
@@ -1429,7 +1649,7 @@ var T = {
1429
1649
  from: null,
1430
1650
  to: null
1431
1651
  };
1432
- return /* @__PURE__ */ t(te, {
1652
+ return /* @__PURE__ */ t(ee, {
1433
1653
  hint: e.hint,
1434
1654
  mode: e.mode,
1435
1655
  min: e.min,
@@ -1440,7 +1660,7 @@ var T = {
1440
1660
  }, e.id);
1441
1661
  })
1442
1662
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
1443
- className: ke.actions,
1663
+ className: Ie.actions,
1444
1664
  children: [o && /* @__PURE__ */ t(w, {
1445
1665
  variant: "destructiveOutline",
1446
1666
  disabled: l || c,
@@ -1454,7 +1674,7 @@ var T = {
1454
1674
  })]
1455
1675
  })]
1456
1676
  });
1457
- }, Z = {
1677
+ }, Q = {
1458
1678
  wrapper: "_wrapper_1ymdr_1",
1459
1679
  dropzone: "_dropzone_1ymdr_3",
1460
1680
  dragActive: "_dragActive_1ymdr_5",
@@ -1468,12 +1688,12 @@ var T = {
1468
1688
  file: "_file_1ymdr_19",
1469
1689
  fileName: "_fileName_1ymdr_23",
1470
1690
  fileSize: "_fileSize_1ymdr_25"
1471
- }, je = (e) => `${e.name}:${e.size}:${e.lastModified}`, Me = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Ne = (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), Pe = ({ 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 }) => {
1691
+ }, Re = (e) => `${e.name}:${e.size}:${e.lastModified}`, ze = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, Be = (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), Ve = ({ 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 }) => {
1472
1692
  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 && !_, R = (e) => {
1473
- let t = [], n = new Set(r.map(je)), c = e.filter((e) => Ne(e, o) ? s !== void 0 && e.size > s ? (t.push({
1693
+ let t = [], n = new Set(r.map(Re)), c = e.filter((e) => Be(e, o) ? s !== void 0 && e.size > s ? (t.push({
1474
1694
  file: e,
1475
1695
  reason: "maxSize"
1476
- }), !1) : !n.has(je(e)) && (n.add(je(e)), !0) : (t.push({
1696
+ }), !1) : !n.has(Re(e)) && (n.add(Re(e)), !0) : (t.push({
1477
1697
  file: e,
1478
1698
  reason: "accept"
1479
1699
  }), !1)), u = a ? l : 1, d = a ? [...r, ...c] : c.slice(-1);
@@ -1483,7 +1703,7 @@ var T = {
1483
1703
  })), d = d.slice(0, u)), t.length && T?.(t), c.length && i?.(d), A.current && (A.current.value = "");
1484
1704
  };
1485
1705
  return /* @__PURE__ */ n("div", {
1486
- className: `${Z.wrapper} ${b}`,
1706
+ className: `${Q.wrapper} ${b}`,
1487
1707
  children: [
1488
1708
  u && /* @__PURE__ */ t(E, {
1489
1709
  htmlFor: k,
@@ -1492,7 +1712,7 @@ var T = {
1492
1712
  children: u
1493
1713
  }),
1494
1714
  /* @__PURE__ */ n("div", {
1495
- className: `${Z.dropzone} ${M ? Z.dragActive : ""} ${g ? Z.disabled : ""} ${m ? Z.error : ""}`,
1715
+ className: `${Q.dropzone} ${M ? Q.dragActive : ""} ${g ? Q.disabled : ""} ${m ? Q.error : ""}`,
1496
1716
  onDragEnter: (e) => {
1497
1717
  e.preventDefault(), L && ++j.current === 1 && N(!0);
1498
1718
  },
@@ -1507,7 +1727,7 @@ var T = {
1507
1727
  ref: A,
1508
1728
  id: k,
1509
1729
  name: v,
1510
- className: Z.nativeInput,
1730
+ className: Q.nativeInput,
1511
1731
  type: "file",
1512
1732
  multiple: a,
1513
1733
  accept: o,
@@ -1518,19 +1738,19 @@ var T = {
1518
1738
  onChange: (e) => R(Array.from(e.target.files ?? []))
1519
1739
  }), r.length ? /* @__PURE__ */ n(e, { children: [
1520
1740
  /* @__PURE__ */ t("ul", {
1521
- className: Z.files,
1741
+ className: Q.files,
1522
1742
  "aria-live": "polite",
1523
1743
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
1524
- className: Z.file,
1744
+ className: Q.file,
1525
1745
  children: [
1526
1746
  /* @__PURE__ */ t("span", {
1527
- className: Z.fileName,
1747
+ className: Q.fileName,
1528
1748
  title: e.name,
1529
1749
  children: e.name
1530
1750
  }),
1531
1751
  /* @__PURE__ */ t("span", {
1532
- className: Z.fileSize,
1533
- children: Me(e.size)
1752
+ className: Q.fileSize,
1753
+ children: ze(e.size)
1534
1754
  }),
1535
1755
  L && /* @__PURE__ */ t(w, {
1536
1756
  variant: "empty",
@@ -1540,31 +1760,31 @@ var T = {
1540
1760
  children: "×"
1541
1761
  })
1542
1762
  ]
1543
- }, je(e)))
1763
+ }, Re(e)))
1544
1764
  }),
1545
1765
  L && (a || r.length === 0) && /* @__PURE__ */ t(w, {
1546
- className: Z.browseButton,
1766
+ className: Q.browseButton,
1547
1767
  size: "sm",
1548
1768
  onClick: () => A.current?.click(),
1549
1769
  children: C
1550
1770
  }),
1551
1771
  L && !a && /* @__PURE__ */ t(w, {
1552
- className: Z.browseButton,
1772
+ className: Q.browseButton,
1553
1773
  size: "sm",
1554
1774
  onClick: () => A.current?.click(),
1555
1775
  children: S
1556
1776
  })
1557
1777
  ] }) : /* @__PURE__ */ n("div", {
1558
- className: Z.empty,
1778
+ className: Q.empty,
1559
1779
  children: [
1560
1780
  /* @__PURE__ */ t("span", {
1561
- className: Z.uploadIcon,
1781
+ className: Q.uploadIcon,
1562
1782
  "aria-hidden": "true",
1563
1783
  children: "↑"
1564
1784
  }),
1565
1785
  /* @__PURE__ */ t("strong", { children: M ? "Отпустите файлы здесь" : x }),
1566
1786
  !M && L && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", { children: "или" }), /* @__PURE__ */ t(w, {
1567
- className: Z.browseButton,
1787
+ className: Q.browseButton,
1568
1788
  onClick: () => A.current?.click(),
1569
1789
  children: S
1570
1790
  })] })
@@ -1583,11 +1803,11 @@ var T = {
1583
1803
  })
1584
1804
  ]
1585
1805
  });
1586
- }, Fe = 0, Q = v((e) => ({
1806
+ }, He = 0, $ = v((e) => ({
1587
1807
  modals: [],
1588
1808
  openModal: (t, n = {}, r = {}) => {
1589
- Fe += 1;
1590
- let i = `ds-modal-${Fe}`;
1809
+ He += 1;
1810
+ let i = `ds-modal-${He}`;
1591
1811
  return e((e) => ({ modals: [...e.modals, {
1592
1812
  id: i,
1593
1813
  name: t,
@@ -1599,7 +1819,7 @@ var T = {
1599
1819
  closeModal: (t) => e((e) => ({ modals: e.modals.filter((e) => e.id !== t) })),
1600
1820
  closeTopModal: () => e((e) => ({ modals: e.modals.slice(0, -1) })),
1601
1821
  closeAllModals: () => e({ modals: [] })
1602
- })), Ie = () => Q.setState({ modals: [] }), Le = {
1822
+ })), Ue = () => $.setState({ modals: [] }), We = {
1603
1823
  layer: "_layer_rnqi6_1",
1604
1824
  backdrop: "_backdrop_rnqi6_3",
1605
1825
  panel: "_panel_rnqi6_5",
@@ -1607,14 +1827,14 @@ var T = {
1607
1827
  title: "_title_rnqi6_11",
1608
1828
  description: "_description_rnqi6_13",
1609
1829
  content: "_content_rnqi6_15"
1610
- }, Re = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ze = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
1611
- let f = c(), p = c(), m = d(null), h = Q((e) => e.closeModal);
1830
+ }, Ge = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Ke = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: l = "", role: u = "dialog" }) => {
1831
+ let f = c(), p = c(), m = d(null), h = $((e) => e.closeModal);
1612
1832
  return s(() => {
1613
1833
  let e = document.activeElement, t = m.current;
1614
- return (t?.querySelector(Re) ?? t)?.focus(), () => e?.focus();
1834
+ return (t?.querySelector(Ge) ?? t)?.focus(), () => e?.focus();
1615
1835
  }, []), /* @__PURE__ */ n("div", {
1616
1836
  ref: m,
1617
- className: `${Le.panel} ${l}`,
1837
+ className: `${We.panel} ${l}`,
1618
1838
  role: u,
1619
1839
  "aria-modal": "true",
1620
1840
  "aria-labelledby": r ? f : void 0,
@@ -1622,7 +1842,7 @@ var T = {
1622
1842
  tabIndex: -1,
1623
1843
  onKeyDown: (e) => {
1624
1844
  if (e.key !== "Tab") return;
1625
- let t = Array.from(m.current?.querySelectorAll(Re) ?? []);
1845
+ let t = Array.from(m.current?.querySelectorAll(Ge) ?? []);
1626
1846
  if (!t.length) {
1627
1847
  e.preventDefault();
1628
1848
  return;
@@ -1632,10 +1852,10 @@ var T = {
1632
1852
  },
1633
1853
  children: [
1634
1854
  (r || o) && /* @__PURE__ */ n("header", {
1635
- className: Le.header,
1855
+ className: We.header,
1636
1856
  children: [r && /* @__PURE__ */ t("h2", {
1637
1857
  id: f,
1638
- className: Le.title,
1858
+ className: We.title,
1639
1859
  children: r
1640
1860
  }), /* @__PURE__ */ t(w, {
1641
1861
  variant: "empty",
@@ -1658,31 +1878,31 @@ var T = {
1658
1878
  }),
1659
1879
  i && /* @__PURE__ */ t("p", {
1660
1880
  id: p,
1661
- className: Le.description,
1881
+ className: We.description,
1662
1882
  children: i
1663
1883
  }),
1664
1884
  /* @__PURE__ */ t("div", {
1665
- className: Le.content,
1885
+ className: We.content,
1666
1886
  children: e
1667
1887
  })
1668
1888
  ]
1669
1889
  });
1670
- }, Be = ({ registry: e }) => {
1671
- let n = Q((e) => e.modals), r = Q((e) => e.closeModal), i = Q((e) => e.closeAllModals);
1890
+ }, qe = ({ registry: e }) => {
1891
+ let n = $((e) => e.modals), r = $((e) => e.closeModal), i = $((e) => e.closeAllModals);
1672
1892
  return s(() => {
1673
1893
  let e = (e) => {
1674
1894
  if (e.key !== "Escape") return;
1675
- let t = Q.getState().modals.at(-1);
1895
+ let t = $.getState().modals.at(-1);
1676
1896
  t?.closeOnEscape && r(t.id);
1677
1897
  };
1678
1898
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1679
1899
  }, [r]), !n.length || typeof document > "u" ? null : p(/* @__PURE__ */ t("div", {
1680
- className: Le.layer,
1900
+ className: We.layer,
1681
1901
  "aria-label": "Модальные окна",
1682
1902
  children: n.map((a, o) => {
1683
1903
  let s = e[a.name];
1684
1904
  return s ? /* @__PURE__ */ t("div", {
1685
- className: Le.backdrop,
1905
+ className: We.backdrop,
1686
1906
  "aria-hidden": o !== n.length - 1 || void 0,
1687
1907
  onMouseDown: (e) => {
1688
1908
  e.target === e.currentTarget && a.closeOnBackdrop && r(a.id);
@@ -1696,31 +1916,31 @@ var T = {
1696
1916
  }, a.id) : null;
1697
1917
  })
1698
1918
  }), document.body);
1699
- }, Ve = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1700
- let o = Q((e) => e.modals.length);
1919
+ }, Je = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
1920
+ let o = $((e) => e.modals.length);
1701
1921
  return s(() => {
1702
1922
  if (!a || o === 0) return;
1703
1923
  let e = document.body.style.overflow;
1704
1924
  return document.body.style.overflow = "hidden", () => {
1705
1925
  document.body.style.overflow = e;
1706
1926
  };
1707
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Be, { registry: r })] });
1708
- }, He = (e) => e, Ue = {
1927
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(qe, { registry: r })] });
1928
+ }, Ye = (e) => e, Xe = {
1709
1929
  message: "_message_1vtru_1",
1710
1930
  actions: "_actions_1vtru_3"
1711
- }, We = /* @__PURE__ */ new Map(), Ge = 0, Ke = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1931
+ }, Ze = /* @__PURE__ */ new Map(), Qe = 0, $e = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
1712
1932
  let u = (e) => {
1713
- We.get(l)?.(e), We.delete(l), r();
1933
+ Ze.get(l)?.(e), Ze.delete(l), r();
1714
1934
  };
1715
- return /* @__PURE__ */ n(ze, {
1935
+ return /* @__PURE__ */ n(Ke, {
1716
1936
  modalId: e,
1717
1937
  title: i,
1718
1938
  role: "alertdialog",
1719
1939
  children: [/* @__PURE__ */ t("p", {
1720
- className: Ue.message,
1940
+ className: Xe.message,
1721
1941
  children: a
1722
1942
  }), /* @__PURE__ */ n("div", {
1723
- className: Ue.actions,
1943
+ className: Xe.actions,
1724
1944
  children: [/* @__PURE__ */ t(w, {
1725
1945
  variant: "outline",
1726
1946
  onClick: () => u(!1),
@@ -1732,55 +1952,55 @@ var T = {
1732
1952
  })]
1733
1953
  })]
1734
1954
  });
1735
- }, qe = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(ze, {
1955
+ }, et = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(Ke, {
1736
1956
  modalId: e,
1737
1957
  title: i,
1738
1958
  role: "alertdialog",
1739
1959
  children: [/* @__PURE__ */ t("p", {
1740
- className: Ue.message,
1960
+ className: Xe.message,
1741
1961
  children: a
1742
1962
  }), /* @__PURE__ */ t("div", {
1743
- className: Ue.actions,
1963
+ className: Xe.actions,
1744
1964
  children: /* @__PURE__ */ t(w, {
1745
1965
  onClick: r,
1746
1966
  children: o
1747
1967
  })
1748
1968
  })]
1749
- }), Je = He({
1750
- ConfirmModal: Ke,
1751
- ErrorModal: qe
1752
- }), Ye = () => {
1753
- let e = Q((e) => e.openModal);
1969
+ }), tt = Ye({
1970
+ ConfirmModal: $e,
1971
+ ErrorModal: et
1972
+ }), nt = () => {
1973
+ let e = $((e) => e.openModal);
1754
1974
  return (t = {}) => new Promise((n) => {
1755
- Ge += 1;
1756
- let r = `confirm-${Ge}`;
1757
- We.set(r, n), e("ConfirmModal", {
1975
+ Qe += 1;
1976
+ let r = `confirm-${Qe}`;
1977
+ Ze.set(r, n), e("ConfirmModal", {
1758
1978
  ...t,
1759
1979
  requestId: r
1760
1980
  }, { closeOnEscape: !1 });
1761
1981
  });
1762
- }, Xe = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Ze = () => {
1763
- let e = Q((e) => e.openModal);
1982
+ }, rt = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", it = () => {
1983
+ let e = $((e) => e.openModal);
1764
1984
  return { showError: (t, n) => e("ErrorModal", {
1765
1985
  title: n,
1766
- message: Xe(t)
1986
+ message: rt(t)
1767
1987
  }) };
1768
- }, Qe = v(() => ({})), $e = v(() => ({})), et = () => {
1769
- let e = Q((e) => e.modals), t = Q((e) => e.openModal);
1988
+ }, at = v(() => ({})), ot = v(() => ({})), st = () => {
1989
+ let e = $((e) => e.modals), t = $((e) => e.openModal);
1770
1990
  return {
1771
1991
  openModal: (e, n = {}, r) => t(e, n, r),
1772
- closeModal: Q((e) => e.closeModal),
1773
- closeTopModal: Q((e) => e.closeTopModal),
1774
- closeAllModals: Q((e) => e.closeAllModals),
1992
+ closeModal: $((e) => e.closeModal),
1993
+ closeTopModal: $((e) => e.closeTopModal),
1994
+ closeAllModals: $((e) => e.closeAllModals),
1775
1995
  isOpen: (t) => e.some((e) => e.name === t),
1776
1996
  count: e.length
1777
1997
  };
1778
- }, tt = { root: "_root_fvxpr_1" }, nt = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1779
- className: `${tt.root} ${r}`,
1998
+ }, ct = { root: "_root_fvxpr_1" }, lt = ({ label: e = "Загрузка страницы", className: r = "" }) => /* @__PURE__ */ n("div", {
1999
+ className: `${ct.root} ${r}`,
1780
2000
  role: "status",
1781
2001
  "aria-label": e,
1782
2002
  children: [/* @__PURE__ */ t(S, { decorative: !0 }), /* @__PURE__ */ t("span", { children: e })]
1783
- }), rt = {
2003
+ }), ut = {
1784
2004
  viewport: "_viewport_15mi5_1",
1785
2005
  "top-right": "_top-right_15mi5_3",
1786
2006
  "top-left": "_top-left_15mi5_5",
@@ -1793,7 +2013,7 @@ var T = {
1793
2013
  success: "_success_15mi5_19",
1794
2014
  warning: "_warning_15mi5_21",
1795
2015
  error: "_error_15mi5_23"
1796
- }, it = (e) => {
2016
+ }, dt = (e) => {
1797
2017
  let r;
1798
2018
  return r = e === "info" ? /* @__PURE__ */ n("svg", {
1799
2019
  xmlns: "http://www.w3.org/2000/svg",
@@ -1879,7 +2099,7 @@ var T = {
1879
2099
  /* @__PURE__ */ t("path", { d: "m9 9 6 6" })
1880
2100
  ]
1881
2101
  }), r;
1882
- }, at = ({ toast: e, onClose: r }) => {
2102
+ }, ft = ({ toast: e, onClose: r }) => {
1883
2103
  let [i, a] = f(!1), o = d(e.duration), c = d(Date.now());
1884
2104
  return s(() => {
1885
2105
  if (i || e.duration <= 0) return;
@@ -1894,7 +2114,7 @@ var T = {
1894
2114
  e.duration,
1895
2115
  e.id
1896
2116
  ]), /* @__PURE__ */ n("article", {
1897
- className: `${rt.toast} ${rt[e.variant]}`,
2117
+ className: `${ut.toast} ${ut[e.variant]}`,
1898
2118
  role: e.variant === "error" ? "alert" : "status",
1899
2119
  "aria-live": e.variant === "error" ? "assertive" : "polite",
1900
2120
  onMouseEnter: () => a(!0),
@@ -1902,9 +2122,9 @@ var T = {
1902
2122
  onFocus: () => a(!0),
1903
2123
  onBlur: () => a(!1),
1904
2124
  children: [
1905
- /* @__PURE__ */ t("div", { children: it(e.variant) }),
2125
+ /* @__PURE__ */ t("div", { children: dt(e.variant) }),
1906
2126
  /* @__PURE__ */ n("div", {
1907
- className: rt.body,
2127
+ className: ut.body,
1908
2128
  children: [
1909
2129
  e.title && /* @__PURE__ */ t("strong", { children: e.title }),
1910
2130
  /* @__PURE__ */ t("div", { children: e.message }),
@@ -1938,11 +2158,11 @@ var T = {
1938
2158
  })
1939
2159
  ]
1940
2160
  });
1941
- }, ot = 0, st = v((e) => ({
2161
+ }, pt = 0, mt = v((e) => ({
1942
2162
  toasts: [],
1943
2163
  showToast: (t) => {
1944
- ot += 1;
1945
- let n = `ds-toast-${ot}`;
2164
+ pt += 1;
2165
+ let n = `ds-toast-${pt}`;
1946
2166
  return e((e) => ({ toasts: [...e.toasts, {
1947
2167
  variant: "info",
1948
2168
  duration: 5e3,
@@ -1953,18 +2173,18 @@ var T = {
1953
2173
  },
1954
2174
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
1955
2175
  clearToasts: () => e({ toasts: [] })
1956
- })), ct = () => st.setState({ toasts: [] }), lt = ({ position: e = "top-right" }) => {
1957
- let n = st((e) => e.toasts), r = st((e) => e.removeToast);
2176
+ })), ht = () => mt.setState({ toasts: [] }), gt = ({ position: e = "top-right" }) => {
2177
+ let n = mt((e) => e.toasts), r = mt((e) => e.removeToast);
1958
2178
  return /* @__PURE__ */ t("div", {
1959
- className: `${rt.viewport} ${rt[e]}`,
2179
+ className: `${ut.viewport} ${ut[e]}`,
1960
2180
  "aria-label": "Уведомления",
1961
- children: n.map((e) => /* @__PURE__ */ t(at, {
2181
+ children: n.map((e) => /* @__PURE__ */ t(ft, {
1962
2182
  toast: e,
1963
2183
  onClose: r
1964
2184
  }, e.id))
1965
2185
  });
1966
- }, ut = () => {
1967
- let e = st((e) => e.showToast), t = st((e) => e.removeToast), n = st((e) => e.clearToasts), r = o((t) => e({
2186
+ }, _t = () => {
2187
+ let e = mt((e) => e.showToast), t = mt((e) => e.removeToast), n = mt((e) => e.clearToasts), r = o((t) => e({
1968
2188
  ...t,
1969
2189
  variant: "info"
1970
2190
  }), [e]), i = o((t) => e({
@@ -1994,7 +2214,7 @@ var T = {
1994
2214
  i,
1995
2215
  a
1996
2216
  ]);
1997
- }, dt = {
2217
+ }, vt = {
1998
2218
  root: "_root_s9o0g_1",
1999
2219
  tooltip: "_tooltip_s9o0g_3",
2000
2220
  "ds-tooltip-in": "_ds-tooltip-in_s9o0g_1",
@@ -2002,7 +2222,7 @@ var T = {
2002
2222
  bottom: "_bottom_s9o0g_7",
2003
2223
  left: "_left_s9o0g_9",
2004
2224
  right: "_right_s9o0g_11"
2005
- }, ft = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
2225
+ }, yt = ({ content: e, children: i, placement: o = "top", delay: l = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
2006
2226
  let h = c(), [g, _] = f(!1), v = d(null), y = () => {
2007
2227
  u || !e || (v.current = setTimeout(() => _(!0), l));
2008
2228
  }, b = () => {
@@ -2024,29 +2244,29 @@ var T = {
2024
2244
  onBlur: b
2025
2245
  });
2026
2246
  return /* @__PURE__ */ n("span", {
2027
- className: `${dt.root} ${m}`,
2247
+ className: `${vt.root} ${m}`,
2028
2248
  onPointerDown: g ? b : y,
2029
2249
  children: [x, g && /* @__PURE__ */ t("span", {
2030
2250
  id: h,
2031
2251
  role: "tooltip",
2032
- className: `${dt.tooltip} ${dt[o]}`,
2252
+ className: `${vt.tooltip} ${vt[o]}`,
2033
2253
  style: { maxWidth: p },
2034
2254
  children: e
2035
2255
  })]
2036
2256
  });
2037
- }, pt = {
2257
+ }, bt = {
2038
2258
  root: "_root_1ue3g_1",
2039
2259
  frame: "_frame_1ue3g_3",
2040
2260
  video: "_video_1ue3g_5",
2041
2261
  overlay: "_overlay_1ue3g_7",
2042
2262
  error: "_error_1ue3g_7",
2043
2263
  caption: "_caption_1ue3g_13"
2044
- }, mt = ({ 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 }) => {
2264
+ }, xt = ({ 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 }) => {
2045
2265
  let [h, g] = f(!1), _ = c ?? (h ? "Не удалось воспроизвести видео" : void 0);
2046
2266
  return /* @__PURE__ */ n("figure", {
2047
- className: `${pt.root} ${u}`,
2267
+ className: `${bt.root} ${u}`,
2048
2268
  children: [/* @__PURE__ */ n("div", {
2049
- className: pt.frame,
2269
+ className: bt.frame,
2050
2270
  style: { aspectRatio: a },
2051
2271
  children: [
2052
2272
  !_ && e.length > 0 && /* @__PURE__ */ n("video", {
@@ -2054,7 +2274,7 @@ var T = {
2054
2274
  "aria-label": i,
2055
2275
  controls: d,
2056
2276
  playsInline: p,
2057
- className: pt.video,
2277
+ className: bt.video,
2058
2278
  style: { objectFit: o },
2059
2279
  onError: (e) => {
2060
2280
  g(!0), m.onError?.(e);
@@ -2062,21 +2282,21 @@ var T = {
2062
2282
  children: [e.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), r.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
2063
2283
  }),
2064
2284
  s && /* @__PURE__ */ t("div", {
2065
- className: pt.overlay,
2285
+ className: bt.overlay,
2066
2286
  children: /* @__PURE__ */ t(S, { label: "Загрузка видео" })
2067
2287
  }),
2068
2288
  (_ || e.length === 0) && /* @__PURE__ */ t("div", {
2069
- className: pt.error,
2289
+ className: bt.error,
2070
2290
  role: "alert",
2071
2291
  children: l ?? _ ?? "Источник видео не указан"
2072
2292
  })
2073
2293
  ]
2074
2294
  }), /* @__PURE__ */ t("figcaption", {
2075
- className: pt.caption,
2295
+ className: bt.caption,
2076
2296
  children: i
2077
2297
  })]
2078
2298
  });
2079
- }, ht = {
2299
+ }, St = {
2080
2300
  popup: "_popup_15ovj_1",
2081
2301
  trigger: "_trigger_15ovj_15",
2082
2302
  content: "_content_15ovj_23",
@@ -2084,17 +2304,17 @@ var T = {
2084
2304
  right: "_right_15ovj_141",
2085
2305
  bottom: "_bottom_15ovj_175",
2086
2306
  left: "_left_15ovj_209"
2087
- }, gt = ({ content: r, children: i, placement: a = "top", disabled: o = !1 }) => o ? /* @__PURE__ */ t(e, { children: i }) : /* @__PURE__ */ n("span", {
2088
- className: `${ht.popup} ${ht[a]}`,
2307
+ }, Ct = ({ content: r, children: i, placement: a = "top", disabled: o = !1 }) => o ? /* @__PURE__ */ t(e, { children: i }) : /* @__PURE__ */ n("span", {
2308
+ className: `${St.popup} ${St[a]}`,
2089
2309
  children: [/* @__PURE__ */ t("span", {
2090
- className: ht.trigger,
2310
+ className: St.trigger,
2091
2311
  children: i
2092
2312
  }), /* @__PURE__ */ t("span", {
2093
- className: ht.content,
2313
+ className: St.content,
2094
2314
  role: "tooltip",
2095
2315
  children: r
2096
2316
  })]
2097
- }), $ = {
2317
+ }), wt = {
2098
2318
  root: "_root_1tdda_1",
2099
2319
  trigger: "_trigger_1tdda_15",
2100
2320
  heading: "_heading_1tdda_41",
@@ -2104,13 +2324,13 @@ var T = {
2104
2324
  open: "_open_1tdda_91",
2105
2325
  content: "_content_1tdda_99",
2106
2326
  contentInner: "_contentInner_1tdda_119"
2107
- }, _t = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, className: l = "" }) => {
2327
+ }, Tt = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, className: l = "" }) => {
2108
2328
  let u = c(), [d, p] = f(a), m = o ?? d;
2109
2329
  return /* @__PURE__ */ n("section", {
2110
- className: `${$.root} ${m ? $.open : ""} ${l}`,
2330
+ className: `${wt.root} ${m ? wt.open : ""} ${l}`,
2111
2331
  children: [/* @__PURE__ */ n("button", {
2112
2332
  type: "button",
2113
- className: $.trigger,
2333
+ className: wt.trigger,
2114
2334
  "aria-expanded": m,
2115
2335
  "aria-controls": u,
2116
2336
  onClick: () => {
@@ -2118,16 +2338,16 @@ var T = {
2118
2338
  o === void 0 && p(e), s?.(e);
2119
2339
  },
2120
2340
  children: [/* @__PURE__ */ n("span", {
2121
- className: $.heading,
2341
+ className: wt.heading,
2122
2342
  children: [/* @__PURE__ */ t("span", {
2123
- className: $.title,
2343
+ className: wt.title,
2124
2344
  children: e
2125
2345
  }), r && /* @__PURE__ */ t("span", {
2126
- className: $.subtitle,
2346
+ className: wt.subtitle,
2127
2347
  children: r
2128
2348
  })]
2129
2349
  }), /* @__PURE__ */ t("span", {
2130
- className: $.icon,
2350
+ className: wt.icon,
2131
2351
  "aria-hidden": "true",
2132
2352
  children: /* @__PURE__ */ t("svg", {
2133
2353
  viewBox: "0 0 20 20",
@@ -2143,15 +2363,15 @@ var T = {
2143
2363
  })]
2144
2364
  }), /* @__PURE__ */ t("div", {
2145
2365
  id: u,
2146
- className: $.content,
2366
+ className: wt.content,
2147
2367
  "aria-hidden": !m,
2148
2368
  children: /* @__PURE__ */ t("div", {
2149
- className: $.contentInner,
2369
+ className: wt.contentInner,
2150
2370
  children: i
2151
2371
  })
2152
2372
  })]
2153
2373
  });
2154
- }, vt = ({ children: e, containerId: t = "overlay-root" }) => {
2374
+ }, Et = ({ children: e, containerId: t = "overlay-root" }) => {
2155
2375
  let [n, r] = f(null);
2156
2376
  return s(() => {
2157
2377
  let e = document.getElementById(t);
@@ -2166,4 +2386,4 @@ var T = {
2166
2386
  }, [t]), n ? p(e, n) : null;
2167
2387
  };
2168
2388
  //#endregion
2169
- export { Ke as ConfirmModal, _t as DSAccordion, b as DSBadge, w as DSButton, k as DSCheckbox, Se as DSDataTable, te as DSDateRange, H as DSDateTimePicker, oe as DSDropDown, Ce as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Pe as DSFileInput, Ae as DSFilters, ue as DSIcon, Te as DSInfoBlock, Ee as DSInput, S as DSLoader, Be as DSModal, ze as DSModalFrame, nt as DSPageLoader, gt as DSPopup, vt as DSPortal, Oe as DSRadioButton, ne as DSSkeleton, ce as DSSort, at as DSToast, lt as DSToastProvider, ft as DSTooltip, mt as DSVideoPlayerFrame, qe as ErrorModal, Ve as ModalSystemProvider, Je as builtInModalRegistry, He as defineModalRegistry, F as formatDateTimeLocalValue, fe as getDSDataTablePaginationItems, Xe as getErrorMessage, J as getNextEnabledOptionIndex, W as isValidDateRange, I as parseDateTimeLocalValue, Ie as resetModalStore, ct as resetToastStore, Ye as useConfirmModal, Qe as useConfirmModalStore, Ze as useErrorModal, $e as useErrorModalStore, et as useModals, Q as useModalsStore, ut as useToast, st as useToastStore, pe as validateDSDataTableData };
2389
+ export { $e as ConfirmModal, Tt as DSAccordion, b as DSBadge, w as DSButton, k as DSCheckbox, xe as DSDataTable, ee as DSDateRange, U as DSDateTimePicker, ae as DSDropDown, Se as DSDropDownMultiple, E as DSFieldLabel, D as DSFieldMessage, Ve as DSFileInput, Le as DSFilters, le as DSIcon, Ne as DSInfoBlock, we as DSInput, S as DSLoader, qe as DSModal, Ke as DSModalFrame, lt as DSPageLoader, Ct as DSPopup, Et as DSPortal, Fe as DSRadioButton, je as DSSearchDropDown, q as DSSkeleton, se as DSSort, ft as DSToast, gt as DSToastProvider, yt as DSTooltip, xt as DSVideoPlayerFrame, et as ErrorModal, Je as ModalSystemProvider, tt as builtInModalRegistry, Ye as defineModalRegistry, F as formatDateTimeLocalValue, de as getDSDataTablePaginationItems, rt as getErrorMessage, re as getNextEnabledOptionIndex, G as isValidDateRange, I as parseDateTimeLocalValue, Ue as resetModalStore, ht as resetToastStore, nt as useConfirmModal, at as useConfirmModalStore, it as useErrorModal, ot as useErrorModalStore, st as useModals, $ as useModalsStore, _t as useToast, mt as useToastStore, fe as validateDSDataTableData };