@linzjs/step-ag-grid 17.7.0 → 17.8.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 (40) hide show
  1. package/dist/src/components/GridNoRowsOverlay.d.ts +3 -1
  2. package/dist/step-ag-grid.cjs.js +1096 -703
  3. package/dist/step-ag-grid.cjs.js.map +1 -1
  4. package/dist/step-ag-grid.esm.js +1098 -705
  5. package/dist/step-ag-grid.esm.js.map +1 -1
  6. package/package.json +47 -46
  7. package/src/components/Grid.tsx +21 -20
  8. package/src/components/GridNoRowsOverlay.tsx +27 -3
  9. package/src/stories/components/ActionButton.stories.tsx +3 -3
  10. package/src/stories/grid/GridDragRow.stories.tsx +3 -3
  11. package/src/stories/grid/GridFilterButtons.stories.tsx +3 -3
  12. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +3 -3
  13. package/src/stories/grid/GridNonEditableRow.stories.tsx +3 -3
  14. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +3 -3
  15. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +3 -3
  16. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +3 -3
  17. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +3 -3
  18. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +3 -3
  19. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +3 -3
  20. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +3 -3
  21. package/src/stories/grid/GridReadOnly.stories.tsx +7 -8
  22. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +3 -3
  23. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +3 -3
  24. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +3 -3
  25. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +3 -3
  26. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +3 -3
  27. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -3
  28. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -3
  29. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -3
  30. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +3 -3
  31. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +3 -3
  32. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +3 -3
  33. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +3 -3
  34. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +3 -3
  35. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +3 -3
  36. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +3 -3
  37. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +3 -3
  38. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +3 -3
  39. package/src/stories/react-menu/ReactMenu.stories.tsx +3 -3
  40. package/dist/node_modules/@linzjs/lui/dist/assets/svg-content.d.ts +0 -7
@@ -28,6 +28,21 @@ function _interopNamespaceDefault(e) {
28
28
  return Object.freeze(n);
29
29
  }
30
30
 
31
+ function _mergeNamespaces(n, m) {
32
+ m.forEach(function (e) {
33
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
34
+ if (k !== 'default' && !(k in n)) {
35
+ var d = Object.getOwnPropertyDescriptor(e, k);
36
+ Object.defineProperty(n, k, d.get ? d : {
37
+ enumerable: true,
38
+ get: function () { return e[k]; }
39
+ });
40
+ }
41
+ });
42
+ });
43
+ return Object.freeze(n);
44
+ }
45
+
31
46
  var testUtils__namespace = /*#__PURE__*/_interopNamespaceDefault(testUtils);
32
47
 
33
48
  /**
@@ -39,6 +54,42 @@ const ComponentLoadingWrapper = (props) => {
39
54
 
40
55
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
41
56
 
57
+ (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
58
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
59
+ return new (P || (P = Promise))(function (resolve, reject) {
60
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
61
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
62
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
63
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
64
+ });
65
+ };
66
+
67
+ (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
68
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
69
+ return new (P || (P = Promise))(function (resolve, reject) {
70
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
71
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
72
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
73
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
74
+ });
75
+ };
76
+
77
+ function useInterval(callback, delay) {
78
+ const savedCallback = React.useRef(callback);
79
+ useIsomorphicLayoutEffect$1(() => {
80
+ savedCallback.current = callback;
81
+ }, [callback]);
82
+ React.useEffect(() => {
83
+ if (!delay && delay !== 0) {
84
+ return;
85
+ }
86
+ const id = setInterval(() => savedCallback.current(), delay);
87
+ return () => clearInterval(id);
88
+ }, [delay]);
89
+ }
90
+
91
+ const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
92
+
42
93
  const GridContext = React.createContext({
43
94
  gridReady: false,
44
95
  gridRenderState: () => null,
@@ -191,53 +242,6 @@ const GridUpdatingContext = React.createContext({
191
242
  updatedDep: 0,
192
243
  });
193
244
 
194
- /**
195
- * Cancels timeouts on scope being destroyed.
196
- *
197
- * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
198
- * This could have been implemented using debounce if the callers function was wrapped in useCallback,
199
- * but there's no way to enforce that, so it would lead to bugs.
200
- */
201
- const useTimeoutHook = () => {
202
- const timeout = React.useRef();
203
- /**
204
- * Clear any pending timeouts.
205
- */
206
- const clearTimeouts = () => {
207
- if (timeout.current) {
208
- const tc = timeout.current;
209
- timeout.current = undefined;
210
- clearTimeout(tc);
211
- }
212
- };
213
- /**
214
- * Call this when your action has completed.
215
- */
216
- const invoke = React.useCallback((fn, waitTimeMs) => {
217
- clearTimeouts();
218
- timeout.current = setTimeout(fn, waitTimeMs);
219
- }, []);
220
- /**
221
- * Clear timeout on loss of scope.
222
- */
223
- React.useEffect(() => {
224
- return () => clearTimeouts();
225
- }, []);
226
- return invoke;
227
- };
228
- const useIntervalHook = ({ callback, timeoutMs }) => {
229
- const callbackRef = React.useRef(callback);
230
- callbackRef.current = callback;
231
- React.useEffect(() => {
232
- const interval = setInterval(() => {
233
- callbackRef.current && callbackRef.current();
234
- }, timeoutMs);
235
- return () => {
236
- clearInterval(interval);
237
- };
238
- }, [timeoutMs]);
239
- };
240
-
241
245
  const isNotEmpty = lodashEs.negate(lodashEs.isEmpty);
242
246
  const wait$1 = (timeoutMs) => new Promise((resolve) => {
243
247
  setTimeout(resolve, timeoutMs);
@@ -290,11 +294,21 @@ const sanitiseFileName = (filename) => {
290
294
  return valid.slice(0, -fileExt.length - 1).slice(0, 64) + "." + fileExt;
291
295
  };
292
296
 
293
- const GridNoRowsOverlay = (params) => {
294
- if (params.rowCount === 0)
295
- return jsxRuntime.jsx("span", { children: params.noRowsOverlayText ?? "There are currently no rows" });
296
- if (params.filteredRowCount === 0)
297
- return jsxRuntime.jsx("span", { children: "All rows have been filtered" });
297
+ const GridLoadingOverlayComponent = (props) => (jsxRuntime.jsx("div", { style: {
298
+ left: 0,
299
+ top: 0,
300
+ bottom: 0,
301
+ right: 0,
302
+ position: "absolute",
303
+ backgroundColor: "rgba(255,255,255,0.5)",
304
+ }, children: jsxRuntime.jsx("div", { style: { height: "100%", position: "relative" }, children: jsxRuntime.jsx("div", { style: { position: "absolute", left: 0, top: props.headerRowHeight, right: 0, bottom: 0 }, children: jsxRuntime.jsx(lui.LuiStatusSpinner, {}) }) }) }));
305
+ const GridNoRowsOverlay = (props) => {
306
+ if (props.loading)
307
+ return jsxRuntime.jsx(GridLoadingOverlayComponent, { headerRowHeight: props.headerRowHeight });
308
+ if (props.rowCount === 0)
309
+ return jsxRuntime.jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
310
+ if (props.filteredRowCount === 0)
311
+ return jsxRuntime.jsx("div", { children: "All rows have been filtered" });
298
312
  return jsxRuntime.jsx("span", {});
299
313
  };
300
314
 
@@ -2345,7 +2359,7 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2345
2359
  /**
2346
2360
  * Wrapper for AgGrid to add commonly used functionality.
2347
2361
  */
2348
- const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2362
+ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : 40, ...params }) => {
2349
2363
  const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = React.useContext(GridContext);
2350
2364
  const { checkUpdating, updatedDep, updatingCols } = React.useContext(GridUpdatingContext);
2351
2365
  const { prePopupOps } = React.useContext(GridContext);
@@ -2404,23 +2418,20 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2404
2418
  /**
2405
2419
  * Auto-size windows that had deferred auto-size
2406
2420
  */
2407
- useIntervalHook({
2408
- callback: () => {
2409
- // Check if window has been popped out and needs resize
2410
- const currentDocument = gridDivRef.current?.ownerDocument;
2411
- if (currentDocument !== lastOwnerDocumentRef.current) {
2412
- lastOwnerDocumentRef.current = currentDocument;
2413
- if (currentDocument) {
2414
- needsAutoSize.current = true;
2415
- }
2421
+ useInterval(() => {
2422
+ // Check if window has been popped out and needs resize
2423
+ const currentDocument = gridDivRef.current?.ownerDocument;
2424
+ if (currentDocument !== lastOwnerDocumentRef.current) {
2425
+ lastOwnerDocumentRef.current = currentDocument;
2426
+ if (currentDocument) {
2427
+ needsAutoSize.current = true;
2416
2428
  }
2417
- if (needsAutoSize.current) {
2418
- needsAutoSize.current = false;
2419
- setInitialContentSize();
2420
- }
2421
- },
2422
- timeoutMs: 200,
2423
- });
2429
+ }
2430
+ if (needsAutoSize.current) {
2431
+ needsAutoSize.current = false;
2432
+ setInitialContentSize();
2433
+ }
2434
+ }, 200);
2424
2435
  /**
2425
2436
  * On data load select the first row of the grid if required.
2426
2437
  */
@@ -2796,12 +2807,13 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2796
2807
  }, [params]);
2797
2808
  // This is setting a ref in the GridContext so won't be triggering an update loop
2798
2809
  setOnCellEditingComplete(params.onCellEditingComplete);
2810
+ const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
2799
2811
  return (jsxRuntime.jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsxRuntime.jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsxRuntime.jsx(agGridReact.AgGridReact, { rowHeight: rowHeight, animateRows: params.animateRows, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
2800
2812
  setInitialContentSize();
2801
2813
  }, onRowDataUpdated: onRowDataChanged, onCellKeyDown: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, domLayout: params.domLayout, onColumnResized: onColumnResized, defaultColDef: { minWidth: 48, ...lodashEs.omit(params.defaultColDef, ["editable"]) }, columnDefs: columnDefsAdjusted, rowData: rowData, noRowsOverlayComponent: (event) => {
2802
2814
  let rowCount = 0;
2803
2815
  event.api.forEachNode(() => rowCount++);
2804
- return (jsxRuntime.jsx(GridNoRowsOverlay, { rowCount: rowCount, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2816
+ return (jsxRuntime.jsx(GridNoRowsOverlay, { loading: !rowData, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2805
2817
  }, onModelUpdated: onModelUpdated, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: params.onRowDragEnd ? undefined : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved, alwaysShowVerticalScroll: params.alwaysShowVerticalScroll, isExternalFilterPresent: isExternalFilterPresent, doesExternalFilterPass: doesExternalFilterPass, maintainColumnOrder: true, preventDefaultOnContextMenu: true, onCellContextMenu: gridContextMenu.cellContextMenu, rowDragText: params.rowDragText, onRowDragMove: onRowDragMove, onRowDragEnd: onRowDragEnd, onRowDragLeave: onRowDragLeave }) })] }));
2806
2818
  };
2807
2819
 
@@ -3114,6 +3126,41 @@ const GridFilterQuick = ({ quickFilterPlaceholder, defaultValue }) => {
3114
3126
 
3115
3127
  const GridFilters = ({ children }) => (jsxRuntime.jsx("div", { className: "Grid-container-filters", children: children }));
3116
3128
 
3129
+ /**
3130
+ * Cancels timeouts on scope being destroyed.
3131
+ *
3132
+ * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
3133
+ * This could have been implemented using debounce if the callers function was wrapped in useCallback,
3134
+ * but there's no way to enforce that, so it would lead to bugs.
3135
+ */
3136
+ const useTimeoutHook = () => {
3137
+ const timeout = React.useRef();
3138
+ /**
3139
+ * Clear any pending timeouts.
3140
+ */
3141
+ const clearTimeouts = () => {
3142
+ if (timeout.current) {
3143
+ const tc = timeout.current;
3144
+ timeout.current = undefined;
3145
+ clearTimeout(tc);
3146
+ }
3147
+ };
3148
+ /**
3149
+ * Call this when your action has completed.
3150
+ */
3151
+ const invoke = React.useCallback((fn, waitTimeMs) => {
3152
+ clearTimeouts();
3153
+ timeout.current = setTimeout(fn, waitTimeMs);
3154
+ }, []);
3155
+ /**
3156
+ * Clear timeout on loss of scope.
3157
+ */
3158
+ React.useEffect(() => {
3159
+ return () => clearTimeouts();
3160
+ }, []);
3161
+ return invoke;
3162
+ };
3163
+
3117
3164
  /**
3118
3165
  * Defers state change up to a minimum time since last state change.
3119
3166
  */
@@ -6472,31 +6519,6 @@ var ReactElement = {};
6472
6519
 
6473
6520
  var reactIs = {exports: {}};
6474
6521
 
6475
- var reactIs_production_min = {};
6476
-
6477
- /** @license React v17.0.2
6478
- * react-is.production.min.js
6479
- *
6480
- * Copyright (c) Facebook, Inc. and its affiliates.
6481
- *
6482
- * This source code is licensed under the MIT license found in the
6483
- * LICENSE file in the root directory of this source tree.
6484
- */
6485
-
6486
- var hasRequiredReactIs_production_min;
6487
-
6488
- function requireReactIs_production_min () {
6489
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
6490
- hasRequiredReactIs_production_min = 1;
6491
- var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
6492
- if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
6493
- function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
6494
- reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
6495
- reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
6496
- reactIs_production_min.typeOf=y;
6497
- return reactIs_production_min;
6498
- }
6499
-
6500
6522
  var reactIs_development = {};
6501
6523
 
6502
6524
  /** @license React v17.0.2
@@ -6728,6 +6750,31 @@ function requireReactIs_development () {
6728
6750
  return reactIs_development;
6729
6751
  }
6730
6752
 
6753
+ var reactIs_production_min = {};
6754
+
6755
+ /** @license React v17.0.2
6756
+ * react-is.production.min.js
6757
+ *
6758
+ * Copyright (c) Facebook, Inc. and its affiliates.
6759
+ *
6760
+ * This source code is licensed under the MIT license found in the
6761
+ * LICENSE file in the root directory of this source tree.
6762
+ */
6763
+
6764
+ var hasRequiredReactIs_production_min;
6765
+
6766
+ function requireReactIs_production_min () {
6767
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
6768
+ hasRequiredReactIs_production_min = 1;
6769
+ var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
6770
+ if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
6771
+ function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
6772
+ reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
6773
+ reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
6774
+ reactIs_production_min.typeOf=y;
6775
+ return reactIs_production_min;
6776
+ }
6777
+
6731
6778
  if (process.env.NODE_ENV === 'production') {
6732
6779
  reactIs.exports = requireReactIs_production_min();
6733
6780
  } else {
@@ -6984,7 +7031,7 @@ ReactTestComponent.default = _default$2j;
6984
7031
  Object.defineProperty(build$1, '__esModule', {
6985
7032
  value: true
6986
7033
  });
6987
- build$1.default = build$1.DEFAULT_OPTIONS = void 0;
7034
+ var default_1 = build$1.default = DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = void 0;
6988
7035
  var format_1 = build$1.format = format;
6989
7036
  var plugins_1 = build$1.plugins = void 0;
6990
7037
 
@@ -7403,7 +7450,7 @@ const DEFAULT_OPTIONS = {
7403
7450
  printFunctionName: true,
7404
7451
  theme: DEFAULT_THEME
7405
7452
  };
7406
- build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7453
+ var DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7407
7454
 
7408
7455
  function validateOptions(options) {
7409
7456
  Object.keys(options).forEach(key => {
@@ -7478,7 +7525,7 @@ const getEscapeString = options =>
7478
7525
  ? options.escapeString
7479
7526
  : DEFAULT_OPTIONS.escapeString;
7480
7527
 
7481
- const getConfig$1 = options => {
7528
+ const getConfig$4 = options => {
7482
7529
  var _options$printBasicPr;
7483
7530
 
7484
7531
  return {
@@ -7545,7 +7592,7 @@ function format(val, options) {
7545
7592
  const plugin = findPlugin(options.plugins, val);
7546
7593
 
7547
7594
  if (plugin !== null) {
7548
- return printPlugin(plugin, val, getConfig$1(options), '', 0, []);
7595
+ return printPlugin(plugin, val, getConfig$4(options), '', 0, []);
7549
7596
  }
7550
7597
  }
7551
7598
  }
@@ -7561,7 +7608,7 @@ function format(val, options) {
7561
7608
  return basicResult;
7562
7609
  }
7563
7610
 
7564
- return printComplexValue(val, getConfig$1(options), '', 0, []);
7611
+ return printComplexValue(val, getConfig$4(options), '', 0, []);
7565
7612
  }
7566
7613
 
7567
7614
  const plugins = {
@@ -7575,7 +7622,15 @@ const plugins = {
7575
7622
  };
7576
7623
  plugins_1 = build$1.plugins = plugins;
7577
7624
  var _default$2i = format;
7578
- build$1.default = _default$2i;
7625
+ default_1 = build$1.default = _default$2i;
7626
+
7627
+ var index = /*#__PURE__*/_mergeNamespaces({
7628
+ __proto__: null,
7629
+ get DEFAULT_OPTIONS () { return DEFAULT_OPTIONS_1; },
7630
+ get default () { return default_1; },
7631
+ format: format_1,
7632
+ get plugins () { return plugins_1; }
7633
+ }, [build$1]);
7579
7634
 
7580
7635
  /**
7581
7636
  * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}
@@ -14456,10 +14511,10 @@ var test = {
14456
14511
  foo: {}
14457
14512
  };
14458
14513
 
14459
- var $Object = Object;
14514
+ var $Object$1 = Object;
14460
14515
 
14461
14516
  var hasProto$1 = function hasProto() {
14462
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
14517
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
14463
14518
  };
14464
14519
 
14465
14520
  /* eslint no-invalid-this: 1 */
@@ -14523,9 +14578,9 @@ var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
14523
14578
 
14524
14579
  var undefined$1;
14525
14580
 
14526
- var $SyntaxError = SyntaxError;
14581
+ var $SyntaxError$1 = SyntaxError;
14527
14582
  var $Function = Function;
14528
- var $TypeError$1 = TypeError;
14583
+ var $TypeError$4 = TypeError;
14529
14584
 
14530
14585
  // eslint-disable-next-line consistent-return
14531
14586
  var getEvalledConstructor = function (expressionSyntax) {
@@ -14544,7 +14599,7 @@ if ($gOPD$2) {
14544
14599
  }
14545
14600
 
14546
14601
  var throwTypeError = function () {
14547
- throw new $TypeError$1();
14602
+ throw new $TypeError$4();
14548
14603
  };
14549
14604
  var ThrowTypeError = $gOPD$2
14550
14605
  ? (function () {
@@ -14631,10 +14686,10 @@ var INTRINSICS = {
14631
14686
  '%String%': String,
14632
14687
  '%StringIteratorPrototype%': hasSymbols$4 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
14633
14688
  '%Symbol%': hasSymbols$4 ? Symbol : undefined$1,
14634
- '%SyntaxError%': $SyntaxError,
14689
+ '%SyntaxError%': $SyntaxError$1,
14635
14690
  '%ThrowTypeError%': ThrowTypeError,
14636
14691
  '%TypedArray%': TypedArray,
14637
- '%TypeError%': $TypeError$1,
14692
+ '%TypeError%': $TypeError$4,
14638
14693
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
14639
14694
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
14640
14695
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
@@ -14749,9 +14804,9 @@ var stringToPath = function stringToPath(string) {
14749
14804
  var first = $strSlice(string, 0, 1);
14750
14805
  var last = $strSlice(string, -1);
14751
14806
  if (first === '%' && last !== '%') {
14752
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
14807
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
14753
14808
  } else if (last === '%' && first !== '%') {
14754
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
14809
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
14755
14810
  }
14756
14811
  var result = [];
14757
14812
  $replace$1(string, rePropName, function (match, number, quote, subString) {
@@ -14775,7 +14830,7 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14775
14830
  value = doEval(intrinsicName);
14776
14831
  }
14777
14832
  if (typeof value === 'undefined' && !allowMissing) {
14778
- throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14833
+ throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14779
14834
  }
14780
14835
 
14781
14836
  return {
@@ -14785,19 +14840,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14785
14840
  };
14786
14841
  }
14787
14842
 
14788
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
14843
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
14789
14844
  };
14790
14845
 
14791
14846
  var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14792
14847
  if (typeof name !== 'string' || name.length === 0) {
14793
- throw new $TypeError$1('intrinsic name must be a non-empty string');
14848
+ throw new $TypeError$4('intrinsic name must be a non-empty string');
14794
14849
  }
14795
14850
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
14796
- throw new $TypeError$1('"allowMissing" argument must be a boolean');
14851
+ throw new $TypeError$4('"allowMissing" argument must be a boolean');
14797
14852
  }
14798
14853
 
14799
14854
  if ($exec$1(/^%?[^%]*%?$/, name) === null) {
14800
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14855
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14801
14856
  }
14802
14857
  var parts = stringToPath(name);
14803
14858
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
@@ -14824,7 +14879,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14824
14879
  )
14825
14880
  && first !== last
14826
14881
  ) {
14827
- throw new $SyntaxError('property names with quotes must have matching quotes');
14882
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
14828
14883
  }
14829
14884
  if (part === 'constructor' || !isOwn) {
14830
14885
  skipFurtherCaching = true;
@@ -14838,7 +14893,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14838
14893
  } else if (value != null) {
14839
14894
  if (!(part in value)) {
14840
14895
  if (!allowMissing) {
14841
- throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
14896
+ throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
14842
14897
  }
14843
14898
  return void undefined$1;
14844
14899
  }
@@ -14871,14 +14926,14 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14871
14926
  return value;
14872
14927
  };
14873
14928
 
14874
- var GetIntrinsic$6 = getIntrinsic;
14929
+ var GetIntrinsic$7 = getIntrinsic;
14875
14930
 
14876
- var $defineProperty = GetIntrinsic$6('%Object.defineProperty%', true);
14931
+ var $defineProperty$1 = GetIntrinsic$7('%Object.defineProperty%', true);
14877
14932
 
14878
14933
  var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
14879
- if ($defineProperty) {
14934
+ if ($defineProperty$1) {
14880
14935
  try {
14881
- $defineProperty({}, 'a', { value: 1 });
14936
+ $defineProperty$1({}, 'a', { value: 1 });
14882
14937
  return true;
14883
14938
  } catch (e) {
14884
14939
  // IE 8 has a broken defineProperty
@@ -14894,7 +14949,7 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14894
14949
  return null;
14895
14950
  }
14896
14951
  try {
14897
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
14952
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
14898
14953
  } catch (e) {
14899
14954
  // In Firefox 4-22, defining length on an array throws an exception.
14900
14955
  return true;
@@ -14903,20 +14958,92 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14903
14958
 
14904
14959
  var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
14905
14960
 
14961
+ var GetIntrinsic$6 = getIntrinsic;
14962
+
14963
+ var $gOPD$1 = GetIntrinsic$6('%Object.getOwnPropertyDescriptor%', true);
14964
+
14965
+ if ($gOPD$1) {
14966
+ try {
14967
+ $gOPD$1([], 'length');
14968
+ } catch (e) {
14969
+ // IE 8 has a broken gOPD
14970
+ $gOPD$1 = null;
14971
+ }
14972
+ }
14973
+
14974
+ var gopd$1 = $gOPD$1;
14975
+
14976
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
14977
+
14978
+ var GetIntrinsic$5 = getIntrinsic;
14979
+
14980
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$5('%Object.defineProperty%', true);
14981
+
14982
+ var $SyntaxError = GetIntrinsic$5('%SyntaxError%');
14983
+ var $TypeError$3 = GetIntrinsic$5('%TypeError%');
14984
+
14985
+ var gopd = gopd$1;
14986
+
14987
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
14988
+ var defineDataProperty$1 = function defineDataProperty(
14989
+ obj,
14990
+ property,
14991
+ value
14992
+ ) {
14993
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
14994
+ throw new $TypeError$3('`obj` must be an object or a function`');
14995
+ }
14996
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
14997
+ throw new $TypeError$3('`property` must be a string or a symbol`');
14998
+ }
14999
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
15000
+ throw new $TypeError$3('`nonEnumerable`, if provided, must be a boolean or null');
15001
+ }
15002
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
15003
+ throw new $TypeError$3('`nonWritable`, if provided, must be a boolean or null');
15004
+ }
15005
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
15006
+ throw new $TypeError$3('`nonConfigurable`, if provided, must be a boolean or null');
15007
+ }
15008
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
15009
+ throw new $TypeError$3('`loose`, if provided, must be a boolean');
15010
+ }
15011
+
15012
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
15013
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
15014
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
15015
+ var loose = arguments.length > 6 ? arguments[6] : false;
15016
+
15017
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
15018
+ var desc = !!gopd && gopd(obj, property);
15019
+
15020
+ if ($defineProperty) {
15021
+ $defineProperty(obj, property, {
15022
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
15023
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
15024
+ value: value,
15025
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
15026
+ });
15027
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
15028
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
15029
+ obj[property] = value; // eslint-disable-line no-param-reassign
15030
+ } else {
15031
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
15032
+ }
15033
+ };
15034
+
14906
15035
  var keys$2 = objectKeys$2;
14907
15036
  var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
14908
15037
 
14909
15038
  var toStr$7 = Object.prototype.toString;
14910
15039
  var concat = Array.prototype.concat;
14911
- var origDefineProperty = Object.defineProperty;
15040
+ var defineDataProperty = defineDataProperty$1;
14912
15041
 
14913
15042
  var isFunction = function (fn) {
14914
15043
  return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
14915
15044
  };
14916
15045
 
14917
- var hasPropertyDescriptors = hasPropertyDescriptors_1();
14918
-
14919
- var supportsDescriptors$2 = origDefineProperty && hasPropertyDescriptors;
15046
+ var supportsDescriptors$2 = hasPropertyDescriptors_1();
14920
15047
 
14921
15048
  var defineProperty$1 = function (object, name, value, predicate) {
14922
15049
  if (name in object) {
@@ -14928,15 +15055,11 @@ var defineProperty$1 = function (object, name, value, predicate) {
14928
15055
  return;
14929
15056
  }
14930
15057
  }
15058
+
14931
15059
  if (supportsDescriptors$2) {
14932
- origDefineProperty(object, name, {
14933
- configurable: true,
14934
- enumerable: false,
14935
- value: value,
14936
- writable: true
14937
- });
15060
+ defineDataProperty(object, name, value, true);
14938
15061
  } else {
14939
- object[name] = value; // eslint-disable-line no-param-reassign
15062
+ defineDataProperty(object, name, value);
14940
15063
  }
14941
15064
  };
14942
15065
 
@@ -14955,7 +15078,7 @@ defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
14955
15078
 
14956
15079
  var defineProperties_1 = defineProperties$1;
14957
15080
 
14958
- var callBind$5 = {exports: {}};
15081
+ var callBind$6 = {exports: {}};
14959
15082
 
14960
15083
  (function (module) {
14961
15084
 
@@ -15004,20 +15127,20 @@ var callBind$5 = {exports: {}};
15004
15127
  } else {
15005
15128
  module.exports.apply = applyBind;
15006
15129
  }
15007
- } (callBind$5));
15130
+ } (callBind$6));
15008
15131
 
15009
- var callBindExports = callBind$5.exports;
15132
+ var callBindExports = callBind$6.exports;
15010
15133
 
15011
- var GetIntrinsic$5 = getIntrinsic;
15134
+ var GetIntrinsic$4 = getIntrinsic;
15012
15135
 
15013
- var callBind$4 = callBindExports;
15136
+ var callBind$5 = callBindExports;
15014
15137
 
15015
- var $indexOf$1 = callBind$4(GetIntrinsic$5('String.prototype.indexOf'));
15138
+ var $indexOf$1 = callBind$5(GetIntrinsic$4('String.prototype.indexOf'));
15016
15139
 
15017
- var callBound$c = function callBoundIntrinsic(name, allowMissing) {
15018
- var intrinsic = GetIntrinsic$5(name, !!allowMissing);
15140
+ var callBound$b = function callBoundIntrinsic(name, allowMissing) {
15141
+ var intrinsic = GetIntrinsic$4(name, !!allowMissing);
15019
15142
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
15020
- return callBind$4(intrinsic);
15143
+ return callBind$5(intrinsic);
15021
15144
  }
15022
15145
  return intrinsic;
15023
15146
  };
@@ -15025,10 +15148,10 @@ var callBound$c = function callBoundIntrinsic(name, allowMissing) {
15025
15148
  // modified from https://github.com/es-shims/es6-shim
15026
15149
  var objectKeys$1 = objectKeys$2;
15027
15150
  var hasSymbols$2 = shams$1();
15028
- var callBound$b = callBound$c;
15151
+ var callBound$a = callBound$b;
15029
15152
  var toObject = Object;
15030
- var $push = callBound$b('Array.prototype.push');
15031
- var $propIsEnumerable = callBound$b('Object.prototype.propertyIsEnumerable');
15153
+ var $push = callBound$a('Array.prototype.push');
15154
+ var $propIsEnumerable = callBound$a('Object.prototype.propertyIsEnumerable');
15032
15155
  var originalGetSymbols = hasSymbols$2 ? Object.getOwnPropertySymbols : null;
15033
15156
 
15034
15157
  // eslint-disable-next-line no-unused-vars
@@ -15121,12 +15244,12 @@ var polyfill$4 = function getPolyfill() {
15121
15244
  return Object.assign;
15122
15245
  };
15123
15246
 
15124
- var define$3 = defineProperties_1;
15247
+ var define$4 = defineProperties_1;
15125
15248
  var getPolyfill$5 = polyfill$4;
15126
15249
 
15127
15250
  var shim$5 = function shimAssign() {
15128
15251
  var polyfill = getPolyfill$5();
15129
- define$3(
15252
+ define$4(
15130
15253
  Object,
15131
15254
  { assign: polyfill },
15132
15255
  { assign: function () { return Object.assign !== polyfill; } }
@@ -15135,13 +15258,13 @@ var shim$5 = function shimAssign() {
15135
15258
  };
15136
15259
 
15137
15260
  var defineProperties = defineProperties_1;
15138
- var callBind$3 = callBindExports;
15261
+ var callBind$4 = callBindExports;
15139
15262
 
15140
15263
  var implementation$6 = implementation$8;
15141
15264
  var getPolyfill$4 = polyfill$4;
15142
15265
  var shim$4 = shim$5;
15143
15266
 
15144
- var polyfill$3 = callBind$3.apply(getPolyfill$4());
15267
+ var polyfill$3 = callBind$4.apply(getPolyfill$4());
15145
15268
  // eslint-disable-next-line no-unused-vars
15146
15269
  var bound = function assign(target, source1) {
15147
15270
  return polyfill$3(Object, arguments);
@@ -15155,27 +15278,25 @@ defineProperties(bound, {
15155
15278
 
15156
15279
  var object_assign = bound;
15157
15280
 
15158
- var implementation$5 = {exports: {}};
15159
-
15160
15281
  var functionsHaveNames = function functionsHaveNames() {
15161
15282
  return typeof function f() {}.name === 'string';
15162
15283
  };
15163
15284
 
15164
- var gOPD$4 = Object.getOwnPropertyDescriptor;
15165
- if (gOPD$4) {
15285
+ var gOPD$3 = Object.getOwnPropertyDescriptor;
15286
+ if (gOPD$3) {
15166
15287
  try {
15167
- gOPD$4([], 'length');
15288
+ gOPD$3([], 'length');
15168
15289
  } catch (e) {
15169
15290
  // IE 8 has a broken gOPD
15170
- gOPD$4 = null;
15291
+ gOPD$3 = null;
15171
15292
  }
15172
15293
  }
15173
15294
 
15174
15295
  functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
15175
- if (!functionsHaveNames() || !gOPD$4) {
15296
+ if (!functionsHaveNames() || !gOPD$3) {
15176
15297
  return false;
15177
15298
  }
15178
- var desc = gOPD$4(function () {}, 'name');
15299
+ var desc = gOPD$3(function () {}, 'name');
15179
15300
  return !!desc && !!desc.configurable;
15180
15301
  };
15181
15302
 
@@ -15187,60 +15308,72 @@ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames()
15187
15308
 
15188
15309
  var functionsHaveNames_1 = functionsHaveNames;
15189
15310
 
15190
- (function (module) {
15191
-
15192
- var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15311
+ var define$3 = defineDataProperty$1;
15312
+ var hasDescriptors = hasPropertyDescriptors_1();
15313
+ var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15193
15314
 
15194
- var $Object = Object;
15195
- var $TypeError = TypeError;
15315
+ var $TypeError$2 = TypeError;
15196
15316
 
15197
- module.exports = function flags() {
15198
- if (this != null && this !== $Object(this)) {
15199
- throw new $TypeError('RegExp.prototype.flags getter called on non-object');
15200
- }
15201
- var result = '';
15202
- if (this.hasIndices) {
15203
- result += 'd';
15204
- }
15205
- if (this.global) {
15206
- result += 'g';
15207
- }
15208
- if (this.ignoreCase) {
15209
- result += 'i';
15210
- }
15211
- if (this.multiline) {
15212
- result += 'm';
15213
- }
15214
- if (this.dotAll) {
15215
- result += 's';
15216
- }
15217
- if (this.unicode) {
15218
- result += 'u';
15219
- }
15220
- if (this.unicodeSets) {
15221
- result += 'v';
15222
- }
15223
- if (this.sticky) {
15224
- result += 'y';
15317
+ var setFunctionName$1 = function setFunctionName(fn, name) {
15318
+ if (typeof fn !== 'function') {
15319
+ throw new $TypeError$2('`fn` is not a function');
15320
+ }
15321
+ var loose = arguments.length > 2 && !!arguments[2];
15322
+ if (!loose || functionsHaveConfigurableNames) {
15323
+ if (hasDescriptors) {
15324
+ define$3(fn, 'name', name, true, true);
15325
+ } else {
15326
+ define$3(fn, 'name', name);
15225
15327
  }
15226
- return result;
15227
- };
15328
+ }
15329
+ return fn;
15330
+ };
15228
15331
 
15229
- if (functionsHaveConfigurableNames && Object.defineProperty) {
15230
- Object.defineProperty(module.exports, 'name', { value: 'get flags' });
15231
- }
15232
- } (implementation$5));
15332
+ var setFunctionName = setFunctionName$1;
15233
15333
 
15234
- var implementationExports = implementation$5.exports;
15334
+ var $Object = Object;
15335
+ var $TypeError$1 = TypeError;
15235
15336
 
15236
- var implementation$4 = implementationExports;
15337
+ var implementation$5 = setFunctionName(function flags() {
15338
+ if (this != null && this !== $Object(this)) {
15339
+ throw new $TypeError$1('RegExp.prototype.flags getter called on non-object');
15340
+ }
15341
+ var result = '';
15342
+ if (this.hasIndices) {
15343
+ result += 'd';
15344
+ }
15345
+ if (this.global) {
15346
+ result += 'g';
15347
+ }
15348
+ if (this.ignoreCase) {
15349
+ result += 'i';
15350
+ }
15351
+ if (this.multiline) {
15352
+ result += 'm';
15353
+ }
15354
+ if (this.dotAll) {
15355
+ result += 's';
15356
+ }
15357
+ if (this.unicode) {
15358
+ result += 'u';
15359
+ }
15360
+ if (this.unicodeSets) {
15361
+ result += 'v';
15362
+ }
15363
+ if (this.sticky) {
15364
+ result += 'y';
15365
+ }
15366
+ return result;
15367
+ }, 'get flags', true);
15368
+
15369
+ var implementation$4 = implementation$5;
15237
15370
 
15238
15371
  var supportsDescriptors$1 = defineProperties_1.supportsDescriptors;
15239
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
15372
+ var $gOPD = Object.getOwnPropertyDescriptor;
15240
15373
 
15241
15374
  var polyfill$2 = function getPolyfill() {
15242
15375
  if (supportsDescriptors$1 && (/a/mig).flags === 'gim') {
15243
- var descriptor = $gOPD$1(RegExp.prototype, 'flags');
15376
+ var descriptor = $gOPD(RegExp.prototype, 'flags');
15244
15377
  if (
15245
15378
  descriptor
15246
15379
  && typeof descriptor.get === 'function'
@@ -15270,7 +15403,7 @@ var polyfill$2 = function getPolyfill() {
15270
15403
 
15271
15404
  var supportsDescriptors = defineProperties_1.supportsDescriptors;
15272
15405
  var getPolyfill$3 = polyfill$2;
15273
- var gOPD$3 = Object.getOwnPropertyDescriptor;
15406
+ var gOPD$2 = Object.getOwnPropertyDescriptor;
15274
15407
  var defineProperty = Object.defineProperty;
15275
15408
  var TypeErr = TypeError;
15276
15409
  var getProto = Object.getPrototypeOf;
@@ -15282,7 +15415,7 @@ var shim$3 = function shimFlags() {
15282
15415
  }
15283
15416
  var polyfill = getPolyfill$3();
15284
15417
  var proto = getProto(regex);
15285
- var descriptor = gOPD$3(proto, 'flags');
15418
+ var descriptor = gOPD$2(proto, 'flags');
15286
15419
  if (!descriptor || descriptor.get !== polyfill) {
15287
15420
  defineProperty(proto, 'flags', {
15288
15421
  configurable: true,
@@ -15294,13 +15427,13 @@ var shim$3 = function shimFlags() {
15294
15427
  };
15295
15428
 
15296
15429
  var define$2 = defineProperties_1;
15297
- var callBind$2 = callBindExports;
15430
+ var callBind$3 = callBindExports;
15298
15431
 
15299
- var implementation$3 = implementationExports;
15432
+ var implementation$3 = implementation$5;
15300
15433
  var getPolyfill$2 = polyfill$2;
15301
15434
  var shim$2 = shim$3;
15302
15435
 
15303
- var flagsBound = callBind$2(getPolyfill$2());
15436
+ var flagsBound = callBind$3(getPolyfill$2());
15304
15437
 
15305
15438
  define$2(flagsBound, {
15306
15439
  getPolyfill: getPolyfill$2,
@@ -15341,7 +15474,7 @@ var booleanValueOf = Boolean.prototype.valueOf;
15341
15474
  var objectToString = Object.prototype.toString;
15342
15475
  var functionToString = Function.prototype.toString;
15343
15476
  var $match = String.prototype.match;
15344
- var $slice$2 = String.prototype.slice;
15477
+ var $slice$1 = String.prototype.slice;
15345
15478
  var $replace = String.prototype.replace;
15346
15479
  var $toUpperCase = String.prototype.toUpperCase;
15347
15480
  var $toLowerCase = String.prototype.toLowerCase;
@@ -15383,7 +15516,7 @@ function addNumericSeparator(num, str) {
15383
15516
  var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
15384
15517
  if (int !== num) {
15385
15518
  var intStr = String(int);
15386
- var dec = $slice$2.call(str, intStr.length + 1);
15519
+ var dec = $slice$1.call(str, intStr.length + 1);
15387
15520
  return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
15388
15521
  }
15389
15522
  }
@@ -15568,7 +15701,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
15568
15701
  var ys = arrObjKeys(obj, inspect);
15569
15702
  var isPlainObject = gPO$1 ? gPO$1(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
15570
15703
  var protoTag = obj instanceof Object ? '' : 'null prototype';
15571
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$2.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15704
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$1.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15572
15705
  var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
15573
15706
  var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
15574
15707
  if (ys.length === 0) { return tag + '{}'; }
@@ -15737,7 +15870,7 @@ function inspectString(str, opts) {
15737
15870
  if (str.length > opts.maxStringLength) {
15738
15871
  var remaining = str.length - opts.maxStringLength;
15739
15872
  var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
15740
- return inspectString($slice$2.call(str, 0, opts.maxStringLength), opts) + trailer;
15873
+ return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
15741
15874
  }
15742
15875
  // eslint-disable-next-line no-control-regex
15743
15876
  var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
@@ -15840,20 +15973,20 @@ function arrObjKeys(obj, inspect) {
15840
15973
  return xs;
15841
15974
  }
15842
15975
 
15843
- var GetIntrinsic$4 = getIntrinsic;
15844
- var callBound$a = callBound$c;
15976
+ var GetIntrinsic$3 = getIntrinsic;
15977
+ var callBound$9 = callBound$b;
15845
15978
  var inspect = objectInspect;
15846
15979
 
15847
- var $TypeError = GetIntrinsic$4('%TypeError%');
15848
- var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
15849
- var $Map$2 = GetIntrinsic$4('%Map%', true);
15980
+ var $TypeError = GetIntrinsic$3('%TypeError%');
15981
+ var $WeakMap$1 = GetIntrinsic$3('%WeakMap%', true);
15982
+ var $Map$2 = GetIntrinsic$3('%Map%', true);
15850
15983
 
15851
- var $weakMapGet = callBound$a('WeakMap.prototype.get', true);
15852
- var $weakMapSet = callBound$a('WeakMap.prototype.set', true);
15853
- var $weakMapHas = callBound$a('WeakMap.prototype.has', true);
15854
- var $mapGet$1 = callBound$a('Map.prototype.get', true);
15855
- var $mapSet = callBound$a('Map.prototype.set', true);
15856
- var $mapHas$5 = callBound$a('Map.prototype.has', true);
15984
+ var $weakMapGet = callBound$9('WeakMap.prototype.get', true);
15985
+ var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
15986
+ var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
15987
+ var $mapGet$1 = callBound$9('Map.prototype.get', true);
15988
+ var $mapSet = callBound$9('Map.prototype.set', true);
15989
+ var $mapHas$5 = callBound$9('Map.prototype.has', true);
15857
15990
 
15858
15991
  /*
15859
15992
  * This function traverses the list returning the node corresponding to the
@@ -16000,13 +16133,13 @@ var shim$1 = function shimObjectIs() {
16000
16133
  };
16001
16134
 
16002
16135
  var define = defineProperties_1;
16003
- var callBind$1 = callBindExports;
16136
+ var callBind$2 = callBindExports;
16004
16137
 
16005
16138
  var implementation = implementation$2;
16006
16139
  var getPolyfill = polyfill$1;
16007
16140
  var shim = shim$1;
16008
16141
 
16009
- var polyfill = callBind$1(getPolyfill(), Object);
16142
+ var polyfill = callBind$2(getPolyfill(), Object);
16010
16143
 
16011
16144
  define(polyfill, {
16012
16145
  getPolyfill: getPolyfill,
@@ -16022,16 +16155,16 @@ var shams = function hasToStringTagShams() {
16022
16155
  return hasSymbols$1() && !!Symbol.toStringTag;
16023
16156
  };
16024
16157
 
16025
- var hasToStringTag$8 = shams();
16026
- var callBound$9 = callBound$c;
16158
+ var hasToStringTag$7 = shams();
16159
+ var callBound$8 = callBound$b;
16027
16160
 
16028
- var $toString$4 = callBound$9('Object.prototype.toString');
16161
+ var $toString$3 = callBound$8('Object.prototype.toString');
16029
16162
 
16030
16163
  var isStandardArguments = function isArguments(value) {
16031
- if (hasToStringTag$8 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16164
+ if (hasToStringTag$7 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16032
16165
  return false;
16033
16166
  }
16034
- return $toString$4(value) === '[object Arguments]';
16167
+ return $toString$3(value) === '[object Arguments]';
16035
16168
  };
16036
16169
 
16037
16170
  var isLegacyArguments = function isArguments(value) {
@@ -16042,8 +16175,8 @@ var isLegacyArguments = function isArguments(value) {
16042
16175
  typeof value === 'object' &&
16043
16176
  typeof value.length === 'number' &&
16044
16177
  value.length >= 0 &&
16045
- $toString$4(value) !== '[object Array]' &&
16046
- $toString$4(value.callee) === '[object Function]';
16178
+ $toString$3(value) !== '[object Array]' &&
16179
+ $toString$3(value.callee) === '[object Function]';
16047
16180
  };
16048
16181
 
16049
16182
  var supportsStandardArguments = (function () {
@@ -16109,7 +16242,7 @@ var genClass = '[object GeneratorFunction]';
16109
16242
  var ddaClass = '[object HTMLAllCollection]'; // IE 11
16110
16243
  var ddaClass2 = '[object HTML document.all class]';
16111
16244
  var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
16112
- var hasToStringTag$7 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16245
+ var hasToStringTag$6 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16113
16246
 
16114
16247
  var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
16115
16248
 
@@ -16153,7 +16286,7 @@ var isCallable$1 = reflectApply
16153
16286
  if (isDDA(value)) { return true; }
16154
16287
  if (!value) { return false; }
16155
16288
  if (typeof value !== 'function' && typeof value !== 'object') { return false; }
16156
- if (hasToStringTag$7) { return tryFunctionObject(value); }
16289
+ if (hasToStringTag$6) { return tryFunctionObject(value); }
16157
16290
  if (isES6ClassFn(value)) { return false; }
16158
16291
  var strClass = toStr$5.call(value);
16159
16292
  if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
@@ -16200,7 +16333,7 @@ var forEachObject = function forEachObject(object, iterator, receiver) {
16200
16333
  }
16201
16334
  };
16202
16335
 
16203
- var forEach$2 = function forEach(list, iterator, thisArg) {
16336
+ var forEach$1 = function forEach(list, iterator, thisArg) {
16204
16337
  if (!isCallable(iterator)) {
16205
16338
  throw new TypeError('iterator must be a function');
16206
16339
  }
@@ -16219,7 +16352,7 @@ var forEach$2 = function forEach(list, iterator, thisArg) {
16219
16352
  }
16220
16353
  };
16221
16354
 
16222
- var forEach_1 = forEach$2;
16355
+ var forEach_1 = forEach$1;
16223
16356
 
16224
16357
  var possibleNames = [
16225
16358
  'BigInt64Array',
@@ -16237,7 +16370,7 @@ var possibleNames = [
16237
16370
 
16238
16371
  var g$2 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16239
16372
 
16240
- var availableTypedArrays$2 = function availableTypedArrays() {
16373
+ var availableTypedArrays$1 = function availableTypedArrays() {
16241
16374
  var out = [];
16242
16375
  for (var i = 0; i < possibleNames.length; i++) {
16243
16376
  if (typeof g$2[possibleNames[i]] === 'function') {
@@ -16247,33 +16380,22 @@ var availableTypedArrays$2 = function availableTypedArrays() {
16247
16380
  return out;
16248
16381
  };
16249
16382
 
16250
- var GetIntrinsic$3 = getIntrinsic;
16251
-
16252
- var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
16253
-
16254
- if ($gOPD) {
16255
- try {
16256
- $gOPD([], 'length');
16257
- } catch (e) {
16258
- // IE 8 has a broken gOPD
16259
- $gOPD = null;
16260
- }
16261
- }
16262
-
16263
- var gopd = $gOPD;
16264
-
16265
- var forEach$1 = forEach_1;
16266
- var availableTypedArrays$1 = availableTypedArrays$2;
16267
- var callBound$8 = callBound$c;
16383
+ var forEach = forEach_1;
16384
+ var availableTypedArrays = availableTypedArrays$1;
16385
+ var callBind$1 = callBindExports;
16386
+ var callBound$7 = callBound$b;
16387
+ var gOPD$1 = gopd$1;
16268
16388
 
16269
- var $toString$3 = callBound$8('Object.prototype.toString');
16270
- var hasToStringTag$6 = shams();
16271
- var gOPD$2 = gopd;
16389
+ var $toString$2 = callBound$7('Object.prototype.toString');
16390
+ var hasToStringTag$5 = shams();
16272
16391
 
16273
16392
  var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16274
- var typedArrays$1 = availableTypedArrays$1();
16393
+ var typedArrays = availableTypedArrays();
16394
+
16395
+ var $slice = callBound$7('String.prototype.slice');
16396
+ var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16275
16397
 
16276
- var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(array, value) {
16398
+ var $indexOf = callBound$7('Array.prototype.indexOf', true) || function indexOf(array, value) {
16277
16399
  for (var i = 0; i < array.length; i += 1) {
16278
16400
  if (array[i] === value) {
16279
16401
  return i;
@@ -16281,54 +16403,85 @@ var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(
16281
16403
  }
16282
16404
  return -1;
16283
16405
  };
16284
- var $slice$1 = callBound$8('String.prototype.slice');
16285
- var toStrTags$1 = {};
16286
- var getPrototypeOf$1 = Object.getPrototypeOf; // require('getprototypeof');
16287
- if (hasToStringTag$6 && gOPD$2 && getPrototypeOf$1) {
16288
- forEach$1(typedArrays$1, function (typedArray) {
16406
+ var cache = { __proto__: null };
16407
+ if (hasToStringTag$5 && gOPD$1 && getPrototypeOf) {
16408
+ forEach(typedArrays, function (typedArray) {
16289
16409
  var arr = new g$1[typedArray]();
16290
16410
  if (Symbol.toStringTag in arr) {
16291
- var proto = getPrototypeOf$1(arr);
16292
- var descriptor = gOPD$2(proto, Symbol.toStringTag);
16411
+ var proto = getPrototypeOf(arr);
16412
+ var descriptor = gOPD$1(proto, Symbol.toStringTag);
16293
16413
  if (!descriptor) {
16294
- var superProto = getPrototypeOf$1(proto);
16295
- descriptor = gOPD$2(superProto, Symbol.toStringTag);
16414
+ var superProto = getPrototypeOf(proto);
16415
+ descriptor = gOPD$1(superProto, Symbol.toStringTag);
16296
16416
  }
16297
- toStrTags$1[typedArray] = descriptor.get;
16417
+ cache['$' + typedArray] = callBind$1(descriptor.get);
16298
16418
  }
16299
16419
  });
16420
+ } else {
16421
+ forEach(typedArrays, function (typedArray) {
16422
+ var arr = new g$1[typedArray]();
16423
+ cache['$' + typedArray] = callBind$1(arr.slice);
16424
+ });
16300
16425
  }
16301
16426
 
16302
- var tryTypedArrays$1 = function tryAllTypedArrays(value) {
16303
- var anyTrue = false;
16304
- forEach$1(toStrTags$1, function (getter, typedArray) {
16305
- if (!anyTrue) {
16427
+ var tryTypedArrays = function tryAllTypedArrays(value) {
16428
+ var found = false;
16429
+ forEach(cache, function (getter, typedArray) {
16430
+ if (!found) {
16431
+ try {
16432
+ if ('$' + getter(value) === typedArray) {
16433
+ found = $slice(typedArray, 1);
16434
+ }
16435
+ } catch (e) { /**/ }
16436
+ }
16437
+ });
16438
+ return found;
16439
+ };
16440
+
16441
+ var trySlices = function tryAllSlices(value) {
16442
+ var found = false;
16443
+ forEach(cache, function (getter, name) {
16444
+ if (!found) {
16306
16445
  try {
16307
- anyTrue = getter.call(value) === typedArray;
16446
+ getter(value);
16447
+ found = $slice(name, 1);
16308
16448
  } catch (e) { /**/ }
16309
16449
  }
16310
16450
  });
16311
- return anyTrue;
16451
+ return found;
16312
16452
  };
16313
16453
 
16314
- var isTypedArray$2 = function isTypedArray(value) {
16454
+ var whichTypedArray$2 = function whichTypedArray(value) {
16315
16455
  if (!value || typeof value !== 'object') { return false; }
16316
- if (!hasToStringTag$6 || !(Symbol.toStringTag in value)) {
16317
- var tag = $slice$1($toString$3(value), 8, -1);
16318
- return $indexOf(typedArrays$1, tag) > -1;
16456
+ if (!hasToStringTag$5) {
16457
+ var tag = $slice($toString$2(value), 8, -1);
16458
+ if ($indexOf(typedArrays, tag) > -1) {
16459
+ return tag;
16460
+ }
16461
+ if (tag !== 'Object') {
16462
+ return false;
16463
+ }
16464
+ // node < 0.6 hits here on real Typed Arrays
16465
+ return trySlices(value);
16319
16466
  }
16320
- if (!gOPD$2) { return false; }
16321
- return tryTypedArrays$1(value);
16467
+ if (!gOPD$1) { return null; } // unknown engine
16468
+ return tryTypedArrays(value);
16469
+ };
16470
+
16471
+ var whichTypedArray$1 = whichTypedArray$2;
16472
+
16473
+ var isTypedArray$1 = function isTypedArray(value) {
16474
+ return !!whichTypedArray$1(value);
16322
16475
  };
16323
16476
 
16324
16477
  var callBind = callBindExports;
16325
- var callBound$7 = callBound$c;
16478
+ var callBound$6 = callBound$b;
16326
16479
  var GetIntrinsic$2 = getIntrinsic;
16327
- var isTypedArray$1 = isTypedArray$2;
16480
+ var isTypedArray = isTypedArray$1;
16328
16481
 
16329
16482
  var $ArrayBuffer = GetIntrinsic$2('ArrayBuffer', true);
16330
16483
  var $Float32Array = GetIntrinsic$2('Float32Array', true);
16331
- var $byteLength$2 = callBound$7('ArrayBuffer.prototype.byteLength', true);
16484
+ var $byteLength$2 = callBound$6('ArrayBuffer.prototype.byteLength', true);
16332
16485
 
16333
16486
  // in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
16334
16487
  var abSlice = $ArrayBuffer && !$byteLength$2 && new $ArrayBuffer().slice;
@@ -16354,7 +16507,7 @@ var isArrayBuffer$2 = $byteLength$2 || $abSlice
16354
16507
  // in node 0.8, ArrayBuffers have no prototype or own methods
16355
16508
  ? function IsArrayBuffer(obj) {
16356
16509
  try {
16357
- return (new $Float32Array(obj)).buffer === obj && !isTypedArray$1(obj);
16510
+ return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj);
16358
16511
  } catch (e) {
16359
16512
  return typeof obj === 'object' && e.name === 'RangeError';
16360
16513
  }
@@ -16375,25 +16528,25 @@ var tryDateObject = function tryDateGetDayCall(value) {
16375
16528
 
16376
16529
  var toStr$3 = Object.prototype.toString;
16377
16530
  var dateClass = '[object Date]';
16378
- var hasToStringTag$5 = shams();
16531
+ var hasToStringTag$4 = shams();
16379
16532
 
16380
16533
  var isDateObject = function isDateObject(value) {
16381
16534
  if (typeof value !== 'object' || value === null) {
16382
16535
  return false;
16383
16536
  }
16384
- return hasToStringTag$5 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16537
+ return hasToStringTag$4 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16385
16538
  };
16386
16539
 
16387
- var callBound$6 = callBound$c;
16388
- var hasToStringTag$4 = shams();
16540
+ var callBound$5 = callBound$b;
16541
+ var hasToStringTag$3 = shams();
16389
16542
  var has;
16390
16543
  var $exec;
16391
16544
  var isRegexMarker;
16392
16545
  var badStringifier;
16393
16546
 
16394
- if (hasToStringTag$4) {
16395
- has = callBound$6('Object.prototype.hasOwnProperty');
16396
- $exec = callBound$6('RegExp.prototype.exec');
16547
+ if (hasToStringTag$3) {
16548
+ has = callBound$5('Object.prototype.hasOwnProperty');
16549
+ $exec = callBound$5('RegExp.prototype.exec');
16397
16550
  isRegexMarker = {};
16398
16551
 
16399
16552
  var throwRegexMarker = function () {
@@ -16409,18 +16562,18 @@ if (hasToStringTag$4) {
16409
16562
  }
16410
16563
  }
16411
16564
 
16412
- var $toString$2 = callBound$6('Object.prototype.toString');
16413
- var gOPD$1 = Object.getOwnPropertyDescriptor;
16565
+ var $toString$1 = callBound$5('Object.prototype.toString');
16566
+ var gOPD = Object.getOwnPropertyDescriptor;
16414
16567
  var regexClass = '[object RegExp]';
16415
16568
 
16416
- var isRegex$1 = hasToStringTag$4
16569
+ var isRegex$1 = hasToStringTag$3
16417
16570
  // eslint-disable-next-line consistent-return
16418
16571
  ? function isRegex(value) {
16419
16572
  if (!value || typeof value !== 'object') {
16420
16573
  return false;
16421
16574
  }
16422
16575
 
16423
- var descriptor = gOPD$1(value, 'lastIndex');
16576
+ var descriptor = gOPD(value, 'lastIndex');
16424
16577
  var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
16425
16578
  if (!hasLastIndexDataProperty) {
16426
16579
  return false;
@@ -16438,12 +16591,12 @@ var isRegex$1 = hasToStringTag$4
16438
16591
  return false;
16439
16592
  }
16440
16593
 
16441
- return $toString$2(value) === regexClass;
16594
+ return $toString$1(value) === regexClass;
16442
16595
  };
16443
16596
 
16444
- var callBound$5 = callBound$c;
16597
+ var callBound$4 = callBound$b;
16445
16598
 
16446
- var $byteLength$1 = callBound$5('SharedArrayBuffer.prototype.byteLength', true);
16599
+ var $byteLength$1 = callBound$4('SharedArrayBuffer.prototype.byteLength', true);
16447
16600
 
16448
16601
  var isSharedArrayBuffer$1 = $byteLength$1
16449
16602
  ? function isSharedArrayBuffer(obj) {
@@ -16472,7 +16625,7 @@ var tryStringObject = function tryStringObject(value) {
16472
16625
  };
16473
16626
  var toStr$2 = Object.prototype.toString;
16474
16627
  var strClass = '[object String]';
16475
- var hasToStringTag$3 = shams();
16628
+ var hasToStringTag$2 = shams();
16476
16629
 
16477
16630
  var isString$1 = function isString(value) {
16478
16631
  if (typeof value === 'string') {
@@ -16481,7 +16634,7 @@ var isString$1 = function isString(value) {
16481
16634
  if (typeof value !== 'object') {
16482
16635
  return false;
16483
16636
  }
16484
- return hasToStringTag$3 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16637
+ return hasToStringTag$2 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16485
16638
  };
16486
16639
 
16487
16640
  var numToStr = Number.prototype.toString;
@@ -16495,7 +16648,7 @@ var tryNumberObject = function tryNumberObject(value) {
16495
16648
  };
16496
16649
  var toStr$1 = Object.prototype.toString;
16497
16650
  var numClass = '[object Number]';
16498
- var hasToStringTag$2 = shams();
16651
+ var hasToStringTag$1 = shams();
16499
16652
 
16500
16653
  var isNumberObject = function isNumberObject(value) {
16501
16654
  if (typeof value === 'number') {
@@ -16504,12 +16657,12 @@ var isNumberObject = function isNumberObject(value) {
16504
16657
  if (typeof value !== 'object') {
16505
16658
  return false;
16506
16659
  }
16507
- return hasToStringTag$2 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16660
+ return hasToStringTag$1 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16508
16661
  };
16509
16662
 
16510
- var callBound$4 = callBound$c;
16511
- var $boolToStr = callBound$4('Boolean.prototype.toString');
16512
- var $toString$1 = callBound$4('Object.prototype.toString');
16663
+ var callBound$3 = callBound$b;
16664
+ var $boolToStr = callBound$3('Boolean.prototype.toString');
16665
+ var $toString = callBound$3('Object.prototype.toString');
16513
16666
 
16514
16667
  var tryBooleanObject = function booleanBrandCheck(value) {
16515
16668
  try {
@@ -16520,7 +16673,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
16520
16673
  }
16521
16674
  };
16522
16675
  var boolClass = '[object Boolean]';
16523
- var hasToStringTag$1 = shams();
16676
+ var hasToStringTag = shams();
16524
16677
 
16525
16678
  var isBooleanObject = function isBoolean(value) {
16526
16679
  if (typeof value === 'boolean') {
@@ -16529,7 +16682,7 @@ var isBooleanObject = function isBoolean(value) {
16529
16682
  if (value === null || typeof value !== 'object') {
16530
16683
  return false;
16531
16684
  }
16532
- return hasToStringTag$1 && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString$1(value) === boolClass;
16685
+ return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
16533
16686
  };
16534
16687
 
16535
16688
  var isSymbol$1 = {exports: {}};
@@ -16775,14 +16928,14 @@ var isWeakmap = exported || function isWeakMap(x) {
16775
16928
  var isWeakset = {exports: {}};
16776
16929
 
16777
16930
  var GetIntrinsic$1 = getIntrinsic;
16778
- var callBound$3 = callBound$c;
16931
+ var callBound$2 = callBound$b;
16779
16932
 
16780
16933
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
16781
16934
 
16782
- var $setHas$1 = callBound$3('WeakSet.prototype.has', true);
16935
+ var $setHas$1 = callBound$2('WeakSet.prototype.has', true);
16783
16936
 
16784
16937
  if ($setHas$1) {
16785
- var $mapHas$1 = callBound$3('WeakMap.prototype.has', true);
16938
+ var $mapHas$1 = callBound$2('WeakMap.prototype.has', true);
16786
16939
 
16787
16940
  isWeakset.exports = function isWeakSet(x) {
16788
16941
  if (!x || typeof x !== 'object') {
@@ -16834,61 +16987,7 @@ var whichCollection$1 = function whichCollection(value) {
16834
16987
  return false;
16835
16988
  };
16836
16989
 
16837
- var forEach = forEach_1;
16838
- var availableTypedArrays = availableTypedArrays$2;
16839
- var callBound$2 = callBound$c;
16840
- var gOPD = gopd;
16841
-
16842
- var $toString = callBound$2('Object.prototype.toString');
16843
- var hasToStringTag = shams();
16844
-
16845
- var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16846
- var typedArrays = availableTypedArrays();
16847
-
16848
- var $slice = callBound$2('String.prototype.slice');
16849
- var toStrTags = {};
16850
- var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16851
- if (hasToStringTag && gOPD && getPrototypeOf) {
16852
- forEach(typedArrays, function (typedArray) {
16853
- if (typeof g[typedArray] === 'function') {
16854
- var arr = new g[typedArray]();
16855
- if (Symbol.toStringTag in arr) {
16856
- var proto = getPrototypeOf(arr);
16857
- var descriptor = gOPD(proto, Symbol.toStringTag);
16858
- if (!descriptor) {
16859
- var superProto = getPrototypeOf(proto);
16860
- descriptor = gOPD(superProto, Symbol.toStringTag);
16861
- }
16862
- toStrTags[typedArray] = descriptor.get;
16863
- }
16864
- }
16865
- });
16866
- }
16867
-
16868
- var tryTypedArrays = function tryAllTypedArrays(value) {
16869
- var foundName = false;
16870
- forEach(toStrTags, function (getter, typedArray) {
16871
- if (!foundName) {
16872
- try {
16873
- var name = getter.call(value);
16874
- if (name === typedArray) {
16875
- foundName = name;
16876
- }
16877
- } catch (e) {}
16878
- }
16879
- });
16880
- return foundName;
16881
- };
16882
-
16883
- var isTypedArray = isTypedArray$2;
16884
-
16885
- var whichTypedArray$1 = function whichTypedArray(value) {
16886
- if (!isTypedArray(value)) { return false; }
16887
- if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
16888
- return tryTypedArrays(value);
16889
- };
16890
-
16891
- var callBound$1 = callBound$c;
16990
+ var callBound$1 = callBound$b;
16892
16991
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
16893
16992
 
16894
16993
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -16901,7 +17000,7 @@ var arrayBufferByteLength = function byteLength(ab) {
16901
17000
  }; // in node < 0.11, byteLength is an own nonconfigurable property
16902
17001
 
16903
17002
  var assign = object_assign;
16904
- var callBound = callBound$c;
17003
+ var callBound = callBound$b;
16905
17004
  var flags = regexp_prototype_flags;
16906
17005
  var GetIntrinsic = getIntrinsic;
16907
17006
  var getIterator = node;
@@ -16916,7 +17015,7 @@ var isSharedArrayBuffer = isSharedArrayBuffer$1;
16916
17015
  var objectKeys = objectKeys$2;
16917
17016
  var whichBoxedPrimitive = whichBoxedPrimitive$1;
16918
17017
  var whichCollection = whichCollection$1;
16919
- var whichTypedArray = whichTypedArray$1;
17018
+ var whichTypedArray = whichTypedArray$2;
16920
17019
  var byteLength = arrayBufferByteLength;
16921
17020
 
16922
17021
  var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
@@ -18103,7 +18202,7 @@ function createDOMElementFilter(filterNode) {
18103
18202
  return {
18104
18203
  test: val => {
18105
18204
  var _val$constructor2;
18106
- return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18205
+ return (val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18107
18206
  },
18108
18207
  serialize: (node, config, indentation, depth, refs, printer) => {
18109
18208
  if (nodeIsText(node)) {
@@ -18199,7 +18298,7 @@ function getDocument$2() {
18199
18298
  }
18200
18299
  return window.document;
18201
18300
  }
18202
- function getWindowFromNode$1(node) {
18301
+ function getWindowFromNode$2(node) {
18203
18302
  if (node.defaultView) {
18204
18303
  // node is document
18205
18304
  return node.defaultView;
@@ -18237,8 +18336,8 @@ function checkContainerType$1(container) {
18237
18336
  const shouldHighlight = () => {
18238
18337
  let colors;
18239
18338
  try {
18240
- var _process, _process$env;
18241
- colors = JSON.parse((_process = process) == null ? void 0 : (_process$env = _process.env) == null ? void 0 : _process$env.COLORS);
18339
+ var _process;
18340
+ colors = JSON.parse((_process = process) == null || (_process = _process.env) == null ? void 0 : _process.COLORS);
18242
18341
  } catch (e) {
18243
18342
  // If this throws, process?.env?.COLORS wasn't parsable. Since we only
18244
18343
  // care about `true` or `false`, we can safely ignore the error.
@@ -18261,7 +18360,7 @@ const COMMENT_NODE = 8;
18261
18360
 
18262
18361
  // https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50
18263
18362
  function filterCommentsAndDefaultIgnoreTagsTags(value) {
18264
- return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));
18363
+ return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig$3().defaultIgnore));
18265
18364
  }
18266
18365
  function prettyDOM(dom, maxLength, options) {
18267
18366
  if (options === void 0) {
@@ -18365,7 +18464,7 @@ function configure(newConfig) {
18365
18464
  ...newConfig
18366
18465
  };
18367
18466
  }
18368
- function getConfig() {
18467
+ function getConfig$3() {
18369
18468
  return config;
18370
18469
  }
18371
18470
 
@@ -18702,12 +18801,12 @@ function prettyRoles(dom, _ref6) {
18702
18801
  const delimiterBar = '-'.repeat(50);
18703
18802
  const elementsString = elements.map(el => {
18704
18803
  const nameString = "Name \"" + computeAccessibleName(el, {
18705
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18804
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18706
18805
  }) + "\":\n";
18707
18806
  const domString = prettyDOM(el.cloneNode(false));
18708
18807
  if (includeDescription) {
18709
18808
  const descriptionString = "Description \"" + computeAccessibleDescription(el, {
18710
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18809
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18711
18810
  }) + "\":\n";
18712
18811
  return "" + nameString + descriptionString + domString;
18713
18812
  }
@@ -18716,6 +18815,14 @@ function prettyRoles(dom, _ref6) {
18716
18815
  return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
18717
18816
  }).join('\n');
18718
18817
  }
18818
+ const logRoles = function (dom, _temp2) {
18819
+ let {
18820
+ hidden = false
18821
+ } = _temp2 === void 0 ? {} : _temp2;
18822
+ return console.log(prettyRoles(dom, {
18823
+ hidden
18824
+ }));
18825
+ };
18719
18826
 
18720
18827
  /**
18721
18828
  * @param {Element} element -
@@ -18911,7 +19018,7 @@ function getSuggestedQuery(element, variant, method) {
18911
19018
  variant = 'get';
18912
19019
  }
18913
19020
  // don't create suggestions for script and style elements
18914
- if (element.matches(getConfig().defaultIgnore)) {
19021
+ if (element.matches(getConfig$3().defaultIgnore)) {
18915
19022
  return undefined;
18916
19023
  }
18917
19024
 
@@ -18921,7 +19028,7 @@ function getSuggestedQuery(element, variant, method) {
18921
19028
  return makeSuggestion('Role', element, role, {
18922
19029
  variant,
18923
19030
  name: computeAccessibleName(element, {
18924
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19031
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18925
19032
  })
18926
19033
  });
18927
19034
  }
@@ -18960,7 +19067,7 @@ function getSuggestedQuery(element, variant, method) {
18960
19067
  variant
18961
19068
  });
18962
19069
  }
18963
- const testId = element.getAttribute(getConfig().testIdAttribute);
19070
+ const testId = element.getAttribute(getConfig$3().testIdAttribute);
18964
19071
  if (canSuggest('TestId', method, testId)) {
18965
19072
  return makeSuggestion('TestId', element, testId, {
18966
19073
  variant
@@ -18977,12 +19084,14 @@ function copyStackTrace(target, source) {
18977
19084
  function waitFor(callback, _ref) {
18978
19085
  let {
18979
19086
  container = getDocument$2(),
18980
- timeout = getConfig().asyncUtilTimeout,
18981
- showOriginalStackTrace = getConfig().showOriginalStackTrace,
19087
+ timeout = getConfig$3().asyncUtilTimeout,
19088
+ showOriginalStackTrace = getConfig$3().showOriginalStackTrace,
18982
19089
  stackTraceError,
18983
19090
  interval = 50,
18984
19091
  onTimeout = error => {
18985
- error.message = getConfig().getElementError(error.message, container).message;
19092
+ Object.defineProperty(error, 'message', {
19093
+ value: getConfig$3().getElementError(error.message, container).message
19094
+ });
18986
19095
  return error;
18987
19096
  },
18988
19097
  mutationObserverOptions = {
@@ -19004,7 +19113,7 @@ function waitFor(callback, _ref) {
19004
19113
  if (usingJestFakeTimers) {
19005
19114
  const {
19006
19115
  unstable_advanceTimersWrapper: advanceTimersWrapper
19007
- } = getConfig();
19116
+ } = getConfig$3();
19008
19117
  checkCallback();
19009
19118
  // this is a dangerous rule to disable because it could lead to an
19010
19119
  // infinite loop. However, eslint isn't smart enough to know that we're
@@ -19052,7 +19161,7 @@ function waitFor(callback, _ref) {
19052
19161
  intervalId = setInterval(checkRealTimersCallback, interval);
19053
19162
  const {
19054
19163
  MutationObserver
19055
- } = getWindowFromNode$1(container);
19164
+ } = getWindowFromNode$2(container);
19056
19165
  observer = new MutationObserver(checkRealTimersCallback);
19057
19166
  observer.observe(container, mutationObserverOptions);
19058
19167
  checkCallback();
@@ -19122,7 +19231,7 @@ function waitForWrapper(callback, options) {
19122
19231
  // create the error here so its stack trace is as close to the
19123
19232
  // calling code as possible
19124
19233
  const stackTraceError = new Error('STACK_TRACE_MESSAGE');
19125
- return getConfig().asyncWrapper(() => waitFor(callback, {
19234
+ return getConfig$3().asyncWrapper(() => waitFor(callback, {
19126
19235
  stackTraceError,
19127
19236
  ...options
19128
19237
  }));
@@ -19134,7 +19243,7 @@ eslint
19134
19243
  */
19135
19244
 
19136
19245
  function getElementError(message, container) {
19137
- return getConfig().getElementError(message, container);
19246
+ return getConfig$3().getElementError(message, container);
19138
19247
  }
19139
19248
  function getMultipleElementsFoundError(message, container) {
19140
19249
  return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);
@@ -19154,6 +19263,13 @@ function queryAllByAttribute(attribute, container, text, _temp) {
19154
19263
  });
19155
19264
  return Array.from(container.querySelectorAll("[" + attribute + "]")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
19156
19265
  }
19266
+ function queryByAttribute(attribute, container, text, options) {
19267
+ const els = queryAllByAttribute(attribute, container, text, options);
19268
+ if (els.length > 1) {
19269
+ throw getMultipleElementsFoundError("Found multiple elements by [" + attribute + "=" + text + "]", container);
19270
+ }
19271
+ return els[0] || null;
19272
+ }
19157
19273
 
19158
19274
  // this accepts a query function and returns a function which throws an error
19159
19275
  // if more than one elements is returned, otherwise it returns the first
@@ -19172,7 +19288,7 @@ function makeSingleQuery(allQuery, getMultipleError) {
19172
19288
  };
19173
19289
  }
19174
19290
  function getSuggestionError(suggestion, container) {
19175
- return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19291
+ return getConfig$3().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19176
19292
  }
19177
19293
 
19178
19294
  // this accepts a query function and returns a function which throws an error
@@ -19184,7 +19300,7 @@ function makeGetAllQuery(allQuery, getMissingError) {
19184
19300
  }
19185
19301
  const els = allQuery(container, ...args);
19186
19302
  if (!els.length) {
19187
- throw getConfig().getElementError(getMissingError(container, ...args), container);
19303
+ throw getConfig$3().getElementError(getMissingError(container, ...args), container);
19188
19304
  }
19189
19305
  return els;
19190
19306
  };
@@ -19208,7 +19324,7 @@ const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => functi
19208
19324
  }
19209
19325
  const element = query(container, ...args);
19210
19326
  const [{
19211
- suggest = getConfig().throwSuggestions
19327
+ suggest = getConfig$3().throwSuggestions
19212
19328
  } = {}] = args.slice(-1);
19213
19329
  if (element && suggest) {
19214
19330
  const suggestion = getSuggestedQuery(element, variant);
@@ -19224,7 +19340,7 @@ const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => functio
19224
19340
  }
19225
19341
  const els = query(container, ...args);
19226
19342
  const [{
19227
- suggest = getConfig().throwSuggestions
19343
+ suggest = getConfig$3().throwSuggestions
19228
19344
  } = {}] = args.slice(-1);
19229
19345
  if (els.length && suggest) {
19230
19346
  // get a unique list of all suggestion messages. We are only going to make a suggestion if
@@ -19258,6 +19374,20 @@ function buildQueries(queryAllBy, getMultipleError, getMissingError) {
19258
19374
  return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
19259
19375
  }
19260
19376
 
19377
+ var queryHelpers = /*#__PURE__*/Object.freeze({
19378
+ __proto__: null,
19379
+ getElementError: getElementError,
19380
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
19381
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion,
19382
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
19383
+ queryAllByAttribute: queryAllByAttribute,
19384
+ queryByAttribute: queryByAttribute,
19385
+ makeSingleQuery: makeSingleQuery,
19386
+ makeGetAllQuery: makeGetAllQuery,
19387
+ makeFindQuery: makeFindQuery,
19388
+ buildQueries: buildQueries
19389
+ });
19390
+
19261
19391
  function queryAllLabels(container) {
19262
19392
  return Array.from(container.querySelectorAll('label,input')).map(node => {
19263
19393
  return {
@@ -19367,12 +19497,12 @@ const getAllByLabelText = function (container, text) {
19367
19497
  if (labels.length) {
19368
19498
  const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);
19369
19499
  if (tagNames.length) {
19370
- throw getConfig().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
19500
+ throw getConfig$3().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
19371
19501
  } else {
19372
- throw getConfig().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
19502
+ throw getConfig$3().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
19373
19503
  }
19374
19504
  } else {
19375
- throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);
19505
+ throw getConfig$3().getElementError("Unable to find a label with the text of: " + text, container);
19376
19506
  }
19377
19507
  }
19378
19508
  return els;
@@ -19414,7 +19544,7 @@ const queryAllByText = function (container, text, _temp) {
19414
19544
  exact = true,
19415
19545
  collapseWhitespace,
19416
19546
  trim,
19417
- ignore = getConfig().defaultIgnore,
19547
+ ignore = getConfig$3().defaultIgnore,
19418
19548
  normalizer
19419
19549
  } = _temp === void 0 ? {} : _temp;
19420
19550
  checkContainerType$1(container);
@@ -19526,7 +19656,7 @@ const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = b
19526
19656
  /* eslint-disable complexity */
19527
19657
  const queryAllByRole = function (container, role, _temp) {
19528
19658
  let {
19529
- hidden = getConfig().defaultHidden,
19659
+ hidden = getConfig$3().defaultHidden,
19530
19660
  name,
19531
19661
  description,
19532
19662
  queryFallbacks = false,
@@ -19695,7 +19825,7 @@ const queryAllByRole = function (container, role, _temp) {
19695
19825
  return true;
19696
19826
  }
19697
19827
  return matches(computeAccessibleName(element, {
19698
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19828
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19699
19829
  }), element, name, text => text);
19700
19830
  }).filter(element => {
19701
19831
  if (description === undefined) {
@@ -19703,7 +19833,7 @@ const queryAllByRole = function (container, role, _temp) {
19703
19833
  return true;
19704
19834
  }
19705
19835
  return matches(computeAccessibleDescription(element, {
19706
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19836
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19707
19837
  }), element, description, text => text);
19708
19838
  }).filter(element => {
19709
19839
  return hidden === false ? isInaccessible(element, {
@@ -19746,11 +19876,11 @@ const getMultipleError$1 = function (c, role, _temp2) {
19746
19876
  };
19747
19877
  const getMissingError$1 = function (container, role, _temp3) {
19748
19878
  let {
19749
- hidden = getConfig().defaultHidden,
19879
+ hidden = getConfig$3().defaultHidden,
19750
19880
  name,
19751
19881
  description
19752
19882
  } = _temp3 === void 0 ? {} : _temp3;
19753
- if (getConfig()._disableExpensiveErrorDiagnostics) {
19883
+ if (getConfig$3()._disableExpensiveErrorDiagnostics) {
19754
19884
  return "Unable to find role=\"" + role + "\"" + getNameHint(name);
19755
19885
  }
19756
19886
  let roles = '';
@@ -19791,7 +19921,7 @@ const getMissingError$1 = function (container, role, _temp3) {
19791
19921
  const queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');
19792
19922
  const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);
19793
19923
 
19794
- const getTestIdAttribute = () => getConfig().testIdAttribute;
19924
+ const getTestIdAttribute = () => getConfig$3().testIdAttribute;
19795
19925
  const queryAllByTestId = function () {
19796
19926
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19797
19927
  args[_key] = arguments[_key];
@@ -19880,6 +20010,47 @@ function getQueriesForElement(element, queries$1, initialValue) {
19880
20010
  }, initialValue);
19881
20011
  }
19882
20012
 
20013
+ const isRemoved = result => !result || Array.isArray(result) && !result.length;
20014
+
20015
+ // Check if the element is not present.
20016
+ // As the name implies, waitForElementToBeRemoved should check `present` --> `removed`
20017
+ function initialCheck(elements) {
20018
+ if (isRemoved(elements)) {
20019
+ throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');
20020
+ }
20021
+ }
20022
+ async function waitForElementToBeRemoved(callback, options) {
20023
+ // created here so we get a nice stacktrace
20024
+ const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');
20025
+ if (typeof callback !== 'function') {
20026
+ initialCheck(callback);
20027
+ const elements = Array.isArray(callback) ? callback : [callback];
20028
+ const getRemainingElements = elements.map(element => {
20029
+ let parent = element.parentElement;
20030
+ if (parent === null) return () => null;
20031
+ while (parent.parentElement) parent = parent.parentElement;
20032
+ return () => parent.contains(element) ? element : null;
20033
+ });
20034
+ callback = () => getRemainingElements.map(c => c()).filter(Boolean);
20035
+ }
20036
+ initialCheck(callback());
20037
+ return waitForWrapper(() => {
20038
+ let result;
20039
+ try {
20040
+ result = callback();
20041
+ } catch (error) {
20042
+ if (error.name === 'TestingLibraryElementError') {
20043
+ return undefined;
20044
+ }
20045
+ throw error;
20046
+ }
20047
+ if (!isRemoved(result)) {
20048
+ throw timeoutError;
20049
+ }
20050
+ return undefined;
20051
+ }, options);
20052
+ }
20053
+
19883
20054
  /*
19884
20055
  eslint
19885
20056
  require-await: "off"
@@ -20578,7 +20749,7 @@ const eventAliasMap$1 = {
20578
20749
  };
20579
20750
 
20580
20751
  function fireEvent(element, event) {
20581
- return getConfig().eventWrapper(() => {
20752
+ return getConfig$3().eventWrapper(() => {
20582
20753
  if (!event) {
20583
20754
  throw new Error("Unable to fire an event - please provide an event object.");
20584
20755
  }
@@ -20622,7 +20793,7 @@ function createEvent$1(eventName, node, init, _temp) {
20622
20793
  });
20623
20794
  }
20624
20795
  Object.assign(node, targetProperties);
20625
- const window = getWindowFromNode$1(node);
20796
+ const window = getWindowFromNode$2(node);
20626
20797
  const EventConstructor = window[EventType] || window.Event;
20627
20798
  let event;
20628
20799
  /* istanbul ignore else */
@@ -20746,7 +20917,7 @@ const initialValue = {
20746
20917
  debug,
20747
20918
  logTestingPlaygroundURL
20748
20919
  };
20749
- typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20920
+ const screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20750
20921
  ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
20751
20922
  // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`
20752
20923
  // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary
@@ -20757,6 +20928,88 @@ typeof document !== 'undefined' && document.body // eslint-disable-line @typescr
20757
20928
  return helpers;
20758
20929
  }, initialValue);
20759
20930
 
20931
+ var named$1 = /*#__PURE__*/Object.freeze({
20932
+ __proto__: null,
20933
+ buildQueries: buildQueries,
20934
+ configure: configure,
20935
+ createEvent: createEvent$1,
20936
+ findAllByAltText: findAllByAltText,
20937
+ findAllByDisplayValue: findAllByDisplayValue,
20938
+ findAllByLabelText: findAllByLabelText,
20939
+ findAllByPlaceholderText: findAllByPlaceholderText,
20940
+ findAllByRole: findAllByRole,
20941
+ findAllByTestId: findAllByTestId,
20942
+ findAllByText: findAllByText,
20943
+ findAllByTitle: findAllByTitle,
20944
+ findByAltText: findByAltText,
20945
+ findByDisplayValue: findByDisplayValue,
20946
+ findByLabelText: findByLabelText,
20947
+ findByPlaceholderText: findByPlaceholderText,
20948
+ findByRole: findByRole,
20949
+ findByTestId: findByTestId,
20950
+ findByText: findByText,
20951
+ findByTitle: findByTitle,
20952
+ fireEvent: fireEvent,
20953
+ getAllByAltText: getAllByAltText,
20954
+ getAllByDisplayValue: getAllByDisplayValue,
20955
+ getAllByLabelText: getAllByLabelTextWithSuggestions,
20956
+ getAllByPlaceholderText: getAllByPlaceholderText,
20957
+ getAllByRole: getAllByRole,
20958
+ getAllByTestId: getAllByTestId,
20959
+ getAllByText: getAllByText,
20960
+ getAllByTitle: getAllByTitle,
20961
+ getByAltText: getByAltText,
20962
+ getByDisplayValue: getByDisplayValue,
20963
+ getByLabelText: getByLabelTextWithSuggestions,
20964
+ getByPlaceholderText: getByPlaceholderText,
20965
+ getByRole: getByRole,
20966
+ getByTestId: getByTestId,
20967
+ getByText: getByText,
20968
+ getByTitle: getByTitle,
20969
+ getConfig: getConfig$3,
20970
+ getDefaultNormalizer: getDefaultNormalizer,
20971
+ getElementError: getElementError,
20972
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
20973
+ getNodeText: getNodeText,
20974
+ getQueriesForElement: getQueriesForElement,
20975
+ getRoles: getRoles,
20976
+ getSuggestedQuery: getSuggestedQuery,
20977
+ isInaccessible: isInaccessible,
20978
+ logDOM: logDOM,
20979
+ logRoles: logRoles,
20980
+ makeFindQuery: makeFindQuery,
20981
+ makeGetAllQuery: makeGetAllQuery,
20982
+ makeSingleQuery: makeSingleQuery,
20983
+ prettyDOM: prettyDOM,
20984
+ prettyFormat: index,
20985
+ queries: queries,
20986
+ queryAllByAltText: queryAllByAltTextWithSuggestions,
20987
+ queryAllByAttribute: queryAllByAttribute,
20988
+ queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
20989
+ queryAllByLabelText: queryAllByLabelTextWithSuggestions,
20990
+ queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
20991
+ queryAllByRole: queryAllByRoleWithSuggestions,
20992
+ queryAllByTestId: queryAllByTestIdWithSuggestions,
20993
+ queryAllByText: queryAllByTextWithSuggestions,
20994
+ queryAllByTitle: queryAllByTitleWithSuggestions,
20995
+ queryByAltText: queryByAltText,
20996
+ queryByAttribute: queryByAttribute,
20997
+ queryByDisplayValue: queryByDisplayValue,
20998
+ queryByLabelText: queryByLabelText,
20999
+ queryByPlaceholderText: queryByPlaceholderText,
21000
+ queryByRole: queryByRole,
21001
+ queryByTestId: queryByTestId,
21002
+ queryByText: queryByText,
21003
+ queryByTitle: queryByTitle,
21004
+ queryHelpers: queryHelpers,
21005
+ screen: screen,
21006
+ waitFor: waitForWrapper,
21007
+ waitForElementToBeRemoved: waitForElementToBeRemoved,
21008
+ within: getQueriesForElement,
21009
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
21010
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion
21011
+ });
21012
+
20760
21013
  const domAct = testUtils__namespace.act;
20761
21014
  function getGlobalThis() {
20762
21015
  /* istanbul ignore else */
@@ -20980,15 +21233,15 @@ var helpers = {};
20980
21233
  Object.defineProperty(helpers, "__esModule", {
20981
21234
  value: true
20982
21235
  });
20983
- helpers.TEXT_NODE = void 0;
20984
- helpers.checkContainerType = checkContainerType;
20985
- helpers.getDocument = getDocument$1;
20986
- var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode;
20987
- helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
21236
+ var TEXT_NODE_1 = helpers.TEXT_NODE = void 0;
21237
+ var checkContainerType_1 = helpers.checkContainerType = checkContainerType;
21238
+ var getDocument_1 = helpers.getDocument = getDocument$1;
21239
+ var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode$1;
21240
+ var jestFakeTimersAreEnabled_1 = helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
20988
21241
  // Constant node.nodeType for text nodes, see:
20989
21242
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants
20990
21243
  const TEXT_NODE = 3;
20991
- helpers.TEXT_NODE = TEXT_NODE;
21244
+ TEXT_NODE_1 = helpers.TEXT_NODE = TEXT_NODE;
20992
21245
  function jestFakeTimersAreEnabled() {
20993
21246
  /* istanbul ignore else */
20994
21247
  // eslint-disable-next-line
@@ -21011,7 +21264,7 @@ function getDocument$1() {
21011
21264
  }
21012
21265
  return window.document;
21013
21266
  }
21014
- function getWindowFromNode(node) {
21267
+ function getWindowFromNode$1(node) {
21015
21268
  if (node.defaultView) {
21016
21269
  // node is document
21017
21270
  return node.defaultView;
@@ -21046,8 +21299,19 @@ function checkContainerType(container) {
21046
21299
  }
21047
21300
  }
21048
21301
 
21302
+ var named = /*#__PURE__*/_mergeNamespaces({
21303
+ __proto__: null,
21304
+ get TEXT_NODE () { return TEXT_NODE_1; },
21305
+ checkContainerType: checkContainerType_1,
21306
+ default: helpers,
21307
+ getDocument: getDocument_1,
21308
+ getWindowFromNode: getWindowFromNode_1,
21309
+ jestFakeTimersAreEnabled: jestFakeTimersAreEnabled_1
21310
+ }, [helpers]);
21311
+
21312
+ const { getWindowFromNode } = named;
21049
21313
  function getWindow(node) {
21050
- return getWindowFromNode_1(node);
21314
+ return getWindowFromNode(node);
21051
21315
  }
21052
21316
 
21053
21317
  // jsdom does not implement Blob.text()
@@ -21084,6 +21348,19 @@ function createFileList(window, files) {
21084
21348
  return list;
21085
21349
  }
21086
21350
 
21351
+ function _define_property$8(obj, key, value) {
21352
+ if (key in obj) {
21353
+ Object.defineProperty(obj, key, {
21354
+ value: value,
21355
+ enumerable: true,
21356
+ configurable: true,
21357
+ writable: true
21358
+ });
21359
+ } else {
21360
+ obj[key] = value;
21361
+ }
21362
+ return obj;
21363
+ }
21087
21364
  // DataTransfer is not implemented in jsdom.
21088
21365
  // DataTransfer with FileList is being created by the browser on certain events.
21089
21366
  class DataTransferItemStub {
@@ -21099,8 +21376,10 @@ class DataTransferItemStub {
21099
21376
  throw new Error('not implemented');
21100
21377
  }
21101
21378
  constructor(dataOrFile, type){
21102
- this.file = null;
21103
- this.data = undefined;
21379
+ _define_property$8(this, "kind", void 0);
21380
+ _define_property$8(this, "type", void 0);
21381
+ _define_property$8(this, "file", null);
21382
+ _define_property$8(this, "data", undefined);
21104
21383
  if (typeof dataOrFile === 'string') {
21105
21384
  this.kind = 'string';
21106
21385
  this.type = String(type);
@@ -21135,8 +21414,8 @@ function getTypeMatcher(type, exact) {
21135
21414
  function createDataTransferStub(window) {
21136
21415
  return new class DataTransferStub {
21137
21416
  getData(format) {
21138
- var ref;
21139
- const match = (ref = this.items.find(getTypeMatcher(format, true))) !== null && ref !== void 0 ? ref : this.items.find(getTypeMatcher(format, false));
21417
+ var _this_items_find;
21418
+ const match = (_this_items_find = this.items.find(getTypeMatcher(format, true))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(format, false));
21140
21419
  let text = '';
21141
21420
  match === null || match === void 0 ? void 0 : match.getAsString((t)=>{
21142
21421
  text = t;
@@ -21173,10 +21452,10 @@ function createDataTransferStub(window) {
21173
21452
  }
21174
21453
  /* istanbul ignore next */ setDragImage() {}
21175
21454
  constructor(){
21176
- this.dropEffect = 'none';
21177
- this.effectAllowed = 'uninitialized';
21178
- this.items = new DataTransferItemListStub();
21179
- this.files = createFileList(window, []);
21455
+ _define_property$8(this, "dropEffect", 'none');
21456
+ _define_property$8(this, "effectAllowed", 'uninitialized');
21457
+ _define_property$8(this, "items", new DataTransferItemListStub());
21458
+ _define_property$8(this, "files", createFileList(window, []));
21180
21459
  }
21181
21460
  }();
21182
21461
  }
@@ -21204,13 +21483,26 @@ function getBlobFromDataTransferItem(window, item) {
21204
21483
  }
21205
21484
 
21206
21485
  // Clipboard is not available in jsdom
21486
+ function _define_property$7(obj, key, value) {
21487
+ if (key in obj) {
21488
+ Object.defineProperty(obj, key, {
21489
+ value: value,
21490
+ enumerable: true,
21491
+ configurable: true,
21492
+ writable: true
21493
+ });
21494
+ } else {
21495
+ obj[key] = value;
21496
+ }
21497
+ return obj;
21498
+ }
21207
21499
  // MDN lists string|Blob|Promise<Blob|string> as possible types in ClipboardItemData
21208
21500
  // lib.dom.d.ts lists only Promise<Blob|string>
21209
21501
  // https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem#syntax
21210
21502
  function createClipboardItem(window, ...blobs) {
21211
21503
  const dataMap = Object.fromEntries(blobs.map((b)=>[
21212
21504
  typeof b === 'string' ? 'text/plain' : b.type,
21213
- Promise.resolve(b),
21505
+ Promise.resolve(b)
21214
21506
  ]));
21215
21507
  // use real ClipboardItem if available
21216
21508
  /* istanbul ignore if */ if (typeof window.ClipboardItem !== 'undefined') {
@@ -21232,6 +21524,7 @@ function createClipboardItem(window, ...blobs) {
21232
21524
  });
21233
21525
  }
21234
21526
  constructor(d){
21527
+ _define_property$7(this, "data", void 0);
21235
21528
  this.data = d;
21236
21529
  }
21237
21530
  }(dataMap);
@@ -21262,15 +21555,14 @@ function createClipboardStub(window, control) {
21262
21555
  }
21263
21556
  constructor(...args){
21264
21557
  super(...args);
21265
- this.items = [];
21558
+ _define_property$7(this, "items", []);
21266
21559
  }
21267
21560
  }(), {
21268
21561
  [ClipboardStubControl]: control
21269
21562
  });
21270
21563
  }
21271
21564
  function isClipboardStub(clipboard) {
21272
- var ref;
21273
- return !!((ref = clipboard) === null || ref === void 0 ? void 0 : ref[ClipboardStubControl]);
21565
+ return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
21274
21566
  }
21275
21567
  function attachClipboardStubToView(window) {
21276
21568
  if (isClipboardStub(window.navigator.clipboard)) {
@@ -21340,11 +21632,12 @@ async function writeDataTransferToClipboard(document, clipboardData) {
21340
21632
  throw new Error('The Clipboard API is unavailable.');
21341
21633
  }
21342
21634
  }
21343
- /* istanbul ignore else */ if (typeof globalThis.afterEach === 'function') {
21344
- globalThis.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21635
+ const g = globalThis;
21636
+ /* istanbul ignore else */ if (typeof g.afterEach === 'function') {
21637
+ g.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21345
21638
  }
21346
- /* istanbul ignore else */ if (typeof globalThis.afterAll === 'function') {
21347
- globalThis.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21639
+ /* istanbul ignore else */ if (typeof g.afterAll === 'function') {
21640
+ g.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21348
21641
  }
21349
21642
 
21350
21643
  //jsdom is not supporting isContentEditable
@@ -21395,8 +21688,8 @@ var maxLengthSupportedTypes;
21395
21688
  // can't use .maxLength property because of a jsdom bug:
21396
21689
  // https://github.com/jsdom/jsdom/issues/2927
21397
21690
  function getMaxLength(element) {
21398
- var ref;
21399
- const attr = (ref = element.getAttribute('maxlength')) !== null && ref !== void 0 ? ref : '';
21691
+ var _element_getAttribute;
21692
+ const attr = (_element_getAttribute = element.getAttribute('maxlength')) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : '';
21400
21693
  return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : undefined;
21401
21694
  }
21402
21695
  function supportsMaxLength(element) {
@@ -21411,7 +21704,7 @@ const FOCUSABLE_SELECTOR = [
21411
21704
  '[contenteditable=""]',
21412
21705
  '[contenteditable="true"]',
21413
21706
  'a[href]',
21414
- '[tabindex]:not([disabled])',
21707
+ '[tabindex]:not([disabled])'
21415
21708
  ].join(', ');
21416
21709
 
21417
21710
  function isFocusable(element) {
@@ -21457,16 +21750,16 @@ function readPrintableChar(text, pos, context) {
21457
21750
  };
21458
21751
  }
21459
21752
  function readTag(text, pos, startBracket, context) {
21460
- var ref, ref1;
21753
+ var _text_slice_match, _text_slice_match1;
21461
21754
  const releasePreviousModifier = text[pos] === '/' ? '/' : '';
21462
21755
  pos += releasePreviousModifier.length;
21463
21756
  const escapedDescriptor = startBracket === '{' && text[pos] === '\\';
21464
21757
  pos += Number(escapedDescriptor);
21465
- const descriptor = escapedDescriptor ? text[pos] : (ref = text.slice(pos).match(startBracket === '{' ? /^\w+|^[^}>/]/ : /^\w+/)) === null || ref === void 0 ? void 0 : ref[0];
21758
+ const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === '{' ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
21466
21759
  assertDescriptor(descriptor, text, pos, context);
21467
21760
  pos += descriptor.length;
21468
- var ref2;
21469
- const repeatModifier = (ref2 = (ref1 = text.slice(pos).match(/^>\d+/)) === null || ref1 === void 0 ? void 0 : ref1[0]) !== null && ref2 !== void 0 ? ref2 : '';
21761
+ var _text_slice_match_;
21762
+ const repeatModifier = (_text_slice_match_ = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _text_slice_match_ !== void 0 ? _text_slice_match_ : '';
21470
21763
  pos += repeatModifier.length;
21471
21764
  const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';
21472
21765
  pos += releaseSelfModifier.length;
@@ -21476,7 +21769,7 @@ function readTag(text, pos, startBracket, context) {
21476
21769
  throw new Error(getErrorMessage([
21477
21770
  !repeatModifier && 'repeat modifier',
21478
21771
  !releaseSelfModifier && 'release modifier',
21479
- `"${expectedEndBracket}"`,
21772
+ `"${expectedEndBracket}"`
21480
21773
  ].filter(Boolean).join(' or '), text[pos], text, context));
21481
21774
  }
21482
21775
  pos += endBracket.length;
@@ -21543,14 +21836,14 @@ function isDisabled(element) {
21543
21836
  'select',
21544
21837
  'textarea',
21545
21838
  'optgroup',
21546
- 'option',
21839
+ 'option'
21547
21840
  ])) {
21548
21841
  if (el.hasAttribute('disabled')) {
21549
21842
  return true;
21550
21843
  }
21551
21844
  } else if (isElementType(el, 'fieldset')) {
21552
- var ref;
21553
- if (el.hasAttribute('disabled') && !((ref = el.querySelector(':scope > legend')) === null || ref === void 0 ? void 0 : ref.contains(element))) {
21845
+ var _el_querySelector;
21846
+ if (el.hasAttribute('disabled') && !((_el_querySelector = el.querySelector(':scope > legend')) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) {
21554
21847
  return true;
21555
21848
  }
21556
21849
  } else if (el.tagName.includes('-')) {
@@ -21575,8 +21868,8 @@ function getActiveElement(document) {
21575
21868
  }
21576
21869
  }
21577
21870
  function getActiveElementOrBody(document) {
21578
- var ref;
21579
- return (ref = getActiveElement(document)) !== null && ref !== void 0 ? ref : /* istanbul ignore next */ document.body;
21871
+ var _getActiveElement;
21872
+ return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
21580
21873
  }
21581
21874
 
21582
21875
  function findClosest(element, callback) {
@@ -21622,8 +21915,8 @@ function isElement$1(node) {
21622
21915
  const contenteditable = getContentEditable(selection.focusNode);
21623
21916
  if (contenteditable) {
21624
21917
  if (!selection.isCollapsed) {
21625
- var ref;
21626
- const focusNode = ((ref = contenteditable.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21918
+ var _contenteditable_firstChild;
21919
+ const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21627
21920
  selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
21628
21921
  }
21629
21922
  } else {
@@ -21632,8 +21925,9 @@ function isElement$1(node) {
21632
21925
  }
21633
21926
  }
21634
21927
 
21928
+ const { getConfig: getConfig$2 } = named$1;
21635
21929
  function wrapEvent(cb, _element) {
21636
- return getConfig().eventWrapper(cb);
21930
+ return getConfig$2().eventWrapper(cb);
21637
21931
  }
21638
21932
 
21639
21933
  /**
@@ -21646,10 +21940,7 @@ function wrapEvent(cb, _element) {
21646
21940
  } else if (target) {
21647
21941
  wrapEvent(()=>target.focus());
21648
21942
  } else {
21649
- wrapEvent(()=>{
21650
- var ref;
21651
- return (ref = activeElement) === null || ref === void 0 ? void 0 : ref.blur();
21652
- });
21943
+ wrapEvent(()=>activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
21653
21944
  }
21654
21945
  updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
21655
21946
  }
@@ -21719,7 +22010,7 @@ function getInitialValue(element) {
21719
22010
  function setUISelectionRaw(element, selection) {
21720
22011
  element[UISelection] = selection;
21721
22012
  }
21722
- function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
22013
+ function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
21723
22014
  const valueLength = getUIValue(element).length;
21724
22015
  const sanitizeOffset = (o)=>Math.max(0, Math.min(valueLength, o));
21725
22016
  const anchorOffset = mode === 'replace' || element[UISelection] === undefined ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
@@ -21745,10 +22036,10 @@ function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset:
21745
22036
  }
21746
22037
  }
21747
22038
  function getUISelection(element) {
21748
- var _selectionStart, _selectionEnd, _UISelection;
21749
- const sel = (_UISelection = element[UISelection]) !== null && _UISelection !== void 0 ? _UISelection : {
21750
- anchorOffset: (_selectionStart = element.selectionStart) !== null && _selectionStart !== void 0 ? _selectionStart : 0,
21751
- focusOffset: (_selectionEnd = element.selectionEnd) !== null && _selectionEnd !== void 0 ? _selectionEnd : 0
22039
+ var _element_selectionStart, _element_selectionEnd, _element_UISelection;
22040
+ const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
22041
+ anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
22042
+ focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
21752
22043
  };
21753
22044
  return {
21754
22045
  ...sel,
@@ -21898,14 +22189,14 @@ function isTextNode(node) {
21898
22189
  }
21899
22190
  function walkNodes(node, direction, callback) {
21900
22191
  for(;;){
21901
- var ref;
22192
+ var _node_ownerDocument;
21902
22193
  const sibling = node[`${direction}Sibling`];
21903
22194
  if (sibling) {
21904
22195
  node = getDescendant(sibling, direction === 'next' ? 'first' : 'last');
21905
22196
  if (callback(node)) {
21906
22197
  return node;
21907
22198
  }
21908
- } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((ref = node.ownerDocument) === null || ref === void 0 ? void 0 : ref.body))) {
22199
+ } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body))) {
21909
22200
  node = node.parentNode;
21910
22201
  } else {
21911
22202
  break;
@@ -21940,8 +22231,8 @@ function startTrackValue(element) {
21940
22231
  };
21941
22232
  }
21942
22233
  function trackOrSetValue(element, v) {
21943
- var ref, ref1;
21944
- (ref = element[TrackChanges]) === null || ref === void 0 ? void 0 : (ref1 = ref.tracked) === null || ref1 === void 0 ? void 0 : ref1.push(v);
22234
+ var _element_TrackChanges_tracked, _element_TrackChanges;
22235
+ (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 ? void 0 : (_element_TrackChanges_tracked = _element_TrackChanges.tracked) === null || _element_TrackChanges_tracked === void 0 ? void 0 : _element_TrackChanges_tracked.push(v);
21945
22236
  if (!element[TrackChanges]) {
21946
22237
  setUIValueClean(element);
21947
22238
  setUISelection(element, {
@@ -21950,10 +22241,10 @@ function trackOrSetValue(element, v) {
21950
22241
  }
21951
22242
  }
21952
22243
  function commitValueAfterInput(element, cursorOffset) {
21953
- var ref;
22244
+ var _changes_tracked;
21954
22245
  const changes = element[TrackChanges];
21955
22246
  element[TrackChanges] = undefined;
21956
- if (!(changes === null || changes === void 0 ? void 0 : (ref = changes.tracked) === null || ref === void 0 ? void 0 : ref.length)) {
22247
+ if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) {
21957
22248
  return;
21958
22249
  }
21959
22250
  const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
@@ -21997,16 +22288,16 @@ function getElement(node) {
21997
22288
  if (typeAndSelection.type === 'input') {
21998
22289
  return typeAndSelection.selection;
21999
22290
  } else if (typeAndSelection.type === 'contenteditable') {
22000
- var ref;
22291
+ var _typeAndSelection_selection;
22001
22292
  // Multi-range on contenteditable edits the first selection instead of the last
22002
- return (ref = typeAndSelection.selection) === null || ref === void 0 ? void 0 : ref.getRangeAt(0);
22293
+ return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
22003
22294
  }
22004
22295
  }
22005
22296
 
22006
22297
  /**
22007
22298
  * Set the selection
22008
- */ function setSelection({ focusNode , focusOffset , anchorNode =focusNode , anchorOffset =focusOffset }) {
22009
- var ref, ref1;
22299
+ */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
22300
+ var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
22010
22301
  const typeAndSelection = getTargetTypeAndSelection(focusNode);
22011
22302
  if (typeAndSelection.type === 'input') {
22012
22303
  return setUISelection(focusNode, {
@@ -22014,7 +22305,7 @@ function getElement(node) {
22014
22305
  focusOffset
22015
22306
  });
22016
22307
  }
22017
- (ref1 = (ref = anchorNode.ownerDocument) === null || ref === void 0 ? void 0 : ref.getSelection()) === null || ref1 === void 0 ? void 0 : ref1.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
22308
+ (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 ? void 0 : (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) === null || _anchorNode_ownerDocument_getSelection === void 0 ? void 0 : _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
22018
22309
  }
22019
22310
 
22020
22311
  function isDateOrTime(element) {
@@ -22097,7 +22388,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22097
22388
  }
22098
22389
  }
22099
22390
  }
22100
- const { newValue , newOffset , oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22391
+ const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22101
22392
  if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) {
22102
22393
  return;
22103
22394
  }
@@ -22125,7 +22416,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22125
22416
  });
22126
22417
  }
22127
22418
  }
22128
- function calculateNewValue(inputData, node, { startOffset , endOffset }, inputType) {
22419
+ function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
22129
22420
  const value = getUIValue(node);
22130
22421
  const prologEnd = Math.max(0, startOffset === endOffset && inputType === 'deleteContentBackward' ? startOffset - 1 : startOffset);
22131
22422
  const prolog = value.substring(0, prologEnd);
@@ -22153,12 +22444,12 @@ function commitInput(instance, element, newOffset, inputInit) {
22153
22444
  commitValueAfterInput(element, newOffset);
22154
22445
  }
22155
22446
  function isValidNumberInput(value) {
22156
- var ref, ref1;
22447
+ var _value_match, _value_match1;
22157
22448
  // the browser allows some invalid input but not others
22158
22449
  // it allows up to two '-' at any place before any 'e' or one directly following 'e'
22159
22450
  // it allows one '.' at any place before e
22160
22451
  const valueParts = value.split('e', 2);
22161
- return !(/[^\d.\-e]/.test(value) || Number((ref = value.match(/-/g)) === null || ref === void 0 ? void 0 : ref.length) > 2 || Number((ref1 = value.match(/\./g)) === null || ref1 === void 0 ? void 0 : ref1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
22452
+ return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
22162
22453
  }
22163
22454
 
22164
22455
  behavior.cut = (event, target, instance)=>{
@@ -22183,7 +22474,7 @@ function getValueOrTextContent(element) {
22183
22474
  function isVisible(element) {
22184
22475
  const window = getWindow(element);
22185
22476
  for(let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement){
22186
- const { display , visibility } = window.getComputedStyle(el);
22477
+ const { display, visibility } = window.getComputedStyle(el);
22187
22478
  if (display === 'none') {
22188
22479
  return false;
22189
22480
  }
@@ -22277,12 +22568,12 @@ function getTabDestination(activeElement, shift) {
22277
22568
  focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
22278
22569
  });
22279
22570
  } else {
22280
- const selection1 = node.ownerDocument.getSelection();
22281
- if (!(selection1 === null || selection1 === void 0 ? void 0 : selection1.focusNode)) {
22571
+ const selection = node.ownerDocument.getSelection();
22572
+ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) {
22282
22573
  return;
22283
22574
  }
22284
- if (selection1.isCollapsed) {
22285
- const nextPosition = getNextCursorPosition(selection1.focusNode, selection1.focusOffset, direction);
22575
+ if (selection.isCollapsed) {
22576
+ const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
22286
22577
  if (nextPosition) {
22287
22578
  setSelection({
22288
22579
  focusNode: nextPosition.node,
@@ -22290,7 +22581,7 @@ function getTabDestination(activeElement, shift) {
22290
22581
  });
22291
22582
  }
22292
22583
  } else {
22293
- selection1[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22584
+ selection[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22294
22585
  }
22295
22586
  }
22296
22587
  }
@@ -22305,8 +22596,8 @@ function getTabDestination(activeElement, shift) {
22305
22596
  focusOffset: getUIValue(target).length
22306
22597
  });
22307
22598
  }
22308
- var ref;
22309
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22599
+ var _getContentEditable;
22600
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22310
22601
  setSelection({
22311
22602
  focusNode,
22312
22603
  anchorOffset: 0,
@@ -22317,8 +22608,8 @@ function isAllSelected(target) {
22317
22608
  if (hasOwnSelection(target)) {
22318
22609
  return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
22319
22610
  }
22320
- var ref;
22321
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22611
+ var _getContentEditable;
22612
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22322
22613
  const selection = target.ownerDocument.getSelection();
22323
22614
  return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
22324
22615
  }
@@ -22328,7 +22619,7 @@ function isAllSelected(target) {
22328
22619
  *
22329
22620
  * Handles input elements and contenteditable if it only contains a single text node.
22330
22621
  */ function setSelectionRange(element, anchorOffset, focusOffset) {
22331
- var ref;
22622
+ var _element_firstChild;
22332
22623
  if (hasOwnSelection(element)) {
22333
22624
  return setSelection({
22334
22625
  focusNode: element,
@@ -22336,7 +22627,7 @@ function isAllSelected(target) {
22336
22627
  focusOffset
22337
22628
  });
22338
22629
  }
22339
- /* istanbul ignore else */ if (isContentEditable(element) && ((ref = element.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3) {
22630
+ /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) {
22340
22631
  return setSelection({
22341
22632
  focusNode: element.firstChild,
22342
22633
  anchorOffset,
@@ -22365,9 +22656,9 @@ function walkRadio(instance, el, direction) {
22365
22656
  }
22366
22657
 
22367
22658
  behavior.keydown = (event, target, instance)=>{
22368
- var ref;
22369
- var ref1;
22370
- return (ref1 = (ref = keydownBehavior[event.key]) === null || ref === void 0 ? void 0 : ref.call(keydownBehavior, event, target, instance)) !== null && ref1 !== void 0 ? ref1 : combinationBehavior(event, target, instance);
22659
+ var _keydownBehavior_event_key;
22660
+ var _keydownBehavior_event_key1;
22661
+ return (_keydownBehavior_event_key1 = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _keydownBehavior_event_key1 !== void 0 ? _keydownBehavior_event_key1 : combinationBehavior(event, target, instance);
22371
22662
  };
22372
22663
  const keydownBehavior = {
22373
22664
  ArrowDown: (event, target, instance)=>{
@@ -22420,9 +22711,9 @@ const keydownBehavior = {
22420
22711
  'textarea'
22421
22712
  ]) || isContentEditable(target)) {
22422
22713
  return ()=>{
22423
- var ref;
22424
- var ref1;
22425
- const newPos = (ref1 = (ref = getValueOrTextContent(target)) === null || ref === void 0 ? void 0 : ref.length) !== null && ref1 !== void 0 ? ref1 : /* istanbul ignore next */ 0;
22714
+ var _getValueOrTextContent;
22715
+ var _getValueOrTextContent_length;
22716
+ const newPos = (_getValueOrTextContent_length = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _getValueOrTextContent_length !== void 0 ? _getValueOrTextContent_length : /* istanbul ignore next */ 0;
22426
22717
  setSelectionRange(target, newPos, newPos);
22427
22718
  };
22428
22719
  }
@@ -22505,7 +22796,7 @@ const ClickInputOnEnter = [
22505
22796
  'file',
22506
22797
  'image',
22507
22798
  'reset',
22508
- 'submit',
22799
+ 'submit'
22509
22800
  ];
22510
22801
  const SubmitSingleInputOnEnter = [
22511
22802
  'email',
@@ -22515,12 +22806,12 @@ const SubmitSingleInputOnEnter = [
22515
22806
  'tel',
22516
22807
  'text',
22517
22808
  'url',
22518
- 'week',
22809
+ 'week'
22519
22810
  ];
22520
22811
 
22521
22812
  behavior.keyup = (event, target, instance)=>{
22522
- var ref;
22523
- return (ref = keyupBehavior[event.key]) === null || ref === void 0 ? void 0 : ref.call(keyupBehavior, event, target, instance);
22813
+ var _keyupBehavior_event_key;
22814
+ return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
22524
22815
  };
22525
22816
  const keyupBehavior = {
22526
22817
  ' ': (event, target, instance)=>{
@@ -22533,8 +22824,8 @@ const keyupBehavior = {
22533
22824
  behavior.paste = (event, target, instance)=>{
22534
22825
  if (isEditable(target)) {
22535
22826
  return ()=>{
22536
- var ref;
22537
- const insertData = (ref = event.clipboardData) === null || ref === void 0 ? void 0 : ref.getData('text');
22827
+ var _event_clipboardData;
22828
+ const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData('text');
22538
22829
  if (insertData) {
22539
22830
  input(instance, target, insertData, 'insertFromPaste');
22540
22831
  }
@@ -23313,7 +23604,7 @@ const eventInitializer = {
23313
23604
  initUIEvent,
23314
23605
  initUIEventModififiers,
23315
23606
  initMouseEvent,
23316
- initPointerEvent,
23607
+ initPointerEvent
23317
23608
  ],
23318
23609
  KeyboardEvent: [
23319
23610
  initUIEvent,
@@ -23322,58 +23613,58 @@ const eventInitializer = {
23322
23613
  ]
23323
23614
  };
23324
23615
  function createEvent(type, target, init) {
23325
- var ref;
23616
+ var _eventInitializer_EventType;
23326
23617
  const window = getWindow(target);
23327
- const { EventType , defaultInit } = eventMap[eventMapKeys[type]];
23618
+ const { EventType, defaultInit } = eventMap[eventMapKeys[type]];
23328
23619
  const event = new (getEventConstructors(window))[EventType](type, defaultInit);
23329
- (ref = eventInitializer[EventType]) === null || ref === void 0 ? void 0 : ref.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23620
+ (_eventInitializer_EventType = eventInitializer[EventType]) === null || _eventInitializer_EventType === void 0 ? void 0 : _eventInitializer_EventType.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23330
23621
  return event;
23331
23622
  }
23332
23623
  /* istanbul ignore next */ function getEventConstructors(window) {
23333
- var _Event;
23334
- /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_Event = window.Event) !== null && _Event !== void 0 ? _Event : class Event {
23624
+ var _window_Event;
23625
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_window_Event = window.Event) !== null && _window_Event !== void 0 ? _window_Event : class Event {
23335
23626
  };
23336
- var _AnimationEvent;
23337
- const AnimationEvent = (_AnimationEvent = window.AnimationEvent) !== null && _AnimationEvent !== void 0 ? _AnimationEvent : class AnimationEvent extends Event {
23627
+ var _window_AnimationEvent;
23628
+ const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {
23338
23629
  };
23339
- var _ClipboardEvent;
23340
- const ClipboardEvent = (_ClipboardEvent = window.ClipboardEvent) !== null && _ClipboardEvent !== void 0 ? _ClipboardEvent : class ClipboardEvent extends Event {
23630
+ var _window_ClipboardEvent;
23631
+ const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {
23341
23632
  };
23342
- var _PopStateEvent;
23343
- const PopStateEvent = (_PopStateEvent = window.PopStateEvent) !== null && _PopStateEvent !== void 0 ? _PopStateEvent : class PopStateEvent extends Event {
23633
+ var _window_PopStateEvent;
23634
+ const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {
23344
23635
  };
23345
- var _ProgressEvent;
23346
- const ProgressEvent = (_ProgressEvent = window.ProgressEvent) !== null && _ProgressEvent !== void 0 ? _ProgressEvent : class ProgressEvent extends Event {
23636
+ var _window_ProgressEvent;
23637
+ const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {
23347
23638
  };
23348
- var _TransitionEvent;
23349
- const TransitionEvent = (_TransitionEvent = window.TransitionEvent) !== null && _TransitionEvent !== void 0 ? _TransitionEvent : class TransitionEvent extends Event {
23639
+ var _window_TransitionEvent;
23640
+ const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {
23350
23641
  };
23351
- var _UIEvent;
23352
- const UIEvent = (_UIEvent = window.UIEvent) !== null && _UIEvent !== void 0 ? _UIEvent : class UIEvent extends Event {
23642
+ var _window_UIEvent;
23643
+ const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {
23353
23644
  };
23354
- var _CompositionEvent;
23355
- const CompositionEvent = (_CompositionEvent = window.CompositionEvent) !== null && _CompositionEvent !== void 0 ? _CompositionEvent : class CompositionEvent extends UIEvent {
23645
+ var _window_CompositionEvent;
23646
+ const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {
23356
23647
  };
23357
- var _FocusEvent;
23358
- const FocusEvent = (_FocusEvent = window.FocusEvent) !== null && _FocusEvent !== void 0 ? _FocusEvent : class FocusEvent extends UIEvent {
23648
+ var _window_FocusEvent;
23649
+ const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {
23359
23650
  };
23360
- var _InputEvent;
23361
- const InputEvent = (_InputEvent = window.InputEvent) !== null && _InputEvent !== void 0 ? _InputEvent : class InputEvent extends UIEvent {
23651
+ var _window_InputEvent;
23652
+ const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {
23362
23653
  };
23363
- var _KeyboardEvent;
23364
- const KeyboardEvent = (_KeyboardEvent = window.KeyboardEvent) !== null && _KeyboardEvent !== void 0 ? _KeyboardEvent : class KeyboardEvent extends UIEvent {
23654
+ var _window_KeyboardEvent;
23655
+ const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {
23365
23656
  };
23366
- var _MouseEvent;
23367
- const MouseEvent = (_MouseEvent = window.MouseEvent) !== null && _MouseEvent !== void 0 ? _MouseEvent : class MouseEvent extends UIEvent {
23657
+ var _window_MouseEvent;
23658
+ const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {
23368
23659
  };
23369
- var _DragEvent;
23370
- const DragEvent = (_DragEvent = window.DragEvent) !== null && _DragEvent !== void 0 ? _DragEvent : class DragEvent extends MouseEvent {
23660
+ var _window_DragEvent;
23661
+ const DragEvent = (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {
23371
23662
  };
23372
- var _PointerEvent;
23373
- const PointerEvent = (_PointerEvent = window.PointerEvent) !== null && _PointerEvent !== void 0 ? _PointerEvent : class PointerEvent extends MouseEvent {
23663
+ var _window_PointerEvent;
23664
+ const PointerEvent = (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {
23374
23665
  };
23375
- var _TouchEvent;
23376
- const TouchEvent = (_TouchEvent = window.TouchEvent) !== null && _TouchEvent !== void 0 ? _TouchEvent : class TouchEvent extends UIEvent {
23666
+ var _window_TouchEvent;
23667
+ const TouchEvent = (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {
23377
23668
  };
23378
23669
  /* eslint-enable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ return {
23379
23670
  Event,
@@ -23403,25 +23694,25 @@ function assignProps(obj, props) {
23403
23694
  function sanitizeNumber(n) {
23404
23695
  return Number(n !== null && n !== void 0 ? n : 0);
23405
23696
  }
23406
- function initClipboardEvent(event, { clipboardData }) {
23697
+ function initClipboardEvent(event, { clipboardData }) {
23407
23698
  assignProps(event, {
23408
23699
  clipboardData
23409
23700
  });
23410
23701
  }
23411
- function initInputEvent(event, { data , inputType , isComposing }) {
23702
+ function initInputEvent(event, { data, inputType, isComposing }) {
23412
23703
  assignProps(event, {
23413
23704
  data,
23414
23705
  isComposing: Boolean(isComposing),
23415
23706
  inputType: String(inputType)
23416
23707
  });
23417
23708
  }
23418
- function initUIEvent(event, { view , detail }) {
23709
+ function initUIEvent(event, { view, detail }) {
23419
23710
  assignProps(event, {
23420
23711
  view,
23421
23712
  detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
23422
23713
  });
23423
23714
  }
23424
- function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey , modifierAltGraph , modifierCapsLock , modifierFn , modifierFnLock , modifierNumLock , modifierScrollLock , modifierSymbol , modifierSymbolLock }) {
23715
+ function initUIEventModififiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
23425
23716
  assignProps(event, {
23426
23717
  altKey: Boolean(altKey),
23427
23718
  ctrlKey: Boolean(ctrlKey),
@@ -23445,7 +23736,7 @@ function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey ,
23445
23736
  }
23446
23737
  });
23447
23738
  }
23448
- function initKeyboardEvent(event, { key , code , location , repeat , isComposing , charCode }) {
23739
+ function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
23449
23740
  assignProps(event, {
23450
23741
  key: String(key),
23451
23742
  code: String(code),
@@ -23455,7 +23746,7 @@ function initKeyboardEvent(event, { key , code , location , repeat , isComposing
23455
23746
  charCode
23456
23747
  });
23457
23748
  }
23458
- function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , clientY =y , button , buttons , relatedTarget }) {
23749
+ function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget }) {
23459
23750
  assignProps(event, {
23460
23751
  screenX: sanitizeNumber(screenX),
23461
23752
  screenY: sanitizeNumber(screenY),
@@ -23468,7 +23759,7 @@ function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , client
23468
23759
  relatedTarget
23469
23760
  });
23470
23761
  }
23471
- function initPointerEvent(event, { pointerId , width , height , pressure , tangentialPressure , tiltX , tiltY , twist , pointerType , isPrimary }) {
23762
+ function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary }) {
23472
23763
  assignProps(event, {
23473
23764
  pointerId: sanitizeNumber(pointerId),
23474
23765
  width: sanitizeNumber(width),
@@ -23494,9 +23785,9 @@ function dispatchUIEvent(target, type, init, preventDefault = false) {
23494
23785
  return dispatchEvent.call(this, target, event, preventDefault);
23495
23786
  }
23496
23787
  function dispatchEvent(target, event, preventDefault = false) {
23497
- var ref;
23788
+ var _behavior_type;
23498
23789
  const type = event.type;
23499
- const behaviorImplementation = preventDefault ? ()=>{} : (ref = behavior[type]) === null || ref === void 0 ? void 0 : ref(event, target, this);
23790
+ const behaviorImplementation = preventDefault ? ()=>{} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
23500
23791
  if (behaviorImplementation) {
23501
23792
  event.preventDefault();
23502
23793
  let defaultPrevented = false;
@@ -23530,7 +23821,7 @@ function prepareInterceptor(element, propName, interceptorImpl) {
23530
23821
  throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
23531
23822
  }
23532
23823
  function intercept(...args) {
23533
- const { applyNative =false , realArgs , then , } = interceptorImpl.call(this, ...args);
23824
+ const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
23534
23825
  const realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];
23535
23826
  if (target === 'set') {
23536
23827
  realFunc.call(this, realArgs);
@@ -23676,11 +23967,23 @@ function wait(config) {
23676
23967
  }
23677
23968
  return Promise.all([
23678
23969
  new Promise((resolve)=>globalThis.setTimeout(()=>resolve(), delay)),
23679
- config.advanceTimers(delay),
23970
+ config.advanceTimers(delay)
23680
23971
  ]);
23681
23972
  }
23682
23973
 
23683
- var _pressed, _code, _code1;
23974
+ function _define_property$6(obj, key, value) {
23975
+ if (key in obj) {
23976
+ Object.defineProperty(obj, key, {
23977
+ value: value,
23978
+ enumerable: true,
23979
+ configurable: true,
23980
+ writable: true
23981
+ });
23982
+ } else {
23983
+ obj[key] = value;
23984
+ }
23985
+ return obj;
23986
+ }
23684
23987
  var DOM_KEY_LOCATION;
23685
23988
  (function(DOM_KEY_LOCATION) {
23686
23989
  DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
@@ -23695,7 +23998,7 @@ const modifierKeys = [
23695
23998
  'Fn',
23696
23999
  'Meta',
23697
24000
  'Shift',
23698
- 'Symbol',
24001
+ 'Symbol'
23699
24002
  ];
23700
24003
  function isModifierKey(key) {
23701
24004
  return modifierKeys.includes(key);
@@ -23705,7 +24008,7 @@ const modifierLocks = [
23705
24008
  'FnLock',
23706
24009
  'NumLock',
23707
24010
  'ScrollLock',
23708
- 'SymbolLock',
24011
+ 'SymbolLock'
23709
24012
  ];
23710
24013
  function isModifierLock(key) {
23711
24014
  return modifierLocks.includes(key);
@@ -23718,12 +24021,14 @@ class KeyboardHost {
23718
24021
  return Object.values(this.pressed).map((p)=>p.keyDef);
23719
24022
  }
23720
24023
  /** Press a key */ async keydown(instance, keyDef) {
24024
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
24025
+ _this_pressed, _code, _this_pressed_code;
23721
24026
  const key = String(keyDef.key);
23722
24027
  const code = String(keyDef.code);
23723
24028
  const target = getActiveElementOrBody(instance.config.document);
23724
24029
  this.setKeydownTarget(target);
23725
- var ref;
23726
- (ref = (_pressed = this.pressed)[_code = code]) !== null && ref !== void 0 ? ref : _pressed[_code] = {
24030
+ var _;
24031
+ (_ = (_this_pressed = this.pressed)[_code = code]) !== null && _ !== void 0 ? _ : _this_pressed[_code] = {
23727
24032
  keyDef,
23728
24033
  unpreventedDefault: false
23729
24034
  };
@@ -23738,7 +24043,7 @@ class KeyboardHost {
23738
24043
  this.modifiers[key] = true;
23739
24044
  this.modifierLockStart[key] = true;
23740
24045
  }
23741
- (_code1 = this.pressed[code]).unpreventedDefault || (_code1.unpreventedDefault = unprevented);
24046
+ (_this_pressed_code = this.pressed[code]).unpreventedDefault || (_this_pressed_code.unpreventedDefault = unprevented);
23742
24047
  if (unprevented && this.hasKeyPress(key)) {
23743
24048
  instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), 'keypress', {
23744
24049
  key,
@@ -23778,7 +24083,8 @@ class KeyboardHost {
23778
24083
  return (key.length === 1 || key === 'Enter') && !this.modifiers.Control && !this.modifiers.Alt;
23779
24084
  }
23780
24085
  constructor(system){
23781
- this.modifiers = {
24086
+ _define_property$6(this, "system", void 0);
24087
+ _define_property$6(this, "modifiers", {
23782
24088
  Alt: false,
23783
24089
  AltGraph: false,
23784
24090
  CapsLock: false,
@@ -23791,11 +24097,11 @@ class KeyboardHost {
23791
24097
  Shift: false,
23792
24098
  Symbol: false,
23793
24099
  SymbolLock: false
23794
- };
23795
- this.pressed = {};
23796
- this.carryChar = '';
23797
- this.lastKeydownTarget = undefined;
23798
- this.modifierLockStart = {};
24100
+ });
24101
+ _define_property$6(this, "pressed", {});
24102
+ _define_property$6(this, "carryChar", '');
24103
+ _define_property$6(this, "lastKeydownTarget", undefined);
24104
+ _define_property$6(this, "modifierLockStart", {});
23799
24105
  this.system = system;
23800
24106
  }
23801
24107
  }
@@ -23978,9 +24284,22 @@ const defaultKeyMap = [
23978
24284
  {
23979
24285
  name: 'TouchC',
23980
24286
  pointerType: 'touch'
23981
- },
24287
+ }
23982
24288
  ];
23983
24289
 
24290
+ function _define_property$5(obj, key, value) {
24291
+ if (key in obj) {
24292
+ Object.defineProperty(obj, key, {
24293
+ value: value,
24294
+ enumerable: true,
24295
+ configurable: true,
24296
+ writable: true
24297
+ });
24298
+ } else {
24299
+ obj[key] = value;
24300
+ }
24301
+ return obj;
24302
+ }
23984
24303
  class Buttons {
23985
24304
  getButtons() {
23986
24305
  let v = 0;
@@ -24014,7 +24333,7 @@ class Buttons {
24014
24333
  return undefined;
24015
24334
  }
24016
24335
  constructor(){
24017
- this.pressed = {};
24336
+ _define_property$5(this, "pressed", {});
24018
24337
  }
24019
24338
  }
24020
24339
  const MouseButton = {
@@ -24045,6 +24364,19 @@ function getMouseEventButton(button) {
24045
24364
  return button;
24046
24365
  }
24047
24366
 
24367
+ function _define_property$4(obj, key, value) {
24368
+ if (key in obj) {
24369
+ Object.defineProperty(obj, key, {
24370
+ value: value,
24371
+ enumerable: true,
24372
+ configurable: true,
24373
+ writable: true
24374
+ });
24375
+ } else {
24376
+ obj[key] = value;
24377
+ }
24378
+ return obj;
24379
+ }
24048
24380
  class Device {
24049
24381
  get countPressed() {
24050
24382
  return this.pressedKeys.size;
@@ -24059,7 +24391,7 @@ class Device {
24059
24391
  return this.pressedKeys.delete(keyDef.name);
24060
24392
  }
24061
24393
  constructor(){
24062
- this.pressedKeys = new Set();
24394
+ _define_property$4(this, "pressedKeys", new Set());
24063
24395
  }
24064
24396
  }
24065
24397
 
@@ -24069,8 +24401,8 @@ function getTreeDiff(a, b) {
24069
24401
  treeA.push(el);
24070
24402
  }
24071
24403
  const treeB = [];
24072
- for(let el1 = b; el1; el1 = el1.parentElement){
24073
- treeB.push(el1);
24404
+ for(let el = b; el; el = el.parentElement){
24405
+ treeB.push(el);
24074
24406
  }
24075
24407
  let i = 0;
24076
24408
  for(;; i++){
@@ -24081,11 +24413,11 @@ function getTreeDiff(a, b) {
24081
24413
  return [
24082
24414
  treeA.slice(0, treeA.length - i),
24083
24415
  treeB.slice(0, treeB.length - i),
24084
- treeB.slice(treeB.length - i),
24416
+ treeB.slice(treeB.length - i)
24085
24417
  ];
24086
24418
  }
24087
24419
 
24088
- function resolveCaretPosition({ target , node , offset }) {
24420
+ function resolveCaretPosition({ target, node, offset }) {
24089
24421
  if (hasOwnSelection(target)) {
24090
24422
  return {
24091
24423
  node: target,
@@ -24139,7 +24471,7 @@ function findNodeAtTextOffset(node, offset, isRoot = true) {
24139
24471
  };
24140
24472
  }
24141
24473
 
24142
- function setSelectionPerMouseDown({ document , target , clickCount , node , offset }) {
24474
+ function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
24143
24475
  if (hasNoSelection(target)) {
24144
24476
  return;
24145
24477
  }
@@ -24168,12 +24500,12 @@ function setSelectionPerMouseDown({ document , target , clickCount , node , offs
24168
24500
  end: end !== null && end !== void 0 ? end : text.length
24169
24501
  };
24170
24502
  } else {
24171
- const { node: startNode , offset: startOffset } = resolveCaretPosition({
24503
+ const { node: startNode, offset: startOffset } = resolveCaretPosition({
24172
24504
  target,
24173
24505
  node,
24174
24506
  offset: start
24175
24507
  });
24176
- const { node: endNode , offset: endOffset } = resolveCaretPosition({
24508
+ const { node: endNode, offset: endOffset } = resolveCaretPosition({
24177
24509
  target,
24178
24510
  node,
24179
24511
  offset: end
@@ -24202,17 +24534,17 @@ function getTextRange(text, pos, clickCount) {
24202
24534
  if (clickCount % 3 === 2) {
24203
24535
  return [
24204
24536
  textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length,
24205
- pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length,
24537
+ pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length
24206
24538
  ];
24207
24539
  }
24208
24540
  // triple click
24209
24541
  return [
24210
24542
  textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length,
24211
- pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length,
24543
+ pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length
24212
24544
  ];
24213
24545
  }
24214
24546
 
24215
- function modifySelectionPerMouseMove(selectionRange, { document , target , node , offset }) {
24547
+ function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
24216
24548
  const selectionFocus = resolveCaretPosition({
24217
24549
  target,
24218
24550
  node,
@@ -24246,10 +24578,23 @@ function modifySelectionPerMouseMove(selectionRange, { document , target , node
24246
24578
  }
24247
24579
 
24248
24580
  function isDifferentPointerPosition(positionA, positionB) {
24249
- var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
24250
- return positionA.target !== positionB.target || ((ref = positionA.coords) === null || ref === void 0 ? void 0 : ref.x) !== ((ref1 = positionB.coords) === null || ref1 === void 0 ? void 0 : ref1.y) || ((ref2 = positionA.coords) === null || ref2 === void 0 ? void 0 : ref2.y) !== ((ref3 = positionB.coords) === null || ref3 === void 0 ? void 0 : ref3.y) || ((ref4 = positionA.caret) === null || ref4 === void 0 ? void 0 : ref4.node) !== ((ref5 = positionB.caret) === null || ref5 === void 0 ? void 0 : ref5.node) || ((ref6 = positionA.caret) === null || ref6 === void 0 ? void 0 : ref6.offset) !== ((ref7 = positionB.caret) === null || ref7 === void 0 ? void 0 : ref7.offset);
24581
+ var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
24582
+ return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.y) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
24251
24583
  }
24252
24584
 
24585
+ function _define_property$3(obj, key, value) {
24586
+ if (key in obj) {
24587
+ Object.defineProperty(obj, key, {
24588
+ value: value,
24589
+ enumerable: true,
24590
+ configurable: true,
24591
+ writable: true
24592
+ });
24593
+ } else {
24594
+ obj[key] = value;
24595
+ }
24596
+ return obj;
24597
+ }
24253
24598
  /**
24254
24599
  * This object is the single "virtual" mouse that might be controlled by multiple different pointer devices.
24255
24600
  */ class Mouse {
@@ -24347,39 +24692,40 @@ function isDifferentPointerPosition(positionA, positionB) {
24347
24692
  return init;
24348
24693
  }
24349
24694
  getTarget(instance) {
24350
- var _target;
24351
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24695
+ var _this_position_target;
24696
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24352
24697
  }
24353
24698
  startSelecting(instance, clickCount) {
24354
- var ref, ref1;
24699
+ var _this_position_caret, _this_position_caret1;
24355
24700
  // TODO: support extending range (shift)
24356
24701
  this.selecting = setSelectionPerMouseDown({
24357
24702
  document: instance.config.document,
24358
24703
  target: this.getTarget(instance),
24359
- node: (ref = this.position.caret) === null || ref === void 0 ? void 0 : ref.node,
24360
- offset: (ref1 = this.position.caret) === null || ref1 === void 0 ? void 0 : ref1.offset,
24704
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24705
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
24361
24706
  clickCount
24362
24707
  });
24363
24708
  }
24364
24709
  modifySelecting(instance) {
24365
- var ref, ref1;
24710
+ var _this_position_caret, _this_position_caret1;
24366
24711
  if (!this.selecting) {
24367
24712
  return;
24368
24713
  }
24369
24714
  modifySelectionPerMouseMove(this.selecting, {
24370
24715
  document: instance.config.document,
24371
24716
  target: this.getTarget(instance),
24372
- node: (ref = this.position.caret) === null || ref === void 0 ? void 0 : ref.node,
24373
- offset: (ref1 = this.position.caret) === null || ref1 === void 0 ? void 0 : ref1.offset
24717
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24718
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
24374
24719
  });
24375
24720
  }
24376
24721
  endSelecting() {
24377
24722
  this.selecting = undefined;
24378
24723
  }
24379
24724
  constructor(){
24380
- this.position = {};
24381
- this.buttons = new Buttons();
24382
- this.buttonDownTarget = {};
24725
+ _define_property$3(this, "position", {});
24726
+ _define_property$3(this, "buttons", new Buttons());
24727
+ _define_property$3(this, "selecting", void 0);
24728
+ _define_property$3(this, "buttonDownTarget", {});
24383
24729
  // According to spec the `detail` on click events should be the number
24384
24730
  // of *consecutive* clicks with a specific button.
24385
24731
  // On `mousedown` and `mouseup` it should be this number increased by one.
@@ -24390,7 +24736,7 @@ function isDifferentPointerPosition(positionA, positionB) {
24390
24736
  // If there is a delay while a button is pressed,
24391
24737
  // the `mouseup` and `click` are normal, but a following `mousedown` starts a new click count.
24392
24738
  // We'll follow the minimal implementation of Webkit.
24393
- this.clickCount = new class {
24739
+ _define_property$3(this, "clickCount", new class {
24394
24740
  incOnClick(button) {
24395
24741
  const current = this.down[button] === undefined ? undefined : Number(this.down[button]) + 1;
24396
24742
  this.count = this.count[button] === undefined ? {} : {
@@ -24399,13 +24745,13 @@ function isDifferentPointerPosition(positionA, positionB) {
24399
24745
  return current;
24400
24746
  }
24401
24747
  getOnDown(button) {
24402
- var _button;
24748
+ var _this_count_button;
24403
24749
  this.down = {
24404
- [button]: (_button = this.count[button]) !== null && _button !== void 0 ? _button : 0
24750
+ [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0
24405
24751
  };
24406
- var _button1;
24752
+ var _this_count_button1;
24407
24753
  this.count = {
24408
- [button]: (_button1 = this.count[button]) !== null && _button1 !== void 0 ? _button1 : 0
24754
+ [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0
24409
24755
  };
24410
24756
  return Number(this.count[button]) + 1;
24411
24757
  }
@@ -24416,16 +24762,16 @@ function isDifferentPointerPosition(positionA, positionB) {
24416
24762
  this.count = {};
24417
24763
  }
24418
24764
  constructor(){
24419
- this.down = {};
24420
- this.count = {};
24765
+ _define_property$3(this, "down", {});
24766
+ _define_property$3(this, "count", {});
24421
24767
  }
24422
- }();
24768
+ }());
24423
24769
  }
24424
24770
  }
24425
24771
 
24426
24772
  function hasPointerEvents(instance, element) {
24427
- var ref;
24428
- return ((ref = checkPointerEvents(instance, element)) === null || ref === void 0 ? void 0 : ref.pointerEvents) !== 'none';
24773
+ var _checkPointerEvents;
24774
+ return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== 'none';
24429
24775
  }
24430
24776
  function closestPointerEventsDeclaration(element) {
24431
24777
  const window = getWindow(element);
@@ -24465,7 +24811,7 @@ function assertPointerEvents(instance, element) {
24465
24811
  throw new Error([
24466
24812
  `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? 'inherits' : 'has'} \`pointer-events: none\`:`,
24467
24813
  '',
24468
- printTree(declaration.tree),
24814
+ printTree(declaration.tree)
24469
24815
  ].join('\n'));
24470
24816
  }
24471
24817
  }
@@ -24477,17 +24823,17 @@ function printTree(tree) {
24477
24823
  el.hasAttribute('data-testid') && `(testId=${el.getAttribute('data-testid')})`,
24478
24824
  getLabelDescr(el),
24479
24825
  tree.length > 1 && i === 0 && ' <-- This element declared `pointer-events: none`',
24480
- tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here',
24826
+ tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here'
24481
24827
  ].filter(Boolean).join('')).join('\n');
24482
24828
  }
24483
24829
  function getLabelDescr(element) {
24484
- var ref;
24830
+ var _element_labels;
24485
24831
  let label;
24486
24832
  if (element.hasAttribute('aria-label')) {
24487
24833
  label = element.getAttribute('aria-label');
24488
24834
  } else if (element.hasAttribute('aria-labelledby')) {
24489
- var ref1, ref2;
24490
- label = (ref1 = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || ref1 === void 0 ? void 0 : (ref2 = ref1.textContent) === null || ref2 === void 0 ? void 0 : ref2.trim();
24835
+ var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
24836
+ label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || _element_ownerDocument_getElementById === void 0 ? void 0 : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
24491
24837
  } else if (isElementType(element, [
24492
24838
  'button',
24493
24839
  'input',
@@ -24495,15 +24841,15 @@ function getLabelDescr(element) {
24495
24841
  'output',
24496
24842
  'progress',
24497
24843
  'select',
24498
- 'textarea',
24499
- ]) && ((ref = element.labels) === null || ref === void 0 ? void 0 : ref.length)) {
24844
+ 'textarea'
24845
+ ]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) {
24500
24846
  label = Array.from(element.labels).map((el)=>{
24501
- var ref;
24502
- return (ref = el.textContent) === null || ref === void 0 ? void 0 : ref.trim();
24847
+ var _el_textContent;
24848
+ return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
24503
24849
  }).join('|');
24504
24850
  } else if (isElementType(element, 'button')) {
24505
- var ref3;
24506
- label = (ref3 = element.textContent) === null || ref3 === void 0 ? void 0 : ref3.trim();
24851
+ var _element_textContent;
24852
+ label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
24507
24853
  }
24508
24854
  label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, ' ');
24509
24855
  if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) {
@@ -24517,6 +24863,19 @@ function hasBitFlag(conf, flag) {
24517
24863
  return (conf & flag) > 0;
24518
24864
  }
24519
24865
 
24866
+ function _define_property$2(obj, key, value) {
24867
+ if (key in obj) {
24868
+ Object.defineProperty(obj, key, {
24869
+ value: value,
24870
+ enumerable: true,
24871
+ configurable: true,
24872
+ writable: true
24873
+ });
24874
+ } else {
24875
+ obj[key] = value;
24876
+ }
24877
+ return obj;
24878
+ }
24520
24879
  class Pointer {
24521
24880
  init(instance, position) {
24522
24881
  this.position = position;
@@ -24590,8 +24949,8 @@ class Pointer {
24590
24949
  this.isCancelled = true;
24591
24950
  }
24592
24951
  getTarget(instance) {
24593
- var _target;
24594
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24952
+ var _this_position_target;
24953
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24595
24954
  }
24596
24955
  getEventInit() {
24597
24956
  return {
@@ -24601,12 +24960,15 @@ class Pointer {
24601
24960
  isPrimary: this.isPrimary
24602
24961
  };
24603
24962
  }
24604
- constructor({ pointerId , pointerType , isPrimary }){
24605
- this.isMultitouch = false;
24606
- this.isCancelled = false;
24607
- this.isDown = false;
24608
- this.isPrevented = false;
24609
- this.position = {};
24963
+ constructor({ pointerId, pointerType, isPrimary }){
24964
+ _define_property$2(this, "pointerId", void 0);
24965
+ _define_property$2(this, "pointerType", void 0);
24966
+ _define_property$2(this, "isPrimary", void 0);
24967
+ _define_property$2(this, "isMultitouch", false);
24968
+ _define_property$2(this, "isCancelled", false);
24969
+ _define_property$2(this, "isDown", false);
24970
+ _define_property$2(this, "isPrevented", false);
24971
+ _define_property$2(this, "position", {});
24610
24972
  this.pointerId = pointerId;
24611
24973
  this.pointerType = pointerType;
24612
24974
  this.isPrimary = isPrimary;
@@ -24614,7 +24976,19 @@ class Pointer {
24614
24976
  }
24615
24977
  }
24616
24978
 
24617
- var _registry, _k;
24979
+ function _define_property$1(obj, key, value) {
24980
+ if (key in obj) {
24981
+ Object.defineProperty(obj, key, {
24982
+ value: value,
24983
+ enumerable: true,
24984
+ configurable: true,
24985
+ writable: true
24986
+ });
24987
+ } else {
24988
+ obj[key] = value;
24989
+ }
24990
+ return obj;
24991
+ }
24618
24992
  class PointerHost {
24619
24993
  isKeyPressed(keyDef) {
24620
24994
  return this.devices.get(keyDef.pointerType).isPressed(keyDef);
@@ -24674,10 +25048,10 @@ class PointerHost {
24674
25048
  this.mouse.down(instance, keyDef, pointer);
24675
25049
  }
24676
25050
  if (!pointer.isMultitouch) {
24677
- const mousemove1 = this.mouse.move(instance, pointer.position);
24678
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.leave();
24679
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.enter();
24680
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.move();
25051
+ const mousemove = this.mouse.move(instance, pointer.position);
25052
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.leave();
25053
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.enter();
25054
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.move();
24681
25055
  this.mouse.up(instance, keyDef, pointer);
24682
25056
  }
24683
25057
  }
@@ -24692,25 +25066,30 @@ class PointerHost {
24692
25066
  this.mouse.resetClickCount();
24693
25067
  }
24694
25068
  getMouseTarget(instance) {
24695
- var _target;
24696
- return (_target = this.mouse.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25069
+ var _this_mouse_position_target;
25070
+ return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
24697
25071
  }
24698
25072
  setMousePosition(position) {
24699
25073
  this.mouse.position = position;
24700
25074
  this.pointers.get('mouse').position = position;
24701
25075
  }
24702
25076
  constructor(system){
24703
- this.devices = new class {
25077
+ _define_property$1(this, "system", void 0);
25078
+ _define_property$1(this, "mouse", void 0);
25079
+ _define_property$1(this, "buttons", void 0);
25080
+ _define_property$1(this, "devices", new class {
24704
25081
  get(k) {
24705
- var ref;
24706
- (ref = (_registry = this.registry)[_k = k]) !== null && ref !== void 0 ? ref : _registry[_k] = new Device();
25082
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
25083
+ _this_registry, _k;
25084
+ var _;
25085
+ (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
24707
25086
  return this.registry[k];
24708
25087
  }
24709
25088
  constructor(){
24710
- this.registry = {};
25089
+ _define_property$1(this, "registry", {});
24711
25090
  }
24712
- }();
24713
- this.pointers = new class {
25091
+ }());
25092
+ _define_property$1(this, "pointers", new class {
24714
25093
  new(pointerName, keyDef) {
24715
25094
  const isPrimary = keyDef.pointerType !== 'touch' || !Object.values(this.registry).some((p)=>p.pointerType === 'touch' && !p.isCancelled);
24716
25095
  if (!isPrimary) {
@@ -24737,22 +25116,35 @@ class PointerHost {
24737
25116
  return pointerName in this.registry;
24738
25117
  }
24739
25118
  constructor(){
24740
- this.registry = {
25119
+ _define_property$1(this, "registry", {
24741
25120
  mouse: new Pointer({
24742
25121
  pointerId: 1,
24743
25122
  pointerType: 'mouse',
24744
25123
  isPrimary: true
24745
25124
  })
24746
- };
24747
- this.nextId = 2;
25125
+ });
25126
+ _define_property$1(this, "nextId", 2);
24748
25127
  }
24749
- }();
25128
+ }());
24750
25129
  this.system = system;
24751
25130
  this.buttons = new Buttons();
24752
25131
  this.mouse = new Mouse();
24753
25132
  }
24754
25133
  }
24755
25134
 
25135
+ function _define_property(obj, key, value) {
25136
+ if (key in obj) {
25137
+ Object.defineProperty(obj, key, {
25138
+ value: value,
25139
+ enumerable: true,
25140
+ configurable: true,
25141
+ writable: true
25142
+ });
25143
+ } else {
25144
+ obj[key] = value;
25145
+ }
25146
+ return obj;
25147
+ }
24756
25148
  /**
24757
25149
  * @internal Do not create/alter this by yourself as this type might be subject to changes.
24758
25150
  */ class System {
@@ -24773,8 +25165,8 @@ class PointerHost {
24773
25165
  };
24774
25166
  }
24775
25167
  constructor(){
24776
- this.keyboard = new KeyboardHost(this);
24777
- this.pointer = new PointerHost(this);
25168
+ _define_property(this, "keyboard", new KeyboardHost(this));
25169
+ _define_property(this, "pointer", new PointerHost(this));
24778
25170
  }
24779
25171
  }
24780
25172
 
@@ -24820,7 +25212,7 @@ async function unhover$1(element) {
24820
25212
  });
24821
25213
  }
24822
25214
 
24823
- async function tab$1({ shift } = {}) {
25215
+ async function tab$1({ shift } = {}) {
24824
25216
  return this.keyboard(shift === true ? '{Shift>}{Tab}{/Shift}' : shift === false ? '[/ShiftLeft][/ShiftRight]{Tab}' : '{Tab}');
24825
25217
  }
24826
25218
 
@@ -24836,18 +25228,18 @@ async function tab$1({ shift } = {}) {
24836
25228
  */ function parseKeyDef$1(keyboardMap, text) {
24837
25229
  const defs = [];
24838
25230
  do {
24839
- const { type , descriptor , consumedLength , releasePrevious , releaseSelf =true , repeat , } = readNextDescriptor(text, 'keyboard');
24840
- var ref;
24841
- const keyDef = (ref = keyboardMap.find((def)=>{
25231
+ const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, 'keyboard');
25232
+ var _keyboardMap_find;
25233
+ const keyDef = (_keyboardMap_find = keyboardMap.find((def)=>{
24842
25234
  if (type === '[') {
24843
- var ref;
24844
- return ((ref = def.code) === null || ref === void 0 ? void 0 : ref.toLowerCase()) === descriptor.toLowerCase();
25235
+ var _def_code;
25236
+ return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
24845
25237
  } else if (type === '{') {
24846
- var ref1;
24847
- return ((ref1 = def.key) === null || ref1 === void 0 ? void 0 : ref1.toLowerCase()) === descriptor.toLowerCase();
25238
+ var _def_key;
25239
+ return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
24848
25240
  }
24849
25241
  return def.key === descriptor;
24850
- })) !== null && ref !== void 0 ? ref : {
25242
+ })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
24851
25243
  key: 'Unknown',
24852
25244
  code: 'Unknown',
24853
25245
  [type === '[' ? 'code' : 'key']: descriptor
@@ -24870,8 +25262,8 @@ async function keyboard$1(text) {
24870
25262
  await keyboardAction(this, actions[i]);
24871
25263
  }
24872
25264
  }
24873
- async function keyboardAction(instance, { keyDef , releasePrevious , releaseSelf , repeat }) {
24874
- const { system } = instance;
25265
+ async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
25266
+ const { system } = instance;
24875
25267
  // Release the key automatically if it was pressed before.
24876
25268
  if (system.keyboard.isKeyPressed(keyDef)) {
24877
25269
  await system.keyboard.keyup(instance, keyDef);
@@ -24917,8 +25309,8 @@ function readSelectedValueFromInput(target) {
24917
25309
 
24918
25310
  async function copy$1() {
24919
25311
  const doc = this.config.document;
24920
- var _activeElement;
24921
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25312
+ var _doc_activeElement;
25313
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24922
25314
  const clipboardData = copySelection(target);
24923
25315
  if (clipboardData.items.length === 0) {
24924
25316
  return;
@@ -24933,8 +25325,8 @@ async function copy$1() {
24933
25325
 
24934
25326
  async function cut$1() {
24935
25327
  const doc = this.config.document;
24936
- var _activeElement;
24937
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25328
+ var _doc_activeElement;
25329
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24938
25330
  const clipboardData = copySelection(target);
24939
25331
  if (clipboardData.items.length === 0) {
24940
25332
  return;
@@ -24949,10 +25341,10 @@ async function cut$1() {
24949
25341
 
24950
25342
  async function paste$1(clipboardData) {
24951
25343
  const doc = this.config.document;
24952
- var _activeElement;
24953
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
24954
- var ref;
24955
- const dataTransfer = (ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && ref !== void 0 ? ref : await readDataTransferFromClipboard(doc).catch(()=>{
25344
+ var _doc_activeElement;
25345
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
25346
+ var _ref;
25347
+ const dataTransfer = (_ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(()=>{
24956
25348
  throw new Error('`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.');
24957
25349
  });
24958
25350
  this.dispatchUIEvent(target, 'paste', {
@@ -24968,7 +25360,7 @@ function getClipboardDataFromString(doc, text) {
24968
25360
  function parseKeyDef(pointerMap, keys) {
24969
25361
  const defs = [];
24970
25362
  do {
24971
- const { descriptor , consumedLength , releasePrevious , releaseSelf =true , } = readNextDescriptor(keys, 'pointer');
25363
+ const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, 'pointer');
24972
25364
  const keyDef = pointerMap.find((p)=>p.name === descriptor);
24973
25365
  if (keyDef) {
24974
25366
  defs.push({
@@ -24983,7 +25375,7 @@ function parseKeyDef(pointerMap, keys) {
24983
25375
  }
24984
25376
 
24985
25377
  async function pointer$1(input) {
24986
- const { pointerMap } = this.config;
25378
+ const { pointerMap } = this.config;
24987
25379
  const actions = [];
24988
25380
  (Array.isArray(input) ? input : [
24989
25381
  input
@@ -25006,16 +25398,16 @@ async function pointer$1(input) {
25006
25398
  this.system.pointer.resetClickCount();
25007
25399
  }
25008
25400
  async function pointerAction(instance, action) {
25009
- var ref, ref1;
25401
+ var _previousPosition_caret, _previousPosition_caret1;
25010
25402
  const pointerName = 'pointerName' in action && action.pointerName ? action.pointerName : 'keyDef' in action ? instance.system.pointer.getPointerName(action.keyDef) : 'mouse';
25011
25403
  const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
25012
- var _target, _coords, _node, _offset;
25404
+ var _action_target, _action_coords, _action_node, _action_offset;
25013
25405
  const position = {
25014
- target: (_target = action.target) !== null && _target !== void 0 ? _target : getPrevTarget(instance, previousPosition),
25015
- coords: (_coords = action.coords) !== null && _coords !== void 0 ? _coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
25406
+ target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
25407
+ coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
25016
25408
  caret: {
25017
- node: (_node = action.node) !== null && _node !== void 0 ? _node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (ref = previousPosition.caret) === null || ref === void 0 ? void 0 : ref.node,
25018
- offset: (_offset = action.offset) !== null && _offset !== void 0 ? _offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (ref1 = previousPosition.caret) === null || ref1 === void 0 ? void 0 : ref1.offset
25409
+ node: (_action_node = action.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
25410
+ offset: (_action_offset = action.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
25019
25411
  }
25020
25412
  };
25021
25413
  if ('keyDef' in action) {
@@ -25037,15 +25429,15 @@ async function pointerAction(instance, action) {
25037
25429
  }
25038
25430
  }
25039
25431
  function hasCaretPosition(action) {
25040
- var _target, ref;
25041
- return !!((ref = (_target = action.target) !== null && _target !== void 0 ? _target : action.node) !== null && ref !== void 0 ? ref : action.offset !== undefined);
25432
+ var _action_target, _ref;
25433
+ return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== undefined);
25042
25434
  }
25043
25435
  function getPrevTarget(instance, position) {
25044
25436
  if (!position) {
25045
25437
  throw new Error('This pointer has no previous position. Provide a target property!');
25046
25438
  }
25047
- var _target;
25048
- return (_target = position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25439
+ var _position_target;
25440
+ return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
25049
25441
  }
25050
25442
 
25051
25443
  async function clear$1(element) {
@@ -25063,6 +25455,7 @@ async function clear$1(element) {
25063
25455
  input(this, element, '', 'deleteContentBackward');
25064
25456
  }
25065
25457
 
25458
+ const { getConfig: getConfig$1 } = named$1;
25066
25459
  async function selectOptions$1(select, values) {
25067
25460
  return selectOptionsBase.call(this, true, select, values);
25068
25461
  }
@@ -25071,7 +25464,7 @@ async function deselectOptions$1(select, values) {
25071
25464
  }
25072
25465
  async function selectOptionsBase(newValue, select, values) {
25073
25466
  if (!newValue && !select.multiple) {
25074
- throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25467
+ throw getConfig$1().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25075
25468
  }
25076
25469
  const valArray = Array.isArray(values) ? values : [
25077
25470
  values
@@ -25085,7 +25478,7 @@ async function selectOptionsBase(newValue, select, values) {
25085
25478
  if (matchingOption) {
25086
25479
  return matchingOption;
25087
25480
  } else {
25088
- throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
25481
+ throw getConfig$1().getElementError(`Value "${String(val)}" not found in options`, select);
25089
25482
  }
25090
25483
  }
25091
25484
  }).filter((option)=>!isDisabled(option));
@@ -25126,15 +25519,15 @@ async function selectOptionsBase(newValue, select, values) {
25126
25519
  await wait(this.config);
25127
25520
  }
25128
25521
  } else if (selectedOptions.length === 1) {
25129
- const withPointerEvents1 = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25522
+ const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25130
25523
  // the click to open the select options
25131
- if (withPointerEvents1) {
25524
+ if (withPointerEvents) {
25132
25525
  await this.click(select);
25133
25526
  } else {
25134
25527
  focusElement(select);
25135
25528
  }
25136
25529
  selectOption(selectedOptions[0]);
25137
- if (withPointerEvents1) {
25530
+ if (withPointerEvents) {
25138
25531
  // the browser triggers another click event on the select for the click on the option
25139
25532
  // this second click has no 'down' phase
25140
25533
  this.dispatchUIEvent(select, 'pointerover');
@@ -25147,19 +25540,19 @@ async function selectOptionsBase(newValue, select, values) {
25147
25540
  }
25148
25541
  await wait(this.config);
25149
25542
  } else {
25150
- throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25543
+ throw getConfig$1().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25151
25544
  }
25152
25545
  } else if (select.getAttribute('role') === 'listbox') {
25153
- for (const option1 of selectedOptions){
25154
- await this.click(option1);
25155
- await this.unhover(option1);
25546
+ for (const option of selectedOptions){
25547
+ await this.click(option);
25548
+ await this.unhover(option);
25156
25549
  }
25157
25550
  } else {
25158
- throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25551
+ throw getConfig$1().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25159
25552
  }
25160
25553
  }
25161
25554
 
25162
- async function type$1(element, text, { skipClick =this.config.skipClick , skipAutoClose =this.config.skipAutoClose , initialSelectionStart , initialSelectionEnd } = {}) {
25555
+ async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
25163
25556
  // TODO: properly type guard
25164
25557
  // we use this workaround for now to prevent changing behavior
25165
25558
  if (element.disabled) return;
@@ -25188,8 +25581,8 @@ function restoreProperty(obj, prop, descriptor) {
25188
25581
  }
25189
25582
  }
25190
25583
  function setFiles(el, files) {
25191
- var ref;
25192
- (ref = el[fakeFiles]) === null || ref === void 0 ? void 0 : ref.restore();
25584
+ var _el_fakeFiles;
25585
+ (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 ? void 0 : _el_fakeFiles.restore();
25193
25586
  const typeDescr = Object.getOwnPropertyDescriptor(el, 'type');
25194
25587
  const valueDescr = Object.getOwnPropertyDescriptor(el, 'value');
25195
25588
  const filesDescr = Object.getOwnPropertyDescriptor(el, 'files');
@@ -25213,8 +25606,8 @@ function setFiles(el, files) {
25213
25606
  if (v === '') {
25214
25607
  restore();
25215
25608
  } else {
25216
- var ref;
25217
- valueDescr === null || valueDescr === void 0 ? void 0 : (ref = valueDescr.set) === null || ref === void 0 ? void 0 : ref.call(el, v);
25609
+ var _valueDescr_set;
25610
+ valueDescr === null || valueDescr === void 0 ? void 0 : (_valueDescr_set = valueDescr.set) === null || _valueDescr_set === void 0 ? void 0 : _valueDescr_set.call(el, v);
25218
25611
  }
25219
25612
  }
25220
25613
  },
@@ -25243,11 +25636,11 @@ async function upload$1(element, fileOrFiles) {
25243
25636
  fileOrFiles
25244
25637
  ]).filter((file)=>!this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? undefined : 1);
25245
25638
  const fileDialog = ()=>{
25246
- var ref;
25639
+ var _input_files;
25247
25640
  // do not fire an input event if the file selection does not change
25248
- if (files.length === ((ref = input.files) === null || ref === void 0 ? void 0 : ref.length) && files.every((f, i)=>{
25249
- var ref;
25250
- return f === ((ref = input.files) === null || ref === void 0 ? void 0 : ref.item(i));
25641
+ if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i)=>{
25642
+ var _input_files;
25643
+ return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
25251
25644
  })) {
25252
25645
  return;
25253
25646
  }
@@ -25279,26 +25672,26 @@ function isAcceptableFile(file, accept) {
25279
25672
  });
25280
25673
  }
25281
25674
 
25282
- var api = /*#__PURE__*/Object.freeze({
25283
- __proto__: null,
25284
- clear: clear$1,
25285
- click: click$1,
25286
- copy: copy$1,
25287
- cut: cut$1,
25288
- dblClick: dblClick$1,
25289
- deselectOptions: deselectOptions$1,
25290
- hover: hover$1,
25291
- keyboard: keyboard$1,
25292
- paste: paste$1,
25293
- pointer: pointer$1,
25294
- selectOptions: selectOptions$1,
25295
- tab: tab$1,
25296
- tripleClick: tripleClick$1,
25297
- type: type$1,
25298
- unhover: unhover$1,
25299
- upload: upload$1
25300
- });
25301
-
25675
+ const userEventApi = {
25676
+ click: click$1,
25677
+ dblClick: dblClick$1,
25678
+ tripleClick: tripleClick$1,
25679
+ hover: hover$1,
25680
+ unhover: unhover$1,
25681
+ tab: tab$1,
25682
+ keyboard: keyboard$1,
25683
+ copy: copy$1,
25684
+ cut: cut$1,
25685
+ paste: paste$1,
25686
+ pointer: pointer$1,
25687
+ clear: clear$1,
25688
+ deselectOptions: deselectOptions$1,
25689
+ selectOptions: selectOptions$1,
25690
+ type: type$1,
25691
+ upload: upload$1
25692
+ };
25693
+
25694
+ const { getConfig } = named$1;
25302
25695
  /**
25303
25696
  * Wrap an internal Promise
25304
25697
  */ function wrapAsync(implementation) {
@@ -25341,18 +25734,18 @@ function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
25341
25734
  */ function setupMain(options = {}) {
25342
25735
  const config = createConfig(options);
25343
25736
  prepareDocument(config.document);
25344
- var _defaultView;
25345
- const view = (_defaultView = config.document.defaultView) !== null && _defaultView !== void 0 ? _defaultView : /* istanbul ignore next */ globalThis.window;
25737
+ var _config_document_defaultView;
25738
+ const view = (_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window;
25346
25739
  attachClipboardStubToView(view);
25347
25740
  return createInstance(config).api;
25348
25741
  }
25349
25742
  /**
25350
25743
  * Setup in direct call per `userEvent.anyApi()`
25351
- */ function setupDirect({ keyboardState , pointerState , ...options } = {}, node) {
25744
+ */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
25352
25745
  const config = createConfig(options, defaultOptionsDirect, node);
25353
25746
  prepareDocument(config.document);
25354
- var ref;
25355
- const system = (ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && ref !== void 0 ? ref : new System();
25747
+ var _ref;
25748
+ const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
25356
25749
  return {
25357
25750
  api: createInstance(config, system).api,
25358
25751
  system
@@ -25387,22 +25780,22 @@ function createInstance(config, system = new System()) {
25387
25780
  dispatchUIEvent: dispatchUIEvent.bind(instance),
25388
25781
  system,
25389
25782
  levelRefs: {},
25390
- ...api
25783
+ ...userEventApi
25391
25784
  });
25392
25785
  return {
25393
25786
  instance,
25394
25787
  api: {
25395
- ...Object.fromEntries(Object.entries(api).map(([name, api])=>[
25788
+ ...Object.fromEntries(Object.entries(userEventApi).map(([name, api])=>[
25396
25789
  name,
25397
- wrapAndBindImpl(instance, api),
25790
+ wrapAndBindImpl(instance, api)
25398
25791
  ])),
25399
25792
  setup: setupSub.bind(instance)
25400
25793
  }
25401
25794
  };
25402
25795
  }
25403
25796
  function getDocument(options, node, defaults) {
25404
- var _document, ref;
25405
- return (ref = (_document = options.document) !== null && _document !== void 0 ? _document : node && getDocumentFromNode(node)) !== null && ref !== void 0 ? ref : defaults.document;
25797
+ var _options_document, _ref;
25798
+ return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
25406
25799
  }
25407
25800
 
25408
25801
  function clear(element) {
@@ -25427,11 +25820,11 @@ function hover(element, options = {}) {
25427
25820
  return setupDirect(options).api.hover(element);
25428
25821
  }
25429
25822
  async function keyboard(text, options = {}) {
25430
- const { api , system } = setupDirect(options);
25823
+ const { api, system } = setupDirect(options);
25431
25824
  return api.keyboard(text).then(()=>system);
25432
25825
  }
25433
25826
  async function pointer(input, options = {}) {
25434
- const { api , system } = setupDirect(options);
25827
+ const { api, system } = setupDirect(options);
25435
25828
  return api.pointer(input).then(()=>system);
25436
25829
  }
25437
25830
  function paste(clipboardData, options) {
@@ -25447,7 +25840,7 @@ function type(element, text, options = {}) {
25447
25840
  return setupDirect(options, element).api.type(element, text, options);
25448
25841
  }
25449
25842
  function unhover(element, options = {}) {
25450
- const { api , system } = setupDirect(options);
25843
+ const { api, system } = setupDirect(options);
25451
25844
  system.pointer.setMousePosition({
25452
25845
  target: element
25453
25846
  });