@funcd-dev/ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/logo/funcd-logo.d.ts +14 -0
- package/dist/atoms/logo/funcd-wordmark.d.ts +11 -0
- package/dist/atoms/logo/index.d.ts +4 -0
- package/dist/index.es.js +876 -784
- package/dist/index.umd.js +77 -1
- package/package.json +2 -1
package/dist/index.es.js
CHANGED
|
@@ -1242,6 +1242,98 @@ var jn = {
|
|
|
1242
1242
|
]
|
|
1243
1243
|
});
|
|
1244
1244
|
}, Fn = (e) => {
|
|
1245
|
+
let { accentColor: t = "var(--mantine-primary-color-9, #6D5CE7)", color: n = "#FFFFFF", size: r = 48, ...i } = e;
|
|
1246
|
+
return /* @__PURE__ */ V("svg", {
|
|
1247
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1248
|
+
viewBox: "120 96 1024 1024",
|
|
1249
|
+
fill: "none",
|
|
1250
|
+
color: n,
|
|
1251
|
+
role: "img",
|
|
1252
|
+
"aria-label": "Funcd",
|
|
1253
|
+
focusable: "false",
|
|
1254
|
+
...i,
|
|
1255
|
+
width: r,
|
|
1256
|
+
height: r,
|
|
1257
|
+
children: [
|
|
1258
|
+
/* @__PURE__ */ V("g", {
|
|
1259
|
+
"data-part": "frame",
|
|
1260
|
+
fill: "currentColor",
|
|
1261
|
+
children: [/* @__PURE__ */ B("path", {
|
|
1262
|
+
"data-part": "frame-top-left",
|
|
1263
|
+
d: "M270 814 268 355C268 287 325 231 392 231H864C909 231 946 255 967 294C938 296 910 301 885 307C878 305 871 305 863 305H398C366 305 341 327 341 355V810C316 813 293 814 270 814Z"
|
|
1264
|
+
}), /* @__PURE__ */ B("path", {
|
|
1265
|
+
"data-part": "frame-bottom-right",
|
|
1266
|
+
d: "M913 412C937 406 961 403 986 401V862C986 931 932 986 863 986H391C349 986 312 964 291 929C341 927 388 920 430 910H858C890 910 913 887 913 858Z"
|
|
1267
|
+
})]
|
|
1268
|
+
}),
|
|
1269
|
+
/* @__PURE__ */ B("path", {
|
|
1270
|
+
"data-part": "ribbon-input",
|
|
1271
|
+
fill: "currentColor",
|
|
1272
|
+
d: "M261 827C421 830 511 779 572 653L617 563C619 573 622 581 626 587L607 621 637 657C648 677 649 697 638 720C592 824 519 885 406 909C360 919 311 921 261 918C287 895 287 854 261 827Z"
|
|
1273
|
+
}),
|
|
1274
|
+
/* @__PURE__ */ B("path", {
|
|
1275
|
+
"data-part": "ribbon-output",
|
|
1276
|
+
fill: t,
|
|
1277
|
+
d: "M1006 302C817 299 692 389 629 537C623 555 632 575 644 588L669 618 648 654 655 680C694 614 724 548 766 495C824 425 902 387 1006 388C982 366 982 324 1006 302Z"
|
|
1278
|
+
}),
|
|
1279
|
+
/* @__PURE__ */ B("circle", {
|
|
1280
|
+
"data-part": "input-dot",
|
|
1281
|
+
cx: "202",
|
|
1282
|
+
cy: "875.5",
|
|
1283
|
+
r: "59",
|
|
1284
|
+
fill: t
|
|
1285
|
+
}),
|
|
1286
|
+
/* @__PURE__ */ B("circle", {
|
|
1287
|
+
"data-part": "output-dot",
|
|
1288
|
+
cx: "1063",
|
|
1289
|
+
cy: "344",
|
|
1290
|
+
r: "56",
|
|
1291
|
+
fill: "currentColor"
|
|
1292
|
+
})
|
|
1293
|
+
]
|
|
1294
|
+
});
|
|
1295
|
+
}, In = (e) => {
|
|
1296
|
+
let { color: t = "#FFFFFF", width: n = 160, height: r, ...i } = e;
|
|
1297
|
+
return /* @__PURE__ */ V("svg", {
|
|
1298
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1299
|
+
viewBox: "-1 -1 398 81",
|
|
1300
|
+
fill: "currentColor",
|
|
1301
|
+
fillRule: "evenodd",
|
|
1302
|
+
color: t,
|
|
1303
|
+
role: "img",
|
|
1304
|
+
"aria-label": "Funcd",
|
|
1305
|
+
focusable: "false",
|
|
1306
|
+
...i,
|
|
1307
|
+
width: n,
|
|
1308
|
+
height: r,
|
|
1309
|
+
children: [
|
|
1310
|
+
/* @__PURE__ */ B("path", {
|
|
1311
|
+
"data-part": "letter-f",
|
|
1312
|
+
d: "M50 0\n C57 0 63.3 0.6 68.8 2\n C70.3 2.38 71 3.35 71 5\n C71 7.7 69.7 12.4 67.6 14.65\n C67.04 15.25 66.3 15.6 65.3 15.6\n C62.4 15.6 57.7 14.5 50 14.5\n C36 14.5 28.5 18.8 28.5 27\n C28.5 27.55 28.95 28 29.5 28\n L49.5 28\n C52.5 28 54.2 30.3 54.2 35.1\n C54.2 39.9 52.5 42.2 49.5 42.2\n L29.3 42.2\n C28.75 42.2 28.3 42.65 28.3 43.2\n L28.3 70.7\n C28.3 75 24.4 78.3 19.5 78.3\n C14.6 78.3 10.7 75 10.7 70.7\n L10.7 43.2\n C10.7 42.65 10.25 42.2 9.7 42.2\n L4.5 42.2\n C1.5 42.2 0 40.5 0 37.5\n L0 32.7\n C0 29.7 1.5 28 4.5 28\n L9.8 28\n C10.35 28 10.8 27.55 10.8 27\n C10.8 10.2 23.4 0 50 0Z"
|
|
1313
|
+
}),
|
|
1314
|
+
/* @__PURE__ */ B("path", {
|
|
1315
|
+
"data-part": "letter-u",
|
|
1316
|
+
transform: "translate(63.83 0)",
|
|
1317
|
+
d: "M8.8 25.2\n C13.66 25.2 17.6 28.56 17.6 32.7\n L17.6 50.5\n C17.6 59.4 25 64.1 39.5 64.1\n C54 64.1 61.7 59.4 61.7 50.5\n L61.7 32.7\n C61.7 28.56 65.64 25.2 70.5 25.2\n C75.36 25.2 79.3 28.56 79.3 32.7\n L79.3 51\n C79.3 69.6 65.2 78.7 39.5 78.7\n C13.8 78.7 0 69.6 0 51\n L0 32.7\n C0 28.56 3.94 25.2 8.8 25.2Z"
|
|
1318
|
+
}),
|
|
1319
|
+
/* @__PURE__ */ B("path", {
|
|
1320
|
+
"data-part": "letter-n",
|
|
1321
|
+
transform: "translate(149.22 0)",
|
|
1322
|
+
d: "M0 51\n C0 33.2 14.5 26.2 39.5 26.2\n C65 26.2 78.9 33.6 78.9 51\n L78.9 70.8\n C78.9 75 75 78.3 70.2 78.3\n C65.4 78.3 61.5 75 61.5 70.8\n L61.5 53\n C61.5 45 54.2 40.6 39.5 40.6\n C24.8 40.6 17.6 45 17.6 53\n L17.6 70.8\n C17.6 75 13.7 78.3 8.8 78.3\n C3.9 78.3 0 75 0 70.8\n L0 51Z"
|
|
1323
|
+
}),
|
|
1324
|
+
/* @__PURE__ */ B("path", {
|
|
1325
|
+
"data-part": "letter-c",
|
|
1326
|
+
transform: "translate(233.16 0)",
|
|
1327
|
+
d: "M41.5 24.1\n C54 24.1 64.4 26 71.6 29.6\n C73.9 30.75 75.1 32.3 75.1 34.5\n C75.1 38.9 71.2 43.1 67.3 43.1\n C64.3 43.1 60.5 40.4 55.5 39.2\n C51.2 38.168 46.7 37.8 41.5 37.8\n C25.3 37.8 17.6 42.5 17.6 51.4\n C17.6 60.3 25.3 65.2 41.5 65.2\n C46.7 65.2 51.2 64.832 55.5 63.8\n C60.5 62.6 64.3 59.7 67.3 59.7\n C71.2 59.7 75.1 63.9 75.1 68.5\n C75.1 70.7 73.9 72.45 71.6 73.6\n C64.4 77.2 54 78.9 41.5 78.9\n C14.8 78.9 0 69.5 0 51.4\n C0 33.3 14.8 24.1 41.5 24.1Z"
|
|
1328
|
+
}),
|
|
1329
|
+
/* @__PURE__ */ B("path", {
|
|
1330
|
+
"data-part": "letter-d",
|
|
1331
|
+
transform: "translate(313.05 0)",
|
|
1332
|
+
d: "M74.2 0.4\n C79 0.4 82.8 3.6 82.8 7.6\n L82.8 51.5\n C82.8 69.2 68.4 78.9 42 78.9\n C14.5 78.9 0 69.4 0 51.5\n C0 33.4 14.5 24.1 42 24.1\n C51.5 24.1 58.8 25.8 64.6 28.6\n C65.2 28.89 65.5 28.6 65.5 28\n L65.5 7.6\n C65.5 3.6 69.4 0.4 74.2 0.4Z\n M42 37.7\n C26 37.7 17.5 42.4 17.5 51.5\n C17.5 60.6 26 65.4 42 65.4\n C58 65.4 65.3 60.6 65.3 51.5\n C65.3 42.4 58 37.7 42 37.7Z"
|
|
1333
|
+
})
|
|
1334
|
+
]
|
|
1335
|
+
});
|
|
1336
|
+
}, Ln = (e) => {
|
|
1245
1337
|
let { to: t, children: n, handleIsActive: r, ...i } = e, a = $e({
|
|
1246
1338
|
path: tt(t).pathname,
|
|
1247
1339
|
end: !0
|
|
@@ -1253,7 +1345,7 @@ var jn = {
|
|
|
1253
1345
|
...i,
|
|
1254
1346
|
children: n
|
|
1255
1347
|
});
|
|
1256
|
-
},
|
|
1348
|
+
}, Rn = (t) => {
|
|
1257
1349
|
let n = A();
|
|
1258
1350
|
return /* @__PURE__ */ B(D, {
|
|
1259
1351
|
leftSection: /* @__PURE__ */ B(Ie, {
|
|
@@ -1276,7 +1368,7 @@ var jn = {
|
|
|
1276
1368
|
rightSectionWidth: 42,
|
|
1277
1369
|
...t
|
|
1278
1370
|
});
|
|
1279
|
-
},
|
|
1371
|
+
}, zn = (t) => {
|
|
1280
1372
|
let { colorScheme: n, toggleColorScheme: r } = de();
|
|
1281
1373
|
return /* @__PURE__ */ B(e, {
|
|
1282
1374
|
variant: "default",
|
|
@@ -1286,7 +1378,7 @@ var jn = {
|
|
|
1286
1378
|
...t,
|
|
1287
1379
|
children: B(n === "dark" ? H : Me, { size: 16 })
|
|
1288
1380
|
});
|
|
1289
|
-
},
|
|
1381
|
+
}, Bn = ({ ...e }) => {
|
|
1290
1382
|
let { children: t } = e, n = et(), r = A();
|
|
1291
1383
|
return /* @__PURE__ */ B(z, { children: /* @__PURE__ */ B(l, {
|
|
1292
1384
|
opened: !0,
|
|
@@ -1306,14 +1398,14 @@ var jn = {
|
|
|
1306
1398
|
children: t
|
|
1307
1399
|
})
|
|
1308
1400
|
}) });
|
|
1309
|
-
},
|
|
1401
|
+
}, Vn = { root: "_root_mt2jj_2" }, Hn = {
|
|
1310
1402
|
up: Ee,
|
|
1311
1403
|
down: we
|
|
1312
|
-
},
|
|
1313
|
-
let { label: t, stats: n, progress: i, color: a, icon: s, ...c } = e, l =
|
|
1404
|
+
}, Un = (e) => {
|
|
1405
|
+
let { label: t, stats: n, progress: i, color: a, icon: s, ...c } = e, l = Hn[s];
|
|
1314
1406
|
return /* @__PURE__ */ B(r, {
|
|
1315
1407
|
p: "md",
|
|
1316
|
-
className:
|
|
1408
|
+
className: Vn.root,
|
|
1317
1409
|
...c,
|
|
1318
1410
|
children: /* @__PURE__ */ V(p, { children: [/* @__PURE__ */ B(ee, {
|
|
1319
1411
|
size: 80,
|
|
@@ -1342,17 +1434,17 @@ var jn = {
|
|
|
1342
1434
|
};
|
|
1343
1435
|
//#endregion
|
|
1344
1436
|
//#region ../../node_modules/clsx/dist/clsx.mjs
|
|
1345
|
-
function
|
|
1437
|
+
function Wn(e) {
|
|
1346
1438
|
var t, n, r = "";
|
|
1347
1439
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
1348
1440
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
1349
1441
|
var i = e.length;
|
|
1350
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
1442
|
+
for (t = 0; t < i; t++) e[t] && (n = Wn(e[t])) && (r && (r += " "), r += n);
|
|
1351
1443
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
1352
1444
|
return r;
|
|
1353
1445
|
}
|
|
1354
|
-
function
|
|
1355
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
1446
|
+
function Gn() {
|
|
1447
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Wn(e)) && (r && (r += " "), r += t);
|
|
1356
1448
|
return r;
|
|
1357
1449
|
}
|
|
1358
1450
|
//#endregion
|
|
@@ -1361,16 +1453,16 @@ function Y(e, t, n) {
|
|
|
1361
1453
|
let r = typeof e.colSpan == "function" ? e.colSpan(n) : 1;
|
|
1362
1454
|
if (Number.isInteger(r) && r > 1 && (!e.frozen || e.idx + r - 1 <= t)) return r;
|
|
1363
1455
|
}
|
|
1364
|
-
function
|
|
1456
|
+
function Kn(e) {
|
|
1365
1457
|
e.stopPropagation();
|
|
1366
1458
|
}
|
|
1367
|
-
function
|
|
1459
|
+
function qn(e) {
|
|
1368
1460
|
e?.scrollIntoView({
|
|
1369
1461
|
inline: "nearest",
|
|
1370
1462
|
block: "nearest"
|
|
1371
1463
|
});
|
|
1372
1464
|
}
|
|
1373
|
-
function
|
|
1465
|
+
function Jn(e) {
|
|
1374
1466
|
let t = !1, n = {
|
|
1375
1467
|
...e,
|
|
1376
1468
|
preventGridDefault() {
|
|
@@ -1382,20 +1474,20 @@ function Kn(e) {
|
|
|
1382
1474
|
};
|
|
1383
1475
|
return Object.setPrototypeOf(n, Object.getPrototypeOf(e)), n;
|
|
1384
1476
|
}
|
|
1385
|
-
var
|
|
1386
|
-
function
|
|
1477
|
+
var Yn = /* @__PURE__ */ new Set(/* @__PURE__ */ "Unidentified.Alt.AltGraph.CapsLock.Control.Fn.FnLock.Meta.NumLock.ScrollLock.Shift.Tab.ArrowDown.ArrowLeft.ArrowRight.ArrowUp.End.Home.PageDown.PageUp.Insert.ContextMenu.Escape.Pause.Play.PrintScreen.F1.F3.F4.F5.F6.F7.F8.F9.F10.F11.F12".split("."));
|
|
1478
|
+
function Xn(e) {
|
|
1387
1479
|
return (e.ctrlKey || e.metaKey) && e.key !== "Control";
|
|
1388
1480
|
}
|
|
1389
|
-
function
|
|
1390
|
-
return
|
|
1481
|
+
function Zn(e) {
|
|
1482
|
+
return Xn(e) && e.keyCode !== 86 ? !1 : !Yn.has(e.key);
|
|
1391
1483
|
}
|
|
1392
|
-
function
|
|
1484
|
+
function Qn({ key: e, target: t }) {
|
|
1393
1485
|
return e === "Tab" && (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) && t.closest(".rdg-editor-container")?.querySelectorAll("input, textarea, select").length === 1;
|
|
1394
1486
|
}
|
|
1395
|
-
var
|
|
1396
|
-
function
|
|
1487
|
+
var $n = "mlln6zg7-0-0-beta-46";
|
|
1488
|
+
function er(e) {
|
|
1397
1489
|
return e.map(({ key: e, idx: t, minWidth: n, maxWidth: r }) => /*#__PURE__*/ B("div", {
|
|
1398
|
-
className:
|
|
1490
|
+
className: $n,
|
|
1399
1491
|
style: {
|
|
1400
1492
|
gridColumnStart: t + 1,
|
|
1401
1493
|
minWidth: n,
|
|
@@ -1404,14 +1496,14 @@ function Qn(e) {
|
|
|
1404
1496
|
"data-measuring-cell-key": e
|
|
1405
1497
|
}, e));
|
|
1406
1498
|
}
|
|
1407
|
-
function
|
|
1499
|
+
function tr({ selectedPosition: e, columns: t, rows: n }) {
|
|
1408
1500
|
let r = t[e.idx], i = n[e.rowIdx];
|
|
1409
|
-
return
|
|
1501
|
+
return nr(r, i);
|
|
1410
1502
|
}
|
|
1411
|
-
function
|
|
1503
|
+
function nr(e, t) {
|
|
1412
1504
|
return e.renderEditCell != null && (typeof e.editable == "function" ? e.editable(t) : e.editable) !== !1;
|
|
1413
1505
|
}
|
|
1414
|
-
function
|
|
1506
|
+
function rr({ rows: e, topSummaryRows: t, bottomSummaryRows: n, rowIdx: r, mainHeaderRowIdx: i, lastFrozenColumnIndex: a, column: o }) {
|
|
1415
1507
|
let s = t?.length ?? 0;
|
|
1416
1508
|
if (r === i) return Y(o, a, { type: "HEADER" });
|
|
1417
1509
|
if (t && r > i && r <= s + i) return Y(o, a, {
|
|
@@ -1430,12 +1522,12 @@ function tr({ rows: e, topSummaryRows: t, bottomSummaryRows: n, rowIdx: r, mainH
|
|
|
1430
1522
|
row: n[r - e.length]
|
|
1431
1523
|
});
|
|
1432
1524
|
}
|
|
1433
|
-
function
|
|
1525
|
+
function ir({ moveUp: e, moveNext: t, cellNavigationMode: n, columns: r, colSpanColumns: i, rows: a, topSummaryRows: o, bottomSummaryRows: s, minRowIdx: c, mainHeaderRowIdx: l, maxRowIdx: u, currentPosition: { idx: d, rowIdx: f }, nextPosition: p, lastFrozenColumnIndex: m, isCellWithinBounds: h }) {
|
|
1434
1526
|
let { idx: g, rowIdx: _ } = p, v = r.length, y = (e) => {
|
|
1435
1527
|
for (let t of i) {
|
|
1436
1528
|
let n = t.idx;
|
|
1437
1529
|
if (n > g) break;
|
|
1438
|
-
let r =
|
|
1530
|
+
let r = rr({
|
|
1439
1531
|
rows: a,
|
|
1440
1532
|
topSummaryRows: o,
|
|
1441
1533
|
bottomSummaryRows: s,
|
|
@@ -1485,14 +1577,14 @@ function nr({ moveUp: e, moveNext: t, cellNavigationMode: n, columns: r, colSpan
|
|
|
1485
1577
|
rowIdx: _
|
|
1486
1578
|
};
|
|
1487
1579
|
}
|
|
1488
|
-
function
|
|
1580
|
+
function ar({ maxColIdx: e, minRowIdx: t, maxRowIdx: n, selectedPosition: { rowIdx: r, idx: i }, shiftKey: a }) {
|
|
1489
1581
|
return a ? i === 0 && r === t : i === e && r === n;
|
|
1490
1582
|
}
|
|
1491
|
-
var
|
|
1492
|
-
function
|
|
1583
|
+
var or = "rdg-cell cj343x07-0-0-beta-46", sr = "rdg-cell-frozen csofj7r7-0-0-beta-46";
|
|
1584
|
+
function cr(e) {
|
|
1493
1585
|
return { "--rdg-grid-row-start": e };
|
|
1494
1586
|
}
|
|
1495
|
-
function
|
|
1587
|
+
function lr(e, t, n) {
|
|
1496
1588
|
let r = t + 1, i = `calc(${n - 1} * var(--rdg-header-row-height))`;
|
|
1497
1589
|
return e.parent === void 0 ? {
|
|
1498
1590
|
insetBlockStart: 0,
|
|
@@ -1506,7 +1598,7 @@ function sr(e, t, n) {
|
|
|
1506
1598
|
paddingBlockStart: i
|
|
1507
1599
|
};
|
|
1508
1600
|
}
|
|
1509
|
-
function
|
|
1601
|
+
function ur(e, t = 1) {
|
|
1510
1602
|
let n = e.idx + 1;
|
|
1511
1603
|
return {
|
|
1512
1604
|
gridColumnStart: n,
|
|
@@ -1514,47 +1606,47 @@ function cr(e, t = 1) {
|
|
|
1514
1606
|
insetInlineStart: e.frozen ? `var(--rdg-frozen-left-${e.idx})` : void 0
|
|
1515
1607
|
};
|
|
1516
1608
|
}
|
|
1517
|
-
function
|
|
1518
|
-
return
|
|
1609
|
+
function dr(e, ...t) {
|
|
1610
|
+
return Gn(or, ...t, e.frozen && sr);
|
|
1519
1611
|
}
|
|
1520
|
-
var { min:
|
|
1521
|
-
function
|
|
1612
|
+
var { min: fr, max: pr, floor: mr, sign: hr, abs: gr } = Math;
|
|
1613
|
+
function _r(e) {
|
|
1522
1614
|
if (typeof e != "function") throw Error("Please specify the rowKeyGetter prop to use selection");
|
|
1523
1615
|
}
|
|
1524
|
-
function
|
|
1525
|
-
return e =
|
|
1616
|
+
function vr(e, { minWidth: t, maxWidth: n }) {
|
|
1617
|
+
return e = pr(e, t), typeof n == "number" && n >= t ? fr(e, n) : e;
|
|
1526
1618
|
}
|
|
1527
|
-
function
|
|
1619
|
+
function yr(e, t) {
|
|
1528
1620
|
return e.parent === void 0 ? t : e.level - e.parent.level;
|
|
1529
1621
|
}
|
|
1530
|
-
var
|
|
1531
|
-
function
|
|
1622
|
+
var br = "c1bn88vv7-0-0-beta-46", xr = "rdg-checkbox-input c1qt073l7-0-0-beta-46";
|
|
1623
|
+
function Sr({ onChange: e, ...t }) {
|
|
1532
1624
|
function n(t) {
|
|
1533
1625
|
e(t.target.checked, t.nativeEvent.shiftKey);
|
|
1534
1626
|
}
|
|
1535
1627
|
return /*#__PURE__*/ B("div", {
|
|
1536
|
-
className:
|
|
1628
|
+
className: br,
|
|
1537
1629
|
children: /*#__PURE__*/ B("input", {
|
|
1538
1630
|
type: "checkbox",
|
|
1539
1631
|
...t,
|
|
1540
|
-
className:
|
|
1632
|
+
className: xr,
|
|
1541
1633
|
onChange: n
|
|
1542
1634
|
})
|
|
1543
1635
|
});
|
|
1544
1636
|
}
|
|
1545
|
-
function
|
|
1637
|
+
function Cr(e) {
|
|
1546
1638
|
try {
|
|
1547
1639
|
return e.row[e.column.key];
|
|
1548
1640
|
} catch {
|
|
1549
1641
|
return null;
|
|
1550
1642
|
}
|
|
1551
1643
|
}
|
|
1552
|
-
var
|
|
1553
|
-
function
|
|
1554
|
-
return _e(
|
|
1644
|
+
var wr = /*#__PURE__*/ pe(void 0), Tr = wr.Provider;
|
|
1645
|
+
function Er() {
|
|
1646
|
+
return _e(wr);
|
|
1555
1647
|
}
|
|
1556
|
-
function
|
|
1557
|
-
let o =
|
|
1648
|
+
function Dr({ value: e, tabIndex: t, disabled: n, onChange: r, "aria-label": i, "aria-labelledby": a }) {
|
|
1649
|
+
let o = Er().renderCheckbox;
|
|
1558
1650
|
return o({
|
|
1559
1651
|
"aria-label": i,
|
|
1560
1652
|
"aria-labelledby": a,
|
|
@@ -1564,16 +1656,16 @@ function Tr({ value: e, tabIndex: t, disabled: n, onChange: r, "aria-label": i,
|
|
|
1564
1656
|
onChange: r
|
|
1565
1657
|
});
|
|
1566
1658
|
}
|
|
1567
|
-
var
|
|
1568
|
-
function
|
|
1569
|
-
let e = _e(
|
|
1659
|
+
var Or = /*#__PURE__*/ pe(void 0), kr = Or.Provider, Ar = /*#__PURE__*/ pe(void 0), jr = Ar.Provider;
|
|
1660
|
+
function Mr() {
|
|
1661
|
+
let e = _e(Or), t = _e(Ar);
|
|
1570
1662
|
if (e === void 0 || t === void 0) throw Error("useRowSelection must be used within DataGrid cells");
|
|
1571
1663
|
return [e, t];
|
|
1572
1664
|
}
|
|
1573
|
-
var
|
|
1574
|
-
function
|
|
1575
|
-
let [t, n] =
|
|
1576
|
-
return /*#__PURE__*/ B(
|
|
1665
|
+
var Nr = "select-row";
|
|
1666
|
+
function Pr(e) {
|
|
1667
|
+
let [t, n] = Mr();
|
|
1668
|
+
return /*#__PURE__*/ B(Dr, {
|
|
1577
1669
|
"aria-label": "Select All",
|
|
1578
1670
|
tabIndex: e.tabIndex,
|
|
1579
1671
|
value: t,
|
|
@@ -1585,9 +1677,9 @@ function Mr(e) {
|
|
|
1585
1677
|
}
|
|
1586
1678
|
});
|
|
1587
1679
|
}
|
|
1588
|
-
function
|
|
1589
|
-
let [t, n] =
|
|
1590
|
-
return /*#__PURE__*/ B(
|
|
1680
|
+
function Fr(e) {
|
|
1681
|
+
let [t, n] = Mr();
|
|
1682
|
+
return /*#__PURE__*/ B(Dr, {
|
|
1591
1683
|
"aria-label": "Select",
|
|
1592
1684
|
tabIndex: e.tabIndex,
|
|
1593
1685
|
value: t,
|
|
@@ -1601,9 +1693,9 @@ function Nr(e) {
|
|
|
1601
1693
|
}
|
|
1602
1694
|
});
|
|
1603
1695
|
}
|
|
1604
|
-
function
|
|
1605
|
-
let [t, n] =
|
|
1606
|
-
return /*#__PURE__*/ B(
|
|
1696
|
+
function Ir(e) {
|
|
1697
|
+
let [t, n] = Mr();
|
|
1698
|
+
return /*#__PURE__*/ B(Dr, {
|
|
1607
1699
|
"aria-label": "Select Group",
|
|
1608
1700
|
tabIndex: e.tabIndex,
|
|
1609
1701
|
value: t,
|
|
@@ -1617,8 +1709,8 @@ function Pr(e) {
|
|
|
1617
1709
|
}
|
|
1618
1710
|
});
|
|
1619
1711
|
}
|
|
1620
|
-
var
|
|
1621
|
-
key:
|
|
1712
|
+
var Lr = {
|
|
1713
|
+
key: Nr,
|
|
1622
1714
|
name: "",
|
|
1623
1715
|
width: 35,
|
|
1624
1716
|
minWidth: 35,
|
|
@@ -1627,17 +1719,17 @@ var Fr = {
|
|
|
1627
1719
|
sortable: !1,
|
|
1628
1720
|
frozen: !0,
|
|
1629
1721
|
renderHeaderCell(e) {
|
|
1630
|
-
return /*#__PURE__*/ B(
|
|
1722
|
+
return /*#__PURE__*/ B(Pr, { ...e });
|
|
1631
1723
|
},
|
|
1632
1724
|
renderCell(e) {
|
|
1633
|
-
return /*#__PURE__*/ B(
|
|
1725
|
+
return /*#__PURE__*/ B(Fr, { ...e });
|
|
1634
1726
|
},
|
|
1635
1727
|
renderGroupCell(e) {
|
|
1636
|
-
return /*#__PURE__*/ B(
|
|
1728
|
+
return /*#__PURE__*/ B(Ir, { ...e });
|
|
1637
1729
|
}
|
|
1638
|
-
},
|
|
1639
|
-
function
|
|
1640
|
-
let o = t?.width ??
|
|
1730
|
+
}, Rr = "auto", zr = 50;
|
|
1731
|
+
function Br({ rawColumns: e, defaultColumnOptions: t, getColumnWidth: n, viewportWidth: r, scrollLeft: i, enableVirtualization: a }) {
|
|
1732
|
+
let o = t?.width ?? Rr, s = t?.minWidth ?? zr, c = t?.maxWidth ?? void 0, l = t?.renderCell ?? Cr, u = t?.sortable ?? !1, d = t?.resizable ?? !1, f = t?.draggable ?? !1, { columns: p, colSpanColumns: m, lastFrozenColumnIndex: h, headerRowsCount: g } = F(() => {
|
|
1641
1733
|
let t = -1, n = 1, r = [];
|
|
1642
1734
|
i(e, 1);
|
|
1643
1735
|
function i(e, a, p) {
|
|
@@ -1674,7 +1766,7 @@ function Rr({ rawColumns: e, defaultColumnOptions: t, getColumnWidth: n, viewpor
|
|
|
1674
1766
|
r.sort(({ key: e, frozen: t }, { key: n, frozen: r }) => e === "select-row" ? -1 : n === "select-row" ? 1 : t ? r ? 0 : -1 : +!!r);
|
|
1675
1767
|
let a = [];
|
|
1676
1768
|
return r.forEach((e, t) => {
|
|
1677
|
-
e.idx = t,
|
|
1769
|
+
e.idx = t, Vr(e, t, 0), e.colSpan != null && a.push(e);
|
|
1678
1770
|
}), {
|
|
1679
1771
|
columns: r,
|
|
1680
1772
|
colSpanColumns: a,
|
|
@@ -1694,7 +1786,7 @@ function Rr({ rawColumns: e, defaultColumnOptions: t, getColumnWidth: n, viewpor
|
|
|
1694
1786
|
let e = /* @__PURE__ */ new Map(), t = 0, r = 0, i = [];
|
|
1695
1787
|
for (let r of p) {
|
|
1696
1788
|
let a = n(r);
|
|
1697
|
-
a = typeof a == "number" ?
|
|
1789
|
+
a = typeof a == "number" ? vr(a, r) : r.minWidth, i.push(`${a}px`), e.set(r, {
|
|
1698
1790
|
width: a,
|
|
1699
1791
|
left: t
|
|
1700
1792
|
}), t += a;
|
|
@@ -1720,7 +1812,7 @@ function Rr({ rawColumns: e, defaultColumnOptions: t, getColumnWidth: n, viewpor
|
|
|
1720
1812
|
h
|
|
1721
1813
|
]), [x, S] = F(() => {
|
|
1722
1814
|
if (!a) return [0, p.length - 1];
|
|
1723
|
-
let e = i + y, t = i + r, n = p.length - 1, o =
|
|
1815
|
+
let e = i + y, t = i + r, n = p.length - 1, o = fr(h + 1, n);
|
|
1724
1816
|
if (e >= t) return [o, o];
|
|
1725
1817
|
let s = o;
|
|
1726
1818
|
for (; s < n;) {
|
|
@@ -1734,7 +1826,7 @@ function Rr({ rawColumns: e, defaultColumnOptions: t, getColumnWidth: n, viewpor
|
|
|
1734
1826
|
if (e + n >= t) break;
|
|
1735
1827
|
c++;
|
|
1736
1828
|
}
|
|
1737
|
-
return [
|
|
1829
|
+
return [pr(o, s - 1), fr(n, c + 1)];
|
|
1738
1830
|
}, [
|
|
1739
1831
|
b,
|
|
1740
1832
|
p,
|
|
@@ -1756,25 +1848,25 @@ function Rr({ rawColumns: e, defaultColumnOptions: t, getColumnWidth: n, viewpor
|
|
|
1756
1848
|
totalFrozenColumnWidth: y
|
|
1757
1849
|
};
|
|
1758
1850
|
}
|
|
1759
|
-
function
|
|
1851
|
+
function Vr(e, t, n) {
|
|
1760
1852
|
if (n < e.level && (e.level = n), e.parent !== void 0) {
|
|
1761
1853
|
let { parent: r } = e;
|
|
1762
|
-
r.idx === -1 && (r.idx = t), r.colSpan += 1,
|
|
1854
|
+
r.idx === -1 && (r.idx = t), r.colSpan += 1, Vr(r, t, n - 1);
|
|
1763
1855
|
}
|
|
1764
1856
|
}
|
|
1765
|
-
var
|
|
1766
|
-
function
|
|
1857
|
+
var Hr = typeof window > "u" ? P : be;
|
|
1858
|
+
function Ur(e, t, n, r, i, a, o, s, c, l) {
|
|
1767
1859
|
let u = I(i), d = e.length === t.length, f = d && i !== u.current, p = [...n], m = [];
|
|
1768
1860
|
for (let { key: e, idx: n, width: r } of t) typeof r == "string" && (f || !o.has(e)) && !a.has(e) && (p[n] = r, m.push(e));
|
|
1769
1861
|
let h = p.join(" ");
|
|
1770
|
-
|
|
1862
|
+
Hr(() => {
|
|
1771
1863
|
u.current = i, g(m);
|
|
1772
1864
|
});
|
|
1773
1865
|
function g(e) {
|
|
1774
1866
|
e.length !== 0 && c((t) => {
|
|
1775
1867
|
let n = new Map(t), i = !1;
|
|
1776
1868
|
for (let a of e) {
|
|
1777
|
-
let e =
|
|
1869
|
+
let e = Wr(r, a);
|
|
1778
1870
|
i ||= e !== t.get(a), e === void 0 ? n.delete(a) : n.set(a, e);
|
|
1779
1871
|
}
|
|
1780
1872
|
return i ? n : t;
|
|
@@ -1784,7 +1876,7 @@ function Vr(e, t, n, r, i, a, o, s, c, l) {
|
|
|
1784
1876
|
let { key: o } = e, c = [...n], u = [];
|
|
1785
1877
|
for (let { key: e, idx: n, width: r } of t) o === e ? c[n] = typeof i == "number" ? `${i}px` : i : d && typeof r == "string" && !a.has(e) && (c[n] = r, u.push(e));
|
|
1786
1878
|
r.current.style.gridTemplateColumns = c.join(" ");
|
|
1787
|
-
let f = typeof i == "number" ? i :
|
|
1879
|
+
let f = typeof i == "number" ? i : Wr(r, o);
|
|
1788
1880
|
it(() => {
|
|
1789
1881
|
s((e) => {
|
|
1790
1882
|
let t = new Map(e);
|
|
@@ -1797,13 +1889,13 @@ function Vr(e, t, n, r, i, a, o, s, c, l) {
|
|
|
1797
1889
|
handleColumnResize: _
|
|
1798
1890
|
};
|
|
1799
1891
|
}
|
|
1800
|
-
function
|
|
1892
|
+
function Wr(e, t) {
|
|
1801
1893
|
let n = `[data-measuring-cell-key="${CSS.escape(t)}"]`;
|
|
1802
1894
|
return (e.current?.querySelector(n))?.getBoundingClientRect().width;
|
|
1803
1895
|
}
|
|
1804
|
-
function
|
|
1896
|
+
function Gr() {
|
|
1805
1897
|
let e = I(null), [t, n] = L(1), [r, i] = L(1), [a, o] = L(0);
|
|
1806
|
-
return
|
|
1898
|
+
return Hr(() => {
|
|
1807
1899
|
let { ResizeObserver: t } = window;
|
|
1808
1900
|
if (t == null) return;
|
|
1809
1901
|
let { clientWidth: r, clientHeight: a, offsetWidth: s, offsetHeight: c } = e.current, { width: l, height: u } = e.current.getBoundingClientRect(), d = c - a, f = l - s + r, p = u - d;
|
|
@@ -1834,7 +1926,7 @@ function X(e) {
|
|
|
1834
1926
|
}, []);
|
|
1835
1927
|
return e && n;
|
|
1836
1928
|
}
|
|
1837
|
-
function
|
|
1929
|
+
function Kr(e) {
|
|
1838
1930
|
let [t, n] = L(!1);
|
|
1839
1931
|
t && !e && n(!1);
|
|
1840
1932
|
function r(e) {
|
|
@@ -1846,7 +1938,7 @@ function Wr(e) {
|
|
|
1846
1938
|
onFocus: e ? r : void 0
|
|
1847
1939
|
};
|
|
1848
1940
|
}
|
|
1849
|
-
function
|
|
1941
|
+
function qr({ columns: e, colSpanColumns: t, rows: n, topSummaryRows: r, bottomSummaryRows: i, colOverscanStartIdx: a, colOverscanEndIdx: o, lastFrozenColumnIndex: s, rowOverscanStartIdx: c, rowOverscanEndIdx: l }) {
|
|
1850
1942
|
let u = F(() => {
|
|
1851
1943
|
if (a === 0) return 0;
|
|
1852
1944
|
let e = a, o = (t, n) => n !== void 0 && t + n > a ? (e = t, !0) : !1;
|
|
@@ -1897,14 +1989,14 @@ function Gr({ columns: e, colSpanColumns: t, rows: n, topSummaryRows: r, bottomS
|
|
|
1897
1989
|
e
|
|
1898
1990
|
]);
|
|
1899
1991
|
}
|
|
1900
|
-
function
|
|
1992
|
+
function Jr({ rows: e, rowHeight: t, clientHeight: n, scrollTop: r, enableVirtualization: i }) {
|
|
1901
1993
|
let { totalRowHeight: a, gridTemplateRows: o, getRowTop: s, getRowHeight: c, findRowIdx: l } = F(() => {
|
|
1902
1994
|
if (typeof t == "number") return {
|
|
1903
1995
|
totalRowHeight: t * e.length,
|
|
1904
1996
|
gridTemplateRows: ` repeat(${e.length}, ${t}px)`,
|
|
1905
1997
|
getRowTop: (e) => e * t,
|
|
1906
1998
|
getRowHeight: () => t,
|
|
1907
|
-
findRowIdx: (e) =>
|
|
1999
|
+
findRowIdx: (e) => mr(e / t)
|
|
1908
2000
|
};
|
|
1909
2001
|
let n = 0, r = " ", i = e.map((e) => {
|
|
1910
2002
|
let i = t(e), a = {
|
|
@@ -1912,7 +2004,7 @@ function Kr({ rows: e, rowHeight: t, clientHeight: n, scrollTop: r, enableVirtua
|
|
|
1912
2004
|
height: i
|
|
1913
2005
|
};
|
|
1914
2006
|
return r += `${i}px `, n += i, a;
|
|
1915
|
-
}), a = (t) =>
|
|
2007
|
+
}), a = (t) => pr(0, fr(e.length - 1, t));
|
|
1916
2008
|
return {
|
|
1917
2009
|
totalRowHeight: n,
|
|
1918
2010
|
gridTemplateRows: r,
|
|
@@ -1921,7 +2013,7 @@ function Kr({ rows: e, rowHeight: t, clientHeight: n, scrollTop: r, enableVirtua
|
|
|
1921
2013
|
findRowIdx(e) {
|
|
1922
2014
|
let t = 0, n = i.length - 1;
|
|
1923
2015
|
for (; t <= n;) {
|
|
1924
|
-
let r = t +
|
|
2016
|
+
let r = t + mr((n - t) / 2), a = i[r].top;
|
|
1925
2017
|
if (a === e) return r;
|
|
1926
2018
|
if (a < e ? t = r + 1 : a > e && (n = r - 1), t > n) return n;
|
|
1927
2019
|
}
|
|
@@ -1931,7 +2023,7 @@ function Kr({ rows: e, rowHeight: t, clientHeight: n, scrollTop: r, enableVirtua
|
|
|
1931
2023
|
}, [t, e]), u = 0, d = e.length - 1;
|
|
1932
2024
|
if (i) {
|
|
1933
2025
|
let t = l(r), i = l(r + n);
|
|
1934
|
-
u =
|
|
2026
|
+
u = pr(0, t - 4), d = fr(e.length - 1, i + 4);
|
|
1935
2027
|
}
|
|
1936
2028
|
return {
|
|
1937
2029
|
rowOverscanStartIdx: u,
|
|
@@ -1943,8 +2035,8 @@ function Kr({ rows: e, rowHeight: t, clientHeight: n, scrollTop: r, enableVirtua
|
|
|
1943
2035
|
findRowIdx: l
|
|
1944
2036
|
};
|
|
1945
2037
|
}
|
|
1946
|
-
var
|
|
1947
|
-
function
|
|
2038
|
+
var Yr = "c1w9bbhr7-0-0-beta-46", Xr = "c1creorc7-0-0-beta-46", Zr = `rdg-cell-drag-handle ${Yr}`;
|
|
2039
|
+
function Qr({ gridRowStart: e, rows: t, column: n, columnWidth: r, maxColIdx: i, isLastRow: a, selectedPosition: o, latestDraggedOverRowIdx: s, isCellEditable: c, onRowsChange: l, onFill: u, onClick: d, setDragging: f, setDraggedOverRowIdx: p }) {
|
|
1948
2040
|
let { idx: m, rowIdx: h } = o;
|
|
1949
2041
|
function g(e) {
|
|
1950
2042
|
if (e.preventDefault(), e.buttons !== 1) return;
|
|
@@ -1985,7 +2077,7 @@ function Xr({ gridRowStart: e, rows: t, column: n, columnWidth: r, maxColIdx: i,
|
|
|
1985
2077
|
let o = n.colSpan?.({
|
|
1986
2078
|
type: "ROW",
|
|
1987
2079
|
row: t[h]
|
|
1988
|
-
}) ?? 1, { insetInlineStart: s, ...c } =
|
|
2080
|
+
}) ?? 1, { insetInlineStart: s, ...c } = ur(n, o), l = "calc(var(--rdg-drag-handle-size) * -0.5 + 1px)", u = n.idx + o - 1 === i;
|
|
1989
2081
|
return {
|
|
1990
2082
|
...c,
|
|
1991
2083
|
gridRowStart: e,
|
|
@@ -1996,14 +2088,14 @@ function Xr({ gridRowStart: e, rows: t, column: n, columnWidth: r, maxColIdx: i,
|
|
|
1996
2088
|
}
|
|
1997
2089
|
return /*#__PURE__*/ B("div", {
|
|
1998
2090
|
style: b(),
|
|
1999
|
-
className:
|
|
2091
|
+
className: Gn(Zr, n.frozen && Xr),
|
|
2000
2092
|
onClick: d,
|
|
2001
2093
|
onMouseDown: g,
|
|
2002
2094
|
onDoubleClick: v
|
|
2003
2095
|
});
|
|
2004
2096
|
}
|
|
2005
|
-
var
|
|
2006
|
-
function
|
|
2097
|
+
var $r = "cis5rrm7-0-0-beta-46";
|
|
2098
|
+
function ei({ column: e, colSpan: t, row: n, rowIdx: r, onRowChange: i, closeEditor: a, onKeyDown: o, navigate: s }) {
|
|
2007
2099
|
let c = I(void 0), l = e.editorOptions?.commitOnOutsideClick !== !1, u = X(() => {
|
|
2008
2100
|
p(!0, !1);
|
|
2009
2101
|
});
|
|
@@ -2021,7 +2113,7 @@ function Qr({ column: e, colSpan: t, row: n, rowIdx: r, onRowChange: i, closeEdi
|
|
|
2021
2113
|
}
|
|
2022
2114
|
function f(t) {
|
|
2023
2115
|
if (o) {
|
|
2024
|
-
let i =
|
|
2116
|
+
let i = Jn(t);
|
|
2025
2117
|
if (o({
|
|
2026
2118
|
mode: "EDIT",
|
|
2027
2119
|
row: n,
|
|
@@ -2033,7 +2125,7 @@ function Qr({ column: e, colSpan: t, row: n, rowIdx: r, onRowChange: i, closeEdi
|
|
|
2033
2125
|
onClose: p
|
|
2034
2126
|
}, i), i.isGridDefaultPrevented()) return;
|
|
2035
2127
|
}
|
|
2036
|
-
t.key === "Escape" ? p() : t.key === "Enter" ? p(!0) :
|
|
2128
|
+
t.key === "Escape" ? p() : t.key === "Enter" ? p(!0) : Qn(t) && s(t);
|
|
2037
2129
|
}
|
|
2038
2130
|
function p(e = !1, t = !0) {
|
|
2039
2131
|
e ? i(n, !0, t) : a(t);
|
|
@@ -2041,14 +2133,14 @@ function Qr({ column: e, colSpan: t, row: n, rowIdx: r, onRowChange: i, closeEdi
|
|
|
2041
2133
|
function m(e, t = !1) {
|
|
2042
2134
|
i(e, t, t);
|
|
2043
2135
|
}
|
|
2044
|
-
let { cellClass: h } = e, g =
|
|
2136
|
+
let { cellClass: h } = e, g = dr(e, "rdg-editor-container", typeof h == "function" ? h(n) : h, !e.editorOptions?.displayCellContent && $r);
|
|
2045
2137
|
return /*#__PURE__*/ B("div", {
|
|
2046
2138
|
role: "gridcell",
|
|
2047
2139
|
"aria-colindex": e.idx + 1,
|
|
2048
2140
|
"aria-colspan": t,
|
|
2049
2141
|
"aria-selected": !0,
|
|
2050
2142
|
className: g,
|
|
2051
|
-
style:
|
|
2143
|
+
style: ur(e, t),
|
|
2052
2144
|
onKeyDown: f,
|
|
2053
2145
|
onMouseDownCapture: d,
|
|
2054
2146
|
children: e.renderEditCell != null && /*#__PURE__*/ V(z, { children: [e.renderEditCell({
|
|
@@ -2067,8 +2159,8 @@ function Qr({ column: e, colSpan: t, row: n, rowIdx: r, onRowChange: i, closeEdi
|
|
|
2067
2159
|
})] })
|
|
2068
2160
|
});
|
|
2069
2161
|
}
|
|
2070
|
-
function
|
|
2071
|
-
let { tabIndex: i, onFocus: a } =
|
|
2162
|
+
function ti({ column: e, rowIdx: t, isCellSelected: n, selectCell: r }) {
|
|
2163
|
+
let { tabIndex: i, onFocus: a } = Kr(n), { colSpan: o } = e, s = yr(e, t), c = e.idx + 1;
|
|
2072
2164
|
function l() {
|
|
2073
2165
|
r({
|
|
2074
2166
|
idx: e.idx,
|
|
@@ -2082,9 +2174,9 @@ function $r({ column: e, rowIdx: t, isCellSelected: n, selectCell: r }) {
|
|
|
2082
2174
|
"aria-rowspan": s,
|
|
2083
2175
|
"aria-selected": n,
|
|
2084
2176
|
tabIndex: i,
|
|
2085
|
-
className:
|
|
2177
|
+
className: Gn(or, e.headerCellClass),
|
|
2086
2178
|
style: {
|
|
2087
|
-
...
|
|
2179
|
+
...lr(e, t, s),
|
|
2088
2180
|
gridColumnStart: c,
|
|
2089
2181
|
gridColumnEnd: c + o
|
|
2090
2182
|
},
|
|
@@ -2093,20 +2185,20 @@ function $r({ column: e, rowIdx: t, isCellSelected: n, selectCell: r }) {
|
|
|
2093
2185
|
children: e.name
|
|
2094
2186
|
});
|
|
2095
2187
|
}
|
|
2096
|
-
var
|
|
2097
|
-
function
|
|
2098
|
-
return e.sortable ? /*#__PURE__*/ B(
|
|
2188
|
+
var ni = "h44jtk67-0-0-beta-46", ri = "rdg-header-sort-name hcgkhxz7-0-0-beta-46";
|
|
2189
|
+
function ii({ column: e, sortDirection: t, priority: n }) {
|
|
2190
|
+
return e.sortable ? /*#__PURE__*/ B(ai, {
|
|
2099
2191
|
sortDirection: t,
|
|
2100
2192
|
priority: n,
|
|
2101
2193
|
children: e.name
|
|
2102
2194
|
}) : e.name;
|
|
2103
2195
|
}
|
|
2104
|
-
function
|
|
2105
|
-
let r =
|
|
2196
|
+
function ai({ sortDirection: e, priority: t, children: n }) {
|
|
2197
|
+
let r = Er().renderSortStatus;
|
|
2106
2198
|
return /*#__PURE__*/ V("span", {
|
|
2107
|
-
className:
|
|
2199
|
+
className: ni,
|
|
2108
2200
|
children: [/*#__PURE__*/ B("span", {
|
|
2109
|
-
className:
|
|
2201
|
+
className: ri,
|
|
2110
2202
|
children: n
|
|
2111
2203
|
}), /*#__PURE__*/ B("span", { children: r({
|
|
2112
2204
|
sortDirection: e,
|
|
@@ -2114,16 +2206,16 @@ function ri({ sortDirection: e, priority: t, children: n }) {
|
|
|
2114
2206
|
}) })]
|
|
2115
2207
|
});
|
|
2116
2208
|
}
|
|
2117
|
-
var
|
|
2118
|
-
function
|
|
2119
|
-
let [f, p] = L(!1), [m, h] = L(!1), g = u === "rtl", _ =
|
|
2209
|
+
var oi = "c6l2wv17-0-0-beta-46", si = "rdg-cell-resizable c1kqdw7y7-0-0-beta-46", ci = "r1y6ywlx7-0-0-beta-46", li = "rdg-cell-draggable", ui = "rdg-cell-dragging c1bezg5o7-0-0-beta-46", di = "rdg-cell-drag-over c1vc96037-0-0-beta-46";
|
|
2210
|
+
function fi({ column: e, colSpan: t, rowIdx: n, isCellSelected: r, onColumnResize: i, onColumnsReorder: a, sortColumns: o, onSortColumnsChange: s, selectCell: c, shouldFocusGrid: l, direction: u, dragDropKey: d }) {
|
|
2211
|
+
let [f, p] = L(!1), [m, h] = L(!1), g = u === "rtl", _ = yr(e, n), { tabIndex: v, childTabIndex: y, onFocus: b } = Kr(r), x = o?.findIndex((t) => t.columnKey === e.key), S = x !== void 0 && x > -1 ? o[x] : void 0, C = S?.direction, ee = S !== void 0 && o.length > 1 ? x + 1 : void 0, te = C && !ee ? C === "ASC" ? "ascending" : "descending" : void 0, { sortable: ne, resizable: re, draggable: w } = e, ie = dr(e, e.headerCellClass, ne && oi, re && si, w && li, f && ui, m && di), T = e.renderHeaderCell ?? ii;
|
|
2120
2212
|
function E(t) {
|
|
2121
2213
|
if (t.pointerType === "mouse" && t.buttons !== 1) return;
|
|
2122
2214
|
t.preventDefault();
|
|
2123
2215
|
let { currentTarget: n, pointerId: r } = t, a = n.parentElement, { right: o, left: s } = a.getBoundingClientRect(), c = g ? t.clientX - s : o - t.clientX;
|
|
2124
2216
|
function l(t) {
|
|
2125
2217
|
let { right: n, left: r } = a.getBoundingClientRect(), o = g ? n + c - t.clientX : t.clientX + c - r;
|
|
2126
|
-
o > 0 && i(e,
|
|
2218
|
+
o > 0 && i(e, vr(o, e));
|
|
2127
2219
|
}
|
|
2128
2220
|
function u() {
|
|
2129
2221
|
n.removeEventListener("pointermove", l), n.removeEventListener("lostpointercapture", u);
|
|
@@ -2184,10 +2276,10 @@ function ui({ column: e, colSpan: t, rowIdx: n, isCellSelected: r, onColumnResiz
|
|
|
2184
2276
|
}
|
|
2185
2277
|
}
|
|
2186
2278
|
function de(e) {
|
|
2187
|
-
|
|
2279
|
+
pi(e) && h(!0);
|
|
2188
2280
|
}
|
|
2189
2281
|
function A(e) {
|
|
2190
|
-
|
|
2282
|
+
pi(e) && h(!1);
|
|
2191
2283
|
}
|
|
2192
2284
|
let j;
|
|
2193
2285
|
return w && (j = {
|
|
@@ -2208,8 +2300,8 @@ function ui({ column: e, colSpan: t, rowIdx: n, isCellSelected: r, onColumnResiz
|
|
|
2208
2300
|
tabIndex: l ? 0 : v,
|
|
2209
2301
|
className: ie,
|
|
2210
2302
|
style: {
|
|
2211
|
-
...
|
|
2212
|
-
...
|
|
2303
|
+
...lr(e, n, _),
|
|
2304
|
+
...ur(e, t)
|
|
2213
2305
|
},
|
|
2214
2306
|
onFocus: se,
|
|
2215
2307
|
onClick: D,
|
|
@@ -2221,23 +2313,23 @@ function ui({ column: e, colSpan: t, rowIdx: n, isCellSelected: r, onColumnResiz
|
|
|
2221
2313
|
priority: ee,
|
|
2222
2314
|
tabIndex: y
|
|
2223
2315
|
}), re && /*#__PURE__*/ B("div", {
|
|
2224
|
-
className:
|
|
2225
|
-
onClick:
|
|
2316
|
+
className: ci,
|
|
2317
|
+
onClick: Kn,
|
|
2226
2318
|
onDoubleClick: oe,
|
|
2227
2319
|
onPointerDown: E
|
|
2228
2320
|
})]
|
|
2229
2321
|
});
|
|
2230
2322
|
}
|
|
2231
|
-
function
|
|
2323
|
+
function pi(e) {
|
|
2232
2324
|
let t = e.relatedTarget;
|
|
2233
2325
|
return !e.currentTarget.contains(t);
|
|
2234
2326
|
}
|
|
2235
|
-
var
|
|
2236
|
-
function
|
|
2327
|
+
var mi = "rdg-row r1upfr807-0-0-beta-46", hi = "r190mhd37-0-0-beta-46", gi = "rdg-row-selected", _i = "r139qu9m7-0-0-beta-46", vi = "rdg-top-summary-row", yi = "rdg-bottom-summary-row", bi = "rdg-header-row h10tskcx7-0-0-beta-46";
|
|
2328
|
+
function xi({ rowIdx: e, columns: t, onColumnResize: n, onColumnsReorder: r, sortColumns: i, onSortColumnsChange: a, lastFrozenColumnIndex: o, selectedCellIdx: s, selectCell: c, shouldFocusGrid: l, direction: u }) {
|
|
2237
2329
|
let d = ve(), f = [];
|
|
2238
2330
|
for (let p = 0; p < t.length; p++) {
|
|
2239
2331
|
let m = t[p], h = Y(m, o, { type: "HEADER" });
|
|
2240
|
-
h !== void 0 && (p += h - 1), f.push(/*#__PURE__*/ B(
|
|
2332
|
+
h !== void 0 && (p += h - 1), f.push(/*#__PURE__*/ B(fi, {
|
|
2241
2333
|
column: m,
|
|
2242
2334
|
colSpan: h,
|
|
2243
2335
|
rowIdx: e,
|
|
@@ -2255,12 +2347,12 @@ function yi({ rowIdx: e, columns: t, onColumnResize: n, onColumnsReorder: r, sor
|
|
|
2255
2347
|
return /*#__PURE__*/ B("div", {
|
|
2256
2348
|
role: "row",
|
|
2257
2349
|
"aria-rowindex": e,
|
|
2258
|
-
className:
|
|
2350
|
+
className: Gn(bi, s === -1 && gi),
|
|
2259
2351
|
children: f
|
|
2260
2352
|
});
|
|
2261
2353
|
}
|
|
2262
|
-
var
|
|
2263
|
-
function
|
|
2354
|
+
var Si = /*#__PURE__*/ M(xi);
|
|
2355
|
+
function Ci({ rowIdx: e, level: t, columns: n, selectedCellIdx: r, selectCell: i }) {
|
|
2264
2356
|
let a = [], o = /* @__PURE__ */ new Set();
|
|
2265
2357
|
for (let s of n) {
|
|
2266
2358
|
let { parent: n } = s;
|
|
@@ -2269,7 +2361,7 @@ function xi({ rowIdx: e, level: t, columns: n, selectedCellIdx: r, selectCell: i
|
|
|
2269
2361
|
if (n.level === t && !o.has(n)) {
|
|
2270
2362
|
o.add(n);
|
|
2271
2363
|
let { idx: t } = n;
|
|
2272
|
-
a.push(/*#__PURE__*/ B(
|
|
2364
|
+
a.push(/*#__PURE__*/ B(ti, {
|
|
2273
2365
|
column: n,
|
|
2274
2366
|
rowIdx: e,
|
|
2275
2367
|
isCellSelected: r === t,
|
|
@@ -2281,13 +2373,13 @@ function xi({ rowIdx: e, level: t, columns: n, selectedCellIdx: r, selectCell: i
|
|
|
2281
2373
|
return /*#__PURE__*/ B("div", {
|
|
2282
2374
|
role: "row",
|
|
2283
2375
|
"aria-rowindex": e,
|
|
2284
|
-
className:
|
|
2376
|
+
className: bi,
|
|
2285
2377
|
children: a
|
|
2286
2378
|
});
|
|
2287
2379
|
}
|
|
2288
|
-
var
|
|
2289
|
-
function
|
|
2290
|
-
let { tabIndex: p, childTabIndex: m, onFocus: h } =
|
|
2380
|
+
var wi = /*#__PURE__*/ M(Ci), Ti = "rdg-cell-copied c6ra8a37-0-0-beta-46", Ei = "rdg-cell-dragged-over cq910m07-0-0-beta-46";
|
|
2381
|
+
function Di({ column: e, colSpan: t, isCellSelected: n, isCopied: r, isDraggedOver: i, row: a, rowIdx: o, onClick: s, onDoubleClick: c, onContextMenu: l, onRowChange: u, selectCell: d, ...f }) {
|
|
2382
|
+
let { tabIndex: p, childTabIndex: m, onFocus: h } = Kr(n), { cellClass: g } = e, _ = dr(e, typeof g == "function" ? g(a) : g, r && Ti, i && Ei), v = nr(e, a);
|
|
2291
2383
|
function y(t) {
|
|
2292
2384
|
d({
|
|
2293
2385
|
rowIdx: o,
|
|
@@ -2296,7 +2388,7 @@ function Ti({ column: e, colSpan: t, isCellSelected: n, isCopied: r, isDraggedOv
|
|
|
2296
2388
|
}
|
|
2297
2389
|
function b(t) {
|
|
2298
2390
|
if (s) {
|
|
2299
|
-
let n =
|
|
2391
|
+
let n = Jn(t);
|
|
2300
2392
|
if (s({
|
|
2301
2393
|
row: a,
|
|
2302
2394
|
column: e,
|
|
@@ -2307,7 +2399,7 @@ function Ti({ column: e, colSpan: t, isCellSelected: n, isCopied: r, isDraggedOv
|
|
|
2307
2399
|
}
|
|
2308
2400
|
function x(t) {
|
|
2309
2401
|
if (l) {
|
|
2310
|
-
let n =
|
|
2402
|
+
let n = Jn(t);
|
|
2311
2403
|
if (l({
|
|
2312
2404
|
row: a,
|
|
2313
2405
|
column: e,
|
|
@@ -2318,7 +2410,7 @@ function Ti({ column: e, colSpan: t, isCellSelected: n, isCopied: r, isDraggedOv
|
|
|
2318
2410
|
}
|
|
2319
2411
|
function S(t) {
|
|
2320
2412
|
if (c) {
|
|
2321
|
-
let n =
|
|
2413
|
+
let n = Jn(t);
|
|
2322
2414
|
if (c({
|
|
2323
2415
|
row: a,
|
|
2324
2416
|
column: e,
|
|
@@ -2338,7 +2430,7 @@ function Ti({ column: e, colSpan: t, isCellSelected: n, isCopied: r, isDraggedOv
|
|
|
2338
2430
|
"aria-readonly": !v || void 0,
|
|
2339
2431
|
tabIndex: p,
|
|
2340
2432
|
className: _,
|
|
2341
|
-
style:
|
|
2433
|
+
style: ur(e, t),
|
|
2342
2434
|
onClick: b,
|
|
2343
2435
|
onDoubleClick: S,
|
|
2344
2436
|
onContextMenu: x,
|
|
@@ -2354,15 +2446,15 @@ function Ti({ column: e, colSpan: t, isCellSelected: n, isCopied: r, isDraggedOv
|
|
|
2354
2446
|
})
|
|
2355
2447
|
});
|
|
2356
2448
|
}
|
|
2357
|
-
var
|
|
2358
|
-
function
|
|
2449
|
+
var Oi = /*#__PURE__*/ M(Di);
|
|
2450
|
+
function ki({ className: e, rowIdx: t, gridRowStart: n, selectedCellIdx: r, isRowSelected: i, copiedCellIdx: a, draggedOverCellIdx: o, lastFrozenColumnIndex: s, row: c, viewportColumns: l, selectedCellEditor: u, onCellClick: d, onCellDoubleClick: f, onCellContextMenu: p, rowClass: m, setDraggedOverRowIdx: h, onMouseEnter: g, onRowChange: _, selectCell: v, ...y }, b) {
|
|
2359
2451
|
let x = X((e, n) => {
|
|
2360
2452
|
_(e, t, n);
|
|
2361
2453
|
});
|
|
2362
2454
|
function S(e) {
|
|
2363
2455
|
h?.(t), g?.(e);
|
|
2364
2456
|
}
|
|
2365
|
-
e =
|
|
2457
|
+
e = Gn(mi, `rdg-row-${t % 2 == 0 ? "even" : "odd"}`, m?.(c, t), e, r === -1 && gi);
|
|
2366
2458
|
let C = [];
|
|
2367
2459
|
for (let e = 0; e < l.length; e++) {
|
|
2368
2460
|
let n = l[e], { idx: i } = n, m = Y(n, s, {
|
|
@@ -2371,7 +2463,7 @@ function Di({ className: e, rowIdx: t, gridRowStart: n, selectedCellIdx: r, isRo
|
|
|
2371
2463
|
});
|
|
2372
2464
|
m !== void 0 && (e += m - 1);
|
|
2373
2465
|
let h = r === i;
|
|
2374
|
-
h && u ? C.push(u) : C.push(/*#__PURE__*/ B(
|
|
2466
|
+
h && u ? C.push(u) : C.push(/*#__PURE__*/ B(Oi, {
|
|
2375
2467
|
column: n,
|
|
2376
2468
|
colSpan: m,
|
|
2377
2469
|
row: c,
|
|
@@ -2386,28 +2478,28 @@ function Di({ className: e, rowIdx: t, gridRowStart: n, selectedCellIdx: r, isRo
|
|
|
2386
2478
|
selectCell: v
|
|
2387
2479
|
}, n.key));
|
|
2388
2480
|
}
|
|
2389
|
-
return /*#__PURE__*/ B(
|
|
2481
|
+
return /*#__PURE__*/ B(kr, {
|
|
2390
2482
|
value: i,
|
|
2391
2483
|
children: /*#__PURE__*/ B("div", {
|
|
2392
2484
|
role: "row",
|
|
2393
2485
|
ref: b,
|
|
2394
2486
|
className: e,
|
|
2395
2487
|
onMouseEnter: S,
|
|
2396
|
-
style:
|
|
2488
|
+
style: cr(n),
|
|
2397
2489
|
...y,
|
|
2398
2490
|
children: C
|
|
2399
2491
|
})
|
|
2400
2492
|
});
|
|
2401
2493
|
}
|
|
2402
|
-
var
|
|
2403
|
-
function
|
|
2404
|
-
return /*#__PURE__*/ B(
|
|
2494
|
+
var Ai = /*#__PURE__*/ M(/*#__PURE__*/ he(ki));
|
|
2495
|
+
function ji(e, t) {
|
|
2496
|
+
return /*#__PURE__*/ B(Ai, { ...t }, e);
|
|
2405
2497
|
}
|
|
2406
|
-
function
|
|
2498
|
+
function Mi({ scrollToPosition: { idx: e, rowIdx: t }, gridElement: n, setScrollToCellPosition: r }) {
|
|
2407
2499
|
let i = I(null);
|
|
2408
|
-
return
|
|
2409
|
-
|
|
2410
|
-
}),
|
|
2500
|
+
return Hr(() => {
|
|
2501
|
+
qn(i.current);
|
|
2502
|
+
}), Hr(() => {
|
|
2411
2503
|
function e() {
|
|
2412
2504
|
r(null);
|
|
2413
2505
|
}
|
|
@@ -2426,26 +2518,26 @@ function Ai({ scrollToPosition: { idx: e, rowIdx: t }, gridElement: n, setScroll
|
|
|
2426
2518
|
}
|
|
2427
2519
|
});
|
|
2428
2520
|
}
|
|
2429
|
-
var
|
|
2430
|
-
function
|
|
2431
|
-
return /*#__PURE__*/ V(z, { children: [
|
|
2521
|
+
var Ni = "rdg-sort-arrow a3ejtar7-0-0-beta-46";
|
|
2522
|
+
function Pi({ sortDirection: e, priority: t }) {
|
|
2523
|
+
return /*#__PURE__*/ V(z, { children: [Fi({ sortDirection: e }), Ii({ priority: t })] });
|
|
2432
2524
|
}
|
|
2433
|
-
function
|
|
2525
|
+
function Fi({ sortDirection: e }) {
|
|
2434
2526
|
return e === void 0 ? null : /*#__PURE__*/ B("svg", {
|
|
2435
2527
|
viewBox: "0 0 12 8",
|
|
2436
2528
|
width: "12",
|
|
2437
2529
|
height: "8",
|
|
2438
|
-
className:
|
|
2530
|
+
className: Ni,
|
|
2439
2531
|
"aria-hidden": !0,
|
|
2440
2532
|
children: /*#__PURE__*/ B("path", { d: e === "ASC" ? "M0 8 6 0 12 8" : "M0 0 6 8 12 0" })
|
|
2441
2533
|
});
|
|
2442
2534
|
}
|
|
2443
|
-
function
|
|
2535
|
+
function Ii({ priority: e }) {
|
|
2444
2536
|
return e;
|
|
2445
2537
|
}
|
|
2446
|
-
var
|
|
2447
|
-
function
|
|
2448
|
-
let { tabIndex: o, childTabIndex: s, onFocus: c } =
|
|
2538
|
+
var Li = "rdg rnvodz57-0-0-beta-46", Ri = "rdg-viewport-dragging vlqv91k7-0-0-beta-46", zi = "f1lsfrzw7-0-0-beta-46", Bi = "f1cte0lg7-0-0-beta-46", Vi = "s8wc6fl7-0-0-beta-46";
|
|
2539
|
+
function Hi({ column: e, colSpan: t, row: n, rowIdx: r, isCellSelected: i, selectCell: a }) {
|
|
2540
|
+
let { tabIndex: o, childTabIndex: s, onFocus: c } = Kr(i), { summaryCellClass: l } = e, u = dr(e, Vi, typeof l == "function" ? l(n) : l);
|
|
2449
2541
|
function d() {
|
|
2450
2542
|
a({
|
|
2451
2543
|
rowIdx: r,
|
|
@@ -2459,7 +2551,7 @@ function Bi({ column: e, colSpan: t, row: n, rowIdx: r, isCellSelected: i, selec
|
|
|
2459
2551
|
"aria-selected": i,
|
|
2460
2552
|
tabIndex: o,
|
|
2461
2553
|
className: u,
|
|
2462
|
-
style:
|
|
2554
|
+
style: ur(e, t),
|
|
2463
2555
|
onClick: d,
|
|
2464
2556
|
onFocus: c,
|
|
2465
2557
|
children: e.renderSummaryCell?.({
|
|
@@ -2469,8 +2561,8 @@ function Bi({ column: e, colSpan: t, row: n, rowIdx: r, isCellSelected: i, selec
|
|
|
2469
2561
|
})
|
|
2470
2562
|
});
|
|
2471
2563
|
}
|
|
2472
|
-
var
|
|
2473
|
-
function
|
|
2564
|
+
var Ui = /*#__PURE__*/ M(Hi), Wi = "skuhp557-0-0-beta-46", Gi = "tf8l5ub7-0-0-beta-46", Ki = `rdg-summary-row ${Wi}`;
|
|
2565
|
+
function qi({ rowIdx: e, gridRowStart: t, row: n, viewportColumns: r, top: i, bottom: a, lastFrozenColumnIndex: o, selectedCellIdx: s, isTop: c, selectCell: l, "aria-rowindex": u }) {
|
|
2474
2566
|
let d = [];
|
|
2475
2567
|
for (let t = 0; t < r.length; t++) {
|
|
2476
2568
|
let i = r[t], a = Y(i, o, {
|
|
@@ -2479,7 +2571,7 @@ function Gi({ rowIdx: e, gridRowStart: t, row: n, viewportColumns: r, top: i, bo
|
|
|
2479
2571
|
});
|
|
2480
2572
|
a !== void 0 && (t += a - 1);
|
|
2481
2573
|
let c = s === i.idx;
|
|
2482
|
-
d.push(/*#__PURE__*/ B(
|
|
2574
|
+
d.push(/*#__PURE__*/ B(Ui, {
|
|
2483
2575
|
column: i,
|
|
2484
2576
|
colSpan: a,
|
|
2485
2577
|
row: n,
|
|
@@ -2491,18 +2583,18 @@ function Gi({ rowIdx: e, gridRowStart: t, row: n, viewportColumns: r, top: i, bo
|
|
|
2491
2583
|
return /*#__PURE__*/ B("div", {
|
|
2492
2584
|
role: "row",
|
|
2493
2585
|
"aria-rowindex": u,
|
|
2494
|
-
className:
|
|
2586
|
+
className: Gn(mi, `rdg-row-${e % 2 == 0 ? "even" : "odd"}`, Ki, c ? `${vi} ${Gi}` : yi, s === -1 && gi),
|
|
2495
2587
|
style: {
|
|
2496
|
-
...
|
|
2588
|
+
...cr(t),
|
|
2497
2589
|
"--rdg-summary-row-top": i === void 0 ? void 0 : `${i}px`,
|
|
2498
2590
|
"--rdg-summary-row-bottom": a === void 0 ? void 0 : `${a}px`
|
|
2499
2591
|
},
|
|
2500
2592
|
children: d
|
|
2501
2593
|
});
|
|
2502
2594
|
}
|
|
2503
|
-
var
|
|
2504
|
-
function
|
|
2505
|
-
let { columns: n, rows: r, topSummaryRows: i, bottomSummaryRows: a, rowKeyGetter: o, onRowsChange: s, rowHeight: c, headerRowHeight: l, summaryRowHeight: u, selectedRows: d, onSelectedRowsChange: f, sortColumns: p, onSortColumnsChange: m, defaultColumnOptions: h, onCellClick: g, onCellDoubleClick: _, onCellContextMenu: v, onCellKeyDown: y, onSelectedCellChange: b, onScroll: x, onColumnResize: S, onColumnsReorder: C, onFill: ee, onCopy: te, onPaste: ne, enableVirtualization: re, renderers: w, className: ie, style: T, rowClass: E, direction: ae, role: D, "aria-label": oe, "aria-labelledby": se, "aria-describedby": ce, "aria-rowcount": le, "data-testid": ue } = e, O =
|
|
2595
|
+
var Ji = /*#__PURE__*/ M(qi);
|
|
2596
|
+
function Yi(e, t) {
|
|
2597
|
+
let { columns: n, rows: r, topSummaryRows: i, bottomSummaryRows: a, rowKeyGetter: o, onRowsChange: s, rowHeight: c, headerRowHeight: l, summaryRowHeight: u, selectedRows: d, onSelectedRowsChange: f, sortColumns: p, onSortColumnsChange: m, defaultColumnOptions: h, onCellClick: g, onCellDoubleClick: _, onCellContextMenu: v, onCellKeyDown: y, onSelectedCellChange: b, onScroll: x, onColumnResize: S, onColumnsReorder: C, onFill: ee, onCopy: te, onPaste: ne, enableVirtualization: re, renderers: w, className: ie, style: T, rowClass: E, direction: ae, role: D, "aria-label": oe, "aria-labelledby": se, "aria-describedby": ce, "aria-rowcount": le, "data-testid": ue } = e, O = Er(), k = D ?? "grid", de = c ?? 35, A = l ?? (typeof de == "number" ? de : 35), j = u ?? (typeof de == "number" ? de : 35), fe = w?.renderRow ?? O?.renderRow ?? ji, pe = w?.renderSortStatus ?? O?.renderSortStatus ?? Pi, me = w?.renderCheckbox ?? O?.renderCheckbox ?? Sr, he = w?.noRowsFallback ?? O?.noRowsFallback, ge = re ?? !0, M = ae ?? "ltr", [_e, P] = L(0), [ve, be] = L(0), [R, xe] = L(() => /* @__PURE__ */ new Map()), [Se, Ce] = L(() => /* @__PURE__ */ new Map()), [we, Te] = L(null), [Ee, De] = L(!1), [Oe, ke] = L(void 0), [Ae, je] = L(null), Me = N((e) => R.get(e.key) ?? Se.get(e.key) ?? e.width, [Se, R]), [Ne, Pe, Fe, Ie] = Gr(), { columns: H, colSpanColumns: Le, lastFrozenColumnIndex: U, headerRowsCount: Re, colOverscanStartIdx: ze, colOverscanEndIdx: Be, templateColumns: Ve, layoutCssVars: He, totalFrozenColumnWidth: Ue } = Br({
|
|
2506
2598
|
rawColumns: n,
|
|
2507
2599
|
defaultColumnOptions: h,
|
|
2508
2600
|
getColumnWidth: Me,
|
|
@@ -2523,13 +2615,13 @@ function qi(e, t) {
|
|
|
2523
2615
|
r,
|
|
2524
2616
|
d,
|
|
2525
2617
|
o
|
|
2526
|
-
]), { rowOverscanStartIdx: mt, rowOverscanEndIdx: ht, totalRowHeight: gt, gridTemplateRows: _t, getRowTop: vt, getRowHeight: yt, findRowIdx: bt } =
|
|
2618
|
+
]), { rowOverscanStartIdx: mt, rowOverscanEndIdx: ht, totalRowHeight: gt, gridTemplateRows: _t, getRowTop: vt, getRowHeight: yt, findRowIdx: bt } = Jr({
|
|
2527
2619
|
rows: r,
|
|
2528
2620
|
rowHeight: de,
|
|
2529
2621
|
clientHeight: ot,
|
|
2530
2622
|
scrollTop: _e,
|
|
2531
2623
|
enableVirtualization: ge
|
|
2532
|
-
}), xt =
|
|
2624
|
+
}), xt = qr({
|
|
2533
2625
|
columns: H,
|
|
2534
2626
|
colSpanColumns: Le,
|
|
2535
2627
|
colOverscanStartIdx: ze,
|
|
@@ -2540,19 +2632,19 @@ function qi(e, t) {
|
|
|
2540
2632
|
rows: r,
|
|
2541
2633
|
topSummaryRows: i,
|
|
2542
2634
|
bottomSummaryRows: a
|
|
2543
|
-
}), { gridTemplateColumns: St, handleColumnResize: Ct } =
|
|
2635
|
+
}), { gridTemplateColumns: St, handleColumnResize: Ct } = Ur(H, xt, Ve, Ne, Pe, R, Se, xe, Ce, S), wt = nt ? -1 : 0, Tt = H.length - 1, Et = Jt(K), Dt = Xt(K), Ot = A + gt + at + Ie, kt = X(Ct), At = X(C), jt = X(m), q = X(g), Mt = X(_), Nt = X(v), Pt = X(zt), Ft = X(Ht), It = X(Qt), Lt = X(({ idx: e, rowIdx: t }) => {
|
|
2544
2636
|
Qt({
|
|
2545
2637
|
rowIdx: G + t - 1,
|
|
2546
2638
|
idx: e
|
|
2547
2639
|
});
|
|
2548
2640
|
});
|
|
2549
|
-
|
|
2550
|
-
if (!Et ||
|
|
2641
|
+
Hr(() => {
|
|
2642
|
+
if (!Et || Zi(K, Ze.current)) {
|
|
2551
2643
|
Ze.current = K;
|
|
2552
2644
|
return;
|
|
2553
2645
|
}
|
|
2554
|
-
Ze.current = K, K.idx === -1 && (et.current.focus({ preventScroll: !0 }),
|
|
2555
|
-
}),
|
|
2646
|
+
Ze.current = K, K.idx === -1 && (et.current.focus({ preventScroll: !0 }), qn(et.current));
|
|
2647
|
+
}), Hr(() => {
|
|
2556
2648
|
tt.current && (tt.current = !1, nn());
|
|
2557
2649
|
}), ye(t, () => ({
|
|
2558
2650
|
element: Ne.current,
|
|
@@ -2570,7 +2662,7 @@ function qi(e, t) {
|
|
|
2570
2662
|
}, []);
|
|
2571
2663
|
function zt(e) {
|
|
2572
2664
|
if (!f) return;
|
|
2573
|
-
if (
|
|
2665
|
+
if (_r(o), e.type === "HEADER") {
|
|
2574
2666
|
let t = new Set(d);
|
|
2575
2667
|
for (let n of r) {
|
|
2576
2668
|
let r = o(n);
|
|
@@ -2581,7 +2673,7 @@ function qi(e, t) {
|
|
|
2581
2673
|
}
|
|
2582
2674
|
let { row: t, checked: n, isShiftClick: i } = e, a = new Set(d), s = o(t), c = $e.current, l = r.indexOf(t);
|
|
2583
2675
|
if ($e.current = l, n ? a.add(s) : a.delete(s), i && c !== -1 && c !== l && c < r.length) {
|
|
2584
|
-
let e =
|
|
2676
|
+
let e = hr(l - c);
|
|
2585
2677
|
for (let t = c + e; t !== l; t += e) {
|
|
2586
2678
|
let e = r[t];
|
|
2587
2679
|
n ? a.add(o(e)) : a.delete(o(e));
|
|
@@ -2593,7 +2685,7 @@ function qi(e, t) {
|
|
|
2593
2685
|
let { idx: t, rowIdx: n, mode: i } = K;
|
|
2594
2686
|
if (i === "EDIT") return;
|
|
2595
2687
|
if (y && J(n)) {
|
|
2596
|
-
let i = r[n], a =
|
|
2688
|
+
let i = r[n], a = Jn(e);
|
|
2597
2689
|
if (y({
|
|
2598
2690
|
mode: "SELECT",
|
|
2599
2691
|
row: i,
|
|
@@ -2606,7 +2698,7 @@ function qi(e, t) {
|
|
|
2606
2698
|
let a = e.target.closest(".rdg-cell") !== null, o = nt && e.target === et.current;
|
|
2607
2699
|
if (!a && !o) return;
|
|
2608
2700
|
let { keyCode: s } = e;
|
|
2609
|
-
if (Dt && (ne != null || te != null) &&
|
|
2701
|
+
if (Dt && (ne != null || te != null) && Xn(e)) {
|
|
2610
2702
|
if (s === 67) {
|
|
2611
2703
|
if (window.getSelection()?.isCollapsed === !1) return;
|
|
2612
2704
|
Wt();
|
|
@@ -2640,7 +2732,7 @@ function qi(e, t) {
|
|
|
2640
2732
|
function Vt(e) {
|
|
2641
2733
|
let { scrollTop: t, scrollLeft: n } = e.currentTarget;
|
|
2642
2734
|
it(() => {
|
|
2643
|
-
P(t), be(
|
|
2735
|
+
P(t), be(gr(n));
|
|
2644
2736
|
}), x?.(e);
|
|
2645
2737
|
}
|
|
2646
2738
|
function Ht(e, t, n) {
|
|
@@ -2678,7 +2770,7 @@ function qi(e, t) {
|
|
|
2678
2770
|
if (!Dt) return;
|
|
2679
2771
|
let t = r[K.rowIdx], { key: n, shiftKey: i } = e;
|
|
2680
2772
|
if (st && i && n === " ") {
|
|
2681
|
-
|
|
2773
|
+
_r(o);
|
|
2682
2774
|
let n = o(t);
|
|
2683
2775
|
zt({
|
|
2684
2776
|
type: "ROW",
|
|
@@ -2688,7 +2780,7 @@ function qi(e, t) {
|
|
|
2688
2780
|
}), e.preventDefault();
|
|
2689
2781
|
return;
|
|
2690
2782
|
}
|
|
2691
|
-
Zt(K) &&
|
|
2783
|
+
Zt(K) && Zn(e) && Xe(({ idx: e, rowIdx: n }) => ({
|
|
2692
2784
|
idx: e,
|
|
2693
2785
|
rowIdx: n,
|
|
2694
2786
|
mode: "EDIT",
|
|
@@ -2712,7 +2804,7 @@ function qi(e, t) {
|
|
|
2712
2804
|
return J(t) && qt(e);
|
|
2713
2805
|
}
|
|
2714
2806
|
function Zt(e) {
|
|
2715
|
-
return Yt(e) &&
|
|
2807
|
+
return Yt(e) && tr({
|
|
2716
2808
|
columns: H,
|
|
2717
2809
|
rows: r,
|
|
2718
2810
|
selectedPosition: e
|
|
@@ -2721,13 +2813,13 @@ function qi(e, t) {
|
|
|
2721
2813
|
function Qt(e, t) {
|
|
2722
2814
|
if (!Jt(e)) return;
|
|
2723
2815
|
Ut();
|
|
2724
|
-
let n = r[e.rowIdx], i =
|
|
2816
|
+
let n = r[e.rowIdx], i = Zi(K, e);
|
|
2725
2817
|
t && Zt(e) ? Xe({
|
|
2726
2818
|
...e,
|
|
2727
2819
|
mode: "EDIT",
|
|
2728
2820
|
row: n,
|
|
2729
2821
|
originalRow: n
|
|
2730
|
-
}) : i ?
|
|
2822
|
+
}) : i ? qn(Xi(Ne.current)) : (tt.current = !0, Xe({
|
|
2731
2823
|
...e,
|
|
2732
2824
|
mode: "SELECT"
|
|
2733
2825
|
})), b && !i && b({
|
|
@@ -2795,7 +2887,7 @@ function qi(e, t) {
|
|
|
2795
2887
|
function en(e) {
|
|
2796
2888
|
let { key: t, shiftKey: n } = e, o = "NONE";
|
|
2797
2889
|
if (t === "Tab") {
|
|
2798
|
-
if (
|
|
2890
|
+
if (ar({
|
|
2799
2891
|
shiftKey: n,
|
|
2800
2892
|
maxColIdx: Tt,
|
|
2801
2893
|
minRowIdx: G,
|
|
@@ -2808,8 +2900,8 @@ function qi(e, t) {
|
|
|
2808
2900
|
o = "CHANGE_ROW";
|
|
2809
2901
|
}
|
|
2810
2902
|
e.preventDefault();
|
|
2811
|
-
let s = $t(t,
|
|
2812
|
-
|
|
2903
|
+
let s = $t(t, Xn(e), n);
|
|
2904
|
+
Zi(K, s) || Qt(ir({
|
|
2813
2905
|
moveUp: t === "ArrowUp",
|
|
2814
2906
|
moveNext: t === ut || t === "Tab" && !n,
|
|
2815
2907
|
columns: H,
|
|
@@ -2833,15 +2925,15 @@ function qi(e, t) {
|
|
|
2833
2925
|
return (t < Oe ? t < e && e <= Oe : t > e && e >= Oe) ? K.idx : void 0;
|
|
2834
2926
|
}
|
|
2835
2927
|
function nn() {
|
|
2836
|
-
let e =
|
|
2837
|
-
e !== null && (
|
|
2928
|
+
let e = Xi(Ne.current);
|
|
2929
|
+
e !== null && (qn(e), (e.querySelector("[tabindex=\"0\"]") ?? e).focus({ preventScroll: !0 }));
|
|
2838
2930
|
}
|
|
2839
2931
|
function rn() {
|
|
2840
2932
|
if (ee == null || K.mode === "EDIT" || !Xt(K)) return;
|
|
2841
2933
|
let { idx: e, rowIdx: t } = K, n = H[e];
|
|
2842
2934
|
if (n.renderEditCell == null || n.editable === !1) return;
|
|
2843
2935
|
let i = Me(n);
|
|
2844
|
-
return /*#__PURE__*/ B(
|
|
2936
|
+
return /*#__PURE__*/ B(Qr, {
|
|
2845
2937
|
gridRowStart: W + t + 1,
|
|
2846
2938
|
rows: r,
|
|
2847
2939
|
column: n,
|
|
@@ -2870,7 +2962,7 @@ function qi(e, t) {
|
|
|
2870
2962
|
mode: "SELECT"
|
|
2871
2963
|
}));
|
|
2872
2964
|
};
|
|
2873
|
-
return r[K.rowIdx] !== K.originalRow && o(!1), /*#__PURE__*/ B(
|
|
2965
|
+
return r[K.rowIdx] !== K.originalRow && o(!1), /*#__PURE__*/ B(ei, {
|
|
2874
2966
|
column: i,
|
|
2875
2967
|
colSpan: a,
|
|
2876
2968
|
row: n,
|
|
@@ -2942,7 +3034,7 @@ function qi(e, t) {
|
|
|
2942
3034
|
"aria-multiselectable": st ? !0 : void 0,
|
|
2943
3035
|
"aria-colcount": H.length,
|
|
2944
3036
|
"aria-rowcount": dt,
|
|
2945
|
-
className:
|
|
3037
|
+
className: Gn(Li, ie, Ee && Ri),
|
|
2946
3038
|
style: {
|
|
2947
3039
|
...T,
|
|
2948
3040
|
scrollPaddingInlineStart: K.idx > U || Ae?.idx !== void 0 ? `${Ue}px` : void 0,
|
|
@@ -2959,19 +3051,19 @@ function qi(e, t) {
|
|
|
2959
3051
|
onKeyDown: Bt,
|
|
2960
3052
|
"data-testid": ue,
|
|
2961
3053
|
children: [
|
|
2962
|
-
/*#__PURE__*/ B(
|
|
3054
|
+
/*#__PURE__*/ B(Tr, {
|
|
2963
3055
|
value: ft,
|
|
2964
|
-
children: /*#__PURE__*/ V(
|
|
3056
|
+
children: /*#__PURE__*/ V(jr, {
|
|
2965
3057
|
value: Pt,
|
|
2966
|
-
children: [/*#__PURE__*/ V(
|
|
3058
|
+
children: [/*#__PURE__*/ V(kr, {
|
|
2967
3059
|
value: pt,
|
|
2968
|
-
children: [Array.from({ length: qe }, (e, t) => /*#__PURE__*/ B(
|
|
3060
|
+
children: [Array.from({ length: qe }, (e, t) => /*#__PURE__*/ B(wi, {
|
|
2969
3061
|
rowIdx: t + 1,
|
|
2970
3062
|
level: -qe + t,
|
|
2971
3063
|
columns: on(G + t),
|
|
2972
3064
|
selectedCellIdx: K.rowIdx === G + t ? K.idx : void 0,
|
|
2973
3065
|
selectCell: Lt
|
|
2974
|
-
}, t)), /*#__PURE__*/ B(
|
|
3066
|
+
}, t)), /*#__PURE__*/ B(Si, {
|
|
2975
3067
|
rowIdx: Re,
|
|
2976
3068
|
columns: on(Je),
|
|
2977
3069
|
onColumnResize: kt,
|
|
@@ -2987,7 +3079,7 @@ function qi(e, t) {
|
|
|
2987
3079
|
}), r.length === 0 && he ? he : /*#__PURE__*/ V(z, { children: [
|
|
2988
3080
|
i?.map((e, t) => {
|
|
2989
3081
|
let n = Re + 1 + t, r = Je + 1 + t, i = K.rowIdx === r;
|
|
2990
|
-
return /*#__PURE__*/ B(
|
|
3082
|
+
return /*#__PURE__*/ B(Ji, {
|
|
2991
3083
|
"aria-rowindex": n,
|
|
2992
3084
|
rowIdx: r,
|
|
2993
3085
|
gridRowStart: n,
|
|
@@ -3004,7 +3096,7 @@ function qi(e, t) {
|
|
|
3004
3096
|
sn(),
|
|
3005
3097
|
a?.map((e, t) => {
|
|
3006
3098
|
let n = W + r.length + t + 1, i = r.length + t, o = K.rowIdx === i, s = ot > gt ? Fe - j * (a.length - t) : void 0, c = s === void 0 ? j * (a.length - 1 - t) : void 0;
|
|
3007
|
-
return /*#__PURE__*/ B(
|
|
3099
|
+
return /*#__PURE__*/ B(Ji, {
|
|
3008
3100
|
"aria-rowindex": dt - Ge + t + 1,
|
|
3009
3101
|
rowIdx: i,
|
|
3010
3102
|
gridRowStart: n,
|
|
@@ -3022,14 +3114,14 @@ function qi(e, t) {
|
|
|
3022
3114
|
})
|
|
3023
3115
|
}),
|
|
3024
3116
|
rn(),
|
|
3025
|
-
|
|
3117
|
+
er(xt),
|
|
3026
3118
|
nt && /*#__PURE__*/ B("div", {
|
|
3027
3119
|
ref: et,
|
|
3028
3120
|
tabIndex: ln ? 0 : -1,
|
|
3029
|
-
className:
|
|
3121
|
+
className: Gn(zi, ln && [hi, U !== -1 && _i], !J(K.rowIdx) && Bi),
|
|
3030
3122
|
style: { gridRowStart: K.rowIdx + W + 1 }
|
|
3031
3123
|
}),
|
|
3032
|
-
Ae !== null && /*#__PURE__*/ B(
|
|
3124
|
+
Ae !== null && /*#__PURE__*/ B(Mi, {
|
|
3033
3125
|
scrollToPosition: Ae,
|
|
3034
3126
|
setScrollToCellPosition: je,
|
|
3035
3127
|
gridElement: Ne.current
|
|
@@ -3037,19 +3129,19 @@ function qi(e, t) {
|
|
|
3037
3129
|
]
|
|
3038
3130
|
});
|
|
3039
3131
|
}
|
|
3040
|
-
function
|
|
3132
|
+
function Xi(e) {
|
|
3041
3133
|
return e.querySelector(":scope > [role=\"row\"] > [tabindex=\"0\"]");
|
|
3042
3134
|
}
|
|
3043
|
-
function
|
|
3135
|
+
function Zi(e, t) {
|
|
3044
3136
|
return e.idx === t.idx && e.rowIdx === t.rowIdx;
|
|
3045
3137
|
}
|
|
3046
|
-
var
|
|
3138
|
+
var Qi = /*#__PURE__*/ he(Yi), $i = { root: "_root_16dfl_2" }, ea = {
|
|
3047
3139
|
list: "_list_12ajl_1",
|
|
3048
3140
|
rdg: "_rdg_12ajl_4",
|
|
3049
3141
|
root: "_root_12ajl_15",
|
|
3050
3142
|
header: "_header_12ajl_31",
|
|
3051
3143
|
footer: "_footer_12ajl_47"
|
|
3052
|
-
},
|
|
3144
|
+
}, ta = () => /* @__PURE__ */ V("div", {
|
|
3053
3145
|
style: {
|
|
3054
3146
|
textAlign: "center",
|
|
3055
3147
|
gridColumn: "1/-1"
|
|
@@ -3059,31 +3151,31 @@ var Xi = /*#__PURE__*/ he(qi), Zi = { root: "_root_16dfl_2" }, Qi = {
|
|
|
3059
3151
|
title: "ショボーン",
|
|
3060
3152
|
children: "(´・ω・`)"
|
|
3061
3153
|
})]
|
|
3062
|
-
}),
|
|
3154
|
+
}), na = (e) => {
|
|
3063
3155
|
let { children: t, theme: n, ...i } = e, a = k("light"), o = 0, s = j.map(t, (e) => ge(e) ? (o = e.props.selectedRows ? e.props.selectedRows.size : 0, fe(e, {
|
|
3064
3156
|
className: a === "dark" ? "rdg-dark" : "rdg-light",
|
|
3065
|
-
components: { noRowsFallback: /* @__PURE__ */ B(
|
|
3157
|
+
components: { noRowsFallback: /* @__PURE__ */ B(ta, {}) }
|
|
3066
3158
|
})) : e);
|
|
3067
3159
|
return /* @__PURE__ */ V(b, {
|
|
3068
3160
|
radius: "var(--mantine-grid-border-radius)",
|
|
3069
|
-
classNames: { root:
|
|
3161
|
+
classNames: { root: ea.root },
|
|
3070
3162
|
...i,
|
|
3071
3163
|
children: [
|
|
3072
3164
|
o ? /* @__PURE__ */ B(r, {
|
|
3073
|
-
className:
|
|
3165
|
+
className: ea.header,
|
|
3074
3166
|
children: /* @__PURE__ */ V(ae, {
|
|
3075
3167
|
variant: "text",
|
|
3076
3168
|
children: [o, " item(s) selected"]
|
|
3077
3169
|
})
|
|
3078
3170
|
}) : null,
|
|
3079
3171
|
/* @__PURE__ */ B(r, {
|
|
3080
|
-
className:
|
|
3172
|
+
className: ea.list,
|
|
3081
3173
|
children: s
|
|
3082
3174
|
}),
|
|
3083
|
-
/* @__PURE__ */ B(r, { className:
|
|
3175
|
+
/* @__PURE__ */ B(r, { className: ea.footer })
|
|
3084
3176
|
]
|
|
3085
3177
|
});
|
|
3086
|
-
},
|
|
3178
|
+
}, ra = ({ onChange: e, ...t }) => {
|
|
3087
3179
|
if (!e) return;
|
|
3088
3180
|
let n = (t) => {
|
|
3089
3181
|
e(t.target.checked, t.nativeEvent.shiftKey);
|
|
@@ -3094,9 +3186,9 @@ var Xi = /*#__PURE__*/ he(qi), Zi = { root: "_root_16dfl_2" }, Qi = {
|
|
|
3094
3186
|
radius: "sm",
|
|
3095
3187
|
onChange: n
|
|
3096
3188
|
});
|
|
3097
|
-
},
|
|
3189
|
+
}, ia = /* @__PURE__ */ function(e) {
|
|
3098
3190
|
return e[e.small = 20] = "small", e[e.standard = 36] = "standard", e[e.big = 45] = "big", e;
|
|
3099
|
-
}({}),
|
|
3191
|
+
}({}), aa = (e) => {
|
|
3100
3192
|
let { components: t, columns: n, withSorting: r, withColumnResizing: i, withRowSelection: a, rowHeight: o, headerRowHeight: s, rows: c, rowKeyGetter: l, onRowClick: u, sortColumns: d, onSort: f, setSortColumns: p, selectedRows: m, onSelectedRowsChange: h } = e, g = (e) => {
|
|
3101
3193
|
let t = (t) => e.render({
|
|
3102
3194
|
row: t.row,
|
|
@@ -3137,8 +3229,8 @@ var Xi = /*#__PURE__*/ he(qi), Zi = { root: "_root_16dfl_2" }, Qi = {
|
|
|
3137
3229
|
selectedRows: m,
|
|
3138
3230
|
renderers: { renderCheckbox: t ? (e) => t.DGSelectComponent(e) : void 0 }
|
|
3139
3231
|
};
|
|
3140
|
-
return a && (v.columns = [
|
|
3141
|
-
},
|
|
3232
|
+
return a && (v.columns = [Lr, ...v.columns]), v;
|
|
3233
|
+
}, oa = (e, t) => {
|
|
3142
3234
|
switch (typeof e) {
|
|
3143
3235
|
case "number": return (e, n) => e[t] - n[t];
|
|
3144
3236
|
case "string":
|
|
@@ -3153,8 +3245,8 @@ var Xi = /*#__PURE__*/ he(qi), Zi = { root: "_root_16dfl_2" }, Qi = {
|
|
|
3153
3245
|
};
|
|
3154
3246
|
//#endregion
|
|
3155
3247
|
//#region src/molecules/data-grid/hm/use-data-gri-parser.hook.ts
|
|
3156
|
-
function
|
|
3157
|
-
let [t, n] = L([]), r = F(() =>
|
|
3248
|
+
function sa(e) {
|
|
3249
|
+
let [t, n] = L([]), r = F(() => aa({
|
|
3158
3250
|
...e,
|
|
3159
3251
|
setSortColumns: n,
|
|
3160
3252
|
sortColumns: t
|
|
@@ -3166,7 +3258,7 @@ function aa(e) {
|
|
|
3166
3258
|
]);
|
|
3167
3259
|
return r.rows = F(() => t.length === 0 ? r.rows : [...r.rows].sort((e, n) => {
|
|
3168
3260
|
for (let r of t) {
|
|
3169
|
-
let { columnKey: t } = r, i = e[t], a =
|
|
3261
|
+
let { columnKey: t } = r, i = e[t], a = oa(i, r.columnKey)(e, n);
|
|
3170
3262
|
if (a !== 0) return r.direction === "ASC" ? a : -a;
|
|
3171
3263
|
}
|
|
3172
3264
|
return 0;
|
|
@@ -3178,7 +3270,7 @@ function aa(e) {
|
|
|
3178
3270
|
}
|
|
3179
3271
|
//#endregion
|
|
3180
3272
|
//#region src/molecules/data-grid/hm/render-row.tsx
|
|
3181
|
-
var
|
|
3273
|
+
var ca = {
|
|
3182
3274
|
text: (e) => /* @__PURE__ */ B(z, { children: String(e) }),
|
|
3183
3275
|
checkbox: (e) => /* @__PURE__ */ B(s, {
|
|
3184
3276
|
radius: "sm",
|
|
@@ -3189,14 +3281,14 @@ var oa = {
|
|
|
3189
3281
|
};
|
|
3190
3282
|
//#endregion
|
|
3191
3283
|
//#region src/molecules/data-grid/hm/use-render-row.hook.tsx
|
|
3192
|
-
function
|
|
3284
|
+
function la(e) {
|
|
3193
3285
|
return F(() => {
|
|
3194
3286
|
let { columns: t, rows: n } = e, r = n ? n[0] : void 0;
|
|
3195
3287
|
if (!r) return e;
|
|
3196
3288
|
let i = n.map((e) => Ct(e)), a = (e, t, n) => ({
|
|
3197
3289
|
...t,
|
|
3198
3290
|
render: (t) => {
|
|
3199
|
-
let r = n, i = t.row[r], a =
|
|
3291
|
+
let r = n, i = t.row[r], a = ca[e];
|
|
3200
3292
|
return a(i);
|
|
3201
3293
|
}
|
|
3202
3294
|
}), o = t.map((e) => {
|
|
@@ -3224,8 +3316,8 @@ function sa(e) {
|
|
|
3224
3316
|
}
|
|
3225
3317
|
//#endregion
|
|
3226
3318
|
//#region src/molecules/data-grid/hm-data-grid.tsx
|
|
3227
|
-
var
|
|
3228
|
-
let t = A(), { columns: n, components: r = { DGSelectComponent:
|
|
3319
|
+
var ua = (e) => {
|
|
3320
|
+
let t = A(), { columns: n, components: r = { DGSelectComponent: ra }, onRowsChange: i, rows: a, selectedRows: o, headerRowHeight: s, rowHeight: c = ia.standard, onRowClick: l, onSelectedRowsChange: u, onSort: d, rowKeyGetter: f = (e) => e.id, withColumnResizing: p = !1, withRowSelection: m = !1, withSorting: h = !1 } = e, g = sa(la({
|
|
3229
3321
|
components: r,
|
|
3230
3322
|
columns: n,
|
|
3231
3323
|
rows: a,
|
|
@@ -3241,12 +3333,12 @@ var ca = (e) => {
|
|
|
3241
3333
|
withRowSelection: m,
|
|
3242
3334
|
withSorting: h
|
|
3243
3335
|
}));
|
|
3244
|
-
return /* @__PURE__ */ B(z, { children: /* @__PURE__ */ B(
|
|
3336
|
+
return /* @__PURE__ */ B(z, { children: /* @__PURE__ */ B(na, {
|
|
3245
3337
|
theme: t,
|
|
3246
|
-
className:
|
|
3247
|
-
children: /* @__PURE__ */ B(
|
|
3338
|
+
className: $i.root,
|
|
3339
|
+
children: /* @__PURE__ */ B(Qi, { ...g })
|
|
3248
3340
|
}) });
|
|
3249
|
-
},
|
|
3341
|
+
}, da = {
|
|
3250
3342
|
root: "_root_rr5ym_1",
|
|
3251
3343
|
inner: "_inner_rr5ym_24",
|
|
3252
3344
|
rightSection: "_rightSection_rr5ym_36",
|
|
@@ -3255,35 +3347,35 @@ var ca = (e) => {
|
|
|
3255
3347
|
leftIcon: "_leftIcon_rr5ym_58",
|
|
3256
3348
|
leftImageRoot: "_leftImageRoot_rr5ym_74",
|
|
3257
3349
|
leftImage: "_leftImage_rr5ym_74"
|
|
3258
|
-
},
|
|
3350
|
+
}, fa = (t) => {
|
|
3259
3351
|
let { flowName: n, subtitle: i, lastUpdated: o, leftIcon: s, leftImage: c, withRightSection: l = !0, onClick: u, onDelete: d, ...f } = t, p = o ? at(o).format("YYYY-MM-DD | HH:mm") : "";
|
|
3260
3352
|
return /* @__PURE__ */ B(a, {
|
|
3261
3353
|
padding: 0,
|
|
3262
|
-
className:
|
|
3354
|
+
className: da.root,
|
|
3263
3355
|
...f,
|
|
3264
3356
|
children: /* @__PURE__ */ V(r, {
|
|
3265
|
-
className:
|
|
3357
|
+
className: da.inner,
|
|
3266
3358
|
children: [/* @__PURE__ */ B(a.Section, {
|
|
3267
3359
|
onClick: u,
|
|
3268
3360
|
children: /* @__PURE__ */ V(r, {
|
|
3269
|
-
className:
|
|
3361
|
+
className: da.rightSection,
|
|
3270
3362
|
children: [s ? /* @__PURE__ */ B(r, {
|
|
3271
|
-
className:
|
|
3363
|
+
className: da.leftIcon,
|
|
3272
3364
|
children: s
|
|
3273
3365
|
}) : c ? /* @__PURE__ */ B(r, {
|
|
3274
|
-
className:
|
|
3366
|
+
className: da.leftImageRoot,
|
|
3275
3367
|
children: /* @__PURE__ */ B(h, {
|
|
3276
3368
|
src: c,
|
|
3277
3369
|
alt: c
|
|
3278
3370
|
})
|
|
3279
3371
|
}) : null, /* @__PURE__ */ V(r, { children: [/* @__PURE__ */ B(r, {
|
|
3280
|
-
className:
|
|
3372
|
+
className: da.flowName,
|
|
3281
3373
|
children: n
|
|
3282
3374
|
}), i ? /* @__PURE__ */ B(r, {
|
|
3283
|
-
className:
|
|
3375
|
+
className: da.subtitle,
|
|
3284
3376
|
children: i
|
|
3285
3377
|
}) : /* @__PURE__ */ V(r, {
|
|
3286
|
-
className:
|
|
3378
|
+
className: da.subtitle,
|
|
3287
3379
|
children: [
|
|
3288
3380
|
/* @__PURE__ */ B(Ae, {}),
|
|
3289
3381
|
" ",
|
|
@@ -3301,15 +3393,15 @@ var ca = (e) => {
|
|
|
3301
3393
|
}) })]
|
|
3302
3394
|
})
|
|
3303
3395
|
});
|
|
3304
|
-
},
|
|
3396
|
+
}, pa = {
|
|
3305
3397
|
root: "_root_1swn9_1",
|
|
3306
3398
|
navbar: "_navbar_1swn9_10",
|
|
3307
3399
|
bottomMenu: "_bottomMenu_1swn9_31",
|
|
3308
3400
|
logo: "_logo_1swn9_35",
|
|
3309
3401
|
link: "_link_1swn9_41"
|
|
3310
|
-
},
|
|
3402
|
+
}, ma = (e) => {
|
|
3311
3403
|
let { label: t, onClick: n, color: r, to: i, children: a } = e, [o, s] = L(!1);
|
|
3312
|
-
return /* @__PURE__ */ B(
|
|
3404
|
+
return /* @__PURE__ */ B(Ln, {
|
|
3313
3405
|
to: i,
|
|
3314
3406
|
handleIsActive: (e) => {
|
|
3315
3407
|
s(e);
|
|
@@ -3323,22 +3415,22 @@ var ca = (e) => {
|
|
|
3323
3415
|
variant: "subtle",
|
|
3324
3416
|
onClick: n,
|
|
3325
3417
|
mod: [{ active: o }],
|
|
3326
|
-
className:
|
|
3418
|
+
className: pa.link,
|
|
3327
3419
|
children: a
|
|
3328
3420
|
})
|
|
3329
3421
|
})
|
|
3330
3422
|
});
|
|
3331
|
-
},
|
|
3423
|
+
}, ha = (e) => {
|
|
3332
3424
|
let { modules: t, ...n } = e, i = N((e) => e.filter((e) => e.isIndex)[0], [t]), a = N((e) => e.filter((e) => !e.isBottom), [t]), s = N((e) => e.filter((e) => e.isBottom).sort((e, t) => e.label.localeCompare(t.label)), [t]);
|
|
3333
3425
|
return i(t), /* @__PURE__ */ B(r, {
|
|
3334
|
-
className:
|
|
3426
|
+
className: pa.root,
|
|
3335
3427
|
component: "nav",
|
|
3336
3428
|
...n,
|
|
3337
3429
|
children: /* @__PURE__ */ V(r, {
|
|
3338
|
-
className:
|
|
3430
|
+
className: pa.navbar,
|
|
3339
3431
|
children: [
|
|
3340
3432
|
/* @__PURE__ */ B(o, { children: /* @__PURE__ */ B(p, {
|
|
3341
|
-
className:
|
|
3433
|
+
className: pa.logo,
|
|
3342
3434
|
children: /* @__PURE__ */ B(Pn, {})
|
|
3343
3435
|
}) }),
|
|
3344
3436
|
/* @__PURE__ */ B(p, {
|
|
@@ -3348,7 +3440,7 @@ var ca = (e) => {
|
|
|
3348
3440
|
children: /* @__PURE__ */ B(w, {
|
|
3349
3441
|
justify: "center",
|
|
3350
3442
|
gap: "sm",
|
|
3351
|
-
children: a(t).map((e) => /* @__PURE__ */ B(
|
|
3443
|
+
children: a(t).map((e) => /* @__PURE__ */ B(ma, {
|
|
3352
3444
|
to: e.to ?? "",
|
|
3353
3445
|
color: e.color,
|
|
3354
3446
|
label: e.label,
|
|
@@ -3359,12 +3451,12 @@ var ca = (e) => {
|
|
|
3359
3451
|
/* @__PURE__ */ B(p, {
|
|
3360
3452
|
grow: !0,
|
|
3361
3453
|
component: "section",
|
|
3362
|
-
className:
|
|
3454
|
+
className: pa.bottomMenu,
|
|
3363
3455
|
children: /* @__PURE__ */ B(w, {
|
|
3364
3456
|
justify: "flex-end",
|
|
3365
3457
|
align: "stretch",
|
|
3366
3458
|
gap: "sm",
|
|
3367
|
-
children: s(t).map((e) => /* @__PURE__ */ B(
|
|
3459
|
+
children: s(t).map((e) => /* @__PURE__ */ B(ma, {
|
|
3368
3460
|
to: e.to ?? "",
|
|
3369
3461
|
color: e.color,
|
|
3370
3462
|
label: e.label,
|
|
@@ -3375,13 +3467,13 @@ var ca = (e) => {
|
|
|
3375
3467
|
]
|
|
3376
3468
|
})
|
|
3377
3469
|
});
|
|
3378
|
-
},
|
|
3470
|
+
}, ga = {
|
|
3379
3471
|
bottombar: "_bottombar_hipgq_1",
|
|
3380
3472
|
list: "_list_hipgq_23",
|
|
3381
3473
|
link: "_link_hipgq_57"
|
|
3382
|
-
},
|
|
3474
|
+
}, _a = (e) => {
|
|
3383
3475
|
let { icon: t, label: n, onClick: r, color: i, to: a } = e, [o, s] = L(!1);
|
|
3384
|
-
return /* @__PURE__ */ B(
|
|
3476
|
+
return /* @__PURE__ */ B(Ln, {
|
|
3385
3477
|
to: a,
|
|
3386
3478
|
handleIsActive: (e) => {
|
|
3387
3479
|
s(e);
|
|
@@ -3394,27 +3486,27 @@ var ca = (e) => {
|
|
|
3394
3486
|
children: /* @__PURE__ */ B(le, {
|
|
3395
3487
|
onClick: r,
|
|
3396
3488
|
mod: [{ active: o }],
|
|
3397
|
-
className:
|
|
3489
|
+
className: ga.link,
|
|
3398
3490
|
children: /* @__PURE__ */ B(t, { stroke: 1.5 })
|
|
3399
3491
|
})
|
|
3400
3492
|
})
|
|
3401
3493
|
});
|
|
3402
|
-
},
|
|
3403
|
-
|
|
3404
|
-
var
|
|
3494
|
+
}, va = document.createElement("div"), ya = "#hm-overlay-bottom";
|
|
3495
|
+
va.id = ya;
|
|
3496
|
+
var ba = (e) => {
|
|
3405
3497
|
let { modules: t, visible: n } = e;
|
|
3406
|
-
P(() => (n && document.body.appendChild(
|
|
3498
|
+
P(() => (n && document.body.appendChild(va), () => document.getElementById(ya)?.remove()), [n]);
|
|
3407
3499
|
let i = N((e) => e.filter((e) => !e.isBottom), [t]), a = N((e) => e.filter((e) => e.isBottom).sort((e, t) => e.label.localeCompare(t.label)), [t]);
|
|
3408
3500
|
return /* @__PURE__ */ B(S, {
|
|
3409
|
-
target:
|
|
3501
|
+
target: va,
|
|
3410
3502
|
children: /* @__PURE__ */ B(r, {
|
|
3411
3503
|
component: "nav",
|
|
3412
|
-
className:
|
|
3504
|
+
className: ga.bottombar,
|
|
3413
3505
|
children: /* @__PURE__ */ B(p, {
|
|
3414
3506
|
grow: !0,
|
|
3415
3507
|
component: "section",
|
|
3416
|
-
className:
|
|
3417
|
-
children: [...i(t), ...a(t)].map((e) => /* @__PURE__ */ B(
|
|
3508
|
+
className: ga.list,
|
|
3509
|
+
children: [...i(t), ...a(t)].map((e) => /* @__PURE__ */ B(_a, {
|
|
3418
3510
|
to: e.to ?? "",
|
|
3419
3511
|
color: e.color,
|
|
3420
3512
|
label: e.label,
|
|
@@ -3423,32 +3515,32 @@ var va = (e) => {
|
|
|
3423
3515
|
})
|
|
3424
3516
|
})
|
|
3425
3517
|
});
|
|
3426
|
-
},
|
|
3518
|
+
}, xa = {
|
|
3427
3519
|
header: "_header_5aqfa_2",
|
|
3428
3520
|
featureBar: "_featureBar_5aqfa_24",
|
|
3429
3521
|
title: "_title_5aqfa_44",
|
|
3430
3522
|
searchBar: "_searchBar_5aqfa_52"
|
|
3431
|
-
},
|
|
3432
|
-
|
|
3433
|
-
var
|
|
3523
|
+
}, Sa = document.createElement("div"), Ca = "#hm-overlay-header";
|
|
3524
|
+
Sa.id = Ca;
|
|
3525
|
+
var wa = (e) => {
|
|
3434
3526
|
let { moduleName: t, imageSrc: i, offset: a = 0 } = e;
|
|
3435
|
-
return P(() => (document.body.appendChild(
|
|
3436
|
-
target:
|
|
3527
|
+
return P(() => (document.body.appendChild(Sa), () => document.getElementById(Ca)?.remove()), []), /* @__PURE__ */ B(S, {
|
|
3528
|
+
target: Sa,
|
|
3437
3529
|
children: /* @__PURE__ */ V(r, {
|
|
3438
3530
|
component: "header",
|
|
3439
|
-
className:
|
|
3531
|
+
className: xa.header,
|
|
3440
3532
|
children: [/* @__PURE__ */ B(se, {
|
|
3441
3533
|
size: "h1",
|
|
3442
|
-
className:
|
|
3534
|
+
className: xa.title,
|
|
3443
3535
|
children: t
|
|
3444
3536
|
}), /* @__PURE__ */ V(r, {
|
|
3445
|
-
className:
|
|
3537
|
+
className: xa.featureBar,
|
|
3446
3538
|
children: [
|
|
3447
|
-
/* @__PURE__ */ B(
|
|
3448
|
-
className:
|
|
3539
|
+
/* @__PURE__ */ B(Rn, {
|
|
3540
|
+
className: xa.searchBar,
|
|
3449
3541
|
onClick: () => ot.open()
|
|
3450
3542
|
}),
|
|
3451
|
-
/* @__PURE__ */ B(
|
|
3543
|
+
/* @__PURE__ */ B(zn, {}),
|
|
3452
3544
|
/* @__PURE__ */ B(n, {
|
|
3453
3545
|
radius: "xl",
|
|
3454
3546
|
mx: "xs",
|
|
@@ -3459,10 +3551,10 @@ var Sa = (e) => {
|
|
|
3459
3551
|
})]
|
|
3460
3552
|
})
|
|
3461
3553
|
});
|
|
3462
|
-
},
|
|
3554
|
+
}, Ta = {
|
|
3463
3555
|
mainParent: "_mainParent_tqzon_1",
|
|
3464
3556
|
main: "_main_tqzon_1"
|
|
3465
|
-
},
|
|
3557
|
+
}, Ea = (e) => {
|
|
3466
3558
|
let { modules: t, imageSrc: n, offset: i, withHeader: a = !0, headerMatches: o, ...s } = e, c = Qe(), [l, u] = L(""), d = rt(`(min-width: ${A().breakpoints.sm})`);
|
|
3467
3559
|
return P(() => {
|
|
3468
3560
|
let e = o?.find(({ matchPath: e }) => c.pathname.startsWith(e));
|
|
@@ -3478,14 +3570,14 @@ var Sa = (e) => {
|
|
|
3478
3570
|
]), /* @__PURE__ */ B(r, {
|
|
3479
3571
|
...s,
|
|
3480
3572
|
children: /* @__PURE__ */ V(f, { children: [
|
|
3481
|
-
a && /* @__PURE__ */ B(f.Col, { children: /* @__PURE__ */ B(
|
|
3573
|
+
a && /* @__PURE__ */ B(f.Col, { children: /* @__PURE__ */ B(wa, {
|
|
3482
3574
|
moduleName: l,
|
|
3483
3575
|
imageSrc: n,
|
|
3484
3576
|
offset: d ? 80 : void 0
|
|
3485
3577
|
}) }),
|
|
3486
3578
|
/* @__PURE__ */ B(f.Col, {
|
|
3487
3579
|
span: "content",
|
|
3488
|
-
children: d ? /* @__PURE__ */ B(
|
|
3580
|
+
children: d ? /* @__PURE__ */ B(ha, { modules: t }) : /* @__PURE__ */ B(ba, {
|
|
3489
3581
|
modules: t,
|
|
3490
3582
|
visible: !0
|
|
3491
3583
|
})
|
|
@@ -3493,19 +3585,19 @@ var Sa = (e) => {
|
|
|
3493
3585
|
/* @__PURE__ */ B(f.Col, {
|
|
3494
3586
|
span: "auto",
|
|
3495
3587
|
mod: { header: !a },
|
|
3496
|
-
className:
|
|
3588
|
+
className: Ta.mainParent,
|
|
3497
3589
|
children: /* @__PURE__ */ B(r, {
|
|
3498
3590
|
component: "main",
|
|
3499
|
-
className:
|
|
3591
|
+
className: Ta.main,
|
|
3500
3592
|
children: /* @__PURE__ */ B(Ze, {})
|
|
3501
3593
|
})
|
|
3502
3594
|
})
|
|
3503
3595
|
] })
|
|
3504
3596
|
});
|
|
3505
|
-
},
|
|
3597
|
+
}, Da = pe({}), Oa = ({ theme: e, children: t }) => /* @__PURE__ */ B(Da.Provider, {
|
|
3506
3598
|
value: e,
|
|
3507
3599
|
children: t
|
|
3508
|
-
}),
|
|
3600
|
+
}), ka = ue({
|
|
3509
3601
|
fontFamily: "Roboto, sans-serif",
|
|
3510
3602
|
colors: {
|
|
3511
3603
|
primary: [
|
|
@@ -3671,7 +3763,7 @@ var Sa = (e) => {
|
|
|
3671
3763
|
defaultProps: { variant: "pills" }
|
|
3672
3764
|
})
|
|
3673
3765
|
}
|
|
3674
|
-
}),
|
|
3766
|
+
}), Aa = (e) => ({
|
|
3675
3767
|
variables: {
|
|
3676
3768
|
"--mantine-header-offset": e.other.headerOffset,
|
|
3677
3769
|
"--mantine-sidebar-border-radius": e.other.sideBarBorderRadius,
|
|
@@ -3682,28 +3774,28 @@ var Sa = (e) => {
|
|
|
3682
3774
|
},
|
|
3683
3775
|
light: {},
|
|
3684
3776
|
dark: {}
|
|
3685
|
-
}),
|
|
3777
|
+
}), ja = {
|
|
3686
3778
|
root: "_root_zk991_1",
|
|
3687
3779
|
input: "_input_zk991_29"
|
|
3688
|
-
},
|
|
3780
|
+
}, Ma = pe({}), Na = (e) => {
|
|
3689
3781
|
let { children: t, deps: n } = e;
|
|
3690
|
-
return /* @__PURE__ */ B(
|
|
3782
|
+
return /* @__PURE__ */ B(Ma.Provider, {
|
|
3691
3783
|
value: { deps: n },
|
|
3692
3784
|
children: t
|
|
3693
3785
|
});
|
|
3694
|
-
},
|
|
3786
|
+
}, Pa = pe({}), Fa = (e) => {
|
|
3695
3787
|
let { children: t, nodeTypes: n } = e;
|
|
3696
|
-
return /* @__PURE__ */ B(
|
|
3788
|
+
return /* @__PURE__ */ B(Pa.Provider, {
|
|
3697
3789
|
value: { nodeTypes: n },
|
|
3698
3790
|
children: t
|
|
3699
3791
|
});
|
|
3700
|
-
},
|
|
3792
|
+
}, Ia = (e) => {
|
|
3701
3793
|
let { children: t } = e;
|
|
3702
|
-
return /* @__PURE__ */ B(ht, { children: /* @__PURE__ */ B(
|
|
3794
|
+
return /* @__PURE__ */ B(ht, { children: /* @__PURE__ */ B(Fa, {
|
|
3703
3795
|
...e,
|
|
3704
3796
|
children: t
|
|
3705
3797
|
}) });
|
|
3706
|
-
},
|
|
3798
|
+
}, La = (e) => {
|
|
3707
3799
|
let { reactFlowWrapper: t, setDrawerOpened: n, setCurrentTab: r } = e, { screenToFlowPosition: i, toObject: a, setViewport: o } = bt(), [s, c] = L(null);
|
|
3708
3800
|
return {
|
|
3709
3801
|
clickedPosition: s,
|
|
@@ -3717,34 +3809,34 @@ var Sa = (e) => {
|
|
|
3717
3809
|
};
|
|
3718
3810
|
}, Z = [];
|
|
3719
3811
|
for (let e = 0; e < 256; ++e) Z.push((e + 256).toString(16).slice(1));
|
|
3720
|
-
function
|
|
3812
|
+
function Ra(e, t = 0) {
|
|
3721
3813
|
return (Z[e[t + 0]] + Z[e[t + 1]] + Z[e[t + 2]] + Z[e[t + 3]] + "-" + Z[e[t + 4]] + Z[e[t + 5]] + "-" + Z[e[t + 6]] + Z[e[t + 7]] + "-" + Z[e[t + 8]] + Z[e[t + 9]] + "-" + Z[e[t + 10]] + Z[e[t + 11]] + Z[e[t + 12]] + Z[e[t + 13]] + Z[e[t + 14]] + Z[e[t + 15]]).toLowerCase();
|
|
3722
3814
|
}
|
|
3723
3815
|
//#endregion
|
|
3724
3816
|
//#region node_modules/uuid/dist/rng.js
|
|
3725
|
-
var
|
|
3726
|
-
function
|
|
3727
|
-
return crypto.getRandomValues(
|
|
3817
|
+
var za = /* @__PURE__ */ new Uint8Array(16);
|
|
3818
|
+
function Ba() {
|
|
3819
|
+
return crypto.getRandomValues(za);
|
|
3728
3820
|
}
|
|
3729
3821
|
//#endregion
|
|
3730
3822
|
//#region node_modules/uuid/dist/v4.js
|
|
3731
|
-
function
|
|
3732
|
-
return !t && !e && crypto.randomUUID ? crypto.randomUUID() :
|
|
3823
|
+
function Va(e, t, n) {
|
|
3824
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : Ha(e, t, n);
|
|
3733
3825
|
}
|
|
3734
|
-
function
|
|
3826
|
+
function Ha(e, t, n) {
|
|
3735
3827
|
e ||= {};
|
|
3736
|
-
let r = e.random ?? e.rng?.() ??
|
|
3828
|
+
let r = e.random ?? e.rng?.() ?? Ba();
|
|
3737
3829
|
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
3738
3830
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
3739
3831
|
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
3740
3832
|
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
3741
3833
|
return t;
|
|
3742
3834
|
}
|
|
3743
|
-
return
|
|
3835
|
+
return Ra(r);
|
|
3744
3836
|
}
|
|
3745
3837
|
//#endregion
|
|
3746
3838
|
//#region src/hm-flow/utils.ts
|
|
3747
|
-
var
|
|
3839
|
+
var Ua = (e, t, n, r) => {
|
|
3748
3840
|
let i = r[t] || 0, a = `${e}-${i}`, o = i;
|
|
3749
3841
|
for (; n.some((e) => e.data.label === a);) o++, a = `${e}-${o}`;
|
|
3750
3842
|
let s = {
|
|
@@ -3755,11 +3847,11 @@ var Va = (e, t, n, r) => {
|
|
|
3755
3847
|
name: a,
|
|
3756
3848
|
updatedCounters: s
|
|
3757
3849
|
};
|
|
3758
|
-
},
|
|
3850
|
+
}, Wa = (e) => {
|
|
3759
3851
|
let { defaultActions: t } = e, n = N((e) => {
|
|
3760
3852
|
let { node: t, deps: n } = e, { nodes: r, stateJoinsNode: i, nodeCounters: a, clickedPosition: o, setDrawerOpened: s, currentNode: c, setEdges: l, setNodeCounters: u, setNodes: d, setStateJoinsNode: f } = n;
|
|
3761
3853
|
if (!t) return;
|
|
3762
|
-
let { name: p, updatedCounters: m } =
|
|
3854
|
+
let { name: p, updatedCounters: m } = Ua(t.data.label, t.id, r, a);
|
|
3763
3855
|
if (c && i) {
|
|
3764
3856
|
if (!c || !c.position) {
|
|
3765
3857
|
console.error("Source node is invalid or missing position.");
|
|
@@ -3769,7 +3861,7 @@ var Va = (e, t, n, r) => {
|
|
|
3769
3861
|
x: c.position.x + 150,
|
|
3770
3862
|
y: c.position.y
|
|
3771
3863
|
}, n = {
|
|
3772
|
-
id:
|
|
3864
|
+
id: Va(),
|
|
3773
3865
|
type: t.type,
|
|
3774
3866
|
position: e,
|
|
3775
3867
|
data: {
|
|
@@ -3782,13 +3874,13 @@ var Va = (e, t, n, r) => {
|
|
|
3782
3874
|
}
|
|
3783
3875
|
};
|
|
3784
3876
|
d((e) => [...e, n]), u(m), l((e) => [...e, {
|
|
3785
|
-
id:
|
|
3877
|
+
id: Va(),
|
|
3786
3878
|
source: c.id,
|
|
3787
3879
|
target: n.id
|
|
3788
3880
|
}]), s(!1), f(!1);
|
|
3789
3881
|
} else if (o) {
|
|
3790
3882
|
let e = {
|
|
3791
|
-
id:
|
|
3883
|
+
id: Va(),
|
|
3792
3884
|
type: t.type,
|
|
3793
3885
|
position: {
|
|
3794
3886
|
x: o.x,
|
|
@@ -3813,10 +3905,10 @@ var Va = (e, t, n, r) => {
|
|
|
3813
3905
|
o((e) => {
|
|
3814
3906
|
let t = e.find((e) => e.id === r);
|
|
3815
3907
|
if (!t) return e;
|
|
3816
|
-
let n = t.data.label, o = t.data.name, { name: s, updatedCounters: c } =
|
|
3908
|
+
let n = t.data.label, o = t.data.name, { name: s, updatedCounters: c } = Ua(n, o, e, i), l = {
|
|
3817
3909
|
x: t.position.x + 70,
|
|
3818
3910
|
y: t.position.y + 70
|
|
3819
|
-
}, u =
|
|
3911
|
+
}, u = Va(), d = {
|
|
3820
3912
|
...t,
|
|
3821
3913
|
id: u,
|
|
3822
3914
|
position: l,
|
|
@@ -3896,7 +3988,7 @@ var Va = (e, t, n, r) => {
|
|
|
3896
3988
|
onUpdateNode: c,
|
|
3897
3989
|
searchNode: l
|
|
3898
3990
|
};
|
|
3899
|
-
},
|
|
3991
|
+
}, Ga = (e) => {
|
|
3900
3992
|
let { onHmflowSave: t, onHmflowRun: n, onHmflowDelete: r, headerActions: i, bottomActions: a, defaultHmFlowMetadata: o = {
|
|
3901
3993
|
name: "default",
|
|
3902
3994
|
description: "",
|
|
@@ -3967,25 +4059,25 @@ var Va = (e, t, n, r) => {
|
|
|
3967
4059
|
};
|
|
3968
4060
|
}) : []
|
|
3969
4061
|
};
|
|
3970
|
-
},
|
|
4062
|
+
}, Ka = Object.defineProperty, qa = (e, t, n) => t in e ? Ka(e, t, {
|
|
3971
4063
|
enumerable: !0,
|
|
3972
4064
|
configurable: !0,
|
|
3973
4065
|
writable: !0,
|
|
3974
4066
|
value: n
|
|
3975
|
-
}) : e[t] = n,
|
|
3976
|
-
for (var n in t)
|
|
4067
|
+
}) : e[t] = n, Ja = (e, t) => {
|
|
4068
|
+
for (var n in t) Ka(e, n, {
|
|
3977
4069
|
get: t[n],
|
|
3978
4070
|
enumerable: !0
|
|
3979
4071
|
});
|
|
3980
|
-
},
|
|
3981
|
-
|
|
4072
|
+
}, Ya = (e, t, n) => qa(e, typeof t == "symbol" ? t : t + "", n), Xa = {};
|
|
4073
|
+
Ja(Xa, {
|
|
3982
4074
|
Graph: () => Q,
|
|
3983
|
-
alg: () =>
|
|
3984
|
-
json: () =>
|
|
3985
|
-
version: () =>
|
|
4075
|
+
alg: () => uo,
|
|
4076
|
+
json: () => ao,
|
|
4077
|
+
version: () => io
|
|
3986
4078
|
});
|
|
3987
|
-
var
|
|
3988
|
-
for (var n in t)
|
|
4079
|
+
var Za = Object.defineProperty, Qa = (e, t) => {
|
|
4080
|
+
for (var n in t) Za(e, n, {
|
|
3989
4081
|
get: t[n],
|
|
3990
4082
|
enumerable: !0
|
|
3991
4083
|
});
|
|
@@ -4124,15 +4216,15 @@ var Ya = Object.defineProperty, Xa = (e, t) => {
|
|
|
4124
4216
|
setEdge(e, t, n, r) {
|
|
4125
4217
|
let i, a, o, s, c = !1;
|
|
4126
4218
|
typeof e == "object" && e && "v" in e ? (i = e.v, a = e.w, o = e.name, arguments.length === 2 && (s = t, c = !0)) : (i = e, a = t, o = r, arguments.length > 2 && (s = n, c = !0)), i = "" + i, a = "" + a, o !== void 0 && (o = "" + o);
|
|
4127
|
-
let l =
|
|
4219
|
+
let l = to(this._isDirected, i, a, o);
|
|
4128
4220
|
if (l in this._edgeLabels) return c && (this._edgeLabels[l] = s), this;
|
|
4129
4221
|
if (o !== void 0 && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
|
|
4130
4222
|
this.setNode(i), this.setNode(a), this._edgeLabels[l] = c ? s : this._defaultEdgeLabelFn(i, a, o);
|
|
4131
|
-
let u =
|
|
4132
|
-
return i = u.v, a = u.w, Object.freeze(u), this._edgeObjs[l] = u,
|
|
4223
|
+
let u = no(this._isDirected, i, a, o);
|
|
4224
|
+
return i = u.v, a = u.w, Object.freeze(u), this._edgeObjs[l] = u, $a(this._preds[a], i), $a(this._sucs[i], a), this._in[a][l] = u, this._out[i][l] = u, this._edgeCount++, this;
|
|
4133
4225
|
}
|
|
4134
4226
|
edge(e, t, n) {
|
|
4135
|
-
let r = arguments.length === 1 ?
|
|
4227
|
+
let r = arguments.length === 1 ? ro(this._isDirected, e) : to(this._isDirected, e, t, n);
|
|
4136
4228
|
return this._edgeLabels[r];
|
|
4137
4229
|
}
|
|
4138
4230
|
edgeAsObj(e, t, n) {
|
|
@@ -4140,13 +4232,13 @@ var Ya = Object.defineProperty, Xa = (e, t) => {
|
|
|
4140
4232
|
return typeof r == "object" ? r : { label: r };
|
|
4141
4233
|
}
|
|
4142
4234
|
hasEdge(e, t, n) {
|
|
4143
|
-
return (arguments.length === 1 ?
|
|
4235
|
+
return (arguments.length === 1 ? ro(this._isDirected, e) : to(this._isDirected, e, t, n)) in this._edgeLabels;
|
|
4144
4236
|
}
|
|
4145
4237
|
removeEdge(e, t, n) {
|
|
4146
|
-
let r = arguments.length === 1 ?
|
|
4238
|
+
let r = arguments.length === 1 ? ro(this._isDirected, e) : to(this._isDirected, e, t, n), i = this._edgeObjs[r];
|
|
4147
4239
|
if (i) {
|
|
4148
4240
|
let e = i.v, t = i.w;
|
|
4149
|
-
delete this._edgeLabels[r], delete this._edgeObjs[r],
|
|
4241
|
+
delete this._edgeLabels[r], delete this._edgeObjs[r], eo(this._preds[t], e), eo(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--;
|
|
4150
4242
|
}
|
|
4151
4243
|
return this;
|
|
4152
4244
|
}
|
|
@@ -4171,13 +4263,13 @@ var Ya = Object.defineProperty, Xa = (e, t) => {
|
|
|
4171
4263
|
return n ? r.filter((e) => e.v === t && e.w === n || e.v === n && e.w === t) : r;
|
|
4172
4264
|
}
|
|
4173
4265
|
};
|
|
4174
|
-
function
|
|
4266
|
+
function $a(e, t) {
|
|
4175
4267
|
e[t] ? e[t]++ : e[t] = 1;
|
|
4176
4268
|
}
|
|
4177
|
-
function
|
|
4269
|
+
function eo(e, t) {
|
|
4178
4270
|
e[t] !== void 0 && !--e[t] && delete e[t];
|
|
4179
4271
|
}
|
|
4180
|
-
function
|
|
4272
|
+
function to(e, t, n, r) {
|
|
4181
4273
|
let i = "" + t, a = "" + n;
|
|
4182
4274
|
if (!e && i > a) {
|
|
4183
4275
|
let e = i;
|
|
@@ -4185,7 +4277,7 @@ function $a(e, t, n, r) {
|
|
|
4185
4277
|
}
|
|
4186
4278
|
return i + "" + a + "" + (r === void 0 ? "\0" : r);
|
|
4187
4279
|
}
|
|
4188
|
-
function
|
|
4280
|
+
function no(e, t, n, r) {
|
|
4189
4281
|
let i = "" + t, a = "" + n;
|
|
4190
4282
|
if (!e && i > a) {
|
|
4191
4283
|
let e = i;
|
|
@@ -4197,33 +4289,33 @@ function eo(e, t, n, r) {
|
|
|
4197
4289
|
};
|
|
4198
4290
|
return r && (o.name = r), o;
|
|
4199
4291
|
}
|
|
4200
|
-
function
|
|
4201
|
-
return
|
|
4292
|
+
function ro(e, t) {
|
|
4293
|
+
return to(e, t.v, t.w, t.name);
|
|
4202
4294
|
}
|
|
4203
|
-
var
|
|
4204
|
-
|
|
4205
|
-
read: () =>
|
|
4206
|
-
write: () =>
|
|
4295
|
+
var io = "4.0.1", ao = {};
|
|
4296
|
+
Qa(ao, {
|
|
4297
|
+
read: () => lo,
|
|
4298
|
+
write: () => oo
|
|
4207
4299
|
});
|
|
4208
|
-
function
|
|
4300
|
+
function oo(e) {
|
|
4209
4301
|
let t = {
|
|
4210
4302
|
options: {
|
|
4211
4303
|
directed: e.isDirected(),
|
|
4212
4304
|
multigraph: e.isMultigraph(),
|
|
4213
4305
|
compound: e.isCompound()
|
|
4214
4306
|
},
|
|
4215
|
-
nodes:
|
|
4216
|
-
edges:
|
|
4307
|
+
nodes: so(e),
|
|
4308
|
+
edges: co(e)
|
|
4217
4309
|
}, n = e.graph();
|
|
4218
4310
|
return n !== void 0 && (t.value = structuredClone(n)), t;
|
|
4219
4311
|
}
|
|
4220
|
-
function
|
|
4312
|
+
function so(e) {
|
|
4221
4313
|
return e.nodes().map((t) => {
|
|
4222
4314
|
let n = e.node(t), r = e.parent(t), i = { v: t };
|
|
4223
4315
|
return n !== void 0 && (i.value = n), r !== void 0 && (i.parent = r), i;
|
|
4224
4316
|
});
|
|
4225
4317
|
}
|
|
4226
|
-
function
|
|
4318
|
+
function co(e) {
|
|
4227
4319
|
return e.edges().map((t) => {
|
|
4228
4320
|
let n = e.edge(t), r = {
|
|
4229
4321
|
v: t.v,
|
|
@@ -4232,7 +4324,7 @@ function oo(e) {
|
|
|
4232
4324
|
return t.name !== void 0 && (r.name = t.name), n !== void 0 && (r.value = n), r;
|
|
4233
4325
|
});
|
|
4234
4326
|
}
|
|
4235
|
-
function
|
|
4327
|
+
function lo(e) {
|
|
4236
4328
|
let t = new Q(e.options);
|
|
4237
4329
|
return e.value !== void 0 && t.setGraph(e.value), e.nodes.forEach((e) => {
|
|
4238
4330
|
t.setNode(e.v, e.value), e.parent && t.setParent(e.v, e.parent);
|
|
@@ -4244,30 +4336,30 @@ function so(e) {
|
|
|
4244
4336
|
}, e.value);
|
|
4245
4337
|
}), t;
|
|
4246
4338
|
}
|
|
4247
|
-
var
|
|
4248
|
-
|
|
4249
|
-
CycleException: () =>
|
|
4250
|
-
bellmanFord: () =>
|
|
4251
|
-
components: () =>
|
|
4252
|
-
dijkstra: () =>
|
|
4253
|
-
dijkstraAll: () =>
|
|
4254
|
-
findCycles: () =>
|
|
4255
|
-
floydWarshall: () =>
|
|
4256
|
-
isAcyclic: () =>
|
|
4257
|
-
postorder: () =>
|
|
4258
|
-
preorder: () =>
|
|
4259
|
-
prim: () =>
|
|
4260
|
-
shortestPaths: () =>
|
|
4261
|
-
tarjan: () =>
|
|
4262
|
-
topsort: () =>
|
|
4339
|
+
var uo = {};
|
|
4340
|
+
Qa(uo, {
|
|
4341
|
+
CycleException: () => Eo,
|
|
4342
|
+
bellmanFord: () => po,
|
|
4343
|
+
components: () => ho,
|
|
4344
|
+
dijkstra: () => vo,
|
|
4345
|
+
dijkstraAll: () => bo,
|
|
4346
|
+
findCycles: () => So,
|
|
4347
|
+
floydWarshall: () => wo,
|
|
4348
|
+
isAcyclic: () => Oo,
|
|
4349
|
+
postorder: () => Mo,
|
|
4350
|
+
preorder: () => No,
|
|
4351
|
+
prim: () => Po,
|
|
4352
|
+
shortestPaths: () => Fo,
|
|
4353
|
+
tarjan: () => xo,
|
|
4354
|
+
topsort: () => Do
|
|
4263
4355
|
});
|
|
4264
|
-
var
|
|
4265
|
-
function
|
|
4266
|
-
return
|
|
4356
|
+
var fo = () => 1;
|
|
4357
|
+
function po(e, t, n, r) {
|
|
4358
|
+
return mo(e, String(t), n || fo, r || function(t) {
|
|
4267
4359
|
return e.outEdges(t);
|
|
4268
4360
|
});
|
|
4269
4361
|
}
|
|
4270
|
-
function
|
|
4362
|
+
function mo(e, t, n, r) {
|
|
4271
4363
|
let i = {}, a, o = 0, s = e.nodes(), c = function(e) {
|
|
4272
4364
|
let t = n(e);
|
|
4273
4365
|
i[e.v].distance + t < i[e.w].distance && (i[e.w] = {
|
|
@@ -4296,7 +4388,7 @@ function fo(e, t, n, r) {
|
|
|
4296
4388
|
if (o === u - 1 && (a = !1, l(), a)) throw Error("The graph contains a negative weight cycle");
|
|
4297
4389
|
return i;
|
|
4298
4390
|
}
|
|
4299
|
-
function
|
|
4391
|
+
function ho(e) {
|
|
4300
4392
|
let t = {}, n = [], r;
|
|
4301
4393
|
function i(n) {
|
|
4302
4394
|
n in t || (t[n] = !0, r.push(n), e.successors(n).forEach(i), e.predecessors(n).forEach(i));
|
|
@@ -4305,7 +4397,7 @@ function po(e) {
|
|
|
4305
4397
|
r = [], i(e), r.length && n.push(r);
|
|
4306
4398
|
}), n;
|
|
4307
4399
|
}
|
|
4308
|
-
var
|
|
4400
|
+
var go = class {
|
|
4309
4401
|
constructor() {
|
|
4310
4402
|
this._arr = [], this._keyIndices = {};
|
|
4311
4403
|
}
|
|
@@ -4361,14 +4453,14 @@ var mo = class {
|
|
|
4361
4453
|
let n = this._arr, r = this._keyIndices, i = n[e], a = n[t];
|
|
4362
4454
|
n[e] = a, n[t] = i, r[a.key] = e, r[i.key] = t;
|
|
4363
4455
|
}
|
|
4364
|
-
},
|
|
4365
|
-
function
|
|
4366
|
-
return
|
|
4456
|
+
}, _o = () => 1;
|
|
4457
|
+
function vo(e, t, n, r) {
|
|
4458
|
+
return yo(e, String(t), n || _o, r || function(t) {
|
|
4367
4459
|
return e.outEdges(t);
|
|
4368
4460
|
});
|
|
4369
4461
|
}
|
|
4370
|
-
function
|
|
4371
|
-
let i = {}, a = new
|
|
4462
|
+
function yo(e, t, n, r) {
|
|
4463
|
+
let i = {}, a = new go(), o, s, c = function(e) {
|
|
4372
4464
|
let t = e.v === o ? e.w : e.v, r = i[t], c = n(e), l = s.distance + c;
|
|
4373
4465
|
if (c < 0) throw Error("dijkstra does not allow negative edge weights. Bad edge: " + e + " Weight: " + c);
|
|
4374
4466
|
l < r.distance && (r.distance = l, r.predecessor = o, a.decrease(t, l));
|
|
@@ -4382,12 +4474,12 @@ function _o(e, t, n, r) {
|
|
|
4382
4474
|
}); a.size() > 0 && (o = a.removeMin(), s = i[o], s.distance !== Infinity);) r(o).forEach(c);
|
|
4383
4475
|
return i;
|
|
4384
4476
|
}
|
|
4385
|
-
function
|
|
4477
|
+
function bo(e, t, n) {
|
|
4386
4478
|
return e.nodes().reduce(function(r, i) {
|
|
4387
|
-
return r[i] =
|
|
4479
|
+
return r[i] = vo(e, i, t, n), r;
|
|
4388
4480
|
}, {});
|
|
4389
4481
|
}
|
|
4390
|
-
function
|
|
4482
|
+
function xo(e) {
|
|
4391
4483
|
let t = 0, n = [], r = {}, i = [];
|
|
4392
4484
|
function a(o) {
|
|
4393
4485
|
let s = r[o] = {
|
|
@@ -4409,18 +4501,18 @@ function yo(e) {
|
|
|
4409
4501
|
e in r || a(e);
|
|
4410
4502
|
}), i;
|
|
4411
4503
|
}
|
|
4412
|
-
function
|
|
4413
|
-
return
|
|
4504
|
+
function So(e) {
|
|
4505
|
+
return xo(e).filter(function(t) {
|
|
4414
4506
|
return t.length > 1 || t.length === 1 && e.hasEdge(t[0], t[0]);
|
|
4415
4507
|
});
|
|
4416
4508
|
}
|
|
4417
|
-
var
|
|
4418
|
-
function
|
|
4419
|
-
return
|
|
4509
|
+
var Co = () => 1;
|
|
4510
|
+
function wo(e, t, n) {
|
|
4511
|
+
return To(e, t || Co, n || function(t) {
|
|
4420
4512
|
return e.outEdges(t);
|
|
4421
4513
|
});
|
|
4422
4514
|
}
|
|
4423
|
-
function
|
|
4515
|
+
function To(e, t, n) {
|
|
4424
4516
|
let r = {}, i = e.nodes();
|
|
4425
4517
|
return i.forEach(function(e) {
|
|
4426
4518
|
r[e] = {}, r[e][e] = {
|
|
@@ -4449,55 +4541,55 @@ function Co(e, t, n) {
|
|
|
4449
4541
|
});
|
|
4450
4542
|
}), r;
|
|
4451
4543
|
}
|
|
4452
|
-
var
|
|
4544
|
+
var Eo = class extends Error {
|
|
4453
4545
|
constructor(...e) {
|
|
4454
4546
|
super(...e);
|
|
4455
4547
|
}
|
|
4456
4548
|
};
|
|
4457
|
-
function
|
|
4549
|
+
function Do(e) {
|
|
4458
4550
|
let t = {}, n = {}, r = [];
|
|
4459
4551
|
function i(a) {
|
|
4460
|
-
if (a in n) throw new
|
|
4552
|
+
if (a in n) throw new Eo();
|
|
4461
4553
|
a in t || (n[a] = !0, t[a] = !0, e.predecessors(a).forEach(i), delete n[a], r.push(a));
|
|
4462
4554
|
}
|
|
4463
|
-
if (e.sinks().forEach(i), Object.keys(t).length !== e.nodeCount()) throw new
|
|
4555
|
+
if (e.sinks().forEach(i), Object.keys(t).length !== e.nodeCount()) throw new Eo();
|
|
4464
4556
|
return r;
|
|
4465
4557
|
}
|
|
4466
|
-
function
|
|
4558
|
+
function Oo(e) {
|
|
4467
4559
|
try {
|
|
4468
|
-
|
|
4560
|
+
Do(e);
|
|
4469
4561
|
} catch (e) {
|
|
4470
|
-
if (e instanceof
|
|
4562
|
+
if (e instanceof Eo) return !1;
|
|
4471
4563
|
throw e;
|
|
4472
4564
|
}
|
|
4473
4565
|
return !0;
|
|
4474
4566
|
}
|
|
4475
|
-
function
|
|
4567
|
+
function ko(e, t, n, r, i) {
|
|
4476
4568
|
Array.isArray(t) || (t = [t]);
|
|
4477
4569
|
let a = ((t) => (e.isDirected() ? e.successors(t) : e.neighbors(t)) ?? []), o = {};
|
|
4478
4570
|
return t.forEach(function(t) {
|
|
4479
4571
|
if (!e.hasNode(t)) throw Error("Graph does not have node: " + t);
|
|
4480
|
-
i =
|
|
4572
|
+
i = Ao(e, t, n === "post", o, a, r, i);
|
|
4481
4573
|
}), i;
|
|
4482
4574
|
}
|
|
4483
|
-
function
|
|
4575
|
+
function Ao(e, t, n, r, i, a, o) {
|
|
4484
4576
|
return t in r || (r[t] = !0, n || (o = a(o, t)), i(t).forEach(function(t) {
|
|
4485
|
-
o =
|
|
4577
|
+
o = Ao(e, t, n, r, i, a, o);
|
|
4486
4578
|
}), n && (o = a(o, t))), o;
|
|
4487
4579
|
}
|
|
4488
|
-
function
|
|
4489
|
-
return
|
|
4580
|
+
function jo(e, t, n) {
|
|
4581
|
+
return ko(e, t, n, function(e, t) {
|
|
4490
4582
|
return e.push(t), e;
|
|
4491
4583
|
}, []);
|
|
4492
4584
|
}
|
|
4493
|
-
function
|
|
4494
|
-
return
|
|
4585
|
+
function Mo(e, t) {
|
|
4586
|
+
return jo(e, t, "post");
|
|
4495
4587
|
}
|
|
4496
|
-
function
|
|
4497
|
-
return
|
|
4588
|
+
function No(e, t) {
|
|
4589
|
+
return jo(e, t, "pre");
|
|
4498
4590
|
}
|
|
4499
|
-
function
|
|
4500
|
-
let n = new Q(), r = {}, i = new
|
|
4591
|
+
function Po(e, t) {
|
|
4592
|
+
let n = new Q(), r = {}, i = new go(), a;
|
|
4501
4593
|
function o(e) {
|
|
4502
4594
|
let n = e.v === a ? e.w : e.v, o = i.priority(n);
|
|
4503
4595
|
if (o !== void 0) {
|
|
@@ -4520,11 +4612,11 @@ function Mo(e, t) {
|
|
|
4520
4612
|
}
|
|
4521
4613
|
return n;
|
|
4522
4614
|
}
|
|
4523
|
-
function
|
|
4524
|
-
return
|
|
4615
|
+
function Fo(e, t, n, r) {
|
|
4616
|
+
return Io(e, t, n, r ?? ((t) => e.outEdges(t) ?? []));
|
|
4525
4617
|
}
|
|
4526
|
-
function
|
|
4527
|
-
if (n === void 0) return
|
|
4618
|
+
function Io(e, t, n, r) {
|
|
4619
|
+
if (n === void 0) return vo(e, t, n, r);
|
|
4528
4620
|
let i = !1, a = e.nodes();
|
|
4529
4621
|
for (let o = 0; o < a.length; o++) {
|
|
4530
4622
|
let s = r(a[o]);
|
|
@@ -4535,16 +4627,16 @@ function Po(e, t, n, r) {
|
|
|
4535
4627
|
w: r === t.v ? t.w : t.v
|
|
4536
4628
|
}) < 0 && (i = !0);
|
|
4537
4629
|
}
|
|
4538
|
-
if (i) return
|
|
4630
|
+
if (i) return po(e, t, n, r);
|
|
4539
4631
|
}
|
|
4540
|
-
return
|
|
4632
|
+
return vo(e, t, n, r);
|
|
4541
4633
|
}
|
|
4542
|
-
function
|
|
4634
|
+
function Lo(e, t, n, r) {
|
|
4543
4635
|
let i = r;
|
|
4544
|
-
for (; e.hasNode(i);) i =
|
|
4636
|
+
for (; e.hasNode(i);) i = Qo(r);
|
|
4545
4637
|
return n.dummy = t, e.setNode(i, n), i;
|
|
4546
4638
|
}
|
|
4547
|
-
function
|
|
4639
|
+
function Ro(e) {
|
|
4548
4640
|
let t = new Q().setGraph(e.graph());
|
|
4549
4641
|
return e.nodes().forEach((n) => t.setNode(n, e.node(n))), e.edges().forEach((n) => {
|
|
4550
4642
|
let r = t.edge(n.v, n.w) || {
|
|
@@ -4557,7 +4649,7 @@ function Io(e) {
|
|
|
4557
4649
|
});
|
|
4558
4650
|
}), t;
|
|
4559
4651
|
}
|
|
4560
|
-
function
|
|
4652
|
+
function zo(e) {
|
|
4561
4653
|
let t = new Q({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
4562
4654
|
return e.nodes().forEach((n) => {
|
|
4563
4655
|
e.children(n).length || t.setNode(n, e.node(n));
|
|
@@ -4565,7 +4657,7 @@ function Lo(e) {
|
|
|
4565
4657
|
t.setEdge(n, e.edge(n));
|
|
4566
4658
|
}), t;
|
|
4567
4659
|
}
|
|
4568
|
-
function
|
|
4660
|
+
function Bo(e, t) {
|
|
4569
4661
|
let n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
|
|
4570
4662
|
if (!i && !a) throw Error("Not possible to find intersection inside of the rectangle");
|
|
4571
4663
|
let c, l;
|
|
@@ -4574,14 +4666,14 @@ function Ro(e, t) {
|
|
|
4574
4666
|
y: r + l
|
|
4575
4667
|
};
|
|
4576
4668
|
}
|
|
4577
|
-
function
|
|
4578
|
-
let t =
|
|
4669
|
+
function Vo(e) {
|
|
4670
|
+
let t = $o(qo(e) + 1).map(() => []);
|
|
4579
4671
|
return e.nodes().forEach((n) => {
|
|
4580
4672
|
let r = e.node(n), i = r.rank;
|
|
4581
4673
|
i !== void 0 && (t[i] || (t[i] = []), t[i][r.order] = n);
|
|
4582
4674
|
}), t;
|
|
4583
4675
|
}
|
|
4584
|
-
function
|
|
4676
|
+
function Ho(e) {
|
|
4585
4677
|
let t = e.nodes().map((t) => {
|
|
4586
4678
|
let n = e.node(t).rank;
|
|
4587
4679
|
return n === void 0 ? Number.MAX_VALUE : n;
|
|
@@ -4591,7 +4683,7 @@ function Bo(e) {
|
|
|
4591
4683
|
Object.hasOwn(r, "rank") && (r.rank -= n);
|
|
4592
4684
|
});
|
|
4593
4685
|
}
|
|
4594
|
-
function
|
|
4686
|
+
function Uo(e) {
|
|
4595
4687
|
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n = $(Math.min, t), r = [];
|
|
4596
4688
|
e.nodes().forEach((t) => {
|
|
4597
4689
|
let i = e.node(t).rank - n;
|
|
@@ -4602,14 +4694,14 @@ function Vo(e) {
|
|
|
4602
4694
|
t === void 0 && n % a !== 0 ? --i : t !== void 0 && i && t.forEach((t) => e.node(t).rank += i);
|
|
4603
4695
|
});
|
|
4604
4696
|
}
|
|
4605
|
-
function
|
|
4697
|
+
function Wo(e, t, n, r) {
|
|
4606
4698
|
let i = {
|
|
4607
4699
|
width: 0,
|
|
4608
4700
|
height: 0
|
|
4609
4701
|
};
|
|
4610
|
-
return arguments.length >= 4 && (i.rank = n, i.order = r),
|
|
4702
|
+
return arguments.length >= 4 && (i.rank = n, i.order = r), Lo(e, "border", i, t);
|
|
4611
4703
|
}
|
|
4612
|
-
function
|
|
4704
|
+
function Go(e, t = Ko) {
|
|
4613
4705
|
let n = [];
|
|
4614
4706
|
for (let r = 0; r < e.length; r += t) {
|
|
4615
4707
|
let i = e.slice(r, r + t);
|
|
@@ -4617,18 +4709,18 @@ function Uo(e, t = Wo) {
|
|
|
4617
4709
|
}
|
|
4618
4710
|
return n;
|
|
4619
4711
|
}
|
|
4620
|
-
var
|
|
4712
|
+
var Ko = 65535;
|
|
4621
4713
|
function $(e, t) {
|
|
4622
|
-
return t.length >
|
|
4714
|
+
return t.length > Ko ? e(...Go(t).map((t) => e(...t))) : e(...t);
|
|
4623
4715
|
}
|
|
4624
|
-
function
|
|
4716
|
+
function qo(e) {
|
|
4625
4717
|
let t = e.nodes().map((t) => {
|
|
4626
4718
|
let n = e.node(t).rank;
|
|
4627
4719
|
return n === void 0 ? Number.MIN_VALUE : n;
|
|
4628
4720
|
});
|
|
4629
4721
|
return $(Math.max, t);
|
|
4630
4722
|
}
|
|
4631
|
-
function
|
|
4723
|
+
function Jo(e, t) {
|
|
4632
4724
|
let n = {
|
|
4633
4725
|
lhs: [],
|
|
4634
4726
|
rhs: []
|
|
@@ -4637,7 +4729,7 @@ function Ko(e, t) {
|
|
|
4637
4729
|
t(e) ? n.lhs.push(e) : n.rhs.push(e);
|
|
4638
4730
|
}), n;
|
|
4639
4731
|
}
|
|
4640
|
-
function
|
|
4732
|
+
function Yo(e, t) {
|
|
4641
4733
|
let n = Date.now();
|
|
4642
4734
|
try {
|
|
4643
4735
|
return t();
|
|
@@ -4645,14 +4737,14 @@ function qo(e, t) {
|
|
|
4645
4737
|
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
4646
4738
|
}
|
|
4647
4739
|
}
|
|
4648
|
-
function
|
|
4740
|
+
function Xo(e, t) {
|
|
4649
4741
|
return t();
|
|
4650
4742
|
}
|
|
4651
|
-
var
|
|
4652
|
-
function
|
|
4653
|
-
return e + ("" + ++
|
|
4743
|
+
var Zo = 0;
|
|
4744
|
+
function Qo(e) {
|
|
4745
|
+
return e + ("" + ++Zo);
|
|
4654
4746
|
}
|
|
4655
|
-
function
|
|
4747
|
+
function $o(e, t, n = 1) {
|
|
4656
4748
|
t ?? (t = e, e = 0);
|
|
4657
4749
|
let r = (e) => e < t;
|
|
4658
4750
|
n < 0 && (r = (e) => t < e);
|
|
@@ -4660,78 +4752,78 @@ function Zo(e, t, n = 1) {
|
|
|
4660
4752
|
for (let t = e; r(t); t += n) i.push(t);
|
|
4661
4753
|
return i;
|
|
4662
4754
|
}
|
|
4663
|
-
function
|
|
4755
|
+
function es(e, t) {
|
|
4664
4756
|
let n = {};
|
|
4665
4757
|
for (let r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
4666
4758
|
return n;
|
|
4667
4759
|
}
|
|
4668
|
-
function
|
|
4760
|
+
function ts(e, t) {
|
|
4669
4761
|
let n;
|
|
4670
4762
|
return n = typeof t == "string" ? (e) => e[t] : t, Object.entries(e).reduce((e, [t, r]) => (e[t] = n(r, t), e), {});
|
|
4671
4763
|
}
|
|
4672
|
-
function
|
|
4764
|
+
function ns(e, t) {
|
|
4673
4765
|
return e.reduce((e, n, r) => (e[n] = t[r], e), {});
|
|
4674
4766
|
}
|
|
4675
|
-
var
|
|
4767
|
+
var rs = "\0", is = "3.0.0", as = class {
|
|
4676
4768
|
constructor() {
|
|
4677
|
-
|
|
4769
|
+
Ya(this, "_sentinel");
|
|
4678
4770
|
let e = {};
|
|
4679
4771
|
e._next = e._prev = e, this._sentinel = e;
|
|
4680
4772
|
}
|
|
4681
4773
|
dequeue() {
|
|
4682
4774
|
let e = this._sentinel, t = e._prev;
|
|
4683
|
-
if (t !== e) return
|
|
4775
|
+
if (t !== e) return os(t), t;
|
|
4684
4776
|
}
|
|
4685
4777
|
enqueue(e) {
|
|
4686
4778
|
let t = this._sentinel;
|
|
4687
|
-
e._prev && e._next &&
|
|
4779
|
+
e._prev && e._next && os(e), e._next = t._next, t._next._prev = e, t._next = e, e._prev = t;
|
|
4688
4780
|
}
|
|
4689
4781
|
toString() {
|
|
4690
4782
|
let e = [], t = this._sentinel, n = t._prev;
|
|
4691
|
-
for (; n !== t;) e.push(JSON.stringify(n,
|
|
4783
|
+
for (; n !== t;) e.push(JSON.stringify(n, ss)), n = n._prev;
|
|
4692
4784
|
return "[" + e.join(", ") + "]";
|
|
4693
4785
|
}
|
|
4694
4786
|
};
|
|
4695
|
-
function
|
|
4787
|
+
function os(e) {
|
|
4696
4788
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
4697
4789
|
}
|
|
4698
|
-
function
|
|
4790
|
+
function ss(e, t) {
|
|
4699
4791
|
if (e !== "_next" && e !== "_prev") return t;
|
|
4700
4792
|
}
|
|
4701
|
-
var
|
|
4702
|
-
function
|
|
4793
|
+
var cs = as, ls = () => 1;
|
|
4794
|
+
function us(e, t) {
|
|
4703
4795
|
if (e.nodeCount() <= 1) return [];
|
|
4704
|
-
let n =
|
|
4705
|
-
return
|
|
4796
|
+
let n = ps(e, t || ls);
|
|
4797
|
+
return ds(n.graph, n.buckets, n.zeroIdx).flatMap((t) => e.outEdges(t.v, t.w) || []);
|
|
4706
4798
|
}
|
|
4707
|
-
function
|
|
4799
|
+
function ds(e, t, n) {
|
|
4708
4800
|
let r = [], i = t[t.length - 1], a = t[0], o;
|
|
4709
4801
|
for (; e.nodeCount();) {
|
|
4710
|
-
for (; o = a.dequeue();)
|
|
4711
|
-
for (; o = i.dequeue();)
|
|
4802
|
+
for (; o = a.dequeue();) fs(e, t, n, o);
|
|
4803
|
+
for (; o = i.dequeue();) fs(e, t, n, o);
|
|
4712
4804
|
if (e.nodeCount()) {
|
|
4713
4805
|
for (let i = t.length - 2; i > 0; --i) if (o = t[i]?.dequeue(), o) {
|
|
4714
|
-
r = r.concat(
|
|
4806
|
+
r = r.concat(fs(e, t, n, o, !0) || []);
|
|
4715
4807
|
break;
|
|
4716
4808
|
}
|
|
4717
4809
|
}
|
|
4718
4810
|
}
|
|
4719
4811
|
return r;
|
|
4720
4812
|
}
|
|
4721
|
-
function
|
|
4813
|
+
function fs(e, t, n, r, i) {
|
|
4722
4814
|
let a = [], o = i ? a : void 0;
|
|
4723
4815
|
return (e.inEdges(r.v) || []).forEach((r) => {
|
|
4724
4816
|
let o = e.edge(r), s = e.node(r.v);
|
|
4725
4817
|
i && a.push({
|
|
4726
4818
|
v: r.v,
|
|
4727
4819
|
w: r.w
|
|
4728
|
-
}), s.out -= o,
|
|
4820
|
+
}), s.out -= o, ms(t, n, s);
|
|
4729
4821
|
}), (e.outEdges(r.v) || []).forEach((r) => {
|
|
4730
4822
|
let i = e.edge(r), a = r.w, o = e.node(a);
|
|
4731
|
-
o.in -= i,
|
|
4823
|
+
o.in -= i, ms(t, n, o);
|
|
4732
4824
|
}), e.removeNode(r.v), o;
|
|
4733
4825
|
}
|
|
4734
|
-
function
|
|
4826
|
+
function ps(e, t) {
|
|
4735
4827
|
let n = new Q(), r = 0, i = 0;
|
|
4736
4828
|
e.nodes().forEach((e) => {
|
|
4737
4829
|
n.setNode(e, {
|
|
@@ -4745,34 +4837,34 @@ function ds(e, t) {
|
|
|
4745
4837
|
let c = n.node(e.v), l = n.node(e.w);
|
|
4746
4838
|
i = Math.max(i, c.out += o), r = Math.max(r, l.in += o);
|
|
4747
4839
|
});
|
|
4748
|
-
let a =
|
|
4840
|
+
let a = hs(i + r + 3).map(() => new cs()), o = r + 1;
|
|
4749
4841
|
return n.nodes().forEach((e) => {
|
|
4750
|
-
|
|
4842
|
+
ms(a, o, n.node(e));
|
|
4751
4843
|
}), {
|
|
4752
4844
|
graph: n,
|
|
4753
4845
|
buckets: a,
|
|
4754
4846
|
zeroIdx: o
|
|
4755
4847
|
};
|
|
4756
4848
|
}
|
|
4757
|
-
function
|
|
4849
|
+
function ms(e, t, n) {
|
|
4758
4850
|
var r, i, a;
|
|
4759
4851
|
n.out ? n.in ? (a = e[n.out - n.in + t]) == null || a.enqueue(n) : (i = e[e.length - 1]) == null || i.enqueue(n) : (r = e[0]) == null || r.enqueue(n);
|
|
4760
4852
|
}
|
|
4761
|
-
function
|
|
4853
|
+
function hs(e) {
|
|
4762
4854
|
let t = [];
|
|
4763
4855
|
for (let n = 0; n < e; n++) t.push(n);
|
|
4764
4856
|
return t;
|
|
4765
4857
|
}
|
|
4766
|
-
function
|
|
4767
|
-
(e.graph().acyclicer === "greedy" ?
|
|
4858
|
+
function gs(e) {
|
|
4859
|
+
(e.graph().acyclicer === "greedy" ? us(e, t(e)) : _s(e)).forEach((t) => {
|
|
4768
4860
|
let n = e.edge(t);
|
|
4769
|
-
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n,
|
|
4861
|
+
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n, Qo("rev"));
|
|
4770
4862
|
});
|
|
4771
4863
|
function t(e) {
|
|
4772
4864
|
return (t) => e.edge(t).weight;
|
|
4773
4865
|
}
|
|
4774
4866
|
}
|
|
4775
|
-
function
|
|
4867
|
+
function _s(e) {
|
|
4776
4868
|
let t = [], n = {}, r = {};
|
|
4777
4869
|
function i(a) {
|
|
4778
4870
|
Object.hasOwn(r, a) || (r[a] = !0, n[a] = !0, e.outEdges(a).forEach((e) => {
|
|
@@ -4781,7 +4873,7 @@ function hs(e) {
|
|
|
4781
4873
|
}
|
|
4782
4874
|
return e.nodes().forEach(i), t;
|
|
4783
4875
|
}
|
|
4784
|
-
function
|
|
4876
|
+
function vs(e) {
|
|
4785
4877
|
e.edges().forEach((t) => {
|
|
4786
4878
|
let n = e.edge(t);
|
|
4787
4879
|
if (n.reversed) {
|
|
@@ -4791,10 +4883,10 @@ function gs(e) {
|
|
|
4791
4883
|
}
|
|
4792
4884
|
});
|
|
4793
4885
|
}
|
|
4794
|
-
function
|
|
4795
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
4886
|
+
function ys(e) {
|
|
4887
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => bs(e, t));
|
|
4796
4888
|
}
|
|
4797
|
-
function
|
|
4889
|
+
function bs(e, t) {
|
|
4798
4890
|
let n = t.v, r = e.node(n).rank, i = t.w, a = e.node(i).rank, o = t.name, s = e.edge(t), c = s.labelRank;
|
|
4799
4891
|
if (a === r + 1) return;
|
|
4800
4892
|
e.removeEdge(t);
|
|
@@ -4805,10 +4897,10 @@ function vs(e, t) {
|
|
|
4805
4897
|
edgeLabel: s,
|
|
4806
4898
|
edgeObj: t,
|
|
4807
4899
|
rank: r
|
|
4808
|
-
}, l =
|
|
4900
|
+
}, l = Lo(e, "edge", u, "_d"), r === c && (u.width = s.width, u.height = s.height, u.dummy = "edge-label", u.labelpos = s.labelpos), e.setEdge(n, l, { weight: s.weight }, o), d === 0 && e.graph().dummyChains.push(l), n = l;
|
|
4809
4901
|
e.setEdge(n, i, { weight: s.weight }, o);
|
|
4810
4902
|
}
|
|
4811
|
-
function
|
|
4903
|
+
function xs(e) {
|
|
4812
4904
|
e.graph().dummyChains.forEach((t) => {
|
|
4813
4905
|
let n = e.node(t), r = n.edgeLabel, i;
|
|
4814
4906
|
for (e.setEdge(n.edgeObj, r); n.dummy;) i = e.successors(t)[0], e.removeNode(t), r.points.push({
|
|
@@ -4817,7 +4909,7 @@ function ys(e) {
|
|
|
4817
4909
|
}), n.dummy === "edge-label" && (r.x = n.x, r.y = n.y, r.width = n.width, r.height = n.height), t = i, n = e.node(t);
|
|
4818
4910
|
});
|
|
4819
4911
|
}
|
|
4820
|
-
function
|
|
4912
|
+
function Ss(e) {
|
|
4821
4913
|
let t = {};
|
|
4822
4914
|
function n(r) {
|
|
4823
4915
|
let i = e.node(r);
|
|
@@ -4828,56 +4920,56 @@ function bs(e) {
|
|
|
4828
4920
|
}
|
|
4829
4921
|
e.sources().forEach(n);
|
|
4830
4922
|
}
|
|
4831
|
-
function
|
|
4923
|
+
function Cs(e, t) {
|
|
4832
4924
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
4833
4925
|
}
|
|
4834
|
-
var
|
|
4835
|
-
function
|
|
4926
|
+
var ws = Ts;
|
|
4927
|
+
function Ts(e) {
|
|
4836
4928
|
let t = new Q({ directed: !1 }), n = e.nodes();
|
|
4837
4929
|
if (n.length === 0) throw Error("Graph must have at least one node");
|
|
4838
4930
|
let r = n[0], i = e.nodeCount();
|
|
4839
4931
|
t.setNode(r, {});
|
|
4840
4932
|
let a, o;
|
|
4841
|
-
for (;
|
|
4933
|
+
for (; Es(t, e) < i && (a = Ds(t, e), a);) o = t.hasNode(a.v) ? Cs(e, a) : -Cs(e, a), Os(t, e, o);
|
|
4842
4934
|
return t;
|
|
4843
4935
|
}
|
|
4844
|
-
function
|
|
4936
|
+
function Es(e, t) {
|
|
4845
4937
|
function n(r) {
|
|
4846
4938
|
let i = t.nodeEdges(r);
|
|
4847
4939
|
i && i.forEach((i) => {
|
|
4848
4940
|
let a = i.v, o = r === a ? i.w : a;
|
|
4849
|
-
!e.hasNode(o) && !
|
|
4941
|
+
!e.hasNode(o) && !Cs(t, i) && (e.setNode(o, {}), e.setEdge(r, o, {}), n(o));
|
|
4850
4942
|
});
|
|
4851
4943
|
}
|
|
4852
4944
|
return e.nodes().forEach(n), e.nodeCount();
|
|
4853
4945
|
}
|
|
4854
|
-
function
|
|
4946
|
+
function Ds(e, t) {
|
|
4855
4947
|
return t.edges().reduce((n, r) => {
|
|
4856
4948
|
let i = Infinity;
|
|
4857
|
-
return e.hasNode(r.v) !== e.hasNode(r.w) && (i =
|
|
4949
|
+
return e.hasNode(r.v) !== e.hasNode(r.w) && (i = Cs(t, r)), i < n[0] ? [i, r] : n;
|
|
4858
4950
|
}, [Infinity, null])[1];
|
|
4859
4951
|
}
|
|
4860
|
-
function
|
|
4952
|
+
function Os(e, t, n) {
|
|
4861
4953
|
e.nodes().forEach((e) => t.node(e).rank += n);
|
|
4862
4954
|
}
|
|
4863
|
-
var { preorder:
|
|
4864
|
-
|
|
4865
|
-
function
|
|
4866
|
-
e =
|
|
4867
|
-
let t =
|
|
4868
|
-
|
|
4955
|
+
var { preorder: ks, postorder: As } = uo, js = Ms;
|
|
4956
|
+
Ms.initLowLimValues = Is, Ms.initCutValues = Ns, Ms.calcCutValue = Fs, Ms.leaveEdge = Rs, Ms.enterEdge = zs, Ms.exchangeEdges = Bs;
|
|
4957
|
+
function Ms(e) {
|
|
4958
|
+
e = Ro(e), Ss(e);
|
|
4959
|
+
let t = ws(e);
|
|
4960
|
+
Is(t), Ns(t, e);
|
|
4869
4961
|
let n, r;
|
|
4870
|
-
for (; n =
|
|
4962
|
+
for (; n = Rs(t);) r = zs(t, e, n), Bs(t, e, n, r);
|
|
4871
4963
|
}
|
|
4872
|
-
function
|
|
4873
|
-
let n =
|
|
4874
|
-
n = n.slice(0, n.length - 1), n.forEach((n) =>
|
|
4964
|
+
function Ns(e, t) {
|
|
4965
|
+
let n = As(e, e.nodes());
|
|
4966
|
+
n = n.slice(0, n.length - 1), n.forEach((n) => Ps(e, t, n));
|
|
4875
4967
|
}
|
|
4876
|
-
function
|
|
4968
|
+
function Ps(e, t, n) {
|
|
4877
4969
|
let r = e.node(n).parent, i = e.edge(n, r);
|
|
4878
|
-
i.cutvalue =
|
|
4970
|
+
i.cutvalue = Fs(e, t, n);
|
|
4879
4971
|
}
|
|
4880
|
-
function
|
|
4972
|
+
function Fs(e, t, n) {
|
|
4881
4973
|
let r = e.node(n).parent, i = !0, a = t.edge(n, r), o = 0;
|
|
4882
4974
|
a ||= (i = !1, t.edge(r, n)), o = a.weight;
|
|
4883
4975
|
let s = t.nodeEdges(n);
|
|
@@ -4885,82 +4977,82 @@ function Ns(e, t, n) {
|
|
|
4885
4977
|
let s = a.v === n, c = s ? a.w : a.v;
|
|
4886
4978
|
if (c !== r) {
|
|
4887
4979
|
let r = s === i, l = t.edge(a).weight;
|
|
4888
|
-
if (o += r ? l : -l,
|
|
4980
|
+
if (o += r ? l : -l, Hs(e, n, c)) {
|
|
4889
4981
|
let t = e.edge(n, c).cutvalue;
|
|
4890
4982
|
o += r ? -t : t;
|
|
4891
4983
|
}
|
|
4892
4984
|
}
|
|
4893
4985
|
}), o;
|
|
4894
4986
|
}
|
|
4895
|
-
function
|
|
4896
|
-
arguments.length < 2 && (t = e.nodes()[0]),
|
|
4987
|
+
function Is(e, t) {
|
|
4988
|
+
arguments.length < 2 && (t = e.nodes()[0]), Ls(e, {}, 1, t);
|
|
4897
4989
|
}
|
|
4898
|
-
function
|
|
4990
|
+
function Ls(e, t, n, r, i) {
|
|
4899
4991
|
let a = n, o = e.node(r);
|
|
4900
4992
|
t[r] = !0;
|
|
4901
4993
|
let s = e.neighbors(r);
|
|
4902
4994
|
return s && s.forEach((i) => {
|
|
4903
|
-
Object.hasOwn(t, i) || (n =
|
|
4995
|
+
Object.hasOwn(t, i) || (n = Ls(e, t, n, i, r));
|
|
4904
4996
|
}), o.low = a, o.lim = n++, i ? o.parent = i : delete o.parent, n;
|
|
4905
4997
|
}
|
|
4906
|
-
function
|
|
4998
|
+
function Rs(e) {
|
|
4907
4999
|
return e.edges().find((t) => e.edge(t).cutvalue < 0);
|
|
4908
5000
|
}
|
|
4909
|
-
function
|
|
5001
|
+
function zs(e, t, n) {
|
|
4910
5002
|
let r = n.v, i = n.w;
|
|
4911
5003
|
t.hasEdge(r, i) || (r = n.w, i = n.v);
|
|
4912
5004
|
let a = e.node(r), o = e.node(i), s = a, c = !1;
|
|
4913
|
-
return a.lim > o.lim && (s = o, c = !0), t.edges().filter((t) => c ===
|
|
5005
|
+
return a.lim > o.lim && (s = o, c = !0), t.edges().filter((t) => c === Us(e, e.node(t.v), s) && c !== Us(e, e.node(t.w), s)).reduce((e, n) => Cs(t, n) < Cs(t, e) ? n : e);
|
|
4914
5006
|
}
|
|
4915
|
-
function
|
|
5007
|
+
function Bs(e, t, n, r) {
|
|
4916
5008
|
let i = n.v, a = n.w;
|
|
4917
|
-
e.removeEdge(i, a), e.setEdge(r.v, r.w, {}),
|
|
5009
|
+
e.removeEdge(i, a), e.setEdge(r.v, r.w, {}), Is(e), Ns(e, t), Vs(e, t);
|
|
4918
5010
|
}
|
|
4919
|
-
function
|
|
5011
|
+
function Vs(e, t) {
|
|
4920
5012
|
let n = e.nodes().find((t) => !e.node(t).parent);
|
|
4921
5013
|
if (!n) return;
|
|
4922
|
-
let r =
|
|
5014
|
+
let r = ks(e, [n]);
|
|
4923
5015
|
r = r.slice(1), r.forEach((n) => {
|
|
4924
5016
|
let r = e.node(n).parent, i = t.edge(n, r), a = !1;
|
|
4925
5017
|
i || (i = t.edge(r, n), a = !0), t.node(n).rank = t.node(r).rank + (a ? i.minlen : -i.minlen);
|
|
4926
5018
|
});
|
|
4927
5019
|
}
|
|
4928
|
-
function
|
|
5020
|
+
function Hs(e, t, n) {
|
|
4929
5021
|
return e.hasEdge(t, n);
|
|
4930
5022
|
}
|
|
4931
|
-
function
|
|
5023
|
+
function Us(e, t, n) {
|
|
4932
5024
|
return n.low <= t.lim && t.lim <= n.lim;
|
|
4933
5025
|
}
|
|
4934
|
-
var
|
|
4935
|
-
function
|
|
5026
|
+
var Ws = Gs;
|
|
5027
|
+
function Gs(e) {
|
|
4936
5028
|
let t = e.graph().ranker;
|
|
4937
5029
|
if (typeof t == "function") return t(e);
|
|
4938
5030
|
switch (t) {
|
|
4939
5031
|
case "network-simplex":
|
|
4940
|
-
|
|
5032
|
+
Js(e);
|
|
4941
5033
|
break;
|
|
4942
5034
|
case "tight-tree":
|
|
4943
|
-
|
|
5035
|
+
qs(e);
|
|
4944
5036
|
break;
|
|
4945
5037
|
case "longest-path":
|
|
4946
|
-
|
|
5038
|
+
Ks(e);
|
|
4947
5039
|
break;
|
|
4948
5040
|
case "none": break;
|
|
4949
|
-
default:
|
|
5041
|
+
default: Js(e);
|
|
4950
5042
|
}
|
|
4951
5043
|
}
|
|
4952
|
-
var
|
|
4953
|
-
function
|
|
4954
|
-
|
|
5044
|
+
var Ks = Ss;
|
|
5045
|
+
function qs(e) {
|
|
5046
|
+
Ss(e), ws(e);
|
|
4955
5047
|
}
|
|
4956
|
-
function Ks(e) {
|
|
4957
|
-
ks(e);
|
|
4958
|
-
}
|
|
4959
|
-
var qs = Js;
|
|
4960
5048
|
function Js(e) {
|
|
4961
|
-
|
|
5049
|
+
js(e);
|
|
5050
|
+
}
|
|
5051
|
+
var Ys = Xs;
|
|
5052
|
+
function Xs(e) {
|
|
5053
|
+
let t = Qs(e);
|
|
4962
5054
|
e.graph().dummyChains.forEach((n) => {
|
|
4963
|
-
let r = e.node(n), i = r.edgeObj, a =
|
|
5055
|
+
let r = e.node(n), i = r.edgeObj, a = Zs(e, t, i.v, i.w), o = a.path, s = a.lca, c = 0, l = o[c], u = !0;
|
|
4964
5056
|
for (; n !== i.w;) {
|
|
4965
5057
|
if (r = e.node(n), u) {
|
|
4966
5058
|
for (; (l = o[c]) !== s && e.node(l).maxRank < r.rank;) c++;
|
|
@@ -4974,7 +5066,7 @@ function Js(e) {
|
|
|
4974
5066
|
}
|
|
4975
5067
|
});
|
|
4976
5068
|
}
|
|
4977
|
-
function
|
|
5069
|
+
function Zs(e, t, n, r) {
|
|
4978
5070
|
let i = [], a = [], o = Math.min(t[n].low, t[r].low), s = Math.max(t[n].lim, t[r].lim), c;
|
|
4979
5071
|
c = n;
|
|
4980
5072
|
do
|
|
@@ -4987,7 +5079,7 @@ function Ys(e, t, n, r) {
|
|
|
4987
5079
|
lca: l
|
|
4988
5080
|
};
|
|
4989
5081
|
}
|
|
4990
|
-
function
|
|
5082
|
+
function Qs(e) {
|
|
4991
5083
|
let t = {}, n = 0;
|
|
4992
5084
|
function r(i) {
|
|
4993
5085
|
let a = n;
|
|
@@ -4996,15 +5088,15 @@ function Xs(e) {
|
|
|
4996
5088
|
lim: n++
|
|
4997
5089
|
};
|
|
4998
5090
|
}
|
|
4999
|
-
return e.children(
|
|
5091
|
+
return e.children(rs).forEach(r), t;
|
|
5000
5092
|
}
|
|
5001
|
-
function
|
|
5002
|
-
let t =
|
|
5093
|
+
function $s(e) {
|
|
5094
|
+
let t = Lo(e, "root", {}, "_root"), n = tc(e), r = Object.values(n), i = $(Math.max, r) - 1, a = 2 * i + 1;
|
|
5003
5095
|
e.graph().nestingRoot = t, e.edges().forEach((t) => e.edge(t).minlen *= a);
|
|
5004
|
-
let o =
|
|
5005
|
-
e.children(
|
|
5096
|
+
let o = nc(e) + 1;
|
|
5097
|
+
e.children(rs).forEach((r) => ec(e, t, a, o, i, n, r)), e.graph().nodeRankFactor = a;
|
|
5006
5098
|
}
|
|
5007
|
-
function
|
|
5099
|
+
function ec(e, t, n, r, i, a, o) {
|
|
5008
5100
|
let s = e.children(o);
|
|
5009
5101
|
if (!s.length) {
|
|
5010
5102
|
o !== t && e.setEdge(t, o, {
|
|
@@ -5013,9 +5105,9 @@ function Qs(e, t, n, r, i, a, o) {
|
|
|
5013
5105
|
});
|
|
5014
5106
|
return;
|
|
5015
5107
|
}
|
|
5016
|
-
let c =
|
|
5108
|
+
let c = Wo(e, "_bt"), l = Wo(e, "_bb"), u = e.node(o);
|
|
5017
5109
|
e.setParent(c, o), u.borderTop = c, e.setParent(l, o), u.borderBottom = l, s.forEach((s) => {
|
|
5018
|
-
|
|
5110
|
+
ec(e, t, n, r, i, a, s);
|
|
5019
5111
|
let u = e.node(s), d = u.borderTop ? u.borderTop : s, f = u.borderBottom ? u.borderBottom : s, p = u.borderTop ? r : 2 * r, m = d === f ? i - (a[o] ?? 0) + 1 : 1;
|
|
5020
5112
|
e.setEdge(c, d, {
|
|
5021
5113
|
weight: p,
|
|
@@ -5031,81 +5123,81 @@ function Qs(e, t, n, r, i, a, o) {
|
|
|
5031
5123
|
minlen: i + (a[o] ?? 0)
|
|
5032
5124
|
});
|
|
5033
5125
|
}
|
|
5034
|
-
function
|
|
5126
|
+
function tc(e) {
|
|
5035
5127
|
let t = {};
|
|
5036
5128
|
function n(r, i) {
|
|
5037
5129
|
let a = e.children(r);
|
|
5038
5130
|
a && a.length && a.forEach((e) => n(e, i + 1)), t[r] = i;
|
|
5039
5131
|
}
|
|
5040
|
-
return e.children(
|
|
5132
|
+
return e.children(rs).forEach((e) => n(e, 1)), t;
|
|
5041
5133
|
}
|
|
5042
|
-
function
|
|
5134
|
+
function nc(e) {
|
|
5043
5135
|
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
5044
5136
|
}
|
|
5045
|
-
function
|
|
5137
|
+
function rc(e) {
|
|
5046
5138
|
let t = e.graph();
|
|
5047
5139
|
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((t) => {
|
|
5048
5140
|
e.edge(t).nestingEdge && e.removeEdge(t);
|
|
5049
5141
|
});
|
|
5050
5142
|
}
|
|
5051
|
-
var
|
|
5052
|
-
function
|
|
5143
|
+
var ic = ac;
|
|
5144
|
+
function ac(e) {
|
|
5053
5145
|
function t(n) {
|
|
5054
5146
|
let r = e.children(n), i = e.node(n);
|
|
5055
5147
|
if (r.length && r.forEach(t), Object.hasOwn(i, "minRank")) {
|
|
5056
5148
|
i.borderLeft = [], i.borderRight = [];
|
|
5057
|
-
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t)
|
|
5149
|
+
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t) oc(e, "borderLeft", "_bl", n, i, t), oc(e, "borderRight", "_br", n, i, t);
|
|
5058
5150
|
}
|
|
5059
5151
|
}
|
|
5060
|
-
e.children(
|
|
5152
|
+
e.children(rs).forEach(t);
|
|
5061
5153
|
}
|
|
5062
|
-
function
|
|
5154
|
+
function oc(e, t, n, r, i, a) {
|
|
5063
5155
|
let o = {
|
|
5064
5156
|
width: 0,
|
|
5065
5157
|
height: 0,
|
|
5066
5158
|
rank: a,
|
|
5067
5159
|
borderType: t
|
|
5068
|
-
}, s = i[t][a - 1], c =
|
|
5160
|
+
}, s = i[t][a - 1], c = Lo(e, "border", o, n);
|
|
5069
5161
|
i[t][a] = c, e.setParent(c, r), s && e.setEdge(s, c, { weight: 1 });
|
|
5070
5162
|
}
|
|
5071
|
-
function
|
|
5163
|
+
function sc(e) {
|
|
5072
5164
|
let t = e.graph().rankdir?.toLowerCase();
|
|
5073
|
-
(t === "lr" || t === "rl") &&
|
|
5165
|
+
(t === "lr" || t === "rl") && lc(e);
|
|
5074
5166
|
}
|
|
5075
|
-
function
|
|
5167
|
+
function cc(e) {
|
|
5076
5168
|
let t = e.graph().rankdir?.toLowerCase();
|
|
5077
|
-
(t === "bt" || t === "rl") &&
|
|
5169
|
+
(t === "bt" || t === "rl") && dc(e), (t === "lr" || t === "rl") && (pc(e), lc(e));
|
|
5078
5170
|
}
|
|
5079
|
-
function
|
|
5080
|
-
e.nodes().forEach((t) =>
|
|
5171
|
+
function lc(e) {
|
|
5172
|
+
e.nodes().forEach((t) => uc(e.node(t))), e.edges().forEach((t) => uc(e.edge(t)));
|
|
5081
5173
|
}
|
|
5082
|
-
function
|
|
5174
|
+
function uc(e) {
|
|
5083
5175
|
let t = e.width;
|
|
5084
5176
|
e.width = e.height, e.height = t;
|
|
5085
5177
|
}
|
|
5086
|
-
function
|
|
5087
|
-
e.nodes().forEach((t) =>
|
|
5178
|
+
function dc(e) {
|
|
5179
|
+
e.nodes().forEach((t) => fc(e.node(t))), e.edges().forEach((t) => {
|
|
5088
5180
|
var n;
|
|
5089
5181
|
let r = e.edge(t);
|
|
5090
|
-
(n = r.points) == null || n.forEach(
|
|
5182
|
+
(n = r.points) == null || n.forEach(fc), Object.hasOwn(r, "y") && fc(r);
|
|
5091
5183
|
});
|
|
5092
5184
|
}
|
|
5093
|
-
function
|
|
5185
|
+
function fc(e) {
|
|
5094
5186
|
e.y = -e.y;
|
|
5095
5187
|
}
|
|
5096
|
-
function
|
|
5097
|
-
e.nodes().forEach((t) =>
|
|
5188
|
+
function pc(e) {
|
|
5189
|
+
e.nodes().forEach((t) => mc(e.node(t))), e.edges().forEach((t) => {
|
|
5098
5190
|
var n;
|
|
5099
5191
|
let r = e.edge(t);
|
|
5100
|
-
(n = r.points) == null || n.forEach(
|
|
5192
|
+
(n = r.points) == null || n.forEach(mc), Object.hasOwn(r, "x") && mc(r);
|
|
5101
5193
|
});
|
|
5102
5194
|
}
|
|
5103
|
-
function
|
|
5195
|
+
function mc(e) {
|
|
5104
5196
|
let t = e.x;
|
|
5105
5197
|
e.x = e.y, e.y = t;
|
|
5106
5198
|
}
|
|
5107
|
-
function
|
|
5108
|
-
let t = {}, n = e.nodes().filter((t) => !e.children(t).length), r = n.map((t) => e.node(t).rank), i =
|
|
5199
|
+
function hc(e) {
|
|
5200
|
+
let t = {}, n = e.nodes().filter((t) => !e.children(t).length), r = n.map((t) => e.node(t).rank), i = $o($(Math.max, r) + 1).map(() => []);
|
|
5109
5201
|
function a(n) {
|
|
5110
5202
|
if (t[n]) return;
|
|
5111
5203
|
t[n] = !0;
|
|
@@ -5116,13 +5208,13 @@ function pc(e) {
|
|
|
5116
5208
|
}
|
|
5117
5209
|
return n.sort((t, n) => e.node(t).rank - e.node(n).rank).forEach(a), i;
|
|
5118
5210
|
}
|
|
5119
|
-
function
|
|
5211
|
+
function gc(e, t) {
|
|
5120
5212
|
let n = 0;
|
|
5121
|
-
for (let r = 1; r < t.length; ++r) n +=
|
|
5213
|
+
for (let r = 1; r < t.length; ++r) n += _c(e, t[r - 1], t[r]);
|
|
5122
5214
|
return n;
|
|
5123
5215
|
}
|
|
5124
|
-
function
|
|
5125
|
-
let r =
|
|
5216
|
+
function _c(e, t, n) {
|
|
5217
|
+
let r = ns(n, n.map((e, t) => t)), i = t.flatMap((t) => {
|
|
5126
5218
|
let n = e.outEdges(t);
|
|
5127
5219
|
return n ? n.map((t) => ({
|
|
5128
5220
|
pos: r[t.w],
|
|
@@ -5141,7 +5233,7 @@ function hc(e, t, n) {
|
|
|
5141
5233
|
c += e.weight * n;
|
|
5142
5234
|
}), c;
|
|
5143
5235
|
}
|
|
5144
|
-
function
|
|
5236
|
+
function vc(e, t = []) {
|
|
5145
5237
|
return t.map((t) => {
|
|
5146
5238
|
let n = e.inEdges(t);
|
|
5147
5239
|
if (!n || !n.length) return { v: t };
|
|
@@ -5164,7 +5256,7 @@ function gc(e, t = []) {
|
|
|
5164
5256
|
}
|
|
5165
5257
|
});
|
|
5166
5258
|
}
|
|
5167
|
-
function
|
|
5259
|
+
function yc(e, t) {
|
|
5168
5260
|
let n = {};
|
|
5169
5261
|
return e.forEach((e, t) => {
|
|
5170
5262
|
let r = {
|
|
@@ -5178,13 +5270,13 @@ function _c(e, t) {
|
|
|
5178
5270
|
}), t.edges().forEach((e) => {
|
|
5179
5271
|
let t = n[e.v], r = n[e.w];
|
|
5180
5272
|
t !== void 0 && r !== void 0 && (r.indegree++, t.out.push(r));
|
|
5181
|
-
}),
|
|
5273
|
+
}), bc(Object.values(n).filter((e) => !e.indegree));
|
|
5182
5274
|
}
|
|
5183
|
-
function
|
|
5275
|
+
function bc(e) {
|
|
5184
5276
|
let t = [];
|
|
5185
5277
|
function n(e) {
|
|
5186
5278
|
return (t) => {
|
|
5187
|
-
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) &&
|
|
5279
|
+
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) && xc(e, t);
|
|
5188
5280
|
};
|
|
5189
5281
|
}
|
|
5190
5282
|
function r(t) {
|
|
@@ -5196,46 +5288,46 @@ function vc(e) {
|
|
|
5196
5288
|
let i = e.pop();
|
|
5197
5289
|
t.push(i), i.in.reverse().forEach(n(i)), i.out.forEach(r(i));
|
|
5198
5290
|
}
|
|
5199
|
-
return t.filter((e) => !e.merged).map((e) =>
|
|
5291
|
+
return t.filter((e) => !e.merged).map((e) => es(e, [
|
|
5200
5292
|
"vs",
|
|
5201
5293
|
"i",
|
|
5202
5294
|
"barycenter",
|
|
5203
5295
|
"weight"
|
|
5204
5296
|
]));
|
|
5205
5297
|
}
|
|
5206
|
-
function
|
|
5298
|
+
function xc(e, t) {
|
|
5207
5299
|
let n = 0, r = 0;
|
|
5208
5300
|
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
5209
5301
|
}
|
|
5210
|
-
function
|
|
5211
|
-
let n =
|
|
5212
|
-
r.sort(
|
|
5213
|
-
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c =
|
|
5302
|
+
function Sc(e, t) {
|
|
5303
|
+
let n = Jo(e, (e) => Object.hasOwn(e, "barycenter")), r = n.lhs, i = n.rhs.sort((e, t) => t.i - e.i), a = [], o = 0, s = 0, c = 0;
|
|
5304
|
+
r.sort(wc(!!t)), c = Cc(a, i, c), r.forEach((e) => {
|
|
5305
|
+
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c = Cc(a, i, c);
|
|
5214
5306
|
});
|
|
5215
5307
|
let l = { vs: a.flat(1) };
|
|
5216
5308
|
return s && (l.barycenter = o / s, l.weight = s), l;
|
|
5217
5309
|
}
|
|
5218
|
-
function
|
|
5310
|
+
function Cc(e, t, n) {
|
|
5219
5311
|
let r;
|
|
5220
5312
|
for (; t.length && (r = t[t.length - 1]).i <= n;) t.pop(), e.push(r.vs), n++;
|
|
5221
5313
|
return n;
|
|
5222
5314
|
}
|
|
5223
|
-
function
|
|
5315
|
+
function wc(e) {
|
|
5224
5316
|
return (t, n) => t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
|
|
5225
5317
|
}
|
|
5226
|
-
function
|
|
5318
|
+
function Tc(e, t, n, r) {
|
|
5227
5319
|
let i = e.children(t), a = e.node(t), o = a ? a.borderLeft : void 0, s = a ? a.borderRight : void 0, c = {};
|
|
5228
5320
|
o && (i = i.filter((e) => e !== o && e !== s));
|
|
5229
|
-
let l =
|
|
5321
|
+
let l = vc(e, i);
|
|
5230
5322
|
l.forEach((t) => {
|
|
5231
5323
|
if (e.children(t.v).length) {
|
|
5232
|
-
let i =
|
|
5233
|
-
c[t.v] = i, Object.hasOwn(i, "barycenter") &&
|
|
5324
|
+
let i = Tc(e, t.v, n, r);
|
|
5325
|
+
c[t.v] = i, Object.hasOwn(i, "barycenter") && Dc(t, i);
|
|
5234
5326
|
}
|
|
5235
5327
|
});
|
|
5236
|
-
let u =
|
|
5237
|
-
|
|
5238
|
-
let d =
|
|
5328
|
+
let u = yc(l, n);
|
|
5329
|
+
Ec(u, c);
|
|
5330
|
+
let d = Sc(u, r);
|
|
5239
5331
|
if (o && s) {
|
|
5240
5332
|
d.vs = [
|
|
5241
5333
|
o,
|
|
@@ -5250,17 +5342,17 @@ function Cc(e, t, n, r) {
|
|
|
5250
5342
|
}
|
|
5251
5343
|
return d;
|
|
5252
5344
|
}
|
|
5253
|
-
function
|
|
5345
|
+
function Ec(e, t) {
|
|
5254
5346
|
e.forEach((e) => {
|
|
5255
5347
|
e.vs = e.vs.flatMap((e) => t[e] ? t[e].vs : e);
|
|
5256
5348
|
});
|
|
5257
5349
|
}
|
|
5258
|
-
function
|
|
5350
|
+
function Dc(e, t) {
|
|
5259
5351
|
e.barycenter === void 0 ? (e.barycenter = t.barycenter, e.weight = t.weight) : (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight);
|
|
5260
5352
|
}
|
|
5261
|
-
function
|
|
5353
|
+
function Oc(e, t, n, r) {
|
|
5262
5354
|
r ||= e.nodes();
|
|
5263
|
-
let i =
|
|
5355
|
+
let i = kc(e), a = new Q({ compound: !0 }).setGraph({ root: i }).setDefaultNodeLabel((t) => e.node(t));
|
|
5264
5356
|
return r.forEach((r) => {
|
|
5265
5357
|
let o = e.node(r), s = e.parent(r);
|
|
5266
5358
|
if (o.rank === t || o.minRank <= t && t <= o.maxRank) {
|
|
@@ -5276,12 +5368,12 @@ function Ec(e, t, n, r) {
|
|
|
5276
5368
|
}
|
|
5277
5369
|
}), a;
|
|
5278
5370
|
}
|
|
5279
|
-
function
|
|
5371
|
+
function kc(e) {
|
|
5280
5372
|
let t;
|
|
5281
|
-
for (; e.hasNode(t =
|
|
5373
|
+
for (; e.hasNode(t = Qo("_root")););
|
|
5282
5374
|
return t;
|
|
5283
5375
|
}
|
|
5284
|
-
function
|
|
5376
|
+
function Ac(e, t, n) {
|
|
5285
5377
|
let r = {}, i;
|
|
5286
5378
|
n.forEach((n) => {
|
|
5287
5379
|
let a = e.parent(n), o, s;
|
|
@@ -5294,22 +5386,22 @@ function Oc(e, t, n) {
|
|
|
5294
5386
|
}
|
|
5295
5387
|
});
|
|
5296
5388
|
}
|
|
5297
|
-
function
|
|
5389
|
+
function jc(e, t = {}) {
|
|
5298
5390
|
if (typeof t.customOrder == "function") {
|
|
5299
|
-
t.customOrder(e,
|
|
5391
|
+
t.customOrder(e, jc);
|
|
5300
5392
|
return;
|
|
5301
5393
|
}
|
|
5302
|
-
let n =
|
|
5303
|
-
if (
|
|
5394
|
+
let n = qo(e), r = Mc(e, $o(1, n + 1), "inEdges"), i = Mc(e, $o(n - 1, -1, -1), "outEdges"), a = hc(e);
|
|
5395
|
+
if (Pc(e, a), t.disableOptimalOrderHeuristic) return;
|
|
5304
5396
|
let o = Infinity, s, c = t.constraints || [];
|
|
5305
5397
|
for (let t = 0, n = 0; n < 4; ++t, ++n) {
|
|
5306
|
-
|
|
5307
|
-
let l =
|
|
5398
|
+
Nc(t % 2 ? r : i, t % 4 >= 2, c), a = Vo(e);
|
|
5399
|
+
let l = gc(e, a);
|
|
5308
5400
|
l < o ? (n = 0, s = Object.assign({}, a), o = l) : l === o && (s = structuredClone(a));
|
|
5309
5401
|
}
|
|
5310
|
-
|
|
5402
|
+
Pc(e, s);
|
|
5311
5403
|
}
|
|
5312
|
-
function
|
|
5404
|
+
function Mc(e, t, n) {
|
|
5313
5405
|
let r = /* @__PURE__ */ new Map(), i = (e, t) => {
|
|
5314
5406
|
r.has(e) || r.set(e, []), r.get(e).push(t);
|
|
5315
5407
|
};
|
|
@@ -5318,48 +5410,48 @@ function Ac(e, t, n) {
|
|
|
5318
5410
|
if (typeof n.rank == "number" && i(n.rank, t), typeof n.minRank == "number" && typeof n.maxRank == "number") for (let e = n.minRank; e <= n.maxRank; e++) e !== n.rank && i(e, t);
|
|
5319
5411
|
}
|
|
5320
5412
|
return t.map(function(t) {
|
|
5321
|
-
return
|
|
5413
|
+
return Oc(e, t, n, r.get(t) || []);
|
|
5322
5414
|
});
|
|
5323
5415
|
}
|
|
5324
|
-
function
|
|
5416
|
+
function Nc(e, t, n) {
|
|
5325
5417
|
let r = new Q();
|
|
5326
5418
|
e.forEach(function(e) {
|
|
5327
5419
|
n.forEach((e) => r.setEdge(e.left, e.right));
|
|
5328
|
-
let i = e.graph().root, a =
|
|
5329
|
-
a.vs.forEach((t, n) => e.node(t).order = n),
|
|
5420
|
+
let i = e.graph().root, a = Tc(e, i, r, t);
|
|
5421
|
+
a.vs.forEach((t, n) => e.node(t).order = n), Ac(e, r, a.vs);
|
|
5330
5422
|
});
|
|
5331
5423
|
}
|
|
5332
|
-
function
|
|
5424
|
+
function Pc(e, t) {
|
|
5333
5425
|
Object.values(t).forEach((t) => t.forEach((t, n) => e.node(t).order = n));
|
|
5334
5426
|
}
|
|
5335
|
-
function
|
|
5427
|
+
function Fc(e, t) {
|
|
5336
5428
|
let n = {};
|
|
5337
5429
|
function r(t, r) {
|
|
5338
5430
|
let i = 0, a = 0, o = t.length, s = r[r.length - 1];
|
|
5339
5431
|
return r.forEach((t, c) => {
|
|
5340
|
-
let l =
|
|
5432
|
+
let l = Lc(e, t), u = l ? e.node(l).order : o;
|
|
5341
5433
|
(l || t === s) && (r.slice(a, c + 1).forEach((t) => {
|
|
5342
5434
|
let r = e.predecessors(t);
|
|
5343
5435
|
r && r.forEach((r) => {
|
|
5344
5436
|
let a = e.node(r), o = a.order;
|
|
5345
|
-
(o < i || u < o) && !(a.dummy && e.node(t).dummy) &&
|
|
5437
|
+
(o < i || u < o) && !(a.dummy && e.node(t).dummy) && Rc(n, r, t);
|
|
5346
5438
|
});
|
|
5347
5439
|
}), a = c + 1, i = u);
|
|
5348
5440
|
}), r;
|
|
5349
5441
|
}
|
|
5350
5442
|
return t.length && t.reduce(r), n;
|
|
5351
5443
|
}
|
|
5352
|
-
function
|
|
5444
|
+
function Ic(e, t) {
|
|
5353
5445
|
let n = {};
|
|
5354
5446
|
function r(t, r, i, a, o) {
|
|
5355
|
-
|
|
5447
|
+
$o(r, i).forEach((r) => {
|
|
5356
5448
|
let i = t[r];
|
|
5357
5449
|
if (i !== void 0 && e.node(i).dummy) {
|
|
5358
5450
|
let t = e.predecessors(i);
|
|
5359
5451
|
t && t.forEach((t) => {
|
|
5360
5452
|
if (t === void 0) return;
|
|
5361
5453
|
let r = e.node(t);
|
|
5362
|
-
r.dummy && (r.order < a || r.order > o) &&
|
|
5454
|
+
r.dummy && (r.order < a || r.order > o) && Rc(n, t, i);
|
|
5363
5455
|
});
|
|
5364
5456
|
}
|
|
5365
5457
|
});
|
|
@@ -5380,13 +5472,13 @@ function Pc(e, t) {
|
|
|
5380
5472
|
}
|
|
5381
5473
|
return t.length && t.reduce(i), n;
|
|
5382
5474
|
}
|
|
5383
|
-
function
|
|
5475
|
+
function Lc(e, t) {
|
|
5384
5476
|
if (e.node(t).dummy) {
|
|
5385
5477
|
let n = e.predecessors(t);
|
|
5386
5478
|
if (n) return n.find((t) => e.node(t).dummy);
|
|
5387
5479
|
}
|
|
5388
5480
|
}
|
|
5389
|
-
function
|
|
5481
|
+
function Rc(e, t, n) {
|
|
5390
5482
|
if (t > n) {
|
|
5391
5483
|
let e = t;
|
|
5392
5484
|
t = n, n = e;
|
|
@@ -5394,7 +5486,7 @@ function Ic(e, t, n) {
|
|
|
5394
5486
|
let r = e[t];
|
|
5395
5487
|
r || (e[t] = r = {}), r[n] = !0;
|
|
5396
5488
|
}
|
|
5397
|
-
function
|
|
5489
|
+
function zc(e, t, n) {
|
|
5398
5490
|
if (t > n) {
|
|
5399
5491
|
let e = t;
|
|
5400
5492
|
t = n, n = e;
|
|
@@ -5402,7 +5494,7 @@ function Lc(e, t, n) {
|
|
|
5402
5494
|
let r = e[t];
|
|
5403
5495
|
return r !== void 0 && Object.hasOwn(r, n);
|
|
5404
5496
|
}
|
|
5405
|
-
function
|
|
5497
|
+
function Bc(e, t, n, r) {
|
|
5406
5498
|
let i = {}, a = {}, o = {};
|
|
5407
5499
|
return t.forEach((e) => {
|
|
5408
5500
|
e.forEach((e, t) => {
|
|
@@ -5421,7 +5513,7 @@ function Rc(e, t, n, r) {
|
|
|
5421
5513
|
let c = r[s];
|
|
5422
5514
|
if (c === void 0) continue;
|
|
5423
5515
|
let l = o[c];
|
|
5424
|
-
if (l !== void 0 && a[e] === e && t < l && !
|
|
5516
|
+
if (l !== void 0 && a[e] === e && t < l && !zc(n, e, c)) {
|
|
5425
5517
|
let n = i[c];
|
|
5426
5518
|
n !== void 0 && (a[c] = e, a[e] = i[e] = n, t = l);
|
|
5427
5519
|
}
|
|
@@ -5433,8 +5525,8 @@ function Rc(e, t, n, r) {
|
|
|
5433
5525
|
align: a
|
|
5434
5526
|
};
|
|
5435
5527
|
}
|
|
5436
|
-
function
|
|
5437
|
-
let a = {}, o =
|
|
5528
|
+
function Vc(e, t, n, r, i = !1) {
|
|
5529
|
+
let a = {}, o = Hc(e, t, n, i), s = i ? "borderLeft" : "borderRight";
|
|
5438
5530
|
function c(e, t) {
|
|
5439
5531
|
let n = o.nodes().slice(), r = {}, i = n.pop();
|
|
5440
5532
|
for (; i;) {
|
|
@@ -5473,8 +5565,8 @@ function zc(e, t, n, r, i = !1) {
|
|
|
5473
5565
|
t !== void 0 && (a[e] = a[t] ?? 0);
|
|
5474
5566
|
}), a;
|
|
5475
5567
|
}
|
|
5476
|
-
function
|
|
5477
|
-
let i = new Q(), a = e.graph(), o =
|
|
5568
|
+
function Hc(e, t, n, r) {
|
|
5569
|
+
let i = new Q(), a = e.graph(), o = qc(a.nodesep, a.edgesep, r);
|
|
5478
5570
|
return t.forEach((t) => {
|
|
5479
5571
|
let r;
|
|
5480
5572
|
t.forEach((t) => {
|
|
@@ -5492,31 +5584,31 @@ function Bc(e, t, n, r) {
|
|
|
5492
5584
|
});
|
|
5493
5585
|
}), i;
|
|
5494
5586
|
}
|
|
5495
|
-
function
|
|
5587
|
+
function Uc(e, t) {
|
|
5496
5588
|
return Object.values(t).reduce((t, n) => {
|
|
5497
5589
|
let r = -Infinity, i = Infinity;
|
|
5498
5590
|
Object.entries(n).forEach(([t, n]) => {
|
|
5499
|
-
let a =
|
|
5591
|
+
let a = Jc(e, t) / 2;
|
|
5500
5592
|
r = Math.max(n + a, r), i = Math.min(n - a, i);
|
|
5501
5593
|
});
|
|
5502
5594
|
let a = r - i;
|
|
5503
5595
|
return a < t[0] && (t = [a, n]), t;
|
|
5504
5596
|
}, [Infinity, null])[1];
|
|
5505
5597
|
}
|
|
5506
|
-
function
|
|
5598
|
+
function Wc(e, t) {
|
|
5507
5599
|
let n = Object.values(t), r = $(Math.min, n), i = $(Math.max, n);
|
|
5508
5600
|
["u", "d"].forEach((n) => {
|
|
5509
5601
|
["l", "r"].forEach((a) => {
|
|
5510
5602
|
let o = n + a, s = e[o];
|
|
5511
5603
|
if (!s || s === t) return;
|
|
5512
5604
|
let c = Object.values(s), l = r - $(Math.min, c);
|
|
5513
|
-
a !== "l" && (l = i - $(Math.max, c)), l && (e[o] =
|
|
5605
|
+
a !== "l" && (l = i - $(Math.max, c)), l && (e[o] = ts(s, (e) => e + l));
|
|
5514
5606
|
});
|
|
5515
5607
|
});
|
|
5516
5608
|
}
|
|
5517
|
-
function
|
|
5609
|
+
function Gc(e, t = void 0) {
|
|
5518
5610
|
let n = e.ul;
|
|
5519
|
-
return n ?
|
|
5611
|
+
return n ? ts(n, (n, r) => {
|
|
5520
5612
|
if (t) {
|
|
5521
5613
|
let n = e[t.toLowerCase()];
|
|
5522
5614
|
if (n && n[r] !== void 0) return n[r];
|
|
@@ -5528,17 +5620,17 @@ function Uc(e, t = void 0) {
|
|
|
5528
5620
|
return ((i[1] ?? 0) + (i[2] ?? 0)) / 2;
|
|
5529
5621
|
}) : {};
|
|
5530
5622
|
}
|
|
5531
|
-
function
|
|
5532
|
-
let t =
|
|
5623
|
+
function Kc(e) {
|
|
5624
|
+
let t = Vo(e), n = Object.assign(Fc(e, t), Ic(e, t)), r = {}, i;
|
|
5533
5625
|
return ["u", "d"].forEach((a) => {
|
|
5534
5626
|
i = a === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((t) => {
|
|
5535
5627
|
t === "r" && (i = i.map((e) => Object.values(e).reverse()));
|
|
5536
|
-
let o =
|
|
5537
|
-
t === "r" && (s =
|
|
5628
|
+
let o = Bc(e, i, n, (t) => (a === "u" ? e.predecessors(t) : e.successors(t)) || []), s = Vc(e, i, o.root, o.align, t === "r");
|
|
5629
|
+
t === "r" && (s = ts(s, (e) => -e)), r[a + t] = s;
|
|
5538
5630
|
});
|
|
5539
|
-
}),
|
|
5631
|
+
}), Wc(r, Uc(e, r)), Gc(r, e.graph().align);
|
|
5540
5632
|
}
|
|
5541
|
-
function
|
|
5633
|
+
function qc(e, t, n) {
|
|
5542
5634
|
return (r, i, a) => {
|
|
5543
5635
|
let o = r.node(i), s = r.node(a), c = 0, l;
|
|
5544
5636
|
if (c += o.width / 2, Object.hasOwn(o, "labelpos")) switch (o.labelpos.toLowerCase()) {
|
|
@@ -5560,14 +5652,14 @@ function Gc(e, t, n) {
|
|
|
5560
5652
|
return l && (c += n ? l : -l), c;
|
|
5561
5653
|
};
|
|
5562
5654
|
}
|
|
5563
|
-
function
|
|
5655
|
+
function Jc(e, t) {
|
|
5564
5656
|
return e.node(t).width;
|
|
5565
5657
|
}
|
|
5566
|
-
function
|
|
5567
|
-
e =
|
|
5658
|
+
function Yc(e) {
|
|
5659
|
+
e = zo(e), Xc(e), Object.entries(Kc(e)).forEach(([t, n]) => e.node(t).x = n);
|
|
5568
5660
|
}
|
|
5569
|
-
function
|
|
5570
|
-
let t =
|
|
5661
|
+
function Xc(e) {
|
|
5662
|
+
let t = Vo(e), n = e.graph(), r = n.ranksep, i = n.rankalign, a = 0;
|
|
5571
5663
|
t.forEach((t) => {
|
|
5572
5664
|
let n = t.reduce((t, n) => {
|
|
5573
5665
|
let r = e.node(n).height ?? 0;
|
|
@@ -5579,17 +5671,17 @@ function Jc(e) {
|
|
|
5579
5671
|
}), a += n + r;
|
|
5580
5672
|
});
|
|
5581
5673
|
}
|
|
5582
|
-
function
|
|
5583
|
-
let n = t.debugTiming ?
|
|
5674
|
+
function Zc(e, t = {}) {
|
|
5675
|
+
let n = t.debugTiming ? Yo : Xo;
|
|
5584
5676
|
return n("layout", () => {
|
|
5585
|
-
let r = n(" buildLayoutGraph", () =>
|
|
5586
|
-
return n(" runLayout", () =>
|
|
5677
|
+
let r = n(" buildLayoutGraph", () => cl(e));
|
|
5678
|
+
return n(" runLayout", () => Qc(r, n, t)), n(" updateInputGraph", () => $c(e, r)), r;
|
|
5587
5679
|
});
|
|
5588
5680
|
}
|
|
5589
|
-
function
|
|
5590
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
5681
|
+
function Qc(e, t, n) {
|
|
5682
|
+
t(" makeSpaceForEdgeLabels", () => ll(e)), t(" removeSelfEdges", () => vl(e)), t(" acyclic", () => gs(e)), t(" nestingGraph.run", () => $s(e)), t(" rank", () => Ws(zo(e))), t(" injectEdgeLabelProxies", () => ul(e)), t(" removeEmptyRanks", () => Uo(e)), t(" nestingGraph.cleanup", () => rc(e)), t(" normalizeRanks", () => Ho(e)), t(" assignRankMinMax", () => dl(e)), t(" removeEdgeLabelProxies", () => fl(e)), t(" normalize.run", () => ys(e)), t(" parentDummyChains", () => Ys(e)), t(" addBorderSegments", () => ic(e)), t(" order", () => jc(e, n)), t(" insertSelfEdges", () => yl(e)), t(" adjustCoordinateSystem", () => sc(e)), t(" position", () => Yc(e)), t(" positionSelfEdges", () => bl(e)), t(" removeBorderNodes", () => _l(e)), t(" normalize.undo", () => xs(e)), t(" fixupEdgeLabelCoords", () => hl(e)), t(" undoCoordinateSystem", () => cc(e)), t(" translateGraph", () => pl(e)), t(" assignNodeIntersects", () => ml(e)), t(" reversePoints", () => gl(e)), t(" acyclic.undo", () => vs(e));
|
|
5591
5683
|
}
|
|
5592
|
-
function
|
|
5684
|
+
function $c(e, t) {
|
|
5593
5685
|
e.nodes().forEach((n) => {
|
|
5594
5686
|
let r = e.node(n), i = t.node(n);
|
|
5595
5687
|
r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(n).length && (r.width = i.width, r.height = i.height));
|
|
@@ -5598,89 +5690,89 @@ function Zc(e, t) {
|
|
|
5598
5690
|
r.points = i.points, Object.hasOwn(i, "x") && (r.x = i.x, r.y = i.y);
|
|
5599
5691
|
}), e.graph().width = t.graph().width, e.graph().height = t.graph().height;
|
|
5600
5692
|
}
|
|
5601
|
-
var
|
|
5693
|
+
var el = [
|
|
5602
5694
|
"nodesep",
|
|
5603
5695
|
"edgesep",
|
|
5604
5696
|
"ranksep",
|
|
5605
5697
|
"marginx",
|
|
5606
5698
|
"marginy"
|
|
5607
|
-
],
|
|
5699
|
+
], tl = {
|
|
5608
5700
|
ranksep: 50,
|
|
5609
5701
|
edgesep: 20,
|
|
5610
5702
|
nodesep: 50,
|
|
5611
5703
|
rankdir: "TB",
|
|
5612
5704
|
rankalign: "center"
|
|
5613
|
-
},
|
|
5705
|
+
}, nl = [
|
|
5614
5706
|
"acyclicer",
|
|
5615
5707
|
"ranker",
|
|
5616
5708
|
"rankdir",
|
|
5617
5709
|
"align",
|
|
5618
5710
|
"rankalign"
|
|
5619
|
-
],
|
|
5711
|
+
], rl = [
|
|
5620
5712
|
"width",
|
|
5621
5713
|
"height",
|
|
5622
5714
|
"rank"
|
|
5623
|
-
],
|
|
5715
|
+
], il = {
|
|
5624
5716
|
width: 0,
|
|
5625
5717
|
height: 0
|
|
5626
|
-
},
|
|
5718
|
+
}, al = [
|
|
5627
5719
|
"minlen",
|
|
5628
5720
|
"weight",
|
|
5629
5721
|
"width",
|
|
5630
5722
|
"height",
|
|
5631
5723
|
"labeloffset"
|
|
5632
|
-
],
|
|
5724
|
+
], ol = {
|
|
5633
5725
|
minlen: 1,
|
|
5634
5726
|
weight: 1,
|
|
5635
5727
|
width: 0,
|
|
5636
5728
|
height: 0,
|
|
5637
5729
|
labeloffset: 10,
|
|
5638
5730
|
labelpos: "r"
|
|
5639
|
-
},
|
|
5640
|
-
function
|
|
5731
|
+
}, sl = ["labelpos"];
|
|
5732
|
+
function cl(e) {
|
|
5641
5733
|
let t = new Q({
|
|
5642
5734
|
multigraph: !0,
|
|
5643
5735
|
compound: !0
|
|
5644
|
-
}), n =
|
|
5645
|
-
return t.setGraph(Object.assign({},
|
|
5646
|
-
let r =
|
|
5647
|
-
Object.keys(
|
|
5648
|
-
r[e] === void 0 && (r[e] =
|
|
5736
|
+
}), n = Sl(e.graph());
|
|
5737
|
+
return t.setGraph(Object.assign({}, tl, xl(n, el), es(n, nl))), e.nodes().forEach((n) => {
|
|
5738
|
+
let r = xl(Sl(e.node(n)), rl);
|
|
5739
|
+
Object.keys(il).forEach((e) => {
|
|
5740
|
+
r[e] === void 0 && (r[e] = il[e]);
|
|
5649
5741
|
}), t.setNode(n, r);
|
|
5650
5742
|
let i = e.parent(n);
|
|
5651
5743
|
i !== void 0 && t.setParent(n, i);
|
|
5652
5744
|
}), e.edges().forEach((n) => {
|
|
5653
|
-
let r =
|
|
5654
|
-
t.setEdge(n, Object.assign({},
|
|
5745
|
+
let r = Sl(e.edge(n));
|
|
5746
|
+
t.setEdge(n, Object.assign({}, ol, xl(r, al), es(r, sl)));
|
|
5655
5747
|
}), t;
|
|
5656
5748
|
}
|
|
5657
|
-
function
|
|
5749
|
+
function ll(e) {
|
|
5658
5750
|
let t = e.graph();
|
|
5659
5751
|
t.ranksep /= 2, e.edges().forEach((n) => {
|
|
5660
5752
|
let r = e.edge(n);
|
|
5661
5753
|
r.minlen *= 2, r.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? r.width += r.labeloffset : r.height += r.labeloffset);
|
|
5662
5754
|
});
|
|
5663
5755
|
}
|
|
5664
|
-
function
|
|
5756
|
+
function ul(e) {
|
|
5665
5757
|
e.edges().forEach((t) => {
|
|
5666
5758
|
let n = e.edge(t);
|
|
5667
5759
|
if (n.width && n.height) {
|
|
5668
5760
|
let n = e.node(t.v);
|
|
5669
|
-
|
|
5761
|
+
Lo(e, "edge-proxy", {
|
|
5670
5762
|
rank: (e.node(t.w).rank - n.rank) / 2 + n.rank,
|
|
5671
5763
|
e: t
|
|
5672
5764
|
}, "_ep");
|
|
5673
5765
|
}
|
|
5674
5766
|
});
|
|
5675
5767
|
}
|
|
5676
|
-
function
|
|
5768
|
+
function dl(e) {
|
|
5677
5769
|
let t = 0;
|
|
5678
5770
|
e.nodes().forEach((n) => {
|
|
5679
5771
|
let r = e.node(n);
|
|
5680
5772
|
r.borderTop && (r.minRank = e.node(r.borderTop).rank, r.maxRank = e.node(r.borderBottom).rank, t = Math.max(t, r.maxRank));
|
|
5681
5773
|
}), e.graph().maxRank = t;
|
|
5682
5774
|
}
|
|
5683
|
-
function
|
|
5775
|
+
function fl(e) {
|
|
5684
5776
|
e.nodes().forEach((t) => {
|
|
5685
5777
|
let n = e.node(t);
|
|
5686
5778
|
if (n.dummy === "edge-proxy") {
|
|
@@ -5689,7 +5781,7 @@ function ul(e) {
|
|
|
5689
5781
|
}
|
|
5690
5782
|
});
|
|
5691
5783
|
}
|
|
5692
|
-
function
|
|
5784
|
+
function pl(e) {
|
|
5693
5785
|
let t = Infinity, n = 0, r = Infinity, i = 0, a = e.graph(), o = a.marginx || 0, s = a.marginy || 0;
|
|
5694
5786
|
function c(e) {
|
|
5695
5787
|
let a = e.x, o = e.y, s = e.width, c = e.height;
|
|
@@ -5708,13 +5800,13 @@ function dl(e) {
|
|
|
5708
5800
|
}), Object.hasOwn(i, "x") && (i.x -= t), Object.hasOwn(i, "y") && (i.y -= r);
|
|
5709
5801
|
}), a.width = n - t + o, a.height = i - r + s;
|
|
5710
5802
|
}
|
|
5711
|
-
function
|
|
5803
|
+
function ml(e) {
|
|
5712
5804
|
e.edges().forEach((t) => {
|
|
5713
5805
|
let n = e.edge(t), r = e.node(t.v), i = e.node(t.w), a, o;
|
|
5714
|
-
n.points ? (a = n.points[0], o = n.points[n.points.length - 1]) : (n.points = [], a = i, o = r), n.points.unshift(
|
|
5806
|
+
n.points ? (a = n.points[0], o = n.points[n.points.length - 1]) : (n.points = [], a = i, o = r), n.points.unshift(Bo(r, a)), n.points.push(Bo(i, o));
|
|
5715
5807
|
});
|
|
5716
5808
|
}
|
|
5717
|
-
function
|
|
5809
|
+
function hl(e) {
|
|
5718
5810
|
e.edges().forEach((t) => {
|
|
5719
5811
|
let n = e.edge(t);
|
|
5720
5812
|
if (Object.hasOwn(n, "x")) switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
|
|
@@ -5727,13 +5819,13 @@ function pl(e) {
|
|
|
5727
5819
|
}
|
|
5728
5820
|
});
|
|
5729
5821
|
}
|
|
5730
|
-
function
|
|
5822
|
+
function gl(e) {
|
|
5731
5823
|
e.edges().forEach((t) => {
|
|
5732
5824
|
let n = e.edge(t);
|
|
5733
5825
|
n.reversed && n.points.reverse();
|
|
5734
5826
|
});
|
|
5735
5827
|
}
|
|
5736
|
-
function
|
|
5828
|
+
function _l(e) {
|
|
5737
5829
|
e.nodes().forEach((t) => {
|
|
5738
5830
|
if (e.children(t).length) {
|
|
5739
5831
|
let n = e.node(t), r = e.node(n.borderTop), i = e.node(n.borderBottom), a = e.node(n.borderLeft[n.borderLeft.length - 1]), o = e.node(n.borderRight[n.borderRight.length - 1]);
|
|
@@ -5743,7 +5835,7 @@ function hl(e) {
|
|
|
5743
5835
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
5744
5836
|
});
|
|
5745
5837
|
}
|
|
5746
|
-
function
|
|
5838
|
+
function vl(e) {
|
|
5747
5839
|
e.edges().forEach((t) => {
|
|
5748
5840
|
if (t.v === t.w) {
|
|
5749
5841
|
let n = e.node(t.v);
|
|
@@ -5754,13 +5846,13 @@ function gl(e) {
|
|
|
5754
5846
|
}
|
|
5755
5847
|
});
|
|
5756
5848
|
}
|
|
5757
|
-
function
|
|
5758
|
-
|
|
5849
|
+
function yl(e) {
|
|
5850
|
+
Vo(e).forEach((t) => {
|
|
5759
5851
|
let n = 0;
|
|
5760
5852
|
t.forEach((t, r) => {
|
|
5761
5853
|
let i = e.node(t);
|
|
5762
5854
|
i.order = r + n, (i.selfEdges || []).forEach((t) => {
|
|
5763
|
-
|
|
5855
|
+
Lo(e, "selfedge", {
|
|
5764
5856
|
width: t.label.width,
|
|
5765
5857
|
height: t.label.height,
|
|
5766
5858
|
rank: i.rank,
|
|
@@ -5772,7 +5864,7 @@ function _l(e) {
|
|
|
5772
5864
|
});
|
|
5773
5865
|
});
|
|
5774
5866
|
}
|
|
5775
|
-
function
|
|
5867
|
+
function bl(e) {
|
|
5776
5868
|
e.nodes().forEach((t) => {
|
|
5777
5869
|
let n = e.node(t);
|
|
5778
5870
|
if (n.dummy === "selfedge") {
|
|
@@ -5802,17 +5894,17 @@ function vl(e) {
|
|
|
5802
5894
|
}
|
|
5803
5895
|
});
|
|
5804
5896
|
}
|
|
5805
|
-
function
|
|
5806
|
-
return
|
|
5897
|
+
function xl(e, t) {
|
|
5898
|
+
return ts(es(e, t), Number);
|
|
5807
5899
|
}
|
|
5808
|
-
function
|
|
5900
|
+
function Sl(e) {
|
|
5809
5901
|
let t = {};
|
|
5810
5902
|
return e && Object.entries(e).forEach(([e, n]) => {
|
|
5811
5903
|
typeof e == "string" && (e = e.toLowerCase()), t[e] = n;
|
|
5812
5904
|
}), t;
|
|
5813
5905
|
}
|
|
5814
|
-
function
|
|
5815
|
-
let t =
|
|
5906
|
+
function Cl(e) {
|
|
5907
|
+
let t = Vo(e), n = new Q({
|
|
5816
5908
|
compound: !0,
|
|
5817
5909
|
multigraph: !0
|
|
5818
5910
|
}).setGraph({});
|
|
@@ -5823,26 +5915,26 @@ function xl(e) {
|
|
|
5823
5915
|
n.setNode(r, { rank: "same" }), e.reduce((e, t) => (n.setEdge(e, t, { style: "invis" }), t));
|
|
5824
5916
|
}), n;
|
|
5825
5917
|
}
|
|
5826
|
-
var
|
|
5827
|
-
graphlib:
|
|
5828
|
-
version:
|
|
5829
|
-
layout:
|
|
5830
|
-
debug:
|
|
5918
|
+
var wl = {
|
|
5919
|
+
graphlib: Xa,
|
|
5920
|
+
version: is,
|
|
5921
|
+
layout: Zc,
|
|
5922
|
+
debug: Cl,
|
|
5831
5923
|
util: {
|
|
5832
|
-
time:
|
|
5833
|
-
notime:
|
|
5924
|
+
time: Yo,
|
|
5925
|
+
notime: Xo
|
|
5834
5926
|
}
|
|
5835
|
-
},
|
|
5927
|
+
}, Tl = 172, El = 36, Dl = (e) => {
|
|
5836
5928
|
let { initialData: t } = e, n = N((e, t, n = "TB") => {
|
|
5837
|
-
let r = new
|
|
5929
|
+
let r = new wl.graphlib.Graph().setDefaultEdgeLabel(() => ({})), i = n === "LR";
|
|
5838
5930
|
return r.setGraph({ rankdir: n }), e.forEach((e) => {
|
|
5839
5931
|
r.setNode(e.id, {
|
|
5840
|
-
width:
|
|
5841
|
-
height:
|
|
5932
|
+
width: Tl,
|
|
5933
|
+
height: El
|
|
5842
5934
|
});
|
|
5843
5935
|
}), t.forEach((e) => {
|
|
5844
5936
|
r.setEdge(e.source, e.target);
|
|
5845
|
-
}),
|
|
5937
|
+
}), wl.layout(r), {
|
|
5846
5938
|
nodes: e.map((e) => {
|
|
5847
5939
|
let t = r.node(e.id);
|
|
5848
5940
|
return {
|
|
@@ -5850,8 +5942,8 @@ var Sl = {
|
|
|
5850
5942
|
targetPosition: i ? "left" : "top",
|
|
5851
5943
|
sourcePosition: i ? "right" : "bottom",
|
|
5852
5944
|
position: {
|
|
5853
|
-
x: t.x -
|
|
5854
|
-
y: t.y -
|
|
5945
|
+
x: t.x - Tl / 2,
|
|
5946
|
+
y: t.y - El / 2
|
|
5855
5947
|
}
|
|
5856
5948
|
};
|
|
5857
5949
|
}),
|
|
@@ -5893,7 +5985,7 @@ var Sl = {
|
|
|
5893
5985
|
}
|
|
5894
5986
|
p((t) => gt({
|
|
5895
5987
|
...e,
|
|
5896
|
-
id:
|
|
5988
|
+
id: Va()
|
|
5897
5989
|
}, t));
|
|
5898
5990
|
}, [p]),
|
|
5899
5991
|
onLayout: N((e) => {
|
|
@@ -5907,16 +5999,16 @@ var Sl = {
|
|
|
5907
5999
|
n
|
|
5908
6000
|
])
|
|
5909
6001
|
};
|
|
5910
|
-
},
|
|
5911
|
-
let e = _e(
|
|
6002
|
+
}, Ol = () => {
|
|
6003
|
+
let e = _e(Pa);
|
|
5912
6004
|
if (!e) throw Error("useHmFlow must be used within a HmFlowProvider");
|
|
5913
6005
|
return e;
|
|
5914
|
-
},
|
|
5915
|
-
let e = _e(
|
|
6006
|
+
}, kl = () => {
|
|
6007
|
+
let e = _e(Ma);
|
|
5916
6008
|
if (!e) throw Error("HmFlowChildrenDepsContext is not defined");
|
|
5917
6009
|
return e;
|
|
5918
|
-
},
|
|
5919
|
-
let { initialData: t, canvasConfig: n = {}, sideBarComponent: r, modalComponent: i, bottomComponent: a, headerComponent: o, onCanvasDoubleClick: s, onCanvasDoubleClicked: c, onNodeDoubleClick: l } = e, { miniMap: u = !1, controls: d = !1, background: f = !1, colorMode: p = "light" } = n || {}, [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(null), [b, x] = L(null), [S, C] = L(!1), [ee, te] = L({}), { nodeTypes: ne } =
|
|
6010
|
+
}, Al = (e) => {
|
|
6011
|
+
let { initialData: t, canvasConfig: n = {}, sideBarComponent: r, modalComponent: i, bottomComponent: a, headerComponent: o, onCanvasDoubleClick: s, onCanvasDoubleClicked: c, onNodeDoubleClick: l } = e, { miniMap: u = !1, controls: d = !1, background: f = !1, colorMode: p = "light" } = n || {}, [m, h] = L(!1), [g, _] = L(!1), [v, y] = L(null), [b, x] = L(null), [S, C] = L(!1), [ee, te] = L({}), { nodeTypes: ne } = Ol(), { nodes: re, setNodes: w, selectedNodes: ie, currentNode: T, setCurrentNode: E, edges: ae, setEdges: D, onNodesChange: oe, onEdgesChange: se, onConnect: ce, onLayout: le } = Dl({ initialData: t }), ue = I(null), { clickedPosition: O, setClickedPosition: k, screenToFlowPosition: de, toObject: A, setViewport: j } = La({
|
|
5920
6012
|
reactFlowWrapper: ue,
|
|
5921
6013
|
setDrawerOpened: h,
|
|
5922
6014
|
setCurrentTab: y
|
|
@@ -6003,10 +6095,10 @@ var Sl = {
|
|
|
6003
6095
|
s,
|
|
6004
6096
|
c
|
|
6005
6097
|
]), ve = N((e, t) => l(e, t, M), [l, M]);
|
|
6006
|
-
return /* @__PURE__ */ B(
|
|
6098
|
+
return /* @__PURE__ */ B(Na, {
|
|
6007
6099
|
deps: M,
|
|
6008
6100
|
children: /* @__PURE__ */ V("div", {
|
|
6009
|
-
className:
|
|
6101
|
+
className: ja.root,
|
|
6010
6102
|
ref: ue,
|
|
6011
6103
|
onDoubleClick: _e,
|
|
6012
6104
|
children: [
|
|
@@ -6049,20 +6141,20 @@ var Sl = {
|
|
|
6049
6141
|
]
|
|
6050
6142
|
})
|
|
6051
6143
|
});
|
|
6052
|
-
},
|
|
6144
|
+
}, jl = {
|
|
6053
6145
|
root: "_root_1w7dz_1",
|
|
6054
6146
|
status: "_status_1w7dz_21",
|
|
6055
6147
|
inner: "_inner_1w7dz_63",
|
|
6056
6148
|
title: "_title_1w7dz_86"
|
|
6057
|
-
},
|
|
6058
|
-
let { title: n, textStatus: i, color: a = "green", actions: o } = t, { deps: s } =
|
|
6149
|
+
}, Ml = (t) => {
|
|
6150
|
+
let { title: n, textStatus: i, color: a = "green", actions: o } = t, { deps: s } = kl(), c = F(() => o.find((e) => e.type === "edit"), [o]), l = N((e) => () => {
|
|
6059
6151
|
e.onClick({ deps: s });
|
|
6060
6152
|
}, [s]);
|
|
6061
6153
|
return /* @__PURE__ */ B("div", {
|
|
6062
|
-
className:
|
|
6154
|
+
className: jl.root,
|
|
6063
6155
|
"data-status": a,
|
|
6064
6156
|
children: /* @__PURE__ */ V("div", {
|
|
6065
|
-
className:
|
|
6157
|
+
className: jl.inner,
|
|
6066
6158
|
children: [
|
|
6067
6159
|
c && /* @__PURE__ */ B(e, {
|
|
6068
6160
|
variant: "subtle",
|
|
@@ -6070,30 +6162,30 @@ var Sl = {
|
|
|
6070
6162
|
children: c.icon
|
|
6071
6163
|
}),
|
|
6072
6164
|
/* @__PURE__ */ B("h2", {
|
|
6073
|
-
className:
|
|
6165
|
+
className: jl.title,
|
|
6074
6166
|
children: n
|
|
6075
6167
|
}),
|
|
6076
6168
|
/* @__PURE__ */ B(r, {
|
|
6077
|
-
className:
|
|
6169
|
+
className: jl.status,
|
|
6078
6170
|
"data-status": a,
|
|
6079
6171
|
children: i
|
|
6080
6172
|
})
|
|
6081
6173
|
]
|
|
6082
6174
|
})
|
|
6083
6175
|
});
|
|
6084
|
-
},
|
|
6176
|
+
}, Nl = (e) => {
|
|
6085
6177
|
let { items: t } = e;
|
|
6086
6178
|
return /* @__PURE__ */ B("div", { children: t.map((e) => {
|
|
6087
6179
|
let { component: t, name: n } = e;
|
|
6088
6180
|
return /* @__PURE__ */ B(t, {}, n);
|
|
6089
6181
|
}) });
|
|
6090
|
-
},
|
|
6182
|
+
}, Pl = (e) => {
|
|
6091
6183
|
let { items: t } = e;
|
|
6092
6184
|
return /* @__PURE__ */ B("div", { children: t.map((e) => {
|
|
6093
6185
|
let { component: t, name: n } = e;
|
|
6094
6186
|
return /* @__PURE__ */ B(t, {}, n);
|
|
6095
6187
|
}) });
|
|
6096
|
-
},
|
|
6188
|
+
}, Fl = (e) => {
|
|
6097
6189
|
let { modalOpened: t, items: n, currentModalTab: r, testMode: i = !1, setModalOpened: a } = e;
|
|
6098
6190
|
return /* @__PURE__ */ B(_, {
|
|
6099
6191
|
radius: "lg",
|
|
@@ -6120,7 +6212,7 @@ var Sl = {
|
|
|
6120
6212
|
})]
|
|
6121
6213
|
})
|
|
6122
6214
|
});
|
|
6123
|
-
},
|
|
6215
|
+
}, Il = (e) => {
|
|
6124
6216
|
let { drawerOpened: t, items: n, onDrawerClose: r, currentTab: i, testMode: a = !1 } = e, [o, s] = L(i);
|
|
6125
6217
|
return /* @__PURE__ */ B(l, {
|
|
6126
6218
|
opened: t,
|
|
@@ -6150,14 +6242,14 @@ var Sl = {
|
|
|
6150
6242
|
})]
|
|
6151
6243
|
})
|
|
6152
6244
|
});
|
|
6153
|
-
},
|
|
6245
|
+
}, Ll = {
|
|
6154
6246
|
editor: "_editor_1eind_1",
|
|
6155
6247
|
icon: "_icon_1eind_5",
|
|
6156
6248
|
label: "_label_1eind_11",
|
|
6157
6249
|
input: "_input_1eind_18",
|
|
6158
6250
|
dropdown: "_dropdown_1eind_22"
|
|
6159
|
-
},
|
|
6160
|
-
let { onUpdateNode: t } = e, { deps: n } =
|
|
6251
|
+
}, Rl = (e) => {
|
|
6252
|
+
let { onUpdateNode: t } = e, { deps: n } = kl(), { setCurrentNode: i, currentNode: a } = n, [o, s] = L(a?.data || {});
|
|
6161
6253
|
if (P(() => {
|
|
6162
6254
|
s(a?.data || {});
|
|
6163
6255
|
}, [a?.data]), !a || !a.data) return console.warn("currentNode ou ses données ne sont pas disponibles."), null;
|
|
@@ -6175,7 +6267,7 @@ var Sl = {
|
|
|
6175
6267
|
...o.parameters,
|
|
6176
6268
|
[e]: {
|
|
6177
6269
|
...o.parameters[e],
|
|
6178
|
-
value:
|
|
6270
|
+
value: zl(o.parameters[e].type, t)
|
|
6179
6271
|
}
|
|
6180
6272
|
}, r = {
|
|
6181
6273
|
...o,
|
|
@@ -6196,18 +6288,18 @@ var Sl = {
|
|
|
6196
6288
|
}
|
|
6197
6289
|
};
|
|
6198
6290
|
return /* @__PURE__ */ V(r, {
|
|
6199
|
-
className:
|
|
6291
|
+
className: Ll.nodeEditor,
|
|
6200
6292
|
children: [/* @__PURE__ */ B(p, {
|
|
6201
6293
|
gap: 8,
|
|
6202
|
-
className:
|
|
6294
|
+
className: Ll.label,
|
|
6203
6295
|
children: /* @__PURE__ */ B(g, {
|
|
6204
6296
|
leftSection: /* @__PURE__ */ B(h, {
|
|
6205
6297
|
src: o.icon,
|
|
6206
6298
|
alt: o.label,
|
|
6207
|
-
className:
|
|
6299
|
+
className: Ll.icon
|
|
6208
6300
|
}),
|
|
6209
6301
|
value: o.label,
|
|
6210
|
-
classNames: { input:
|
|
6302
|
+
classNames: { input: Ll.input },
|
|
6211
6303
|
onChange: (e) => c(e.currentTarget.value),
|
|
6212
6304
|
onBlur: u,
|
|
6213
6305
|
placeholder: "Enter node label",
|
|
@@ -6231,7 +6323,7 @@ var Sl = {
|
|
|
6231
6323
|
}, e))
|
|
6232
6324
|
})]
|
|
6233
6325
|
});
|
|
6234
|
-
},
|
|
6326
|
+
}, zl = (e, t) => {
|
|
6235
6327
|
switch (e) {
|
|
6236
6328
|
case "number": return Number(t);
|
|
6237
6329
|
case "string": return String(t);
|
|
@@ -6249,19 +6341,19 @@ var Sl = {
|
|
|
6249
6341
|
}
|
|
6250
6342
|
default: return t;
|
|
6251
6343
|
}
|
|
6252
|
-
},
|
|
6344
|
+
}, Bl = {
|
|
6253
6345
|
icon: "_icon_ikk9o_1",
|
|
6254
6346
|
inner: "_inner_ikk9o_7",
|
|
6255
6347
|
nodeItem: "_nodeItem_ikk9o_11"
|
|
6256
|
-
},
|
|
6257
|
-
className:
|
|
6348
|
+
}, Vl = ({ img: e, label: t, onSelect: n }) => /* @__PURE__ */ V(p, {
|
|
6349
|
+
className: Bl.nodeItem,
|
|
6258
6350
|
onClick: () => n(t),
|
|
6259
6351
|
children: [/* @__PURE__ */ B(h, {
|
|
6260
6352
|
src: e,
|
|
6261
|
-
className:
|
|
6353
|
+
className: Bl.icon
|
|
6262
6354
|
}), /* @__PURE__ */ B("p", { children: t })]
|
|
6263
|
-
}),
|
|
6264
|
-
let { searchItems: t, actions: n } = e, { deps: r } =
|
|
6355
|
+
}), Hl = (e) => {
|
|
6356
|
+
let { searchItems: t, actions: n } = e, { deps: r } = kl(), [i, a] = L(""), o = F(() => {
|
|
6265
6357
|
let e = i.trim().toLowerCase();
|
|
6266
6358
|
return t.filter((t) => t.data.label.toLowerCase().includes(e));
|
|
6267
6359
|
}, [t, i]), s = N((e) => {
|
|
@@ -6277,18 +6369,18 @@ var Sl = {
|
|
|
6277
6369
|
className: "space-y-0",
|
|
6278
6370
|
children: o.map((e) => {
|
|
6279
6371
|
let { id: t, data: { icon: n, label: i } } = e;
|
|
6280
|
-
return /* @__PURE__ */ B(
|
|
6372
|
+
return /* @__PURE__ */ B(Vl, {
|
|
6281
6373
|
img: n,
|
|
6282
6374
|
label: i,
|
|
6283
6375
|
onSelect: () => s({
|
|
6284
|
-
node:
|
|
6376
|
+
node: Kl(e),
|
|
6285
6377
|
deps: r
|
|
6286
6378
|
})
|
|
6287
6379
|
}, t);
|
|
6288
6380
|
})
|
|
6289
6381
|
})] });
|
|
6290
|
-
},
|
|
6291
|
-
let { meta: t, submitButtonText: n, defaultValues: a, onSubmit: o } = e, { deps: s } =
|
|
6382
|
+
}, Ul = (e) => {
|
|
6383
|
+
let { meta: t, submitButtonText: n, defaultValues: a, onSubmit: o } = e, { deps: s } = kl(), c = Ce({
|
|
6292
6384
|
mode: "onSubmit",
|
|
6293
6385
|
reValidateMode: "onSubmit",
|
|
6294
6386
|
defaultValues: a
|
|
@@ -6312,7 +6404,7 @@ var Sl = {
|
|
|
6312
6404
|
})]
|
|
6313
6405
|
})
|
|
6314
6406
|
}) });
|
|
6315
|
-
},
|
|
6407
|
+
}, Wl = {
|
|
6316
6408
|
root: "_root_dcerz_1",
|
|
6317
6409
|
inner: "_inner_dcerz_8",
|
|
6318
6410
|
rightActions: "_rightActions_dcerz_15",
|
|
@@ -6320,23 +6412,23 @@ var Sl = {
|
|
|
6320
6412
|
mainAction: "_mainAction_dcerz_38",
|
|
6321
6413
|
execute: "_execute_dcerz_1",
|
|
6322
6414
|
mainInner: "_mainInner_dcerz_64"
|
|
6323
|
-
},
|
|
6324
|
-
let { actions: n } = t, { deps: i } =
|
|
6415
|
+
}, Gl = (t) => {
|
|
6416
|
+
let { actions: n } = t, { deps: i } = kl(), a = N((e) => () => {
|
|
6325
6417
|
e.onClick({ deps: i });
|
|
6326
6418
|
}, [i]), o = F(() => n.filter((e) => e.position === "right"), [n]), s = F(() => n.find((e) => e.position === "main"), [n]);
|
|
6327
6419
|
return /* @__PURE__ */ V("div", {
|
|
6328
|
-
className:
|
|
6420
|
+
className: Wl.root,
|
|
6329
6421
|
children: [s && /* @__PURE__ */ B("div", {
|
|
6330
|
-
className:
|
|
6422
|
+
className: Wl.mainAction,
|
|
6331
6423
|
children: /* @__PURE__ */ B("div", {
|
|
6332
|
-
className:
|
|
6424
|
+
className: Wl.mainInner,
|
|
6333
6425
|
onClick: a(s),
|
|
6334
6426
|
children: s.icon
|
|
6335
6427
|
})
|
|
6336
6428
|
}, s.name), /* @__PURE__ */ B("div", {
|
|
6337
|
-
className:
|
|
6429
|
+
className: Wl.inner,
|
|
6338
6430
|
children: /* @__PURE__ */ B(r, {
|
|
6339
|
-
className:
|
|
6431
|
+
className: Wl.rightActions,
|
|
6340
6432
|
children: o.map((t) => /* @__PURE__ */ B(e, {
|
|
6341
6433
|
size: 40,
|
|
6342
6434
|
radius: 800,
|
|
@@ -6348,7 +6440,7 @@ var Sl = {
|
|
|
6348
6440
|
})
|
|
6349
6441
|
})]
|
|
6350
6442
|
});
|
|
6351
|
-
},
|
|
6443
|
+
}, Kl = (e) => ({
|
|
6352
6444
|
...e,
|
|
6353
6445
|
dragging: !1,
|
|
6354
6446
|
isConnectable: !0,
|
|
@@ -6359,7 +6451,7 @@ var Sl = {
|
|
|
6359
6451
|
deletable: !0,
|
|
6360
6452
|
selected: !1,
|
|
6361
6453
|
draggable: !0
|
|
6362
|
-
}),
|
|
6454
|
+
}), ql = {
|
|
6363
6455
|
root: "_root_1ec6v_1",
|
|
6364
6456
|
main: "_main_1ec6v_5",
|
|
6365
6457
|
inner: "_inner_1ec6v_18",
|
|
@@ -6369,8 +6461,8 @@ var Sl = {
|
|
|
6369
6461
|
handle: "_handle_1ec6v_62",
|
|
6370
6462
|
dropdown: "_dropdown_1ec6v_74",
|
|
6371
6463
|
add: "_add_1ec6v_85"
|
|
6372
|
-
},
|
|
6373
|
-
let { id: n, selected: i, data: a, ...o } = t, { actions: s, ...c } = a, { deps: l } =
|
|
6464
|
+
}, Jl = (t) => {
|
|
6465
|
+
let { id: n, selected: i, data: a, ...o } = t, { actions: s, ...c } = a, { deps: l } = kl(), u = ["add", "selectSearchItem"], d = xt((e) => e.edges), f = F(() => d.some((e) => e.source === n), [d, n]), g = N((e) => {
|
|
6374
6466
|
let t = s.find((e) => e.type === "add");
|
|
6375
6467
|
t && t.onClick(e);
|
|
6376
6468
|
}, [s]), _ = N((e) => {
|
|
@@ -6381,24 +6473,24 @@ var Sl = {
|
|
|
6381
6473
|
});
|
|
6382
6474
|
}, []);
|
|
6383
6475
|
return /* @__PURE__ */ V("div", {
|
|
6384
|
-
className:
|
|
6476
|
+
className: ql.root,
|
|
6385
6477
|
children: [
|
|
6386
6478
|
/* @__PURE__ */ B(m, {
|
|
6387
|
-
classNames: { dropdown:
|
|
6479
|
+
classNames: { dropdown: ql.dropdown },
|
|
6388
6480
|
radius: 400,
|
|
6389
6481
|
shadow: "md",
|
|
6390
6482
|
children: /* @__PURE__ */ B("div", {
|
|
6391
|
-
className:
|
|
6483
|
+
className: ql.main,
|
|
6392
6484
|
children: /* @__PURE__ */ V("div", {
|
|
6393
|
-
className:
|
|
6485
|
+
className: ql.inner,
|
|
6394
6486
|
children: [
|
|
6395
6487
|
/* @__PURE__ */ B(m.Target, { children: /* @__PURE__ */ B(r, {
|
|
6396
6488
|
mod: { "data-selected": i },
|
|
6397
|
-
className:
|
|
6489
|
+
className: ql.section,
|
|
6398
6490
|
style: { "--hover-color": c.color },
|
|
6399
6491
|
children: /* @__PURE__ */ B(h, {
|
|
6400
6492
|
src: c.icon,
|
|
6401
|
-
className:
|
|
6493
|
+
className: ql.icon
|
|
6402
6494
|
})
|
|
6403
6495
|
}) }),
|
|
6404
6496
|
/* @__PURE__ */ B(m.Dropdown, { children: s && /* @__PURE__ */ B(p, {
|
|
@@ -6418,7 +6510,7 @@ var Sl = {
|
|
|
6418
6510
|
}, r))
|
|
6419
6511
|
}) }),
|
|
6420
6512
|
/* @__PURE__ */ B("h3", {
|
|
6421
|
-
className:
|
|
6513
|
+
className: ql.label,
|
|
6422
6514
|
children: c.label
|
|
6423
6515
|
})
|
|
6424
6516
|
]
|
|
@@ -6426,7 +6518,7 @@ var Sl = {
|
|
|
6426
6518
|
})
|
|
6427
6519
|
}),
|
|
6428
6520
|
!f && /* @__PURE__ */ B("button", {
|
|
6429
|
-
className:
|
|
6521
|
+
className: ql.add,
|
|
6430
6522
|
onClick: () => {
|
|
6431
6523
|
g({
|
|
6432
6524
|
node: t,
|
|
@@ -6436,7 +6528,7 @@ var Sl = {
|
|
|
6436
6528
|
children: /* @__PURE__ */ B(Fe, { size: 200 })
|
|
6437
6529
|
}),
|
|
6438
6530
|
/* @__PURE__ */ B("div", {
|
|
6439
|
-
className:
|
|
6531
|
+
className: ql.handle,
|
|
6440
6532
|
children: /* @__PURE__ */ B(ut, {
|
|
6441
6533
|
type: "source",
|
|
6442
6534
|
position: pt.Right,
|
|
@@ -6444,7 +6536,7 @@ var Sl = {
|
|
|
6444
6536
|
})
|
|
6445
6537
|
}),
|
|
6446
6538
|
/* @__PURE__ */ B("div", {
|
|
6447
|
-
className:
|
|
6539
|
+
className: ql.handle,
|
|
6448
6540
|
children: /* @__PURE__ */ B(ut, {
|
|
6449
6541
|
type: "target",
|
|
6450
6542
|
position: pt.Left,
|
|
@@ -6454,7 +6546,7 @@ var Sl = {
|
|
|
6454
6546
|
})
|
|
6455
6547
|
]
|
|
6456
6548
|
});
|
|
6457
|
-
},
|
|
6549
|
+
}, Yl = (e) => {
|
|
6458
6550
|
let { NodeType: t, actions: n, data: r, ...i } = e;
|
|
6459
6551
|
return /* @__PURE__ */ B(t, {
|
|
6460
6552
|
data: {
|
|
@@ -6463,7 +6555,7 @@ var Sl = {
|
|
|
6463
6555
|
},
|
|
6464
6556
|
...i
|
|
6465
6557
|
});
|
|
6466
|
-
},
|
|
6558
|
+
}, Xl = [
|
|
6467
6559
|
{
|
|
6468
6560
|
label: "Edit",
|
|
6469
6561
|
type: "edit",
|
|
@@ -6525,7 +6617,7 @@ var Sl = {
|
|
|
6525
6617
|
console.log("add");
|
|
6526
6618
|
}
|
|
6527
6619
|
}
|
|
6528
|
-
],
|
|
6620
|
+
], Zl = [
|
|
6529
6621
|
{
|
|
6530
6622
|
name: "Execute",
|
|
6531
6623
|
type: "run",
|
|
@@ -6562,7 +6654,7 @@ var Sl = {
|
|
|
6562
6654
|
console.log("trash");
|
|
6563
6655
|
}
|
|
6564
6656
|
}
|
|
6565
|
-
],
|
|
6657
|
+
], Ql = [{
|
|
6566
6658
|
name: "Edit Canvas Config",
|
|
6567
6659
|
type: "edit",
|
|
6568
6660
|
icon: /* @__PURE__ */ B(Ne, {
|
|
@@ -6570,7 +6662,7 @@ var Sl = {
|
|
|
6570
6662
|
stroke: 1.5
|
|
6571
6663
|
}),
|
|
6572
6664
|
onClick: () => {}
|
|
6573
|
-
}],
|
|
6665
|
+
}], $l = [{
|
|
6574
6666
|
name: "Flow Metadata",
|
|
6575
6667
|
fields: [
|
|
6576
6668
|
{
|
|
@@ -6595,35 +6687,35 @@ var Sl = {
|
|
|
6595
6687
|
}
|
|
6596
6688
|
}
|
|
6597
6689
|
]
|
|
6598
|
-
}],
|
|
6599
|
-
let { searchItems: t, defaultHmFlowData: n, canvasConfig: r = {}, textStatus: i, color: a, onHmflowSave: o, onHmflowRun: s, onCanvasDoubleClicked: c, onHmflowDelete: l } = e, { actions: u, onNodeDoubleClick: d, onUpdateNode: f, searchNode: p } =
|
|
6600
|
-
bottomActions:
|
|
6601
|
-
headerActions:
|
|
6690
|
+
}], eu = (e) => {
|
|
6691
|
+
let { searchItems: t, defaultHmFlowData: n, canvasConfig: r = {}, textStatus: i, color: a, onHmflowSave: o, onHmflowRun: s, onCanvasDoubleClicked: c, onHmflowDelete: l } = e, { actions: u, onNodeDoubleClick: d, onUpdateNode: f, searchNode: p } = Wa({ defaultActions: Xl }), { bottomAction: m, headerAction: h, hmflowData: g } = Ga({
|
|
6692
|
+
bottomActions: Zl,
|
|
6693
|
+
headerActions: Ql,
|
|
6602
6694
|
onHmflowSave: o,
|
|
6603
6695
|
onHmflowRun: s,
|
|
6604
6696
|
onHmflowDelete: l,
|
|
6605
6697
|
defaultHmFlowMetadata: n.metadata
|
|
6606
|
-
}), _ = F(() => ({ pyNode: (e) => /* @__PURE__ */ B(
|
|
6698
|
+
}), _ = F(() => ({ pyNode: (e) => /* @__PURE__ */ B(Yl, {
|
|
6607
6699
|
...e,
|
|
6608
|
-
NodeType:
|
|
6700
|
+
NodeType: Jl,
|
|
6609
6701
|
actions: u
|
|
6610
6702
|
}) }), [u]), v = [{
|
|
6611
6703
|
name: "nodesSearch",
|
|
6612
|
-
component: () => /* @__PURE__ */ B(
|
|
6704
|
+
component: () => /* @__PURE__ */ B(Hl, {
|
|
6613
6705
|
searchItems: t,
|
|
6614
6706
|
actions: u
|
|
6615
6707
|
})
|
|
6616
6708
|
}, {
|
|
6617
6709
|
name: "flowFormMetadata",
|
|
6618
|
-
component: () => /* @__PURE__ */ B(
|
|
6710
|
+
component: () => /* @__PURE__ */ B(Ul, {
|
|
6619
6711
|
submitButtonText: "Update",
|
|
6620
|
-
meta:
|
|
6712
|
+
meta: $l,
|
|
6621
6713
|
defaultValues: g.current.metadata,
|
|
6622
6714
|
onSubmit: (e) => g.current.metadata = e
|
|
6623
6715
|
})
|
|
6624
6716
|
}], y = F(() => [{
|
|
6625
6717
|
name: "headerStatus",
|
|
6626
|
-
component: () => /* @__PURE__ */ B(
|
|
6718
|
+
component: () => /* @__PURE__ */ B(Ml, {
|
|
6627
6719
|
title: g.current.metadata.name,
|
|
6628
6720
|
textStatus: i,
|
|
6629
6721
|
color: a,
|
|
@@ -6635,14 +6727,14 @@ var Sl = {
|
|
|
6635
6727
|
h
|
|
6636
6728
|
]), b = F(() => [{
|
|
6637
6729
|
name: "toolbar",
|
|
6638
|
-
component: () => /* @__PURE__ */ B(
|
|
6730
|
+
component: () => /* @__PURE__ */ B(Gl, { actions: m })
|
|
6639
6731
|
}], [m]), x = [{
|
|
6640
6732
|
name: "nodeEditor",
|
|
6641
|
-
component: () => /* @__PURE__ */ B(
|
|
6642
|
-
}], S = N(() => /* @__PURE__ */ B(
|
|
6643
|
-
return /* @__PURE__ */ B(
|
|
6733
|
+
component: () => /* @__PURE__ */ B(Rl, { onUpdateNode: f })
|
|
6734
|
+
}], S = N(() => /* @__PURE__ */ B(Pl, { items: y }), [y]), C = N(() => /* @__PURE__ */ B(Nl, { items: b }), [b]);
|
|
6735
|
+
return /* @__PURE__ */ B(Ia, {
|
|
6644
6736
|
nodeTypes: _,
|
|
6645
|
-
children: /* @__PURE__ */ B(
|
|
6737
|
+
children: /* @__PURE__ */ B(Al, {
|
|
6646
6738
|
initialData: F(() => ({
|
|
6647
6739
|
edges: n.edges,
|
|
6648
6740
|
nodes: n.nodes
|
|
@@ -6651,26 +6743,26 @@ var Sl = {
|
|
|
6651
6743
|
onCanvasDoubleClicked: c,
|
|
6652
6744
|
onCanvasDoubleClick: p,
|
|
6653
6745
|
onNodeDoubleClick: d,
|
|
6654
|
-
sideBarComponent: ({ ...e }) => /* @__PURE__ */ B(
|
|
6746
|
+
sideBarComponent: ({ ...e }) => /* @__PURE__ */ B(Il, {
|
|
6655
6747
|
...e,
|
|
6656
6748
|
items: v
|
|
6657
6749
|
}),
|
|
6658
6750
|
headerComponent: S,
|
|
6659
6751
|
bottomComponent: C,
|
|
6660
|
-
modalComponent: ({ ...e }) => /* @__PURE__ */ B(
|
|
6752
|
+
modalComponent: ({ ...e }) => /* @__PURE__ */ B(Fl, {
|
|
6661
6753
|
...e,
|
|
6662
6754
|
items: x
|
|
6663
6755
|
})
|
|
6664
6756
|
})
|
|
6665
6757
|
});
|
|
6666
|
-
},
|
|
6758
|
+
}, tu = {
|
|
6667
6759
|
dots: ct.Dots,
|
|
6668
6760
|
cross: ct.Cross,
|
|
6669
6761
|
lines: ct.Lines
|
|
6670
|
-
},
|
|
6762
|
+
}, nu = {
|
|
6671
6763
|
parameterRoot: "_parameterRoot_1e1qy_1",
|
|
6672
6764
|
fieldset: "_fieldset_1e1qy_7"
|
|
6673
|
-
},
|
|
6765
|
+
}, ru = [
|
|
6674
6766
|
{
|
|
6675
6767
|
value: "string",
|
|
6676
6768
|
label: "string"
|
|
@@ -6695,12 +6787,12 @@ var Sl = {
|
|
|
6695
6787
|
value: "object",
|
|
6696
6788
|
label: "object"
|
|
6697
6789
|
}
|
|
6698
|
-
],
|
|
6699
|
-
className:
|
|
6790
|
+
], iu = ({ index: e, param: t, onUpdate: n, onDelete: a }) => /* @__PURE__ */ B(r, {
|
|
6791
|
+
className: nu.parameterRoot,
|
|
6700
6792
|
mt: "md",
|
|
6701
6793
|
children: /* @__PURE__ */ V(u, {
|
|
6702
6794
|
legend: `Parameter ${e + 1}`,
|
|
6703
|
-
className:
|
|
6795
|
+
className: nu.fieldset,
|
|
6704
6796
|
children: [
|
|
6705
6797
|
/* @__PURE__ */ V(w, {
|
|
6706
6798
|
gap: 6,
|
|
@@ -6721,7 +6813,7 @@ var Sl = {
|
|
|
6721
6813
|
label: "Type parameter",
|
|
6722
6814
|
placeholder: "Select type",
|
|
6723
6815
|
radius: "md",
|
|
6724
|
-
data:
|
|
6816
|
+
data: ru,
|
|
6725
6817
|
value: t.type,
|
|
6726
6818
|
onChange: (t) => n(e, "type", t || "")
|
|
6727
6819
|
}),
|
|
@@ -6769,15 +6861,15 @@ var Sl = {
|
|
|
6769
6861
|
})
|
|
6770
6862
|
]
|
|
6771
6863
|
})
|
|
6772
|
-
}),
|
|
6864
|
+
}), au = {
|
|
6773
6865
|
name: "",
|
|
6774
6866
|
label: "",
|
|
6775
6867
|
icon: null,
|
|
6776
6868
|
color: "",
|
|
6777
6869
|
version: "",
|
|
6778
6870
|
description: ""
|
|
6779
|
-
},
|
|
6780
|
-
let [e, t] = L(
|
|
6871
|
+
}, ou = () => {
|
|
6872
|
+
let [e, t] = L(au), [n, r] = L([]), [i, a] = L(null);
|
|
6781
6873
|
return {
|
|
6782
6874
|
formValues: e,
|
|
6783
6875
|
updateFormValue: (e, n) => {
|
|
@@ -6808,11 +6900,11 @@ var Sl = {
|
|
|
6808
6900
|
wasmFile: i,
|
|
6809
6901
|
setWasmFile: a,
|
|
6810
6902
|
resetForm: () => {
|
|
6811
|
-
t(
|
|
6903
|
+
t(au), r([]), a(null);
|
|
6812
6904
|
}
|
|
6813
6905
|
};
|
|
6814
|
-
},
|
|
6815
|
-
let { wasmFile: n, parameters: a, formValues: o, updateFormValue: s, addParameter: l, updateParameter: u, deleteParameter: f, setWasmFile: p } =
|
|
6906
|
+
}, su = ({ submitButtonText: e, onSubmit: t }) => {
|
|
6907
|
+
let { wasmFile: n, parameters: a, formValues: o, updateFormValue: s, addParameter: l, updateParameter: u, deleteParameter: f, setWasmFile: p } = ou(), [m, h] = L("");
|
|
6816
6908
|
return P(() => {
|
|
6817
6909
|
if (!o.icon) return;
|
|
6818
6910
|
let e = URL.createObjectURL(o.icon);
|
|
@@ -6884,7 +6976,7 @@ var Sl = {
|
|
|
6884
6976
|
mt: "md",
|
|
6885
6977
|
children: "Add Parameter"
|
|
6886
6978
|
}),
|
|
6887
|
-
a.map((e, t) => /* @__PURE__ */ B(
|
|
6979
|
+
a.map((e, t) => /* @__PURE__ */ B(iu, {
|
|
6888
6980
|
index: t,
|
|
6889
6981
|
param: e,
|
|
6890
6982
|
onUpdate: u,
|
|
@@ -6902,4 +6994,4 @@ var Sl = {
|
|
|
6902
6994
|
});
|
|
6903
6995
|
};
|
|
6904
6996
|
//#endregion
|
|
6905
|
-
export {
|
|
6997
|
+
export { Ea as AppLayout, ba as BottomBar, Pn as CNDIcon, jn as ChartBuilder, gn as ChartContainer, su as CreateNodeForm, fa as FlowCard, Yt as FormBuilder, Fn as FuncdLogo, In as FuncdWordmark, mn as HMChart, ua as HMDataGrid, Bn as HMDrawer, Oa as HMThemeProvider, eu as HmFlow, tu as HmFlowBackgroundVariant, Al as HmFlowBase, Ia as HmFlowProvider, Ln as NavBarLink, Yl as NodeWrapper, Jl as PyNode, Nt as ReactiveAutocomplete, Sn as ReactiveBarChart, Pt as ReactiveCheckbox, Nn as ReactiveDashboard, an as ReactiveForm, Cn as ReactiveLineChart, $t as ReactiveListField, Mt as ReactiveMultiSelect, Ft as ReactiveNumberField, It as ReactivePasswordField, wn as ReactivePieChart, Lt as ReactiveRadio, Rt as ReactiveRange, zt as ReactiveSelect, Bt as ReactiveSwitch, Vt as ReactiveTextField, Ht as ReactiveTextareaField, ia as RowHeight, Rn as SearchBar, ha as SideBar, Un as StatsRing, zn as ToggleThemeMode, Aa as cssVarResolver, Xl as defaultActions, Dt as errorParser, Tt as errorResponse, jt as errorsArrayToObject, kt as fieldRegex, Ct as flattenObj, _n as getChartAxisType, At as getError, q as getMantineError, St as getValuePath, au as initialFormValues, wt as isResolved, yn as mergeChartOptions, Kl as pyNodeToNodeProps, ka as pyTheme, Et as response, xn as useChartRows, ou as useCreateNodeForm, Ol as useHmFlow, kl as useHmFlowChildrenDeps, La as useHmFlowInteractions, Ga as useHmFlowService, Dl as useNodeAndEdgeHandlers, Wa as useNodesService, Ot as wait };
|