@efficiency-point/design-system 0.8.0 → 0.9.0
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/README.md +27 -3
- package/dist/components/DSDataTable/DSDataTable.d.ts +10 -1
- package/dist/components/DSDataTable/DSDataTable.d.ts.map +1 -1
- package/dist/components/DSTooltip/DSTooltip.d.ts +3 -1
- package/dist/components/DSTooltip/DSTooltip.d.ts.map +1 -1
- package/dist/components/DSTooltip/DSTooltip.position.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.es.js +804 -766
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -183,10 +183,10 @@ var V = {
|
|
|
183
183
|
} : o,
|
|
184
184
|
...c,
|
|
185
185
|
children: [a && /* @__PURE__ */ t("title", { children: a }), s]
|
|
186
|
-
}),
|
|
186
|
+
}), W = (e) => /* @__PURE__ */ t(U, {
|
|
187
187
|
...e,
|
|
188
188
|
children: /* @__PURE__ */ t("path", { d: "M4 7h16l-1 13H5L4 7zm3 0V4h10v3" })
|
|
189
|
-
}),
|
|
189
|
+
}), re = ({ strokeWidth: e = 2, ...r }) => /* @__PURE__ */ n(U, {
|
|
190
190
|
strokeWidth: e,
|
|
191
191
|
...r,
|
|
192
192
|
children: [/* @__PURE__ */ t("path", { d: "M2 20v-8a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v8" }), /* @__PURE__ */ t("path", { d: "M4 10V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4M12 4v6M2 18h20M5 18v2M19 18v2" })]
|
|
@@ -270,10 +270,10 @@ var V = {
|
|
|
270
270
|
/* @__PURE__ */ t("path", { d: "M16 17H8" }),
|
|
271
271
|
/* @__PURE__ */ t("path", { d: "M10 9H8" })
|
|
272
272
|
]
|
|
273
|
-
}),
|
|
273
|
+
}), ge = (e) => /* @__PURE__ */ t(U, {
|
|
274
274
|
...e,
|
|
275
275
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14" })
|
|
276
|
-
}),
|
|
276
|
+
}), K = (e) => /* @__PURE__ */ t(U, {
|
|
277
277
|
...e,
|
|
278
278
|
children: /* @__PURE__ */ t("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" })
|
|
279
279
|
}), _e = (e) => /* @__PURE__ */ n(U, {
|
|
@@ -493,7 +493,7 @@ var V = {
|
|
|
493
493
|
["path", { d: "M13 17V5" }],
|
|
494
494
|
["path", { d: "M8 17v-3" }]
|
|
495
495
|
]),
|
|
496
|
-
IconBedDouble:
|
|
496
|
+
IconBedDouble: re,
|
|
497
497
|
IconBookText: ie,
|
|
498
498
|
IconBell: q([["path", {
|
|
499
499
|
d: "M10.268 21a2 2 0 0 0 3.464 0",
|
|
@@ -1100,7 +1100,7 @@ var V = {
|
|
|
1100
1100
|
d: "m6 6 12 12",
|
|
1101
1101
|
key: "d8bk6v"
|
|
1102
1102
|
}]]),
|
|
1103
|
-
IconBasket:
|
|
1103
|
+
IconBasket: W,
|
|
1104
1104
|
IconCheck: oe,
|
|
1105
1105
|
IconChevron: se,
|
|
1106
1106
|
IconCross: ce,
|
|
@@ -1110,9 +1110,9 @@ var V = {
|
|
|
1110
1110
|
IconEyeOff: fe,
|
|
1111
1111
|
IconInfo: pe,
|
|
1112
1112
|
IconInfoCircle: me,
|
|
1113
|
-
IconMinus:
|
|
1113
|
+
IconMinus: ge,
|
|
1114
1114
|
IconMoreVertical: Be,
|
|
1115
|
-
IconList:
|
|
1115
|
+
IconList: K,
|
|
1116
1116
|
IconPanelsTopLeft: _e,
|
|
1117
1117
|
IconPause: ve,
|
|
1118
1118
|
IconPaperclip: Le,
|
|
@@ -1311,7 +1311,7 @@ var V = {
|
|
|
1311
1311
|
let r = nt(e).getTime();
|
|
1312
1312
|
return !!(t && r < nt(t).getTime() || n && r > nt(n).getTime());
|
|
1313
1313
|
}, lt = 8, ut = 6, dt = ({ value: r, onChange: i, mode: a = "date", label: o, placeholder: s, hint: c, error: u, disabled: v = !1, readOnly: y = !1, required: b = !1, min: x, max: S, size: C = "md", id: w, name: T, className: E = "" }) => {
|
|
1314
|
-
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, ee] = g(rt(r, "time")), [te, B] = g(Ze(r)), [V, U] = g(""), [
|
|
1314
|
+
let D = f(), O = w ?? `ds-date-time-${T ?? D}`, k = c ? `${O}-hint` : void 0, A = u ? `${O}-error` : void 0, j = h(null), M = h(null), N = h(null), P = h(null), [F, I] = g(!1), [L, R] = g(r ?? /* @__PURE__ */ new Date()), [z, ee] = g(rt(r, "time")), [te, B] = g(Ze(r)), [V, U] = g(""), [W, re] = g(0), [ie, ae] = g(null), oe = m(() => ot(L), [L]), se = a !== "time", ce = a !== "date";
|
|
1315
1315
|
d(() => {
|
|
1316
1316
|
r && R(r), ee(rt(r, "time")), B(Ze(r));
|
|
1317
1317
|
}, [r]), d(() => () => {
|
|
@@ -1357,7 +1357,7 @@ var V = {
|
|
|
1357
1357
|
let t = a === "date" ? it(rt(e, "date"), "date") : new Date(e);
|
|
1358
1358
|
t && (a !== "date" && t.setHours(r?.getHours() ?? 0, r?.getMinutes() ?? 0, 0, 0), i?.(t), B(Ze(t)), a === "date" && I(!1));
|
|
1359
1359
|
}, ue = () => {
|
|
1360
|
-
U(Xe),
|
|
1360
|
+
U(Xe), re((e) => e + 1), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
|
|
1361
1361
|
U(""), P.current = null;
|
|
1362
1362
|
}, 3e3);
|
|
1363
1363
|
}, de = (e) => {
|
|
@@ -1391,7 +1391,7 @@ var V = {
|
|
|
1391
1391
|
k,
|
|
1392
1392
|
A,
|
|
1393
1393
|
me
|
|
1394
|
-
].filter(Boolean).join(" ") || void 0,
|
|
1394
|
+
].filter(Boolean).join(" ") || void 0, ge = F && !y ? /* @__PURE__ */ n("div", {
|
|
1395
1395
|
ref: N,
|
|
1396
1396
|
className: Y.panel,
|
|
1397
1397
|
role: "dialog",
|
|
@@ -1532,7 +1532,7 @@ var V = {
|
|
|
1532
1532
|
I((e) => !e), M.current?.focus();
|
|
1533
1533
|
},
|
|
1534
1534
|
children: /* @__PURE__ */ t("span", {
|
|
1535
|
-
className: `${Y.chevron} ${
|
|
1535
|
+
className: `${Y.chevron} ${ge ? Y.chevronOpen : ""}`,
|
|
1536
1536
|
"aria-hidden": "true",
|
|
1537
1537
|
children: /* @__PURE__ */ t(J, {
|
|
1538
1538
|
name: "IconChevron",
|
|
@@ -1560,7 +1560,7 @@ var V = {
|
|
|
1560
1560
|
className: r ? Y.value : Y.placeholder,
|
|
1561
1561
|
children: at(r, a) || pe
|
|
1562
1562
|
}), /* @__PURE__ */ t("span", {
|
|
1563
|
-
className: `${Y.chevron} ${
|
|
1563
|
+
className: `${Y.chevron} ${ge ? Y.chevronOpen : ""}`,
|
|
1564
1564
|
"aria-hidden": "true",
|
|
1565
1565
|
children: /* @__PURE__ */ t(J, {
|
|
1566
1566
|
name: "IconChevron",
|
|
@@ -1575,8 +1575,8 @@ var V = {
|
|
|
1575
1575
|
role: "status",
|
|
1576
1576
|
"aria-live": "polite",
|
|
1577
1577
|
children: V
|
|
1578
|
-
},
|
|
1579
|
-
|
|
1578
|
+
}, W),
|
|
1579
|
+
ge && _(ge, document.body),
|
|
1580
1580
|
c && !u && /* @__PURE__ */ t(H, {
|
|
1581
1581
|
id: k,
|
|
1582
1582
|
children: c
|
|
@@ -2040,7 +2040,7 @@ var V = {
|
|
|
2040
2040
|
if (t.disabled) return;
|
|
2041
2041
|
let n = r.includes(t.value) ? r.filter((e) => e !== t.value) : [...r, t.value];
|
|
2042
2042
|
i?.(n, e.filter((e) => n.includes(e.value))), w && (j(!1), F.current?.focus());
|
|
2043
|
-
},
|
|
2043
|
+
}, W = A ? /* @__PURE__ */ t("ul", {
|
|
2044
2044
|
ref: I,
|
|
2045
2045
|
id: k,
|
|
2046
2046
|
className: X.menu,
|
|
@@ -2157,7 +2157,7 @@ var V = {
|
|
|
2157
2157
|
})]
|
|
2158
2158
|
})
|
|
2159
2159
|
}),
|
|
2160
|
-
A && _(
|
|
2160
|
+
A && _(W, document.body),
|
|
2161
2161
|
b && !u && /* @__PURE__ */ t("span", {
|
|
2162
2162
|
id: z,
|
|
2163
2163
|
className: X.message,
|
|
@@ -2310,86 +2310,237 @@ var V = {
|
|
|
2310
2310
|
})
|
|
2311
2311
|
})]
|
|
2312
2312
|
});
|
|
2313
|
+
}, Lt = ({ children: e, containerId: t = "overlay-root" }) => {
|
|
2314
|
+
let [n, r] = g(null);
|
|
2315
|
+
return d(() => {
|
|
2316
|
+
let e = document.getElementById(t);
|
|
2317
|
+
if (e) {
|
|
2318
|
+
r(e);
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
let n = document.createElement("div");
|
|
2322
|
+
return n.id = t, document.body.appendChild(n), r(n), () => {
|
|
2323
|
+
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
2324
|
+
};
|
|
2325
|
+
}, [t]), n ? _(e, n) : null;
|
|
2326
|
+
}, Rt = 8, zt = 16, Bt = 8, Vt = 8, Ht = 16, Ut = {
|
|
2327
|
+
top: "bottom",
|
|
2328
|
+
right: "left",
|
|
2329
|
+
bottom: "top",
|
|
2330
|
+
left: "right"
|
|
2331
|
+
}, Wt = (e, t, n, r) => e === "top" ? t.top >= n.height + Rt + zt : e === "bottom" ? r.height - t.bottom >= n.height + Rt + zt : e === "left" ? t.left >= n.width + Rt + zt : r.width - t.right >= n.width + Rt + zt, Gt = (e, t, n) => n && t ? {
|
|
2332
|
+
top: t.y - Vt,
|
|
2333
|
+
right: t.x + Bt,
|
|
2334
|
+
bottom: t.y + Ht,
|
|
2335
|
+
left: t.x - Bt,
|
|
2336
|
+
width: 16,
|
|
2337
|
+
height: 24
|
|
2338
|
+
} : e, Kt = (e, t, n, r) => {
|
|
2339
|
+
if (!(t.bottom > 0 && t.right > 0 && t.top < r.height && t.left < r.width)) return null;
|
|
2340
|
+
let i = Wt(e, t, n, r) ? e : Wt(Ut[e], t, n, r) ? Ut[e] : e, a = t.left + (t.width - n.width) / 2, o = t.top + (t.height - n.height) / 2;
|
|
2341
|
+
return i === "top" && (o = t.top - n.height - Rt), i === "bottom" && (o = t.bottom + Rt), i === "left" && (a = t.left - n.width - Rt), i === "right" && (a = t.right + Rt), a = Math.min(Math.max(a, zt), Math.max(zt, r.width - n.width - zt)), o = Math.min(Math.max(o, zt), Math.max(zt, r.height - n.height - zt)), {
|
|
2342
|
+
left: a,
|
|
2343
|
+
top: o,
|
|
2344
|
+
visibility: "visible"
|
|
2345
|
+
};
|
|
2346
|
+
}, qt = {
|
|
2347
|
+
root: "_root_1pa4z_1",
|
|
2348
|
+
tooltip: "_tooltip_1pa4z_11",
|
|
2349
|
+
"ds-tooltip-in": "_ds-tooltip-in_1pa4z_1"
|
|
2350
|
+
}, Jt = (e, t) => (n) => {
|
|
2351
|
+
e?.(n), n.defaultPrevented || t(n);
|
|
2352
|
+
}, Yt = (e, t) => {
|
|
2353
|
+
typeof e == "function" ? e(t) : e && (e.current = t);
|
|
2354
|
+
}, Xt = ({ content: e, children: a, placement: o = "top", followCursor: s = !1, delay: u = 450, disabled: p = !1, maxWidth: m = 280, className: _ = "", asChild: v = !1 }) => {
|
|
2355
|
+
let y = f(), [b, x] = g(!1), [S, C] = g({ visibility: "hidden" }), [w, T] = g(null), E = h(null), D = h(null), O = h(null), k = h(() => void 0), A = l(() => {
|
|
2356
|
+
E.current && clearTimeout(E.current), E.current = null, x(!1);
|
|
2357
|
+
}, []), j = l(() => {
|
|
2358
|
+
if (!(p || !e)) {
|
|
2359
|
+
if (E.current && clearTimeout(E.current), u <= 0) {
|
|
2360
|
+
E.current = null, x(!0);
|
|
2361
|
+
return;
|
|
2362
|
+
}
|
|
2363
|
+
E.current = setTimeout(() => x(!0), u);
|
|
2364
|
+
}
|
|
2365
|
+
}, [
|
|
2366
|
+
e,
|
|
2367
|
+
u,
|
|
2368
|
+
p
|
|
2369
|
+
]);
|
|
2370
|
+
if (d(() => {
|
|
2371
|
+
if (!b) {
|
|
2372
|
+
C({ visibility: "hidden" });
|
|
2373
|
+
return;
|
|
2374
|
+
}
|
|
2375
|
+
let e = () => {
|
|
2376
|
+
let e = D.current;
|
|
2377
|
+
if (!e || !w) return;
|
|
2378
|
+
let t = Kt(o, Gt(e.getBoundingClientRect(), O.current, s), w.getBoundingClientRect(), {
|
|
2379
|
+
width: window.innerWidth,
|
|
2380
|
+
height: window.innerHeight
|
|
2381
|
+
});
|
|
2382
|
+
if (!t) {
|
|
2383
|
+
A();
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
C(t);
|
|
2387
|
+
};
|
|
2388
|
+
k.current = e, e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0);
|
|
2389
|
+
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(e);
|
|
2390
|
+
return D.current && t?.observe(D.current), w && t?.observe(w), () => {
|
|
2391
|
+
k.current = () => void 0, window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), t?.disconnect();
|
|
2392
|
+
};
|
|
2393
|
+
}, [
|
|
2394
|
+
s,
|
|
2395
|
+
A,
|
|
2396
|
+
b,
|
|
2397
|
+
o,
|
|
2398
|
+
w
|
|
2399
|
+
]), d(() => {
|
|
2400
|
+
let e = (e) => {
|
|
2401
|
+
e.key === "Escape" && A();
|
|
2402
|
+
};
|
|
2403
|
+
return document.addEventListener("keydown", e), () => {
|
|
2404
|
+
document.removeEventListener("keydown", e), E.current && clearTimeout(E.current);
|
|
2405
|
+
};
|
|
2406
|
+
}, [A]), !c(a)) return a;
|
|
2407
|
+
let M = {
|
|
2408
|
+
...S,
|
|
2409
|
+
"--ds-tooltip-max-width": typeof m == "number" ? `${m}px` : m
|
|
2410
|
+
}, N = a.props, P = (e) => {
|
|
2411
|
+
s && (O.current = {
|
|
2412
|
+
x: e.clientX,
|
|
2413
|
+
y: e.clientY
|
|
2414
|
+
}), j();
|
|
2415
|
+
}, F = () => {
|
|
2416
|
+
O.current = null, A();
|
|
2417
|
+
}, I = () => {
|
|
2418
|
+
O.current = null, j();
|
|
2419
|
+
}, L = (e) => {
|
|
2420
|
+
s && (O.current = {
|
|
2421
|
+
x: e.clientX,
|
|
2422
|
+
y: e.clientY
|
|
2423
|
+
}, b && k.current());
|
|
2424
|
+
}, R = i(a, {
|
|
2425
|
+
"aria-describedby": b ? y : void 0,
|
|
2426
|
+
onMouseEnter: Jt(N.onMouseEnter, P),
|
|
2427
|
+
onMouseLeave: Jt(N.onMouseLeave, F),
|
|
2428
|
+
onFocus: Jt(N.onFocus, I),
|
|
2429
|
+
onBlur: Jt(N.onBlur, A),
|
|
2430
|
+
...v ? {
|
|
2431
|
+
ref: (e) => {
|
|
2432
|
+
D.current = e, Yt(N.ref, e);
|
|
2433
|
+
},
|
|
2434
|
+
onPointerDown: Jt(N.onPointerDown, b ? A : j),
|
|
2435
|
+
onPointerMove: Jt(N.onPointerMove, L)
|
|
2436
|
+
} : {}
|
|
2437
|
+
}), z = b && /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ t("span", {
|
|
2438
|
+
ref: T,
|
|
2439
|
+
id: y,
|
|
2440
|
+
role: "tooltip",
|
|
2441
|
+
className: qt.tooltip,
|
|
2442
|
+
style: M,
|
|
2443
|
+
children: e
|
|
2444
|
+
}) });
|
|
2445
|
+
return v ? /* @__PURE__ */ n(r, { children: [R, z] }) : /* @__PURE__ */ n("span", {
|
|
2446
|
+
ref: D,
|
|
2447
|
+
className: `${qt.root} ${_}`,
|
|
2448
|
+
onPointerDown: b ? A : j,
|
|
2449
|
+
onPointerMove: L,
|
|
2450
|
+
children: [R, z]
|
|
2451
|
+
});
|
|
2313
2452
|
}, Z = {
|
|
2314
|
-
root: "
|
|
2315
|
-
toolbar: "
|
|
2316
|
-
totalWidget: "
|
|
2317
|
-
totalLabel: "
|
|
2318
|
-
totalValue: "
|
|
2319
|
-
srOnly: "
|
|
2320
|
-
bulkActions: "
|
|
2321
|
-
filterBar: "
|
|
2322
|
-
filterBarEmbedded: "
|
|
2323
|
-
filterAccordion: "
|
|
2324
|
-
filterFields: "
|
|
2325
|
-
filterActions: "
|
|
2326
|
-
filterFooter: "
|
|
2327
|
-
pageSizePanel: "
|
|
2328
|
-
embedded: "
|
|
2329
|
-
pageSizeSeparator: "
|
|
2330
|
-
pendingChanges: "
|
|
2331
|
-
tableWrap: "
|
|
2332
|
-
table: "
|
|
2333
|
-
compact: "
|
|
2334
|
-
selectionColumn: "
|
|
2335
|
-
expansionColumn: "
|
|
2336
|
-
expansionCell: "
|
|
2337
|
-
expansionIcon: "
|
|
2338
|
-
expansionIconOpen: "
|
|
2339
|
-
detailRow: "
|
|
2340
|
-
stickyColumn: "
|
|
2341
|
-
selectionHeaderCell: "
|
|
2342
|
-
selectionCell: "
|
|
2343
|
-
selectionHeaderControls: "
|
|
2344
|
-
mobileSelectionControls: "
|
|
2345
|
-
cardSelectionControls: "
|
|
2346
|
-
singleSelectionControl: "
|
|
2347
|
-
selectedRow: "
|
|
2348
|
-
sticky: "
|
|
2349
|
-
sortButton: "
|
|
2350
|
-
state: "
|
|
2351
|
-
cards: "
|
|
2352
|
-
mobileSort: "
|
|
2353
|
-
card: "
|
|
2354
|
-
spanTwo: "
|
|
2355
|
-
selectedCard: "
|
|
2356
|
-
customCardShell: "
|
|
2357
|
-
clickableRow: "
|
|
2358
|
-
cardDetail: "
|
|
2359
|
-
pagination: "
|
|
2360
|
-
bottom: "
|
|
2361
|
-
pageSizeMain: "
|
|
2362
|
-
pageSizeOptions: "
|
|
2363
|
-
pageSizeFieldset: "
|
|
2364
|
-
pageSizeOption: "
|
|
2365
|
-
pageSizeOptionActive: "
|
|
2366
|
-
pageSizeWarning: "
|
|
2367
|
-
paginationRange: "
|
|
2368
|
-
paginationControls: "
|
|
2369
|
-
pageNumbers: "
|
|
2370
|
-
pageButton: "
|
|
2371
|
-
ellipsis: "
|
|
2372
|
-
previousIcon: "
|
|
2373
|
-
nextIcon: "
|
|
2374
|
-
default: "
|
|
2375
|
-
tableOnMobile: "
|
|
2376
|
-
wide: "
|
|
2377
|
-
},
|
|
2453
|
+
root: "_root_1g27f_1",
|
|
2454
|
+
toolbar: "_toolbar_1g27f_15",
|
|
2455
|
+
totalWidget: "_totalWidget_1g27f_31",
|
|
2456
|
+
totalLabel: "_totalLabel_1g27f_53",
|
|
2457
|
+
totalValue: "_totalValue_1g27f_63",
|
|
2458
|
+
srOnly: "_srOnly_1g27f_77",
|
|
2459
|
+
bulkActions: "_bulkActions_1g27f_101",
|
|
2460
|
+
filterBar: "_filterBar_1g27f_123",
|
|
2461
|
+
filterBarEmbedded: "_filterBarEmbedded_1g27f_141",
|
|
2462
|
+
filterAccordion: "_filterAccordion_1g27f_153",
|
|
2463
|
+
filterFields: "_filterFields_1g27f_161",
|
|
2464
|
+
filterActions: "_filterActions_1g27f_175",
|
|
2465
|
+
filterFooter: "_filterFooter_1g27f_187",
|
|
2466
|
+
pageSizePanel: "_pageSizePanel_1g27f_205",
|
|
2467
|
+
embedded: "_embedded_1g27f_205",
|
|
2468
|
+
pageSizeSeparator: "_pageSizeSeparator_1g27f_225",
|
|
2469
|
+
pendingChanges: "_pendingChanges_1g27f_247",
|
|
2470
|
+
tableWrap: "_tableWrap_1g27f_259",
|
|
2471
|
+
table: "_table_1g27f_259",
|
|
2472
|
+
compact: "_compact_1g27f_309",
|
|
2473
|
+
selectionColumn: "_selectionColumn_1g27f_347",
|
|
2474
|
+
expansionColumn: "_expansionColumn_1g27f_355",
|
|
2475
|
+
expansionCell: "_expansionCell_1g27f_357",
|
|
2476
|
+
expansionIcon: "_expansionIcon_1g27f_369",
|
|
2477
|
+
expansionIconOpen: "_expansionIconOpen_1g27f_379",
|
|
2478
|
+
detailRow: "_detailRow_1g27f_389",
|
|
2479
|
+
stickyColumn: "_stickyColumn_1g27f_399",
|
|
2480
|
+
selectionHeaderCell: "_selectionHeaderCell_1g27f_435",
|
|
2481
|
+
selectionCell: "_selectionCell_1g27f_437",
|
|
2482
|
+
selectionHeaderControls: "_selectionHeaderControls_1g27f_449",
|
|
2483
|
+
mobileSelectionControls: "_mobileSelectionControls_1g27f_451",
|
|
2484
|
+
cardSelectionControls: "_cardSelectionControls_1g27f_453",
|
|
2485
|
+
singleSelectionControl: "_singleSelectionControl_1g27f_467",
|
|
2486
|
+
selectedRow: "_selectedRow_1g27f_497",
|
|
2487
|
+
sticky: "_sticky_1g27f_399",
|
|
2488
|
+
sortButton: "_sortButton_1g27f_535",
|
|
2489
|
+
state: "_state_1g27f_573",
|
|
2490
|
+
cards: "_cards_1g27f_585",
|
|
2491
|
+
mobileSort: "_mobileSort_1g27f_585",
|
|
2492
|
+
card: "_card_1g27f_453",
|
|
2493
|
+
spanTwo: "_spanTwo_1g27f_673",
|
|
2494
|
+
selectedCard: "_selectedCard_1g27f_681",
|
|
2495
|
+
customCardShell: "_customCardShell_1g27f_715",
|
|
2496
|
+
clickableRow: "_clickableRow_1g27f_729",
|
|
2497
|
+
cardDetail: "_cardDetail_1g27f_747",
|
|
2498
|
+
pagination: "_pagination_1g27f_773",
|
|
2499
|
+
bottom: "_bottom_1g27f_821",
|
|
2500
|
+
pageSizeMain: "_pageSizeMain_1g27f_835",
|
|
2501
|
+
pageSizeOptions: "_pageSizeOptions_1g27f_837",
|
|
2502
|
+
pageSizeFieldset: "_pageSizeFieldset_1g27f_849",
|
|
2503
|
+
pageSizeOption: "_pageSizeOption_1g27f_837",
|
|
2504
|
+
pageSizeOptionActive: "_pageSizeOptionActive_1g27f_927",
|
|
2505
|
+
pageSizeWarning: "_pageSizeWarning_1g27f_941",
|
|
2506
|
+
paginationRange: "_paginationRange_1g27f_953",
|
|
2507
|
+
paginationControls: "_paginationControls_1g27f_965",
|
|
2508
|
+
pageNumbers: "_pageNumbers_1g27f_967",
|
|
2509
|
+
pageButton: "_pageButton_1g27f_979",
|
|
2510
|
+
ellipsis: "_ellipsis_1g27f_989",
|
|
2511
|
+
previousIcon: "_previousIcon_1g27f_1001",
|
|
2512
|
+
nextIcon: "_nextIcon_1g27f_1009",
|
|
2513
|
+
default: "_default_1g27f_1137",
|
|
2514
|
+
tableOnMobile: "_tableOnMobile_1g27f_1137",
|
|
2515
|
+
wide: "_wide_1g27f_1167"
|
|
2516
|
+
}, Zt = b({
|
|
2378
2517
|
rowSortingFeature: y,
|
|
2379
2518
|
sortedRowModel: v()
|
|
2380
|
-
}),
|
|
2519
|
+
}), Qt = [
|
|
2381
2520
|
10,
|
|
2382
2521
|
30,
|
|
2383
2522
|
50,
|
|
2384
2523
|
-1
|
|
2385
|
-
],
|
|
2386
|
-
function
|
|
2524
|
+
], $t = 30, en = 8;
|
|
2525
|
+
function tn(e, t) {
|
|
2387
2526
|
return t.includes(e) ? e : t.includes(30) ? 30 : t.find((e) => Number.isSafeInteger(e) && e > 0) ?? 30;
|
|
2388
2527
|
}
|
|
2389
|
-
function
|
|
2390
|
-
return e === void 0 || !Number.isFinite(e) || e <= 0 ?
|
|
2528
|
+
function nn(e) {
|
|
2529
|
+
return e === void 0 || !Number.isFinite(e) || e <= 0 ? $t : Math.max(1, Math.floor(e));
|
|
2391
2530
|
}
|
|
2392
|
-
var
|
|
2531
|
+
var rn = ({ config: e, row: n, children: r }) => {
|
|
2532
|
+
if (!e) return r;
|
|
2533
|
+
let i = e.content(n);
|
|
2534
|
+
return i ? /* @__PURE__ */ t(Xt, {
|
|
2535
|
+
asChild: !0,
|
|
2536
|
+
content: i,
|
|
2537
|
+
placement: e.placement ?? "bottom",
|
|
2538
|
+
followCursor: e.followCursor ?? !0,
|
|
2539
|
+
delay: e.delay ?? 0,
|
|
2540
|
+
maxWidth: e.maxWidth,
|
|
2541
|
+
children: r
|
|
2542
|
+
}) : r;
|
|
2543
|
+
}, an = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
2393
2544
|
let o = e.type === "multi-select" ? e.options : void 0, [s, c] = g(Array.isArray(o) ? o : []), [l, u] = g(!1);
|
|
2394
2545
|
return d(() => {
|
|
2395
2546
|
if (o === void 0) return;
|
|
@@ -2432,20 +2583,20 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2432
2583
|
error: a,
|
|
2433
2584
|
onChange: (e) => r(e)
|
|
2434
2585
|
});
|
|
2435
|
-
},
|
|
2586
|
+
}, on = (e, t, n) => {
|
|
2436
2587
|
let r = new Set(e);
|
|
2437
2588
|
return t.forEach((e) => {
|
|
2438
2589
|
n ? r.add(e) : r.delete(e);
|
|
2439
2590
|
}), Array.from(r);
|
|
2440
|
-
},
|
|
2591
|
+
}, sn = (e) => {
|
|
2441
2592
|
if (!(!e || e.width === void 0 && e.minWidth === void 0 && e.maxWidth === void 0)) return {
|
|
2442
2593
|
width: e.width,
|
|
2443
2594
|
minWidth: e.minWidth,
|
|
2444
2595
|
maxWidth: e.maxWidth
|
|
2445
2596
|
};
|
|
2446
|
-
},
|
|
2597
|
+
}, cn = (e) => {
|
|
2447
2598
|
if (e?.sticky) return e.sticky === "start" ? { insetInlineStart: e.stickyOffset ?? 0 } : { insetInlineEnd: e.stickyOffset ?? 0 };
|
|
2448
|
-
},
|
|
2599
|
+
}, ln = (e, t) => t <= 7 ? Array.from({ length: t }, (e, t) => t) : e <= 3 ? [
|
|
2449
2600
|
0,
|
|
2450
2601
|
1,
|
|
2451
2602
|
2,
|
|
@@ -2469,7 +2620,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2469
2620
|
e + 1,
|
|
2470
2621
|
"ellipsis-end",
|
|
2471
2622
|
t - 1
|
|
2472
|
-
],
|
|
2623
|
+
], un = (e, t) => {
|
|
2473
2624
|
let n = /* @__PURE__ */ new Set();
|
|
2474
2625
|
for (let t of e) {
|
|
2475
2626
|
if (!t.id.trim()) return "Идентификатор колонки не может быть пустым";
|
|
@@ -2481,36 +2632,36 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2481
2632
|
for (let t of e) if (typeof t.accessor == "string" && !(t.accessor in r)) return `В строке ${n + 1} отсутствует колонка «${t.id}»`;
|
|
2482
2633
|
}
|
|
2483
2634
|
return null;
|
|
2484
|
-
},
|
|
2635
|
+
}, dn = (e, t) => typeof e == "function" ? e(t) : t[e], fn = (e) => {
|
|
2485
2636
|
if (e == null || e === "") return null;
|
|
2486
2637
|
let t = Date.parse(String(e));
|
|
2487
2638
|
return Number.isNaN(t) ? null : t;
|
|
2488
|
-
},
|
|
2489
|
-
let r =
|
|
2639
|
+
}, pn = (e, t, n) => {
|
|
2640
|
+
let r = fn(e.getValue(n)), i = fn(t.getValue(n));
|
|
2490
2641
|
return r === null && i === null ? 0 : r === null ? -1 : i === null ? 1 : r - i;
|
|
2491
|
-
},
|
|
2642
|
+
}, mn = (e, t, n) => {
|
|
2492
2643
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2493
2644
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(r) - Number(i);
|
|
2494
|
-
},
|
|
2645
|
+
}, hn = (e, t, n) => {
|
|
2495
2646
|
let r = e.getValue(n), i = t.getValue(n);
|
|
2496
2647
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : Number(!!r) - Number(!!i);
|
|
2497
|
-
},
|
|
2648
|
+
}, gn = (e, t, n) => {
|
|
2498
2649
|
let r = String(e.getValue(n) ?? ""), i = String(t.getValue(n) ?? "");
|
|
2499
2650
|
return r.localeCompare(i, void 0, {
|
|
2500
2651
|
numeric: !0,
|
|
2501
2652
|
sensitivity: "base"
|
|
2502
2653
|
});
|
|
2503
|
-
},
|
|
2654
|
+
}, _n = (e) => {
|
|
2504
2655
|
switch (e) {
|
|
2505
|
-
case "date": return
|
|
2506
|
-
case "number": return
|
|
2507
|
-
case "boolean": return
|
|
2656
|
+
case "date": return pn;
|
|
2657
|
+
case "number": return mn;
|
|
2658
|
+
case "boolean": return hn;
|
|
2508
2659
|
case "text":
|
|
2509
|
-
case void 0: return
|
|
2660
|
+
case void 0: return gn;
|
|
2510
2661
|
case "custom": return;
|
|
2511
2662
|
}
|
|
2512
|
-
},
|
|
2513
|
-
let t = (t) =>
|
|
2663
|
+
}, vn = (e) => {
|
|
2664
|
+
let t = (t) => dn(e.accessor, t), n = e.sortFn ?? _n(e.dataType), r = e.enableSorting ?? (e.dataType !== "custom" && n !== void 0), i = {
|
|
2514
2665
|
id: e.id,
|
|
2515
2666
|
accessorFn: t,
|
|
2516
2667
|
header: () => e.header,
|
|
@@ -2522,58 +2673,58 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2522
2673
|
sortDescFirst: e.sortDescFirst
|
|
2523
2674
|
};
|
|
2524
2675
|
return n !== void 0 && (i.sortFn = n), i;
|
|
2525
|
-
},
|
|
2526
|
-
let [
|
|
2527
|
-
if (
|
|
2528
|
-
let e = new Set(
|
|
2676
|
+
}, yn = ({ columns: i, data: a, virtualizationThreshold: o = $t, tableOnMobile: s = !1, mobileView: c, breakpoint: l = "default", sorting: u, onSortingChange: f, renderMobileCard: p, getRowId: _, getRowClassName: v, getRowStyle: y, toolbarContent: b, totalCountVariant: S = "default", totalCountLabel: C = "Всего", caption: w, ariaLabel: T, loading: E = !1, error: D, emptyState: O = "Нет данных", stickyHeader: k = !1, maxHeight: A, className: j = "", onRowClick: M, selectable: N = !1, selectedRowIds: P, onSelectedRowIdsChange: F, onRowDoubleClick: I, getRowSelectionLabel: L, selectAllRowsLabel: R = "Выбрать все строки на этой странице", resetSelectionLabel: z = "Сбросить выбор", showResetSelectionControl: ee = !0, openRowLabel: te = "Открыть строку", rowTooltip: V, pagination: ne = !1, paginationMode: H = "client", page: U = 1, pageSize: W = 30, onPageSizeChange: re, pageSizeOptions: ie = Qt, pageSizeDraft: ae, onPageSizeDraftChange: oe, pageSizeApplyMode: se = "table", totalCount: ce, onPageChange: G, visibleColumnIds: le, density: ue = "comfortable", renderBulkActions: de, renderExpandedRow: fe, expandedRowIds: pe, onExpandedRowIdsChange: me, getRowExpansionLabel: he, resultsAnnouncement: ge, filterBar: K }) => {
|
|
2677
|
+
let [_e, ve] = g([]), [ye, be] = g([]), [xe, Se] = g([]), [Ce, we] = g(0), [Te, Ee] = g(() => tn(W, ie)), De = nn(o), Oe = u ?? _e, ke = Oe.map((e) => `${e.id}:${e.desc ? "desc" : "asc"}`).join("|"), Ae = W === -1, je = Ae ? Math.max(1, (H === "server" ? Number(ce) : a.length) || a.length || 1) : Number.isFinite(W) && W > 0 ? Math.floor(W) : 30, Me = ne && H === "server", Ne = m(() => {
|
|
2678
|
+
if (le === void 0) return i;
|
|
2679
|
+
let e = new Set(le);
|
|
2529
2680
|
return i.filter((t) => e.has(t.id));
|
|
2530
|
-
}, [i,
|
|
2531
|
-
features:
|
|
2532
|
-
columns:
|
|
2681
|
+
}, [i, le]), Pe = m(() => Ne.length === 0 ? "Должна быть видима хотя бы одна колонка" : un(Ne, a), [a, Ne]), Fe = m(() => Ne.map(vn), [Ne]), Ie = Ne.some((e) => sn(e) !== void 0), Le = x({
|
|
2682
|
+
features: Zt,
|
|
2683
|
+
columns: Fe,
|
|
2533
2684
|
data: a,
|
|
2534
|
-
state: { sorting:
|
|
2685
|
+
state: { sorting: Oe },
|
|
2535
2686
|
onSortingChange: (e) => {
|
|
2536
|
-
let t = typeof e == "function" ? e(
|
|
2537
|
-
u === void 0 &&
|
|
2687
|
+
let t = typeof e == "function" ? e(Oe) : e;
|
|
2688
|
+
u === void 0 && ve(t), we(0), f?.(t);
|
|
2538
2689
|
},
|
|
2539
2690
|
getRowId: _
|
|
2540
|
-
}),
|
|
2691
|
+
}), Re = Le.getRowModel().rows, ze = Me && Number.isFinite(ce) && Number(ce) >= 0 ? Math.floor(Number(ce)) : Re.length, Be = ne ? Math.max(1, Math.ceil(ze / je)) : 1, Ve = Number.isFinite(U) && U > 0 ? Math.floor(U) - 1 : 0, q = Math.min(Me ? Ve : Ce, Be - 1), He = m(() => ne && !Me ? Re.slice(q * je, (q + 1) * je) : Re, [
|
|
2692
|
+
Me,
|
|
2541
2693
|
je,
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
]), He = q.length > Ee, Ue = m(() => ({
|
|
2694
|
+
ne,
|
|
2695
|
+
q,
|
|
2696
|
+
Re
|
|
2697
|
+
]), Ue = He.length > De, We = m(() => ({
|
|
2547
2698
|
data: a,
|
|
2548
|
-
sortingKey:
|
|
2549
|
-
safePageIndex:
|
|
2550
|
-
normalizedPageSize:
|
|
2551
|
-
pagination:
|
|
2552
|
-
isServerPagination:
|
|
2553
|
-
normalizedVirtualizationThreshold:
|
|
2699
|
+
sortingKey: ke,
|
|
2700
|
+
safePageIndex: q,
|
|
2701
|
+
normalizedPageSize: je,
|
|
2702
|
+
pagination: ne,
|
|
2703
|
+
isServerPagination: Me,
|
|
2704
|
+
normalizedVirtualizationThreshold: De
|
|
2554
2705
|
}), [
|
|
2555
2706
|
a,
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
Ae,
|
|
2559
|
-
V,
|
|
2707
|
+
ke,
|
|
2708
|
+
q,
|
|
2560
2709
|
je,
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2710
|
+
ne,
|
|
2711
|
+
Me,
|
|
2712
|
+
De
|
|
2713
|
+
]), [Y, Ke] = g({
|
|
2714
|
+
context: We,
|
|
2715
|
+
count: De
|
|
2716
|
+
}), qe = Y.context === We ? Y.count : De;
|
|
2717
|
+
Y.context !== We && Ke({
|
|
2718
|
+
context: We,
|
|
2719
|
+
count: De
|
|
2569
2720
|
});
|
|
2570
|
-
let
|
|
2721
|
+
let Je = m(() => He.slice(0, qe), [He, qe]), Ye = Ue && qe < He.length, Xe = Ye ? Math.max(0, Je.length - en) : -1, Ze = h(/* @__PURE__ */ new Map()), Qe = h(/* @__PURE__ */ new Map());
|
|
2571
2722
|
d(() => {
|
|
2572
|
-
if (!
|
|
2573
|
-
let e = [...
|
|
2574
|
-
!t || !e.some((e) => e.isIntersecting) || (t = !1, n.disconnect(),
|
|
2575
|
-
context:
|
|
2576
|
-
count: Math.min(e.count +
|
|
2723
|
+
if (!Ye || E || Pe || D) return;
|
|
2724
|
+
let e = [...Ze.current.values(), ...Qe.current.values()], t = !0, n = new IntersectionObserver((e) => {
|
|
2725
|
+
!t || !e.some((e) => e.isIntersecting) || (t = !1, n.disconnect(), Ke((e) => e.context === We ? {
|
|
2726
|
+
context: We,
|
|
2727
|
+
count: Math.min(e.count + De, He.length)
|
|
2577
2728
|
} : e));
|
|
2578
2729
|
}, {
|
|
2579
2730
|
root: null,
|
|
@@ -2585,32 +2736,32 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2585
2736
|
t = !1, n.disconnect();
|
|
2586
2737
|
};
|
|
2587
2738
|
}, [
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2739
|
+
We,
|
|
2740
|
+
qe,
|
|
2741
|
+
De,
|
|
2742
|
+
He.length,
|
|
2743
|
+
Ye,
|
|
2593
2744
|
E,
|
|
2594
|
-
|
|
2745
|
+
Pe,
|
|
2595
2746
|
D,
|
|
2596
2747
|
c,
|
|
2597
2748
|
s,
|
|
2598
2749
|
p
|
|
2599
2750
|
]);
|
|
2600
|
-
let
|
|
2751
|
+
let $e = P ?? ye, et = m(() => new Set($e), [$e]), tt = pe ?? xe, nt = m(() => new Set(tt), [tt]), rt = m(() => He.map((e) => e.id), [He]), it = rt.filter((e) => et.has(e)).length, at = rt.length > 0 && it === rt.length, ot = it > 0 && !at, st = m(() => Ne.filter((e) => e.enableSorting ?? e.dataType !== "custom").map((e) => ({
|
|
2601
2752
|
id: e.id,
|
|
2602
2753
|
label: typeof e.header == "string" ? e.header : e.id
|
|
2603
|
-
})), [
|
|
2754
|
+
})), [Ne]), ct = m(() => ln(q, Be), [Be, q]), lt = c === void 0 ? s : c === "table", ut = [
|
|
2604
2755
|
Z.root,
|
|
2605
2756
|
l === "wide" ? Z.wide : Z.default,
|
|
2606
|
-
|
|
2607
|
-
|
|
2757
|
+
lt ? Z.tableOnMobile : "",
|
|
2758
|
+
ue === "compact" ? Z.compact : "",
|
|
2608
2759
|
N && !ee ? Z.singleSelectionControl : "",
|
|
2609
2760
|
j
|
|
2610
|
-
].filter(Boolean).join(" "),
|
|
2611
|
-
|
|
2612
|
-
},
|
|
2613
|
-
let a =
|
|
2761
|
+
].filter(Boolean).join(" "), dt = Pe ?? D, ft = ne && !Ae && !dt && ze > je && (!E || Me), pt = ne && !!(re || oe || K), mt = ae ?? Te, ht = K ? (typeof K.validation == "function" ? K.validation(K.draftValues) : K.validation) ?? {} : {}, X = K ? JSON.stringify(K.draftValues) !== JSON.stringify(K.appliedValues) || mt !== W : !1, _t = Object.values(ht).some(Boolean), vt = ze === 0 ? 0 : q * je + 1, yt = Math.min((q + 1) * je, ze), bt = () => {
|
|
2762
|
+
mt !== W && (we(0), G?.(1), re?.(mt));
|
|
2763
|
+
}, xt = (e, r = !1, i = !1) => {
|
|
2764
|
+
let a = mt !== W, o = `ds-data-table-page-size-warning-${e}`;
|
|
2614
2765
|
return /* @__PURE__ */ n("div", {
|
|
2615
2766
|
className: `${Z.pageSizePanel} ${Z[e]} ${r ? Z.embedded : ""}`,
|
|
2616
2767
|
children: [
|
|
@@ -2621,21 +2772,21 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2621
2772
|
disabled: E || K?.applying,
|
|
2622
2773
|
children: [/* @__PURE__ */ t("legend", { children: "На странице" }), /* @__PURE__ */ t("div", {
|
|
2623
2774
|
className: Z.pageSizeOptions,
|
|
2624
|
-
children:
|
|
2775
|
+
children: ie.map((e) => /* @__PURE__ */ t("button", {
|
|
2625
2776
|
type: "button",
|
|
2626
|
-
className: `${Z.pageSizeOption} ${
|
|
2627
|
-
"aria-pressed":
|
|
2777
|
+
className: `${Z.pageSizeOption} ${mt === e ? Z.pageSizeOptionActive : ""}`,
|
|
2778
|
+
"aria-pressed": mt === e,
|
|
2628
2779
|
onClick: () => {
|
|
2629
|
-
|
|
2780
|
+
ae === void 0 && Ee(e), oe?.(e);
|
|
2630
2781
|
},
|
|
2631
2782
|
children: e === -1 ? "Все" : e
|
|
2632
2783
|
}, e))
|
|
2633
2784
|
})]
|
|
2634
|
-
}),
|
|
2785
|
+
}), se === "table" && !K && /* @__PURE__ */ t(B, {
|
|
2635
2786
|
size: "sm",
|
|
2636
2787
|
disabled: E || !a,
|
|
2637
|
-
"aria-describedby":
|
|
2638
|
-
onClick:
|
|
2788
|
+
"aria-describedby": mt === -1 && a && e === "top" ? o : void 0,
|
|
2789
|
+
onClick: bt,
|
|
2639
2790
|
children: "Применить"
|
|
2640
2791
|
})]
|
|
2641
2792
|
}),
|
|
@@ -2648,77 +2799,77 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2648
2799
|
className: Z.paginationRange,
|
|
2649
2800
|
children: [
|
|
2650
2801
|
"Показано ",
|
|
2651
|
-
_t,
|
|
2652
|
-
"–",
|
|
2653
2802
|
vt,
|
|
2803
|
+
"–",
|
|
2804
|
+
yt,
|
|
2654
2805
|
" из",
|
|
2655
2806
|
" ",
|
|
2656
|
-
|
|
2807
|
+
ze
|
|
2657
2808
|
]
|
|
2658
2809
|
}),
|
|
2659
|
-
|
|
2810
|
+
X && e === "top" && /* @__PURE__ */ t("span", {
|
|
2660
2811
|
className: Z.pendingChanges,
|
|
2661
2812
|
role: "status",
|
|
2662
2813
|
children: "Есть неприменённые изменения"
|
|
2663
2814
|
}),
|
|
2664
|
-
|
|
2815
|
+
Me && mt === -1 && a && /* @__PURE__ */ n("span", {
|
|
2665
2816
|
id: o,
|
|
2666
2817
|
className: Z.pageSizeWarning,
|
|
2667
2818
|
"aria-hidden": e === "bottom" || void 0,
|
|
2668
2819
|
children: [
|
|
2669
2820
|
"Будут загружены все",
|
|
2670
2821
|
" ",
|
|
2671
|
-
|
|
2822
|
+
ze,
|
|
2672
2823
|
" ",
|
|
2673
2824
|
"записей"
|
|
2674
2825
|
]
|
|
2675
2826
|
})
|
|
2676
2827
|
]
|
|
2677
2828
|
});
|
|
2678
|
-
},
|
|
2679
|
-
let t = Math.max(0, Math.min(
|
|
2680
|
-
if (
|
|
2681
|
-
t !==
|
|
2829
|
+
}, St = (e) => {
|
|
2830
|
+
let t = Math.max(0, Math.min(Be - 1, e));
|
|
2831
|
+
if (Me) {
|
|
2832
|
+
t !== q && G?.(t + 1);
|
|
2682
2833
|
return;
|
|
2683
2834
|
}
|
|
2684
|
-
|
|
2685
|
-
}, St = (e) => {
|
|
2686
|
-
let t = Array.from(e);
|
|
2687
|
-
P === void 0 && ye(t), F?.(t);
|
|
2835
|
+
we(t);
|
|
2688
2836
|
}, Ct = (e) => {
|
|
2689
|
-
let t =
|
|
2690
|
-
|
|
2691
|
-
}, Tt = () => {
|
|
2692
|
-
let
|
|
2693
|
-
|
|
2694
|
-
}, Et = () =>
|
|
2695
|
-
let
|
|
2837
|
+
let t = Array.from(e);
|
|
2838
|
+
P === void 0 && be(t), F?.(t);
|
|
2839
|
+
}, Tt = (e) => {
|
|
2840
|
+
let t = new Set(et);
|
|
2841
|
+
t.has(e) ? t.delete(e) : t.add(e), Ct(t);
|
|
2842
|
+
}, Et = () => {
|
|
2843
|
+
let e = on(et, rt, !at);
|
|
2844
|
+
P === void 0 && be(e), F?.(e);
|
|
2845
|
+
}, Dt = () => Ct(/* @__PURE__ */ new Set()), Ot = (e) => {
|
|
2846
|
+
let t = new Set(nt);
|
|
2696
2847
|
t.has(e) ? t.delete(e) : t.add(e);
|
|
2697
2848
|
let n = Array.from(t);
|
|
2698
|
-
|
|
2699
|
-
},
|
|
2700
|
-
visibleCount:
|
|
2701
|
-
totalCount:
|
|
2702
|
-
selectedCount:
|
|
2703
|
-
}) ?? `Показано строк: ${
|
|
2849
|
+
pe === void 0 && Se(n), me?.(n);
|
|
2850
|
+
}, kt = a.filter((e, t) => et.has(_?.(e, t) ?? String(t))), At = ge?.({
|
|
2851
|
+
visibleCount: He.length,
|
|
2852
|
+
totalCount: ze,
|
|
2853
|
+
selectedCount: et.size
|
|
2854
|
+
}) ?? `Показано строк: ${He.length} из ${ze}. Выбрано: ${et.size}.`;
|
|
2704
2855
|
d(() => {
|
|
2705
|
-
|
|
2856
|
+
Me || we(0);
|
|
2706
2857
|
}, [
|
|
2707
2858
|
a,
|
|
2859
|
+
Me,
|
|
2708
2860
|
je,
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
Oe
|
|
2861
|
+
ne,
|
|
2862
|
+
ke
|
|
2712
2863
|
]), d(() => {
|
|
2713
|
-
!
|
|
2864
|
+
!Me && Ce >= Be && we(Be - 1);
|
|
2714
2865
|
}, [
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2866
|
+
Me,
|
|
2867
|
+
Be,
|
|
2868
|
+
Ce
|
|
2718
2869
|
]), d(() => {
|
|
2719
|
-
|
|
2720
|
-
}, [
|
|
2721
|
-
let
|
|
2870
|
+
Ee(tn(W, ie));
|
|
2871
|
+
}, [W, ie]);
|
|
2872
|
+
let jt = K && pt ? xt("top", !0, K.footerLayout === "inline") : null, Mt = K ? /* @__PURE__ */ n("div", {
|
|
2722
2873
|
className: Z.filterActions,
|
|
2723
2874
|
children: [/* @__PURE__ */ t(B, {
|
|
2724
2875
|
variant: "empty",
|
|
@@ -2726,8 +2877,8 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2726
2877
|
onClick: () => {
|
|
2727
2878
|
let e = K.resetValues ?? K.appliedValues;
|
|
2728
2879
|
K.onDraftValuesChange(e);
|
|
2729
|
-
let t = K.resetPageSize ??
|
|
2730
|
-
|
|
2880
|
+
let t = K.resetPageSize ?? ie[0] ?? 30;
|
|
2881
|
+
ae === void 0 && Ee(t), oe?.(t), K.onReset?.({
|
|
2731
2882
|
filters: e,
|
|
2732
2883
|
pageSize: t
|
|
2733
2884
|
});
|
|
@@ -2736,26 +2887,26 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2736
2887
|
}), /* @__PURE__ */ t(B, {
|
|
2737
2888
|
type: "submit",
|
|
2738
2889
|
isLoading: K.applying,
|
|
2739
|
-
disabled: !
|
|
2890
|
+
disabled: !X || _t || E,
|
|
2740
2891
|
children: K.applyLabel ?? "Применить"
|
|
2741
2892
|
})]
|
|
2742
|
-
}) : null,
|
|
2893
|
+
}) : null, Nt = K ? /* @__PURE__ */ n("form", {
|
|
2743
2894
|
className: `${Z.filterBar} ${K.collapsible ? Z.filterBarEmbedded : ""}`,
|
|
2744
2895
|
role: "search",
|
|
2745
2896
|
"aria-label": "Фильтры таблицы",
|
|
2746
2897
|
onSubmit: (e) => {
|
|
2747
|
-
e.preventDefault(), !(!
|
|
2898
|
+
e.preventDefault(), !(!X || _t || K.applying || E) && (we(0), G?.(1), K.onApply({
|
|
2748
2899
|
filters: K.draftValues,
|
|
2749
|
-
pageSize:
|
|
2900
|
+
pageSize: mt
|
|
2750
2901
|
}));
|
|
2751
2902
|
},
|
|
2752
2903
|
children: [/* @__PURE__ */ t("div", {
|
|
2753
2904
|
className: Z.filterFields,
|
|
2754
|
-
children: K.fields.map((e) => /* @__PURE__ */ t(
|
|
2905
|
+
children: K.fields.map((e) => /* @__PURE__ */ t(an, {
|
|
2755
2906
|
field: e,
|
|
2756
2907
|
value: K.draftValues[e.key],
|
|
2757
2908
|
disabled: !!(e.disabled || K.applying || E),
|
|
2758
|
-
error:
|
|
2909
|
+
error: ht[e.key],
|
|
2759
2910
|
setValue: (t) => K.onDraftValuesChange({
|
|
2760
2911
|
...K.draftValues,
|
|
2761
2912
|
[e.key]: t
|
|
@@ -2763,60 +2914,60 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2763
2914
|
}, e.key))
|
|
2764
2915
|
}), K.footerLayout === "inline" ? /* @__PURE__ */ n("div", {
|
|
2765
2916
|
className: Z.filterFooter,
|
|
2766
|
-
children: [
|
|
2767
|
-
}) : /* @__PURE__ */ n(e, { children: [
|
|
2768
|
-
}) : null,
|
|
2917
|
+
children: [jt, Mt]
|
|
2918
|
+
}) : /* @__PURE__ */ n(e, { children: [jt, Mt] })]
|
|
2919
|
+
}) : null, Pt = K?.collapsible ? /* @__PURE__ */ t(It, {
|
|
2769
2920
|
title: K.collapsible.title ?? "Фильтры",
|
|
2770
2921
|
defaultOpen: K.collapsible.defaultOpen,
|
|
2771
2922
|
autoScrollOnOpen: K.collapsible.autoScrollOnOpen,
|
|
2772
2923
|
scrollOffset: K.collapsible.scrollOffset,
|
|
2773
2924
|
className: Z.filterAccordion,
|
|
2774
|
-
children:
|
|
2775
|
-
}) :
|
|
2925
|
+
children: Nt
|
|
2926
|
+
}) : Nt;
|
|
2776
2927
|
return /* @__PURE__ */ n("section", {
|
|
2777
|
-
className:
|
|
2928
|
+
className: ut,
|
|
2778
2929
|
"aria-busy": E,
|
|
2779
2930
|
children: [
|
|
2780
2931
|
/* @__PURE__ */ t("div", {
|
|
2781
2932
|
className: Z.srOnly,
|
|
2782
2933
|
"aria-live": "polite",
|
|
2783
2934
|
"aria-atomic": "true",
|
|
2784
|
-
children:
|
|
2935
|
+
children: At
|
|
2785
2936
|
}),
|
|
2786
|
-
|
|
2937
|
+
de && et.size > 0 && /* @__PURE__ */ t("div", {
|
|
2787
2938
|
className: Z.bulkActions,
|
|
2788
2939
|
role: "region",
|
|
2789
2940
|
"aria-label": "Действия с выбранными строками",
|
|
2790
|
-
children:
|
|
2791
|
-
selectedRowIds: Array.from(
|
|
2792
|
-
selectedRows:
|
|
2793
|
-
clearSelection:
|
|
2941
|
+
children: de({
|
|
2942
|
+
selectedRowIds: Array.from(et),
|
|
2943
|
+
selectedRows: kt,
|
|
2944
|
+
clearSelection: Dt
|
|
2794
2945
|
})
|
|
2795
2946
|
}),
|
|
2796
|
-
|
|
2797
|
-
|
|
2947
|
+
Pt,
|
|
2948
|
+
pt && !K && xt("top"),
|
|
2798
2949
|
(S === "highlighted" || b != null) && /* @__PURE__ */ n("div", {
|
|
2799
2950
|
className: Z.toolbar,
|
|
2800
2951
|
children: [S === "highlighted" && /* @__PURE__ */ n("div", {
|
|
2801
2952
|
className: Z.totalWidget,
|
|
2802
|
-
"aria-label": `${C}: ${
|
|
2953
|
+
"aria-label": `${C}: ${ze}`,
|
|
2803
2954
|
children: [/* @__PURE__ */ t("span", {
|
|
2804
2955
|
className: Z.totalLabel,
|
|
2805
2956
|
children: C
|
|
2806
2957
|
}), /* @__PURE__ */ t("strong", {
|
|
2807
2958
|
className: Z.totalValue,
|
|
2808
|
-
children:
|
|
2959
|
+
children: ze
|
|
2809
2960
|
})]
|
|
2810
2961
|
}), b]
|
|
2811
2962
|
}),
|
|
2812
|
-
!
|
|
2963
|
+
!lt && !E && !dt && He.length > 0 && st.length > 0 && /* @__PURE__ */ t(wt, {
|
|
2813
2964
|
className: Z.mobileSort,
|
|
2814
|
-
options:
|
|
2815
|
-
value:
|
|
2816
|
-
id:
|
|
2817
|
-
direction:
|
|
2965
|
+
options: st,
|
|
2966
|
+
value: Oe[0] ? {
|
|
2967
|
+
id: Oe[0].id,
|
|
2968
|
+
direction: Oe[0].desc ? "desc" : "asc"
|
|
2818
2969
|
} : null,
|
|
2819
|
-
onChange: (e) =>
|
|
2970
|
+
onChange: (e) => Le.setSorting([{
|
|
2820
2971
|
id: e.id,
|
|
2821
2972
|
desc: e.direction === "desc"
|
|
2822
2973
|
}])
|
|
@@ -2829,15 +2980,15 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2829
2980
|
"aria-label": T,
|
|
2830
2981
|
children: [
|
|
2831
2982
|
w && /* @__PURE__ */ t("caption", { children: w }),
|
|
2832
|
-
(
|
|
2833
|
-
|
|
2983
|
+
(Ie || N || !!fe) && /* @__PURE__ */ n("colgroup", { children: [
|
|
2984
|
+
fe && /* @__PURE__ */ t("col", { className: Z.expansionColumn }),
|
|
2834
2985
|
N && /* @__PURE__ */ t("col", { className: Z.selectionColumn }),
|
|
2835
|
-
|
|
2986
|
+
Ne.map((e) => /* @__PURE__ */ t("col", { style: sn(e) }, e.id))
|
|
2836
2987
|
] }),
|
|
2837
2988
|
/* @__PURE__ */ t("thead", {
|
|
2838
2989
|
className: k ? Z.sticky : "",
|
|
2839
|
-
children:
|
|
2840
|
-
|
|
2990
|
+
children: Le.getHeaderGroups().map((e) => /* @__PURE__ */ n("tr", { children: [
|
|
2991
|
+
fe && /* @__PURE__ */ t("th", {
|
|
2841
2992
|
className: Z.expansionCell,
|
|
2842
2993
|
scope: "col",
|
|
2843
2994
|
children: /* @__PURE__ */ t("span", {
|
|
@@ -2851,18 +3002,18 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2851
3002
|
children: /* @__PURE__ */ n("div", {
|
|
2852
3003
|
className: Z.selectionHeaderControls,
|
|
2853
3004
|
children: [/* @__PURE__ */ t(Ge, {
|
|
2854
|
-
checked:
|
|
2855
|
-
indeterminate:
|
|
2856
|
-
disabled: E ||
|
|
3005
|
+
checked: at,
|
|
3006
|
+
indeterminate: ot,
|
|
3007
|
+
disabled: E || rt.length === 0,
|
|
2857
3008
|
ariaLabel: R,
|
|
2858
|
-
onChange:
|
|
3009
|
+
onChange: Et
|
|
2859
3010
|
}), ee && /* @__PURE__ */ t(B, {
|
|
2860
3011
|
size: "sm",
|
|
2861
3012
|
variant: "empty",
|
|
2862
|
-
disabled:
|
|
3013
|
+
disabled: et.size === 0,
|
|
2863
3014
|
"aria-label": z,
|
|
2864
3015
|
title: z,
|
|
2865
|
-
onClick:
|
|
3016
|
+
onClick: Dt,
|
|
2866
3017
|
children: /* @__PURE__ */ t(J, {
|
|
2867
3018
|
name: "IconX",
|
|
2868
3019
|
width: 16,
|
|
@@ -2872,21 +3023,21 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2872
3023
|
})
|
|
2873
3024
|
}),
|
|
2874
3025
|
e.headers.map((e) => {
|
|
2875
|
-
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o =
|
|
3026
|
+
let r = e.column.getIsSorted(), i = e.column.getCanSort(), a = e.column.getToggleSortingHandler(), o = Ne.find((t) => t.id === e.column.id);
|
|
2876
3027
|
return /* @__PURE__ */ t("th", {
|
|
2877
3028
|
scope: "col",
|
|
2878
3029
|
"aria-sort": r === "asc" ? "ascending" : r === "desc" ? "descending" : "none",
|
|
2879
3030
|
className: o?.sticky ? Z.stickyColumn : void 0,
|
|
2880
3031
|
style: {
|
|
2881
|
-
...
|
|
2882
|
-
...
|
|
3032
|
+
...sn(o),
|
|
3033
|
+
...cn(o)
|
|
2883
3034
|
},
|
|
2884
3035
|
children: /* @__PURE__ */ n("button", {
|
|
2885
3036
|
type: "button",
|
|
2886
3037
|
className: Z.sortButton,
|
|
2887
3038
|
disabled: !i,
|
|
2888
3039
|
onClick: a,
|
|
2889
|
-
children: [/* @__PURE__ */ t(
|
|
3040
|
+
children: [/* @__PURE__ */ t(Le.FlexRender, { header: e }), /* @__PURE__ */ t(J, {
|
|
2890
3041
|
name: r === "asc" ? "IconSortAscending" : r === "desc" ? "IconSortDescending" : "IconSort",
|
|
2891
3042
|
width: 16,
|
|
2892
3043
|
height: 16
|
|
@@ -2897,92 +3048,96 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2897
3048
|
] }, e.id))
|
|
2898
3049
|
}),
|
|
2899
3050
|
/* @__PURE__ */ t("tbody", { children: E ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2900
|
-
colSpan:
|
|
3051
|
+
colSpan: Ne.length + +!!N + +!!fe,
|
|
2901
3052
|
children: /* @__PURE__ */ t(gt, {
|
|
2902
3053
|
lines: 3,
|
|
2903
3054
|
height: 65
|
|
2904
3055
|
})
|
|
2905
|
-
}) }) :
|
|
3056
|
+
}) }) : dt ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2906
3057
|
className: Z.state,
|
|
2907
|
-
colSpan:
|
|
2908
|
-
children:
|
|
2909
|
-
}) }) :
|
|
3058
|
+
colSpan: Ne.length + +!!N + +!!fe,
|
|
3059
|
+
children: dt
|
|
3060
|
+
}) }) : He.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
2910
3061
|
className: Z.state,
|
|
2911
|
-
colSpan:
|
|
3062
|
+
colSpan: Ne.length + +!!N + +!!fe,
|
|
2912
3063
|
children: O
|
|
2913
|
-
}) }) : /* @__PURE__ */ t(e, { children:
|
|
2914
|
-
let a =
|
|
2915
|
-
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
variant: "empty",
|
|
2944
|
-
"aria-expanded": s,
|
|
2945
|
-
"aria-label": me?.(e.original, s) ?? (s ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
2946
|
-
onClick: () => Dt(e.id),
|
|
2947
|
-
children: /* @__PURE__ */ t(J, {
|
|
2948
|
-
name: "IconChevron",
|
|
2949
|
-
width: 16,
|
|
2950
|
-
height: 16,
|
|
2951
|
-
className: s ? Z.expansionIconOpen : Z.expansionIcon
|
|
2952
|
-
})
|
|
2953
|
-
})
|
|
2954
|
-
}),
|
|
2955
|
-
N && /* @__PURE__ */ t("td", {
|
|
2956
|
-
className: Z.selectionCell,
|
|
2957
|
-
children: /* @__PURE__ */ t("div", {
|
|
3064
|
+
}) }) : /* @__PURE__ */ t(e, { children: Je.map((e, i) => {
|
|
3065
|
+
let a = et.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = nt.has(e.id);
|
|
3066
|
+
return /* @__PURE__ */ n(r, { children: [/* @__PURE__ */ t(rn, {
|
|
3067
|
+
config: V,
|
|
3068
|
+
row: e.original,
|
|
3069
|
+
children: /* @__PURE__ */ n("tr", {
|
|
3070
|
+
ref: Xe >= 0 && i >= Xe ? (e) => {
|
|
3071
|
+
e ? Ze.current.set(i, e) : Ze.current.delete(i);
|
|
3072
|
+
} : void 0,
|
|
3073
|
+
className: [
|
|
3074
|
+
M || N ? Z.clickableRow : "",
|
|
3075
|
+
a ? Z.selectedRow : "",
|
|
3076
|
+
v?.(e.original)
|
|
3077
|
+
].filter(Boolean).join(" "),
|
|
3078
|
+
style: y?.(e.original),
|
|
3079
|
+
"aria-selected": N ? a : void 0,
|
|
3080
|
+
onClick: () => {
|
|
3081
|
+
N ? Tt(e.id) : M?.(e.original);
|
|
3082
|
+
},
|
|
3083
|
+
onDoubleClick: () => {
|
|
3084
|
+
N && I?.(e.original);
|
|
3085
|
+
},
|
|
3086
|
+
onKeyDown: (t) => {
|
|
3087
|
+
t.key === "Enter" ? (t.preventDefault(), N ? I?.(e.original) : M?.(e.original)) : t.key === " " && N && (t.preventDefault(), Tt(e.id));
|
|
3088
|
+
},
|
|
3089
|
+
tabIndex: M || N || I || V ? 0 : void 0,
|
|
3090
|
+
role: !N && M ? "button" : void 0,
|
|
3091
|
+
children: [
|
|
3092
|
+
fe && /* @__PURE__ */ t("td", {
|
|
3093
|
+
className: Z.expansionCell,
|
|
2958
3094
|
onClick: (e) => e.stopPropagation(),
|
|
2959
|
-
children: /* @__PURE__ */ t(
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
3095
|
+
children: /* @__PURE__ */ t(B, {
|
|
3096
|
+
size: "sm",
|
|
3097
|
+
variant: "empty",
|
|
3098
|
+
"aria-expanded": s,
|
|
3099
|
+
"aria-label": he?.(e.original, s) ?? (s ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
3100
|
+
onClick: () => Ot(e.id),
|
|
3101
|
+
children: /* @__PURE__ */ t(J, {
|
|
3102
|
+
name: "IconChevron",
|
|
3103
|
+
width: 16,
|
|
3104
|
+
height: 16,
|
|
3105
|
+
className: s ? Z.expansionIconOpen : Z.expansionIcon
|
|
3106
|
+
})
|
|
2963
3107
|
})
|
|
3108
|
+
}),
|
|
3109
|
+
N && /* @__PURE__ */ t("td", {
|
|
3110
|
+
className: Z.selectionCell,
|
|
3111
|
+
children: /* @__PURE__ */ t("div", {
|
|
3112
|
+
onClick: (e) => e.stopPropagation(),
|
|
3113
|
+
children: /* @__PURE__ */ t(Ge, {
|
|
3114
|
+
checked: a,
|
|
3115
|
+
ariaLabel: o,
|
|
3116
|
+
onChange: () => Tt(e.id)
|
|
3117
|
+
})
|
|
3118
|
+
})
|
|
3119
|
+
}),
|
|
3120
|
+
e.getAllCells().map((e) => {
|
|
3121
|
+
let n = Ne.find((t) => t.id === e.column.id);
|
|
3122
|
+
return /* @__PURE__ */ t("td", {
|
|
3123
|
+
className: n?.sticky ? Z.stickyColumn : void 0,
|
|
3124
|
+
style: {
|
|
3125
|
+
...sn(n),
|
|
3126
|
+
...cn(n)
|
|
3127
|
+
},
|
|
3128
|
+
children: /* @__PURE__ */ t(Le.FlexRender, { cell: e })
|
|
3129
|
+
}, e.id);
|
|
2964
3130
|
})
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
return /* @__PURE__ */ t("td", {
|
|
2969
|
-
className: n?.sticky ? Z.stickyColumn : void 0,
|
|
2970
|
-
style: {
|
|
2971
|
-
...Gt(n),
|
|
2972
|
-
...Kt(n)
|
|
2973
|
-
},
|
|
2974
|
-
children: /* @__PURE__ */ t(Ie.FlexRender, { cell: e })
|
|
2975
|
-
}, e.id);
|
|
2976
|
-
})
|
|
2977
|
-
]
|
|
2978
|
-
}), s && de && /* @__PURE__ */ t("tr", {
|
|
3131
|
+
]
|
|
3132
|
+
})
|
|
3133
|
+
}), s && fe && /* @__PURE__ */ t("tr", {
|
|
2979
3134
|
className: Z.detailRow,
|
|
2980
3135
|
children: /* @__PURE__ */ t("td", {
|
|
2981
|
-
colSpan:
|
|
2982
|
-
children:
|
|
3136
|
+
colSpan: Ne.length + +!!N + 1,
|
|
3137
|
+
children: fe({
|
|
2983
3138
|
row: e.original,
|
|
2984
3139
|
rowId: e.id,
|
|
2985
|
-
collapse: () =>
|
|
3140
|
+
collapse: () => Ot(e.id)
|
|
2986
3141
|
})
|
|
2987
3142
|
})
|
|
2988
3143
|
})] }, e.id);
|
|
@@ -2990,55 +3145,55 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
2990
3145
|
]
|
|
2991
3146
|
})
|
|
2992
3147
|
}),
|
|
2993
|
-
!
|
|
3148
|
+
!lt && /* @__PURE__ */ n("div", {
|
|
2994
3149
|
className: Z.cards,
|
|
2995
3150
|
role: "list",
|
|
2996
3151
|
"aria-label": T ?? w,
|
|
2997
|
-
children: [N && !E && !
|
|
3152
|
+
children: [N && !E && !dt && He.length > 0 && /* @__PURE__ */ n("div", {
|
|
2998
3153
|
className: Z.mobileSelectionControls,
|
|
2999
3154
|
children: [/* @__PURE__ */ t(Ge, {
|
|
3000
|
-
checked:
|
|
3001
|
-
indeterminate:
|
|
3155
|
+
checked: at,
|
|
3156
|
+
indeterminate: ot,
|
|
3002
3157
|
ariaLabel: R,
|
|
3003
3158
|
label: R,
|
|
3004
|
-
onChange:
|
|
3159
|
+
onChange: Et
|
|
3005
3160
|
}), ee && /* @__PURE__ */ t(B, {
|
|
3006
3161
|
size: "sm",
|
|
3007
3162
|
variant: "empty",
|
|
3008
|
-
disabled:
|
|
3009
|
-
onClick:
|
|
3163
|
+
disabled: et.size === 0,
|
|
3164
|
+
onClick: Dt,
|
|
3010
3165
|
children: z
|
|
3011
3166
|
})]
|
|
3012
3167
|
}), E ? /* @__PURE__ */ t(gt, {
|
|
3013
3168
|
lines: 4,
|
|
3014
3169
|
height: 65
|
|
3015
|
-
}) :
|
|
3170
|
+
}) : dt ? /* @__PURE__ */ t("div", {
|
|
3016
3171
|
className: Z.state,
|
|
3017
|
-
children:
|
|
3018
|
-
}) :
|
|
3172
|
+
children: dt
|
|
3173
|
+
}) : He.length === 0 ? /* @__PURE__ */ t("div", {
|
|
3019
3174
|
className: Z.state,
|
|
3020
3175
|
children: O
|
|
3021
|
-
}) : /* @__PURE__ */ t(e, { children:
|
|
3022
|
-
let i =
|
|
3176
|
+
}) : /* @__PURE__ */ t(e, { children: Je.map((e, r) => {
|
|
3177
|
+
let i = et.has(e.id), a = nt.has(e.id), o = L?.(e.original) ?? `Выбрать строку ${e.index + 1}`, s = N && /* @__PURE__ */ n("div", {
|
|
3023
3178
|
className: Z.cardSelectionControls,
|
|
3024
3179
|
onClick: (e) => e.stopPropagation(),
|
|
3025
3180
|
children: [/* @__PURE__ */ t(Ge, {
|
|
3026
3181
|
checked: i,
|
|
3027
3182
|
ariaLabel: o,
|
|
3028
|
-
onChange: () =>
|
|
3183
|
+
onChange: () => Tt(e.id)
|
|
3029
3184
|
}), I && /* @__PURE__ */ t(B, {
|
|
3030
3185
|
size: "sm",
|
|
3031
3186
|
variant: "empty",
|
|
3032
3187
|
onClick: () => I(e.original),
|
|
3033
3188
|
children: te
|
|
3034
3189
|
})]
|
|
3035
|
-
}), c =
|
|
3190
|
+
}), c = fe && /* @__PURE__ */ t(B, {
|
|
3036
3191
|
size: "sm",
|
|
3037
3192
|
variant: "empty",
|
|
3038
3193
|
"aria-expanded": a,
|
|
3039
|
-
"aria-label":
|
|
3194
|
+
"aria-label": he?.(e.original, a) ?? (a ? "Скрыть подробности строки" : "Показать подробности строки"),
|
|
3040
3195
|
onClick: (t) => {
|
|
3041
|
-
t.stopPropagation(),
|
|
3196
|
+
t.stopPropagation(), Ot(e.id);
|
|
3042
3197
|
},
|
|
3043
3198
|
children: /* @__PURE__ */ t(J, {
|
|
3044
3199
|
name: "IconChevron",
|
|
@@ -3048,8 +3203,8 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3048
3203
|
})
|
|
3049
3204
|
});
|
|
3050
3205
|
if (p) return /* @__PURE__ */ n("div", {
|
|
3051
|
-
ref:
|
|
3052
|
-
e ?
|
|
3206
|
+
ref: Xe >= 0 && r >= Xe ? (e) => {
|
|
3207
|
+
e ? Qe.current.set(r, e) : Qe.current.delete(r);
|
|
3053
3208
|
} : void 0,
|
|
3054
3209
|
role: "listitem",
|
|
3055
3210
|
className: [
|
|
@@ -3060,29 +3215,29 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3060
3215
|
style: y?.(e.original),
|
|
3061
3216
|
"aria-selected": N ? i : void 0,
|
|
3062
3217
|
onClick: () => {
|
|
3063
|
-
N &&
|
|
3218
|
+
N && Tt(e.id);
|
|
3064
3219
|
},
|
|
3065
3220
|
children: [
|
|
3066
3221
|
s,
|
|
3067
3222
|
p({
|
|
3068
3223
|
row: e.original,
|
|
3069
|
-
columns:
|
|
3224
|
+
columns: Ne
|
|
3070
3225
|
}),
|
|
3071
3226
|
c,
|
|
3072
3227
|
a && /* @__PURE__ */ t("div", {
|
|
3073
3228
|
className: Z.cardDetail,
|
|
3074
|
-
children:
|
|
3229
|
+
children: fe?.({
|
|
3075
3230
|
row: e.original,
|
|
3076
3231
|
rowId: e.id,
|
|
3077
|
-
collapse: () =>
|
|
3232
|
+
collapse: () => Ot(e.id)
|
|
3078
3233
|
})
|
|
3079
3234
|
})
|
|
3080
3235
|
]
|
|
3081
3236
|
}, e.id);
|
|
3082
|
-
let l =
|
|
3237
|
+
let l = Ne.filter((e) => !e.mobile?.hideOnMobile).sort((e, t) => (e.mobile?.mobileOrder ?? 0) - (t.mobile?.mobileOrder ?? 0)), u = l.find((e) => e.mobile?.primary) ?? l.find((e) => e.mobile?.mobileVariant !== "actions"), d = (t) => dn(t.accessor, e.original), f = (t) => t.mobile?.renderMobile?.(e.original, d(t)) ?? t.cell?.(e.original, d(t)) ?? String(d(t) ?? "");
|
|
3083
3238
|
return /* @__PURE__ */ n("article", {
|
|
3084
|
-
ref:
|
|
3085
|
-
e ?
|
|
3239
|
+
ref: Xe >= 0 && r >= Xe ? (e) => {
|
|
3240
|
+
e ? Qe.current.set(r, e) : Qe.current.delete(r);
|
|
3086
3241
|
} : void 0,
|
|
3087
3242
|
role: "listitem",
|
|
3088
3243
|
className: [
|
|
@@ -3093,7 +3248,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3093
3248
|
style: y?.(e.original),
|
|
3094
3249
|
"aria-selected": N ? i : void 0,
|
|
3095
3250
|
onClick: () => {
|
|
3096
|
-
N &&
|
|
3251
|
+
N && Tt(e.id);
|
|
3097
3252
|
},
|
|
3098
3253
|
children: [
|
|
3099
3254
|
s,
|
|
@@ -3106,40 +3261,40 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3106
3261
|
l.filter((e) => e.mobile?.mobileVariant === "actions").map((e) => /* @__PURE__ */ t("footer", { children: f(e) }, e.id)),
|
|
3107
3262
|
a && /* @__PURE__ */ t("div", {
|
|
3108
3263
|
className: Z.cardDetail,
|
|
3109
|
-
children:
|
|
3264
|
+
children: fe?.({
|
|
3110
3265
|
row: e.original,
|
|
3111
3266
|
rowId: e.id,
|
|
3112
|
-
collapse: () =>
|
|
3267
|
+
collapse: () => Ot(e.id)
|
|
3113
3268
|
})
|
|
3114
3269
|
})
|
|
3115
3270
|
]
|
|
3116
3271
|
}, e.id);
|
|
3117
3272
|
}) })]
|
|
3118
3273
|
}),
|
|
3119
|
-
(
|
|
3274
|
+
(ft || pt && !E && !dt && He.length > 0) && /* @__PURE__ */ n("nav", {
|
|
3120
3275
|
className: Z.pagination,
|
|
3121
3276
|
"aria-label": "Пагинация таблицы",
|
|
3122
|
-
children: [
|
|
3277
|
+
children: [pt ? xt("bottom") : /* @__PURE__ */ n("span", {
|
|
3123
3278
|
className: Z.paginationRange,
|
|
3124
3279
|
"aria-live": "polite",
|
|
3125
3280
|
children: [
|
|
3126
|
-
_t,
|
|
3127
|
-
"–",
|
|
3128
3281
|
vt,
|
|
3282
|
+
"–",
|
|
3283
|
+
yt,
|
|
3129
3284
|
" из",
|
|
3130
3285
|
" ",
|
|
3131
|
-
|
|
3286
|
+
ze
|
|
3132
3287
|
]
|
|
3133
|
-
}),
|
|
3288
|
+
}), ft && /* @__PURE__ */ n("div", {
|
|
3134
3289
|
className: Z.paginationControls,
|
|
3135
3290
|
children: [
|
|
3136
3291
|
/* @__PURE__ */ n(B, {
|
|
3137
3292
|
variant: "empty",
|
|
3138
3293
|
size: "md",
|
|
3139
|
-
disabled: E ||
|
|
3294
|
+
disabled: E || q === 0,
|
|
3140
3295
|
"aria-label": "Предыдущая страница",
|
|
3141
3296
|
onClick: () => {
|
|
3142
|
-
|
|
3297
|
+
St(q - 1);
|
|
3143
3298
|
},
|
|
3144
3299
|
children: [/* @__PURE__ */ t(J, {
|
|
3145
3300
|
name: "IconChevron",
|
|
@@ -3153,15 +3308,15 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3153
3308
|
}),
|
|
3154
3309
|
/* @__PURE__ */ t("div", {
|
|
3155
3310
|
className: Z.pageNumbers,
|
|
3156
|
-
children:
|
|
3157
|
-
variant: e ===
|
|
3311
|
+
children: ct.map((e) => typeof e == "number" ? /* @__PURE__ */ t(B, {
|
|
3312
|
+
variant: e === q ? "secondary" : "empty",
|
|
3158
3313
|
size: "md",
|
|
3159
3314
|
className: Z.pageButton,
|
|
3160
3315
|
"aria-label": `Перейти на страницу ${e + 1}`,
|
|
3161
|
-
"aria-current": e ===
|
|
3316
|
+
"aria-current": e === q ? "page" : void 0,
|
|
3162
3317
|
disabled: E,
|
|
3163
3318
|
onClick: () => {
|
|
3164
|
-
|
|
3319
|
+
St(e);
|
|
3165
3320
|
},
|
|
3166
3321
|
children: e + 1
|
|
3167
3322
|
}, e) : /* @__PURE__ */ t("span", {
|
|
@@ -3173,10 +3328,10 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3173
3328
|
/* @__PURE__ */ n(B, {
|
|
3174
3329
|
variant: "empty",
|
|
3175
3330
|
size: "md",
|
|
3176
|
-
disabled: E ||
|
|
3331
|
+
disabled: E || q === Be - 1,
|
|
3177
3332
|
"aria-label": "Следующая страница",
|
|
3178
3333
|
onClick: () => {
|
|
3179
|
-
|
|
3334
|
+
St(q + 1);
|
|
3180
3335
|
},
|
|
3181
3336
|
children: [/* @__PURE__ */ t("span", {
|
|
3182
3337
|
className: Z.paginationButtonLabel,
|
|
@@ -3193,10 +3348,10 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3193
3348
|
})
|
|
3194
3349
|
]
|
|
3195
3350
|
});
|
|
3196
|
-
},
|
|
3351
|
+
}, bn = (e, t) => {
|
|
3197
3352
|
let n = t.trim().toLocaleLowerCase();
|
|
3198
3353
|
return n ? e.filter((e) => e.label.toLocaleLowerCase().includes(n) || e.value.toLocaleLowerCase().includes(n)) : e;
|
|
3199
|
-
},
|
|
3354
|
+
}, xn = (e, t, n) => {
|
|
3200
3355
|
if (!e.length) return -1;
|
|
3201
3356
|
for (let r = 0; r < e.length; r += 1) {
|
|
3202
3357
|
let i = (t + r * n + e.length) % e.length;
|
|
@@ -3222,23 +3377,23 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3222
3377
|
active: "_active_1os84_321",
|
|
3223
3378
|
actionOption: "_actionOption_1os84_341",
|
|
3224
3379
|
visuallyHidden: "_visuallyHidden_1os84_375"
|
|
3225
|
-
},
|
|
3380
|
+
}, Sn = 8, Cn = 6, wn = 5, Tn = 10, En = {
|
|
3226
3381
|
sm: 30,
|
|
3227
3382
|
md: 40,
|
|
3228
3383
|
lg: 50
|
|
3229
|
-
},
|
|
3384
|
+
}, Dn = ({ 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 }) => {
|
|
3230
3385
|
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, N = [
|
|
3231
3386
|
A,
|
|
3232
3387
|
j,
|
|
3233
3388
|
M
|
|
3234
|
-
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, ee] = g(""), [te, B] = g(-1), [V, U] = g(null),
|
|
3235
|
-
d(() => ee(
|
|
3236
|
-
let oe = l(() => P.current?.querySelector("input") ?? null, []), se = l((e, t) =>
|
|
3389
|
+
].filter(Boolean).join(" "), P = h(null), F = h(null), I = h([]), [L, R] = g(!1), [z, ee] = g(""), [te, B] = g(-1), [V, U] = g(null), W = m(() => e.find((e) => e.value === r), [e, r]), re = m(() => bn(e, z), [e, z]), ie = s && u, ae = te >= 0 ? re[te] : void 0;
|
|
3390
|
+
d(() => ee(W?.label ?? ""), [W?.label, r]);
|
|
3391
|
+
let oe = l(() => P.current?.querySelector("input") ?? null, []), se = l((e, t) => xn(re, e, t), [re]), ce = l((e) => {
|
|
3237
3392
|
B(e), !(e < 0) && requestAnimationFrame(() => I.current[e]?.scrollIntoView({ block: "nearest" }));
|
|
3238
3393
|
}, []), G = l(() => {
|
|
3239
3394
|
let e = oe();
|
|
3240
3395
|
if (!e) return;
|
|
3241
|
-
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(
|
|
3396
|
+
let t = e.getBoundingClientRect(), n = Math.max(1, Math.min(re.length, wn)) * En[x] + Tn, r = window.innerHeight - t.bottom - Sn, i = t.top - Sn, a = r < n && i > r, o = a ? i : r, s = Math.max(En[x] + Tn, Math.min(n, o)), c = window.innerWidth - t.width - Sn, l = Math.max(Sn, Math.min(t.left, c)), u = a ? Math.max(Sn, t.top - s - Cn) : t.bottom + Cn;
|
|
3242
3397
|
U({
|
|
3243
3398
|
top: u,
|
|
3244
3399
|
left: l,
|
|
@@ -3246,7 +3401,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3246
3401
|
maxHeight: s
|
|
3247
3402
|
});
|
|
3248
3403
|
}, [
|
|
3249
|
-
|
|
3404
|
+
re.length,
|
|
3250
3405
|
oe,
|
|
3251
3406
|
x
|
|
3252
3407
|
]);
|
|
@@ -3273,7 +3428,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3273
3428
|
}, de = L ? /* @__PURE__ */ t("ul", {
|
|
3274
3429
|
ref: F,
|
|
3275
3430
|
id: k,
|
|
3276
|
-
className: `${Q.menu} ${
|
|
3431
|
+
className: `${Q.menu} ${re.length === 0 ? Q.menuEmpty : ""}`,
|
|
3277
3432
|
role: "listbox",
|
|
3278
3433
|
"aria-label": v,
|
|
3279
3434
|
style: V ? {
|
|
@@ -3287,10 +3442,10 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3287
3442
|
visibility: "hidden",
|
|
3288
3443
|
maxHeight: 0
|
|
3289
3444
|
},
|
|
3290
|
-
children:
|
|
3445
|
+
children: re.length === 0 ? /* @__PURE__ */ t("li", {
|
|
3291
3446
|
className: `${Q.empty} ${Q[x]}`,
|
|
3292
3447
|
children: o
|
|
3293
|
-
}) :
|
|
3448
|
+
}) : re.map((e, i) => {
|
|
3294
3449
|
let a = e.value === r, o = i === te;
|
|
3295
3450
|
return /* @__PURE__ */ t("li", {
|
|
3296
3451
|
role: "presentation",
|
|
@@ -3342,7 +3497,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3342
3497
|
}),
|
|
3343
3498
|
ie ? /* @__PURE__ */ t("div", {
|
|
3344
3499
|
className: `${Q.disabledText} ${Q[x]}`,
|
|
3345
|
-
children:
|
|
3500
|
+
children: W?.label ?? a
|
|
3346
3501
|
}) : /* @__PURE__ */ n("div", {
|
|
3347
3502
|
className: Q.control,
|
|
3348
3503
|
children: [/* @__PURE__ */ t(Et, {
|
|
@@ -3359,8 +3514,8 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3359
3514
|
className: `${Q.inputHost} ${Q[x]}`,
|
|
3360
3515
|
onFocus: le,
|
|
3361
3516
|
onChange: (t) => {
|
|
3362
|
-
let n = String(t), r =
|
|
3363
|
-
ee(n), R(!0), B(
|
|
3517
|
+
let n = String(t), r = bn(e, n);
|
|
3518
|
+
ee(n), R(!0), B(xn(r, 0, 1));
|
|
3364
3519
|
},
|
|
3365
3520
|
role: "combobox",
|
|
3366
3521
|
"aria-autocomplete": "list",
|
|
@@ -3374,13 +3529,13 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3374
3529
|
if (!(s || c)) {
|
|
3375
3530
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
3376
3531
|
e.preventDefault();
|
|
3377
|
-
let t = e.key === "ArrowDown" ? 1 : -1, n = te >= 0 ? te + t : t === 1 ? 0 :
|
|
3532
|
+
let t = e.key === "ArrowDown" ? 1 : -1, n = te >= 0 ? te + t : t === 1 ? 0 : re.length - 1;
|
|
3378
3533
|
R(!0), ce(se(n, t));
|
|
3379
3534
|
} else if (e.key === "Home" || e.key === "End") {
|
|
3380
3535
|
if (!L) return;
|
|
3381
3536
|
e.preventDefault();
|
|
3382
3537
|
let t = e.key === "Home" ? 1 : -1;
|
|
3383
|
-
ce(se(e.key === "Home" ? 0 :
|
|
3538
|
+
ce(se(e.key === "Home" ? 0 : re.length - 1, t));
|
|
3384
3539
|
} else e.key === "Enter" && L && ae ? (e.preventDefault(), ue(ae)) : e.key === "Escape" && L ? (e.preventDefault(), R(!1), B(-1)) : e.key === "Tab" && (R(!1), B(-1));
|
|
3385
3540
|
}
|
|
3386
3541
|
}
|
|
@@ -3399,7 +3554,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3399
3554
|
id: A,
|
|
3400
3555
|
className: Q.visuallyHidden,
|
|
3401
3556
|
"aria-live": "polite",
|
|
3402
|
-
children: ["Найдено вариантов: ",
|
|
3557
|
+
children: ["Найдено вариантов: ", re.length]
|
|
3403
3558
|
}),
|
|
3404
3559
|
b && !y && /* @__PURE__ */ t(H, {
|
|
3405
3560
|
id: j,
|
|
@@ -3412,25 +3567,25 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3412
3567
|
})
|
|
3413
3568
|
]
|
|
3414
3569
|
});
|
|
3415
|
-
},
|
|
3570
|
+
}, On = {
|
|
3416
3571
|
root: "_root_11adi_1",
|
|
3417
3572
|
header: "_header_11adi_21",
|
|
3418
3573
|
title: "_title_11adi_41",
|
|
3419
3574
|
dismiss: "_dismiss_11adi_55",
|
|
3420
3575
|
content: "_content_11adi_65"
|
|
3421
|
-
},
|
|
3576
|
+
}, kn = ({ title: e, children: r, dismissible: i = !1, onDismiss: a, dismissLabel: o = "Закрыть информационный блок", headingAs: s = "h3", className: c = "" }) => {
|
|
3422
3577
|
let l = `ds-info-block-${f()}`;
|
|
3423
3578
|
return /* @__PURE__ */ n("section", {
|
|
3424
|
-
className: `${
|
|
3579
|
+
className: `${On.root} ${c}`,
|
|
3425
3580
|
"aria-labelledby": l,
|
|
3426
3581
|
children: [/* @__PURE__ */ n("header", {
|
|
3427
|
-
className:
|
|
3582
|
+
className: On.header,
|
|
3428
3583
|
children: [/* @__PURE__ */ t(s, {
|
|
3429
3584
|
id: l,
|
|
3430
|
-
className:
|
|
3585
|
+
className: On.title,
|
|
3431
3586
|
children: e
|
|
3432
3587
|
}), i && /* @__PURE__ */ t(B, {
|
|
3433
|
-
className:
|
|
3588
|
+
className: On.dismiss,
|
|
3434
3589
|
variant: "empty",
|
|
3435
3590
|
onClick: a,
|
|
3436
3591
|
"aria-label": o,
|
|
@@ -3441,15 +3596,15 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3441
3596
|
})
|
|
3442
3597
|
})]
|
|
3443
3598
|
}), /* @__PURE__ */ t("div", {
|
|
3444
|
-
className:
|
|
3599
|
+
className: On.content,
|
|
3445
3600
|
children: r
|
|
3446
3601
|
})]
|
|
3447
3602
|
});
|
|
3448
|
-
},
|
|
3603
|
+
}, An = {
|
|
3449
3604
|
root: "_root_1ecm3_1",
|
|
3450
3605
|
grid: "_grid_1ecm3_13",
|
|
3451
3606
|
actions: "_actions_1ecm3_27"
|
|
3452
|
-
},
|
|
3607
|
+
}, jn = ({ filters: e, values: r, onChange: i, onApply: a, onReset: o, applyMode: s = "instant", loading: c = !1, disabled: l = !1, className: u = "" }) => {
|
|
3453
3608
|
let d = (e, t) => {
|
|
3454
3609
|
let n = {
|
|
3455
3610
|
...r,
|
|
@@ -3458,11 +3613,11 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3458
3613
|
i?.(n, e), s === "instant" && a?.(n);
|
|
3459
3614
|
};
|
|
3460
3615
|
return /* @__PURE__ */ n("section", {
|
|
3461
|
-
className: `${
|
|
3616
|
+
className: `${An.root} ${u}`,
|
|
3462
3617
|
"aria-label": "Фильтры",
|
|
3463
3618
|
"aria-busy": c,
|
|
3464
3619
|
children: [/* @__PURE__ */ t("div", {
|
|
3465
|
-
className:
|
|
3620
|
+
className: An.grid,
|
|
3466
3621
|
children: e.filter((e) => !e.hidden).map((e) => {
|
|
3467
3622
|
let n = l || c || e.disabled, i = r[e.id];
|
|
3468
3623
|
if (e.type === "input") {
|
|
@@ -3530,7 +3685,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3530
3685
|
}, e.id);
|
|
3531
3686
|
})
|
|
3532
3687
|
}), (o || s === "manual") && /* @__PURE__ */ n("div", {
|
|
3533
|
-
className:
|
|
3688
|
+
className: An.actions,
|
|
3534
3689
|
children: [o && /* @__PURE__ */ t(B, {
|
|
3535
3690
|
variant: "destructiveOutline",
|
|
3536
3691
|
disabled: l || c,
|
|
@@ -3544,7 +3699,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3544
3699
|
})]
|
|
3545
3700
|
})]
|
|
3546
3701
|
});
|
|
3547
|
-
},
|
|
3702
|
+
}, Mn = {
|
|
3548
3703
|
grid: "_grid_1q540_1",
|
|
3549
3704
|
comfortable: "_comfortable_1q540_11",
|
|
3550
3705
|
compact: "_compact_1q540_19",
|
|
@@ -3561,23 +3716,23 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3561
3716
|
summary: "_summary_1q540_101",
|
|
3562
3717
|
summaryTitle: "_summaryTitle_1q540_137",
|
|
3563
3718
|
summaryList: "_summaryList_1q540_145"
|
|
3564
|
-
},
|
|
3719
|
+
}, Nn = ({ columns: e = 2, density: n = "comfortable", className: r = "", ...i }) => /* @__PURE__ */ t("div", {
|
|
3565
3720
|
...i,
|
|
3566
|
-
className: `${
|
|
3567
|
-
}),
|
|
3721
|
+
className: `${Mn.grid} ${Mn[`columns${e}`]} ${Mn[n]} ${r}`
|
|
3722
|
+
}), Pn = ({ span: e = 1, className: n = "", ...r }) => /* @__PURE__ */ t("div", {
|
|
3568
3723
|
...r,
|
|
3569
|
-
className: `${
|
|
3570
|
-
}),
|
|
3724
|
+
className: `${Mn.item} ${Mn[`span${e}`]} ${n}`
|
|
3725
|
+
}), Fn = ({ title: e = "Проверьте заполнение формы", items: r, focusField: i, className: a = "", ...o }) => r.length === 0 ? null : /* @__PURE__ */ n("div", {
|
|
3571
3726
|
...o,
|
|
3572
|
-
className: `${
|
|
3727
|
+
className: `${Mn.summary} ${a}`,
|
|
3573
3728
|
role: "alert",
|
|
3574
3729
|
"aria-atomic": "true",
|
|
3575
3730
|
tabIndex: -1,
|
|
3576
3731
|
children: [/* @__PURE__ */ t("strong", {
|
|
3577
|
-
className:
|
|
3732
|
+
className: Mn.summaryTitle,
|
|
3578
3733
|
children: e
|
|
3579
3734
|
}), /* @__PURE__ */ t("ul", {
|
|
3580
|
-
className:
|
|
3735
|
+
className: Mn.summaryList,
|
|
3581
3736
|
children: r.map((e) => /* @__PURE__ */ t("li", { children: e.fieldId ? /* @__PURE__ */ t("a", {
|
|
3582
3737
|
href: `#${e.fieldId}`,
|
|
3583
3738
|
onClick: (t) => {
|
|
@@ -3586,7 +3741,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3586
3741
|
children: e.message
|
|
3587
3742
|
}) : e.message }, e.id))
|
|
3588
3743
|
})]
|
|
3589
|
-
}),
|
|
3744
|
+
}), In = {
|
|
3590
3745
|
wrapper: "_wrapper_yxnr3_1",
|
|
3591
3746
|
dropzone: "_dropzone_yxnr3_15",
|
|
3592
3747
|
dragActive: "_dragActive_yxnr3_45",
|
|
@@ -3599,12 +3754,12 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3599
3754
|
file: "_file_yxnr3_133",
|
|
3600
3755
|
fileName: "_fileName_yxnr3_175",
|
|
3601
3756
|
fileSize: "_fileSize_yxnr3_187"
|
|
3602
|
-
},
|
|
3757
|
+
}, Ln = (e) => `${e.name}:${e.size}:${e.lastModified}`, Rn = (e) => e < 1024 ? `${e} Б` : e < 1048576 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`, zn = (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), Bn = ({ 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 }) => {
|
|
3603
3758
|
let T = f(), E = y ?? `ds-file-input-${v ?? T}`, D = h(null), O = h(0), [k, A] = g(!1), j = u ? `${E}-hint` : void 0, M = d ? `${E}-error` : void 0, N = [j, M].filter(Boolean).join(" ") || void 0, P = !m && !_, F = (e) => {
|
|
3604
|
-
let t = [], n = new Set(r.map(
|
|
3759
|
+
let t = [], n = new Set(r.map(Ln)), l = e.filter((e) => zn(e, o) ? s !== void 0 && e.size > s ? (t.push({
|
|
3605
3760
|
file: e,
|
|
3606
3761
|
reason: "maxSize"
|
|
3607
|
-
}), !1) : !n.has(
|
|
3762
|
+
}), !1) : !n.has(Ln(e)) && (n.add(Ln(e)), !0) : (t.push({
|
|
3608
3763
|
file: e,
|
|
3609
3764
|
reason: "accept"
|
|
3610
3765
|
}), !1)), u = a ? c : 1, d = a ? [...r, ...l] : l.slice(-1);
|
|
@@ -3614,7 +3769,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3614
3769
|
})), d = d.slice(0, u)), t.length && w?.(t), l.length && i?.(d), D.current && (D.current.value = "");
|
|
3615
3770
|
};
|
|
3616
3771
|
return /* @__PURE__ */ n("div", {
|
|
3617
|
-
className: `${
|
|
3772
|
+
className: `${In.wrapper} ${b}`,
|
|
3618
3773
|
children: [
|
|
3619
3774
|
l && /* @__PURE__ */ t(ne, {
|
|
3620
3775
|
htmlFor: E,
|
|
@@ -3623,7 +3778,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3623
3778
|
children: l
|
|
3624
3779
|
}),
|
|
3625
3780
|
/* @__PURE__ */ n("div", {
|
|
3626
|
-
className: `${
|
|
3781
|
+
className: `${In.dropzone} ${k ? In.dragActive : ""} ${m ? In.disabled : ""} ${d ? In.error : ""}`,
|
|
3627
3782
|
onDragEnter: (e) => {
|
|
3628
3783
|
e.preventDefault(), P && ++O.current === 1 && A(!0);
|
|
3629
3784
|
},
|
|
@@ -3638,7 +3793,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3638
3793
|
ref: D,
|
|
3639
3794
|
id: E,
|
|
3640
3795
|
name: v,
|
|
3641
|
-
className:
|
|
3796
|
+
className: In.nativeInput,
|
|
3642
3797
|
type: "file",
|
|
3643
3798
|
multiple: a,
|
|
3644
3799
|
accept: o,
|
|
@@ -3649,19 +3804,19 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3649
3804
|
onChange: (e) => F(Array.from(e.target.files ?? []))
|
|
3650
3805
|
}), r.length ? /* @__PURE__ */ n(e, { children: [
|
|
3651
3806
|
/* @__PURE__ */ t("ul", {
|
|
3652
|
-
className:
|
|
3807
|
+
className: In.files,
|
|
3653
3808
|
"aria-live": "polite",
|
|
3654
3809
|
children: r.map((e, a) => /* @__PURE__ */ n("li", {
|
|
3655
|
-
className:
|
|
3810
|
+
className: In.file,
|
|
3656
3811
|
children: [
|
|
3657
3812
|
/* @__PURE__ */ t("span", {
|
|
3658
|
-
className:
|
|
3813
|
+
className: In.fileName,
|
|
3659
3814
|
title: e.name,
|
|
3660
3815
|
children: e.name
|
|
3661
3816
|
}),
|
|
3662
3817
|
/* @__PURE__ */ t("span", {
|
|
3663
|
-
className:
|
|
3664
|
-
children:
|
|
3818
|
+
className: In.fileSize,
|
|
3819
|
+
children: Rn(e.size)
|
|
3665
3820
|
}),
|
|
3666
3821
|
P && /* @__PURE__ */ t(B, {
|
|
3667
3822
|
variant: "empty",
|
|
@@ -3675,25 +3830,25 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3675
3830
|
})
|
|
3676
3831
|
})
|
|
3677
3832
|
]
|
|
3678
|
-
},
|
|
3833
|
+
}, Ln(e)))
|
|
3679
3834
|
}),
|
|
3680
3835
|
P && (a || r.length === 0) && /* @__PURE__ */ t(B, {
|
|
3681
|
-
className:
|
|
3836
|
+
className: In.browseButton,
|
|
3682
3837
|
size: "sm",
|
|
3683
3838
|
onClick: () => D.current?.click(),
|
|
3684
3839
|
children: C
|
|
3685
3840
|
}),
|
|
3686
3841
|
P && !a && /* @__PURE__ */ t(B, {
|
|
3687
|
-
className:
|
|
3842
|
+
className: In.browseButton,
|
|
3688
3843
|
size: "sm",
|
|
3689
3844
|
onClick: () => D.current?.click(),
|
|
3690
3845
|
children: S
|
|
3691
3846
|
})
|
|
3692
3847
|
] }) : /* @__PURE__ */ n("div", {
|
|
3693
|
-
className:
|
|
3848
|
+
className: In.empty,
|
|
3694
3849
|
children: [
|
|
3695
3850
|
/* @__PURE__ */ t("span", {
|
|
3696
|
-
className:
|
|
3851
|
+
className: In.uploadIcon,
|
|
3697
3852
|
"aria-hidden": "true",
|
|
3698
3853
|
children: /* @__PURE__ */ t(J, {
|
|
3699
3854
|
name: "IconUpload",
|
|
@@ -3721,20 +3876,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3721
3876
|
})
|
|
3722
3877
|
]
|
|
3723
3878
|
});
|
|
3724
|
-
},
|
|
3725
|
-
let [n, r] = g(null);
|
|
3726
|
-
return d(() => {
|
|
3727
|
-
let e = document.getElementById(t);
|
|
3728
|
-
if (e) {
|
|
3729
|
-
r(e);
|
|
3730
|
-
return;
|
|
3731
|
-
}
|
|
3732
|
-
let n = document.createElement("div");
|
|
3733
|
-
return n.id = t, document.body.appendChild(n), r(n), () => {
|
|
3734
|
-
n.childElementCount === 0 && n.parentElement && n.remove();
|
|
3735
|
-
};
|
|
3736
|
-
}, [t]), n ? _(e, n) : null;
|
|
3737
|
-
}, Dn = typeof window > "u" ? d : p, On = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3879
|
+
}, Vn = typeof window > "u" ? d : p, Hn = ({ anchorRef: e, children: n, matchAnchorWidth: r = !1, offset: i = 4, className: a }) => {
|
|
3738
3880
|
let [o, s] = g(null), [c, u] = g({
|
|
3739
3881
|
position: "fixed",
|
|
3740
3882
|
visibility: "hidden",
|
|
@@ -3757,7 +3899,7 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3757
3899
|
o,
|
|
3758
3900
|
i
|
|
3759
3901
|
]);
|
|
3760
|
-
return
|
|
3902
|
+
return Vn(() => {
|
|
3761
3903
|
if (!o) return;
|
|
3762
3904
|
d(), window.addEventListener("resize", d), window.addEventListener("scroll", d, !0);
|
|
3763
3905
|
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
@@ -3768,13 +3910,13 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3768
3910
|
e,
|
|
3769
3911
|
o,
|
|
3770
3912
|
d
|
|
3771
|
-
]), /* @__PURE__ */ t(
|
|
3913
|
+
]), /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ t("div", {
|
|
3772
3914
|
ref: s,
|
|
3773
3915
|
className: a,
|
|
3774
3916
|
style: c,
|
|
3775
3917
|
children: n
|
|
3776
3918
|
}) });
|
|
3777
|
-
},
|
|
3919
|
+
}, Un = {
|
|
3778
3920
|
wrapper: "_wrapper_1tid7_1",
|
|
3779
3921
|
control: "_control_1tid7_15",
|
|
3780
3922
|
textarea: "_textarea_1tid7_25",
|
|
@@ -3788,12 +3930,12 @@ var Ut = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3788
3930
|
clearAction: "_clearAction_1tid7_171",
|
|
3789
3931
|
messages: "_messages_1tid7_251",
|
|
3790
3932
|
counter: "_counter_1tid7_265"
|
|
3791
|
-
},
|
|
3792
|
-
function
|
|
3933
|
+
}, Wn = 2;
|
|
3934
|
+
function Gn(e) {
|
|
3793
3935
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
3794
3936
|
return Number.isFinite(n) ? n : Number.parseFloat(t.fontSize) * 1.4;
|
|
3795
3937
|
}
|
|
3796
|
-
function
|
|
3938
|
+
function Kn({ 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 = Wn, maxRows: w, autoResize: T = !0, ...E }) {
|
|
3797
3939
|
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, N = [
|
|
3798
3940
|
A,
|
|
3799
3941
|
j,
|
|
@@ -3801,7 +3943,7 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3801
3943
|
].filter(Boolean).join(" ") || void 0, P = Math.max(1, C), F = w === void 0 ? void 0 : Math.max(P, w), I = l(() => {
|
|
3802
3944
|
let e = k.current;
|
|
3803
3945
|
if (!e || !T) return;
|
|
3804
|
-
let t = window.getComputedStyle(e), n =
|
|
3946
|
+
let t = window.getComputedStyle(e), n = Gn(e), r = Number.parseFloat(t.paddingTop) + Number.parseFloat(t.paddingBottom) + Number.parseFloat(t.borderTopWidth) + Number.parseFloat(t.borderBottomWidth), i = n * P + r, a = F === void 0 ? Infinity : n * F + r;
|
|
3805
3947
|
e.style.height = "auto";
|
|
3806
3948
|
let o = Math.min(Math.max(e.scrollHeight, i), a);
|
|
3807
3949
|
e.style.height = `${o}px`, e.style.overflowY = e.scrollHeight > a ? "auto" : "hidden";
|
|
@@ -3833,7 +3975,7 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3833
3975
|
e && ((Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set)?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus(), I());
|
|
3834
3976
|
}, z = { "--ds-textarea-min-rows": P };
|
|
3835
3977
|
return /* @__PURE__ */ n("div", {
|
|
3836
|
-
className: `${
|
|
3978
|
+
className: `${Un.wrapper} ${m}`,
|
|
3837
3979
|
children: [
|
|
3838
3980
|
c && /* @__PURE__ */ t(ne, {
|
|
3839
3981
|
htmlFor: O,
|
|
@@ -3843,12 +3985,12 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3843
3985
|
}),
|
|
3844
3986
|
a && s ? /* @__PURE__ */ t("div", {
|
|
3845
3987
|
id: O,
|
|
3846
|
-
className: `${
|
|
3988
|
+
className: `${Un.disabledText} ${Un[v]}`,
|
|
3847
3989
|
style: z,
|
|
3848
3990
|
"aria-describedby": N,
|
|
3849
3991
|
children: e || i
|
|
3850
3992
|
}) : /* @__PURE__ */ n("div", {
|
|
3851
|
-
className:
|
|
3993
|
+
className: Un.control,
|
|
3852
3994
|
children: [/* @__PURE__ */ t("textarea", {
|
|
3853
3995
|
ref: k,
|
|
3854
3996
|
id: O,
|
|
@@ -3863,12 +4005,12 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3863
4005
|
style: z,
|
|
3864
4006
|
"aria-invalid": !!u,
|
|
3865
4007
|
"aria-describedby": N,
|
|
3866
|
-
className: `${
|
|
4008
|
+
className: `${Un.textarea} ${Un[v]} ${T ? Un.autoResize : Un.manualResize} ${u ? Un.textareaError : ""}`,
|
|
3867
4009
|
onChange: L,
|
|
3868
4010
|
...E
|
|
3869
4011
|
}), y && e && !a && !o && /* @__PURE__ */ t("button", {
|
|
3870
4012
|
type: "button",
|
|
3871
|
-
className:
|
|
4013
|
+
className: Un.clearAction,
|
|
3872
4014
|
"aria-label": "Очистить поле",
|
|
3873
4015
|
onClick: R,
|
|
3874
4016
|
children: /* @__PURE__ */ t(J, {
|
|
@@ -3879,7 +4021,7 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3879
4021
|
})]
|
|
3880
4022
|
}),
|
|
3881
4023
|
(p || u || M) && /* @__PURE__ */ n("div", {
|
|
3882
|
-
className:
|
|
4024
|
+
className: Un.messages,
|
|
3883
4025
|
children: [
|
|
3884
4026
|
p && !u && /* @__PURE__ */ t(H, {
|
|
3885
4027
|
id: A,
|
|
@@ -3892,7 +4034,7 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3892
4034
|
}),
|
|
3893
4035
|
M && /* @__PURE__ */ n("span", {
|
|
3894
4036
|
id: M,
|
|
3895
|
-
className:
|
|
4037
|
+
className: Un.counter,
|
|
3896
4038
|
children: [
|
|
3897
4039
|
e.length,
|
|
3898
4040
|
" / ",
|
|
@@ -3906,11 +4048,11 @@ function Mn({ value: e, onChange: r, placeholder: i = "", disabled: a = !1, read
|
|
|
3906
4048
|
}
|
|
3907
4049
|
//#endregion
|
|
3908
4050
|
//#region src/components/DSModal/modal.store.ts
|
|
3909
|
-
var
|
|
4051
|
+
var qn = 0, Jn = S((e, t) => ({
|
|
3910
4052
|
modals: [],
|
|
3911
4053
|
openModal: (t, n = {}, r = {}) => {
|
|
3912
|
-
|
|
3913
|
-
let i = `ds-modal-${
|
|
4054
|
+
qn += 1;
|
|
4055
|
+
let i = `ds-modal-${qn}`;
|
|
3914
4056
|
return e((e) => ({ modals: [...e.modals, {
|
|
3915
4057
|
id: i,
|
|
3916
4058
|
name: t,
|
|
@@ -3934,10 +4076,10 @@ var Nn = 0, Pn = S((e, t) => ({
|
|
|
3934
4076
|
let n = t().modals;
|
|
3935
4077
|
n.length && (e({ modals: [] }), n.forEach((e) => e.onClose?.()));
|
|
3936
4078
|
}
|
|
3937
|
-
})),
|
|
3938
|
-
|
|
3939
|
-
},
|
|
3940
|
-
function
|
|
4079
|
+
})), Yn = () => {
|
|
4080
|
+
Jn.getState().closeAllModals(), qn = 0;
|
|
4081
|
+
}, Xn = 8, Zn = 96, Qn = .55;
|
|
4082
|
+
function $n(e, t, n) {
|
|
3941
4083
|
return {
|
|
3942
4084
|
startX: e,
|
|
3943
4085
|
startY: t,
|
|
@@ -3945,16 +4087,16 @@ function zn(e, t, n) {
|
|
|
3945
4087
|
intent: "pending"
|
|
3946
4088
|
};
|
|
3947
4089
|
}
|
|
3948
|
-
function
|
|
4090
|
+
function er(e, t, n) {
|
|
3949
4091
|
let r = t - e.startX, i = n - e.startY;
|
|
3950
|
-
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >=
|
|
4092
|
+
return e.intent === "pending" && Math.max(Math.abs(r), Math.abs(i)) >= Xn && (e.intent = Math.abs(i) > Math.abs(r) ? "vertical" : "horizontal"), e.intent === "vertical" ? Math.max(0, i) : 0;
|
|
3951
4093
|
}
|
|
3952
|
-
function
|
|
4094
|
+
function tr(e, t, n) {
|
|
3953
4095
|
if (e.intent !== "vertical") return !1;
|
|
3954
4096
|
let r = Math.max(0, t - e.startY), i = Math.max(1, n - e.startTime);
|
|
3955
|
-
return r >=
|
|
4097
|
+
return r >= Zn || r >= 32 && r / i >= Qn;
|
|
3956
4098
|
}
|
|
3957
|
-
var
|
|
4099
|
+
var nr = {
|
|
3958
4100
|
layer: "_layer_tnds0_1",
|
|
3959
4101
|
backdrop: "_backdrop_tnds0_15",
|
|
3960
4102
|
"backdrop-enter": "_backdrop-enter_tnds0_1",
|
|
@@ -3967,10 +4109,10 @@ var Hn = {
|
|
|
3967
4109
|
close: "_close_tnds0_141",
|
|
3968
4110
|
dragHandle: "_dragHandle_tnds0_149",
|
|
3969
4111
|
"sheet-enter": "_sheet-enter_tnds0_1"
|
|
3970
|
-
},
|
|
3971
|
-
function
|
|
4112
|
+
}, rr = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", ir = a({});
|
|
4113
|
+
function ar(e) {
|
|
3972
4114
|
if (e.key !== "Tab") return;
|
|
3973
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4115
|
+
let t = Array.from(e.currentTarget.querySelectorAll(rr));
|
|
3974
4116
|
if (!t.length) {
|
|
3975
4117
|
e.preventDefault();
|
|
3976
4118
|
return;
|
|
@@ -3978,18 +4120,18 @@ function Gn(e) {
|
|
|
3978
4120
|
let n = t[0], r = t.at(-1);
|
|
3979
4121
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n?.focus());
|
|
3980
4122
|
}
|
|
3981
|
-
var
|
|
3982
|
-
let l = u(
|
|
4123
|
+
var or = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "Закрыть модальное окно", className: s = "", role: c = "dialog" }) => {
|
|
4124
|
+
let l = u(ir), 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 = Jn((e) => e.closeModal), D = l.requestClose ?? (() => E(a)), O = p != null, k = m != null;
|
|
3983
4125
|
d(() => {
|
|
3984
4126
|
let e = document.activeElement, t = y.current;
|
|
3985
|
-
return (t?.querySelector(
|
|
4127
|
+
return (t?.querySelector(rr) ?? t)?.focus(), () => e?.focus();
|
|
3986
4128
|
}, []);
|
|
3987
4129
|
let A = (e) => {
|
|
3988
4130
|
e && x.current !== null && e.hasPointerCapture(x.current) && e.releasePointerCapture(x.current), b.current = null, x.current = null, T(!1), C(0);
|
|
3989
4131
|
};
|
|
3990
4132
|
return /* @__PURE__ */ n("div", {
|
|
3991
4133
|
ref: y,
|
|
3992
|
-
className: `${
|
|
4134
|
+
className: `${nr.panel} ${s}`,
|
|
3993
4135
|
"data-closing": l.closing || void 0,
|
|
3994
4136
|
"data-dragging": w || void 0,
|
|
3995
4137
|
style: { "--ds-modal-drag-offset": `${S}px` },
|
|
@@ -3998,36 +4140,36 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
3998
4140
|
"aria-labelledby": O ? _ : void 0,
|
|
3999
4141
|
"aria-describedby": k ? v : void 0,
|
|
4000
4142
|
tabIndex: -1,
|
|
4001
|
-
onKeyDown:
|
|
4143
|
+
onKeyDown: ar,
|
|
4002
4144
|
children: [
|
|
4003
4145
|
/* @__PURE__ */ t("button", {
|
|
4004
4146
|
type: "button",
|
|
4005
|
-
className:
|
|
4147
|
+
className: nr.dragHandle,
|
|
4006
4148
|
"aria-label": "Потяните вниз, чтобы закрыть модальное окно",
|
|
4007
4149
|
onPointerDown: (e) => {
|
|
4008
|
-
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current =
|
|
4150
|
+
(e.pointerType !== "mouse" || e.button === 0) && (x.current = e.pointerId, b.current = $n(e.clientX, e.clientY, e.timeStamp), e.currentTarget.setPointerCapture(e.pointerId));
|
|
4009
4151
|
},
|
|
4010
4152
|
onPointerMove: (e) => {
|
|
4011
4153
|
if (e.pointerId !== x.current || !b.current) return;
|
|
4012
|
-
let t =
|
|
4154
|
+
let t = er(b.current, e.clientX, e.clientY);
|
|
4013
4155
|
b.current.intent === "vertical" && (e.preventDefault(), T(!0), C(t));
|
|
4014
4156
|
},
|
|
4015
4157
|
onPointerUp: (e) => {
|
|
4016
4158
|
if (e.pointerId !== x.current || !b.current) return;
|
|
4017
|
-
let t =
|
|
4159
|
+
let t = tr(b.current, e.clientY, e.timeStamp);
|
|
4018
4160
|
A(e.currentTarget), t && D();
|
|
4019
4161
|
},
|
|
4020
4162
|
onPointerCancel: (e) => A(e.currentTarget),
|
|
4021
4163
|
children: /* @__PURE__ */ t("span", {})
|
|
4022
4164
|
}),
|
|
4023
4165
|
(O || o) && /* @__PURE__ */ n("header", {
|
|
4024
|
-
className:
|
|
4166
|
+
className: nr.header,
|
|
4025
4167
|
children: [O && /* @__PURE__ */ t("h2", {
|
|
4026
4168
|
id: _,
|
|
4027
|
-
className:
|
|
4169
|
+
className: nr.title,
|
|
4028
4170
|
children: p
|
|
4029
4171
|
}), /* @__PURE__ */ t(B, {
|
|
4030
|
-
className:
|
|
4172
|
+
className: nr.close,
|
|
4031
4173
|
variant: "empty",
|
|
4032
4174
|
size: "sm",
|
|
4033
4175
|
"aria-label": o,
|
|
@@ -4041,17 +4183,17 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4041
4183
|
}),
|
|
4042
4184
|
k && /* @__PURE__ */ t("p", {
|
|
4043
4185
|
id: v,
|
|
4044
|
-
className:
|
|
4186
|
+
className: nr.description,
|
|
4045
4187
|
children: m
|
|
4046
4188
|
}),
|
|
4047
4189
|
/* @__PURE__ */ t("div", {
|
|
4048
|
-
className:
|
|
4190
|
+
className: nr.content,
|
|
4049
4191
|
children: e
|
|
4050
4192
|
})
|
|
4051
4193
|
]
|
|
4052
4194
|
});
|
|
4053
|
-
},
|
|
4054
|
-
let n =
|
|
4195
|
+
}, sr = ({ registry: e }) => {
|
|
4196
|
+
let n = Jn((e) => e.modals), r = Jn((e) => e.closeModal), [i, a] = g(() => /* @__PURE__ */ new Set()), o = h(/* @__PURE__ */ new Map()), s = (e) => {
|
|
4055
4197
|
if (o.current.has(e)) return;
|
|
4056
4198
|
a((t) => new Set(t).add(e));
|
|
4057
4199
|
let t = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -4067,7 +4209,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4067
4209
|
return () => e.forEach((e) => window.clearTimeout(e));
|
|
4068
4210
|
}, []), d(() => {
|
|
4069
4211
|
let e = (e) => {
|
|
4070
|
-
let t =
|
|
4212
|
+
let t = Jn.getState().modals.at(-1);
|
|
4071
4213
|
e.key === "Escape" && t?.closeOnEscape && s(t.id);
|
|
4072
4214
|
};
|
|
4073
4215
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
@@ -4080,21 +4222,21 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4080
4222
|
n,
|
|
4081
4223
|
e
|
|
4082
4224
|
]), !n.length || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4083
|
-
className:
|
|
4225
|
+
className: nr.layer,
|
|
4084
4226
|
"aria-label": "Модальные окна",
|
|
4085
4227
|
children: n.map((r, a) => {
|
|
4086
4228
|
let o = e[r.name];
|
|
4087
4229
|
if (!o) return null;
|
|
4088
4230
|
let c = i.has(r.id);
|
|
4089
4231
|
return /* @__PURE__ */ t("div", {
|
|
4090
|
-
className:
|
|
4232
|
+
className: nr.backdrop,
|
|
4091
4233
|
"data-closing": c || void 0,
|
|
4092
4234
|
"aria-hidden": a !== n.length - 1 || void 0,
|
|
4093
4235
|
inert: a !== n.length - 1 || void 0,
|
|
4094
4236
|
onMouseDown: (e) => {
|
|
4095
4237
|
e.target === e.currentTarget && r.closeOnBackdrop && s(r.id);
|
|
4096
4238
|
},
|
|
4097
|
-
children: /* @__PURE__ */ t(
|
|
4239
|
+
children: /* @__PURE__ */ t(ir.Provider, {
|
|
4098
4240
|
value: {
|
|
4099
4241
|
title: r.title ?? r.payload.title,
|
|
4100
4242
|
description: r.description ?? r.payload.description,
|
|
@@ -4111,31 +4253,31 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4111
4253
|
}, r.id);
|
|
4112
4254
|
})
|
|
4113
4255
|
}), document.body);
|
|
4114
|
-
},
|
|
4115
|
-
let o =
|
|
4256
|
+
}, cr = ({ registry: r, children: i, lockBodyScroll: a = !0 }) => {
|
|
4257
|
+
let o = Jn((e) => e.modals.length);
|
|
4116
4258
|
return d(() => {
|
|
4117
4259
|
if (!a || o === 0) return;
|
|
4118
4260
|
let e = document.body.style.overflow;
|
|
4119
4261
|
return document.body.style.overflow = "hidden", () => {
|
|
4120
4262
|
document.body.style.overflow = e;
|
|
4121
4263
|
};
|
|
4122
|
-
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(
|
|
4123
|
-
},
|
|
4264
|
+
}, [a, o]), /* @__PURE__ */ n(e, { children: [i, /* @__PURE__ */ t(sr, { registry: r })] });
|
|
4265
|
+
}, lr = (e) => e, ur = {
|
|
4124
4266
|
message: "_message_c23ie_1",
|
|
4125
4267
|
actions: "_actions_c23ie_13"
|
|
4126
|
-
},
|
|
4268
|
+
}, dr = /* @__PURE__ */ new Map(), fr = 0, pr = ({ modalId: e, close: r, title: i = "Подтверждение", message: a = "Продолжить действие?", confirmLabel: o = "Подтвердить", cancelLabel: s = "Отмена", tone: c = "default", requestId: l }) => {
|
|
4127
4269
|
let u = (e) => {
|
|
4128
|
-
|
|
4270
|
+
dr.get(l)?.(e), dr.delete(l), r();
|
|
4129
4271
|
};
|
|
4130
|
-
return /* @__PURE__ */ n(
|
|
4272
|
+
return /* @__PURE__ */ n(or, {
|
|
4131
4273
|
modalId: e,
|
|
4132
4274
|
title: i,
|
|
4133
4275
|
role: "alertdialog",
|
|
4134
4276
|
children: [/* @__PURE__ */ t("p", {
|
|
4135
|
-
className:
|
|
4277
|
+
className: ur.message,
|
|
4136
4278
|
children: a
|
|
4137
4279
|
}), /* @__PURE__ */ n("div", {
|
|
4138
|
-
className:
|
|
4280
|
+
className: ur.actions,
|
|
4139
4281
|
children: [/* @__PURE__ */ t(B, {
|
|
4140
4282
|
variant: "outline",
|
|
4141
4283
|
onClick: () => u(!1),
|
|
@@ -4147,46 +4289,46 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4147
4289
|
})]
|
|
4148
4290
|
})]
|
|
4149
4291
|
});
|
|
4150
|
-
},
|
|
4292
|
+
}, mr = ({ modalId: e, close: r, title: i = "Ошибка", message: a, closeLabel: o = "Закрыть" }) => /* @__PURE__ */ n(or, {
|
|
4151
4293
|
modalId: e,
|
|
4152
4294
|
title: i,
|
|
4153
4295
|
role: "alertdialog",
|
|
4154
4296
|
children: [/* @__PURE__ */ t("p", {
|
|
4155
|
-
className:
|
|
4297
|
+
className: ur.message,
|
|
4156
4298
|
children: a
|
|
4157
4299
|
}), /* @__PURE__ */ t("div", {
|
|
4158
|
-
className:
|
|
4300
|
+
className: ur.actions,
|
|
4159
4301
|
children: /* @__PURE__ */ t(B, {
|
|
4160
4302
|
onClick: r,
|
|
4161
4303
|
children: o
|
|
4162
4304
|
})
|
|
4163
4305
|
})]
|
|
4164
|
-
}),
|
|
4165
|
-
ConfirmModal:
|
|
4166
|
-
ErrorModal:
|
|
4167
|
-
}),
|
|
4168
|
-
let e =
|
|
4306
|
+
}), hr = lr({
|
|
4307
|
+
ConfirmModal: pr,
|
|
4308
|
+
ErrorModal: mr
|
|
4309
|
+
}), gr = () => {
|
|
4310
|
+
let e = Jn((e) => e.openModal);
|
|
4169
4311
|
return (t = {}) => new Promise((n) => {
|
|
4170
|
-
|
|
4171
|
-
let r = `confirm-${
|
|
4172
|
-
|
|
4312
|
+
fr += 1;
|
|
4313
|
+
let r = `confirm-${fr}`;
|
|
4314
|
+
dr.set(r, n), e("ConfirmModal", {
|
|
4173
4315
|
...t,
|
|
4174
4316
|
requestId: r
|
|
4175
4317
|
}, {
|
|
4176
4318
|
closeOnEscape: !1,
|
|
4177
4319
|
onClose: () => {
|
|
4178
|
-
|
|
4320
|
+
dr.get(r)?.(!1), dr.delete(r);
|
|
4179
4321
|
}
|
|
4180
4322
|
});
|
|
4181
4323
|
});
|
|
4182
|
-
},
|
|
4183
|
-
let e =
|
|
4324
|
+
}, _r = (e) => e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : "Произошла неизвестная ошибка", vr = () => {
|
|
4325
|
+
let e = Jn((e) => e.openModal);
|
|
4184
4326
|
return { showError: (t, n) => e("ErrorModal", {
|
|
4185
4327
|
title: n,
|
|
4186
|
-
message:
|
|
4328
|
+
message: _r(t)
|
|
4187
4329
|
}) };
|
|
4188
|
-
},
|
|
4189
|
-
let e =
|
|
4330
|
+
}, yr = S(() => ({})), br = S(() => ({})), xr = () => {
|
|
4331
|
+
let e = Jn((e) => e.modals), t = Jn((e) => e.openModal), n = Jn((e) => e.closeModal), r = Jn((e) => e.closeTopModal), i = Jn((e) => e.closeAllModals), a = l((e, n = {}, r) => t(e, n, r), [t]), o = l((t) => e.some((e) => e.name === t), [e]);
|
|
4190
4332
|
return m(() => ({
|
|
4191
4333
|
openModal: a,
|
|
4192
4334
|
closeModal: n,
|
|
@@ -4202,7 +4344,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4202
4344
|
e.length,
|
|
4203
4345
|
a
|
|
4204
4346
|
]);
|
|
4205
|
-
},
|
|
4347
|
+
}, Sr = {
|
|
4206
4348
|
layer: "_layer_2i8uw_1",
|
|
4207
4349
|
backdrop: "_backdrop_2i8uw_13",
|
|
4208
4350
|
panel: "_panel_2i8uw_27",
|
|
@@ -4222,16 +4364,16 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4222
4364
|
"enter-right": "_enter-right_2i8uw_1",
|
|
4223
4365
|
"enter-left": "_enter-left_2i8uw_1",
|
|
4224
4366
|
"enter-bottom": "_enter-bottom_2i8uw_1"
|
|
4225
|
-
},
|
|
4367
|
+
}, Cr = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", wr = a(null), Tr = (e) => {
|
|
4226
4368
|
if (e.key !== "Tab") return;
|
|
4227
|
-
let t = Array.from(e.currentTarget.querySelectorAll(
|
|
4369
|
+
let t = Array.from(e.currentTarget.querySelectorAll(Cr));
|
|
4228
4370
|
if (!t.length) {
|
|
4229
4371
|
e.preventDefault();
|
|
4230
4372
|
return;
|
|
4231
4373
|
}
|
|
4232
4374
|
let n = t[0], r = t.at(-1);
|
|
4233
4375
|
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
|
|
4234
|
-
},
|
|
4376
|
+
}, Er = () => u(wr), Dr = ({ 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 = "" }) => {
|
|
4235
4377
|
let S = h(null), C = f(), w = f(), T = (e) => {
|
|
4236
4378
|
g || r(e);
|
|
4237
4379
|
};
|
|
@@ -4240,7 +4382,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4240
4382
|
let t = document.activeElement, n = b?.current, i = document.body.style.overflow;
|
|
4241
4383
|
document.body.style.overflow = "hidden";
|
|
4242
4384
|
let a = S.current;
|
|
4243
|
-
(y?.current ?? a?.querySelector(
|
|
4385
|
+
(y?.current ?? a?.querySelector(Cr) ?? a)?.focus();
|
|
4244
4386
|
let o = (e) => {
|
|
4245
4387
|
e.key === "Escape" && p && !g && r("escape");
|
|
4246
4388
|
};
|
|
@@ -4255,29 +4397,29 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4255
4397
|
g,
|
|
4256
4398
|
b
|
|
4257
4399
|
]), !e || typeof document > "u" ? null : _(/* @__PURE__ */ t("div", {
|
|
4258
|
-
className:
|
|
4400
|
+
className: Sr.layer,
|
|
4259
4401
|
children: /* @__PURE__ */ t("div", {
|
|
4260
|
-
className:
|
|
4402
|
+
className: Sr.backdrop,
|
|
4261
4403
|
onMouseDown: (e) => {
|
|
4262
4404
|
e.target === e.currentTarget && m && T("backdrop");
|
|
4263
4405
|
},
|
|
4264
|
-
children: /* @__PURE__ */ t(
|
|
4406
|
+
children: /* @__PURE__ */ t(wr.Provider, {
|
|
4265
4407
|
value: { requestClose: T },
|
|
4266
4408
|
children: /* @__PURE__ */ n("section", {
|
|
4267
4409
|
ref: S,
|
|
4268
|
-
className: `${
|
|
4410
|
+
className: `${Sr.panel} ${Sr[l]} ${Sr[u]} ${x}`,
|
|
4269
4411
|
role: "dialog",
|
|
4270
4412
|
"aria-modal": "true",
|
|
4271
4413
|
"aria-labelledby": a ? C : void 0,
|
|
4272
4414
|
"aria-describedby": o ? w : void 0,
|
|
4273
4415
|
tabIndex: -1,
|
|
4274
|
-
onKeyDown:
|
|
4416
|
+
onKeyDown: Tr,
|
|
4275
4417
|
children: [
|
|
4276
4418
|
/* @__PURE__ */ n("header", {
|
|
4277
|
-
className:
|
|
4419
|
+
className: Sr.header,
|
|
4278
4420
|
children: [
|
|
4279
4421
|
/* @__PURE__ */ n("div", {
|
|
4280
|
-
className:
|
|
4422
|
+
className: Sr.heading,
|
|
4281
4423
|
children: [a && /* @__PURE__ */ t("h2", {
|
|
4282
4424
|
id: C,
|
|
4283
4425
|
children: a
|
|
@@ -4287,7 +4429,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4287
4429
|
})]
|
|
4288
4430
|
}),
|
|
4289
4431
|
s && /* @__PURE__ */ t("div", {
|
|
4290
|
-
className:
|
|
4432
|
+
className: Sr.headerActions,
|
|
4291
4433
|
children: s
|
|
4292
4434
|
}),
|
|
4293
4435
|
/* @__PURE__ */ t(B, {
|
|
@@ -4305,11 +4447,11 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4305
4447
|
]
|
|
4306
4448
|
}),
|
|
4307
4449
|
/* @__PURE__ */ t("div", {
|
|
4308
|
-
className:
|
|
4450
|
+
className: Sr.content,
|
|
4309
4451
|
children: i
|
|
4310
4452
|
}),
|
|
4311
4453
|
c && /* @__PURE__ */ t("footer", {
|
|
4312
|
-
className:
|
|
4454
|
+
className: Sr.footer,
|
|
4313
4455
|
children: c
|
|
4314
4456
|
})
|
|
4315
4457
|
]
|
|
@@ -4317,17 +4459,17 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4317
4459
|
})
|
|
4318
4460
|
})
|
|
4319
4461
|
}), document.body);
|
|
4320
|
-
},
|
|
4462
|
+
}, Or = ({ placement: e = "right", ...n }) => /* @__PURE__ */ t(Dr, {
|
|
4321
4463
|
...n,
|
|
4322
4464
|
placement: e
|
|
4323
|
-
}),
|
|
4465
|
+
}), kr = (e) => /* @__PURE__ */ t(Dr, {
|
|
4324
4466
|
...e,
|
|
4325
4467
|
placement: "bottom"
|
|
4326
|
-
}),
|
|
4468
|
+
}), Ar = (e) => /* @__PURE__ */ t(Dr, {
|
|
4327
4469
|
...e,
|
|
4328
4470
|
placement: "fullscreen",
|
|
4329
4471
|
size: "xl"
|
|
4330
|
-
}),
|
|
4472
|
+
}), jr = {
|
|
4331
4473
|
wrapper: "_wrapper_hpk6i_1",
|
|
4332
4474
|
container: "_container_hpk6i_15",
|
|
4333
4475
|
inner: "_inner_hpk6i_35",
|
|
@@ -4342,29 +4484,29 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4342
4484
|
empty: "_empty_hpk6i_153",
|
|
4343
4485
|
destructive: "_destructive_hpk6i_161",
|
|
4344
4486
|
destructiveOutline: "_destructiveOutline_hpk6i_169"
|
|
4345
|
-
},
|
|
4346
|
-
className:
|
|
4487
|
+
}, Mr = ({ variant: e = "primary" }) => /* @__PURE__ */ t("div", {
|
|
4488
|
+
className: jr.wrapper,
|
|
4347
4489
|
children: /* @__PURE__ */ t("div", {
|
|
4348
|
-
className:
|
|
4490
|
+
className: jr.container,
|
|
4349
4491
|
children: /* @__PURE__ */ n("div", {
|
|
4350
|
-
className:
|
|
4492
|
+
className: jr.inner,
|
|
4351
4493
|
children: [
|
|
4352
4494
|
/* @__PURE__ */ t("div", {
|
|
4353
|
-
className:
|
|
4354
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4495
|
+
className: jr.cube,
|
|
4496
|
+
children: /* @__PURE__ */ t("div", { className: `${jr.cube__inner} ${jr[e]}` })
|
|
4355
4497
|
}),
|
|
4356
4498
|
/* @__PURE__ */ t("div", {
|
|
4357
|
-
className:
|
|
4358
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4499
|
+
className: jr.cube,
|
|
4500
|
+
children: /* @__PURE__ */ t("div", { className: `${jr.cube__inner} ${jr[e]}` })
|
|
4359
4501
|
}),
|
|
4360
4502
|
/* @__PURE__ */ t("div", {
|
|
4361
|
-
className:
|
|
4362
|
-
children: /* @__PURE__ */ t("div", { className: `${
|
|
4503
|
+
className: jr.cube,
|
|
4504
|
+
children: /* @__PURE__ */ t("div", { className: `${jr.cube__inner} ${jr[e]}` })
|
|
4363
4505
|
})
|
|
4364
4506
|
]
|
|
4365
4507
|
})
|
|
4366
4508
|
})
|
|
4367
|
-
}),
|
|
4509
|
+
}), Nr = {
|
|
4368
4510
|
viewport: "_viewport_22b73_1",
|
|
4369
4511
|
"top-right": "_top-right_22b73_21",
|
|
4370
4512
|
"top-left": "_top-left_22b73_31",
|
|
@@ -4380,12 +4522,12 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4380
4522
|
success: "_success_22b73_195",
|
|
4381
4523
|
warning: "_warning_22b73_203",
|
|
4382
4524
|
error: "_error_22b73_211"
|
|
4383
|
-
},
|
|
4525
|
+
}, Pr = {
|
|
4384
4526
|
info: "IconInfoCircle",
|
|
4385
4527
|
success: "IconSuccessCircle",
|
|
4386
4528
|
warning: "IconWarning",
|
|
4387
4529
|
error: "IconWarning"
|
|
4388
|
-
},
|
|
4530
|
+
}, Fr = ({ toast: e, onClose: r }) => {
|
|
4389
4531
|
let [i, a] = g(!1), [o, s] = g(() => typeof document < "u" && document.hidden), c = h(e.duration), l = h(Date.now());
|
|
4390
4532
|
return d(() => {
|
|
4391
4533
|
if (i || o || e.duration <= 0) return;
|
|
@@ -4405,7 +4547,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4405
4547
|
let e = () => s(document.hidden);
|
|
4406
4548
|
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
|
|
4407
4549
|
}, []), /* @__PURE__ */ n("article", {
|
|
4408
|
-
className: `${
|
|
4550
|
+
className: `${Nr.toast} ${Nr[e.variant]}`,
|
|
4409
4551
|
role: e.variant === "error" ? "alert" : "status",
|
|
4410
4552
|
"aria-live": e.variant === "error" ? "assertive" : "polite",
|
|
4411
4553
|
onMouseEnter: () => a(!0),
|
|
@@ -4414,24 +4556,24 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4414
4556
|
onBlur: () => a(!1),
|
|
4415
4557
|
children: [
|
|
4416
4558
|
/* @__PURE__ */ t("div", {
|
|
4417
|
-
className:
|
|
4559
|
+
className: Nr.icon,
|
|
4418
4560
|
"aria-hidden": "true",
|
|
4419
4561
|
children: /* @__PURE__ */ t(J, {
|
|
4420
|
-
name:
|
|
4562
|
+
name: Pr[e.variant],
|
|
4421
4563
|
color: "var(--ds-toast-accent)",
|
|
4422
4564
|
width: 20,
|
|
4423
4565
|
height: 20
|
|
4424
4566
|
})
|
|
4425
4567
|
}),
|
|
4426
4568
|
/* @__PURE__ */ n("div", {
|
|
4427
|
-
className:
|
|
4569
|
+
className: Nr.body,
|
|
4428
4570
|
children: [
|
|
4429
4571
|
e.title && /* @__PURE__ */ t("strong", {
|
|
4430
|
-
className:
|
|
4572
|
+
className: Nr.title,
|
|
4431
4573
|
children: e.title
|
|
4432
4574
|
}),
|
|
4433
4575
|
/* @__PURE__ */ t("div", {
|
|
4434
|
-
className:
|
|
4576
|
+
className: Nr.message,
|
|
4435
4577
|
children: e.message
|
|
4436
4578
|
}),
|
|
4437
4579
|
e.action && /* @__PURE__ */ t(B, {
|
|
@@ -4457,15 +4599,15 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4457
4599
|
})
|
|
4458
4600
|
]
|
|
4459
4601
|
});
|
|
4460
|
-
},
|
|
4602
|
+
}, Ir = 0, Lr = S((e, t) => ({
|
|
4461
4603
|
toasts: [],
|
|
4462
4604
|
showToast: (n) => {
|
|
4463
4605
|
if (n.dedupeKey) {
|
|
4464
4606
|
let e = t().toasts.find((e) => e.dedupeKey === n.dedupeKey);
|
|
4465
4607
|
if (e) return e.id;
|
|
4466
4608
|
}
|
|
4467
|
-
|
|
4468
|
-
let r = `ds-toast-${
|
|
4609
|
+
Ir += 1;
|
|
4610
|
+
let r = `ds-toast-${Ir}`;
|
|
4469
4611
|
return e((e) => ({ toasts: [...e.toasts, {
|
|
4470
4612
|
variant: "info",
|
|
4471
4613
|
duration: 5e3,
|
|
@@ -4476,18 +4618,18 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4476
4618
|
},
|
|
4477
4619
|
removeToast: (t) => e((e) => ({ toasts: e.toasts.filter((e) => e.id !== t) })),
|
|
4478
4620
|
clearToasts: () => e({ toasts: [] })
|
|
4479
|
-
})),
|
|
4480
|
-
let r =
|
|
4621
|
+
})), Rr = () => Lr.setState({ toasts: [] }), zr = ({ position: e = "top-right", maxVisible: n }) => {
|
|
4622
|
+
let r = Lr((e) => e.toasts), i = Lr((e) => e.removeToast), a = n === void 0 ? r : r.slice(0, Math.max(0, Math.floor(n)));
|
|
4481
4623
|
return /* @__PURE__ */ t("div", {
|
|
4482
|
-
className: `${
|
|
4624
|
+
className: `${Nr.viewport} ${Nr[e]}`,
|
|
4483
4625
|
"aria-label": "Уведомления",
|
|
4484
|
-
children: a.map((e) => /* @__PURE__ */ t(
|
|
4626
|
+
children: a.map((e) => /* @__PURE__ */ t(Fr, {
|
|
4485
4627
|
toast: e,
|
|
4486
4628
|
onClose: i
|
|
4487
4629
|
}, e.id))
|
|
4488
4630
|
});
|
|
4489
|
-
},
|
|
4490
|
-
let e =
|
|
4631
|
+
}, Br = () => {
|
|
4632
|
+
let e = Lr((e) => e.showToast), t = Lr((e) => e.removeToast), n = Lr((e) => e.clearToasts), r = l((t) => e({
|
|
4491
4633
|
...t,
|
|
4492
4634
|
variant: "info"
|
|
4493
4635
|
}), [e]), i = l((t) => e({
|
|
@@ -4517,117 +4659,13 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4517
4659
|
i,
|
|
4518
4660
|
a
|
|
4519
4661
|
]);
|
|
4520
|
-
},
|
|
4521
|
-
top: "bottom",
|
|
4522
|
-
right: "left",
|
|
4523
|
-
bottom: "top",
|
|
4524
|
-
left: "right"
|
|
4525
|
-
}, Ar = (e, t, n, r) => e === "top" ? t.top >= n.height + Dr + Or : e === "bottom" ? r.height - t.bottom >= n.height + Dr + Or : e === "left" ? t.left >= n.width + Dr + Or : r.width - t.right >= n.width + Dr + Or, jr = (e, t, n) => n && t ? {
|
|
4526
|
-
top: t.y,
|
|
4527
|
-
right: t.x,
|
|
4528
|
-
bottom: t.y,
|
|
4529
|
-
left: t.x,
|
|
4530
|
-
width: 0,
|
|
4531
|
-
height: 0
|
|
4532
|
-
} : e, Mr = (e, t, n, r) => {
|
|
4533
|
-
if (!(t.bottom > 0 && t.right > 0 && t.top < r.height && t.left < r.width)) return null;
|
|
4534
|
-
let i = Ar(e, t, n, r) ? e : Ar(kr[e], t, n, r) ? kr[e] : e, a = t.left + (t.width - n.width) / 2, o = t.top + (t.height - n.height) / 2;
|
|
4535
|
-
return i === "top" && (o = t.top - n.height - Dr), i === "bottom" && (o = t.bottom + Dr), i === "left" && (a = t.left - n.width - Dr), i === "right" && (a = t.right + Dr), a = Math.min(Math.max(a, Or), Math.max(Or, r.width - n.width - Or)), o = Math.min(Math.max(o, Or), Math.max(Or, r.height - n.height - Or)), {
|
|
4536
|
-
left: a,
|
|
4537
|
-
top: o,
|
|
4538
|
-
visibility: "visible"
|
|
4539
|
-
};
|
|
4540
|
-
}, Nr = {
|
|
4541
|
-
root: "_root_1pa4z_1",
|
|
4542
|
-
tooltip: "_tooltip_1pa4z_11",
|
|
4543
|
-
"ds-tooltip-in": "_ds-tooltip-in_1pa4z_1"
|
|
4544
|
-
}, Pr = ({ content: e, children: r, placement: a = "top", followCursor: o = !1, delay: s = 450, disabled: u = !1, maxWidth: p = 280, className: m = "" }) => {
|
|
4545
|
-
let _ = f(), [v, y] = g(!1), [b, x] = g({ visibility: "hidden" }), [S, C] = g(null), w = h(null), T = h(null), E = h(null), D = h(() => void 0), O = l(() => {
|
|
4546
|
-
w.current && clearTimeout(w.current), w.current = null, y(!1);
|
|
4547
|
-
}, []), k = l(() => {
|
|
4548
|
-
u || !e || (w.current && clearTimeout(w.current), w.current = setTimeout(() => y(!0), s));
|
|
4549
|
-
}, [
|
|
4550
|
-
e,
|
|
4551
|
-
s,
|
|
4552
|
-
u
|
|
4553
|
-
]);
|
|
4554
|
-
if (d(() => {
|
|
4555
|
-
if (!v) {
|
|
4556
|
-
x({ visibility: "hidden" });
|
|
4557
|
-
return;
|
|
4558
|
-
}
|
|
4559
|
-
let e = () => {
|
|
4560
|
-
let e = T.current;
|
|
4561
|
-
if (!e || !S) return;
|
|
4562
|
-
let t = Mr(a, jr(e.getBoundingClientRect(), E.current, o), S.getBoundingClientRect(), {
|
|
4563
|
-
width: window.innerWidth,
|
|
4564
|
-
height: window.innerHeight
|
|
4565
|
-
});
|
|
4566
|
-
if (!t) {
|
|
4567
|
-
O();
|
|
4568
|
-
return;
|
|
4569
|
-
}
|
|
4570
|
-
x(t);
|
|
4571
|
-
};
|
|
4572
|
-
D.current = e, e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0);
|
|
4573
|
-
let t = typeof ResizeObserver > "u" ? null : new ResizeObserver(e);
|
|
4574
|
-
return T.current && t?.observe(T.current), S && t?.observe(S), () => {
|
|
4575
|
-
D.current = () => void 0, window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0), t?.disconnect();
|
|
4576
|
-
};
|
|
4577
|
-
}, [
|
|
4578
|
-
o,
|
|
4579
|
-
O,
|
|
4580
|
-
v,
|
|
4581
|
-
a,
|
|
4582
|
-
S
|
|
4583
|
-
]), d(() => {
|
|
4584
|
-
let e = (e) => {
|
|
4585
|
-
e.key === "Escape" && O();
|
|
4586
|
-
};
|
|
4587
|
-
return document.addEventListener("keydown", e), () => {
|
|
4588
|
-
document.removeEventListener("keydown", e), w.current && clearTimeout(w.current);
|
|
4589
|
-
};
|
|
4590
|
-
}, [O]), !c(r)) return r;
|
|
4591
|
-
let A = {
|
|
4592
|
-
...b,
|
|
4593
|
-
"--ds-tooltip-max-width": typeof p == "number" ? `${p}px` : p
|
|
4594
|
-
}, j = i(r, {
|
|
4595
|
-
"aria-describedby": v ? _ : void 0,
|
|
4596
|
-
onMouseEnter: k,
|
|
4597
|
-
onMouseLeave: () => {
|
|
4598
|
-
E.current = null, O();
|
|
4599
|
-
},
|
|
4600
|
-
onFocus: () => {
|
|
4601
|
-
E.current = null, k();
|
|
4602
|
-
},
|
|
4603
|
-
onBlur: O
|
|
4604
|
-
});
|
|
4605
|
-
return /* @__PURE__ */ n("span", {
|
|
4606
|
-
ref: T,
|
|
4607
|
-
className: `${Nr.root} ${m}`,
|
|
4608
|
-
onPointerDown: v ? O : k,
|
|
4609
|
-
onPointerMove: (e) => {
|
|
4610
|
-
o && (E.current = {
|
|
4611
|
-
x: e.clientX,
|
|
4612
|
-
y: e.clientY
|
|
4613
|
-
}, v && D.current());
|
|
4614
|
-
},
|
|
4615
|
-
children: [j, v && /* @__PURE__ */ t(En, { children: /* @__PURE__ */ t("span", {
|
|
4616
|
-
ref: C,
|
|
4617
|
-
id: _,
|
|
4618
|
-
role: "tooltip",
|
|
4619
|
-
className: Nr.tooltip,
|
|
4620
|
-
style: A,
|
|
4621
|
-
children: e
|
|
4622
|
-
}) })]
|
|
4623
|
-
});
|
|
4624
|
-
}, Fr = {
|
|
4662
|
+
}, Vr = {
|
|
4625
4663
|
root: "_root_bs28m_1",
|
|
4626
4664
|
tabList: "_tabList_bs28m_11",
|
|
4627
4665
|
tab: "_tab_bs28m_11",
|
|
4628
4666
|
panels: "_panels_bs28m_127",
|
|
4629
4667
|
panel: "_panel_bs28m_127"
|
|
4630
|
-
},
|
|
4668
|
+
}, Hr = ({ items: e, value: r, onChange: i, ariaLabel: a = "Вкладки", disabled: o = !1, loading: s = !1, className: c = "" }) => {
|
|
4631
4669
|
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) => {
|
|
4632
4670
|
let n = e[t];
|
|
4633
4671
|
!n || n.disabled || d || (i(n.id), u.current[t]?.focus(), u.current[t]?.scrollIntoView({
|
|
@@ -4657,10 +4695,10 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4657
4695
|
t.preventDefault(), _(a);
|
|
4658
4696
|
};
|
|
4659
4697
|
return /* @__PURE__ */ n("div", {
|
|
4660
|
-
className: `${
|
|
4698
|
+
className: `${Vr.root} ${c}`,
|
|
4661
4699
|
"aria-busy": s || void 0,
|
|
4662
4700
|
children: [/* @__PURE__ */ t("div", {
|
|
4663
|
-
className:
|
|
4701
|
+
className: Vr.tabList,
|
|
4664
4702
|
role: "tablist",
|
|
4665
4703
|
"aria-label": a,
|
|
4666
4704
|
"aria-orientation": "horizontal",
|
|
@@ -4672,7 +4710,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4672
4710
|
u.current[n] = e;
|
|
4673
4711
|
},
|
|
4674
4712
|
id: a,
|
|
4675
|
-
className:
|
|
4713
|
+
className: Vr.tab,
|
|
4676
4714
|
type: "button",
|
|
4677
4715
|
role: "tab",
|
|
4678
4716
|
"aria-selected": i,
|
|
@@ -4685,12 +4723,12 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4685
4723
|
}, e.id);
|
|
4686
4724
|
})
|
|
4687
4725
|
}), /* @__PURE__ */ t("div", {
|
|
4688
|
-
className:
|
|
4726
|
+
className: Vr.panels,
|
|
4689
4727
|
children: e.map((e, n) => {
|
|
4690
4728
|
let i = e.id === r;
|
|
4691
4729
|
return /* @__PURE__ */ t("div", {
|
|
4692
4730
|
id: `${l}-panel-${n}`,
|
|
4693
|
-
className:
|
|
4731
|
+
className: Vr.panel,
|
|
4694
4732
|
role: "tabpanel",
|
|
4695
4733
|
"aria-labelledby": `${l}-tab-${n}`,
|
|
4696
4734
|
tabIndex: 0,
|
|
@@ -4700,7 +4738,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4700
4738
|
})
|
|
4701
4739
|
})]
|
|
4702
4740
|
});
|
|
4703
|
-
},
|
|
4741
|
+
}, Ur = (e) => {
|
|
4704
4742
|
if (!Number.isFinite(e) || e < 0) return "00:00";
|
|
4705
4743
|
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")}`;
|
|
4706
4744
|
return n ? `${n}:${a}` : a;
|
|
@@ -4733,19 +4771,19 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4733
4771
|
settingsActionLabel: "_settingsActionLabel_m0ykf_693",
|
|
4734
4772
|
caption: "_caption_m0ykf_705",
|
|
4735
4773
|
fullscreen: "_fullscreen_m0ykf_719"
|
|
4736
|
-
},
|
|
4774
|
+
}, Wr = 2500, Gr = 5, Kr = .05, qr = [
|
|
4737
4775
|
.5,
|
|
4738
4776
|
.75,
|
|
4739
4777
|
1,
|
|
4740
4778
|
1.25,
|
|
4741
4779
|
1.5,
|
|
4742
4780
|
2
|
|
4743
|
-
],
|
|
4744
|
-
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), [k, A] = g(!1), [j, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, te] = g(1), [V, ne] = g(!!v.muted), [H, U] = g(1), [
|
|
4781
|
+
], Jr = ({ 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 }) => {
|
|
4782
|
+
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), [k, A] = g(!1), [j, M] = g(!1), [N, P] = g(0), [F, I] = g(0), [L, R] = g(0), [z, te] = g(1), [V, ne] = g(!!v.muted), [H, U] = g(1), [W, re] = g(!!v.loop), [ie, ae] = g(-1), [oe, se] = g(!1), [ce, G] = g(!0), [le, ue] = g(!1), [de, fe] = g(!1), pe = r.map(({ src: e, type: t }) => `${e}:${t ?? ""}`).join("|"), me = i.map((e, t) => ({
|
|
4745
4783
|
track: e,
|
|
4746
4784
|
index: t
|
|
4747
|
-
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), he = u ?? (C ? "Не удалось воспроизвести видео" : void 0),
|
|
4748
|
-
G(!0), window.clearTimeout(S.current), k && !oe && (S.current = window.setTimeout(() => G(!1),
|
|
4785
|
+
})).filter(({ track: e }) => e.kind === "captions" || e.kind === "subtitles"), he = u ?? (C ? "Не удалось воспроизвести видео" : void 0), ge = c || T && !he && r.length > 0, K = !ge && !he && r.length === 0, _e = typeof document < "u" && "pictureInPictureEnabled" in document && document.pictureInPictureEnabled, ve = l(() => {
|
|
4786
|
+
G(!0), window.clearTimeout(S.current), k && !oe && (S.current = window.setTimeout(() => G(!1), Wr));
|
|
4749
4787
|
}, [k, oe]);
|
|
4750
4788
|
d(() => {
|
|
4751
4789
|
w(!1), E(r.length > 0), O(!1), A(!1), M(!1), P(0), I(0), R(0);
|
|
@@ -4763,7 +4801,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4763
4801
|
}, [oe]);
|
|
4764
4802
|
let ye = async () => {
|
|
4765
4803
|
let e = x.current;
|
|
4766
|
-
if (!(!e || he ||
|
|
4804
|
+
if (!(!e || he || ge)) {
|
|
4767
4805
|
if (e.paused || e.ended) {
|
|
4768
4806
|
e.ended && (e.currentTime = 0);
|
|
4769
4807
|
try {
|
|
@@ -4804,7 +4842,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4804
4842
|
let t = e.target;
|
|
4805
4843
|
if (/^(INPUT|SELECT|BUTTON)$/.test(t.tagName)) return;
|
|
4806
4844
|
let n = e.key.toLowerCase();
|
|
4807
|
-
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), Te(ie === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(N + (e.key === "ArrowRight" ?
|
|
4845
|
+
n === " " || n === "k" ? (e.preventDefault(), ye()) : n === "m" ? (e.preventDefault(), be()) : n === "f" ? (e.preventDefault(), Ce()) : n === "c" && me.length ? (e.preventDefault(), Te(ie === -1 ? me[0].index : -1)) : e.key === "ArrowLeft" || e.key === "ArrowRight" ? (e.preventDefault(), Se(N + (e.key === "ArrowRight" ? Gr : -5))) : e.key === "ArrowUp" || e.key === "ArrowDown" ? (e.preventDefault(), xe(z + (e.key === "ArrowUp" ? Kr : -.05))) : e.key === "Escape" && se(!1), ve();
|
|
4808
4846
|
}, De = () => {
|
|
4809
4847
|
let e = x.current;
|
|
4810
4848
|
w(!1), E(!0), e?.load();
|
|
@@ -4820,7 +4858,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4820
4858
|
ref: b,
|
|
4821
4859
|
className: `${$.frame} ${le ? $.fullscreen : ""}`,
|
|
4822
4860
|
style: { aspectRatio: o },
|
|
4823
|
-
"aria-busy":
|
|
4861
|
+
"aria-busy": ge || void 0,
|
|
4824
4862
|
tabIndex: m && r.length ? 0 : void 0,
|
|
4825
4863
|
onPointerMove: ve,
|
|
4826
4864
|
onPointerDown: ve,
|
|
@@ -4835,7 +4873,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4835
4873
|
"aria-label": a,
|
|
4836
4874
|
controls: !1,
|
|
4837
4875
|
playsInline: _,
|
|
4838
|
-
loop:
|
|
4876
|
+
loop: W,
|
|
4839
4877
|
className: $.video,
|
|
4840
4878
|
style: { objectFit: s },
|
|
4841
4879
|
onClick: (e) => {
|
|
@@ -4894,7 +4932,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4894
4932
|
},
|
|
4895
4933
|
children: [r.map((e) => /* @__PURE__ */ t("source", { ...e }, `${e.src}-${e.type}`)), i.map((e) => /* @__PURE__ */ t("track", { ...e }, `${e.src}-${e.srcLang}`))]
|
|
4896
4934
|
}),
|
|
4897
|
-
|
|
4935
|
+
ge && /* @__PURE__ */ n("div", {
|
|
4898
4936
|
className: $.overlay,
|
|
4899
4937
|
role: "status",
|
|
4900
4938
|
"aria-live": "polite",
|
|
@@ -4903,17 +4941,17 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4903
4941
|
"aria-hidden": "true",
|
|
4904
4942
|
children: /* @__PURE__ */ t("div", {
|
|
4905
4943
|
className: $.loaderScale,
|
|
4906
|
-
children: /* @__PURE__ */ t(
|
|
4944
|
+
children: /* @__PURE__ */ t(Mr, {})
|
|
4907
4945
|
})
|
|
4908
4946
|
}), /* @__PURE__ */ t("span", { children: "Загрузка видео" })]
|
|
4909
4947
|
}),
|
|
4910
|
-
!
|
|
4948
|
+
!ge && D && !he && /* @__PURE__ */ t("div", {
|
|
4911
4949
|
className: $.buffering,
|
|
4912
4950
|
role: "status",
|
|
4913
4951
|
"aria-label": "Буферизация видео",
|
|
4914
4952
|
children: /* @__PURE__ */ t(ee, { variant: "primary" })
|
|
4915
4953
|
}),
|
|
4916
|
-
|
|
4954
|
+
K && /* @__PURE__ */ n("div", {
|
|
4917
4955
|
className: `${$.state} ${$.empty}`,
|
|
4918
4956
|
role: "status",
|
|
4919
4957
|
children: [
|
|
@@ -4927,7 +4965,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4927
4965
|
f ?? /* @__PURE__ */ t("span", { children: "Источник видео не указан" })
|
|
4928
4966
|
]
|
|
4929
4967
|
}),
|
|
4930
|
-
!
|
|
4968
|
+
!ge && he && /* @__PURE__ */ n("div", {
|
|
4931
4969
|
className: `${$.state} ${$.error}`,
|
|
4932
4970
|
role: "alert",
|
|
4933
4971
|
children: [
|
|
@@ -4946,7 +4984,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4946
4984
|
})
|
|
4947
4985
|
]
|
|
4948
4986
|
}),
|
|
4949
|
-
!
|
|
4987
|
+
!ge && !he && j && /* @__PURE__ */ t("button", {
|
|
4950
4988
|
type: "button",
|
|
4951
4989
|
className: $.replay,
|
|
4952
4990
|
"aria-label": "Воспроизвести заново",
|
|
@@ -4957,7 +4995,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4957
4995
|
height: 28
|
|
4958
4996
|
})
|
|
4959
4997
|
}),
|
|
4960
|
-
m && r.length > 0 && !
|
|
4998
|
+
m && r.length > 0 && !ge && !he && /* @__PURE__ */ n("div", {
|
|
4961
4999
|
className: `${$.controlsLayer} ${ce || !k ? $.controlsVisible : ""}`,
|
|
4962
5000
|
onClick: (e) => e.stopPropagation(),
|
|
4963
5001
|
children: [oe && /* @__PURE__ */ n("div", {
|
|
@@ -4971,7 +5009,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4971
5009
|
let t = Number(e.target.value);
|
|
4972
5010
|
x.current && (x.current.playbackRate = t);
|
|
4973
5011
|
},
|
|
4974
|
-
children:
|
|
5012
|
+
children: qr.map((e) => /* @__PURE__ */ n("option", {
|
|
4975
5013
|
value: e,
|
|
4976
5014
|
children: [e, "×"]
|
|
4977
5015
|
}, e))
|
|
@@ -4990,9 +5028,9 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4990
5028
|
/* @__PURE__ */ n("button", {
|
|
4991
5029
|
type: "button",
|
|
4992
5030
|
className: $.settingsAction,
|
|
4993
|
-
"aria-pressed":
|
|
4994
|
-
onClick: () =>
|
|
4995
|
-
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children:
|
|
5031
|
+
"aria-pressed": W,
|
|
5032
|
+
onClick: () => re((e) => !e),
|
|
5033
|
+
children: [/* @__PURE__ */ t("span", { children: "Повтор" }), /* @__PURE__ */ t("span", { children: W ? "Вкл." : "Выкл." })]
|
|
4996
5034
|
}),
|
|
4997
5035
|
_e && /* @__PURE__ */ t("button", {
|
|
4998
5036
|
type: "button",
|
|
@@ -5058,7 +5096,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5058
5096
|
children: [
|
|
5059
5097
|
/* @__PURE__ */ t("span", {
|
|
5060
5098
|
className: $.time,
|
|
5061
|
-
children:
|
|
5099
|
+
children: Ur(N)
|
|
5062
5100
|
}),
|
|
5063
5101
|
/* @__PURE__ */ t("input", {
|
|
5064
5102
|
className: $.timeline,
|
|
@@ -5069,12 +5107,12 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5069
5107
|
step: .01,
|
|
5070
5108
|
value: Math.min(N, F || 0),
|
|
5071
5109
|
"aria-label": "Позиция воспроизведения",
|
|
5072
|
-
"aria-valuetext": `${
|
|
5110
|
+
"aria-valuetext": `${Ur(N)} из ${Ur(F)}`,
|
|
5073
5111
|
onChange: (e) => Se(Number(e.target.value))
|
|
5074
5112
|
}),
|
|
5075
5113
|
/* @__PURE__ */ t("span", {
|
|
5076
5114
|
className: $.time,
|
|
5077
|
-
children:
|
|
5115
|
+
children: Ur(F)
|
|
5078
5116
|
})
|
|
5079
5117
|
]
|
|
5080
5118
|
}),
|
|
@@ -5114,7 +5152,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5114
5152
|
children: a
|
|
5115
5153
|
})]
|
|
5116
5154
|
});
|
|
5117
|
-
},
|
|
5155
|
+
}, Yr = {
|
|
5118
5156
|
root: "_root_14ewt_1",
|
|
5119
5157
|
topSlot: "_topSlot_14ewt_29",
|
|
5120
5158
|
searchSlot: "_searchSlot_14ewt_31",
|
|
@@ -5132,14 +5170,14 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5132
5170
|
description: "_description_14ewt_235",
|
|
5133
5171
|
badge: "_badge_14ewt_269",
|
|
5134
5172
|
empty: "_empty_14ewt_281"
|
|
5135
|
-
},
|
|
5173
|
+
}, Xr = (e, t, n) => {
|
|
5136
5174
|
if (e.length === 0) return -1;
|
|
5137
5175
|
for (let r = 1; r <= e.length; r += 1) {
|
|
5138
5176
|
let i = (t + n * r + e.length) % e.length;
|
|
5139
5177
|
if (!e[i]?.disabled) return i;
|
|
5140
5178
|
}
|
|
5141
5179
|
return -1;
|
|
5142
|
-
},
|
|
5180
|
+
}, Zr = ({ groups: r, currentItemId: i, ariaLabel: a = "Основная навигация", searchSlot: o, topSlot: s, bottomSlot: c, emptyState: l, renderLink: u, onItemSelect: d, className: p = "" }) => {
|
|
5143
5181
|
let m = f(), g = h(null), _ = h({
|
|
5144
5182
|
value: "",
|
|
5145
5183
|
time: 0
|
|
@@ -5151,7 +5189,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5151
5189
|
let n = v.findIndex((e) => e.id === t.id);
|
|
5152
5190
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
5153
5191
|
e.preventDefault();
|
|
5154
|
-
let t =
|
|
5192
|
+
let t = Xr(v, n, e.key === "ArrowDown" ? 1 : -1);
|
|
5155
5193
|
x(v[t]);
|
|
5156
5194
|
return;
|
|
5157
5195
|
}
|
|
@@ -5171,26 +5209,26 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5171
5209
|
let a = r.id === i, o = {
|
|
5172
5210
|
children: /* @__PURE__ */ n(e, { children: [
|
|
5173
5211
|
r.icon && /* @__PURE__ */ t("span", {
|
|
5174
|
-
className:
|
|
5212
|
+
className: Yr.icon,
|
|
5175
5213
|
"aria-hidden": "true",
|
|
5176
5214
|
children: r.icon
|
|
5177
5215
|
}),
|
|
5178
5216
|
/* @__PURE__ */ n("span", {
|
|
5179
|
-
className:
|
|
5217
|
+
className: Yr.copy,
|
|
5180
5218
|
children: [/* @__PURE__ */ t("span", {
|
|
5181
|
-
className:
|
|
5219
|
+
className: Yr.label,
|
|
5182
5220
|
children: r.label
|
|
5183
5221
|
}), r.description && /* @__PURE__ */ t("span", {
|
|
5184
|
-
className:
|
|
5222
|
+
className: Yr.description,
|
|
5185
5223
|
children: r.description
|
|
5186
5224
|
})]
|
|
5187
5225
|
}),
|
|
5188
5226
|
r.badge && /* @__PURE__ */ t("span", {
|
|
5189
|
-
className:
|
|
5227
|
+
className: Yr.badge,
|
|
5190
5228
|
children: r.badge
|
|
5191
5229
|
})
|
|
5192
5230
|
] }),
|
|
5193
|
-
className: `${
|
|
5231
|
+
className: `${Yr.link} ${a ? Yr.current : ""}`,
|
|
5194
5232
|
tabIndex: r.id === b ? 0 : -1,
|
|
5195
5233
|
"aria-current": a ? "page" : void 0,
|
|
5196
5234
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5206,7 +5244,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5206
5244
|
onKeyDown: (e) => S(e, r)
|
|
5207
5245
|
};
|
|
5208
5246
|
return /* @__PURE__ */ t("li", {
|
|
5209
|
-
className:
|
|
5247
|
+
className: Yr.item,
|
|
5210
5248
|
children: u ? u(r, o) : r.href ? /* @__PURE__ */ t("a", {
|
|
5211
5249
|
href: r.href,
|
|
5212
5250
|
...o,
|
|
@@ -5221,45 +5259,45 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5221
5259
|
};
|
|
5222
5260
|
return /* @__PURE__ */ n("nav", {
|
|
5223
5261
|
ref: g,
|
|
5224
|
-
className: `${
|
|
5262
|
+
className: `${Yr.root} ${p}`,
|
|
5225
5263
|
"aria-label": a,
|
|
5226
5264
|
children: [
|
|
5227
5265
|
s && /* @__PURE__ */ t("div", {
|
|
5228
|
-
className:
|
|
5266
|
+
className: Yr.topSlot,
|
|
5229
5267
|
children: s
|
|
5230
5268
|
}),
|
|
5231
5269
|
o && /* @__PURE__ */ t("div", {
|
|
5232
|
-
className:
|
|
5270
|
+
className: Yr.searchSlot,
|
|
5233
5271
|
children: o
|
|
5234
5272
|
}),
|
|
5235
5273
|
/* @__PURE__ */ n("div", {
|
|
5236
|
-
className:
|
|
5274
|
+
className: Yr.groups,
|
|
5237
5275
|
children: [r.map((e) => {
|
|
5238
5276
|
let r = `${m}-${e.id}`;
|
|
5239
5277
|
return /* @__PURE__ */ n("section", {
|
|
5240
|
-
className:
|
|
5278
|
+
className: Yr.group,
|
|
5241
5279
|
"aria-labelledby": e.label ? r : void 0,
|
|
5242
5280
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
5243
5281
|
id: r,
|
|
5244
|
-
className:
|
|
5282
|
+
className: Yr.groupLabel,
|
|
5245
5283
|
children: e.label
|
|
5246
5284
|
}), /* @__PURE__ */ t("ul", {
|
|
5247
|
-
className:
|
|
5285
|
+
className: Yr.list,
|
|
5248
5286
|
children: e.items.map(C)
|
|
5249
5287
|
})]
|
|
5250
5288
|
}, e.id);
|
|
5251
5289
|
}), v.length === 0 && l && /* @__PURE__ */ t("div", {
|
|
5252
|
-
className:
|
|
5290
|
+
className: Yr.empty,
|
|
5253
5291
|
children: l
|
|
5254
5292
|
})]
|
|
5255
5293
|
}),
|
|
5256
5294
|
c && /* @__PURE__ */ t("div", {
|
|
5257
|
-
className:
|
|
5295
|
+
className: Yr.bottomSlot,
|
|
5258
5296
|
children: c
|
|
5259
5297
|
})
|
|
5260
5298
|
]
|
|
5261
5299
|
});
|
|
5262
|
-
},
|
|
5300
|
+
}, Qr = {
|
|
5263
5301
|
root: "_root_2mdgb_1",
|
|
5264
5302
|
list: "_list_2mdgb_19",
|
|
5265
5303
|
item: "_item_2mdgb_37",
|
|
@@ -5269,7 +5307,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5269
5307
|
icon: "_icon_2mdgb_141",
|
|
5270
5308
|
badge: "_badge_2mdgb_149",
|
|
5271
5309
|
label: "_label_2mdgb_163"
|
|
5272
|
-
},
|
|
5310
|
+
}, $r = ({ items: r, currentItemId: i, ariaLabel: a = "Мобильная навигация", renderLink: o, onItemSelect: s, className: c = "" }) => {
|
|
5273
5311
|
let l = h(null), u = r.filter((e) => !e.disabled), d = u.some((e) => e.id === i) ? i : u[0]?.id, f = (e) => {
|
|
5274
5312
|
l.current?.querySelectorAll("[data-ds-navigation-item]")[e]?.focus();
|
|
5275
5313
|
}, p = (e, t) => {
|
|
@@ -5286,27 +5324,27 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5286
5324
|
};
|
|
5287
5325
|
return /* @__PURE__ */ t("nav", {
|
|
5288
5326
|
ref: l,
|
|
5289
|
-
className: `${
|
|
5327
|
+
className: `${Qr.root} ${c}`,
|
|
5290
5328
|
"aria-label": a,
|
|
5291
5329
|
children: /* @__PURE__ */ t("ul", {
|
|
5292
|
-
className:
|
|
5330
|
+
className: Qr.list,
|
|
5293
5331
|
children: r.map((r) => {
|
|
5294
5332
|
let a = r.id === i, c = {
|
|
5295
5333
|
children: /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("span", {
|
|
5296
|
-
className:
|
|
5334
|
+
className: Qr.visual,
|
|
5297
5335
|
children: [r.icon && /* @__PURE__ */ t("span", {
|
|
5298
|
-
className:
|
|
5336
|
+
className: Qr.icon,
|
|
5299
5337
|
"aria-hidden": "true",
|
|
5300
5338
|
children: r.icon
|
|
5301
5339
|
}), r.badge && /* @__PURE__ */ t("span", {
|
|
5302
|
-
className:
|
|
5340
|
+
className: Qr.badge,
|
|
5303
5341
|
children: r.badge
|
|
5304
5342
|
})]
|
|
5305
5343
|
}), /* @__PURE__ */ t("span", {
|
|
5306
|
-
className:
|
|
5344
|
+
className: Qr.label,
|
|
5307
5345
|
children: r.label
|
|
5308
5346
|
})] }),
|
|
5309
|
-
className: `${
|
|
5347
|
+
className: `${Qr.link} ${a ? Qr.current : ""}`,
|
|
5310
5348
|
tabIndex: r.id === d ? 0 : -1,
|
|
5311
5349
|
"aria-current": a ? "page" : void 0,
|
|
5312
5350
|
"aria-disabled": r.disabled ? !0 : void 0,
|
|
@@ -5322,7 +5360,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5322
5360
|
onKeyDown: (e) => p(e, r)
|
|
5323
5361
|
};
|
|
5324
5362
|
return /* @__PURE__ */ t("li", {
|
|
5325
|
-
className:
|
|
5363
|
+
className: Qr.item,
|
|
5326
5364
|
children: o ? o(r, c) : r.href ? /* @__PURE__ */ t("a", {
|
|
5327
5365
|
href: r.href,
|
|
5328
5366
|
...c,
|
|
@@ -5337,7 +5375,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5337
5375
|
})
|
|
5338
5376
|
})
|
|
5339
5377
|
});
|
|
5340
|
-
},
|
|
5378
|
+
}, ei = {
|
|
5341
5379
|
logo: "_logo_1kw5e_17",
|
|
5342
5380
|
edgeStart: "_edgeStart_1kw5e_33",
|
|
5343
5381
|
edgeMiddle: "_edgeMiddle_1kw5e_41",
|
|
@@ -5352,19 +5390,19 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5352
5390
|
wordmark: "_wordmark_1kw5e_127",
|
|
5353
5391
|
edge: "_edge_1kw5e_33",
|
|
5354
5392
|
pane: "_pane_1kw5e_57"
|
|
5355
|
-
},
|
|
5393
|
+
}, ti = {
|
|
5356
5394
|
sm: 24,
|
|
5357
5395
|
md: 40,
|
|
5358
5396
|
lg: 56
|
|
5359
|
-
},
|
|
5397
|
+
}, ni = {
|
|
5360
5398
|
icon: "0 0 128 224",
|
|
5361
5399
|
wordmark: "0 0 600 160",
|
|
5362
5400
|
lockup: "0 0 675 200"
|
|
5363
|
-
},
|
|
5401
|
+
}, ri = {
|
|
5364
5402
|
icon: 128 / 224,
|
|
5365
5403
|
wordmark: 600 / 160,
|
|
5366
5404
|
lockup: 675 / 200
|
|
5367
|
-
},
|
|
5405
|
+
}, ii = ({ id: e, transform: r }) => /* @__PURE__ */ n("g", {
|
|
5368
5406
|
transform: r,
|
|
5369
5407
|
children: [
|
|
5370
5408
|
/* @__PURE__ */ n("defs", { children: [
|
|
@@ -5376,14 +5414,14 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5376
5414
|
y2: "216",
|
|
5377
5415
|
gradientUnits: "userSpaceOnUse",
|
|
5378
5416
|
children: [
|
|
5379
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5417
|
+
/* @__PURE__ */ t("stop", { className: ei.edgeStart }),
|
|
5380
5418
|
/* @__PURE__ */ t("stop", {
|
|
5381
5419
|
offset: "0.52",
|
|
5382
|
-
className:
|
|
5420
|
+
className: ei.edgeMiddle
|
|
5383
5421
|
}),
|
|
5384
5422
|
/* @__PURE__ */ t("stop", {
|
|
5385
5423
|
offset: "1",
|
|
5386
|
-
className:
|
|
5424
|
+
className: ei.edgeEnd
|
|
5387
5425
|
})
|
|
5388
5426
|
]
|
|
5389
5427
|
}),
|
|
@@ -5395,14 +5433,14 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5395
5433
|
y2: "199",
|
|
5396
5434
|
gradientUnits: "userSpaceOnUse",
|
|
5397
5435
|
children: [
|
|
5398
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5436
|
+
/* @__PURE__ */ t("stop", { className: ei.paneStart }),
|
|
5399
5437
|
/* @__PURE__ */ t("stop", {
|
|
5400
5438
|
offset: "0.52",
|
|
5401
|
-
className:
|
|
5439
|
+
className: ei.paneMiddle
|
|
5402
5440
|
}),
|
|
5403
5441
|
/* @__PURE__ */ t("stop", {
|
|
5404
5442
|
offset: "1",
|
|
5405
|
-
className:
|
|
5443
|
+
className: ei.paneEnd
|
|
5406
5444
|
})
|
|
5407
5445
|
]
|
|
5408
5446
|
}),
|
|
@@ -5414,25 +5452,25 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5414
5452
|
y2: "176",
|
|
5415
5453
|
gradientUnits: "userSpaceOnUse",
|
|
5416
5454
|
children: [
|
|
5417
|
-
/* @__PURE__ */ t("stop", { className:
|
|
5455
|
+
/* @__PURE__ */ t("stop", { className: ei.sheenStart }),
|
|
5418
5456
|
/* @__PURE__ */ t("stop", {
|
|
5419
5457
|
offset: "0.42",
|
|
5420
|
-
className:
|
|
5458
|
+
className: ei.sheenMiddle
|
|
5421
5459
|
}),
|
|
5422
5460
|
/* @__PURE__ */ t("stop", {
|
|
5423
5461
|
offset: "1",
|
|
5424
|
-
className:
|
|
5462
|
+
className: ei.sheenEnd
|
|
5425
5463
|
})
|
|
5426
5464
|
]
|
|
5427
5465
|
})
|
|
5428
5466
|
] }),
|
|
5429
5467
|
/* @__PURE__ */ t("path", {
|
|
5430
|
-
className:
|
|
5468
|
+
className: ei.edge,
|
|
5431
5469
|
d: "M12 13.5 28 8v208l-16-5.5z",
|
|
5432
5470
|
fill: `url(#${e}-edge)`
|
|
5433
5471
|
}),
|
|
5434
5472
|
/* @__PURE__ */ t("path", {
|
|
5435
|
-
className:
|
|
5473
|
+
className: ei.pane,
|
|
5436
5474
|
d: "M28 8 116 51.5v121L28 216z",
|
|
5437
5475
|
fill: `url(#${e}-pane)`
|
|
5438
5476
|
}),
|
|
@@ -5441,22 +5479,22 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5441
5479
|
fill: `url(#${e}-sheen)`
|
|
5442
5480
|
}),
|
|
5443
5481
|
/* @__PURE__ */ t("path", {
|
|
5444
|
-
className:
|
|
5482
|
+
className: ei.rim,
|
|
5445
5483
|
d: "M115 53v118.5l-4.5 2.5V55.2z"
|
|
5446
5484
|
})
|
|
5447
5485
|
]
|
|
5448
|
-
}),
|
|
5449
|
-
className:
|
|
5486
|
+
}), ai = ({ transform: e }) => /* @__PURE__ */ t("text", {
|
|
5487
|
+
className: ei.wordmark,
|
|
5450
5488
|
x: "8",
|
|
5451
5489
|
y: "128",
|
|
5452
5490
|
transform: e,
|
|
5453
5491
|
children: "Стекло"
|
|
5454
|
-
}),
|
|
5455
|
-
let p = `ds-logo-${f().replaceAll(":", "")}`, m = l ?? (typeof i == "number" ? Math.max(1, i) :
|
|
5492
|
+
}), oi = ({ variant: r = "lockup", size: i = "md", decorative: a = !1, className: o = "", title: s = "Стекло", width: c, height: l, "aria-label": u, ...d }) => {
|
|
5493
|
+
let p = `ds-logo-${f().replaceAll(":", "")}`, m = l ?? (typeof i == "number" ? Math.max(1, i) : ti[i]), h = typeof m == "number" ? m : ti.md, g = c ?? Number((h * ri[r]).toFixed(2)), _ = `${p}-title`;
|
|
5456
5494
|
return /* @__PURE__ */ n("svg", {
|
|
5457
5495
|
...d,
|
|
5458
|
-
className: `${
|
|
5459
|
-
viewBox:
|
|
5496
|
+
className: `${ei.logo} ${o}`,
|
|
5497
|
+
viewBox: ni[r],
|
|
5460
5498
|
width: g,
|
|
5461
5499
|
height: m,
|
|
5462
5500
|
role: a ? void 0 : "img",
|
|
@@ -5469,56 +5507,56 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5469
5507
|
id: _,
|
|
5470
5508
|
children: s
|
|
5471
5509
|
}),
|
|
5472
|
-
r === "icon" && /* @__PURE__ */ t(
|
|
5473
|
-
r === "wordmark" && /* @__PURE__ */ t(
|
|
5474
|
-
r === "lockup" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(
|
|
5510
|
+
r === "icon" && /* @__PURE__ */ t(ii, { id: p }),
|
|
5511
|
+
r === "wordmark" && /* @__PURE__ */ t(ai, {}),
|
|
5512
|
+
r === "lockup" && /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(ii, {
|
|
5475
5513
|
id: p,
|
|
5476
5514
|
transform: "translate(16 0) scale(.86)"
|
|
5477
|
-
}), /* @__PURE__ */ t(
|
|
5515
|
+
}), /* @__PURE__ */ t(ai, { transform: "translate(156 36) scale(.84)" })] })
|
|
5478
5516
|
]
|
|
5479
5517
|
});
|
|
5480
|
-
},
|
|
5518
|
+
}, si = {
|
|
5481
5519
|
brand: "_brand_uueok_1",
|
|
5482
5520
|
symbol: "_symbol_uueok_25",
|
|
5483
5521
|
identity: "_identity_uueok_33",
|
|
5484
5522
|
collapsed: "_collapsed_uueok_55",
|
|
5485
5523
|
wordmark: "_wordmark_uueok_63",
|
|
5486
5524
|
serviceName: "_serviceName_uueok_71"
|
|
5487
|
-
},
|
|
5525
|
+
}, ci = ({ serviceName: e, collapsed: r = !1, logoSize: i, className: a = "", "aria-label": o, ...s }) => {
|
|
5488
5526
|
let c = o ?? `Стекло. ${e}`;
|
|
5489
5527
|
return /* @__PURE__ */ n("div", {
|
|
5490
5528
|
...s,
|
|
5491
|
-
className: `${
|
|
5529
|
+
className: `${si.brand} ${r ? si.collapsed : ""} ${a}`,
|
|
5492
5530
|
"data-collapsed": r || void 0,
|
|
5493
5531
|
"aria-label": c,
|
|
5494
5532
|
title: r ? c : s.title,
|
|
5495
|
-
children: [/* @__PURE__ */ t(
|
|
5496
|
-
className:
|
|
5533
|
+
children: [/* @__PURE__ */ t(oi, {
|
|
5534
|
+
className: si.symbol,
|
|
5497
5535
|
variant: "icon",
|
|
5498
5536
|
size: i ?? 44,
|
|
5499
5537
|
decorative: !0
|
|
5500
5538
|
}), /* @__PURE__ */ n("span", {
|
|
5501
|
-
className:
|
|
5539
|
+
className: si.identity,
|
|
5502
5540
|
"aria-hidden": "true",
|
|
5503
|
-
children: [/* @__PURE__ */ t(
|
|
5504
|
-
className:
|
|
5541
|
+
children: [/* @__PURE__ */ t(oi, {
|
|
5542
|
+
className: si.wordmark,
|
|
5505
5543
|
variant: "wordmark",
|
|
5506
5544
|
size: 32,
|
|
5507
5545
|
decorative: !0
|
|
5508
5546
|
}), /* @__PURE__ */ t("span", {
|
|
5509
|
-
className:
|
|
5547
|
+
className: si.serviceName,
|
|
5510
5548
|
title: e,
|
|
5511
5549
|
children: e
|
|
5512
5550
|
})]
|
|
5513
5551
|
})]
|
|
5514
5552
|
});
|
|
5515
|
-
},
|
|
5553
|
+
}, li = {
|
|
5516
5554
|
sample: "_sample_3woga_1",
|
|
5517
5555
|
menu: "_menu_3woga_59",
|
|
5518
5556
|
options: "_options_3woga_81",
|
|
5519
5557
|
legend: "_legend_3woga_93",
|
|
5520
5558
|
option: "_option_3woga_81"
|
|
5521
|
-
},
|
|
5559
|
+
}, ui = ({ value: r, onChange: i, compact: a = !1, disabled: o = !1 }) => {
|
|
5522
5560
|
let [s, c] = g(!1), l = h(null), [u, p] = g(null), m = f();
|
|
5523
5561
|
return d(() => {
|
|
5524
5562
|
if (!s) return;
|
|
@@ -5546,7 +5584,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5546
5584
|
children: [
|
|
5547
5585
|
/* @__PURE__ */ t("span", {
|
|
5548
5586
|
"data-ds-theme": r,
|
|
5549
|
-
className:
|
|
5587
|
+
className: li.sample,
|
|
5550
5588
|
"aria-hidden": "true"
|
|
5551
5589
|
}),
|
|
5552
5590
|
!a && w[r],
|
|
@@ -5557,22 +5595,22 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5557
5595
|
"aria-hidden": "true"
|
|
5558
5596
|
})
|
|
5559
5597
|
]
|
|
5560
|
-
}), s && !o && /* @__PURE__ */ t(
|
|
5598
|
+
}), s && !o && /* @__PURE__ */ t(Hn, {
|
|
5561
5599
|
anchorRef: l,
|
|
5562
5600
|
children: /* @__PURE__ */ t("div", {
|
|
5563
5601
|
ref: p,
|
|
5564
5602
|
id: m,
|
|
5565
|
-
className:
|
|
5603
|
+
className: li.menu,
|
|
5566
5604
|
onBlur: (e) => {
|
|
5567
5605
|
e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && !l.current?.contains(e.relatedTarget) && c(!1);
|
|
5568
5606
|
},
|
|
5569
5607
|
children: /* @__PURE__ */ n("fieldset", {
|
|
5570
|
-
className:
|
|
5608
|
+
className: li.options,
|
|
5571
5609
|
children: [/* @__PURE__ */ t("legend", {
|
|
5572
|
-
className:
|
|
5610
|
+
className: li.legend,
|
|
5573
5611
|
children: "Цветовая тема"
|
|
5574
5612
|
}), ["teal", "signal"].map((e) => /* @__PURE__ */ n("label", {
|
|
5575
|
-
className:
|
|
5613
|
+
className: li.option,
|
|
5576
5614
|
children: [
|
|
5577
5615
|
/* @__PURE__ */ t("input", {
|
|
5578
5616
|
type: "radio",
|
|
@@ -5583,7 +5621,7 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5583
5621
|
}),
|
|
5584
5622
|
/* @__PURE__ */ t("span", {
|
|
5585
5623
|
"data-ds-theme": e,
|
|
5586
|
-
className:
|
|
5624
|
+
className: li.sample,
|
|
5587
5625
|
"aria-hidden": "true"
|
|
5588
5626
|
}),
|
|
5589
5627
|
/* @__PURE__ */ t("span", { children: w[e] }),
|
|
@@ -5600,4 +5638,4 @@ var Kn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5600
5638
|
})] });
|
|
5601
5639
|
};
|
|
5602
5640
|
//#endregion
|
|
5603
|
-
export {
|
|
5641
|
+
export { pr as ConfirmModal, O as DEFAULT_DS_FAVICON_THEME, It as DSAccordion, F as DSBadge, $r as DSBottomNavigation, kr as DSBottomSheet, B as DSButton, Ge as DSCheckbox, R as DSCounterBadge, yn as DSDataTable, mt as DSDateRange, dt as DSDateTimePicker, Or as DSDrawer, St as DSDropDown, jt as DSDropDownMultiple, ne as DSFieldLabel, H as DSFieldMessage, Bn as DSFileInput, jn as DSFilters, Hn as DSFloatingMenu, Nn as DSFormGrid, Pn as DSFormGridItem, Ar as DSFullscreenDialog, J as DSIcon, Ue as DSIconNames, kn as DSInfoBlock, Et as DSInput, ee as DSLoader, oi as DSLogo, sr as DSModal, or as DSModalFrame, Zr as DSNavigationSurface, Dr as DSOverlay, Mr as DSPageLoader, Lt as DSPortal, Nt as DSRadioButton, Dn as DSSearchDropDown, ci as DSServiceBrand, gt as DSSkeleton, wt as DSSort, Hr as DSTabs, Kn as DSTextarea, ui as DSThemeSwitcher, Fr as DSToast, zr as DSToastProvider, Xt as DSTooltip, Fn as DSValidationSummary, Jr as DSVideoPlayerFrame, k as DS_FAVICON_THEMES, w as DS_THEME_NAMES, C as DS_THEME_STORAGE_KEY, mr as ErrorModal, cr as ModalSystemProvider, N as applyDSBrandTheme, M as applyDSFavicon, D as applyDSTheme, hr as builtInModalRegistry, lr as defineModalRegistry, L as formatDSCounterValue, Ze as formatDateInputValue, rt as formatDateTimeLocalValue, Ft as getDSAccordionScrollTarget, sn as getDSDataTableColumnStyle, ln as getDSDataTablePaginationItems, cn as getDSDataTableStickyColumnStyle, j as getDSFaviconHref, _r as getErrorMessage, on as getNextDSDataTablePageSelection, bt as getNextEnabledOptionIndex, E as getStoredDSTheme, T as isDSTheme, et as isValidDateInputPrefix, pt as isValidDateRange, Qe as maskDateInputValue, tt as parseDateInputValue, it as parseDateTimeLocalValue, Yn as resetModalStore, Rr as resetToastStore, gr as useConfirmModal, yr as useConfirmModalStore, Er as useDSOverlay, vr as useErrorModal, br as useErrorModalStore, xr as useModals, Jn as useModalsStore, Br as useToast, Lr as useToastStore, un as validateDSDataTableData };
|