@knime/jsonforms 1.23.1 → 1.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{AnyOfTwinlist-B_UW1LI0.js → AnyOfTwinlist-4crfaTqP.js} +1 -1
  3. package/dist/{CheckboxControl-BMyOusAA.js → CheckboxControl-LHJYVIMA.js} +1 -1
  4. package/dist/{CheckboxesControl-CkeTdrFS.js → CheckboxesControl-DVxU7S2U.js} +2 -2
  5. package/dist/{ColorControl-CAL0L6L4.js → ColorControl-PYAP-kY8.js} +1 -1
  6. package/dist/{ColorPreviewControl-DvKX8YeB.js → ColorPreviewControl-CMg5PwoZ.js} +1 -1
  7. package/dist/{ComboBoxControl-CbMBzHre.js → ComboBoxControl-C5neBFjq.js} +2 -2
  8. package/dist/{DateControl-RJtZbKPy.js → DateControl-CAfHybzM.js} +3 -3
  9. package/dist/DateTimeControl-BZL09pSq.js +103 -0
  10. package/dist/{DateTimeFormatPickerControl-JVgCROnR.js → DateTimeFormatPickerControl-BgbUloew.js} +1 -1
  11. package/dist/DateTimeFormatPickerWithTypeControl-BXe2Elky.js +2576 -0
  12. package/dist/{DropdownControl-CPfIoin1.js → DropdownControl-BLbfAq1O.js} +2 -2
  13. package/dist/{ExecutorCoresControl-gLv8RzqL.js → ExecutorCoresControl-DDrOHyQi.js} +1 -1
  14. package/dist/{ExecutorMemoryControl-swyZuGDr.js → ExecutorMemoryControl-6EGadaiD.js} +1 -1
  15. package/dist/{FileUploadControl-Db66TCRo.js → FileUploadControl-CRq9vat5.js} +41 -42
  16. package/dist/{GridSelectionControl-Djn2T13y.js → GridSelectionControl-DOe5azkR.js} +1 -1
  17. package/dist/{HorizontalLayout-IQQdI26A.js → HorizontalLayout-DFD1rMTX.js} +1 -1
  18. package/dist/{IntegerControl-j0BdGN1e.js → IntegerControl-Ct2saEQV.js} +1 -1
  19. package/dist/{IntervalControl-CwrYRFKJ.js → IntervalControl-BvYreXcW.js} +1 -1
  20. package/dist/{LinkControl-fG24M9KW.js → LinkControl-oTRT92um.js} +1 -1
  21. package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-DoE3qoLb.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-hzym_PLl.js} +1 -1
  22. package/dist/{ManualTwinlistControl-BuTbAWnH.js → ManualTwinlistControl-Dj411CSA.js} +3 -3
  23. package/dist/{MultiSelectListBoxControl-BXGwgWs_.js → MultiSelectListBoxControl-B980q59c.js} +3 -3
  24. package/dist/{MultimodeTwinlistControl-D-gl_pVW.js → MultimodeTwinlistControl-BSOhrPMu.js} +1 -1
  25. package/dist/{MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-D_r7uwKB.js → MultimodeTwinlistControl.vue_vue_type_script_setup_true_lang-DTASQsVW.js} +3 -3
  26. package/dist/{NameFilter-BVT5yrA-.js → NameFilter-BLPcbvTz.js} +1 -1
  27. package/dist/{NumberControl-vAh5HuIS.js → NumberControl-By7pvzoK.js} +1 -1
  28. package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-DvCAjhNZ.js → NumberControlBase.vue_vue_type_script_setup_true_lang-CmVzUoUy.js} +4 -4
  29. package/dist/{OneOfDropdown-Bm5FQ6NA.js → OneOfDropdown-CjXkZX24.js} +1 -1
  30. package/dist/{ProgressButtonControl-brC36qlg.js → ProgressButtonControl-_usCDsko.js} +1 -1
  31. package/dist/{RadioButtonsWithDescriptionControl-S1OeqZ0i.js → RadioButtonsWithDescriptionControl-DaUPzm5V.js} +1 -1
  32. package/dist/{RadioControl-Cfe_kYfb.js → RadioControl-XMeysIb4.js} +1 -1
  33. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-COszpwIP.js → RadioControlBase.vue_vue_type_script_setup_true_lang-DNk58ok_.js} +2 -2
  34. package/dist/{ResourceControlBase-DaMNlDhC.js → ResourceControlBase-Cb-kTuo7.js} +1 -1
  35. package/dist/{RichTextControl-Dekvygdy.js → RichTextControl-CSTA4KtX.js} +11597 -11237
  36. package/dist/{SectionHeading-DkmQqn9k.js → SectionHeading-DfNXhGka.js} +1 -1
  37. package/dist/{SectionLayout-CLqyOBZE.js → SectionLayout-Cvb0bcuV.js} +3 -3
  38. package/dist/SettingsSubPanel-Cmh54tK7.js +5 -0
  39. package/dist/{SettingsSubPanelLayout-DLplwwNG.js → SettingsSubPanelLayout-DsKmK0z6.js} +4 -4
  40. package/dist/{SimpleButtonControl-BIJ6K6qX.js → SimpleButtonControl-BXywCMI0.js} +1 -1
  41. package/dist/{SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Ducup0yA.js → SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Wvr-HAK1.js} +11567 -11025
  42. package/dist/{SimpleTwinlistControl-BZWkpiSo.js → SimpleTwinlistControl-BVzlARWT.js} +2 -2
  43. package/dist/{SingleSelectControl-DAh9C1IS.js → SingleSelectControl-CK4sTVtC.js} +2 -2
  44. package/dist/{SingleSelectListBoxControl-C102okGc.js → SingleSelectListBoxControl-8GIwWAdl.js} +3 -3
  45. package/dist/{SortListControl-CVdl-xw-.js → SortListControl-Ba-x4yBo.js} +11 -11
  46. package/dist/{StyledListItem-C-a_11mo.js → StyledListItem-Joz4p472.js} +1 -1
  47. package/dist/{TeamAndSpacesControl-B9JZJBXv.js → TeamAndSpacesControl-Du2l4ecu.js} +5 -5
  48. package/dist/{TeamResourceControl-JJIgYaMY.js → TeamResourceControl-DWUGFJNZ.js} +1 -1
  49. package/dist/{TextAreaControl-DsJyw0Yv.js → TextAreaControl-BqZAHRQc.js} +1 -1
  50. package/dist/{TextControl-DnVGNtbx.js → TextControl-TRRzPYLK.js} +1 -1
  51. package/dist/{TextControl.vue_vue_type_script_setup_true_lang-Bp4FZd2C.js → TextControl.vue_vue_type_script_setup_true_lang-BWoZVQit.js} +2 -2
  52. package/dist/{TimeControl-DGrWNVz_.js → TimeControl-CFA6Z_Cx.js} +3 -3
  53. package/dist/{TimeframesControl-DKaZAZeW.js → TimeframesControl-B4_L8eIq.js} +3 -4
  54. package/dist/{TwinlistControlBase.vue_vue_type_script_setup_true_lang-CAk_iS6w.js → TwinlistControlBase.vue_vue_type_script_setup_true_lang-C0IdQ7wU.js} +2 -2
  55. package/dist/{TypedStringFilter-Cw5aL-PG.js → TypedStringFilter-Dop1UoHZ.js} +1 -1
  56. package/dist/{ValueSwitchControl-CE9z5s11.js → ValueSwitchControl-I59qm_KJ.js} +1 -1
  57. package/dist/{VerticalLayout-DDGwEUts.js → VerticalLayout-HY5-eEHt.js} +2 -2
  58. package/dist/{VerticalLayoutBase-Bv4ct09F.js → VerticalLayoutBase-3rqxH8Xh.js} +1 -1
  59. package/dist/ZonedDateTimeControl-Du9G9i_O.js +97 -0
  60. package/dist/{_Uint8Array-DGFCQcAO.js → _Uint8Array-C4-Afpp1.js} +36 -36
  61. package/dist/feedback-CSzO39Ck-_5Kb5BA8.js +22 -0
  62. package/dist/knime-jsonforms.css +1 -1
  63. package/dist/knime-jsonforms.js +7 -7
  64. package/dist/src/layoutComponents/settingsSubPanel/SettingsSubPanel.vue.d.ts +0 -1
  65. package/dist/src/uiComponents/DateTimeControl.vue.d.ts +1 -1
  66. package/dist/src/uiComponents/ZonedDateTimeControl.vue.d.ts +1 -1
  67. package/dist/testing.js +2873 -2856
  68. package/dist/{useBuiltinValidations-C92yDv0y.js → useBuiltinValidations-gdKMBhCo.js} +1 -1
  69. package/dist/{usePossibleValues-Vlw1CCFD.js → usePossibleValues-dMl8kLBU.js} +1 -1
  70. package/dist/{useUnknownValuesInTwinlist-EXO9oOxf.js → useUnknownValuesInTwinlist-BmBKnWBC.js} +1 -1
  71. package/package.json +4 -4
  72. package/dist/DateTimeControl-CjqPP5Mu.js +0 -80
  73. package/dist/DateTimeFormatPickerWithTypeControl-DSrj0KvO.js +0 -587
  74. package/dist/SettingsSubPanel-BIKfyhCw.js +0 -5
  75. package/dist/ZonedDateTimeControl-yDCAQQ5B.js +0 -79
  76. package/dist/isArray-WzO_os3q.js +0 -4
  77. package/dist/src/composables/usePlainDateTimeBatch.d.ts +0 -31
  78. package/dist/src/uiComponents/richTextControl/DialogLinkModal.vue.d.ts +0 -22
  79. package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +0 -230
  80. package/dist/toString-DqZWnsFs.js +0 -24
  81. package/dist/useDropdownNavigation-CdrbT-CQ.js +0 -2003
  82. package/dist/usePlainDateTimeBatch-Bd2G-GY9.js +0 -34
@@ -0,0 +1,2576 @@
1
+ import { openBlock as $, createElementBlock as H, createElementVNode as z, h as Xt, defineComponent as fe, createBlock as ke, unref as q, ref as j, computed as M, onMounted as Ft, watch as le, onUnmounted as Rt, Comment as Gt, cloneVNode as Yt, shallowRef as Zt, getCurrentScope as Jt, onScopeDispose as Qt, shallowReadonly as pe, readonly as en, Fragment as Je, renderList as At, normalizeClass as Se, toDisplayString as Oe, renderSlot as Ct, createCommentVNode as Ne, resolveComponent as tn, withCtx as kt, normalizeProps as nn, guardReactiveProps as an, useCssVars as on, reactive as rn, nextTick as st, createVNode as be, useModel as ln, withDirectives as sn, vModelText as cn, normalizeStyle as un, mergeModels as dn } from "vue";
2
+ import { _ as ge, R as fn, T as vn, u as pn } from "./SimpleButtonControl.vue_vue_type_style_index_0_scoped_c79c6b71_lang-Wvr-HAK1.js";
3
+ const mn = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ fill: "none",
6
+ stroke: "#000",
7
+ "stroke-linejoin": "round",
8
+ viewBox: "0 0 32 32"
9
+ };
10
+ function hn(t, e) {
11
+ return $(), H("svg", mn, [...e[0] || (e[0] = [
12
+ z("path", { d: "m11.9 22.3 2.7 4.4-4.5 2.8m4.5-2.8C9 26 4.7 21.7 4.7 16c0-5.1 3.4-9.4 8.1-10.8M20 9.7l-2.6-4.4 4.5-2.8m-4.5 2.8c5.6.7 9.9 5 9.9 10.7 0 5.1-3.4 9.4-8.1 10.8" }, null, -1)
13
+ ])]);
14
+ }
15
+ const bn = { render: hn }, yn = (t, e) => ({
16
+ render() {
17
+ const n = t.render({}, []), a = Xt("title", e);
18
+ return a.ns = "svg", n.children.unshift(a), n;
19
+ }
20
+ }), gn = /* @__PURE__ */ fe({
21
+ __name: "LoadingIcon",
22
+ setup(t) {
23
+ const e = yn(bn, "Loading…");
24
+ return (n, a) => ($(), ke(q(e)));
25
+ }
26
+ }), wn = /* @__PURE__ */ ge(gn, [["__scopeId", "data-v-6b552b81"]]);
27
+ var Ot = ["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] *)"], De = /* @__PURE__ */ Ot.join(","), Nt = typeof Element > "u", ce = Nt ? function() {
28
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ie = !Nt && Element.prototype.getRootNode ? function(t) {
29
+ var e;
30
+ return t == null || (e = t.getRootNode) === null || e === void 0 ? void 0 : e.call(t);
31
+ } : function(t) {
32
+ return t?.ownerDocument;
33
+ }, Pe = function(e, n) {
34
+ var a;
35
+ n === void 0 && (n = !0);
36
+ var r = e == null || (a = e.getAttribute) === null || a === void 0 ? void 0 : a.call(e, "inert"), i = r === "" || r === "true", o = i || n && e && // closest does not exist on shadow roots, so we fall back to a manual
37
+ // lookup upward, in case it is not defined.
38
+ (typeof e.closest == "function" ? e.closest("[inert]") : Pe(e.parentNode));
39
+ return o;
40
+ }, Tn = function(e) {
41
+ var n, a = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "contenteditable");
42
+ return a === "" || a === "true";
43
+ }, Dt = function(e, n, a) {
44
+ if (Pe(e))
45
+ return [];
46
+ var r = Array.prototype.slice.apply(e.querySelectorAll(De));
47
+ return n && ce.call(e, De) && r.unshift(e), r = r.filter(a), r;
48
+ }, Ve = function(e, n, a) {
49
+ for (var r = [], i = Array.from(e); i.length; ) {
50
+ var o = i.shift();
51
+ if (!Pe(o, !1))
52
+ if (o.tagName === "SLOT") {
53
+ var l = o.assignedElements(), s = l.length ? l : o.children, u = Ve(s, !0, a);
54
+ a.flatten ? r.push.apply(r, u) : r.push({
55
+ scopeParent: o,
56
+ candidates: u
57
+ });
58
+ } else {
59
+ var d = ce.call(o, De);
60
+ d && a.filter(o) && (n || !e.includes(o)) && r.push(o);
61
+ var v = o.shadowRoot || // check for an undisclosed shadow
62
+ typeof a.getShadowRoot == "function" && a.getShadowRoot(o), m = !Pe(v, !1) && (!a.shadowRootFilter || a.shadowRootFilter(o));
63
+ if (v && m) {
64
+ var p = Ve(v === !0 ? o.children : v.children, !0, a);
65
+ a.flatten ? r.push.apply(r, p) : r.push({
66
+ scopeParent: o,
67
+ candidates: p
68
+ });
69
+ } else
70
+ i.unshift.apply(i, o.children);
71
+ }
72
+ }
73
+ return r;
74
+ }, It = function(e) {
75
+ return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
76
+ }, ie = function(e) {
77
+ if (!e)
78
+ throw new Error("No node provided");
79
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Tn(e)) && !It(e) ? 0 : e.tabIndex;
80
+ }, xn = function(e, n) {
81
+ var a = ie(e);
82
+ return a < 0 && n && !It(e) ? 0 : a;
83
+ }, Sn = function(e, n) {
84
+ return e.tabIndex === n.tabIndex ? e.documentOrder - n.documentOrder : e.tabIndex - n.tabIndex;
85
+ }, Pt = function(e) {
86
+ return e.tagName === "INPUT";
87
+ }, En = function(e) {
88
+ return Pt(e) && e.type === "hidden";
89
+ }, Fn = function(e) {
90
+ var n = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(a) {
91
+ return a.tagName === "SUMMARY";
92
+ });
93
+ return n;
94
+ }, Rn = function(e, n) {
95
+ for (var a = 0; a < e.length; a++)
96
+ if (e[a].checked && e[a].form === n)
97
+ return e[a];
98
+ }, An = function(e) {
99
+ if (!e.name)
100
+ return !0;
101
+ var n = e.form || Ie(e), a = function(l) {
102
+ return n.querySelectorAll('input[type="radio"][name="' + l + '"]');
103
+ }, r;
104
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
105
+ r = a(window.CSS.escape(e.name));
106
+ else
107
+ try {
108
+ r = a(e.name);
109
+ } catch (o) {
110
+ 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", o.message), !1;
111
+ }
112
+ var i = Rn(r, e.form);
113
+ return !i || i === e;
114
+ }, Cn = function(e) {
115
+ return Pt(e) && e.type === "radio";
116
+ }, kn = function(e) {
117
+ return Cn(e) && !An(e);
118
+ }, On = function(e) {
119
+ var n, a = e && Ie(e), r = (n = a) === null || n === void 0 ? void 0 : n.host, i = !1;
120
+ if (a && a !== e) {
121
+ var o, l, s;
122
+ for (i = !!((o = r) !== null && o !== void 0 && (l = o.ownerDocument) !== null && l !== void 0 && l.contains(r) || e != null && (s = e.ownerDocument) !== null && s !== void 0 && s.contains(e)); !i && r; ) {
123
+ var u, d, v;
124
+ a = Ie(r), r = (u = a) === null || u === void 0 ? void 0 : u.host, i = !!((d = r) !== null && d !== void 0 && (v = d.ownerDocument) !== null && v !== void 0 && v.contains(r));
125
+ }
126
+ }
127
+ return i;
128
+ }, ct = function(e) {
129
+ var n = e.getBoundingClientRect(), a = n.width, r = n.height;
130
+ return a === 0 && r === 0;
131
+ }, Nn = function(e, n) {
132
+ var a = n.displayCheck, r = n.getShadowRoot;
133
+ if (a === "full-native" && "checkVisibility" in e) {
134
+ var i = e.checkVisibility({
135
+ // Checking opacity might be desirable for some use cases, but natively,
136
+ // opacity zero elements _are_ focusable and tabbable.
137
+ checkOpacity: !1,
138
+ opacityProperty: !1,
139
+ contentVisibilityAuto: !0,
140
+ visibilityProperty: !0,
141
+ // This is an alias for `visibilityProperty`. Contemporary browsers
142
+ // support both. However, this alias has wider browser support (Chrome
143
+ // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
144
+ // we include it anyway.
145
+ checkVisibilityCSS: !0
146
+ });
147
+ return !i;
148
+ }
149
+ if (getComputedStyle(e).visibility === "hidden")
150
+ return !0;
151
+ var o = ce.call(e, "details>summary:first-of-type"), l = o ? e.parentElement : e;
152
+ if (ce.call(l, "details:not([open]) *"))
153
+ return !0;
154
+ if (!a || a === "full" || // full-native can run this branch when it falls through in case
155
+ // Element#checkVisibility is unsupported
156
+ a === "full-native" || a === "legacy-full") {
157
+ if (typeof r == "function") {
158
+ for (var s = e; e; ) {
159
+ var u = e.parentElement, d = Ie(e);
160
+ if (u && !u.shadowRoot && r(u) === !0)
161
+ return ct(e);
162
+ e.assignedSlot ? e = e.assignedSlot : !u && d !== e.ownerDocument ? e = d.host : e = u;
163
+ }
164
+ e = s;
165
+ }
166
+ if (On(e))
167
+ return !e.getClientRects().length;
168
+ if (a !== "legacy-full")
169
+ return !0;
170
+ } else if (a === "non-zero-area")
171
+ return ct(e);
172
+ return !1;
173
+ }, Dn = function(e) {
174
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
175
+ for (var n = e.parentElement; n; ) {
176
+ if (n.tagName === "FIELDSET" && n.disabled) {
177
+ for (var a = 0; a < n.children.length; a++) {
178
+ var r = n.children.item(a);
179
+ if (r.tagName === "LEGEND")
180
+ return ce.call(n, "fieldset[disabled] *") ? !0 : !r.contains(e);
181
+ }
182
+ return !0;
183
+ }
184
+ n = n.parentElement;
185
+ }
186
+ return !1;
187
+ }, Be = function(e, n) {
188
+ return !(n.disabled || En(n) || Nn(n, e) || // For a details element with a summary, the summary element gets the focus
189
+ Fn(n) || Dn(n));
190
+ }, Qe = function(e, n) {
191
+ return !(kn(n) || ie(n) < 0 || !Be(e, n));
192
+ }, In = function(e) {
193
+ var n = parseInt(e.getAttribute("tabindex"), 10);
194
+ return !!(isNaN(n) || n >= 0);
195
+ }, Vt = function(e) {
196
+ var n = [], a = [];
197
+ return e.forEach(function(r, i) {
198
+ var o = !!r.scopeParent, l = o ? r.scopeParent : r, s = xn(l, o), u = o ? Vt(r.candidates) : l;
199
+ s === 0 ? o ? n.push.apply(n, u) : n.push(l) : a.push({
200
+ documentOrder: i,
201
+ tabIndex: s,
202
+ item: r,
203
+ isScope: o,
204
+ content: u
205
+ });
206
+ }), a.sort(Sn).reduce(function(r, i) {
207
+ return i.isScope ? r.push.apply(r, i.content) : r.push(i.content), r;
208
+ }, []).concat(n);
209
+ }, Pn = function(e, n) {
210
+ n = n || {};
211
+ var a;
212
+ return n.getShadowRoot ? a = Ve([e], n.includeContainer, {
213
+ filter: Qe.bind(null, n),
214
+ flatten: !1,
215
+ getShadowRoot: n.getShadowRoot,
216
+ shadowRootFilter: In
217
+ }) : a = Dt(e, n.includeContainer, Qe.bind(null, n)), Vt(a);
218
+ }, Vn = function(e, n) {
219
+ n = n || {};
220
+ var a;
221
+ return n.getShadowRoot ? a = Ve([e], n.includeContainer, {
222
+ filter: Be.bind(null, n),
223
+ flatten: !0,
224
+ getShadowRoot: n.getShadowRoot
225
+ }) : a = Dt(e, n.includeContainer, Be.bind(null, n)), a;
226
+ }, me = function(e, n) {
227
+ if (n = n || {}, !e)
228
+ throw new Error("No node provided");
229
+ return ce.call(e, De) === !1 ? !1 : Qe(n, e);
230
+ }, Bn = /* @__PURE__ */ Ot.concat("iframe:not([inert]):not([inert] *)").join(","), Ge = function(e, n) {
231
+ if (n = n || {}, !e)
232
+ throw new Error("No node provided");
233
+ return ce.call(e, Bn) === !1 ? !1 : Be(n, e);
234
+ };
235
+ function et(t, e) {
236
+ (e == null || e > t.length) && (e = t.length);
237
+ for (var n = 0, a = Array(e); n < e; n++) a[n] = t[n];
238
+ return a;
239
+ }
240
+ function Ln(t) {
241
+ if (Array.isArray(t)) return et(t);
242
+ }
243
+ function ut(t, e) {
244
+ var n = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
245
+ if (!n) {
246
+ if (Array.isArray(t) || (n = Bt(t)) || e) {
247
+ n && (t = n);
248
+ var a = 0, r = function() {
249
+ };
250
+ return {
251
+ s: r,
252
+ n: function() {
253
+ return a >= t.length ? {
254
+ done: !0
255
+ } : {
256
+ done: !1,
257
+ value: t[a++]
258
+ };
259
+ },
260
+ e: function(s) {
261
+ throw s;
262
+ },
263
+ f: r
264
+ };
265
+ }
266
+ throw new TypeError(`Invalid attempt to iterate non-iterable instance.
267
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
268
+ }
269
+ var i, o = !0, l = !1;
270
+ return {
271
+ s: function() {
272
+ n = n.call(t);
273
+ },
274
+ n: function() {
275
+ var s = n.next();
276
+ return o = s.done, s;
277
+ },
278
+ e: function(s) {
279
+ l = !0, i = s;
280
+ },
281
+ f: function() {
282
+ try {
283
+ o || n.return == null || n.return();
284
+ } finally {
285
+ if (l) throw i;
286
+ }
287
+ }
288
+ };
289
+ }
290
+ function Mn(t, e, n) {
291
+ return (e = Wn(e)) in t ? Object.defineProperty(t, e, {
292
+ value: n,
293
+ enumerable: !0,
294
+ configurable: !0,
295
+ writable: !0
296
+ }) : t[e] = n, t;
297
+ }
298
+ function _n(t) {
299
+ if (typeof Symbol < "u" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
300
+ }
301
+ function $n() {
302
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
303
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
304
+ }
305
+ function dt(t, e) {
306
+ var n = Object.keys(t);
307
+ if (Object.getOwnPropertySymbols) {
308
+ var a = Object.getOwnPropertySymbols(t);
309
+ e && (a = a.filter(function(r) {
310
+ return Object.getOwnPropertyDescriptor(t, r).enumerable;
311
+ })), n.push.apply(n, a);
312
+ }
313
+ return n;
314
+ }
315
+ function ft(t) {
316
+ for (var e = 1; e < arguments.length; e++) {
317
+ var n = arguments[e] != null ? arguments[e] : {};
318
+ e % 2 ? dt(Object(n), !0).forEach(function(a) {
319
+ Mn(t, a, n[a]);
320
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : dt(Object(n)).forEach(function(a) {
321
+ Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(n, a));
322
+ });
323
+ }
324
+ return t;
325
+ }
326
+ function jn(t) {
327
+ return Ln(t) || _n(t) || Bt(t) || $n();
328
+ }
329
+ function zn(t, e) {
330
+ if (typeof t != "object" || !t) return t;
331
+ var n = t[Symbol.toPrimitive];
332
+ if (n !== void 0) {
333
+ var a = n.call(t, e);
334
+ if (typeof a != "object") return a;
335
+ throw new TypeError("@@toPrimitive must return a primitive value.");
336
+ }
337
+ return (e === "string" ? String : Number)(t);
338
+ }
339
+ function Wn(t) {
340
+ var e = zn(t, "string");
341
+ return typeof e == "symbol" ? e : e + "";
342
+ }
343
+ function Bt(t, e) {
344
+ if (t) {
345
+ if (typeof t == "string") return et(t, e);
346
+ var n = {}.toString.call(t).slice(8, -1);
347
+ 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) ? et(t, e) : void 0;
348
+ }
349
+ }
350
+ var Q = {
351
+ // Returns the trap from the top of the stack.
352
+ getActiveTrap: function(e) {
353
+ return e?.length > 0 ? e[e.length - 1] : null;
354
+ },
355
+ // Pauses the currently active trap, then adds a new trap to the stack.
356
+ activateTrap: function(e, n) {
357
+ var a = Q.getActiveTrap(e);
358
+ n !== a && Q.pauseTrap(e);
359
+ var r = e.indexOf(n);
360
+ r === -1 || e.splice(r, 1), e.push(n);
361
+ },
362
+ // Removes the trap from the top of the stack, then unpauses the next trap down.
363
+ deactivateTrap: function(e, n) {
364
+ var a = e.indexOf(n);
365
+ a !== -1 && e.splice(a, 1), Q.unpauseTrap(e);
366
+ },
367
+ // Pauses the trap at the top of the stack.
368
+ pauseTrap: function(e) {
369
+ var n = Q.getActiveTrap(e);
370
+ n?._setPausedState(!0);
371
+ },
372
+ // Unpauses the trap at the top of the stack.
373
+ unpauseTrap: function(e) {
374
+ var n = Q.getActiveTrap(e);
375
+ n && !n._isManuallyPaused() && n._setPausedState(!1);
376
+ }
377
+ }, Hn = function(e) {
378
+ return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
379
+ }, Kn = function(e) {
380
+ return e?.key === "Escape" || e?.key === "Esc" || e?.keyCode === 27;
381
+ }, xe = function(e) {
382
+ return e?.key === "Tab" || e?.keyCode === 9;
383
+ }, Un = function(e) {
384
+ return xe(e) && !e.shiftKey;
385
+ }, qn = function(e) {
386
+ return xe(e) && e.shiftKey;
387
+ }, vt = function(e) {
388
+ return setTimeout(e, 0);
389
+ }, we = function(e) {
390
+ for (var n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), r = 1; r < n; r++)
391
+ a[r - 1] = arguments[r];
392
+ return typeof e == "function" ? e.apply(void 0, a) : e;
393
+ }, Re = function(e) {
394
+ return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
395
+ }, Xn = [], Gn = function(e, n) {
396
+ var a = n?.document || document, r = n?.trapStack || Xn, i = ft({
397
+ returnFocusOnDeactivate: !0,
398
+ escapeDeactivates: !0,
399
+ delayInitialFocus: !0,
400
+ isolateSubtrees: !1,
401
+ isKeyForward: Un,
402
+ isKeyBackward: qn
403
+ }, n), o = {
404
+ // containers given to createFocusTrap()
405
+ /** @type {Array<HTMLElement>} */
406
+ containers: [],
407
+ // list of objects identifying tabbable nodes in `containers` in the trap
408
+ // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
409
+ // is active, but the trap should never get to a state where there isn't at least one group
410
+ // with at least one tabbable node in it (that would lead to an error condition that would
411
+ // result in an error being thrown)
412
+ /** @type {Array<{
413
+ * container: HTMLElement,
414
+ * tabbableNodes: Array<HTMLElement>, // empty if none
415
+ * focusableNodes: Array<HTMLElement>, // empty if none
416
+ * posTabIndexesFound: boolean,
417
+ * firstTabbableNode: HTMLElement|undefined,
418
+ * lastTabbableNode: HTMLElement|undefined,
419
+ * firstDomTabbableNode: HTMLElement|undefined,
420
+ * lastDomTabbableNode: HTMLElement|undefined,
421
+ * nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
422
+ * }>}
423
+ */
424
+ containerGroups: [],
425
+ // same order/length as `containers` list
426
+ // references to objects in `containerGroups`, but only those that actually have
427
+ // tabbable nodes in them
428
+ // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
429
+ // the same length
430
+ tabbableGroups: [],
431
+ // references to nodes that are siblings to the ancestors of this trap's containers.
432
+ /** @type {Set<HTMLElement>} */
433
+ adjacentElements: /* @__PURE__ */ new Set(),
434
+ // references to nodes that were inert or aria-hidden before the trap was activated.
435
+ /** @type {Set<HTMLElement>} */
436
+ alreadySilent: /* @__PURE__ */ new Set(),
437
+ nodeFocusedBeforeActivation: null,
438
+ mostRecentlyFocusedNode: null,
439
+ active: !1,
440
+ paused: !1,
441
+ manuallyPaused: !1,
442
+ // timer ID for when delayInitialFocus is true and initial focus in this trap
443
+ // has been delayed during activation
444
+ delayInitialFocusTimer: void 0,
445
+ // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
446
+ recentNavEvent: void 0
447
+ }, l, s = function(c, f, b) {
448
+ return c && c[f] !== void 0 ? c[f] : i[b || f];
449
+ }, u = function(c, f) {
450
+ var b = typeof f?.composedPath == "function" ? f.composedPath() : void 0;
451
+ return o.containerGroups.findIndex(function(x) {
452
+ var g = x.container, R = x.tabbableNodes;
453
+ return g.contains(c) || b?.includes(g) || R.find(function(F) {
454
+ return F === c;
455
+ });
456
+ });
457
+ }, d = function(c) {
458
+ var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = f.hasFallback, x = b === void 0 ? !1 : b, g = f.params, R = g === void 0 ? [] : g, F = i[c];
459
+ if (typeof F == "function" && (F = F.apply(void 0, jn(R))), F === !0 && (F = void 0), !F) {
460
+ if (F === void 0 || F === !1)
461
+ return F;
462
+ throw new Error("`".concat(c, "` was specified but was not a node, or did not return a node"));
463
+ }
464
+ var D = F;
465
+ if (typeof F == "string") {
466
+ try {
467
+ D = a.querySelector(F);
468
+ } catch (I) {
469
+ throw new Error("`".concat(c, '` appears to be an invalid selector; error="').concat(I.message, '"'));
470
+ }
471
+ if (!D && !x)
472
+ throw new Error("`".concat(c, "` as selector refers to no known node"));
473
+ }
474
+ return D;
475
+ }, v = function() {
476
+ var c = d("initialFocus", {
477
+ hasFallback: !0
478
+ });
479
+ if (c === !1)
480
+ return !1;
481
+ if (c === void 0 || c && !Ge(c, i.tabbableOptions))
482
+ if (u(a.activeElement) >= 0)
483
+ c = a.activeElement;
484
+ else {
485
+ var f = o.tabbableGroups[0], b = f && f.firstTabbableNode;
486
+ c = b || d("fallbackFocus");
487
+ }
488
+ else c === null && (c = d("fallbackFocus"));
489
+ if (!c)
490
+ throw new Error("Your focus-trap needs to have at least one focusable element");
491
+ return c;
492
+ }, m = function() {
493
+ if (o.containerGroups = o.containers.map(function(c) {
494
+ var f = Pn(c, i.tabbableOptions), b = Vn(c, i.tabbableOptions), x = f.length > 0 ? f[0] : void 0, g = f.length > 0 ? f[f.length - 1] : void 0, R = b.find(function(I) {
495
+ return me(I);
496
+ }), F = b.slice().reverse().find(function(I) {
497
+ return me(I);
498
+ }), D = !!f.find(function(I) {
499
+ return ie(I) > 0;
500
+ });
501
+ return {
502
+ container: c,
503
+ tabbableNodes: f,
504
+ focusableNodes: b,
505
+ /** True if at least one node with positive `tabindex` was found in this container. */
506
+ posTabIndexesFound: D,
507
+ /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
508
+ firstTabbableNode: x,
509
+ /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
510
+ lastTabbableNode: g,
511
+ // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
512
+ // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
513
+ // because that API doesn't work with Shadow DOM as well as it should (@see
514
+ // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
515
+ // to address an edge case related to positive tabindex support, this seems like a much easier,
516
+ // "close enough most of the time" alternative for positive tabindexes which should generally
517
+ // be avoided anyway...
518
+ /** First tabbable node in container, __DOM__ order; `undefined` if none. */
519
+ firstDomTabbableNode: R,
520
+ /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
521
+ lastDomTabbableNode: F,
522
+ /**
523
+ * Finds the __tabbable__ node that follows the given node in the specified direction,
524
+ * in this container, if any.
525
+ * @param {HTMLElement} node
526
+ * @param {boolean} [forward] True if going in forward tab order; false if going
527
+ * in reverse.
528
+ * @returns {HTMLElement|undefined} The next tabbable node, if any.
529
+ */
530
+ nextTabbableNode: function(W) {
531
+ var Y = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, U = f.indexOf(W);
532
+ return U < 0 ? Y ? b.slice(b.indexOf(W) + 1).find(function(oe) {
533
+ return me(oe);
534
+ }) : b.slice(0, b.indexOf(W)).reverse().find(function(oe) {
535
+ return me(oe);
536
+ }) : f[U + (Y ? 1 : -1)];
537
+ }
538
+ };
539
+ }), o.tabbableGroups = o.containerGroups.filter(function(c) {
540
+ return c.tabbableNodes.length > 0;
541
+ }), o.tabbableGroups.length <= 0 && !d("fallbackFocus"))
542
+ throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
543
+ if (o.containerGroups.find(function(c) {
544
+ return c.posTabIndexesFound;
545
+ }) && o.containerGroups.length > 1)
546
+ 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.");
547
+ }, p = function(c) {
548
+ var f = c.activeElement;
549
+ if (f)
550
+ return f.shadowRoot && f.shadowRoot.activeElement !== null ? p(f.shadowRoot) : f;
551
+ }, h = function(c) {
552
+ if (c !== !1 && c !== p(document)) {
553
+ if (!c || !c.focus) {
554
+ h(v());
555
+ return;
556
+ }
557
+ c.focus({
558
+ preventScroll: !!i.preventScroll
559
+ }), o.mostRecentlyFocusedNode = c, Hn(c) && c.select();
560
+ }
561
+ }, T = function(c) {
562
+ var f = d("setReturnFocus", {
563
+ params: [c]
564
+ });
565
+ return f || (f === !1 ? !1 : c);
566
+ }, A = function(c) {
567
+ var f = c.target, b = c.event, x = c.isBackward, g = x === void 0 ? !1 : x;
568
+ f = f || Re(b), m();
569
+ var R = null;
570
+ if (o.tabbableGroups.length > 0) {
571
+ var F = u(f, b), D = F >= 0 ? o.containerGroups[F] : void 0;
572
+ if (F < 0)
573
+ g ? R = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : R = o.tabbableGroups[0].firstTabbableNode;
574
+ else if (g) {
575
+ var I = o.tabbableGroups.findIndex(function(qe) {
576
+ var Xe = qe.firstTabbableNode;
577
+ return f === Xe;
578
+ });
579
+ if (I < 0 && (D.container === f || Ge(f, i.tabbableOptions) && !me(f, i.tabbableOptions) && !D.nextTabbableNode(f, !1)) && (I = F), I >= 0) {
580
+ var W = I === 0 ? o.tabbableGroups.length - 1 : I - 1, Y = o.tabbableGroups[W];
581
+ R = ie(f) >= 0 ? Y.lastTabbableNode : Y.lastDomTabbableNode;
582
+ } else xe(b) || (R = D.nextTabbableNode(f, !1));
583
+ } else {
584
+ var U = o.tabbableGroups.findIndex(function(qe) {
585
+ var Xe = qe.lastTabbableNode;
586
+ return f === Xe;
587
+ });
588
+ if (U < 0 && (D.container === f || Ge(f, i.tabbableOptions) && !me(f, i.tabbableOptions) && !D.nextTabbableNode(f)) && (U = F), U >= 0) {
589
+ var oe = U === o.tabbableGroups.length - 1 ? 0 : U + 1, te = o.tabbableGroups[oe];
590
+ R = ie(f) >= 0 ? te.firstTabbableNode : te.firstDomTabbableNode;
591
+ } else xe(b) || (R = D.nextTabbableNode(f));
592
+ }
593
+ } else
594
+ R = d("fallbackFocus");
595
+ return R;
596
+ }, S = function(c) {
597
+ var f = Re(c);
598
+ if (!(u(f, c) >= 0)) {
599
+ if (we(i.clickOutsideDeactivates, c)) {
600
+ l.deactivate({
601
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
602
+ // which will result in the outside click setting focus to the node
603
+ // that was clicked (and if not focusable, to "nothing"); by setting
604
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
605
+ // on activation (or the configured `setReturnFocus` node), whether the
606
+ // outside click was on a focusable node or not
607
+ returnFocus: i.returnFocusOnDeactivate
608
+ });
609
+ return;
610
+ }
611
+ we(i.allowOutsideClick, c) || c.preventDefault();
612
+ }
613
+ }, C = function(c) {
614
+ var f = Re(c), b = u(f, c) >= 0;
615
+ if (b || f instanceof Document)
616
+ b && (o.mostRecentlyFocusedNode = f);
617
+ else {
618
+ c.stopImmediatePropagation();
619
+ var x, g = !0;
620
+ if (o.mostRecentlyFocusedNode)
621
+ if (ie(o.mostRecentlyFocusedNode) > 0) {
622
+ var R = u(o.mostRecentlyFocusedNode), F = o.containerGroups[R].tabbableNodes;
623
+ if (F.length > 0) {
624
+ var D = F.findIndex(function(I) {
625
+ return I === o.mostRecentlyFocusedNode;
626
+ });
627
+ D >= 0 && (i.isKeyForward(o.recentNavEvent) ? D + 1 < F.length && (x = F[D + 1], g = !1) : D - 1 >= 0 && (x = F[D - 1], g = !1));
628
+ }
629
+ } else
630
+ o.containerGroups.some(function(I) {
631
+ return I.tabbableNodes.some(function(W) {
632
+ return ie(W) > 0;
633
+ });
634
+ }) || (g = !1);
635
+ else
636
+ g = !1;
637
+ g && (x = A({
638
+ // move FROM the MRU node, not event-related node (which will be the node that is
639
+ // outside the trap causing the focus escape we're trying to fix)
640
+ target: o.mostRecentlyFocusedNode,
641
+ isBackward: i.isKeyBackward(o.recentNavEvent)
642
+ })), h(x || o.mostRecentlyFocusedNode || v());
643
+ }
644
+ o.recentNavEvent = void 0;
645
+ }, O = function(c) {
646
+ var f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
647
+ o.recentNavEvent = c;
648
+ var b = A({
649
+ event: c,
650
+ isBackward: f
651
+ });
652
+ b && (xe(c) && c.preventDefault(), h(b));
653
+ }, P = function(c) {
654
+ (i.isKeyForward(c) || i.isKeyBackward(c)) && O(c, i.isKeyBackward(c));
655
+ }, L = function(c) {
656
+ Kn(c) && we(i.escapeDeactivates, c) !== !1 && (c.preventDefault(), l.deactivate());
657
+ }, B = function(c) {
658
+ var f = Re(c);
659
+ u(f, c) >= 0 || we(i.clickOutsideDeactivates, c) || we(i.allowOutsideClick, c) || (c.preventDefault(), c.stopImmediatePropagation());
660
+ }, N = function() {
661
+ if (o.active)
662
+ return Q.activateTrap(r, l), o.delayInitialFocusTimer = i.delayInitialFocus ? vt(function() {
663
+ h(v());
664
+ }) : h(v()), a.addEventListener("focusin", C, !0), a.addEventListener("mousedown", S, {
665
+ capture: !0,
666
+ passive: !1
667
+ }), a.addEventListener("touchstart", S, {
668
+ capture: !0,
669
+ passive: !1
670
+ }), a.addEventListener("click", B, {
671
+ capture: !0,
672
+ passive: !1
673
+ }), a.addEventListener("keydown", P, {
674
+ capture: !0,
675
+ passive: !1
676
+ }), a.addEventListener("keydown", L), l;
677
+ }, y = function(c) {
678
+ o.active && !o.paused && l._setSubtreeIsolation(!1), o.adjacentElements.clear(), o.alreadySilent.clear();
679
+ var f = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), x = ut(c), g;
680
+ try {
681
+ for (x.s(); !(g = x.n()).done; ) {
682
+ var R = g.value;
683
+ f.add(R);
684
+ for (var F = typeof ShadowRoot < "u" && R.getRootNode() instanceof ShadowRoot, D = R; D; ) {
685
+ f.add(D);
686
+ var I = D.parentElement, W = [];
687
+ I ? W = I.children : !I && F && (W = D.getRootNode().children, I = D.getRootNode().host, F = typeof ShadowRoot < "u" && I.getRootNode() instanceof ShadowRoot);
688
+ var Y = ut(W), U;
689
+ try {
690
+ for (Y.s(); !(U = Y.n()).done; ) {
691
+ var oe = U.value;
692
+ b.add(oe);
693
+ }
694
+ } catch (te) {
695
+ Y.e(te);
696
+ } finally {
697
+ Y.f();
698
+ }
699
+ D = I;
700
+ }
701
+ }
702
+ } catch (te) {
703
+ x.e(te);
704
+ } finally {
705
+ x.f();
706
+ }
707
+ f.forEach(function(te) {
708
+ b.delete(te);
709
+ }), o.adjacentElements = b;
710
+ }, w = function() {
711
+ if (o.active)
712
+ return a.removeEventListener("focusin", C, !0), a.removeEventListener("mousedown", S, !0), a.removeEventListener("touchstart", S, !0), a.removeEventListener("click", B, !0), a.removeEventListener("keydown", P, !0), a.removeEventListener("keydown", L), l;
713
+ }, E = function(c) {
714
+ var f = c.some(function(b) {
715
+ var x = Array.from(b.removedNodes);
716
+ return x.some(function(g) {
717
+ return g === o.mostRecentlyFocusedNode;
718
+ });
719
+ });
720
+ f && h(v());
721
+ }, V = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(E) : void 0, _ = function() {
722
+ V && (V.disconnect(), o.active && !o.paused && o.containers.map(function(c) {
723
+ V.observe(c, {
724
+ subtree: !0,
725
+ childList: !0
726
+ });
727
+ }));
728
+ };
729
+ return l = {
730
+ get active() {
731
+ return o.active;
732
+ },
733
+ get paused() {
734
+ return o.paused;
735
+ },
736
+ activate: function(c) {
737
+ if (o.active)
738
+ return this;
739
+ var f = s(c, "onActivate"), b = s(c, "onPostActivate"), x = s(c, "checkCanFocusTrap"), g = Q.getActiveTrap(r), R = !1;
740
+ if (g && !g.paused) {
741
+ var F;
742
+ (F = g._setSubtreeIsolation) === null || F === void 0 || F.call(g, !1), R = !0;
743
+ }
744
+ try {
745
+ x || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = p(a), f?.();
746
+ var D = function() {
747
+ x && m(), N(), _(), i.isolateSubtrees && l._setSubtreeIsolation(!0), b?.();
748
+ };
749
+ if (x)
750
+ return x(o.containers.concat()).then(D, D), this;
751
+ D();
752
+ } catch (W) {
753
+ if (g === Q.getActiveTrap(r) && R) {
754
+ var I;
755
+ (I = g._setSubtreeIsolation) === null || I === void 0 || I.call(g, !0);
756
+ }
757
+ throw W;
758
+ }
759
+ return this;
760
+ },
761
+ deactivate: function(c) {
762
+ if (!o.active)
763
+ return this;
764
+ var f = ft({
765
+ onDeactivate: i.onDeactivate,
766
+ onPostDeactivate: i.onPostDeactivate,
767
+ checkCanReturnFocus: i.checkCanReturnFocus
768
+ }, c);
769
+ clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, o.paused || l._setSubtreeIsolation(!1), o.alreadySilent.clear(), w(), o.active = !1, o.paused = !1, _(), Q.deactivateTrap(r, l);
770
+ var b = s(f, "onDeactivate"), x = s(f, "onPostDeactivate"), g = s(f, "checkCanReturnFocus"), R = s(f, "returnFocus", "returnFocusOnDeactivate");
771
+ b?.();
772
+ var F = function() {
773
+ vt(function() {
774
+ R && h(T(o.nodeFocusedBeforeActivation)), x?.();
775
+ });
776
+ };
777
+ return R && g ? (g(T(o.nodeFocusedBeforeActivation)).then(F, F), this) : (F(), this);
778
+ },
779
+ pause: function(c) {
780
+ return o.active ? (o.manuallyPaused = !0, this._setPausedState(!0, c)) : this;
781
+ },
782
+ unpause: function(c) {
783
+ return o.active ? (o.manuallyPaused = !1, r[r.length - 1] !== this ? this : this._setPausedState(!1, c)) : this;
784
+ },
785
+ updateContainerElements: function(c) {
786
+ var f = [].concat(c).filter(Boolean);
787
+ return o.containers = f.map(function(b) {
788
+ return typeof b == "string" ? a.querySelector(b) : b;
789
+ }), i.isolateSubtrees && y(o.containers), o.active && (m(), i.isolateSubtrees && !o.paused && l._setSubtreeIsolation(!0)), _(), this;
790
+ }
791
+ }, Object.defineProperties(l, {
792
+ _isManuallyPaused: {
793
+ value: function() {
794
+ return o.manuallyPaused;
795
+ }
796
+ },
797
+ _setPausedState: {
798
+ value: function(c, f) {
799
+ if (o.paused === c)
800
+ return this;
801
+ if (o.paused = c, c) {
802
+ var b = s(f, "onPause"), x = s(f, "onPostPause");
803
+ b?.(), w(), _(), l._setSubtreeIsolation(!1), x?.();
804
+ } else {
805
+ var g = s(f, "onUnpause"), R = s(f, "onPostUnpause");
806
+ g?.(), l._setSubtreeIsolation(!0), m(), N(), _(), R?.();
807
+ }
808
+ return this;
809
+ }
810
+ },
811
+ _setSubtreeIsolation: {
812
+ value: function(c) {
813
+ i.isolateSubtrees && o.adjacentElements.forEach(function(f) {
814
+ var b;
815
+ c ? i.isolateSubtrees === "aria-hidden" ? ((f.ariaHidden === "true" || ((b = f.getAttribute("aria-hidden")) === null || b === void 0 ? void 0 : b.toLowerCase()) === "true") && o.alreadySilent.add(f), f.setAttribute("aria-hidden", "true")) : ((f.inert || f.hasAttribute("inert")) && o.alreadySilent.add(f), f.setAttribute("inert", !0)) : o.alreadySilent.has(f) || (i.isolateSubtrees === "aria-hidden" ? f.removeAttribute("aria-hidden") : f.removeAttribute("inert"));
816
+ });
817
+ }
818
+ }
819
+ }), l.updateContainerElements(e), l;
820
+ };
821
+ const Yn = {
822
+ escapeDeactivates: {
823
+ type: Boolean,
824
+ default: !0
825
+ },
826
+ returnFocusOnDeactivate: {
827
+ type: Boolean,
828
+ default: !0
829
+ },
830
+ allowOutsideClick: {
831
+ type: [Boolean, Function],
832
+ default: !0
833
+ },
834
+ clickOutsideDeactivates: [Boolean, Function],
835
+ initialFocus: [String, Function, Boolean],
836
+ fallbackFocus: [String, Function],
837
+ checkCanFocusTrap: Function,
838
+ checkCanReturnFocus: Function,
839
+ delayInitialFocus: {
840
+ type: Boolean,
841
+ default: !0
842
+ },
843
+ document: Object,
844
+ preventScroll: Boolean,
845
+ setReturnFocus: [Object, String, Boolean, Function],
846
+ tabbableOptions: Object
847
+ }, Zn = fe({
848
+ props: Object.assign({
849
+ active: {
850
+ // TODO: could be options for activate but what about the options for deactivating?
851
+ type: Boolean,
852
+ default: !0
853
+ }
854
+ }, Yn),
855
+ emits: [
856
+ "update:active",
857
+ "activate",
858
+ "postActivate",
859
+ "deactivate",
860
+ "postDeactivate"
861
+ ],
862
+ render() {
863
+ return this.renderImpl();
864
+ },
865
+ setup(t, { slots: e, emit: n }) {
866
+ let a;
867
+ const r = j(null), i = M(() => {
868
+ const l = r.value;
869
+ return l && (l instanceof HTMLElement ? l : l.$el);
870
+ });
871
+ function o() {
872
+ return a || (a = Gn(i.value, {
873
+ escapeDeactivates: t.escapeDeactivates,
874
+ allowOutsideClick: t.allowOutsideClick,
875
+ returnFocusOnDeactivate: t.returnFocusOnDeactivate,
876
+ clickOutsideDeactivates: t.clickOutsideDeactivates,
877
+ onActivate: () => {
878
+ n("update:active", !0), n("activate");
879
+ },
880
+ onDeactivate: () => {
881
+ n("update:active", !1), n("deactivate");
882
+ },
883
+ onPostActivate: () => n("postActivate"),
884
+ onPostDeactivate: () => n("postDeactivate"),
885
+ initialFocus: t.initialFocus,
886
+ fallbackFocus: t.fallbackFocus,
887
+ tabbableOptions: t.tabbableOptions,
888
+ delayInitialFocus: t.delayInitialFocus
889
+ }));
890
+ }
891
+ return Ft(() => {
892
+ le(() => t.active, (l) => {
893
+ l && i.value ? o().activate() : a && (a.deactivate(), (!i.value || i.value.nodeType === Node.COMMENT_NODE) && (a = null));
894
+ }, { immediate: !0, flush: "post" });
895
+ }), Rt(() => {
896
+ a && a.deactivate(), a = null;
897
+ }), {
898
+ activate() {
899
+ o().activate();
900
+ },
901
+ deactivate() {
902
+ a && a.deactivate();
903
+ },
904
+ renderImpl() {
905
+ if (!e.default)
906
+ return null;
907
+ const l = e.default().filter((u) => u.type !== Gt);
908
+ return !l || !l.length || l.length > 1 ? (console.error("[focus-trap-vue]: FocusTrap requires exactly one child."), l) : Yt(l[0], { ref: r });
909
+ }
910
+ };
911
+ }
912
+ }), Le = Math.min, se = Math.max, Me = Math.round, Ae = Math.floor, Z = (t) => ({
913
+ x: t,
914
+ y: t
915
+ }), Jn = {
916
+ left: "right",
917
+ right: "left",
918
+ bottom: "top",
919
+ top: "bottom"
920
+ };
921
+ function pt(t, e, n) {
922
+ return se(t, Le(e, n));
923
+ }
924
+ function je(t, e) {
925
+ return typeof t == "function" ? t(e) : t;
926
+ }
927
+ function ue(t) {
928
+ return t.split("-")[0];
929
+ }
930
+ function ze(t) {
931
+ return t.split("-")[1];
932
+ }
933
+ function Lt(t) {
934
+ return t === "x" ? "y" : "x";
935
+ }
936
+ function Mt(t) {
937
+ return t === "y" ? "height" : "width";
938
+ }
939
+ function ne(t) {
940
+ const e = t[0];
941
+ return e === "t" || e === "b" ? "y" : "x";
942
+ }
943
+ function _t(t) {
944
+ return Lt(ne(t));
945
+ }
946
+ function Qn(t, e, n) {
947
+ n === void 0 && (n = !1);
948
+ const a = ze(t), r = _t(t), i = Mt(r);
949
+ let o = r === "x" ? a === (n ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top";
950
+ return e.reference[i] > e.floating[i] && (o = _e(o)), [o, _e(o)];
951
+ }
952
+ function ea(t) {
953
+ const e = _e(t);
954
+ return [tt(t), e, tt(e)];
955
+ }
956
+ function tt(t) {
957
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
958
+ }
959
+ const mt = ["left", "right"], ht = ["right", "left"], ta = ["top", "bottom"], na = ["bottom", "top"];
960
+ function aa(t, e, n) {
961
+ switch (t) {
962
+ case "top":
963
+ case "bottom":
964
+ return n ? e ? ht : mt : e ? mt : ht;
965
+ case "left":
966
+ case "right":
967
+ return e ? ta : na;
968
+ default:
969
+ return [];
970
+ }
971
+ }
972
+ function oa(t, e, n, a) {
973
+ const r = ze(t);
974
+ let i = aa(ue(t), n === "start", a);
975
+ return r && (i = i.map((o) => o + "-" + r), e && (i = i.concat(i.map(tt)))), i;
976
+ }
977
+ function _e(t) {
978
+ const e = ue(t);
979
+ return Jn[e] + t.slice(e.length);
980
+ }
981
+ function ra(t) {
982
+ return {
983
+ top: 0,
984
+ right: 0,
985
+ bottom: 0,
986
+ left: 0,
987
+ ...t
988
+ };
989
+ }
990
+ function ia(t) {
991
+ return typeof t != "number" ? ra(t) : {
992
+ top: t,
993
+ right: t,
994
+ bottom: t,
995
+ left: t
996
+ };
997
+ }
998
+ function $e(t) {
999
+ const {
1000
+ x: e,
1001
+ y: n,
1002
+ width: a,
1003
+ height: r
1004
+ } = t;
1005
+ return {
1006
+ width: a,
1007
+ height: r,
1008
+ top: n,
1009
+ left: e,
1010
+ right: e + a,
1011
+ bottom: n + r,
1012
+ x: e,
1013
+ y: n
1014
+ };
1015
+ }
1016
+ function bt(t, e, n) {
1017
+ let {
1018
+ reference: a,
1019
+ floating: r
1020
+ } = t;
1021
+ const i = ne(e), o = _t(e), l = Mt(o), s = ue(e), u = i === "y", d = a.x + a.width / 2 - r.width / 2, v = a.y + a.height / 2 - r.height / 2, m = a[l] / 2 - r[l] / 2;
1022
+ let p;
1023
+ switch (s) {
1024
+ case "top":
1025
+ p = {
1026
+ x: d,
1027
+ y: a.y - r.height
1028
+ };
1029
+ break;
1030
+ case "bottom":
1031
+ p = {
1032
+ x: d,
1033
+ y: a.y + a.height
1034
+ };
1035
+ break;
1036
+ case "right":
1037
+ p = {
1038
+ x: a.x + a.width,
1039
+ y: v
1040
+ };
1041
+ break;
1042
+ case "left":
1043
+ p = {
1044
+ x: a.x - r.width,
1045
+ y: v
1046
+ };
1047
+ break;
1048
+ default:
1049
+ p = {
1050
+ x: a.x,
1051
+ y: a.y
1052
+ };
1053
+ }
1054
+ switch (ze(e)) {
1055
+ case "start":
1056
+ p[o] -= m * (n && u ? -1 : 1);
1057
+ break;
1058
+ case "end":
1059
+ p[o] += m * (n && u ? -1 : 1);
1060
+ break;
1061
+ }
1062
+ return p;
1063
+ }
1064
+ async function la(t, e) {
1065
+ var n;
1066
+ e === void 0 && (e = {});
1067
+ const {
1068
+ x: a,
1069
+ y: r,
1070
+ platform: i,
1071
+ rects: o,
1072
+ elements: l,
1073
+ strategy: s
1074
+ } = t, {
1075
+ boundary: u = "clippingAncestors",
1076
+ rootBoundary: d = "viewport",
1077
+ elementContext: v = "floating",
1078
+ altBoundary: m = !1,
1079
+ padding: p = 0
1080
+ } = je(e, t), h = ia(p), A = l[m ? v === "floating" ? "reference" : "floating" : v], S = $e(await i.getClippingRect({
1081
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(A))) == null || n ? A : A.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
1082
+ boundary: u,
1083
+ rootBoundary: d,
1084
+ strategy: s
1085
+ })), C = v === "floating" ? {
1086
+ x: a,
1087
+ y: r,
1088
+ width: o.floating.width,
1089
+ height: o.floating.height
1090
+ } : o.reference, O = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), P = await (i.isElement == null ? void 0 : i.isElement(O)) ? await (i.getScale == null ? void 0 : i.getScale(O)) || {
1091
+ x: 1,
1092
+ y: 1
1093
+ } : {
1094
+ x: 1,
1095
+ y: 1
1096
+ }, L = $e(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1097
+ elements: l,
1098
+ rect: C,
1099
+ offsetParent: O,
1100
+ strategy: s
1101
+ }) : C);
1102
+ return {
1103
+ top: (S.top - L.top + h.top) / P.y,
1104
+ bottom: (L.bottom - S.bottom + h.bottom) / P.y,
1105
+ left: (S.left - L.left + h.left) / P.x,
1106
+ right: (L.right - S.right + h.right) / P.x
1107
+ };
1108
+ }
1109
+ const sa = 50, ca = async (t, e, n) => {
1110
+ const {
1111
+ placement: a = "bottom",
1112
+ strategy: r = "absolute",
1113
+ middleware: i = [],
1114
+ platform: o
1115
+ } = n, l = o.detectOverflow ? o : {
1116
+ ...o,
1117
+ detectOverflow: la
1118
+ }, s = await (o.isRTL == null ? void 0 : o.isRTL(e));
1119
+ let u = await o.getElementRects({
1120
+ reference: t,
1121
+ floating: e,
1122
+ strategy: r
1123
+ }), {
1124
+ x: d,
1125
+ y: v
1126
+ } = bt(u, a, s), m = a, p = 0;
1127
+ const h = {};
1128
+ for (let T = 0; T < i.length; T++) {
1129
+ const A = i[T];
1130
+ if (!A)
1131
+ continue;
1132
+ const {
1133
+ name: S,
1134
+ fn: C
1135
+ } = A, {
1136
+ x: O,
1137
+ y: P,
1138
+ data: L,
1139
+ reset: B
1140
+ } = await C({
1141
+ x: d,
1142
+ y: v,
1143
+ initialPlacement: a,
1144
+ placement: m,
1145
+ strategy: r,
1146
+ middlewareData: h,
1147
+ rects: u,
1148
+ platform: l,
1149
+ elements: {
1150
+ reference: t,
1151
+ floating: e
1152
+ }
1153
+ });
1154
+ d = O ?? d, v = P ?? v, h[S] = {
1155
+ ...h[S],
1156
+ ...L
1157
+ }, B && p < sa && (p++, typeof B == "object" && (B.placement && (m = B.placement), B.rects && (u = B.rects === !0 ? await o.getElementRects({
1158
+ reference: t,
1159
+ floating: e,
1160
+ strategy: r
1161
+ }) : B.rects), {
1162
+ x: d,
1163
+ y: v
1164
+ } = bt(u, m, s)), T = -1);
1165
+ }
1166
+ return {
1167
+ x: d,
1168
+ y: v,
1169
+ placement: m,
1170
+ strategy: r,
1171
+ middlewareData: h
1172
+ };
1173
+ }, ua = function(t) {
1174
+ return t === void 0 && (t = {}), {
1175
+ name: "flip",
1176
+ options: t,
1177
+ async fn(e) {
1178
+ var n, a;
1179
+ const {
1180
+ placement: r,
1181
+ middlewareData: i,
1182
+ rects: o,
1183
+ initialPlacement: l,
1184
+ platform: s,
1185
+ elements: u
1186
+ } = e, {
1187
+ mainAxis: d = !0,
1188
+ crossAxis: v = !0,
1189
+ fallbackPlacements: m,
1190
+ fallbackStrategy: p = "bestFit",
1191
+ fallbackAxisSideDirection: h = "none",
1192
+ flipAlignment: T = !0,
1193
+ ...A
1194
+ } = je(t, e);
1195
+ if ((n = i.arrow) != null && n.alignmentOffset)
1196
+ return {};
1197
+ const S = ue(r), C = ne(l), O = ue(l) === l, P = await (s.isRTL == null ? void 0 : s.isRTL(u.floating)), L = m || (O || !T ? [_e(l)] : ea(l)), B = h !== "none";
1198
+ !m && B && L.push(...oa(l, T, h, P));
1199
+ const N = [l, ...L], y = await s.detectOverflow(e, A), w = [];
1200
+ let E = ((a = i.flip) == null ? void 0 : a.overflows) || [];
1201
+ if (d && w.push(y[S]), v) {
1202
+ const c = Qn(r, o, P);
1203
+ w.push(y[c[0]], y[c[1]]);
1204
+ }
1205
+ if (E = [...E, {
1206
+ placement: r,
1207
+ overflows: w
1208
+ }], !w.every((c) => c <= 0)) {
1209
+ var V, _;
1210
+ const c = (((V = i.flip) == null ? void 0 : V.index) || 0) + 1, f = N[c];
1211
+ if (f && (!(v === "alignment" ? C !== ne(f) : !1) || // We leave the current main axis only if every placement on that axis
1212
+ // overflows the main axis.
1213
+ E.every((g) => ne(g.placement) === C ? g.overflows[0] > 0 : !0)))
1214
+ return {
1215
+ data: {
1216
+ index: c,
1217
+ overflows: E
1218
+ },
1219
+ reset: {
1220
+ placement: f
1221
+ }
1222
+ };
1223
+ let b = (_ = E.filter((x) => x.overflows[0] <= 0).sort((x, g) => x.overflows[1] - g.overflows[1])[0]) == null ? void 0 : _.placement;
1224
+ if (!b)
1225
+ switch (p) {
1226
+ case "bestFit": {
1227
+ var k;
1228
+ const x = (k = E.filter((g) => {
1229
+ if (B) {
1230
+ const R = ne(g.placement);
1231
+ return R === C || // Create a bias to the `y` side axis due to horizontal
1232
+ // reading directions favoring greater width.
1233
+ R === "y";
1234
+ }
1235
+ return !0;
1236
+ }).map((g) => [g.placement, g.overflows.filter((R) => R > 0).reduce((R, F) => R + F, 0)]).sort((g, R) => g[1] - R[1])[0]) == null ? void 0 : k[0];
1237
+ x && (b = x);
1238
+ break;
1239
+ }
1240
+ case "initialPlacement":
1241
+ b = l;
1242
+ break;
1243
+ }
1244
+ if (r !== b)
1245
+ return {
1246
+ reset: {
1247
+ placement: b
1248
+ }
1249
+ };
1250
+ }
1251
+ return {};
1252
+ }
1253
+ };
1254
+ }, da = /* @__PURE__ */ new Set(["left", "top"]);
1255
+ async function fa(t, e) {
1256
+ const {
1257
+ placement: n,
1258
+ platform: a,
1259
+ elements: r
1260
+ } = t, i = await (a.isRTL == null ? void 0 : a.isRTL(r.floating)), o = ue(n), l = ze(n), s = ne(n) === "y", u = da.has(o) ? -1 : 1, d = i && s ? -1 : 1, v = je(e, t);
1261
+ let {
1262
+ mainAxis: m,
1263
+ crossAxis: p,
1264
+ alignmentAxis: h
1265
+ } = typeof v == "number" ? {
1266
+ mainAxis: v,
1267
+ crossAxis: 0,
1268
+ alignmentAxis: null
1269
+ } : {
1270
+ mainAxis: v.mainAxis || 0,
1271
+ crossAxis: v.crossAxis || 0,
1272
+ alignmentAxis: v.alignmentAxis
1273
+ };
1274
+ return l && typeof h == "number" && (p = l === "end" ? h * -1 : h), s ? {
1275
+ x: p * d,
1276
+ y: m * u
1277
+ } : {
1278
+ x: m * u,
1279
+ y: p * d
1280
+ };
1281
+ }
1282
+ const va = function(t) {
1283
+ return t === void 0 && (t = 0), {
1284
+ name: "offset",
1285
+ options: t,
1286
+ async fn(e) {
1287
+ var n, a;
1288
+ const {
1289
+ x: r,
1290
+ y: i,
1291
+ placement: o,
1292
+ middlewareData: l
1293
+ } = e, s = await fa(e, t);
1294
+ return o === ((n = l.offset) == null ? void 0 : n.placement) && (a = l.arrow) != null && a.alignmentOffset ? {} : {
1295
+ x: r + s.x,
1296
+ y: i + s.y,
1297
+ data: {
1298
+ ...s,
1299
+ placement: o
1300
+ }
1301
+ };
1302
+ }
1303
+ };
1304
+ }, pa = function(t) {
1305
+ return t === void 0 && (t = {}), {
1306
+ name: "shift",
1307
+ options: t,
1308
+ async fn(e) {
1309
+ const {
1310
+ x: n,
1311
+ y: a,
1312
+ placement: r,
1313
+ platform: i
1314
+ } = e, {
1315
+ mainAxis: o = !0,
1316
+ crossAxis: l = !1,
1317
+ limiter: s = {
1318
+ fn: (S) => {
1319
+ let {
1320
+ x: C,
1321
+ y: O
1322
+ } = S;
1323
+ return {
1324
+ x: C,
1325
+ y: O
1326
+ };
1327
+ }
1328
+ },
1329
+ ...u
1330
+ } = je(t, e), d = {
1331
+ x: n,
1332
+ y: a
1333
+ }, v = await i.detectOverflow(e, u), m = ne(ue(r)), p = Lt(m);
1334
+ let h = d[p], T = d[m];
1335
+ if (o) {
1336
+ const S = p === "y" ? "top" : "left", C = p === "y" ? "bottom" : "right", O = h + v[S], P = h - v[C];
1337
+ h = pt(O, h, P);
1338
+ }
1339
+ if (l) {
1340
+ const S = m === "y" ? "top" : "left", C = m === "y" ? "bottom" : "right", O = T + v[S], P = T - v[C];
1341
+ T = pt(O, T, P);
1342
+ }
1343
+ const A = s.fn({
1344
+ ...e,
1345
+ [p]: h,
1346
+ [m]: T
1347
+ });
1348
+ return {
1349
+ ...A,
1350
+ data: {
1351
+ x: A.x - n,
1352
+ y: A.y - a,
1353
+ enabled: {
1354
+ [p]: o,
1355
+ [m]: l
1356
+ }
1357
+ }
1358
+ };
1359
+ }
1360
+ };
1361
+ };
1362
+ function We() {
1363
+ return typeof window < "u";
1364
+ }
1365
+ function ve(t) {
1366
+ return ot(t) ? (t.nodeName || "").toLowerCase() : "#document";
1367
+ }
1368
+ function K(t) {
1369
+ var e;
1370
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
1371
+ }
1372
+ function J(t) {
1373
+ var e;
1374
+ return (e = (ot(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1375
+ }
1376
+ function ot(t) {
1377
+ return We() ? t instanceof Node || t instanceof K(t).Node : !1;
1378
+ }
1379
+ function X(t) {
1380
+ return We() ? t instanceof Element || t instanceof K(t).Element : !1;
1381
+ }
1382
+ function ee(t) {
1383
+ return We() ? t instanceof HTMLElement || t instanceof K(t).HTMLElement : !1;
1384
+ }
1385
+ function yt(t) {
1386
+ return !We() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof K(t).ShadowRoot;
1387
+ }
1388
+ function Fe(t) {
1389
+ const {
1390
+ overflow: e,
1391
+ overflowX: n,
1392
+ overflowY: a,
1393
+ display: r
1394
+ } = G(t);
1395
+ return /auto|scroll|overlay|hidden|clip/.test(e + a + n) && r !== "inline" && r !== "contents";
1396
+ }
1397
+ function ma(t) {
1398
+ return /^(table|td|th)$/.test(ve(t));
1399
+ }
1400
+ function He(t) {
1401
+ try {
1402
+ if (t.matches(":popover-open"))
1403
+ return !0;
1404
+ } catch {
1405
+ }
1406
+ try {
1407
+ return t.matches(":modal");
1408
+ } catch {
1409
+ return !1;
1410
+ }
1411
+ }
1412
+ const ha = /transform|translate|scale|rotate|perspective|filter/, ba = /paint|layout|strict|content/, re = (t) => !!t && t !== "none";
1413
+ let Ye;
1414
+ function rt(t) {
1415
+ const e = X(t) ? G(t) : t;
1416
+ return re(e.transform) || re(e.translate) || re(e.scale) || re(e.rotate) || re(e.perspective) || !it() && (re(e.backdropFilter) || re(e.filter)) || ha.test(e.willChange || "") || ba.test(e.contain || "");
1417
+ }
1418
+ function ya(t) {
1419
+ let e = ae(t);
1420
+ for (; ee(e) && !ye(e); ) {
1421
+ if (rt(e))
1422
+ return e;
1423
+ if (He(e))
1424
+ return null;
1425
+ e = ae(e);
1426
+ }
1427
+ return null;
1428
+ }
1429
+ function it() {
1430
+ return Ye == null && (Ye = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ye;
1431
+ }
1432
+ function ye(t) {
1433
+ return /^(html|body|#document)$/.test(ve(t));
1434
+ }
1435
+ function G(t) {
1436
+ return K(t).getComputedStyle(t);
1437
+ }
1438
+ function Ke(t) {
1439
+ return X(t) ? {
1440
+ scrollLeft: t.scrollLeft,
1441
+ scrollTop: t.scrollTop
1442
+ } : {
1443
+ scrollLeft: t.scrollX,
1444
+ scrollTop: t.scrollY
1445
+ };
1446
+ }
1447
+ function ae(t) {
1448
+ if (ve(t) === "html")
1449
+ return t;
1450
+ const e = (
1451
+ // Step into the shadow DOM of the parent of a slotted node.
1452
+ t.assignedSlot || // DOM Element detected.
1453
+ t.parentNode || // ShadowRoot detected.
1454
+ yt(t) && t.host || // Fallback.
1455
+ J(t)
1456
+ );
1457
+ return yt(e) ? e.host : e;
1458
+ }
1459
+ function $t(t) {
1460
+ const e = ae(t);
1461
+ return ye(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : ee(e) && Fe(e) ? e : $t(e);
1462
+ }
1463
+ function Ee(t, e, n) {
1464
+ var a;
1465
+ e === void 0 && (e = []), n === void 0 && (n = !0);
1466
+ const r = $t(t), i = r === ((a = t.ownerDocument) == null ? void 0 : a.body), o = K(r);
1467
+ if (i) {
1468
+ const l = nt(o);
1469
+ return e.concat(o, o.visualViewport || [], Fe(r) ? r : [], l && n ? Ee(l) : []);
1470
+ } else
1471
+ return e.concat(r, Ee(r, [], n));
1472
+ }
1473
+ function nt(t) {
1474
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1475
+ }
1476
+ function jt(t) {
1477
+ const e = G(t);
1478
+ let n = parseFloat(e.width) || 0, a = parseFloat(e.height) || 0;
1479
+ const r = ee(t), i = r ? t.offsetWidth : n, o = r ? t.offsetHeight : a, l = Me(n) !== i || Me(a) !== o;
1480
+ return l && (n = i, a = o), {
1481
+ width: n,
1482
+ height: a,
1483
+ $: l
1484
+ };
1485
+ }
1486
+ function lt(t) {
1487
+ return X(t) ? t : t.contextElement;
1488
+ }
1489
+ function he(t) {
1490
+ const e = lt(t);
1491
+ if (!ee(e))
1492
+ return Z(1);
1493
+ const n = e.getBoundingClientRect(), {
1494
+ width: a,
1495
+ height: r,
1496
+ $: i
1497
+ } = jt(e);
1498
+ let o = (i ? Me(n.width) : n.width) / a, l = (i ? Me(n.height) : n.height) / r;
1499
+ return (!o || !Number.isFinite(o)) && (o = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1500
+ x: o,
1501
+ y: l
1502
+ };
1503
+ }
1504
+ const ga = /* @__PURE__ */ Z(0);
1505
+ function zt(t) {
1506
+ const e = K(t);
1507
+ return !it() || !e.visualViewport ? ga : {
1508
+ x: e.visualViewport.offsetLeft,
1509
+ y: e.visualViewport.offsetTop
1510
+ };
1511
+ }
1512
+ function wa(t, e, n) {
1513
+ return e === void 0 && (e = !1), !n || e && n !== K(t) ? !1 : e;
1514
+ }
1515
+ function de(t, e, n, a) {
1516
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
1517
+ const r = t.getBoundingClientRect(), i = lt(t);
1518
+ let o = Z(1);
1519
+ e && (a ? X(a) && (o = he(a)) : o = he(t));
1520
+ const l = wa(i, n, a) ? zt(i) : Z(0);
1521
+ let s = (r.left + l.x) / o.x, u = (r.top + l.y) / o.y, d = r.width / o.x, v = r.height / o.y;
1522
+ if (i) {
1523
+ const m = K(i), p = a && X(a) ? K(a) : a;
1524
+ let h = m, T = nt(h);
1525
+ for (; T && a && p !== h; ) {
1526
+ const A = he(T), S = T.getBoundingClientRect(), C = G(T), O = S.left + (T.clientLeft + parseFloat(C.paddingLeft)) * A.x, P = S.top + (T.clientTop + parseFloat(C.paddingTop)) * A.y;
1527
+ s *= A.x, u *= A.y, d *= A.x, v *= A.y, s += O, u += P, h = K(T), T = nt(h);
1528
+ }
1529
+ }
1530
+ return $e({
1531
+ width: d,
1532
+ height: v,
1533
+ x: s,
1534
+ y: u
1535
+ });
1536
+ }
1537
+ function Ue(t, e) {
1538
+ const n = Ke(t).scrollLeft;
1539
+ return e ? e.left + n : de(J(t)).left + n;
1540
+ }
1541
+ function Wt(t, e) {
1542
+ const n = t.getBoundingClientRect(), a = n.left + e.scrollLeft - Ue(t, n), r = n.top + e.scrollTop;
1543
+ return {
1544
+ x: a,
1545
+ y: r
1546
+ };
1547
+ }
1548
+ function Ta(t) {
1549
+ let {
1550
+ elements: e,
1551
+ rect: n,
1552
+ offsetParent: a,
1553
+ strategy: r
1554
+ } = t;
1555
+ const i = r === "fixed", o = J(a), l = e ? He(e.floating) : !1;
1556
+ if (a === o || l && i)
1557
+ return n;
1558
+ let s = {
1559
+ scrollLeft: 0,
1560
+ scrollTop: 0
1561
+ }, u = Z(1);
1562
+ const d = Z(0), v = ee(a);
1563
+ if ((v || !v && !i) && ((ve(a) !== "body" || Fe(o)) && (s = Ke(a)), v)) {
1564
+ const p = de(a);
1565
+ u = he(a), d.x = p.x + a.clientLeft, d.y = p.y + a.clientTop;
1566
+ }
1567
+ const m = o && !v && !i ? Wt(o, s) : Z(0);
1568
+ return {
1569
+ width: n.width * u.x,
1570
+ height: n.height * u.y,
1571
+ x: n.x * u.x - s.scrollLeft * u.x + d.x + m.x,
1572
+ y: n.y * u.y - s.scrollTop * u.y + d.y + m.y
1573
+ };
1574
+ }
1575
+ function xa(t) {
1576
+ return Array.from(t.getClientRects());
1577
+ }
1578
+ function Sa(t) {
1579
+ const e = J(t), n = Ke(t), a = t.ownerDocument.body, r = se(e.scrollWidth, e.clientWidth, a.scrollWidth, a.clientWidth), i = se(e.scrollHeight, e.clientHeight, a.scrollHeight, a.clientHeight);
1580
+ let o = -n.scrollLeft + Ue(t);
1581
+ const l = -n.scrollTop;
1582
+ return G(a).direction === "rtl" && (o += se(e.clientWidth, a.clientWidth) - r), {
1583
+ width: r,
1584
+ height: i,
1585
+ x: o,
1586
+ y: l
1587
+ };
1588
+ }
1589
+ const gt = 25;
1590
+ function Ea(t, e) {
1591
+ const n = K(t), a = J(t), r = n.visualViewport;
1592
+ let i = a.clientWidth, o = a.clientHeight, l = 0, s = 0;
1593
+ if (r) {
1594
+ i = r.width, o = r.height;
1595
+ const d = it();
1596
+ (!d || d && e === "fixed") && (l = r.offsetLeft, s = r.offsetTop);
1597
+ }
1598
+ const u = Ue(a);
1599
+ if (u <= 0) {
1600
+ const d = a.ownerDocument, v = d.body, m = getComputedStyle(v), p = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, h = Math.abs(a.clientWidth - v.clientWidth - p);
1601
+ h <= gt && (i -= h);
1602
+ } else u <= gt && (i += u);
1603
+ return {
1604
+ width: i,
1605
+ height: o,
1606
+ x: l,
1607
+ y: s
1608
+ };
1609
+ }
1610
+ function Fa(t, e) {
1611
+ const n = de(t, !0, e === "fixed"), a = n.top + t.clientTop, r = n.left + t.clientLeft, i = ee(t) ? he(t) : Z(1), o = t.clientWidth * i.x, l = t.clientHeight * i.y, s = r * i.x, u = a * i.y;
1612
+ return {
1613
+ width: o,
1614
+ height: l,
1615
+ x: s,
1616
+ y: u
1617
+ };
1618
+ }
1619
+ function wt(t, e, n) {
1620
+ let a;
1621
+ if (e === "viewport")
1622
+ a = Ea(t, n);
1623
+ else if (e === "document")
1624
+ a = Sa(J(t));
1625
+ else if (X(e))
1626
+ a = Fa(e, n);
1627
+ else {
1628
+ const r = zt(t);
1629
+ a = {
1630
+ x: e.x - r.x,
1631
+ y: e.y - r.y,
1632
+ width: e.width,
1633
+ height: e.height
1634
+ };
1635
+ }
1636
+ return $e(a);
1637
+ }
1638
+ function Ht(t, e) {
1639
+ const n = ae(t);
1640
+ return n === e || !X(n) || ye(n) ? !1 : G(n).position === "fixed" || Ht(n, e);
1641
+ }
1642
+ function Ra(t, e) {
1643
+ const n = e.get(t);
1644
+ if (n)
1645
+ return n;
1646
+ let a = Ee(t, [], !1).filter((l) => X(l) && ve(l) !== "body"), r = null;
1647
+ const i = G(t).position === "fixed";
1648
+ let o = i ? ae(t) : t;
1649
+ for (; X(o) && !ye(o); ) {
1650
+ const l = G(o), s = rt(o);
1651
+ !s && l.position === "fixed" && (r = null), (i ? !s && !r : !s && l.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || Fe(o) && !s && Ht(t, o)) ? a = a.filter((d) => d !== o) : r = l, o = ae(o);
1652
+ }
1653
+ return e.set(t, a), a;
1654
+ }
1655
+ function Aa(t) {
1656
+ let {
1657
+ element: e,
1658
+ boundary: n,
1659
+ rootBoundary: a,
1660
+ strategy: r
1661
+ } = t;
1662
+ const o = [...n === "clippingAncestors" ? He(e) ? [] : Ra(e, this._c) : [].concat(n), a], l = wt(e, o[0], r);
1663
+ let s = l.top, u = l.right, d = l.bottom, v = l.left;
1664
+ for (let m = 1; m < o.length; m++) {
1665
+ const p = wt(e, o[m], r);
1666
+ s = se(p.top, s), u = Le(p.right, u), d = Le(p.bottom, d), v = se(p.left, v);
1667
+ }
1668
+ return {
1669
+ width: u - v,
1670
+ height: d - s,
1671
+ x: v,
1672
+ y: s
1673
+ };
1674
+ }
1675
+ function Ca(t) {
1676
+ const {
1677
+ width: e,
1678
+ height: n
1679
+ } = jt(t);
1680
+ return {
1681
+ width: e,
1682
+ height: n
1683
+ };
1684
+ }
1685
+ function ka(t, e, n) {
1686
+ const a = ee(e), r = J(e), i = n === "fixed", o = de(t, !0, i, e);
1687
+ let l = {
1688
+ scrollLeft: 0,
1689
+ scrollTop: 0
1690
+ };
1691
+ const s = Z(0);
1692
+ function u() {
1693
+ s.x = Ue(r);
1694
+ }
1695
+ if (a || !a && !i)
1696
+ if ((ve(e) !== "body" || Fe(r)) && (l = Ke(e)), a) {
1697
+ const p = de(e, !0, i, e);
1698
+ s.x = p.x + e.clientLeft, s.y = p.y + e.clientTop;
1699
+ } else r && u();
1700
+ i && !a && r && u();
1701
+ const d = r && !a && !i ? Wt(r, l) : Z(0), v = o.left + l.scrollLeft - s.x - d.x, m = o.top + l.scrollTop - s.y - d.y;
1702
+ return {
1703
+ x: v,
1704
+ y: m,
1705
+ width: o.width,
1706
+ height: o.height
1707
+ };
1708
+ }
1709
+ function Ze(t) {
1710
+ return G(t).position === "static";
1711
+ }
1712
+ function Tt(t, e) {
1713
+ if (!ee(t) || G(t).position === "fixed")
1714
+ return null;
1715
+ if (e)
1716
+ return e(t);
1717
+ let n = t.offsetParent;
1718
+ return J(t) === n && (n = n.ownerDocument.body), n;
1719
+ }
1720
+ function Kt(t, e) {
1721
+ const n = K(t);
1722
+ if (He(t))
1723
+ return n;
1724
+ if (!ee(t)) {
1725
+ let r = ae(t);
1726
+ for (; r && !ye(r); ) {
1727
+ if (X(r) && !Ze(r))
1728
+ return r;
1729
+ r = ae(r);
1730
+ }
1731
+ return n;
1732
+ }
1733
+ let a = Tt(t, e);
1734
+ for (; a && ma(a) && Ze(a); )
1735
+ a = Tt(a, e);
1736
+ return a && ye(a) && Ze(a) && !rt(a) ? n : a || ya(t) || n;
1737
+ }
1738
+ const Oa = async function(t) {
1739
+ const e = this.getOffsetParent || Kt, n = this.getDimensions, a = await n(t.floating);
1740
+ return {
1741
+ reference: ka(t.reference, await e(t.floating), t.strategy),
1742
+ floating: {
1743
+ x: 0,
1744
+ y: 0,
1745
+ width: a.width,
1746
+ height: a.height
1747
+ }
1748
+ };
1749
+ };
1750
+ function Na(t) {
1751
+ return G(t).direction === "rtl";
1752
+ }
1753
+ const Da = {
1754
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ta,
1755
+ getDocumentElement: J,
1756
+ getClippingRect: Aa,
1757
+ getOffsetParent: Kt,
1758
+ getElementRects: Oa,
1759
+ getClientRects: xa,
1760
+ getDimensions: Ca,
1761
+ getScale: he,
1762
+ isElement: X,
1763
+ isRTL: Na
1764
+ };
1765
+ function Ut(t, e) {
1766
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1767
+ }
1768
+ function Ia(t, e) {
1769
+ let n = null, a;
1770
+ const r = J(t);
1771
+ function i() {
1772
+ var l;
1773
+ clearTimeout(a), (l = n) == null || l.disconnect(), n = null;
1774
+ }
1775
+ function o(l, s) {
1776
+ l === void 0 && (l = !1), s === void 0 && (s = 1), i();
1777
+ const u = t.getBoundingClientRect(), {
1778
+ left: d,
1779
+ top: v,
1780
+ width: m,
1781
+ height: p
1782
+ } = u;
1783
+ if (l || e(), !m || !p)
1784
+ return;
1785
+ const h = Ae(v), T = Ae(r.clientWidth - (d + m)), A = Ae(r.clientHeight - (v + p)), S = Ae(d), O = {
1786
+ rootMargin: -h + "px " + -T + "px " + -A + "px " + -S + "px",
1787
+ threshold: se(0, Le(1, s)) || 1
1788
+ };
1789
+ let P = !0;
1790
+ function L(B) {
1791
+ const N = B[0].intersectionRatio;
1792
+ if (N !== s) {
1793
+ if (!P)
1794
+ return o();
1795
+ N ? o(!1, N) : a = setTimeout(() => {
1796
+ o(!1, 1e-7);
1797
+ }, 1e3);
1798
+ }
1799
+ N === 1 && !Ut(u, t.getBoundingClientRect()) && o(), P = !1;
1800
+ }
1801
+ try {
1802
+ n = new IntersectionObserver(L, {
1803
+ ...O,
1804
+ // Handle <iframe>s
1805
+ root: r.ownerDocument
1806
+ });
1807
+ } catch {
1808
+ n = new IntersectionObserver(L, O);
1809
+ }
1810
+ n.observe(t);
1811
+ }
1812
+ return o(!0), i;
1813
+ }
1814
+ function Pa(t, e, n, a) {
1815
+ a === void 0 && (a = {});
1816
+ const {
1817
+ ancestorScroll: r = !0,
1818
+ ancestorResize: i = !0,
1819
+ elementResize: o = typeof ResizeObserver == "function",
1820
+ layoutShift: l = typeof IntersectionObserver == "function",
1821
+ animationFrame: s = !1
1822
+ } = a, u = lt(t), d = r || i ? [...u ? Ee(u) : [], ...e ? Ee(e) : []] : [];
1823
+ d.forEach((S) => {
1824
+ r && S.addEventListener("scroll", n, {
1825
+ passive: !0
1826
+ }), i && S.addEventListener("resize", n);
1827
+ });
1828
+ const v = u && l ? Ia(u, n) : null;
1829
+ let m = -1, p = null;
1830
+ o && (p = new ResizeObserver((S) => {
1831
+ let [C] = S;
1832
+ C && C.target === u && p && e && (p.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1833
+ var O;
1834
+ (O = p) == null || O.observe(e);
1835
+ })), n();
1836
+ }), u && !s && p.observe(u), e && p.observe(e));
1837
+ let h, T = s ? de(t) : null;
1838
+ s && A();
1839
+ function A() {
1840
+ const S = de(t);
1841
+ T && !Ut(T, S) && n(), T = S, h = requestAnimationFrame(A);
1842
+ }
1843
+ return n(), () => {
1844
+ var S;
1845
+ d.forEach((C) => {
1846
+ r && C.removeEventListener("scroll", n), i && C.removeEventListener("resize", n);
1847
+ }), v?.(), (S = p) == null || S.disconnect(), p = null, s && cancelAnimationFrame(h);
1848
+ };
1849
+ }
1850
+ const Va = va, Ba = pa, La = ua, Ma = (t, e, n) => {
1851
+ const a = /* @__PURE__ */ new Map(), r = {
1852
+ platform: Da,
1853
+ ...n
1854
+ }, i = {
1855
+ ...r.platform,
1856
+ _c: a
1857
+ };
1858
+ return ca(t, e, {
1859
+ ...r,
1860
+ platform: i
1861
+ });
1862
+ };
1863
+ function _a(t) {
1864
+ return t != null && typeof t == "object" && "$el" in t;
1865
+ }
1866
+ function xt(t) {
1867
+ if (_a(t)) {
1868
+ const e = t.$el;
1869
+ return ot(e) && ve(e) === "#comment" ? null : e;
1870
+ }
1871
+ return t;
1872
+ }
1873
+ function Te(t) {
1874
+ return typeof t == "function" ? t() : q(t);
1875
+ }
1876
+ function qt(t) {
1877
+ return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1878
+ }
1879
+ function St(t, e) {
1880
+ const n = qt(t);
1881
+ return Math.round(e * n) / n;
1882
+ }
1883
+ function $a(t, e, n) {
1884
+ n === void 0 && (n = {});
1885
+ const a = n.whileElementsMounted, r = M(() => {
1886
+ var N;
1887
+ return (N = Te(n.open)) != null ? N : !0;
1888
+ }), i = M(() => Te(n.middleware)), o = M(() => {
1889
+ var N;
1890
+ return (N = Te(n.placement)) != null ? N : "bottom";
1891
+ }), l = M(() => {
1892
+ var N;
1893
+ return (N = Te(n.strategy)) != null ? N : "absolute";
1894
+ }), s = M(() => {
1895
+ var N;
1896
+ return (N = Te(n.transform)) != null ? N : !0;
1897
+ }), u = M(() => xt(t.value)), d = M(() => xt(e.value)), v = j(0), m = j(0), p = j(l.value), h = j(o.value), T = Zt({}), A = j(!1), S = M(() => {
1898
+ const N = {
1899
+ position: p.value,
1900
+ left: "0",
1901
+ top: "0"
1902
+ };
1903
+ if (!d.value)
1904
+ return N;
1905
+ const y = St(d.value, v.value), w = St(d.value, m.value);
1906
+ return s.value ? {
1907
+ ...N,
1908
+ transform: "translate(" + y + "px, " + w + "px)",
1909
+ ...qt(d.value) >= 1.5 && {
1910
+ willChange: "transform"
1911
+ }
1912
+ } : {
1913
+ position: p.value,
1914
+ left: y + "px",
1915
+ top: w + "px"
1916
+ };
1917
+ });
1918
+ let C;
1919
+ function O() {
1920
+ if (u.value == null || d.value == null)
1921
+ return;
1922
+ const N = r.value;
1923
+ Ma(u.value, d.value, {
1924
+ middleware: i.value,
1925
+ placement: o.value,
1926
+ strategy: l.value
1927
+ }).then((y) => {
1928
+ v.value = y.x, m.value = y.y, p.value = y.strategy, h.value = y.placement, T.value = y.middlewareData, A.value = N !== !1;
1929
+ });
1930
+ }
1931
+ function P() {
1932
+ typeof C == "function" && (C(), C = void 0);
1933
+ }
1934
+ function L() {
1935
+ if (P(), a === void 0) {
1936
+ O();
1937
+ return;
1938
+ }
1939
+ if (u.value != null && d.value != null) {
1940
+ C = a(u.value, d.value, O);
1941
+ return;
1942
+ }
1943
+ }
1944
+ function B() {
1945
+ r.value || (A.value = !1);
1946
+ }
1947
+ return le([i, o, l, r], O, {
1948
+ flush: "sync"
1949
+ }), le([u, d], L, {
1950
+ flush: "sync"
1951
+ }), le(r, B, {
1952
+ flush: "sync"
1953
+ }), Jt() && Qt(P), {
1954
+ x: pe(v),
1955
+ y: pe(m),
1956
+ strategy: pe(p),
1957
+ placement: pe(h),
1958
+ middlewareData: pe(T),
1959
+ isPositioned: pe(A),
1960
+ floatingStyles: S,
1961
+ update: O
1962
+ };
1963
+ }
1964
+ const Ce = (t) => {
1965
+ t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation();
1966
+ }, ja = ({
1967
+ getNextElement: t,
1968
+ getFirstElement: e,
1969
+ getLastElement: n,
1970
+ close: a,
1971
+ disableSpaceToClick: r,
1972
+ keepOpenedOnTab: i
1973
+ }) => {
1974
+ const o = j(null), l = () => {
1975
+ };
1976
+ let s = l;
1977
+ const u = () => {
1978
+ o.value = null, s = l;
1979
+ }, d = (h) => {
1980
+ o.value = h.index, s = h.onClick;
1981
+ }, v = (h) => {
1982
+ d(t(o.value, h));
1983
+ }, m = () => {
1984
+ u(), a();
1985
+ };
1986
+ return {
1987
+ onKeydown: (h) => {
1988
+ switch (h.code) {
1989
+ case "ArrowDown":
1990
+ Ce(h), v(1);
1991
+ break;
1992
+ case "ArrowUp":
1993
+ Ce(h), v(-1);
1994
+ break;
1995
+ case "Enter":
1996
+ case "Space": {
1997
+ const T = h.code === "Enter", A = h.code === "Space";
1998
+ o.value !== null && (T || A && !r) && (Ce(h), s());
1999
+ break;
2000
+ }
2001
+ case "Home":
2002
+ e && d(e());
2003
+ break;
2004
+ case "End":
2005
+ n && d(n());
2006
+ break;
2007
+ case "Escape":
2008
+ Ce(h), m();
2009
+ break;
2010
+ }
2011
+ },
2012
+ currentIndex: en(o),
2013
+ resetNavigation: u,
2014
+ setElement: d
2015
+ };
2016
+ }, za = {
2017
+ xmlns: "http://www.w3.org/2000/svg",
2018
+ fill: "none",
2019
+ "stroke-linejoin": "round",
2020
+ viewBox: "0 0 32 32"
2021
+ };
2022
+ function Wa(t, e) {
2023
+ return $(), H("svg", za, [...e[0] || (e[0] = [
2024
+ z("path", {
2025
+ fill: "#000",
2026
+ d: "M2 3.842v-.5a.5.5 0 0 0-.5.5zm22.611 0h.5a.5.5 0 0 0-.5-.5zm-.5 7.48a.5.5 0 1 0 1 0zM2 21.43h-.5a.5.5 0 0 0 .5.5zm10.298.5a.5.5 0 1 0 0-1zm5.283 8.222h-.5a.5.5 0 0 0 .765.424zm3.278-2.046.265.424a.5.5 0 0 0 .235-.424zm0-5.87-.366-.34a.5.5 0 0 0-.134.34zM27.613 15l.366.341a.5.5 0 0 0-.366-.841zm-10.032 7.235h.5a.5.5 0 0 0-.128-.334zM11.063 15v-.5a.5.5 0 0 0-.372.835zm-.69-9.483V2h-1v3.517zM16.155 2v3.517h1V2zM2 4.342h22.611v-1H2zm22.111-.5v7.48h1v-7.48zM2.5 21.43V3.842h-1V21.43zM2 8.362h22.611v-1H2zM12.298 20.93h-6.81v1h6.81zm-6.81 0H2v1h3.488zm12.358 9.646 3.278-2.046-.53-.849-3.278 2.047zm3.513-2.47v-5.87h-1v5.87zm-.135-5.528 6.755-7.236-.731-.682-6.755 7.235zm-4.143-.342v7.916h1v-7.916zm.872-.334-6.519-7.236-.743.67 6.519 7.235zm-6.89-6.401h16.55v-1h-16.55z"
2027
+ }, null, -1)
2028
+ ])]);
2029
+ }
2030
+ const Ha = { render: Wa }, Ka = fe({
2031
+ name: "BaseRadioButtons",
2032
+ props: {
2033
+ id: {
2034
+ type: String,
2035
+ default: null
2036
+ },
2037
+ modelValue: {
2038
+ type: String,
2039
+ default: null
2040
+ },
2041
+ name: {
2042
+ type: String,
2043
+ default() {
2044
+ return `RadioButtons-${fn()}`;
2045
+ }
2046
+ },
2047
+ disabled: {
2048
+ default: !1,
2049
+ type: Boolean
2050
+ },
2051
+ possibleValues: {
2052
+ type: Array,
2053
+ default: () => [],
2054
+ validator(t) {
2055
+ return Array.isArray(t) ? t.every(
2056
+ (e) => e.hasOwnProperty("id") && e.hasOwnProperty("text")
2057
+ ) : !1;
2058
+ }
2059
+ }
2060
+ },
2061
+ emits: ["update:modelValue"],
2062
+ methods: {
2063
+ onInput(t) {
2064
+ const e = t.target.value;
2065
+ this.$emit("update:modelValue", e);
2066
+ }
2067
+ }
2068
+ }), Ua = ["id"], qa = ["checked", "value", "name", "disabled"], Xa = ["title"];
2069
+ function Ga(t, e, n, a, r, i) {
2070
+ return $(), H("div", {
2071
+ id: t.id,
2072
+ role: "radiogroup"
2073
+ }, [
2074
+ ($(!0), H(Je, null, At(t.possibleValues, (o) => ($(), H("label", {
2075
+ key: `radio-${o.id}`,
2076
+ class: Se({ disabled: t.disabled || o.disabled })
2077
+ }, [
2078
+ z("input", {
2079
+ ref_for: !0,
2080
+ ref: "input",
2081
+ checked: t.modelValue === o.id,
2082
+ value: o.id,
2083
+ name: t.name,
2084
+ disabled: t.disabled || o.disabled,
2085
+ type: "radio",
2086
+ onChange: e[0] || (e[0] = (...l) => t.onInput && t.onInput(...l))
2087
+ }, null, 40, qa),
2088
+ z("span", {
2089
+ title: o.text
2090
+ }, Oe(o.text), 9, Xa),
2091
+ Ct(t.$slots, "default", { item: o }, void 0, !0),
2092
+ o.subtext ? ($(), H(Je, { key: 0 }, [
2093
+ e[1] || (e[1] = z("br", null, null, -1)),
2094
+ z("span", null, Oe(o.subtext), 1)
2095
+ ], 64)) : Ne("", !0)
2096
+ ], 2))), 128))
2097
+ ], 8, Ua);
2098
+ }
2099
+ const Ya = /* @__PURE__ */ ge(Ka, [["render", Ga], ["__scopeId", "data-v-2bbebb4b"]]), Za = fe({
2100
+ name: "ValueSwitch",
2101
+ components: {
2102
+ BaseRadioButtons: Ya
2103
+ },
2104
+ props: {
2105
+ id: {
2106
+ type: String,
2107
+ default: null
2108
+ },
2109
+ modelValue: {
2110
+ type: String,
2111
+ default: null
2112
+ },
2113
+ name: {
2114
+ type: String,
2115
+ default: null
2116
+ },
2117
+ disabled: {
2118
+ default: !1,
2119
+ type: Boolean
2120
+ },
2121
+ possibleValues: {
2122
+ type: Array,
2123
+ default: () => []
2124
+ },
2125
+ compact: {
2126
+ type: Boolean,
2127
+ default: !1
2128
+ }
2129
+ },
2130
+ emits: ["update:modelValue"]
2131
+ });
2132
+ function Ja(t, e, n, a, r, i) {
2133
+ const o = tn("BaseRadioButtons");
2134
+ return $(), ke(o, {
2135
+ id: t.id,
2136
+ ref: "radioButton",
2137
+ "possible-values": t.possibleValues,
2138
+ "model-value": t.modelValue,
2139
+ name: t.name,
2140
+ disabled: t.disabled,
2141
+ class: Se(["value-switch", {
2142
+ disabled: t.disabled,
2143
+ compact: t.compact,
2144
+ normal: !t.compact
2145
+ }]),
2146
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => t.$emit("update:modelValue", l))
2147
+ }, {
2148
+ default: kt((l) => [
2149
+ Ct(t.$slots, "default", nn(an(l)), void 0, !0)
2150
+ ]),
2151
+ _: 3
2152
+ }, 8, ["id", "possible-values", "model-value", "name", "disabled", "class"]);
2153
+ }
2154
+ const at = /* @__PURE__ */ ge(Za, [["render", Ja], ["__scopeId", "data-v-83231815"]]), Qa = { class: "popover" }, eo = { class: "formats-container-border-host" }, to = {
2155
+ key: 0,
2156
+ class: "no-formats-available"
2157
+ }, no = {
2158
+ key: 1,
2159
+ class: "no-formats-available"
2160
+ }, ao = ["onClick"], oo = { class: "format-pattern" }, ro = { class: "format-preview" }, Et = 1, io = /* @__PURE__ */ fe({
2161
+ __name: "DateTimeFormatPickerPopover",
2162
+ props: {
2163
+ allFormats: {},
2164
+ selectedType: {},
2165
+ initialSelectedPattern: {},
2166
+ showTypeSwitch: { type: Boolean }
2167
+ },
2168
+ emits: ["commit", "cancel"],
2169
+ setup(t, { emit: e }) {
2170
+ on((y) => ({
2171
+ v3b9e5e3a: Et
2172
+ }));
2173
+ const n = e, a = t, r = M(() => [
2174
+ {
2175
+ id: "RECENT",
2176
+ text: "Recent"
2177
+ },
2178
+ {
2179
+ id: "STANDARD",
2180
+ text: "ISO"
2181
+ },
2182
+ {
2183
+ id: "EUROPEAN",
2184
+ text: "European"
2185
+ },
2186
+ {
2187
+ id: "AMERICAN",
2188
+ text: "United States"
2189
+ }
2190
+ ]), i = M(() => [
2191
+ {
2192
+ id: "DATE",
2193
+ text: "Date"
2194
+ },
2195
+ {
2196
+ id: "DATE_TIME",
2197
+ text: "Date & time"
2198
+ },
2199
+ {
2200
+ id: "TIME",
2201
+ text: "Time"
2202
+ },
2203
+ {
2204
+ id: "ZONED_DATE_TIME",
2205
+ text: "Zoned date & time"
2206
+ }
2207
+ ]), o = j(null), l = j(null), s = j("RECENT"), u = j(a.selectedType);
2208
+ le(
2209
+ () => a.selectedType,
2210
+ (y) => {
2211
+ l.value = y;
2212
+ }
2213
+ );
2214
+ const d = M(
2215
+ () => a.allFormats?.filter(
2216
+ (y) => y.category === s.value && y.temporalType === u.value
2217
+ ) ?? null
2218
+ ), v = j(null), m = rn({}), p = (y) => `${y.format}-${y.category}-${y.temporalType}`, h = (y) => (w) => {
2219
+ m[p(y)] = w;
2220
+ }, T = (y) => ({
2221
+ format: y.format,
2222
+ temporalType: y.temporalType
2223
+ }), {
2224
+ currentIndex: A,
2225
+ onKeydown: S,
2226
+ resetNavigation: C,
2227
+ setElement: O
2228
+ } = ja({
2229
+ keepOpenedOnTab: !0,
2230
+ getFirstElement: () => ({
2231
+ index: 0,
2232
+ onClick: () => n(
2233
+ "commit",
2234
+ T(d.value[0])
2235
+ )
2236
+ }),
2237
+ getLastElement: () => {
2238
+ const y = d.value.length - 1;
2239
+ return {
2240
+ index: y,
2241
+ onClick: () => n(
2242
+ "commit",
2243
+ T(d.value[y])
2244
+ )
2245
+ };
2246
+ },
2247
+ getNextElement: (y, w) => {
2248
+ if (y = y === null || y === -1 ? null : y, w === 1) {
2249
+ const V = ((y ?? -1) + 1) % d.value.length;
2250
+ return {
2251
+ index: V,
2252
+ onClick: () => n(
2253
+ "commit",
2254
+ T(d.value[V])
2255
+ )
2256
+ };
2257
+ } else {
2258
+ const V = ((y ?? 0) - 1 + d.value.length) % d.value.length;
2259
+ return {
2260
+ index: V,
2261
+ onClick: () => n(
2262
+ "commit",
2263
+ T(d.value[V])
2264
+ )
2265
+ };
2266
+ }
2267
+ },
2268
+ close: () => {
2269
+ n("cancel");
2270
+ }
2271
+ }), P = (y) => {
2272
+ const w = y.parentElement;
2273
+ if (w && w.scrollHeight > w.clientHeight) {
2274
+ const E = w.offsetTop + Et, V = w.clientHeight + w.scrollTop, _ = y.offsetTop + y.offsetHeight - E;
2275
+ _ > V ? w.scrollTop = _ - w.clientHeight : y.offsetTop - w.scrollTop < E && (w.scrollTop = y.offsetTop - E);
2276
+ }
2277
+ }, L = (y) => {
2278
+ const w = m[`${y}-${s.value}-${u.value}`];
2279
+ w && P(w);
2280
+ }, B = async (y, w, E) => {
2281
+ u.value = w ?? u.value, s.value = E ?? s.value, await st(), l.value = y, L(y);
2282
+ const V = d.value.findIndex(
2283
+ (_) => _.format === y
2284
+ );
2285
+ O({
2286
+ index: V,
2287
+ onClick: () => n(
2288
+ "commit",
2289
+ T(d.value[V])
2290
+ )
2291
+ });
2292
+ };
2293
+ le(A, (y) => {
2294
+ if (y === null)
2295
+ return;
2296
+ const w = d.value?.[y]?.format;
2297
+ w && L(w);
2298
+ }), le([u, s], () => {
2299
+ u.value === o.value?.temporalType && s.value === o.value?.category ? B(
2300
+ o.value.format,
2301
+ o.value.temporalType,
2302
+ o.value.category
2303
+ ) : (l.value = null, C());
2304
+ });
2305
+ const N = j(!1);
2306
+ return Ft(async () => {
2307
+ if (!a.allFormats)
2308
+ return;
2309
+ const y = [
2310
+ "RECENT",
2311
+ "STANDARD",
2312
+ "EUROPEAN",
2313
+ "AMERICAN"
2314
+ ], w = a.allFormats.filter((E) => a.initialSelectedPattern === E.format).filter(
2315
+ (E) => (
2316
+ // if the type switch is hidden, filter to only formats with the same type
2317
+ a.selectedType === E.temporalType || a.showTypeSwitch
2318
+ )
2319
+ ).sort((E, V) => {
2320
+ const _ = y.indexOf(E.category), k = y.indexOf(V.category);
2321
+ return _ - k;
2322
+ });
2323
+ if (w.length > 0) {
2324
+ const E = w[0].format, V = w[0].temporalType, _ = w[0].category;
2325
+ await B(E, V, _);
2326
+ const k = d.value.findIndex(
2327
+ (c) => c.format === E
2328
+ );
2329
+ o.value = {
2330
+ format: E,
2331
+ index: k,
2332
+ category: _,
2333
+ temporalType: V
2334
+ };
2335
+ }
2336
+ st(() => N.value = !0);
2337
+ }), Rt(() => N.value = !1), (y, w) => ($(), ke(q(Zn), {
2338
+ active: N.value,
2339
+ "onUpdate:active": w[3] || (w[3] = (E) => N.value = E),
2340
+ "initial-focus": () => v.value ?? !1
2341
+ }, {
2342
+ default: kt(() => [
2343
+ z("div", Qa, [
2344
+ t.showTypeSwitch ? ($(), ke(at, {
2345
+ key: 0,
2346
+ id: "selectedFormatType",
2347
+ ref: "typeSwitchRef",
2348
+ modelValue: u.value,
2349
+ "onUpdate:modelValue": w[0] || (w[0] = (E) => u.value = E),
2350
+ compact: "",
2351
+ "possible-values": i.value,
2352
+ class: "filter-switch"
2353
+ }, null, 8, ["modelValue", "possible-values"])) : Ne("", !0),
2354
+ be(at, {
2355
+ id: "selectedFormatStandard",
2356
+ ref: "standardSwitchRef",
2357
+ modelValue: s.value,
2358
+ "onUpdate:modelValue": w[1] || (w[1] = (E) => s.value = E),
2359
+ compact: "",
2360
+ "possible-values": r.value,
2361
+ class: "filter-switch"
2362
+ }, null, 8, ["modelValue", "possible-values"]),
2363
+ z("div", eo, [
2364
+ z("div", {
2365
+ id: "dateFormats",
2366
+ ref_key: "formatContainerRef",
2367
+ ref: v,
2368
+ class: "formats-container",
2369
+ tabindex: "0",
2370
+ role: "menu",
2371
+ onKeydown: w[2] || (w[2] = //@ts-ignore
2372
+ (...E) => q(S) && q(S)(...E))
2373
+ }, [
2374
+ d.value === null ? ($(), H("div", to, [
2375
+ be(wn, { class: "loading-spinner" })
2376
+ ])) : d.value.length === 0 ? ($(), H("div", no, " No formats available ")) : ($(!0), H(Je, { key: 2 }, At(d.value, (E, V) => ($(), H("div", {
2377
+ key: p(E),
2378
+ ref_for: !0,
2379
+ ref: h(E),
2380
+ class: Se([{
2381
+ highlighted: V === q(A),
2382
+ applied: V === o.value?.index && E.category === o.value.category && E.temporalType === o.value.temporalType
2383
+ }, "single-format"]),
2384
+ role: "menuitem",
2385
+ onClick: () => n("commit", T(E))
2386
+ }, [
2387
+ z("span", oo, Oe(E.format), 1),
2388
+ z("span", ro, Oe(E.example), 1)
2389
+ ], 10, ao))), 128))
2390
+ ], 544)
2391
+ ])
2392
+ ])
2393
+ ]),
2394
+ _: 1
2395
+ }, 8, ["active", "initial-focus"]));
2396
+ }
2397
+ }), lo = /* @__PURE__ */ ge(io, [["__scopeId", "data-v-8bb40d8b"]]), so = { class: "input-fields" }, co = ["disabled"], uo = {
2398
+ key: 0,
2399
+ class: "invalid-marker"
2400
+ }, fo = ["disabled"], vo = {}, po = /* @__PURE__ */ fe({
2401
+ ...vo,
2402
+ __name: "DateTimeFormatInput",
2403
+ props: /* @__PURE__ */ dn({
2404
+ disabled: { type: Boolean, default: !1 },
2405
+ compact: { type: Boolean, default: !1 },
2406
+ isValid: { type: Boolean, default: !0 },
2407
+ allDefaultFormats: {},
2408
+ allowedTypes: { default: () => [
2409
+ "DATE",
2410
+ "TIME",
2411
+ "DATE_TIME",
2412
+ "ZONED_DATE_TIME"
2413
+ ] },
2414
+ showTypeSwitchInPopover: { type: Boolean, default: !0 }
2415
+ }, {
2416
+ modelValue: {
2417
+ default: {
2418
+ format: "yyyy-MM-dd",
2419
+ temporalType: "DATE"
2420
+ }
2421
+ },
2422
+ modelModifiers: {}
2423
+ }),
2424
+ emits: ["update:modelValue"],
2425
+ setup(t) {
2426
+ const e = t, n = ln(t, "modelValue"), a = M({
2427
+ get: () => n.value.format,
2428
+ set: (v) => {
2429
+ n.value = {
2430
+ ...n.value,
2431
+ format: v
2432
+ };
2433
+ }
2434
+ }), r = "Format like 'yyyy-MM-dd'", i = M(() => e.isValid), o = j(null), l = j(null), s = j(!1), u = (v) => {
2435
+ n.value = v, s.value = !1;
2436
+ };
2437
+ vn(l, () => s.value = !1, {
2438
+ ignore: [o]
2439
+ });
2440
+ const { floatingStyles: d } = $a(
2441
+ o,
2442
+ l,
2443
+ {
2444
+ middleware: [
2445
+ Va({
2446
+ mainAxis: 2,
2447
+ crossAxis: 0
2448
+ }),
2449
+ Ba(),
2450
+ La({
2451
+ mainAxis: !0,
2452
+ crossAxis: !1
2453
+ })
2454
+ ],
2455
+ placement: "top-end",
2456
+ whileElementsMounted: Pa
2457
+ }
2458
+ );
2459
+ return (v, m) => ($(), H("div", null, [
2460
+ z("div", {
2461
+ class: Se(["wrapper", { disabled: t.disabled, compact: t.compact }])
2462
+ }, [
2463
+ z("span", so, [
2464
+ sn(z("input", {
2465
+ "onUpdate:modelValue": m[0] || (m[0] = (p) => a.value = p),
2466
+ type: "text",
2467
+ disabled: t.disabled,
2468
+ placeholder: r,
2469
+ spellcheck: "false",
2470
+ onFocus: m[1] || (m[1] = (p) => s.value = !1)
2471
+ }, null, 40, co), [
2472
+ [cn, a.value]
2473
+ ]),
2474
+ i.value ? Ne("", !0) : ($(), H("span", uo)),
2475
+ z("button", {
2476
+ ref_key: "togglePopoverButtonRef",
2477
+ ref: o,
2478
+ class: Se(["trigger-popover-button", { active: s.value }]),
2479
+ disabled: t.disabled,
2480
+ onClick: m[2] || (m[2] = (p) => s.value = !s.value)
2481
+ }, [
2482
+ be(q(Ha))
2483
+ ], 10, fo)
2484
+ ])
2485
+ ], 2),
2486
+ s.value ? ($(), H("div", {
2487
+ key: 0,
2488
+ ref_key: "floatingPopoverRef",
2489
+ ref: l,
2490
+ class: "popover",
2491
+ style: un(q(d))
2492
+ }, [
2493
+ be(lo, {
2494
+ "all-formats": t.allDefaultFormats,
2495
+ "initial-selected-pattern": n.value.format,
2496
+ "selected-type": n.value.temporalType,
2497
+ "show-type-switch": t.showTypeSwitchInPopover,
2498
+ onCommit: u,
2499
+ onCancel: m[3] || (m[3] = (p) => s.value = !1)
2500
+ }, null, 8, ["all-formats", "initial-selected-pattern", "selected-type", "show-type-switch"])
2501
+ ], 4)) : Ne("", !0)
2502
+ ]));
2503
+ }
2504
+ }), mo = /* @__PURE__ */ ge(po, [["__scopeId", "data-v-1577d5ce"]]), ho = ["id"], bo = /* @__PURE__ */ fe({
2505
+ __name: "DateTimeFormatPickerWithTypeControl",
2506
+ props: {
2507
+ control: {},
2508
+ handleChange: { type: Function },
2509
+ changeValue: { type: Function },
2510
+ disabled: { type: Boolean },
2511
+ error: { type: Boolean },
2512
+ subText: {},
2513
+ onRegisterValidation: { type: Function },
2514
+ labelForId: {}
2515
+ },
2516
+ setup(t) {
2517
+ const e = t, n = M(
2518
+ () => e.control.uischema
2519
+ ), a = M(() => n.value.options), r = M(() => a.value?.allowedFormats), i = pn(n, "dateTimeFormats"), o = [
2520
+ {
2521
+ id: "DATE",
2522
+ text: "Date"
2523
+ },
2524
+ {
2525
+ id: "DATE_TIME",
2526
+ text: "Date & time"
2527
+ },
2528
+ {
2529
+ id: "TIME",
2530
+ text: "Time"
2531
+ },
2532
+ {
2533
+ id: "ZONED_DATE_TIME",
2534
+ text: "Zoned date & time"
2535
+ }
2536
+ ], l = M({
2537
+ get: () => e.control.data,
2538
+ set: (u) => {
2539
+ e.changeValue(u);
2540
+ }
2541
+ }), s = M({
2542
+ get: () => l.value.temporalType,
2543
+ set: (u) => {
2544
+ l.value = {
2545
+ ...l.value,
2546
+ temporalType: u
2547
+ };
2548
+ }
2549
+ });
2550
+ return (u, d) => ($(), H("div", {
2551
+ id: t.labelForId,
2552
+ class: "control-container"
2553
+ }, [
2554
+ be(q(at), {
2555
+ modelValue: s.value,
2556
+ "onUpdate:modelValue": d[0] || (d[0] = (v) => s.value = v),
2557
+ compact: "",
2558
+ "possible-values": o,
2559
+ disabled: t.disabled
2560
+ }, null, 8, ["modelValue", "disabled"]),
2561
+ be(q(mo), {
2562
+ modelValue: l.value,
2563
+ "onUpdate:modelValue": d[1] || (d[1] = (v) => l.value = v),
2564
+ compact: "",
2565
+ disabled: t.disabled,
2566
+ "show-type-switch-in-popover": !1,
2567
+ "allowed-formats": r.value,
2568
+ "all-default-formats": q(i),
2569
+ "is-valid": !0
2570
+ }, null, 8, ["modelValue", "disabled", "allowed-formats", "all-default-formats"])
2571
+ ], 8, ho));
2572
+ }
2573
+ }), wo = /* @__PURE__ */ ge(bo, [["__scopeId", "data-v-f6f7c887"]]);
2574
+ export {
2575
+ wo as default
2576
+ };