@uva-glass/component-library 3.50.15 → 3.52.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 (110) hide show
  1. package/dist/RteEditor.module-CUi7Vqe8.js +37 -0
  2. package/dist/RteEditor.module-CUi7Vqe8.js.map +1 -0
  3. package/dist/{SelectListbox.module-CgZyIxwT.js → SelectListbox.module-CXqMuXRB.js} +24 -23
  4. package/dist/SelectListbox.module-CXqMuXRB.js.map +1 -0
  5. package/dist/{TablePlugin-CeZO4BR1.js → TablePlugin-BLbsvcuu.js} +2 -2
  6. package/dist/{TablePlugin-CeZO4BR1.js.map → TablePlugin-BLbsvcuu.js.map} +1 -1
  7. package/dist/assets/CheckboxButtonBar.css +1 -1
  8. package/dist/assets/FormInput.css +1 -1
  9. package/dist/assets/InputField.css +1 -1
  10. package/dist/assets/MetaDataBar.css +1 -0
  11. package/dist/assets/RteEditor.css +1 -1
  12. package/dist/assets/SelectListbox.css +1 -1
  13. package/dist/components/Accordion/Accordion.test.js +3 -3
  14. package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
  15. package/dist/components/ActionList/ActionList.test.js +3 -3
  16. package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
  17. package/dist/components/Attention/Attention.test.js +2 -2
  18. package/dist/components/Backdrop/Backdrop.test.js +2 -2
  19. package/dist/components/Buttons/Button.test.js +2 -2
  20. package/dist/components/Buttons/LinkButton.test.js +2 -2
  21. package/dist/components/Buttons/MenuButton.test.js +2 -2
  22. package/dist/components/Card/Card.test.js +2 -2
  23. package/dist/components/Checkbox/Checkbox.test.js +3 -3
  24. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.d.ts +3 -3
  25. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js +45 -45
  26. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  27. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
  28. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  29. package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
  30. package/dist/components/FormInput/FormInput.d.ts +3 -1
  31. package/dist/components/FormInput/FormInput.js +35 -31
  32. package/dist/components/FormInput/FormInput.js.map +1 -1
  33. package/dist/components/Icon/icons/index.d.ts +6 -0
  34. package/dist/components/Icon/icons/index.js +16 -11
  35. package/dist/components/Icon/icons/index.js.map +1 -1
  36. package/dist/components/InputField/InputField.d.ts +2 -0
  37. package/dist/components/InputField/InputField.js +29 -26
  38. package/dist/components/InputField/InputField.js.map +1 -1
  39. package/dist/components/InputField/InputField.stories.js +1 -1
  40. package/dist/components/Label/Label.test.js +2 -2
  41. package/dist/components/MetaDataBar/MetaDataBar.d.ts +11 -0
  42. package/dist/components/MetaDataBar/MetaDataBar.js +13 -0
  43. package/dist/components/MetaDataBar/MetaDataBar.js.map +1 -0
  44. package/dist/components/MetaDataBar/MetaDataBar.stories.d.ts +5 -0
  45. package/dist/components/MetaDataBar/MetaDataBar.stories.js +21 -0
  46. package/dist/components/MetaDataBar/MetaDataBar.stories.js.map +1 -0
  47. package/dist/components/MetaDataBar/MetaDataBar.test.d.ts +1 -0
  48. package/dist/components/MetaDataBar/MetaDataBar.test.js +18 -0
  49. package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -0
  50. package/dist/components/MetaDataBar/index.d.ts +1 -0
  51. package/dist/components/MetaDataBar/index.js +5 -0
  52. package/dist/components/MetaDataBar/index.js.map +1 -0
  53. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  54. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  55. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  56. package/dist/components/MultiSelect/index.js +1 -1
  57. package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
  58. package/dist/components/Notification/Notification.test.js +2 -2
  59. package/dist/components/PeriodSelector/PeriodSelector.js +13 -13
  60. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  61. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  62. package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
  63. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  64. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  65. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  66. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  67. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  68. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +2 -2
  69. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +1 -1
  70. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  71. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +2 -2
  72. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  73. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +2 -2
  74. package/dist/components/RteEditor/Plugins/index.js +1 -1
  75. package/dist/components/RteEditor/RteEditor.d.ts +8 -6
  76. package/dist/components/RteEditor/RteEditor.js +367 -356
  77. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  78. package/dist/components/RteEditor/UvaTheme/UvaTheme.js +1 -1
  79. package/dist/components/SelectListbox/SelectListbox.d.ts +4 -2
  80. package/dist/components/SelectListbox/SelectListbox.js +20 -18
  81. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  82. package/dist/components/SelectListbox/components/SelectButton.d.ts +1 -0
  83. package/dist/components/SelectListbox/components/SelectButton.js +34 -25
  84. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  85. package/dist/components/SelectListbox/components/SelectContainer.js +1 -1
  86. package/dist/components/SelectListbox/components/SelectOption.js +1 -1
  87. package/dist/components/SelectListbox/components/SelectOptionBox.js +1 -1
  88. package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
  89. package/dist/components/TextArea/TextArea.test.js +2 -2
  90. package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
  91. package/dist/components/index.d.ts +1 -0
  92. package/dist/components/index.js +70 -68
  93. package/dist/components/index.js.map +1 -1
  94. package/dist/{index-Bf2LCbD1.js → index-C_1Z-Fok.js} +2 -2
  95. package/dist/{index-Bf2LCbD1.js.map → index-C_1Z-Fok.js.map} +1 -1
  96. package/dist/index-D6WVIfcJ.js +6039 -0
  97. package/dist/index-D6WVIfcJ.js.map +1 -0
  98. package/dist/index-DYPpFe2R.js +2364 -0
  99. package/dist/index-DYPpFe2R.js.map +1 -0
  100. package/dist/index.js +70 -68
  101. package/dist/index.js.map +1 -1
  102. package/dist/{react.esm-Bg7Fh9lz.js → react.esm-DdELhthz.js} +2 -2
  103. package/dist/{react.esm-Bg7Fh9lz.js.map → react.esm-DdELhthz.js.map} +1 -1
  104. package/dist/setupTests.js +1 -1
  105. package/package.json +5 -5
  106. package/dist/RteEditor.module-CmYZ4MmA.js +0 -36
  107. package/dist/RteEditor.module-CmYZ4MmA.js.map +0 -1
  108. package/dist/SelectListbox.module-CgZyIxwT.js.map +0 -1
  109. package/dist/index-JOHbZ4si.js +0 -8400
  110. package/dist/index-JOHbZ4si.js.map +0 -1
@@ -0,0 +1,2364 @@
1
+ import { g as de, c as be } from "./_commonjsHelpers-DaMA6jEr.js";
2
+ import { l as pe } from "./index-D6WVIfcJ.js";
3
+ var Q, ve;
4
+ function Ot() {
5
+ return ve || (ve = 1, Q = (e) => {
6
+ const t = e.match(/^[ \t]*(?=\S)/gm);
7
+ return t ? t.reduce((n, r) => Math.min(n, r.length), 1 / 0) : 0;
8
+ }), Q;
9
+ }
10
+ var J, ye;
11
+ function It() {
12
+ if (ye) return J;
13
+ ye = 1;
14
+ const e = Ot();
15
+ return J = (t) => {
16
+ const n = e(t);
17
+ if (n === 0)
18
+ return t;
19
+ const r = new RegExp(`^[ \\t]{${n}}`, "gm");
20
+ return t.replace(r, "");
21
+ }, J;
22
+ }
23
+ var Z, Ee;
24
+ function Ht() {
25
+ return Ee || (Ee = 1, Z = (e, t = 1, n) => {
26
+ if (n = {
27
+ indent: " ",
28
+ includeEmptyLines: !1,
29
+ ...n
30
+ }, typeof e != "string")
31
+ throw new TypeError(
32
+ `Expected \`input\` to be a \`string\`, got \`${typeof e}\``
33
+ );
34
+ if (typeof t != "number")
35
+ throw new TypeError(
36
+ `Expected \`count\` to be a \`number\`, got \`${typeof t}\``
37
+ );
38
+ if (typeof n.indent != "string")
39
+ throw new TypeError(
40
+ `Expected \`options.indent\` to be a \`string\`, got \`${typeof n.indent}\``
41
+ );
42
+ if (t === 0)
43
+ return e;
44
+ const r = n.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
45
+ return e.replace(r, n.indent.repeat(t));
46
+ }), Z;
47
+ }
48
+ var ee, we;
49
+ function Tt() {
50
+ if (we) return ee;
51
+ we = 1;
52
+ const e = It(), t = Ht();
53
+ return ee = (n, r = 0, i) => t(e(n), r, i), ee;
54
+ }
55
+ var Dt = Tt();
56
+ const xe = /* @__PURE__ */ de(Dt);
57
+ class Bt extends Error {
58
+ reason;
59
+ filename;
60
+ line;
61
+ column;
62
+ source;
63
+ constructor(t, n, r, i, s) {
64
+ super(`${t}:${r}:${i}: ${n}`), this.reason = n, this.filename = t, this.line = r, this.column = i, this.source = s;
65
+ }
66
+ }
67
+ class Pt {
68
+ start;
69
+ end;
70
+ source;
71
+ constructor(t, n, r) {
72
+ this.start = t, this.end = n, this.source = r;
73
+ }
74
+ }
75
+ var N;
76
+ (function(e) {
77
+ e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.container = "container", e.charset = "charset", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.startingStyle = "starting-style", e.supports = "supports";
78
+ })(N || (N = {}));
79
+ const Ne = (e, t, n) => {
80
+ let r = n, i = 1e4;
81
+ do {
82
+ const s = t.map((c) => e.indexOf(c, r));
83
+ s.push(e.indexOf("\\", r));
84
+ const o = s.filter((c) => c !== -1);
85
+ if (o.length === 0) return -1;
86
+ const f = Math.min(...o);
87
+ if (e[f] !== "\\") return f;
88
+ r = f + 2, i--;
89
+ } while (i > 0);
90
+ throw new Error("Too many escaping");
91
+ }, ne = (e, t, n) => {
92
+ let r = n, i = 1e4;
93
+ do {
94
+ const s = t.map((c) => e.indexOf(c, r));
95
+ s.push(e.indexOf("(", r)), s.push(e.indexOf('"', r)), s.push(e.indexOf("'", r)), s.push(e.indexOf("\\", r));
96
+ const o = s.filter((c) => c !== -1);
97
+ if (o.length === 0) return -1;
98
+ const f = Math.min(...o);
99
+ switch (e[f]) {
100
+ case "\\":
101
+ r = f + 2;
102
+ break;
103
+ case "(":
104
+ {
105
+ const c = ne(e, [")"], f + 1);
106
+ if (c === -1) return -1;
107
+ r = c + 1;
108
+ }
109
+ break;
110
+ case '"':
111
+ {
112
+ const c = Ne(e, ['"'], f + 1);
113
+ if (c === -1) return -1;
114
+ r = c + 1;
115
+ }
116
+ break;
117
+ case "'":
118
+ {
119
+ const c = Ne(e, ["'"], f + 1);
120
+ if (c === -1) return -1;
121
+ r = c + 1;
122
+ }
123
+ break;
124
+ default:
125
+ return f;
126
+ }
127
+ i--;
128
+ } while (i > 0);
129
+ throw new Error("Too many escaping");
130
+ }, te = /\/\*[^]*?(?:\*\/|$)/g;
131
+ function R(e) {
132
+ return e ? e.trim() : "";
133
+ }
134
+ function re(e, t) {
135
+ const n = e && typeof e.type == "string", r = n ? e : t;
136
+ for (const i in e) {
137
+ const s = e[i];
138
+ Array.isArray(s) ? s.forEach((o) => {
139
+ re(o, r);
140
+ }) : s && typeof s == "object" && re(s, r);
141
+ }
142
+ return n && Object.defineProperty(e, "parent", { configurable: !0, writable: !0, enumerable: !1, value: t || null }), e;
143
+ }
144
+ const kt = (e, t) => {
145
+ t = t || {};
146
+ let n = 1, r = 1;
147
+ function i() {
148
+ const l = { line: n, column: r };
149
+ return (u) => (u.position = new Pt(l, { line: n, column: r }, t?.source || ""), L(), u);
150
+ }
151
+ const s = [];
152
+ function o(l) {
153
+ const u = new Bt(t?.source || "", l, n, r, e);
154
+ if (!t?.silent) throw u;
155
+ s.push(u);
156
+ }
157
+ function f() {
158
+ const l = /^{\s*/.exec(e);
159
+ return !!l && (h(l), !0);
160
+ }
161
+ function c() {
162
+ const l = /^}/.exec(e);
163
+ return !!l && (h(l), !0);
164
+ }
165
+ function b() {
166
+ let l;
167
+ const u = [];
168
+ for (L(), y(u); e.length && e.charAt(0) !== "}" && (l = I() || D(), l); ) u.push(l), y(u);
169
+ return u;
170
+ }
171
+ function h(l) {
172
+ const u = l[0];
173
+ return (function(d) {
174
+ const p = d.match(/\n/g);
175
+ p && (n += p.length);
176
+ const g = d.lastIndexOf(`
177
+ `);
178
+ r = ~g ? d.length - g : r + d.length;
179
+ })(u), e = e.slice(u.length), l;
180
+ }
181
+ function L() {
182
+ const l = /^\s*/.exec(e);
183
+ l && h(l);
184
+ }
185
+ function y(l) {
186
+ l = l || [];
187
+ let u = H();
188
+ for (; u; ) l.push(u), u = H();
189
+ return l;
190
+ }
191
+ function H() {
192
+ const l = i();
193
+ if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
194
+ const u = /^\/\*[^]*?\*\//.exec(e);
195
+ return u ? (h(u), l({ type: N.comment, comment: u[0].slice(2, -2) })) : o("End of comment missing");
196
+ }
197
+ function F() {
198
+ const l = /^([^{]+)/.exec(e);
199
+ if (l)
200
+ return h(l), ((u, d) => {
201
+ const p = [];
202
+ let g = 0;
203
+ for (; g < u.length; ) {
204
+ const x = ne(u, d, g);
205
+ if (x === -1) return p.push(u.substring(g)), p;
206
+ p.push(u.substring(g, x)), g = x + 1;
207
+ }
208
+ return p;
209
+ })(R(l[0]).replace(te, ""), [","]).map((u) => R(u));
210
+ }
211
+ function k() {
212
+ const l = i(), u = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/.exec(e);
213
+ if (!u) return;
214
+ h(u);
215
+ const d = R(u[0]), p = /^:\s*/.exec(e);
216
+ if (!p) return o("property missing ':'");
217
+ h(p);
218
+ let g = "";
219
+ const x = ne(e, [";", "}"]);
220
+ x !== -1 && (g = e.substring(0, x), h([g]), g = R(g).replace(te, ""));
221
+ const B = l({ type: N.declaration, property: d.replace(te, ""), value: g }), V = /^[;\s]*/.exec(e);
222
+ return V && h(V), B;
223
+ }
224
+ function O() {
225
+ const l = [];
226
+ if (!f()) return o("missing '{'");
227
+ y(l);
228
+ let u = k();
229
+ for (; u; ) l.push(u), y(l), u = k();
230
+ return c() ? l : o("missing '}'");
231
+ }
232
+ function a() {
233
+ const l = [], u = i();
234
+ let d = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
235
+ for (; d; ) {
236
+ const p = h(d);
237
+ l.push(p[1]);
238
+ const g = /^,\s*/.exec(e);
239
+ g && h(g), d = /^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/.exec(e);
240
+ }
241
+ if (l.length) return u({ type: N.keyframe, values: l, declarations: O() || [] });
242
+ }
243
+ const w = $("import"), E = $("charset"), T = $("namespace");
244
+ function $(l) {
245
+ const u = new RegExp("^@" + l + `\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);
246
+ return () => {
247
+ const d = i(), p = u.exec(e);
248
+ if (!p) return;
249
+ const g = h(p), x = { type: l };
250
+ return x[l] = g[1].trim(), d(x);
251
+ };
252
+ }
253
+ function I() {
254
+ if (e[0] === "@") return (function() {
255
+ const l = i(), u = /^@([-\w]+)?keyframes\s*/.exec(e);
256
+ if (!u) return;
257
+ const d = h(u)[1], p = /^([-\w]+)\s*/.exec(e);
258
+ if (!p) return o("@keyframes missing name");
259
+ const g = h(p)[1];
260
+ if (!f()) return o("@keyframes missing '{'");
261
+ let x = y(), B = a();
262
+ for (; B; ) x.push(B), x = x.concat(y()), B = a();
263
+ return c() ? l({ type: N.keyframes, name: g, vendor: d, keyframes: x }) : o("@keyframes missing '}'");
264
+ })() || (function() {
265
+ const l = i(), u = /^@media *([^{]+)/.exec(e);
266
+ if (!u) return;
267
+ const d = R(h(u)[1]);
268
+ if (!f()) return o("@media missing '{'");
269
+ const p = y().concat(b());
270
+ return c() ? l({ type: N.media, media: d, rules: p }) : o("@media missing '}'");
271
+ })() || (function() {
272
+ const l = i(), u = /^@custom-media\s+(--\S+)\s+([^{;\s][^{;]*);/.exec(e);
273
+ if (!u) return;
274
+ const d = h(u);
275
+ return l({ type: N.customMedia, name: R(d[1]), media: R(d[2]) });
276
+ })() || (function() {
277
+ const l = i(), u = /^@supports *([^{]+)/.exec(e);
278
+ if (!u) return;
279
+ const d = R(h(u)[1]);
280
+ if (!f()) return o("@supports missing '{'");
281
+ const p = y().concat(b());
282
+ return c() ? l({ type: N.supports, supports: d, rules: p }) : o("@supports missing '}'");
283
+ })() || w() || E() || T() || (function() {
284
+ const l = i(), u = /^@([-\w]+)?document *([^{]+)/.exec(e);
285
+ if (!u) return;
286
+ const d = h(u), p = R(d[1]), g = R(d[2]);
287
+ if (!f()) return o("@document missing '{'");
288
+ const x = y().concat(b());
289
+ return c() ? l({ type: N.document, document: g, vendor: p, rules: x }) : o("@document missing '}'");
290
+ })() || (function() {
291
+ const l = i(), u = /^@page */.exec(e);
292
+ if (!u) return;
293
+ h(u);
294
+ const d = F() || [];
295
+ if (!f()) return o("@page missing '{'");
296
+ let p = y(), g = k();
297
+ for (; g; ) p.push(g), p = p.concat(y()), g = k();
298
+ return c() ? l({ type: N.page, selectors: d, declarations: p }) : o("@page missing '}'");
299
+ })() || (function() {
300
+ const l = i(), u = /^@host\s*/.exec(e);
301
+ if (!u) return;
302
+ if (h(u), !f()) return o("@host missing '{'");
303
+ const d = y().concat(b());
304
+ return c() ? l({ type: N.host, rules: d }) : o("@host missing '}'");
305
+ })() || (function() {
306
+ const l = i(), u = /^@font-face\s*/.exec(e);
307
+ if (!u) return;
308
+ if (h(u), !f()) return o("@font-face missing '{'");
309
+ let d = y(), p = k();
310
+ for (; p; ) d.push(p), d = d.concat(y()), p = k();
311
+ return c() ? l({ type: N.fontFace, declarations: d }) : o("@font-face missing '}'");
312
+ })() || (function() {
313
+ const l = i(), u = /^@container *([^{]+)/.exec(e);
314
+ if (!u) return;
315
+ const d = R(h(u)[1]);
316
+ if (!f()) return o("@container missing '{'");
317
+ const p = y().concat(b());
318
+ return c() ? l({ type: N.container, container: d, rules: p }) : o("@container missing '}'");
319
+ })() || (function() {
320
+ const l = i(), u = /^@starting-style\s*/.exec(e);
321
+ if (!u) return;
322
+ if (h(u), !f()) return o("@starting-style missing '{'");
323
+ const d = y().concat(b());
324
+ return c() ? l({ type: N.startingStyle, rules: d }) : o("@starting-style missing '}'");
325
+ })() || (function() {
326
+ const l = i(), u = /^@layer *([^{;@]+)/.exec(e);
327
+ if (!u) return;
328
+ const d = R(h(u)[1]);
329
+ if (!f()) {
330
+ const g = /^[;\s]*/.exec(e);
331
+ return g && h(g), l({ type: N.layer, layer: d });
332
+ }
333
+ const p = y().concat(b());
334
+ return c() ? l({ type: N.layer, layer: d, rules: p }) : o("@layer missing '}'");
335
+ })();
336
+ }
337
+ function D() {
338
+ const l = i(), u = F();
339
+ return u ? (y(), l({ type: N.rule, selectors: u, declarations: O() || [] })) : o("selector missing");
340
+ }
341
+ return re((function() {
342
+ const l = b();
343
+ return { type: N.stylesheet, stylesheet: { source: t?.source, rules: l, parsingErrors: s } };
344
+ })());
345
+ };
346
+ var Mt = Object.prototype.toString;
347
+ function Lt(e) {
348
+ return typeof e == "function" || Mt.call(e) === "[object Function]";
349
+ }
350
+ function Vt(e) {
351
+ var t = Number(e);
352
+ return isNaN(t) ? 0 : t === 0 || !isFinite(t) ? t : (t > 0 ? 1 : -1) * Math.floor(Math.abs(t));
353
+ }
354
+ var jt = Math.pow(2, 53) - 1;
355
+ function _t(e) {
356
+ var t = Vt(e);
357
+ return Math.min(Math.max(t, 0), jt);
358
+ }
359
+ function C(e, t) {
360
+ var n = Array, r = Object(e);
361
+ if (e == null)
362
+ throw new TypeError("Array.from requires an array-like object - not null or undefined");
363
+ for (var i = _t(r.length), s = Lt(n) ? Object(new n(i)) : new Array(i), o = 0, f; o < i; )
364
+ f = r[o], s[o] = f, o += 1;
365
+ return s.length = i, s;
366
+ }
367
+ function _(e) {
368
+ "@babel/helpers - typeof";
369
+ return _ = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
370
+ return typeof t;
371
+ } : function(t) {
372
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
373
+ }, _(e);
374
+ }
375
+ function qt(e, t) {
376
+ if (!(e instanceof t))
377
+ throw new TypeError("Cannot call a class as a function");
378
+ }
379
+ function Ft(e, t) {
380
+ for (var n = 0; n < t.length; n++) {
381
+ var r = t[n];
382
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Le(r.key), r);
383
+ }
384
+ }
385
+ function Ut(e, t, n) {
386
+ return t && Ft(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
387
+ }
388
+ function Gt(e, t, n) {
389
+ return t = Le(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
390
+ }
391
+ function Le(e) {
392
+ var t = zt(e, "string");
393
+ return _(t) === "symbol" ? t : String(t);
394
+ }
395
+ function zt(e, t) {
396
+ if (_(e) !== "object" || e === null) return e;
397
+ var n = e[Symbol.toPrimitive];
398
+ if (n !== void 0) {
399
+ var r = n.call(e, t);
400
+ if (_(r) !== "object") return r;
401
+ throw new TypeError("@@toPrimitive must return a primitive value.");
402
+ }
403
+ return (t === "string" ? String : Number)(e);
404
+ }
405
+ var Wt = /* @__PURE__ */ (function() {
406
+ function e() {
407
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
408
+ qt(this, e), Gt(this, "items", void 0), this.items = t;
409
+ }
410
+ return Ut(e, [{
411
+ key: "add",
412
+ value: function(n) {
413
+ return this.has(n) === !1 && this.items.push(n), this;
414
+ }
415
+ }, {
416
+ key: "clear",
417
+ value: function() {
418
+ this.items = [];
419
+ }
420
+ }, {
421
+ key: "delete",
422
+ value: function(n) {
423
+ var r = this.items.length;
424
+ return this.items = this.items.filter(function(i) {
425
+ return i !== n;
426
+ }), r !== this.items.length;
427
+ }
428
+ }, {
429
+ key: "forEach",
430
+ value: function(n) {
431
+ var r = this;
432
+ this.items.forEach(function(i) {
433
+ n(i, i, r);
434
+ });
435
+ }
436
+ }, {
437
+ key: "has",
438
+ value: function(n) {
439
+ return this.items.indexOf(n) !== -1;
440
+ }
441
+ }, {
442
+ key: "size",
443
+ get: function() {
444
+ return this.items.length;
445
+ }
446
+ }]), e;
447
+ })();
448
+ const Yt = typeof Set > "u" ? Set : Wt;
449
+ function A(e) {
450
+ var t;
451
+ return (
452
+ // eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
453
+ (t = e.localName) !== null && t !== void 0 ? t : (
454
+ // eslint-disable-next-line no-restricted-properties -- required for the fallback
455
+ e.tagName.toLowerCase()
456
+ )
457
+ );
458
+ }
459
+ var Kt = {
460
+ article: "article",
461
+ aside: "complementary",
462
+ button: "button",
463
+ datalist: "listbox",
464
+ dd: "definition",
465
+ details: "group",
466
+ dialog: "dialog",
467
+ dt: "term",
468
+ fieldset: "group",
469
+ figure: "figure",
470
+ // WARNING: Only with an accessible name
471
+ form: "form",
472
+ footer: "contentinfo",
473
+ h1: "heading",
474
+ h2: "heading",
475
+ h3: "heading",
476
+ h4: "heading",
477
+ h5: "heading",
478
+ h6: "heading",
479
+ header: "banner",
480
+ hr: "separator",
481
+ html: "document",
482
+ legend: "legend",
483
+ li: "listitem",
484
+ math: "math",
485
+ main: "main",
486
+ menu: "list",
487
+ nav: "navigation",
488
+ ol: "list",
489
+ optgroup: "group",
490
+ // WARNING: Only in certain context
491
+ option: "option",
492
+ output: "status",
493
+ progress: "progressbar",
494
+ // WARNING: Only with an accessible name
495
+ section: "region",
496
+ summary: "button",
497
+ table: "table",
498
+ tbody: "rowgroup",
499
+ textarea: "textbox",
500
+ tfoot: "rowgroup",
501
+ // WARNING: Only in certain context
502
+ td: "cell",
503
+ th: "columnheader",
504
+ thead: "rowgroup",
505
+ tr: "row",
506
+ ul: "list"
507
+ }, Xt = {
508
+ caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
509
+ code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
510
+ deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
511
+ emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
512
+ generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
513
+ insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
514
+ none: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
515
+ paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
516
+ presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
517
+ strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
518
+ subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
519
+ superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
520
+ };
521
+ function Qt(e, t) {
522
+ return [
523
+ "aria-atomic",
524
+ "aria-busy",
525
+ "aria-controls",
526
+ "aria-current",
527
+ "aria-description",
528
+ "aria-describedby",
529
+ "aria-details",
530
+ // "disabled",
531
+ "aria-dropeffect",
532
+ // "errormessage",
533
+ "aria-flowto",
534
+ "aria-grabbed",
535
+ // "haspopup",
536
+ "aria-hidden",
537
+ // "invalid",
538
+ "aria-keyshortcuts",
539
+ "aria-label",
540
+ "aria-labelledby",
541
+ "aria-live",
542
+ "aria-owns",
543
+ "aria-relevant",
544
+ "aria-roledescription"
545
+ ].some(function(n) {
546
+ var r;
547
+ return e.hasAttribute(n) && !((r = Xt[t]) !== null && r !== void 0 && r.has(n));
548
+ });
549
+ }
550
+ function Ve(e, t) {
551
+ return Qt(e, t);
552
+ }
553
+ function Jt(e) {
554
+ var t = en(e);
555
+ if (t === null || ie.indexOf(t) !== -1) {
556
+ var n = Zt(e);
557
+ if (ie.indexOf(t || "") === -1 || Ve(e, n || ""))
558
+ return n;
559
+ }
560
+ return t;
561
+ }
562
+ function Zt(e) {
563
+ var t = Kt[A(e)];
564
+ if (t !== void 0)
565
+ return t;
566
+ switch (A(e)) {
567
+ case "a":
568
+ case "area":
569
+ case "link":
570
+ if (e.hasAttribute("href"))
571
+ return "link";
572
+ break;
573
+ case "img":
574
+ return e.getAttribute("alt") === "" && !Ve(e, "img") ? "presentation" : "img";
575
+ case "input": {
576
+ var n = e, r = n.type;
577
+ switch (r) {
578
+ case "button":
579
+ case "image":
580
+ case "reset":
581
+ case "submit":
582
+ return "button";
583
+ case "checkbox":
584
+ case "radio":
585
+ return r;
586
+ case "range":
587
+ return "slider";
588
+ case "email":
589
+ case "tel":
590
+ case "text":
591
+ case "url":
592
+ return e.hasAttribute("list") ? "combobox" : "textbox";
593
+ case "search":
594
+ return e.hasAttribute("list") ? "combobox" : "searchbox";
595
+ case "number":
596
+ return "spinbutton";
597
+ default:
598
+ return null;
599
+ }
600
+ }
601
+ case "select":
602
+ return e.hasAttribute("multiple") || e.size > 1 ? "listbox" : "combobox";
603
+ }
604
+ return null;
605
+ }
606
+ function en(e) {
607
+ var t = e.getAttribute("role");
608
+ if (t !== null) {
609
+ var n = t.trim().split(" ")[0];
610
+ if (n.length > 0)
611
+ return n;
612
+ }
613
+ return null;
614
+ }
615
+ var ie = ["presentation", "none"];
616
+ function v(e) {
617
+ return e !== null && e.nodeType === e.ELEMENT_NODE;
618
+ }
619
+ function je(e) {
620
+ return v(e) && A(e) === "caption";
621
+ }
622
+ function G(e) {
623
+ return v(e) && A(e) === "input";
624
+ }
625
+ function tn(e) {
626
+ return v(e) && A(e) === "optgroup";
627
+ }
628
+ function nn(e) {
629
+ return v(e) && A(e) === "select";
630
+ }
631
+ function rn(e) {
632
+ return v(e) && A(e) === "table";
633
+ }
634
+ function sn(e) {
635
+ return v(e) && A(e) === "textarea";
636
+ }
637
+ function on(e) {
638
+ var t = e.ownerDocument === null ? e : e.ownerDocument, n = t.defaultView;
639
+ if (n === null)
640
+ throw new TypeError("no window available");
641
+ return n;
642
+ }
643
+ function an(e) {
644
+ return v(e) && A(e) === "fieldset";
645
+ }
646
+ function un(e) {
647
+ return v(e) && A(e) === "legend";
648
+ }
649
+ function cn(e) {
650
+ return v(e) && A(e) === "slot";
651
+ }
652
+ function ln(e) {
653
+ return v(e) && e.ownerSVGElement !== void 0;
654
+ }
655
+ function fn(e) {
656
+ return v(e) && A(e) === "svg";
657
+ }
658
+ function dn(e) {
659
+ return ln(e) && A(e) === "title";
660
+ }
661
+ function W(e, t) {
662
+ if (v(e) && e.hasAttribute(t)) {
663
+ var n = e.getAttribute(t).split(" "), r = e.getRootNode ? e.getRootNode() : e.ownerDocument;
664
+ return n.map(function(i) {
665
+ return r.getElementById(i);
666
+ }).filter(
667
+ function(i) {
668
+ return i !== null;
669
+ }
670
+ // TODO: why does this not narrow?
671
+ );
672
+ }
673
+ return [];
674
+ }
675
+ function P(e, t) {
676
+ return v(e) ? t.indexOf(Jt(e)) !== -1 : !1;
677
+ }
678
+ function pn(e) {
679
+ return e.trim().replace(/\s\s+/g, " ");
680
+ }
681
+ function hn(e, t) {
682
+ if (!v(e))
683
+ return !1;
684
+ if (e.hasAttribute("hidden") || e.getAttribute("aria-hidden") === "true")
685
+ return !0;
686
+ var n = t(e);
687
+ return n.getPropertyValue("display") === "none" || n.getPropertyValue("visibility") === "hidden";
688
+ }
689
+ function gn(e) {
690
+ return P(e, ["button", "combobox", "listbox", "textbox"]) || _e(e, "range");
691
+ }
692
+ function _e(e, t) {
693
+ if (!v(e))
694
+ return !1;
695
+ switch (t) {
696
+ case "range":
697
+ return P(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
698
+ default:
699
+ throw new TypeError("No knowledge about abstract role '".concat(t, "'. This is likely a bug :("));
700
+ }
701
+ }
702
+ function Se(e, t) {
703
+ var n = C(e.querySelectorAll(t));
704
+ return W(e, "aria-owns").forEach(function(r) {
705
+ n.push.apply(n, C(r.querySelectorAll(t)));
706
+ }), n;
707
+ }
708
+ function mn(e) {
709
+ return nn(e) ? e.selectedOptions || Se(e, "[selected]") : Se(e, '[aria-selected="true"]');
710
+ }
711
+ function bn(e) {
712
+ return P(e, ie);
713
+ }
714
+ function vn(e) {
715
+ return je(e);
716
+ }
717
+ function yn(e) {
718
+ return P(e, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
719
+ }
720
+ function En(e) {
721
+ return !1;
722
+ }
723
+ function wn(e) {
724
+ return G(e) || sn(e) ? e.value : e.textContent || "";
725
+ }
726
+ function Ae(e) {
727
+ var t = e.getPropertyValue("content");
728
+ return /^["'].*["']$/.test(t) ? t.slice(1, -1) : "";
729
+ }
730
+ function qe(e) {
731
+ var t = A(e);
732
+ return t === "button" || t === "input" && e.getAttribute("type") !== "hidden" || t === "meter" || t === "output" || t === "progress" || t === "select" || t === "textarea";
733
+ }
734
+ function Fe(e) {
735
+ if (qe(e))
736
+ return e;
737
+ var t = null;
738
+ return e.childNodes.forEach(function(n) {
739
+ if (t === null && v(n)) {
740
+ var r = Fe(n);
741
+ r !== null && (t = r);
742
+ }
743
+ }), t;
744
+ }
745
+ function xn(e) {
746
+ if (e.control !== void 0)
747
+ return e.control;
748
+ var t = e.getAttribute("for");
749
+ return t !== null ? e.ownerDocument.getElementById(t) : Fe(e);
750
+ }
751
+ function Nn(e) {
752
+ var t = e.labels;
753
+ if (t === null)
754
+ return t;
755
+ if (t !== void 0)
756
+ return C(t);
757
+ if (!qe(e))
758
+ return null;
759
+ var n = e.ownerDocument;
760
+ return C(n.querySelectorAll("label")).filter(function(r) {
761
+ return xn(r) === e;
762
+ });
763
+ }
764
+ function Sn(e) {
765
+ var t = e.assignedNodes();
766
+ return t.length === 0 ? C(e.childNodes) : t;
767
+ }
768
+ function Ue(e) {
769
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = new Yt(), r = on(e), i = t.compute, s = i === void 0 ? "name" : i, o = t.computedStyleSupportsPseudoElements, f = o === void 0 ? t.getComputedStyle !== void 0 : o, c = t.getComputedStyle, b = c === void 0 ? r.getComputedStyle.bind(r) : c, h = t.hidden, L = h === void 0 ? !1 : h;
770
+ function y(a, w) {
771
+ var E = "";
772
+ if (v(a) && f) {
773
+ var T = b(a, "::before"), $ = Ae(T);
774
+ E = "".concat($, " ").concat(E);
775
+ }
776
+ var I = cn(a) ? Sn(a) : C(a.childNodes).concat(W(a, "aria-owns"));
777
+ if (I.forEach(function(u) {
778
+ var d = O(u, {
779
+ isEmbeddedInLabel: w.isEmbeddedInLabel,
780
+ isReferenced: !1,
781
+ recursion: !0
782
+ }), p = v(u) ? b(u).getPropertyValue("display") : "inline", g = p !== "inline" ? " " : "";
783
+ E += "".concat(g).concat(d).concat(g);
784
+ }), v(a) && f) {
785
+ var D = b(a, "::after"), l = Ae(D);
786
+ E = "".concat(E, " ").concat(l);
787
+ }
788
+ return E.trim();
789
+ }
790
+ function H(a, w) {
791
+ var E = a.getAttributeNode(w);
792
+ return E !== null && !n.has(E) && E.value.trim() !== "" ? (n.add(E), E.value) : null;
793
+ }
794
+ function F(a) {
795
+ return v(a) ? H(a, "title") : null;
796
+ }
797
+ function k(a) {
798
+ if (!v(a))
799
+ return null;
800
+ if (an(a)) {
801
+ n.add(a);
802
+ for (var w = C(a.childNodes), E = 0; E < w.length; E += 1) {
803
+ var T = w[E];
804
+ if (un(T))
805
+ return O(T, {
806
+ isEmbeddedInLabel: !1,
807
+ isReferenced: !1,
808
+ recursion: !1
809
+ });
810
+ }
811
+ } else if (rn(a)) {
812
+ n.add(a);
813
+ for (var $ = C(a.childNodes), I = 0; I < $.length; I += 1) {
814
+ var D = $[I];
815
+ if (je(D))
816
+ return O(D, {
817
+ isEmbeddedInLabel: !1,
818
+ isReferenced: !1,
819
+ recursion: !1
820
+ });
821
+ }
822
+ } else if (fn(a)) {
823
+ n.add(a);
824
+ for (var l = C(a.childNodes), u = 0; u < l.length; u += 1) {
825
+ var d = l[u];
826
+ if (dn(d))
827
+ return d.textContent;
828
+ }
829
+ return null;
830
+ } else if (A(a) === "img" || A(a) === "area") {
831
+ var p = H(a, "alt");
832
+ if (p !== null)
833
+ return p;
834
+ } else if (tn(a)) {
835
+ var g = H(a, "label");
836
+ if (g !== null)
837
+ return g;
838
+ }
839
+ if (G(a) && (a.type === "button" || a.type === "submit" || a.type === "reset")) {
840
+ var x = H(a, "value");
841
+ if (x !== null)
842
+ return x;
843
+ if (a.type === "submit")
844
+ return "Submit";
845
+ if (a.type === "reset")
846
+ return "Reset";
847
+ }
848
+ var B = Nn(a);
849
+ if (B !== null && B.length !== 0)
850
+ return n.add(a), C(B).map(function(X) {
851
+ return O(X, {
852
+ isEmbeddedInLabel: !0,
853
+ isReferenced: !1,
854
+ recursion: !0
855
+ });
856
+ }).filter(function(X) {
857
+ return X.length > 0;
858
+ }).join(" ");
859
+ if (G(a) && a.type === "image") {
860
+ var V = H(a, "alt");
861
+ if (V !== null)
862
+ return V;
863
+ var ge = H(a, "title");
864
+ return ge !== null ? ge : "Submit Query";
865
+ }
866
+ if (P(a, ["button"])) {
867
+ var me = y(a, {
868
+ isEmbeddedInLabel: !1
869
+ });
870
+ if (me !== "")
871
+ return me;
872
+ }
873
+ return null;
874
+ }
875
+ function O(a, w) {
876
+ if (n.has(a))
877
+ return "";
878
+ if (!L && hn(a, b) && !w.isReferenced)
879
+ return n.add(a), "";
880
+ var E = v(a) ? a.getAttributeNode("aria-labelledby") : null, T = E !== null && !n.has(E) ? W(a, "aria-labelledby") : [];
881
+ if (s === "name" && !w.isReferenced && T.length > 0)
882
+ return n.add(E), T.map(function(p) {
883
+ return O(p, {
884
+ isEmbeddedInLabel: w.isEmbeddedInLabel,
885
+ isReferenced: !0,
886
+ // this isn't recursion as specified, otherwise we would skip
887
+ // `aria-label` in
888
+ // <input id="myself" aria-label="foo" aria-labelledby="myself"
889
+ recursion: !1
890
+ });
891
+ }).join(" ");
892
+ var $ = w.recursion && gn(a) && s === "name";
893
+ if (!$) {
894
+ var I = (v(a) && a.getAttribute("aria-label") || "").trim();
895
+ if (I !== "" && s === "name")
896
+ return n.add(a), I;
897
+ if (!bn(a)) {
898
+ var D = k(a);
899
+ if (D !== null)
900
+ return n.add(a), D;
901
+ }
902
+ }
903
+ if (P(a, ["menu"]))
904
+ return n.add(a), "";
905
+ if ($ || w.isEmbeddedInLabel || w.isReferenced) {
906
+ if (P(a, ["combobox", "listbox"])) {
907
+ n.add(a);
908
+ var l = mn(a);
909
+ return l.length === 0 ? G(a) ? a.value : "" : C(l).map(function(p) {
910
+ return O(p, {
911
+ isEmbeddedInLabel: w.isEmbeddedInLabel,
912
+ isReferenced: !1,
913
+ recursion: !0
914
+ });
915
+ }).join(" ");
916
+ }
917
+ if (_e(a, "range"))
918
+ return n.add(a), a.hasAttribute("aria-valuetext") ? a.getAttribute("aria-valuetext") : a.hasAttribute("aria-valuenow") ? a.getAttribute("aria-valuenow") : a.getAttribute("value") || "";
919
+ if (P(a, ["textbox"]))
920
+ return n.add(a), wn(a);
921
+ }
922
+ if (yn(a) || v(a) && w.isReferenced || vn(a) || En()) {
923
+ var u = y(a, {
924
+ isEmbeddedInLabel: w.isEmbeddedInLabel
925
+ });
926
+ if (u !== "")
927
+ return n.add(a), u;
928
+ }
929
+ if (a.nodeType === a.TEXT_NODE)
930
+ return n.add(a), a.textContent || "";
931
+ if (w.recursion)
932
+ return n.add(a), y(a, {
933
+ isEmbeddedInLabel: w.isEmbeddedInLabel
934
+ });
935
+ var d = F(a);
936
+ return d !== null ? (n.add(a), d) : (n.add(a), "");
937
+ }
938
+ return pn(O(e, {
939
+ isEmbeddedInLabel: !1,
940
+ // by spec computeAccessibleDescription starts with the referenced elements as roots
941
+ isReferenced: s === "description",
942
+ recursion: !1
943
+ }));
944
+ }
945
+ function q(e) {
946
+ "@babel/helpers - typeof";
947
+ return q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
948
+ return typeof t;
949
+ } : function(t) {
950
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
951
+ }, q(e);
952
+ }
953
+ function Re(e, t) {
954
+ var n = Object.keys(e);
955
+ if (Object.getOwnPropertySymbols) {
956
+ var r = Object.getOwnPropertySymbols(e);
957
+ t && (r = r.filter(function(i) {
958
+ return Object.getOwnPropertyDescriptor(e, i).enumerable;
959
+ })), n.push.apply(n, r);
960
+ }
961
+ return n;
962
+ }
963
+ function $e(e) {
964
+ for (var t = 1; t < arguments.length; t++) {
965
+ var n = arguments[t] != null ? arguments[t] : {};
966
+ t % 2 ? Re(Object(n), !0).forEach(function(r) {
967
+ An(e, r, n[r]);
968
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Re(Object(n)).forEach(function(r) {
969
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
970
+ });
971
+ }
972
+ return e;
973
+ }
974
+ function An(e, t, n) {
975
+ return t = Rn(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
976
+ }
977
+ function Rn(e) {
978
+ var t = $n(e, "string");
979
+ return q(t) === "symbol" ? t : String(t);
980
+ }
981
+ function $n(e, t) {
982
+ if (q(e) !== "object" || e === null) return e;
983
+ var n = e[Symbol.toPrimitive];
984
+ if (n !== void 0) {
985
+ var r = n.call(e, t);
986
+ if (q(r) !== "object") return r;
987
+ throw new TypeError("@@toPrimitive must return a primitive value.");
988
+ }
989
+ return (t === "string" ? String : Number)(e);
990
+ }
991
+ function Cn(e) {
992
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = W(e, "aria-describedby").map(function(s) {
993
+ return Ue(s, $e($e({}, t), {}, {
994
+ compute: "description"
995
+ }));
996
+ }).join(" ");
997
+ if (n === "") {
998
+ var r = e.getAttribute("aria-description");
999
+ n = r === null ? "" : r;
1000
+ }
1001
+ if (n === "") {
1002
+ var i = e.getAttribute("title");
1003
+ n = i === null ? "" : i;
1004
+ }
1005
+ return n;
1006
+ }
1007
+ function On(e) {
1008
+ return P(e, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
1009
+ }
1010
+ function In(e) {
1011
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1012
+ return On(e) ? "" : Ue(e, t);
1013
+ }
1014
+ var U = { exports: {} }, Ce;
1015
+ function Hn() {
1016
+ if (Ce) return U.exports;
1017
+ Ce = 1;
1018
+ var e = String, t = function() {
1019
+ return { isColorSupported: !1, reset: e, bold: e, dim: e, italic: e, underline: e, inverse: e, hidden: e, strikethrough: e, black: e, red: e, green: e, yellow: e, blue: e, magenta: e, cyan: e, white: e, gray: e, bgBlack: e, bgRed: e, bgGreen: e, bgYellow: e, bgBlue: e, bgMagenta: e, bgCyan: e, bgWhite: e, blackBright: e, redBright: e, greenBright: e, yellowBright: e, blueBright: e, magentaBright: e, cyanBright: e, whiteBright: e, bgBlackBright: e, bgRedBright: e, bgGreenBright: e, bgYellowBright: e, bgBlueBright: e, bgMagentaBright: e, bgCyanBright: e, bgWhiteBright: e };
1020
+ };
1021
+ return U.exports = t(), U.exports.createColors = t, U.exports;
1022
+ }
1023
+ var Tn = /* @__PURE__ */ Hn();
1024
+ const Dn = /* @__PURE__ */ de(Tn);
1025
+ var z = { exports: {} };
1026
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
1027
+ var Bn = z.exports, Oe;
1028
+ function Pn() {
1029
+ return Oe || (Oe = 1, (function(e, t) {
1030
+ (function(n, r) {
1031
+ e.exports = r(n);
1032
+ })(typeof be < "u" ? be : Bn, function(n) {
1033
+ if (n.CSS && n.CSS.escape)
1034
+ return n.CSS.escape;
1035
+ var r = function(i) {
1036
+ if (arguments.length == 0)
1037
+ throw new TypeError("`CSS.escape` requires an argument.");
1038
+ for (var s = String(i), o = s.length, f = -1, c, b = "", h = s.charCodeAt(0); ++f < o; ) {
1039
+ if (c = s.charCodeAt(f), c == 0) {
1040
+ b += "�";
1041
+ continue;
1042
+ }
1043
+ if (
1044
+ // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
1045
+ // U+007F, […]
1046
+ c >= 1 && c <= 31 || c == 127 || // If the character is the first character and is in the range [0-9]
1047
+ // (U+0030 to U+0039), […]
1048
+ f == 0 && c >= 48 && c <= 57 || // If the character is the second character and is in the range [0-9]
1049
+ // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
1050
+ f == 1 && c >= 48 && c <= 57 && h == 45
1051
+ ) {
1052
+ b += "\\" + c.toString(16) + " ";
1053
+ continue;
1054
+ }
1055
+ if (
1056
+ // If the character is the first character and is a `-` (U+002D), and
1057
+ // there is no second character, […]
1058
+ f == 0 && o == 1 && c == 45
1059
+ ) {
1060
+ b += "\\" + s.charAt(f);
1061
+ continue;
1062
+ }
1063
+ if (c >= 128 || c == 45 || c == 95 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) {
1064
+ b += s.charAt(f);
1065
+ continue;
1066
+ }
1067
+ b += "\\" + s.charAt(f);
1068
+ }
1069
+ return b;
1070
+ };
1071
+ return n.CSS || (n.CSS = {}), n.CSS.escape = r, r;
1072
+ });
1073
+ })(z)), z.exports;
1074
+ }
1075
+ var kn = Pn();
1076
+ const Mn = /* @__PURE__ */ de(kn);
1077
+ class Ge extends Error {
1078
+ constructor(t, n, r, i) {
1079
+ super(), Error.captureStackTrace && Error.captureStackTrace(this, r);
1080
+ let s = "";
1081
+ try {
1082
+ s = i.utils.printWithType(
1083
+ "Received",
1084
+ n,
1085
+ i.utils.printReceived
1086
+ );
1087
+ } catch {
1088
+ }
1089
+ this.message = [
1090
+ i.utils.matcherHint(
1091
+ `${i.isNot ? ".not" : ""}.${r.name}`,
1092
+ "received",
1093
+ ""
1094
+ ),
1095
+ "",
1096
+ // eslint-disable-next-line new-cap
1097
+ `${i.utils.RECEIVED_COLOR(
1098
+ "received"
1099
+ )} value must ${t}.`,
1100
+ s
1101
+ ].join(`
1102
+ `);
1103
+ }
1104
+ }
1105
+ class Ie extends Ge {
1106
+ constructor(...t) {
1107
+ super("be an HTMLElement or an SVGElement", ...t);
1108
+ }
1109
+ }
1110
+ class He extends Ge {
1111
+ constructor(...t) {
1112
+ super("be a Node", ...t);
1113
+ }
1114
+ }
1115
+ function ze(e, t, ...n) {
1116
+ if (!e || !e.ownerDocument || !e.ownerDocument.defaultView)
1117
+ throw new t(e, ...n);
1118
+ }
1119
+ function Ln(e, ...t) {
1120
+ ze(e, He, ...t);
1121
+ const n = e.ownerDocument.defaultView;
1122
+ if (!(e instanceof n.Node))
1123
+ throw new He(e, ...t);
1124
+ }
1125
+ function m(e, ...t) {
1126
+ ze(e, Ie, ...t);
1127
+ const n = e.ownerDocument.defaultView;
1128
+ if (!(e instanceof n.HTMLElement) && !(e instanceof n.SVGElement))
1129
+ throw new Ie(e, ...t);
1130
+ }
1131
+ class Vn extends Error {
1132
+ constructor(t, n, r) {
1133
+ super(), Error.captureStackTrace && Error.captureStackTrace(this, n), this.message = [
1134
+ t.message,
1135
+ "",
1136
+ // eslint-disable-next-line new-cap
1137
+ r.utils.RECEIVED_COLOR("Failing css:"),
1138
+ // eslint-disable-next-line new-cap
1139
+ r.utils.RECEIVED_COLOR(`${t.css}`)
1140
+ ].join(`
1141
+ `);
1142
+ }
1143
+ }
1144
+ function jn(e, ...t) {
1145
+ const n = kt(`selector { ${e} }`, { silent: !0 }).stylesheet;
1146
+ if (n.parsingErrors && n.parsingErrors.length > 0) {
1147
+ const { reason: i, line: s } = n.parsingErrors[0];
1148
+ throw new Vn(
1149
+ {
1150
+ css: e,
1151
+ message: `Syntax error parsing expected css: ${i} on line: ${s}`
1152
+ },
1153
+ ...t
1154
+ );
1155
+ }
1156
+ return n.rules[0].declarations.filter((i) => i.type === "declaration").reduce(
1157
+ (i, { property: s, value: o }) => Object.assign(i, { [s]: o }),
1158
+ {}
1159
+ );
1160
+ }
1161
+ function Te(e, t) {
1162
+ return typeof t == "string" ? t : e.utils.stringify(t);
1163
+ }
1164
+ function S(e, t, n, r, i, s) {
1165
+ return [
1166
+ `${t}
1167
+ `,
1168
+ // eslint-disable-next-line new-cap
1169
+ `${n}:
1170
+ ${e.utils.EXPECTED_COLOR(
1171
+ xe(Te(e, r), 2)
1172
+ )}`,
1173
+ // eslint-disable-next-line new-cap
1174
+ `${i}:
1175
+ ${e.utils.RECEIVED_COLOR(
1176
+ xe(Te(e, s), 2)
1177
+ )}`
1178
+ ].join(`
1179
+ `);
1180
+ }
1181
+ function _n(e, t) {
1182
+ return t instanceof RegExp ? t.test(e) : e.includes(String(t));
1183
+ }
1184
+ function Y(e, t) {
1185
+ console.warn(
1186
+ `Warning: ${e} has been deprecated and will be removed in future updates.`,
1187
+ t
1188
+ );
1189
+ }
1190
+ function K(e) {
1191
+ return e.replace(/\s+/g, " ").trim();
1192
+ }
1193
+ function M(e) {
1194
+ return e.tagName && e.tagName.toLowerCase();
1195
+ }
1196
+ function qn({ multiple: e, options: t }) {
1197
+ const n = [...t].filter((r) => r.selected);
1198
+ if (e)
1199
+ return [...n].map((r) => r.value);
1200
+ if (n.length !== 0)
1201
+ return n[0].value;
1202
+ }
1203
+ function Fn(e) {
1204
+ switch (e.type) {
1205
+ case "number":
1206
+ return e.value === "" ? null : Number(e.value);
1207
+ case "checkbox":
1208
+ return e.checked;
1209
+ default:
1210
+ return e.value;
1211
+ }
1212
+ }
1213
+ const Un = ["meter", "progressbar", "slider", "spinbutton"];
1214
+ function Gn(e) {
1215
+ if (Un.includes(e.getAttribute("role")))
1216
+ return Number(e.getAttribute("aria-valuenow"));
1217
+ }
1218
+ function We(e) {
1219
+ if (e)
1220
+ switch (e.tagName.toLowerCase()) {
1221
+ case "input":
1222
+ return Fn(e);
1223
+ case "select":
1224
+ return qn(e);
1225
+ default:
1226
+ return e.value ?? Gn(e);
1227
+ }
1228
+ }
1229
+ function zn(e, { wordConnector: t = ", ", lastWordConnector: n = " and " } = {}) {
1230
+ return [e.slice(0, -1).join(t), e[e.length - 1]].join(
1231
+ e.length > 1 ? n : ""
1232
+ );
1233
+ }
1234
+ function he(e, t) {
1235
+ return Array.isArray(e) && Array.isArray(t) ? [...new Set(e)].every((n) => new Set(t).has(n)) : e === t;
1236
+ }
1237
+ function se(e, t) {
1238
+ return Y(
1239
+ "toBeInTheDOM",
1240
+ "Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container."
1241
+ ), e && m(e, se, this), t && m(t, se, this), {
1242
+ pass: t ? t.contains(e) : !!e,
1243
+ message: () => [
1244
+ this.utils.matcherHint(
1245
+ `${this.isNot ? ".not" : ""}.toBeInTheDOM`,
1246
+ "element",
1247
+ ""
1248
+ ),
1249
+ "",
1250
+ "Received:",
1251
+ ` ${this.utils.printReceived(
1252
+ e && e.cloneNode(!1)
1253
+ )}`
1254
+ ].join(`
1255
+ `)
1256
+ };
1257
+ }
1258
+ function Ye(e) {
1259
+ (e !== null || !this.isNot) && m(e, Ye, this);
1260
+ const t = e === null ? !1 : e.ownerDocument === e.getRootNode({ composed: !0 }), n = () => `expected document not to contain element, found ${this.utils.stringify(
1261
+ e.cloneNode(!0)
1262
+ )} instead`, r = () => "element could not be found in the document";
1263
+ return {
1264
+ pass: t,
1265
+ message: () => [
1266
+ this.utils.matcherHint(
1267
+ `${this.isNot ? ".not" : ""}.toBeInTheDocument`,
1268
+ "element",
1269
+ ""
1270
+ ),
1271
+ "",
1272
+ // eslint-disable-next-line new-cap
1273
+ this.utils.RECEIVED_COLOR(this.isNot ? n() : r())
1274
+ ].join(`
1275
+ `)
1276
+ };
1277
+ }
1278
+ function Ke(e) {
1279
+ return Y(
1280
+ "toBeEmpty",
1281
+ "Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM."
1282
+ ), m(e, Ke, this), {
1283
+ pass: e.innerHTML === "",
1284
+ message: () => [
1285
+ this.utils.matcherHint(
1286
+ `${this.isNot ? ".not" : ""}.toBeEmpty`,
1287
+ "element",
1288
+ ""
1289
+ ),
1290
+ "",
1291
+ "Received:",
1292
+ ` ${this.utils.printReceived(e.innerHTML)}`
1293
+ ].join(`
1294
+ `)
1295
+ };
1296
+ }
1297
+ function Xe(e) {
1298
+ return m(e, Xe, this), {
1299
+ pass: Wn(e),
1300
+ message: () => [
1301
+ this.utils.matcherHint(
1302
+ `${this.isNot ? ".not" : ""}.toBeEmptyDOMElement`,
1303
+ "element",
1304
+ ""
1305
+ ),
1306
+ "",
1307
+ "Received:",
1308
+ ` ${this.utils.printReceived(e.innerHTML)}`
1309
+ ].join(`
1310
+ `)
1311
+ };
1312
+ }
1313
+ function Wn(e) {
1314
+ return [...e.childNodes].filter((n) => n.nodeType !== 8).length === 0;
1315
+ }
1316
+ function oe(e, t) {
1317
+ return m(e, oe, this), t !== null && m(t, oe, this), {
1318
+ pass: e.contains(t),
1319
+ message: () => [
1320
+ this.utils.matcherHint(
1321
+ `${this.isNot ? ".not" : ""}.toContainElement`,
1322
+ "element",
1323
+ "element"
1324
+ ),
1325
+ "",
1326
+ // eslint-disable-next-line new-cap
1327
+ this.utils.RECEIVED_COLOR(`${this.utils.stringify(
1328
+ e.cloneNode(!1)
1329
+ )} ${this.isNot ? "contains:" : "does not contain:"} ${this.utils.stringify(t && t.cloneNode(!1))}
1330
+ `)
1331
+ ].join(`
1332
+ `)
1333
+ };
1334
+ }
1335
+ function Yn(e, t) {
1336
+ const n = e.ownerDocument.createElement("div");
1337
+ return n.innerHTML = t, n.innerHTML;
1338
+ }
1339
+ function Qe(e, t) {
1340
+ if (m(e, Qe, this), typeof t != "string")
1341
+ throw new Error(`.toContainHTML() expects a string value, got ${t}`);
1342
+ return {
1343
+ pass: e.outerHTML.includes(Yn(e, t)),
1344
+ message: () => [
1345
+ this.utils.matcherHint(
1346
+ `${this.isNot ? ".not" : ""}.toContainHTML`,
1347
+ "element",
1348
+ ""
1349
+ ),
1350
+ "Expected:",
1351
+ // eslint-disable-next-line new-cap
1352
+ ` ${this.utils.EXPECTED_COLOR(t)}`,
1353
+ "Received:",
1354
+ ` ${this.utils.printReceived(e.cloneNode(!0))}`
1355
+ ].join(`
1356
+ `)
1357
+ };
1358
+ }
1359
+ function Je(e, t, n = { normalizeWhitespace: !0 }) {
1360
+ Ln(e, Je, this);
1361
+ const r = n.normalizeWhitespace ? K(e.textContent) : e.textContent.replace(/\u00a0/g, " "), i = r !== "" && t === "";
1362
+ return {
1363
+ pass: !i && _n(r, t),
1364
+ message: () => {
1365
+ const s = this.isNot ? "not to" : "to";
1366
+ return S(
1367
+ this,
1368
+ this.utils.matcherHint(
1369
+ `${this.isNot ? ".not" : ""}.toHaveTextContent`,
1370
+ "element",
1371
+ ""
1372
+ ),
1373
+ i ? "Checking with empty string will always match, use .toBeEmptyDOMElement() instead" : `Expected element ${s} have text content`,
1374
+ t,
1375
+ "Received",
1376
+ r
1377
+ );
1378
+ }
1379
+ };
1380
+ }
1381
+ function ae(e, t) {
1382
+ m(e, ae, this);
1383
+ const n = Cn(e), r = arguments.length === 1;
1384
+ let i = !1;
1385
+ return r ? i = n !== "" : i = t instanceof RegExp ? t.test(n) : this.equals(
1386
+ n,
1387
+ t
1388
+ ), {
1389
+ pass: i,
1390
+ message: () => {
1391
+ const s = this.isNot ? "not to" : "to";
1392
+ return S(
1393
+ this,
1394
+ this.utils.matcherHint(
1395
+ `${this.isNot ? ".not" : ""}.${ae.name}`,
1396
+ "element",
1397
+ ""
1398
+ ),
1399
+ `Expected element ${s} have accessible description`,
1400
+ t,
1401
+ "Received",
1402
+ n
1403
+ );
1404
+ }
1405
+ };
1406
+ }
1407
+ const j = "aria-invalid", Kn = ["false"];
1408
+ function Ze(e, t) {
1409
+ m(e, Ze, this);
1410
+ const n = this.isNot ? "not to" : "to", r = this.isNot ? ".not.toHaveAccessibleErrorMessage" : ".toHaveAccessibleErrorMessage", i = e.getAttribute("aria-errormessage");
1411
+ if (!!i && /\s+/.test(i))
1412
+ return {
1413
+ pass: !1,
1414
+ message: () => S(
1415
+ this,
1416
+ this.utils.matcherHint(r, "element"),
1417
+ "Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",
1418
+ "",
1419
+ "Received",
1420
+ `aria-errormessage="${i}"`
1421
+ )
1422
+ };
1423
+ const o = e.getAttribute(j);
1424
+ if (!e.hasAttribute(j) || Kn.includes(o))
1425
+ return {
1426
+ pass: !1,
1427
+ message: () => S(
1428
+ this,
1429
+ this.utils.matcherHint(r, "element"),
1430
+ "Expected element to be marked as invalid with attribute",
1431
+ `${j}="${String(!0)}"`,
1432
+ "Received",
1433
+ e.hasAttribute("aria-invalid") ? `${j}="${e.getAttribute(j)}` : null
1434
+ )
1435
+ };
1436
+ const c = K(
1437
+ e.ownerDocument.getElementById(i)?.textContent ?? ""
1438
+ );
1439
+ return {
1440
+ pass: t === void 0 ? !!c : t instanceof RegExp ? t.test(c) : this.equals(c, t),
1441
+ message: () => S(
1442
+ this,
1443
+ this.utils.matcherHint(r, "element"),
1444
+ `Expected element ${n} have accessible error message`,
1445
+ t ?? "",
1446
+ "Received",
1447
+ c
1448
+ )
1449
+ };
1450
+ }
1451
+ const Xn = Zn(pe.elementRoles);
1452
+ function ue(e, t) {
1453
+ m(e, ue, this);
1454
+ const n = Qn(e);
1455
+ return {
1456
+ pass: n.some((i) => i === t),
1457
+ message: () => {
1458
+ const i = this.isNot ? "not to" : "to";
1459
+ return S(
1460
+ this,
1461
+ this.utils.matcherHint(
1462
+ `${this.isNot ? ".not" : ""}.${ue.name}`,
1463
+ "element",
1464
+ ""
1465
+ ),
1466
+ `Expected element ${i} have role`,
1467
+ t,
1468
+ "Received",
1469
+ n.join(", ")
1470
+ );
1471
+ }
1472
+ };
1473
+ }
1474
+ function Qn(e) {
1475
+ return e.hasAttribute("role") ? e.getAttribute("role").split(" ").filter(Boolean) : Jn(e);
1476
+ }
1477
+ function Jn(e) {
1478
+ for (const { match: t, roles: n } of Xn)
1479
+ if (t(e))
1480
+ return [...n];
1481
+ return [];
1482
+ }
1483
+ function Zn(e) {
1484
+ function t({ name: o, attributes: f }) {
1485
+ return `${o}${f.map(({ name: c, value: b, constraints: h = [] }) => h.indexOf("undefined") !== -1 ? `:not([${c}])` : b ? `[${c}="${b}"]` : `[${c}]`).join("")}`;
1486
+ }
1487
+ function n({ attributes: o = [] }) {
1488
+ return o.length;
1489
+ }
1490
+ function r({ specificity: o }, { specificity: f }) {
1491
+ return f - o;
1492
+ }
1493
+ function i(o) {
1494
+ let { attributes: f = [] } = o;
1495
+ const c = f.findIndex(
1496
+ (h) => h.value && h.name === "type" && h.value === "text"
1497
+ );
1498
+ c >= 0 && (f = [
1499
+ ...f.slice(0, c),
1500
+ ...f.slice(c + 1)
1501
+ ]);
1502
+ const b = t({ ...o, attributes: f });
1503
+ return (h) => c >= 0 && h.type !== "text" ? !1 : h.matches(b);
1504
+ }
1505
+ let s = [];
1506
+ for (const [o, f] of e.entries())
1507
+ s = [
1508
+ ...s,
1509
+ {
1510
+ match: i(o),
1511
+ roles: Array.from(f),
1512
+ specificity: n(o)
1513
+ }
1514
+ ];
1515
+ return s.sort(r);
1516
+ }
1517
+ function ce(e, t) {
1518
+ m(e, ce, this);
1519
+ const n = In(e), r = arguments.length === 1;
1520
+ let i = !1;
1521
+ return r ? i = n !== "" : i = t instanceof RegExp ? t.test(n) : this.equals(n, t), {
1522
+ pass: i,
1523
+ message: () => {
1524
+ const s = this.isNot ? "not to" : "to";
1525
+ return S(
1526
+ this,
1527
+ this.utils.matcherHint(
1528
+ `${this.isNot ? ".not" : ""}.${ce.name}`,
1529
+ "element",
1530
+ ""
1531
+ ),
1532
+ `Expected element ${s} have accessible name`,
1533
+ t,
1534
+ "Received",
1535
+ n
1536
+ );
1537
+ }
1538
+ };
1539
+ }
1540
+ function De(e, t, n) {
1541
+ return n === void 0 ? t : `${t}=${e(n)}`;
1542
+ }
1543
+ function er(e, t, n) {
1544
+ return n === void 0 ? `element.hasAttribute(${e(t)})` : `element.getAttribute(${e(t)}) === ${e(n)}`;
1545
+ }
1546
+ function et(e, t, n) {
1547
+ m(e, et, this);
1548
+ const r = n !== void 0, i = e.hasAttribute(t), s = e.getAttribute(t);
1549
+ return {
1550
+ pass: r ? i && this.equals(s, n) : i,
1551
+ message: () => {
1552
+ const o = this.isNot ? "not to" : "to", f = i ? De(this.utils.stringify, t, s) : null, c = this.utils.matcherHint(
1553
+ `${this.isNot ? ".not" : ""}.toHaveAttribute`,
1554
+ "element",
1555
+ this.utils.printExpected(t),
1556
+ {
1557
+ secondArgument: r ? this.utils.printExpected(n) : void 0,
1558
+ comment: er(
1559
+ this.utils.stringify,
1560
+ t,
1561
+ n
1562
+ )
1563
+ }
1564
+ );
1565
+ return S(
1566
+ this,
1567
+ c,
1568
+ `Expected the element ${o} have attribute`,
1569
+ De(this.utils.stringify, t, n),
1570
+ "Received",
1571
+ f
1572
+ );
1573
+ }
1574
+ };
1575
+ }
1576
+ function tr(e) {
1577
+ const t = e.pop();
1578
+ let n, r;
1579
+ return typeof t == "object" && !(t instanceof RegExp) ? (n = e, r = t) : (n = e.concat(t), r = { exact: !1 }), { expectedClassNames: n, options: r };
1580
+ }
1581
+ function Be(e) {
1582
+ return e ? e.split(/\s+/).filter((t) => t.length > 0) : [];
1583
+ }
1584
+ function Pe(e, t) {
1585
+ return e.every(
1586
+ (n) => typeof n == "string" ? t.includes(n) : t.some((r) => n.test(r))
1587
+ );
1588
+ }
1589
+ function tt(e, ...t) {
1590
+ m(e, tt, this);
1591
+ const { expectedClassNames: n, options: r } = tr(t), i = Be(e.getAttribute("class")), s = n.reduce(
1592
+ (f, c) => f.concat(
1593
+ typeof c == "string" || !c ? Be(c) : c
1594
+ ),
1595
+ []
1596
+ ), o = s.some((f) => f instanceof RegExp);
1597
+ if (r.exact && o)
1598
+ throw new Error("Exact option does not support RegExp expected class names");
1599
+ return r.exact ? {
1600
+ pass: Pe(s, i) && s.length === i.length,
1601
+ message: () => {
1602
+ const f = this.isNot ? "not to" : "to";
1603
+ return S(
1604
+ this,
1605
+ this.utils.matcherHint(
1606
+ `${this.isNot ? ".not" : ""}.toHaveClass`,
1607
+ "element",
1608
+ this.utils.printExpected(s.join(" "))
1609
+ ),
1610
+ `Expected the element ${f} have EXACTLY defined classes`,
1611
+ s.join(" "),
1612
+ "Received",
1613
+ i.join(" ")
1614
+ );
1615
+ }
1616
+ } : s.length > 0 ? {
1617
+ pass: Pe(s, i),
1618
+ message: () => {
1619
+ const f = this.isNot ? "not to" : "to";
1620
+ return S(
1621
+ this,
1622
+ this.utils.matcherHint(
1623
+ `${this.isNot ? ".not" : ""}.toHaveClass`,
1624
+ "element",
1625
+ this.utils.printExpected(s.join(" "))
1626
+ ),
1627
+ `Expected the element ${f} have class`,
1628
+ s.join(" "),
1629
+ "Received",
1630
+ i.join(" ")
1631
+ );
1632
+ }
1633
+ } : {
1634
+ pass: this.isNot ? i.length > 0 : !1,
1635
+ message: () => this.isNot ? S(
1636
+ this,
1637
+ this.utils.matcherHint(".not.toHaveClass", "element", ""),
1638
+ "Expected the element to have classes",
1639
+ "(none)",
1640
+ "Received",
1641
+ i.join(" ")
1642
+ ) : [
1643
+ this.utils.matcherHint(".toHaveClass", "element"),
1644
+ "At least one expected class must be provided."
1645
+ ].join(`
1646
+ `)
1647
+ };
1648
+ }
1649
+ function nr(e, t) {
1650
+ const n = {}, r = e.createElement("div");
1651
+ return Object.keys(t).forEach((i) => {
1652
+ r.style[i] = t[i], n[i] = r.style[i];
1653
+ }), n;
1654
+ }
1655
+ function rr(e, t) {
1656
+ return !!Object.keys(e).length && Object.entries(e).every(([n, r]) => {
1657
+ const i = n.startsWith("--"), s = [n];
1658
+ return i || s.push(n.toLowerCase()), s.some(
1659
+ (o) => t[o] === r || t.getPropertyValue(o) === r
1660
+ );
1661
+ });
1662
+ }
1663
+ function ke(e) {
1664
+ return Object.keys(e).sort().map((t) => `${t}: ${e[t]};`).join(`
1665
+ `);
1666
+ }
1667
+ function ir(e, t, n) {
1668
+ const r = Array.from(n).filter((s) => t[s] !== void 0).reduce(
1669
+ (s, o) => Object.assign(s, { [o]: n.getPropertyValue(o) }),
1670
+ {}
1671
+ );
1672
+ return e(ke(t), ke(r)).replace(`${Dn.red("+ Received")}
1673
+ `, "");
1674
+ }
1675
+ function le(e, t) {
1676
+ m(e, le, this);
1677
+ const n = typeof t == "object" ? t : jn(t, le, this), { getComputedStyle: r } = e.ownerDocument.defaultView, i = nr(e.ownerDocument, n), s = r(e);
1678
+ return {
1679
+ pass: rr(i, s),
1680
+ message: () => {
1681
+ const o = `${this.isNot ? ".not" : ""}.toHaveStyle`;
1682
+ return [
1683
+ this.utils.matcherHint(o, "element", ""),
1684
+ ir(this.utils.diff, i, s)
1685
+ ].join(`
1686
+
1687
+ `);
1688
+ }
1689
+ };
1690
+ }
1691
+ function nt(e) {
1692
+ return m(e, nt, this), {
1693
+ pass: e.ownerDocument.activeElement === e,
1694
+ message: () => [
1695
+ this.utils.matcherHint(
1696
+ `${this.isNot ? ".not" : ""}.toHaveFocus`,
1697
+ "element",
1698
+ ""
1699
+ ),
1700
+ "",
1701
+ ...this.isNot ? [
1702
+ "Received element is focused:",
1703
+ ` ${this.utils.printReceived(e)}`
1704
+ ] : [
1705
+ "Expected element with focus:",
1706
+ ` ${this.utils.printExpected(e)}`,
1707
+ "Received element with focus:",
1708
+ ` ${this.utils.printReceived(
1709
+ e.ownerDocument.activeElement
1710
+ )}`
1711
+ ]
1712
+ ].join(`
1713
+ `)
1714
+ };
1715
+ }
1716
+ function sr(e) {
1717
+ const t = [...new Set(e.map((n) => n.type))];
1718
+ if (t.length !== 1)
1719
+ throw new Error(
1720
+ "Multiple form elements with the same name must be of the same type"
1721
+ );
1722
+ switch (t[0]) {
1723
+ case "radio": {
1724
+ const n = e.find((r) => r.checked);
1725
+ return n ? n.value : void 0;
1726
+ }
1727
+ case "checkbox":
1728
+ return e.filter((n) => n.checked).map((n) => n.value);
1729
+ default:
1730
+ return e.map((n) => n.value);
1731
+ }
1732
+ }
1733
+ function or(e, t) {
1734
+ const n = [...e.querySelectorAll(`[name="${Mn(t)}"]`)];
1735
+ if (n.length !== 0)
1736
+ switch (n.length) {
1737
+ case 1:
1738
+ return We(n[0]);
1739
+ default:
1740
+ return sr(n);
1741
+ }
1742
+ }
1743
+ function ar(e) {
1744
+ return /\[\]$/.test(e) ? e.slice(0, -2) : e;
1745
+ }
1746
+ function ur(e) {
1747
+ return Array.from(e.elements).map((n) => n.name).reduce(
1748
+ (n, r) => ({
1749
+ ...n,
1750
+ [ar(r)]: or(e, r)
1751
+ }),
1752
+ {}
1753
+ );
1754
+ }
1755
+ function rt(e, t) {
1756
+ if (m(e, rt, this), !e.elements)
1757
+ throw new Error("toHaveFormValues must be called on a form or a fieldset");
1758
+ const n = ur(e);
1759
+ return {
1760
+ pass: Object.entries(t).every(
1761
+ ([r, i]) => he(n[r], i)
1762
+ ),
1763
+ message: () => {
1764
+ const r = this.isNot ? "not to" : "to", i = `${this.isNot ? ".not" : ""}.toHaveFormValues`, s = Object.keys(n).filter((o) => t.hasOwnProperty(o)).reduce((o, f) => ({ ...o, [f]: n[f] }), {});
1765
+ return [
1766
+ this.utils.matcherHint(i, "element", ""),
1767
+ `Expected the element ${r} have form values`,
1768
+ this.utils.diff(t, s)
1769
+ ].join(`
1770
+
1771
+ `);
1772
+ }
1773
+ };
1774
+ }
1775
+ function cr(e) {
1776
+ const { getComputedStyle: t } = e.ownerDocument.defaultView, { display: n, visibility: r, opacity: i } = t(e);
1777
+ return n !== "none" && r !== "hidden" && r !== "collapse" && i !== "0" && i !== 0;
1778
+ }
1779
+ function lr(e, t) {
1780
+ let n;
1781
+ return t ? n = e.nodeName === "DETAILS" && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0 : n = e.nodeName === "DETAILS" ? e.hasAttribute("open") : !0, !e.hasAttribute("hidden") && n;
1782
+ }
1783
+ function it(e, t) {
1784
+ return cr(e) && lr(e, t) && (!e.parentElement || it(e.parentElement, e));
1785
+ }
1786
+ function st(e) {
1787
+ m(e, st, this);
1788
+ const t = e.ownerDocument === e.getRootNode({ composed: !0 }), n = t && it(e);
1789
+ return {
1790
+ pass: n,
1791
+ message: () => {
1792
+ const r = n ? "is" : "is not";
1793
+ return [
1794
+ this.utils.matcherHint(
1795
+ `${this.isNot ? ".not" : ""}.toBeVisible`,
1796
+ "element",
1797
+ ""
1798
+ ),
1799
+ "",
1800
+ `Received element ${r} visible${t ? "" : " (element is not in the document)"}:`,
1801
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1802
+ ].join(`
1803
+ `);
1804
+ }
1805
+ };
1806
+ }
1807
+ const fr = [
1808
+ "fieldset",
1809
+ "input",
1810
+ "select",
1811
+ "optgroup",
1812
+ "option",
1813
+ "button",
1814
+ "textarea"
1815
+ ];
1816
+ function dr(e, t) {
1817
+ return M(e) === "legend" && M(t) === "fieldset" && e.isSameNode(
1818
+ Array.from(t.children).find((n) => M(n) === "legend")
1819
+ );
1820
+ }
1821
+ function pr(e, t) {
1822
+ return at(t) && !dr(e, t);
1823
+ }
1824
+ function hr(e) {
1825
+ return e.includes("-");
1826
+ }
1827
+ function ot(e) {
1828
+ const t = M(e);
1829
+ return fr.includes(t) || hr(t);
1830
+ }
1831
+ function at(e) {
1832
+ return ot(e) && e.hasAttribute("disabled");
1833
+ }
1834
+ function ut(e) {
1835
+ const t = e.parentElement;
1836
+ return !!t && (pr(e, t) || ut(t));
1837
+ }
1838
+ function ct(e) {
1839
+ return ot(e) && (at(e) || ut(e));
1840
+ }
1841
+ function lt(e) {
1842
+ m(e, lt, this);
1843
+ const t = ct(e);
1844
+ return {
1845
+ pass: t,
1846
+ message: () => {
1847
+ const n = t ? "is" : "is not";
1848
+ return [
1849
+ this.utils.matcherHint(
1850
+ `${this.isNot ? ".not" : ""}.toBeDisabled`,
1851
+ "element",
1852
+ ""
1853
+ ),
1854
+ "",
1855
+ `Received element ${n} disabled:`,
1856
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1857
+ ].join(`
1858
+ `);
1859
+ }
1860
+ };
1861
+ }
1862
+ function ft(e) {
1863
+ m(e, ft, this);
1864
+ const t = !ct(e);
1865
+ return {
1866
+ pass: t,
1867
+ message: () => {
1868
+ const n = t ? "is" : "is not";
1869
+ return [
1870
+ this.utils.matcherHint(
1871
+ `${this.isNot ? ".not" : ""}.toBeEnabled`,
1872
+ "element",
1873
+ ""
1874
+ ),
1875
+ "",
1876
+ `Received element ${n} enabled:`,
1877
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1878
+ ].join(`
1879
+ `);
1880
+ }
1881
+ };
1882
+ }
1883
+ const gr = ["select", "textarea"], mr = ["input", "select", "textarea"], br = [
1884
+ "color",
1885
+ "hidden",
1886
+ "range",
1887
+ "submit",
1888
+ "image",
1889
+ "reset"
1890
+ ], vr = [
1891
+ "checkbox",
1892
+ "combobox",
1893
+ "gridcell",
1894
+ "listbox",
1895
+ "radiogroup",
1896
+ "spinbutton",
1897
+ "textbox",
1898
+ "tree"
1899
+ ];
1900
+ function yr(e) {
1901
+ return gr.includes(M(e)) && e.hasAttribute("required");
1902
+ }
1903
+ function Er(e) {
1904
+ return M(e) === "input" && e.hasAttribute("required") && (e.hasAttribute("type") && !br.includes(e.getAttribute("type")) || !e.hasAttribute("type"));
1905
+ }
1906
+ function wr(e) {
1907
+ return e.hasAttribute("aria-required") && e.getAttribute("aria-required") === "true" && (mr.includes(M(e)) || e.hasAttribute("role") && vr.includes(e.getAttribute("role")));
1908
+ }
1909
+ function dt(e) {
1910
+ m(e, dt, this);
1911
+ const t = yr(e) || Er(e) || wr(e);
1912
+ return {
1913
+ pass: t,
1914
+ message: () => {
1915
+ const n = t ? "is" : "is not";
1916
+ return [
1917
+ this.utils.matcherHint(
1918
+ `${this.isNot ? ".not" : ""}.toBeRequired`,
1919
+ "element",
1920
+ ""
1921
+ ),
1922
+ "",
1923
+ `Received element ${n} required:`,
1924
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1925
+ ].join(`
1926
+ `);
1927
+ }
1928
+ };
1929
+ }
1930
+ const xr = ["form", "input", "select", "textarea"];
1931
+ function Nr(e) {
1932
+ return e.hasAttribute("aria-invalid") && e.getAttribute("aria-invalid") !== "false";
1933
+ }
1934
+ function Sr(e) {
1935
+ return xr.includes(M(e));
1936
+ }
1937
+ function pt(e) {
1938
+ const t = Nr(e);
1939
+ return Sr(e) ? t || !e.checkValidity() : t;
1940
+ }
1941
+ function ht(e) {
1942
+ m(e, ht, this);
1943
+ const t = pt(e);
1944
+ return {
1945
+ pass: t,
1946
+ message: () => {
1947
+ const n = t ? "is" : "is not";
1948
+ return [
1949
+ this.utils.matcherHint(
1950
+ `${this.isNot ? ".not" : ""}.toBeInvalid`,
1951
+ "element",
1952
+ ""
1953
+ ),
1954
+ "",
1955
+ `Received element ${n} currently invalid:`,
1956
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1957
+ ].join(`
1958
+ `);
1959
+ }
1960
+ };
1961
+ }
1962
+ function gt(e) {
1963
+ m(e, gt, this);
1964
+ const t = !pt(e);
1965
+ return {
1966
+ pass: t,
1967
+ message: () => {
1968
+ const n = t ? "is" : "is not";
1969
+ return [
1970
+ this.utils.matcherHint(
1971
+ `${this.isNot ? ".not" : ""}.toBeValid`,
1972
+ "element",
1973
+ ""
1974
+ ),
1975
+ "",
1976
+ `Received element ${n} currently valid:`,
1977
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
1978
+ ].join(`
1979
+ `);
1980
+ }
1981
+ };
1982
+ }
1983
+ function mt(e, t) {
1984
+ if (m(e, mt, this), e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type))
1985
+ throw new Error(
1986
+ "input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead"
1987
+ );
1988
+ const n = We(e), r = t !== void 0;
1989
+ let i = t, s = n;
1990
+ return t == n && t !== n && (i = `${t} (${typeof t})`, s = `${n} (${typeof n})`), {
1991
+ pass: r ? he(n, t) : !!n,
1992
+ message: () => {
1993
+ const o = this.isNot ? "not to" : "to", f = this.utils.matcherHint(
1994
+ `${this.isNot ? ".not" : ""}.toHaveValue`,
1995
+ "element",
1996
+ t
1997
+ );
1998
+ return S(
1999
+ this,
2000
+ f,
2001
+ `Expected the element ${o} have value`,
2002
+ r ? i : "(any)",
2003
+ "Received",
2004
+ s
2005
+ );
2006
+ }
2007
+ };
2008
+ }
2009
+ function bt(e, t) {
2010
+ m(e, bt, this);
2011
+ const n = e.tagName.toLowerCase();
2012
+ if (!["select", "input", "textarea"].includes(n))
2013
+ throw new Error(
2014
+ ".toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead."
2015
+ );
2016
+ if (n === "input" && ["radio", "checkbox"].includes(e.type))
2017
+ throw new Error(
2018
+ `.toHaveDisplayValue() currently does not support input[type="${e.type}"], try with another matcher instead.`
2019
+ );
2020
+ const r = Ar(n, e), i = Rr(t), s = i.filter(
2021
+ (c) => r.some(
2022
+ (b) => c instanceof RegExp ? c.test(b) : this.equals(b, String(c))
2023
+ )
2024
+ ).length, o = s === r.length, f = s === i.length;
2025
+ return {
2026
+ pass: o && f,
2027
+ message: () => S(
2028
+ this,
2029
+ this.utils.matcherHint(
2030
+ `${this.isNot ? ".not" : ""}.toHaveDisplayValue`,
2031
+ "element",
2032
+ ""
2033
+ ),
2034
+ `Expected element ${this.isNot ? "not " : ""}to have display value`,
2035
+ t,
2036
+ "Received",
2037
+ r
2038
+ )
2039
+ };
2040
+ }
2041
+ function Ar(e, t) {
2042
+ return e === "select" ? Array.from(t).filter((n) => n.selected).map((n) => n.textContent) : [t.value];
2043
+ }
2044
+ function Rr(e) {
2045
+ return e instanceof Array ? e : [e];
2046
+ }
2047
+ function vt(e) {
2048
+ m(e, vt, this);
2049
+ const t = () => e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type), n = () => yt(e.getAttribute("role")) && ["true", "false"].includes(e.getAttribute("aria-checked"));
2050
+ if (!t() && !n())
2051
+ return {
2052
+ pass: !1,
2053
+ message: () => `only inputs with type="checkbox" or type="radio" or elements with ${$r()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`
2054
+ };
2055
+ const r = () => t() ? e.checked : e.getAttribute("aria-checked") === "true";
2056
+ return {
2057
+ pass: r(),
2058
+ message: () => {
2059
+ const i = r() ? "is" : "is not";
2060
+ return [
2061
+ this.utils.matcherHint(
2062
+ `${this.isNot ? ".not" : ""}.toBeChecked`,
2063
+ "element",
2064
+ ""
2065
+ ),
2066
+ "",
2067
+ `Received element ${i} checked:`,
2068
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2069
+ ].join(`
2070
+ `);
2071
+ }
2072
+ };
2073
+ }
2074
+ function $r() {
2075
+ return zn(
2076
+ Cr().map((e) => `role="${e}"`),
2077
+ { lastWordConnector: " or " }
2078
+ );
2079
+ }
2080
+ function Cr() {
2081
+ return pe.roles.keys().filter(yt);
2082
+ }
2083
+ function yt(e) {
2084
+ return pe.roles.get(e)?.props["aria-checked"] !== void 0;
2085
+ }
2086
+ function Et(e) {
2087
+ m(e, Et, this);
2088
+ const t = () => e.tagName.toLowerCase() === "input" && e.type === "checkbox", n = () => e.getAttribute("role") === "checkbox";
2089
+ if (!t() && !n())
2090
+ return {
2091
+ pass: !1,
2092
+ message: () => 'only inputs with type="checkbox" or elements with role="checkbox" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead'
2093
+ };
2094
+ const r = () => {
2095
+ const i = e.getAttribute("aria-checked") === "mixed";
2096
+ return t() && e.indeterminate || i;
2097
+ };
2098
+ return {
2099
+ pass: r(),
2100
+ message: () => {
2101
+ const i = r() ? "is" : "is not";
2102
+ return [
2103
+ this.utils.matcherHint(
2104
+ `${this.isNot ? ".not" : ""}.toBePartiallyChecked`,
2105
+ "element",
2106
+ ""
2107
+ ),
2108
+ "",
2109
+ `Received element ${i} partially checked:`,
2110
+ ` ${this.utils.printReceived(e.cloneNode(!1))}`
2111
+ ].join(`
2112
+ `);
2113
+ }
2114
+ };
2115
+ }
2116
+ function wt(e, t) {
2117
+ Y(
2118
+ "toHaveDescription",
2119
+ "Please use toHaveAccessibleDescription."
2120
+ ), m(e, wt, this);
2121
+ const n = t !== void 0, i = (e.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
2122
+ let s = "";
2123
+ if (i.length > 0) {
2124
+ const o = e.ownerDocument, f = i.map((c) => o.getElementById(c)).filter(Boolean);
2125
+ s = K(f.map((c) => c.textContent).join(" "));
2126
+ }
2127
+ return {
2128
+ pass: n ? t instanceof RegExp ? t.test(s) : this.equals(s, t) : !!s,
2129
+ message: () => {
2130
+ const o = this.isNot ? "not to" : "to";
2131
+ return S(
2132
+ this,
2133
+ this.utils.matcherHint(
2134
+ `${this.isNot ? ".not" : ""}.toHaveDescription`,
2135
+ "element",
2136
+ ""
2137
+ ),
2138
+ `Expected the element ${o} have description`,
2139
+ this.utils.printExpected(t),
2140
+ "Received",
2141
+ this.utils.printReceived(s)
2142
+ );
2143
+ }
2144
+ };
2145
+ }
2146
+ function xt(e, t) {
2147
+ if (Y("toHaveErrorMessage", "Please use toHaveAccessibleErrorMessage."), m(e, xt, this), !e.hasAttribute("aria-invalid") || e.getAttribute("aria-invalid") === "false") {
2148
+ const o = this.isNot ? ".not" : "";
2149
+ return {
2150
+ pass: !1,
2151
+ message: () => S(
2152
+ this,
2153
+ this.utils.matcherHint(`${o}.toHaveErrorMessage`, "element", ""),
2154
+ "Expected the element to have invalid state indicated by",
2155
+ 'aria-invalid="true"',
2156
+ "Received",
2157
+ e.hasAttribute("aria-invalid") ? `aria-invalid="${e.getAttribute("aria-invalid")}"` : this.utils.printReceived("")
2158
+ )
2159
+ };
2160
+ }
2161
+ const n = t !== void 0, i = (e.getAttribute("aria-errormessage") || "").split(/\s+/).filter(Boolean);
2162
+ let s = "";
2163
+ if (i.length > 0) {
2164
+ const o = e.ownerDocument, f = i.map((c) => o.getElementById(c)).filter(Boolean);
2165
+ s = K(
2166
+ f.map((c) => c.textContent).join(" ")
2167
+ );
2168
+ }
2169
+ return {
2170
+ pass: n ? t instanceof RegExp ? t.test(s) : this.equals(s, t) : !!s,
2171
+ message: () => {
2172
+ const o = this.isNot ? "not to" : "to";
2173
+ return S(
2174
+ this,
2175
+ this.utils.matcherHint(
2176
+ `${this.isNot ? ".not" : ""}.toHaveErrorMessage`,
2177
+ "element",
2178
+ ""
2179
+ ),
2180
+ `Expected the element ${o} have error message`,
2181
+ this.utils.printExpected(t),
2182
+ "Received",
2183
+ this.utils.printReceived(s)
2184
+ );
2185
+ }
2186
+ };
2187
+ }
2188
+ function Or(e) {
2189
+ const t = e.ownerDocument.getSelection();
2190
+ if (["input", "textarea"].includes(e.tagName.toLowerCase()))
2191
+ return ["radio", "checkbox"].includes(e.type) ? "" : e.value.toString().substring(e.selectionStart, e.selectionEnd);
2192
+ if (t.anchorNode === null || t.focusNode === null)
2193
+ return "";
2194
+ const n = t.getRangeAt(0), r = e.ownerDocument.createRange();
2195
+ if (t.containsNode(e, !1))
2196
+ r.selectNodeContents(e), t.removeAllRanges(), t.addRange(r);
2197
+ else if (!(e.contains(t.anchorNode) && e.contains(t.focusNode))) {
2198
+ const s = e === n.startContainer || e.contains(n.startContainer), o = e === n.endContainer || e.contains(n.endContainer);
2199
+ t.removeAllRanges(), (s || o) && (r.selectNodeContents(e), s && r.setStart(
2200
+ n.startContainer,
2201
+ n.startOffset
2202
+ ), o && r.setEnd(
2203
+ n.endContainer,
2204
+ n.endOffset
2205
+ ), t.addRange(r));
2206
+ }
2207
+ const i = t.toString();
2208
+ return t.removeAllRanges(), t.addRange(n), i;
2209
+ }
2210
+ function Nt(e, t) {
2211
+ m(e, Nt, this);
2212
+ const n = t !== void 0;
2213
+ if (n && typeof t != "string")
2214
+ throw new Error("expected selection must be a string or undefined");
2215
+ const r = Or(e);
2216
+ return {
2217
+ pass: n ? he(r, t) : !!r,
2218
+ message: () => {
2219
+ const i = this.isNot ? "not to" : "to", s = this.utils.matcherHint(
2220
+ `${this.isNot ? ".not" : ""}.toHaveSelection`,
2221
+ "element",
2222
+ t
2223
+ );
2224
+ return S(
2225
+ this,
2226
+ s,
2227
+ `Expected the element ${i} have selection`,
2228
+ n ? t : "(any)",
2229
+ "Received",
2230
+ r
2231
+ );
2232
+ }
2233
+ };
2234
+ }
2235
+ function St(e) {
2236
+ m(e, St, this);
2237
+ const t = (e.getAttribute("role") || "").split(" ").map((o) => o.trim()), n = e.tagName.toLowerCase() === "button" || e.tagName.toLowerCase() === "input" && e.type === "button" || t.includes("button"), r = e.getAttribute("aria-pressed");
2238
+ return !n || !(r === "true" || r === "false") ? {
2239
+ pass: !1,
2240
+ message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePressed()'
2241
+ } : {
2242
+ pass: n && r === "true",
2243
+ message: () => {
2244
+ const o = this.utils.matcherHint(
2245
+ `${this.isNot ? ".not" : ""}.toBePressed`,
2246
+ "element",
2247
+ ""
2248
+ );
2249
+ return S(
2250
+ this,
2251
+ o,
2252
+ "Expected element to have",
2253
+ `aria-pressed="${this.isNot ? "false" : "true"}"`,
2254
+ "Received",
2255
+ `aria-pressed="${r}"`
2256
+ );
2257
+ }
2258
+ };
2259
+ }
2260
+ function At(e) {
2261
+ m(e, At, this);
2262
+ const t = (e.getAttribute("role") || "").split(" ").map((o) => o.trim()), n = e.tagName.toLowerCase() === "button" || e.tagName.toLowerCase() === "input" && e.type === "button" || t.includes("button"), r = e.getAttribute("aria-pressed");
2263
+ return !n || !(r === "true" || r === "false" || r === "mixed") ? {
2264
+ pass: !1,
2265
+ message: () => 'Only button or input with type="button" or element with role="button" and a valid aria-pressed attribute can be used with .toBePartiallyPressed()'
2266
+ } : {
2267
+ pass: n && r === "mixed",
2268
+ message: () => {
2269
+ const o = this.isNot ? "not to" : "to", f = this.utils.matcherHint(
2270
+ `${this.isNot ? ".not" : ""}.toBePartiallyPressed`,
2271
+ "element",
2272
+ ""
2273
+ );
2274
+ return S(
2275
+ this,
2276
+ f,
2277
+ `Expected element ${o} have`,
2278
+ 'aria-pressed="mixed"',
2279
+ "Received",
2280
+ `aria-pressed="${r}"`
2281
+ );
2282
+ }
2283
+ };
2284
+ }
2285
+ const Ir = 1, Rt = 2, $t = 4, Hr = 8, Tr = 16, Dr = 32, Me = {
2286
+ [Ir]: "Node.DOCUMENT_POSITION_DISCONNECTED",
2287
+ [Rt]: "Node.DOCUMENT_POSITION_PRECEDING",
2288
+ [$t]: "Node.DOCUMENT_POSITION_FOLLOWING",
2289
+ [Hr]: "Node.DOCUMENT_POSITION_CONTAINS",
2290
+ [Tr]: "Node.DOCUMENT_POSITION_CONTAINED_BY",
2291
+ [Dr]: "Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC"
2292
+ };
2293
+ function Br(e) {
2294
+ return e in Me ? `${Me[e]} (${e})` : `Unknown document position (${e})`;
2295
+ }
2296
+ function Ct(e, t) {
2297
+ return function(n, r) {
2298
+ m(n, fe, this), m(r, fe, this);
2299
+ const i = n.compareDocumentPosition(r);
2300
+ return {
2301
+ pass: i === t,
2302
+ message: () => [
2303
+ this.utils.matcherHint(
2304
+ `${this.isNot ? ".not" : ""}.${e}`,
2305
+ "element",
2306
+ "secondElement"
2307
+ ),
2308
+ "",
2309
+ `Received: ${Br(i)}`
2310
+ ].join(`
2311
+ `)
2312
+ };
2313
+ };
2314
+ }
2315
+ function fe(e, t) {
2316
+ return Ct("toAppearBefore", $t).apply(
2317
+ this,
2318
+ [e, t]
2319
+ );
2320
+ }
2321
+ function Pr(e, t) {
2322
+ return Ct("toAppearAfter", Rt).apply(
2323
+ this,
2324
+ [e, t]
2325
+ );
2326
+ }
2327
+ var kr = /* @__PURE__ */ Object.freeze({
2328
+ __proto__: null,
2329
+ toAppearAfter: Pr,
2330
+ toAppearBefore: fe,
2331
+ toBeChecked: vt,
2332
+ toBeDisabled: lt,
2333
+ toBeEmpty: Ke,
2334
+ toBeEmptyDOMElement: Xe,
2335
+ toBeEnabled: ft,
2336
+ toBeInTheDOM: se,
2337
+ toBeInTheDocument: Ye,
2338
+ toBeInvalid: ht,
2339
+ toBePartiallyChecked: Et,
2340
+ toBePartiallyPressed: At,
2341
+ toBePressed: St,
2342
+ toBeRequired: dt,
2343
+ toBeValid: gt,
2344
+ toBeVisible: st,
2345
+ toContainElement: oe,
2346
+ toContainHTML: Qe,
2347
+ toHaveAccessibleDescription: ae,
2348
+ toHaveAccessibleErrorMessage: Ze,
2349
+ toHaveAccessibleName: ce,
2350
+ toHaveAttribute: et,
2351
+ toHaveClass: tt,
2352
+ toHaveDescription: wt,
2353
+ toHaveDisplayValue: bt,
2354
+ toHaveErrorMessage: xt,
2355
+ toHaveFocus: nt,
2356
+ toHaveFormValues: rt,
2357
+ toHaveRole: ue,
2358
+ toHaveSelection: Nt,
2359
+ toHaveStyle: le,
2360
+ toHaveTextContent: Je,
2361
+ toHaveValue: mt
2362
+ });
2363
+ expect.extend(kr);
2364
+ //# sourceMappingURL=index-DYPpFe2R.js.map