@utahdts/utah-design-system-header 0.9.5 → 1.0.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/README.md +5 -5
- package/dist/style.css +1 -1
- package/dist/utah-design-system-header.es.js +352 -342
- package/dist/utah-design-system-header.umd.js +30 -30
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const j = {
|
|
2
2
|
FLYOUT: (
|
|
3
3
|
/** @type {ChildrenMenuType} */
|
|
4
4
|
"flyout"
|
|
@@ -250,7 +250,7 @@ const a = {
|
|
|
250
250
|
UTAH_ID: "utds-utah-id-wrapper",
|
|
251
251
|
UTAH_ID__BUTTON: "utds-utah-id__button"
|
|
252
252
|
};
|
|
253
|
-
function
|
|
253
|
+
function J(e, t) {
|
|
254
254
|
if (e)
|
|
255
255
|
throw new Error(t);
|
|
256
256
|
}
|
|
@@ -259,16 +259,16 @@ function O(e, t) {
|
|
|
259
259
|
throw new Error(t);
|
|
260
260
|
return e;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Ot(e) {
|
|
263
263
|
return typeof e == "string" || e instanceof String;
|
|
264
264
|
}
|
|
265
265
|
function In(e) {
|
|
266
266
|
const t = new DOMParser();
|
|
267
267
|
let n;
|
|
268
|
-
if (
|
|
268
|
+
if (Ot(e)) {
|
|
269
269
|
const o = (
|
|
270
270
|
/** @type {Document} */
|
|
271
|
-
|
|
271
|
+
Ot(e) ? t.parseFromString(e, "text/html") : e
|
|
272
272
|
), r = o.body.children.length > 1 ? o.body.children : o.body.children.item(0);
|
|
273
273
|
if (!r)
|
|
274
274
|
throw console.error(e), new Error("renderDOM: nothing rendered");
|
|
@@ -294,7 +294,7 @@ function I(e) {
|
|
|
294
294
|
throw console.error(e), new Error("renderDOMSingle: nothing rendered");
|
|
295
295
|
return n;
|
|
296
296
|
}
|
|
297
|
-
const
|
|
297
|
+
const Ze = {
|
|
298
298
|
onSearch: !1,
|
|
299
299
|
mainMenu: !1,
|
|
300
300
|
mediaSizes: {
|
|
@@ -314,13 +314,13 @@ function Tn(e) {
|
|
|
314
314
|
}
|
|
315
315
|
class gn {
|
|
316
316
|
constructor() {
|
|
317
|
-
this.settings = { ...
|
|
317
|
+
this.settings = { ...Ze };
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
320
320
|
* @param {SettingsInput} settings
|
|
321
321
|
*/
|
|
322
322
|
setSettings(t) {
|
|
323
|
-
const n = { ...
|
|
323
|
+
const n = { ...Ze, ...this.settings, ...t };
|
|
324
324
|
Tn(n), this.settings = n;
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
@@ -330,21 +330,21 @@ class gn {
|
|
|
330
330
|
return this.settings;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
|
-
const
|
|
333
|
+
const ke = new gn();
|
|
334
334
|
function L() {
|
|
335
|
-
return
|
|
335
|
+
return ke.getSettings();
|
|
336
336
|
}
|
|
337
337
|
const Mn = `<div class="utds-header-mobile-menu__content-item" role="tabpanel">
|
|
338
338
|
</div>
|
|
339
339
|
`;
|
|
340
|
-
function
|
|
340
|
+
function R() {
|
|
341
341
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(
|
|
342
342
|
/[018]/g,
|
|
343
343
|
// eslint-disable-next-line no-bitwise
|
|
344
344
|
(e) => (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> e) / 4).toString(16)
|
|
345
345
|
);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function ot(e) {
|
|
348
348
|
const t = document.querySelector(p(a.MOBILE_MENU__WRAPPER));
|
|
349
349
|
if (!t)
|
|
350
350
|
throw new Error("addMobileMenuContentItem: mobileMenuWrapper not found");
|
|
@@ -352,9 +352,9 @@ function nt(e) {
|
|
|
352
352
|
if (!n)
|
|
353
353
|
throw new Error("addMobileMenuContentItem: mobileContentWrapper not found");
|
|
354
354
|
const o = I(Mn);
|
|
355
|
-
return o.appendChild(e), n.appendChild(o), o.setAttribute("id",
|
|
355
|
+
return o.appendChild(e), n.appendChild(o), o.setAttribute("id", R()), o;
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Z(e) {
|
|
358
358
|
return typeof e == "function" ? e() : e;
|
|
359
359
|
}
|
|
360
360
|
function we(e) {
|
|
@@ -380,7 +380,7 @@ function we(e) {
|
|
|
380
380
|
mobileMenu: t
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function Ve() {
|
|
384
384
|
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } = we("hideMobileMenu");
|
|
385
385
|
e.setAttribute("aria-expanded", "false"), n.classList.remove(a.IS_OPEN), e.setAttribute("aria-label", "Open the mobile menu"), t.classList.add("utds-icon-before-hamburger"), t.classList.remove("utds-icon-before-x-icon");
|
|
386
386
|
}
|
|
@@ -391,7 +391,7 @@ function An() {
|
|
|
391
391
|
const { hamburger: t, hamburgerIcon: n, mobileMenu: o } = we("showMobileMenu");
|
|
392
392
|
t.setAttribute("aria-expanded", "true"), o.classList.add(a.IS_OPEN), t.setAttribute("aria-label", "Close the mobile menu"), n.classList.remove("utds-icon-before-hamburger"), n.classList.add("utds-icon-before-x-icon");
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function Xe(e, t) {
|
|
395
395
|
e.querySelectorAll(p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)).forEach((o) => {
|
|
396
396
|
o.classList.remove(a.ACTION_ITEM__SELECTED);
|
|
397
397
|
const r = o.querySelector("button");
|
|
@@ -407,7 +407,7 @@ function Ze(e, t) {
|
|
|
407
407
|
function Lt(e, t) {
|
|
408
408
|
e.querySelectorAll(p(a.MOBILE_MENU__CONTENT_ITEM)).forEach((n) => n.classList.remove(a.IS_OPEN)), t.classList.add(a.IS_OPEN);
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function rt(e, t, n, {
|
|
411
411
|
ariaHasPopupType: o,
|
|
412
412
|
additionalOnClick: r,
|
|
413
413
|
onClickHandler: i,
|
|
@@ -434,16 +434,16 @@ function ot(e, t, n, {
|
|
|
434
434
|
);
|
|
435
435
|
if (!c)
|
|
436
436
|
throw new Error("mobileMenuInteractionHandler: mobileContentWrapper not found");
|
|
437
|
-
const d =
|
|
437
|
+
const d = Z(n), m = (_ = (h = Z(n)) == null ? void 0 : h.querySelector) == null ? void 0 : _.call(h, "button"), f = (m || e).getAttribute("id");
|
|
438
438
|
if (!f)
|
|
439
439
|
throw new Error("mobileMenuInteractionHandler: interactiveElementId not found");
|
|
440
440
|
if (t) {
|
|
441
|
-
const E =
|
|
441
|
+
const E = Z(t);
|
|
442
442
|
if (E) {
|
|
443
|
-
const
|
|
444
|
-
if (!
|
|
443
|
+
const v = E.getAttribute("id");
|
|
444
|
+
if (!v)
|
|
445
445
|
throw new Error("mobileMenuInteractionHandler: mobileMenuContentId not found");
|
|
446
|
-
(m || e).setAttribute("aria-controls",
|
|
446
|
+
(m || e).setAttribute("aria-controls", v), E.setAttribute("aria-labelledby", f);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
449
|
if (e.onclick)
|
|
@@ -451,19 +451,19 @@ function ot(e, t, n, {
|
|
|
451
451
|
if (e.onclick = (E) => {
|
|
452
452
|
if (!(i != null && i(E)))
|
|
453
453
|
if (r == null || r(E), s.classList.contains(a.IS_OPEN))
|
|
454
|
-
u &&
|
|
454
|
+
u && Ve();
|
|
455
455
|
else {
|
|
456
456
|
An();
|
|
457
|
-
const
|
|
458
|
-
|
|
457
|
+
const T = Z(t);
|
|
458
|
+
T && Lt(c, T), Xe(l, Z(n));
|
|
459
459
|
}
|
|
460
460
|
}, t) {
|
|
461
461
|
if (d !== e && d.onclick)
|
|
462
462
|
throw new Error("mobileMenuInteractionHandler: actionItemWrapperValue already has onclick");
|
|
463
463
|
d.onclick = (E) => {
|
|
464
464
|
if (!(i != null && i(E))) {
|
|
465
|
-
const
|
|
466
|
-
|
|
465
|
+
const v = Z(t);
|
|
466
|
+
v && Lt(c, v), Xe(l, Z(n));
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
469
|
}
|
|
@@ -496,7 +496,7 @@ const wn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
496
496
|
</span>
|
|
497
497
|
<span class="vertical-menu__divider" />
|
|
498
498
|
</li>
|
|
499
|
-
`,
|
|
499
|
+
`, it = {
|
|
500
500
|
AUTO: (
|
|
501
501
|
/** @type {PopupPlacement} */
|
|
502
502
|
"auto"
|
|
@@ -558,20 +558,20 @@ const wn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
558
558
|
"top-end"
|
|
559
559
|
)
|
|
560
560
|
};
|
|
561
|
-
function
|
|
561
|
+
function Fe(e, t, n) {
|
|
562
562
|
var r;
|
|
563
563
|
let o = !1;
|
|
564
|
-
return e && (Array.isArray(e) ? o = e.some((i) =>
|
|
564
|
+
return e && (Array.isArray(e) ? o = e.some((i) => Fe(i, t, n)) : (o = n(e), o || (o = !!((r = t == null ? void 0 : t.filter((i) => e[i])) != null && r.some((i) => Fe(e[i], t, n)))))), o;
|
|
565
565
|
}
|
|
566
|
-
var
|
|
566
|
+
var F = "top", z = "bottom", Y = "right", q = "left", at = "auto", Ne = [F, z, Y, q], de = "start", Oe = "end", Nn = "clippingParents", zt = "viewport", ve = "popper", Sn = "reference", yt = /* @__PURE__ */ Ne.reduce(function(e, t) {
|
|
567
567
|
return e.concat([t + "-" + de, t + "-" + Oe]);
|
|
568
|
-
}, []), Yt = /* @__PURE__ */ [].concat(Ne, [
|
|
568
|
+
}, []), Yt = /* @__PURE__ */ [].concat(Ne, [at]).reduce(function(e, t) {
|
|
569
569
|
return e.concat([t, t + "-" + de, t + "-" + Oe]);
|
|
570
570
|
}, []), Un = "beforeRead", Cn = "read", Rn = "afterRead", Dn = "beforeMain", Bn = "main", Hn = "afterMain", xn = "beforeWrite", Wn = "write", kn = "afterWrite", Fn = [Un, Cn, Rn, Dn, Bn, Hn, xn, Wn, kn];
|
|
571
|
-
function
|
|
571
|
+
function Q(e) {
|
|
572
572
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
574
|
+
function $(e) {
|
|
575
575
|
if (e == null)
|
|
576
576
|
return window;
|
|
577
577
|
if (e.toString() !== "[object Window]") {
|
|
@@ -581,24 +581,24 @@ function F(e) {
|
|
|
581
581
|
return e;
|
|
582
582
|
}
|
|
583
583
|
function le(e) {
|
|
584
|
-
var t =
|
|
584
|
+
var t = $(e).Element;
|
|
585
585
|
return e instanceof t || e instanceof Element;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
588
|
-
var t =
|
|
587
|
+
function G(e) {
|
|
588
|
+
var t = $(e).HTMLElement;
|
|
589
589
|
return e instanceof t || e instanceof HTMLElement;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function st(e) {
|
|
592
592
|
if (typeof ShadowRoot > "u")
|
|
593
593
|
return !1;
|
|
594
|
-
var t =
|
|
594
|
+
var t = $(e).ShadowRoot;
|
|
595
595
|
return e instanceof t || e instanceof ShadowRoot;
|
|
596
596
|
}
|
|
597
597
|
function qn(e) {
|
|
598
598
|
var t = e.state;
|
|
599
599
|
Object.keys(t.elements).forEach(function(n) {
|
|
600
600
|
var o = t.styles[n] || {}, r = t.attributes[n] || {}, i = t.elements[n];
|
|
601
|
-
!
|
|
601
|
+
!G(i) || !Q(i) || (Object.assign(i.style, o), Object.keys(r).forEach(function(u) {
|
|
602
602
|
var s = r[u];
|
|
603
603
|
s === !1 ? i.removeAttribute(u) : i.setAttribute(u, s === !0 ? "" : s);
|
|
604
604
|
}));
|
|
@@ -622,7 +622,7 @@ function Vn(e) {
|
|
|
622
622
|
var r = t.elements[o], i = t.attributes[o] || {}, u = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : n[o]), s = u.reduce(function(l, c) {
|
|
623
623
|
return l[c] = "", l;
|
|
624
624
|
}, {});
|
|
625
|
-
!
|
|
625
|
+
!G(r) || !Q(r) || (Object.assign(r.style, s), Object.keys(i).forEach(function(l) {
|
|
626
626
|
r.removeAttribute(l);
|
|
627
627
|
}));
|
|
628
628
|
});
|
|
@@ -636,24 +636,24 @@ const $n = {
|
|
|
636
636
|
effect: Vn,
|
|
637
637
|
requires: ["computeStyles"]
|
|
638
638
|
};
|
|
639
|
-
function
|
|
639
|
+
function X(e) {
|
|
640
640
|
return e.split("-")[0];
|
|
641
641
|
}
|
|
642
|
-
var se = Math.max,
|
|
643
|
-
function
|
|
642
|
+
var se = Math.max, qe = Math.min, pe = Math.round;
|
|
643
|
+
function Qe() {
|
|
644
644
|
var e = navigator.userAgentData;
|
|
645
645
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
646
646
|
return t.brand + "/" + t.version;
|
|
647
647
|
}).join(" ") : navigator.userAgent;
|
|
648
648
|
}
|
|
649
649
|
function Kt() {
|
|
650
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
650
|
+
return !/^((?!chrome|android).)*safari/i.test(Qe());
|
|
651
651
|
}
|
|
652
652
|
function fe(e, t, n) {
|
|
653
653
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
654
654
|
var o = e.getBoundingClientRect(), r = 1, i = 1;
|
|
655
|
-
t &&
|
|
656
|
-
var u = le(e) ?
|
|
655
|
+
t && G(e) && (r = e.offsetWidth > 0 && pe(o.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && pe(o.height) / e.offsetHeight || 1);
|
|
656
|
+
var u = le(e) ? $(e) : window, s = u.visualViewport, l = !Kt() && n, c = (o.left + (l && s ? s.offsetLeft : 0)) / r, d = (o.top + (l && s ? s.offsetTop : 0)) / i, m = o.width / r, f = o.height / i;
|
|
657
657
|
return {
|
|
658
658
|
width: m,
|
|
659
659
|
height: f,
|
|
@@ -665,7 +665,7 @@ function fe(e, t, n) {
|
|
|
665
665
|
y: d
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function lt(e) {
|
|
669
669
|
var t = fe(e), n = e.offsetWidth, o = e.offsetHeight;
|
|
670
670
|
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
671
671
|
x: e.offsetLeft,
|
|
@@ -678,7 +678,7 @@ function jt(e, t) {
|
|
|
678
678
|
var n = t.getRootNode && t.getRootNode();
|
|
679
679
|
if (e.contains(t))
|
|
680
680
|
return !0;
|
|
681
|
-
if (n &&
|
|
681
|
+
if (n && st(n)) {
|
|
682
682
|
var o = t;
|
|
683
683
|
do {
|
|
684
684
|
if (o && e.isSameNode(o))
|
|
@@ -688,44 +688,44 @@ function jt(e, t) {
|
|
|
688
688
|
}
|
|
689
689
|
return !1;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
691
|
+
function ee(e) {
|
|
692
|
+
return $(e).getComputedStyle(e);
|
|
693
693
|
}
|
|
694
694
|
function Gn(e) {
|
|
695
|
-
return ["table", "td", "th"].indexOf(
|
|
695
|
+
return ["table", "td", "th"].indexOf(Q(e)) >= 0;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function oe(e) {
|
|
698
698
|
return ((le(e) ? e.ownerDocument : (
|
|
699
699
|
// $FlowFixMe[prop-missing]
|
|
700
700
|
e.document
|
|
701
701
|
)) || window.document).documentElement;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
return
|
|
703
|
+
function $e(e) {
|
|
704
|
+
return Q(e) === "html" ? e : (
|
|
705
705
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
706
706
|
// $FlowFixMe[incompatible-return]
|
|
707
707
|
// $FlowFixMe[prop-missing]
|
|
708
708
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
709
709
|
e.parentNode || // DOM Element detected
|
|
710
|
-
(
|
|
710
|
+
(st(e) ? e.host : null) || // ShadowRoot detected
|
|
711
711
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
712
|
-
|
|
712
|
+
oe(e)
|
|
713
713
|
);
|
|
714
714
|
}
|
|
715
715
|
function Pt(e) {
|
|
716
|
-
return !
|
|
717
|
-
|
|
716
|
+
return !G(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
717
|
+
ee(e).position === "fixed" ? null : e.offsetParent;
|
|
718
718
|
}
|
|
719
719
|
function zn(e) {
|
|
720
|
-
var t = /firefox/i.test(
|
|
721
|
-
if (n &&
|
|
722
|
-
var o =
|
|
720
|
+
var t = /firefox/i.test(Qe()), n = /Trident/i.test(Qe());
|
|
721
|
+
if (n && G(e)) {
|
|
722
|
+
var o = ee(e);
|
|
723
723
|
if (o.position === "fixed")
|
|
724
724
|
return null;
|
|
725
725
|
}
|
|
726
|
-
var r =
|
|
727
|
-
for (
|
|
728
|
-
var i =
|
|
726
|
+
var r = $e(e);
|
|
727
|
+
for (st(r) && (r = r.host); G(r) && ["html", "body"].indexOf(Q(r)) < 0; ) {
|
|
728
|
+
var i = ee(r);
|
|
729
729
|
if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
|
|
730
730
|
return r;
|
|
731
731
|
r = r.parentNode;
|
|
@@ -733,15 +733,15 @@ function zn(e) {
|
|
|
733
733
|
return null;
|
|
734
734
|
}
|
|
735
735
|
function Se(e) {
|
|
736
|
-
for (var t =
|
|
736
|
+
for (var t = $(e), n = Pt(e); n && Gn(n) && ee(n).position === "static"; )
|
|
737
737
|
n = Pt(n);
|
|
738
|
-
return n && (
|
|
738
|
+
return n && (Q(n) === "html" || Q(n) === "body" && ee(n).position === "static") ? t : n || zn(e) || t;
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function ct(e) {
|
|
741
741
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
742
742
|
}
|
|
743
743
|
function ge(e, t, n) {
|
|
744
|
-
return se(e,
|
|
744
|
+
return se(e, qe(t, n));
|
|
745
745
|
}
|
|
746
746
|
function Yn(e, t, n) {
|
|
747
747
|
var o = ge(e, t, n);
|
|
@@ -758,7 +758,7 @@ function Zt() {
|
|
|
758
758
|
function Xt(e) {
|
|
759
759
|
return Object.assign({}, Zt(), e);
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function Qt(e, t) {
|
|
762
762
|
return t.reduce(function(n, o) {
|
|
763
763
|
return n[o] = e, n;
|
|
764
764
|
}, {});
|
|
@@ -766,13 +766,13 @@ function Jt(e, t) {
|
|
|
766
766
|
var Kn = function(t, n) {
|
|
767
767
|
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
|
768
768
|
placement: n.placement
|
|
769
|
-
})) : t, Xt(typeof t != "number" ? t :
|
|
769
|
+
})) : t, Xt(typeof t != "number" ? t : Qt(t, Ne));
|
|
770
770
|
};
|
|
771
771
|
function jn(e) {
|
|
772
|
-
var t, n = e.state, o = e.name, r = e.options, i = n.elements.arrow, u = n.modifiersData.popperOffsets, s =
|
|
772
|
+
var t, n = e.state, o = e.name, r = e.options, i = n.elements.arrow, u = n.modifiersData.popperOffsets, s = X(n.placement), l = ct(s), c = [q, Y].indexOf(s) >= 0, d = c ? "height" : "width";
|
|
773
773
|
if (!(!i || !u)) {
|
|
774
|
-
var m = Kn(r.padding, n), f =
|
|
775
|
-
n.modifiersData[o] = (t = {}, t[
|
|
774
|
+
var m = Kn(r.padding, n), f = lt(i), h = l === "y" ? F : q, _ = l === "y" ? z : Y, E = n.rects.reference[d] + n.rects.reference[l] - u[l] - n.rects.popper[d], v = u[l] - n.rects.reference[l], T = Se(i), g = T ? l === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, w = E / 2 - v / 2, b = m[h], A = g - f[d] - m[_], M = g / 2 - f[d] / 2 + w, P = ge(b, M, A), U = l;
|
|
775
|
+
n.modifiersData[o] = (t = {}, t[U] = P, t.centerOffset = P - M, t);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
function Zn(e) {
|
|
@@ -791,13 +791,13 @@ const Xn = {
|
|
|
791
791
|
function _e(e) {
|
|
792
792
|
return e.split("-")[1];
|
|
793
793
|
}
|
|
794
|
-
var
|
|
794
|
+
var Qn = {
|
|
795
795
|
top: "auto",
|
|
796
796
|
right: "auto",
|
|
797
797
|
bottom: "auto",
|
|
798
798
|
left: "auto"
|
|
799
799
|
};
|
|
800
|
-
function
|
|
800
|
+
function Jn(e, t) {
|
|
801
801
|
var n = e.x, o = e.y, r = t.devicePixelRatio || 1;
|
|
802
802
|
return {
|
|
803
803
|
x: pe(n * r) / r || 0,
|
|
@@ -805,52 +805,52 @@ function Qn(e, t) {
|
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
807
|
function Nt(e) {
|
|
808
|
-
var t, n = e.popper, o = e.popperRect, r = e.placement, i = e.variation, u = e.offsets, s = e.position, l = e.gpuAcceleration, c = e.adaptive, d = e.roundOffsets, m = e.isFixed, f = u.x, h = f === void 0 ? 0 : f, _ = u.y, E = _ === void 0 ? 0 : _,
|
|
808
|
+
var t, n = e.popper, o = e.popperRect, r = e.placement, i = e.variation, u = e.offsets, s = e.position, l = e.gpuAcceleration, c = e.adaptive, d = e.roundOffsets, m = e.isFixed, f = u.x, h = f === void 0 ? 0 : f, _ = u.y, E = _ === void 0 ? 0 : _, v = typeof d == "function" ? d({
|
|
809
809
|
x: h,
|
|
810
810
|
y: E
|
|
811
811
|
}) : {
|
|
812
812
|
x: h,
|
|
813
813
|
y: E
|
|
814
814
|
};
|
|
815
|
-
h =
|
|
816
|
-
var
|
|
815
|
+
h = v.x, E = v.y;
|
|
816
|
+
var T = u.hasOwnProperty("x"), g = u.hasOwnProperty("y"), w = q, b = F, A = window;
|
|
817
817
|
if (c) {
|
|
818
|
-
var
|
|
819
|
-
if (
|
|
820
|
-
|
|
821
|
-
var S = m &&
|
|
818
|
+
var M = Se(n), P = "clientHeight", U = "clientWidth";
|
|
819
|
+
if (M === $(n) && (M = oe(n), ee(M).position !== "static" && s === "absolute" && (P = "scrollHeight", U = "scrollWidth")), M = M, r === F || (r === q || r === Y) && i === Oe) {
|
|
820
|
+
b = z;
|
|
821
|
+
var S = m && M === A && A.visualViewport ? A.visualViewport.height : (
|
|
822
822
|
// $FlowFixMe[prop-missing]
|
|
823
|
-
|
|
823
|
+
M[P]
|
|
824
824
|
);
|
|
825
825
|
E -= S - o.height, E *= l ? 1 : -1;
|
|
826
826
|
}
|
|
827
|
-
if (r ===
|
|
828
|
-
w =
|
|
829
|
-
var N = m &&
|
|
827
|
+
if (r === q || (r === F || r === z) && i === Oe) {
|
|
828
|
+
w = Y;
|
|
829
|
+
var N = m && M === A && A.visualViewport ? A.visualViewport.width : (
|
|
830
830
|
// $FlowFixMe[prop-missing]
|
|
831
|
-
|
|
831
|
+
M[U]
|
|
832
832
|
);
|
|
833
833
|
h -= N - o.width, h *= l ? 1 : -1;
|
|
834
834
|
}
|
|
835
835
|
}
|
|
836
|
-
var
|
|
836
|
+
var C = Object.assign({
|
|
837
837
|
position: s
|
|
838
|
-
}, c &&
|
|
838
|
+
}, c && Qn), k = d === !0 ? Jn({
|
|
839
839
|
x: h,
|
|
840
840
|
y: E
|
|
841
|
-
},
|
|
841
|
+
}, $(n)) : {
|
|
842
842
|
x: h,
|
|
843
843
|
y: E
|
|
844
844
|
};
|
|
845
|
-
if (h =
|
|
845
|
+
if (h = k.x, E = k.y, l) {
|
|
846
846
|
var D;
|
|
847
|
-
return Object.assign({},
|
|
847
|
+
return Object.assign({}, C, (D = {}, D[b] = g ? "0" : "", D[w] = T ? "0" : "", D.transform = (A.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + E + "px)" : "translate3d(" + h + "px, " + E + "px, 0)", D));
|
|
848
848
|
}
|
|
849
|
-
return Object.assign({},
|
|
849
|
+
return Object.assign({}, C, (t = {}, t[b] = g ? E + "px" : "", t[w] = T ? h + "px" : "", t.transform = "", t));
|
|
850
850
|
}
|
|
851
851
|
function eo(e) {
|
|
852
852
|
var t = e.state, n = e.options, o = n.gpuAcceleration, r = o === void 0 ? !0 : o, i = n.adaptive, u = i === void 0 ? !0 : i, s = n.roundOffsets, l = s === void 0 ? !0 : s, c = {
|
|
853
|
-
placement:
|
|
853
|
+
placement: X(t.placement),
|
|
854
854
|
variation: _e(t.placement),
|
|
855
855
|
popper: t.elements.popper,
|
|
856
856
|
popperRect: t.rects.popper,
|
|
@@ -882,7 +882,7 @@ var He = {
|
|
|
882
882
|
passive: !0
|
|
883
883
|
};
|
|
884
884
|
function no(e) {
|
|
885
|
-
var t = e.state, n = e.instance, o = e.options, r = o.scroll, i = r === void 0 ? !0 : r, u = o.resize, s = u === void 0 ? !0 : u, l =
|
|
885
|
+
var t = e.state, n = e.instance, o = e.options, r = o.scroll, i = r === void 0 ? !0 : r, u = o.resize, s = u === void 0 ? !0 : u, l = $(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
886
886
|
return i && c.forEach(function(d) {
|
|
887
887
|
d.addEventListener("scroll", n.update, He);
|
|
888
888
|
}), s && l.addEventListener("resize", n.update, He), function() {
|
|
@@ -920,18 +920,18 @@ function St(e) {
|
|
|
920
920
|
return io[t];
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
|
-
function
|
|
924
|
-
var t =
|
|
923
|
+
function ut(e) {
|
|
924
|
+
var t = $(e), n = t.pageXOffset, o = t.pageYOffset;
|
|
925
925
|
return {
|
|
926
926
|
scrollLeft: n,
|
|
927
927
|
scrollTop: o
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
-
function
|
|
931
|
-
return fe(
|
|
930
|
+
function dt(e) {
|
|
931
|
+
return fe(oe(e)).left + ut(e).scrollLeft;
|
|
932
932
|
}
|
|
933
933
|
function ao(e, t) {
|
|
934
|
-
var n =
|
|
934
|
+
var n = $(e), o = oe(e), r = n.visualViewport, i = o.clientWidth, u = o.clientHeight, s = 0, l = 0;
|
|
935
935
|
if (r) {
|
|
936
936
|
i = r.width, u = r.height;
|
|
937
937
|
var c = Kt();
|
|
@@ -940,33 +940,33 @@ function ao(e, t) {
|
|
|
940
940
|
return {
|
|
941
941
|
width: i,
|
|
942
942
|
height: u,
|
|
943
|
-
x: s +
|
|
943
|
+
x: s + dt(e),
|
|
944
944
|
y: l
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
947
|
function so(e) {
|
|
948
|
-
var t, n =
|
|
949
|
-
return
|
|
948
|
+
var t, n = oe(e), o = ut(e), r = (t = e.ownerDocument) == null ? void 0 : t.body, i = se(n.scrollWidth, n.clientWidth, r ? r.scrollWidth : 0, r ? r.clientWidth : 0), u = se(n.scrollHeight, n.clientHeight, r ? r.scrollHeight : 0, r ? r.clientHeight : 0), s = -o.scrollLeft + dt(e), l = -o.scrollTop;
|
|
949
|
+
return ee(r || n).direction === "rtl" && (s += se(n.clientWidth, r ? r.clientWidth : 0) - i), {
|
|
950
950
|
width: i,
|
|
951
951
|
height: u,
|
|
952
952
|
x: s,
|
|
953
953
|
y: l
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
var t =
|
|
956
|
+
function pt(e) {
|
|
957
|
+
var t = ee(e), n = t.overflow, o = t.overflowX, r = t.overflowY;
|
|
958
958
|
return /auto|scroll|overlay|hidden/.test(n + r + o);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
return ["html", "body", "#document"].indexOf(
|
|
960
|
+
function Jt(e) {
|
|
961
|
+
return ["html", "body", "#document"].indexOf(Q(e)) >= 0 ? e.ownerDocument.body : G(e) && pt(e) ? e : Jt($e(e));
|
|
962
962
|
}
|
|
963
963
|
function Me(e, t) {
|
|
964
964
|
var n;
|
|
965
965
|
t === void 0 && (t = []);
|
|
966
|
-
var o =
|
|
966
|
+
var o = Jt(e), r = o === ((n = e.ownerDocument) == null ? void 0 : n.body), i = $(o), u = r ? [i].concat(i.visualViewport || [], pt(o) ? o : []) : o, s = t.concat(u);
|
|
967
967
|
return r ? s : (
|
|
968
968
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
969
|
-
s.concat(Me(
|
|
969
|
+
s.concat(Me($e(u)))
|
|
970
970
|
);
|
|
971
971
|
}
|
|
972
972
|
function Je(e) {
|
|
@@ -982,43 +982,43 @@ function lo(e, t) {
|
|
|
982
982
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
983
983
|
}
|
|
984
984
|
function Ut(e, t, n) {
|
|
985
|
-
return t === zt ? Je(ao(e, n)) : le(t) ? lo(t, n) : Je(so(
|
|
985
|
+
return t === zt ? Je(ao(e, n)) : le(t) ? lo(t, n) : Je(so(oe(e)));
|
|
986
986
|
}
|
|
987
987
|
function co(e) {
|
|
988
|
-
var t = Me(
|
|
988
|
+
var t = Me($e(e)), n = ["absolute", "fixed"].indexOf(ee(e).position) >= 0, o = n && G(e) ? Se(e) : e;
|
|
989
989
|
return le(o) ? t.filter(function(r) {
|
|
990
|
-
return le(r) && jt(r, o) &&
|
|
990
|
+
return le(r) && jt(r, o) && Q(r) !== "body";
|
|
991
991
|
}) : [];
|
|
992
992
|
}
|
|
993
993
|
function uo(e, t, n, o) {
|
|
994
994
|
var r = t === "clippingParents" ? co(e) : [].concat(t), i = [].concat(r, [n]), u = i[0], s = i.reduce(function(l, c) {
|
|
995
995
|
var d = Ut(e, c, o);
|
|
996
|
-
return l.top = se(d.top, l.top), l.right =
|
|
996
|
+
return l.top = se(d.top, l.top), l.right = qe(d.right, l.right), l.bottom = qe(d.bottom, l.bottom), l.left = se(d.left, l.left), l;
|
|
997
997
|
}, Ut(e, u, o));
|
|
998
998
|
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
999
999
|
}
|
|
1000
1000
|
function en(e) {
|
|
1001
|
-
var t = e.reference, n = e.element, o = e.placement, r = o ?
|
|
1001
|
+
var t = e.reference, n = e.element, o = e.placement, r = o ? X(o) : null, i = o ? _e(o) : null, u = t.x + t.width / 2 - n.width / 2, s = t.y + t.height / 2 - n.height / 2, l;
|
|
1002
1002
|
switch (r) {
|
|
1003
|
-
case
|
|
1003
|
+
case F:
|
|
1004
1004
|
l = {
|
|
1005
1005
|
x: u,
|
|
1006
1006
|
y: t.y - n.height
|
|
1007
1007
|
};
|
|
1008
1008
|
break;
|
|
1009
|
-
case
|
|
1009
|
+
case z:
|
|
1010
1010
|
l = {
|
|
1011
1011
|
x: u,
|
|
1012
1012
|
y: t.y + t.height
|
|
1013
1013
|
};
|
|
1014
1014
|
break;
|
|
1015
|
-
case
|
|
1015
|
+
case Y:
|
|
1016
1016
|
l = {
|
|
1017
1017
|
x: t.x + t.width,
|
|
1018
1018
|
y: s
|
|
1019
1019
|
};
|
|
1020
1020
|
break;
|
|
1021
|
-
case
|
|
1021
|
+
case q:
|
|
1022
1022
|
l = {
|
|
1023
1023
|
x: t.x - n.width,
|
|
1024
1024
|
y: s
|
|
@@ -1030,7 +1030,7 @@ function en(e) {
|
|
|
1030
1030
|
y: t.y
|
|
1031
1031
|
};
|
|
1032
1032
|
}
|
|
1033
|
-
var c = r ?
|
|
1033
|
+
var c = r ? ct(r) : null;
|
|
1034
1034
|
if (c != null) {
|
|
1035
1035
|
var d = c === "y" ? "height" : "width";
|
|
1036
1036
|
switch (i) {
|
|
@@ -1046,22 +1046,22 @@ function en(e) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
function Le(e, t) {
|
|
1048
1048
|
t === void 0 && (t = {});
|
|
1049
|
-
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, i = n.strategy, u = i === void 0 ? e.strategy : i, s = n.boundary, l = s === void 0 ? Nn : s, c = n.rootBoundary, d = c === void 0 ? zt : c, m = n.elementContext, f = m === void 0 ? ve : m, h = n.altBoundary, _ = h === void 0 ? !1 : h, E = n.padding,
|
|
1050
|
-
reference:
|
|
1049
|
+
var n = t, o = n.placement, r = o === void 0 ? e.placement : o, i = n.strategy, u = i === void 0 ? e.strategy : i, s = n.boundary, l = s === void 0 ? Nn : s, c = n.rootBoundary, d = c === void 0 ? zt : c, m = n.elementContext, f = m === void 0 ? ve : m, h = n.altBoundary, _ = h === void 0 ? !1 : h, E = n.padding, v = E === void 0 ? 0 : E, T = Xt(typeof v != "number" ? v : Qt(v, Ne)), g = f === ve ? Sn : ve, w = e.rects.popper, b = e.elements[_ ? g : f], A = uo(le(b) ? b : b.contextElement || oe(e.elements.popper), l, d, u), M = fe(e.elements.reference), P = en({
|
|
1050
|
+
reference: M,
|
|
1051
1051
|
element: w,
|
|
1052
1052
|
strategy: "absolute",
|
|
1053
1053
|
placement: r
|
|
1054
|
-
}),
|
|
1055
|
-
top:
|
|
1056
|
-
bottom: S.bottom -
|
|
1057
|
-
left:
|
|
1058
|
-
right: S.right -
|
|
1059
|
-
},
|
|
1060
|
-
if (f === ve &&
|
|
1061
|
-
var
|
|
1054
|
+
}), U = Je(Object.assign({}, w, P)), S = f === ve ? U : M, N = {
|
|
1055
|
+
top: A.top - S.top + T.top,
|
|
1056
|
+
bottom: S.bottom - A.bottom + T.bottom,
|
|
1057
|
+
left: A.left - S.left + T.left,
|
|
1058
|
+
right: S.right - A.right + T.right
|
|
1059
|
+
}, C = e.modifiersData.offset;
|
|
1060
|
+
if (f === ve && C) {
|
|
1061
|
+
var k = C[r];
|
|
1062
1062
|
Object.keys(N).forEach(function(D) {
|
|
1063
|
-
var
|
|
1064
|
-
N[D] +=
|
|
1063
|
+
var B = [Y, z].indexOf(D) >= 0 ? 1 : -1, H = [F, z].indexOf(D) >= 0 ? "y" : "x";
|
|
1064
|
+
N[D] += k[H] * B;
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
return N;
|
|
@@ -1080,14 +1080,14 @@ function po(e, t) {
|
|
|
1080
1080
|
boundary: r,
|
|
1081
1081
|
rootBoundary: i,
|
|
1082
1082
|
padding: u
|
|
1083
|
-
})[
|
|
1083
|
+
})[X(E)], _;
|
|
1084
1084
|
}, {});
|
|
1085
1085
|
return Object.keys(h).sort(function(_, E) {
|
|
1086
1086
|
return h[_] - h[E];
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
1089
|
function fo(e) {
|
|
1090
|
-
if (
|
|
1090
|
+
if (X(e) === at)
|
|
1091
1091
|
return [];
|
|
1092
1092
|
var t = We(e);
|
|
1093
1093
|
return [St(e), t, St(t)];
|
|
@@ -1095,46 +1095,46 @@ function fo(e) {
|
|
|
1095
1095
|
function _o(e) {
|
|
1096
1096
|
var t = e.state, n = e.options, o = e.name;
|
|
1097
1097
|
if (!t.modifiersData[o]._skip) {
|
|
1098
|
-
for (var r = n.mainAxis, i = r === void 0 ? !0 : r, u = n.altAxis, s = u === void 0 ? !0 : u, l = n.fallbackPlacements, c = n.padding, d = n.boundary, m = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, _ = h === void 0 ? !0 : h, E = n.allowedAutoPlacements,
|
|
1099
|
-
return ce.concat(
|
|
1100
|
-
placement:
|
|
1098
|
+
for (var r = n.mainAxis, i = r === void 0 ? !0 : r, u = n.altAxis, s = u === void 0 ? !0 : u, l = n.fallbackPlacements, c = n.padding, d = n.boundary, m = n.rootBoundary, f = n.altBoundary, h = n.flipVariations, _ = h === void 0 ? !0 : h, E = n.allowedAutoPlacements, v = t.options.placement, T = X(v), g = T === v, w = l || (g || !_ ? [We(v)] : fo(v)), b = [v].concat(w).reduce(function(ce, te) {
|
|
1099
|
+
return ce.concat(X(te) === at ? po(t, {
|
|
1100
|
+
placement: te,
|
|
1101
1101
|
boundary: d,
|
|
1102
1102
|
rootBoundary: m,
|
|
1103
1103
|
padding: c,
|
|
1104
1104
|
flipVariations: _,
|
|
1105
1105
|
allowedAutoPlacements: E
|
|
1106
|
-
}) :
|
|
1107
|
-
}, []),
|
|
1108
|
-
var
|
|
1109
|
-
placement:
|
|
1106
|
+
}) : te);
|
|
1107
|
+
}, []), A = t.rects.reference, M = t.rects.popper, P = /* @__PURE__ */ new Map(), U = !0, S = b[0], N = 0; N < b.length; N++) {
|
|
1108
|
+
var C = b[N], k = X(C), D = _e(C) === de, B = [F, z].indexOf(k) >= 0, H = B ? "width" : "height", x = Le(t, {
|
|
1109
|
+
placement: C,
|
|
1110
1110
|
boundary: d,
|
|
1111
1111
|
rootBoundary: m,
|
|
1112
1112
|
altBoundary: f,
|
|
1113
1113
|
padding: c
|
|
1114
|
-
}),
|
|
1115
|
-
|
|
1116
|
-
var Ue = We(
|
|
1117
|
-
if (i &&
|
|
1114
|
+
}), K = B ? D ? Y : q : D ? z : F;
|
|
1115
|
+
A[H] > M[H] && (K = We(K));
|
|
1116
|
+
var Ue = We(K), re = [];
|
|
1117
|
+
if (i && re.push(x[k] <= 0), s && re.push(x[K] <= 0, x[Ue] <= 0), re.every(function(ce) {
|
|
1118
1118
|
return ce;
|
|
1119
1119
|
})) {
|
|
1120
|
-
S =
|
|
1120
|
+
S = C, U = !1;
|
|
1121
1121
|
break;
|
|
1122
1122
|
}
|
|
1123
|
-
P.set(
|
|
1123
|
+
P.set(C, re);
|
|
1124
1124
|
}
|
|
1125
|
-
if (
|
|
1126
|
-
for (var Ce = _ ? 3 : 1,
|
|
1127
|
-
var Ee =
|
|
1128
|
-
var
|
|
1129
|
-
if (
|
|
1130
|
-
return
|
|
1131
|
-
return
|
|
1125
|
+
if (U)
|
|
1126
|
+
for (var Ce = _ ? 3 : 1, Ge = function(te) {
|
|
1127
|
+
var Ee = b.find(function(De) {
|
|
1128
|
+
var ie = P.get(De);
|
|
1129
|
+
if (ie)
|
|
1130
|
+
return ie.slice(0, te).every(function(ze) {
|
|
1131
|
+
return ze;
|
|
1132
1132
|
});
|
|
1133
1133
|
});
|
|
1134
1134
|
if (Ee)
|
|
1135
1135
|
return S = Ee, "break";
|
|
1136
1136
|
}, me = Ce; me > 0; me--) {
|
|
1137
|
-
var Re =
|
|
1137
|
+
var Re = Ge(me);
|
|
1138
1138
|
if (Re === "break")
|
|
1139
1139
|
break;
|
|
1140
1140
|
}
|
|
@@ -1163,7 +1163,7 @@ function Ct(e, t, n) {
|
|
|
1163
1163
|
};
|
|
1164
1164
|
}
|
|
1165
1165
|
function Rt(e) {
|
|
1166
|
-
return [
|
|
1166
|
+
return [F, Y, z, q].some(function(t) {
|
|
1167
1167
|
return e[t] >= 0;
|
|
1168
1168
|
});
|
|
1169
1169
|
}
|
|
@@ -1191,10 +1191,10 @@ const Eo = {
|
|
|
1191
1191
|
fn: mo
|
|
1192
1192
|
};
|
|
1193
1193
|
function vo(e, t, n) {
|
|
1194
|
-
var o =
|
|
1194
|
+
var o = X(e), r = [q, F].indexOf(o) >= 0 ? -1 : 1, i = typeof n == "function" ? n(Object.assign({}, t, {
|
|
1195
1195
|
placement: e
|
|
1196
1196
|
})) : n, u = i[0], s = i[1];
|
|
1197
|
-
return u = u || 0, s = (s || 0) * r, [
|
|
1197
|
+
return u = u || 0, s = (s || 0) * r, [q, Y].indexOf(o) >= 0 ? {
|
|
1198
1198
|
x: s,
|
|
1199
1199
|
y: u
|
|
1200
1200
|
} : {
|
|
@@ -1235,12 +1235,12 @@ function Mo(e) {
|
|
|
1235
1235
|
return e === "x" ? "y" : "x";
|
|
1236
1236
|
}
|
|
1237
1237
|
function Ao(e) {
|
|
1238
|
-
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, i = r === void 0 ? !0 : r, u = n.altAxis, s = u === void 0 ? !1 : u, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, m = n.padding, f = n.tether, h = f === void 0 ? !0 : f, _ = n.tetherOffset, E = _ === void 0 ? 0 : _,
|
|
1238
|
+
var t = e.state, n = e.options, o = e.name, r = n.mainAxis, i = r === void 0 ? !0 : r, u = n.altAxis, s = u === void 0 ? !1 : u, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, m = n.padding, f = n.tether, h = f === void 0 ? !0 : f, _ = n.tetherOffset, E = _ === void 0 ? 0 : _, v = Le(t, {
|
|
1239
1239
|
boundary: l,
|
|
1240
1240
|
rootBoundary: c,
|
|
1241
1241
|
padding: m,
|
|
1242
1242
|
altBoundary: d
|
|
1243
|
-
}),
|
|
1243
|
+
}), T = X(t.placement), g = _e(t.placement), w = !g, b = ct(T), A = Mo(b), M = t.modifiersData.popperOffsets, P = t.rects.reference, U = t.rects.popper, S = typeof E == "function" ? E(Object.assign({}, t.rects, {
|
|
1244
1244
|
placement: t.placement
|
|
1245
1245
|
})) : E, N = typeof S == "number" ? {
|
|
1246
1246
|
mainAxis: S,
|
|
@@ -1248,23 +1248,23 @@ function Ao(e) {
|
|
|
1248
1248
|
} : Object.assign({
|
|
1249
1249
|
mainAxis: 0,
|
|
1250
1250
|
altAxis: 0
|
|
1251
|
-
}, S),
|
|
1251
|
+
}, S), C = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, k = {
|
|
1252
1252
|
x: 0,
|
|
1253
1253
|
y: 0
|
|
1254
1254
|
};
|
|
1255
|
-
if (
|
|
1255
|
+
if (M) {
|
|
1256
1256
|
if (i) {
|
|
1257
|
-
var D,
|
|
1257
|
+
var D, B = b === "y" ? F : q, H = b === "y" ? z : Y, x = b === "y" ? "height" : "width", K = M[b], Ue = K + v[B], re = K - v[H], Ce = h ? -U[x] / 2 : 0, Ge = g === de ? P[x] : U[x], me = g === de ? -U[x] : -P[x], Re = t.elements.arrow, ce = h && Re ? lt(Re) : {
|
|
1258
1258
|
width: 0,
|
|
1259
1259
|
height: 0
|
|
1260
|
-
},
|
|
1261
|
-
|
|
1260
|
+
}, te = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Zt(), Ee = te[B], De = te[H], ie = ge(0, P[x], ce[x]), ze = w ? P[x] / 2 - Ce - ie - Ee - N.mainAxis : Ge - ie - Ee - N.mainAxis, pn = w ? -P[x] / 2 + Ce + ie + De + N.mainAxis : me + ie + De + N.mainAxis, Ye = t.elements.arrow && Se(t.elements.arrow), fn = Ye ? b === "y" ? Ye.clientTop || 0 : Ye.clientLeft || 0 : 0, Et = (D = C == null ? void 0 : C[b]) != null ? D : 0, _n = K + ze - Et - fn, hn = K + pn - Et, vt = ge(h ? qe(Ue, _n) : Ue, K, h ? se(re, hn) : re);
|
|
1261
|
+
M[b] = vt, k[b] = vt - K;
|
|
1262
1262
|
}
|
|
1263
1263
|
if (s) {
|
|
1264
|
-
var
|
|
1265
|
-
A
|
|
1264
|
+
var bt, mn = b === "x" ? F : q, En = b === "x" ? z : Y, ae = M[A], Be = A === "y" ? "height" : "width", It = ae + v[mn], Tt = ae - v[En], Ke = [F, q].indexOf(T) !== -1, gt = (bt = C == null ? void 0 : C[A]) != null ? bt : 0, Mt = Ke ? It : ae - P[Be] - U[Be] - gt + N.altAxis, At = Ke ? ae + P[Be] + U[Be] - gt - N.altAxis : Tt, wt = h && Ke ? Yn(Mt, ae, At) : ge(h ? Mt : It, ae, h ? At : Tt);
|
|
1265
|
+
M[A] = wt, k[A] = wt - ae;
|
|
1266
1266
|
}
|
|
1267
|
-
t.modifiersData[o] =
|
|
1267
|
+
t.modifiersData[o] = k;
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
1270
|
const wo = {
|
|
@@ -1281,7 +1281,7 @@ function Oo(e) {
|
|
|
1281
1281
|
};
|
|
1282
1282
|
}
|
|
1283
1283
|
function Lo(e) {
|
|
1284
|
-
return e ===
|
|
1284
|
+
return e === $(e) || !G(e) ? ut(e) : Oo(e);
|
|
1285
1285
|
}
|
|
1286
1286
|
function yo(e) {
|
|
1287
1287
|
var t = e.getBoundingClientRect(), n = pe(t.width) / e.offsetWidth || 1, o = pe(t.height) / e.offsetHeight || 1;
|
|
@@ -1289,15 +1289,15 @@ function yo(e) {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
function Po(e, t, n) {
|
|
1291
1291
|
n === void 0 && (n = !1);
|
|
1292
|
-
var o =
|
|
1292
|
+
var o = G(t), r = G(t) && yo(t), i = oe(t), u = fe(e, r, n), s = {
|
|
1293
1293
|
scrollLeft: 0,
|
|
1294
1294
|
scrollTop: 0
|
|
1295
1295
|
}, l = {
|
|
1296
1296
|
x: 0,
|
|
1297
1297
|
y: 0
|
|
1298
1298
|
};
|
|
1299
|
-
return (o || !o && !n) && ((
|
|
1300
|
-
|
|
1299
|
+
return (o || !o && !n) && ((Q(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1300
|
+
pt(i)) && (s = Lo(t)), G(t) ? (l = fe(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : i && (l.x = dt(i))), {
|
|
1301
1301
|
x: u.left + s.scrollLeft - l.x,
|
|
1302
1302
|
y: u.top + s.scrollTop - l.y,
|
|
1303
1303
|
width: u.width,
|
|
@@ -1383,15 +1383,15 @@ function Ro(e) {
|
|
|
1383
1383
|
styles: {}
|
|
1384
1384
|
}, m = [], f = !1, h = {
|
|
1385
1385
|
state: d,
|
|
1386
|
-
setOptions: function(
|
|
1387
|
-
var
|
|
1388
|
-
E(), d.options = Object.assign({}, i, d.options,
|
|
1386
|
+
setOptions: function(T) {
|
|
1387
|
+
var g = typeof T == "function" ? T(d.options) : T;
|
|
1388
|
+
E(), d.options = Object.assign({}, i, d.options, g), d.scrollParents = {
|
|
1389
1389
|
reference: le(s) ? Me(s) : s.contextElement ? Me(s.contextElement) : [],
|
|
1390
1390
|
popper: Me(l)
|
|
1391
1391
|
};
|
|
1392
1392
|
var w = So(Co([].concat(o, d.options.modifiers)));
|
|
1393
|
-
return d.orderedModifiers = w.filter(function(
|
|
1394
|
-
return
|
|
1393
|
+
return d.orderedModifiers = w.filter(function(b) {
|
|
1394
|
+
return b.enabled;
|
|
1395
1395
|
}), _(), h.update();
|
|
1396
1396
|
},
|
|
1397
1397
|
// Sync update – it will always be executed, even if not necessary. This
|
|
@@ -1401,23 +1401,23 @@ function Ro(e) {
|
|
|
1401
1401
|
// prefer the async Popper#update method
|
|
1402
1402
|
forceUpdate: function() {
|
|
1403
1403
|
if (!f) {
|
|
1404
|
-
var
|
|
1405
|
-
if (Bt(
|
|
1404
|
+
var T = d.elements, g = T.reference, w = T.popper;
|
|
1405
|
+
if (Bt(g, w)) {
|
|
1406
1406
|
d.rects = {
|
|
1407
|
-
reference: Po(
|
|
1408
|
-
popper:
|
|
1407
|
+
reference: Po(g, Se(w), d.options.strategy === "fixed"),
|
|
1408
|
+
popper: lt(w)
|
|
1409
1409
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(N) {
|
|
1410
1410
|
return d.modifiersData[N.name] = Object.assign({}, N.data);
|
|
1411
1411
|
});
|
|
1412
|
-
for (var
|
|
1412
|
+
for (var b = 0; b < d.orderedModifiers.length; b++) {
|
|
1413
1413
|
if (d.reset === !0) {
|
|
1414
|
-
d.reset = !1,
|
|
1414
|
+
d.reset = !1, b = -1;
|
|
1415
1415
|
continue;
|
|
1416
1416
|
}
|
|
1417
|
-
var
|
|
1418
|
-
typeof
|
|
1417
|
+
var A = d.orderedModifiers[b], M = A.fn, P = A.options, U = P === void 0 ? {} : P, S = A.name;
|
|
1418
|
+
typeof M == "function" && (d = M({
|
|
1419
1419
|
state: d,
|
|
1420
|
-
options:
|
|
1420
|
+
options: U,
|
|
1421
1421
|
name: S,
|
|
1422
1422
|
instance: h
|
|
1423
1423
|
}) || d);
|
|
@@ -1428,8 +1428,8 @@ function Ro(e) {
|
|
|
1428
1428
|
// Async and optimistically optimized update – it will not be executed if
|
|
1429
1429
|
// not necessary (debounced to run at most once-per-tick)
|
|
1430
1430
|
update: Uo(function() {
|
|
1431
|
-
return new Promise(function(
|
|
1432
|
-
h.forceUpdate(),
|
|
1431
|
+
return new Promise(function(v) {
|
|
1432
|
+
h.forceUpdate(), v(d);
|
|
1433
1433
|
});
|
|
1434
1434
|
}),
|
|
1435
1435
|
destroy: function() {
|
|
@@ -1438,27 +1438,27 @@ function Ro(e) {
|
|
|
1438
1438
|
};
|
|
1439
1439
|
if (!Bt(s, l))
|
|
1440
1440
|
return h;
|
|
1441
|
-
h.setOptions(c).then(function(
|
|
1442
|
-
!f && c.onFirstUpdate && c.onFirstUpdate(
|
|
1441
|
+
h.setOptions(c).then(function(v) {
|
|
1442
|
+
!f && c.onFirstUpdate && c.onFirstUpdate(v);
|
|
1443
1443
|
});
|
|
1444
1444
|
function _() {
|
|
1445
|
-
d.orderedModifiers.forEach(function(
|
|
1446
|
-
var
|
|
1447
|
-
if (typeof
|
|
1448
|
-
var
|
|
1445
|
+
d.orderedModifiers.forEach(function(v) {
|
|
1446
|
+
var T = v.name, g = v.options, w = g === void 0 ? {} : g, b = v.effect;
|
|
1447
|
+
if (typeof b == "function") {
|
|
1448
|
+
var A = b({
|
|
1449
1449
|
state: d,
|
|
1450
|
-
name:
|
|
1450
|
+
name: T,
|
|
1451
1451
|
instance: h,
|
|
1452
1452
|
options: w
|
|
1453
|
-
}),
|
|
1453
|
+
}), M = function() {
|
|
1454
1454
|
};
|
|
1455
|
-
m.push(
|
|
1455
|
+
m.push(A || M);
|
|
1456
1456
|
}
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
1459
|
function E() {
|
|
1460
|
-
m.forEach(function(
|
|
1461
|
-
return
|
|
1460
|
+
m.forEach(function(v) {
|
|
1461
|
+
return v();
|
|
1462
1462
|
}), m = [];
|
|
1463
1463
|
}
|
|
1464
1464
|
return h;
|
|
@@ -1467,17 +1467,17 @@ function Ro(e) {
|
|
|
1467
1467
|
var Do = [oo, go, to, $n, Io, ho, wo, Xn, Eo], tn = /* @__PURE__ */ Ro({
|
|
1468
1468
|
defaultModifiers: Do
|
|
1469
1469
|
});
|
|
1470
|
-
function
|
|
1470
|
+
function et(e, t, n, o) {
|
|
1471
1471
|
t ? (e.classList.remove(o), e.classList.add(n)) : (e.classList.add(o), e.classList.remove(n));
|
|
1472
1472
|
}
|
|
1473
|
-
let
|
|
1474
|
-
const be = {},
|
|
1473
|
+
let V;
|
|
1474
|
+
const be = {}, tt = {
|
|
1475
1475
|
SHIFT: "shift-key"
|
|
1476
1476
|
};
|
|
1477
1477
|
function nn() {
|
|
1478
|
-
|
|
1478
|
+
V && (document.removeEventListener("click", V.globalOnClick), document.removeEventListener("keyup", V.globalOnKeyup), document.removeEventListener("keydown", V.globalOnKeydown), V = null);
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function nt() {
|
|
1481
1481
|
const e = document.querySelectorAll(
|
|
1482
1482
|
`${p(a.UTAH_DESIGN_SYSTEM)} ${p(a.POPUP_WRAPPER)}`
|
|
1483
1483
|
);
|
|
@@ -1487,15 +1487,15 @@ function tt() {
|
|
|
1487
1487
|
const o = document.querySelector(`[aria-controls="${n}"]`);
|
|
1488
1488
|
o && o.setAttribute("aria-expanded", "false");
|
|
1489
1489
|
}
|
|
1490
|
-
|
|
1490
|
+
et(t, !1, a.POPUP__VISIBLE, a.POPUP__HIDDEN);
|
|
1491
1491
|
});
|
|
1492
1492
|
}
|
|
1493
1493
|
function Bo() {
|
|
1494
|
-
|
|
1495
|
-
e.key === "Escape" &&
|
|
1496
|
-
}, document.addEventListener("keyup",
|
|
1497
|
-
e.shiftKey && (be[
|
|
1498
|
-
}, document.addEventListener("keydown",
|
|
1494
|
+
V && nn(), V = {}, V.globalOnClick = nt, document.addEventListener("click", V.globalOnClick), V.globalOnKeyup = (e) => {
|
|
1495
|
+
e.key === "Escape" && nt(), e.shiftKey || (be[tt.SHIFT] = !1), be[e.key] = !1;
|
|
1496
|
+
}, document.addEventListener("keyup", V.globalOnKeyup), V.globalOnKeydown = (e) => {
|
|
1497
|
+
e.shiftKey && (be[tt.SHIFT] = !0), be[e.key] = !0;
|
|
1498
|
+
}, document.addEventListener("keydown", V.globalOnKeydown);
|
|
1499
1499
|
}
|
|
1500
1500
|
function Ho() {
|
|
1501
1501
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
@@ -1508,14 +1508,14 @@ function ye(e, t, n, o, r) {
|
|
|
1508
1508
|
clearTimeout(i), clearTimeout(u), (!(r != null && r.isPerformPopup) || r != null && r.isPerformPopup && r.isPerformPopup()) && (i = window.setTimeout(
|
|
1509
1509
|
() => {
|
|
1510
1510
|
tn(t, n, {
|
|
1511
|
-
placement: (r == null ? void 0 : r.popupPlacement) ||
|
|
1511
|
+
placement: (r == null ? void 0 : r.popupPlacement) || it.BOTTOM,
|
|
1512
1512
|
modifiers: [
|
|
1513
1513
|
{
|
|
1514
1514
|
name: "offset",
|
|
1515
1515
|
options: { offset: [0, 11] }
|
|
1516
1516
|
}
|
|
1517
1517
|
]
|
|
1518
|
-
}),
|
|
1518
|
+
}), et(n, !0, a.POPUP__VISIBLE, a.POPUP__HIDDEN), t.setAttribute("aria-expanded", "true"), document.querySelectorAll(p(a.TOOLTIP__WRAPPER)).forEach((h) => h.classList.add(a.TOOLTIP__WRAPPER__HIDDEN));
|
|
1519
1519
|
},
|
|
1520
1520
|
f
|
|
1521
1521
|
));
|
|
@@ -1523,12 +1523,12 @@ function ye(e, t, n, o, r) {
|
|
|
1523
1523
|
function m(f) {
|
|
1524
1524
|
clearTimeout(i), clearTimeout(u), (!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (u = window.setTimeout(
|
|
1525
1525
|
() => {
|
|
1526
|
-
|
|
1526
|
+
et(n, !1, a.POPUP__VISIBLE, a.POPUP__HIDDEN), t.setAttribute("aria-expanded", "false");
|
|
1527
1527
|
},
|
|
1528
1528
|
f
|
|
1529
1529
|
));
|
|
1530
1530
|
}
|
|
1531
|
-
if (r != null && r.preventOnClickHandling ? (
|
|
1531
|
+
if (r != null && r.preventOnClickHandling ? (J(!!e.onclick, "popupFocusHandler: wrapper already has an onclick"), e.onclick = (f) => {
|
|
1532
1532
|
f.preventDefault(), f.stopPropagation();
|
|
1533
1533
|
}) : (e.addEventListener("focusin", () => d(l)), e.addEventListener("focusout", () => m(l))), r != null && r.shouldFocusOnHover && (e.addEventListener("mouseenter", () => d(s)), e.addEventListener("mouseleave", () => m(s))), !(r != null && r.preventOnClickHandling)) {
|
|
1534
1534
|
if (t.onclick)
|
|
@@ -1536,7 +1536,7 @@ function ye(e, t, n, o, r) {
|
|
|
1536
1536
|
t.onclick = (f) => {
|
|
1537
1537
|
var _;
|
|
1538
1538
|
const h = t.getAttribute("aria-expanded") === "true";
|
|
1539
|
-
(!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (f.stopPropagation(), f.preventDefault(), h && t.getAttribute("aria-expanded") === "true" ? (m(c), (_ = document.activeElement) == null || _.blur()) : (Ho() &&
|
|
1539
|
+
(!(r != null && r.isPerformPopup) || r.isPerformPopup()) && (f.stopPropagation(), f.preventDefault(), h && t.getAttribute("aria-expanded") === "true" ? (m(c), (_ = document.activeElement) == null || _.blur()) : (Ho() && nt(), d(c))), r != null && r.onClick && r.onClick(f);
|
|
1540
1540
|
};
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
@@ -1546,11 +1546,11 @@ const xo = `<div class="popup__wrapper popup__wrapper--hidden">
|
|
|
1546
1546
|
</div>
|
|
1547
1547
|
</div>
|
|
1548
1548
|
`;
|
|
1549
|
-
function
|
|
1549
|
+
function ft(e, t) {
|
|
1550
1550
|
const n = e.getAttribute("id");
|
|
1551
1551
|
if (!n)
|
|
1552
1552
|
throw new Error("renderPopup: labelledByElement does not have an `id` attribute");
|
|
1553
|
-
const o =
|
|
1553
|
+
const o = R();
|
|
1554
1554
|
e.setAttribute("aria-controls", o);
|
|
1555
1555
|
const r = I(xo);
|
|
1556
1556
|
if (r.setAttribute("id", o), r.setAttribute("aria-labelledby", n), t != null && t.removePopupArrow) {
|
|
@@ -1628,9 +1628,9 @@ function Fo(e, t, n) {
|
|
|
1628
1628
|
}), m) {
|
|
1629
1629
|
let _;
|
|
1630
1630
|
switch (n.childrenMenuType) {
|
|
1631
|
-
case
|
|
1632
|
-
_ = Ht(), i.appendChild(_), i.setAttribute("id",
|
|
1633
|
-
const E =
|
|
1631
|
+
case j.FLYOUT: {
|
|
1632
|
+
_ = Ht(), i.appendChild(_), i.setAttribute("id", R());
|
|
1633
|
+
const E = _t(
|
|
1634
1634
|
{
|
|
1635
1635
|
menuItems: m,
|
|
1636
1636
|
title: t.title
|
|
@@ -1647,34 +1647,34 @@ function Fo(e, t, n) {
|
|
|
1647
1647
|
E,
|
|
1648
1648
|
"menu",
|
|
1649
1649
|
{
|
|
1650
|
-
popupPlacement:
|
|
1650
|
+
popupPlacement: it.RIGHT_START,
|
|
1651
1651
|
preventOnClickHandling: !0,
|
|
1652
1652
|
shouldFocusOnHover: !0
|
|
1653
1653
|
}
|
|
1654
1654
|
), u.remove(), s.remove();
|
|
1655
1655
|
break;
|
|
1656
1656
|
}
|
|
1657
|
-
case
|
|
1657
|
+
case j.INLINE: {
|
|
1658
1658
|
const E = he(
|
|
1659
1659
|
m,
|
|
1660
1660
|
n
|
|
1661
|
-
),
|
|
1662
|
-
E.setAttribute("id",
|
|
1663
|
-
var
|
|
1664
|
-
for (let
|
|
1661
|
+
), v = R();
|
|
1662
|
+
E.setAttribute("id", v), E.classList.add(a.VISUALLY_HIDDEN), o.appendChild(E), i.onclick = ko(i), i.setAttribute("aria-expanded", "false"), i.setAttribute("aria-controls", v), _ = Ht(), i.appendChild(_), u.remove(), s.remove(), o.addEventListener("focusin", (T) => {
|
|
1663
|
+
var g, w, b, A;
|
|
1664
|
+
for (let M = (
|
|
1665
1665
|
/** @type Element | null | undefined */
|
|
1666
|
-
(
|
|
1667
|
-
);
|
|
1668
|
-
|
|
1666
|
+
(g = T.target) == null ? void 0 : g.closest("ul")
|
|
1667
|
+
); M; M = (w = M.parentElement) == null ? void 0 : w.closest("ul"))
|
|
1668
|
+
M.classList.remove(a.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), T.target !== i && ((b = _ == null ? void 0 : _.classList) == null || b.remove(a.IS_CLOSED), (A = _ == null ? void 0 : _.classList) == null || A.add(a.IS_OPEN));
|
|
1669
1669
|
});
|
|
1670
1670
|
break;
|
|
1671
1671
|
}
|
|
1672
|
-
case
|
|
1672
|
+
case j.MEGA_MENU: {
|
|
1673
1673
|
const E = he(
|
|
1674
1674
|
m,
|
|
1675
1675
|
n
|
|
1676
|
-
),
|
|
1677
|
-
E.setAttribute("id",
|
|
1676
|
+
), v = R();
|
|
1677
|
+
E.setAttribute("id", v), o.appendChild(E), u.remove(), i.remove(), s.appendChild(document.createTextNode(t.title));
|
|
1678
1678
|
break;
|
|
1679
1679
|
}
|
|
1680
1680
|
default:
|
|
@@ -1687,8 +1687,8 @@ function Fo(e, t, n) {
|
|
|
1687
1687
|
u.setAttribute("href", t.actionUrl.url), i.remove(), l.remove(), s.remove();
|
|
1688
1688
|
else if (t.actionFunctionUrl)
|
|
1689
1689
|
u.setAttribute("href", t.actionFunctionUrl.url), u.onclick = (_) => {
|
|
1690
|
-
var E,
|
|
1691
|
-
(E = t.actionFunctionUrl) != null && E.skipHandleEvent || (_.stopPropagation(), _.preventDefault()), (
|
|
1690
|
+
var E, v;
|
|
1691
|
+
(E = t.actionFunctionUrl) != null && E.skipHandleEvent || (_.stopPropagation(), _.preventDefault()), (v = t.actionFunctionUrl) == null || v.actionFunction(_);
|
|
1692
1692
|
}, i.remove(), l.remove(), s.remove();
|
|
1693
1693
|
else if (t.isDivider)
|
|
1694
1694
|
r.remove(), o.setAttribute("aria-hidden", "true"), o.setAttribute("role", "separator");
|
|
@@ -1699,14 +1699,14 @@ function Fo(e, t, n) {
|
|
|
1699
1699
|
const _ = I(Gt);
|
|
1700
1700
|
c.appendChild(_), d.appendChild(_);
|
|
1701
1701
|
}
|
|
1702
|
-
return (t.isSelected || t.actionMenu &&
|
|
1702
|
+
return (t.isSelected || t.actionMenu && Fe(t.actionMenu, ["actionMenu"], (_) => !!_.isSelected)) && (i.classList.add(a.MENU_ITEM__SELECTED), u.classList.add(a.MENU_ITEM__SELECTED)), t.isSelected ? o.classList.add(a.MENU_ITEM__SELECTED) : o.classList.remove(a.MENU_ITEM__SELECTED), e.appendChild(o), o;
|
|
1703
1703
|
}
|
|
1704
1704
|
function he(e, t) {
|
|
1705
1705
|
const n = I(yn);
|
|
1706
1706
|
return e == null || e.forEach((o) => Fo(n, o, t)), n;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1709
|
-
const o =
|
|
1708
|
+
function _t(e, t, n) {
|
|
1709
|
+
const o = ft(t, { removePopupArrow: n.removePopupArrow }), r = o.querySelector(p(a.POPUP_CONTENT_WRAPPER));
|
|
1710
1710
|
if (!r)
|
|
1711
1711
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
1712
1712
|
const i = he(e.menuItems, n);
|
|
@@ -1717,7 +1717,7 @@ const qo = `<div class="utds-badge__wrapper">
|
|
|
1717
1717
|
<span class="utds-badge__label visually-hidden"></span>
|
|
1718
1718
|
</div>
|
|
1719
1719
|
`;
|
|
1720
|
-
function
|
|
1720
|
+
function ht(e) {
|
|
1721
1721
|
let t = null;
|
|
1722
1722
|
if (e) {
|
|
1723
1723
|
t = /** @type {HTMLElement} */
|
|
@@ -1738,7 +1738,7 @@ function _t(e) {
|
|
|
1738
1738
|
}
|
|
1739
1739
|
function Vo(e) {
|
|
1740
1740
|
const t = I(wn);
|
|
1741
|
-
t.getAttribute("id") || t.setAttribute("id",
|
|
1741
|
+
t.getAttribute("id") || t.setAttribute("id", R());
|
|
1742
1742
|
const n = document.createTextNode(e.title), o = (
|
|
1743
1743
|
/** @type {HTMLElement} */
|
|
1744
1744
|
t instanceof HTMLCollection ? t[0] : t
|
|
@@ -1755,7 +1755,7 @@ function Vo(e) {
|
|
|
1755
1755
|
if (!i)
|
|
1756
1756
|
throw new Error("renderActionItem: iconButton not found");
|
|
1757
1757
|
e.className && i.classList.add(e.className);
|
|
1758
|
-
const u =
|
|
1758
|
+
const u = ht(e.badge);
|
|
1759
1759
|
u && i.appendChild(u);
|
|
1760
1760
|
const s = I(e.icon);
|
|
1761
1761
|
s.setAttribute("role", "presentation"), i.appendChild(s);
|
|
@@ -1763,16 +1763,16 @@ function Vo(e) {
|
|
|
1763
1763
|
if (e.actionFunction)
|
|
1764
1764
|
i.onclick = e.actionFunction;
|
|
1765
1765
|
else if (e.actionDom) {
|
|
1766
|
-
const c =
|
|
1766
|
+
const c = R();
|
|
1767
1767
|
i.setAttribute("id", c), l = I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom);
|
|
1768
1768
|
} else if (e.actionPopupMenu) {
|
|
1769
|
-
const c =
|
|
1769
|
+
const c = R();
|
|
1770
1770
|
i.setAttribute("id", c), l = I(On);
|
|
1771
1771
|
const d = l.querySelector(p(a.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
1772
1772
|
if (!d)
|
|
1773
1773
|
throw new Error("renderMobileActionItem: actionItemContentTitle not found");
|
|
1774
1774
|
d.appendChild(document.createTextNode(e.actionPopupMenu.title));
|
|
1775
|
-
const m = he(e.actionPopupMenu.menuItems, { childrenMenuType:
|
|
1775
|
+
const m = he(e.actionPopupMenu.menuItems, { childrenMenuType: j.INLINE });
|
|
1776
1776
|
l.appendChild(m);
|
|
1777
1777
|
} else
|
|
1778
1778
|
throw console.error(e), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
@@ -1808,9 +1808,9 @@ function $o() {
|
|
|
1808
1808
|
break;
|
|
1809
1809
|
}
|
|
1810
1810
|
if (f && (f.after(m), d)) {
|
|
1811
|
-
const h =
|
|
1811
|
+
const h = ot(d);
|
|
1812
1812
|
let _ = null;
|
|
1813
|
-
c.actionDom ? _ = "dialog" : c.actionPopupMenu && (_ = "menu"),
|
|
1813
|
+
c.actionDom ? _ = "dialog" : c.actionPopupMenu && (_ = "menu"), rt(
|
|
1814
1814
|
m,
|
|
1815
1815
|
h,
|
|
1816
1816
|
m,
|
|
@@ -1845,37 +1845,43 @@ const Go = `<div class="utds-footer utah-design-system">
|
|
|
1845
1845
|
</ul>
|
|
1846
1846
|
</div>
|
|
1847
1847
|
</div>
|
|
1848
|
-
|
|
1849
|
-
|
|
1848
|
+
`, ne = {
|
|
1849
|
+
domLocationTarget: {
|
|
1850
|
+
cssSelector: void 0,
|
|
1851
|
+
element: void 0,
|
|
1852
|
+
elementFunction: void 0
|
|
1853
|
+
},
|
|
1854
|
+
showHorizontalRule: !1
|
|
1855
|
+
};
|
|
1850
1856
|
function zo() {
|
|
1851
|
-
var o, r, i, u, s, l, c, d, m, f, h, _, E,
|
|
1857
|
+
var o, r, i, u, s, l, c, d, m, f, h, _, E, v, T, g, w, b, A, M, P, U, S, N, C, k;
|
|
1852
1858
|
const e = L(), t = document.querySelector(p(a.FOOTER));
|
|
1853
1859
|
let n = t;
|
|
1854
1860
|
if (e.footer === null)
|
|
1855
1861
|
t == null || t.remove();
|
|
1856
|
-
else if (((o =
|
|
1862
|
+
else if (ne.domLocationTarget.cssSelector !== ((r = (o = e == null ? void 0 : e.footer) == null ? void 0 : o.domLocationTarget) == null ? void 0 : r.cssSelector) || ne.domLocationTarget.element !== ((u = (i = e == null ? void 0 : e.footer) == null ? void 0 : i.domLocationTarget) == null ? void 0 : u.element) || ne.domLocationTarget.elementFunction !== ((l = (s = e == null ? void 0 : e.footer) == null ? void 0 : s.domLocationTarget) == null ? void 0 : l.elementFunction) || ne.showHorizontalRule !== ((c = e == null ? void 0 : e.footer) == null ? void 0 : c.showHorizontalRule) || !t) {
|
|
1857
1863
|
t && t.remove(), n = I(Go);
|
|
1858
|
-
let
|
|
1859
|
-
if ((
|
|
1860
|
-
const
|
|
1861
|
-
(
|
|
1862
|
-
(
|
|
1863
|
-
(
|
|
1864
|
-
].filter((
|
|
1865
|
-
if (
|
|
1866
|
-
|
|
1867
|
-
else if ((
|
|
1868
|
-
|
|
1869
|
-
else if ((
|
|
1870
|
-
|
|
1864
|
+
let B = document.body;
|
|
1865
|
+
if ((d = e == null ? void 0 : e.footer) != null && d.domLocationTarget) {
|
|
1866
|
+
const H = [
|
|
1867
|
+
(m = e == null ? void 0 : e.footer) == null ? void 0 : m.domLocationTarget.cssSelector,
|
|
1868
|
+
(f = e == null ? void 0 : e.footer) == null ? void 0 : f.domLocationTarget.element,
|
|
1869
|
+
(h = e == null ? void 0 : e.footer) == null ? void 0 : h.domLocationTarget.elementFunction
|
|
1870
|
+
].filter((x) => x);
|
|
1871
|
+
if (J(H.length < 1, "renderFooter: footer.domLocationTarget must either have a value for one of its properties or not be specified at all"), J(H.length > 1, "renderFooter: footer.domLocationTarget must only have one target specified"), (_ = e == null ? void 0 : e.footer) != null && _.domLocationTarget.cssSelector)
|
|
1872
|
+
B = document.querySelector((E = e == null ? void 0 : e.footer) == null ? void 0 : E.domLocationTarget.cssSelector), J(!B, `renderFooter: element not found for domLocationTarget.cssSelector ${(v = e == null ? void 0 : e.footer) == null ? void 0 : v.domLocationTarget.cssSelector}`);
|
|
1873
|
+
else if ((T = e == null ? void 0 : e.footer) != null && T.domLocationTarget.element)
|
|
1874
|
+
B = (g = e == null ? void 0 : e.footer) == null ? void 0 : g.domLocationTarget.element;
|
|
1875
|
+
else if ((w = e == null ? void 0 : e.footer) != null && w.domLocationTarget.elementFunction)
|
|
1876
|
+
B = (b = e == null ? void 0 : e.footer) == null ? void 0 : b.domLocationTarget.elementFunction(), J(!B, "renderFooter: element not returned from domLocationTarget.elementFunction");
|
|
1871
1877
|
else
|
|
1872
1878
|
throw new Error("renderFooter: domLocationTarget must have at least one field set");
|
|
1873
1879
|
}
|
|
1874
|
-
if (
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1880
|
+
if (B == null || B.appendChild(n), !((A = e == null ? void 0 : e.footer) != null && A.showHorizontalRule)) {
|
|
1881
|
+
const H = document.querySelector(p(a.FOOTER_HORIZONTAL_DIVIDER));
|
|
1882
|
+
J(!H, "renderFooter: cannot remove horizontal rule; not found"), H == null || H.remove();
|
|
1877
1883
|
}
|
|
1878
|
-
|
|
1884
|
+
ne.domLocationTarget.cssSelector = (P = (M = e == null ? void 0 : e.footer) == null ? void 0 : M.domLocationTarget) == null ? void 0 : P.cssSelector, ne.domLocationTarget.element = (S = (U = e == null ? void 0 : e.footer) == null ? void 0 : U.domLocationTarget) == null ? void 0 : S.element, ne.domLocationTarget.elementFunction = (C = (N = e == null ? void 0 : e.footer) == null ? void 0 : N.domLocationTarget) == null ? void 0 : C.elementFunction, ne.showHorizontalRule = (k = e == null ? void 0 : e.footer) == null ? void 0 : k.showHorizontalRule;
|
|
1879
1885
|
}
|
|
1880
1886
|
return n;
|
|
1881
1887
|
}
|
|
@@ -1884,8 +1890,8 @@ const Yo = `<div class="utds-citizen-experience-wrapper--mobile"></div>
|
|
|
1884
1890
|
`, jo = `<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
1885
1891
|
`, Zo = `<span class="utds-logo-vert-line"></span>
|
|
1886
1892
|
`, Xo = `<div class="utds-citizen-experience-wrapper"></div>
|
|
1887
|
-
`,
|
|
1888
|
-
`,
|
|
1893
|
+
`, Qo = `<div class="utds-action-items-wrapper"></div>
|
|
1894
|
+
`, Jo = `<div class="utds-header-action-item">
|
|
1889
1895
|
<button type="button" class="icon-button utds-header-action-item__icon-button">
|
|
1890
1896
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
1891
1897
|
</button>
|
|
@@ -1906,7 +1912,7 @@ function Ae(e, t) {
|
|
|
1906
1912
|
e,
|
|
1907
1913
|
n,
|
|
1908
1914
|
{
|
|
1909
|
-
placement:
|
|
1915
|
+
placement: it.BOTTOM,
|
|
1910
1916
|
modifiers: [
|
|
1911
1917
|
{
|
|
1912
1918
|
name: "offset",
|
|
@@ -1938,7 +1944,7 @@ function Ae(e, t) {
|
|
|
1938
1944
|
};
|
|
1939
1945
|
}
|
|
1940
1946
|
function tr(e) {
|
|
1941
|
-
const t = I(
|
|
1947
|
+
const t = I(Jo), n = document.createTextNode(e.title), o = (
|
|
1942
1948
|
/** @type {HTMLElement} */
|
|
1943
1949
|
t instanceof HTMLCollection ? t[0] : t
|
|
1944
1950
|
);
|
|
@@ -1951,7 +1957,7 @@ function tr(e) {
|
|
|
1951
1957
|
if (!i)
|
|
1952
1958
|
throw new Error("renderActionItem: iconButton not found");
|
|
1953
1959
|
e.className && i.classList.add(e.className);
|
|
1954
|
-
const u =
|
|
1960
|
+
const u = ht(e.badge);
|
|
1955
1961
|
u && i.appendChild(u);
|
|
1956
1962
|
const s = I(e.icon);
|
|
1957
1963
|
if (s.setAttribute("role", "presentation"), i.appendChild(s), !(i instanceof HTMLElement))
|
|
@@ -1959,9 +1965,9 @@ function tr(e) {
|
|
|
1959
1965
|
if (e.actionFunction)
|
|
1960
1966
|
i.onclick = e.actionFunction;
|
|
1961
1967
|
else if (e.actionDom) {
|
|
1962
|
-
const l =
|
|
1968
|
+
const l = R();
|
|
1963
1969
|
i.setAttribute("id", l);
|
|
1964
|
-
const c =
|
|
1970
|
+
const c = ft(i), d = (
|
|
1965
1971
|
/** @type {HTMLElement} */
|
|
1966
1972
|
c.querySelector(p(a.POPUP_CONTENT_WRAPPER))
|
|
1967
1973
|
);
|
|
@@ -1969,13 +1975,13 @@ function tr(e) {
|
|
|
1969
1975
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
1970
1976
|
d.appendChild(I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom)), t.appendChild(c), ye(o, i, c, "dialog", void 0);
|
|
1971
1977
|
} else if (e.actionPopupMenu) {
|
|
1972
|
-
const l =
|
|
1978
|
+
const l = R();
|
|
1973
1979
|
i.setAttribute("id", l);
|
|
1974
|
-
const c =
|
|
1980
|
+
const c = _t(
|
|
1975
1981
|
/** @type {PopupMenu} */
|
|
1976
1982
|
e.actionPopupMenu,
|
|
1977
1983
|
i,
|
|
1978
|
-
{ childrenMenuType:
|
|
1984
|
+
{ childrenMenuType: j.INLINE }
|
|
1979
1985
|
);
|
|
1980
1986
|
t.appendChild(c), ye(o, i, c, "menu", void 0);
|
|
1981
1987
|
} else
|
|
@@ -1986,7 +1992,7 @@ function nr() {
|
|
|
1986
1992
|
var n, o;
|
|
1987
1993
|
const { actionItems: e } = L();
|
|
1988
1994
|
let t = null;
|
|
1989
|
-
return e != null && e.length && (t = I(
|
|
1995
|
+
return e != null && e.length && (t = I(Qo), (o = (n = L().actionItems) == null ? void 0 : n.map((r) => tr(r))) == null || o.forEach((r) => t.appendChild(r))), t;
|
|
1990
1996
|
}
|
|
1991
1997
|
const or = `<button class="utds-utah-id__button button--solid" type="button">UtahID Sign In</button>
|
|
1992
1998
|
`, on = `<div class="utds-utah-id-wrapper"></div>
|
|
@@ -2019,17 +2025,17 @@ function an(e) {
|
|
|
2019
2025
|
if (!r)
|
|
2020
2026
|
throw new Error(`authChangedEventHandler: popup id for button not found - ${r}`);
|
|
2021
2027
|
const i = document.getElementById(r);
|
|
2022
|
-
i &&
|
|
2028
|
+
i && mt(n, i);
|
|
2023
2029
|
}
|
|
2024
2030
|
});
|
|
2025
2031
|
}
|
|
2026
|
-
function
|
|
2032
|
+
function mt(e, t) {
|
|
2027
2033
|
var n;
|
|
2028
2034
|
e && t && (!!(y != null && y.isDefinitive) && !!((n = y == null ? void 0 : y.userInfo) != null && n.authenticated) ? (e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false"), t.removeAttribute("aria-hidden")) : (e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded"), t.setAttribute("aria-hidden", "true")));
|
|
2029
2035
|
}
|
|
2030
2036
|
function sn() {
|
|
2031
2037
|
const e = I(or);
|
|
2032
|
-
return e.setAttribute("id",
|
|
2038
|
+
return e.setAttribute("id", R()), y && an(y), e;
|
|
2033
2039
|
}
|
|
2034
2040
|
function ln(e) {
|
|
2035
2041
|
var l, c, d;
|
|
@@ -2051,20 +2057,20 @@ function ln(e) {
|
|
|
2051
2057
|
actionFunction: o || void 0,
|
|
2052
2058
|
title: "Sign Out"
|
|
2053
2059
|
}
|
|
2054
|
-
], u = he(i, { childrenMenuType:
|
|
2055
|
-
return s.setAttribute("aria-label", "Utah Id Menu"), s.setAttribute("id",
|
|
2060
|
+
], u = he(i, { childrenMenuType: j.INLINE }), s = e ? rn(u, "Utah ID Menu") : u;
|
|
2061
|
+
return s.setAttribute("aria-label", "Utah Id Menu"), s.setAttribute("id", R()), s;
|
|
2056
2062
|
}
|
|
2057
2063
|
function ir() {
|
|
2058
2064
|
var s;
|
|
2059
2065
|
const e = I(on), t = sn();
|
|
2060
|
-
t.setAttribute("id",
|
|
2061
|
-
const n = ln(!1), o =
|
|
2066
|
+
t.setAttribute("id", R()), e.appendChild(t);
|
|
2067
|
+
const n = ln(!1), o = ft(t), r = (
|
|
2062
2068
|
/** @type {HTMLElement} */
|
|
2063
2069
|
o.querySelector(p(a.POPUP_CONTENT_WRAPPER))
|
|
2064
2070
|
);
|
|
2065
2071
|
if (!r)
|
|
2066
2072
|
throw new Error("renderUtahIdForDesktop: contentWrapper not found");
|
|
2067
|
-
r.appendChild(n), e.appendChild(o),
|
|
2073
|
+
r.appendChild(n), e.appendChild(o), mt(t, o);
|
|
2068
2074
|
const i = L(), u = i.utahId !== !1 && i.utahId !== !0 && ((s = i.utahId) == null ? void 0 : s.onSignIn);
|
|
2069
2075
|
return ye(
|
|
2070
2076
|
e,
|
|
@@ -2091,7 +2097,7 @@ function ar() {
|
|
|
2091
2097
|
const o = ln(!0), r = o.getAttribute("id");
|
|
2092
2098
|
if (!r)
|
|
2093
2099
|
throw new Error("renderUtahIdForMobile: utahIdPopupMenu has no id");
|
|
2094
|
-
return e.appendChild(o), t.setAttribute("aria-controls", r), o.setAttribute("aria-labelledby", n),
|
|
2100
|
+
return e.appendChild(o), t.setAttribute("aria-controls", r), o.setAttribute("aria-labelledby", n), mt(t, o), { button: t, menu: o };
|
|
2095
2101
|
}
|
|
2096
2102
|
function sr() {
|
|
2097
2103
|
const e = I(Xo), t = nr();
|
|
@@ -2118,11 +2124,11 @@ function ur() {
|
|
|
2118
2124
|
if (o) {
|
|
2119
2125
|
let l;
|
|
2120
2126
|
if (o.htmlString)
|
|
2121
|
-
l = I(
|
|
2127
|
+
l = I(Z(o.htmlString));
|
|
2122
2128
|
else if (o.element)
|
|
2123
|
-
l =
|
|
2129
|
+
l = Z(o.element);
|
|
2124
2130
|
else if (o.imageUrl)
|
|
2125
|
-
l = I(`<img src=${
|
|
2131
|
+
l = I(`<img src=${Z(o.imageUrl)} id="design-system-logo" />`);
|
|
2126
2132
|
else
|
|
2127
2133
|
throw new Error("LogoTitle: logo set but has no settings");
|
|
2128
2134
|
l.setAttribute("role", "presentation"), n.appendChild(l);
|
|
@@ -2187,7 +2193,7 @@ function _r() {
|
|
|
2187
2193
|
if (!/** @type {HTMLElement} */
|
|
2188
2194
|
t.querySelector(p(a.LOGO_SVG)))
|
|
2189
2195
|
throw new Error("UtahLogo: logoButton not found");
|
|
2190
|
-
return t.setAttribute("id",
|
|
2196
|
+
return t.setAttribute("id", R()), Ae(t, I(fr)), t;
|
|
2191
2197
|
}
|
|
2192
2198
|
function hr() {
|
|
2193
2199
|
var n;
|
|
@@ -2274,7 +2280,7 @@ function xe() {
|
|
|
2274
2280
|
throw new Error("closSearchModal: searchIcon not found");
|
|
2275
2281
|
t.focus();
|
|
2276
2282
|
}
|
|
2277
|
-
function
|
|
2283
|
+
function je() {
|
|
2278
2284
|
const e = I(vr), t = (
|
|
2279
2285
|
/** @type {HTMLElement} */
|
|
2280
2286
|
e.querySelector(p(a.SEARCH__SEARCH_BACKDROP))
|
|
@@ -2320,7 +2326,7 @@ function Ke() {
|
|
|
2320
2326
|
}, e.onkeyup = (s) => {
|
|
2321
2327
|
(s.code === "Escape" || s.key === "Escape") && (s.preventDefault(), s.stopPropagation(), xe());
|
|
2322
2328
|
}, n.addEventListener("focusout", (s) => {
|
|
2323
|
-
s.preventDefault(), s.stopPropagation(), be[
|
|
2329
|
+
s.preventDefault(), s.stopPropagation(), be[tt.SHIFT] ? o.focus() : i.focus();
|
|
2324
2330
|
});
|
|
2325
2331
|
const u = e.querySelector(".search-modal__hidden-last-focusable");
|
|
2326
2332
|
if (!u)
|
|
@@ -2344,7 +2350,7 @@ function br() {
|
|
|
2344
2350
|
if (!l)
|
|
2345
2351
|
throw new Error("renderMainMenu(): mainMenuTop not found");
|
|
2346
2352
|
e.mainMenu.menuItems.forEach((c) => {
|
|
2347
|
-
var
|
|
2353
|
+
var v, T;
|
|
2348
2354
|
const d = I(mr);
|
|
2349
2355
|
l.appendChild(d);
|
|
2350
2356
|
const m = O(
|
|
@@ -2355,13 +2361,13 @@ function br() {
|
|
|
2355
2361
|
m.querySelector(p(a.MENU_ITEM__BUTTON_TITLE)),
|
|
2356
2362
|
`renderMainMenu(): button title not found for ${c.title}`
|
|
2357
2363
|
);
|
|
2358
|
-
f.setAttribute("id", `${a.MENU_ITEM__BUTTON_TITLE}__${c.title}-${
|
|
2364
|
+
f.setAttribute("id", `${a.MENU_ITEM__BUTTON_TITLE}__${c.title}-${R()}`);
|
|
2359
2365
|
const h = O(
|
|
2360
2366
|
/** @type {HTMLElement} */
|
|
2361
2367
|
m.querySelector(p(a.MENU_ITEM__LINK_TITLE)),
|
|
2362
2368
|
`renderMainMenu(): link title not found for ${c.title}`
|
|
2363
2369
|
);
|
|
2364
|
-
h.setAttribute("id", `${a.MENU_ITEM__LINK_TITLE}__${c.title}-${
|
|
2370
|
+
h.setAttribute("id", `${a.MENU_ITEM__LINK_TITLE}__${c.title}-${R()}`);
|
|
2365
2371
|
let _;
|
|
2366
2372
|
if (c.actionFunctionUrl || c.actionUrl)
|
|
2367
2373
|
_ = h, f.remove();
|
|
@@ -2373,42 +2379,42 @@ function br() {
|
|
|
2373
2379
|
_.querySelector(p(a.MENU_ITEM__LINK_TITLE_SPAN)),
|
|
2374
2380
|
`renderMainMenu(): main menu item title span not found for: ${c.title}`
|
|
2375
2381
|
);
|
|
2376
|
-
if ((c.isSelected || c.actionMenu &&
|
|
2382
|
+
if ((c.isSelected || c.actionMenu && Fe(c.actionMenu, ["actionMenu"], (g) => !!g.isSelected)) && _.classList.add(a.MENU_ITEM__SELECTED), c.actionMenu) {
|
|
2377
2383
|
E.innerHTML = c.title;
|
|
2378
|
-
const
|
|
2384
|
+
const g = {
|
|
2379
2385
|
menuItems: c.actionMenu,
|
|
2380
2386
|
title: c.title
|
|
2381
|
-
}, w =
|
|
2382
|
-
|
|
2387
|
+
}, w = _t(
|
|
2388
|
+
g,
|
|
2383
2389
|
_,
|
|
2384
2390
|
{
|
|
2385
|
-
childrenMenuType: c.childrenMenuType ||
|
|
2391
|
+
childrenMenuType: c.childrenMenuType || j.FLYOUT
|
|
2386
2392
|
}
|
|
2387
2393
|
);
|
|
2388
2394
|
d.appendChild(w), ye(d, _, w, "menu", { shouldFocusOnHover: !0 });
|
|
2389
|
-
let
|
|
2395
|
+
let b;
|
|
2390
2396
|
switch (c.childrenMenuType) {
|
|
2391
|
-
case
|
|
2392
|
-
|
|
2397
|
+
case j.INLINE:
|
|
2398
|
+
b = a.MENU_ITEM__INLINE;
|
|
2393
2399
|
break;
|
|
2394
|
-
case
|
|
2395
|
-
|
|
2400
|
+
case j.MEGA_MENU:
|
|
2401
|
+
b = a.MENU_ITEM__MEGA_MENU;
|
|
2396
2402
|
break;
|
|
2397
|
-
case
|
|
2403
|
+
case j.FLYOUT:
|
|
2398
2404
|
default:
|
|
2399
|
-
|
|
2405
|
+
b = a.MENU_ITEM__FLY_OUT;
|
|
2400
2406
|
break;
|
|
2401
2407
|
}
|
|
2402
|
-
d.classList.add(
|
|
2408
|
+
d.classList.add(b);
|
|
2403
2409
|
} else
|
|
2404
2410
|
O(
|
|
2405
2411
|
_.querySelector(p(a.MENU_ITEM__ARROW)),
|
|
2406
2412
|
`renderMainMenu(): menu arrow not found for ${c.title}`
|
|
2407
2413
|
).remove();
|
|
2408
|
-
c.actionFunction ? (E.innerHTML = c.title, _.onclick = c.actionFunction) : c.actionFunctionUrl ? (E.innerHTML = c.title, _.setAttribute("href", c.actionFunctionUrl.url), _.onclick = (
|
|
2409
|
-
var w,
|
|
2410
|
-
(w = c.actionFunctionUrl) != null && w.skipHandleEvent || (
|
|
2411
|
-
}) : c.actionUrl && (E.innerHTML = c.title, _.setAttribute("href", c.actionUrl.url)), ((
|
|
2414
|
+
c.actionFunction ? (E.innerHTML = c.title, _.onclick = c.actionFunction) : c.actionFunctionUrl ? (E.innerHTML = c.title, _.setAttribute("href", c.actionFunctionUrl.url), _.onclick = (g) => {
|
|
2415
|
+
var w, b;
|
|
2416
|
+
(w = c.actionFunctionUrl) != null && w.skipHandleEvent || (g.stopPropagation(), g.preventDefault()), (b = c.actionFunctionUrl) == null || b.actionFunction(g);
|
|
2417
|
+
}) : c.actionUrl && (E.innerHTML = c.title, _.setAttribute("href", c.actionUrl.url)), ((v = c.actionUrl) != null && v.openInNewTab || (T = c.actionFunctionUrl) != null && T.openInNewTab) && (_.setAttribute("target", "_blank"), _.appendChild(I(Gt)));
|
|
2412
2418
|
});
|
|
2413
2419
|
}
|
|
2414
2420
|
let i = null;
|
|
@@ -2427,12 +2433,12 @@ function br() {
|
|
|
2427
2433
|
if (e.onSearch) {
|
|
2428
2434
|
if (Ae(u, document.createTextNode("Search")), u.onclick)
|
|
2429
2435
|
throw new Error("searchIcon already has onclick");
|
|
2430
|
-
if (u.onclick = () =>
|
|
2436
|
+
if (u.onclick = () => je(), !e.mainMenu) {
|
|
2431
2437
|
const l = O(
|
|
2432
2438
|
document.querySelector(p(a.CITIZEN_EXPERIENCE)),
|
|
2433
2439
|
"renderMainMenu: citizen experience wrapper not found"
|
|
2434
2440
|
), c = I(u.outerHTML);
|
|
2435
|
-
if (Ae(c, document.createTextNode("Search")), c.onclick = () =>
|
|
2441
|
+
if (Ae(c, document.createTextNode("Search")), c.onclick = () => je(), u.classList.add(a.DESKTOP__HIDDEN), e.utahId !== !1) {
|
|
2436
2442
|
const d = O(document.querySelector(p(a.UTAH_ID)), "renderMainMenu: utahId wrapper not found");
|
|
2437
2443
|
l.insertBefore(c, d);
|
|
2438
2444
|
} else
|
|
@@ -2445,7 +2451,7 @@ function br() {
|
|
|
2445
2451
|
);
|
|
2446
2452
|
if (Ae(l, document.createTextNode("Search")), l.onclick)
|
|
2447
2453
|
throw new Error("searchIconMobile already has onclick");
|
|
2448
|
-
l.onclick = () =>
|
|
2454
|
+
l.onclick = () => je(), O(
|
|
2449
2455
|
document.querySelector(p(a.CITIZEN_EXPERIENCE_MOBILE)),
|
|
2450
2456
|
"renderMainMenu: citizen-experience--mobile not found"
|
|
2451
2457
|
).appendChild(l);
|
|
@@ -2533,7 +2539,7 @@ function Tr() {
|
|
|
2533
2539
|
const r = document.querySelectorAll(p(a.TOOLTIP__WRAPPER));
|
|
2534
2540
|
r == null || r.forEach((i) => {
|
|
2535
2541
|
i.classList.add(a.TOOLTIP__WRAPPER__HIDDEN), i.classList.remove(a.TOOLTIP__WRAPPER__VISIBLE);
|
|
2536
|
-
}),
|
|
2542
|
+
}), Ve();
|
|
2537
2543
|
}
|
|
2538
2544
|
function gr() {
|
|
2539
2545
|
const e = I(Ir), n = (
|
|
@@ -2555,16 +2561,16 @@ function gr() {
|
|
|
2555
2561
|
});
|
|
2556
2562
|
}, o.onclick = () => {
|
|
2557
2563
|
e.classList.toggle(a.VISUALLY_HIDDEN), n.focus(), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true");
|
|
2558
|
-
}, o.id || (o.id =
|
|
2564
|
+
}, o.id || (o.id = R()), e.id || (e.id = R()), n.setAttribute("aria-controls", e.id), n.setAttribute("aria-expanded", "false"), e.setAttribute("aria-hidden", "true"), e.setAttribute("aria-labelledby", n.id), e;
|
|
2559
2565
|
}
|
|
2560
2566
|
function Mr(e) {
|
|
2561
2567
|
var l, c;
|
|
2562
2568
|
const { hamburger: t } = we("hookupHamburger"), n = L();
|
|
2563
2569
|
if ((l = n.actionItems) == null ? void 0 : l.some((d) => !!d.badge)) {
|
|
2564
|
-
const d =
|
|
2570
|
+
const d = ht({ label: "Home Badge" });
|
|
2565
2571
|
d && t.appendChild(d);
|
|
2566
2572
|
}
|
|
2567
|
-
|
|
2573
|
+
Ve();
|
|
2568
2574
|
function r() {
|
|
2569
2575
|
const d = O(
|
|
2570
2576
|
/** @type {HTMLElement} */
|
|
@@ -2586,7 +2592,7 @@ function Mr(e) {
|
|
|
2586
2592
|
throw new Error("mobileMenuInteractionHandler: mobileMainMenuContentItemId not found");
|
|
2587
2593
|
(u || i).setAttribute("aria-controls", d), e.setAttribute("aria-labelledby", s);
|
|
2588
2594
|
}
|
|
2589
|
-
|
|
2595
|
+
rt(
|
|
2590
2596
|
t,
|
|
2591
2597
|
() => r().actionItemWrapper,
|
|
2592
2598
|
() => r().actionItem,
|
|
@@ -2595,7 +2601,7 @@ function Mr(e) {
|
|
|
2595
2601
|
ariaHasPopupType: "menu",
|
|
2596
2602
|
shouldOnClickCloseMenu: !0
|
|
2597
2603
|
}
|
|
2598
|
-
),
|
|
2604
|
+
), J(!!t.onblur, "hookupHamburger: hamburger already has an onblur event"), t.onblur = () => {
|
|
2599
2605
|
const { mobileMenu: d } = we("showMobileMenu");
|
|
2600
2606
|
if (d.classList.contains(a.IS_OPEN)) {
|
|
2601
2607
|
const m = p(a.MOBILE_MENU__ACTION_BAR), f = p(a.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER), h = p(a.ICON_BUTTON), _ = (
|
|
@@ -2641,10 +2647,10 @@ function Ar(e) {
|
|
|
2641
2647
|
else if (e.currentUser === null || e.currentUser)
|
|
2642
2648
|
t = Ie.PROVIDED;
|
|
2643
2649
|
else
|
|
2644
|
-
throw new Error(
|
|
2650
|
+
throw new Error("determineFetchStyle: Unknown utah id fetch style");
|
|
2645
2651
|
return t;
|
|
2646
2652
|
}
|
|
2647
|
-
const
|
|
2653
|
+
const W = {
|
|
2648
2654
|
// null = not yet loaded, false = ajaxing, true = have a result (may be error or user data)
|
|
2649
2655
|
isDefinitive: null,
|
|
2650
2656
|
lastError: null,
|
|
@@ -2663,10 +2669,10 @@ const wr = 500;
|
|
|
2663
2669
|
let Ft = NaN;
|
|
2664
2670
|
async function un() {
|
|
2665
2671
|
var o, r;
|
|
2666
|
-
let e = Promise.resolve(
|
|
2672
|
+
let e = Promise.resolve(W);
|
|
2667
2673
|
const t = L(), n = Ar(t.utahId);
|
|
2668
|
-
if (
|
|
2669
|
-
e = Promise.resolve(
|
|
2674
|
+
if (W.isDefinitive === !1)
|
|
2675
|
+
e = Promise.resolve(W);
|
|
2670
2676
|
else if (kt)
|
|
2671
2677
|
clearTimeout(Ft), e = new Promise((i) => {
|
|
2672
2678
|
Ft = window.setTimeout(
|
|
@@ -2683,14 +2689,14 @@ async function un() {
|
|
|
2683
2689
|
userInfo: null
|
|
2684
2690
|
});
|
|
2685
2691
|
else if (t.utahId === !0 || ((o = t.utahId) == null ? void 0 : o.currentUser) === void 0)
|
|
2686
|
-
(n !== xt ||
|
|
2692
|
+
(n !== xt || W.isDefinitive === null) && (W.isDefinitive = !1, e = fetch(Pe.USER_INFO, { credentials: "include" }).then((i) => i.json()).then((i) => {
|
|
2687
2693
|
if (i.status === 200)
|
|
2688
|
-
|
|
2694
|
+
W.lastError = null, W.userInfo = /** @type {UserInfo} */
|
|
2689
2695
|
i.data;
|
|
2690
2696
|
else
|
|
2691
2697
|
throw new Error(i.err);
|
|
2692
|
-
return
|
|
2693
|
-
}).catch((i) => (
|
|
2698
|
+
return W;
|
|
2699
|
+
}).catch((i) => (W.lastError = i, W.userInfo = null, W)).finally(() => (W.isDefinitive = !0, Wt(W), W)));
|
|
2694
2700
|
else {
|
|
2695
2701
|
const i = {
|
|
2696
2702
|
isDefinitive: !0,
|
|
@@ -2702,7 +2708,7 @@ async function un() {
|
|
|
2702
2708
|
return xt = n, e;
|
|
2703
2709
|
}
|
|
2704
2710
|
function Or() {
|
|
2705
|
-
return
|
|
2711
|
+
return W;
|
|
2706
2712
|
}
|
|
2707
2713
|
function Lr() {
|
|
2708
2714
|
const e = document.getElementById(a.MOBILE_MENU_ACTON_BAR__PROFILE_ID);
|
|
@@ -2737,8 +2743,8 @@ function yr(e, t) {
|
|
|
2737
2743
|
);
|
|
2738
2744
|
if (!u)
|
|
2739
2745
|
throw new Error("hookupHamburger: profileActionItemWrapper not found");
|
|
2740
|
-
const s =
|
|
2741
|
-
|
|
2746
|
+
const s = ot(t);
|
|
2747
|
+
rt(
|
|
2742
2748
|
o,
|
|
2743
2749
|
s,
|
|
2744
2750
|
u,
|
|
@@ -2765,7 +2771,7 @@ function Pr() {
|
|
|
2765
2771
|
return he(
|
|
2766
2772
|
e.mainMenu && ((t = e.mainMenu) == null ? void 0 : t.menuItems) || void 0,
|
|
2767
2773
|
{
|
|
2768
|
-
childrenMenuType:
|
|
2774
|
+
childrenMenuType: j.INLINE,
|
|
2769
2775
|
removePopupArrow: !0
|
|
2770
2776
|
}
|
|
2771
2777
|
);
|
|
@@ -2817,7 +2823,7 @@ function Nr() {
|
|
|
2817
2823
|
);
|
|
2818
2824
|
if (!f)
|
|
2819
2825
|
throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");
|
|
2820
|
-
|
|
2826
|
+
Xe(f, c);
|
|
2821
2827
|
}
|
|
2822
2828
|
};
|
|
2823
2829
|
}
|
|
@@ -2849,11 +2855,11 @@ function Ur() {
|
|
|
2849
2855
|
if (n.length > 1)
|
|
2850
2856
|
throw new Error("loadHeader: domLocationTarget must only have one target specified");
|
|
2851
2857
|
if (e.domLocationTarget.cssSelector)
|
|
2852
|
-
t = document.querySelector(e.domLocationTarget.cssSelector),
|
|
2858
|
+
t = document.querySelector(e.domLocationTarget.cssSelector), J(!t, `loadHeader: element not found for domLocationTarget.cssSelector ${e.domLocationTarget.cssSelector}`);
|
|
2853
2859
|
else if (e.domLocationTarget.element)
|
|
2854
2860
|
t = e.domLocationTarget.element;
|
|
2855
2861
|
else if (e.domLocationTarget.elementFunction)
|
|
2856
|
-
t = e.domLocationTarget.elementFunction(),
|
|
2862
|
+
t = e.domLocationTarget.elementFunction(), J(!t, "loadHeader: element not returned from domLocationTarget.elementFunction");
|
|
2857
2863
|
else
|
|
2858
2864
|
throw new Error("loadHeader: domLocationTarget must have at least one field set");
|
|
2859
2865
|
}
|
|
@@ -2878,10 +2884,10 @@ function Cr() {
|
|
|
2878
2884
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop not found");
|
|
2879
2885
|
if (l.onclick)
|
|
2880
2886
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop already has onclick");
|
|
2881
|
-
l.onclick = () =>
|
|
2887
|
+
l.onclick = () => Ve();
|
|
2882
2888
|
const c = Pr(), d = rn(c, "Main Menu");
|
|
2883
2889
|
d.appendChild(c);
|
|
2884
|
-
const m =
|
|
2890
|
+
const m = ot(d);
|
|
2885
2891
|
Mr(m), u ? ((t = u.closest("div")) == null || t.removeAttribute("aria-labelledby"), yr(s, u)) : Lr(), $o(), Nr(), Bo(), Sr(), un().catch((h) => console.error(h));
|
|
2886
2892
|
const f = L();
|
|
2887
2893
|
(!f.mainMenu && !f.actionItems && f.utahId === !1 && !f.onSearch || !f.mainMenu && !f.actionItems && f.utahId === !1 && f.onSearch || !f.mainMenu && f.actionItems && f.utahId === !1 && !f.onSearch) && (s.classList.add(a.MAIN_MENU__REMOVED), i.remove()), (!f.mainMenu && !f.actionItems && f.utahId && !f.onSearch || !f.mainMenu && f.actionItems && f.utahId && !f.onSearch || !f.mainMenu && f.actionItems && !f.utahId && f.onSearch) && i.classList.add(a.DESKTOP__HIDDEN);
|
|
@@ -2905,16 +2911,20 @@ const Br = setInterval(
|
|
|
2905
2911
|
2
|
|
2906
2912
|
);
|
|
2907
2913
|
function Hr(e) {
|
|
2908
|
-
return
|
|
2914
|
+
return ke.setSettings(e), dn = !0, document != null && document.body ? qt() : window.addEventListener("load", () => qt()), ke.getSettings();
|
|
2915
|
+
}
|
|
2916
|
+
function xr(e) {
|
|
2917
|
+
return Hr({ ...Ze, ...ke.getSettings(), footer: e });
|
|
2909
2918
|
}
|
|
2910
2919
|
export {
|
|
2911
|
-
|
|
2912
|
-
|
|
2920
|
+
j as childrenMenuTypes,
|
|
2921
|
+
Ze as defaultSettings,
|
|
2913
2922
|
$t as events,
|
|
2914
2923
|
L as getUtahHeaderSettings,
|
|
2915
2924
|
Cr as loadHeader,
|
|
2916
2925
|
Rr as removeHeader,
|
|
2917
2926
|
I as renderDOMSingle,
|
|
2927
|
+
xr as setUtahFooterSettings,
|
|
2918
2928
|
Hr as setUtahHeaderSettings,
|
|
2919
2929
|
Te as sizes
|
|
2920
2930
|
};
|