@midas-ds/components 1.0.2
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.
- package/Breadcrumbs.css +1 -0
- package/Button-CCevm2s3.js +183 -0
- package/Button.css +1 -0
- package/ButtonGroup.css +1 -0
- package/CHANGELOG.md +76 -0
- package/Card.css +1 -0
- package/Checkbox-CllWDBxF.js +405 -0
- package/Checkbox.css +1 -0
- package/Collection-B3xUVWPF.js +483 -0
- package/ComboBox.css +1 -0
- package/DatePicker.css +1 -0
- package/Dialog-CLTyYwkS.js +1889 -0
- package/DragAndDrop-OTN7La7U.js +42 -0
- package/Dropdown.css +1 -0
- package/FileUpload.css +1 -0
- package/Flex.css +1 -0
- package/Flex.module-CpoxBzQX.js +37 -0
- package/FocusScope-BR0SJ-cZ.js +512 -0
- package/Form-DXLoQL91.js +240 -0
- package/Grid.css +1 -0
- package/Grid.module-Ia0e9Dix.js +36 -0
- package/Group-DPMuN3h8.js +44 -0
- package/Hidden-BQWDvze4.js +37 -0
- package/InfoBanner.css +1 -0
- package/Label-C18A_4Z5.js +69 -0
- package/Layout.css +1 -0
- package/Link-BU1h3K2a.js +77 -0
- package/Link.css +1 -0
- package/LinkButton.css +1 -0
- package/ListBox-D21tdwTs.js +463 -0
- package/ListKeyboardDelegate-DxMjfMsI.js +172 -0
- package/Logo.css +1 -0
- package/Modal.css +1 -0
- package/MultiSelect.css +1 -0
- package/PressResponder-DP8ZDNGy.js +31 -0
- package/README.md +7 -0
- package/RSPContexts-EOiWkKOf.js +11 -0
- package/Radio.css +1 -0
- package/SearchField.css +1 -0
- package/Select.css +1 -0
- package/SelectionManager-D4WtKtey.js +988 -0
- package/Separator-DLUHK9vv.js +48 -0
- package/Spinner.css +1 -0
- package/Table.css +1 -0
- package/Tabs.css +1 -0
- package/Tag-CEd6WWSc.js +725 -0
- package/Tag.css +1 -0
- package/Text-DGLaY3HR.js +17 -0
- package/TextArea.css +1 -0
- package/TextField-C_hq9WeT.js +226 -0
- package/TextField.css +1 -0
- package/TextField.module-Cwq1FAm7.js +141 -0
- package/Toast.css +1 -0
- package/VisuallyHidden-B_XzVvlX.js +39 -0
- package/accordion/Accordion.d.ts +13 -0
- package/accordion/AccordionContent.d.ts +3 -0
- package/accordion/AccordionItem.d.ts +3 -0
- package/accordion/AccordionTagContext.d.ts +3 -0
- package/accordion/AccordionTrigger.d.ts +3 -0
- package/accordion/index.d.ts +5 -0
- package/breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/breadcrumbs/index.d.ts +1 -0
- package/button/Button.d.ts +41 -0
- package/button/ButtonGroup.d.ts +12 -0
- package/button/index.d.ts +2 -0
- package/card/Card.d.ts +34 -0
- package/card/index.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -0
- package/checkbox/CheckboxGroup.d.ts +10 -0
- package/checkbox/index.d.ts +2 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-right-DBMc9VMi.js +23 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/combobox/ComboBox.d.ts +12 -0
- package/combobox/index.d.ts +1 -0
- package/context-ScOIq_Gu.js +80 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-picker/DatePicker.d.ts +14 -0
- package/date-picker/index.d.ts +2 -0
- package/dropdown/Dropdown.d.ts +8 -0
- package/dropdown/index.d.ts +1 -0
- package/file-upload/FileUpload.d.ts +11 -0
- package/file-upload/index.d.ts +1 -0
- package/flex/Flex.d.ts +17 -0
- package/flex/FlexItem.d.ts +15 -0
- package/flex/index.d.ts +2 -0
- package/grid/Grid.d.ts +16 -0
- package/grid/GridItem.d.ts +7 -0
- package/grid/index.d.ts +2 -0
- package/index-CEg5vZQH.js +132 -0
- package/index-CgfokhRq.js +674 -0
- package/index-CorR1LBD.js +3122 -0
- package/index-Dl1Q-tbj.js +26984 -0
- package/index.css +1 -0
- package/index.d.ts +29 -0
- package/index.js +114 -0
- package/index10.js +4 -0
- package/index11.js +5 -0
- package/index12.js +4 -0
- package/index13.js +4 -0
- package/index14.js +4 -0
- package/index15.js +6 -0
- package/index16.js +6 -0
- package/index17.js +6 -0
- package/index18.js +4 -0
- package/index19.js +6 -0
- package/index2.js +8 -0
- package/index20.js +6 -0
- package/index21.js +4 -0
- package/index22.js +5 -0
- package/index23.js +5 -0
- package/index24.js +5 -0
- package/index25.js +6 -0
- package/index26.js +6 -0
- package/index27.js +6 -0
- package/index28.js +4 -0
- package/index29.js +12 -0
- package/index3.js +8 -0
- package/index30.js +20 -0
- package/index31.js +22 -0
- package/index32.js +14 -0
- package/index33.js +11 -0
- package/index34.js +31 -0
- package/index35.js +8 -0
- package/index36.js +9 -0
- package/index37.js +19 -0
- package/index38.js +9 -0
- package/index39.js +9 -0
- package/index4.js +4 -0
- package/index40.js +16 -0
- package/index41.js +16 -0
- package/index42.js +31 -0
- package/index43.js +16 -0
- package/index44.js +6 -0
- package/index45.js +53 -0
- package/index46.js +18 -0
- package/index47.js +27 -0
- package/index48.js +18 -0
- package/index49.js +21 -0
- package/index5.js +5 -0
- package/index50.js +49 -0
- package/index51.js +5 -0
- package/index52.js +25 -0
- package/index53.js +18 -0
- package/index54.js +9 -0
- package/index55.js +25 -0
- package/index56.js +18 -0
- package/index57.js +11 -0
- package/index58.js +12 -0
- package/index59.js +15 -0
- package/index6.js +4 -0
- package/index60.js +9 -0
- package/index61.js +9 -0
- package/index62.js +19 -0
- package/index63.js +22 -0
- package/index64.js +61 -0
- package/index65.js +15 -0
- package/index66.js +11 -0
- package/index67.js +63 -0
- package/index68.js +85 -0
- package/index69.js +74 -0
- package/index7.js +9 -0
- package/index70.js +24 -0
- package/index71.js +69 -0
- package/index72.js +80 -0
- package/index73.js +140 -0
- package/index74.js +70 -0
- package/index75.js +42 -0
- package/index76.js +82 -0
- package/index77.js +71 -0
- package/index78.js +104 -0
- package/index79.js +274 -0
- package/index8.js +4 -0
- package/index80.js +724 -0
- package/index81.js +491 -0
- package/index82.js +317 -0
- package/index83.js +391 -0
- package/index84.js +254 -0
- package/index85.js +1364 -0
- package/index86.js +1009 -0
- package/index87.js +388 -0
- package/index88.js +2105 -0
- package/index89.js +2371 -0
- package/index9.js +5 -0
- package/index90.js +6834 -0
- package/index91.js +17 -0
- package/index92.js +14 -0
- package/index93.js +6 -0
- package/index94.js +9 -0
- package/info-banner/InfoBanner.d.ts +21 -0
- package/info-banner/index.d.ts +1 -0
- package/intlStrings-Cd44R5hT.js +278 -0
- package/layout/Layout.d.ts +51 -0
- package/layout/index.d.ts +1 -0
- package/link/Link.d.ts +13 -0
- package/link/index.d.ts +1 -0
- package/link-button/LinkButton.d.ts +18 -0
- package/link-button/index.d.ts +1 -0
- package/logo/Logo.d.ts +16 -0
- package/logo/index.d.ts +1 -0
- package/modal/Modal.d.ts +13 -0
- package/modal/index.d.ts +1 -0
- package/multi-select/MultiSelect.d.ts +28 -0
- package/multi-select/index.d.ts +1 -0
- package/package.json +29 -0
- package/radio/Radio.d.ts +20 -0
- package/radio/index.d.ts +1 -0
- package/react.esm-D8HpDGKP.js +11060 -0
- package/search-field/SearchField.d.ts +13 -0
- package/search-field/index.d.ts +1 -0
- package/select/Select.d.ts +11 -0
- package/select/index.d.ts +1 -0
- package/spinner/Spinner.d.ts +11 -0
- package/spinner/index.d.ts +1 -0
- package/table/Table.d.ts +12 -0
- package/table/index.d.ts +1 -0
- package/tabs/Tabs.d.ts +12 -0
- package/tabs/index.d.ts +1 -0
- package/tag/Tag.d.ts +11 -0
- package/tag/index.d.ts +1 -0
- package/textarea/TextArea.d.ts +20 -0
- package/textarea/index.d.ts +1 -0
- package/textfield/TextField.d.ts +16 -0
- package/textfield/index.d.ts +3 -0
- package/theme/index.d.ts +138 -0
- package/theme/tokens.d.ts +135 -0
- package/toast/Toast.d.ts +25 -0
- package/toast/index.d.ts +1 -0
- package/tokens-CjXmpXTi.js +160 -0
- package/triangle-alert-1OYl9KWz.js +56 -0
- package/useControlledState-S_TYcV_c.js +45 -0
- package/useDescription-D4_zk_sA.js +32 -0
- package/useFilter-BnJDBCkt.js +35 -0
- package/useFocusRing-D97-G3fT.js +1324 -0
- package/useFocusable-C-N9wcwm.js +56 -0
- package/useGridSelectionCheckbox-i1rsjlC-.js +22 -0
- package/useHasTabbableChild-DeuCnGGv.js +34 -0
- package/useHighlightSelectionDescription-JVx2MW_e.js +552 -0
- package/useListState-DSOTbsL3.js +119 -0
- package/useLocalizedStringFormatter-DVCAZqcL.js +96 -0
- package/useSingleSelectListState-CmX9_L5H.js +34 -0
- package/useUpdateEffect-Dtz-i14F.js +12 -0
- package/x-JK7i-TQC.js +14 -0
|
@@ -0,0 +1,3122 @@
|
|
|
1
|
+
import { g as X, c as W, e as cn, a as Ut } from "./react.esm-D8HpDGKP.js";
|
|
2
|
+
import { a as ln, b as fn } from "./index-Dl1Q-tbj.js";
|
|
3
|
+
var dn = (e) => {
|
|
4
|
+
const t = e.match(/^[ \t]*(?=\S)/gm);
|
|
5
|
+
return t ? t.reduce((r, n) => Math.min(r, n.length), 1 / 0) : 0;
|
|
6
|
+
};
|
|
7
|
+
const pn = dn;
|
|
8
|
+
var hn = (e) => {
|
|
9
|
+
const t = pn(e);
|
|
10
|
+
if (t === 0)
|
|
11
|
+
return e;
|
|
12
|
+
const r = new RegExp(`^[ \\t]{${t}}`, "gm");
|
|
13
|
+
return e.replace(r, "");
|
|
14
|
+
}, gn = (e, t = 1, r) => {
|
|
15
|
+
if (r = {
|
|
16
|
+
indent: " ",
|
|
17
|
+
includeEmptyLines: !1,
|
|
18
|
+
...r
|
|
19
|
+
}, typeof e != "string")
|
|
20
|
+
throw new TypeError(
|
|
21
|
+
`Expected \`input\` to be a \`string\`, got \`${typeof e}\``
|
|
22
|
+
);
|
|
23
|
+
if (typeof t != "number")
|
|
24
|
+
throw new TypeError(
|
|
25
|
+
`Expected \`count\` to be a \`number\`, got \`${typeof t}\``
|
|
26
|
+
);
|
|
27
|
+
if (typeof r.indent != "string")
|
|
28
|
+
throw new TypeError(
|
|
29
|
+
`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``
|
|
30
|
+
);
|
|
31
|
+
if (t === 0)
|
|
32
|
+
return e;
|
|
33
|
+
const n = r.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
|
34
|
+
return e.replace(n, r.indent.repeat(t));
|
|
35
|
+
};
|
|
36
|
+
const vn = hn, bn = gn;
|
|
37
|
+
var mn = (e, t = 0, r) => bn(vn(e), t, r);
|
|
38
|
+
const st = /* @__PURE__ */ X(mn);
|
|
39
|
+
function yn() {
|
|
40
|
+
this.__data__ = [], this.size = 0;
|
|
41
|
+
}
|
|
42
|
+
var $n = yn;
|
|
43
|
+
function _n(e, t) {
|
|
44
|
+
return e === t || e !== e && t !== t;
|
|
45
|
+
}
|
|
46
|
+
var Kt = _n, wn = Kt;
|
|
47
|
+
function En(e, t) {
|
|
48
|
+
for (var r = e.length; r--; )
|
|
49
|
+
if (wn(e[r][0], t))
|
|
50
|
+
return r;
|
|
51
|
+
return -1;
|
|
52
|
+
}
|
|
53
|
+
var _e = En, An = _e, Sn = Array.prototype, xn = Sn.splice;
|
|
54
|
+
function On(e) {
|
|
55
|
+
var t = this.__data__, r = An(t, e);
|
|
56
|
+
if (r < 0)
|
|
57
|
+
return !1;
|
|
58
|
+
var n = t.length - 1;
|
|
59
|
+
return r == n ? t.pop() : xn.call(t, r, 1), --this.size, !0;
|
|
60
|
+
}
|
|
61
|
+
var Cn = On, Tn = _e;
|
|
62
|
+
function Rn(e) {
|
|
63
|
+
var t = this.__data__, r = Tn(t, e);
|
|
64
|
+
return r < 0 ? void 0 : t[r][1];
|
|
65
|
+
}
|
|
66
|
+
var In = Rn, Nn = _e;
|
|
67
|
+
function jn(e) {
|
|
68
|
+
return Nn(this.__data__, e) > -1;
|
|
69
|
+
}
|
|
70
|
+
var Hn = jn, Pn = _e;
|
|
71
|
+
function Dn(e, t) {
|
|
72
|
+
var r = this.__data__, n = Pn(r, e);
|
|
73
|
+
return n < 0 ? (++this.size, r.push([e, t])) : r[n][1] = t, this;
|
|
74
|
+
}
|
|
75
|
+
var Ln = Dn, Mn = $n, Bn = Cn, kn = In, Vn = Hn, Fn = Ln;
|
|
76
|
+
function Y(e) {
|
|
77
|
+
var t = -1, r = e == null ? 0 : e.length;
|
|
78
|
+
for (this.clear(); ++t < r; ) {
|
|
79
|
+
var n = e[t];
|
|
80
|
+
this.set(n[0], n[1]);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
Y.prototype.clear = Mn;
|
|
84
|
+
Y.prototype.delete = Bn;
|
|
85
|
+
Y.prototype.get = kn;
|
|
86
|
+
Y.prototype.has = Vn;
|
|
87
|
+
Y.prototype.set = Fn;
|
|
88
|
+
var we = Y, qn = we;
|
|
89
|
+
function Gn() {
|
|
90
|
+
this.__data__ = new qn(), this.size = 0;
|
|
91
|
+
}
|
|
92
|
+
var Un = Gn;
|
|
93
|
+
function Kn(e) {
|
|
94
|
+
var t = this.__data__, r = t.delete(e);
|
|
95
|
+
return this.size = t.size, r;
|
|
96
|
+
}
|
|
97
|
+
var zn = Kn;
|
|
98
|
+
function Wn(e) {
|
|
99
|
+
return this.__data__.get(e);
|
|
100
|
+
}
|
|
101
|
+
var Xn = Wn;
|
|
102
|
+
function Yn(e) {
|
|
103
|
+
return this.__data__.has(e);
|
|
104
|
+
}
|
|
105
|
+
var Jn = Yn, Zn = typeof W == "object" && W && W.Object === Object && W, zt = Zn, Qn = zt, ei = typeof self == "object" && self && self.Object === Object && self, ti = Qn || ei || Function("return this")(), F = ti, ri = F, ni = ri.Symbol, et = ni, ot = et, Wt = Object.prototype, ii = Wt.hasOwnProperty, ai = Wt.toString, ae = ot ? ot.toStringTag : void 0;
|
|
106
|
+
function si(e) {
|
|
107
|
+
var t = ii.call(e, ae), r = e[ae];
|
|
108
|
+
try {
|
|
109
|
+
e[ae] = void 0;
|
|
110
|
+
var n = !0;
|
|
111
|
+
} catch {
|
|
112
|
+
}
|
|
113
|
+
var i = ai.call(e);
|
|
114
|
+
return n && (t ? e[ae] = r : delete e[ae]), i;
|
|
115
|
+
}
|
|
116
|
+
var oi = si, ui = Object.prototype, ci = ui.toString;
|
|
117
|
+
function li(e) {
|
|
118
|
+
return ci.call(e);
|
|
119
|
+
}
|
|
120
|
+
var fi = li, ut = et, di = oi, pi = fi, hi = "[object Null]", gi = "[object Undefined]", ct = ut ? ut.toStringTag : void 0;
|
|
121
|
+
function vi(e) {
|
|
122
|
+
return e == null ? e === void 0 ? gi : hi : ct && ct in Object(e) ? di(e) : pi(e);
|
|
123
|
+
}
|
|
124
|
+
var Ee = vi;
|
|
125
|
+
function bi(e) {
|
|
126
|
+
var t = typeof e;
|
|
127
|
+
return e != null && (t == "object" || t == "function");
|
|
128
|
+
}
|
|
129
|
+
var Xt = bi, mi = Ee, yi = Xt, $i = "[object AsyncFunction]", _i = "[object Function]", wi = "[object GeneratorFunction]", Ei = "[object Proxy]";
|
|
130
|
+
function Ai(e) {
|
|
131
|
+
if (!yi(e))
|
|
132
|
+
return !1;
|
|
133
|
+
var t = mi(e);
|
|
134
|
+
return t == _i || t == wi || t == $i || t == Ei;
|
|
135
|
+
}
|
|
136
|
+
var Yt = Ai, Si = F, xi = Si["__core-js_shared__"], Oi = xi, Ne = Oi, lt = function() {
|
|
137
|
+
var e = /[^.]+$/.exec(Ne && Ne.keys && Ne.keys.IE_PROTO || "");
|
|
138
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
139
|
+
}();
|
|
140
|
+
function Ci(e) {
|
|
141
|
+
return !!lt && lt in e;
|
|
142
|
+
}
|
|
143
|
+
var Ti = Ci, Ri = Function.prototype, Ii = Ri.toString;
|
|
144
|
+
function Ni(e) {
|
|
145
|
+
if (e != null) {
|
|
146
|
+
try {
|
|
147
|
+
return Ii.call(e);
|
|
148
|
+
} catch {
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
return e + "";
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return "";
|
|
156
|
+
}
|
|
157
|
+
var Jt = Ni, ji = Yt, Hi = Ti, Pi = Xt, Di = Jt, Li = /[\\^$.*+?()[\]{}|]/g, Mi = /^\[object .+?Constructor\]$/, Bi = Function.prototype, ki = Object.prototype, Vi = Bi.toString, Fi = ki.hasOwnProperty, qi = RegExp(
|
|
158
|
+
"^" + Vi.call(Fi).replace(Li, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
159
|
+
);
|
|
160
|
+
function Gi(e) {
|
|
161
|
+
if (!Pi(e) || Hi(e))
|
|
162
|
+
return !1;
|
|
163
|
+
var t = ji(e) ? qi : Mi;
|
|
164
|
+
return t.test(Di(e));
|
|
165
|
+
}
|
|
166
|
+
var Ui = Gi;
|
|
167
|
+
function Ki(e, t) {
|
|
168
|
+
return e == null ? void 0 : e[t];
|
|
169
|
+
}
|
|
170
|
+
var zi = Ki, Wi = Ui, Xi = zi;
|
|
171
|
+
function Yi(e, t) {
|
|
172
|
+
var r = Xi(e, t);
|
|
173
|
+
return Wi(r) ? r : void 0;
|
|
174
|
+
}
|
|
175
|
+
var J = Yi, Ji = J, Zi = F, Qi = Ji(Zi, "Map"), tt = Qi, ea = J, ta = ea(Object, "create"), Ae = ta, ft = Ae;
|
|
176
|
+
function ra() {
|
|
177
|
+
this.__data__ = ft ? ft(null) : {}, this.size = 0;
|
|
178
|
+
}
|
|
179
|
+
var na = ra;
|
|
180
|
+
function ia(e) {
|
|
181
|
+
var t = this.has(e) && delete this.__data__[e];
|
|
182
|
+
return this.size -= t ? 1 : 0, t;
|
|
183
|
+
}
|
|
184
|
+
var aa = ia, sa = Ae, oa = "__lodash_hash_undefined__", ua = Object.prototype, ca = ua.hasOwnProperty;
|
|
185
|
+
function la(e) {
|
|
186
|
+
var t = this.__data__;
|
|
187
|
+
if (sa) {
|
|
188
|
+
var r = t[e];
|
|
189
|
+
return r === oa ? void 0 : r;
|
|
190
|
+
}
|
|
191
|
+
return ca.call(t, e) ? t[e] : void 0;
|
|
192
|
+
}
|
|
193
|
+
var fa = la, da = Ae, pa = Object.prototype, ha = pa.hasOwnProperty;
|
|
194
|
+
function ga(e) {
|
|
195
|
+
var t = this.__data__;
|
|
196
|
+
return da ? t[e] !== void 0 : ha.call(t, e);
|
|
197
|
+
}
|
|
198
|
+
var va = ga, ba = Ae, ma = "__lodash_hash_undefined__";
|
|
199
|
+
function ya(e, t) {
|
|
200
|
+
var r = this.__data__;
|
|
201
|
+
return this.size += this.has(e) ? 0 : 1, r[e] = ba && t === void 0 ? ma : t, this;
|
|
202
|
+
}
|
|
203
|
+
var $a = ya, _a = na, wa = aa, Ea = fa, Aa = va, Sa = $a;
|
|
204
|
+
function Z(e) {
|
|
205
|
+
var t = -1, r = e == null ? 0 : e.length;
|
|
206
|
+
for (this.clear(); ++t < r; ) {
|
|
207
|
+
var n = e[t];
|
|
208
|
+
this.set(n[0], n[1]);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
Z.prototype.clear = _a;
|
|
212
|
+
Z.prototype.delete = wa;
|
|
213
|
+
Z.prototype.get = Ea;
|
|
214
|
+
Z.prototype.has = Aa;
|
|
215
|
+
Z.prototype.set = Sa;
|
|
216
|
+
var xa = Z, dt = xa, Oa = we, Ca = tt;
|
|
217
|
+
function Ta() {
|
|
218
|
+
this.size = 0, this.__data__ = {
|
|
219
|
+
hash: new dt(),
|
|
220
|
+
map: new (Ca || Oa)(),
|
|
221
|
+
string: new dt()
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
var Ra = Ta;
|
|
225
|
+
function Ia(e) {
|
|
226
|
+
var t = typeof e;
|
|
227
|
+
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
228
|
+
}
|
|
229
|
+
var Na = Ia, ja = Na;
|
|
230
|
+
function Ha(e, t) {
|
|
231
|
+
var r = e.__data__;
|
|
232
|
+
return ja(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
|
|
233
|
+
}
|
|
234
|
+
var Se = Ha, Pa = Se;
|
|
235
|
+
function Da(e) {
|
|
236
|
+
var t = Pa(this, e).delete(e);
|
|
237
|
+
return this.size -= t ? 1 : 0, t;
|
|
238
|
+
}
|
|
239
|
+
var La = Da, Ma = Se;
|
|
240
|
+
function Ba(e) {
|
|
241
|
+
return Ma(this, e).get(e);
|
|
242
|
+
}
|
|
243
|
+
var ka = Ba, Va = Se;
|
|
244
|
+
function Fa(e) {
|
|
245
|
+
return Va(this, e).has(e);
|
|
246
|
+
}
|
|
247
|
+
var qa = Fa, Ga = Se;
|
|
248
|
+
function Ua(e, t) {
|
|
249
|
+
var r = Ga(this, e), n = r.size;
|
|
250
|
+
return r.set(e, t), this.size += r.size == n ? 0 : 1, this;
|
|
251
|
+
}
|
|
252
|
+
var Ka = Ua, za = Ra, Wa = La, Xa = ka, Ya = qa, Ja = Ka;
|
|
253
|
+
function Q(e) {
|
|
254
|
+
var t = -1, r = e == null ? 0 : e.length;
|
|
255
|
+
for (this.clear(); ++t < r; ) {
|
|
256
|
+
var n = e[t];
|
|
257
|
+
this.set(n[0], n[1]);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
Q.prototype.clear = za;
|
|
261
|
+
Q.prototype.delete = Wa;
|
|
262
|
+
Q.prototype.get = Xa;
|
|
263
|
+
Q.prototype.has = Ya;
|
|
264
|
+
Q.prototype.set = Ja;
|
|
265
|
+
var Zt = Q, Za = we, Qa = tt, es = Zt, ts = 200;
|
|
266
|
+
function rs(e, t) {
|
|
267
|
+
var r = this.__data__;
|
|
268
|
+
if (r instanceof Za) {
|
|
269
|
+
var n = r.__data__;
|
|
270
|
+
if (!Qa || n.length < ts - 1)
|
|
271
|
+
return n.push([e, t]), this.size = ++r.size, this;
|
|
272
|
+
r = this.__data__ = new es(n);
|
|
273
|
+
}
|
|
274
|
+
return r.set(e, t), this.size = r.size, this;
|
|
275
|
+
}
|
|
276
|
+
var ns = rs, is = we, as = Un, ss = zn, os = Xn, us = Jn, cs = ns;
|
|
277
|
+
function ee(e) {
|
|
278
|
+
var t = this.__data__ = new is(e);
|
|
279
|
+
this.size = t.size;
|
|
280
|
+
}
|
|
281
|
+
ee.prototype.clear = as;
|
|
282
|
+
ee.prototype.delete = ss;
|
|
283
|
+
ee.prototype.get = os;
|
|
284
|
+
ee.prototype.has = us;
|
|
285
|
+
ee.prototype.set = cs;
|
|
286
|
+
var ls = ee, fs = "__lodash_hash_undefined__";
|
|
287
|
+
function ds(e) {
|
|
288
|
+
return this.__data__.set(e, fs), this;
|
|
289
|
+
}
|
|
290
|
+
var ps = ds;
|
|
291
|
+
function hs(e) {
|
|
292
|
+
return this.__data__.has(e);
|
|
293
|
+
}
|
|
294
|
+
var gs = hs, vs = Zt, bs = ps, ms = gs;
|
|
295
|
+
function be(e) {
|
|
296
|
+
var t = -1, r = e == null ? 0 : e.length;
|
|
297
|
+
for (this.__data__ = new vs(); ++t < r; )
|
|
298
|
+
this.add(e[t]);
|
|
299
|
+
}
|
|
300
|
+
be.prototype.add = be.prototype.push = bs;
|
|
301
|
+
be.prototype.has = ms;
|
|
302
|
+
var Qt = be;
|
|
303
|
+
function ys(e, t) {
|
|
304
|
+
for (var r = -1, n = e == null ? 0 : e.length; ++r < n; )
|
|
305
|
+
if (t(e[r], r, e))
|
|
306
|
+
return !0;
|
|
307
|
+
return !1;
|
|
308
|
+
}
|
|
309
|
+
var $s = ys;
|
|
310
|
+
function _s(e, t) {
|
|
311
|
+
return e.has(t);
|
|
312
|
+
}
|
|
313
|
+
var er = _s, ws = Qt, Es = $s, As = er, Ss = 1, xs = 2;
|
|
314
|
+
function Os(e, t, r, n, i, a) {
|
|
315
|
+
var u = r & Ss, s = e.length, c = t.length;
|
|
316
|
+
if (s != c && !(u && c > s))
|
|
317
|
+
return !1;
|
|
318
|
+
var l = a.get(e), h = a.get(t);
|
|
319
|
+
if (l && h)
|
|
320
|
+
return l == t && h == e;
|
|
321
|
+
var g = -1, p = !0, b = r & xs ? new ws() : void 0;
|
|
322
|
+
for (a.set(e, t), a.set(t, e); ++g < s; ) {
|
|
323
|
+
var v = e[g], O = t[g];
|
|
324
|
+
if (n)
|
|
325
|
+
var x = u ? n(O, v, g, t, e, a) : n(v, O, g, e, t, a);
|
|
326
|
+
if (x !== void 0) {
|
|
327
|
+
if (x)
|
|
328
|
+
continue;
|
|
329
|
+
p = !1;
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
if (b) {
|
|
333
|
+
if (!Es(t, function(o, $) {
|
|
334
|
+
if (!As(b, $) && (v === o || i(v, o, r, n, a)))
|
|
335
|
+
return b.push($);
|
|
336
|
+
})) {
|
|
337
|
+
p = !1;
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
} else if (!(v === O || i(v, O, r, n, a))) {
|
|
341
|
+
p = !1;
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return a.delete(e), a.delete(t), p;
|
|
346
|
+
}
|
|
347
|
+
var tr = Os, Cs = F, Ts = Cs.Uint8Array, Rs = Ts;
|
|
348
|
+
function Is(e) {
|
|
349
|
+
var t = -1, r = Array(e.size);
|
|
350
|
+
return e.forEach(function(n, i) {
|
|
351
|
+
r[++t] = [i, n];
|
|
352
|
+
}), r;
|
|
353
|
+
}
|
|
354
|
+
var Ns = Is;
|
|
355
|
+
function js(e) {
|
|
356
|
+
var t = -1, r = Array(e.size);
|
|
357
|
+
return e.forEach(function(n) {
|
|
358
|
+
r[++t] = n;
|
|
359
|
+
}), r;
|
|
360
|
+
}
|
|
361
|
+
var rt = js, pt = et, ht = Rs, Hs = Kt, Ps = tr, Ds = Ns, Ls = rt, Ms = 1, Bs = 2, ks = "[object Boolean]", Vs = "[object Date]", Fs = "[object Error]", qs = "[object Map]", Gs = "[object Number]", Us = "[object RegExp]", Ks = "[object Set]", zs = "[object String]", Ws = "[object Symbol]", Xs = "[object ArrayBuffer]", Ys = "[object DataView]", gt = pt ? pt.prototype : void 0, je = gt ? gt.valueOf : void 0;
|
|
362
|
+
function Js(e, t, r, n, i, a, u) {
|
|
363
|
+
switch (r) {
|
|
364
|
+
case Ys:
|
|
365
|
+
if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
|
|
366
|
+
return !1;
|
|
367
|
+
e = e.buffer, t = t.buffer;
|
|
368
|
+
case Xs:
|
|
369
|
+
return !(e.byteLength != t.byteLength || !a(new ht(e), new ht(t)));
|
|
370
|
+
case ks:
|
|
371
|
+
case Vs:
|
|
372
|
+
case Gs:
|
|
373
|
+
return Hs(+e, +t);
|
|
374
|
+
case Fs:
|
|
375
|
+
return e.name == t.name && e.message == t.message;
|
|
376
|
+
case Us:
|
|
377
|
+
case zs:
|
|
378
|
+
return e == t + "";
|
|
379
|
+
case qs:
|
|
380
|
+
var s = Ds;
|
|
381
|
+
case Ks:
|
|
382
|
+
var c = n & Ms;
|
|
383
|
+
if (s || (s = Ls), e.size != t.size && !c)
|
|
384
|
+
return !1;
|
|
385
|
+
var l = u.get(e);
|
|
386
|
+
if (l)
|
|
387
|
+
return l == t;
|
|
388
|
+
n |= Bs, u.set(e, t);
|
|
389
|
+
var h = Ps(s(e), s(t), n, i, a, u);
|
|
390
|
+
return u.delete(e), h;
|
|
391
|
+
case Ws:
|
|
392
|
+
if (je)
|
|
393
|
+
return je.call(e) == je.call(t);
|
|
394
|
+
}
|
|
395
|
+
return !1;
|
|
396
|
+
}
|
|
397
|
+
var Zs = Js;
|
|
398
|
+
function Qs(e, t) {
|
|
399
|
+
for (var r = -1, n = t.length, i = e.length; ++r < n; )
|
|
400
|
+
e[i + r] = t[r];
|
|
401
|
+
return e;
|
|
402
|
+
}
|
|
403
|
+
var eo = Qs, to = Array.isArray, nt = to, ro = eo, no = nt;
|
|
404
|
+
function io(e, t, r) {
|
|
405
|
+
var n = t(e);
|
|
406
|
+
return no(e) ? n : ro(n, r(e));
|
|
407
|
+
}
|
|
408
|
+
var ao = io;
|
|
409
|
+
function so(e, t) {
|
|
410
|
+
for (var r = -1, n = e == null ? 0 : e.length, i = 0, a = []; ++r < n; ) {
|
|
411
|
+
var u = e[r];
|
|
412
|
+
t(u, r, e) && (a[i++] = u);
|
|
413
|
+
}
|
|
414
|
+
return a;
|
|
415
|
+
}
|
|
416
|
+
var oo = so;
|
|
417
|
+
function uo() {
|
|
418
|
+
return [];
|
|
419
|
+
}
|
|
420
|
+
var co = uo, lo = oo, fo = co, po = Object.prototype, ho = po.propertyIsEnumerable, vt = Object.getOwnPropertySymbols, go = vt ? function(e) {
|
|
421
|
+
return e == null ? [] : (e = Object(e), lo(vt(e), function(t) {
|
|
422
|
+
return ho.call(e, t);
|
|
423
|
+
}));
|
|
424
|
+
} : fo, vo = go;
|
|
425
|
+
function bo(e, t) {
|
|
426
|
+
for (var r = -1, n = Array(e); ++r < e; )
|
|
427
|
+
n[r] = t(r);
|
|
428
|
+
return n;
|
|
429
|
+
}
|
|
430
|
+
var mo = bo;
|
|
431
|
+
function yo(e) {
|
|
432
|
+
return e != null && typeof e == "object";
|
|
433
|
+
}
|
|
434
|
+
var xe = yo, $o = Ee, _o = xe, wo = "[object Arguments]";
|
|
435
|
+
function Eo(e) {
|
|
436
|
+
return _o(e) && $o(e) == wo;
|
|
437
|
+
}
|
|
438
|
+
var Ao = Eo, bt = Ao, So = xe, rr = Object.prototype, xo = rr.hasOwnProperty, Oo = rr.propertyIsEnumerable, Co = bt(/* @__PURE__ */ function() {
|
|
439
|
+
return arguments;
|
|
440
|
+
}()) ? bt : function(e) {
|
|
441
|
+
return So(e) && xo.call(e, "callee") && !Oo.call(e, "callee");
|
|
442
|
+
}, To = Co, me = { exports: {} };
|
|
443
|
+
function Ro() {
|
|
444
|
+
return !1;
|
|
445
|
+
}
|
|
446
|
+
var Io = Ro;
|
|
447
|
+
me.exports;
|
|
448
|
+
(function(e, t) {
|
|
449
|
+
var r = F, n = Io, i = t && !t.nodeType && t, a = i && !0 && e && !e.nodeType && e, u = a && a.exports === i, s = u ? r.Buffer : void 0, c = s ? s.isBuffer : void 0, l = c || n;
|
|
450
|
+
e.exports = l;
|
|
451
|
+
})(me, me.exports);
|
|
452
|
+
var nr = me.exports, No = 9007199254740991, jo = /^(?:0|[1-9]\d*)$/;
|
|
453
|
+
function Ho(e, t) {
|
|
454
|
+
var r = typeof e;
|
|
455
|
+
return t = t ?? No, !!t && (r == "number" || r != "symbol" && jo.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
456
|
+
}
|
|
457
|
+
var Po = Ho, Do = 9007199254740991;
|
|
458
|
+
function Lo(e) {
|
|
459
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Do;
|
|
460
|
+
}
|
|
461
|
+
var ir = Lo, Mo = Ee, Bo = ir, ko = xe, Vo = "[object Arguments]", Fo = "[object Array]", qo = "[object Boolean]", Go = "[object Date]", Uo = "[object Error]", Ko = "[object Function]", zo = "[object Map]", Wo = "[object Number]", Xo = "[object Object]", Yo = "[object RegExp]", Jo = "[object Set]", Zo = "[object String]", Qo = "[object WeakMap]", eu = "[object ArrayBuffer]", tu = "[object DataView]", ru = "[object Float32Array]", nu = "[object Float64Array]", iu = "[object Int8Array]", au = "[object Int16Array]", su = "[object Int32Array]", ou = "[object Uint8Array]", uu = "[object Uint8ClampedArray]", cu = "[object Uint16Array]", lu = "[object Uint32Array]", E = {};
|
|
462
|
+
E[ru] = E[nu] = E[iu] = E[au] = E[su] = E[ou] = E[uu] = E[cu] = E[lu] = !0;
|
|
463
|
+
E[Vo] = E[Fo] = E[eu] = E[qo] = E[tu] = E[Go] = E[Uo] = E[Ko] = E[zo] = E[Wo] = E[Xo] = E[Yo] = E[Jo] = E[Zo] = E[Qo] = !1;
|
|
464
|
+
function fu(e) {
|
|
465
|
+
return ko(e) && Bo(e.length) && !!E[Mo(e)];
|
|
466
|
+
}
|
|
467
|
+
var du = fu;
|
|
468
|
+
function pu(e) {
|
|
469
|
+
return function(t) {
|
|
470
|
+
return e(t);
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
var hu = pu, ye = { exports: {} };
|
|
474
|
+
ye.exports;
|
|
475
|
+
(function(e, t) {
|
|
476
|
+
var r = zt, n = t && !t.nodeType && t, i = n && !0 && e && !e.nodeType && e, a = i && i.exports === n, u = a && r.process, s = function() {
|
|
477
|
+
try {
|
|
478
|
+
var c = i && i.require && i.require("util").types;
|
|
479
|
+
return c || u && u.binding && u.binding("util");
|
|
480
|
+
} catch {
|
|
481
|
+
}
|
|
482
|
+
}();
|
|
483
|
+
e.exports = s;
|
|
484
|
+
})(ye, ye.exports);
|
|
485
|
+
var gu = ye.exports, vu = du, bu = hu, mt = gu, yt = mt && mt.isTypedArray, mu = yt ? bu(yt) : vu, ar = mu, yu = mo, $u = To, _u = nt, wu = nr, Eu = Po, Au = ar, Su = Object.prototype, xu = Su.hasOwnProperty;
|
|
486
|
+
function Ou(e, t) {
|
|
487
|
+
var r = _u(e), n = !r && $u(e), i = !r && !n && wu(e), a = !r && !n && !i && Au(e), u = r || n || i || a, s = u ? yu(e.length, String) : [], c = s.length;
|
|
488
|
+
for (var l in e)
|
|
489
|
+
(t || xu.call(e, l)) && !(u && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
490
|
+
(l == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
491
|
+
i && (l == "offset" || l == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
492
|
+
a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || // Skip index properties.
|
|
493
|
+
Eu(l, c))) && s.push(l);
|
|
494
|
+
return s;
|
|
495
|
+
}
|
|
496
|
+
var Cu = Ou, Tu = Object.prototype;
|
|
497
|
+
function Ru(e) {
|
|
498
|
+
var t = e && e.constructor, r = typeof t == "function" && t.prototype || Tu;
|
|
499
|
+
return e === r;
|
|
500
|
+
}
|
|
501
|
+
var Iu = Ru;
|
|
502
|
+
function Nu(e, t) {
|
|
503
|
+
return function(r) {
|
|
504
|
+
return e(t(r));
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
var ju = Nu, Hu = ju, Pu = Hu(Object.keys, Object), Du = Pu, Lu = Iu, Mu = Du, Bu = Object.prototype, ku = Bu.hasOwnProperty;
|
|
508
|
+
function Vu(e) {
|
|
509
|
+
if (!Lu(e))
|
|
510
|
+
return Mu(e);
|
|
511
|
+
var t = [];
|
|
512
|
+
for (var r in Object(e))
|
|
513
|
+
ku.call(e, r) && r != "constructor" && t.push(r);
|
|
514
|
+
return t;
|
|
515
|
+
}
|
|
516
|
+
var Fu = Vu, qu = Yt, Gu = ir;
|
|
517
|
+
function Uu(e) {
|
|
518
|
+
return e != null && Gu(e.length) && !qu(e);
|
|
519
|
+
}
|
|
520
|
+
var Ku = Uu, zu = Cu, Wu = Fu, Xu = Ku;
|
|
521
|
+
function Yu(e) {
|
|
522
|
+
return Xu(e) ? zu(e) : Wu(e);
|
|
523
|
+
}
|
|
524
|
+
var Ju = Yu, Zu = ao, Qu = vo, ec = Ju;
|
|
525
|
+
function tc(e) {
|
|
526
|
+
return Zu(e, ec, Qu);
|
|
527
|
+
}
|
|
528
|
+
var rc = tc, $t = rc, nc = 1, ic = Object.prototype, ac = ic.hasOwnProperty;
|
|
529
|
+
function sc(e, t, r, n, i, a) {
|
|
530
|
+
var u = r & nc, s = $t(e), c = s.length, l = $t(t), h = l.length;
|
|
531
|
+
if (c != h && !u)
|
|
532
|
+
return !1;
|
|
533
|
+
for (var g = c; g--; ) {
|
|
534
|
+
var p = s[g];
|
|
535
|
+
if (!(u ? p in t : ac.call(t, p)))
|
|
536
|
+
return !1;
|
|
537
|
+
}
|
|
538
|
+
var b = a.get(e), v = a.get(t);
|
|
539
|
+
if (b && v)
|
|
540
|
+
return b == t && v == e;
|
|
541
|
+
var O = !0;
|
|
542
|
+
a.set(e, t), a.set(t, e);
|
|
543
|
+
for (var x = u; ++g < c; ) {
|
|
544
|
+
p = s[g];
|
|
545
|
+
var o = e[p], $ = t[p];
|
|
546
|
+
if (n)
|
|
547
|
+
var w = u ? n($, o, p, t, e, a) : n(o, $, p, e, t, a);
|
|
548
|
+
if (!(w === void 0 ? o === $ || i(o, $, r, n, a) : w)) {
|
|
549
|
+
O = !1;
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
x || (x = p == "constructor");
|
|
553
|
+
}
|
|
554
|
+
if (O && !x) {
|
|
555
|
+
var T = e.constructor, N = t.constructor;
|
|
556
|
+
T != N && "constructor" in e && "constructor" in t && !(typeof T == "function" && T instanceof T && typeof N == "function" && N instanceof N) && (O = !1);
|
|
557
|
+
}
|
|
558
|
+
return a.delete(e), a.delete(t), O;
|
|
559
|
+
}
|
|
560
|
+
var oc = sc, uc = J, cc = F, lc = uc(cc, "DataView"), fc = lc, dc = J, pc = F, hc = dc(pc, "Promise"), gc = hc, vc = J, bc = F, mc = vc(bc, "Set"), sr = mc, yc = J, $c = F, _c = yc($c, "WeakMap"), wc = _c, Be = fc, ke = tt, Ve = gc, Fe = sr, qe = wc, or = Ee, te = Jt, _t = "[object Map]", Ec = "[object Object]", wt = "[object Promise]", Et = "[object Set]", At = "[object WeakMap]", St = "[object DataView]", Ac = te(Be), Sc = te(ke), xc = te(Ve), Oc = te(Fe), Cc = te(qe), z = or;
|
|
561
|
+
(Be && z(new Be(new ArrayBuffer(1))) != St || ke && z(new ke()) != _t || Ve && z(Ve.resolve()) != wt || Fe && z(new Fe()) != Et || qe && z(new qe()) != At) && (z = function(e) {
|
|
562
|
+
var t = or(e), r = t == Ec ? e.constructor : void 0, n = r ? te(r) : "";
|
|
563
|
+
if (n)
|
|
564
|
+
switch (n) {
|
|
565
|
+
case Ac:
|
|
566
|
+
return St;
|
|
567
|
+
case Sc:
|
|
568
|
+
return _t;
|
|
569
|
+
case xc:
|
|
570
|
+
return wt;
|
|
571
|
+
case Oc:
|
|
572
|
+
return Et;
|
|
573
|
+
case Cc:
|
|
574
|
+
return At;
|
|
575
|
+
}
|
|
576
|
+
return t;
|
|
577
|
+
});
|
|
578
|
+
var Tc = z, He = ls, Rc = tr, Ic = Zs, Nc = oc, xt = Tc, Ot = nt, Ct = nr, jc = ar, Hc = 1, Tt = "[object Arguments]", Rt = "[object Array]", ge = "[object Object]", Pc = Object.prototype, It = Pc.hasOwnProperty;
|
|
579
|
+
function Dc(e, t, r, n, i, a) {
|
|
580
|
+
var u = Ot(e), s = Ot(t), c = u ? Rt : xt(e), l = s ? Rt : xt(t);
|
|
581
|
+
c = c == Tt ? ge : c, l = l == Tt ? ge : l;
|
|
582
|
+
var h = c == ge, g = l == ge, p = c == l;
|
|
583
|
+
if (p && Ct(e)) {
|
|
584
|
+
if (!Ct(t))
|
|
585
|
+
return !1;
|
|
586
|
+
u = !0, h = !1;
|
|
587
|
+
}
|
|
588
|
+
if (p && !h)
|
|
589
|
+
return a || (a = new He()), u || jc(e) ? Rc(e, t, r, n, i, a) : Ic(e, t, c, r, n, i, a);
|
|
590
|
+
if (!(r & Hc)) {
|
|
591
|
+
var b = h && It.call(e, "__wrapped__"), v = g && It.call(t, "__wrapped__");
|
|
592
|
+
if (b || v) {
|
|
593
|
+
var O = b ? e.value() : e, x = v ? t.value() : t;
|
|
594
|
+
return a || (a = new He()), i(O, x, r, n, a);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
return p ? (a || (a = new He()), Nc(e, t, r, n, i, a)) : !1;
|
|
598
|
+
}
|
|
599
|
+
var Lc = Dc, Mc = Lc, Nt = xe;
|
|
600
|
+
function ur(e, t, r, n, i) {
|
|
601
|
+
return e === t ? !0 : e == null || t == null || !Nt(e) && !Nt(t) ? e !== e && t !== t : Mc(e, t, r, n, ur, i);
|
|
602
|
+
}
|
|
603
|
+
var cr = ur, Bc = cr;
|
|
604
|
+
function kc(e, t) {
|
|
605
|
+
return Bc(e, t);
|
|
606
|
+
}
|
|
607
|
+
var Vc = kc;
|
|
608
|
+
const Fc = /* @__PURE__ */ X(Vc);
|
|
609
|
+
function lr(e) {
|
|
610
|
+
Object.defineProperty(e, "__esModule", { value: !0, configurable: !0 });
|
|
611
|
+
}
|
|
612
|
+
function it(e, t, r, n) {
|
|
613
|
+
Object.defineProperty(e, t, { get: r, set: n, enumerable: !0, configurable: !0 });
|
|
614
|
+
}
|
|
615
|
+
var fr = {};
|
|
616
|
+
lr(fr);
|
|
617
|
+
it(fr, "default", () => dr);
|
|
618
|
+
class dr extends Error {
|
|
619
|
+
constructor(t, r, n, i, a) {
|
|
620
|
+
super(t + ":" + n + ":" + i + ": " + r), this.reason = r, this.filename = t, this.line = n, this.column = i, this.source = a;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
var pr = {};
|
|
624
|
+
lr(pr);
|
|
625
|
+
it(pr, "default", () => hr);
|
|
626
|
+
class hr {
|
|
627
|
+
constructor(t, r, n) {
|
|
628
|
+
this.start = t, this.end = r, this.source = n;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
var qc = {};
|
|
632
|
+
it(qc, "CssTypes", () => C);
|
|
633
|
+
var C = /* @__PURE__ */ function(e) {
|
|
634
|
+
return e.stylesheet = "stylesheet", e.rule = "rule", e.declaration = "declaration", e.comment = "comment", e.container = "container", e.charset = "charset", e.document = "document", e.customMedia = "custom-media", e.fontFace = "font-face", e.host = "host", e.import = "import", e.keyframes = "keyframes", e.keyframe = "keyframe", e.layer = "layer", e.media = "media", e.namespace = "namespace", e.page = "page", e.startingStyle = "starting-style", e.supports = "supports", e;
|
|
635
|
+
}({});
|
|
636
|
+
const Pe = /\/\*[^]*?(?:\*\/|$)/g, Gc = (e, t) => {
|
|
637
|
+
t = t || {};
|
|
638
|
+
let r = 1, n = 1;
|
|
639
|
+
function i(d) {
|
|
640
|
+
const f = d.match(/\n/g);
|
|
641
|
+
f && (r += f.length);
|
|
642
|
+
const m = d.lastIndexOf(`
|
|
643
|
+
`);
|
|
644
|
+
n = ~m ? d.length - m : n + d.length;
|
|
645
|
+
}
|
|
646
|
+
function a() {
|
|
647
|
+
const d = {
|
|
648
|
+
line: r,
|
|
649
|
+
column: n
|
|
650
|
+
};
|
|
651
|
+
return function(f) {
|
|
652
|
+
return f.position = new hr(d, {
|
|
653
|
+
line: r,
|
|
654
|
+
column: n
|
|
655
|
+
}, (t == null ? void 0 : t.source) || ""), b(), f;
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
const u = [];
|
|
659
|
+
function s(d) {
|
|
660
|
+
const f = new dr((t == null ? void 0 : t.source) || "", d, r, n, e);
|
|
661
|
+
if (t != null && t.silent) u.push(f);
|
|
662
|
+
else throw f;
|
|
663
|
+
}
|
|
664
|
+
function c() {
|
|
665
|
+
const d = g();
|
|
666
|
+
return {
|
|
667
|
+
type: C.stylesheet,
|
|
668
|
+
stylesheet: {
|
|
669
|
+
source: t == null ? void 0 : t.source,
|
|
670
|
+
rules: d,
|
|
671
|
+
parsingErrors: u
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
function l() {
|
|
676
|
+
return p(/^{\s*/);
|
|
677
|
+
}
|
|
678
|
+
function h() {
|
|
679
|
+
return p(/^}/);
|
|
680
|
+
}
|
|
681
|
+
function g() {
|
|
682
|
+
let d;
|
|
683
|
+
const f = [];
|
|
684
|
+
for (b(), v(f); e.length && e.charAt(0) !== "}" && (d = on() || un()); ) d && (f.push(d), v(f));
|
|
685
|
+
return f;
|
|
686
|
+
}
|
|
687
|
+
function p(d) {
|
|
688
|
+
const f = d.exec(e);
|
|
689
|
+
if (!f) return;
|
|
690
|
+
const m = f[0];
|
|
691
|
+
return i(m), e = e.slice(m.length), f;
|
|
692
|
+
}
|
|
693
|
+
function b() {
|
|
694
|
+
p(/^\s*/);
|
|
695
|
+
}
|
|
696
|
+
function v(d) {
|
|
697
|
+
let f;
|
|
698
|
+
for (d = d || []; f = O(); ) f && d.push(f);
|
|
699
|
+
return d;
|
|
700
|
+
}
|
|
701
|
+
function O() {
|
|
702
|
+
const d = a();
|
|
703
|
+
if (e.charAt(0) !== "/" || e.charAt(1) !== "*") return;
|
|
704
|
+
const f = p(/^\/\*[^]*?\*\//);
|
|
705
|
+
return f ? d({
|
|
706
|
+
type: C.comment,
|
|
707
|
+
comment: f[0].slice(2, -2)
|
|
708
|
+
}) : s("End of comment missing");
|
|
709
|
+
}
|
|
710
|
+
function x(d, f, m) {
|
|
711
|
+
let y = f + 1, A = !1, q = d.indexOf(")", y);
|
|
712
|
+
for (; !A && q !== -1; ) {
|
|
713
|
+
const G = d.indexOf("(", y);
|
|
714
|
+
G !== -1 && G < q ? (y = x(d, G + 1) + 1, q = d.indexOf(")", y)) : A = !0;
|
|
715
|
+
}
|
|
716
|
+
return A && q !== -1 ? q : -1;
|
|
717
|
+
}
|
|
718
|
+
function o() {
|
|
719
|
+
const d = p(/^([^{]+)/);
|
|
720
|
+
if (!d) return;
|
|
721
|
+
let f = H(d[0]).replace(Pe, "");
|
|
722
|
+
if (f.indexOf(",") === -1) return [
|
|
723
|
+
f
|
|
724
|
+
];
|
|
725
|
+
let m = 0, y = f.indexOf("(", m);
|
|
726
|
+
for (; y !== -1; ) {
|
|
727
|
+
const A = x(f, y);
|
|
728
|
+
if (A === -1) break;
|
|
729
|
+
m = A + 1, f = f.substring(0, y) + f.substring(y, A).replace(/,/g, "") + f.substring(A), y = f.indexOf("(", m);
|
|
730
|
+
}
|
|
731
|
+
return f = f.replace(/("|')(?:\\\1|.)*?\1/g, (A) => A.replace(/,/g, "")), f.split(",").map((A) => H(A.replace(/\u200C/g, ",")));
|
|
732
|
+
}
|
|
733
|
+
function $() {
|
|
734
|
+
const d = a(), f = p(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
|
|
735
|
+
if (!f) return;
|
|
736
|
+
const m = H(f[0]);
|
|
737
|
+
if (!p(/^:\s*/)) return s("property missing ':'");
|
|
738
|
+
const y = p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/), A = d({
|
|
739
|
+
type: C.declaration,
|
|
740
|
+
property: m.replace(Pe, ""),
|
|
741
|
+
value: y ? H(y[0]).replace(Pe, "") : ""
|
|
742
|
+
});
|
|
743
|
+
return p(/^[;\s]*/), A;
|
|
744
|
+
}
|
|
745
|
+
function w() {
|
|
746
|
+
const d = [];
|
|
747
|
+
if (!l()) return s("missing '{'");
|
|
748
|
+
v(d);
|
|
749
|
+
let f;
|
|
750
|
+
for (; f = $(); ) f && (d.push(f), v(d));
|
|
751
|
+
return h() ? d : s("missing '}'");
|
|
752
|
+
}
|
|
753
|
+
function T() {
|
|
754
|
+
let d;
|
|
755
|
+
const f = [], m = a();
|
|
756
|
+
for (; d = p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/); )
|
|
757
|
+
f.push(d[1]), p(/^,\s*/);
|
|
758
|
+
if (f.length)
|
|
759
|
+
return m({
|
|
760
|
+
type: C.keyframe,
|
|
761
|
+
values: f,
|
|
762
|
+
declarations: w() || []
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
function N() {
|
|
766
|
+
const d = a(), f = p(/^@([-\w]+)?keyframes\s*/);
|
|
767
|
+
if (!f) return;
|
|
768
|
+
const m = f[1], y = p(/^([-\w]+)\s*/);
|
|
769
|
+
if (!y) return s("@keyframes missing name");
|
|
770
|
+
const A = y[1];
|
|
771
|
+
if (!l()) return s("@keyframes missing '{'");
|
|
772
|
+
let q, G = v();
|
|
773
|
+
for (; q = T(); )
|
|
774
|
+
G.push(q), G = G.concat(v());
|
|
775
|
+
return h() ? d({
|
|
776
|
+
type: C.keyframes,
|
|
777
|
+
name: A,
|
|
778
|
+
vendor: m,
|
|
779
|
+
keyframes: G
|
|
780
|
+
}) : s("@keyframes missing '}'");
|
|
781
|
+
}
|
|
782
|
+
function D() {
|
|
783
|
+
const d = a(), f = p(/^@supports *([^{]+)/);
|
|
784
|
+
if (!f) return;
|
|
785
|
+
const m = H(f[1]);
|
|
786
|
+
if (!l()) return s("@supports missing '{'");
|
|
787
|
+
const y = v().concat(g());
|
|
788
|
+
return h() ? d({
|
|
789
|
+
type: C.supports,
|
|
790
|
+
supports: m,
|
|
791
|
+
rules: y
|
|
792
|
+
}) : s("@supports missing '}'");
|
|
793
|
+
}
|
|
794
|
+
function M() {
|
|
795
|
+
const d = a();
|
|
796
|
+
if (!p(/^@host\s*/)) return;
|
|
797
|
+
if (!l()) return s("@host missing '{'");
|
|
798
|
+
const m = v().concat(g());
|
|
799
|
+
return h() ? d({
|
|
800
|
+
type: C.host,
|
|
801
|
+
rules: m
|
|
802
|
+
}) : s("@host missing '}'");
|
|
803
|
+
}
|
|
804
|
+
function B() {
|
|
805
|
+
const d = a(), f = p(/^@container *([^{]+)/);
|
|
806
|
+
if (!f) return;
|
|
807
|
+
const m = H(f[1]);
|
|
808
|
+
if (!l()) return s("@container missing '{'");
|
|
809
|
+
const y = v().concat(g());
|
|
810
|
+
return h() ? d({
|
|
811
|
+
type: C.container,
|
|
812
|
+
container: m,
|
|
813
|
+
rules: y
|
|
814
|
+
}) : s("@container missing '}'");
|
|
815
|
+
}
|
|
816
|
+
function j() {
|
|
817
|
+
const d = a(), f = p(/^@layer *([^{;@]+)/);
|
|
818
|
+
if (!f) return;
|
|
819
|
+
const m = H(f[1]);
|
|
820
|
+
if (!l())
|
|
821
|
+
return p(/^[;\s]*/), d({
|
|
822
|
+
type: C.layer,
|
|
823
|
+
layer: m
|
|
824
|
+
});
|
|
825
|
+
const y = v().concat(g());
|
|
826
|
+
return h() ? d({
|
|
827
|
+
type: C.layer,
|
|
828
|
+
layer: m,
|
|
829
|
+
rules: y
|
|
830
|
+
}) : s("@layer missing '}'");
|
|
831
|
+
}
|
|
832
|
+
function k() {
|
|
833
|
+
const d = a(), f = p(/^@media *([^{]+)/);
|
|
834
|
+
if (!f) return;
|
|
835
|
+
const m = H(f[1]);
|
|
836
|
+
if (!l()) return s("@media missing '{'");
|
|
837
|
+
const y = v().concat(g());
|
|
838
|
+
return h() ? d({
|
|
839
|
+
type: C.media,
|
|
840
|
+
media: m,
|
|
841
|
+
rules: y
|
|
842
|
+
}) : s("@media missing '}'");
|
|
843
|
+
}
|
|
844
|
+
function L() {
|
|
845
|
+
const d = a(), f = p(/^@custom-media\s+(--\S+)\s*([^{;\s][^{;]*);/);
|
|
846
|
+
if (f)
|
|
847
|
+
return d({
|
|
848
|
+
type: C.customMedia,
|
|
849
|
+
name: H(f[1]),
|
|
850
|
+
media: H(f[2])
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
function K() {
|
|
854
|
+
const d = a();
|
|
855
|
+
if (!p(/^@page */)) return;
|
|
856
|
+
const m = o() || [];
|
|
857
|
+
if (!l()) return s("@page missing '{'");
|
|
858
|
+
let y = v(), A;
|
|
859
|
+
for (; A = $(); )
|
|
860
|
+
y.push(A), y = y.concat(v());
|
|
861
|
+
return h() ? d({
|
|
862
|
+
type: C.page,
|
|
863
|
+
selectors: m,
|
|
864
|
+
declarations: y
|
|
865
|
+
}) : s("@page missing '}'");
|
|
866
|
+
}
|
|
867
|
+
function fe() {
|
|
868
|
+
const d = a(), f = p(/^@([-\w]+)?document *([^{]+)/);
|
|
869
|
+
if (!f) return;
|
|
870
|
+
const m = H(f[1]), y = H(f[2]);
|
|
871
|
+
if (!l()) return s("@document missing '{'");
|
|
872
|
+
const A = v().concat(g());
|
|
873
|
+
return h() ? d({
|
|
874
|
+
type: C.document,
|
|
875
|
+
document: y,
|
|
876
|
+
vendor: m,
|
|
877
|
+
rules: A
|
|
878
|
+
}) : s("@document missing '}'");
|
|
879
|
+
}
|
|
880
|
+
function ne() {
|
|
881
|
+
const d = a();
|
|
882
|
+
if (!p(/^@font-face\s*/)) return;
|
|
883
|
+
if (!l()) return s("@font-face missing '{'");
|
|
884
|
+
let m = v(), y;
|
|
885
|
+
for (; y = $(); )
|
|
886
|
+
m.push(y), m = m.concat(v());
|
|
887
|
+
return h() ? d({
|
|
888
|
+
type: C.fontFace,
|
|
889
|
+
declarations: m
|
|
890
|
+
}) : s("@font-face missing '}'");
|
|
891
|
+
}
|
|
892
|
+
function de() {
|
|
893
|
+
const d = a();
|
|
894
|
+
if (!p(/^@starting-style\s*/)) return;
|
|
895
|
+
if (!l()) return s("@starting-style missing '{'");
|
|
896
|
+
const m = v().concat(g());
|
|
897
|
+
return h() ? d({
|
|
898
|
+
type: C.startingStyle,
|
|
899
|
+
rules: m
|
|
900
|
+
}) : s("@starting-style missing '}'");
|
|
901
|
+
}
|
|
902
|
+
const pe = Ie("import"), he = Ie("charset"), ie = Ie("namespace");
|
|
903
|
+
function Ie(d) {
|
|
904
|
+
const f = new RegExp("^@" + d + `\\s*((?::?[^;'"]|"(?:\\\\"|[^"])*?"|'(?:\\\\'|[^'])*?')+)(?:;|$)`);
|
|
905
|
+
return function() {
|
|
906
|
+
const m = a(), y = p(f);
|
|
907
|
+
if (!y) return;
|
|
908
|
+
const A = {
|
|
909
|
+
type: d
|
|
910
|
+
};
|
|
911
|
+
return A[d] = y[1].trim(), m(A);
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
function on() {
|
|
915
|
+
if (e[0] === "@")
|
|
916
|
+
return N() || k() || L() || D() || pe() || he() || ie() || fe() || K() || M() || ne() || B() || de() || j();
|
|
917
|
+
}
|
|
918
|
+
function un() {
|
|
919
|
+
const d = a(), f = o();
|
|
920
|
+
return f ? (v(), d({
|
|
921
|
+
type: C.rule,
|
|
922
|
+
selectors: f,
|
|
923
|
+
declarations: w() || []
|
|
924
|
+
})) : s("selector missing");
|
|
925
|
+
}
|
|
926
|
+
return Ge(c());
|
|
927
|
+
};
|
|
928
|
+
function H(e) {
|
|
929
|
+
return e ? e.trim() : "";
|
|
930
|
+
}
|
|
931
|
+
function Ge(e, t) {
|
|
932
|
+
const r = e && typeof e.type == "string", n = r ? e : t;
|
|
933
|
+
for (const i in e) {
|
|
934
|
+
const a = e[i];
|
|
935
|
+
Array.isArray(a) ? a.forEach((u) => {
|
|
936
|
+
Ge(u, n);
|
|
937
|
+
}) : a && typeof a == "object" && Ge(a, n);
|
|
938
|
+
}
|
|
939
|
+
return r && Object.defineProperty(e, "parent", {
|
|
940
|
+
configurable: !0,
|
|
941
|
+
writable: !0,
|
|
942
|
+
enumerable: !1,
|
|
943
|
+
value: t || null
|
|
944
|
+
}), e;
|
|
945
|
+
}
|
|
946
|
+
var Uc = Gc;
|
|
947
|
+
const Kc = Uc;
|
|
948
|
+
var zc = Object.prototype.toString;
|
|
949
|
+
function Wc(e) {
|
|
950
|
+
return typeof e == "function" || zc.call(e) === "[object Function]";
|
|
951
|
+
}
|
|
952
|
+
function Xc(e) {
|
|
953
|
+
var t = Number(e);
|
|
954
|
+
return isNaN(t) ? 0 : t === 0 || !isFinite(t) ? t : (t > 0 ? 1 : -1) * Math.floor(Math.abs(t));
|
|
955
|
+
}
|
|
956
|
+
var Yc = Math.pow(2, 53) - 1;
|
|
957
|
+
function Jc(e) {
|
|
958
|
+
var t = Xc(e);
|
|
959
|
+
return Math.min(Math.max(t, 0), Yc);
|
|
960
|
+
}
|
|
961
|
+
function P(e, t) {
|
|
962
|
+
var r = Array, n = Object(e);
|
|
963
|
+
if (e == null)
|
|
964
|
+
throw new TypeError("Array.from requires an array-like object - not null or undefined");
|
|
965
|
+
for (var i = Jc(n.length), a = Wc(r) ? Object(new r(i)) : new Array(i), u = 0, s; u < i; )
|
|
966
|
+
s = n[u], a[u] = s, u += 1;
|
|
967
|
+
return a.length = i, a;
|
|
968
|
+
}
|
|
969
|
+
function oe(e) {
|
|
970
|
+
"@babel/helpers - typeof";
|
|
971
|
+
return oe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
972
|
+
return typeof t;
|
|
973
|
+
} : function(t) {
|
|
974
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
975
|
+
}, oe(e);
|
|
976
|
+
}
|
|
977
|
+
function Zc(e, t) {
|
|
978
|
+
if (!(e instanceof t))
|
|
979
|
+
throw new TypeError("Cannot call a class as a function");
|
|
980
|
+
}
|
|
981
|
+
function Qc(e, t) {
|
|
982
|
+
for (var r = 0; r < t.length; r++) {
|
|
983
|
+
var n = t[r];
|
|
984
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, gr(n.key), n);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
function el(e, t, r) {
|
|
988
|
+
return t && Qc(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
989
|
+
}
|
|
990
|
+
function tl(e, t, r) {
|
|
991
|
+
return t = gr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
992
|
+
}
|
|
993
|
+
function gr(e) {
|
|
994
|
+
var t = rl(e, "string");
|
|
995
|
+
return oe(t) === "symbol" ? t : String(t);
|
|
996
|
+
}
|
|
997
|
+
function rl(e, t) {
|
|
998
|
+
if (oe(e) !== "object" || e === null) return e;
|
|
999
|
+
var r = e[Symbol.toPrimitive];
|
|
1000
|
+
if (r !== void 0) {
|
|
1001
|
+
var n = r.call(e, t || "default");
|
|
1002
|
+
if (oe(n) !== "object") return n;
|
|
1003
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1004
|
+
}
|
|
1005
|
+
return (t === "string" ? String : Number)(e);
|
|
1006
|
+
}
|
|
1007
|
+
var nl = /* @__PURE__ */ function() {
|
|
1008
|
+
function e() {
|
|
1009
|
+
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
1010
|
+
Zc(this, e), tl(this, "items", void 0), this.items = t;
|
|
1011
|
+
}
|
|
1012
|
+
return el(e, [{
|
|
1013
|
+
key: "add",
|
|
1014
|
+
value: function(r) {
|
|
1015
|
+
return this.has(r) === !1 && this.items.push(r), this;
|
|
1016
|
+
}
|
|
1017
|
+
}, {
|
|
1018
|
+
key: "clear",
|
|
1019
|
+
value: function() {
|
|
1020
|
+
this.items = [];
|
|
1021
|
+
}
|
|
1022
|
+
}, {
|
|
1023
|
+
key: "delete",
|
|
1024
|
+
value: function(r) {
|
|
1025
|
+
var n = this.items.length;
|
|
1026
|
+
return this.items = this.items.filter(function(i) {
|
|
1027
|
+
return i !== r;
|
|
1028
|
+
}), n !== this.items.length;
|
|
1029
|
+
}
|
|
1030
|
+
}, {
|
|
1031
|
+
key: "forEach",
|
|
1032
|
+
value: function(r) {
|
|
1033
|
+
var n = this;
|
|
1034
|
+
this.items.forEach(function(i) {
|
|
1035
|
+
r(i, i, n);
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
}, {
|
|
1039
|
+
key: "has",
|
|
1040
|
+
value: function(r) {
|
|
1041
|
+
return this.items.indexOf(r) !== -1;
|
|
1042
|
+
}
|
|
1043
|
+
}, {
|
|
1044
|
+
key: "size",
|
|
1045
|
+
get: function() {
|
|
1046
|
+
return this.items.length;
|
|
1047
|
+
}
|
|
1048
|
+
}]), e;
|
|
1049
|
+
}();
|
|
1050
|
+
const il = typeof Set > "u" ? Set : nl;
|
|
1051
|
+
function I(e) {
|
|
1052
|
+
var t;
|
|
1053
|
+
return (
|
|
1054
|
+
// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
|
|
1055
|
+
(t = e.localName) !== null && t !== void 0 ? t : (
|
|
1056
|
+
// eslint-disable-next-line no-restricted-properties -- required for the fallback
|
|
1057
|
+
e.tagName.toLowerCase()
|
|
1058
|
+
)
|
|
1059
|
+
);
|
|
1060
|
+
}
|
|
1061
|
+
var al = {
|
|
1062
|
+
article: "article",
|
|
1063
|
+
aside: "complementary",
|
|
1064
|
+
button: "button",
|
|
1065
|
+
datalist: "listbox",
|
|
1066
|
+
dd: "definition",
|
|
1067
|
+
details: "group",
|
|
1068
|
+
dialog: "dialog",
|
|
1069
|
+
dt: "term",
|
|
1070
|
+
fieldset: "group",
|
|
1071
|
+
figure: "figure",
|
|
1072
|
+
// WARNING: Only with an accessible name
|
|
1073
|
+
form: "form",
|
|
1074
|
+
footer: "contentinfo",
|
|
1075
|
+
h1: "heading",
|
|
1076
|
+
h2: "heading",
|
|
1077
|
+
h3: "heading",
|
|
1078
|
+
h4: "heading",
|
|
1079
|
+
h5: "heading",
|
|
1080
|
+
h6: "heading",
|
|
1081
|
+
header: "banner",
|
|
1082
|
+
hr: "separator",
|
|
1083
|
+
html: "document",
|
|
1084
|
+
legend: "legend",
|
|
1085
|
+
li: "listitem",
|
|
1086
|
+
math: "math",
|
|
1087
|
+
main: "main",
|
|
1088
|
+
menu: "list",
|
|
1089
|
+
nav: "navigation",
|
|
1090
|
+
ol: "list",
|
|
1091
|
+
optgroup: "group",
|
|
1092
|
+
// WARNING: Only in certain context
|
|
1093
|
+
option: "option",
|
|
1094
|
+
output: "status",
|
|
1095
|
+
progress: "progressbar",
|
|
1096
|
+
// WARNING: Only with an accessible name
|
|
1097
|
+
section: "region",
|
|
1098
|
+
summary: "button",
|
|
1099
|
+
table: "table",
|
|
1100
|
+
tbody: "rowgroup",
|
|
1101
|
+
textarea: "textbox",
|
|
1102
|
+
tfoot: "rowgroup",
|
|
1103
|
+
// WARNING: Only in certain context
|
|
1104
|
+
td: "cell",
|
|
1105
|
+
th: "columnheader",
|
|
1106
|
+
thead: "rowgroup",
|
|
1107
|
+
tr: "row",
|
|
1108
|
+
ul: "list"
|
|
1109
|
+
}, sl = {
|
|
1110
|
+
caption: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1111
|
+
code: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1112
|
+
deletion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1113
|
+
emphasis: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1114
|
+
generic: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
|
|
1115
|
+
insertion: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1116
|
+
none: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1117
|
+
paragraph: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1118
|
+
presentation: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1119
|
+
strong: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1120
|
+
subscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"]),
|
|
1121
|
+
superscript: /* @__PURE__ */ new Set(["aria-label", "aria-labelledby"])
|
|
1122
|
+
};
|
|
1123
|
+
function ol(e, t) {
|
|
1124
|
+
return [
|
|
1125
|
+
"aria-atomic",
|
|
1126
|
+
"aria-busy",
|
|
1127
|
+
"aria-controls",
|
|
1128
|
+
"aria-current",
|
|
1129
|
+
"aria-description",
|
|
1130
|
+
"aria-describedby",
|
|
1131
|
+
"aria-details",
|
|
1132
|
+
// "disabled",
|
|
1133
|
+
"aria-dropeffect",
|
|
1134
|
+
// "errormessage",
|
|
1135
|
+
"aria-flowto",
|
|
1136
|
+
"aria-grabbed",
|
|
1137
|
+
// "haspopup",
|
|
1138
|
+
"aria-hidden",
|
|
1139
|
+
// "invalid",
|
|
1140
|
+
"aria-keyshortcuts",
|
|
1141
|
+
"aria-label",
|
|
1142
|
+
"aria-labelledby",
|
|
1143
|
+
"aria-live",
|
|
1144
|
+
"aria-owns",
|
|
1145
|
+
"aria-relevant",
|
|
1146
|
+
"aria-roledescription"
|
|
1147
|
+
].some(function(r) {
|
|
1148
|
+
var n;
|
|
1149
|
+
return e.hasAttribute(r) && !((n = sl[t]) !== null && n !== void 0 && n.has(r));
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
function vr(e, t) {
|
|
1153
|
+
return ol(e, t);
|
|
1154
|
+
}
|
|
1155
|
+
function ul(e) {
|
|
1156
|
+
var t = ll(e);
|
|
1157
|
+
if (t === null || Ue.indexOf(t) !== -1) {
|
|
1158
|
+
var r = cl(e);
|
|
1159
|
+
if (Ue.indexOf(t || "") === -1 || vr(e, r || ""))
|
|
1160
|
+
return r;
|
|
1161
|
+
}
|
|
1162
|
+
return t;
|
|
1163
|
+
}
|
|
1164
|
+
function cl(e) {
|
|
1165
|
+
var t = al[I(e)];
|
|
1166
|
+
if (t !== void 0)
|
|
1167
|
+
return t;
|
|
1168
|
+
switch (I(e)) {
|
|
1169
|
+
case "a":
|
|
1170
|
+
case "area":
|
|
1171
|
+
case "link":
|
|
1172
|
+
if (e.hasAttribute("href"))
|
|
1173
|
+
return "link";
|
|
1174
|
+
break;
|
|
1175
|
+
case "img":
|
|
1176
|
+
return e.getAttribute("alt") === "" && !vr(e, "img") ? "presentation" : "img";
|
|
1177
|
+
case "input": {
|
|
1178
|
+
var r = e, n = r.type;
|
|
1179
|
+
switch (n) {
|
|
1180
|
+
case "button":
|
|
1181
|
+
case "image":
|
|
1182
|
+
case "reset":
|
|
1183
|
+
case "submit":
|
|
1184
|
+
return "button";
|
|
1185
|
+
case "checkbox":
|
|
1186
|
+
case "radio":
|
|
1187
|
+
return n;
|
|
1188
|
+
case "range":
|
|
1189
|
+
return "slider";
|
|
1190
|
+
case "email":
|
|
1191
|
+
case "tel":
|
|
1192
|
+
case "text":
|
|
1193
|
+
case "url":
|
|
1194
|
+
return e.hasAttribute("list") ? "combobox" : "textbox";
|
|
1195
|
+
case "search":
|
|
1196
|
+
return e.hasAttribute("list") ? "combobox" : "searchbox";
|
|
1197
|
+
case "number":
|
|
1198
|
+
return "spinbutton";
|
|
1199
|
+
default:
|
|
1200
|
+
return null;
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
case "select":
|
|
1204
|
+
return e.hasAttribute("multiple") || e.size > 1 ? "listbox" : "combobox";
|
|
1205
|
+
}
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1208
|
+
function ll(e) {
|
|
1209
|
+
var t = e.getAttribute("role");
|
|
1210
|
+
if (t !== null) {
|
|
1211
|
+
var r = t.trim().split(" ")[0];
|
|
1212
|
+
if (r.length > 0)
|
|
1213
|
+
return r;
|
|
1214
|
+
}
|
|
1215
|
+
return null;
|
|
1216
|
+
}
|
|
1217
|
+
var Ue = ["presentation", "none"];
|
|
1218
|
+
function S(e) {
|
|
1219
|
+
return e !== null && e.nodeType === e.ELEMENT_NODE;
|
|
1220
|
+
}
|
|
1221
|
+
function br(e) {
|
|
1222
|
+
return S(e) && I(e) === "caption";
|
|
1223
|
+
}
|
|
1224
|
+
function ve(e) {
|
|
1225
|
+
return S(e) && I(e) === "input";
|
|
1226
|
+
}
|
|
1227
|
+
function fl(e) {
|
|
1228
|
+
return S(e) && I(e) === "optgroup";
|
|
1229
|
+
}
|
|
1230
|
+
function dl(e) {
|
|
1231
|
+
return S(e) && I(e) === "select";
|
|
1232
|
+
}
|
|
1233
|
+
function pl(e) {
|
|
1234
|
+
return S(e) && I(e) === "table";
|
|
1235
|
+
}
|
|
1236
|
+
function hl(e) {
|
|
1237
|
+
return S(e) && I(e) === "textarea";
|
|
1238
|
+
}
|
|
1239
|
+
function gl(e) {
|
|
1240
|
+
var t = e.ownerDocument === null ? e : e.ownerDocument, r = t.defaultView;
|
|
1241
|
+
if (r === null)
|
|
1242
|
+
throw new TypeError("no window available");
|
|
1243
|
+
return r;
|
|
1244
|
+
}
|
|
1245
|
+
function vl(e) {
|
|
1246
|
+
return S(e) && I(e) === "fieldset";
|
|
1247
|
+
}
|
|
1248
|
+
function bl(e) {
|
|
1249
|
+
return S(e) && I(e) === "legend";
|
|
1250
|
+
}
|
|
1251
|
+
function ml(e) {
|
|
1252
|
+
return S(e) && I(e) === "slot";
|
|
1253
|
+
}
|
|
1254
|
+
function yl(e) {
|
|
1255
|
+
return S(e) && e.ownerSVGElement !== void 0;
|
|
1256
|
+
}
|
|
1257
|
+
function $l(e) {
|
|
1258
|
+
return S(e) && I(e) === "svg";
|
|
1259
|
+
}
|
|
1260
|
+
function _l(e) {
|
|
1261
|
+
return yl(e) && I(e) === "title";
|
|
1262
|
+
}
|
|
1263
|
+
function $e(e, t) {
|
|
1264
|
+
if (S(e) && e.hasAttribute(t)) {
|
|
1265
|
+
var r = e.getAttribute(t).split(" "), n = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
1266
|
+
return r.map(function(i) {
|
|
1267
|
+
return n.getElementById(i);
|
|
1268
|
+
}).filter(
|
|
1269
|
+
function(i) {
|
|
1270
|
+
return i !== null;
|
|
1271
|
+
}
|
|
1272
|
+
// TODO: why does this not narrow?
|
|
1273
|
+
);
|
|
1274
|
+
}
|
|
1275
|
+
return [];
|
|
1276
|
+
}
|
|
1277
|
+
function V(e, t) {
|
|
1278
|
+
return S(e) ? t.indexOf(ul(e)) !== -1 : !1;
|
|
1279
|
+
}
|
|
1280
|
+
function wl(e) {
|
|
1281
|
+
return e.trim().replace(/\s\s+/g, " ");
|
|
1282
|
+
}
|
|
1283
|
+
function El(e, t) {
|
|
1284
|
+
if (!S(e))
|
|
1285
|
+
return !1;
|
|
1286
|
+
if (e.hasAttribute("hidden") || e.getAttribute("aria-hidden") === "true")
|
|
1287
|
+
return !0;
|
|
1288
|
+
var r = t(e);
|
|
1289
|
+
return r.getPropertyValue("display") === "none" || r.getPropertyValue("visibility") === "hidden";
|
|
1290
|
+
}
|
|
1291
|
+
function Al(e) {
|
|
1292
|
+
return V(e, ["button", "combobox", "listbox", "textbox"]) || mr(e, "range");
|
|
1293
|
+
}
|
|
1294
|
+
function mr(e, t) {
|
|
1295
|
+
if (!S(e))
|
|
1296
|
+
return !1;
|
|
1297
|
+
switch (t) {
|
|
1298
|
+
case "range":
|
|
1299
|
+
return V(e, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
|
|
1300
|
+
default:
|
|
1301
|
+
throw new TypeError("No knowledge about abstract role '".concat(t, "'. This is likely a bug :("));
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
function jt(e, t) {
|
|
1305
|
+
var r = P(e.querySelectorAll(t));
|
|
1306
|
+
return $e(e, "aria-owns").forEach(function(n) {
|
|
1307
|
+
r.push.apply(r, P(n.querySelectorAll(t)));
|
|
1308
|
+
}), r;
|
|
1309
|
+
}
|
|
1310
|
+
function Sl(e) {
|
|
1311
|
+
return dl(e) ? e.selectedOptions || jt(e, "[selected]") : jt(e, '[aria-selected="true"]');
|
|
1312
|
+
}
|
|
1313
|
+
function xl(e) {
|
|
1314
|
+
return V(e, Ue);
|
|
1315
|
+
}
|
|
1316
|
+
function Ol(e) {
|
|
1317
|
+
return br(e);
|
|
1318
|
+
}
|
|
1319
|
+
function Cl(e) {
|
|
1320
|
+
return V(e, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
|
|
1321
|
+
}
|
|
1322
|
+
function Tl(e) {
|
|
1323
|
+
return !1;
|
|
1324
|
+
}
|
|
1325
|
+
function Rl(e) {
|
|
1326
|
+
return ve(e) || hl(e) ? e.value : e.textContent || "";
|
|
1327
|
+
}
|
|
1328
|
+
function Ht(e) {
|
|
1329
|
+
var t = e.getPropertyValue("content");
|
|
1330
|
+
return /^["'].*["']$/.test(t) ? t.slice(1, -1) : "";
|
|
1331
|
+
}
|
|
1332
|
+
function yr(e) {
|
|
1333
|
+
var t = I(e);
|
|
1334
|
+
return t === "button" || t === "input" && e.getAttribute("type") !== "hidden" || t === "meter" || t === "output" || t === "progress" || t === "select" || t === "textarea";
|
|
1335
|
+
}
|
|
1336
|
+
function $r(e) {
|
|
1337
|
+
if (yr(e))
|
|
1338
|
+
return e;
|
|
1339
|
+
var t = null;
|
|
1340
|
+
return e.childNodes.forEach(function(r) {
|
|
1341
|
+
if (t === null && S(r)) {
|
|
1342
|
+
var n = $r(r);
|
|
1343
|
+
n !== null && (t = n);
|
|
1344
|
+
}
|
|
1345
|
+
}), t;
|
|
1346
|
+
}
|
|
1347
|
+
function Il(e) {
|
|
1348
|
+
if (e.control !== void 0)
|
|
1349
|
+
return e.control;
|
|
1350
|
+
var t = e.getAttribute("for");
|
|
1351
|
+
return t !== null ? e.ownerDocument.getElementById(t) : $r(e);
|
|
1352
|
+
}
|
|
1353
|
+
function Nl(e) {
|
|
1354
|
+
var t = e.labels;
|
|
1355
|
+
if (t === null)
|
|
1356
|
+
return t;
|
|
1357
|
+
if (t !== void 0)
|
|
1358
|
+
return P(t);
|
|
1359
|
+
if (!yr(e))
|
|
1360
|
+
return null;
|
|
1361
|
+
var r = e.ownerDocument;
|
|
1362
|
+
return P(r.querySelectorAll("label")).filter(function(n) {
|
|
1363
|
+
return Il(n) === e;
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
function jl(e) {
|
|
1367
|
+
var t = e.assignedNodes();
|
|
1368
|
+
return t.length === 0 ? P(e.childNodes) : t;
|
|
1369
|
+
}
|
|
1370
|
+
function _r(e) {
|
|
1371
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = new il(), n = gl(e), i = t.compute, a = i === void 0 ? "name" : i, u = t.computedStyleSupportsPseudoElements, s = u === void 0 ? t.getComputedStyle !== void 0 : u, c = t.getComputedStyle, l = c === void 0 ? n.getComputedStyle.bind(n) : c, h = t.hidden, g = h === void 0 ? !1 : h;
|
|
1372
|
+
function p(o, $) {
|
|
1373
|
+
var w = "";
|
|
1374
|
+
if (S(o) && s) {
|
|
1375
|
+
var T = l(o, "::before"), N = Ht(T);
|
|
1376
|
+
w = "".concat(N, " ").concat(w);
|
|
1377
|
+
}
|
|
1378
|
+
var D = ml(o) ? jl(o) : P(o.childNodes).concat($e(o, "aria-owns"));
|
|
1379
|
+
if (D.forEach(function(j) {
|
|
1380
|
+
var k = x(j, {
|
|
1381
|
+
isEmbeddedInLabel: $.isEmbeddedInLabel,
|
|
1382
|
+
isReferenced: !1,
|
|
1383
|
+
recursion: !0
|
|
1384
|
+
}), L = S(j) ? l(j).getPropertyValue("display") : "inline", K = L !== "inline" ? " " : "";
|
|
1385
|
+
w += "".concat(K).concat(k).concat(K);
|
|
1386
|
+
}), S(o) && s) {
|
|
1387
|
+
var M = l(o, "::after"), B = Ht(M);
|
|
1388
|
+
w = "".concat(w, " ").concat(B);
|
|
1389
|
+
}
|
|
1390
|
+
return w.trim();
|
|
1391
|
+
}
|
|
1392
|
+
function b(o, $) {
|
|
1393
|
+
var w = o.getAttributeNode($);
|
|
1394
|
+
return w !== null && !r.has(w) && w.value.trim() !== "" ? (r.add(w), w.value) : null;
|
|
1395
|
+
}
|
|
1396
|
+
function v(o) {
|
|
1397
|
+
return S(o) ? b(o, "title") : null;
|
|
1398
|
+
}
|
|
1399
|
+
function O(o) {
|
|
1400
|
+
if (!S(o))
|
|
1401
|
+
return null;
|
|
1402
|
+
if (vl(o)) {
|
|
1403
|
+
r.add(o);
|
|
1404
|
+
for (var $ = P(o.childNodes), w = 0; w < $.length; w += 1) {
|
|
1405
|
+
var T = $[w];
|
|
1406
|
+
if (bl(T))
|
|
1407
|
+
return x(T, {
|
|
1408
|
+
isEmbeddedInLabel: !1,
|
|
1409
|
+
isReferenced: !1,
|
|
1410
|
+
recursion: !1
|
|
1411
|
+
});
|
|
1412
|
+
}
|
|
1413
|
+
} else if (pl(o)) {
|
|
1414
|
+
r.add(o);
|
|
1415
|
+
for (var N = P(o.childNodes), D = 0; D < N.length; D += 1) {
|
|
1416
|
+
var M = N[D];
|
|
1417
|
+
if (br(M))
|
|
1418
|
+
return x(M, {
|
|
1419
|
+
isEmbeddedInLabel: !1,
|
|
1420
|
+
isReferenced: !1,
|
|
1421
|
+
recursion: !1
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
} else if ($l(o)) {
|
|
1425
|
+
r.add(o);
|
|
1426
|
+
for (var B = P(o.childNodes), j = 0; j < B.length; j += 1) {
|
|
1427
|
+
var k = B[j];
|
|
1428
|
+
if (_l(k))
|
|
1429
|
+
return k.textContent;
|
|
1430
|
+
}
|
|
1431
|
+
return null;
|
|
1432
|
+
} else if (I(o) === "img" || I(o) === "area") {
|
|
1433
|
+
var L = b(o, "alt");
|
|
1434
|
+
if (L !== null)
|
|
1435
|
+
return L;
|
|
1436
|
+
} else if (fl(o)) {
|
|
1437
|
+
var K = b(o, "label");
|
|
1438
|
+
if (K !== null)
|
|
1439
|
+
return K;
|
|
1440
|
+
}
|
|
1441
|
+
if (ve(o) && (o.type === "button" || o.type === "submit" || o.type === "reset")) {
|
|
1442
|
+
var fe = b(o, "value");
|
|
1443
|
+
if (fe !== null)
|
|
1444
|
+
return fe;
|
|
1445
|
+
if (o.type === "submit")
|
|
1446
|
+
return "Submit";
|
|
1447
|
+
if (o.type === "reset")
|
|
1448
|
+
return "Reset";
|
|
1449
|
+
}
|
|
1450
|
+
var ne = Nl(o);
|
|
1451
|
+
if (ne !== null && ne.length !== 0)
|
|
1452
|
+
return r.add(o), P(ne).map(function(ie) {
|
|
1453
|
+
return x(ie, {
|
|
1454
|
+
isEmbeddedInLabel: !0,
|
|
1455
|
+
isReferenced: !1,
|
|
1456
|
+
recursion: !0
|
|
1457
|
+
});
|
|
1458
|
+
}).filter(function(ie) {
|
|
1459
|
+
return ie.length > 0;
|
|
1460
|
+
}).join(" ");
|
|
1461
|
+
if (ve(o) && o.type === "image") {
|
|
1462
|
+
var de = b(o, "alt");
|
|
1463
|
+
if (de !== null)
|
|
1464
|
+
return de;
|
|
1465
|
+
var pe = b(o, "title");
|
|
1466
|
+
return pe !== null ? pe : "Submit Query";
|
|
1467
|
+
}
|
|
1468
|
+
if (V(o, ["button"])) {
|
|
1469
|
+
var he = p(o, {
|
|
1470
|
+
isEmbeddedInLabel: !1,
|
|
1471
|
+
isReferenced: !1
|
|
1472
|
+
});
|
|
1473
|
+
if (he !== "")
|
|
1474
|
+
return he;
|
|
1475
|
+
}
|
|
1476
|
+
return null;
|
|
1477
|
+
}
|
|
1478
|
+
function x(o, $) {
|
|
1479
|
+
if (r.has(o))
|
|
1480
|
+
return "";
|
|
1481
|
+
if (!g && El(o, l) && !$.isReferenced)
|
|
1482
|
+
return r.add(o), "";
|
|
1483
|
+
var w = S(o) ? o.getAttributeNode("aria-labelledby") : null, T = w !== null && !r.has(w) ? $e(o, "aria-labelledby") : [];
|
|
1484
|
+
if (a === "name" && !$.isReferenced && T.length > 0)
|
|
1485
|
+
return r.add(w), T.map(function(L) {
|
|
1486
|
+
return x(L, {
|
|
1487
|
+
isEmbeddedInLabel: $.isEmbeddedInLabel,
|
|
1488
|
+
isReferenced: !0,
|
|
1489
|
+
// this isn't recursion as specified, otherwise we would skip
|
|
1490
|
+
// `aria-label` in
|
|
1491
|
+
// <input id="myself" aria-label="foo" aria-labelledby="myself"
|
|
1492
|
+
recursion: !1
|
|
1493
|
+
});
|
|
1494
|
+
}).join(" ");
|
|
1495
|
+
var N = $.recursion && Al(o) && a === "name";
|
|
1496
|
+
if (!N) {
|
|
1497
|
+
var D = (S(o) && o.getAttribute("aria-label") || "").trim();
|
|
1498
|
+
if (D !== "" && a === "name")
|
|
1499
|
+
return r.add(o), D;
|
|
1500
|
+
if (!xl(o)) {
|
|
1501
|
+
var M = O(o);
|
|
1502
|
+
if (M !== null)
|
|
1503
|
+
return r.add(o), M;
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
if (V(o, ["menu"]))
|
|
1507
|
+
return r.add(o), "";
|
|
1508
|
+
if (N || $.isEmbeddedInLabel || $.isReferenced) {
|
|
1509
|
+
if (V(o, ["combobox", "listbox"])) {
|
|
1510
|
+
r.add(o);
|
|
1511
|
+
var B = Sl(o);
|
|
1512
|
+
return B.length === 0 ? ve(o) ? o.value : "" : P(B).map(function(L) {
|
|
1513
|
+
return x(L, {
|
|
1514
|
+
isEmbeddedInLabel: $.isEmbeddedInLabel,
|
|
1515
|
+
isReferenced: !1,
|
|
1516
|
+
recursion: !0
|
|
1517
|
+
});
|
|
1518
|
+
}).join(" ");
|
|
1519
|
+
}
|
|
1520
|
+
if (mr(o, "range"))
|
|
1521
|
+
return r.add(o), o.hasAttribute("aria-valuetext") ? o.getAttribute("aria-valuetext") : o.hasAttribute("aria-valuenow") ? o.getAttribute("aria-valuenow") : o.getAttribute("value") || "";
|
|
1522
|
+
if (V(o, ["textbox"]))
|
|
1523
|
+
return r.add(o), Rl(o);
|
|
1524
|
+
}
|
|
1525
|
+
if (Cl(o) || S(o) && $.isReferenced || Ol(o) || Tl()) {
|
|
1526
|
+
var j = p(o, {
|
|
1527
|
+
isEmbeddedInLabel: $.isEmbeddedInLabel,
|
|
1528
|
+
isReferenced: !1
|
|
1529
|
+
});
|
|
1530
|
+
if (j !== "")
|
|
1531
|
+
return r.add(o), j;
|
|
1532
|
+
}
|
|
1533
|
+
if (o.nodeType === o.TEXT_NODE)
|
|
1534
|
+
return r.add(o), o.textContent || "";
|
|
1535
|
+
if ($.recursion)
|
|
1536
|
+
return r.add(o), p(o, {
|
|
1537
|
+
isEmbeddedInLabel: $.isEmbeddedInLabel,
|
|
1538
|
+
isReferenced: !1
|
|
1539
|
+
});
|
|
1540
|
+
var k = v(o);
|
|
1541
|
+
return k !== null ? (r.add(o), k) : (r.add(o), "");
|
|
1542
|
+
}
|
|
1543
|
+
return wl(x(e, {
|
|
1544
|
+
isEmbeddedInLabel: !1,
|
|
1545
|
+
// by spec computeAccessibleDescription starts with the referenced elements as roots
|
|
1546
|
+
isReferenced: a === "description",
|
|
1547
|
+
recursion: !1
|
|
1548
|
+
}));
|
|
1549
|
+
}
|
|
1550
|
+
function ue(e) {
|
|
1551
|
+
"@babel/helpers - typeof";
|
|
1552
|
+
return ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1553
|
+
return typeof t;
|
|
1554
|
+
} : function(t) {
|
|
1555
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1556
|
+
}, ue(e);
|
|
1557
|
+
}
|
|
1558
|
+
function Pt(e, t) {
|
|
1559
|
+
var r = Object.keys(e);
|
|
1560
|
+
if (Object.getOwnPropertySymbols) {
|
|
1561
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1562
|
+
t && (n = n.filter(function(i) {
|
|
1563
|
+
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1564
|
+
})), r.push.apply(r, n);
|
|
1565
|
+
}
|
|
1566
|
+
return r;
|
|
1567
|
+
}
|
|
1568
|
+
function Dt(e) {
|
|
1569
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1570
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
1571
|
+
t % 2 ? Pt(Object(r), !0).forEach(function(n) {
|
|
1572
|
+
Hl(e, n, r[n]);
|
|
1573
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Pt(Object(r)).forEach(function(n) {
|
|
1574
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1575
|
+
});
|
|
1576
|
+
}
|
|
1577
|
+
return e;
|
|
1578
|
+
}
|
|
1579
|
+
function Hl(e, t, r) {
|
|
1580
|
+
return t = Pl(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1581
|
+
}
|
|
1582
|
+
function Pl(e) {
|
|
1583
|
+
var t = Dl(e, "string");
|
|
1584
|
+
return ue(t) === "symbol" ? t : String(t);
|
|
1585
|
+
}
|
|
1586
|
+
function Dl(e, t) {
|
|
1587
|
+
if (ue(e) !== "object" || e === null) return e;
|
|
1588
|
+
var r = e[Symbol.toPrimitive];
|
|
1589
|
+
if (r !== void 0) {
|
|
1590
|
+
var n = r.call(e, t || "default");
|
|
1591
|
+
if (ue(n) !== "object") return n;
|
|
1592
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1593
|
+
}
|
|
1594
|
+
return (t === "string" ? String : Number)(e);
|
|
1595
|
+
}
|
|
1596
|
+
function Ll(e) {
|
|
1597
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = $e(e, "aria-describedby").map(function(a) {
|
|
1598
|
+
return _r(a, Dt(Dt({}, t), {}, {
|
|
1599
|
+
compute: "description"
|
|
1600
|
+
}));
|
|
1601
|
+
}).join(" ");
|
|
1602
|
+
if (r === "") {
|
|
1603
|
+
var n = e.getAttribute("aria-description");
|
|
1604
|
+
r = n === null ? "" : n;
|
|
1605
|
+
}
|
|
1606
|
+
if (r === "") {
|
|
1607
|
+
var i = e.getAttribute("title");
|
|
1608
|
+
r = i === null ? "" : i;
|
|
1609
|
+
}
|
|
1610
|
+
return r;
|
|
1611
|
+
}
|
|
1612
|
+
function Ml(e) {
|
|
1613
|
+
return V(e, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
|
|
1614
|
+
}
|
|
1615
|
+
function Bl(e) {
|
|
1616
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1617
|
+
return Ml(e) ? "" : _r(e, t);
|
|
1618
|
+
}
|
|
1619
|
+
const kl = (e, t, r) => {
|
|
1620
|
+
let n = e.indexOf(t);
|
|
1621
|
+
if (n === -1)
|
|
1622
|
+
return e;
|
|
1623
|
+
const i = t.length;
|
|
1624
|
+
let a = 0, u = "";
|
|
1625
|
+
do
|
|
1626
|
+
u += e.substr(a, n - a) + t + r, a = n + i, n = e.indexOf(t, a);
|
|
1627
|
+
while (n !== -1);
|
|
1628
|
+
return u += e.substr(a), u;
|
|
1629
|
+
}, Vl = (e, t, r, n) => {
|
|
1630
|
+
let i = 0, a = "";
|
|
1631
|
+
do {
|
|
1632
|
+
const u = e[n - 1] === "\r";
|
|
1633
|
+
a += e.substr(i, (u ? n - 1 : n) - i) + t + (u ? `\r
|
|
1634
|
+
` : `
|
|
1635
|
+
`) + r, i = n + 1, n = e.indexOf(`
|
|
1636
|
+
`, i);
|
|
1637
|
+
} while (n !== -1);
|
|
1638
|
+
return a += e.substr(i), a;
|
|
1639
|
+
};
|
|
1640
|
+
var Fl = {
|
|
1641
|
+
stringReplaceAll: kl,
|
|
1642
|
+
stringEncaseCRLFWithFirstIndex: Vl
|
|
1643
|
+
}, De, Lt;
|
|
1644
|
+
function ql() {
|
|
1645
|
+
if (Lt) return De;
|
|
1646
|
+
Lt = 1;
|
|
1647
|
+
const e = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi, t = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g, r = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/, n = /\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi, i = /* @__PURE__ */ new Map([
|
|
1648
|
+
["n", `
|
|
1649
|
+
`],
|
|
1650
|
+
["r", "\r"],
|
|
1651
|
+
["t", " "],
|
|
1652
|
+
["b", "\b"],
|
|
1653
|
+
["f", "\f"],
|
|
1654
|
+
["v", "\v"],
|
|
1655
|
+
["0", "\0"],
|
|
1656
|
+
["\\", "\\"],
|
|
1657
|
+
["e", "\x1B"],
|
|
1658
|
+
["a", "\x07"]
|
|
1659
|
+
]);
|
|
1660
|
+
function a(l) {
|
|
1661
|
+
const h = l[0] === "u", g = l[1] === "{";
|
|
1662
|
+
return h && !g && l.length === 5 || l[0] === "x" && l.length === 3 ? String.fromCharCode(parseInt(l.slice(1), 16)) : h && g ? String.fromCodePoint(parseInt(l.slice(2, -1), 16)) : i.get(l) || l;
|
|
1663
|
+
}
|
|
1664
|
+
function u(l, h) {
|
|
1665
|
+
const g = [], p = h.trim().split(/\s*,\s*/g);
|
|
1666
|
+
let b;
|
|
1667
|
+
for (const v of p) {
|
|
1668
|
+
const O = Number(v);
|
|
1669
|
+
if (!Number.isNaN(O))
|
|
1670
|
+
g.push(O);
|
|
1671
|
+
else if (b = v.match(r))
|
|
1672
|
+
g.push(b[2].replace(n, (x, o, $) => o ? a(o) : $));
|
|
1673
|
+
else
|
|
1674
|
+
throw new Error(`Invalid Chalk template style argument: ${v} (in style '${l}')`);
|
|
1675
|
+
}
|
|
1676
|
+
return g;
|
|
1677
|
+
}
|
|
1678
|
+
function s(l) {
|
|
1679
|
+
t.lastIndex = 0;
|
|
1680
|
+
const h = [];
|
|
1681
|
+
let g;
|
|
1682
|
+
for (; (g = t.exec(l)) !== null; ) {
|
|
1683
|
+
const p = g[1];
|
|
1684
|
+
if (g[2]) {
|
|
1685
|
+
const b = u(p, g[2]);
|
|
1686
|
+
h.push([p].concat(b));
|
|
1687
|
+
} else
|
|
1688
|
+
h.push([p]);
|
|
1689
|
+
}
|
|
1690
|
+
return h;
|
|
1691
|
+
}
|
|
1692
|
+
function c(l, h) {
|
|
1693
|
+
const g = {};
|
|
1694
|
+
for (const b of h)
|
|
1695
|
+
for (const v of b.styles)
|
|
1696
|
+
g[v[0]] = b.inverse ? null : v.slice(1);
|
|
1697
|
+
let p = l;
|
|
1698
|
+
for (const [b, v] of Object.entries(g))
|
|
1699
|
+
if (Array.isArray(v)) {
|
|
1700
|
+
if (!(b in p))
|
|
1701
|
+
throw new Error(`Unknown Chalk style: ${b}`);
|
|
1702
|
+
p = v.length > 0 ? p[b](...v) : p[b];
|
|
1703
|
+
}
|
|
1704
|
+
return p;
|
|
1705
|
+
}
|
|
1706
|
+
return De = (l, h) => {
|
|
1707
|
+
const g = [], p = [];
|
|
1708
|
+
let b = [];
|
|
1709
|
+
if (h.replace(e, (v, O, x, o, $, w) => {
|
|
1710
|
+
if (O)
|
|
1711
|
+
b.push(a(O));
|
|
1712
|
+
else if (o) {
|
|
1713
|
+
const T = b.join("");
|
|
1714
|
+
b = [], p.push(g.length === 0 ? T : c(l, g)(T)), g.push({ inverse: x, styles: s(o) });
|
|
1715
|
+
} else if ($) {
|
|
1716
|
+
if (g.length === 0)
|
|
1717
|
+
throw new Error("Found extraneous } in Chalk template literal");
|
|
1718
|
+
p.push(c(l, g)(b.join(""))), b = [], g.pop();
|
|
1719
|
+
} else
|
|
1720
|
+
b.push(w);
|
|
1721
|
+
}), p.push(b.join("")), g.length > 0) {
|
|
1722
|
+
const v = `Chalk template literal is missing ${g.length} closing bracket${g.length === 1 ? "" : "s"} (\`}\`)`;
|
|
1723
|
+
throw new Error(v);
|
|
1724
|
+
}
|
|
1725
|
+
return p.join("");
|
|
1726
|
+
}, De;
|
|
1727
|
+
}
|
|
1728
|
+
const ce = ln, { stdout: Ke, stderr: ze } = fn, {
|
|
1729
|
+
stringReplaceAll: Gl,
|
|
1730
|
+
stringEncaseCRLFWithFirstIndex: Ul
|
|
1731
|
+
} = Fl, wr = [
|
|
1732
|
+
"ansi",
|
|
1733
|
+
"ansi",
|
|
1734
|
+
"ansi256",
|
|
1735
|
+
"ansi16m"
|
|
1736
|
+
], re = /* @__PURE__ */ Object.create(null), Kl = (e, t = {}) => {
|
|
1737
|
+
if (t.level > 3 || t.level < 0)
|
|
1738
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
1739
|
+
const r = Ke ? Ke.level : 0;
|
|
1740
|
+
e.level = t.level === void 0 ? r : t.level;
|
|
1741
|
+
};
|
|
1742
|
+
class zl {
|
|
1743
|
+
constructor(t) {
|
|
1744
|
+
return Er(t);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
const Er = (e) => {
|
|
1748
|
+
const t = {};
|
|
1749
|
+
return Kl(t, e), t.template = (...r) => Yl(t.template, ...r), Object.setPrototypeOf(t, Oe.prototype), Object.setPrototypeOf(t.template, t), t.template.constructor = () => {
|
|
1750
|
+
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
1751
|
+
}, t.template.Instance = zl, t.template;
|
|
1752
|
+
};
|
|
1753
|
+
function Oe(e) {
|
|
1754
|
+
return Er(e);
|
|
1755
|
+
}
|
|
1756
|
+
for (const [e, t] of Object.entries(ce))
|
|
1757
|
+
re[e] = {
|
|
1758
|
+
get() {
|
|
1759
|
+
const r = Ce(this, at(t.open, t.close, this._styler), this._isEmpty);
|
|
1760
|
+
return Object.defineProperty(this, e, { value: r }), r;
|
|
1761
|
+
}
|
|
1762
|
+
};
|
|
1763
|
+
re.visible = {
|
|
1764
|
+
get() {
|
|
1765
|
+
const e = Ce(this, this._styler, !0);
|
|
1766
|
+
return Object.defineProperty(this, "visible", { value: e }), e;
|
|
1767
|
+
}
|
|
1768
|
+
};
|
|
1769
|
+
const Ar = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
1770
|
+
for (const e of Ar)
|
|
1771
|
+
re[e] = {
|
|
1772
|
+
get() {
|
|
1773
|
+
const { level: t } = this;
|
|
1774
|
+
return function(...r) {
|
|
1775
|
+
const n = at(ce.color[wr[t]][e](...r), ce.color.close, this._styler);
|
|
1776
|
+
return Ce(this, n, this._isEmpty);
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
};
|
|
1780
|
+
for (const e of Ar) {
|
|
1781
|
+
const t = "bg" + e[0].toUpperCase() + e.slice(1);
|
|
1782
|
+
re[t] = {
|
|
1783
|
+
get() {
|
|
1784
|
+
const { level: r } = this;
|
|
1785
|
+
return function(...n) {
|
|
1786
|
+
const i = at(ce.bgColor[wr[r]][e](...n), ce.bgColor.close, this._styler);
|
|
1787
|
+
return Ce(this, i, this._isEmpty);
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
};
|
|
1791
|
+
}
|
|
1792
|
+
const Wl = Object.defineProperties(() => {
|
|
1793
|
+
}, {
|
|
1794
|
+
...re,
|
|
1795
|
+
level: {
|
|
1796
|
+
enumerable: !0,
|
|
1797
|
+
get() {
|
|
1798
|
+
return this._generator.level;
|
|
1799
|
+
},
|
|
1800
|
+
set(e) {
|
|
1801
|
+
this._generator.level = e;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
}), at = (e, t, r) => {
|
|
1805
|
+
let n, i;
|
|
1806
|
+
return r === void 0 ? (n = e, i = t) : (n = r.openAll + e, i = t + r.closeAll), {
|
|
1807
|
+
open: e,
|
|
1808
|
+
close: t,
|
|
1809
|
+
openAll: n,
|
|
1810
|
+
closeAll: i,
|
|
1811
|
+
parent: r
|
|
1812
|
+
};
|
|
1813
|
+
}, Ce = (e, t, r) => {
|
|
1814
|
+
const n = (...i) => Xl(n, i.length === 1 ? "" + i[0] : i.join(" "));
|
|
1815
|
+
return n.__proto__ = Wl, n._generator = e, n._styler = t, n._isEmpty = r, n;
|
|
1816
|
+
}, Xl = (e, t) => {
|
|
1817
|
+
if (e.level <= 0 || !t)
|
|
1818
|
+
return e._isEmpty ? "" : t;
|
|
1819
|
+
let r = e._styler;
|
|
1820
|
+
if (r === void 0)
|
|
1821
|
+
return t;
|
|
1822
|
+
const { openAll: n, closeAll: i } = r;
|
|
1823
|
+
if (t.indexOf("\x1B") !== -1)
|
|
1824
|
+
for (; r !== void 0; )
|
|
1825
|
+
t = Gl(t, r.close, r.open), r = r.parent;
|
|
1826
|
+
const a = t.indexOf(`
|
|
1827
|
+
`);
|
|
1828
|
+
return a !== -1 && (t = Ul(t, i, n, a)), n + t + i;
|
|
1829
|
+
};
|
|
1830
|
+
let Le;
|
|
1831
|
+
const Yl = (e, ...t) => {
|
|
1832
|
+
const [r] = t;
|
|
1833
|
+
if (!Array.isArray(r))
|
|
1834
|
+
return t.join(" ");
|
|
1835
|
+
const n = t.slice(1), i = [r.raw[0]];
|
|
1836
|
+
for (let a = 1; a < r.length; a++)
|
|
1837
|
+
i.push(
|
|
1838
|
+
String(n[a - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
1839
|
+
String(r.raw[a])
|
|
1840
|
+
);
|
|
1841
|
+
return Le === void 0 && (Le = ql()), Le(e, i.join(""));
|
|
1842
|
+
};
|
|
1843
|
+
Object.defineProperties(Oe.prototype, re);
|
|
1844
|
+
const le = Oe();
|
|
1845
|
+
le.supportsColor = Ke;
|
|
1846
|
+
le.stderr = Oe({ level: ze ? ze.level : 0 });
|
|
1847
|
+
le.stderr.supportsColor = ze;
|
|
1848
|
+
le.Level = {
|
|
1849
|
+
None: 0,
|
|
1850
|
+
Basic: 1,
|
|
1851
|
+
Ansi256: 2,
|
|
1852
|
+
TrueColor: 3,
|
|
1853
|
+
0: "None",
|
|
1854
|
+
1: "Basic",
|
|
1855
|
+
2: "Ansi256",
|
|
1856
|
+
3: "TrueColor"
|
|
1857
|
+
};
|
|
1858
|
+
var Jl = le;
|
|
1859
|
+
const Zl = /* @__PURE__ */ X(Jl);
|
|
1860
|
+
var Ql = cr;
|
|
1861
|
+
function ef(e, t, r) {
|
|
1862
|
+
r = typeof r == "function" ? r : void 0;
|
|
1863
|
+
var n = r ? r(e, t) : void 0;
|
|
1864
|
+
return n === void 0 ? Ql(e, t, void 0, r) : !!n;
|
|
1865
|
+
}
|
|
1866
|
+
var tf = ef;
|
|
1867
|
+
const Sr = /* @__PURE__ */ X(tf);
|
|
1868
|
+
function rf(e, t, r, n) {
|
|
1869
|
+
for (var i = e.length, a = r + (n ? 1 : -1); n ? a-- : ++a < i; )
|
|
1870
|
+
if (t(e[a], a, e))
|
|
1871
|
+
return a;
|
|
1872
|
+
return -1;
|
|
1873
|
+
}
|
|
1874
|
+
var nf = rf;
|
|
1875
|
+
function af(e) {
|
|
1876
|
+
return e !== e;
|
|
1877
|
+
}
|
|
1878
|
+
var sf = af;
|
|
1879
|
+
function of(e, t, r) {
|
|
1880
|
+
for (var n = r - 1, i = e.length; ++n < i; )
|
|
1881
|
+
if (e[n] === t)
|
|
1882
|
+
return n;
|
|
1883
|
+
return -1;
|
|
1884
|
+
}
|
|
1885
|
+
var uf = of, cf = nf, lf = sf, ff = uf;
|
|
1886
|
+
function df(e, t, r) {
|
|
1887
|
+
return t === t ? ff(e, t, r) : cf(e, lf, r);
|
|
1888
|
+
}
|
|
1889
|
+
var pf = df, hf = pf;
|
|
1890
|
+
function gf(e, t) {
|
|
1891
|
+
var r = e == null ? 0 : e.length;
|
|
1892
|
+
return !!r && hf(e, t, 0) > -1;
|
|
1893
|
+
}
|
|
1894
|
+
var vf = gf;
|
|
1895
|
+
function bf(e, t, r) {
|
|
1896
|
+
for (var n = -1, i = e == null ? 0 : e.length; ++n < i; )
|
|
1897
|
+
if (r(t, e[n]))
|
|
1898
|
+
return !0;
|
|
1899
|
+
return !1;
|
|
1900
|
+
}
|
|
1901
|
+
var mf = bf;
|
|
1902
|
+
function yf() {
|
|
1903
|
+
}
|
|
1904
|
+
var $f = yf, Me = sr, _f = $f, wf = rt, Ef = 1 / 0, Af = Me && 1 / wf(new Me([, -0]))[1] == Ef ? function(e) {
|
|
1905
|
+
return new Me(e);
|
|
1906
|
+
} : _f, Sf = Af, xf = Qt, Of = vf, Cf = mf, Tf = er, Rf = Sf, If = rt, Nf = 200;
|
|
1907
|
+
function jf(e, t, r) {
|
|
1908
|
+
var n = -1, i = Of, a = e.length, u = !0, s = [], c = s;
|
|
1909
|
+
if (r)
|
|
1910
|
+
u = !1, i = Cf;
|
|
1911
|
+
else if (a >= Nf) {
|
|
1912
|
+
var l = t ? null : Rf(e);
|
|
1913
|
+
if (l)
|
|
1914
|
+
return If(l);
|
|
1915
|
+
u = !1, i = Tf, c = new xf();
|
|
1916
|
+
} else
|
|
1917
|
+
c = t ? [] : s;
|
|
1918
|
+
e:
|
|
1919
|
+
for (; ++n < a; ) {
|
|
1920
|
+
var h = e[n], g = t ? t(h) : h;
|
|
1921
|
+
if (h = r || h !== 0 ? h : 0, u && g === g) {
|
|
1922
|
+
for (var p = c.length; p--; )
|
|
1923
|
+
if (c[p] === g)
|
|
1924
|
+
continue e;
|
|
1925
|
+
t && c.push(g), s.push(h);
|
|
1926
|
+
} else i(c, g, r) || (c !== s && c.push(g), s.push(h));
|
|
1927
|
+
}
|
|
1928
|
+
return s;
|
|
1929
|
+
}
|
|
1930
|
+
var Hf = jf, Pf = Hf;
|
|
1931
|
+
function Df(e) {
|
|
1932
|
+
return e && e.length ? Pf(e) : [];
|
|
1933
|
+
}
|
|
1934
|
+
var Lf = Df;
|
|
1935
|
+
const Mf = /* @__PURE__ */ X(Lf);
|
|
1936
|
+
var xr = { exports: {} };
|
|
1937
|
+
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
1938
|
+
(function(e, t) {
|
|
1939
|
+
(function(r, n) {
|
|
1940
|
+
e.exports = n(r);
|
|
1941
|
+
})(typeof W < "u" ? W : W, function(r) {
|
|
1942
|
+
if (r.CSS && r.CSS.escape)
|
|
1943
|
+
return r.CSS.escape;
|
|
1944
|
+
var n = function(i) {
|
|
1945
|
+
if (arguments.length == 0)
|
|
1946
|
+
throw new TypeError("`CSS.escape` requires an argument.");
|
|
1947
|
+
for (var a = String(i), u = a.length, s = -1, c, l = "", h = a.charCodeAt(0); ++s < u; ) {
|
|
1948
|
+
if (c = a.charCodeAt(s), c == 0) {
|
|
1949
|
+
l += "�";
|
|
1950
|
+
continue;
|
|
1951
|
+
}
|
|
1952
|
+
if (
|
|
1953
|
+
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
1954
|
+
// U+007F, […]
|
|
1955
|
+
c >= 1 && c <= 31 || c == 127 || // If the character is the first character and is in the range [0-9]
|
|
1956
|
+
// (U+0030 to U+0039), […]
|
|
1957
|
+
s == 0 && c >= 48 && c <= 57 || // If the character is the second character and is in the range [0-9]
|
|
1958
|
+
// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
|
|
1959
|
+
s == 1 && c >= 48 && c <= 57 && h == 45
|
|
1960
|
+
) {
|
|
1961
|
+
l += "\\" + c.toString(16) + " ";
|
|
1962
|
+
continue;
|
|
1963
|
+
}
|
|
1964
|
+
if (
|
|
1965
|
+
// If the character is the first character and is a `-` (U+002D), and
|
|
1966
|
+
// there is no second character, […]
|
|
1967
|
+
s == 0 && u == 1 && c == 45
|
|
1968
|
+
) {
|
|
1969
|
+
l += "\\" + a.charAt(s);
|
|
1970
|
+
continue;
|
|
1971
|
+
}
|
|
1972
|
+
if (c >= 128 || c == 45 || c == 95 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122) {
|
|
1973
|
+
l += a.charAt(s);
|
|
1974
|
+
continue;
|
|
1975
|
+
}
|
|
1976
|
+
l += "\\" + a.charAt(s);
|
|
1977
|
+
}
|
|
1978
|
+
return l;
|
|
1979
|
+
};
|
|
1980
|
+
return r.CSS || (r.CSS = {}), r.CSS.escape = n, n;
|
|
1981
|
+
});
|
|
1982
|
+
})(xr);
|
|
1983
|
+
var Bf = xr.exports;
|
|
1984
|
+
const kf = /* @__PURE__ */ X(Bf);
|
|
1985
|
+
class Or extends Error {
|
|
1986
|
+
constructor(t, r, n, i) {
|
|
1987
|
+
super(), Error.captureStackTrace && Error.captureStackTrace(this, n);
|
|
1988
|
+
let a = "";
|
|
1989
|
+
try {
|
|
1990
|
+
a = i.utils.printWithType(
|
|
1991
|
+
"Received",
|
|
1992
|
+
r,
|
|
1993
|
+
i.utils.printReceived
|
|
1994
|
+
);
|
|
1995
|
+
} catch {
|
|
1996
|
+
}
|
|
1997
|
+
this.message = [
|
|
1998
|
+
i.utils.matcherHint(
|
|
1999
|
+
`${i.isNot ? ".not" : ""}.${n.name}`,
|
|
2000
|
+
"received",
|
|
2001
|
+
""
|
|
2002
|
+
),
|
|
2003
|
+
"",
|
|
2004
|
+
// eslint-disable-next-line new-cap
|
|
2005
|
+
`${i.utils.RECEIVED_COLOR(
|
|
2006
|
+
"received"
|
|
2007
|
+
)} value must ${t}.`,
|
|
2008
|
+
a
|
|
2009
|
+
].join(`
|
|
2010
|
+
`);
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
class Mt extends Or {
|
|
2014
|
+
constructor(...t) {
|
|
2015
|
+
super("be an HTMLElement or an SVGElement", ...t);
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
class Bt extends Or {
|
|
2019
|
+
constructor(...t) {
|
|
2020
|
+
super("be a Node", ...t);
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
function Cr(e, t, ...r) {
|
|
2024
|
+
if (!e || !e.ownerDocument || !e.ownerDocument.defaultView)
|
|
2025
|
+
throw new t(e, ...r);
|
|
2026
|
+
}
|
|
2027
|
+
function Vf(e, ...t) {
|
|
2028
|
+
Cr(e, Bt, ...t);
|
|
2029
|
+
const r = e.ownerDocument.defaultView;
|
|
2030
|
+
if (!(e instanceof r.Node))
|
|
2031
|
+
throw new Bt(e, ...t);
|
|
2032
|
+
}
|
|
2033
|
+
function _(e, ...t) {
|
|
2034
|
+
Cr(e, Mt, ...t);
|
|
2035
|
+
const r = e.ownerDocument.defaultView;
|
|
2036
|
+
if (!(e instanceof r.HTMLElement) && !(e instanceof r.SVGElement))
|
|
2037
|
+
throw new Mt(e, ...t);
|
|
2038
|
+
}
|
|
2039
|
+
class Ff extends Error {
|
|
2040
|
+
constructor(t, r, n) {
|
|
2041
|
+
super(), Error.captureStackTrace && Error.captureStackTrace(this, r), this.message = [
|
|
2042
|
+
t.message,
|
|
2043
|
+
"",
|
|
2044
|
+
// eslint-disable-next-line new-cap
|
|
2045
|
+
n.utils.RECEIVED_COLOR("Failing css:"),
|
|
2046
|
+
// eslint-disable-next-line new-cap
|
|
2047
|
+
n.utils.RECEIVED_COLOR(`${t.css}`)
|
|
2048
|
+
].join(`
|
|
2049
|
+
`);
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
function qf(e, ...t) {
|
|
2053
|
+
const r = Kc(`selector { ${e} }`, { silent: !0 }).stylesheet;
|
|
2054
|
+
if (r.parsingErrors && r.parsingErrors.length > 0) {
|
|
2055
|
+
const { reason: i, line: a } = r.parsingErrors[0];
|
|
2056
|
+
throw new Ff(
|
|
2057
|
+
{
|
|
2058
|
+
css: e,
|
|
2059
|
+
message: `Syntax error parsing expected css: ${i} on line: ${a}`
|
|
2060
|
+
},
|
|
2061
|
+
...t
|
|
2062
|
+
);
|
|
2063
|
+
}
|
|
2064
|
+
return r.rules[0].declarations.filter((i) => i.type === "declaration").reduce(
|
|
2065
|
+
(i, { property: a, value: u }) => Object.assign(i, { [a]: u }),
|
|
2066
|
+
{}
|
|
2067
|
+
);
|
|
2068
|
+
}
|
|
2069
|
+
function kt(e, t) {
|
|
2070
|
+
return typeof t == "string" ? t : e.utils.stringify(t);
|
|
2071
|
+
}
|
|
2072
|
+
function R(e, t, r, n, i, a) {
|
|
2073
|
+
return [
|
|
2074
|
+
`${t}
|
|
2075
|
+
`,
|
|
2076
|
+
// eslint-disable-next-line new-cap
|
|
2077
|
+
`${r}:
|
|
2078
|
+
${e.utils.EXPECTED_COLOR(
|
|
2079
|
+
st(kt(e, n), 2)
|
|
2080
|
+
)}`,
|
|
2081
|
+
// eslint-disable-next-line new-cap
|
|
2082
|
+
`${i}:
|
|
2083
|
+
${e.utils.RECEIVED_COLOR(
|
|
2084
|
+
st(kt(e, a), 2)
|
|
2085
|
+
)}`
|
|
2086
|
+
].join(`
|
|
2087
|
+
`);
|
|
2088
|
+
}
|
|
2089
|
+
function Gf(e, t) {
|
|
2090
|
+
return t instanceof RegExp ? t.test(e) : e.includes(String(t));
|
|
2091
|
+
}
|
|
2092
|
+
function Te(e, t) {
|
|
2093
|
+
console.warn(
|
|
2094
|
+
`Warning: ${e} has been deprecated and will be removed in future updates.`,
|
|
2095
|
+
t
|
|
2096
|
+
);
|
|
2097
|
+
}
|
|
2098
|
+
function Re(e) {
|
|
2099
|
+
return e.replace(/\s+/g, " ").trim();
|
|
2100
|
+
}
|
|
2101
|
+
function U(e) {
|
|
2102
|
+
return e.tagName && e.tagName.toLowerCase();
|
|
2103
|
+
}
|
|
2104
|
+
function Uf({ multiple: e, options: t }) {
|
|
2105
|
+
const r = [...t].filter((n) => n.selected);
|
|
2106
|
+
if (e)
|
|
2107
|
+
return [...r].map((n) => n.value);
|
|
2108
|
+
if (r.length !== 0)
|
|
2109
|
+
return r[0].value;
|
|
2110
|
+
}
|
|
2111
|
+
function Kf(e) {
|
|
2112
|
+
switch (e.type) {
|
|
2113
|
+
case "number":
|
|
2114
|
+
return e.value === "" ? null : Number(e.value);
|
|
2115
|
+
case "checkbox":
|
|
2116
|
+
return e.checked;
|
|
2117
|
+
default:
|
|
2118
|
+
return e.value;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
function Tr(e) {
|
|
2122
|
+
if (e)
|
|
2123
|
+
switch (e.tagName.toLowerCase()) {
|
|
2124
|
+
case "input":
|
|
2125
|
+
return Kf(e);
|
|
2126
|
+
case "select":
|
|
2127
|
+
return Uf(e);
|
|
2128
|
+
default:
|
|
2129
|
+
return e.value;
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
function Rr(e, t) {
|
|
2133
|
+
if (Array.isArray(e) && Array.isArray(t))
|
|
2134
|
+
return Fc(new Set(e), new Set(t));
|
|
2135
|
+
}
|
|
2136
|
+
function zf(e, { wordConnector: t = ", ", lastWordConnector: r = " and " } = {}) {
|
|
2137
|
+
return [e.slice(0, -1).join(t), e[e.length - 1]].join(
|
|
2138
|
+
e.length > 1 ? r : ""
|
|
2139
|
+
);
|
|
2140
|
+
}
|
|
2141
|
+
function We(e, t) {
|
|
2142
|
+
return Te(
|
|
2143
|
+
"toBeInTheDOM",
|
|
2144
|
+
"Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container."
|
|
2145
|
+
), e && _(e, We, this), t && _(t, We, this), {
|
|
2146
|
+
pass: t ? t.contains(e) : !!e,
|
|
2147
|
+
message: () => [
|
|
2148
|
+
this.utils.matcherHint(
|
|
2149
|
+
`${this.isNot ? ".not" : ""}.toBeInTheDOM`,
|
|
2150
|
+
"element",
|
|
2151
|
+
""
|
|
2152
|
+
),
|
|
2153
|
+
"",
|
|
2154
|
+
"Received:",
|
|
2155
|
+
` ${this.utils.printReceived(
|
|
2156
|
+
e && e.cloneNode(!1)
|
|
2157
|
+
)}`
|
|
2158
|
+
].join(`
|
|
2159
|
+
`)
|
|
2160
|
+
};
|
|
2161
|
+
}
|
|
2162
|
+
function Ir(e) {
|
|
2163
|
+
(e !== null || !this.isNot) && _(e, Ir, this);
|
|
2164
|
+
const t = e === null ? !1 : e.ownerDocument === e.getRootNode({ composed: !0 }), r = () => `expected document not to contain element, found ${this.utils.stringify(
|
|
2165
|
+
e.cloneNode(!0)
|
|
2166
|
+
)} instead`, n = () => "element could not be found in the document";
|
|
2167
|
+
return {
|
|
2168
|
+
pass: t,
|
|
2169
|
+
message: () => [
|
|
2170
|
+
this.utils.matcherHint(
|
|
2171
|
+
`${this.isNot ? ".not" : ""}.toBeInTheDocument`,
|
|
2172
|
+
"element",
|
|
2173
|
+
""
|
|
2174
|
+
),
|
|
2175
|
+
"",
|
|
2176
|
+
// eslint-disable-next-line new-cap
|
|
2177
|
+
this.utils.RECEIVED_COLOR(this.isNot ? r() : n())
|
|
2178
|
+
].join(`
|
|
2179
|
+
`)
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
function Nr(e) {
|
|
2183
|
+
return Te(
|
|
2184
|
+
"toBeEmpty",
|
|
2185
|
+
"Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM."
|
|
2186
|
+
), _(e, Nr, this), {
|
|
2187
|
+
pass: e.innerHTML === "",
|
|
2188
|
+
message: () => [
|
|
2189
|
+
this.utils.matcherHint(
|
|
2190
|
+
`${this.isNot ? ".not" : ""}.toBeEmpty`,
|
|
2191
|
+
"element",
|
|
2192
|
+
""
|
|
2193
|
+
),
|
|
2194
|
+
"",
|
|
2195
|
+
"Received:",
|
|
2196
|
+
` ${this.utils.printReceived(e.innerHTML)}`
|
|
2197
|
+
].join(`
|
|
2198
|
+
`)
|
|
2199
|
+
};
|
|
2200
|
+
}
|
|
2201
|
+
function jr(e) {
|
|
2202
|
+
return _(e, jr, this), {
|
|
2203
|
+
pass: Wf(e),
|
|
2204
|
+
message: () => [
|
|
2205
|
+
this.utils.matcherHint(
|
|
2206
|
+
`${this.isNot ? ".not" : ""}.toBeEmptyDOMElement`,
|
|
2207
|
+
"element",
|
|
2208
|
+
""
|
|
2209
|
+
),
|
|
2210
|
+
"",
|
|
2211
|
+
"Received:",
|
|
2212
|
+
` ${this.utils.printReceived(e.innerHTML)}`
|
|
2213
|
+
].join(`
|
|
2214
|
+
`)
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
function Wf(e) {
|
|
2218
|
+
return [...e.childNodes].filter((r) => r.nodeType !== 8).length === 0;
|
|
2219
|
+
}
|
|
2220
|
+
function Xe(e, t) {
|
|
2221
|
+
return _(e, Xe, this), t !== null && _(t, Xe, this), {
|
|
2222
|
+
pass: e.contains(t),
|
|
2223
|
+
message: () => [
|
|
2224
|
+
this.utils.matcherHint(
|
|
2225
|
+
`${this.isNot ? ".not" : ""}.toContainElement`,
|
|
2226
|
+
"element",
|
|
2227
|
+
"element"
|
|
2228
|
+
),
|
|
2229
|
+
"",
|
|
2230
|
+
// eslint-disable-next-line new-cap
|
|
2231
|
+
this.utils.RECEIVED_COLOR(`${this.utils.stringify(
|
|
2232
|
+
e.cloneNode(!1)
|
|
2233
|
+
)} ${this.isNot ? "contains:" : "does not contain:"} ${this.utils.stringify(t && t.cloneNode(!1))}
|
|
2234
|
+
`)
|
|
2235
|
+
].join(`
|
|
2236
|
+
`)
|
|
2237
|
+
};
|
|
2238
|
+
}
|
|
2239
|
+
function Xf(e, t) {
|
|
2240
|
+
const r = e.ownerDocument.createElement("div");
|
|
2241
|
+
return r.innerHTML = t, r.innerHTML;
|
|
2242
|
+
}
|
|
2243
|
+
function Hr(e, t) {
|
|
2244
|
+
if (_(e, Hr, this), typeof t != "string")
|
|
2245
|
+
throw new Error(`.toContainHTML() expects a string value, got ${t}`);
|
|
2246
|
+
return {
|
|
2247
|
+
pass: e.outerHTML.includes(Xf(e, t)),
|
|
2248
|
+
message: () => [
|
|
2249
|
+
this.utils.matcherHint(
|
|
2250
|
+
`${this.isNot ? ".not" : ""}.toContainHTML`,
|
|
2251
|
+
"element",
|
|
2252
|
+
""
|
|
2253
|
+
),
|
|
2254
|
+
"Expected:",
|
|
2255
|
+
// eslint-disable-next-line new-cap
|
|
2256
|
+
` ${this.utils.EXPECTED_COLOR(t)}`,
|
|
2257
|
+
"Received:",
|
|
2258
|
+
` ${this.utils.printReceived(e.cloneNode(!0))}`
|
|
2259
|
+
].join(`
|
|
2260
|
+
`)
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
function Pr(e, t, r = { normalizeWhitespace: !0 }) {
|
|
2264
|
+
Vf(e, Pr, this);
|
|
2265
|
+
const n = r.normalizeWhitespace ? Re(e.textContent) : e.textContent.replace(/\u00a0/g, " "), i = n !== "" && t === "";
|
|
2266
|
+
return {
|
|
2267
|
+
pass: !i && Gf(n, t),
|
|
2268
|
+
message: () => {
|
|
2269
|
+
const a = this.isNot ? "not to" : "to";
|
|
2270
|
+
return R(
|
|
2271
|
+
this,
|
|
2272
|
+
this.utils.matcherHint(
|
|
2273
|
+
`${this.isNot ? ".not" : ""}.toHaveTextContent`,
|
|
2274
|
+
"element",
|
|
2275
|
+
""
|
|
2276
|
+
),
|
|
2277
|
+
i ? "Checking with empty string will always match, use .toBeEmptyDOMElement() instead" : `Expected element ${a} have text content`,
|
|
2278
|
+
t,
|
|
2279
|
+
"Received",
|
|
2280
|
+
n
|
|
2281
|
+
);
|
|
2282
|
+
}
|
|
2283
|
+
};
|
|
2284
|
+
}
|
|
2285
|
+
function Ye(e, t) {
|
|
2286
|
+
_(e, Ye, this);
|
|
2287
|
+
const r = Ll(e), n = arguments.length === 1;
|
|
2288
|
+
let i = !1;
|
|
2289
|
+
return n ? i = r !== "" : i = t instanceof RegExp ? t.test(r) : this.equals(
|
|
2290
|
+
r,
|
|
2291
|
+
t
|
|
2292
|
+
), {
|
|
2293
|
+
pass: i,
|
|
2294
|
+
message: () => {
|
|
2295
|
+
const a = this.isNot ? "not to" : "to";
|
|
2296
|
+
return R(
|
|
2297
|
+
this,
|
|
2298
|
+
this.utils.matcherHint(
|
|
2299
|
+
`${this.isNot ? ".not" : ""}.${Ye.name}`,
|
|
2300
|
+
"element",
|
|
2301
|
+
""
|
|
2302
|
+
),
|
|
2303
|
+
`Expected element ${a} have accessible description`,
|
|
2304
|
+
t,
|
|
2305
|
+
"Received",
|
|
2306
|
+
r
|
|
2307
|
+
);
|
|
2308
|
+
}
|
|
2309
|
+
};
|
|
2310
|
+
}
|
|
2311
|
+
const se = "aria-invalid", Yf = ["false"];
|
|
2312
|
+
function Dr(e, t) {
|
|
2313
|
+
var l;
|
|
2314
|
+
_(e, Dr, this);
|
|
2315
|
+
const r = this.isNot ? "not to" : "to", n = this.isNot ? ".not.toHaveAccessibleErrorMessage" : ".toHaveAccessibleErrorMessage", i = e.getAttribute("aria-errormessage");
|
|
2316
|
+
if (!!i && /\s+/.test(i))
|
|
2317
|
+
return {
|
|
2318
|
+
pass: !1,
|
|
2319
|
+
message: () => R(
|
|
2320
|
+
this,
|
|
2321
|
+
this.utils.matcherHint(n, "element"),
|
|
2322
|
+
"Expected element's `aria-errormessage` attribute to be empty or a single, valid ID",
|
|
2323
|
+
"",
|
|
2324
|
+
"Received",
|
|
2325
|
+
`aria-errormessage="${i}"`
|
|
2326
|
+
)
|
|
2327
|
+
};
|
|
2328
|
+
const u = e.getAttribute(se);
|
|
2329
|
+
if (!e.hasAttribute(se) || Yf.includes(u))
|
|
2330
|
+
return {
|
|
2331
|
+
pass: !1,
|
|
2332
|
+
message: () => R(
|
|
2333
|
+
this,
|
|
2334
|
+
this.utils.matcherHint(n, "element"),
|
|
2335
|
+
"Expected element to be marked as invalid with attribute",
|
|
2336
|
+
`${se}="${String(!0)}"`,
|
|
2337
|
+
"Received",
|
|
2338
|
+
e.hasAttribute("aria-invalid") ? `${se}="${e.getAttribute(se)}` : null
|
|
2339
|
+
)
|
|
2340
|
+
};
|
|
2341
|
+
const c = Re(
|
|
2342
|
+
((l = e.ownerDocument.getElementById(i)) == null ? void 0 : l.textContent) ?? ""
|
|
2343
|
+
);
|
|
2344
|
+
return {
|
|
2345
|
+
pass: t === void 0 ? !!c : t instanceof RegExp ? t.test(c) : this.equals(c, t),
|
|
2346
|
+
message: () => R(
|
|
2347
|
+
this,
|
|
2348
|
+
this.utils.matcherHint(n, "element"),
|
|
2349
|
+
`Expected element ${r} have accessible error message`,
|
|
2350
|
+
t ?? "",
|
|
2351
|
+
"Received",
|
|
2352
|
+
c
|
|
2353
|
+
)
|
|
2354
|
+
};
|
|
2355
|
+
}
|
|
2356
|
+
const Jf = ed(cn);
|
|
2357
|
+
function Je(e, t) {
|
|
2358
|
+
_(e, Je, this);
|
|
2359
|
+
const r = Zf(e);
|
|
2360
|
+
return {
|
|
2361
|
+
pass: r.some((i) => i === t),
|
|
2362
|
+
message: () => {
|
|
2363
|
+
const i = this.isNot ? "not to" : "to";
|
|
2364
|
+
return R(
|
|
2365
|
+
this,
|
|
2366
|
+
this.utils.matcherHint(
|
|
2367
|
+
`${this.isNot ? ".not" : ""}.${Je.name}`,
|
|
2368
|
+
"element",
|
|
2369
|
+
""
|
|
2370
|
+
),
|
|
2371
|
+
`Expected element ${i} have role`,
|
|
2372
|
+
t,
|
|
2373
|
+
"Received",
|
|
2374
|
+
r.join(", ")
|
|
2375
|
+
);
|
|
2376
|
+
}
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
function Zf(e) {
|
|
2380
|
+
return e.hasAttribute("role") ? e.getAttribute("role").split(" ").filter(Boolean) : Qf(e);
|
|
2381
|
+
}
|
|
2382
|
+
function Qf(e) {
|
|
2383
|
+
for (const { match: t, roles: r } of Jf)
|
|
2384
|
+
if (t(e))
|
|
2385
|
+
return [...r];
|
|
2386
|
+
return [];
|
|
2387
|
+
}
|
|
2388
|
+
function ed(e) {
|
|
2389
|
+
function t({ name: u, attributes: s }) {
|
|
2390
|
+
return `${u}${s.map(({ name: c, value: l, constraints: h = [] }) => h.indexOf("undefined") !== -1 ? `:not([${c}])` : l ? `[${c}="${l}"]` : `[${c}]`).join("")}`;
|
|
2391
|
+
}
|
|
2392
|
+
function r({ attributes: u = [] }) {
|
|
2393
|
+
return u.length;
|
|
2394
|
+
}
|
|
2395
|
+
function n({ specificity: u }, { specificity: s }) {
|
|
2396
|
+
return s - u;
|
|
2397
|
+
}
|
|
2398
|
+
function i(u) {
|
|
2399
|
+
let { attributes: s = [] } = u;
|
|
2400
|
+
const c = s.findIndex(
|
|
2401
|
+
(h) => h.value && h.name === "type" && h.value === "text"
|
|
2402
|
+
);
|
|
2403
|
+
c >= 0 && (s = [
|
|
2404
|
+
...s.slice(0, c),
|
|
2405
|
+
...s.slice(c + 1)
|
|
2406
|
+
]);
|
|
2407
|
+
const l = t({ ...u, attributes: s });
|
|
2408
|
+
return (h) => c >= 0 && h.type !== "text" ? !1 : h.matches(l);
|
|
2409
|
+
}
|
|
2410
|
+
let a = [];
|
|
2411
|
+
for (const [u, s] of e.entries())
|
|
2412
|
+
a = [
|
|
2413
|
+
...a,
|
|
2414
|
+
{
|
|
2415
|
+
match: i(u),
|
|
2416
|
+
roles: Array.from(s),
|
|
2417
|
+
specificity: r(u)
|
|
2418
|
+
}
|
|
2419
|
+
];
|
|
2420
|
+
return a.sort(n);
|
|
2421
|
+
}
|
|
2422
|
+
function Ze(e, t) {
|
|
2423
|
+
_(e, Ze, this);
|
|
2424
|
+
const r = Bl(e), n = arguments.length === 1;
|
|
2425
|
+
let i = !1;
|
|
2426
|
+
return n ? i = r !== "" : i = t instanceof RegExp ? t.test(r) : this.equals(r, t), {
|
|
2427
|
+
pass: i,
|
|
2428
|
+
message: () => {
|
|
2429
|
+
const a = this.isNot ? "not to" : "to";
|
|
2430
|
+
return R(
|
|
2431
|
+
this,
|
|
2432
|
+
this.utils.matcherHint(
|
|
2433
|
+
`${this.isNot ? ".not" : ""}.${Ze.name}`,
|
|
2434
|
+
"element",
|
|
2435
|
+
""
|
|
2436
|
+
),
|
|
2437
|
+
`Expected element ${a} have accessible name`,
|
|
2438
|
+
t,
|
|
2439
|
+
"Received",
|
|
2440
|
+
r
|
|
2441
|
+
);
|
|
2442
|
+
}
|
|
2443
|
+
};
|
|
2444
|
+
}
|
|
2445
|
+
function Vt(e, t, r) {
|
|
2446
|
+
return r === void 0 ? t : `${t}=${e(r)}`;
|
|
2447
|
+
}
|
|
2448
|
+
function td(e, t, r) {
|
|
2449
|
+
return r === void 0 ? `element.hasAttribute(${e(t)})` : `element.getAttribute(${e(t)}) === ${e(r)}`;
|
|
2450
|
+
}
|
|
2451
|
+
function Lr(e, t, r) {
|
|
2452
|
+
_(e, Lr, this);
|
|
2453
|
+
const n = r !== void 0, i = e.hasAttribute(t), a = e.getAttribute(t);
|
|
2454
|
+
return {
|
|
2455
|
+
pass: n ? i && this.equals(a, r) : i,
|
|
2456
|
+
message: () => {
|
|
2457
|
+
const u = this.isNot ? "not to" : "to", s = i ? Vt(this.utils.stringify, t, a) : null, c = this.utils.matcherHint(
|
|
2458
|
+
`${this.isNot ? ".not" : ""}.toHaveAttribute`,
|
|
2459
|
+
"element",
|
|
2460
|
+
this.utils.printExpected(t),
|
|
2461
|
+
{
|
|
2462
|
+
secondArgument: n ? this.utils.printExpected(r) : void 0,
|
|
2463
|
+
comment: td(
|
|
2464
|
+
this.utils.stringify,
|
|
2465
|
+
t,
|
|
2466
|
+
r
|
|
2467
|
+
)
|
|
2468
|
+
}
|
|
2469
|
+
);
|
|
2470
|
+
return R(
|
|
2471
|
+
this,
|
|
2472
|
+
c,
|
|
2473
|
+
`Expected the element ${u} have attribute`,
|
|
2474
|
+
Vt(this.utils.stringify, t, r),
|
|
2475
|
+
"Received",
|
|
2476
|
+
s
|
|
2477
|
+
);
|
|
2478
|
+
}
|
|
2479
|
+
};
|
|
2480
|
+
}
|
|
2481
|
+
function rd(e) {
|
|
2482
|
+
const t = e.pop();
|
|
2483
|
+
let r, n;
|
|
2484
|
+
return typeof t == "object" && !(t instanceof RegExp) ? (r = e, n = t) : (r = e.concat(t), n = { exact: !1 }), { expectedClassNames: r, options: n };
|
|
2485
|
+
}
|
|
2486
|
+
function Ft(e) {
|
|
2487
|
+
return e ? e.split(/\s+/).filter((t) => t.length > 0) : [];
|
|
2488
|
+
}
|
|
2489
|
+
function qt(e, t) {
|
|
2490
|
+
return e.every(
|
|
2491
|
+
(r) => typeof r == "string" ? t.includes(r) : t.some((n) => r.test(n))
|
|
2492
|
+
);
|
|
2493
|
+
}
|
|
2494
|
+
function Mr(e, ...t) {
|
|
2495
|
+
_(e, Mr, this);
|
|
2496
|
+
const { expectedClassNames: r, options: n } = rd(t), i = Ft(e.getAttribute("class")), a = r.reduce(
|
|
2497
|
+
(s, c) => s.concat(
|
|
2498
|
+
typeof c == "string" || !c ? Ft(c) : c
|
|
2499
|
+
),
|
|
2500
|
+
[]
|
|
2501
|
+
), u = a.some((s) => s instanceof RegExp);
|
|
2502
|
+
if (n.exact && u)
|
|
2503
|
+
throw new Error("Exact option does not support RegExp expected class names");
|
|
2504
|
+
return n.exact ? {
|
|
2505
|
+
pass: qt(a, i) && a.length === i.length,
|
|
2506
|
+
message: () => {
|
|
2507
|
+
const s = this.isNot ? "not to" : "to";
|
|
2508
|
+
return R(
|
|
2509
|
+
this,
|
|
2510
|
+
this.utils.matcherHint(
|
|
2511
|
+
`${this.isNot ? ".not" : ""}.toHaveClass`,
|
|
2512
|
+
"element",
|
|
2513
|
+
this.utils.printExpected(a.join(" "))
|
|
2514
|
+
),
|
|
2515
|
+
`Expected the element ${s} have EXACTLY defined classes`,
|
|
2516
|
+
a.join(" "),
|
|
2517
|
+
"Received",
|
|
2518
|
+
i.join(" ")
|
|
2519
|
+
);
|
|
2520
|
+
}
|
|
2521
|
+
} : a.length > 0 ? {
|
|
2522
|
+
pass: qt(a, i),
|
|
2523
|
+
message: () => {
|
|
2524
|
+
const s = this.isNot ? "not to" : "to";
|
|
2525
|
+
return R(
|
|
2526
|
+
this,
|
|
2527
|
+
this.utils.matcherHint(
|
|
2528
|
+
`${this.isNot ? ".not" : ""}.toHaveClass`,
|
|
2529
|
+
"element",
|
|
2530
|
+
this.utils.printExpected(a.join(" "))
|
|
2531
|
+
),
|
|
2532
|
+
`Expected the element ${s} have class`,
|
|
2533
|
+
a.join(" "),
|
|
2534
|
+
"Received",
|
|
2535
|
+
i.join(" ")
|
|
2536
|
+
);
|
|
2537
|
+
}
|
|
2538
|
+
} : {
|
|
2539
|
+
pass: this.isNot ? i.length > 0 : !1,
|
|
2540
|
+
message: () => this.isNot ? R(
|
|
2541
|
+
this,
|
|
2542
|
+
this.utils.matcherHint(".not.toHaveClass", "element", ""),
|
|
2543
|
+
"Expected the element to have classes",
|
|
2544
|
+
"(none)",
|
|
2545
|
+
"Received",
|
|
2546
|
+
i.join(" ")
|
|
2547
|
+
) : [
|
|
2548
|
+
this.utils.matcherHint(".toHaveClass", "element"),
|
|
2549
|
+
"At least one expected class must be provided."
|
|
2550
|
+
].join(`
|
|
2551
|
+
`)
|
|
2552
|
+
};
|
|
2553
|
+
}
|
|
2554
|
+
function nd(e, t) {
|
|
2555
|
+
const r = {}, n = e.createElement("div");
|
|
2556
|
+
return Object.keys(t).forEach((i) => {
|
|
2557
|
+
n.style[i] = t[i], r[i] = n.style[i];
|
|
2558
|
+
}), r;
|
|
2559
|
+
}
|
|
2560
|
+
function id(e, t) {
|
|
2561
|
+
return !!Object.keys(e).length && Object.entries(e).every(([r, n]) => {
|
|
2562
|
+
const i = r.startsWith("--"), a = [r];
|
|
2563
|
+
return i || a.push(r.toLowerCase()), a.some(
|
|
2564
|
+
(u) => t[u] === n || t.getPropertyValue(u) === n
|
|
2565
|
+
);
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
function Gt(e) {
|
|
2569
|
+
return Object.keys(e).sort().map((t) => `${t}: ${e[t]};`).join(`
|
|
2570
|
+
`);
|
|
2571
|
+
}
|
|
2572
|
+
function ad(e, t, r) {
|
|
2573
|
+
const n = Array.from(r).filter((a) => t[a] !== void 0).reduce(
|
|
2574
|
+
(a, u) => Object.assign(a, { [u]: r.getPropertyValue(u) }),
|
|
2575
|
+
{}
|
|
2576
|
+
);
|
|
2577
|
+
return e(Gt(t), Gt(n)).replace(`${Zl.red("+ Received")}
|
|
2578
|
+
`, "");
|
|
2579
|
+
}
|
|
2580
|
+
function Qe(e, t) {
|
|
2581
|
+
_(e, Qe, this);
|
|
2582
|
+
const r = typeof t == "object" ? t : qf(t, Qe, this), { getComputedStyle: n } = e.ownerDocument.defaultView, i = nd(e.ownerDocument, r), a = n(e);
|
|
2583
|
+
return {
|
|
2584
|
+
pass: id(i, a),
|
|
2585
|
+
message: () => {
|
|
2586
|
+
const u = `${this.isNot ? ".not" : ""}.toHaveStyle`;
|
|
2587
|
+
return [
|
|
2588
|
+
this.utils.matcherHint(u, "element", ""),
|
|
2589
|
+
ad(this.utils.diff, i, a)
|
|
2590
|
+
].join(`
|
|
2591
|
+
|
|
2592
|
+
`);
|
|
2593
|
+
}
|
|
2594
|
+
};
|
|
2595
|
+
}
|
|
2596
|
+
function Br(e) {
|
|
2597
|
+
return _(e, Br, this), {
|
|
2598
|
+
pass: e.ownerDocument.activeElement === e,
|
|
2599
|
+
message: () => [
|
|
2600
|
+
this.utils.matcherHint(
|
|
2601
|
+
`${this.isNot ? ".not" : ""}.toHaveFocus`,
|
|
2602
|
+
"element",
|
|
2603
|
+
""
|
|
2604
|
+
),
|
|
2605
|
+
"",
|
|
2606
|
+
...this.isNot ? [
|
|
2607
|
+
"Received element is focused:",
|
|
2608
|
+
` ${this.utils.printReceived(e)}`
|
|
2609
|
+
] : [
|
|
2610
|
+
"Expected element with focus:",
|
|
2611
|
+
` ${this.utils.printExpected(e)}`,
|
|
2612
|
+
"Received element with focus:",
|
|
2613
|
+
` ${this.utils.printReceived(
|
|
2614
|
+
e.ownerDocument.activeElement
|
|
2615
|
+
)}`
|
|
2616
|
+
]
|
|
2617
|
+
].join(`
|
|
2618
|
+
`)
|
|
2619
|
+
};
|
|
2620
|
+
}
|
|
2621
|
+
function sd(e) {
|
|
2622
|
+
const t = Mf(e.map((r) => r.type));
|
|
2623
|
+
if (t.length !== 1)
|
|
2624
|
+
throw new Error(
|
|
2625
|
+
"Multiple form elements with the same name must be of the same type"
|
|
2626
|
+
);
|
|
2627
|
+
switch (t[0]) {
|
|
2628
|
+
case "radio": {
|
|
2629
|
+
const r = e.find((n) => n.checked);
|
|
2630
|
+
return r ? r.value : void 0;
|
|
2631
|
+
}
|
|
2632
|
+
case "checkbox":
|
|
2633
|
+
return e.filter((r) => r.checked).map((r) => r.value);
|
|
2634
|
+
default:
|
|
2635
|
+
return e.map((r) => r.value);
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
function od(e, t) {
|
|
2639
|
+
const r = [...e.querySelectorAll(`[name="${kf(t)}"]`)];
|
|
2640
|
+
if (r.length !== 0)
|
|
2641
|
+
switch (r.length) {
|
|
2642
|
+
case 1:
|
|
2643
|
+
return Tr(r[0]);
|
|
2644
|
+
default:
|
|
2645
|
+
return sd(r);
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
function ud(e) {
|
|
2649
|
+
return /\[\]$/.test(e) ? e.slice(0, -2) : e;
|
|
2650
|
+
}
|
|
2651
|
+
function cd(e) {
|
|
2652
|
+
return Array.from(e.elements).map((r) => r.name).reduce(
|
|
2653
|
+
(r, n) => ({
|
|
2654
|
+
...r,
|
|
2655
|
+
[ud(n)]: od(e, n)
|
|
2656
|
+
}),
|
|
2657
|
+
{}
|
|
2658
|
+
);
|
|
2659
|
+
}
|
|
2660
|
+
function kr(e, t) {
|
|
2661
|
+
if (_(e, kr, this), !e.elements)
|
|
2662
|
+
throw new Error("toHaveFormValues must be called on a form or a fieldset");
|
|
2663
|
+
const r = cd(e);
|
|
2664
|
+
return {
|
|
2665
|
+
pass: Object.entries(t).every(
|
|
2666
|
+
([n, i]) => Sr(r[n], i, Rr)
|
|
2667
|
+
),
|
|
2668
|
+
message: () => {
|
|
2669
|
+
const n = this.isNot ? "not to" : "to", i = `${this.isNot ? ".not" : ""}.toHaveFormValues`, a = Object.keys(r).filter((u) => t.hasOwnProperty(u)).reduce((u, s) => ({ ...u, [s]: r[s] }), {});
|
|
2670
|
+
return [
|
|
2671
|
+
this.utils.matcherHint(i, "element", ""),
|
|
2672
|
+
`Expected the element ${n} have form values`,
|
|
2673
|
+
this.utils.diff(t, a)
|
|
2674
|
+
].join(`
|
|
2675
|
+
|
|
2676
|
+
`);
|
|
2677
|
+
}
|
|
2678
|
+
};
|
|
2679
|
+
}
|
|
2680
|
+
function ld(e) {
|
|
2681
|
+
const { getComputedStyle: t } = e.ownerDocument.defaultView, { display: r, visibility: n, opacity: i } = t(e);
|
|
2682
|
+
return r !== "none" && n !== "hidden" && n !== "collapse" && i !== "0" && i !== 0;
|
|
2683
|
+
}
|
|
2684
|
+
function fd(e, t) {
|
|
2685
|
+
let r;
|
|
2686
|
+
return t ? r = e.nodeName === "DETAILS" && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0 : r = e.nodeName === "DETAILS" ? e.hasAttribute("open") : !0, !e.hasAttribute("hidden") && r;
|
|
2687
|
+
}
|
|
2688
|
+
function Vr(e, t) {
|
|
2689
|
+
return ld(e) && fd(e, t) && (!e.parentElement || Vr(e.parentElement, e));
|
|
2690
|
+
}
|
|
2691
|
+
function Fr(e) {
|
|
2692
|
+
_(e, Fr, this);
|
|
2693
|
+
const t = e.ownerDocument === e.getRootNode({ composed: !0 }), r = t && Vr(e);
|
|
2694
|
+
return {
|
|
2695
|
+
pass: r,
|
|
2696
|
+
message: () => {
|
|
2697
|
+
const n = r ? "is" : "is not";
|
|
2698
|
+
return [
|
|
2699
|
+
this.utils.matcherHint(
|
|
2700
|
+
`${this.isNot ? ".not" : ""}.toBeVisible`,
|
|
2701
|
+
"element",
|
|
2702
|
+
""
|
|
2703
|
+
),
|
|
2704
|
+
"",
|
|
2705
|
+
`Received element ${n} visible${t ? "" : " (element is not in the document)"}:`,
|
|
2706
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2707
|
+
].join(`
|
|
2708
|
+
`);
|
|
2709
|
+
}
|
|
2710
|
+
};
|
|
2711
|
+
}
|
|
2712
|
+
const dd = [
|
|
2713
|
+
"fieldset",
|
|
2714
|
+
"input",
|
|
2715
|
+
"select",
|
|
2716
|
+
"optgroup",
|
|
2717
|
+
"option",
|
|
2718
|
+
"button",
|
|
2719
|
+
"textarea"
|
|
2720
|
+
];
|
|
2721
|
+
function pd(e, t) {
|
|
2722
|
+
return U(e) === "legend" && U(t) === "fieldset" && e.isSameNode(
|
|
2723
|
+
Array.from(t.children).find((r) => U(r) === "legend")
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
function hd(e, t) {
|
|
2727
|
+
return Gr(t) && !pd(e, t);
|
|
2728
|
+
}
|
|
2729
|
+
function gd(e) {
|
|
2730
|
+
return e.includes("-");
|
|
2731
|
+
}
|
|
2732
|
+
function qr(e) {
|
|
2733
|
+
const t = U(e);
|
|
2734
|
+
return dd.includes(t) || gd(t);
|
|
2735
|
+
}
|
|
2736
|
+
function Gr(e) {
|
|
2737
|
+
return qr(e) && e.hasAttribute("disabled");
|
|
2738
|
+
}
|
|
2739
|
+
function Ur(e) {
|
|
2740
|
+
const t = e.parentElement;
|
|
2741
|
+
return !!t && (hd(e, t) || Ur(t));
|
|
2742
|
+
}
|
|
2743
|
+
function Kr(e) {
|
|
2744
|
+
return qr(e) && (Gr(e) || Ur(e));
|
|
2745
|
+
}
|
|
2746
|
+
function zr(e) {
|
|
2747
|
+
_(e, zr, this);
|
|
2748
|
+
const t = Kr(e);
|
|
2749
|
+
return {
|
|
2750
|
+
pass: t,
|
|
2751
|
+
message: () => {
|
|
2752
|
+
const r = t ? "is" : "is not";
|
|
2753
|
+
return [
|
|
2754
|
+
this.utils.matcherHint(
|
|
2755
|
+
`${this.isNot ? ".not" : ""}.toBeDisabled`,
|
|
2756
|
+
"element",
|
|
2757
|
+
""
|
|
2758
|
+
),
|
|
2759
|
+
"",
|
|
2760
|
+
`Received element ${r} disabled:`,
|
|
2761
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2762
|
+
].join(`
|
|
2763
|
+
`);
|
|
2764
|
+
}
|
|
2765
|
+
};
|
|
2766
|
+
}
|
|
2767
|
+
function Wr(e) {
|
|
2768
|
+
_(e, Wr, this);
|
|
2769
|
+
const t = !Kr(e);
|
|
2770
|
+
return {
|
|
2771
|
+
pass: t,
|
|
2772
|
+
message: () => {
|
|
2773
|
+
const r = t ? "is" : "is not";
|
|
2774
|
+
return [
|
|
2775
|
+
this.utils.matcherHint(
|
|
2776
|
+
`${this.isNot ? ".not" : ""}.toBeEnabled`,
|
|
2777
|
+
"element",
|
|
2778
|
+
""
|
|
2779
|
+
),
|
|
2780
|
+
"",
|
|
2781
|
+
`Received element ${r} enabled:`,
|
|
2782
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2783
|
+
].join(`
|
|
2784
|
+
`);
|
|
2785
|
+
}
|
|
2786
|
+
};
|
|
2787
|
+
}
|
|
2788
|
+
const vd = ["select", "textarea"], bd = ["input", "select", "textarea"], md = [
|
|
2789
|
+
"color",
|
|
2790
|
+
"hidden",
|
|
2791
|
+
"range",
|
|
2792
|
+
"submit",
|
|
2793
|
+
"image",
|
|
2794
|
+
"reset"
|
|
2795
|
+
], yd = [
|
|
2796
|
+
"combobox",
|
|
2797
|
+
"gridcell",
|
|
2798
|
+
"radiogroup",
|
|
2799
|
+
"spinbutton",
|
|
2800
|
+
"tree"
|
|
2801
|
+
];
|
|
2802
|
+
function $d(e) {
|
|
2803
|
+
return vd.includes(U(e)) && e.hasAttribute("required");
|
|
2804
|
+
}
|
|
2805
|
+
function _d(e) {
|
|
2806
|
+
return U(e) === "input" && e.hasAttribute("required") && (e.hasAttribute("type") && !md.includes(e.getAttribute("type")) || !e.hasAttribute("type"));
|
|
2807
|
+
}
|
|
2808
|
+
function wd(e) {
|
|
2809
|
+
return e.hasAttribute("aria-required") && e.getAttribute("aria-required") === "true" && (bd.includes(U(e)) || e.hasAttribute("role") && yd.includes(e.getAttribute("role")));
|
|
2810
|
+
}
|
|
2811
|
+
function Xr(e) {
|
|
2812
|
+
_(e, Xr, this);
|
|
2813
|
+
const t = $d(e) || _d(e) || wd(e);
|
|
2814
|
+
return {
|
|
2815
|
+
pass: t,
|
|
2816
|
+
message: () => {
|
|
2817
|
+
const r = t ? "is" : "is not";
|
|
2818
|
+
return [
|
|
2819
|
+
this.utils.matcherHint(
|
|
2820
|
+
`${this.isNot ? ".not" : ""}.toBeRequired`,
|
|
2821
|
+
"element",
|
|
2822
|
+
""
|
|
2823
|
+
),
|
|
2824
|
+
"",
|
|
2825
|
+
`Received element ${r} required:`,
|
|
2826
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2827
|
+
].join(`
|
|
2828
|
+
`);
|
|
2829
|
+
}
|
|
2830
|
+
};
|
|
2831
|
+
}
|
|
2832
|
+
const Ed = ["form", "input", "select", "textarea"];
|
|
2833
|
+
function Ad(e) {
|
|
2834
|
+
return e.hasAttribute("aria-invalid") && e.getAttribute("aria-invalid") !== "false";
|
|
2835
|
+
}
|
|
2836
|
+
function Sd(e) {
|
|
2837
|
+
return Ed.includes(U(e));
|
|
2838
|
+
}
|
|
2839
|
+
function Yr(e) {
|
|
2840
|
+
const t = Ad(e);
|
|
2841
|
+
return Sd(e) ? t || !e.checkValidity() : t;
|
|
2842
|
+
}
|
|
2843
|
+
function Jr(e) {
|
|
2844
|
+
_(e, Jr, this);
|
|
2845
|
+
const t = Yr(e);
|
|
2846
|
+
return {
|
|
2847
|
+
pass: t,
|
|
2848
|
+
message: () => {
|
|
2849
|
+
const r = t ? "is" : "is not";
|
|
2850
|
+
return [
|
|
2851
|
+
this.utils.matcherHint(
|
|
2852
|
+
`${this.isNot ? ".not" : ""}.toBeInvalid`,
|
|
2853
|
+
"element",
|
|
2854
|
+
""
|
|
2855
|
+
),
|
|
2856
|
+
"",
|
|
2857
|
+
`Received element ${r} currently invalid:`,
|
|
2858
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2859
|
+
].join(`
|
|
2860
|
+
`);
|
|
2861
|
+
}
|
|
2862
|
+
};
|
|
2863
|
+
}
|
|
2864
|
+
function Zr(e) {
|
|
2865
|
+
_(e, Zr, this);
|
|
2866
|
+
const t = !Yr(e);
|
|
2867
|
+
return {
|
|
2868
|
+
pass: t,
|
|
2869
|
+
message: () => {
|
|
2870
|
+
const r = t ? "is" : "is not";
|
|
2871
|
+
return [
|
|
2872
|
+
this.utils.matcherHint(
|
|
2873
|
+
`${this.isNot ? ".not" : ""}.toBeValid`,
|
|
2874
|
+
"element",
|
|
2875
|
+
""
|
|
2876
|
+
),
|
|
2877
|
+
"",
|
|
2878
|
+
`Received element ${r} currently valid:`,
|
|
2879
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2880
|
+
].join(`
|
|
2881
|
+
`);
|
|
2882
|
+
}
|
|
2883
|
+
};
|
|
2884
|
+
}
|
|
2885
|
+
function Qr(e, t) {
|
|
2886
|
+
if (_(e, Qr, this), e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type))
|
|
2887
|
+
throw new Error(
|
|
2888
|
+
"input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead"
|
|
2889
|
+
);
|
|
2890
|
+
const r = Tr(e), n = t !== void 0;
|
|
2891
|
+
let i = t, a = r;
|
|
2892
|
+
return t == r && t !== r && (i = `${t} (${typeof t})`, a = `${r} (${typeof r})`), {
|
|
2893
|
+
pass: n ? Sr(r, t, Rr) : !!r,
|
|
2894
|
+
message: () => {
|
|
2895
|
+
const u = this.isNot ? "not to" : "to", s = this.utils.matcherHint(
|
|
2896
|
+
`${this.isNot ? ".not" : ""}.toHaveValue`,
|
|
2897
|
+
"element",
|
|
2898
|
+
t
|
|
2899
|
+
);
|
|
2900
|
+
return R(
|
|
2901
|
+
this,
|
|
2902
|
+
s,
|
|
2903
|
+
`Expected the element ${u} have value`,
|
|
2904
|
+
n ? i : "(any)",
|
|
2905
|
+
"Received",
|
|
2906
|
+
a
|
|
2907
|
+
);
|
|
2908
|
+
}
|
|
2909
|
+
};
|
|
2910
|
+
}
|
|
2911
|
+
function en(e, t) {
|
|
2912
|
+
_(e, en, this);
|
|
2913
|
+
const r = e.tagName.toLowerCase();
|
|
2914
|
+
if (!["select", "input", "textarea"].includes(r))
|
|
2915
|
+
throw new Error(
|
|
2916
|
+
".toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead."
|
|
2917
|
+
);
|
|
2918
|
+
if (r === "input" && ["radio", "checkbox"].includes(e.type))
|
|
2919
|
+
throw new Error(
|
|
2920
|
+
`.toHaveDisplayValue() currently does not support input[type="${e.type}"], try with another matcher instead.`
|
|
2921
|
+
);
|
|
2922
|
+
const n = xd(r, e), i = Od(t), a = i.filter(
|
|
2923
|
+
(c) => n.some(
|
|
2924
|
+
(l) => c instanceof RegExp ? c.test(l) : this.equals(l, String(c))
|
|
2925
|
+
)
|
|
2926
|
+
).length, u = a === n.length, s = a === i.length;
|
|
2927
|
+
return {
|
|
2928
|
+
pass: u && s,
|
|
2929
|
+
message: () => R(
|
|
2930
|
+
this,
|
|
2931
|
+
this.utils.matcherHint(
|
|
2932
|
+
`${this.isNot ? ".not" : ""}.toHaveDisplayValue`,
|
|
2933
|
+
"element",
|
|
2934
|
+
""
|
|
2935
|
+
),
|
|
2936
|
+
`Expected element ${this.isNot ? "not " : ""}to have display value`,
|
|
2937
|
+
t,
|
|
2938
|
+
"Received",
|
|
2939
|
+
n
|
|
2940
|
+
)
|
|
2941
|
+
};
|
|
2942
|
+
}
|
|
2943
|
+
function xd(e, t) {
|
|
2944
|
+
return e === "select" ? Array.from(t).filter((r) => r.selected).map((r) => r.textContent) : [t.value];
|
|
2945
|
+
}
|
|
2946
|
+
function Od(e) {
|
|
2947
|
+
return e instanceof Array ? e : [e];
|
|
2948
|
+
}
|
|
2949
|
+
function tn(e) {
|
|
2950
|
+
_(e, tn, this);
|
|
2951
|
+
const t = () => e.tagName.toLowerCase() === "input" && ["checkbox", "radio"].includes(e.type), r = () => rn(e.getAttribute("role")) && ["true", "false"].includes(e.getAttribute("aria-checked"));
|
|
2952
|
+
if (!t() && !r())
|
|
2953
|
+
return {
|
|
2954
|
+
pass: !1,
|
|
2955
|
+
message: () => `only inputs with type="checkbox" or type="radio" or elements with ${Cd()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`
|
|
2956
|
+
};
|
|
2957
|
+
const n = () => t() ? e.checked : e.getAttribute("aria-checked") === "true";
|
|
2958
|
+
return {
|
|
2959
|
+
pass: n(),
|
|
2960
|
+
message: () => {
|
|
2961
|
+
const i = n() ? "is" : "is not";
|
|
2962
|
+
return [
|
|
2963
|
+
this.utils.matcherHint(
|
|
2964
|
+
`${this.isNot ? ".not" : ""}.toBeChecked`,
|
|
2965
|
+
"element",
|
|
2966
|
+
""
|
|
2967
|
+
),
|
|
2968
|
+
"",
|
|
2969
|
+
`Received element ${i} checked:`,
|
|
2970
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
2971
|
+
].join(`
|
|
2972
|
+
`);
|
|
2973
|
+
}
|
|
2974
|
+
};
|
|
2975
|
+
}
|
|
2976
|
+
function Cd() {
|
|
2977
|
+
return zf(
|
|
2978
|
+
Td().map((e) => `role="${e}"`),
|
|
2979
|
+
{ lastWordConnector: " or " }
|
|
2980
|
+
);
|
|
2981
|
+
}
|
|
2982
|
+
function Td() {
|
|
2983
|
+
return Ut.keys().filter(rn);
|
|
2984
|
+
}
|
|
2985
|
+
function rn(e) {
|
|
2986
|
+
var t;
|
|
2987
|
+
return ((t = Ut.get(e)) == null ? void 0 : t.props["aria-checked"]) !== void 0;
|
|
2988
|
+
}
|
|
2989
|
+
function nn(e) {
|
|
2990
|
+
_(e, nn, this);
|
|
2991
|
+
const t = () => e.tagName.toLowerCase() === "input" && e.type === "checkbox", r = () => e.getAttribute("role") === "checkbox";
|
|
2992
|
+
if (!t() && !r())
|
|
2993
|
+
return {
|
|
2994
|
+
pass: !1,
|
|
2995
|
+
message: () => 'only inputs with type="checkbox" or elements with role="checkbox" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead'
|
|
2996
|
+
};
|
|
2997
|
+
const n = () => {
|
|
2998
|
+
const i = e.getAttribute("aria-checked") === "mixed";
|
|
2999
|
+
return t() && e.indeterminate || i;
|
|
3000
|
+
};
|
|
3001
|
+
return {
|
|
3002
|
+
pass: n(),
|
|
3003
|
+
message: () => {
|
|
3004
|
+
const i = n() ? "is" : "is not";
|
|
3005
|
+
return [
|
|
3006
|
+
this.utils.matcherHint(
|
|
3007
|
+
`${this.isNot ? ".not" : ""}.toBePartiallyChecked`,
|
|
3008
|
+
"element",
|
|
3009
|
+
""
|
|
3010
|
+
),
|
|
3011
|
+
"",
|
|
3012
|
+
`Received element ${i} partially checked:`,
|
|
3013
|
+
` ${this.utils.printReceived(e.cloneNode(!1))}`
|
|
3014
|
+
].join(`
|
|
3015
|
+
`);
|
|
3016
|
+
}
|
|
3017
|
+
};
|
|
3018
|
+
}
|
|
3019
|
+
function an(e, t) {
|
|
3020
|
+
Te(
|
|
3021
|
+
"toHaveDescription",
|
|
3022
|
+
"Please use toHaveAccessibleDescription."
|
|
3023
|
+
), _(e, an, this);
|
|
3024
|
+
const r = t !== void 0, i = (e.getAttribute("aria-describedby") || "").split(/\s+/).filter(Boolean);
|
|
3025
|
+
let a = "";
|
|
3026
|
+
if (i.length > 0) {
|
|
3027
|
+
const u = e.ownerDocument, s = i.map((c) => u.getElementById(c)).filter(Boolean);
|
|
3028
|
+
a = Re(s.map((c) => c.textContent).join(" "));
|
|
3029
|
+
}
|
|
3030
|
+
return {
|
|
3031
|
+
pass: r ? t instanceof RegExp ? t.test(a) : this.equals(a, t) : !!a,
|
|
3032
|
+
message: () => {
|
|
3033
|
+
const u = this.isNot ? "not to" : "to";
|
|
3034
|
+
return R(
|
|
3035
|
+
this,
|
|
3036
|
+
this.utils.matcherHint(
|
|
3037
|
+
`${this.isNot ? ".not" : ""}.toHaveDescription`,
|
|
3038
|
+
"element",
|
|
3039
|
+
""
|
|
3040
|
+
),
|
|
3041
|
+
`Expected the element ${u} have description`,
|
|
3042
|
+
this.utils.printExpected(t),
|
|
3043
|
+
"Received",
|
|
3044
|
+
this.utils.printReceived(a)
|
|
3045
|
+
);
|
|
3046
|
+
}
|
|
3047
|
+
};
|
|
3048
|
+
}
|
|
3049
|
+
function sn(e, t) {
|
|
3050
|
+
if (Te("toHaveErrorMessage", "Please use toHaveAccessibleErrorMessage."), _(e, sn, this), !e.hasAttribute("aria-invalid") || e.getAttribute("aria-invalid") === "false") {
|
|
3051
|
+
const u = this.isNot ? ".not" : "";
|
|
3052
|
+
return {
|
|
3053
|
+
pass: !1,
|
|
3054
|
+
message: () => R(
|
|
3055
|
+
this,
|
|
3056
|
+
this.utils.matcherHint(`${u}.toHaveErrorMessage`, "element", ""),
|
|
3057
|
+
"Expected the element to have invalid state indicated by",
|
|
3058
|
+
'aria-invalid="true"',
|
|
3059
|
+
"Received",
|
|
3060
|
+
e.hasAttribute("aria-invalid") ? `aria-invalid="${e.getAttribute("aria-invalid")}"` : this.utils.printReceived("")
|
|
3061
|
+
)
|
|
3062
|
+
};
|
|
3063
|
+
}
|
|
3064
|
+
const r = t !== void 0, i = (e.getAttribute("aria-errormessage") || "").split(/\s+/).filter(Boolean);
|
|
3065
|
+
let a = "";
|
|
3066
|
+
if (i.length > 0) {
|
|
3067
|
+
const u = e.ownerDocument, s = i.map((c) => u.getElementById(c)).filter(Boolean);
|
|
3068
|
+
a = Re(
|
|
3069
|
+
s.map((c) => c.textContent).join(" ")
|
|
3070
|
+
);
|
|
3071
|
+
}
|
|
3072
|
+
return {
|
|
3073
|
+
pass: r ? t instanceof RegExp ? t.test(a) : this.equals(a, t) : !!a,
|
|
3074
|
+
message: () => {
|
|
3075
|
+
const u = this.isNot ? "not to" : "to";
|
|
3076
|
+
return R(
|
|
3077
|
+
this,
|
|
3078
|
+
this.utils.matcherHint(
|
|
3079
|
+
`${this.isNot ? ".not" : ""}.toHaveErrorMessage`,
|
|
3080
|
+
"element",
|
|
3081
|
+
""
|
|
3082
|
+
),
|
|
3083
|
+
`Expected the element ${u} have error message`,
|
|
3084
|
+
this.utils.printExpected(t),
|
|
3085
|
+
"Received",
|
|
3086
|
+
this.utils.printReceived(a)
|
|
3087
|
+
);
|
|
3088
|
+
}
|
|
3089
|
+
};
|
|
3090
|
+
}
|
|
3091
|
+
var Rd = /* @__PURE__ */ Object.freeze({
|
|
3092
|
+
__proto__: null,
|
|
3093
|
+
toBeChecked: tn,
|
|
3094
|
+
toBeDisabled: zr,
|
|
3095
|
+
toBeEmpty: Nr,
|
|
3096
|
+
toBeEmptyDOMElement: jr,
|
|
3097
|
+
toBeEnabled: Wr,
|
|
3098
|
+
toBeInTheDOM: We,
|
|
3099
|
+
toBeInTheDocument: Ir,
|
|
3100
|
+
toBeInvalid: Jr,
|
|
3101
|
+
toBePartiallyChecked: nn,
|
|
3102
|
+
toBeRequired: Xr,
|
|
3103
|
+
toBeValid: Zr,
|
|
3104
|
+
toBeVisible: Fr,
|
|
3105
|
+
toContainElement: Xe,
|
|
3106
|
+
toContainHTML: Hr,
|
|
3107
|
+
toHaveAccessibleDescription: Ye,
|
|
3108
|
+
toHaveAccessibleErrorMessage: Dr,
|
|
3109
|
+
toHaveAccessibleName: Ze,
|
|
3110
|
+
toHaveAttribute: Lr,
|
|
3111
|
+
toHaveClass: Mr,
|
|
3112
|
+
toHaveDescription: an,
|
|
3113
|
+
toHaveDisplayValue: en,
|
|
3114
|
+
toHaveErrorMessage: sn,
|
|
3115
|
+
toHaveFocus: Br,
|
|
3116
|
+
toHaveFormValues: kr,
|
|
3117
|
+
toHaveRole: Je,
|
|
3118
|
+
toHaveStyle: Qe,
|
|
3119
|
+
toHaveTextContent: Pr,
|
|
3120
|
+
toHaveValue: Qr
|
|
3121
|
+
});
|
|
3122
|
+
expect.extend(Rd);
|