@utahdts/utah-design-system-header 0.2.0 → 0.4.1
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 +1115 -943
- package/dist/utah-design-system-header.umd.js +101 -59
- package/package.json +10 -9
- package/src/css/_logos.scss +1 -1
- package/src/css/_mobile-menu.scss +0 -1
- package/src/css/build/utah-design-system-header.css +4259 -1
- package/src/css/index.scss +3 -0
- package/src/css/media-queries.css +13 -0
- package/src/index.js +3 -4
|
@@ -1,45 +1,70 @@
|
|
|
1
|
-
const
|
|
1
|
+
const fn = "@utahdts/utah-design-system-header", hn = "0.4.1", _n = "Utah Header for the Utah Design System", mn = "src/index.js", En = [
|
|
2
2
|
"src/css",
|
|
3
3
|
"dist"
|
|
4
|
-
],
|
|
5
|
-
test: "vitest run",
|
|
4
|
+
], vn = {
|
|
6
5
|
build: "vite build --mode development",
|
|
7
6
|
preview: "vite preview",
|
|
8
|
-
watch: "vite build --watch --mode development",
|
|
9
7
|
"sass-build": "sass --no-source-map ./src/css/index.scss ./src/css/build/utah-design-system-header.css",
|
|
10
|
-
"test-publish": "npm publish --dry-run"
|
|
11
|
-
|
|
8
|
+
"test-publish": "npm publish --dry-run",
|
|
9
|
+
test: "vitest",
|
|
10
|
+
testc: "vitest run --coverage",
|
|
11
|
+
watch: "vite build --watch --mode development"
|
|
12
|
+
}, bn = {
|
|
12
13
|
type: "git",
|
|
13
14
|
url: "git+https://github.com/utahdts/utah-design-system.git"
|
|
14
|
-
},
|
|
15
|
+
}, In = "Apache-2.0", gn = {
|
|
15
16
|
url: "https://github.com/utahdts/utah-design-system/issues"
|
|
16
|
-
},
|
|
17
|
-
"@popperjs/core": "2.11.
|
|
18
|
-
},
|
|
19
|
-
eslint: "8.
|
|
17
|
+
}, Mn = "https://github.com/utahdts/utah-design-system#readme", Tn = {
|
|
18
|
+
"@popperjs/core": "2.11.7"
|
|
19
|
+
}, An = {
|
|
20
|
+
eslint: "8.37.0",
|
|
20
21
|
"eslint-config-airbnb": "19.0.4",
|
|
21
22
|
"eslint-plugin-import": "2.27.5",
|
|
22
23
|
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
23
|
-
sass: "1.
|
|
24
|
-
vite: "4.1
|
|
24
|
+
sass: "1.60.0",
|
|
25
|
+
vite: "4.2.1",
|
|
25
26
|
"vite-plugin-eslint": "1.8.1",
|
|
26
|
-
vitest: "0.29.
|
|
27
|
-
},
|
|
28
|
-
name:
|
|
29
|
-
version:
|
|
30
|
-
description:
|
|
31
|
-
main:
|
|
32
|
-
files:
|
|
33
|
-
scripts:
|
|
34
|
-
repository:
|
|
35
|
-
license:
|
|
36
|
-
bugs:
|
|
37
|
-
homepage:
|
|
38
|
-
dependencies:
|
|
39
|
-
devDependencies:
|
|
40
|
-
type:
|
|
27
|
+
vitest: "0.29.8"
|
|
28
|
+
}, wn = "module", On = {
|
|
29
|
+
name: fn,
|
|
30
|
+
version: hn,
|
|
31
|
+
description: _n,
|
|
32
|
+
main: mn,
|
|
33
|
+
files: En,
|
|
34
|
+
scripts: vn,
|
|
35
|
+
repository: bn,
|
|
36
|
+
license: In,
|
|
37
|
+
bugs: gn,
|
|
38
|
+
homepage: Mn,
|
|
39
|
+
dependencies: Tn,
|
|
40
|
+
devDependencies: An,
|
|
41
|
+
type: wn
|
|
41
42
|
};
|
|
42
|
-
const
|
|
43
|
+
const W = {
|
|
44
|
+
FLYOUT: (
|
|
45
|
+
/** @type {ChildrenMenuType} */
|
|
46
|
+
"flyout"
|
|
47
|
+
),
|
|
48
|
+
INLINE: (
|
|
49
|
+
/** @type {ChildrenMenuType} */
|
|
50
|
+
"inline"
|
|
51
|
+
),
|
|
52
|
+
MEGA_MENU: (
|
|
53
|
+
/** @type {ChildrenMenuType} */
|
|
54
|
+
"mega-menu"
|
|
55
|
+
)
|
|
56
|
+
}, kt = {
|
|
57
|
+
// Fired when the utah header is first loaded (setUtahHeaderSettings does not trigger this)
|
|
58
|
+
HEADER_LOADED: (
|
|
59
|
+
/** @type {Events} */
|
|
60
|
+
"utahHeaderLoaded"
|
|
61
|
+
),
|
|
62
|
+
// Fired when the header unloads by code calling the function removeHeader() (not when settings updated)
|
|
63
|
+
HEADER_UNLOADED: (
|
|
64
|
+
/** @type {Events} */
|
|
65
|
+
"utahHeaderUnloaded"
|
|
66
|
+
)
|
|
67
|
+
}, Qe = {
|
|
43
68
|
AUTO: (
|
|
44
69
|
/** @type {PopupPlacement} */
|
|
45
70
|
"auto"
|
|
@@ -100,7 +125,7 @@ const Xe = {
|
|
|
100
125
|
/** @type {PopupPlacement} */
|
|
101
126
|
"top-end"
|
|
102
127
|
)
|
|
103
|
-
},
|
|
128
|
+
}, ce = {
|
|
104
129
|
SMALL: (
|
|
105
130
|
/** @type {Size} */
|
|
106
131
|
"SMALL"
|
|
@@ -113,81 +138,13 @@ const Xe = {
|
|
|
113
138
|
/** @type {Size} */
|
|
114
139
|
"LARGE"
|
|
115
140
|
)
|
|
116
|
-
},
|
|
117
|
-
mediaSizes: {
|
|
118
|
-
mobile: 640,
|
|
119
|
-
tabletPortrait: 768,
|
|
120
|
-
tabletLandscape: 1024
|
|
121
|
-
},
|
|
122
|
-
showTitle: !0,
|
|
123
|
-
size: ue.MEDIUM,
|
|
124
|
-
title: "Utah Design System",
|
|
125
|
-
titleURL: "/",
|
|
126
|
-
utahId: !0
|
|
127
|
-
}, W = {
|
|
128
|
-
FLYOUT: (
|
|
129
|
-
/** @type {ChildrenMenuType} */
|
|
130
|
-
"flyout"
|
|
131
|
-
),
|
|
132
|
-
INLINE: (
|
|
133
|
-
/** @type {ChildrenMenuType} */
|
|
134
|
-
"inline"
|
|
135
|
-
),
|
|
136
|
-
MEGA_MENU: (
|
|
137
|
-
/** @type {ChildrenMenuType} */
|
|
138
|
-
"mega-menu"
|
|
139
|
-
)
|
|
140
|
-
}, Rt = {
|
|
141
|
-
// Fired when the utah header is first loaded (setUtahHeaderSettings does not trigger this)
|
|
142
|
-
HEADER_LOADED: (
|
|
143
|
-
/** @type {Events} */
|
|
144
|
-
"utahHeaderLoaded"
|
|
145
|
-
),
|
|
146
|
-
// Fired when the header unloads by code calling the function removeHeader() (not when settings updated)
|
|
147
|
-
HEADER_UNLOADED: (
|
|
148
|
-
/** @type {Events} */
|
|
149
|
-
"utahHeaderUnloaded"
|
|
150
|
-
)
|
|
151
|
-
};
|
|
152
|
-
function Ge(t) {
|
|
153
|
-
return typeof t == "string" || t instanceof String;
|
|
154
|
-
}
|
|
155
|
-
function Be(t) {
|
|
156
|
-
const e = new DOMParser();
|
|
157
|
-
let n;
|
|
158
|
-
if (Ge(t)) {
|
|
159
|
-
const r = (
|
|
160
|
-
/** @type {Document} */
|
|
161
|
-
Ge(t) ? e.parseFromString(t, "text/html") : t
|
|
162
|
-
), o = r.body.children.length > 1 ? r.body.children : r.body.children.item(0);
|
|
163
|
-
if (!o)
|
|
164
|
-
throw console.error(t), new Error("renderDOM: nothing rendered");
|
|
165
|
-
n = o;
|
|
166
|
-
} else if (
|
|
167
|
-
/** @type {unknown} */
|
|
168
|
-
t instanceof Element
|
|
169
|
-
)
|
|
170
|
-
n = t;
|
|
171
|
-
else
|
|
172
|
-
throw t ? (console.error(t), new Error(`renderDOM: str is not a string nor a DOM Element : '${t}'`)) : new Error("renderDOM: falsy string passed; cannot render nothing");
|
|
173
|
-
return n;
|
|
174
|
-
}
|
|
175
|
-
function A(t) {
|
|
176
|
-
const e = Be(t);
|
|
177
|
-
if (e instanceof HTMLCollection && e.length > 1)
|
|
178
|
-
throw new Error("renderDOMSingle: must render a single element");
|
|
179
|
-
const n = (
|
|
180
|
-
/** @type HTMLElement | null */
|
|
181
|
-
e instanceof HTMLCollection ? e[0] : e
|
|
182
|
-
);
|
|
183
|
-
if (!n)
|
|
184
|
-
throw console.error(t), new Error("renderDOMSingle: nothing rendered");
|
|
185
|
-
return n;
|
|
186
|
-
}
|
|
187
|
-
const An = `/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
|
|
141
|
+
}, yn = `/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
|
|
188
142
|
|
|
189
143
|
@media screen and (max-width: media-size__tablet-landscape__PLACEHOLDER) {
|
|
190
144
|
/* put your media query here for tablet landscape */
|
|
145
|
+
.utah-design-system .search-modal__input {
|
|
146
|
+
width: 75vw;
|
|
147
|
+
}
|
|
191
148
|
}
|
|
192
149
|
|
|
193
150
|
@media screen and (max-width: media-size__tablet-portrait__PLACEHOLDER) {
|
|
@@ -216,17 +173,27 @@ const An = `/* @media is never in scope for --variables, so this is the only way
|
|
|
216
173
|
.utah-design-system .utds-header-mobile__vip-action-items--right {
|
|
217
174
|
display: flex;
|
|
218
175
|
}
|
|
176
|
+
|
|
177
|
+
.utah-design-system .search-modal__input {
|
|
178
|
+
width: 75vw;
|
|
179
|
+
padding: var(--spacing) var(--spacing) var(--spacing) var(--spacing-3xl);
|
|
180
|
+
}
|
|
181
|
+
.utah-design-system .search-modal__button-wrapper {
|
|
182
|
+
right: unset;
|
|
183
|
+
left: 50%;
|
|
184
|
+
transform: translateX(-50%) translateY(110%);
|
|
185
|
+
}
|
|
219
186
|
}
|
|
220
187
|
|
|
221
188
|
@media screen and (max-width: media-size__mobile__PLACEHOLDER) {
|
|
222
189
|
/* put your media query here for mobile */
|
|
223
190
|
}
|
|
224
|
-
`,
|
|
191
|
+
`, Pn = `<div class="utah-design-system utds-header-mobile-menu" id="utds-header-mobile-menu">
|
|
225
192
|
<div class="utds-header-mobile-menu__backdrop" aria-hidden></div>
|
|
226
193
|
<div class="utds-header-mobile-menu__wrapper">
|
|
227
|
-
<div class="utds-header-mobile-menu__action-bar">
|
|
194
|
+
<div class="utds-header-mobile-menu__action-bar" role="tablist">
|
|
228
195
|
|
|
229
|
-
<div class="utds-header-mobile-menu__action-item">
|
|
196
|
+
<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
230
197
|
<button type="button" class="icon-button icon-button--borderless utds-header-action-item__icon-button icon-home"
|
|
231
198
|
id="utds-header-mobile-menu_action-bar__home">
|
|
232
199
|
<div class="utds-header-action-item__title visually-hidden">Main Menu</div>
|
|
@@ -235,7 +202,7 @@ const An = `/* @media is never in scope for --variables, so this is the only way
|
|
|
235
202
|
</button>
|
|
236
203
|
<span class="menu-chiclet"></span>
|
|
237
204
|
</div>
|
|
238
|
-
<div class="utds-header-mobile-menu__action-item">
|
|
205
|
+
<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
239
206
|
<button type="button"
|
|
240
207
|
class="icon-button icon-button--borderless utds-header-action-item__icon-button icon-profile"
|
|
241
208
|
id="utds-header-mobile-menu_action-bar__profile">
|
|
@@ -254,7 +221,7 @@ const An = `/* @media is never in scope for --variables, so this is the only way
|
|
|
254
221
|
function f(t) {
|
|
255
222
|
return `.${(Array.isArray(t) ? t : [t]).join(".")}`;
|
|
256
223
|
}
|
|
257
|
-
const
|
|
224
|
+
const s = {
|
|
258
225
|
// Global Information
|
|
259
226
|
UTAH_DESIGN_SYSTEM: "utah-design-system",
|
|
260
227
|
HEADER: "utds-header",
|
|
@@ -314,7 +281,6 @@ const l = {
|
|
|
314
281
|
MOBILE_MENU_ACTON_BAR__HOME_ID: "utds-header-mobile-menu_action-bar__home",
|
|
315
282
|
MOBILE_MENU_ACTON_BAR__PROFILE_ID: "utds-header-mobile-menu_action-bar__profile",
|
|
316
283
|
MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER: "utds-header-mobile-menu__action-item",
|
|
317
|
-
// TODO: change popup_menu constants to be vertical_menu constants
|
|
318
284
|
POPUP_MENU: "vertical-menu",
|
|
319
285
|
POPUP_MENU__BUTTON_TITLE: "vertical-menu__button-title",
|
|
320
286
|
POPUP_MENU__CHEVRON: "vertical-menu__chevron",
|
|
@@ -333,6 +299,12 @@ const l = {
|
|
|
333
299
|
POPUP_ARROW: "popup__arrow",
|
|
334
300
|
POPUP_CONTENT_WRAPPER: "popup__content",
|
|
335
301
|
POPUP_WRAPPER: "popup__wrapper",
|
|
302
|
+
SEARCH__SEARCH_BACKDROP: "search-backdrop",
|
|
303
|
+
SEARCH__SEARCH_CLOSE_BUTTON: "search-modal__close-button",
|
|
304
|
+
SEARCH__SEARCH_BUTTON: "search-modal__button",
|
|
305
|
+
SEARCH__SEARCH_BUTTON_WRAPPER: "search-modal__button-wrapper",
|
|
306
|
+
SEARCH__SEARCH_INPUT: "search-modal__input",
|
|
307
|
+
SEARCH__SEARCH_MODAL: "search-modal",
|
|
336
308
|
SIZE__LARGE: "large",
|
|
337
309
|
SIZE__MEDIUM: "medium",
|
|
338
310
|
TITLE: "utds-title-wrapper",
|
|
@@ -345,11 +317,67 @@ const l = {
|
|
|
345
317
|
TOOLTIP__WRAPPER__VISIBLE: "tooltip__wrapper--visible",
|
|
346
318
|
UTAH_ID: "utds-utah-id-wrapper",
|
|
347
319
|
UTAH_ID__BUTTON: "utds-utah-id__button"
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
320
|
+
};
|
|
321
|
+
function Ge(t) {
|
|
322
|
+
return typeof t == "string" || t instanceof String;
|
|
323
|
+
}
|
|
324
|
+
function Nn(t) {
|
|
325
|
+
const e = new DOMParser();
|
|
326
|
+
let n;
|
|
327
|
+
if (Ge(t)) {
|
|
328
|
+
const r = (
|
|
329
|
+
/** @type {Document} */
|
|
330
|
+
Ge(t) ? e.parseFromString(t, "text/html") : t
|
|
331
|
+
), o = r.body.children.length > 1 ? r.body.children : r.body.children.item(0);
|
|
332
|
+
if (!o)
|
|
333
|
+
throw console.error(t), new Error("renderDOM: nothing rendered");
|
|
334
|
+
n = o;
|
|
335
|
+
} else if (
|
|
336
|
+
/** @type {unknown} */
|
|
337
|
+
t instanceof Element
|
|
338
|
+
)
|
|
339
|
+
n = t;
|
|
340
|
+
else
|
|
341
|
+
throw t ? (console.error(t), new Error(`renderDOM: str is not a string nor a DOM Element : '${t}'`)) : new Error("renderDOM: falsy string passed; cannot render nothing");
|
|
342
|
+
return n;
|
|
343
|
+
}
|
|
344
|
+
function T(t) {
|
|
345
|
+
const e = typeof t == "string" ? Nn(t) : t;
|
|
346
|
+
if (e instanceof HTMLCollection && e.length > 1)
|
|
347
|
+
throw new Error("renderDOMSingle: must render a single element");
|
|
348
|
+
const n = (
|
|
349
|
+
/** @type HTMLElement | null */
|
|
350
|
+
e instanceof HTMLCollection ? e[0] : e
|
|
351
|
+
);
|
|
352
|
+
if (!n)
|
|
353
|
+
throw console.error(t), new Error("renderDOMSingle: nothing rendered");
|
|
354
|
+
return n;
|
|
355
|
+
}
|
|
356
|
+
const Ln = `<h1 class="utds-logo-wrapper"></h1>
|
|
357
|
+
`, Un = `<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
358
|
+
`, Sn = `<span class="utds-logo-vert-line"></span>
|
|
359
|
+
`, Cn = {
|
|
360
|
+
mainMenu: {
|
|
361
|
+
menuItems: [
|
|
362
|
+
{ title: "Home", actionUrl: { url: "/" } }
|
|
363
|
+
],
|
|
364
|
+
title: "Main Menu"
|
|
365
|
+
},
|
|
366
|
+
mediaSizes: {
|
|
367
|
+
mobile: 640,
|
|
368
|
+
tabletPortrait: 768,
|
|
369
|
+
tabletLandscape: 1024
|
|
370
|
+
},
|
|
371
|
+
showTitle: !0,
|
|
372
|
+
size: ce.MEDIUM,
|
|
373
|
+
title: "Utah Design System",
|
|
374
|
+
titleURL: "/",
|
|
375
|
+
utahId: !0
|
|
376
|
+
}, Dn = `<span class="utds-icon-before-alert" aria-hidden="true" />
|
|
377
|
+
`, Rn = `<span class="utds-icon-before-gear" aria-hidden="true" />
|
|
378
|
+
`, xn = `<span class="utds-icon-before-help" aria-hidden="true" />
|
|
379
|
+
`, Hn = `<span class="utds-icon-before-waffle" aria-hidden="true" />
|
|
380
|
+
`, Bn = {
|
|
353
381
|
actionItems: [
|
|
354
382
|
{
|
|
355
383
|
actionPopupMenu: {
|
|
@@ -403,7 +431,7 @@ const l = {
|
|
|
403
431
|
title: "Divisions Menu"
|
|
404
432
|
},
|
|
405
433
|
className: "icon-waffle",
|
|
406
|
-
icon:
|
|
434
|
+
icon: Hn,
|
|
407
435
|
showTitle: !0,
|
|
408
436
|
title: "Divisions"
|
|
409
437
|
},
|
|
@@ -417,7 +445,7 @@ const l = {
|
|
|
417
445
|
label: "Unread Alert",
|
|
418
446
|
value: 1
|
|
419
447
|
},
|
|
420
|
-
icon:
|
|
448
|
+
icon: Dn,
|
|
421
449
|
showTitle: !1,
|
|
422
450
|
title: "Alerts"
|
|
423
451
|
},
|
|
@@ -432,7 +460,7 @@ const l = {
|
|
|
432
460
|
// Note: make sure the `label` is plural/singular to match the value
|
|
433
461
|
label: "Help Items Available"
|
|
434
462
|
},
|
|
435
|
-
icon:
|
|
463
|
+
icon: xn,
|
|
436
464
|
showTitle: !1,
|
|
437
465
|
title: "Help"
|
|
438
466
|
},
|
|
@@ -443,7 +471,7 @@ const l = {
|
|
|
443
471
|
const e = document.createElement("button");
|
|
444
472
|
return e.appendChild(document.createTextNode("Speak Different")), e.onclick = () => alert("lorem ipsum"), t.appendChild(e), t;
|
|
445
473
|
},
|
|
446
|
-
icon:
|
|
474
|
+
icon: Rn,
|
|
447
475
|
showTitle: !1,
|
|
448
476
|
title: "Settings"
|
|
449
477
|
}
|
|
@@ -455,7 +483,7 @@ const l = {
|
|
|
455
483
|
},
|
|
456
484
|
onSearch: (t) => alert(t),
|
|
457
485
|
showTitle: !0,
|
|
458
|
-
size:
|
|
486
|
+
size: ce.MEDIUM,
|
|
459
487
|
title: "Utah Design System",
|
|
460
488
|
titleURL: "/",
|
|
461
489
|
utahId: !0,
|
|
@@ -655,114 +683,46 @@ const l = {
|
|
|
655
683
|
title: "Utah Design System Main Menu"
|
|
656
684
|
}
|
|
657
685
|
};
|
|
658
|
-
let De = { ...
|
|
686
|
+
let De = { ...Bn };
|
|
659
687
|
function N() {
|
|
660
688
|
return De;
|
|
661
689
|
}
|
|
662
|
-
function
|
|
690
|
+
function kn(t) {
|
|
663
691
|
if (!t.showTitle && !t.logo)
|
|
664
692
|
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.");
|
|
665
693
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
694
|
+
function Mt() {
|
|
695
|
+
jo(!1), $o();
|
|
668
696
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
function
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
t.appendChild(e);
|
|
685
|
-
else
|
|
686
|
-
throw console.error(e), new Error("appendChildAll: Unknown child element");
|
|
687
|
-
}
|
|
688
|
-
function Cn() {
|
|
689
|
-
const t = N().titleURL, e = A(t ? Dn : Sn);
|
|
690
|
-
if (!e)
|
|
691
|
-
throw new Error("LogoTitle: titleWrapper is null");
|
|
692
|
-
t && e.setAttribute("href", t);
|
|
693
|
-
const n = e.querySelector(f(l.TITLE__LOGO));
|
|
694
|
-
if (!n)
|
|
695
|
-
throw new Error("LogoTitle: logoWrapper is null");
|
|
696
|
-
const r = N().logo, o = N().showTitle, i = N().title;
|
|
697
|
-
if (r) {
|
|
698
|
-
let s;
|
|
699
|
-
Ge(r) ? s = A(
|
|
700
|
-
/** @type {string} */
|
|
701
|
-
r
|
|
702
|
-
) : s = /** @type {Element} */
|
|
703
|
-
r, s.setAttribute("role", "presentation"), k(n, s);
|
|
704
|
-
} else
|
|
705
|
-
e.removeChild(n);
|
|
706
|
-
const c = document.createTextNode(i), a = e.querySelector(f(l.TITLE__TITLE));
|
|
707
|
-
return a == null || a.appendChild(c), !o && r && (a == null || a.classList.add(l.VISUALLY_HIDDEN)), e;
|
|
708
|
-
}
|
|
709
|
-
const Rn = `<div class="utah-logo-svg" role="img">
|
|
710
|
-
<title>An official website of the State of Utah</title>
|
|
711
|
-
<svg viewBox="0 0 137.363 56.6959">
|
|
712
|
-
<g>
|
|
713
|
-
<g>
|
|
714
|
-
<path d="M15.972,39.161c-5.4,0-9.4127-1.5667-12.038-4.7C1.3087,31.3277-.0027,26.466,0,19.876V0H10.175V21.06c0,3.4313,.4633,5.847,1.39,7.247,.9909,1.434,2.669,2.2337,4.407,2.1,1.7525,.124,3.4436-.6712,4.466-2.1,.966-1.4,1.449-3.8157,1.449-7.247V0h9.82V19.876c0,6.586-1.2817,11.4467-3.845,14.582-2.5633,3.1353-6.5267,4.703-11.89,4.703Zm31.353-.711V8.518h-10.175V0h30.525V8.518h-10.175v29.932h-10.175Zm33.6-18.693l-.651,2.662h7.1l-.651-2.662c-.4733-1.8533-.9467-3.8647-1.42-6.034-.4733-2.1693-.945-4.2197-1.415-6.151h-.237c-.434,1.972-.8777,4.0327-1.331,6.182s-.918,4.1507-1.394,6.004l-.001-.001Zm-14.788,18.693L77.85,0h12.3l11.717,38.45h-10.767l-1.893-8.162h-10.766l-1.893,8.162h-10.411Zm39.4,0V0h10.175V14.316h11.476V0h10.175V38.45h-10.175v-15.261h-11.479v15.261h-10.172Z" />
|
|
715
|
-
</g>
|
|
716
|
-
<text transform="translate(.0419 52.5939)"><tspan x="0" y="0">An official </tspan><tspan x="60.437" y="0" style="letter-spacing: -.02em;">s</tspan><tspan x="66.0229" y="0" style="letter-spacing: -.021em;">t</tspan><tspan x="70.4614" y="0" style="letter-spacing: -.014em;">at</tspan><tspan x="81.8569" y="0" style="letter-spacing: 0em;">e </tspan><tspan x="91.6011" y="0" style="letter-spacing: -.004em;">w</tspan><tspan x="101.5972" y="0">ebsi</tspan><tspan x="125.5923" y="0" style="letter-spacing: -.014em;">t</tspan><tspan x="130.1284" y="0">e</tspan></text>
|
|
717
|
-
</g>
|
|
718
|
-
</svg>
|
|
719
|
-
</div>
|
|
720
|
-
`, xn = `<div class="utah-logo-svg">
|
|
721
|
-
<svg viewBox="0 0 105.9496 47.6226" role="img">
|
|
722
|
-
<title>An official website of the State of Utah</title>
|
|
723
|
-
<g>
|
|
724
|
-
<g>
|
|
725
|
-
<path d="M12.2714,30.0877c-4.1489,0-7.2318-1.2037-9.2489-3.611C1.0055,24.0693-.002,20.334,0,15.2709V0H7.8175V16.1806c0,2.6363,.356,4.4923,1.0679,5.5679,.7613,1.1018,2.0506,1.7162,3.3859,1.6134,1.3465,.0953,2.6458-.5157,3.4313-1.6134,.7422-1.0756,1.1133-2.9316,1.1133-5.5679V0h7.5448V15.2709c0,5.0601-.9847,8.7946-2.9541,11.2035-1.9694,2.4089-5.0145,3.6133-9.1352,3.6133Zm24.0887-.5463V6.5444h-7.8175V0h23.4526V6.5444h-7.8175V29.5414h-7.8175Zm25.8151-14.362l-.5002,2.0452h5.455l-.5002-2.0452c-.3637-1.4239-.7273-2.9693-1.091-4.636-.3637-1.6667-.7261-3.242-1.0871-4.7259h-.1821c-.3334,1.5151-.6743,3.0983-1.0226,4.7497s-.7053,3.189-1.071,4.6129l-.0008-.0008Zm-11.3617,14.362L59.8127,0h9.4502l9.0023,29.5414h-8.2724l-1.4544-6.2709h-8.2716l-1.4544,6.2709h-7.9988Zm30.2713,0V0h7.8175V10.9991h8.8171V0h7.8175V29.5414h-7.8175v-11.7251h-8.8194v11.7251h-7.8152Z" />
|
|
726
|
-
</g>
|
|
727
|
-
<text transform="translate(.0419 43.5205)"><tspan x="0" y="0">An official </tspan><tspan x="60.437" y="0" style="letter-spacing: -.004em;">w</tspan><tspan x="70.4331" y="0">ebsi</tspan><tspan x="94.4282" y="0" style="letter-spacing: -.014em;">t</tspan><tspan x="98.9644" y="0">e</tspan></text>
|
|
728
|
-
</g>
|
|
729
|
-
</svg>
|
|
730
|
-
</div>
|
|
731
|
-
`;
|
|
732
|
-
function Bn() {
|
|
733
|
-
let t;
|
|
734
|
-
switch (N().size) {
|
|
735
|
-
case ue.LARGE:
|
|
736
|
-
t = Rn;
|
|
737
|
-
break;
|
|
738
|
-
case ue.SMALL:
|
|
739
|
-
case ue.MEDIUM:
|
|
740
|
-
t = xn;
|
|
741
|
-
break;
|
|
742
|
-
default:
|
|
743
|
-
throw new Error(`Unknown settings size: '${N().size}'`);
|
|
744
|
-
}
|
|
745
|
-
return Be(t);
|
|
746
|
-
}
|
|
747
|
-
const Hn = `<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
748
|
-
`, Wn = `<span class="utds-logo-vert-line"></span>
|
|
749
|
-
`, kn = `<div class="utds-citizen-experience-wrapper"></div>
|
|
750
|
-
`, Vn = `<div class="utds-action-items-wrapper"></div>
|
|
751
|
-
`, qn = `<div class="utds-header-action-item">
|
|
697
|
+
let Wt = !1;
|
|
698
|
+
const Wn = 15e3;
|
|
699
|
+
let Tt = 0;
|
|
700
|
+
const qn = setInterval(
|
|
701
|
+
() => {
|
|
702
|
+
Tt += 1, Tt >= Wn || Wt ? clearInterval(qn) : document.dispatchEvent(new Event(kt.HEADER_LOADED));
|
|
703
|
+
},
|
|
704
|
+
2
|
|
705
|
+
);
|
|
706
|
+
function zo(t) {
|
|
707
|
+
return De = { ...Cn, ...t }, kn(De), Wt = !0, document != null && document.body ? Mt() : window.addEventListener("load", () => Mt()), De;
|
|
708
|
+
}
|
|
709
|
+
const Vn = `<div class="utds-citizen-experience-wrapper"></div>
|
|
710
|
+
`, Fn = `<div class="utds-action-items-wrapper"></div>
|
|
711
|
+
`, Gn = `<div class="utds-header-action-item">
|
|
752
712
|
<button type="button" class="icon-button utds-header-action-item__icon-button">
|
|
753
713
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
754
714
|
</button>
|
|
755
715
|
</div>
|
|
756
716
|
`;
|
|
757
|
-
var R = "top",
|
|
758
|
-
return t.concat([e + "-" +
|
|
759
|
-
}, []),
|
|
760
|
-
return t.concat([e, e + "-" +
|
|
761
|
-
}, []),
|
|
762
|
-
function
|
|
717
|
+
var R = "top", F = "bottom", G = "right", x = "left", Be = "auto", we = [R, F, G, x], ue = "start", ge = "end", $n = "clippingParents", qt = "viewport", Ee = "popper", jn = "reference", At = /* @__PURE__ */ we.reduce(function(t, e) {
|
|
718
|
+
return t.concat([e + "-" + ue, e + "-" + ge]);
|
|
719
|
+
}, []), Vt = /* @__PURE__ */ [].concat(we, [Be]).reduce(function(t, e) {
|
|
720
|
+
return t.concat([e, e + "-" + ue, e + "-" + ge]);
|
|
721
|
+
}, []), Yn = "beforeRead", zn = "read", Kn = "afterRead", Zn = "beforeMain", Xn = "main", Qn = "afterMain", Jn = "beforeWrite", er = "write", tr = "afterWrite", $e = [Yn, zn, Kn, Zn, Xn, Qn, Jn, er, tr];
|
|
722
|
+
function K(t) {
|
|
763
723
|
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
764
724
|
}
|
|
765
|
-
function
|
|
725
|
+
function V(t) {
|
|
766
726
|
if (t == null)
|
|
767
727
|
return window;
|
|
768
728
|
if (t.toString() !== "[object Window]") {
|
|
@@ -771,31 +731,31 @@ function G(t) {
|
|
|
771
731
|
}
|
|
772
732
|
return t;
|
|
773
733
|
}
|
|
774
|
-
function
|
|
775
|
-
var e =
|
|
734
|
+
function ae(t) {
|
|
735
|
+
var e = V(t).Element;
|
|
776
736
|
return t instanceof e || t instanceof Element;
|
|
777
737
|
}
|
|
778
|
-
function
|
|
779
|
-
var e =
|
|
738
|
+
function q(t) {
|
|
739
|
+
var e = V(t).HTMLElement;
|
|
780
740
|
return t instanceof e || t instanceof HTMLElement;
|
|
781
741
|
}
|
|
782
|
-
function
|
|
742
|
+
function Je(t) {
|
|
783
743
|
if (typeof ShadowRoot > "u")
|
|
784
744
|
return !1;
|
|
785
|
-
var e =
|
|
745
|
+
var e = V(t).ShadowRoot;
|
|
786
746
|
return t instanceof e || t instanceof ShadowRoot;
|
|
787
747
|
}
|
|
788
|
-
function
|
|
748
|
+
function nr(t) {
|
|
789
749
|
var e = t.state;
|
|
790
750
|
Object.keys(e.elements).forEach(function(n) {
|
|
791
751
|
var r = e.styles[n] || {}, o = e.attributes[n] || {}, i = e.elements[n];
|
|
792
|
-
!
|
|
752
|
+
!q(i) || !K(i) || (Object.assign(i.style, r), Object.keys(o).forEach(function(c) {
|
|
793
753
|
var a = o[c];
|
|
794
754
|
a === !1 ? i.removeAttribute(c) : i.setAttribute(c, a === !0 ? "" : a);
|
|
795
755
|
}));
|
|
796
756
|
});
|
|
797
757
|
}
|
|
798
|
-
function
|
|
758
|
+
function rr(t) {
|
|
799
759
|
var e = t.state, n = {
|
|
800
760
|
popper: {
|
|
801
761
|
position: e.options.strategy,
|
|
@@ -810,54 +770,54 @@ function tr(t) {
|
|
|
810
770
|
};
|
|
811
771
|
return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
|
|
812
772
|
Object.keys(e.elements).forEach(function(r) {
|
|
813
|
-
var o = e.elements[r], i = e.attributes[r] || {}, c = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), a = c.reduce(function(
|
|
814
|
-
return
|
|
773
|
+
var o = e.elements[r], i = e.attributes[r] || {}, c = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), a = c.reduce(function(l, u) {
|
|
774
|
+
return l[u] = "", l;
|
|
815
775
|
}, {});
|
|
816
|
-
!
|
|
817
|
-
o.removeAttribute(
|
|
776
|
+
!q(o) || !K(o) || (Object.assign(o.style, a), Object.keys(i).forEach(function(l) {
|
|
777
|
+
o.removeAttribute(l);
|
|
818
778
|
}));
|
|
819
779
|
});
|
|
820
780
|
};
|
|
821
781
|
}
|
|
822
|
-
const
|
|
782
|
+
const or = {
|
|
823
783
|
name: "applyStyles",
|
|
824
784
|
enabled: !0,
|
|
825
785
|
phase: "write",
|
|
826
|
-
fn:
|
|
827
|
-
effect:
|
|
786
|
+
fn: nr,
|
|
787
|
+
effect: rr,
|
|
828
788
|
requires: ["computeStyles"]
|
|
829
789
|
};
|
|
830
790
|
function j(t) {
|
|
831
791
|
return t.split("-")[0];
|
|
832
792
|
}
|
|
833
|
-
var
|
|
793
|
+
var ie = Math.max, xe = Math.min, de = Math.round;
|
|
834
794
|
function je() {
|
|
835
795
|
var t = navigator.userAgentData;
|
|
836
|
-
return t != null && t.brands ? t.brands.map(function(e) {
|
|
796
|
+
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
837
797
|
return e.brand + "/" + e.version;
|
|
838
798
|
}).join(" ") : navigator.userAgent;
|
|
839
799
|
}
|
|
840
|
-
function
|
|
800
|
+
function Ft() {
|
|
841
801
|
return !/^((?!chrome|android).)*safari/i.test(je());
|
|
842
802
|
}
|
|
843
|
-
function
|
|
803
|
+
function pe(t, e, n) {
|
|
844
804
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
845
805
|
var r = t.getBoundingClientRect(), o = 1, i = 1;
|
|
846
|
-
e &&
|
|
847
|
-
var c =
|
|
806
|
+
e && q(t) && (o = t.offsetWidth > 0 && de(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && de(r.height) / t.offsetHeight || 1);
|
|
807
|
+
var c = ae(t) ? V(t) : window, a = c.visualViewport, l = !Ft() && n, u = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, _ = r.width / o, h = r.height / i;
|
|
848
808
|
return {
|
|
849
|
-
width:
|
|
850
|
-
height:
|
|
809
|
+
width: _,
|
|
810
|
+
height: h,
|
|
851
811
|
top: d,
|
|
852
|
-
right: u +
|
|
853
|
-
bottom: d +
|
|
812
|
+
right: u + _,
|
|
813
|
+
bottom: d + h,
|
|
854
814
|
left: u,
|
|
855
815
|
x: u,
|
|
856
816
|
y: d
|
|
857
817
|
};
|
|
858
818
|
}
|
|
859
|
-
function
|
|
860
|
-
var e =
|
|
819
|
+
function et(t) {
|
|
820
|
+
var e = pe(t), n = t.offsetWidth, r = t.offsetHeight;
|
|
861
821
|
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
|
|
862
822
|
x: t.offsetLeft,
|
|
863
823
|
y: t.offsetTop,
|
|
@@ -865,11 +825,11 @@ function Qe(t) {
|
|
|
865
825
|
height: r
|
|
866
826
|
};
|
|
867
827
|
}
|
|
868
|
-
function
|
|
828
|
+
function Gt(t, e) {
|
|
869
829
|
var n = e.getRootNode && e.getRootNode();
|
|
870
830
|
if (t.contains(e))
|
|
871
831
|
return !0;
|
|
872
|
-
if (n &&
|
|
832
|
+
if (n && Je(n)) {
|
|
873
833
|
var r = e;
|
|
874
834
|
do {
|
|
875
835
|
if (r && t.isSameNode(r))
|
|
@@ -879,44 +839,44 @@ function Wt(t, e) {
|
|
|
879
839
|
}
|
|
880
840
|
return !1;
|
|
881
841
|
}
|
|
882
|
-
function
|
|
883
|
-
return
|
|
842
|
+
function Y(t) {
|
|
843
|
+
return V(t).getComputedStyle(t);
|
|
884
844
|
}
|
|
885
|
-
function
|
|
886
|
-
return ["table", "td", "th"].indexOf(
|
|
845
|
+
function ir(t) {
|
|
846
|
+
return ["table", "td", "th"].indexOf(K(t)) >= 0;
|
|
887
847
|
}
|
|
888
|
-
function
|
|
889
|
-
return ((
|
|
848
|
+
function Q(t) {
|
|
849
|
+
return ((ae(t) ? t.ownerDocument : (
|
|
890
850
|
// $FlowFixMe[prop-missing]
|
|
891
851
|
t.document
|
|
892
852
|
)) || window.document).documentElement;
|
|
893
853
|
}
|
|
894
|
-
function
|
|
895
|
-
return
|
|
854
|
+
function ke(t) {
|
|
855
|
+
return K(t) === "html" ? t : (
|
|
896
856
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
897
857
|
// $FlowFixMe[incompatible-return]
|
|
898
858
|
// $FlowFixMe[prop-missing]
|
|
899
859
|
t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
900
860
|
t.parentNode || // DOM Element detected
|
|
901
|
-
(
|
|
861
|
+
(Je(t) ? t.host : null) || // ShadowRoot detected
|
|
902
862
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
903
|
-
|
|
863
|
+
Q(t)
|
|
904
864
|
);
|
|
905
865
|
}
|
|
906
|
-
function
|
|
907
|
-
return !
|
|
908
|
-
|
|
866
|
+
function wt(t) {
|
|
867
|
+
return !q(t) || // https://github.com/popperjs/popper-core/issues/837
|
|
868
|
+
Y(t).position === "fixed" ? null : t.offsetParent;
|
|
909
869
|
}
|
|
910
|
-
function
|
|
870
|
+
function ar(t) {
|
|
911
871
|
var e = /firefox/i.test(je()), n = /Trident/i.test(je());
|
|
912
|
-
if (n &&
|
|
913
|
-
var r =
|
|
872
|
+
if (n && q(t)) {
|
|
873
|
+
var r = Y(t);
|
|
914
874
|
if (r.position === "fixed")
|
|
915
875
|
return null;
|
|
916
876
|
}
|
|
917
|
-
var o =
|
|
918
|
-
for (
|
|
919
|
-
var i =
|
|
877
|
+
var o = ke(t);
|
|
878
|
+
for (Je(o) && (o = o.host); q(o) && ["html", "body"].indexOf(K(o)) < 0; ) {
|
|
879
|
+
var i = Y(o);
|
|
920
880
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || e && i.willChange === "filter" || e && i.filter && i.filter !== "none")
|
|
921
881
|
return o;
|
|
922
882
|
o = o.parentNode;
|
|
@@ -924,21 +884,21 @@ function or(t) {
|
|
|
924
884
|
return null;
|
|
925
885
|
}
|
|
926
886
|
function Oe(t) {
|
|
927
|
-
for (var e =
|
|
928
|
-
n =
|
|
929
|
-
return n && (
|
|
887
|
+
for (var e = V(t), n = wt(t); n && ir(n) && Y(n).position === "static"; )
|
|
888
|
+
n = wt(n);
|
|
889
|
+
return n && (K(n) === "html" || K(n) === "body" && Y(n).position === "static") ? e : n || ar(t) || e;
|
|
930
890
|
}
|
|
931
|
-
function
|
|
891
|
+
function tt(t) {
|
|
932
892
|
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
933
893
|
}
|
|
934
894
|
function be(t, e, n) {
|
|
935
|
-
return
|
|
895
|
+
return ie(t, xe(e, n));
|
|
936
896
|
}
|
|
937
|
-
function
|
|
897
|
+
function sr(t, e, n) {
|
|
938
898
|
var r = be(t, e, n);
|
|
939
899
|
return r > n ? n : r;
|
|
940
900
|
}
|
|
941
|
-
function
|
|
901
|
+
function $t() {
|
|
942
902
|
return {
|
|
943
903
|
top: 0,
|
|
944
904
|
right: 0,
|
|
@@ -946,111 +906,111 @@ function kt() {
|
|
|
946
906
|
left: 0
|
|
947
907
|
};
|
|
948
908
|
}
|
|
949
|
-
function
|
|
950
|
-
return Object.assign({},
|
|
909
|
+
function jt(t) {
|
|
910
|
+
return Object.assign({}, $t(), t);
|
|
951
911
|
}
|
|
952
|
-
function
|
|
912
|
+
function Yt(t, e) {
|
|
953
913
|
return e.reduce(function(n, r) {
|
|
954
914
|
return n[r] = t, n;
|
|
955
915
|
}, {});
|
|
956
916
|
}
|
|
957
|
-
var
|
|
917
|
+
var lr = function(e, n) {
|
|
958
918
|
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
|
|
959
919
|
placement: n.placement
|
|
960
|
-
})) : e,
|
|
920
|
+
})) : e, jt(typeof e != "number" ? e : Yt(e, we));
|
|
961
921
|
};
|
|
962
|
-
function
|
|
963
|
-
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, c = n.modifiersData.popperOffsets, a = j(n.placement),
|
|
922
|
+
function cr(t) {
|
|
923
|
+
var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, c = n.modifiersData.popperOffsets, a = j(n.placement), l = tt(a), u = [x, G].indexOf(a) >= 0, d = u ? "height" : "width";
|
|
964
924
|
if (!(!i || !c)) {
|
|
965
|
-
var
|
|
966
|
-
n.modifiersData[r] = (e = {}, e[L] = P, e.centerOffset = P -
|
|
925
|
+
var _ = lr(o.padding, n), h = et(i), p = l === "y" ? R : x, m = l === "y" ? F : G, v = n.rects.reference[d] + n.rects.reference[l] - c[l] - n.rects.popper[d], E = c[l] - n.rects.reference[l], g = Oe(i), A = g ? l === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, y = v / 2 - E / 2, b = _[p], I = A - h[d] - _[m], M = A / 2 - h[d] / 2 + y, P = be(b, M, I), L = l;
|
|
926
|
+
n.modifiersData[r] = (e = {}, e[L] = P, e.centerOffset = P - M, e);
|
|
967
927
|
}
|
|
968
928
|
}
|
|
969
|
-
function
|
|
929
|
+
function ur(t) {
|
|
970
930
|
var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
|
|
971
931
|
if (o != null && !(typeof o == "string" && (o = e.elements.popper.querySelector(o), !o))) {
|
|
972
|
-
if ({}.NODE_ENV !== "production" && (
|
|
932
|
+
if ({}.NODE_ENV !== "production" && (q(o) || 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(" "))), !Gt(e.elements.popper, o)) {
|
|
973
933
|
({}).NODE_ENV !== "production" && console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
|
|
974
934
|
return;
|
|
975
935
|
}
|
|
976
936
|
e.elements.arrow = o;
|
|
977
937
|
}
|
|
978
938
|
}
|
|
979
|
-
const
|
|
939
|
+
const dr = {
|
|
980
940
|
name: "arrow",
|
|
981
941
|
enabled: !0,
|
|
982
942
|
phase: "main",
|
|
983
|
-
fn:
|
|
984
|
-
effect:
|
|
943
|
+
fn: cr,
|
|
944
|
+
effect: ur,
|
|
985
945
|
requires: ["popperOffsets"],
|
|
986
946
|
requiresIfExists: ["preventOverflow"]
|
|
987
947
|
};
|
|
988
|
-
function
|
|
948
|
+
function fe(t) {
|
|
989
949
|
return t.split("-")[1];
|
|
990
950
|
}
|
|
991
|
-
var
|
|
951
|
+
var pr = {
|
|
992
952
|
top: "auto",
|
|
993
953
|
right: "auto",
|
|
994
954
|
bottom: "auto",
|
|
995
955
|
left: "auto"
|
|
996
956
|
};
|
|
997
|
-
function
|
|
998
|
-
var
|
|
957
|
+
function fr(t, e) {
|
|
958
|
+
var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
|
|
999
959
|
return {
|
|
1000
|
-
x:
|
|
1001
|
-
y:
|
|
960
|
+
x: de(n * o) / o || 0,
|
|
961
|
+
y: de(r * o) / o || 0
|
|
1002
962
|
};
|
|
1003
963
|
}
|
|
1004
|
-
function
|
|
1005
|
-
var e, n = t.popper, r = t.popperRect, o = t.placement, i = t.variation, c = t.offsets, a = t.position,
|
|
964
|
+
function Ot(t) {
|
|
965
|
+
var e, n = t.popper, r = t.popperRect, o = t.placement, i = t.variation, c = t.offsets, a = t.position, l = t.gpuAcceleration, u = t.adaptive, d = t.roundOffsets, _ = t.isFixed, h = c.x, p = h === void 0 ? 0 : h, m = c.y, v = m === void 0 ? 0 : m, E = typeof d == "function" ? d({
|
|
1006
966
|
x: p,
|
|
1007
|
-
y:
|
|
967
|
+
y: v
|
|
1008
968
|
}) : {
|
|
1009
969
|
x: p,
|
|
1010
|
-
y:
|
|
970
|
+
y: v
|
|
1011
971
|
};
|
|
1012
|
-
p =
|
|
1013
|
-
var g = c.hasOwnProperty("x"),
|
|
972
|
+
p = E.x, v = E.y;
|
|
973
|
+
var g = c.hasOwnProperty("x"), A = c.hasOwnProperty("y"), y = x, b = R, I = window;
|
|
1014
974
|
if (u) {
|
|
1015
|
-
var
|
|
1016
|
-
if (
|
|
1017
|
-
b =
|
|
1018
|
-
var U =
|
|
975
|
+
var M = Oe(n), P = "clientHeight", L = "clientWidth";
|
|
976
|
+
if (M === V(n) && (M = Q(n), Y(M).position !== "static" && a === "absolute" && (P = "scrollHeight", L = "scrollWidth")), M = M, o === R || (o === x || o === G) && i === ge) {
|
|
977
|
+
b = F;
|
|
978
|
+
var U = _ && M === I && I.visualViewport ? I.visualViewport.height : (
|
|
1019
979
|
// $FlowFixMe[prop-missing]
|
|
1020
|
-
|
|
980
|
+
M[P]
|
|
1021
981
|
);
|
|
1022
|
-
|
|
982
|
+
v -= U - r.height, v *= l ? 1 : -1;
|
|
1023
983
|
}
|
|
1024
|
-
if (o === x || (o === R || o ===
|
|
1025
|
-
y =
|
|
1026
|
-
var S =
|
|
984
|
+
if (o === x || (o === R || o === F) && i === ge) {
|
|
985
|
+
y = G;
|
|
986
|
+
var S = _ && M === I && I.visualViewport ? I.visualViewport.width : (
|
|
1027
987
|
// $FlowFixMe[prop-missing]
|
|
1028
|
-
|
|
988
|
+
M[L]
|
|
1029
989
|
);
|
|
1030
|
-
p -= S - r.width, p *=
|
|
990
|
+
p -= S - r.width, p *= l ? 1 : -1;
|
|
1031
991
|
}
|
|
1032
992
|
}
|
|
1033
993
|
var w = Object.assign({
|
|
1034
994
|
position: a
|
|
1035
|
-
}, u &&
|
|
995
|
+
}, u && pr), C = d === !0 ? fr({
|
|
1036
996
|
x: p,
|
|
1037
|
-
y:
|
|
1038
|
-
}) : {
|
|
997
|
+
y: v
|
|
998
|
+
}, V(n)) : {
|
|
1039
999
|
x: p,
|
|
1040
|
-
y:
|
|
1000
|
+
y: v
|
|
1041
1001
|
};
|
|
1042
|
-
if (p =
|
|
1043
|
-
var
|
|
1044
|
-
return Object.assign({}, w, (
|
|
1002
|
+
if (p = C.x, v = C.y, l) {
|
|
1003
|
+
var D;
|
|
1004
|
+
return Object.assign({}, w, (D = {}, D[b] = A ? "0" : "", D[y] = g ? "0" : "", D.transform = (I.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + v + "px)" : "translate3d(" + p + "px, " + v + "px, 0)", D));
|
|
1045
1005
|
}
|
|
1046
|
-
return Object.assign({}, w, (e = {}, e[b] =
|
|
1006
|
+
return Object.assign({}, w, (e = {}, e[b] = A ? v + "px" : "", e[y] = g ? p + "px" : "", e.transform = "", e));
|
|
1047
1007
|
}
|
|
1048
|
-
function
|
|
1049
|
-
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, c = i === void 0 ? !0 : i, a = n.roundOffsets,
|
|
1008
|
+
function hr(t) {
|
|
1009
|
+
var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, c = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a;
|
|
1050
1010
|
if ({}.NODE_ENV !== "production") {
|
|
1051
|
-
var u =
|
|
1052
|
-
c && ["transform", "top", "right", "bottom", "left"].some(function(
|
|
1053
|
-
return u.indexOf(
|
|
1011
|
+
var u = Y(e.elements.popper).transitionProperty || "";
|
|
1012
|
+
c && ["transform", "top", "right", "bottom", "left"].some(function(_) {
|
|
1013
|
+
return u.indexOf(_) >= 0;
|
|
1054
1014
|
}) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `
|
|
1055
1015
|
|
|
1056
1016
|
`, '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.", `
|
|
@@ -1059,125 +1019,125 @@ function pr(t) {
|
|
|
1059
1019
|
}
|
|
1060
1020
|
var d = {
|
|
1061
1021
|
placement: j(e.placement),
|
|
1062
|
-
variation:
|
|
1022
|
+
variation: fe(e.placement),
|
|
1063
1023
|
popper: e.elements.popper,
|
|
1064
1024
|
popperRect: e.rects.popper,
|
|
1065
1025
|
gpuAcceleration: o,
|
|
1066
1026
|
isFixed: e.options.strategy === "fixed"
|
|
1067
1027
|
};
|
|
1068
|
-
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper,
|
|
1028
|
+
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, Ot(Object.assign({}, d, {
|
|
1069
1029
|
offsets: e.modifiersData.popperOffsets,
|
|
1070
1030
|
position: e.options.strategy,
|
|
1071
1031
|
adaptive: c,
|
|
1072
|
-
roundOffsets:
|
|
1073
|
-
})))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow,
|
|
1032
|
+
roundOffsets: l
|
|
1033
|
+
})))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, Ot(Object.assign({}, d, {
|
|
1074
1034
|
offsets: e.modifiersData.arrow,
|
|
1075
1035
|
position: "absolute",
|
|
1076
1036
|
adaptive: !1,
|
|
1077
|
-
roundOffsets:
|
|
1037
|
+
roundOffsets: l
|
|
1078
1038
|
})))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
|
|
1079
1039
|
"data-popper-placement": e.placement
|
|
1080
1040
|
});
|
|
1081
1041
|
}
|
|
1082
|
-
const
|
|
1042
|
+
const _r = {
|
|
1083
1043
|
name: "computeStyles",
|
|
1084
1044
|
enabled: !0,
|
|
1085
1045
|
phase: "beforeWrite",
|
|
1086
|
-
fn:
|
|
1046
|
+
fn: hr,
|
|
1087
1047
|
data: {}
|
|
1088
1048
|
};
|
|
1089
1049
|
var Se = {
|
|
1090
1050
|
passive: !0
|
|
1091
1051
|
};
|
|
1092
|
-
function
|
|
1093
|
-
var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, c = r.resize, a = c === void 0 ? !0 : c,
|
|
1052
|
+
function mr(t) {
|
|
1053
|
+
var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, c = r.resize, a = c === void 0 ? !0 : c, l = V(e.elements.popper), u = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
1094
1054
|
return i && u.forEach(function(d) {
|
|
1095
1055
|
d.addEventListener("scroll", n.update, Se);
|
|
1096
|
-
}), a &&
|
|
1056
|
+
}), a && l.addEventListener("resize", n.update, Se), function() {
|
|
1097
1057
|
i && u.forEach(function(d) {
|
|
1098
1058
|
d.removeEventListener("scroll", n.update, Se);
|
|
1099
|
-
}), a &&
|
|
1059
|
+
}), a && l.removeEventListener("resize", n.update, Se);
|
|
1100
1060
|
};
|
|
1101
1061
|
}
|
|
1102
|
-
const
|
|
1062
|
+
const Er = {
|
|
1103
1063
|
name: "eventListeners",
|
|
1104
1064
|
enabled: !0,
|
|
1105
1065
|
phase: "write",
|
|
1106
1066
|
fn: function() {
|
|
1107
1067
|
},
|
|
1108
|
-
effect:
|
|
1068
|
+
effect: mr,
|
|
1109
1069
|
data: {}
|
|
1110
1070
|
};
|
|
1111
|
-
var
|
|
1071
|
+
var vr = {
|
|
1112
1072
|
left: "right",
|
|
1113
1073
|
right: "left",
|
|
1114
1074
|
bottom: "top",
|
|
1115
1075
|
top: "bottom"
|
|
1116
1076
|
};
|
|
1117
|
-
function
|
|
1077
|
+
function Re(t) {
|
|
1118
1078
|
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
1119
|
-
return
|
|
1079
|
+
return vr[e];
|
|
1120
1080
|
});
|
|
1121
1081
|
}
|
|
1122
|
-
var
|
|
1082
|
+
var br = {
|
|
1123
1083
|
start: "end",
|
|
1124
1084
|
end: "start"
|
|
1125
1085
|
};
|
|
1126
|
-
function
|
|
1086
|
+
function yt(t) {
|
|
1127
1087
|
return t.replace(/start|end/g, function(e) {
|
|
1128
|
-
return
|
|
1088
|
+
return br[e];
|
|
1129
1089
|
});
|
|
1130
1090
|
}
|
|
1131
|
-
function
|
|
1132
|
-
var e =
|
|
1091
|
+
function nt(t) {
|
|
1092
|
+
var e = V(t), n = e.pageXOffset, r = e.pageYOffset;
|
|
1133
1093
|
return {
|
|
1134
1094
|
scrollLeft: n,
|
|
1135
1095
|
scrollTop: r
|
|
1136
1096
|
};
|
|
1137
1097
|
}
|
|
1138
|
-
function
|
|
1139
|
-
return
|
|
1098
|
+
function rt(t) {
|
|
1099
|
+
return pe(Q(t)).left + nt(t).scrollLeft;
|
|
1140
1100
|
}
|
|
1141
|
-
function
|
|
1142
|
-
var n =
|
|
1101
|
+
function Ir(t, e) {
|
|
1102
|
+
var n = V(t), r = Q(t), o = n.visualViewport, i = r.clientWidth, c = r.clientHeight, a = 0, l = 0;
|
|
1143
1103
|
if (o) {
|
|
1144
1104
|
i = o.width, c = o.height;
|
|
1145
|
-
var u =
|
|
1146
|
-
(u || !u && e === "fixed") && (a = o.offsetLeft,
|
|
1105
|
+
var u = Ft();
|
|
1106
|
+
(u || !u && e === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
|
|
1147
1107
|
}
|
|
1148
1108
|
return {
|
|
1149
1109
|
width: i,
|
|
1150
1110
|
height: c,
|
|
1151
|
-
x: a +
|
|
1152
|
-
y:
|
|
1111
|
+
x: a + rt(t),
|
|
1112
|
+
y: l
|
|
1153
1113
|
};
|
|
1154
1114
|
}
|
|
1155
|
-
function
|
|
1156
|
-
var e, n =
|
|
1157
|
-
return
|
|
1115
|
+
function gr(t) {
|
|
1116
|
+
var e, n = Q(t), r = nt(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, i = ie(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), c = ie(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -r.scrollLeft + rt(t), l = -r.scrollTop;
|
|
1117
|
+
return Y(o || n).direction === "rtl" && (a += ie(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
1158
1118
|
width: i,
|
|
1159
1119
|
height: c,
|
|
1160
1120
|
x: a,
|
|
1161
|
-
y:
|
|
1121
|
+
y: l
|
|
1162
1122
|
};
|
|
1163
1123
|
}
|
|
1164
|
-
function
|
|
1165
|
-
var e =
|
|
1124
|
+
function ot(t) {
|
|
1125
|
+
var e = Y(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
|
|
1166
1126
|
return /auto|scroll|overlay|hidden/.test(n + o + r);
|
|
1167
1127
|
}
|
|
1168
|
-
function
|
|
1169
|
-
return ["html", "body", "#document"].indexOf(
|
|
1128
|
+
function zt(t) {
|
|
1129
|
+
return ["html", "body", "#document"].indexOf(K(t)) >= 0 ? t.ownerDocument.body : q(t) && ot(t) ? t : zt(ke(t));
|
|
1170
1130
|
}
|
|
1171
1131
|
function Ie(t, e) {
|
|
1172
1132
|
var n;
|
|
1173
1133
|
e === void 0 && (e = []);
|
|
1174
|
-
var r =
|
|
1134
|
+
var r = zt(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = V(r), c = o ? [i].concat(i.visualViewport || [], ot(r) ? r : []) : r, a = e.concat(c);
|
|
1175
1135
|
return o ? a : (
|
|
1176
1136
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1177
|
-
a.concat(Ie(
|
|
1137
|
+
a.concat(Ie(ke(c)))
|
|
1178
1138
|
);
|
|
1179
1139
|
}
|
|
1180
|
-
function
|
|
1140
|
+
function Ye(t) {
|
|
1181
1141
|
return Object.assign({}, t, {
|
|
1182
1142
|
left: t.x,
|
|
1183
1143
|
top: t.y,
|
|
@@ -1185,181 +1145,181 @@ function ze(t) {
|
|
|
1185
1145
|
bottom: t.y + t.height
|
|
1186
1146
|
});
|
|
1187
1147
|
}
|
|
1188
|
-
function
|
|
1189
|
-
var n =
|
|
1148
|
+
function Mr(t, e) {
|
|
1149
|
+
var n = pe(t, !1, e === "fixed");
|
|
1190
1150
|
return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1191
1151
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return e ===
|
|
1152
|
+
function Pt(t, e, n) {
|
|
1153
|
+
return e === qt ? Ye(Ir(t, n)) : ae(e) ? Mr(e, n) : Ye(gr(Q(t)));
|
|
1194
1154
|
}
|
|
1195
|
-
function
|
|
1196
|
-
var e = Ie(
|
|
1197
|
-
return
|
|
1198
|
-
return
|
|
1155
|
+
function Tr(t) {
|
|
1156
|
+
var e = Ie(ke(t)), n = ["absolute", "fixed"].indexOf(Y(t).position) >= 0, r = n && q(t) ? Oe(t) : t;
|
|
1157
|
+
return ae(r) ? e.filter(function(o) {
|
|
1158
|
+
return ae(o) && Gt(o, r) && K(o) !== "body";
|
|
1199
1159
|
}) : [];
|
|
1200
1160
|
}
|
|
1201
|
-
function
|
|
1202
|
-
var o = e === "clippingParents" ?
|
|
1203
|
-
var d =
|
|
1204
|
-
return
|
|
1205
|
-
},
|
|
1161
|
+
function Ar(t, e, n, r) {
|
|
1162
|
+
var o = e === "clippingParents" ? Tr(t) : [].concat(e), i = [].concat(o, [n]), c = i[0], a = i.reduce(function(l, u) {
|
|
1163
|
+
var d = Pt(t, u, r);
|
|
1164
|
+
return l.top = ie(d.top, l.top), l.right = xe(d.right, l.right), l.bottom = xe(d.bottom, l.bottom), l.left = ie(d.left, l.left), l;
|
|
1165
|
+
}, Pt(t, c, r));
|
|
1206
1166
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
1207
1167
|
}
|
|
1208
|
-
function
|
|
1209
|
-
var e = t.reference, n = t.element, r = t.placement, o = r ? j(r) : null, i = r ?
|
|
1168
|
+
function Kt(t) {
|
|
1169
|
+
var e = t.reference, n = t.element, r = t.placement, o = r ? j(r) : null, i = r ? fe(r) : null, c = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
|
|
1210
1170
|
switch (o) {
|
|
1211
1171
|
case R:
|
|
1212
|
-
|
|
1172
|
+
l = {
|
|
1213
1173
|
x: c,
|
|
1214
1174
|
y: e.y - n.height
|
|
1215
1175
|
};
|
|
1216
1176
|
break;
|
|
1217
|
-
case
|
|
1218
|
-
|
|
1177
|
+
case F:
|
|
1178
|
+
l = {
|
|
1219
1179
|
x: c,
|
|
1220
1180
|
y: e.y + e.height
|
|
1221
1181
|
};
|
|
1222
1182
|
break;
|
|
1223
|
-
case
|
|
1224
|
-
|
|
1183
|
+
case G:
|
|
1184
|
+
l = {
|
|
1225
1185
|
x: e.x + e.width,
|
|
1226
1186
|
y: a
|
|
1227
1187
|
};
|
|
1228
1188
|
break;
|
|
1229
1189
|
case x:
|
|
1230
|
-
|
|
1190
|
+
l = {
|
|
1231
1191
|
x: e.x - n.width,
|
|
1232
1192
|
y: a
|
|
1233
1193
|
};
|
|
1234
1194
|
break;
|
|
1235
1195
|
default:
|
|
1236
|
-
|
|
1196
|
+
l = {
|
|
1237
1197
|
x: e.x,
|
|
1238
1198
|
y: e.y
|
|
1239
1199
|
};
|
|
1240
1200
|
}
|
|
1241
|
-
var u = o ?
|
|
1201
|
+
var u = o ? tt(o) : null;
|
|
1242
1202
|
if (u != null) {
|
|
1243
1203
|
var d = u === "y" ? "height" : "width";
|
|
1244
1204
|
switch (i) {
|
|
1245
|
-
case
|
|
1246
|
-
|
|
1205
|
+
case ue:
|
|
1206
|
+
l[u] = l[u] - (e[d] / 2 - n[d] / 2);
|
|
1247
1207
|
break;
|
|
1248
1208
|
case ge:
|
|
1249
|
-
|
|
1209
|
+
l[u] = l[u] + (e[d] / 2 - n[d] / 2);
|
|
1250
1210
|
break;
|
|
1251
1211
|
}
|
|
1252
1212
|
}
|
|
1253
|
-
return
|
|
1213
|
+
return l;
|
|
1254
1214
|
}
|
|
1255
|
-
function
|
|
1215
|
+
function Me(t, e) {
|
|
1256
1216
|
e === void 0 && (e = {});
|
|
1257
|
-
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, c = i === void 0 ? t.strategy : i, a = n.boundary,
|
|
1258
|
-
reference:
|
|
1217
|
+
var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, c = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? $n : a, u = n.rootBoundary, d = u === void 0 ? qt : u, _ = n.elementContext, h = _ === void 0 ? Ee : _, p = n.altBoundary, m = p === void 0 ? !1 : p, v = n.padding, E = v === void 0 ? 0 : v, g = jt(typeof E != "number" ? E : Yt(E, we)), A = h === Ee ? jn : Ee, y = t.rects.popper, b = t.elements[m ? A : h], I = Ar(ae(b) ? b : b.contextElement || Q(t.elements.popper), l, d, c), M = pe(t.elements.reference), P = Kt({
|
|
1218
|
+
reference: M,
|
|
1259
1219
|
element: y,
|
|
1260
1220
|
strategy: "absolute",
|
|
1261
1221
|
placement: o
|
|
1262
|
-
}), L =
|
|
1222
|
+
}), L = Ye(Object.assign({}, y, P)), U = h === Ee ? L : M, S = {
|
|
1263
1223
|
top: I.top - U.top + g.top,
|
|
1264
1224
|
bottom: U.bottom - I.bottom + g.bottom,
|
|
1265
1225
|
left: I.left - U.left + g.left,
|
|
1266
1226
|
right: U.right - I.right + g.right
|
|
1267
1227
|
}, w = t.modifiersData.offset;
|
|
1268
|
-
if (
|
|
1269
|
-
var
|
|
1270
|
-
Object.keys(S).forEach(function(
|
|
1271
|
-
var
|
|
1272
|
-
S[
|
|
1228
|
+
if (h === Ee && w) {
|
|
1229
|
+
var C = w[o];
|
|
1230
|
+
Object.keys(S).forEach(function(D) {
|
|
1231
|
+
var J = [G, F].indexOf(D) >= 0 ? 1 : -1, ee = [R, F].indexOf(D) >= 0 ? "y" : "x";
|
|
1232
|
+
S[D] += C[ee] * J;
|
|
1273
1233
|
});
|
|
1274
1234
|
}
|
|
1275
1235
|
return S;
|
|
1276
1236
|
}
|
|
1277
|
-
function
|
|
1237
|
+
function wr(t, e) {
|
|
1278
1238
|
e === void 0 && (e = {});
|
|
1279
|
-
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, c = n.padding, a = n.flipVariations,
|
|
1280
|
-
return
|
|
1281
|
-
}) : we,
|
|
1239
|
+
var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, c = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? Vt : l, d = fe(r), _ = d ? a ? At : At.filter(function(m) {
|
|
1240
|
+
return fe(m) === d;
|
|
1241
|
+
}) : we, h = _.filter(function(m) {
|
|
1282
1242
|
return u.indexOf(m) >= 0;
|
|
1283
1243
|
});
|
|
1284
|
-
|
|
1285
|
-
var p =
|
|
1286
|
-
return m[
|
|
1287
|
-
placement:
|
|
1244
|
+
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(" ")));
|
|
1245
|
+
var p = h.reduce(function(m, v) {
|
|
1246
|
+
return m[v] = Me(t, {
|
|
1247
|
+
placement: v,
|
|
1288
1248
|
boundary: o,
|
|
1289
1249
|
rootBoundary: i,
|
|
1290
1250
|
padding: c
|
|
1291
|
-
})[j(
|
|
1251
|
+
})[j(v)], m;
|
|
1292
1252
|
}, {});
|
|
1293
|
-
return Object.keys(p).sort(function(m,
|
|
1294
|
-
return p[m] - p[
|
|
1253
|
+
return Object.keys(p).sort(function(m, v) {
|
|
1254
|
+
return p[m] - p[v];
|
|
1295
1255
|
});
|
|
1296
1256
|
}
|
|
1297
|
-
function
|
|
1298
|
-
if (j(t) ===
|
|
1257
|
+
function Or(t) {
|
|
1258
|
+
if (j(t) === Be)
|
|
1299
1259
|
return [];
|
|
1300
|
-
var e =
|
|
1301
|
-
return [
|
|
1260
|
+
var e = Re(t);
|
|
1261
|
+
return [yt(t), e, yt(e)];
|
|
1302
1262
|
}
|
|
1303
|
-
function
|
|
1263
|
+
function yr(t) {
|
|
1304
1264
|
var e = t.state, n = t.options, r = t.name;
|
|
1305
1265
|
if (!e.modifiersData[r]._skip) {
|
|
1306
|
-
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, c = n.altAxis, a = c === void 0 ? !0 : c,
|
|
1307
|
-
return
|
|
1308
|
-
placement:
|
|
1266
|
+
for (var o = n.mainAxis, i = o === void 0 ? !0 : o, 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, v = n.allowedAutoPlacements, E = e.options.placement, g = j(E), A = g === E, y = l || (A || !m ? [Re(E)] : Or(E)), b = [E].concat(y).reduce(function(se, Z) {
|
|
1267
|
+
return se.concat(j(Z) === Be ? wr(e, {
|
|
1268
|
+
placement: Z,
|
|
1309
1269
|
boundary: d,
|
|
1310
|
-
rootBoundary:
|
|
1270
|
+
rootBoundary: _,
|
|
1311
1271
|
padding: u,
|
|
1312
1272
|
flipVariations: m,
|
|
1313
|
-
allowedAutoPlacements:
|
|
1314
|
-
}) :
|
|
1315
|
-
}, []), I = e.rects.reference,
|
|
1316
|
-
var w = b[S],
|
|
1273
|
+
allowedAutoPlacements: v
|
|
1274
|
+
}) : Z);
|
|
1275
|
+
}, []), I = e.rects.reference, M = e.rects.popper, P = /* @__PURE__ */ new Map(), L = !0, U = b[0], S = 0; S < b.length; S++) {
|
|
1276
|
+
var w = b[S], C = j(w), D = fe(w) === ue, J = [R, F].indexOf(C) >= 0, ee = J ? "width" : "height", B = Me(e, {
|
|
1317
1277
|
placement: w,
|
|
1318
1278
|
boundary: d,
|
|
1319
|
-
rootBoundary:
|
|
1320
|
-
altBoundary:
|
|
1279
|
+
rootBoundary: _,
|
|
1280
|
+
altBoundary: h,
|
|
1321
1281
|
padding: u
|
|
1322
|
-
}), $ =
|
|
1323
|
-
I[
|
|
1324
|
-
var ye =
|
|
1325
|
-
if (i &&
|
|
1326
|
-
return
|
|
1282
|
+
}), $ = J ? D ? G : x : D ? F : R;
|
|
1283
|
+
I[ee] > M[ee] && ($ = Re($));
|
|
1284
|
+
var ye = Re($), te = [];
|
|
1285
|
+
if (i && te.push(B[C] <= 0), a && te.push(B[$] <= 0, B[ye] <= 0), te.every(function(se) {
|
|
1286
|
+
return se;
|
|
1327
1287
|
})) {
|
|
1328
1288
|
U = w, L = !1;
|
|
1329
1289
|
break;
|
|
1330
1290
|
}
|
|
1331
|
-
P.set(w,
|
|
1291
|
+
P.set(w, te);
|
|
1332
1292
|
}
|
|
1333
1293
|
if (L)
|
|
1334
|
-
for (var Pe = m ? 3 : 1,
|
|
1335
|
-
var
|
|
1336
|
-
var
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1339
|
-
return
|
|
1294
|
+
for (var Pe = m ? 3 : 1, We = function(Z) {
|
|
1295
|
+
var me = b.find(function(Le) {
|
|
1296
|
+
var ne = P.get(Le);
|
|
1297
|
+
if (ne)
|
|
1298
|
+
return ne.slice(0, Z).every(function(qe) {
|
|
1299
|
+
return qe;
|
|
1340
1300
|
});
|
|
1341
1301
|
});
|
|
1342
|
-
if (
|
|
1343
|
-
return U =
|
|
1344
|
-
},
|
|
1345
|
-
var Ne =
|
|
1302
|
+
if (me)
|
|
1303
|
+
return U = me, "break";
|
|
1304
|
+
}, _e = Pe; _e > 0; _e--) {
|
|
1305
|
+
var Ne = We(_e);
|
|
1346
1306
|
if (Ne === "break")
|
|
1347
1307
|
break;
|
|
1348
1308
|
}
|
|
1349
1309
|
e.placement !== U && (e.modifiersData[r]._skip = !0, e.placement = U, e.reset = !0);
|
|
1350
1310
|
}
|
|
1351
1311
|
}
|
|
1352
|
-
const
|
|
1312
|
+
const Pr = {
|
|
1353
1313
|
name: "flip",
|
|
1354
1314
|
enabled: !0,
|
|
1355
1315
|
phase: "main",
|
|
1356
|
-
fn:
|
|
1316
|
+
fn: yr,
|
|
1357
1317
|
requiresIfExists: ["offset"],
|
|
1358
1318
|
data: {
|
|
1359
1319
|
_skip: !1
|
|
1360
1320
|
}
|
|
1361
1321
|
};
|
|
1362
|
-
function
|
|
1322
|
+
function Nt(t, e, n) {
|
|
1363
1323
|
return n === void 0 && (n = {
|
|
1364
1324
|
x: 0,
|
|
1365
1325
|
y: 0
|
|
@@ -1370,39 +1330,39 @@ function At(t, e, n) {
|
|
|
1370
1330
|
left: t.left - e.width - n.x
|
|
1371
1331
|
};
|
|
1372
1332
|
}
|
|
1373
|
-
function
|
|
1374
|
-
return [R,
|
|
1333
|
+
function Lt(t) {
|
|
1334
|
+
return [R, G, F, x].some(function(e) {
|
|
1375
1335
|
return t[e] >= 0;
|
|
1376
1336
|
});
|
|
1377
1337
|
}
|
|
1378
|
-
function
|
|
1379
|
-
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, c =
|
|
1338
|
+
function Nr(t) {
|
|
1339
|
+
var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, c = Me(e, {
|
|
1380
1340
|
elementContext: "reference"
|
|
1381
|
-
}), a =
|
|
1341
|
+
}), a = Me(e, {
|
|
1382
1342
|
altBoundary: !0
|
|
1383
|
-
}),
|
|
1343
|
+
}), l = Nt(c, r), u = Nt(a, o, i), d = Lt(l), _ = Lt(u);
|
|
1384
1344
|
e.modifiersData[n] = {
|
|
1385
|
-
referenceClippingOffsets:
|
|
1345
|
+
referenceClippingOffsets: l,
|
|
1386
1346
|
popperEscapeOffsets: u,
|
|
1387
1347
|
isReferenceHidden: d,
|
|
1388
|
-
hasPopperEscaped:
|
|
1348
|
+
hasPopperEscaped: _
|
|
1389
1349
|
}, e.attributes.popper = Object.assign({}, e.attributes.popper, {
|
|
1390
1350
|
"data-popper-reference-hidden": d,
|
|
1391
|
-
"data-popper-escaped":
|
|
1351
|
+
"data-popper-escaped": _
|
|
1392
1352
|
});
|
|
1393
1353
|
}
|
|
1394
|
-
const
|
|
1354
|
+
const Lr = {
|
|
1395
1355
|
name: "hide",
|
|
1396
1356
|
enabled: !0,
|
|
1397
1357
|
phase: "main",
|
|
1398
1358
|
requiresIfExists: ["preventOverflow"],
|
|
1399
|
-
fn:
|
|
1359
|
+
fn: Nr
|
|
1400
1360
|
};
|
|
1401
|
-
function
|
|
1361
|
+
function Ur(t, e, n) {
|
|
1402
1362
|
var r = j(t), o = [x, R].indexOf(r) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, e, {
|
|
1403
1363
|
placement: t
|
|
1404
1364
|
})) : n, c = i[0], a = i[1];
|
|
1405
|
-
return c = c || 0, a = (a || 0) * o, [x,
|
|
1365
|
+
return c = c || 0, a = (a || 0) * o, [x, G].indexOf(r) >= 0 ? {
|
|
1406
1366
|
x: a,
|
|
1407
1367
|
y: c
|
|
1408
1368
|
} : {
|
|
@@ -1410,109 +1370,109 @@ function Nr(t, e, n) {
|
|
|
1410
1370
|
y: a
|
|
1411
1371
|
};
|
|
1412
1372
|
}
|
|
1413
|
-
function
|
|
1414
|
-
var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, c =
|
|
1415
|
-
return d[
|
|
1416
|
-
}, {}), a = c[e.placement],
|
|
1417
|
-
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x +=
|
|
1373
|
+
function Sr(t) {
|
|
1374
|
+
var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, c = Vt.reduce(function(d, _) {
|
|
1375
|
+
return d[_] = Ur(_, e.rects, i), d;
|
|
1376
|
+
}, {}), a = c[e.placement], l = a.x, u = a.y;
|
|
1377
|
+
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += u), e.modifiersData[r] = c;
|
|
1418
1378
|
}
|
|
1419
|
-
const
|
|
1379
|
+
const Cr = {
|
|
1420
1380
|
name: "offset",
|
|
1421
1381
|
enabled: !0,
|
|
1422
1382
|
phase: "main",
|
|
1423
1383
|
requires: ["popperOffsets"],
|
|
1424
|
-
fn:
|
|
1384
|
+
fn: Sr
|
|
1425
1385
|
};
|
|
1426
|
-
function
|
|
1386
|
+
function Dr(t) {
|
|
1427
1387
|
var e = t.state, n = t.name;
|
|
1428
|
-
e.modifiersData[n] =
|
|
1388
|
+
e.modifiersData[n] = Kt({
|
|
1429
1389
|
reference: e.rects.reference,
|
|
1430
1390
|
element: e.rects.popper,
|
|
1431
1391
|
strategy: "absolute",
|
|
1432
1392
|
placement: e.placement
|
|
1433
1393
|
});
|
|
1434
1394
|
}
|
|
1435
|
-
const
|
|
1395
|
+
const Rr = {
|
|
1436
1396
|
name: "popperOffsets",
|
|
1437
1397
|
enabled: !0,
|
|
1438
1398
|
phase: "read",
|
|
1439
|
-
fn:
|
|
1399
|
+
fn: Dr,
|
|
1440
1400
|
data: {}
|
|
1441
1401
|
};
|
|
1442
|
-
function
|
|
1402
|
+
function xr(t) {
|
|
1443
1403
|
return t === "x" ? "y" : "x";
|
|
1444
1404
|
}
|
|
1445
|
-
function
|
|
1446
|
-
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, c = n.altAxis, a = c === void 0 ? !1 : c,
|
|
1447
|
-
boundary:
|
|
1405
|
+
function Hr(t) {
|
|
1406
|
+
var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, 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, v = m === void 0 ? 0 : m, E = Me(e, {
|
|
1407
|
+
boundary: l,
|
|
1448
1408
|
rootBoundary: u,
|
|
1449
|
-
padding:
|
|
1409
|
+
padding: _,
|
|
1450
1410
|
altBoundary: d
|
|
1451
|
-
}), g = j(e.placement),
|
|
1411
|
+
}), g = j(e.placement), A = fe(e.placement), y = !A, b = tt(g), I = xr(b), M = e.modifiersData.popperOffsets, P = e.rects.reference, L = e.rects.popper, U = typeof v == "function" ? v(Object.assign({}, e.rects, {
|
|
1452
1412
|
placement: e.placement
|
|
1453
|
-
})) :
|
|
1413
|
+
})) : v, S = typeof U == "number" ? {
|
|
1454
1414
|
mainAxis: U,
|
|
1455
1415
|
altAxis: U
|
|
1456
1416
|
} : Object.assign({
|
|
1457
1417
|
mainAxis: 0,
|
|
1458
1418
|
altAxis: 0
|
|
1459
|
-
}, U), w = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null,
|
|
1419
|
+
}, U), w = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, C = {
|
|
1460
1420
|
x: 0,
|
|
1461
1421
|
y: 0
|
|
1462
1422
|
};
|
|
1463
|
-
if (
|
|
1423
|
+
if (M) {
|
|
1464
1424
|
if (i) {
|
|
1465
|
-
var
|
|
1425
|
+
var D, J = b === "y" ? R : x, ee = b === "y" ? F : G, B = b === "y" ? "height" : "width", $ = M[b], ye = $ + E[J], te = $ - E[ee], Pe = p ? -L[B] / 2 : 0, We = A === ue ? P[B] : L[B], _e = A === ue ? -L[B] : -P[B], Ne = e.elements.arrow, se = p && Ne ? et(Ne) : {
|
|
1466
1426
|
width: 0,
|
|
1467
1427
|
height: 0
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1428
|
+
}, Z = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : $t(), me = Z[J], Le = Z[ee], ne = be(0, P[B], se[B]), qe = y ? P[B] / 2 - Pe - ne - me - S.mainAxis : We - ne - me - S.mainAxis, sn = y ? -P[B] / 2 + Pe + ne + Le + S.mainAxis : _e + ne + Le + S.mainAxis, Ve = e.elements.arrow && Oe(e.elements.arrow), ln = Ve ? b === "y" ? Ve.clientTop || 0 : Ve.clientLeft || 0 : 0, ft = (D = w == null ? void 0 : w[b]) != null ? D : 0, cn = $ + qe - ft - ln, un = $ + sn - ft, ht = be(p ? xe(ye, cn) : ye, $, p ? ie(te, un) : te);
|
|
1429
|
+
M[b] = ht, C[b] = ht - $;
|
|
1470
1430
|
}
|
|
1471
1431
|
if (a) {
|
|
1472
|
-
var
|
|
1473
|
-
|
|
1432
|
+
var _t, dn = b === "x" ? R : x, pn = b === "x" ? F : G, re = M[I], Ue = I === "y" ? "height" : "width", mt = re + E[dn], Et = re - E[pn], Fe = [R, x].indexOf(g) !== -1, vt = (_t = w == null ? void 0 : w[I]) != null ? _t : 0, bt = Fe ? mt : re - P[Ue] - L[Ue] - vt + S.altAxis, It = Fe ? re + P[Ue] + L[Ue] - vt - S.altAxis : Et, gt = p && Fe ? sr(bt, re, It) : be(p ? bt : mt, re, p ? It : Et);
|
|
1433
|
+
M[I] = gt, C[I] = gt - re;
|
|
1474
1434
|
}
|
|
1475
|
-
e.modifiersData[r] =
|
|
1435
|
+
e.modifiersData[r] = C;
|
|
1476
1436
|
}
|
|
1477
1437
|
}
|
|
1478
|
-
const
|
|
1438
|
+
const Br = {
|
|
1479
1439
|
name: "preventOverflow",
|
|
1480
1440
|
enabled: !0,
|
|
1481
1441
|
phase: "main",
|
|
1482
|
-
fn:
|
|
1442
|
+
fn: Hr,
|
|
1483
1443
|
requiresIfExists: ["offset"]
|
|
1484
1444
|
};
|
|
1485
|
-
function
|
|
1445
|
+
function kr(t) {
|
|
1486
1446
|
return {
|
|
1487
1447
|
scrollLeft: t.scrollLeft,
|
|
1488
1448
|
scrollTop: t.scrollTop
|
|
1489
1449
|
};
|
|
1490
1450
|
}
|
|
1491
|
-
function Hr(t) {
|
|
1492
|
-
return t === G(t) || !V(t) ? et(t) : Br(t);
|
|
1493
|
-
}
|
|
1494
1451
|
function Wr(t) {
|
|
1495
|
-
|
|
1452
|
+
return t === V(t) || !q(t) ? nt(t) : kr(t);
|
|
1453
|
+
}
|
|
1454
|
+
function qr(t) {
|
|
1455
|
+
var e = t.getBoundingClientRect(), n = de(e.width) / t.offsetWidth || 1, r = de(e.height) / t.offsetHeight || 1;
|
|
1496
1456
|
return n !== 1 || r !== 1;
|
|
1497
1457
|
}
|
|
1498
|
-
function
|
|
1458
|
+
function Vr(t, e, n) {
|
|
1499
1459
|
n === void 0 && (n = !1);
|
|
1500
|
-
var r =
|
|
1460
|
+
var r = q(e), o = q(e) && qr(e), i = Q(e), c = pe(t, o, n), a = {
|
|
1501
1461
|
scrollLeft: 0,
|
|
1502
1462
|
scrollTop: 0
|
|
1503
|
-
},
|
|
1463
|
+
}, l = {
|
|
1504
1464
|
x: 0,
|
|
1505
1465
|
y: 0
|
|
1506
1466
|
};
|
|
1507
|
-
return (r || !r && !n) && ((
|
|
1508
|
-
|
|
1509
|
-
x: c.left + a.scrollLeft -
|
|
1510
|
-
y: c.top + a.scrollTop -
|
|
1467
|
+
return (r || !r && !n) && ((K(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1468
|
+
ot(i)) && (a = Wr(e)), q(e) ? (l = pe(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = rt(i))), {
|
|
1469
|
+
x: c.left + a.scrollLeft - l.x,
|
|
1470
|
+
y: c.top + a.scrollTop - l.y,
|
|
1511
1471
|
width: c.width,
|
|
1512
1472
|
height: c.height
|
|
1513
1473
|
};
|
|
1514
1474
|
}
|
|
1515
|
-
function
|
|
1475
|
+
function Fr(t) {
|
|
1516
1476
|
var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
|
|
1517
1477
|
t.forEach(function(i) {
|
|
1518
1478
|
e.set(i.name, i);
|
|
@@ -1522,8 +1482,8 @@ function Vr(t) {
|
|
|
1522
1482
|
var c = [].concat(i.requires || [], i.requiresIfExists || []);
|
|
1523
1483
|
c.forEach(function(a) {
|
|
1524
1484
|
if (!n.has(a)) {
|
|
1525
|
-
var
|
|
1526
|
-
|
|
1485
|
+
var l = e.get(a);
|
|
1486
|
+
l && o(l);
|
|
1527
1487
|
}
|
|
1528
1488
|
}), r.push(i);
|
|
1529
1489
|
}
|
|
@@ -1531,15 +1491,15 @@ function Vr(t) {
|
|
|
1531
1491
|
n.has(i.name) || o(i);
|
|
1532
1492
|
}), r;
|
|
1533
1493
|
}
|
|
1534
|
-
function
|
|
1535
|
-
var e =
|
|
1494
|
+
function Gr(t) {
|
|
1495
|
+
var e = Fr(t);
|
|
1536
1496
|
return $e.reduce(function(n, r) {
|
|
1537
1497
|
return n.concat(e.filter(function(o) {
|
|
1538
1498
|
return o.phase === r;
|
|
1539
1499
|
}));
|
|
1540
1500
|
}, []);
|
|
1541
1501
|
}
|
|
1542
|
-
function
|
|
1502
|
+
function $r(t) {
|
|
1543
1503
|
var e;
|
|
1544
1504
|
return function() {
|
|
1545
1505
|
return e || (e = new Promise(function(n) {
|
|
@@ -1549,58 +1509,58 @@ function Fr(t) {
|
|
|
1549
1509
|
})), e;
|
|
1550
1510
|
};
|
|
1551
1511
|
}
|
|
1552
|
-
function
|
|
1512
|
+
function X(t) {
|
|
1553
1513
|
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++)
|
|
1554
1514
|
n[r - 1] = arguments[r];
|
|
1555
1515
|
return [].concat(n).reduce(function(o, i) {
|
|
1556
1516
|
return o.replace(/%s/, i);
|
|
1557
1517
|
}, t);
|
|
1558
1518
|
}
|
|
1559
|
-
var
|
|
1560
|
-
function
|
|
1519
|
+
var oe = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', jr = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', Ut = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
|
|
1520
|
+
function Yr(t) {
|
|
1561
1521
|
t.forEach(function(e) {
|
|
1562
|
-
[].concat(Object.keys(e),
|
|
1522
|
+
[].concat(Object.keys(e), Ut).filter(function(n, r, o) {
|
|
1563
1523
|
return o.indexOf(n) === r;
|
|
1564
1524
|
}).forEach(function(n) {
|
|
1565
1525
|
switch (n) {
|
|
1566
1526
|
case "name":
|
|
1567
|
-
typeof e.name != "string" && console.error(
|
|
1527
|
+
typeof e.name != "string" && console.error(X(oe, String(e.name), '"name"', '"string"', '"' + String(e.name) + '"'));
|
|
1568
1528
|
break;
|
|
1569
1529
|
case "enabled":
|
|
1570
|
-
typeof e.enabled != "boolean" && console.error(
|
|
1530
|
+
typeof e.enabled != "boolean" && console.error(X(oe, e.name, '"enabled"', '"boolean"', '"' + String(e.enabled) + '"'));
|
|
1571
1531
|
break;
|
|
1572
1532
|
case "phase":
|
|
1573
|
-
$e.indexOf(e.phase) < 0 && console.error(
|
|
1533
|
+
$e.indexOf(e.phase) < 0 && console.error(X(oe, e.name, '"phase"', "either " + $e.join(", "), '"' + String(e.phase) + '"'));
|
|
1574
1534
|
break;
|
|
1575
1535
|
case "fn":
|
|
1576
|
-
typeof e.fn != "function" && console.error(
|
|
1536
|
+
typeof e.fn != "function" && console.error(X(oe, e.name, '"fn"', '"function"', '"' + String(e.fn) + '"'));
|
|
1577
1537
|
break;
|
|
1578
1538
|
case "effect":
|
|
1579
|
-
e.effect != null && typeof e.effect != "function" && console.error(
|
|
1539
|
+
e.effect != null && typeof e.effect != "function" && console.error(X(oe, e.name, '"effect"', '"function"', '"' + String(e.fn) + '"'));
|
|
1580
1540
|
break;
|
|
1581
1541
|
case "requires":
|
|
1582
|
-
e.requires != null && !Array.isArray(e.requires) && console.error(
|
|
1542
|
+
e.requires != null && !Array.isArray(e.requires) && console.error(X(oe, e.name, '"requires"', '"array"', '"' + String(e.requires) + '"'));
|
|
1583
1543
|
break;
|
|
1584
1544
|
case "requiresIfExists":
|
|
1585
|
-
Array.isArray(e.requiresIfExists) || console.error(
|
|
1545
|
+
Array.isArray(e.requiresIfExists) || console.error(X(oe, e.name, '"requiresIfExists"', '"array"', '"' + String(e.requiresIfExists) + '"'));
|
|
1586
1546
|
break;
|
|
1587
1547
|
case "options":
|
|
1588
1548
|
case "data":
|
|
1589
1549
|
break;
|
|
1590
1550
|
default:
|
|
1591
|
-
console.error('PopperJS: an invalid property has been provided to the "' + e.name + '" modifier, valid properties are ' +
|
|
1551
|
+
console.error('PopperJS: an invalid property has been provided to the "' + e.name + '" modifier, valid properties are ' + Ut.map(function(r) {
|
|
1592
1552
|
return '"' + r + '"';
|
|
1593
1553
|
}).join(", ") + '; but "' + n + '" was provided.');
|
|
1594
1554
|
}
|
|
1595
1555
|
e.requires && e.requires.forEach(function(r) {
|
|
1596
1556
|
t.find(function(o) {
|
|
1597
1557
|
return o.name === r;
|
|
1598
|
-
}) == null && console.error(
|
|
1558
|
+
}) == null && console.error(X(jr, String(e.name), r, r));
|
|
1599
1559
|
});
|
|
1600
1560
|
});
|
|
1601
1561
|
});
|
|
1602
1562
|
}
|
|
1603
|
-
function
|
|
1563
|
+
function zr(t, e) {
|
|
1604
1564
|
var n = /* @__PURE__ */ new Set();
|
|
1605
1565
|
return t.filter(function(r) {
|
|
1606
1566
|
var o = e(r);
|
|
@@ -1608,7 +1568,7 @@ function jr(t, e) {
|
|
|
1608
1568
|
return n.add(o), !0;
|
|
1609
1569
|
});
|
|
1610
1570
|
}
|
|
1611
|
-
function
|
|
1571
|
+
function Kr(t) {
|
|
1612
1572
|
var e = t.reduce(function(n, r) {
|
|
1613
1573
|
var o = n[r.name];
|
|
1614
1574
|
return n[r.name] = o ? Object.assign({}, o, r, {
|
|
@@ -1620,58 +1580,58 @@ function zr(t) {
|
|
|
1620
1580
|
return e[n];
|
|
1621
1581
|
});
|
|
1622
1582
|
}
|
|
1623
|
-
var
|
|
1583
|
+
var St = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.", Zr = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.", Ct = {
|
|
1624
1584
|
placement: "bottom",
|
|
1625
1585
|
modifiers: [],
|
|
1626
1586
|
strategy: "absolute"
|
|
1627
1587
|
};
|
|
1628
|
-
function
|
|
1588
|
+
function Dt() {
|
|
1629
1589
|
for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
|
|
1630
1590
|
e[n] = arguments[n];
|
|
1631
1591
|
return !e.some(function(r) {
|
|
1632
1592
|
return !(r && typeof r.getBoundingClientRect == "function");
|
|
1633
1593
|
});
|
|
1634
1594
|
}
|
|
1635
|
-
function
|
|
1595
|
+
function Xr(t) {
|
|
1636
1596
|
t === void 0 && (t = {});
|
|
1637
|
-
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o = e.defaultOptions, i = o === void 0 ?
|
|
1638
|
-
return function(a,
|
|
1597
|
+
var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, o = e.defaultOptions, i = o === void 0 ? Ct : o;
|
|
1598
|
+
return function(a, l, u) {
|
|
1639
1599
|
u === void 0 && (u = i);
|
|
1640
1600
|
var d = {
|
|
1641
1601
|
placement: "bottom",
|
|
1642
1602
|
orderedModifiers: [],
|
|
1643
|
-
options: Object.assign({},
|
|
1603
|
+
options: Object.assign({}, Ct, i),
|
|
1644
1604
|
modifiersData: {},
|
|
1645
1605
|
elements: {
|
|
1646
1606
|
reference: a,
|
|
1647
|
-
popper:
|
|
1607
|
+
popper: l
|
|
1648
1608
|
},
|
|
1649
1609
|
attributes: {},
|
|
1650
1610
|
styles: {}
|
|
1651
|
-
},
|
|
1611
|
+
}, _ = [], h = !1, p = {
|
|
1652
1612
|
state: d,
|
|
1653
1613
|
setOptions: function(g) {
|
|
1654
|
-
var
|
|
1655
|
-
|
|
1656
|
-
reference:
|
|
1657
|
-
popper: Ie(
|
|
1614
|
+
var A = typeof g == "function" ? g(d.options) : g;
|
|
1615
|
+
v(), d.options = Object.assign({}, i, d.options, A), d.scrollParents = {
|
|
1616
|
+
reference: ae(a) ? Ie(a) : a.contextElement ? Ie(a.contextElement) : [],
|
|
1617
|
+
popper: Ie(l)
|
|
1658
1618
|
};
|
|
1659
|
-
var y =
|
|
1619
|
+
var y = Gr(Kr([].concat(r, d.options.modifiers)));
|
|
1660
1620
|
if (d.orderedModifiers = y.filter(function(w) {
|
|
1661
1621
|
return w.enabled;
|
|
1662
1622
|
}), {}.NODE_ENV !== "production") {
|
|
1663
|
-
var b =
|
|
1664
|
-
var
|
|
1665
|
-
return
|
|
1623
|
+
var b = zr([].concat(y, d.options.modifiers), function(w) {
|
|
1624
|
+
var C = w.name;
|
|
1625
|
+
return C;
|
|
1666
1626
|
});
|
|
1667
|
-
if (
|
|
1627
|
+
if (Yr(b), j(d.options.placement) === Be) {
|
|
1668
1628
|
var I = d.orderedModifiers.find(function(w) {
|
|
1669
|
-
var
|
|
1670
|
-
return
|
|
1629
|
+
var C = w.name;
|
|
1630
|
+
return C === "flip";
|
|
1671
1631
|
});
|
|
1672
1632
|
I || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
|
1673
1633
|
}
|
|
1674
|
-
var
|
|
1634
|
+
var M = Y(l), P = M.marginTop, L = M.marginRight, U = M.marginBottom, S = M.marginLeft;
|
|
1675
1635
|
[P, L, U, S].some(function(w) {
|
|
1676
1636
|
return parseFloat(w);
|
|
1677
1637
|
}) && 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(" "));
|
|
@@ -1684,28 +1644,28 @@ function Zr(t) {
|
|
|
1684
1644
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1685
1645
|
// prefer the async Popper#update method
|
|
1686
1646
|
forceUpdate: function() {
|
|
1687
|
-
if (!
|
|
1688
|
-
var g = d.elements,
|
|
1689
|
-
if (!
|
|
1690
|
-
({}).NODE_ENV !== "production" && console.error(
|
|
1647
|
+
if (!h) {
|
|
1648
|
+
var g = d.elements, A = g.reference, y = g.popper;
|
|
1649
|
+
if (!Dt(A, y)) {
|
|
1650
|
+
({}).NODE_ENV !== "production" && console.error(St);
|
|
1691
1651
|
return;
|
|
1692
1652
|
}
|
|
1693
1653
|
d.rects = {
|
|
1694
|
-
reference:
|
|
1695
|
-
popper:
|
|
1654
|
+
reference: Vr(A, Oe(y), d.options.strategy === "fixed"),
|
|
1655
|
+
popper: et(y)
|
|
1696
1656
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(w) {
|
|
1697
1657
|
return d.modifiersData[w.name] = Object.assign({}, w.data);
|
|
1698
1658
|
});
|
|
1699
1659
|
for (var b = 0, I = 0; I < d.orderedModifiers.length; I++) {
|
|
1700
1660
|
if ({}.NODE_ENV !== "production" && (b += 1, b > 100)) {
|
|
1701
|
-
console.error(
|
|
1661
|
+
console.error(Zr);
|
|
1702
1662
|
break;
|
|
1703
1663
|
}
|
|
1704
1664
|
if (d.reset === !0) {
|
|
1705
1665
|
d.reset = !1, I = -1;
|
|
1706
1666
|
continue;
|
|
1707
1667
|
}
|
|
1708
|
-
var
|
|
1668
|
+
var M = d.orderedModifiers[I], P = M.fn, L = M.options, U = L === void 0 ? {} : L, S = M.name;
|
|
1709
1669
|
typeof P == "function" && (d = P({
|
|
1710
1670
|
state: d,
|
|
1711
1671
|
options: U,
|
|
@@ -1717,147 +1677,152 @@ function Zr(t) {
|
|
|
1717
1677
|
},
|
|
1718
1678
|
// Async and optimistically optimized update – it will not be executed if
|
|
1719
1679
|
// not necessary (debounced to run at most once-per-tick)
|
|
1720
|
-
update:
|
|
1721
|
-
return new Promise(function(
|
|
1722
|
-
p.forceUpdate(),
|
|
1680
|
+
update: $r(function() {
|
|
1681
|
+
return new Promise(function(E) {
|
|
1682
|
+
p.forceUpdate(), E(d);
|
|
1723
1683
|
});
|
|
1724
1684
|
}),
|
|
1725
1685
|
destroy: function() {
|
|
1726
|
-
|
|
1686
|
+
v(), h = !0;
|
|
1727
1687
|
}
|
|
1728
1688
|
};
|
|
1729
|
-
if (!
|
|
1730
|
-
return {}.NODE_ENV !== "production" && console.error(
|
|
1731
|
-
p.setOptions(u).then(function(
|
|
1732
|
-
!
|
|
1689
|
+
if (!Dt(a, l))
|
|
1690
|
+
return {}.NODE_ENV !== "production" && console.error(St), p;
|
|
1691
|
+
p.setOptions(u).then(function(E) {
|
|
1692
|
+
!h && u.onFirstUpdate && u.onFirstUpdate(E);
|
|
1733
1693
|
});
|
|
1734
1694
|
function m() {
|
|
1735
|
-
d.orderedModifiers.forEach(function(
|
|
1736
|
-
var g =
|
|
1695
|
+
d.orderedModifiers.forEach(function(E) {
|
|
1696
|
+
var g = E.name, A = E.options, y = A === void 0 ? {} : A, b = E.effect;
|
|
1737
1697
|
if (typeof b == "function") {
|
|
1738
1698
|
var I = b({
|
|
1739
1699
|
state: d,
|
|
1740
1700
|
name: g,
|
|
1741
1701
|
instance: p,
|
|
1742
1702
|
options: y
|
|
1743
|
-
}),
|
|
1703
|
+
}), M = function() {
|
|
1744
1704
|
};
|
|
1745
|
-
|
|
1705
|
+
_.push(I || M);
|
|
1746
1706
|
}
|
|
1747
1707
|
});
|
|
1748
1708
|
}
|
|
1749
|
-
function
|
|
1750
|
-
|
|
1751
|
-
return
|
|
1752
|
-
}),
|
|
1709
|
+
function v() {
|
|
1710
|
+
_.forEach(function(E) {
|
|
1711
|
+
return E();
|
|
1712
|
+
}), _ = [];
|
|
1753
1713
|
}
|
|
1754
1714
|
return p;
|
|
1755
1715
|
};
|
|
1756
1716
|
}
|
|
1757
|
-
var
|
|
1758
|
-
defaultModifiers:
|
|
1717
|
+
var Qr = [Er, Rr, _r, or, Cr, Pr, Br, dr, Lr], Zt = /* @__PURE__ */ Xr({
|
|
1718
|
+
defaultModifiers: Qr
|
|
1759
1719
|
});
|
|
1760
|
-
function
|
|
1720
|
+
function ze(t, e, n, r) {
|
|
1761
1721
|
e ? (t.classList.remove(r), t.classList.add(n)) : (t.classList.add(r), t.classList.remove(n));
|
|
1762
1722
|
}
|
|
1763
|
-
let
|
|
1764
|
-
|
|
1765
|
-
|
|
1723
|
+
let k;
|
|
1724
|
+
const ve = {}, Ke = {
|
|
1725
|
+
SHIFT: "shift-key"
|
|
1726
|
+
};
|
|
1727
|
+
function Xt() {
|
|
1728
|
+
k && (document.removeEventListener("click", k.globalOnClick), document.removeEventListener("keyup", k.globalOnKeyup), document.removeEventListener("keydown", k.globalOnKeydown), k = null);
|
|
1766
1729
|
}
|
|
1767
1730
|
function Ze() {
|
|
1768
1731
|
const t = document.querySelectorAll(
|
|
1769
|
-
`${f(
|
|
1732
|
+
`${f(s.UTAH_DESIGN_SYSTEM)} ${f(s.POPUP_WRAPPER)}`
|
|
1770
1733
|
);
|
|
1771
|
-
Array.from(t).filter((e) => !e.classList.contains(
|
|
1734
|
+
Array.from(t).filter((e) => !e.classList.contains(s.POPUP__HIDDEN)).forEach((e) => {
|
|
1772
1735
|
const n = e.getAttribute("id");
|
|
1773
1736
|
if (n) {
|
|
1774
1737
|
const r = document.querySelector(`[aria-controls="${n}"]`);
|
|
1775
1738
|
r && r.setAttribute("aria-expanded", "false");
|
|
1776
1739
|
}
|
|
1777
|
-
|
|
1740
|
+
ze(e, !1, s.POPUP__VISIBLE, s.POPUP__HIDDEN);
|
|
1778
1741
|
});
|
|
1779
1742
|
}
|
|
1780
|
-
function
|
|
1781
|
-
|
|
1782
|
-
t.key === "Escape" && Ze();
|
|
1783
|
-
}, document.addEventListener("keyup",
|
|
1743
|
+
function Jr() {
|
|
1744
|
+
k && Xt(), k = {}, k.globalOnClick = Ze, document.addEventListener("click", k.globalOnClick), k.globalOnKeyup = (t) => {
|
|
1745
|
+
t.key === "Escape" && Ze(), t.shiftKey || (ve[Ke.SHIFT] = !1), ve[t.key] = !1;
|
|
1746
|
+
}, document.addEventListener("keyup", k.globalOnKeyup), k.globalOnKeydown = (t) => {
|
|
1747
|
+
t.shiftKey && (ve[Ke.SHIFT] = !0), ve[t.key] = !0;
|
|
1748
|
+
}, document.addEventListener("keydown", k.globalOnKeydown);
|
|
1784
1749
|
}
|
|
1785
|
-
function
|
|
1750
|
+
function eo() {
|
|
1786
1751
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1787
1752
|
}
|
|
1788
|
-
function
|
|
1753
|
+
function Te(t, e, n, r, o) {
|
|
1789
1754
|
let i = NaN, c = NaN;
|
|
1790
|
-
const a = 300,
|
|
1755
|
+
const a = 300, l = 150, u = 50;
|
|
1791
1756
|
e.setAttribute("aria-expanded", "false"), e.setAttribute("aria-haspopup", r);
|
|
1792
|
-
function d(
|
|
1757
|
+
function d(h) {
|
|
1793
1758
|
clearTimeout(i), clearTimeout(c), (!(o != null && o.isPerformPopup) || o != null && o.isPerformPopup && o.isPerformPopup()) && (i = window.setTimeout(
|
|
1794
1759
|
() => {
|
|
1795
|
-
|
|
1796
|
-
placement: (o == null ? void 0 : o.popupPlacement) ||
|
|
1760
|
+
Zt(e, n, {
|
|
1761
|
+
placement: (o == null ? void 0 : o.popupPlacement) || Qe.BOTTOM,
|
|
1797
1762
|
modifiers: [
|
|
1798
1763
|
{
|
|
1799
1764
|
name: "offset",
|
|
1800
1765
|
options: { offset: [0, 11] }
|
|
1801
1766
|
}
|
|
1802
1767
|
]
|
|
1803
|
-
}),
|
|
1768
|
+
}), ze(n, !0, s.POPUP__VISIBLE, s.POPUP__HIDDEN), e.setAttribute("aria-expanded", "true"), document.querySelectorAll(f(s.TOOLTIP__WRAPPER)).forEach((p) => p.classList.add(s.TOOLTIP__WRAPPER__HIDDEN));
|
|
1804
1769
|
},
|
|
1805
|
-
|
|
1770
|
+
h
|
|
1806
1771
|
));
|
|
1807
1772
|
}
|
|
1808
|
-
function h
|
|
1773
|
+
function _(h) {
|
|
1809
1774
|
clearTimeout(i), clearTimeout(c), (!(o != null && o.isPerformPopup) || o.isPerformPopup()) && (c = window.setTimeout(
|
|
1810
1775
|
() => {
|
|
1811
|
-
|
|
1776
|
+
ze(n, !1, s.POPUP__VISIBLE, s.POPUP__HIDDEN), e.setAttribute("aria-expanded", "false");
|
|
1812
1777
|
},
|
|
1813
|
-
|
|
1778
|
+
h
|
|
1814
1779
|
));
|
|
1815
1780
|
}
|
|
1816
|
-
if (t.addEventListener("focusin", () => d(
|
|
1781
|
+
if (t.addEventListener("focusin", () => d(l)), t.addEventListener("focusout", () => _(l)), o != null && o.shouldFocusOnHover && (t.addEventListener("mouseenter", () => d(a)), t.addEventListener("mouseleave", () => _(a))), !(o != null && o.preventOnClickHandling)) {
|
|
1817
1782
|
if (e.onclick)
|
|
1818
1783
|
throw new Error("popupFocusHandler: button already has onclick");
|
|
1819
|
-
e.onclick = (
|
|
1784
|
+
e.onclick = (h) => {
|
|
1820
1785
|
var m;
|
|
1821
1786
|
const p = e.getAttribute("aria-expanded") === "true";
|
|
1822
|
-
(!(o != null && o.isPerformPopup) || o.isPerformPopup()) && (
|
|
1787
|
+
(!(o != null && o.isPerformPopup) || o.isPerformPopup()) && (h.stopPropagation(), h.preventDefault(), p && e.getAttribute("aria-expanded") === "true" ? (_(u), (m = document.activeElement) == null || m.blur()) : (eo() && Ze(), d(u))), o != null && o.onClick && o.onClick(h);
|
|
1823
1788
|
};
|
|
1824
1789
|
}
|
|
1825
1790
|
}
|
|
1826
|
-
function
|
|
1791
|
+
function H() {
|
|
1827
1792
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(
|
|
1828
1793
|
/[018]/g,
|
|
1829
1794
|
// eslint-disable-next-line no-bitwise
|
|
1830
1795
|
(t) => (t ^ crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> t) / 4).toString(16)
|
|
1831
1796
|
);
|
|
1832
1797
|
}
|
|
1833
|
-
const
|
|
1798
|
+
const to = `<div class="popup__wrapper popup__wrapper--hidden">
|
|
1834
1799
|
<div class="popup__content">
|
|
1835
1800
|
<div class="popup__arrow" data-popper-arrow></div>
|
|
1836
1801
|
</div>
|
|
1837
1802
|
</div>
|
|
1838
1803
|
`;
|
|
1839
|
-
function
|
|
1804
|
+
function it(t, e) {
|
|
1840
1805
|
const n = t.getAttribute("id");
|
|
1841
1806
|
if (!n)
|
|
1842
1807
|
throw new Error("renderPopup: labelledByElement does not have an `id` attribute");
|
|
1843
|
-
const r =
|
|
1808
|
+
const r = H();
|
|
1844
1809
|
t.setAttribute("aria-controls", r);
|
|
1845
|
-
const o =
|
|
1810
|
+
const o = T(to);
|
|
1846
1811
|
if (o.setAttribute("id", r), o.setAttribute("aria-labelledby", n), e != null && e.removePopupArrow) {
|
|
1847
|
-
const i = o.querySelector(f(
|
|
1812
|
+
const i = o.querySelector(f(s.POPUP_ARROW));
|
|
1848
1813
|
if (!i)
|
|
1849
1814
|
throw new Error("renderPopup(): popup arrow missing (I wanted to remove it!!)");
|
|
1850
1815
|
i.remove();
|
|
1851
1816
|
}
|
|
1852
1817
|
return o;
|
|
1853
1818
|
}
|
|
1854
|
-
const
|
|
1855
|
-
`,
|
|
1819
|
+
const no = `<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
|
|
1820
|
+
`, Qt = `<span class="utds-new-tab-link-a11y">
|
|
1856
1821
|
<span class="visually-hidden">opens in a new tab</span>
|
|
1857
1822
|
<span class="utds-icon-after-external-link" aria-hidden="true"></span>
|
|
1858
1823
|
</span>
|
|
1859
|
-
`,
|
|
1860
|
-
`,
|
|
1824
|
+
`, ro = `<ul class="vertical-menu" role="menu" />
|
|
1825
|
+
`, oo = `<li class="vertical-menu__item">
|
|
1861
1826
|
<span class="vertical-menu__title">
|
|
1862
1827
|
<span class="vertical-menu__plain-title"></span>
|
|
1863
1828
|
<a href="#" class="vertical-menu__link-title">
|
|
@@ -1870,73 +1835,73 @@ const eo = `<span class="utds-icon-before-chevron-right vertical-menu__chevron"
|
|
|
1870
1835
|
<span class="vertical-menu__divider" />
|
|
1871
1836
|
</li>
|
|
1872
1837
|
`;
|
|
1873
|
-
function
|
|
1838
|
+
function He(t, e, n) {
|
|
1874
1839
|
var o;
|
|
1875
1840
|
let r = !1;
|
|
1876
|
-
return t && (Array.isArray(t) ? r = t.some((i) =>
|
|
1841
|
+
return t && (Array.isArray(t) ? r = t.some((i) => He(i, e, n)) : (r = n(t), r || (r = !!((o = e == null ? void 0 : e.filter((i) => t[i])) != null && o.some((i) => He(t[i], e, n)))))), r;
|
|
1877
1842
|
}
|
|
1878
|
-
function
|
|
1843
|
+
function io(t) {
|
|
1879
1844
|
const e = t.closest("li");
|
|
1880
1845
|
if (!e)
|
|
1881
1846
|
throw console.error("element", t), new Error("toggleChildMenuExpansion: parent not found for child");
|
|
1882
1847
|
e.querySelectorAll(":scope > ul").forEach((n) => {
|
|
1883
1848
|
var i;
|
|
1884
|
-
const r = (i = n.closest("li")) == null ? void 0 : i.querySelector(f(
|
|
1849
|
+
const r = (i = n.closest("li")) == null ? void 0 : i.querySelector(f(s.POPUP_MENU__BUTTON_TITLE));
|
|
1885
1850
|
if (!r)
|
|
1886
1851
|
throw new Error("toggleChildMenuExpansion: button not found");
|
|
1887
|
-
const o = r.querySelector(`:scope > ${f(
|
|
1852
|
+
const o = r.querySelector(`:scope > ${f(s.POPUP_MENU__CHEVRON)}`);
|
|
1888
1853
|
if (!o)
|
|
1889
1854
|
throw new Error("toggleChildMenuExpansion: chevron not found");
|
|
1890
|
-
n.classList.toggle(
|
|
1855
|
+
n.classList.toggle(s.VISUALLY_HIDDEN), n.classList.contains(s.VISUALLY_HIDDEN) ? (r.setAttribute("aria-expanded", "false"), o.classList.add(s.IS_CLOSED), o.classList.remove(s.IS_OPEN)) : (r.setAttribute("aria-expanded", "true"), o.classList.remove(s.IS_CLOSED), o.classList.add(s.IS_OPEN));
|
|
1891
1856
|
});
|
|
1892
1857
|
}
|
|
1893
|
-
function
|
|
1858
|
+
function ao(t) {
|
|
1894
1859
|
return (e) => {
|
|
1895
|
-
e.preventDefault(), e.stopPropagation(),
|
|
1860
|
+
e.preventDefault(), e.stopPropagation(), io(t);
|
|
1896
1861
|
};
|
|
1897
1862
|
}
|
|
1898
|
-
function
|
|
1899
|
-
const t =
|
|
1900
|
-
return t.classList.add(
|
|
1863
|
+
function Rt() {
|
|
1864
|
+
const t = T(no);
|
|
1865
|
+
return t.classList.add(s.IS_CLOSED), t;
|
|
1901
1866
|
}
|
|
1902
|
-
function
|
|
1903
|
-
var
|
|
1904
|
-
const r =
|
|
1867
|
+
function so(t, e, n) {
|
|
1868
|
+
var _, h;
|
|
1869
|
+
const r = T(oo), o = r.querySelector(f(s.POPUP_MENU__TITLE));
|
|
1905
1870
|
if (!o)
|
|
1906
1871
|
throw new Error("renderPopupMenuItem: menuItemTitleWrapper not found");
|
|
1907
1872
|
const i = (
|
|
1908
1873
|
/** @type HTMLElement | null */
|
|
1909
|
-
r.querySelector(f(
|
|
1874
|
+
r.querySelector(f(s.POPUP_MENU__BUTTON_TITLE))
|
|
1910
1875
|
);
|
|
1911
1876
|
if (!i)
|
|
1912
1877
|
throw new Error("renderPopupMenuItem: menuButton not found");
|
|
1913
1878
|
const c = (
|
|
1914
1879
|
/** @type HTMLElement | null */
|
|
1915
|
-
r.querySelector(f(
|
|
1880
|
+
r.querySelector(f(s.POPUP_MENU__LINK_TITLE))
|
|
1916
1881
|
);
|
|
1917
1882
|
if (!c)
|
|
1918
1883
|
throw new Error("renderPopupMenuItem: aHref not found");
|
|
1919
1884
|
const a = (
|
|
1920
1885
|
/** @type HTMLElement | null */
|
|
1921
|
-
r.querySelector(f(
|
|
1886
|
+
r.querySelector(f(s.POPUP_MENU__PLAIN_TITLE))
|
|
1922
1887
|
);
|
|
1923
1888
|
if (!a)
|
|
1924
1889
|
throw new Error("renderPopupMenuItem: plainTitle not found");
|
|
1925
|
-
const
|
|
1926
|
-
if (!
|
|
1890
|
+
const l = r.querySelector(f(s.POPUP_MENU__DIVIDER));
|
|
1891
|
+
if (!l)
|
|
1927
1892
|
throw new Error("renderPopupMenuItem: menuDivider not found");
|
|
1928
|
-
const u = r.querySelector(`button ${f(
|
|
1893
|
+
const u = r.querySelector(`button ${f(s.POPUP_MENU__LINK_TEXT)}`);
|
|
1929
1894
|
if (!u)
|
|
1930
1895
|
throw new Error("renderPopupMenuItem: titleSpanButton not found");
|
|
1931
|
-
const d = r.querySelector(`a ${f(
|
|
1896
|
+
const d = r.querySelector(`a ${f(s.POPUP_MENU__LINK_TEXT)}`);
|
|
1932
1897
|
if (!d)
|
|
1933
1898
|
throw new Error("renderPopupMenuItem: titleSpanLink not found");
|
|
1934
1899
|
if (e.actionMenu) {
|
|
1935
1900
|
let p;
|
|
1936
1901
|
switch (n.childrenMenuType) {
|
|
1937
1902
|
case W.FLYOUT: {
|
|
1938
|
-
p =
|
|
1939
|
-
const m =
|
|
1903
|
+
p = Rt(), i.appendChild(p), i.setAttribute("id", H());
|
|
1904
|
+
const m = at(
|
|
1940
1905
|
{
|
|
1941
1906
|
menuItems: e.actionMenu,
|
|
1942
1907
|
title: e.title
|
|
@@ -1947,13 +1912,13 @@ function io(t, e, n) {
|
|
|
1947
1912
|
removePopupArrow: !0
|
|
1948
1913
|
}
|
|
1949
1914
|
);
|
|
1950
|
-
r.appendChild(m),
|
|
1915
|
+
r.appendChild(m), Te(
|
|
1951
1916
|
r,
|
|
1952
1917
|
i,
|
|
1953
1918
|
m,
|
|
1954
1919
|
"menu",
|
|
1955
1920
|
{
|
|
1956
|
-
popupPlacement:
|
|
1921
|
+
popupPlacement: Qe.RIGHT_START,
|
|
1957
1922
|
preventOnClickHandling: !0,
|
|
1958
1923
|
shouldFocusOnHover: !0
|
|
1959
1924
|
}
|
|
@@ -1961,80 +1926,80 @@ function io(t, e, n) {
|
|
|
1961
1926
|
break;
|
|
1962
1927
|
}
|
|
1963
1928
|
case W.INLINE: {
|
|
1964
|
-
const m =
|
|
1929
|
+
const m = he(
|
|
1965
1930
|
e.actionMenu,
|
|
1966
1931
|
n
|
|
1967
|
-
),
|
|
1968
|
-
m.setAttribute("id",
|
|
1969
|
-
var g,
|
|
1932
|
+
), v = H();
|
|
1933
|
+
m.setAttribute("id", v), m.classList.add(s.VISUALLY_HIDDEN), r.appendChild(m), i.onclick = ao(i), i.setAttribute("aria-expanded", "false"), i.setAttribute("aria-controls", v), p = Rt(), i.appendChild(p), c.remove(), a.remove(), r.addEventListener("focusin", (E) => {
|
|
1934
|
+
var g, A, y, b;
|
|
1970
1935
|
for (let I = (
|
|
1971
1936
|
/** @type Element | null | undefined */
|
|
1972
|
-
(g =
|
|
1973
|
-
); I; I = (
|
|
1974
|
-
I.classList.remove(
|
|
1937
|
+
(g = E.target) == null ? void 0 : g.closest("ul")
|
|
1938
|
+
); I; I = (A = I.parentElement) == null ? void 0 : A.closest("ul"))
|
|
1939
|
+
I.classList.remove(s.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), E.target !== i && ((y = p == null ? void 0 : p.classList) == null || y.remove(s.IS_CLOSED), (b = p == null ? void 0 : p.classList) == null || b.add(s.IS_OPEN));
|
|
1975
1940
|
});
|
|
1976
1941
|
break;
|
|
1977
1942
|
}
|
|
1978
1943
|
case W.MEGA_MENU: {
|
|
1979
|
-
const m =
|
|
1944
|
+
const m = he(
|
|
1980
1945
|
e.actionMenu,
|
|
1981
1946
|
n
|
|
1982
|
-
),
|
|
1983
|
-
m.setAttribute("id",
|
|
1947
|
+
), v = H();
|
|
1948
|
+
m.setAttribute("id", v), r.appendChild(m), c.remove(), i.remove(), a.appendChild(document.createTextNode(e.title));
|
|
1984
1949
|
break;
|
|
1985
1950
|
}
|
|
1986
1951
|
default:
|
|
1987
1952
|
throw new Error(`renderPopupMenuItem: childrenMenuType unknown '${e.actionMenu}'`);
|
|
1988
1953
|
}
|
|
1989
|
-
|
|
1954
|
+
l.remove();
|
|
1990
1955
|
} else if (e.actionFunction)
|
|
1991
|
-
i.onclick = e.actionFunction, c.remove(),
|
|
1956
|
+
i.onclick = e.actionFunction, c.remove(), l.remove(), a.remove();
|
|
1992
1957
|
else if (e.actionUrl)
|
|
1993
|
-
c.setAttribute("href", e.actionUrl.url), i.remove(),
|
|
1958
|
+
c.setAttribute("href", e.actionUrl.url), i.remove(), l.remove(), a.remove();
|
|
1994
1959
|
else if (e.actionFunctionUrl)
|
|
1995
1960
|
c.setAttribute("href", e.actionFunctionUrl.url), c.onclick = (p) => {
|
|
1996
|
-
var m,
|
|
1997
|
-
(m = e.actionFunctionUrl) != null && m.skipHandleEvent || (p.stopPropagation(), p.preventDefault()), (
|
|
1998
|
-
}, i.remove(),
|
|
1961
|
+
var m, v;
|
|
1962
|
+
(m = e.actionFunctionUrl) != null && m.skipHandleEvent || (p.stopPropagation(), p.preventDefault()), (v = e.actionFunctionUrl) == null || v.actionFunction(p);
|
|
1963
|
+
}, i.remove(), l.remove(), a.remove();
|
|
1999
1964
|
else if (e.isDivider)
|
|
2000
1965
|
o.remove(), r.setAttribute("aria-hidden", "true"), r.setAttribute("role", "separator");
|
|
2001
1966
|
else
|
|
2002
1967
|
throw console.error(e), new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");
|
|
2003
|
-
if (!e.isDivider && (u.appendChild(document.createTextNode(e.title)), d.appendChild(document.createTextNode(e.title)), (
|
|
1968
|
+
if (!e.isDivider && (u.appendChild(document.createTextNode(e.title)), d.appendChild(document.createTextNode(e.title)), (_ = e.actionUrl) != null && _.openInNewTab || (h = e.actionFunctionUrl) != null && h.openInNewTab)) {
|
|
2004
1969
|
c.setAttribute("target", "_blank");
|
|
2005
|
-
const p =
|
|
1970
|
+
const p = T(Qt);
|
|
2006
1971
|
u.appendChild(p), d.appendChild(p);
|
|
2007
1972
|
}
|
|
2008
|
-
return (e.isSelected || e.actionMenu &&
|
|
1973
|
+
return (e.isSelected || e.actionMenu && He(e.actionMenu, ["actionMenu"], (p) => !!p.isSelected)) && (i.classList.add(s.MENU_ITEM__SELECTED), c.classList.add(s.MENU_ITEM__SELECTED)), e.isSelected ? r.classList.add(s.MENU_ITEM__SELECTED) : r.classList.remove(s.MENU_ITEM__SELECTED), t.appendChild(r), r;
|
|
2009
1974
|
}
|
|
2010
|
-
function
|
|
2011
|
-
const n =
|
|
2012
|
-
return t.forEach((r) =>
|
|
1975
|
+
function he(t, e) {
|
|
1976
|
+
const n = T(ro);
|
|
1977
|
+
return t.forEach((r) => so(n, r, e)), n;
|
|
2013
1978
|
}
|
|
2014
|
-
function
|
|
2015
|
-
const r =
|
|
1979
|
+
function at(t, e, n) {
|
|
1980
|
+
const r = it(e, { removePopupArrow: n.removePopupArrow }), o = r.querySelector(f(s.POPUP_CONTENT_WRAPPER));
|
|
2016
1981
|
if (!o)
|
|
2017
1982
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2018
|
-
const i =
|
|
1983
|
+
const i = he(t.menuItems, n);
|
|
2019
1984
|
return i.setAttribute("aria-label", t.title), o.appendChild(i), r;
|
|
2020
1985
|
}
|
|
2021
|
-
const
|
|
1986
|
+
const lo = `<div class="tooltip__wrapper tooltip__wrapper--hidden" aria-hidden="true">
|
|
2022
1987
|
<div class="tooltip__content">
|
|
2023
1988
|
<div class="tooltip__arrow" data-popper-arrow></div>
|
|
2024
1989
|
</div>
|
|
2025
1990
|
</div>
|
|
2026
1991
|
`;
|
|
2027
|
-
let
|
|
2028
|
-
function
|
|
2029
|
-
const n =
|
|
1992
|
+
let le = NaN;
|
|
1993
|
+
function Jt(t, e) {
|
|
1994
|
+
const n = T(lo), r = n.querySelector(f(s.TOOLTIP__CONTENT));
|
|
2030
1995
|
if (!r)
|
|
2031
1996
|
throw new Error("hookupToolTip: toolTipContent not found");
|
|
2032
1997
|
r.appendChild(document.createTextNode(e)), t.appendChild(n);
|
|
2033
|
-
const o =
|
|
1998
|
+
const o = Zt(
|
|
2034
1999
|
t,
|
|
2035
2000
|
n,
|
|
2036
2001
|
{
|
|
2037
|
-
placement:
|
|
2002
|
+
placement: Qe.BOTTOM,
|
|
2038
2003
|
modifiers: [
|
|
2039
2004
|
{
|
|
2040
2005
|
name: "offset",
|
|
@@ -2049,143 +2014,143 @@ function Yt(t, e) {
|
|
|
2049
2014
|
t.onmouseenter = () => {
|
|
2050
2015
|
clearTimeout(i), i = setTimeout(
|
|
2051
2016
|
() => {
|
|
2052
|
-
clearTimeout(
|
|
2053
|
-
const c = t.querySelector(f(
|
|
2054
|
-
(!c || c.classList.contains(
|
|
2017
|
+
clearTimeout(le), le = -1;
|
|
2018
|
+
const c = t.querySelector(f(s.POPUP_WRAPPER));
|
|
2019
|
+
(!c || c.classList.contains(s.POPUP__HIDDEN)) && (n.classList.remove(s.TOOLTIP__WRAPPER__HIDDEN), n.classList.add(s.TOOLTIP__WRAPPER__VISIBLE), o.update());
|
|
2055
2020
|
},
|
|
2056
2021
|
// tooltip was already opened on another item, so instantly open tooltip
|
|
2057
|
-
|
|
2022
|
+
le ? 0 : 500
|
|
2058
2023
|
);
|
|
2059
2024
|
}, t.onmouseleave = () => {
|
|
2060
|
-
clearTimeout(i), n.classList.add(
|
|
2025
|
+
clearTimeout(i), n.classList.add(s.TOOLTIP__WRAPPER__HIDDEN), n.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE), clearTimeout(le), le = setTimeout(
|
|
2061
2026
|
() => {
|
|
2062
|
-
|
|
2027
|
+
le = NaN;
|
|
2063
2028
|
},
|
|
2064
2029
|
500
|
|
2065
2030
|
);
|
|
2066
2031
|
};
|
|
2067
2032
|
}
|
|
2068
|
-
const
|
|
2033
|
+
const co = `<div class="utds-badge__wrapper">
|
|
2069
2034
|
<span class="utds-badge__value"></span>
|
|
2070
2035
|
<span class="utds-badge__label visually-hidden"></span>
|
|
2071
2036
|
</div>
|
|
2072
2037
|
`;
|
|
2073
|
-
function
|
|
2038
|
+
function st(t) {
|
|
2074
2039
|
let e = null;
|
|
2075
2040
|
if (t) {
|
|
2076
2041
|
e = /** @type {HTMLElement} */
|
|
2077
|
-
|
|
2078
|
-
const n = e.querySelector(f(
|
|
2042
|
+
T(co), e.classList.add(s.BADGE_WRAPPER__ACTION_ITEM);
|
|
2043
|
+
const n = e.querySelector(f(s.BADGE__LABEL));
|
|
2079
2044
|
if (!n)
|
|
2080
2045
|
throw new Error("renderActionItemBadge: badgeLabel not found");
|
|
2081
2046
|
if (n.appendChild(document.createTextNode(t.label)), t.value || t.value === 0) {
|
|
2082
|
-
const r = e.querySelector(f(
|
|
2047
|
+
const r = e.querySelector(f(s.BADGE__VALUE));
|
|
2083
2048
|
if (!r)
|
|
2084
2049
|
throw new Error("renderActionItemBadge: badgeValue not found");
|
|
2085
2050
|
r.appendChild(document.createTextNode(`${t.value}`));
|
|
2086
2051
|
} else
|
|
2087
|
-
e.classList.add(
|
|
2052
|
+
e.classList.add(s.BADGE_WRAPPER__SMALL);
|
|
2088
2053
|
t.className && e.classList.add(t.className);
|
|
2089
2054
|
}
|
|
2090
2055
|
return e;
|
|
2091
2056
|
}
|
|
2092
|
-
function
|
|
2093
|
-
const e =
|
|
2057
|
+
function uo(t) {
|
|
2058
|
+
const e = T(Gn), n = document.createTextNode(t.title), r = (
|
|
2094
2059
|
/** @type {HTMLElement} */
|
|
2095
2060
|
e instanceof HTMLCollection ? e[0] : e
|
|
2096
2061
|
);
|
|
2097
|
-
t.showTitle && r.classList.add(
|
|
2098
|
-
const o = r.querySelector(f(
|
|
2062
|
+
t.showTitle && r.classList.add(s.ACTION_ITEM__ICON_BUTTON_TITLE);
|
|
2063
|
+
const o = r.querySelector(f(s.ACTION_ITEM__TITLE));
|
|
2099
2064
|
if (!o)
|
|
2100
2065
|
throw new Error("renderActionItem: titleDiv not found");
|
|
2101
|
-
|
|
2102
|
-
const i = e.querySelector(f(
|
|
2066
|
+
o.appendChild(n), t.showTitle ? o.classList.remove(s.VISUALLY_HIDDEN) : o.classList.add(s.VISUALLY_HIDDEN);
|
|
2067
|
+
const i = e.querySelector(f(s.ACTION_ITEM__ICON_BUTTON));
|
|
2103
2068
|
if (!i)
|
|
2104
2069
|
throw new Error("renderActionItem: iconButton not found");
|
|
2105
2070
|
t.className && i.classList.add(t.className);
|
|
2106
|
-
const c =
|
|
2071
|
+
const c = st(t.badge);
|
|
2107
2072
|
c && i.appendChild(c);
|
|
2108
|
-
const a =
|
|
2109
|
-
if (a.setAttribute("role", "presentation"),
|
|
2073
|
+
const a = T(t.icon);
|
|
2074
|
+
if (a.setAttribute("role", "presentation"), i.appendChild(a), !(i instanceof HTMLElement))
|
|
2110
2075
|
throw new Error("renderActionItem: iconButton is not an HTMLElement");
|
|
2111
2076
|
if (t.actionFunction)
|
|
2112
2077
|
i.onclick = t.actionFunction;
|
|
2113
2078
|
else if (t.actionDom) {
|
|
2114
|
-
const
|
|
2115
|
-
i.setAttribute("id",
|
|
2116
|
-
const u =
|
|
2079
|
+
const l = H();
|
|
2080
|
+
i.setAttribute("id", l);
|
|
2081
|
+
const u = it(i), d = (
|
|
2117
2082
|
/** @type {HTMLElement} */
|
|
2118
|
-
u.querySelector(f(
|
|
2083
|
+
u.querySelector(f(s.POPUP_CONTENT_WRAPPER))
|
|
2119
2084
|
);
|
|
2120
2085
|
if (!d)
|
|
2121
2086
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2122
|
-
d.appendChild(t.actionDom()), e.appendChild(u),
|
|
2087
|
+
d.appendChild(T(typeof t.actionDom == "function" ? t.actionDom() : t.actionDom)), e.appendChild(u), Te(r, i, u, "dialog", void 0);
|
|
2123
2088
|
} else if (t.actionPopupMenu) {
|
|
2124
|
-
const
|
|
2125
|
-
i.setAttribute("id",
|
|
2126
|
-
const u =
|
|
2089
|
+
const l = H();
|
|
2090
|
+
i.setAttribute("id", l);
|
|
2091
|
+
const u = at(
|
|
2127
2092
|
/** @type {PopupMenu} */
|
|
2128
2093
|
t.actionPopupMenu,
|
|
2129
2094
|
i,
|
|
2130
2095
|
{ childrenMenuType: W.INLINE }
|
|
2131
2096
|
);
|
|
2132
|
-
|
|
2097
|
+
e.appendChild(u), Te(r, i, u, "menu", void 0);
|
|
2133
2098
|
} else
|
|
2134
2099
|
throw console.error(t), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2135
|
-
return
|
|
2100
|
+
return Jt(e, t.title), e;
|
|
2136
2101
|
}
|
|
2137
|
-
function
|
|
2102
|
+
function po() {
|
|
2138
2103
|
var n, r;
|
|
2139
2104
|
const { actionItems: t } = N();
|
|
2140
2105
|
let e = null;
|
|
2141
|
-
return t != null && t.length && (e =
|
|
2106
|
+
return t != null && t.length && (e = T(Fn), (r = (n = N().actionItems) == null ? void 0 : n.map((o) => uo(o))) == null || r.forEach((o) => e.appendChild(o))), e;
|
|
2142
2107
|
}
|
|
2143
|
-
const
|
|
2144
|
-
`,
|
|
2108
|
+
const fo = `<button class="utds-utah-id__button button--solid" type="button">UtahID Sign In</button>
|
|
2109
|
+
`, en = `<div class="utds-utah-id-wrapper"></div>
|
|
2145
2110
|
`, Ae = {
|
|
2146
2111
|
PROFILE: "https://id.utah.gov",
|
|
2147
2112
|
SIGN_IN: `https://id.utah.gov/login?goto=${window.location}`,
|
|
2148
2113
|
SIGN_OUT: `https://id.utah.gov/logout?goto=${window.location}`,
|
|
2149
2114
|
USER_INFO: "https://id.utah.gov/api/userInfo"
|
|
2150
|
-
},
|
|
2115
|
+
}, ho = `<div class="vertical-menu__wrapper">
|
|
2151
2116
|
<div class="vertical-menu__wrapper-title"></div>
|
|
2152
2117
|
</div>
|
|
2153
2118
|
`;
|
|
2154
|
-
function
|
|
2155
|
-
const n =
|
|
2119
|
+
function tn(t, e) {
|
|
2120
|
+
const n = T(ho), r = n.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
2156
2121
|
if (!r)
|
|
2157
2122
|
throw new Error("renderMenuWithTitle: menuTitleDiv not found");
|
|
2158
2123
|
return r.appendChild(document.createTextNode(e)), n.appendChild(t), n;
|
|
2159
2124
|
}
|
|
2160
2125
|
let O = null;
|
|
2161
|
-
function
|
|
2162
|
-
O = t, document.querySelectorAll(f(
|
|
2126
|
+
function nn(t) {
|
|
2127
|
+
O = t, document.querySelectorAll(f(s.UTAH_ID__BUTTON)).forEach((n) => {
|
|
2163
2128
|
var r;
|
|
2164
2129
|
if (n) {
|
|
2165
2130
|
if (n.innerHTML = "", O != null && O.userInfo && ((r = O.userInfo) != null && r.authenticated)) {
|
|
2166
2131
|
const c = document.createElement("span");
|
|
2167
|
-
c.appendChild(document.createTextNode("UtahID Account:")), c.classList.add(
|
|
2132
|
+
c.appendChild(document.createTextNode("UtahID Account:")), c.classList.add(s.VISUALLY_HIDDEN), n.appendChild(c), n.appendChild(document.createTextNode(`Hello, ${O.userInfo.first || ""}`));
|
|
2168
2133
|
} else
|
|
2169
2134
|
n.appendChild(document.createTextNode("UtahID Sign In"));
|
|
2170
2135
|
const o = n.getAttribute("aria-controls");
|
|
2171
2136
|
if (!o)
|
|
2172
2137
|
throw new Error(`authChangedEventHandler: popup id for button not found - ${o}`);
|
|
2173
2138
|
const i = document.getElementById(o);
|
|
2174
|
-
i &&
|
|
2139
|
+
i && lt(n, i);
|
|
2175
2140
|
}
|
|
2176
2141
|
});
|
|
2177
2142
|
}
|
|
2178
|
-
function
|
|
2143
|
+
function lt(t, e) {
|
|
2179
2144
|
var n;
|
|
2180
2145
|
t && e && (!!(O != null && O.isDefinitive) && !!((n = O == null ? void 0 : O.userInfo) != null && n.authenticated) ? (t.setAttribute("aria-haspopup", "menu"), t.setAttribute("aria-expanded", "false"), e.removeAttribute("aria-hidden")) : (t.removeAttribute("aria-haspopup"), t.removeAttribute("aria-expanded"), e.setAttribute("aria-hidden", "true")));
|
|
2181
2146
|
}
|
|
2182
|
-
function
|
|
2183
|
-
const t =
|
|
2184
|
-
return t.setAttribute("id",
|
|
2147
|
+
function rn() {
|
|
2148
|
+
const t = T(fo);
|
|
2149
|
+
return t.setAttribute("id", H()), O && nn(O), t;
|
|
2185
2150
|
}
|
|
2186
|
-
function
|
|
2187
|
-
var
|
|
2188
|
-
const e = N(), n = e.utahId !== !1 && e.utahId !== !0 && e.utahId.onProfile, r = e.utahId !== !1 && e.utahId !== !0 && e.utahId.onSignOut, o = e.utahId !== !0 && e.utahId !== !1 && ((
|
|
2151
|
+
function on(t) {
|
|
2152
|
+
var l;
|
|
2153
|
+
const e = N(), n = e.utahId !== !1 && e.utahId !== !0 && e.utahId.onProfile, r = e.utahId !== !1 && e.utahId !== !0 && e.utahId.onSignOut, o = [...e.utahId !== !0 && e.utahId !== !1 && ((l = e.utahId) == null ? void 0 : l.menuItems) || []];
|
|
2189
2154
|
o.length && o.push({
|
|
2190
2155
|
isDivider: !0,
|
|
2191
2156
|
title: "--divider--"
|
|
@@ -2203,21 +2168,21 @@ function Jt(t) {
|
|
|
2203
2168
|
actionFunction: r || void 0,
|
|
2204
2169
|
title: "Sign Out"
|
|
2205
2170
|
}
|
|
2206
|
-
], c =
|
|
2207
|
-
return a.setAttribute("aria-label", "Utah Id Menu"), a.setAttribute("id",
|
|
2171
|
+
], c = he(i, { childrenMenuType: W.INLINE }), a = t ? tn(c, "Utah ID Menu") : c;
|
|
2172
|
+
return a.setAttribute("aria-label", "Utah Id Menu"), a.setAttribute("id", H()), a;
|
|
2208
2173
|
}
|
|
2209
|
-
function
|
|
2210
|
-
const t =
|
|
2211
|
-
e.setAttribute("id",
|
|
2212
|
-
const n =
|
|
2174
|
+
function _o() {
|
|
2175
|
+
const t = T(en), e = rn();
|
|
2176
|
+
e.setAttribute("id", H()), t.appendChild(e);
|
|
2177
|
+
const n = on(!1), r = it(e), o = (
|
|
2213
2178
|
/** @type {HTMLElement} */
|
|
2214
|
-
r.querySelector(f(
|
|
2179
|
+
r.querySelector(f(s.POPUP_CONTENT_WRAPPER))
|
|
2215
2180
|
);
|
|
2216
2181
|
if (!o)
|
|
2217
2182
|
throw new Error("renderUtahIdForDesktop: contentWrapper not found");
|
|
2218
|
-
o.appendChild(n), t.appendChild(r),
|
|
2183
|
+
o.appendChild(n), t.appendChild(r), lt(e, r);
|
|
2219
2184
|
const i = N(), c = i.utahId !== !1 && i.utahId !== !0 && i.utahId.onSignIn;
|
|
2220
|
-
return
|
|
2185
|
+
return Te(
|
|
2221
2186
|
t,
|
|
2222
2187
|
e,
|
|
2223
2188
|
r,
|
|
@@ -2228,43 +2193,109 @@ function fo() {
|
|
|
2228
2193
|
return !!(O != null && O.isDefinitive) && !!((a = O == null ? void 0 : O.userInfo) != null && a.authenticated);
|
|
2229
2194
|
},
|
|
2230
2195
|
onClick: (a) => {
|
|
2231
|
-
var
|
|
2232
|
-
(!(O != null && O.isDefinitive) || !((
|
|
2196
|
+
var l;
|
|
2197
|
+
(!(O != null && O.isDefinitive) || !((l = O == null ? void 0 : O.userInfo) != null && l.authenticated)) && (c ? c(a) : (a.preventDefault(), a.stopPropagation(), window.location.href = Ae.SIGN_IN));
|
|
2233
2198
|
}
|
|
2234
2199
|
}
|
|
2235
2200
|
), t;
|
|
2236
2201
|
}
|
|
2237
|
-
function
|
|
2238
|
-
const t =
|
|
2202
|
+
function mo() {
|
|
2203
|
+
const t = T(en), e = rn(), n = e.getAttribute("id");
|
|
2239
2204
|
if (!n)
|
|
2240
2205
|
throw new Error("renderUtahIdForMobile: utahIdButton has no id");
|
|
2241
2206
|
t.appendChild(e);
|
|
2242
|
-
const r =
|
|
2207
|
+
const r = on(!0), o = r.getAttribute("id");
|
|
2243
2208
|
if (!o)
|
|
2244
2209
|
throw new Error("renderUtahIdForMobile: utahIdPopupMenu has no id");
|
|
2245
|
-
return t.appendChild(r), e.setAttribute("aria-controls", o), r.setAttribute("aria-labelledby", n),
|
|
2210
|
+
return t.appendChild(r), e.setAttribute("aria-controls", o), r.setAttribute("aria-labelledby", n), lt(e, r), { button: e, menu: r };
|
|
2246
2211
|
}
|
|
2247
|
-
function
|
|
2248
|
-
const t =
|
|
2249
|
-
return e &&
|
|
2212
|
+
function Eo() {
|
|
2213
|
+
const t = T(Vn), e = po();
|
|
2214
|
+
return e && t.appendChild(e), N().utahId !== !1 && t.appendChild(_o()), t;
|
|
2250
2215
|
}
|
|
2251
|
-
const
|
|
2216
|
+
const vo = `<div class="utds-title-wrapper">
|
|
2217
|
+
<div class="utds-title-wrapper__logo"></div>
|
|
2218
|
+
<div class="utds-title-wrapper__title"></div>
|
|
2219
|
+
</div>
|
|
2220
|
+
`, bo = `<a class="utds-title-wrapper">
|
|
2221
|
+
<div class="utds-title-wrapper__logo"></div>
|
|
2222
|
+
<div class="utds-title-wrapper__title"></div>
|
|
2223
|
+
</a>
|
|
2252
2224
|
`;
|
|
2253
|
-
function
|
|
2225
|
+
function Io() {
|
|
2226
|
+
const t = N().titleURL, e = T(t ? bo : vo);
|
|
2227
|
+
if (!e)
|
|
2228
|
+
throw new Error("LogoTitle: titleWrapper is null");
|
|
2229
|
+
t && e.setAttribute("href", t);
|
|
2230
|
+
const n = e.querySelector(f(s.TITLE__LOGO));
|
|
2231
|
+
if (!n)
|
|
2232
|
+
throw new Error("LogoTitle: logoWrapper is null");
|
|
2233
|
+
const r = N().logo, o = N().showTitle, i = N().title;
|
|
2234
|
+
if (r) {
|
|
2235
|
+
let l;
|
|
2236
|
+
Ge(r) ? l = T(
|
|
2237
|
+
/** @type {string} */
|
|
2238
|
+
r
|
|
2239
|
+
) : l = /** @type {Element} */
|
|
2240
|
+
r, l.setAttribute("role", "presentation"), n.appendChild(l);
|
|
2241
|
+
} else
|
|
2242
|
+
e.removeChild(n);
|
|
2243
|
+
const c = document.createTextNode(i), a = e.querySelector(f(s.TITLE__TITLE));
|
|
2244
|
+
return a == null || a.appendChild(c), !o && r && (a == null || a.classList.add(s.VISUALLY_HIDDEN)), e;
|
|
2245
|
+
}
|
|
2246
|
+
const go = `<div class="utah-logo-svg" role="img">
|
|
2247
|
+
<title>An official website of the State of Utah</title>
|
|
2248
|
+
<svg viewBox="0 0 137.363 56.6959">
|
|
2249
|
+
<g>
|
|
2250
|
+
<g>
|
|
2251
|
+
<path d="M15.972,39.161c-5.4,0-9.4127-1.5667-12.038-4.7C1.3087,31.3277-.0027,26.466,0,19.876V0H10.175V21.06c0,3.4313,.4633,5.847,1.39,7.247,.9909,1.434,2.669,2.2337,4.407,2.1,1.7525,.124,3.4436-.6712,4.466-2.1,.966-1.4,1.449-3.8157,1.449-7.247V0h9.82V19.876c0,6.586-1.2817,11.4467-3.845,14.582-2.5633,3.1353-6.5267,4.703-11.89,4.703Zm31.353-.711V8.518h-10.175V0h30.525V8.518h-10.175v29.932h-10.175Zm33.6-18.693l-.651,2.662h7.1l-.651-2.662c-.4733-1.8533-.9467-3.8647-1.42-6.034-.4733-2.1693-.945-4.2197-1.415-6.151h-.237c-.434,1.972-.8777,4.0327-1.331,6.182s-.918,4.1507-1.394,6.004l-.001-.001Zm-14.788,18.693L77.85,0h12.3l11.717,38.45h-10.767l-1.893-8.162h-10.766l-1.893,8.162h-10.411Zm39.4,0V0h10.175V14.316h11.476V0h10.175V38.45h-10.175v-15.261h-11.479v15.261h-10.172Z" />
|
|
2252
|
+
</g>
|
|
2253
|
+
<text transform="translate(.0419 52.5939)"><tspan x="0" y="0">An official </tspan><tspan x="60.437" y="0" style="letter-spacing: -.02em;">s</tspan><tspan x="66.0229" y="0" style="letter-spacing: -.021em;">t</tspan><tspan x="70.4614" y="0" style="letter-spacing: -.014em;">at</tspan><tspan x="81.8569" y="0" style="letter-spacing: 0em;">e </tspan><tspan x="91.6011" y="0" style="letter-spacing: -.004em;">w</tspan><tspan x="101.5972" y="0">ebsi</tspan><tspan x="125.5923" y="0" style="letter-spacing: -.014em;">t</tspan><tspan x="130.1284" y="0">e</tspan></text>
|
|
2254
|
+
</g>
|
|
2255
|
+
</svg>
|
|
2256
|
+
</div>
|
|
2257
|
+
`, Mo = `<div class="utah-logo-svg">
|
|
2258
|
+
<svg viewBox="0 0 105.9496 47.6226" role="img">
|
|
2259
|
+
<title>An official website of the State of Utah</title>
|
|
2260
|
+
<g>
|
|
2261
|
+
<g>
|
|
2262
|
+
<path d="M12.2714,30.0877c-4.1489,0-7.2318-1.2037-9.2489-3.611C1.0055,24.0693-.002,20.334,0,15.2709V0H7.8175V16.1806c0,2.6363,.356,4.4923,1.0679,5.5679,.7613,1.1018,2.0506,1.7162,3.3859,1.6134,1.3465,.0953,2.6458-.5157,3.4313-1.6134,.7422-1.0756,1.1133-2.9316,1.1133-5.5679V0h7.5448V15.2709c0,5.0601-.9847,8.7946-2.9541,11.2035-1.9694,2.4089-5.0145,3.6133-9.1352,3.6133Zm24.0887-.5463V6.5444h-7.8175V0h23.4526V6.5444h-7.8175V29.5414h-7.8175Zm25.8151-14.362l-.5002,2.0452h5.455l-.5002-2.0452c-.3637-1.4239-.7273-2.9693-1.091-4.636-.3637-1.6667-.7261-3.242-1.0871-4.7259h-.1821c-.3334,1.5151-.6743,3.0983-1.0226,4.7497s-.7053,3.189-1.071,4.6129l-.0008-.0008Zm-11.3617,14.362L59.8127,0h9.4502l9.0023,29.5414h-8.2724l-1.4544-6.2709h-8.2716l-1.4544,6.2709h-7.9988Zm30.2713,0V0h7.8175V10.9991h8.8171V0h7.8175V29.5414h-7.8175v-11.7251h-8.8194v11.7251h-7.8152Z" />
|
|
2263
|
+
</g>
|
|
2264
|
+
<text transform="translate(.0419 43.5205)"><tspan x="0" y="0">An official </tspan><tspan x="60.437" y="0" style="letter-spacing: -.004em;">w</tspan><tspan x="70.4331" y="0">ebsi</tspan><tspan x="94.4282" y="0" style="letter-spacing: -.014em;">t</tspan><tspan x="98.9644" y="0">e</tspan></text>
|
|
2265
|
+
</g>
|
|
2266
|
+
</svg>
|
|
2267
|
+
</div>
|
|
2268
|
+
`;
|
|
2269
|
+
function To() {
|
|
2270
|
+
let t;
|
|
2271
|
+
switch (N().size) {
|
|
2272
|
+
case ce.LARGE:
|
|
2273
|
+
t = go;
|
|
2274
|
+
break;
|
|
2275
|
+
case ce.SMALL:
|
|
2276
|
+
case ce.MEDIUM:
|
|
2277
|
+
t = Mo;
|
|
2278
|
+
break;
|
|
2279
|
+
default:
|
|
2280
|
+
throw new Error(`Unknown settings size: '${N().size}'`);
|
|
2281
|
+
}
|
|
2282
|
+
return T(t);
|
|
2283
|
+
}
|
|
2284
|
+
function Ao() {
|
|
2254
2285
|
var n;
|
|
2255
|
-
const t =
|
|
2256
|
-
t.classList.add(`utds-header--${((n = N().size) == null ? void 0 : n.toLowerCase()) ||
|
|
2257
|
-
const e =
|
|
2258
|
-
return t.appendChild(e),
|
|
2286
|
+
const t = T(Un);
|
|
2287
|
+
t.classList.add(`utds-header--${((n = N().size) == null ? void 0 : n.toLowerCase()) || ce.MEDIUM}`);
|
|
2288
|
+
const e = T(Ln);
|
|
2289
|
+
return t.appendChild(e), e.appendChild(To()), e.appendChild(T(Sn)), e.appendChild(Io()), t.appendChild(Eo()), t;
|
|
2259
2290
|
}
|
|
2260
|
-
const
|
|
2291
|
+
const wo = `<li class="menu-item">
|
|
2261
2292
|
<span class="menu-item__title">
|
|
2262
2293
|
<button class="menu-item__button-title" type="button"></button>
|
|
2263
2294
|
<a class="menu-item__link-title"></a>
|
|
2264
2295
|
<span class="menu-chiclet"></span>
|
|
2265
2296
|
</span>
|
|
2266
2297
|
</li>
|
|
2267
|
-
`,
|
|
2298
|
+
`, Oo = `<div class="utah-design-system main-menu__outer">
|
|
2268
2299
|
<div class="main-menu__wrapper">
|
|
2269
2300
|
<nav class="horizontal-menu main-menu__nav">
|
|
2270
2301
|
<h2 class="main-menu__title visually-hidden"></h2>
|
|
@@ -2291,198 +2322,281 @@ const Eo = `<li class="menu-item">
|
|
|
2291
2322
|
</button>
|
|
2292
2323
|
</div>
|
|
2293
2324
|
</div>
|
|
2325
|
+
`, yo = `<div class="utah-design-system" id="search-modal">
|
|
2326
|
+
<div class="search-modal__close-button-wrapper">
|
|
2327
|
+
<button type="button" class="search-modal__close-button button icon-button icon-button--borderless">
|
|
2328
|
+
<span class="utds-icon-before-x-icon" aria-hidden="true"></span>
|
|
2329
|
+
<span class="visually-hidden">Close search modal</span>
|
|
2330
|
+
</button>
|
|
2331
|
+
</div>
|
|
2332
|
+
<div class="search-modal">
|
|
2333
|
+
<form class="search-modal__form hcenter" role="search" aria-label="Sitewide">
|
|
2334
|
+
<span class="utds-icon-before-search search-modal__icon-search vcenter" aria-hidden="true"></span>
|
|
2335
|
+
<label for="search-modal-input-id" class="search-modal__input-label visually-hidden">Enter your search
|
|
2336
|
+
terms</label>
|
|
2337
|
+
<input type="text" id="search-modal-input-id" placeholder="Search" class="search-modal__input">
|
|
2338
|
+
<div class="search-modal__button-wrapper vcenter visually-hidden">
|
|
2339
|
+
<button type="submit" class="search-modal__button button button--solid button--primary-color">
|
|
2340
|
+
Search Now
|
|
2341
|
+
</button>
|
|
2342
|
+
</div>
|
|
2343
|
+
<div aria-hidden tabindex="0" class="search-modal__hidden-last-focusable visually-hidden">
|
|
2344
|
+
end of search form
|
|
2345
|
+
</div>
|
|
2346
|
+
</form>
|
|
2347
|
+
</div>
|
|
2348
|
+
<div class="search-backdrop modal-backdrop backdrop-dark"></div>
|
|
2349
|
+
</div>
|
|
2294
2350
|
`;
|
|
2295
|
-
function
|
|
2296
|
-
|
|
2297
|
-
|
|
2351
|
+
function Ce() {
|
|
2352
|
+
const t = document.getElementById(s.SEARCH__SEARCH_MODAL);
|
|
2353
|
+
if (!t)
|
|
2354
|
+
throw new Error("closSearchModal: searchModal not found");
|
|
2355
|
+
t.remove();
|
|
2356
|
+
const e = (
|
|
2357
|
+
/** @type {HTMLElement} */
|
|
2358
|
+
document.querySelector(f(s.MAIN_MENU__SEARCH))
|
|
2359
|
+
);
|
|
2360
|
+
if (!e)
|
|
2361
|
+
throw new Error("closSearchModal: searchIcon not found");
|
|
2362
|
+
e.focus();
|
|
2363
|
+
}
|
|
2364
|
+
function Po() {
|
|
2365
|
+
const t = T(yo), e = (
|
|
2366
|
+
/** @type {HTMLElement} */
|
|
2367
|
+
t.querySelector(f(s.SEARCH__SEARCH_BACKDROP))
|
|
2368
|
+
);
|
|
2369
|
+
if (!e)
|
|
2370
|
+
throw new Error("showSearchModal: backdrop not found");
|
|
2371
|
+
const n = (
|
|
2372
|
+
/** @type {HTMLElement} */
|
|
2373
|
+
t.querySelector(f(s.SEARCH__SEARCH_CLOSE_BUTTON))
|
|
2374
|
+
);
|
|
2375
|
+
if (!n)
|
|
2376
|
+
throw new Error("showSearchModal: closeButton not found");
|
|
2377
|
+
const r = (
|
|
2378
|
+
/** @type {HTMLElement} */
|
|
2379
|
+
t.querySelector(f(s.SEARCH__SEARCH_BUTTON))
|
|
2380
|
+
);
|
|
2381
|
+
if (!r)
|
|
2382
|
+
throw new Error("showSearchModal: searchButton not found");
|
|
2383
|
+
const o = (
|
|
2384
|
+
/** @type {HTMLElement} */
|
|
2385
|
+
t.querySelector(f(s.SEARCH__SEARCH_BUTTON_WRAPPER))
|
|
2386
|
+
);
|
|
2387
|
+
if (!o)
|
|
2388
|
+
throw new Error("showSearchModal: searchButtonWrapper not found");
|
|
2389
|
+
const i = (
|
|
2390
|
+
/** @type {HTMLInputElement} */
|
|
2391
|
+
t.querySelector(f(s.SEARCH__SEARCH_INPUT))
|
|
2392
|
+
);
|
|
2393
|
+
if (!i)
|
|
2394
|
+
throw new Error("showSearchModal: searchInput not found");
|
|
2395
|
+
r.onclick = (a) => {
|
|
2396
|
+
var l, u;
|
|
2397
|
+
a.preventDefault(), a.stopPropagation(), Ce(), (u = (l = N()).onSearch) == null || u.call(l, i.value);
|
|
2398
|
+
}, n.onclick = (a) => {
|
|
2399
|
+
a.preventDefault(), a.stopPropagation(), Ce();
|
|
2400
|
+
}, e.onclick = (a) => {
|
|
2401
|
+
a.preventDefault(), a.stopPropagation(), Ce();
|
|
2402
|
+
}, document.body.appendChild(t), i.focus(), i.oninput = () => {
|
|
2403
|
+
o.classList.remove(s.VISUALLY_HIDDEN);
|
|
2404
|
+
}, r.onfocus = () => {
|
|
2405
|
+
o.classList.remove(s.VISUALLY_HIDDEN);
|
|
2406
|
+
}, t.onkeyup = (a) => {
|
|
2407
|
+
(a.code === "Escape" || a.key === "Escape") && (a.preventDefault(), a.stopPropagation(), Ce());
|
|
2408
|
+
}, n.addEventListener("focusout", (a) => {
|
|
2409
|
+
a.preventDefault(), a.stopPropagation(), ve[Ke.SHIFT] ? r.focus() : i.focus();
|
|
2410
|
+
});
|
|
2411
|
+
const c = t.querySelector(".search-modal__hidden-last-focusable");
|
|
2412
|
+
if (!c)
|
|
2413
|
+
throw new Error("showSearchModal: hiddenLastFocusableButton not found");
|
|
2414
|
+
c.addEventListener("focusin", (a) => {
|
|
2415
|
+
a.preventDefault(), a.stopPropagation(), n.focus();
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
function No() {
|
|
2419
|
+
var l;
|
|
2420
|
+
const t = N(), e = T(Oo), n = e.querySelector(f(s.MAIN_MENU__NAV));
|
|
2298
2421
|
if (!n)
|
|
2299
2422
|
throw new Error("renderMainMenu(): mainMenu not created");
|
|
2300
|
-
const r = n.querySelector(f(
|
|
2423
|
+
const r = n.querySelector(f(s.MAIN_MENU__TITLE));
|
|
2301
2424
|
if (!r)
|
|
2302
2425
|
throw new Error("renderMainMenu(): titleTag not found");
|
|
2303
2426
|
const o = "main-menu__nav";
|
|
2304
2427
|
n.setAttribute("aria-labelledby", o), r.setAttribute("id", o), r.innerHTML = t.mainMenu.title;
|
|
2305
|
-
const i = n.querySelector(f(
|
|
2428
|
+
const i = n.querySelector(f(s.MAIN_MENU__MENU_TOP));
|
|
2306
2429
|
if (!i)
|
|
2307
2430
|
throw new Error("renderMainMenu(): mainMenuTop not found");
|
|
2308
2431
|
t.mainMenu.menuItems.forEach((u) => {
|
|
2309
|
-
var m,
|
|
2310
|
-
const d =
|
|
2432
|
+
var m, v;
|
|
2433
|
+
const d = T(wo);
|
|
2311
2434
|
i.appendChild(d);
|
|
2312
|
-
const
|
|
2313
|
-
if (!
|
|
2435
|
+
const _ = d.querySelector(f(s.MENU_ITEM__TITLE));
|
|
2436
|
+
if (!_)
|
|
2314
2437
|
throw new Error(`renderMainMenu(): sub menu title not found for ${u.title}`);
|
|
2315
|
-
const
|
|
2438
|
+
const h = (
|
|
2316
2439
|
/** @type {HTMLElement} */
|
|
2317
|
-
|
|
2440
|
+
_.querySelector(f(s.MENU_ITEM__BUTTON_TITLE))
|
|
2318
2441
|
);
|
|
2319
|
-
if (!
|
|
2442
|
+
if (!h)
|
|
2320
2443
|
throw new Error(`renderMainMenu(): button title not found for ${u.title}`);
|
|
2321
|
-
|
|
2444
|
+
h.setAttribute("id", `${s.MENU_ITEM__BUTTON_TITLE}__${u.title}-${H()}`);
|
|
2322
2445
|
const p = (
|
|
2323
2446
|
/** @type {HTMLElement} */
|
|
2324
|
-
|
|
2447
|
+
_.querySelector(f(s.MENU_ITEM__LINK_TITLE))
|
|
2325
2448
|
);
|
|
2326
2449
|
if (!p)
|
|
2327
2450
|
throw new Error(`renderMainMenu(): link title not found for ${u.title}`);
|
|
2328
|
-
if ((u.isSelected || u.actionMenu &&
|
|
2329
|
-
|
|
2330
|
-
const
|
|
2451
|
+
if ((u.isSelected || u.actionMenu && He(u.actionMenu, ["actionMenu"], (E) => !!E.isSelected)) && (h.classList.add(s.MENU_ITEM__SELECTED), p.classList.add(s.MENU_ITEM__SELECTED)), u.actionMenu) {
|
|
2452
|
+
h.innerHTML = u.title, p.remove();
|
|
2453
|
+
const E = {
|
|
2331
2454
|
menuItems: u.actionMenu,
|
|
2332
2455
|
title: u.title
|
|
2333
|
-
}, g =
|
|
2334
|
-
|
|
2335
|
-
|
|
2456
|
+
}, g = at(
|
|
2457
|
+
E,
|
|
2458
|
+
h,
|
|
2336
2459
|
{
|
|
2337
2460
|
childrenMenuType: u.childrenMenuType || W.FLYOUT
|
|
2338
2461
|
}
|
|
2339
2462
|
);
|
|
2340
|
-
d.appendChild(g),
|
|
2341
|
-
let
|
|
2463
|
+
d.appendChild(g), Te(d, h, g, "menu", { shouldFocusOnHover: !0 });
|
|
2464
|
+
let A;
|
|
2342
2465
|
switch (u.childrenMenuType) {
|
|
2343
2466
|
case W.INLINE:
|
|
2344
|
-
|
|
2467
|
+
A = s.MENU_ITEM__INLINE;
|
|
2345
2468
|
break;
|
|
2346
2469
|
case W.MEGA_MENU:
|
|
2347
|
-
|
|
2470
|
+
A = s.MENU_ITEM__MEGA_MENU;
|
|
2348
2471
|
break;
|
|
2349
2472
|
case W.FLYOUT:
|
|
2350
2473
|
default:
|
|
2351
|
-
|
|
2474
|
+
A = s.MENU_ITEM__FLY_OUT;
|
|
2352
2475
|
break;
|
|
2353
2476
|
}
|
|
2354
|
-
d.classList.add(
|
|
2477
|
+
d.classList.add(A);
|
|
2355
2478
|
} else if (u.actionFunction)
|
|
2356
|
-
|
|
2479
|
+
h.innerHTML = u.title, h.onclick = u.actionFunction, p.remove();
|
|
2357
2480
|
else if (u.actionFunctionUrl)
|
|
2358
|
-
p.innerHTML = u.title, p.setAttribute("href", u.actionFunctionUrl.url), p.onclick = (
|
|
2359
|
-
var g,
|
|
2360
|
-
(g = u.actionFunctionUrl) != null && g.skipHandleEvent || (
|
|
2361
|
-
},
|
|
2481
|
+
p.innerHTML = u.title, p.setAttribute("href", u.actionFunctionUrl.url), p.onclick = (E) => {
|
|
2482
|
+
var g, A;
|
|
2483
|
+
(g = u.actionFunctionUrl) != null && g.skipHandleEvent || (E.stopPropagation(), E.preventDefault()), (A = u.actionFunctionUrl) == null || A.actionFunction(E);
|
|
2484
|
+
}, h.remove();
|
|
2362
2485
|
else if (u.actionUrl)
|
|
2363
|
-
p.innerHTML = u.title, p.setAttribute("href", u.actionUrl.url),
|
|
2486
|
+
p.innerHTML = u.title, p.setAttribute("href", u.actionUrl.url), h.remove();
|
|
2364
2487
|
else
|
|
2365
2488
|
throw new Error(`renderMainMenu(): menuItem is missing an action: ${u.title}`);
|
|
2366
|
-
((m = u.actionUrl) != null && m.openInNewTab || (
|
|
2489
|
+
((m = u.actionUrl) != null && m.openInNewTab || (v = u.actionFunctionUrl) != null && v.openInNewTab) && (p.setAttribute("target", "_blank"), p.appendChild(T(Qt)));
|
|
2367
2490
|
});
|
|
2368
2491
|
let c = null;
|
|
2369
2492
|
if (t.utahId) {
|
|
2370
|
-
const { button: u, menu: d } =
|
|
2493
|
+
const { button: u, menu: d } = mo();
|
|
2371
2494
|
c = d;
|
|
2372
|
-
const
|
|
2373
|
-
if (!
|
|
2495
|
+
const _ = e.querySelector(f(s.MOBILE__UTAH_ID));
|
|
2496
|
+
if (!_)
|
|
2374
2497
|
throw new Error("renderMainMenu: utahIdButtonWrapper not found");
|
|
2375
|
-
|
|
2498
|
+
_.appendChild(u);
|
|
2376
2499
|
}
|
|
2377
|
-
const a = e.querySelector(f(
|
|
2500
|
+
const a = e.querySelector(f(s.MAIN_MENU__SEARCH));
|
|
2378
2501
|
if (!a || !(a instanceof HTMLElement))
|
|
2379
2502
|
throw new Error("renderMainMenu: searchIcon not found");
|
|
2380
2503
|
if (t.onSearch) {
|
|
2381
|
-
if (
|
|
2504
|
+
if (Jt(a, "Search"), a.onclick)
|
|
2382
2505
|
throw new Error("searchIcon already has onclick");
|
|
2383
|
-
a.onclick = () =>
|
|
2384
|
-
var u;
|
|
2385
|
-
return (u = t.onSearch) == null ? void 0 : u.call(t, "Not yet implemented (UTAHDS-562)");
|
|
2386
|
-
};
|
|
2506
|
+
a.onclick = () => Po();
|
|
2387
2507
|
} else
|
|
2388
|
-
(
|
|
2508
|
+
(l = a.parentElement) == null || l.insertBefore(T('<div class="main-menu__search-placeholder">'), a), a.remove();
|
|
2389
2509
|
return { mainMenuWrapper: e, utahIdPopup: c };
|
|
2390
2510
|
}
|
|
2391
|
-
const
|
|
2511
|
+
const Lo = `<div class="utds-header-mobile-menu__content-item" role="tabpanel">
|
|
2392
2512
|
</div>
|
|
2393
2513
|
`;
|
|
2394
|
-
function
|
|
2395
|
-
const e = document.querySelector(f(
|
|
2514
|
+
function ct(t) {
|
|
2515
|
+
const e = document.querySelector(f(s.MOBILE_MENU__WRAPPER));
|
|
2396
2516
|
if (!e)
|
|
2397
2517
|
throw new Error("addMobileMenuContentItem: mobileMenuWrapper not found");
|
|
2398
|
-
const n = e.querySelector(f(
|
|
2518
|
+
const n = e.querySelector(f(s.MOBILE_MENU__CONTENT));
|
|
2399
2519
|
if (!n)
|
|
2400
2520
|
throw new Error("addMobileMenuContentItem: mobileContentWrapper not found");
|
|
2401
|
-
const r =
|
|
2402
|
-
return r.appendChild(t), n.appendChild(r), r.setAttribute("id",
|
|
2403
|
-
}
|
|
2404
|
-
function Ut(t, e) {
|
|
2405
|
-
t.querySelectorAll(f([
|
|
2406
|
-
l.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER
|
|
2407
|
-
])).forEach((n) => n.classList.remove(l.ACTION_ITEM__SELECTED)), e.classList.add(l.ACTION_ITEM__SELECTED);
|
|
2408
|
-
}
|
|
2409
|
-
function St(t, e) {
|
|
2410
|
-
t.querySelectorAll(f(l.MOBILE_MENU__CONTENT_ITEM)).forEach((n) => {
|
|
2411
|
-
const r = n.getAttribute("aria-labelledby");
|
|
2412
|
-
if (r) {
|
|
2413
|
-
const o = document.getElementById(r);
|
|
2414
|
-
o && o.setAttribute("aria-expanded", "false");
|
|
2415
|
-
}
|
|
2416
|
-
n.classList.remove(l.IS_OPEN);
|
|
2417
|
-
});
|
|
2418
|
-
{
|
|
2419
|
-
const n = e.getAttribute("aria-labelledby");
|
|
2420
|
-
if (n) {
|
|
2421
|
-
const r = document.getElementById(n);
|
|
2422
|
-
r && r.setAttribute("aria-expanded", "false");
|
|
2423
|
-
}
|
|
2424
|
-
e.classList.add(l.IS_OPEN);
|
|
2425
|
-
}
|
|
2521
|
+
const r = T(Lo);
|
|
2522
|
+
return r.appendChild(t), n.appendChild(r), r.setAttribute("id", H()), r;
|
|
2426
2523
|
}
|
|
2427
|
-
function
|
|
2524
|
+
function Xe(t, e) {
|
|
2525
|
+
t.querySelectorAll(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)).forEach((r) => {
|
|
2526
|
+
r.classList.remove(s.ACTION_ITEM__SELECTED);
|
|
2527
|
+
const o = r.querySelector("button");
|
|
2528
|
+
if (!o)
|
|
2529
|
+
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
2530
|
+
o.setAttribute("aria-selected", "false"), o.setAttribute("tabIndex", "-1");
|
|
2531
|
+
}), e.classList.add(s.ACTION_ITEM__SELECTED);
|
|
2532
|
+
const n = e.querySelector("button");
|
|
2533
|
+
if (!n)
|
|
2534
|
+
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
2535
|
+
n.setAttribute("aria-selected", "true"), n.removeAttribute("tabIndex"), n.focus();
|
|
2536
|
+
}
|
|
2537
|
+
function xt(t, e) {
|
|
2538
|
+
t.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach((n) => n.classList.remove(s.IS_OPEN)), e.classList.add(s.IS_OPEN);
|
|
2539
|
+
}
|
|
2540
|
+
function ut(t, e, n, {
|
|
2428
2541
|
ariaHasPopupType: r,
|
|
2429
2542
|
onClickHandler: o,
|
|
2430
2543
|
shouldOnClickCloseMenu: i
|
|
2431
2544
|
}) {
|
|
2545
|
+
var _;
|
|
2432
2546
|
if (e && !r)
|
|
2433
2547
|
throw new Error("mobileMenuInteractionHandler: there is content, but the aria type is not given");
|
|
2434
2548
|
const c = (
|
|
2435
2549
|
/** @type {HTMLElement} */
|
|
2436
|
-
document.querySelector(f(
|
|
2550
|
+
document.querySelector(f(s.MOBILE_MENU))
|
|
2437
2551
|
);
|
|
2438
2552
|
if (!c)
|
|
2439
2553
|
throw new Error("mobileMenuInteractionHandler: mobileMenu not found");
|
|
2440
2554
|
const a = (
|
|
2441
2555
|
/** @type {HTMLElement} */
|
|
2442
|
-
document.querySelector(f(
|
|
2556
|
+
document.querySelector(f(s.MOBILE_MENU__WRAPPER))
|
|
2443
2557
|
);
|
|
2444
2558
|
if (!a)
|
|
2445
2559
|
throw new Error("mobileMenuInteractionHandler: mobileMenuWrapper not found");
|
|
2446
|
-
const
|
|
2560
|
+
const l = (
|
|
2447
2561
|
/** @type {HTMLElement} */
|
|
2448
|
-
a.querySelector(f(
|
|
2562
|
+
a.querySelector(f(s.MOBILE_MENU__CONTENT))
|
|
2449
2563
|
);
|
|
2450
|
-
if (!
|
|
2564
|
+
if (!l)
|
|
2451
2565
|
throw new Error("mobileMenuInteractionHandler: mobileContentWrapper not found");
|
|
2452
|
-
const u = t.getAttribute("id");
|
|
2453
|
-
if (!
|
|
2566
|
+
const u = (_ = n == null ? void 0 : n.querySelector) == null ? void 0 : _.call(n, "button"), d = (u || t).getAttribute("id");
|
|
2567
|
+
if (!d)
|
|
2454
2568
|
throw new Error("mobileMenuInteractionHandler: interactiveElementId not found");
|
|
2455
2569
|
if (e) {
|
|
2456
|
-
const
|
|
2457
|
-
if (!
|
|
2570
|
+
const h = e.getAttribute("id");
|
|
2571
|
+
if (!h)
|
|
2458
2572
|
throw new Error("mobileMenuInteractionHandler: mobileMenuContentId not found");
|
|
2459
|
-
|
|
2573
|
+
(u || t).setAttribute("aria-controls", h), e.setAttribute("aria-labelledby", d);
|
|
2460
2574
|
}
|
|
2461
2575
|
if (t.onclick)
|
|
2462
2576
|
throw new Error("mobileMenuInteractionHandler: interactiveElement already has onclick");
|
|
2463
|
-
if (t.onclick = (
|
|
2464
|
-
o && o(
|
|
2577
|
+
if (t.onclick = (h) => {
|
|
2578
|
+
o && o(h) || (c.classList.contains(s.IS_OPEN) ? i && pt() : (Uo(), e && xt(l, e), Xe(a, n)));
|
|
2465
2579
|
}, e) {
|
|
2466
2580
|
if (n !== t && n.onclick)
|
|
2467
2581
|
throw new Error("mobileMenuInteractionHandler: actionItemWrapper already has onclick");
|
|
2468
|
-
n.onclick = (
|
|
2469
|
-
o && o(
|
|
2582
|
+
n.onclick = (h) => {
|
|
2583
|
+
o && o(h) || (xt(l, e), Xe(a, n));
|
|
2470
2584
|
};
|
|
2471
2585
|
}
|
|
2472
2586
|
}
|
|
2473
|
-
function
|
|
2587
|
+
function dt(t) {
|
|
2474
2588
|
const e = (
|
|
2475
2589
|
/** @type {HTMLElement} */
|
|
2476
|
-
document.querySelector(f(
|
|
2590
|
+
document.querySelector(f(s.MOBILE_MENU))
|
|
2477
2591
|
);
|
|
2478
2592
|
if (!e)
|
|
2479
2593
|
throw new Error(`${t}: mobileMenu not found`);
|
|
2480
|
-
const n = document.getElementById(
|
|
2594
|
+
const n = document.getElementById(s.MAIN_MENU__HAMBURGER_ID);
|
|
2481
2595
|
if (!n)
|
|
2482
2596
|
throw new Error(`${t}: hamburger not found (🍔 🎶 I will gladly pay you Tuesday for a hamburger today 🎵 🍔)`);
|
|
2483
2597
|
const r = (
|
|
2484
2598
|
/** @type {HTMLElement} */
|
|
2485
|
-
document.getElementById(
|
|
2599
|
+
document.getElementById(s.MAIN_MENU__HAMBURGER_ICON_ID)
|
|
2486
2600
|
);
|
|
2487
2601
|
if (!r)
|
|
2488
2602
|
throw new Error(`${t}: hamburgerIcon not found`);
|
|
@@ -2492,39 +2606,39 @@ function ct(t) {
|
|
|
2492
2606
|
mobileMenu: e
|
|
2493
2607
|
};
|
|
2494
2608
|
}
|
|
2495
|
-
function
|
|
2496
|
-
const { hamburger: t, hamburgerIcon: e, mobileMenu: n } =
|
|
2497
|
-
t.setAttribute("aria-expanded", "false"), n.classList.remove(
|
|
2609
|
+
function pt() {
|
|
2610
|
+
const { hamburger: t, hamburgerIcon: e, mobileMenu: n } = dt("hideMobileMenu");
|
|
2611
|
+
t.setAttribute("aria-expanded", "false"), n.classList.remove(s.IS_OPEN), e.classList.add("utds-icon-before-hamburger"), e.classList.remove("utds-icon-before-x-icon");
|
|
2498
2612
|
}
|
|
2499
|
-
function
|
|
2500
|
-
const { hamburger: t, hamburgerIcon: e, mobileMenu: n } =
|
|
2501
|
-
t.setAttribute("aria-expanded", "true"), n.classList.add(
|
|
2613
|
+
function Uo() {
|
|
2614
|
+
const { hamburger: t, hamburgerIcon: e, mobileMenu: n } = dt("showMobileMenu");
|
|
2615
|
+
t.setAttribute("aria-expanded", "true"), n.classList.add(s.IS_OPEN), e.classList.remove("utds-icon-before-hamburger"), e.classList.add("utds-icon-before-x-icon");
|
|
2502
2616
|
}
|
|
2503
|
-
function
|
|
2617
|
+
function So(t) {
|
|
2504
2618
|
var c;
|
|
2505
|
-
const { hamburger: e } =
|
|
2619
|
+
const { hamburger: e } = dt("hookupHamburger");
|
|
2506
2620
|
if ((c = N().actionItems) == null ? void 0 : c.some((a) => !!a.badge)) {
|
|
2507
|
-
const a =
|
|
2621
|
+
const a = st({ label: "Home Badge" });
|
|
2508
2622
|
a && e.appendChild(a);
|
|
2509
2623
|
}
|
|
2510
|
-
|
|
2511
|
-
const o = document.getElementById(
|
|
2624
|
+
pt();
|
|
2625
|
+
const o = document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID);
|
|
2512
2626
|
if (!o)
|
|
2513
2627
|
throw new Error("hookupHamburger: homeActionItem not found");
|
|
2514
2628
|
const i = (
|
|
2515
2629
|
/** @type {HTMLElement} */
|
|
2516
|
-
o.closest(f(
|
|
2630
|
+
o.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2517
2631
|
);
|
|
2518
2632
|
if (!i)
|
|
2519
2633
|
throw new Error("hookupHamburger: homeActionItemWrapper not found");
|
|
2520
|
-
|
|
2634
|
+
ut(
|
|
2521
2635
|
e,
|
|
2522
2636
|
t,
|
|
2523
2637
|
i,
|
|
2524
2638
|
{ ariaHasPopupType: "menu", shouldOnClickCloseMenu: !0 }
|
|
2525
2639
|
);
|
|
2526
2640
|
}
|
|
2527
|
-
function
|
|
2641
|
+
function Co(t) {
|
|
2528
2642
|
let e = NaN, n = null, r = null;
|
|
2529
2643
|
return {
|
|
2530
2644
|
promise: new Promise((i, c) => {
|
|
@@ -2540,26 +2654,26 @@ function Ao(t) {
|
|
|
2540
2654
|
}
|
|
2541
2655
|
};
|
|
2542
2656
|
}
|
|
2543
|
-
const
|
|
2657
|
+
const z = {
|
|
2544
2658
|
// null = not yet loaded, false = ajaxing, true = have a result (may be error or user data)
|
|
2545
2659
|
isDefinitive: null,
|
|
2546
2660
|
lastError: null,
|
|
2547
2661
|
userInfo: null
|
|
2548
2662
|
};
|
|
2549
|
-
function
|
|
2663
|
+
function Ht(t) {
|
|
2550
2664
|
var e, n, r;
|
|
2551
|
-
t.isDefinitive && (
|
|
2665
|
+
t.isDefinitive && (nn(t), (r = (n = (e = N()) == null ? void 0 : e.utahId) == null ? void 0 : n.onAuthChanged) == null || r.call(n, t));
|
|
2552
2666
|
}
|
|
2553
|
-
let
|
|
2554
|
-
const
|
|
2555
|
-
async function
|
|
2667
|
+
let Bt = !0;
|
|
2668
|
+
const Do = 500;
|
|
2669
|
+
async function an() {
|
|
2556
2670
|
var e, n;
|
|
2557
2671
|
let t = null;
|
|
2558
|
-
if (
|
|
2559
|
-
t = Promise.resolve(
|
|
2560
|
-
else if (
|
|
2561
|
-
t =
|
|
2562
|
-
|
|
2672
|
+
if (z.isDefinitive === !1)
|
|
2673
|
+
t = Promise.resolve(z);
|
|
2674
|
+
else if (Bt)
|
|
2675
|
+
t = Co(Do).promise.then(() => {
|
|
2676
|
+
Bt = !1, an();
|
|
2563
2677
|
});
|
|
2564
2678
|
else {
|
|
2565
2679
|
const r = N();
|
|
@@ -2570,16 +2684,16 @@ async function tn() {
|
|
|
2570
2684
|
userInfo: null
|
|
2571
2685
|
});
|
|
2572
2686
|
else if (r.utahId === !0 || ((e = r.utahId) == null ? void 0 : e.currentUser) === void 0)
|
|
2573
|
-
|
|
2687
|
+
z.isDefinitive = !1, t = fetch(Ae.USER_INFO, { credentials: "include" }).then((o) => o.json()).then((o) => {
|
|
2574
2688
|
if (o.status === 200)
|
|
2575
|
-
|
|
2689
|
+
z.lastError = null, z.userInfo = /** @type UserInfo */
|
|
2576
2690
|
o.data;
|
|
2577
2691
|
else
|
|
2578
2692
|
throw new Error(o.err);
|
|
2579
2693
|
}).catch((o) => {
|
|
2580
|
-
|
|
2694
|
+
z.lastError = o, z.userInfo = null;
|
|
2581
2695
|
}).finally(() => {
|
|
2582
|
-
|
|
2696
|
+
z.isDefinitive = !0, Ht(z);
|
|
2583
2697
|
});
|
|
2584
2698
|
else {
|
|
2585
2699
|
const o = {
|
|
@@ -2587,71 +2701,71 @@ async function tn() {
|
|
|
2587
2701
|
lastError: null,
|
|
2588
2702
|
userInfo: (n = r.utahId) == null ? void 0 : n.currentUser
|
|
2589
2703
|
};
|
|
2590
|
-
t = Promise.resolve(o),
|
|
2704
|
+
t = Promise.resolve(o), Ht(o);
|
|
2591
2705
|
}
|
|
2592
2706
|
}
|
|
2593
2707
|
return t;
|
|
2594
2708
|
}
|
|
2595
|
-
function
|
|
2596
|
-
return
|
|
2709
|
+
function Ro() {
|
|
2710
|
+
return z;
|
|
2597
2711
|
}
|
|
2598
|
-
function
|
|
2599
|
-
const t = document.getElementById(
|
|
2712
|
+
function xo() {
|
|
2713
|
+
const t = document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID);
|
|
2600
2714
|
if (!t)
|
|
2601
2715
|
throw new Error("removeUtahIdInMobileMenu: profileActionItem not found");
|
|
2602
2716
|
const e = (
|
|
2603
2717
|
/** @type {HTMLElement} */
|
|
2604
|
-
t.closest(f(
|
|
2718
|
+
t.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2605
2719
|
);
|
|
2606
2720
|
if (!e)
|
|
2607
2721
|
throw new Error("removeUtahIdInMobileMenu: profileActionItemWrapper not found");
|
|
2608
2722
|
e.remove();
|
|
2609
2723
|
}
|
|
2610
|
-
function
|
|
2611
|
-
const n = document.querySelector(f(
|
|
2724
|
+
function Ho(t, e) {
|
|
2725
|
+
const n = document.querySelector(f(s.MOBILE__UTAH_ID));
|
|
2612
2726
|
if (!n)
|
|
2613
2727
|
throw new Error("hookupUtahIdInMobileMenu: utahIdWrapper not found");
|
|
2614
2728
|
const r = (
|
|
2615
2729
|
/** @type {HTMLElement} */
|
|
2616
|
-
n.querySelector(f(
|
|
2730
|
+
n.querySelector(f(s.UTAH_ID__BUTTON))
|
|
2617
2731
|
);
|
|
2618
2732
|
if (!r)
|
|
2619
2733
|
throw new Error("hookupUtahIdInMobileMenu: utahIdButton not found");
|
|
2620
|
-
if (!t.querySelector(f(
|
|
2734
|
+
if (!t.querySelector(f(s.MOBILE_MENU__CONTENT)))
|
|
2621
2735
|
throw new Error("hookupUtahIdInMobileMenu: mobileContentWrapper not found");
|
|
2622
|
-
const i = document.getElementById(
|
|
2736
|
+
const i = document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID);
|
|
2623
2737
|
if (!i)
|
|
2624
2738
|
throw new Error("hookupUtahIdInMobileMenu: profileActionItem not found");
|
|
2625
2739
|
const c = (
|
|
2626
2740
|
/** @type {HTMLElement} */
|
|
2627
|
-
i.closest(f(
|
|
2741
|
+
i.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2628
2742
|
);
|
|
2629
2743
|
if (!c)
|
|
2630
2744
|
throw new Error("hookupHamburger: profileActionItemWrapper not found");
|
|
2631
|
-
const a =
|
|
2632
|
-
|
|
2745
|
+
const a = ct(e);
|
|
2746
|
+
ut(
|
|
2633
2747
|
r,
|
|
2634
2748
|
a,
|
|
2635
2749
|
c,
|
|
2636
2750
|
{
|
|
2637
2751
|
ariaHasPopupType: "menu",
|
|
2638
|
-
onClickHandler: (
|
|
2639
|
-
var
|
|
2640
|
-
const u =
|
|
2641
|
-
let
|
|
2642
|
-
if (!(u != null && u.isDefinitive) || !((
|
|
2643
|
-
|
|
2752
|
+
onClickHandler: (l) => {
|
|
2753
|
+
var h;
|
|
2754
|
+
const u = Ro(), d = N();
|
|
2755
|
+
let _ = !1;
|
|
2756
|
+
if (!(u != null && u.isDefinitive) || !((h = u == null ? void 0 : u.userInfo) != null && h.authenticated)) {
|
|
2757
|
+
_ = !0;
|
|
2644
2758
|
const p = d.utahId !== !1 && d.utahId !== !0 && d.utahId.onSignIn;
|
|
2645
|
-
p ? p(
|
|
2759
|
+
p ? p(l) : (l.preventDefault(), l.stopPropagation(), window.location.href = Ae.SIGN_IN);
|
|
2646
2760
|
}
|
|
2647
|
-
return
|
|
2761
|
+
return _;
|
|
2648
2762
|
},
|
|
2649
2763
|
shouldOnClickCloseMenu: !0
|
|
2650
2764
|
}
|
|
2651
2765
|
);
|
|
2652
2766
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
2767
|
+
function Bo() {
|
|
2768
|
+
return he(
|
|
2655
2769
|
N().mainMenu.menuItems,
|
|
2656
2770
|
{
|
|
2657
2771
|
childrenMenuType: W.INLINE,
|
|
@@ -2659,139 +2773,197 @@ function No() {
|
|
|
2659
2773
|
}
|
|
2660
2774
|
);
|
|
2661
2775
|
}
|
|
2662
|
-
const
|
|
2776
|
+
const ko = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
2663
2777
|
<button type="button" class="icon-button icon-button--borderless utds-header-action-item__icon-button">
|
|
2664
2778
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
2665
2779
|
<span aria-hidden="true" role="presentation">
|
|
2666
2780
|
</button>
|
|
2667
2781
|
<span class="menu-chiclet"></span>
|
|
2668
2782
|
</div>
|
|
2669
|
-
`,
|
|
2783
|
+
`, Wo = `<div class="utds-header-action-item-menu">
|
|
2670
2784
|
<div class="vertical-menu__wrapper-title"></div>
|
|
2671
2785
|
</div>
|
|
2672
2786
|
`;
|
|
2673
|
-
function
|
|
2674
|
-
const e =
|
|
2675
|
-
e.getAttribute("id") || e.setAttribute("id",
|
|
2787
|
+
function qo(t) {
|
|
2788
|
+
const e = T(ko);
|
|
2789
|
+
e.getAttribute("id") || e.setAttribute("id", H());
|
|
2676
2790
|
const n = document.createTextNode(t.title), r = (
|
|
2677
2791
|
/** @type {HTMLElement} */
|
|
2678
2792
|
e instanceof HTMLCollection ? e[0] : e
|
|
2679
2793
|
);
|
|
2680
|
-
t.showTitle && r.classList.add(
|
|
2681
|
-
const o = r.querySelector(f(
|
|
2794
|
+
t.showTitle && r.classList.add(s.ACTION_ITEM__ICON_BUTTON_TITLE), r.classList.add(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER), r.classList.remove(s.ACTION_ITEM);
|
|
2795
|
+
const o = r.querySelector(f(s.ACTION_ITEM__TITLE));
|
|
2682
2796
|
if (!o)
|
|
2683
2797
|
throw new Error("renderActionItem: titleDiv not found");
|
|
2684
|
-
|
|
2798
|
+
o.appendChild(n), t.showTitle ? o.classList.remove(s.VISUALLY_HIDDEN) : o.classList.add(s.VISUALLY_HIDDEN);
|
|
2685
2799
|
const i = (
|
|
2686
2800
|
/** @type {HTMLElement} */
|
|
2687
|
-
e.querySelector(f(
|
|
2801
|
+
e.querySelector(f(s.ACTION_ITEM__ICON_BUTTON))
|
|
2688
2802
|
);
|
|
2689
2803
|
if (!i)
|
|
2690
2804
|
throw new Error("renderActionItem: iconButton not found");
|
|
2691
2805
|
t.className && i.classList.add(t.className);
|
|
2692
|
-
const c =
|
|
2806
|
+
const c = st(t.badge);
|
|
2693
2807
|
c && i.appendChild(c);
|
|
2694
|
-
const a =
|
|
2695
|
-
a.setAttribute("role", "presentation"),
|
|
2696
|
-
let
|
|
2808
|
+
const a = T(t.icon);
|
|
2809
|
+
a.setAttribute("role", "presentation"), i.appendChild(a);
|
|
2810
|
+
let l = null;
|
|
2697
2811
|
if (t.actionFunction)
|
|
2698
2812
|
i.onclick = t.actionFunction;
|
|
2699
2813
|
else if (t.actionDom) {
|
|
2700
|
-
const u =
|
|
2701
|
-
i.setAttribute("id", u),
|
|
2814
|
+
const u = H();
|
|
2815
|
+
i.setAttribute("id", u), l = T(typeof t.actionDom == "function" ? t.actionDom() : t.actionDom);
|
|
2702
2816
|
} else if (t.actionPopupMenu) {
|
|
2703
|
-
const u =
|
|
2704
|
-
i.setAttribute("id", u),
|
|
2705
|
-
const d =
|
|
2817
|
+
const u = H();
|
|
2818
|
+
i.setAttribute("id", u), l = T(Wo);
|
|
2819
|
+
const d = l.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
2706
2820
|
if (!d)
|
|
2707
2821
|
throw new Error("renderMobileActionItem: actionItemContentTitle not found");
|
|
2708
2822
|
d.appendChild(document.createTextNode(t.actionPopupMenu.title));
|
|
2709
|
-
const
|
|
2710
|
-
|
|
2823
|
+
const _ = he(t.actionPopupMenu.menuItems, { childrenMenuType: W.INLINE });
|
|
2824
|
+
l.appendChild(_);
|
|
2711
2825
|
} else
|
|
2712
2826
|
throw console.error(t), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2713
|
-
return { actionItemElement: e, actionItemContent:
|
|
2827
|
+
return { actionItemElement: e, actionItemContent: l };
|
|
2714
2828
|
}
|
|
2715
|
-
function
|
|
2716
|
-
var
|
|
2717
|
-
const t = document.getElementById(
|
|
2829
|
+
function Vo() {
|
|
2830
|
+
var i, c, a;
|
|
2831
|
+
const t = document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID);
|
|
2718
2832
|
if (!t)
|
|
2719
2833
|
throw new Error("renderMobileActionItems: homeActionItem not found");
|
|
2720
2834
|
const e = (
|
|
2721
2835
|
/** @type {HTMLElement} */
|
|
2722
|
-
t.closest(f(
|
|
2836
|
+
t.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2723
2837
|
);
|
|
2724
2838
|
if (!e)
|
|
2725
2839
|
throw new Error("renderMobileActionItems: homeActionItemWrapper not found");
|
|
2726
|
-
const
|
|
2727
|
-
if (!n)
|
|
2728
|
-
throw new Error("renderMobileActionItems: profileActionItem not found");
|
|
2729
|
-
const r = (
|
|
2840
|
+
const r = !!N().utahId ? document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID) : null, o = (
|
|
2730
2841
|
/** @type {HTMLElement} */
|
|
2731
|
-
|
|
2842
|
+
(i = r == null ? void 0 : r.closest) == null ? void 0 : i.call(r, f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER))
|
|
2732
2843
|
);
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
let u;
|
|
2737
|
-
switch (c.mobileMenuLocation) {
|
|
2844
|
+
(a = (c = [...N().actionItems || []].reverse()) == null ? void 0 : c.map((l) => ({ actionItem: l, ...qo(l) }))) == null || a.forEach(({ actionItem: l, actionItemContent: u, actionItemElement: d }) => {
|
|
2845
|
+
let _;
|
|
2846
|
+
switch (l.mobileMenuLocation) {
|
|
2738
2847
|
case "left":
|
|
2739
|
-
|
|
2848
|
+
_ = e;
|
|
2740
2849
|
break;
|
|
2741
2850
|
case "none":
|
|
2742
|
-
|
|
2851
|
+
_ = null;
|
|
2743
2852
|
break;
|
|
2744
2853
|
case "right":
|
|
2745
2854
|
default:
|
|
2746
|
-
|
|
2855
|
+
_ = o || e;
|
|
2747
2856
|
break;
|
|
2748
2857
|
}
|
|
2749
|
-
if (
|
|
2750
|
-
const
|
|
2751
|
-
let
|
|
2752
|
-
|
|
2753
|
-
s,
|
|
2858
|
+
if (_ && (_.after(d), u)) {
|
|
2859
|
+
const h = ct(u);
|
|
2860
|
+
let p = null;
|
|
2861
|
+
l.actionDom ? p = "dialog" : l.actionPopupMenu && (p = "menu"), ut(
|
|
2754
2862
|
d,
|
|
2755
|
-
|
|
2756
|
-
|
|
2863
|
+
h,
|
|
2864
|
+
d,
|
|
2865
|
+
{ ariaHasPopupType: p, shouldOnClickCloseMenu: !1 }
|
|
2757
2866
|
);
|
|
2758
2867
|
}
|
|
2759
2868
|
});
|
|
2760
2869
|
}
|
|
2761
|
-
function
|
|
2762
|
-
const
|
|
2763
|
-
|
|
2764
|
-
|
|
2870
|
+
function Fo() {
|
|
2871
|
+
const e = [...document.querySelectorAll(`
|
|
2872
|
+
${f(s.MOBILE_MENU__ACTION_BAR)}
|
|
2873
|
+
${f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)}
|
|
2874
|
+
${f(s.ACTION_ITEM__ICON_BUTTON)}
|
|
2875
|
+
`)];
|
|
2876
|
+
e.forEach(
|
|
2877
|
+
(n) => {
|
|
2878
|
+
n.onkeydown = (r) => {
|
|
2879
|
+
(r.code === "Home" || r.code === "End" || r.code === "ArrowRight" || r.code === "ArrowLeft") && r.preventDefault();
|
|
2880
|
+
}, n.onkeyup = (r) => {
|
|
2881
|
+
const o = e.indexOf(n);
|
|
2882
|
+
let i = NaN;
|
|
2883
|
+
if (r.code === "Home" ? i = 0 : r.code === "End" ? i = e.length - 1 : r.code === "ArrowRight" ? i = (o + 1) % e.length : r.code === "ArrowLeft" && (i = (e.length + o - 1) % e.length), !Number.isNaN(i)) {
|
|
2884
|
+
r.preventDefault(), r.stopPropagation();
|
|
2885
|
+
const c = e[i], a = (
|
|
2886
|
+
/** @type {HTMLElement} */
|
|
2887
|
+
c.closest(
|
|
2888
|
+
f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)
|
|
2889
|
+
)
|
|
2890
|
+
);
|
|
2891
|
+
if (!a)
|
|
2892
|
+
throw new Error("hookupMobileActionItemKeyboarding: newWrapper not found... how in the blazes?!");
|
|
2893
|
+
const l = c.getAttribute("aria-controls");
|
|
2894
|
+
if (l && document.getElementById(l))
|
|
2895
|
+
c.click();
|
|
2896
|
+
else {
|
|
2897
|
+
const _ = (
|
|
2898
|
+
/** @type {HTMLElement} */
|
|
2899
|
+
document.querySelector(f(s.MOBILE_MENU__WRAPPER))
|
|
2900
|
+
);
|
|
2901
|
+
if (!_)
|
|
2902
|
+
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
2903
|
+
const h = (
|
|
2904
|
+
/** @type {HTMLElement} */
|
|
2905
|
+
_.querySelector(f(s.MOBILE_MENU__CONTENT))
|
|
2906
|
+
);
|
|
2907
|
+
if (!h)
|
|
2908
|
+
throw new Error("hookupMobileActionItemKeyboarding: mobileContentWrapper not found");
|
|
2909
|
+
h.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach((p) => p.classList.remove(s.IS_OPEN));
|
|
2910
|
+
}
|
|
2911
|
+
const d = (
|
|
2912
|
+
/** @type {HTMLElement} */
|
|
2913
|
+
document.querySelector(f(s.MOBILE_MENU__WRAPPER))
|
|
2914
|
+
);
|
|
2915
|
+
if (!d)
|
|
2916
|
+
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
2917
|
+
Xe(d, a);
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
}
|
|
2921
|
+
);
|
|
2765
2922
|
}
|
|
2766
|
-
function
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
const
|
|
2775
|
-
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2923
|
+
function Go() {
|
|
2924
|
+
const t = yn.replace(s.MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER, `${N().mediaSizes.tabletPortrait}px`).replace(s.MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER, `${N().mediaSizes.tabletLandscape}px`).replace(s.MEDIA_SIZE__MOBILE__PLACEHOLDER, `${N().mediaSizes.mobile}px`);
|
|
2925
|
+
let e = document.getElementById(s.CSS_HEADER_MEDIA_TAG_ID);
|
|
2926
|
+
e || (e = document.createElement("style"), e.id = s.CSS_HEADER_MEDIA_TAG_ID), e.innerHTML = t, document.body.appendChild(e);
|
|
2927
|
+
}
|
|
2928
|
+
function $o() {
|
|
2929
|
+
var e;
|
|
2930
|
+
if (!document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.HEADER]))) {
|
|
2931
|
+
const n = Ao();
|
|
2932
|
+
document.body.insertBefore(n, document.body.firstChild);
|
|
2933
|
+
const { mainMenuWrapper: r, utahIdPopup: o } = No();
|
|
2934
|
+
r && n.after(r);
|
|
2935
|
+
const i = T(Pn);
|
|
2936
|
+
n.after(i);
|
|
2937
|
+
const c = (
|
|
2938
|
+
/** @type {HTMLElement} */
|
|
2939
|
+
document.querySelector(f(s.MOBILE_MENU__BACKDROP))
|
|
2940
|
+
);
|
|
2941
|
+
if (!c)
|
|
2942
|
+
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop not found");
|
|
2943
|
+
if (c.onclick)
|
|
2944
|
+
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop already has onclick");
|
|
2945
|
+
c.onclick = () => pt();
|
|
2946
|
+
const a = Bo(), l = tn(a, "Main Menu");
|
|
2947
|
+
l.appendChild(a);
|
|
2948
|
+
const u = ct(l);
|
|
2949
|
+
So(u), o ? ((e = o.closest("div")) == null || e.removeAttribute("aria-labelledby"), Ho(i, o)) : xo(), Vo(), Fo(), Jr(), Go(), an();
|
|
2778
2950
|
}
|
|
2779
2951
|
}
|
|
2780
|
-
function
|
|
2952
|
+
function jo(t) {
|
|
2781
2953
|
var e, n, r;
|
|
2782
|
-
(e = document.querySelector(f([
|
|
2954
|
+
(e = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.HEADER]))) == null || e.remove(), (n = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MAIN_MENU__OUTER]))) == null || n.remove(), (r = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MOBILE_MENU]))) == null || r.remove(), Xt(), t && setTimeout(() => document.dispatchEvent(new Event(kt.HEADER_UNLOADED)), 0);
|
|
2783
2955
|
}
|
|
2784
|
-
const
|
|
2785
|
-
console.log(`Utah Header v${
|
|
2956
|
+
const Yo = On.version.replace(/\./g, "");
|
|
2957
|
+
console.log(`Utah Header v${Yo}`);
|
|
2786
2958
|
export {
|
|
2787
|
-
|
|
2959
|
+
Cn as baseSettings,
|
|
2788
2960
|
W as childrenMenuTypes,
|
|
2789
|
-
|
|
2961
|
+
kt as events,
|
|
2790
2962
|
N as getUtahHeaderSettings,
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2963
|
+
$o as loadHeader,
|
|
2964
|
+
Qe as popupPlacement,
|
|
2965
|
+
jo as removeHeader,
|
|
2966
|
+
T as renderDOMSingle,
|
|
2967
|
+
zo as setUtahHeaderSettings,
|
|
2968
|
+
ce as sizes
|
|
2797
2969
|
};
|