themed-markdown 0.1.83 → 0.1.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +52 -3355
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -4334,3312 +4334,8 @@ var IndustryMarkdownSlide = React13.memo(function IndustryMarkdownSlide2({
|
|
|
4334
4334
|
theme: theme2
|
|
4335
4335
|
}));
|
|
4336
4336
|
});
|
|
4337
|
-
// node_modules/@principal-ade/panels/dist/index.esm.js
|
|
4338
|
-
import { jsx as e, jsxs as t, Fragment as n } from "react/jsx-runtime";
|
|
4339
|
-
import r, { useState as o, useRef as l, useCallback as i, useEffect as a, createContext as s, useContext as c, forwardRef as d, useImperativeHandle as u, useMemo as p, useLayoutEffect as h, memo as g, useReducer as m } from "react";
|
|
4340
|
-
|
|
4341
|
-
// node_modules/react-resizable-panels/dist/react-resizable-panels.js
|
|
4342
|
-
import { jsx as ie } from "react/jsx-runtime";
|
|
4343
|
-
import { useState as re, useCallback as ne, useId as pt, useLayoutEffect as We, useEffect as pe, useRef as T, createContext as ht, useImperativeHandle as Ue, useMemo as ge, useSyncExternalStore as Ke, useContext as mt } from "react";
|
|
4344
|
-
"use client";
|
|
4345
|
-
function gt(e, t) {
|
|
4346
|
-
const n = getComputedStyle(e), o = parseFloat(n.fontSize);
|
|
4347
|
-
return t * o;
|
|
4348
|
-
}
|
|
4349
|
-
function yt(e, t) {
|
|
4350
|
-
const n = getComputedStyle(e.ownerDocument.body), o = parseFloat(n.fontSize);
|
|
4351
|
-
return t * o;
|
|
4352
|
-
}
|
|
4353
|
-
function St(e) {
|
|
4354
|
-
return e / 100 * window.innerHeight;
|
|
4355
|
-
}
|
|
4356
|
-
function vt(e) {
|
|
4357
|
-
return e / 100 * window.innerWidth;
|
|
4358
|
-
}
|
|
4359
|
-
function zt(e) {
|
|
4360
|
-
switch (typeof e) {
|
|
4361
|
-
case "number":
|
|
4362
|
-
return [e, "px"];
|
|
4363
|
-
case "string": {
|
|
4364
|
-
const t = parseFloat(e);
|
|
4365
|
-
return e.endsWith("%") ? [t, "%"] : e.endsWith("px") ? [t, "px"] : e.endsWith("rem") ? [t, "rem"] : e.endsWith("em") ? [t, "em"] : e.endsWith("vh") ? [t, "vh"] : e.endsWith("vw") ? [t, "vw"] : [t, "%"];
|
|
4366
|
-
}
|
|
4367
|
-
}
|
|
4368
|
-
}
|
|
4369
|
-
function te({
|
|
4370
|
-
groupSize: e,
|
|
4371
|
-
panelElement: t,
|
|
4372
|
-
styleProp: n
|
|
4373
|
-
}) {
|
|
4374
|
-
let o;
|
|
4375
|
-
const [i, s] = zt(n);
|
|
4376
|
-
switch (s) {
|
|
4377
|
-
case "%": {
|
|
4378
|
-
o = i / 100 * e;
|
|
4379
|
-
break;
|
|
4380
|
-
}
|
|
4381
|
-
case "px": {
|
|
4382
|
-
o = i;
|
|
4383
|
-
break;
|
|
4384
|
-
}
|
|
4385
|
-
case "rem": {
|
|
4386
|
-
o = yt(t, i);
|
|
4387
|
-
break;
|
|
4388
|
-
}
|
|
4389
|
-
case "em": {
|
|
4390
|
-
o = gt(t, i);
|
|
4391
|
-
break;
|
|
4392
|
-
}
|
|
4393
|
-
case "vh": {
|
|
4394
|
-
o = St(i);
|
|
4395
|
-
break;
|
|
4396
|
-
}
|
|
4397
|
-
case "vw": {
|
|
4398
|
-
o = vt(i);
|
|
4399
|
-
break;
|
|
4400
|
-
}
|
|
4401
|
-
}
|
|
4402
|
-
return o;
|
|
4403
|
-
}
|
|
4404
|
-
function D(e) {
|
|
4405
|
-
return parseFloat(e.toFixed(3));
|
|
4406
|
-
}
|
|
4407
|
-
function Q({
|
|
4408
|
-
group: e
|
|
4409
|
-
}) {
|
|
4410
|
-
const { orientation: t, panels: n } = e;
|
|
4411
|
-
return n.reduce((o, i) => (o += t === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, o), 0);
|
|
4412
|
-
}
|
|
4413
|
-
function ye(e) {
|
|
4414
|
-
const { panels: t } = e, n = Q({ group: e });
|
|
4415
|
-
return n === 0 ? t.map((o) => ({
|
|
4416
|
-
groupResizeBehavior: o.panelConstraints.groupResizeBehavior,
|
|
4417
|
-
collapsedSize: 0,
|
|
4418
|
-
collapsible: o.panelConstraints.collapsible === true,
|
|
4419
|
-
defaultSize: undefined,
|
|
4420
|
-
disabled: o.panelConstraints.disabled,
|
|
4421
|
-
minSize: 0,
|
|
4422
|
-
maxSize: 100,
|
|
4423
|
-
panelId: o.id
|
|
4424
|
-
})) : t.map((o) => {
|
|
4425
|
-
const { element: i, panelConstraints: s } = o;
|
|
4426
|
-
let l = 0;
|
|
4427
|
-
if (s.collapsedSize !== undefined) {
|
|
4428
|
-
const f = te({
|
|
4429
|
-
groupSize: n,
|
|
4430
|
-
panelElement: i,
|
|
4431
|
-
styleProp: s.collapsedSize
|
|
4432
|
-
});
|
|
4433
|
-
l = D(f / n * 100);
|
|
4434
|
-
}
|
|
4435
|
-
let r;
|
|
4436
|
-
if (s.defaultSize !== undefined) {
|
|
4437
|
-
const f = te({
|
|
4438
|
-
groupSize: n,
|
|
4439
|
-
panelElement: i,
|
|
4440
|
-
styleProp: s.defaultSize
|
|
4441
|
-
});
|
|
4442
|
-
r = D(f / n * 100);
|
|
4443
|
-
}
|
|
4444
|
-
let a = 0;
|
|
4445
|
-
if (s.minSize !== undefined) {
|
|
4446
|
-
const f = te({
|
|
4447
|
-
groupSize: n,
|
|
4448
|
-
panelElement: i,
|
|
4449
|
-
styleProp: s.minSize
|
|
4450
|
-
});
|
|
4451
|
-
a = D(f / n * 100);
|
|
4452
|
-
}
|
|
4453
|
-
let u = 100;
|
|
4454
|
-
if (s.maxSize !== undefined) {
|
|
4455
|
-
const f = te({
|
|
4456
|
-
groupSize: n,
|
|
4457
|
-
panelElement: i,
|
|
4458
|
-
styleProp: s.maxSize
|
|
4459
|
-
});
|
|
4460
|
-
u = D(f / n * 100);
|
|
4461
|
-
}
|
|
4462
|
-
return {
|
|
4463
|
-
groupResizeBehavior: s.groupResizeBehavior,
|
|
4464
|
-
collapsedSize: l,
|
|
4465
|
-
collapsible: s.collapsible === true,
|
|
4466
|
-
defaultSize: r,
|
|
4467
|
-
disabled: s.disabled,
|
|
4468
|
-
minSize: a,
|
|
4469
|
-
maxSize: u,
|
|
4470
|
-
panelId: o.id
|
|
4471
|
-
};
|
|
4472
|
-
});
|
|
4473
|
-
}
|
|
4474
|
-
function L(e, t = "Assertion error") {
|
|
4475
|
-
if (!e)
|
|
4476
|
-
throw Error(t);
|
|
4477
|
-
}
|
|
4478
|
-
function Se(e, t) {
|
|
4479
|
-
return Array.from(t).sort(e === "horizontal" ? bt : xt);
|
|
4480
|
-
}
|
|
4481
|
-
function bt(e, t) {
|
|
4482
|
-
const n = e.element.offsetLeft - t.element.offsetLeft;
|
|
4483
|
-
return n !== 0 ? n : e.element.offsetWidth - t.element.offsetWidth;
|
|
4484
|
-
}
|
|
4485
|
-
function xt(e, t) {
|
|
4486
|
-
const n = e.element.offsetTop - t.element.offsetTop;
|
|
4487
|
-
return n !== 0 ? n : e.element.offsetHeight - t.element.offsetHeight;
|
|
4488
|
-
}
|
|
4489
|
-
function Xe(e) {
|
|
4490
|
-
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
4491
|
-
}
|
|
4492
|
-
function qe(e, t) {
|
|
4493
|
-
return {
|
|
4494
|
-
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(Math.abs(e.x - t.left), Math.abs(e.x - t.right)),
|
|
4495
|
-
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(Math.abs(e.y - t.top), Math.abs(e.y - t.bottom))
|
|
4496
|
-
};
|
|
4497
|
-
}
|
|
4498
|
-
function wt({
|
|
4499
|
-
orientation: e,
|
|
4500
|
-
rects: t,
|
|
4501
|
-
targetRect: n
|
|
4502
|
-
}) {
|
|
4503
|
-
const o = {
|
|
4504
|
-
x: n.x + n.width / 2,
|
|
4505
|
-
y: n.y + n.height / 2
|
|
4506
|
-
};
|
|
4507
|
-
let i, s = Number.MAX_VALUE;
|
|
4508
|
-
for (const l of t) {
|
|
4509
|
-
const { x: r, y: a } = qe(o, l), u = e === "horizontal" ? r : a;
|
|
4510
|
-
u < s && (s = u, i = l);
|
|
4511
|
-
}
|
|
4512
|
-
return L(i, "No rect found"), i;
|
|
4513
|
-
}
|
|
4514
|
-
var ue;
|
|
4515
|
-
function Pt() {
|
|
4516
|
-
return ue === undefined && (typeof matchMedia == "function" ? ue = !!matchMedia("(pointer:coarse)").matches : ue = false), ue;
|
|
4517
|
-
}
|
|
4518
|
-
function Ye(e) {
|
|
4519
|
-
const { element: t, orientation: n, panels: o, separators: i } = e, s = Se(n, Array.from(t.children).filter(Xe).map((x) => ({ element: x }))).map(({ element: x }) => x), l = [];
|
|
4520
|
-
let r = false, a = false, u = -1, f = -1, g = 0, d, z = [];
|
|
4521
|
-
{
|
|
4522
|
-
let x = -1;
|
|
4523
|
-
for (const c of s)
|
|
4524
|
-
c.hasAttribute("data-panel") && (x++, c.hasAttribute("data-disabled") || (g++, u === -1 && (u = x), f = x));
|
|
4525
|
-
}
|
|
4526
|
-
if (g > 1) {
|
|
4527
|
-
let x = -1;
|
|
4528
|
-
for (const c of s)
|
|
4529
|
-
if (c.hasAttribute("data-panel")) {
|
|
4530
|
-
x++;
|
|
4531
|
-
const p = o.find((m) => m.element === c);
|
|
4532
|
-
if (p) {
|
|
4533
|
-
if (d) {
|
|
4534
|
-
const m = d.element.getBoundingClientRect(), S = c.getBoundingClientRect();
|
|
4535
|
-
let v;
|
|
4536
|
-
if (a) {
|
|
4537
|
-
const y = n === "horizontal" ? new DOMRect(m.right, m.top, 0, m.height) : new DOMRect(m.left, m.bottom, m.width, 0), h = n === "horizontal" ? new DOMRect(S.left, S.top, 0, S.height) : new DOMRect(S.left, S.top, S.width, 0);
|
|
4538
|
-
switch (z.length) {
|
|
4539
|
-
case 0: {
|
|
4540
|
-
v = [
|
|
4541
|
-
y,
|
|
4542
|
-
h
|
|
4543
|
-
];
|
|
4544
|
-
break;
|
|
4545
|
-
}
|
|
4546
|
-
case 1: {
|
|
4547
|
-
const P = z[0], M = wt({
|
|
4548
|
-
orientation: n,
|
|
4549
|
-
rects: [m, S],
|
|
4550
|
-
targetRect: P.element.getBoundingClientRect()
|
|
4551
|
-
});
|
|
4552
|
-
v = [
|
|
4553
|
-
P,
|
|
4554
|
-
M === m ? h : y
|
|
4555
|
-
];
|
|
4556
|
-
break;
|
|
4557
|
-
}
|
|
4558
|
-
default: {
|
|
4559
|
-
v = z;
|
|
4560
|
-
break;
|
|
4561
|
-
}
|
|
4562
|
-
}
|
|
4563
|
-
} else
|
|
4564
|
-
z.length ? v = z : v = [
|
|
4565
|
-
n === "horizontal" ? new DOMRect(m.right, S.top, S.left - m.right, S.height) : new DOMRect(S.left, m.bottom, S.width, S.top - m.bottom)
|
|
4566
|
-
];
|
|
4567
|
-
for (const y of v) {
|
|
4568
|
-
let h = "width" in y ? y : y.element.getBoundingClientRect();
|
|
4569
|
-
const P = Pt() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
4570
|
-
if (h.width < P) {
|
|
4571
|
-
const C = P - h.width;
|
|
4572
|
-
h = new DOMRect(h.x - C / 2, h.y, h.width + C, h.height);
|
|
4573
|
-
}
|
|
4574
|
-
if (h.height < P) {
|
|
4575
|
-
const C = P - h.height;
|
|
4576
|
-
h = new DOMRect(h.x, h.y - C / 2, h.width, h.height + C);
|
|
4577
|
-
}
|
|
4578
|
-
const M = x <= u || x > f;
|
|
4579
|
-
!r && !M && l.push({
|
|
4580
|
-
group: e,
|
|
4581
|
-
groupSize: Q({ group: e }),
|
|
4582
|
-
panels: [d, p],
|
|
4583
|
-
separator: "width" in y ? undefined : y,
|
|
4584
|
-
rect: h
|
|
4585
|
-
}), r = false;
|
|
4586
|
-
}
|
|
4587
|
-
}
|
|
4588
|
-
a = false, d = p, z = [];
|
|
4589
|
-
}
|
|
4590
|
-
} else if (c.hasAttribute("data-separator")) {
|
|
4591
|
-
c.ariaDisabled !== null && (r = true);
|
|
4592
|
-
const p = i.find((m) => m.element === c);
|
|
4593
|
-
p ? z.push(p) : (d = undefined, z = []);
|
|
4594
|
-
} else
|
|
4595
|
-
a = true;
|
|
4596
|
-
}
|
|
4597
|
-
return l;
|
|
4598
|
-
}
|
|
4599
|
-
|
|
4600
|
-
class Je {
|
|
4601
|
-
#e = {};
|
|
4602
|
-
addListener(t, n) {
|
|
4603
|
-
const o = this.#e[t];
|
|
4604
|
-
return o === undefined ? this.#e[t] = [n] : o.includes(n) || o.push(n), () => {
|
|
4605
|
-
this.removeListener(t, n);
|
|
4606
|
-
};
|
|
4607
|
-
}
|
|
4608
|
-
emit(t, n) {
|
|
4609
|
-
const o = this.#e[t];
|
|
4610
|
-
if (o !== undefined)
|
|
4611
|
-
if (o.length === 1)
|
|
4612
|
-
o[0].call(null, n);
|
|
4613
|
-
else {
|
|
4614
|
-
let i = false, s = null;
|
|
4615
|
-
const l = Array.from(o);
|
|
4616
|
-
for (let r = 0;r < l.length; r++) {
|
|
4617
|
-
const a = l[r];
|
|
4618
|
-
try {
|
|
4619
|
-
a.call(null, n);
|
|
4620
|
-
} catch (u) {
|
|
4621
|
-
s === null && (i = true, s = u);
|
|
4622
|
-
}
|
|
4623
|
-
}
|
|
4624
|
-
if (i)
|
|
4625
|
-
throw s;
|
|
4626
|
-
}
|
|
4627
|
-
}
|
|
4628
|
-
removeAllListeners() {
|
|
4629
|
-
this.#e = {};
|
|
4630
|
-
}
|
|
4631
|
-
removeListener(t, n) {
|
|
4632
|
-
const o = this.#e[t];
|
|
4633
|
-
if (o !== undefined) {
|
|
4634
|
-
const i = o.indexOf(n);
|
|
4635
|
-
i >= 0 && o.splice(i, 1);
|
|
4636
|
-
}
|
|
4637
|
-
}
|
|
4638
|
-
}
|
|
4639
|
-
var A = /* @__PURE__ */ new Map;
|
|
4640
|
-
var Ze = new Je;
|
|
4641
|
-
function Lt(e) {
|
|
4642
|
-
A = new Map(A), A.delete(e);
|
|
4643
|
-
}
|
|
4644
|
-
function Ee(e, t) {
|
|
4645
|
-
for (const [n] of A)
|
|
4646
|
-
if (n.id === e)
|
|
4647
|
-
return n;
|
|
4648
|
-
}
|
|
4649
|
-
function $(e, t) {
|
|
4650
|
-
for (const [n, o] of A)
|
|
4651
|
-
if (n.id === e)
|
|
4652
|
-
return o;
|
|
4653
|
-
if (t)
|
|
4654
|
-
throw Error(`Could not find data for Group with id ${e}`);
|
|
4655
|
-
}
|
|
4656
|
-
function U() {
|
|
4657
|
-
return A;
|
|
4658
|
-
}
|
|
4659
|
-
function ve(e, t) {
|
|
4660
|
-
return Ze.addListener("groupChange", (n) => {
|
|
4661
|
-
n.group.id === e && t(n);
|
|
4662
|
-
});
|
|
4663
|
-
}
|
|
4664
|
-
function _(e, t) {
|
|
4665
|
-
const n = A.get(e);
|
|
4666
|
-
A = new Map(A), A.set(e, t), Ze.emit("groupChange", {
|
|
4667
|
-
group: e,
|
|
4668
|
-
prev: n,
|
|
4669
|
-
next: t
|
|
4670
|
-
});
|
|
4671
|
-
}
|
|
4672
|
-
function Ct(e, t, n) {
|
|
4673
|
-
let o, i = {
|
|
4674
|
-
x: 1 / 0,
|
|
4675
|
-
y: 1 / 0
|
|
4676
|
-
};
|
|
4677
|
-
for (const s of t) {
|
|
4678
|
-
const l = qe(n, s.rect);
|
|
4679
|
-
switch (e) {
|
|
4680
|
-
case "horizontal": {
|
|
4681
|
-
l.x <= i.x && (o = s, i = l);
|
|
4682
|
-
break;
|
|
4683
|
-
}
|
|
4684
|
-
case "vertical": {
|
|
4685
|
-
l.y <= i.y && (o = s, i = l);
|
|
4686
|
-
break;
|
|
4687
|
-
}
|
|
4688
|
-
}
|
|
4689
|
-
}
|
|
4690
|
-
return o ? {
|
|
4691
|
-
distance: i,
|
|
4692
|
-
hitRegion: o
|
|
4693
|
-
} : undefined;
|
|
4694
|
-
}
|
|
4695
|
-
function Rt(e) {
|
|
4696
|
-
return e !== null && typeof e == "object" && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
4697
|
-
}
|
|
4698
|
-
function Mt(e, t) {
|
|
4699
|
-
if (e === t)
|
|
4700
|
-
throw new Error("Cannot compare node with itself");
|
|
4701
|
-
const n = {
|
|
4702
|
-
a: De(e),
|
|
4703
|
-
b: De(t)
|
|
4704
|
-
};
|
|
4705
|
-
let o;
|
|
4706
|
-
for (;n.a.at(-1) === n.b.at(-1); )
|
|
4707
|
-
o = n.a.pop(), n.b.pop();
|
|
4708
|
-
L(o, "Stacking order can only be calculated for elements with a common ancestor");
|
|
4709
|
-
const i = {
|
|
4710
|
-
a: Ie(ke(n.a)),
|
|
4711
|
-
b: Ie(ke(n.b))
|
|
4712
|
-
};
|
|
4713
|
-
if (i.a === i.b) {
|
|
4714
|
-
const s = o.childNodes, l = {
|
|
4715
|
-
a: n.a.at(-1),
|
|
4716
|
-
b: n.b.at(-1)
|
|
4717
|
-
};
|
|
4718
|
-
let r = s.length;
|
|
4719
|
-
for (;r--; ) {
|
|
4720
|
-
const a = s[r];
|
|
4721
|
-
if (a === l.a)
|
|
4722
|
-
return 1;
|
|
4723
|
-
if (a === l.b)
|
|
4724
|
-
return -1;
|
|
4725
|
-
}
|
|
4726
|
-
}
|
|
4727
|
-
return Math.sign(i.a - i.b);
|
|
4728
|
-
}
|
|
4729
|
-
var Et = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
4730
|
-
function kt(e) {
|
|
4731
|
-
const t = getComputedStyle(Qe(e) ?? e).display;
|
|
4732
|
-
return t === "flex" || t === "inline-flex";
|
|
4733
|
-
}
|
|
4734
|
-
function It(e) {
|
|
4735
|
-
const t = getComputedStyle(e);
|
|
4736
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || kt(e)) || +t.opacity < 1 || ("transform" in t) && t.transform !== "none" || ("webkitTransform" in t) && t.webkitTransform !== "none" || ("mixBlendMode" in t) && t.mixBlendMode !== "normal" || ("filter" in t) && t.filter !== "none" || ("webkitFilter" in t) && t.webkitFilter !== "none" || ("isolation" in t) && t.isolation === "isolate" || Et.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
4737
|
-
}
|
|
4738
|
-
function ke(e) {
|
|
4739
|
-
let t = e.length;
|
|
4740
|
-
for (;t--; ) {
|
|
4741
|
-
const n = e[t];
|
|
4742
|
-
if (L(n, "Missing node"), It(n))
|
|
4743
|
-
return n;
|
|
4744
|
-
}
|
|
4745
|
-
return null;
|
|
4746
|
-
}
|
|
4747
|
-
function Ie(e) {
|
|
4748
|
-
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
4749
|
-
}
|
|
4750
|
-
function De(e) {
|
|
4751
|
-
const t = [];
|
|
4752
|
-
for (;e; )
|
|
4753
|
-
t.push(e), e = Qe(e);
|
|
4754
|
-
return t;
|
|
4755
|
-
}
|
|
4756
|
-
function Qe(e) {
|
|
4757
|
-
const { parentNode: t } = e;
|
|
4758
|
-
return Rt(t) ? t.host : t;
|
|
4759
|
-
}
|
|
4760
|
-
function Dt(e, t) {
|
|
4761
|
-
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
4762
|
-
}
|
|
4763
|
-
function Tt({
|
|
4764
|
-
groupElement: e,
|
|
4765
|
-
hitRegion: t,
|
|
4766
|
-
pointerEventTarget: n
|
|
4767
|
-
}) {
|
|
4768
|
-
if (!Xe(n) || n.contains(e) || e.contains(n))
|
|
4769
|
-
return true;
|
|
4770
|
-
if (Mt(n, e) > 0) {
|
|
4771
|
-
let o = n;
|
|
4772
|
-
for (;o; ) {
|
|
4773
|
-
if (o.contains(e))
|
|
4774
|
-
return true;
|
|
4775
|
-
if (Dt(o.getBoundingClientRect(), t))
|
|
4776
|
-
return false;
|
|
4777
|
-
o = o.parentElement;
|
|
4778
|
-
}
|
|
4779
|
-
}
|
|
4780
|
-
return true;
|
|
4781
|
-
}
|
|
4782
|
-
function ze(e, t) {
|
|
4783
|
-
const n = [];
|
|
4784
|
-
return t.forEach((o, i) => {
|
|
4785
|
-
if (i.disabled)
|
|
4786
|
-
return;
|
|
4787
|
-
const s = Ye(i), l = Ct(i.orientation, s, {
|
|
4788
|
-
x: e.clientX,
|
|
4789
|
-
y: e.clientY
|
|
4790
|
-
});
|
|
4791
|
-
l && l.distance.x <= 0 && l.distance.y <= 0 && Tt({
|
|
4792
|
-
groupElement: i.element,
|
|
4793
|
-
hitRegion: l.hitRegion.rect,
|
|
4794
|
-
pointerEventTarget: e.target
|
|
4795
|
-
}) && n.push(l.hitRegion);
|
|
4796
|
-
}), n;
|
|
4797
|
-
}
|
|
4798
|
-
function Ot(e, t) {
|
|
4799
|
-
if (e.length !== t.length)
|
|
4800
|
-
return false;
|
|
4801
|
-
for (let n = 0;n < e.length; n++)
|
|
4802
|
-
if (e[n] != t[n])
|
|
4803
|
-
return false;
|
|
4804
|
-
return true;
|
|
4805
|
-
}
|
|
4806
|
-
function I(e, t, n = 0) {
|
|
4807
|
-
return Math.abs(D(e) - D(t)) <= n;
|
|
4808
|
-
}
|
|
4809
|
-
function G(e, t) {
|
|
4810
|
-
return I(e, t) ? 0 : e > t ? 1 : -1;
|
|
4811
|
-
}
|
|
4812
|
-
function Y({
|
|
4813
|
-
overrideDisabledPanels: e,
|
|
4814
|
-
panelConstraints: t,
|
|
4815
|
-
prevSize: n,
|
|
4816
|
-
size: o
|
|
4817
|
-
}) {
|
|
4818
|
-
const {
|
|
4819
|
-
collapsedSize: i = 0,
|
|
4820
|
-
collapsible: s,
|
|
4821
|
-
disabled: l,
|
|
4822
|
-
maxSize: r = 100,
|
|
4823
|
-
minSize: a = 0
|
|
4824
|
-
} = t;
|
|
4825
|
-
if (l && !e)
|
|
4826
|
-
return n;
|
|
4827
|
-
if (G(o, a) < 0)
|
|
4828
|
-
if (s) {
|
|
4829
|
-
const u = (i + a) / 2;
|
|
4830
|
-
G(o, u) < 0 ? o = i : o = a;
|
|
4831
|
-
} else
|
|
4832
|
-
o = a;
|
|
4833
|
-
return o = Math.min(r, o), o = D(o), o;
|
|
4834
|
-
}
|
|
4835
|
-
function se({
|
|
4836
|
-
delta: e,
|
|
4837
|
-
initialLayout: t,
|
|
4838
|
-
panelConstraints: n,
|
|
4839
|
-
pivotIndices: o,
|
|
4840
|
-
prevLayout: i,
|
|
4841
|
-
trigger: s
|
|
4842
|
-
}) {
|
|
4843
|
-
if (I(e, 0))
|
|
4844
|
-
return t;
|
|
4845
|
-
const l = s === "imperative-api", r = Object.values(t), a = Object.values(i), u = [...r], [f, g] = o;
|
|
4846
|
-
L(f != null, "Invalid first pivot index"), L(g != null, "Invalid second pivot index");
|
|
4847
|
-
let d = 0;
|
|
4848
|
-
switch (s) {
|
|
4849
|
-
case "keyboard": {
|
|
4850
|
-
{
|
|
4851
|
-
const c = e < 0 ? g : f, p = n[c];
|
|
4852
|
-
L(p, `Panel constraints not found for index ${c}`);
|
|
4853
|
-
const {
|
|
4854
|
-
collapsedSize: m = 0,
|
|
4855
|
-
collapsible: S,
|
|
4856
|
-
minSize: v = 0
|
|
4857
|
-
} = p;
|
|
4858
|
-
if (S) {
|
|
4859
|
-
const y = r[c];
|
|
4860
|
-
if (L(y != null, `Previous layout not found for panel index ${c}`), I(y, m)) {
|
|
4861
|
-
const h = v - y;
|
|
4862
|
-
G(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
4863
|
-
}
|
|
4864
|
-
}
|
|
4865
|
-
}
|
|
4866
|
-
{
|
|
4867
|
-
const c = e < 0 ? f : g, p = n[c];
|
|
4868
|
-
L(p, `No panel constraints found for index ${c}`);
|
|
4869
|
-
const {
|
|
4870
|
-
collapsedSize: m = 0,
|
|
4871
|
-
collapsible: S,
|
|
4872
|
-
minSize: v = 0
|
|
4873
|
-
} = p;
|
|
4874
|
-
if (S) {
|
|
4875
|
-
const y = r[c];
|
|
4876
|
-
if (L(y != null, `Previous layout not found for panel index ${c}`), I(y, v)) {
|
|
4877
|
-
const h = y - m;
|
|
4878
|
-
G(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
4879
|
-
}
|
|
4880
|
-
}
|
|
4881
|
-
}
|
|
4882
|
-
break;
|
|
4883
|
-
}
|
|
4884
|
-
default: {
|
|
4885
|
-
const c = e < 0 ? g : f, p = n[c];
|
|
4886
|
-
L(p, `Panel constraints not found for index ${c}`);
|
|
4887
|
-
const m = r[c], { collapsible: S, collapsedSize: v, minSize: y } = p;
|
|
4888
|
-
if (S && G(m, y) < 0)
|
|
4889
|
-
if (e > 0) {
|
|
4890
|
-
const h = y - v, P = h / 2, M = m + e;
|
|
4891
|
-
G(M, y) < 0 && (e = G(e, P) <= 0 ? 0 : h);
|
|
4892
|
-
} else {
|
|
4893
|
-
const h = y - v, P = 100 - h / 2, M = m - e;
|
|
4894
|
-
G(M, y) < 0 && (e = G(100 + e, P) > 0 ? 0 : -h);
|
|
4895
|
-
}
|
|
4896
|
-
break;
|
|
4897
|
-
}
|
|
4898
|
-
}
|
|
4899
|
-
{
|
|
4900
|
-
const c = e < 0 ? 1 : -1;
|
|
4901
|
-
let p = e < 0 ? g : f, m = 0;
|
|
4902
|
-
for (;; ) {
|
|
4903
|
-
const v = r[p];
|
|
4904
|
-
L(v != null, `Previous layout not found for panel index ${p}`);
|
|
4905
|
-
const h = Y({
|
|
4906
|
-
overrideDisabledPanels: l,
|
|
4907
|
-
panelConstraints: n[p],
|
|
4908
|
-
prevSize: v,
|
|
4909
|
-
size: 100
|
|
4910
|
-
}) - v;
|
|
4911
|
-
if (m += h, p += c, p < 0 || p >= n.length)
|
|
4912
|
-
break;
|
|
4913
|
-
}
|
|
4914
|
-
const S = Math.min(Math.abs(e), Math.abs(m));
|
|
4915
|
-
e = e < 0 ? 0 - S : S;
|
|
4916
|
-
}
|
|
4917
|
-
{
|
|
4918
|
-
let p = e < 0 ? f : g;
|
|
4919
|
-
for (;p >= 0 && p < n.length; ) {
|
|
4920
|
-
const m = Math.abs(e) - Math.abs(d), S = r[p];
|
|
4921
|
-
L(S != null, `Previous layout not found for panel index ${p}`);
|
|
4922
|
-
const v = S - m, y = Y({
|
|
4923
|
-
overrideDisabledPanels: l,
|
|
4924
|
-
panelConstraints: n[p],
|
|
4925
|
-
prevSize: S,
|
|
4926
|
-
size: v
|
|
4927
|
-
});
|
|
4928
|
-
if (!I(S, y) && (d += S - y, u[p] = y, d.toFixed(3).localeCompare(Math.abs(e).toFixed(3), undefined, {
|
|
4929
|
-
numeric: true
|
|
4930
|
-
}) >= 0))
|
|
4931
|
-
break;
|
|
4932
|
-
e < 0 ? p-- : p++;
|
|
4933
|
-
}
|
|
4934
|
-
}
|
|
4935
|
-
if (Ot(a, u))
|
|
4936
|
-
return i;
|
|
4937
|
-
{
|
|
4938
|
-
const c = e < 0 ? g : f, p = r[c];
|
|
4939
|
-
L(p != null, `Previous layout not found for panel index ${c}`);
|
|
4940
|
-
const m = p + d, S = Y({
|
|
4941
|
-
overrideDisabledPanels: l,
|
|
4942
|
-
panelConstraints: n[c],
|
|
4943
|
-
prevSize: p,
|
|
4944
|
-
size: m
|
|
4945
|
-
});
|
|
4946
|
-
if (u[c] = S, !I(S, m)) {
|
|
4947
|
-
let v = m - S, h = e < 0 ? g : f;
|
|
4948
|
-
for (;h >= 0 && h < n.length; ) {
|
|
4949
|
-
const P = u[h];
|
|
4950
|
-
L(P != null, `Previous layout not found for panel index ${h}`);
|
|
4951
|
-
const M = P + v, C = Y({
|
|
4952
|
-
overrideDisabledPanels: l,
|
|
4953
|
-
panelConstraints: n[h],
|
|
4954
|
-
prevSize: P,
|
|
4955
|
-
size: M
|
|
4956
|
-
});
|
|
4957
|
-
if (I(P, C) || (v -= C - P, u[h] = C), I(v, 0))
|
|
4958
|
-
break;
|
|
4959
|
-
e > 0 ? h-- : h++;
|
|
4960
|
-
}
|
|
4961
|
-
}
|
|
4962
|
-
}
|
|
4963
|
-
const z = Object.values(u).reduce((c, p) => p + c, 0);
|
|
4964
|
-
if (!I(z, 100, 0.1))
|
|
4965
|
-
return i;
|
|
4966
|
-
const x = Object.keys(i);
|
|
4967
|
-
return u.reduce((c, p, m) => (c[x[m]] = p, c), {});
|
|
4968
|
-
}
|
|
4969
|
-
function V(e, t) {
|
|
4970
|
-
if (Object.keys(e).length !== Object.keys(t).length)
|
|
4971
|
-
return false;
|
|
4972
|
-
for (const n in e)
|
|
4973
|
-
if (t[n] === undefined || G(e[n], t[n]) !== 0)
|
|
4974
|
-
return false;
|
|
4975
|
-
return true;
|
|
4976
|
-
}
|
|
4977
|
-
function B({
|
|
4978
|
-
layout: e,
|
|
4979
|
-
panelConstraints: t
|
|
4980
|
-
}) {
|
|
4981
|
-
const n = Object.values(e), o = [...n], i = o.reduce((r, a) => r + a, 0);
|
|
4982
|
-
if (o.length !== t.length)
|
|
4983
|
-
throw Error(`Invalid ${t.length} panel layout: ${o.map((r) => `${r}%`).join(", ")}`);
|
|
4984
|
-
if (!I(i, 100) && o.length > 0)
|
|
4985
|
-
for (let r = 0;r < t.length; r++) {
|
|
4986
|
-
const a = o[r];
|
|
4987
|
-
L(a != null, `No layout data found for index ${r}`);
|
|
4988
|
-
const u = 100 / i * a;
|
|
4989
|
-
o[r] = u;
|
|
4990
|
-
}
|
|
4991
|
-
let s = 0;
|
|
4992
|
-
for (let r = 0;r < t.length; r++) {
|
|
4993
|
-
const a = n[r];
|
|
4994
|
-
L(a != null, `No layout data found for index ${r}`);
|
|
4995
|
-
const u = o[r];
|
|
4996
|
-
L(u != null, `No layout data found for index ${r}`);
|
|
4997
|
-
const f = Y({
|
|
4998
|
-
overrideDisabledPanels: true,
|
|
4999
|
-
panelConstraints: t[r],
|
|
5000
|
-
prevSize: a,
|
|
5001
|
-
size: u
|
|
5002
|
-
});
|
|
5003
|
-
u != f && (s += u - f, o[r] = f);
|
|
5004
|
-
}
|
|
5005
|
-
if (!I(s, 0))
|
|
5006
|
-
for (let r = 0;r < t.length; r++) {
|
|
5007
|
-
const a = o[r];
|
|
5008
|
-
L(a != null, `No layout data found for index ${r}`);
|
|
5009
|
-
const u = a + s, f = Y({
|
|
5010
|
-
overrideDisabledPanels: true,
|
|
5011
|
-
panelConstraints: t[r],
|
|
5012
|
-
prevSize: a,
|
|
5013
|
-
size: u
|
|
5014
|
-
});
|
|
5015
|
-
if (a !== f && (s -= f - a, o[r] = f, I(s, 0)))
|
|
5016
|
-
break;
|
|
5017
|
-
}
|
|
5018
|
-
const l = Object.keys(e);
|
|
5019
|
-
return o.reduce((r, a, u) => (r[l[u]] = a, r), {});
|
|
5020
|
-
}
|
|
5021
|
-
function et({
|
|
5022
|
-
groupId: e,
|
|
5023
|
-
panelId: t
|
|
5024
|
-
}) {
|
|
5025
|
-
const n = () => {
|
|
5026
|
-
const r = U();
|
|
5027
|
-
for (const [
|
|
5028
|
-
a,
|
|
5029
|
-
{
|
|
5030
|
-
defaultLayoutDeferred: u,
|
|
5031
|
-
derivedPanelConstraints: f,
|
|
5032
|
-
layout: g,
|
|
5033
|
-
groupSize: d,
|
|
5034
|
-
separatorToPanels: z
|
|
5035
|
-
}
|
|
5036
|
-
] of r)
|
|
5037
|
-
if (a.id === e)
|
|
5038
|
-
return {
|
|
5039
|
-
defaultLayoutDeferred: u,
|
|
5040
|
-
derivedPanelConstraints: f,
|
|
5041
|
-
group: a,
|
|
5042
|
-
groupSize: d,
|
|
5043
|
-
layout: g,
|
|
5044
|
-
separatorToPanels: z
|
|
5045
|
-
};
|
|
5046
|
-
throw Error(`Group ${e} not found`);
|
|
5047
|
-
}, o = () => {
|
|
5048
|
-
const r = n().derivedPanelConstraints.find((a) => a.panelId === t);
|
|
5049
|
-
if (r !== undefined)
|
|
5050
|
-
return r;
|
|
5051
|
-
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
5052
|
-
}, i = () => {
|
|
5053
|
-
const r = n().group.panels.find((a) => a.id === t);
|
|
5054
|
-
if (r !== undefined)
|
|
5055
|
-
return r;
|
|
5056
|
-
throw Error(`Layout not found for Panel ${t}`);
|
|
5057
|
-
}, s = () => {
|
|
5058
|
-
const r = n().layout[t];
|
|
5059
|
-
if (r !== undefined)
|
|
5060
|
-
return r;
|
|
5061
|
-
throw Error(`Layout not found for Panel ${t}`);
|
|
5062
|
-
}, l = (r) => {
|
|
5063
|
-
const a = s();
|
|
5064
|
-
if (r === a)
|
|
5065
|
-
return;
|
|
5066
|
-
const {
|
|
5067
|
-
defaultLayoutDeferred: u,
|
|
5068
|
-
derivedPanelConstraints: f,
|
|
5069
|
-
group: g,
|
|
5070
|
-
groupSize: d,
|
|
5071
|
-
layout: z,
|
|
5072
|
-
separatorToPanels: x
|
|
5073
|
-
} = n(), c = g.panels.findIndex((v) => v.id === t), p = c === g.panels.length - 1, m = se({
|
|
5074
|
-
delta: p ? a - r : r - a,
|
|
5075
|
-
initialLayout: z,
|
|
5076
|
-
panelConstraints: f,
|
|
5077
|
-
pivotIndices: p ? [c - 1, c] : [c, c + 1],
|
|
5078
|
-
prevLayout: z,
|
|
5079
|
-
trigger: "imperative-api"
|
|
5080
|
-
}), S = B({
|
|
5081
|
-
layout: m,
|
|
5082
|
-
panelConstraints: f
|
|
5083
|
-
});
|
|
5084
|
-
V(z, S) || _(g, {
|
|
5085
|
-
defaultLayoutDeferred: u,
|
|
5086
|
-
derivedPanelConstraints: f,
|
|
5087
|
-
groupSize: d,
|
|
5088
|
-
layout: S,
|
|
5089
|
-
separatorToPanels: x
|
|
5090
|
-
});
|
|
5091
|
-
};
|
|
5092
|
-
return {
|
|
5093
|
-
collapse: () => {
|
|
5094
|
-
const { collapsible: r, collapsedSize: a } = o(), { mutableValues: u } = i(), f = s();
|
|
5095
|
-
r && f !== a && (u.expandToSize = f, l(a));
|
|
5096
|
-
},
|
|
5097
|
-
expand: () => {
|
|
5098
|
-
const { collapsible: r, collapsedSize: a, minSize: u } = o(), { mutableValues: f } = i(), g = s();
|
|
5099
|
-
if (r && g === a) {
|
|
5100
|
-
let d = f.expandToSize ?? u;
|
|
5101
|
-
d === 0 && (d = 1), l(d);
|
|
5102
|
-
}
|
|
5103
|
-
},
|
|
5104
|
-
getSize: () => {
|
|
5105
|
-
const { group: r } = n(), a = s(), { element: u } = i(), f = r.orientation === "horizontal" ? u.offsetWidth : u.offsetHeight;
|
|
5106
|
-
return {
|
|
5107
|
-
asPercentage: a,
|
|
5108
|
-
inPixels: f
|
|
5109
|
-
};
|
|
5110
|
-
},
|
|
5111
|
-
isCollapsed: () => {
|
|
5112
|
-
const { collapsible: r, collapsedSize: a } = o(), u = s();
|
|
5113
|
-
return r && I(a, u);
|
|
5114
|
-
},
|
|
5115
|
-
resize: (r) => {
|
|
5116
|
-
const { group: a } = n(), { element: u } = i(), f = Q({ group: a }), g = te({
|
|
5117
|
-
groupSize: f,
|
|
5118
|
-
panelElement: u,
|
|
5119
|
-
styleProp: r
|
|
5120
|
-
}), d = D(g / f * 100);
|
|
5121
|
-
l(d);
|
|
5122
|
-
}
|
|
5123
|
-
};
|
|
5124
|
-
}
|
|
5125
|
-
function Te(e) {
|
|
5126
|
-
if (e.defaultPrevented)
|
|
5127
|
-
return;
|
|
5128
|
-
const t = U();
|
|
5129
|
-
ze(e, t).forEach((o) => {
|
|
5130
|
-
if (o.separator) {
|
|
5131
|
-
const i = o.panels.find((s) => s.panelConstraints.defaultSize !== undefined);
|
|
5132
|
-
if (i) {
|
|
5133
|
-
const s = i.panelConstraints.defaultSize, l = et({
|
|
5134
|
-
groupId: o.group.id,
|
|
5135
|
-
panelId: i.id
|
|
5136
|
-
});
|
|
5137
|
-
l && s !== undefined && (l.resize(s), e.preventDefault());
|
|
5138
|
-
}
|
|
5139
|
-
}
|
|
5140
|
-
});
|
|
5141
|
-
}
|
|
5142
|
-
function fe(e) {
|
|
5143
|
-
const t = U();
|
|
5144
|
-
for (const [n] of t)
|
|
5145
|
-
if (n.separators.some((o) => o.element === e))
|
|
5146
|
-
return n;
|
|
5147
|
-
throw Error("Could not find parent Group for separator element");
|
|
5148
|
-
}
|
|
5149
|
-
function tt({
|
|
5150
|
-
groupId: e
|
|
5151
|
-
}) {
|
|
5152
|
-
const t = () => {
|
|
5153
|
-
const n = U();
|
|
5154
|
-
for (const [o, i] of n)
|
|
5155
|
-
if (o.id === e)
|
|
5156
|
-
return { group: o, ...i };
|
|
5157
|
-
throw Error(`Could not find Group with id "${e}"`);
|
|
5158
|
-
};
|
|
5159
|
-
return {
|
|
5160
|
-
getLayout() {
|
|
5161
|
-
const { defaultLayoutDeferred: n, layout: o } = t();
|
|
5162
|
-
return n ? {} : o;
|
|
5163
|
-
},
|
|
5164
|
-
setLayout(n) {
|
|
5165
|
-
const {
|
|
5166
|
-
defaultLayoutDeferred: o,
|
|
5167
|
-
derivedPanelConstraints: i,
|
|
5168
|
-
group: s,
|
|
5169
|
-
groupSize: l,
|
|
5170
|
-
layout: r,
|
|
5171
|
-
separatorToPanels: a
|
|
5172
|
-
} = t(), u = B({
|
|
5173
|
-
layout: n,
|
|
5174
|
-
panelConstraints: i
|
|
5175
|
-
});
|
|
5176
|
-
return o ? r : (V(r, u) || _(s, {
|
|
5177
|
-
defaultLayoutDeferred: o,
|
|
5178
|
-
derivedPanelConstraints: i,
|
|
5179
|
-
groupSize: l,
|
|
5180
|
-
layout: u,
|
|
5181
|
-
separatorToPanels: a
|
|
5182
|
-
}), u);
|
|
5183
|
-
}
|
|
5184
|
-
};
|
|
5185
|
-
}
|
|
5186
|
-
function H(e, t) {
|
|
5187
|
-
const n = fe(e), o = $(n.id, true), i = n.separators.find((g) => g.element === e);
|
|
5188
|
-
L(i, "Matching separator not found");
|
|
5189
|
-
const s = o.separatorToPanels.get(i);
|
|
5190
|
-
L(s, "Matching panels not found");
|
|
5191
|
-
const l = s.map((g) => n.panels.indexOf(g)), a = tt({ groupId: n.id }).getLayout(), u = se({
|
|
5192
|
-
delta: t,
|
|
5193
|
-
initialLayout: a,
|
|
5194
|
-
panelConstraints: o.derivedPanelConstraints,
|
|
5195
|
-
pivotIndices: l,
|
|
5196
|
-
prevLayout: a,
|
|
5197
|
-
trigger: "keyboard"
|
|
5198
|
-
}), f = B({
|
|
5199
|
-
layout: u,
|
|
5200
|
-
panelConstraints: o.derivedPanelConstraints
|
|
5201
|
-
});
|
|
5202
|
-
V(a, f) || _(n, {
|
|
5203
|
-
defaultLayoutDeferred: o.defaultLayoutDeferred,
|
|
5204
|
-
derivedPanelConstraints: o.derivedPanelConstraints,
|
|
5205
|
-
groupSize: o.groupSize,
|
|
5206
|
-
layout: f,
|
|
5207
|
-
separatorToPanels: o.separatorToPanels
|
|
5208
|
-
});
|
|
5209
|
-
}
|
|
5210
|
-
function Oe(e) {
|
|
5211
|
-
if (e.defaultPrevented)
|
|
5212
|
-
return;
|
|
5213
|
-
const t = e.currentTarget, n = fe(t);
|
|
5214
|
-
if (!n.disabled)
|
|
5215
|
-
switch (e.key) {
|
|
5216
|
-
case "ArrowDown": {
|
|
5217
|
-
e.preventDefault(), n.orientation === "vertical" && H(t, 5);
|
|
5218
|
-
break;
|
|
5219
|
-
}
|
|
5220
|
-
case "ArrowLeft": {
|
|
5221
|
-
e.preventDefault(), n.orientation === "horizontal" && H(t, -5);
|
|
5222
|
-
break;
|
|
5223
|
-
}
|
|
5224
|
-
case "ArrowRight": {
|
|
5225
|
-
e.preventDefault(), n.orientation === "horizontal" && H(t, 5);
|
|
5226
|
-
break;
|
|
5227
|
-
}
|
|
5228
|
-
case "ArrowUp": {
|
|
5229
|
-
e.preventDefault(), n.orientation === "vertical" && H(t, -5);
|
|
5230
|
-
break;
|
|
5231
|
-
}
|
|
5232
|
-
case "End": {
|
|
5233
|
-
e.preventDefault(), H(t, 100);
|
|
5234
|
-
break;
|
|
5235
|
-
}
|
|
5236
|
-
case "Enter": {
|
|
5237
|
-
e.preventDefault();
|
|
5238
|
-
const o = fe(t), i = $(o.id, true), { derivedPanelConstraints: s, layout: l, separatorToPanels: r } = i, a = o.separators.find((d) => d.element === t);
|
|
5239
|
-
L(a, "Matching separator not found");
|
|
5240
|
-
const u = r.get(a);
|
|
5241
|
-
L(u, "Matching panels not found");
|
|
5242
|
-
const f = u[0], g = s.find((d) => d.panelId === f.id);
|
|
5243
|
-
if (L(g, "Panel metadata not found"), g.collapsible) {
|
|
5244
|
-
const d = l[f.id], z = g.collapsedSize === d ? o.mutableState.expandedPanelSizes[f.id] ?? g.minSize : g.collapsedSize;
|
|
5245
|
-
H(t, z - d);
|
|
5246
|
-
}
|
|
5247
|
-
break;
|
|
5248
|
-
}
|
|
5249
|
-
case "F6": {
|
|
5250
|
-
e.preventDefault();
|
|
5251
|
-
const i = fe(t).separators.map((a) => a.element), s = Array.from(i).findIndex((a) => a === e.currentTarget);
|
|
5252
|
-
L(s !== null, "Index not found");
|
|
5253
|
-
const l = e.shiftKey ? s > 0 ? s - 1 : i.length - 1 : s + 1 < i.length ? s + 1 : 0;
|
|
5254
|
-
i[l].focus({
|
|
5255
|
-
preventScroll: true
|
|
5256
|
-
});
|
|
5257
|
-
break;
|
|
5258
|
-
}
|
|
5259
|
-
case "Home": {
|
|
5260
|
-
e.preventDefault(), H(t, -100);
|
|
5261
|
-
break;
|
|
5262
|
-
}
|
|
5263
|
-
}
|
|
5264
|
-
}
|
|
5265
|
-
var J = {
|
|
5266
|
-
cursorFlags: 0,
|
|
5267
|
-
state: "inactive"
|
|
5268
|
-
};
|
|
5269
|
-
var be = new Je;
|
|
5270
|
-
function W() {
|
|
5271
|
-
return J;
|
|
5272
|
-
}
|
|
5273
|
-
function Gt(e) {
|
|
5274
|
-
return be.addListener("change", e);
|
|
5275
|
-
}
|
|
5276
|
-
function At(e) {
|
|
5277
|
-
const t = J, n = { ...J };
|
|
5278
|
-
n.cursorFlags = e, J = n, be.emit("change", {
|
|
5279
|
-
prev: t,
|
|
5280
|
-
next: n
|
|
5281
|
-
});
|
|
5282
|
-
}
|
|
5283
|
-
function Z(e) {
|
|
5284
|
-
const t = J;
|
|
5285
|
-
J = e, be.emit("change", {
|
|
5286
|
-
prev: t,
|
|
5287
|
-
next: e
|
|
5288
|
-
});
|
|
5289
|
-
}
|
|
5290
|
-
function Ge(e) {
|
|
5291
|
-
if (e.defaultPrevented)
|
|
5292
|
-
return;
|
|
5293
|
-
if (e.pointerType === "mouse" && e.button > 0)
|
|
5294
|
-
return;
|
|
5295
|
-
const t = U(), n = ze(e, t), o = /* @__PURE__ */ new Map;
|
|
5296
|
-
let i = false;
|
|
5297
|
-
n.forEach((s) => {
|
|
5298
|
-
s.separator && (i || (i = true, s.separator.element.focus({
|
|
5299
|
-
preventScroll: true
|
|
5300
|
-
})));
|
|
5301
|
-
const l = t.get(s.group);
|
|
5302
|
-
l && o.set(s.group, l.layout);
|
|
5303
|
-
}), Z({
|
|
5304
|
-
cursorFlags: 0,
|
|
5305
|
-
hitRegions: n,
|
|
5306
|
-
initialLayoutMap: o,
|
|
5307
|
-
pointerDownAtPoint: { x: e.clientX, y: e.clientY },
|
|
5308
|
-
state: "active"
|
|
5309
|
-
}), n.length && e.preventDefault();
|
|
5310
|
-
}
|
|
5311
|
-
var Nt = (e) => e;
|
|
5312
|
-
var me = () => {};
|
|
5313
|
-
var nt = 1;
|
|
5314
|
-
var ot = 2;
|
|
5315
|
-
var it = 4;
|
|
5316
|
-
var rt = 8;
|
|
5317
|
-
var Ae = 3;
|
|
5318
|
-
var Ne = 12;
|
|
5319
|
-
var ce;
|
|
5320
|
-
function _e() {
|
|
5321
|
-
return ce === undefined && (ce = false, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (ce = true)), ce;
|
|
5322
|
-
}
|
|
5323
|
-
function _t({
|
|
5324
|
-
cursorFlags: e,
|
|
5325
|
-
groups: t,
|
|
5326
|
-
state: n
|
|
5327
|
-
}) {
|
|
5328
|
-
let o = 0, i = 0;
|
|
5329
|
-
switch (n) {
|
|
5330
|
-
case "active":
|
|
5331
|
-
case "hover":
|
|
5332
|
-
t.forEach((s) => {
|
|
5333
|
-
if (!s.mutableState.disableCursor)
|
|
5334
|
-
switch (s.orientation) {
|
|
5335
|
-
case "horizontal": {
|
|
5336
|
-
o++;
|
|
5337
|
-
break;
|
|
5338
|
-
}
|
|
5339
|
-
case "vertical": {
|
|
5340
|
-
i++;
|
|
5341
|
-
break;
|
|
5342
|
-
}
|
|
5343
|
-
}
|
|
5344
|
-
});
|
|
5345
|
-
}
|
|
5346
|
-
if (!(o === 0 && i === 0)) {
|
|
5347
|
-
switch (n) {
|
|
5348
|
-
case "active": {
|
|
5349
|
-
if (e && _e()) {
|
|
5350
|
-
const s = (e & nt) !== 0, l = (e & ot) !== 0, r = (e & it) !== 0, a = (e & rt) !== 0;
|
|
5351
|
-
if (s)
|
|
5352
|
-
return r ? "se-resize" : a ? "ne-resize" : "e-resize";
|
|
5353
|
-
if (l)
|
|
5354
|
-
return r ? "sw-resize" : a ? "nw-resize" : "w-resize";
|
|
5355
|
-
if (r)
|
|
5356
|
-
return "s-resize";
|
|
5357
|
-
if (a)
|
|
5358
|
-
return "n-resize";
|
|
5359
|
-
}
|
|
5360
|
-
break;
|
|
5361
|
-
}
|
|
5362
|
-
}
|
|
5363
|
-
return _e() ? o > 0 && i > 0 ? "move" : o > 0 ? "ew-resize" : "ns-resize" : o > 0 && i > 0 ? "grab" : o > 0 ? "col-resize" : "row-resize";
|
|
5364
|
-
}
|
|
5365
|
-
}
|
|
5366
|
-
var Fe = /* @__PURE__ */ new WeakMap;
|
|
5367
|
-
function xe(e) {
|
|
5368
|
-
if (e.defaultView === null || e.defaultView === undefined)
|
|
5369
|
-
return;
|
|
5370
|
-
let { prevStyle: t, styleSheet: n } = Fe.get(e) ?? {};
|
|
5371
|
-
n === undefined && (n = new e.defaultView.CSSStyleSheet, e.adoptedStyleSheets && e.adoptedStyleSheets.push(n));
|
|
5372
|
-
const o = W();
|
|
5373
|
-
switch (o.state) {
|
|
5374
|
-
case "active":
|
|
5375
|
-
case "hover": {
|
|
5376
|
-
const i = _t({
|
|
5377
|
-
cursorFlags: o.cursorFlags,
|
|
5378
|
-
groups: o.hitRegions.map((l) => l.group),
|
|
5379
|
-
state: o.state
|
|
5380
|
-
}), s = `*, *:hover {cursor: ${i} !important; }`;
|
|
5381
|
-
if (t === s)
|
|
5382
|
-
return;
|
|
5383
|
-
t = s, i ? n.cssRules.length === 0 ? n.insertRule(s) : n.replaceSync(s) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
5384
|
-
break;
|
|
5385
|
-
}
|
|
5386
|
-
case "inactive": {
|
|
5387
|
-
t = undefined, n.cssRules.length === 1 && n.deleteRule(0);
|
|
5388
|
-
break;
|
|
5389
|
-
}
|
|
5390
|
-
}
|
|
5391
|
-
Fe.set(e, {
|
|
5392
|
-
prevStyle: t,
|
|
5393
|
-
styleSheet: n
|
|
5394
|
-
});
|
|
5395
|
-
}
|
|
5396
|
-
function st({
|
|
5397
|
-
document: e,
|
|
5398
|
-
event: t,
|
|
5399
|
-
hitRegions: n,
|
|
5400
|
-
initialLayoutMap: o,
|
|
5401
|
-
mountedGroups: i,
|
|
5402
|
-
pointerDownAtPoint: s,
|
|
5403
|
-
prevCursorFlags: l
|
|
5404
|
-
}) {
|
|
5405
|
-
let r = 0;
|
|
5406
|
-
n.forEach((u) => {
|
|
5407
|
-
const { group: f, groupSize: g } = u, { orientation: d, panels: z } = f, { disableCursor: x } = f.mutableState;
|
|
5408
|
-
let c = 0;
|
|
5409
|
-
s ? d === "horizontal" ? c = (t.clientX - s.x) / g * 100 : c = (t.clientY - s.y) / g * 100 : d === "horizontal" ? c = t.clientX < 0 ? -100 : 100 : c = t.clientY < 0 ? -100 : 100;
|
|
5410
|
-
const p = o.get(f), m = i.get(f);
|
|
5411
|
-
if (!p || !m)
|
|
5412
|
-
return;
|
|
5413
|
-
const {
|
|
5414
|
-
defaultLayoutDeferred: S,
|
|
5415
|
-
derivedPanelConstraints: v,
|
|
5416
|
-
groupSize: y,
|
|
5417
|
-
layout: h,
|
|
5418
|
-
separatorToPanels: P
|
|
5419
|
-
} = m;
|
|
5420
|
-
if (v && h && P) {
|
|
5421
|
-
const M = se({
|
|
5422
|
-
delta: c,
|
|
5423
|
-
initialLayout: p,
|
|
5424
|
-
panelConstraints: v,
|
|
5425
|
-
pivotIndices: u.panels.map((C) => z.indexOf(C)),
|
|
5426
|
-
prevLayout: h,
|
|
5427
|
-
trigger: "mouse-or-touch"
|
|
5428
|
-
});
|
|
5429
|
-
if (V(M, h)) {
|
|
5430
|
-
if (c !== 0 && !x)
|
|
5431
|
-
switch (d) {
|
|
5432
|
-
case "horizontal": {
|
|
5433
|
-
r |= c < 0 ? nt : ot;
|
|
5434
|
-
break;
|
|
5435
|
-
}
|
|
5436
|
-
case "vertical": {
|
|
5437
|
-
r |= c < 0 ? it : rt;
|
|
5438
|
-
break;
|
|
5439
|
-
}
|
|
5440
|
-
}
|
|
5441
|
-
} else
|
|
5442
|
-
_(u.group, {
|
|
5443
|
-
defaultLayoutDeferred: S,
|
|
5444
|
-
derivedPanelConstraints: v,
|
|
5445
|
-
groupSize: y,
|
|
5446
|
-
layout: M,
|
|
5447
|
-
separatorToPanels: P
|
|
5448
|
-
});
|
|
5449
|
-
}
|
|
5450
|
-
});
|
|
5451
|
-
let a = 0;
|
|
5452
|
-
t.movementX === 0 ? a |= l & Ae : a |= r & Ae, t.movementY === 0 ? a |= l & Ne : a |= r & Ne, At(a), xe(e);
|
|
5453
|
-
}
|
|
5454
|
-
function $e(e) {
|
|
5455
|
-
const t = U(), n = W();
|
|
5456
|
-
switch (n.state) {
|
|
5457
|
-
case "active":
|
|
5458
|
-
st({
|
|
5459
|
-
document: e.currentTarget,
|
|
5460
|
-
event: e,
|
|
5461
|
-
hitRegions: n.hitRegions,
|
|
5462
|
-
initialLayoutMap: n.initialLayoutMap,
|
|
5463
|
-
mountedGroups: t,
|
|
5464
|
-
prevCursorFlags: n.cursorFlags
|
|
5465
|
-
});
|
|
5466
|
-
}
|
|
5467
|
-
}
|
|
5468
|
-
function je(e) {
|
|
5469
|
-
if (e.defaultPrevented)
|
|
5470
|
-
return;
|
|
5471
|
-
const t = W(), n = U();
|
|
5472
|
-
switch (t.state) {
|
|
5473
|
-
case "active": {
|
|
5474
|
-
if (e.buttons === 0) {
|
|
5475
|
-
Z({
|
|
5476
|
-
cursorFlags: 0,
|
|
5477
|
-
state: "inactive"
|
|
5478
|
-
}), t.hitRegions.forEach((o) => {
|
|
5479
|
-
const i = $(o.group.id, true);
|
|
5480
|
-
_(o.group, i);
|
|
5481
|
-
});
|
|
5482
|
-
return;
|
|
5483
|
-
}
|
|
5484
|
-
for (const o of t.hitRegions)
|
|
5485
|
-
if (o.separator) {
|
|
5486
|
-
const { element: i } = o.separator;
|
|
5487
|
-
i.hasPointerCapture?.(e.pointerId) || i.setPointerCapture?.(e.pointerId);
|
|
5488
|
-
}
|
|
5489
|
-
st({
|
|
5490
|
-
document: e.currentTarget,
|
|
5491
|
-
event: e,
|
|
5492
|
-
hitRegions: t.hitRegions,
|
|
5493
|
-
initialLayoutMap: t.initialLayoutMap,
|
|
5494
|
-
mountedGroups: n,
|
|
5495
|
-
pointerDownAtPoint: t.pointerDownAtPoint,
|
|
5496
|
-
prevCursorFlags: t.cursorFlags
|
|
5497
|
-
});
|
|
5498
|
-
break;
|
|
5499
|
-
}
|
|
5500
|
-
default: {
|
|
5501
|
-
const o = ze(e, n);
|
|
5502
|
-
o.length === 0 ? t.state !== "inactive" && Z({
|
|
5503
|
-
cursorFlags: 0,
|
|
5504
|
-
state: "inactive"
|
|
5505
|
-
}) : Z({
|
|
5506
|
-
cursorFlags: 0,
|
|
5507
|
-
hitRegions: o,
|
|
5508
|
-
state: "hover"
|
|
5509
|
-
}), xe(e.currentTarget);
|
|
5510
|
-
break;
|
|
5511
|
-
}
|
|
5512
|
-
}
|
|
5513
|
-
}
|
|
5514
|
-
function He(e) {
|
|
5515
|
-
if (e.relatedTarget instanceof HTMLIFrameElement)
|
|
5516
|
-
switch (W().state) {
|
|
5517
|
-
case "hover":
|
|
5518
|
-
Z({
|
|
5519
|
-
cursorFlags: 0,
|
|
5520
|
-
state: "inactive"
|
|
5521
|
-
});
|
|
5522
|
-
}
|
|
5523
|
-
}
|
|
5524
|
-
function Ve(e) {
|
|
5525
|
-
if (e.defaultPrevented)
|
|
5526
|
-
return;
|
|
5527
|
-
if (e.pointerType === "mouse" && e.button > 0)
|
|
5528
|
-
return;
|
|
5529
|
-
const t = W();
|
|
5530
|
-
switch (t.state) {
|
|
5531
|
-
case "active":
|
|
5532
|
-
Z({
|
|
5533
|
-
cursorFlags: 0,
|
|
5534
|
-
state: "inactive"
|
|
5535
|
-
}), t.hitRegions.length > 0 && (xe(e.currentTarget), t.hitRegions.forEach((n) => {
|
|
5536
|
-
const o = $(n.group.id, true);
|
|
5537
|
-
_(n.group, o);
|
|
5538
|
-
}), e.preventDefault());
|
|
5539
|
-
}
|
|
5540
|
-
}
|
|
5541
|
-
function Be(e) {
|
|
5542
|
-
let t = 0, n = 0;
|
|
5543
|
-
const o = {};
|
|
5544
|
-
for (const s of e)
|
|
5545
|
-
if (s.defaultSize !== undefined) {
|
|
5546
|
-
t++;
|
|
5547
|
-
const l = D(s.defaultSize);
|
|
5548
|
-
n += l, o[s.panelId] = l;
|
|
5549
|
-
} else
|
|
5550
|
-
o[s.panelId] = undefined;
|
|
5551
|
-
const i = e.length - t;
|
|
5552
|
-
if (i !== 0) {
|
|
5553
|
-
const s = D((100 - n) / i);
|
|
5554
|
-
for (const l of e)
|
|
5555
|
-
l.defaultSize === undefined && (o[l.panelId] = s);
|
|
5556
|
-
}
|
|
5557
|
-
return o;
|
|
5558
|
-
}
|
|
5559
|
-
function Ft(e, t, n) {
|
|
5560
|
-
if (!n[0])
|
|
5561
|
-
return;
|
|
5562
|
-
const i = e.panels.find((u) => u.element === t);
|
|
5563
|
-
if (!i || !i.onResize)
|
|
5564
|
-
return;
|
|
5565
|
-
const s = Q({ group: e }), l = e.orientation === "horizontal" ? i.element.offsetWidth : i.element.offsetHeight, r = i.mutableValues.prevSize, a = {
|
|
5566
|
-
asPercentage: D(l / s * 100),
|
|
5567
|
-
inPixels: l
|
|
5568
|
-
};
|
|
5569
|
-
i.mutableValues.prevSize = a, i.onResize(a, i.id, r);
|
|
5570
|
-
}
|
|
5571
|
-
function $t(e, t) {
|
|
5572
|
-
if (Object.keys(e).length !== Object.keys(t).length)
|
|
5573
|
-
return false;
|
|
5574
|
-
for (const o in e)
|
|
5575
|
-
if (e[o] !== t[o])
|
|
5576
|
-
return false;
|
|
5577
|
-
return true;
|
|
5578
|
-
}
|
|
5579
|
-
function jt({
|
|
5580
|
-
group: e,
|
|
5581
|
-
nextGroupSize: t,
|
|
5582
|
-
prevGroupSize: n,
|
|
5583
|
-
prevLayout: o
|
|
5584
|
-
}) {
|
|
5585
|
-
if (n <= 0 || t <= 0 || n === t)
|
|
5586
|
-
return o;
|
|
5587
|
-
let i = 0, s = 0, l = false;
|
|
5588
|
-
const r = /* @__PURE__ */ new Map, a = [];
|
|
5589
|
-
for (const g of e.panels) {
|
|
5590
|
-
const d = o[g.id] ?? 0;
|
|
5591
|
-
switch (g.panelConstraints.groupResizeBehavior) {
|
|
5592
|
-
case "preserve-pixel-size": {
|
|
5593
|
-
l = true;
|
|
5594
|
-
const z = d / 100 * n, x = D(z / t * 100);
|
|
5595
|
-
r.set(g.id, x), i += x;
|
|
5596
|
-
break;
|
|
5597
|
-
}
|
|
5598
|
-
case "preserve-relative-size":
|
|
5599
|
-
default: {
|
|
5600
|
-
a.push(g.id), s += d;
|
|
5601
|
-
break;
|
|
5602
|
-
}
|
|
5603
|
-
}
|
|
5604
|
-
}
|
|
5605
|
-
if (!l || a.length === 0)
|
|
5606
|
-
return o;
|
|
5607
|
-
const u = 100 - i, f = { ...o };
|
|
5608
|
-
if (r.forEach((g, d) => {
|
|
5609
|
-
f[d] = g;
|
|
5610
|
-
}), s > 0)
|
|
5611
|
-
for (const g of a) {
|
|
5612
|
-
const d = o[g] ?? 0;
|
|
5613
|
-
f[g] = D(d / s * u);
|
|
5614
|
-
}
|
|
5615
|
-
else {
|
|
5616
|
-
const g = D(u / a.length);
|
|
5617
|
-
for (const d of a)
|
|
5618
|
-
f[d] = g;
|
|
5619
|
-
}
|
|
5620
|
-
return f;
|
|
5621
|
-
}
|
|
5622
|
-
function Ht(e, t) {
|
|
5623
|
-
const n = e.map((i) => i.id), o = Object.keys(t);
|
|
5624
|
-
if (n.length !== o.length)
|
|
5625
|
-
return false;
|
|
5626
|
-
for (const i of n)
|
|
5627
|
-
if (!o.includes(i))
|
|
5628
|
-
return false;
|
|
5629
|
-
return true;
|
|
5630
|
-
}
|
|
5631
|
-
var q = /* @__PURE__ */ new Map;
|
|
5632
|
-
function Vt(e) {
|
|
5633
|
-
let t = true;
|
|
5634
|
-
L(e.element.ownerDocument.defaultView, "Cannot register an unmounted Group");
|
|
5635
|
-
const n = e.element.ownerDocument.defaultView.ResizeObserver, o = /* @__PURE__ */ new Set, i = /* @__PURE__ */ new Set, s = new n((c) => {
|
|
5636
|
-
for (const p of c) {
|
|
5637
|
-
const { borderBoxSize: m, target: S } = p;
|
|
5638
|
-
if (S === e.element) {
|
|
5639
|
-
if (t) {
|
|
5640
|
-
const v = Q({ group: e });
|
|
5641
|
-
if (v === 0)
|
|
5642
|
-
return;
|
|
5643
|
-
const y = $(e.id);
|
|
5644
|
-
if (!y)
|
|
5645
|
-
return;
|
|
5646
|
-
const h = ye(e), P = y.defaultLayoutDeferred ? Be(h) : y.layout, M = jt({
|
|
5647
|
-
group: e,
|
|
5648
|
-
nextGroupSize: v,
|
|
5649
|
-
prevGroupSize: y.groupSize,
|
|
5650
|
-
prevLayout: P
|
|
5651
|
-
}), C = B({
|
|
5652
|
-
layout: M,
|
|
5653
|
-
panelConstraints: h
|
|
5654
|
-
});
|
|
5655
|
-
if (!y.defaultLayoutDeferred && V(y.layout, C) && $t(y.derivedPanelConstraints, h) && y.groupSize === v)
|
|
5656
|
-
return;
|
|
5657
|
-
_(e, {
|
|
5658
|
-
defaultLayoutDeferred: false,
|
|
5659
|
-
derivedPanelConstraints: h,
|
|
5660
|
-
groupSize: v,
|
|
5661
|
-
layout: C,
|
|
5662
|
-
separatorToPanels: y.separatorToPanels
|
|
5663
|
-
});
|
|
5664
|
-
}
|
|
5665
|
-
} else
|
|
5666
|
-
Ft(e, S, m);
|
|
5667
|
-
}
|
|
5668
|
-
});
|
|
5669
|
-
s.observe(e.element), e.panels.forEach((c) => {
|
|
5670
|
-
L(!o.has(c.id), `Panel ids must be unique; id "${c.id}" was used more than once`), o.add(c.id), c.onResize && s.observe(c.element);
|
|
5671
|
-
});
|
|
5672
|
-
const l = Q({ group: e }), r = ye(e), a = e.panels.map(({ id: c }) => c).join(",");
|
|
5673
|
-
let u = e.mutableState.defaultLayout;
|
|
5674
|
-
u && (Ht(e.panels, u) || (u = undefined));
|
|
5675
|
-
const f = e.mutableState.layouts[a] ?? u ?? Be(r), g = B({
|
|
5676
|
-
layout: f,
|
|
5677
|
-
panelConstraints: r
|
|
5678
|
-
}), d = e.element.ownerDocument;
|
|
5679
|
-
q.set(d, (q.get(d) ?? 0) + 1);
|
|
5680
|
-
const z = /* @__PURE__ */ new Map;
|
|
5681
|
-
return Ye(e).forEach((c) => {
|
|
5682
|
-
c.separator && z.set(c.separator, c.panels);
|
|
5683
|
-
}), _(e, {
|
|
5684
|
-
defaultLayoutDeferred: l === 0,
|
|
5685
|
-
derivedPanelConstraints: r,
|
|
5686
|
-
groupSize: l,
|
|
5687
|
-
layout: g,
|
|
5688
|
-
separatorToPanels: z
|
|
5689
|
-
}), e.separators.forEach((c) => {
|
|
5690
|
-
L(!i.has(c.id), `Separator ids must be unique; id "${c.id}" was used more than once`), i.add(c.id), c.element.addEventListener("keydown", Oe);
|
|
5691
|
-
}), q.get(d) === 1 && (d.addEventListener("dblclick", Te, true), d.addEventListener("pointerdown", Ge, true), d.addEventListener("pointerleave", $e), d.addEventListener("pointermove", je), d.addEventListener("pointerout", He), d.addEventListener("pointerup", Ve, true)), function() {
|
|
5692
|
-
t = false, q.set(d, Math.max(0, (q.get(d) ?? 0) - 1)), Lt(e), e.separators.forEach((p) => {
|
|
5693
|
-
p.element.removeEventListener("keydown", Oe);
|
|
5694
|
-
}), q.get(d) || (d.removeEventListener("dblclick", Te, true), d.removeEventListener("pointerdown", Ge, true), d.removeEventListener("pointerleave", $e), d.removeEventListener("pointermove", je), d.removeEventListener("pointerout", He), d.removeEventListener("pointerup", Ve, true)), s.disconnect();
|
|
5695
|
-
};
|
|
5696
|
-
}
|
|
5697
|
-
function Bt() {
|
|
5698
|
-
const [e, t] = re({}), n = ne(() => t({}), []);
|
|
5699
|
-
return [e, n];
|
|
5700
|
-
}
|
|
5701
|
-
function we(e) {
|
|
5702
|
-
const t = pt();
|
|
5703
|
-
return `${e ?? t}`;
|
|
5704
|
-
}
|
|
5705
|
-
var K = typeof window < "u" ? We : pe;
|
|
5706
|
-
function oe(e) {
|
|
5707
|
-
const t = T(e);
|
|
5708
|
-
return K(() => {
|
|
5709
|
-
t.current = e;
|
|
5710
|
-
}, [e]), ne((...n) => t.current?.(...n), [t]);
|
|
5711
|
-
}
|
|
5712
|
-
function Pe(...e) {
|
|
5713
|
-
return oe((t) => {
|
|
5714
|
-
e.forEach((n) => {
|
|
5715
|
-
if (n)
|
|
5716
|
-
switch (typeof n) {
|
|
5717
|
-
case "function": {
|
|
5718
|
-
n(t);
|
|
5719
|
-
break;
|
|
5720
|
-
}
|
|
5721
|
-
case "object": {
|
|
5722
|
-
n.current = t;
|
|
5723
|
-
break;
|
|
5724
|
-
}
|
|
5725
|
-
}
|
|
5726
|
-
});
|
|
5727
|
-
});
|
|
5728
|
-
}
|
|
5729
|
-
function Le(e) {
|
|
5730
|
-
const t = T({ ...e });
|
|
5731
|
-
return K(() => {
|
|
5732
|
-
for (const n in e)
|
|
5733
|
-
t.current[n] = e[n];
|
|
5734
|
-
}, [e]), t.current;
|
|
5735
|
-
}
|
|
5736
|
-
var at = ht(null);
|
|
5737
|
-
function Wt(e, t) {
|
|
5738
|
-
const n = T({
|
|
5739
|
-
getLayout: () => ({}),
|
|
5740
|
-
setLayout: Nt
|
|
5741
|
-
});
|
|
5742
|
-
Ue(t, () => n.current, []), K(() => {
|
|
5743
|
-
Object.assign(n.current, tt({ groupId: e }));
|
|
5744
|
-
});
|
|
5745
|
-
}
|
|
5746
|
-
function Ut({
|
|
5747
|
-
children: e,
|
|
5748
|
-
className: t,
|
|
5749
|
-
defaultLayout: n,
|
|
5750
|
-
disableCursor: o,
|
|
5751
|
-
disabled: i,
|
|
5752
|
-
elementRef: s,
|
|
5753
|
-
groupRef: l,
|
|
5754
|
-
id: r,
|
|
5755
|
-
onLayoutChange: a,
|
|
5756
|
-
onLayoutChanged: u,
|
|
5757
|
-
orientation: f = "horizontal",
|
|
5758
|
-
resizeTargetMinimumSize: g = {
|
|
5759
|
-
coarse: 20,
|
|
5760
|
-
fine: 10
|
|
5761
|
-
},
|
|
5762
|
-
style: d,
|
|
5763
|
-
...z
|
|
5764
|
-
}) {
|
|
5765
|
-
const x = T({
|
|
5766
|
-
onLayoutChange: {},
|
|
5767
|
-
onLayoutChanged: {}
|
|
5768
|
-
}), c = oe((b) => {
|
|
5769
|
-
V(x.current.onLayoutChange, b) || (x.current.onLayoutChange = b, a?.(b));
|
|
5770
|
-
}), p = oe((b) => {
|
|
5771
|
-
V(x.current.onLayoutChanged, b) || (x.current.onLayoutChanged = b, u?.(b));
|
|
5772
|
-
}), m = we(r), S = T(null), [v, y] = Bt(), h = T({
|
|
5773
|
-
lastExpandedPanelSizes: {},
|
|
5774
|
-
layouts: {},
|
|
5775
|
-
panels: [],
|
|
5776
|
-
resizeTargetMinimumSize: g,
|
|
5777
|
-
separators: []
|
|
5778
|
-
}), P = Pe(S, s);
|
|
5779
|
-
Wt(m, l);
|
|
5780
|
-
const M = oe((b, w) => {
|
|
5781
|
-
const E = W(), R = Ee(b), k = $(b);
|
|
5782
|
-
if (k) {
|
|
5783
|
-
let O = false;
|
|
5784
|
-
switch (E.state) {
|
|
5785
|
-
case "active": {
|
|
5786
|
-
O = E.hitRegions.some((j) => j.group === R);
|
|
5787
|
-
break;
|
|
5788
|
-
}
|
|
5789
|
-
}
|
|
5790
|
-
return {
|
|
5791
|
-
flexGrow: k.layout[w] ?? 1,
|
|
5792
|
-
pointerEvents: O ? "none" : undefined
|
|
5793
|
-
};
|
|
5794
|
-
}
|
|
5795
|
-
if (n?.[w])
|
|
5796
|
-
return {
|
|
5797
|
-
flexGrow: n?.[w]
|
|
5798
|
-
};
|
|
5799
|
-
}), C = Le({
|
|
5800
|
-
defaultLayout: n,
|
|
5801
|
-
disableCursor: o
|
|
5802
|
-
}), X = ge(() => ({
|
|
5803
|
-
get disableCursor() {
|
|
5804
|
-
return !!C.disableCursor;
|
|
5805
|
-
},
|
|
5806
|
-
getPanelStyles: M,
|
|
5807
|
-
id: m,
|
|
5808
|
-
orientation: f,
|
|
5809
|
-
registerPanel: (b) => {
|
|
5810
|
-
const w = h.current;
|
|
5811
|
-
return w.panels = Se(f, [
|
|
5812
|
-
...w.panels,
|
|
5813
|
-
b
|
|
5814
|
-
]), y(), () => {
|
|
5815
|
-
w.panels = w.panels.filter((E) => E !== b), y();
|
|
5816
|
-
};
|
|
5817
|
-
},
|
|
5818
|
-
registerSeparator: (b) => {
|
|
5819
|
-
const w = h.current;
|
|
5820
|
-
return w.separators = Se(f, [
|
|
5821
|
-
...w.separators,
|
|
5822
|
-
b
|
|
5823
|
-
]), y(), () => {
|
|
5824
|
-
w.separators = w.separators.filter((E) => E !== b), y();
|
|
5825
|
-
};
|
|
5826
|
-
},
|
|
5827
|
-
togglePanelDisabled: (b, w) => {
|
|
5828
|
-
const R = h.current.panels.find((j) => j.id === b);
|
|
5829
|
-
R && (R.panelConstraints.disabled = w);
|
|
5830
|
-
const k = Ee(m), O = $(m);
|
|
5831
|
-
k && O && _(k, {
|
|
5832
|
-
...O,
|
|
5833
|
-
derivedPanelConstraints: ye(k)
|
|
5834
|
-
});
|
|
5835
|
-
},
|
|
5836
|
-
toggleSeparatorDisabled: (b, w) => {
|
|
5837
|
-
const R = h.current.separators.find((k) => k.id === b);
|
|
5838
|
-
R && (R.disabled = w);
|
|
5839
|
-
}
|
|
5840
|
-
}), [M, m, y, f, C]), F = T(null);
|
|
5841
|
-
return K(() => {
|
|
5842
|
-
const b = S.current;
|
|
5843
|
-
if (b === null)
|
|
5844
|
-
return;
|
|
5845
|
-
const w = h.current;
|
|
5846
|
-
let E;
|
|
5847
|
-
if (C.defaultLayout !== undefined && Object.keys(C.defaultLayout).length === w.panels.length) {
|
|
5848
|
-
E = {};
|
|
5849
|
-
for (const ee of w.panels) {
|
|
5850
|
-
const ae = C.defaultLayout[ee.id];
|
|
5851
|
-
ae !== undefined && (E[ee.id] = ae);
|
|
5852
|
-
}
|
|
5853
|
-
}
|
|
5854
|
-
const R = {
|
|
5855
|
-
disabled: !!i,
|
|
5856
|
-
element: b,
|
|
5857
|
-
id: m,
|
|
5858
|
-
mutableState: {
|
|
5859
|
-
defaultLayout: E,
|
|
5860
|
-
disableCursor: !!C.disableCursor,
|
|
5861
|
-
expandedPanelSizes: h.current.lastExpandedPanelSizes,
|
|
5862
|
-
layouts: h.current.layouts
|
|
5863
|
-
},
|
|
5864
|
-
orientation: f,
|
|
5865
|
-
panels: w.panels,
|
|
5866
|
-
resizeTargetMinimumSize: w.resizeTargetMinimumSize,
|
|
5867
|
-
separators: w.separators
|
|
5868
|
-
};
|
|
5869
|
-
F.current = R;
|
|
5870
|
-
const k = Vt(R), { defaultLayoutDeferred: O, derivedPanelConstraints: j, layout: Re } = $(R.id, true);
|
|
5871
|
-
!O && j.length > 0 && (c(Re), p(Re));
|
|
5872
|
-
const lt = ve(m, (ee) => {
|
|
5873
|
-
const { defaultLayoutDeferred: ae, derivedPanelConstraints: Me, layout: le } = ee.next;
|
|
5874
|
-
if (ae || Me.length === 0)
|
|
5875
|
-
return;
|
|
5876
|
-
const ut = R.panels.map(({ id: N }) => N).join(",");
|
|
5877
|
-
R.mutableState.layouts[ut] = le, Me.forEach((N) => {
|
|
5878
|
-
if (N.collapsible) {
|
|
5879
|
-
const { layout: he } = ee.prev ?? {};
|
|
5880
|
-
if (he) {
|
|
5881
|
-
const ft = I(N.collapsedSize, le[N.panelId]), dt = I(N.collapsedSize, he[N.panelId]);
|
|
5882
|
-
ft && !dt && (R.mutableState.expandedPanelSizes[N.panelId] = he[N.panelId]);
|
|
5883
|
-
}
|
|
5884
|
-
}
|
|
5885
|
-
});
|
|
5886
|
-
const ct = W().state !== "active";
|
|
5887
|
-
c(le), ct && p(le);
|
|
5888
|
-
});
|
|
5889
|
-
return () => {
|
|
5890
|
-
F.current = null, k(), lt();
|
|
5891
|
-
};
|
|
5892
|
-
}, [
|
|
5893
|
-
i,
|
|
5894
|
-
m,
|
|
5895
|
-
p,
|
|
5896
|
-
c,
|
|
5897
|
-
f,
|
|
5898
|
-
v,
|
|
5899
|
-
C
|
|
5900
|
-
]), pe(() => {
|
|
5901
|
-
const b = F.current;
|
|
5902
|
-
b && (b.mutableState.defaultLayout = n, b.mutableState.disableCursor = !!o);
|
|
5903
|
-
}), /* @__PURE__ */ ie(at.Provider, { value: X, children: /* @__PURE__ */ ie("div", {
|
|
5904
|
-
...z,
|
|
5905
|
-
className: t,
|
|
5906
|
-
"data-group": true,
|
|
5907
|
-
"data-testid": m,
|
|
5908
|
-
id: m,
|
|
5909
|
-
ref: P,
|
|
5910
|
-
style: {
|
|
5911
|
-
height: "100%",
|
|
5912
|
-
width: "100%",
|
|
5913
|
-
overflow: "hidden",
|
|
5914
|
-
...d,
|
|
5915
|
-
display: "flex",
|
|
5916
|
-
flexDirection: f === "horizontal" ? "row" : "column",
|
|
5917
|
-
flexWrap: "nowrap",
|
|
5918
|
-
touchAction: f === "horizontal" ? "pan-y" : "pan-x"
|
|
5919
|
-
},
|
|
5920
|
-
children: e
|
|
5921
|
-
}) });
|
|
5922
|
-
}
|
|
5923
|
-
Ut.displayName = "Group";
|
|
5924
|
-
function Ce() {
|
|
5925
|
-
const e = mt(at);
|
|
5926
|
-
return L(e, "Group Context not found; did you render a Panel or Separator outside of a Group?"), e;
|
|
5927
|
-
}
|
|
5928
|
-
function qt(e, t) {
|
|
5929
|
-
const { id: n } = Ce(), o = T({
|
|
5930
|
-
collapse: me,
|
|
5931
|
-
expand: me,
|
|
5932
|
-
getSize: () => ({
|
|
5933
|
-
asPercentage: 0,
|
|
5934
|
-
inPixels: 0
|
|
5935
|
-
}),
|
|
5936
|
-
isCollapsed: () => false,
|
|
5937
|
-
resize: me
|
|
5938
|
-
});
|
|
5939
|
-
Ue(t, () => o.current, []), K(() => {
|
|
5940
|
-
Object.assign(o.current, et({ groupId: n, panelId: e }));
|
|
5941
|
-
});
|
|
5942
|
-
}
|
|
5943
|
-
function Yt({
|
|
5944
|
-
children: e,
|
|
5945
|
-
className: t,
|
|
5946
|
-
collapsedSize: n = "0%",
|
|
5947
|
-
collapsible: o = false,
|
|
5948
|
-
defaultSize: i,
|
|
5949
|
-
disabled: s,
|
|
5950
|
-
elementRef: l,
|
|
5951
|
-
groupResizeBehavior: r = "preserve-relative-size",
|
|
5952
|
-
id: a,
|
|
5953
|
-
maxSize: u = "100%",
|
|
5954
|
-
minSize: f = "0%",
|
|
5955
|
-
onResize: g,
|
|
5956
|
-
panelRef: d,
|
|
5957
|
-
style: z,
|
|
5958
|
-
...x
|
|
5959
|
-
}) {
|
|
5960
|
-
const c = !!a, p = we(a), m = Le({
|
|
5961
|
-
disabled: s
|
|
5962
|
-
}), S = T(null), v = Pe(S, l), {
|
|
5963
|
-
getPanelStyles: y,
|
|
5964
|
-
id: h,
|
|
5965
|
-
orientation: P,
|
|
5966
|
-
registerPanel: M,
|
|
5967
|
-
togglePanelDisabled: C
|
|
5968
|
-
} = Ce(), X = g !== null, F = oe((R, k, O) => {
|
|
5969
|
-
g?.(R, a, O);
|
|
5970
|
-
});
|
|
5971
|
-
K(() => {
|
|
5972
|
-
const R = S.current;
|
|
5973
|
-
if (R !== null) {
|
|
5974
|
-
const k = {
|
|
5975
|
-
element: R,
|
|
5976
|
-
id: p,
|
|
5977
|
-
idIsStable: c,
|
|
5978
|
-
mutableValues: {
|
|
5979
|
-
expandToSize: undefined,
|
|
5980
|
-
prevSize: undefined
|
|
5981
|
-
},
|
|
5982
|
-
onResize: X ? F : undefined,
|
|
5983
|
-
panelConstraints: {
|
|
5984
|
-
groupResizeBehavior: r,
|
|
5985
|
-
collapsedSize: n,
|
|
5986
|
-
collapsible: o,
|
|
5987
|
-
defaultSize: i,
|
|
5988
|
-
disabled: m.disabled,
|
|
5989
|
-
maxSize: u,
|
|
5990
|
-
minSize: f
|
|
5991
|
-
}
|
|
5992
|
-
};
|
|
5993
|
-
return M(k);
|
|
5994
|
-
}
|
|
5995
|
-
}, [
|
|
5996
|
-
r,
|
|
5997
|
-
n,
|
|
5998
|
-
o,
|
|
5999
|
-
i,
|
|
6000
|
-
X,
|
|
6001
|
-
p,
|
|
6002
|
-
c,
|
|
6003
|
-
u,
|
|
6004
|
-
f,
|
|
6005
|
-
F,
|
|
6006
|
-
M,
|
|
6007
|
-
m
|
|
6008
|
-
]), pe(() => {
|
|
6009
|
-
C(p, !!s);
|
|
6010
|
-
}, [s, p, C]), qt(p, d);
|
|
6011
|
-
const b = () => {
|
|
6012
|
-
const R = y(h, p);
|
|
6013
|
-
if (R)
|
|
6014
|
-
return JSON.stringify(R);
|
|
6015
|
-
}, w = Ke((R) => ve(h, R), b, b);
|
|
6016
|
-
let E;
|
|
6017
|
-
return w ? E = JSON.parse(w) : i ? E = {
|
|
6018
|
-
flexGrow: undefined,
|
|
6019
|
-
flexShrink: undefined,
|
|
6020
|
-
flexBasis: i
|
|
6021
|
-
} : E = { flexGrow: 1 }, /* @__PURE__ */ ie("div", {
|
|
6022
|
-
...x,
|
|
6023
|
-
"data-disabled": s || undefined,
|
|
6024
|
-
"data-panel": true,
|
|
6025
|
-
"data-testid": p,
|
|
6026
|
-
id: p,
|
|
6027
|
-
ref: v,
|
|
6028
|
-
style: {
|
|
6029
|
-
...Jt,
|
|
6030
|
-
display: "flex",
|
|
6031
|
-
flexBasis: 0,
|
|
6032
|
-
flexShrink: 1,
|
|
6033
|
-
overflow: "visible",
|
|
6034
|
-
...E
|
|
6035
|
-
},
|
|
6036
|
-
children: /* @__PURE__ */ ie("div", {
|
|
6037
|
-
className: t,
|
|
6038
|
-
style: {
|
|
6039
|
-
maxHeight: "100%",
|
|
6040
|
-
maxWidth: "100%",
|
|
6041
|
-
flexGrow: 1,
|
|
6042
|
-
overflow: "auto",
|
|
6043
|
-
...z,
|
|
6044
|
-
touchAction: P === "horizontal" ? "pan-y" : "pan-x"
|
|
6045
|
-
},
|
|
6046
|
-
children: e
|
|
6047
|
-
})
|
|
6048
|
-
});
|
|
6049
|
-
}
|
|
6050
|
-
Yt.displayName = "Panel";
|
|
6051
|
-
var Jt = {
|
|
6052
|
-
minHeight: 0,
|
|
6053
|
-
maxHeight: "100%",
|
|
6054
|
-
height: "auto",
|
|
6055
|
-
minWidth: 0,
|
|
6056
|
-
maxWidth: "100%",
|
|
6057
|
-
width: "auto",
|
|
6058
|
-
border: "none",
|
|
6059
|
-
borderWidth: 0,
|
|
6060
|
-
padding: 0,
|
|
6061
|
-
margin: 0
|
|
6062
|
-
};
|
|
6063
|
-
function Zt({
|
|
6064
|
-
layout: e,
|
|
6065
|
-
panelConstraints: t,
|
|
6066
|
-
panelId: n,
|
|
6067
|
-
panelIndex: o
|
|
6068
|
-
}) {
|
|
6069
|
-
let i, s;
|
|
6070
|
-
const l = e[n], r = t.find((a) => a.panelId === n);
|
|
6071
|
-
if (r) {
|
|
6072
|
-
const a = r.maxSize, u = r.collapsible ? r.collapsedSize : r.minSize, f = [o, o + 1];
|
|
6073
|
-
s = B({
|
|
6074
|
-
layout: se({
|
|
6075
|
-
delta: u - l,
|
|
6076
|
-
initialLayout: e,
|
|
6077
|
-
panelConstraints: t,
|
|
6078
|
-
pivotIndices: f,
|
|
6079
|
-
prevLayout: e
|
|
6080
|
-
}),
|
|
6081
|
-
panelConstraints: t
|
|
6082
|
-
})[n], i = B({
|
|
6083
|
-
layout: se({
|
|
6084
|
-
delta: a - l,
|
|
6085
|
-
initialLayout: e,
|
|
6086
|
-
panelConstraints: t,
|
|
6087
|
-
pivotIndices: f,
|
|
6088
|
-
prevLayout: e
|
|
6089
|
-
}),
|
|
6090
|
-
panelConstraints: t
|
|
6091
|
-
})[n];
|
|
6092
|
-
}
|
|
6093
|
-
return {
|
|
6094
|
-
valueControls: n,
|
|
6095
|
-
valueMax: i,
|
|
6096
|
-
valueMin: s,
|
|
6097
|
-
valueNow: l
|
|
6098
|
-
};
|
|
6099
|
-
}
|
|
6100
|
-
function Qt({
|
|
6101
|
-
children: e,
|
|
6102
|
-
className: t,
|
|
6103
|
-
disabled: n,
|
|
6104
|
-
elementRef: o,
|
|
6105
|
-
id: i,
|
|
6106
|
-
style: s,
|
|
6107
|
-
...l
|
|
6108
|
-
}) {
|
|
6109
|
-
const r = we(i), a = Le({
|
|
6110
|
-
disabled: n
|
|
6111
|
-
}), [u, f] = re({}), [g, d] = re("inactive"), z = T(null), x = Pe(z, o), {
|
|
6112
|
-
disableCursor: c,
|
|
6113
|
-
id: p,
|
|
6114
|
-
orientation: m,
|
|
6115
|
-
registerSeparator: S,
|
|
6116
|
-
toggleSeparatorDisabled: v
|
|
6117
|
-
} = Ce(), y = m === "horizontal" ? "vertical" : "horizontal";
|
|
6118
|
-
K(() => {
|
|
6119
|
-
const P = z.current;
|
|
6120
|
-
if (P !== null) {
|
|
6121
|
-
const M = {
|
|
6122
|
-
disabled: a.disabled,
|
|
6123
|
-
element: P,
|
|
6124
|
-
id: r
|
|
6125
|
-
}, C = S(M), X = Gt((b) => {
|
|
6126
|
-
d(b.next.state !== "inactive" && b.next.hitRegions.some((w) => w.separator === M) ? b.next.state : "inactive");
|
|
6127
|
-
}), F = ve(p, (b) => {
|
|
6128
|
-
const { derivedPanelConstraints: w, layout: E, separatorToPanels: R } = b.next, k = R.get(M);
|
|
6129
|
-
if (k) {
|
|
6130
|
-
const O = k[0], j = k.indexOf(O);
|
|
6131
|
-
f(Zt({
|
|
6132
|
-
layout: E,
|
|
6133
|
-
panelConstraints: w,
|
|
6134
|
-
panelId: O.id,
|
|
6135
|
-
panelIndex: j
|
|
6136
|
-
}));
|
|
6137
|
-
}
|
|
6138
|
-
});
|
|
6139
|
-
return () => {
|
|
6140
|
-
X(), F(), C();
|
|
6141
|
-
};
|
|
6142
|
-
}
|
|
6143
|
-
}, [p, r, S, a]), pe(() => {
|
|
6144
|
-
v(r, !!n);
|
|
6145
|
-
}, [n, r, v]);
|
|
6146
|
-
let h;
|
|
6147
|
-
return n && !c && (h = "not-allowed"), /* @__PURE__ */ ie("div", {
|
|
6148
|
-
...l,
|
|
6149
|
-
"aria-controls": u.valueControls,
|
|
6150
|
-
"aria-disabled": n || undefined,
|
|
6151
|
-
"aria-orientation": y,
|
|
6152
|
-
"aria-valuemax": u.valueMax,
|
|
6153
|
-
"aria-valuemin": u.valueMin,
|
|
6154
|
-
"aria-valuenow": u.valueNow,
|
|
6155
|
-
children: e,
|
|
6156
|
-
className: t,
|
|
6157
|
-
"data-separator": n ? "disabled" : g,
|
|
6158
|
-
"data-testid": r,
|
|
6159
|
-
id: r,
|
|
6160
|
-
ref: x,
|
|
6161
|
-
role: "separator",
|
|
6162
|
-
style: {
|
|
6163
|
-
flexBasis: "auto",
|
|
6164
|
-
cursor: h,
|
|
6165
|
-
...s,
|
|
6166
|
-
flexGrow: 0,
|
|
6167
|
-
flexShrink: 0,
|
|
6168
|
-
touchAction: "none"
|
|
6169
|
-
},
|
|
6170
|
-
tabIndex: n ? undefined : 0
|
|
6171
|
-
});
|
|
6172
|
-
}
|
|
6173
|
-
Qt.displayName = "Separator";
|
|
6174
|
-
|
|
6175
|
-
// node_modules/@principal-ade/panels/dist/index.esm.js
|
|
6176
|
-
import { unstable_batchedUpdates as y, createPortal as w } from "react-dom";
|
|
6177
|
-
function C(e2) {
|
|
6178
|
-
return { "--panel-background": e2.colors.background, "--panel-border": e2.colors.border, "--panel-handle": e2.colors.backgroundSecondary, "--panel-handle-hover": e2.colors.backgroundHover, "--panel-handle-active": e2.colors.primary, "--panel-button-bg": e2.colors.surface, "--panel-button-hover": e2.colors.backgroundHover, "--panel-button-border": e2.colors.border, "--panel-button-icon": e2.colors.textSecondary, "--panel-accent-bg": e2.colors.primary + "15" };
|
|
6179
|
-
}
|
|
6180
|
-
function N(e2) {
|
|
6181
|
-
return { "--tab-list-bg": e2.colors.backgroundSecondary, "--tab-border": e2.colors.border, "--tab-bg": e2.colors.surface, "--tab-bg-hover": e2.colors.backgroundHover, "--tab-bg-active": e2.colors.primary, "--tab-text": e2.colors.textSecondary, "--tab-text-hover": e2.colors.text, "--tab-text-active": e2.colors.background, "--tab-icon-color": e2.colors.textTertiary, "--tab-icon-active": e2.colors.background, "--tab-border-hover": e2.colors.textSecondary, "--tab-border-active": e2.colors.primary, "--tab-focus": e2.colors.primary, "--tab-content-bg": e2.colors.background, "--tab-empty-text": e2.colors.textMuted, "--tab-font-family": e2.fonts.body, "--tab-font-size": "11px", "--tab-font-weight": String(e2.fontWeights.medium), "--mobile-tab-text-active": e2.colors.primary, "--mobile-tab-icon-active": e2.colors.primary };
|
|
6182
|
-
}
|
|
6183
|
-
var S = ({ leftPanel: n2, rightPanel: r2, collapsibleSide: s2 = "left", defaultSize: c2 = 25, minSize: d2 = 5, className: u2 = "", collapsed: p2 = false, style: h2, showCollapseButton: g2 = false, animationDuration: m2 = 300, animationEasing: y2 = "cubic-bezier(0.4, 0, 0.2, 1)", onCollapseStart: w2, onCollapseComplete: x, onExpandStart: N2, onExpandComplete: S2, theme: E }) => {
|
|
6184
|
-
const [D2, R] = o(p2), [z, k] = o(false), [L2, P] = o(false), [T2, A2] = o(p2), [M, $2] = o(p2 ? 0 : c2), B2 = l(null), O = l(undefined), F = l(undefined), I2 = l(undefined), H2 = i((e2, t2, n3) => {
|
|
6185
|
-
if (!B2.current)
|
|
6186
|
-
return;
|
|
6187
|
-
O.current && cancelAnimationFrame(O.current), F.current = performance.now();
|
|
6188
|
-
const r3 = (o2) => {
|
|
6189
|
-
if (!F.current || !B2.current)
|
|
6190
|
-
return;
|
|
6191
|
-
const l2 = o2 - F.current, i2 = Math.min(l2 / m2, 1), a2 = i2 < 0.5 ? 4 * i2 * i2 * i2 : 1 - Math.pow(-2 * i2 + 2, 3) / 2, s3 = e2 + (t2 - e2) * a2;
|
|
6192
|
-
console.log("[AnimatedResizableLayout] resize:", { fromSize: e2, toSize: t2, progress: i2, eased: a2, newSize: s3 }), B2.current.resize(`${s3}%`), i2 < 1 ? O.current = requestAnimationFrame(r3) : (t2 === 0 ? B2.current.collapse() : B2.current.resize(`${t2}%`), k(false), n3 && n3());
|
|
6193
|
-
};
|
|
6194
|
-
O.current = requestAnimationFrame(r3);
|
|
6195
|
-
}, [m2]), W2 = i(() => {
|
|
6196
|
-
z || L2 || (k(true), R(true), w2 && w2(), H2(M, 0, () => {
|
|
6197
|
-
$2(0), A2(true), x && x();
|
|
6198
|
-
}));
|
|
6199
|
-
}, [z, L2, M, H2, w2, x]), j = i(() => {
|
|
6200
|
-
z || L2 || (k(true), R(false), A2(false), N2 && N2(), B2.current && (B2.current.expand(), B2.current.resize("0%")), H2(0, c2, () => {
|
|
6201
|
-
$2(c2), S2 && S2();
|
|
6202
|
-
}));
|
|
6203
|
-
}, [z, L2, c2, H2, N2, S2]), q2 = i(() => {
|
|
6204
|
-
D2 ? j() : W2();
|
|
6205
|
-
}, [D2, W2, j]), K2 = i((e2) => {
|
|
6206
|
-
if (!z) {
|
|
6207
|
-
const t2 = e2.asPercentage;
|
|
6208
|
-
$2(t2), t2 > 0 && R(false);
|
|
6209
|
-
}
|
|
6210
|
-
}, [z]), U2 = i(() => {
|
|
6211
|
-
z || P(true);
|
|
6212
|
-
}, [z]), X = i(() => {
|
|
6213
|
-
P(false);
|
|
6214
|
-
}, []);
|
|
6215
|
-
a(() => {
|
|
6216
|
-
p2 !== D2 && (p2 ? W2() : j());
|
|
6217
|
-
}, [p2]), a(() => {
|
|
6218
|
-
p2 && !z ? A2(true) : p2 || z || A2(false);
|
|
6219
|
-
}, [p2, z]), a(() => {
|
|
6220
|
-
p2 && B2.current && requestAnimationFrame(() => {
|
|
6221
|
-
B2.current?.collapse();
|
|
6222
|
-
});
|
|
6223
|
-
}, []), a(() => {
|
|
6224
|
-
const e2 = O.current, t2 = I2.current;
|
|
6225
|
-
return () => {
|
|
6226
|
-
e2 && cancelAnimationFrame(e2), t2 && clearTimeout(t2);
|
|
6227
|
-
};
|
|
6228
|
-
}, []);
|
|
6229
|
-
const Y2 = s2 === "left", V2 = D2 ? Y2 ? "▸" : "◂" : Y2 ? "◂" : "▸", J2 = C(E), G2 = z && !L2 ? { transition: `flex ${m2}ms ${y2}` } : undefined, _2 = (e2) => {
|
|
6230
|
-
let t2 = "hybrid-panel";
|
|
6231
|
-
return e2 && (t2 += " collapsible-panel", z && !L2 && (t2 += " animating"), D2 && (t2 += " collapsed")), t2;
|
|
6232
|
-
};
|
|
6233
|
-
return e("div", { className: `animated-resizable-layout ${u2}`, style: { ...J2, ...h2 }, children: /* @__PURE__ */ t(Ut, { orientation: "horizontal", onLayoutChange: U2, onLayoutChanged: X, children: [
|
|
6234
|
-
/* @__PURE__ */ e(Yt, { panelRef: Y2 ? B2 : undefined, collapsible: Y2, defaultSize: Y2 ? p2 ? "0%" : `${c2}%` : undefined, minSize: Y2 ? `${d2}%` : "30%", collapsedSize: "0%", onResize: Y2 ? K2 : undefined, className: _2(Y2), style: Y2 ? G2 : undefined, children: /* @__PURE__ */ e("div", { className: "panel-content-wrapper", style: { opacity: Y2 && D2 ? 0 : 1, transition: z ? `opacity ${0.5 * m2}ms ${y2}` : "none" }, children: n2 }) }),
|
|
6235
|
-
/* @__PURE__ */ e(Qt, { className: "resize-handle " + (T2 ? "collapsed" : ""), style: T2 ? { visibility: "hidden", width: 0 } : undefined, children: g2 && /* @__PURE__ */ e("div", { className: "handle-bar", children: /* @__PURE__ */ e("button", { onClick: q2, className: "collapse-toggle", disabled: z, "aria-label": D2 ? "Expand panel" : "Collapse panel", children: V2 }) }) }),
|
|
6236
|
-
/* @__PURE__ */ e(Yt, { panelRef: Y2 ? undefined : B2, collapsible: !Y2, defaultSize: Y2 ? undefined : p2 ? "0%" : `${c2}%`, minSize: Y2 ? "30%" : `${d2}%`, collapsedSize: "0%", onResize: Y2 ? undefined : K2, className: _2(!Y2), style: Y2 ? undefined : G2, children: /* @__PURE__ */ e("div", { className: "panel-content-wrapper", style: { opacity: !Y2 && D2 ? 0 : 1, transition: z ? `opacity ${0.5 * m2}ms ${y2}` : "none" }, children: r2 }) })
|
|
6237
|
-
] }) });
|
|
6238
|
-
};
|
|
6239
|
-
var z = ({ panelIds: r2, panels: l2, config: i2 = {}, className: s2 = "", theme: c2 }) => {
|
|
6240
|
-
const { defaultActiveTab: d2 = 0, tabPosition: u2 = "top", centered: p2 = true, hideTabList: h2 = false, activeTabIndex: g2, onTabChange: m2 } = i2, [v, f] = o(d2), b = g2 !== undefined, y2 = b ? g2 : v;
|
|
6241
|
-
a(() => {
|
|
6242
|
-
b || f(d2);
|
|
6243
|
-
}, [d2, b]);
|
|
6244
|
-
const w2 = N(c2), x = r2.map((e2) => l2.find((t2) => t2.id === e2)).filter((e2) => e2 !== undefined), C2 = Math.min(y2, x.length - 1), S2 = x[C2];
|
|
6245
|
-
if (x.length === 0)
|
|
6246
|
-
return e("div", { className: "tab-group-empty", children: "No panels available" });
|
|
6247
|
-
const E = /* @__PURE__ */ e("div", { className: "tab-list " + (u2 === "top" || u2 === "bottom" || p2 ? "centered" : ""), role: "tablist", children: x.map((r3, o2) => /* @__PURE__ */ e("button", { role: "tab", "aria-selected": o2 === C2, "aria-controls": `tabpanel-${r3.id}`, id: `tab-${r3.id}`, className: "tab-button " + (o2 === C2 ? "active" : ""), onClick: () => ((e2) => {
|
|
6248
|
-
b || f(e2), m2?.(e2);
|
|
6249
|
-
})(o2), title: r3.icon ? r3.label : undefined, children: r3.icon ? /* @__PURE__ */ t(n, { children: [
|
|
6250
|
-
/* @__PURE__ */ e("span", { className: "tab-icon", children: r3.icon }),
|
|
6251
|
-
/* @__PURE__ */ e("span", { className: "tab-label", children: r3.label })
|
|
6252
|
-
] }) : r3.label }, r3.id)) }), D2 = S2 ? /* @__PURE__ */ e("div", { className: "tab-content", role: "tabpanel", id: `tabpanel-${S2.id}`, "aria-labelledby": `tab-${S2.id}`, children: S2.content }) : null;
|
|
6253
|
-
return t("div", { className: `tab-group tab-position-${u2} ${s2}`, style: w2, children: [!h2 && (u2 === "top" || u2 === "left") && E, D2, !h2 && (u2 === "bottom" || u2 === "right") && E] });
|
|
6254
|
-
};
|
|
6255
|
-
var k = { x: 0, y: 0, width: 0, height: 0 };
|
|
6256
|
-
var L2 = s(null);
|
|
6257
|
-
var P = ({ slot: t2, children: n2 }) => {
|
|
6258
|
-
const r2 = l(null), [s2, c2] = o(k), d2 = i(() => {
|
|
6259
|
-
if (r2.current) {
|
|
6260
|
-
const e2 = r2.current.getBoundingClientRect();
|
|
6261
|
-
c2({ x: e2.left, y: e2.top, width: e2.width, height: e2.height });
|
|
6262
|
-
}
|
|
6263
|
-
}, []);
|
|
6264
|
-
a(() => {
|
|
6265
|
-
const e2 = r2.current;
|
|
6266
|
-
if (!e2)
|
|
6267
|
-
return;
|
|
6268
|
-
d2();
|
|
6269
|
-
const t3 = new ResizeObserver(() => {
|
|
6270
|
-
d2();
|
|
6271
|
-
});
|
|
6272
|
-
return t3.observe(e2), window.addEventListener("resize", d2), window.addEventListener("scroll", d2, true), () => {
|
|
6273
|
-
t3.disconnect(), window.removeEventListener("resize", d2), window.removeEventListener("scroll", d2, true);
|
|
6274
|
-
};
|
|
6275
|
-
}, [d2]);
|
|
6276
|
-
const u2 = { slot: t2, bounds: s2 };
|
|
6277
|
-
return e(L2.Provider, { value: u2, children: /* @__PURE__ */ e("div", { ref: r2, className: "panel-bounds-container", style: { width: "100%", height: "100%", minWidth: 0 }, children: n2 }) });
|
|
6278
|
-
};
|
|
6279
|
-
var M = d(({ panels: n2, layout: r2, slotDataAttributes: s2 = {}, collapsiblePanels: c2 = { left: true, middle: false, right: true }, defaultSizes: d2 = { left: 20, middle: 60, right: 20 }, className: p2 = "", collapsed: h2 = { left: false, middle: false, right: false }, style: g2, showCollapseButtons: m2 = false, animationDuration: y2 = 300, animationEasing: w2 = "cubic-bezier(0.4, 0, 0.2, 1)", theme: x, onLeftCollapseStart: N2, onLeftCollapseComplete: S2, onLeftExpandStart: E, onLeftExpandComplete: D2, onMiddleCollapseStart: R, onMiddleCollapseComplete: k2, onMiddleExpandStart: L3, onMiddleExpandComplete: T2, onRightCollapseStart: A2, onRightCollapseComplete: M2, onRightExpandStart: $2, onRightExpandComplete: B2, onPanelResize: O }, F) => {
|
|
6280
|
-
const I2 = r2.left !== null && r2.left !== undefined, H2 = r2.middle !== null && r2.middle !== undefined, W2 = r2.right !== null && r2.right !== undefined, j = [I2, H2, W2].filter(Boolean).length, q2 = { left: I2 ? d2?.left ?? (j === 2 ? 50 : j === 3 ? 20 : 100) : 0, middle: H2 ? d2?.middle ?? (j === 2 ? 50 : j === 3 ? 60 : 100) : 0, right: W2 ? d2?.right ?? (j === 2 ? 50 : j === 3 ? 20 : 100) : 0 }, [K2, U2] = o(h2.left || !I2), [X, Y2] = o(h2.middle || !H2), [V2, J2] = o(h2.right || !W2), [G2, _2] = o(false), Q2 = l(false), [Z2, ee] = o(false);
|
|
6281
|
-
a(() => {
|
|
6282
|
-
const e2 = requestAnimationFrame(() => {
|
|
6283
|
-
ee(true);
|
|
6284
|
-
});
|
|
6285
|
-
return () => cancelAnimationFrame(e2);
|
|
6286
|
-
}, []);
|
|
6287
|
-
const te2 = i((e2) => {
|
|
6288
|
-
if (!e2)
|
|
6289
|
-
return null;
|
|
6290
|
-
const t2 = n2.find((t3) => t3.id === e2);
|
|
6291
|
-
return t2?.content || null;
|
|
6292
|
-
}, [n2]), ne2 = i((t2) => {
|
|
6293
|
-
if (t2 === null)
|
|
6294
|
-
return null;
|
|
6295
|
-
if (typeof t2 == "object" && "type" in t2) {
|
|
6296
|
-
const r3 = t2;
|
|
6297
|
-
return r3.type === "tabs" ? /* @__PURE__ */ e(z, { panelIds: r3.panels, panels: n2, config: r3.config, theme: x }) : null;
|
|
6298
|
-
}
|
|
6299
|
-
return te2(t2);
|
|
6300
|
-
}, [n2, te2, x]), re2 = ne2(r2.left ?? null), oe2 = ne2(r2.middle ?? null), le = ne2(r2.right ?? null), [ie2, ae] = o(h2.left || !I2 ? 0 : q2.left), [se2, ce2] = o(h2.middle || !H2 ? 0 : q2.middle), [de, ue2] = o(h2.right || !W2 ? 0 : q2.right), [pe2, he] = o(q2.left), [ge2, me2] = o(q2.middle), [ve2, fe2] = o(q2.right), be2 = l(null), ye2 = l(null), we2 = l(null), xe2 = l(null), Ce2 = i(() => {
|
|
6301
|
-
!G2 && c2.left && (N2?.(), ye2.current?.collapse(), U2(true), S2?.());
|
|
6302
|
-
}, [G2, c2.left, N2, S2]), Ne2 = i(() => {
|
|
6303
|
-
!G2 && c2.left && (E?.(), ye2.current?.expand(), U2(false), D2?.());
|
|
6304
|
-
}, [G2, c2.left, E, D2]), Se2 = i(() => {
|
|
6305
|
-
!G2 && c2.right && (A2?.(), xe2.current?.collapse(), J2(true), M2?.());
|
|
6306
|
-
}, [G2, c2.right, A2, M2]), Ee2 = i(() => {
|
|
6307
|
-
!G2 && c2.right && ($2?.(), xe2.current?.expand(), J2(false), B2?.());
|
|
6308
|
-
}, [G2, c2.right, $2, B2]), De2 = i(() => {
|
|
6309
|
-
K2 ? Ne2() : Ce2();
|
|
6310
|
-
}, [K2, Ce2, Ne2]), Re = i(() => {
|
|
6311
|
-
V2 ? Ee2() : Se2();
|
|
6312
|
-
}, [V2, Se2, Ee2]);
|
|
6313
|
-
u(F, () => ({ setLayout: (e2) => {
|
|
6314
|
-
if (!be2.current)
|
|
6315
|
-
return;
|
|
6316
|
-
const t2 = be2.current.getLayout(), n3 = t2.left ?? 0, r3 = t2.right ?? 0, o2 = e2.left === 0 || e2.left < 1, l2 = e2.right === 0 || e2.right < 1, i2 = n3 < 1, a2 = r3 < 1;
|
|
6317
|
-
o2 && !i2 ? (N2?.(), ye2.current?.collapse(), setTimeout(() => {
|
|
6318
|
-
U2(true), S2?.();
|
|
6319
|
-
}, y2)) : !o2 && i2 && (E?.(), ye2.current?.expand(), U2(false), setTimeout(() => D2?.(), y2)), l2 && !a2 ? (A2?.(), xe2.current?.collapse(), setTimeout(() => {
|
|
6320
|
-
J2(true), M2?.();
|
|
6321
|
-
}, y2)) : !l2 && a2 && ($2?.(), xe2.current?.expand(), J2(false), setTimeout(() => B2?.(), y2));
|
|
6322
|
-
!o2 && i2 || !l2 && a2 ? requestAnimationFrame(() => {
|
|
6323
|
-
be2.current?.setLayout(e2);
|
|
6324
|
-
}) : be2.current.setLayout(e2);
|
|
6325
|
-
}, collapsePanel: (e2) => {
|
|
6326
|
-
Q2.current = true, e2 === "left" ? (ye2.current?.collapse(), setTimeout(() => {
|
|
6327
|
-
U2(true), Q2.current = false;
|
|
6328
|
-
}, y2)) : (xe2.current?.collapse(), setTimeout(() => {
|
|
6329
|
-
J2(true), Q2.current = false;
|
|
6330
|
-
}, y2));
|
|
6331
|
-
}, expandPanel: (e2) => {
|
|
6332
|
-
Q2.current = true, setTimeout(() => {
|
|
6333
|
-
Q2.current = false;
|
|
6334
|
-
}, y2), e2 === "left" ? (U2(false), ye2.current?.expand()) : (J2(false), xe2.current?.expand());
|
|
6335
|
-
}, getLayout: () => ({ left: ie2, middle: se2, right: de }) }), [ie2, se2, de]);
|
|
6336
|
-
const ze2 = i((e2) => {
|
|
6337
|
-
const t2 = e2.asPercentage;
|
|
6338
|
-
ae(t2), Q2.current || (t2 > 0 ? (he(t2), U2(false)) : U2(true));
|
|
6339
|
-
}, []), ke2 = i((e2) => {
|
|
6340
|
-
const t2 = e2.asPercentage;
|
|
6341
|
-
ce2(t2), Q2.current || (t2 > 0 ? (me2(t2), Y2(false)) : Y2(true));
|
|
6342
|
-
}, []), Le2 = i((e2) => {
|
|
6343
|
-
const t2 = e2.asPercentage;
|
|
6344
|
-
ue2(t2), Q2.current || (t2 > 0 ? (fe2(t2), J2(false)) : J2(true));
|
|
6345
|
-
}, []), Pe2 = i(() => {
|
|
6346
|
-
if (O) {
|
|
6347
|
-
O({ left: K2 ? pe2 : ie2, middle: X ? ge2 : se2, right: V2 ? ve2 : de });
|
|
6348
|
-
}
|
|
6349
|
-
}, [ie2, se2, de, K2, X, V2, pe2, ge2, ve2, O]), Te2 = i(() => {
|
|
6350
|
-
_2(true);
|
|
6351
|
-
}, []), Ae2 = i(() => {
|
|
6352
|
-
_2(false), Pe2();
|
|
6353
|
-
}, [Pe2]), Me = (e2) => {
|
|
6354
|
-
let t2 = "three-panel-item";
|
|
6355
|
-
return e2 === "left" ? !c2.left && I2 || (t2 += " collapsible-panel", K2 && (t2 += " collapsed")) : e2 === "middle" ? (t2 += " middle-panel", !c2.middle && H2 || (t2 += " collapsible-panel", X && (t2 += " collapsed"))) : e2 === "right" && (!c2.right && W2 || (t2 += " collapsible-panel", V2 && (t2 += " collapsed"))), t2;
|
|
6356
|
-
}, $e2 = C(x);
|
|
6357
|
-
return e("div", { className: `three-panel-layout ${p2} ${G2 ? "is-dragging" : ""} ${Z2 ? "" : "is-mounting"}`, style: { ...$e2, ...g2, "--panel-transition-duration": `${y2}ms`, "--panel-transition-easing": w2 }, children: /* @__PURE__ */ t(Ut, { groupRef: be2, orientation: "horizontal", onLayoutChange: Te2, onLayoutChanged: Ae2, children: [
|
|
6358
|
-
/* @__PURE__ */ e(Yt, { id: "left", panelRef: ye2, collapsible: c2.left || !I2, defaultSize: h2.left || !I2 ? "0%" : `${q2.left}%`, minSize: "0%", collapsedSize: "0%", onResize: ze2, className: Me("left"), ...s2.left || {}, children: /* @__PURE__ */ e("div", { className: "panel-content-wrapper", children: /* @__PURE__ */ e(P, { slot: "left", children: re2 }) }) }),
|
|
6359
|
-
/* @__PURE__ */ e(Qt, { className: "resize-handle left-handle " + (!K2 && I2 && H2 ? "" : "collapsed"), disabled: K2 || !I2 || !H2, children: m2 && c2.left && /* @__PURE__ */ e("div", { className: "handle-bar", children: /* @__PURE__ */ e("button", { onClick: De2, className: "collapse-toggle", "aria-label": K2 ? "Expand left panel" : "Collapse left panel", children: K2 ? "▸" : "◂" }) }) }),
|
|
6360
|
-
/* @__PURE__ */ e(Yt, { id: "middle", panelRef: we2, collapsible: c2.middle || !H2, defaultSize: h2.middle || !H2 ? "0%" : `${q2.middle}%`, minSize: "0%", collapsedSize: "0%", onResize: ke2, className: Me("middle"), ...s2.middle || {}, children: /* @__PURE__ */ e("div", { className: "panel-content-wrapper", children: /* @__PURE__ */ e(P, { slot: "middle", children: oe2 }) }) }),
|
|
6361
|
-
/* @__PURE__ */ e(Qt, { className: "resize-handle right-handle " + (V2 || !W2 || !H2 && !I2 ? "collapsed" : ""), disabled: V2 || !W2 || !H2 && !I2, children: m2 && c2.right && /* @__PURE__ */ e("div", { className: "handle-bar", children: /* @__PURE__ */ e("button", { onClick: Re, className: "collapse-toggle", "aria-label": V2 ? "Expand right panel" : "Collapse right panel", children: V2 ? "◂" : "▸" }) }) }),
|
|
6362
|
-
/* @__PURE__ */ e(Yt, { id: "right", panelRef: xe2, collapsible: c2.right || !W2, defaultSize: h2.right || !W2 ? "0%" : `${q2.right}%`, minSize: "0%", collapsedSize: "0%", onResize: Le2, className: Me("right"), ...s2.right || {}, children: /* @__PURE__ */ e("div", { className: "panel-content-wrapper", children: /* @__PURE__ */ e(P, { slot: "right", children: le }) }) })
|
|
6363
|
-
] }) });
|
|
6364
|
-
});
|
|
6365
|
-
M.displayName = "ConfigurablePanelLayout";
|
|
6366
|
-
var $2 = d(({ panels: o2, className: i2 = "", style: s2, theme: c2, minPanelWidth: d2 = 350, idealPanelWidth: p2 = 0.333, showSeparator: h2 = false, onPanelChange: g2, preventKeyboardScroll: m2 = true, disableSwipe: v = false }, f) => {
|
|
6367
|
-
const b = l(null), y2 = l(false), w2 = l(null), x = C(c2);
|
|
6368
|
-
u(f, () => ({ scrollToPanel: (e2) => {
|
|
6369
|
-
if (!b.current)
|
|
6370
|
-
return;
|
|
6371
|
-
const t2 = b.current, n2 = t2.children[e2];
|
|
6372
|
-
if (n2) {
|
|
6373
|
-
y2.current = true, w2.current && clearTimeout(w2.current);
|
|
6374
|
-
const e3 = n2.offsetLeft;
|
|
6375
|
-
t2.scrollTo({ left: e3, behavior: "smooth" }), w2.current = setTimeout(() => {
|
|
6376
|
-
y2.current = false;
|
|
6377
|
-
}, 500);
|
|
6378
|
-
}
|
|
6379
|
-
}, getCurrentPanel: () => {
|
|
6380
|
-
if (!b.current || b.current.children.length === 0)
|
|
6381
|
-
return 0;
|
|
6382
|
-
const e2 = b.current, t2 = e2.getBoundingClientRect().left;
|
|
6383
|
-
let n2 = 0, r2 = 1 / 0;
|
|
6384
|
-
for (let o3 = 0;o3 < e2.children.length; o3++) {
|
|
6385
|
-
const l2 = e2.children[o3].getBoundingClientRect(), i3 = Math.abs(l2.left - t2);
|
|
6386
|
-
i3 < r2 && (r2 = i3, n2 = o3);
|
|
6387
|
-
}
|
|
6388
|
-
return n2;
|
|
6389
|
-
} }));
|
|
6390
|
-
a(() => {
|
|
6391
|
-
if (!m2 || !b.current)
|
|
6392
|
-
return;
|
|
6393
|
-
const e2 = b.current, t2 = (e3) => {
|
|
6394
|
-
const t3 = e3.target;
|
|
6395
|
-
if (t3.tagName === "INPUT" || t3.tagName === "TEXTAREA" || t3.tagName === "SELECT" || t3.isContentEditable || t3.closest(".xterm") !== null || t3.closest('[contenteditable="true"]') !== null)
|
|
6396
|
-
return;
|
|
6397
|
-
[" ", "Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown"].includes(e3.key) && e3.preventDefault();
|
|
6398
|
-
};
|
|
6399
|
-
return e2.addEventListener("keydown", t2), () => {
|
|
6400
|
-
e2.removeEventListener("keydown", t2);
|
|
6401
|
-
};
|
|
6402
|
-
}, [m2]), a(() => () => {
|
|
6403
|
-
w2.current && clearTimeout(w2.current);
|
|
6404
|
-
}, []);
|
|
6405
|
-
const N2 = o2.length, S2 = 2 * d2;
|
|
6406
|
-
let E;
|
|
6407
|
-
E = N2 === 1 || N2 === 2 ? "100%" : `max(${d2}px, ${100 * p2}%)`;
|
|
6408
|
-
const D2 = r.useId().replace(/:/g, "_");
|
|
6409
|
-
return t(n, { children: [
|
|
6410
|
-
N2 === 2 && /* @__PURE__ */ e("style", { children: `
|
|
6411
|
-
.snap-carousel-container[data-carousel-id="${D2}"][data-panel-count="2"] .snap-carousel-panel {
|
|
6412
|
-
width: 100%;
|
|
6413
|
-
}
|
|
6414
|
-
@container (min-width: ${S2}px) {
|
|
6415
|
-
.snap-carousel-container[data-carousel-id="${D2}"][data-panel-count="2"] .snap-carousel-panel {
|
|
6416
|
-
width: 50%;
|
|
6417
|
-
}
|
|
6418
|
-
}
|
|
6419
|
-
` }),
|
|
6420
|
-
/* @__PURE__ */ e("div", { ref: b, className: `snap-carousel-container ${v ? "swipe-disabled" : ""} ${i2}`, style: { ...x, ...s2, "--snap-carousel-min-width": `${d2}px`, "--snap-carousel-ideal-width": 100 * p2 + "%", "--snap-carousel-gap": h2 ? "1px" : "0px", "--snap-carousel-panel-width": E, "--snap-carousel-panel-count": N2, "--snap-carousel-two-panel-threshold": `${S2}px` }, onScroll: (e2) => {
|
|
6421
|
-
if (!g2 || !b.current || b.current.children.length === 0)
|
|
6422
|
-
return;
|
|
6423
|
-
if (y2.current)
|
|
6424
|
-
return;
|
|
6425
|
-
const t2 = b.current, n2 = t2.getBoundingClientRect().left;
|
|
6426
|
-
let r2 = 0, o3 = 1 / 0;
|
|
6427
|
-
for (let l2 = 0;l2 < t2.children.length; l2++) {
|
|
6428
|
-
const e3 = t2.children[l2].getBoundingClientRect(), i3 = Math.abs(e3.left - n2);
|
|
6429
|
-
i3 < o3 && (o3 = i3, r2 = l2);
|
|
6430
|
-
}
|
|
6431
|
-
g2(r2);
|
|
6432
|
-
}, "data-panel-count": N2, "data-carousel-id": D2, children: o2.map((t2, n2) => /* @__PURE__ */ e("div", { className: "snap-carousel-panel", children: t2 }, n2)) })
|
|
6433
|
-
] });
|
|
6434
|
-
});
|
|
6435
|
-
$2.displayName = "SnapCarousel";
|
|
6436
|
-
var F = typeof window != "undefined" && window.document !== undefined && window.document.createElement !== undefined;
|
|
6437
|
-
function I2(e2) {
|
|
6438
|
-
const t2 = Object.prototype.toString.call(e2);
|
|
6439
|
-
return t2 === "[object Window]" || t2 === "[object global]";
|
|
6440
|
-
}
|
|
6441
|
-
function H2(e2) {
|
|
6442
|
-
return "nodeType" in e2;
|
|
6443
|
-
}
|
|
6444
|
-
function W2(e2) {
|
|
6445
|
-
var t2, n2;
|
|
6446
|
-
return e2 ? I2(e2) ? e2 : H2(e2) && (t2 = (n2 = e2.ownerDocument) == null ? undefined : n2.defaultView) != null ? t2 : window : window;
|
|
6447
|
-
}
|
|
6448
|
-
function j(e2) {
|
|
6449
|
-
const { Document: t2 } = W2(e2);
|
|
6450
|
-
return e2 instanceof t2;
|
|
6451
|
-
}
|
|
6452
|
-
function q2(e2) {
|
|
6453
|
-
return !I2(e2) && e2 instanceof W2(e2).HTMLElement;
|
|
6454
|
-
}
|
|
6455
|
-
function K2(e2) {
|
|
6456
|
-
return e2 instanceof W2(e2).SVGElement;
|
|
6457
|
-
}
|
|
6458
|
-
function U2(e2) {
|
|
6459
|
-
return e2 ? I2(e2) ? e2.document : H2(e2) ? j(e2) ? e2 : q2(e2) || K2(e2) ? e2.ownerDocument : document : document : document;
|
|
6460
|
-
}
|
|
6461
|
-
var X = F ? h : a;
|
|
6462
|
-
function Y2(e2) {
|
|
6463
|
-
const t2 = l(e2);
|
|
6464
|
-
return X(() => {
|
|
6465
|
-
t2.current = e2;
|
|
6466
|
-
}), i(function() {
|
|
6467
|
-
for (var e3 = arguments.length, n2 = new Array(e3), r2 = 0;r2 < e3; r2++)
|
|
6468
|
-
n2[r2] = arguments[r2];
|
|
6469
|
-
return t2.current == null ? undefined : t2.current(...n2);
|
|
6470
|
-
}, []);
|
|
6471
|
-
}
|
|
6472
|
-
function V2(e2, t2) {
|
|
6473
|
-
t2 === undefined && (t2 = [e2]);
|
|
6474
|
-
const n2 = l(e2);
|
|
6475
|
-
return X(() => {
|
|
6476
|
-
n2.current !== e2 && (n2.current = e2);
|
|
6477
|
-
}, t2), n2;
|
|
6478
|
-
}
|
|
6479
|
-
function J2(e2, t2) {
|
|
6480
|
-
const n2 = l();
|
|
6481
|
-
return p(() => {
|
|
6482
|
-
const t3 = e2(n2.current);
|
|
6483
|
-
return n2.current = t3, t3;
|
|
6484
|
-
}, [...t2]);
|
|
6485
|
-
}
|
|
6486
|
-
function G2(e2) {
|
|
6487
|
-
const t2 = Y2(e2), n2 = l(null), r2 = i((e3) => {
|
|
6488
|
-
e3 !== n2.current && (t2 == null || t2(e3, n2.current)), n2.current = e3;
|
|
6489
|
-
}, []);
|
|
6490
|
-
return [n2, r2];
|
|
6491
|
-
}
|
|
6492
|
-
function _2(e2) {
|
|
6493
|
-
const t2 = l();
|
|
6494
|
-
return a(() => {
|
|
6495
|
-
t2.current = e2;
|
|
6496
|
-
}, [e2]), t2.current;
|
|
6497
|
-
}
|
|
6498
|
-
var Q2 = {};
|
|
6499
|
-
function Z2(e2, t2) {
|
|
6500
|
-
return p(() => {
|
|
6501
|
-
if (t2)
|
|
6502
|
-
return t2;
|
|
6503
|
-
const n2 = Q2[e2] == null ? 0 : Q2[e2] + 1;
|
|
6504
|
-
return Q2[e2] = n2, e2 + "-" + n2;
|
|
6505
|
-
}, [e2, t2]);
|
|
6506
|
-
}
|
|
6507
|
-
function ee(e2) {
|
|
6508
|
-
return function(t2) {
|
|
6509
|
-
for (var n2 = arguments.length, r2 = new Array(n2 > 1 ? n2 - 1 : 0), o2 = 1;o2 < n2; o2++)
|
|
6510
|
-
r2[o2 - 1] = arguments[o2];
|
|
6511
|
-
return r2.reduce((t3, n3) => {
|
|
6512
|
-
const r3 = Object.entries(n3);
|
|
6513
|
-
for (const [o3, l2] of r3) {
|
|
6514
|
-
const n4 = t3[o3];
|
|
6515
|
-
n4 != null && (t3[o3] = n4 + e2 * l2);
|
|
6516
|
-
}
|
|
6517
|
-
return t3;
|
|
6518
|
-
}, { ...t2 });
|
|
6519
|
-
};
|
|
6520
|
-
}
|
|
6521
|
-
var te2 = /* @__PURE__ */ ee(1);
|
|
6522
|
-
var ne2 = /* @__PURE__ */ ee(-1);
|
|
6523
|
-
function re2(e2) {
|
|
6524
|
-
if (!e2)
|
|
6525
|
-
return false;
|
|
6526
|
-
const { KeyboardEvent: t2 } = W2(e2.target);
|
|
6527
|
-
return t2 && e2 instanceof t2;
|
|
6528
|
-
}
|
|
6529
|
-
function oe2(e2) {
|
|
6530
|
-
if (function(e3) {
|
|
6531
|
-
if (!e3)
|
|
6532
|
-
return false;
|
|
6533
|
-
const { TouchEvent: t2 } = W2(e3.target);
|
|
6534
|
-
return t2 && e3 instanceof t2;
|
|
6535
|
-
}(e2)) {
|
|
6536
|
-
if (e2.touches && e2.touches.length) {
|
|
6537
|
-
const { clientX: t2, clientY: n2 } = e2.touches[0];
|
|
6538
|
-
return { x: t2, y: n2 };
|
|
6539
|
-
}
|
|
6540
|
-
if (e2.changedTouches && e2.changedTouches.length) {
|
|
6541
|
-
const { clientX: t2, clientY: n2 } = e2.changedTouches[0];
|
|
6542
|
-
return { x: t2, y: n2 };
|
|
6543
|
-
}
|
|
6544
|
-
}
|
|
6545
|
-
return function(e3) {
|
|
6546
|
-
return "clientX" in e3 && "clientY" in e3;
|
|
6547
|
-
}(e2) ? { x: e2.clientX, y: e2.clientY } : null;
|
|
6548
|
-
}
|
|
6549
|
-
var le = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
|
|
6550
|
-
function ie2(e2) {
|
|
6551
|
-
return e2.matches(le) ? e2 : e2.querySelector(le);
|
|
6552
|
-
}
|
|
6553
|
-
var ae = { display: "none" };
|
|
6554
|
-
function se2(e2) {
|
|
6555
|
-
let { id: t2, value: n2 } = e2;
|
|
6556
|
-
return r.createElement("div", { id: t2, style: ae }, n2);
|
|
6557
|
-
}
|
|
6558
|
-
function ce2(e2) {
|
|
6559
|
-
let { id: t2, announcement: n2, ariaLiveType: o2 = "assertive" } = e2;
|
|
6560
|
-
return r.createElement("div", { id: t2, style: { position: "fixed", top: 0, left: 0, width: 1, height: 1, margin: -1, border: 0, padding: 0, overflow: "hidden", clip: "rect(0 0 0 0)", clipPath: "inset(100%)", whiteSpace: "nowrap" }, role: "status", "aria-live": o2, "aria-atomic": true }, n2);
|
|
6561
|
-
}
|
|
6562
|
-
var de = /* @__PURE__ */ s(null);
|
|
6563
|
-
var ue2 = { draggable: `
|
|
6564
|
-
To pick up a draggable item, press the space bar.
|
|
6565
|
-
While dragging, use the arrow keys to move the item.
|
|
6566
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
6567
|
-
` };
|
|
6568
|
-
var pe2 = { onDragStart(e2) {
|
|
6569
|
-
let { active: t2 } = e2;
|
|
6570
|
-
return "Picked up draggable item " + t2.id + ".";
|
|
6571
|
-
}, onDragOver(e2) {
|
|
6572
|
-
let { active: t2, over: n2 } = e2;
|
|
6573
|
-
return n2 ? "Draggable item " + t2.id + " was moved over droppable area " + n2.id + "." : "Draggable item " + t2.id + " is no longer over a droppable area.";
|
|
6574
|
-
}, onDragEnd(e2) {
|
|
6575
|
-
let { active: t2, over: n2 } = e2;
|
|
6576
|
-
return n2 ? "Draggable item " + t2.id + " was dropped over droppable area " + n2.id : "Draggable item " + t2.id + " was dropped.";
|
|
6577
|
-
}, onDragCancel(e2) {
|
|
6578
|
-
let { active: t2 } = e2;
|
|
6579
|
-
return "Dragging was cancelled. Draggable item " + t2.id + " was dropped.";
|
|
6580
|
-
} };
|
|
6581
|
-
function he(e2) {
|
|
6582
|
-
let { announcements: t2 = pe2, container: n2, hiddenTextDescribedById: l2, screenReaderInstructions: s2 = ue2 } = e2;
|
|
6583
|
-
const { announce: d2, announcement: u2 } = function() {
|
|
6584
|
-
const [e3, t3] = o("");
|
|
6585
|
-
return { announce: i((e4) => {
|
|
6586
|
-
e4 != null && t3(e4);
|
|
6587
|
-
}, []), announcement: e3 };
|
|
6588
|
-
}(), h2 = Z2("DndLiveRegion"), [g2, m2] = o(false);
|
|
6589
|
-
if (a(() => {
|
|
6590
|
-
m2(true);
|
|
6591
|
-
}, []), function(e3) {
|
|
6592
|
-
const t3 = c(de);
|
|
6593
|
-
a(() => {
|
|
6594
|
-
if (!t3)
|
|
6595
|
-
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
6596
|
-
return t3(e3);
|
|
6597
|
-
}, [e3, t3]);
|
|
6598
|
-
}(p(() => ({ onDragStart(e3) {
|
|
6599
|
-
let { active: n3 } = e3;
|
|
6600
|
-
d2(t2.onDragStart({ active: n3 }));
|
|
6601
|
-
}, onDragMove(e3) {
|
|
6602
|
-
let { active: n3, over: r2 } = e3;
|
|
6603
|
-
t2.onDragMove && d2(t2.onDragMove({ active: n3, over: r2 }));
|
|
6604
|
-
}, onDragOver(e3) {
|
|
6605
|
-
let { active: n3, over: r2 } = e3;
|
|
6606
|
-
d2(t2.onDragOver({ active: n3, over: r2 }));
|
|
6607
|
-
}, onDragEnd(e3) {
|
|
6608
|
-
let { active: n3, over: r2 } = e3;
|
|
6609
|
-
d2(t2.onDragEnd({ active: n3, over: r2 }));
|
|
6610
|
-
}, onDragCancel(e3) {
|
|
6611
|
-
let { active: n3, over: r2 } = e3;
|
|
6612
|
-
d2(t2.onDragCancel({ active: n3, over: r2 }));
|
|
6613
|
-
} }), [d2, t2])), !g2)
|
|
6614
|
-
return null;
|
|
6615
|
-
const v = r.createElement(r.Fragment, null, r.createElement(se2, { id: l2, value: s2.draggable }), r.createElement(ce2, { id: h2, announcement: u2 }));
|
|
6616
|
-
return n2 ? w(v, n2) : v;
|
|
6617
|
-
}
|
|
6618
|
-
var ge2;
|
|
6619
|
-
var me2;
|
|
6620
|
-
function ve2() {}
|
|
6621
|
-
(me2 = ge2 || (ge2 = {})).DragStart = "dragStart", me2.DragMove = "dragMove", me2.DragEnd = "dragEnd", me2.DragCancel = "dragCancel", me2.DragOver = "dragOver", me2.RegisterDroppable = "registerDroppable", me2.SetDroppableDisabled = "setDroppableDisabled", me2.UnregisterDroppable = "unregisterDroppable";
|
|
6622
|
-
var fe2 = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
|
|
6623
|
-
function be2(e2, t2) {
|
|
6624
|
-
return Math.sqrt(Math.pow(e2.x - t2.x, 2) + Math.pow(e2.y - t2.y, 2));
|
|
6625
|
-
}
|
|
6626
|
-
function ye2(e2, t2) {
|
|
6627
|
-
let { data: { value: n2 } } = e2, { data: { value: r2 } } = t2;
|
|
6628
|
-
return n2 - r2;
|
|
6629
|
-
}
|
|
6630
|
-
function we2(e2, t2) {
|
|
6631
|
-
let { data: { value: n2 } } = e2, { data: { value: r2 } } = t2;
|
|
6632
|
-
return r2 - n2;
|
|
6633
|
-
}
|
|
6634
|
-
function xe2(e2, t2, n2) {
|
|
6635
|
-
return t2 === undefined && (t2 = e2.left), n2 === undefined && (n2 = e2.top), { x: t2 + 0.5 * e2.width, y: n2 + 0.5 * e2.height };
|
|
6636
|
-
}
|
|
6637
|
-
var Ce2 = (e2) => {
|
|
6638
|
-
let { collisionRect: t2, droppableRects: n2, droppableContainers: r2 } = e2;
|
|
6639
|
-
const o2 = xe2(t2, t2.left, t2.top), l2 = [];
|
|
6640
|
-
for (const i2 of r2) {
|
|
6641
|
-
const { id: e3 } = i2, t3 = n2.get(e3);
|
|
6642
|
-
if (t3) {
|
|
6643
|
-
const n3 = be2(xe2(t3), o2);
|
|
6644
|
-
l2.push({ id: e3, data: { droppableContainer: i2, value: n3 } });
|
|
6645
|
-
}
|
|
6646
|
-
}
|
|
6647
|
-
return l2.sort(ye2);
|
|
6648
|
-
};
|
|
6649
|
-
function Ne2(e2, t2) {
|
|
6650
|
-
const n2 = Math.max(t2.top, e2.top), r2 = Math.max(t2.left, e2.left), o2 = Math.min(t2.left + t2.width, e2.left + e2.width), l2 = Math.min(t2.top + t2.height, e2.top + e2.height), i2 = o2 - r2, a2 = l2 - n2;
|
|
6651
|
-
if (r2 < o2 && n2 < l2) {
|
|
6652
|
-
const n3 = t2.width * t2.height, r3 = e2.width * e2.height, o3 = i2 * a2;
|
|
6653
|
-
return Number((o3 / (n3 + r3 - o3)).toFixed(4));
|
|
6654
|
-
}
|
|
6655
|
-
return 0;
|
|
6656
|
-
}
|
|
6657
|
-
var Se2 = (e2) => {
|
|
6658
|
-
let { collisionRect: t2, droppableRects: n2, droppableContainers: r2 } = e2;
|
|
6659
|
-
const o2 = [];
|
|
6660
|
-
for (const l2 of r2) {
|
|
6661
|
-
const { id: e3 } = l2, r3 = n2.get(e3);
|
|
6662
|
-
if (r3) {
|
|
6663
|
-
const n3 = Ne2(r3, t2);
|
|
6664
|
-
n3 > 0 && o2.push({ id: e3, data: { droppableContainer: l2, value: n3 } });
|
|
6665
|
-
}
|
|
6666
|
-
}
|
|
6667
|
-
return o2.sort(we2);
|
|
6668
|
-
};
|
|
6669
|
-
function Ee2(e2, t2) {
|
|
6670
|
-
return e2 && t2 ? { x: e2.left - t2.left, y: e2.top - t2.top } : fe2;
|
|
6671
|
-
}
|
|
6672
|
-
function De2(e2) {
|
|
6673
|
-
return function(t2) {
|
|
6674
|
-
for (var n2 = arguments.length, r2 = new Array(n2 > 1 ? n2 - 1 : 0), o2 = 1;o2 < n2; o2++)
|
|
6675
|
-
r2[o2 - 1] = arguments[o2];
|
|
6676
|
-
return r2.reduce((t3, n3) => ({ ...t3, top: t3.top + e2 * n3.y, bottom: t3.bottom + e2 * n3.y, left: t3.left + e2 * n3.x, right: t3.right + e2 * n3.x }), { ...t2 });
|
|
6677
|
-
};
|
|
6678
|
-
}
|
|
6679
|
-
var Re = /* @__PURE__ */ De2(1);
|
|
6680
|
-
var ze2 = { ignoreTransform: false };
|
|
6681
|
-
function ke2(e2, t2) {
|
|
6682
|
-
t2 === undefined && (t2 = ze2);
|
|
6683
|
-
let n2 = e2.getBoundingClientRect();
|
|
6684
|
-
if (t2.ignoreTransform) {
|
|
6685
|
-
const { transform: t3, transformOrigin: r3 } = W2(e2).getComputedStyle(e2);
|
|
6686
|
-
t3 && (n2 = function(e3, t4, n3) {
|
|
6687
|
-
const r4 = function(e4) {
|
|
6688
|
-
if (e4.startsWith("matrix3d(")) {
|
|
6689
|
-
const t5 = e4.slice(9, -1).split(/, /);
|
|
6690
|
-
return { x: +t5[12], y: +t5[13], scaleX: +t5[0], scaleY: +t5[5] };
|
|
6691
|
-
}
|
|
6692
|
-
if (e4.startsWith("matrix(")) {
|
|
6693
|
-
const t5 = e4.slice(7, -1).split(/, /);
|
|
6694
|
-
return { x: +t5[4], y: +t5[5], scaleX: +t5[0], scaleY: +t5[3] };
|
|
6695
|
-
}
|
|
6696
|
-
return null;
|
|
6697
|
-
}(t4);
|
|
6698
|
-
if (!r4)
|
|
6699
|
-
return e3;
|
|
6700
|
-
const { scaleX: o3, scaleY: l3, x: i3, y: a3 } = r4, s3 = e3.left - i3 - (1 - o3) * parseFloat(n3), c2 = e3.top - a3 - (1 - l3) * parseFloat(n3.slice(n3.indexOf(" ") + 1)), d2 = o3 ? e3.width / o3 : e3.width, u2 = l3 ? e3.height / l3 : e3.height;
|
|
6701
|
-
return { width: d2, height: u2, top: c2, right: s3 + d2, bottom: c2 + u2, left: s3 };
|
|
6702
|
-
}(n2, t3, r3));
|
|
6703
|
-
}
|
|
6704
|
-
const { top: r2, left: o2, width: l2, height: i2, bottom: a2, right: s2 } = n2;
|
|
6705
|
-
return { top: r2, left: o2, width: l2, height: i2, bottom: a2, right: s2 };
|
|
6706
|
-
}
|
|
6707
|
-
function Le2(e2) {
|
|
6708
|
-
return ke2(e2, { ignoreTransform: true });
|
|
6709
|
-
}
|
|
6710
|
-
function Pe2(e2, t2) {
|
|
6711
|
-
const n2 = [];
|
|
6712
|
-
return e2 ? function r(o2) {
|
|
6713
|
-
if (t2 != null && n2.length >= t2)
|
|
6714
|
-
return n2;
|
|
6715
|
-
if (!o2)
|
|
6716
|
-
return n2;
|
|
6717
|
-
if (j(o2) && o2.scrollingElement != null && !n2.includes(o2.scrollingElement))
|
|
6718
|
-
return n2.push(o2.scrollingElement), n2;
|
|
6719
|
-
if (!q2(o2) || K2(o2))
|
|
6720
|
-
return n2;
|
|
6721
|
-
if (n2.includes(o2))
|
|
6722
|
-
return n2;
|
|
6723
|
-
const l2 = W2(e2).getComputedStyle(o2);
|
|
6724
|
-
return o2 !== e2 && function(e3, t3) {
|
|
6725
|
-
t3 === undefined && (t3 = W2(e3).getComputedStyle(e3));
|
|
6726
|
-
const n3 = /(auto|scroll|overlay)/;
|
|
6727
|
-
return ["overflow", "overflowX", "overflowY"].some((e4) => {
|
|
6728
|
-
const r2 = t3[e4];
|
|
6729
|
-
return typeof r2 == "string" && n3.test(r2);
|
|
6730
|
-
});
|
|
6731
|
-
}(o2, l2) && n2.push(o2), function(e3, t3) {
|
|
6732
|
-
return t3 === undefined && (t3 = W2(e3).getComputedStyle(e3)), t3.position === "fixed";
|
|
6733
|
-
}(o2, l2) ? n2 : r(o2.parentNode);
|
|
6734
|
-
}(e2) : n2;
|
|
6735
|
-
}
|
|
6736
|
-
function Te2(e2) {
|
|
6737
|
-
const [t2] = Pe2(e2, 1);
|
|
6738
|
-
return t2 != null ? t2 : null;
|
|
6739
|
-
}
|
|
6740
|
-
function Ae2(e2) {
|
|
6741
|
-
return F && e2 ? I2(e2) ? e2 : H2(e2) ? j(e2) || e2 === U2(e2).scrollingElement ? window : q2(e2) ? e2 : null : null : null;
|
|
6742
|
-
}
|
|
6743
|
-
function Me(e2) {
|
|
6744
|
-
return I2(e2) ? e2.scrollX : e2.scrollLeft;
|
|
6745
|
-
}
|
|
6746
|
-
function $e2(e2) {
|
|
6747
|
-
return I2(e2) ? e2.scrollY : e2.scrollTop;
|
|
6748
|
-
}
|
|
6749
|
-
function Be2(e2) {
|
|
6750
|
-
return { x: Me(e2), y: $e2(e2) };
|
|
6751
|
-
}
|
|
6752
|
-
var Oe2;
|
|
6753
|
-
var Fe2;
|
|
6754
|
-
function Ie2(e2) {
|
|
6755
|
-
return !(!F || !e2) && e2 === document.scrollingElement;
|
|
6756
|
-
}
|
|
6757
|
-
function He2(e2) {
|
|
6758
|
-
const t2 = { x: 0, y: 0 }, n2 = Ie2(e2) ? { height: window.innerHeight, width: window.innerWidth } : { height: e2.clientHeight, width: e2.clientWidth }, r2 = { x: e2.scrollWidth - n2.width, y: e2.scrollHeight - n2.height };
|
|
6759
|
-
return { isTop: e2.scrollTop <= t2.y, isLeft: e2.scrollLeft <= t2.x, isBottom: e2.scrollTop >= r2.y, isRight: e2.scrollLeft >= r2.x, maxScroll: r2, minScroll: t2 };
|
|
6760
|
-
}
|
|
6761
|
-
(Fe2 = Oe2 || (Oe2 = {}))[Fe2.Forward = 1] = "Forward", Fe2[Fe2.Backward = -1] = "Backward";
|
|
6762
|
-
var We2 = { x: 0.2, y: 0.2 };
|
|
6763
|
-
function je2(e2, t2, n2, r2, o2) {
|
|
6764
|
-
let { top: l2, left: i2, right: a2, bottom: s2 } = n2;
|
|
6765
|
-
r2 === undefined && (r2 = 10), o2 === undefined && (o2 = We2);
|
|
6766
|
-
const { isTop: c2, isBottom: d2, isLeft: u2, isRight: p2 } = He2(e2), h2 = { x: 0, y: 0 }, g2 = { x: 0, y: 0 }, m2 = t2.height * o2.y, v = t2.width * o2.x;
|
|
6767
|
-
return !c2 && l2 <= t2.top + m2 ? (h2.y = Oe2.Backward, g2.y = r2 * Math.abs((t2.top + m2 - l2) / m2)) : !d2 && s2 >= t2.bottom - m2 && (h2.y = Oe2.Forward, g2.y = r2 * Math.abs((t2.bottom - m2 - s2) / m2)), !p2 && a2 >= t2.right - v ? (h2.x = Oe2.Forward, g2.x = r2 * Math.abs((t2.right - v - a2) / v)) : !u2 && i2 <= t2.left + v && (h2.x = Oe2.Backward, g2.x = r2 * Math.abs((t2.left + v - i2) / v)), { direction: h2, speed: g2 };
|
|
6768
|
-
}
|
|
6769
|
-
function qe2(e2) {
|
|
6770
|
-
if (e2 === document.scrollingElement) {
|
|
6771
|
-
const { innerWidth: e3, innerHeight: t3 } = window;
|
|
6772
|
-
return { top: 0, left: 0, right: e3, bottom: t3, width: e3, height: t3 };
|
|
6773
|
-
}
|
|
6774
|
-
const { top: t2, left: n2, right: r2, bottom: o2 } = e2.getBoundingClientRect();
|
|
6775
|
-
return { top: t2, left: n2, right: r2, bottom: o2, width: e2.clientWidth, height: e2.clientHeight };
|
|
6776
|
-
}
|
|
6777
|
-
function Ke2(e2) {
|
|
6778
|
-
return e2.reduce((e3, t2) => te2(e3, Be2(t2)), fe2);
|
|
6779
|
-
}
|
|
6780
|
-
var Ue2 = [["x", ["left", "right"], function(e2) {
|
|
6781
|
-
return e2.reduce((e3, t2) => e3 + Me(t2), 0);
|
|
6782
|
-
}], ["y", ["top", "bottom"], function(e2) {
|
|
6783
|
-
return e2.reduce((e3, t2) => e3 + $e2(t2), 0);
|
|
6784
|
-
}]];
|
|
6785
|
-
|
|
6786
|
-
class Xe2 {
|
|
6787
|
-
constructor(e2, t2) {
|
|
6788
|
-
this.rect = undefined, this.width = undefined, this.height = undefined, this.top = undefined, this.bottom = undefined, this.right = undefined, this.left = undefined;
|
|
6789
|
-
const n2 = Pe2(t2), r2 = Ke2(n2);
|
|
6790
|
-
this.rect = { ...e2 }, this.width = e2.width, this.height = e2.height;
|
|
6791
|
-
for (const [o2, l2, i2] of Ue2)
|
|
6792
|
-
for (const e3 of l2)
|
|
6793
|
-
Object.defineProperty(this, e3, { get: () => {
|
|
6794
|
-
const t3 = i2(n2), l3 = r2[o2] - t3;
|
|
6795
|
-
return this.rect[e3] + l3;
|
|
6796
|
-
}, enumerable: true });
|
|
6797
|
-
Object.defineProperty(this, "rect", { enumerable: false });
|
|
6798
|
-
}
|
|
6799
|
-
}
|
|
6800
|
-
|
|
6801
|
-
class Ye2 {
|
|
6802
|
-
constructor(e2) {
|
|
6803
|
-
this.target = undefined, this.listeners = [], this.removeAll = () => {
|
|
6804
|
-
this.listeners.forEach((e3) => {
|
|
6805
|
-
var t2;
|
|
6806
|
-
return (t2 = this.target) == null ? undefined : t2.removeEventListener(...e3);
|
|
6807
|
-
});
|
|
6808
|
-
}, this.target = e2;
|
|
6809
|
-
}
|
|
6810
|
-
add(e2, t2, n2) {
|
|
6811
|
-
var r2;
|
|
6812
|
-
(r2 = this.target) == null || r2.addEventListener(e2, t2, n2), this.listeners.push([e2, t2, n2]);
|
|
6813
|
-
}
|
|
6814
|
-
}
|
|
6815
|
-
function Ve2(e2, t2) {
|
|
6816
|
-
const n2 = Math.abs(e2.x), r2 = Math.abs(e2.y);
|
|
6817
|
-
return typeof t2 == "number" ? Math.sqrt(n2 ** 2 + r2 ** 2) > t2 : ("x" in t2) && ("y" in t2) ? n2 > t2.x && r2 > t2.y : ("x" in t2) ? n2 > t2.x : ("y" in t2) && r2 > t2.y;
|
|
6818
|
-
}
|
|
6819
|
-
var Je2;
|
|
6820
|
-
var Ge2;
|
|
6821
|
-
var _e2;
|
|
6822
|
-
var Qe2;
|
|
6823
|
-
function Ze2(e2) {
|
|
6824
|
-
e2.preventDefault();
|
|
6825
|
-
}
|
|
6826
|
-
function et2(e2) {
|
|
6827
|
-
e2.stopPropagation();
|
|
6828
|
-
}
|
|
6829
|
-
(Ge2 = Je2 || (Je2 = {})).Click = "click", Ge2.DragStart = "dragstart", Ge2.Keydown = "keydown", Ge2.ContextMenu = "contextmenu", Ge2.Resize = "resize", Ge2.SelectionChange = "selectionchange", Ge2.VisibilityChange = "visibilitychange", (Qe2 = _e2 || (_e2 = {})).Space = "Space", Qe2.Down = "ArrowDown", Qe2.Right = "ArrowRight", Qe2.Left = "ArrowLeft", Qe2.Up = "ArrowUp", Qe2.Esc = "Escape", Qe2.Enter = "Enter", Qe2.Tab = "Tab";
|
|
6830
|
-
var tt2 = { start: [_e2.Space, _e2.Enter], cancel: [_e2.Esc], end: [_e2.Space, _e2.Enter, _e2.Tab] };
|
|
6831
|
-
var nt2 = (e2, t2) => {
|
|
6832
|
-
let { currentCoordinates: n2 } = t2;
|
|
6833
|
-
switch (e2.code) {
|
|
6834
|
-
case _e2.Right:
|
|
6835
|
-
return { ...n2, x: n2.x + 25 };
|
|
6836
|
-
case _e2.Left:
|
|
6837
|
-
return { ...n2, x: n2.x - 25 };
|
|
6838
|
-
case _e2.Down:
|
|
6839
|
-
return { ...n2, y: n2.y + 25 };
|
|
6840
|
-
case _e2.Up:
|
|
6841
|
-
return { ...n2, y: n2.y - 25 };
|
|
6842
|
-
}
|
|
6843
|
-
};
|
|
6844
|
-
|
|
6845
|
-
class rt2 {
|
|
6846
|
-
constructor(e2) {
|
|
6847
|
-
this.props = undefined, this.autoScrollEnabled = false, this.referenceCoordinates = undefined, this.listeners = undefined, this.windowListeners = undefined, this.props = e2;
|
|
6848
|
-
const { event: { target: t2 } } = e2;
|
|
6849
|
-
this.props = e2, this.listeners = new Ye2(U2(t2)), this.windowListeners = new Ye2(W2(t2)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
|
|
6850
|
-
}
|
|
6851
|
-
attach() {
|
|
6852
|
-
this.handleStart(), this.windowListeners.add(Je2.Resize, this.handleCancel), this.windowListeners.add(Je2.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Je2.Keydown, this.handleKeyDown));
|
|
6853
|
-
}
|
|
6854
|
-
handleStart() {
|
|
6855
|
-
const { activeNode: e2, onStart: t2 } = this.props, n2 = e2.node.current;
|
|
6856
|
-
n2 && function(e3, t3) {
|
|
6857
|
-
if (t3 === undefined && (t3 = ke2), !e3)
|
|
6858
|
-
return;
|
|
6859
|
-
const { top: n3, left: r2, bottom: o2, right: l2 } = t3(e3);
|
|
6860
|
-
Te2(e3) && (o2 <= 0 || l2 <= 0 || n3 >= window.innerHeight || r2 >= window.innerWidth) && e3.scrollIntoView({ block: "center", inline: "center" });
|
|
6861
|
-
}(n2), t2(fe2);
|
|
6862
|
-
}
|
|
6863
|
-
handleKeyDown(e2) {
|
|
6864
|
-
if (re2(e2)) {
|
|
6865
|
-
const { active: t2, context: n2, options: r2 } = this.props, { keyboardCodes: o2 = tt2, coordinateGetter: l2 = nt2, scrollBehavior: i2 = "smooth" } = r2, { code: a2 } = e2;
|
|
6866
|
-
if (o2.end.includes(a2))
|
|
6867
|
-
return void this.handleEnd(e2);
|
|
6868
|
-
if (o2.cancel.includes(a2))
|
|
6869
|
-
return void this.handleCancel(e2);
|
|
6870
|
-
const { collisionRect: s2 } = n2.current, c2 = s2 ? { x: s2.left, y: s2.top } : fe2;
|
|
6871
|
-
this.referenceCoordinates || (this.referenceCoordinates = c2);
|
|
6872
|
-
const d2 = l2(e2, { active: t2, context: n2.current, currentCoordinates: c2 });
|
|
6873
|
-
if (d2) {
|
|
6874
|
-
const t3 = ne2(d2, c2), r3 = { x: 0, y: 0 }, { scrollableAncestors: o3 } = n2.current;
|
|
6875
|
-
for (const n3 of o3) {
|
|
6876
|
-
const o4 = e2.code, { isTop: l3, isRight: a3, isLeft: s3, isBottom: c3, maxScroll: u2, minScroll: p2 } = He2(n3), h2 = qe2(n3), g2 = { x: Math.min(o4 === _e2.Right ? h2.right - h2.width / 2 : h2.right, Math.max(o4 === _e2.Right ? h2.left : h2.left + h2.width / 2, d2.x)), y: Math.min(o4 === _e2.Down ? h2.bottom - h2.height / 2 : h2.bottom, Math.max(o4 === _e2.Down ? h2.top : h2.top + h2.height / 2, d2.y)) }, m2 = o4 === _e2.Right && !a3 || o4 === _e2.Left && !s3, v = o4 === _e2.Down && !c3 || o4 === _e2.Up && !l3;
|
|
6877
|
-
if (m2 && g2.x !== d2.x) {
|
|
6878
|
-
const e3 = n3.scrollLeft + t3.x, l4 = o4 === _e2.Right && e3 <= u2.x || o4 === _e2.Left && e3 >= p2.x;
|
|
6879
|
-
if (l4 && !t3.y)
|
|
6880
|
-
return void n3.scrollTo({ left: e3, behavior: i2 });
|
|
6881
|
-
r3.x = l4 ? n3.scrollLeft - e3 : o4 === _e2.Right ? n3.scrollLeft - u2.x : n3.scrollLeft - p2.x, r3.x && n3.scrollBy({ left: -r3.x, behavior: i2 });
|
|
6882
|
-
break;
|
|
6883
|
-
}
|
|
6884
|
-
if (v && g2.y !== d2.y) {
|
|
6885
|
-
const e3 = n3.scrollTop + t3.y, l4 = o4 === _e2.Down && e3 <= u2.y || o4 === _e2.Up && e3 >= p2.y;
|
|
6886
|
-
if (l4 && !t3.x)
|
|
6887
|
-
return void n3.scrollTo({ top: e3, behavior: i2 });
|
|
6888
|
-
r3.y = l4 ? n3.scrollTop - e3 : o4 === _e2.Down ? n3.scrollTop - u2.y : n3.scrollTop - p2.y, r3.y && n3.scrollBy({ top: -r3.y, behavior: i2 });
|
|
6889
|
-
break;
|
|
6890
|
-
}
|
|
6891
|
-
}
|
|
6892
|
-
this.handleMove(e2, te2(ne2(d2, this.referenceCoordinates), r3));
|
|
6893
|
-
}
|
|
6894
|
-
}
|
|
6895
|
-
}
|
|
6896
|
-
handleMove(e2, t2) {
|
|
6897
|
-
const { onMove: n2 } = this.props;
|
|
6898
|
-
e2.preventDefault(), n2(t2);
|
|
6899
|
-
}
|
|
6900
|
-
handleEnd(e2) {
|
|
6901
|
-
const { onEnd: t2 } = this.props;
|
|
6902
|
-
e2.preventDefault(), this.detach(), t2();
|
|
6903
|
-
}
|
|
6904
|
-
handleCancel(e2) {
|
|
6905
|
-
const { onCancel: t2 } = this.props;
|
|
6906
|
-
e2.preventDefault(), this.detach(), t2();
|
|
6907
|
-
}
|
|
6908
|
-
detach() {
|
|
6909
|
-
this.listeners.removeAll(), this.windowListeners.removeAll();
|
|
6910
|
-
}
|
|
6911
|
-
}
|
|
6912
|
-
function ot2(e2) {
|
|
6913
|
-
return Boolean(e2 && "distance" in e2);
|
|
6914
|
-
}
|
|
6915
|
-
function lt(e2) {
|
|
6916
|
-
return Boolean(e2 && "delay" in e2);
|
|
6917
|
-
}
|
|
6918
|
-
rt2.activators = [{ eventName: "onKeyDown", handler: (e2, t2, n2) => {
|
|
6919
|
-
let { keyboardCodes: r2 = tt2, onActivation: o2 } = t2, { active: l2 } = n2;
|
|
6920
|
-
const { code: i2 } = e2.nativeEvent;
|
|
6921
|
-
if (r2.start.includes(i2)) {
|
|
6922
|
-
const t3 = l2.activatorNode.current;
|
|
6923
|
-
return (!t3 || e2.target === t3) && (e2.preventDefault(), o2 == null || o2({ event: e2.nativeEvent }), true);
|
|
6924
|
-
}
|
|
6925
|
-
return false;
|
|
6926
|
-
} }];
|
|
6927
|
-
|
|
6928
|
-
class it2 {
|
|
6929
|
-
constructor(e2, t2, n2) {
|
|
6930
|
-
var r2;
|
|
6931
|
-
n2 === undefined && (n2 = function(e3) {
|
|
6932
|
-
const { EventTarget: t3 } = W2(e3);
|
|
6933
|
-
return e3 instanceof t3 ? e3 : U2(e3);
|
|
6934
|
-
}(e2.event.target)), this.props = undefined, this.events = undefined, this.autoScrollEnabled = true, this.document = undefined, this.activated = false, this.initialCoordinates = undefined, this.timeoutId = null, this.listeners = undefined, this.documentListeners = undefined, this.windowListeners = undefined, this.props = e2, this.events = t2;
|
|
6935
|
-
const { event: o2 } = e2, { target: l2 } = o2;
|
|
6936
|
-
this.props = e2, this.events = t2, this.document = U2(l2), this.documentListeners = new Ye2(this.document), this.listeners = new Ye2(n2), this.windowListeners = new Ye2(W2(l2)), this.initialCoordinates = (r2 = oe2(o2)) != null ? r2 : fe2, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
|
|
6937
|
-
}
|
|
6938
|
-
attach() {
|
|
6939
|
-
const { events: e2, props: { options: { activationConstraint: t2, bypassActivationConstraint: n2 } } } = this;
|
|
6940
|
-
if (this.listeners.add(e2.move.name, this.handleMove, { passive: false }), this.listeners.add(e2.end.name, this.handleEnd), e2.cancel && this.listeners.add(e2.cancel.name, this.handleCancel), this.windowListeners.add(Je2.Resize, this.handleCancel), this.windowListeners.add(Je2.DragStart, Ze2), this.windowListeners.add(Je2.VisibilityChange, this.handleCancel), this.windowListeners.add(Je2.ContextMenu, Ze2), this.documentListeners.add(Je2.Keydown, this.handleKeydown), t2) {
|
|
6941
|
-
if (n2 != null && n2({ event: this.props.event, activeNode: this.props.activeNode, options: this.props.options }))
|
|
6942
|
-
return this.handleStart();
|
|
6943
|
-
if (lt(t2))
|
|
6944
|
-
return this.timeoutId = setTimeout(this.handleStart, t2.delay), void this.handlePending(t2);
|
|
6945
|
-
if (ot2(t2))
|
|
6946
|
-
return void this.handlePending(t2);
|
|
6947
|
-
}
|
|
6948
|
-
this.handleStart();
|
|
6949
|
-
}
|
|
6950
|
-
detach() {
|
|
6951
|
-
this.listeners.removeAll(), this.windowListeners.removeAll(), setTimeout(this.documentListeners.removeAll, 50), this.timeoutId !== null && (clearTimeout(this.timeoutId), this.timeoutId = null);
|
|
6952
|
-
}
|
|
6953
|
-
handlePending(e2, t2) {
|
|
6954
|
-
const { active: n2, onPending: r2 } = this.props;
|
|
6955
|
-
r2(n2, e2, this.initialCoordinates, t2);
|
|
6956
|
-
}
|
|
6957
|
-
handleStart() {
|
|
6958
|
-
const { initialCoordinates: e2 } = this, { onStart: t2 } = this.props;
|
|
6959
|
-
e2 && (this.activated = true, this.documentListeners.add(Je2.Click, et2, { capture: true }), this.removeTextSelection(), this.documentListeners.add(Je2.SelectionChange, this.removeTextSelection), t2(e2));
|
|
6960
|
-
}
|
|
6961
|
-
handleMove(e2) {
|
|
6962
|
-
var t2;
|
|
6963
|
-
const { activated: n2, initialCoordinates: r2, props: o2 } = this, { onMove: l2, options: { activationConstraint: i2 } } = o2;
|
|
6964
|
-
if (!r2)
|
|
6965
|
-
return;
|
|
6966
|
-
const a2 = (t2 = oe2(e2)) != null ? t2 : fe2, s2 = ne2(r2, a2);
|
|
6967
|
-
if (!n2 && i2) {
|
|
6968
|
-
if (ot2(i2)) {
|
|
6969
|
-
if (i2.tolerance != null && Ve2(s2, i2.tolerance))
|
|
6970
|
-
return this.handleCancel();
|
|
6971
|
-
if (Ve2(s2, i2.distance))
|
|
6972
|
-
return this.handleStart();
|
|
6973
|
-
}
|
|
6974
|
-
return lt(i2) && Ve2(s2, i2.tolerance) ? this.handleCancel() : void this.handlePending(i2, s2);
|
|
6975
|
-
}
|
|
6976
|
-
e2.cancelable && e2.preventDefault(), l2(a2);
|
|
6977
|
-
}
|
|
6978
|
-
handleEnd() {
|
|
6979
|
-
const { onAbort: e2, onEnd: t2 } = this.props;
|
|
6980
|
-
this.detach(), this.activated || e2(this.props.active), t2();
|
|
6981
|
-
}
|
|
6982
|
-
handleCancel() {
|
|
6983
|
-
const { onAbort: e2, onCancel: t2 } = this.props;
|
|
6984
|
-
this.detach(), this.activated || e2(this.props.active), t2();
|
|
6985
|
-
}
|
|
6986
|
-
handleKeydown(e2) {
|
|
6987
|
-
e2.code === _e2.Esc && this.handleCancel();
|
|
6988
|
-
}
|
|
6989
|
-
removeTextSelection() {
|
|
6990
|
-
var e2;
|
|
6991
|
-
(e2 = this.document.getSelection()) == null || e2.removeAllRanges();
|
|
6992
|
-
}
|
|
6993
|
-
}
|
|
6994
|
-
var at2 = { cancel: { name: "pointercancel" }, move: { name: "pointermove" }, end: { name: "pointerup" } };
|
|
6995
|
-
|
|
6996
|
-
class st2 extends it2 {
|
|
6997
|
-
constructor(e2) {
|
|
6998
|
-
const { event: t2 } = e2, n2 = U2(t2.target);
|
|
6999
|
-
super(e2, at2, n2);
|
|
7000
|
-
}
|
|
7001
|
-
}
|
|
7002
|
-
st2.activators = [{ eventName: "onPointerDown", handler: (e2, t2) => {
|
|
7003
|
-
let { nativeEvent: n2 } = e2, { onActivation: r2 } = t2;
|
|
7004
|
-
return !(!n2.isPrimary || n2.button !== 0) && (r2 == null || r2({ event: n2 }), true);
|
|
7005
|
-
} }];
|
|
7006
|
-
var ct = { move: { name: "mousemove" }, end: { name: "mouseup" } };
|
|
7007
|
-
var dt;
|
|
7008
|
-
var ut;
|
|
7009
|
-
(ut = dt || (dt = {}))[ut.RightClick = 2] = "RightClick";
|
|
7010
|
-
(class extends it2 {
|
|
7011
|
-
constructor(e2) {
|
|
7012
|
-
super(e2, ct, U2(e2.event.target));
|
|
7013
|
-
}
|
|
7014
|
-
}).activators = [{ eventName: "onMouseDown", handler: (e2, t2) => {
|
|
7015
|
-
let { nativeEvent: n2 } = e2, { onActivation: r2 } = t2;
|
|
7016
|
-
return n2.button !== dt.RightClick && (r2 == null || r2({ event: n2 }), true);
|
|
7017
|
-
} }];
|
|
7018
|
-
var pt2 = { cancel: { name: "touchcancel" }, move: { name: "touchmove" }, end: { name: "touchend" } };
|
|
7019
|
-
var ht2;
|
|
7020
|
-
var gt2;
|
|
7021
|
-
var mt2;
|
|
7022
|
-
var vt2;
|
|
7023
|
-
function ft(e2) {
|
|
7024
|
-
let { acceleration: t2, activator: n2 = ht2.Pointer, canScroll: r2, draggingRect: o2, enabled: s2, interval: c2 = 5, order: d2 = mt2.TreeOrder, pointerCoordinates: u2, scrollableAncestors: h2, scrollableAncestorRects: g2, delta: m2, threshold: v } = e2;
|
|
7025
|
-
const f = function(e3) {
|
|
7026
|
-
let { delta: t3, disabled: n3 } = e3;
|
|
7027
|
-
const r3 = _2(t3);
|
|
7028
|
-
return J2((e4) => {
|
|
7029
|
-
if (n3 || !r3 || !e4)
|
|
7030
|
-
return bt2;
|
|
7031
|
-
const o3 = { x: Math.sign(t3.x - r3.x), y: Math.sign(t3.y - r3.y) };
|
|
7032
|
-
return { x: { [Oe2.Backward]: e4.x[Oe2.Backward] || o3.x === -1, [Oe2.Forward]: e4.x[Oe2.Forward] || o3.x === 1 }, y: { [Oe2.Backward]: e4.y[Oe2.Backward] || o3.y === -1, [Oe2.Forward]: e4.y[Oe2.Forward] || o3.y === 1 } };
|
|
7033
|
-
}, [n3, t3, r3]);
|
|
7034
|
-
}({ delta: m2, disabled: !s2 }), [b, y2] = function() {
|
|
7035
|
-
const e3 = l(null);
|
|
7036
|
-
return [i((t3, n3) => {
|
|
7037
|
-
e3.current = setInterval(t3, n3);
|
|
7038
|
-
}, []), i(() => {
|
|
7039
|
-
e3.current !== null && (clearInterval(e3.current), e3.current = null);
|
|
7040
|
-
}, [])];
|
|
7041
|
-
}(), w2 = l({ x: 0, y: 0 }), x = l({ x: 0, y: 0 }), C2 = p(() => {
|
|
7042
|
-
switch (n2) {
|
|
7043
|
-
case ht2.Pointer:
|
|
7044
|
-
return u2 ? { top: u2.y, bottom: u2.y, left: u2.x, right: u2.x } : null;
|
|
7045
|
-
case ht2.DraggableRect:
|
|
7046
|
-
return o2;
|
|
7047
|
-
}
|
|
7048
|
-
}, [n2, o2, u2]), N2 = l(null), S2 = i(() => {
|
|
7049
|
-
const e3 = N2.current;
|
|
7050
|
-
if (!e3)
|
|
7051
|
-
return;
|
|
7052
|
-
const t3 = w2.current.x * x.current.x, n3 = w2.current.y * x.current.y;
|
|
7053
|
-
e3.scrollBy(t3, n3);
|
|
7054
|
-
}, []), E = p(() => d2 === mt2.TreeOrder ? [...h2].reverse() : h2, [d2, h2]);
|
|
7055
|
-
a(() => {
|
|
7056
|
-
if (s2 && h2.length && C2) {
|
|
7057
|
-
for (const e3 of E) {
|
|
7058
|
-
if ((r2 == null ? undefined : r2(e3)) === false)
|
|
7059
|
-
continue;
|
|
7060
|
-
const n3 = h2.indexOf(e3), o3 = g2[n3];
|
|
7061
|
-
if (!o3)
|
|
7062
|
-
continue;
|
|
7063
|
-
const { direction: l2, speed: i2 } = je2(e3, o3, C2, t2, v);
|
|
7064
|
-
for (const e4 of ["x", "y"])
|
|
7065
|
-
f[e4][l2[e4]] || (i2[e4] = 0, l2[e4] = 0);
|
|
7066
|
-
if (i2.x > 0 || i2.y > 0)
|
|
7067
|
-
return y2(), N2.current = e3, b(S2, c2), w2.current = i2, void (x.current = l2);
|
|
7068
|
-
}
|
|
7069
|
-
w2.current = { x: 0, y: 0 }, x.current = { x: 0, y: 0 }, y2();
|
|
7070
|
-
} else
|
|
7071
|
-
y2();
|
|
7072
|
-
}, [t2, S2, r2, y2, s2, c2, JSON.stringify(C2), JSON.stringify(f), b, h2, E, g2, JSON.stringify(v)]);
|
|
7073
|
-
}
|
|
7074
|
-
(class extends it2 {
|
|
7075
|
-
constructor(e2) {
|
|
7076
|
-
super(e2, pt2);
|
|
7077
|
-
}
|
|
7078
|
-
static setup() {
|
|
7079
|
-
return window.addEventListener(pt2.move.name, e2, { capture: false, passive: false }), function() {
|
|
7080
|
-
window.removeEventListener(pt2.move.name, e2);
|
|
7081
|
-
};
|
|
7082
|
-
function e2() {}
|
|
7083
|
-
}
|
|
7084
|
-
}).activators = [{ eventName: "onTouchStart", handler: (e2, t2) => {
|
|
7085
|
-
let { nativeEvent: n2 } = e2, { onActivation: r2 } = t2;
|
|
7086
|
-
const { touches: o2 } = n2;
|
|
7087
|
-
return !(o2.length > 1) && (r2 == null || r2({ event: n2 }), true);
|
|
7088
|
-
} }], (gt2 = ht2 || (ht2 = {}))[gt2.Pointer = 0] = "Pointer", gt2[gt2.DraggableRect = 1] = "DraggableRect", (vt2 = mt2 || (mt2 = {}))[vt2.TreeOrder = 0] = "TreeOrder", vt2[vt2.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
7089
|
-
var bt2 = { x: { [Oe2.Backward]: false, [Oe2.Forward]: false }, y: { [Oe2.Backward]: false, [Oe2.Forward]: false } };
|
|
7090
|
-
var yt2;
|
|
7091
|
-
var wt2;
|
|
7092
|
-
var xt2;
|
|
7093
|
-
(wt2 = yt2 || (yt2 = {}))[wt2.Always = 0] = "Always", wt2[wt2.BeforeDragging = 1] = "BeforeDragging", wt2[wt2.WhileDragging = 2] = "WhileDragging", (xt2 || (xt2 = {})).Optimized = "optimized";
|
|
7094
|
-
var Ct2 = /* @__PURE__ */ new Map;
|
|
7095
|
-
function Nt2(e2, t2) {
|
|
7096
|
-
return J2((n2) => e2 ? n2 || (typeof t2 == "function" ? t2(e2) : e2) : null, [t2, e2]);
|
|
7097
|
-
}
|
|
7098
|
-
function St2(e2) {
|
|
7099
|
-
let { callback: t2, disabled: n2 } = e2;
|
|
7100
|
-
const r2 = Y2(t2), o2 = p(() => {
|
|
7101
|
-
if (n2 || typeof window == "undefined" || window.ResizeObserver === undefined)
|
|
7102
|
-
return;
|
|
7103
|
-
const { ResizeObserver: e3 } = window;
|
|
7104
|
-
return new e3(r2);
|
|
7105
|
-
}, [n2]);
|
|
7106
|
-
return a(() => () => o2 == null ? undefined : o2.disconnect(), [o2]), o2;
|
|
7107
|
-
}
|
|
7108
|
-
function Et2(e2) {
|
|
7109
|
-
return new Xe2(ke2(e2), e2);
|
|
7110
|
-
}
|
|
7111
|
-
function Dt2(e2, t2, n2) {
|
|
7112
|
-
t2 === undefined && (t2 = Et2);
|
|
7113
|
-
const [r2, l2] = o(null);
|
|
7114
|
-
function i2() {
|
|
7115
|
-
l2((r3) => {
|
|
7116
|
-
if (!e2)
|
|
7117
|
-
return null;
|
|
7118
|
-
var o2;
|
|
7119
|
-
if (e2.isConnected === false)
|
|
7120
|
-
return (o2 = r3 != null ? r3 : n2) != null ? o2 : null;
|
|
7121
|
-
const l3 = t2(e2);
|
|
7122
|
-
return JSON.stringify(r3) === JSON.stringify(l3) ? r3 : l3;
|
|
7123
|
-
});
|
|
7124
|
-
}
|
|
7125
|
-
const s2 = function(e3) {
|
|
7126
|
-
let { callback: t3, disabled: n3 } = e3;
|
|
7127
|
-
const r3 = Y2(t3), o2 = p(() => {
|
|
7128
|
-
if (n3 || typeof window == "undefined" || window.MutationObserver === undefined)
|
|
7129
|
-
return;
|
|
7130
|
-
const { MutationObserver: e4 } = window;
|
|
7131
|
-
return new e4(r3);
|
|
7132
|
-
}, [r3, n3]);
|
|
7133
|
-
return a(() => () => o2 == null ? undefined : o2.disconnect(), [o2]), o2;
|
|
7134
|
-
}({ callback(t3) {
|
|
7135
|
-
if (e2)
|
|
7136
|
-
for (const n3 of t3) {
|
|
7137
|
-
const { type: t4, target: r3 } = n3;
|
|
7138
|
-
if (t4 === "childList" && r3 instanceof HTMLElement && r3.contains(e2)) {
|
|
7139
|
-
i2();
|
|
7140
|
-
break;
|
|
7141
|
-
}
|
|
7142
|
-
}
|
|
7143
|
-
} }), c2 = St2({ callback: i2 });
|
|
7144
|
-
return X(() => {
|
|
7145
|
-
i2(), e2 ? (c2 == null || c2.observe(e2), s2 == null || s2.observe(document.body, { childList: true, subtree: true })) : (c2 == null || c2.disconnect(), s2 == null || s2.disconnect());
|
|
7146
|
-
}, [e2]), r2;
|
|
7147
|
-
}
|
|
7148
|
-
var Rt2 = [];
|
|
7149
|
-
function zt2(e2, t2) {
|
|
7150
|
-
t2 === undefined && (t2 = []);
|
|
7151
|
-
const n2 = l(null);
|
|
7152
|
-
return a(() => {
|
|
7153
|
-
n2.current = null;
|
|
7154
|
-
}, t2), a(() => {
|
|
7155
|
-
const t3 = e2 !== fe2;
|
|
7156
|
-
t3 && !n2.current && (n2.current = e2), !t3 && n2.current && (n2.current = null);
|
|
7157
|
-
}, [e2]), n2.current ? ne2(e2, n2.current) : fe2;
|
|
7158
|
-
}
|
|
7159
|
-
function kt2(e2) {
|
|
7160
|
-
return p(() => e2 ? function(e3) {
|
|
7161
|
-
const { innerWidth: t2, innerHeight: n2 } = e3;
|
|
7162
|
-
return { top: 0, left: 0, right: t2, bottom: n2, width: t2, height: n2 };
|
|
7163
|
-
}(e2) : null, [e2]);
|
|
7164
|
-
}
|
|
7165
|
-
var Lt2 = [];
|
|
7166
|
-
function Pt2(e2) {
|
|
7167
|
-
let { measure: t2 } = e2;
|
|
7168
|
-
const [n2, r2] = o(null), l2 = St2({ callback: i((e3) => {
|
|
7169
|
-
for (const { target: n3 } of e3)
|
|
7170
|
-
if (q2(n3)) {
|
|
7171
|
-
r2((e4) => {
|
|
7172
|
-
const r3 = t2(n3);
|
|
7173
|
-
return e4 ? { ...e4, width: r3.width, height: r3.height } : r3;
|
|
7174
|
-
});
|
|
7175
|
-
break;
|
|
7176
|
-
}
|
|
7177
|
-
}, [t2]) }), a2 = i((e3) => {
|
|
7178
|
-
const n3 = function(e4) {
|
|
7179
|
-
if (!e4)
|
|
7180
|
-
return null;
|
|
7181
|
-
if (e4.children.length > 1)
|
|
7182
|
-
return e4;
|
|
7183
|
-
const t3 = e4.children[0];
|
|
7184
|
-
return q2(t3) ? t3 : e4;
|
|
7185
|
-
}(e3);
|
|
7186
|
-
l2 == null || l2.disconnect(), n3 && (l2 == null || l2.observe(n3)), r2(n3 ? t2(n3) : null);
|
|
7187
|
-
}, [t2, l2]), [s2, c2] = G2(a2);
|
|
7188
|
-
return p(() => ({ nodeRef: s2, rect: n2, setRef: c2 }), [n2, s2, c2]);
|
|
7189
|
-
}
|
|
7190
|
-
var Tt2 = [{ sensor: st2, options: {} }, { sensor: rt2, options: {} }];
|
|
7191
|
-
var At2 = { current: {} };
|
|
7192
|
-
var Mt2 = { draggable: { measure: Le2 }, droppable: { measure: Le2, strategy: yt2.WhileDragging, frequency: xt2.Optimized }, dragOverlay: { measure: ke2 } };
|
|
7193
|
-
|
|
7194
|
-
class $t2 extends Map {
|
|
7195
|
-
get(e2) {
|
|
7196
|
-
var t2;
|
|
7197
|
-
return e2 != null && (t2 = super.get(e2)) != null ? t2 : undefined;
|
|
7198
|
-
}
|
|
7199
|
-
toArray() {
|
|
7200
|
-
return Array.from(this.values());
|
|
7201
|
-
}
|
|
7202
|
-
getEnabled() {
|
|
7203
|
-
return this.toArray().filter((e2) => {
|
|
7204
|
-
let { disabled: t2 } = e2;
|
|
7205
|
-
return !t2;
|
|
7206
|
-
});
|
|
7207
|
-
}
|
|
7208
|
-
getNodeFor(e2) {
|
|
7209
|
-
var t2, n2;
|
|
7210
|
-
return (t2 = (n2 = this.get(e2)) == null ? undefined : n2.node.current) != null ? t2 : undefined;
|
|
7211
|
-
}
|
|
7212
|
-
}
|
|
7213
|
-
var Bt2 = { activatorEvent: null, active: null, activeNode: null, activeNodeRect: null, collisions: null, containerNodeRect: null, draggableNodes: /* @__PURE__ */ new Map, droppableRects: /* @__PURE__ */ new Map, droppableContainers: /* @__PURE__ */ new $t2, over: null, dragOverlay: { nodeRef: { current: null }, rect: null, setRef: ve2 }, scrollableAncestors: [], scrollableAncestorRects: [], measuringConfiguration: Mt2, measureDroppableContainers: ve2, windowRect: null, measuringScheduled: false };
|
|
7214
|
-
var Ot2 = /* @__PURE__ */ s({ activatorEvent: null, activators: [], active: null, activeNodeRect: null, ariaDescribedById: { draggable: "" }, dispatch: ve2, draggableNodes: /* @__PURE__ */ new Map, over: null, measureDroppableContainers: ve2 });
|
|
7215
|
-
var Ft2 = /* @__PURE__ */ s(Bt2);
|
|
7216
|
-
function It2() {
|
|
7217
|
-
return { draggable: { active: null, initialCoordinates: { x: 0, y: 0 }, nodes: /* @__PURE__ */ new Map, translate: { x: 0, y: 0 } }, droppable: { containers: new $t2 } };
|
|
7218
|
-
}
|
|
7219
|
-
function Ht2(e2, t2) {
|
|
7220
|
-
switch (t2.type) {
|
|
7221
|
-
case ge2.DragStart:
|
|
7222
|
-
return { ...e2, draggable: { ...e2.draggable, initialCoordinates: t2.initialCoordinates, active: t2.active } };
|
|
7223
|
-
case ge2.DragMove:
|
|
7224
|
-
return e2.draggable.active == null ? e2 : { ...e2, draggable: { ...e2.draggable, translate: { x: t2.coordinates.x - e2.draggable.initialCoordinates.x, y: t2.coordinates.y - e2.draggable.initialCoordinates.y } } };
|
|
7225
|
-
case ge2.DragEnd:
|
|
7226
|
-
case ge2.DragCancel:
|
|
7227
|
-
return { ...e2, draggable: { ...e2.draggable, active: null, initialCoordinates: { x: 0, y: 0 }, translate: { x: 0, y: 0 } } };
|
|
7228
|
-
case ge2.RegisterDroppable: {
|
|
7229
|
-
const { element: n2 } = t2, { id: r2 } = n2, o2 = new $t2(e2.droppable.containers);
|
|
7230
|
-
return o2.set(r2, n2), { ...e2, droppable: { ...e2.droppable, containers: o2 } };
|
|
7231
|
-
}
|
|
7232
|
-
case ge2.SetDroppableDisabled: {
|
|
7233
|
-
const { id: n2, key: r2, disabled: o2 } = t2, l2 = e2.droppable.containers.get(n2);
|
|
7234
|
-
if (!l2 || r2 !== l2.key)
|
|
7235
|
-
return e2;
|
|
7236
|
-
const i2 = new $t2(e2.droppable.containers);
|
|
7237
|
-
return i2.set(n2, { ...l2, disabled: o2 }), { ...e2, droppable: { ...e2.droppable, containers: i2 } };
|
|
7238
|
-
}
|
|
7239
|
-
case ge2.UnregisterDroppable: {
|
|
7240
|
-
const { id: n2, key: r2 } = t2, o2 = e2.droppable.containers.get(n2);
|
|
7241
|
-
if (!o2 || r2 !== o2.key)
|
|
7242
|
-
return e2;
|
|
7243
|
-
const l2 = new $t2(e2.droppable.containers);
|
|
7244
|
-
return l2.delete(n2), { ...e2, droppable: { ...e2.droppable, containers: l2 } };
|
|
7245
|
-
}
|
|
7246
|
-
default:
|
|
7247
|
-
return e2;
|
|
7248
|
-
}
|
|
7249
|
-
}
|
|
7250
|
-
function Wt2(e2) {
|
|
7251
|
-
let { disabled: t2 } = e2;
|
|
7252
|
-
const { active: n2, activatorEvent: r2, draggableNodes: o2 } = c(Ot2), l2 = _2(r2), i2 = _2(n2 == null ? undefined : n2.id);
|
|
7253
|
-
return a(() => {
|
|
7254
|
-
if (!t2 && !r2 && l2 && i2 != null) {
|
|
7255
|
-
if (!re2(l2))
|
|
7256
|
-
return;
|
|
7257
|
-
if (document.activeElement === l2.target)
|
|
7258
|
-
return;
|
|
7259
|
-
const e3 = o2.get(i2);
|
|
7260
|
-
if (!e3)
|
|
7261
|
-
return;
|
|
7262
|
-
const { activatorNode: t3, node: n3 } = e3;
|
|
7263
|
-
if (!t3.current && !n3.current)
|
|
7264
|
-
return;
|
|
7265
|
-
requestAnimationFrame(() => {
|
|
7266
|
-
for (const e4 of [t3.current, n3.current]) {
|
|
7267
|
-
if (!e4)
|
|
7268
|
-
continue;
|
|
7269
|
-
const t4 = ie2(e4);
|
|
7270
|
-
if (t4) {
|
|
7271
|
-
t4.focus();
|
|
7272
|
-
break;
|
|
7273
|
-
}
|
|
7274
|
-
}
|
|
7275
|
-
});
|
|
7276
|
-
}
|
|
7277
|
-
}, [r2, t2, o2, i2, l2]), null;
|
|
7278
|
-
}
|
|
7279
|
-
var jt2 = /* @__PURE__ */ s({ ...fe2, scaleX: 1, scaleY: 1 });
|
|
7280
|
-
var qt2;
|
|
7281
|
-
var Kt;
|
|
7282
|
-
(Kt = qt2 || (qt2 = {}))[Kt.Uninitialized = 0] = "Uninitialized", Kt[Kt.Initializing = 1] = "Initializing", Kt[Kt.Initialized = 2] = "Initialized";
|
|
7283
|
-
var Ut2 = /* @__PURE__ */ g(function(e2) {
|
|
7284
|
-
var t2, n2, s2, c2;
|
|
7285
|
-
let { id: d2, accessibility: u2, autoScroll: h2 = true, children: g2, sensors: v = Tt2, collisionDetection: f = Se2, measuring: b, modifiers: w2, ...x } = e2;
|
|
7286
|
-
const C2 = m(Ht2, undefined, It2), [N2, S2] = C2, [E, D2] = function() {
|
|
7287
|
-
const [e3] = o(() => /* @__PURE__ */ new Set), t3 = i((t4) => (e3.add(t4), () => e3.delete(t4)), [e3]);
|
|
7288
|
-
return [i((t4) => {
|
|
7289
|
-
let { type: n3, event: r2 } = t4;
|
|
7290
|
-
e3.forEach((e4) => {
|
|
7291
|
-
var t5;
|
|
7292
|
-
return (t5 = e4[n3]) == null ? undefined : t5.call(e4, r2);
|
|
7293
|
-
});
|
|
7294
|
-
}, [e3]), t3];
|
|
7295
|
-
}(), [R, z2] = o(qt2.Uninitialized), k2 = R === qt2.Initialized, { draggable: { active: L3, nodes: P2, translate: T2 }, droppable: { containers: A2 } } = N2, M2 = L3 != null ? P2.get(L3) : null, $3 = l({ initial: null, translated: null }), B2 = p(() => {
|
|
7296
|
-
var e3;
|
|
7297
|
-
return L3 != null ? { id: L3, data: (e3 = M2 == null ? undefined : M2.data) != null ? e3 : At2, rect: $3 } : null;
|
|
7298
|
-
}, [L3, M2]), O = l(null), [I3, H3] = o(null), [j2, q3] = o(null), K3 = V2(x, Object.values(x)), U3 = Z2("DndDescribedBy", d2), Y3 = p(() => A2.getEnabled(), [A2]), G3 = p(() => ({ draggable: { ...Mt2.draggable, ..._3 == null ? undefined : _3.draggable }, droppable: { ...Mt2.droppable, ..._3 == null ? undefined : _3.droppable }, dragOverlay: { ...Mt2.dragOverlay, ..._3 == null ? undefined : _3.dragOverlay } }), [(_3 = b) == null ? undefined : _3.draggable, _3 == null ? undefined : _3.droppable, _3 == null ? undefined : _3.dragOverlay]);
|
|
7299
|
-
var _3;
|
|
7300
|
-
const { droppableRects: Q3, measureDroppableContainers: ee2, measuringScheduled: ne3 } = function(e3, t3) {
|
|
7301
|
-
let { dragging: n3, dependencies: r2, config: s3 } = t3;
|
|
7302
|
-
const [c3, d3] = o(null), { frequency: u3, measure: p2, strategy: h3 } = s3, g3 = l(e3), m2 = function() {
|
|
7303
|
-
switch (h3) {
|
|
7304
|
-
case yt2.Always:
|
|
7305
|
-
return false;
|
|
7306
|
-
case yt2.BeforeDragging:
|
|
7307
|
-
return n3;
|
|
7308
|
-
default:
|
|
7309
|
-
return !n3;
|
|
7310
|
-
}
|
|
7311
|
-
}(), v2 = V2(m2), f2 = i(function(e4) {
|
|
7312
|
-
e4 === undefined && (e4 = []), v2.current || d3((t4) => t4 === null ? e4 : t4.concat(e4.filter((e5) => !t4.includes(e5))));
|
|
7313
|
-
}, [v2]), b2 = l(null), y2 = J2((t4) => {
|
|
7314
|
-
if (m2 && !n3)
|
|
7315
|
-
return Ct2;
|
|
7316
|
-
if (!t4 || t4 === Ct2 || g3.current !== e3 || c3 != null) {
|
|
7317
|
-
const t5 = /* @__PURE__ */ new Map;
|
|
7318
|
-
for (let n4 of e3) {
|
|
7319
|
-
if (!n4)
|
|
7320
|
-
continue;
|
|
7321
|
-
if (c3 && c3.length > 0 && !c3.includes(n4.id) && n4.rect.current) {
|
|
7322
|
-
t5.set(n4.id, n4.rect.current);
|
|
7323
|
-
continue;
|
|
7324
|
-
}
|
|
7325
|
-
const e4 = n4.node.current, r3 = e4 ? new Xe2(p2(e4), e4) : null;
|
|
7326
|
-
n4.rect.current = r3, r3 && t5.set(n4.id, r3);
|
|
7327
|
-
}
|
|
7328
|
-
return t5;
|
|
7329
|
-
}
|
|
7330
|
-
return t4;
|
|
7331
|
-
}, [e3, c3, n3, m2, p2]);
|
|
7332
|
-
return a(() => {
|
|
7333
|
-
g3.current = e3;
|
|
7334
|
-
}, [e3]), a(() => {
|
|
7335
|
-
m2 || f2();
|
|
7336
|
-
}, [n3, m2]), a(() => {
|
|
7337
|
-
c3 && c3.length > 0 && d3(null);
|
|
7338
|
-
}, [JSON.stringify(c3)]), a(() => {
|
|
7339
|
-
m2 || typeof u3 != "number" || b2.current !== null || (b2.current = setTimeout(() => {
|
|
7340
|
-
f2(), b2.current = null;
|
|
7341
|
-
}, u3));
|
|
7342
|
-
}, [u3, m2, f2, ...r2]), { droppableRects: y2, measureDroppableContainers: f2, measuringScheduled: c3 != null };
|
|
7343
|
-
}(Y3, { dragging: k2, dependencies: [T2.x, T2.y], config: G3.droppable }), re3 = function(e3, t3) {
|
|
7344
|
-
const n3 = t3 != null ? e3.get(t3) : undefined, r2 = n3 ? n3.node.current : null;
|
|
7345
|
-
return J2((e4) => {
|
|
7346
|
-
var n4;
|
|
7347
|
-
return t3 == null ? null : (n4 = r2 != null ? r2 : e4) != null ? n4 : null;
|
|
7348
|
-
}, [r2, t3]);
|
|
7349
|
-
}(P2, L3), le2 = p(() => j2 ? oe2(j2) : null, [j2]), ie3 = function() {
|
|
7350
|
-
const e3 = (I3 == null ? undefined : I3.autoScrollEnabled) === false, t3 = typeof h2 == "object" ? h2.enabled === false : h2 === false, n3 = k2 && !e3 && !t3;
|
|
7351
|
-
if (typeof h2 == "object")
|
|
7352
|
-
return { ...h2, enabled: n3 };
|
|
7353
|
-
return { enabled: n3 };
|
|
7354
|
-
}(), ae2 = function(e3, t3) {
|
|
7355
|
-
return Nt2(e3, t3);
|
|
7356
|
-
}(re3, G3.draggable.measure);
|
|
7357
|
-
(function(e3) {
|
|
7358
|
-
let { activeNode: t3, measure: n3, initialRect: r2, config: o2 = true } = e3;
|
|
7359
|
-
const i2 = l(false), { x: a2, y: s3 } = typeof o2 == "boolean" ? { x: o2, y: o2 } : o2;
|
|
7360
|
-
X(() => {
|
|
7361
|
-
if (!a2 && !s3 || !t3)
|
|
7362
|
-
return void (i2.current = false);
|
|
7363
|
-
if (i2.current || !r2)
|
|
7364
|
-
return;
|
|
7365
|
-
const e4 = t3 == null ? undefined : t3.node.current;
|
|
7366
|
-
if (!e4 || e4.isConnected === false)
|
|
7367
|
-
return;
|
|
7368
|
-
const o3 = Ee2(n3(e4), r2);
|
|
7369
|
-
if (a2 || (o3.x = 0), s3 || (o3.y = 0), i2.current = true, Math.abs(o3.x) > 0 || Math.abs(o3.y) > 0) {
|
|
7370
|
-
const t4 = Te2(e4);
|
|
7371
|
-
t4 && t4.scrollBy({ top: o3.y, left: o3.x });
|
|
7372
|
-
}
|
|
7373
|
-
}, [t3, a2, s3, r2, n3]);
|
|
7374
|
-
})({ activeNode: L3 != null ? P2.get(L3) : null, config: ie3.layoutShiftCompensation, initialRect: ae2, measure: G3.draggable.measure });
|
|
7375
|
-
const se3 = Dt2(re3, G3.draggable.measure, ae2), ce3 = Dt2(re3 ? re3.parentElement : null), ue3 = l({ activatorEvent: null, active: null, activeNode: re3, collisionRect: null, collisions: null, droppableRects: Q3, draggableNodes: P2, draggingNode: null, draggingNodeRect: null, droppableContainers: A2, over: null, scrollableAncestors: [], scrollAdjustedTranslate: null }), pe3 = A2.getNodeFor((t2 = ue3.current.over) == null ? undefined : t2.id), me3 = Pt2({ measure: G3.dragOverlay.measure }), ve3 = (n2 = me3.nodeRef.current) != null ? n2 : re3, be3 = k2 ? (s2 = me3.rect) != null ? s2 : se3 : null, ye3 = Boolean(me3.nodeRef.current && me3.rect), we3 = Ee2(xe3 = ye3 ? null : se3, Nt2(xe3));
|
|
7376
|
-
var xe3;
|
|
7377
|
-
const Ce3 = kt2(ve3 ? W2(ve3) : null), Ne3 = function(e3) {
|
|
7378
|
-
const t3 = l(e3), n3 = J2((n4) => e3 ? n4 && n4 !== Rt2 && e3 && t3.current && e3.parentNode === t3.current.parentNode ? n4 : Pe2(e3) : Rt2, [e3]);
|
|
7379
|
-
return a(() => {
|
|
7380
|
-
t3.current = e3;
|
|
7381
|
-
}, [e3]), n3;
|
|
7382
|
-
}(k2 ? pe3 != null ? pe3 : re3 : null), De3 = function(e3, t3) {
|
|
7383
|
-
t3 === undefined && (t3 = ke2);
|
|
7384
|
-
const [n3] = e3, r2 = kt2(n3 ? W2(n3) : null), [l2, i2] = o(Lt2);
|
|
7385
|
-
function a2() {
|
|
7386
|
-
i2(() => e3.length ? e3.map((e4) => Ie2(e4) ? r2 : new Xe2(t3(e4), e4)) : Lt2);
|
|
7387
|
-
}
|
|
7388
|
-
const s3 = St2({ callback: a2 });
|
|
7389
|
-
return X(() => {
|
|
7390
|
-
s3 == null || s3.disconnect(), a2(), e3.forEach((e4) => s3 == null ? undefined : s3.observe(e4));
|
|
7391
|
-
}, [e3]), l2;
|
|
7392
|
-
}(Ne3), ze3 = function(e3, t3) {
|
|
7393
|
-
let { transform: n3, ...r2 } = t3;
|
|
7394
|
-
return e3 != null && e3.length ? e3.reduce((e4, t4) => t4({ transform: e4, ...r2 }), n3) : n3;
|
|
7395
|
-
}(w2, { transform: { x: T2.x - we3.x, y: T2.y - we3.y, scaleX: 1, scaleY: 1 }, activatorEvent: j2, active: B2, activeNodeRect: se3, containerNodeRect: ce3, draggingNodeRect: be3, over: ue3.current.over, overlayNodeRect: me3.rect, scrollableAncestors: Ne3, scrollableAncestorRects: De3, windowRect: Ce3 }), Le3 = le2 ? te2(le2, T2) : null, Me2 = function(e3) {
|
|
7396
|
-
const [t3, n3] = o(null), r2 = l(e3), s3 = i((e4) => {
|
|
7397
|
-
const t4 = Ae2(e4.target);
|
|
7398
|
-
t4 && n3((e5) => e5 ? (e5.set(t4, Be2(t4)), new Map(e5)) : null);
|
|
7399
|
-
}, []);
|
|
7400
|
-
return a(() => {
|
|
7401
|
-
const t4 = r2.current;
|
|
7402
|
-
if (e3 !== t4) {
|
|
7403
|
-
o2(t4);
|
|
7404
|
-
const l2 = e3.map((e4) => {
|
|
7405
|
-
const t5 = Ae2(e4);
|
|
7406
|
-
return t5 ? (t5.addEventListener("scroll", s3, { passive: true }), [t5, Be2(t5)]) : null;
|
|
7407
|
-
}).filter((e4) => e4 != null);
|
|
7408
|
-
n3(l2.length ? new Map(l2) : null), r2.current = e3;
|
|
7409
|
-
}
|
|
7410
|
-
return () => {
|
|
7411
|
-
o2(e3), o2(t4);
|
|
7412
|
-
};
|
|
7413
|
-
function o2(e4) {
|
|
7414
|
-
e4.forEach((e5) => {
|
|
7415
|
-
const t5 = Ae2(e5);
|
|
7416
|
-
t5 == null || t5.removeEventListener("scroll", s3);
|
|
7417
|
-
});
|
|
7418
|
-
}
|
|
7419
|
-
}, [s3, e3]), p(() => e3.length ? t3 ? Array.from(t3.values()).reduce((e4, t4) => te2(e4, t4), fe2) : Ke2(e3) : fe2, [e3, t3]);
|
|
7420
|
-
}(Ne3), $e3 = zt2(Me2), Oe3 = zt2(Me2, [se3]), Fe3 = te2(ze3, $e3), He3 = be3 ? Re(be3, ze3) : null, We3 = B2 && He3 ? f({ active: B2, collisionRect: He3, droppableRects: Q3, droppableContainers: Y3, pointerCoordinates: Le3 }) : null, je3 = function(e3, t3) {
|
|
7421
|
-
if (!e3 || e3.length === 0)
|
|
7422
|
-
return null;
|
|
7423
|
-
const [n3] = e3;
|
|
7424
|
-
return n3[t3];
|
|
7425
|
-
}(We3, "id"), [qe3, Ue3] = o(null), Ye3 = function(e3, t3, n3) {
|
|
7426
|
-
return { ...e3, scaleX: t3 && n3 ? t3.width / n3.width : 1, scaleY: t3 && n3 ? t3.height / n3.height : 1 };
|
|
7427
|
-
}(ye3 ? ze3 : te2(ze3, Oe3), (c2 = qe3 == null ? undefined : qe3.rect) != null ? c2 : null, se3), Ve3 = l(null), Je3 = i((e3, t3) => {
|
|
7428
|
-
let { sensor: n3, options: r2 } = t3;
|
|
7429
|
-
if (O.current == null)
|
|
7430
|
-
return;
|
|
7431
|
-
const o2 = P2.get(O.current);
|
|
7432
|
-
if (!o2)
|
|
7433
|
-
return;
|
|
7434
|
-
const l2 = e3.nativeEvent, i2 = new n3({ active: O.current, activeNode: o2, event: l2, options: r2, context: ue3, onAbort(e4) {
|
|
7435
|
-
if (!P2.get(e4))
|
|
7436
|
-
return;
|
|
7437
|
-
const { onDragAbort: t4 } = K3.current, n4 = { id: e4 };
|
|
7438
|
-
t4 == null || t4(n4), E({ type: "onDragAbort", event: n4 });
|
|
7439
|
-
}, onPending(e4, t4, n4, r3) {
|
|
7440
|
-
if (!P2.get(e4))
|
|
7441
|
-
return;
|
|
7442
|
-
const { onDragPending: o3 } = K3.current, l3 = { id: e4, constraint: t4, initialCoordinates: n4, offset: r3 };
|
|
7443
|
-
o3 == null || o3(l3), E({ type: "onDragPending", event: l3 });
|
|
7444
|
-
}, onStart(e4) {
|
|
7445
|
-
const t4 = O.current;
|
|
7446
|
-
if (t4 == null)
|
|
7447
|
-
return;
|
|
7448
|
-
const n4 = P2.get(t4);
|
|
7449
|
-
if (!n4)
|
|
7450
|
-
return;
|
|
7451
|
-
const { onDragStart: r3 } = K3.current, o3 = { activatorEvent: l2, active: { id: t4, data: n4.data, rect: $3 } };
|
|
7452
|
-
y(() => {
|
|
7453
|
-
r3 == null || r3(o3), z2(qt2.Initializing), S2({ type: ge2.DragStart, initialCoordinates: e4, active: t4 }), E({ type: "onDragStart", event: o3 }), H3(Ve3.current), q3(l2);
|
|
7454
|
-
});
|
|
7455
|
-
}, onMove(e4) {
|
|
7456
|
-
S2({ type: ge2.DragMove, coordinates: e4 });
|
|
7457
|
-
}, onEnd: a2(ge2.DragEnd), onCancel: a2(ge2.DragCancel) });
|
|
7458
|
-
function a2(e4) {
|
|
7459
|
-
return async function() {
|
|
7460
|
-
const { active: t4, collisions: n4, over: r3, scrollAdjustedTranslate: o3 } = ue3.current;
|
|
7461
|
-
let i3 = null;
|
|
7462
|
-
if (t4 && o3) {
|
|
7463
|
-
const { cancelDrop: a3 } = K3.current;
|
|
7464
|
-
if (i3 = { activatorEvent: l2, active: t4, collisions: n4, delta: o3, over: r3 }, e4 === ge2.DragEnd && typeof a3 == "function") {
|
|
7465
|
-
await Promise.resolve(a3(i3)) && (e4 = ge2.DragCancel);
|
|
7466
|
-
}
|
|
7467
|
-
}
|
|
7468
|
-
O.current = null, y(() => {
|
|
7469
|
-
S2({ type: e4 }), z2(qt2.Uninitialized), Ue3(null), H3(null), q3(null), Ve3.current = null;
|
|
7470
|
-
const t5 = e4 === ge2.DragEnd ? "onDragEnd" : "onDragCancel";
|
|
7471
|
-
if (i3) {
|
|
7472
|
-
const e5 = K3.current[t5];
|
|
7473
|
-
e5 == null || e5(i3), E({ type: t5, event: i3 });
|
|
7474
|
-
}
|
|
7475
|
-
});
|
|
7476
|
-
};
|
|
7477
|
-
}
|
|
7478
|
-
Ve3.current = i2;
|
|
7479
|
-
}, [P2]), Ge3 = function(e3, t3) {
|
|
7480
|
-
return p(() => e3.reduce((e4, n3) => {
|
|
7481
|
-
const { sensor: r2 } = n3;
|
|
7482
|
-
return [...e4, ...r2.activators.map((e5) => ({ eventName: e5.eventName, handler: t3(e5.handler, n3) }))];
|
|
7483
|
-
}, []), [e3, t3]);
|
|
7484
|
-
}(v, i((e3, t3) => (n3, r2) => {
|
|
7485
|
-
const o2 = n3.nativeEvent, l2 = P2.get(r2);
|
|
7486
|
-
if (O.current !== null || !l2 || o2.dndKit || o2.defaultPrevented)
|
|
7487
|
-
return;
|
|
7488
|
-
const i2 = { active: l2 };
|
|
7489
|
-
e3(n3, t3.options, i2) === true && (o2.dndKit = { capturedBy: t3.sensor }, O.current = r2, Je3(n3, t3));
|
|
7490
|
-
}, [P2, Je3]));
|
|
7491
|
-
(function(e3) {
|
|
7492
|
-
a(() => {
|
|
7493
|
-
if (!F)
|
|
7494
|
-
return;
|
|
7495
|
-
const t3 = e3.map((e4) => {
|
|
7496
|
-
let { sensor: t4 } = e4;
|
|
7497
|
-
return t4.setup == null ? undefined : t4.setup();
|
|
7498
|
-
});
|
|
7499
|
-
return () => {
|
|
7500
|
-
for (const e4 of t3)
|
|
7501
|
-
e4 == null || e4();
|
|
7502
|
-
};
|
|
7503
|
-
}, e3.map((e4) => {
|
|
7504
|
-
let { sensor: t3 } = e4;
|
|
7505
|
-
return t3;
|
|
7506
|
-
}));
|
|
7507
|
-
})(v), X(() => {
|
|
7508
|
-
se3 && R === qt2.Initializing && z2(qt2.Initialized);
|
|
7509
|
-
}, [se3, R]), a(() => {
|
|
7510
|
-
const { onDragMove: e3 } = K3.current, { active: t3, activatorEvent: n3, collisions: r2, over: o2 } = ue3.current;
|
|
7511
|
-
if (!t3 || !n3)
|
|
7512
|
-
return;
|
|
7513
|
-
const l2 = { active: t3, activatorEvent: n3, collisions: r2, delta: { x: Fe3.x, y: Fe3.y }, over: o2 };
|
|
7514
|
-
y(() => {
|
|
7515
|
-
e3 == null || e3(l2), E({ type: "onDragMove", event: l2 });
|
|
7516
|
-
});
|
|
7517
|
-
}, [Fe3.x, Fe3.y]), a(() => {
|
|
7518
|
-
const { active: e3, activatorEvent: t3, collisions: n3, droppableContainers: r2, scrollAdjustedTranslate: o2 } = ue3.current;
|
|
7519
|
-
if (!e3 || O.current == null || !t3 || !o2)
|
|
7520
|
-
return;
|
|
7521
|
-
const { onDragOver: l2 } = K3.current, i2 = r2.get(je3), a2 = i2 && i2.rect.current ? { id: i2.id, rect: i2.rect.current, data: i2.data, disabled: i2.disabled } : null, s3 = { active: e3, activatorEvent: t3, collisions: n3, delta: { x: o2.x, y: o2.y }, over: a2 };
|
|
7522
|
-
y(() => {
|
|
7523
|
-
Ue3(a2), l2 == null || l2(s3), E({ type: "onDragOver", event: s3 });
|
|
7524
|
-
});
|
|
7525
|
-
}, [je3]), X(() => {
|
|
7526
|
-
ue3.current = { activatorEvent: j2, active: B2, activeNode: re3, collisionRect: He3, collisions: We3, droppableRects: Q3, draggableNodes: P2, draggingNode: ve3, draggingNodeRect: be3, droppableContainers: A2, over: qe3, scrollableAncestors: Ne3, scrollAdjustedTranslate: Fe3 }, $3.current = { initial: be3, translated: He3 };
|
|
7527
|
-
}, [B2, re3, We3, He3, P2, ve3, be3, Q3, A2, qe3, Ne3, Fe3]), ft({ ...ie3, delta: T2, draggingRect: He3, pointerCoordinates: Le3, scrollableAncestors: Ne3, scrollableAncestorRects: De3 });
|
|
7528
|
-
const _e3 = p(() => ({ active: B2, activeNode: re3, activeNodeRect: se3, activatorEvent: j2, collisions: We3, containerNodeRect: ce3, dragOverlay: me3, draggableNodes: P2, droppableContainers: A2, droppableRects: Q3, over: qe3, measureDroppableContainers: ee2, scrollableAncestors: Ne3, scrollableAncestorRects: De3, measuringConfiguration: G3, measuringScheduled: ne3, windowRect: Ce3 }), [B2, re3, se3, j2, We3, ce3, me3, P2, A2, Q3, qe3, ee2, Ne3, De3, G3, ne3, Ce3]), Qe3 = p(() => ({ activatorEvent: j2, activators: Ge3, active: B2, activeNodeRect: se3, ariaDescribedById: { draggable: U3 }, dispatch: S2, draggableNodes: P2, over: qe3, measureDroppableContainers: ee2 }), [j2, Ge3, B2, se3, S2, U3, P2, qe3, ee2]);
|
|
7529
|
-
return r.createElement(de.Provider, { value: D2 }, r.createElement(Ot2.Provider, { value: Qe3 }, r.createElement(Ft2.Provider, { value: _e3 }, r.createElement(jt2.Provider, { value: Ye3 }, g2)), r.createElement(Wt2, { disabled: (u2 == null ? undefined : u2.restoreFocus) === false })), r.createElement(he, { ...u2, hiddenTextDescribedById: U3 }));
|
|
7530
|
-
});
|
|
7531
|
-
var Xt = /* @__PURE__ */ s(null);
|
|
7532
|
-
var Yt2 = "button";
|
|
7533
|
-
function Vt2(e2) {
|
|
7534
|
-
let { id: t2, data: n2, disabled: r2 = false, attributes: o2 } = e2;
|
|
7535
|
-
const l2 = Z2("Draggable"), { activators: i2, activatorEvent: a2, active: s2, activeNodeRect: d2, ariaDescribedById: u2, draggableNodes: h2, over: g2 } = c(Ot2), { role: m2 = Yt2, roleDescription: v = "draggable", tabIndex: f = 0 } = o2 != null ? o2 : {}, b = (s2 == null ? undefined : s2.id) === t2, y2 = c(b ? jt2 : Xt), [w2, x] = G2(), [C2, N2] = G2(), S2 = function(e3, t3) {
|
|
7536
|
-
return p(() => e3.reduce((e4, n3) => {
|
|
7537
|
-
let { eventName: r3, handler: o3 } = n3;
|
|
7538
|
-
return e4[r3] = (e5) => {
|
|
7539
|
-
o3(e5, t3);
|
|
7540
|
-
}, e4;
|
|
7541
|
-
}, {}), [e3, t3]);
|
|
7542
|
-
}(i2, t2), E = V2(n2);
|
|
7543
|
-
X(() => (h2.set(t2, { id: t2, key: l2, node: w2, activatorNode: C2, data: E }), () => {
|
|
7544
|
-
const e3 = h2.get(t2);
|
|
7545
|
-
e3 && e3.key === l2 && h2.delete(t2);
|
|
7546
|
-
}), [h2, t2]);
|
|
7547
|
-
return { active: s2, activatorEvent: a2, activeNodeRect: d2, attributes: p(() => ({ role: m2, tabIndex: f, "aria-disabled": r2, "aria-pressed": !(!b || m2 !== Yt2) || undefined, "aria-roledescription": v, "aria-describedby": u2.draggable }), [r2, m2, f, b, v, u2.draggable]), isDragging: b, listeners: r2 ? undefined : S2, node: w2, over: g2, setNodeRef: x, setActivatorNodeRef: N2, transform: y2 };
|
|
7548
|
-
}
|
|
7549
|
-
var Jt2 = { timeout: 25 };
|
|
7550
|
-
var Gt2 = ({ slotPosition: n2, isEditing: r2, isDragging: o2, children: s2 }) => {
|
|
7551
|
-
const { attributes: d2, listeners: u2, setNodeRef: p2, transform: h2 } = Vt2({ id: `slot-${n2}`, data: { slotPosition: n2 }, disabled: !r2 }), { setNodeRef: g2, isOver: m2 } = function(e2) {
|
|
7552
|
-
let { data: t2, disabled: n3 = false, id: r3, resizeObserverConfig: o3 } = e2;
|
|
7553
|
-
const s3 = Z2("Droppable"), { active: d3, dispatch: u3, over: p3, measureDroppableContainers: h3 } = c(Ot2), g3 = l({ disabled: n3 }), m3 = l(false), v2 = l(null), f2 = l(null), { disabled: b, updateMeasurementsFor: y2, timeout: w2 } = { ...Jt2, ...o3 }, x = V2(y2 != null ? y2 : r3), C2 = St2({ callback: i(() => {
|
|
7554
|
-
m3.current ? (f2.current != null && clearTimeout(f2.current), f2.current = setTimeout(() => {
|
|
7555
|
-
h3(Array.isArray(x.current) ? x.current : [x.current]), f2.current = null;
|
|
7556
|
-
}, w2)) : m3.current = true;
|
|
7557
|
-
}, [w2]), disabled: b || !d3 }), N2 = i((e3, t3) => {
|
|
7558
|
-
C2 && (t3 && (C2.unobserve(t3), m3.current = false), e3 && C2.observe(e3));
|
|
7559
|
-
}, [C2]), [S2, E] = G2(N2), D2 = V2(t2);
|
|
7560
|
-
return a(() => {
|
|
7561
|
-
C2 && S2.current && (C2.disconnect(), m3.current = false, C2.observe(S2.current));
|
|
7562
|
-
}, [S2, C2]), a(() => (u3({ type: ge2.RegisterDroppable, element: { id: r3, key: s3, disabled: n3, node: S2, rect: v2, data: D2 } }), () => u3({ type: ge2.UnregisterDroppable, key: s3, id: r3 })), [r3]), a(() => {
|
|
7563
|
-
n3 !== g3.current.disabled && (u3({ type: ge2.SetDroppableDisabled, id: r3, key: s3, disabled: n3 }), g3.current.disabled = n3);
|
|
7564
|
-
}, [r3, s3, n3, u3]), { active: d3, rect: v2, isOver: (p3 == null ? undefined : p3.id) === r3, node: S2, over: p3, setNodeRef: E };
|
|
7565
|
-
}({ id: `drop-${n2}`, data: { slotPosition: n2 } }), v = { position: "relative", height: "100%", width: "100%", transform: h2 ? `translate3d(${h2.x}px, ${h2.y}px, 0)` : undefined }, f = i((e2) => {
|
|
7566
|
-
p2(e2), g2(e2);
|
|
7567
|
-
}, [p2, g2]);
|
|
7568
|
-
return t("div", { ref: f, style: v, className: `slot-with-overlay ${r2 ? "edit-mode" : ""} ${o2 ? "dragging" : ""} ${m2 ? "drag-over" : ""}`, children: [s2, r2 && /* @__PURE__ */ t("div", { className: "slot-edit-overlay", ...d2, ...u2, children: [
|
|
7569
|
-
/* @__PURE__ */ e("div", { className: "drag-indicator", children: "⋮⋮" }),
|
|
7570
|
-
/* @__PURE__ */ e("div", { className: "slot-position-label", children: n2.toUpperCase() })
|
|
7571
|
-
] })] });
|
|
7572
|
-
};
|
|
7573
|
-
var _t2 = d(({ isEditMode: n2, onLayoutChange: r2, panels: l2, layout: s2, ...c2 }, d2) => {
|
|
7574
|
-
const [u2, h2] = o(null), [g2, m2] = o({ x: 0, y: 0 }), v = function() {
|
|
7575
|
-
for (var e2 = arguments.length, t2 = new Array(e2), n3 = 0;n3 < e2; n3++)
|
|
7576
|
-
t2[n3] = arguments[n3];
|
|
7577
|
-
return p(() => [...t2].filter((e3) => e3 != null), [...t2]);
|
|
7578
|
-
}(p(() => ({ sensor: f, options: b != null ? b : {} }), [f = st2, b = { activationConstraint: { distance: 8 } }]));
|
|
7579
|
-
var f, b;
|
|
7580
|
-
const y2 = i((e2) => {
|
|
7581
|
-
const t2 = e2.active.id;
|
|
7582
|
-
if (t2.startsWith("slot-")) {
|
|
7583
|
-
const e3 = t2.replace("slot-", "");
|
|
7584
|
-
h2(e3), m2({ x: 0, y: 0 });
|
|
7585
|
-
}
|
|
7586
|
-
}, []), w2 = i((e2) => {
|
|
7587
|
-
const { delta: t2 } = e2;
|
|
7588
|
-
m2({ x: t2.x, y: t2.y });
|
|
7589
|
-
}, []), x = i((e2) => {
|
|
7590
|
-
const { active: t2, over: n3 } = e2;
|
|
7591
|
-
if (h2(null), m2({ x: 0, y: 0 }), !n3)
|
|
7592
|
-
return;
|
|
7593
|
-
const o2 = t2.id, l3 = n3.id, i2 = o2.replace("slot-", ""), a2 = l3.replace("drop-", "");
|
|
7594
|
-
if (i2 === a2)
|
|
7595
|
-
return;
|
|
7596
|
-
const c3 = { ...s2 }, d3 = c3[i2];
|
|
7597
|
-
c3[i2] = c3[a2], c3[a2] = d3, r2 && r2(c3);
|
|
7598
|
-
}, [s2, r2]);
|
|
7599
|
-
a(() => {
|
|
7600
|
-
if (!u2 || !n2)
|
|
7601
|
-
return;
|
|
7602
|
-
const e2 = document.querySelector(`[data-slot="${u2}"]`);
|
|
7603
|
-
return e2 && (e2.setAttribute("data-dragging", "true"), e2.style.setProperty("transform", `scale(0.95) translate(${g2.x}px, ${g2.y}px)`, "important"), e2.style.setProperty("z-index", "1000", "important"), e2.style.setProperty("transition", "none", "important"), e2.style.setProperty("opacity", "0.95", "important"), e2.style.setProperty("box-shadow", "0 12px 24px rgba(0, 0, 0, 0.25)", "important")), () => {
|
|
7604
|
-
e2 && (e2.removeAttribute("data-dragging"), e2.style.removeProperty("transform"), e2.style.removeProperty("z-index"), e2.style.removeProperty("transition"), e2.style.removeProperty("opacity"), e2.style.removeProperty("box-shadow"));
|
|
7605
|
-
};
|
|
7606
|
-
}, [u2, g2, n2]);
|
|
7607
|
-
return e(Ut2, { sensors: v, collisionDetection: Ce2, onDragStart: y2, onDragMove: w2, onDragEnd: x, children: /* @__PURE__ */ t("div", { className: "editable-panel-layout " + (n2 ? "edit-mode-active" : ""), children: [
|
|
7608
|
-
/* @__PURE__ */ e(M, { ref: d2, ...c2, panels: l2, layout: s2, slotDataAttributes: { left: { "data-slot": "left", "data-edit-mode": n2 ? "true" : "false" }, middle: { "data-slot": "middle", "data-edit-mode": n2 ? "true" : "false" }, right: { "data-slot": "right", "data-edit-mode": n2 ? "true" : "false" } } }),
|
|
7609
|
-
n2 && /* @__PURE__ */ e(Qt2, { layout: s2, activeSlot: u2, onDragStart: () => {}, onDragEnd: () => {} })
|
|
7610
|
-
] }) });
|
|
7611
|
-
});
|
|
7612
|
-
_t2.displayName = "EditableConfigurablePanelLayout";
|
|
7613
|
-
var Qt2 = ({ layout: t2, activeSlot: n2 }) => {
|
|
7614
|
-
const [l2, i2] = o(/* @__PURE__ */ new Map);
|
|
7615
|
-
return r.useEffect(() => {
|
|
7616
|
-
const e2 = () => {
|
|
7617
|
-
const e3 = /* @__PURE__ */ new Map;
|
|
7618
|
-
["left", "middle", "right"].forEach((t4) => {
|
|
7619
|
-
const n3 = document.querySelector(`[data-slot="${t4}"]`);
|
|
7620
|
-
if (n3) {
|
|
7621
|
-
const r2 = n3.getBoundingClientRect();
|
|
7622
|
-
e3.set(t4, r2);
|
|
7623
|
-
}
|
|
7624
|
-
}), i2(e3);
|
|
7625
|
-
};
|
|
7626
|
-
e2(), window.addEventListener("resize", e2);
|
|
7627
|
-
const t3 = setInterval(e2, 100);
|
|
7628
|
-
return () => {
|
|
7629
|
-
window.removeEventListener("resize", e2), clearInterval(t3);
|
|
7630
|
-
};
|
|
7631
|
-
}, [t2]), /* @__PURE__ */ e("div", { style: { pointerEvents: "none", position: "absolute", top: 0, left: 0, right: 0, bottom: 0, zIndex: 999 }, children: ["left", "middle", "right"].map((r2) => {
|
|
7632
|
-
if (!t2[r2])
|
|
7633
|
-
return null;
|
|
7634
|
-
const o2 = l2.get(r2);
|
|
7635
|
-
if (!o2)
|
|
7636
|
-
return null;
|
|
7637
|
-
const i3 = n2 === r2;
|
|
7638
|
-
return e("div", { style: { position: "fixed", top: o2.top, left: o2.left, width: o2.width, height: o2.height, pointerEvents: "auto" }, children: /* @__PURE__ */ e(Gt2, { slotPosition: r2, isEditing: true, isDragging: i3, children: /* @__PURE__ */ e("div", { style: { height: "100%" } }) }) }, r2);
|
|
7639
|
-
}) });
|
|
7640
|
-
};
|
|
7641
|
-
|
|
7642
4337
|
// industryMarkdown/components/SlidePresentation.tsx
|
|
4338
|
+
import { AnimatedResizableLayout } from "@principal-ade/panels";
|
|
7643
4339
|
import React17, { useState as useState10, useCallback as useCallback2, useRef as useRef9, useEffect as useEffect9 } from "react";
|
|
7644
4340
|
|
|
7645
4341
|
// industryMarkdown/utils/extractSlideTitles.ts
|
|
@@ -7672,7 +4368,7 @@ import {
|
|
|
7672
4368
|
PanelRightClose,
|
|
7673
4369
|
Columns,
|
|
7674
4370
|
ExternalLink,
|
|
7675
|
-
X
|
|
4371
|
+
X
|
|
7676
4372
|
} from "lucide-react";
|
|
7677
4373
|
import React15 from "react";
|
|
7678
4374
|
|
|
@@ -7895,7 +4591,7 @@ var SlideNavigationHeader = ({
|
|
|
7895
4591
|
onClick: onClose,
|
|
7896
4592
|
theme: theme2,
|
|
7897
4593
|
title: "Close window"
|
|
7898
|
-
}, /* @__PURE__ */ React15.createElement(
|
|
4594
|
+
}, /* @__PURE__ */ React15.createElement(X, {
|
|
7899
4595
|
size: 18
|
|
7900
4596
|
})), showFullscreenButton && !showPopoutButton && /* @__PURE__ */ React15.createElement(HeaderButton, {
|
|
7901
4597
|
onClick: onToggleFullscreen,
|
|
@@ -7910,7 +4606,7 @@ var SlideNavigationHeader = ({
|
|
|
7910
4606
|
};
|
|
7911
4607
|
|
|
7912
4608
|
// industryMarkdown/components/SlideSearchBar.tsx
|
|
7913
|
-
import { Search, X as
|
|
4609
|
+
import { Search, X as X2 } from "lucide-react";
|
|
7914
4610
|
import React16, { useRef as useRef8, useEffect as useEffect8 } from "react";
|
|
7915
4611
|
var SlideSearchBar = ({
|
|
7916
4612
|
showSearch,
|
|
@@ -7955,7 +4651,7 @@ var SlideSearchBar = ({
|
|
|
7955
4651
|
ref: searchInputRef,
|
|
7956
4652
|
type: "text",
|
|
7957
4653
|
value: searchQuery,
|
|
7958
|
-
onChange: (
|
|
4654
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
7959
4655
|
placeholder: "Search slides...",
|
|
7960
4656
|
style: {
|
|
7961
4657
|
flex: "0 0 auto",
|
|
@@ -7969,11 +4665,11 @@ var SlideSearchBar = ({
|
|
|
7969
4665
|
fontFamily: theme2.fonts.body,
|
|
7970
4666
|
outline: "none"
|
|
7971
4667
|
},
|
|
7972
|
-
onFocus: (
|
|
7973
|
-
|
|
4668
|
+
onFocus: (e) => {
|
|
4669
|
+
e.currentTarget.style.borderColor = theme2.colors.primary;
|
|
7974
4670
|
},
|
|
7975
|
-
onBlur: (
|
|
7976
|
-
|
|
4671
|
+
onBlur: (e) => {
|
|
4672
|
+
e.currentTarget.style.borderColor = theme2.colors.border;
|
|
7977
4673
|
}
|
|
7978
4674
|
}), searchQuery && /* @__PURE__ */ React16.createElement("div", {
|
|
7979
4675
|
style: {
|
|
@@ -7982,7 +4678,7 @@ var SlideSearchBar = ({
|
|
|
7982
4678
|
fontFamily: theme2.fonts.body,
|
|
7983
4679
|
flexShrink: 0
|
|
7984
4680
|
}
|
|
7985
|
-
}, searchResults.length > 0 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, searchResults.reduce((sum,
|
|
4681
|
+
}, searchResults.length > 0 ? /* @__PURE__ */ React16.createElement(React16.Fragment, null, searchResults.reduce((sum, r) => sum + r.count, 0), " matches in ", searchResults.length, " ", "slide", searchResults.length !== 1 ? "s" : "") : "No results"), /* @__PURE__ */ React16.createElement("div", {
|
|
7986
4682
|
style: {
|
|
7987
4683
|
flex: 1,
|
|
7988
4684
|
display: "flex",
|
|
@@ -7993,7 +4689,7 @@ var SlideSearchBar = ({
|
|
|
7993
4689
|
minHeight: "32px",
|
|
7994
4690
|
padding: `0 ${theme2.space[1]}px`
|
|
7995
4691
|
}
|
|
7996
|
-
}, searchQuery && !searchResults.some((
|
|
4692
|
+
}, searchQuery && !searchResults.some((r) => r.slideIndex === searchStartSlide) && /* @__PURE__ */ React16.createElement("div", {
|
|
7997
4693
|
style: {
|
|
7998
4694
|
display: "inline-flex",
|
|
7999
4695
|
alignItems: "center",
|
|
@@ -8032,14 +4728,14 @@ var SlideSearchBar = ({
|
|
|
8032
4728
|
whiteSpace: "nowrap",
|
|
8033
4729
|
flexShrink: 0
|
|
8034
4730
|
},
|
|
8035
|
-
onMouseOver: (
|
|
4731
|
+
onMouseOver: (e) => {
|
|
8036
4732
|
if (currentSearchResult !== index) {
|
|
8037
|
-
|
|
4733
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
8038
4734
|
}
|
|
8039
4735
|
},
|
|
8040
|
-
onMouseOut: (
|
|
4736
|
+
onMouseOut: (e) => {
|
|
8041
4737
|
if (currentSearchResult !== index) {
|
|
8042
|
-
|
|
4738
|
+
e.currentTarget.style.backgroundColor = theme2.colors.background;
|
|
8043
4739
|
}
|
|
8044
4740
|
},
|
|
8045
4741
|
title: `Slide ${result.slideIndex + 1}: ${slideTitles[result.slideIndex]}`
|
|
@@ -8066,11 +4762,11 @@ var SlideSearchBar = ({
|
|
|
8066
4762
|
transition: "all 0.2s ease",
|
|
8067
4763
|
flexShrink: 0
|
|
8068
4764
|
},
|
|
8069
|
-
onMouseOver: (
|
|
8070
|
-
|
|
4765
|
+
onMouseOver: (e) => {
|
|
4766
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
8071
4767
|
},
|
|
8072
|
-
onMouseOut: (
|
|
8073
|
-
|
|
4768
|
+
onMouseOut: (e) => {
|
|
4769
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
8074
4770
|
},
|
|
8075
4771
|
title: "Clear search"
|
|
8076
4772
|
}, "Clear"), /* @__PURE__ */ React16.createElement("button", {
|
|
@@ -8089,14 +4785,14 @@ var SlideSearchBar = ({
|
|
|
8089
4785
|
transition: "all 0.2s ease",
|
|
8090
4786
|
flexShrink: 0
|
|
8091
4787
|
},
|
|
8092
|
-
onMouseOver: (
|
|
8093
|
-
|
|
4788
|
+
onMouseOver: (e) => {
|
|
4789
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
8094
4790
|
},
|
|
8095
|
-
onMouseOut: (
|
|
8096
|
-
|
|
4791
|
+
onMouseOut: (e) => {
|
|
4792
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
8097
4793
|
},
|
|
8098
4794
|
title: "Close search (Esc)"
|
|
8099
|
-
}, /* @__PURE__ */ React16.createElement(
|
|
4795
|
+
}, /* @__PURE__ */ React16.createElement(X2, {
|
|
8100
4796
|
size: 16
|
|
8101
4797
|
})));
|
|
8102
4798
|
};
|
|
@@ -8374,7 +5070,7 @@ var SlidePresentation = ({
|
|
|
8374
5070
|
position: "relative",
|
|
8375
5071
|
display: "flex"
|
|
8376
5072
|
}
|
|
8377
|
-
}, effectiveTocDisplayMode === "sidebar" ? /* @__PURE__ */ React17.createElement(
|
|
5073
|
+
}, effectiveTocDisplayMode === "sidebar" ? /* @__PURE__ */ React17.createElement(AnimatedResizableLayout, {
|
|
8378
5074
|
key: `toc-${tocSidebarPosition}`,
|
|
8379
5075
|
collapsed: !showTOC,
|
|
8380
5076
|
collapsibleSide: tocSidebarPosition,
|
|
@@ -8431,14 +5127,14 @@ var SlidePresentation = ({
|
|
|
8431
5127
|
transition: "all 0.2s ease",
|
|
8432
5128
|
position: "relative"
|
|
8433
5129
|
},
|
|
8434
|
-
onMouseOver: (
|
|
5130
|
+
onMouseOver: (e) => {
|
|
8435
5131
|
if (currentSlide !== index) {
|
|
8436
|
-
|
|
5132
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
8437
5133
|
}
|
|
8438
5134
|
},
|
|
8439
|
-
onMouseOut: (
|
|
5135
|
+
onMouseOut: (e) => {
|
|
8440
5136
|
if (currentSlide !== index) {
|
|
8441
|
-
|
|
5137
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
8442
5138
|
}
|
|
8443
5139
|
}
|
|
8444
5140
|
}, /* @__PURE__ */ React17.createElement("div", {
|
|
@@ -8550,14 +5246,14 @@ var SlidePresentation = ({
|
|
|
8550
5246
|
transition: "all 0.2s ease",
|
|
8551
5247
|
position: "relative"
|
|
8552
5248
|
},
|
|
8553
|
-
onMouseOver: (
|
|
5249
|
+
onMouseOver: (e) => {
|
|
8554
5250
|
if (currentSlide !== index) {
|
|
8555
|
-
|
|
5251
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
8556
5252
|
}
|
|
8557
5253
|
},
|
|
8558
|
-
onMouseOut: (
|
|
5254
|
+
onMouseOut: (e) => {
|
|
8559
5255
|
if (currentSlide !== index) {
|
|
8560
|
-
|
|
5256
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
8561
5257
|
}
|
|
8562
5258
|
}
|
|
8563
5259
|
}, /* @__PURE__ */ React17.createElement("div", {
|
|
@@ -8680,14 +5376,14 @@ var SlidePresentation = ({
|
|
|
8680
5376
|
transition: "all 0.2s ease",
|
|
8681
5377
|
position: "relative"
|
|
8682
5378
|
},
|
|
8683
|
-
onMouseOver: (
|
|
5379
|
+
onMouseOver: (e) => {
|
|
8684
5380
|
if (currentSlide !== index) {
|
|
8685
|
-
|
|
5381
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
8686
5382
|
}
|
|
8687
5383
|
},
|
|
8688
|
-
onMouseOut: (
|
|
5384
|
+
onMouseOut: (e) => {
|
|
8689
5385
|
if (currentSlide !== index) {
|
|
8690
|
-
|
|
5386
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
8691
5387
|
}
|
|
8692
5388
|
}
|
|
8693
5389
|
}, /* @__PURE__ */ React17.createElement("div", {
|
|
@@ -8795,6 +5491,7 @@ var SlidePresentation = ({
|
|
|
8795
5491
|
}));
|
|
8796
5492
|
};
|
|
8797
5493
|
// industryMarkdown/components/SlidePresentationBook.tsx
|
|
5494
|
+
import { AnimatedResizableLayout as AnimatedResizableLayout2 } from "@principal-ade/panels";
|
|
8798
5495
|
import React18, { useState as useState11, useCallback as useCallback3, useRef as useRef10, useEffect as useEffect10 } from "react";
|
|
8799
5496
|
var SlidePresentationBook = ({
|
|
8800
5497
|
slides,
|
|
@@ -9105,7 +5802,7 @@ var SlidePresentationBook = ({
|
|
|
9105
5802
|
position: "relative",
|
|
9106
5803
|
display: "flex"
|
|
9107
5804
|
}
|
|
9108
|
-
}, viewMode === "single" && effectiveTocDisplayMode === "sidebar" ? /* @__PURE__ */ React18.createElement(
|
|
5805
|
+
}, viewMode === "single" && effectiveTocDisplayMode === "sidebar" ? /* @__PURE__ */ React18.createElement(AnimatedResizableLayout2, {
|
|
9109
5806
|
key: `toc-${tocSidebarPosition}`,
|
|
9110
5807
|
collapsed: !showTOC,
|
|
9111
5808
|
collapsibleSide: tocSidebarPosition,
|
|
@@ -9164,14 +5861,14 @@ var SlidePresentationBook = ({
|
|
|
9164
5861
|
transition: "all 0.2s ease",
|
|
9165
5862
|
position: "relative"
|
|
9166
5863
|
},
|
|
9167
|
-
onMouseOver: (
|
|
5864
|
+
onMouseOver: (e) => {
|
|
9168
5865
|
if (!isCurrentPage) {
|
|
9169
|
-
|
|
5866
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
9170
5867
|
}
|
|
9171
5868
|
},
|
|
9172
|
-
onMouseOut: (
|
|
5869
|
+
onMouseOut: (e) => {
|
|
9173
5870
|
if (!isCurrentPage) {
|
|
9174
|
-
|
|
5871
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
9175
5872
|
}
|
|
9176
5873
|
}
|
|
9177
5874
|
}, /* @__PURE__ */ React18.createElement("div", {
|
|
@@ -9288,14 +5985,14 @@ var SlidePresentationBook = ({
|
|
|
9288
5985
|
transition: "all 0.2s ease",
|
|
9289
5986
|
position: "relative"
|
|
9290
5987
|
},
|
|
9291
|
-
onMouseOver: (
|
|
5988
|
+
onMouseOver: (e) => {
|
|
9292
5989
|
if (!isCurrentPage) {
|
|
9293
|
-
|
|
5990
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
9294
5991
|
}
|
|
9295
5992
|
},
|
|
9296
|
-
onMouseOut: (
|
|
5993
|
+
onMouseOut: (e) => {
|
|
9297
5994
|
if (!isCurrentPage) {
|
|
9298
|
-
|
|
5995
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
9299
5996
|
}
|
|
9300
5997
|
}
|
|
9301
5998
|
}, /* @__PURE__ */ React18.createElement("div", {
|
|
@@ -9434,14 +6131,14 @@ var SlidePresentationBook = ({
|
|
|
9434
6131
|
transition: "all 0.2s ease",
|
|
9435
6132
|
position: "relative"
|
|
9436
6133
|
},
|
|
9437
|
-
onMouseOver: (
|
|
6134
|
+
onMouseOver: (e) => {
|
|
9438
6135
|
if (!isCurrentPage) {
|
|
9439
|
-
|
|
6136
|
+
e.currentTarget.style.backgroundColor = theme2.colors.backgroundHover;
|
|
9440
6137
|
}
|
|
9441
6138
|
},
|
|
9442
|
-
onMouseOut: (
|
|
6139
|
+
onMouseOut: (e) => {
|
|
9443
6140
|
if (!isCurrentPage) {
|
|
9444
|
-
|
|
6141
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
9445
6142
|
}
|
|
9446
6143
|
}
|
|
9447
6144
|
}, /* @__PURE__ */ React18.createElement("div", {
|
|
@@ -9495,7 +6192,7 @@ var SlidePresentationBook = ({
|
|
|
9495
6192
|
backgroundColor: theme2.colors.background,
|
|
9496
6193
|
width: "100%"
|
|
9497
6194
|
}
|
|
9498
|
-
}, slides.length > 0 ? viewMode === "book" && slides.length > 1 ? /* @__PURE__ */ React18.createElement(
|
|
6195
|
+
}, slides.length > 0 ? viewMode === "book" && slides.length > 1 ? /* @__PURE__ */ React18.createElement(AnimatedResizableLayout2, {
|
|
9499
6196
|
key: `${lastInteractedSide}-${collapsedSide}`,
|
|
9500
6197
|
collapsed: collapsedSide !== null,
|
|
9501
6198
|
collapsibleSide: lastInteractedSide,
|