@utahdts/utah-design-system-header 0.6.0-beta.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +1 -1
- package/dist/utah-design-system-header.es.js +1085 -1262
- package/dist/utah-design-system-header.umd.js +60 -38
- package/package.json +5 -8
- package/src/css/_footer.scss +1 -0
- package/src/css/_logos.scss +1 -5
- package/src/css/index.scss +1 -1
- package/src/css/build/utah-design-system-header.css +0 -5448
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(H,Se){typeof exports=="object"&&typeof module<"u"?Se(exports):typeof define=="function"&&define.amd?define(["exports"],Se):(H=typeof globalThis<"u"?globalThis:H||self,Se(H["@utahdts/utah-design-system-header"]={}))})(this,function(H){"use strict";const mn={name:"@utahdts/utah-design-system-header",version:"0.7.0",description:"Utah Header for the Utah Design System",exports:{".":{"development-local":"./src/index.js",development:"./dist/utah-design-system-header.es.js",production:"./dist/utah-design-system-header.es.js",import:"./dist/utah-design-system-header.es.js",require:"./dist/utah-design-system-header.umd.js",default:["./dist/utah-design-system-header.es.js","./dist/utah-design-system-header.umd.js","./src/index.js"]},"./css":"./dist/style.css","./src/css/index.scss":"./src/css/index.scss"},main:"./src/index.js",files:["src/css","dist"],scripts:{build:"vite build",preview:"vite preview",publishHeader:"npm publish --access public","test-publish":"npm publish --dry-run",test:"vitest",testc:"vitest run --coverage",watch:"vite build --watch"},repository:{type:"git",url:"git+https://github.com/utahdts/utah-design-system.git"},license:"Apache-2.0",bugs:{url:"https://github.com/utahdts/utah-design-system/issues"},homepage:"https://github.com/utahdts/utah-design-system#readme",dependencies:{"@popperjs/core":"2.11.7"},devDependencies:{eslint:"8.39.0","eslint-config-airbnb":"19.0.4","eslint-plugin-import":"2.27.5","eslint-plugin-jsx-a11y":"6.7.1",sass:"1.62.1",vite:"4.3.4","vite-plugin-eslint":"1.8.1",vitest:"0.30.1"},type:"module"},ti="",V={FLYOUT:"flyout",INLINE:"inline",MEGA_MENU:"mega-menu"},je={HEADER_LOADED:"utahHeaderLoaded",HEADER_UNLOADED:"utahHeaderUnloaded"},de={SMALL:"SMALL",MEDIUM:"MEDIUM",LARGE:"LARGE"},vn=`/* @media is never in scope for --variables, so this is the only way to solve this. :-( */
|
|
2
2
|
|
|
3
3
|
@media screen and (max-width: media-size__tablet-landscape__PLACEHOLDER) {
|
|
4
4
|
/* put your media query here for tablet landscape */
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
@media screen and (max-width: media-size__mobile__PLACEHOLDER) {
|
|
57
57
|
/* put your media query here for mobile */
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,En=`<div class="utah-design-system utds-header-mobile-menu" id="utds-header-mobile-menu">
|
|
60
60
|
<div class="utds-header-mobile-menu__backdrop" aria-hidden></div>
|
|
61
61
|
<div class="utds-header-mobile-menu__wrapper">
|
|
62
62
|
<div class="utds-header-mobile-menu__action-bar" role="tablist">
|
|
@@ -85,33 +85,55 @@
|
|
|
85
85
|
<div class="utds-header-mobile-menu__content"> </div>
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
|
-
`;function f(e){return`.${(Array.isArray(e)?e:[e]).join(".")}`}const s={UTAH_DESIGN_SYSTEM:"utah-design-system",HEADER:"utds-header",ICON_BUTTON:"icon-button",CSS_HEADER_MEDIA_TAG_ID:"cssHeaderMediaTag",IS_CLOSED:"is-closed",IS_OPEN:"is-open",VISUALLY_HIDDEN:"visually-hidden",MEDIA_SIZE__MOBILE__PLACEHOLDER:"media-size__mobile__PLACEHOLDER",MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER:"media-size__tablet-landscape__PLACEHOLDER",MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER:"media-size__tablet-portrait__PLACEHOLDER",ACTION_ITEM:"utds-header-action-item",ACTION_ITEM__ICON_BUTTON:"utds-header-action-item__icon-button",ACTION_ITEM__ICON_BUTTON_TITLE:"utds-header-action-item__icon-button--has-title",ACTION_ITEM__TITLE:"utds-header-action-item__title",BADGE__LABEL:"utds-badge__label",BADGE__VALUE:"utds-badge__value",BADGE_WRAPPER:"utds-badge__wrapper",BADGE_WRAPPER__SMALL:"utds-badge__wrapper--small",BADGE_WRAPPER__ACTION_ITEM:"utds-badge__wrapper--action-item",CITIZEN_EXPERIENCE:"utds-citizen-experience-wrapper",LOGO:"utds-logo-wrapper",LOGO_OFFICIAL_CLOSE_BUTTON:"utds-official-website-popup__close-button",LOGO_OFFICIAL_WRAPPER:"utds-official-website-popup__wrapper",LOGO_SVG:"utah-logo-svg",LOGO_VERT_LINE:"utds-logo-vert-line",MAIN_MENU:"main-menu__wrapper",MAIN_MENU__HAMBURGER:"main-menu__hamburger",MAIN_MENU__HAMBURGER_ID:"utds-main-menu__hamburger",MAIN_MENU__HAMBURGER_ICON_ID:"utds-main-menu__hamburger-icon",MAIN_MENU__MENU_TOP:"main-menu__menu-top",MAIN_MENU__NAV:"main-menu__nav",MAIN_MENU__OUTER:"main-menu__outer",MAIN_MENU__SEARCH:"main-menu__search",MAIN_MENU__TITLE:"main-menu__title",MENU_ITEM:"menu-item",MENU_ITEM__BUTTON_TITLE:"menu-item__button-title",MENU_ITEM__LINK_TITLE:"menu-item__link-title",MENU_ITEM__SELECTED:"menu-item--selected",MENU_ITEM__TITLE:"menu-item__title",MENU_ITEM__FLY_OUT:"menu-item--fly_out",MENU_ITEM__INLINE:"menu-item--inline",MENU_ITEM__MEGA_MENU:"menu-item--mega-menu",MOBILE__VIP_ACTION_ITEMS__LEFT:"utds-header-mobile__vip-action-items--left",MOBILE__UTAH_ID:"utds-header-mobile__utah-id-wrapper",MOBILE__VIP_ACTION_ITEMS__RIGHT:"utds-header-mobile__vip-action-items--right",ACTION_ITEM__SELECTED:"utds-header-mobile-menu__action-item--selected",MOBILE_MENU:"utds-header-mobile-menu",MOBILE_MENU__ACTION_BAR:"utds-header-mobile-menu__action-bar",MOBILE_MENU__BACKDROP:"utds-header-mobile-menu__backdrop",MOBILE_MENU__CONTENT:"utds-header-mobile-menu__content",MOBILE_MENU__CONTENT_ITEM:"utds-header-mobile-menu__content-item",MOBILE_MENU__WRAPPER:"utds-header-mobile-menu__wrapper",MOBILE_MENU_ACTON_BAR__HOME_ID:"utds-header-mobile-menu_action-bar__home",MOBILE_MENU_ACTON_BAR__PROFILE_ID:"utds-header-mobile-menu_action-bar__profile",MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER:"utds-header-mobile-menu__action-item",POPUP_MENU:"vertical-menu",POPUP_MENU__BUTTON_TITLE:"vertical-menu__button-title",POPUP_MENU__CHEVRON:"vertical-menu__chevron",POPUP_MENU__DIVIDER:"vertical-menu__divider",POPUP_MENU__LINK_TEXT:"vertical-menu__link-text",POPUP_MENU__LINK_TITLE:"vertical-menu__link-title",POPUP_MENU__PLAIN_TITLE:"vertical-menu__plain-title",POPUP_MENU__TITLE:"vertical-menu__title",POPUP_MENU_WRAPPER__WRAPPER:"vertical-menu__wrapper",POPUP_MENU_WRAPPER__WRAPPER_TITLE:"vertical-menu__wrapper-title",POPUP__HIDDEN:"popup__wrapper--hidden",POPUP__VISIBLE:"popup__wrapper--visible",POPUP__WRAPPER:"popup__wrapper",EXTERNAL_LINK:"utds-icon-after-external-link",EXTERNAL_LINK__NEW_TAB:"utds-new-tab-link-a11y",POPUP_ARROW:"popup__arrow",POPUP_CONTENT_WRAPPER:"popup__content",POPUP_WRAPPER:"popup__wrapper",SEARCH__SEARCH_BACKDROP:"search-backdrop",SEARCH__SEARCH_CLOSE_BUTTON:"search-modal__close-button",SEARCH__SEARCH_BUTTON:"search-modal__button",SEARCH__SEARCH_BUTTON_WRAPPER:"search-modal__button-wrapper",SEARCH__SEARCH_INPUT:"search-modal__input",SEARCH__SEARCH_MODAL:"search-modal",SIZE__LARGE:"large",SIZE__MEDIUM:"medium",TITLE:"utds-title-wrapper",TITLE__LOGO:"utds-title-wrapper__logo",TITLE__TITLE:"utds-title-wrapper__title",TOOLTIP:"utds-tooltip",TOOLTIP__CONTENT:"tooltip__content",TOOLTIP__WRAPPER:"tooltip__wrapper",TOOLTIP__WRAPPER__HIDDEN:"tooltip__wrapper--hidden",TOOLTIP__WRAPPER__VISIBLE:"tooltip__wrapper--visible",UTAH_ID:"utds-utah-id-wrapper",UTAH_ID__BUTTON:"utds-utah-id__button"};function
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
`;function f(e){return`.${(Array.isArray(e)?e:[e]).join(".")}`}const s={UTAH_DESIGN_SYSTEM:"utah-design-system",HEADER:"utds-header",FOOTER:"utds-footer",ICON_BUTTON:"icon-button",CSS_HEADER_MEDIA_TAG_ID:"cssHeaderMediaTag",IS_CLOSED:"is-closed",IS_OPEN:"is-open",VISUALLY_HIDDEN:"visually-hidden",MEDIA_SIZE__MOBILE__PLACEHOLDER:"media-size__mobile__PLACEHOLDER",MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER:"media-size__tablet-landscape__PLACEHOLDER",MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER:"media-size__tablet-portrait__PLACEHOLDER",ACTION_ITEM:"utds-header-action-item",ACTION_ITEM__ICON_BUTTON:"utds-header-action-item__icon-button",ACTION_ITEM__ICON_BUTTON_TITLE:"utds-header-action-item__icon-button--has-title",ACTION_ITEM__TITLE:"utds-header-action-item__title",BADGE__LABEL:"utds-badge__label",BADGE__VALUE:"utds-badge__value",BADGE_WRAPPER:"utds-badge__wrapper",BADGE_WRAPPER__SMALL:"utds-badge__wrapper--small",BADGE_WRAPPER__ACTION_ITEM:"utds-badge__wrapper--action-item",CITIZEN_EXPERIENCE:"utds-citizen-experience-wrapper",FOOTER_HORIZONTAL_DIVIDER:"utds-footer__horizontal-divider",LOGO:"utds-logo-wrapper",LOGO_OFFICIAL_CLOSE_BUTTON:"utds-official-website-popup__close-button",LOGO_OFFICIAL_WRAPPER:"utds-official-website-popup__wrapper",LOGO_SVG:"utah-logo-svg",LOGO_VERT_LINE:"utds-logo-vert-line",MAIN_MENU:"main-menu__wrapper",MAIN_MENU__HAMBURGER:"main-menu__hamburger",MAIN_MENU__HAMBURGER_ID:"utds-main-menu__hamburger",MAIN_MENU__HAMBURGER_ICON_ID:"utds-main-menu__hamburger-icon",MAIN_MENU__MENU_TOP:"main-menu__menu-top",MAIN_MENU__NAV:"main-menu__nav",MAIN_MENU__OUTER:"main-menu__outer",MAIN_MENU__SEARCH:"main-menu__search",MAIN_MENU__TITLE:"main-menu__title",MENU_ITEM:"menu-item",MENU_ITEM__BUTTON_TITLE:"menu-item__button-title",MENU_ITEM__LINK_TITLE:"menu-item__link-title",MENU_ITEM__SELECTED:"menu-item--selected",MENU_ITEM__TITLE:"menu-item__title",MENU_ITEM__FLY_OUT:"menu-item--fly_out",MENU_ITEM__INLINE:"menu-item--inline",MENU_ITEM__MEGA_MENU:"menu-item--mega-menu",MOBILE__VIP_ACTION_ITEMS__LEFT:"utds-header-mobile__vip-action-items--left",MOBILE__UTAH_ID:"utds-header-mobile__utah-id-wrapper",MOBILE__VIP_ACTION_ITEMS__RIGHT:"utds-header-mobile__vip-action-items--right",ACTION_ITEM__SELECTED:"utds-header-mobile-menu__action-item--selected",MOBILE_MENU:"utds-header-mobile-menu",MOBILE_MENU__ACTION_BAR:"utds-header-mobile-menu__action-bar",MOBILE_MENU__BACKDROP:"utds-header-mobile-menu__backdrop",MOBILE_MENU__CONTENT:"utds-header-mobile-menu__content",MOBILE_MENU__CONTENT_ITEM:"utds-header-mobile-menu__content-item",MOBILE_MENU__WRAPPER:"utds-header-mobile-menu__wrapper",MOBILE_MENU_ACTON_BAR__HOME_ID:"utds-header-mobile-menu_action-bar__home",MOBILE_MENU_ACTON_BAR__PROFILE_ID:"utds-header-mobile-menu_action-bar__profile",MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER:"utds-header-mobile-menu__action-item",POPUP_MENU:"vertical-menu",POPUP_MENU__BUTTON_TITLE:"vertical-menu__button-title",POPUP_MENU__CHEVRON:"vertical-menu__chevron",POPUP_MENU__DIVIDER:"vertical-menu__divider",POPUP_MENU__LINK_TEXT:"vertical-menu__link-text",POPUP_MENU__LINK_TITLE:"vertical-menu__link-title",POPUP_MENU__PLAIN_TITLE:"vertical-menu__plain-title",POPUP_MENU__TITLE:"vertical-menu__title",POPUP_MENU_WRAPPER__WRAPPER:"vertical-menu__wrapper",POPUP_MENU_WRAPPER__WRAPPER_TITLE:"vertical-menu__wrapper-title",POPUP__HIDDEN:"popup__wrapper--hidden",POPUP__VISIBLE:"popup__wrapper--visible",POPUP__WRAPPER:"popup__wrapper",EXTERNAL_LINK:"utds-icon-after-external-link",EXTERNAL_LINK__NEW_TAB:"utds-new-tab-link-a11y",POPUP_ARROW:"popup__arrow",POPUP_CONTENT_WRAPPER:"popup__content",POPUP_WRAPPER:"popup__wrapper",SEARCH__SEARCH_BACKDROP:"search-backdrop",SEARCH__SEARCH_CLOSE_BUTTON:"search-modal__close-button",SEARCH__SEARCH_BUTTON:"search-modal__button",SEARCH__SEARCH_BUTTON_WRAPPER:"search-modal__button-wrapper",SEARCH__SEARCH_INPUT:"search-modal__input",SEARCH__SEARCH_MODAL:"search-modal",SIZE__LARGE:"large",SIZE__MEDIUM:"medium",TITLE:"utds-title-wrapper",TITLE__LOGO:"utds-title-wrapper__logo",TITLE__TITLE:"utds-title-wrapper__title",TOOLTIP:"utds-tooltip",TOOLTIP__CONTENT:"tooltip__content",TOOLTIP__WRAPPER:"tooltip__wrapper",TOOLTIP__WRAPPER__HIDDEN:"tooltip__wrapper--hidden",TOOLTIP__WRAPPER__VISIBLE:"tooltip__wrapper--visible",UTAH_ID:"utds-utah-id-wrapper",UTAH_ID__BUTTON:"utds-utah-id__button"};function X(e,t){if(e)throw new Error(t)}function te(e,t){if(e==null)throw new Error(t);return e}function It(e){return typeof e=="string"||e instanceof String}function bn(e){const t=new DOMParser;let n;if(It(e)){const o=It(e)?t.parseFromString(e,"text/html"):e,r=o.body.children.length>1?o.body.children:o.body.children.item(0);if(!r)throw console.error(e),new Error("renderDOM: nothing rendered");n=r}else if(e instanceof Element)n=e;else throw e?(console.error(e),new Error(`renderDOM: str is not a string nor a DOM Element : '${e}'`)):new Error("renderDOM: falsy string passed; cannot render nothing");return n}function I(e){const t=typeof e=="string"?bn(e):e;if(t instanceof HTMLCollection&&t.length>1)throw new Error("renderDOMSingle: must render a single element");const n=t instanceof HTMLCollection?t[0]:t;if(!n)throw console.error(e),new Error("renderDOMSingle: nothing rendered");return n}const gn=`<div class="utds-footer utah-design-system">
|
|
89
|
+
<div class="utds-footer__horizontal-divider">
|
|
90
|
+
<hr />
|
|
91
|
+
</div>
|
|
92
|
+
<div class="utds-footer__utah-logo-wrapper">
|
|
93
|
+
<div class="utah-logo-svg" id="utah-logo-svg">
|
|
94
|
+
<svg viewBox="0 0 107 30.51" role="img">
|
|
95
|
+
<g><path d="m12.44,30.51c-4.21,0-7.33-1.22-9.38-3.66C1.02,24.4,0,20.61,0,15.48V0h7.93v16.4c0,2.67.36,4.55,1.08,5.65.77,1.12,2.08,1.74,3.43,1.64,1.36.1,2.68-.52,3.48-1.63.75-1.09,1.13-2.97,1.13-5.65V0h7.65v15.48c0,5.13-1,8.92-3,11.36-2,2.44-5.09,3.66-9.26,3.66Zm24.42-.56V6.64h-7.93V0h23.78v6.64h-7.93v23.31h-7.92Zm26.17-14.56l-.51,2.07h5.53l-.51-2.07c-.37-1.44-.74-3.01-1.11-4.7-.37-1.69-.74-3.29-1.11-4.79h-.18c-.34,1.53-.68,3.14-1.04,4.82-.35,1.68-.71,3.24-1.08,4.68Zm-11.52,14.56L60.64,0h9.58l9.12,29.95h-8.39l-1.48-6.36h-8.38l-1.47,6.36h-8.11Zm30.69,0V0h7.93v11.15h8.94V0h7.93v29.95h-7.93v-11.89h-8.94v11.89h-7.93Z"/></g>
|
|
96
|
+
</svg>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="utds-footer__vertical-divider" role="separator" aria-orientation="vertical"></div>
|
|
99
|
+
<div class="utds-footer__official-site-wrapper">
|
|
100
|
+
<div class="utds-footer__official-site">An official website of the <span class="whitespace-no-wrap">State of Utah</span></div>
|
|
101
|
+
<div class="utds-footer__copyright">©2023 State of Utah</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="utds-footer__links">
|
|
105
|
+
<ul>
|
|
106
|
+
<li><a href="#" target="__blank" rel="noreferrer">Utah.gov Home</a></li>
|
|
107
|
+
<li><a href="#" target="__blank" rel="noreferrer">Terms of Use</a></li>
|
|
108
|
+
<li><a href="#" target="__blank" rel="noreferrer">Privacy Policy</a></li>
|
|
109
|
+
<li><a href="#" target="__blank" rel="noreferrer">Accessibility</a></li>
|
|
110
|
+
<li><a href="#" target="__blank" rel="noreferrer">Translate</a></li>
|
|
111
|
+
</ul>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
`;let ne=null;function In(){var r,i,c,a,l,u,d,_,h,p,m,b,v,T,M,O;const e=A(),t=((r=ne==null?void 0:ne.footer)==null?void 0:r.domLocationTarget)!==((i=e==null?void 0:e.footer)==null?void 0:i.domLocationTarget)||((c=ne==null?void 0:ne.footer)==null?void 0:c.showHorizontalRule)!==((a=e==null?void 0:e.footer)==null?void 0:a.showHorizontalRule),n=document.querySelector(f(s.FOOTER));let o=n;if(t||!n){n&&n.remove(),o=I(gn);let E=document.body;if((l=e==null?void 0:e.footer)!=null&&l.domLocationTarget){const g=[(u=e==null?void 0:e.footer)==null?void 0:u.domLocationTarget.cssSelector,(d=e==null?void 0:e.footer)==null?void 0:d.domLocationTarget.element,(_=e==null?void 0:e.footer)==null?void 0:_.domLocationTarget.elementFunction].filter(w=>w);if(X(g.length<1,"renderFooter: footer.domLocationTarget must either have a value for one of its properties or not be specified at all"),X(g.length>1,"renderFooter: footer.domLocationTarget must only have one target specified"),(h=e==null?void 0:e.footer)!=null&&h.domLocationTarget.cssSelector)E=document.querySelector((p=e==null?void 0:e.footer)==null?void 0:p.domLocationTarget.cssSelector),X(!E,`renderFooter: element not found for domLocationTarget.cssSelector ${(m=e==null?void 0:e.footer)==null?void 0:m.domLocationTarget.cssSelector}`);else if((b=e==null?void 0:e.footer)!=null&&b.domLocationTarget.element)E=(v=e==null?void 0:e.footer)==null?void 0:v.domLocationTarget.element;else if((T=e==null?void 0:e.footer)!=null&&T.domLocationTarget.elementFunction)E=(M=e==null?void 0:e.footer)==null?void 0:M.domLocationTarget.elementFunction(),X(!E,"renderFooter: element not returned from domLocationTarget.elementFunction");else throw new Error("renderFooter: domLocationTarget must have at least one field set")}if(E==null||E.appendChild(o),!((O=e==null?void 0:e.footer)!=null&&O.showHorizontalRule)){const g=document.querySelector(f(s.FOOTER_HORIZONTAL_DIVIDER));X(!g,"renderFooter: cannot remove horizontal rule; not found"),g==null||g.remove()}ne=JSON.parse(JSON.stringify(e))}return te(o,"renderFooter: footer not rendered")}const ze={mediaSizes:{mobile:640,tabletPortrait:768,tabletLandscape:1024},showTitle:!0,size:de.MEDIUM,title:"My Utah.gov Site",titleURL:"/",mainMenu:{menuItems:[{actionUrl:{url:"/"},title:"Home"}],title:"Main Menu"}};let Ue={...ze};function A(){return Ue}function Tn(e){if(!e.showTitle&&!e.logo)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.")}function Tt(){an(!1),rn()}let wt=!1;const wn=15e3;let Mt=0;const Mn=setInterval(()=>{Mt+=1,Mt>=wn||wt?clearInterval(Mn):document.dispatchEvent(new Event(je.HEADER_LOADED))},2);function An(e){return Ue={...ze,...A(),...e},Tn(Ue),wt=!0,document!=null&&document.body?Tt():window.addEventListener("load",()=>Tt()),Ue}const On=`<div class="utds-header-mobile-menu__content-item" role="tabpanel">
|
|
93
115
|
</div>
|
|
94
|
-
`;function C(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&(15>>e)/4).toString(16))}function
|
|
116
|
+
`;function C(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&(15>>e)/4).toString(16))}function Ye(e){const t=document.querySelector(f(s.MOBILE_MENU__WRAPPER));if(!t)throw new Error("addMobileMenuContentItem: mobileMenuWrapper not found");const n=t.querySelector(f(s.MOBILE_MENU__CONTENT));if(!n)throw new Error("addMobileMenuContentItem: mobileContentWrapper not found");const o=I(On);return o.appendChild(e),n.appendChild(o),o.setAttribute("id",C()),o}const yn=`<div class="utds-badge__wrapper">
|
|
95
117
|
<span class="utds-badge__value"></span>
|
|
96
118
|
<span class="utds-badge__label visually-hidden"></span>
|
|
97
119
|
</div>
|
|
98
|
-
`;function
|
|
120
|
+
`;function Ke(e){let t=null;if(e){t=I(yn),t.classList.add(s.BADGE_WRAPPER__ACTION_ITEM);const n=t.querySelector(f(s.BADGE__LABEL));if(!n)throw new Error("renderActionItemBadge: badgeLabel not found");if(n.appendChild(document.createTextNode(e.label)),e.value||e.value===0){const o=t.querySelector(f(s.BADGE__VALUE));if(!o)throw new Error("renderActionItemBadge: badgeValue not found");o.appendChild(document.createTextNode(`${e.value}`))}else t.classList.add(s.BADGE_WRAPPER__SMALL);e.className&&t.classList.add(e.className)}return t}function Ce(e){const t=te(document.querySelector(f(s.MOBILE_MENU)),`${e}: mobileMenu not found`),n=te(document.getElementById(s.MAIN_MENU__HAMBURGER_ID),`${e}: hamburger not found (🍔 🎶 I will gladly pay you Tuesday for a hamburger today 🎵 🍔)`),o=te(document.getElementById(s.MAIN_MENU__HAMBURGER_ICON_ID),`${e}: hamburgerIcon not found`);return{hamburger:n,hamburgerIcon:o,mobileMenu:t}}function Ze(){const{hamburger:e,hamburgerIcon:t,mobileMenu:n}=Ce("hideMobileMenu");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")}function Ln(){const{hamburger:e,hamburgerIcon:t,mobileMenu:n}=Ce("showMobileMenu");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")}function Pn(e){var c;const{hamburger:t}=Ce("hookupHamburger");if((c=A().actionItems)==null?void 0:c.some(a=>!!a.badge)){const a=Ke({label:"Home Badge"});a&&t.appendChild(a)}Ze();const r=te(document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID),"hookupHamburger: homeActionItem not found"),i=te(r==null?void 0:r.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)),"hookupHamburger: homeActionItemWrapper not found");Je(t,e,i,{ariaHasPopupType:"menu",shouldOnClickCloseMenu:!0}),X(!!t.onblur,"hookupHamburger: hamburger already has an onblur event"),t.onblur=()=>{const{mobileMenu:a}=Ce("showMobileMenu");if(a.classList.contains(s.IS_OPEN)){const l=f(s.MOBILE_MENU__ACTION_BAR),u=f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER),d=f(s.ICON_BUTTON),_=document.querySelector(`${l} ${u}:first-child ${d}`);_==null||_.focus()}}}function Xe(e,t){e.querySelectorAll(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)).forEach(o=>{o.classList.remove(s.ACTION_ITEM__SELECTED);const r=o.querySelector("button");if(!r)throw new Error("showActionItem: actionWrapper does not have actionItem");r.setAttribute("aria-selected","false"),r.setAttribute("tabIndex","-1")}),t.classList.add(s.ACTION_ITEM__SELECTED);const n=t.querySelector("button");if(!n)throw new Error("showActionItem: actionWrapper does not have actionItem");n.setAttribute("aria-selected","true"),n.removeAttribute("tabIndex"),n.focus()}function At(e,t){e.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach(n=>n.classList.remove(s.IS_OPEN)),t.classList.add(s.IS_OPEN)}function Je(e,t,n,{ariaHasPopupType:o,onClickHandler:r,shouldOnClickCloseMenu:i}){var _;if(t&&!o)throw new Error("mobileMenuInteractionHandler: there is content, but the aria type is not given");const c=document.querySelector(f(s.MOBILE_MENU));if(!c)throw new Error("mobileMenuInteractionHandler: mobileMenu not found");const a=document.querySelector(f(s.MOBILE_MENU__WRAPPER));if(!a)throw new Error("mobileMenuInteractionHandler: mobileMenuWrapper not found");const l=a.querySelector(f(s.MOBILE_MENU__CONTENT));if(!l)throw new Error("mobileMenuInteractionHandler: mobileContentWrapper not found");const u=(_=n==null?void 0:n.querySelector)==null?void 0:_.call(n,"button"),d=(u||e).getAttribute("id");if(!d)throw new Error("mobileMenuInteractionHandler: interactiveElementId not found");if(t){const h=t.getAttribute("id");if(!h)throw new Error("mobileMenuInteractionHandler: mobileMenuContentId not found");(u||e).setAttribute("aria-controls",h),t.setAttribute("aria-labelledby",d)}if(e.onclick)throw new Error("mobileMenuInteractionHandler: interactiveElement already has onclick");if(e.onclick=h=>{r!=null&&r(h)||(c.classList.contains(s.IS_OPEN)?i&&Ze():(Ln(),t&&At(l,t),Xe(a,n)))},t){if(n!==e&&n.onclick)throw new Error("mobileMenuInteractionHandler: actionItemWrapper already has onclick");n.onclick=h=>{r!=null&&r(h)||(At(l,t),Xe(a,n))}}}const Nn=`<div class="utds-header-mobile-menu__action-item" role="tab">
|
|
99
121
|
<button type="button" class="icon-button icon-button--borderless utds-header-action-item__icon-button">
|
|
100
122
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
101
123
|
<span aria-hidden="true" role="presentation">
|
|
102
124
|
</button>
|
|
103
125
|
<span class="menu-chiclet"></span>
|
|
104
126
|
</div>
|
|
105
|
-
`,
|
|
127
|
+
`,Sn=`<div class="utds-header-action-item-menu">
|
|
106
128
|
<div class="vertical-menu__wrapper-title"></div>
|
|
107
129
|
</div>
|
|
108
|
-
`,
|
|
109
|
-
`,
|
|
130
|
+
`,Un=`<span class="utds-icon-before-chevron-right vertical-menu__chevron" aria-hidden="true"></span>
|
|
131
|
+
`,Ot=`<span class="utds-new-tab-link-a11y">
|
|
110
132
|
<span class="visually-hidden">opens in a new tab</span>
|
|
111
133
|
<span class="utds-icon-after-external-link" aria-hidden="true"></span>
|
|
112
134
|
</span>
|
|
113
|
-
`,
|
|
114
|
-
`,
|
|
135
|
+
`,Cn=`<ul class="vertical-menu" role="menu" />
|
|
136
|
+
`,Rn=`<li class="vertical-menu__item">
|
|
115
137
|
<span class="vertical-menu__title">
|
|
116
138
|
<span class="vertical-menu__plain-title"></span>
|
|
117
139
|
<a href="#" class="vertical-menu__link-title">
|
|
@@ -123,44 +145,44 @@
|
|
|
123
145
|
</span>
|
|
124
146
|
<span class="vertical-menu__divider" />
|
|
125
147
|
</li>
|
|
126
|
-
|
|
148
|
+
`,Qe={AUTO:"auto",AUTO_START:"auto-start",AUTO_END:"auto-end",BOTTOM:"bottom",BOTTOM_START:"bottom-start",BOTTOM_END:"bottom-end",LEFT:"left",LEFT_START:"left-start",LEFT_END:"left-end",RIGHT:"right",RIGHT_START:"right-start",RIGHT_END:"right-end",TOP:"top",TOP_START:"top-start",TOP_END:"top-end"};function Re(e,t,n){var r;let o=!1;return e&&(Array.isArray(e)?o=e.some(i=>Re(i,t,n)):(o=n(e),o||(o=!!((r=t==null?void 0:t.filter(i=>e[i]))!=null&&r.some(i=>Re(e[i],t,n)))))),o}var B="top",$="bottom",G="right",x="left",De="auto",be=[B,$,G,x],pe="start",ge="end",Dn="clippingParents",yt="viewport",Ie="popper",Hn="reference",Lt=be.reduce(function(e,t){return e.concat([t+"-"+pe,t+"-"+ge])},[]),Pt=[].concat(be,[De]).reduce(function(e,t){return e.concat([t,t+"-"+pe,t+"-"+ge])},[]),Bn="beforeRead",xn="read",kn="afterRead",Wn="beforeMain",qn="main",Fn="afterMain",Vn="beforeWrite",$n="write",Gn="afterWrite",et=[Bn,xn,kn,Wn,qn,Fn,Vn,$n,Gn];function K(e){return e?(e.nodeName||"").toLowerCase():null}function k(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function oe(e){var t=k(e).Element;return e instanceof t||e instanceof Element}function W(e){var t=k(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function tt(e){if(typeof ShadowRoot>"u")return!1;var t=k(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jn(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!W(i)||!K(i)||(Object.assign(i.style,o),Object.keys(r).forEach(function(c){var a=r[c];a===!1?i.removeAttribute(c):i.setAttribute(c,a===!0?"":a)}))})}function zn(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var r=t.elements[o],i=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),a=c.reduce(function(l,u){return l[u]="",l},{});!W(r)||!K(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const Yn={name:"applyStyles",enabled:!0,phase:"write",fn:jn,effect:zn,requires:["computeStyles"]};function j(e){return e.split("-")[0]}var re=Math.max,He=Math.min,fe=Math.round;function nt(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nt(){return!/^((?!chrome|android).)*safari/i.test(nt())}function _e(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var o=e.getBoundingClientRect(),r=1,i=1;t&&W(e)&&(r=e.offsetWidth>0&&fe(o.width)/e.offsetWidth||1,i=e.offsetHeight>0&&fe(o.height)/e.offsetHeight||1);var c=oe(e)?k(e):window,a=c.visualViewport,l=!Nt()&&n,u=(o.left+(l&&a?a.offsetLeft:0))/r,d=(o.top+(l&&a?a.offsetTop:0))/i,_=o.width/r,h=o.height/i;return{width:_,height:h,top:d,right:u+_,bottom:d+h,left:u,x:u,y:d}}function ot(e){var t=_e(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function St(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tt(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function z(e){return k(e).getComputedStyle(e)}function Kn(e){return["table","td","th"].indexOf(K(e))>=0}function J(e){return((oe(e)?e.ownerDocument:e.document)||window.document).documentElement}function Be(e){return K(e)==="html"?e:e.assignedSlot||e.parentNode||(tt(e)?e.host:null)||J(e)}function Ut(e){return!W(e)||z(e).position==="fixed"?null:e.offsetParent}function Zn(e){var t=/firefox/i.test(nt()),n=/Trident/i.test(nt());if(n&&W(e)){var o=z(e);if(o.position==="fixed")return null}var r=Be(e);for(tt(r)&&(r=r.host);W(r)&&["html","body"].indexOf(K(r))<0;){var i=z(r);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")return r;r=r.parentNode}return null}function Te(e){for(var t=k(e),n=Ut(e);n&&Kn(n)&&z(n).position==="static";)n=Ut(n);return n&&(K(n)==="html"||K(n)==="body"&&z(n).position==="static")?t:n||Zn(e)||t}function rt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function we(e,t,n){return re(e,He(t,n))}function Xn(e,t,n){var o=we(e,t,n);return o>n?n:o}function Ct(){return{top:0,right:0,bottom:0,left:0}}function Rt(e){return Object.assign({},Ct(),e)}function Dt(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var Jn=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Rt(typeof t!="number"?t:Dt(t,be))};function Qn(e){var t,n=e.state,o=e.name,r=e.options,i=n.elements.arrow,c=n.modifiersData.popperOffsets,a=j(n.placement),l=rt(a),u=[x,G].indexOf(a)>=0,d=u?"height":"width";if(!(!i||!c)){var _=Jn(r.padding,n),h=ot(i),p=l==="y"?B:x,m=l==="y"?$:G,b=n.rects.reference[d]+n.rects.reference[l]-c[l]-n.rects.popper[d],v=c[l]-n.rects.reference[l],T=Te(i),M=T?l==="y"?T.clientHeight||0:T.clientWidth||0:0,O=b/2-v/2,E=_[p],g=M-h[d]-_[m],w=M/2-h[d]/2+O,P=we(E,w,g),N=l;n.modifiersData[o]=(t={},t[N]=P,t.centerOffset=P-w,t)}}function eo(e){var t=e.state,n=e.options,o=n.element,r=o===void 0?"[data-popper-arrow]":o;if(r!=null&&!(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r))){if({}.NODE_ENV!=="production"&&(W(r)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!St(t.elements.popper,r)){({}).NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}t.elements.arrow=r}}const to={name:"arrow",enabled:!0,phase:"main",fn:Qn,effect:eo,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function he(e){return e.split("-")[1]}var no={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oo(e,t){var n=e.x,o=e.y,r=t.devicePixelRatio||1;return{x:fe(n*r)/r||0,y:fe(o*r)/r||0}}function Ht(e){var t,n=e.popper,o=e.popperRect,r=e.placement,i=e.variation,c=e.offsets,a=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,_=e.isFixed,h=c.x,p=h===void 0?0:h,m=c.y,b=m===void 0?0:m,v=typeof d=="function"?d({x:p,y:b}):{x:p,y:b};p=v.x,b=v.y;var T=c.hasOwnProperty("x"),M=c.hasOwnProperty("y"),O=x,E=B,g=window;if(u){var w=Te(n),P="clientHeight",N="clientWidth";if(w===k(n)&&(w=J(n),z(w).position!=="static"&&a==="absolute"&&(P="scrollHeight",N="scrollWidth")),w=w,r===B||(r===x||r===G)&&i===ge){E=$;var S=_&&w===g&&g.visualViewport?g.visualViewport.height:w[P];b-=S-o.height,b*=l?1:-1}if(r===x||(r===B||r===$)&&i===ge){O=G;var U=_&&w===g&&g.visualViewport?g.visualViewport.width:w[N];p-=U-o.width,p*=l?1:-1}}var y=Object.assign({position:a},u&&no),R=d===!0?oo({x:p,y:b},k(n)):{x:p,y:b};if(p=R.x,b=R.y,l){var D;return Object.assign({},y,(D={},D[E]=M?"0":"",D[O]=T?"0":"",D.transform=(g.devicePixelRatio||1)<=1?"translate("+p+"px, "+b+"px)":"translate3d("+p+"px, "+b+"px, 0)",D))}return Object.assign({},y,(t={},t[E]=M?b+"px":"",t[O]=T?p+"px":"",t.transform="",t))}function ro(e){var t=e.state,n=e.options,o=n.gpuAcceleration,r=o===void 0?!0:o,i=n.adaptive,c=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a;if({}.NODE_ENV!=="production"){var u=z(t.elements.popper).transitionProperty||"";c&&["transform","top","right","bottom","left"].some(function(_){return u.indexOf(_)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
|
|
127
149
|
|
|
128
150
|
`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
|
|
129
151
|
|
|
130
|
-
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:j(t.placement),variation:fe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ut(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ut(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const er={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Jn,data:{}};var De={passive:!0};function tr(e){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=W(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",n.update,De)}),a&&l.addEventListener("resize",n.update,De),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",n.update,De)}),a&&l.removeEventListener("resize",n.update,De)}}const nr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:tr,data:{}};var rr={left:"right",right:"left",bottom:"top",top:"bottom"};function Re(e){return e.replace(/left|right|bottom|top/g,function(t){return rr[t]})}var or={start:"end",end:"start"};function Ct(e){return e.replace(/start|end/g,function(t){return or[t]})}function tt(e){var t=W(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function nt(e){return pe(X(e)).left+tt(e).scrollLeft}function ir(e,t){var n=W(e),r=X(e),o=n.visualViewport,i=r.clientWidth,c=r.clientHeight,a=0,l=0;if(o){i=o.width,c=o.height;var u=yt();(u||!u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:c,x:a+nt(e),y:l}}function ar(e){var t,n=X(e),r=tt(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=re(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),c=re(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+nt(e),l=-r.scrollTop;return Y(o||n).direction==="rtl"&&(a+=re(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:c,x:a,y:l}}function rt(e){var t=Y(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Dt(e){return["html","body","#document"].indexOf(K(e))>=0?e.ownerDocument.body:q(e)&&rt(e)?e:Dt(Ce(e))}function we(e,t){var n;t===void 0&&(t=[]);var r=Dt(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=W(r),c=o?[i].concat(i.visualViewport||[],rt(r)?r:[]):r,a=t.concat(c);return o?a:a.concat(we(Ce(c)))}function ot(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function sr(e,t){var n=pe(e,!1,t==="fixed");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}function Rt(e,t,n){return t===Mt?ot(ir(e,n)):ne(t)?sr(t,n):ot(ar(X(e)))}function lr(e){var t=we(Ce(e)),n=["absolute","fixed"].indexOf(Y(e).position)>=0,r=n&&q(e)?ge(e):e;return ne(r)?t.filter(function(o){return ne(o)&&Ot(o,r)&&K(o)!=="body"}):[]}function cr(e,t,n,r){var o=t==="clippingParents"?lr(e):[].concat(t),i=[].concat(o,[n]),c=i[0],a=i.reduce(function(l,u){var d=Rt(e,u,r);return l.top=re(d.top,l.top),l.right=Ue(d.right,l.right),l.bottom=Ue(d.bottom,l.bottom),l.left=re(d.left,l.left),l},Rt(e,c,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ht(e){var t=e.reference,n=e.element,r=e.placement,o=r?j(r):null,i=r?fe(r):null,c=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(o){case B:l={x:c,y:t.y-n.height};break;case G:l={x:c,y:t.y+t.height};break;case $:l={x:t.x+t.width,y:a};break;case k:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=o?et(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case ue:l[u]=l[u]-(t[d]/2-n[d]/2);break;case Ee:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function Me(e,t){t===void 0&&(t={});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?Nn:a,u=n.rootBoundary,d=u===void 0?Mt:u,h=n.elementContext,_=h===void 0?be:h,p=n.altBoundary,m=p===void 0?!1:p,E=n.padding,v=E===void 0?0:E,w=Nt(typeof v!="number"?v:St(v,ve)),T=_===be?Sn:be,P=e.rects.popper,g=e.elements[m?T:_],I=cr(ne(g)?g:g.contextElement||X(e.elements.popper),l,d,c),M=pe(e.elements.reference),L=Ht({reference:M,element:P,strategy:"absolute",placement:o}),N=ot(Object.assign({},P,L)),S=_===be?N:M,U={top:I.top-S.top+w.top,bottom:S.bottom-I.bottom+w.bottom,left:I.left-S.left+w.left,right:S.right-I.right+w.right},A=e.modifiersData.offset;if(_===be&&A){var R=A[o];Object.keys(U).forEach(function(H){var ie=[$,G].indexOf(H)>=0?1:-1,ae=[B,G].indexOf(H)>=0?"y":"x";U[H]+=R[ae]*ie})}return U}function ur(e,t){t===void 0&&(t={});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?At:l,d=fe(r),h=d?a?Tt:Tt.filter(function(m){return fe(m)===d}):ve,_=h.filter(function(m){return u.indexOf(m)>=0});_.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(" ")));var p=_.reduce(function(m,E){return m[E]=Me(e,{placement:E,boundary:o,rootBoundary:i,padding:c})[j(E)],m},{});return Object.keys(p).sort(function(m,E){return p[m]-p[E]})}function dr(e){if(j(e)===Se)return[];var t=Re(e);return[Ct(e),t,Ct(t)]}function pr(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){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,w=j(v),T=w===v,P=l||(T||!m?[Re(v)]:dr(v)),g=[v].concat(P).reduce(function(me,J){return me.concat(j(J)===Se?ur(t,{placement:J,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:E}):J)},[]),I=t.rects.reference,M=t.rects.popper,L=new Map,N=!0,S=g[0],U=0;U<g.length;U++){var A=g[U],R=j(A),H=fe(A)===ue,ie=[B,G].indexOf(R)>=0,ae=ie?"width":"height",F=Me(t,{placement:A,boundary:d,rootBoundary:h,altBoundary:_,padding:u}),z=ie?H?$:k:H?G:B;I[ae]>M[ae]&&(z=Re(z));var xe=Re(z),se=[];if(i&&se.push(F[R]<=0),a&&se.push(F[z]<=0,F[xe]<=0),se.every(function(me){return me})){S=A,N=!1;break}L.set(A,se)}if(N)for(var Be=m?3:1,pt=function(J){var Pe=g.find(function(We){var le=L.get(We);if(le)return le.slice(0,J).every(function(ft){return ft})});if(Pe)return S=Pe,"break"},Oe=Be;Oe>0;Oe--){var ke=pt(Oe);if(ke==="break")break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}}const fr={name:"flip",enabled:!0,phase:"main",fn:pr,requiresIfExists:["offset"],data:{_skip:!1}};function xt(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Bt(e){return[B,$,G,k].some(function(t){return e[t]>=0})}function hr(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,c=Me(t,{elementContext:"reference"}),a=Me(t,{altBoundary:!0}),l=xt(c,r),u=xt(a,o,i),d=Bt(l),h=Bt(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const _r={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hr};function mr(e,t,n){var r=j(e),o=[k,B].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=i[0],a=i[1];return c=c||0,a=(a||0)*o,[k,$].indexOf(r)>=0?{x:a,y:c}:{x:c,y:a}}function vr(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,c=At.reduce(function(d,h){return d[h]=mr(h,t.rects,i),d},{}),a=c[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=c}const Er={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:vr};function br(e){var t=e.state,n=e.name;t.modifiersData[n]=Ht({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const gr={name:"popperOffsets",enabled:!0,phase:"read",fn:br,data:{}};function Ir(e){return e==="x"?"y":"x"}function wr(e){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=Me(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),w=j(t.placement),T=fe(t.placement),P=!T,g=et(w),I=Ir(g),M=t.modifiersData.popperOffsets,L=t.rects.reference,N=t.rects.popper,S=typeof E=="function"?E(Object.assign({},t.rects,{placement:t.placement})):E,U=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(M){if(i){var H,ie=g==="y"?B:k,ae=g==="y"?G:$,F=g==="y"?"height":"width",z=M[g],xe=z+v[ie],se=z-v[ae],Be=p?-N[F]/2:0,pt=T===ue?L[F]:N[F],Oe=T===ue?-N[F]:-L[F],ke=t.elements.arrow,me=p&&ke?Je(ke):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Lt(),Pe=J[ie],We=J[ae],le=Ie(0,L[F],me[F]),ft=P?L[F]/2-Be-le-Pe-U.mainAxis:pt-le-Pe-U.mainAxis,Uo=P?-L[F]/2+Be+le+We+U.mainAxis:Oe+le+We+U.mainAxis,ht=t.elements.arrow&&ge(t.elements.arrow),Co=ht?g==="y"?ht.clientTop||0:ht.clientLeft||0:0,nn=(H=A==null?void 0:A[g])!=null?H:0,Do=z+ft-nn-Co,Ro=z+Uo-nn,rn=Ie(p?Ue(xe,Do):xe,z,p?re(se,Ro):se);M[g]=rn,R[g]=rn-z}if(a){var on,Ho=g==="x"?B:k,xo=g==="x"?G:$,ce=M[I],qe=I==="y"?"height":"width",an=ce+v[Ho],sn=ce-v[xo],_t=[B,k].indexOf(w)!==-1,ln=(on=A==null?void 0:A[I])!=null?on:0,cn=_t?an:ce-L[qe]-N[qe]-ln+U.altAxis,un=_t?ce+L[qe]+N[qe]-ln-U.altAxis:sn,dn=p&&_t?jn(cn,ce,un):Ie(p?cn:an,ce,p?un:sn);M[I]=dn,R[I]=dn-ce}t.modifiersData[r]=R}}const Mr={name:"preventOverflow",enabled:!0,phase:"main",fn:wr,requiresIfExists:["offset"]};function Tr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ar(e){return e===W(e)||!q(e)?tt(e):Tr(e)}function yr(e){var t=e.getBoundingClientRect(),n=de(t.width)/e.offsetWidth||1,r=de(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Or(e,t,n){n===void 0&&(n=!1);var r=q(t),o=q(t)&&yr(t),i=X(t),c=pe(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((K(t)!=="body"||rt(i))&&(a=Ar(t)),q(t)?(l=pe(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=nt(i))),{x:c.left+a.scrollLeft-l.x,y:c.top+a.scrollTop-l.y,width:c.width,height:c.height}}function Pr(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var c=[].concat(i.requires||[],i.requiresIfExists||[]);c.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function Lr(e){var t=Pr(e);return Ze.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Nr(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Q(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return[].concat(n).reduce(function(o,i){return o.replace(/%s/,i)},e)}var oe='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Sr='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',kt=["name","enabled","phase","fn","effect","requires","options"];function Ur(e){e.forEach(function(t){[].concat(Object.keys(t),kt).filter(function(n,r,o){return o.indexOf(n)===r}).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(Q(oe,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Q(oe,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":Ze.indexOf(t.phase)<0&&console.error(Q(oe,t.name,'"phase"',"either "+Ze.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Q(oe,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Q(oe,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Q(oe,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Q(oe,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+kt.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(r){e.find(function(o){return o.name===r})==null&&console.error(Q(Sr,String(t.name),r,r))})})})}function Cr(e,t){var n=new Set;return e.filter(function(r){var o=t(r);if(!n.has(o))return n.add(o),!0})}function Dr(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Wt="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Rr="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",qt={placement:"bottom",modifiers:[],strategy:"absolute"};function Vt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Hr(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?qt:o;return function(a,l,u){u===void 0&&(u=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},qt,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},h=[],_=!1,p={state:d,setOptions:function(w){var T=typeof w=="function"?w(d.options):w;E(),d.options=Object.assign({},i,d.options,T),d.scrollParents={reference:ne(a)?we(a):a.contextElement?we(a.contextElement):[],popper:we(l)};var P=Lr(Dr([].concat(r,d.options.modifiers)));if(d.orderedModifiers=P.filter(function(A){return A.enabled}),{}.NODE_ENV!=="production"){var g=Cr([].concat(P,d.options.modifiers),function(A){var R=A.name;return R});if(Ur(g),j(d.options.placement)===Se){var I=d.orderedModifiers.find(function(A){var R=A.name;return R==="flip"});I||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var M=Y(l),L=M.marginTop,N=M.marginRight,S=M.marginBottom,U=M.marginLeft;[L,N,S,U].some(function(A){return parseFloat(A)})&&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(" "))}return m(),p.update()},forceUpdate:function(){if(!_){var w=d.elements,T=w.reference,P=w.popper;if(!Vt(T,P)){({}).NODE_ENV!=="production"&&console.error(Wt);return}d.rects={reference:Or(T,ge(P),d.options.strategy==="fixed"),popper:Je(P)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(A){return d.modifiersData[A.name]=Object.assign({},A.data)});for(var g=0,I=0;I<d.orderedModifiers.length;I++){if({}.NODE_ENV!=="production"&&(g+=1,g>100)){console.error(Rr);break}if(d.reset===!0){d.reset=!1,I=-1;continue}var M=d.orderedModifiers[I],L=M.fn,N=M.options,S=N===void 0?{}:N,U=M.name;typeof L=="function"&&(d=L({state:d,options:S,name:U,instance:p})||d)}}},update:Nr(function(){return new Promise(function(v){p.forceUpdate(),v(d)})}),destroy:function(){E(),_=!0}};if(!Vt(a,l))return{}.NODE_ENV!=="production"&&console.error(Wt),p;p.setOptions(u).then(function(v){!_&&u.onFirstUpdate&&u.onFirstUpdate(v)});function m(){d.orderedModifiers.forEach(function(v){var w=v.name,T=v.options,P=T===void 0?{}:T,g=v.effect;if(typeof g=="function"){var I=g({state:d,name:w,instance:p,options:P}),M=function(){};h.push(I||M)}})}function E(){h.forEach(function(v){return v()}),h=[]}return p}}var xr=[nr,gr,er,Fn,Er,fr,Mr,Zn,_r],Ft=Hr({defaultModifiers:xr});function it(e,t,n,r){t?(e.classList.remove(r),e.classList.add(n)):(e.classList.add(r),e.classList.remove(n))}let V;const Te={},at={SHIFT:"shift-key"};function Gt(){V&&(document.removeEventListener("click",V.globalOnClick),document.removeEventListener("keyup",V.globalOnKeyup),document.removeEventListener("keydown",V.globalOnKeydown),V=null)}function st(){const e=document.querySelectorAll(`${f(s.UTAH_DESIGN_SYSTEM)} ${f(s.POPUP_WRAPPER)}`);Array.from(e).filter(t=>!t.classList.contains(s.POPUP__HIDDEN)).forEach(t=>{const n=t.getAttribute("id");if(n){const r=document.querySelector(`[aria-controls="${n}"]`);r&&r.setAttribute("aria-expanded","false")}it(t,!1,s.POPUP__VISIBLE,s.POPUP__HIDDEN)})}function Br(){V&&Gt(),V={},V.globalOnClick=st,document.addEventListener("click",V.globalOnClick),V.globalOnKeyup=e=>{e.key==="Escape"&&st(),e.shiftKey||(Te[at.SHIFT]=!1),Te[e.key]=!1},document.addEventListener("keyup",V.globalOnKeyup),V.globalOnKeydown=e=>{e.shiftKey&&(Te[at.SHIFT]=!0),Te[e.key]=!0},document.addEventListener("keydown",V.globalOnKeydown)}function kr(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Ae(e,t,n,r,o){let i=NaN,c=NaN;const a=300,l=150,u=50;t.setAttribute("aria-expanded","false"),t.setAttribute("aria-haspopup",r);function d(_){clearTimeout(i),clearTimeout(c),(!(o!=null&&o.isPerformPopup)||o!=null&&o.isPerformPopup&&o.isPerformPopup())&&(i=window.setTimeout(()=>{Ft(t,n,{placement:(o==null?void 0:o.popupPlacement)||ee.popupPlacement.BOTTOM,modifiers:[{name:"offset",options:{offset:[0,11]}}]}),it(n,!0,s.POPUP__VISIBLE,s.POPUP__HIDDEN),t.setAttribute("aria-expanded","true"),document.querySelectorAll(f(s.TOOLTIP__WRAPPER)).forEach(p=>p.classList.add(s.TOOLTIP__WRAPPER__HIDDEN))},_))}function h(_){clearTimeout(i),clearTimeout(c),(!(o!=null&&o.isPerformPopup)||o.isPerformPopup())&&(c=window.setTimeout(()=>{it(n,!1,s.POPUP__VISIBLE,s.POPUP__HIDDEN),t.setAttribute("aria-expanded","false")},_))}if(o!=null&&o.preventOnClickHandling||(e.addEventListener("focusin",()=>d(l)),e.addEventListener("focusout",()=>h(l))),o!=null&&o.shouldFocusOnHover&&(e.addEventListener("mouseenter",()=>d(a)),e.addEventListener("mouseleave",()=>h(a))),!(o!=null&&o.preventOnClickHandling)){if(t.onclick)throw new Error("popupFocusHandler: button already has onclick");t.onclick=_=>{var m;const p=t.getAttribute("aria-expanded")==="true";(!(o!=null&&o.isPerformPopup)||o.isPerformPopup())&&(_.stopPropagation(),_.preventDefault(),p&&t.getAttribute("aria-expanded")==="true"?(h(u),(m=document.activeElement)==null||m.blur()):(kr()&&st(),d(u))),o!=null&&o.onClick&&o.onClick(_)}}}const Wr=`<div class="popup__wrapper popup__wrapper--hidden">
|
|
152
|
+
`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:j(t.placement),variation:he(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ht(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ht(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const io={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ro,data:{}};var xe={passive:!0};function ao(e){var t=e.state,n=e.instance,o=e.options,r=o.scroll,i=r===void 0?!0:r,c=o.resize,a=c===void 0?!0:c,l=k(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",n.update,xe)}),a&&l.addEventListener("resize",n.update,xe),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",n.update,xe)}),a&&l.removeEventListener("resize",n.update,xe)}}const so={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ao,data:{}};var lo={left:"right",right:"left",bottom:"top",top:"bottom"};function ke(e){return e.replace(/left|right|bottom|top/g,function(t){return lo[t]})}var co={start:"end",end:"start"};function Bt(e){return e.replace(/start|end/g,function(t){return co[t]})}function it(e){var t=k(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function at(e){return _e(J(e)).left+it(e).scrollLeft}function uo(e,t){var n=k(e),o=J(e),r=n.visualViewport,i=o.clientWidth,c=o.clientHeight,a=0,l=0;if(r){i=r.width,c=r.height;var u=Nt();(u||!u&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:i,height:c,x:a+at(e),y:l}}function po(e){var t,n=J(e),o=it(e),r=(t=e.ownerDocument)==null?void 0:t.body,i=re(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=re(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-o.scrollLeft+at(e),l=-o.scrollTop;return z(r||n).direction==="rtl"&&(a+=re(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:c,x:a,y:l}}function st(e){var t=z(e),n=t.overflow,o=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function xt(e){return["html","body","#document"].indexOf(K(e))>=0?e.ownerDocument.body:W(e)&&st(e)?e:xt(Be(e))}function Me(e,t){var n;t===void 0&&(t=[]);var o=xt(e),r=o===((n=e.ownerDocument)==null?void 0:n.body),i=k(o),c=r?[i].concat(i.visualViewport||[],st(o)?o:[]):o,a=t.concat(c);return r?a:a.concat(Me(Be(c)))}function lt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fo(e,t){var n=_e(e,!1,t==="fixed");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}function kt(e,t,n){return t===yt?lt(uo(e,n)):oe(t)?fo(t,n):lt(po(J(e)))}function _o(e){var t=Me(Be(e)),n=["absolute","fixed"].indexOf(z(e).position)>=0,o=n&&W(e)?Te(e):e;return oe(o)?t.filter(function(r){return oe(r)&&St(r,o)&&K(r)!=="body"}):[]}function ho(e,t,n,o){var r=t==="clippingParents"?_o(e):[].concat(t),i=[].concat(r,[n]),c=i[0],a=i.reduce(function(l,u){var d=kt(e,u,o);return l.top=re(d.top,l.top),l.right=He(d.right,l.right),l.bottom=He(d.bottom,l.bottom),l.left=re(d.left,l.left),l},kt(e,c,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Wt(e){var t=e.reference,n=e.element,o=e.placement,r=o?j(o):null,i=o?he(o):null,c=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(r){case B:l={x:c,y:t.y-n.height};break;case $:l={x:c,y:t.y+t.height};break;case G:l={x:t.x+t.width,y:a};break;case x:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var u=r?rt(r):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case pe:l[u]=l[u]-(t[d]/2-n[d]/2);break;case ge:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function Ae(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=o===void 0?e.placement:o,i=n.strategy,c=i===void 0?e.strategy:i,a=n.boundary,l=a===void 0?Dn:a,u=n.rootBoundary,d=u===void 0?yt:u,_=n.elementContext,h=_===void 0?Ie:_,p=n.altBoundary,m=p===void 0?!1:p,b=n.padding,v=b===void 0?0:b,T=Rt(typeof v!="number"?v:Dt(v,be)),M=h===Ie?Hn:Ie,O=e.rects.popper,E=e.elements[m?M:h],g=ho(oe(E)?E:E.contextElement||J(e.elements.popper),l,d,c),w=_e(e.elements.reference),P=Wt({reference:w,element:O,strategy:"absolute",placement:r}),N=lt(Object.assign({},O,P)),S=h===Ie?N:w,U={top:g.top-S.top+T.top,bottom:S.bottom-g.bottom+T.bottom,left:g.left-S.left+T.left,right:S.right-g.right+T.right},y=e.modifiersData.offset;if(h===Ie&&y){var R=y[r];Object.keys(U).forEach(function(D){var ae=[G,$].indexOf(D)>=0?1:-1,se=[B,$].indexOf(D)>=0?"y":"x";U[D]+=R[se]*ae})}return U}function mo(e,t){t===void 0&&(t={});var n=t,o=n.placement,r=n.boundary,i=n.rootBoundary,c=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?Pt:l,d=he(o),_=d?a?Lt:Lt.filter(function(m){return he(m)===d}):be,h=_.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=_,{}.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=h.reduce(function(m,b){return m[b]=Ae(e,{placement:b,boundary:r,rootBoundary:i,padding:c})[j(b)],m},{});return Object.keys(p).sort(function(m,b){return p[m]-p[b]})}function vo(e){if(j(e)===De)return[];var t=ke(e);return[Bt(e),t,Bt(t)]}function Eo(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,c=n.altAxis,a=c===void 0?!0:c,l=n.fallbackPlacements,u=n.padding,d=n.boundary,_=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,b=n.allowedAutoPlacements,v=t.options.placement,T=j(v),M=T===v,O=l||(M||!m?[ke(v)]:vo(v)),E=[v].concat(O).reduce(function(Ee,ee){return Ee.concat(j(ee)===De?mo(t,{placement:ee,boundary:d,rootBoundary:_,padding:u,flipVariations:m,allowedAutoPlacements:b}):ee)},[]),g=t.rects.reference,w=t.rects.popper,P=new Map,N=!0,S=E[0],U=0;U<E.length;U++){var y=E[U],R=j(y),D=he(y)===pe,ae=[B,$].indexOf(R)>=0,se=ae?"width":"height",F=Ae(t,{placement:y,boundary:d,rootBoundary:_,altBoundary:h,padding:u}),Y=ae?D?G:x:D?$:B;g[se]>w[se]&&(Y=ke(Y));var qe=ke(Y),le=[];if(i&&le.push(F[R]<=0),a&&le.push(F[Y]<=0,F[qe]<=0),le.every(function(Ee){return Ee})){S=y,N=!1;break}P.set(y,le)}if(N)for(var Fe=m?3:1,vt=function(ee){var Ne=E.find(function($e){var ce=P.get($e);if(ce)return ce.slice(0,ee).every(function(Et){return Et})});if(Ne)return S=Ne,"break"},Pe=Fe;Pe>0;Pe--){var Ve=vt(Pe);if(Ve==="break")break}t.placement!==S&&(t.modifiersData[o]._skip=!0,t.placement=S,t.reset=!0)}}const bo={name:"flip",enabled:!0,phase:"main",fn:Eo,requiresIfExists:["offset"],data:{_skip:!1}};function qt(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ft(e){return[B,G,$,x].some(function(t){return e[t]>=0})}function go(e){var t=e.state,n=e.name,o=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,c=Ae(t,{elementContext:"reference"}),a=Ae(t,{altBoundary:!0}),l=qt(c,o),u=qt(a,r,i),d=Ft(l),_=Ft(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:_},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":_})}const Io={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:go};function To(e,t,n){var o=j(e),r=[x,B].indexOf(o)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,c=i[0],a=i[1];return c=c||0,a=(a||0)*r,[x,G].indexOf(o)>=0?{x:a,y:c}:{x:c,y:a}}function wo(e){var t=e.state,n=e.options,o=e.name,r=n.offset,i=r===void 0?[0,0]:r,c=Pt.reduce(function(d,_){return d[_]=To(_,t.rects,i),d},{}),a=c[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[o]=c}const Mo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wo};function Ao(e){var t=e.state,n=e.name;t.modifiersData[n]=Wt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Oo={name:"popperOffsets",enabled:!0,phase:"read",fn:Ao,data:{}};function yo(e){return e==="x"?"y":"x"}function Lo(e){var t=e.state,n=e.options,o=e.name,r=n.mainAxis,i=r===void 0?!0:r,c=n.altAxis,a=c===void 0?!1:c,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,_=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,b=m===void 0?0:m,v=Ae(t,{boundary:l,rootBoundary:u,padding:_,altBoundary:d}),T=j(t.placement),M=he(t.placement),O=!M,E=rt(T),g=yo(E),w=t.modifiersData.popperOffsets,P=t.rects.reference,N=t.rects.popper,S=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,U=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),y=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(w){if(i){var D,ae=E==="y"?B:x,se=E==="y"?$:G,F=E==="y"?"height":"width",Y=w[E],qe=Y+v[ae],le=Y-v[se],Fe=p?-N[F]/2:0,vt=M===pe?P[F]:N[F],Pe=M===pe?-N[F]:-P[F],Ve=t.elements.arrow,Ee=p&&Ve?ot(Ve):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ct(),Ne=ee[ae],$e=ee[se],ce=we(0,P[F],Ee[F]),Et=O?P[F]/2-Fe-ce-Ne-U.mainAxis:vt-ce-Ne-U.mainAxis,Hr=O?-P[F]/2+Fe+ce+$e+U.mainAxis:Pe+ce+$e+U.mainAxis,bt=t.elements.arrow&&Te(t.elements.arrow),Br=bt?E==="y"?bt.clientTop||0:bt.clientLeft||0:0,sn=(D=y==null?void 0:y[E])!=null?D:0,xr=Y+Et-sn-Br,kr=Y+Hr-sn,ln=we(p?He(qe,xr):qe,Y,p?re(le,kr):le);w[E]=ln,R[E]=ln-Y}if(a){var cn,Wr=E==="x"?B:x,qr=E==="x"?$:G,ue=w[g],Ge=g==="y"?"height":"width",un=ue+v[Wr],dn=ue-v[qr],gt=[B,x].indexOf(T)!==-1,pn=(cn=y==null?void 0:y[g])!=null?cn:0,fn=gt?un:ue-P[Ge]-N[Ge]-pn+U.altAxis,_n=gt?ue+P[Ge]+N[Ge]-pn-U.altAxis:dn,hn=p&>?Xn(fn,ue,_n):we(p?fn:un,ue,p?_n:dn);w[g]=hn,R[g]=hn-ue}t.modifiersData[o]=R}}const Po={name:"preventOverflow",enabled:!0,phase:"main",fn:Lo,requiresIfExists:["offset"]};function No(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function So(e){return e===k(e)||!W(e)?it(e):No(e)}function Uo(e){var t=e.getBoundingClientRect(),n=fe(t.width)/e.offsetWidth||1,o=fe(t.height)/e.offsetHeight||1;return n!==1||o!==1}function Co(e,t,n){n===void 0&&(n=!1);var o=W(t),r=W(t)&&Uo(t),i=J(t),c=_e(e,r,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(o||!o&&!n)&&((K(t)!=="body"||st(i))&&(a=So(t)),W(t)?(l=_e(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=at(i))),{x:c.left+a.scrollLeft-l.x,y:c.top+a.scrollTop-l.y,width:c.width,height:c.height}}function Ro(e){var t=new Map,n=new Set,o=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var c=[].concat(i.requires||[],i.requiresIfExists||[]);c.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&r(l)}}),o.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),o}function Do(e){var t=Ro(e);return et.reduce(function(n,o){return n.concat(t.filter(function(r){return r.phase===o}))},[])}function Ho(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Q(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return[].concat(n).reduce(function(r,i){return r.replace(/%s/,i)},e)}var ie='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Bo='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',Vt=["name","enabled","phase","fn","effect","requires","options"];function xo(e){e.forEach(function(t){[].concat(Object.keys(t),Vt).filter(function(n,o,r){return r.indexOf(n)===o}).forEach(function(n){switch(n){case"name":typeof t.name!="string"&&console.error(Q(ie,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Q(ie,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":et.indexOf(t.phase)<0&&console.error(Q(ie,t.name,'"phase"',"either "+et.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Q(ie,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Q(ie,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Q(ie,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Q(ie,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+Vt.map(function(o){return'"'+o+'"'}).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach(function(o){e.find(function(r){return r.name===o})==null&&console.error(Q(Bo,String(t.name),o,o))})})})}function ko(e,t){var n=new Set;return e.filter(function(o){var r=t(o);if(!n.has(r))return n.add(r),!0})}function Wo(e){var t=e.reduce(function(n,o){var r=n[o.name];return n[o.name]=r?Object.assign({},r,o,{options:Object.assign({},r.options,o.options),data:Object.assign({},r.data,o.data)}):o,n},{});return Object.keys(t).map(function(n){return t[n]})}var $t="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",qo="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",Gt={placement:"bottom",modifiers:[],strategy:"absolute"};function jt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Fo(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,o=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?Gt:r;return function(a,l,u){u===void 0&&(u=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Gt,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},_=[],h=!1,p={state:d,setOptions:function(T){var M=typeof T=="function"?T(d.options):T;b(),d.options=Object.assign({},i,d.options,M),d.scrollParents={reference:oe(a)?Me(a):a.contextElement?Me(a.contextElement):[],popper:Me(l)};var O=Do(Wo([].concat(o,d.options.modifiers)));if(d.orderedModifiers=O.filter(function(y){return y.enabled}),{}.NODE_ENV!=="production"){var E=ko([].concat(O,d.options.modifiers),function(y){var R=y.name;return R});if(xo(E),j(d.options.placement)===De){var g=d.orderedModifiers.find(function(y){var R=y.name;return R==="flip"});g||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=z(l),P=w.marginTop,N=w.marginRight,S=w.marginBottom,U=w.marginLeft;[P,N,S,U].some(function(y){return parseFloat(y)})&&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(" "))}return m(),p.update()},forceUpdate:function(){if(!h){var T=d.elements,M=T.reference,O=T.popper;if(!jt(M,O)){({}).NODE_ENV!=="production"&&console.error($t);return}d.rects={reference:Co(M,Te(O),d.options.strategy==="fixed"),popper:ot(O)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(y){return d.modifiersData[y.name]=Object.assign({},y.data)});for(var E=0,g=0;g<d.orderedModifiers.length;g++){if({}.NODE_ENV!=="production"&&(E+=1,E>100)){console.error(qo);break}if(d.reset===!0){d.reset=!1,g=-1;continue}var w=d.orderedModifiers[g],P=w.fn,N=w.options,S=N===void 0?{}:N,U=w.name;typeof P=="function"&&(d=P({state:d,options:S,name:U,instance:p})||d)}}},update:Ho(function(){return new Promise(function(v){p.forceUpdate(),v(d)})}),destroy:function(){b(),h=!0}};if(!jt(a,l))return{}.NODE_ENV!=="production"&&console.error($t),p;p.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function m(){d.orderedModifiers.forEach(function(v){var T=v.name,M=v.options,O=M===void 0?{}:M,E=v.effect;if(typeof E=="function"){var g=E({state:d,name:T,instance:p,options:O}),w=function(){};_.push(g||w)}})}function b(){_.forEach(function(v){return v()}),_=[]}return p}}var Vo=[so,Oo,io,Yn,Mo,bo,Po,to,Io],zt=Fo({defaultModifiers:Vo});function ct(e,t,n,o){t?(e.classList.remove(o),e.classList.add(n)):(e.classList.add(o),e.classList.remove(n))}let q;const Oe={},ut={SHIFT:"shift-key"};function Yt(){q&&(document.removeEventListener("click",q.globalOnClick),document.removeEventListener("keyup",q.globalOnKeyup),document.removeEventListener("keydown",q.globalOnKeydown),q=null)}function dt(){const e=document.querySelectorAll(`${f(s.UTAH_DESIGN_SYSTEM)} ${f(s.POPUP_WRAPPER)}`);Array.from(e).filter(t=>!t.classList.contains(s.POPUP__HIDDEN)).forEach(t=>{const n=t.getAttribute("id");if(n){const o=document.querySelector(`[aria-controls="${n}"]`);o&&o.setAttribute("aria-expanded","false")}ct(t,!1,s.POPUP__VISIBLE,s.POPUP__HIDDEN)})}function $o(){q&&Yt(),q={},q.globalOnClick=dt,document.addEventListener("click",q.globalOnClick),q.globalOnKeyup=e=>{e.key==="Escape"&&dt(),e.shiftKey||(Oe[ut.SHIFT]=!1),Oe[e.key]=!1},document.addEventListener("keyup",q.globalOnKeyup),q.globalOnKeydown=e=>{e.shiftKey&&(Oe[ut.SHIFT]=!0),Oe[e.key]=!0},document.addEventListener("keydown",q.globalOnKeydown)}function Go(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function ye(e,t,n,o,r){let i=NaN,c=NaN;const a=300,l=150,u=50;t.setAttribute("aria-expanded","false"),t.setAttribute("aria-haspopup",o);function d(h){clearTimeout(i),clearTimeout(c),(!(r!=null&&r.isPerformPopup)||r!=null&&r.isPerformPopup&&r.isPerformPopup())&&(i=window.setTimeout(()=>{zt(t,n,{placement:(r==null?void 0:r.popupPlacement)||Qe.BOTTOM,modifiers:[{name:"offset",options:{offset:[0,11]}}]}),ct(n,!0,s.POPUP__VISIBLE,s.POPUP__HIDDEN),t.setAttribute("aria-expanded","true"),document.querySelectorAll(f(s.TOOLTIP__WRAPPER)).forEach(p=>p.classList.add(s.TOOLTIP__WRAPPER__HIDDEN))},h))}function _(h){clearTimeout(i),clearTimeout(c),(!(r!=null&&r.isPerformPopup)||r.isPerformPopup())&&(c=window.setTimeout(()=>{ct(n,!1,s.POPUP__VISIBLE,s.POPUP__HIDDEN),t.setAttribute("aria-expanded","false")},h))}if(r!=null&&r.preventOnClickHandling||(e.addEventListener("focusin",()=>d(l)),e.addEventListener("focusout",()=>_(l))),r!=null&&r.shouldFocusOnHover&&(e.addEventListener("mouseenter",()=>d(a)),e.addEventListener("mouseleave",()=>_(a))),!(r!=null&&r.preventOnClickHandling)){if(t.onclick)throw new Error("popupFocusHandler: button already has onclick");t.onclick=h=>{var m;const p=t.getAttribute("aria-expanded")==="true";(!(r!=null&&r.isPerformPopup)||r.isPerformPopup())&&(h.stopPropagation(),h.preventDefault(),p&&t.getAttribute("aria-expanded")==="true"?(_(u),(m=document.activeElement)==null||m.blur()):(Go()&&dt(),d(u))),r!=null&&r.onClick&&r.onClick(h)}}}const jo=`<div class="popup__wrapper popup__wrapper--hidden">
|
|
131
153
|
<div class="popup__content">
|
|
132
154
|
<div class="popup__arrow" data-popper-arrow></div>
|
|
133
155
|
</div>
|
|
134
156
|
</div>
|
|
135
|
-
`;function
|
|
136
|
-
`,
|
|
137
|
-
`,
|
|
138
|
-
`,
|
|
139
|
-
`,
|
|
140
|
-
`,
|
|
157
|
+
`;function pt(e,t){const n=e.getAttribute("id");if(!n)throw new Error("renderPopup: labelledByElement does not have an `id` attribute");const o=C();e.setAttribute("aria-controls",o);const r=I(jo);if(r.setAttribute("id",o),r.setAttribute("aria-labelledby",n),t!=null&&t.removePopupArrow){const i=r.querySelector(f(s.POPUP_ARROW));if(!i)throw new Error("renderPopup(): popup arrow missing (I wanted to remove it!!)");i.remove()}return r}function zo(e){const t=e.closest("li");if(!t)throw console.error("element",e),new Error("toggleChildMenuExpansion: parent not found for child");t.querySelectorAll(":scope > ul").forEach(n=>{var i;const o=(i=n.closest("li"))==null?void 0:i.querySelector(f(s.POPUP_MENU__BUTTON_TITLE));if(!o)throw new Error("toggleChildMenuExpansion: button not found");const r=o.querySelector(`:scope > ${f(s.POPUP_MENU__CHEVRON)}`);if(!r)throw new Error("toggleChildMenuExpansion: chevron not found");n.classList.toggle(s.VISUALLY_HIDDEN),n.classList.contains(s.VISUALLY_HIDDEN)?(o.setAttribute("aria-expanded","false"),r.classList.add(s.IS_CLOSED),r.classList.remove(s.IS_OPEN)):(o.setAttribute("aria-expanded","true"),r.classList.remove(s.IS_CLOSED),r.classList.add(s.IS_OPEN))})}function Yo(e){return t=>{t.preventDefault(),t.stopPropagation(),zo(e)}}function Kt(){const e=I(Un);return e.classList.add(s.IS_CLOSED),e}function Ko(e,t,n){var _,h;const o=I(Rn),r=o.querySelector(f(s.POPUP_MENU__TITLE));if(!r)throw new Error("renderPopupMenuItem: menuItemTitleWrapper not found");const i=o.querySelector(f(s.POPUP_MENU__BUTTON_TITLE));if(!i)throw new Error("renderPopupMenuItem: menuButton not found");const c=o.querySelector(f(s.POPUP_MENU__LINK_TITLE));if(!c)throw new Error("renderPopupMenuItem: aHref not found");const a=o.querySelector(f(s.POPUP_MENU__PLAIN_TITLE));if(!a)throw new Error("renderPopupMenuItem: plainTitle not found");const l=o.querySelector(f(s.POPUP_MENU__DIVIDER));if(!l)throw new Error("renderPopupMenuItem: menuDivider not found");const u=o.querySelector(`button ${f(s.POPUP_MENU__LINK_TEXT)}`);if(!u)throw new Error("renderPopupMenuItem: titleSpanButton not found");const d=o.querySelector(`a ${f(s.POPUP_MENU__LINK_TEXT)}`);if(!d)throw new Error("renderPopupMenuItem: titleSpanLink not found");if(t.actionMenu){let p;switch(n.childrenMenuType){case V.FLYOUT:{p=Kt(),i.appendChild(p),i.setAttribute("id",C());const m=ft({menuItems:t.actionMenu,title:t.title},i,{...n,removePopupArrow:!0});o.appendChild(m),ye(o,i,m,"menu",{popupPlacement:Qe.RIGHT_START,preventOnClickHandling:!0,shouldFocusOnHover:!0}),c.remove(),a.remove();break}case V.INLINE:{const m=me(t.actionMenu,n),b=C();m.setAttribute("id",b),m.classList.add(s.VISUALLY_HIDDEN),o.appendChild(m),i.onclick=Yo(i),i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls",b),p=Kt(),i.appendChild(p),c.remove(),a.remove(),o.addEventListener("focusin",v=>{var T,M,O,E;for(let g=(T=v.target)==null?void 0:T.closest("ul");g;g=(M=g.parentElement)==null?void 0:M.closest("ul"))g.classList.remove(s.VISUALLY_HIDDEN),i.setAttribute("aria-expanded","true"),v.target!==i&&((O=p==null?void 0:p.classList)==null||O.remove(s.IS_CLOSED),(E=p==null?void 0:p.classList)==null||E.add(s.IS_OPEN))});break}case V.MEGA_MENU:{const m=me(t.actionMenu,n),b=C();m.setAttribute("id",b),o.appendChild(m),c.remove(),i.remove(),a.appendChild(document.createTextNode(t.title));break}default:throw new Error(`renderPopupMenuItem: childrenMenuType unknown '${t.actionMenu}'`)}l.remove()}else if(t.actionFunction)i.onclick=t.actionFunction,c.remove(),l.remove(),a.remove();else if(t.actionUrl)c.setAttribute("href",t.actionUrl.url),i.remove(),l.remove(),a.remove();else if(t.actionFunctionUrl)c.setAttribute("href",t.actionFunctionUrl.url),c.onclick=p=>{var m,b;(m=t.actionFunctionUrl)!=null&&m.skipHandleEvent||(p.stopPropagation(),p.preventDefault()),(b=t.actionFunctionUrl)==null||b.actionFunction(p)},i.remove(),l.remove(),a.remove();else if(t.isDivider)r.remove(),o.setAttribute("aria-hidden","true"),o.setAttribute("role","separator");else throw console.error(t),new Error("renderPopupMenuItem: popupMenuItem must have either actionMenu, actionFunction, actionUrl, or isDivider (popupMenuItem.title)");if(!t.isDivider&&(u.appendChild(document.createTextNode(t.title)),d.appendChild(document.createTextNode(t.title)),(_=t.actionUrl)!=null&&_.openInNewTab||(h=t.actionFunctionUrl)!=null&&h.openInNewTab)){c.setAttribute("target","_blank");const p=I(Ot);u.appendChild(p),d.appendChild(p)}return(t.isSelected||t.actionMenu&&Re(t.actionMenu,["actionMenu"],p=>!!p.isSelected))&&(i.classList.add(s.MENU_ITEM__SELECTED),c.classList.add(s.MENU_ITEM__SELECTED)),t.isSelected?o.classList.add(s.MENU_ITEM__SELECTED):o.classList.remove(s.MENU_ITEM__SELECTED),e.appendChild(o),o}function me(e,t){const n=I(Cn);return e.forEach(o=>Ko(n,o,t)),n}function ft(e,t,n){const o=pt(t,{removePopupArrow:n.removePopupArrow}),r=o.querySelector(f(s.POPUP_CONTENT_WRAPPER));if(!r)throw new Error("renderPopupMenu: contentWrapper not found");const i=me(e.menuItems,n);return i.setAttribute("aria-label",e.title),r.appendChild(i),o}function Zo(e){const t=I(Nn);t.getAttribute("id")||t.setAttribute("id",C());const n=document.createTextNode(e.title),o=t instanceof HTMLCollection?t[0]:t;e.showTitle&&o.classList.add(s.ACTION_ITEM__ICON_BUTTON_TITLE),o.classList.add(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER),o.classList.remove(s.ACTION_ITEM);const r=o.querySelector(f(s.ACTION_ITEM__TITLE));if(!r)throw new Error("renderActionItem: titleDiv not found");r.appendChild(n),e.showTitle?r.classList.remove(s.VISUALLY_HIDDEN):r.classList.add(s.VISUALLY_HIDDEN);const i=t.querySelector(f(s.ACTION_ITEM__ICON_BUTTON));if(!i)throw new Error("renderActionItem: iconButton not found");e.className&&i.classList.add(e.className);const c=Ke(e.badge);c&&i.appendChild(c);const a=I(e.icon);a.setAttribute("role","presentation"),i.appendChild(a);let l=null;if(e.actionFunction)i.onclick=e.actionFunction;else if(e.actionDom){const u=C();i.setAttribute("id",u),l=I(typeof e.actionDom=="function"?e.actionDom():e.actionDom)}else if(e.actionPopupMenu){const u=C();i.setAttribute("id",u),l=I(Sn);const d=l.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));if(!d)throw new Error("renderMobileActionItem: actionItemContentTitle not found");d.appendChild(document.createTextNode(e.actionPopupMenu.title));const _=me(e.actionPopupMenu.menuItems,{childrenMenuType:V.INLINE});l.appendChild(_)}else throw console.error(e),new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");return{actionItemElement:t,actionItemContent:l}}function Xo(){var i,c,a;const e=document.getElementById(s.MOBILE_MENU_ACTON_BAR__HOME_ID);if(!e)throw new Error("renderMobileActionItems: homeActionItem not found");const t=e.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER));if(!t)throw new Error("renderMobileActionItems: homeActionItemWrapper not found");const o=!!A().utahId?document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID):null,r=(i=o==null?void 0:o.closest)==null?void 0:i.call(o,f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER));(a=(c=[...A().actionItems||[]].reverse())==null?void 0:c.map(l=>({actionItem:l,...Zo(l)})))==null||a.forEach(({actionItem:l,actionItemContent:u,actionItemElement:d})=>{let _;switch(l.mobileMenuLocation){case"left":_=t;break;case"none":_=null;break;case"right":default:_=r||t;break}if(_&&(_.after(d),u)){const h=Ye(u);let p=null;l.actionDom?p="dialog":l.actionPopupMenu&&(p="menu"),Je(d,h,d,{ariaHasPopupType:p,shouldOnClickCloseMenu:!1})}})}const Jo=`<h1 class="utds-logo-wrapper"></h1>
|
|
158
|
+
`,Qo=`<div class="utah-design-system utds-header" role="banner" aria-label="Utah.gov Header"></div>
|
|
159
|
+
`,er=`<span class="utds-logo-vert-line"></span>
|
|
160
|
+
`,tr=`<div class="utds-citizen-experience-wrapper"></div>
|
|
161
|
+
`,nr=`<div class="utds-action-items-wrapper"></div>
|
|
162
|
+
`,or=`<div class="utds-header-action-item">
|
|
141
163
|
<button type="button" class="icon-button utds-header-action-item__icon-button">
|
|
142
164
|
<div class="utds-header-action-item__title visually-hidden"></div>
|
|
143
165
|
</button>
|
|
144
166
|
</div>
|
|
145
|
-
`,
|
|
167
|
+
`,rr=`<div class="tooltip__wrapper tooltip__wrapper--hidden" aria-hidden="true">
|
|
146
168
|
<div class="tooltip__content">
|
|
147
169
|
<div class="tooltip__arrow" data-popper-arrow></div>
|
|
148
170
|
</div>
|
|
149
171
|
</div>
|
|
150
|
-
`;let
|
|
151
|
-
`,
|
|
152
|
-
`,
|
|
172
|
+
`;let ve=NaN;function _t(e,t){const n=I(rr),o=n.querySelector(f(s.TOOLTIP__CONTENT));if(!o)throw new Error("hookupToolTip: toolTipContent not found");o.appendChild(t),e.appendChild(n);const r=zt(e,n,{placement:Qe.BOTTOM,modifiers:[{name:"offset",options:{offset:[0,5]}}]});if(e.onmouseenter||e.onmouseleave)throw new Error("hookupToolTip: element already has an onmouseenter and/or onmouseleave event");let i=NaN;e.onmouseenter=()=>{clearTimeout(i),i=window.setTimeout(()=>{clearTimeout(ve),ve=-1;const c=e.querySelector(f(s.POPUP_WRAPPER));(!c||c.classList.contains(s.POPUP__HIDDEN))&&(n.classList.remove(s.TOOLTIP__WRAPPER__HIDDEN),n.classList.add(s.TOOLTIP__WRAPPER__VISIBLE),r.update().catch(a=>console.error(a)))},ve?0:500)},e.onmouseleave=()=>{clearTimeout(i),n.classList.add(s.TOOLTIP__WRAPPER__HIDDEN),n.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE),clearTimeout(ve),ve=window.setTimeout(()=>{ve=NaN},500)}}function ir(e){const t=I(or),n=document.createTextNode(e.title),o=t instanceof HTMLCollection?t[0]:t;e.showTitle&&o.classList.add(s.ACTION_ITEM__ICON_BUTTON_TITLE);const r=o.querySelector(f(s.ACTION_ITEM__TITLE));if(!r)throw new Error("renderActionItem: titleDiv not found");r.appendChild(n),e.showTitle?r.classList.remove(s.VISUALLY_HIDDEN):r.classList.add(s.VISUALLY_HIDDEN);const i=t.querySelector(f(s.ACTION_ITEM__ICON_BUTTON));if(!i)throw new Error("renderActionItem: iconButton not found");e.className&&i.classList.add(e.className);const c=Ke(e.badge);c&&i.appendChild(c);const a=I(e.icon);if(a.setAttribute("role","presentation"),i.appendChild(a),!(i instanceof HTMLElement))throw new Error("renderActionItem: iconButton is not an HTMLElement");if(e.actionFunction)i.onclick=e.actionFunction;else if(e.actionDom){const l=C();i.setAttribute("id",l);const u=pt(i),d=u.querySelector(f(s.POPUP_CONTENT_WRAPPER));if(!d)throw new Error("renderPopupMenu: contentWrapper not found");d.appendChild(I(typeof e.actionDom=="function"?e.actionDom():e.actionDom)),t.appendChild(u),ye(o,i,u,"dialog",void 0)}else if(e.actionPopupMenu){const l=C();i.setAttribute("id",l);const u=ft(e.actionPopupMenu,i,{childrenMenuType:V.INLINE});t.appendChild(u),ye(o,i,u,"menu",void 0)}else throw console.error(e),new Error("Action Item: no defined action; must have either actionFunction, actionDom, or actionPopupMenu");return _t(t,document.createTextNode(e.title)),t}function ar(){var n,o;const{actionItems:e}=A();let t=null;return e!=null&&e.length&&(t=I(nr),(o=(n=A().actionItems)==null?void 0:n.map(r=>ir(r)))==null||o.forEach(r=>t.appendChild(r))),t}const sr=`<button class="utds-utah-id__button button--solid" type="button">UtahID Sign In</button>
|
|
173
|
+
`,Zt=`<div class="utds-utah-id-wrapper"></div>
|
|
174
|
+
`,Le={PROFILE:"https://id.utah.gov",SIGN_IN:`https://id.utah.gov/login?goto=${window.location}`,SIGN_OUT:`https://id.utah.gov/logout?goto=${window.location}`,USER_INFO:"https://id.utah.gov/api/userInfo"},lr=`<div class="vertical-menu__wrapper">
|
|
153
175
|
<div class="vertical-menu__wrapper-title"></div>
|
|
154
176
|
</div>
|
|
155
|
-
`;function
|
|
177
|
+
`;function Xt(e,t){const n=I(lr),o=n.querySelector(f(s.POPUP_MENU_WRAPPER__WRAPPER_TITLE));if(!o)throw new Error("renderMenuWithTitle: menuTitleDiv not found");return o.appendChild(document.createTextNode(t)),n.appendChild(e),n}let L=null;function Jt(e){L=e,document.querySelectorAll(f(s.UTAH_ID__BUTTON)).forEach(n=>{var o;if(n){if(n.innerHTML="",L!=null&&L.userInfo&&((o=L.userInfo)!=null&&o.authenticated)){const c=document.createElement("span");c.appendChild(document.createTextNode("UtahID Account:")),c.classList.add(s.VISUALLY_HIDDEN),n.appendChild(c),n.appendChild(document.createTextNode(`Hello, ${L.userInfo.first||""}`))}else n.appendChild(document.createTextNode("UtahID Sign In"));const r=n.getAttribute("aria-controls");if(!r)throw new Error(`authChangedEventHandler: popup id for button not found - ${r}`);const i=document.getElementById(r);i&&ht(n,i)}})}function ht(e,t){var n;e&&t&&(!!(L!=null&&L.isDefinitive)&&!!((n=L==null?void 0:L.userInfo)!=null&&n.authenticated)?(e.setAttribute("aria-haspopup","menu"),e.setAttribute("aria-expanded","false"),t.removeAttribute("aria-hidden")):(e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),t.setAttribute("aria-hidden","true")))}function Qt(){const e=I(sr);return e.setAttribute("id",C()),L&&Jt(L),e}function en(e){var l,u,d;const t=A(),n=t.utahId!==!1&&t.utahId!==!0&&((l=t.utahId)==null?void 0:l.onProfile),o=t.utahId!==!1&&t.utahId!==!0&&((u=t.utahId)==null?void 0:u.onSignOut),r=[...t.utahId!==!0&&t.utahId!==!1&&((d=t.utahId)==null?void 0:d.menuItems)||[]];r.length&&r.push({isDivider:!0,title:"--divider--"});const i=[...r,{actionUrl:n?void 0:{url:Le.PROFILE,openInNewTab:!0},actionFunction:n||void 0,className:"external-link",title:"UtahID Profile"},{actionUrl:o?void 0:{url:Le.SIGN_OUT},actionFunction:o||void 0,title:"Sign Out"}],c=me(i,{childrenMenuType:V.INLINE}),a=e?Xt(c,"Utah ID Menu"):c;return a.setAttribute("aria-label","Utah Id Menu"),a.setAttribute("id",C()),a}function cr(){var a;const e=I(Zt),t=Qt();t.setAttribute("id",C()),e.appendChild(t);const n=en(!1),o=pt(t),r=o.querySelector(f(s.POPUP_CONTENT_WRAPPER));if(!r)throw new Error("renderUtahIdForDesktop: contentWrapper not found");r.appendChild(n),e.appendChild(o),ht(t,o);const i=A(),c=i.utahId!==!1&&i.utahId!==!0&&((a=i.utahId)==null?void 0:a.onSignIn);return ye(e,t,o,"menu",{isPerformPopup:()=>{var l;return!!(L!=null&&L.isDefinitive)&&!!((l=L==null?void 0:L.userInfo)!=null&&l.authenticated)},onClick:l=>{var u;(!(L!=null&&L.isDefinitive)||!((u=L==null?void 0:L.userInfo)!=null&&u.authenticated))&&(c?c(l):(l.preventDefault(),l.stopPropagation(),window.location.href=Le.SIGN_IN))}}),e}function ur(){const e=I(Zt),t=Qt(),n=t.getAttribute("id");if(!n)throw new Error("renderUtahIdForMobile: utahIdButton has no id");e.appendChild(t);const o=en(!0),r=o.getAttribute("id");if(!r)throw new Error("renderUtahIdForMobile: utahIdPopupMenu has no id");return e.appendChild(o),t.setAttribute("aria-controls",r),o.setAttribute("aria-labelledby",n),ht(t,o),{button:t,menu:o}}function dr(){const e=I(tr),t=ar();return t&&e.appendChild(t),A().utahId!==!1&&e.appendChild(cr()),e}const pr=`<div class="utds-title-wrapper">
|
|
156
178
|
<div class="utds-title-wrapper__logo"></div>
|
|
157
179
|
<div class="utds-title-wrapper__title"></div>
|
|
158
180
|
</div>
|
|
159
|
-
`,
|
|
181
|
+
`,fr=`<a class="utds-title-wrapper">
|
|
160
182
|
<div class="utds-title-wrapper__logo"></div>
|
|
161
183
|
<div class="utds-title-wrapper__title"></div>
|
|
162
184
|
</a>
|
|
163
|
-
`;function
|
|
185
|
+
`;function mt(e){return typeof e=="function"?e():e}function _r(){const e=A().titleURL,t=I(e?fr:pr);if(!t)throw new Error("LogoTitle: titleWrapper is null");e&&t.setAttribute("href",e);const n=t.querySelector(f(s.TITLE__LOGO));if(!n)throw new Error("LogoTitle: logoWrapper is null");const o=A().logo,r=A().showTitle,i=A().title;if(o){let l;if(o.htmlString)l=I(mt(o.htmlString));else if(o.element)l=mt(o.element);else if(o.imageUrl)l=I(`<img src=${mt(o.imageUrl)} id="design-system-logo" />`);else throw new Error("LogoTitle: logo set but has no settings");l.setAttribute("role","presentation"),n.appendChild(l)}else t.removeChild(n);const c=document.createTextNode(i),a=t.querySelector(f(s.TITLE__TITLE));return a==null||a.appendChild(c),!r&&o&&(a==null||a.classList.add(s.VISUALLY_HIDDEN)),t}const hr=`<div class="utah-logo-wrapper">
|
|
164
186
|
<button class="utah-logo-svg" id="utah-logo-svg" aria-haspopup="dialog">
|
|
165
187
|
<span class="visually-hidden" id="utah-logo-description">An official website of the State of Utah. Click to learn
|
|
166
188
|
more.</span>
|
|
@@ -185,7 +207,7 @@
|
|
|
185
207
|
</svg>
|
|
186
208
|
</button>
|
|
187
209
|
</div>
|
|
188
|
-
`,
|
|
210
|
+
`,mr=`<div class="utah-logo-wrapper">
|
|
189
211
|
<button class="utah-logo-svg" id="utah-logo-svg" aria-haspopup="dialog">
|
|
190
212
|
<span class="visually-hidden" id="utah-logo-description">An official website of the State of Utah. Click to learn
|
|
191
213
|
more.</span>
|
|
@@ -206,18 +228,18 @@
|
|
|
206
228
|
</svg>
|
|
207
229
|
</button>
|
|
208
230
|
</div>
|
|
209
|
-
`,
|
|
231
|
+
`,vr=`<div class="utds-official-website-hover__wrapper">
|
|
210
232
|
How do I know it’s official?<br />
|
|
211
233
|
Learn more.
|
|
212
234
|
</div>
|
|
213
|
-
`;function
|
|
235
|
+
`;function Er(){let e;switch(A().size){case de.LARGE:e=hr;break;case de.SMALL:case de.MEDIUM:e=mr;break;default:throw new Error(`Unknown settings size: '${A().size}'`)}const t=I(e);if(!t.querySelector(f(s.LOGO_SVG)))throw new Error("UtahLogo: logoButton not found");return t.setAttribute("id",C()),_t(t,I(vr)),t}function br(){var n;const e=I(Qo);e.classList.add(`utds-header--${((n=A().size)==null?void 0:n.toLowerCase())||de.MEDIUM}`);const t=I(Jo);return e.appendChild(t),t.appendChild(Er()),t.appendChild(I(er)),t.appendChild(_r()),e.appendChild(dr()),e}const gr=`<li class="menu-item">
|
|
214
236
|
<span class="menu-item__title">
|
|
215
237
|
<button class="menu-item__button-title" type="button"></button>
|
|
216
238
|
<a class="menu-item__link-title"></a>
|
|
217
239
|
<span class="menu-chiclet"></span>
|
|
218
240
|
</span>
|
|
219
241
|
</li>
|
|
220
|
-
`,
|
|
242
|
+
`,Ir=`<div class="utah-design-system main-menu__outer">
|
|
221
243
|
<div class="main-menu__wrapper">
|
|
222
244
|
<nav class="horizontal-menu main-menu__nav">
|
|
223
245
|
<h2 class="main-menu__title visually-hidden"></h2>
|
|
@@ -244,7 +266,7 @@
|
|
|
244
266
|
</button>
|
|
245
267
|
</div>
|
|
246
268
|
</div>
|
|
247
|
-
`,
|
|
269
|
+
`,Tr=`<div class="utah-design-system" id="search-modal">
|
|
248
270
|
<div class="search-modal__close-button-wrapper">
|
|
249
271
|
<button type="button" class="search-modal__close-button button icon-button icon-button--borderless">
|
|
250
272
|
<span class="utds-icon-before-x-icon" aria-hidden="true"></span>
|
|
@@ -252,7 +274,7 @@
|
|
|
252
274
|
</button>
|
|
253
275
|
</div>
|
|
254
276
|
<div class="search-modal">
|
|
255
|
-
<form class="search-modal__form hcenter" role="search" aria-label="Sitewide">
|
|
277
|
+
<form class="search-modal__form hcenter" role="search" aria-label="Sitewide" autocomplete="off">
|
|
256
278
|
<span class="utds-icon-before-search search-modal__icon-search vcenter" aria-hidden="true"></span>
|
|
257
279
|
<label for="search-modal-input-id" class="search-modal__input-label visually-hidden">Enter your search
|
|
258
280
|
terms</label>
|
|
@@ -269,7 +291,7 @@
|
|
|
269
291
|
</div>
|
|
270
292
|
<div class="search-backdrop modal-backdrop backdrop-dark"></div>
|
|
271
293
|
</div>
|
|
272
|
-
`;function
|
|
294
|
+
`;function We(){const e=document.getElementById(s.SEARCH__SEARCH_MODAL);if(!e)throw new Error("closSearchModal: searchModal not found");e.remove();const t=document.querySelector(f(s.MAIN_MENU__SEARCH));if(!t)throw new Error("closSearchModal: searchIcon not found");t.focus()}function wr(){const e=I(Tr),t=e.querySelector(f(s.SEARCH__SEARCH_BACKDROP));if(!t)throw new Error("showSearchModal: backdrop not found");const n=e.querySelector(f(s.SEARCH__SEARCH_CLOSE_BUTTON));if(!n)throw new Error("showSearchModal: closeButton not found");const o=e.querySelector(f(s.SEARCH__SEARCH_BUTTON));if(!o)throw new Error("showSearchModal: searchButton not found");const r=e.querySelector(f(s.SEARCH__SEARCH_BUTTON_WRAPPER));if(!r)throw new Error("showSearchModal: searchButtonWrapper not found");const i=e.querySelector(f(s.SEARCH__SEARCH_INPUT));if(!i)throw new Error("showSearchModal: searchInput not found");o.onclick=a=>{var l,u;a.preventDefault(),a.stopPropagation(),We(),(u=(l=A()).onSearch)==null||u.call(l,i.value)},n.onclick=a=>{a.preventDefault(),a.stopPropagation(),We()},t.onclick=a=>{a.preventDefault(),a.stopPropagation(),We()},document.body.appendChild(e),i.focus(),i.oninput=()=>{r.classList.remove(s.VISUALLY_HIDDEN)},o.onfocus=()=>{r.classList.remove(s.VISUALLY_HIDDEN)},e.onkeyup=a=>{(a.code==="Escape"||a.key==="Escape")&&(a.preventDefault(),a.stopPropagation(),We())},n.addEventListener("focusout",a=>{a.preventDefault(),a.stopPropagation(),Oe[ut.SHIFT]?o.focus():i.focus()});const c=e.querySelector(".search-modal__hidden-last-focusable");if(!c)throw new Error("showSearchModal: hiddenLastFocusableButton not found");c.addEventListener("focusin",a=>{a.preventDefault(),a.stopPropagation(),n.focus()})}function Mr(){var l;const e=A(),t=I(Ir),n=t.querySelector(f(s.MAIN_MENU__NAV));if(!n)throw new Error("renderMainMenu(): mainMenu not created");const o=n.querySelector(f(s.MAIN_MENU__TITLE));if(!o)throw new Error("renderMainMenu(): titleTag not found");const r="main-menu__nav";n.setAttribute("aria-labelledby",r),o.setAttribute("id",r),o.innerHTML=e.mainMenu.title;const i=n.querySelector(f(s.MAIN_MENU__MENU_TOP));if(!i)throw new Error("renderMainMenu(): mainMenuTop not found");e.mainMenu.menuItems.forEach(u=>{var m,b;const d=I(gr);i.appendChild(d);const _=d.querySelector(f(s.MENU_ITEM__TITLE));if(!_)throw new Error(`renderMainMenu(): sub menu title not found for ${u.title}`);const h=_.querySelector(f(s.MENU_ITEM__BUTTON_TITLE));if(!h)throw new Error(`renderMainMenu(): button title not found for ${u.title}`);h.setAttribute("id",`${s.MENU_ITEM__BUTTON_TITLE}__${u.title}-${C()}`);const p=_.querySelector(f(s.MENU_ITEM__LINK_TITLE));if(!p)throw new Error(`renderMainMenu(): link title not found for ${u.title}`);if((u.isSelected||u.actionMenu&&Re(u.actionMenu,["actionMenu"],v=>!!v.isSelected))&&(h.classList.add(s.MENU_ITEM__SELECTED),p.classList.add(s.MENU_ITEM__SELECTED)),u.actionMenu){h.innerHTML=u.title,p.remove();const v={menuItems:u.actionMenu,title:u.title},T=ft(v,h,{childrenMenuType:u.childrenMenuType||V.FLYOUT});d.appendChild(T),ye(d,h,T,"menu",{shouldFocusOnHover:!0});let M;switch(u.childrenMenuType){case V.INLINE:M=s.MENU_ITEM__INLINE;break;case V.MEGA_MENU:M=s.MENU_ITEM__MEGA_MENU;break;case V.FLYOUT:default:M=s.MENU_ITEM__FLY_OUT;break}d.classList.add(M)}else if(u.actionFunction)h.innerHTML=u.title,h.onclick=u.actionFunction,p.remove();else if(u.actionFunctionUrl)p.innerHTML=u.title,p.setAttribute("href",u.actionFunctionUrl.url),p.onclick=v=>{var T,M;(T=u.actionFunctionUrl)!=null&&T.skipHandleEvent||(v.stopPropagation(),v.preventDefault()),(M=u.actionFunctionUrl)==null||M.actionFunction(v)},h.remove();else if(u.actionUrl)p.innerHTML=u.title,p.setAttribute("href",u.actionUrl.url),h.remove();else throw new Error(`renderMainMenu(): menuItem is missing an action: ${u.title}`);((m=u.actionUrl)!=null&&m.openInNewTab||(b=u.actionFunctionUrl)!=null&&b.openInNewTab)&&(p.setAttribute("target","_blank"),p.appendChild(I(Ot)))});let c=null;if(e.utahId){const{button:u,menu:d}=ur();c=d;const _=t.querySelector(f(s.MOBILE__UTAH_ID));if(!_)throw new Error("renderMainMenu: utahIdButtonWrapper not found");_.appendChild(u)}const a=t.querySelector(f(s.MAIN_MENU__SEARCH));if(!a||!(a instanceof HTMLElement))throw new Error("renderMainMenu: searchIcon not found");if(e.onSearch){if(_t(a,document.createTextNode("Search")),a.onclick)throw new Error("searchIcon already has onclick");a.onclick=()=>wr()}else(l=a.parentElement)==null||l.insertBefore(I('<div class="main-menu__search-placeholder">'),a),a.remove();return{mainMenuWrapper:t,utahIdPopup:c}}function Ar(e){let t=NaN,n=null,o=null;return{promise:new Promise((i,c)=>{t=setTimeout(()=>{t=NaN,i()},e),n=i,o=c}),clearTimeout:i=>{t&&(clearTimeout(t),t=NaN,i(n,o))}}}const Z={isDefinitive:null,lastError:null,userInfo:null};function tn(e){var t,n,o;e.isDefinitive&&(Jt(e),(o=(n=(t=A())==null?void 0:t.utahId)==null?void 0:n.onAuthChanged)==null||o.call(n,e))}let nn=!0;const Or=500;async function on(){var t,n;let e=null;if(Z.isDefinitive===!1)e=Promise.resolve(Z);else if(nn)e=Ar(Or).promise.then(()=>{nn=!1,on().catch(o=>console.error(o))});else{const o=A();if(o.utahId===!1)e=Promise.resolve({isDefinitive:!0,lastError:"Utah ID is off",userInfo:null});else if(o.utahId===!0||((t=o.utahId)==null?void 0:t.currentUser)===void 0)Z.isDefinitive=!1,e=fetch(Le.USER_INFO,{credentials:"include"}).then(r=>r.json()).then(r=>{if(r.status===200)Z.lastError=null,Z.userInfo=r.data;else throw new Error(r.err)}).catch(r=>{Z.lastError=r,Z.userInfo=null}).finally(()=>{Z.isDefinitive=!0,tn(Z)});else{const r={isDefinitive:!0,lastError:null,userInfo:(n=o.utahId)==null?void 0:n.currentUser};e=Promise.resolve(r),tn(r)}}return e}function yr(){return Z}function Lr(){const e=document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID);if(!e)throw new Error("removeUtahIdInMobileMenu: profileActionItem not found");const t=e.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER));if(!t)throw new Error("removeUtahIdInMobileMenu: profileActionItemWrapper not found");t.remove()}function Pr(e,t){const n=document.querySelector(f(s.MOBILE__UTAH_ID));if(!n)throw new Error("hookupUtahIdInMobileMenu: utahIdWrapper not found");const o=n.querySelector(f(s.UTAH_ID__BUTTON));if(!o)throw new Error("hookupUtahIdInMobileMenu: utahIdButton not found");if(!e.querySelector(f(s.MOBILE_MENU__CONTENT)))throw new Error("hookupUtahIdInMobileMenu: mobileContentWrapper not found");const i=document.getElementById(s.MOBILE_MENU_ACTON_BAR__PROFILE_ID);if(!i)throw new Error("hookupUtahIdInMobileMenu: profileActionItem not found");const c=i.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER));if(!c)throw new Error("hookupHamburger: profileActionItemWrapper not found");const a=Ye(t);Je(o,a,c,{ariaHasPopupType:"menu",onClickHandler:l=>{var h;const u=yr(),d=A();let _=!1;if(!(u!=null&&u.isDefinitive)||!((h=u==null?void 0:u.userInfo)!=null&&h.authenticated)){_=!0;const p=d.utahId!==!1&&d.utahId!==!0&&d.utahId.onSignIn;p?p(l):(l.preventDefault(),l.stopPropagation(),window.location.href=Le.SIGN_IN)}return _},shouldOnClickCloseMenu:!0})}function Nr(){return me(A().mainMenu.menuItems,{childrenMenuType:V.INLINE,removePopupArrow:!0})}const Sr=`<div class="utah-design-system utds-official-website-popup__wrapper visually-hidden" tabindex="0">
|
|
273
295
|
<h2 class="utds-official-website-popup__heading">
|
|
274
296
|
This is an official website of the State of Utah. Here’s how you know:
|
|
275
297
|
</h2>
|
|
@@ -296,8 +318,8 @@
|
|
|
296
318
|
<span class="visually-hidden">Close official website popup</span>
|
|
297
319
|
</button>
|
|
298
320
|
</div>
|
|
299
|
-
`;function
|
|
321
|
+
`;function Ur(){const e=I(Sr),n=document.querySelector(f(s.LOGO)).querySelector(f(s.LOGO_SVG));if(!n)throw new Error("renderOfficialWebsite: logoButton not found");if(n.onclick)throw new Error("renderOfficialWebsite: logoButton already has an onclick");n.onclick=()=>{e.classList.toggle(s.VISUALLY_HIDDEN),e.classList.contains(s.VISUALLY_HIDDEN)?(n.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")):(n.setAttribute("aria-expanded","true"),e.setAttribute("aria-hidden","false"),e.focus());const r=document.querySelectorAll(f(s.TOOLTIP__WRAPPER));r==null||r.forEach(i=>{i.classList.add(s.TOOLTIP__WRAPPER__HIDDEN),i.classList.remove(s.TOOLTIP__WRAPPER__VISIBLE)})};const o=e.querySelector(f(s.LOGO_OFFICIAL_CLOSE_BUTTON));if(!o)throw new Error("renderOfficialWebsite: closeButton not found");return o.onclick=()=>{e.classList.toggle(s.VISUALLY_HIDDEN),n.focus(),n.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true")},o.id||(o.id=C()),e.id||(e.id=C()),n.setAttribute("aria-controls",e.id),n.setAttribute("aria-expanded","false"),e.setAttribute("aria-hidden","true"),e.setAttribute("aria-labelledby",n.id),e}function Cr(){const t=[...document.querySelectorAll(`
|
|
300
322
|
${f(s.MOBILE_MENU__ACTION_BAR)}
|
|
301
323
|
${f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER)}
|
|
302
324
|
${f(s.ACTION_ITEM__ICON_BUTTON)}
|
|
303
|
-
`)];t.forEach(n=>{n.onkeydown=
|
|
325
|
+
`)];t.forEach(n=>{n.onkeydown=o=>{(o.code==="Home"||o.code==="End"||o.code==="ArrowRight"||o.code==="ArrowLeft")&&o.preventDefault()},n.onkeyup=o=>{const r=t.indexOf(n);let i=NaN;if(o.code==="Home"?i=0:o.code==="End"?i=t.length-1:o.code==="ArrowRight"?i=(r+1)%t.length:o.code==="ArrowLeft"&&(i=(t.length+r-1)%t.length),!Number.isNaN(i)){o.preventDefault(),o.stopPropagation();const c=t[i],a=c.closest(f(s.MOBILE_MENU_ACTION_BAR__ACTION_ITEM_WRAPPER));if(!a)throw new Error("hookupMobileActionItemKeyboarding: newWrapper not found... how in the blazes?!");const l=c.getAttribute("aria-controls");if(l&&document.getElementById(l))c.click();else{const _=document.querySelector(f(s.MOBILE_MENU__WRAPPER));if(!_)throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");const h=_.querySelector(f(s.MOBILE_MENU__CONTENT));if(!h)throw new Error("hookupMobileActionItemKeyboarding: mobileContentWrapper not found");h.querySelectorAll(f(s.MOBILE_MENU__CONTENT_ITEM)).forEach(p=>p.classList.remove(s.IS_OPEN))}const d=document.querySelector(f(s.MOBILE_MENU__WRAPPER));if(!d)throw new Error("hookupMobileActionItemKeyboarding: mobileMenuWrapper not found");Xe(d,a)}}})}function Rr(){const e=vn.replace(s.MEDIA_SIZE__TABLET_PORTRAIT__PLACEHOLDER,`${A().mediaSizes.tabletPortrait}px`).replace(s.MEDIA_SIZE__TABLET_LANDSCAPE__PLACEHOLDER,`${A().mediaSizes.tabletLandscape}px`).replace(s.MEDIA_SIZE__MOBILE__PLACEHOLDER,`${A().mediaSizes.mobile}px`);let t=document.getElementById(s.CSS_HEADER_MEDIA_TAG_ID);t||(t=document.createElement("style"),t.id=s.CSS_HEADER_MEDIA_TAG_ID),t.innerHTML=e,document.body.appendChild(t)}function Dr(){const e=A();let t=document.body;if(e.domLocationTarget){const n=[e.domLocationTarget.cssSelector,e.domLocationTarget.element,e.domLocationTarget.elementFunction].filter(o=>o);if(n.length<1)throw new Error("loadHeader: domLocationTarget must either have a value for one of its properties or not be specified at all");if(n.length>1)throw new Error("loadHeader: domLocationTarget must only have one target specified");if(e.domLocationTarget.cssSelector)t=document.querySelector(e.domLocationTarget.cssSelector),X(!t,`loadHeader: element not found for domLocationTarget.cssSelector ${e.domLocationTarget.cssSelector}`);else if(e.domLocationTarget.element)t=e.domLocationTarget.element;else if(e.domLocationTarget.elementFunction)t=e.domLocationTarget.elementFunction(),X(!t,"loadHeader: element not returned from domLocationTarget.elementFunction");else throw new Error("loadHeader: domLocationTarget must have at least one field set")}return te(t,"loadHeader: domTarget is null (how?!)")}function rn(){var t;if(!document.querySelector(f([s.UTAH_DESIGN_SYSTEM,s.HEADER]))){const n=br(),o=Dr();o.insertBefore(n,o.firstChild);const r=Ur();n.after(r);const{mainMenuWrapper:i,utahIdPopup:c}=Mr();i&&r.after(i);const a=I(En);r.after(a);const l=document.querySelector(f(s.MOBILE_MENU__BACKDROP));if(!l)throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop not found");if(l.onclick)throw new Error("mobileMenuInteractionHandler: mobileMenuBackdrop already has onclick");l.onclick=()=>Ze();const u=Nr(),d=Xt(u,"Main Menu");d.appendChild(u);const _=Ye(d);Pn(_),c?((t=c.closest("div"))==null||t.removeAttribute("aria-labelledby"),Pr(a,c)):Lr(),Xo(),Cr(),$o(),Rr(),on().catch(h=>console.error(h))}In()}function an(e){var t,n,o,r;(t=document.querySelector(f([s.UTAH_DESIGN_SYSTEM,s.HEADER])))==null||t.remove(),(n=document.querySelector(f([s.UTAH_DESIGN_SYSTEM,s.MAIN_MENU__OUTER])))==null||n.remove(),(o=document.querySelector(f([s.UTAH_DESIGN_SYSTEM,s.MOBILE_MENU])))==null||o.remove(),(r=document.querySelector(f([s.UTAH_DESIGN_SYSTEM,s.LOGO_OFFICIAL_WRAPPER])))==null||r.remove(),Yt(),e&&setTimeout(()=>document.dispatchEvent(new Event(je.HEADER_UNLOADED)),0)}console.log(`Utah Header v${mn.version}`),H.childrenMenuTypes=V,H.defaultSettings=ze,H.events=je,H.getUtahHeaderSettings=A,H.loadHeader=rn,H.removeHeader=an,H.renderDOMSingle=I,H.setUtahHeaderSettings=An,H.sizes=de,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});
|