@knime/jsonforms 1.21.13 → 1.21.14
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/CHANGELOG.md +6 -0
- package/dist/{AnyOfTwinlist-RYrVJHV_.js → AnyOfTwinlist-CV39JeCp.js} +1 -1
- package/dist/{CheckboxControl-BZQzU-Kr.js → CheckboxControl-CS4nuJTP.js} +1 -1
- package/dist/{CheckboxesControl-BwtY2fOR.js → CheckboxesControl-DXJMkZ49.js} +2 -2
- package/dist/{ColorControl-CpETHjy6.js → ColorControl-CpBVJh38.js} +1 -1
- package/dist/{ColorPreviewControl-3_H8I1ri.js → ColorPreviewControl-0VK3OqwY.js} +1 -1
- package/dist/{ComboBoxControl-DqRfhSYY.js → ComboBoxControl-avfNedsG.js} +4 -4
- package/dist/DateControl-B8E0JEIV.js +42 -0
- package/dist/DateTimeControl-DPjGzRqg.js +78 -0
- package/dist/{DateTimeFormatPickerControl-8pdgRAZx.js → DateTimeFormatPickerControl-Cx3yfT3O.js} +1 -1
- package/dist/DateTimeFormatPickerWithTypeControl-CodEVQG_.js +586 -0
- package/dist/{DropdownControl-BRwJh-oy.js → DropdownControl-DEggcwK1.js} +2 -2
- package/dist/{ExecutorCoresControl-iOlO4K2q.js → ExecutorCoresControl-CvCVcaHM.js} +1 -1
- package/dist/{ExecutorMemoryControl-BtEuJKmI.js → ExecutorMemoryControl-CpbVJNq4.js} +1 -1
- package/dist/{FileUploadControl-Bo7spGQA.js → FileUploadControl-CNUi9QfR.js} +21 -21
- package/dist/{GridSelectionControl-N52hhlRg.js → GridSelectionControl-HV2yNE4R.js} +14 -14
- package/dist/{HorizontalLayout-CdU7c7fd.js → HorizontalLayout-Cqf3hzxv.js} +1 -1
- package/dist/{IntegerControl-CZVvT_hf.js → IntegerControl-Ba5QkLCa.js} +1 -1
- package/dist/IntervalControl-DlLV8RQr.js +48 -0
- package/dist/{LinkControl-CMeBPEW1.js → LinkControl-COH9jvPg.js} +4 -4
- package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-l_tRM6I-.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-Cir2ym2M.js} +5 -5
- package/dist/{ManualTwinlistControl-Lq5T8rQ5.js → ManualTwinlistControl-jJGxlq9j.js} +3 -3
- package/dist/{MultiSelectListBoxControl-CzeR-Wbl.js → MultiSelectListBoxControl-DcWDraNF.js} +12 -12
- package/dist/{MultimodeTwinlistControl-Co2COblq.js → MultimodeTwinlistControl-B-rEhgKQ.js} +1 -1
- package/dist/{MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-BFrN-w7G.js → MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-yhmiIg95.js} +5 -5
- package/dist/{NameFilter-BfYUOZX-.js → NameFilter-BFKNf9cO.js} +1 -1
- package/dist/{NumberControl-D5LeZR7g.js → NumberControl-BAxGZy_4.js} +1 -1
- package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-yBfQ2lTo.js → NumberControlBase.vue_vue_type_script_setup_true_lang-Dlxx71hk.js} +2 -2
- package/dist/{OneOfDropdown-DkXPGVGA.js → OneOfDropdown-DcetHKT5.js} +4 -4
- package/dist/{RadioButtonsWithDescriptionControl-BZEiPIT7.js → RadioButtonsWithDescriptionControl-pZ0gJ6iz.js} +4 -4
- package/dist/{RadioControl-BM8jzumR.js → RadioControl-B8-nxddP.js} +1 -1
- package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-DEZ-BDbe.js → RadioControlBase.vue_vue_type_script_setup_true_lang-8xWE-iQR.js} +8 -8
- package/dist/ResourceControlBase-ZMTuwwL2.js +86 -0
- package/dist/{RichTextControl-BSDuXS-r.js → RichTextControl-kptCYz2A.js} +5874 -4964
- package/dist/{SectionHeading-CQPP2Ldw.js → SectionHeading-MlqCj5BS.js} +1 -1
- package/dist/{SectionLayout-DVSBUJWh.js → SectionLayout-nV1GnghP.js} +3 -3
- package/dist/SettingsSubPanel-Z6urYwz1.js +5 -0
- package/dist/{SettingsSubPanelLayout-BGGUILX0.js → SettingsSubPanelLayout-BNMJbUsL.js} +4 -4
- package/dist/{SimpleButtonControl-CrZYDy2d.js → SimpleButtonControl-DZFYl2H3.js} +8 -8
- package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-zrzBlOHh.js +27089 -0
- package/dist/{SimpleTwinlistControl-DNXi9aTL.js → SimpleTwinlistControl-Ds2BQOoO.js} +2 -2
- package/dist/{SingleSelectControl-UgYnjUWO.js → SingleSelectControl-CLv_Mah-.js} +2 -2
- package/dist/{SingleSelectListBoxControl-CxkgaK13.js → SingleSelectListBoxControl-DM_5t3Nv.js} +3 -3
- package/dist/{SortListControl-C_ov2UWK.js → SortListControl-COd0WHwd.js} +1 -1
- package/dist/{StyledListItem-CzxxmMCV.js → StyledListItem-D3NbpWl3.js} +1 -1
- package/dist/{TeamAndSpacesControl-D7oS2zYV.js → TeamAndSpacesControl-A8mWrSE4.js} +1 -1
- package/dist/{TeamResourceControl-CYobSLvC.js → TeamResourceControl-CAgwzjRZ.js} +1 -1
- package/dist/{TextAreaControl-AG_b-Z5X.js → TextAreaControl-DRBGqA7a.js} +1 -1
- package/dist/{TextControl-BSEmxN5j.js → TextControl--Tw-AE3y.js} +1 -1
- package/dist/{TextControl.vue_vue_type_script_setup_true_lang-CadH1IKc.js → TextControl.vue_vue_type_script_setup_true_lang-PdbUWJUv.js} +2 -2
- package/dist/TimeControl-D_hEPt2Z.js +69 -0
- package/dist/TimeframesControl-EKcriaC8.js +345 -0
- package/dist/{TwinlistControlBase.vue_vue_type_script_setup_true_lang-SsKJamsg.js → TwinlistControlBase.vue_vue_type_script_setup_true_lang-BRq0ANwm.js} +2 -2
- package/dist/{TypedStringFilter-DAcGj5q1.js → TypedStringFilter-UUuSnJNk.js} +1 -1
- package/dist/{ValueSwitchControl-CXrI8Yl-.js → ValueSwitchControl-BwERUIyr.js} +1 -1
- package/dist/{VerticalLayout-eL6w0Hg9.js → VerticalLayout-BET3pZ_K.js} +2 -2
- package/dist/{VerticalLayoutBase-B9SsD2_6.js → VerticalLayoutBase-HYtDwVLA.js} +1 -1
- package/dist/ZonedDateTimeControl-CsbZwGMX.js +77 -0
- package/dist/{_Uint8Array-Du4fEgNS.js → _Uint8Array-DJimCh8a.js} +5 -7
- package/dist/classApi-CHpAZrj3.js +3328 -0
- package/dist/knime-jsonforms.css +1 -1
- package/dist/knime-jsonforms.js +7 -7
- package/dist/plainDateTimeUtils-CR0UhpkD.js +52 -0
- package/dist/src/composables/usePlainDateTimeBatch.d.ts +31 -0
- package/dist/src/uiComponents/DateControl.vue.d.ts +1 -1
- package/dist/src/uiComponents/DateTimeControl.vue.d.ts +1 -1
- package/dist/src/uiComponents/TimeControl.vue.d.ts +1 -1
- package/dist/src/utils/plainDateTimeUtils.d.ts +66 -0
- package/dist/testing.js +4285 -3982
- package/dist/{toString-Cng8dMI8.js → toString-B8vqfiDe.js} +3 -4
- package/dist/{useBuiltinValidations-CT2mv4JV.js → useBuiltinValidations-CzYsm8oq.js} +1 -1
- package/dist/useDropdownNavigation-CdrbT-CQ.js +2003 -0
- package/dist/usePlainDateTimeBatch-Bd2G-GY9.js +34 -0
- package/dist/{usePossibleValues-DlVd3QMh.js → usePossibleValues-CGt7yrJ6.js} +1 -1
- package/dist/{useUnknownValuesInTwinlist-UbVZb8Wt.js → useUnknownValuesInTwinlist-Bez1tY4_.js} +1 -1
- package/package.json +5 -8
- package/dist/DateControl-Cg1q7qVH.js +0 -35
- package/dist/DateTimeControl-C7EwnT5D.js +0 -44
- package/dist/DateTimeFormatPickerWithTypeControl-oBFnJRkM.js +0 -464
- package/dist/IntervalControl-DW-jmzYH.js +0 -751
- package/dist/ResourceControlBase-Djv2vDNo.js +0 -69
- package/dist/SettingsSubPanel-DKVUGp-Q.js +0 -5
- package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-3pf9Mad5.js +0 -28295
- package/dist/TimeControl-GY-l_p55.js +0 -35
- package/dist/TimePartInput-BGCbCcks.js +0 -254
- package/dist/TimeframesControl-BT_-Fm_A.js +0 -87
- package/dist/Tooltip-Bc8zeqxg.js +0 -24
- package/dist/ValueSwitch-DnpLqjm_.js +0 -130
- package/dist/ZonedDateTimeControl-y5IsH4g_.js +0 -66
- package/dist/_baseIteratee-echQG1Gb.js +0 -308
- package/dist/arrow-dropdown-DMFBPPcK.js +0 -17
- package/dist/floating-ui.vue-Bk6u3tWN.js +0 -1060
- package/dist/localTimeUtils-DlStha9G.js +0 -12315
- package/dist/popper-iehk3xNV.js +0 -923
- package/dist/src/utils/localTimeUtils.d.ts +0 -18
- package/dist/useDropdownNavigation-EOwf_fL0.js +0 -946
|
@@ -0,0 +1,2003 @@
|
|
|
1
|
+
import { defineComponent as Ot, ref as ee, computed as H, onMounted as Nt, watch as we, onUnmounted as Ct, Comment as kt, cloneVNode as Dt, shallowRef as Pt, getCurrentScope as It, onScopeDispose as Lt, shallowReadonly as ce, unref as Bt, readonly as Mt } from "vue";
|
|
2
|
+
var ut = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], xe = /* @__PURE__ */ ut.join(","), ft = typeof Element > "u", re = ft ? function() {
|
|
3
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Se = !ft && Element.prototype.getRootNode ? function(t) {
|
|
4
|
+
var e;
|
|
5
|
+
return t == null || (e = t.getRootNode) === null || e === void 0 ? void 0 : e.call(t);
|
|
6
|
+
} : function(t) {
|
|
7
|
+
return t?.ownerDocument;
|
|
8
|
+
}, Te = function(e, n) {
|
|
9
|
+
var r;
|
|
10
|
+
n === void 0 && (n = !0);
|
|
11
|
+
var a = e == null || (r = e.getAttribute) === null || r === void 0 ? void 0 : r.call(e, "inert"), o = a === "" || a === "true", i = o || n && e && // closest does not exist on shadow roots, so we fall back to a manual
|
|
12
|
+
// lookup upward, in case it is not defined.
|
|
13
|
+
(typeof e.closest == "function" ? e.closest("[inert]") : Te(e.parentNode));
|
|
14
|
+
return i;
|
|
15
|
+
}, jt = function(e) {
|
|
16
|
+
var n, r = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "contenteditable");
|
|
17
|
+
return r === "" || r === "true";
|
|
18
|
+
}, dt = function(e, n, r) {
|
|
19
|
+
if (Te(e))
|
|
20
|
+
return [];
|
|
21
|
+
var a = Array.prototype.slice.apply(e.querySelectorAll(xe));
|
|
22
|
+
return n && re.call(e, xe) && a.unshift(e), a = a.filter(r), a;
|
|
23
|
+
}, Ee = function(e, n, r) {
|
|
24
|
+
for (var a = [], o = Array.from(e); o.length; ) {
|
|
25
|
+
var i = o.shift();
|
|
26
|
+
if (!Te(i, !1))
|
|
27
|
+
if (i.tagName === "SLOT") {
|
|
28
|
+
var s = i.assignedElements(), u = s.length ? s : i.children, f = Ee(u, !0, r);
|
|
29
|
+
r.flatten ? a.push.apply(a, f) : a.push({
|
|
30
|
+
scopeParent: i,
|
|
31
|
+
candidates: f
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
var d = re.call(i, xe);
|
|
35
|
+
d && r.filter(i) && (n || !e.includes(i)) && a.push(i);
|
|
36
|
+
var v = i.shadowRoot || // check for an undisclosed shadow
|
|
37
|
+
typeof r.getShadowRoot == "function" && r.getShadowRoot(i), m = !Te(v, !1) && (!r.shadowRootFilter || r.shadowRootFilter(i));
|
|
38
|
+
if (v && m) {
|
|
39
|
+
var b = Ee(v === !0 ? i.children : v.children, !0, r);
|
|
40
|
+
r.flatten ? a.push.apply(a, b) : a.push({
|
|
41
|
+
scopeParent: i,
|
|
42
|
+
candidates: b
|
|
43
|
+
});
|
|
44
|
+
} else
|
|
45
|
+
o.unshift.apply(o, i.children);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return a;
|
|
49
|
+
}, vt = function(e) {
|
|
50
|
+
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
51
|
+
}, te = function(e) {
|
|
52
|
+
if (!e)
|
|
53
|
+
throw new Error("No node provided");
|
|
54
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || jt(e)) && !vt(e) ? 0 : e.tabIndex;
|
|
55
|
+
}, Vt = function(e, n) {
|
|
56
|
+
var r = te(e);
|
|
57
|
+
return r < 0 && n && !vt(e) ? 0 : r;
|
|
58
|
+
}, _t = function(e, n) {
|
|
59
|
+
return e.tabIndex === n.tabIndex ? e.documentOrder - n.documentOrder : e.tabIndex - n.tabIndex;
|
|
60
|
+
}, bt = function(e) {
|
|
61
|
+
return e.tagName === "INPUT";
|
|
62
|
+
}, Wt = function(e) {
|
|
63
|
+
return bt(e) && e.type === "hidden";
|
|
64
|
+
}, Kt = function(e) {
|
|
65
|
+
var n = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(r) {
|
|
66
|
+
return r.tagName === "SUMMARY";
|
|
67
|
+
});
|
|
68
|
+
return n;
|
|
69
|
+
}, $t = function(e, n) {
|
|
70
|
+
for (var r = 0; r < e.length; r++)
|
|
71
|
+
if (e[r].checked && e[r].form === n)
|
|
72
|
+
return e[r];
|
|
73
|
+
}, Ht = function(e) {
|
|
74
|
+
if (!e.name)
|
|
75
|
+
return !0;
|
|
76
|
+
var n = e.form || Se(e), r = function(s) {
|
|
77
|
+
return n.querySelectorAll('input[type="radio"][name="' + s + '"]');
|
|
78
|
+
}, a;
|
|
79
|
+
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
80
|
+
a = r(window.CSS.escape(e.name));
|
|
81
|
+
else
|
|
82
|
+
try {
|
|
83
|
+
a = r(e.name);
|
|
84
|
+
} catch (i) {
|
|
85
|
+
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", i.message), !1;
|
|
86
|
+
}
|
|
87
|
+
var o = $t(a, e.form);
|
|
88
|
+
return !o || o === e;
|
|
89
|
+
}, qt = function(e) {
|
|
90
|
+
return bt(e) && e.type === "radio";
|
|
91
|
+
}, zt = function(e) {
|
|
92
|
+
return qt(e) && !Ht(e);
|
|
93
|
+
}, Xt = function(e) {
|
|
94
|
+
var n, r = e && Se(e), a = (n = r) === null || n === void 0 ? void 0 : n.host, o = !1;
|
|
95
|
+
if (r && r !== e) {
|
|
96
|
+
var i, s, u;
|
|
97
|
+
for (o = !!((i = a) !== null && i !== void 0 && (s = i.ownerDocument) !== null && s !== void 0 && s.contains(a) || e != null && (u = e.ownerDocument) !== null && u !== void 0 && u.contains(e)); !o && a; ) {
|
|
98
|
+
var f, d, v;
|
|
99
|
+
r = Se(a), a = (f = r) === null || f === void 0 ? void 0 : f.host, o = !!((d = a) !== null && d !== void 0 && (v = d.ownerDocument) !== null && v !== void 0 && v.contains(a));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return o;
|
|
103
|
+
}, Ue = function(e) {
|
|
104
|
+
var n = e.getBoundingClientRect(), r = n.width, a = n.height;
|
|
105
|
+
return r === 0 && a === 0;
|
|
106
|
+
}, Gt = function(e, n) {
|
|
107
|
+
var r = n.displayCheck, a = n.getShadowRoot;
|
|
108
|
+
if (r === "full-native" && "checkVisibility" in e) {
|
|
109
|
+
var o = e.checkVisibility({
|
|
110
|
+
// Checking opacity might be desirable for some use cases, but natively,
|
|
111
|
+
// opacity zero elements _are_ focusable and tabbable.
|
|
112
|
+
checkOpacity: !1,
|
|
113
|
+
opacityProperty: !1,
|
|
114
|
+
contentVisibilityAuto: !0,
|
|
115
|
+
visibilityProperty: !0,
|
|
116
|
+
// This is an alias for `visibilityProperty`. Contemporary browsers
|
|
117
|
+
// support both. However, this alias has wider browser support (Chrome
|
|
118
|
+
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
|
|
119
|
+
// we include it anyway.
|
|
120
|
+
checkVisibilityCSS: !0
|
|
121
|
+
});
|
|
122
|
+
return !o;
|
|
123
|
+
}
|
|
124
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
125
|
+
return !0;
|
|
126
|
+
var i = re.call(e, "details>summary:first-of-type"), s = i ? e.parentElement : e;
|
|
127
|
+
if (re.call(s, "details:not([open]) *"))
|
|
128
|
+
return !0;
|
|
129
|
+
if (!r || r === "full" || // full-native can run this branch when it falls through in case
|
|
130
|
+
// Element#checkVisibility is unsupported
|
|
131
|
+
r === "full-native" || r === "legacy-full") {
|
|
132
|
+
if (typeof a == "function") {
|
|
133
|
+
for (var u = e; e; ) {
|
|
134
|
+
var f = e.parentElement, d = Se(e);
|
|
135
|
+
if (f && !f.shadowRoot && a(f) === !0)
|
|
136
|
+
return Ue(e);
|
|
137
|
+
e.assignedSlot ? e = e.assignedSlot : !f && d !== e.ownerDocument ? e = d.host : e = f;
|
|
138
|
+
}
|
|
139
|
+
e = u;
|
|
140
|
+
}
|
|
141
|
+
if (Xt(e))
|
|
142
|
+
return !e.getClientRects().length;
|
|
143
|
+
if (r !== "legacy-full")
|
|
144
|
+
return !0;
|
|
145
|
+
} else if (r === "non-zero-area")
|
|
146
|
+
return Ue(e);
|
|
147
|
+
return !1;
|
|
148
|
+
}, Ut = function(e) {
|
|
149
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
150
|
+
for (var n = e.parentElement; n; ) {
|
|
151
|
+
if (n.tagName === "FIELDSET" && n.disabled) {
|
|
152
|
+
for (var r = 0; r < n.children.length; r++) {
|
|
153
|
+
var a = n.children.item(r);
|
|
154
|
+
if (a.tagName === "LEGEND")
|
|
155
|
+
return re.call(n, "fieldset[disabled] *") ? !0 : !a.contains(e);
|
|
156
|
+
}
|
|
157
|
+
return !0;
|
|
158
|
+
}
|
|
159
|
+
n = n.parentElement;
|
|
160
|
+
}
|
|
161
|
+
return !1;
|
|
162
|
+
}, Re = function(e, n) {
|
|
163
|
+
return !(n.disabled || Wt(n) || Gt(n, e) || // For a details element with a summary, the summary element gets the focus
|
|
164
|
+
Kt(n) || Ut(n));
|
|
165
|
+
}, We = function(e, n) {
|
|
166
|
+
return !(zt(n) || te(n) < 0 || !Re(e, n));
|
|
167
|
+
}, Yt = function(e) {
|
|
168
|
+
var n = parseInt(e.getAttribute("tabindex"), 10);
|
|
169
|
+
return !!(isNaN(n) || n >= 0);
|
|
170
|
+
}, ht = function(e) {
|
|
171
|
+
var n = [], r = [];
|
|
172
|
+
return e.forEach(function(a, o) {
|
|
173
|
+
var i = !!a.scopeParent, s = i ? a.scopeParent : a, u = Vt(s, i), f = i ? ht(a.candidates) : s;
|
|
174
|
+
u === 0 ? i ? n.push.apply(n, f) : n.push(s) : r.push({
|
|
175
|
+
documentOrder: o,
|
|
176
|
+
tabIndex: u,
|
|
177
|
+
item: a,
|
|
178
|
+
isScope: i,
|
|
179
|
+
content: f
|
|
180
|
+
});
|
|
181
|
+
}), r.sort(_t).reduce(function(a, o) {
|
|
182
|
+
return o.isScope ? a.push.apply(a, o.content) : a.push(o.content), a;
|
|
183
|
+
}, []).concat(n);
|
|
184
|
+
}, Zt = function(e, n) {
|
|
185
|
+
n = n || {};
|
|
186
|
+
var r;
|
|
187
|
+
return n.getShadowRoot ? r = Ee([e], n.includeContainer, {
|
|
188
|
+
filter: We.bind(null, n),
|
|
189
|
+
flatten: !1,
|
|
190
|
+
getShadowRoot: n.getShadowRoot,
|
|
191
|
+
shadowRootFilter: Yt
|
|
192
|
+
}) : r = dt(e, n.includeContainer, We.bind(null, n)), ht(r);
|
|
193
|
+
}, Jt = function(e, n) {
|
|
194
|
+
n = n || {};
|
|
195
|
+
var r;
|
|
196
|
+
return n.getShadowRoot ? r = Ee([e], n.includeContainer, {
|
|
197
|
+
filter: Re.bind(null, n),
|
|
198
|
+
flatten: !0,
|
|
199
|
+
getShadowRoot: n.getShadowRoot
|
|
200
|
+
}) : r = dt(e, n.includeContainer, Re.bind(null, n)), r;
|
|
201
|
+
}, le = function(e, n) {
|
|
202
|
+
if (n = n || {}, !e)
|
|
203
|
+
throw new Error("No node provided");
|
|
204
|
+
return re.call(e, xe) === !1 ? !1 : We(n, e);
|
|
205
|
+
}, Qt = /* @__PURE__ */ ut.concat("iframe:not([inert]):not([inert] *)").join(","), je = function(e, n) {
|
|
206
|
+
if (n = n || {}, !e)
|
|
207
|
+
throw new Error("No node provided");
|
|
208
|
+
return re.call(e, Qt) === !1 ? !1 : Re(n, e);
|
|
209
|
+
};
|
|
210
|
+
function Ke(t, e) {
|
|
211
|
+
(e == null || e > t.length) && (e = t.length);
|
|
212
|
+
for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
|
|
213
|
+
return r;
|
|
214
|
+
}
|
|
215
|
+
function en(t) {
|
|
216
|
+
if (Array.isArray(t)) return Ke(t);
|
|
217
|
+
}
|
|
218
|
+
function Ye(t, e) {
|
|
219
|
+
var n = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
220
|
+
if (!n) {
|
|
221
|
+
if (Array.isArray(t) || (n = pt(t)) || e) {
|
|
222
|
+
n && (t = n);
|
|
223
|
+
var r = 0, a = function() {
|
|
224
|
+
};
|
|
225
|
+
return {
|
|
226
|
+
s: a,
|
|
227
|
+
n: function() {
|
|
228
|
+
return r >= t.length ? {
|
|
229
|
+
done: !0
|
|
230
|
+
} : {
|
|
231
|
+
done: !1,
|
|
232
|
+
value: t[r++]
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
e: function(u) {
|
|
236
|
+
throw u;
|
|
237
|
+
},
|
|
238
|
+
f: a
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
242
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
243
|
+
}
|
|
244
|
+
var o, i = !0, s = !1;
|
|
245
|
+
return {
|
|
246
|
+
s: function() {
|
|
247
|
+
n = n.call(t);
|
|
248
|
+
},
|
|
249
|
+
n: function() {
|
|
250
|
+
var u = n.next();
|
|
251
|
+
return i = u.done, u;
|
|
252
|
+
},
|
|
253
|
+
e: function(u) {
|
|
254
|
+
s = !0, o = u;
|
|
255
|
+
},
|
|
256
|
+
f: function() {
|
|
257
|
+
try {
|
|
258
|
+
i || n.return == null || n.return();
|
|
259
|
+
} finally {
|
|
260
|
+
if (s) throw o;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
function tn(t, e, n) {
|
|
266
|
+
return (e = sn(e)) in t ? Object.defineProperty(t, e, {
|
|
267
|
+
value: n,
|
|
268
|
+
enumerable: !0,
|
|
269
|
+
configurable: !0,
|
|
270
|
+
writable: !0
|
|
271
|
+
}) : t[e] = n, t;
|
|
272
|
+
}
|
|
273
|
+
function nn(t) {
|
|
274
|
+
if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
|
|
275
|
+
}
|
|
276
|
+
function rn() {
|
|
277
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
278
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
279
|
+
}
|
|
280
|
+
function Ze(t, e) {
|
|
281
|
+
var n = Object.keys(t);
|
|
282
|
+
if (Object.getOwnPropertySymbols) {
|
|
283
|
+
var r = Object.getOwnPropertySymbols(t);
|
|
284
|
+
e && (r = r.filter(function(a) {
|
|
285
|
+
return Object.getOwnPropertyDescriptor(t, a).enumerable;
|
|
286
|
+
})), n.push.apply(n, r);
|
|
287
|
+
}
|
|
288
|
+
return n;
|
|
289
|
+
}
|
|
290
|
+
function Je(t) {
|
|
291
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
292
|
+
var n = arguments[e] != null ? arguments[e] : {};
|
|
293
|
+
e % 2 ? Ze(Object(n), !0).forEach(function(r) {
|
|
294
|
+
tn(t, r, n[r]);
|
|
295
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Ze(Object(n)).forEach(function(r) {
|
|
296
|
+
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
return t;
|
|
300
|
+
}
|
|
301
|
+
function an(t) {
|
|
302
|
+
return en(t) || nn(t) || pt(t) || rn();
|
|
303
|
+
}
|
|
304
|
+
function on(t, e) {
|
|
305
|
+
if (typeof t != "object" || !t) return t;
|
|
306
|
+
var n = t[Symbol.toPrimitive];
|
|
307
|
+
if (n !== void 0) {
|
|
308
|
+
var r = n.call(t, e);
|
|
309
|
+
if (typeof r != "object") return r;
|
|
310
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
311
|
+
}
|
|
312
|
+
return (e === "string" ? String : Number)(t);
|
|
313
|
+
}
|
|
314
|
+
function sn(t) {
|
|
315
|
+
var e = on(t, "string");
|
|
316
|
+
return typeof e == "symbol" ? e : e + "";
|
|
317
|
+
}
|
|
318
|
+
function pt(t, e) {
|
|
319
|
+
if (t) {
|
|
320
|
+
if (typeof t == "string") return Ke(t, e);
|
|
321
|
+
var n = {}.toString.call(t).slice(8, -1);
|
|
322
|
+
return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ke(t, e) : void 0;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
var q = {
|
|
326
|
+
// Returns the trap from the top of the stack.
|
|
327
|
+
getActiveTrap: function(e) {
|
|
328
|
+
return e?.length > 0 ? e[e.length - 1] : null;
|
|
329
|
+
},
|
|
330
|
+
// Pauses the currently active trap, then adds a new trap to the stack.
|
|
331
|
+
activateTrap: function(e, n) {
|
|
332
|
+
var r = q.getActiveTrap(e);
|
|
333
|
+
n !== r && q.pauseTrap(e);
|
|
334
|
+
var a = e.indexOf(n);
|
|
335
|
+
a === -1 || e.splice(a, 1), e.push(n);
|
|
336
|
+
},
|
|
337
|
+
// Removes the trap from the top of the stack, then unpauses the next trap down.
|
|
338
|
+
deactivateTrap: function(e, n) {
|
|
339
|
+
var r = e.indexOf(n);
|
|
340
|
+
r !== -1 && e.splice(r, 1), q.unpauseTrap(e);
|
|
341
|
+
},
|
|
342
|
+
// Pauses the trap at the top of the stack.
|
|
343
|
+
pauseTrap: function(e) {
|
|
344
|
+
var n = q.getActiveTrap(e);
|
|
345
|
+
n?._setPausedState(!0);
|
|
346
|
+
},
|
|
347
|
+
// Unpauses the trap at the top of the stack.
|
|
348
|
+
unpauseTrap: function(e) {
|
|
349
|
+
var n = q.getActiveTrap(e);
|
|
350
|
+
n && !n._isManuallyPaused() && n._setPausedState(!1);
|
|
351
|
+
}
|
|
352
|
+
}, cn = function(e) {
|
|
353
|
+
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
354
|
+
}, ln = function(e) {
|
|
355
|
+
return e?.key === "Escape" || e?.key === "Esc" || e?.keyCode === 27;
|
|
356
|
+
}, be = function(e) {
|
|
357
|
+
return e?.key === "Tab" || e?.keyCode === 9;
|
|
358
|
+
}, un = function(e) {
|
|
359
|
+
return be(e) && !e.shiftKey;
|
|
360
|
+
}, fn = function(e) {
|
|
361
|
+
return be(e) && e.shiftKey;
|
|
362
|
+
}, Qe = function(e) {
|
|
363
|
+
return setTimeout(e, 0);
|
|
364
|
+
}, de = function(e) {
|
|
365
|
+
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), a = 1; a < n; a++)
|
|
366
|
+
r[a - 1] = arguments[a];
|
|
367
|
+
return typeof e == "function" ? e.apply(void 0, r) : e;
|
|
368
|
+
}, me = function(e) {
|
|
369
|
+
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
370
|
+
}, dn = [], vn = function(e, n) {
|
|
371
|
+
var r = n?.document || document, a = n?.trapStack || dn, o = Je({
|
|
372
|
+
returnFocusOnDeactivate: !0,
|
|
373
|
+
escapeDeactivates: !0,
|
|
374
|
+
delayInitialFocus: !0,
|
|
375
|
+
isolateSubtrees: !1,
|
|
376
|
+
isKeyForward: un,
|
|
377
|
+
isKeyBackward: fn
|
|
378
|
+
}, n), i = {
|
|
379
|
+
// containers given to createFocusTrap()
|
|
380
|
+
/** @type {Array<HTMLElement>} */
|
|
381
|
+
containers: [],
|
|
382
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
383
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
384
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
385
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
386
|
+
// result in an error being thrown)
|
|
387
|
+
/** @type {Array<{
|
|
388
|
+
* container: HTMLElement,
|
|
389
|
+
* tabbableNodes: Array<HTMLElement>, // empty if none
|
|
390
|
+
* focusableNodes: Array<HTMLElement>, // empty if none
|
|
391
|
+
* posTabIndexesFound: boolean,
|
|
392
|
+
* firstTabbableNode: HTMLElement|undefined,
|
|
393
|
+
* lastTabbableNode: HTMLElement|undefined,
|
|
394
|
+
* firstDomTabbableNode: HTMLElement|undefined,
|
|
395
|
+
* lastDomTabbableNode: HTMLElement|undefined,
|
|
396
|
+
* nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
397
|
+
* }>}
|
|
398
|
+
*/
|
|
399
|
+
containerGroups: [],
|
|
400
|
+
// same order/length as `containers` list
|
|
401
|
+
// references to objects in `containerGroups`, but only those that actually have
|
|
402
|
+
// tabbable nodes in them
|
|
403
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
404
|
+
// the same length
|
|
405
|
+
tabbableGroups: [],
|
|
406
|
+
// references to nodes that are siblings to the ancestors of this trap's containers.
|
|
407
|
+
/** @type {Set<HTMLElement>} */
|
|
408
|
+
adjacentElements: /* @__PURE__ */ new Set(),
|
|
409
|
+
// references to nodes that were inert or aria-hidden before the trap was activated.
|
|
410
|
+
/** @type {Set<HTMLElement>} */
|
|
411
|
+
alreadySilent: /* @__PURE__ */ new Set(),
|
|
412
|
+
nodeFocusedBeforeActivation: null,
|
|
413
|
+
mostRecentlyFocusedNode: null,
|
|
414
|
+
active: !1,
|
|
415
|
+
paused: !1,
|
|
416
|
+
manuallyPaused: !1,
|
|
417
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
418
|
+
// has been delayed during activation
|
|
419
|
+
delayInitialFocusTimer: void 0,
|
|
420
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
421
|
+
recentNavEvent: void 0
|
|
422
|
+
}, s, u = function(c, l, h) {
|
|
423
|
+
return c && c[l] !== void 0 ? c[l] : o[h || l];
|
|
424
|
+
}, f = function(c, l) {
|
|
425
|
+
var h = typeof l?.composedPath == "function" ? l.composedPath() : void 0;
|
|
426
|
+
return i.containerGroups.findIndex(function(y) {
|
|
427
|
+
var g = y.container, S = y.tabbableNodes;
|
|
428
|
+
return g.contains(c) || h?.includes(g) || S.find(function(w) {
|
|
429
|
+
return w === c;
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
}, d = function(c) {
|
|
433
|
+
var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = l.hasFallback, y = h === void 0 ? !1 : h, g = l.params, S = g === void 0 ? [] : g, w = o[c];
|
|
434
|
+
if (typeof w == "function" && (w = w.apply(void 0, an(S))), w === !0 && (w = void 0), !w) {
|
|
435
|
+
if (w === void 0 || w === !1)
|
|
436
|
+
return w;
|
|
437
|
+
throw new Error("`".concat(c, "` was specified but was not a node, or did not return a node"));
|
|
438
|
+
}
|
|
439
|
+
var F = w;
|
|
440
|
+
if (typeof w == "string") {
|
|
441
|
+
try {
|
|
442
|
+
F = r.querySelector(w);
|
|
443
|
+
} catch (N) {
|
|
444
|
+
throw new Error("`".concat(c, '` appears to be an invalid selector; error="').concat(N.message, '"'));
|
|
445
|
+
}
|
|
446
|
+
if (!F && !y)
|
|
447
|
+
throw new Error("`".concat(c, "` as selector refers to no known node"));
|
|
448
|
+
}
|
|
449
|
+
return F;
|
|
450
|
+
}, v = function() {
|
|
451
|
+
var c = d("initialFocus", {
|
|
452
|
+
hasFallback: !0
|
|
453
|
+
});
|
|
454
|
+
if (c === !1)
|
|
455
|
+
return !1;
|
|
456
|
+
if (c === void 0 || c && !je(c, o.tabbableOptions))
|
|
457
|
+
if (f(r.activeElement) >= 0)
|
|
458
|
+
c = r.activeElement;
|
|
459
|
+
else {
|
|
460
|
+
var l = i.tabbableGroups[0], h = l && l.firstTabbableNode;
|
|
461
|
+
c = h || d("fallbackFocus");
|
|
462
|
+
}
|
|
463
|
+
else c === null && (c = d("fallbackFocus"));
|
|
464
|
+
if (!c)
|
|
465
|
+
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
466
|
+
return c;
|
|
467
|
+
}, m = function() {
|
|
468
|
+
if (i.containerGroups = i.containers.map(function(c) {
|
|
469
|
+
var l = Zt(c, o.tabbableOptions), h = Jt(c, o.tabbableOptions), y = l.length > 0 ? l[0] : void 0, g = l.length > 0 ? l[l.length - 1] : void 0, S = h.find(function(N) {
|
|
470
|
+
return le(N);
|
|
471
|
+
}), w = h.slice().reverse().find(function(N) {
|
|
472
|
+
return le(N);
|
|
473
|
+
}), F = !!l.find(function(N) {
|
|
474
|
+
return te(N) > 0;
|
|
475
|
+
});
|
|
476
|
+
return {
|
|
477
|
+
container: c,
|
|
478
|
+
tabbableNodes: l,
|
|
479
|
+
focusableNodes: h,
|
|
480
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
481
|
+
posTabIndexesFound: F,
|
|
482
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
483
|
+
firstTabbableNode: y,
|
|
484
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
485
|
+
lastTabbableNode: g,
|
|
486
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
487
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
488
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
489
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
490
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
491
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
492
|
+
// be avoided anyway...
|
|
493
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
494
|
+
firstDomTabbableNode: S,
|
|
495
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
496
|
+
lastDomTabbableNode: w,
|
|
497
|
+
/**
|
|
498
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
499
|
+
* in this container, if any.
|
|
500
|
+
* @param {HTMLElement} node
|
|
501
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
502
|
+
* in reverse.
|
|
503
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
504
|
+
*/
|
|
505
|
+
nextTabbableNode: function(L) {
|
|
506
|
+
var W = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, M = l.indexOf(L);
|
|
507
|
+
return M < 0 ? W ? h.slice(h.indexOf(L) + 1).find(function(J) {
|
|
508
|
+
return le(J);
|
|
509
|
+
}) : h.slice(0, h.indexOf(L)).reverse().find(function(J) {
|
|
510
|
+
return le(J);
|
|
511
|
+
}) : l[M + (W ? 1 : -1)];
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
}), i.tabbableGroups = i.containerGroups.filter(function(c) {
|
|
515
|
+
return c.tabbableNodes.length > 0;
|
|
516
|
+
}), i.tabbableGroups.length <= 0 && !d("fallbackFocus"))
|
|
517
|
+
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
518
|
+
if (i.containerGroups.find(function(c) {
|
|
519
|
+
return c.posTabIndexesFound;
|
|
520
|
+
}) && i.containerGroups.length > 1)
|
|
521
|
+
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
522
|
+
}, b = function(c) {
|
|
523
|
+
var l = c.activeElement;
|
|
524
|
+
if (l)
|
|
525
|
+
return l.shadowRoot && l.shadowRoot.activeElement !== null ? b(l.shadowRoot) : l;
|
|
526
|
+
}, p = function(c) {
|
|
527
|
+
if (c !== !1 && c !== b(document)) {
|
|
528
|
+
if (!c || !c.focus) {
|
|
529
|
+
p(v());
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
c.focus({
|
|
533
|
+
preventScroll: !!o.preventScroll
|
|
534
|
+
}), i.mostRecentlyFocusedNode = c, cn(c) && c.select();
|
|
535
|
+
}
|
|
536
|
+
}, T = function(c) {
|
|
537
|
+
var l = d("setReturnFocus", {
|
|
538
|
+
params: [c]
|
|
539
|
+
});
|
|
540
|
+
return l || (l === !1 ? !1 : c);
|
|
541
|
+
}, E = function(c) {
|
|
542
|
+
var l = c.target, h = c.event, y = c.isBackward, g = y === void 0 ? !1 : y;
|
|
543
|
+
l = l || me(h), m();
|
|
544
|
+
var S = null;
|
|
545
|
+
if (i.tabbableGroups.length > 0) {
|
|
546
|
+
var w = f(l, h), F = w >= 0 ? i.containerGroups[w] : void 0;
|
|
547
|
+
if (w < 0)
|
|
548
|
+
g ? S = i.tabbableGroups[i.tabbableGroups.length - 1].lastTabbableNode : S = i.tabbableGroups[0].firstTabbableNode;
|
|
549
|
+
else if (g) {
|
|
550
|
+
var N = i.tabbableGroups.findIndex(function(Be) {
|
|
551
|
+
var Me = Be.firstTabbableNode;
|
|
552
|
+
return l === Me;
|
|
553
|
+
});
|
|
554
|
+
if (N < 0 && (F.container === l || je(l, o.tabbableOptions) && !le(l, o.tabbableOptions) && !F.nextTabbableNode(l, !1)) && (N = w), N >= 0) {
|
|
555
|
+
var L = N === 0 ? i.tabbableGroups.length - 1 : N - 1, W = i.tabbableGroups[L];
|
|
556
|
+
S = te(l) >= 0 ? W.lastTabbableNode : W.lastDomTabbableNode;
|
|
557
|
+
} else be(h) || (S = F.nextTabbableNode(l, !1));
|
|
558
|
+
} else {
|
|
559
|
+
var M = i.tabbableGroups.findIndex(function(Be) {
|
|
560
|
+
var Me = Be.lastTabbableNode;
|
|
561
|
+
return l === Me;
|
|
562
|
+
});
|
|
563
|
+
if (M < 0 && (F.container === l || je(l, o.tabbableOptions) && !le(l, o.tabbableOptions) && !F.nextTabbableNode(l)) && (M = w), M >= 0) {
|
|
564
|
+
var J = M === i.tabbableGroups.length - 1 ? 0 : M + 1, U = i.tabbableGroups[J];
|
|
565
|
+
S = te(l) >= 0 ? U.firstTabbableNode : U.firstDomTabbableNode;
|
|
566
|
+
} else be(h) || (S = F.nextTabbableNode(l));
|
|
567
|
+
}
|
|
568
|
+
} else
|
|
569
|
+
S = d("fallbackFocus");
|
|
570
|
+
return S;
|
|
571
|
+
}, x = function(c) {
|
|
572
|
+
var l = me(c);
|
|
573
|
+
if (!(f(l, c) >= 0)) {
|
|
574
|
+
if (de(o.clickOutsideDeactivates, c)) {
|
|
575
|
+
s.deactivate({
|
|
576
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
577
|
+
// which will result in the outside click setting focus to the node
|
|
578
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
579
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
580
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
|
581
|
+
// outside click was on a focusable node or not
|
|
582
|
+
returnFocus: o.returnFocusOnDeactivate
|
|
583
|
+
});
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
de(o.allowOutsideClick, c) || c.preventDefault();
|
|
587
|
+
}
|
|
588
|
+
}, R = function(c) {
|
|
589
|
+
var l = me(c), h = f(l, c) >= 0;
|
|
590
|
+
if (h || l instanceof Document)
|
|
591
|
+
h && (i.mostRecentlyFocusedNode = l);
|
|
592
|
+
else {
|
|
593
|
+
c.stopImmediatePropagation();
|
|
594
|
+
var y, g = !0;
|
|
595
|
+
if (i.mostRecentlyFocusedNode)
|
|
596
|
+
if (te(i.mostRecentlyFocusedNode) > 0) {
|
|
597
|
+
var S = f(i.mostRecentlyFocusedNode), w = i.containerGroups[S].tabbableNodes;
|
|
598
|
+
if (w.length > 0) {
|
|
599
|
+
var F = w.findIndex(function(N) {
|
|
600
|
+
return N === i.mostRecentlyFocusedNode;
|
|
601
|
+
});
|
|
602
|
+
F >= 0 && (o.isKeyForward(i.recentNavEvent) ? F + 1 < w.length && (y = w[F + 1], g = !1) : F - 1 >= 0 && (y = w[F - 1], g = !1));
|
|
603
|
+
}
|
|
604
|
+
} else
|
|
605
|
+
i.containerGroups.some(function(N) {
|
|
606
|
+
return N.tabbableNodes.some(function(L) {
|
|
607
|
+
return te(L) > 0;
|
|
608
|
+
});
|
|
609
|
+
}) || (g = !1);
|
|
610
|
+
else
|
|
611
|
+
g = !1;
|
|
612
|
+
g && (y = E({
|
|
613
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
614
|
+
// outside the trap causing the focus escape we're trying to fix)
|
|
615
|
+
target: i.mostRecentlyFocusedNode,
|
|
616
|
+
isBackward: o.isKeyBackward(i.recentNavEvent)
|
|
617
|
+
})), p(y || i.mostRecentlyFocusedNode || v());
|
|
618
|
+
}
|
|
619
|
+
i.recentNavEvent = void 0;
|
|
620
|
+
}, O = function(c) {
|
|
621
|
+
var l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
622
|
+
i.recentNavEvent = c;
|
|
623
|
+
var h = E({
|
|
624
|
+
event: c,
|
|
625
|
+
isBackward: l
|
|
626
|
+
});
|
|
627
|
+
h && (be(c) && c.preventDefault(), p(h));
|
|
628
|
+
}, k = function(c) {
|
|
629
|
+
(o.isKeyForward(c) || o.isKeyBackward(c)) && O(c, o.isKeyBackward(c));
|
|
630
|
+
}, P = function(c) {
|
|
631
|
+
ln(c) && de(o.escapeDeactivates, c) !== !1 && (c.preventDefault(), s.deactivate());
|
|
632
|
+
}, D = function(c) {
|
|
633
|
+
var l = me(c);
|
|
634
|
+
f(l, c) >= 0 || de(o.clickOutsideDeactivates, c) || de(o.allowOutsideClick, c) || (c.preventDefault(), c.stopImmediatePropagation());
|
|
635
|
+
}, C = function() {
|
|
636
|
+
if (i.active)
|
|
637
|
+
return q.activateTrap(a, s), i.delayInitialFocusTimer = o.delayInitialFocus ? Qe(function() {
|
|
638
|
+
p(v());
|
|
639
|
+
}) : p(v()), r.addEventListener("focusin", R, !0), r.addEventListener("mousedown", x, {
|
|
640
|
+
capture: !0,
|
|
641
|
+
passive: !1
|
|
642
|
+
}), r.addEventListener("touchstart", x, {
|
|
643
|
+
capture: !0,
|
|
644
|
+
passive: !1
|
|
645
|
+
}), r.addEventListener("click", D, {
|
|
646
|
+
capture: !0,
|
|
647
|
+
passive: !1
|
|
648
|
+
}), r.addEventListener("keydown", k, {
|
|
649
|
+
capture: !0,
|
|
650
|
+
passive: !1
|
|
651
|
+
}), r.addEventListener("keydown", P), s;
|
|
652
|
+
}, I = function(c) {
|
|
653
|
+
i.active && !i.paused && s._setSubtreeIsolation(!1), i.adjacentElements.clear(), i.alreadySilent.clear();
|
|
654
|
+
var l = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), y = Ye(c), g;
|
|
655
|
+
try {
|
|
656
|
+
for (y.s(); !(g = y.n()).done; ) {
|
|
657
|
+
var S = g.value;
|
|
658
|
+
l.add(S);
|
|
659
|
+
for (var w = typeof ShadowRoot < "u" && S.getRootNode() instanceof ShadowRoot, F = S; F; ) {
|
|
660
|
+
l.add(F);
|
|
661
|
+
var N = F.parentElement, L = [];
|
|
662
|
+
N ? L = N.children : !N && w && (L = F.getRootNode().children, N = F.getRootNode().host, w = typeof ShadowRoot < "u" && N.getRootNode() instanceof ShadowRoot);
|
|
663
|
+
var W = Ye(L), M;
|
|
664
|
+
try {
|
|
665
|
+
for (W.s(); !(M = W.n()).done; ) {
|
|
666
|
+
var J = M.value;
|
|
667
|
+
h.add(J);
|
|
668
|
+
}
|
|
669
|
+
} catch (U) {
|
|
670
|
+
W.e(U);
|
|
671
|
+
} finally {
|
|
672
|
+
W.f();
|
|
673
|
+
}
|
|
674
|
+
F = N;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
} catch (U) {
|
|
678
|
+
y.e(U);
|
|
679
|
+
} finally {
|
|
680
|
+
y.f();
|
|
681
|
+
}
|
|
682
|
+
l.forEach(function(U) {
|
|
683
|
+
h.delete(U);
|
|
684
|
+
}), i.adjacentElements = h;
|
|
685
|
+
}, _ = function() {
|
|
686
|
+
if (i.active)
|
|
687
|
+
return r.removeEventListener("focusin", R, !0), r.removeEventListener("mousedown", x, !0), r.removeEventListener("touchstart", x, !0), r.removeEventListener("click", D, !0), r.removeEventListener("keydown", k, !0), r.removeEventListener("keydown", P), s;
|
|
688
|
+
}, X = function(c) {
|
|
689
|
+
var l = c.some(function(h) {
|
|
690
|
+
var y = Array.from(h.removedNodes);
|
|
691
|
+
return y.some(function(g) {
|
|
692
|
+
return g === i.mostRecentlyFocusedNode;
|
|
693
|
+
});
|
|
694
|
+
});
|
|
695
|
+
l && p(v());
|
|
696
|
+
}, se = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(X) : void 0, G = function() {
|
|
697
|
+
se && (se.disconnect(), i.active && !i.paused && i.containers.map(function(c) {
|
|
698
|
+
se.observe(c, {
|
|
699
|
+
subtree: !0,
|
|
700
|
+
childList: !0
|
|
701
|
+
});
|
|
702
|
+
}));
|
|
703
|
+
};
|
|
704
|
+
return s = {
|
|
705
|
+
get active() {
|
|
706
|
+
return i.active;
|
|
707
|
+
},
|
|
708
|
+
get paused() {
|
|
709
|
+
return i.paused;
|
|
710
|
+
},
|
|
711
|
+
activate: function(c) {
|
|
712
|
+
if (i.active)
|
|
713
|
+
return this;
|
|
714
|
+
var l = u(c, "onActivate"), h = u(c, "onPostActivate"), y = u(c, "checkCanFocusTrap"), g = q.getActiveTrap(a), S = !1;
|
|
715
|
+
if (g && !g.paused) {
|
|
716
|
+
var w;
|
|
717
|
+
(w = g._setSubtreeIsolation) === null || w === void 0 || w.call(g, !1), S = !0;
|
|
718
|
+
}
|
|
719
|
+
try {
|
|
720
|
+
y || m(), i.active = !0, i.paused = !1, i.nodeFocusedBeforeActivation = b(r), l?.();
|
|
721
|
+
var F = function() {
|
|
722
|
+
y && m(), C(), G(), o.isolateSubtrees && s._setSubtreeIsolation(!0), h?.();
|
|
723
|
+
};
|
|
724
|
+
if (y)
|
|
725
|
+
return y(i.containers.concat()).then(F, F), this;
|
|
726
|
+
F();
|
|
727
|
+
} catch (L) {
|
|
728
|
+
if (g === q.getActiveTrap(a) && S) {
|
|
729
|
+
var N;
|
|
730
|
+
(N = g._setSubtreeIsolation) === null || N === void 0 || N.call(g, !0);
|
|
731
|
+
}
|
|
732
|
+
throw L;
|
|
733
|
+
}
|
|
734
|
+
return this;
|
|
735
|
+
},
|
|
736
|
+
deactivate: function(c) {
|
|
737
|
+
if (!i.active)
|
|
738
|
+
return this;
|
|
739
|
+
var l = Je({
|
|
740
|
+
onDeactivate: o.onDeactivate,
|
|
741
|
+
onPostDeactivate: o.onPostDeactivate,
|
|
742
|
+
checkCanReturnFocus: o.checkCanReturnFocus
|
|
743
|
+
}, c);
|
|
744
|
+
clearTimeout(i.delayInitialFocusTimer), i.delayInitialFocusTimer = void 0, i.paused || s._setSubtreeIsolation(!1), i.alreadySilent.clear(), _(), i.active = !1, i.paused = !1, G(), q.deactivateTrap(a, s);
|
|
745
|
+
var h = u(l, "onDeactivate"), y = u(l, "onPostDeactivate"), g = u(l, "checkCanReturnFocus"), S = u(l, "returnFocus", "returnFocusOnDeactivate");
|
|
746
|
+
h?.();
|
|
747
|
+
var w = function() {
|
|
748
|
+
Qe(function() {
|
|
749
|
+
S && p(T(i.nodeFocusedBeforeActivation)), y?.();
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
return S && g ? (g(T(i.nodeFocusedBeforeActivation)).then(w, w), this) : (w(), this);
|
|
753
|
+
},
|
|
754
|
+
pause: function(c) {
|
|
755
|
+
return i.active ? (i.manuallyPaused = !0, this._setPausedState(!0, c)) : this;
|
|
756
|
+
},
|
|
757
|
+
unpause: function(c) {
|
|
758
|
+
return i.active ? (i.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1, c)) : this;
|
|
759
|
+
},
|
|
760
|
+
updateContainerElements: function(c) {
|
|
761
|
+
var l = [].concat(c).filter(Boolean);
|
|
762
|
+
return i.containers = l.map(function(h) {
|
|
763
|
+
return typeof h == "string" ? r.querySelector(h) : h;
|
|
764
|
+
}), o.isolateSubtrees && I(i.containers), i.active && (m(), o.isolateSubtrees && !i.paused && s._setSubtreeIsolation(!0)), G(), this;
|
|
765
|
+
}
|
|
766
|
+
}, Object.defineProperties(s, {
|
|
767
|
+
_isManuallyPaused: {
|
|
768
|
+
value: function() {
|
|
769
|
+
return i.manuallyPaused;
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
_setPausedState: {
|
|
773
|
+
value: function(c, l) {
|
|
774
|
+
if (i.paused === c)
|
|
775
|
+
return this;
|
|
776
|
+
if (i.paused = c, c) {
|
|
777
|
+
var h = u(l, "onPause"), y = u(l, "onPostPause");
|
|
778
|
+
h?.(), _(), G(), s._setSubtreeIsolation(!1), y?.();
|
|
779
|
+
} else {
|
|
780
|
+
var g = u(l, "onUnpause"), S = u(l, "onPostUnpause");
|
|
781
|
+
g?.(), s._setSubtreeIsolation(!0), m(), C(), G(), S?.();
|
|
782
|
+
}
|
|
783
|
+
return this;
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
_setSubtreeIsolation: {
|
|
787
|
+
value: function(c) {
|
|
788
|
+
o.isolateSubtrees && i.adjacentElements.forEach(function(l) {
|
|
789
|
+
var h;
|
|
790
|
+
c ? o.isolateSubtrees === "aria-hidden" ? ((l.ariaHidden === "true" || ((h = l.getAttribute("aria-hidden")) === null || h === void 0 ? void 0 : h.toLowerCase()) === "true") && i.alreadySilent.add(l), l.setAttribute("aria-hidden", "true")) : ((l.inert || l.hasAttribute("inert")) && i.alreadySilent.add(l), l.setAttribute("inert", !0)) : i.alreadySilent.has(l) || (o.isolateSubtrees === "aria-hidden" ? l.removeAttribute("aria-hidden") : l.removeAttribute("inert"));
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}), s.updateContainerElements(e), s;
|
|
795
|
+
};
|
|
796
|
+
const bn = {
|
|
797
|
+
escapeDeactivates: {
|
|
798
|
+
type: Boolean,
|
|
799
|
+
default: !0
|
|
800
|
+
},
|
|
801
|
+
returnFocusOnDeactivate: {
|
|
802
|
+
type: Boolean,
|
|
803
|
+
default: !0
|
|
804
|
+
},
|
|
805
|
+
allowOutsideClick: {
|
|
806
|
+
type: [Boolean, Function],
|
|
807
|
+
default: !0
|
|
808
|
+
},
|
|
809
|
+
clickOutsideDeactivates: [Boolean, Function],
|
|
810
|
+
initialFocus: [String, Function, Boolean],
|
|
811
|
+
fallbackFocus: [String, Function],
|
|
812
|
+
checkCanFocusTrap: Function,
|
|
813
|
+
checkCanReturnFocus: Function,
|
|
814
|
+
delayInitialFocus: {
|
|
815
|
+
type: Boolean,
|
|
816
|
+
default: !0
|
|
817
|
+
},
|
|
818
|
+
document: Object,
|
|
819
|
+
preventScroll: Boolean,
|
|
820
|
+
setReturnFocus: [Object, String, Boolean, Function],
|
|
821
|
+
tabbableOptions: Object
|
|
822
|
+
}, er = Ot({
|
|
823
|
+
props: Object.assign({
|
|
824
|
+
active: {
|
|
825
|
+
// TODO: could be options for activate but what about the options for deactivating?
|
|
826
|
+
type: Boolean,
|
|
827
|
+
default: !0
|
|
828
|
+
}
|
|
829
|
+
}, bn),
|
|
830
|
+
emits: [
|
|
831
|
+
"update:active",
|
|
832
|
+
"activate",
|
|
833
|
+
"postActivate",
|
|
834
|
+
"deactivate",
|
|
835
|
+
"postDeactivate"
|
|
836
|
+
],
|
|
837
|
+
render() {
|
|
838
|
+
return this.renderImpl();
|
|
839
|
+
},
|
|
840
|
+
setup(t, { slots: e, emit: n }) {
|
|
841
|
+
let r;
|
|
842
|
+
const a = ee(null), o = H(() => {
|
|
843
|
+
const s = a.value;
|
|
844
|
+
return s && (s instanceof HTMLElement ? s : s.$el);
|
|
845
|
+
});
|
|
846
|
+
function i() {
|
|
847
|
+
return r || (r = vn(o.value, {
|
|
848
|
+
escapeDeactivates: t.escapeDeactivates,
|
|
849
|
+
allowOutsideClick: t.allowOutsideClick,
|
|
850
|
+
returnFocusOnDeactivate: t.returnFocusOnDeactivate,
|
|
851
|
+
clickOutsideDeactivates: t.clickOutsideDeactivates,
|
|
852
|
+
onActivate: () => {
|
|
853
|
+
n("update:active", !0), n("activate");
|
|
854
|
+
},
|
|
855
|
+
onDeactivate: () => {
|
|
856
|
+
n("update:active", !1), n("deactivate");
|
|
857
|
+
},
|
|
858
|
+
onPostActivate: () => n("postActivate"),
|
|
859
|
+
onPostDeactivate: () => n("postDeactivate"),
|
|
860
|
+
initialFocus: t.initialFocus,
|
|
861
|
+
fallbackFocus: t.fallbackFocus,
|
|
862
|
+
tabbableOptions: t.tabbableOptions,
|
|
863
|
+
delayInitialFocus: t.delayInitialFocus
|
|
864
|
+
}));
|
|
865
|
+
}
|
|
866
|
+
return Nt(() => {
|
|
867
|
+
we(() => t.active, (s) => {
|
|
868
|
+
s && o.value ? i().activate() : r && (r.deactivate(), (!o.value || o.value.nodeType === Node.COMMENT_NODE) && (r = null));
|
|
869
|
+
}, { immediate: !0, flush: "post" });
|
|
870
|
+
}), Ct(() => {
|
|
871
|
+
r && r.deactivate(), r = null;
|
|
872
|
+
}), {
|
|
873
|
+
activate() {
|
|
874
|
+
i().activate();
|
|
875
|
+
},
|
|
876
|
+
deactivate() {
|
|
877
|
+
r && r.deactivate();
|
|
878
|
+
},
|
|
879
|
+
renderImpl() {
|
|
880
|
+
if (!e.default)
|
|
881
|
+
return null;
|
|
882
|
+
const s = e.default().filter((f) => f.type !== kt);
|
|
883
|
+
return !s || !s.length || s.length > 1 ? (console.error("[focus-trap-vue]: FocusTrap requires exactly one child."), s) : Dt(s[0], { ref: a });
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
}), Ae = Math.min, ne = Math.max, Fe = Math.round, ge = Math.floor, K = (t) => ({
|
|
888
|
+
x: t,
|
|
889
|
+
y: t
|
|
890
|
+
}), hn = {
|
|
891
|
+
left: "right",
|
|
892
|
+
right: "left",
|
|
893
|
+
bottom: "top",
|
|
894
|
+
top: "bottom"
|
|
895
|
+
};
|
|
896
|
+
function et(t, e, n) {
|
|
897
|
+
return ne(t, Ae(e, n));
|
|
898
|
+
}
|
|
899
|
+
function Ce(t, e) {
|
|
900
|
+
return typeof t == "function" ? t(e) : t;
|
|
901
|
+
}
|
|
902
|
+
function ie(t) {
|
|
903
|
+
return t.split("-")[0];
|
|
904
|
+
}
|
|
905
|
+
function ke(t) {
|
|
906
|
+
return t.split("-")[1];
|
|
907
|
+
}
|
|
908
|
+
function mt(t) {
|
|
909
|
+
return t === "x" ? "y" : "x";
|
|
910
|
+
}
|
|
911
|
+
function gt(t) {
|
|
912
|
+
return t === "y" ? "height" : "width";
|
|
913
|
+
}
|
|
914
|
+
function Y(t) {
|
|
915
|
+
const e = t[0];
|
|
916
|
+
return e === "t" || e === "b" ? "y" : "x";
|
|
917
|
+
}
|
|
918
|
+
function yt(t) {
|
|
919
|
+
return mt(Y(t));
|
|
920
|
+
}
|
|
921
|
+
function pn(t, e, n) {
|
|
922
|
+
n === void 0 && (n = !1);
|
|
923
|
+
const r = ke(t), a = yt(t), o = gt(a);
|
|
924
|
+
let i = a === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
925
|
+
return e.reference[o] > e.floating[o] && (i = Oe(i)), [i, Oe(i)];
|
|
926
|
+
}
|
|
927
|
+
function mn(t) {
|
|
928
|
+
const e = Oe(t);
|
|
929
|
+
return [$e(t), e, $e(e)];
|
|
930
|
+
}
|
|
931
|
+
function $e(t) {
|
|
932
|
+
return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
|
|
933
|
+
}
|
|
934
|
+
const tt = ["left", "right"], nt = ["right", "left"], gn = ["top", "bottom"], yn = ["bottom", "top"];
|
|
935
|
+
function wn(t, e, n) {
|
|
936
|
+
switch (t) {
|
|
937
|
+
case "top":
|
|
938
|
+
case "bottom":
|
|
939
|
+
return n ? e ? nt : tt : e ? tt : nt;
|
|
940
|
+
case "left":
|
|
941
|
+
case "right":
|
|
942
|
+
return e ? gn : yn;
|
|
943
|
+
default:
|
|
944
|
+
return [];
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
function xn(t, e, n, r) {
|
|
948
|
+
const a = ke(t);
|
|
949
|
+
let o = wn(ie(t), n === "start", r);
|
|
950
|
+
return a && (o = o.map((i) => i + "-" + a), e && (o = o.concat(o.map($e)))), o;
|
|
951
|
+
}
|
|
952
|
+
function Oe(t) {
|
|
953
|
+
const e = ie(t);
|
|
954
|
+
return hn[e] + t.slice(e.length);
|
|
955
|
+
}
|
|
956
|
+
function Sn(t) {
|
|
957
|
+
return {
|
|
958
|
+
top: 0,
|
|
959
|
+
right: 0,
|
|
960
|
+
bottom: 0,
|
|
961
|
+
left: 0,
|
|
962
|
+
...t
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
function Tn(t) {
|
|
966
|
+
return typeof t != "number" ? Sn(t) : {
|
|
967
|
+
top: t,
|
|
968
|
+
right: t,
|
|
969
|
+
bottom: t,
|
|
970
|
+
left: t
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
function Ne(t) {
|
|
974
|
+
const {
|
|
975
|
+
x: e,
|
|
976
|
+
y: n,
|
|
977
|
+
width: r,
|
|
978
|
+
height: a
|
|
979
|
+
} = t;
|
|
980
|
+
return {
|
|
981
|
+
width: r,
|
|
982
|
+
height: a,
|
|
983
|
+
top: n,
|
|
984
|
+
left: e,
|
|
985
|
+
right: e + r,
|
|
986
|
+
bottom: n + a,
|
|
987
|
+
x: e,
|
|
988
|
+
y: n
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
function rt(t, e, n) {
|
|
992
|
+
let {
|
|
993
|
+
reference: r,
|
|
994
|
+
floating: a
|
|
995
|
+
} = t;
|
|
996
|
+
const o = Y(e), i = yt(e), s = gt(i), u = ie(e), f = o === "y", d = r.x + r.width / 2 - a.width / 2, v = r.y + r.height / 2 - a.height / 2, m = r[s] / 2 - a[s] / 2;
|
|
997
|
+
let b;
|
|
998
|
+
switch (u) {
|
|
999
|
+
case "top":
|
|
1000
|
+
b = {
|
|
1001
|
+
x: d,
|
|
1002
|
+
y: r.y - a.height
|
|
1003
|
+
};
|
|
1004
|
+
break;
|
|
1005
|
+
case "bottom":
|
|
1006
|
+
b = {
|
|
1007
|
+
x: d,
|
|
1008
|
+
y: r.y + r.height
|
|
1009
|
+
};
|
|
1010
|
+
break;
|
|
1011
|
+
case "right":
|
|
1012
|
+
b = {
|
|
1013
|
+
x: r.x + r.width,
|
|
1014
|
+
y: v
|
|
1015
|
+
};
|
|
1016
|
+
break;
|
|
1017
|
+
case "left":
|
|
1018
|
+
b = {
|
|
1019
|
+
x: r.x - a.width,
|
|
1020
|
+
y: v
|
|
1021
|
+
};
|
|
1022
|
+
break;
|
|
1023
|
+
default:
|
|
1024
|
+
b = {
|
|
1025
|
+
x: r.x,
|
|
1026
|
+
y: r.y
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
switch (ke(e)) {
|
|
1030
|
+
case "start":
|
|
1031
|
+
b[i] -= m * (n && f ? -1 : 1);
|
|
1032
|
+
break;
|
|
1033
|
+
case "end":
|
|
1034
|
+
b[i] += m * (n && f ? -1 : 1);
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
return b;
|
|
1038
|
+
}
|
|
1039
|
+
async function En(t, e) {
|
|
1040
|
+
var n;
|
|
1041
|
+
e === void 0 && (e = {});
|
|
1042
|
+
const {
|
|
1043
|
+
x: r,
|
|
1044
|
+
y: a,
|
|
1045
|
+
platform: o,
|
|
1046
|
+
rects: i,
|
|
1047
|
+
elements: s,
|
|
1048
|
+
strategy: u
|
|
1049
|
+
} = t, {
|
|
1050
|
+
boundary: f = "clippingAncestors",
|
|
1051
|
+
rootBoundary: d = "viewport",
|
|
1052
|
+
elementContext: v = "floating",
|
|
1053
|
+
altBoundary: m = !1,
|
|
1054
|
+
padding: b = 0
|
|
1055
|
+
} = Ce(e, t), p = Tn(b), E = s[m ? v === "floating" ? "reference" : "floating" : v], x = Ne(await o.getClippingRect({
|
|
1056
|
+
element: (n = await (o.isElement == null ? void 0 : o.isElement(E))) == null || n ? E : E.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)),
|
|
1057
|
+
boundary: f,
|
|
1058
|
+
rootBoundary: d,
|
|
1059
|
+
strategy: u
|
|
1060
|
+
})), R = v === "floating" ? {
|
|
1061
|
+
x: r,
|
|
1062
|
+
y: a,
|
|
1063
|
+
width: i.floating.width,
|
|
1064
|
+
height: i.floating.height
|
|
1065
|
+
} : i.reference, O = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(s.floating)), k = await (o.isElement == null ? void 0 : o.isElement(O)) ? await (o.getScale == null ? void 0 : o.getScale(O)) || {
|
|
1066
|
+
x: 1,
|
|
1067
|
+
y: 1
|
|
1068
|
+
} : {
|
|
1069
|
+
x: 1,
|
|
1070
|
+
y: 1
|
|
1071
|
+
}, P = Ne(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1072
|
+
elements: s,
|
|
1073
|
+
rect: R,
|
|
1074
|
+
offsetParent: O,
|
|
1075
|
+
strategy: u
|
|
1076
|
+
}) : R);
|
|
1077
|
+
return {
|
|
1078
|
+
top: (x.top - P.top + p.top) / k.y,
|
|
1079
|
+
bottom: (P.bottom - x.bottom + p.bottom) / k.y,
|
|
1080
|
+
left: (x.left - P.left + p.left) / k.x,
|
|
1081
|
+
right: (P.right - x.right + p.right) / k.x
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
const Rn = 50, An = async (t, e, n) => {
|
|
1085
|
+
const {
|
|
1086
|
+
placement: r = "bottom",
|
|
1087
|
+
strategy: a = "absolute",
|
|
1088
|
+
middleware: o = [],
|
|
1089
|
+
platform: i
|
|
1090
|
+
} = n, s = i.detectOverflow ? i : {
|
|
1091
|
+
...i,
|
|
1092
|
+
detectOverflow: En
|
|
1093
|
+
}, u = await (i.isRTL == null ? void 0 : i.isRTL(e));
|
|
1094
|
+
let f = await i.getElementRects({
|
|
1095
|
+
reference: t,
|
|
1096
|
+
floating: e,
|
|
1097
|
+
strategy: a
|
|
1098
|
+
}), {
|
|
1099
|
+
x: d,
|
|
1100
|
+
y: v
|
|
1101
|
+
} = rt(f, r, u), m = r, b = 0;
|
|
1102
|
+
const p = {};
|
|
1103
|
+
for (let T = 0; T < o.length; T++) {
|
|
1104
|
+
const E = o[T];
|
|
1105
|
+
if (!E)
|
|
1106
|
+
continue;
|
|
1107
|
+
const {
|
|
1108
|
+
name: x,
|
|
1109
|
+
fn: R
|
|
1110
|
+
} = E, {
|
|
1111
|
+
x: O,
|
|
1112
|
+
y: k,
|
|
1113
|
+
data: P,
|
|
1114
|
+
reset: D
|
|
1115
|
+
} = await R({
|
|
1116
|
+
x: d,
|
|
1117
|
+
y: v,
|
|
1118
|
+
initialPlacement: r,
|
|
1119
|
+
placement: m,
|
|
1120
|
+
strategy: a,
|
|
1121
|
+
middlewareData: p,
|
|
1122
|
+
rects: f,
|
|
1123
|
+
platform: s,
|
|
1124
|
+
elements: {
|
|
1125
|
+
reference: t,
|
|
1126
|
+
floating: e
|
|
1127
|
+
}
|
|
1128
|
+
});
|
|
1129
|
+
d = O ?? d, v = k ?? v, p[x] = {
|
|
1130
|
+
...p[x],
|
|
1131
|
+
...P
|
|
1132
|
+
}, D && b < Rn && (b++, typeof D == "object" && (D.placement && (m = D.placement), D.rects && (f = D.rects === !0 ? await i.getElementRects({
|
|
1133
|
+
reference: t,
|
|
1134
|
+
floating: e,
|
|
1135
|
+
strategy: a
|
|
1136
|
+
}) : D.rects), {
|
|
1137
|
+
x: d,
|
|
1138
|
+
y: v
|
|
1139
|
+
} = rt(f, m, u)), T = -1);
|
|
1140
|
+
}
|
|
1141
|
+
return {
|
|
1142
|
+
x: d,
|
|
1143
|
+
y: v,
|
|
1144
|
+
placement: m,
|
|
1145
|
+
strategy: a,
|
|
1146
|
+
middlewareData: p
|
|
1147
|
+
};
|
|
1148
|
+
}, Fn = function(t) {
|
|
1149
|
+
return t === void 0 && (t = {}), {
|
|
1150
|
+
name: "flip",
|
|
1151
|
+
options: t,
|
|
1152
|
+
async fn(e) {
|
|
1153
|
+
var n, r;
|
|
1154
|
+
const {
|
|
1155
|
+
placement: a,
|
|
1156
|
+
middlewareData: o,
|
|
1157
|
+
rects: i,
|
|
1158
|
+
initialPlacement: s,
|
|
1159
|
+
platform: u,
|
|
1160
|
+
elements: f
|
|
1161
|
+
} = e, {
|
|
1162
|
+
mainAxis: d = !0,
|
|
1163
|
+
crossAxis: v = !0,
|
|
1164
|
+
fallbackPlacements: m,
|
|
1165
|
+
fallbackStrategy: b = "bestFit",
|
|
1166
|
+
fallbackAxisSideDirection: p = "none",
|
|
1167
|
+
flipAlignment: T = !0,
|
|
1168
|
+
...E
|
|
1169
|
+
} = Ce(t, e);
|
|
1170
|
+
if ((n = o.arrow) != null && n.alignmentOffset)
|
|
1171
|
+
return {};
|
|
1172
|
+
const x = ie(a), R = Y(s), O = ie(s) === s, k = await (u.isRTL == null ? void 0 : u.isRTL(f.floating)), P = m || (O || !T ? [Oe(s)] : mn(s)), D = p !== "none";
|
|
1173
|
+
!m && D && P.push(...xn(s, T, p, k));
|
|
1174
|
+
const C = [s, ...P], I = await u.detectOverflow(e, E), _ = [];
|
|
1175
|
+
let X = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
1176
|
+
if (d && _.push(I[x]), v) {
|
|
1177
|
+
const c = pn(a, i, k);
|
|
1178
|
+
_.push(I[c[0]], I[c[1]]);
|
|
1179
|
+
}
|
|
1180
|
+
if (X = [...X, {
|
|
1181
|
+
placement: a,
|
|
1182
|
+
overflows: _
|
|
1183
|
+
}], !_.every((c) => c <= 0)) {
|
|
1184
|
+
var se, G;
|
|
1185
|
+
const c = (((se = o.flip) == null ? void 0 : se.index) || 0) + 1, l = C[c];
|
|
1186
|
+
if (l && (!(v === "alignment" ? R !== Y(l) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1187
|
+
// overflows the main axis.
|
|
1188
|
+
X.every((g) => Y(g.placement) === R ? g.overflows[0] > 0 : !0)))
|
|
1189
|
+
return {
|
|
1190
|
+
data: {
|
|
1191
|
+
index: c,
|
|
1192
|
+
overflows: X
|
|
1193
|
+
},
|
|
1194
|
+
reset: {
|
|
1195
|
+
placement: l
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
let h = (G = X.filter((y) => y.overflows[0] <= 0).sort((y, g) => y.overflows[1] - g.overflows[1])[0]) == null ? void 0 : G.placement;
|
|
1199
|
+
if (!h)
|
|
1200
|
+
switch (b) {
|
|
1201
|
+
case "bestFit": {
|
|
1202
|
+
var A;
|
|
1203
|
+
const y = (A = X.filter((g) => {
|
|
1204
|
+
if (D) {
|
|
1205
|
+
const S = Y(g.placement);
|
|
1206
|
+
return S === R || // Create a bias to the `y` side axis due to horizontal
|
|
1207
|
+
// reading directions favoring greater width.
|
|
1208
|
+
S === "y";
|
|
1209
|
+
}
|
|
1210
|
+
return !0;
|
|
1211
|
+
}).map((g) => [g.placement, g.overflows.filter((S) => S > 0).reduce((S, w) => S + w, 0)]).sort((g, S) => g[1] - S[1])[0]) == null ? void 0 : A[0];
|
|
1212
|
+
y && (h = y);
|
|
1213
|
+
break;
|
|
1214
|
+
}
|
|
1215
|
+
case "initialPlacement":
|
|
1216
|
+
h = s;
|
|
1217
|
+
break;
|
|
1218
|
+
}
|
|
1219
|
+
if (a !== h)
|
|
1220
|
+
return {
|
|
1221
|
+
reset: {
|
|
1222
|
+
placement: h
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
return {};
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
}, On = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1230
|
+
async function Nn(t, e) {
|
|
1231
|
+
const {
|
|
1232
|
+
placement: n,
|
|
1233
|
+
platform: r,
|
|
1234
|
+
elements: a
|
|
1235
|
+
} = t, o = await (r.isRTL == null ? void 0 : r.isRTL(a.floating)), i = ie(n), s = ke(n), u = Y(n) === "y", f = On.has(i) ? -1 : 1, d = o && u ? -1 : 1, v = Ce(e, t);
|
|
1236
|
+
let {
|
|
1237
|
+
mainAxis: m,
|
|
1238
|
+
crossAxis: b,
|
|
1239
|
+
alignmentAxis: p
|
|
1240
|
+
} = typeof v == "number" ? {
|
|
1241
|
+
mainAxis: v,
|
|
1242
|
+
crossAxis: 0,
|
|
1243
|
+
alignmentAxis: null
|
|
1244
|
+
} : {
|
|
1245
|
+
mainAxis: v.mainAxis || 0,
|
|
1246
|
+
crossAxis: v.crossAxis || 0,
|
|
1247
|
+
alignmentAxis: v.alignmentAxis
|
|
1248
|
+
};
|
|
1249
|
+
return s && typeof p == "number" && (b = s === "end" ? p * -1 : p), u ? {
|
|
1250
|
+
x: b * d,
|
|
1251
|
+
y: m * f
|
|
1252
|
+
} : {
|
|
1253
|
+
x: m * f,
|
|
1254
|
+
y: b * d
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
const Cn = function(t) {
|
|
1258
|
+
return t === void 0 && (t = 0), {
|
|
1259
|
+
name: "offset",
|
|
1260
|
+
options: t,
|
|
1261
|
+
async fn(e) {
|
|
1262
|
+
var n, r;
|
|
1263
|
+
const {
|
|
1264
|
+
x: a,
|
|
1265
|
+
y: o,
|
|
1266
|
+
placement: i,
|
|
1267
|
+
middlewareData: s
|
|
1268
|
+
} = e, u = await Nn(e, t);
|
|
1269
|
+
return i === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
|
|
1270
|
+
x: a + u.x,
|
|
1271
|
+
y: o + u.y,
|
|
1272
|
+
data: {
|
|
1273
|
+
...u,
|
|
1274
|
+
placement: i
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
}, kn = function(t) {
|
|
1280
|
+
return t === void 0 && (t = {}), {
|
|
1281
|
+
name: "shift",
|
|
1282
|
+
options: t,
|
|
1283
|
+
async fn(e) {
|
|
1284
|
+
const {
|
|
1285
|
+
x: n,
|
|
1286
|
+
y: r,
|
|
1287
|
+
placement: a,
|
|
1288
|
+
platform: o
|
|
1289
|
+
} = e, {
|
|
1290
|
+
mainAxis: i = !0,
|
|
1291
|
+
crossAxis: s = !1,
|
|
1292
|
+
limiter: u = {
|
|
1293
|
+
fn: (x) => {
|
|
1294
|
+
let {
|
|
1295
|
+
x: R,
|
|
1296
|
+
y: O
|
|
1297
|
+
} = x;
|
|
1298
|
+
return {
|
|
1299
|
+
x: R,
|
|
1300
|
+
y: O
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
...f
|
|
1305
|
+
} = Ce(t, e), d = {
|
|
1306
|
+
x: n,
|
|
1307
|
+
y: r
|
|
1308
|
+
}, v = await o.detectOverflow(e, f), m = Y(ie(a)), b = mt(m);
|
|
1309
|
+
let p = d[b], T = d[m];
|
|
1310
|
+
if (i) {
|
|
1311
|
+
const x = b === "y" ? "top" : "left", R = b === "y" ? "bottom" : "right", O = p + v[x], k = p - v[R];
|
|
1312
|
+
p = et(O, p, k);
|
|
1313
|
+
}
|
|
1314
|
+
if (s) {
|
|
1315
|
+
const x = m === "y" ? "top" : "left", R = m === "y" ? "bottom" : "right", O = T + v[x], k = T - v[R];
|
|
1316
|
+
T = et(O, T, k);
|
|
1317
|
+
}
|
|
1318
|
+
const E = u.fn({
|
|
1319
|
+
...e,
|
|
1320
|
+
[b]: p,
|
|
1321
|
+
[m]: T
|
|
1322
|
+
});
|
|
1323
|
+
return {
|
|
1324
|
+
...E,
|
|
1325
|
+
data: {
|
|
1326
|
+
x: E.x - n,
|
|
1327
|
+
y: E.y - r,
|
|
1328
|
+
enabled: {
|
|
1329
|
+
[b]: i,
|
|
1330
|
+
[m]: s
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
function De() {
|
|
1338
|
+
return typeof window < "u";
|
|
1339
|
+
}
|
|
1340
|
+
function oe(t) {
|
|
1341
|
+
return qe(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1342
|
+
}
|
|
1343
|
+
function B(t) {
|
|
1344
|
+
var e;
|
|
1345
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1346
|
+
}
|
|
1347
|
+
function $(t) {
|
|
1348
|
+
var e;
|
|
1349
|
+
return (e = (qe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1350
|
+
}
|
|
1351
|
+
function qe(t) {
|
|
1352
|
+
return De() ? t instanceof Node || t instanceof B(t).Node : !1;
|
|
1353
|
+
}
|
|
1354
|
+
function j(t) {
|
|
1355
|
+
return De() ? t instanceof Element || t instanceof B(t).Element : !1;
|
|
1356
|
+
}
|
|
1357
|
+
function z(t) {
|
|
1358
|
+
return De() ? t instanceof HTMLElement || t instanceof B(t).HTMLElement : !1;
|
|
1359
|
+
}
|
|
1360
|
+
function it(t) {
|
|
1361
|
+
return !De() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof B(t).ShadowRoot;
|
|
1362
|
+
}
|
|
1363
|
+
function pe(t) {
|
|
1364
|
+
const {
|
|
1365
|
+
overflow: e,
|
|
1366
|
+
overflowX: n,
|
|
1367
|
+
overflowY: r,
|
|
1368
|
+
display: a
|
|
1369
|
+
} = V(t);
|
|
1370
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && a !== "inline" && a !== "contents";
|
|
1371
|
+
}
|
|
1372
|
+
function Dn(t) {
|
|
1373
|
+
return /^(table|td|th)$/.test(oe(t));
|
|
1374
|
+
}
|
|
1375
|
+
function Pe(t) {
|
|
1376
|
+
try {
|
|
1377
|
+
if (t.matches(":popover-open"))
|
|
1378
|
+
return !0;
|
|
1379
|
+
} catch {
|
|
1380
|
+
}
|
|
1381
|
+
try {
|
|
1382
|
+
return t.matches(":modal");
|
|
1383
|
+
} catch {
|
|
1384
|
+
return !1;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
const Pn = /transform|translate|scale|rotate|perspective|filter/, In = /paint|layout|strict|content/, Q = (t) => !!t && t !== "none";
|
|
1388
|
+
let Ve;
|
|
1389
|
+
function ze(t) {
|
|
1390
|
+
const e = j(t) ? V(t) : t;
|
|
1391
|
+
return Q(e.transform) || Q(e.translate) || Q(e.scale) || Q(e.rotate) || Q(e.perspective) || !Xe() && (Q(e.backdropFilter) || Q(e.filter)) || Pn.test(e.willChange || "") || In.test(e.contain || "");
|
|
1392
|
+
}
|
|
1393
|
+
function Ln(t) {
|
|
1394
|
+
let e = Z(t);
|
|
1395
|
+
for (; z(e) && !fe(e); ) {
|
|
1396
|
+
if (ze(e))
|
|
1397
|
+
return e;
|
|
1398
|
+
if (Pe(e))
|
|
1399
|
+
return null;
|
|
1400
|
+
e = Z(e);
|
|
1401
|
+
}
|
|
1402
|
+
return null;
|
|
1403
|
+
}
|
|
1404
|
+
function Xe() {
|
|
1405
|
+
return Ve == null && (Ve = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ve;
|
|
1406
|
+
}
|
|
1407
|
+
function fe(t) {
|
|
1408
|
+
return /^(html|body|#document)$/.test(oe(t));
|
|
1409
|
+
}
|
|
1410
|
+
function V(t) {
|
|
1411
|
+
return B(t).getComputedStyle(t);
|
|
1412
|
+
}
|
|
1413
|
+
function Ie(t) {
|
|
1414
|
+
return j(t) ? {
|
|
1415
|
+
scrollLeft: t.scrollLeft,
|
|
1416
|
+
scrollTop: t.scrollTop
|
|
1417
|
+
} : {
|
|
1418
|
+
scrollLeft: t.scrollX,
|
|
1419
|
+
scrollTop: t.scrollY
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
function Z(t) {
|
|
1423
|
+
if (oe(t) === "html")
|
|
1424
|
+
return t;
|
|
1425
|
+
const e = (
|
|
1426
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1427
|
+
t.assignedSlot || // DOM Element detected.
|
|
1428
|
+
t.parentNode || // ShadowRoot detected.
|
|
1429
|
+
it(t) && t.host || // Fallback.
|
|
1430
|
+
$(t)
|
|
1431
|
+
);
|
|
1432
|
+
return it(e) ? e.host : e;
|
|
1433
|
+
}
|
|
1434
|
+
function wt(t) {
|
|
1435
|
+
const e = Z(t);
|
|
1436
|
+
return fe(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : z(e) && pe(e) ? e : wt(e);
|
|
1437
|
+
}
|
|
1438
|
+
function he(t, e, n) {
|
|
1439
|
+
var r;
|
|
1440
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1441
|
+
const a = wt(t), o = a === ((r = t.ownerDocument) == null ? void 0 : r.body), i = B(a);
|
|
1442
|
+
if (o) {
|
|
1443
|
+
const s = He(i);
|
|
1444
|
+
return e.concat(i, i.visualViewport || [], pe(a) ? a : [], s && n ? he(s) : []);
|
|
1445
|
+
} else
|
|
1446
|
+
return e.concat(a, he(a, [], n));
|
|
1447
|
+
}
|
|
1448
|
+
function He(t) {
|
|
1449
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1450
|
+
}
|
|
1451
|
+
function xt(t) {
|
|
1452
|
+
const e = V(t);
|
|
1453
|
+
let n = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
|
|
1454
|
+
const a = z(t), o = a ? t.offsetWidth : n, i = a ? t.offsetHeight : r, s = Fe(n) !== o || Fe(r) !== i;
|
|
1455
|
+
return s && (n = o, r = i), {
|
|
1456
|
+
width: n,
|
|
1457
|
+
height: r,
|
|
1458
|
+
$: s
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
function Ge(t) {
|
|
1462
|
+
return j(t) ? t : t.contextElement;
|
|
1463
|
+
}
|
|
1464
|
+
function ue(t) {
|
|
1465
|
+
const e = Ge(t);
|
|
1466
|
+
if (!z(e))
|
|
1467
|
+
return K(1);
|
|
1468
|
+
const n = e.getBoundingClientRect(), {
|
|
1469
|
+
width: r,
|
|
1470
|
+
height: a,
|
|
1471
|
+
$: o
|
|
1472
|
+
} = xt(e);
|
|
1473
|
+
let i = (o ? Fe(n.width) : n.width) / r, s = (o ? Fe(n.height) : n.height) / a;
|
|
1474
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1475
|
+
x: i,
|
|
1476
|
+
y: s
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
const Bn = /* @__PURE__ */ K(0);
|
|
1480
|
+
function St(t) {
|
|
1481
|
+
const e = B(t);
|
|
1482
|
+
return !Xe() || !e.visualViewport ? Bn : {
|
|
1483
|
+
x: e.visualViewport.offsetLeft,
|
|
1484
|
+
y: e.visualViewport.offsetTop
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
function Mn(t, e, n) {
|
|
1488
|
+
return e === void 0 && (e = !1), !n || e && n !== B(t) ? !1 : e;
|
|
1489
|
+
}
|
|
1490
|
+
function ae(t, e, n, r) {
|
|
1491
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1492
|
+
const a = t.getBoundingClientRect(), o = Ge(t);
|
|
1493
|
+
let i = K(1);
|
|
1494
|
+
e && (r ? j(r) && (i = ue(r)) : i = ue(t));
|
|
1495
|
+
const s = Mn(o, n, r) ? St(o) : K(0);
|
|
1496
|
+
let u = (a.left + s.x) / i.x, f = (a.top + s.y) / i.y, d = a.width / i.x, v = a.height / i.y;
|
|
1497
|
+
if (o) {
|
|
1498
|
+
const m = B(o), b = r && j(r) ? B(r) : r;
|
|
1499
|
+
let p = m, T = He(p);
|
|
1500
|
+
for (; T && r && b !== p; ) {
|
|
1501
|
+
const E = ue(T), x = T.getBoundingClientRect(), R = V(T), O = x.left + (T.clientLeft + parseFloat(R.paddingLeft)) * E.x, k = x.top + (T.clientTop + parseFloat(R.paddingTop)) * E.y;
|
|
1502
|
+
u *= E.x, f *= E.y, d *= E.x, v *= E.y, u += O, f += k, p = B(T), T = He(p);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
return Ne({
|
|
1506
|
+
width: d,
|
|
1507
|
+
height: v,
|
|
1508
|
+
x: u,
|
|
1509
|
+
y: f
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
function Le(t, e) {
|
|
1513
|
+
const n = Ie(t).scrollLeft;
|
|
1514
|
+
return e ? e.left + n : ae($(t)).left + n;
|
|
1515
|
+
}
|
|
1516
|
+
function Tt(t, e) {
|
|
1517
|
+
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Le(t, n), a = n.top + e.scrollTop;
|
|
1518
|
+
return {
|
|
1519
|
+
x: r,
|
|
1520
|
+
y: a
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
function jn(t) {
|
|
1524
|
+
let {
|
|
1525
|
+
elements: e,
|
|
1526
|
+
rect: n,
|
|
1527
|
+
offsetParent: r,
|
|
1528
|
+
strategy: a
|
|
1529
|
+
} = t;
|
|
1530
|
+
const o = a === "fixed", i = $(r), s = e ? Pe(e.floating) : !1;
|
|
1531
|
+
if (r === i || s && o)
|
|
1532
|
+
return n;
|
|
1533
|
+
let u = {
|
|
1534
|
+
scrollLeft: 0,
|
|
1535
|
+
scrollTop: 0
|
|
1536
|
+
}, f = K(1);
|
|
1537
|
+
const d = K(0), v = z(r);
|
|
1538
|
+
if ((v || !v && !o) && ((oe(r) !== "body" || pe(i)) && (u = Ie(r)), v)) {
|
|
1539
|
+
const b = ae(r);
|
|
1540
|
+
f = ue(r), d.x = b.x + r.clientLeft, d.y = b.y + r.clientTop;
|
|
1541
|
+
}
|
|
1542
|
+
const m = i && !v && !o ? Tt(i, u) : K(0);
|
|
1543
|
+
return {
|
|
1544
|
+
width: n.width * f.x,
|
|
1545
|
+
height: n.height * f.y,
|
|
1546
|
+
x: n.x * f.x - u.scrollLeft * f.x + d.x + m.x,
|
|
1547
|
+
y: n.y * f.y - u.scrollTop * f.y + d.y + m.y
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
function Vn(t) {
|
|
1551
|
+
return Array.from(t.getClientRects());
|
|
1552
|
+
}
|
|
1553
|
+
function _n(t) {
|
|
1554
|
+
const e = $(t), n = Ie(t), r = t.ownerDocument.body, a = ne(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), o = ne(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1555
|
+
let i = -n.scrollLeft + Le(t);
|
|
1556
|
+
const s = -n.scrollTop;
|
|
1557
|
+
return V(r).direction === "rtl" && (i += ne(e.clientWidth, r.clientWidth) - a), {
|
|
1558
|
+
width: a,
|
|
1559
|
+
height: o,
|
|
1560
|
+
x: i,
|
|
1561
|
+
y: s
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
const at = 25;
|
|
1565
|
+
function Wn(t, e) {
|
|
1566
|
+
const n = B(t), r = $(t), a = n.visualViewport;
|
|
1567
|
+
let o = r.clientWidth, i = r.clientHeight, s = 0, u = 0;
|
|
1568
|
+
if (a) {
|
|
1569
|
+
o = a.width, i = a.height;
|
|
1570
|
+
const d = Xe();
|
|
1571
|
+
(!d || d && e === "fixed") && (s = a.offsetLeft, u = a.offsetTop);
|
|
1572
|
+
}
|
|
1573
|
+
const f = Le(r);
|
|
1574
|
+
if (f <= 0) {
|
|
1575
|
+
const d = r.ownerDocument, v = d.body, m = getComputedStyle(v), b = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(r.clientWidth - v.clientWidth - b);
|
|
1576
|
+
p <= at && (o -= p);
|
|
1577
|
+
} else f <= at && (o += f);
|
|
1578
|
+
return {
|
|
1579
|
+
width: o,
|
|
1580
|
+
height: i,
|
|
1581
|
+
x: s,
|
|
1582
|
+
y: u
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
function Kn(t, e) {
|
|
1586
|
+
const n = ae(t, !0, e === "fixed"), r = n.top + t.clientTop, a = n.left + t.clientLeft, o = z(t) ? ue(t) : K(1), i = t.clientWidth * o.x, s = t.clientHeight * o.y, u = a * o.x, f = r * o.y;
|
|
1587
|
+
return {
|
|
1588
|
+
width: i,
|
|
1589
|
+
height: s,
|
|
1590
|
+
x: u,
|
|
1591
|
+
y: f
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
function ot(t, e, n) {
|
|
1595
|
+
let r;
|
|
1596
|
+
if (e === "viewport")
|
|
1597
|
+
r = Wn(t, n);
|
|
1598
|
+
else if (e === "document")
|
|
1599
|
+
r = _n($(t));
|
|
1600
|
+
else if (j(e))
|
|
1601
|
+
r = Kn(e, n);
|
|
1602
|
+
else {
|
|
1603
|
+
const a = St(t);
|
|
1604
|
+
r = {
|
|
1605
|
+
x: e.x - a.x,
|
|
1606
|
+
y: e.y - a.y,
|
|
1607
|
+
width: e.width,
|
|
1608
|
+
height: e.height
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
return Ne(r);
|
|
1612
|
+
}
|
|
1613
|
+
function Et(t, e) {
|
|
1614
|
+
const n = Z(t);
|
|
1615
|
+
return n === e || !j(n) || fe(n) ? !1 : V(n).position === "fixed" || Et(n, e);
|
|
1616
|
+
}
|
|
1617
|
+
function $n(t, e) {
|
|
1618
|
+
const n = e.get(t);
|
|
1619
|
+
if (n)
|
|
1620
|
+
return n;
|
|
1621
|
+
let r = he(t, [], !1).filter((s) => j(s) && oe(s) !== "body"), a = null;
|
|
1622
|
+
const o = V(t).position === "fixed";
|
|
1623
|
+
let i = o ? Z(t) : t;
|
|
1624
|
+
for (; j(i) && !fe(i); ) {
|
|
1625
|
+
const s = V(i), u = ze(i);
|
|
1626
|
+
!u && s.position === "fixed" && (a = null), (o ? !u && !a : !u && s.position === "static" && !!a && (a.position === "absolute" || a.position === "fixed") || pe(i) && !u && Et(t, i)) ? r = r.filter((d) => d !== i) : a = s, i = Z(i);
|
|
1627
|
+
}
|
|
1628
|
+
return e.set(t, r), r;
|
|
1629
|
+
}
|
|
1630
|
+
function Hn(t) {
|
|
1631
|
+
let {
|
|
1632
|
+
element: e,
|
|
1633
|
+
boundary: n,
|
|
1634
|
+
rootBoundary: r,
|
|
1635
|
+
strategy: a
|
|
1636
|
+
} = t;
|
|
1637
|
+
const i = [...n === "clippingAncestors" ? Pe(e) ? [] : $n(e, this._c) : [].concat(n), r], s = ot(e, i[0], a);
|
|
1638
|
+
let u = s.top, f = s.right, d = s.bottom, v = s.left;
|
|
1639
|
+
for (let m = 1; m < i.length; m++) {
|
|
1640
|
+
const b = ot(e, i[m], a);
|
|
1641
|
+
u = ne(b.top, u), f = Ae(b.right, f), d = Ae(b.bottom, d), v = ne(b.left, v);
|
|
1642
|
+
}
|
|
1643
|
+
return {
|
|
1644
|
+
width: f - v,
|
|
1645
|
+
height: d - u,
|
|
1646
|
+
x: v,
|
|
1647
|
+
y: u
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
function qn(t) {
|
|
1651
|
+
const {
|
|
1652
|
+
width: e,
|
|
1653
|
+
height: n
|
|
1654
|
+
} = xt(t);
|
|
1655
|
+
return {
|
|
1656
|
+
width: e,
|
|
1657
|
+
height: n
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
function zn(t, e, n) {
|
|
1661
|
+
const r = z(e), a = $(e), o = n === "fixed", i = ae(t, !0, o, e);
|
|
1662
|
+
let s = {
|
|
1663
|
+
scrollLeft: 0,
|
|
1664
|
+
scrollTop: 0
|
|
1665
|
+
};
|
|
1666
|
+
const u = K(0);
|
|
1667
|
+
function f() {
|
|
1668
|
+
u.x = Le(a);
|
|
1669
|
+
}
|
|
1670
|
+
if (r || !r && !o)
|
|
1671
|
+
if ((oe(e) !== "body" || pe(a)) && (s = Ie(e)), r) {
|
|
1672
|
+
const b = ae(e, !0, o, e);
|
|
1673
|
+
u.x = b.x + e.clientLeft, u.y = b.y + e.clientTop;
|
|
1674
|
+
} else a && f();
|
|
1675
|
+
o && !r && a && f();
|
|
1676
|
+
const d = a && !r && !o ? Tt(a, s) : K(0), v = i.left + s.scrollLeft - u.x - d.x, m = i.top + s.scrollTop - u.y - d.y;
|
|
1677
|
+
return {
|
|
1678
|
+
x: v,
|
|
1679
|
+
y: m,
|
|
1680
|
+
width: i.width,
|
|
1681
|
+
height: i.height
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
function _e(t) {
|
|
1685
|
+
return V(t).position === "static";
|
|
1686
|
+
}
|
|
1687
|
+
function st(t, e) {
|
|
1688
|
+
if (!z(t) || V(t).position === "fixed")
|
|
1689
|
+
return null;
|
|
1690
|
+
if (e)
|
|
1691
|
+
return e(t);
|
|
1692
|
+
let n = t.offsetParent;
|
|
1693
|
+
return $(t) === n && (n = n.ownerDocument.body), n;
|
|
1694
|
+
}
|
|
1695
|
+
function Rt(t, e) {
|
|
1696
|
+
const n = B(t);
|
|
1697
|
+
if (Pe(t))
|
|
1698
|
+
return n;
|
|
1699
|
+
if (!z(t)) {
|
|
1700
|
+
let a = Z(t);
|
|
1701
|
+
for (; a && !fe(a); ) {
|
|
1702
|
+
if (j(a) && !_e(a))
|
|
1703
|
+
return a;
|
|
1704
|
+
a = Z(a);
|
|
1705
|
+
}
|
|
1706
|
+
return n;
|
|
1707
|
+
}
|
|
1708
|
+
let r = st(t, e);
|
|
1709
|
+
for (; r && Dn(r) && _e(r); )
|
|
1710
|
+
r = st(r, e);
|
|
1711
|
+
return r && fe(r) && _e(r) && !ze(r) ? n : r || Ln(t) || n;
|
|
1712
|
+
}
|
|
1713
|
+
const Xn = async function(t) {
|
|
1714
|
+
const e = this.getOffsetParent || Rt, n = this.getDimensions, r = await n(t.floating);
|
|
1715
|
+
return {
|
|
1716
|
+
reference: zn(t.reference, await e(t.floating), t.strategy),
|
|
1717
|
+
floating: {
|
|
1718
|
+
x: 0,
|
|
1719
|
+
y: 0,
|
|
1720
|
+
width: r.width,
|
|
1721
|
+
height: r.height
|
|
1722
|
+
}
|
|
1723
|
+
};
|
|
1724
|
+
};
|
|
1725
|
+
function Gn(t) {
|
|
1726
|
+
return V(t).direction === "rtl";
|
|
1727
|
+
}
|
|
1728
|
+
const Un = {
|
|
1729
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: jn,
|
|
1730
|
+
getDocumentElement: $,
|
|
1731
|
+
getClippingRect: Hn,
|
|
1732
|
+
getOffsetParent: Rt,
|
|
1733
|
+
getElementRects: Xn,
|
|
1734
|
+
getClientRects: Vn,
|
|
1735
|
+
getDimensions: qn,
|
|
1736
|
+
getScale: ue,
|
|
1737
|
+
isElement: j,
|
|
1738
|
+
isRTL: Gn
|
|
1739
|
+
};
|
|
1740
|
+
function At(t, e) {
|
|
1741
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1742
|
+
}
|
|
1743
|
+
function Yn(t, e) {
|
|
1744
|
+
let n = null, r;
|
|
1745
|
+
const a = $(t);
|
|
1746
|
+
function o() {
|
|
1747
|
+
var s;
|
|
1748
|
+
clearTimeout(r), (s = n) == null || s.disconnect(), n = null;
|
|
1749
|
+
}
|
|
1750
|
+
function i(s, u) {
|
|
1751
|
+
s === void 0 && (s = !1), u === void 0 && (u = 1), o();
|
|
1752
|
+
const f = t.getBoundingClientRect(), {
|
|
1753
|
+
left: d,
|
|
1754
|
+
top: v,
|
|
1755
|
+
width: m,
|
|
1756
|
+
height: b
|
|
1757
|
+
} = f;
|
|
1758
|
+
if (s || e(), !m || !b)
|
|
1759
|
+
return;
|
|
1760
|
+
const p = ge(v), T = ge(a.clientWidth - (d + m)), E = ge(a.clientHeight - (v + b)), x = ge(d), O = {
|
|
1761
|
+
rootMargin: -p + "px " + -T + "px " + -E + "px " + -x + "px",
|
|
1762
|
+
threshold: ne(0, Ae(1, u)) || 1
|
|
1763
|
+
};
|
|
1764
|
+
let k = !0;
|
|
1765
|
+
function P(D) {
|
|
1766
|
+
const C = D[0].intersectionRatio;
|
|
1767
|
+
if (C !== u) {
|
|
1768
|
+
if (!k)
|
|
1769
|
+
return i();
|
|
1770
|
+
C ? i(!1, C) : r = setTimeout(() => {
|
|
1771
|
+
i(!1, 1e-7);
|
|
1772
|
+
}, 1e3);
|
|
1773
|
+
}
|
|
1774
|
+
C === 1 && !At(f, t.getBoundingClientRect()) && i(), k = !1;
|
|
1775
|
+
}
|
|
1776
|
+
try {
|
|
1777
|
+
n = new IntersectionObserver(P, {
|
|
1778
|
+
...O,
|
|
1779
|
+
// Handle <iframe>s
|
|
1780
|
+
root: a.ownerDocument
|
|
1781
|
+
});
|
|
1782
|
+
} catch {
|
|
1783
|
+
n = new IntersectionObserver(P, O);
|
|
1784
|
+
}
|
|
1785
|
+
n.observe(t);
|
|
1786
|
+
}
|
|
1787
|
+
return i(!0), o;
|
|
1788
|
+
}
|
|
1789
|
+
function tr(t, e, n, r) {
|
|
1790
|
+
r === void 0 && (r = {});
|
|
1791
|
+
const {
|
|
1792
|
+
ancestorScroll: a = !0,
|
|
1793
|
+
ancestorResize: o = !0,
|
|
1794
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
1795
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1796
|
+
animationFrame: u = !1
|
|
1797
|
+
} = r, f = Ge(t), d = a || o ? [...f ? he(f) : [], ...e ? he(e) : []] : [];
|
|
1798
|
+
d.forEach((x) => {
|
|
1799
|
+
a && x.addEventListener("scroll", n, {
|
|
1800
|
+
passive: !0
|
|
1801
|
+
}), o && x.addEventListener("resize", n);
|
|
1802
|
+
});
|
|
1803
|
+
const v = f && s ? Yn(f, n) : null;
|
|
1804
|
+
let m = -1, b = null;
|
|
1805
|
+
i && (b = new ResizeObserver((x) => {
|
|
1806
|
+
let [R] = x;
|
|
1807
|
+
R && R.target === f && b && e && (b.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1808
|
+
var O;
|
|
1809
|
+
(O = b) == null || O.observe(e);
|
|
1810
|
+
})), n();
|
|
1811
|
+
}), f && !u && b.observe(f), e && b.observe(e));
|
|
1812
|
+
let p, T = u ? ae(t) : null;
|
|
1813
|
+
u && E();
|
|
1814
|
+
function E() {
|
|
1815
|
+
const x = ae(t);
|
|
1816
|
+
T && !At(T, x) && n(), T = x, p = requestAnimationFrame(E);
|
|
1817
|
+
}
|
|
1818
|
+
return n(), () => {
|
|
1819
|
+
var x;
|
|
1820
|
+
d.forEach((R) => {
|
|
1821
|
+
a && R.removeEventListener("scroll", n), o && R.removeEventListener("resize", n);
|
|
1822
|
+
}), v?.(), (x = b) == null || x.disconnect(), b = null, u && cancelAnimationFrame(p);
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
const nr = Cn, rr = kn, ir = Fn, Zn = (t, e, n) => {
|
|
1826
|
+
const r = /* @__PURE__ */ new Map(), a = {
|
|
1827
|
+
platform: Un,
|
|
1828
|
+
...n
|
|
1829
|
+
}, o = {
|
|
1830
|
+
...a.platform,
|
|
1831
|
+
_c: r
|
|
1832
|
+
};
|
|
1833
|
+
return An(t, e, {
|
|
1834
|
+
...a,
|
|
1835
|
+
platform: o
|
|
1836
|
+
});
|
|
1837
|
+
};
|
|
1838
|
+
function Jn(t) {
|
|
1839
|
+
return t != null && typeof t == "object" && "$el" in t;
|
|
1840
|
+
}
|
|
1841
|
+
function ct(t) {
|
|
1842
|
+
if (Jn(t)) {
|
|
1843
|
+
const e = t.$el;
|
|
1844
|
+
return qe(e) && oe(e) === "#comment" ? null : e;
|
|
1845
|
+
}
|
|
1846
|
+
return t;
|
|
1847
|
+
}
|
|
1848
|
+
function ve(t) {
|
|
1849
|
+
return typeof t == "function" ? t() : Bt(t);
|
|
1850
|
+
}
|
|
1851
|
+
function Ft(t) {
|
|
1852
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1853
|
+
}
|
|
1854
|
+
function lt(t, e) {
|
|
1855
|
+
const n = Ft(t);
|
|
1856
|
+
return Math.round(e * n) / n;
|
|
1857
|
+
}
|
|
1858
|
+
function ar(t, e, n) {
|
|
1859
|
+
n === void 0 && (n = {});
|
|
1860
|
+
const r = n.whileElementsMounted, a = H(() => {
|
|
1861
|
+
var C;
|
|
1862
|
+
return (C = ve(n.open)) != null ? C : !0;
|
|
1863
|
+
}), o = H(() => ve(n.middleware)), i = H(() => {
|
|
1864
|
+
var C;
|
|
1865
|
+
return (C = ve(n.placement)) != null ? C : "bottom";
|
|
1866
|
+
}), s = H(() => {
|
|
1867
|
+
var C;
|
|
1868
|
+
return (C = ve(n.strategy)) != null ? C : "absolute";
|
|
1869
|
+
}), u = H(() => {
|
|
1870
|
+
var C;
|
|
1871
|
+
return (C = ve(n.transform)) != null ? C : !0;
|
|
1872
|
+
}), f = H(() => ct(t.value)), d = H(() => ct(e.value)), v = ee(0), m = ee(0), b = ee(s.value), p = ee(i.value), T = Pt({}), E = ee(!1), x = H(() => {
|
|
1873
|
+
const C = {
|
|
1874
|
+
position: b.value,
|
|
1875
|
+
left: "0",
|
|
1876
|
+
top: "0"
|
|
1877
|
+
};
|
|
1878
|
+
if (!d.value)
|
|
1879
|
+
return C;
|
|
1880
|
+
const I = lt(d.value, v.value), _ = lt(d.value, m.value);
|
|
1881
|
+
return u.value ? {
|
|
1882
|
+
...C,
|
|
1883
|
+
transform: "translate(" + I + "px, " + _ + "px)",
|
|
1884
|
+
...Ft(d.value) >= 1.5 && {
|
|
1885
|
+
willChange: "transform"
|
|
1886
|
+
}
|
|
1887
|
+
} : {
|
|
1888
|
+
position: b.value,
|
|
1889
|
+
left: I + "px",
|
|
1890
|
+
top: _ + "px"
|
|
1891
|
+
};
|
|
1892
|
+
});
|
|
1893
|
+
let R;
|
|
1894
|
+
function O() {
|
|
1895
|
+
if (f.value == null || d.value == null)
|
|
1896
|
+
return;
|
|
1897
|
+
const C = a.value;
|
|
1898
|
+
Zn(f.value, d.value, {
|
|
1899
|
+
middleware: o.value,
|
|
1900
|
+
placement: i.value,
|
|
1901
|
+
strategy: s.value
|
|
1902
|
+
}).then((I) => {
|
|
1903
|
+
v.value = I.x, m.value = I.y, b.value = I.strategy, p.value = I.placement, T.value = I.middlewareData, E.value = C !== !1;
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
function k() {
|
|
1907
|
+
typeof R == "function" && (R(), R = void 0);
|
|
1908
|
+
}
|
|
1909
|
+
function P() {
|
|
1910
|
+
if (k(), r === void 0) {
|
|
1911
|
+
O();
|
|
1912
|
+
return;
|
|
1913
|
+
}
|
|
1914
|
+
if (f.value != null && d.value != null) {
|
|
1915
|
+
R = r(f.value, d.value, O);
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
function D() {
|
|
1920
|
+
a.value || (E.value = !1);
|
|
1921
|
+
}
|
|
1922
|
+
return we([o, i, s, a], O, {
|
|
1923
|
+
flush: "sync"
|
|
1924
|
+
}), we([f, d], P, {
|
|
1925
|
+
flush: "sync"
|
|
1926
|
+
}), we(a, D, {
|
|
1927
|
+
flush: "sync"
|
|
1928
|
+
}), It() && Lt(k), {
|
|
1929
|
+
x: ce(v),
|
|
1930
|
+
y: ce(m),
|
|
1931
|
+
strategy: ce(b),
|
|
1932
|
+
placement: ce(p),
|
|
1933
|
+
middlewareData: ce(T),
|
|
1934
|
+
isPositioned: ce(E),
|
|
1935
|
+
floatingStyles: x,
|
|
1936
|
+
update: O
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
const ye = (t) => {
|
|
1940
|
+
t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation();
|
|
1941
|
+
}, or = ({
|
|
1942
|
+
getNextElement: t,
|
|
1943
|
+
getFirstElement: e,
|
|
1944
|
+
getLastElement: n,
|
|
1945
|
+
close: r,
|
|
1946
|
+
disableSpaceToClick: a,
|
|
1947
|
+
keepOpenedOnTab: o
|
|
1948
|
+
}) => {
|
|
1949
|
+
const i = ee(null), s = () => {
|
|
1950
|
+
};
|
|
1951
|
+
let u = s;
|
|
1952
|
+
const f = () => {
|
|
1953
|
+
i.value = null, u = s;
|
|
1954
|
+
}, d = (p) => {
|
|
1955
|
+
i.value = p.index, u = p.onClick;
|
|
1956
|
+
}, v = (p) => {
|
|
1957
|
+
d(t(i.value, p));
|
|
1958
|
+
}, m = () => {
|
|
1959
|
+
f(), r();
|
|
1960
|
+
};
|
|
1961
|
+
return {
|
|
1962
|
+
onKeydown: (p) => {
|
|
1963
|
+
switch (p.code) {
|
|
1964
|
+
case "ArrowDown":
|
|
1965
|
+
ye(p), v(1);
|
|
1966
|
+
break;
|
|
1967
|
+
case "ArrowUp":
|
|
1968
|
+
ye(p), v(-1);
|
|
1969
|
+
break;
|
|
1970
|
+
case "Enter":
|
|
1971
|
+
case "Space": {
|
|
1972
|
+
const T = p.code === "Enter", E = p.code === "Space";
|
|
1973
|
+
i.value !== null && (T || E && !a) && (ye(p), u());
|
|
1974
|
+
break;
|
|
1975
|
+
}
|
|
1976
|
+
case "Home":
|
|
1977
|
+
e && d(e());
|
|
1978
|
+
break;
|
|
1979
|
+
case "End":
|
|
1980
|
+
n && d(n());
|
|
1981
|
+
break;
|
|
1982
|
+
case "Escape":
|
|
1983
|
+
ye(p), m();
|
|
1984
|
+
break;
|
|
1985
|
+
case "Tab":
|
|
1986
|
+
o || m();
|
|
1987
|
+
break;
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
currentIndex: Mt(i),
|
|
1991
|
+
resetNavigation: f,
|
|
1992
|
+
setElement: d
|
|
1993
|
+
};
|
|
1994
|
+
};
|
|
1995
|
+
export {
|
|
1996
|
+
er as F,
|
|
1997
|
+
ar as a,
|
|
1998
|
+
tr as b,
|
|
1999
|
+
ir as f,
|
|
2000
|
+
nr as o,
|
|
2001
|
+
rr as s,
|
|
2002
|
+
or as u
|
|
2003
|
+
};
|