stargazer-ui 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/BaseTypes.d.ts +19 -0
  2. package/dist/BaseTypes.js +1 -0
  3. package/dist/Button/index.d.ts +9 -0
  4. package/dist/Button/index.js +1 -1
  5. package/dist/Card/index.d.ts +92 -0
  6. package/dist/Card/index.js +15 -29
  7. package/dist/CloseButton/index.d.ts +8 -0
  8. package/dist/Dropdown/index.d.ts +124 -0
  9. package/dist/Dropdown/index.js +140 -117
  10. package/dist/FloatingLabel/index.d.ts +11 -0
  11. package/dist/FloatingLabel/index.js +9 -9
  12. package/dist/Form/index.d.ts +65 -0
  13. package/dist/Form/index.js +56 -51
  14. package/dist/Grid/Col.js +19 -0
  15. package/dist/Grid/Container.js +9 -0
  16. package/dist/Grid/Row.js +17 -0
  17. package/dist/InputGroup/index.d.ts +14 -0
  18. package/dist/InputGroup/index.js +6 -5
  19. package/dist/Modal/index.d.ts +70 -0
  20. package/dist/Modal/index.js +78 -64
  21. package/dist/Nav/index.d.ts +46 -0
  22. package/dist/Nav/index.js +11 -12
  23. package/dist/NavBar/index.d.ts +46 -0
  24. package/dist/NavBar/index.js +15 -14
  25. package/dist/NavDropdown/index.d.ts +39 -0
  26. package/dist/NavDropdown/index.js +226 -218
  27. package/dist/OffCanvas/OffCanvas.js +2266 -0
  28. package/dist/Overlay/index.js +36 -36
  29. package/dist/Popout/index.d.ts +56 -0
  30. package/dist/Popout/index.js +55 -68
  31. package/dist/Spinner/index.d.ts +10 -0
  32. package/dist/Spinner/index.js +9 -0
  33. package/dist/Table/index.d.ts +9 -0
  34. package/dist/Table/index.js +9 -0
  35. package/dist/Tabs/index.d.ts +42 -0
  36. package/dist/Tabs/index.js +60 -52
  37. package/dist/stylesheets/stargazerui.css +1160 -17
  38. package/dist/stylesheets/stargazerui.css.map +1 -1
  39. package/dist/vite-env.d.js +1 -0
  40. package/package.json +14 -2
@@ -0,0 +1,2266 @@
1
+ import { jsxs as Ie, Fragment as ht, jsx as P } from "react/jsx-runtime";
2
+ import { createContext as Yt, forwardRef as Re, useState as Z, useEffect as Xe, useMemo as en, useContext as tn } from "react";
3
+ import { createPortal as nn } from "react-dom";
4
+ import rn from "../CloseButton/index.js";
5
+ import on from "../Button/index.js";
6
+ function F(e) {
7
+ if (!e)
8
+ return [];
9
+ if (Array.isArray(e))
10
+ return e;
11
+ if (e.nodeType !== void 0)
12
+ return [e];
13
+ if (typeof e == "string" && (e = document.querySelectorAll(e)), e.length !== void 0)
14
+ return [].slice.call(e, 0);
15
+ throw new TypeError("unexpected input " + String(e));
16
+ }
17
+ function I({
18
+ context: e,
19
+ label: t = "context-to-element",
20
+ resolveDocument: n,
21
+ defaultToDocument: r
22
+ }) {
23
+ let i = F(e)[0];
24
+ if (n && i && i.nodeType === Node.DOCUMENT_NODE && (i = i.documentElement), !i && r)
25
+ return document.documentElement;
26
+ if (!i)
27
+ throw new TypeError(t + " requires valid options.context");
28
+ if (i.nodeType !== Node.ELEMENT_NODE && i.nodeType !== Node.DOCUMENT_FRAGMENT_NODE)
29
+ throw new TypeError(t + " requires options.context to be an Element");
30
+ return i;
31
+ }
32
+ function Ee({ context: e } = {}) {
33
+ const t = [];
34
+ let n = I({
35
+ label: "get/parents",
36
+ context: e
37
+ });
38
+ for (; n; )
39
+ t.push(n), n = n.parentNode, n && n.nodeType !== Node.ELEMENT_NODE && (n = null);
40
+ return t;
41
+ }
42
+ const sn = ["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector"];
43
+ let et = null;
44
+ function an(e) {
45
+ sn.some(function(t) {
46
+ return e[t] ? (et = t, !0) : !1;
47
+ });
48
+ }
49
+ function St(e, t) {
50
+ return et || an(e), e[et](t);
51
+ }
52
+ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
53
+ function Tt(e) {
54
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
55
+ }
56
+ var ke = { exports: {} };
57
+ /*!
58
+ * Platform.js <https://mths.be/platform>
59
+ * Copyright 2014-2016 Benjamin Tan <https://demoneaux.github.io/>
60
+ * Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
61
+ * Available under MIT license <https://mths.be/mit>
62
+ */
63
+ ke.exports;
64
+ (function(e, t) {
65
+ (function() {
66
+ var n = {
67
+ function: !0,
68
+ object: !0
69
+ }, r = n[typeof window] && window || this, i = r, a = t, l = e && !e.nodeType && e, f = a && l && typeof se == "object" && se;
70
+ f && (f.global === f || f.window === f || f.self === f) && (r = f);
71
+ var d = Math.pow(2, 53) - 1, h = /\bOpera/, y = this, O = Object.prototype, S = O.hasOwnProperty, ue = O.toString;
72
+ function fe(s) {
73
+ return s = String(s), s.charAt(0).toUpperCase() + s.slice(1);
74
+ }
75
+ function Ve(s, p, g) {
76
+ var N = {
77
+ "10.0": "10",
78
+ "6.4": "10 Technical Preview",
79
+ "6.3": "8.1",
80
+ "6.2": "8",
81
+ "6.1": "Server 2008 R2 / 7",
82
+ "6.0": "Server 2008 / Vista",
83
+ "5.2": "Server 2003 / XP 64-bit",
84
+ "5.1": "XP",
85
+ "5.01": "2000 SP1",
86
+ "5.0": "2000",
87
+ "4.0": "NT",
88
+ "4.90": "ME"
89
+ };
90
+ return p && g && /^Win/i.test(s) && !/^Windows Phone /i.test(s) && (N = N[/[\d.]+$/.exec(s)]) && (s = "Windows " + N), s = String(s), p && g && (s = s.replace(RegExp(p, "i"), g)), s = Y(
91
+ s.replace(/ ce$/i, " CE").replace(/\bhpw/i, "web").replace(/\bMacintosh\b/, "Mac OS").replace(/_PowerPC\b/i, " OS").replace(/\b(OS X) [^ \d]+/i, "$1").replace(/\bMac (OS X)\b/, "$1").replace(/\/(\d)/, " $1").replace(/_/g, ".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, "").replace(/\bx86\.64\b/gi, "x86_64").replace(/\b(Windows Phone) OS\b/, "$1").replace(/\b(Chrome OS \w+) [\d.]+\b/, "$1").split(" on ")[0]
92
+ ), s;
93
+ }
94
+ function $e(s, p) {
95
+ var g = -1, N = s ? s.length : 0;
96
+ if (typeof N == "number" && N > -1 && N <= d)
97
+ for (; ++g < N; )
98
+ p(s[g], g, s);
99
+ else
100
+ ee(s, p);
101
+ }
102
+ function Y(s) {
103
+ return s = Se(s), /^(?:webOS|i(?:OS|P))/.test(s) ? s : fe(s);
104
+ }
105
+ function ee(s, p) {
106
+ for (var g in s)
107
+ S.call(s, g) && p(s[g], g, s);
108
+ }
109
+ function j(s) {
110
+ return s == null ? fe(s) : ue.call(s).slice(8, -1);
111
+ }
112
+ function we(s, p) {
113
+ var g = s != null ? typeof s[p] : "number";
114
+ return !/^(?:boolean|number|string|undefined)$/.test(g) && (g == "object" ? !!s[p] : !0);
115
+ }
116
+ function G(s) {
117
+ return String(s).replace(/([ -])(?!$)/g, "$1?");
118
+ }
119
+ function K(s, p) {
120
+ var g = null;
121
+ return $e(s, function(N, ne) {
122
+ g = p(g, N, ne, s);
123
+ }), g;
124
+ }
125
+ function Se(s) {
126
+ return String(s).replace(/^ +| +$/g, "");
127
+ }
128
+ function te(s) {
129
+ var p = r, g = s && typeof s == "object" && j(s) != "String";
130
+ g && (p = s, s = null);
131
+ var N = p.navigator || {}, ne = N.userAgent || "";
132
+ s || (s = ne);
133
+ var qe = g || y == i, A = g ? !!N.likeChrome : /\bChrome\b/.test(s) && !/internal|\n/i.test(ue.toString()), k = "Object", Ze = g ? k : "ScriptBridgingProxyObject", jt = g ? k : "Environment", Gt = g && p.java ? "JavaPackage" : j(p.java), Kt = g ? k : "RuntimeObject", be = /\bJava/.test(Gt) && p.java, Vt = be && j(p.environment) == jt, $t = be ? "a" : "α", qt = be ? "b" : "β", bt = p.document || {}, V = p.operamini || p.opera, Te = h.test(Te = g && V ? V["[[Class]]"] : j(V)) ? Te : V = null, o, Ce = s, w = [], Ae = null, $ = s == ne, m = $ && V && typeof V.version == "function" && V.version(), Ue, E = Zt([
134
+ { label: "EdgeHTML", pattern: "Edge" },
135
+ "Trident",
136
+ { label: "WebKit", pattern: "AppleWebKit" },
137
+ "iCab",
138
+ "Presto",
139
+ "NetFront",
140
+ "Tasman",
141
+ "KHTML",
142
+ "Gecko"
143
+ ]), c = Xt([
144
+ "Adobe AIR",
145
+ "Arora",
146
+ "Avant Browser",
147
+ "Breach",
148
+ "Camino",
149
+ "Epiphany",
150
+ "Fennec",
151
+ "Flock",
152
+ "Galeon",
153
+ "GreenBrowser",
154
+ "iCab",
155
+ "Iceweasel",
156
+ "K-Meleon",
157
+ "Konqueror",
158
+ "Lunascape",
159
+ "Maxthon",
160
+ { label: "Microsoft Edge", pattern: "Edge" },
161
+ "Midori",
162
+ "Nook Browser",
163
+ "PaleMoon",
164
+ "PhantomJS",
165
+ "Raven",
166
+ "Rekonq",
167
+ "RockMelt",
168
+ "SeaMonkey",
169
+ { label: "Silk", pattern: "(?:Cloud9|Silk-Accelerated)" },
170
+ "Sleipnir",
171
+ "SlimBrowser",
172
+ { label: "SRWare Iron", pattern: "Iron" },
173
+ "Sunrise",
174
+ "Swiftfox",
175
+ "WebPositive",
176
+ "Opera Mini",
177
+ { label: "Opera Mini", pattern: "OPiOS" },
178
+ "Opera",
179
+ { label: "Opera", pattern: "OPR" },
180
+ "Chrome",
181
+ { label: "Chrome Mobile", pattern: "(?:CriOS|CrMo)" },
182
+ { label: "Firefox", pattern: "(?:Firefox|Minefield)" },
183
+ { label: "Firefox for iOS", pattern: "FxiOS" },
184
+ { label: "IE", pattern: "IEMobile" },
185
+ { label: "IE", pattern: "MSIE" },
186
+ "Safari"
187
+ ]), v = mt([
188
+ { label: "BlackBerry", pattern: "BB10" },
189
+ "BlackBerry",
190
+ { label: "Galaxy S", pattern: "GT-I9000" },
191
+ { label: "Galaxy S2", pattern: "GT-I9100" },
192
+ { label: "Galaxy S3", pattern: "GT-I9300" },
193
+ { label: "Galaxy S4", pattern: "GT-I9500" },
194
+ "Google TV",
195
+ "Lumia",
196
+ "iPad",
197
+ "iPod",
198
+ "iPhone",
199
+ "Kindle",
200
+ { label: "Kindle Fire", pattern: "(?:Cloud9|Silk-Accelerated)" },
201
+ "Nexus",
202
+ "Nook",
203
+ "PlayBook",
204
+ "PlayStation 3",
205
+ "PlayStation 4",
206
+ "PlayStation Vita",
207
+ "TouchPad",
208
+ "Transformer",
209
+ { label: "Wii U", pattern: "WiiU" },
210
+ "Wii",
211
+ "Xbox One",
212
+ { label: "Xbox 360", pattern: "Xbox" },
213
+ "Xoom"
214
+ ]), L = Ut({
215
+ Apple: { iPad: 1, iPhone: 1, iPod: 1 },
216
+ Archos: {},
217
+ Amazon: { Kindle: 1, "Kindle Fire": 1 },
218
+ Asus: { Transformer: 1 },
219
+ "Barnes & Noble": { Nook: 1 },
220
+ BlackBerry: { PlayBook: 1 },
221
+ Google: { "Google TV": 1, Nexus: 1 },
222
+ HP: { TouchPad: 1 },
223
+ HTC: {},
224
+ LG: {},
225
+ Microsoft: { Xbox: 1, "Xbox One": 1 },
226
+ Motorola: { Xoom: 1 },
227
+ Nintendo: { "Wii U": 1, Wii: 1 },
228
+ Nokia: { Lumia: 1 },
229
+ Samsung: { "Galaxy S": 1, "Galaxy S2": 1, "Galaxy S3": 1, "Galaxy S4": 1 },
230
+ Sony: { "PlayStation 4": 1, "PlayStation 3": 1, "PlayStation Vita": 1 }
231
+ }), u = zt([
232
+ "Windows Phone",
233
+ "Android",
234
+ "CentOS",
235
+ { label: "Chrome OS", pattern: "CrOS" },
236
+ "Debian",
237
+ "Fedora",
238
+ "FreeBSD",
239
+ "Gentoo",
240
+ "Haiku",
241
+ "Kubuntu",
242
+ "Linux Mint",
243
+ "OpenBSD",
244
+ "Red Hat",
245
+ "SuSE",
246
+ "Ubuntu",
247
+ "Xubuntu",
248
+ "Cygwin",
249
+ "Symbian OS",
250
+ "hpwOS",
251
+ "webOS ",
252
+ "webOS",
253
+ "Tablet OS",
254
+ "Linux",
255
+ "Mac OS X",
256
+ "Macintosh",
257
+ "Mac",
258
+ "Windows 98;",
259
+ "Windows "
260
+ ]);
261
+ function Zt(_) {
262
+ return K(_, function(C, x) {
263
+ return C || RegExp("\\b" + (x.pattern || G(x)) + "\\b", "i").exec(s) && (x.label || x);
264
+ });
265
+ }
266
+ function Ut(_) {
267
+ return K(_, function(C, x, B) {
268
+ return C || (x[v] || x[/^[a-z]+(?: +[a-z]+\b)*/i.exec(v)] || RegExp("\\b" + G(B) + "(?:\\b|\\w*\\d)", "i").exec(s)) && B;
269
+ });
270
+ }
271
+ function Xt(_) {
272
+ return K(_, function(C, x) {
273
+ return C || RegExp("\\b" + (x.pattern || G(x)) + "\\b", "i").exec(s) && (x.label || x);
274
+ });
275
+ }
276
+ function zt(_) {
277
+ return K(_, function(C, x) {
278
+ var B = x.pattern || G(x);
279
+ return !C && (C = RegExp("\\b" + B + "(?:/[\\d.]+|[ \\w.]*)", "i").exec(s)) && (C = Ve(C, B, x.label || x)), C;
280
+ });
281
+ }
282
+ function mt(_) {
283
+ return K(_, function(C, x) {
284
+ var B = x.pattern || G(x);
285
+ return !C && (C = RegExp("\\b" + B + " *\\d+[.\\w_]*", "i").exec(s) || RegExp("\\b" + B + "(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)", "i").exec(s)) && ((C = String(x.label && !RegExp(B, "i").test(x.label) ? x.label : C).split("/"))[1] && !/[\d.]+/.test(C[0]) && (C[0] += " " + C[1]), x = x.label || x, C = Y(C[0].replace(RegExp(B, "i"), x).replace(RegExp("; *(?:" + x + "[_-])?", "i"), " ").replace(RegExp("(" + x + ")[-_.]?(\\w)", "i"), "$1 $2"))), C;
286
+ });
287
+ }
288
+ function Jt(_) {
289
+ return K(_, function(C, x) {
290
+ return C || (RegExp(x + "(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)", "i").exec(s) || 0)[1] || null;
291
+ });
292
+ }
293
+ function Qt() {
294
+ return this.description || "";
295
+ }
296
+ if (E && (E = [E]), L && !v && (v = mt([L])), (o = /\bGoogle TV\b/.exec(v)) && (v = o[0]), /\bSimulator\b/i.test(s) && (v = (v ? v + " " : "") + "Simulator"), c == "Opera Mini" && /\bOPiOS\b/.test(s) && w.push("running in Turbo/Uncompressed mode"), c == "IE" && /\blike iPhone OS\b/.test(s) ? (o = te(s.replace(/like iPhone OS/, "")), L = o.manufacturer, v = o.product) : /^iP/.test(v) ? (c || (c = "Safari"), u = "iOS" + ((o = / OS ([\d_]+)/i.exec(s)) ? " " + o[1].replace(/_/g, ".") : "")) : c == "Konqueror" && !/buntu/i.test(u) ? u = "Kubuntu" : L && L != "Google" && (/Chrome/.test(c) && !/\bMobile Safari\b/i.test(s) || /\bVita\b/.test(v)) || /\bAndroid\b/.test(u) && /^Chrome/.test(c) && /\bVersion\//i.test(s) ? (c = "Android Browser", u = /\bAndroid\b/.test(u) ? u : "Android") : c == "Silk" ? (/\bMobi/i.test(s) || (u = "Android", w.unshift("desktop mode")), /Accelerated *= *true/i.test(s) && w.unshift("accelerated")) : c == "PaleMoon" && (o = /\bFirefox\/([\d.]+)\b/.exec(s)) ? w.push("identifying as Firefox " + o[1]) : c == "Firefox" && (o = /\b(Mobile|Tablet|TV)\b/i.exec(s)) ? (u || (u = "Firefox OS"), v || (v = o[1])) : (!c || (o = !/\bMinefield\b/i.test(s) && /\b(?:Firefox|Safari)\b/.exec(c))) && (c && !v && /[\/,]|^[^(]+?\)/.test(s.slice(s.indexOf(o + "/") + 8)) && (c = null), (o = v || L || u) && (v || L || /\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(u)) && (c = /[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(u) ? u : o) + " Browser")), m || (m = Jt([
297
+ "(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|Silk(?!/[\\d.]+$))",
298
+ "Version",
299
+ G(c),
300
+ "(?:Firefox|Minefield|NetFront)"
301
+ ])), (o = E == "iCab" && parseFloat(m) > 3 && "WebKit" || /\bOpera\b/.test(c) && (/\bOPR\b/.test(s) ? "Blink" : "Presto") || /\b(?:Midori|Nook|Safari)\b/i.test(s) && !/^(?:Trident|EdgeHTML)$/.test(E) && "WebKit" || !E && /\bMSIE\b/i.test(s) && (u == "Mac OS" ? "Tasman" : "Trident") || E == "WebKit" && /\bPlayStation\b(?! Vita\b)/i.test(c) && "NetFront") && (E = [o]), c == "IE" && (o = (/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(s) || 0)[1]) ? (c += " Mobile", u = "Windows Phone " + (/\+$/.test(o) ? o : o + ".x"), w.unshift("desktop mode")) : /\bWPDesktop\b/i.test(s) ? (c = "IE Mobile", u = "Windows Phone 8.x", w.unshift("desktop mode"), m || (m = (/\brv:([\d.]+)/.exec(s) || 0)[1])) : c != "IE" && E == "Trident" && (o = /\brv:([\d.]+)/.exec(s)) && (c && w.push("identifying as " + c + (m ? " " + m : "")), c = "IE", m = o[1]), $) {
302
+ if (we(p, "global"))
303
+ if (be && (o = be.lang.System, Ce = o.getProperty("os.arch"), u = u || o.getProperty("os.name") + " " + o.getProperty("os.version")), qe && we(p, "system") && (o = [p.system])[0]) {
304
+ u || (u = o[0].os || null);
305
+ try {
306
+ o[1] = p.require("ringo/engine").version, m = o[1].join("."), c = "RingoJS";
307
+ } catch {
308
+ o[0].global.system == p.system && (c = "Narwhal");
309
+ }
310
+ } else
311
+ typeof p.process == "object" && !p.process.browser && (o = p.process) ? (c = "Node.js", Ce = o.arch, u = o.platform, m = /[\d.]+/.exec(o.version)[0]) : Vt && (c = "Rhino");
312
+ else
313
+ j(o = p.runtime) == Ze ? (c = "Adobe AIR", u = o.flash.system.Capabilities.os) : j(o = p.phantom) == Kt ? (c = "PhantomJS", m = (o = o.version || null) && o.major + "." + o.minor + "." + o.patch) : typeof bt.documentMode == "number" && (o = /\bTrident\/(\d+)/i.exec(s)) && (m = [m, bt.documentMode], (o = +o[1] + 4) != m[1] && (w.push("IE " + m[1] + " mode"), E && (E[1] = ""), m[1] = o), m = c == "IE" ? String(m[1].toFixed(1)) : m[0]);
314
+ u = u && Y(u);
315
+ }
316
+ m && (o = /(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(m) || /(?:alpha|beta)(?: ?\d)?/i.exec(s + ";" + ($ && N.appMinorVersion)) || /\bMinefield\b/i.test(s) && "a") && (Ae = /b/i.test(o) ? "beta" : "alpha", m = m.replace(RegExp(o + "\\+?$"), "") + (Ae == "beta" ? qt : $t) + (/\d+\+?/.exec(o) || "")), c == "Fennec" || c == "Firefox" && /\b(?:Android|Firefox OS)\b/.test(u) ? c = "Firefox Mobile" : c == "Maxthon" && m ? m = m.replace(/\.[\d.]+/, ".x") : /\bXbox\b/i.test(v) ? (u = null, v == "Xbox 360" && /\bIEMobile\b/.test(s) && w.unshift("mobile mode")) : (/^(?:Chrome|IE|Opera)$/.test(c) || c && !v && !/Browser|Mobi/.test(c)) && (u == "Windows CE" || /Mobi/i.test(s)) ? c += " Mobile" : c == "IE" && $ && p.external === null ? w.unshift("platform preview") : (/\bBlackBerry\b/.test(v) || /\bBB10\b/.test(s)) && (o = (RegExp(v.replace(/ +/g, " *") + "/([.\\d]+)", "i").exec(s) || 0)[1] || m) ? (o = [o, /BB10/.test(s)], u = (o[1] ? (v = null, L = "BlackBerry") : "Device Software") + " " + o[0], m = null) : this != ee && v != "Wii" && ($ && V || /Opera/.test(c) && /\b(?:MSIE|Firefox)\b/i.test(s) || c == "Firefox" && /\bOS X (?:\d+\.){2,}/.test(u) || c == "IE" && (u && !/^Win/.test(u) && m > 5.5 || /\bWindows XP\b/.test(u) && m > 8 || m == 8 && !/\bTrident\b/.test(s))) && !h.test(o = te.call(ee, s.replace(h, "") + ";")) && o.name && (o = "ing as " + o.name + ((o = o.version) ? " " + o : ""), h.test(c) ? (/\bIE\b/.test(o) && u == "Mac OS" && (u = null), o = "identify" + o) : (o = "mask" + o, Te ? c = Y(Te.replace(/([a-z])([A-Z])/g, "$1 $2")) : c = "Opera", /\bIE\b/.test(o) && (u = null), $ || (m = null)), E = ["Presto"], w.push(o)), (o = (/\bAppleWebKit\/([\d.]+\+?)/i.exec(s) || 0)[1]) && (o = [parseFloat(o.replace(/\.(\d)$/, ".0$1")), o], c == "Safari" && o[1].slice(-1) == "+" ? (c = "WebKit Nightly", Ae = "alpha", m = o[1].slice(0, -1)) : (m == o[1] || m == (o[2] = (/\bSafari\/([\d.]+\+?)/i.exec(s) || 0)[1])) && (m = null), o[1] = (/\bChrome\/([\d.]+)/i.exec(s) || 0)[1], o[0] == 537.36 && o[2] == 537.36 && parseFloat(o[1]) >= 28 && E == "WebKit" && (E = ["Blink"]), !$ || !A && !o[1] ? (E && (E[1] = "like Safari"), o = (o = o[0], o < 400 ? 1 : o < 500 ? 2 : o < 526 ? 3 : o < 533 ? 4 : o < 534 ? "4+" : o < 535 ? 5 : o < 537 ? 6 : o < 538 ? 7 : o < 601 ? 8 : "8")) : (E && (E[1] = "like Chrome"), o = o[1] || (o = o[0], o < 530 ? 1 : o < 532 ? 2 : o < 532.05 ? 3 : o < 533 ? 4 : o < 534.03 ? 5 : o < 534.07 ? 6 : o < 534.1 ? 7 : o < 534.13 ? 8 : o < 534.16 ? 9 : o < 534.24 ? 10 : o < 534.3 ? 11 : o < 535.01 ? 12 : o < 535.02 ? "13+" : o < 535.07 ? 15 : o < 535.11 ? 16 : o < 535.19 ? 17 : o < 536.05 ? 18 : o < 536.1 ? 19 : o < 537.01 ? 20 : o < 537.11 ? "21+" : o < 537.13 ? 23 : o < 537.18 ? 24 : o < 537.24 ? 25 : o < 537.36 ? 26 : E != "Blink" ? "27" : "28")), E && (E[1] += " " + (o += typeof o == "number" ? ".x" : /[.+]/.test(o) ? "" : "+")), c == "Safari" && (!m || parseInt(m) > 45) && (m = o)), c == "Opera" && (o = /\bzbov|zvav$/.exec(u)) ? (c += " ", w.unshift("desktop mode"), o == "zvav" ? (c += "Mini", m = null) : c += "Mobile", u = u.replace(RegExp(" *" + o + "$"), "")) : c == "Safari" && /\bChrome\b/.exec(E && E[1]) && (w.unshift("desktop mode"), c = "Chrome Mobile", m = null, /\bOS X\b/.test(u) ? (L = "Apple", u = "iOS 4.3+") : u = null), m && m.indexOf(o = /[\d.]+$/.exec(u)) == 0 && s.indexOf("/" + o + "-") > -1 && (u = Se(u.replace(o, ""))), E && !/\b(?:Avant|Nook)\b/.test(c) && (/Browser|Lunascape|Maxthon/.test(c) || c != "Safari" && /^iOS/.test(u) && /\bSafari\b/.test(E[1]) || /^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Sleipnir|Web)/.test(c) && E[1]) && (o = E[E.length - 1]) && w.push(o), w.length && (w = ["(" + w.join("; ") + ")"]), L && v && v.indexOf(L) < 0 && w.push("on " + L), v && w.push((/^on /.test(w[w.length - 1]) ? "" : "on ") + v), u && (o = / ([\d.+]+)$/.exec(u), Ue = o && u.charAt(u.length - o[0].length - 1) == "/", u = {
317
+ architecture: 32,
318
+ family: o && !Ue ? u.replace(o[0], "") : u,
319
+ version: o ? o[1] : null,
320
+ toString: function() {
321
+ var _ = this.version;
322
+ return this.family + (_ && !Ue ? " " + _ : "") + (this.architecture == 64 ? " 64-bit" : "");
323
+ }
324
+ }), (o = /\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Ce)) && !/\bi686\b/i.test(Ce) ? (u && (u.architecture = 64, u.family = u.family.replace(RegExp(" *" + o), "")), c && (/\bWOW64\b/i.test(s) || $ && /\w(?:86|32)$/.test(N.cpuClass || N.platform) && !/\bWin64; x64\b/i.test(s)) && w.unshift("32-bit")) : u && /^OS X/.test(u.family) && c == "Chrome" && parseFloat(m) >= 39 && (u.architecture = 64), s || (s = null);
325
+ var M = {};
326
+ return M.description = s, M.layout = E && E[0], M.manufacturer = L, M.name = c, M.prerelease = Ae, M.product = v, M.ua = s, M.version = c && m, M.os = u || {
327
+ /**
328
+ * The CPU architecture the OS is built for.
329
+ *
330
+ * @memberOf platform.os
331
+ * @type number|null
332
+ */
333
+ architecture: null,
334
+ /**
335
+ * The family of the OS.
336
+ *
337
+ * Common values include:
338
+ * "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista",
339
+ * "Windows XP", "OS X", "Ubuntu", "Debian", "Fedora", "Red Hat", "SuSE",
340
+ * "Android", "iOS" and "Windows Phone"
341
+ *
342
+ * @memberOf platform.os
343
+ * @type string|null
344
+ */
345
+ family: null,
346
+ /**
347
+ * The version of the OS.
348
+ *
349
+ * @memberOf platform.os
350
+ * @type string|null
351
+ */
352
+ version: null,
353
+ /**
354
+ * Returns the OS string.
355
+ *
356
+ * @memberOf platform.os
357
+ * @returns {string} The OS string.
358
+ */
359
+ toString: function() {
360
+ return "null";
361
+ }
362
+ }, M.parse = te, M.toString = Qt, M.version && w.unshift(m), M.name && w.unshift(c), u && c && !(u == String(u).split(" ")[0] && (u == c.split(" ")[0] || v)) && w.push(v ? "(" + u + ")" : "on " + u), w.length && (M.description = w.join(" ")), M;
363
+ }
364
+ var de = te();
365
+ a && l ? ee(de, function(s, p) {
366
+ a[p] = s;
367
+ }) : r.platform = de;
368
+ }).call(se);
369
+ })(ke, ke.exports);
370
+ var ln = ke.exports;
371
+ const cn = /* @__PURE__ */ Tt(ln), b = JSON.parse(JSON.stringify(cn)), We = b.os.family || "", un = We === "Android", fn = We.slice(0, 7) === "Windows", dn = We === "OS X", bn = We === "iOS", mn = b.layout === "Blink", hn = b.layout === "Gecko", Oe = b.layout === "Trident", pn = b.layout === "EdgeHTML", gn = b.layout === "WebKit", vn = parseFloat(b.version), Me = Math.floor(vn);
372
+ b.majorVersion = Me;
373
+ b.is = {
374
+ // operating system
375
+ ANDROID: un,
376
+ WINDOWS: fn,
377
+ OSX: dn,
378
+ IOS: bn,
379
+ // layout
380
+ BLINK: mn,
381
+ // "Chrome", "Chrome Mobile", "Opera"
382
+ GECKO: hn,
383
+ // "Firefox"
384
+ TRIDENT: Oe,
385
+ // "Internet Explorer"
386
+ EDGE: pn,
387
+ // "Microsoft Edge"
388
+ WEBKIT: gn,
389
+ // "Safari"
390
+ // INTERNET EXPLORERS
391
+ IE9: Oe && Me === 9,
392
+ IE10: Oe && Me === 10,
393
+ IE11: Oe && Me === 11
394
+ };
395
+ function xn() {
396
+ const e = {
397
+ // remember what had focus to restore after test
398
+ activeElement: document.activeElement,
399
+ // remember scroll positions to restore after test
400
+ windowScrollTop: window.scrollTop,
401
+ windowScrollLeft: window.scrollLeft,
402
+ bodyScrollTop: document.body.scrollTop,
403
+ bodyScrollLeft: document.body.scrollLeft
404
+ }, t = document.createElement("iframe");
405
+ t.setAttribute("style", "position:absolute; position:fixed; top:0; left:-2px; width:1px; height:1px; overflow:hidden;"), t.setAttribute("aria-live", "off"), t.setAttribute("aria-busy", "true"), t.setAttribute("aria-hidden", "true"), document.body.appendChild(t);
406
+ const n = t.contentWindow, r = n.document;
407
+ r.open(), r.close();
408
+ const i = r.createElement("div");
409
+ return r.body.appendChild(i), e.iframe = t, e.wrapper = i, e.window = n, e.document = r, e;
410
+ }
411
+ function yn(e, t) {
412
+ e.wrapper.innerHTML = "";
413
+ const n = typeof t.element == "string" ? e.document.createElement(t.element) : t.element(e.wrapper, e.document);
414
+ let r = t.mutate && t.mutate(n, e.wrapper, e.document);
415
+ return !r && r !== !1 && (r = n), !n.parentNode && e.wrapper.appendChild(n), r && r.focus && r.focus(), t.validate ? t.validate(n, r, e.document) : e.document.activeElement === r;
416
+ }
417
+ function En(e) {
418
+ e.activeElement === document.body ? (document.activeElement && document.activeElement.blur && document.activeElement.blur(), b.is.IE10 && document.body.focus()) : e.activeElement && e.activeElement.focus && e.activeElement.focus(), document.body.removeChild(e.iframe), window.scrollTop = e.windowScrollTop, window.scrollLeft = e.windowScrollLeft, document.body.scrollTop = e.bodyScrollTop, document.body.scrollLeft = e.bodyScrollLeft;
419
+ }
420
+ function wn(e) {
421
+ const t = xn(), n = {};
422
+ return Object.keys(e).map(function(r) {
423
+ n[r] = yn(t, e[r]);
424
+ }), En(t), n;
425
+ }
426
+ const Ct = "1.4.1";
427
+ function Sn(e) {
428
+ let t;
429
+ try {
430
+ t = window.localStorage && window.localStorage.getItem(e), t = t ? JSON.parse(t) : {};
431
+ } catch {
432
+ t = {};
433
+ }
434
+ return t;
435
+ }
436
+ function Tn(e, t) {
437
+ if (!document.hasFocus()) {
438
+ try {
439
+ window.localStorage && window.localStorage.removeItem(e);
440
+ } catch {
441
+ }
442
+ return;
443
+ }
444
+ try {
445
+ window.localStorage && window.localStorage.setItem(e, JSON.stringify(t));
446
+ } catch {
447
+ }
448
+ }
449
+ const At = typeof window < "u" && window.navigator.userAgent || "", Ot = "ally-supports-cache";
450
+ let W = Sn(Ot);
451
+ (W.userAgent !== At || W.version !== Ct) && (W = {});
452
+ W.userAgent = At;
453
+ W.version = Ct;
454
+ const ze = {
455
+ get: function() {
456
+ return W;
457
+ },
458
+ set: function(e) {
459
+ Object.keys(e).forEach(function(t) {
460
+ W[t] = e[t];
461
+ }), W.time = (/* @__PURE__ */ new Date()).toISOString(), Tn(Ot, W);
462
+ }
463
+ };
464
+ function Nt() {
465
+ let e;
466
+ try {
467
+ document.querySelector("html >>> :first-child"), e = ">>>";
468
+ } catch {
469
+ try {
470
+ document.querySelector("html /deep/ :first-child"), e = "/deep/";
471
+ } catch {
472
+ e = "";
473
+ }
474
+ }
475
+ return e;
476
+ }
477
+ const q = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", Cn = {
478
+ element: "div",
479
+ mutate: function(e) {
480
+ return e.innerHTML = '<map name="image-map-tabindex-test"><area shape="rect" coords="63,19,144,45"></map><img usemap="#image-map-tabindex-test" tabindex="-1" alt="" src="' + q + '">', e.querySelector("area");
481
+ }
482
+ }, An = {
483
+ element: "div",
484
+ mutate: function(e) {
485
+ return e.innerHTML = '<map name="image-map-tabindex-test"><area href="#void" tabindex="-1" shape="rect" coords="63,19,144,45"></map><img usemap="#image-map-tabindex-test" alt="" src="' + q + '">', !1;
486
+ },
487
+ validate: function(e, t, n) {
488
+ if (b.is.GECKO)
489
+ return !0;
490
+ const r = e.querySelector("area");
491
+ return r.focus(), n.activeElement === r;
492
+ }
493
+ }, On = {
494
+ element: "div",
495
+ mutate: function(e) {
496
+ return e.innerHTML = '<map name="image-map-area-href-test"><area shape="rect" coords="63,19,144,45"></map><img usemap="#image-map-area-href-test" alt="" src="' + q + '">', e.querySelector("area");
497
+ },
498
+ validate: function(e, t, n) {
499
+ return b.is.GECKO ? !0 : n.activeElement === t;
500
+ }
501
+ }, Nn = {
502
+ name: "can-focus-audio-without-controls",
503
+ element: "audio",
504
+ mutate: function(e) {
505
+ try {
506
+ e.setAttribute("src", q);
507
+ } catch {
508
+ }
509
+ }
510
+ }, In = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", Mn = {
511
+ element: "div",
512
+ mutate: function(e) {
513
+ return e.innerHTML = '<map name="broken-image-map-test"><area href="#void" shape="rect" coords="63,19,144,45"></map><img usemap="#broken-image-map-test" alt="" src="' + In + '">', e.querySelector("area");
514
+ }
515
+ }, _n = {
516
+ element: "div",
517
+ mutate: function(e) {
518
+ return e.setAttribute("tabindex", "-1"), e.setAttribute("style", "display: -webkit-flex; display: -ms-flexbox; display: flex;"), e.innerHTML = '<span style="display: block;">hello</span>', e.querySelector("span");
519
+ }
520
+ }, Fn = {
521
+ element: "fieldset",
522
+ mutate: function(e) {
523
+ e.setAttribute("tabindex", 0), e.setAttribute("disabled", "disabled");
524
+ }
525
+ }, Ln = {
526
+ element: "fieldset",
527
+ mutate: function(e) {
528
+ e.innerHTML = "<legend>legend</legend><p>content</p>";
529
+ }
530
+ }, Pn = {
531
+ element: "span",
532
+ mutate: function(e) {
533
+ e.setAttribute("style", "display: -webkit-flex; display: -ms-flexbox; display: flex;"), e.innerHTML = '<span style="display: block;">hello</span>';
534
+ }
535
+ }, kn = {
536
+ element: "form",
537
+ mutate: function(e) {
538
+ e.setAttribute("tabindex", 0), e.setAttribute("disabled", "disabled");
539
+ }
540
+ }, Bn = {
541
+ element: "a",
542
+ mutate: function(e) {
543
+ return e.href = "#void", e.innerHTML = '<img ismap src="' + q + '" alt="">', e.querySelector("img");
544
+ }
545
+ }, Dn = {
546
+ element: "div",
547
+ mutate: function(e) {
548
+ return e.innerHTML = '<map name="image-map-tabindex-test"><area href="#void" shape="rect" coords="63,19,144,45"></map><img usemap="#image-map-tabindex-test" tabindex="-1" alt="" src="' + q + '">', e.querySelector("img");
549
+ }
550
+ }, Hn = {
551
+ element: function(e, t) {
552
+ const n = t.createElement("iframe");
553
+ e.appendChild(n);
554
+ const r = n.contentWindow.document;
555
+ return r.open(), r.close(), n;
556
+ },
557
+ mutate: function(e) {
558
+ e.style.visibility = "hidden";
559
+ const t = e.contentWindow.document, n = t.createElement("input");
560
+ return t.body.appendChild(n), n;
561
+ },
562
+ validate: function(e) {
563
+ const t = e.contentWindow.document, n = t.querySelector("input");
564
+ return t.activeElement === n;
565
+ }
566
+ }, Rn = !b.is.WEBKIT;
567
+ function Wn() {
568
+ return Rn;
569
+ }
570
+ const jn = {
571
+ element: "div",
572
+ mutate: function(e) {
573
+ e.setAttribute("tabindex", "invalid-value");
574
+ }
575
+ }, Gn = {
576
+ element: "label",
577
+ mutate: function(e) {
578
+ e.setAttribute("tabindex", "-1");
579
+ },
580
+ validate: function(e, t, n) {
581
+ return e.offsetHeight, e.focus(), n.activeElement === e;
582
+ }
583
+ }, It = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0ic3ZnIj48dGV4dCB4PSIxMCIgeT0iMjAiIGlkPSJzdmctbGluay10ZXh0Ij50ZXh0PC90ZXh0Pjwvc3ZnPg==", Kn = {
584
+ element: "object",
585
+ mutate: function(e) {
586
+ e.setAttribute("type", "image/svg+xml"), e.setAttribute("data", It), e.setAttribute("width", "200"), e.setAttribute("height", "50"), e.style.visibility = "hidden";
587
+ }
588
+ }, Vn = {
589
+ name: "can-focus-object-svg",
590
+ element: "object",
591
+ mutate: function(e) {
592
+ e.setAttribute("type", "image/svg+xml"), e.setAttribute("data", It), e.setAttribute("width", "200"), e.setAttribute("height", "50");
593
+ },
594
+ validate: function(e, t, n) {
595
+ return b.is.GECKO ? !0 : n.activeElement === e;
596
+ }
597
+ }, $n = !b.is.IE9;
598
+ function qn() {
599
+ return $n;
600
+ }
601
+ const Zn = {
602
+ element: "div",
603
+ mutate: function(e) {
604
+ return e.innerHTML = '<map name="focus-redirect-img-usemap"><area href="#void" shape="rect" coords="63,19,144,45"></map><img usemap="#focus-redirect-img-usemap" alt="" src="' + q + '">', e.querySelector("img");
605
+ },
606
+ validate: function(e, t, n) {
607
+ const r = e.querySelector("area");
608
+ return n.activeElement === r;
609
+ }
610
+ }, Un = {
611
+ element: "fieldset",
612
+ mutate: function(e) {
613
+ return e.innerHTML = '<legend>legend</legend><input tabindex="-1"><input tabindex="0">', !1;
614
+ },
615
+ validate: function(e, t, n) {
616
+ const r = e.querySelector('input[tabindex="-1"]'), i = e.querySelector('input[tabindex="0"]');
617
+ return e.focus(), e.querySelector("legend").focus(), n.activeElement === r && "focusable" || n.activeElement === i && "tabbable" || "";
618
+ }
619
+ }, Xn = {
620
+ element: "div",
621
+ mutate: function(e) {
622
+ return e.setAttribute("style", "width: 100px; height: 50px; overflow: auto;"), e.innerHTML = '<div style="width: 500px; height: 40px;">scrollable content</div>', e.querySelector("div");
623
+ }
624
+ }, zn = {
625
+ element: "div",
626
+ mutate: function(e) {
627
+ e.setAttribute("style", "width: 100px; height: 50px;"), e.innerHTML = '<div style="width: 500px; height: 40px;">scrollable content</div>';
628
+ }
629
+ }, Jn = {
630
+ element: "div",
631
+ mutate: function(e) {
632
+ e.setAttribute("style", "width: 100px; height: 50px; overflow: auto;"), e.innerHTML = '<div style="width: 500px; height: 40px;">scrollable content</div>';
633
+ }
634
+ }, Qn = {
635
+ element: "details",
636
+ mutate: function(e) {
637
+ return e.innerHTML = "<summary>foo</summary><p>content</p>", e.firstElementChild;
638
+ }
639
+ };
640
+ function Yn() {
641
+ const e = document.createElement("div");
642
+ return e.innerHTML = `<svg><foreignObject width="30" height="30">
643
+ <input type="text"/>
644
+ </foreignObject></svg>`, e.firstChild.firstChild;
645
+ }
646
+ function er(e) {
647
+ if (!(e.ownerSVGElement || e.nodeName.toLowerCase() === "svg"))
648
+ return !1;
649
+ const n = Yn();
650
+ e.appendChild(n);
651
+ const r = n.querySelector("input");
652
+ return r.focus(), r.disabled = !0, e.removeChild(n), !0;
653
+ }
654
+ function le(e) {
655
+ return '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + e + "</svg>";
656
+ }
657
+ function tr(e) {
658
+ if (!e.focus)
659
+ try {
660
+ HTMLElement.prototype.focus.call(e);
661
+ } catch {
662
+ er(e);
663
+ }
664
+ }
665
+ function ce(e, t, n) {
666
+ return tr(t), n.activeElement === t;
667
+ }
668
+ const nr = {
669
+ element: "div",
670
+ mutate: function(e) {
671
+ return e.innerHTML = le('<text focusable="true">a</text>'), e.querySelector("text");
672
+ },
673
+ validate: ce
674
+ }, rr = {
675
+ element: "div",
676
+ mutate: function(e) {
677
+ return e.innerHTML = le('<text tabindex="0">a</text>'), e.querySelector("text");
678
+ },
679
+ validate: ce
680
+ }, ir = {
681
+ element: "div",
682
+ mutate: function(e) {
683
+ return e.innerHTML = le('<text tabindex="-1">a</text>'), e.querySelector("text");
684
+ },
685
+ validate: ce
686
+ }, or = {
687
+ element: "div",
688
+ mutate: function(e) {
689
+ return e.innerHTML = le([
690
+ '<g id="ally-test-target"><a xlink:href="#void"><text>link</text></a></g>',
691
+ '<use xlink:href="#ally-test-target" x="0" y="0" tabindex="-1" />'
692
+ ].join("")), e.querySelector("use");
693
+ },
694
+ validate: ce
695
+ }, sr = {
696
+ element: "div",
697
+ mutate: function(e) {
698
+ return e.innerHTML = le('<foreignObject tabindex="-1"><input type="text" /></foreignObject>'), e.querySelector("foreignObject") || e.getElementsByTagName("foreignObject")[0];
699
+ },
700
+ validate: ce
701
+ }, ar = !!(b.is.GECKO && typeof SVGElement < "u" && SVGElement.prototype.focus);
702
+ function lr() {
703
+ return ar;
704
+ }
705
+ const cr = {
706
+ element: "div",
707
+ mutate: function(e) {
708
+ return e.innerHTML = le(""), e.firstChild;
709
+ },
710
+ validate: ce
711
+ }, ur = {
712
+ element: "div",
713
+ mutate: function(e) {
714
+ e.setAttribute("tabindex", "3x");
715
+ }
716
+ }, fr = {
717
+ element: "table",
718
+ mutate: function(e, t, n) {
719
+ const r = n.createDocumentFragment();
720
+ r.innerHTML = "<tr><td>cell</td></tr>", e.appendChild(r);
721
+ }
722
+ }, dr = {
723
+ element: "video",
724
+ mutate: function(e) {
725
+ try {
726
+ e.setAttribute("src", q);
727
+ } catch {
728
+ }
729
+ }
730
+ }, br = b.is.GECKO || b.is.TRIDENT || b.is.EDGE;
731
+ function mr() {
732
+ return br;
733
+ }
734
+ const pt = {
735
+ cssShadowPiercingDeepCombinator: Nt,
736
+ focusInZeroDimensionObject: Wn,
737
+ focusObjectSwf: qn,
738
+ focusSvgInIframe: lr,
739
+ tabsequenceAreaAtImgPosition: mr
740
+ }, hr = {
741
+ focusAreaImgTabindex: Cn,
742
+ focusAreaTabindex: An,
743
+ focusAreaWithoutHref: On,
744
+ focusAudioWithoutControls: Nn,
745
+ focusBrokenImageMap: Mn,
746
+ focusChildrenOfFocusableFlexbox: _n,
747
+ focusFieldsetDisabled: Fn,
748
+ focusFieldset: Ln,
749
+ focusFlexboxContainer: Pn,
750
+ focusFormDisabled: kn,
751
+ focusImgIsmap: Bn,
752
+ focusImgUsemapTabindex: Dn,
753
+ focusInHiddenIframe: Hn,
754
+ focusInvalidTabindex: jn,
755
+ focusLabelTabindex: Gn,
756
+ focusObjectSvg: Vn,
757
+ focusObjectSvgHidden: Kn,
758
+ focusRedirectImgUsemap: Zn,
759
+ focusRedirectLegend: Un,
760
+ focusScrollBody: Xn,
761
+ focusScrollContainerWithoutOverflow: zn,
762
+ focusScrollContainer: Jn,
763
+ focusSummary: Qn,
764
+ focusSvgFocusableAttribute: nr,
765
+ focusSvgTabindexAttribute: rr,
766
+ focusSvgNegativeTabindexAttribute: ir,
767
+ focusSvgUseTabindex: or,
768
+ focusSvgForeignobjectTabindex: sr,
769
+ focusSvg: cr,
770
+ focusTabindexTrailingCharacters: ur,
771
+ focusTable: fr,
772
+ focusVideoWithoutControls: dr
773
+ };
774
+ function pr() {
775
+ const e = wn(hr);
776
+ return Object.keys(pt).forEach(function(t) {
777
+ e[t] = pt[t]();
778
+ }), e;
779
+ }
780
+ let re = null;
781
+ function H() {
782
+ return re || (re = ze.get(), re.time || (ze.set(pr()), re = ze.get()), re);
783
+ }
784
+ let me;
785
+ const gr = /^\s*(-|\+)?[0-9]+\s*$/, vr = /^\s*(-|\+)?[0-9]+.*$/;
786
+ function Mt(e) {
787
+ me || (me = H());
788
+ const t = me.focusTabindexTrailingCharacters ? vr : gr, n = I({
789
+ label: "is/valid-tabindex",
790
+ resolveDocument: !0,
791
+ context: e
792
+ }), r = n.hasAttribute("tabindex"), i = n.hasAttribute("tabIndex");
793
+ if (!r && !i || (n.ownerSVGElement || n.nodeName.toLowerCase() === "svg") && !me.focusSvgTabindexAttribute)
794
+ return !1;
795
+ if (me.focusInvalidTabindex)
796
+ return !0;
797
+ const l = n.getAttribute(r ? "tabindex" : "tabIndex");
798
+ return l === "-32768" ? !1 : !!(l && t.test(l));
799
+ }
800
+ function D(e) {
801
+ if (!Mt(e))
802
+ return null;
803
+ const n = e.hasAttribute("tabindex") ? "tabindex" : "tabIndex", r = parseInt(e.getAttribute(n), 10);
804
+ return isNaN(r) ? -1 : r;
805
+ }
806
+ function tt(e) {
807
+ const t = e.webkitUserModify || "";
808
+ return !!(t && t.indexOf("write") !== -1);
809
+ }
810
+ function ct(e) {
811
+ return [
812
+ e.getPropertyValue("overflow"),
813
+ e.getPropertyValue("overflow-x"),
814
+ e.getPropertyValue("overflow-y")
815
+ ].some((t) => t === "auto" || t === "scroll");
816
+ }
817
+ function Be(e) {
818
+ return e.display.indexOf("flex") > -1;
819
+ }
820
+ function De(e, t, n, r) {
821
+ return t !== "div" && t !== "span" || n && n !== "div" && n !== "span" && !ct(r) ? !1 : e.offsetHeight < e.scrollHeight || e.offsetWidth < e.scrollWidth;
822
+ }
823
+ let T;
824
+ function _e({
825
+ context: e,
826
+ except: t = {
827
+ flexbox: !1,
828
+ scrollable: !1,
829
+ shadow: !1
830
+ }
831
+ } = {}) {
832
+ T || (T = H());
833
+ const n = I({
834
+ label: "is/focus-relevant",
835
+ resolveDocument: !0,
836
+ context: e
837
+ });
838
+ if (!t.shadow && n.shadowRoot)
839
+ return !0;
840
+ const r = n.nodeName.toLowerCase();
841
+ if (r === "input" && n.type === "hidden")
842
+ return !1;
843
+ if (r === "input" || r === "select" || r === "button" || r === "textarea" || r === "legend" && T.focusRedirectLegend || r === "label" || r === "area" || r === "a" && n.hasAttribute("href"))
844
+ return !0;
845
+ if (r === "object" && n.hasAttribute("usemap"))
846
+ return !1;
847
+ if (r === "object") {
848
+ const O = n.getAttribute("type");
849
+ if (!T.focusObjectSvg && O === "image/svg+xml")
850
+ return !1;
851
+ if (!T.focusObjectSwf && O === "application/x-shockwave-flash")
852
+ return !1;
853
+ }
854
+ if (r === "iframe" || r === "object" || r === "embed" || r === "keygen" || n.hasAttribute("contenteditable") || r === "audio" && (T.focusAudioWithoutControls || n.hasAttribute("controls")) || r === "video" && (T.focusVideoWithoutControls || n.hasAttribute("controls")) || T.focusSummary && r === "summary")
855
+ return !0;
856
+ const i = Mt(n);
857
+ if (r === "img" && n.hasAttribute("usemap"))
858
+ return i && T.focusImgUsemapTabindex || T.focusRedirectImgUsemap;
859
+ if (T.focusTable && (r === "table" || r === "td") || T.focusFieldset && r === "fieldset")
860
+ return !0;
861
+ const a = r === "svg", l = n.ownerSVGElement, f = n.getAttribute("focusable"), d = D(n);
862
+ if (r === "use" && d !== null && !T.focusSvgUseTabindex)
863
+ return !1;
864
+ if (r === "foreignobject")
865
+ return d !== null && T.focusSvgForeignobjectTabindex;
866
+ if (St(n, "svg a") && n.hasAttribute("xlink:href"))
867
+ return !0;
868
+ if ((a || l) && n.focus && !T.focusSvgNegativeTabindexAttribute && d < 0)
869
+ return !1;
870
+ if (a)
871
+ return i || T.focusSvg || T.focusSvgInIframe || !!(T.focusSvgFocusableAttribute && f && f === "true");
872
+ if (l) {
873
+ if (T.focusSvgTabindexAttribute && i)
874
+ return !0;
875
+ if (T.focusSvgFocusableAttribute)
876
+ return f === "true";
877
+ }
878
+ if (i)
879
+ return !0;
880
+ const h = window.getComputedStyle(n, null);
881
+ if (tt(h) || T.focusImgIsmap && r === "img" && n.hasAttribute("ismap") && Ee({ context: n }).some(
882
+ (S) => S.nodeName.toLowerCase() === "a" && S.hasAttribute("href")
883
+ ))
884
+ return !0;
885
+ if (!t.scrollable && T.focusScrollContainer) {
886
+ if (T.focusScrollContainerWithoutOverflow) {
887
+ if (De(n, r))
888
+ return !0;
889
+ } else if (ct(h))
890
+ return !0;
891
+ }
892
+ if (!t.flexbox && T.focusFlexboxContainer && Be(h))
893
+ return !0;
894
+ const y = n.parentElement;
895
+ if (!t.scrollable && y) {
896
+ const O = y.nodeName.toLowerCase(), S = window.getComputedStyle(y, null);
897
+ if (T.focusScrollBody && De(y, r, O, S) || T.focusChildrenOfFocusableFlexbox && Be(S))
898
+ return !0;
899
+ }
900
+ return !1;
901
+ }
902
+ _e.except = function(e = {}) {
903
+ const t = function(n) {
904
+ return _e({
905
+ context: n,
906
+ except: e
907
+ });
908
+ };
909
+ return t.rules = _e, t;
910
+ };
911
+ const je = _e.except({});
912
+ function xe(e, t) {
913
+ if (e.findIndex)
914
+ return e.findIndex(t);
915
+ const n = e.length;
916
+ if (n === 0)
917
+ return -1;
918
+ for (let r = 0; r < n; r++)
919
+ if (t(e[r], r, e))
920
+ return r;
921
+ return -1;
922
+ }
923
+ function xr(e) {
924
+ try {
925
+ return e.contentDocument || e.contentWindow && e.contentWindow.document || e.getSVGDocument && e.getSVGDocument() || null;
926
+ } catch {
927
+ return null;
928
+ }
929
+ }
930
+ function Q(e) {
931
+ return e ? e.nodeType === Node.DOCUMENT_NODE ? e : e.ownerDocument || document : document;
932
+ }
933
+ function yr(e) {
934
+ return Q(e).defaultView || window;
935
+ }
936
+ let he;
937
+ function _t(e) {
938
+ if (typeof he != "string") {
939
+ const t = Nt();
940
+ t && (he = ", html " + t + " ");
941
+ }
942
+ return he ? e + he + e.replace(/\s*,\s*/g, ",").split(",").join(he) : e;
943
+ }
944
+ let Je;
945
+ function Er(e) {
946
+ if (Je || (Je = _t("object, iframe")), e._frameElement !== void 0)
947
+ return e._frameElement;
948
+ e._frameElement = null;
949
+ const t = e.parent.document.querySelectorAll(Je);
950
+ return [].some.call(t, function(n) {
951
+ return xr(n) !== e.document ? !1 : (e._frameElement = n, !0);
952
+ }), e._frameElement;
953
+ }
954
+ function Ge(e) {
955
+ const t = yr(e);
956
+ if (!t.parent || t.parent === t)
957
+ return null;
958
+ try {
959
+ return t.frameElement || Er(t);
960
+ } catch {
961
+ return null;
962
+ }
963
+ }
964
+ const wr = /^(area)$/;
965
+ function nt(e, t) {
966
+ return window.getComputedStyle(e, null).getPropertyValue(t);
967
+ }
968
+ function Sr(e) {
969
+ return e.some(function(t) {
970
+ return nt(t, "display") === "none";
971
+ });
972
+ }
973
+ function Tr(e) {
974
+ const t = xe(e, function(r) {
975
+ const i = nt(r, "visibility");
976
+ return i === "hidden" || i === "collapse";
977
+ });
978
+ if (t === -1)
979
+ return !1;
980
+ const n = xe(e, function(r) {
981
+ return nt(r, "visibility") === "visible";
982
+ });
983
+ return n === -1 || t < n;
984
+ }
985
+ function Cr(e) {
986
+ let t = 1;
987
+ return e[0].nodeName.toLowerCase() === "summary" && (t = 2), e.slice(t).some(function(n) {
988
+ return n.nodeName.toLowerCase() === "details" && n.open === !1;
989
+ });
990
+ }
991
+ function ge({
992
+ context: e,
993
+ except: t = {
994
+ notRendered: !1,
995
+ cssDisplay: !1,
996
+ cssVisibility: !1,
997
+ detailsElement: !1,
998
+ browsingContext: !1
999
+ }
1000
+ } = {}) {
1001
+ const n = I({
1002
+ label: "is/visible",
1003
+ resolveDocument: !0,
1004
+ context: e
1005
+ }), r = n.nodeName.toLowerCase();
1006
+ if (!t.notRendered && wr.test(r))
1007
+ return !0;
1008
+ const i = Ee({ context: n }), a = r === "audio" && !n.hasAttribute("controls");
1009
+ if (!t.cssDisplay && Sr(a ? i.slice(1) : i) || !t.cssVisibility && Tr(i) || !t.detailsElement && Cr(i))
1010
+ return !1;
1011
+ if (!t.browsingContext) {
1012
+ const l = Ge(n), f = ge.except(t);
1013
+ if (l && !f(l))
1014
+ return !1;
1015
+ }
1016
+ return !0;
1017
+ }
1018
+ ge.except = function(e = {}) {
1019
+ const t = function(n) {
1020
+ return ge({
1021
+ context: n,
1022
+ except: e
1023
+ });
1024
+ };
1025
+ return t.rules = ge, t;
1026
+ };
1027
+ const Ke = ge.except({});
1028
+ var Ft = { exports: {} };
1029
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
1030
+ (function(e, t) {
1031
+ (function(n, r) {
1032
+ e.exports = r(n);
1033
+ })(se, function(n) {
1034
+ if (n.CSS && n.CSS.escape)
1035
+ return n.CSS.escape;
1036
+ var r = function(i) {
1037
+ if (arguments.length == 0)
1038
+ throw new TypeError("`CSS.escape` requires an argument.");
1039
+ for (var a = String(i), l = a.length, f = -1, d, h = "", y = a.charCodeAt(0); ++f < l; ) {
1040
+ if (d = a.charCodeAt(f), d == 0) {
1041
+ h += "�";
1042
+ continue;
1043
+ }
1044
+ if (
1045
+ // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
1046
+ // U+007F, […]
1047
+ d >= 1 && d <= 31 || d == 127 || // If the character is the first character and is in the range [0-9]
1048
+ // (U+0030 to U+0039), […]
1049
+ f == 0 && d >= 48 && d <= 57 || // If the character is the second character and is in the range [0-9]
1050
+ // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
1051
+ f == 1 && d >= 48 && d <= 57 && y == 45
1052
+ ) {
1053
+ h += "\\" + d.toString(16) + " ";
1054
+ continue;
1055
+ }
1056
+ if (
1057
+ // If the character is the first character and is a `-` (U+002D), and
1058
+ // there is no second character, […]
1059
+ f == 0 && l == 1 && d == 45
1060
+ ) {
1061
+ h += "\\" + a.charAt(f);
1062
+ continue;
1063
+ }
1064
+ if (d >= 128 || d == 45 || d == 95 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122) {
1065
+ h += a.charAt(f);
1066
+ continue;
1067
+ }
1068
+ h += "\\" + a.charAt(f);
1069
+ }
1070
+ return h;
1071
+ };
1072
+ return n.CSS || (n.CSS = {}), n.CSS.escape = r, r;
1073
+ });
1074
+ })(Ft);
1075
+ var Ar = Ft.exports;
1076
+ const Lt = /* @__PURE__ */ Tt(Ar);
1077
+ function Or(e, t) {
1078
+ return t.querySelector('map[name="' + Lt(e) + '"]') || null;
1079
+ }
1080
+ function Pt(e) {
1081
+ const t = e.parentElement;
1082
+ return !t.name || t.nodeName.toLowerCase() !== "map" ? null : Q(e).querySelector('img[usemap="#' + Lt(t.name) + '"]') || null;
1083
+ }
1084
+ let U;
1085
+ function Nr(e) {
1086
+ U || (U = H());
1087
+ const t = I({
1088
+ label: "is/valid-area",
1089
+ context: e
1090
+ });
1091
+ if (t.nodeName.toLowerCase() !== "area")
1092
+ return !1;
1093
+ const r = t.hasAttribute("tabindex");
1094
+ if (!U.focusAreaTabindex && r)
1095
+ return !1;
1096
+ const i = Pt(t);
1097
+ return !i || !Ke(i) || !U.focusBrokenImageMap && (!i.complete || !i.naturalHeight || i.offsetWidth <= 0 || i.offsetHeight <= 0) ? !1 : !U.focusAreaWithoutHref && !t.href ? U.focusAreaTabindex && r || U.focusAreaImgTabindex && i.hasAttribute("tabindex") : !Ee({ context: i }).slice(1).some(function(l) {
1098
+ const f = l.nodeName.toLowerCase();
1099
+ return f === "button" || f === "a";
1100
+ });
1101
+ }
1102
+ let Ne, gt;
1103
+ const Qe = {
1104
+ input: !0,
1105
+ select: !0,
1106
+ textarea: !0,
1107
+ button: !0,
1108
+ fieldset: !0,
1109
+ form: !0
1110
+ };
1111
+ function kt(e) {
1112
+ Ne || (Ne = H(), Ne.focusFieldsetDisabled && delete Qe.fieldset, Ne.focusFormDisabled && delete Qe.form, gt = new RegExp("^(" + Object.keys(Qe).join("|") + ")$"));
1113
+ const n = I({
1114
+ label: "is/native-disabled-supported",
1115
+ context: e
1116
+ }).nodeName.toLowerCase();
1117
+ return !!gt.test(n);
1118
+ }
1119
+ let Ye;
1120
+ function Ir(e) {
1121
+ return e.nodeName.toLowerCase() === "fieldset" && e.disabled;
1122
+ }
1123
+ function Mr(e) {
1124
+ return e.nodeName.toLowerCase() === "form" && e.disabled;
1125
+ }
1126
+ function _r(e) {
1127
+ Ye || (Ye = H());
1128
+ const t = I({
1129
+ label: "is/disabled",
1130
+ context: e
1131
+ });
1132
+ if (t.hasAttribute("data-ally-disabled"))
1133
+ return !0;
1134
+ if (!kt(t))
1135
+ return !1;
1136
+ if (t.disabled)
1137
+ return !0;
1138
+ const n = Ee({ context: t });
1139
+ return !!(n.some(Ir) || !Ye.focusFormDisabled && n.some(Mr));
1140
+ }
1141
+ function Fe({
1142
+ context: e,
1143
+ except: t = {
1144
+ onlyFocusableBrowsingContext: !1,
1145
+ visible: !1
1146
+ }
1147
+ } = {}) {
1148
+ const n = I({
1149
+ label: "is/only-tabbable",
1150
+ resolveDocument: !0,
1151
+ context: e
1152
+ });
1153
+ if (!t.visible && !Ke(n))
1154
+ return !1;
1155
+ if (!t.onlyFocusableBrowsingContext && (b.is.GECKO || b.is.TRIDENT || b.is.EDGE)) {
1156
+ const a = Ge(n);
1157
+ if (a && D(a) < 0)
1158
+ return !1;
1159
+ }
1160
+ const r = n.nodeName.toLowerCase(), i = D(n);
1161
+ return r === "label" && b.is.GECKO ? i !== null && i >= 0 : !!(b.is.GECKO && n.ownerSVGElement && !n.focus && r === "a" && n.hasAttribute("xlink:href") && b.is.GECKO);
1162
+ }
1163
+ Fe.except = function(e = {}) {
1164
+ const t = function(n) {
1165
+ return Fe({
1166
+ context: n,
1167
+ except: e
1168
+ });
1169
+ };
1170
+ return t.rules = Fe, t;
1171
+ };
1172
+ const Fr = Fe.except({});
1173
+ let R;
1174
+ function Lr(e) {
1175
+ const t = e.nodeName.toLowerCase();
1176
+ if (t === "embed" || t === "keygen")
1177
+ return !0;
1178
+ const n = D(e);
1179
+ if (e.shadowRoot && n === null)
1180
+ return !0;
1181
+ if (t === "label")
1182
+ return !R.focusLabelTabindex || n === null;
1183
+ if (t === "legend")
1184
+ return n === null;
1185
+ if (R.focusSvgFocusableAttribute && (e.ownerSVGElement || t === "svg")) {
1186
+ const r = e.getAttribute("focusable");
1187
+ return r && r === "false";
1188
+ }
1189
+ return t === "img" && e.hasAttribute("usemap") ? n === null || !R.focusImgUsemapTabindex : t === "area" ? !Nr(e) : !1;
1190
+ }
1191
+ function Le({
1192
+ context: e,
1193
+ except: t = {
1194
+ disabled: !1,
1195
+ visible: !1,
1196
+ onlyTabbable: !1
1197
+ }
1198
+ } = {}) {
1199
+ R || (R = H());
1200
+ const n = Fr.rules.except({
1201
+ onlyFocusableBrowsingContext: !0,
1202
+ visible: t.visible
1203
+ }), r = I({
1204
+ label: "is/focusable",
1205
+ resolveDocument: !0,
1206
+ context: e
1207
+ });
1208
+ if (!je.rules({
1209
+ context: r,
1210
+ except: t
1211
+ }) || Lr(r) || !t.disabled && _r(r) || !t.onlyTabbable && n(r))
1212
+ return !1;
1213
+ if (!t.visible) {
1214
+ const f = {
1215
+ context: r,
1216
+ except: {}
1217
+ };
1218
+ if (R.focusInHiddenIframe && (f.except.browsingContext = !0), R.focusObjectSvgHidden && r.nodeName.toLowerCase() === "object" && (f.except.cssVisibility = !0), !Ke.rules(f))
1219
+ return !1;
1220
+ }
1221
+ const a = Ge(r);
1222
+ return !(a && a.nodeName.toLowerCase() === "object" && !R.focusInZeroDimensionObject && (!a.offsetWidth || !a.offsetHeight) || r.nodeName.toLowerCase() === "svg" && R.focusSvgInIframe && !a && r.getAttribute("tabindex") === null);
1223
+ }
1224
+ Le.except = function(e = {}) {
1225
+ const t = function(n) {
1226
+ return Le({
1227
+ context: n,
1228
+ except: e
1229
+ });
1230
+ };
1231
+ return t.rules = Le, t;
1232
+ };
1233
+ const ut = Le.except({});
1234
+ function Bt(e) {
1235
+ const t = function(n) {
1236
+ return n.shadowRoot || e(n) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1237
+ };
1238
+ return t.acceptNode = t, t;
1239
+ }
1240
+ const Pr = Bt(je);
1241
+ function Dt({
1242
+ context: e,
1243
+ includeContext: t,
1244
+ includeOnlyTabbable: n,
1245
+ strategy: r
1246
+ } = {}) {
1247
+ e || (e = document.documentElement);
1248
+ const i = ut.rules.except({
1249
+ onlyTabbable: n
1250
+ }), l = Q(e).createTreeWalker(
1251
+ // root element to start search in
1252
+ e,
1253
+ // element type filter
1254
+ NodeFilter.SHOW_ELEMENT,
1255
+ // custom NodeFilter filter
1256
+ r === "all" ? Pr : Bt(i),
1257
+ // deprecated, but IE requires it
1258
+ !1
1259
+ );
1260
+ let f = [];
1261
+ for (; l.nextNode(); )
1262
+ l.currentNode.shadowRoot ? (i(l.currentNode) && f.push(l.currentNode), f = f.concat(Dt({
1263
+ context: l.currentNode.shadowRoot,
1264
+ includeOnlyTabbable: n,
1265
+ strategy: r
1266
+ }))) : f.push(l.currentNode);
1267
+ return t && (r === "all" ? je(e) && f.unshift(e) : i(e) && f.unshift(e)), f;
1268
+ }
1269
+ let X, ie;
1270
+ function kr() {
1271
+ return X || (X = H()), typeof ie == "string" || (ie = (X.focusTable ? "table, td," : "") + (X.focusFieldset ? "fieldset," : "") + "svg a,a[href],area[href],input, select, textarea, button,iframe, object, embed,keygen," + (X.focusAudioWithoutControls ? "audio," : "audio[controls],") + (X.focusVideoWithoutControls ? "video," : "video[controls],") + (X.focusSummary ? "summary," : "") + "[tabindex],[contenteditable]", ie = _t(ie)), ie;
1272
+ }
1273
+ function Br({
1274
+ context: e,
1275
+ includeContext: t,
1276
+ includeOnlyTabbable: n
1277
+ } = {}) {
1278
+ const r = kr(), i = e.querySelectorAll(r), a = ut.rules.except({
1279
+ onlyTabbable: n
1280
+ }), l = [].filter.call(i, a);
1281
+ return t && a(e) && l.unshift(e), l;
1282
+ }
1283
+ function rt({
1284
+ context: e,
1285
+ includeContext: t,
1286
+ includeOnlyTabbable: n,
1287
+ strategy: r = "quick"
1288
+ } = {}) {
1289
+ const a = {
1290
+ context: I({
1291
+ label: "query/focusable",
1292
+ resolveDocument: !0,
1293
+ defaultToDocument: !0,
1294
+ context: e
1295
+ }),
1296
+ includeContext: t,
1297
+ includeOnlyTabbable: n,
1298
+ strategy: r
1299
+ };
1300
+ if (r === "quick")
1301
+ return Br(a);
1302
+ if (r === "strict" || r === "all")
1303
+ return Dt(a);
1304
+ throw new TypeError('query/focusable requires option.strategy to be one of ["quick", "strict", "all"]');
1305
+ }
1306
+ function Ht({ element: e, attribute: t }) {
1307
+ const n = "data-cached-" + t;
1308
+ if (e.getAttribute(n) === null) {
1309
+ const i = e.getAttribute(t);
1310
+ if (i === null)
1311
+ return;
1312
+ e.setAttribute(n, i || ""), e.removeAttribute(t);
1313
+ } else {
1314
+ const i = e.getAttribute(n);
1315
+ e.removeAttribute(n), e.setAttribute(t, i);
1316
+ }
1317
+ }
1318
+ function ae({ element: e, attribute: t, temporaryValue: n, saveValue: r }) {
1319
+ const i = "data-cached-" + t;
1320
+ if (n !== void 0) {
1321
+ const a = r || e.getAttribute(t);
1322
+ e.setAttribute(i, a || ""), e.setAttribute(t, n);
1323
+ } else {
1324
+ const a = e.getAttribute(i);
1325
+ e.removeAttribute(i), a === "" ? e.removeAttribute(t) : e.setAttribute(t, a);
1326
+ }
1327
+ }
1328
+ const pe = function() {
1329
+ }, Dr = {
1330
+ log: pe,
1331
+ debug: pe,
1332
+ info: pe,
1333
+ warn: pe,
1334
+ error: pe
1335
+ }, Hr = typeof console < "u" ? console : Dr;
1336
+ let He;
1337
+ function Rr() {
1338
+ Hr.warn("trying to focus inert element", this);
1339
+ }
1340
+ function Wr(e, t) {
1341
+ if (t) {
1342
+ const n = D(e);
1343
+ ae({
1344
+ element: e,
1345
+ attribute: "tabindex",
1346
+ temporaryValue: "-1",
1347
+ saveValue: n !== null ? n : ""
1348
+ });
1349
+ } else
1350
+ ae({
1351
+ element: e,
1352
+ attribute: "tabindex"
1353
+ });
1354
+ }
1355
+ function jr(e, t) {
1356
+ Ht({
1357
+ element: e,
1358
+ attribute: "controls",
1359
+ remove: t
1360
+ });
1361
+ }
1362
+ function Gr(e, t) {
1363
+ ae({
1364
+ element: e,
1365
+ attribute: "focusable",
1366
+ temporaryValue: t ? "false" : void 0
1367
+ });
1368
+ }
1369
+ function Kr(e, t) {
1370
+ Ht({
1371
+ element: e,
1372
+ attribute: "xlink:href",
1373
+ remove: t
1374
+ });
1375
+ }
1376
+ function Vr(e, t) {
1377
+ ae({
1378
+ element: e,
1379
+ attribute: "aria-disabled",
1380
+ temporaryValue: t ? "true" : void 0
1381
+ });
1382
+ }
1383
+ function $r(e, t) {
1384
+ t ? e.focus = Rr : delete e.focus;
1385
+ }
1386
+ function qr(e, t) {
1387
+ if (t) {
1388
+ const n = e.style.pointerEvents || "";
1389
+ e.setAttribute("data-inert-pointer-events", n), e.style.pointerEvents = "none";
1390
+ } else {
1391
+ const n = e.getAttribute("data-inert-pointer-events");
1392
+ e.removeAttribute("data-inert-pointer-events"), e.style.pointerEvents = n;
1393
+ }
1394
+ }
1395
+ function Zr(e, t) {
1396
+ Vr(e, t), Wr(e, t), $r(e, t), qr(e, t);
1397
+ const n = e.nodeName.toLowerCase();
1398
+ (n === "video" || n === "audio") && jr(e, t), (n === "svg" || e.ownerSVGElement) && (He.focusSvgFocusableAttribute ? Gr(e, t) : !He.focusSvgTabindexAttribute && n === "a" && Kr(e, t)), t ? e.setAttribute("data-ally-disabled", "true") : e.removeAttribute("data-ally-disabled");
1399
+ }
1400
+ function ft(e, t) {
1401
+ He || (He = H());
1402
+ const n = I({
1403
+ label: "element/disabled",
1404
+ context: e
1405
+ });
1406
+ t = !!t;
1407
+ const r = n.hasAttribute("data-ally-disabled"), i = arguments.length === 1;
1408
+ return kt(n) ? i ? n.disabled : (n.disabled = t, n) : i ? r : (r === t || Zr(n, t), n);
1409
+ }
1410
+ const it = function(e) {
1411
+ return e.shadowRoot ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1412
+ };
1413
+ it.acceptNode = it;
1414
+ function ot({ context: e } = {}) {
1415
+ const t = I({
1416
+ label: "query/shadow-hosts",
1417
+ resolveDocument: !0,
1418
+ defaultToDocument: !0,
1419
+ context: e
1420
+ }), r = Q(e).createTreeWalker(
1421
+ // root element to start search in
1422
+ t,
1423
+ // element type filter
1424
+ NodeFilter.SHOW_ELEMENT,
1425
+ // custom NodeFilter filter
1426
+ it,
1427
+ // deprecated, but IE requires it
1428
+ !1
1429
+ );
1430
+ let i = [];
1431
+ for (t.shadowRoot && (i.push(t), i = i.concat(ot({
1432
+ context: t.shadowRoot
1433
+ }))); r.nextNode(); )
1434
+ i.push(r.currentNode), i = i.concat(ot({
1435
+ context: r.currentNode.shadowRoot
1436
+ }));
1437
+ return i;
1438
+ }
1439
+ const Ur = {
1440
+ childList: !0,
1441
+ subtree: !0
1442
+ };
1443
+ class Xr {
1444
+ constructor({ context: t, callback: n, config: r } = {}) {
1445
+ this.config = r, this.disengage = this.disengage.bind(this), this.clientObserver = new MutationObserver(n), this.hostObserver = new MutationObserver((i) => i.forEach(this.handleHostMutation, this)), this.observeContext(t), this.observeShadowHosts(t);
1446
+ }
1447
+ disengage() {
1448
+ this.clientObserver && this.clientObserver.disconnect(), this.clientObserver = null, this.hostObserver && this.hostObserver.disconnect(), this.hostObserver = null;
1449
+ }
1450
+ observeShadowHosts(t) {
1451
+ ot({
1452
+ context: t
1453
+ }).forEach((r) => this.observeContext(r.shadowRoot));
1454
+ }
1455
+ observeContext(t) {
1456
+ this.clientObserver.observe(t, this.config), this.hostObserver.observe(t, Ur);
1457
+ }
1458
+ handleHostMutation(t) {
1459
+ if (t.type !== "childList")
1460
+ return;
1461
+ F(t.addedNodes).filter((r) => r.nodeType === Node.ELEMENT_NODE).forEach(this.observeShadowHosts, this);
1462
+ }
1463
+ }
1464
+ function zr({
1465
+ context: e,
1466
+ callback: t,
1467
+ config: n
1468
+ } = {}) {
1469
+ if (typeof t != "function")
1470
+ throw new TypeError("observe/shadow-mutations requires options.callback to be a function");
1471
+ if (typeof n != "object")
1472
+ throw new TypeError("observe/shadow-mutations requires options.config to be an object");
1473
+ if (!window.MutationObserver)
1474
+ return {
1475
+ disengage: function() {
1476
+ }
1477
+ };
1478
+ const r = I({
1479
+ label: "observe/shadow-mutations",
1480
+ resolveDocument: !0,
1481
+ defaultToDocument: !0,
1482
+ context: e
1483
+ });
1484
+ return {
1485
+ disengage: new Xr({
1486
+ context: r,
1487
+ callback: t,
1488
+ config: n
1489
+ }).disengage
1490
+ };
1491
+ }
1492
+ function ye({ parent: e, element: t, includeSelf: n } = {}) {
1493
+ if (e)
1494
+ return function(i) {
1495
+ return !!(n && i === e || e.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_CONTAINED_BY);
1496
+ };
1497
+ if (t)
1498
+ return function(i) {
1499
+ return !!(n && t === i || i.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_CONTAINED_BY);
1500
+ };
1501
+ throw new TypeError("util/compare-position#getParentComparator required either options.parent or options.element");
1502
+ }
1503
+ function Jr(e) {
1504
+ return ft(e, !0);
1505
+ }
1506
+ function vt(e) {
1507
+ return ft(e, !1);
1508
+ }
1509
+ const Qr = {
1510
+ attributes: !0,
1511
+ childList: !0,
1512
+ subtree: !0,
1513
+ attributeFilter: ["tabindex", "disabled", "data-ally-disabled"]
1514
+ };
1515
+ class Yr {
1516
+ constructor({ context: t, filter: n } = {}) {
1517
+ this._context = F(t || document.documentElement)[0], this._filter = F(n), this._inertElementCache = [], this.disengage = this.disengage.bind(this), this.handleMutation = this.handleMutation.bind(this), this.renderInert = this.renderInert.bind(this), this.filterElements = this.filterElements.bind(this), this.filterParentElements = this.filterParentElements.bind(this);
1518
+ const r = rt({
1519
+ context: this._context,
1520
+ includeContext: !0,
1521
+ strategy: "all"
1522
+ });
1523
+ this.renderInert(r), this.shadowObserver = zr({
1524
+ context: this._context,
1525
+ config: Qr,
1526
+ callback: (i) => i.forEach(this.handleMutation)
1527
+ });
1528
+ }
1529
+ disengage() {
1530
+ this._context && (vt(this._context), this._inertElementCache.forEach((t) => vt(t)), this._inertElementCache = null, this._filter = null, this._context = null, this.shadowObserver && this.shadowObserver.disengage(), this.shadowObserver = null);
1531
+ }
1532
+ listQueryFocusable(t) {
1533
+ return t.map((n) => rt({ context: n, includeContext: !0, strategy: "all" })).reduce((n, r) => n.concat(r), []);
1534
+ }
1535
+ renderInert(t) {
1536
+ const n = (r) => {
1537
+ this._inertElementCache.push(r), Jr(r);
1538
+ };
1539
+ t.filter(this.filterElements).filter(this.filterParentElements).filter((r) => !ft(r)).forEach(n);
1540
+ }
1541
+ filterElements(t) {
1542
+ const n = ye({ element: t, includeSelf: !0 });
1543
+ return !this._filter.some(n);
1544
+ }
1545
+ filterParentElements(t) {
1546
+ const n = ye({ parent: t });
1547
+ return !this._filter.some(n);
1548
+ }
1549
+ handleMutation(t) {
1550
+ if (t.type === "childList") {
1551
+ const n = F(t.addedNodes).filter((i) => i.nodeType === Node.ELEMENT_NODE);
1552
+ if (!n.length)
1553
+ return;
1554
+ const r = this.listQueryFocusable(n);
1555
+ this.renderInert(r);
1556
+ } else
1557
+ t.type === "attributes" && this.renderInert([t.target]);
1558
+ }
1559
+ }
1560
+ function ei({ context: e, filter: t } = {}) {
1561
+ return { disengage: new Yr({ context: e, filter: t }).disengage };
1562
+ }
1563
+ function st({ context: e } = {}) {
1564
+ let t = I({
1565
+ label: "get/shadow-host",
1566
+ context: e
1567
+ }), n = null;
1568
+ for (; t; )
1569
+ n = t, t = t.parentNode;
1570
+ return n.nodeType === n.DOCUMENT_FRAGMENT_NODE && n.host ? n.host : null;
1571
+ }
1572
+ function xt(e) {
1573
+ const t = I({
1574
+ label: "is/active-element",
1575
+ resolveDocument: !0,
1576
+ context: e
1577
+ });
1578
+ if (Q(t).activeElement === t)
1579
+ return !0;
1580
+ const r = st({ context: t });
1581
+ return !!(r && r.shadowRoot.activeElement === t);
1582
+ }
1583
+ let oe;
1584
+ const ti = /^(fieldset|table|td|body)$/;
1585
+ function ve({
1586
+ context: e,
1587
+ except: t = {
1588
+ flexbox: !1,
1589
+ scrollable: !1,
1590
+ shadow: !1,
1591
+ visible: !1,
1592
+ onlyTabbable: !1
1593
+ }
1594
+ } = {}) {
1595
+ oe || (oe = H());
1596
+ const n = I({
1597
+ label: "is/tabbable",
1598
+ resolveDocument: !0,
1599
+ context: e
1600
+ });
1601
+ if (b.is.BLINK && b.is.ANDROID && b.majorVersion > 42)
1602
+ return !1;
1603
+ const r = Ge(n);
1604
+ if (r) {
1605
+ if (b.is.WEBKIT && b.is.IOS || D(r) < 0 || !t.visible && (b.is.BLINK || b.is.WEBKIT) && !Ke(r))
1606
+ return !1;
1607
+ if (r.nodeName.toLowerCase() === "object") {
1608
+ const y = b.name === "Chrome" && b.majorVersion >= 54 || b.name === "Opera" && b.majorVersion >= 41;
1609
+ if (b.is.WEBKIT || b.is.BLINK && !y)
1610
+ return !1;
1611
+ }
1612
+ }
1613
+ const i = n.nodeName.toLowerCase(), a = D(n), l = a === null ? null : a >= 0;
1614
+ if (b.is.EDGE && b.majorVersion >= 14 && r && n.ownerSVGElement && a < 0)
1615
+ return !0;
1616
+ const f = l !== !1, d = a !== null && a >= 0;
1617
+ if (n.hasAttribute("contenteditable"))
1618
+ return f;
1619
+ if (ti.test(i) && l !== !0)
1620
+ return !1;
1621
+ if (b.is.WEBKIT && b.is.IOS) {
1622
+ let h = i === "input" && n.type === "text" || n.type === "password" || i === "select" || i === "textarea" || n.hasAttribute("contenteditable");
1623
+ if (!h) {
1624
+ const y = window.getComputedStyle(n, null);
1625
+ h = tt(y);
1626
+ }
1627
+ if (!h)
1628
+ return !1;
1629
+ }
1630
+ if (i === "use" && a !== null && (b.is.BLINK || b.is.WEBKIT && b.majorVersion === 9) || St(n, "svg a") && n.hasAttribute("xlink:href") && (f || n.focus && !oe.focusSvgNegativeTabindexAttribute) || i === "svg" && oe.focusSvgInIframe && f)
1631
+ return !0;
1632
+ if (b.is.TRIDENT || b.is.EDGE) {
1633
+ if (i === "svg")
1634
+ return oe.focusSvg ? !0 : n.hasAttribute("focusable") || d;
1635
+ if (n.ownerSVGElement)
1636
+ return oe.focusSvgTabindexAttribute && d ? !0 : n.hasAttribute("focusable");
1637
+ }
1638
+ if (n.tabIndex === void 0)
1639
+ return !!t.onlyTabbable;
1640
+ if (i === "audio")
1641
+ if (n.hasAttribute("controls")) {
1642
+ if (b.is.BLINK)
1643
+ return !0;
1644
+ } else
1645
+ return !1;
1646
+ if (i === "video") {
1647
+ if (n.hasAttribute("controls")) {
1648
+ if (b.is.BLINK || b.is.GECKO)
1649
+ return !0;
1650
+ } else if (b.is.TRIDENT || b.is.EDGE)
1651
+ return !1;
1652
+ }
1653
+ if (i === "object" && (b.is.BLINK || b.is.WEBKIT) || i === "iframe")
1654
+ return !1;
1655
+ if (!t.scrollable && b.is.GECKO) {
1656
+ const h = window.getComputedStyle(n, null);
1657
+ if (ct(h))
1658
+ return f;
1659
+ }
1660
+ if (b.is.TRIDENT || b.is.EDGE) {
1661
+ if (i === "area") {
1662
+ const O = Pt(n);
1663
+ if (O && D(O) < 0)
1664
+ return !1;
1665
+ }
1666
+ const h = window.getComputedStyle(n, null);
1667
+ if (tt(h))
1668
+ return n.tabIndex >= 0;
1669
+ if (!t.flexbox && Be(h))
1670
+ return a !== null ? d : ni(n) && ri(n);
1671
+ if (De(n, i))
1672
+ return !1;
1673
+ const y = n.parentElement;
1674
+ if (y) {
1675
+ const O = y.nodeName.toLowerCase(), S = window.getComputedStyle(y, null);
1676
+ if (De(y, i, O, S))
1677
+ return !1;
1678
+ if (Be(S))
1679
+ return d;
1680
+ }
1681
+ }
1682
+ return n.tabIndex >= 0;
1683
+ }
1684
+ ve.except = function(e = {}) {
1685
+ const t = function(n) {
1686
+ return ve({
1687
+ context: n,
1688
+ except: e
1689
+ });
1690
+ };
1691
+ return t.rules = ve, t;
1692
+ };
1693
+ const ni = je.rules.except({ flexbox: !0 }), ri = ve.except({ flexbox: !0 }), ii = ve.except({});
1694
+ function dt({
1695
+ context: e,
1696
+ includeContext: t,
1697
+ includeOnlyTabbable: n,
1698
+ strategy: r
1699
+ } = {}) {
1700
+ const i = ii.rules.except({
1701
+ onlyTabbable: n
1702
+ });
1703
+ return rt({
1704
+ context: e,
1705
+ includeContext: t,
1706
+ includeOnlyTabbable: n,
1707
+ strategy: r
1708
+ }).filter(i);
1709
+ }
1710
+ function oi(e, t) {
1711
+ return e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
1712
+ }
1713
+ function si(e) {
1714
+ return e.sort(oi);
1715
+ }
1716
+ function ai(e, t) {
1717
+ return xe(e, function(n) {
1718
+ return t.compareDocumentPosition(n) & Node.DOCUMENT_POSITION_FOLLOWING;
1719
+ });
1720
+ }
1721
+ function li(e, t, n) {
1722
+ const r = [];
1723
+ return t.forEach(function(i) {
1724
+ let a = !0, l = e.indexOf(i);
1725
+ l === -1 && (l = ai(e, i), a = !1), l === -1 && (l = e.length);
1726
+ const f = F(n ? n(i) : i);
1727
+ f.length && r.push({
1728
+ offset: l,
1729
+ replace: a,
1730
+ elements: f
1731
+ });
1732
+ }), r;
1733
+ }
1734
+ function ci(e, t) {
1735
+ let n = 0;
1736
+ t.sort((r, i) => r.offset - i.offset), t.forEach(function(r) {
1737
+ const i = r.replace ? 1 : 0, a = [r.offset + n, i].concat(r.elements);
1738
+ e.splice.apply(e, a), n += r.elements.length - i;
1739
+ });
1740
+ }
1741
+ function Pe({ list: e, elements: t, resolveElement: n } = {}) {
1742
+ const r = e.slice(0), i = F(t).slice(0);
1743
+ si(i);
1744
+ const a = li(r, i, n);
1745
+ return ci(r, a), r;
1746
+ }
1747
+ class ui {
1748
+ constructor(t) {
1749
+ this._document = Q(t), this.maps = {};
1750
+ }
1751
+ getAreasFor(t) {
1752
+ return this.maps[t] || this.addMapByName(t), this.maps[t];
1753
+ }
1754
+ addMapByName(t) {
1755
+ const n = Or(t, this._document);
1756
+ n && (this.maps[n.name] = dt({ context: n }));
1757
+ }
1758
+ extractAreasFromList(t) {
1759
+ return t.filter(function(n) {
1760
+ if (n.nodeName.toLowerCase() !== "area")
1761
+ return !0;
1762
+ const i = n.parentNode;
1763
+ return this.maps[i.name] || (this.maps[i.name] = []), this.maps[i.name].push(n), !1;
1764
+ }, this);
1765
+ }
1766
+ }
1767
+ function fi(e, t) {
1768
+ const n = t.querySelectorAll("img[usemap]"), r = new ui(t), i = r.extractAreasFromList(e);
1769
+ return n.length ? Pe({
1770
+ list: i,
1771
+ elements: n,
1772
+ resolveElement: function(a) {
1773
+ const l = a.getAttribute("usemap").slice(1);
1774
+ return r.getAreasFor(l);
1775
+ }
1776
+ }) : i;
1777
+ }
1778
+ class di {
1779
+ constructor(t, n) {
1780
+ this.context = t, this.sortElements = n, this.hostCounter = 1, this.inHost = {}, this.inDocument = [], this.hosts = {}, this.elements = {};
1781
+ }
1782
+ // remember which hosts we have to sort within later
1783
+ _registerHost(t) {
1784
+ if (t._sortingId)
1785
+ return;
1786
+ t._sortingId = "shadow-" + this.hostCounter++, this.hosts[t._sortingId] = t;
1787
+ const n = st({ context: t });
1788
+ n ? (this._registerHost(n), this._registerHostParent(t, n)) : this.inDocument.push(t);
1789
+ }
1790
+ // remember which host is the child of which other host
1791
+ _registerHostParent(t, n) {
1792
+ this.inHost[n._sortingId] || (this.inHost[n._sortingId] = []), this.inHost[n._sortingId].push(t);
1793
+ }
1794
+ // remember which elements a host contains
1795
+ _registerElement(t, n) {
1796
+ this.elements[n._sortingId] || (this.elements[n._sortingId] = []), this.elements[n._sortingId].push(t);
1797
+ }
1798
+ // remove shadowed elements from the sequence and register
1799
+ // the ShadowHosts they belong to so we know what to sort
1800
+ // later on
1801
+ extractElements(t) {
1802
+ return t.filter(function(n) {
1803
+ const r = st({ context: n });
1804
+ return r ? (this._registerHost(r), this._registerElement(n, r), !1) : !0;
1805
+ }, this);
1806
+ }
1807
+ // inject hosts into the sequence, sort everything,
1808
+ // and recoursively replace hosts by its descendants
1809
+ sort(t) {
1810
+ let n = this._injectHosts(t);
1811
+ return n = this._replaceHosts(n), this._cleanup(), n;
1812
+ }
1813
+ // merge ShadowHosts into the element lists of other ShadowHosts
1814
+ // or the document, then sort the individual lists
1815
+ _injectHosts(t) {
1816
+ return Object.keys(this.hosts).forEach(function(n) {
1817
+ const r = this.elements[n], i = this.inHost[n], a = this.hosts[n].shadowRoot;
1818
+ this.elements[n] = this._merge(r, i, a);
1819
+ }, this), this._merge(t, this.inDocument, this.context);
1820
+ }
1821
+ _merge(t, n, r) {
1822
+ const i = Pe({
1823
+ list: t,
1824
+ elements: n
1825
+ });
1826
+ return this.sortElements(i, r);
1827
+ }
1828
+ _replaceHosts(t) {
1829
+ return Pe({
1830
+ list: t,
1831
+ elements: this.inDocument,
1832
+ resolveElement: this._resolveHostElement.bind(this)
1833
+ });
1834
+ }
1835
+ _resolveHostElement(t) {
1836
+ const n = Pe({
1837
+ list: this.elements[t._sortingId],
1838
+ elements: this.inHost[t._sortingId],
1839
+ resolveElement: this._resolveHostElement.bind(this)
1840
+ }), r = D(t);
1841
+ return r !== null && r > -1 ? [t].concat(n) : n;
1842
+ }
1843
+ _cleanup() {
1844
+ Object.keys(this.hosts).forEach(function(t) {
1845
+ delete this.hosts[t]._sortingId;
1846
+ }, this);
1847
+ }
1848
+ }
1849
+ function bi(e, t, n) {
1850
+ const r = new di(t, n), i = r.extractElements(e);
1851
+ return i.length === e.length ? n(e) : r.sort(i);
1852
+ }
1853
+ function mi(e) {
1854
+ const t = {}, n = [], r = e.filter(function(a) {
1855
+ let l = a.tabIndex;
1856
+ return l === void 0 && (l = D(a)), l <= 0 || l === null || l === void 0 ? !0 : (t[l] || (t[l] = [], n.push(l)), t[l].push(a), !1);
1857
+ });
1858
+ return n.sort().map(function(a) {
1859
+ return t[a];
1860
+ }).reduceRight(function(a, l) {
1861
+ return l.concat(a);
1862
+ }, r);
1863
+ }
1864
+ let at;
1865
+ function hi(e, t) {
1866
+ const n = e.indexOf(t);
1867
+ return n > 0 ? e.splice(n, 1).concat(e) : e;
1868
+ }
1869
+ function yt(e, t) {
1870
+ return at.tabsequenceAreaAtImgPosition && (e = fi(e, t)), e = mi(e), e;
1871
+ }
1872
+ function Et({
1873
+ context: e,
1874
+ includeContext: t,
1875
+ includeOnlyTabbable: n,
1876
+ strategy: r
1877
+ } = {}) {
1878
+ at || (at = H());
1879
+ const i = F(e)[0] || document.documentElement;
1880
+ let a = dt({
1881
+ context: i,
1882
+ includeContext: t,
1883
+ includeOnlyTabbable: n,
1884
+ strategy: r
1885
+ });
1886
+ return document.body.createShadowRoot && b.is.BLINK ? a = bi(a, i, yt) : a = yt(a, i), t && (a = hi(a, i)), a;
1887
+ }
1888
+ const J = {
1889
+ // Element Focus
1890
+ tab: 9,
1891
+ // Navigation
1892
+ left: 37,
1893
+ up: 38,
1894
+ right: 39,
1895
+ down: 40,
1896
+ pageUp: 33,
1897
+ "page-up": 33,
1898
+ pageDown: 34,
1899
+ "page-down": 34,
1900
+ end: 35,
1901
+ home: 36,
1902
+ // Action
1903
+ enter: 13,
1904
+ escape: 27,
1905
+ space: 32,
1906
+ // Modifier
1907
+ shift: 16,
1908
+ capsLock: 20,
1909
+ "caps-lock": 20,
1910
+ ctrl: 17,
1911
+ alt: 18,
1912
+ meta: 91,
1913
+ // in firefox: 224
1914
+ // on mac (chrome): meta-left=91, meta-right=93
1915
+ // on win (IE11): meta-left=91, meta-right=92
1916
+ pause: 19,
1917
+ // Content Manipulation
1918
+ insert: 45,
1919
+ delete: 46,
1920
+ backspace: 8,
1921
+ // the same logical key may be identified through different keyCodes
1922
+ _alias: {
1923
+ 91: [92, 93, 224]
1924
+ }
1925
+ };
1926
+ for (let e = 1; e < 26; e++)
1927
+ J["f" + e] = e + 111;
1928
+ for (let e = 0; e < 10; e++) {
1929
+ const t = e + 48, n = e + 96;
1930
+ J[e] = t, J["num-" + e] = n, J._alias[t] = [n];
1931
+ }
1932
+ for (let e = 0; e < 26; e++) {
1933
+ const t = e + 65, n = String.fromCharCode(t).toLowerCase();
1934
+ J[n] = t;
1935
+ }
1936
+ const lt = {
1937
+ alt: "altKey",
1938
+ ctrl: "ctrlKey",
1939
+ meta: "metaKey",
1940
+ shift: "shiftKey"
1941
+ }, pi = Object.keys(lt).map((e) => lt[e]);
1942
+ function gi(e) {
1943
+ const t = e ? null : !1;
1944
+ return {
1945
+ altKey: t,
1946
+ ctrlKey: t,
1947
+ metaKey: t,
1948
+ shiftKey: t
1949
+ };
1950
+ }
1951
+ function vi(e) {
1952
+ const t = e.indexOf("*") !== -1, n = gi(t);
1953
+ return e.forEach(function(r) {
1954
+ if (r === "*")
1955
+ return;
1956
+ let i = !0;
1957
+ const a = r.slice(0, 1);
1958
+ a === "?" ? i = null : a === "!" && (i = !1), i !== !0 && (r = r.slice(1));
1959
+ const l = lt[r];
1960
+ if (!l)
1961
+ throw new TypeError('Unknown modifier "' + r + '"');
1962
+ n[l] = i;
1963
+ }), n;
1964
+ }
1965
+ function xi(e) {
1966
+ const t = J[e] || parseInt(e, 10);
1967
+ if (!t || typeof t != "number" || isNaN(t))
1968
+ throw new TypeError('Unknown key "' + e + '"');
1969
+ return [t].concat(J._alias[t] || []);
1970
+ }
1971
+ function yi(e, t) {
1972
+ return !pi.some(function(n) {
1973
+ return typeof e[n] == "boolean" && !!t[n] !== e[n];
1974
+ });
1975
+ }
1976
+ function Ei(e) {
1977
+ return e.split(/\s+/).map(function(t) {
1978
+ const n = t.split("+"), r = vi(n.slice(0, -1));
1979
+ return {
1980
+ keyCodes: xi(n.slice(-1)),
1981
+ modifiers: r,
1982
+ matchModifiers: yi.bind(null, r)
1983
+ };
1984
+ });
1985
+ }
1986
+ function Rt(e = {}) {
1987
+ const t = {}, n = F(e.context)[0] || document.documentElement;
1988
+ delete e.context;
1989
+ const r = F(e.filter);
1990
+ delete e.filter;
1991
+ const i = Object.keys(e);
1992
+ if (!i.length)
1993
+ throw new TypeError("when/key requires at least one option key");
1994
+ const a = function(d) {
1995
+ d.keyCodes.forEach(function(h) {
1996
+ t[h] || (t[h] = []), t[h].push(d);
1997
+ });
1998
+ };
1999
+ i.forEach(function(d) {
2000
+ if (typeof e[d] != "function")
2001
+ throw new TypeError('when/key requires option["' + d + '"] to be a function');
2002
+ const h = function(y) {
2003
+ return y.callback = e[d], y;
2004
+ };
2005
+ Ei(d).map(h).forEach(a);
2006
+ });
2007
+ const l = function(d) {
2008
+ if (d.defaultPrevented)
2009
+ return;
2010
+ if (r.length) {
2011
+ const y = ye({ element: d.target, includeSelf: !0 });
2012
+ if (r.some(y))
2013
+ return;
2014
+ }
2015
+ const h = d.keyCode || d.which;
2016
+ t[h] && t[h].forEach(function(y) {
2017
+ y.matchModifiers(d) && y.callback.call(n, d, f);
2018
+ });
2019
+ };
2020
+ n.addEventListener("keydown", l, !1);
2021
+ const f = function() {
2022
+ n.removeEventListener("keydown", l, !1);
2023
+ };
2024
+ return { disengage: f };
2025
+ }
2026
+ function wi({ context: e } = {}) {
2027
+ return e || (e = document.documentElement), Et(), Rt({
2028
+ // Safari on OSX may require ALT+TAB to reach links,
2029
+ // see https://github.com/medialize/ally.js/issues/146
2030
+ "?alt+?shift+tab": function(t) {
2031
+ t.preventDefault();
2032
+ const n = Et({
2033
+ context: e
2034
+ }), r = t.shiftKey, i = n[0], a = n[n.length - 1], l = r ? i : a, f = r ? a : i;
2035
+ if (xt(l)) {
2036
+ f.focus();
2037
+ return;
2038
+ }
2039
+ let d;
2040
+ if (!n.some(function(O, S) {
2041
+ return xt(O) ? (d = S, !0) : !1;
2042
+ })) {
2043
+ i.focus();
2044
+ return;
2045
+ }
2046
+ n[d + (r ? -1 : 1)].focus();
2047
+ }
2048
+ });
2049
+ }
2050
+ function Si({ context: e, filter: t }) {
2051
+ const n = function(f) {
2052
+ const d = ye({ parent: f });
2053
+ return t.some(d);
2054
+ }, r = [], i = function(f) {
2055
+ return t.some((d) => f === d) ? NodeFilter.FILTER_REJECT : n(f) ? NodeFilter.FILTER_ACCEPT : (r.push(f), NodeFilter.FILTER_REJECT);
2056
+ };
2057
+ i.acceptNode = i;
2058
+ const l = Q(e).createTreeWalker(
2059
+ // root element to start search in
2060
+ e,
2061
+ // element type filter
2062
+ NodeFilter.SHOW_ELEMENT,
2063
+ // custom NodeFilter filter
2064
+ i,
2065
+ // deprecated, but IE requires it
2066
+ !1
2067
+ );
2068
+ for (; l.nextNode(); )
2069
+ ;
2070
+ return r;
2071
+ }
2072
+ function Ti({ context: e, filter: t } = {}) {
2073
+ if (e = I({
2074
+ label: "get/insignificant-branches",
2075
+ defaultToDocument: !0,
2076
+ context: e
2077
+ }), t = F(t), !t.length)
2078
+ throw new TypeError("get/insignificant-branches requires valid options.filter");
2079
+ return Si({
2080
+ context: e,
2081
+ filter: t
2082
+ });
2083
+ }
2084
+ function wt(e) {
2085
+ ae({
2086
+ element: e,
2087
+ attribute: "aria-hidden",
2088
+ temporaryValue: "true"
2089
+ });
2090
+ }
2091
+ function Ci(e) {
2092
+ ae({
2093
+ element: e,
2094
+ attribute: "aria-hidden"
2095
+ });
2096
+ }
2097
+ const Ai = {
2098
+ attributes: !1,
2099
+ childList: !0,
2100
+ subtree: !0
2101
+ };
2102
+ class Oi {
2103
+ constructor({ context: t, filter: n } = {}) {
2104
+ this._context = F(t || document.documentElement)[0], this._filter = F(n), this.disengage = this.disengage.bind(this), this.handleMutation = this.handleMutation.bind(this), this.isInsignificantBranch = this.isInsignificantBranch.bind(this), Ti({ context: this._context, filter: this._filter }).forEach(wt), this.startObserver();
2105
+ }
2106
+ disengage() {
2107
+ this._context && ([].forEach.call(this._context.querySelectorAll("[data-cached-aria-hidden]"), Ci), this._context = null, this._filter = null, this._observer && this._observer.disconnect(), this._observer = null);
2108
+ }
2109
+ startObserver() {
2110
+ window.MutationObserver && (this._observer = new MutationObserver((t) => t.forEach(this.handleMutation)), this._observer.observe(this._context, Ai));
2111
+ }
2112
+ handleMutation(t) {
2113
+ t.type === "childList" && F(t.addedNodes).filter((n) => n.nodeType === Node.ELEMENT_NODE).filter(this.isInsignificantBranch).forEach(wt);
2114
+ }
2115
+ isInsignificantBranch(t) {
2116
+ if (Ee({ context: t }).some((i) => i.getAttribute("aria-hidden") === "true"))
2117
+ return !1;
2118
+ const r = ye({ element: t });
2119
+ return !this._filter.some(r);
2120
+ }
2121
+ }
2122
+ function Ni({ context: e, filter: t } = {}) {
2123
+ return { disengage: new Oi({ context: e, filter: t }).disengage };
2124
+ }
2125
+ function Ii(e) {
2126
+ return e.hasAttribute("autofocus");
2127
+ }
2128
+ function Mi(e) {
2129
+ return e.tabIndex <= 0;
2130
+ }
2131
+ function _i({
2132
+ context: e,
2133
+ sequence: t,
2134
+ strategy: n,
2135
+ ignoreAutofocus: r,
2136
+ defaultToContext: i,
2137
+ includeOnlyTabbable: a
2138
+ } = {}) {
2139
+ let l = -1;
2140
+ t || (e = F(e || document.body)[0], t = dt({
2141
+ context: e,
2142
+ includeOnlyTabbable: a,
2143
+ strategy: n
2144
+ })), t.length && !r && (l = xe(t, Ii)), t.length && l === -1 && (l = xe(t, Mi));
2145
+ const f = ut.rules.except({
2146
+ onlyTabbable: a
2147
+ });
2148
+ return l === -1 && i && e && f(e) ? e : t[l] || null;
2149
+ }
2150
+ const Wt = Yt(!1), z = Re(({
2151
+ children: e,
2152
+ size: t,
2153
+ show: n,
2154
+ backdrop: r = "static",
2155
+ onHide: i = "none",
2156
+ backdropClassName: a = "",
2157
+ dialogClassName: l = "",
2158
+ contentClassName: f = "",
2159
+ placement: d = "start",
2160
+ id: h,
2161
+ ...y
2162
+ }, O) => {
2163
+ const [S, ue] = Z(!1), [fe, Ve] = Z(void 0), [$e, Y] = Z(void 0), [ee, j] = Z(void 0), [we, G] = Z(void 0), [K, Se] = Z(void 0), [te, de] = Z(!1), s = typeof n == "boolean" && typeof i == "function" ? void 0 : { show: typeof n == "boolean", onHide: typeof i == "function" };
2164
+ s && console.error(
2165
+ s.show ? null : "The variable 'show' must be used and must be a boolean used to decide when to show the offCanvas!",
2166
+ s.onHide ? null : "The variable 'onHide' must be used and must be a function which is used to set 'show' as the offCanvas gets closed!"
2167
+ ), Xe(() => {
2168
+ let A = document.body;
2169
+ n && !S ? (console.log("if 1"), p(A)) : !n && S ? (console.log("if 2"), g()) : n && S && (console.log("if 3"), document.getElementsByClassName("sg-offCanvas-content")[0].classList.add("sg-slide-in"));
2170
+ }, [n, S]);
2171
+ const p = (A) => {
2172
+ A.classList.add("sg-offCanvas-open"), ue(n);
2173
+ }, g = () => {
2174
+ document.getElementById("sg-offCanvas-backdrop").classList.add("fadeOut"), document.getElementById("sg-offCanvas").classList.add("fadeOut"), document.getElementsByClassName("sg-offCanvas-content")[0].classList.remove("sg-slide-in"), !te && i != "none" ? i() : de(!1);
2175
+ };
2176
+ Xe(() => {
2177
+ let A = document.getElementById("sg-offCanvas");
2178
+ const k = () => {
2179
+ g();
2180
+ };
2181
+ if (A != null && S) {
2182
+ Ve(ei({
2183
+ filter: A
2184
+ })), Y(wi({
2185
+ context: A
2186
+ })), j(Rt({
2187
+ escape: k
2188
+ }));
2189
+ let Ze = _i({
2190
+ context: A,
2191
+ defaultToContext: !0
2192
+ });
2193
+ G(document.activeElement), Ze.focus(), Se(Ni({
2194
+ filter: A
2195
+ }));
2196
+ }
2197
+ fe && !S && (fe.disengage(), $e.disengage(), ee.disengage(), we.focus(), K.disengage());
2198
+ }, [S]), Xe(() => (document.addEventListener("animationend", (A) => {
2199
+ A.animationName === "fadeOut" && (n || (ue(!1), document.body.classList.remove("sg-offCanvas-open")));
2200
+ }), document.addEventListener("click", (A) => {
2201
+ A.target.id === "sg-offCanvas" && N();
2202
+ }), function() {
2203
+ document.removeEventListener("animationend", (k) => {
2204
+ console.log(k);
2205
+ }), document.removeEventListener("click", N);
2206
+ }), []);
2207
+ const N = (A) => {
2208
+ if ((r === "static" || r === !0) && r != null) {
2209
+ let k = document.getElementsByClassName("sg-offCanvas-content")[0];
2210
+ k.classList.add("sg-offCanvas-static"), setTimeout(() => {
2211
+ k.classList.remove("sg-offCanvas-static");
2212
+ }, "200");
2213
+ return;
2214
+ }
2215
+ g();
2216
+ }, ne = (A) => {
2217
+ switch (A) {
2218
+ case "start":
2219
+ return "sg-offcanvas-start";
2220
+ case "end":
2221
+ return "sg-offcanvas-end";
2222
+ case "top":
2223
+ return "sg-offcanvas-top";
2224
+ case "bottom":
2225
+ return "sg-offcanvas-bottom";
2226
+ }
2227
+ }, qe = en(() => ({
2228
+ onHide: g,
2229
+ setCloseButtonClicked: de
2230
+ }));
2231
+ return S ? nn(
2232
+ /* @__PURE__ */ Ie(ht, { children: [
2233
+ /* @__PURE__ */ P("div", { id: "sg-offCanvas-backdrop", className: `fadeIn sg-offCanvas-backdrop${a === "" ? "" : " " + a}` }),
2234
+ /* @__PURE__ */ P("div", { id: "sg-offCanvas", className: "fadeIn sg-offCanvas", tabIndex: "-1", children: /* @__PURE__ */ P("div", { role: "dialog", className: `sg-offCanvas-dialog${l === "" ? "" : " " + l}`, ...y, children: /* @__PURE__ */ P("div", { ref: O, className: `sg-offCanvas-content${f === "" ? "" : " " + f} ${ne(d)}`, children: /* @__PURE__ */ P(Wt.Provider, { value: qe, children: s ? /* @__PURE__ */ Ie(ht, { children: [
2235
+ /* @__PURE__ */ P(z.Header, { closeButton: !0, children: /* @__PURE__ */ P(z.Title, { children: "An Error ocurred!" }) }),
2236
+ /* @__PURE__ */ P(z.Body, { children: /* @__PURE__ */ Ie("p", { children: [
2237
+ s.show ? null : "The variable 'show' must be used and must be a boolean used to decide when to show the offCanvas!",
2238
+ s.onHide ? null : "The variable 'onHide' must be used and must be a function which is used to set 'show' as the offCanvas gets closed!"
2239
+ ] }) }),
2240
+ /* @__PURE__ */ P(z.Footer, { children: /* @__PURE__ */ P(on, { variant: "danger", type: "button", onClick: g, children: "Close" }) })
2241
+ ] }) : e }) }) }) })
2242
+ ] }),
2243
+ document.body
2244
+ ) : null;
2245
+ }), Fi = Re(({ as: e, className: t = "", children: n, closeButton: r = !1, onClick: i = "none", ...a }, l) => {
2246
+ let d = ["div", "span", "h1", "h2", "h3", "h4", "h5", "h6"].find((S) => S === e) ? e : "div";
2247
+ const { onHide: h, setCloseButtonClicked: y } = tn(Wt), O = (S) => {
2248
+ if (i != "none") {
2249
+ i(S), y(!0);
2250
+ return;
2251
+ }
2252
+ h(S);
2253
+ };
2254
+ return /* @__PURE__ */ Ie(d, { ref: l, className: `sg-offCanvas-header ${t}`, ...a, children: [
2255
+ n,
2256
+ r ? /* @__PURE__ */ P(rn, { variant: !0, onClick: O }) : null
2257
+ ] });
2258
+ });
2259
+ z.Header = Fi;
2260
+ const Li = ({ children: e, className: t, ...n }, r) => /* @__PURE__ */ P("div", { ref: r, className: `sg-offCanvas-body ${t}`, ...n, children: e });
2261
+ z.Body = Re(Li);
2262
+ const Pi = ({ children: e, className: t, ...n }, r) => /* @__PURE__ */ P("h4", { ref: r, className: `sg-offCanvas-title ${t}`, ...n, children: e });
2263
+ z.Title = Re(Pi);
2264
+ export {
2265
+ z as default
2266
+ };