@knime/jsonforms 1.19.5 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/{AnyOfTwinlist-gIm_R7yi.js → AnyOfTwinlist-CosNPUKG.js} +1 -1
  3. package/dist/{Checkbox-D1QZ8D8U.js → Checkbox-BLHyWo4X.js} +1 -1
  4. package/dist/{CheckboxControl-DitntAd8.js → CheckboxControl-DyBcYCFe.js} +1 -1
  5. package/dist/{CheckboxesControl-C_Wwb06j.js → CheckboxesControl-DqcN6RcZ.js} +2 -2
  6. package/dist/{ColorControl-86_aeUMf.js → ColorControl-CPklP_Ox.js} +1 -1
  7. package/dist/{ColorPreviewControl-HgbFwMCE.js → ColorPreviewControl-BhbI9XDV.js} +1 -1
  8. package/dist/{ComboBoxControl-CGwWGyDl.js → ComboBoxControl-DR9x8i0b.js} +8 -8
  9. package/dist/{DateControl-BofbO5lM.js → DateControl-DJxV5wzs.js} +1 -1
  10. package/dist/DateTimeControl-CoNsGbev.js +44 -0
  11. package/dist/{DateTimeFormatPickerControl-7KTdYrMN.js → DateTimeFormatPickerControl-BmtxQjzI.js} +1 -1
  12. package/dist/{DateTimeFormatPickerWithTypeControl-DmevlqK8.js → DateTimeFormatPickerWithTypeControl-CK7LsO-R.js} +12 -12
  13. package/dist/{DropdownControl-XAeknlV2.js → DropdownControl-nLA0kshc.js} +5 -5
  14. package/dist/ExecutorCoresControl-BgB0R_Xv.js +42 -0
  15. package/dist/ExecutorMemoryControl-Ck5naUl2.js +41 -0
  16. package/dist/FileUploadControl-CByhtwi1.js +197 -0
  17. package/dist/GridSelectionControl-8g--blrX.js +115 -0
  18. package/dist/{HorizontalLayout-BQFvLK2X.js → HorizontalLayout-Bc4F2xJR.js} +6 -6
  19. package/dist/InputField-Gw6K93vY.js +148 -0
  20. package/dist/{IntegerControl-XNoJU3s2.js → IntegerControl-CAh031mO.js} +1 -1
  21. package/dist/{IntervalControl-DaQTfsx8.js → IntervalControl-ocjzEBto.js} +168 -184
  22. package/dist/LinkControl-BML6cXj-.js +35 -0
  23. package/dist/LoadingDropdown.vue_vue_type_script_setup_true_lang-C2sH3IaG.js +57 -0
  24. package/dist/{LoadingIcon-D3kls_iA.js → LoadingIcon-B0S8ig5H.js} +1 -1
  25. package/dist/{ManualTwinlistControl-BCgJbfp5.js → ManualTwinlistControl-BdbrjZtS.js} +4 -4
  26. package/dist/{MultiSelectListBoxControl-B6tvY3Al.js → MultiSelectListBoxControl-0M1iLfXZ.js} +2 -2
  27. package/dist/{MultimodeTwinlistControl-CUWzYCUm.js → MultimodeTwinlistControl-aL0Jr_Hp.js} +19 -20
  28. package/dist/{MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-C8itN9TE.js → MultimodeTwinlistControl.vue_vue_type_style_index_0_scoped_0aa76d2b_lang-C61plPNM.js} +2 -2
  29. package/dist/{MultiselectListBox-C1rI0rOG.js → MultiselectListBox-BJqQv0AT.js} +5 -5
  30. package/dist/{NameFilter-CaPBJKzh.js → NameFilter-DvoXjvd8.js} +1 -1
  31. package/dist/{NumberControl-DOnwoK8Z.js → NumberControl-BEYR3aHU.js} +1 -1
  32. package/dist/{NumberControlBase.vue_vue_type_script_setup_true_lang-IP3X2jko.js → NumberControlBase.vue_vue_type_script_setup_true_lang-CSwuzJVa.js} +2 -2
  33. package/dist/{OneOfDropdown-CHt7_dgU.js → OneOfDropdown-Bg1JOuCZ.js} +1 -1
  34. package/dist/RadioButtonsWithDescriptionControl-Cmzn6X0W.js +57 -0
  35. package/dist/{RadioControl-CP7QiYX1.js → RadioControl-D4invwra.js} +2 -2
  36. package/dist/{RadioControlBase.vue_vue_type_script_setup_true_lang-qv1xOkqz.js → RadioControlBase.vue_vue_type_script_setup_true_lang-CuOORFSE.js} +2 -2
  37. package/dist/ResourceControlBase-BCx6cBBz.js +158 -0
  38. package/dist/{RichTextControl-DKlFtbdd.js → RichTextControl-TbANBneT.js} +2059 -1991
  39. package/dist/{SectionHeading-DbcAkyOk.js → SectionHeading-DoNDREK2.js} +1 -1
  40. package/dist/{SectionLayout-BRfbEX0H.js → SectionLayout-Dsd4wFck.js} +3 -3
  41. package/dist/SettingsSubPanel-sQPONy-U.js +5 -0
  42. package/dist/{SettingsSubPanelLayout-nMEM9Js5.js → SettingsSubPanelLayout-DbYqmGOS.js} +7 -7
  43. package/dist/{SimpleButtonControl-Cs9fDA9V.js → SimpleButtonControl-DhM4t6v3.js} +10 -9
  44. package/dist/SimpleButtonControl.vue_vue_type_style_index_0_scoped_17a4a240_lang-DAdzHTim.js +26176 -0
  45. package/dist/{SimpleTwinlistControl-CMJCJOPx.js → SimpleTwinlistControl-Chay0D48.js} +2 -2
  46. package/dist/{SingleSelectControl-DrqxOX0c.js → SingleSelectControl-BRfqeLOh.js} +2 -2
  47. package/dist/{SingleSelectListBoxControl-2ORQoAtg.js → SingleSelectListBoxControl-DyDspddM.js} +5 -5
  48. package/dist/{SortListControl-BLWFLyUn.js → SortListControl-DX0uhRfk.js} +104 -118
  49. package/dist/{StyledListItem-DhsQSwUn.js → StyledListItem-B_FaDixp.js} +1 -1
  50. package/dist/TeamAndSpacesControl-CVGPGpqd.js +64 -0
  51. package/dist/TeamResourceControl-DD-USgie.js +38 -0
  52. package/dist/{TextAreaControl-v3fhzCGm.js → TextAreaControl-BCIrrOzR.js} +1 -1
  53. package/dist/{TextControl-CNlNwI8q.js → TextControl-B_2oeFoq.js} +1 -1
  54. package/dist/TextControl.vue_vue_type_script_setup_true_lang-CuCBV4pA.js +45 -0
  55. package/dist/{TimeControl-uBNUovJi.js → TimeControl-CeL2KxIB.js} +1 -1
  56. package/dist/TimePartInput-BbHxGv7L.js +254 -0
  57. package/dist/TimeframesControl-BBUDxMaB.js +87 -0
  58. package/dist/Tooltip-B5O8iOuG.js +24 -0
  59. package/dist/{TwinlistControlBase-BfsU0lp4.js → TwinlistControlBase--CFSodU_.js} +3 -3
  60. package/dist/{TwinlistLoadingInfo-CZpH6CqT.js → TwinlistLoadingInfo-aB5QCSFX.js} +18 -18
  61. package/dist/{TypedStringFilter-ElEPYctF.js → TypedStringFilter-BjyKvhn1.js} +1 -1
  62. package/dist/{ValueSwitch-BfYlPI2B.js → ValueSwitch-DYxCMQ9c.js} +4 -4
  63. package/dist/{ValueSwitchControl-DyV85jLv.js → ValueSwitchControl-CQkiPcwC.js} +1 -1
  64. package/dist/{VerticalLayout-CFGNNSaB.js → VerticalLayout-DygOb7L9.js} +2 -2
  65. package/dist/{VerticalLayoutBase-CCtK1J1U.js → VerticalLayoutBase-Dq_p4WmZ.js} +1 -1
  66. package/dist/{ZonedDateTimeControl-BtPeUK4M.js → ZonedDateTimeControl-CKyKzTtF.js} +2 -2
  67. package/dist/_Uint8Array-Boy5On8p.js +349 -0
  68. package/dist/_baseAssignValue-CG1hoqdJ.js +19 -0
  69. package/dist/{_baseEach-DR1qyPMo.js → _baseEach-LxtQB6N-.js} +1 -1
  70. package/dist/_baseIteratee-BBGehgFZ.js +308 -0
  71. package/dist/floating-ui.vue-Bk6u3tWN.js +1060 -0
  72. package/dist/isArray-WzO_os3q.js +4 -0
  73. package/dist/knime-jsonforms.css +1 -1
  74. package/dist/knime-jsonforms.js +53 -51
  75. package/dist/{localTimeUtils-C1z-tWPY.js → localTimeUtils-C7kma5fB.js} +3163 -3553
  76. package/dist/src/constants/inputFormats.d.ts +14 -0
  77. package/dist/src/higherOrderComponents/control/DescriptionPopover.vue.d.ts +6 -0
  78. package/dist/src/higherOrderComponents/control/index.d.ts +1 -0
  79. package/dist/src/higherOrderComponents/control/withDescription.d.ts +2 -0
  80. package/dist/src/layoutComponents/index.d.ts +2 -1
  81. package/dist/src/layoutComponents/simpleArrayLayout/SimpleArrayLayout.vue.d.ts +74 -0
  82. package/dist/src/layoutComponents/simpleArrayLayout/SimpleArrayLayoutItemControls.vue.d.ts +16 -0
  83. package/dist/src/renderers/defaultRenderers.d.ts +152 -3
  84. package/dist/src/renderers/executorCoresResourceRenderer.d.ts +1 -0
  85. package/dist/src/renderers/executorMemoryResourceRenderer.d.ts +1 -0
  86. package/dist/src/renderers/fileUploadRenderer.d.ts +1 -0
  87. package/dist/src/renderers/gridSelectionRenderer.d.ts +1 -0
  88. package/dist/src/renderers/linkRenderer.d.ts +69 -0
  89. package/dist/src/renderers/passwordRenderer.d.ts +1 -0
  90. package/dist/src/renderers/quantityRenderer.d.ts +1 -0
  91. package/dist/src/renderers/radioWithDescriptionRenderer.d.ts +69 -0
  92. package/dist/src/renderers/simpleArrayLayoutRenderer.d.ts +76 -0
  93. package/dist/src/renderers/sortListRenderer.d.ts +1 -3
  94. package/dist/src/renderers/teamAndSpaceDropdownRenderer.d.ts +3 -0
  95. package/dist/src/renderers/teamResourceRenderer.d.ts +1 -0
  96. package/dist/src/renderers/timeframesRenderer.d.ts +4 -0
  97. package/dist/src/renderers/usernameRenderer.d.ts +1 -0
  98. package/dist/src/types/ChoicesUiSchema.d.ts +13 -1
  99. package/dist/src/uiComponents/DateControl.vue.d.ts +1 -1
  100. package/dist/src/uiComponents/DateTimeControl.vue.d.ts +1 -1
  101. package/dist/src/uiComponents/FileUploadControl.vue.d.ts +6 -0
  102. package/dist/src/uiComponents/GridSelectionControl.vue.d.ts +9 -0
  103. package/dist/src/uiComponents/LinkControl.vue.d.ts +4 -0
  104. package/dist/src/uiComponents/PasswordControl.vue.d.ts +4 -0
  105. package/dist/src/uiComponents/QuantityControl.vue.d.ts +4 -0
  106. package/dist/src/uiComponents/RadioButtonsWithDescriptionControl.vue.d.ts +4 -0
  107. package/dist/src/uiComponents/SortListControl.vue.d.ts +1 -3
  108. package/dist/src/uiComponents/TeamAndSpacesControl.vue.d.ts +4 -0
  109. package/dist/src/uiComponents/TimeControl.vue.d.ts +1 -1
  110. package/dist/src/uiComponents/TimeframesControl.vue.d.ts +8 -0
  111. package/dist/src/uiComponents/UsernameControl.vue.d.ts +4 -0
  112. package/dist/src/uiComponents/configs/executionContexts.config.d.ts +29 -0
  113. package/dist/src/uiComponents/loading/types/LoadingDropdownProps.d.ts +2 -2
  114. package/dist/src/uiComponents/resourceControls/ExecutorCoresControl.vue.d.ts +4 -0
  115. package/dist/src/uiComponents/resourceControls/ExecutorMemoryControl.vue.d.ts +4 -0
  116. package/dist/src/uiComponents/resourceControls/ResourceControlBase.vue.d.ts +19 -0
  117. package/dist/src/uiComponents/resourceControls/SmallDonutChart.vue.d.ts +20 -0
  118. package/dist/src/uiComponents/resourceControls/TeamResourceControl.vue.d.ts +4 -0
  119. package/dist/src/uiComponents/richTextControl/RichTextControl.vue.d.ts +1 -3
  120. package/dist/testing.js +2602 -2589
  121. package/dist/toString-Bbm8o0hZ.js +25 -0
  122. package/dist/{useBuiltinValidations-CXYzLTj1.js → useBuiltinValidations-zKGc6Pdt.js} +1 -1
  123. package/dist/useDropdownNavigation-EOwf_fL0.js +946 -0
  124. package/dist/{usePossibleValues-BGGWIVzM.js → usePossibleValues-DhdKca4Z.js} +1 -1
  125. package/package.json +2 -2
  126. package/dist/DateTimeControl-BzWk51J8.js +0 -44
  127. package/dist/Label-BckcZVsr.js +0 -218
  128. package/dist/LoadingDropdown.vue_vue_type_script_setup_true_lang-M581gyEa.js +0 -48
  129. package/dist/SectionHeading.vue_vue_type_style_index_0_scoped_2310b6b8_lang-B1Ey6pj2.js +0 -25430
  130. package/dist/SettingsSubPanel-Bw-wC4JV.js +0 -5
  131. package/dist/TextControl.vue_vue_type_script_setup_true_lang-BQReBqLi.js +0 -45
  132. package/dist/_baseIteratee-DrBvc1GG.js +0 -640
  133. package/dist/floating-ui.vue-Fx4CxKut.js +0 -1057
  134. package/dist/toString-lufkO4XX.js +0 -25
  135. package/dist/useDropdownNavigation-2Yhk7zes.js +0 -821
@@ -1,821 +0,0 @@
1
- import { defineComponent as me, ref as le, computed as ge, onMounted as we, watch as Fe, onUnmounted as Te, Comment as Ne, cloneVNode as ke, readonly as Ee } from "vue";
2
- var se = ["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] *)"], _ = /* @__PURE__ */ se.join(","), de = typeof Element > "u", O = de ? function() {
3
- } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, G = !de && Element.prototype.getRootNode ? function(r) {
4
- var e;
5
- return r == null || (e = r.getRootNode) === null || e === void 0 ? void 0 : e.call(r);
6
- } : function(r) {
7
- return r?.ownerDocument;
8
- }, V = function(e, t) {
9
- var a;
10
- t === void 0 && (t = !0);
11
- var u = e == null || (a = e.getAttribute) === null || a === void 0 ? void 0 : a.call(e, "inert"), c = u === "" || u === "true", n = c || t && 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]") : V(e.parentNode));
14
- return n;
15
- }, Se = function(e) {
16
- var t, a = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
17
- return a === "" || a === "true";
18
- }, fe = function(e, t, a) {
19
- if (V(e))
20
- return [];
21
- var u = Array.prototype.slice.apply(e.querySelectorAll(_));
22
- return t && O.call(e, _) && u.unshift(e), u = u.filter(a), u;
23
- }, q = function(e, t, a) {
24
- for (var u = [], c = Array.from(e); c.length; ) {
25
- var n = c.shift();
26
- if (!V(n, !1))
27
- if (n.tagName === "SLOT") {
28
- var s = n.assignedElements(), b = s.length ? s : n.children, p = q(b, !0, a);
29
- a.flatten ? u.push.apply(u, p) : u.push({
30
- scopeParent: n,
31
- candidates: p
32
- });
33
- } else {
34
- var g = O.call(n, _);
35
- g && a.filter(n) && (t || !e.includes(n)) && u.push(n);
36
- var T = n.shadowRoot || // check for an undisclosed shadow
37
- typeof a.getShadowRoot == "function" && a.getShadowRoot(n), N = !V(T, !1) && (!a.shadowRootFilter || a.shadowRootFilter(n));
38
- if (T && N) {
39
- var E = q(T === !0 ? n.children : T.children, !0, a);
40
- a.flatten ? u.push.apply(u, E) : u.push({
41
- scopeParent: n,
42
- candidates: E
43
- });
44
- } else
45
- c.unshift.apply(c, n.children);
46
- }
47
- }
48
- return u;
49
- }, ve = function(e) {
50
- return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
51
- }, D = function(e) {
52
- if (!e)
53
- throw new Error("No node provided");
54
- return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Se(e)) && !ve(e) ? 0 : e.tabIndex;
55
- }, De = function(e, t) {
56
- var a = D(e);
57
- return a < 0 && t && !ve(e) ? 0 : a;
58
- }, Oe = function(e, t) {
59
- return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
60
- }, be = function(e) {
61
- return e.tagName === "INPUT";
62
- }, Ce = function(e) {
63
- return be(e) && e.type === "hidden";
64
- }, Ie = function(e) {
65
- var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(a) {
66
- return a.tagName === "SUMMARY";
67
- });
68
- return t;
69
- }, Ae = function(e, t) {
70
- for (var a = 0; a < e.length; a++)
71
- if (e[a].checked && e[a].form === t)
72
- return e[a];
73
- }, Pe = function(e) {
74
- if (!e.name)
75
- return !0;
76
- var t = e.form || G(e), a = function(s) {
77
- return t.querySelectorAll('input[type="radio"][name="' + s + '"]');
78
- }, u;
79
- if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
80
- u = a(window.CSS.escape(e.name));
81
- else
82
- try {
83
- u = a(e.name);
84
- } catch (n) {
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", n.message), !1;
86
- }
87
- var c = Ae(u, e.form);
88
- return !c || c === e;
89
- }, Re = function(e) {
90
- return be(e) && e.type === "radio";
91
- }, xe = function(e) {
92
- return Re(e) && !Pe(e);
93
- }, Be = function(e) {
94
- var t, a = e && G(e), u = (t = a) === null || t === void 0 ? void 0 : t.host, c = !1;
95
- if (a && a !== e) {
96
- var n, s, b;
97
- for (c = !!((n = u) !== null && n !== void 0 && (s = n.ownerDocument) !== null && s !== void 0 && s.contains(u) || e != null && (b = e.ownerDocument) !== null && b !== void 0 && b.contains(e)); !c && u; ) {
98
- var p, g, T;
99
- a = G(u), u = (p = a) === null || p === void 0 ? void 0 : p.host, c = !!((g = u) !== null && g !== void 0 && (T = g.ownerDocument) !== null && T !== void 0 && T.contains(u));
100
- }
101
- }
102
- return c;
103
- }, ne = function(e) {
104
- var t = e.getBoundingClientRect(), a = t.width, u = t.height;
105
- return a === 0 && u === 0;
106
- }, Le = function(e, t) {
107
- var a = t.displayCheck, u = t.getShadowRoot;
108
- if (a === "full-native" && "checkVisibility" in e) {
109
- var c = 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 !c;
123
- }
124
- if (getComputedStyle(e).visibility === "hidden")
125
- return !0;
126
- var n = O.call(e, "details>summary:first-of-type"), s = n ? e.parentElement : e;
127
- if (O.call(s, "details:not([open]) *"))
128
- return !0;
129
- if (!a || a === "full" || // full-native can run this branch when it falls through in case
130
- // Element#checkVisibility is unsupported
131
- a === "full-native" || a === "legacy-full") {
132
- if (typeof u == "function") {
133
- for (var b = e; e; ) {
134
- var p = e.parentElement, g = G(e);
135
- if (p && !p.shadowRoot && u(p) === !0)
136
- return ne(e);
137
- e.assignedSlot ? e = e.assignedSlot : !p && g !== e.ownerDocument ? e = g.host : e = p;
138
- }
139
- e = b;
140
- }
141
- if (Be(e))
142
- return !e.getClientRects().length;
143
- if (a !== "legacy-full")
144
- return !0;
145
- } else if (a === "non-zero-area")
146
- return ne(e);
147
- return !1;
148
- }, je = function(e) {
149
- if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
150
- for (var t = e.parentElement; t; ) {
151
- if (t.tagName === "FIELDSET" && t.disabled) {
152
- for (var a = 0; a < t.children.length; a++) {
153
- var u = t.children.item(a);
154
- if (u.tagName === "LEGEND")
155
- return O.call(t, "fieldset[disabled] *") ? !0 : !u.contains(e);
156
- }
157
- return !0;
158
- }
159
- t = t.parentElement;
160
- }
161
- return !1;
162
- }, U = function(e, t) {
163
- return !(t.disabled || Ce(t) || Le(t, e) || // For a details element with a summary, the summary element gets the focus
164
- Ie(t) || je(t));
165
- }, z = function(e, t) {
166
- return !(xe(t) || D(t) < 0 || !U(e, t));
167
- }, Ke = function(e) {
168
- var t = parseInt(e.getAttribute("tabindex"), 10);
169
- return !!(isNaN(t) || t >= 0);
170
- }, pe = function(e) {
171
- var t = [], a = [];
172
- return e.forEach(function(u, c) {
173
- var n = !!u.scopeParent, s = n ? u.scopeParent : u, b = De(s, n), p = n ? pe(u.candidates) : s;
174
- b === 0 ? n ? t.push.apply(t, p) : t.push(s) : a.push({
175
- documentOrder: c,
176
- tabIndex: b,
177
- item: u,
178
- isScope: n,
179
- content: p
180
- });
181
- }), a.sort(Oe).reduce(function(u, c) {
182
- return c.isScope ? u.push.apply(u, c.content) : u.push(c.content), u;
183
- }, []).concat(t);
184
- }, Me = function(e, t) {
185
- t = t || {};
186
- var a;
187
- return t.getShadowRoot ? a = q([e], t.includeContainer, {
188
- filter: z.bind(null, t),
189
- flatten: !1,
190
- getShadowRoot: t.getShadowRoot,
191
- shadowRootFilter: Ke
192
- }) : a = fe(e, t.includeContainer, z.bind(null, t)), pe(a);
193
- }, _e = function(e, t) {
194
- t = t || {};
195
- var a;
196
- return t.getShadowRoot ? a = q([e], t.includeContainer, {
197
- filter: U.bind(null, t),
198
- flatten: !0,
199
- getShadowRoot: t.getShadowRoot
200
- }) : a = fe(e, t.includeContainer, U.bind(null, t)), a;
201
- }, C = function(e, t) {
202
- if (t = t || {}, !e)
203
- throw new Error("No node provided");
204
- return O.call(e, _) === !1 ? !1 : z(t, e);
205
- }, Ge = /* @__PURE__ */ se.concat("iframe:not([inert]):not([inert] *)").join(","), Z = function(e, t) {
206
- if (t = t || {}, !e)
207
- throw new Error("No node provided");
208
- return O.call(e, Ge) === !1 ? !1 : U(t, e);
209
- };
210
- function X(r, e) {
211
- (e == null || e > r.length) && (e = r.length);
212
- for (var t = 0, a = Array(e); t < e; t++) a[t] = r[t];
213
- return a;
214
- }
215
- function Ve(r) {
216
- if (Array.isArray(r)) return X(r);
217
- }
218
- function qe(r, e, t) {
219
- return (e = Ye(e)) in r ? Object.defineProperty(r, e, {
220
- value: t,
221
- enumerable: !0,
222
- configurable: !0,
223
- writable: !0
224
- }) : r[e] = t, r;
225
- }
226
- function Ue(r) {
227
- if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
228
- }
229
- function $e() {
230
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
231
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
232
- }
233
- function ie(r, e) {
234
- var t = Object.keys(r);
235
- if (Object.getOwnPropertySymbols) {
236
- var a = Object.getOwnPropertySymbols(r);
237
- e && (a = a.filter(function(u) {
238
- return Object.getOwnPropertyDescriptor(r, u).enumerable;
239
- })), t.push.apply(t, a);
240
- }
241
- return t;
242
- }
243
- function oe(r) {
244
- for (var e = 1; e < arguments.length; e++) {
245
- var t = arguments[e] != null ? arguments[e] : {};
246
- e % 2 ? ie(Object(t), !0).forEach(function(a) {
247
- qe(r, a, t[a]);
248
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : ie(Object(t)).forEach(function(a) {
249
- Object.defineProperty(r, a, Object.getOwnPropertyDescriptor(t, a));
250
- });
251
- }
252
- return r;
253
- }
254
- function He(r) {
255
- return Ve(r) || Ue(r) || Ze(r) || $e();
256
- }
257
- function We(r, e) {
258
- if (typeof r != "object" || !r) return r;
259
- var t = r[Symbol.toPrimitive];
260
- if (t !== void 0) {
261
- var a = t.call(r, e);
262
- if (typeof a != "object") return a;
263
- throw new TypeError("@@toPrimitive must return a primitive value.");
264
- }
265
- return (e === "string" ? String : Number)(r);
266
- }
267
- function Ye(r) {
268
- var e = We(r, "string");
269
- return typeof e == "symbol" ? e : e + "";
270
- }
271
- function Ze(r, e) {
272
- if (r) {
273
- if (typeof r == "string") return X(r, e);
274
- var t = {}.toString.call(r).slice(8, -1);
275
- return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? X(r, e) : void 0;
276
- }
277
- }
278
- var ue = {
279
- activateTrap: function(e, t) {
280
- if (e.length > 0) {
281
- var a = e[e.length - 1];
282
- a !== t && a._setPausedState(!0);
283
- }
284
- var u = e.indexOf(t);
285
- u === -1 || e.splice(u, 1), e.push(t);
286
- },
287
- deactivateTrap: function(e, t) {
288
- var a = e.indexOf(t);
289
- a !== -1 && e.splice(a, 1), e.length > 0 && !e[e.length - 1]._isManuallyPaused() && e[e.length - 1]._setPausedState(!1);
290
- }
291
- }, ze = function(e) {
292
- return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
293
- }, Xe = function(e) {
294
- return e?.key === "Escape" || e?.key === "Esc" || e?.keyCode === 27;
295
- }, B = function(e) {
296
- return e?.key === "Tab" || e?.keyCode === 9;
297
- }, Je = function(e) {
298
- return B(e) && !e.shiftKey;
299
- }, Qe = function(e) {
300
- return B(e) && e.shiftKey;
301
- }, ce = function(e) {
302
- return setTimeout(e, 0);
303
- }, x = function(e) {
304
- for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), u = 1; u < t; u++)
305
- a[u - 1] = arguments[u];
306
- return typeof e == "function" ? e.apply(void 0, a) : e;
307
- }, K = function(e) {
308
- return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
309
- }, et = [], tt = function(e, t) {
310
- var a = t?.document || document, u = t?.trapStack || et, c = oe({
311
- returnFocusOnDeactivate: !0,
312
- escapeDeactivates: !0,
313
- delayInitialFocus: !0,
314
- isKeyForward: Je,
315
- isKeyBackward: Qe
316
- }, t), n = {
317
- // containers given to createFocusTrap()
318
- // @type {Array<HTMLElement>}
319
- containers: [],
320
- // list of objects identifying tabbable nodes in `containers` in the trap
321
- // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
322
- // is active, but the trap should never get to a state where there isn't at least one group
323
- // with at least one tabbable node in it (that would lead to an error condition that would
324
- // result in an error being thrown)
325
- // @type {Array<{
326
- // container: HTMLElement,
327
- // tabbableNodes: Array<HTMLElement>, // empty if none
328
- // focusableNodes: Array<HTMLElement>, // empty if none
329
- // posTabIndexesFound: boolean,
330
- // firstTabbableNode: HTMLElement|undefined,
331
- // lastTabbableNode: HTMLElement|undefined,
332
- // firstDomTabbableNode: HTMLElement|undefined,
333
- // lastDomTabbableNode: HTMLElement|undefined,
334
- // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
335
- // }>}
336
- containerGroups: [],
337
- // same order/length as `containers` list
338
- // references to objects in `containerGroups`, but only those that actually have
339
- // tabbable nodes in them
340
- // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
341
- // the same length
342
- tabbableGroups: [],
343
- nodeFocusedBeforeActivation: null,
344
- mostRecentlyFocusedNode: null,
345
- active: !1,
346
- paused: !1,
347
- manuallyPaused: !1,
348
- // timer ID for when delayInitialFocus is true and initial focus in this trap
349
- // has been delayed during activation
350
- delayInitialFocusTimer: void 0,
351
- // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
352
- recentNavEvent: void 0
353
- }, s, b = function(i, o, l) {
354
- return i && i[o] !== void 0 ? i[o] : c[l || o];
355
- }, p = function(i, o) {
356
- var l = typeof o?.composedPath == "function" ? o.composedPath() : void 0;
357
- return n.containerGroups.findIndex(function(f) {
358
- var v = f.container, y = f.tabbableNodes;
359
- return v.contains(i) || l?.includes(v) || y.find(function(d) {
360
- return d === i;
361
- });
362
- });
363
- }, g = function(i) {
364
- var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, l = o.hasFallback, f = l === void 0 ? !1 : l, v = o.params, y = v === void 0 ? [] : v, d = c[i];
365
- if (typeof d == "function" && (d = d.apply(void 0, He(y))), d === !0 && (d = void 0), !d) {
366
- if (d === void 0 || d === !1)
367
- return d;
368
- throw new Error("`".concat(i, "` was specified but was not a node, or did not return a node"));
369
- }
370
- var w = d;
371
- if (typeof d == "string") {
372
- try {
373
- w = a.querySelector(d);
374
- } catch (F) {
375
- throw new Error("`".concat(i, '` appears to be an invalid selector; error="').concat(F.message, '"'));
376
- }
377
- if (!w && !f)
378
- throw new Error("`".concat(i, "` as selector refers to no known node"));
379
- }
380
- return w;
381
- }, T = function() {
382
- var i = g("initialFocus", {
383
- hasFallback: !0
384
- });
385
- if (i === !1)
386
- return !1;
387
- if (i === void 0 || i && !Z(i, c.tabbableOptions))
388
- if (p(a.activeElement) >= 0)
389
- i = a.activeElement;
390
- else {
391
- var o = n.tabbableGroups[0], l = o && o.firstTabbableNode;
392
- i = l || g("fallbackFocus");
393
- }
394
- else i === null && (i = g("fallbackFocus"));
395
- if (!i)
396
- throw new Error("Your focus-trap needs to have at least one focusable element");
397
- return i;
398
- }, N = function() {
399
- if (n.containerGroups = n.containers.map(function(i) {
400
- var o = Me(i, c.tabbableOptions), l = _e(i, c.tabbableOptions), f = o.length > 0 ? o[0] : void 0, v = o.length > 0 ? o[o.length - 1] : void 0, y = l.find(function(F) {
401
- return C(F);
402
- }), d = l.slice().reverse().find(function(F) {
403
- return C(F);
404
- }), w = !!o.find(function(F) {
405
- return D(F) > 0;
406
- });
407
- return {
408
- container: i,
409
- tabbableNodes: o,
410
- focusableNodes: l,
411
- /** True if at least one node with positive `tabindex` was found in this container. */
412
- posTabIndexesFound: w,
413
- /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
414
- firstTabbableNode: f,
415
- /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
416
- lastTabbableNode: v,
417
- // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
418
- // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
419
- // because that API doesn't work with Shadow DOM as well as it should (@see
420
- // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
421
- // to address an edge case related to positive tabindex support, this seems like a much easier,
422
- // "close enough most of the time" alternative for positive tabindexes which should generally
423
- // be avoided anyway...
424
- /** First tabbable node in container, __DOM__ order; `undefined` if none. */
425
- firstDomTabbableNode: y,
426
- /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
427
- lastDomTabbableNode: d,
428
- /**
429
- * Finds the __tabbable__ node that follows the given node in the specified direction,
430
- * in this container, if any.
431
- * @param {HTMLElement} node
432
- * @param {boolean} [forward] True if going in forward tab order; false if going
433
- * in reverse.
434
- * @returns {HTMLElement|undefined} The next tabbable node, if any.
435
- */
436
- nextTabbableNode: function(S) {
437
- var P = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, k = o.indexOf(S);
438
- return k < 0 ? P ? l.slice(l.indexOf(S) + 1).find(function(R) {
439
- return C(R);
440
- }) : l.slice(0, l.indexOf(S)).reverse().find(function(R) {
441
- return C(R);
442
- }) : o[k + (P ? 1 : -1)];
443
- }
444
- };
445
- }), n.tabbableGroups = n.containerGroups.filter(function(i) {
446
- return i.tabbableNodes.length > 0;
447
- }), n.tabbableGroups.length <= 0 && !g("fallbackFocus"))
448
- throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
449
- if (n.containerGroups.find(function(i) {
450
- return i.posTabIndexesFound;
451
- }) && n.containerGroups.length > 1)
452
- 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.");
453
- }, E = function(i) {
454
- var o = i.activeElement;
455
- if (o)
456
- return o.shadowRoot && o.shadowRoot.activeElement !== null ? E(o.shadowRoot) : o;
457
- }, m = function(i) {
458
- if (i !== !1 && i !== E(document)) {
459
- if (!i || !i.focus) {
460
- m(T());
461
- return;
462
- }
463
- i.focus({
464
- preventScroll: !!c.preventScroll
465
- }), n.mostRecentlyFocusedNode = i, ze(i) && i.select();
466
- }
467
- }, L = function(i) {
468
- var o = g("setReturnFocus", {
469
- params: [i]
470
- });
471
- return o || (o === !1 ? !1 : i);
472
- }, j = function(i) {
473
- var o = i.target, l = i.event, f = i.isBackward, v = f === void 0 ? !1 : f;
474
- o = o || K(l), N();
475
- var y = null;
476
- if (n.tabbableGroups.length > 0) {
477
- var d = p(o, l), w = d >= 0 ? n.containerGroups[d] : void 0;
478
- if (d < 0)
479
- v ? y = n.tabbableGroups[n.tabbableGroups.length - 1].lastTabbableNode : y = n.tabbableGroups[0].firstTabbableNode;
480
- else if (v) {
481
- var F = n.tabbableGroups.findIndex(function(W) {
482
- var Y = W.firstTabbableNode;
483
- return o === Y;
484
- });
485
- if (F < 0 && (w.container === o || Z(o, c.tabbableOptions) && !C(o, c.tabbableOptions) && !w.nextTabbableNode(o, !1)) && (F = d), F >= 0) {
486
- var S = F === 0 ? n.tabbableGroups.length - 1 : F - 1, P = n.tabbableGroups[S];
487
- y = D(o) >= 0 ? P.lastTabbableNode : P.lastDomTabbableNode;
488
- } else B(l) || (y = w.nextTabbableNode(o, !1));
489
- } else {
490
- var k = n.tabbableGroups.findIndex(function(W) {
491
- var Y = W.lastTabbableNode;
492
- return o === Y;
493
- });
494
- if (k < 0 && (w.container === o || Z(o, c.tabbableOptions) && !C(o, c.tabbableOptions) && !w.nextTabbableNode(o)) && (k = d), k >= 0) {
495
- var R = k === n.tabbableGroups.length - 1 ? 0 : k + 1, re = n.tabbableGroups[R];
496
- y = D(o) >= 0 ? re.firstTabbableNode : re.firstDomTabbableNode;
497
- } else B(l) || (y = w.nextTabbableNode(o));
498
- }
499
- } else
500
- y = g("fallbackFocus");
501
- return y;
502
- }, I = function(i) {
503
- var o = K(i);
504
- if (!(p(o, i) >= 0)) {
505
- if (x(c.clickOutsideDeactivates, i)) {
506
- s.deactivate({
507
- // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
508
- // which will result in the outside click setting focus to the node
509
- // that was clicked (and if not focusable, to "nothing"); by setting
510
- // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
511
- // on activation (or the configured `setReturnFocus` node), whether the
512
- // outside click was on a focusable node or not
513
- returnFocus: c.returnFocusOnDeactivate
514
- });
515
- return;
516
- }
517
- x(c.allowOutsideClick, i) || i.preventDefault();
518
- }
519
- }, $ = function(i) {
520
- var o = K(i), l = p(o, i) >= 0;
521
- if (l || o instanceof Document)
522
- l && (n.mostRecentlyFocusedNode = o);
523
- else {
524
- i.stopImmediatePropagation();
525
- var f, v = !0;
526
- if (n.mostRecentlyFocusedNode)
527
- if (D(n.mostRecentlyFocusedNode) > 0) {
528
- var y = p(n.mostRecentlyFocusedNode), d = n.containerGroups[y].tabbableNodes;
529
- if (d.length > 0) {
530
- var w = d.findIndex(function(F) {
531
- return F === n.mostRecentlyFocusedNode;
532
- });
533
- w >= 0 && (c.isKeyForward(n.recentNavEvent) ? w + 1 < d.length && (f = d[w + 1], v = !1) : w - 1 >= 0 && (f = d[w - 1], v = !1));
534
- }
535
- } else
536
- n.containerGroups.some(function(F) {
537
- return F.tabbableNodes.some(function(S) {
538
- return D(S) > 0;
539
- });
540
- }) || (v = !1);
541
- else
542
- v = !1;
543
- v && (f = j({
544
- // move FROM the MRU node, not event-related node (which will be the node that is
545
- // outside the trap causing the focus escape we're trying to fix)
546
- target: n.mostRecentlyFocusedNode,
547
- isBackward: c.isKeyBackward(n.recentNavEvent)
548
- })), m(f || n.mostRecentlyFocusedNode || T());
549
- }
550
- n.recentNavEvent = void 0;
551
- }, he = function(i) {
552
- var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
553
- n.recentNavEvent = i;
554
- var l = j({
555
- event: i,
556
- isBackward: o
557
- });
558
- l && (B(i) && i.preventDefault(), m(l));
559
- }, J = function(i) {
560
- (c.isKeyForward(i) || c.isKeyBackward(i)) && he(i, c.isKeyBackward(i));
561
- }, Q = function(i) {
562
- Xe(i) && x(c.escapeDeactivates, i) !== !1 && (i.preventDefault(), s.deactivate());
563
- }, ee = function(i) {
564
- var o = K(i);
565
- p(o, i) >= 0 || x(c.clickOutsideDeactivates, i) || x(c.allowOutsideClick, i) || (i.preventDefault(), i.stopImmediatePropagation());
566
- }, te = function() {
567
- if (n.active)
568
- return ue.activateTrap(u, s), n.delayInitialFocusTimer = c.delayInitialFocus ? ce(function() {
569
- m(T());
570
- }) : m(T()), a.addEventListener("focusin", $, !0), a.addEventListener("mousedown", I, {
571
- capture: !0,
572
- passive: !1
573
- }), a.addEventListener("touchstart", I, {
574
- capture: !0,
575
- passive: !1
576
- }), a.addEventListener("click", ee, {
577
- capture: !0,
578
- passive: !1
579
- }), a.addEventListener("keydown", J, {
580
- capture: !0,
581
- passive: !1
582
- }), a.addEventListener("keydown", Q), s;
583
- }, ae = function() {
584
- if (n.active)
585
- return a.removeEventListener("focusin", $, !0), a.removeEventListener("mousedown", I, !0), a.removeEventListener("touchstart", I, !0), a.removeEventListener("click", ee, !0), a.removeEventListener("keydown", J, !0), a.removeEventListener("keydown", Q), s;
586
- }, ye = function(i) {
587
- var o = i.some(function(l) {
588
- var f = Array.from(l.removedNodes);
589
- return f.some(function(v) {
590
- return v === n.mostRecentlyFocusedNode;
591
- });
592
- });
593
- o && m(T());
594
- }, H = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ye) : void 0, A = function() {
595
- H && (H.disconnect(), n.active && !n.paused && n.containers.map(function(i) {
596
- H.observe(i, {
597
- subtree: !0,
598
- childList: !0
599
- });
600
- }));
601
- };
602
- return s = {
603
- get active() {
604
- return n.active;
605
- },
606
- get paused() {
607
- return n.paused;
608
- },
609
- activate: function(i) {
610
- if (n.active)
611
- return this;
612
- var o = b(i, "onActivate"), l = b(i, "onPostActivate"), f = b(i, "checkCanFocusTrap");
613
- f || N(), n.active = !0, n.paused = !1, n.nodeFocusedBeforeActivation = E(a), o?.();
614
- var v = function() {
615
- f && N(), te(), A(), l?.();
616
- };
617
- return f ? (f(n.containers.concat()).then(v, v), this) : (v(), this);
618
- },
619
- deactivate: function(i) {
620
- if (!n.active)
621
- return this;
622
- var o = oe({
623
- onDeactivate: c.onDeactivate,
624
- onPostDeactivate: c.onPostDeactivate,
625
- checkCanReturnFocus: c.checkCanReturnFocus
626
- }, i);
627
- clearTimeout(n.delayInitialFocusTimer), n.delayInitialFocusTimer = void 0, ae(), n.active = !1, n.paused = !1, A(), ue.deactivateTrap(u, s);
628
- var l = b(o, "onDeactivate"), f = b(o, "onPostDeactivate"), v = b(o, "checkCanReturnFocus"), y = b(o, "returnFocus", "returnFocusOnDeactivate");
629
- l?.();
630
- var d = function() {
631
- ce(function() {
632
- y && m(L(n.nodeFocusedBeforeActivation)), f?.();
633
- });
634
- };
635
- return y && v ? (v(L(n.nodeFocusedBeforeActivation)).then(d, d), this) : (d(), this);
636
- },
637
- pause: function(i) {
638
- return n.active ? (n.manuallyPaused = !0, this._setPausedState(!0, i)) : this;
639
- },
640
- unpause: function(i) {
641
- return n.active ? (n.manuallyPaused = !1, u[u.length - 1] !== this ? this : this._setPausedState(!1, i)) : this;
642
- },
643
- updateContainerElements: function(i) {
644
- var o = [].concat(i).filter(Boolean);
645
- return n.containers = o.map(function(l) {
646
- return typeof l == "string" ? a.querySelector(l) : l;
647
- }), n.active && N(), A(), this;
648
- }
649
- }, Object.defineProperties(s, {
650
- _isManuallyPaused: {
651
- value: function() {
652
- return n.manuallyPaused;
653
- }
654
- },
655
- _setPausedState: {
656
- value: function(i, o) {
657
- if (n.paused === i)
658
- return this;
659
- if (n.paused = i, i) {
660
- var l = b(o, "onPause"), f = b(o, "onPostPause");
661
- l?.(), ae(), A(), f?.();
662
- } else {
663
- var v = b(o, "onUnpause"), y = b(o, "onPostUnpause");
664
- v?.(), N(), te(), A(), y?.();
665
- }
666
- return this;
667
- }
668
- }
669
- }), s.updateContainerElements(e), s;
670
- };
671
- const at = {
672
- escapeDeactivates: {
673
- type: Boolean,
674
- default: !0
675
- },
676
- returnFocusOnDeactivate: {
677
- type: Boolean,
678
- default: !0
679
- },
680
- allowOutsideClick: {
681
- type: [Boolean, Function],
682
- default: !0
683
- },
684
- clickOutsideDeactivates: [Boolean, Function],
685
- initialFocus: [String, Function, Boolean],
686
- fallbackFocus: [String, Function],
687
- checkCanFocusTrap: Function,
688
- checkCanReturnFocus: Function,
689
- delayInitialFocus: {
690
- type: Boolean,
691
- default: !0
692
- },
693
- document: Object,
694
- preventScroll: Boolean,
695
- setReturnFocus: [Object, String, Boolean, Function],
696
- tabbableOptions: Object
697
- }, nt = me({
698
- props: Object.assign({
699
- active: {
700
- // TODO: could be options for activate but what about the options for deactivating?
701
- type: Boolean,
702
- default: !0
703
- }
704
- }, at),
705
- emits: [
706
- "update:active",
707
- "activate",
708
- "postActivate",
709
- "deactivate",
710
- "postDeactivate"
711
- ],
712
- render() {
713
- return this.renderImpl();
714
- },
715
- setup(r, { slots: e, emit: t }) {
716
- let a;
717
- const u = le(null), c = ge(() => {
718
- const s = u.value;
719
- return s && (s instanceof HTMLElement ? s : s.$el);
720
- });
721
- function n() {
722
- return a || (a = tt(c.value, {
723
- escapeDeactivates: r.escapeDeactivates,
724
- allowOutsideClick: r.allowOutsideClick,
725
- returnFocusOnDeactivate: r.returnFocusOnDeactivate,
726
- clickOutsideDeactivates: r.clickOutsideDeactivates,
727
- onActivate: () => {
728
- t("update:active", !0), t("activate");
729
- },
730
- onDeactivate: () => {
731
- t("update:active", !1), t("deactivate");
732
- },
733
- onPostActivate: () => t("postActivate"),
734
- onPostDeactivate: () => t("postDeactivate"),
735
- initialFocus: r.initialFocus,
736
- fallbackFocus: r.fallbackFocus,
737
- tabbableOptions: r.tabbableOptions,
738
- delayInitialFocus: r.delayInitialFocus
739
- }));
740
- }
741
- return we(() => {
742
- Fe(() => r.active, (s) => {
743
- s && c.value ? n().activate() : a && (a.deactivate(), (!c.value || c.value.nodeType === Node.COMMENT_NODE) && (a = null));
744
- }, { immediate: !0, flush: "post" });
745
- }), Te(() => {
746
- a && a.deactivate(), a = null;
747
- }), {
748
- activate() {
749
- n().activate();
750
- },
751
- deactivate() {
752
- a && a.deactivate();
753
- },
754
- renderImpl() {
755
- if (!e.default)
756
- return null;
757
- const s = e.default().filter((p) => p.type !== Ne);
758
- return !s || !s.length || s.length > 1 ? (console.error("[focus-trap-vue]: FocusTrap requires exactly one child."), s) : ke(s[0], { ref: u });
759
- }
760
- };
761
- }
762
- }), M = (r) => {
763
- r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation();
764
- }, it = ({
765
- getNextElement: r,
766
- getFirstElement: e,
767
- getLastElement: t,
768
- close: a,
769
- disableSpaceToClick: u,
770
- keepOpenedOnTab: c
771
- }) => {
772
- const n = le(null), s = () => {
773
- };
774
- let b = s;
775
- const p = () => {
776
- n.value = null, b = s;
777
- }, g = (m) => {
778
- n.value = m.index, b = m.onClick;
779
- }, T = (m) => {
780
- g(r(n.value, m));
781
- }, N = () => {
782
- p(), a();
783
- };
784
- return {
785
- onKeydown: (m) => {
786
- switch (m.code) {
787
- case "ArrowDown":
788
- M(m), T(1);
789
- break;
790
- case "ArrowUp":
791
- M(m), T(-1);
792
- break;
793
- case "Enter":
794
- case "Space": {
795
- const L = m.code === "Enter", j = m.code === "Space";
796
- n.value !== null && (L || j && !u) && (M(m), b());
797
- break;
798
- }
799
- case "Home":
800
- e && g(e());
801
- break;
802
- case "End":
803
- t && g(t());
804
- break;
805
- case "Escape":
806
- M(m), N();
807
- break;
808
- case "Tab":
809
- c || N();
810
- break;
811
- }
812
- },
813
- currentIndex: Ee(n),
814
- resetNavigation: p,
815
- setElement: g
816
- };
817
- };
818
- export {
819
- nt as F,
820
- it as u
821
- };