@jobber/components 6.122.0 → 6.123.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 (107) hide show
  1. package/dist/Autocomplete/index.cjs +1 -0
  2. package/dist/Autocomplete/index.mjs +2 -1
  3. package/dist/BottomSheet-cjs.js +66 -0
  4. package/dist/BottomSheet-es.js +64 -0
  5. package/dist/Card/index.cjs +3 -2
  6. package/dist/Card/index.mjs +3 -2
  7. package/dist/Chip/index.cjs +3 -2
  8. package/dist/Chip/index.mjs +3 -2
  9. package/dist/Chips/InternalChipDismissible/hooks/index.cjs +3 -2
  10. package/dist/Chips/InternalChipDismissible/hooks/index.mjs +3 -2
  11. package/dist/Chips/InternalChipDismissible/index.cjs +3 -2
  12. package/dist/Chips/InternalChipDismissible/index.mjs +3 -2
  13. package/dist/Chips/index.cjs +3 -2
  14. package/dist/Chips/index.mjs +3 -2
  15. package/dist/Combobox/components/ComboboxActivator/index.cjs +3 -2
  16. package/dist/Combobox/components/ComboboxActivator/index.mjs +3 -2
  17. package/dist/Combobox/components/ComboboxContent/index.cjs +3 -2
  18. package/dist/Combobox/components/ComboboxContent/index.mjs +3 -2
  19. package/dist/Combobox/components/ComboboxTrigger/index.cjs +3 -2
  20. package/dist/Combobox/components/ComboboxTrigger/index.mjs +3 -2
  21. package/dist/Combobox/index.cjs +3 -2
  22. package/dist/Combobox/index.mjs +3 -2
  23. package/dist/ComboboxContent-es.js +1 -1
  24. package/dist/ConfirmationModal/index.cjs +2 -1
  25. package/dist/ConfirmationModal/index.mjs +2 -1
  26. package/dist/DataDump/index.cjs +3 -2
  27. package/dist/DataDump/index.mjs +3 -2
  28. package/dist/DataList/components/DataListActions/index.cjs +3 -2
  29. package/dist/DataList/components/DataListActions/index.mjs +3 -2
  30. package/dist/DataList/components/DataListBulkActions/index.cjs +3 -2
  31. package/dist/DataList/components/DataListBulkActions/index.mjs +3 -2
  32. package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +3 -2
  33. package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +3 -2
  34. package/dist/DataList/components/DataListFilters/index.cjs +3 -2
  35. package/dist/DataList/components/DataListFilters/index.mjs +3 -2
  36. package/dist/DataList/components/DataListHeader/index.cjs +3 -2
  37. package/dist/DataList/components/DataListHeader/index.mjs +3 -2
  38. package/dist/DataList/components/DataListItem/index.cjs +3 -2
  39. package/dist/DataList/components/DataListItem/index.mjs +3 -2
  40. package/dist/DataList/components/DataListItemActions/index.cjs +3 -2
  41. package/dist/DataList/components/DataListItemActions/index.mjs +3 -2
  42. package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +3 -2
  43. package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +3 -2
  44. package/dist/DataList/components/DataListItems/index.cjs +3 -2
  45. package/dist/DataList/components/DataListItems/index.mjs +3 -2
  46. package/dist/DataList/components/DataListLayout/index.cjs +3 -2
  47. package/dist/DataList/components/DataListLayout/index.mjs +3 -2
  48. package/dist/DataList/components/DataListLayoutActions/index.cjs +3 -2
  49. package/dist/DataList/components/DataListLayoutActions/index.mjs +3 -2
  50. package/dist/DataList/index.cjs +3 -2
  51. package/dist/DataList/index.mjs +3 -2
  52. package/dist/DatePicker/index.cjs +3 -2
  53. package/dist/DatePicker/index.mjs +3 -2
  54. package/dist/DatePicker-es.js +1 -1
  55. package/dist/DrawerRoot-cjs.js +6181 -0
  56. package/dist/DrawerRoot-es.js +6056 -0
  57. package/dist/FormatFile/index.cjs +2 -1
  58. package/dist/FormatFile/index.mjs +2 -1
  59. package/dist/Gallery/index.cjs +2 -1
  60. package/dist/Gallery/index.mjs +2 -1
  61. package/dist/InputDate/index.cjs +3 -2
  62. package/dist/InputDate/index.mjs +3 -2
  63. package/dist/LightBox/index.cjs +2 -1
  64. package/dist/LightBox/index.mjs +2 -1
  65. package/dist/Menu/index.cjs +3 -2
  66. package/dist/Menu/index.mjs +3 -2
  67. package/dist/Menu-es.js +1 -1
  68. package/dist/Modal/index.cjs +2 -1
  69. package/dist/Modal/index.mjs +2 -1
  70. package/dist/OverlaySeparator-cjs.js +15 -0
  71. package/dist/OverlaySeparator-es.js +13 -0
  72. package/dist/Page/index.cjs +2 -1
  73. package/dist/Page/index.mjs +2 -1
  74. package/dist/Popover/index.cjs +3 -2
  75. package/dist/Popover/index.mjs +3 -2
  76. package/dist/Popover-es.js +1 -1
  77. package/dist/Separator-cjs.js +53 -0
  78. package/dist/Separator-es.js +32 -0
  79. package/dist/Tooltip/index.cjs +3 -2
  80. package/dist/Tooltip/index.mjs +3 -2
  81. package/dist/Tooltip-es.js +1 -1
  82. package/dist/floating-ui.react-cjs.js +45 -44
  83. package/dist/floating-ui.react-dom-cjs.js +155 -1053
  84. package/dist/floating-ui.react-dom-es.js +2 -876
  85. package/dist/floating-ui.react-es.js +2 -1
  86. package/dist/index.cjs +3 -2
  87. package/dist/index.esm-cjs.js +921 -0
  88. package/dist/index.esm-es.js +876 -0
  89. package/dist/index.mjs +3 -2
  90. package/dist/primitives/BottomSheet/BottomSheet.d.ts +15 -0
  91. package/dist/primitives/BottomSheet/index.cjs +16 -0
  92. package/dist/primitives/BottomSheet/index.d.ts +1 -0
  93. package/dist/primitives/BottomSheet/index.mjs +10 -0
  94. package/dist/primitives/OverlaySeparator/OverlaySeparator.d.ts +6 -0
  95. package/dist/primitives/OverlaySeparator/index.cjs +12 -0
  96. package/dist/primitives/OverlaySeparator/index.d.ts +1 -0
  97. package/dist/primitives/OverlaySeparator/index.mjs +6 -0
  98. package/dist/primitives/index.cjs +17 -0
  99. package/dist/primitives/index.d.ts +2 -0
  100. package/dist/primitives/index.mjs +12 -1
  101. package/dist/unstyledPrimitives/index.cjs +7676 -9833
  102. package/dist/unstyledPrimitives/index.d.ts +6 -9
  103. package/dist/unstyledPrimitives/index.mjs +7551 -9711
  104. package/dist/useRenderElement-cjs.js +598 -0
  105. package/dist/useRenderElement-es.js +569 -0
  106. package/dist/useScrollToActive-es.js +1 -1
  107. package/package.json +2 -2
@@ -0,0 +1,876 @@
1
+ function hasWindow() {
2
+ return typeof window !== 'undefined';
3
+ }
4
+ function getNodeName(node) {
5
+ if (isNode(node)) {
6
+ return (node.nodeName || '').toLowerCase();
7
+ }
8
+ // Mocked nodes in testing environments may not be instances of Node. By
9
+ // returning `#document` an infinite loop won't occur.
10
+ // https://github.com/floating-ui/floating-ui/issues/2317
11
+ return '#document';
12
+ }
13
+ function getWindow(node) {
14
+ var _node$ownerDocument;
15
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
16
+ }
17
+ function getDocumentElement(node) {
18
+ var _ref;
19
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
20
+ }
21
+ function isNode(value) {
22
+ if (!hasWindow()) {
23
+ return false;
24
+ }
25
+ return value instanceof Node || value instanceof getWindow(value).Node;
26
+ }
27
+ function isElement(value) {
28
+ if (!hasWindow()) {
29
+ return false;
30
+ }
31
+ return value instanceof Element || value instanceof getWindow(value).Element;
32
+ }
33
+ function isHTMLElement(value) {
34
+ if (!hasWindow()) {
35
+ return false;
36
+ }
37
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
38
+ }
39
+ function isShadowRoot(value) {
40
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
41
+ return false;
42
+ }
43
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
44
+ }
45
+ function isOverflowElement(element) {
46
+ const {
47
+ overflow,
48
+ overflowX,
49
+ overflowY,
50
+ display
51
+ } = getComputedStyle$1(element);
52
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
53
+ }
54
+ function isTableElement(element) {
55
+ return /^(table|td|th)$/.test(getNodeName(element));
56
+ }
57
+ function isTopLayer(element) {
58
+ try {
59
+ if (element.matches(':popover-open')) {
60
+ return true;
61
+ }
62
+ } catch (_e) {
63
+ // no-op
64
+ }
65
+ try {
66
+ return element.matches(':modal');
67
+ } catch (_e) {
68
+ return false;
69
+ }
70
+ }
71
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
72
+ const containRe = /paint|layout|strict|content/;
73
+ const isNotNone = value => !!value && value !== 'none';
74
+ let isWebKitValue;
75
+ function isContainingBlock(elementOrCss) {
76
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
77
+
78
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
79
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
80
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
81
+ }
82
+ function getContainingBlock(element) {
83
+ let currentNode = getParentNode(element);
84
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
85
+ if (isContainingBlock(currentNode)) {
86
+ return currentNode;
87
+ } else if (isTopLayer(currentNode)) {
88
+ return null;
89
+ }
90
+ currentNode = getParentNode(currentNode);
91
+ }
92
+ return null;
93
+ }
94
+ function isWebKit() {
95
+ if (isWebKitValue == null) {
96
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
97
+ }
98
+ return isWebKitValue;
99
+ }
100
+ function isLastTraversableNode(node) {
101
+ return /^(html|body|#document)$/.test(getNodeName(node));
102
+ }
103
+ function getComputedStyle$1(element) {
104
+ return getWindow(element).getComputedStyle(element);
105
+ }
106
+ function getNodeScroll(element) {
107
+ if (isElement(element)) {
108
+ return {
109
+ scrollLeft: element.scrollLeft,
110
+ scrollTop: element.scrollTop
111
+ };
112
+ }
113
+ return {
114
+ scrollLeft: element.scrollX,
115
+ scrollTop: element.scrollY
116
+ };
117
+ }
118
+ function getParentNode(node) {
119
+ if (getNodeName(node) === 'html') {
120
+ return node;
121
+ }
122
+ const result =
123
+ // Step into the shadow DOM of the parent of a slotted node.
124
+ node.assignedSlot ||
125
+ // DOM Element detected.
126
+ node.parentNode ||
127
+ // ShadowRoot detected.
128
+ isShadowRoot(node) && node.host ||
129
+ // Fallback.
130
+ getDocumentElement(node);
131
+ return isShadowRoot(result) ? result.host : result;
132
+ }
133
+ function getNearestOverflowAncestor(node) {
134
+ const parentNode = getParentNode(node);
135
+ if (isLastTraversableNode(parentNode)) {
136
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
137
+ }
138
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
139
+ return parentNode;
140
+ }
141
+ return getNearestOverflowAncestor(parentNode);
142
+ }
143
+ function getOverflowAncestors(node, list, traverseIframes) {
144
+ var _node$ownerDocument2;
145
+ if (list === void 0) {
146
+ list = [];
147
+ }
148
+ if (traverseIframes === void 0) {
149
+ traverseIframes = true;
150
+ }
151
+ const scrollableAncestor = getNearestOverflowAncestor(node);
152
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
153
+ const win = getWindow(scrollableAncestor);
154
+ if (isBody) {
155
+ const frameElement = getFrameElement(win);
156
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
157
+ } else {
158
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
159
+ }
160
+ }
161
+ function getFrameElement(win) {
162
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
163
+ }
164
+
165
+ /**
166
+ * Custom positioning reference element.
167
+ * @see https://floating-ui.com/docs/virtual-elements
168
+ */
169
+
170
+ const sides = ['top', 'right', 'bottom', 'left'];
171
+ const alignments = ['start', 'end'];
172
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
173
+ const min = Math.min;
174
+ const max = Math.max;
175
+ const round = Math.round;
176
+ const floor = Math.floor;
177
+ const createCoords = v => ({
178
+ x: v,
179
+ y: v
180
+ });
181
+ const oppositeSideMap = {
182
+ left: 'right',
183
+ right: 'left',
184
+ bottom: 'top',
185
+ top: 'bottom'
186
+ };
187
+ function clamp(start, value, end) {
188
+ return max(start, min(value, end));
189
+ }
190
+ function evaluate(value, param) {
191
+ return typeof value === 'function' ? value(param) : value;
192
+ }
193
+ function getSide(placement) {
194
+ return placement.split('-')[0];
195
+ }
196
+ function getAlignment(placement) {
197
+ return placement.split('-')[1];
198
+ }
199
+ function getOppositeAxis(axis) {
200
+ return axis === 'x' ? 'y' : 'x';
201
+ }
202
+ function getAxisLength(axis) {
203
+ return axis === 'y' ? 'height' : 'width';
204
+ }
205
+ function getSideAxis(placement) {
206
+ const firstChar = placement[0];
207
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
208
+ }
209
+ function getAlignmentAxis(placement) {
210
+ return getOppositeAxis(getSideAxis(placement));
211
+ }
212
+ function getAlignmentSides(placement, rects, rtl) {
213
+ if (rtl === void 0) {
214
+ rtl = false;
215
+ }
216
+ const alignment = getAlignment(placement);
217
+ const alignmentAxis = getAlignmentAxis(placement);
218
+ const length = getAxisLength(alignmentAxis);
219
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
220
+ if (rects.reference[length] > rects.floating[length]) {
221
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
222
+ }
223
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
224
+ }
225
+ function getExpandedPlacements(placement) {
226
+ const oppositePlacement = getOppositePlacement(placement);
227
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
228
+ }
229
+ function getOppositeAlignmentPlacement(placement) {
230
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
231
+ }
232
+ const lrPlacement = ['left', 'right'];
233
+ const rlPlacement = ['right', 'left'];
234
+ const tbPlacement = ['top', 'bottom'];
235
+ const btPlacement = ['bottom', 'top'];
236
+ function getSideList(side, isStart, rtl) {
237
+ switch (side) {
238
+ case 'top':
239
+ case 'bottom':
240
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
241
+ return isStart ? lrPlacement : rlPlacement;
242
+ case 'left':
243
+ case 'right':
244
+ return isStart ? tbPlacement : btPlacement;
245
+ default:
246
+ return [];
247
+ }
248
+ }
249
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
250
+ const alignment = getAlignment(placement);
251
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
252
+ if (alignment) {
253
+ list = list.map(side => side + "-" + alignment);
254
+ if (flipAlignment) {
255
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
256
+ }
257
+ }
258
+ return list;
259
+ }
260
+ function getOppositePlacement(placement) {
261
+ const side = getSide(placement);
262
+ return oppositeSideMap[side] + placement.slice(side.length);
263
+ }
264
+ function expandPaddingObject(padding) {
265
+ return {
266
+ top: 0,
267
+ right: 0,
268
+ bottom: 0,
269
+ left: 0,
270
+ ...padding
271
+ };
272
+ }
273
+ function getPaddingObject(padding) {
274
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
275
+ top: padding,
276
+ right: padding,
277
+ bottom: padding,
278
+ left: padding
279
+ };
280
+ }
281
+ function rectToClientRect(rect) {
282
+ const {
283
+ x,
284
+ y,
285
+ width,
286
+ height
287
+ } = rect;
288
+ return {
289
+ width,
290
+ height,
291
+ top: y,
292
+ left: x,
293
+ right: x + width,
294
+ bottom: y + height,
295
+ x,
296
+ y
297
+ };
298
+ }
299
+
300
+ /*!
301
+ * tabbable 6.4.0
302
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
303
+ */
304
+ // NOTE: separate `:not()` selectors has broader browser support than the newer
305
+ // `:not([inert], [inert] *)` (Feb 2023)
306
+ var candidateSelectors = ['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] *)'];
307
+ var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
308
+ var NoElement = typeof Element === 'undefined';
309
+ var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
310
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
311
+ var _element$getRootNode;
312
+ return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
313
+ } : function (element) {
314
+ return element === null || element === void 0 ? void 0 : element.ownerDocument;
315
+ };
316
+
317
+ /**
318
+ * Determines if a node is inert or in an inert ancestor.
319
+ * @param {Node} [node]
320
+ * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
321
+ * see if any of them are inert. If false, only `node` itself is considered.
322
+ * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
323
+ * False if `node` is falsy.
324
+ */
325
+ var _isInert = function isInert(node, lookUp) {
326
+ var _node$getAttribute;
327
+ if (lookUp === void 0) {
328
+ lookUp = true;
329
+ }
330
+ // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
331
+ // JS API property; we have to check the attribute, which can either be empty or 'true';
332
+ // if it's `null` (not specified) or 'false', it's an active element
333
+ var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
334
+ var inert = inertAtt === '' || inertAtt === 'true';
335
+
336
+ // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
337
+ // if it weren't for `matches()` not being a function on shadow roots; the following
338
+ // code works for any kind of node
339
+ var result = inert || lookUp && node && (
340
+ // closest does not exist on shadow roots, so we fall back to a manual
341
+ // lookup upward, in case it is not defined.
342
+ typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));
343
+ return result;
344
+ };
345
+
346
+ /**
347
+ * Determines if a node's content is editable.
348
+ * @param {Element} [node]
349
+ * @returns True if it's content-editable; false if it's not or `node` is falsy.
350
+ */
351
+ var isContentEditable = function isContentEditable(node) {
352
+ var _node$getAttribute2;
353
+ // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
354
+ // to use the attribute directly to check for this, which can either be empty or 'true';
355
+ // if it's `null` (not specified) or 'false', it's a non-editable element
356
+ var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
357
+ return attValue === '' || attValue === 'true';
358
+ };
359
+
360
+ /**
361
+ * @param {Element} el container to check in
362
+ * @param {boolean} includeContainer add container to check
363
+ * @param {(node: Element) => boolean} filter filter candidates
364
+ * @returns {Element[]}
365
+ */
366
+ var getCandidates = function getCandidates(el, includeContainer, filter) {
367
+ // even if `includeContainer=false`, we still have to check it for inertness because
368
+ // if it's inert (either by itself or via its parent), then all its children are inert
369
+ if (_isInert(el)) {
370
+ return [];
371
+ }
372
+ var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
373
+ if (includeContainer && matches.call(el, candidateSelector)) {
374
+ candidates.unshift(el);
375
+ }
376
+ candidates = candidates.filter(filter);
377
+ return candidates;
378
+ };
379
+
380
+ /**
381
+ * @callback GetShadowRoot
382
+ * @param {Element} element to check for shadow root
383
+ * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
384
+ */
385
+
386
+ /**
387
+ * @callback ShadowRootFilter
388
+ * @param {Element} shadowHostNode the element which contains shadow content
389
+ * @returns {boolean} true if a shadow root could potentially contain valid candidates.
390
+ */
391
+
392
+ /**
393
+ * @typedef {Object} CandidateScope
394
+ * @property {Element} scopeParent contains inner candidates
395
+ * @property {Element[]} candidates list of candidates found in the scope parent
396
+ */
397
+
398
+ /**
399
+ * @typedef {Object} IterativeOptions
400
+ * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
401
+ * if a function, implies shadow support is enabled and either returns the shadow root of an element
402
+ * or a boolean stating if it has an undisclosed shadow root
403
+ * @property {(node: Element) => boolean} filter filter candidates
404
+ * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
405
+ * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
406
+ */
407
+
408
+ /**
409
+ * @param {Element[]} elements list of element containers to match candidates from
410
+ * @param {boolean} includeContainer add container list to check
411
+ * @param {IterativeOptions} options
412
+ * @returns {Array.<Element|CandidateScope>}
413
+ */
414
+ var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
415
+ var candidates = [];
416
+ var elementsToCheck = Array.from(elements);
417
+ while (elementsToCheck.length) {
418
+ var element = elementsToCheck.shift();
419
+ if (_isInert(element, false)) {
420
+ // no need to look up since we're drilling down
421
+ // anything inside this container will also be inert
422
+ continue;
423
+ }
424
+ if (element.tagName === 'SLOT') {
425
+ // add shadow dom slot scope (slot itself cannot be focusable)
426
+ var assigned = element.assignedElements();
427
+ var content = assigned.length ? assigned : element.children;
428
+ var nestedCandidates = _getCandidatesIteratively(content, true, options);
429
+ if (options.flatten) {
430
+ candidates.push.apply(candidates, nestedCandidates);
431
+ } else {
432
+ candidates.push({
433
+ scopeParent: element,
434
+ candidates: nestedCandidates
435
+ });
436
+ }
437
+ } else {
438
+ // check candidate element
439
+ var validCandidate = matches.call(element, candidateSelector);
440
+ if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
441
+ candidates.push(element);
442
+ }
443
+
444
+ // iterate over shadow content if possible
445
+ var shadowRoot = element.shadowRoot ||
446
+ // check for an undisclosed shadow
447
+ typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
448
+
449
+ // no inert look up because we're already drilling down and checking for inertness
450
+ // on the way down, so all containers to this root node should have already been
451
+ // vetted as non-inert
452
+ var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
453
+ if (shadowRoot && validShadowRoot) {
454
+ // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
455
+ // shadow exists, so look at light dom children as fallback BUT create a scope for any
456
+ // child candidates found because they're likely slotted elements (elements that are
457
+ // children of the web component element (which has the shadow), in the light dom, but
458
+ // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
459
+ // _after_ we return from this recursive call
460
+ var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
461
+ if (options.flatten) {
462
+ candidates.push.apply(candidates, _nestedCandidates);
463
+ } else {
464
+ candidates.push({
465
+ scopeParent: element,
466
+ candidates: _nestedCandidates
467
+ });
468
+ }
469
+ } else {
470
+ // there's not shadow so just dig into the element's (light dom) children
471
+ // __without__ giving the element special scope treatment
472
+ elementsToCheck.unshift.apply(elementsToCheck, element.children);
473
+ }
474
+ }
475
+ }
476
+ return candidates;
477
+ };
478
+
479
+ /**
480
+ * @private
481
+ * Determines if the node has an explicitly specified `tabindex` attribute.
482
+ * @param {HTMLElement} node
483
+ * @returns {boolean} True if so; false if not.
484
+ */
485
+ var hasTabIndex = function hasTabIndex(node) {
486
+ return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
487
+ };
488
+
489
+ /**
490
+ * Determine the tab index of a given node.
491
+ * @param {HTMLElement} node
492
+ * @returns {number} Tab order (negative, 0, or positive number).
493
+ * @throws {Error} If `node` is falsy.
494
+ */
495
+ var getTabIndex = function getTabIndex(node) {
496
+ if (!node) {
497
+ throw new Error('No node provided');
498
+ }
499
+ if (node.tabIndex < 0) {
500
+ // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
501
+ // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
502
+ // yet they are still part of the regular tab order; in FF, they get a default
503
+ // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
504
+ // order, consider their tab index to be 0.
505
+ // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
506
+ // so if they don't have a tabindex attribute specifically set, assume it's 0.
507
+ if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
508
+ return 0;
509
+ }
510
+ }
511
+ return node.tabIndex;
512
+ };
513
+
514
+ /**
515
+ * Determine the tab index of a given node __for sort order purposes__.
516
+ * @param {HTMLElement} node
517
+ * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
518
+ * has tabIndex -1, but needs to be sorted by document order in order for its content to be
519
+ * inserted into the correct sort position.
520
+ * @returns {number} Tab order (negative, 0, or positive number).
521
+ */
522
+ var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
523
+ var tabIndex = getTabIndex(node);
524
+ if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
525
+ return 0;
526
+ }
527
+ return tabIndex;
528
+ };
529
+ var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
530
+ return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
531
+ };
532
+ var isInput = function isInput(node) {
533
+ return node.tagName === 'INPUT';
534
+ };
535
+ var isHiddenInput = function isHiddenInput(node) {
536
+ return isInput(node) && node.type === 'hidden';
537
+ };
538
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
539
+ var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
540
+ return child.tagName === 'SUMMARY';
541
+ });
542
+ return r;
543
+ };
544
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
545
+ for (var i = 0; i < nodes.length; i++) {
546
+ if (nodes[i].checked && nodes[i].form === form) {
547
+ return nodes[i];
548
+ }
549
+ }
550
+ };
551
+ var isTabbableRadio = function isTabbableRadio(node) {
552
+ if (!node.name) {
553
+ return true;
554
+ }
555
+ var radioScope = node.form || getRootNode(node);
556
+ var queryRadios = function queryRadios(name) {
557
+ return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
558
+ };
559
+ var radioSet;
560
+ if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
561
+ radioSet = queryRadios(window.CSS.escape(node.name));
562
+ } else {
563
+ try {
564
+ radioSet = queryRadios(node.name);
565
+ } catch (err) {
566
+ // eslint-disable-next-line no-console
567
+ 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', err.message);
568
+ return false;
569
+ }
570
+ }
571
+ var checked = getCheckedRadio(radioSet, node.form);
572
+ return !checked || checked === node;
573
+ };
574
+ var isRadio = function isRadio(node) {
575
+ return isInput(node) && node.type === 'radio';
576
+ };
577
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
578
+ return isRadio(node) && !isTabbableRadio(node);
579
+ };
580
+
581
+ // determines if a node is ultimately attached to the window's document
582
+ var isNodeAttached = function isNodeAttached(node) {
583
+ var _nodeRoot;
584
+ // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
585
+ // (but NOT _the_ document; see second 'If' comment below for more).
586
+ // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
587
+ // is attached, and the one we need to check if it's in the document or not (because the
588
+ // shadow, and all nodes it contains, is never considered in the document since shadows
589
+ // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
590
+ // is hidden, or is not in the document itself but is detached, it will affect the shadow's
591
+ // visibility, including all the nodes it contains). The host could be any normal node,
592
+ // or a custom element (i.e. web component). Either way, that's the one that is considered
593
+ // part of the document, not the shadow root, nor any of its children (i.e. the node being
594
+ // tested).
595
+ // To further complicate things, we have to look all the way up until we find a shadow HOST
596
+ // that is attached (or find none) because the node might be in nested shadows...
597
+ // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
598
+ // document (per the docs) and while it's a Document-type object, that document does not
599
+ // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
600
+ // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
601
+ // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
602
+ // node is actually detached.
603
+ // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
604
+ // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
605
+ // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
606
+ // `ownerDocument` will be `null`, hence the optional chaining on it.
607
+ var nodeRoot = node && getRootNode(node);
608
+ var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
609
+
610
+ // in some cases, a detached node will return itself as the root instead of a document or
611
+ // shadow root object, in which case, we shouldn't try to look further up the host chain
612
+ var attached = false;
613
+ if (nodeRoot && nodeRoot !== node) {
614
+ var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
615
+ attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
616
+ while (!attached && nodeRootHost) {
617
+ var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
618
+ // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
619
+ // which means we need to get the host's host and check if that parent host is contained
620
+ // in (i.e. attached to) the document
621
+ nodeRoot = getRootNode(nodeRootHost);
622
+ nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
623
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
624
+ }
625
+ }
626
+ return attached;
627
+ };
628
+ var isZeroArea = function isZeroArea(node) {
629
+ var _node$getBoundingClie = node.getBoundingClientRect(),
630
+ width = _node$getBoundingClie.width,
631
+ height = _node$getBoundingClie.height;
632
+ return width === 0 && height === 0;
633
+ };
634
+ var isHidden = function isHidden(node, _ref) {
635
+ var displayCheck = _ref.displayCheck,
636
+ getShadowRoot = _ref.getShadowRoot;
637
+ if (displayCheck === 'full-native') {
638
+ if ('checkVisibility' in node) {
639
+ // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4
640
+ // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility
641
+ var visible = node.checkVisibility({
642
+ // Checking opacity might be desirable for some use cases, but natively,
643
+ // opacity zero elements _are_ focusable and tabbable.
644
+ checkOpacity: false,
645
+ opacityProperty: false,
646
+ contentVisibilityAuto: true,
647
+ visibilityProperty: true,
648
+ // This is an alias for `visibilityProperty`. Contemporary browsers
649
+ // support both. However, this alias has wider browser support (Chrome
650
+ // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
651
+ // we include it anyway.
652
+ checkVisibilityCSS: true
653
+ });
654
+ return !visible;
655
+ }
656
+ // Fall through to manual visibility checks
657
+ }
658
+
659
+ // NOTE: visibility will be `undefined` if node is detached from the document
660
+ // (see notes about this further down), which means we will consider it visible
661
+ // (this is legacy behavior from a very long way back)
662
+ // NOTE: we check this regardless of `displayCheck="none"` because this is a
663
+ // _visibility_ check, not a _display_ check
664
+ if (getComputedStyle(node).visibility === 'hidden') {
665
+ return true;
666
+ }
667
+ var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
668
+ var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
669
+ if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
670
+ return true;
671
+ }
672
+ if (!displayCheck || displayCheck === 'full' ||
673
+ // full-native can run this branch when it falls through in case
674
+ // Element#checkVisibility is unsupported
675
+ displayCheck === 'full-native' || displayCheck === 'legacy-full') {
676
+ if (typeof getShadowRoot === 'function') {
677
+ // figure out if we should consider the node to be in an undisclosed shadow and use the
678
+ // 'non-zero-area' fallback
679
+ var originalNode = node;
680
+ while (node) {
681
+ var parentElement = node.parentElement;
682
+ var rootNode = getRootNode(node);
683
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
684
+ ) {
685
+ // node has an undisclosed shadow which means we can only treat it as a black box, so we
686
+ // fall back to a non-zero-area test
687
+ return isZeroArea(node);
688
+ } else if (node.assignedSlot) {
689
+ // iterate up slot
690
+ node = node.assignedSlot;
691
+ } else if (!parentElement && rootNode !== node.ownerDocument) {
692
+ // cross shadow boundary
693
+ node = rootNode.host;
694
+ } else {
695
+ // iterate up normal dom
696
+ node = parentElement;
697
+ }
698
+ }
699
+ node = originalNode;
700
+ }
701
+ // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
702
+ // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
703
+ // it might be a falsy value, which means shadow DOM support is disabled
704
+
705
+ // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
706
+ // now we can just test to see if it would normally be visible or not, provided it's
707
+ // attached to the main document.
708
+ // NOTE: We must consider case where node is inside a shadow DOM and given directly to
709
+ // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
710
+
711
+ if (isNodeAttached(node)) {
712
+ // this works wherever the node is: if there's at least one client rect, it's
713
+ // somehow displayed; it also covers the CSS 'display: contents' case where the
714
+ // node itself is hidden in place of its contents; and there's no need to search
715
+ // up the hierarchy either
716
+ return !node.getClientRects().length;
717
+ }
718
+
719
+ // Else, the node isn't attached to the document, which means the `getClientRects()`
720
+ // API will __always__ return zero rects (this can happen, for example, if React
721
+ // is used to render nodes onto a detached tree, as confirmed in this thread:
722
+ // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
723
+ //
724
+ // It also means that even window.getComputedStyle(node).display will return `undefined`
725
+ // because styles are only computed for nodes that are in the document.
726
+ //
727
+ // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
728
+ // somehow. Though it was never stated officially, anyone who has ever used tabbable
729
+ // APIs on nodes in detached containers has actually implicitly used tabbable in what
730
+ // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
731
+ // considering __everything__ to be visible because of the innability to determine styles.
732
+ //
733
+ // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
734
+ // nodes as visible with the 'none' fallback.__
735
+ if (displayCheck !== 'legacy-full') {
736
+ return true; // hidden
737
+ }
738
+ // else, fallback to 'none' mode and consider the node visible
739
+ } else if (displayCheck === 'non-zero-area') {
740
+ // NOTE: Even though this tests that the node's client rect is non-zero to determine
741
+ // whether it's displayed, and that a detached node will __always__ have a zero-area
742
+ // client rect, we don't special-case for whether the node is attached or not. In
743
+ // this mode, we do want to consider nodes that have a zero area to be hidden at all
744
+ // times, and that includes attached or not.
745
+ return isZeroArea(node);
746
+ }
747
+
748
+ // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
749
+ // it's visible
750
+ return false;
751
+ };
752
+
753
+ // form fields (nested) inside a disabled fieldset are not focusable/tabbable
754
+ // unless they are in the _first_ <legend> element of the top-most disabled
755
+ // fieldset
756
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
757
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
758
+ var parentNode = node.parentElement;
759
+ // check if `node` is contained in a disabled <fieldset>
760
+ while (parentNode) {
761
+ if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
762
+ // look for the first <legend> among the children of the disabled <fieldset>
763
+ for (var i = 0; i < parentNode.children.length; i++) {
764
+ var child = parentNode.children.item(i);
765
+ // when the first <legend> (in document order) is found
766
+ if (child.tagName === 'LEGEND') {
767
+ // if its parent <fieldset> is not nested in another disabled <fieldset>,
768
+ // return whether `node` is a descendant of its first <legend>
769
+ return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
770
+ }
771
+ }
772
+ // the disabled <fieldset> containing `node` has no <legend>
773
+ return true;
774
+ }
775
+ parentNode = parentNode.parentElement;
776
+ }
777
+ }
778
+
779
+ // else, node's tabbable/focusable state should not be affected by a fieldset's
780
+ // enabled/disabled state
781
+ return false;
782
+ };
783
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
784
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||
785
+ // For a details element with a summary, the summary element gets the focus
786
+ isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
787
+ return false;
788
+ }
789
+ return true;
790
+ };
791
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
792
+ if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
793
+ return false;
794
+ }
795
+ return true;
796
+ };
797
+ var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
798
+ var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
799
+ if (isNaN(tabIndex) || tabIndex >= 0) {
800
+ return true;
801
+ }
802
+ // If a custom element has an explicit negative tabindex,
803
+ // browsers will not allow tab targeting said element's children.
804
+ return false;
805
+ };
806
+
807
+ /**
808
+ * @param {Array.<Element|CandidateScope>} candidates
809
+ * @returns Element[]
810
+ */
811
+ var _sortByOrder = function sortByOrder(candidates) {
812
+ var regularTabbables = [];
813
+ var orderedTabbables = [];
814
+ candidates.forEach(function (item, i) {
815
+ var isScope = !!item.scopeParent;
816
+ var element = isScope ? item.scopeParent : item;
817
+ var candidateTabindex = getSortOrderTabIndex(element, isScope);
818
+ var elements = isScope ? _sortByOrder(item.candidates) : element;
819
+ if (candidateTabindex === 0) {
820
+ isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
821
+ } else {
822
+ orderedTabbables.push({
823
+ documentOrder: i,
824
+ tabIndex: candidateTabindex,
825
+ item: item,
826
+ isScope: isScope,
827
+ content: elements
828
+ });
829
+ }
830
+ });
831
+ return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
832
+ sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
833
+ return acc;
834
+ }, []).concat(regularTabbables);
835
+ };
836
+ var tabbable = function tabbable(container, options) {
837
+ options = options || {};
838
+ var candidates;
839
+ if (options.getShadowRoot) {
840
+ candidates = _getCandidatesIteratively([container], options.includeContainer, {
841
+ filter: isNodeMatchingSelectorTabbable.bind(null, options),
842
+ flatten: false,
843
+ getShadowRoot: options.getShadowRoot,
844
+ shadowRootFilter: isShadowRootTabbable
845
+ });
846
+ } else {
847
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
848
+ }
849
+ return _sortByOrder(candidates);
850
+ };
851
+ var focusable = function focusable(container, options) {
852
+ options = options || {};
853
+ var candidates;
854
+ if (options.getShadowRoot) {
855
+ candidates = _getCandidatesIteratively([container], options.includeContainer, {
856
+ filter: isNodeMatchingSelectorFocusable.bind(null, options),
857
+ flatten: true,
858
+ getShadowRoot: options.getShadowRoot
859
+ });
860
+ } else {
861
+ candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
862
+ }
863
+ return candidates;
864
+ };
865
+ var isTabbable = function isTabbable(node, options) {
866
+ options = options || {};
867
+ if (!node) {
868
+ throw new Error('No node provided');
869
+ }
870
+ if (matches.call(node, candidateSelector) === false) {
871
+ return false;
872
+ }
873
+ return isNodeMatchingSelectorTabbable(options, node);
874
+ };
875
+
876
+ export { rectToClientRect as A, clamp as B, getAxisLength as C, sides as D, getOppositeAxis as E, placements as F, getOppositeAlignmentPlacement as G, createCoords as H, getWindow as I, getFrameElement as J, getDocumentElement as K, round as L, isTopLayer as M, isOverflowElement as N, getNodeScroll as O, isTableElement as P, isContainingBlock as Q, getContainingBlock as R, isHTMLElement as a, isElement as b, isNode as c, getNodeName as d, isTabbable as e, floor as f, getOverflowAncestors as g, focusable as h, isShadowRoot as i, isLastTraversableNode as j, getParentNode as k, getComputedStyle$1 as l, isWebKit as m, evaluate as n, getSide as o, getSideAxis as p, getOppositePlacement as q, getExpandedPlacements as r, getOppositeAxisPlacements as s, tabbable as t, getAlignmentSides as u, getAlignment as v, min as w, max as x, getAlignmentAxis as y, getPaddingObject as z };