@utahdts/utah-design-system-header 0.6.0-beta.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const hn = "@utahdts/utah-design-system-header", _n = "0.6.0-beta.0", mn = "Utah Header for the Utah Design System", vn = {
|
|
1
|
+
const hn = "@utahdts/utah-design-system-header", _n = "0.6.0", mn = "Utah Header for the Utah Design System", vn = {
|
|
3
2
|
".": {
|
|
4
3
|
"development-local": "./src/index.js",
|
|
5
4
|
development: "./dist/utah-design-system-header.es.js",
|
|
@@ -21,7 +20,6 @@ const hn = "@utahdts/utah-design-system-header", _n = "0.6.0-beta.0", mn = "Utah
|
|
|
21
20
|
build: "vite build",
|
|
22
21
|
preview: "vite preview",
|
|
23
22
|
publishHeader: "npm publish --access public",
|
|
24
|
-
publishHeaderBeta: "npm publish --access public --tag beta",
|
|
25
23
|
"sass-build": "sass --no-source-map ./src/css/index.scss ./src/css/build/utah-design-system-header.css",
|
|
26
24
|
"test-publish": "npm publish --dry-run",
|
|
27
25
|
test: "vitest",
|
|
@@ -30,12 +28,11 @@ const hn = "@utahdts/utah-design-system-header", _n = "0.6.0-beta.0", mn = "Utah
|
|
|
30
28
|
}, In = {
|
|
31
29
|
type: "git",
|
|
32
30
|
url: "git+https://github.com/utahdts/utah-design-system.git"
|
|
33
|
-
},
|
|
31
|
+
}, Tn = "Apache-2.0", wn = {
|
|
34
32
|
url: "https://github.com/utahdts/utah-design-system/issues"
|
|
35
|
-
},
|
|
36
|
-
"@popperjs/core": "2.11.7"
|
|
37
|
-
|
|
38
|
-
}, yn = {
|
|
33
|
+
}, Mn = "https://github.com/utahdts/utah-design-system#readme", An = {
|
|
34
|
+
"@popperjs/core": "2.11.7"
|
|
35
|
+
}, On = {
|
|
39
36
|
eslint: "8.38.0",
|
|
40
37
|
"eslint-config-airbnb": "19.0.4",
|
|
41
38
|
"eslint-plugin-import": "2.27.5",
|
|
@@ -44,7 +41,7 @@ const hn = "@utahdts/utah-design-system-header", _n = "0.6.0-beta.0", mn = "Utah
|
|
|
44
41
|
vite: "4.2.2",
|
|
45
42
|
"vite-plugin-eslint": "1.8.1",
|
|
46
43
|
vitest: "0.30.1"
|
|
47
|
-
},
|
|
44
|
+
}, yn = "module", Pn = {
|
|
48
45
|
name: hn,
|
|
49
46
|
version: _n,
|
|
50
47
|
description: mn,
|
|
@@ -53,12 +50,12 @@ const hn = "@utahdts/utah-design-system-header", _n = "0.6.0-beta.0", mn = "Utah
|
|
|
53
50
|
files: bn,
|
|
54
51
|
scripts: gn,
|
|
55
52
|
repository: In,
|
|
56
|
-
license:
|
|
57
|
-
bugs:
|
|
58
|
-
homepage:
|
|
53
|
+
license: Tn,
|
|
54
|
+
bugs: wn,
|
|
55
|
+
homepage: Mn,
|
|
59
56
|
dependencies: An,
|
|
60
|
-
devDependencies:
|
|
61
|
-
type:
|
|
57
|
+
devDependencies: On,
|
|
58
|
+
type: yn
|
|
62
59
|
};
|
|
63
60
|
const W = {
|
|
64
61
|
FLYOUT: (
|
|
@@ -287,7 +284,7 @@ const s = {
|
|
|
287
284
|
UTAH_ID: "utds-utah-id-wrapper",
|
|
288
285
|
UTAH_ID__BUTTON: "utds-utah-id__button"
|
|
289
286
|
};
|
|
290
|
-
function
|
|
287
|
+
function wt(e, t) {
|
|
291
288
|
if (e)
|
|
292
289
|
throw new Error(t);
|
|
293
290
|
}
|
|
@@ -672,22 +669,22 @@ function kn(e) {
|
|
|
672
669
|
if (!e.showTitle && !e.logo)
|
|
673
670
|
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.");
|
|
674
671
|
}
|
|
675
|
-
function
|
|
672
|
+
function Mt() {
|
|
676
673
|
Jo(!1), Qo();
|
|
677
674
|
}
|
|
678
|
-
let
|
|
675
|
+
let Ft = !1;
|
|
679
676
|
const Wn = 15e3;
|
|
680
677
|
let At = 0;
|
|
681
678
|
const qn = setInterval(
|
|
682
679
|
() => {
|
|
683
|
-
At += 1, At >= Wn ||
|
|
680
|
+
At += 1, At >= Wn || Ft ? clearInterval(qn) : document.dispatchEvent(new Event(qt.HEADER_LOADED));
|
|
684
681
|
},
|
|
685
682
|
2
|
|
686
683
|
);
|
|
687
|
-
function
|
|
688
|
-
return De = { ...Cn, ...e }, kn(De),
|
|
684
|
+
function ei(e) {
|
|
685
|
+
return De = { ...Cn, ...e }, kn(De), Ft = !0, document != null && document.body ? Mt() : window.addEventListener("load", () => Mt()), De;
|
|
689
686
|
}
|
|
690
|
-
const
|
|
687
|
+
const Fn = `<div class="utds-header-mobile-menu__content-item" role="tabpanel">
|
|
691
688
|
</div>
|
|
692
689
|
`;
|
|
693
690
|
function C() {
|
|
@@ -697,26 +694,26 @@ function C() {
|
|
|
697
694
|
(e) => (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> e) / 4).toString(16)
|
|
698
695
|
);
|
|
699
696
|
}
|
|
700
|
-
function
|
|
697
|
+
function Qe(e) {
|
|
701
698
|
const t = document.querySelector(f(s.MOBILE_MENU__WRAPPER));
|
|
702
699
|
if (!t)
|
|
703
700
|
throw new Error("addMobileMenuContentItem: mobileMenuWrapper not found");
|
|
704
701
|
const n = t.querySelector(f(s.MOBILE_MENU__CONTENT));
|
|
705
702
|
if (!n)
|
|
706
703
|
throw new Error("addMobileMenuContentItem: mobileContentWrapper not found");
|
|
707
|
-
const r = I(
|
|
704
|
+
const r = I(Fn);
|
|
708
705
|
return r.appendChild(e), n.appendChild(r), r.setAttribute("id", C()), r;
|
|
709
706
|
}
|
|
710
|
-
const
|
|
707
|
+
const Vn = `<div class="utds-badge__wrapper">
|
|
711
708
|
<span class="utds-badge__value"></span>
|
|
712
709
|
<span class="utds-badge__label visually-hidden"></span>
|
|
713
710
|
</div>
|
|
714
711
|
`;
|
|
715
|
-
function
|
|
712
|
+
function Je(e) {
|
|
716
713
|
let t = null;
|
|
717
714
|
if (e) {
|
|
718
715
|
t = /** @type {HTMLElement} */
|
|
719
|
-
I(
|
|
716
|
+
I(Vn), t.classList.add(s.BADGE_WRAPPER__ACTION_ITEM);
|
|
720
717
|
const n = t.querySelector(f(s.BADGE__LABEL));
|
|
721
718
|
if (!n)
|
|
722
719
|
throw new Error("renderActionItemBadge: badgeLabel not found");
|
|
@@ -731,7 +728,7 @@ function et(e) {
|
|
|
731
728
|
}
|
|
732
729
|
return t;
|
|
733
730
|
}
|
|
734
|
-
function
|
|
731
|
+
function et(e) {
|
|
735
732
|
const t = (
|
|
736
733
|
/** @type {HTMLElement} */
|
|
737
734
|
document.querySelector(f(s.MOBILE_MENU))
|
|
@@ -753,22 +750,22 @@ function tt(e) {
|
|
|
753
750
|
mobileMenu: t
|
|
754
751
|
};
|
|
755
752
|
}
|
|
756
|
-
function
|
|
757
|
-
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } =
|
|
753
|
+
function tt() {
|
|
754
|
+
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } = et("hideMobileMenu");
|
|
758
755
|
e.setAttribute("aria-expanded", "false"), n.classList.remove(s.IS_OPEN), t.classList.add("utds-icon-before-hamburger"), t.classList.remove("utds-icon-before-x-icon");
|
|
759
756
|
}
|
|
760
757
|
function Gn() {
|
|
761
|
-
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } =
|
|
758
|
+
const { hamburger: e, hamburgerIcon: t, mobileMenu: n } = et("showMobileMenu");
|
|
762
759
|
e.setAttribute("aria-expanded", "true"), n.classList.add(s.IS_OPEN), t.classList.remove("utds-icon-before-hamburger"), t.classList.add("utds-icon-before-x-icon");
|
|
763
760
|
}
|
|
764
761
|
function $n(e) {
|
|
765
762
|
var c;
|
|
766
|
-
const { hamburger: t } =
|
|
763
|
+
const { hamburger: t } = et("hookupHamburger");
|
|
767
764
|
if ((c = P().actionItems) == null ? void 0 : c.some((a) => !!a.badge)) {
|
|
768
|
-
const a =
|
|
765
|
+
const a = Je({ label: "Home Badge" });
|
|
769
766
|
a && t.appendChild(a);
|
|
770
767
|
}
|
|
771
|
-
|
|
768
|
+
tt();
|
|
772
769
|
const o = document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID);
|
|
773
770
|
if (!o)
|
|
774
771
|
throw new Error("hookupHamburger: homeActionItem not found");
|
|
@@ -778,7 +775,7 @@ function $n(e) {
|
|
|
778
775
|
);
|
|
779
776
|
if (!i)
|
|
780
777
|
throw new Error("hookupHamburger: homeActionItemWrapper not found");
|
|
781
|
-
|
|
778
|
+
nt(
|
|
782
779
|
t,
|
|
783
780
|
e,
|
|
784
781
|
i,
|
|
@@ -798,10 +795,10 @@ function $e(e, t) {
|
|
|
798
795
|
throw new Error("showActionItem: actionWrapper does not have actionItem");
|
|
799
796
|
n.setAttribute("aria-selected", "true"), n.removeAttribute("tabIndex"), n.focus();
|
|
800
797
|
}
|
|
801
|
-
function
|
|
798
|
+
function Ot(e, t) {
|
|
802
799
|
e.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach((n) => n.classList.remove(s.IS_OPEN)), t.classList.add(s.IS_OPEN);
|
|
803
800
|
}
|
|
804
|
-
function
|
|
801
|
+
function nt(e, t, n, {
|
|
805
802
|
ariaHasPopupType: r,
|
|
806
803
|
onClickHandler: o,
|
|
807
804
|
shouldOnClickCloseMenu: i
|
|
@@ -839,12 +836,12 @@ function rt(e, t, n, {
|
|
|
839
836
|
if (e.onclick)
|
|
840
837
|
throw new Error("mobileMenuInteractionHandler: interactiveElement already has onclick");
|
|
841
838
|
if (e.onclick = (_) => {
|
|
842
|
-
o && o(_) || (c.classList.contains(s.IS_OPEN) ? i &&
|
|
839
|
+
o && o(_) || (c.classList.contains(s.IS_OPEN) ? i && tt() : (Gn(), t && Ot(l, t), $e(a, n)));
|
|
843
840
|
}, t) {
|
|
844
841
|
if (n !== e && n.onclick)
|
|
845
842
|
throw new Error("mobileMenuInteractionHandler: actionItemWrapper already has onclick");
|
|
846
843
|
n.onclick = (_) => {
|
|
847
|
-
o && o(_) || (
|
|
844
|
+
o && o(_) || (Ot(l, t), $e(a, n));
|
|
848
845
|
};
|
|
849
846
|
}
|
|
850
847
|
}
|
|
@@ -859,7 +856,7 @@ const jn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
859
856
|
<div class="vertical-menu__wrapper-title"></div>
|
|
860
857
|
</div>
|
|
861
858
|
`, zn = `<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
|
|
862
|
-
`,
|
|
859
|
+
`, Vt = `<span class="utds-new-tab-link-a11y">
|
|
863
860
|
<span class="visually-hidden">opens in a new tab</span>
|
|
864
861
|
<span class="utds-icon-after-external-link" aria-hidden="true"></span>
|
|
865
862
|
</span>
|
|
@@ -876,13 +873,74 @@ const jn = `<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
|
876
873
|
</span>
|
|
877
874
|
<span class="vertical-menu__divider" />
|
|
878
875
|
</li>
|
|
879
|
-
|
|
876
|
+
`, rt = {
|
|
877
|
+
AUTO: (
|
|
878
|
+
/** @type {PopupPlacement} */
|
|
879
|
+
"auto"
|
|
880
|
+
),
|
|
881
|
+
AUTO_START: (
|
|
882
|
+
/** @type {PopupPlacement} */
|
|
883
|
+
"auto-start"
|
|
884
|
+
),
|
|
885
|
+
AUTO_END: (
|
|
886
|
+
/** @type {PopupPlacement} */
|
|
887
|
+
"auto-end"
|
|
888
|
+
),
|
|
889
|
+
BOTTOM: (
|
|
890
|
+
/** @type {PopupPlacement} */
|
|
891
|
+
"bottom"
|
|
892
|
+
),
|
|
893
|
+
BOTTOM_START: (
|
|
894
|
+
/** @type {PopupPlacement} */
|
|
895
|
+
"bottom-start"
|
|
896
|
+
),
|
|
897
|
+
BOTTOM_END: (
|
|
898
|
+
/** @type {PopupPlacement} */
|
|
899
|
+
"bottom-end"
|
|
900
|
+
),
|
|
901
|
+
LEFT: (
|
|
902
|
+
/** @type {PopupPlacement} */
|
|
903
|
+
"left"
|
|
904
|
+
),
|
|
905
|
+
LEFT_START: (
|
|
906
|
+
/** @type {PopupPlacement} */
|
|
907
|
+
"left-start"
|
|
908
|
+
),
|
|
909
|
+
LEFT_END: (
|
|
910
|
+
/** @type {PopupPlacement} */
|
|
911
|
+
"left-end"
|
|
912
|
+
),
|
|
913
|
+
RIGHT: (
|
|
914
|
+
/** @type {PopupPlacement} */
|
|
915
|
+
"right"
|
|
916
|
+
),
|
|
917
|
+
RIGHT_START: (
|
|
918
|
+
/** @type {PopupPlacement} */
|
|
919
|
+
"right-start"
|
|
920
|
+
),
|
|
921
|
+
RIGHT_END: (
|
|
922
|
+
/** @type {PopupPlacement} */
|
|
923
|
+
"right-end"
|
|
924
|
+
),
|
|
925
|
+
TOP: (
|
|
926
|
+
/** @type {PopupPlacement} */
|
|
927
|
+
"top"
|
|
928
|
+
),
|
|
929
|
+
TOP_START: (
|
|
930
|
+
/** @type {PopupPlacement} */
|
|
931
|
+
"top-start"
|
|
932
|
+
),
|
|
933
|
+
TOP_END: (
|
|
934
|
+
/** @type {PopupPlacement} */
|
|
935
|
+
"top-end"
|
|
936
|
+
)
|
|
937
|
+
};
|
|
880
938
|
function xe(e, t, n) {
|
|
881
939
|
var o;
|
|
882
940
|
let r = !1;
|
|
883
941
|
return e && (Array.isArray(e) ? r = e.some((i) => xe(i, t, n)) : (r = n(e), r || (r = !!((o = t == null ? void 0 : t.filter((i) => e[i])) != null && o.some((i) => xe(e[i], t, n)))))), r;
|
|
884
942
|
}
|
|
885
|
-
var x = "top",
|
|
943
|
+
var x = "top", V = "bottom", G = "right", H = "left", Be = "auto", Ae = [x, V, G, H], ue = "start", Ie = "end", Xn = "clippingParents", Gt = "viewport", ve = "popper", Qn = "reference", yt = /* @__PURE__ */ Ae.reduce(function(e, t) {
|
|
886
944
|
return e.concat([t + "-" + ue, t + "-" + Ie]);
|
|
887
945
|
}, []), $t = /* @__PURE__ */ [].concat(Ae, [Be]).reduce(function(e, t) {
|
|
888
946
|
return e.concat([t, t + "-" + ue, t + "-" + Ie]);
|
|
@@ -890,7 +948,7 @@ var x = "top", F = "bottom", G = "right", H = "left", Be = "auto", Ae = [x, F, G
|
|
|
890
948
|
function K(e) {
|
|
891
949
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
892
950
|
}
|
|
893
|
-
function
|
|
951
|
+
function F(e) {
|
|
894
952
|
if (e == null)
|
|
895
953
|
return window;
|
|
896
954
|
if (e.toString() !== "[object Window]") {
|
|
@@ -900,17 +958,17 @@ function V(e) {
|
|
|
900
958
|
return e;
|
|
901
959
|
}
|
|
902
960
|
function ae(e) {
|
|
903
|
-
var t =
|
|
961
|
+
var t = F(e).Element;
|
|
904
962
|
return e instanceof t || e instanceof Element;
|
|
905
963
|
}
|
|
906
964
|
function q(e) {
|
|
907
|
-
var t =
|
|
965
|
+
var t = F(e).HTMLElement;
|
|
908
966
|
return e instanceof t || e instanceof HTMLElement;
|
|
909
967
|
}
|
|
910
968
|
function ot(e) {
|
|
911
969
|
if (typeof ShadowRoot > "u")
|
|
912
970
|
return !1;
|
|
913
|
-
var t =
|
|
971
|
+
var t = F(e).ShadowRoot;
|
|
914
972
|
return e instanceof t || e instanceof ShadowRoot;
|
|
915
973
|
}
|
|
916
974
|
function lr(e) {
|
|
@@ -972,7 +1030,7 @@ function pe(e, t, n) {
|
|
|
972
1030
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
973
1031
|
var r = e.getBoundingClientRect(), o = 1, i = 1;
|
|
974
1032
|
t && q(e) && (o = e.offsetWidth > 0 && de(r.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && de(r.height) / e.offsetHeight || 1);
|
|
975
|
-
var c = ae(e) ?
|
|
1033
|
+
var c = ae(e) ? F(e) : window, a = c.visualViewport, l = !jt() && n, u = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, h = r.width / o, _ = r.height / i;
|
|
976
1034
|
return {
|
|
977
1035
|
width: h,
|
|
978
1036
|
height: _,
|
|
@@ -1008,7 +1066,7 @@ function Yt(e, t) {
|
|
|
1008
1066
|
return !1;
|
|
1009
1067
|
}
|
|
1010
1068
|
function Y(e) {
|
|
1011
|
-
return
|
|
1069
|
+
return F(e).getComputedStyle(e);
|
|
1012
1070
|
}
|
|
1013
1071
|
function dr(e) {
|
|
1014
1072
|
return ["table", "td", "th"].indexOf(K(e)) >= 0;
|
|
@@ -1051,8 +1109,8 @@ function pr(e) {
|
|
|
1051
1109
|
}
|
|
1052
1110
|
return null;
|
|
1053
1111
|
}
|
|
1054
|
-
function
|
|
1055
|
-
for (var t =
|
|
1112
|
+
function Oe(e) {
|
|
1113
|
+
for (var t = F(e), n = Pt(e); n && dr(n) && Y(n).position === "static"; )
|
|
1056
1114
|
n = Pt(n);
|
|
1057
1115
|
return n && (K(n) === "html" || K(n) === "body" && Y(n).position === "static") ? t : n || pr(e) || t;
|
|
1058
1116
|
}
|
|
@@ -1090,8 +1148,8 @@ var hr = function(t, n) {
|
|
|
1090
1148
|
function _r(e) {
|
|
1091
1149
|
var t, n = e.state, r = e.name, o = e.options, i = n.elements.arrow, c = n.modifiersData.popperOffsets, a = j(n.placement), l = at(a), u = [H, G].indexOf(a) >= 0, d = u ? "height" : "width";
|
|
1092
1150
|
if (!(!i || !c)) {
|
|
1093
|
-
var h = hr(o.padding, n), _ = it(i), p = l === "y" ? x : H, m = l === "y" ?
|
|
1094
|
-
n.modifiersData[r] = (t = {}, t[N] = L, t.centerOffset = L -
|
|
1151
|
+
var h = hr(o.padding, n), _ = it(i), p = l === "y" ? x : H, m = l === "y" ? V : G, E = n.rects.reference[d] + n.rects.reference[l] - c[l] - n.rects.popper[d], v = c[l] - n.rects.reference[l], T = Oe(i), M = T ? l === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, y = E / 2 - v / 2, b = h[p], g = M - _[d] - h[m], w = M / 2 - _[d] / 2 + y, L = be(b, w, g), N = l;
|
|
1152
|
+
n.modifiersData[r] = (t = {}, t[N] = L, t.centerOffset = L - w, t);
|
|
1095
1153
|
}
|
|
1096
1154
|
}
|
|
1097
1155
|
function mr(e) {
|
|
@@ -1138,22 +1196,22 @@ function Lt(e) {
|
|
|
1138
1196
|
y: E
|
|
1139
1197
|
};
|
|
1140
1198
|
p = v.x, E = v.y;
|
|
1141
|
-
var
|
|
1199
|
+
var T = c.hasOwnProperty("x"), M = c.hasOwnProperty("y"), y = H, b = x, g = window;
|
|
1142
1200
|
if (u) {
|
|
1143
|
-
var
|
|
1144
|
-
if (
|
|
1145
|
-
b =
|
|
1146
|
-
var S = h &&
|
|
1201
|
+
var w = Oe(n), L = "clientHeight", N = "clientWidth";
|
|
1202
|
+
if (w === F(n) && (w = Q(n), Y(w).position !== "static" && a === "absolute" && (L = "scrollHeight", N = "scrollWidth")), w = w, o === x || (o === H || o === G) && i === Ie) {
|
|
1203
|
+
b = V;
|
|
1204
|
+
var S = h && w === g && g.visualViewport ? g.visualViewport.height : (
|
|
1147
1205
|
// $FlowFixMe[prop-missing]
|
|
1148
|
-
|
|
1206
|
+
w[L]
|
|
1149
1207
|
);
|
|
1150
1208
|
E -= S - r.height, E *= l ? 1 : -1;
|
|
1151
1209
|
}
|
|
1152
|
-
if (o === H || (o === x || o ===
|
|
1153
|
-
|
|
1154
|
-
var U = h &&
|
|
1210
|
+
if (o === H || (o === x || o === V) && i === Ie) {
|
|
1211
|
+
y = G;
|
|
1212
|
+
var U = h && w === g && g.visualViewport ? g.visualViewport.width : (
|
|
1155
1213
|
// $FlowFixMe[prop-missing]
|
|
1156
|
-
|
|
1214
|
+
w[N]
|
|
1157
1215
|
);
|
|
1158
1216
|
p -= U - r.width, p *= l ? 1 : -1;
|
|
1159
1217
|
}
|
|
@@ -1163,15 +1221,15 @@ function Lt(e) {
|
|
|
1163
1221
|
}, u && Er), D = d === !0 ? br({
|
|
1164
1222
|
x: p,
|
|
1165
1223
|
y: E
|
|
1166
|
-
},
|
|
1224
|
+
}, F(n)) : {
|
|
1167
1225
|
x: p,
|
|
1168
1226
|
y: E
|
|
1169
1227
|
};
|
|
1170
1228
|
if (p = D.x, E = D.y, l) {
|
|
1171
1229
|
var R;
|
|
1172
|
-
return Object.assign({}, A, (R = {}, R[b] =
|
|
1230
|
+
return Object.assign({}, A, (R = {}, R[b] = M ? "0" : "", R[y] = T ? "0" : "", R.transform = (g.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + E + "px)" : "translate3d(" + p + "px, " + E + "px, 0)", R));
|
|
1173
1231
|
}
|
|
1174
|
-
return Object.assign({}, A, (t = {}, t[b] =
|
|
1232
|
+
return Object.assign({}, A, (t = {}, t[b] = M ? E + "px" : "", t[y] = T ? p + "px" : "", t.transform = "", t));
|
|
1175
1233
|
}
|
|
1176
1234
|
function gr(e) {
|
|
1177
1235
|
var t = e.state, n = e.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;
|
|
@@ -1217,8 +1275,8 @@ const Ir = {
|
|
|
1217
1275
|
var Ue = {
|
|
1218
1276
|
passive: !0
|
|
1219
1277
|
};
|
|
1220
|
-
function
|
|
1221
|
-
var t = e.state, n = e.instance, r = e.options, o = r.scroll, i = o === void 0 ? !0 : o, c = r.resize, a = c === void 0 ? !0 : c, l =
|
|
1278
|
+
function Tr(e) {
|
|
1279
|
+
var t = e.state, n = e.instance, r = e.options, o = r.scroll, i = o === void 0 ? !0 : o, c = r.resize, a = c === void 0 ? !0 : c, l = F(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1222
1280
|
return i && u.forEach(function(d) {
|
|
1223
1281
|
d.addEventListener("scroll", n.update, Ue);
|
|
1224
1282
|
}), a && l.addEventListener("resize", n.update, Ue), function() {
|
|
@@ -1227,16 +1285,16 @@ function wr(e) {
|
|
|
1227
1285
|
}), a && l.removeEventListener("resize", n.update, Ue);
|
|
1228
1286
|
};
|
|
1229
1287
|
}
|
|
1230
|
-
const
|
|
1288
|
+
const wr = {
|
|
1231
1289
|
name: "eventListeners",
|
|
1232
1290
|
enabled: !0,
|
|
1233
1291
|
phase: "write",
|
|
1234
1292
|
fn: function() {
|
|
1235
1293
|
},
|
|
1236
|
-
effect:
|
|
1294
|
+
effect: Tr,
|
|
1237
1295
|
data: {}
|
|
1238
1296
|
};
|
|
1239
|
-
var
|
|
1297
|
+
var Mr = {
|
|
1240
1298
|
left: "right",
|
|
1241
1299
|
right: "left",
|
|
1242
1300
|
bottom: "top",
|
|
@@ -1244,7 +1302,7 @@ var Tr = {
|
|
|
1244
1302
|
};
|
|
1245
1303
|
function Re(e) {
|
|
1246
1304
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1247
|
-
return
|
|
1305
|
+
return Mr[t];
|
|
1248
1306
|
});
|
|
1249
1307
|
}
|
|
1250
1308
|
var Ar = {
|
|
@@ -1257,7 +1315,7 @@ function Nt(e) {
|
|
|
1257
1315
|
});
|
|
1258
1316
|
}
|
|
1259
1317
|
function st(e) {
|
|
1260
|
-
var t =
|
|
1318
|
+
var t = F(e), n = t.pageXOffset, r = t.pageYOffset;
|
|
1261
1319
|
return {
|
|
1262
1320
|
scrollLeft: n,
|
|
1263
1321
|
scrollTop: r
|
|
@@ -1266,8 +1324,8 @@ function st(e) {
|
|
|
1266
1324
|
function lt(e) {
|
|
1267
1325
|
return pe(Q(e)).left + st(e).scrollLeft;
|
|
1268
1326
|
}
|
|
1269
|
-
function
|
|
1270
|
-
var n =
|
|
1327
|
+
function Or(e, t) {
|
|
1328
|
+
var n = F(e), r = Q(e), o = n.visualViewport, i = r.clientWidth, c = r.clientHeight, a = 0, l = 0;
|
|
1271
1329
|
if (o) {
|
|
1272
1330
|
i = o.width, c = o.height;
|
|
1273
1331
|
var u = jt();
|
|
@@ -1280,7 +1338,7 @@ function yr(e, t) {
|
|
|
1280
1338
|
y: l
|
|
1281
1339
|
};
|
|
1282
1340
|
}
|
|
1283
|
-
function
|
|
1341
|
+
function yr(e) {
|
|
1284
1342
|
var t, n = Q(e), r = st(e), o = (t = e.ownerDocument) == null ? void 0 : t.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 + lt(e), l = -r.scrollTop;
|
|
1285
1343
|
return Y(o || n).direction === "rtl" && (a += ie(n.clientWidth, o ? o.clientWidth : 0) - i), {
|
|
1286
1344
|
width: i,
|
|
@@ -1299,7 +1357,7 @@ function Xt(e) {
|
|
|
1299
1357
|
function ge(e, t) {
|
|
1300
1358
|
var n;
|
|
1301
1359
|
t === void 0 && (t = []);
|
|
1302
|
-
var r = Xt(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), i =
|
|
1360
|
+
var r = Xt(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), i = F(r), c = o ? [i].concat(i.visualViewport || [], ct(r) ? r : []) : r, a = t.concat(c);
|
|
1303
1361
|
return o ? a : (
|
|
1304
1362
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1305
1363
|
a.concat(ge(ke(c)))
|
|
@@ -1318,10 +1376,10 @@ function Pr(e, t) {
|
|
|
1318
1376
|
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;
|
|
1319
1377
|
}
|
|
1320
1378
|
function St(e, t, n) {
|
|
1321
|
-
return t === Gt ? ze(
|
|
1379
|
+
return t === Gt ? ze(Or(e, n)) : ae(t) ? Pr(t, n) : ze(yr(Q(e)));
|
|
1322
1380
|
}
|
|
1323
1381
|
function Lr(e) {
|
|
1324
|
-
var t = ge(ke(e)), n = ["absolute", "fixed"].indexOf(Y(e).position) >= 0, r = n && q(e) ?
|
|
1382
|
+
var t = ge(ke(e)), n = ["absolute", "fixed"].indexOf(Y(e).position) >= 0, r = n && q(e) ? Oe(e) : e;
|
|
1325
1383
|
return ae(r) ? t.filter(function(o) {
|
|
1326
1384
|
return ae(o) && Yt(o, r) && K(o) !== "body";
|
|
1327
1385
|
}) : [];
|
|
@@ -1342,7 +1400,7 @@ function Qt(e) {
|
|
|
1342
1400
|
y: t.y - n.height
|
|
1343
1401
|
};
|
|
1344
1402
|
break;
|
|
1345
|
-
case
|
|
1403
|
+
case V:
|
|
1346
1404
|
l = {
|
|
1347
1405
|
x: c,
|
|
1348
1406
|
y: t.y + t.height
|
|
@@ -1380,23 +1438,23 @@ function Qt(e) {
|
|
|
1380
1438
|
}
|
|
1381
1439
|
return l;
|
|
1382
1440
|
}
|
|
1383
|
-
function
|
|
1441
|
+
function Te(e, t) {
|
|
1384
1442
|
t === void 0 && (t = {});
|
|
1385
|
-
var n = t, r = n.placement, o = r === void 0 ? e.placement : r, i = n.strategy, c = i === void 0 ? e.strategy : i, a = n.boundary, l = a === void 0 ? Xn : a, u = n.rootBoundary, d = u === void 0 ? Gt : u, h = n.elementContext, _ = h === void 0 ? ve : h, p = n.altBoundary, m = p === void 0 ? !1 : p, E = n.padding, v = E === void 0 ? 0 : E,
|
|
1386
|
-
reference:
|
|
1387
|
-
element:
|
|
1443
|
+
var n = t, r = n.placement, o = r === void 0 ? e.placement : r, i = n.strategy, c = i === void 0 ? e.strategy : i, a = n.boundary, l = a === void 0 ? Xn : a, u = n.rootBoundary, d = u === void 0 ? Gt : u, h = n.elementContext, _ = h === void 0 ? ve : h, p = n.altBoundary, m = p === void 0 ? !1 : p, E = n.padding, v = E === void 0 ? 0 : E, T = Kt(typeof v != "number" ? v : Zt(v, Ae)), M = _ === ve ? Qn : ve, y = e.rects.popper, b = e.elements[m ? M : _], g = Nr(ae(b) ? b : b.contextElement || Q(e.elements.popper), l, d, c), w = pe(e.elements.reference), L = Qt({
|
|
1444
|
+
reference: w,
|
|
1445
|
+
element: y,
|
|
1388
1446
|
strategy: "absolute",
|
|
1389
1447
|
placement: o
|
|
1390
|
-
}), N = ze(Object.assign({},
|
|
1391
|
-
top: g.top - S.top +
|
|
1392
|
-
bottom: S.bottom - g.bottom +
|
|
1393
|
-
left: g.left - S.left +
|
|
1394
|
-
right: S.right - g.right +
|
|
1448
|
+
}), N = ze(Object.assign({}, y, L)), S = _ === ve ? N : w, U = {
|
|
1449
|
+
top: g.top - S.top + T.top,
|
|
1450
|
+
bottom: S.bottom - g.bottom + T.bottom,
|
|
1451
|
+
left: g.left - S.left + T.left,
|
|
1452
|
+
right: S.right - g.right + T.right
|
|
1395
1453
|
}, A = e.modifiersData.offset;
|
|
1396
1454
|
if (_ === ve && A) {
|
|
1397
1455
|
var D = A[o];
|
|
1398
1456
|
Object.keys(U).forEach(function(R) {
|
|
1399
|
-
var J = [G,
|
|
1457
|
+
var J = [G, V].indexOf(R) >= 0 ? 1 : -1, ee = [x, V].indexOf(R) >= 0 ? "y" : "x";
|
|
1400
1458
|
U[R] += D[ee] * J;
|
|
1401
1459
|
});
|
|
1402
1460
|
}
|
|
@@ -1404,14 +1462,14 @@ function we(e, t) {
|
|
|
1404
1462
|
}
|
|
1405
1463
|
function Sr(e, t) {
|
|
1406
1464
|
t === void 0 && (t = {});
|
|
1407
|
-
var n = t, r = n.placement, o = n.boundary, i = n.rootBoundary, c = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? $t : l, d = fe(r), h = d ? a ?
|
|
1465
|
+
var n = t, r = n.placement, o = n.boundary, i = n.rootBoundary, c = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, u = l === void 0 ? $t : l, d = fe(r), h = d ? a ? yt : yt.filter(function(m) {
|
|
1408
1466
|
return fe(m) === d;
|
|
1409
1467
|
}) : Ae, _ = h.filter(function(m) {
|
|
1410
1468
|
return u.indexOf(m) >= 0;
|
|
1411
1469
|
});
|
|
1412
1470
|
_.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(" ")));
|
|
1413
1471
|
var p = _.reduce(function(m, E) {
|
|
1414
|
-
return m[E] =
|
|
1472
|
+
return m[E] = Te(e, {
|
|
1415
1473
|
placement: E,
|
|
1416
1474
|
boundary: o,
|
|
1417
1475
|
rootBoundary: i,
|
|
@@ -1431,7 +1489,7 @@ function Ur(e) {
|
|
|
1431
1489
|
function Cr(e) {
|
|
1432
1490
|
var t = e.state, n = e.options, r = e.name;
|
|
1433
1491
|
if (!t.modifiersData[r]._skip) {
|
|
1434
|
-
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, h = n.rootBoundary, _ = n.altBoundary, p = n.flipVariations, m = p === void 0 ? !0 : p, E = n.allowedAutoPlacements, v = t.options.placement,
|
|
1492
|
+
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, h = n.rootBoundary, _ = n.altBoundary, p = n.flipVariations, m = p === void 0 ? !0 : p, E = n.allowedAutoPlacements, v = t.options.placement, T = j(v), M = T === v, y = l || (M || !m ? [Re(v)] : Ur(v)), b = [v].concat(y).reduce(function(se, Z) {
|
|
1435
1493
|
return se.concat(j(Z) === Be ? Sr(t, {
|
|
1436
1494
|
placement: Z,
|
|
1437
1495
|
boundary: d,
|
|
@@ -1440,17 +1498,17 @@ function Cr(e) {
|
|
|
1440
1498
|
flipVariations: m,
|
|
1441
1499
|
allowedAutoPlacements: E
|
|
1442
1500
|
}) : Z);
|
|
1443
|
-
}, []), g = t.rects.reference,
|
|
1444
|
-
var A = b[U], D = j(A), R = fe(A) === ue, J = [x,
|
|
1501
|
+
}, []), g = t.rects.reference, w = t.rects.popper, L = /* @__PURE__ */ new Map(), N = !0, S = b[0], U = 0; U < b.length; U++) {
|
|
1502
|
+
var A = b[U], D = j(A), R = fe(A) === ue, J = [x, V].indexOf(D) >= 0, ee = J ? "width" : "height", B = Te(t, {
|
|
1445
1503
|
placement: A,
|
|
1446
1504
|
boundary: d,
|
|
1447
1505
|
rootBoundary: h,
|
|
1448
1506
|
altBoundary: _,
|
|
1449
1507
|
padding: u
|
|
1450
|
-
}), $ = J ? R ? G : H : R ?
|
|
1451
|
-
g[ee] >
|
|
1452
|
-
var
|
|
1453
|
-
if (i && te.push(B[D] <= 0), a && te.push(B[$] <= 0, B[
|
|
1508
|
+
}), $ = J ? R ? G : H : R ? V : x;
|
|
1509
|
+
g[ee] > w[ee] && ($ = Re($));
|
|
1510
|
+
var ye = Re($), te = [];
|
|
1511
|
+
if (i && te.push(B[D] <= 0), a && te.push(B[$] <= 0, B[ye] <= 0), te.every(function(se) {
|
|
1454
1512
|
return se;
|
|
1455
1513
|
})) {
|
|
1456
1514
|
S = A, N = !1;
|
|
@@ -1499,14 +1557,14 @@ function Ut(e, t, n) {
|
|
|
1499
1557
|
};
|
|
1500
1558
|
}
|
|
1501
1559
|
function Ct(e) {
|
|
1502
|
-
return [x, G,
|
|
1560
|
+
return [x, G, V, H].some(function(t) {
|
|
1503
1561
|
return e[t] >= 0;
|
|
1504
1562
|
});
|
|
1505
1563
|
}
|
|
1506
1564
|
function Rr(e) {
|
|
1507
|
-
var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, c =
|
|
1565
|
+
var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, c = Te(t, {
|
|
1508
1566
|
elementContext: "reference"
|
|
1509
|
-
}), a =
|
|
1567
|
+
}), a = Te(t, {
|
|
1510
1568
|
altBoundary: !0
|
|
1511
1569
|
}), l = Ut(c, r), u = Ut(a, o, i), d = Ct(l), h = Ct(u);
|
|
1512
1570
|
t.modifiersData[n] = {
|
|
@@ -1567,16 +1625,16 @@ const qr = {
|
|
|
1567
1625
|
fn: Wr,
|
|
1568
1626
|
data: {}
|
|
1569
1627
|
};
|
|
1570
|
-
function
|
|
1628
|
+
function Fr(e) {
|
|
1571
1629
|
return e === "x" ? "y" : "x";
|
|
1572
1630
|
}
|
|
1573
|
-
function
|
|
1574
|
-
var t = e.state, n = e.options, r = e.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, h = n.padding, _ = n.tether, p = _ === void 0 ? !0 : _, m = n.tetherOffset, E = m === void 0 ? 0 : m, v =
|
|
1631
|
+
function Vr(e) {
|
|
1632
|
+
var t = e.state, n = e.options, r = e.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, h = n.padding, _ = n.tether, p = _ === void 0 ? !0 : _, m = n.tetherOffset, E = m === void 0 ? 0 : m, v = Te(t, {
|
|
1575
1633
|
boundary: l,
|
|
1576
1634
|
rootBoundary: u,
|
|
1577
1635
|
padding: h,
|
|
1578
1636
|
altBoundary: d
|
|
1579
|
-
}),
|
|
1637
|
+
}), T = j(t.placement), M = fe(t.placement), y = !M, b = at(T), g = Fr(b), w = t.modifiersData.popperOffsets, L = t.rects.reference, N = t.rects.popper, S = typeof E == "function" ? E(Object.assign({}, t.rects, {
|
|
1580
1638
|
placement: t.placement
|
|
1581
1639
|
})) : E, U = typeof S == "number" ? {
|
|
1582
1640
|
mainAxis: S,
|
|
@@ -1588,17 +1646,17 @@ function Fr(e) {
|
|
|
1588
1646
|
x: 0,
|
|
1589
1647
|
y: 0
|
|
1590
1648
|
};
|
|
1591
|
-
if (
|
|
1649
|
+
if (w) {
|
|
1592
1650
|
if (i) {
|
|
1593
|
-
var R, J = b === "y" ? x : H, ee = b === "y" ?
|
|
1651
|
+
var R, J = b === "y" ? x : H, ee = b === "y" ? V : G, B = b === "y" ? "height" : "width", $ = w[b], ye = $ + v[J], te = $ - v[ee], Pe = p ? -N[B] / 2 : 0, We = M === ue ? L[B] : N[B], _e = M === ue ? -N[B] : -L[B], Le = t.elements.arrow, se = p && Le ? it(Le) : {
|
|
1594
1652
|
width: 0,
|
|
1595
1653
|
height: 0
|
|
1596
|
-
}, Z = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : zt(), me = Z[J], Ne = Z[ee], ne = be(0, L[B], se[B]), qe =
|
|
1597
|
-
|
|
1654
|
+
}, Z = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : zt(), me = Z[J], Ne = Z[ee], ne = be(0, L[B], se[B]), qe = y ? L[B] / 2 - Pe - ne - me - U.mainAxis : We - ne - me - U.mainAxis, ln = y ? -L[B] / 2 + Pe + ne + Ne + U.mainAxis : _e + ne + Ne + U.mainAxis, Fe = t.elements.arrow && Oe(t.elements.arrow), cn = Fe ? b === "y" ? Fe.clientTop || 0 : Fe.clientLeft || 0 : 0, ht = (R = A == null ? void 0 : A[b]) != null ? R : 0, un = $ + qe - ht - cn, dn = $ + ln - ht, _t = be(p ? He(ye, un) : ye, $, p ? ie(te, dn) : te);
|
|
1655
|
+
w[b] = _t, D[b] = _t - $;
|
|
1598
1656
|
}
|
|
1599
1657
|
if (a) {
|
|
1600
|
-
var mt, pn = b === "x" ? x : H, fn = b === "x" ?
|
|
1601
|
-
|
|
1658
|
+
var mt, pn = b === "x" ? x : H, fn = b === "x" ? V : G, re = w[g], Se = g === "y" ? "height" : "width", vt = re + v[pn], Et = re - v[fn], Ve = [x, H].indexOf(T) !== -1, bt = (mt = A == null ? void 0 : A[g]) != null ? mt : 0, gt = Ve ? vt : re - L[Se] - N[Se] - bt + U.altAxis, It = Ve ? re + L[Se] + N[Se] - bt - U.altAxis : Et, Tt = p && Ve ? fr(gt, re, It) : be(p ? gt : vt, re, p ? It : Et);
|
|
1659
|
+
w[g] = Tt, D[g] = Tt - re;
|
|
1602
1660
|
}
|
|
1603
1661
|
t.modifiersData[r] = D;
|
|
1604
1662
|
}
|
|
@@ -1607,7 +1665,7 @@ const Gr = {
|
|
|
1607
1665
|
name: "preventOverflow",
|
|
1608
1666
|
enabled: !0,
|
|
1609
1667
|
phase: "main",
|
|
1610
|
-
fn:
|
|
1668
|
+
fn: Vr,
|
|
1611
1669
|
requiresIfExists: ["offset"]
|
|
1612
1670
|
};
|
|
1613
1671
|
function $r(e) {
|
|
@@ -1617,7 +1675,7 @@ function $r(e) {
|
|
|
1617
1675
|
};
|
|
1618
1676
|
}
|
|
1619
1677
|
function jr(e) {
|
|
1620
|
-
return e ===
|
|
1678
|
+
return e === F(e) || !q(e) ? st(e) : $r(e);
|
|
1621
1679
|
}
|
|
1622
1680
|
function Yr(e) {
|
|
1623
1681
|
var t = e.getBoundingClientRect(), n = de(t.width) / e.offsetWidth || 1, r = de(t.height) / e.offsetHeight || 1;
|
|
@@ -1778,17 +1836,17 @@ function ro(e) {
|
|
|
1778
1836
|
styles: {}
|
|
1779
1837
|
}, h = [], _ = !1, p = {
|
|
1780
1838
|
state: d,
|
|
1781
|
-
setOptions: function(
|
|
1782
|
-
var
|
|
1783
|
-
E(), d.options = Object.assign({}, i, d.options,
|
|
1839
|
+
setOptions: function(T) {
|
|
1840
|
+
var M = typeof T == "function" ? T(d.options) : T;
|
|
1841
|
+
E(), d.options = Object.assign({}, i, d.options, M), d.scrollParents = {
|
|
1784
1842
|
reference: ae(a) ? ge(a) : a.contextElement ? ge(a.contextElement) : [],
|
|
1785
1843
|
popper: ge(l)
|
|
1786
1844
|
};
|
|
1787
|
-
var
|
|
1788
|
-
if (d.orderedModifiers =
|
|
1845
|
+
var y = Zr(to([].concat(r, d.options.modifiers)));
|
|
1846
|
+
if (d.orderedModifiers = y.filter(function(A) {
|
|
1789
1847
|
return A.enabled;
|
|
1790
1848
|
}), {}.NODE_ENV !== "production") {
|
|
1791
|
-
var b = eo([].concat(
|
|
1849
|
+
var b = eo([].concat(y, d.options.modifiers), function(A) {
|
|
1792
1850
|
var D = A.name;
|
|
1793
1851
|
return D;
|
|
1794
1852
|
});
|
|
@@ -1799,7 +1857,7 @@ function ro(e) {
|
|
|
1799
1857
|
});
|
|
1800
1858
|
g || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
|
|
1801
1859
|
}
|
|
1802
|
-
var
|
|
1860
|
+
var w = Y(l), L = w.marginTop, N = w.marginRight, S = w.marginBottom, U = w.marginLeft;
|
|
1803
1861
|
[L, N, S, U].some(function(A) {
|
|
1804
1862
|
return parseFloat(A);
|
|
1805
1863
|
}) && 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(" "));
|
|
@@ -1813,14 +1871,14 @@ function ro(e) {
|
|
|
1813
1871
|
// prefer the async Popper#update method
|
|
1814
1872
|
forceUpdate: function() {
|
|
1815
1873
|
if (!_) {
|
|
1816
|
-
var
|
|
1817
|
-
if (!Ht(
|
|
1874
|
+
var T = d.elements, M = T.reference, y = T.popper;
|
|
1875
|
+
if (!Ht(M, y)) {
|
|
1818
1876
|
({}).NODE_ENV !== "production" && console.error(Rt);
|
|
1819
1877
|
return;
|
|
1820
1878
|
}
|
|
1821
1879
|
d.rects = {
|
|
1822
|
-
reference: zr(
|
|
1823
|
-
popper: it(
|
|
1880
|
+
reference: zr(M, Oe(y), d.options.strategy === "fixed"),
|
|
1881
|
+
popper: it(y)
|
|
1824
1882
|
}, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(A) {
|
|
1825
1883
|
return d.modifiersData[A.name] = Object.assign({}, A.data);
|
|
1826
1884
|
});
|
|
@@ -1833,7 +1891,7 @@ function ro(e) {
|
|
|
1833
1891
|
d.reset = !1, g = -1;
|
|
1834
1892
|
continue;
|
|
1835
1893
|
}
|
|
1836
|
-
var
|
|
1894
|
+
var w = d.orderedModifiers[g], L = w.fn, N = w.options, S = N === void 0 ? {} : N, U = w.name;
|
|
1837
1895
|
typeof L == "function" && (d = L({
|
|
1838
1896
|
state: d,
|
|
1839
1897
|
options: S,
|
|
@@ -1861,16 +1919,16 @@ function ro(e) {
|
|
|
1861
1919
|
});
|
|
1862
1920
|
function m() {
|
|
1863
1921
|
d.orderedModifiers.forEach(function(v) {
|
|
1864
|
-
var
|
|
1922
|
+
var T = v.name, M = v.options, y = M === void 0 ? {} : M, b = v.effect;
|
|
1865
1923
|
if (typeof b == "function") {
|
|
1866
1924
|
var g = b({
|
|
1867
1925
|
state: d,
|
|
1868
|
-
name:
|
|
1926
|
+
name: T,
|
|
1869
1927
|
instance: p,
|
|
1870
|
-
options:
|
|
1871
|
-
}),
|
|
1928
|
+
options: y
|
|
1929
|
+
}), w = function() {
|
|
1872
1930
|
};
|
|
1873
|
-
h.push(g ||
|
|
1931
|
+
h.push(g || w);
|
|
1874
1932
|
}
|
|
1875
1933
|
});
|
|
1876
1934
|
}
|
|
@@ -1882,7 +1940,7 @@ function ro(e) {
|
|
|
1882
1940
|
return p;
|
|
1883
1941
|
};
|
|
1884
1942
|
}
|
|
1885
|
-
var oo = [
|
|
1943
|
+
var oo = [wr, qr, Ir, ur, kr, Dr, Gr, vr, xr], Jt = /* @__PURE__ */ ro({
|
|
1886
1944
|
defaultModifiers: oo
|
|
1887
1945
|
});
|
|
1888
1946
|
function Ke(e, t, n, r) {
|
|
@@ -1918,7 +1976,7 @@ function io() {
|
|
|
1918
1976
|
function ao() {
|
|
1919
1977
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1920
1978
|
}
|
|
1921
|
-
function
|
|
1979
|
+
function we(e, t, n, r, o) {
|
|
1922
1980
|
let i = NaN, c = NaN;
|
|
1923
1981
|
const a = 300, l = 150, u = 50;
|
|
1924
1982
|
t.setAttribute("aria-expanded", "false"), t.setAttribute("aria-haspopup", r);
|
|
@@ -1926,7 +1984,7 @@ function Me(e, t, n, r, o) {
|
|
|
1926
1984
|
clearTimeout(i), clearTimeout(c), (!(o != null && o.isPerformPopup) || o != null && o.isPerformPopup && o.isPerformPopup()) && (i = window.setTimeout(
|
|
1927
1985
|
() => {
|
|
1928
1986
|
Jt(t, n, {
|
|
1929
|
-
placement: (o == null ? void 0 : o.popupPlacement) ||
|
|
1987
|
+
placement: (o == null ? void 0 : o.popupPlacement) || rt.BOTTOM,
|
|
1930
1988
|
modifiers: [
|
|
1931
1989
|
{
|
|
1932
1990
|
name: "offset",
|
|
@@ -2049,13 +2107,13 @@ function uo(e, t, n) {
|
|
|
2049
2107
|
removePopupArrow: !0
|
|
2050
2108
|
}
|
|
2051
2109
|
);
|
|
2052
|
-
r.appendChild(m),
|
|
2110
|
+
r.appendChild(m), we(
|
|
2053
2111
|
r,
|
|
2054
2112
|
i,
|
|
2055
2113
|
m,
|
|
2056
2114
|
"menu",
|
|
2057
2115
|
{
|
|
2058
|
-
popupPlacement:
|
|
2116
|
+
popupPlacement: rt.RIGHT_START,
|
|
2059
2117
|
preventOnClickHandling: !0,
|
|
2060
2118
|
shouldFocusOnHover: !0
|
|
2061
2119
|
}
|
|
@@ -2068,12 +2126,12 @@ function uo(e, t, n) {
|
|
|
2068
2126
|
n
|
|
2069
2127
|
), E = C();
|
|
2070
2128
|
m.setAttribute("id", E), m.classList.add(s.VISUALLY_HIDDEN), r.appendChild(m), i.onclick = co(i), i.setAttribute("aria-expanded", "false"), i.setAttribute("aria-controls", E), p = Bt(), i.appendChild(p), c.remove(), a.remove(), r.addEventListener("focusin", (v) => {
|
|
2071
|
-
var
|
|
2129
|
+
var T, M, y, b;
|
|
2072
2130
|
for (let g = (
|
|
2073
2131
|
/** @type Element | null | undefined */
|
|
2074
|
-
(
|
|
2075
|
-
); g; g = (
|
|
2076
|
-
g.classList.remove(s.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), v.target !== i && ((
|
|
2132
|
+
(T = v.target) == null ? void 0 : T.closest("ul")
|
|
2133
|
+
); g; g = (M = g.parentElement) == null ? void 0 : M.closest("ul"))
|
|
2134
|
+
g.classList.remove(s.VISUALLY_HIDDEN), i.setAttribute("aria-expanded", "true"), v.target !== i && ((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));
|
|
2077
2135
|
});
|
|
2078
2136
|
break;
|
|
2079
2137
|
}
|
|
@@ -2104,7 +2162,7 @@ function uo(e, t, n) {
|
|
|
2104
2162
|
throw console.error(t), new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");
|
|
2105
2163
|
if (!t.isDivider && (u.appendChild(document.createTextNode(t.title)), d.appendChild(document.createTextNode(t.title)), (h = t.actionUrl) != null && h.openInNewTab || (_ = t.actionFunctionUrl) != null && _.openInNewTab)) {
|
|
2106
2164
|
c.setAttribute("target", "_blank");
|
|
2107
|
-
const p = I(
|
|
2165
|
+
const p = I(Vt);
|
|
2108
2166
|
u.appendChild(p), d.appendChild(p);
|
|
2109
2167
|
}
|
|
2110
2168
|
return (t.isSelected || t.actionMenu && xe(t.actionMenu, ["actionMenu"], (p) => !!p.isSelected)) && (i.classList.add(s.MENU_ITEM__SELECTED), c.classList.add(s.MENU_ITEM__SELECTED)), t.isSelected ? r.classList.add(s.MENU_ITEM__SELECTED) : r.classList.remove(s.MENU_ITEM__SELECTED), e.appendChild(r), r;
|
|
@@ -2139,7 +2197,7 @@ function po(e) {
|
|
|
2139
2197
|
if (!i)
|
|
2140
2198
|
throw new Error("renderActionItem: iconButton not found");
|
|
2141
2199
|
e.className && i.classList.add(e.className);
|
|
2142
|
-
const c =
|
|
2200
|
+
const c = Je(e.badge);
|
|
2143
2201
|
c && i.appendChild(c);
|
|
2144
2202
|
const a = I(e.icon);
|
|
2145
2203
|
a.setAttribute("role", "presentation"), i.appendChild(a);
|
|
@@ -2192,9 +2250,9 @@ function fo() {
|
|
|
2192
2250
|
break;
|
|
2193
2251
|
}
|
|
2194
2252
|
if (h && (h.after(d), u)) {
|
|
2195
|
-
const _ =
|
|
2253
|
+
const _ = Qe(u);
|
|
2196
2254
|
let p = null;
|
|
2197
|
-
l.actionDom ? p = "dialog" : l.actionPopupMenu && (p = "menu"),
|
|
2255
|
+
l.actionDom ? p = "dialog" : l.actionPopupMenu && (p = "menu"), nt(
|
|
2198
2256
|
d,
|
|
2199
2257
|
_,
|
|
2200
2258
|
d,
|
|
@@ -2229,7 +2287,7 @@ function pt(e, t) {
|
|
|
2229
2287
|
e,
|
|
2230
2288
|
n,
|
|
2231
2289
|
{
|
|
2232
|
-
placement:
|
|
2290
|
+
placement: rt.BOTTOM,
|
|
2233
2291
|
modifiers: [
|
|
2234
2292
|
{
|
|
2235
2293
|
name: "offset",
|
|
@@ -2274,7 +2332,7 @@ function Io(e) {
|
|
|
2274
2332
|
if (!i)
|
|
2275
2333
|
throw new Error("renderActionItem: iconButton not found");
|
|
2276
2334
|
e.className && i.classList.add(e.className);
|
|
2277
|
-
const c =
|
|
2335
|
+
const c = Je(e.badge);
|
|
2278
2336
|
c && i.appendChild(c);
|
|
2279
2337
|
const a = I(e.icon);
|
|
2280
2338
|
if (a.setAttribute("role", "presentation"), i.appendChild(a), !(i instanceof HTMLElement))
|
|
@@ -2290,7 +2348,7 @@ function Io(e) {
|
|
|
2290
2348
|
);
|
|
2291
2349
|
if (!d)
|
|
2292
2350
|
throw new Error("renderPopupMenu: contentWrapper not found");
|
|
2293
|
-
d.appendChild(I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom)), t.appendChild(u),
|
|
2351
|
+
d.appendChild(I(typeof e.actionDom == "function" ? e.actionDom() : e.actionDom)), t.appendChild(u), we(r, i, u, "dialog", void 0);
|
|
2294
2352
|
} else if (e.actionPopupMenu) {
|
|
2295
2353
|
const l = C();
|
|
2296
2354
|
i.setAttribute("id", l);
|
|
@@ -2300,42 +2358,42 @@ function Io(e) {
|
|
|
2300
2358
|
i,
|
|
2301
2359
|
{ childrenMenuType: W.INLINE }
|
|
2302
2360
|
);
|
|
2303
|
-
t.appendChild(u),
|
|
2361
|
+
t.appendChild(u), we(r, i, u, "menu", void 0);
|
|
2304
2362
|
} else
|
|
2305
2363
|
throw console.error(e), new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");
|
|
2306
2364
|
return pt(t, document.createTextNode(e.title)), t;
|
|
2307
2365
|
}
|
|
2308
|
-
function
|
|
2366
|
+
function To() {
|
|
2309
2367
|
var n, r;
|
|
2310
2368
|
const { actionItems: e } = P();
|
|
2311
2369
|
let t = null;
|
|
2312
2370
|
return e != null && e.length && (t = I(Eo), (r = (n = P().actionItems) == null ? void 0 : n.map((o) => Io(o))) == null || r.forEach((o) => t.appendChild(o))), t;
|
|
2313
2371
|
}
|
|
2314
|
-
const
|
|
2372
|
+
const wo = `<button class="utds-utah-id__button button--solid" type="button">UtahID Sign In</button>
|
|
2315
2373
|
`, tn = `<div class="utds-utah-id-wrapper"></div>
|
|
2316
|
-
`,
|
|
2374
|
+
`, Me = {
|
|
2317
2375
|
PROFILE: "https://id.utah.gov",
|
|
2318
2376
|
SIGN_IN: `https://id.utah.gov/login?goto=${window.location}`,
|
|
2319
2377
|
SIGN_OUT: `https://id.utah.gov/logout?goto=${window.location}`,
|
|
2320
2378
|
USER_INFO: "https://id.utah.gov/api/userInfo"
|
|
2321
|
-
},
|
|
2379
|
+
}, Mo = `<div class="vertical-menu__wrapper">
|
|
2322
2380
|
<div class="vertical-menu__wrapper-title"></div>
|
|
2323
2381
|
</div>
|
|
2324
2382
|
`;
|
|
2325
2383
|
function nn(e, t) {
|
|
2326
|
-
const n = I(
|
|
2384
|
+
const n = I(Mo), r = n.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));
|
|
2327
2385
|
if (!r)
|
|
2328
2386
|
throw new Error("renderMenuWithTitle: menuTitleDiv not found");
|
|
2329
2387
|
return r.appendChild(document.createTextNode(t)), n.appendChild(e), n;
|
|
2330
2388
|
}
|
|
2331
|
-
let
|
|
2389
|
+
let O = null;
|
|
2332
2390
|
function rn(e) {
|
|
2333
|
-
|
|
2391
|
+
O = e, document.querySelectorAll(f(s.UTAH_ID__BUTTON)).forEach((n) => {
|
|
2334
2392
|
var r;
|
|
2335
2393
|
if (n) {
|
|
2336
|
-
if (n.innerHTML = "",
|
|
2394
|
+
if (n.innerHTML = "", O != null && O.userInfo && ((r = O.userInfo) != null && r.authenticated)) {
|
|
2337
2395
|
const c = document.createElement("span");
|
|
2338
|
-
c.appendChild(document.createTextNode("UtahID Account:")), c.classList.add(s.VISUALLY_HIDDEN), n.appendChild(c), n.appendChild(document.createTextNode(`Hello, ${
|
|
2396
|
+
c.appendChild(document.createTextNode("UtahID Account:")), c.classList.add(s.VISUALLY_HIDDEN), n.appendChild(c), n.appendChild(document.createTextNode(`Hello, ${O.userInfo.first || ""}`));
|
|
2339
2397
|
} else
|
|
2340
2398
|
n.appendChild(document.createTextNode("UtahID Sign In"));
|
|
2341
2399
|
const o = n.getAttribute("aria-controls");
|
|
@@ -2348,11 +2406,11 @@ function rn(e) {
|
|
|
2348
2406
|
}
|
|
2349
2407
|
function ft(e, t) {
|
|
2350
2408
|
var n;
|
|
2351
|
-
e && t && (!!(
|
|
2409
|
+
e && t && (!!(O != null && O.isDefinitive) && !!((n = O == null ? void 0 : O.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")));
|
|
2352
2410
|
}
|
|
2353
2411
|
function on() {
|
|
2354
|
-
const e = I(
|
|
2355
|
-
return e.setAttribute("id", C()),
|
|
2412
|
+
const e = I(wo);
|
|
2413
|
+
return e.setAttribute("id", C()), O && rn(O), e;
|
|
2356
2414
|
}
|
|
2357
2415
|
function an(e) {
|
|
2358
2416
|
var l;
|
|
@@ -2364,13 +2422,13 @@ function an(e) {
|
|
|
2364
2422
|
const i = [
|
|
2365
2423
|
...o,
|
|
2366
2424
|
{
|
|
2367
|
-
actionUrl: n ? void 0 : { url:
|
|
2425
|
+
actionUrl: n ? void 0 : { url: Me.PROFILE, openInNewTab: !0 },
|
|
2368
2426
|
actionFunction: n || void 0,
|
|
2369
2427
|
className: "external-link",
|
|
2370
2428
|
title: "UtahID Profile"
|
|
2371
2429
|
},
|
|
2372
2430
|
{
|
|
2373
|
-
actionUrl: r ? void 0 : { url:
|
|
2431
|
+
actionUrl: r ? void 0 : { url: Me.SIGN_OUT },
|
|
2374
2432
|
actionFunction: r || void 0,
|
|
2375
2433
|
title: "Sign Out"
|
|
2376
2434
|
}
|
|
@@ -2388,7 +2446,7 @@ function Ao() {
|
|
|
2388
2446
|
throw new Error("renderUtahIdForDesktop: contentWrapper not found");
|
|
2389
2447
|
o.appendChild(n), e.appendChild(r), ft(t, r);
|
|
2390
2448
|
const i = P(), c = i.utahId !== !1 && i.utahId !== !0 && i.utahId.onSignIn;
|
|
2391
|
-
return
|
|
2449
|
+
return we(
|
|
2392
2450
|
e,
|
|
2393
2451
|
t,
|
|
2394
2452
|
r,
|
|
@@ -2396,16 +2454,16 @@ function Ao() {
|
|
|
2396
2454
|
{
|
|
2397
2455
|
isPerformPopup: () => {
|
|
2398
2456
|
var a;
|
|
2399
|
-
return !!(
|
|
2457
|
+
return !!(O != null && O.isDefinitive) && !!((a = O == null ? void 0 : O.userInfo) != null && a.authenticated);
|
|
2400
2458
|
},
|
|
2401
2459
|
onClick: (a) => {
|
|
2402
2460
|
var l;
|
|
2403
|
-
(!(
|
|
2461
|
+
(!(O != null && O.isDefinitive) || !((l = O == null ? void 0 : O.userInfo) != null && l.authenticated)) && (c ? c(a) : (a.preventDefault(), a.stopPropagation(), window.location.href = Me.SIGN_IN));
|
|
2404
2462
|
}
|
|
2405
2463
|
}
|
|
2406
2464
|
), e;
|
|
2407
2465
|
}
|
|
2408
|
-
function
|
|
2466
|
+
function Oo() {
|
|
2409
2467
|
const e = I(tn), t = on(), n = t.getAttribute("id");
|
|
2410
2468
|
if (!n)
|
|
2411
2469
|
throw new Error("renderUtahIdForMobile: utahIdButton has no id");
|
|
@@ -2415,8 +2473,8 @@ function yo() {
|
|
|
2415
2473
|
throw new Error("renderUtahIdForMobile: utahIdPopupMenu has no id");
|
|
2416
2474
|
return e.appendChild(r), t.setAttribute("aria-controls", o), r.setAttribute("aria-labelledby", n), ft(t, r), { button: t, menu: r };
|
|
2417
2475
|
}
|
|
2418
|
-
function
|
|
2419
|
-
const e = I(vo), t =
|
|
2476
|
+
function yo() {
|
|
2477
|
+
const e = I(vo), t = To();
|
|
2420
2478
|
return t && e.appendChild(t), P().utahId !== !1 && e.appendChild(Ao()), e;
|
|
2421
2479
|
}
|
|
2422
2480
|
const Po = `<div class="utds-title-wrapper">
|
|
@@ -2524,7 +2582,7 @@ function Ro() {
|
|
|
2524
2582
|
const e = I(_o);
|
|
2525
2583
|
e.classList.add(`utds-header--${((n = P().size) == null ? void 0 : n.toLowerCase()) || ce.MEDIUM}`);
|
|
2526
2584
|
const t = I(ho);
|
|
2527
|
-
return e.appendChild(t), t.appendChild(Do()), t.appendChild(I(mo)), t.appendChild(No()), e.appendChild(
|
|
2585
|
+
return e.appendChild(t), t.appendChild(Do()), t.appendChild(I(mo)), t.appendChild(No()), e.appendChild(yo()), e;
|
|
2528
2586
|
}
|
|
2529
2587
|
const xo = `<li class="menu-item">
|
|
2530
2588
|
<span class="menu-item__title">
|
|
@@ -2691,44 +2749,44 @@ function Wo() {
|
|
|
2691
2749
|
const v = {
|
|
2692
2750
|
menuItems: u.actionMenu,
|
|
2693
2751
|
title: u.title
|
|
2694
|
-
},
|
|
2752
|
+
}, T = dt(
|
|
2695
2753
|
v,
|
|
2696
2754
|
_,
|
|
2697
2755
|
{
|
|
2698
2756
|
childrenMenuType: u.childrenMenuType || W.FLYOUT
|
|
2699
2757
|
}
|
|
2700
2758
|
);
|
|
2701
|
-
d.appendChild(
|
|
2702
|
-
let
|
|
2759
|
+
d.appendChild(T), we(d, _, T, "menu", { shouldFocusOnHover: !0 });
|
|
2760
|
+
let M;
|
|
2703
2761
|
switch (u.childrenMenuType) {
|
|
2704
2762
|
case W.INLINE:
|
|
2705
|
-
|
|
2763
|
+
M = s.MENU_ITEM__INLINE;
|
|
2706
2764
|
break;
|
|
2707
2765
|
case W.MEGA_MENU:
|
|
2708
|
-
|
|
2766
|
+
M = s.MENU_ITEM__MEGA_MENU;
|
|
2709
2767
|
break;
|
|
2710
2768
|
case W.FLYOUT:
|
|
2711
2769
|
default:
|
|
2712
|
-
|
|
2770
|
+
M = s.MENU_ITEM__FLY_OUT;
|
|
2713
2771
|
break;
|
|
2714
2772
|
}
|
|
2715
|
-
d.classList.add(
|
|
2773
|
+
d.classList.add(M);
|
|
2716
2774
|
} else if (u.actionFunction)
|
|
2717
2775
|
_.innerHTML = u.title, _.onclick = u.actionFunction, p.remove();
|
|
2718
2776
|
else if (u.actionFunctionUrl)
|
|
2719
2777
|
p.innerHTML = u.title, p.setAttribute("href", u.actionFunctionUrl.url), p.onclick = (v) => {
|
|
2720
|
-
var
|
|
2721
|
-
(
|
|
2778
|
+
var T, M;
|
|
2779
|
+
(T = u.actionFunctionUrl) != null && T.skipHandleEvent || (v.stopPropagation(), v.preventDefault()), (M = u.actionFunctionUrl) == null || M.actionFunction(v);
|
|
2722
2780
|
}, _.remove();
|
|
2723
2781
|
else if (u.actionUrl)
|
|
2724
2782
|
p.innerHTML = u.title, p.setAttribute("href", u.actionUrl.url), _.remove();
|
|
2725
2783
|
else
|
|
2726
2784
|
throw new Error(`renderMainMenu(): menuItem is missing an action: ${u.title}`);
|
|
2727
|
-
((m = u.actionUrl) != null && m.openInNewTab || (E = u.actionFunctionUrl) != null && E.openInNewTab) && (p.setAttribute("target", "_blank"), p.appendChild(I(
|
|
2785
|
+
((m = u.actionUrl) != null && m.openInNewTab || (E = u.actionFunctionUrl) != null && E.openInNewTab) && (p.setAttribute("target", "_blank"), p.appendChild(I(Vt)));
|
|
2728
2786
|
});
|
|
2729
2787
|
let c = null;
|
|
2730
2788
|
if (e.utahId) {
|
|
2731
|
-
const { button: u, menu: d } =
|
|
2789
|
+
const { button: u, menu: d } = Oo();
|
|
2732
2790
|
c = d;
|
|
2733
2791
|
const h = t.querySelector(f(s.MOBILE__UTAH_ID));
|
|
2734
2792
|
if (!h)
|
|
@@ -2773,14 +2831,14 @@ function kt(e) {
|
|
|
2773
2831
|
e.isDefinitive && (rn(e), (r = (n = (t = P()) == null ? void 0 : t.utahId) == null ? void 0 : n.onAuthChanged) == null || r.call(n, e));
|
|
2774
2832
|
}
|
|
2775
2833
|
let Wt = !0;
|
|
2776
|
-
const
|
|
2834
|
+
const Fo = 500;
|
|
2777
2835
|
async function sn() {
|
|
2778
2836
|
var t, n;
|
|
2779
2837
|
let e = null;
|
|
2780
2838
|
if (z.isDefinitive === !1)
|
|
2781
2839
|
e = Promise.resolve(z);
|
|
2782
2840
|
else if (Wt)
|
|
2783
|
-
e = qo(
|
|
2841
|
+
e = qo(Fo).promise.then(() => {
|
|
2784
2842
|
Wt = !1, sn();
|
|
2785
2843
|
});
|
|
2786
2844
|
else {
|
|
@@ -2792,7 +2850,7 @@ async function sn() {
|
|
|
2792
2850
|
userInfo: null
|
|
2793
2851
|
});
|
|
2794
2852
|
else if (r.utahId === !0 || ((t = r.utahId) == null ? void 0 : t.currentUser) === void 0)
|
|
2795
|
-
z.isDefinitive = !1, e = fetch(
|
|
2853
|
+
z.isDefinitive = !1, e = fetch(Me.USER_INFO, { credentials: "include" }).then((o) => o.json()).then((o) => {
|
|
2796
2854
|
if (o.status === 200)
|
|
2797
2855
|
z.lastError = null, z.userInfo = /** @type UserInfo */
|
|
2798
2856
|
o.data;
|
|
@@ -2814,7 +2872,7 @@ async function sn() {
|
|
|
2814
2872
|
}
|
|
2815
2873
|
return e;
|
|
2816
2874
|
}
|
|
2817
|
-
function
|
|
2875
|
+
function Vo() {
|
|
2818
2876
|
return z;
|
|
2819
2877
|
}
|
|
2820
2878
|
function Go() {
|
|
@@ -2850,8 +2908,8 @@ function $o(e, t) {
|
|
|
2850
2908
|
);
|
|
2851
2909
|
if (!c)
|
|
2852
2910
|
throw new Error("hookupHamburger: profileActionItemWrapper not found");
|
|
2853
|
-
const a =
|
|
2854
|
-
|
|
2911
|
+
const a = Qe(t);
|
|
2912
|
+
nt(
|
|
2855
2913
|
r,
|
|
2856
2914
|
a,
|
|
2857
2915
|
c,
|
|
@@ -2859,12 +2917,12 @@ function $o(e, t) {
|
|
|
2859
2917
|
ariaHasPopupType: "menu",
|
|
2860
2918
|
onClickHandler: (l) => {
|
|
2861
2919
|
var _;
|
|
2862
|
-
const u =
|
|
2920
|
+
const u = Vo(), d = P();
|
|
2863
2921
|
let h = !1;
|
|
2864
2922
|
if (!(u != null && u.isDefinitive) || !((_ = u == null ? void 0 : u.userInfo) != null && _.authenticated)) {
|
|
2865
2923
|
h = !0;
|
|
2866
2924
|
const p = d.utahId !== !1 && d.utahId !== !0 && d.utahId.onSignIn;
|
|
2867
|
-
p ? p(l) : (l.preventDefault(), l.stopPropagation(), window.location.href =
|
|
2925
|
+
p ? p(l) : (l.preventDefault(), l.stopPropagation(), window.location.href = Me.SIGN_IN);
|
|
2868
2926
|
}
|
|
2869
2927
|
return h;
|
|
2870
2928
|
},
|
|
@@ -3004,11 +3062,11 @@ function Xo() {
|
|
|
3004
3062
|
if (n.length > 1)
|
|
3005
3063
|
throw new Error("loadHeader: domLocationTarget must only have one target specified");
|
|
3006
3064
|
if (e.domLocationTarget.cssSelector)
|
|
3007
|
-
t = document.querySelector(e.domLocationTarget.cssSelector),
|
|
3065
|
+
t = document.querySelector(e.domLocationTarget.cssSelector), wt(!t, `loadHeader: element not found for domLocationTarget.cssSelector ${e.domLocationTarget.cssSelector}`);
|
|
3008
3066
|
else if (e.domLocationTarget.element)
|
|
3009
3067
|
t = e.domLocationTarget.element;
|
|
3010
3068
|
else if (e.domLocationTarget.elementFunction)
|
|
3011
|
-
t = e.domLocationTarget.elementFunction(),
|
|
3069
|
+
t = e.domLocationTarget.elementFunction(), wt(!t, "loadHeader: element not returned from domLocationTarget.elementFunction");
|
|
3012
3070
|
else
|
|
3013
3071
|
throw new Error("loadHeader: domLocationTarget must have at least one field set");
|
|
3014
3072
|
}
|
|
@@ -3033,10 +3091,10 @@ function Qo() {
|
|
|
3033
3091
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop not found");
|
|
3034
3092
|
if (l.onclick)
|
|
3035
3093
|
throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop already has onclick");
|
|
3036
|
-
l.onclick = () =>
|
|
3094
|
+
l.onclick = () => tt();
|
|
3037
3095
|
const u = jo(), d = nn(u, "Main Menu");
|
|
3038
3096
|
d.appendChild(u);
|
|
3039
|
-
const h =
|
|
3097
|
+
const h = Qe(d);
|
|
3040
3098
|
$n(h), c ? ((t = c.closest("div")) == null || t.removeAttribute("aria-labelledby"), $o(a, c)) : Go(), fo(), Ko(), io(), Zo(), sn();
|
|
3041
3099
|
}
|
|
3042
3100
|
}
|
|
@@ -3044,8 +3102,7 @@ function Jo(e) {
|
|
|
3044
3102
|
var t, n, r, o;
|
|
3045
3103
|
(t = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.HEADER]))) == null || t.remove(), (n = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MAIN_MENU__OUTER]))) == null || n.remove(), (r = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.MOBILE_MENU]))) == null || r.remove(), (o = document.querySelector(f([s.UTAH_DESIGN_SYSTEM, s.LOGO_OFFICIAL_WRAPPER]))) == null || o.remove(), en(), e && setTimeout(() => document.dispatchEvent(new Event(qt.HEADER_UNLOADED)), 0);
|
|
3046
3104
|
}
|
|
3047
|
-
|
|
3048
|
-
console.log(`Utah Header v${ei}`);
|
|
3105
|
+
console.log(`Utah Header v${Pn.version}`);
|
|
3049
3106
|
export {
|
|
3050
3107
|
Cn as baseSettings,
|
|
3051
3108
|
W as childrenMenuTypes,
|
|
@@ -3054,6 +3111,6 @@ export {
|
|
|
3054
3111
|
Qo as loadHeader,
|
|
3055
3112
|
Jo as removeHeader,
|
|
3056
3113
|
I as renderDOMSingle,
|
|
3057
|
-
|
|
3114
|
+
ei as setUtahHeaderSettings,
|
|
3058
3115
|
ce as sizes
|
|
3059
3116
|
};
|