@mdspl/mds-shared-ui 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1187 -1185
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import B, {
|
|
2
|
-
import {
|
|
1
|
+
import B, { forwardRef as hn, createElement as sn, useState as Q, useRef as N, useEffect as A, useLayoutEffect as Zr, useMemo as M, useCallback as K, createContext as ht, memo as Qr, useReducer as eo, useContext as ze } from "react";
|
|
2
|
+
import { Checkbox as pe, Popover as Pt, InputGroup as cr, InputElement as An, IconButton as _e, Portal as gt, PopoverArrow as to, VStack as je, HStack as de, Text as U, Kbd as kn, Input as ur, Field as Fe, Select as z, createListCollection as dr, Menu as Se, Table as ye, Pagination as It, Box as Ge, ButtonGroup as no, Slider as pt, Drawer as Ce, Tabs as zt, Button as Gt, CloseButton as ro } from "@chakra-ui/react";
|
|
3
3
|
import { unstable_batchedUpdates as St, createPortal as oo } from "react-dom";
|
|
4
4
|
var Ct = { exports: {} }, ot = {};
|
|
5
5
|
var Mn;
|
|
@@ -260,11 +260,495 @@ var Ln;
|
|
|
260
260
|
function ao() {
|
|
261
261
|
return Ln || (Ln = 1, process.env.NODE_ENV === "production" ? Ct.exports = so() : Ct.exports = io()), Ct.exports;
|
|
262
262
|
}
|
|
263
|
-
var a = ao()
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
263
|
+
var a = ao();
|
|
264
|
+
function y(e) {
|
|
265
|
+
return hn((t, n) => {
|
|
266
|
+
const { children: r, ...o } = t;
|
|
267
|
+
return (
|
|
268
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
269
|
+
/* @__PURE__ */ a.jsx(e, { ref: n, ...o, children: r })
|
|
270
|
+
);
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
const Dl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
274
|
+
__proto__: null,
|
|
275
|
+
withChildren: y
|
|
276
|
+
}, Symbol.toStringTag, { value: "Module" })), lo = y(pe.Root), co = y(pe.HiddenInput), uo = y(pe.Control), fo = y(pe.Label), ho = ({
|
|
277
|
+
value: e,
|
|
278
|
+
onChange: t,
|
|
279
|
+
size: n = "sm",
|
|
280
|
+
label: r,
|
|
281
|
+
helperText: o,
|
|
282
|
+
isDisabled: s,
|
|
283
|
+
required: i,
|
|
284
|
+
errorText: l
|
|
285
|
+
}) => /* @__PURE__ */ a.jsxs(lo, { value: e, onChange: t, size: n, children: [
|
|
286
|
+
/* @__PURE__ */ a.jsx(co, {}),
|
|
287
|
+
/* @__PURE__ */ a.jsx(
|
|
288
|
+
uo,
|
|
289
|
+
{
|
|
290
|
+
disabled: s,
|
|
291
|
+
required: i,
|
|
292
|
+
errorText: l,
|
|
293
|
+
helperText: o
|
|
294
|
+
}
|
|
295
|
+
),
|
|
296
|
+
r && /* @__PURE__ */ a.jsx(fo, { children: r })
|
|
297
|
+
] });
|
|
298
|
+
const go = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), po = (e) => e.replace(
|
|
299
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
300
|
+
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
301
|
+
), $n = (e) => {
|
|
302
|
+
const t = po(e);
|
|
303
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
304
|
+
}, fr = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim(), vo = (e) => {
|
|
305
|
+
for (const t in e)
|
|
306
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
307
|
+
return !0;
|
|
308
|
+
};
|
|
309
|
+
var bo = {
|
|
310
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
311
|
+
width: 24,
|
|
312
|
+
height: 24,
|
|
313
|
+
viewBox: "0 0 24 24",
|
|
314
|
+
fill: "none",
|
|
315
|
+
stroke: "currentColor",
|
|
316
|
+
strokeWidth: 2,
|
|
317
|
+
strokeLinecap: "round",
|
|
318
|
+
strokeLinejoin: "round"
|
|
319
|
+
};
|
|
320
|
+
const mo = hn(
|
|
321
|
+
({
|
|
322
|
+
color: e = "currentColor",
|
|
323
|
+
size: t = 24,
|
|
324
|
+
strokeWidth: n = 2,
|
|
325
|
+
absoluteStrokeWidth: r,
|
|
326
|
+
className: o = "",
|
|
327
|
+
children: s,
|
|
328
|
+
iconNode: i,
|
|
329
|
+
...l
|
|
330
|
+
}, c) => sn(
|
|
331
|
+
"svg",
|
|
332
|
+
{
|
|
333
|
+
ref: c,
|
|
334
|
+
...bo,
|
|
335
|
+
width: t,
|
|
336
|
+
height: t,
|
|
337
|
+
stroke: e,
|
|
338
|
+
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
339
|
+
className: fr("lucide", o),
|
|
340
|
+
...!s && !vo(l) && { "aria-hidden": "true" },
|
|
341
|
+
...l
|
|
342
|
+
},
|
|
343
|
+
[
|
|
344
|
+
...i.map(([u, h]) => sn(u, h)),
|
|
345
|
+
...Array.isArray(s) ? s : [s]
|
|
346
|
+
]
|
|
347
|
+
)
|
|
348
|
+
);
|
|
349
|
+
const te = (e, t) => {
|
|
350
|
+
const n = hn(
|
|
351
|
+
({ className: r, ...o }, s) => sn(mo, {
|
|
352
|
+
ref: s,
|
|
353
|
+
iconNode: t,
|
|
354
|
+
className: fr(
|
|
355
|
+
`lucide-${go($n(e))}`,
|
|
356
|
+
`lucide-${e}`,
|
|
357
|
+
r
|
|
358
|
+
),
|
|
359
|
+
...o
|
|
360
|
+
})
|
|
361
|
+
);
|
|
362
|
+
return n.displayName = $n(e), n;
|
|
363
|
+
};
|
|
364
|
+
const xo = [
|
|
365
|
+
["path", { d: "M12 5v14", key: "s699le" }],
|
|
366
|
+
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
367
|
+
], yo = te("arrow-down", xo);
|
|
368
|
+
const wo = [
|
|
369
|
+
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
370
|
+
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
371
|
+
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
372
|
+
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
373
|
+
], So = te("arrow-up-down", wo);
|
|
374
|
+
const Co = [
|
|
375
|
+
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
376
|
+
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
377
|
+
], Ro = te("arrow-up", Co);
|
|
378
|
+
const Do = [
|
|
379
|
+
["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }]
|
|
380
|
+
], Eo = te("bookmark", Do);
|
|
381
|
+
const jo = [
|
|
382
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
383
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
384
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
385
|
+
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
386
|
+
], Pn = te("calendar", jo);
|
|
387
|
+
const _o = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Oo = te("chevron-left", _o);
|
|
388
|
+
const To = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Io = te("chevron-right", To);
|
|
389
|
+
const Ao = [
|
|
390
|
+
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
391
|
+
["path", { d: "M12 3v18", key: "108xh3" }]
|
|
392
|
+
], ko = te("columns-2", Ao);
|
|
393
|
+
const Mo = [
|
|
394
|
+
[
|
|
395
|
+
"path",
|
|
396
|
+
{
|
|
397
|
+
d: "M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",
|
|
398
|
+
key: "1yo7s0"
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
["path", { d: "m12 9 6 6", key: "anjzzh" }],
|
|
402
|
+
["path", { d: "m18 9-6 6", key: "1fp51s" }]
|
|
403
|
+
], No = te("delete", Mo);
|
|
404
|
+
const Lo = [
|
|
405
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
406
|
+
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
407
|
+
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
408
|
+
], $o = te("ellipsis", Lo);
|
|
409
|
+
const Po = [
|
|
410
|
+
[
|
|
411
|
+
"path",
|
|
412
|
+
{
|
|
413
|
+
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
414
|
+
key: "sc7q7i"
|
|
415
|
+
}
|
|
416
|
+
]
|
|
417
|
+
], zo = te("funnel", Po);
|
|
418
|
+
const Fo = [
|
|
419
|
+
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
420
|
+
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
421
|
+
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
422
|
+
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
423
|
+
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
424
|
+
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
425
|
+
], Vo = te("grip-vertical", Fo);
|
|
426
|
+
const Yo = [
|
|
427
|
+
[
|
|
428
|
+
"path",
|
|
429
|
+
{
|
|
430
|
+
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
431
|
+
key: "1a8usu"
|
|
432
|
+
}
|
|
433
|
+
]
|
|
434
|
+
], Bo = te("pen", Yo);
|
|
435
|
+
const Ho = [
|
|
436
|
+
[
|
|
437
|
+
"path",
|
|
438
|
+
{
|
|
439
|
+
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
440
|
+
key: "1i5ecw"
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
444
|
+
], Wo = te("settings", Ho), V = " to ", zn = 10, Le = {
|
|
445
|
+
DAY_MAX: 31,
|
|
446
|
+
MONTH_MAX: 12,
|
|
447
|
+
YEAR_MIN: 1900,
|
|
448
|
+
YEAR_MAX: 2100
|
|
449
|
+
}, gn = () => {
|
|
450
|
+
const e = /* @__PURE__ */ new Date();
|
|
451
|
+
return {
|
|
452
|
+
year: e.getFullYear(),
|
|
453
|
+
month: e.getMonth() + 1,
|
|
454
|
+
day: e.getDate()
|
|
455
|
+
};
|
|
456
|
+
}, Fn = () => {
|
|
457
|
+
const { year: e, month: t, day: n } = gn();
|
|
458
|
+
return `${String(n).padStart(2, "0")}-${String(t).padStart(2, "0")}-${e}`;
|
|
459
|
+
}, Uo = () => {
|
|
460
|
+
const { year: e, month: t, day: n } = gn();
|
|
461
|
+
return `${e}-${String(t).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
462
|
+
}, Go = (e, t) => {
|
|
463
|
+
const n = e.length, r = parseInt(e);
|
|
464
|
+
if (!e || isNaN(r)) return t;
|
|
465
|
+
if (n === 4)
|
|
466
|
+
return r >= Le.YEAR_MIN && r <= Le.YEAR_MAX ? r : t;
|
|
467
|
+
if (n > 0 && n < 4) {
|
|
468
|
+
const o = t.toString(), s = 4 - n, i = o.substring(0, s);
|
|
469
|
+
return parseInt(i + e);
|
|
470
|
+
}
|
|
471
|
+
return t;
|
|
472
|
+
}, it = (e) => {
|
|
473
|
+
if (!e?.trim()) return null;
|
|
474
|
+
const n = e.replace(/[^\d-]/g, "").split("-").filter((u) => u !== "");
|
|
475
|
+
if (n.length === 0) return null;
|
|
476
|
+
const { year: r, month: o, day: s } = gn();
|
|
477
|
+
let i, l, c;
|
|
478
|
+
return n.length === 1 ? (i = parseInt(n[0]) || s, l = o, c = r) : n.length === 2 ? (i = parseInt(n[0]) || s, l = parseInt(n[1]) || o, c = r) : (i = parseInt(n[0]) || s, l = parseInt(n[1]) || o, c = Go(n[2], r)), l = Math.max(1, Math.min(Le.MONTH_MAX, l)), i = Math.max(1, Math.min(Le.DAY_MAX, i)), `${c}-${String(l).padStart(2, "0")}-${String(i).padStart(2, "0")}`;
|
|
479
|
+
}, he = (e) => {
|
|
480
|
+
if (!e) return "";
|
|
481
|
+
const [t, n, r] = e.split("-");
|
|
482
|
+
return `${r}-${n}-${t}`;
|
|
483
|
+
}, Xo = (e, t) => {
|
|
484
|
+
if (e[0]?.length > 0) {
|
|
485
|
+
const n = parseInt(e[0]);
|
|
486
|
+
if (isNaN(n) || n === 0 || e[0].length === 2 && n > Le.DAY_MAX)
|
|
487
|
+
return t;
|
|
488
|
+
}
|
|
489
|
+
if (e[1]?.length > 0) {
|
|
490
|
+
const n = parseInt(e[1]);
|
|
491
|
+
if (isNaN(n) || n === 0 || e[1].length === 2 && n > Le.MONTH_MAX)
|
|
492
|
+
return t;
|
|
493
|
+
}
|
|
494
|
+
if (e[2]?.length > 0) {
|
|
495
|
+
const n = parseInt(e[2]), r = e[2].length === 4;
|
|
496
|
+
if (isNaN(n) || n === 0 || r && (n < Le.YEAR_MIN || n > Le.YEAR_MAX))
|
|
497
|
+
return t;
|
|
498
|
+
}
|
|
499
|
+
return null;
|
|
500
|
+
}, at = (e) => {
|
|
501
|
+
let t = e.replace(/[^\d-]/g, "").substring(0, zn);
|
|
502
|
+
if (t.length >= 3 && t[2] !== "-" && (t = t.substring(0, 2) + "-" + t.substring(2).replace(/-/g, "")), t.length >= 6 && t[5] !== "-") {
|
|
503
|
+
const o = t.split("-");
|
|
504
|
+
o.length >= 2 && (t = `${o[0]}-${o[1].substring(0, 2)}-${o[1].substring(2)}${o[2] || ""}`);
|
|
505
|
+
}
|
|
506
|
+
const n = t.split("-");
|
|
507
|
+
return n[0] = n[0]?.substring(0, 2) || "", n[1] = n[1]?.substring(0, 2) || "", n[2] = n[2]?.substring(0, 4) || "", t = n.filter((o) => o !== "").join("-"), t = t.substring(0, zn), Xo(n, e) || t;
|
|
508
|
+
}, qo = y(Pt.Root), Ko = y(Pt.Trigger), Jo = y(Pt.Content), Zo = y(Pt.Positioner);
|
|
509
|
+
function Qo({
|
|
510
|
+
value: e,
|
|
511
|
+
onChange: t,
|
|
512
|
+
disabled: n = !1
|
|
513
|
+
}) {
|
|
514
|
+
const [r = "", o = ""] = e ? e.split("|") : [], [s, i] = Q(() => r && o ? `${he(r)}${V}${he(o)}` : r ? he(r) : ""), [l, c] = Q(!1), u = N(null);
|
|
515
|
+
A(() => {
|
|
516
|
+
const b = (g) => {
|
|
517
|
+
g.ctrlKey && g.key === "d" && !g.shiftKey && !g.metaKey && (g.preventDefault(), u.current?.focus());
|
|
518
|
+
};
|
|
519
|
+
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
520
|
+
}, []);
|
|
521
|
+
const h = (b) => {
|
|
522
|
+
let g = b;
|
|
523
|
+
if (g.includes(V)) {
|
|
524
|
+
const [m, x = ""] = g.split(V);
|
|
525
|
+
g = `${at(m.trim())}${V}${at(
|
|
526
|
+
x.trim()
|
|
527
|
+
)}`;
|
|
528
|
+
} else if (g.toLowerCase().includes(" to ")) {
|
|
529
|
+
const [m, x = ""] = g.split(/\s+to\s+/i);
|
|
530
|
+
g = `${at(m.trim())} to ${at(x.trim())}`;
|
|
531
|
+
} else
|
|
532
|
+
g = at(g);
|
|
533
|
+
i(g);
|
|
534
|
+
}, f = () => {
|
|
535
|
+
const b = s.trim();
|
|
536
|
+
if (!b) {
|
|
537
|
+
t(void 0);
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
if (b.includes(V)) {
|
|
541
|
+
const [g, m = ""] = b.split(V).map((S) => S.trim()), x = it(g), w = m ? it(m) : null;
|
|
542
|
+
if (x && w) {
|
|
543
|
+
const [S, D] = w < x ? [w, x] : [x, w], j = `${he(S)}${V}${he(
|
|
544
|
+
D
|
|
545
|
+
)}`;
|
|
546
|
+
i(j), t(`${S}|${D}`);
|
|
547
|
+
} else if (x && !m)
|
|
548
|
+
i(`${he(x)}${V}`), t(void 0);
|
|
549
|
+
else if (x && m) {
|
|
550
|
+
const S = Uo(), [D, j] = S < x ? [S, x] : [x, S], R = `${he(D)}${V}${he(
|
|
551
|
+
j
|
|
552
|
+
)}`;
|
|
553
|
+
i(R), t(`${D}|${j}`);
|
|
554
|
+
} else
|
|
555
|
+
i(""), t(void 0);
|
|
556
|
+
} else {
|
|
557
|
+
const g = it(b);
|
|
558
|
+
g ? (i(`${he(g)}${V}`), t(void 0)) : (i(""), t(void 0));
|
|
559
|
+
}
|
|
560
|
+
}, v = (b) => {
|
|
561
|
+
if (b.key !== "Enter") return;
|
|
562
|
+
b.preventDefault();
|
|
563
|
+
const g = u.current?.selectionStart || 0, m = s.indexOf(V);
|
|
564
|
+
if (!s.trim()) {
|
|
565
|
+
i(`${Fn()}${V}`);
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
if (m === -1) {
|
|
569
|
+
const w = it(s.trim());
|
|
570
|
+
w && i(`${he(w)}${V}`);
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
if (g <= m + V.length) {
|
|
574
|
+
const w = s.substring(0, m).trim(), S = s.substring(m + V.length), D = it(w);
|
|
575
|
+
D && i(`${he(D)}${V}${S}`);
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
if (s.substring(m + V.length).trim())
|
|
579
|
+
f(), u.current?.blur();
|
|
580
|
+
else {
|
|
581
|
+
const w = s.substring(0, m + V.length) + Fn();
|
|
582
|
+
i(w), setTimeout(() => {
|
|
583
|
+
f(), u.current?.blur();
|
|
584
|
+
}, 0);
|
|
585
|
+
}
|
|
586
|
+
}, d = () => {
|
|
587
|
+
i(""), t(void 0);
|
|
588
|
+
};
|
|
589
|
+
return /* @__PURE__ */ a.jsx(cr, { children: /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsxs(An, { position: "revert", children: [
|
|
590
|
+
/* @__PURE__ */ a.jsxs(
|
|
591
|
+
qo,
|
|
592
|
+
{
|
|
593
|
+
open: l,
|
|
594
|
+
onEscapeKeyDown: () => {
|
|
595
|
+
c(!1);
|
|
596
|
+
},
|
|
597
|
+
children: [
|
|
598
|
+
/* @__PURE__ */ a.jsx(Ko, { asChild: !0, children: /* @__PURE__ */ a.jsx(
|
|
599
|
+
_e,
|
|
600
|
+
{
|
|
601
|
+
size: "sm",
|
|
602
|
+
variant: "ghost",
|
|
603
|
+
"aria-label": "Date range help",
|
|
604
|
+
onClick: () => c((b) => !b),
|
|
605
|
+
children: /* @__PURE__ */ a.jsx(Pn, { size: 16 })
|
|
606
|
+
}
|
|
607
|
+
) }),
|
|
608
|
+
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(Zo, { children: /* @__PURE__ */ a.jsxs(Jo, { p: 4, children: [
|
|
609
|
+
/* @__PURE__ */ a.jsx(to, {}),
|
|
610
|
+
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 4, children: [
|
|
611
|
+
/* @__PURE__ */ a.jsxs(de, { children: [
|
|
612
|
+
/* @__PURE__ */ a.jsx(Pn, { size: 16 }),
|
|
613
|
+
/* @__PURE__ */ a.jsx(U, { fontWeight: "semibold", fontSize: "sm", children: "Date Range Filter" })
|
|
614
|
+
] }),
|
|
615
|
+
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 1, children: [
|
|
616
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", fontWeight: "medium", children: "Format:" }),
|
|
617
|
+
/* @__PURE__ */ a.jsxs(U, { fontSize: "xs", color: "gray.600", children: [
|
|
618
|
+
"DD-MM-YYYY",
|
|
619
|
+
V,
|
|
620
|
+
"DD-MM-YYYY"
|
|
621
|
+
] })
|
|
622
|
+
] }),
|
|
623
|
+
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 1, children: [
|
|
624
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", fontWeight: "medium", children: "Tips:" }),
|
|
625
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: '• "15 to 20" → assumes current month/year' }),
|
|
626
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: "• Leave end blank → up to today" }),
|
|
627
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: "• Dates auto-swapped if reversed" }),
|
|
628
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: "• Press Enter on empty end → fills today" })
|
|
629
|
+
] }),
|
|
630
|
+
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 1, children: [
|
|
631
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", fontWeight: "medium", children: "Shortcut:" }),
|
|
632
|
+
/* @__PURE__ */ a.jsxs(de, { children: [
|
|
633
|
+
/* @__PURE__ */ a.jsx(kn, { children: "Ctrl" }),
|
|
634
|
+
/* @__PURE__ */ a.jsx(U, { children: "+" }),
|
|
635
|
+
/* @__PURE__ */ a.jsx(kn, { children: "D" })
|
|
636
|
+
] })
|
|
637
|
+
] })
|
|
638
|
+
] })
|
|
639
|
+
] }) }) })
|
|
640
|
+
]
|
|
641
|
+
}
|
|
642
|
+
),
|
|
643
|
+
/* @__PURE__ */ a.jsx(
|
|
644
|
+
ur,
|
|
645
|
+
{
|
|
646
|
+
ref: u,
|
|
647
|
+
placeholder: "15-06-2025 to 20-06-2025",
|
|
648
|
+
value: s,
|
|
649
|
+
size: "sm",
|
|
650
|
+
disabled: n,
|
|
651
|
+
onChange: (b) => h(b.target.value),
|
|
652
|
+
onBlur: f,
|
|
653
|
+
onKeyDown: v,
|
|
654
|
+
pr: s ? "10" : void 0,
|
|
655
|
+
w: "100%"
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
s && /* @__PURE__ */ a.jsx(An, { children: /* @__PURE__ */ a.jsx(
|
|
659
|
+
_e,
|
|
660
|
+
{
|
|
661
|
+
size: "sm",
|
|
662
|
+
variant: "ghost",
|
|
663
|
+
"aria-label": "Clear date range",
|
|
664
|
+
onClick: d,
|
|
665
|
+
w: "100%"
|
|
666
|
+
}
|
|
667
|
+
) })
|
|
668
|
+
] }) }) });
|
|
669
|
+
}
|
|
670
|
+
const es = y(Fe.Root), ts = y(Fe.Label), ns = y(Fe.HelperText), rs = y(Fe.ErrorText), Vn = ({
|
|
671
|
+
icon: e,
|
|
672
|
+
value: t,
|
|
673
|
+
onChange: n,
|
|
674
|
+
placeholder: r,
|
|
675
|
+
size: o = "sm",
|
|
676
|
+
variant: s = "outline",
|
|
677
|
+
width: i = "100%",
|
|
678
|
+
label: l,
|
|
679
|
+
helperText: c,
|
|
680
|
+
isDisabled: u = !1,
|
|
681
|
+
required: h = !1,
|
|
682
|
+
errorText: f
|
|
683
|
+
}) => /* @__PURE__ */ a.jsxs(es, { children: [
|
|
684
|
+
l && /* @__PURE__ */ a.jsx(ts, { children: l }),
|
|
685
|
+
/* @__PURE__ */ a.jsx(cr, { startElement: e, children: /* @__PURE__ */ a.jsx(
|
|
686
|
+
ur,
|
|
687
|
+
{
|
|
688
|
+
value: t,
|
|
689
|
+
onChange: (v) => n && n(v.target.value),
|
|
690
|
+
placeholder: r,
|
|
691
|
+
size: o,
|
|
692
|
+
variant: s,
|
|
693
|
+
width: i,
|
|
694
|
+
disabled: u,
|
|
695
|
+
required: h
|
|
696
|
+
}
|
|
697
|
+
) }),
|
|
698
|
+
/* @__PURE__ */ a.jsx(ns, { children: c }),
|
|
699
|
+
f && /* @__PURE__ */ a.jsx(rs, { children: f })
|
|
700
|
+
] }), os = y(Fe.Root), ss = y(Fe.HelperText), is = y(Fe.ErrorText), as = y(z.Root), ls = y(z.Label), cs = y(z.Control), us = y(z.Trigger), ds = y(z.ValueText), fs = y(z.IndicatorGroup), hs = y(z.Indicator), gs = y(z.Content), ps = y(z.Item), vs = y(z.ItemIndicator), bs = y(z.HiddenSelect), ms = y(z.Positioner), xs = ({
|
|
701
|
+
options: e = [],
|
|
702
|
+
label: t,
|
|
703
|
+
value: n,
|
|
704
|
+
onChange: r,
|
|
705
|
+
placeholder: o,
|
|
706
|
+
size: s = "sm",
|
|
707
|
+
width: i = "100%",
|
|
708
|
+
variant: l = "outline",
|
|
709
|
+
helperText: c,
|
|
710
|
+
isDisabled: u,
|
|
711
|
+
required: h,
|
|
712
|
+
errorText: f
|
|
713
|
+
}) => {
|
|
714
|
+
const v = dr({
|
|
715
|
+
items: e
|
|
716
|
+
});
|
|
717
|
+
return /* @__PURE__ */ a.jsxs(os, { disabled: u, required: h, children: [
|
|
718
|
+
/* @__PURE__ */ a.jsxs(
|
|
719
|
+
as,
|
|
720
|
+
{
|
|
721
|
+
collection: v,
|
|
722
|
+
variant: l,
|
|
723
|
+
size: s,
|
|
724
|
+
width: i,
|
|
725
|
+
value: n ? [n] : [],
|
|
726
|
+
onValueChange: (d) => r?.(d.value[0]),
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ a.jsx(bs, {}),
|
|
729
|
+
t && /* @__PURE__ */ a.jsx(ls, { children: t }),
|
|
730
|
+
/* @__PURE__ */ a.jsxs(cs, { children: [
|
|
731
|
+
/* @__PURE__ */ a.jsx(us, { children: /* @__PURE__ */ a.jsx(ds, { placeholder: o }) }),
|
|
732
|
+
/* @__PURE__ */ a.jsx(fs, { children: /* @__PURE__ */ a.jsx(hs, {}) })
|
|
733
|
+
] }),
|
|
734
|
+
/* @__PURE__ */ a.jsx(ms, { children: /* @__PURE__ */ a.jsx(gs, { children: v.items.map((d) => /* @__PURE__ */ a.jsxs(ps, { item: d, children: [
|
|
735
|
+
d.label,
|
|
736
|
+
/* @__PURE__ */ a.jsx(vs, {})
|
|
737
|
+
] }, d.value)) }) })
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
),
|
|
741
|
+
c && /* @__PURE__ */ a.jsx(ss, { children: c }),
|
|
742
|
+
f && /* @__PURE__ */ a.jsx(is, { children: f })
|
|
743
|
+
] });
|
|
744
|
+
}, El = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
745
|
+
__proto__: null
|
|
746
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
747
|
+
var Rt = { exports: {} }, Xt = {}, Dt = { exports: {} }, qt = {};
|
|
748
|
+
var Yn;
|
|
749
|
+
function ys() {
|
|
750
|
+
if (Yn) return qt;
|
|
751
|
+
Yn = 1;
|
|
268
752
|
var e = B;
|
|
269
753
|
function t(f, v) {
|
|
270
754
|
return f === v && (f !== 0 || 1 / f === 1 / v) || f !== f && v !== v;
|
|
@@ -303,9 +787,9 @@ function lo() {
|
|
|
303
787
|
return qt.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : h, qt;
|
|
304
788
|
}
|
|
305
789
|
var Kt = {};
|
|
306
|
-
var
|
|
307
|
-
function
|
|
308
|
-
return
|
|
790
|
+
var Bn;
|
|
791
|
+
function ws() {
|
|
792
|
+
return Bn || (Bn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
309
793
|
function e(d, b) {
|
|
310
794
|
return d === b && (d !== 0 || 1 / d === 1 / b) || d !== d && b !== b;
|
|
311
795
|
}
|
|
@@ -356,15 +840,15 @@ function co() {
|
|
|
356
840
|
Kt.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : v, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
357
841
|
})()), Kt;
|
|
358
842
|
}
|
|
359
|
-
var
|
|
360
|
-
function
|
|
361
|
-
return
|
|
843
|
+
var Hn;
|
|
844
|
+
function hr() {
|
|
845
|
+
return Hn || (Hn = 1, process.env.NODE_ENV === "production" ? Dt.exports = ys() : Dt.exports = ws()), Dt.exports;
|
|
362
846
|
}
|
|
363
|
-
var
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
var e = B, t =
|
|
847
|
+
var Wn;
|
|
848
|
+
function Ss() {
|
|
849
|
+
if (Wn) return Xt;
|
|
850
|
+
Wn = 1;
|
|
851
|
+
var e = B, t = hr();
|
|
368
852
|
function n(u, h) {
|
|
369
853
|
return u === h && (u !== 0 || 1 / u === 1 / h) || u !== u && h !== h;
|
|
370
854
|
}
|
|
@@ -412,14 +896,14 @@ function uo() {
|
|
|
412
896
|
}, Xt;
|
|
413
897
|
}
|
|
414
898
|
var Jt = {};
|
|
415
|
-
var
|
|
416
|
-
function
|
|
417
|
-
return
|
|
899
|
+
var Un;
|
|
900
|
+
function Cs() {
|
|
901
|
+
return Un || (Un = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
418
902
|
function e(u, h) {
|
|
419
903
|
return u === h && (u !== 0 || 1 / u === 1 / h) || u !== u && h !== h;
|
|
420
904
|
}
|
|
421
905
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
422
|
-
var t = B, n =
|
|
906
|
+
var t = B, n = hr(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, s = t.useRef, i = t.useEffect, l = t.useMemo, c = t.useDebugValue;
|
|
423
907
|
Jt.useSyncExternalStoreWithSelector = function(u, h, f, v, d) {
|
|
424
908
|
var b = s(null);
|
|
425
909
|
if (b.current === null) {
|
|
@@ -464,30 +948,30 @@ function fo() {
|
|
|
464
948
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
465
949
|
})()), Jt;
|
|
466
950
|
}
|
|
467
|
-
var
|
|
468
|
-
function
|
|
469
|
-
return
|
|
951
|
+
var Gn;
|
|
952
|
+
function Rs() {
|
|
953
|
+
return Gn || (Gn = 1, process.env.NODE_ENV === "production" ? Rt.exports = Ss() : Rt.exports = Cs()), Rt.exports;
|
|
470
954
|
}
|
|
471
|
-
var
|
|
472
|
-
const an = /* @__PURE__ */ new WeakMap(),
|
|
955
|
+
var Ds = Rs();
|
|
956
|
+
const an = /* @__PURE__ */ new WeakMap(), Es = /* @__PURE__ */ new WeakMap(), At = {
|
|
473
957
|
current: []
|
|
474
958
|
};
|
|
475
959
|
let Zt = !1;
|
|
476
|
-
const Et = /* @__PURE__ */ new Set(),
|
|
477
|
-
function
|
|
960
|
+
const Et = /* @__PURE__ */ new Set(), Xn = /* @__PURE__ */ new Map();
|
|
961
|
+
function gr(e) {
|
|
478
962
|
for (const t of e) {
|
|
479
963
|
if (At.current.includes(t))
|
|
480
964
|
continue;
|
|
481
965
|
At.current.push(t), t.recompute();
|
|
482
|
-
const n =
|
|
966
|
+
const n = Es.get(t);
|
|
483
967
|
if (n)
|
|
484
968
|
for (const r of n) {
|
|
485
969
|
const o = an.get(r);
|
|
486
|
-
o?.length &&
|
|
970
|
+
o?.length && gr(o);
|
|
487
971
|
}
|
|
488
972
|
}
|
|
489
973
|
}
|
|
490
|
-
function
|
|
974
|
+
function js(e) {
|
|
491
975
|
const t = {
|
|
492
976
|
prevVal: e.prevState,
|
|
493
977
|
currentVal: e.state
|
|
@@ -495,7 +979,7 @@ function vo(e) {
|
|
|
495
979
|
for (const n of e.listeners)
|
|
496
980
|
n(t);
|
|
497
981
|
}
|
|
498
|
-
function
|
|
982
|
+
function _s(e) {
|
|
499
983
|
const t = {
|
|
500
984
|
prevVal: e.prevState,
|
|
501
985
|
currentVal: e.state
|
|
@@ -503,35 +987,35 @@ function bo(e) {
|
|
|
503
987
|
for (const n of e.listeners)
|
|
504
988
|
n(t);
|
|
505
989
|
}
|
|
506
|
-
function
|
|
990
|
+
function Os(e) {
|
|
507
991
|
if (Et.add(e), !Zt)
|
|
508
992
|
try {
|
|
509
993
|
for (Zt = !0; Et.size > 0; ) {
|
|
510
994
|
const t = Array.from(Et);
|
|
511
995
|
Et.clear();
|
|
512
996
|
for (const n of t) {
|
|
513
|
-
const r =
|
|
514
|
-
n.prevState = r,
|
|
997
|
+
const r = Xn.get(n) ?? n.prevState;
|
|
998
|
+
n.prevState = r, js(n);
|
|
515
999
|
}
|
|
516
1000
|
for (const n of t) {
|
|
517
1001
|
const r = an.get(n);
|
|
518
|
-
r && (At.current.push(n),
|
|
1002
|
+
r && (At.current.push(n), gr(r));
|
|
519
1003
|
}
|
|
520
1004
|
for (const n of t) {
|
|
521
1005
|
const r = an.get(n);
|
|
522
1006
|
if (r)
|
|
523
1007
|
for (const o of r)
|
|
524
|
-
|
|
1008
|
+
_s(o);
|
|
525
1009
|
}
|
|
526
1010
|
}
|
|
527
1011
|
} finally {
|
|
528
|
-
Zt = !1, At.current = [],
|
|
1012
|
+
Zt = !1, At.current = [], Xn.clear();
|
|
529
1013
|
}
|
|
530
1014
|
}
|
|
531
|
-
function
|
|
1015
|
+
function Ts(e) {
|
|
532
1016
|
return typeof e == "function";
|
|
533
1017
|
}
|
|
534
|
-
class
|
|
1018
|
+
class pr {
|
|
535
1019
|
constructor(t, n) {
|
|
536
1020
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = (r) => {
|
|
537
1021
|
var o, s;
|
|
@@ -544,12 +1028,12 @@ class gr {
|
|
|
544
1028
|
}
|
|
545
1029
|
setState(t) {
|
|
546
1030
|
var n, r, o;
|
|
547
|
-
this.prevState = this.state, (n = this.options) != null && n.updateFn ? this.state = this.options.updateFn(this.prevState)(t) :
|
|
1031
|
+
this.prevState = this.state, (n = this.options) != null && n.updateFn ? this.state = this.options.updateFn(this.prevState)(t) : Ts(t) ? this.state = t(this.prevState) : this.state = t, (o = (r = this.options) == null ? void 0 : r.onUpdate) == null || o.call(r), Os(this);
|
|
548
1032
|
}
|
|
549
1033
|
}
|
|
550
1034
|
function vt(e, t = (r) => r, n = {}) {
|
|
551
|
-
const r = n.equal ??
|
|
552
|
-
return
|
|
1035
|
+
const r = n.equal ?? Is;
|
|
1036
|
+
return Ds.useSyncExternalStoreWithSelector(
|
|
553
1037
|
e.subscribe,
|
|
554
1038
|
() => e.state,
|
|
555
1039
|
() => e.state,
|
|
@@ -557,7 +1041,7 @@ function vt(e, t = (r) => r, n = {}) {
|
|
|
557
1041
|
r
|
|
558
1042
|
);
|
|
559
1043
|
}
|
|
560
|
-
function
|
|
1044
|
+
function Is(e, t) {
|
|
561
1045
|
if (Object.is(e, t))
|
|
562
1046
|
return !0;
|
|
563
1047
|
if (typeof e != "object" || e === null || typeof t != "object" || t === null)
|
|
@@ -576,20 +1060,20 @@ function yo(e, t) {
|
|
|
576
1060
|
}
|
|
577
1061
|
if (e instanceof Date && t instanceof Date)
|
|
578
1062
|
return e.getTime() === t.getTime();
|
|
579
|
-
const n =
|
|
580
|
-
if (n.length !==
|
|
1063
|
+
const n = qn(e);
|
|
1064
|
+
if (n.length !== qn(t).length)
|
|
581
1065
|
return !1;
|
|
582
1066
|
for (let r = 0; r < n.length; r++)
|
|
583
1067
|
if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !Object.is(e[n[r]], t[n[r]]))
|
|
584
1068
|
return !1;
|
|
585
1069
|
return !0;
|
|
586
1070
|
}
|
|
587
|
-
function
|
|
1071
|
+
function qn(e) {
|
|
588
1072
|
return Object.keys(e).concat(
|
|
589
1073
|
Object.getOwnPropertySymbols(e)
|
|
590
1074
|
);
|
|
591
1075
|
}
|
|
592
|
-
function
|
|
1076
|
+
function As() {
|
|
593
1077
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
594
1078
|
t[n] = arguments[n];
|
|
595
1079
|
return M(
|
|
@@ -606,30 +1090,30 @@ function Ke(e) {
|
|
|
606
1090
|
return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
|
|
607
1091
|
t === "[object global]";
|
|
608
1092
|
}
|
|
609
|
-
function
|
|
1093
|
+
function pn(e) {
|
|
610
1094
|
return "nodeType" in e;
|
|
611
1095
|
}
|
|
612
|
-
function
|
|
1096
|
+
function ne(e) {
|
|
613
1097
|
var t, n;
|
|
614
|
-
return e ? Ke(e) ? e :
|
|
1098
|
+
return e ? Ke(e) ? e : pn(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
|
|
615
1099
|
}
|
|
616
|
-
function
|
|
1100
|
+
function vn(e) {
|
|
617
1101
|
const {
|
|
618
1102
|
Document: t
|
|
619
|
-
} =
|
|
1103
|
+
} = ne(e);
|
|
620
1104
|
return e instanceof t;
|
|
621
1105
|
}
|
|
622
1106
|
function bt(e) {
|
|
623
|
-
return Ke(e) ? !1 : e instanceof
|
|
1107
|
+
return Ke(e) ? !1 : e instanceof ne(e).HTMLElement;
|
|
624
1108
|
}
|
|
625
|
-
function
|
|
626
|
-
return e instanceof
|
|
1109
|
+
function vr(e) {
|
|
1110
|
+
return e instanceof ne(e).SVGElement;
|
|
627
1111
|
}
|
|
628
1112
|
function Je(e) {
|
|
629
|
-
return e ? Ke(e) ? e.document :
|
|
1113
|
+
return e ? Ke(e) ? e.document : pn(e) ? vn(e) ? e : bt(e) || vr(e) ? e.ownerDocument : document : document : document;
|
|
630
1114
|
}
|
|
631
1115
|
const we = Ft ? Zr : A;
|
|
632
|
-
function
|
|
1116
|
+
function bn(e) {
|
|
633
1117
|
const t = N(e);
|
|
634
1118
|
return we(() => {
|
|
635
1119
|
t.current = e;
|
|
@@ -639,7 +1123,7 @@ function vn(e) {
|
|
|
639
1123
|
return t.current == null ? void 0 : t.current(...r);
|
|
640
1124
|
}, []);
|
|
641
1125
|
}
|
|
642
|
-
function
|
|
1126
|
+
function ks() {
|
|
643
1127
|
const e = N(null), t = K((r, o) => {
|
|
644
1128
|
e.current = setInterval(r, o);
|
|
645
1129
|
}, []), n = K(() => {
|
|
@@ -666,7 +1150,7 @@ function mt(e, t) {
|
|
|
666
1150
|
);
|
|
667
1151
|
}
|
|
668
1152
|
function kt(e) {
|
|
669
|
-
const t =
|
|
1153
|
+
const t = bn(e), n = N(null), r = K(
|
|
670
1154
|
(o) => {
|
|
671
1155
|
o !== n.current && t?.(o, n.current), n.current = o;
|
|
672
1156
|
},
|
|
@@ -690,7 +1174,7 @@ function xt(e, t) {
|
|
|
690
1174
|
return Qt[e] = n, e + "-" + n;
|
|
691
1175
|
}, [e, t]);
|
|
692
1176
|
}
|
|
693
|
-
function
|
|
1177
|
+
function br(e) {
|
|
694
1178
|
return function(t) {
|
|
695
1179
|
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
|
|
696
1180
|
r[o - 1] = arguments[o];
|
|
@@ -706,28 +1190,28 @@ function vr(e) {
|
|
|
706
1190
|
});
|
|
707
1191
|
};
|
|
708
1192
|
}
|
|
709
|
-
const Xe = /* @__PURE__ */
|
|
710
|
-
function
|
|
1193
|
+
const Xe = /* @__PURE__ */ br(1), Mt = /* @__PURE__ */ br(-1);
|
|
1194
|
+
function Ms(e) {
|
|
711
1195
|
return "clientX" in e && "clientY" in e;
|
|
712
1196
|
}
|
|
713
|
-
function
|
|
1197
|
+
function mn(e) {
|
|
714
1198
|
if (!e)
|
|
715
1199
|
return !1;
|
|
716
1200
|
const {
|
|
717
1201
|
KeyboardEvent: t
|
|
718
|
-
} =
|
|
1202
|
+
} = ne(e.target);
|
|
719
1203
|
return t && e instanceof t;
|
|
720
1204
|
}
|
|
721
|
-
function
|
|
1205
|
+
function Ns(e) {
|
|
722
1206
|
if (!e)
|
|
723
1207
|
return !1;
|
|
724
1208
|
const {
|
|
725
1209
|
TouchEvent: t
|
|
726
|
-
} =
|
|
1210
|
+
} = ne(e.target);
|
|
727
1211
|
return t && e instanceof t;
|
|
728
1212
|
}
|
|
729
1213
|
function cn(e) {
|
|
730
|
-
if (
|
|
1214
|
+
if (Ns(e)) {
|
|
731
1215
|
if (e.touches && e.touches.length) {
|
|
732
1216
|
const {
|
|
733
1217
|
clientX: t,
|
|
@@ -748,7 +1232,7 @@ function cn(e) {
|
|
|
748
1232
|
};
|
|
749
1233
|
}
|
|
750
1234
|
}
|
|
751
|
-
return
|
|
1235
|
+
return Ms(e) ? {
|
|
752
1236
|
x: e.clientX,
|
|
753
1237
|
y: e.clientY
|
|
754
1238
|
} : null;
|
|
@@ -792,24 +1276,24 @@ const qe = /* @__PURE__ */ Object.freeze({
|
|
|
792
1276
|
return t + " " + n + "ms " + r;
|
|
793
1277
|
}
|
|
794
1278
|
}
|
|
795
|
-
}),
|
|
796
|
-
function
|
|
797
|
-
return e.matches(
|
|
1279
|
+
}), Kn = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
1280
|
+
function Ls(e) {
|
|
1281
|
+
return e.matches(Kn) ? e : e.querySelector(Kn);
|
|
798
1282
|
}
|
|
799
|
-
const
|
|
1283
|
+
const $s = {
|
|
800
1284
|
display: "none"
|
|
801
1285
|
};
|
|
802
|
-
function
|
|
1286
|
+
function Ps(e) {
|
|
803
1287
|
let {
|
|
804
1288
|
id: t,
|
|
805
1289
|
value: n
|
|
806
1290
|
} = e;
|
|
807
1291
|
return B.createElement("div", {
|
|
808
1292
|
id: t,
|
|
809
|
-
style:
|
|
1293
|
+
style: $s
|
|
810
1294
|
}, n);
|
|
811
1295
|
}
|
|
812
|
-
function
|
|
1296
|
+
function zs(e) {
|
|
813
1297
|
let {
|
|
814
1298
|
id: t,
|
|
815
1299
|
announcement: n,
|
|
@@ -837,7 +1321,7 @@ function _o(e) {
|
|
|
837
1321
|
"aria-atomic": !0
|
|
838
1322
|
}, n);
|
|
839
1323
|
}
|
|
840
|
-
function
|
|
1324
|
+
function Fs() {
|
|
841
1325
|
const [e, t] = Q("");
|
|
842
1326
|
return {
|
|
843
1327
|
announce: K((r) => {
|
|
@@ -846,16 +1330,16 @@ function Oo() {
|
|
|
846
1330
|
announcement: e
|
|
847
1331
|
};
|
|
848
1332
|
}
|
|
849
|
-
const
|
|
850
|
-
function
|
|
851
|
-
const t = ze(
|
|
1333
|
+
const mr = /* @__PURE__ */ ht(null);
|
|
1334
|
+
function Vs(e) {
|
|
1335
|
+
const t = ze(mr);
|
|
852
1336
|
A(() => {
|
|
853
1337
|
if (!t)
|
|
854
1338
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
855
1339
|
return t(e);
|
|
856
1340
|
}, [e, t]);
|
|
857
1341
|
}
|
|
858
|
-
function
|
|
1342
|
+
function Ys() {
|
|
859
1343
|
const [e] = Q(() => /* @__PURE__ */ new Set()), t = K((r) => (e.add(r), () => e.delete(r)), [e]);
|
|
860
1344
|
return [K((r) => {
|
|
861
1345
|
let {
|
|
@@ -868,13 +1352,13 @@ function Io() {
|
|
|
868
1352
|
});
|
|
869
1353
|
}, [e]), t];
|
|
870
1354
|
}
|
|
871
|
-
const
|
|
1355
|
+
const Bs = {
|
|
872
1356
|
draggable: `
|
|
873
1357
|
To pick up a draggable item, press the space bar.
|
|
874
1358
|
While dragging, use the arrow keys to move the item.
|
|
875
1359
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
876
1360
|
`
|
|
877
|
-
},
|
|
1361
|
+
}, Hs = {
|
|
878
1362
|
onDragStart(e) {
|
|
879
1363
|
let {
|
|
880
1364
|
active: t
|
|
@@ -902,20 +1386,20 @@ const Ao = {
|
|
|
902
1386
|
return "Dragging was cancelled. Draggable item " + t.id + " was dropped.";
|
|
903
1387
|
}
|
|
904
1388
|
};
|
|
905
|
-
function
|
|
1389
|
+
function Ws(e) {
|
|
906
1390
|
let {
|
|
907
|
-
announcements: t =
|
|
1391
|
+
announcements: t = Hs,
|
|
908
1392
|
container: n,
|
|
909
1393
|
hiddenTextDescribedById: r,
|
|
910
|
-
screenReaderInstructions: o =
|
|
1394
|
+
screenReaderInstructions: o = Bs
|
|
911
1395
|
} = e;
|
|
912
1396
|
const {
|
|
913
1397
|
announce: s,
|
|
914
1398
|
announcement: i
|
|
915
|
-
} =
|
|
1399
|
+
} = Fs(), l = xt("DndLiveRegion"), [c, u] = Q(!1);
|
|
916
1400
|
if (A(() => {
|
|
917
1401
|
u(!0);
|
|
918
|
-
}, []),
|
|
1402
|
+
}, []), Vs(M(() => ({
|
|
919
1403
|
onDragStart(f) {
|
|
920
1404
|
let {
|
|
921
1405
|
active: v
|
|
@@ -966,10 +1450,10 @@ function Mo(e) {
|
|
|
966
1450
|
}
|
|
967
1451
|
}), [s, t])), !c)
|
|
968
1452
|
return null;
|
|
969
|
-
const h = B.createElement(B.Fragment, null, B.createElement(
|
|
1453
|
+
const h = B.createElement(B.Fragment, null, B.createElement(Ps, {
|
|
970
1454
|
id: r,
|
|
971
1455
|
value: o.draggable
|
|
972
|
-
}), B.createElement(
|
|
1456
|
+
}), B.createElement(zs, {
|
|
973
1457
|
id: l,
|
|
974
1458
|
announcement: i
|
|
975
1459
|
}));
|
|
@@ -981,7 +1465,7 @@ var Y;
|
|
|
981
1465
|
})(Y || (Y = {}));
|
|
982
1466
|
function Nt() {
|
|
983
1467
|
}
|
|
984
|
-
function
|
|
1468
|
+
function Us(e, t) {
|
|
985
1469
|
return M(
|
|
986
1470
|
() => ({
|
|
987
1471
|
sensor: e,
|
|
@@ -991,7 +1475,7 @@ function No(e, t) {
|
|
|
991
1475
|
[e, t]
|
|
992
1476
|
);
|
|
993
1477
|
}
|
|
994
|
-
function
|
|
1478
|
+
function Gs() {
|
|
995
1479
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
996
1480
|
t[n] = arguments[n];
|
|
997
1481
|
return M(
|
|
@@ -1004,10 +1488,10 @@ const ge = /* @__PURE__ */ Object.freeze({
|
|
|
1004
1488
|
x: 0,
|
|
1005
1489
|
y: 0
|
|
1006
1490
|
});
|
|
1007
|
-
function
|
|
1491
|
+
function Xs(e, t) {
|
|
1008
1492
|
return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
|
|
1009
1493
|
}
|
|
1010
|
-
function
|
|
1494
|
+
function qs(e, t) {
|
|
1011
1495
|
let {
|
|
1012
1496
|
data: {
|
|
1013
1497
|
value: n
|
|
@@ -1019,7 +1503,7 @@ function Po(e, t) {
|
|
|
1019
1503
|
} = t;
|
|
1020
1504
|
return n - r;
|
|
1021
1505
|
}
|
|
1022
|
-
function
|
|
1506
|
+
function Ks(e, t) {
|
|
1023
1507
|
let {
|
|
1024
1508
|
data: {
|
|
1025
1509
|
value: n
|
|
@@ -1031,31 +1515,31 @@ function zo(e, t) {
|
|
|
1031
1515
|
} = t;
|
|
1032
1516
|
return r - n;
|
|
1033
1517
|
}
|
|
1034
|
-
function
|
|
1518
|
+
function Js(e, t) {
|
|
1035
1519
|
if (!e || e.length === 0)
|
|
1036
1520
|
return null;
|
|
1037
1521
|
const [n] = e;
|
|
1038
1522
|
return n[t];
|
|
1039
1523
|
}
|
|
1040
|
-
function
|
|
1524
|
+
function Jn(e, t, n) {
|
|
1041
1525
|
return t === void 0 && (t = e.left), n === void 0 && (n = e.top), {
|
|
1042
1526
|
x: t + e.width * 0.5,
|
|
1043
1527
|
y: n + e.height * 0.5
|
|
1044
1528
|
};
|
|
1045
1529
|
}
|
|
1046
|
-
const
|
|
1530
|
+
const xr = (e) => {
|
|
1047
1531
|
let {
|
|
1048
1532
|
collisionRect: t,
|
|
1049
1533
|
droppableRects: n,
|
|
1050
1534
|
droppableContainers: r
|
|
1051
1535
|
} = e;
|
|
1052
|
-
const o =
|
|
1536
|
+
const o = Jn(t, t.left, t.top), s = [];
|
|
1053
1537
|
for (const i of r) {
|
|
1054
1538
|
const {
|
|
1055
1539
|
id: l
|
|
1056
1540
|
} = i, c = n.get(l);
|
|
1057
1541
|
if (c) {
|
|
1058
|
-
const u =
|
|
1542
|
+
const u = Xs(Jn(c), o);
|
|
1059
1543
|
s.push({
|
|
1060
1544
|
id: l,
|
|
1061
1545
|
data: {
|
|
@@ -1065,9 +1549,9 @@ const mr = (e) => {
|
|
|
1065
1549
|
});
|
|
1066
1550
|
}
|
|
1067
1551
|
}
|
|
1068
|
-
return s.sort(
|
|
1552
|
+
return s.sort(qs);
|
|
1069
1553
|
};
|
|
1070
|
-
function
|
|
1554
|
+
function Zs(e, t) {
|
|
1071
1555
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), s = Math.min(t.top + t.height, e.top + e.height), i = o - r, l = s - n;
|
|
1072
1556
|
if (r < o && n < s) {
|
|
1073
1557
|
const c = t.width * t.height, u = e.width * e.height, h = i * l, f = h / (c + u - h);
|
|
@@ -1075,7 +1559,7 @@ function Vo(e, t) {
|
|
|
1075
1559
|
}
|
|
1076
1560
|
return 0;
|
|
1077
1561
|
}
|
|
1078
|
-
const
|
|
1562
|
+
const Qs = (e) => {
|
|
1079
1563
|
let {
|
|
1080
1564
|
collisionRect: t,
|
|
1081
1565
|
droppableRects: n,
|
|
@@ -1087,7 +1571,7 @@ const Yo = (e) => {
|
|
|
1087
1571
|
id: i
|
|
1088
1572
|
} = s, l = n.get(i);
|
|
1089
1573
|
if (l) {
|
|
1090
|
-
const c =
|
|
1574
|
+
const c = Zs(l, t);
|
|
1091
1575
|
c > 0 && o.push({
|
|
1092
1576
|
id: i,
|
|
1093
1577
|
data: {
|
|
@@ -1097,22 +1581,22 @@ const Yo = (e) => {
|
|
|
1097
1581
|
});
|
|
1098
1582
|
}
|
|
1099
1583
|
}
|
|
1100
|
-
return o.sort(
|
|
1584
|
+
return o.sort(Ks);
|
|
1101
1585
|
};
|
|
1102
|
-
function
|
|
1586
|
+
function ei(e, t, n) {
|
|
1103
1587
|
return {
|
|
1104
1588
|
...e,
|
|
1105
1589
|
scaleX: t && n ? t.width / n.width : 1,
|
|
1106
1590
|
scaleY: t && n ? t.height / n.height : 1
|
|
1107
1591
|
};
|
|
1108
1592
|
}
|
|
1109
|
-
function
|
|
1593
|
+
function yr(e, t) {
|
|
1110
1594
|
return e && t ? {
|
|
1111
1595
|
x: e.left - t.left,
|
|
1112
1596
|
y: e.top - t.top
|
|
1113
1597
|
} : ge;
|
|
1114
1598
|
}
|
|
1115
|
-
function
|
|
1599
|
+
function ti(e) {
|
|
1116
1600
|
return function(n) {
|
|
1117
1601
|
for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
|
|
1118
1602
|
o[s - 1] = arguments[s];
|
|
@@ -1127,8 +1611,8 @@ function Ho(e) {
|
|
|
1127
1611
|
});
|
|
1128
1612
|
};
|
|
1129
1613
|
}
|
|
1130
|
-
const
|
|
1131
|
-
function
|
|
1614
|
+
const ni = /* @__PURE__ */ ti(1);
|
|
1615
|
+
function ri(e) {
|
|
1132
1616
|
if (e.startsWith("matrix3d(")) {
|
|
1133
1617
|
const t = e.slice(9, -1).split(/, /);
|
|
1134
1618
|
return {
|
|
@@ -1148,8 +1632,8 @@ function Uo(e) {
|
|
|
1148
1632
|
}
|
|
1149
1633
|
return null;
|
|
1150
1634
|
}
|
|
1151
|
-
function
|
|
1152
|
-
const r =
|
|
1635
|
+
function oi(e, t, n) {
|
|
1636
|
+
const r = ri(t);
|
|
1153
1637
|
if (!r)
|
|
1154
1638
|
return e;
|
|
1155
1639
|
const {
|
|
@@ -1167,18 +1651,18 @@ function Go(e, t, n) {
|
|
|
1167
1651
|
left: c
|
|
1168
1652
|
};
|
|
1169
1653
|
}
|
|
1170
|
-
const
|
|
1654
|
+
const si = {
|
|
1171
1655
|
ignoreTransform: !1
|
|
1172
1656
|
};
|
|
1173
1657
|
function Ze(e, t) {
|
|
1174
|
-
t === void 0 && (t =
|
|
1658
|
+
t === void 0 && (t = si);
|
|
1175
1659
|
let n = e.getBoundingClientRect();
|
|
1176
1660
|
if (t.ignoreTransform) {
|
|
1177
1661
|
const {
|
|
1178
1662
|
transform: u,
|
|
1179
1663
|
transformOrigin: h
|
|
1180
|
-
} =
|
|
1181
|
-
u && (n =
|
|
1664
|
+
} = ne(e).getComputedStyle(e);
|
|
1665
|
+
u && (n = oi(n, u, h));
|
|
1182
1666
|
}
|
|
1183
1667
|
const {
|
|
1184
1668
|
top: r,
|
|
@@ -1197,12 +1681,12 @@ function Ze(e, t) {
|
|
|
1197
1681
|
right: c
|
|
1198
1682
|
};
|
|
1199
1683
|
}
|
|
1200
|
-
function
|
|
1684
|
+
function Zn(e) {
|
|
1201
1685
|
return Ze(e, {
|
|
1202
1686
|
ignoreTransform: !0
|
|
1203
1687
|
});
|
|
1204
1688
|
}
|
|
1205
|
-
function
|
|
1689
|
+
function ii(e) {
|
|
1206
1690
|
const t = e.innerWidth, n = e.innerHeight;
|
|
1207
1691
|
return {
|
|
1208
1692
|
top: 0,
|
|
@@ -1213,62 +1697,62 @@ function qo(e) {
|
|
|
1213
1697
|
height: n
|
|
1214
1698
|
};
|
|
1215
1699
|
}
|
|
1216
|
-
function
|
|
1217
|
-
return t === void 0 && (t =
|
|
1700
|
+
function ai(e, t) {
|
|
1701
|
+
return t === void 0 && (t = ne(e).getComputedStyle(e)), t.position === "fixed";
|
|
1218
1702
|
}
|
|
1219
|
-
function
|
|
1220
|
-
t === void 0 && (t =
|
|
1703
|
+
function li(e, t) {
|
|
1704
|
+
t === void 0 && (t = ne(e).getComputedStyle(e));
|
|
1221
1705
|
const n = /(auto|scroll|overlay)/;
|
|
1222
1706
|
return ["overflow", "overflowX", "overflowY"].some((o) => {
|
|
1223
1707
|
const s = t[o];
|
|
1224
1708
|
return typeof s == "string" ? n.test(s) : !1;
|
|
1225
1709
|
});
|
|
1226
1710
|
}
|
|
1227
|
-
function
|
|
1711
|
+
function xn(e, t) {
|
|
1228
1712
|
const n = [];
|
|
1229
1713
|
function r(o) {
|
|
1230
1714
|
if (t != null && n.length >= t || !o)
|
|
1231
1715
|
return n;
|
|
1232
|
-
if (
|
|
1716
|
+
if (vn(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
|
|
1233
1717
|
return n.push(o.scrollingElement), n;
|
|
1234
|
-
if (!bt(o) ||
|
|
1718
|
+
if (!bt(o) || vr(o) || n.includes(o))
|
|
1235
1719
|
return n;
|
|
1236
|
-
const s =
|
|
1237
|
-
return o !== e &&
|
|
1720
|
+
const s = ne(e).getComputedStyle(o);
|
|
1721
|
+
return o !== e && li(o, s) && n.push(o), ai(o, s) ? n : r(o.parentNode);
|
|
1238
1722
|
}
|
|
1239
1723
|
return e ? r(e) : n;
|
|
1240
1724
|
}
|
|
1241
|
-
function
|
|
1242
|
-
const [t] =
|
|
1725
|
+
function wr(e) {
|
|
1726
|
+
const [t] = xn(e, 1);
|
|
1243
1727
|
return t ?? null;
|
|
1244
1728
|
}
|
|
1245
1729
|
function en(e) {
|
|
1246
|
-
return !Ft || !e ? null : Ke(e) ? e :
|
|
1730
|
+
return !Ft || !e ? null : Ke(e) ? e : pn(e) ? vn(e) || e === Je(e).scrollingElement ? window : bt(e) ? e : null : null;
|
|
1247
1731
|
}
|
|
1248
|
-
function
|
|
1732
|
+
function Sr(e) {
|
|
1249
1733
|
return Ke(e) ? e.scrollX : e.scrollLeft;
|
|
1250
1734
|
}
|
|
1251
|
-
function
|
|
1735
|
+
function Cr(e) {
|
|
1252
1736
|
return Ke(e) ? e.scrollY : e.scrollTop;
|
|
1253
1737
|
}
|
|
1254
1738
|
function un(e) {
|
|
1255
1739
|
return {
|
|
1256
|
-
x:
|
|
1257
|
-
y:
|
|
1740
|
+
x: Sr(e),
|
|
1741
|
+
y: Cr(e)
|
|
1258
1742
|
};
|
|
1259
1743
|
}
|
|
1260
1744
|
var H;
|
|
1261
1745
|
(function(e) {
|
|
1262
1746
|
e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
|
|
1263
1747
|
})(H || (H = {}));
|
|
1264
|
-
function
|
|
1748
|
+
function Rr(e) {
|
|
1265
1749
|
return !Ft || !e ? !1 : e === document.scrollingElement;
|
|
1266
1750
|
}
|
|
1267
|
-
function
|
|
1751
|
+
function Dr(e) {
|
|
1268
1752
|
const t = {
|
|
1269
1753
|
x: 0,
|
|
1270
1754
|
y: 0
|
|
1271
|
-
}, n =
|
|
1755
|
+
}, n = Rr(e) ? {
|
|
1272
1756
|
height: window.innerHeight,
|
|
1273
1757
|
width: window.innerWidth
|
|
1274
1758
|
} : {
|
|
@@ -1287,24 +1771,24 @@ function Rr(e) {
|
|
|
1287
1771
|
minScroll: t
|
|
1288
1772
|
};
|
|
1289
1773
|
}
|
|
1290
|
-
const
|
|
1774
|
+
const ci = {
|
|
1291
1775
|
x: 0.2,
|
|
1292
1776
|
y: 0.2
|
|
1293
1777
|
};
|
|
1294
|
-
function
|
|
1778
|
+
function ui(e, t, n, r, o) {
|
|
1295
1779
|
let {
|
|
1296
1780
|
top: s,
|
|
1297
1781
|
left: i,
|
|
1298
1782
|
right: l,
|
|
1299
1783
|
bottom: c
|
|
1300
1784
|
} = n;
|
|
1301
|
-
r === void 0 && (r = 10), o === void 0 && (o =
|
|
1785
|
+
r === void 0 && (r = 10), o === void 0 && (o = ci);
|
|
1302
1786
|
const {
|
|
1303
1787
|
isTop: u,
|
|
1304
1788
|
isBottom: h,
|
|
1305
1789
|
isLeft: f,
|
|
1306
1790
|
isRight: v
|
|
1307
|
-
} =
|
|
1791
|
+
} = Dr(e), d = {
|
|
1308
1792
|
x: 0,
|
|
1309
1793
|
y: 0
|
|
1310
1794
|
}, b = {
|
|
@@ -1319,7 +1803,7 @@ function Qo(e, t, n, r, o) {
|
|
|
1319
1803
|
speed: b
|
|
1320
1804
|
};
|
|
1321
1805
|
}
|
|
1322
|
-
function
|
|
1806
|
+
function di(e) {
|
|
1323
1807
|
if (e === document.scrollingElement) {
|
|
1324
1808
|
const {
|
|
1325
1809
|
innerWidth: s,
|
|
@@ -1349,16 +1833,16 @@ function es(e) {
|
|
|
1349
1833
|
height: e.clientHeight
|
|
1350
1834
|
};
|
|
1351
1835
|
}
|
|
1352
|
-
function
|
|
1836
|
+
function Er(e) {
|
|
1353
1837
|
return e.reduce((t, n) => Xe(t, un(n)), ge);
|
|
1354
1838
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return e.reduce((t, n) => t + wr(n), 0);
|
|
1357
|
-
}
|
|
1358
|
-
function ns(e) {
|
|
1839
|
+
function fi(e) {
|
|
1359
1840
|
return e.reduce((t, n) => t + Sr(n), 0);
|
|
1360
1841
|
}
|
|
1361
|
-
function
|
|
1842
|
+
function hi(e) {
|
|
1843
|
+
return e.reduce((t, n) => t + Cr(n), 0);
|
|
1844
|
+
}
|
|
1845
|
+
function gi(e, t) {
|
|
1362
1846
|
if (t === void 0 && (t = Ze), !e)
|
|
1363
1847
|
return;
|
|
1364
1848
|
const {
|
|
@@ -1367,20 +1851,20 @@ function rs(e, t) {
|
|
|
1367
1851
|
bottom: o,
|
|
1368
1852
|
right: s
|
|
1369
1853
|
} = t(e);
|
|
1370
|
-
|
|
1854
|
+
wr(e) && (o <= 0 || s <= 0 || n >= window.innerHeight || r >= window.innerWidth) && e.scrollIntoView({
|
|
1371
1855
|
block: "center",
|
|
1372
1856
|
inline: "center"
|
|
1373
1857
|
});
|
|
1374
1858
|
}
|
|
1375
|
-
const
|
|
1376
|
-
class
|
|
1859
|
+
const pi = [["x", ["left", "right"], fi], ["y", ["top", "bottom"], hi]];
|
|
1860
|
+
class yn {
|
|
1377
1861
|
constructor(t, n) {
|
|
1378
1862
|
this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
|
|
1379
|
-
const r =
|
|
1863
|
+
const r = xn(n), o = Er(r);
|
|
1380
1864
|
this.rect = {
|
|
1381
1865
|
...t
|
|
1382
1866
|
}, this.width = t.width, this.height = t.height;
|
|
1383
|
-
for (const [s, i, l] of
|
|
1867
|
+
for (const [s, i, l] of pi)
|
|
1384
1868
|
for (const c of i)
|
|
1385
1869
|
Object.defineProperty(this, c, {
|
|
1386
1870
|
get: () => {
|
|
@@ -1408,10 +1892,10 @@ class lt {
|
|
|
1408
1892
|
(o = this.target) == null || o.addEventListener(t, n, r), this.listeners.push([t, n, r]);
|
|
1409
1893
|
}
|
|
1410
1894
|
}
|
|
1411
|
-
function
|
|
1895
|
+
function vi(e) {
|
|
1412
1896
|
const {
|
|
1413
1897
|
EventTarget: t
|
|
1414
|
-
} =
|
|
1898
|
+
} = ne(e);
|
|
1415
1899
|
return e instanceof t ? e : Je(e);
|
|
1416
1900
|
}
|
|
1417
1901
|
function tn(e, t) {
|
|
@@ -1422,21 +1906,21 @@ var ue;
|
|
|
1422
1906
|
(function(e) {
|
|
1423
1907
|
e.Click = "click", e.DragStart = "dragstart", e.Keydown = "keydown", e.ContextMenu = "contextmenu", e.Resize = "resize", e.SelectionChange = "selectionchange", e.VisibilityChange = "visibilitychange";
|
|
1424
1908
|
})(ue || (ue = {}));
|
|
1425
|
-
function
|
|
1909
|
+
function Qn(e) {
|
|
1426
1910
|
e.preventDefault();
|
|
1427
1911
|
}
|
|
1428
|
-
function
|
|
1912
|
+
function bi(e) {
|
|
1429
1913
|
e.stopPropagation();
|
|
1430
1914
|
}
|
|
1431
1915
|
var T;
|
|
1432
1916
|
(function(e) {
|
|
1433
1917
|
e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
|
|
1434
1918
|
})(T || (T = {}));
|
|
1435
|
-
const
|
|
1919
|
+
const jr = {
|
|
1436
1920
|
start: [T.Space, T.Enter],
|
|
1437
1921
|
cancel: [T.Esc],
|
|
1438
1922
|
end: [T.Space, T.Enter, T.Tab]
|
|
1439
|
-
},
|
|
1923
|
+
}, mi = (e, t) => {
|
|
1440
1924
|
let {
|
|
1441
1925
|
currentCoordinates: n
|
|
1442
1926
|
} = t;
|
|
@@ -1463,7 +1947,7 @@ const Er = {
|
|
|
1463
1947
|
};
|
|
1464
1948
|
}
|
|
1465
1949
|
};
|
|
1466
|
-
class
|
|
1950
|
+
class _r {
|
|
1467
1951
|
constructor(t) {
|
|
1468
1952
|
this.props = void 0, this.autoScrollEnabled = !1, this.referenceCoordinates = void 0, this.listeners = void 0, this.windowListeners = void 0, this.props = t;
|
|
1469
1953
|
const {
|
|
@@ -1471,7 +1955,7 @@ class jr {
|
|
|
1471
1955
|
target: n
|
|
1472
1956
|
}
|
|
1473
1957
|
} = t;
|
|
1474
|
-
this.props = t, this.listeners = new lt(Je(n)), this.windowListeners = new lt(
|
|
1958
|
+
this.props = t, this.listeners = new lt(Je(n)), this.windowListeners = new lt(ne(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
1475
1959
|
}
|
|
1476
1960
|
attach() {
|
|
1477
1961
|
this.handleStart(), this.windowListeners.add(ue.Resize, this.handleCancel), this.windowListeners.add(ue.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(ue.Keydown, this.handleKeyDown));
|
|
@@ -1481,17 +1965,17 @@ class jr {
|
|
|
1481
1965
|
activeNode: t,
|
|
1482
1966
|
onStart: n
|
|
1483
1967
|
} = this.props, r = t.node.current;
|
|
1484
|
-
r &&
|
|
1968
|
+
r && gi(r), n(ge);
|
|
1485
1969
|
}
|
|
1486
1970
|
handleKeyDown(t) {
|
|
1487
|
-
if (
|
|
1971
|
+
if (mn(t)) {
|
|
1488
1972
|
const {
|
|
1489
1973
|
active: n,
|
|
1490
1974
|
context: r,
|
|
1491
1975
|
options: o
|
|
1492
1976
|
} = this.props, {
|
|
1493
|
-
keyboardCodes: s =
|
|
1494
|
-
coordinateGetter: i =
|
|
1977
|
+
keyboardCodes: s = jr,
|
|
1978
|
+
coordinateGetter: i = mi,
|
|
1495
1979
|
scrollBehavior: l = "smooth"
|
|
1496
1980
|
} = o, {
|
|
1497
1981
|
code: c
|
|
@@ -1531,7 +2015,7 @@ class jr {
|
|
|
1531
2015
|
isBottom: D,
|
|
1532
2016
|
maxScroll: j,
|
|
1533
2017
|
minScroll: R
|
|
1534
|
-
} =
|
|
2018
|
+
} = Dr(g), E = di(g), _ = {
|
|
1535
2019
|
x: Math.min(m === T.Right ? E.right - E.width / 2 : E.right, Math.max(m === T.Right ? E.left : E.left + E.width / 2, f.x)),
|
|
1536
2020
|
y: Math.min(m === T.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(m === T.Down ? E.top : E.top + E.height / 2, f.y))
|
|
1537
2021
|
}, $ = m === T.Right && !w || m === T.Left && !S, F = m === T.Down && !D || m === T.Up && !x;
|
|
@@ -1591,11 +2075,11 @@ class jr {
|
|
|
1591
2075
|
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
1592
2076
|
}
|
|
1593
2077
|
}
|
|
1594
|
-
|
|
2078
|
+
_r.activators = [{
|
|
1595
2079
|
eventName: "onKeyDown",
|
|
1596
2080
|
handler: (e, t, n) => {
|
|
1597
2081
|
let {
|
|
1598
|
-
keyboardCodes: r =
|
|
2082
|
+
keyboardCodes: r = jr,
|
|
1599
2083
|
onActivation: o
|
|
1600
2084
|
} = t, {
|
|
1601
2085
|
active: s
|
|
@@ -1612,22 +2096,22 @@ jr.activators = [{
|
|
|
1612
2096
|
return !1;
|
|
1613
2097
|
}
|
|
1614
2098
|
}];
|
|
1615
|
-
function
|
|
2099
|
+
function er(e) {
|
|
1616
2100
|
return !!(e && "distance" in e);
|
|
1617
2101
|
}
|
|
1618
|
-
function
|
|
2102
|
+
function tr(e) {
|
|
1619
2103
|
return !!(e && "delay" in e);
|
|
1620
2104
|
}
|
|
1621
|
-
class
|
|
2105
|
+
class wn {
|
|
1622
2106
|
constructor(t, n, r) {
|
|
1623
2107
|
var o;
|
|
1624
|
-
r === void 0 && (r =
|
|
2108
|
+
r === void 0 && (r = vi(t.event.target)), this.props = void 0, this.events = void 0, this.autoScrollEnabled = !0, this.document = void 0, this.activated = !1, this.initialCoordinates = void 0, this.timeoutId = null, this.listeners = void 0, this.documentListeners = void 0, this.windowListeners = void 0, this.props = t, this.events = n;
|
|
1625
2109
|
const {
|
|
1626
2110
|
event: s
|
|
1627
2111
|
} = t, {
|
|
1628
2112
|
target: i
|
|
1629
2113
|
} = s;
|
|
1630
|
-
this.props = t, this.events = n, this.document = Je(i), this.documentListeners = new lt(this.document), this.listeners = new lt(r), this.windowListeners = new lt(
|
|
2114
|
+
this.props = t, this.events = n, this.document = Je(i), this.documentListeners = new lt(this.document), this.listeners = new lt(r), this.windowListeners = new lt(ne(i)), this.initialCoordinates = (o = cn(s)) != null ? o : ge, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
1631
2115
|
}
|
|
1632
2116
|
attach() {
|
|
1633
2117
|
const {
|
|
@@ -1641,18 +2125,18 @@ class yn {
|
|
|
1641
2125
|
} = this;
|
|
1642
2126
|
if (this.listeners.add(t.move.name, this.handleMove, {
|
|
1643
2127
|
passive: !1
|
|
1644
|
-
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(ue.Resize, this.handleCancel), this.windowListeners.add(ue.DragStart,
|
|
2128
|
+
}), this.listeners.add(t.end.name, this.handleEnd), t.cancel && this.listeners.add(t.cancel.name, this.handleCancel), this.windowListeners.add(ue.Resize, this.handleCancel), this.windowListeners.add(ue.DragStart, Qn), this.windowListeners.add(ue.VisibilityChange, this.handleCancel), this.windowListeners.add(ue.ContextMenu, Qn), this.documentListeners.add(ue.Keydown, this.handleKeydown), n) {
|
|
1645
2129
|
if (r != null && r({
|
|
1646
2130
|
event: this.props.event,
|
|
1647
2131
|
activeNode: this.props.activeNode,
|
|
1648
2132
|
options: this.props.options
|
|
1649
2133
|
}))
|
|
1650
2134
|
return this.handleStart();
|
|
1651
|
-
if (
|
|
2135
|
+
if (tr(n)) {
|
|
1652
2136
|
this.timeoutId = setTimeout(this.handleStart, n.delay), this.handlePending(n);
|
|
1653
2137
|
return;
|
|
1654
2138
|
}
|
|
1655
|
-
if (
|
|
2139
|
+
if (er(n)) {
|
|
1656
2140
|
this.handlePending(n);
|
|
1657
2141
|
return;
|
|
1658
2142
|
}
|
|
@@ -1675,7 +2159,7 @@ class yn {
|
|
|
1675
2159
|
} = this, {
|
|
1676
2160
|
onStart: n
|
|
1677
2161
|
} = this.props;
|
|
1678
|
-
t && (this.activated = !0, this.documentListeners.add(ue.Click,
|
|
2162
|
+
t && (this.activated = !0, this.documentListeners.add(ue.Click, bi, {
|
|
1679
2163
|
capture: !0
|
|
1680
2164
|
}), this.removeTextSelection(), this.documentListeners.add(ue.SelectionChange, this.removeTextSelection), n(t));
|
|
1681
2165
|
}
|
|
@@ -1695,13 +2179,13 @@ class yn {
|
|
|
1695
2179
|
return;
|
|
1696
2180
|
const c = (n = cn(t)) != null ? n : ge, u = Mt(o, c);
|
|
1697
2181
|
if (!r && l) {
|
|
1698
|
-
if (
|
|
2182
|
+
if (er(l)) {
|
|
1699
2183
|
if (l.tolerance != null && tn(u, l.tolerance))
|
|
1700
2184
|
return this.handleCancel();
|
|
1701
2185
|
if (tn(u, l.distance))
|
|
1702
2186
|
return this.handleStart();
|
|
1703
2187
|
}
|
|
1704
|
-
if (
|
|
2188
|
+
if (tr(l) && tn(u, l.tolerance))
|
|
1705
2189
|
return this.handleCancel();
|
|
1706
2190
|
this.handlePending(l, u);
|
|
1707
2191
|
return;
|
|
@@ -1730,7 +2214,7 @@ class yn {
|
|
|
1730
2214
|
(t = this.document.getSelection()) == null || t.removeAllRanges();
|
|
1731
2215
|
}
|
|
1732
2216
|
}
|
|
1733
|
-
const
|
|
2217
|
+
const xi = {
|
|
1734
2218
|
cancel: {
|
|
1735
2219
|
name: "pointercancel"
|
|
1736
2220
|
},
|
|
@@ -1741,15 +2225,15 @@ const ls = {
|
|
|
1741
2225
|
name: "pointerup"
|
|
1742
2226
|
}
|
|
1743
2227
|
};
|
|
1744
|
-
class
|
|
2228
|
+
class Sn extends wn {
|
|
1745
2229
|
constructor(t) {
|
|
1746
2230
|
const {
|
|
1747
2231
|
event: n
|
|
1748
2232
|
} = t, r = Je(n.target);
|
|
1749
|
-
super(t,
|
|
2233
|
+
super(t, xi, r);
|
|
1750
2234
|
}
|
|
1751
2235
|
}
|
|
1752
|
-
|
|
2236
|
+
Sn.activators = [{
|
|
1753
2237
|
eventName: "onPointerDown",
|
|
1754
2238
|
handler: (e, t) => {
|
|
1755
2239
|
let {
|
|
@@ -1762,7 +2246,7 @@ wn.activators = [{
|
|
|
1762
2246
|
}), !0);
|
|
1763
2247
|
}
|
|
1764
2248
|
}];
|
|
1765
|
-
const
|
|
2249
|
+
const yi = {
|
|
1766
2250
|
move: {
|
|
1767
2251
|
name: "mousemove"
|
|
1768
2252
|
},
|
|
@@ -1774,12 +2258,12 @@ var dn;
|
|
|
1774
2258
|
(function(e) {
|
|
1775
2259
|
e[e.RightClick = 2] = "RightClick";
|
|
1776
2260
|
})(dn || (dn = {}));
|
|
1777
|
-
class
|
|
2261
|
+
class wi extends wn {
|
|
1778
2262
|
constructor(t) {
|
|
1779
|
-
super(t,
|
|
2263
|
+
super(t, yi, Je(t.event.target));
|
|
1780
2264
|
}
|
|
1781
2265
|
}
|
|
1782
|
-
|
|
2266
|
+
wi.activators = [{
|
|
1783
2267
|
eventName: "onMouseDown",
|
|
1784
2268
|
handler: (e, t) => {
|
|
1785
2269
|
let {
|
|
@@ -1803,7 +2287,7 @@ const nn = {
|
|
|
1803
2287
|
name: "touchend"
|
|
1804
2288
|
}
|
|
1805
2289
|
};
|
|
1806
|
-
class
|
|
2290
|
+
class Si extends wn {
|
|
1807
2291
|
constructor(t) {
|
|
1808
2292
|
super(t, nn);
|
|
1809
2293
|
}
|
|
@@ -1818,7 +2302,7 @@ class ds extends yn {
|
|
|
1818
2302
|
}
|
|
1819
2303
|
}
|
|
1820
2304
|
}
|
|
1821
|
-
|
|
2305
|
+
Si.activators = [{
|
|
1822
2306
|
eventName: "onTouchStart",
|
|
1823
2307
|
handler: (e, t) => {
|
|
1824
2308
|
let {
|
|
@@ -1842,7 +2326,7 @@ var Lt;
|
|
|
1842
2326
|
(function(e) {
|
|
1843
2327
|
e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
1844
2328
|
})(Lt || (Lt = {}));
|
|
1845
|
-
function
|
|
2329
|
+
function Ci(e) {
|
|
1846
2330
|
let {
|
|
1847
2331
|
acceleration: t,
|
|
1848
2332
|
activator: n = ct.Pointer,
|
|
@@ -1857,10 +2341,10 @@ function fs(e) {
|
|
|
1857
2341
|
delta: f,
|
|
1858
2342
|
threshold: v
|
|
1859
2343
|
} = e;
|
|
1860
|
-
const d =
|
|
2344
|
+
const d = Di({
|
|
1861
2345
|
delta: f,
|
|
1862
2346
|
disabled: !s
|
|
1863
|
-
}), [b, g] =
|
|
2347
|
+
}), [b, g] = ks(), m = N({
|
|
1864
2348
|
x: 0,
|
|
1865
2349
|
y: 0
|
|
1866
2350
|
}), x = N({
|
|
@@ -1900,7 +2384,7 @@ function fs(e) {
|
|
|
1900
2384
|
const {
|
|
1901
2385
|
direction: $,
|
|
1902
2386
|
speed: F
|
|
1903
|
-
} =
|
|
2387
|
+
} = ui(R, _, w, t, v);
|
|
1904
2388
|
for (const L of ["x", "y"])
|
|
1905
2389
|
d[L][$[L]] || (F[L] = 0, $[L] = 0);
|
|
1906
2390
|
if (F.x > 0 || F.y > 0) {
|
|
@@ -1937,7 +2421,7 @@ function fs(e) {
|
|
|
1937
2421
|
]
|
|
1938
2422
|
);
|
|
1939
2423
|
}
|
|
1940
|
-
const
|
|
2424
|
+
const Ri = {
|
|
1941
2425
|
x: {
|
|
1942
2426
|
[H.Backward]: !1,
|
|
1943
2427
|
[H.Forward]: !1
|
|
@@ -1947,7 +2431,7 @@ const hs = {
|
|
|
1947
2431
|
[H.Forward]: !1
|
|
1948
2432
|
}
|
|
1949
2433
|
};
|
|
1950
|
-
function
|
|
2434
|
+
function Di(e) {
|
|
1951
2435
|
let {
|
|
1952
2436
|
delta: t,
|
|
1953
2437
|
disabled: n
|
|
@@ -1955,7 +2439,7 @@ function gs(e) {
|
|
|
1955
2439
|
const r = ln(t);
|
|
1956
2440
|
return mt((o) => {
|
|
1957
2441
|
if (n || !r || !o)
|
|
1958
|
-
return
|
|
2442
|
+
return Ri;
|
|
1959
2443
|
const s = {
|
|
1960
2444
|
x: Math.sign(t.x - r.x),
|
|
1961
2445
|
y: Math.sign(t.y - r.y)
|
|
@@ -1972,14 +2456,14 @@ function gs(e) {
|
|
|
1972
2456
|
};
|
|
1973
2457
|
}, [n, t, r]);
|
|
1974
2458
|
}
|
|
1975
|
-
function
|
|
2459
|
+
function Ei(e, t) {
|
|
1976
2460
|
const n = t != null ? e.get(t) : void 0, r = n ? n.node.current : null;
|
|
1977
2461
|
return mt((o) => {
|
|
1978
2462
|
var s;
|
|
1979
2463
|
return t == null ? null : (s = r ?? o) != null ? s : null;
|
|
1980
2464
|
}, [r, t]);
|
|
1981
2465
|
}
|
|
1982
|
-
function
|
|
2466
|
+
function ji(e, t) {
|
|
1983
2467
|
return M(() => e.reduce((n, r) => {
|
|
1984
2468
|
const {
|
|
1985
2469
|
sensor: o
|
|
@@ -1998,8 +2482,8 @@ var fn;
|
|
|
1998
2482
|
(function(e) {
|
|
1999
2483
|
e.Optimized = "optimized";
|
|
2000
2484
|
})(fn || (fn = {}));
|
|
2001
|
-
const
|
|
2002
|
-
function
|
|
2485
|
+
const nr = /* @__PURE__ */ new Map();
|
|
2486
|
+
function _i(e, t) {
|
|
2003
2487
|
let {
|
|
2004
2488
|
dragging: n,
|
|
2005
2489
|
dependencies: r,
|
|
@@ -2013,8 +2497,8 @@ function bs(e, t) {
|
|
|
2013
2497
|
x === void 0 && (x = []), !v.current && i((w) => w === null ? x : w.concat(x.filter((S) => !w.includes(S))));
|
|
2014
2498
|
}, [v]), b = N(null), g = mt((x) => {
|
|
2015
2499
|
if (f && !n)
|
|
2016
|
-
return
|
|
2017
|
-
if (!x || x ===
|
|
2500
|
+
return nr;
|
|
2501
|
+
if (!x || x === nr || h.current !== e || s != null) {
|
|
2018
2502
|
const w = /* @__PURE__ */ new Map();
|
|
2019
2503
|
for (let S of e) {
|
|
2020
2504
|
if (!S)
|
|
@@ -2023,7 +2507,7 @@ function bs(e, t) {
|
|
|
2023
2507
|
w.set(S.id, S.rect.current);
|
|
2024
2508
|
continue;
|
|
2025
2509
|
}
|
|
2026
|
-
const D = S.node.current, j = D ? new
|
|
2510
|
+
const D = S.node.current, j = D ? new yn(c(D), D) : null;
|
|
2027
2511
|
S.rect.current = j, j && w.set(S.id, j);
|
|
2028
2512
|
}
|
|
2029
2513
|
return w;
|
|
@@ -2068,18 +2552,18 @@ function bs(e, t) {
|
|
|
2068
2552
|
}
|
|
2069
2553
|
}
|
|
2070
2554
|
}
|
|
2071
|
-
function
|
|
2555
|
+
function Or(e, t) {
|
|
2072
2556
|
return mt((n) => e ? n || (typeof t == "function" ? t(e) : e) : null, [t, e]);
|
|
2073
2557
|
}
|
|
2074
|
-
function
|
|
2075
|
-
return
|
|
2558
|
+
function Oi(e, t) {
|
|
2559
|
+
return Or(e, t);
|
|
2076
2560
|
}
|
|
2077
|
-
function
|
|
2561
|
+
function Ti(e) {
|
|
2078
2562
|
let {
|
|
2079
2563
|
callback: t,
|
|
2080
2564
|
disabled: n
|
|
2081
2565
|
} = e;
|
|
2082
|
-
const r =
|
|
2566
|
+
const r = bn(t), o = M(() => {
|
|
2083
2567
|
if (n || typeof window > "u" || typeof window.MutationObserver > "u")
|
|
2084
2568
|
return;
|
|
2085
2569
|
const {
|
|
@@ -2094,7 +2578,7 @@ function Vt(e) {
|
|
|
2094
2578
|
callback: t,
|
|
2095
2579
|
disabled: n
|
|
2096
2580
|
} = e;
|
|
2097
|
-
const r =
|
|
2581
|
+
const r = bn(t), o = M(
|
|
2098
2582
|
() => {
|
|
2099
2583
|
if (n || typeof window > "u" || typeof window.ResizeObserver > "u")
|
|
2100
2584
|
return;
|
|
@@ -2108,11 +2592,11 @@ function Vt(e) {
|
|
|
2108
2592
|
);
|
|
2109
2593
|
return A(() => () => o?.disconnect(), [o]), o;
|
|
2110
2594
|
}
|
|
2111
|
-
function
|
|
2112
|
-
return new
|
|
2595
|
+
function Ii(e) {
|
|
2596
|
+
return new yn(Ze(e), e);
|
|
2113
2597
|
}
|
|
2114
|
-
function
|
|
2115
|
-
t === void 0 && (t =
|
|
2598
|
+
function rr(e, t, n) {
|
|
2599
|
+
t === void 0 && (t = Ii);
|
|
2116
2600
|
const [r, o] = Q(null);
|
|
2117
2601
|
function s() {
|
|
2118
2602
|
o((c) => {
|
|
@@ -2126,7 +2610,7 @@ function Zn(e, t, n) {
|
|
|
2126
2610
|
return JSON.stringify(c) === JSON.stringify(h) ? c : h;
|
|
2127
2611
|
});
|
|
2128
2612
|
}
|
|
2129
|
-
const i =
|
|
2613
|
+
const i = Ti({
|
|
2130
2614
|
callback(c) {
|
|
2131
2615
|
if (e)
|
|
2132
2616
|
for (const u of c) {
|
|
@@ -2150,18 +2634,18 @@ function Zn(e, t, n) {
|
|
|
2150
2634
|
})) : (l?.disconnect(), i?.disconnect());
|
|
2151
2635
|
}, [e]), r;
|
|
2152
2636
|
}
|
|
2153
|
-
function
|
|
2154
|
-
const t =
|
|
2155
|
-
return
|
|
2637
|
+
function Ai(e) {
|
|
2638
|
+
const t = Or(e);
|
|
2639
|
+
return yr(e, t);
|
|
2156
2640
|
}
|
|
2157
|
-
const
|
|
2158
|
-
function
|
|
2159
|
-
const t = N(e), n = mt((r) => e ? r && r !==
|
|
2641
|
+
const or = [];
|
|
2642
|
+
function ki(e) {
|
|
2643
|
+
const t = N(e), n = mt((r) => e ? r && r !== or && e && t.current && e.parentNode === t.current.parentNode ? r : xn(e) : or, [e]);
|
|
2160
2644
|
return A(() => {
|
|
2161
2645
|
t.current = e;
|
|
2162
2646
|
}, [e]), n;
|
|
2163
2647
|
}
|
|
2164
|
-
function
|
|
2648
|
+
function Mi(e) {
|
|
2165
2649
|
const [t, n] = Q(null), r = N(e), o = K((s) => {
|
|
2166
2650
|
const i = en(s.target);
|
|
2167
2651
|
i && n((l) => l ? (l.set(i, un(i)), new Map(l)) : null);
|
|
@@ -2187,9 +2671,9 @@ function Cs(e) {
|
|
|
2187
2671
|
u?.removeEventListener("scroll", o);
|
|
2188
2672
|
});
|
|
2189
2673
|
}
|
|
2190
|
-
}, [o, e]), M(() => e.length ? t ? Array.from(t.values()).reduce((s, i) => Xe(s, i), ge) :
|
|
2674
|
+
}, [o, e]), M(() => e.length ? t ? Array.from(t.values()).reduce((s, i) => Xe(s, i), ge) : Er(e) : ge, [e, t]);
|
|
2191
2675
|
}
|
|
2192
|
-
function
|
|
2676
|
+
function sr(e, t) {
|
|
2193
2677
|
t === void 0 && (t = []);
|
|
2194
2678
|
const n = N(null);
|
|
2195
2679
|
return A(
|
|
@@ -2203,7 +2687,7 @@ function er(e, t) {
|
|
|
2203
2687
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
2204
2688
|
}, [e]), n.current ? Mt(e, n.current) : ge;
|
|
2205
2689
|
}
|
|
2206
|
-
function
|
|
2690
|
+
function Ni(e) {
|
|
2207
2691
|
A(
|
|
2208
2692
|
() => {
|
|
2209
2693
|
if (!Ft)
|
|
@@ -2229,7 +2713,7 @@ function Rs(e) {
|
|
|
2229
2713
|
})
|
|
2230
2714
|
);
|
|
2231
2715
|
}
|
|
2232
|
-
function
|
|
2716
|
+
function Li(e, t) {
|
|
2233
2717
|
return M(() => e.reduce((n, r) => {
|
|
2234
2718
|
let {
|
|
2235
2719
|
eventName: o,
|
|
@@ -2240,15 +2724,15 @@ function Ds(e, t) {
|
|
|
2240
2724
|
}, n;
|
|
2241
2725
|
}, {}), [e, t]);
|
|
2242
2726
|
}
|
|
2243
|
-
function
|
|
2244
|
-
return M(() => e ?
|
|
2727
|
+
function Tr(e) {
|
|
2728
|
+
return M(() => e ? ii(e) : null, [e]);
|
|
2245
2729
|
}
|
|
2246
|
-
const
|
|
2247
|
-
function
|
|
2730
|
+
const ir = [];
|
|
2731
|
+
function $i(e, t) {
|
|
2248
2732
|
t === void 0 && (t = Ze);
|
|
2249
|
-
const [n] = e, r =
|
|
2733
|
+
const [n] = e, r = Tr(n ? ne(n) : null), [o, s] = Q(ir);
|
|
2250
2734
|
function i() {
|
|
2251
|
-
s(() => e.length ? e.map((c) =>
|
|
2735
|
+
s(() => e.length ? e.map((c) => Rr(c) ? r : new yn(t(c), c)) : ir);
|
|
2252
2736
|
}
|
|
2253
2737
|
const l = Vt({
|
|
2254
2738
|
callback: i
|
|
@@ -2257,7 +2741,7 @@ function Es(e, t) {
|
|
|
2257
2741
|
l?.disconnect(), i(), e.forEach((c) => l?.observe(c));
|
|
2258
2742
|
}, [e]), o;
|
|
2259
2743
|
}
|
|
2260
|
-
function
|
|
2744
|
+
function Pi(e) {
|
|
2261
2745
|
if (!e)
|
|
2262
2746
|
return null;
|
|
2263
2747
|
if (e.children.length > 1)
|
|
@@ -2265,7 +2749,7 @@ function js(e) {
|
|
|
2265
2749
|
const t = e.children[0];
|
|
2266
2750
|
return bt(t) ? t : e;
|
|
2267
2751
|
}
|
|
2268
|
-
function
|
|
2752
|
+
function zi(e) {
|
|
2269
2753
|
let {
|
|
2270
2754
|
measure: t
|
|
2271
2755
|
} = e;
|
|
@@ -2287,7 +2771,7 @@ function _s(e) {
|
|
|
2287
2771
|
}, [t]), s = Vt({
|
|
2288
2772
|
callback: o
|
|
2289
2773
|
}), i = K((u) => {
|
|
2290
|
-
const h =
|
|
2774
|
+
const h = Pi(u);
|
|
2291
2775
|
s?.disconnect(), h && s?.observe(h), r(h ? t(h) : null);
|
|
2292
2776
|
}, [t, s]), [l, c] = kt(i);
|
|
2293
2777
|
return M(() => ({
|
|
@@ -2296,20 +2780,20 @@ function _s(e) {
|
|
|
2296
2780
|
setRef: c
|
|
2297
2781
|
}), [n, l, c]);
|
|
2298
2782
|
}
|
|
2299
|
-
const
|
|
2300
|
-
sensor:
|
|
2783
|
+
const Fi = [{
|
|
2784
|
+
sensor: Sn,
|
|
2301
2785
|
options: {}
|
|
2302
2786
|
}, {
|
|
2303
|
-
sensor:
|
|
2787
|
+
sensor: _r,
|
|
2304
2788
|
options: {}
|
|
2305
|
-
}],
|
|
2789
|
+
}], Vi = {
|
|
2306
2790
|
current: {}
|
|
2307
2791
|
}, Tt = {
|
|
2308
2792
|
draggable: {
|
|
2309
|
-
measure:
|
|
2793
|
+
measure: Zn
|
|
2310
2794
|
},
|
|
2311
2795
|
droppable: {
|
|
2312
|
-
measure:
|
|
2796
|
+
measure: Zn,
|
|
2313
2797
|
strategy: ft.WhileDragging,
|
|
2314
2798
|
frequency: fn.Optimized
|
|
2315
2799
|
},
|
|
@@ -2338,7 +2822,7 @@ class ut extends Map {
|
|
|
2338
2822
|
return (n = (r = this.get(t)) == null ? void 0 : r.node.current) != null ? n : void 0;
|
|
2339
2823
|
}
|
|
2340
2824
|
}
|
|
2341
|
-
const
|
|
2825
|
+
const Yi = {
|
|
2342
2826
|
activatorEvent: null,
|
|
2343
2827
|
active: null,
|
|
2344
2828
|
activeNode: null,
|
|
@@ -2362,7 +2846,7 @@ const Is = {
|
|
|
2362
2846
|
measureDroppableContainers: Nt,
|
|
2363
2847
|
windowRect: null,
|
|
2364
2848
|
measuringScheduled: !1
|
|
2365
|
-
},
|
|
2849
|
+
}, Bi = {
|
|
2366
2850
|
activatorEvent: null,
|
|
2367
2851
|
activators: [],
|
|
2368
2852
|
active: null,
|
|
@@ -2374,8 +2858,8 @@ const Is = {
|
|
|
2374
2858
|
draggableNodes: /* @__PURE__ */ new Map(),
|
|
2375
2859
|
over: null,
|
|
2376
2860
|
measureDroppableContainers: Nt
|
|
2377
|
-
}, Yt = /* @__PURE__ */ ht(
|
|
2378
|
-
function
|
|
2861
|
+
}, Yt = /* @__PURE__ */ ht(Bi), Ir = /* @__PURE__ */ ht(Yi);
|
|
2862
|
+
function Hi() {
|
|
2379
2863
|
return {
|
|
2380
2864
|
draggable: {
|
|
2381
2865
|
active: null,
|
|
@@ -2394,7 +2878,7 @@ function ks() {
|
|
|
2394
2878
|
}
|
|
2395
2879
|
};
|
|
2396
2880
|
}
|
|
2397
|
-
function
|
|
2881
|
+
function Wi(e, t) {
|
|
2398
2882
|
switch (t.type) {
|
|
2399
2883
|
case Y.DragStart:
|
|
2400
2884
|
return {
|
|
@@ -2487,7 +2971,7 @@ function Ms(e, t) {
|
|
|
2487
2971
|
return e;
|
|
2488
2972
|
}
|
|
2489
2973
|
}
|
|
2490
|
-
function
|
|
2974
|
+
function Ui(e) {
|
|
2491
2975
|
let {
|
|
2492
2976
|
disabled: t
|
|
2493
2977
|
} = e;
|
|
@@ -2498,7 +2982,7 @@ function Ns(e) {
|
|
|
2498
2982
|
} = ze(Yt), s = ln(r), i = ln(n?.id);
|
|
2499
2983
|
return A(() => {
|
|
2500
2984
|
if (!t && !r && s && i != null) {
|
|
2501
|
-
if (!
|
|
2985
|
+
if (!mn(s) || document.activeElement === s.target)
|
|
2502
2986
|
return;
|
|
2503
2987
|
const l = o.get(i);
|
|
2504
2988
|
if (!l)
|
|
@@ -2513,7 +2997,7 @@ function Ns(e) {
|
|
|
2513
2997
|
for (const h of [c.current, u.current]) {
|
|
2514
2998
|
if (!h)
|
|
2515
2999
|
continue;
|
|
2516
|
-
const f =
|
|
3000
|
+
const f = Ls(h);
|
|
2517
3001
|
if (f) {
|
|
2518
3002
|
f.focus();
|
|
2519
3003
|
break;
|
|
@@ -2523,7 +3007,7 @@ function Ns(e) {
|
|
|
2523
3007
|
}
|
|
2524
3008
|
}, [r, t, o, i, s]), null;
|
|
2525
3009
|
}
|
|
2526
|
-
function
|
|
3010
|
+
function Gi(e, t) {
|
|
2527
3011
|
let {
|
|
2528
3012
|
transform: n,
|
|
2529
3013
|
...r
|
|
@@ -2533,7 +3017,7 @@ function Ls(e, t) {
|
|
|
2533
3017
|
...r
|
|
2534
3018
|
}), n) : n;
|
|
2535
3019
|
}
|
|
2536
|
-
function
|
|
3020
|
+
function Xi(e) {
|
|
2537
3021
|
return M(
|
|
2538
3022
|
() => ({
|
|
2539
3023
|
draggable: {
|
|
@@ -2553,7 +3037,7 @@ function $s(e) {
|
|
|
2553
3037
|
[e?.draggable, e?.droppable, e?.dragOverlay]
|
|
2554
3038
|
);
|
|
2555
3039
|
}
|
|
2556
|
-
function
|
|
3040
|
+
function qi(e) {
|
|
2557
3041
|
let {
|
|
2558
3042
|
activeNode: t,
|
|
2559
3043
|
measure: n,
|
|
@@ -2577,9 +3061,9 @@ function Ps(e) {
|
|
|
2577
3061
|
const u = t?.node.current;
|
|
2578
3062
|
if (!u || u.isConnected === !1)
|
|
2579
3063
|
return;
|
|
2580
|
-
const h = n(u), f =
|
|
3064
|
+
const h = n(u), f = yr(h, r);
|
|
2581
3065
|
if (i || (f.x = 0), l || (f.y = 0), s.current = !0, Math.abs(f.x) > 0 || Math.abs(f.y) > 0) {
|
|
2582
|
-
const v =
|
|
3066
|
+
const v = wr(u);
|
|
2583
3067
|
v && v.scrollBy({
|
|
2584
3068
|
top: f.y,
|
|
2585
3069
|
left: f.x
|
|
@@ -2587,7 +3071,7 @@ function Ps(e) {
|
|
|
2587
3071
|
}
|
|
2588
3072
|
}, [t, i, l, r, n]);
|
|
2589
3073
|
}
|
|
2590
|
-
const
|
|
3074
|
+
const Ar = /* @__PURE__ */ ht({
|
|
2591
3075
|
...ge,
|
|
2592
3076
|
scaleX: 1,
|
|
2593
3077
|
scaleY: 1
|
|
@@ -2596,20 +3080,20 @@ var Ne;
|
|
|
2596
3080
|
(function(e) {
|
|
2597
3081
|
e[e.Uninitialized = 0] = "Uninitialized", e[e.Initializing = 1] = "Initializing", e[e.Initialized = 2] = "Initialized";
|
|
2598
3082
|
})(Ne || (Ne = {}));
|
|
2599
|
-
const
|
|
3083
|
+
const kr = /* @__PURE__ */ Qr(function(t) {
|
|
2600
3084
|
var n, r, o, s;
|
|
2601
3085
|
let {
|
|
2602
3086
|
id: i,
|
|
2603
3087
|
accessibility: l,
|
|
2604
3088
|
autoScroll: c = !0,
|
|
2605
3089
|
children: u,
|
|
2606
|
-
sensors: h =
|
|
2607
|
-
collisionDetection: f =
|
|
3090
|
+
sensors: h = Fi,
|
|
3091
|
+
collisionDetection: f = Qs,
|
|
2608
3092
|
measuring: v,
|
|
2609
3093
|
modifiers: d,
|
|
2610
3094
|
...b
|
|
2611
3095
|
} = t;
|
|
2612
|
-
const g = eo(
|
|
3096
|
+
const g = eo(Wi, void 0, Hi), [m, x] = g, [w, S] = Ys(), [D, j] = Q(Ne.Uninitialized), R = D === Ne.Initialized, {
|
|
2613
3097
|
draggable: {
|
|
2614
3098
|
active: E,
|
|
2615
3099
|
nodes: _,
|
|
@@ -2626,25 +3110,25 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2626
3110
|
return E != null ? {
|
|
2627
3111
|
id: E,
|
|
2628
3112
|
// It's possible for the active node to unmount while dragging
|
|
2629
|
-
data: (q = L?.data) != null ? q :
|
|
3113
|
+
data: (q = L?.data) != null ? q : Vi,
|
|
2630
3114
|
rect: J
|
|
2631
3115
|
} : null;
|
|
2632
|
-
}, [E, L]), ae = N(null), [Re, $e] = Q(null), [G, Pe] = Q(null), le = dt(b, Object.values(b)), Oe = xt("DndDescribedBy", i), p = M(() => F.getEnabled(), [F]), C =
|
|
3116
|
+
}, [E, L]), ae = N(null), [Re, $e] = Q(null), [G, Pe] = Q(null), le = dt(b, Object.values(b)), Oe = xt("DndDescribedBy", i), p = M(() => F.getEnabled(), [F]), C = Xi(v), {
|
|
2633
3117
|
droppableRects: O,
|
|
2634
3118
|
measureDroppableContainers: k,
|
|
2635
3119
|
measuringScheduled: ve
|
|
2636
|
-
} =
|
|
3120
|
+
} = _i(p, {
|
|
2637
3121
|
dragging: R,
|
|
2638
3122
|
dependencies: [$.x, $.y],
|
|
2639
3123
|
config: C.droppable
|
|
2640
|
-
}), X =
|
|
2641
|
-
|
|
3124
|
+
}), X = Ei(_, E), P = M(() => G ? cn(G) : null, [G]), Z = Jr(), re = Oi(X, C.draggable.measure);
|
|
3125
|
+
qi({
|
|
2642
3126
|
activeNode: E != null ? _.get(E) : null,
|
|
2643
3127
|
config: Z.layoutShiftCompensation,
|
|
2644
3128
|
initialRect: re,
|
|
2645
3129
|
measure: C.draggable.measure
|
|
2646
3130
|
});
|
|
2647
|
-
const I =
|
|
3131
|
+
const I = rr(X, C.draggable.measure, re), Qe = rr(X ? X.parentElement : null), be = N({
|
|
2648
3132
|
activatorEvent: null,
|
|
2649
3133
|
active: null,
|
|
2650
3134
|
activeNode: X,
|
|
@@ -2658,9 +3142,9 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2658
3142
|
over: null,
|
|
2659
3143
|
scrollableAncestors: [],
|
|
2660
3144
|
scrollAdjustedTranslate: null
|
|
2661
|
-
}), Ve = F.getNodeFor((n = be.current.over) == null ? void 0 : n.id), De =
|
|
3145
|
+
}), Ve = F.getNodeFor((n = be.current.over) == null ? void 0 : n.id), De = zi({
|
|
2662
3146
|
measure: C.dragOverlay.measure
|
|
2663
|
-
}), Ye = (r = De.nodeRef.current) != null ? r : X, Be = R ? (o = De.rect) != null ? o : I : null, Rn = !!(De.nodeRef.current && De.rect), Dn =
|
|
3147
|
+
}), Ye = (r = De.nodeRef.current) != null ? r : X, Be = R ? (o = De.rect) != null ? o : I : null, Rn = !!(De.nodeRef.current && De.rect), Dn = Ai(Rn ? null : I), Ht = Tr(Ye ? ne(Ye) : null), Te = ki(R ? Ve ?? X : null), yt = $i(Te), wt = Gi(d, {
|
|
2664
3148
|
transform: {
|
|
2665
3149
|
x: $.x - Dn.x,
|
|
2666
3150
|
y: $.y - Dn.y,
|
|
@@ -2677,13 +3161,13 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2677
3161
|
scrollableAncestors: Te,
|
|
2678
3162
|
scrollableAncestorRects: yt,
|
|
2679
3163
|
windowRect: Ht
|
|
2680
|
-
}), En = P ? Xe(P, $) : null, jn =
|
|
3164
|
+
}), En = P ? Xe(P, $) : null, jn = Mi(Te), Hr = sr(jn), Wr = sr(jn, [I]), He = Xe(wt, Hr), We = Be ? ni(Be, wt) : null, et = ee && We ? f({
|
|
2681
3165
|
active: ee,
|
|
2682
3166
|
collisionRect: We,
|
|
2683
3167
|
droppableRects: O,
|
|
2684
3168
|
droppableContainers: p,
|
|
2685
3169
|
pointerCoordinates: En
|
|
2686
|
-
}) : null, _n =
|
|
3170
|
+
}) : null, _n = Js(et, "id"), [Ie, On] = Q(null), Ur = Rn ? wt : Xe(wt, Wr), Gr = ei(Ur, (s = Ie?.rect) != null ? s : null, I), Wt = N(null), Tn = K(
|
|
2687
3171
|
(q, oe) => {
|
|
2688
3172
|
let {
|
|
2689
3173
|
sensor: se,
|
|
@@ -2823,8 +3307,8 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2823
3307
|
q(se, oe.options, me) === !0 && (ce.dndKit = {
|
|
2824
3308
|
capturedBy: oe.sensor
|
|
2825
3309
|
}, ae.current = Ae, Tn(se, oe));
|
|
2826
|
-
}, [_, Tn]), In =
|
|
2827
|
-
|
|
3310
|
+
}, [_, Tn]), In = ji(h, Xr);
|
|
3311
|
+
Ni(h), we(() => {
|
|
2828
3312
|
I && D === Ne.Initializing && j(Ne.Initialized);
|
|
2829
3313
|
}, [I, D]), A(
|
|
2830
3314
|
() => {
|
|
@@ -2913,7 +3397,7 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2913
3397
|
initial: Be,
|
|
2914
3398
|
translated: We
|
|
2915
3399
|
};
|
|
2916
|
-
}, [ee, X, et, We, _, Ye, Be, O, F, Ie, Te, He]),
|
|
3400
|
+
}, [ee, X, et, We, _, Ye, Be, O, F, Ie, Te, He]), Ci({
|
|
2917
3401
|
...Z,
|
|
2918
3402
|
delta: $,
|
|
2919
3403
|
draggingRect: We,
|
|
@@ -2952,17 +3436,17 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2952
3436
|
over: Ie,
|
|
2953
3437
|
measureDroppableContainers: k
|
|
2954
3438
|
}), [G, In, ee, I, x, Oe, _, Ie, k]);
|
|
2955
|
-
return B.createElement(
|
|
3439
|
+
return B.createElement(mr.Provider, {
|
|
2956
3440
|
value: S
|
|
2957
3441
|
}, B.createElement(Yt.Provider, {
|
|
2958
3442
|
value: Kr
|
|
2959
|
-
}, B.createElement(Tr.Provider, {
|
|
2960
|
-
value: qr
|
|
2961
3443
|
}, B.createElement(Ir.Provider, {
|
|
3444
|
+
value: qr
|
|
3445
|
+
}, B.createElement(Ar.Provider, {
|
|
2962
3446
|
value: Gr
|
|
2963
|
-
}, u)), B.createElement(
|
|
3447
|
+
}, u)), B.createElement(Ui, {
|
|
2964
3448
|
disabled: l?.restoreFocus === !1
|
|
2965
|
-
})), B.createElement(
|
|
3449
|
+
})), B.createElement(Ws, {
|
|
2966
3450
|
...l,
|
|
2967
3451
|
hiddenTextDescribedById: Oe
|
|
2968
3452
|
}));
|
|
@@ -2975,15 +3459,15 @@ const Ar = /* @__PURE__ */ Qr(function(t) {
|
|
|
2975
3459
|
enabled: se
|
|
2976
3460
|
};
|
|
2977
3461
|
}
|
|
2978
|
-
}),
|
|
2979
|
-
function
|
|
3462
|
+
}), Ki = /* @__PURE__ */ ht(null), ar = "button", Ji = "Draggable";
|
|
3463
|
+
function Zi(e) {
|
|
2980
3464
|
let {
|
|
2981
3465
|
id: t,
|
|
2982
3466
|
data: n,
|
|
2983
3467
|
disabled: r = !1,
|
|
2984
3468
|
attributes: o
|
|
2985
3469
|
} = e;
|
|
2986
|
-
const s = xt(
|
|
3470
|
+
const s = xt(Ji), {
|
|
2987
3471
|
activators: i,
|
|
2988
3472
|
activatorEvent: l,
|
|
2989
3473
|
active: c,
|
|
@@ -2992,10 +3476,10 @@ function Vs(e) {
|
|
|
2992
3476
|
draggableNodes: f,
|
|
2993
3477
|
over: v
|
|
2994
3478
|
} = ze(Yt), {
|
|
2995
|
-
role: d =
|
|
3479
|
+
role: d = ar,
|
|
2996
3480
|
roleDescription: b = "draggable",
|
|
2997
3481
|
tabIndex: g = 0
|
|
2998
|
-
} = o ?? {}, m = c?.id === t, x = ze(m ?
|
|
3482
|
+
} = o ?? {}, m = c?.id === t, x = ze(m ? Ar : Ki), [w, S] = kt(), [D, j] = kt(), R = Li(i, t), E = dt(n);
|
|
2999
3483
|
we(
|
|
3000
3484
|
() => (f.set(t, {
|
|
3001
3485
|
id: t,
|
|
@@ -3014,7 +3498,7 @@ function Vs(e) {
|
|
|
3014
3498
|
role: d,
|
|
3015
3499
|
tabIndex: g,
|
|
3016
3500
|
"aria-disabled": r,
|
|
3017
|
-
"aria-pressed": m && d ===
|
|
3501
|
+
"aria-pressed": m && d === ar ? !0 : void 0,
|
|
3018
3502
|
"aria-roledescription": b,
|
|
3019
3503
|
"aria-describedby": h.draggable
|
|
3020
3504
|
}), [r, d, g, m, b, h.draggable]);
|
|
@@ -3032,20 +3516,20 @@ function Vs(e) {
|
|
|
3032
3516
|
transform: x
|
|
3033
3517
|
};
|
|
3034
3518
|
}
|
|
3035
|
-
function
|
|
3036
|
-
return ze(
|
|
3519
|
+
function Qi() {
|
|
3520
|
+
return ze(Ir);
|
|
3037
3521
|
}
|
|
3038
|
-
const
|
|
3522
|
+
const ea = "Droppable", ta = {
|
|
3039
3523
|
timeout: 25
|
|
3040
3524
|
};
|
|
3041
|
-
function
|
|
3525
|
+
function na(e) {
|
|
3042
3526
|
let {
|
|
3043
3527
|
data: t,
|
|
3044
3528
|
disabled: n = !1,
|
|
3045
3529
|
id: r,
|
|
3046
3530
|
resizeObserverConfig: o
|
|
3047
3531
|
} = e;
|
|
3048
|
-
const s = xt(
|
|
3532
|
+
const s = xt(ea), {
|
|
3049
3533
|
active: i,
|
|
3050
3534
|
dispatch: l,
|
|
3051
3535
|
over: c,
|
|
@@ -3057,7 +3541,7 @@ function Ws(e) {
|
|
|
3057
3541
|
updateMeasurementsFor: g,
|
|
3058
3542
|
timeout: m
|
|
3059
3543
|
} = {
|
|
3060
|
-
...
|
|
3544
|
+
...ta,
|
|
3061
3545
|
...o
|
|
3062
3546
|
}, x = dt(g ?? r), w = K(
|
|
3063
3547
|
() => {
|
|
@@ -3117,7 +3601,7 @@ function Bt(e, t, n) {
|
|
|
3117
3601
|
const r = e.slice();
|
|
3118
3602
|
return r.splice(n < 0 ? r.length + n : n, 0, r.splice(t, 1)[0]), r;
|
|
3119
3603
|
}
|
|
3120
|
-
function
|
|
3604
|
+
function ra(e, t) {
|
|
3121
3605
|
return e.reduce((n, r, o) => {
|
|
3122
3606
|
const s = t.get(r);
|
|
3123
3607
|
return s && (n[o] = s), n;
|
|
@@ -3126,7 +3610,7 @@ function Us(e, t) {
|
|
|
3126
3610
|
function jt(e) {
|
|
3127
3611
|
return e !== null && e >= 0;
|
|
3128
3612
|
}
|
|
3129
|
-
function
|
|
3613
|
+
function oa(e, t) {
|
|
3130
3614
|
if (e === t)
|
|
3131
3615
|
return !0;
|
|
3132
3616
|
if (e.length !== t.length)
|
|
@@ -3136,7 +3620,7 @@ function Gs(e, t) {
|
|
|
3136
3620
|
return !1;
|
|
3137
3621
|
return !0;
|
|
3138
3622
|
}
|
|
3139
|
-
function
|
|
3623
|
+
function sa(e) {
|
|
3140
3624
|
return typeof e == "boolean" ? {
|
|
3141
3625
|
draggable: e,
|
|
3142
3626
|
droppable: e
|
|
@@ -3145,7 +3629,7 @@ function Xs(e) {
|
|
|
3145
3629
|
const _t = {
|
|
3146
3630
|
scaleX: 1,
|
|
3147
3631
|
scaleY: 1
|
|
3148
|
-
},
|
|
3632
|
+
}, ia = (e) => {
|
|
3149
3633
|
var t;
|
|
3150
3634
|
let {
|
|
3151
3635
|
rects: n,
|
|
@@ -3157,7 +3641,7 @@ const _t = {
|
|
|
3157
3641
|
const l = (t = n[o]) != null ? t : r;
|
|
3158
3642
|
if (!l)
|
|
3159
3643
|
return null;
|
|
3160
|
-
const c =
|
|
3644
|
+
const c = aa(n, i, o);
|
|
3161
3645
|
if (i === o) {
|
|
3162
3646
|
const u = n[s];
|
|
3163
3647
|
return u ? {
|
|
@@ -3180,11 +3664,11 @@ const _t = {
|
|
|
3180
3664
|
..._t
|
|
3181
3665
|
};
|
|
3182
3666
|
};
|
|
3183
|
-
function
|
|
3667
|
+
function aa(e, t, n) {
|
|
3184
3668
|
const r = e[t], o = e[t - 1], s = e[t + 1];
|
|
3185
3669
|
return !r || !o && !s ? 0 : n < t ? o ? r.left - (o.left + o.width) : s.left - (r.left + r.width) : s ? s.left - (r.left + r.width) : r.left - (o.left + o.width);
|
|
3186
3670
|
}
|
|
3187
|
-
const
|
|
3671
|
+
const Mr = (e) => {
|
|
3188
3672
|
let {
|
|
3189
3673
|
rects: t,
|
|
3190
3674
|
activeIndex: n,
|
|
@@ -3201,7 +3685,7 @@ const kr = (e) => {
|
|
|
3201
3685
|
}, Ot = {
|
|
3202
3686
|
scaleX: 1,
|
|
3203
3687
|
scaleY: 1
|
|
3204
|
-
},
|
|
3688
|
+
}, la = (e) => {
|
|
3205
3689
|
var t;
|
|
3206
3690
|
let {
|
|
3207
3691
|
activeIndex: n,
|
|
@@ -3221,7 +3705,7 @@ const kr = (e) => {
|
|
|
3221
3705
|
...Ot
|
|
3222
3706
|
} : null;
|
|
3223
3707
|
}
|
|
3224
|
-
const c =
|
|
3708
|
+
const c = ca(s, o, n);
|
|
3225
3709
|
return o > n && o <= i ? {
|
|
3226
3710
|
x: 0,
|
|
3227
3711
|
y: -l.height - c,
|
|
@@ -3236,30 +3720,30 @@ const kr = (e) => {
|
|
|
3236
3720
|
...Ot
|
|
3237
3721
|
};
|
|
3238
3722
|
};
|
|
3239
|
-
function
|
|
3723
|
+
function ca(e, t, n) {
|
|
3240
3724
|
const r = e[t], o = e[t - 1], s = e[t + 1];
|
|
3241
3725
|
return r ? n < t ? o ? r.top - (o.top + o.height) : s ? s.top - (r.top + r.height) : 0 : s ? s.top - (r.top + r.height) : o ? r.top - (o.top + o.height) : 0 : 0;
|
|
3242
3726
|
}
|
|
3243
|
-
const
|
|
3727
|
+
const Nr = "Sortable", Lr = /* @__PURE__ */ B.createContext({
|
|
3244
3728
|
activeIndex: -1,
|
|
3245
|
-
containerId:
|
|
3729
|
+
containerId: Nr,
|
|
3246
3730
|
disableTransforms: !1,
|
|
3247
3731
|
items: [],
|
|
3248
3732
|
overIndex: -1,
|
|
3249
3733
|
useDragOverlay: !1,
|
|
3250
3734
|
sortedRects: [],
|
|
3251
|
-
strategy:
|
|
3735
|
+
strategy: Mr,
|
|
3252
3736
|
disabled: {
|
|
3253
3737
|
draggable: !1,
|
|
3254
3738
|
droppable: !1
|
|
3255
3739
|
}
|
|
3256
3740
|
});
|
|
3257
|
-
function
|
|
3741
|
+
function $r(e) {
|
|
3258
3742
|
let {
|
|
3259
3743
|
children: t,
|
|
3260
3744
|
id: n,
|
|
3261
3745
|
items: r,
|
|
3262
|
-
strategy: o =
|
|
3746
|
+
strategy: o = Mr,
|
|
3263
3747
|
disabled: s = !1
|
|
3264
3748
|
} = e;
|
|
3265
3749
|
const {
|
|
@@ -3268,7 +3752,7 @@ function Lr(e) {
|
|
|
3268
3752
|
droppableRects: c,
|
|
3269
3753
|
over: u,
|
|
3270
3754
|
measureDroppableContainers: h
|
|
3271
|
-
} =
|
|
3755
|
+
} = Qi(), f = xt(Nr, n), v = l.rect !== null, d = M(() => r.map((R) => typeof R == "object" && "id" in R ? R.id : R), [r]), b = i != null, g = i ? d.indexOf(i.id) : -1, m = u ? d.indexOf(u.id) : -1, x = N(d), w = !oa(d, x.current), S = m !== -1 && g === -1 || w, D = sa(s);
|
|
3272
3756
|
we(() => {
|
|
3273
3757
|
w && b && h(d);
|
|
3274
3758
|
}, [w, d, b, h]), A(() => {
|
|
@@ -3283,17 +3767,17 @@ function Lr(e) {
|
|
|
3283
3767
|
items: d,
|
|
3284
3768
|
overIndex: m,
|
|
3285
3769
|
useDragOverlay: v,
|
|
3286
|
-
sortedRects:
|
|
3770
|
+
sortedRects: ra(d, c),
|
|
3287
3771
|
strategy: o
|
|
3288
3772
|
}),
|
|
3289
3773
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3290
3774
|
[g, f, D.draggable, D.droppable, S, d, m, c, v, o]
|
|
3291
3775
|
);
|
|
3292
|
-
return B.createElement(
|
|
3776
|
+
return B.createElement(Lr.Provider, {
|
|
3293
3777
|
value: j
|
|
3294
3778
|
}, t);
|
|
3295
3779
|
}
|
|
3296
|
-
const
|
|
3780
|
+
const ua = (e) => {
|
|
3297
3781
|
let {
|
|
3298
3782
|
id: t,
|
|
3299
3783
|
items: n,
|
|
@@ -3301,7 +3785,7 @@ const Qs = (e) => {
|
|
|
3301
3785
|
overIndex: o
|
|
3302
3786
|
} = e;
|
|
3303
3787
|
return Bt(n, r, o).indexOf(t);
|
|
3304
|
-
},
|
|
3788
|
+
}, da = (e) => {
|
|
3305
3789
|
let {
|
|
3306
3790
|
containerId: t,
|
|
3307
3791
|
isSorting: n,
|
|
@@ -3314,17 +3798,17 @@ const Qs = (e) => {
|
|
|
3314
3798
|
transition: u
|
|
3315
3799
|
} = e;
|
|
3316
3800
|
return !u || !r || l !== s && o === i ? !1 : n ? !0 : i !== o && t === c;
|
|
3317
|
-
},
|
|
3801
|
+
}, fa = {
|
|
3318
3802
|
duration: 200,
|
|
3319
3803
|
easing: "ease"
|
|
3320
|
-
},
|
|
3321
|
-
property:
|
|
3804
|
+
}, Pr = "transform", ha = /* @__PURE__ */ qe.Transition.toString({
|
|
3805
|
+
property: Pr,
|
|
3322
3806
|
duration: 0,
|
|
3323
3807
|
easing: "linear"
|
|
3324
|
-
}),
|
|
3808
|
+
}), ga = {
|
|
3325
3809
|
roleDescription: "sortable"
|
|
3326
3810
|
};
|
|
3327
|
-
function
|
|
3811
|
+
function pa(e) {
|
|
3328
3812
|
let {
|
|
3329
3813
|
disabled: t,
|
|
3330
3814
|
index: n,
|
|
@@ -3352,17 +3836,17 @@ function oi(e) {
|
|
|
3352
3836
|
s && i(null);
|
|
3353
3837
|
}, [s]), s;
|
|
3354
3838
|
}
|
|
3355
|
-
function
|
|
3839
|
+
function zr(e) {
|
|
3356
3840
|
let {
|
|
3357
|
-
animateLayoutChanges: t =
|
|
3841
|
+
animateLayoutChanges: t = da,
|
|
3358
3842
|
attributes: n,
|
|
3359
3843
|
disabled: r,
|
|
3360
3844
|
data: o,
|
|
3361
|
-
getNewIndex: s =
|
|
3845
|
+
getNewIndex: s = ua,
|
|
3362
3846
|
id: i,
|
|
3363
3847
|
strategy: l,
|
|
3364
3848
|
resizeObserverConfig: c,
|
|
3365
|
-
transition: u =
|
|
3849
|
+
transition: u = fa
|
|
3366
3850
|
} = e;
|
|
3367
3851
|
const {
|
|
3368
3852
|
items: h,
|
|
@@ -3374,7 +3858,7 @@ function Pr(e) {
|
|
|
3374
3858
|
overIndex: m,
|
|
3375
3859
|
useDragOverlay: x,
|
|
3376
3860
|
strategy: w
|
|
3377
|
-
} = ze(
|
|
3861
|
+
} = ze(Lr), S = va(r, d), D = h.indexOf(i), j = M(() => ({
|
|
3378
3862
|
sortable: {
|
|
3379
3863
|
containerId: f,
|
|
3380
3864
|
index: D,
|
|
@@ -3386,302 +3870,143 @@ function Pr(e) {
|
|
|
3386
3870
|
node: _,
|
|
3387
3871
|
isOver: $,
|
|
3388
3872
|
setNodeRef: F
|
|
3389
|
-
} =
|
|
3390
|
-
id: i,
|
|
3391
|
-
data: j,
|
|
3392
|
-
disabled: S.droppable,
|
|
3393
|
-
resizeObserverConfig: {
|
|
3394
|
-
updateMeasurementsFor: R,
|
|
3395
|
-
...c
|
|
3396
|
-
}
|
|
3397
|
-
}), {
|
|
3398
|
-
active: L,
|
|
3399
|
-
activatorEvent: J,
|
|
3400
|
-
activeNodeRect: ee,
|
|
3401
|
-
attributes: ae,
|
|
3402
|
-
setNodeRef: Re,
|
|
3403
|
-
listeners: $e,
|
|
3404
|
-
isDragging: G,
|
|
3405
|
-
over: Pe,
|
|
3406
|
-
setActivatorNodeRef: le,
|
|
3407
|
-
transform: Oe
|
|
3408
|
-
} = Vs({
|
|
3409
|
-
id: i,
|
|
3410
|
-
data: j,
|
|
3411
|
-
attributes: {
|
|
3412
|
-
...ri,
|
|
3413
|
-
...n
|
|
3414
|
-
},
|
|
3415
|
-
disabled: S.draggable
|
|
3416
|
-
}), p = wo(F, Re), C = !!L, O = C && !b && jt(v) && jt(m), k = !x && G, ve = k && O ? Oe : null, P = O ? ve ?? (l ?? w)({
|
|
3417
|
-
rects: g,
|
|
3418
|
-
activeNodeRect: ee,
|
|
3419
|
-
activeIndex: v,
|
|
3420
|
-
overIndex: m,
|
|
3421
|
-
index: D
|
|
3422
|
-
}) : null, Z = jt(v) && jt(m) ? s({
|
|
3423
|
-
id: i,
|
|
3424
|
-
items: h,
|
|
3425
|
-
activeIndex: v,
|
|
3426
|
-
overIndex: m
|
|
3427
|
-
}) : D, re = L?.id, I = N({
|
|
3428
|
-
activeId: re,
|
|
3429
|
-
items: h,
|
|
3430
|
-
newIndex: Z,
|
|
3431
|
-
containerId: f
|
|
3432
|
-
}), Qe = h !== I.current.items, be = t({
|
|
3433
|
-
active: L,
|
|
3434
|
-
containerId: f,
|
|
3435
|
-
isDragging: G,
|
|
3436
|
-
isSorting: C,
|
|
3873
|
+
} = na({
|
|
3437
3874
|
id: i,
|
|
3438
|
-
index: D,
|
|
3439
|
-
items: h,
|
|
3440
|
-
newIndex: I.current.newIndex,
|
|
3441
|
-
previousItems: I.current.items,
|
|
3442
|
-
previousContainerId: I.current.containerId,
|
|
3443
|
-
transition: u,
|
|
3444
|
-
wasDragging: I.current.activeId != null
|
|
3445
|
-
}), Ve = oi({
|
|
3446
|
-
disabled: !be,
|
|
3447
|
-
index: D,
|
|
3448
|
-
node: _,
|
|
3449
|
-
rect: E
|
|
3450
|
-
});
|
|
3451
|
-
return A(() => {
|
|
3452
|
-
C && I.current.newIndex !== Z && (I.current.newIndex = Z), f !== I.current.containerId && (I.current.containerId = f), h !== I.current.items && (I.current.items = h);
|
|
3453
|
-
}, [C, Z, f, h]), A(() => {
|
|
3454
|
-
if (re === I.current.activeId)
|
|
3455
|
-
return;
|
|
3456
|
-
if (re != null && I.current.activeId == null) {
|
|
3457
|
-
I.current.activeId = re;
|
|
3458
|
-
return;
|
|
3459
|
-
}
|
|
3460
|
-
const Ye = setTimeout(() => {
|
|
3461
|
-
I.current.activeId = re;
|
|
3462
|
-
}, 50);
|
|
3463
|
-
return () => clearTimeout(Ye);
|
|
3464
|
-
}, [re]), {
|
|
3465
|
-
active: L,
|
|
3466
|
-
activeIndex: v,
|
|
3467
|
-
attributes: ae,
|
|
3468
3875
|
data: j,
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
transform:
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
}
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
height: 24,
|
|
3528
|
-
viewBox: "0 0 24 24",
|
|
3529
|
-
fill: "none",
|
|
3530
|
-
stroke: "currentColor",
|
|
3531
|
-
strokeWidth: 2,
|
|
3532
|
-
strokeLinecap: "round",
|
|
3533
|
-
strokeLinejoin: "round"
|
|
3534
|
-
};
|
|
3535
|
-
const ui = hn(
|
|
3536
|
-
({
|
|
3537
|
-
color: e = "currentColor",
|
|
3538
|
-
size: t = 24,
|
|
3539
|
-
strokeWidth: n = 2,
|
|
3540
|
-
absoluteStrokeWidth: r,
|
|
3541
|
-
className: o = "",
|
|
3542
|
-
children: s,
|
|
3543
|
-
iconNode: i,
|
|
3544
|
-
...l
|
|
3545
|
-
}, c) => sn(
|
|
3546
|
-
"svg",
|
|
3547
|
-
{
|
|
3548
|
-
ref: c,
|
|
3549
|
-
...ci,
|
|
3550
|
-
width: t,
|
|
3551
|
-
height: t,
|
|
3552
|
-
stroke: e,
|
|
3553
|
-
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
3554
|
-
className: zr("lucide", o),
|
|
3555
|
-
...!s && !li(l) && { "aria-hidden": "true" },
|
|
3556
|
-
...l
|
|
3557
|
-
},
|
|
3558
|
-
[
|
|
3559
|
-
...i.map(([u, h]) => sn(u, h)),
|
|
3560
|
-
...Array.isArray(s) ? s : [s]
|
|
3561
|
-
]
|
|
3562
|
-
)
|
|
3563
|
-
);
|
|
3564
|
-
const ne = (e, t) => {
|
|
3565
|
-
const n = hn(
|
|
3566
|
-
({ className: r, ...o }, s) => sn(ui, {
|
|
3567
|
-
ref: s,
|
|
3568
|
-
iconNode: t,
|
|
3569
|
-
className: zr(
|
|
3570
|
-
`lucide-${ii(rr(e))}`,
|
|
3571
|
-
`lucide-${e}`,
|
|
3572
|
-
r
|
|
3573
|
-
),
|
|
3574
|
-
...o
|
|
3575
|
-
})
|
|
3576
|
-
);
|
|
3577
|
-
return n.displayName = rr(e), n;
|
|
3578
|
-
};
|
|
3579
|
-
const di = [
|
|
3580
|
-
["path", { d: "M12 5v14", key: "s699le" }],
|
|
3581
|
-
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
3582
|
-
], fi = ne("arrow-down", di);
|
|
3583
|
-
const hi = [
|
|
3584
|
-
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
3585
|
-
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
3586
|
-
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
3587
|
-
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
3588
|
-
], gi = ne("arrow-up-down", hi);
|
|
3589
|
-
const pi = [
|
|
3590
|
-
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
3591
|
-
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
3592
|
-
], vi = ne("arrow-up", pi);
|
|
3593
|
-
const bi = [
|
|
3594
|
-
["path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z", key: "1fy3hk" }]
|
|
3595
|
-
], mi = ne("bookmark", bi);
|
|
3596
|
-
const xi = [
|
|
3597
|
-
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
3598
|
-
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
3599
|
-
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
3600
|
-
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
3601
|
-
], or = ne("calendar", xi);
|
|
3602
|
-
const yi = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], wi = ne("chevron-left", yi);
|
|
3603
|
-
const Si = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ci = ne("chevron-right", Si);
|
|
3604
|
-
const Ri = [
|
|
3605
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
3606
|
-
["path", { d: "M12 3v18", key: "108xh3" }]
|
|
3607
|
-
], Di = ne("columns-2", Ri);
|
|
3608
|
-
const Ei = [
|
|
3609
|
-
[
|
|
3610
|
-
"path",
|
|
3611
|
-
{
|
|
3612
|
-
d: "M10 5a2 2 0 0 0-1.344.519l-6.328 5.74a1 1 0 0 0 0 1.481l6.328 5.741A2 2 0 0 0 10 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z",
|
|
3613
|
-
key: "1yo7s0"
|
|
3614
|
-
}
|
|
3615
|
-
],
|
|
3616
|
-
["path", { d: "m12 9 6 6", key: "anjzzh" }],
|
|
3617
|
-
["path", { d: "m18 9-6 6", key: "1fp51s" }]
|
|
3618
|
-
], ji = ne("delete", Ei);
|
|
3619
|
-
const _i = [
|
|
3620
|
-
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
3621
|
-
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
3622
|
-
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
3623
|
-
], Oi = ne("ellipsis", _i);
|
|
3624
|
-
const Ti = [
|
|
3625
|
-
[
|
|
3626
|
-
"path",
|
|
3627
|
-
{
|
|
3628
|
-
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
3629
|
-
key: "sc7q7i"
|
|
3630
|
-
}
|
|
3631
|
-
]
|
|
3632
|
-
], Ii = ne("funnel", Ti);
|
|
3633
|
-
const Ai = [
|
|
3634
|
-
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
3635
|
-
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
3636
|
-
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
3637
|
-
["circle", { cx: "15", cy: "12", r: "1", key: "1tmaij" }],
|
|
3638
|
-
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
3639
|
-
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
3640
|
-
], ki = ne("grip-vertical", Ai);
|
|
3641
|
-
const Mi = [
|
|
3642
|
-
[
|
|
3643
|
-
"path",
|
|
3644
|
-
{
|
|
3645
|
-
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
3646
|
-
key: "1a8usu"
|
|
3647
|
-
}
|
|
3648
|
-
]
|
|
3649
|
-
], Ni = ne("pen", Mi);
|
|
3650
|
-
const Li = [
|
|
3651
|
-
[
|
|
3652
|
-
"path",
|
|
3653
|
-
{
|
|
3654
|
-
d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
|
|
3655
|
-
key: "1i5ecw"
|
|
3656
|
-
}
|
|
3657
|
-
],
|
|
3658
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
3659
|
-
], $i = ne("settings", Li);
|
|
3660
|
-
function y(e) {
|
|
3661
|
-
return hn((t, n) => {
|
|
3662
|
-
const { children: r, ...o } = t;
|
|
3663
|
-
return (
|
|
3664
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3665
|
-
/* @__PURE__ */ a.jsx(e, { ref: n, ...o, children: r })
|
|
3666
|
-
);
|
|
3876
|
+
disabled: S.droppable,
|
|
3877
|
+
resizeObserverConfig: {
|
|
3878
|
+
updateMeasurementsFor: R,
|
|
3879
|
+
...c
|
|
3880
|
+
}
|
|
3881
|
+
}), {
|
|
3882
|
+
active: L,
|
|
3883
|
+
activatorEvent: J,
|
|
3884
|
+
activeNodeRect: ee,
|
|
3885
|
+
attributes: ae,
|
|
3886
|
+
setNodeRef: Re,
|
|
3887
|
+
listeners: $e,
|
|
3888
|
+
isDragging: G,
|
|
3889
|
+
over: Pe,
|
|
3890
|
+
setActivatorNodeRef: le,
|
|
3891
|
+
transform: Oe
|
|
3892
|
+
} = Zi({
|
|
3893
|
+
id: i,
|
|
3894
|
+
data: j,
|
|
3895
|
+
attributes: {
|
|
3896
|
+
...ga,
|
|
3897
|
+
...n
|
|
3898
|
+
},
|
|
3899
|
+
disabled: S.draggable
|
|
3900
|
+
}), p = As(F, Re), C = !!L, O = C && !b && jt(v) && jt(m), k = !x && G, ve = k && O ? Oe : null, P = O ? ve ?? (l ?? w)({
|
|
3901
|
+
rects: g,
|
|
3902
|
+
activeNodeRect: ee,
|
|
3903
|
+
activeIndex: v,
|
|
3904
|
+
overIndex: m,
|
|
3905
|
+
index: D
|
|
3906
|
+
}) : null, Z = jt(v) && jt(m) ? s({
|
|
3907
|
+
id: i,
|
|
3908
|
+
items: h,
|
|
3909
|
+
activeIndex: v,
|
|
3910
|
+
overIndex: m
|
|
3911
|
+
}) : D, re = L?.id, I = N({
|
|
3912
|
+
activeId: re,
|
|
3913
|
+
items: h,
|
|
3914
|
+
newIndex: Z,
|
|
3915
|
+
containerId: f
|
|
3916
|
+
}), Qe = h !== I.current.items, be = t({
|
|
3917
|
+
active: L,
|
|
3918
|
+
containerId: f,
|
|
3919
|
+
isDragging: G,
|
|
3920
|
+
isSorting: C,
|
|
3921
|
+
id: i,
|
|
3922
|
+
index: D,
|
|
3923
|
+
items: h,
|
|
3924
|
+
newIndex: I.current.newIndex,
|
|
3925
|
+
previousItems: I.current.items,
|
|
3926
|
+
previousContainerId: I.current.containerId,
|
|
3927
|
+
transition: u,
|
|
3928
|
+
wasDragging: I.current.activeId != null
|
|
3929
|
+
}), Ve = pa({
|
|
3930
|
+
disabled: !be,
|
|
3931
|
+
index: D,
|
|
3932
|
+
node: _,
|
|
3933
|
+
rect: E
|
|
3667
3934
|
});
|
|
3935
|
+
return A(() => {
|
|
3936
|
+
C && I.current.newIndex !== Z && (I.current.newIndex = Z), f !== I.current.containerId && (I.current.containerId = f), h !== I.current.items && (I.current.items = h);
|
|
3937
|
+
}, [C, Z, f, h]), A(() => {
|
|
3938
|
+
if (re === I.current.activeId)
|
|
3939
|
+
return;
|
|
3940
|
+
if (re != null && I.current.activeId == null) {
|
|
3941
|
+
I.current.activeId = re;
|
|
3942
|
+
return;
|
|
3943
|
+
}
|
|
3944
|
+
const Ye = setTimeout(() => {
|
|
3945
|
+
I.current.activeId = re;
|
|
3946
|
+
}, 50);
|
|
3947
|
+
return () => clearTimeout(Ye);
|
|
3948
|
+
}, [re]), {
|
|
3949
|
+
active: L,
|
|
3950
|
+
activeIndex: v,
|
|
3951
|
+
attributes: ae,
|
|
3952
|
+
data: j,
|
|
3953
|
+
rect: E,
|
|
3954
|
+
index: D,
|
|
3955
|
+
newIndex: Z,
|
|
3956
|
+
items: h,
|
|
3957
|
+
isOver: $,
|
|
3958
|
+
isSorting: C,
|
|
3959
|
+
isDragging: G,
|
|
3960
|
+
listeners: $e,
|
|
3961
|
+
node: _,
|
|
3962
|
+
overIndex: m,
|
|
3963
|
+
over: Pe,
|
|
3964
|
+
setNodeRef: p,
|
|
3965
|
+
setActivatorNodeRef: le,
|
|
3966
|
+
setDroppableNodeRef: F,
|
|
3967
|
+
setDraggableNodeRef: Re,
|
|
3968
|
+
transform: Ve ?? P,
|
|
3969
|
+
transition: De()
|
|
3970
|
+
};
|
|
3971
|
+
function De() {
|
|
3972
|
+
if (
|
|
3973
|
+
// Temporarily disable transitions for a single frame to set up derived transforms
|
|
3974
|
+
Ve || // Or to prevent items jumping to back to their "new" position when items change
|
|
3975
|
+
Qe && I.current.newIndex === D
|
|
3976
|
+
)
|
|
3977
|
+
return ha;
|
|
3978
|
+
if (!(k && !mn(J) || !u) && (C || be))
|
|
3979
|
+
return qe.Transition.toString({
|
|
3980
|
+
...u,
|
|
3981
|
+
property: Pr
|
|
3982
|
+
});
|
|
3983
|
+
}
|
|
3668
3984
|
}
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3985
|
+
function va(e, t) {
|
|
3986
|
+
var n, r;
|
|
3987
|
+
return typeof e == "boolean" ? {
|
|
3988
|
+
draggable: e,
|
|
3989
|
+
// Backwards compatibility
|
|
3990
|
+
droppable: !1
|
|
3991
|
+
} : {
|
|
3992
|
+
draggable: (n = e?.draggable) != null ? n : t.draggable,
|
|
3993
|
+
droppable: (r = e?.droppable) != null ? r : t.droppable
|
|
3994
|
+
};
|
|
3995
|
+
}
|
|
3996
|
+
T.Down, T.Right, T.Up, T.Left;
|
|
3997
|
+
const Fr = (e) => `table_column_order_v1:${e}`, ba = (e) => {
|
|
3673
3998
|
const { tableId: t } = fe.state;
|
|
3674
3999
|
localStorage.setItem(Fr(t), JSON.stringify(e.map((n) => n.id))), fe.setState((n) => ({
|
|
3675
4000
|
...n,
|
|
3676
4001
|
columnOrder: e
|
|
3677
4002
|
})), fe.setState((n) => ({ ...n, columnOrder: e }));
|
|
3678
|
-
},
|
|
4003
|
+
}, ma = (e) => {
|
|
3679
4004
|
fe.setState((t) => ({
|
|
3680
4005
|
...t,
|
|
3681
4006
|
visibility: { ...t.visibility, [e]: !t.visibility[e] }
|
|
3682
4007
|
}));
|
|
3683
4008
|
};
|
|
3684
|
-
function
|
|
4009
|
+
function xa(e) {
|
|
3685
4010
|
fe.setState((t) => t.sortColumn === e ? {
|
|
3686
4011
|
...t,
|
|
3687
4012
|
sortDirection: t.sortDirection === "asc" ? "desc" : "asc"
|
|
@@ -3691,7 +4016,7 @@ function Fi(e) {
|
|
|
3691
4016
|
sortDirection: "asc"
|
|
3692
4017
|
});
|
|
3693
4018
|
}
|
|
3694
|
-
const fe = new
|
|
4019
|
+
const fe = new pr({
|
|
3695
4020
|
tableId: "",
|
|
3696
4021
|
sortColumn: null,
|
|
3697
4022
|
sortDirection: "asc",
|
|
@@ -3701,7 +4026,7 @@ const fe = new gr({
|
|
|
3701
4026
|
sortableColumns: []
|
|
3702
4027
|
// ← FIXED
|
|
3703
4028
|
});
|
|
3704
|
-
function
|
|
4029
|
+
function ya(e, t) {
|
|
3705
4030
|
const n = e[0] ?? {}, o = (t && t.length ? t : Object.keys(n).map((c) => ({ id: c, label: c }))).filter(
|
|
3706
4031
|
(c) => Object.prototype.hasOwnProperty.call(n, c.id)
|
|
3707
4032
|
), { tableId: s } = fe.state, i = JSON.parse(
|
|
@@ -3715,582 +4040,261 @@ function Vi(e, t) {
|
|
|
3715
4040
|
data: e,
|
|
3716
4041
|
columnOrder: l,
|
|
3717
4042
|
visibility: l.reduce((u, h) => (u[h.id] = !0, u), {}),
|
|
3718
|
-
sortableColumns: l.map((u) => ({
|
|
3719
|
-
id: u.id,
|
|
3720
|
-
label: u.label,
|
|
3721
|
-
sortable: !0
|
|
3722
|
-
}))
|
|
3723
|
-
}));
|
|
3724
|
-
}
|
|
3725
|
-
function Yi(e) {
|
|
3726
|
-
fe.setState((t) => ({
|
|
3727
|
-
...t,
|
|
3728
|
-
tableId: e
|
|
3729
|
-
}));
|
|
3730
|
-
}
|
|
3731
|
-
const Bi = y(Se.Trigger), Hi = y(Se.Positioner), Wi = y(Se.Content), Ui = y(Se.Item), Gi = y(pe.Label), Xi = y(pe.HiddenInput), qi = y(pe.Control);
|
|
3732
|
-
function Ki({ visibility: e, onToggle: t }) {
|
|
3733
|
-
const { sortableColumns: n } = vt(fe);
|
|
3734
|
-
return /* @__PURE__ */ a.jsxs(Se.Root, { closeOnSelect: !1, children: [
|
|
3735
|
-
/* @__PURE__ */ a.jsx(Bi, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Toggle columns", variant: "outline", size: "sm", ml: "1", children: /* @__PURE__ */ a.jsx(Di, { size: 18 }) }) }),
|
|
3736
|
-
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(Hi, { children: /* @__PURE__ */ a.jsx(Wi, { minW: "220px", children: n.map((r) => {
|
|
3737
|
-
const o = !!e[r.id];
|
|
3738
|
-
return /* @__PURE__ */ a.jsx(Ui, { value: r.id, closeOnSelect: !1, children: /* @__PURE__ */ a.jsxs(pe.Root, { checked: o, onCheckedChange: () => t(r.id), children: [
|
|
3739
|
-
/* @__PURE__ */ a.jsx(Xi, {}),
|
|
3740
|
-
/* @__PURE__ */ a.jsx(qi, {}),
|
|
3741
|
-
/* @__PURE__ */ a.jsx(Gi, { children: r.label })
|
|
3742
|
-
] }) }, r.id);
|
|
3743
|
-
}) }) }) })
|
|
3744
|
-
] });
|
|
3745
|
-
}
|
|
3746
|
-
function Ji({
|
|
3747
|
-
id: e,
|
|
3748
|
-
children: t,
|
|
3749
|
-
onClick: n,
|
|
3750
|
-
cursor: r,
|
|
3751
|
-
borderRight: o,
|
|
3752
|
-
borderRightColor: s
|
|
3753
|
-
}) {
|
|
3754
|
-
const { setNodeRef: i, attributes: l, listeners: c, transform: u, transition: h } = Pr({ id: e });
|
|
3755
|
-
return /* @__PURE__ */ a.jsx(
|
|
3756
|
-
ye.ColumnHeader,
|
|
3757
|
-
{
|
|
3758
|
-
ref: i,
|
|
3759
|
-
onClick: n,
|
|
3760
|
-
w: e === "id" ? "80px" : void 0,
|
|
3761
|
-
style: {
|
|
3762
|
-
transform: qe.Transform.toString(u),
|
|
3763
|
-
transition: h,
|
|
3764
|
-
cursor: r,
|
|
3765
|
-
borderRight: o,
|
|
3766
|
-
borderRightColor: s
|
|
3767
|
-
},
|
|
3768
|
-
...l,
|
|
3769
|
-
children: /* @__PURE__ */ a.jsxs(de, { justify: "space-between", children: [
|
|
3770
|
-
t,
|
|
3771
|
-
/* @__PURE__ */ a.jsx("span", { ...c, children: /* @__PURE__ */ a.jsx(ki, { size: 12 }) })
|
|
3772
|
-
] })
|
|
3773
|
-
}
|
|
3774
|
-
);
|
|
3775
|
-
}
|
|
3776
|
-
function Zi() {
|
|
3777
|
-
const { columnOrder: e, visibility: t, sortColumn: n, sortDirection: r, sortableColumns: o } = vt(fe), s = e.map((l) => o.find((c) => c.id === l.id)).filter((l) => l !== void 0).filter((l) => t[l.id]), i = (l) => {
|
|
3778
|
-
const { active: c, over: u } = l;
|
|
3779
|
-
if (!u || c.id === u.id) return;
|
|
3780
|
-
const h = e.findIndex((d) => d.id === c.id), f = e.findIndex((d) => d.id === u.id), v = Bt(e, h, f);
|
|
3781
|
-
Pi(v);
|
|
3782
|
-
};
|
|
3783
|
-
return /* @__PURE__ */ a.jsx(ye.Header, { background: "gray.100", position: "sticky", top: 0, p: "0", children: /* @__PURE__ */ a.jsx(Ar, { collisionDetection: mr, onDragEnd: i, children: /* @__PURE__ */ a.jsx(
|
|
3784
|
-
Lr,
|
|
3785
|
-
{
|
|
3786
|
-
items: e.map((l) => l.id),
|
|
3787
|
-
strategy: qs,
|
|
3788
|
-
children: /* @__PURE__ */ a.jsxs(ye.Row, { height: "28px", children: [
|
|
3789
|
-
s.map((l, c) => {
|
|
3790
|
-
const u = n === l?.id;
|
|
3791
|
-
return /* @__PURE__ */ a.jsx(
|
|
3792
|
-
Ji,
|
|
3793
|
-
{
|
|
3794
|
-
id: l?.id,
|
|
3795
|
-
onClick: () => l?.sortable && Fi(l?.id),
|
|
3796
|
-
cursor: l?.sortable ? "pointer" : "default",
|
|
3797
|
-
borderRight: "2px solid #dcdcdc",
|
|
3798
|
-
children: /* @__PURE__ */ a.jsxs(
|
|
3799
|
-
"span",
|
|
3800
|
-
{
|
|
3801
|
-
style: {
|
|
3802
|
-
display: "flex",
|
|
3803
|
-
alignItems: "center",
|
|
3804
|
-
gap: 6,
|
|
3805
|
-
userSelect: "none"
|
|
3806
|
-
},
|
|
3807
|
-
children: [
|
|
3808
|
-
l?.label,
|
|
3809
|
-
l?.sortable && (u ? r === "asc" ? /* @__PURE__ */ a.jsx(vi, { size: 14 }) : /* @__PURE__ */ a.jsx(fi, { size: 14 }) : /* @__PURE__ */ a.jsx(gi, { size: 14, opacity: 0.4 }))
|
|
3810
|
-
]
|
|
3811
|
-
}
|
|
3812
|
-
)
|
|
3813
|
-
},
|
|
3814
|
-
l?.id
|
|
3815
|
-
);
|
|
3816
|
-
}),
|
|
3817
|
-
/* @__PURE__ */ a.jsx(ye.ColumnHeader, { borderRight: "2px solid #dcdcdc", children: "Actions" }),
|
|
3818
|
-
/* @__PURE__ */ a.jsx(ye.ColumnHeader, { boxSize: "0.5", children: /* @__PURE__ */ a.jsx(Ki, { visibility: t, onToggle: zi }) })
|
|
3819
|
-
] })
|
|
3820
|
-
}
|
|
3821
|
-
) }) });
|
|
3822
|
-
}
|
|
3823
|
-
const sr = cr({
|
|
3824
|
-
items: [
|
|
3825
|
-
{ label: "10", value: "10" },
|
|
3826
|
-
{ label: "20", value: "20" },
|
|
3827
|
-
{ label: "50", value: "50" },
|
|
3828
|
-
{ label: "100", value: "100" }
|
|
3829
|
-
]
|
|
3830
|
-
}), Qi = y(z.Positioner), ea = y(z.Content), ta = y(z.Item), na = y(It.PrevTrigger), ra = y(It.NextTrigger), oa = y(z.HiddenSelect), sa = y(z.Control), ia = y(z.Trigger), aa = y(z.ValueText), la = y(z.IndicatorGroup), ca = y(z.Indicator);
|
|
3831
|
-
function ua({
|
|
3832
|
-
totalCount: e,
|
|
3833
|
-
pageSize: t,
|
|
3834
|
-
currentPage: n,
|
|
3835
|
-
onPageChange: r,
|
|
3836
|
-
onPageSizeChange: o,
|
|
3837
|
-
siblingCount: s = 2
|
|
3838
|
-
}) {
|
|
3839
|
-
return /* @__PURE__ */ a.jsx(Ge, { width: "100%", children: /* @__PURE__ */ a.jsxs(de, { justify: "space-between", mx: "auto", flexWrap: "wrap", children: [
|
|
3840
|
-
/* @__PURE__ */ a.jsxs(de, { children: [
|
|
3841
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", color: "gray.600", _dark: { color: "gray.400" }, children: "Rows per page:" }),
|
|
3842
|
-
/* @__PURE__ */ a.jsxs(
|
|
3843
|
-
z.Root,
|
|
3844
|
-
{
|
|
3845
|
-
collection: sr,
|
|
3846
|
-
size: "sm",
|
|
3847
|
-
width: "60px",
|
|
3848
|
-
onValueChange: (i) => o && o(Number(i.items[0].value)),
|
|
3849
|
-
value: [String(t)],
|
|
3850
|
-
children: [
|
|
3851
|
-
/* @__PURE__ */ a.jsx(oa, {}),
|
|
3852
|
-
/* @__PURE__ */ a.jsxs(sa, { children: [
|
|
3853
|
-
/* @__PURE__ */ a.jsx(ia, { children: /* @__PURE__ */ a.jsx(aa, { placeholder: "" }) }),
|
|
3854
|
-
/* @__PURE__ */ a.jsx(la, { children: /* @__PURE__ */ a.jsx(ca, {}) })
|
|
3855
|
-
] }),
|
|
3856
|
-
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(Qi, { children: /* @__PURE__ */ a.jsx(ea, { children: sr.items.map((i) => /* @__PURE__ */ a.jsxs(ta, { item: i.value, children: [
|
|
3857
|
-
i.label,
|
|
3858
|
-
/* @__PURE__ */ a.jsx(z.ItemIndicator, {})
|
|
3859
|
-
] }, i.value)) }) }) })
|
|
3860
|
-
]
|
|
3861
|
-
}
|
|
3862
|
-
)
|
|
3863
|
-
] }),
|
|
3864
|
-
/* @__PURE__ */ a.jsx(
|
|
3865
|
-
It.Root,
|
|
3866
|
-
{
|
|
3867
|
-
count: e,
|
|
3868
|
-
pageSize: t,
|
|
3869
|
-
page: n,
|
|
3870
|
-
siblingCount: s,
|
|
3871
|
-
onPageChange: (i) => r && r(i.page),
|
|
3872
|
-
children: /* @__PURE__ */ a.jsxs(to, { size: "sm", variant: "ghost", children: [
|
|
3873
|
-
/* @__PURE__ */ a.jsx(na, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Previous page", children: /* @__PURE__ */ a.jsx(wi, { size: 18 }) }) }),
|
|
3874
|
-
/* @__PURE__ */ a.jsx(
|
|
3875
|
-
It.Items,
|
|
3876
|
-
{
|
|
3877
|
-
render: (i) => /* @__PURE__ */ a.jsx(
|
|
3878
|
-
_e,
|
|
3879
|
-
{
|
|
3880
|
-
variant: i.type === "page" && i.value === n ? "outline" : "ghost",
|
|
3881
|
-
"aria-current": i.type === "page" && i.value === n ? "page" : void 0,
|
|
3882
|
-
children: i.type === "page" ? i.value : "…"
|
|
3883
|
-
},
|
|
3884
|
-
i.value ?? i.type
|
|
3885
|
-
)
|
|
3886
|
-
}
|
|
3887
|
-
),
|
|
3888
|
-
/* @__PURE__ */ a.jsx(ra, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Next page", children: /* @__PURE__ */ a.jsx(Ci, { size: 18 }) }) })
|
|
3889
|
-
] })
|
|
3890
|
-
}
|
|
3891
|
-
)
|
|
3892
|
-
] }) });
|
|
4043
|
+
sortableColumns: l.map((u) => ({
|
|
4044
|
+
id: u.id,
|
|
4045
|
+
label: u.label,
|
|
4046
|
+
sortable: !0
|
|
4047
|
+
}))
|
|
4048
|
+
}));
|
|
3893
4049
|
}
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
})
|
|
3899
|
-
const { columnOrder: n, visibility: r } = vt(fe);
|
|
3900
|
-
return /* @__PURE__ */ a.jsx(ye.Body, { children: e.map((o) => /* @__PURE__ */ a.jsxs(ye.Row, { children: [
|
|
3901
|
-
n.filter((s) => r[s.id]).map((s) => /* @__PURE__ */ a.jsx(ye.Cell, { children: o[s.id] }, s.id)),
|
|
3902
|
-
/* @__PURE__ */ a.jsx(ye.Cell, { textAlign: "center", display: "flex", gap: 2, children: /* @__PURE__ */ a.jsxs(Se.Root, { children: [
|
|
3903
|
-
/* @__PURE__ */ a.jsx(ga, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Open", variant: "ghost", size: "sm", children: /* @__PURE__ */ a.jsx(Oi, { size: 16 }) }) }),
|
|
3904
|
-
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(ha, { children: /* @__PURE__ */ a.jsx(fa, { children: t.map((s) => /* @__PURE__ */ a.jsxs(
|
|
3905
|
-
da,
|
|
3906
|
-
{
|
|
3907
|
-
onClick: () => s.onClick(o),
|
|
3908
|
-
colorScheme: s.colorScheme,
|
|
3909
|
-
value: s.label,
|
|
3910
|
-
children: [
|
|
3911
|
-
s.icon,
|
|
3912
|
-
s.label
|
|
3913
|
-
]
|
|
3914
|
-
},
|
|
3915
|
-
s.label
|
|
3916
|
-
)) }) }) })
|
|
3917
|
-
] }) })
|
|
3918
|
-
] }, o.id)) });
|
|
4050
|
+
function wa(e) {
|
|
4051
|
+
fe.setState((t) => ({
|
|
4052
|
+
...t,
|
|
4053
|
+
tableId: e
|
|
4054
|
+
}));
|
|
3919
4055
|
}
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
paginationMode: v = "client"
|
|
3934
|
-
}) {
|
|
3935
|
-
A(() => {
|
|
3936
|
-
Yi(e);
|
|
3937
|
-
}, [e]), A(() => {
|
|
3938
|
-
Vi(t, n);
|
|
3939
|
-
}, [t, n]);
|
|
3940
|
-
const { sortColumn: d, sortDirection: b, data: g } = vt(fe), m = M(() => {
|
|
3941
|
-
const x = [...g];
|
|
3942
|
-
if (d && x.sort(
|
|
3943
|
-
(w, S) => b === "asc" ? String(w[d]).localeCompare(String(S[d])) : String(S[d]).localeCompare(String(w[d]))
|
|
3944
|
-
), v === "client") {
|
|
3945
|
-
const w = i * l;
|
|
3946
|
-
return x.slice(w, w + l);
|
|
3947
|
-
}
|
|
3948
|
-
return x;
|
|
3949
|
-
}, [g, d, b, i, l, v]);
|
|
3950
|
-
return /* @__PURE__ */ a.jsxs(Ge, { h: "100%", display: "flex", flexDirection: "column", p: 2, pt: 2, minHeight: 0, children: [
|
|
3951
|
-
/* @__PURE__ */ a.jsx(Ge, { flex: "1", minHeight: 0, overflow: "auto", children: r ? /* @__PURE__ */ a.jsx(Ge, { display: "flex", alignItems: "center", justifyContent: "center", h: "100%", color: "gray.500", children: "Loading..." }) : m.length === 0 ? /* @__PURE__ */ a.jsx(Ge, { display: "flex", alignItems: "center", justifyContent: "center", h: "100%", color: "gray.500", children: o }) : /* @__PURE__ */ a.jsxs(ye.Root, { variant: "outline", w: "100%", size: h, children: [
|
|
3952
|
-
/* @__PURE__ */ a.jsx(Zi, {}),
|
|
3953
|
-
/* @__PURE__ */ a.jsx(pa, { data: m, actions: s })
|
|
3954
|
-
] }) }),
|
|
3955
|
-
/* @__PURE__ */ a.jsx(Ge, { mt: 0.5, children: /* @__PURE__ */ a.jsx(
|
|
3956
|
-
ua,
|
|
3957
|
-
{
|
|
3958
|
-
totalCount: f,
|
|
3959
|
-
pageSize: l,
|
|
3960
|
-
currentPage: i,
|
|
3961
|
-
onPageChange: c,
|
|
3962
|
-
onPageSizeChange: (x) => {
|
|
3963
|
-
u && u(x), i > 1 && c && c(1);
|
|
3964
|
-
}
|
|
3965
|
-
}
|
|
3966
|
-
) })
|
|
4056
|
+
const Sa = y(Se.Trigger), Ca = y(Se.Positioner), Ra = y(Se.Content), Da = y(Se.Item), Ea = y(pe.Label), ja = y(pe.HiddenInput), _a = y(pe.Control);
|
|
4057
|
+
function Oa({ visibility: e, onToggle: t }) {
|
|
4058
|
+
const { sortableColumns: n } = vt(fe);
|
|
4059
|
+
return /* @__PURE__ */ a.jsxs(Se.Root, { closeOnSelect: !1, children: [
|
|
4060
|
+
/* @__PURE__ */ a.jsx(Sa, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Toggle columns", variant: "outline", size: "sm", ml: "1", children: /* @__PURE__ */ a.jsx(ko, { size: 18 }) }) }),
|
|
4061
|
+
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(Ca, { children: /* @__PURE__ */ a.jsx(Ra, { minW: "220px", children: n.map((r) => {
|
|
4062
|
+
const o = !!e[r.id];
|
|
4063
|
+
return /* @__PURE__ */ a.jsx(Da, { value: r.id, closeOnSelect: !1, children: /* @__PURE__ */ a.jsxs(pe.Root, { checked: o, onCheckedChange: () => t(r.id), children: [
|
|
4064
|
+
/* @__PURE__ */ a.jsx(ja, {}),
|
|
4065
|
+
/* @__PURE__ */ a.jsx(_a, {}),
|
|
4066
|
+
/* @__PURE__ */ a.jsx(Ea, { children: r.label })
|
|
4067
|
+
] }) }, r.id);
|
|
4068
|
+
}) }) }) })
|
|
3967
4069
|
] });
|
|
3968
4070
|
}
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
errorText: l
|
|
3981
|
-
}) => /* @__PURE__ */ a.jsxs(ba, { value: e, onChange: t, size: n, children: [
|
|
3982
|
-
/* @__PURE__ */ a.jsx(ma, {}),
|
|
3983
|
-
/* @__PURE__ */ a.jsx(
|
|
3984
|
-
xa,
|
|
4071
|
+
function Ta({
|
|
4072
|
+
id: e,
|
|
4073
|
+
children: t,
|
|
4074
|
+
onClick: n,
|
|
4075
|
+
cursor: r,
|
|
4076
|
+
borderRight: o,
|
|
4077
|
+
borderRightColor: s
|
|
4078
|
+
}) {
|
|
4079
|
+
const { setNodeRef: i, attributes: l, listeners: c, transform: u, transition: h } = zr({ id: e });
|
|
4080
|
+
return /* @__PURE__ */ a.jsx(
|
|
4081
|
+
ye.ColumnHeader,
|
|
3985
4082
|
{
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
4083
|
+
ref: i,
|
|
4084
|
+
onClick: n,
|
|
4085
|
+
w: e === "id" ? "80px" : void 0,
|
|
4086
|
+
style: {
|
|
4087
|
+
transform: qe.Transform.toString(u),
|
|
4088
|
+
transition: h,
|
|
4089
|
+
cursor: r,
|
|
4090
|
+
borderRight: o,
|
|
4091
|
+
borderRightColor: s
|
|
4092
|
+
},
|
|
4093
|
+
...l,
|
|
4094
|
+
children: /* @__PURE__ */ a.jsxs(de, { justify: "space-between", children: [
|
|
4095
|
+
t,
|
|
4096
|
+
/* @__PURE__ */ a.jsx("span", { ...c, children: /* @__PURE__ */ a.jsx(Vo, { size: 12 }) })
|
|
4097
|
+
] })
|
|
3990
4098
|
}
|
|
3991
|
-
)
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
const e = /* @__PURE__ */ new Date();
|
|
4000
|
-
return {
|
|
4001
|
-
year: e.getFullYear(),
|
|
4002
|
-
month: e.getMonth() + 1,
|
|
4003
|
-
day: e.getDate()
|
|
4099
|
+
);
|
|
4100
|
+
}
|
|
4101
|
+
function Ia() {
|
|
4102
|
+
const { columnOrder: e, visibility: t, sortColumn: n, sortDirection: r, sortableColumns: o } = vt(fe), s = e.map((l) => o.find((c) => c.id === l.id)).filter((l) => l !== void 0).filter((l) => t[l.id]), i = (l) => {
|
|
4103
|
+
const { active: c, over: u } = l;
|
|
4104
|
+
if (!u || c.id === u.id) return;
|
|
4105
|
+
const h = e.findIndex((d) => d.id === c.id), f = e.findIndex((d) => d.id === u.id), v = Bt(e, h, f);
|
|
4106
|
+
ba(v);
|
|
4004
4107
|
};
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
},
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
}
|
|
4043
|
-
if (e[2]?.length > 0) {
|
|
4044
|
-
const n = parseInt(e[2]), r = e[2].length === 4;
|
|
4045
|
-
if (isNaN(n) || n === 0 || r && (n < Le.YEAR_MIN || n > Le.YEAR_MAX))
|
|
4046
|
-
return t;
|
|
4047
|
-
}
|
|
4048
|
-
return null;
|
|
4049
|
-
}, at = (e) => {
|
|
4050
|
-
let t = e.replace(/[^\d-]/g, "").substring(0, ir);
|
|
4051
|
-
if (t.length >= 3 && t[2] !== "-" && (t = t.substring(0, 2) + "-" + t.substring(2).replace(/-/g, "")), t.length >= 6 && t[5] !== "-") {
|
|
4052
|
-
const o = t.split("-");
|
|
4053
|
-
o.length >= 2 && (t = `${o[0]}-${o[1].substring(0, 2)}-${o[1].substring(2)}${o[2] || ""}`);
|
|
4054
|
-
}
|
|
4055
|
-
const n = t.split("-");
|
|
4056
|
-
return n[0] = n[0]?.substring(0, 2) || "", n[1] = n[1]?.substring(0, 2) || "", n[2] = n[2]?.substring(0, 4) || "", t = n.filter((o) => o !== "").join("-"), t = t.substring(0, ir), Ra(n, e) || t;
|
|
4057
|
-
}, Da = y(Pt.Root), Ea = y(Pt.Trigger), ja = y(Pt.Content), _a = y(Pt.Positioner);
|
|
4058
|
-
function Oa({
|
|
4059
|
-
value: e,
|
|
4060
|
-
onChange: t,
|
|
4061
|
-
disabled: n = !1
|
|
4062
|
-
}) {
|
|
4063
|
-
const [r = "", o = ""] = e ? e.split("|") : [], [s, i] = Q(() => r && o ? `${he(r)}${V}${he(o)}` : r ? he(r) : ""), [l, c] = Q(!1), u = N(null);
|
|
4064
|
-
A(() => {
|
|
4065
|
-
const b = (g) => {
|
|
4066
|
-
g.ctrlKey && g.key === "d" && !g.shiftKey && !g.metaKey && (g.preventDefault(), u.current?.focus());
|
|
4067
|
-
};
|
|
4068
|
-
return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
|
|
4069
|
-
}, []);
|
|
4070
|
-
const h = (b) => {
|
|
4071
|
-
let g = b;
|
|
4072
|
-
if (g.includes(V)) {
|
|
4073
|
-
const [m, x = ""] = g.split(V);
|
|
4074
|
-
g = `${at(m.trim())}${V}${at(
|
|
4075
|
-
x.trim()
|
|
4076
|
-
)}`;
|
|
4077
|
-
} else if (g.toLowerCase().includes(" to ")) {
|
|
4078
|
-
const [m, x = ""] = g.split(/\s+to\s+/i);
|
|
4079
|
-
g = `${at(m.trim())} to ${at(x.trim())}`;
|
|
4080
|
-
} else
|
|
4081
|
-
g = at(g);
|
|
4082
|
-
i(g);
|
|
4083
|
-
}, f = () => {
|
|
4084
|
-
const b = s.trim();
|
|
4085
|
-
if (!b) {
|
|
4086
|
-
t(void 0);
|
|
4087
|
-
return;
|
|
4088
|
-
}
|
|
4089
|
-
if (b.includes(V)) {
|
|
4090
|
-
const [g, m = ""] = b.split(V).map((S) => S.trim()), x = it(g), w = m ? it(m) : null;
|
|
4091
|
-
if (x && w) {
|
|
4092
|
-
const [S, D] = w < x ? [w, x] : [x, w], j = `${he(S)}${V}${he(
|
|
4093
|
-
D
|
|
4094
|
-
)}`;
|
|
4095
|
-
i(j), t(`${S}|${D}`);
|
|
4096
|
-
} else if (x && !m)
|
|
4097
|
-
i(`${he(x)}${V}`), t(void 0);
|
|
4098
|
-
else if (x && m) {
|
|
4099
|
-
const S = Sa(), [D, j] = S < x ? [S, x] : [x, S], R = `${he(D)}${V}${he(
|
|
4100
|
-
j
|
|
4101
|
-
)}`;
|
|
4102
|
-
i(R), t(`${D}|${j}`);
|
|
4103
|
-
} else
|
|
4104
|
-
i(""), t(void 0);
|
|
4105
|
-
} else {
|
|
4106
|
-
const g = it(b);
|
|
4107
|
-
g ? (i(`${he(g)}${V}`), t(void 0)) : (i(""), t(void 0));
|
|
4108
|
-
}
|
|
4109
|
-
}, v = (b) => {
|
|
4110
|
-
if (b.key !== "Enter") return;
|
|
4111
|
-
b.preventDefault();
|
|
4112
|
-
const g = u.current?.selectionStart || 0, m = s.indexOf(V);
|
|
4113
|
-
if (!s.trim()) {
|
|
4114
|
-
i(`${ar()}${V}`);
|
|
4115
|
-
return;
|
|
4116
|
-
}
|
|
4117
|
-
if (m === -1) {
|
|
4118
|
-
const w = it(s.trim());
|
|
4119
|
-
w && i(`${he(w)}${V}`);
|
|
4120
|
-
return;
|
|
4121
|
-
}
|
|
4122
|
-
if (g <= m + V.length) {
|
|
4123
|
-
const w = s.substring(0, m).trim(), S = s.substring(m + V.length), D = it(w);
|
|
4124
|
-
D && i(`${he(D)}${V}${S}`);
|
|
4125
|
-
return;
|
|
4126
|
-
}
|
|
4127
|
-
if (s.substring(m + V.length).trim())
|
|
4128
|
-
f(), u.current?.blur();
|
|
4129
|
-
else {
|
|
4130
|
-
const w = s.substring(0, m + V.length) + ar();
|
|
4131
|
-
i(w), setTimeout(() => {
|
|
4132
|
-
f(), u.current?.blur();
|
|
4133
|
-
}, 0);
|
|
4108
|
+
return /* @__PURE__ */ a.jsx(ye.Header, { background: "gray.100", position: "sticky", top: 0, p: "0", children: /* @__PURE__ */ a.jsx(kr, { collisionDetection: xr, onDragEnd: i, children: /* @__PURE__ */ a.jsx(
|
|
4109
|
+
$r,
|
|
4110
|
+
{
|
|
4111
|
+
items: e.map((l) => l.id),
|
|
4112
|
+
strategy: ia,
|
|
4113
|
+
children: /* @__PURE__ */ a.jsxs(ye.Row, { height: "28px", children: [
|
|
4114
|
+
s.map((l, c) => {
|
|
4115
|
+
const u = n === l?.id;
|
|
4116
|
+
return /* @__PURE__ */ a.jsx(
|
|
4117
|
+
Ta,
|
|
4118
|
+
{
|
|
4119
|
+
id: l?.id,
|
|
4120
|
+
onClick: () => l?.sortable && xa(l?.id),
|
|
4121
|
+
cursor: l?.sortable ? "pointer" : "default",
|
|
4122
|
+
borderRight: "2px solid #dcdcdc",
|
|
4123
|
+
children: /* @__PURE__ */ a.jsxs(
|
|
4124
|
+
"span",
|
|
4125
|
+
{
|
|
4126
|
+
style: {
|
|
4127
|
+
display: "flex",
|
|
4128
|
+
alignItems: "center",
|
|
4129
|
+
gap: 6,
|
|
4130
|
+
userSelect: "none"
|
|
4131
|
+
},
|
|
4132
|
+
children: [
|
|
4133
|
+
l?.label,
|
|
4134
|
+
l?.sortable && (u ? r === "asc" ? /* @__PURE__ */ a.jsx(Ro, { size: 14 }) : /* @__PURE__ */ a.jsx(yo, { size: 14 }) : /* @__PURE__ */ a.jsx(So, { size: 14, opacity: 0.4 }))
|
|
4135
|
+
]
|
|
4136
|
+
}
|
|
4137
|
+
)
|
|
4138
|
+
},
|
|
4139
|
+
l?.id
|
|
4140
|
+
);
|
|
4141
|
+
}),
|
|
4142
|
+
/* @__PURE__ */ a.jsx(ye.ColumnHeader, { borderRight: "2px solid #dcdcdc", children: "Actions" }),
|
|
4143
|
+
/* @__PURE__ */ a.jsx(ye.ColumnHeader, { boxSize: "0.5", children: /* @__PURE__ */ a.jsx(Oa, { visibility: t, onToggle: ma }) })
|
|
4144
|
+
] })
|
|
4134
4145
|
}
|
|
4135
|
-
}
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4146
|
+
) }) });
|
|
4147
|
+
}
|
|
4148
|
+
const lr = dr({
|
|
4149
|
+
items: [
|
|
4150
|
+
{ label: "10", value: "10" },
|
|
4151
|
+
{ label: "20", value: "20" },
|
|
4152
|
+
{ label: "50", value: "50" },
|
|
4153
|
+
{ label: "100", value: "100" }
|
|
4154
|
+
]
|
|
4155
|
+
}), Aa = y(z.Positioner), ka = y(z.Content), Ma = y(z.Item), Na = y(It.PrevTrigger), La = y(It.NextTrigger), $a = y(z.HiddenSelect), Pa = y(z.Control), za = y(z.Trigger), Fa = y(z.ValueText), Va = y(z.IndicatorGroup), Ya = y(z.Indicator);
|
|
4156
|
+
function Ba({
|
|
4157
|
+
totalCount: e,
|
|
4158
|
+
pageSize: t,
|
|
4159
|
+
currentPage: n,
|
|
4160
|
+
onPageChange: r,
|
|
4161
|
+
onPageSizeChange: o,
|
|
4162
|
+
siblingCount: s = 2
|
|
4163
|
+
}) {
|
|
4164
|
+
return /* @__PURE__ */ a.jsx(Ge, { width: "100%", children: /* @__PURE__ */ a.jsxs(de, { justify: "space-between", mx: "auto", flexWrap: "wrap", children: [
|
|
4165
|
+
/* @__PURE__ */ a.jsxs(de, { children: [
|
|
4166
|
+
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", color: "gray.600", _dark: { color: "gray.400" }, children: "Rows per page:" }),
|
|
4167
|
+
/* @__PURE__ */ a.jsxs(
|
|
4168
|
+
z.Root,
|
|
4169
|
+
{
|
|
4170
|
+
collection: lr,
|
|
4171
|
+
size: "sm",
|
|
4172
|
+
width: "60px",
|
|
4173
|
+
onValueChange: (i) => o && o(Number(i.items[0].value)),
|
|
4174
|
+
value: [String(t)],
|
|
4175
|
+
children: [
|
|
4176
|
+
/* @__PURE__ */ a.jsx($a, {}),
|
|
4177
|
+
/* @__PURE__ */ a.jsxs(Pa, { children: [
|
|
4178
|
+
/* @__PURE__ */ a.jsx(za, { children: /* @__PURE__ */ a.jsx(Fa, { placeholder: "" }) }),
|
|
4179
|
+
/* @__PURE__ */ a.jsx(Va, { children: /* @__PURE__ */ a.jsx(Ya, {}) })
|
|
4180
|
+
] }),
|
|
4181
|
+
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(Aa, { children: /* @__PURE__ */ a.jsx(ka, { children: lr.items.map((i) => /* @__PURE__ */ a.jsxs(Ma, { item: i.value, children: [
|
|
4182
|
+
i.label,
|
|
4183
|
+
/* @__PURE__ */ a.jsx(z.ItemIndicator, {})
|
|
4184
|
+
] }, i.value)) }) }) })
|
|
4185
|
+
]
|
|
4186
|
+
}
|
|
4187
|
+
)
|
|
4188
|
+
] }),
|
|
4189
|
+
/* @__PURE__ */ a.jsx(
|
|
4190
|
+
It.Root,
|
|
4141
4191
|
{
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4192
|
+
count: e,
|
|
4193
|
+
pageSize: t,
|
|
4194
|
+
page: n,
|
|
4195
|
+
siblingCount: s,
|
|
4196
|
+
onPageChange: (i) => r && r(i.page),
|
|
4197
|
+
children: /* @__PURE__ */ a.jsxs(no, { size: "sm", variant: "ghost", children: [
|
|
4198
|
+
/* @__PURE__ */ a.jsx(Na, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Previous page", children: /* @__PURE__ */ a.jsx(Oo, { size: 18 }) }) }),
|
|
4199
|
+
/* @__PURE__ */ a.jsx(
|
|
4200
|
+
It.Items,
|
|
4149
4201
|
{
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4202
|
+
render: (i) => /* @__PURE__ */ a.jsx(
|
|
4203
|
+
_e,
|
|
4204
|
+
{
|
|
4205
|
+
variant: i.type === "page" && i.value === n ? "outline" : "ghost",
|
|
4206
|
+
"aria-current": i.type === "page" && i.value === n ? "page" : void 0,
|
|
4207
|
+
children: i.type === "page" ? i.value : "…"
|
|
4208
|
+
},
|
|
4209
|
+
i.value ?? i.type
|
|
4210
|
+
)
|
|
4155
4211
|
}
|
|
4156
|
-
)
|
|
4157
|
-
/* @__PURE__ */ a.jsx(
|
|
4158
|
-
|
|
4159
|
-
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 4, children: [
|
|
4160
|
-
/* @__PURE__ */ a.jsxs(de, { children: [
|
|
4161
|
-
/* @__PURE__ */ a.jsx(or, { size: 16 }),
|
|
4162
|
-
/* @__PURE__ */ a.jsx(U, { fontWeight: "semibold", fontSize: "sm", children: "Date Range Filter" })
|
|
4163
|
-
] }),
|
|
4164
|
-
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 1, children: [
|
|
4165
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", fontWeight: "medium", children: "Format:" }),
|
|
4166
|
-
/* @__PURE__ */ a.jsxs(U, { fontSize: "xs", color: "gray.600", children: [
|
|
4167
|
-
"DD-MM-YYYY",
|
|
4168
|
-
V,
|
|
4169
|
-
"DD-MM-YYYY"
|
|
4170
|
-
] })
|
|
4171
|
-
] }),
|
|
4172
|
-
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 1, children: [
|
|
4173
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", fontWeight: "medium", children: "Tips:" }),
|
|
4174
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: '• "15 to 20" → assumes current month/year' }),
|
|
4175
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: "• Leave end blank → up to today" }),
|
|
4176
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: "• Dates auto-swapped if reversed" }),
|
|
4177
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "xs", children: "• Press Enter on empty end → fills today" })
|
|
4178
|
-
] }),
|
|
4179
|
-
/* @__PURE__ */ a.jsxs(je, { align: "start", gap: 1, children: [
|
|
4180
|
-
/* @__PURE__ */ a.jsx(U, { fontSize: "sm", fontWeight: "medium", children: "Shortcut:" }),
|
|
4181
|
-
/* @__PURE__ */ a.jsxs(de, { children: [
|
|
4182
|
-
/* @__PURE__ */ a.jsx(kn, { children: "Ctrl" }),
|
|
4183
|
-
/* @__PURE__ */ a.jsx(U, { children: "+" }),
|
|
4184
|
-
/* @__PURE__ */ a.jsx(kn, { children: "D" })
|
|
4185
|
-
] })
|
|
4186
|
-
] })
|
|
4187
|
-
] })
|
|
4188
|
-
] }) }) })
|
|
4189
|
-
]
|
|
4190
|
-
}
|
|
4191
|
-
),
|
|
4192
|
-
/* @__PURE__ */ a.jsx(
|
|
4193
|
-
dr,
|
|
4194
|
-
{
|
|
4195
|
-
ref: u,
|
|
4196
|
-
placeholder: "15-06-2025 to 20-06-2025",
|
|
4197
|
-
value: s,
|
|
4198
|
-
size: "sm",
|
|
4199
|
-
disabled: n,
|
|
4200
|
-
onChange: (b) => h(b.target.value),
|
|
4201
|
-
onBlur: f,
|
|
4202
|
-
onKeyDown: v,
|
|
4203
|
-
pr: s ? "10" : void 0,
|
|
4204
|
-
w: "100%"
|
|
4205
|
-
}
|
|
4206
|
-
),
|
|
4207
|
-
s && /* @__PURE__ */ a.jsx(An, { children: /* @__PURE__ */ a.jsx(
|
|
4208
|
-
_e,
|
|
4209
|
-
{
|
|
4210
|
-
size: "sm",
|
|
4211
|
-
variant: "ghost",
|
|
4212
|
-
"aria-label": "Clear date range",
|
|
4213
|
-
onClick: d,
|
|
4214
|
-
w: "100%"
|
|
4212
|
+
),
|
|
4213
|
+
/* @__PURE__ */ a.jsx(La, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Next page", children: /* @__PURE__ */ a.jsx(Io, { size: 18 }) }) })
|
|
4214
|
+
] })
|
|
4215
4215
|
}
|
|
4216
|
-
)
|
|
4217
|
-
] }) })
|
|
4216
|
+
)
|
|
4217
|
+
] }) });
|
|
4218
4218
|
}
|
|
4219
|
-
const
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4219
|
+
const Ha = y(Se.Item), Wa = y(Se.Content), Ua = y(Se.Positioner), Ga = y(Se.Trigger);
|
|
4220
|
+
function Xa({
|
|
4221
|
+
data: e = [],
|
|
4222
|
+
actions: t = []
|
|
4223
|
+
}) {
|
|
4224
|
+
const { columnOrder: n, visibility: r } = vt(fe);
|
|
4225
|
+
return /* @__PURE__ */ a.jsx(ye.Body, { children: e.map((o) => /* @__PURE__ */ a.jsxs(ye.Row, { children: [
|
|
4226
|
+
n.filter((s) => r[s.id]).map((s) => /* @__PURE__ */ a.jsx(ye.Cell, { children: o[s.id] }, s.id)),
|
|
4227
|
+
/* @__PURE__ */ a.jsx(ye.Cell, { textAlign: "center", display: "flex", gap: 2, children: /* @__PURE__ */ a.jsxs(Se.Root, { children: [
|
|
4228
|
+
/* @__PURE__ */ a.jsx(Ga, { asChild: !0, children: /* @__PURE__ */ a.jsx(_e, { "aria-label": "Open", variant: "ghost", size: "sm", children: /* @__PURE__ */ a.jsx($o, { size: 16 }) }) }),
|
|
4229
|
+
/* @__PURE__ */ a.jsx(gt, { children: /* @__PURE__ */ a.jsx(Ua, { children: /* @__PURE__ */ a.jsx(Wa, { children: t.map((s) => /* @__PURE__ */ a.jsxs(
|
|
4230
|
+
Ha,
|
|
4231
|
+
{
|
|
4232
|
+
onClick: () => s.onClick(o),
|
|
4233
|
+
colorScheme: s.colorScheme,
|
|
4234
|
+
value: s.label,
|
|
4235
|
+
children: [
|
|
4236
|
+
s.icon,
|
|
4237
|
+
s.label
|
|
4238
|
+
]
|
|
4239
|
+
},
|
|
4240
|
+
s.label
|
|
4241
|
+
)) }) }) })
|
|
4242
|
+
] }) })
|
|
4243
|
+
] }, o.id)) });
|
|
4244
|
+
}
|
|
4245
|
+
function qa({
|
|
4246
|
+
tableId: e,
|
|
4247
|
+
data: t = [],
|
|
4248
|
+
headers: n = [],
|
|
4249
|
+
loading: r = !1,
|
|
4250
|
+
emptyMessage: o = "No data",
|
|
4251
|
+
actions: s,
|
|
4252
|
+
page: i = 1,
|
|
4253
|
+
pageSize: l = 10,
|
|
4254
|
+
onPageChange: c,
|
|
4255
|
+
onPageSizeChange: u,
|
|
4256
|
+
density: h = "sm",
|
|
4257
|
+
totalCount: f = 0,
|
|
4258
|
+
paginationMode: v = "client"
|
|
4259
|
+
}) {
|
|
4260
|
+
A(() => {
|
|
4261
|
+
wa(e);
|
|
4262
|
+
}, [e]), A(() => {
|
|
4263
|
+
ya(t, n);
|
|
4264
|
+
}, [t, n]);
|
|
4265
|
+
const { sortColumn: d, sortDirection: b, data: g } = vt(fe), m = M(() => {
|
|
4266
|
+
const x = [...g];
|
|
4267
|
+
if (d && x.sort(
|
|
4268
|
+
(w, S) => b === "asc" ? String(w[d]).localeCompare(String(S[d])) : String(S[d]).localeCompare(String(w[d]))
|
|
4269
|
+
), v === "client") {
|
|
4270
|
+
const w = i * l;
|
|
4271
|
+
return x.slice(w, w + l);
|
|
4245
4272
|
}
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
size: s = "sm",
|
|
4256
|
-
width: i = "100%",
|
|
4257
|
-
variant: l = "outline",
|
|
4258
|
-
helperText: c,
|
|
4259
|
-
isDisabled: u,
|
|
4260
|
-
required: h,
|
|
4261
|
-
errorText: f
|
|
4262
|
-
}) => {
|
|
4263
|
-
const v = cr({
|
|
4264
|
-
items: e
|
|
4265
|
-
});
|
|
4266
|
-
return /* @__PURE__ */ a.jsxs(Ma, { disabled: u, required: h, children: [
|
|
4267
|
-
/* @__PURE__ */ a.jsxs(
|
|
4268
|
-
$a,
|
|
4273
|
+
return x;
|
|
4274
|
+
}, [g, d, b, i, l, v]);
|
|
4275
|
+
return /* @__PURE__ */ a.jsxs(Ge, { h: "100%", display: "flex", flexDirection: "column", p: 2, pt: 2, minHeight: 0, children: [
|
|
4276
|
+
/* @__PURE__ */ a.jsx(Ge, { flex: "1", minHeight: 0, overflow: "auto", children: r ? /* @__PURE__ */ a.jsx(Ge, { display: "flex", alignItems: "center", justifyContent: "center", h: "100%", color: "gray.500", children: "Loading..." }) : m.length === 0 ? /* @__PURE__ */ a.jsx(Ge, { display: "flex", alignItems: "center", justifyContent: "center", h: "100%", color: "gray.500", children: o }) : /* @__PURE__ */ a.jsxs(ye.Root, { variant: "outline", w: "100%", size: h, children: [
|
|
4277
|
+
/* @__PURE__ */ a.jsx(Ia, {}),
|
|
4278
|
+
/* @__PURE__ */ a.jsx(Xa, { data: m, actions: s })
|
|
4279
|
+
] }) }),
|
|
4280
|
+
/* @__PURE__ */ a.jsx(Ge, { mt: 0.5, children: /* @__PURE__ */ a.jsx(
|
|
4281
|
+
Ba,
|
|
4269
4282
|
{
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
/* @__PURE__ */ a.jsx(Ga, {}),
|
|
4278
|
-
t && /* @__PURE__ */ a.jsx(Pa, { children: t }),
|
|
4279
|
-
/* @__PURE__ */ a.jsxs(za, { children: [
|
|
4280
|
-
/* @__PURE__ */ a.jsx(Fa, { children: /* @__PURE__ */ a.jsx(Va, { placeholder: o }) }),
|
|
4281
|
-
/* @__PURE__ */ a.jsx(Ya, { children: /* @__PURE__ */ a.jsx(Ba, {}) })
|
|
4282
|
-
] }),
|
|
4283
|
-
/* @__PURE__ */ a.jsx(Xa, { children: /* @__PURE__ */ a.jsx(Ha, { children: v.items.map((d) => /* @__PURE__ */ a.jsxs(Wa, { item: d, children: [
|
|
4284
|
-
d.label,
|
|
4285
|
-
/* @__PURE__ */ a.jsx(Ua, {})
|
|
4286
|
-
] }, d.value)) }) })
|
|
4287
|
-
]
|
|
4283
|
+
totalCount: f,
|
|
4284
|
+
pageSize: l,
|
|
4285
|
+
currentPage: i,
|
|
4286
|
+
onPageChange: c,
|
|
4287
|
+
onPageSizeChange: (x) => {
|
|
4288
|
+
u && u(x), i > 1 && c && c(1);
|
|
4289
|
+
}
|
|
4288
4290
|
}
|
|
4289
|
-
)
|
|
4290
|
-
c && /* @__PURE__ */ a.jsx(Na, { children: c }),
|
|
4291
|
-
f && /* @__PURE__ */ a.jsx(La, { children: f })
|
|
4291
|
+
) })
|
|
4292
4292
|
] });
|
|
4293
|
-
}
|
|
4293
|
+
}
|
|
4294
|
+
const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4295
|
+
__proto__: null,
|
|
4296
|
+
default: qa
|
|
4297
|
+
}, Symbol.toStringTag, { value: "Module" })), Vr = (e) => `FILTER_PRESETS_${e ?? "default"}`;
|
|
4294
4298
|
function Ka(e) {
|
|
4295
4299
|
try {
|
|
4296
4300
|
return JSON.parse(localStorage.getItem(Vr(e)) || "[]");
|
|
@@ -4298,7 +4302,7 @@ function Ka(e) {
|
|
|
4298
4302
|
return [];
|
|
4299
4303
|
}
|
|
4300
4304
|
}
|
|
4301
|
-
const $t = new
|
|
4305
|
+
const $t = new pr({}), Cn = (e) => {
|
|
4302
4306
|
const t = $t.state[e];
|
|
4303
4307
|
if (t) return t;
|
|
4304
4308
|
const n = Ka(e);
|
|
@@ -4318,7 +4322,7 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4318
4322
|
const n = [t, ...Cn(e)];
|
|
4319
4323
|
Yr(e, n);
|
|
4320
4324
|
}, Qa = y(pe.Root), el = y(pe.HiddenInput), tl = y(pe.Control), nl = y(pt.Root), rl = y(pt.Track), ol = y(pt.Range), sl = y(pt.Thumbs), il = y(pt.Control), al = ({ filter: e, onVisibilityChange: t, onSizeChange: n }) => {
|
|
4321
|
-
const { attributes: r, listeners: o, setNodeRef: s, transform: i, transition: l } =
|
|
4325
|
+
const { attributes: r, listeners: o, setNodeRef: s, transform: i, transition: l } = zr({
|
|
4322
4326
|
id: e.id
|
|
4323
4327
|
}), c = {
|
|
4324
4328
|
transform: qe.Transform.toString(i),
|
|
@@ -4382,7 +4386,7 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4382
4386
|
switch (e.type) {
|
|
4383
4387
|
case "text":
|
|
4384
4388
|
return /* @__PURE__ */ a.jsx(
|
|
4385
|
-
|
|
4389
|
+
Vn,
|
|
4386
4390
|
{
|
|
4387
4391
|
placeholder: e.label,
|
|
4388
4392
|
value: e.value,
|
|
@@ -4391,10 +4395,10 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4391
4395
|
}
|
|
4392
4396
|
);
|
|
4393
4397
|
case "number":
|
|
4394
|
-
return /* @__PURE__ */ a.jsx(
|
|
4398
|
+
return /* @__PURE__ */ a.jsx(Vn, { label: e.label, value: e.value, onChange: e.onChange });
|
|
4395
4399
|
case "checkbox":
|
|
4396
4400
|
return /* @__PURE__ */ a.jsx(
|
|
4397
|
-
|
|
4401
|
+
ho,
|
|
4398
4402
|
{
|
|
4399
4403
|
label: e.label,
|
|
4400
4404
|
value: e.value,
|
|
@@ -4403,7 +4407,7 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4403
4407
|
);
|
|
4404
4408
|
case "select":
|
|
4405
4409
|
return /* @__PURE__ */ a.jsx(
|
|
4406
|
-
|
|
4410
|
+
xs,
|
|
4407
4411
|
{
|
|
4408
4412
|
label: e.label,
|
|
4409
4413
|
value: e.value,
|
|
@@ -4413,7 +4417,7 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4413
4417
|
);
|
|
4414
4418
|
case "date":
|
|
4415
4419
|
return /* @__PURE__ */ a.jsx(
|
|
4416
|
-
|
|
4420
|
+
Qo,
|
|
4417
4421
|
{
|
|
4418
4422
|
value: e.value,
|
|
4419
4423
|
onChange: e.onChange
|
|
@@ -4445,7 +4449,7 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4445
4449
|
};
|
|
4446
4450
|
return /* @__PURE__ */ a.jsx(de, { wrap: "wrap", children: /* @__PURE__ */ a.jsxs(ll, { size: e, children: [
|
|
4447
4451
|
/* @__PURE__ */ a.jsx(cl, { asChild: !0, children: /* @__PURE__ */ a.jsxs(_e, { "aria-label": "Open filters", variant: "outline", size: "xs", ml: 2, p: 2, children: [
|
|
4448
|
-
/* @__PURE__ */ a.jsx(
|
|
4452
|
+
/* @__PURE__ */ a.jsx(zo, { size: 16 }),
|
|
4449
4453
|
"Filters"
|
|
4450
4454
|
] }) }),
|
|
4451
4455
|
/* @__PURE__ */ a.jsxs(gt, { children: [
|
|
@@ -4455,15 +4459,15 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4455
4459
|
/* @__PURE__ */ a.jsx(pl, { overflowY: "auto", pt: 1, children: /* @__PURE__ */ a.jsxs(ml, { defaultValue: "view", children: [
|
|
4456
4460
|
/* @__PURE__ */ a.jsxs(xl, { mb: 4, children: [
|
|
4457
4461
|
/* @__PURE__ */ a.jsxs(rn, { value: "view", children: [
|
|
4458
|
-
/* @__PURE__ */ a.jsx(
|
|
4462
|
+
/* @__PURE__ */ a.jsx(Bo, { size: 16 }),
|
|
4459
4463
|
"Edit"
|
|
4460
4464
|
] }),
|
|
4461
4465
|
/* @__PURE__ */ a.jsxs(rn, { value: "settings", children: [
|
|
4462
|
-
/* @__PURE__ */ a.jsx(
|
|
4466
|
+
/* @__PURE__ */ a.jsx(Wo, { size: 16 }),
|
|
4463
4467
|
"Settings"
|
|
4464
4468
|
] }),
|
|
4465
4469
|
/* @__PURE__ */ a.jsxs(rn, { value: "presets", children: [
|
|
4466
|
-
/* @__PURE__ */ a.jsx(
|
|
4470
|
+
/* @__PURE__ */ a.jsx(Eo, { size: 16 }),
|
|
4467
4471
|
"Presets"
|
|
4468
4472
|
] })
|
|
4469
4473
|
] }),
|
|
@@ -4483,20 +4487,20 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4483
4487
|
d.id
|
|
4484
4488
|
)) }),
|
|
4485
4489
|
/* @__PURE__ */ a.jsx(on, { value: "settings", children: /* @__PURE__ */ a.jsx(
|
|
4486
|
-
|
|
4490
|
+
kr,
|
|
4487
4491
|
{
|
|
4488
|
-
sensors:
|
|
4489
|
-
collisionDetection:
|
|
4492
|
+
sensors: Gs(Us(Sn)),
|
|
4493
|
+
collisionDetection: xr,
|
|
4490
4494
|
onDragEnd: ({ active: d, over: b }) => {
|
|
4491
4495
|
if (!b || d.id === b.id) return;
|
|
4492
4496
|
const g = o.findIndex((w) => w.id === d.id), m = o.findIndex((w) => w.id === b.id), x = Bt(o, g, m);
|
|
4493
4497
|
u?.(x);
|
|
4494
4498
|
},
|
|
4495
4499
|
children: /* @__PURE__ */ a.jsx(
|
|
4496
|
-
|
|
4500
|
+
$r,
|
|
4497
4501
|
{
|
|
4498
4502
|
items: o.map((d) => d.id),
|
|
4499
|
-
strategy:
|
|
4503
|
+
strategy: la,
|
|
4500
4504
|
children: o.map((d) => /* @__PURE__ */ a.jsx(
|
|
4501
4505
|
al,
|
|
4502
4506
|
{
|
|
@@ -4543,7 +4547,7 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4543
4547
|
"aria-label": "Delete preset",
|
|
4544
4548
|
variant: "ghost",
|
|
4545
4549
|
onClick: () => Ja(s, d.id),
|
|
4546
|
-
children: /* @__PURE__ */ a.jsx(
|
|
4550
|
+
children: /* @__PURE__ */ a.jsx(No, { size: 14 })
|
|
4547
4551
|
}
|
|
4548
4552
|
)
|
|
4549
4553
|
] })
|
|
@@ -4603,15 +4607,13 @@ const $t = new gr({}), Cn = (e) => {
|
|
|
4603
4607
|
}
|
|
4604
4608
|
)
|
|
4605
4609
|
] })
|
|
4606
|
-
] }),
|
|
4610
|
+
] }), _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4607
4611
|
__proto__: null,
|
|
4608
4612
|
FilterToolBar: wl
|
|
4609
|
-
}, Symbol.toStringTag, { value: "Module" })), _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4610
|
-
__proto__: null
|
|
4611
4613
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4612
4614
|
export {
|
|
4613
4615
|
Dl as ChakraSlot,
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4616
|
+
jl as DataTable,
|
|
4617
|
+
_l as Filters,
|
|
4618
|
+
El as MdsSharedUi
|
|
4617
4619
|
};
|