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