@efficiency-point/design-system 0.1.44 → 0.1.45

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
@@ -2235,7 +2235,16 @@ var M = {
2235
2235
  }, St = b({
2236
2236
  rowSortingFeature: y,
2237
2237
  sortedRowModel: v()
2238
- }), Ct = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
2238
+ }), Ct = [
2239
+ 10,
2240
+ 30,
2241
+ 50,
2242
+ -1
2243
+ ];
2244
+ function wt(e, t) {
2245
+ return t.includes(e) ? e : t.includes(30) ? 30 : t.find((e) => Number.isSafeInteger(e) && e > 0) ?? 30;
2246
+ }
2247
+ var Tt = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
2239
2248
  let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
2240
2249
  return d(() => {
2241
2250
  if (o === void 0) return;
@@ -2278,20 +2287,20 @@ var M = {
2278
2287
  error: a,
2279
2288
  onChange: (e) => r(e)
2280
2289
  });
2281
- }, wt = (e, t, n) => {
2290
+ }, Et = (e, t, n) => {
2282
2291
  let r = new Set(e);
2283
2292
  return t.forEach((e) => {
2284
2293
  n ? r.add(e) : r.delete(e);
2285
2294
  }), Array.from(r);
2286
- }, Tt = (e) => {
2295
+ }, Dt = (e) => {
2287
2296
  if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
2288
2297
  width: e.width,
2289
2298
  minWidth: e.minWidth,
2290
2299
  maxWidth: e.maxWidth
2291
2300
  };
2292
- }, Et = (e) => {
2301
+ }, Ot = (e) => {
2293
2302
  if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
2294
- }, Dt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
2303
+ }, kt = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
2295
2304
  0,
2296
2305
  1,
2297
2306
  2,
@@ -2315,7 +2324,7 @@ var M = {
2315
2324
  e + 1,
2316
2325
  "ellipsis-end",
2317
2326
  t - 1
2318
- ], Ot = (e, t) => {
2327
+ ], At = (e, t) => {
2319
2328
  let n = /* @__PURE__ */ new Set();
2320
2329
  for (let t of e) {
2321
2330
  if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
@@ -2327,36 +2336,36 @@ var M = {
2327
2336
  for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
2328
2337
  }
2329
2338
  return null;
2330
- }, kt = (e, t) => typeof e == "function" ? e(t) : t[e], At = (e) => {
2339
+ }, jt = (e, t) => typeof e == "function" ? e(t) : t[e], Mt = (e) => {
2331
2340
  if (e == null || e === "") return null;
2332
2341
  let t = Date.parse(String(e));
2333
2342
  return Number.isNaN(t) ? null : t;
2334
- }, jt = (e, t, n) => {
2335
- let r = At(e.getValue(n)), i = At(t.getValue(n));
2343
+ }, Nt = (e, t, n) => {
2344
+ let r = Mt(e.getValue(n)), i = Mt(t.getValue(n));
2336
2345
  return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
2337
- }, Mt = (e, t, n) => {
2346
+ }, Pt = (e, t, n) => {
2338
2347
  let r = e.getValue(n), i = t.getValue(n);
2339
2348
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
2340
- }, Nt = (e, t, n) => {
2349
+ }, Ft = (e, t, n) => {
2341
2350
  let r = e.getValue(n), i = t.getValue(n);
2342
2351
  return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
2343
- }, Pt = (e, t, n) => {
2352
+ }, It = (e, t, n) => {
2344
2353
  let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
2345
2354
  return r.localeCompare(i, void 0, {
2346
2355
  numeric: !0,
2347
2356
  sensitivity: "base"
2348
2357
  });
2349
- }, Ft = (e) => {
2358
+ }, Lt = (e) => {
2350
2359
  switch (e) {
2351
- case "date": return jt;
2352
- case "number": return Mt;
2353
- case "boolean": return Nt;
2360
+ case "date": return Nt;
2361
+ case "number": return Pt;
2362
+ case "boolean": return Ft;
2354
2363
  case "text":
2355
- case void 0: return Pt;
2364
+ case void 0: return It;
2356
2365
  case "custom": return;
2357
2366
  }
2358
- }, It = (e) => {
2359
- let t = (t) => kt(e.accessor, t), n = e.sortFn ?? Ft(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
2367
+ }, Rt = (e) => {
2368
+ let t = (t) => jt(e.accessor, t), n = e.sortFn ?? Lt(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
2360
2369
  id: e.id,
2361
2370
  accessorFn: t,
2362
2371
  header: () => e.header,
@@ -2368,21 +2377,12 @@ var M = {
2368
2377
  sortDescFirst: e.sortDescFirst
2369
2378
  };
2370
2379
  return n !== void 0 && (i.sortFn = n), i;
2371
- }, Lt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, getRowClassName: p, getRowStyle: h, toolbarContent: _, totalCountVariant: v = "default", totalCountLabel: y = "Всего", caption: b, ariaLabel: S, loading: C = !1, error: w, emptyState: T = "Нет данных", stickyHeader: E = !1, maxHeight: D, className: O = "", onRowClick: k, selectable: A = !1, selectedRowIds: M, onSelectedRowIdsChange: ee, onRowDoubleClick: N, getRowSelectionLabel: P, selectAllRowsLabel: F = "Выбрать все строки на этой странице", resetSelectionLabel: I = "Сбросить выбор", openRowLabel: L = "Открыть строку", pagination: R = !1, paginationMode: z = "client", page: B = 1, pageSize: V = 30, onPageSizeChange: H, pageSizeOptions: U = [
2372
- 10,
2373
- 30,
2374
- 50,
2375
- -1
2376
- ], pageSizeDraft: W, onPageSizeDraftChange: te, pageSizeApplyMode: ne = "table", totalCount: re, onPageChange: ie, visibleColumnIds: ae, density: oe = "comfortable", renderBulkActions: se, renderExpandedRow: ce, expandedRowIds: G, onExpandedRowIdsChange: le, getRowExpansionLabel: ue, resultsAnnouncement: de, filterBar: K }) => {
2377
- let [fe, pe] = g([]), [me, he] = g([]), [ge, _e] = g([]), [ve, ye] = g(0), [be, xe] = g(V === -1 ? -1 : [
2378
- 10,
2379
- 30,
2380
- 50
2381
- ].includes(V) ? V : 30), Se = c ?? fe, Ce = Se.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), we = V === -1, Te = we ? Math.max(1, (z === "server" ? Number(re) : i.length) || i.length || 1) : Number.isFinite(V) && V > 0 ? Math.floor(V) : 30, Ee = R && z === "server", q = m(() => {
2380
+ }, zt = ({ columns: e, data: i, tableOnMobile: a = !1, mobileView: o, breakpoint: s = "default", sorting: c, onSortingChange: l, renderMobileCard: u, getRowId: f, getRowClassName: p, getRowStyle: h, toolbarContent: _, totalCountVariant: v = "default", totalCountLabel: y = "Всего", caption: b, ariaLabel: S, loading: C = !1, error: w, emptyState: T = "Нет данных", stickyHeader: E = !1, maxHeight: D, className: O = "", onRowClick: k, selectable: A = !1, selectedRowIds: M, onSelectedRowIdsChange: ee, onRowDoubleClick: N, getRowSelectionLabel: P, selectAllRowsLabel: F = "Выбрать все строки на этой странице", resetSelectionLabel: I = "Сбросить выбор", openRowLabel: L = "Открыть строку", pagination: R = !1, paginationMode: z = "client", page: B = 1, pageSize: V = 30, onPageSizeChange: H, pageSizeOptions: U = Ct, pageSizeDraft: W, onPageSizeDraftChange: te, pageSizeApplyMode: ne = "table", totalCount: re, onPageChange: ie, visibleColumnIds: ae, density: oe = "comfortable", renderBulkActions: se, renderExpandedRow: ce, expandedRowIds: G, onExpandedRowIdsChange: le, getRowExpansionLabel: ue, resultsAnnouncement: de, filterBar: K }) => {
2381
+ let [fe, pe] = g([]), [me, he] = g([]), [ge, _e] = g([]), [ve, ye] = g(0), [be, xe] = g(() => wt(V, U)), Se = c ?? fe, Ce = Se.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), we = V === -1, Te = we ? Math.max(1, (z === "server" ? Number(re) : i.length) || i.length || 1) : Number.isFinite(V) && V > 0 ? Math.floor(V) : 30, Ee = R && z === "server", q = m(() => {
2382
2382
  if (ae === void 0) return e;
2383
2383
  let t = new Set(ae);
2384
2384
  return e.filter((e) => t.has(e.id));
2385
- }, [e, ae]), De = m(() => q.length === 0 ? "Должна быть видима хотя бы одна колонка" : Ot(q, i), [i, q]), Oe = m(() => q.map(It), [q]), ke = q.some((e) => Tt(e) !== void 0), J = x({
2385
+ }, [e, ae]), De = m(() => q.length === 0 ? "Должна быть видима хотя бы одна колонка" : At(q, i), [i, q]), Oe = m(() => q.map(Rt), [q]), ke = q.some((e) => Dt(e) !== void 0), J = x({
2386
2386
  features: St,
2387
2387
  columns: Oe,
2388
2388
  data: i,
@@ -2401,7 +2401,7 @@ var M = {
2401
2401
  ]), Ie = M ?? me, Le = m(() => new Set(Ie), [Ie]), Re = G ?? ge, ze = m(() => new Set(Re), [Re]), Be = m(() => Fe.map((e) => e.id), [Fe]), Ve = Be.filter((e) => Le.has(e)).length, He = Be.length > 0 && Ve === Be.length, Ue = Ve > 0 && !He, We = m(() => q.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
2402
2402
  id: e.id,
2403
2403
  label: typeof e.header == "string" ? e.header : e.id
2404
- })), [q]), Ge = m(() => Dt(Pe, Me), [Me, Pe]), Ke = o === void 0 ? a : o === "table", qe = [
2404
+ })), [q]), Ge = m(() => kt(Pe, Me), [Me, Pe]), Ke = o === void 0 ? a : o === "table", qe = [
2405
2405
  Q.root,
2406
2406
  s === "wide" ? Q.wide : Q.default,
2407
2407
  Ke ? Q.tableOnMobile : "",
@@ -2481,7 +2481,7 @@ var M = {
2481
2481
  let t = new Set(Le);
2482
2482
  t.has(e) ? t.delete(e) : t.add(e), ot(t);
2483
2483
  }, ct = () => {
2484
- let e = wt(Le, Be, !He);
2484
+ let e = Et(Le, Be, !He);
2485
2485
  M === void 0 && he(e), ee?.(e);
2486
2486
  }, lt = () => ot(/* @__PURE__ */ new Set()), ut = (e) => {
2487
2487
  let t = new Set(ze);
@@ -2508,12 +2508,8 @@ var M = {
2508
2508
  Me,
2509
2509
  ve
2510
2510
  ]), d(() => {
2511
- xe(V === -1 ? -1 : [
2512
- 10,
2513
- 30,
2514
- 50
2515
- ].includes(V) ? V : 30);
2516
- }, [V]), /* @__PURE__ */ n("section", {
2511
+ xe(wt(V, U));
2512
+ }, [V, U]), /* @__PURE__ */ n("section", {
2517
2513
  className: qe,
2518
2514
  "aria-busy": C,
2519
2515
  children: [
@@ -2546,7 +2542,7 @@ var M = {
2546
2542
  children: [
2547
2543
  /* @__PURE__ */ t("div", {
2548
2544
  className: Q.filterFields,
2549
- children: K.fields.map((e) => /* @__PURE__ */ t(Ct, {
2545
+ children: K.fields.map((e) => /* @__PURE__ */ t(Tt, {
2550
2546
  field: e,
2551
2547
  value: K.draftValues[e.key],
2552
2548
  disabled: !!(e.disabled || K.applying || C),
@@ -2620,7 +2616,7 @@ var M = {
2620
2616
  (ke || A || !!ce) && /* @__PURE__ */ n("colgroup", { children: [
2621
2617
  ce && /* @__PURE__ */ t("col", { className: Q.expansionColumn }),
2622
2618
  A && /* @__PURE__ */ t("col", { className: Q.selectionColumn }),
2623
- q.map((e) => /* @__PURE__ */ t("col", { style: Tt(e) }, e.id))
2619
+ q.map((e) => /* @__PURE__ */ t("col", { style: Dt(e) }, e.id))
2624
2620
  ] }),
2625
2621
  /* @__PURE__ */ t("thead", {
2626
2622
  className: E ? Q.sticky : "",
@@ -2666,8 +2662,8 @@ var M = {
2666
2662
  "aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
2667
2663
  className: q.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
2668
2664
  style: {
2669
- ...Tt(q.find((t) => t.id === e.column.id)),
2670
- ...Et(q.find((t) => t.id === e.column.id))
2665
+ ...Dt(q.find((t) => t.id === e.column.id)),
2666
+ ...Ot(q.find((t) => t.id === e.column.id))
2671
2667
  },
2672
2668
  children: /* @__PURE__ */ n("button", {
2673
2669
  type: "button",
@@ -2751,8 +2747,8 @@ var M = {
2751
2747
  e.getAllCells().map((e) => /* @__PURE__ */ t("td", {
2752
2748
  className: q.find((t) => t.id === e.column.id)?.sticky ? Q.stickyColumn : void 0,
2753
2749
  style: {
2754
- ...Tt(q.find((t) => t.id === e.column.id)),
2755
- ...Et(q.find((t) => t.id === e.column.id))
2750
+ ...Dt(q.find((t) => t.id === e.column.id)),
2751
+ ...Ot(q.find((t) => t.id === e.column.id))
2756
2752
  },
2757
2753
  children: /* @__PURE__ */ t(J.FlexRender, { cell: e })
2758
2754
  }, e.id))
@@ -2858,7 +2854,7 @@ var M = {
2858
2854
  })
2859
2855
  ]
2860
2856
  }, e.id);
2861
- let c = q.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => kt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
2857
+ let c = q.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), l = c.find((e) => e.mobile?.primary) ?? c.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => jt(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
2862
2858
  return /* @__PURE__ */ n("article", {
2863
2859
  role: "listitem",
2864
2860
  className: [
@@ -2968,17 +2964,17 @@ var M = {
2968
2964
  })
2969
2965
  ]
2970
2966
  });
2971
- }, Rt = (e, t) => {
2967
+ }, Bt = (e, t) => {
2972
2968
  let n = t.trim().toLocaleLowerCase();
2973
2969
  return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
2974
- }, zt = (e, t, n) => {
2970
+ }, Vt = (e, t, n) => {
2975
2971
  if (!e.length) return -1;
2976
2972
  for (let r = 0; r < e.length; r += 1) {
2977
2973
  let i = (t + r * n + e.length) % e.length;
2978
2974
  if (!e[i]?.disabled) return i;
2979
2975
  }
2980
2976
  return -1;
2981
- }, Bt = {
2977
+ }, Ht = {
2982
2978
  wrapper: "_wrapper_1os84_1",
2983
2979
  control: "_control_1os84_17",
2984
2980
  inputHost: "_inputHost_1os84_25",
@@ -2997,23 +2993,23 @@ var M = {
2997
2993
  active: "_active_1os84_321",
2998
2994
  actionOption: "_actionOption_1os84_341",
2999
2995
  visuallyHidden: "_visuallyHidden_1os84_375"
3000
- }, Vt = 8, Ht = 6, Ut = 5, Wt = 10, Gt = {
2996
+ }, Ut = 8, Wt = 6, Gt = 5, Kt = 10, qt = {
3001
2997
  sm: 30,
3002
2998
  md: 40,
3003
2999
  lg: 50
3004
- }, Kt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
3000
+ }, Jt = ({ options: e, value: r, onChange: i, placeholder: a = "Начните вводить", noResultsText: o = "Ничего не найдено", disabled: s = !1, readOnly: c = !1, stringWhileDisabled: u = !1, label: v, error: y, hint: b, size: x = "md", required: S = !1, className: C = "", name: w, id: T, needMark: E = !0 }) => {
3005
3001
  let D = f(), O = T ?? `ds-search-dropdown-${w ?? D}`, k = `${O}-listbox`, A = `${O}-status`, j = b ? `${O}-hint` : void 0, M = y ? `${O}-error` : void 0, P = [
3006
3002
  A,
3007
3003
  j,
3008
3004
  M
3009
- ].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, V] = g(""), [H, U] = g(-1), [W, te] = g(null), ne = m(() => e.find((e) => e.value === r), [e, r]), re = m(() => Rt(e, B), [e, B]), ie = s && u, ae = H >= 0 ? re[H] : void 0;
3005
+ ].filter(Boolean).join(" "), F = h(null), I = h(null), L = h([]), [R, z] = g(!1), [B, V] = g(""), [H, U] = g(-1), [W, te] = g(null), ne = m(() => e.find((e) => e.value === r), [e, r]), re = m(() => Bt(e, B), [e, B]), ie = s && u, ae = H >= 0 ? re[H] : void 0;
3010
3006
  d(() => V(ne?.label ?? ""), [ne?.label, r]);
3011
- let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => zt(re, e, t), [re]), ce = l((e) => {
3007
+ let oe = l(() => F.current?.querySelector("input") ?? null, []), se = l((e, t) => Vt(re, e, t), [re]), ce = l((e) => {
3012
3008
  U(e), !(e < 0) && requestAnimationFrame(() => L.current[e]?.scrollIntoView({ block: "nearest" }));
3013
3009
  }, []), G = l(() => {
3014
3010
  let e = oe();
3015
3011
  if (!e) return;
3016
- let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, Ut)) * Gt[x] + Wt, r = window.innerHeight - t.bottom - Vt, i = t.top - Vt, a = r < n && i > r, o = a ? i : r, s = Math.max(Gt[x] + Wt, Math.min(n, o)), c = window.innerWidth - t.width - Vt, l = Math.max(Vt, Math.min(t.left, c)), u = a ? Math.max(Vt, t.top - s - Ht) : t.bottom + Ht;
3012
+ let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, Gt)) * qt[x] + Kt, r = window.innerHeight - t.bottom - Ut, i = t.top - Ut, a = r < n && i > r, o = a ? i : r, s = Math.max(qt[x] + Kt, Math.min(n, o)), c = window.innerWidth - t.width - Ut, l = Math.max(Ut, Math.min(t.left, c)), u = a ? Math.max(Ut, t.top - s - Wt) : t.bottom + Wt;
3017
3013
  te({
3018
3014
  top: u,
3019
3015
  left: l,
@@ -3048,7 +3044,7 @@ var M = {
3048
3044
  }, de = R ? /* @__PURE__ */ t("ul", {
3049
3045
  ref: I,
3050
3046
  id: k,
3051
- className: `${Bt.menu} ${re.length === 0 ? Bt.menuEmpty : ""}`,
3047
+ className: `${Ht.menu} ${re.length === 0 ? Ht.menuEmpty : ""}`,
3052
3048
  role: "listbox",
3053
3049
  "aria-label": v,
3054
3050
  style: W ? {
@@ -3063,7 +3059,7 @@ var M = {
3063
3059
  maxHeight: 0
3064
3060
  },
3065
3061
  children: re.length === 0 ? /* @__PURE__ */ t("li", {
3066
- className: `${Bt.empty} ${Bt[x]}`,
3062
+ className: `${Ht.empty} ${Ht[x]}`,
3067
3063
  children: o
3068
3064
  }) : re.map((e, i) => {
3069
3065
  let a = e.value === r, o = i === H;
@@ -3082,11 +3078,11 @@ var M = {
3082
3078
  "aria-selected": a,
3083
3079
  "data-option-variant": e.variant ?? "default",
3084
3080
  className: [
3085
- Bt.option,
3086
- Bt[x],
3087
- e.variant === "action" ? Bt.actionOption : "",
3088
- a ? Bt.selected : "",
3089
- o ? Bt.active : ""
3081
+ Ht.option,
3082
+ Ht[x],
3083
+ e.variant === "action" ? Ht.actionOption : "",
3084
+ a ? Ht.selected : "",
3085
+ o ? Ht.active : ""
3090
3086
  ].filter(Boolean).join(" "),
3091
3087
  onPointerMove: () => {
3092
3088
  e.disabled || U(i);
@@ -3104,8 +3100,8 @@ var M = {
3104
3100
  return /* @__PURE__ */ n("div", {
3105
3101
  ref: F,
3106
3102
  className: [
3107
- Bt.wrapper,
3108
- y ? Bt.errorState : "",
3103
+ Ht.wrapper,
3104
+ y ? Ht.errorState : "",
3109
3105
  C
3110
3106
  ].filter(Boolean).join(" "),
3111
3107
  children: [
@@ -3116,10 +3112,10 @@ var M = {
3116
3112
  children: v
3117
3113
  }),
3118
3114
  ie ? /* @__PURE__ */ t("div", {
3119
- className: `${Bt.disabledText} ${Bt[x]}`,
3115
+ className: `${Ht.disabledText} ${Ht[x]}`,
3120
3116
  children: ne?.label ?? a
3121
3117
  }) : /* @__PURE__ */ n("div", {
3122
- className: Bt.control,
3118
+ className: Ht.control,
3123
3119
  children: [/* @__PURE__ */ t(mt, {
3124
3120
  id: O,
3125
3121
  name: w,
@@ -3131,11 +3127,11 @@ var M = {
3131
3127
  size: x,
3132
3128
  clearable: !1,
3133
3129
  autoComplete: "off",
3134
- className: `${Bt.inputHost} ${Bt[x]}`,
3130
+ className: `${Ht.inputHost} ${Ht[x]}`,
3135
3131
  onFocus: le,
3136
3132
  onChange: (t) => {
3137
- let n = String(t), r = Rt(e, n);
3138
- V(n), z(!0), U(zt(r, 0, 1));
3133
+ let n = String(t), r = Bt(e, n);
3134
+ V(n), z(!0), U(Vt(r, 0, 1));
3139
3135
  },
3140
3136
  role: "combobox",
3141
3137
  "aria-autocomplete": "list",
@@ -3160,7 +3156,7 @@ var M = {
3160
3156
  }
3161
3157
  }
3162
3158
  }), /* @__PURE__ */ t("span", {
3163
- className: `${Bt.chevron} ${R ? Bt.chevronOpen : ""}`,
3159
+ className: `${Ht.chevron} ${R ? Ht.chevronOpen : ""}`,
3164
3160
  "aria-hidden": "true",
3165
3161
  children: /* @__PURE__ */ t(Y, {
3166
3162
  name: "IconChevron",
@@ -3172,7 +3168,7 @@ var M = {
3172
3168
  R && typeof document < "u" && _(de, document.body),
3173
3169
  /* @__PURE__ */ n("span", {
3174
3170
  id: A,
3175
- className: Bt.visuallyHidden,
3171
+ className: Ht.visuallyHidden,
3176
3172
  "aria-live": "polite",
3177
3173
  children: ["Найдено вариантов: ", re.length]
3178
3174
  }),
@@ -3187,25 +3183,25 @@ var M = {
3187
3183
  })
3188
3184
  ]
3189
3185
  });
3190
- }, qt = {
3186
+ }, Yt = {
3191
3187
  root: "_root_11adi_1",
3192
3188
  header: "_header_11adi_21",
3193
3189
  title: "_title_11adi_41",
3194
3190
  dismiss: "_dismiss_11adi_55",
3195
3191
  content: "_content_11adi_65"
3196
- }, Jt = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
3192
+ }, Xt = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
3197
3193
  let l = `ds-info-block-${f()}`;
3198
3194
  return /* @__PURE__ */ n("section", {
3199
- className: `${qt.root} ${c}`,
3195
+ className: `${Yt.root} ${c}`,
3200
3196
  "aria-labelledby": l,
3201
3197
  children: [/* @__PURE__ */ n("header", {
3202
- className: qt.header,
3198
+ className: Yt.header,
3203
3199
  children: [/* @__PURE__ */ t(s, {
3204
3200
  id: l,
3205
- className: qt.title,
3201
+ className: Yt.title,
3206
3202
  children: e
3207
3203
  }), i && /* @__PURE__ */ t(j, {
3208
- className: qt.dismiss,
3204
+ className: Yt.dismiss,
3209
3205
  variant: "empty",
3210
3206
  onClick: a,
3211
3207
  "aria-label": o,
@@ -3216,15 +3212,15 @@ var M = {
3216
3212
  })
3217
3213
  })]
3218
3214
  }), /* @__PURE__ */ t("div", {
3219
- className: qt.content,
3215
+ className: Yt.content,
3220
3216
  children: r
3221
3217
  })]
3222
3218
  });
3223
- }, Yt = {
3219
+ }, Zt = {
3224
3220
  root: "_root_1ecm3_1",
3225
3221
  grid: "_grid_1ecm3_13",
3226
3222
  actions: "_actions_1ecm3_27"
3227
- }, Xt = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
3223
+ }, Qt = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
3228
3224
  let d = (e, t) => {
3229
3225
  let n = {
3230
3226
  ...r,
@@ -3233,11 +3229,11 @@ var M = {
3233
3229
  i?.(n, e), s === "instant" && a?.(n);
3234
3230
  };
3235
3231
  return /* @__PURE__ */ n("section", {
3236
- className: `${Yt.root} ${u}`,
3232
+ className: `${Zt.root} ${u}`,
3237
3233
  "aria-label": "Фильтры",
3238
3234
  "aria-busy": c,
3239
3235
  children: [/* @__PURE__ */ t("div", {
3240
- className: Yt.grid,
3236
+ className: Zt.grid,
3241
3237
  children: e.filter((e) => !e.hidden).map((e) => {
3242
3238
  let n = l || c || e.disabled, i = r[e.id];
3243
3239
  if (e.type === "input") {
@@ -3305,7 +3301,7 @@ var M = {
3305
3301
  }, e.id);
3306
3302
  })
3307
3303
  }), (o || s === "manual") && /* @__PURE__ */ n("div", {
3308
- className: Yt.actions,
3304
+ className: Zt.actions,
3309
3305
  children: [o && /* @__PURE__ */ t(j, {
3310
3306
  variant: "destructiveOutline",
3311
3307
  disabled: l || c,
@@ -3319,7 +3315,7 @@ var M = {
3319
3315
  })]
3320
3316
  })]
3321
3317
  });
3322
- }, Zt = {
3318
+ }, $t = {
3323
3319
  grid: "_grid_1q540_1",
3324
3320
  comfortable: "_comfortable_1q540_11",
3325
3321
  compact: "_compact_1q540_19",
@@ -3336,23 +3332,23 @@ var M = {
3336
3332
  summary: "_summary_1q540_101",
3337
3333
  summaryTitle: "_summaryTitle_1q540_137",
3338
3334
  summaryList: "_summaryList_1q540_145"
3339
- }, Qt = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
3335
+ }, en = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
3340
3336
  ...i,
3341
- className: `${Zt.grid} ${Zt[`columns${e}`]} ${Zt[n]} ${r}`
3342
- }), $t = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
3337
+ className: `${$t.grid} ${$t[`columns${e}`]} ${$t[n]} ${r}`
3338
+ }), tn = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
3343
3339
  ...r,
3344
- className: `${Zt.item} ${Zt[`span${e}`]} ${n}`
3345
- }), en = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
3340
+ className: `${$t.item} ${$t[`span${e}`]} ${n}`
3341
+ }), nn = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
3346
3342
  ...o,
3347
- className: `${Zt.summary} ${a}`,
3343
+ className: `${$t.summary} ${a}`,
3348
3344
  role: "alert",
3349
3345
  "aria-atomic": "true",
3350
3346
  tabIndex: -1,
3351
3347
  children: [/* @__PURE__ */ t("strong", {
3352
- className: Zt.summaryTitle,
3348
+ className: $t.summaryTitle,
3353
3349
  children: e
3354
3350
  }), /* @__PURE__ */ t("ul", {
3355
- className: Zt.summaryList,
3351
+ className: $t.summaryList,
3356
3352
  children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
3357
3353
  href: `#${e.fieldId}`,
3358
3354
  onClick: (t) => {
@@ -3361,7 +3357,7 @@ var M = {
3361
3357
  children: e.message
3362
3358
  }) : e.message }, e.id))
3363
3359
  })]
3364
- }), tn = {
3360
+ }), rn = {
3365
3361
  wrapper: "_wrapper_i20hz_1",
3366
3362
  dropzone: "_dropzone_i20hz_15",
3367
3363
  dragActive: "_dragActive_i20hz_45",
@@ -3374,12 +3370,12 @@ var M = {
3374
3370
  file: "_file_i20hz_133",
3375
3371
  fileName: "_fileName_i20hz_175",
3376
3372
  fileSize: "_fileSize_i20hz_187"
3377
- }, nn = (e) => `${e.name}:${e.size}:${e.lastModified}`, rn = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, an = (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), on = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
3373
+ }, an = (e) => `${e.name}:${e.size}:${e.lastModified}`, on = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, sn = (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), cn = ({ value: r, onChange: i, multiple: a = !1, accept: o, maxSize: s, maxFiles: c, label: l, hint: u, error: d, required: p = !1, disabled: m = !1, readOnly: _ = !1, name: v, id: y, className: b = "", dropLabel: x = "Перетащите файлы в эту область", browseLabel: S = "Выбрать файлы", addMoreLabel: C = "Добавить ещё", onReject: w }) => {
3378
3374
  let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), M = u ? `${E}-hint` : void 0, P = d ? `${E}-error` : void 0, F = [M, P].filter(Boolean).join(" ") || void 0, I = !m && !_, L = (e) => {
3379
- let t = [], n = new Set(r.map(nn)), l = e.filter((e) => an(e, o) ? s !== void 0 && e.size > s ? (t.push({
3375
+ let t = [], n = new Set(r.map(an)), l = e.filter((e) => sn(e, o) ? s !== void 0 && e.size > s ? (t.push({
3380
3376
  file: e,
3381
3377
  reason: "maxSize"
3382
- }), !1) : !n.has(nn(e)) && (n.add(nn(e)), !0) : (t.push({
3378
+ }), !1) : !n.has(an(e)) && (n.add(an(e)), !0) : (t.push({
3383
3379
  file: e,
3384
3380
  reason: "accept"
3385
3381
  }), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
@@ -3389,7 +3385,7 @@ var M = {
3389
3385
  })), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
3390
3386
  };
3391
3387
  return /* @__PURE__ */ n("div", {
3392
- className: `${tn.wrapper} ${b}`,
3388
+ className: `${rn.wrapper} ${b}`,
3393
3389
  children: [
3394
3390
  l && /* @__PURE__ */ t(ee, {
3395
3391
  htmlFor: E,
@@ -3398,7 +3394,7 @@ var M = {
3398
3394
  children: l
3399
3395
  }),
3400
3396
  /* @__PURE__ */ n("div", {
3401
- className: `${tn.dropzone} ${k ? tn.dragActive : ""} ${m ? tn.disabled : ""} ${d ? tn.error : ""}`,
3397
+ className: `${rn.dropzone} ${k ? rn.dragActive : ""} ${m ? rn.disabled : ""} ${d ? rn.error : ""}`,
3402
3398
  onDragEnter: (e) => {
3403
3399
  e.preventDefault(), I && ++O.current === 1 && A(!0);
3404
3400
  },
@@ -3413,7 +3409,7 @@ var M = {
3413
3409
  ref: D,
3414
3410
  id: E,
3415
3411
  name: v,
3416
- className: tn.nativeInput,
3412
+ className: rn.nativeInput,
3417
3413
  type: "file",
3418
3414
  multiple: a,
3419
3415
  accept: o,
@@ -3424,19 +3420,19 @@ var M = {
3424
3420
  onChange: (e) => L(Array.from(e.target.files ?? []))
3425
3421
  }), r.length ? /* @__PURE__ */ n(e, { children: [
3426
3422
  /* @__PURE__ */ t("ul", {
3427
- className: tn.files,
3423
+ className: rn.files,
3428
3424
  "aria-live": "polite",
3429
3425
  children: r.map((e, a) => /* @__PURE__ */ n("li", {
3430
- className: tn.file,
3426
+ className: rn.file,
3431
3427
  children: [
3432
3428
  /* @__PURE__ */ t("span", {
3433
- className: tn.fileName,
3429
+ className: rn.fileName,
3434
3430
  title: e.name,
3435
3431
  children: e.name
3436
3432
  }),
3437
3433
  /* @__PURE__ */ t("span", {
3438
- className: tn.fileSize,
3439
- children: rn(e.size)
3434
+ className: rn.fileSize,
3435
+ children: on(e.size)
3440
3436
  }),
3441
3437
  I && /* @__PURE__ */ t(j, {
3442
3438
  variant: "empty",
@@ -3450,25 +3446,25 @@ var M = {
3450
3446
  })
3451
3447
  })
3452
3448
  ]
3453
- }, nn(e)))
3449
+ }, an(e)))
3454
3450
  }),
3455
3451
  I && (a || r.length === 0) && /* @__PURE__ */ t(j, {
3456
- className: tn.browseButton,
3452
+ className: rn.browseButton,
3457
3453
  size: "sm",
3458
3454
  onClick: () => D.current?.click(),
3459
3455
  children: C
3460
3456
  }),
3461
3457
  I && !a && /* @__PURE__ */ t(j, {
3462
- className: tn.browseButton,
3458
+ className: rn.browseButton,
3463
3459
  size: "sm",
3464
3460
  onClick: () => D.current?.click(),
3465
3461
  children: S
3466
3462
  })
3467
3463
  ] }) : /* @__PURE__ */ n("div", {
3468
- className: tn.empty,
3464
+ className: rn.empty,
3469
3465
  children: [
3470
3466
  /* @__PURE__ */ t("span", {
3471
- className: tn.uploadIcon,
3467
+ className: rn.uploadIcon,
3472
3468
  "aria-hidden": "true",
3473
3469
  children: /* @__PURE__ */ t(Y, {
3474
3470
  name: "IconUpload",
@@ -3496,7 +3492,7 @@ var M = {
3496
3492
  })
3497
3493
  ]
3498
3494
  });
3499
- }, sn = ({ children: e, containerId: t = "overlay-root" }) => {
3495
+ }, ln = ({ children: e, containerId: t = "overlay-root" }) => {
3500
3496
  let [n, r] = g(null);
3501
3497
  return d(() => {
3502
3498
  let e = document.getElementById(t);
@@ -3509,7 +3505,7 @@ var M = {
3509
3505
  n.childElementCount === 0 && n.parentElement && n.remove();
3510
3506
  };
3511
3507
  }, [t]), n ? _(e, n) : null;
3512
- }, cn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
3508
+ }, un = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
3513
3509
  let o = h(null), [s, c] = g({
3514
3510
  position: "fixed",
3515
3511
  visibility: "hidden",
@@ -3533,13 +3529,13 @@ var M = {
3533
3529
  ]);
3534
3530
  return p(() => (u(), window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), () => {
3535
3531
  window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
3536
- }), [u]), /* @__PURE__ */ t(sn, { children: /* @__PURE__ */ t("div", {
3532
+ }), [u]), /* @__PURE__ */ t(ln, { children: /* @__PURE__ */ t("div", {
3537
3533
  ref: o,
3538
3534
  className: a,
3539
3535
  style: s,
3540
3536
  children: n
3541
3537
  }) });
3542
- }, ln = {
3538
+ }, dn = {
3543
3539
  wrapper: "_wrapper_x2gki_1",
3544
3540
  control: "_control_x2gki_15",
3545
3541
  textarea: "_textarea_x2gki_25",
@@ -3553,12 +3549,12 @@ var M = {
3553
3549
  clearAction: "_clearAction_x2gki_171",
3554
3550
  messages: "_messages_x2gki_251",
3555
3551
  counter: "_counter_x2gki_265"
3556
- }, un = 2;
3557
- function dn(e) {
3552
+ }, fn = 2;
3553
+ function pn(e) {
3558
3554
  let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
3559
3555
  return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
3560
3556
  }
3561
- function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = un, maxRows: w, autoResize: T = !0, ...E }) {
3557
+ function mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, readOnly: o = !1, stringWhileDisabled: s = !1, label: c, error: u, hint: p, className: m = "", name: g, id: _, size: v = "md", clearable: y = !1, required: b = !1, maxLength: x, showCount: S = !1, minRows: C = fn, maxRows: w, autoResize: T = !0, ...E }) {
3562
3558
  let D = f(), O = _ ?? `ds-textarea-${g ?? D}`, k = h(null), A = p ? `${O}-hint` : void 0, j = u ? `${O}-error` : void 0, M = S && x ? `${O}-count` : void 0, P = [
3563
3559
  A,
3564
3560
  j,
@@ -3566,7 +3562,7 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3566
3562
  ].filter(Boolean).join(" ") || void 0, F = Math.max(1, C), I = w === void 0 ? void 0 : Math.max(F, w), L = l(() => {
3567
3563
  let e = k.current;
3568
3564
  if (!e || !T) return;
3569
- let t = window.getComputedStyle(e), n = dn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
3565
+ let t = window.getComputedStyle(e), n = pn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * F + r, a = I === void 0 ? Infinity : n * I + r;
3570
3566
  e.style.height = "auto";
3571
3567
  let o = Math.min(Math.max(e.scrollHeight, i), a);
3572
3568
  e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
@@ -3598,7 +3594,7 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3598
3594
  e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), L());
3599
3595
  }, B = { "--ds-textarea-min-rows": F };
3600
3596
  return /* @__PURE__ */ n("div", {
3601
- className: `${ln.wrapper} ${m}`,
3597
+ className: `${dn.wrapper} ${m}`,
3602
3598
  children: [
3603
3599
  c && /* @__PURE__ */ t(ee, {
3604
3600
  htmlFor: O,
@@ -3608,12 +3604,12 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3608
3604
  }),
3609
3605
  a && s ? /* @__PURE__ */ t("div", {
3610
3606
  id: O,
3611
- className: `${ln.disabledText} ${ln[v]}`,
3607
+ className: `${dn.disabledText} ${dn[v]}`,
3612
3608
  style: B,
3613
3609
  "aria-describedby": P,
3614
3610
  children: e || i
3615
3611
  }) : /* @__PURE__ */ n("div", {
3616
- className: ln.control,
3612
+ className: dn.control,
3617
3613
  children: [/* @__PURE__ */ t("textarea", {
3618
3614
  ref: k,
3619
3615
  id: O,
@@ -3628,12 +3624,12 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3628
3624
  style: B,
3629
3625
  "aria-invalid": !!u,
3630
3626
  "aria-describedby": P,
3631
- className: `${ln.textarea} ${ln[v]} ${T ? ln.autoResize : ln.manualResize} ${u ? ln.textareaError : ""}`,
3627
+ className: `${dn.textarea} ${dn[v]} ${T ? dn.autoResize : dn.manualResize} ${u ? dn.textareaError : ""}`,
3632
3628
  onChange: R,
3633
3629
  ...E
3634
3630
  }), y && e && !a && !o && /* @__PURE__ */ t("button", {
3635
3631
  type: "button",
3636
- className: ln.clearAction,
3632
+ className: dn.clearAction,
3637
3633
  "aria-label": "Очистить поле",
3638
3634
  onClick: z,
3639
3635
  children: /* @__PURE__ */ t(Y, {
@@ -3644,7 +3640,7 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3644
3640
  })]
3645
3641
  }),
3646
3642
  (p || u || M) && /* @__PURE__ */ n("div", {
3647
- className: ln.messages,
3643
+ className: dn.messages,
3648
3644
  children: [
3649
3645
  p && !u && /* @__PURE__ */ t(N, {
3650
3646
  id: A,
@@ -3657,7 +3653,7 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3657
3653
  }),
3658
3654
  M && /* @__PURE__ */ n("span", {
3659
3655
  id: M,
3660
- className: ln.counter,
3656
+ className: dn.counter,
3661
3657
  children: [
3662
3658
  e.length,
3663
3659
  " / ",
@@ -3671,11 +3667,11 @@ function fn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
3671
3667
  }
3672
3668
  //#endregion
3673
3669
  //#region src/components/DSModal/modal.store.ts
3674
- var pn = 0, mn = S((e, t) => ({
3670
+ var hn = 0, gn = S((e, t) => ({
3675
3671
  modals: [],
3676
3672
  openModal: (t, n = {}, r = {}) => {
3677
- pn += 1;
3678
- let i = `ds-modal-${pn}`;
3673
+ hn += 1;
3674
+ let i = `ds-modal-${hn}`;
3679
3675
  return e((e) => ({ modals: [...e.modals, {
3680
3676
  id: i,
3681
3677
  name: t,
@@ -3699,10 +3695,10 @@ var pn = 0, mn = S((e, t) => ({
3699
3695
  let n = t().modals;
3700
3696
  n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
3701
3697
  }
3702
- })), hn = () => {
3703
- mn.getState().closeAllModals(), pn = 0;
3704
- }, gn = 8, _n = 96, vn = .55;
3705
- function yn(e, t, n) {
3698
+ })), _n = () => {
3699
+ gn.getState().closeAllModals(), hn = 0;
3700
+ }, vn = 8, yn = 96, bn = .55;
3701
+ function xn(e, t, n) {
3706
3702
  return {
3707
3703
  startX: e,
3708
3704
  startY: t,
@@ -3710,16 +3706,16 @@ function yn(e, t, n) {
3710
3706
  intent: "pending"
3711
3707
  };
3712
3708
  }
3713
- function bn(e, t, n) {
3709
+ function Sn(e, t, n) {
3714
3710
  let r = t - e.startX, i = n - e.startY;
3715
- return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= gn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
3711
+ return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= vn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
3716
3712
  }
3717
- function xn(e, t, n) {
3713
+ function Cn(e, t, n) {
3718
3714
  if (e.intent !== "vertical") return !1;
3719
3715
  let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
3720
- return r >= _n || r >= 32 && r / i >= vn;
3716
+ return r >= yn || r >= 32 && r / i >= bn;
3721
3717
  }
3722
- var Sn = {
3718
+ var wn = {
3723
3719
  layer: "_layer_w9isk_1",
3724
3720
  backdrop: "_backdrop_w9isk_15",
3725
3721
  "backdrop-enter": "_backdrop-enter_w9isk_1",
@@ -3732,10 +3728,10 @@ var Sn = {
3732
3728
  close: "_close_w9isk_141",
3733
3729
  dragHandle: "_dragHandle_w9isk_149",
3734
3730
  "sheet-enter": "_sheet-enter_w9isk_1"
3735
- }, Cn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", wn = a({});
3736
- function Tn(e) {
3731
+ }, Tn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", En = a({});
3732
+ function Dn(e) {
3737
3733
  if (e.key !== "Tab") return;
3738
- let t = Array.from(e.currentTarget.querySelectorAll(Cn));
3734
+ let t = Array.from(e.currentTarget.querySelectorAll(Tn));
3739
3735
  if (!t.length) {
3740
3736
  e.preventDefault();
3741
3737
  return;
@@ -3743,18 +3739,18 @@ function Tn(e) {
3743
3739
  let n = t[0], r = t.at(-1);
3744
3740
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
3745
3741
  }
3746
- var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
3747
- let l = u(wn), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = mn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
3742
+ var On = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
3743
+ let l = u(En), p = r ?? l.title, m = i ?? l.description, _ = f(), v = f(), y = h(null), b = h(null), x = h(null), [S, C] = g(0), [w, T] = g(!1), E = gn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
3748
3744
  d(() => {
3749
3745
  let e = document.activeElement, t = y.current;
3750
- return (t?.querySelector(Cn) ?? t)?.focus(), () => e?.focus();
3746
+ return (t?.querySelector(Tn) ?? t)?.focus(), () => e?.focus();
3751
3747
  }, []);
3752
3748
  let A = (e) => {
3753
3749
  e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
3754
3750
  };
3755
3751
  return /* @__PURE__ */ n("div", {
3756
3752
  ref: y,
3757
- className: `${Sn.panel} ${s}`,
3753
+ className: `${wn.panel} ${s}`,
3758
3754
  "data-closing": l.closing || void 0,
3759
3755
  "data-dragging": w || void 0,
3760
3756
  style: { "--ds-modal-drag-offset": `${S}px` },
@@ -3763,36 +3759,36 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3763
3759
  "aria-labelledby": O ? _ : void 0,
3764
3760
  "aria-describedby": k ? v : void 0,
3765
3761
  tabIndex: -1,
3766
- onKeyDown: Tn,
3762
+ onKeyDown: Dn,
3767
3763
  children: [
3768
3764
  /* @__PURE__ */ t("button", {
3769
3765
  type: "button",
3770
- className: Sn.dragHandle,
3766
+ className: wn.dragHandle,
3771
3767
  "aria-label": "Потяните вниз, чтобы закрыть модальное окно",
3772
3768
  onPointerDown: (e) => {
3773
- (e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = yn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
3769
+ (e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = xn(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
3774
3770
  },
3775
3771
  onPointerMove: (e) => {
3776
3772
  if (e.pointerId !== x.current || !b.current) return;
3777
- let t = bn(b.current, e.clientX, e.clientY);
3773
+ let t = Sn(b.current, e.clientX, e.clientY);
3778
3774
  b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
3779
3775
  },
3780
3776
  onPointerUp: (e) => {
3781
3777
  if (e.pointerId !== x.current || !b.current) return;
3782
- let t = xn(b.current, e.clientY, e.timeStamp);
3778
+ let t = Cn(b.current, e.clientY, e.timeStamp);
3783
3779
  A(e.currentTarget), t && D();
3784
3780
  },
3785
3781
  onPointerCancel: (e) => A(e.currentTarget),
3786
3782
  children: /* @__PURE__ */ t("span", {})
3787
3783
  }),
3788
3784
  (O || o) && /* @__PURE__ */ n("header", {
3789
- className: Sn.header,
3785
+ className: wn.header,
3790
3786
  children: [O && /* @__PURE__ */ t("h2", {
3791
3787
  id: _,
3792
- className: Sn.title,
3788
+ className: wn.title,
3793
3789
  children: p
3794
3790
  }), /* @__PURE__ */ t(j, {
3795
- className: Sn.close,
3791
+ className: wn.close,
3796
3792
  variant: "empty",
3797
3793
  size: "sm",
3798
3794
  "aria-label": o,
@@ -3806,17 +3802,17 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3806
3802
  }),
3807
3803
  k && /* @__PURE__ */ t("p", {
3808
3804
  id: v,
3809
- className: Sn.description,
3805
+ className: wn.description,
3810
3806
  children: m
3811
3807
  }),
3812
3808
  /* @__PURE__ */ t("div", {
3813
- className: Sn.content,
3809
+ className: wn.content,
3814
3810
  children: e
3815
3811
  })
3816
3812
  ]
3817
3813
  });
3818
- }, Dn = ({ registry: e }) => {
3819
- let n = mn((e) => e.modals), r = mn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
3814
+ }, kn = ({ registry: e }) => {
3815
+ let n = gn((e) => e.modals), r = gn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
3820
3816
  if (o.current.has(e)) return;
3821
3817
  a((t) => new Set(t).add(e));
3822
3818
  let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -3832,7 +3828,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3832
3828
  return () => e.forEach((e) => window.clearTimeout(e));
3833
3829
  }, []), d(() => {
3834
3830
  let e = (e) => {
3835
- let t = mn.getState().modals.at(-1);
3831
+ let t = gn.getState().modals.at(-1);
3836
3832
  e.key === "Escape" && t?.closeOnEscape && s(t.id);
3837
3833
  };
3838
3834
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
@@ -3845,21 +3841,21 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3845
3841
  n,
3846
3842
  e
3847
3843
  ]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
3848
- className: Sn.layer,
3844
+ className: wn.layer,
3849
3845
  "aria-label": "Модальные окна",
3850
3846
  children: n.map((r, a) => {
3851
3847
  let o = e[r.name];
3852
3848
  if (!o) return null;
3853
3849
  let c = i.has(r.id);
3854
3850
  return /* @__PURE__ */ t("div", {
3855
- className: Sn.backdrop,
3851
+ className: wn.backdrop,
3856
3852
  "data-closing": c || void 0,
3857
3853
  "aria-hidden": a !== n.length - 1 || void 0,
3858
3854
  inert: a !== n.length - 1 || void 0,
3859
3855
  onMouseDown: (e) => {
3860
3856
  e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
3861
3857
  },
3862
- children: /* @__PURE__ */ t(wn.Provider, {
3858
+ children: /* @__PURE__ */ t(En.Provider, {
3863
3859
  value: {
3864
3860
  title: r.title ?? r.payload.title,
3865
3861
  description: r.description ?? r.payload.description,
@@ -3876,31 +3872,31 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3876
3872
  }, r.id);
3877
3873
  })
3878
3874
  }), document.body);
3879
- }, On = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
3880
- let o = mn((e) => e.modals.length);
3875
+ }, An = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
3876
+ let o = gn((e) => e.modals.length);
3881
3877
  return d(() => {
3882
3878
  if (!a || o === 0) return;
3883
3879
  let e = document.body.style.overflow;
3884
3880
  return document.body.style.overflow = "hidden", () => {
3885
3881
  document.body.style.overflow = e;
3886
3882
  };
3887
- }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(Dn, { registry: r })] });
3888
- }, kn = (e) => e, An = {
3883
+ }, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(kn, { registry: r })] });
3884
+ }, jn = (e) => e, Mn = {
3889
3885
  message: "_message_c23ie_1",
3890
3886
  actions: "_actions_c23ie_13"
3891
- }, jn = /* @__PURE__ */ new Map(), Mn = 0, Nn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
3887
+ }, Nn = /* @__PURE__ */ new Map(), Pn = 0, Fn = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
3892
3888
  let u = (e) => {
3893
- jn.get(l)?.(e), jn.delete(l), r();
3889
+ Nn.get(l)?.(e), Nn.delete(l), r();
3894
3890
  };
3895
- return /* @__PURE__ */ n(En, {
3891
+ return /* @__PURE__ */ n(On, {
3896
3892
  modalId: e,
3897
3893
  title: i,
3898
3894
  role: "alertdialog",
3899
3895
  children: [/* @__PURE__ */ t("p", {
3900
- className: An.message,
3896
+ className: Mn.message,
3901
3897
  children: a
3902
3898
  }), /* @__PURE__ */ n("div", {
3903
- className: An.actions,
3899
+ className: Mn.actions,
3904
3900
  children: [/* @__PURE__ */ t(j, {
3905
3901
  variant: "outline",
3906
3902
  onClick: () => u(!1),
@@ -3912,46 +3908,46 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3912
3908
  })]
3913
3909
  })]
3914
3910
  });
3915
- }, Pn = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(En, {
3911
+ }, In = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(On, {
3916
3912
  modalId: e,
3917
3913
  title: i,
3918
3914
  role: "alertdialog",
3919
3915
  children: [/* @__PURE__ */ t("p", {
3920
- className: An.message,
3916
+ className: Mn.message,
3921
3917
  children: a
3922
3918
  }), /* @__PURE__ */ t("div", {
3923
- className: An.actions,
3919
+ className: Mn.actions,
3924
3920
  children: /* @__PURE__ */ t(j, {
3925
3921
  onClick: r,
3926
3922
  children: o
3927
3923
  })
3928
3924
  })]
3929
- }), Fn = kn({
3930
- ConfirmModal: Nn,
3931
- ErrorModal: Pn
3932
- }), In = () => {
3933
- let e = mn((e) => e.openModal);
3925
+ }), Ln = jn({
3926
+ ConfirmModal: Fn,
3927
+ ErrorModal: In
3928
+ }), Rn = () => {
3929
+ let e = gn((e) => e.openModal);
3934
3930
  return (t = {}) => new Promise((n) => {
3935
- Mn += 1;
3936
- let r = `confirm-${Mn}`;
3937
- jn.set(r, n), e("ConfirmModal", {
3931
+ Pn += 1;
3932
+ let r = `confirm-${Pn}`;
3933
+ Nn.set(r, n), e("ConfirmModal", {
3938
3934
  ...t,
3939
3935
  requestId: r
3940
3936
  }, {
3941
3937
  closeOnEscape: !1,
3942
3938
  onClose: () => {
3943
- jn.get(r)?.(!1), jn.delete(r);
3939
+ Nn.get(r)?.(!1), Nn.delete(r);
3944
3940
  }
3945
3941
  });
3946
3942
  });
3947
- }, Ln = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Rn = () => {
3948
- let e = mn((e) => e.openModal);
3943
+ }, zn = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", Bn = () => {
3944
+ let e = gn((e) => e.openModal);
3949
3945
  return { showError: (t, n) => e("ErrorModal", {
3950
3946
  title: n,
3951
- message: Ln(t)
3947
+ message: zn(t)
3952
3948
  }) };
3953
- }, zn = S(() => ({})), Bn = S(() => ({})), Vn = () => {
3954
- let e = mn((e) => e.modals), t = mn((e) => e.openModal), n = mn((e) => e.closeModal), r = mn((e) => e.closeTopModal), i = mn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
3949
+ }, Vn = S(() => ({})), Hn = S(() => ({})), Un = () => {
3950
+ let e = gn((e) => e.modals), t = gn((e) => e.openModal), n = gn((e) => e.closeModal), r = gn((e) => e.closeTopModal), i = gn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
3955
3951
  return m(() => ({
3956
3952
  openModal: a,
3957
3953
  closeModal: n,
@@ -3967,7 +3963,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3967
3963
  e.length,
3968
3964
  a
3969
3965
  ]);
3970
- }, Hn = {
3966
+ }, Wn = {
3971
3967
  layer: "_layer_ct7yp_1",
3972
3968
  backdrop: "_backdrop_ct7yp_13",
3973
3969
  panel: "_panel_ct7yp_27",
@@ -3987,16 +3983,16 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
3987
3983
  "enter-right": "_enter-right_ct7yp_1",
3988
3984
  "enter-left": "_enter-left_ct7yp_1",
3989
3985
  "enter-bottom": "_enter-bottom_ct7yp_1"
3990
- }, Un = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Wn = a(null), Gn = (e) => {
3986
+ }, Gn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Kn = a(null), qn = (e) => {
3991
3987
  if (e.key !== "Tab") return;
3992
- let t = Array.from(e.currentTarget.querySelectorAll(Un));
3988
+ let t = Array.from(e.currentTarget.querySelectorAll(Gn));
3993
3989
  if (!t.length) {
3994
3990
  e.preventDefault();
3995
3991
  return;
3996
3992
  }
3997
3993
  let n = t[0], r = t.at(-1);
3998
3994
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
3999
- }, Kn = () => u(Wn), qn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
3995
+ }, Jn = () => u(Kn), Yn = ({ open: e, onCloseRequest: r, children: i, title: a, description: o, headerActions: s, footer: c, placement: l = "right", size: u = "md", closeOnEscape: p = !0, closeOnBackdrop: m = !0, preventClose: g = !1, closeLabel: v = "Закрыть", initialFocusRef: y, returnFocusRef: b, className: x = "" }) => {
4000
3996
  let S = h(null), C = f(), w = f(), T = (e) => {
4001
3997
  g || r(e);
4002
3998
  };
@@ -4005,7 +4001,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4005
4001
  let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
4006
4002
  document.body.style.overflow = "hidden";
4007
4003
  let a = S.current;
4008
- (y?.current ?? a?.querySelector(Un) ?? a)?.focus();
4004
+ (y?.current ?? a?.querySelector(Gn) ?? a)?.focus();
4009
4005
  let o = (e) => {
4010
4006
  e.key === "Escape" && p && !g && r("escape");
4011
4007
  };
@@ -4020,29 +4016,29 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4020
4016
  g,
4021
4017
  b
4022
4018
  ]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
4023
- className: Hn.layer,
4019
+ className: Wn.layer,
4024
4020
  children: /* @__PURE__ */ t("div", {
4025
- className: Hn.backdrop,
4021
+ className: Wn.backdrop,
4026
4022
  onMouseDown: (e) => {
4027
4023
  e.target === e.currentTarget && m && T("backdrop");
4028
4024
  },
4029
- children: /* @__PURE__ */ t(Wn.Provider, {
4025
+ children: /* @__PURE__ */ t(Kn.Provider, {
4030
4026
  value: { requestClose: T },
4031
4027
  children: /* @__PURE__ */ n("section", {
4032
4028
  ref: S,
4033
- className: `${Hn.panel} ${Hn[l]} ${Hn[u]} ${x}`,
4029
+ className: `${Wn.panel} ${Wn[l]} ${Wn[u]} ${x}`,
4034
4030
  role: "dialog",
4035
4031
  "aria-modal": "true",
4036
4032
  "aria-labelledby": a ? C : void 0,
4037
4033
  "aria-describedby": o ? w : void 0,
4038
4034
  tabIndex: -1,
4039
- onKeyDown: Gn,
4035
+ onKeyDown: qn,
4040
4036
  children: [
4041
4037
  /* @__PURE__ */ n("header", {
4042
- className: Hn.header,
4038
+ className: Wn.header,
4043
4039
  children: [
4044
4040
  /* @__PURE__ */ n("div", {
4045
- className: Hn.heading,
4041
+ className: Wn.heading,
4046
4042
  children: [a && /* @__PURE__ */ t("h2", {
4047
4043
  id: C,
4048
4044
  children: a
@@ -4052,7 +4048,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4052
4048
  })]
4053
4049
  }),
4054
4050
  s && /* @__PURE__ */ t("div", {
4055
- className: Hn.headerActions,
4051
+ className: Wn.headerActions,
4056
4052
  children: s
4057
4053
  }),
4058
4054
  /* @__PURE__ */ t(j, {
@@ -4070,11 +4066,11 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4070
4066
  ]
4071
4067
  }),
4072
4068
  /* @__PURE__ */ t("div", {
4073
- className: Hn.content,
4069
+ className: Wn.content,
4074
4070
  children: i
4075
4071
  }),
4076
4072
  c && /* @__PURE__ */ t("footer", {
4077
- className: Hn.footer,
4073
+ className: Wn.footer,
4078
4074
  children: c
4079
4075
  })
4080
4076
  ]
@@ -4082,17 +4078,17 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4082
4078
  })
4083
4079
  })
4084
4080
  }), document.body);
4085
- }, Jn = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(qn, {
4081
+ }, Xn = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(Yn, {
4086
4082
  ...n,
4087
4083
  placement: e
4088
- }), Yn = (e) => /* @__PURE__ */ t(qn, {
4084
+ }), Zn = (e) => /* @__PURE__ */ t(Yn, {
4089
4085
  ...e,
4090
4086
  placement: "bottom"
4091
- }), Xn = (e) => /* @__PURE__ */ t(qn, {
4087
+ }), Qn = (e) => /* @__PURE__ */ t(Yn, {
4092
4088
  ...e,
4093
4089
  placement: "fullscreen",
4094
4090
  size: "xl"
4095
- }), Zn = {
4091
+ }), $n = {
4096
4092
  wrapper: "_wrapper_1hyyy_1",
4097
4093
  container: "_container_1hyyy_15",
4098
4094
  inner: "_inner_1hyyy_35",
@@ -4107,29 +4103,29 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4107
4103
  empty: "_empty_1hyyy_153",
4108
4104
  destructive: "_destructive_1hyyy_161",
4109
4105
  destructiveOutline: "_destructiveOutline_1hyyy_169"
4110
- }, Qn = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
4111
- className: Zn.wrapper,
4106
+ }, er = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
4107
+ className: $n.wrapper,
4112
4108
  children: /* @__PURE__ */ t("div", {
4113
- className: Zn.container,
4109
+ className: $n.container,
4114
4110
  children: /* @__PURE__ */ n("div", {
4115
- className: Zn.inner,
4111
+ className: $n.inner,
4116
4112
  children: [
4117
4113
  /* @__PURE__ */ t("div", {
4118
- className: Zn.cube,
4119
- children: /* @__PURE__ */ t("div", { className: `${Zn.cube__inner} ${Zn[e]}` })
4114
+ className: $n.cube,
4115
+ children: /* @__PURE__ */ t("div", { className: `${$n.cube__inner} ${$n[e]}` })
4120
4116
  }),
4121
4117
  /* @__PURE__ */ t("div", {
4122
- className: Zn.cube,
4123
- children: /* @__PURE__ */ t("div", { className: `${Zn.cube__inner} ${Zn[e]}` })
4118
+ className: $n.cube,
4119
+ children: /* @__PURE__ */ t("div", { className: `${$n.cube__inner} ${$n[e]}` })
4124
4120
  }),
4125
4121
  /* @__PURE__ */ t("div", {
4126
- className: Zn.cube,
4127
- children: /* @__PURE__ */ t("div", { className: `${Zn.cube__inner} ${Zn[e]}` })
4122
+ className: $n.cube,
4123
+ children: /* @__PURE__ */ t("div", { className: `${$n.cube__inner} ${$n[e]}` })
4128
4124
  })
4129
4125
  ]
4130
4126
  })
4131
4127
  })
4132
- }), $n = {
4128
+ }), tr = {
4133
4129
  viewport: "_viewport_bu4eh_1",
4134
4130
  "top-right": "_top-right_bu4eh_21",
4135
4131
  "top-left": "_top-left_bu4eh_31",
@@ -4145,12 +4141,12 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4145
4141
  success: "_success_bu4eh_195",
4146
4142
  warning: "_warning_bu4eh_203",
4147
4143
  error: "_error_bu4eh_211"
4148
- }, er = {
4144
+ }, nr = {
4149
4145
  info: "IconInfoCircle",
4150
4146
  success: "IconSuccessCircle",
4151
4147
  warning: "IconWarning",
4152
4148
  error: "IconWarning"
4153
- }, tr = ({ toast: e, onClose: r }) => {
4149
+ }, rr = ({ toast: e, onClose: r }) => {
4154
4150
  let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
4155
4151
  return d(() => {
4156
4152
  if (i || o || e.duration <= 0) return;
@@ -4170,7 +4166,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4170
4166
  let e = () => s(document.hidden);
4171
4167
  return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
4172
4168
  }, []), /* @__PURE__ */ n("article", {
4173
- className: `${$n.toast} ${$n[e.variant]}`,
4169
+ className: `${tr.toast} ${tr[e.variant]}`,
4174
4170
  role: e.variant === "error" ? "alert" : "status",
4175
4171
  "aria-live": e.variant === "error" ? "assertive" : "polite",
4176
4172
  onMouseEnter: () => a(!0),
@@ -4179,24 +4175,24 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4179
4175
  onBlur: () => a(!1),
4180
4176
  children: [
4181
4177
  /* @__PURE__ */ t("div", {
4182
- className: $n.icon,
4178
+ className: tr.icon,
4183
4179
  "aria-hidden": "true",
4184
4180
  children: /* @__PURE__ */ t(Y, {
4185
- name: er[e.variant],
4181
+ name: nr[e.variant],
4186
4182
  color: "var(--ds-toast-accent)",
4187
4183
  width: 20,
4188
4184
  height: 20
4189
4185
  })
4190
4186
  }),
4191
4187
  /* @__PURE__ */ n("div", {
4192
- className: $n.body,
4188
+ className: tr.body,
4193
4189
  children: [
4194
4190
  e.title && /* @__PURE__ */ t("strong", {
4195
- className: $n.title,
4191
+ className: tr.title,
4196
4192
  children: e.title
4197
4193
  }),
4198
4194
  /* @__PURE__ */ t("div", {
4199
- className: $n.message,
4195
+ className: tr.message,
4200
4196
  children: e.message
4201
4197
  }),
4202
4198
  e.action && /* @__PURE__ */ t(j, {
@@ -4222,15 +4218,15 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4222
4218
  })
4223
4219
  ]
4224
4220
  });
4225
- }, nr = 0, rr = S((e, t) => ({
4221
+ }, ir = 0, ar = S((e, t) => ({
4226
4222
  toasts: [],
4227
4223
  showToast: (n) => {
4228
4224
  if (n.dedupeKey) {
4229
4225
  let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
4230
4226
  if (e) return e.id;
4231
4227
  }
4232
- nr += 1;
4233
- let r = `ds-toast-${nr}`;
4228
+ ir += 1;
4229
+ let r = `ds-toast-${ir}`;
4234
4230
  return e((e) => ({ toasts: [...e.toasts, {
4235
4231
  variant: "info",
4236
4232
  duration: 5e3,
@@ -4241,18 +4237,18 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4241
4237
  },
4242
4238
  removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
4243
4239
  clearToasts: () => e({ toasts: [] })
4244
- })), ir = () => rr.setState({ toasts: [] }), ar = ({ position: e = "top-right", maxVisible: n }) => {
4245
- let r = rr((e) => e.toasts), i = rr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
4240
+ })), or = () => ar.setState({ toasts: [] }), sr = ({ position: e = "top-right", maxVisible: n }) => {
4241
+ let r = ar((e) => e.toasts), i = ar((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
4246
4242
  return /* @__PURE__ */ t("div", {
4247
- className: `${$n.viewport} ${$n[e]}`,
4243
+ className: `${tr.viewport} ${tr[e]}`,
4248
4244
  "aria-label": "Уведомления",
4249
- children: a.map((e) => /* @__PURE__ */ t(tr, {
4245
+ children: a.map((e) => /* @__PURE__ */ t(rr, {
4250
4246
  toast: e,
4251
4247
  onClose: i
4252
4248
  }, e.id))
4253
4249
  });
4254
- }, or = () => {
4255
- let e = rr((e) => e.showToast), t = rr((e) => e.removeToast), n = rr((e) => e.clearToasts), r = l((t) => e({
4250
+ }, cr = () => {
4251
+ let e = ar((e) => e.showToast), t = ar((e) => e.removeToast), n = ar((e) => e.clearToasts), r = l((t) => e({
4256
4252
  ...t,
4257
4253
  variant: "info"
4258
4254
  }), [e]), i = l((t) => e({
@@ -4282,24 +4278,24 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4282
4278
  i,
4283
4279
  a
4284
4280
  ]);
4285
- }, sr = {
4281
+ }, lr = {
4286
4282
  root: "_root_ncmxp_1",
4287
4283
  tooltip: "_tooltip_ncmxp_11",
4288
4284
  "ds-tooltip-in": "_ds-tooltip-in_ncmxp_1"
4289
- }, cr = 8, lr = 16, ur = {
4285
+ }, ur = 8, dr = 16, fr = {
4290
4286
  top: "bottom",
4291
4287
  right: "left",
4292
4288
  bottom: "top",
4293
4289
  left: "right"
4294
- }, dr = (e, t, n) => e === "top" ? t.top >= n.height + cr + lr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + cr + lr : e === "left" ? t.left >= n.width + cr + lr : window.innerWidth - t.right >= n.width + cr + lr, fr = (e, t, n) => {
4290
+ }, pr = (e, t, n) => e === "top" ? t.top >= n.height + ur + dr : e === "bottom" ? window.innerHeight - t.bottom >= n.height + ur + dr : e === "left" ? t.left >= n.width + ur + dr : window.innerWidth - t.right >= n.width + ur + dr, mr = (e, t, n) => {
4295
4291
  if (!(t.bottom > 0 && t.right > 0 && t.top < window.innerHeight && t.left < window.innerWidth)) return null;
4296
- let r = dr(e, t, n) ? e : dr(ur[e], t, n) ? ur[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
4297
- return r === "top" && (a = t.top - n.height - cr), r === "bottom" && (a = t.bottom + cr), r === "left" && (i = t.left - n.width - cr), r === "right" && (i = t.right + cr), i = Math.min(Math.max(i, lr), Math.max(lr, window.innerWidth - n.width - lr)), a = Math.min(Math.max(a, lr), Math.max(lr, window.innerHeight - n.height - lr)), {
4292
+ let r = pr(e, t, n) ? e : pr(fr[e], t, n) ? fr[e] : e, i = t.left + (t.width - n.width) / 2, a = t.top + (t.height - n.height) / 2;
4293
+ return r === "top" && (a = t.top - n.height - ur), r === "bottom" && (a = t.bottom + ur), r === "left" && (i = t.left - n.width - ur), r === "right" && (i = t.right + ur), i = Math.min(Math.max(i, dr), Math.max(dr, window.innerWidth - n.width - dr)), a = Math.min(Math.max(a, dr), Math.max(dr, window.innerHeight - n.height - dr)), {
4298
4294
  left: i,
4299
4295
  top: a,
4300
4296
  visibility: "visible"
4301
4297
  };
4302
- }, pr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
4298
+ }, hr = ({ content: e, children: r, placement: a = "top", delay: o = 450, disabled: s = !1, maxWidth: u = 280, className: p = "" }) => {
4303
4299
  let m = f(), [_, v] = g(!1), [y, b] = g({ visibility: "hidden" }), [x, S] = g(null), C = h(null), w = h(null), T = l(() => {
4304
4300
  C.current && clearTimeout(C.current), C.current = null, v(!1);
4305
4301
  }, []), E = l(() => {
@@ -4317,7 +4313,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4317
4313
  let e = () => {
4318
4314
  let e = w.current;
4319
4315
  if (!e || !x) return;
4320
- let t = fr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
4316
+ let t = mr(a, e.getBoundingClientRect(), x.getBoundingClientRect());
4321
4317
  if (!t) {
4322
4318
  T();
4323
4319
  return;
@@ -4354,24 +4350,24 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4354
4350
  });
4355
4351
  return /* @__PURE__ */ n("span", {
4356
4352
  ref: w,
4357
- className: `${sr.root} ${p}`,
4353
+ className: `${lr.root} ${p}`,
4358
4354
  onPointerDown: _ ? T : E,
4359
- children: [O, _ && /* @__PURE__ */ t(sn, { children: /* @__PURE__ */ t("span", {
4355
+ children: [O, _ && /* @__PURE__ */ t(ln, { children: /* @__PURE__ */ t("span", {
4360
4356
  ref: S,
4361
4357
  id: m,
4362
4358
  role: "tooltip",
4363
- className: sr.tooltip,
4359
+ className: lr.tooltip,
4364
4360
  style: D,
4365
4361
  children: e
4366
4362
  }) })]
4367
4363
  });
4368
- }, mr = {
4364
+ }, gr = {
4369
4365
  root: "_root_bs28m_1",
4370
4366
  tabList: "_tabList_bs28m_11",
4371
4367
  tab: "_tab_bs28m_11",
4372
4368
  panels: "_panels_bs28m_127",
4373
4369
  panel: "_panel_bs28m_127"
4374
- }, hr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
4370
+ }, _r = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
4375
4371
  let l = `ds-tabs-${f().replace(/:/g, "")}`, u = h([]), d = o || s, p = e.findIndex((e) => e.id === r), m = e.findIndex((e) => !e.disabled), g = p >= 0 && !e[p]?.disabled ? p : m, _ = (t) => {
4376
4372
  let n = e[t];
4377
4373
  !n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
@@ -4401,10 +4397,10 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4401
4397
  t.preventDefault(), _(a);
4402
4398
  };
4403
4399
  return /* @__PURE__ */ n("div", {
4404
- className: `${mr.root} ${c}`,
4400
+ className: `${gr.root} ${c}`,
4405
4401
  "aria-busy": s || void 0,
4406
4402
  children: [/* @__PURE__ */ t("div", {
4407
- className: mr.tabList,
4403
+ className: gr.tabList,
4408
4404
  role: "tablist",
4409
4405
  "aria-label": a,
4410
4406
  "aria-orientation": "horizontal",
@@ -4416,7 +4412,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4416
4412
  u.current[n] = e;
4417
4413
  },
4418
4414
  id: a,
4419
- className: mr.tab,
4415
+ className: gr.tab,
4420
4416
  type: "button",
4421
4417
  role: "tab",
4422
4418
  "aria-selected": i,
@@ -4429,12 +4425,12 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4429
4425
  }, e.id);
4430
4426
  })
4431
4427
  }), /* @__PURE__ */ t("div", {
4432
- className: mr.panels,
4428
+ className: gr.panels,
4433
4429
  children: e.map((e, n) => {
4434
4430
  let i = e.id === r;
4435
4431
  return /* @__PURE__ */ t("div", {
4436
4432
  id: `${l}-panel-${n}`,
4437
- className: mr.panel,
4433
+ className: gr.panel,
4438
4434
  role: "tabpanel",
4439
4435
  "aria-labelledby": `${l}-tab-${n}`,
4440
4436
  tabIndex: 0,
@@ -4444,7 +4440,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4444
4440
  })
4445
4441
  })]
4446
4442
  });
4447
- }, gr = (e) => {
4443
+ }, vr = (e) => {
4448
4444
  if (!Number.isFinite(e) || e < 0) return "00:00";
4449
4445
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
4450
4446
  return n ? `${n}:${a}` : a;
@@ -4477,19 +4473,19 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4477
4473
  settingsActionLabel: "_settingsActionLabel_14cqp_693",
4478
4474
  caption: "_caption_14cqp_705",
4479
4475
  fullscreen: "_fullscreen_14cqp_719"
4480
- }, _r = 2500, vr = 5, yr = .05, br = [
4476
+ }, yr = 2500, br = 5, xr = .05, Sr = [
4481
4477
  .5,
4482
4478
  .75,
4483
4479
  1,
4484
4480
  1.25,
4485
4481
  1.5,
4486
4482
  2
4487
- ], xr = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
4483
+ ], Cr = ({ sources: r, tracks: i = [], title: a, aspectRatio: o = "16 / 9", objectFit: s = "contain", loading: c = !1, error: u, fallback: f, className: p = "", controls: m = !0, playsInline: _ = !0, ...v }) => {
4488
4484
  let y = h(null), b = h(null), x = h(null), S = h(void 0), [C, w] = g(!1), [T, E] = g(r.length > 0), [D, O] = g(!1), [A, M] = g(!1), [ee, N] = g(!1), [P, F] = g(0), [I, L] = g(0), [R, z] = g(0), [B, V] = g(1), [H, U] = g(!!v.muted), [W, te] = g(1), [ne, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce, G] = g(!0), [le, ue] = g(!1), [de, K] = g(!1), fe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), pe = i.map((e, t) => ({
4489
4485
  track: e,
4490
4486
  index: t
4491
4487
  })).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), me = u ?? (C ? "Не удалось воспроизвести видео" : void 0), he = c || T && !me && r.length > 0, ge = !he && !me && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
4492
- G(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => G(!1), _r));
4488
+ G(!0), window.clearTimeout(S.current), A && !oe && (S.current = window.setTimeout(() => G(!1), yr));
4493
4489
  }, [A, oe]);
4494
4490
  d(() => {
4495
4491
  w(!1), E(r.length > 0), O(!1), M(!1), N(!1), F(0), L(0), z(0);
@@ -4548,7 +4544,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4548
4544
  let t = e.target;
4549
4545
  if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
4550
4546
  let n = e.key.toLowerCase();
4551
- n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && pe.length ? (e.preventDefault(), Te(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ? vr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(B + (e.key === "ArrowUp" ? yr : -.05))) : e.key === "Escape" && se(!1), ve();
4547
+ n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && pe.length ? (e.preventDefault(), Te(ie === -1 ? pe[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(P + (e.key === "ArrowRight" ? br : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(B + (e.key === "ArrowUp" ? xr : -.05))) : e.key === "Escape" && se(!1), ve();
4552
4548
  }, q = () => {
4553
4549
  let e = x.current;
4554
4550
  w(!1), E(!0), e?.load();
@@ -4647,7 +4643,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4647
4643
  "aria-hidden": "true",
4648
4644
  children: /* @__PURE__ */ t("div", {
4649
4645
  className: $.loaderScale,
4650
- children: /* @__PURE__ */ t(Qn, {})
4646
+ children: /* @__PURE__ */ t(er, {})
4651
4647
  })
4652
4648
  }), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
4653
4649
  }),
@@ -4715,7 +4711,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4715
4711
  let t = Number(e.target.value);
4716
4712
  x.current && (x.current.playbackRate = t);
4717
4713
  },
4718
- children: br.map((e) => /* @__PURE__ */ n("option", {
4714
+ children: Sr.map((e) => /* @__PURE__ */ n("option", {
4719
4715
  value: e,
4720
4716
  children: [e, "×"]
4721
4717
  }, e))
@@ -4802,7 +4798,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4802
4798
  children: [
4803
4799
  /* @__PURE__ */ t("span", {
4804
4800
  className: $.time,
4805
- children: gr(P)
4801
+ children: vr(P)
4806
4802
  }),
4807
4803
  /* @__PURE__ */ t("input", {
4808
4804
  className: $.timeline,
@@ -4813,12 +4809,12 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4813
4809
  step: .01,
4814
4810
  value: Math.min(P, I || 0),
4815
4811
  "aria-label": "Позиция воспроизведения",
4816
- "aria-valuetext": `${gr(P)} из ${gr(I)}`,
4812
+ "aria-valuetext": `${vr(P)} из ${vr(I)}`,
4817
4813
  onChange: (e) => Se(Number(e.target.value))
4818
4814
  }),
4819
4815
  /* @__PURE__ */ t("span", {
4820
4816
  className: $.time,
4821
- children: gr(I)
4817
+ children: vr(I)
4822
4818
  })
4823
4819
  ]
4824
4820
  }),
@@ -4858,7 +4854,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4858
4854
  children: a
4859
4855
  })]
4860
4856
  });
4861
- }, Sr = {
4857
+ }, wr = {
4862
4858
  root: "_root_ymidq_1",
4863
4859
  trigger: "_trigger_ymidq_15",
4864
4860
  heading: "_heading_ymidq_41",
@@ -4868,7 +4864,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4868
4864
  open: "_open_ymidq_91",
4869
4865
  content: "_content_ymidq_99",
4870
4866
  contentInner: "_contentInner_ymidq_119"
4871
- }, Cr = (e, t, n, r = 16) => {
4867
+ }, Tr = (e, t, n, r = 16) => {
4872
4868
  if (t > Math.max(0, n - r * 2)) {
4873
4869
  let t = e - r;
4874
4870
  return Math.abs(t) <= 1 ? {
@@ -4890,7 +4886,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4890
4886
  alignment: "none",
4891
4887
  delta: 0
4892
4888
  };
4893
- }, wr = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
4889
+ }, Er = ({ title: e, subtitle: r, children: i, defaultOpen: a = !1, open: o, onOpenChange: s, autoScrollOnOpen: c = !0, scrollOffset: l = 16, className: u = "" }) => {
4894
4890
  let p = f(), [m, _] = g(a), v = o ?? m, y = h(null), b = h(null), x = h(v);
4895
4891
  return d(() => {
4896
4892
  let e = x.current;
@@ -4900,7 +4896,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4900
4896
  let r = !1, i = () => {
4901
4897
  if (r) return;
4902
4898
  r = !0;
4903
- let e = t.getBoundingClientRect(), n = Cr(e.top, e.height, window.innerHeight, l);
4899
+ let e = t.getBoundingClientRect(), n = Tr(e.top, e.height, window.innerHeight, l);
4904
4900
  if (n.alignment === "none") return;
4905
4901
  let i = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
4906
4902
  window.scrollBy({
@@ -4921,10 +4917,10 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4921
4917
  l
4922
4918
  ]), /* @__PURE__ */ n("section", {
4923
4919
  ref: y,
4924
- className: `${Sr.root} ${v ? Sr.open : ""} ${u}`,
4920
+ className: `${wr.root} ${v ? wr.open : ""} ${u}`,
4925
4921
  children: [/* @__PURE__ */ n("button", {
4926
4922
  type: "button",
4927
- className: Sr.trigger,
4923
+ className: wr.trigger,
4928
4924
  "aria-expanded": v,
4929
4925
  "aria-controls": p,
4930
4926
  onClick: () => {
@@ -4932,16 +4928,16 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4932
4928
  o === void 0 && _(e), s?.(e);
4933
4929
  },
4934
4930
  children: [/* @__PURE__ */ n("span", {
4935
- className: Sr.heading,
4931
+ className: wr.heading,
4936
4932
  children: [/* @__PURE__ */ t("span", {
4937
- className: Sr.title,
4933
+ className: wr.title,
4938
4934
  children: e
4939
4935
  }), r && /* @__PURE__ */ t("span", {
4940
- className: Sr.subtitle,
4936
+ className: wr.subtitle,
4941
4937
  children: r
4942
4938
  })]
4943
4939
  }), /* @__PURE__ */ t("span", {
4944
- className: Sr.icon,
4940
+ className: wr.icon,
4945
4941
  "aria-hidden": "true",
4946
4942
  children: /* @__PURE__ */ t(Y, {
4947
4943
  name: "IconChevron",
@@ -4952,15 +4948,15 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4952
4948
  }), /* @__PURE__ */ t("div", {
4953
4949
  ref: b,
4954
4950
  id: p,
4955
- className: Sr.content,
4951
+ className: wr.content,
4956
4952
  "aria-hidden": !v,
4957
4953
  children: /* @__PURE__ */ t("div", {
4958
- className: Sr.contentInner,
4954
+ className: wr.contentInner,
4959
4955
  children: i
4960
4956
  })
4961
4957
  })]
4962
4958
  });
4963
- }, Tr = {
4959
+ }, Dr = {
4964
4960
  root: "_root_14ewt_1",
4965
4961
  topSlot: "_topSlot_14ewt_29",
4966
4962
  searchSlot: "_searchSlot_14ewt_31",
@@ -4978,14 +4974,14 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4978
4974
  description: "_description_14ewt_235",
4979
4975
  badge: "_badge_14ewt_269",
4980
4976
  empty: "_empty_14ewt_281"
4981
- }, Er = (e, t, n) => {
4977
+ }, Or = (e, t, n) => {
4982
4978
  if (e.length === 0) return -1;
4983
4979
  for (let r = 1; r <= e.length; r += 1) {
4984
4980
  let i = (t + n * r + e.length) % e.length;
4985
4981
  if (!e[i]?.disabled) return i;
4986
4982
  }
4987
4983
  return -1;
4988
- }, Dr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
4984
+ }, kr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
4989
4985
  let m = f(), g = h(null), _ = h({
4990
4986
  value: "",
4991
4987
  time: 0
@@ -4997,7 +4993,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
4997
4993
  let n = v.findIndex((e) => e.id === t.id);
4998
4994
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
4999
4995
  e.preventDefault();
5000
- let t = Er(v, n, e.key === "ArrowDown" ? 1 : -1);
4996
+ let t = Or(v, n, e.key === "ArrowDown" ? 1 : -1);
5001
4997
  x(v[t]);
5002
4998
  return;
5003
4999
  }
@@ -5017,26 +5013,26 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5017
5013
  let a = r.id === i, o = {
5018
5014
  children: /* @__PURE__ */ n(e, { children: [
5019
5015
  r.icon && /* @__PURE__ */ t("span", {
5020
- className: Tr.icon,
5016
+ className: Dr.icon,
5021
5017
  "aria-hidden": "true",
5022
5018
  children: r.icon
5023
5019
  }),
5024
5020
  /* @__PURE__ */ n("span", {
5025
- className: Tr.copy,
5021
+ className: Dr.copy,
5026
5022
  children: [/* @__PURE__ */ t("span", {
5027
- className: Tr.label,
5023
+ className: Dr.label,
5028
5024
  children: r.label
5029
5025
  }), r.description && /* @__PURE__ */ t("span", {
5030
- className: Tr.description,
5026
+ className: Dr.description,
5031
5027
  children: r.description
5032
5028
  })]
5033
5029
  }),
5034
5030
  r.badge && /* @__PURE__ */ t("span", {
5035
- className: Tr.badge,
5031
+ className: Dr.badge,
5036
5032
  children: r.badge
5037
5033
  })
5038
5034
  ] }),
5039
- className: `${Tr.link} ${a ? Tr.current : ""}`,
5035
+ className: `${Dr.link} ${a ? Dr.current : ""}`,
5040
5036
  tabIndex: r.id === b ? 0 : -1,
5041
5037
  "aria-current": a ? "page" : void 0,
5042
5038
  "aria-disabled": r.disabled ? !0 : void 0,
@@ -5052,7 +5048,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5052
5048
  onKeyDown: (e) => S(e, r)
5053
5049
  };
5054
5050
  return /* @__PURE__ */ t("li", {
5055
- className: Tr.item,
5051
+ className: Dr.item,
5056
5052
  children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
5057
5053
  href: r.href,
5058
5054
  ...o,
@@ -5067,45 +5063,45 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5067
5063
  };
5068
5064
  return /* @__PURE__ */ n("nav", {
5069
5065
  ref: g,
5070
- className: `${Tr.root} ${p}`,
5066
+ className: `${Dr.root} ${p}`,
5071
5067
  "aria-label": a,
5072
5068
  children: [
5073
5069
  s && /* @__PURE__ */ t("div", {
5074
- className: Tr.topSlot,
5070
+ className: Dr.topSlot,
5075
5071
  children: s
5076
5072
  }),
5077
5073
  o && /* @__PURE__ */ t("div", {
5078
- className: Tr.searchSlot,
5074
+ className: Dr.searchSlot,
5079
5075
  children: o
5080
5076
  }),
5081
5077
  /* @__PURE__ */ n("div", {
5082
- className: Tr.groups,
5078
+ className: Dr.groups,
5083
5079
  children: [r.map((e) => {
5084
5080
  let r = `${m}-${e.id}`;
5085
5081
  return /* @__PURE__ */ n("section", {
5086
- className: Tr.group,
5082
+ className: Dr.group,
5087
5083
  "aria-labelledby": e.label ? r : void 0,
5088
5084
  children: [e.label && /* @__PURE__ */ t("div", {
5089
5085
  id: r,
5090
- className: Tr.groupLabel,
5086
+ className: Dr.groupLabel,
5091
5087
  children: e.label
5092
5088
  }), /* @__PURE__ */ t("ul", {
5093
- className: Tr.list,
5089
+ className: Dr.list,
5094
5090
  children: e.items.map(C)
5095
5091
  })]
5096
5092
  }, e.id);
5097
5093
  }), v.length === 0 && l && /* @__PURE__ */ t("div", {
5098
- className: Tr.empty,
5094
+ className: Dr.empty,
5099
5095
  children: l
5100
5096
  })]
5101
5097
  }),
5102
5098
  c && /* @__PURE__ */ t("div", {
5103
- className: Tr.bottomSlot,
5099
+ className: Dr.bottomSlot,
5104
5100
  children: c
5105
5101
  })
5106
5102
  ]
5107
5103
  });
5108
- }, Or = {
5104
+ }, Ar = {
5109
5105
  root: "_root_2mdgb_1",
5110
5106
  list: "_list_2mdgb_19",
5111
5107
  item: "_item_2mdgb_37",
@@ -5115,7 +5111,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5115
5111
  icon: "_icon_2mdgb_141",
5116
5112
  badge: "_badge_2mdgb_149",
5117
5113
  label: "_label_2mdgb_163"
5118
- }, kr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
5114
+ }, jr = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
5119
5115
  let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
5120
5116
  l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
5121
5117
  }, p = (e, t) => {
@@ -5132,27 +5128,27 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5132
5128
  };
5133
5129
  return /* @__PURE__ */ t("nav", {
5134
5130
  ref: l,
5135
- className: `${Or.root} ${c}`,
5131
+ className: `${Ar.root} ${c}`,
5136
5132
  "aria-label": a,
5137
5133
  children: /* @__PURE__ */ t("ul", {
5138
- className: Or.list,
5134
+ className: Ar.list,
5139
5135
  children: r.map((r) => {
5140
5136
  let a = r.id === i, c = {
5141
5137
  children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
5142
- className: Or.visual,
5138
+ className: Ar.visual,
5143
5139
  children: [r.icon && /* @__PURE__ */ t("span", {
5144
- className: Or.icon,
5140
+ className: Ar.icon,
5145
5141
  "aria-hidden": "true",
5146
5142
  children: r.icon
5147
5143
  }), r.badge && /* @__PURE__ */ t("span", {
5148
- className: Or.badge,
5144
+ className: Ar.badge,
5149
5145
  children: r.badge
5150
5146
  })]
5151
5147
  }), /* @__PURE__ */ t("span", {
5152
- className: Or.label,
5148
+ className: Ar.label,
5153
5149
  children: r.label
5154
5150
  })] }),
5155
- className: `${Or.link} ${a ? Or.current : ""}`,
5151
+ className: `${Ar.link} ${a ? Ar.current : ""}`,
5156
5152
  tabIndex: r.id === d ? 0 : -1,
5157
5153
  "aria-current": a ? "page" : void 0,
5158
5154
  "aria-disabled": r.disabled ? !0 : void 0,
@@ -5168,7 +5164,7 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5168
5164
  onKeyDown: (e) => p(e, r)
5169
5165
  };
5170
5166
  return /* @__PURE__ */ t("li", {
5171
- className: Or.item,
5167
+ className: Ar.item,
5172
5168
  children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
5173
5169
  href: r.href,
5174
5170
  ...c,
@@ -5185,4 +5181,4 @@ var En = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
5185
5181
  });
5186
5182
  };
5187
5183
  //#endregion
5188
- export { Nn as ConfirmModal, wr as DSAccordion, w as DSBadge, kr as DSBottomNavigation, Yn as DSBottomSheet, j as DSButton, Ne as DSCheckbox, D as DSCounterBadge, Lt as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, Jn as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, on as DSFileInput, Xt as DSFilters, cn as DSFloatingMenu, Qt as DSFormGrid, $t as DSFormGridItem, Xn as DSFullscreenDialog, Y as DSIcon, je as DSIconNames, Jt as DSInfoBlock, mt as DSInput, k as DSLoader, Dn as DSModal, En as DSModalFrame, Dr as DSNavigationSurface, qn as DSOverlay, Qn as DSPageLoader, sn as DSPortal, xt as DSRadioButton, Kt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, hr as DSTabs, fn as DSTextarea, tr as DSToast, ar as DSToastProvider, pr as DSTooltip, en as DSValidationSummary, xr as DSVideoPlayerFrame, Pn as ErrorModal, On as ModalSystemProvider, Fn as builtInModalRegistry, kn as defineModalRegistry, E as formatDSCounterValue, ze as formatDateInputValue, Ge as formatDateTimeLocalValue, Cr as getDSAccordionScrollTarget, Tt as getDSDataTableColumnStyle, Dt as getDSDataTablePaginationItems, Et as getDSDataTableStickyColumnStyle, Ln as getErrorMessage, wt as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, hn as resetModalStore, ir as resetToastStore, In as useConfirmModal, zn as useConfirmModalStore, Kn as useDSOverlay, Rn as useErrorModal, Bn as useErrorModalStore, Vn as useModals, mn as useModalsStore, or as useToast, rr as useToastStore, Ot as validateDSDataTableData };
5184
+ export { Fn as ConfirmModal, Er as DSAccordion, w as DSBadge, jr as DSBottomNavigation, Zn as DSBottomSheet, j as DSButton, Ne as DSCheckbox, D as DSCounterBadge, zt as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, Xn as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, cn as DSFileInput, Qt as DSFilters, un as DSFloatingMenu, en as DSFormGrid, tn as DSFormGridItem, Qn as DSFullscreenDialog, Y as DSIcon, je as DSIconNames, Xt as DSInfoBlock, mt as DSInput, k as DSLoader, kn as DSModal, On as DSModalFrame, kr as DSNavigationSurface, Yn as DSOverlay, er as DSPageLoader, ln as DSPortal, xt as DSRadioButton, Jt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, _r as DSTabs, mn as DSTextarea, rr as DSToast, sr as DSToastProvider, hr as DSTooltip, nn as DSValidationSummary, Cr as DSVideoPlayerFrame, In as ErrorModal, An as ModalSystemProvider, Ln as builtInModalRegistry, jn as defineModalRegistry, E as formatDSCounterValue, ze as formatDateInputValue, Ge as formatDateTimeLocalValue, Tr as getDSAccordionScrollTarget, Dt as getDSDataTableColumnStyle, kt as getDSDataTablePaginationItems, Ot as getDSDataTableStickyColumnStyle, zn as getErrorMessage, Et as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, _n as resetModalStore, or as resetToastStore, Rn as useConfirmModal, Vn as useConfirmModalStore, Jn as useDSOverlay, Bn as useErrorModal, Hn as useErrorModalStore, Un as useModals, gn as useModalsStore, cr as useToast, ar as useToastStore, At as validateDSDataTableData };