1"use strict";(self.webpackChunkui_apps=self.webpackChunkui_apps||[]).push([[5984],{9830(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ $c: () => (/* binding */ snapshotAnnouncementHeightForOpenMenu),\n/* harmony export */ Cz: () => (/* binding */ SELECTOR_ANNOUNCEMENT_SECTION),\n/* harmony export */ _T: () => (/* binding */ syncAnnouncementHeight)\n/* harmony export */ });\n/* unused harmony export isAnyHeaderMenuOpen */\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8706);\nvar SELECTOR_ANNOUNCEMENT_SECTION='.announcement-area .section_redesign';/** True when any header instance has a desktop flyout or mobile sheet open. */function isAnyHeaderMenuOpen(){return document.querySelector(\"\".concat(_constants__WEBPACK_IMPORTED_MODULE_0__/* .ROOT */ .Dl,\".is-menu-open, \").concat(_constants__WEBPACK_IMPORTED_MODULE_0__/* .ROOT */ .Dl,\".is-mobile-menu-open\"))!==null;}function writeAnnouncementHeight(section){var visibleBelowViewportTop=Math.round(Math.max(0,section.getBoundingClientRect().bottom));document.body.style.setProperty('--announcement-height',\"\".concat(visibleBelowViewportTop,\"px\"));}/** Sync sticky-header offset from the visible announcement height (skipped while menu is open). */function syncAnnouncementHeight(){if(document.body.getAttribute('data-announcement-enabled')!=='true'){return;}if(isAnyHeaderMenuOpen()){return;}var section=document.querySelector(SELECTOR_ANNOUNCEMENT_SECTION);if(!section){return;}writeAnnouncementHeight(section);}/** Capture the current announcement offset before opening a menu (keeps header in place). */function snapshotAnnouncementHeightForOpenMenu(){if(document.body.getAttribute('data-announcement-enabled')!=='true'){return;}var section=document.querySelector(SELECTOR_ANNOUNCEMENT_SECTION);if(!section){return;}writeAnnouncementHeight(section);}\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/content/redesign/header_redesign/utils/announcement-offset.ts?\n}")},8706(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Dl: () => (/* binding */ ROOT),\n/* harmony export */ II: () => (/* binding */ CLASS_ACTIVE),\n/* harmony export */ Md: () => (/* binding */ CLASS_SCROLLED),\n/* harmony export */ QH: () => (/* binding */ CLASS_MENU_OPEN),\n/* harmony export */ R9: () => (/* binding */ CLASS_HOVERED),\n/* harmony export */ Si: () => (/* binding */ CLASS_HIDDEN),\n/* harmony export */ TY: () => (/* binding */ DESKTOP_MEDIA_QUERY),\n/* harmony export */ V6: () => (/* binding */ CLASS_STEP_L2),\n/* harmony export */ YX: () => (/* binding */ CLASS_OPEN),\n/* harmony export */ aJ: () => (/* binding */ CLASS_STEP_L3),\n/* harmony export */ bg: () => (/* binding */ CLASS_CLOSING),\n/* harmony export */ bs: () => (/* binding */ FOCUSABLE),\n/* harmony export */ ds: () => (/* binding */ MENU_TYPE_DEFAULT),\n/* harmony export */ f9: () => (/* binding */ CLASS_MOBILE_MENU_OPEN),\n/* harmony export */ mH: () => (/* binding */ TRIGGER_HOVER),\n/* harmony export */ oZ: () => (/* binding */ CLASS_STEP_L1),\n/* harmony export */ ry: () => (/* binding */ SEL),\n/* harmony export */ uW: () => (/* binding */ TRIGGER_CLICK),\n/* harmony export */ uZ: () => (/* binding */ CLASS_VISIBLE)\n/* harmony export */ });\n/* unused harmony exports HEADER_DESKTOP_MIN_WIDTH_PX, HEADER_MOBILE_MAX_WIDTH_PX, MOBILE_MEDIA_QUERY, MENU_TYPE_TAB */\nvar ROOT='.cmp-header-redesign';/**\n * Nav breakpoint (keep in sync with header_redesign.css):\n * @custom-variant header-mobile â (width < 1200px)\n * @custom-variant header-desktop â (width >= 1200px)\n */var HEADER_DESKTOP_MIN_WIDTH_PX=1200;/** Last integer viewport width treated as mobile (1199); CSS uses width < 1200px. */var HEADER_MOBILE_MAX_WIDTH_PX=HEADER_DESKTOP_MIN_WIDTH_PX-1;var DESKTOP_MEDIA_QUERY=\"(width >= \".concat(HEADER_DESKTOP_MIN_WIDTH_PX,\"px)\");var MOBILE_MEDIA_QUERY=\"(width < \".concat(HEADER_DESKTOP_MIN_WIDTH_PX,\"px)\");var MENU_TYPE_DEFAULT='defaultMenu';var MENU_TYPE_TAB='tabMenu';var TRIGGER_CLICK='click';var TRIGGER_HOVER='hover';var CLASS_MENU_OPEN='is-menu-open';var CLASS_MOBILE_MENU_OPEN='is-mobile-menu-open';var CLASS_SCROLLED='is-scrolled';
1/** Mouse-only stand-in for :hover â touch leaves :hover stuck after a tap. */var CLASS_HOVERED='is-hovered';var CLASS_OPEN='is-open';var CLASS_CLOSING='is-closing';var CLASS_ACTIVE='is-active';var CLASS_VISIBLE='is-visible';var CLASS_HIDDEN='is-hidden';var CLASS_STEP_L1='is-step-l1';var CLASS_STEP_L2='is-step-l2';var CLASS_STEP_L3='is-step-l3';var SEL={l1Item:'.cmp-header-redesign__l1-item',l1Trigger:'.cmp-header-redesign__l1-trigger',l1Menu:'.cmp-header-redesign__l1-menu',l1MenuBody:'.cmp-header-redesign__l1-menu-body',l2:'.cmp-header-redesign__l2',l2Item:'.cmp-header-redesign__l2-item',l2Trigger:'.cmp-header-redesign__l2-trigger',l3Menu:'.cmp-header-redesign__l3-menu',l1Menus:'.cmp-header-redesign__l1-menus',menuDesktop:'.cmp-header-redesign__menu--desktop',mobile:'.cmp-header-redesign__mobile',mobileL1:'.cmp-header-redesign__mobile-l1',mobileL1Trigger:'.cmp-header-redesign__mobile-l1-trigger',mobileMenuMount:'.cmp-header-redesign__mobile-menu-mount',mobileBack:'.cmp-header-redesign__mobile-back',mobileTitle:'.cmp-header-redesign__mobile-l2-title',mobileScroll:'.cmp-header-redesign__mobile-scroll',mobileBody:'.cmp-header-redesign__mobile-body',mobileFade:'.cmp-header-redesign__mobile-fade',desktopCard:'.cmp-header-redesign__desktop-card',mobileBar:'.cmp-header-redesign__bar--mobile',overlay:'.cmp-header-redesign__overlay',mobileMenu:'.cmp-header-redesign__menu--mobile',menuToggle:'.cmp-header-redesign__menu-toggle',menuClose:'.cmp-header-redesign__menu-close',/** X in the mobile sheet header â excludes AI chatbot, which also closes the menu. */mobileMenuClose:'.cmp-header-redesign__mobile-header .cmp-header-redesign__menu-close:not(.cmp-header-redesign__ai-chatbot-btn)',utility:'.cmp-header-redesign__utility',actions:'.cmp-header-redesign__actions',signIn:'.cmp-rd-sign-in',moreWorkdaySites:'.cmp-header-redesign__more-workday-sites'};var FOCUSABLE='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/content/redesign/header_redesign/utils/constants.ts?\n}")},5984(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (/* binding */ RegionBannerRedesign)\n});\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules\nvar slicedToArray = __webpack_require__(5544);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\nvar classCallCheck = __webpack_require__(3029);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js\nvar createClass = __webpack_require__(2901);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js\nvar defineProperty = __webpack_require__(4467);\n;// ./src/main/content/jcr_root/apps/atlas/components/content/redesign/regionbanner_redesign/constants.ts\n/**\n * Locale data for the regional mismatch banner, carried over unchanged from\n * apps/atlas/components/structure/regionbanner/v1/constants.js.\n *//** Locales without their own site, mapped to the site that serves them. */var countryLanguageMappings={'en-id':'en-sg',// Indonesia(English) is pointing to Singapore(English)\n'en-my':'en-sg',// Malaysia(English) is pointing to Singapore(English)\n'en-nz':'en-au',// New Zealand(English) is pointing to Australia(English)\n'en-tw':'en-hk',// Taiwan(English) is pointing to Hong Kong(English)\n'en-th':'en-sg',// Thailand(English) is pointing to Singapore(English)\n'en-dk':'en-se',// Denmark(English) is pointing to Sweden(English)\n'en-fi':'en-se',// Finland(English) is pointing to Sweden(English)\n'en-ie':'en-gb',// Ireland(English) is pointing to United Kingdom(English)\n'en-lu':'en-be',// Luxembourg(English) is pointing to Belgium(English)\n'en-no':'en-se',// Norway(English) is pointing to Sweden(English)\n'de-at':'de-de'// Austria(German) is pointing to Germany(German)\n};/** Browser languages reported without a region, mapped to a full locale. */var localeWithoutRegion={nl:'nl-nl',ja:'ja-jp',ko:'ko-kr',pl:'pl-pl'};var DEFAULT_LOCALE='en-us';var PREFERRED_LANGUAGE_COOKIE='cookie-preferred-language';/** Days the cookie suppresses the banner after the visitor dismisses it. */var COOKIE_LIFETIME_DAYS=7;/** Allow ACDL / Alloy / AA beacons to complete before the locale redirect (matches the Launch AA timeout). */var NAV_DELAY_MS=1500;/** How long to wait for the Granite i18n dictionary before rendering default strings. */var I18N_WAIT_MS=5000;var I18N_POLL_MS=100;\n// EXTERNAL MODULE: ./src/main/content/jcr_root/apps/atlas/components/content/redesign/header_redesign/utils/announcement-offset.t
1s\nvar announcement_offset = __webpack_require__(9830);\n;// ./src/main/content/jcr_root/apps/atlas/components/content/redesign/regionbanner_redesign/regionbanner_redesign.ts\nvar SELECTOR_ROOT='.cmp-rd-regionbanner';var SELECTOR_INNER='.cmp-rd-regionbanner__inner';var SELECTOR_SELECT='.cmp-rd-regionbanner__select';var SELECTOR_CURRENT='.cmp-rd-regionbanner__current';var SELECTOR_LIST='.cmp-rd-regionbanner__list';var SELECTOR_CONTINUE='.cmp-rd-regionbanner__continue';/** Label of the button component rendered inside SELECTOR_CONTINUE. */var SELECTOR_CONTINUE_LABEL='.rd-btn__text';var SELECTOR_CLOSE='.cmp-rd-regionbanner__close';var SELECTOR_LANGUAGE='.cmp-rd-regionbanner__language';var CLASS_TEXT='cmp-rd-regionbanner__text';var CLASS_VISIBLE='cmp-rd-regionbanner--visible';var CLASS_OPEN='cmp-rd-regionbanner--open';var CLASS_SELECTABLE='cmp-rd-regionbanner--selectable';var CLASS_CONTINUE_HIDDEN='cmp-rd-regionbanner__continue--hidden';var CLASS_AUTHOR='cmp-rd-regionbanner--author';/**\n * How much of the banner is still on screen, read by the CSS that offsets the\n * redesign header. Not the banner's height: the banner scrolls with the page.\n */var CSS_VAR_HEIGHT='--rd-regionbanner-height';/**\n * Locales the site publishes. Preferably read from the list the component\n * carries (RegionBannerLocalesModel flattens the authored language navigation\n * into it). The list sits on a holder of its own\n * rather than on the banner element, which keeps the banner readable.\n */var SELECTOR_LOCALES='.cmp-rd-regionbanner__locales';var SELECTOR_HEADER_OVERLAY='.cmp-header-redesign__overlay';var CLASS_OVERLAY_VISIBLE='is-visible';var ATTR_LOCALES='data-cmp-locales';var LOCALE_IN_PATH=/\\/([a-z]{2}-[a-z]{2})\\//i;/** One entry of the JSON the component carries in ATTR_LOCALES. *//** Intl.DisplayNames is not in the ES2017 lib this project compiles against. */function displayName(locale,type,code){var ctor=Intl.DisplayNames;if(!ctor)return code;return new ctor([locale],{type:type}).of(code)||code;}function localeFromUrl(url){var match=LOCALE_IN_PATH.exec(url);return match&&match[1].toLowerCase()||DEFAULT_LOCALE;}function readCookie(name){var value=\"; \".concat(document.cookie);var parts=value.split(\"; \".concat(name,\"=\"));if(parts.length===2)return parts.pop().split(';').shift()||null;return null;}function writeCookie(name,value,days){var expiry=new Date();expiry.setTime(expiry.getTime()+days*24*60*60*1000);document.cookie=\"\".concat(name,\"=\").concat(value,\"; domain=\").concat(window.location.hostname,\"; path=/; expires=\").concat(expiry.toUTCString());}/** Locales authored on the component, empty when it carries none. */function readAuthoredLocales(root){var _root$querySelector;var payload=(_root$querySelector=root.querySelector(SELECTOR_LOCALES))===null||_root$querySelector===void 0?void 0:_root$querySelector.getAttribute(ATTR_LOCALES);if(!payload)return[];var authored;try{authored=JSON.parse(payload);}catch(error){return[];}return authored.reduce(function(entries,item){if(!item.href||!item.country)return entries;entries.push({locale:localeFromUrl(item.href),language:(item.language||'').trim(),country:item.country,href:new URL(item.href,window.location.origin).href,isMaster:item.isMaster===true});return entries;},[]);}/**\n * One banner instance.\n *\n * The mismatch detection is the same as the v1 banner in\n * apps/atlas/components/structure/regionbanner: compare the browser locale with\n * the locale in the page path, and only show the banner when the browser locale\n * is one the site publishes and the visitor has not already confirmed the\n * current locale. The banner is authored in an Experience Fragment above the\n * announcement area, and takes its place at the top of the page flow when it\n * shows, scrolling away with the page the way the announcement bar does.\n */var RdRegionBanner=/*#__PURE__*/function(){function RdRegionBanner(root){;(0,classCallCheck/* default */.A)(this,RdRegionBanner);(0,defineProperty/* default */.A)(this,\"root\",void 0);(0,defineProperty/* default */.A)(this,\"inner\",void 0);(0,defineProperty/* default */.A)(this,\"select\",void 0);(0,defineProperty/* default */.A)(this,\"currentRegion\",void 0);(0,defineProperty/* default */.A)(this,\"list\",void 0);(0,defineProperty/* default */.A)(this,\"continueBtn\",void 0);(0,defineProperty/* default */.A)(this,\"closeBtn\",void 0);(0,defineProperty/* default */.A)(this,\"currentLocale\",void 0);(0,defineProperty/* default */.A)(this,\"browserLocale\",DEFAULT_LOCALE);(0,defineProperty/* default */.A)(this,\"locales\",[]);(0,defineProperty/* default */.A)(this,\"availableLanguages\",[]);(0,defineProperty/* default */.A)(this,\"targetHref\",null);(0,defineProperty/* default */.A)(this,\"currentEntry\",null);
1(0,defineProperty/* default */.A)(this,\"heightObserver\",null);(0,defineProperty/* default */.A)(this,\"trackHeight\",null);(0,defineProperty/* default */.A)(this,\"overlayObserver\",null);this.root=root;this.inner=root.querySelector(SELECTOR_INNER);this.select=root.querySelector(SELECTOR_SELECT);this.currentRegion=root.querySelector(SELECTOR_CURRENT);this.list=root.querySelector(SELECTOR_LIST);this.continueBtn=root.querySelector(SELECTOR_CONTINUE);this.closeBtn=root.querySelector(SELECTOR_CLOSE);this.currentLocale=localeFromUrl(window.location.pathname);}return (0,createClass/* default */.A)(RdRegionBanner,[{key:\"init\",value:function init(){var _this=this;if(!this.inner||!this.select||!this.currentRegion||!this.list||!this.continueBtn||!this.closeBtn){return;}this.locales=readAuthoredLocales(this.root);if(this.locales.length===0)return;this.browserLocale=this.resolveBrowserLocale();var _this$currentLocale$s=this.currentLocale.split('-'),_this$currentLocale$s2=(0,slicedToArray/* default */.A)(_this$currentLocale$s,2),currentLanguage=_this$currentLocale$s2[0],currentRegion=_this$currentLocale$s2[1];var _this$browserLocale$s=this.browserLocale.split('-'),_this$browserLocale$s2=(0,slicedToArray/* default */.A)(_this$browserLocale$s,2),browserLanguage=_this$browserLocale$s2[0],browserRegion=_this$browserLocale$s2[1];var isRegionMismatch=browserRegion!==currentRegion;var isLanguageMismatch=browserLanguage!==currentLanguage;if(!isRegionMismatch&&!isLanguageMismatch)return;// The visitor already chose to stay on this locale.\nif(readCookie(PREFERRED_LANGUAGE_COOKIE)===this.currentLocale)return;// Only offer locales the site actually publishes.\nvar isSupported=!!this.findMaster(this.browserLocale)||!!countryLanguageMappings[this.browserLocale];if(!isSupported)return;this.whenTranslationsReady(function(){// Nothing to offer the visitor: leave the banner hidden.\nif(!_this.populateSelection(isRegionMismatch))return;_this.renderMessage(isRegionMismatch);_this.reveal();_this.bindEvents();});}/** Browser preference, falling back to a full locale when no region is reported. */},{key:\"resolveBrowserLocale\",value:function resolveBrowserLocale(){var locale=(window.navigator.language||'').toLowerCase();var _locale$split=locale.split('-'),_locale$split2=(0,slicedToArray/* default */.A)(_locale$split,2),language=_locale$split2[0],region=_locale$split2[1];if(language&®ion)return locale;return localeWithoutRegion[language]||DEFAULT_LOCALE;}},{key:\"findMaster\",value:function findMaster(locale){return this.locales.find(function(entry){return entry.locale===locale&&entry.isMaster;})||null;}/**\n * Works out where \"Continue\" goes, which locales the dropdown offers and what\n * the collapsed label reads. Returns false when the site has no locale to\n * send the visitor to.\n */},{key:\"populateSelection\",value:function populateSelection(isRegionMismatch){this.currentEntry=this.findMaster(this.currentLocale);var preferred=this.findMaster(this.browserLocale);if(preferred){this.targetHref=preferred.href;this.availableLanguages=this.locales.filter(function(entry){return entry.country===preferred.country;});this.showCollapsedLabel(isRegionMismatch,\"\".concat(preferred.country,\" (\").concat(preferred.language,\")\"));if(this.availableLanguages.length>1){var _this$select;this.root.classList.add(CLASS_SELECTABLE);this.buildLanguageList(preferred.country,isRegionMismatch);(_this$select=this.select)===null||_this$select===void 0||_this$select.setAttribute('aria-label',isRegionMismatch?'':this.translate('language_selection_mobile_label',this.browserLocale,'language selection'));}return true;}// No dedicated site for the browser locale, but another site serves it.\nvar mappedLocale=countryLanguageMappings[this.browserLocale];var mapped=mappedLocale?this.findMaster(mappedLocale):null;if(!mapped)return false;this.targetHref=mapped.href;var _this$browserLocale$s3=this.browserLocale.split('-'),_this$browserLocale$s4=(0,slicedToArray/* default */.A)(_this$browserLocale$s3,2),languageCode=_this$browserLocale$s4[0],regionCode=_this$browserLocale$s4[1];var browserLocaleTag=\"\".concat(languageCode,\"-\").concat(regionCode.toUpperCase());var languageName=displayName(browserLocaleTag,'language',languageCode);
1var regionName=displayName(browserLocaleTag,'region',regionCode.toUpperCase());this.showCollapsedLabel(isRegionMismatch,\"\".concat(languageName,\" (\").concat(regionName,\")\"));return true;}},{key:\"showCollapsedLabel\",value:function showCollapsedLabel(isRegionMismatch,preferredLabel){if(!this.currentRegion)return;if(!isRegionMismatch){this.currentRegion.textContent=this.currentEntry?\"\".concat(this.currentEntry.country,\" (\").concat(this.currentEntry.language,\")\"):preferredLabel;return;}this.currentRegion.textContent=this.availableLanguages.length>1?this.translate('Select a region'):preferredLabel;}},{key:\"buildLanguageList\",value:function buildLanguageList(country,isRegionMismatch){var _this2=this;if(!this.list)return;var listElement=document.createElement('ul');this.availableLanguages.forEach(function(entry){var _this2$currentEntry;var isCurrent=!isRegionMismatch&&((_this2$currentEntry=_this2.currentEntry)===null||_this2$currentEntry===void 0?void 0:_this2$currentEntry.href)===entry.href;if(isCurrent)return;var item=document.createElement('li');var link=document.createElement('a');link.href=entry.href;link.textContent=\"\".concat(country,\" (\").concat(entry.language,\")\");link.className=\"\".concat(SELECTOR_LANGUAGE.slice(1),\" no-toast\");link.setAttribute('role','option');item.appendChild(link);listElement.appendChild(item);});this.list.innerHTML='';this.list.appendChild(listElement);}},{key:\"renderMessage\",value:function renderMessage(isRegionMismatch){var _this$currentEntry,_this$continueBtn;var languageMismatchMessage=this.translate('This website is in [language]. Find our site in your language here.');var regionMismatchMessage=this.translate('Searching for your local Workday website? Find content for your region here.');this.root.setAttribute('aria-label',this.translate(isRegionMismatch?'Region Confirmation':'Language Confirmation'));var message=isRegionMismatch?regionMismatchMessage:languageMismatchMessage.replace('[language]',this.translate(((_this$currentEntry=this.currentEntry)===null||_this$currentEntry===void 0?void 0:_this$currentEntry.language)||''));this.insertMessage(message);// Only the label is rewritten, so the button component's markup survives.\nvar continueLabel=(_this$continueBtn=this.continueBtn)===null||_this$continueBtn===void 0?void 0:_this$continueBtn.querySelector(SELECTOR_CONTINUE_LABEL);if(continueLabel){continueLabel.textContent=this.translate('btn_continue',this.browserLocale,'Continue');}}/** Message paragraph, built here rather than authored, the way v1 builds it. */},{key:\"insertMessage\",value:function insertMessage(message){if(!this.inner)return;var paragraph=document.createElement('p');paragraph.className=CLASS_TEXT;paragraph.textContent=message;this.inner.insertBefore(paragraph,this.inner.firstChild);}},{key:\"reveal\",value:function reveal(){var _this$continueBtn2;// With more than one locale to choose from the dropdown replaces \"Continue\".\n(_this$continueBtn2=this.continueBtn)===null||_this$continueBtn2===void 0||_this$continueBtn2.classList.toggle(CLASS_CONTINUE_HIDDEN,this.availableLanguages.length>1);this.root.classList.add(CLASS_VISIBLE);this.publishHeight();this.remeasureAnnouncement();}},{key:\"hide\",value:function hide(){this.root.classList.remove(CLASS_VISIBLE,CLASS_SELECTABLE);this.closeList();this.stopTrackingHeight();document.documentElement.style.removeProperty(CSS_VAR_HEIGHT);this.remeasureAnnouncement();}/**\n * Publishes how much of the banner is still on screen, so the headers can hold\n * themselves below it. Measured from the bottom edge rather than the height,\n * the way the announcement area is: the banner scrolls with the page, so its\n * height stays the same while the part the headers have to clear shrinks to\n * zero. Tracked on scroll for that, and on resize because the message wraps to\n * two lines on narrow screens.\n */},{key:\"publishHeight\",value:function publishHeight(){var _this3=this;var apply=function apply(){var onScreen=Math.max(0,Math.round(_this3.root.getBoundingClientRect().bottom));document.documentElement.style.setProperty(CSS_VAR_HEIGHT,\"\".concat(onScreen,\"px\"));};this.trackHeight=apply;apply();window.addEventListener('scroll',apply,{passive:true});window.addEventListener('resize',apply,{passive:true});
1if(typeof ResizeObserver!=='undefined'){this.heightObserver=new ResizeObserver(apply);this.heightObserver.observe(this.root);}}},{key:\"stopTrackingHeight\",value:function stopTrackingHeight(){var _this$heightObserver;(_this$heightObserver=this.heightObserver)===null||_this$heightObserver===void 0||_this$heightObserver.disconnect();this.heightObserver=null;if(this.trackHeight){window.removeEventListener('scroll',this.trackHeight);window.removeEventListener('resize',this.trackHeight);this.trackHeight=null;}}/**\n * Showing or dismissing the banner adds or removes a band at the top of the\n * flow, which moves the announcement bar without resizing it. The header\n * measures that bar on scroll and resize only, and neither fires here, so the\n * measurement is asked for directly. A no-op on pages with no announcement.\n */},{key:\"remeasureAnnouncement\",value:function remeasureAnnouncement(){;(0,announcement_offset/* syncAnnouncementHeight */._T)();}},{key:\"bindEvents\",value:function bindEvents(){var _this4=this,_this$list,_this$list2,_this$closeBtn,_this$continueBtn3,_this$closeBtn2;if(this.availableLanguages.length>1){var _this$select2,_this$select3,_this$select4;(_this$select2=this.select)===null||_this$select2===void 0||_this$select2.setAttribute('tabindex','0');(_this$select3=this.select)===null||_this$select3===void 0||_this$select3.addEventListener('click',function(){return _this4.toggleList();});(_this$select4=this.select)===null||_this$select4===void 0||_this$select4.addEventListener('keydown',function(event){if(event.key==='Enter'||event.key===' '){event.preventDefault();_this4.toggleList();}});}else{var _this$select5;(_this$select5=this.select)===null||_this$select5===void 0||_this$select5.setAttribute('tabindex','-1');}(_this$list=this.list)===null||_this$list===void 0||_this$list.addEventListener('click',function(event){return _this4.selectLanguage(event);});(_this$list2=this.list)===null||_this$list2===void 0||_this$list2.addEventListener('keydown',function(event){var _this4$select;switch(event.key){case'Enter':case' ':_this4.selectLanguage(event);break;case'ArrowUp':case'ArrowLeft':_this4.moveFocus(event,-1);break;case'ArrowDown':case'ArrowRight':_this4.moveFocus(event,1);break;case'Escape':(_this4$select=_this4.select)===null||_this4$select===void 0||_this4$select.focus();_this4.closeList();break;default:break;}});(_this$closeBtn=this.closeBtn)===null||_this$closeBtn===void 0||_this$closeBtn.addEventListener('focus',function(){return _this4.closeList();});document.addEventListener('click',function(event){var target=event.target;if(!(target!==null&&target!==void 0&&target.closest(SELECTOR_ROOT)))_this4.closeList();});// The button component renders an anchor when a link is authored on it, so\n// the banner takes over the navigation rather than letting it follow.\n(_this$continueBtn3=this.continueBtn)===null||_this$continueBtn3===void 0||_this$continueBtn3.addEventListener('click',function(event){event.preventDefault();if(_this4.targetHref)_this4.navigate(_this4.targetHref);});(_this$closeBtn2=this.closeBtn)===null||_this$closeBtn2===void 0||_this$closeBtn2.addEventListener('click',function(){_this4.hide();writeCookie(PREFERRED_LANGUAGE_COOKIE,_this4.currentLocale,COOKIE_LIFETIME_DAYS);});this.watchHeaderOverlay();}/** Close the locale list when a header dropdown claims the shared scrim. */},{key:\"watchHeaderOverlay\",value:function watchHeaderOverlay(){var _this5=this;var overlay=document.querySelector(SELECTOR_HEADER_OVERLAY);if(!overlay||typeof MutationObserver==='undefined')return;var onOverlayChange=function onOverlayChange(){if(overlay.classList.contains(CLASS_OVERLAY_VISIBLE)){_this5.closeList();}};this.overlayObserver=new MutationObserver(onOverlayChange);this.overlayObserver.observe(overlay,{attributes:true,attributeFilter:['class']});}},{key:\"selectLanguage\",value:function selectLanguage(event){var _event$target;var link=(_event$target=event.target)===null||_event$target===void 0?void 0:_event$target.closest(SELECTOR_LANGUAGE);if(!link)return;event.preventDefault();if(this.currentRegion){this.currentRegion.textContent=link.textContent;}this.closeList();this.navigate(link.href);}/** Leaves time for analytics beacons before the locale change. */},{key:\"navigate\",value:function navigate(targetHref){var _this6=this;
1var targetLocale=localeFromUrl(targetHref);var go=function go(){if(targetLocale!==_this6.currentLocale){writeCookie(PREFERRED_LANGUAGE_COOKIE,targetLocale,COOKIE_LIFETIME_DAYS);window.location.href=targetHref;}else{writeCookie(PREFERRED_LANGUAGE_COOKIE,_this6.currentLocale,COOKIE_LIFETIME_DAYS);}_this6.hide();};if(targetLocale!==this.currentLocale){window.setTimeout(go,NAV_DELAY_MS);}else{go();}}},{key:\"moveFocus\",value:function moveFocus(event,direction){var _this$list3;event.preventDefault();var items=Array.from(((_this$list3=this.list)===null||_this$list3===void 0?void 0:_this$list3.querySelectorAll(SELECTOR_LANGUAGE))||[]);if(items.length===0)return;var index=items.indexOf(event.target);var nextIndex=(index+items.length+direction)%items.length;items[nextIndex].focus();}},{key:\"toggleList\",value:function toggleList(){var _this$select6,_this$list4;if(this.root.classList.contains(CLASS_OPEN)){this.closeList();return;}this.root.classList.add(CLASS_OPEN);(_this$select6=this.select)===null||_this$select6===void 0||_this$select6.setAttribute('aria-expanded','true');(_this$list4=this.list)===null||_this$list4===void 0||(_this$list4=_this$list4.querySelector(SELECTOR_LANGUAGE))===null||_this$list4===void 0||_this$list4.focus();}},{key:\"closeList\",value:function closeList(){var _this$select7;this.root.classList.remove(CLASS_OPEN);(_this$select7=this.select)===null||_this$select7===void 0||_this$select7.setAttribute('aria-expanded','false');}/**\n * Waits for the Granite dictionary so the banner reads in the visitor's\n * language, then renders with the default strings if it never arrives.\n */},{key:\"whenTranslationsReady\",value:function whenTranslationsReady(render){var _window$Granite;if((_window$Granite=window.Granite)!==null&&_window$Granite!==void 0&&_window$Granite.I18n){render();return;}var done=false;var run=function run(){if(done)return;done=true;window.clearInterval(intervalId);window.clearTimeout(timeoutId);render();};var intervalId=window.setInterval(function(){var _window$Granite2;if((_window$Granite2=window.Granite)!==null&&_window$Granite2!==void 0&&_window$Granite2.I18n)run();},I18N_POLL_MS);var timeoutId=window.setTimeout(run,I18N_WAIT_MS);}},{key:\"translate\",value:function translate(key){var _window$Granite3;var locale=arguments.length>1&&arguments[1]!==undefined?arguments[1]:this.browserLocale;var fallback=arguments.length>2?arguments[2]:undefined;var i18n=(_window$Granite3=window.Granite)===null||_window$Granite3===void 0?void 0:_window$Granite3.I18n;if(!i18n)return fallback||key;var dictionary=i18n.getDictionary(locale)||{};return dictionary[key]||fallback||key;}}]);}();/**\n * Entry point for the Workday component loader, which calls\n * `new RegionBannerRedesign().run()` when it finds `.cmp-rd-regionbanner`.\n */var RegionBannerRedesign=/*#__PURE__*/function(){function RegionBannerRedesign(){(0,classCallCheck/* default */.A)(this,RegionBannerRedesign);}return (0,createClass/* default */.A)(RegionBannerRedesign,[{key:\"run\",value:function run(){document.querySelectorAll(SELECTOR_ROOT).forEach(function(root){// Authors see the banner as authored; no mismatch handling in the editor.\nif(root.classList.contains(CLASS_AUTHOR))return;if(root.hasAttribute('data-cmp-initialized'))return;root.setAttribute('data-cmp-initialized','true');new RdRegionBanner(root).init();});}}]);}();\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/content/redesign/regionbanner_redesign/regionbanner_redesign.ts_+_1_modules?\n}")}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.