@hortiview/shared-components 0.0.6403 → 0.0.6829

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.
@@ -1,2983 +1,26 @@
1
- import { jsx as A } from "react/jsx-runtime";
2
- import { g as R, r as x, s as p, f as Ge, w as We } from "../../../react.esm-BBemCHUU.js";
3
- import { FormSelect as ue } from "./FormSelect.js";
4
- import { SelectTooltipText as ae } from "./SelectTooltipText.js";
5
- import { v as I, d as on, t as D, g as d } from "../../../vi.JYQecGiw-BbUbJcT8.js";
6
- function f(e, t, n) {
7
- return e.namespaceURI && e.namespaceURI !== "http://www.w3.org/1999/xhtml" || (t = Array.isArray(t) ? t : [
8
- t
9
- ], !t.includes(e.tagName.toLowerCase())) ? !1 : n ? Object.entries(n).every(([o, i]) => e[o] === i) : !0;
10
- }
11
- var Ue;
12
- (function(e) {
13
- e.button = "button", e.color = "color", e.file = "file", e.image = "image", e.reset = "reset", e.submit = "submit", e.checkbox = "checkbox", e.radio = "radio";
14
- })(Ue || (Ue = {}));
15
- function yt(e) {
16
- return f(e, "button") || f(e, "input") && e.type in Ue;
17
- }
18
- function k(e) {
19
- var t;
20
- if (rn(e) && e.defaultView)
21
- return e.defaultView;
22
- if (!((t = e.ownerDocument) === null || t === void 0) && t.defaultView)
23
- return e.ownerDocument.defaultView;
24
- throw new Error(`Could not determine window of node. Node was ${sn(e)}`);
25
- }
26
- function rn(e) {
27
- return e.nodeType === 9;
28
- }
29
- function sn(e) {
30
- return typeof e == "function" ? `function ${e.name}` : e === null ? "null" : String(e);
31
- }
32
- function bt(e, t) {
33
- return new Promise((n, o) => {
34
- const i = new t();
35
- i.onerror = o, i.onabort = o, i.onload = () => {
36
- n(String(i.result));
37
- }, i.readAsText(e);
38
- });
39
- }
40
- function Fe(e, t) {
41
- const n = {
42
- ...t,
43
- length: t.length,
44
- item: (o) => n[o],
45
- [Symbol.iterator]: function* () {
46
- for (let i = 0; i < n.length; i++)
47
- yield n[i];
48
- }
49
- };
50
- return n.constructor = e.FileList, e.FileList && Object.setPrototypeOf(n, e.FileList.prototype), Object.freeze(n), n;
51
- }
52
- function U(e, t, n) {
53
- return t in e ? Object.defineProperty(e, t, {
54
- value: n,
55
- enumerable: !0,
56
- configurable: !0,
57
- writable: !0
58
- }) : e[t] = n, e;
59
- }
60
- class mt {
61
- getAsFile() {
62
- return this.file;
63
- }
64
- getAsString(t) {
65
- typeof this.data == "string" && t(this.data);
66
- }
67
- /* istanbul ignore next */
68
- webkitGetAsEntry() {
69
- throw new Error("not implemented");
70
- }
71
- constructor(t, n) {
72
- U(this, "kind", void 0), U(this, "type", void 0), U(this, "file", null), U(this, "data", void 0), typeof t == "string" ? (this.kind = "string", this.type = String(n), this.data = t) : (this.kind = "file", this.type = t.type, this.file = t);
73
- }
74
- }
75
- class un extends Array {
76
- add(...t) {
77
- const n = new mt(t[0], t[1]);
78
- return this.push(n), n;
79
- }
80
- clear() {
81
- this.splice(0, this.length);
82
- }
83
- remove(t) {
84
- this.splice(t, 1);
85
- }
86
- }
87
- function ce(e, t) {
88
- const [n, o] = e.split("/"), i = !o || o === "*";
89
- return (r) => t ? r.type === (i ? n : e) : i ? r.type.startsWith(`${n}/`) : r.type === n;
90
- }
91
- function an(e) {
92
- return new class {
93
- getData(n) {
94
- var o;
95
- const i = (o = this.items.find(ce(n, !0))) !== null && o !== void 0 ? o : this.items.find(ce(n, !1));
96
- let r = "";
97
- return i?.getAsString((s) => {
98
- r = s;
99
- }), r;
100
- }
101
- setData(n, o) {
102
- const i = this.items.findIndex(ce(n, !0)), r = new mt(o, n);
103
- i >= 0 ? this.items.splice(i, 1, r) : this.items.push(r);
104
- }
105
- clearData(n) {
106
- if (n) {
107
- const o = this.items.findIndex(ce(n, !0));
108
- o >= 0 && this.items.remove(o);
109
- } else
110
- this.items.clear();
111
- }
112
- get types() {
113
- const n = [];
114
- return this.files.length && n.push("Files"), this.items.forEach((o) => n.push(o.type)), Object.freeze(n), n;
115
- }
116
- /* istanbul ignore next */
117
- setDragImage() {
118
- }
119
- constructor() {
120
- U(this, "dropEffect", "none"), U(this, "effectAllowed", "uninitialized"), U(this, "items", new un()), U(this, "files", Fe(e, []));
121
- }
122
- }();
123
- }
124
- function Ke(e, t = []) {
125
- const n = typeof e.DataTransfer > "u" ? an(e) : (
126
- /* istanbul ignore next */
127
- new e.DataTransfer()
128
- );
129
- return Object.defineProperty(n, "files", {
130
- get: () => Fe(e, t)
131
- }), n;
132
- }
133
- function cn(e, t) {
134
- if (t.kind === "file")
135
- return t.getAsFile();
136
- let n = "";
137
- return t.getAsString((o) => {
138
- n = o;
139
- }), new e.Blob([
140
- n
141
- ], {
142
- type: t.type
143
- });
144
- }
145
- function Et(e, t, n) {
146
- return t in e ? Object.defineProperty(e, t, {
147
- value: n,
148
- enumerable: !0,
149
- configurable: !0,
150
- writable: !0
151
- }) : e[t] = n, e;
152
- }
153
- function wt(e, ...t) {
154
- const n = Object.fromEntries(t.map((o) => [
155
- typeof o == "string" ? "text/plain" : o.type,
156
- Promise.resolve(o)
157
- ]));
158
- return typeof e.ClipboardItem < "u" ? new e.ClipboardItem(n) : new class {
159
- get types() {
160
- return Array.from(Object.keys(this.data));
161
- }
162
- async getType(i) {
163
- const r = await this.data[i];
164
- if (!r)
165
- throw new Error(`${i} is not one of the available MIME types on this item.`);
166
- return r instanceof e.Blob ? r : new e.Blob([
167
- r
168
- ], {
169
- type: i
170
- });
171
- }
172
- constructor(i) {
173
- Et(this, "data", void 0), this.data = i;
174
- }
175
- }(n);
176
- }
177
- const G = Symbol("Manage ClipboardSub");
178
- function ze(e, t) {
179
- return Object.assign(new class extends e.EventTarget {
180
- async read() {
181
- return Array.from(this.items);
182
- }
183
- async readText() {
184
- let o = "";
185
- for (const i of this.items) {
186
- const r = i.types.includes("text/plain") ? "text/plain" : i.types.find((s) => s.startsWith("text/"));
187
- r && (o += await i.getType(r).then((s) => bt(s, e.FileReader)));
188
- }
189
- return o;
190
- }
191
- async write(o) {
192
- this.items = o;
193
- }
194
- async writeText(o) {
195
- this.items = [
196
- wt(e, o)
197
- ];
198
- }
199
- constructor(...o) {
200
- super(...o), Et(this, "items", []);
201
- }
202
- }(), {
203
- [G]: t
204
- });
205
- }
206
- function Ve(e) {
207
- return !!e?.[G];
208
- }
209
- function ln(e) {
210
- if (Ve(e.navigator.clipboard))
211
- return e.navigator.clipboard[G];
212
- const t = Object.getOwnPropertyDescriptor(e.navigator, "clipboard");
213
- let n;
214
- const o = {
215
- resetClipboardStub: () => {
216
- n = ze(e, o);
217
- },
218
- detachClipboardStub: () => {
219
- t ? Object.defineProperty(e.navigator, "clipboard", t) : Object.defineProperty(e.navigator, "clipboard", {
220
- value: void 0,
221
- configurable: !0
222
- });
223
- }
224
- };
225
- return n = ze(e, o), Object.defineProperty(e.navigator, "clipboard", {
226
- get: () => n,
227
- configurable: !0
228
- }), n[G];
229
- }
230
- function dn(e) {
231
- Ve(e.navigator.clipboard) && e.navigator.clipboard[G].resetClipboardStub();
232
- }
233
- function fn(e) {
234
- Ve(e.navigator.clipboard) && e.navigator.clipboard[G].detachClipboardStub();
235
- }
236
- async function pn(e) {
237
- const t = e.defaultView, n = t?.navigator.clipboard, o = n && await n.read();
238
- if (!o)
239
- throw new Error("The Clipboard API is unavailable.");
240
- const i = Ke(t);
241
- for (const r of o)
242
- for (const s of r.types)
243
- i.setData(s, await r.getType(s).then((u) => bt(u, t.FileReader)));
244
- return i;
245
- }
246
- async function Tt(e, t) {
247
- const n = k(e), o = n.navigator.clipboard, i = [];
248
- for (let s = 0; s < t.items.length; s++) {
249
- const u = t.items[s], a = cn(n, u);
250
- i.push(wt(n, a));
251
- }
252
- if (!(o && await o.write(i).then(
253
- () => !0,
254
- // Can happen with other implementations that e.g. require permissions
255
- /* istanbul ignore next */
256
- () => !1
257
- )))
258
- throw new Error("The Clipboard API is unavailable.");
259
- }
260
- const ge = globalThis;
261
- typeof ge.afterEach == "function" && ge.afterEach(() => dn(globalThis.window));
262
- typeof ge.afterAll == "function" && ge.afterAll(() => fn(globalThis.window));
263
- function $(e) {
264
- return e.hasAttribute("contenteditable") && (e.getAttribute("contenteditable") == "true" || e.getAttribute("contenteditable") == "");
265
- }
266
- function oe(e) {
267
- const t = hn(e);
268
- return t && (t.closest('[contenteditable=""]') || t.closest('[contenteditable="true"]'));
269
- }
270
- function hn(e) {
271
- return e.nodeType === 1 ? e : e.parentElement;
272
- }
273
- function W(e) {
274
- return It(e) && !e.readOnly || $(e);
275
- }
276
- var Ne;
277
- (function(e) {
278
- e.text = "text", e.date = "date", e["datetime-local"] = "datetime-local", e.email = "email", e.month = "month", e.number = "number", e.password = "password", e.search = "search", e.tel = "tel", e.time = "time", e.url = "url", e.week = "week";
279
- })(Ne || (Ne = {}));
280
- function It(e) {
281
- return f(e, "textarea") || f(e, "input") && e.type in Ne;
282
- }
283
- var Me;
284
- (function(e) {
285
- e.email = "email", e.password = "password", e.search = "search", e.telephone = "telephone", e.text = "text", e.url = "url";
286
- })(Me || (Me = {}));
287
- function vn(e) {
288
- var t;
289
- const n = (t = e.getAttribute("maxlength")) !== null && t !== void 0 ? t : "";
290
- return /^\d+$/.test(n) && Number(n) >= 0 ? Number(n) : void 0;
291
- }
292
- function gn(e) {
293
- return f(e, "textarea") || f(e, "input") && e.type in Me;
294
- }
295
- const kt = [
296
- "input:not([type=hidden]):not([disabled])",
297
- "button:not([disabled])",
298
- "select:not([disabled])",
299
- "textarea:not([disabled])",
300
- '[contenteditable=""]',
301
- '[contenteditable="true"]',
302
- "a[href]",
303
- "[tabindex]:not([disabled])"
304
- ].join(", ");
305
- function Re(e) {
306
- return e.matches(kt);
307
- }
308
- var ye;
309
- (function(e) {
310
- e["{"] = "}", e["["] = "]";
311
- })(ye || (ye = {}));
312
- function St(e, t) {
313
- let n = 0;
314
- const o = e[n] in ye ? e[n] : "";
315
- n += o.length;
316
- const r = new RegExp(`^\\${o}{2}`).test(e) ? "" : o;
317
- return {
318
- type: r,
319
- ...r === "" ? yn(e, n, t) : bn(e, n, r, t)
320
- };
321
- }
322
- function yn(e, t, n) {
323
- const o = e[t];
324
- return Ct(o, e, t, n), t += o.length, {
325
- consumedLength: t,
326
- descriptor: o,
327
- releasePrevious: !1,
328
- releaseSelf: !0,
329
- repeat: 1
330
- };
331
- }
332
- function bn(e, t, n, o) {
333
- var i, r;
334
- const s = e[t] === "/" ? "/" : "";
335
- t += s.length;
336
- const u = n === "{" && e[t] === "\\";
337
- t += Number(u);
338
- const a = u ? e[t] : (i = e.slice(t).match(n === "{" ? /^\w+|^[^}>/]/ : /^\w+/)) === null || i === void 0 ? void 0 : i[0];
339
- Ct(a, e, t, o), t += a.length;
340
- var c;
341
- const l = (c = (r = e.slice(t).match(/^>\d+/)) === null || r === void 0 ? void 0 : r[0]) !== null && c !== void 0 ? c : "";
342
- t += l.length;
343
- const h = e[t] === "/" || !l && e[t] === ">" ? e[t] : "";
344
- t += h.length;
345
- const v = ye[n], y = e[t] === v ? v : "";
346
- if (!y)
347
- throw new Error(_t([
348
- !l && "repeat modifier",
349
- !h && "release modifier",
350
- `"${v}"`
351
- ].filter(Boolean).join(" or "), e[t], e, o));
352
- return t += y.length, {
353
- consumedLength: t,
354
- descriptor: a,
355
- releasePrevious: !!s,
356
- repeat: l ? Math.max(Number(l.substr(1)), 1) : 1,
357
- releaseSelf: mn(h, l)
358
- };
359
- }
360
- function Ct(e, t, n, o) {
361
- if (!e)
362
- throw new Error(_t("key descriptor", t[n], t, o));
363
- }
364
- function mn(e, t) {
365
- if (e)
366
- return e === "/";
367
- if (t)
368
- return !1;
369
- }
370
- function _t(e, t, n, o) {
371
- return `Expected ${e} but found "${t ?? ""}" in "${n}"
372
- See ${o === "pointer" ? "https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen" : "https://testing-library.com/docs/user-event/keyboard"}
373
- for more information about how userEvent parses your input.`;
374
- }
375
- function En(e) {
376
- return new e.constructor(e.type, e);
377
- }
378
- var m;
379
- (function(e) {
380
- e[e.Trigger = 2] = "Trigger", e[e.Call = 1] = "Call";
381
- })(m || (m = {}));
382
- function Y(e, t) {
383
- e.levelRefs[t] = {};
384
- }
385
- function le(e, t) {
386
- return e.levelRefs[t];
387
- }
388
- var H;
389
- (function(e) {
390
- e[e.EachTrigger = 4] = "EachTrigger", e[e.EachApiCall = 2] = "EachApiCall", e[e.EachTarget = 1] = "EachTarget", e[e.Never = 0] = "Never";
391
- })(H || (H = {}));
392
- function P(e) {
393
- for (let n = e; n; n = n.parentElement)
394
- if (f(n, [
395
- "button",
396
- "input",
397
- "select",
398
- "textarea",
399
- "optgroup",
400
- "option"
401
- ])) {
402
- if (n.hasAttribute("disabled"))
403
- return !0;
404
- } else if (f(n, "fieldset")) {
405
- var t;
406
- if (n.hasAttribute("disabled") && !(!((t = n.querySelector(":scope > legend")) === null || t === void 0) && t.contains(e)))
407
- return !0;
408
- } else if (n.tagName.includes("-") && n.constructor.formAssociated && n.hasAttribute("disabled"))
409
- return !0;
410
- return !1;
411
- }
412
- function we(e) {
413
- const t = e.activeElement;
414
- return t?.shadowRoot ? we(t.shadowRoot) : P(t) ? e.ownerDocument ? (
415
- /* istanbul ignore next */
416
- e.ownerDocument.body
417
- ) : e.body : t;
418
- }
419
- function xe(e) {
420
- var t;
421
- return (t = we(e)) !== null && t !== void 0 ? t : (
422
- /* istanbul ignore next */
423
- e.body
424
- );
425
- }
426
- function wn(e, t) {
427
- let n = e;
428
- do {
429
- if (t(n))
430
- return n;
431
- n = n.parentElement;
432
- } while (n && n !== e.ownerDocument.body);
433
- }
434
- function S(e) {
435
- return Pt(e) && It(e);
436
- }
437
- function Tn(e) {
438
- return Pt(e) && yt(e);
439
- }
440
- function Pt(e) {
441
- return e.nodeType === 1;
442
- }
443
- function In(e) {
444
- const t = e.ownerDocument.getSelection();
445
- if (t?.focusNode && S(e)) {
446
- const o = oe(t.focusNode);
447
- if (o) {
448
- if (!t.isCollapsed) {
449
- var n;
450
- const i = ((n = o.firstChild) === null || n === void 0 ? void 0 : n.nodeType) === 3 ? o.firstChild : o;
451
- t.setBaseAndExtent(i, 0, i, 0);
452
- }
453
- } else
454
- t.setBaseAndExtent(e, 0, e, 0);
455
- }
456
- }
457
- function z(e, t) {
458
- return R().eventWrapper(e);
459
- }
460
- function N(e) {
461
- const t = wn(e, Re), n = we(e.ownerDocument);
462
- (t ?? e.ownerDocument.body) !== n && (z(t ? () => t.focus() : () => n?.blur()), In(t ?? e.ownerDocument.body));
463
- }
464
- function kn(e) {
465
- !Re(e) || !(we(e.ownerDocument) === e) || z(() => e.blur());
466
- }
467
- const M = {};
468
- M.click = (e, t, n) => {
469
- const o = t.closest("button,input,label,select,textarea"), i = o && f(o, "label") && o.control;
470
- if (i)
471
- return () => {
472
- Re(i) && N(i), n.dispatchEvent(i, En(e));
473
- };
474
- if (f(t, "input", {
475
- type: "file"
476
- }))
477
- return () => {
478
- kn(t), t.dispatchEvent(new (k(t)).Event("fileDialog")), N(t);
479
- };
480
- };
481
- const X = Symbol("Displayed value in UI"), _ = Symbol("Displayed selection in UI"), be = Symbol("Initial value to compare on blur");
482
- function Sn(e) {
483
- return typeof e == "object" && X in e;
484
- }
485
- function Cn(e) {
486
- return !!e && typeof e == "object" && _ in e;
487
- }
488
- function _n(e, t) {
489
- e[be] === void 0 && (e[be] = e.value), e[X] = t, e.value = Object.assign(new String(t), {
490
- [X]: !0
491
- });
492
- }
493
- function C(e) {
494
- return e[X] === void 0 ? e.value : String(e[X]);
495
- }
496
- function je(e) {
497
- e[X] = void 0;
498
- }
499
- function At(e) {
500
- e[be] = void 0;
501
- }
502
- function Pn(e) {
503
- return e[be];
504
- }
505
- function An(e, t) {
506
- e[_] = t;
507
- }
508
- function Z(e, { focusOffset: t, anchorOffset: n = t }, o = "replace") {
509
- const i = C(e).length, r = (h) => Math.max(0, Math.min(i, h)), s = o === "replace" || e[_] === void 0 ? r(n) : e[_].anchorOffset, u = r(t), a = Math.min(s, u), c = Math.max(s, u);
510
- if (e[_] = {
511
- anchorOffset: s,
512
- focusOffset: u
513
- }, e.selectionStart === a && e.selectionEnd === c)
514
- return;
515
- const l = Object.assign(new Number(a), {
516
- [_]: !0
517
- });
518
- try {
519
- e.setSelectionRange(l, c);
520
- } catch {
521
- }
522
- }
523
- function ie(e) {
524
- var t, n, o;
525
- const i = (o = e[_]) !== null && o !== void 0 ? o : {
526
- anchorOffset: (t = e.selectionStart) !== null && t !== void 0 ? t : 0,
527
- focusOffset: (n = e.selectionEnd) !== null && n !== void 0 ? n : 0
528
- };
529
- return {
530
- ...i,
531
- startOffset: Math.min(i.anchorOffset, i.focusOffset),
532
- endOffset: Math.max(i.anchorOffset, i.focusOffset)
533
- };
534
- }
535
- function xn(e) {
536
- return !!e[_];
537
- }
538
- function he(e) {
539
- e[_] = void 0;
540
- }
541
- const me = globalThis.parseInt;
542
- function Dn(e) {
543
- const t = e.replace(/\D/g, "");
544
- if (t.length < 2)
545
- return e;
546
- const n = me(t[0], 10), o = me(t[1], 10);
547
- if (n >= 3 || n === 2 && o >= 4) {
548
- let i;
549
- return n >= 3 ? i = 1 : i = 2, Xe(t, i);
550
- }
551
- return e.length === 2 ? e : Xe(t, 2);
552
- }
553
- function Xe(e, t) {
554
- const n = e.slice(0, t), o = Math.min(me(n, 10), 23), i = e.slice(t), r = me(i, 10), s = Math.min(r, 59);
555
- return `${o.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
556
- }
557
- function xt(e, t) {
558
- const n = e.cloneNode();
559
- return n.value = t, n.value === t;
560
- }
561
- function Dt(e, t, n, o) {
562
- if (ve(e) && t + n >= 0 && t + n <= e.nodeValue.length)
563
- return {
564
- node: e,
565
- offset: t + n
566
- };
567
- const i = Je(e, t, n);
568
- if (i) {
569
- if (ve(i))
570
- return {
571
- node: i,
572
- offset: n > 0 ? Math.min(1, i.nodeValue.length) : Math.max(i.nodeValue.length - 1, 0)
573
- };
574
- if (f(i, "br")) {
575
- const r = Je(i, void 0, n);
576
- return r ? ve(r) ? {
577
- node: r,
578
- offset: n > 0 ? 0 : r.nodeValue.length
579
- } : n < 0 && f(r, "br") ? {
580
- node: i.parentNode,
581
- offset: de(i)
582
- } : {
583
- node: r.parentNode,
584
- offset: de(r) + (n > 0 ? 0 : 1)
585
- } : n < 0 && o === "deleteContentBackward" ? {
586
- node: i.parentNode,
587
- offset: de(i)
588
- } : void 0;
589
- } else
590
- return {
591
- node: i.parentNode,
592
- offset: de(i) + (n > 0 ? 1 : 0)
593
- };
594
- }
595
- }
596
- function Je(e, t, n) {
597
- const o = Number(t) + (n < 0 ? -1 : 0);
598
- return t !== void 0 && He(e) && o >= 0 && o < e.children.length && (e = e.children[o]), Bn(e, n === 1 ? "next" : "previous", On);
599
- }
600
- function On(e) {
601
- if (ve(e))
602
- return !0;
603
- if (He(e)) {
604
- if (f(e, [
605
- "input",
606
- "textarea"
607
- ]))
608
- return e.type !== "hidden";
609
- if (f(e, "br"))
610
- return !0;
611
- }
612
- return !1;
613
- }
614
- function de(e) {
615
- let t = 0;
616
- for (; e.previousSibling; )
617
- t++, e = e.previousSibling;
618
- return t;
619
- }
620
- function He(e) {
621
- return e.nodeType === 1;
622
- }
623
- function ve(e) {
624
- return e.nodeType === 3;
625
- }
626
- function Bn(e, t, n) {
627
- for (; ; ) {
628
- var o;
629
- const i = e[`${t}Sibling`];
630
- if (i) {
631
- if (e = Un(i, t === "next" ? "first" : "last"), n(e))
632
- return e;
633
- } else if (e.parentNode && (!He(e.parentNode) || !$(e.parentNode) && e.parentNode !== ((o = e.ownerDocument) === null || o === void 0 ? void 0 : o.body)))
634
- e = e.parentNode;
635
- else
636
- break;
637
- }
638
- }
639
- function Un(e, t) {
640
- for (; e.hasChildNodes(); )
641
- e = e[`${t}Child`];
642
- return e;
643
- }
644
- const re = Symbol("Track programmatic changes for React workaround");
645
- function Nn(e) {
646
- return Object.getOwnPropertyNames(e).some((t) => t.startsWith("__react")) && k(e).REACT_VERSION === 17;
647
- }
648
- function Mn(e) {
649
- Nn(e) && (e[re] = {
650
- previousValue: String(e.value),
651
- tracked: []
652
- });
653
- }
654
- function Ln(e, t) {
655
- var n, o;
656
- (o = e[re]) === null || o === void 0 || (n = o.tracked) === null || n === void 0 || n.push(t), e[re] || (je(e), Z(e, {
657
- focusOffset: t.length
658
- }));
659
- }
660
- function $n(e, t) {
661
- var n;
662
- const o = e[re];
663
- if (e[re] = void 0, !(!(o == null || (n = o.tracked) === null || n === void 0) && n.length))
664
- return;
665
- const i = o.tracked.length === 2 && o.tracked[0] === o.previousValue && o.tracked[1] === e.value;
666
- i || je(e), xn(e) && Z(e, {
667
- focusOffset: i ? t : e.value.length
668
- });
669
- }
670
- function Ot(e) {
671
- const t = Fn(e);
672
- if (t && S(t))
673
- return {
674
- type: "input",
675
- selection: ie(t)
676
- };
677
- const n = t?.ownerDocument.getSelection();
678
- return {
679
- type: oe(e) && n?.anchorNode && oe(n.anchorNode) ? "contenteditable" : "default",
680
- selection: n
681
- };
682
- }
683
- function Fn(e) {
684
- return e.nodeType === 1 ? e : e.parentElement;
685
- }
686
- function Kn(e) {
687
- const t = Ot(e);
688
- if (t.type === "input")
689
- return t.selection;
690
- if (t.type === "contenteditable") {
691
- var n;
692
- return (n = t.selection) === null || n === void 0 ? void 0 : n.getRangeAt(0);
693
- }
694
- }
695
- function F({ focusNode: e, focusOffset: t, anchorNode: n = e, anchorOffset: o = t }) {
696
- var i, r;
697
- if (Ot(e).type === "input")
698
- return Z(e, {
699
- anchorOffset: o,
700
- focusOffset: t
701
- });
702
- (r = n.ownerDocument) === null || r === void 0 || (i = r.getSelection()) === null || i === void 0 || i.setBaseAndExtent(n, o, e, t);
703
- }
704
- function Bt(e) {
705
- return f(e, "input") && [
706
- "date",
707
- "time"
708
- ].includes(e.type);
709
- }
710
- function J(e, t, n, o = "insertText") {
711
- const i = Kn(t);
712
- i && (!Bt(t) && !e.dispatchUIEvent(t, "beforeinput", {
713
- inputType: o,
714
- data: n
715
- }) || ("startContainer" in i ? Vn(e, t, i, n, o) : Rn(e, t, i, n, o)));
716
- }
717
- function Vn(e, t, n, o, i) {
718
- let r = !1;
719
- if (!n.collapsed)
720
- r = !0, n.deleteContents();
721
- else if ([
722
- "deleteContentBackward",
723
- "deleteContentForward"
724
- ].includes(i)) {
725
- const s = Dt(n.startContainer, n.startOffset, i === "deleteContentBackward" ? -1 : 1, i);
726
- if (s) {
727
- r = !0;
728
- const u = n.cloneRange();
729
- u.comparePoint(s.node, s.offset) < 0 ? u.setStart(s.node, s.offset) : u.setEnd(s.node, s.offset), u.deleteContents();
730
- }
731
- }
732
- if (o)
733
- if (n.endContainer.nodeType === 3) {
734
- const s = n.endOffset;
735
- n.endContainer.insertData(s, o), n.setStart(n.endContainer, s + o.length), n.setEnd(n.endContainer, s + o.length);
736
- } else {
737
- const s = t.ownerDocument.createTextNode(o);
738
- n.insertNode(s), n.setStart(s, o.length), n.setEnd(s, o.length);
739
- }
740
- (r || o) && e.dispatchUIEvent(t, "input", {
741
- inputType: i
742
- });
743
- }
744
- function Rn(e, t, n, o, i) {
745
- let r = o;
746
- if (gn(t)) {
747
- const c = vn(t);
748
- if (c !== void 0 && o.length > 0) {
749
- const l = c - t.value.length;
750
- if (l > 0)
751
- r = o.substring(0, l);
752
- else
753
- return;
754
- }
755
- }
756
- const { newValue: s, newOffset: u, oldValue: a } = jn(r, t, n, i);
757
- s === a && u === n.startOffset && u === n.endOffset || f(t, "input", {
758
- type: "number"
759
- }) && !Hn(s) || (_n(t, s), F({
760
- focusNode: t,
761
- anchorOffset: u,
762
- focusOffset: u
763
- }), Bt(t) ? xt(t, s) && (Qe(e, t, u, {}), e.dispatchUIEvent(t, "change"), At(t)) : Qe(e, t, u, {
764
- data: o,
765
- inputType: i
766
- }));
767
- }
768
- function jn(e, t, { startOffset: n, endOffset: o }, i) {
769
- const r = C(t), s = Math.max(0, n === o && i === "deleteContentBackward" ? n - 1 : n), u = r.substring(0, s), a = Math.min(r.length, n === o && i === "deleteContentForward" ? n + 1 : o), c = r.substring(a, r.length);
770
- let l = `${u}${e}${c}`, h = s + e.length;
771
- if (f(t, "input", {
772
- type: "time"
773
- })) {
774
- const v = Dn(l);
775
- v !== "" && xt(t, v) && (l = v, h = v.length);
776
- }
777
- return {
778
- oldValue: r,
779
- newValue: l,
780
- newOffset: h
781
- };
782
- }
783
- function Qe(e, t, n, o) {
784
- e.dispatchUIEvent(t, "input", o), $n(t, n);
785
- }
786
- function Hn(e) {
787
- var t, n;
788
- const o = e.split("e", 2);
789
- return !(/[^\d.\-e]/.test(e) || Number((t = e.match(/-/g)) === null || t === void 0 ? void 0 : t.length) > 2 || Number((n = e.match(/\./g)) === null || n === void 0 ? void 0 : n.length) > 1 || o[1] && !/^-?\d*$/.test(o[1]));
790
- }
791
- M.cut = (e, t, n) => () => {
792
- W(t) && J(n, t, "", "deleteByCut");
793
- };
794
- function qn(e) {
795
- return e ? $(e) ? e.textContent : C(e) : null;
796
- }
797
- function Gn(e) {
798
- const t = k(e);
799
- for (let n = e; n?.ownerDocument; n = n.parentElement) {
800
- const { display: o, visibility: i } = t.getComputedStyle(n);
801
- if (o === "none" || i === "hidden")
802
- return !1;
803
- }
804
- return !0;
805
- }
806
- function Wn(e, t) {
807
- const n = e.ownerDocument, o = n.querySelectorAll(kt), i = Array.from(o).filter((a) => a === e || !(Number(a.getAttribute("tabindex")) < 0 || P(a)));
808
- Number(e.getAttribute("tabindex")) >= 0 && i.sort((a, c) => {
809
- const l = Number(a.getAttribute("tabindex")), h = Number(c.getAttribute("tabindex"));
810
- return l === h ? 0 : l === 0 ? 1 : h === 0 ? -1 : l - h;
811
- });
812
- const r = {};
813
- let s = [
814
- n.body
815
- ];
816
- const u = f(e, "input", {
817
- type: "radio"
818
- }) ? e.name : void 0;
819
- i.forEach((a) => {
820
- const c = a;
821
- if (f(c, "input", {
822
- type: "radio"
823
- }) && c.name) {
824
- if (c === e) {
825
- s.push(c);
826
- return;
827
- } else if (c.name === u)
828
- return;
829
- if (c.checked) {
830
- s = s.filter((l) => !f(l, "input", {
831
- type: "radio",
832
- name: c.name
833
- })), s.push(c), r[c.name] = c;
834
- return;
835
- }
836
- if (typeof r[c.name] < "u")
837
- return;
838
- }
839
- s.push(c);
840
- });
841
- for (let a = s.findIndex((c) => c === e); ; )
842
- if (a += t ? -1 : 1, a === s.length ? a = 0 : a === -1 && (a = s.length - 1), s[a] === e || s[a] === n.body || Gn(s[a]))
843
- return s[a];
844
- }
845
- function Ze(e, t) {
846
- if (S(e)) {
847
- const n = ie(e);
848
- F({
849
- focusNode: e,
850
- focusOffset: n.startOffset === n.endOffset ? n.focusOffset + t : t < 0 ? n.startOffset : n.endOffset
851
- });
852
- } else {
853
- const n = e.ownerDocument.getSelection();
854
- if (!n?.focusNode)
855
- return;
856
- if (n.isCollapsed) {
857
- const o = Dt(n.focusNode, n.focusOffset, t);
858
- o && F({
859
- focusNode: o.node,
860
- focusOffset: o.offset
861
- });
862
- } else
863
- n[t < 0 ? "collapseToStart" : "collapseToEnd"]();
864
- }
865
- }
866
- function Ut(e) {
867
- if (S(e))
868
- return F({
869
- focusNode: e,
870
- anchorOffset: 0,
871
- focusOffset: C(e).length
872
- });
873
- var t;
874
- const n = (t = oe(e)) !== null && t !== void 0 ? t : e.ownerDocument.body;
875
- F({
876
- focusNode: n,
877
- anchorOffset: 0,
878
- focusOffset: n.childNodes.length
879
- });
880
- }
881
- function zn(e) {
882
- if (S(e))
883
- return ie(e).startOffset === 0 && ie(e).endOffset === C(e).length;
884
- var t;
885
- const n = (t = oe(e)) !== null && t !== void 0 ? t : e.ownerDocument.body, o = e.ownerDocument.getSelection();
886
- return o?.anchorNode === n && o.focusNode === n && o.anchorOffset === 0 && o.focusOffset === n.childNodes.length;
887
- }
888
- function ee(e, t, n) {
889
- var o;
890
- if (S(e))
891
- return F({
892
- focusNode: e,
893
- anchorOffset: t,
894
- focusOffset: n
895
- });
896
- if ($(e) && ((o = e.firstChild) === null || o === void 0 ? void 0 : o.nodeType) === 3)
897
- return F({
898
- focusNode: e.firstChild,
899
- anchorOffset: t,
900
- focusOffset: n
901
- });
902
- throw new Error("Not implemented. The result of this interaction is unreliable.");
903
- }
904
- function fe(e, t, n) {
905
- const o = k(t), i = Array.from(t.ownerDocument.querySelectorAll(t.name ? `input[type="radio"][name="${o.CSS.escape(t.name)}"]` : 'input[type="radio"][name=""], input[type="radio"]:not([name])'));
906
- for (let r = i.findIndex((s) => s === t) + n; ; r += n) {
907
- if (i[r] || (r = n > 0 ? 0 : i.length - 1), i[r] === t)
908
- return;
909
- P(i[r]) || (N(i[r]), e.dispatchUIEvent(i[r], "click"));
910
- }
911
- }
912
- M.keydown = (e, t, n) => {
913
- var o, i;
914
- return (i = (o = Ye[e.key]) === null || o === void 0 ? void 0 : o.call(Ye, e, t, n)) !== null && i !== void 0 ? i : Xn(e, t, n);
915
- };
916
- const Ye = {
917
- ArrowDown: (e, t, n) => {
918
- if (f(t, "input", {
919
- type: "radio"
920
- }))
921
- return () => fe(n, t, -1);
922
- },
923
- ArrowLeft: (e, t, n) => f(t, "input", {
924
- type: "radio"
925
- }) ? () => fe(n, t, -1) : () => Ze(t, -1),
926
- ArrowRight: (e, t, n) => f(t, "input", {
927
- type: "radio"
928
- }) ? () => fe(n, t, 1) : () => Ze(t, 1),
929
- ArrowUp: (e, t, n) => {
930
- if (f(t, "input", {
931
- type: "radio"
932
- }))
933
- return () => fe(n, t, 1);
934
- },
935
- Backspace: (e, t, n) => {
936
- if (W(t))
937
- return () => {
938
- J(n, t, "", "deleteContentBackward");
939
- };
940
- },
941
- Delete: (e, t, n) => {
942
- if (W(t))
943
- return () => {
944
- J(n, t, "", "deleteContentForward");
945
- };
946
- },
947
- End: (e, t) => {
948
- if (f(t, [
949
- "input",
950
- "textarea"
951
- ]) || $(t))
952
- return () => {
953
- var n, o;
954
- const i = (o = (n = qn(t)) === null || n === void 0 ? void 0 : n.length) !== null && o !== void 0 ? o : (
955
- /* istanbul ignore next */
956
- 0
957
- );
958
- ee(t, i, i);
959
- };
960
- },
961
- Home: (e, t) => {
962
- if (f(t, [
963
- "input",
964
- "textarea"
965
- ]) || $(t))
966
- return () => {
967
- ee(t, 0, 0);
968
- };
969
- },
970
- PageDown: (e, t) => {
971
- if (f(t, [
972
- "input"
973
- ]))
974
- return () => {
975
- const n = C(t).length;
976
- ee(t, n, n);
977
- };
978
- },
979
- PageUp: (e, t) => {
980
- if (f(t, [
981
- "input"
982
- ]))
983
- return () => {
984
- ee(t, 0, 0);
985
- };
986
- },
987
- Tab: (e, t, n) => () => {
988
- const o = Wn(t, n.system.keyboard.modifiers.Shift);
989
- N(o), S(o) && Z(o, {
990
- anchorOffset: 0,
991
- focusOffset: o.value.length
992
- });
993
- }
994
- }, Xn = (e, t, n) => {
995
- if (e.code === "KeyA" && n.system.keyboard.modifiers.Control)
996
- return () => Ut(t);
997
- };
998
- M.keypress = (e, t, n) => {
999
- if (e.key === "Enter") {
1000
- if (f(t, "button") || f(t, "input") && Jn.includes(t.type) || f(t, "a") && t.href)
1001
- return () => {
1002
- n.dispatchUIEvent(t, "click");
1003
- };
1004
- if (f(t, "input")) {
1005
- const o = t.form, i = o?.querySelector('input[type="submit"], button:not([type]), button[type="submit"]');
1006
- return i ? () => n.dispatchUIEvent(i, "click") : o && Qn.includes(t.type) && o.querySelectorAll("input").length === 1 ? () => n.dispatchUIEvent(o, "submit") : void 0;
1007
- }
1008
- }
1009
- if (W(t)) {
1010
- const o = e.key === "Enter" ? $(t) && !n.system.keyboard.modifiers.Shift ? "insertParagraph" : "insertLineBreak" : "insertText", i = e.key === "Enter" ? `
1011
- ` : e.key;
1012
- return () => J(n, t, i, o);
1013
- }
1014
- };
1015
- const Jn = [
1016
- "button",
1017
- "color",
1018
- "file",
1019
- "image",
1020
- "reset",
1021
- "submit"
1022
- ], Qn = [
1023
- "email",
1024
- "month",
1025
- "password",
1026
- "search",
1027
- "tel",
1028
- "text",
1029
- "url",
1030
- "week"
1031
- ];
1032
- M.keyup = (e, t, n) => {
1033
- var o;
1034
- return (o = et[e.key]) === null || o === void 0 ? void 0 : o.call(et, e, t, n);
1035
- };
1036
- const et = {
1037
- " ": (e, t, n) => {
1038
- if (yt(t))
1039
- return () => n.dispatchUIEvent(t, "click");
1040
- }
1041
- };
1042
- M.paste = (e, t, n) => {
1043
- if (W(t))
1044
- return () => {
1045
- var o;
1046
- const i = (o = e.clipboardData) === null || o === void 0 ? void 0 : o.getData("text");
1047
- i && J(n, t, i, "insertFromPaste");
1048
- };
1049
- };
1050
- const Nt = {
1051
- auxclick: {
1052
- EventType: "PointerEvent",
1053
- defaultInit: {
1054
- bubbles: !0,
1055
- cancelable: !0,
1056
- composed: !0
1057
- }
1058
- },
1059
- beforeinput: {
1060
- EventType: "InputEvent",
1061
- defaultInit: {
1062
- bubbles: !0,
1063
- cancelable: !0,
1064
- composed: !0
1065
- }
1066
- },
1067
- click: {
1068
- EventType: "PointerEvent",
1069
- defaultInit: {
1070
- bubbles: !0,
1071
- cancelable: !0,
1072
- composed: !0
1073
- }
1074
- },
1075
- contextmenu: {
1076
- EventType: "PointerEvent",
1077
- defaultInit: {
1078
- bubbles: !0,
1079
- cancelable: !0,
1080
- composed: !0
1081
- }
1082
- },
1083
- copy: {
1084
- EventType: "ClipboardEvent",
1085
- defaultInit: {
1086
- bubbles: !0,
1087
- cancelable: !0,
1088
- composed: !0
1089
- }
1090
- },
1091
- change: {
1092
- EventType: "Event",
1093
- defaultInit: {
1094
- bubbles: !0,
1095
- cancelable: !1
1096
- }
1097
- },
1098
- cut: {
1099
- EventType: "ClipboardEvent",
1100
- defaultInit: {
1101
- bubbles: !0,
1102
- cancelable: !0,
1103
- composed: !0
1104
- }
1105
- },
1106
- dblclick: {
1107
- EventType: "MouseEvent",
1108
- defaultInit: {
1109
- bubbles: !0,
1110
- cancelable: !0,
1111
- composed: !0
1112
- }
1113
- },
1114
- keydown: {
1115
- EventType: "KeyboardEvent",
1116
- defaultInit: {
1117
- bubbles: !0,
1118
- cancelable: !0,
1119
- composed: !0
1120
- }
1121
- },
1122
- keypress: {
1123
- EventType: "KeyboardEvent",
1124
- defaultInit: {
1125
- bubbles: !0,
1126
- cancelable: !0,
1127
- composed: !0
1128
- }
1129
- },
1130
- keyup: {
1131
- EventType: "KeyboardEvent",
1132
- defaultInit: {
1133
- bubbles: !0,
1134
- cancelable: !0,
1135
- composed: !0
1136
- }
1137
- },
1138
- paste: {
1139
- EventType: "ClipboardEvent",
1140
- defaultInit: {
1141
- bubbles: !0,
1142
- cancelable: !0,
1143
- composed: !0
1144
- }
1145
- },
1146
- input: {
1147
- EventType: "InputEvent",
1148
- defaultInit: {
1149
- bubbles: !0,
1150
- cancelable: !1,
1151
- composed: !0
1152
- }
1153
- },
1154
- mousedown: {
1155
- EventType: "MouseEvent",
1156
- defaultInit: {
1157
- bubbles: !0,
1158
- cancelable: !0,
1159
- composed: !0
1160
- }
1161
- },
1162
- mouseenter: {
1163
- EventType: "MouseEvent",
1164
- defaultInit: {
1165
- bubbles: !1,
1166
- cancelable: !1,
1167
- composed: !0
1168
- }
1169
- },
1170
- mouseleave: {
1171
- EventType: "MouseEvent",
1172
- defaultInit: {
1173
- bubbles: !1,
1174
- cancelable: !1,
1175
- composed: !0
1176
- }
1177
- },
1178
- mousemove: {
1179
- EventType: "MouseEvent",
1180
- defaultInit: {
1181
- bubbles: !0,
1182
- cancelable: !0,
1183
- composed: !0
1184
- }
1185
- },
1186
- mouseout: {
1187
- EventType: "MouseEvent",
1188
- defaultInit: {
1189
- bubbles: !0,
1190
- cancelable: !0,
1191
- composed: !0
1192
- }
1193
- },
1194
- mouseover: {
1195
- EventType: "MouseEvent",
1196
- defaultInit: {
1197
- bubbles: !0,
1198
- cancelable: !0,
1199
- composed: !0
1200
- }
1201
- },
1202
- mouseup: {
1203
- EventType: "MouseEvent",
1204
- defaultInit: {
1205
- bubbles: !0,
1206
- cancelable: !0,
1207
- composed: !0
1208
- }
1209
- },
1210
- pointerover: {
1211
- EventType: "PointerEvent",
1212
- defaultInit: {
1213
- bubbles: !0,
1214
- cancelable: !0,
1215
- composed: !0
1216
- }
1217
- },
1218
- pointerenter: {
1219
- EventType: "PointerEvent",
1220
- defaultInit: {
1221
- bubbles: !1,
1222
- cancelable: !1
1223
- }
1224
- },
1225
- pointerdown: {
1226
- EventType: "PointerEvent",
1227
- defaultInit: {
1228
- bubbles: !0,
1229
- cancelable: !0,
1230
- composed: !0
1231
- }
1232
- },
1233
- pointermove: {
1234
- EventType: "PointerEvent",
1235
- defaultInit: {
1236
- bubbles: !0,
1237
- cancelable: !0,
1238
- composed: !0
1239
- }
1240
- },
1241
- pointerup: {
1242
- EventType: "PointerEvent",
1243
- defaultInit: {
1244
- bubbles: !0,
1245
- cancelable: !0,
1246
- composed: !0
1247
- }
1248
- },
1249
- pointercancel: {
1250
- EventType: "PointerEvent",
1251
- defaultInit: {
1252
- bubbles: !0,
1253
- cancelable: !1,
1254
- composed: !0
1255
- }
1256
- },
1257
- pointerout: {
1258
- EventType: "PointerEvent",
1259
- defaultInit: {
1260
- bubbles: !0,
1261
- cancelable: !0,
1262
- composed: !0
1263
- }
1264
- },
1265
- pointerleave: {
1266
- EventType: "PointerEvent",
1267
- defaultInit: {
1268
- bubbles: !1,
1269
- cancelable: !1
1270
- }
1271
- },
1272
- submit: {
1273
- EventType: "Event",
1274
- defaultInit: {
1275
- bubbles: !0,
1276
- cancelable: !0
1277
- }
1278
- }
1279
- };
1280
- function Mt(e) {
1281
- return Nt[e].EventType;
1282
- }
1283
- const Zn = [
1284
- "MouseEvent",
1285
- "PointerEvent"
1286
- ];
1287
- function Yn(e) {
1288
- return Zn.includes(Mt(e));
1289
- }
1290
- function eo(e) {
1291
- return Mt(e) === "KeyboardEvent";
1292
- }
1293
- const to = {
1294
- ClipboardEvent: [
1295
- oo
1296
- ],
1297
- Event: [],
1298
- InputEvent: [
1299
- pe,
1300
- io
1301
- ],
1302
- MouseEvent: [
1303
- pe,
1304
- De,
1305
- tt
1306
- ],
1307
- PointerEvent: [
1308
- pe,
1309
- De,
1310
- tt,
1311
- so
1312
- ],
1313
- KeyboardEvent: [
1314
- pe,
1315
- De,
1316
- ro
1317
- ]
1318
- };
1319
- function Lt(e, t, n) {
1320
- const o = k(t), { EventType: i, defaultInit: r } = Nt[e], s = new (no(o))[i](e, r);
1321
- return to[i].forEach((u) => u(s, n ?? {})), s;
1322
- }
1323
- function no(e) {
1324
- var t;
1325
- const n = (t = e.Event) !== null && t !== void 0 ? t : class {
1326
- };
1327
- var o;
1328
- const i = (o = e.AnimationEvent) !== null && o !== void 0 ? o : class extends n {
1329
- };
1330
- var r;
1331
- const s = (r = e.ClipboardEvent) !== null && r !== void 0 ? r : class extends n {
1332
- };
1333
- var u;
1334
- const a = (u = e.PopStateEvent) !== null && u !== void 0 ? u : class extends n {
1335
- };
1336
- var c;
1337
- const l = (c = e.ProgressEvent) !== null && c !== void 0 ? c : class extends n {
1338
- };
1339
- var h;
1340
- const v = (h = e.TransitionEvent) !== null && h !== void 0 ? h : class extends n {
1341
- };
1342
- var y;
1343
- const E = (y = e.UIEvent) !== null && y !== void 0 ? y : class extends n {
1344
- };
1345
- var se;
1346
- const Jt = (se = e.CompositionEvent) !== null && se !== void 0 ? se : class extends E {
1347
- };
1348
- var Te;
1349
- const Qt = (Te = e.FocusEvent) !== null && Te !== void 0 ? Te : class extends E {
1350
- };
1351
- var Ie;
1352
- const Zt = (Ie = e.InputEvent) !== null && Ie !== void 0 ? Ie : class extends E {
1353
- };
1354
- var ke;
1355
- const Yt = (ke = e.KeyboardEvent) !== null && ke !== void 0 ? ke : class extends E {
1356
- };
1357
- var Se;
1358
- const Ce = (Se = e.MouseEvent) !== null && Se !== void 0 ? Se : class extends E {
1359
- };
1360
- var _e;
1361
- const en = (_e = e.DragEvent) !== null && _e !== void 0 ? _e : class extends Ce {
1362
- };
1363
- var Pe;
1364
- const tn = (Pe = e.PointerEvent) !== null && Pe !== void 0 ? Pe : class extends Ce {
1365
- };
1366
- var Ae;
1367
- const nn = (Ae = e.TouchEvent) !== null && Ae !== void 0 ? Ae : class extends E {
1368
- };
1369
- return {
1370
- Event: n,
1371
- AnimationEvent: i,
1372
- ClipboardEvent: s,
1373
- PopStateEvent: a,
1374
- ProgressEvent: l,
1375
- TransitionEvent: v,
1376
- UIEvent: E,
1377
- CompositionEvent: Jt,
1378
- FocusEvent: Qt,
1379
- InputEvent: Zt,
1380
- KeyboardEvent: Yt,
1381
- MouseEvent: Ce,
1382
- DragEvent: en,
1383
- PointerEvent: tn,
1384
- TouchEvent: nn
1385
- };
1386
- }
1387
- function K(e, t) {
1388
- for (const [n, o] of Object.entries(t))
1389
- Object.defineProperty(e, n, {
1390
- get: () => o ?? null
1391
- });
1392
- }
1393
- function g(e) {
1394
- return Number(e ?? 0);
1395
- }
1396
- function oo(e, { clipboardData: t }) {
1397
- K(e, {
1398
- clipboardData: t
1399
- });
1400
- }
1401
- function io(e, { data: t, inputType: n, isComposing: o }) {
1402
- K(e, {
1403
- data: t,
1404
- isComposing: !!o,
1405
- inputType: String(n)
1406
- });
1407
- }
1408
- function pe(e, { view: t, detail: n }) {
1409
- K(e, {
1410
- view: t,
1411
- detail: g(n ?? 0)
1412
- });
1413
- }
1414
- function De(e, { altKey: t, ctrlKey: n, metaKey: o, shiftKey: i, modifierAltGraph: r, modifierCapsLock: s, modifierFn: u, modifierFnLock: a, modifierNumLock: c, modifierScrollLock: l, modifierSymbol: h, modifierSymbolLock: v }) {
1415
- K(e, {
1416
- altKey: !!t,
1417
- ctrlKey: !!n,
1418
- metaKey: !!o,
1419
- shiftKey: !!i,
1420
- getModifierState(y) {
1421
- return !!{
1422
- Alt: t,
1423
- AltGraph: r,
1424
- CapsLock: s,
1425
- Control: n,
1426
- Fn: u,
1427
- FnLock: a,
1428
- Meta: o,
1429
- NumLock: c,
1430
- ScrollLock: l,
1431
- Shift: i,
1432
- Symbol: h,
1433
- SymbolLock: v
1434
- }[y];
1435
- }
1436
- });
1437
- }
1438
- function ro(e, { key: t, code: n, location: o, repeat: i, isComposing: r, charCode: s }) {
1439
- K(e, {
1440
- key: String(t),
1441
- code: String(n),
1442
- location: g(o),
1443
- repeat: !!i,
1444
- isComposing: !!r,
1445
- charCode: s
1446
- });
1447
- }
1448
- function tt(e, { x: t, y: n, screenX: o, screenY: i, clientX: r = t, clientY: s = n, button: u, buttons: a, relatedTarget: c }) {
1449
- K(e, {
1450
- screenX: g(o),
1451
- screenY: g(i),
1452
- clientX: g(r),
1453
- x: g(r),
1454
- clientY: g(s),
1455
- y: g(s),
1456
- button: g(u),
1457
- buttons: g(a),
1458
- relatedTarget: c
1459
- });
1460
- }
1461
- function so(e, { pointerId: t, width: n, height: o, pressure: i, tangentialPressure: r, tiltX: s, tiltY: u, twist: a, pointerType: c, isPrimary: l }) {
1462
- K(e, {
1463
- pointerId: g(t),
1464
- width: g(n),
1465
- height: g(o),
1466
- pressure: g(i),
1467
- tangentialPressure: g(r),
1468
- tiltX: g(s),
1469
- tiltY: g(u),
1470
- twist: g(a),
1471
- pointerType: String(c),
1472
- isPrimary: !!l
1473
- });
1474
- }
1475
- function uo(e, t, n, o = !1) {
1476
- (Yn(t) || eo(t)) && (n = {
1477
- ...n,
1478
- ...this.system.getUIEventModifiers()
1479
- });
1480
- const i = Lt(t, e, n);
1481
- return $t.call(this, e, i, o);
1482
- }
1483
- function $t(e, t, n = !1) {
1484
- var o;
1485
- const i = t.type, r = n ? () => {
1486
- } : (o = M[i]) === null || o === void 0 ? void 0 : o.call(M, t, e, this);
1487
- if (r) {
1488
- t.preventDefault();
1489
- let s = !1;
1490
- return Object.defineProperty(t, "defaultPrevented", {
1491
- get: () => s
1492
- }), Object.defineProperty(t, "preventDefault", {
1493
- value: () => {
1494
- s = t.cancelable;
1495
- }
1496
- }), z(() => e.dispatchEvent(t)), s || r(), !s;
1497
- }
1498
- return z(() => e.dispatchEvent(t));
1499
- }
1500
- function ao(e, t, n) {
1501
- const o = Lt(t, e, n);
1502
- z(() => e.dispatchEvent(o));
1503
- }
1504
- const Oe = Symbol("Interceptor for programmatical calls");
1505
- function j(e, t, n) {
1506
- const o = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), i = Object.getOwnPropertyDescriptor(e, t), r = o?.set ? "set" : "value";
1507
- if (typeof o?.[r] != "function" || o[r][Oe])
1508
- throw new Error(`Element ${e.tagName} does not implement "${String(t)}".`);
1509
- function s(...u) {
1510
- const { applyNative: a = !1, realArgs: c, then: l } = n.call(this, ...u), h = (!a && i || o)[r];
1511
- r === "set" ? h.call(this, c) : h.call(this, ...c), l?.();
1512
- }
1513
- s[Oe] = Oe, Object.defineProperty(e, t, {
1514
- ...i ?? o,
1515
- [r]: s
1516
- });
1517
- }
1518
- function co(e) {
1519
- j(e, "value", function(n) {
1520
- const o = Sn(n);
1521
- return o && Mn(this), {
1522
- applyNative: !!o,
1523
- realArgs: lo(this, n),
1524
- then: o ? void 0 : () => Ln(this, String(n))
1525
- };
1526
- });
1527
- }
1528
- function lo(e, t) {
1529
- return f(e, "input", {
1530
- type: "number"
1531
- }) && String(t) !== "" && !Number.isNaN(Number(t)) ? String(Number(t)) : String(t);
1532
- }
1533
- function fo(e) {
1534
- j(e, "setSelectionRange", function(n, ...o) {
1535
- const i = Cn(n);
1536
- return {
1537
- applyNative: !!i,
1538
- realArgs: [
1539
- Number(n),
1540
- ...o
1541
- ],
1542
- then: () => i ? void 0 : he(e)
1543
- };
1544
- }), j(e, "selectionStart", function(n) {
1545
- return {
1546
- realArgs: n,
1547
- then: () => he(e)
1548
- };
1549
- }), j(e, "selectionEnd", function(n) {
1550
- return {
1551
- realArgs: n,
1552
- then: () => he(e)
1553
- };
1554
- }), j(e, "select", function() {
1555
- return {
1556
- realArgs: [],
1557
- then: () => An(e, {
1558
- anchorOffset: 0,
1559
- focusOffset: C(e).length
1560
- })
1561
- };
1562
- });
1563
- }
1564
- function po(e) {
1565
- j(e, "setRangeText", function(...n) {
1566
- return {
1567
- realArgs: n,
1568
- then: () => {
1569
- je(e), he(e);
1570
- }
1571
- };
1572
- });
1573
- }
1574
- const q = Symbol("Node prepared with document state workarounds");
1575
- function Ft(e) {
1576
- e[q] || (e.addEventListener("focus", (t) => {
1577
- const n = t.target;
1578
- nt(n);
1579
- }, {
1580
- capture: !0,
1581
- passive: !0
1582
- }), e.activeElement && nt(e.activeElement), e.addEventListener("blur", (t) => {
1583
- const n = t.target, o = Pn(n);
1584
- o !== void 0 && (n.value !== o && ao(n, "change"), At(n));
1585
- }, {
1586
- capture: !0,
1587
- passive: !0
1588
- }), e[q] = q);
1589
- }
1590
- function nt(e) {
1591
- e[q] || (f(e, [
1592
- "input",
1593
- "textarea"
1594
- ]) && (co(e), fo(e), po(e)), e[q] = q);
1595
- }
1596
- function ho(e) {
1597
- return vo(e) ? e : e.ownerDocument;
1598
- }
1599
- function vo(e) {
1600
- return e.nodeType === 9;
1601
- }
1602
- function Q(e) {
1603
- const t = e.delay;
1604
- if (typeof t == "number")
1605
- return Promise.all([
1606
- new Promise((n) => globalThis.setTimeout(() => n(), t)),
1607
- e.advanceTimers(t)
1608
- ]);
1609
- }
1610
- function V(e, t, n) {
1611
- return t in e ? Object.defineProperty(e, t, {
1612
- value: n,
1613
- enumerable: !0,
1614
- configurable: !0,
1615
- writable: !0
1616
- }) : e[t] = n, e;
1617
- }
1618
- var T;
1619
- (function(e) {
1620
- e[e.STANDARD = 0] = "STANDARD", e[e.LEFT = 1] = "LEFT", e[e.RIGHT = 2] = "RIGHT", e[e.NUMPAD = 3] = "NUMPAD";
1621
- })(T || (T = {}));
1622
- const go = [
1623
- "Alt",
1624
- "AltGraph",
1625
- "Control",
1626
- "Fn",
1627
- "Meta",
1628
- "Shift",
1629
- "Symbol"
1630
- ];
1631
- function ot(e) {
1632
- return go.includes(e);
1633
- }
1634
- const yo = [
1635
- "CapsLock",
1636
- "FnLock",
1637
- "NumLock",
1638
- "ScrollLock",
1639
- "SymbolLock"
1640
- ];
1641
- function it(e) {
1642
- return yo.includes(e);
1643
- }
1644
- class bo {
1645
- isKeyPressed(t) {
1646
- return !!this.pressed[String(t.code)];
1647
- }
1648
- getPressedKeys() {
1649
- return Object.values(this.pressed).map((t) => t.keyDef);
1650
- }
1651
- /** Press a key */
1652
- async keydown(t, n) {
1653
- var o, i, r;
1654
- const s = String(n.key), u = String(n.code), a = xe(t.config.document);
1655
- this.setKeydownTarget(a);
1656
- var c;
1657
- (c = (o = this.pressed)[i = u]) !== null && c !== void 0 || (o[i] = {
1658
- keyDef: n,
1659
- unpreventedDefault: !1
1660
- }), ot(s) && (this.modifiers[s] = !0);
1661
- const l = t.dispatchUIEvent(a, "keydown", {
1662
- key: s,
1663
- code: u
1664
- });
1665
- it(s) && !this.modifiers[s] && (this.modifiers[s] = !0, this.modifierLockStart[s] = !0), (r = this.pressed[u]).unpreventedDefault || (r.unpreventedDefault = l), l && this.hasKeyPress(s) && t.dispatchUIEvent(xe(t.config.document), "keypress", {
1666
- key: s,
1667
- code: u,
1668
- charCode: n.key === "Enter" ? 13 : String(n.key).charCodeAt(0)
1669
- });
1670
- }
1671
- /** Release a key */
1672
- async keyup(t, n) {
1673
- const o = String(n.key), i = String(n.code), r = this.pressed[i].unpreventedDefault;
1674
- delete this.pressed[i], ot(o) && !Object.values(this.pressed).find((s) => s.keyDef.key === o) && (this.modifiers[o] = !1), t.dispatchUIEvent(xe(t.config.document), "keyup", {
1675
- key: o,
1676
- code: i
1677
- }, !r), it(o) && this.modifiers[o] && (this.modifierLockStart[o] ? this.modifierLockStart[o] = !1 : this.modifiers[o] = !1);
1678
- }
1679
- setKeydownTarget(t) {
1680
- t !== this.lastKeydownTarget && (this.carryChar = ""), this.lastKeydownTarget = t;
1681
- }
1682
- hasKeyPress(t) {
1683
- return (t.length === 1 || t === "Enter") && !this.modifiers.Control && !this.modifiers.Alt;
1684
- }
1685
- constructor(t) {
1686
- V(this, "system", void 0), V(this, "modifiers", {
1687
- Alt: !1,
1688
- AltGraph: !1,
1689
- CapsLock: !1,
1690
- Control: !1,
1691
- Fn: !1,
1692
- FnLock: !1,
1693
- Meta: !1,
1694
- NumLock: !1,
1695
- ScrollLock: !1,
1696
- Shift: !1,
1697
- Symbol: !1,
1698
- SymbolLock: !1
1699
- }), V(this, "pressed", {}), V(this, "carryChar", ""), V(this, "lastKeydownTarget", void 0), V(this, "modifierLockStart", {}), this.system = t;
1700
- }
1701
- }
1702
- const mo = [
1703
- // alphanumeric keys
1704
- ..."0123456789".split("").map((e) => ({
1705
- code: `Digit${e}`,
1706
- key: e
1707
- })),
1708
- ...")!@#$%^&*(".split("").map((e, t) => ({
1709
- code: `Digit${t}`,
1710
- key: e,
1711
- shiftKey: !0
1712
- })),
1713
- ..."abcdefghijklmnopqrstuvwxyz".split("").map((e) => ({
1714
- code: `Key${e.toUpperCase()}`,
1715
- key: e
1716
- })),
1717
- ..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((e) => ({
1718
- code: `Key${e}`,
1719
- key: e,
1720
- shiftKey: !0
1721
- })),
1722
- // alphanumeric block - functional
1723
- {
1724
- code: "Space",
1725
- key: " "
1726
- },
1727
- {
1728
- code: "AltLeft",
1729
- key: "Alt",
1730
- location: T.LEFT
1731
- },
1732
- {
1733
- code: "AltRight",
1734
- key: "Alt",
1735
- location: T.RIGHT
1736
- },
1737
- {
1738
- code: "ShiftLeft",
1739
- key: "Shift",
1740
- location: T.LEFT
1741
- },
1742
- {
1743
- code: "ShiftRight",
1744
- key: "Shift",
1745
- location: T.RIGHT
1746
- },
1747
- {
1748
- code: "ControlLeft",
1749
- key: "Control",
1750
- location: T.LEFT
1751
- },
1752
- {
1753
- code: "ControlRight",
1754
- key: "Control",
1755
- location: T.RIGHT
1756
- },
1757
- {
1758
- code: "MetaLeft",
1759
- key: "Meta",
1760
- location: T.LEFT
1761
- },
1762
- {
1763
- code: "MetaRight",
1764
- key: "Meta",
1765
- location: T.RIGHT
1766
- },
1767
- {
1768
- code: "OSLeft",
1769
- key: "OS",
1770
- location: T.LEFT
1771
- },
1772
- {
1773
- code: "OSRight",
1774
- key: "OS",
1775
- location: T.RIGHT
1776
- },
1777
- {
1778
- code: "Tab",
1779
- key: "Tab"
1780
- },
1781
- {
1782
- code: "CapsLock",
1783
- key: "CapsLock"
1784
- },
1785
- {
1786
- code: "Backspace",
1787
- key: "Backspace"
1788
- },
1789
- {
1790
- code: "Enter",
1791
- key: "Enter"
1792
- },
1793
- // function
1794
- {
1795
- code: "Escape",
1796
- key: "Escape"
1797
- },
1798
- // arrows
1799
- {
1800
- code: "ArrowUp",
1801
- key: "ArrowUp"
1802
- },
1803
- {
1804
- code: "ArrowDown",
1805
- key: "ArrowDown"
1806
- },
1807
- {
1808
- code: "ArrowLeft",
1809
- key: "ArrowLeft"
1810
- },
1811
- {
1812
- code: "ArrowRight",
1813
- key: "ArrowRight"
1814
- },
1815
- // control pad
1816
- {
1817
- code: "Home",
1818
- key: "Home"
1819
- },
1820
- {
1821
- code: "End",
1822
- key: "End"
1823
- },
1824
- {
1825
- code: "Delete",
1826
- key: "Delete"
1827
- },
1828
- {
1829
- code: "PageUp",
1830
- key: "PageUp"
1831
- },
1832
- {
1833
- code: "PageDown",
1834
- key: "PageDown"
1835
- },
1836
- // Special keys that are not part of a default US-layout but included for specific behavior
1837
- {
1838
- code: "Fn",
1839
- key: "Fn"
1840
- },
1841
- {
1842
- code: "Symbol",
1843
- key: "Symbol"
1844
- },
1845
- {
1846
- code: "AltRight",
1847
- key: "AltGraph"
1848
- }
1849
- ], Eo = [
1850
- {
1851
- name: "MouseLeft",
1852
- pointerType: "mouse",
1853
- button: "primary"
1854
- },
1855
- {
1856
- name: "MouseRight",
1857
- pointerType: "mouse",
1858
- button: "secondary"
1859
- },
1860
- {
1861
- name: "MouseMiddle",
1862
- pointerType: "mouse",
1863
- button: "auxiliary"
1864
- },
1865
- {
1866
- name: "TouchA",
1867
- pointerType: "touch"
1868
- },
1869
- {
1870
- name: "TouchB",
1871
- pointerType: "touch"
1872
- },
1873
- {
1874
- name: "TouchC",
1875
- pointerType: "touch"
1876
- }
1877
- ];
1878
- function wo(e, t, n) {
1879
- return t in e ? Object.defineProperty(e, t, {
1880
- value: n,
1881
- enumerable: !0,
1882
- configurable: !0,
1883
- writable: !0
1884
- }) : e[t] = n, e;
1885
- }
1886
- class Kt {
1887
- getButtons() {
1888
- let t = 0;
1889
- for (const n of Object.keys(this.pressed))
1890
- t |= 2 ** Number(n);
1891
- return t;
1892
- }
1893
- down(t) {
1894
- const n = Le(t.button);
1895
- if (n in this.pressed) {
1896
- this.pressed[n].push(t);
1897
- return;
1898
- }
1899
- return this.pressed[n] = [
1900
- t
1901
- ], n;
1902
- }
1903
- up(t) {
1904
- const n = Le(t.button);
1905
- if (n in this.pressed && (this.pressed[n] = this.pressed[n].filter((o) => o.name !== t.name), this.pressed[n].length === 0))
1906
- return delete this.pressed[n], n;
1907
- }
1908
- constructor() {
1909
- wo(this, "pressed", {});
1910
- }
1911
- }
1912
- const rt = {
1913
- primary: 0,
1914
- secondary: 1,
1915
- auxiliary: 2,
1916
- back: 3,
1917
- X1: 3,
1918
- forward: 4,
1919
- X2: 4
1920
- };
1921
- function Le(e = 0) {
1922
- return e in rt ? rt[e] : Number(e);
1923
- }
1924
- const st = {
1925
- 1: 2,
1926
- 2: 1
1927
- };
1928
- function ut(e) {
1929
- return e = Le(e), e in st ? st[e] : e;
1930
- }
1931
- function To(e, t, n) {
1932
- return t in e ? Object.defineProperty(e, t, {
1933
- value: n,
1934
- enumerable: !0,
1935
- configurable: !0,
1936
- writable: !0
1937
- }) : e[t] = n, e;
1938
- }
1939
- class Io {
1940
- get countPressed() {
1941
- return this.pressedKeys.size;
1942
- }
1943
- isPressed(t) {
1944
- return this.pressedKeys.has(t.name);
1945
- }
1946
- addPressed(t) {
1947
- return this.pressedKeys.add(t.name);
1948
- }
1949
- removePressed(t) {
1950
- return this.pressedKeys.delete(t.name);
1951
- }
1952
- constructor() {
1953
- To(this, "pressedKeys", /* @__PURE__ */ new Set());
1954
- }
1955
- }
1956
- function ne(e, t) {
1957
- const n = [];
1958
- for (let r = e; r; r = r.parentElement)
1959
- n.push(r);
1960
- const o = [];
1961
- for (let r = t; r; r = r.parentElement)
1962
- o.push(r);
1963
- let i = 0;
1964
- for (; !(i >= n.length || i >= o.length || n[n.length - 1 - i] !== o[o.length - 1 - i]); i++)
1965
- ;
1966
- return [
1967
- n.slice(0, n.length - i),
1968
- o.slice(0, o.length - i),
1969
- o.slice(o.length - i)
1970
- ];
1971
- }
1972
- function $e({ target: e, node: t, offset: n }) {
1973
- return S(e) ? {
1974
- node: e,
1975
- offset: n ?? C(e).length
1976
- } : t ? {
1977
- node: t,
1978
- offset: n ?? (t.nodeType === 3 ? t.nodeValue.length : t.childNodes.length)
1979
- } : Vt(e, n);
1980
- }
1981
- function Vt(e, t, n = !0) {
1982
- let o = t === void 0 ? e.childNodes.length - 1 : 0;
1983
- const i = t === void 0 ? -1 : 1;
1984
- for (; t === void 0 ? o >= (n ? Math.max(e.childNodes.length - 1, 0) : 0) : o <= e.childNodes.length; ) {
1985
- if (t && o === e.childNodes.length)
1986
- throw new Error("The given offset is out of bounds.");
1987
- const r = e.childNodes.item(o), s = String(r.textContent);
1988
- if (s.length)
1989
- if (t !== void 0 && s.length < t)
1990
- t -= s.length;
1991
- else {
1992
- if (r.nodeType === 1)
1993
- return Vt(r, t, !1);
1994
- if (r.nodeType === 3)
1995
- return {
1996
- node: r,
1997
- offset: t ?? r.nodeValue.length
1998
- };
1999
- }
2000
- o += i;
2001
- }
2002
- return {
2003
- node: e,
2004
- offset: e.childNodes.length
2005
- };
2006
- }
2007
- function ko({ document: e, target: t, clickCount: n, node: o, offset: i }) {
2008
- if (Tn(t))
2009
- return;
2010
- const r = S(t), s = String(r ? C(t) : t.textContent), [u, a] = o ? (
2011
- // which elements might be considered in the same line of text.
2012
- // TODO: support expanding initial range on multiple clicks if node is given
2013
- [
2014
- i,
2015
- i
2016
- ]
2017
- ) : So(s, i, n);
2018
- if (r)
2019
- return Z(t, {
2020
- anchorOffset: u ?? s.length,
2021
- focusOffset: a ?? s.length
2022
- }), {
2023
- node: t,
2024
- start: u ?? 0,
2025
- end: a ?? s.length
2026
- };
2027
- {
2028
- const { node: c, offset: l } = $e({
2029
- target: t,
2030
- node: o,
2031
- offset: u
2032
- }), { node: h, offset: v } = $e({
2033
- target: t,
2034
- node: o,
2035
- offset: a
2036
- }), y = t.ownerDocument.createRange();
2037
- try {
2038
- y.setStart(c, l), y.setEnd(h, v);
2039
- } catch {
2040
- throw new Error("The given offset is out of bounds.");
2041
- }
2042
- const E = e.getSelection();
2043
- return E?.removeAllRanges(), E?.addRange(y.cloneRange()), y;
2044
- }
2045
- }
2046
- function So(e, t, n) {
2047
- if (n % 3 === 1 || e.length === 0)
2048
- return [
2049
- t,
2050
- t
2051
- ];
2052
- const o = t ?? e.length;
2053
- return n % 3 === 2 ? [
2054
- o - e.substr(0, t).match(/(\w+|\s+|\W)?$/)[0].length,
2055
- t === void 0 ? t : t + e.substr(t).match(/^(\w+|\s+|\W)?/)[0].length
2056
- ] : [
2057
- o - e.substr(0, t).match(/[^\r\n]*$/)[0].length,
2058
- t === void 0 ? t : t + e.substr(t).match(/^[^\r\n]*/)[0].length
2059
- ];
2060
- }
2061
- function Co(e, { document: t, target: n, node: o, offset: i }) {
2062
- const r = $e({
2063
- target: n,
2064
- node: o,
2065
- offset: i
2066
- });
2067
- if ("node" in e) {
2068
- if (r.node === e.node) {
2069
- const s = r.offset < e.start ? e.end : e.start, u = r.offset > e.end || r.offset < e.start ? r.offset : e.end;
2070
- Z(e.node, {
2071
- anchorOffset: s,
2072
- focusOffset: u
2073
- });
2074
- }
2075
- } else {
2076
- const s = e.cloneRange(), u = s.comparePoint(r.node, r.offset);
2077
- u < 0 ? s.setStart(r.node, r.offset) : u > 0 && s.setEnd(r.node, r.offset);
2078
- const a = t.getSelection();
2079
- a?.removeAllRanges(), a?.addRange(s.cloneRange());
2080
- }
2081
- }
2082
- function Rt(e, t) {
2083
- var n, o, i, r, s, u, a, c;
2084
- return e.target !== t.target || ((n = e.coords) === null || n === void 0 ? void 0 : n.x) !== ((o = t.coords) === null || o === void 0 ? void 0 : o.y) || ((i = e.coords) === null || i === void 0 ? void 0 : i.y) !== ((r = t.coords) === null || r === void 0 ? void 0 : r.y) || ((s = e.caret) === null || s === void 0 ? void 0 : s.node) !== ((u = t.caret) === null || u === void 0 ? void 0 : u.node) || ((a = e.caret) === null || a === void 0 ? void 0 : a.offset) !== ((c = t.caret) === null || c === void 0 ? void 0 : c.offset);
2085
- }
2086
- function L(e, t, n) {
2087
- return t in e ? Object.defineProperty(e, t, {
2088
- value: n,
2089
- enumerable: !0,
2090
- configurable: !0,
2091
- writable: !0
2092
- }) : e[t] = n, e;
2093
- }
2094
- class _o {
2095
- move(t, n) {
2096
- const o = this.position, i = this.getTarget(t);
2097
- if (this.position = n, !Rt(o, n))
2098
- return;
2099
- const r = this.getTarget(t), s = this.getEventInit("mousemove"), [u, a] = ne(i, r);
2100
- return {
2101
- leave: () => {
2102
- i !== r && (t.dispatchUIEvent(i, "mouseout", s), u.forEach((c) => t.dispatchUIEvent(c, "mouseleave", s)));
2103
- },
2104
- enter: () => {
2105
- i !== r && (t.dispatchUIEvent(r, "mouseover", s), a.forEach((c) => t.dispatchUIEvent(c, "mouseenter", s)));
2106
- },
2107
- move: () => {
2108
- t.dispatchUIEvent(r, "mousemove", s), this.modifySelecting(t);
2109
- }
2110
- };
2111
- }
2112
- down(t, n, o) {
2113
- const i = this.buttons.down(n);
2114
- if (i === void 0)
2115
- return;
2116
- const r = this.getTarget(t);
2117
- this.buttonDownTarget[i] = r;
2118
- const s = P(r), u = this.getEventInit("mousedown", n.button);
2119
- (s || t.dispatchUIEvent(r, "mousedown", u)) && (this.startSelecting(t, u.detail), N(r)), !s && ut(n.button) === 2 && t.dispatchUIEvent(r, "contextmenu", this.getEventInit("contextmenu", n.button, o));
2120
- }
2121
- up(t, n, o) {
2122
- const i = this.buttons.up(n);
2123
- if (i === void 0)
2124
- return;
2125
- const r = this.getTarget(t);
2126
- if (!P(r)) {
2127
- t.dispatchUIEvent(r, "mouseup", this.getEventInit("mouseup", n.button)), this.endSelecting();
2128
- const s = ne(this.buttonDownTarget[i], r)[2][0];
2129
- if (s) {
2130
- const u = this.getEventInit("click", n.button, o);
2131
- u.detail && (t.dispatchUIEvent(s, u.button === 0 ? "click" : "auxclick", u), u.button === 0 && u.detail === 2 && t.dispatchUIEvent(s, "dblclick", {
2132
- ...this.getEventInit("dblclick", n.button),
2133
- detail: u.detail
2134
- }));
2135
- }
2136
- }
2137
- }
2138
- resetClickCount() {
2139
- this.clickCount.reset();
2140
- }
2141
- getEventInit(t, n, o) {
2142
- const i = {
2143
- ...this.position.coords
2144
- };
2145
- return o && (i.pointerId = o.pointerId, i.pointerType = o.pointerType, i.isPrimary = o.isPrimary), i.button = ut(n), i.buttons = this.buttons.getButtons(), t === "mousedown" ? i.detail = this.clickCount.getOnDown(i.button) : t === "mouseup" ? i.detail = this.clickCount.getOnUp(i.button) : (t === "click" || t === "auxclick") && (i.detail = this.clickCount.incOnClick(i.button)), i;
2146
- }
2147
- getTarget(t) {
2148
- var n;
2149
- return (n = this.position.target) !== null && n !== void 0 ? n : t.config.document.body;
2150
- }
2151
- startSelecting(t, n) {
2152
- var o, i;
2153
- this.selecting = ko({
2154
- document: t.config.document,
2155
- target: this.getTarget(t),
2156
- node: (o = this.position.caret) === null || o === void 0 ? void 0 : o.node,
2157
- offset: (i = this.position.caret) === null || i === void 0 ? void 0 : i.offset,
2158
- clickCount: n
2159
- });
2160
- }
2161
- modifySelecting(t) {
2162
- var n, o;
2163
- this.selecting && Co(this.selecting, {
2164
- document: t.config.document,
2165
- target: this.getTarget(t),
2166
- node: (n = this.position.caret) === null || n === void 0 ? void 0 : n.node,
2167
- offset: (o = this.position.caret) === null || o === void 0 ? void 0 : o.offset
2168
- });
2169
- }
2170
- endSelecting() {
2171
- this.selecting = void 0;
2172
- }
2173
- constructor() {
2174
- L(this, "position", {}), L(this, "buttons", new Kt()), L(this, "selecting", void 0), L(this, "buttonDownTarget", {}), L(this, "clickCount", new class {
2175
- incOnClick(t) {
2176
- const n = this.down[t] === void 0 ? void 0 : Number(this.down[t]) + 1;
2177
- return this.count = this.count[t] === void 0 ? {} : {
2178
- [t]: Number(this.count[t]) + 1
2179
- }, n;
2180
- }
2181
- getOnDown(t) {
2182
- var n;
2183
- this.down = {
2184
- [t]: (n = this.count[t]) !== null && n !== void 0 ? n : 0
2185
- };
2186
- var o;
2187
- return this.count = {
2188
- [t]: (o = this.count[t]) !== null && o !== void 0 ? o : 0
2189
- }, Number(this.count[t]) + 1;
2190
- }
2191
- getOnUp(t) {
2192
- return this.down[t] === void 0 ? void 0 : Number(this.down[t]) + 1;
2193
- }
2194
- reset() {
2195
- this.count = {};
2196
- }
2197
- constructor() {
2198
- L(this, "down", {}), L(this, "count", {});
2199
- }
2200
- }());
2201
- }
2202
- }
2203
- function Ee(e, t) {
2204
- var n;
2205
- return ((n = jt(e, t)) === null || n === void 0 ? void 0 : n.pointerEvents) !== "none";
2206
- }
2207
- function Po(e) {
2208
- const t = k(e);
2209
- for (let n = e, o = []; n?.ownerDocument; n = n.parentElement) {
2210
- o.push(n);
2211
- const i = t.getComputedStyle(n).pointerEvents;
2212
- if (i && ![
2213
- "inherit",
2214
- "unset"
2215
- ].includes(i))
2216
- return {
2217
- pointerEvents: i,
2218
- tree: o
2219
- };
2220
- }
2221
- }
2222
- const at = Symbol("Last check for pointer-events");
2223
- function jt(e, t) {
2224
- const n = t[at];
2225
- if (!(e.config.pointerEventsCheck !== H.Never && (!n || ct(e.config.pointerEventsCheck, H.EachApiCall) && n[m.Call] !== le(e, m.Call) || ct(e.config.pointerEventsCheck, H.EachTrigger) && n[m.Trigger] !== le(e, m.Trigger))))
2226
- return n?.result;
2227
- const i = Po(t);
2228
- return t[at] = {
2229
- [m.Call]: le(e, m.Call),
2230
- [m.Trigger]: le(e, m.Trigger),
2231
- result: i
2232
- }, i;
2233
- }
2234
- function te(e, t) {
2235
- const n = jt(e, t);
2236
- if (n?.pointerEvents === "none")
2237
- throw new Error([
2238
- `Unable to perform pointer interaction as the element ${n.tree.length > 1 ? "inherits" : "has"} \`pointer-events: none\`:`,
2239
- "",
2240
- Ao(n.tree)
2241
- ].join(`
2242
- `));
2243
- }
2244
- function Ao(e) {
2245
- return e.reverse().map((t, n) => [
2246
- "".padEnd(n),
2247
- t.tagName,
2248
- t.id && `#${t.id}`,
2249
- t.hasAttribute("data-testid") && `(testId=${t.getAttribute("data-testid")})`,
2250
- xo(t),
2251
- e.length > 1 && n === 0 && " <-- This element declared `pointer-events: none`",
2252
- e.length > 1 && n === e.length - 1 && " <-- Asserted pointer events here"
2253
- ].filter(Boolean).join("")).join(`
2254
- `);
2255
- }
2256
- function xo(e) {
2257
- var t;
2258
- let n;
2259
- if (e.hasAttribute("aria-label"))
2260
- n = e.getAttribute("aria-label");
2261
- else if (e.hasAttribute("aria-labelledby")) {
2262
- var o, i;
2263
- n = (i = e.ownerDocument.getElementById(e.getAttribute("aria-labelledby"))) === null || i === void 0 || (o = i.textContent) === null || o === void 0 ? void 0 : o.trim();
2264
- } else if (f(e, [
2265
- "button",
2266
- "input",
2267
- "meter",
2268
- "output",
2269
- "progress",
2270
- "select",
2271
- "textarea"
2272
- ]) && (!((t = e.labels) === null || t === void 0) && t.length))
2273
- n = Array.from(e.labels).map((s) => {
2274
- var u;
2275
- return (u = s.textContent) === null || u === void 0 ? void 0 : u.trim();
2276
- }).join("|");
2277
- else if (f(e, "button")) {
2278
- var r;
2279
- n = (r = e.textContent) === null || r === void 0 ? void 0 : r.trim();
2280
- }
2281
- return n = n?.replace(/\n/g, " "), Number(n?.length) > 30 && (n = `${n?.substring(0, 29)}…`), n ? `(label=${n})` : "";
2282
- }
2283
- function ct(e, t) {
2284
- return (e & t) > 0;
2285
- }
2286
- function O(e, t, n) {
2287
- return t in e ? Object.defineProperty(e, t, {
2288
- value: n,
2289
- enumerable: !0,
2290
- configurable: !0,
2291
- writable: !0
2292
- }) : e[t] = n, e;
2293
- }
2294
- class lt {
2295
- init(t, n) {
2296
- this.position = n;
2297
- const o = this.getTarget(t), [, i] = ne(null, o), r = this.getEventInit();
2298
- return te(t, o), t.dispatchUIEvent(o, "pointerover", r), i.forEach((s) => t.dispatchUIEvent(s, "pointerenter", r)), this;
2299
- }
2300
- move(t, n) {
2301
- const o = this.position, i = this.getTarget(t);
2302
- if (this.position = n, !Rt(o, n))
2303
- return;
2304
- const r = this.getTarget(t), s = this.getEventInit(), [u, a] = ne(i, r);
2305
- return {
2306
- leave: () => {
2307
- Ee(t, i) && i !== r && (t.dispatchUIEvent(i, "pointerout", s), u.forEach((c) => t.dispatchUIEvent(c, "pointerleave", s)));
2308
- },
2309
- enter: () => {
2310
- te(t, r), i !== r && (t.dispatchUIEvent(r, "pointerover", s), a.forEach((c) => t.dispatchUIEvent(c, "pointerenter", s)));
2311
- },
2312
- move: () => {
2313
- t.dispatchUIEvent(r, "pointermove", s);
2314
- }
2315
- };
2316
- }
2317
- down(t, n) {
2318
- if (this.isDown)
2319
- return;
2320
- const o = this.getTarget(t);
2321
- te(t, o), this.isDown = !0, this.isPrevented = !t.dispatchUIEvent(o, "pointerdown", this.getEventInit());
2322
- }
2323
- up(t, n) {
2324
- if (!this.isDown)
2325
- return;
2326
- const o = this.getTarget(t);
2327
- te(t, o), this.isDown = !1, t.dispatchUIEvent(o, "pointerup", this.getEventInit());
2328
- }
2329
- release(t) {
2330
- const n = this.getTarget(t), [o] = ne(n, null), i = this.getEventInit();
2331
- Ee(t, n) && (t.dispatchUIEvent(n, "pointerout", i), o.forEach((r) => t.dispatchUIEvent(r, "pointerleave", i))), this.isCancelled = !0;
2332
- }
2333
- getTarget(t) {
2334
- var n;
2335
- return (n = this.position.target) !== null && n !== void 0 ? n : t.config.document.body;
2336
- }
2337
- getEventInit() {
2338
- return {
2339
- ...this.position.coords,
2340
- pointerId: this.pointerId,
2341
- pointerType: this.pointerType,
2342
- isPrimary: this.isPrimary
2343
- };
2344
- }
2345
- constructor({ pointerId: t, pointerType: n, isPrimary: o }) {
2346
- O(this, "pointerId", void 0), O(this, "pointerType", void 0), O(this, "isPrimary", void 0), O(this, "isMultitouch", !1), O(this, "isCancelled", !1), O(this, "isDown", !1), O(this, "isPrevented", !1), O(this, "position", {}), this.pointerId = t, this.pointerType = n, this.isPrimary = o, this.isMultitouch = !o;
2347
- }
2348
- }
2349
- function B(e, t, n) {
2350
- return t in e ? Object.defineProperty(e, t, {
2351
- value: n,
2352
- enumerable: !0,
2353
- configurable: !0,
2354
- writable: !0
2355
- }) : e[t] = n, e;
2356
- }
2357
- class Do {
2358
- isKeyPressed(t) {
2359
- return this.devices.get(t.pointerType).isPressed(t);
2360
- }
2361
- async press(t, n, o) {
2362
- const i = this.getPointerName(n), r = n.pointerType === "touch" ? this.pointers.new(i, n).init(t, o) : this.pointers.get(i);
2363
- r.position = o, r.pointerType !== "touch" && (this.mouse.position = o), this.devices.get(n.pointerType).addPressed(n), this.buttons.down(n), r.down(t, n), r.pointerType !== "touch" && !r.isPrevented && this.mouse.down(t, n, r);
2364
- }
2365
- async move(t, n, o) {
2366
- const i = this.pointers.get(n), r = i.move(t, o), s = i.pointerType === "touch" || i.isPrevented && i.isDown ? void 0 : this.mouse.move(t, o);
2367
- r?.leave(), s?.leave(), r?.enter(), s?.enter(), r?.move(), s?.move();
2368
- }
2369
- async release(t, n, o) {
2370
- const i = this.devices.get(n.pointerType);
2371
- i.removePressed(n), this.buttons.up(n);
2372
- const r = this.pointers.get(this.getPointerName(n));
2373
- if (r.position = o, r.pointerType !== "touch" && (this.mouse.position = o), i.countPressed === 0 && r.up(t, n), r.pointerType === "touch" && r.release(t), !r.isPrevented) {
2374
- if (r.pointerType === "touch" && !r.isMultitouch) {
2375
- const s = this.mouse.move(t, r.position);
2376
- s?.leave(), s?.enter(), s?.move(), this.mouse.down(t, n, r);
2377
- }
2378
- if (!r.isMultitouch) {
2379
- const s = this.mouse.move(t, r.position);
2380
- s?.leave(), s?.enter(), s?.move(), this.mouse.up(t, n, r);
2381
- }
2382
- }
2383
- }
2384
- getPointerName(t) {
2385
- return t.pointerType === "touch" ? t.name : t.pointerType;
2386
- }
2387
- getPreviousPosition(t) {
2388
- return this.pointers.has(t) ? this.pointers.get(t).position : void 0;
2389
- }
2390
- resetClickCount() {
2391
- this.mouse.resetClickCount();
2392
- }
2393
- getMouseTarget(t) {
2394
- var n;
2395
- return (n = this.mouse.position.target) !== null && n !== void 0 ? n : t.config.document.body;
2396
- }
2397
- setMousePosition(t) {
2398
- this.mouse.position = t, this.pointers.get("mouse").position = t;
2399
- }
2400
- constructor(t) {
2401
- B(this, "system", void 0), B(this, "mouse", void 0), B(this, "buttons", void 0), B(this, "devices", new class {
2402
- get(n) {
2403
- var o, i, r;
2404
- return (r = (o = this.registry)[i = n]) !== null && r !== void 0 || (o[i] = new Io()), this.registry[n];
2405
- }
2406
- constructor() {
2407
- B(this, "registry", {});
2408
- }
2409
- }()), B(this, "pointers", new class {
2410
- new(n, o) {
2411
- const i = o.pointerType !== "touch" || !Object.values(this.registry).some((r) => r.pointerType === "touch" && !r.isCancelled);
2412
- return i || Object.values(this.registry).forEach((r) => {
2413
- r.pointerType === o.pointerType && !r.isCancelled && (r.isMultitouch = !0);
2414
- }), this.registry[n] = new lt({
2415
- pointerId: this.nextId++,
2416
- pointerType: o.pointerType,
2417
- isPrimary: i
2418
- }), this.registry[n];
2419
- }
2420
- get(n) {
2421
- if (!this.has(n))
2422
- throw new Error(`Trying to access pointer "${n}" which does not exist.`);
2423
- return this.registry[n];
2424
- }
2425
- has(n) {
2426
- return n in this.registry;
2427
- }
2428
- constructor() {
2429
- B(this, "registry", {
2430
- mouse: new lt({
2431
- pointerId: 1,
2432
- pointerType: "mouse",
2433
- isPrimary: !0
2434
- })
2435
- }), B(this, "nextId", 2);
2436
- }
2437
- }()), this.system = t, this.buttons = new Kt(), this.mouse = new _o();
2438
- }
2439
- }
2440
- function dt(e, t, n) {
2441
- return t in e ? Object.defineProperty(e, t, {
2442
- value: n,
2443
- enumerable: !0,
2444
- configurable: !0,
2445
- writable: !0
2446
- }) : e[t] = n, e;
2447
- }
2448
- class Ht {
2449
- getUIEventModifiers() {
2450
- return {
2451
- altKey: this.keyboard.modifiers.Alt,
2452
- ctrlKey: this.keyboard.modifiers.Control,
2453
- metaKey: this.keyboard.modifiers.Meta,
2454
- shiftKey: this.keyboard.modifiers.Shift,
2455
- modifierAltGraph: this.keyboard.modifiers.AltGraph,
2456
- modifierCapsLock: this.keyboard.modifiers.CapsLock,
2457
- modifierFn: this.keyboard.modifiers.Fn,
2458
- modifierFnLock: this.keyboard.modifiers.FnLock,
2459
- modifierNumLock: this.keyboard.modifiers.NumLock,
2460
- modifierScrollLock: this.keyboard.modifiers.ScrollLock,
2461
- modifierSymbol: this.keyboard.modifiers.Symbol,
2462
- modifierSymbolLock: this.keyboard.modifiers.SymbolLock
2463
- };
2464
- }
2465
- constructor() {
2466
- dt(this, "keyboard", new bo(this)), dt(this, "pointer", new Do(this));
2467
- }
2468
- }
2469
- async function Oo(e) {
2470
- const t = [];
2471
- return this.config.skipHover || t.push({
2472
- target: e
2473
- }), t.push({
2474
- keys: "[MouseLeft]",
2475
- target: e
2476
- }), this.pointer(t);
2477
- }
2478
- async function Bo(e) {
2479
- return this.pointer([
2480
- {
2481
- target: e
2482
- },
2483
- "[MouseLeft][MouseLeft]"
2484
- ]);
2485
- }
2486
- async function Uo(e) {
2487
- return this.pointer([
2488
- {
2489
- target: e
2490
- },
2491
- "[MouseLeft][MouseLeft][MouseLeft]"
2492
- ]);
2493
- }
2494
- async function No(e) {
2495
- return this.pointer({
2496
- target: e
2497
- });
2498
- }
2499
- async function Mo(e) {
2500
- return te(this, this.system.pointer.getMouseTarget(this)), this.pointer({
2501
- target: e.ownerDocument.body
2502
- });
2503
- }
2504
- async function Lo({ shift: e } = {}) {
2505
- return this.keyboard(e === !0 ? "{Shift>}{Tab}{/Shift}" : e === !1 ? "[/ShiftLeft][/ShiftRight]{Tab}" : "{Tab}");
2506
- }
2507
- function $o(e, t) {
2508
- const n = [];
2509
- do {
2510
- const { type: i, descriptor: r, consumedLength: s, releasePrevious: u, releaseSelf: a = !0, repeat: c } = St(t, "keyboard");
2511
- var o;
2512
- const l = (o = e.find((h) => {
2513
- if (i === "[") {
2514
- var v;
2515
- return ((v = h.code) === null || v === void 0 ? void 0 : v.toLowerCase()) === r.toLowerCase();
2516
- } else if (i === "{") {
2517
- var y;
2518
- return ((y = h.key) === null || y === void 0 ? void 0 : y.toLowerCase()) === r.toLowerCase();
2519
- }
2520
- return h.key === r;
2521
- })) !== null && o !== void 0 ? o : {
2522
- key: "Unknown",
2523
- code: "Unknown",
2524
- [i === "[" ? "code" : "key"]: r
2525
- };
2526
- n.push({
2527
- keyDef: l,
2528
- releasePrevious: u,
2529
- releaseSelf: a,
2530
- repeat: c
2531
- }), t = t.slice(s);
2532
- } while (t);
2533
- return n;
2534
- }
2535
- async function Fo(e) {
2536
- const t = $o(this.config.keyboardMap, e);
2537
- for (let n = 0; n < t.length; n++)
2538
- await Q(this.config), await Ko(this, t[n]);
2539
- }
2540
- async function Ko(e, { keyDef: t, releasePrevious: n, releaseSelf: o, repeat: i }) {
2541
- const { system: r } = e;
2542
- if (r.keyboard.isKeyPressed(t) && await r.keyboard.keyup(e, t), !n) {
2543
- for (let s = 1; s <= i; s++)
2544
- await r.keyboard.keydown(e, t), s < i && await Q(e.config);
2545
- o && await r.keyboard.keyup(e, t);
2546
- }
2547
- }
2548
- async function Vo(e) {
2549
- for (const t of e.system.keyboard.getPressedKeys())
2550
- await e.system.keyboard.keyup(e, t);
2551
- }
2552
- function qt(e) {
2553
- const t = S(e) ? {
2554
- "text/plain": Ro(e)
2555
- } : {
2556
- "text/plain": String(e.ownerDocument.getSelection())
2557
- }, n = Ke(k(e));
2558
- for (const o in t)
2559
- t[o] && n.setData(o, t[o]);
2560
- return n;
2561
- }
2562
- function Ro(e) {
2563
- const t = ie(e);
2564
- return C(e).substring(t.startOffset, t.endOffset);
2565
- }
2566
- async function jo() {
2567
- const e = this.config.document;
2568
- var t;
2569
- const n = (t = e.activeElement) !== null && t !== void 0 ? t : (
2570
- /* istanbul ignore next */
2571
- e.body
2572
- ), o = qt(n);
2573
- if (o.items.length !== 0)
2574
- return this.dispatchUIEvent(n, "copy", {
2575
- clipboardData: o
2576
- }) && this.config.writeToClipboard && await Tt(e, o), o;
2577
- }
2578
- async function Ho() {
2579
- const e = this.config.document;
2580
- var t;
2581
- const n = (t = e.activeElement) !== null && t !== void 0 ? t : (
2582
- /* istanbul ignore next */
2583
- e.body
2584
- ), o = qt(n);
2585
- if (o.items.length !== 0)
2586
- return this.dispatchUIEvent(n, "cut", {
2587
- clipboardData: o
2588
- }) && this.config.writeToClipboard && await Tt(n.ownerDocument, o), o;
2589
- }
2590
- async function qo(e) {
2591
- const t = this.config.document;
2592
- var n;
2593
- const o = (n = t.activeElement) !== null && n !== void 0 ? n : (
2594
- /* istanbul ignore next */
2595
- t.body
2596
- );
2597
- var i;
2598
- const r = (i = typeof e == "string" ? Go(t, e) : e) !== null && i !== void 0 ? i : await pn(t).catch(() => {
2599
- throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.");
2600
- });
2601
- this.dispatchUIEvent(o, "paste", {
2602
- clipboardData: r
2603
- });
2604
- }
2605
- function Go(e, t) {
2606
- const n = Ke(k(e));
2607
- return n.setData("text", t), n;
2608
- }
2609
- function ft(e, t) {
2610
- const n = [];
2611
- do {
2612
- const { descriptor: o, consumedLength: i, releasePrevious: r, releaseSelf: s = !0 } = St(t, "pointer"), u = e.find((a) => a.name === o);
2613
- u && n.push({
2614
- keyDef: u,
2615
- releasePrevious: r,
2616
- releaseSelf: s
2617
- }), t = t.slice(i);
2618
- } while (t);
2619
- return n;
2620
- }
2621
- async function Wo(e) {
2622
- const { pointerMap: t } = this.config, n = [];
2623
- (Array.isArray(e) ? e : [
2624
- e
2625
- ]).forEach((o) => {
2626
- typeof o == "string" ? n.push(...ft(t, o)) : "keys" in o ? n.push(...ft(t, o.keys).map((i) => ({
2627
- ...o,
2628
- ...i
2629
- }))) : n.push(o);
2630
- });
2631
- for (let o = 0; o < n.length; o++)
2632
- await Q(this.config), await zo(this, n[o]);
2633
- this.system.pointer.resetClickCount();
2634
- }
2635
- async function zo(e, t) {
2636
- var n, o;
2637
- const i = "pointerName" in t && t.pointerName ? t.pointerName : "keyDef" in t ? e.system.pointer.getPointerName(t.keyDef) : "mouse", r = e.system.pointer.getPreviousPosition(i);
2638
- var s, u, a, c;
2639
- const l = {
2640
- target: (s = t.target) !== null && s !== void 0 ? s : Xo(e, r),
2641
- coords: (u = t.coords) !== null && u !== void 0 ? u : r?.coords,
2642
- caret: {
2643
- node: (a = t.node) !== null && a !== void 0 ? a : pt(t) || r == null || (n = r.caret) === null || n === void 0 ? void 0 : n.node,
2644
- offset: (c = t.offset) !== null && c !== void 0 ? c : pt(t) || r == null || (o = r.caret) === null || o === void 0 ? void 0 : o.offset
2645
- }
2646
- };
2647
- "keyDef" in t ? (e.system.pointer.isKeyPressed(t.keyDef) && (Y(e, m.Trigger), await e.system.pointer.release(e, t.keyDef, l)), t.releasePrevious || (Y(e, m.Trigger), await e.system.pointer.press(e, t.keyDef, l), t.releaseSelf && (Y(e, m.Trigger), await e.system.pointer.release(e, t.keyDef, l)))) : (Y(e, m.Trigger), await e.system.pointer.move(e, i, l));
2648
- }
2649
- function pt(e) {
2650
- var t, n;
2651
- return !!((n = (t = e.target) !== null && t !== void 0 ? t : e.node) !== null && n !== void 0 ? n : e.offset !== void 0);
2652
- }
2653
- function Xo(e, t) {
2654
- if (!t)
2655
- throw new Error("This pointer has no previous position. Provide a target property!");
2656
- var n;
2657
- return (n = t.target) !== null && n !== void 0 ? n : e.config.document.body;
2658
- }
2659
- async function Jo(e) {
2660
- if (!W(e) || P(e))
2661
- throw new Error("clear()` is only supported on editable elements.");
2662
- if (N(e), e.ownerDocument.activeElement !== e)
2663
- throw new Error("The element to be cleared could not be focused.");
2664
- if (Ut(e), !zn(e))
2665
- throw new Error("The element content to be cleared could not be selected.");
2666
- J(this, e, "", "deleteContentBackward");
2667
- }
2668
- async function Qo(e, t) {
2669
- return Gt.call(this, !0, e, t);
2670
- }
2671
- async function Zo(e, t) {
2672
- return Gt.call(this, !1, e, t);
2673
- }
2674
- async function Gt(e, t, n) {
2675
- if (!e && !t.multiple)
2676
- throw R().getElementError("Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.", t);
2677
- const o = Array.isArray(n) ? n : [
2678
- n
2679
- ], i = Array.from(t.querySelectorAll('option, [role="option"]')), r = o.map((u) => {
2680
- if (typeof u != "string" && i.includes(u))
2681
- return u;
2682
- {
2683
- const a = i.find((c) => c.value === u || c.innerHTML === u);
2684
- if (a)
2685
- return a;
2686
- throw R().getElementError(`Value "${String(u)}" not found in options`, t);
2687
- }
2688
- }).filter((u) => !P(u));
2689
- if (P(t) || !r.length)
2690
- return;
2691
- const s = (u) => {
2692
- u.selected = e, this.dispatchUIEvent(t, "input", {
2693
- bubbles: !0,
2694
- cancelable: !1,
2695
- composed: !0
2696
- }), this.dispatchUIEvent(t, "change");
2697
- };
2698
- if (f(t, "select"))
2699
- if (t.multiple)
2700
- for (const u of r) {
2701
- const a = this.config.pointerEventsCheck === 0 ? !0 : Ee(this, u);
2702
- a && (this.dispatchUIEvent(u, "pointerover"), this.dispatchUIEvent(t, "pointerenter"), this.dispatchUIEvent(u, "mouseover"), this.dispatchUIEvent(t, "mouseenter"), this.dispatchUIEvent(u, "pointermove"), this.dispatchUIEvent(u, "mousemove"), this.dispatchUIEvent(u, "pointerdown"), this.dispatchUIEvent(u, "mousedown")), N(t), a && (this.dispatchUIEvent(u, "pointerup"), this.dispatchUIEvent(u, "mouseup")), s(u), a && this.dispatchUIEvent(u, "click"), await Q(this.config);
2703
- }
2704
- else if (r.length === 1) {
2705
- const u = this.config.pointerEventsCheck === 0 ? !0 : Ee(this, t);
2706
- u ? await this.click(t) : N(t), s(r[0]), u && (this.dispatchUIEvent(t, "pointerover"), this.dispatchUIEvent(t, "pointerenter"), this.dispatchUIEvent(t, "mouseover"), this.dispatchUIEvent(t, "mouseenter"), this.dispatchUIEvent(t, "pointerup"), this.dispatchUIEvent(t, "mouseup"), this.dispatchUIEvent(t, "click")), await Q(this.config);
2707
- } else
2708
- throw R().getElementError("Cannot select multiple options on a non-multiple select", t);
2709
- else if (t.getAttribute("role") === "listbox")
2710
- for (const u of r)
2711
- await this.click(u), await this.unhover(u);
2712
- else
2713
- throw R().getElementError("Cannot select options on elements that are neither select nor listbox elements", t);
2714
- }
2715
- async function Yo(e, t, { skipClick: n = this.config.skipClick, skipAutoClose: o = this.config.skipAutoClose, initialSelectionStart: i, initialSelectionEnd: r } = {}) {
2716
- e.disabled || (n || await this.click(e), i !== void 0 && ee(e, i, r ?? i), await this.keyboard(t), o || await Vo(this));
2717
- }
2718
- const ht = Symbol("files and value properties are mocked");
2719
- function Be(e, t, n) {
2720
- n ? Object.defineProperty(e, t, n) : delete e[t];
2721
- }
2722
- function ei(e, t) {
2723
- var n;
2724
- (n = e[ht]) === null || n === void 0 || n.restore();
2725
- const o = Object.getOwnPropertyDescriptor(e, "type"), i = Object.getOwnPropertyDescriptor(e, "value"), r = Object.getOwnPropertyDescriptor(e, "files");
2726
- function s() {
2727
- Be(e, "type", o), Be(e, "value", i), Be(e, "files", r);
2728
- }
2729
- e[ht] = {
2730
- restore: s
2731
- }, Object.defineProperties(e, {
2732
- files: {
2733
- configurable: !0,
2734
- get: () => t
2735
- },
2736
- value: {
2737
- configurable: !0,
2738
- get: () => t.length ? `C:\\fakepath\\${t[0].name}` : "",
2739
- set(u) {
2740
- if (u === "")
2741
- s();
2742
- else {
2743
- var a;
2744
- i == null || (a = i.set) === null || a === void 0 || a.call(e, u);
2745
- }
2746
- }
2747
- },
2748
- type: {
2749
- configurable: !0,
2750
- get: () => "file",
2751
- set(u) {
2752
- u !== "file" && (s(), e.type = u);
2753
- }
2754
- }
2755
- });
2756
- }
2757
- async function ti(e, t) {
2758
- const n = f(e, "label") ? e.control : e;
2759
- if (!n || !f(n, "input", {
2760
- type: "file"
2761
- }))
2762
- throw new TypeError(`The ${n === e ? "given" : "associated"} ${n?.tagName} element does not accept file uploads`);
2763
- if (P(e))
2764
- return;
2765
- const o = (Array.isArray(t) ? t : [
2766
- t
2767
- ]).filter((r) => !this.config.applyAccept || ni(r, n.accept)).slice(0, n.multiple ? void 0 : 1), i = () => {
2768
- var r;
2769
- o.length === ((r = n.files) === null || r === void 0 ? void 0 : r.length) && o.every((s, u) => {
2770
- var a;
2771
- return s === ((a = n.files) === null || a === void 0 ? void 0 : a.item(u));
2772
- }) || (ei(n, Fe(k(e), o)), this.dispatchUIEvent(n, "input"), this.dispatchUIEvent(n, "change"));
2773
- };
2774
- n.addEventListener("fileDialog", i), await this.click(e), n.removeEventListener("fileDialog", i);
2775
- }
2776
- function ni(e, t) {
2777
- if (!t)
2778
- return !0;
2779
- const n = [
2780
- "audio/*",
2781
- "image/*",
2782
- "video/*"
2783
- ];
2784
- return t.split(",").some((o) => o.startsWith(".") ? e.name.endsWith(o) : n.includes(o) ? e.type.startsWith(o.substr(0, o.length - 1)) : e.type === o);
2785
- }
2786
- const vt = {
2787
- click: Oo,
2788
- dblClick: Bo,
2789
- tripleClick: Uo,
2790
- hover: No,
2791
- unhover: Mo,
2792
- tab: Lo,
2793
- keyboard: Fo,
2794
- copy: jo,
2795
- cut: Ho,
2796
- paste: qo,
2797
- pointer: Wo,
2798
- clear: Jo,
2799
- deselectOptions: Zo,
2800
- selectOptions: Qo,
2801
- type: Yo,
2802
- upload: ti
2803
- };
2804
- function oi(e) {
2805
- return R().asyncWrapper(e);
2806
- }
2807
- const Wt = {
2808
- applyAccept: !0,
2809
- autoModify: !0,
2810
- delay: 0,
2811
- document: globalThis.document,
2812
- keyboardMap: mo,
2813
- pointerMap: Eo,
2814
- pointerEventsCheck: H.EachApiCall,
2815
- skipAutoClose: !1,
2816
- skipClick: !1,
2817
- skipHover: !1,
2818
- writeToClipboard: !1,
2819
- advanceTimers: () => Promise.resolve()
2820
- }, ii = {
2821
- ...Wt,
2822
- writeToClipboard: !0
2823
- };
2824
- function zt(e = {}, t = ii, n) {
2825
- const o = ai(e, n, t);
2826
- return {
2827
- ...t,
2828
- ...e,
2829
- document: o
2830
- };
2831
- }
2832
- function ri(e = {}) {
2833
- const t = zt(e);
2834
- Ft(t.document);
2835
- var n;
2836
- const o = (n = t.document.defaultView) !== null && n !== void 0 ? n : (
2837
- /* istanbul ignore next */
2838
- globalThis.window
2839
- );
2840
- return ln(o), qe(t).api;
2841
- }
2842
- function b({ keyboardState: e, pointerState: t, ...n } = {}, o) {
2843
- const i = zt(n, Wt, o);
2844
- Ft(i.document);
2845
- var r;
2846
- const s = (r = t ?? e) !== null && r !== void 0 ? r : new Ht();
2847
- return {
2848
- api: qe(i, s).api,
2849
- system: s
2850
- };
2851
- }
2852
- function si(e) {
2853
- return qe({
2854
- ...this.config,
2855
- ...e
2856
- }, this.system).api;
2857
- }
2858
- function ui(e, t) {
2859
- function n(...o) {
2860
- return Y(e, m.Call), oi(() => t.apply(e, o).then(async (i) => (await Q(e.config), i)));
2861
- }
2862
- return Object.defineProperty(n, "name", {
2863
- get: () => t.name
2864
- }), n;
2865
- }
2866
- function qe(e, t = new Ht()) {
2867
- const n = {};
2868
- return Object.assign(n, {
2869
- config: e,
2870
- dispatchEvent: $t.bind(n),
2871
- dispatchUIEvent: uo.bind(n),
2872
- system: t,
2873
- levelRefs: {},
2874
- ...vt
2875
- }), {
2876
- instance: n,
2877
- api: {
2878
- ...Object.fromEntries(Object.entries(vt).map(([o, i]) => [
2879
- o,
2880
- ui(n, i)
2881
- ])),
2882
- setup: si.bind(n)
2883
- }
2884
- };
2885
- }
2886
- function ai(e, t, n) {
2887
- var o, i;
2888
- return (i = (o = e.document) !== null && o !== void 0 ? o : t && ho(t)) !== null && i !== void 0 ? i : n.document;
2889
- }
2890
- function ci(e) {
2891
- return b().api.clear(e);
2892
- }
2893
- function li(e, t = {}) {
2894
- return b(t, e).api.click(e);
2895
- }
2896
- function di(e = {}) {
2897
- return b(e).api.copy();
2898
- }
2899
- function fi(e = {}) {
2900
- return b(e).api.cut();
2901
- }
2902
- function pi(e, t = {}) {
2903
- return b(t).api.dblClick(e);
2904
- }
2905
- function hi(e, t, n = {}) {
2906
- return b(n).api.deselectOptions(e, t);
2907
- }
2908
- function vi(e, t = {}) {
2909
- return b(t).api.hover(e);
2910
- }
2911
- async function gi(e, t = {}) {
2912
- const { api: n, system: o } = b(t);
2913
- return n.keyboard(e).then(() => o);
2914
- }
2915
- async function yi(e, t = {}) {
2916
- const { api: n, system: o } = b(t);
2917
- return n.pointer(e).then(() => o);
2918
- }
2919
- function bi(e, t) {
2920
- return b(t).api.paste(e);
2921
- }
2922
- function mi(e, t, n = {}) {
2923
- return b(n).api.selectOptions(e, t);
2924
- }
2925
- function Ei(e, t = {}) {
2926
- return b(t).api.tripleClick(e);
2927
- }
2928
- function wi(e, t, n = {}) {
2929
- return b(n, e).api.type(e, t, n);
2930
- }
2931
- function Ti(e, t = {}) {
2932
- const { api: n, system: o } = b(t);
2933
- return o.pointer.setMousePosition({
2934
- target: e
2935
- }), n.unhover(e);
2936
- }
2937
- function Ii(e, t, n = {}) {
2938
- return b(n).api.upload(e, t);
2939
- }
2940
- function ki(e = {}) {
2941
- return b().api.tab(e);
2942
- }
2943
- const Si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2944
- __proto__: null,
2945
- clear: ci,
2946
- click: li,
2947
- copy: di,
2948
- cut: fi,
2949
- dblClick: pi,
2950
- deselectOptions: hi,
2951
- hover: vi,
2952
- keyboard: gi,
2953
- paste: bi,
2954
- pointer: yi,
2955
- selectOptions: mi,
2956
- tab: ki,
2957
- tripleClick: Ei,
2958
- type: wi,
2959
- unhover: Ti,
2960
- upload: Ii
2961
- }, Symbol.toStringTag, { value: "Module" })), gt = {
2962
- ...Si,
2963
- setup: ri
2964
- }, Xt = I.fn();
2965
- I.mock("react-hook-form", () => ({
2966
- ...I.importActual("react-hook-form"),
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { r as a, s as t, f as T, w as p } from "../../../react.esm-BBemCHUU.js";
3
+ import { u as B } from "../../../index-DfbRag7b.js";
4
+ import { FormSelect as i } from "./FormSelect.js";
5
+ import { SelectTooltipText as d } from "./SelectTooltipText.js";
6
+ import { v as n, d as f, t as u, g as e } from "../../../vi.JYQecGiw-BbUbJcT8.js";
7
+ const g = n.fn();
8
+ n.mock("react-hook-form", () => ({
9
+ ...n.importActual("react-hook-form"),
2967
10
  Controller: ({
2968
- render: e
2969
- }) => e({
11
+ render: s
12
+ }) => s({
2970
13
  field: {
2971
14
  ref: void 0,
2972
- onChange: Xt,
15
+ onChange: g,
2973
16
  value: "3"
2974
17
  }
2975
18
  }),
2976
19
  useFormContext: () => ({
2977
20
  control: {
2978
- register: I.fn(),
2979
- unregister: I.fn(),
2980
- getFieldState: I.fn(),
21
+ register: n.fn(),
22
+ unregister: n.fn(),
23
+ getFieldState: n.fn(),
2981
24
  _names: {
2982
25
  array: new Set("test"),
2983
26
  mount: new Set("test"),
@@ -2987,11 +30,11 @@ I.mock("react-hook-form", () => ({
2987
30
  watchAll: !1
2988
31
  },
2989
32
  _subjects: {
2990
- watch: I.fn(),
2991
- array: I.fn(),
2992
- state: I.fn()
33
+ watch: n.fn(),
34
+ array: n.fn(),
35
+ state: n.fn()
2993
36
  },
2994
- _getWatch: I.fn(),
37
+ _getWatch: n.fn(),
2995
38
  _formValues: ["test"],
2996
39
  _defaultValues: ["test"]
2997
40
  },
@@ -2999,12 +42,12 @@ I.mock("react-hook-form", () => ({
2999
42
  getFieldState: () => ({ invalid: !1 })
3000
43
  })
3001
44
  }));
3002
- on("FormSelect Test", () => {
3003
- const e = [
45
+ f("FormSelect Test", () => {
46
+ const s = [
3004
47
  { id: "1", value: "Germany", description: "" },
3005
48
  { id: "2", value: "France", description: "" },
3006
49
  { id: "3", value: "Afar", description: "" }
3007
- ], t = [
50
+ ], m = [
3008
51
  {
3009
52
  groupValue: "Europe",
3010
53
  groupName: "Europe",
@@ -3019,93 +62,93 @@ on("FormSelect Test", () => {
3019
62
  options: [{ id: "3", value: "Afar", description: "" }]
3020
63
  }
3021
64
  ];
3022
- D("render FormSelect", () => {
3023
- x(
3024
- /* @__PURE__ */ A(
3025
- ue,
65
+ u("render FormSelect", () => {
66
+ a(
67
+ /* @__PURE__ */ r(
68
+ i,
3026
69
  {
3027
70
  label: "address.country",
3028
71
  rules: { required: { value: !0, message: "required" } },
3029
72
  propertyName: "countryId",
3030
- options: e,
73
+ options: s,
3031
74
  valueKey: "id",
3032
75
  textKey: "value"
3033
76
  }
3034
77
  )
3035
78
  );
3036
- const n = p.getByRole("combobox");
3037
- d(n).toBeInTheDocument(), d(n).toBeInstanceOf(HTMLInputElement), d(p.getByText("address.country")).toBeInTheDocument(), d(p.getByText("Afar")).toBeInTheDocument(), d(p.getByText("required")).toBeInTheDocument();
3038
- }), D("render grouped FormSelect and click on option", () => {
3039
- x(
3040
- /* @__PURE__ */ A(
3041
- ue,
79
+ const o = t.getByRole("combobox");
80
+ e(o).toBeInTheDocument(), e(o).toBeInstanceOf(HTMLInputElement), e(t.getByText("address.country")).toBeInTheDocument(), e(t.getByText("Afar")).toBeInTheDocument(), e(t.getByText("required")).toBeInTheDocument();
81
+ }), u("render grouped FormSelect and click on option", () => {
82
+ a(
83
+ /* @__PURE__ */ r(
84
+ i,
3042
85
  {
3043
86
  label: "address.country",
3044
87
  rules: { required: { value: !0, message: "required" } },
3045
88
  propertyName: "countryId",
3046
- options: t,
89
+ options: m,
3047
90
  valueKey: "id",
3048
91
  textKey: "value"
3049
92
  }
3050
93
  )
3051
94
  );
3052
- const n = p.getByRole("combobox");
3053
- d(n).toBeInTheDocument(), d(n).toBeInstanceOf(HTMLInputElement), d(p.getByText("address.country")).toBeInTheDocument(), d(p.getByText("Afar")).toBeInTheDocument(), d(p.getByText("required")).toBeInTheDocument(), Ge.mouseDown(n);
3054
- const o = p.getByText("Africa");
3055
- d(o).toBeInTheDocument(), d(o.parentElement?.parentElement).toBeInstanceOf(HTMLHeadingElement);
3056
- const i = p.getByText("Europe");
3057
- d(i).toBeInTheDocument(), d(i.parentElement?.parentElement).toBeInstanceOf(HTMLHeadingElement);
3058
- const r = p.getByText("France");
3059
- d(r).toBeInTheDocument(), d(r.parentElement?.parentElement).not.toBeInstanceOf(HTMLHeadingElement), d(p.getByText("Germany")).toBeInTheDocument(), d(p.getAllByText("Afar")).toHaveLength(2), Ge.click(r), d(Xt).toBeCalledWith("2");
3060
- }), D("render grouped FormSelect and hover to see tooltip on fixedHeightInput", async () => {
3061
- const n = gt.setup();
3062
- x(
3063
- /* @__PURE__ */ A(
3064
- ue,
95
+ const o = t.getByRole("combobox");
96
+ e(o).toBeInTheDocument(), e(o).toBeInstanceOf(HTMLInputElement), e(t.getByText("address.country")).toBeInTheDocument(), e(t.getByText("Afar")).toBeInTheDocument(), e(t.getByText("required")).toBeInTheDocument(), T.mouseDown(o);
97
+ const c = t.getByText("Africa");
98
+ e(c).toBeInTheDocument(), e(c.parentElement?.parentElement).toBeInstanceOf(HTMLHeadingElement);
99
+ const l = t.getByText("Europe");
100
+ e(l).toBeInTheDocument(), e(l.parentElement?.parentElement).toBeInstanceOf(HTMLHeadingElement);
101
+ const y = t.getByText("France");
102
+ e(y).toBeInTheDocument(), e(y.parentElement?.parentElement).not.toBeInstanceOf(HTMLHeadingElement), e(t.getByText("Germany")).toBeInTheDocument(), e(t.getAllByText("Afar")).toHaveLength(2), T.click(y), e(g).toBeCalledWith("2");
103
+ }), u("render grouped FormSelect and hover to see tooltip on fixedHeightInput", async () => {
104
+ const o = B.setup();
105
+ a(
106
+ /* @__PURE__ */ r(
107
+ i,
3065
108
  {
3066
109
  label: "address.country",
3067
110
  rules: { required: { value: !0, message: "required" } },
3068
111
  propertyName: "countryId",
3069
- options: t,
112
+ options: m,
3070
113
  valueKey: "id",
3071
114
  textKey: "value",
3072
115
  fixedHeightInput: !0
3073
116
  }
3074
117
  )
3075
118
  );
3076
- const o = document.querySelector('div[data-tooltip-id="address.country"]');
3077
- d(o).toBeInTheDocument();
3078
- const i = p.getByRole("combobox");
3079
- d(i).toBeInTheDocument(), d(i).toBeInstanceOf(HTMLInputElement), d(p.getByText("address.country")).toBeInTheDocument(), d(p.getByText("Afar")).toBeInTheDocument(), d(p.getByText("required")).toBeInTheDocument(), n.hover(p.getByText("Afar")), await We(() => {
3080
- d(p.getByRole("tooltip")).toBeInTheDocument();
119
+ const c = document.querySelector('div[data-tooltip-id="address.country"]');
120
+ e(c).toBeInTheDocument();
121
+ const l = t.getByRole("combobox");
122
+ e(l).toBeInTheDocument(), e(l).toBeInstanceOf(HTMLInputElement), e(t.getByText("address.country")).toBeInTheDocument(), e(t.getByText("Afar")).toBeInTheDocument(), e(t.getByText("required")).toBeInTheDocument(), o.hover(t.getByText("Afar")), await p(() => {
123
+ e(t.getByRole("tooltip")).toBeInTheDocument();
3081
124
  });
3082
- }), D("render grouped FormSelect and no tooltip on fixedHeightInput === false", async () => {
3083
- const n = gt.setup();
3084
- x(
3085
- /* @__PURE__ */ A(
3086
- ue,
125
+ }), u("render grouped FormSelect and no tooltip on fixedHeightInput === false", async () => {
126
+ const o = B.setup();
127
+ a(
128
+ /* @__PURE__ */ r(
129
+ i,
3087
130
  {
3088
131
  label: "address.country",
3089
132
  rules: { required: { value: !0, message: "required" } },
3090
133
  propertyName: "countryId",
3091
- options: t,
134
+ options: m,
3092
135
  valueKey: "id",
3093
136
  textKey: "value",
3094
137
  fixedHeightInput: !1
3095
138
  }
3096
139
  )
3097
140
  );
3098
- const o = document.querySelector('div[data-tooltip-id="address.country"]');
3099
- d(o).toBeInTheDocument(), d(p.getByText("Afar")).toBeInTheDocument(), n.hover(p.getByText("Afar")), await We(() => {
3100
- d(p.queryByRole("tooltip")).not.toBeInTheDocument();
141
+ const c = document.querySelector('div[data-tooltip-id="address.country"]');
142
+ e(c).toBeInTheDocument(), e(t.getByText("Afar")).toBeInTheDocument(), o.hover(t.getByText("Afar")), await p(() => {
143
+ e(t.queryByRole("tooltip")).not.toBeInTheDocument();
3101
144
  });
3102
- }), D("render ToolTipText", async () => {
3103
- x(/* @__PURE__ */ A(ae, { value: e[0], textKey: "value", valueKey: "id" })), d(p.getByText("Germany")).toBeInTheDocument();
3104
- }), D("render ToolTipText with multiple entries", async () => {
3105
- x(/* @__PURE__ */ A(ae, { value: e, textKey: "value", valueKey: "id" })), d(p.getByText("Afar")).toBeInTheDocument(), d(p.getByText("France")).toBeInTheDocument(), d(p.getByText("Germany")).toBeInTheDocument();
3106
- }), D("render ToolTipText with no entries", async () => {
3107
- x(/* @__PURE__ */ A(ae, { value: [], textKey: "value", valueKey: "id" })), d(p.queryByText("Afar")).not.toBeInTheDocument(), d(p.queryByText("France")).not.toBeInTheDocument(), d(p.queryByText("Germany")).not.toBeInTheDocument();
3108
- }), D("render ToolTipText with no entries", async () => {
3109
- x(/* @__PURE__ */ A(ae, { value: void 0, textKey: "value", valueKey: "id" })), d(p.queryByText("Afar")).not.toBeInTheDocument(), d(p.queryByText("France")).not.toBeInTheDocument(), d(p.queryByText("Germany")).not.toBeInTheDocument();
145
+ }), u("render ToolTipText", async () => {
146
+ a(/* @__PURE__ */ r(d, { value: s[0], textKey: "value", valueKey: "id" })), e(t.getByText("Germany")).toBeInTheDocument();
147
+ }), u("render ToolTipText with multiple entries", async () => {
148
+ a(/* @__PURE__ */ r(d, { value: s, textKey: "value", valueKey: "id" })), e(t.getByText("Afar")).toBeInTheDocument(), e(t.getByText("France")).toBeInTheDocument(), e(t.getByText("Germany")).toBeInTheDocument();
149
+ }), u("render ToolTipText with no entries", async () => {
150
+ a(/* @__PURE__ */ r(d, { value: [], textKey: "value", valueKey: "id" })), e(t.queryByText("Afar")).not.toBeInTheDocument(), e(t.queryByText("France")).not.toBeInTheDocument(), e(t.queryByText("Germany")).not.toBeInTheDocument();
151
+ }), u("render ToolTipText with no entries", async () => {
152
+ a(/* @__PURE__ */ r(d, { value: void 0, textKey: "value", valueKey: "id" })), e(t.queryByText("Afar")).not.toBeInTheDocument(), e(t.queryByText("France")).not.toBeInTheDocument(), e(t.queryByText("Germany")).not.toBeInTheDocument();
3110
153
  });
3111
154
  });