coveragebook_components 0.8.2 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/build/coco/app.css +445 -308
- data/app/assets/build/coco/app.js +631 -397
- data/app/assets/build/coco/book.css +18 -4
- data/app/assets/build/coco/book.js +408 -224
- data/app/assets/build/coco/icons/armchair.svg +1 -1
- data/app/assets/build/coco/icons/folder-archive.svg +1 -1
- data/app/assets/build/coco/icons/folder-check.svg +1 -1
- data/app/assets/build/coco/icons/folder-clock.svg +1 -1
- data/app/assets/build/coco/icons/folder-closed.svg +1 -1
- data/app/assets/build/coco/icons/folder-cog.svg +1 -1
- data/app/assets/build/coco/icons/folder-down.svg +1 -1
- data/app/assets/build/coco/icons/folder-edit.svg +1 -1
- data/app/assets/build/coco/icons/folder-git.svg +1 -1
- data/app/assets/build/coco/icons/folder-heart.svg +1 -1
- data/app/assets/build/coco/icons/folder-input.svg +1 -1
- data/app/assets/build/coco/icons/folder-key.svg +1 -1
- data/app/assets/build/coco/icons/folder-lock.svg +1 -1
- data/app/assets/build/coco/icons/folder-minus.svg +1 -1
- data/app/assets/build/coco/icons/folder-open.svg +1 -1
- data/app/assets/build/coco/icons/folder-plus.svg +1 -1
- data/app/assets/build/coco/icons/folder-search-2.svg +1 -1
- data/app/assets/build/coco/icons/folder-search.svg +1 -1
- data/app/assets/build/coco/icons/folder-tree.svg +1 -1
- data/app/assets/build/coco/icons/folder-up.svg +1 -1
- data/app/assets/build/coco/icons/folder-x.svg +1 -1
- data/app/assets/build/coco/icons/folder.svg +1 -1
- data/app/assets/build/coco/icons/folders.svg +1 -1
- data/app/assets/build/coco/icons/git-commit-vertical.svg +1 -0
- data/app/assets/build/coco/icons/git-compare-arrows.svg +1 -0
- data/app/assets/build/coco/icons/git-fork.svg +1 -1
- data/app/assets/build/coco/icons/git-graph.svg +1 -0
- data/app/assets/build/coco/icons/git-pull-request-arrow.svg +1 -0
- data/app/assets/build/coco/icons/git-pull-request-closed.svg +1 -1
- data/app/assets/build/coco/icons/git-pull-request-create-arrow.svg +1 -0
- data/app/assets/build/coco/icons/git-pull-request-create.svg +1 -0
- data/app/assets/build/coco/icons/power-circle.svg +1 -0
- data/app/assets/build/coco/icons/power-square.svg +1 -0
- data/app/assets/build/coco/icons/power.svg +1 -1
- data/app/assets/js/helpers/location.js +1 -1
- data/app/assets/js/libs/alpine/index.js +0 -2
- data/app/components/coco/app/blocks/sidebar_nav/item/item.css +121 -0
- data/app/components/coco/app/blocks/sidebar_nav/item/item.html.erb +9 -0
- data/app/components/coco/app/blocks/sidebar_nav/item/item.js +80 -0
- data/app/components/coco/app/blocks/sidebar_nav/item/item.rb +50 -0
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.css +138 -0
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.html.erb +24 -0
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.js +12 -0
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.rb +48 -0
- data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.css +75 -0
- data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.html.erb +29 -0
- data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.rb +50 -0
- data/app/components/coco/base/icon/icon.rb +1 -0
- data/app/components/coco/component.rb +2 -2
- data/app/helpers/coco/app_helper.rb +5 -1
- data/app/helpers/coco/book_helper.rb +4 -4
- data/app/helpers/coco/component_helper.rb +2 -2
- data/app/helpers/coco/integration_helper.rb +4 -4
- data/config/icons.json +9 -1
- data/config/tokens.cjs +6 -0
- data/lib/coco/options/group.rb +9 -9
- data/lib/coco/test_helpers.rb +2 -2
- data/lib/coco.rb +1 -1
- metadata +23 -11
- data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.css +0 -110
- data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.html.erb +0 -42
- data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.rb +0 -28
- data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.css +0 -153
- data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.html.erb +0 -45
- data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.js +0 -44
- data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.rb +0 -108
- /data/app/assets/build/coco/icons/{git-commit.svg → git-commit-horizontal.svg} +0 -0
- /data/app/components/coco/app/blocks/sidebar_nav/{sidebar_nav.js → navbar/navbar.js} +0 -0
@@ -5650,17 +5650,17 @@
|
|
5650
5650
|
switch (e2.type) {
|
5651
5651
|
case 4:
|
5652
5652
|
return function(e3, t3) {
|
5653
|
-
const o2 = n(e3.left, t3), s2 = n(e3.right, t3),
|
5653
|
+
const o2 = n(e3.left, t3), s2 = n(e3.right, t3), l2 = e3.operator;
|
5654
5654
|
if (4 === o2.type && 4 === s2.type || 5 === o2.type && 5 === s2.type)
|
5655
5655
|
return function(e4, t4, n2) {
|
5656
5656
|
return 1 === n2 ? r(e4.value === t4.value) : { type: 1 };
|
5657
|
-
}(o2, s2,
|
5657
|
+
}(o2, s2, l2);
|
5658
5658
|
if (3 === o2.type || 3 === s2.type) {
|
5659
5659
|
const e4 = c(o2, t3), n2 = c(s2, t3);
|
5660
5660
|
if (null != e4 && null != n2)
|
5661
|
-
return u(e4, n2,
|
5661
|
+
return u(e4, n2, l2);
|
5662
5662
|
} else if (2 === o2.type && 2 === s2.type)
|
5663
|
-
return u(o2.value, s2.value,
|
5663
|
+
return u(o2.value, s2.value, l2);
|
5664
5664
|
return { type: 1 };
|
5665
5665
|
}(e2, t2);
|
5666
5666
|
case 2:
|
@@ -5728,7 +5728,7 @@
|
|
5728
5728
|
const e3 = r3.codePointAt(0);
|
5729
5729
|
n2 && 10 !== e3 && (n2 = false, t2.push(10)), 0 === e3 || e3 >= 55296 && e3 <= 57343 ? t2.push(65533) : 13 === e3 ? n2 = true : t2.push(e3);
|
5730
5730
|
}
|
5731
|
-
const r2 = q(t2, -1), { at: u2, consume: o2, error: s2, reconsume:
|
5731
|
+
const r2 = q(t2, -1), { at: u2, consume: o2, error: s2, reconsume: l2 } = r2;
|
5732
5732
|
function c2() {
|
5733
5733
|
return String.fromCodePoint(r2.value);
|
5734
5734
|
}
|
@@ -5808,7 +5808,7 @@
|
|
5808
5808
|
if (-1 === n3 || n3 === e3)
|
5809
5809
|
return -1 === n3 && s2(), { type: 2, value: t3 };
|
5810
5810
|
if (E(n3))
|
5811
|
-
return s2(),
|
5811
|
+
return s2(), l2(), { type: 3 };
|
5812
5812
|
if (92 === n3) {
|
5813
5813
|
const e4 = u2(1);
|
5814
5814
|
if (-1 === e4)
|
@@ -5848,7 +5848,7 @@
|
|
5848
5848
|
e3 += c2();
|
5849
5849
|
else {
|
5850
5850
|
if (!j(t3, u2(1)))
|
5851
|
-
return
|
5851
|
+
return l2(), e3;
|
5852
5852
|
e3 += v2();
|
5853
5853
|
}
|
5854
5854
|
}
|
@@ -5879,14 +5879,14 @@
|
|
5879
5879
|
else if (41 === e3)
|
5880
5880
|
yield { type: 5 };
|
5881
5881
|
else if (43 === e3)
|
5882
|
-
m2(e3, u2(1), u2(2)) ? (
|
5882
|
+
m2(e3, u2(1), u2(2)) ? (l2(), yield p2()) : yield i2();
|
5883
5883
|
else if (44 === e3)
|
5884
5884
|
yield { type: 6 };
|
5885
5885
|
else if (45 === e3) {
|
5886
5886
|
const t3 = u2(1), n3 = u2(2);
|
5887
|
-
m2(e3, t3, n3) ? (
|
5887
|
+
m2(e3, t3, n3) ? (l2(), yield p2()) : 45 === t3 && 62 === n3 ? (o2(2), yield { type: 19 }) : d2(e3, t3, n3) ? (l2(), yield y2()) : yield i2();
|
5888
5888
|
} else if (46 === e3)
|
5889
|
-
m2(e3, u2(1), u2(2)) ? (
|
5889
|
+
m2(e3, u2(1), u2(2)) ? (l2(), yield p2()) : yield i2();
|
5890
5890
|
else if (58 === e3)
|
5891
5891
|
yield { type: 7 };
|
5892
5892
|
else if (59 === e3)
|
@@ -5902,7 +5902,7 @@
|
|
5902
5902
|
else if (91 === e3)
|
5903
5903
|
yield { type: 9 };
|
5904
5904
|
else if (92 === e3)
|
5905
|
-
j(e3, u2(1)) ? (
|
5905
|
+
j(e3, u2(1)) ? (l2(), yield y2()) : (s2(), yield i2());
|
5906
5906
|
else if (93 === e3)
|
5907
5907
|
yield { type: 10 };
|
5908
5908
|
else if (123 === e3)
|
@@ -5910,9 +5910,9 @@
|
|
5910
5910
|
else if (125 === e3)
|
5911
5911
|
yield { type: 12 };
|
5912
5912
|
else if (k(e3))
|
5913
|
-
|
5913
|
+
l2(), yield p2();
|
5914
5914
|
else if (L(e3))
|
5915
|
-
|
5915
|
+
l2(), yield y2();
|
5916
5916
|
else {
|
5917
5917
|
if (-1 === e3)
|
5918
5918
|
return yield { type: 0 }, r2.errorIndices;
|
@@ -6447,8 +6447,8 @@
|
|
6447
6447
|
const s2 = J(e4);
|
6448
6448
|
if (s2 === x || !(X(u2) && X(s2) || K(u2) && K(s2)))
|
6449
6449
|
return x;
|
6450
|
-
const
|
6451
|
-
return c2 !== x ? { type: 2, feature: c2, bounds: [[u2, n4], [s2,
|
6450
|
+
const l2 = Y(e4, false), c2 = Z(o2, t4);
|
6451
|
+
return c2 !== x ? { type: 2, feature: c2, bounds: [[u2, n4], [s2, l2]] } : x;
|
6452
6452
|
}(e3, ie);
|
6453
6453
|
if (n3 === x)
|
6454
6454
|
return x;
|
@@ -6625,14 +6625,14 @@
|
|
6625
6625
|
if (t3.value) {
|
6626
6626
|
const r2 = $e(t3.prelude);
|
6627
6627
|
if (r2 !== x) {
|
6628
|
-
const u2 = { rule: r2, selector: null, parent: n3.parent, uid: "c" + Ae++ }, o2 = /* @__PURE__ */ new Set(), s2 = [],
|
6628
|
+
const u2 = { rule: r2, selector: null, parent: n3.parent, uid: "c" + Ae++ }, o2 = /* @__PURE__ */ new Set(), s2 = [], l2 = Oe(P(t3.value.value.value), { descriptors: n3.descriptors, parent: u2, transformStyleRule: (t4) => {
|
6629
6629
|
const [n4, r3] = function(e2, t5, n5) {
|
6630
6630
|
const r4 = C(e2), u3 = [], o3 = [];
|
6631
6631
|
for (; ; ) {
|
6632
6632
|
if (0 === r4.at(1).type)
|
6633
6633
|
return [u3, o3];
|
6634
6634
|
const n6 = Math.max(0, r4.index);
|
6635
|
-
for (;
|
6635
|
+
for (; l4 = r4.at(1), c2 = r4.at(2), !(Fe(l4) || 7 === l4.type && (7 === c2.type || 24 === c2.type && Me.has(c2.value.toLowerCase()))); )
|
6636
6636
|
r4.consume(1);
|
6637
6637
|
const i2 = r4.index + 1, a2 = e2.slice(n6, i2), f2 = a2.length > 0 ? Ue(a2) : [ee("*")];
|
6638
6638
|
for (; !Fe(r4.at(1)); )
|
@@ -6647,13 +6647,13 @@
|
|
6647
6647
|
}
|
6648
6648
|
u3.push(...f2), o3.push(...y2), o3.push(...h2), o3.push(...p2), r4.consume(1);
|
6649
6649
|
}
|
6650
|
-
var
|
6650
|
+
var l4, c2;
|
6651
6651
|
}(t4.prelude, u2.uid);
|
6652
6652
|
if (s2.length > 0)
|
6653
6653
|
return t4;
|
6654
|
-
const
|
6654
|
+
const l3 = n4.map(B).join("");
|
6655
6655
|
try {
|
6656
|
-
je.matches(
|
6656
|
+
je.matches(l3), o2.add(l3);
|
6657
6657
|
} catch (e2) {
|
6658
6658
|
}
|
6659
6659
|
return e({}, t4, { prelude: r3 });
|
@@ -6670,7 +6670,7 @@
|
|
6670
6670
|
|
6671
6671
|
${t4.join("\n")}`);
|
6672
6672
|
}
|
6673
|
-
return o2.size > 0 && (u2.selector = Array.from(o2).join(", ")), n3.descriptors.push(u2), { type: 25, name: "media", prelude: [ne("all")], value: e({}, t3.value, { value: { type: 3, value:
|
6673
|
+
return o2.size > 0 && (u2.selector = Array.from(o2).join(", ")), n3.descriptors.push(u2), { type: 25, name: "media", prelude: [ne("all")], value: e({}, t3.value, { value: { type: 3, value: l2 } }) };
|
6674
6674
|
}
|
6675
6675
|
}
|
6676
6676
|
return t3;
|
@@ -6739,8 +6739,8 @@ ${t4.join("\n")}`);
|
|
6739
6739
|
if ("stylesheet" === t2.rel) {
|
6740
6740
|
const n2 = new URL(t2.href, document.baseURI);
|
6741
6741
|
n2.origin === location.origin && (this.controller = rt(async function(r2) {
|
6742
|
-
const u2 = await fetch(n2.toString(), { signal: r2 }), o2 = await u2.text(), s2 = e2.styleSheet = await e2.context.registerStyleSheet({ source: o2, url: n2, signal: r2 }),
|
6743
|
-
c2.onload = c2.onerror = s2.refresh, c2.src = t2.href = URL.createObjectURL(
|
6742
|
+
const u2 = await fetch(n2.toString(), { signal: r2 }), o2 = await u2.text(), s2 = e2.styleSheet = await e2.context.registerStyleSheet({ source: o2, url: n2, signal: r2 }), l2 = new Blob([s2.source], { type: "text/css" }), c2 = new Image();
|
6743
|
+
c2.onload = c2.onerror = s2.refresh, c2.src = t2.href = URL.createObjectURL(l2);
|
6744
6744
|
}));
|
6745
6745
|
}
|
6746
6746
|
}
|
@@ -6856,7 +6856,7 @@ ${t4.join("\n")}`);
|
|
6856
6856
|
t2.target.nodeType !== Node.DOCUMENT_NODE && t2.target.nodeType !== Node.DOCUMENT_FRAGMENT_NODE && null === t2.target.parentNode || "attributes" === t2.type && t2.attributeName && (t2.attributeName === v || t2.attributeName === d || t2.target instanceof Element && t2.target.getAttribute(t2.attributeName) === t2.oldValue) || (A2(t2.target).mutate(), S2());
|
6857
6857
|
}
|
6858
6858
|
}).observe(u2, { childList: true, subtree: true, attributes: true, attributeOldValue: true });
|
6859
|
-
const
|
6859
|
+
const l2 = new ResizeObserver((e2) => {
|
6860
6860
|
for (const t2 of e2)
|
6861
6861
|
A2(t2.target).resize();
|
6862
6862
|
A2(u2).update(C2());
|
@@ -6882,18 +6882,18 @@ ${t4.join("\n")}`);
|
|
6882
6882
|
}
|
6883
6883
|
}(t2, n3 ? n3.toString() : void 0);
|
6884
6884
|
let s3 = () => {
|
6885
|
-
},
|
6885
|
+
}, l3 = () => {
|
6886
6886
|
};
|
6887
6887
|
const c3 = A2(u2);
|
6888
6888
|
let i2 = false;
|
6889
|
-
return null != r3 && r3.aborted || (
|
6889
|
+
return null != r3 && r3.aborted || (l3 = () => {
|
6890
6890
|
if (!i2) {
|
6891
6891
|
const { sheet: t3 } = e2;
|
6892
6892
|
null != t3 && (pt(t3, o3.descriptors), i2 = true, s3 = () => {
|
6893
6893
|
pt(t3), c3.mutate(), S2();
|
6894
6894
|
}, c3.mutate(), S2());
|
6895
6895
|
}
|
6896
|
-
}), { source: o3.source, dispose: s3, refresh:
|
6896
|
+
}), { source: o3.source, dispose: s3, refresh: l3 };
|
6897
6897
|
}
|
6898
6898
|
const p2 = { cqw: null, cqh: null };
|
6899
6899
|
function y2({ width: e2, height: t2 }) {
|
@@ -6910,7 +6910,7 @@ ${t4.join("\n")}`);
|
|
6910
6910
|
}
|
6911
6911
|
}
|
6912
6912
|
function S2() {
|
6913
|
-
|
6913
|
+
l2.unobserve(u2), l2.observe(u2);
|
6914
6914
|
}
|
6915
6915
|
const x2 = () => {
|
6916
6916
|
const e2 = [];
|
@@ -6936,14 +6936,14 @@ ${t4.join("\n")}`);
|
|
6936
6936
|
return (...n6) => {
|
6937
6937
|
if (null == u3 || !De(u3[0], n6)) {
|
6938
6938
|
const o3 = ((n7, u4) => {
|
6939
|
-
const { context: o4, conditions: s3 } = n7,
|
6939
|
+
const { context: o4, conditions: s3 } = n7, l3 = (e2) => r4.getPropertyValue(e2), c3 = it(l3), a3 = e({}, o4, { writingAxis: c3.writingAxis });
|
6940
6940
|
let f3 = s3, p4 = false, y3 = c3.displayFlags;
|
6941
6941
|
0 == (1 & n7.displayFlags) && (y3 = 0);
|
6942
6942
|
const { containerType: h3, containerNames: v2 } = c3;
|
6943
6943
|
if (h3 > 0) {
|
6944
6944
|
const e2 = h3 > 0 && 2 == (2 & y3), n8 = new Map(s3.map((e3) => [e3[0].value, e3[1]]));
|
6945
6945
|
if (f3 = [], p4 = true, e2) {
|
6946
|
-
const e3 = ct(
|
6946
|
+
const e3 = ct(l3);
|
6947
6947
|
a3.fontSize = e3.fontSize;
|
6948
6948
|
const r5 = function(e4, t2) {
|
6949
6949
|
const n9 = { value: t2.width }, r6 = { value: t2.height };
|
@@ -6965,8 +6965,8 @@ ${t4.join("\n")}`);
|
|
6965
6965
|
const o6 = i(e5.condition, { sizeFeatures: r7, treeContext: n9.treeContext });
|
6966
6966
|
return 5 === o6.type ? o6.value : null;
|
6967
6967
|
}(r6, u5) : null;
|
6968
|
-
var
|
6969
|
-
return null == s4 ? 1 === ((null != (
|
6968
|
+
var l4;
|
6969
|
+
return null == s4 ? 1 === ((null != (l4 = n8.get(e4)) ? l4 : 0) && 1) : true === s4;
|
6970
6970
|
}, y4 = (e4, t2) => {
|
6971
6971
|
let n9 = e4.get(t2);
|
6972
6972
|
if (null == n9) {
|
@@ -7002,7 +7002,7 @@ ${t4.join("\n")}`);
|
|
7002
7002
|
A2(e2);
|
7003
7003
|
p3.connected();
|
7004
7004
|
}, disconnect() {
|
7005
|
-
n3 instanceof Element && (
|
7005
|
+
n3 instanceof Element && (l2.unobserve(n3), n3.removeAttribute(v), n3.removeAttribute(d)), z2 && (z2.removeProperty(g), z2.removeProperty(b), z2.removeProperty(m), z2.removeProperty(w));
|
7006
7006
|
for (let e2 = n3.firstChild; null != e2; e2 = e2.nextSibling) {
|
7007
7007
|
const t2 = r2(e2);
|
7008
7008
|
null == t2 || t2.disconnect();
|
@@ -7013,12 +7013,12 @@ ${t4.join("\n")}`);
|
|
7013
7013
|
if (r3) {
|
7014
7014
|
if (h2(n3, e2, d), h2(n3, t2, v), n3 instanceof Element) {
|
7015
7015
|
const e3 = x3 || t2.isQueryContainer;
|
7016
|
-
e3 && !L2 ? (
|
7016
|
+
e3 && !L2 ? (l2.observe(n3), L2 = true) : !e3 && L2 && (l2.unobserve(n3), L2 = false);
|
7017
7017
|
}
|
7018
7018
|
if (z2) {
|
7019
7019
|
const n4 = t2.context, r4 = n4.writingAxis;
|
7020
|
-
let u3 = null, o3 = null, s3 = null,
|
7021
|
-
(r4 !== e2.context.writingAxis || t2.isQueryContainer) && (u3 = `var(${0 === r4 ? m : w})`, o3 = `var(${1 === r4 ? m : w})`), e2 && !t2.isQueryContainer || (n4.cqw && (s3 = n4.cqw + "px"), n4.cqh && (
|
7020
|
+
let u3 = null, o3 = null, s3 = null, l3 = null;
|
7021
|
+
(r4 !== e2.context.writingAxis || t2.isQueryContainer) && (u3 = `var(${0 === r4 ? m : w})`, o3 = `var(${1 === r4 ? m : w})`), e2 && !t2.isQueryContainer || (n4.cqw && (s3 = n4.cqw + "px"), n4.cqh && (l3 = n4.cqh + "px")), at(z2, g, u3), at(z2, b, o3), at(z2, m, s3), at(z2, w, l3);
|
7022
7022
|
}
|
7023
7023
|
p3.updated();
|
7024
7024
|
}
|
@@ -8765,7 +8765,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
8765
8765
|
const method = Array.prototype[key];
|
8766
8766
|
arrayInstrumentations[key] = function(...args) {
|
8767
8767
|
const arr = toRaw(this);
|
8768
|
-
for (let i2 = 0,
|
8768
|
+
for (let i2 = 0, l2 = this.length; i2 < l2; i2++) {
|
8769
8769
|
track(arr, "get", i2 + "");
|
8770
8770
|
}
|
8771
8771
|
const res = method.apply(arr, args);
|
@@ -10507,8 +10507,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10507
10507
|
evaluator((value2) => {
|
10508
10508
|
result = typeof value2 === "function" ? value2(input) : value2;
|
10509
10509
|
}, { scope: {
|
10510
|
-
|
10511
|
-
$
|
10510
|
+
// These are "magics" we'll make available to the x-mask:function:
|
10511
|
+
"$input": input,
|
10512
|
+
"$money": formatMoney.bind({ el })
|
10512
10513
|
} });
|
10513
10514
|
});
|
10514
10515
|
return result;
|
@@ -10556,7 +10557,13 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10556
10557
|
let unformattedValue = el.value;
|
10557
10558
|
callback();
|
10558
10559
|
let beforeLeftOfCursorBeforeFormatting = unformattedValue.slice(0, cursorPosition);
|
10559
|
-
let newPosition = buildUp(
|
10560
|
+
let newPosition = buildUp(
|
10561
|
+
template,
|
10562
|
+
stripDown(
|
10563
|
+
template,
|
10564
|
+
beforeLeftOfCursorBeforeFormatting
|
10565
|
+
)
|
10566
|
+
).length;
|
10560
10567
|
el.setSelectionRange(newPosition, newPosition);
|
10561
10568
|
}
|
10562
10569
|
function stripDown(template, input) {
|
@@ -10564,7 +10571,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10564
10571
|
let output = "";
|
10565
10572
|
let regexes = {
|
10566
10573
|
"9": /[0-9]/,
|
10567
|
-
a: /[a-zA-Z]/,
|
10574
|
+
"a": /[a-zA-Z]/,
|
10568
10575
|
"*": /[a-zA-Z0-9]/
|
10569
10576
|
};
|
10570
10577
|
let wildcardTemplate = "";
|
@@ -10648,11 +10655,17 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10648
10655
|
}
|
10649
10656
|
var module_default5 = src_default5;
|
10650
10657
|
|
10651
|
-
// ../../../node_modules
|
10652
|
-
var candidateSelectors = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])', "details>summary:first-of-type", "details"];
|
10658
|
+
// ../../../node_modules/tabbable/dist/index.esm.js
|
10659
|
+
var candidateSelectors = ["input", "select", "textarea", "a[href]", "button", "[tabindex]:not(slot)", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])', "details>summary:first-of-type", "details"];
|
10653
10660
|
var candidateSelector = /* @__PURE__ */ candidateSelectors.join(",");
|
10654
|
-
var
|
10661
|
+
var NoElement = typeof Element === "undefined";
|
10662
|
+
var matches = NoElement ? function() {
|
10655
10663
|
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
10664
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function(element) {
|
10665
|
+
return element.getRootNode();
|
10666
|
+
} : function(element) {
|
10667
|
+
return element.ownerDocument;
|
10668
|
+
};
|
10656
10669
|
var getCandidates = function getCandidates2(el, includeContainer, filter) {
|
10657
10670
|
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
10658
10671
|
if (includeContainer && matches.call(el, candidateSelector)) {
|
@@ -10661,19 +10674,53 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10661
10674
|
candidates = candidates.filter(filter);
|
10662
10675
|
return candidates;
|
10663
10676
|
};
|
10664
|
-
var
|
10665
|
-
|
10666
|
-
|
10667
|
-
|
10668
|
-
|
10669
|
-
|
10670
|
-
|
10671
|
-
|
10672
|
-
|
10673
|
-
|
10677
|
+
var getCandidatesIteratively = function getCandidatesIteratively2(elements, includeContainer, options) {
|
10678
|
+
var candidates = [];
|
10679
|
+
var elementsToCheck = Array.from(elements);
|
10680
|
+
while (elementsToCheck.length) {
|
10681
|
+
var element = elementsToCheck.shift();
|
10682
|
+
if (element.tagName === "SLOT") {
|
10683
|
+
var assigned = element.assignedElements();
|
10684
|
+
var content2 = assigned.length ? assigned : element.children;
|
10685
|
+
var nestedCandidates = getCandidatesIteratively2(content2, true, options);
|
10686
|
+
if (options.flatten) {
|
10687
|
+
candidates.push.apply(candidates, nestedCandidates);
|
10688
|
+
} else {
|
10689
|
+
candidates.push({
|
10690
|
+
scope: element,
|
10691
|
+
candidates: nestedCandidates
|
10692
|
+
});
|
10693
|
+
}
|
10694
|
+
} else {
|
10695
|
+
var validCandidate = matches.call(element, candidateSelector);
|
10696
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
10697
|
+
candidates.push(element);
|
10698
|
+
}
|
10699
|
+
var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
|
10700
|
+
typeof options.getShadowRoot === "function" && options.getShadowRoot(element);
|
10701
|
+
var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
|
10702
|
+
if (shadowRoot && validShadowRoot) {
|
10703
|
+
var _nestedCandidates = getCandidatesIteratively2(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
10704
|
+
if (options.flatten) {
|
10705
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
10706
|
+
} else {
|
10707
|
+
candidates.push({
|
10708
|
+
scope: element,
|
10709
|
+
candidates: _nestedCandidates
|
10710
|
+
});
|
10711
|
+
}
|
10712
|
+
} else {
|
10713
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
10714
|
+
}
|
10715
|
+
}
|
10674
10716
|
}
|
10675
|
-
|
10676
|
-
|
10717
|
+
return candidates;
|
10718
|
+
};
|
10719
|
+
var getTabindex = function getTabindex2(node, isScope) {
|
10720
|
+
if (node.tabIndex < 0) {
|
10721
|
+
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute("tabindex"), 10))) {
|
10722
|
+
return 0;
|
10723
|
+
}
|
10677
10724
|
}
|
10678
10725
|
return node.tabIndex;
|
10679
10726
|
};
|
@@ -10703,7 +10750,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10703
10750
|
if (!node.name) {
|
10704
10751
|
return true;
|
10705
10752
|
}
|
10706
|
-
var radioScope = node.form || node
|
10753
|
+
var radioScope = node.form || getRootNode(node);
|
10707
10754
|
var queryRadios = function queryRadios2(name) {
|
10708
10755
|
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
10709
10756
|
};
|
@@ -10727,7 +10774,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10727
10774
|
var isNonTabbableRadio = function isNonTabbableRadio2(node) {
|
10728
10775
|
return isRadio(node) && !isTabbableRadio(node);
|
10729
10776
|
};
|
10730
|
-
var
|
10777
|
+
var isZeroArea = function isZeroArea2(node) {
|
10778
|
+
var _node$getBoundingClie = node.getBoundingClientRect(), width = _node$getBoundingClie.width, height = _node$getBoundingClie.height;
|
10779
|
+
return width === 0 && height === 0;
|
10780
|
+
};
|
10781
|
+
var isHidden = function isHidden2(node, _ref) {
|
10782
|
+
var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;
|
10731
10783
|
if (getComputedStyle(node).visibility === "hidden") {
|
10732
10784
|
return true;
|
10733
10785
|
}
|
@@ -10736,31 +10788,43 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10736
10788
|
if (matches.call(nodeUnderDetails, "details:not([open]) *")) {
|
10737
10789
|
return true;
|
10738
10790
|
}
|
10791
|
+
var nodeRootHost = getRootNode(node).host;
|
10792
|
+
var nodeIsAttached = (nodeRootHost === null || nodeRootHost === void 0 ? void 0 : nodeRootHost.ownerDocument.contains(nodeRootHost)) || node.ownerDocument.contains(node);
|
10739
10793
|
if (!displayCheck || displayCheck === "full") {
|
10740
|
-
|
10741
|
-
|
10742
|
-
|
10794
|
+
if (typeof getShadowRoot === "function") {
|
10795
|
+
var originalNode = node;
|
10796
|
+
while (node) {
|
10797
|
+
var parentElement = node.parentElement;
|
10798
|
+
var rootNode = getRootNode(node);
|
10799
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true) {
|
10800
|
+
return isZeroArea(node);
|
10801
|
+
} else if (node.assignedSlot) {
|
10802
|
+
node = node.assignedSlot;
|
10803
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
10804
|
+
node = rootNode.host;
|
10805
|
+
} else {
|
10806
|
+
node = parentElement;
|
10807
|
+
}
|
10743
10808
|
}
|
10744
|
-
node =
|
10809
|
+
node = originalNode;
|
10810
|
+
}
|
10811
|
+
if (nodeIsAttached) {
|
10812
|
+
return !node.getClientRects().length;
|
10745
10813
|
}
|
10746
10814
|
} else if (displayCheck === "non-zero-area") {
|
10747
|
-
|
10748
|
-
return width === 0 && height === 0;
|
10815
|
+
return isZeroArea(node);
|
10749
10816
|
}
|
10750
10817
|
return false;
|
10751
10818
|
};
|
10752
10819
|
var isDisabledFromFieldset = function isDisabledFromFieldset2(node) {
|
10753
|
-
if (
|
10820
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
10754
10821
|
var parentNode = node.parentElement;
|
10755
10822
|
while (parentNode) {
|
10756
10823
|
if (parentNode.tagName === "FIELDSET" && parentNode.disabled) {
|
10757
10824
|
for (var i2 = 0; i2 < parentNode.children.length; i2++) {
|
10758
10825
|
var child = parentNode.children.item(i2);
|
10759
10826
|
if (child.tagName === "LEGEND") {
|
10760
|
-
|
10761
|
-
return false;
|
10762
|
-
}
|
10763
|
-
return true;
|
10827
|
+
return matches.call(parentNode, "fieldset[disabled] *") ? true : !child.contains(node);
|
10764
10828
|
}
|
10765
10829
|
}
|
10766
10830
|
return true;
|
@@ -10771,44 +10835,89 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10771
10835
|
return false;
|
10772
10836
|
};
|
10773
10837
|
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(options, node) {
|
10774
|
-
if (node.disabled || isHiddenInput(node) || isHidden(node, options
|
10838
|
+
if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
|
10839
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
10775
10840
|
return false;
|
10776
10841
|
}
|
10777
10842
|
return true;
|
10778
10843
|
};
|
10779
10844
|
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(options, node) {
|
10780
|
-
if (
|
10845
|
+
if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
10781
10846
|
return false;
|
10782
10847
|
}
|
10783
10848
|
return true;
|
10784
10849
|
};
|
10785
|
-
var
|
10786
|
-
|
10850
|
+
var isValidShadowRootTabbable = function isValidShadowRootTabbable2(shadowHostNode) {
|
10851
|
+
var tabIndex = parseInt(shadowHostNode.getAttribute("tabindex"), 10);
|
10852
|
+
if (isNaN(tabIndex) || tabIndex >= 0) {
|
10853
|
+
return true;
|
10854
|
+
}
|
10855
|
+
return false;
|
10856
|
+
};
|
10857
|
+
var sortByOrder = function sortByOrder2(candidates) {
|
10787
10858
|
var regularTabbables = [];
|
10788
10859
|
var orderedTabbables = [];
|
10789
|
-
|
10790
|
-
|
10791
|
-
var
|
10860
|
+
candidates.forEach(function(item, i2) {
|
10861
|
+
var isScope = !!item.scope;
|
10862
|
+
var element = isScope ? item.scope : item;
|
10863
|
+
var candidateTabindex = getTabindex(element, isScope);
|
10864
|
+
var elements = isScope ? sortByOrder2(item.candidates) : element;
|
10792
10865
|
if (candidateTabindex === 0) {
|
10793
|
-
regularTabbables.push(
|
10866
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
10794
10867
|
} else {
|
10795
10868
|
orderedTabbables.push({
|
10796
10869
|
documentOrder: i2,
|
10797
10870
|
tabIndex: candidateTabindex,
|
10798
|
-
|
10871
|
+
item,
|
10872
|
+
isScope,
|
10873
|
+
content: elements
|
10799
10874
|
});
|
10800
10875
|
}
|
10801
10876
|
});
|
10802
|
-
|
10803
|
-
|
10804
|
-
|
10805
|
-
|
10877
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function(acc, sortable) {
|
10878
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
10879
|
+
return acc;
|
10880
|
+
}, []).concat(regularTabbables);
|
10881
|
+
};
|
10882
|
+
var tabbable = function tabbable2(el, options) {
|
10883
|
+
options = options || {};
|
10884
|
+
var candidates;
|
10885
|
+
if (options.getShadowRoot) {
|
10886
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
10887
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
10888
|
+
flatten: false,
|
10889
|
+
getShadowRoot: options.getShadowRoot,
|
10890
|
+
shadowRootFilter: isValidShadowRootTabbable
|
10891
|
+
});
|
10892
|
+
} else {
|
10893
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
10894
|
+
}
|
10895
|
+
return sortByOrder(candidates);
|
10806
10896
|
};
|
10807
10897
|
var focusable = function focusable2(el, options) {
|
10808
10898
|
options = options || {};
|
10809
|
-
var candidates
|
10899
|
+
var candidates;
|
10900
|
+
if (options.getShadowRoot) {
|
10901
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
10902
|
+
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
10903
|
+
flatten: true,
|
10904
|
+
getShadowRoot: options.getShadowRoot
|
10905
|
+
});
|
10906
|
+
} else {
|
10907
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
10908
|
+
}
|
10810
10909
|
return candidates;
|
10811
10910
|
};
|
10911
|
+
var isTabbable = function isTabbable2(node, options) {
|
10912
|
+
options = options || {};
|
10913
|
+
if (!node) {
|
10914
|
+
throw new Error("No node provided");
|
10915
|
+
}
|
10916
|
+
if (matches.call(node, candidateSelector) === false) {
|
10917
|
+
return false;
|
10918
|
+
}
|
10919
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
10920
|
+
};
|
10812
10921
|
var focusableCandidateSelector = /* @__PURE__ */ candidateSelectors.concat("iframe").join(",");
|
10813
10922
|
var isFocusable = function isFocusable2(node, options) {
|
10814
10923
|
options = options || {};
|
@@ -10820,33 +10929,26 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10820
10929
|
}
|
10821
10930
|
return isNodeMatchingSelectorFocusable(options, node);
|
10822
10931
|
};
|
10932
|
+
|
10933
|
+
// ../../../node_modules/focus-trap/dist/focus-trap.esm.js
|
10823
10934
|
function ownKeys2(object, enumerableOnly) {
|
10824
10935
|
var keys = Object.keys(object);
|
10825
10936
|
if (Object.getOwnPropertySymbols) {
|
10826
10937
|
var symbols = Object.getOwnPropertySymbols(object);
|
10827
|
-
|
10828
|
-
|
10829
|
-
|
10830
|
-
});
|
10831
|
-
}
|
10832
|
-
keys.push.apply(keys, symbols);
|
10938
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
10939
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
10940
|
+
})), keys.push.apply(keys, symbols);
|
10833
10941
|
}
|
10834
10942
|
return keys;
|
10835
10943
|
}
|
10836
10944
|
function _objectSpread2(target) {
|
10837
10945
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
10838
|
-
var source = arguments[i2]
|
10839
|
-
|
10840
|
-
|
10841
|
-
|
10842
|
-
|
10843
|
-
}
|
10844
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
10845
|
-
} else {
|
10846
|
-
ownKeys2(Object(source)).forEach(function(key) {
|
10847
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
10848
|
-
});
|
10849
|
-
}
|
10946
|
+
var source = null != arguments[i2] ? arguments[i2] : {};
|
10947
|
+
i2 % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
|
10948
|
+
_defineProperty(target, key, source[key]);
|
10949
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
|
10950
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
10951
|
+
});
|
10850
10952
|
}
|
10851
10953
|
return target;
|
10852
10954
|
}
|
@@ -10921,64 +11023,103 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10921
11023
|
}
|
10922
11024
|
return typeof value === "function" ? value.apply(void 0, params) : value;
|
10923
11025
|
};
|
11026
|
+
var getActualTarget = function getActualTarget2(event) {
|
11027
|
+
return event.target.shadowRoot && typeof event.composedPath === "function" ? event.composedPath()[0] : event.target;
|
11028
|
+
};
|
10924
11029
|
var createFocusTrap = function createFocusTrap2(elements, userOptions) {
|
10925
|
-
var doc = document;
|
11030
|
+
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
10926
11031
|
var config = _objectSpread2({
|
10927
11032
|
returnFocusOnDeactivate: true,
|
10928
11033
|
escapeDeactivates: true,
|
10929
11034
|
delayInitialFocus: true
|
10930
11035
|
}, userOptions);
|
10931
11036
|
var state = {
|
11037
|
+
// containers given to createFocusTrap()
|
11038
|
+
// @type {Array<HTMLElement>}
|
10932
11039
|
containers: [],
|
11040
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
11041
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
11042
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
11043
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
11044
|
+
// result in an error being thrown)
|
11045
|
+
// @type {Array<{
|
11046
|
+
// container: HTMLElement,
|
11047
|
+
// tabbableNodes: Array<HTMLElement>, // empty if none
|
11048
|
+
// focusableNodes: Array<HTMLElement>, // empty if none
|
11049
|
+
// firstTabbableNode: HTMLElement|null,
|
11050
|
+
// lastTabbableNode: HTMLElement|null,
|
11051
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
11052
|
+
// }>}
|
11053
|
+
containerGroups: [],
|
11054
|
+
// same order/length as `containers` list
|
11055
|
+
// references to objects in `containerGroups`, but only those that actually have
|
11056
|
+
// tabbable nodes in them
|
11057
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
11058
|
+
// the same length
|
10933
11059
|
tabbableGroups: [],
|
10934
11060
|
nodeFocusedBeforeActivation: null,
|
10935
11061
|
mostRecentlyFocusedNode: null,
|
10936
11062
|
active: false,
|
10937
11063
|
paused: false,
|
11064
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
11065
|
+
// has been delayed during activation
|
10938
11066
|
delayInitialFocusTimer: void 0
|
10939
11067
|
};
|
10940
11068
|
var trap;
|
10941
11069
|
var getOption = function getOption2(configOverrideOptions, optionName, configOptionName) {
|
10942
11070
|
return configOverrideOptions && configOverrideOptions[optionName] !== void 0 ? configOverrideOptions[optionName] : config[configOptionName || optionName];
|
10943
11071
|
};
|
10944
|
-
var
|
10945
|
-
return state.
|
10946
|
-
|
11072
|
+
var findContainerIndex = function findContainerIndex2(element) {
|
11073
|
+
return state.containerGroups.findIndex(function(_ref) {
|
11074
|
+
var container = _ref.container, tabbableNodes = _ref.tabbableNodes;
|
11075
|
+
return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any
|
11076
|
+
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
11077
|
+
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
11078
|
+
// look inside web components even if open)
|
11079
|
+
tabbableNodes.find(function(node) {
|
11080
|
+
return node === element;
|
11081
|
+
});
|
10947
11082
|
});
|
10948
11083
|
};
|
10949
11084
|
var getNodeForOption = function getNodeForOption2(optionName) {
|
10950
11085
|
var optionValue = config[optionName];
|
11086
|
+
if (typeof optionValue === "function") {
|
11087
|
+
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
11088
|
+
params[_key2 - 1] = arguments[_key2];
|
11089
|
+
}
|
11090
|
+
optionValue = optionValue.apply(void 0, params);
|
11091
|
+
}
|
11092
|
+
if (optionValue === true) {
|
11093
|
+
optionValue = void 0;
|
11094
|
+
}
|
10951
11095
|
if (!optionValue) {
|
10952
|
-
|
11096
|
+
if (optionValue === void 0 || optionValue === false) {
|
11097
|
+
return optionValue;
|
11098
|
+
}
|
11099
|
+
throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
|
10953
11100
|
}
|
10954
11101
|
var node = optionValue;
|
10955
11102
|
if (typeof optionValue === "string") {
|
10956
11103
|
node = doc.querySelector(optionValue);
|
10957
11104
|
if (!node) {
|
10958
|
-
throw new Error("`".concat(optionName, "` refers to no known node"));
|
10959
|
-
}
|
10960
|
-
}
|
10961
|
-
if (typeof optionValue === "function") {
|
10962
|
-
node = optionValue();
|
10963
|
-
if (!node) {
|
10964
|
-
throw new Error("`".concat(optionName, "` did not return a node"));
|
11105
|
+
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
10965
11106
|
}
|
10966
11107
|
}
|
10967
11108
|
return node;
|
10968
11109
|
};
|
10969
11110
|
var getInitialFocusNode = function getInitialFocusNode2() {
|
10970
|
-
var node;
|
10971
|
-
if (
|
11111
|
+
var node = getNodeForOption("initialFocus");
|
11112
|
+
if (node === false) {
|
10972
11113
|
return false;
|
10973
11114
|
}
|
10974
|
-
if (
|
10975
|
-
|
10976
|
-
|
10977
|
-
|
10978
|
-
|
10979
|
-
|
10980
|
-
|
10981
|
-
|
11115
|
+
if (node === void 0) {
|
11116
|
+
if (findContainerIndex(doc.activeElement) >= 0) {
|
11117
|
+
node = doc.activeElement;
|
11118
|
+
} else {
|
11119
|
+
var firstTabbableGroup = state.tabbableGroups[0];
|
11120
|
+
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
|
11121
|
+
node = firstTabbableNode || getNodeForOption("fallbackFocus");
|
11122
|
+
}
|
10982
11123
|
}
|
10983
11124
|
if (!node) {
|
10984
11125
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
@@ -10986,18 +11127,44 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
10986
11127
|
return node;
|
10987
11128
|
};
|
10988
11129
|
var updateTabbableNodes = function updateTabbableNodes2() {
|
10989
|
-
state.
|
10990
|
-
var tabbableNodes = tabbable(container);
|
10991
|
-
|
10992
|
-
|
10993
|
-
|
10994
|
-
|
10995
|
-
|
10996
|
-
|
10997
|
-
|
10998
|
-
|
10999
|
-
|
11000
|
-
|
11130
|
+
state.containerGroups = state.containers.map(function(container) {
|
11131
|
+
var tabbableNodes = tabbable(container, config.tabbableOptions);
|
11132
|
+
var focusableNodes = focusable(container, config.tabbableOptions);
|
11133
|
+
return {
|
11134
|
+
container,
|
11135
|
+
tabbableNodes,
|
11136
|
+
focusableNodes,
|
11137
|
+
firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
|
11138
|
+
lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
|
11139
|
+
/**
|
11140
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
11141
|
+
* in this container, if any.
|
11142
|
+
* @param {HTMLElement} node
|
11143
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
11144
|
+
* in reverse.
|
11145
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
11146
|
+
*/
|
11147
|
+
nextTabbableNode: function nextTabbableNode(node) {
|
11148
|
+
var forward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
11149
|
+
var nodeIdx = focusableNodes.findIndex(function(n2) {
|
11150
|
+
return n2 === node;
|
11151
|
+
});
|
11152
|
+
if (nodeIdx < 0) {
|
11153
|
+
return void 0;
|
11154
|
+
}
|
11155
|
+
if (forward) {
|
11156
|
+
return focusableNodes.slice(nodeIdx + 1).find(function(n2) {
|
11157
|
+
return isTabbable(n2, config.tabbableOptions);
|
11158
|
+
});
|
11159
|
+
}
|
11160
|
+
return focusableNodes.slice(0, nodeIdx).reverse().find(function(n2) {
|
11161
|
+
return isTabbable(n2, config.tabbableOptions);
|
11162
|
+
});
|
11163
|
+
}
|
11164
|
+
};
|
11165
|
+
});
|
11166
|
+
state.tabbableGroups = state.containerGroups.filter(function(group) {
|
11167
|
+
return group.tabbableNodes.length > 0;
|
11001
11168
|
});
|
11002
11169
|
if (state.tabbableGroups.length <= 0 && !getNodeForOption("fallbackFocus")) {
|
11003
11170
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
@@ -11023,16 +11190,28 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11023
11190
|
}
|
11024
11191
|
};
|
11025
11192
|
var getReturnFocusNode = function getReturnFocusNode2(previousActiveElement) {
|
11026
|
-
var node = getNodeForOption("setReturnFocus");
|
11027
|
-
return node ? node : previousActiveElement;
|
11193
|
+
var node = getNodeForOption("setReturnFocus", previousActiveElement);
|
11194
|
+
return node ? node : node === false ? false : previousActiveElement;
|
11028
11195
|
};
|
11029
11196
|
var checkPointerDown = function checkPointerDown2(e2) {
|
11030
|
-
|
11197
|
+
var target = getActualTarget(e2);
|
11198
|
+
if (findContainerIndex(target) >= 0) {
|
11031
11199
|
return;
|
11032
11200
|
}
|
11033
11201
|
if (valueOrHandler(config.clickOutsideDeactivates, e2)) {
|
11034
11202
|
trap.deactivate({
|
11035
|
-
|
11203
|
+
// if, on deactivation, we should return focus to the node originally-focused
|
11204
|
+
// when the trap was activated (or the configured `setReturnFocus` node),
|
11205
|
+
// then assume it's also OK to return focus to the outside node that was
|
11206
|
+
// just clicked, causing deactivation, as long as that node is focusable;
|
11207
|
+
// if it isn't focusable, then return focus to the original node focused
|
11208
|
+
// on activation (or the configured `setReturnFocus` node)
|
11209
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
11210
|
+
// which will result in the outside click setting focus to the node
|
11211
|
+
// that was clicked, whether it's focusable or not; by setting
|
11212
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
11213
|
+
// on activation (or the configured `setReturnFocus` node)
|
11214
|
+
returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
|
11036
11215
|
});
|
11037
11216
|
return;
|
11038
11217
|
}
|
@@ -11042,10 +11221,11 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11042
11221
|
e2.preventDefault();
|
11043
11222
|
};
|
11044
11223
|
var checkFocusIn = function checkFocusIn2(e2) {
|
11045
|
-
var
|
11046
|
-
|
11224
|
+
var target = getActualTarget(e2);
|
11225
|
+
var targetContained = findContainerIndex(target) >= 0;
|
11226
|
+
if (targetContained || target instanceof Document) {
|
11047
11227
|
if (targetContained) {
|
11048
|
-
state.mostRecentlyFocusedNode =
|
11228
|
+
state.mostRecentlyFocusedNode = target;
|
11049
11229
|
}
|
11050
11230
|
} else {
|
11051
11231
|
e2.stopImmediatePropagation();
|
@@ -11053,13 +11233,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11053
11233
|
}
|
11054
11234
|
};
|
11055
11235
|
var checkTab = function checkTab2(e2) {
|
11236
|
+
var target = getActualTarget(e2);
|
11056
11237
|
updateTabbableNodes();
|
11057
11238
|
var destinationNode = null;
|
11058
11239
|
if (state.tabbableGroups.length > 0) {
|
11059
|
-
var containerIndex =
|
11060
|
-
|
11061
|
-
return container.contains(e2.target);
|
11062
|
-
});
|
11240
|
+
var containerIndex = findContainerIndex(target);
|
11241
|
+
var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : void 0;
|
11063
11242
|
if (containerIndex < 0) {
|
11064
11243
|
if (e2.shiftKey) {
|
11065
11244
|
destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
|
@@ -11069,9 +11248,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11069
11248
|
} else if (e2.shiftKey) {
|
11070
11249
|
var startOfGroupIndex = findIndex(state.tabbableGroups, function(_ref2) {
|
11071
11250
|
var firstTabbableNode = _ref2.firstTabbableNode;
|
11072
|
-
return
|
11251
|
+
return target === firstTabbableNode;
|
11073
11252
|
});
|
11074
|
-
if (startOfGroupIndex < 0 &&
|
11253
|
+
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
11075
11254
|
startOfGroupIndex = containerIndex;
|
11076
11255
|
}
|
11077
11256
|
if (startOfGroupIndex >= 0) {
|
@@ -11082,9 +11261,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11082
11261
|
} else {
|
11083
11262
|
var lastOfGroupIndex = findIndex(state.tabbableGroups, function(_ref3) {
|
11084
11263
|
var lastTabbableNode = _ref3.lastTabbableNode;
|
11085
|
-
return
|
11264
|
+
return target === lastTabbableNode;
|
11086
11265
|
});
|
11087
|
-
if (lastOfGroupIndex < 0 &&
|
11266
|
+
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|
11088
11267
|
lastOfGroupIndex = containerIndex;
|
11089
11268
|
}
|
11090
11269
|
if (lastOfGroupIndex >= 0) {
|
@@ -11102,7 +11281,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11102
11281
|
}
|
11103
11282
|
};
|
11104
11283
|
var checkKey = function checkKey2(e2) {
|
11105
|
-
if (isEscapeEvent(e2) && valueOrHandler(config.escapeDeactivates) !== false) {
|
11284
|
+
if (isEscapeEvent(e2) && valueOrHandler(config.escapeDeactivates, e2) !== false) {
|
11106
11285
|
e2.preventDefault();
|
11107
11286
|
trap.deactivate();
|
11108
11287
|
return;
|
@@ -11113,10 +11292,11 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11113
11292
|
}
|
11114
11293
|
};
|
11115
11294
|
var checkClick = function checkClick2(e2) {
|
11116
|
-
|
11295
|
+
var target = getActualTarget(e2);
|
11296
|
+
if (findContainerIndex(target) >= 0) {
|
11117
11297
|
return;
|
11118
11298
|
}
|
11119
|
-
if (
|
11299
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e2)) {
|
11120
11300
|
return;
|
11121
11301
|
}
|
11122
11302
|
if (valueOrHandler(config.allowOutsideClick, e2)) {
|
@@ -11164,6 +11344,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11164
11344
|
return trap;
|
11165
11345
|
};
|
11166
11346
|
trap = {
|
11347
|
+
get active() {
|
11348
|
+
return state.active;
|
11349
|
+
},
|
11350
|
+
get paused() {
|
11351
|
+
return state.paused;
|
11352
|
+
},
|
11167
11353
|
activate: function activate(activateOptions) {
|
11168
11354
|
if (state.active) {
|
11169
11355
|
return this;
|
@@ -11200,19 +11386,24 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11200
11386
|
if (!state.active) {
|
11201
11387
|
return this;
|
11202
11388
|
}
|
11389
|
+
var options = _objectSpread2({
|
11390
|
+
onDeactivate: config.onDeactivate,
|
11391
|
+
onPostDeactivate: config.onPostDeactivate,
|
11392
|
+
checkCanReturnFocus: config.checkCanReturnFocus
|
11393
|
+
}, deactivateOptions);
|
11203
11394
|
clearTimeout(state.delayInitialFocusTimer);
|
11204
11395
|
state.delayInitialFocusTimer = void 0;
|
11205
11396
|
removeListeners();
|
11206
11397
|
state.active = false;
|
11207
11398
|
state.paused = false;
|
11208
11399
|
activeFocusTraps.deactivateTrap(trap);
|
11209
|
-
var onDeactivate = getOption(
|
11210
|
-
var onPostDeactivate = getOption(
|
11211
|
-
var checkCanReturnFocus = getOption(
|
11400
|
+
var onDeactivate = getOption(options, "onDeactivate");
|
11401
|
+
var onPostDeactivate = getOption(options, "onPostDeactivate");
|
11402
|
+
var checkCanReturnFocus = getOption(options, "checkCanReturnFocus");
|
11403
|
+
var returnFocus = getOption(options, "returnFocus", "returnFocusOnDeactivate");
|
11212
11404
|
if (onDeactivate) {
|
11213
11405
|
onDeactivate();
|
11214
11406
|
}
|
11215
|
-
var returnFocus = getOption(deactivateOptions, "returnFocus", "returnFocusOnDeactivate");
|
11216
11407
|
var finishDeactivation = function finishDeactivation2() {
|
11217
11408
|
delay(function() {
|
11218
11409
|
if (returnFocus) {
|
@@ -11261,6 +11452,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11261
11452
|
trap.updateContainerElements(elements);
|
11262
11453
|
return trap;
|
11263
11454
|
};
|
11455
|
+
|
11456
|
+
// ../../../node_modules/@alpinejs/focus/dist/module.esm.js
|
11264
11457
|
function src_default6(Alpine3) {
|
11265
11458
|
let lastFocused;
|
11266
11459
|
let currentFocused;
|
@@ -11372,55 +11565,61 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11372
11565
|
}
|
11373
11566
|
};
|
11374
11567
|
});
|
11375
|
-
Alpine3.directive("trap", Alpine3.skipDuringClone(
|
11376
|
-
|
11377
|
-
|
11378
|
-
|
11379
|
-
|
11380
|
-
|
11381
|
-
|
11382
|
-
|
11383
|
-
let autofocusEl = el.querySelector("[autofocus]");
|
11384
|
-
if (autofocusEl)
|
11385
|
-
options.initialFocus = autofocusEl;
|
11386
|
-
let trap = createFocusTrap(el, options);
|
11387
|
-
let undoInert = () => {
|
11388
|
-
};
|
11389
|
-
let undoDisableScrolling = () => {
|
11390
|
-
};
|
11391
|
-
const releaseFocus = () => {
|
11392
|
-
undoInert();
|
11393
|
-
undoInert = () => {
|
11568
|
+
Alpine3.directive("trap", Alpine3.skipDuringClone(
|
11569
|
+
(el, { expression, modifiers }, { effect: effect7, evaluateLater: evaluateLater2, cleanup: cleanup2 }) => {
|
11570
|
+
let evaluator = evaluateLater2(expression);
|
11571
|
+
let oldValue = false;
|
11572
|
+
let options = {
|
11573
|
+
escapeDeactivates: false,
|
11574
|
+
allowOutsideClick: true,
|
11575
|
+
fallbackFocus: () => el
|
11394
11576
|
};
|
11395
|
-
|
11396
|
-
|
11577
|
+
let autofocusEl = el.querySelector("[autofocus]");
|
11578
|
+
if (autofocusEl)
|
11579
|
+
options.initialFocus = autofocusEl;
|
11580
|
+
let trap = createFocusTrap(el, options);
|
11581
|
+
let undoInert = () => {
|
11397
11582
|
};
|
11398
|
-
|
11399
|
-
|
11400
|
-
|
11401
|
-
|
11402
|
-
|
11403
|
-
|
11404
|
-
|
11405
|
-
|
11406
|
-
|
11407
|
-
|
11408
|
-
|
11409
|
-
if (modifiers.includes("noscroll"))
|
11410
|
-
undoDisableScrolling = disableScrolling();
|
11411
|
-
trap.activate();
|
11583
|
+
let undoDisableScrolling = () => {
|
11584
|
+
};
|
11585
|
+
const releaseFocus = () => {
|
11586
|
+
undoInert();
|
11587
|
+
undoInert = () => {
|
11588
|
+
};
|
11589
|
+
undoDisableScrolling();
|
11590
|
+
undoDisableScrolling = () => {
|
11591
|
+
};
|
11592
|
+
trap.deactivate({
|
11593
|
+
returnFocus: !modifiers.includes("noreturn")
|
11412
11594
|
});
|
11413
|
-
}
|
11414
|
-
|
11415
|
-
|
11416
|
-
|
11417
|
-
|
11418
|
-
|
11419
|
-
|
11420
|
-
|
11421
|
-
|
11422
|
-
|
11423
|
-
|
11595
|
+
};
|
11596
|
+
effect7(() => evaluator((value) => {
|
11597
|
+
if (oldValue === value)
|
11598
|
+
return;
|
11599
|
+
if (value && !oldValue) {
|
11600
|
+
setTimeout(() => {
|
11601
|
+
if (modifiers.includes("inert"))
|
11602
|
+
undoInert = setInert(el);
|
11603
|
+
if (modifiers.includes("noscroll"))
|
11604
|
+
undoDisableScrolling = disableScrolling();
|
11605
|
+
trap.activate();
|
11606
|
+
});
|
11607
|
+
}
|
11608
|
+
if (!value && oldValue) {
|
11609
|
+
releaseFocus();
|
11610
|
+
}
|
11611
|
+
oldValue = !!value;
|
11612
|
+
}));
|
11613
|
+
cleanup2(releaseFocus);
|
11614
|
+
},
|
11615
|
+
// When cloning, we only want to add aria-hidden attributes to the
|
11616
|
+
// DOM and not try to actually trap, as trapping can mess with the
|
11617
|
+
// live DOM and isn't just isolated to the cloned DOM.
|
11618
|
+
(el, { expression, modifiers }, { evaluate: evaluate2 }) => {
|
11619
|
+
if (modifiers.includes("inert") && evaluate2(expression))
|
11620
|
+
setInert(el);
|
11621
|
+
}
|
11622
|
+
));
|
11424
11623
|
}
|
11425
11624
|
function setInert(el) {
|
11426
11625
|
let undos = [];
|
@@ -11458,22 +11657,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
11458
11657
|
}
|
11459
11658
|
var module_default6 = src_default6;
|
11460
11659
|
|
11461
|
-
// ../../../node_modules/alpinejs-tash/dist/tash.esm.js
|
11462
|
-
function l2(s2) {
|
11463
|
-
s2.directive("tash", (r2, { modifiers: c2, expression: a2 }, { evaluate: u2, effect: m2 }) => {
|
11464
|
-
let p2 = (e2) => new RegExp(`${d2}${e2}${f2}`, "g"), i2 = c2.includes("vue"), o2 = c2.includes("angular"), d2 = i2 ? "{{ " : o2 ? "{{" : "{", f2 = i2 ? " }}" : o2 ? "}}" : "}", g2 = a2.split(",").map((e2) => e2.trim()), t2 = document.createElement("template");
|
11465
|
-
t2.innerHTML = r2.innerHTML;
|
11466
|
-
let n2 = `${t2.innerHTML}`;
|
11467
|
-
m2(() => {
|
11468
|
-
g2.forEach((e2) => {
|
11469
|
-
let H2 = u2(e2), h2 = p2(e2);
|
11470
|
-
n2 = n2.replace(h2, H2);
|
11471
|
-
}), r2.innerHTML = n2, n2 = t2.innerHTML;
|
11472
|
-
});
|
11473
|
-
});
|
11474
|
-
}
|
11475
|
-
var M2 = l2;
|
11476
|
-
|
11477
11660
|
// helpers/alpine.js
|
11478
11661
|
function registerComponents(components) {
|
11479
11662
|
document.addEventListener("alpine:init", () => {
|
@@ -14894,7 +15077,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
14894
15077
|
|
14895
15078
|
// libs/alpine/index.js
|
14896
15079
|
window.Alpine = module_default;
|
14897
|
-
module_default.plugin(M2);
|
14898
15080
|
module_default.plugin(module_default5);
|
14899
15081
|
module_default.plugin(module_default6);
|
14900
15082
|
module_default.plugin(module_default2);
|
@@ -15197,7 +15379,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
15197
15379
|
|
15198
15380
|
// helpers/location.js
|
15199
15381
|
function navigateTo(url, options = {}) {
|
15200
|
-
if (window.Turbo && options.turbo
|
15382
|
+
if (window.Turbo && options.turbo === true) {
|
15201
15383
|
delete options.turbo;
|
15202
15384
|
turboOptions = Object.assign({ action: "advance" }, options);
|
15203
15385
|
window.Turbo.visit(url, turboOptions);
|
@@ -15389,13 +15571,15 @@ lodash/lodash.js:
|
|
15389
15571
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
15390
15572
|
*)
|
15391
15573
|
|
15392
|
-
|
15574
|
+
tabbable/dist/index.esm.js:
|
15393
15575
|
(*!
|
15394
|
-
* tabbable 5.
|
15576
|
+
* tabbable 5.3.3
|
15395
15577
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
15396
15578
|
*)
|
15579
|
+
|
15580
|
+
focus-trap/dist/focus-trap.esm.js:
|
15397
15581
|
(*!
|
15398
|
-
* focus-trap 6.
|
15582
|
+
* focus-trap 6.9.4
|
15399
15583
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
15400
15584
|
*)
|
15401
15585
|
*/
|