@utahdts/utah-design-system-header 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/utah-design-system-header.es.js +1006 -1240
- package/dist/utah-design-system-header.umd.js +60 -38
- package/package.json +4 -5
- package/src/css/_footer.scss +1 -0
- package/src/css/_logos.scss +1 -5
- package/src/css/index.scss +1 -1
- package/src/css/build/utah-design-system-header.css +0 -5452
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const En = "@utahdts/utah-design-system-header", bn = "0.7.0", gn = "Utah Header for the Utah Design System", In = {
|
|
2
2
|
".": {
|
|
3
3
|
"development-local": "./src/index.js",
|
|
4
4
|
development: "./dist/utah-design-system-header.es.js",
|
|
@@ -13,51 +13,50 @@ const hn = "@utahdts/utah-design-system-header", _n = "0.6.0", mn = "Utah Header
|
|
|
13
13
|
},
|
|
14
14
|
"./css": "./dist/style.css",
|
|
15
15
|
"./src/css/index.scss": "./src/css/index.scss"
|
|
16
|
-
},
|
|
16
|
+
}, Tn = "./src/index.js", wn = [
|
|
17
17
|
"src/css",
|
|
18
18
|
"dist"
|
|
19
|
-
],
|
|
19
|
+
], Mn = {
|
|
20
20
|
build: "vite build",
|
|
21
21
|
preview: "vite preview",
|
|
22
22
|
publishHeader: "npm publish --access public",
|
|
23
|
-
"sass-build": "sass --no-source-map ./src/css/index.scss ./src/css/build/utah-design-system-header.css",
|
|
24
23
|
"test-publish": "npm publish --dry-run",
|
|
25
24
|
test: "vitest",
|
|
26
25
|
testc: "vitest run --coverage",
|
|
27
26
|
watch: "vite build --watch"
|
|
28
|
-
},
|
|
27
|
+
}, An = {
|
|
29
28
|
type: "git",
|
|
30
29
|
url: "git+https://github.com/utahdts/utah-design-system.git"
|
|
31
|
-
},
|
|
30
|
+
}, On = "Apache-2.0", yn = {
|
|
32
31
|
url: "https://github.com/utahdts/utah-design-system/issues"
|
|
33
|
-
},
|
|
32
|
+
}, Ln = "https://github.com/utahdts/utah-design-system#readme", Pn = {
|
|
34
33
|
"@popperjs/core": "2.11.7"
|
|
35
|
-
},
|
|
36
|
-
eslint: "8.
|
|
34
|
+
}, Nn = {
|
|
35
|
+
eslint: "8.39.0",
|
|
37
36
|
"eslint-config-airbnb": "19.0.4",
|
|
38
37
|
"eslint-plugin-import": "2.27.5",
|
|
39
38
|
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
40
|
-
sass: "1.62.
|
|
41
|
-
vite: "4.
|
|
39
|
+
sass: "1.62.1",
|
|
40
|
+
vite: "4.3.4",
|
|
42
41
|
"vite-plugin-eslint": "1.8.1",
|
|
43
42
|
vitest: "0.30.1"
|
|
44
|
-
},
|
|
45
|
-
name:
|
|
46
|
-
version:
|
|
47
|
-
description:
|
|
48
|
-
exports:
|
|
49
|
-
main:
|
|
50
|
-
files:
|
|
51
|
-
scripts:
|
|
52
|
-
repository:
|
|
53
|
-
license:
|
|
54
|
-
bugs:
|
|
55
|
-
homepage:
|
|
56
|
-
dependencies:
|
|
57
|
-
devDependencies:
|
|
58
|
-
type:
|
|
43
|
+
}, Sn = "module", Un = {
|
|
44
|
+
name: En,
|
|
45
|
+
version: bn,
|
|
46
|
+
description: gn,
|
|
47
|
+
exports: In,
|
|
48
|
+
main: Tn,
|
|
49
|
+
files: wn,
|
|
50
|
+
scripts: Mn,
|
|
51
|
+
repository: An,
|
|
52
|
+
license: On,
|
|
53
|
+
bugs: yn,
|
|
54
|
+
homepage: Ln,
|
|
55
|
+
dependencies: Pn,
|
|
56
|
+
devDependencies: Nn,
|
|
57
|
+
type: Sn
|
|
59
58
|
};
|
|
60
|
-
const
|
|
59
|
+
const $ = {
|
|
61
60
|
FLYOUT: (
|
|
62
61
|
/** @type {ChildrenMenuType} */
|
|
63
62
|
"flyout"
|
|
@@ -70,7 +69,7 @@ const W = {
|
|
|
70
69
|
/** @type {ChildrenMenuType} */
|
|
71
70
|
"mega-menu"
|
|
72
71
|
)
|
|
73
|
-
},
|
|
72
|
+
}, Gt = {
|
|
74
73
|
// Fired when the utah header is first loaded (setUtahHeaderSettings does not trigger this)
|
|
75
74
|
HEADER_LOADED: (
|
|
76
75
|
/** @type {Events} */
|
|
@@ -81,7 +80,7 @@ const W = {
|
|
|
81
80
|
/** @type {Events} */
|
|
82
81
|
"utahHeaderUnloaded"
|
|
83
82
|
)
|
|
84
|
-
},
|
|
83
|
+
}, Ie = {
|
|
85
84
|
SMALL: (
|
|
86
85
|
/** @type {Size} */
|
|
87
86
|
"SMALL"
|
|
@@ -94,7 +93,7 @@ const W = {
|
|
|
94
93
|
/** @type {Size} */
|
|
95
94
|
"LARGE"
|
|
96
95
|
)
|
|
97
|
-
},
|
|
96
|
+
}, Cn = `/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
|
|
98
97
|
|
|
99
98
|
@media screen and (max-width: media-size__tablet-landscape__PLACEHOLDER) {
|
|
100
99
|
/* put your media query here for tablet landscape */
|
|
@@ -152,7 +151,7 @@ const W = {
|
|
|
152
151
|
@media screen and (max-width: media-size__mobile__PLACEHOLDER) {
|
|
153
152
|
/* put your media query here for mobile */
|
|
154
153
|
}
|
|
155
|
-
`,
|
|
154
|
+
`, Rn = `<div class="utah-design-system utds-header-mobile-menu" id="utds-header-mobile-menu">
|
|
156
155
|
<div class="utds-header-mobile-menu__backdrop" aria-hidden></div>
|
|
157
156
|
<div class="utds-header-mobile-menu__wrapper">
|
|
158
157
|
<div class="utds-header-mobile-menu__action-bar" role="tablist">
|
|
@@ -189,6 +188,7 @@ const s = {
|
|
|
189
188
|
// Global Information
|
|
190
189
|
UTAH_DESIGN_SYSTEM: "utah-design-system",
|
|
191
190
|
HEADER: "utds-header",
|
|
191
|
+
FOOTER: "utds-footer",
|
|
192
192
|
// HTML elements
|
|
193
193
|
ICON_BUTTON: "icon-button",
|
|
194
194
|
// IDs
|
|
@@ -212,6 +212,7 @@ const s = {
|
|
|
212
212
|
BADGE_WRAPPER__SMALL: "utds-badge__wrapper--small",
|
|
213
213
|
BADGE_WRAPPER__ACTION_ITEM: "utds-badge__wrapper--action-item",
|
|
214
214
|
CITIZEN_EXPERIENCE: "utds-citizen-experience-wrapper",
|
|
215
|
+
FOOTER_HORIZONTAL_DIVIDER: "utds-footer__horizontal-divider",
|
|
215
216
|
LOGO: "utds-logo-wrapper",
|
|
216
217
|
LOGO_OFFICIAL_CLOSE_BUTTON: "utds-official-website-popup__close-button",
|
|
217
218
|
LOGO_OFFICIAL_WRAPPER: "utds-official-website-popup__wrapper",
|
|
@@ -284,29 +285,29 @@ const s = {
|
|
|
284
285
|
UTAH_ID: "utds-utah-id-wrapper",
|
|
285
286
|
UTAH_ID__BUTTON: "utds-utah-id__button"
|
|
286
287
|
};
|
|
287
|
-
function
|
|
288
|
+
function J(e, t) {
|
|
288
289
|
if (e)
|
|
289
290
|
throw new Error(t);
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
+
function se(e, t) {
|
|
292
293
|
if (e == null)
|
|
293
294
|
throw new Error(t);
|
|
294
295
|
return e;
|
|
295
296
|
}
|
|
296
|
-
function
|
|
297
|
+
function Ot(e) {
|
|
297
298
|
return typeof e == "string" || e instanceof String;
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function Dn(e) {
|
|
300
301
|
const t = new DOMParser();
|
|
301
302
|
let n;
|
|
302
|
-
if (
|
|
303
|
-
const
|
|
303
|
+
if (Ot(e)) {
|
|
304
|
+
const o = (
|
|
304
305
|
/** @type {Document} */
|
|
305
|
-
|
|
306
|
-
),
|
|
307
|
-
if (!
|
|
306
|
+
Ot(e) ? t.parseFromString(e, "text/html") : e
|
|
307
|
+
), r = o.body.children.length > 1 ? o.body.children : o.body.children.item(0);
|
|
308
|
+
if (!r)
|
|
308
309
|
throw console.error(e), new Error("renderDOM: nothing rendered");
|
|
309
|
-
n =
|
|
310
|
+
n = r;
|
|
310
311
|
} else if (
|
|
311
312
|
/** @type {unknown} */
|
|
312
313
|
e instanceof Element
|
|
@@ -317,7 +318,7 @@ function Un(e) {
|
|
|
317
318
|
return n;
|
|
318
319
|
}
|
|
319
320
|
function I(e) {
|
|
320
|
-
const t = typeof e == "string" ?
|
|
321
|
+
const t = typeof e == "string" ? Dn(e) : e;
|
|
321
322
|
if (t instanceof HTMLCollection && t.length > 1)
|
|
322
323
|
throw new Error("renderDOMSingle: must render a single element");
|
|
323
324
|
const n = (
|
|
@@ -328,363 +329,108 @@ function I(e) {
|
|
|
328
329
|
throw console.error(e), new Error("renderDOMSingle: nothing rendered");
|
|
329
330
|
return n;
|
|
330
331
|
}
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
]
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
title: "i am a child 2oo",
|
|
388
|
-
actionMenu: [
|
|
389
|
-
{
|
|
390
|
-
title: "i am a child2",
|
|
391
|
-
actionUrl: { url: "https://dts.utah.gov" }
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
title: "i am a child 2oo2",
|
|
395
|
-
actionUrl: { url: "https://dts.utah.gov/2" }
|
|
396
|
-
}
|
|
397
|
-
]
|
|
398
|
-
}
|
|
399
|
-
],
|
|
400
|
-
title: "I have children!!"
|
|
401
|
-
}
|
|
402
|
-
],
|
|
403
|
-
title: "Divisions Menu"
|
|
404
|
-
},
|
|
405
|
-
className: "icon-waffle",
|
|
406
|
-
icon: Hn,
|
|
407
|
-
showTitle: !0,
|
|
408
|
-
title: "Divisions"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
actionFunction: () => (
|
|
412
|
-
// eslint-disable-next-line no-console
|
|
413
|
-
console.log("Alerts clicked")
|
|
414
|
-
),
|
|
415
|
-
badge: {
|
|
416
|
-
// Note: make sure the `label` is plural/singular to match the value
|
|
417
|
-
label: "Unread Alert",
|
|
418
|
-
value: 1
|
|
419
|
-
},
|
|
420
|
-
icon: Dn,
|
|
421
|
-
showTitle: !1,
|
|
422
|
-
title: "Alerts"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
actionDom: () => {
|
|
426
|
-
const e = document.createElement("div");
|
|
427
|
-
e.appendChild(document.createTextNode("Hello World!"));
|
|
428
|
-
const t = document.createElement("button");
|
|
429
|
-
return t.appendChild(document.createTextNode("Do not press me.")), e.appendChild(t), e;
|
|
430
|
-
},
|
|
431
|
-
badge: {
|
|
432
|
-
// Note: make sure the `label` is plural/singular to match the value
|
|
433
|
-
label: "Help Items Available"
|
|
434
|
-
},
|
|
435
|
-
icon: xn,
|
|
436
|
-
showTitle: !1,
|
|
437
|
-
title: "Help"
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
actionDom: () => {
|
|
441
|
-
const e = document.createElement("div");
|
|
442
|
-
e.appendChild(document.createTextNode("Toggle Language"));
|
|
443
|
-
const t = document.createElement("button");
|
|
444
|
-
return t.appendChild(document.createTextNode("Speak Different")), t.onclick = () => alert("lorem ipsum"), e.appendChild(t), e;
|
|
445
|
-
},
|
|
446
|
-
icon: Rn,
|
|
447
|
-
showTitle: !1,
|
|
448
|
-
title: "Settings"
|
|
332
|
+
const Hn = `<div class="utds-footer utah-design-system">
|
|
333
|
+
<div class="utds-footer__horizontal-divider">
|
|
334
|
+
<hr />
|
|
335
|
+
</div>
|
|
336
|
+
<div class="utds-footer__utah-logo-wrapper">
|
|
337
|
+
<div class="utah-logo-svg" id="utah-logo-svg">
|
|
338
|
+
<svg viewBox="0 0 107 30.51" role="img">
|
|
339
|
+
<g><path d="m12.44,30.51c-4.21,0-7.33-1.22-9.38-3.66C1.02,24.4,0,20.61,0,15.48V0h7.93v16.4c0,2.67.36,4.55,1.08,5.65.77,1.12,2.08,1.74,3.43,1.64,1.36.1,2.68-.52,3.48-1.63.75-1.09,1.13-2.97,1.13-5.65V0h7.65v15.48c0,5.13-1,8.92-3,11.36-2,2.44-5.09,3.66-9.26,3.66Zm24.42-.56V6.64h-7.93V0h23.78v6.64h-7.93v23.31h-7.92Zm26.17-14.56l-.51,2.07h5.53l-.51-2.07c-.37-1.44-.74-3.01-1.11-4.7-.37-1.69-.74-3.29-1.11-4.79h-.18c-.34,1.53-.68,3.14-1.04,4.82-.35,1.68-.71,3.24-1.08,4.68Zm-11.52,14.56L60.64,0h9.58l9.12,29.95h-8.39l-1.48-6.36h-8.38l-1.47,6.36h-8.11Zm30.69,0V0h7.93v11.15h8.94V0h7.93v29.95h-7.93v-11.89h-8.94v11.89h-7.93Z"/></g>
|
|
340
|
+
</svg>
|
|
341
|
+
</div>
|
|
342
|
+
<div class="utds-footer__vertical-divider" role="separator" aria-orientation="vertical"></div>
|
|
343
|
+
<div class="utds-footer__official-site-wrapper">
|
|
344
|
+
<div class="utds-footer__official-site">An official website of the <span class="whitespace-no-wrap">State of Utah</span></div>
|
|
345
|
+
<div class="utds-footer__copyright">©2023 State of Utah</div>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
<div class="utds-footer__links">
|
|
349
|
+
<ul>
|
|
350
|
+
<li><a href="#" target="__blank" rel="noreferrer">Utah.gov Home</a></li>
|
|
351
|
+
<li><a href="#" target="__blank" rel="noreferrer">Terms of Use</a></li>
|
|
352
|
+
<li><a href="#" target="__blank" rel="noreferrer">Privacy Policy</a></li>
|
|
353
|
+
<li><a href="#" target="__blank" rel="noreferrer">Accessibility</a></li>
|
|
354
|
+
<li><a href="#" target="__blank" rel="noreferrer">Translate</a></li>
|
|
355
|
+
</ul>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
`;
|
|
359
|
+
let ie = null;
|
|
360
|
+
function xn() {
|
|
361
|
+
var r, i, c, a, l, u, d, _, h, p, m, b, v, T, M, A;
|
|
362
|
+
const e = y(), t = ((r = ie == null ? void 0 : ie.footer) == null ? void 0 : r.domLocationTarget) !== ((i = e == null ? void 0 : e.footer) == null ? void 0 : i.domLocationTarget) || ((c = ie == null ? void 0 : ie.footer) == null ? void 0 : c.showHorizontalRule) !== ((a = e == null ? void 0 : e.footer) == null ? void 0 : a.showHorizontalRule), n = document.querySelector(f(s.FOOTER));
|
|
363
|
+
let o = n;
|
|
364
|
+
if (t || !n) {
|
|
365
|
+
n && n.remove(), o = I(Hn);
|
|
366
|
+
let E = document.body;
|
|
367
|
+
if ((l = e == null ? void 0 : e.footer) != null && l.domLocationTarget) {
|
|
368
|
+
const g = [
|
|
369
|
+
(u = e == null ? void 0 : e.footer) == null ? void 0 : u.domLocationTarget.cssSelector,
|
|
370
|
+
(d = e == null ? void 0 : e.footer) == null ? void 0 : d.domLocationTarget.element,
|
|
371
|
+
(_ = e == null ? void 0 : e.footer) == null ? void 0 : _.domLocationTarget.elementFunction
|
|
372
|
+
].filter((w) => w);
|
|
373
|
+
if (J(g.length < 1, "renderFooter: footer.domLocationTarget must either have a value for one of its properties or not be specified at all"), J(g.length > 1, "renderFooter: footer.domLocationTarget must only have one target specified"), (h = e == null ? void 0 : e.footer) != null && h.domLocationTarget.cssSelector)
|
|
374
|
+
E = document.querySelector((p = e == null ? void 0 : e.footer) == null ? void 0 : p.domLocationTarget.cssSelector), J(!E, `renderFooter: element not found for domLocationTarget.cssSelector ${(m = e == null ? void 0 : e.footer) == null ? void 0 : m.domLocationTarget.cssSelector}`);
|
|
375
|
+
else if ((b = e == null ? void 0 : e.footer) != null && b.domLocationTarget.element)
|
|
376
|
+
E = (v = e == null ? void 0 : e.footer) == null ? void 0 : v.domLocationTarget.element;
|
|
377
|
+
else if ((T = e == null ? void 0 : e.footer) != null && T.domLocationTarget.elementFunction)
|
|
378
|
+
E = (M = e == null ? void 0 : e.footer) == null ? void 0 : M.domLocationTarget.elementFunction(), J(!E, "renderFooter: element not returned from domLocationTarget.elementFunction");
|
|
379
|
+
else
|
|
380
|
+
throw new Error("renderFooter: domLocationTarget must have at least one field set");
|
|
381
|
+
}
|
|
382
|
+
if (E == null || E.appendChild(o), !((A = e == null ? void 0 : e.footer) != null && A.showHorizontalRule)) {
|
|
383
|
+
const g = document.querySelector(f(s.FOOTER_HORIZONTAL_DIVIDER));
|
|
384
|
+
J(!g, "renderFooter: cannot remove horizontal rule; not found"), g == null || g.remove();
|
|
449
385
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
// elementFunction: () => /** @type {HTMLElement} */(document.querySelector('.put-header-here')),
|
|
456
|
-
// },
|
|
386
|
+
ie = JSON.parse(JSON.stringify(e));
|
|
387
|
+
}
|
|
388
|
+
return se(o, "renderFooter: footer not rendered");
|
|
389
|
+
}
|
|
390
|
+
const $t = {
|
|
457
391
|
mediaSizes: {
|
|
458
392
|
mobile: 640,
|
|
459
393
|
tabletPortrait: 768,
|
|
460
394
|
tabletLandscape: 1024
|
|
461
395
|
},
|
|
462
|
-
onSearch: (e) => alert(e),
|
|
463
396
|
showTitle: !0,
|
|
464
|
-
size:
|
|
465
|
-
title: "Utah
|
|
397
|
+
size: Ie.MEDIUM,
|
|
398
|
+
title: "My Utah.gov Site",
|
|
466
399
|
titleURL: "/",
|
|
467
|
-
utahId: !0,
|
|
468
400
|
mainMenu: {
|
|
469
401
|
menuItems: [
|
|
470
402
|
{
|
|
471
403
|
actionUrl: { url: "/" },
|
|
472
404
|
title: "Home"
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
actionUrl: { url: "#" },
|
|
476
|
-
title: "Link to Somewhere"
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
isSelected: !0,
|
|
480
|
-
actionFunction: () => alert("hello yous guy"),
|
|
481
|
-
title: "do func"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
actionMenu: [
|
|
485
|
-
{
|
|
486
|
-
title: "Guidelines and Standards",
|
|
487
|
-
actionUrl: { url: "/guidelines" }
|
|
488
|
-
}
|
|
489
|
-
],
|
|
490
|
-
title: "Guidelines/Standards"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
actionMenu: [
|
|
494
|
-
{
|
|
495
|
-
title: "child1",
|
|
496
|
-
actionMenu: [
|
|
497
|
-
{
|
|
498
|
-
title: "child1-1",
|
|
499
|
-
actionMenu: [
|
|
500
|
-
{
|
|
501
|
-
title: "child1-1-1",
|
|
502
|
-
actionUrl: { url: "/children" }
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
title: "child1-1-2",
|
|
506
|
-
actionUrl: { url: "/children" }
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
title: "child1-1-3",
|
|
510
|
-
actionUrl: { url: "/children" }
|
|
511
|
-
}
|
|
512
|
-
]
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
title: "child1-2",
|
|
516
|
-
actionMenu: [
|
|
517
|
-
{
|
|
518
|
-
title: "child1-2-1",
|
|
519
|
-
actionUrl: { url: "/children" }
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
title: "child1-2-2",
|
|
523
|
-
actionUrl: { url: "/children" }
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
title: "child1-2-3",
|
|
527
|
-
actionUrl: { url: "/children" }
|
|
528
|
-
}
|
|
529
|
-
]
|
|
530
|
-
}
|
|
531
|
-
]
|
|
532
|
-
},
|
|
533
|
-
{
|
|
534
|
-
title: "child2",
|
|
535
|
-
actionMenu: [
|
|
536
|
-
{
|
|
537
|
-
title: "child2-1",
|
|
538
|
-
actionMenu: [
|
|
539
|
-
{
|
|
540
|
-
title: "child2-1-1",
|
|
541
|
-
actionUrl: { url: "/children" }
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
title: "child2-1-2",
|
|
545
|
-
actionUrl: { url: "/children" }
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
title: "child2-1-3",
|
|
549
|
-
actionUrl: { url: "/children" }
|
|
550
|
-
}
|
|
551
|
-
]
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
title: "child2-2",
|
|
555
|
-
actionMenu: [
|
|
556
|
-
{
|
|
557
|
-
title: "child2-2-1",
|
|
558
|
-
actionUrl: { url: "/children" }
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
title: "child2-2-2",
|
|
562
|
-
actionUrl: { url: "/children" }
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
title: "child2-2-3",
|
|
566
|
-
actionUrl: { url: "/children" }
|
|
567
|
-
}
|
|
568
|
-
]
|
|
569
|
-
}
|
|
570
|
-
]
|
|
571
|
-
}
|
|
572
|
-
],
|
|
573
|
-
childrenMenuType: W.FLYOUT,
|
|
574
|
-
title: "Childrens"
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
actionMenu: [
|
|
578
|
-
{
|
|
579
|
-
title: "Title of section 1",
|
|
580
|
-
actionMenu: [
|
|
581
|
-
{
|
|
582
|
-
title: "child1-1",
|
|
583
|
-
actionMenu: [
|
|
584
|
-
{
|
|
585
|
-
title: "child1-1-1",
|
|
586
|
-
actionUrl: { url: "/children" }
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
title: "child1-1-2",
|
|
590
|
-
actionUrl: { url: "/children" }
|
|
591
|
-
},
|
|
592
|
-
{
|
|
593
|
-
title: "child1-1-3",
|
|
594
|
-
actionUrl: { url: "/children" }
|
|
595
|
-
}
|
|
596
|
-
]
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
title: "child1-2",
|
|
600
|
-
actionMenu: [
|
|
601
|
-
{
|
|
602
|
-
title: "child1-2-1",
|
|
603
|
-
actionUrl: { url: "/children" }
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
title: "child1-2-2",
|
|
607
|
-
actionUrl: { url: "/children" }
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
title: "child1-2-3",
|
|
611
|
-
actionUrl: { url: "/children" }
|
|
612
|
-
}
|
|
613
|
-
]
|
|
614
|
-
}
|
|
615
|
-
]
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
title: "Title of section 2",
|
|
619
|
-
actionMenu: [
|
|
620
|
-
{
|
|
621
|
-
title: "child2-1",
|
|
622
|
-
actionMenu: [
|
|
623
|
-
{
|
|
624
|
-
title: "child2-1-1",
|
|
625
|
-
actionUrl: { url: "/children" }
|
|
626
|
-
},
|
|
627
|
-
{
|
|
628
|
-
title: "child2-1-2",
|
|
629
|
-
actionUrl: { url: "/children" }
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
title: "child2-1-3",
|
|
633
|
-
actionUrl: { url: "/children" }
|
|
634
|
-
}
|
|
635
|
-
]
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
title: "child2-2",
|
|
639
|
-
actionMenu: [
|
|
640
|
-
{
|
|
641
|
-
title: "child2-2-1",
|
|
642
|
-
actionUrl: { url: "/children" }
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
title: "child2-2-2",
|
|
646
|
-
actionUrl: { url: "/children" }
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
title: "child2-2-3",
|
|
650
|
-
actionUrl: { url: "/children" }
|
|
651
|
-
}
|
|
652
|
-
]
|
|
653
|
-
}
|
|
654
|
-
]
|
|
655
|
-
}
|
|
656
|
-
],
|
|
657
|
-
childrenMenuType: W.MEGA_MENU,
|
|
658
|
-
title: "MEGA MENU!"
|
|
659
405
|
}
|
|
660
406
|
],
|
|
661
|
-
title: "
|
|
407
|
+
title: "Main Menu"
|
|
662
408
|
}
|
|
663
409
|
};
|
|
664
|
-
let
|
|
665
|
-
function
|
|
666
|
-
return
|
|
410
|
+
let xe = { ...$t };
|
|
411
|
+
function y() {
|
|
412
|
+
return xe;
|
|
667
413
|
}
|
|
668
|
-
function
|
|
414
|
+
function Bn(e) {
|
|
669
415
|
if (!e.showTitle && !e.logo)
|
|
670
416
|
throw new Error("validateSettings: A title must be shown if there is no logo. Please change the `showTitle` setting to be `true` or provide a logo image.");
|
|
671
417
|
}
|
|
672
|
-
function
|
|
673
|
-
|
|
418
|
+
function yt() {
|
|
419
|
+
Jr(!1), Xr();
|
|
674
420
|
}
|
|
675
|
-
let
|
|
676
|
-
const
|
|
677
|
-
let
|
|
678
|
-
const
|
|
421
|
+
let jt = !1;
|
|
422
|
+
const kn = 15e3;
|
|
423
|
+
let Lt = 0;
|
|
424
|
+
const Wn = setInterval(
|
|
679
425
|
() => {
|
|
680
|
-
|
|
426
|
+
Lt += 1, Lt >= kn || jt ? clearInterval(Wn) : document.dispatchEvent(new Event(Gt.HEADER_LOADED));
|
|
681
427
|
},
|
|
682
428
|
2
|
|
683
429
|
);
|
|
684
|
-
function
|
|
685
|
-
return
|
|
430
|
+
function Qr(e) {
|
|
431
|
+
return xe = { ...$t, ...y(), ...e }, Bn(xe), jt = !0, document != null && document.body ? yt() : window.addEventListener("load", () => yt()), xe;
|
|
686
432
|
}
|
|
687
|
-
const
|
|
433
|
+
const qn = `<div class="utds-header-mobile-menu__content-item" role="tabpanel">
|
|
688
434
|
</div>
|
|
689
435
|
`;
|
|
690
436
|
function C() {
|
|
@@ -694,117 +440,128 @@ function C() {
|
|
|
694
440
|
(e) => (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> e) / 4).toString(16)
|
|
695
441
|
);
|
|
696
442
|
}
|
|
697
|
-
function
|
|
443
|
+
function nt(e) {
|
|
698
444
|
const t = document.querySelector(f(s.MOBILE_MENU__WRAPPER));
|
|
699
445
|
if (!t)
|
|
700
446
|
throw new Error("addMobileMenuContentItem: mobileMenuWrapper not found");
|
|
701
447
|
const n = t.querySelector(f(s.MOBILE_MENU__CONTENT));
|
|
702
448
|
if (!n)
|
|
703
449
|
throw new Error("addMobileMenuContentItem: mobileContentWrapper not found");
|
|
704
|
-
const
|
|
705
|
-
return
|
|
450
|
+
const o = I(qn);
|
|
451
|
+
return o.appendChild(e), n.appendChild(o), o.setAttribute("id", C()), o;
|
|
706
452
|
}
|
|
707
|
-
const
|
|
453
|
+
const Fn = `<div class="utds-badge__wrapper">
|
|
708
454
|
<span class="utds-badge__value"></span>
|
|
709
455
|
<span class="utds-badge__label visually-hidden"></span>
|
|
710
456
|
</div>
|
|
711
457
|
`;
|
|
712
|
-
function
|
|
458
|
+
function ot(e) {
|
|
713
459
|
let t = null;
|
|
714
460
|
if (e) {
|
|
715
461
|
t = /** @type {HTMLElement} */
|
|
716
|
-
I(
|
|
462
|
+
I(Fn), t.classList.add(s.BADGE_WRAPPER__ACTION_ITEM);
|
|
717
463
|
const n = t.querySelector(f(s.BADGE__LABEL));
|
|
718
464
|
if (!n)
|
|
719
465
|
throw new Error("renderActionItemBadge: badgeLabel not found");
|
|
720
466
|
if (n.appendChild(document.createTextNode(e.label)), e.value || e.value === 0) {
|
|
721
|
-
const
|
|
722
|
-
if (!
|
|
467
|
+
const o = t.querySelector(f(s.BADGE__VALUE));
|
|
468
|
+
if (!o)
|
|
723
469
|
throw new Error("renderActionItemBadge: badgeValue not found");
|
|
724
|
-
|
|
470
|
+
o.appendChild(document.createTextNode(`${e.value}`));
|
|
725
471
|
} else
|
|
726
472
|
t.classList.add(s.BADGE_WRAPPER__SMALL);
|
|
727
473
|
e.className && t.classList.add(e.className);
|
|
728
474
|
}
|
|
729
475
|
return t;
|
|
730
476
|
}
|
|
731
|
-
function
|
|
477
|
+
function ke(e) {
|
|
732
478
|
const t = (
|
|
733
479
|
/** @type {HTMLElement} */
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
480
|
+
se(
|
|
481
|
+
document.querySelector(f(s.MOBILE_MENU)),
|
|
482
|
+
`${e}: mobileMenu not found`
|
|
483
|
+
)
|
|
484
|
+
), n = se(
|
|
485
|
+
document.getElementById(s.MAIN_MENU__HAMBURGER_ID),
|
|
486
|
+
`${e}: hamburger not found (🍔 🎶 I will gladly pay you Tuesday for a hamburger today 🎵 🍔)`
|
|
487
|
+
), o = (
|
|
742
488
|
/** @type {HTMLElement} */
|
|
743
|
-
|
|
489
|
+
se(
|
|
490
|
+
document.getElementById(s.MAIN_MENU__HAMBURGER_ICON_ID),
|
|
491
|
+
`${e}: hamburgerIcon not found`
|
|
492
|
+
)
|
|
744
493
|
);
|
|
745
|
-
if (!r)
|
|
746
|
-
throw new Error(`${e}: hamburgerIcon not found`);
|
|
747
494
|
return {
|
|
748
495
|
hamburger: n,
|
|
749
|
-
hamburgerIcon:
|
|
496
|
+
hamburgerIcon: o,
|
|
750
497
|
mobileMenu: t
|
|
751
498
|
};
|
|
752
499
|
}
|
|
753
|
-
function
|
|
754
|
-
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } =
|
|
500
|
+
function rt() {
|
|
501
|
+
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } = ke("hideMobileMenu");
|
|
755
502
|
e.setAttribute("aria-expanded", "false"), n.classList.remove(s.IS_OPEN), t.classList.add("utds-icon-before-hamburger"), t.classList.remove("utds-icon-before-x-icon");
|
|
756
503
|
}
|
|
757
|
-
function
|
|
758
|
-
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } =
|
|
504
|
+
function Vn() {
|
|
505
|
+
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } = ke("showMobileMenu");
|
|
759
506
|
e.setAttribute("aria-expanded", "true"), n.classList.add(s.IS_OPEN), t.classList.remove("utds-icon-before-hamburger"), t.classList.add("utds-icon-before-x-icon");
|
|
760
507
|
}
|
|
761
|
-
function
|
|
508
|
+
function Gn(e) {
|
|
762
509
|
var c;
|
|
763
|
-
const { hamburger: t } =
|
|
764
|
-
if ((c =
|
|
765
|
-
const a =
|
|
510
|
+
const { hamburger: t } = ke("hookupHamburger");
|
|
511
|
+
if ((c = y().actionItems) == null ? void 0 : c.some((a) => !!a.badge)) {
|
|
512
|
+
const a = ot({ label: "Home Badge" });
|
|
766
513
|
a && t.appendChild(a);
|
|
767
514
|
}
|
|
768
|
-
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
515
|
+
rt();
|
|
516
|
+
const r = se(
|
|
517
|
+
document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID),
|
|
518
|
+
"hookupHamburger: homeActionItem not found"
|
|
519
|
+
), i = (
|
|
773
520
|
/** @type {HTMLElement} */
|
|
774
|
-
|
|
521
|
+
se(
|
|
522
|
+
r == null ? void 0 : r.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)),
|
|
523
|
+
"hookupHamburger: homeActionItemWrapper not found"
|
|
524
|
+
)
|
|
775
525
|
);
|
|
776
|
-
|
|
777
|
-
throw new Error("hookupHamburger: homeActionItemWrapper not found");
|
|
778
|
-
nt(
|
|
526
|
+
it(
|
|
779
527
|
t,
|
|
780
528
|
e,
|
|
781
529
|
i,
|
|
782
530
|
{ ariaHasPopupType: "menu", shouldOnClickCloseMenu: !0 }
|
|
783
|
-
)
|
|
531
|
+
), J(!!t.onblur, "hookupHamburger: hamburger already has an onblur event"), t.onblur = () => {
|
|
532
|
+
const { mobileMenu: a } = ke("showMobileMenu");
|
|
533
|
+
if (a.classList.contains(s.IS_OPEN)) {
|
|
534
|
+
const l = f(s.MOBILE_MENU__ACTION_BAR), u = f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER), d = f(s.ICON_BUTTON), _ = (
|
|
535
|
+
/** @type {HTMLElement | null} */
|
|
536
|
+
document.querySelector(`${l} ${u}:first-child ${d}`)
|
|
537
|
+
);
|
|
538
|
+
_ == null || _.focus();
|
|
539
|
+
}
|
|
540
|
+
};
|
|
784
541
|
}
|
|
785
|
-
function
|
|
786
|
-
e.querySelectorAll(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)).forEach((
|
|
787
|
-
|
|
788
|
-
const
|
|
789
|
-
if (!
|
|
542
|
+
function Ke(e, t) {
|
|
543
|
+
e.querySelectorAll(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)).forEach((o) => {
|
|
544
|
+
o.classList.remove(s.ACTION_ITEM__SELECTED);
|
|
545
|
+
const r = o.querySelector("button");
|
|
546
|
+
if (!r)
|
|
790
547
|
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
791
|
-
|
|
548
|
+
r.setAttribute("aria-selected", "false"), r.setAttribute("tabIndex", "-1");
|
|
792
549
|
}), t.classList.add(s.ACTION_ITEM__SELECTED);
|
|
793
550
|
const n = t.querySelector("button");
|
|
794
551
|
if (!n)
|
|
795
552
|
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
796
553
|
n.setAttribute("aria-selected", "true"), n.removeAttribute("tabIndex"), n.focus();
|
|
797
554
|
}
|
|
798
|
-
function
|
|
555
|
+
function Pt(e, t) {
|
|
799
556
|
e.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach((n) => n.classList.remove(s.IS_OPEN)), t.classList.add(s.IS_OPEN);
|
|
800
557
|
}
|
|
801
|
-
function
|
|
802
|
-
ariaHasPopupType:
|
|
803
|
-
onClickHandler:
|
|
558
|
+
function it(e, t, n, {
|
|
559
|
+
ariaHasPopupType: o,
|
|
560
|
+
onClickHandler: r,
|
|
804
561
|
shouldOnClickCloseMenu: i
|
|
805
562
|
}) {
|
|
806
|
-
var
|
|
807
|
-
if (t && !
|
|
563
|
+
var _;
|
|
564
|
+
if (t && !o)
|
|
808
565
|
throw new Error("mobileMenuInteractionHandler: there is content, but the aria type is not given");
|
|
809
566
|
const c = (
|
|
810
567
|
/** @type {HTMLElement} */
|
|
@@ -824,44 +581,44 @@ function nt(e, t, n, {
|
|
|
824
581
|
);
|
|
825
582
|
if (!l)
|
|
826
583
|
throw new Error("mobileMenuInteractionHandler: mobileContentWrapper not found");
|
|
827
|
-
const u = (
|
|
584
|
+
const u = (_ = n == null ? void 0 : n.querySelector) == null ? void 0 : _.call(n, "button"), d = (u || e).getAttribute("id");
|
|
828
585
|
if (!d)
|
|
829
586
|
throw new Error("mobileMenuInteractionHandler: interactiveElementId not found");
|
|
830
587
|
if (t) {
|
|
831
|
-
const
|
|
832
|
-
if (!
|
|
588
|
+
const h = t.getAttribute("id");
|
|
589
|
+
if (!h)
|
|
833
590
|
throw new Error("mobileMenuInteractionHandler: mobileMenuContentId not found");
|
|
834
|
-
(u || e).setAttribute("aria-controls",
|
|
591
|
+
(u || e).setAttribute("aria-controls", h), t.setAttribute("aria-labelledby", d);
|
|
835
592
|
}
|
|
836
593
|
if (e.onclick)
|
|
837
594
|
throw new Error("mobileMenuInteractionHandler: interactiveElement already has onclick");
|
|
838
|
-
if (e.onclick = (
|
|
839
|
-
|
|
595
|
+
if (e.onclick = (h) => {
|
|
596
|
+
r != null && r(h) || (c.classList.contains(s.IS_OPEN) ? i && rt() : (Vn(), t && Pt(l, t), Ke(a, n)));
|
|
840
597
|
}, t) {
|
|
841
598
|
if (n !== e && n.onclick)
|
|
842
599
|
throw new Error("mobileMenuInteractionHandler: actionItemWrapper already has onclick");
|
|
843
|
-
n.onclick = (
|
|
844
|
-
|
|
600
|
+
n.onclick = (h) => {
|
|
601
|
+
r != null && r(h) || (Pt(l, t), Ke(a, n));
|
|
845
602
|
};
|
|
846
603
|
}
|
|
847
604
|
}
|
|
848
|
-
const
|
|
605
|
+
const $n = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
849
606
|
<button type="button" class="icon-button icon-button--borderless utds-header-action-item__icon-button">
|
|
850
607
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
851
608
|
<span aria-hidden="true" role="presentation">
|
|
852
609
|
</button>
|
|
853
610
|
<span class="menu-chiclet"></span>
|
|
854
611
|
</div>
|
|
855
|
-
`,
|
|
612
|
+
`, jn = `<div class="utds-header-action-item-menu">
|
|
856
613
|
<div class="vertical-menu__wrapper-title"></div>
|
|
857
614
|
</div>
|
|
858
615
|
`, zn = `<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
|
|
859
|
-
`,
|
|
616
|
+
`, zt = `<span class="utds-new-tab-link-a11y">
|
|
860
617
|
<span class="visually-hidden">opens in a new tab</span>
|
|
861
618
|
<span class="utds-icon-after-external-link" aria-hidden="true"></span>
|
|
862
619
|
</span>
|
|
863
|
-
`,
|
|
864
|
-
`,
|
|
620
|
+
`, Yn = `<ul class="vertical-menu" role="menu" />
|
|
621
|
+
`, Kn = `<li class="vertical-menu__item">
|
|
865
622
|
<span class="vertical-menu__title">
|
|
866
623
|
<span class="vertical-menu__plain-title"></span>
|
|
867
624
|
<a href="#" class="vertical-menu__link-title">
|
|
@@ -873,7 +630,7 @@ const jn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
873
630
|
</span>
|
|
874
631
|
<span class="vertical-menu__divider" />
|
|
875
632
|
</li>
|
|
876
|
-
`,
|
|
633
|
+
`, at = {
|
|
877
634
|
AUTO: (
|
|
878
635
|
/** @type {PopupPlacement} */
|
|
879
636
|
"auto"
|
|
@@ -935,20 +692,20 @@ const jn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
935
692
|
"top-end"
|
|
936
693
|
)
|
|
937
694
|
};
|
|
938
|
-
function
|
|
939
|
-
var
|
|
940
|
-
let
|
|
941
|
-
return e && (Array.isArray(e) ?
|
|
942
|
-
}
|
|
943
|
-
var
|
|
944
|
-
return e.concat([t + "-" +
|
|
945
|
-
}, []),
|
|
946
|
-
return e.concat([t, t + "-" +
|
|
947
|
-
}, []), Jn = "beforeRead",
|
|
695
|
+
function We(e, t, n) {
|
|
696
|
+
var r;
|
|
697
|
+
let o = !1;
|
|
698
|
+
return e && (Array.isArray(e) ? o = e.some((i) => We(i, t, n)) : (o = n(e), o || (o = !!((r = t == null ? void 0 : t.filter((i) => e[i])) != null && r.some((i) => We(e[i], t, n)))))), o;
|
|
699
|
+
}
|
|
700
|
+
var H = "top", F = "bottom", V = "right", x = "left", Fe = "auto", Le = [H, F, V, x], pe = "start", Me = "end", Zn = "clippingParents", Yt = "viewport", be = "popper", Xn = "reference", Nt = /* @__PURE__ */ Le.reduce(function(e, t) {
|
|
701
|
+
return e.concat([t + "-" + pe, t + "-" + Me]);
|
|
702
|
+
}, []), Kt = /* @__PURE__ */ [].concat(Le, [Fe]).reduce(function(e, t) {
|
|
703
|
+
return e.concat([t, t + "-" + pe, t + "-" + Me]);
|
|
704
|
+
}, []), Jn = "beforeRead", Qn = "read", eo = "afterRead", to = "beforeMain", no = "main", oo = "afterMain", ro = "beforeWrite", io = "write", ao = "afterWrite", Ze = [Jn, Qn, eo, to, no, oo, ro, io, ao];
|
|
948
705
|
function K(e) {
|
|
949
706
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
950
707
|
}
|
|
951
|
-
function
|
|
708
|
+
function q(e) {
|
|
952
709
|
if (e == null)
|
|
953
710
|
return window;
|
|
954
711
|
if (e.toString() !== "[object Window]") {
|
|
@@ -957,31 +714,31 @@ function F(e) {
|
|
|
957
714
|
}
|
|
958
715
|
return e;
|
|
959
716
|
}
|
|
960
|
-
function
|
|
961
|
-
var t =
|
|
717
|
+
function ce(e) {
|
|
718
|
+
var t = q(e).Element;
|
|
962
719
|
return e instanceof t || e instanceof Element;
|
|
963
720
|
}
|
|
964
|
-
function
|
|
965
|
-
var t =
|
|
721
|
+
function W(e) {
|
|
722
|
+
var t = q(e).HTMLElement;
|
|
966
723
|
return e instanceof t || e instanceof HTMLElement;
|
|
967
724
|
}
|
|
968
|
-
function
|
|
725
|
+
function st(e) {
|
|
969
726
|
if (typeof ShadowRoot > "u")
|
|
970
727
|
return !1;
|
|
971
|
-
var t =
|
|
728
|
+
var t = q(e).ShadowRoot;
|
|
972
729
|
return e instanceof t || e instanceof ShadowRoot;
|
|
973
730
|
}
|
|
974
|
-
function
|
|
731
|
+
function so(e) {
|
|
975
732
|
var t = e.state;
|
|
976
733
|
Object.keys(t.elements).forEach(function(n) {
|
|
977
|
-
var
|
|
978
|
-
!
|
|
979
|
-
var a =
|
|
734
|
+
var o = t.styles[n] || {}, r = t.attributes[n] || {}, i = t.elements[n];
|
|
735
|
+
!W(i) || !K(i) || (Object.assign(i.style, o), Object.keys(r).forEach(function(c) {
|
|
736
|
+
var a = r[c];
|
|
980
737
|
a === !1 ? i.removeAttribute(c) : i.setAttribute(c, a === !0 ? "" : a);
|
|
981
738
|
}));
|
|
982
739
|
});
|
|
983
740
|
}
|
|
984
|
-
function
|
|
741
|
+
function lo(e) {
|
|
985
742
|
var t = e.state, n = {
|
|
986
743
|
popper: {
|
|
987
744
|
position: t.options.strategy,
|
|
@@ -995,136 +752,136 @@ function cr(e) {
|
|
|
995
752
|
reference: {}
|
|
996
753
|
};
|
|
997
754
|
return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
|
|
998
|
-
Object.keys(t.elements).forEach(function(
|
|
999
|
-
var
|
|
755
|
+
Object.keys(t.elements).forEach(function(o) {
|
|
756
|
+
var r = t.elements[o], i = t.attributes[o] || {}, c = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), a = c.reduce(function(l, u) {
|
|
1000
757
|
return l[u] = "", l;
|
|
1001
758
|
}, {});
|
|
1002
|
-
!
|
|
1003
|
-
|
|
759
|
+
!W(r) || !K(r) || (Object.assign(r.style, a), Object.keys(i).forEach(function(l) {
|
|
760
|
+
r.removeAttribute(l);
|
|
1004
761
|
}));
|
|
1005
762
|
});
|
|
1006
763
|
};
|
|
1007
764
|
}
|
|
1008
|
-
const
|
|
765
|
+
const co = {
|
|
1009
766
|
name: "applyStyles",
|
|
1010
767
|
enabled: !0,
|
|
1011
768
|
phase: "write",
|
|
1012
|
-
fn:
|
|
1013
|
-
effect:
|
|
769
|
+
fn: so,
|
|
770
|
+
effect: lo,
|
|
1014
771
|
requires: ["computeStyles"]
|
|
1015
772
|
};
|
|
1016
773
|
function j(e) {
|
|
1017
774
|
return e.split("-")[0];
|
|
1018
775
|
}
|
|
1019
|
-
var
|
|
1020
|
-
function
|
|
776
|
+
var le = Math.max, qe = Math.min, fe = Math.round;
|
|
777
|
+
function Xe() {
|
|
1021
778
|
var e = navigator.userAgentData;
|
|
1022
779
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1023
780
|
return t.brand + "/" + t.version;
|
|
1024
781
|
}).join(" ") : navigator.userAgent;
|
|
1025
782
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
783
|
+
function Zt() {
|
|
784
|
+
return !/^((?!chrome|android).)*safari/i.test(Xe());
|
|
1028
785
|
}
|
|
1029
|
-
function
|
|
786
|
+
function _e(e, t, n) {
|
|
1030
787
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1031
|
-
var
|
|
1032
|
-
t &&
|
|
1033
|
-
var c =
|
|
788
|
+
var o = e.getBoundingClientRect(), r = 1, i = 1;
|
|
789
|
+
t && W(e) && (r = e.offsetWidth > 0 && fe(o.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && fe(o.height) / e.offsetHeight || 1);
|
|
790
|
+
var c = ce(e) ? q(e) : window, a = c.visualViewport, l = !Zt() && n, u = (o.left + (l && a ? a.offsetLeft : 0)) / r, d = (o.top + (l && a ? a.offsetTop : 0)) / i, _ = o.width / r, h = o.height / i;
|
|
1034
791
|
return {
|
|
1035
|
-
width:
|
|
1036
|
-
height:
|
|
792
|
+
width: _,
|
|
793
|
+
height: h,
|
|
1037
794
|
top: d,
|
|
1038
|
-
right: u +
|
|
1039
|
-
bottom: d +
|
|
795
|
+
right: u + _,
|
|
796
|
+
bottom: d + h,
|
|
1040
797
|
left: u,
|
|
1041
798
|
x: u,
|
|
1042
799
|
y: d
|
|
1043
800
|
};
|
|
1044
801
|
}
|
|
1045
|
-
function
|
|
1046
|
-
var t =
|
|
1047
|
-
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height -
|
|
802
|
+
function lt(e) {
|
|
803
|
+
var t = _e(e), n = e.offsetWidth, o = e.offsetHeight;
|
|
804
|
+
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
1048
805
|
x: e.offsetLeft,
|
|
1049
806
|
y: e.offsetTop,
|
|
1050
807
|
width: n,
|
|
1051
|
-
height:
|
|
808
|
+
height: o
|
|
1052
809
|
};
|
|
1053
810
|
}
|
|
1054
|
-
function
|
|
811
|
+
function Xt(e, t) {
|
|
1055
812
|
var n = t.getRootNode && t.getRootNode();
|
|
1056
813
|
if (e.contains(t))
|
|
1057
814
|
return !0;
|
|
1058
|
-
if (n &&
|
|
1059
|
-
var
|
|
815
|
+
if (n && st(n)) {
|
|
816
|
+
var o = t;
|
|
1060
817
|
do {
|
|
1061
|
-
if (
|
|
818
|
+
if (o && e.isSameNode(o))
|
|
1062
819
|
return !0;
|
|
1063
|
-
|
|
1064
|
-
} while (
|
|
820
|
+
o = o.parentNode || o.host;
|
|
821
|
+
} while (o);
|
|
1065
822
|
}
|
|
1066
823
|
return !1;
|
|
1067
824
|
}
|
|
1068
|
-
function
|
|
1069
|
-
return
|
|
825
|
+
function z(e) {
|
|
826
|
+
return q(e).getComputedStyle(e);
|
|
1070
827
|
}
|
|
1071
|
-
function
|
|
828
|
+
function uo(e) {
|
|
1072
829
|
return ["table", "td", "th"].indexOf(K(e)) >= 0;
|
|
1073
830
|
}
|
|
1074
831
|
function Q(e) {
|
|
1075
|
-
return ((
|
|
832
|
+
return ((ce(e) ? e.ownerDocument : (
|
|
1076
833
|
// $FlowFixMe[prop-missing]
|
|
1077
834
|
e.document
|
|
1078
835
|
)) || window.document).documentElement;
|
|
1079
836
|
}
|
|
1080
|
-
function
|
|
837
|
+
function Ve(e) {
|
|
1081
838
|
return K(e) === "html" ? e : (
|
|
1082
839
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1083
840
|
// $FlowFixMe[incompatible-return]
|
|
1084
841
|
// $FlowFixMe[prop-missing]
|
|
1085
842
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1086
843
|
e.parentNode || // DOM Element detected
|
|
1087
|
-
(
|
|
844
|
+
(st(e) ? e.host : null) || // ShadowRoot detected
|
|
1088
845
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1089
846
|
Q(e)
|
|
1090
847
|
);
|
|
1091
848
|
}
|
|
1092
|
-
function
|
|
1093
|
-
return !
|
|
1094
|
-
|
|
849
|
+
function St(e) {
|
|
850
|
+
return !W(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
851
|
+
z(e).position === "fixed" ? null : e.offsetParent;
|
|
1095
852
|
}
|
|
1096
|
-
function
|
|
1097
|
-
var t = /firefox/i.test(
|
|
1098
|
-
if (n &&
|
|
1099
|
-
var
|
|
1100
|
-
if (
|
|
853
|
+
function po(e) {
|
|
854
|
+
var t = /firefox/i.test(Xe()), n = /Trident/i.test(Xe());
|
|
855
|
+
if (n && W(e)) {
|
|
856
|
+
var o = z(e);
|
|
857
|
+
if (o.position === "fixed")
|
|
1101
858
|
return null;
|
|
1102
859
|
}
|
|
1103
|
-
var
|
|
1104
|
-
for (
|
|
1105
|
-
var i =
|
|
860
|
+
var r = Ve(e);
|
|
861
|
+
for (st(r) && (r = r.host); W(r) && ["html", "body"].indexOf(K(r)) < 0; ) {
|
|
862
|
+
var i = z(r);
|
|
1106
863
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
|
|
1107
|
-
return
|
|
1108
|
-
|
|
864
|
+
return r;
|
|
865
|
+
r = r.parentNode;
|
|
1109
866
|
}
|
|
1110
867
|
return null;
|
|
1111
868
|
}
|
|
1112
|
-
function
|
|
1113
|
-
for (var t =
|
|
1114
|
-
n =
|
|
1115
|
-
return n && (K(n) === "html" || K(n) === "body" &&
|
|
869
|
+
function Pe(e) {
|
|
870
|
+
for (var t = q(e), n = St(e); n && uo(n) && z(n).position === "static"; )
|
|
871
|
+
n = St(n);
|
|
872
|
+
return n && (K(n) === "html" || K(n) === "body" && z(n).position === "static") ? t : n || po(e) || t;
|
|
1116
873
|
}
|
|
1117
|
-
function
|
|
874
|
+
function ct(e) {
|
|
1118
875
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1119
876
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return
|
|
877
|
+
function Te(e, t, n) {
|
|
878
|
+
return le(e, qe(t, n));
|
|
1122
879
|
}
|
|
1123
|
-
function
|
|
1124
|
-
var
|
|
1125
|
-
return
|
|
880
|
+
function fo(e, t, n) {
|
|
881
|
+
var o = Te(e, t, n);
|
|
882
|
+
return o > n ? n : o;
|
|
1126
883
|
}
|
|
1127
|
-
function
|
|
884
|
+
function Jt() {
|
|
1128
885
|
return {
|
|
1129
886
|
top: 0,
|
|
1130
887
|
right: 0,
|
|
@@ -1132,111 +889,111 @@ function zt() {
|
|
|
1132
889
|
left: 0
|
|
1133
890
|
};
|
|
1134
891
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return Object.assign({},
|
|
892
|
+
function Qt(e) {
|
|
893
|
+
return Object.assign({}, Jt(), e);
|
|
1137
894
|
}
|
|
1138
|
-
function
|
|
1139
|
-
return t.reduce(function(n,
|
|
1140
|
-
return n[
|
|
895
|
+
function en(e, t) {
|
|
896
|
+
return t.reduce(function(n, o) {
|
|
897
|
+
return n[o] = e, n;
|
|
1141
898
|
}, {});
|
|
1142
899
|
}
|
|
1143
|
-
var
|
|
900
|
+
var _o = function(t, n) {
|
|
1144
901
|
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
|
1145
902
|
placement: n.placement
|
|
1146
|
-
})) : t,
|
|
903
|
+
})) : t, Qt(typeof t != "number" ? t : en(t, Le));
|
|
1147
904
|
};
|
|
1148
|
-
function
|
|
1149
|
-
var t, n = e.state,
|
|
905
|
+
function ho(e) {
|
|
906
|
+
var t, n = e.state, o = e.name, r = e.options, i = n.elements.arrow, c = n.modifiersData.popperOffsets, a = j(n.placement), l = ct(a), u = [x, V].indexOf(a) >= 0, d = u ? "height" : "width";
|
|
1150
907
|
if (!(!i || !c)) {
|
|
1151
|
-
var
|
|
1152
|
-
n.modifiersData[
|
|
908
|
+
var _ = _o(r.padding, n), h = lt(i), p = l === "y" ? H : x, m = l === "y" ? F : V, b = n.rects.reference[d] + n.rects.reference[l] - c[l] - n.rects.popper[d], v = c[l] - n.rects.reference[l], T = Pe(i), M = T ? l === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, A = b / 2 - v / 2, E = _[p], g = M - h[d] - _[m], w = M / 2 - h[d] / 2 + A, P = Te(E, w, g), N = l;
|
|
909
|
+
n.modifiersData[o] = (t = {}, t[N] = P, t.centerOffset = P - w, t);
|
|
1153
910
|
}
|
|
1154
911
|
}
|
|
1155
|
-
function
|
|
1156
|
-
var t = e.state, n = e.options,
|
|
1157
|
-
if (
|
|
1158
|
-
if ({}.NODE_ENV !== "production" && (
|
|
912
|
+
function mo(e) {
|
|
913
|
+
var t = e.state, n = e.options, o = n.element, r = o === void 0 ? "[data-popper-arrow]" : o;
|
|
914
|
+
if (r != null && !(typeof r == "string" && (r = t.elements.popper.querySelector(r), !r))) {
|
|
915
|
+
if ({}.NODE_ENV !== "production" && (W(r) || console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "))), !Xt(t.elements.popper, r)) {
|
|
1159
916
|
({}).NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
|
|
1160
917
|
return;
|
|
1161
918
|
}
|
|
1162
|
-
t.elements.arrow =
|
|
919
|
+
t.elements.arrow = r;
|
|
1163
920
|
}
|
|
1164
921
|
}
|
|
1165
|
-
const
|
|
922
|
+
const vo = {
|
|
1166
923
|
name: "arrow",
|
|
1167
924
|
enabled: !0,
|
|
1168
925
|
phase: "main",
|
|
1169
|
-
fn:
|
|
1170
|
-
effect:
|
|
926
|
+
fn: ho,
|
|
927
|
+
effect: mo,
|
|
1171
928
|
requires: ["popperOffsets"],
|
|
1172
929
|
requiresIfExists: ["preventOverflow"]
|
|
1173
930
|
};
|
|
1174
|
-
function
|
|
931
|
+
function he(e) {
|
|
1175
932
|
return e.split("-")[1];
|
|
1176
933
|
}
|
|
1177
|
-
var
|
|
934
|
+
var Eo = {
|
|
1178
935
|
top: "auto",
|
|
1179
936
|
right: "auto",
|
|
1180
937
|
bottom: "auto",
|
|
1181
938
|
left: "auto"
|
|
1182
939
|
};
|
|
1183
|
-
function
|
|
1184
|
-
var n = e.x,
|
|
940
|
+
function bo(e, t) {
|
|
941
|
+
var n = e.x, o = e.y, r = t.devicePixelRatio || 1;
|
|
1185
942
|
return {
|
|
1186
|
-
x:
|
|
1187
|
-
y:
|
|
943
|
+
x: fe(n * r) / r || 0,
|
|
944
|
+
y: fe(o * r) / r || 0
|
|
1188
945
|
};
|
|
1189
946
|
}
|
|
1190
|
-
function
|
|
1191
|
-
var t, n = e.popper,
|
|
947
|
+
function Ut(e) {
|
|
948
|
+
var t, n = e.popper, o = e.popperRect, r = e.placement, i = e.variation, c = e.offsets, a = e.position, l = e.gpuAcceleration, u = e.adaptive, d = e.roundOffsets, _ = e.isFixed, h = c.x, p = h === void 0 ? 0 : h, m = c.y, b = m === void 0 ? 0 : m, v = typeof d == "function" ? d({
|
|
1192
949
|
x: p,
|
|
1193
|
-
y:
|
|
950
|
+
y: b
|
|
1194
951
|
}) : {
|
|
1195
952
|
x: p,
|
|
1196
|
-
y:
|
|
953
|
+
y: b
|
|
1197
954
|
};
|
|
1198
|
-
p = v.x,
|
|
1199
|
-
var T = c.hasOwnProperty("x"), M = c.hasOwnProperty("y"),
|
|
955
|
+
p = v.x, b = v.y;
|
|
956
|
+
var T = c.hasOwnProperty("x"), M = c.hasOwnProperty("y"), A = x, E = H, g = window;
|
|
1200
957
|
if (u) {
|
|
1201
|
-
var w =
|
|
1202
|
-
if (w ===
|
|
1203
|
-
|
|
1204
|
-
var S =
|
|
958
|
+
var w = Pe(n), P = "clientHeight", N = "clientWidth";
|
|
959
|
+
if (w === q(n) && (w = Q(n), z(w).position !== "static" && a === "absolute" && (P = "scrollHeight", N = "scrollWidth")), w = w, r === H || (r === x || r === V) && i === Me) {
|
|
960
|
+
E = F;
|
|
961
|
+
var S = _ && w === g && g.visualViewport ? g.visualViewport.height : (
|
|
1205
962
|
// $FlowFixMe[prop-missing]
|
|
1206
|
-
w[
|
|
963
|
+
w[P]
|
|
1207
964
|
);
|
|
1208
|
-
|
|
965
|
+
b -= S - o.height, b *= l ? 1 : -1;
|
|
1209
966
|
}
|
|
1210
|
-
if (
|
|
1211
|
-
|
|
1212
|
-
var U =
|
|
967
|
+
if (r === x || (r === H || r === F) && i === Me) {
|
|
968
|
+
A = V;
|
|
969
|
+
var U = _ && w === g && g.visualViewport ? g.visualViewport.width : (
|
|
1213
970
|
// $FlowFixMe[prop-missing]
|
|
1214
971
|
w[N]
|
|
1215
972
|
);
|
|
1216
|
-
p -= U -
|
|
973
|
+
p -= U - o.width, p *= l ? 1 : -1;
|
|
1217
974
|
}
|
|
1218
975
|
}
|
|
1219
|
-
var
|
|
976
|
+
var O = Object.assign({
|
|
1220
977
|
position: a
|
|
1221
|
-
}, u &&
|
|
978
|
+
}, u && Eo), R = d === !0 ? bo({
|
|
1222
979
|
x: p,
|
|
1223
|
-
y:
|
|
1224
|
-
},
|
|
980
|
+
y: b
|
|
981
|
+
}, q(n)) : {
|
|
1225
982
|
x: p,
|
|
1226
|
-
y:
|
|
983
|
+
y: b
|
|
1227
984
|
};
|
|
1228
|
-
if (p =
|
|
1229
|
-
var
|
|
1230
|
-
return Object.assign({},
|
|
985
|
+
if (p = R.x, b = R.y, l) {
|
|
986
|
+
var D;
|
|
987
|
+
return Object.assign({}, O, (D = {}, D[E] = M ? "0" : "", D[A] = T ? "0" : "", D.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + b + "px)" : "translate3d(" + p + "px, " + b + "px, 0)", D));
|
|
1231
988
|
}
|
|
1232
|
-
return Object.assign({},
|
|
989
|
+
return Object.assign({}, O, (t = {}, t[E] = M ? b + "px" : "", t[A] = T ? p + "px" : "", t.transform = "", t));
|
|
1233
990
|
}
|
|
1234
|
-
function
|
|
1235
|
-
var t = e.state, n = e.options,
|
|
991
|
+
function go(e) {
|
|
992
|
+
var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, i = n.adaptive, c = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a;
|
|
1236
993
|
if ({}.NODE_ENV !== "production") {
|
|
1237
|
-
var u =
|
|
1238
|
-
c && ["transform", "top", "right", "bottom", "left"].some(function(
|
|
1239
|
-
return u.indexOf(
|
|
994
|
+
var u = z(t.elements.popper).transitionProperty || "";
|
|
995
|
+
c && ["transform", "top", "right", "bottom", "left"].some(function(_) {
|
|
996
|
+
return u.indexOf(_) >= 0;
|
|
1240
997
|
}) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `
|
|
1241
998
|
|
|
1242
999
|
`, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", `
|
|
@@ -1245,18 +1002,18 @@ function gr(e) {
|
|
|
1245
1002
|
}
|
|
1246
1003
|
var d = {
|
|
1247
1004
|
placement: j(t.placement),
|
|
1248
|
-
variation:
|
|
1005
|
+
variation: he(t.placement),
|
|
1249
1006
|
popper: t.elements.popper,
|
|
1250
1007
|
popperRect: t.rects.popper,
|
|
1251
|
-
gpuAcceleration:
|
|
1008
|
+
gpuAcceleration: r,
|
|
1252
1009
|
isFixed: t.options.strategy === "fixed"
|
|
1253
1010
|
};
|
|
1254
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1011
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ut(Object.assign({}, d, {
|
|
1255
1012
|
offsets: t.modifiersData.popperOffsets,
|
|
1256
1013
|
position: t.options.strategy,
|
|
1257
1014
|
adaptive: c,
|
|
1258
1015
|
roundOffsets: l
|
|
1259
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1016
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ut(Object.assign({}, d, {
|
|
1260
1017
|
offsets: t.modifiersData.arrow,
|
|
1261
1018
|
position: "absolute",
|
|
1262
1019
|
adaptive: !1,
|
|
@@ -1265,105 +1022,105 @@ function gr(e) {
|
|
|
1265
1022
|
"data-popper-placement": t.placement
|
|
1266
1023
|
});
|
|
1267
1024
|
}
|
|
1268
|
-
const
|
|
1025
|
+
const Io = {
|
|
1269
1026
|
name: "computeStyles",
|
|
1270
1027
|
enabled: !0,
|
|
1271
1028
|
phase: "beforeWrite",
|
|
1272
|
-
fn:
|
|
1029
|
+
fn: go,
|
|
1273
1030
|
data: {}
|
|
1274
1031
|
};
|
|
1275
|
-
var
|
|
1032
|
+
var De = {
|
|
1276
1033
|
passive: !0
|
|
1277
1034
|
};
|
|
1278
|
-
function
|
|
1279
|
-
var t = e.state, n = e.instance,
|
|
1035
|
+
function To(e) {
|
|
1036
|
+
var t = e.state, n = e.instance, o = e.options, r = o.scroll, i = r === void 0 ? !0 : r, c = o.resize, a = c === void 0 ? !0 : c, l = q(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1280
1037
|
return i && u.forEach(function(d) {
|
|
1281
|
-
d.addEventListener("scroll", n.update,
|
|
1282
|
-
}), a && l.addEventListener("resize", n.update,
|
|
1038
|
+
d.addEventListener("scroll", n.update, De);
|
|
1039
|
+
}), a && l.addEventListener("resize", n.update, De), function() {
|
|
1283
1040
|
i && u.forEach(function(d) {
|
|
1284
|
-
d.removeEventListener("scroll", n.update,
|
|
1285
|
-
}), a && l.removeEventListener("resize", n.update,
|
|
1041
|
+
d.removeEventListener("scroll", n.update, De);
|
|
1042
|
+
}), a && l.removeEventListener("resize", n.update, De);
|
|
1286
1043
|
};
|
|
1287
1044
|
}
|
|
1288
|
-
const
|
|
1045
|
+
const wo = {
|
|
1289
1046
|
name: "eventListeners",
|
|
1290
1047
|
enabled: !0,
|
|
1291
1048
|
phase: "write",
|
|
1292
1049
|
fn: function() {
|
|
1293
1050
|
},
|
|
1294
|
-
effect:
|
|
1051
|
+
effect: To,
|
|
1295
1052
|
data: {}
|
|
1296
1053
|
};
|
|
1297
|
-
var
|
|
1054
|
+
var Mo = {
|
|
1298
1055
|
left: "right",
|
|
1299
1056
|
right: "left",
|
|
1300
1057
|
bottom: "top",
|
|
1301
1058
|
top: "bottom"
|
|
1302
1059
|
};
|
|
1303
|
-
function
|
|
1060
|
+
function Be(e) {
|
|
1304
1061
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1305
|
-
return
|
|
1062
|
+
return Mo[t];
|
|
1306
1063
|
});
|
|
1307
1064
|
}
|
|
1308
|
-
var
|
|
1065
|
+
var Ao = {
|
|
1309
1066
|
start: "end",
|
|
1310
1067
|
end: "start"
|
|
1311
1068
|
};
|
|
1312
|
-
function
|
|
1069
|
+
function Ct(e) {
|
|
1313
1070
|
return e.replace(/start|end/g, function(t) {
|
|
1314
|
-
return
|
|
1071
|
+
return Ao[t];
|
|
1315
1072
|
});
|
|
1316
1073
|
}
|
|
1317
|
-
function
|
|
1318
|
-
var t =
|
|
1074
|
+
function ut(e) {
|
|
1075
|
+
var t = q(e), n = t.pageXOffset, o = t.pageYOffset;
|
|
1319
1076
|
return {
|
|
1320
1077
|
scrollLeft: n,
|
|
1321
|
-
scrollTop:
|
|
1078
|
+
scrollTop: o
|
|
1322
1079
|
};
|
|
1323
1080
|
}
|
|
1324
|
-
function
|
|
1325
|
-
return
|
|
1081
|
+
function dt(e) {
|
|
1082
|
+
return _e(Q(e)).left + ut(e).scrollLeft;
|
|
1326
1083
|
}
|
|
1327
|
-
function
|
|
1328
|
-
var n =
|
|
1329
|
-
if (
|
|
1330
|
-
i =
|
|
1331
|
-
var u =
|
|
1332
|
-
(u || !u && t === "fixed") && (a =
|
|
1084
|
+
function Oo(e, t) {
|
|
1085
|
+
var n = q(e), o = Q(e), r = n.visualViewport, i = o.clientWidth, c = o.clientHeight, a = 0, l = 0;
|
|
1086
|
+
if (r) {
|
|
1087
|
+
i = r.width, c = r.height;
|
|
1088
|
+
var u = Zt();
|
|
1089
|
+
(u || !u && t === "fixed") && (a = r.offsetLeft, l = r.offsetTop);
|
|
1333
1090
|
}
|
|
1334
1091
|
return {
|
|
1335
1092
|
width: i,
|
|
1336
1093
|
height: c,
|
|
1337
|
-
x: a +
|
|
1094
|
+
x: a + dt(e),
|
|
1338
1095
|
y: l
|
|
1339
1096
|
};
|
|
1340
1097
|
}
|
|
1341
|
-
function
|
|
1342
|
-
var t, n = Q(e),
|
|
1343
|
-
return
|
|
1098
|
+
function yo(e) {
|
|
1099
|
+
var t, n = Q(e), o = ut(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, i = le(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), c = le(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), a = -o.scrollLeft + dt(e), l = -o.scrollTop;
|
|
1100
|
+
return z(r || n).direction === "rtl" && (a += le(n.clientWidth, r ? r.clientWidth : 0) - i), {
|
|
1344
1101
|
width: i,
|
|
1345
1102
|
height: c,
|
|
1346
1103
|
x: a,
|
|
1347
1104
|
y: l
|
|
1348
1105
|
};
|
|
1349
1106
|
}
|
|
1350
|
-
function
|
|
1351
|
-
var t =
|
|
1352
|
-
return /auto|scroll|overlay|hidden/.test(n +
|
|
1107
|
+
function pt(e) {
|
|
1108
|
+
var t = z(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
|
|
1109
|
+
return /auto|scroll|overlay|hidden/.test(n + r + o);
|
|
1353
1110
|
}
|
|
1354
|
-
function
|
|
1355
|
-
return ["html", "body", "#document"].indexOf(K(e)) >= 0 ? e.ownerDocument.body :
|
|
1111
|
+
function tn(e) {
|
|
1112
|
+
return ["html", "body", "#document"].indexOf(K(e)) >= 0 ? e.ownerDocument.body : W(e) && pt(e) ? e : tn(Ve(e));
|
|
1356
1113
|
}
|
|
1357
|
-
function
|
|
1114
|
+
function we(e, t) {
|
|
1358
1115
|
var n;
|
|
1359
1116
|
t === void 0 && (t = []);
|
|
1360
|
-
var
|
|
1361
|
-
return
|
|
1117
|
+
var o = tn(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), i = q(o), c = r ? [i].concat(i.visualViewport || [], pt(o) ? o : []) : o, a = t.concat(c);
|
|
1118
|
+
return r ? a : (
|
|
1362
1119
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1363
|
-
a.concat(
|
|
1120
|
+
a.concat(we(Ve(c)))
|
|
1364
1121
|
);
|
|
1365
1122
|
}
|
|
1366
|
-
function
|
|
1123
|
+
function Je(e) {
|
|
1367
1124
|
return Object.assign({}, e, {
|
|
1368
1125
|
left: e.x,
|
|
1369
1126
|
top: e.y,
|
|
@@ -1371,48 +1128,48 @@ function ze(e) {
|
|
|
1371
1128
|
bottom: e.y + e.height
|
|
1372
1129
|
});
|
|
1373
1130
|
}
|
|
1374
|
-
function
|
|
1375
|
-
var n =
|
|
1131
|
+
function Lo(e, t) {
|
|
1132
|
+
var n = _e(e, !1, t === "fixed");
|
|
1376
1133
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1377
1134
|
}
|
|
1378
|
-
function
|
|
1379
|
-
return t ===
|
|
1135
|
+
function Rt(e, t, n) {
|
|
1136
|
+
return t === Yt ? Je(Oo(e, n)) : ce(t) ? Lo(t, n) : Je(yo(Q(e)));
|
|
1380
1137
|
}
|
|
1381
|
-
function
|
|
1382
|
-
var t =
|
|
1383
|
-
return
|
|
1384
|
-
return
|
|
1138
|
+
function Po(e) {
|
|
1139
|
+
var t = we(Ve(e)), n = ["absolute", "fixed"].indexOf(z(e).position) >= 0, o = n && W(e) ? Pe(e) : e;
|
|
1140
|
+
return ce(o) ? t.filter(function(r) {
|
|
1141
|
+
return ce(r) && Xt(r, o) && K(r) !== "body";
|
|
1385
1142
|
}) : [];
|
|
1386
1143
|
}
|
|
1387
|
-
function
|
|
1388
|
-
var
|
|
1389
|
-
var d =
|
|
1390
|
-
return l.top =
|
|
1391
|
-
},
|
|
1144
|
+
function No(e, t, n, o) {
|
|
1145
|
+
var r = t === "clippingParents" ? Po(e) : [].concat(t), i = [].concat(r, [n]), c = i[0], a = i.reduce(function(l, u) {
|
|
1146
|
+
var d = Rt(e, u, o);
|
|
1147
|
+
return l.top = le(d.top, l.top), l.right = qe(d.right, l.right), l.bottom = qe(d.bottom, l.bottom), l.left = le(d.left, l.left), l;
|
|
1148
|
+
}, Rt(e, c, o));
|
|
1392
1149
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
1393
1150
|
}
|
|
1394
|
-
function
|
|
1395
|
-
var t = e.reference, n = e.element,
|
|
1396
|
-
switch (
|
|
1397
|
-
case
|
|
1151
|
+
function nn(e) {
|
|
1152
|
+
var t = e.reference, n = e.element, o = e.placement, r = o ? j(o) : null, i = o ? he(o) : null, c = t.x + t.width / 2 - n.width / 2, a = t.y + t.height / 2 - n.height / 2, l;
|
|
1153
|
+
switch (r) {
|
|
1154
|
+
case H:
|
|
1398
1155
|
l = {
|
|
1399
1156
|
x: c,
|
|
1400
1157
|
y: t.y - n.height
|
|
1401
1158
|
};
|
|
1402
1159
|
break;
|
|
1403
|
-
case
|
|
1160
|
+
case F:
|
|
1404
1161
|
l = {
|
|
1405
1162
|
x: c,
|
|
1406
1163
|
y: t.y + t.height
|
|
1407
1164
|
};
|
|
1408
1165
|
break;
|
|
1409
|
-
case
|
|
1166
|
+
case V:
|
|
1410
1167
|
l = {
|
|
1411
1168
|
x: t.x + t.width,
|
|
1412
1169
|
y: a
|
|
1413
1170
|
};
|
|
1414
1171
|
break;
|
|
1415
|
-
case
|
|
1172
|
+
case x:
|
|
1416
1173
|
l = {
|
|
1417
1174
|
x: t.x - n.width,
|
|
1418
1175
|
y: a
|
|
@@ -1424,128 +1181,128 @@ function Qt(e) {
|
|
|
1424
1181
|
y: t.y
|
|
1425
1182
|
};
|
|
1426
1183
|
}
|
|
1427
|
-
var u =
|
|
1184
|
+
var u = r ? ct(r) : null;
|
|
1428
1185
|
if (u != null) {
|
|
1429
1186
|
var d = u === "y" ? "height" : "width";
|
|
1430
1187
|
switch (i) {
|
|
1431
|
-
case
|
|
1188
|
+
case pe:
|
|
1432
1189
|
l[u] = l[u] - (t[d] / 2 - n[d] / 2);
|
|
1433
1190
|
break;
|
|
1434
|
-
case
|
|
1191
|
+
case Me:
|
|
1435
1192
|
l[u] = l[u] + (t[d] / 2 - n[d] / 2);
|
|
1436
1193
|
break;
|
|
1437
1194
|
}
|
|
1438
1195
|
}
|
|
1439
1196
|
return l;
|
|
1440
1197
|
}
|
|
1441
|
-
function
|
|
1198
|
+
function Ae(e, t) {
|
|
1442
1199
|
t === void 0 && (t = {});
|
|
1443
|
-
var n = t,
|
|
1200
|
+
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, i = n.strategy, c = i === void 0 ? e.strategy : i, a = n.boundary, l = a === void 0 ? Zn : a, u = n.rootBoundary, d = u === void 0 ? Yt : u, _ = n.elementContext, h = _ === void 0 ? be : _, p = n.altBoundary, m = p === void 0 ? !1 : p, b = n.padding, v = b === void 0 ? 0 : b, T = Qt(typeof v != "number" ? v : en(v, Le)), M = h === be ? Xn : be, A = e.rects.popper, E = e.elements[m ? M : h], g = No(ce(E) ? E : E.contextElement || Q(e.elements.popper), l, d, c), w = _e(e.elements.reference), P = nn({
|
|
1444
1201
|
reference: w,
|
|
1445
|
-
element:
|
|
1202
|
+
element: A,
|
|
1446
1203
|
strategy: "absolute",
|
|
1447
|
-
placement:
|
|
1448
|
-
}), N =
|
|
1204
|
+
placement: r
|
|
1205
|
+
}), N = Je(Object.assign({}, A, P)), S = h === be ? N : w, U = {
|
|
1449
1206
|
top: g.top - S.top + T.top,
|
|
1450
1207
|
bottom: S.bottom - g.bottom + T.bottom,
|
|
1451
1208
|
left: g.left - S.left + T.left,
|
|
1452
1209
|
right: S.right - g.right + T.right
|
|
1453
|
-
},
|
|
1454
|
-
if (
|
|
1455
|
-
var
|
|
1456
|
-
Object.keys(U).forEach(function(
|
|
1457
|
-
var
|
|
1458
|
-
U[
|
|
1210
|
+
}, O = e.modifiersData.offset;
|
|
1211
|
+
if (h === be && O) {
|
|
1212
|
+
var R = O[r];
|
|
1213
|
+
Object.keys(U).forEach(function(D) {
|
|
1214
|
+
var ee = [V, F].indexOf(D) >= 0 ? 1 : -1, te = [H, F].indexOf(D) >= 0 ? "y" : "x";
|
|
1215
|
+
U[D] += R[te] * ee;
|
|
1459
1216
|
});
|
|
1460
1217
|
}
|
|
1461
1218
|
return U;
|
|
1462
1219
|
}
|
|
1463
|
-
function
|
|
1220
|
+
function So(e, t) {
|
|
1464
1221
|
t === void 0 && (t = {});
|
|
1465
|
-
var n = t,
|
|
1466
|
-
return
|
|
1467
|
-
}) :
|
|
1222
|
+
var n = t, o = n.placement, r = n.boundary, i = n.rootBoundary, c = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Kt : l, d = he(o), _ = d ? a ? Nt : Nt.filter(function(m) {
|
|
1223
|
+
return he(m) === d;
|
|
1224
|
+
}) : Le, h = _.filter(function(m) {
|
|
1468
1225
|
return u.indexOf(m) >= 0;
|
|
1469
1226
|
});
|
|
1470
|
-
|
|
1471
|
-
var p =
|
|
1472
|
-
return m[
|
|
1473
|
-
placement:
|
|
1474
|
-
boundary:
|
|
1227
|
+
h.length === 0 && (h = _, {}.NODE_ENV !== "production" && console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" ")));
|
|
1228
|
+
var p = h.reduce(function(m, b) {
|
|
1229
|
+
return m[b] = Ae(e, {
|
|
1230
|
+
placement: b,
|
|
1231
|
+
boundary: r,
|
|
1475
1232
|
rootBoundary: i,
|
|
1476
1233
|
padding: c
|
|
1477
|
-
})[j(
|
|
1234
|
+
})[j(b)], m;
|
|
1478
1235
|
}, {});
|
|
1479
|
-
return Object.keys(p).sort(function(m,
|
|
1480
|
-
return p[m] - p[
|
|
1236
|
+
return Object.keys(p).sort(function(m, b) {
|
|
1237
|
+
return p[m] - p[b];
|
|
1481
1238
|
});
|
|
1482
1239
|
}
|
|
1483
|
-
function
|
|
1484
|
-
if (j(e) ===
|
|
1240
|
+
function Uo(e) {
|
|
1241
|
+
if (j(e) === Fe)
|
|
1485
1242
|
return [];
|
|
1486
|
-
var t =
|
|
1487
|
-
return [
|
|
1488
|
-
}
|
|
1489
|
-
function
|
|
1490
|
-
var t = e.state, n = e.options,
|
|
1491
|
-
if (!t.modifiersData[
|
|
1492
|
-
for (var
|
|
1493
|
-
return
|
|
1243
|
+
var t = Be(e);
|
|
1244
|
+
return [Ct(e), t, Ct(t)];
|
|
1245
|
+
}
|
|
1246
|
+
function Co(e) {
|
|
1247
|
+
var t = e.state, n = e.options, o = e.name;
|
|
1248
|
+
if (!t.modifiersData[o]._skip) {
|
|
1249
|
+
for (var r = n.mainAxis, i = r === void 0 ? !0 : r, c = n.altAxis, a = c === void 0 ? !0 : c, l = n.fallbackPlacements, u = n.padding, d = n.boundary, _ = n.rootBoundary, h = n.altBoundary, p = n.flipVariations, m = p === void 0 ? !0 : p, b = n.allowedAutoPlacements, v = t.options.placement, T = j(v), M = T === v, A = l || (M || !m ? [Be(v)] : Uo(v)), E = [v].concat(A).reduce(function(ue, Z) {
|
|
1250
|
+
return ue.concat(j(Z) === Fe ? So(t, {
|
|
1494
1251
|
placement: Z,
|
|
1495
1252
|
boundary: d,
|
|
1496
|
-
rootBoundary:
|
|
1253
|
+
rootBoundary: _,
|
|
1497
1254
|
padding: u,
|
|
1498
1255
|
flipVariations: m,
|
|
1499
|
-
allowedAutoPlacements:
|
|
1256
|
+
allowedAutoPlacements: b
|
|
1500
1257
|
}) : Z);
|
|
1501
|
-
}, []), g = t.rects.reference, w = t.rects.popper,
|
|
1502
|
-
var
|
|
1503
|
-
placement:
|
|
1258
|
+
}, []), g = t.rects.reference, w = t.rects.popper, P = /* @__PURE__ */ new Map(), N = !0, S = E[0], U = 0; U < E.length; U++) {
|
|
1259
|
+
var O = E[U], R = j(O), D = he(O) === pe, ee = [H, F].indexOf(R) >= 0, te = ee ? "width" : "height", B = Ae(t, {
|
|
1260
|
+
placement: O,
|
|
1504
1261
|
boundary: d,
|
|
1505
|
-
rootBoundary:
|
|
1506
|
-
altBoundary:
|
|
1262
|
+
rootBoundary: _,
|
|
1263
|
+
altBoundary: h,
|
|
1507
1264
|
padding: u
|
|
1508
|
-
}),
|
|
1509
|
-
g[
|
|
1510
|
-
var
|
|
1511
|
-
if (i &&
|
|
1512
|
-
return
|
|
1265
|
+
}), G = ee ? D ? V : x : D ? F : H;
|
|
1266
|
+
g[te] > w[te] && (G = Be(G));
|
|
1267
|
+
var Ne = Be(G), ne = [];
|
|
1268
|
+
if (i && ne.push(B[R] <= 0), a && ne.push(B[G] <= 0, B[Ne] <= 0), ne.every(function(ue) {
|
|
1269
|
+
return ue;
|
|
1513
1270
|
})) {
|
|
1514
|
-
S =
|
|
1271
|
+
S = O, N = !1;
|
|
1515
1272
|
break;
|
|
1516
1273
|
}
|
|
1517
|
-
|
|
1274
|
+
P.set(O, ne);
|
|
1518
1275
|
}
|
|
1519
1276
|
if (N)
|
|
1520
|
-
for (var
|
|
1521
|
-
var
|
|
1522
|
-
var
|
|
1523
|
-
if (
|
|
1524
|
-
return
|
|
1525
|
-
return
|
|
1277
|
+
for (var Se = m ? 3 : 1, Ge = function(Z) {
|
|
1278
|
+
var Ee = E.find(function(Ce) {
|
|
1279
|
+
var oe = P.get(Ce);
|
|
1280
|
+
if (oe)
|
|
1281
|
+
return oe.slice(0, Z).every(function($e) {
|
|
1282
|
+
return $e;
|
|
1526
1283
|
});
|
|
1527
1284
|
});
|
|
1528
|
-
if (
|
|
1529
|
-
return S =
|
|
1530
|
-
},
|
|
1531
|
-
var
|
|
1532
|
-
if (
|
|
1285
|
+
if (Ee)
|
|
1286
|
+
return S = Ee, "break";
|
|
1287
|
+
}, ve = Se; ve > 0; ve--) {
|
|
1288
|
+
var Ue = Ge(ve);
|
|
1289
|
+
if (Ue === "break")
|
|
1533
1290
|
break;
|
|
1534
1291
|
}
|
|
1535
|
-
t.placement !== S && (t.modifiersData[
|
|
1292
|
+
t.placement !== S && (t.modifiersData[o]._skip = !0, t.placement = S, t.reset = !0);
|
|
1536
1293
|
}
|
|
1537
1294
|
}
|
|
1538
|
-
const
|
|
1295
|
+
const Ro = {
|
|
1539
1296
|
name: "flip",
|
|
1540
1297
|
enabled: !0,
|
|
1541
1298
|
phase: "main",
|
|
1542
|
-
fn:
|
|
1299
|
+
fn: Co,
|
|
1543
1300
|
requiresIfExists: ["offset"],
|
|
1544
1301
|
data: {
|
|
1545
1302
|
_skip: !1
|
|
1546
1303
|
}
|
|
1547
1304
|
};
|
|
1548
|
-
function
|
|
1305
|
+
function Dt(e, t, n) {
|
|
1549
1306
|
return n === void 0 && (n = {
|
|
1550
1307
|
x: 0,
|
|
1551
1308
|
y: 0
|
|
@@ -1556,39 +1313,39 @@ function Ut(e, t, n) {
|
|
|
1556
1313
|
left: e.left - t.width - n.x
|
|
1557
1314
|
};
|
|
1558
1315
|
}
|
|
1559
|
-
function
|
|
1560
|
-
return [
|
|
1316
|
+
function Ht(e) {
|
|
1317
|
+
return [H, V, F, x].some(function(t) {
|
|
1561
1318
|
return e[t] >= 0;
|
|
1562
1319
|
});
|
|
1563
1320
|
}
|
|
1564
|
-
function
|
|
1565
|
-
var t = e.state, n = e.name,
|
|
1321
|
+
function Do(e) {
|
|
1322
|
+
var t = e.state, n = e.name, o = t.rects.reference, r = t.rects.popper, i = t.modifiersData.preventOverflow, c = Ae(t, {
|
|
1566
1323
|
elementContext: "reference"
|
|
1567
|
-
}), a =
|
|
1324
|
+
}), a = Ae(t, {
|
|
1568
1325
|
altBoundary: !0
|
|
1569
|
-
}), l =
|
|
1326
|
+
}), l = Dt(c, o), u = Dt(a, r, i), d = Ht(l), _ = Ht(u);
|
|
1570
1327
|
t.modifiersData[n] = {
|
|
1571
1328
|
referenceClippingOffsets: l,
|
|
1572
1329
|
popperEscapeOffsets: u,
|
|
1573
1330
|
isReferenceHidden: d,
|
|
1574
|
-
hasPopperEscaped:
|
|
1331
|
+
hasPopperEscaped: _
|
|
1575
1332
|
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1576
1333
|
"data-popper-reference-hidden": d,
|
|
1577
|
-
"data-popper-escaped":
|
|
1334
|
+
"data-popper-escaped": _
|
|
1578
1335
|
});
|
|
1579
1336
|
}
|
|
1580
|
-
const
|
|
1337
|
+
const Ho = {
|
|
1581
1338
|
name: "hide",
|
|
1582
1339
|
enabled: !0,
|
|
1583
1340
|
phase: "main",
|
|
1584
1341
|
requiresIfExists: ["preventOverflow"],
|
|
1585
|
-
fn:
|
|
1342
|
+
fn: Do
|
|
1586
1343
|
};
|
|
1587
|
-
function
|
|
1588
|
-
var
|
|
1344
|
+
function xo(e, t, n) {
|
|
1345
|
+
var o = j(e), r = [x, H].indexOf(o) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, t, {
|
|
1589
1346
|
placement: e
|
|
1590
1347
|
})) : n, c = i[0], a = i[1];
|
|
1591
|
-
return c = c || 0, a = (a || 0) *
|
|
1348
|
+
return c = c || 0, a = (a || 0) * r, [x, V].indexOf(o) >= 0 ? {
|
|
1592
1349
|
x: a,
|
|
1593
1350
|
y: c
|
|
1594
1351
|
} : {
|
|
@@ -1596,136 +1353,136 @@ function Hr(e, t, n) {
|
|
|
1596
1353
|
y: a
|
|
1597
1354
|
};
|
|
1598
1355
|
}
|
|
1599
|
-
function
|
|
1600
|
-
var t = e.state, n = e.options,
|
|
1601
|
-
return d[
|
|
1356
|
+
function Bo(e) {
|
|
1357
|
+
var t = e.state, n = e.options, o = e.name, r = n.offset, i = r === void 0 ? [0, 0] : r, c = Kt.reduce(function(d, _) {
|
|
1358
|
+
return d[_] = xo(_, t.rects, i), d;
|
|
1602
1359
|
}, {}), a = c[t.placement], l = a.x, u = a.y;
|
|
1603
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[
|
|
1360
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += u), t.modifiersData[o] = c;
|
|
1604
1361
|
}
|
|
1605
|
-
const
|
|
1362
|
+
const ko = {
|
|
1606
1363
|
name: "offset",
|
|
1607
1364
|
enabled: !0,
|
|
1608
1365
|
phase: "main",
|
|
1609
1366
|
requires: ["popperOffsets"],
|
|
1610
|
-
fn:
|
|
1367
|
+
fn: Bo
|
|
1611
1368
|
};
|
|
1612
|
-
function
|
|
1369
|
+
function Wo(e) {
|
|
1613
1370
|
var t = e.state, n = e.name;
|
|
1614
|
-
t.modifiersData[n] =
|
|
1371
|
+
t.modifiersData[n] = nn({
|
|
1615
1372
|
reference: t.rects.reference,
|
|
1616
1373
|
element: t.rects.popper,
|
|
1617
1374
|
strategy: "absolute",
|
|
1618
1375
|
placement: t.placement
|
|
1619
1376
|
});
|
|
1620
1377
|
}
|
|
1621
|
-
const
|
|
1378
|
+
const qo = {
|
|
1622
1379
|
name: "popperOffsets",
|
|
1623
1380
|
enabled: !0,
|
|
1624
1381
|
phase: "read",
|
|
1625
|
-
fn:
|
|
1382
|
+
fn: Wo,
|
|
1626
1383
|
data: {}
|
|
1627
1384
|
};
|
|
1628
|
-
function
|
|
1385
|
+
function Fo(e) {
|
|
1629
1386
|
return e === "x" ? "y" : "x";
|
|
1630
1387
|
}
|
|
1631
|
-
function
|
|
1632
|
-
var t = e.state, n = e.options,
|
|
1388
|
+
function Vo(e) {
|
|
1389
|
+
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, i = r === void 0 ? !0 : r, c = n.altAxis, a = c === void 0 ? !1 : c, l = n.boundary, u = n.rootBoundary, d = n.altBoundary, _ = n.padding, h = n.tether, p = h === void 0 ? !0 : h, m = n.tetherOffset, b = m === void 0 ? 0 : m, v = Ae(t, {
|
|
1633
1390
|
boundary: l,
|
|
1634
1391
|
rootBoundary: u,
|
|
1635
|
-
padding:
|
|
1392
|
+
padding: _,
|
|
1636
1393
|
altBoundary: d
|
|
1637
|
-
}), T = j(t.placement), M =
|
|
1394
|
+
}), T = j(t.placement), M = he(t.placement), A = !M, E = ct(T), g = Fo(E), w = t.modifiersData.popperOffsets, P = t.rects.reference, N = t.rects.popper, S = typeof b == "function" ? b(Object.assign({}, t.rects, {
|
|
1638
1395
|
placement: t.placement
|
|
1639
|
-
})) :
|
|
1396
|
+
})) : b, U = typeof S == "number" ? {
|
|
1640
1397
|
mainAxis: S,
|
|
1641
1398
|
altAxis: S
|
|
1642
1399
|
} : Object.assign({
|
|
1643
1400
|
mainAxis: 0,
|
|
1644
1401
|
altAxis: 0
|
|
1645
|
-
}, S),
|
|
1402
|
+
}, S), O = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, R = {
|
|
1646
1403
|
x: 0,
|
|
1647
1404
|
y: 0
|
|
1648
1405
|
};
|
|
1649
1406
|
if (w) {
|
|
1650
1407
|
if (i) {
|
|
1651
|
-
var
|
|
1408
|
+
var D, ee = E === "y" ? H : x, te = E === "y" ? F : V, B = E === "y" ? "height" : "width", G = w[E], Ne = G + v[ee], ne = G - v[te], Se = p ? -N[B] / 2 : 0, Ge = M === pe ? P[B] : N[B], ve = M === pe ? -N[B] : -P[B], Ue = t.elements.arrow, ue = p && Ue ? lt(Ue) : {
|
|
1652
1409
|
width: 0,
|
|
1653
1410
|
height: 0
|
|
1654
|
-
}, Z = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
1655
|
-
w[
|
|
1411
|
+
}, Z = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Jt(), Ee = Z[ee], Ce = Z[te], oe = Te(0, P[B], ue[B]), $e = A ? P[B] / 2 - Se - oe - Ee - U.mainAxis : Ge - oe - Ee - U.mainAxis, pn = A ? -P[B] / 2 + Se + oe + Ce + U.mainAxis : ve + oe + Ce + U.mainAxis, je = t.elements.arrow && Pe(t.elements.arrow), fn = je ? E === "y" ? je.clientTop || 0 : je.clientLeft || 0 : 0, vt = (D = O == null ? void 0 : O[E]) != null ? D : 0, _n = G + $e - vt - fn, hn = G + pn - vt, Et = Te(p ? qe(Ne, _n) : Ne, G, p ? le(ne, hn) : ne);
|
|
1412
|
+
w[E] = Et, R[E] = Et - G;
|
|
1656
1413
|
}
|
|
1657
1414
|
if (a) {
|
|
1658
|
-
var
|
|
1659
|
-
w[g] =
|
|
1415
|
+
var bt, mn = E === "x" ? H : x, vn = E === "x" ? F : V, re = w[g], Re = g === "y" ? "height" : "width", gt = re + v[mn], It = re - v[vn], ze = [H, x].indexOf(T) !== -1, Tt = (bt = O == null ? void 0 : O[g]) != null ? bt : 0, wt = ze ? gt : re - P[Re] - N[Re] - Tt + U.altAxis, Mt = ze ? re + P[Re] + N[Re] - Tt - U.altAxis : It, At = p && ze ? fo(wt, re, Mt) : Te(p ? wt : gt, re, p ? Mt : It);
|
|
1416
|
+
w[g] = At, R[g] = At - re;
|
|
1660
1417
|
}
|
|
1661
|
-
t.modifiersData[
|
|
1418
|
+
t.modifiersData[o] = R;
|
|
1662
1419
|
}
|
|
1663
1420
|
}
|
|
1664
|
-
const
|
|
1421
|
+
const Go = {
|
|
1665
1422
|
name: "preventOverflow",
|
|
1666
1423
|
enabled: !0,
|
|
1667
1424
|
phase: "main",
|
|
1668
|
-
fn:
|
|
1425
|
+
fn: Vo,
|
|
1669
1426
|
requiresIfExists: ["offset"]
|
|
1670
1427
|
};
|
|
1671
|
-
function $
|
|
1428
|
+
function $o(e) {
|
|
1672
1429
|
return {
|
|
1673
1430
|
scrollLeft: e.scrollLeft,
|
|
1674
1431
|
scrollTop: e.scrollTop
|
|
1675
1432
|
};
|
|
1676
1433
|
}
|
|
1677
|
-
function
|
|
1678
|
-
return e ===
|
|
1434
|
+
function jo(e) {
|
|
1435
|
+
return e === q(e) || !W(e) ? ut(e) : $o(e);
|
|
1679
1436
|
}
|
|
1680
|
-
function
|
|
1681
|
-
var t = e.getBoundingClientRect(), n =
|
|
1682
|
-
return n !== 1 ||
|
|
1437
|
+
function zo(e) {
|
|
1438
|
+
var t = e.getBoundingClientRect(), n = fe(t.width) / e.offsetWidth || 1, o = fe(t.height) / e.offsetHeight || 1;
|
|
1439
|
+
return n !== 1 || o !== 1;
|
|
1683
1440
|
}
|
|
1684
|
-
function
|
|
1441
|
+
function Yo(e, t, n) {
|
|
1685
1442
|
n === void 0 && (n = !1);
|
|
1686
|
-
var
|
|
1443
|
+
var o = W(t), r = W(t) && zo(t), i = Q(t), c = _e(e, r, n), a = {
|
|
1687
1444
|
scrollLeft: 0,
|
|
1688
1445
|
scrollTop: 0
|
|
1689
1446
|
}, l = {
|
|
1690
1447
|
x: 0,
|
|
1691
1448
|
y: 0
|
|
1692
1449
|
};
|
|
1693
|
-
return (
|
|
1694
|
-
|
|
1450
|
+
return (o || !o && !n) && ((K(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1451
|
+
pt(i)) && (a = jo(t)), W(t) ? (l = _e(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : i && (l.x = dt(i))), {
|
|
1695
1452
|
x: c.left + a.scrollLeft - l.x,
|
|
1696
1453
|
y: c.top + a.scrollTop - l.y,
|
|
1697
1454
|
width: c.width,
|
|
1698
1455
|
height: c.height
|
|
1699
1456
|
};
|
|
1700
1457
|
}
|
|
1701
|
-
function
|
|
1702
|
-
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(),
|
|
1458
|
+
function Ko(e) {
|
|
1459
|
+
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o = [];
|
|
1703
1460
|
e.forEach(function(i) {
|
|
1704
1461
|
t.set(i.name, i);
|
|
1705
1462
|
});
|
|
1706
|
-
function
|
|
1463
|
+
function r(i) {
|
|
1707
1464
|
n.add(i.name);
|
|
1708
1465
|
var c = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1709
1466
|
c.forEach(function(a) {
|
|
1710
1467
|
if (!n.has(a)) {
|
|
1711
1468
|
var l = t.get(a);
|
|
1712
|
-
l &&
|
|
1469
|
+
l && r(l);
|
|
1713
1470
|
}
|
|
1714
|
-
}),
|
|
1471
|
+
}), o.push(i);
|
|
1715
1472
|
}
|
|
1716
1473
|
return e.forEach(function(i) {
|
|
1717
|
-
n.has(i.name) ||
|
|
1718
|
-
}),
|
|
1719
|
-
}
|
|
1720
|
-
function
|
|
1721
|
-
var t =
|
|
1722
|
-
return
|
|
1723
|
-
return n.concat(t.filter(function(
|
|
1724
|
-
return
|
|
1474
|
+
n.has(i.name) || r(i);
|
|
1475
|
+
}), o;
|
|
1476
|
+
}
|
|
1477
|
+
function Zo(e) {
|
|
1478
|
+
var t = Ko(e);
|
|
1479
|
+
return Ze.reduce(function(n, o) {
|
|
1480
|
+
return n.concat(t.filter(function(r) {
|
|
1481
|
+
return r.phase === o;
|
|
1725
1482
|
}));
|
|
1726
1483
|
}, []);
|
|
1727
1484
|
}
|
|
1728
|
-
function
|
|
1485
|
+
function Xo(e) {
|
|
1729
1486
|
var t;
|
|
1730
1487
|
return function() {
|
|
1731
1488
|
return t || (t = new Promise(function(n) {
|
|
@@ -1736,97 +1493,97 @@ function Xr(e) {
|
|
|
1736
1493
|
};
|
|
1737
1494
|
}
|
|
1738
1495
|
function X(e) {
|
|
1739
|
-
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
|
|
1740
|
-
n[
|
|
1741
|
-
return [].concat(n).reduce(function(
|
|
1742
|
-
return
|
|
1496
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
1497
|
+
n[o - 1] = arguments[o];
|
|
1498
|
+
return [].concat(n).reduce(function(r, i) {
|
|
1499
|
+
return r.replace(/%s/, i);
|
|
1743
1500
|
}, e);
|
|
1744
1501
|
}
|
|
1745
|
-
var
|
|
1746
|
-
function
|
|
1502
|
+
var ae = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', Jo = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', xt = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
|
1503
|
+
function Qo(e) {
|
|
1747
1504
|
e.forEach(function(t) {
|
|
1748
|
-
[].concat(Object.keys(t),
|
|
1749
|
-
return
|
|
1505
|
+
[].concat(Object.keys(t), xt).filter(function(n, o, r) {
|
|
1506
|
+
return r.indexOf(n) === o;
|
|
1750
1507
|
}).forEach(function(n) {
|
|
1751
1508
|
switch (n) {
|
|
1752
1509
|
case "name":
|
|
1753
|
-
typeof t.name != "string" && console.error(X(
|
|
1510
|
+
typeof t.name != "string" && console.error(X(ae, String(t.name), '"name"', '"string"', '"' + String(t.name) + '"'));
|
|
1754
1511
|
break;
|
|
1755
1512
|
case "enabled":
|
|
1756
|
-
typeof t.enabled != "boolean" && console.error(X(
|
|
1513
|
+
typeof t.enabled != "boolean" && console.error(X(ae, t.name, '"enabled"', '"boolean"', '"' + String(t.enabled) + '"'));
|
|
1757
1514
|
break;
|
|
1758
1515
|
case "phase":
|
|
1759
|
-
|
|
1516
|
+
Ze.indexOf(t.phase) < 0 && console.error(X(ae, t.name, '"phase"', "either " + Ze.join(", "), '"' + String(t.phase) + '"'));
|
|
1760
1517
|
break;
|
|
1761
1518
|
case "fn":
|
|
1762
|
-
typeof t.fn != "function" && console.error(X(
|
|
1519
|
+
typeof t.fn != "function" && console.error(X(ae, t.name, '"fn"', '"function"', '"' + String(t.fn) + '"'));
|
|
1763
1520
|
break;
|
|
1764
1521
|
case "effect":
|
|
1765
|
-
t.effect != null && typeof t.effect != "function" && console.error(X(
|
|
1522
|
+
t.effect != null && typeof t.effect != "function" && console.error(X(ae, t.name, '"effect"', '"function"', '"' + String(t.fn) + '"'));
|
|
1766
1523
|
break;
|
|
1767
1524
|
case "requires":
|
|
1768
|
-
t.requires != null && !Array.isArray(t.requires) && console.error(X(
|
|
1525
|
+
t.requires != null && !Array.isArray(t.requires) && console.error(X(ae, t.name, '"requires"', '"array"', '"' + String(t.requires) + '"'));
|
|
1769
1526
|
break;
|
|
1770
1527
|
case "requiresIfExists":
|
|
1771
|
-
Array.isArray(t.requiresIfExists) || console.error(X(
|
|
1528
|
+
Array.isArray(t.requiresIfExists) || console.error(X(ae, t.name, '"requiresIfExists"', '"array"', '"' + String(t.requiresIfExists) + '"'));
|
|
1772
1529
|
break;
|
|
1773
1530
|
case "options":
|
|
1774
1531
|
case "data":
|
|
1775
1532
|
break;
|
|
1776
1533
|
default:
|
|
1777
|
-
console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' +
|
|
1778
|
-
return '"' +
|
|
1534
|
+
console.error('PopperJS: an invalid property has been provided to the "' + t.name + '" modifier, valid properties are ' + xt.map(function(o) {
|
|
1535
|
+
return '"' + o + '"';
|
|
1779
1536
|
}).join(", ") + '; but "' + n + '" was provided.');
|
|
1780
1537
|
}
|
|
1781
|
-
t.requires && t.requires.forEach(function(
|
|
1782
|
-
e.find(function(
|
|
1783
|
-
return
|
|
1784
|
-
}) == null && console.error(X(
|
|
1538
|
+
t.requires && t.requires.forEach(function(o) {
|
|
1539
|
+
e.find(function(r) {
|
|
1540
|
+
return r.name === o;
|
|
1541
|
+
}) == null && console.error(X(Jo, String(t.name), o, o));
|
|
1785
1542
|
});
|
|
1786
1543
|
});
|
|
1787
1544
|
});
|
|
1788
1545
|
}
|
|
1789
|
-
function
|
|
1546
|
+
function er(e, t) {
|
|
1790
1547
|
var n = /* @__PURE__ */ new Set();
|
|
1791
|
-
return e.filter(function(
|
|
1792
|
-
var
|
|
1793
|
-
if (!n.has(
|
|
1794
|
-
return n.add(
|
|
1548
|
+
return e.filter(function(o) {
|
|
1549
|
+
var r = t(o);
|
|
1550
|
+
if (!n.has(r))
|
|
1551
|
+
return n.add(r), !0;
|
|
1795
1552
|
});
|
|
1796
1553
|
}
|
|
1797
|
-
function
|
|
1798
|
-
var t = e.reduce(function(n,
|
|
1799
|
-
var
|
|
1800
|
-
return n[
|
|
1801
|
-
options: Object.assign({},
|
|
1802
|
-
data: Object.assign({},
|
|
1803
|
-
}) :
|
|
1554
|
+
function tr(e) {
|
|
1555
|
+
var t = e.reduce(function(n, o) {
|
|
1556
|
+
var r = n[o.name];
|
|
1557
|
+
return n[o.name] = r ? Object.assign({}, r, o, {
|
|
1558
|
+
options: Object.assign({}, r.options, o.options),
|
|
1559
|
+
data: Object.assign({}, r.data, o.data)
|
|
1560
|
+
}) : o, n;
|
|
1804
1561
|
}, {});
|
|
1805
1562
|
return Object.keys(t).map(function(n) {
|
|
1806
1563
|
return t[n];
|
|
1807
1564
|
});
|
|
1808
1565
|
}
|
|
1809
|
-
var
|
|
1566
|
+
var Bt = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", nr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", kt = {
|
|
1810
1567
|
placement: "bottom",
|
|
1811
1568
|
modifiers: [],
|
|
1812
1569
|
strategy: "absolute"
|
|
1813
1570
|
};
|
|
1814
|
-
function
|
|
1571
|
+
function Wt() {
|
|
1815
1572
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
1816
1573
|
t[n] = arguments[n];
|
|
1817
|
-
return !t.some(function(
|
|
1818
|
-
return !(
|
|
1574
|
+
return !t.some(function(o) {
|
|
1575
|
+
return !(o && typeof o.getBoundingClientRect == "function");
|
|
1819
1576
|
});
|
|
1820
1577
|
}
|
|
1821
|
-
function
|
|
1578
|
+
function or(e) {
|
|
1822
1579
|
e === void 0 && (e = {});
|
|
1823
|
-
var t = e, n = t.defaultModifiers,
|
|
1580
|
+
var t = e, n = t.defaultModifiers, o = n === void 0 ? [] : n, r = t.defaultOptions, i = r === void 0 ? kt : r;
|
|
1824
1581
|
return function(a, l, u) {
|
|
1825
1582
|
u === void 0 && (u = i);
|
|
1826
1583
|
var d = {
|
|
1827
1584
|
placement: "bottom",
|
|
1828
1585
|
orderedModifiers: [],
|
|
1829
|
-
options: Object.assign({},
|
|
1586
|
+
options: Object.assign({}, kt, i),
|
|
1830
1587
|
modifiersData: {},
|
|
1831
1588
|
elements: {
|
|
1832
1589
|
reference: a,
|
|
@@ -1834,32 +1591,32 @@ function ro(e) {
|
|
|
1834
1591
|
},
|
|
1835
1592
|
attributes: {},
|
|
1836
1593
|
styles: {}
|
|
1837
|
-
},
|
|
1594
|
+
}, _ = [], h = !1, p = {
|
|
1838
1595
|
state: d,
|
|
1839
1596
|
setOptions: function(T) {
|
|
1840
1597
|
var M = typeof T == "function" ? T(d.options) : T;
|
|
1841
|
-
|
|
1842
|
-
reference:
|
|
1843
|
-
popper:
|
|
1598
|
+
b(), d.options = Object.assign({}, i, d.options, M), d.scrollParents = {
|
|
1599
|
+
reference: ce(a) ? we(a) : a.contextElement ? we(a.contextElement) : [],
|
|
1600
|
+
popper: we(l)
|
|
1844
1601
|
};
|
|
1845
|
-
var
|
|
1846
|
-
if (d.orderedModifiers =
|
|
1847
|
-
return
|
|
1602
|
+
var A = Zo(tr([].concat(o, d.options.modifiers)));
|
|
1603
|
+
if (d.orderedModifiers = A.filter(function(O) {
|
|
1604
|
+
return O.enabled;
|
|
1848
1605
|
}), {}.NODE_ENV !== "production") {
|
|
1849
|
-
var
|
|
1850
|
-
var
|
|
1851
|
-
return
|
|
1606
|
+
var E = er([].concat(A, d.options.modifiers), function(O) {
|
|
1607
|
+
var R = O.name;
|
|
1608
|
+
return R;
|
|
1852
1609
|
});
|
|
1853
|
-
if (
|
|
1854
|
-
var g = d.orderedModifiers.find(function(
|
|
1855
|
-
var
|
|
1856
|
-
return
|
|
1610
|
+
if (Qo(E), j(d.options.placement) === Fe) {
|
|
1611
|
+
var g = d.orderedModifiers.find(function(O) {
|
|
1612
|
+
var R = O.name;
|
|
1613
|
+
return R === "flip";
|
|
1857
1614
|
});
|
|
1858
1615
|
g || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
|
1859
1616
|
}
|
|
1860
|
-
var w =
|
|
1861
|
-
[
|
|
1862
|
-
return parseFloat(
|
|
1617
|
+
var w = z(l), P = w.marginTop, N = w.marginRight, S = w.marginBottom, U = w.marginLeft;
|
|
1618
|
+
[P, N, S, U].some(function(O) {
|
|
1619
|
+
return parseFloat(O);
|
|
1863
1620
|
}) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
|
|
1864
1621
|
}
|
|
1865
1622
|
return m(), p.update();
|
|
@@ -1870,29 +1627,29 @@ function ro(e) {
|
|
|
1870
1627
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1871
1628
|
// prefer the async Popper#update method
|
|
1872
1629
|
forceUpdate: function() {
|
|
1873
|
-
if (!
|
|
1874
|
-
var T = d.elements, M = T.reference,
|
|
1875
|
-
if (!
|
|
1876
|
-
({}).NODE_ENV !== "production" && console.error(
|
|
1630
|
+
if (!h) {
|
|
1631
|
+
var T = d.elements, M = T.reference, A = T.popper;
|
|
1632
|
+
if (!Wt(M, A)) {
|
|
1633
|
+
({}).NODE_ENV !== "production" && console.error(Bt);
|
|
1877
1634
|
return;
|
|
1878
1635
|
}
|
|
1879
1636
|
d.rects = {
|
|
1880
|
-
reference:
|
|
1881
|
-
popper:
|
|
1882
|
-
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(
|
|
1883
|
-
return d.modifiersData[
|
|
1637
|
+
reference: Yo(M, Pe(A), d.options.strategy === "fixed"),
|
|
1638
|
+
popper: lt(A)
|
|
1639
|
+
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(O) {
|
|
1640
|
+
return d.modifiersData[O.name] = Object.assign({}, O.data);
|
|
1884
1641
|
});
|
|
1885
|
-
for (var
|
|
1886
|
-
if ({}.NODE_ENV !== "production" && (
|
|
1887
|
-
console.error(
|
|
1642
|
+
for (var E = 0, g = 0; g < d.orderedModifiers.length; g++) {
|
|
1643
|
+
if ({}.NODE_ENV !== "production" && (E += 1, E > 100)) {
|
|
1644
|
+
console.error(nr);
|
|
1888
1645
|
break;
|
|
1889
1646
|
}
|
|
1890
1647
|
if (d.reset === !0) {
|
|
1891
1648
|
d.reset = !1, g = -1;
|
|
1892
1649
|
continue;
|
|
1893
1650
|
}
|
|
1894
|
-
var w = d.orderedModifiers[g],
|
|
1895
|
-
typeof
|
|
1651
|
+
var w = d.orderedModifiers[g], P = w.fn, N = w.options, S = N === void 0 ? {} : N, U = w.name;
|
|
1652
|
+
typeof P == "function" && (d = P({
|
|
1896
1653
|
state: d,
|
|
1897
1654
|
options: S,
|
|
1898
1655
|
name: U,
|
|
@@ -1903,200 +1660,200 @@ function ro(e) {
|
|
|
1903
1660
|
},
|
|
1904
1661
|
// Async and optimistically optimized update – it will not be executed if
|
|
1905
1662
|
// not necessary (debounced to run at most once-per-tick)
|
|
1906
|
-
update:
|
|
1663
|
+
update: Xo(function() {
|
|
1907
1664
|
return new Promise(function(v) {
|
|
1908
1665
|
p.forceUpdate(), v(d);
|
|
1909
1666
|
});
|
|
1910
1667
|
}),
|
|
1911
1668
|
destroy: function() {
|
|
1912
|
-
|
|
1669
|
+
b(), h = !0;
|
|
1913
1670
|
}
|
|
1914
1671
|
};
|
|
1915
|
-
if (!
|
|
1916
|
-
return {}.NODE_ENV !== "production" && console.error(
|
|
1672
|
+
if (!Wt(a, l))
|
|
1673
|
+
return {}.NODE_ENV !== "production" && console.error(Bt), p;
|
|
1917
1674
|
p.setOptions(u).then(function(v) {
|
|
1918
|
-
!
|
|
1675
|
+
!h && u.onFirstUpdate && u.onFirstUpdate(v);
|
|
1919
1676
|
});
|
|
1920
1677
|
function m() {
|
|
1921
1678
|
d.orderedModifiers.forEach(function(v) {
|
|
1922
|
-
var T = v.name, M = v.options,
|
|
1923
|
-
if (typeof
|
|
1924
|
-
var g =
|
|
1679
|
+
var T = v.name, M = v.options, A = M === void 0 ? {} : M, E = v.effect;
|
|
1680
|
+
if (typeof E == "function") {
|
|
1681
|
+
var g = E({
|
|
1925
1682
|
state: d,
|
|
1926
1683
|
name: T,
|
|
1927
1684
|
instance: p,
|
|
1928
|
-
options:
|
|
1685
|
+
options: A
|
|
1929
1686
|
}), w = function() {
|
|
1930
1687
|
};
|
|
1931
|
-
|
|
1688
|
+
_.push(g || w);
|
|
1932
1689
|
}
|
|
1933
1690
|
});
|
|
1934
1691
|
}
|
|
1935
|
-
function
|
|
1936
|
-
|
|
1692
|
+
function b() {
|
|
1693
|
+
_.forEach(function(v) {
|
|
1937
1694
|
return v();
|
|
1938
|
-
}),
|
|
1695
|
+
}), _ = [];
|
|
1939
1696
|
}
|
|
1940
1697
|
return p;
|
|
1941
1698
|
};
|
|
1942
1699
|
}
|
|
1943
|
-
var
|
|
1944
|
-
defaultModifiers:
|
|
1700
|
+
var rr = [wo, qo, Io, co, ko, Ro, Go, vo, Ho], on = /* @__PURE__ */ or({
|
|
1701
|
+
defaultModifiers: rr
|
|
1945
1702
|
});
|
|
1946
|
-
function
|
|
1947
|
-
t ? (e.classList.remove(
|
|
1703
|
+
function Qe(e, t, n, o) {
|
|
1704
|
+
t ? (e.classList.remove(o), e.classList.add(n)) : (e.classList.add(o), e.classList.remove(n));
|
|
1948
1705
|
}
|
|
1949
1706
|
let k;
|
|
1950
|
-
const
|
|
1707
|
+
const ge = {}, et = {
|
|
1951
1708
|
SHIFT: "shift-key"
|
|
1952
1709
|
};
|
|
1953
|
-
function
|
|
1710
|
+
function rn() {
|
|
1954
1711
|
k && (document.removeEventListener("click", k.globalOnClick), document.removeEventListener("keyup", k.globalOnKeyup), document.removeEventListener("keydown", k.globalOnKeydown), k = null);
|
|
1955
1712
|
}
|
|
1956
|
-
function
|
|
1713
|
+
function tt() {
|
|
1957
1714
|
const e = document.querySelectorAll(
|
|
1958
1715
|
`${f(s.UTAH_DESIGN_SYSTEM)} ${f(s.POPUP_WRAPPER)}`
|
|
1959
1716
|
);
|
|
1960
1717
|
Array.from(e).filter((t) => !t.classList.contains(s.POPUP__HIDDEN)).forEach((t) => {
|
|
1961
1718
|
const n = t.getAttribute("id");
|
|
1962
1719
|
if (n) {
|
|
1963
|
-
const
|
|
1964
|
-
|
|
1720
|
+
const o = document.querySelector(`[aria-controls="${n}"]`);
|
|
1721
|
+
o && o.setAttribute("aria-expanded", "false");
|
|
1965
1722
|
}
|
|
1966
|
-
|
|
1723
|
+
Qe(t, !1, s.POPUP__VISIBLE, s.POPUP__HIDDEN);
|
|
1967
1724
|
});
|
|
1968
1725
|
}
|
|
1969
|
-
function
|
|
1970
|
-
k &&
|
|
1971
|
-
e.key === "Escape" &&
|
|
1726
|
+
function ir() {
|
|
1727
|
+
k && rn(), k = {}, k.globalOnClick = tt, document.addEventListener("click", k.globalOnClick), k.globalOnKeyup = (e) => {
|
|
1728
|
+
e.key === "Escape" && tt(), e.shiftKey || (ge[et.SHIFT] = !1), ge[e.key] = !1;
|
|
1972
1729
|
}, document.addEventListener("keyup", k.globalOnKeyup), k.globalOnKeydown = (e) => {
|
|
1973
|
-
e.shiftKey && (
|
|
1730
|
+
e.shiftKey && (ge[et.SHIFT] = !0), ge[e.key] = !0;
|
|
1974
1731
|
}, document.addEventListener("keydown", k.globalOnKeydown);
|
|
1975
1732
|
}
|
|
1976
|
-
function
|
|
1733
|
+
function ar() {
|
|
1977
1734
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1978
1735
|
}
|
|
1979
|
-
function
|
|
1736
|
+
function Oe(e, t, n, o, r) {
|
|
1980
1737
|
let i = NaN, c = NaN;
|
|
1981
1738
|
const a = 300, l = 150, u = 50;
|
|
1982
|
-
t.setAttribute("aria-expanded", "false"), t.setAttribute("aria-haspopup",
|
|
1983
|
-
function d(
|
|
1984
|
-
clearTimeout(i), clearTimeout(c), (!(
|
|
1739
|
+
t.setAttribute("aria-expanded", "false"), t.setAttribute("aria-haspopup", o);
|
|
1740
|
+
function d(h) {
|
|
1741
|
+
clearTimeout(i), clearTimeout(c), (!(r != null && r.isPerformPopup) || r != null && r.isPerformPopup && r.isPerformPopup()) && (i = window.setTimeout(
|
|
1985
1742
|
() => {
|
|
1986
|
-
|
|
1987
|
-
placement: (
|
|
1743
|
+
on(t, n, {
|
|
1744
|
+
placement: (r == null ? void 0 : r.popupPlacement) || at.BOTTOM,
|
|
1988
1745
|
modifiers: [
|
|
1989
1746
|
{
|
|
1990
1747
|
name: "offset",
|
|
1991
1748
|
options: { offset: [0, 11] }
|
|
1992
1749
|
}
|
|
1993
1750
|
]
|
|
1994
|
-
}),
|
|
1751
|
+
}), Qe(n, !0, s.POPUP__VISIBLE, s.POPUP__HIDDEN), t.setAttribute("aria-expanded", "true"), document.querySelectorAll(f(s.TOOLTIP__WRAPPER)).forEach((p) => p.classList.add(s.TOOLTIP__WRAPPER__HIDDEN));
|
|
1995
1752
|
},
|
|
1996
|
-
|
|
1753
|
+
h
|
|
1997
1754
|
));
|
|
1998
1755
|
}
|
|
1999
|
-
function h
|
|
2000
|
-
clearTimeout(i), clearTimeout(c), (!(
|
|
1756
|
+
function _(h) {
|
|
1757
|
+
clearTimeout(i), clearTimeout(c), (!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (c = window.setTimeout(
|
|
2001
1758
|
() => {
|
|
2002
|
-
|
|
1759
|
+
Qe(n, !1, s.POPUP__VISIBLE, s.POPUP__HIDDEN), t.setAttribute("aria-expanded", "false");
|
|
2003
1760
|
},
|
|
2004
|
-
|
|
1761
|
+
h
|
|
2005
1762
|
));
|
|
2006
1763
|
}
|
|
2007
|
-
if (
|
|
1764
|
+
if (r != null && r.preventOnClickHandling || (e.addEventListener("focusin", () => d(l)), e.addEventListener("focusout", () => _(l))), r != null && r.shouldFocusOnHover && (e.addEventListener("mouseenter", () => d(a)), e.addEventListener("mouseleave", () => _(a))), !(r != null && r.preventOnClickHandling)) {
|
|
2008
1765
|
if (t.onclick)
|
|
2009
1766
|
throw new Error("popupFocusHandler: button already has onclick");
|
|
2010
|
-
t.onclick = (
|
|
1767
|
+
t.onclick = (h) => {
|
|
2011
1768
|
var m;
|
|
2012
1769
|
const p = t.getAttribute("aria-expanded") === "true";
|
|
2013
|
-
(!(
|
|
1770
|
+
(!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (h.stopPropagation(), h.preventDefault(), p && t.getAttribute("aria-expanded") === "true" ? (_(u), (m = document.activeElement) == null || m.blur()) : (ar() && tt(), d(u))), r != null && r.onClick && r.onClick(h);
|
|
2014
1771
|
};
|
|
2015
1772
|
}
|
|
2016
1773
|
}
|
|
2017
|
-
const
|
|
1774
|
+
const sr = `<div class="popup__wrapper popup__wrapper--hidden">
|
|
2018
1775
|
<div class="popup__content">
|
|
2019
1776
|
<div class="popup__arrow" data-popper-arrow></div>
|
|
2020
1777
|
</div>
|
|
2021
1778
|
</div>
|
|
2022
1779
|
`;
|
|
2023
|
-
function
|
|
1780
|
+
function ft(e, t) {
|
|
2024
1781
|
const n = e.getAttribute("id");
|
|
2025
1782
|
if (!n)
|
|
2026
1783
|
throw new Error("renderPopup: labelledByElement does not have an `id` attribute");
|
|
2027
|
-
const
|
|
2028
|
-
e.setAttribute("aria-controls",
|
|
2029
|
-
const
|
|
2030
|
-
if (
|
|
2031
|
-
const i =
|
|
1784
|
+
const o = C();
|
|
1785
|
+
e.setAttribute("aria-controls", o);
|
|
1786
|
+
const r = I(sr);
|
|
1787
|
+
if (r.setAttribute("id", o), r.setAttribute("aria-labelledby", n), t != null && t.removePopupArrow) {
|
|
1788
|
+
const i = r.querySelector(f(s.POPUP_ARROW));
|
|
2032
1789
|
if (!i)
|
|
2033
1790
|
throw new Error("renderPopup(): popup arrow missing (I wanted to remove it!!)");
|
|
2034
1791
|
i.remove();
|
|
2035
1792
|
}
|
|
2036
|
-
return
|
|
1793
|
+
return r;
|
|
2037
1794
|
}
|
|
2038
|
-
function
|
|
1795
|
+
function lr(e) {
|
|
2039
1796
|
const t = e.closest("li");
|
|
2040
1797
|
if (!t)
|
|
2041
1798
|
throw console.error("element", e), new Error("toggleChildMenuExpansion: parent not found for child");
|
|
2042
1799
|
t.querySelectorAll(":scope > ul").forEach((n) => {
|
|
2043
1800
|
var i;
|
|
2044
|
-
const
|
|
2045
|
-
if (!r)
|
|
2046
|
-
throw new Error("toggleChildMenuExpansion: button not found");
|
|
2047
|
-
const o = r.querySelector(`:scope > ${f(s.POPUP_MENU__CHEVRON)}`);
|
|
1801
|
+
const o = (i = n.closest("li")) == null ? void 0 : i.querySelector(f(s.POPUP_MENU__BUTTON_TITLE));
|
|
2048
1802
|
if (!o)
|
|
1803
|
+
throw new Error("toggleChildMenuExpansion: button not found");
|
|
1804
|
+
const r = o.querySelector(`:scope > ${f(s.POPUP_MENU__CHEVRON)}`);
|
|
1805
|
+
if (!r)
|
|
2049
1806
|
throw new Error("toggleChildMenuExpansion: chevron not found");
|
|
2050
|
-
n.classList.toggle(s.VISUALLY_HIDDEN), n.classList.contains(s.VISUALLY_HIDDEN) ? (
|
|
1807
|
+
n.classList.toggle(s.VISUALLY_HIDDEN), n.classList.contains(s.VISUALLY_HIDDEN) ? (o.setAttribute("aria-expanded", "false"), r.classList.add(s.IS_CLOSED), r.classList.remove(s.IS_OPEN)) : (o.setAttribute("aria-expanded", "true"), r.classList.remove(s.IS_CLOSED), r.classList.add(s.IS_OPEN));
|
|
2051
1808
|
});
|
|
2052
1809
|
}
|
|
2053
|
-
function
|
|
1810
|
+
function cr(e) {
|
|
2054
1811
|
return (t) => {
|
|
2055
|
-
t.preventDefault(), t.stopPropagation(),
|
|
1812
|
+
t.preventDefault(), t.stopPropagation(), lr(e);
|
|
2056
1813
|
};
|
|
2057
1814
|
}
|
|
2058
|
-
function
|
|
1815
|
+
function qt() {
|
|
2059
1816
|
const e = I(zn);
|
|
2060
1817
|
return e.classList.add(s.IS_CLOSED), e;
|
|
2061
1818
|
}
|
|
2062
|
-
function
|
|
2063
|
-
var
|
|
2064
|
-
const
|
|
2065
|
-
if (!
|
|
1819
|
+
function ur(e, t, n) {
|
|
1820
|
+
var _, h;
|
|
1821
|
+
const o = I(Kn), r = o.querySelector(f(s.POPUP_MENU__TITLE));
|
|
1822
|
+
if (!r)
|
|
2066
1823
|
throw new Error("renderPopupMenuItem: menuItemTitleWrapper not found");
|
|
2067
1824
|
const i = (
|
|
2068
1825
|
/** @type HTMLElement | null */
|
|
2069
|
-
|
|
1826
|
+
o.querySelector(f(s.POPUP_MENU__BUTTON_TITLE))
|
|
2070
1827
|
);
|
|
2071
1828
|
if (!i)
|
|
2072
1829
|
throw new Error("renderPopupMenuItem: menuButton not found");
|
|
2073
1830
|
const c = (
|
|
2074
1831
|
/** @type HTMLElement | null */
|
|
2075
|
-
|
|
1832
|
+
o.querySelector(f(s.POPUP_MENU__LINK_TITLE))
|
|
2076
1833
|
);
|
|
2077
1834
|
if (!c)
|
|
2078
1835
|
throw new Error("renderPopupMenuItem: aHref not found");
|
|
2079
1836
|
const a = (
|
|
2080
1837
|
/** @type HTMLElement | null */
|
|
2081
|
-
|
|
1838
|
+
o.querySelector(f(s.POPUP_MENU__PLAIN_TITLE))
|
|
2082
1839
|
);
|
|
2083
1840
|
if (!a)
|
|
2084
1841
|
throw new Error("renderPopupMenuItem: plainTitle not found");
|
|
2085
|
-
const l =
|
|
1842
|
+
const l = o.querySelector(f(s.POPUP_MENU__DIVIDER));
|
|
2086
1843
|
if (!l)
|
|
2087
1844
|
throw new Error("renderPopupMenuItem: menuDivider not found");
|
|
2088
|
-
const u =
|
|
1845
|
+
const u = o.querySelector(`button ${f(s.POPUP_MENU__LINK_TEXT)}`);
|
|
2089
1846
|
if (!u)
|
|
2090
1847
|
throw new Error("renderPopupMenuItem: titleSpanButton not found");
|
|
2091
|
-
const d =
|
|
1848
|
+
const d = o.querySelector(`a ${f(s.POPUP_MENU__LINK_TEXT)}`);
|
|
2092
1849
|
if (!d)
|
|
2093
1850
|
throw new Error("renderPopupMenuItem: titleSpanLink not found");
|
|
2094
1851
|
if (t.actionMenu) {
|
|
2095
1852
|
let p;
|
|
2096
1853
|
switch (n.childrenMenuType) {
|
|
2097
|
-
case
|
|
2098
|
-
p =
|
|
2099
|
-
const m =
|
|
1854
|
+
case $.FLYOUT: {
|
|
1855
|
+
p = qt(), i.appendChild(p), i.setAttribute("id", C());
|
|
1856
|
+
const m = _t(
|
|
2100
1857
|
{
|
|
2101
1858
|
menuItems: t.actionMenu,
|
|
2102
1859
|
title: t.title
|
|
@@ -2107,40 +1864,40 @@ function uo(e, t, n) {
|
|
|
2107
1864
|
removePopupArrow: !0
|
|
2108
1865
|
}
|
|
2109
1866
|
);
|
|
2110
|
-
|
|
2111
|
-
|
|
1867
|
+
o.appendChild(m), Oe(
|
|
1868
|
+
o,
|
|
2112
1869
|
i,
|
|
2113
1870
|
m,
|
|
2114
1871
|
"menu",
|
|
2115
1872
|
{
|
|
2116
|
-
popupPlacement:
|
|
1873
|
+
popupPlacement: at.RIGHT_START,
|
|
2117
1874
|
preventOnClickHandling: !0,
|
|
2118
1875
|
shouldFocusOnHover: !0
|
|
2119
1876
|
}
|
|
2120
1877
|
), c.remove(), a.remove();
|
|
2121
1878
|
break;
|
|
2122
1879
|
}
|
|
2123
|
-
case
|
|
2124
|
-
const m =
|
|
1880
|
+
case $.INLINE: {
|
|
1881
|
+
const m = me(
|
|
2125
1882
|
t.actionMenu,
|
|
2126
1883
|
n
|
|
2127
|
-
),
|
|
2128
|
-
m.setAttribute("id",
|
|
2129
|
-
var T, M,
|
|
1884
|
+
), b = C();
|
|
1885
|
+
m.setAttribute("id", b), m.classList.add(s.VISUALLY_HIDDEN), o.appendChild(m), i.onclick = cr(i), i.setAttribute("aria-expanded", "false"), i.setAttribute("aria-controls", b), p = qt(), i.appendChild(p), c.remove(), a.remove(), o.addEventListener("focusin", (v) => {
|
|
1886
|
+
var T, M, A, E;
|
|
2130
1887
|
for (let g = (
|
|
2131
1888
|
/** @type Element | null | undefined */
|
|
2132
1889
|
(T = v.target) == null ? void 0 : T.closest("ul")
|
|
2133
1890
|
); g; g = (M = g.parentElement) == null ? void 0 : M.closest("ul"))
|
|
2134
|
-
g.classList.remove(s.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), v.target !== i && ((
|
|
1891
|
+
g.classList.remove(s.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), v.target !== i && ((A = p == null ? void 0 : p.classList) == null || A.remove(s.IS_CLOSED), (E = p == null ? void 0 : p.classList) == null || E.add(s.IS_OPEN));
|
|
2135
1892
|
});
|
|
2136
1893
|
break;
|
|
2137
1894
|
}
|
|
2138
|
-
case
|
|
2139
|
-
const m =
|
|
1895
|
+
case $.MEGA_MENU: {
|
|
1896
|
+
const m = me(
|
|
2140
1897
|
t.actionMenu,
|
|
2141
1898
|
n
|
|
2142
|
-
),
|
|
2143
|
-
m.setAttribute("id",
|
|
1899
|
+
), b = C();
|
|
1900
|
+
m.setAttribute("id", b), o.appendChild(m), c.remove(), i.remove(), a.appendChild(document.createTextNode(t.title));
|
|
2144
1901
|
break;
|
|
2145
1902
|
}
|
|
2146
1903
|
default:
|
|
@@ -2153,43 +1910,43 @@ function uo(e, t, n) {
|
|
|
2153
1910
|
c.setAttribute("href", t.actionUrl.url), i.remove(), l.remove(), a.remove();
|
|
2154
1911
|
else if (t.actionFunctionUrl)
|
|
2155
1912
|
c.setAttribute("href", t.actionFunctionUrl.url), c.onclick = (p) => {
|
|
2156
|
-
var m,
|
|
2157
|
-
(m = t.actionFunctionUrl) != null && m.skipHandleEvent || (p.stopPropagation(), p.preventDefault()), (
|
|
1913
|
+
var m, b;
|
|
1914
|
+
(m = t.actionFunctionUrl) != null && m.skipHandleEvent || (p.stopPropagation(), p.preventDefault()), (b = t.actionFunctionUrl) == null || b.actionFunction(p);
|
|
2158
1915
|
}, i.remove(), l.remove(), a.remove();
|
|
2159
1916
|
else if (t.isDivider)
|
|
2160
|
-
|
|
1917
|
+
r.remove(), o.setAttribute("aria-hidden", "true"), o.setAttribute("role", "separator");
|
|
2161
1918
|
else
|
|
2162
1919
|
throw console.error(t), new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");
|
|
2163
|
-
if (!t.isDivider && (u.appendChild(document.createTextNode(t.title)), d.appendChild(document.createTextNode(t.title)), (
|
|
1920
|
+
if (!t.isDivider && (u.appendChild(document.createTextNode(t.title)), d.appendChild(document.createTextNode(t.title)), (_ = t.actionUrl) != null && _.openInNewTab || (h = t.actionFunctionUrl) != null && h.openInNewTab)) {
|
|
2164
1921
|
c.setAttribute("target", "_blank");
|
|
2165
|
-
const p = I(
|
|
1922
|
+
const p = I(zt);
|
|
2166
1923
|
u.appendChild(p), d.appendChild(p);
|
|
2167
1924
|
}
|
|
2168
|
-
return (t.isSelected || t.actionMenu &&
|
|
1925
|
+
return (t.isSelected || t.actionMenu && We(t.actionMenu, ["actionMenu"], (p) => !!p.isSelected)) && (i.classList.add(s.MENU_ITEM__SELECTED), c.classList.add(s.MENU_ITEM__SELECTED)), t.isSelected ? o.classList.add(s.MENU_ITEM__SELECTED) : o.classList.remove(s.MENU_ITEM__SELECTED), e.appendChild(o), o;
|
|
2169
1926
|
}
|
|
2170
|
-
function
|
|
2171
|
-
const n = I(
|
|
2172
|
-
return e.forEach((
|
|
1927
|
+
function me(e, t) {
|
|
1928
|
+
const n = I(Yn);
|
|
1929
|
+
return e.forEach((o) => ur(n, o, t)), n;
|
|
2173
1930
|
}
|
|
2174
|
-
function
|
|
2175
|
-
const
|
|
2176
|
-
if (!
|
|
1931
|
+
function _t(e, t, n) {
|
|
1932
|
+
const o = ft(t, { removePopupArrow: n.removePopupArrow }), r = o.querySelector(f(s.POPUP_CONTENT_WRAPPER));
|
|
1933
|
+
if (!r)
|
|
2177
1934
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2178
|
-
const i =
|
|
2179
|
-
return i.setAttribute("aria-label", e.title),
|
|
1935
|
+
const i = me(e.menuItems, n);
|
|
1936
|
+
return i.setAttribute("aria-label", e.title), r.appendChild(i), o;
|
|
2180
1937
|
}
|
|
2181
|
-
function
|
|
2182
|
-
const t = I(
|
|
1938
|
+
function dr(e) {
|
|
1939
|
+
const t = I($n);
|
|
2183
1940
|
t.getAttribute("id") || t.setAttribute("id", C());
|
|
2184
|
-
const n = document.createTextNode(e.title),
|
|
1941
|
+
const n = document.createTextNode(e.title), o = (
|
|
2185
1942
|
/** @type {HTMLElement} */
|
|
2186
1943
|
t instanceof HTMLCollection ? t[0] : t
|
|
2187
1944
|
);
|
|
2188
|
-
e.showTitle &&
|
|
2189
|
-
const
|
|
2190
|
-
if (!
|
|
1945
|
+
e.showTitle && o.classList.add(s.ACTION_ITEM__ICON_BUTTON_TITLE), o.classList.add(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER), o.classList.remove(s.ACTION_ITEM);
|
|
1946
|
+
const r = o.querySelector(f(s.ACTION_ITEM__TITLE));
|
|
1947
|
+
if (!r)
|
|
2191
1948
|
throw new Error("renderActionItem: titleDiv not found");
|
|
2192
|
-
|
|
1949
|
+
r.appendChild(n), e.showTitle ? r.classList.remove(s.VISUALLY_HIDDEN) : r.classList.add(s.VISUALLY_HIDDEN);
|
|
2193
1950
|
const i = (
|
|
2194
1951
|
/** @type {HTMLElement} */
|
|
2195
1952
|
t.querySelector(f(s.ACTION_ITEM__ICON_BUTTON))
|
|
@@ -2197,7 +1954,7 @@ function po(e) {
|
|
|
2197
1954
|
if (!i)
|
|
2198
1955
|
throw new Error("renderActionItem: iconButton not found");
|
|
2199
1956
|
e.className && i.classList.add(e.className);
|
|
2200
|
-
const c =
|
|
1957
|
+
const c = ot(e.badge);
|
|
2201
1958
|
c && i.appendChild(c);
|
|
2202
1959
|
const a = I(e.icon);
|
|
2203
1960
|
a.setAttribute("role", "presentation"), i.appendChild(a);
|
|
@@ -2209,18 +1966,18 @@ function po(e) {
|
|
|
2209
1966
|
i.setAttribute("id", u), l = I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom);
|
|
2210
1967
|
} else if (e.actionPopupMenu) {
|
|
2211
1968
|
const u = C();
|
|
2212
|
-
i.setAttribute("id", u), l = I(
|
|
1969
|
+
i.setAttribute("id", u), l = I(jn);
|
|
2213
1970
|
const d = l.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
2214
1971
|
if (!d)
|
|
2215
1972
|
throw new Error("renderMobileActionItem: actionItemContentTitle not found");
|
|
2216
1973
|
d.appendChild(document.createTextNode(e.actionPopupMenu.title));
|
|
2217
|
-
const
|
|
2218
|
-
l.appendChild(
|
|
1974
|
+
const _ = me(e.actionPopupMenu.menuItems, { childrenMenuType: $.INLINE });
|
|
1975
|
+
l.appendChild(_);
|
|
2219
1976
|
} else
|
|
2220
1977
|
throw console.error(e), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2221
1978
|
return { actionItemElement: t, actionItemContent: l };
|
|
2222
1979
|
}
|
|
2223
|
-
function
|
|
1980
|
+
function pr() {
|
|
2224
1981
|
var i, c, a;
|
|
2225
1982
|
const e = document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID);
|
|
2226
1983
|
if (!e)
|
|
@@ -2231,63 +1988,63 @@ function fo() {
|
|
|
2231
1988
|
);
|
|
2232
1989
|
if (!t)
|
|
2233
1990
|
throw new Error("renderMobileActionItems: homeActionItemWrapper not found");
|
|
2234
|
-
const
|
|
1991
|
+
const o = !!y().utahId ? document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID) : null, r = (
|
|
2235
1992
|
/** @type {HTMLElement} */
|
|
2236
|
-
(i =
|
|
1993
|
+
(i = o == null ? void 0 : o.closest) == null ? void 0 : i.call(o, f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2237
1994
|
);
|
|
2238
|
-
(a = (c = [...
|
|
2239
|
-
let
|
|
1995
|
+
(a = (c = [...y().actionItems || []].reverse()) == null ? void 0 : c.map((l) => ({ actionItem: l, ...dr(l) }))) == null || a.forEach(({ actionItem: l, actionItemContent: u, actionItemElement: d }) => {
|
|
1996
|
+
let _;
|
|
2240
1997
|
switch (l.mobileMenuLocation) {
|
|
2241
1998
|
case "left":
|
|
2242
|
-
|
|
1999
|
+
_ = t;
|
|
2243
2000
|
break;
|
|
2244
2001
|
case "none":
|
|
2245
|
-
|
|
2002
|
+
_ = null;
|
|
2246
2003
|
break;
|
|
2247
2004
|
case "right":
|
|
2248
2005
|
default:
|
|
2249
|
-
|
|
2006
|
+
_ = r || t;
|
|
2250
2007
|
break;
|
|
2251
2008
|
}
|
|
2252
|
-
if (
|
|
2253
|
-
const
|
|
2009
|
+
if (_ && (_.after(d), u)) {
|
|
2010
|
+
const h = nt(u);
|
|
2254
2011
|
let p = null;
|
|
2255
|
-
l.actionDom ? p = "dialog" : l.actionPopupMenu && (p = "menu"),
|
|
2012
|
+
l.actionDom ? p = "dialog" : l.actionPopupMenu && (p = "menu"), it(
|
|
2256
2013
|
d,
|
|
2257
|
-
|
|
2014
|
+
h,
|
|
2258
2015
|
d,
|
|
2259
2016
|
{ ariaHasPopupType: p, shouldOnClickCloseMenu: !1 }
|
|
2260
2017
|
);
|
|
2261
2018
|
}
|
|
2262
2019
|
});
|
|
2263
2020
|
}
|
|
2264
|
-
const
|
|
2265
|
-
`,
|
|
2266
|
-
`,
|
|
2267
|
-
`,
|
|
2268
|
-
`,
|
|
2269
|
-
`,
|
|
2021
|
+
const fr = `<h1 class="utds-logo-wrapper"></h1>
|
|
2022
|
+
`, _r = `<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
2023
|
+
`, hr = `<span class="utds-logo-vert-line"></span>
|
|
2024
|
+
`, mr = `<div class="utds-citizen-experience-wrapper"></div>
|
|
2025
|
+
`, vr = `<div class="utds-action-items-wrapper"></div>
|
|
2026
|
+
`, Er = `<div class="utds-header-action-item">
|
|
2270
2027
|
<button type="button" class="icon-button utds-header-action-item__icon-button">
|
|
2271
2028
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
2272
2029
|
</button>
|
|
2273
2030
|
</div>
|
|
2274
|
-
`,
|
|
2031
|
+
`, br = `<div class="tooltip__wrapper tooltip__wrapper--hidden" aria-hidden="true">
|
|
2275
2032
|
<div class="tooltip__content">
|
|
2276
2033
|
<div class="tooltip__arrow" data-popper-arrow></div>
|
|
2277
2034
|
</div>
|
|
2278
2035
|
</div>
|
|
2279
2036
|
`;
|
|
2280
|
-
let
|
|
2281
|
-
function
|
|
2282
|
-
const n = I(
|
|
2283
|
-
if (!
|
|
2037
|
+
let de = NaN;
|
|
2038
|
+
function ht(e, t) {
|
|
2039
|
+
const n = I(br), o = n.querySelector(f(s.TOOLTIP__CONTENT));
|
|
2040
|
+
if (!o)
|
|
2284
2041
|
throw new Error("hookupToolTip: toolTipContent not found");
|
|
2285
|
-
|
|
2286
|
-
const
|
|
2042
|
+
o.appendChild(t), e.appendChild(n);
|
|
2043
|
+
const r = on(
|
|
2287
2044
|
e,
|
|
2288
2045
|
n,
|
|
2289
2046
|
{
|
|
2290
|
-
placement:
|
|
2047
|
+
placement: at.BOTTOM,
|
|
2291
2048
|
modifiers: [
|
|
2292
2049
|
{
|
|
2293
2050
|
name: "offset",
|
|
@@ -2302,37 +2059,37 @@ function pt(e, t) {
|
|
|
2302
2059
|
e.onmouseenter = () => {
|
|
2303
2060
|
clearTimeout(i), i = window.setTimeout(
|
|
2304
2061
|
() => {
|
|
2305
|
-
clearTimeout(
|
|
2062
|
+
clearTimeout(de), de = -1;
|
|
2306
2063
|
const c = e.querySelector(f(s.POPUP_WRAPPER));
|
|
2307
|
-
(!c || c.classList.contains(s.POPUP__HIDDEN)) && (n.classList.remove(s.TOOLTIP__WRAPPER__HIDDEN), n.classList.add(s.TOOLTIP__WRAPPER__VISIBLE),
|
|
2064
|
+
(!c || c.classList.contains(s.POPUP__HIDDEN)) && (n.classList.remove(s.TOOLTIP__WRAPPER__HIDDEN), n.classList.add(s.TOOLTIP__WRAPPER__VISIBLE), r.update().catch((a) => console.error(a)));
|
|
2308
2065
|
},
|
|
2309
2066
|
// tooltip was already opened on another item, so instantly open tooltip
|
|
2310
|
-
|
|
2067
|
+
de ? 0 : 500
|
|
2311
2068
|
);
|
|
2312
2069
|
}, e.onmouseleave = () => {
|
|
2313
|
-
clearTimeout(i), n.classList.add(s.TOOLTIP__WRAPPER__HIDDEN), n.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE), clearTimeout(
|
|
2070
|
+
clearTimeout(i), n.classList.add(s.TOOLTIP__WRAPPER__HIDDEN), n.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE), clearTimeout(de), de = window.setTimeout(
|
|
2314
2071
|
() => {
|
|
2315
|
-
|
|
2072
|
+
de = NaN;
|
|
2316
2073
|
},
|
|
2317
2074
|
500
|
|
2318
2075
|
);
|
|
2319
2076
|
};
|
|
2320
2077
|
}
|
|
2321
|
-
function
|
|
2322
|
-
const t = I(
|
|
2078
|
+
function gr(e) {
|
|
2079
|
+
const t = I(Er), n = document.createTextNode(e.title), o = (
|
|
2323
2080
|
/** @type {HTMLElement} */
|
|
2324
2081
|
t instanceof HTMLCollection ? t[0] : t
|
|
2325
2082
|
);
|
|
2326
|
-
e.showTitle &&
|
|
2327
|
-
const
|
|
2328
|
-
if (!
|
|
2083
|
+
e.showTitle && o.classList.add(s.ACTION_ITEM__ICON_BUTTON_TITLE);
|
|
2084
|
+
const r = o.querySelector(f(s.ACTION_ITEM__TITLE));
|
|
2085
|
+
if (!r)
|
|
2329
2086
|
throw new Error("renderActionItem: titleDiv not found");
|
|
2330
|
-
|
|
2087
|
+
r.appendChild(n), e.showTitle ? r.classList.remove(s.VISUALLY_HIDDEN) : r.classList.add(s.VISUALLY_HIDDEN);
|
|
2331
2088
|
const i = t.querySelector(f(s.ACTION_ITEM__ICON_BUTTON));
|
|
2332
2089
|
if (!i)
|
|
2333
2090
|
throw new Error("renderActionItem: iconButton not found");
|
|
2334
2091
|
e.className && i.classList.add(e.className);
|
|
2335
|
-
const c =
|
|
2092
|
+
const c = ot(e.badge);
|
|
2336
2093
|
c && i.appendChild(c);
|
|
2337
2094
|
const a = I(e.icon);
|
|
2338
2095
|
if (a.setAttribute("role", "presentation"), i.appendChild(a), !(i instanceof HTMLElement))
|
|
@@ -2342,172 +2099,180 @@ function Io(e) {
|
|
|
2342
2099
|
else if (e.actionDom) {
|
|
2343
2100
|
const l = C();
|
|
2344
2101
|
i.setAttribute("id", l);
|
|
2345
|
-
const u =
|
|
2102
|
+
const u = ft(i), d = (
|
|
2346
2103
|
/** @type {HTMLElement} */
|
|
2347
2104
|
u.querySelector(f(s.POPUP_CONTENT_WRAPPER))
|
|
2348
2105
|
);
|
|
2349
2106
|
if (!d)
|
|
2350
2107
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2351
|
-
d.appendChild(I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom)), t.appendChild(u),
|
|
2108
|
+
d.appendChild(I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom)), t.appendChild(u), Oe(o, i, u, "dialog", void 0);
|
|
2352
2109
|
} else if (e.actionPopupMenu) {
|
|
2353
2110
|
const l = C();
|
|
2354
2111
|
i.setAttribute("id", l);
|
|
2355
|
-
const u =
|
|
2112
|
+
const u = _t(
|
|
2356
2113
|
/** @type {PopupMenu} */
|
|
2357
2114
|
e.actionPopupMenu,
|
|
2358
2115
|
i,
|
|
2359
|
-
{ childrenMenuType:
|
|
2116
|
+
{ childrenMenuType: $.INLINE }
|
|
2360
2117
|
);
|
|
2361
|
-
t.appendChild(u),
|
|
2118
|
+
t.appendChild(u), Oe(o, i, u, "menu", void 0);
|
|
2362
2119
|
} else
|
|
2363
2120
|
throw console.error(e), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2364
|
-
return
|
|
2121
|
+
return ht(t, document.createTextNode(e.title)), t;
|
|
2365
2122
|
}
|
|
2366
|
-
function
|
|
2367
|
-
var n,
|
|
2368
|
-
const { actionItems: e } =
|
|
2123
|
+
function Ir() {
|
|
2124
|
+
var n, o;
|
|
2125
|
+
const { actionItems: e } = y();
|
|
2369
2126
|
let t = null;
|
|
2370
|
-
return e != null && e.length && (t = I(
|
|
2127
|
+
return e != null && e.length && (t = I(vr), (o = (n = y().actionItems) == null ? void 0 : n.map((r) => gr(r))) == null || o.forEach((r) => t.appendChild(r))), t;
|
|
2371
2128
|
}
|
|
2372
|
-
const
|
|
2373
|
-
`,
|
|
2374
|
-
`,
|
|
2129
|
+
const Tr = `<button class="utds-utah-id__button button--solid" type="button">UtahID Sign In</button>
|
|
2130
|
+
`, an = `<div class="utds-utah-id-wrapper"></div>
|
|
2131
|
+
`, ye = {
|
|
2375
2132
|
PROFILE: "https://id.utah.gov",
|
|
2376
2133
|
SIGN_IN: `https://id.utah.gov/login?goto=${window.location}`,
|
|
2377
2134
|
SIGN_OUT: `https://id.utah.gov/logout?goto=${window.location}`,
|
|
2378
2135
|
USER_INFO: "https://id.utah.gov/api/userInfo"
|
|
2379
|
-
},
|
|
2136
|
+
}, wr = `<div class="vertical-menu__wrapper">
|
|
2380
2137
|
<div class="vertical-menu__wrapper-title"></div>
|
|
2381
2138
|
</div>
|
|
2382
2139
|
`;
|
|
2383
|
-
function
|
|
2384
|
-
const n = I(
|
|
2385
|
-
if (!
|
|
2140
|
+
function sn(e, t) {
|
|
2141
|
+
const n = I(wr), o = n.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
2142
|
+
if (!o)
|
|
2386
2143
|
throw new Error("renderMenuWithTitle: menuTitleDiv not found");
|
|
2387
|
-
return
|
|
2144
|
+
return o.appendChild(document.createTextNode(t)), n.appendChild(e), n;
|
|
2388
2145
|
}
|
|
2389
|
-
let
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2392
|
-
var
|
|
2146
|
+
let L = null;
|
|
2147
|
+
function ln(e) {
|
|
2148
|
+
L = e, document.querySelectorAll(f(s.UTAH_ID__BUTTON)).forEach((n) => {
|
|
2149
|
+
var o;
|
|
2393
2150
|
if (n) {
|
|
2394
|
-
if (n.innerHTML = "",
|
|
2151
|
+
if (n.innerHTML = "", L != null && L.userInfo && ((o = L.userInfo) != null && o.authenticated)) {
|
|
2395
2152
|
const c = document.createElement("span");
|
|
2396
|
-
c.appendChild(document.createTextNode("UtahID Account:")), c.classList.add(s.VISUALLY_HIDDEN), n.appendChild(c), n.appendChild(document.createTextNode(`Hello, ${
|
|
2153
|
+
c.appendChild(document.createTextNode("UtahID Account:")), c.classList.add(s.VISUALLY_HIDDEN), n.appendChild(c), n.appendChild(document.createTextNode(`Hello, ${L.userInfo.first || ""}`));
|
|
2397
2154
|
} else
|
|
2398
2155
|
n.appendChild(document.createTextNode("UtahID Sign In"));
|
|
2399
|
-
const
|
|
2400
|
-
if (!
|
|
2401
|
-
throw new Error(`authChangedEventHandler: popup id for button not found - ${
|
|
2402
|
-
const i = document.getElementById(
|
|
2403
|
-
i &&
|
|
2156
|
+
const r = n.getAttribute("aria-controls");
|
|
2157
|
+
if (!r)
|
|
2158
|
+
throw new Error(`authChangedEventHandler: popup id for button not found - ${r}`);
|
|
2159
|
+
const i = document.getElementById(r);
|
|
2160
|
+
i && mt(n, i);
|
|
2404
2161
|
}
|
|
2405
2162
|
});
|
|
2406
2163
|
}
|
|
2407
|
-
function
|
|
2164
|
+
function mt(e, t) {
|
|
2408
2165
|
var n;
|
|
2409
|
-
e && t && (!!(
|
|
2166
|
+
e && t && (!!(L != null && L.isDefinitive) && !!((n = L == null ? void 0 : L.userInfo) != null && n.authenticated) ? (e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false"), t.removeAttribute("aria-hidden")) : (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), t.setAttribute("aria-hidden", "true")));
|
|
2410
2167
|
}
|
|
2411
|
-
function
|
|
2412
|
-
const e = I(
|
|
2413
|
-
return e.setAttribute("id", C()),
|
|
2168
|
+
function cn() {
|
|
2169
|
+
const e = I(Tr);
|
|
2170
|
+
return e.setAttribute("id", C()), L && ln(L), e;
|
|
2414
2171
|
}
|
|
2415
|
-
function
|
|
2416
|
-
var l;
|
|
2417
|
-
const t =
|
|
2418
|
-
|
|
2172
|
+
function un(e) {
|
|
2173
|
+
var l, u, d;
|
|
2174
|
+
const t = y(), n = t.utahId !== !1 && t.utahId !== !0 && ((l = t.utahId) == null ? void 0 : l.onProfile), o = t.utahId !== !1 && t.utahId !== !0 && ((u = t.utahId) == null ? void 0 : u.onSignOut), r = [...t.utahId !== !0 && t.utahId !== !1 && ((d = t.utahId) == null ? void 0 : d.menuItems) || []];
|
|
2175
|
+
r.length && r.push({
|
|
2419
2176
|
isDivider: !0,
|
|
2420
2177
|
title: "--divider--"
|
|
2421
2178
|
});
|
|
2422
2179
|
const i = [
|
|
2423
|
-
...
|
|
2180
|
+
...r,
|
|
2424
2181
|
{
|
|
2425
|
-
actionUrl: n ? void 0 : { url:
|
|
2182
|
+
actionUrl: n ? void 0 : { url: ye.PROFILE, openInNewTab: !0 },
|
|
2426
2183
|
actionFunction: n || void 0,
|
|
2427
2184
|
className: "external-link",
|
|
2428
2185
|
title: "UtahID Profile"
|
|
2429
2186
|
},
|
|
2430
2187
|
{
|
|
2431
|
-
actionUrl:
|
|
2432
|
-
actionFunction:
|
|
2188
|
+
actionUrl: o ? void 0 : { url: ye.SIGN_OUT },
|
|
2189
|
+
actionFunction: o || void 0,
|
|
2433
2190
|
title: "Sign Out"
|
|
2434
2191
|
}
|
|
2435
|
-
], c =
|
|
2192
|
+
], c = me(i, { childrenMenuType: $.INLINE }), a = e ? sn(c, "Utah ID Menu") : c;
|
|
2436
2193
|
return a.setAttribute("aria-label", "Utah Id Menu"), a.setAttribute("id", C()), a;
|
|
2437
2194
|
}
|
|
2438
|
-
function
|
|
2439
|
-
|
|
2195
|
+
function Mr() {
|
|
2196
|
+
var a;
|
|
2197
|
+
const e = I(an), t = cn();
|
|
2440
2198
|
t.setAttribute("id", C()), e.appendChild(t);
|
|
2441
|
-
const n =
|
|
2199
|
+
const n = un(!1), o = ft(t), r = (
|
|
2442
2200
|
/** @type {HTMLElement} */
|
|
2443
|
-
|
|
2201
|
+
o.querySelector(f(s.POPUP_CONTENT_WRAPPER))
|
|
2444
2202
|
);
|
|
2445
|
-
if (!
|
|
2203
|
+
if (!r)
|
|
2446
2204
|
throw new Error("renderUtahIdForDesktop: contentWrapper not found");
|
|
2447
|
-
|
|
2448
|
-
const i =
|
|
2449
|
-
return
|
|
2205
|
+
r.appendChild(n), e.appendChild(o), mt(t, o);
|
|
2206
|
+
const i = y(), c = i.utahId !== !1 && i.utahId !== !0 && ((a = i.utahId) == null ? void 0 : a.onSignIn);
|
|
2207
|
+
return Oe(
|
|
2450
2208
|
e,
|
|
2451
2209
|
t,
|
|
2452
|
-
|
|
2210
|
+
o,
|
|
2453
2211
|
"menu",
|
|
2454
2212
|
{
|
|
2455
2213
|
isPerformPopup: () => {
|
|
2456
|
-
var a;
|
|
2457
|
-
return !!(O != null && O.isDefinitive) && !!((a = O == null ? void 0 : O.userInfo) != null && a.authenticated);
|
|
2458
|
-
},
|
|
2459
|
-
onClick: (a) => {
|
|
2460
2214
|
var l;
|
|
2461
|
-
(
|
|
2215
|
+
return !!(L != null && L.isDefinitive) && !!((l = L == null ? void 0 : L.userInfo) != null && l.authenticated);
|
|
2216
|
+
},
|
|
2217
|
+
onClick: (l) => {
|
|
2218
|
+
var u;
|
|
2219
|
+
(!(L != null && L.isDefinitive) || !((u = L == null ? void 0 : L.userInfo) != null && u.authenticated)) && (c ? c(l) : (l.preventDefault(), l.stopPropagation(), window.location.href = ye.SIGN_IN));
|
|
2462
2220
|
}
|
|
2463
2221
|
}
|
|
2464
2222
|
), e;
|
|
2465
2223
|
}
|
|
2466
|
-
function
|
|
2467
|
-
const e = I(
|
|
2224
|
+
function Ar() {
|
|
2225
|
+
const e = I(an), t = cn(), n = t.getAttribute("id");
|
|
2468
2226
|
if (!n)
|
|
2469
2227
|
throw new Error("renderUtahIdForMobile: utahIdButton has no id");
|
|
2470
2228
|
e.appendChild(t);
|
|
2471
|
-
const
|
|
2472
|
-
if (!
|
|
2229
|
+
const o = un(!0), r = o.getAttribute("id");
|
|
2230
|
+
if (!r)
|
|
2473
2231
|
throw new Error("renderUtahIdForMobile: utahIdPopupMenu has no id");
|
|
2474
|
-
return e.appendChild(
|
|
2232
|
+
return e.appendChild(o), t.setAttribute("aria-controls", r), o.setAttribute("aria-labelledby", n), mt(t, o), { button: t, menu: o };
|
|
2475
2233
|
}
|
|
2476
|
-
function
|
|
2477
|
-
const e = I(
|
|
2478
|
-
return t && e.appendChild(t),
|
|
2234
|
+
function Or() {
|
|
2235
|
+
const e = I(mr), t = Ir();
|
|
2236
|
+
return t && e.appendChild(t), y().utahId !== !1 && e.appendChild(Mr()), e;
|
|
2479
2237
|
}
|
|
2480
|
-
const
|
|
2238
|
+
const yr = `<div class="utds-title-wrapper">
|
|
2481
2239
|
<div class="utds-title-wrapper__logo"></div>
|
|
2482
2240
|
<div class="utds-title-wrapper__title"></div>
|
|
2483
2241
|
</div>
|
|
2484
|
-
`,
|
|
2242
|
+
`, Lr = `<a class="utds-title-wrapper">
|
|
2485
2243
|
<div class="utds-title-wrapper__logo"></div>
|
|
2486
2244
|
<div class="utds-title-wrapper__title"></div>
|
|
2487
2245
|
</a>
|
|
2488
2246
|
`;
|
|
2489
|
-
function
|
|
2490
|
-
|
|
2247
|
+
function Ye(e) {
|
|
2248
|
+
return typeof e == "function" ? e() : e;
|
|
2249
|
+
}
|
|
2250
|
+
function Pr() {
|
|
2251
|
+
const e = y().titleURL, t = I(e ? Lr : yr);
|
|
2491
2252
|
if (!t)
|
|
2492
2253
|
throw new Error("LogoTitle: titleWrapper is null");
|
|
2493
2254
|
e && t.setAttribute("href", e);
|
|
2494
2255
|
const n = t.querySelector(f(s.TITLE__LOGO));
|
|
2495
2256
|
if (!n)
|
|
2496
2257
|
throw new Error("LogoTitle: logoWrapper is null");
|
|
2497
|
-
const
|
|
2498
|
-
if (
|
|
2258
|
+
const o = y().logo, r = y().showTitle, i = y().title;
|
|
2259
|
+
if (o) {
|
|
2499
2260
|
let l;
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2261
|
+
if (o.htmlString)
|
|
2262
|
+
l = I(Ye(o.htmlString));
|
|
2263
|
+
else if (o.element)
|
|
2264
|
+
l = Ye(o.element);
|
|
2265
|
+
else if (o.imageUrl)
|
|
2266
|
+
l = I(`<img src=${Ye(o.imageUrl)} id="design-system-logo" />`);
|
|
2267
|
+
else
|
|
2268
|
+
throw new Error("LogoTitle: logo set but has no settings");
|
|
2269
|
+
l.setAttribute("role", "presentation"), n.appendChild(l);
|
|
2505
2270
|
} else
|
|
2506
2271
|
t.removeChild(n);
|
|
2507
2272
|
const c = document.createTextNode(i), a = t.querySelector(f(s.TITLE__TITLE));
|
|
2508
|
-
return a == null || a.appendChild(c), !
|
|
2273
|
+
return a == null || a.appendChild(c), !r && o && (a == null || a.classList.add(s.VISUALLY_HIDDEN)), t;
|
|
2509
2274
|
}
|
|
2510
|
-
const
|
|
2275
|
+
const Nr = `<div class="utah-logo-wrapper">
|
|
2511
2276
|
<button class="utah-logo-svg" id="utah-logo-svg" aria-haspopup="dialog">
|
|
2512
2277
|
<span class="visually-hidden" id="utah-logo-description">An official website of the State of Utah. Click to learn
|
|
2513
2278
|
more.</span>
|
|
@@ -2532,7 +2297,7 @@ const So = `<div class="utah-logo-wrapper">
|
|
|
2532
2297
|
</svg>
|
|
2533
2298
|
</button>
|
|
2534
2299
|
</div>
|
|
2535
|
-
`,
|
|
2300
|
+
`, Sr = `<div class="utah-logo-wrapper">
|
|
2536
2301
|
<button class="utah-logo-svg" id="utah-logo-svg" aria-haspopup="dialog">
|
|
2537
2302
|
<span class="visually-hidden" id="utah-logo-description">An official website of the State of Utah. Click to learn
|
|
2538
2303
|
more.</span>
|
|
@@ -2553,45 +2318,45 @@ const So = `<div class="utah-logo-wrapper">
|
|
|
2553
2318
|
</svg>
|
|
2554
2319
|
</button>
|
|
2555
2320
|
</div>
|
|
2556
|
-
`,
|
|
2321
|
+
`, Ur = `<div class="utds-official-website-hover__wrapper">
|
|
2557
2322
|
How do I know it’s official?<br />
|
|
2558
2323
|
Learn more.
|
|
2559
2324
|
</div>
|
|
2560
2325
|
`;
|
|
2561
|
-
function
|
|
2326
|
+
function Cr() {
|
|
2562
2327
|
let e;
|
|
2563
|
-
switch (
|
|
2564
|
-
case
|
|
2565
|
-
e =
|
|
2328
|
+
switch (y().size) {
|
|
2329
|
+
case Ie.LARGE:
|
|
2330
|
+
e = Nr;
|
|
2566
2331
|
break;
|
|
2567
|
-
case
|
|
2568
|
-
case
|
|
2569
|
-
e =
|
|
2332
|
+
case Ie.SMALL:
|
|
2333
|
+
case Ie.MEDIUM:
|
|
2334
|
+
e = Sr;
|
|
2570
2335
|
break;
|
|
2571
2336
|
default:
|
|
2572
|
-
throw new Error(`Unknown settings size: '${
|
|
2337
|
+
throw new Error(`Unknown settings size: '${y().size}'`);
|
|
2573
2338
|
}
|
|
2574
2339
|
const t = I(e);
|
|
2575
2340
|
if (!/** @type {HTMLElement} */
|
|
2576
2341
|
t.querySelector(f(s.LOGO_SVG)))
|
|
2577
2342
|
throw new Error("UtahLogo: logoButton not found");
|
|
2578
|
-
return t.setAttribute("id", C()),
|
|
2343
|
+
return t.setAttribute("id", C()), ht(t, I(Ur)), t;
|
|
2579
2344
|
}
|
|
2580
|
-
function
|
|
2345
|
+
function Rr() {
|
|
2581
2346
|
var n;
|
|
2582
|
-
const e = I(
|
|
2583
|
-
e.classList.add(`utds-header--${((n =
|
|
2584
|
-
const t = I(
|
|
2585
|
-
return e.appendChild(t), t.appendChild(
|
|
2347
|
+
const e = I(_r);
|
|
2348
|
+
e.classList.add(`utds-header--${((n = y().size) == null ? void 0 : n.toLowerCase()) || Ie.MEDIUM}`);
|
|
2349
|
+
const t = I(fr);
|
|
2350
|
+
return e.appendChild(t), t.appendChild(Cr()), t.appendChild(I(hr)), t.appendChild(Pr()), e.appendChild(Or()), e;
|
|
2586
2351
|
}
|
|
2587
|
-
const
|
|
2352
|
+
const Dr = `<li class="menu-item">
|
|
2588
2353
|
<span class="menu-item__title">
|
|
2589
2354
|
<button class="menu-item__button-title" type="button"></button>
|
|
2590
2355
|
<a class="menu-item__link-title"></a>
|
|
2591
2356
|
<span class="menu-chiclet"></span>
|
|
2592
2357
|
</span>
|
|
2593
2358
|
</li>
|
|
2594
|
-
`,
|
|
2359
|
+
`, Hr = `<div class="utah-design-system main-menu__outer">
|
|
2595
2360
|
<div class="main-menu__wrapper">
|
|
2596
2361
|
<nav class="horizontal-menu main-menu__nav">
|
|
2597
2362
|
<h2 class="main-menu__title visually-hidden"></h2>
|
|
@@ -2618,7 +2383,7 @@ const xo = `<li class="menu-item">
|
|
|
2618
2383
|
</button>
|
|
2619
2384
|
</div>
|
|
2620
2385
|
</div>
|
|
2621
|
-
`,
|
|
2386
|
+
`, xr = `<div class="utah-design-system" id="search-modal">
|
|
2622
2387
|
<div class="search-modal__close-button-wrapper">
|
|
2623
2388
|
<button type="button" class="search-modal__close-button button icon-button icon-button--borderless">
|
|
2624
2389
|
<span class="utds-icon-before-x-icon" aria-hidden="true"></span>
|
|
@@ -2626,7 +2391,7 @@ const xo = `<li class="menu-item">
|
|
|
2626
2391
|
</button>
|
|
2627
2392
|
</div>
|
|
2628
2393
|
<div class="search-modal">
|
|
2629
|
-
<form class="search-modal__form hcenter" role="search" aria-label="Sitewide">
|
|
2394
|
+
<form class="search-modal__form hcenter" role="search" aria-label="Sitewide" autocomplete="off">
|
|
2630
2395
|
<span class="utds-icon-before-search search-modal__icon-search vcenter" aria-hidden="true"></span>
|
|
2631
2396
|
<label for="search-modal-input-id" class="search-modal__input-label visually-hidden">Enter your search
|
|
2632
2397
|
terms</label>
|
|
@@ -2644,7 +2409,7 @@ const xo = `<li class="menu-item">
|
|
|
2644
2409
|
<div class="search-backdrop modal-backdrop backdrop-dark"></div>
|
|
2645
2410
|
</div>
|
|
2646
2411
|
`;
|
|
2647
|
-
function
|
|
2412
|
+
function He() {
|
|
2648
2413
|
const e = document.getElementById(s.SEARCH__SEARCH_MODAL);
|
|
2649
2414
|
if (!e)
|
|
2650
2415
|
throw new Error("closSearchModal: searchModal not found");
|
|
@@ -2657,8 +2422,8 @@ function Ce() {
|
|
|
2657
2422
|
throw new Error("closSearchModal: searchIcon not found");
|
|
2658
2423
|
t.focus();
|
|
2659
2424
|
}
|
|
2660
|
-
function
|
|
2661
|
-
const e = I(
|
|
2425
|
+
function Br() {
|
|
2426
|
+
const e = I(xr), t = (
|
|
2662
2427
|
/** @type {HTMLElement} */
|
|
2663
2428
|
e.querySelector(f(s.SEARCH__SEARCH_BACKDROP))
|
|
2664
2429
|
);
|
|
@@ -2670,17 +2435,17 @@ function ko() {
|
|
|
2670
2435
|
);
|
|
2671
2436
|
if (!n)
|
|
2672
2437
|
throw new Error("showSearchModal: closeButton not found");
|
|
2673
|
-
const
|
|
2438
|
+
const o = (
|
|
2674
2439
|
/** @type {HTMLElement} */
|
|
2675
2440
|
e.querySelector(f(s.SEARCH__SEARCH_BUTTON))
|
|
2676
2441
|
);
|
|
2677
|
-
if (!
|
|
2442
|
+
if (!o)
|
|
2678
2443
|
throw new Error("showSearchModal: searchButton not found");
|
|
2679
|
-
const
|
|
2444
|
+
const r = (
|
|
2680
2445
|
/** @type {HTMLElement} */
|
|
2681
2446
|
e.querySelector(f(s.SEARCH__SEARCH_BUTTON_WRAPPER))
|
|
2682
2447
|
);
|
|
2683
|
-
if (!
|
|
2448
|
+
if (!r)
|
|
2684
2449
|
throw new Error("showSearchModal: searchButtonWrapper not found");
|
|
2685
2450
|
const i = (
|
|
2686
2451
|
/** @type {HTMLInputElement} */
|
|
@@ -2688,21 +2453,21 @@ function ko() {
|
|
|
2688
2453
|
);
|
|
2689
2454
|
if (!i)
|
|
2690
2455
|
throw new Error("showSearchModal: searchInput not found");
|
|
2691
|
-
|
|
2456
|
+
o.onclick = (a) => {
|
|
2692
2457
|
var l, u;
|
|
2693
|
-
a.preventDefault(), a.stopPropagation(),
|
|
2458
|
+
a.preventDefault(), a.stopPropagation(), He(), (u = (l = y()).onSearch) == null || u.call(l, i.value);
|
|
2694
2459
|
}, n.onclick = (a) => {
|
|
2695
|
-
a.preventDefault(), a.stopPropagation(),
|
|
2460
|
+
a.preventDefault(), a.stopPropagation(), He();
|
|
2696
2461
|
}, t.onclick = (a) => {
|
|
2697
|
-
a.preventDefault(), a.stopPropagation(),
|
|
2462
|
+
a.preventDefault(), a.stopPropagation(), He();
|
|
2698
2463
|
}, document.body.appendChild(e), i.focus(), i.oninput = () => {
|
|
2699
|
-
|
|
2700
|
-
},
|
|
2701
|
-
|
|
2464
|
+
r.classList.remove(s.VISUALLY_HIDDEN);
|
|
2465
|
+
}, o.onfocus = () => {
|
|
2466
|
+
r.classList.remove(s.VISUALLY_HIDDEN);
|
|
2702
2467
|
}, e.onkeyup = (a) => {
|
|
2703
|
-
(a.code === "Escape" || a.key === "Escape") && (a.preventDefault(), a.stopPropagation(),
|
|
2468
|
+
(a.code === "Escape" || a.key === "Escape") && (a.preventDefault(), a.stopPropagation(), He());
|
|
2704
2469
|
}, n.addEventListener("focusout", (a) => {
|
|
2705
|
-
a.preventDefault(), a.stopPropagation(),
|
|
2470
|
+
a.preventDefault(), a.stopPropagation(), ge[et.SHIFT] ? o.focus() : i.focus();
|
|
2706
2471
|
});
|
|
2707
2472
|
const c = e.querySelector(".search-modal__hidden-last-focusable");
|
|
2708
2473
|
if (!c)
|
|
@@ -2711,101 +2476,101 @@ function ko() {
|
|
|
2711
2476
|
a.preventDefault(), a.stopPropagation(), n.focus();
|
|
2712
2477
|
});
|
|
2713
2478
|
}
|
|
2714
|
-
function
|
|
2479
|
+
function kr() {
|
|
2715
2480
|
var l;
|
|
2716
|
-
const e =
|
|
2481
|
+
const e = y(), t = I(Hr), n = t.querySelector(f(s.MAIN_MENU__NAV));
|
|
2717
2482
|
if (!n)
|
|
2718
2483
|
throw new Error("renderMainMenu(): mainMenu not created");
|
|
2719
|
-
const
|
|
2720
|
-
if (!
|
|
2484
|
+
const o = n.querySelector(f(s.MAIN_MENU__TITLE));
|
|
2485
|
+
if (!o)
|
|
2721
2486
|
throw new Error("renderMainMenu(): titleTag not found");
|
|
2722
|
-
const
|
|
2723
|
-
n.setAttribute("aria-labelledby",
|
|
2487
|
+
const r = "main-menu__nav";
|
|
2488
|
+
n.setAttribute("aria-labelledby", r), o.setAttribute("id", r), o.innerHTML = e.mainMenu.title;
|
|
2724
2489
|
const i = n.querySelector(f(s.MAIN_MENU__MENU_TOP));
|
|
2725
2490
|
if (!i)
|
|
2726
2491
|
throw new Error("renderMainMenu(): mainMenuTop not found");
|
|
2727
2492
|
e.mainMenu.menuItems.forEach((u) => {
|
|
2728
|
-
var m,
|
|
2729
|
-
const d = I(
|
|
2493
|
+
var m, b;
|
|
2494
|
+
const d = I(Dr);
|
|
2730
2495
|
i.appendChild(d);
|
|
2731
|
-
const
|
|
2732
|
-
if (!
|
|
2496
|
+
const _ = d.querySelector(f(s.MENU_ITEM__TITLE));
|
|
2497
|
+
if (!_)
|
|
2733
2498
|
throw new Error(`renderMainMenu(): sub menu title not found for ${u.title}`);
|
|
2734
|
-
const
|
|
2499
|
+
const h = (
|
|
2735
2500
|
/** @type {HTMLElement} */
|
|
2736
|
-
|
|
2501
|
+
_.querySelector(f(s.MENU_ITEM__BUTTON_TITLE))
|
|
2737
2502
|
);
|
|
2738
|
-
if (!
|
|
2503
|
+
if (!h)
|
|
2739
2504
|
throw new Error(`renderMainMenu(): button title not found for ${u.title}`);
|
|
2740
|
-
|
|
2505
|
+
h.setAttribute("id", `${s.MENU_ITEM__BUTTON_TITLE}__${u.title}-${C()}`);
|
|
2741
2506
|
const p = (
|
|
2742
2507
|
/** @type {HTMLElement} */
|
|
2743
|
-
|
|
2508
|
+
_.querySelector(f(s.MENU_ITEM__LINK_TITLE))
|
|
2744
2509
|
);
|
|
2745
2510
|
if (!p)
|
|
2746
2511
|
throw new Error(`renderMainMenu(): link title not found for ${u.title}`);
|
|
2747
|
-
if ((u.isSelected || u.actionMenu &&
|
|
2748
|
-
|
|
2512
|
+
if ((u.isSelected || u.actionMenu && We(u.actionMenu, ["actionMenu"], (v) => !!v.isSelected)) && (h.classList.add(s.MENU_ITEM__SELECTED), p.classList.add(s.MENU_ITEM__SELECTED)), u.actionMenu) {
|
|
2513
|
+
h.innerHTML = u.title, p.remove();
|
|
2749
2514
|
const v = {
|
|
2750
2515
|
menuItems: u.actionMenu,
|
|
2751
2516
|
title: u.title
|
|
2752
|
-
}, T =
|
|
2517
|
+
}, T = _t(
|
|
2753
2518
|
v,
|
|
2754
|
-
|
|
2519
|
+
h,
|
|
2755
2520
|
{
|
|
2756
|
-
childrenMenuType: u.childrenMenuType ||
|
|
2521
|
+
childrenMenuType: u.childrenMenuType || $.FLYOUT
|
|
2757
2522
|
}
|
|
2758
2523
|
);
|
|
2759
|
-
d.appendChild(T),
|
|
2524
|
+
d.appendChild(T), Oe(d, h, T, "menu", { shouldFocusOnHover: !0 });
|
|
2760
2525
|
let M;
|
|
2761
2526
|
switch (u.childrenMenuType) {
|
|
2762
|
-
case
|
|
2527
|
+
case $.INLINE:
|
|
2763
2528
|
M = s.MENU_ITEM__INLINE;
|
|
2764
2529
|
break;
|
|
2765
|
-
case
|
|
2530
|
+
case $.MEGA_MENU:
|
|
2766
2531
|
M = s.MENU_ITEM__MEGA_MENU;
|
|
2767
2532
|
break;
|
|
2768
|
-
case
|
|
2533
|
+
case $.FLYOUT:
|
|
2769
2534
|
default:
|
|
2770
2535
|
M = s.MENU_ITEM__FLY_OUT;
|
|
2771
2536
|
break;
|
|
2772
2537
|
}
|
|
2773
2538
|
d.classList.add(M);
|
|
2774
2539
|
} else if (u.actionFunction)
|
|
2775
|
-
|
|
2540
|
+
h.innerHTML = u.title, h.onclick = u.actionFunction, p.remove();
|
|
2776
2541
|
else if (u.actionFunctionUrl)
|
|
2777
2542
|
p.innerHTML = u.title, p.setAttribute("href", u.actionFunctionUrl.url), p.onclick = (v) => {
|
|
2778
2543
|
var T, M;
|
|
2779
2544
|
(T = u.actionFunctionUrl) != null && T.skipHandleEvent || (v.stopPropagation(), v.preventDefault()), (M = u.actionFunctionUrl) == null || M.actionFunction(v);
|
|
2780
|
-
},
|
|
2545
|
+
}, h.remove();
|
|
2781
2546
|
else if (u.actionUrl)
|
|
2782
|
-
p.innerHTML = u.title, p.setAttribute("href", u.actionUrl.url),
|
|
2547
|
+
p.innerHTML = u.title, p.setAttribute("href", u.actionUrl.url), h.remove();
|
|
2783
2548
|
else
|
|
2784
2549
|
throw new Error(`renderMainMenu(): menuItem is missing an action: ${u.title}`);
|
|
2785
|
-
((m = u.actionUrl) != null && m.openInNewTab || (
|
|
2550
|
+
((m = u.actionUrl) != null && m.openInNewTab || (b = u.actionFunctionUrl) != null && b.openInNewTab) && (p.setAttribute("target", "_blank"), p.appendChild(I(zt)));
|
|
2786
2551
|
});
|
|
2787
2552
|
let c = null;
|
|
2788
2553
|
if (e.utahId) {
|
|
2789
|
-
const { button: u, menu: d } =
|
|
2554
|
+
const { button: u, menu: d } = Ar();
|
|
2790
2555
|
c = d;
|
|
2791
|
-
const
|
|
2792
|
-
if (!
|
|
2556
|
+
const _ = t.querySelector(f(s.MOBILE__UTAH_ID));
|
|
2557
|
+
if (!_)
|
|
2793
2558
|
throw new Error("renderMainMenu: utahIdButtonWrapper not found");
|
|
2794
|
-
|
|
2559
|
+
_.appendChild(u);
|
|
2795
2560
|
}
|
|
2796
2561
|
const a = t.querySelector(f(s.MAIN_MENU__SEARCH));
|
|
2797
2562
|
if (!a || !(a instanceof HTMLElement))
|
|
2798
2563
|
throw new Error("renderMainMenu: searchIcon not found");
|
|
2799
2564
|
if (e.onSearch) {
|
|
2800
|
-
if (
|
|
2565
|
+
if (ht(a, document.createTextNode("Search")), a.onclick)
|
|
2801
2566
|
throw new Error("searchIcon already has onclick");
|
|
2802
|
-
a.onclick = () =>
|
|
2567
|
+
a.onclick = () => Br();
|
|
2803
2568
|
} else
|
|
2804
2569
|
(l = a.parentElement) == null || l.insertBefore(I('<div class="main-menu__search-placeholder">'), a), a.remove();
|
|
2805
2570
|
return { mainMenuWrapper: t, utahIdPopup: c };
|
|
2806
2571
|
}
|
|
2807
|
-
function
|
|
2808
|
-
let t = NaN, n = null,
|
|
2572
|
+
function Wr(e) {
|
|
2573
|
+
let t = NaN, n = null, o = null;
|
|
2809
2574
|
return {
|
|
2810
2575
|
promise: new Promise((i, c) => {
|
|
2811
2576
|
t = setTimeout(
|
|
@@ -2813,69 +2578,69 @@ function qo(e) {
|
|
|
2813
2578
|
t = NaN, i();
|
|
2814
2579
|
},
|
|
2815
2580
|
e
|
|
2816
|
-
), n = i,
|
|
2581
|
+
), n = i, o = c;
|
|
2817
2582
|
}),
|
|
2818
2583
|
clearTimeout: (i) => {
|
|
2819
|
-
t && (clearTimeout(t), t = NaN, i(n,
|
|
2584
|
+
t && (clearTimeout(t), t = NaN, i(n, o));
|
|
2820
2585
|
}
|
|
2821
2586
|
};
|
|
2822
2587
|
}
|
|
2823
|
-
const
|
|
2588
|
+
const Y = {
|
|
2824
2589
|
// null = not yet loaded, false = ajaxing, true = have a result (may be error or user data)
|
|
2825
2590
|
isDefinitive: null,
|
|
2826
2591
|
lastError: null,
|
|
2827
2592
|
userInfo: null
|
|
2828
2593
|
};
|
|
2829
|
-
function
|
|
2830
|
-
var t, n,
|
|
2831
|
-
e.isDefinitive && (
|
|
2594
|
+
function Ft(e) {
|
|
2595
|
+
var t, n, o;
|
|
2596
|
+
e.isDefinitive && (ln(e), (o = (n = (t = y()) == null ? void 0 : t.utahId) == null ? void 0 : n.onAuthChanged) == null || o.call(n, e));
|
|
2832
2597
|
}
|
|
2833
|
-
let
|
|
2834
|
-
const
|
|
2835
|
-
async function
|
|
2598
|
+
let Vt = !0;
|
|
2599
|
+
const qr = 500;
|
|
2600
|
+
async function dn() {
|
|
2836
2601
|
var t, n;
|
|
2837
2602
|
let e = null;
|
|
2838
|
-
if (
|
|
2839
|
-
e = Promise.resolve(
|
|
2840
|
-
else if (
|
|
2841
|
-
e =
|
|
2842
|
-
|
|
2603
|
+
if (Y.isDefinitive === !1)
|
|
2604
|
+
e = Promise.resolve(Y);
|
|
2605
|
+
else if (Vt)
|
|
2606
|
+
e = Wr(qr).promise.then(() => {
|
|
2607
|
+
Vt = !1, dn().catch((o) => console.error(o));
|
|
2843
2608
|
});
|
|
2844
2609
|
else {
|
|
2845
|
-
const
|
|
2846
|
-
if (
|
|
2610
|
+
const o = y();
|
|
2611
|
+
if (o.utahId === !1)
|
|
2847
2612
|
e = Promise.resolve({
|
|
2848
2613
|
isDefinitive: !0,
|
|
2849
2614
|
lastError: "Utah ID is off",
|
|
2850
2615
|
userInfo: null
|
|
2851
2616
|
});
|
|
2852
|
-
else if (
|
|
2853
|
-
|
|
2854
|
-
if (
|
|
2855
|
-
|
|
2856
|
-
|
|
2617
|
+
else if (o.utahId === !0 || ((t = o.utahId) == null ? void 0 : t.currentUser) === void 0)
|
|
2618
|
+
Y.isDefinitive = !1, e = fetch(ye.USER_INFO, { credentials: "include" }).then((r) => r.json()).then((r) => {
|
|
2619
|
+
if (r.status === 200)
|
|
2620
|
+
Y.lastError = null, Y.userInfo = /** @type UserInfo */
|
|
2621
|
+
r.data;
|
|
2857
2622
|
else
|
|
2858
|
-
throw new Error(
|
|
2859
|
-
}).catch((
|
|
2860
|
-
|
|
2623
|
+
throw new Error(r.err);
|
|
2624
|
+
}).catch((r) => {
|
|
2625
|
+
Y.lastError = r, Y.userInfo = null;
|
|
2861
2626
|
}).finally(() => {
|
|
2862
|
-
|
|
2627
|
+
Y.isDefinitive = !0, Ft(Y);
|
|
2863
2628
|
});
|
|
2864
2629
|
else {
|
|
2865
|
-
const
|
|
2630
|
+
const r = {
|
|
2866
2631
|
isDefinitive: !0,
|
|
2867
2632
|
lastError: null,
|
|
2868
|
-
userInfo: (n =
|
|
2633
|
+
userInfo: (n = o.utahId) == null ? void 0 : n.currentUser
|
|
2869
2634
|
};
|
|
2870
|
-
e = Promise.resolve(
|
|
2635
|
+
e = Promise.resolve(r), Ft(r);
|
|
2871
2636
|
}
|
|
2872
2637
|
}
|
|
2873
2638
|
return e;
|
|
2874
2639
|
}
|
|
2875
|
-
function
|
|
2876
|
-
return
|
|
2640
|
+
function Fr() {
|
|
2641
|
+
return Y;
|
|
2877
2642
|
}
|
|
2878
|
-
function
|
|
2643
|
+
function Vr() {
|
|
2879
2644
|
const e = document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID);
|
|
2880
2645
|
if (!e)
|
|
2881
2646
|
throw new Error("removeUtahIdInMobileMenu: profileActionItem not found");
|
|
@@ -2887,15 +2652,15 @@ function Go() {
|
|
|
2887
2652
|
throw new Error("removeUtahIdInMobileMenu: profileActionItemWrapper not found");
|
|
2888
2653
|
t.remove();
|
|
2889
2654
|
}
|
|
2890
|
-
function
|
|
2655
|
+
function Gr(e, t) {
|
|
2891
2656
|
const n = document.querySelector(f(s.MOBILE__UTAH_ID));
|
|
2892
2657
|
if (!n)
|
|
2893
2658
|
throw new Error("hookupUtahIdInMobileMenu: utahIdWrapper not found");
|
|
2894
|
-
const
|
|
2659
|
+
const o = (
|
|
2895
2660
|
/** @type {HTMLElement} */
|
|
2896
2661
|
n.querySelector(f(s.UTAH_ID__BUTTON))
|
|
2897
2662
|
);
|
|
2898
|
-
if (!
|
|
2663
|
+
if (!o)
|
|
2899
2664
|
throw new Error("hookupUtahIdInMobileMenu: utahIdButton not found");
|
|
2900
2665
|
if (!e.querySelector(f(s.MOBILE_MENU__CONTENT)))
|
|
2901
2666
|
throw new Error("hookupUtahIdInMobileMenu: mobileContentWrapper not found");
|
|
@@ -2908,38 +2673,38 @@ function $o(e, t) {
|
|
|
2908
2673
|
);
|
|
2909
2674
|
if (!c)
|
|
2910
2675
|
throw new Error("hookupHamburger: profileActionItemWrapper not found");
|
|
2911
|
-
const a =
|
|
2912
|
-
|
|
2913
|
-
|
|
2676
|
+
const a = nt(t);
|
|
2677
|
+
it(
|
|
2678
|
+
o,
|
|
2914
2679
|
a,
|
|
2915
2680
|
c,
|
|
2916
2681
|
{
|
|
2917
2682
|
ariaHasPopupType: "menu",
|
|
2918
2683
|
onClickHandler: (l) => {
|
|
2919
|
-
var
|
|
2920
|
-
const u =
|
|
2921
|
-
let
|
|
2922
|
-
if (!(u != null && u.isDefinitive) || !((
|
|
2923
|
-
|
|
2684
|
+
var h;
|
|
2685
|
+
const u = Fr(), d = y();
|
|
2686
|
+
let _ = !1;
|
|
2687
|
+
if (!(u != null && u.isDefinitive) || !((h = u == null ? void 0 : u.userInfo) != null && h.authenticated)) {
|
|
2688
|
+
_ = !0;
|
|
2924
2689
|
const p = d.utahId !== !1 && d.utahId !== !0 && d.utahId.onSignIn;
|
|
2925
|
-
p ? p(l) : (l.preventDefault(), l.stopPropagation(), window.location.href =
|
|
2690
|
+
p ? p(l) : (l.preventDefault(), l.stopPropagation(), window.location.href = ye.SIGN_IN);
|
|
2926
2691
|
}
|
|
2927
|
-
return
|
|
2692
|
+
return _;
|
|
2928
2693
|
},
|
|
2929
2694
|
shouldOnClickCloseMenu: !0
|
|
2930
2695
|
}
|
|
2931
2696
|
);
|
|
2932
2697
|
}
|
|
2933
|
-
function
|
|
2934
|
-
return
|
|
2935
|
-
|
|
2698
|
+
function $r() {
|
|
2699
|
+
return me(
|
|
2700
|
+
y().mainMenu.menuItems,
|
|
2936
2701
|
{
|
|
2937
|
-
childrenMenuType:
|
|
2702
|
+
childrenMenuType: $.INLINE,
|
|
2938
2703
|
removePopupArrow: !0
|
|
2939
2704
|
}
|
|
2940
2705
|
);
|
|
2941
2706
|
}
|
|
2942
|
-
const
|
|
2707
|
+
const jr = `<div class="utah-design-system utds-official-website-popup__wrapper visually-hidden" tabindex="0">
|
|
2943
2708
|
<h2 class="utds-official-website-popup__heading">
|
|
2944
2709
|
This is an official website of the State of Utah. Here’s how you know:
|
|
2945
2710
|
</h2>
|
|
@@ -2967,8 +2732,8 @@ const Yo = `<div class="utah-design-system utds-official-website-popup__wrapper
|
|
|
2967
2732
|
</button>
|
|
2968
2733
|
</div>
|
|
2969
2734
|
`;
|
|
2970
|
-
function
|
|
2971
|
-
const e = I(
|
|
2735
|
+
function zr() {
|
|
2736
|
+
const e = I(jr), n = (
|
|
2972
2737
|
/** @type {HTMLElement} */
|
|
2973
2738
|
document.querySelector(f(s.LOGO)).querySelector(f(s.LOGO_SVG))
|
|
2974
2739
|
);
|
|
@@ -2978,19 +2743,19 @@ function zo() {
|
|
|
2978
2743
|
throw new Error("renderOfficialWebsite: logoButton already has an onclick");
|
|
2979
2744
|
n.onclick = () => {
|
|
2980
2745
|
e.classList.toggle(s.VISUALLY_HIDDEN), e.classList.contains(s.VISUALLY_HIDDEN) ? (n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true")) : (n.setAttribute("aria-expanded", "true"), e.setAttribute("aria-hidden", "false"), e.focus());
|
|
2981
|
-
const
|
|
2982
|
-
|
|
2746
|
+
const r = document.querySelectorAll(f(s.TOOLTIP__WRAPPER));
|
|
2747
|
+
r == null || r.forEach((i) => {
|
|
2983
2748
|
i.classList.add(s.TOOLTIP__WRAPPER__HIDDEN), i.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE);
|
|
2984
2749
|
});
|
|
2985
2750
|
};
|
|
2986
|
-
const
|
|
2987
|
-
if (!
|
|
2751
|
+
const o = e.querySelector(f(s.LOGO_OFFICIAL_CLOSE_BUTTON));
|
|
2752
|
+
if (!o)
|
|
2988
2753
|
throw new Error("renderOfficialWebsite: closeButton not found");
|
|
2989
|
-
return
|
|
2754
|
+
return o.onclick = () => {
|
|
2990
2755
|
e.classList.toggle(s.VISUALLY_HIDDEN), n.focus(), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true");
|
|
2991
|
-
},
|
|
2756
|
+
}, o.id || (o.id = C()), e.id || (e.id = C()), n.setAttribute("aria-controls", e.id), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true"), e.setAttribute("aria-labelledby", n.id), e;
|
|
2992
2757
|
}
|
|
2993
|
-
function
|
|
2758
|
+
function Yr() {
|
|
2994
2759
|
const t = [...document.querySelectorAll(`
|
|
2995
2760
|
${f(s.MOBILE_MENU__ACTION_BAR)}
|
|
2996
2761
|
${f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)}
|
|
@@ -2998,13 +2763,13 @@ function Ko() {
|
|
|
2998
2763
|
`)];
|
|
2999
2764
|
t.forEach(
|
|
3000
2765
|
(n) => {
|
|
3001
|
-
n.onkeydown = (
|
|
3002
|
-
(
|
|
3003
|
-
}, n.onkeyup = (
|
|
3004
|
-
const
|
|
2766
|
+
n.onkeydown = (o) => {
|
|
2767
|
+
(o.code === "Home" || o.code === "End" || o.code === "ArrowRight" || o.code === "ArrowLeft") && o.preventDefault();
|
|
2768
|
+
}, n.onkeyup = (o) => {
|
|
2769
|
+
const r = t.indexOf(n);
|
|
3005
2770
|
let i = NaN;
|
|
3006
|
-
if (
|
|
3007
|
-
|
|
2771
|
+
if (o.code === "Home" ? i = 0 : o.code === "End" ? i = t.length - 1 : o.code === "ArrowRight" ? i = (r + 1) % t.length : o.code === "ArrowLeft" && (i = (t.length + r - 1) % t.length), !Number.isNaN(i)) {
|
|
2772
|
+
o.preventDefault(), o.stopPropagation();
|
|
3008
2773
|
const c = t[i], a = (
|
|
3009
2774
|
/** @type {HTMLElement} */
|
|
3010
2775
|
c.closest(
|
|
@@ -3017,19 +2782,19 @@ function Ko() {
|
|
|
3017
2782
|
if (l && document.getElementById(l))
|
|
3018
2783
|
c.click();
|
|
3019
2784
|
else {
|
|
3020
|
-
const
|
|
2785
|
+
const _ = (
|
|
3021
2786
|
/** @type {HTMLElement} */
|
|
3022
2787
|
document.querySelector(f(s.MOBILE_MENU__WRAPPER))
|
|
3023
2788
|
);
|
|
3024
|
-
if (!
|
|
2789
|
+
if (!_)
|
|
3025
2790
|
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
3026
|
-
const
|
|
2791
|
+
const h = (
|
|
3027
2792
|
/** @type {HTMLElement} */
|
|
3028
|
-
|
|
2793
|
+
_.querySelector(f(s.MOBILE_MENU__CONTENT))
|
|
3029
2794
|
);
|
|
3030
|
-
if (!
|
|
2795
|
+
if (!h)
|
|
3031
2796
|
throw new Error("hookupMobileActionItemKeyboarding: mobileContentWrapper not found");
|
|
3032
|
-
|
|
2797
|
+
h.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach((p) => p.classList.remove(s.IS_OPEN));
|
|
3033
2798
|
}
|
|
3034
2799
|
const d = (
|
|
3035
2800
|
/** @type {HTMLElement} */
|
|
@@ -3037,52 +2802,52 @@ function Ko() {
|
|
|
3037
2802
|
);
|
|
3038
2803
|
if (!d)
|
|
3039
2804
|
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
3040
|
-
|
|
2805
|
+
Ke(d, a);
|
|
3041
2806
|
}
|
|
3042
2807
|
};
|
|
3043
2808
|
}
|
|
3044
2809
|
);
|
|
3045
2810
|
}
|
|
3046
|
-
function
|
|
3047
|
-
const e =
|
|
2811
|
+
function Kr() {
|
|
2812
|
+
const e = Cn.replace(s.MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER, `${y().mediaSizes.tabletPortrait}px`).replace(s.MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER, `${y().mediaSizes.tabletLandscape}px`).replace(s.MEDIA_SIZE__MOBILE__PLACEHOLDER, `${y().mediaSizes.mobile}px`);
|
|
3048
2813
|
let t = document.getElementById(s.CSS_HEADER_MEDIA_TAG_ID);
|
|
3049
2814
|
t || (t = document.createElement("style"), t.id = s.CSS_HEADER_MEDIA_TAG_ID), t.innerHTML = e, document.body.appendChild(t);
|
|
3050
2815
|
}
|
|
3051
|
-
function
|
|
3052
|
-
const e =
|
|
2816
|
+
function Zr() {
|
|
2817
|
+
const e = y();
|
|
3053
2818
|
let t = document.body;
|
|
3054
2819
|
if (e.domLocationTarget) {
|
|
3055
2820
|
const n = [
|
|
3056
2821
|
e.domLocationTarget.cssSelector,
|
|
3057
2822
|
e.domLocationTarget.element,
|
|
3058
2823
|
e.domLocationTarget.elementFunction
|
|
3059
|
-
].filter((
|
|
2824
|
+
].filter((o) => o);
|
|
3060
2825
|
if (n.length < 1)
|
|
3061
2826
|
throw new Error("loadHeader: domLocationTarget must either have a value for one of its properties or not be specified at all");
|
|
3062
2827
|
if (n.length > 1)
|
|
3063
2828
|
throw new Error("loadHeader: domLocationTarget must only have one target specified");
|
|
3064
2829
|
if (e.domLocationTarget.cssSelector)
|
|
3065
|
-
t = document.querySelector(e.domLocationTarget.cssSelector),
|
|
2830
|
+
t = document.querySelector(e.domLocationTarget.cssSelector), J(!t, `loadHeader: element not found for domLocationTarget.cssSelector ${e.domLocationTarget.cssSelector}`);
|
|
3066
2831
|
else if (e.domLocationTarget.element)
|
|
3067
2832
|
t = e.domLocationTarget.element;
|
|
3068
2833
|
else if (e.domLocationTarget.elementFunction)
|
|
3069
|
-
t = e.domLocationTarget.elementFunction(),
|
|
2834
|
+
t = e.domLocationTarget.elementFunction(), J(!t, "loadHeader: element not returned from domLocationTarget.elementFunction");
|
|
3070
2835
|
else
|
|
3071
2836
|
throw new Error("loadHeader: domLocationTarget must have at least one field set");
|
|
3072
2837
|
}
|
|
3073
|
-
return
|
|
2838
|
+
return se(t, "loadHeader: domTarget is null (how?!)");
|
|
3074
2839
|
}
|
|
3075
|
-
function
|
|
2840
|
+
function Xr() {
|
|
3076
2841
|
var t;
|
|
3077
2842
|
if (!document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.HEADER]))) {
|
|
3078
|
-
const n =
|
|
3079
|
-
|
|
3080
|
-
const
|
|
3081
|
-
n.after(
|
|
3082
|
-
const { mainMenuWrapper: i, utahIdPopup: c } =
|
|
3083
|
-
i &&
|
|
3084
|
-
const a = I(
|
|
3085
|
-
|
|
2843
|
+
const n = Rr(), o = Zr();
|
|
2844
|
+
o.insertBefore(n, o.firstChild);
|
|
2845
|
+
const r = zr();
|
|
2846
|
+
n.after(r);
|
|
2847
|
+
const { mainMenuWrapper: i, utahIdPopup: c } = kr();
|
|
2848
|
+
i && r.after(i);
|
|
2849
|
+
const a = I(Rn);
|
|
2850
|
+
r.after(a);
|
|
3086
2851
|
const l = (
|
|
3087
2852
|
/** @type {HTMLElement} */
|
|
3088
2853
|
document.querySelector(f(s.MOBILE_MENU__BACKDROP))
|
|
@@ -3091,26 +2856,27 @@ function Qo() {
|
|
|
3091
2856
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop not found");
|
|
3092
2857
|
if (l.onclick)
|
|
3093
2858
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop already has onclick");
|
|
3094
|
-
l.onclick = () =>
|
|
3095
|
-
const u =
|
|
2859
|
+
l.onclick = () => rt();
|
|
2860
|
+
const u = $r(), d = sn(u, "Main Menu");
|
|
3096
2861
|
d.appendChild(u);
|
|
3097
|
-
const
|
|
3098
|
-
|
|
2862
|
+
const _ = nt(d);
|
|
2863
|
+
Gn(_), c ? ((t = c.closest("div")) == null || t.removeAttribute("aria-labelledby"), Gr(a, c)) : Vr(), pr(), Yr(), ir(), Kr(), dn().catch((h) => console.error(h));
|
|
3099
2864
|
}
|
|
2865
|
+
xn();
|
|
3100
2866
|
}
|
|
3101
|
-
function
|
|
3102
|
-
var t, n,
|
|
3103
|
-
(t = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.HEADER]))) == null || t.remove(), (n = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MAIN_MENU__OUTER]))) == null || n.remove(), (
|
|
2867
|
+
function Jr(e) {
|
|
2868
|
+
var t, n, o, r;
|
|
2869
|
+
(t = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.HEADER]))) == null || t.remove(), (n = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MAIN_MENU__OUTER]))) == null || n.remove(), (o = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MOBILE_MENU]))) == null || o.remove(), (r = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.LOGO_OFFICIAL_WRAPPER]))) == null || r.remove(), rn(), e && setTimeout(() => document.dispatchEvent(new Event(Gt.HEADER_UNLOADED)), 0);
|
|
3104
2870
|
}
|
|
3105
|
-
console.log(`Utah Header v${
|
|
2871
|
+
console.log(`Utah Header v${Un.version}`);
|
|
3106
2872
|
export {
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
2873
|
+
$ as childrenMenuTypes,
|
|
2874
|
+
$t as defaultSettings,
|
|
2875
|
+
Gt as events,
|
|
2876
|
+
y as getUtahHeaderSettings,
|
|
2877
|
+
Xr as loadHeader,
|
|
2878
|
+
Jr as removeHeader,
|
|
3113
2879
|
I as renderDOMSingle,
|
|
3114
|
-
|
|
3115
|
-
|
|
2880
|
+
Qr as setUtahHeaderSettings,
|
|
2881
|
+
Ie as sizes
|
|
3116
2882
|
};
|