{promoMarkup}{notifMarkup}

‘,panelEmptyTemplate=’

  • {emptyPanelMsg}

  • ‘,panelErrorTemplate=’

    {errorMsg}

    ‘,panelParentTemplate=”,notifOnboardPromoTemplate=’

  • ‘,EXPANDED_PANEL=”expanded_panel”,ERROR_PANEL=”error_panel”,NotificationView=function(){function e(n,t){classCallCheck(this,e);var i=this;i._config=n,i._panelNode=null,i._store=t}return createClass(e,[{key:”_generatePanelMarkup”,value:function(e,n){var t=this._config,i=void 0,o=void 0;”undefined”!=typeof window&&(i=window.Notification&&”default”===window.Notification.permission,o=t.promos.bypassEligibleClassCheck||hasClass(document.body,t.promos.eligibleBodyClass));var s=t.promos.enableNotifOnboard&&i&&o?notifOnboardPromoTemplate:””;if(s){var r=t.promos.showYahooLogo?””:”yns-no-logo”;s=s.replace(“{notifOnboardBtnLabel}”,t.promos.notifOnboardBtnLabel).replace(“{notifOnboardMsg}”,t.promos.notifOnboardMsg).replace(“{subscriptionTopic}”,t.promos.subscriptionTopic).replace(“{noLogoClass}”,r).replace(“{promoLogo}”,t.promos.promoLogo)}var a=n.newCount>t.panel.maxCount?n.newCount:””,c=t.panel.notificationCenterPath,l=c?””:constants.panelHideElement,d=t.panel.headerMsg?””:” “+constants.panelHideElement,u=c?constants.panelPaddingBtm:””,p=void 0;n.count?p=n.markup:p=panelEmptyTemplate.replace(“{emptyPanelMsg}”,t.panel.emptyPanelMsg);return e=e.replace(“{notifMarkup}”,p).replace(“{promoMarkup}”,s).replace(“{hideClass}”,l).replace(“{notifCenterLink}”,c).replace(“{paddingClass}”,u).replace(“{headerMsg}”,t.panel.headerMsg).replace(“{hideHeaderClass}”,d).replace(/{notificationCenterNavMsg}/g,t.panel.notificationCenterNavMsg).replace(/{newCount}/g,a)}},{key:”render”,value:function(e,n){var t=this;if(t._panelNode){var i=void 0,o=t._panelNode,s=void 0,r=void 0;switch(e){case EXPANDED_PANEL:i=panelTemplate,r=t._store.getNotifications(),s=t._generatePanelMarkup(i,r),o.innerHTML=s;break;case ERROR_PANEL:s=(i=panelErrorTemplate).replace(“{errorMsg}”,t._config.panel.errorMsg),o.innerHTML=s}n&&n()}else n&&n(new Error(“No panel parent”))}},{key:”createPanelParentNode”,value:function(e){e&&(e.innerHTML=panelParentTemplate,this._panelNode=document.getElementById(constants.panelNodeId))}},{key:”updateBadgeNode”,value:function(e){if(e){var n=this._store.getNotifications().newCount,t=this._config.badge.maxCount;if(n){var i=n>t?t+”+”:n;e.innerHTML=i}else e.innerHTML=””}}},{key:”addStyles”,value:function(e){if(e&&”undefined”!=typeof window){var n=document.getElementById(this._config.panel.styleTagId);n||((n=document.createElement(“style”)).type=”text/css”,n.id=this._config.panel.styleTagId,n.innerText=e,document.head.appendChild(n))}}}]),e}(),EXPANDED_PANEL$1=”expanded_panel”,ERROR_PANEL$1=”error_panel”,PanelController=function(){function e(n,t,i){classCallCheck(this,e);var o=this;o._store=t,o._view=i,o._config=n;var s=o._config.panel;o._panelParentNode=document.querySelector(s.parentSelector),o._badgeNode=o._config.badge.selector&&document.querySelector(o._config.badge.selector),o._indicatorNode=s.indicatorSelector&&document.querySelector(s.indicatorSelector)}return createClass(e,[{key:”createPanelParentNode”,value:function(){this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(constants.panelNodeId)}},{key:”refreshPanelNode”,value:function(e,n){var t=this;addClass(t._notifPanelNode,constants.panelLoading),t._store.fetchNotifications(e,(function(e,i){var o=window.wafer&&window.wafer.base;o&&o.destroy(t._notifPanelNode),e?t._notifPanelNode.innerHTML||(t._view.render(ERROR_PANEL$1),addClass(t._notifPanelNode,constants.panelLoading)):(t._view.render(EXPANDED_PANEL$1),t._view.updateBadgeNode(t._badgeNode),t._showBadge(),t._showIndicator(),t._view.addStyles(i.css)),removeClass(t._notifPanelNode,constants.panelLoading),o&&o.sync(t._notifPanelNode.parentNode),n&&n(e,i)}))}},{key:”resetBadge”,value:function(){var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),addClass(e._badgeNode,e._config.badge.hideClass)}},{key:”_showIndicator”,value:function(){this._indicatorNode&&(this._store.getNotifications().newCount?addClass(this._indicatorNode,this._config.panel.indicatorClass):removeClass(this._indicatorNode,this._config.panel.indicatorClass))}},{key:”_showBadge”,value:function(){var e=this;e._store.getNotifications().newCount?removeClass(e._badgeNode,e._config.badge.hideClass):addClass(e._badgeNode,e._config.badge.hideClass)}}]),e}(),config={promos:{eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0,bypassEligibleClassCheck:!1,notifOnboardBtnLabel:”Notify Me”,notifOnboardMsg:”Get alerts for breaking news and top stories”,promoLogo:”https://s.yimg.com/cv/apiv2/ae/news/circle_bell.png”,showYahooLogo:!0,subscriptionTopic:”gondor_homerun_news”},badge:{hideClass:””,maxCount:5,selector:””},panel:{emptyPanelMsg:”You have no new notifications.”,errorMsg:””,headerMsg:”Notifications”,imageTag:”img:40×40|2|80″,indicatorClass:”yns-indicator”,indicatorSelector:null,maxCount:6,notificationCenterNavMsg:”View all {newCount} notifications”,notificationCenterPath:””,notificationTypes:””,parentSelector:null,styleTagId:”notificationStyles”,theme:”default”},service:{attemptCount:2,attemptDelay:1,url:null,resetUrl:null,isRMP:!1,responseType:”json”,timeout:1500}},Main=function(){function e(n){classCallCheck(this,e);var t=this;t.config=t._parseConfig(n),t._validateRequiredConfigs()&&(t._request=new NotificationRequest(t.config),t._store=new NotificationStore(t.config,t._request),t._view=new NotificationView(t.config,t._store),t._panelController=new PanelController(t.config,t._store,t._view),t._panelController.createPanelParentNode(),t._assignHelperMethods())}return createClass(e,[{key:”_parseConfig”,value:function(e){var n={};for(var t in objectAssign(n,config),n)if(n.hasOwnProperty(t)){var i=n[t],o=e[t];”object”===(void 0===i?”undefined”:_typeof(i))?objectAssign(i,o):n[t]=e[t]}return n}},{key:”_validateRequiredConfigs”,value:function(){var e=this.config;return!(!e.panel.parentSelector||!e.service.url)}},{key:”_assignHelperMethods”,value:function(){var e=this;e.helpers={refreshPanelNode:e._panelController.refreshPanelNode.bind(e._panelController),resetBadge:e._panelController.resetBadge.bind(e._panelController),resetIndicator:function(){removeClass(e._panelController._indicatorNode,e.config.panel.indicatorClass)}}}}]),e}(),notificationClient_module_min=Main,notificationClient={NotificationClient:notificationClient_module_min},CONSUMPTION_STORAGE_KEY=”lnct”,NotifClient=function(){function e(){var e,n;this.personalized=!1,this.ybarElem=document.getElementById(“ybar”),this.partnerClasses=null===(n=null===(e=this.ybarElem)||void 0===e?void 0:e.className)||void 0===n?void 0:n.match(/ybar-variant-([a-z]*)/),this.client=new notificationClient.NotificationClient(this.getConfig())}return e.prototype.refreshPanel=function(){var e,n,t,i=this,o={lastUpdate:this.getTimeStamp()||this.setTimeStamp(),loadInHpViewer:!0,includePersonalized:this.personalized},s=(null===(e=window.YAHOO)||void 0===e?void 0:e.context)||(null===(n=window.Af)||void 0===n?void 0:n.context)||{};return s.region&&s.lang&&(o.lang=s.lang,o.region=s.region),(null===(t=this.partnerClasses)||void 0===t?void 0:t.length)&&(o.partner=this.partnerClasses[1]),new Promise((function(e,n){i.client.helpers.refreshPanelNode({matrixParams:o},(function(t,i){t&&(logError(“Notification refresh error:”,t),n(t)),e(i)}))}))},e.prototype.resetBadge=function(){this.client.helpers.resetBadge(),this.setTimeStamp()},e.prototype.getConfig=function(){var e,n,t,i,o,s={promos:{eligibleBodyClass:”display-push-promos”,enableNotifOnboard:!0},badge:{selector:”#notif-badge”,hideClass:”ybar-notification-hidden”},panel:{emptyPanelMsg:”You have no new notifications.”,errorMsg:”Please check back later.”,headerMsg:”Notifications”,maxCount:5,parentSelector:”#ybarNotificationBody”,notificationTypes:”breakingNews”},service:{url:”/tdv2_fp/api/resource/NotificationHistory.getHistory”,isRMP:!1}},r=document.getElementById(“notification-container”),a=null===(e=null==r?void 0:r.dataset)||void 0===e?void 0:e.config,c={};if(a){“att”===(null===(n=this.partnerClasses)||void 0===n?void 0:n[1])&&(s.promos.showYahooLogo=!1);try{var l=JSON.parse(a);c=__assign({},l),this.personalized=1===l.personalize}catch(e){logError(“Notifications config parsing error”,e)}r&&delete r.dataset.config}var d=this.mergeConfigs(s,c);return(null===(t=this.partnerClasses)||void 0===t?void 0:t.length)&&”yahoo”!==(null===(i=this.partnerClasses)||void 0===i?void 0:i[1])&&(null===(o=d.promos)||void 0===o?void 0:o.subscriptionTopic)&&delete d.promos.subscriptionTopic,d},e.prototype.mergeConfigs=function(e,n){var t=__assign({},e);for(var i in e)t[i]=__assign(__assign({},e[i]),n[i]);return t},e.prototype.getTimeStamp=function(){var e;return null===(e=window.localStorage)||void 0===e?void 0:e.getItem(CONSUMPTION_STORAGE_KEY)},e.prototype.setTimeStamp=function(){var e,n=””+Math.floor((new Date).getTime()/1e3);return null===(e=window.localStorage)||void 0===e||e.setItem(CONSUMPTION_STORAGE_KEY,n),n},e}(),notifClient=new NotifClient,getNotifClient=function(){return notifClient},reInit=function(){notifClient=new NotifClient},ybarRapid,ybarRapidInterval,ybarRapidErrMsg=””,beaconQueue=[],noop=function(){},logRapidError=function(){window.removeEventListener(“beforeunload”,logRapidError),””!==ybarRapidErrMsg&&logError(“Rapid not found on page”,new Error(ybarRapidErrMsg))},findRapidWithSpaceid=function(e){var n=void 0;if(e&&e.length>0)for(var t=0;t0){if(ybarRapid.addModules(o,!1,i),beaconQueue.length>0)for(e=0;e90&&fireImageBeacon(“performance”,e)}catch(e){}}),1e3)}))},measureInit=measure(“ybar-init”);initYbar(),measureInit.stop(),initPerformanceMetricsBeaconListener(),initRapid(),initErrorBeaconListener();var selected=”_yb_1mzr7″,Css$7={“right-item”:”_yb_1rvsg”,selected:selected,”ybar-mod-topnavigation”:”_yb_2unic”,”ybar-mod-topnavigation-teaser-imp”:”_yb_tn9cl”},DOCUMENT_NODE_TYPE=9;if(“undefined”!=typeof Element&&!Element.prototype.matches){var proto=Element.prototype;proto.matches=proto.matchesSelector||proto.mozMatchesSelector||proto.msMatchesSelector||proto.oMatchesSelector||proto.webkitMatchesSelector}function closest(e,n){for(;e&&e.nodeType!==DOCUMENT_NODE_TYPE;){if(“function”==typeof e.matches&&e.matches(n))return e;e=e.parentNode}}var closest_1=closest;function _delegate(e,n,t,i,o){var s=listener.apply(this,arguments);return e.addEventListener(t,s,o),{destroy:function(){e.removeEventListener(t,s,o)}}}function delegate(e,n,t,i,o){return”function”==typeof e.addEventListener?_delegate.apply(null,arguments):”function”==typeof t?_delegate.bind(null,document).apply(null,arguments):(“string”==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return _delegate(e,n,t,i,o)})))}function listener(e,n,t,i){return function(t){t.delegateTarget=closest_1(t.target,n),t.delegateTarget&&i.call(e,t)}}var delegate_1=delegate,ListNode=function(e){this.data=e,this.next=null,this.prev=null},LinkedList=function(){function e(){this.head=null,this.tail=null}return e.prototype.push=function(e){var n=new ListNode(e);return this.head?this.tail?(n.prev=this.tail,this.tail.next=n,this.tail=n):(this.tail=n,this.tail.prev=this.head,this.head.next=this.tail):(this.head=n,n.next=this.tail),n},e.prototype.size=function(){for(var e=0,n=this.head;n;)e+=1,n=n.next;return e},e.prototype.getHead=function(){return this.head},e.prototype.getTail=function(){return this.tail},e.prototype.get=function(e){if(e>=this.size())return null;for(var n=0,t=this.head;(null==t?void 0:t.next)&&n0&&Array.prototype.forEach.call(e,(function(e){e.onerror=function(){e.onerror=null,e.style.display=”none”}}))},fixLogoOutline=function(e,n){e&&(hideOutlineOnMouseDown(“#ybar-logo”,”#ybar-logo”,n),n.onDestroy((function(){e.classList.remove(“ybar-show-outline”),e.classList.remove(“ybar-hide-outline”)})))},logoClick=function(e,n){n&&e.addElementListener(n,”click”,(function(){e.triggerEvent(“logo-click”)}))},init$3=function(e,n){n.logoImages&&hideLogosOnError(n.logoImages),n.wrapper&&(fixLogoOutline(n.wrapper,e),logoClick(e,n.wrapper))};initModule(“ybar-mod-logo”,(function(e){var n={wrapper:document.getElementById(“ybar-logo”),logoImages:document.querySelectorAll(“.”.concat(Css$6[“logo-image”]))};init$3(e,n)}));var overlay$1=”_yb_dcoic”,tooltip=”_yb_92co9″,tooltip__text=”_yb_5j6ub”,tooltip__voice=”_yb_1f55b”,tooltip__web=”_yb_19tcd”,dark=”_yb_1hjoc”,darker=”_yb_1gcfx”,light=”_yb_1q1uh”,midnight60=”_yb_1mt49″,Css$5={“dropdown-open”:”_yb_1wsgn”,”merchant-is-selected”:”_yb_huqz6″,overlay:overlay$1,”selected-merchant-clear-button”:”_yb_79kbf”,”shops-buttons”:”_yb_178z5″,”styled-select”:”_yb_gnf85″,tooltip:tooltip,”tooltip–show”:”_yb_e4e3s”,tooltip__text:tooltip__text,tooltip__voice:tooltip__voice,tooltip__web:tooltip__web,dark:dark,darker:darker,light:light,midnight60:midnight60},range=function(e,n){var t=Math.max(e,n),i=Math.min(e,n),o=Math.abs(t-i);return __spreadArray([],new Array(o+1),!0).map((function(e,n){return i+n}))},openSearchOverlay=function(e,n,t){var i=e.getConfig().bucketConfig,o=(void 0===i?{}:i).enable_search_ui,s=void 0!==o&&o;if(n.ybar){n.ybar.classList.add(“ybar-searchbox-assist-fullscreen”),document.documentElement.classList.add(“ybar-overlay”),document.body.classList.add(“ybar-overlay-noscroll”);beaconClick(“ybar”,”websrch”,””,{elm:”expand”,subsec:”searchbox”,itc:”1″}),setTimeout((function(){n.searchInput instanceof HTMLInputElement&&(t&&(n.searchInput.value=t),n.searchInput.focus(),s&&n.searchInput.click())}))}},closeSearchOverlay=function(e){var n;null===(n=e.ybar)||void 0===n||n.classList.remove(“ybar-searchbox-assist-fullscreen”),document.documentElement.classList.remove(“ybar-overlay”),document.body.classList.remove(“ybar-overlay-noscroll”),e.searchInput instanceof HTMLInputElement&&(e.searchInput.value=””,e.searchInput.blur())},initMweb=function(e,n){“smartphone”===e.getConfig().device&&(e.addElementListener(n.searchBoxPlaceholder,”click”,(function(){openSearchOverlay(e,n)})),e.addElementListener(n.searchBoxPlaceholder,”keydown”,(function(t){var i=t,o=i.keyCode,s=i.key,r=range(65,90),a=__spreadArray(__spreadArray([],range(58,57),!0),range(96,105),!0),c=__spreadArray(__spreadArray([],r,!0),a,!0).includes(o);(32===o||13===o||c)&&(t.preventDefault(),t.stopPropagation(),openSearchOverlay(e,n,c?s:””))})),n.searchBoxBackButton&&(e.addElementListener(n.searchBoxBackButton,”click”,(function(e){e.stopPropagation(),closeSearchOverlay(n);beaconClick(“ybar”,”back-close-srch”,””,{elm:”btn”,subsec:”searchbox”,itc:”1″})})),e.addElementListener(n.searchInput,”keyup”,(function(e){e.stopPropagation();27===e.keyCode&&(e.stopPropagation(),closeSearchOverlay(n))}))),e.onDestroy((function(){closeSearchOverlay(n)})))},Tooltip=function(){function e(e,n,t){n&&(this.ybar=e,this.elem=n,this.options=t,this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.addEventListeners())}return Object.defineProperty(e.prototype,”tooltip”,{get:function(){var e=this;return this.tooltipMarkup||(this.tooltipMarkup=this.createTooltip(),(this.options.tooltipParentElm||this.elem).appendChild(this.tooltipMarkup),this.ybar.onDestroy((function(){var n,t;null===(t=null===(n=e.tooltipMarkup)||void 0===n?void 0:n.parentNode)||void 0===t||t.removeChild(e.tooltipMarkup)}))),this.tooltipMarkup},enumerable:!1,configurable:!0}),e.prototype.show=function(){this.tooltip.classList.add(this.options.showClass)},e.prototype.hide=function(){this.tooltip.classList.remove(this.options.showClass)},e.prototype.addEventListeners=function(){this.ybar.addElementListener(this.elem,”mouseenter”,this.show),this.ybar.addElementListener(this.elem,”focus”,this.show),this.ybar.addElementListener(this.elem,”mouseleave”,this.hide),this.ybar.addElementListener(this.elem,”blur”,this.hide)},e.prototype.createTooltip=function(){var e=document.createElement(“div”);e.className=this.options.containerClass||””;var n=document.createElement(“p”);return n.textContent=this.options.label,n.className=this.options.textClass||””,e.appendChild(n),e},e}();createCommonjsModule((function(module){(function(){var __webpack_modules__={“./src/index.js”:
    /*!**********************!*
    !*** ./src/index.js ***!
    **********************/function(__unused_webpack_module,__unused_webpack_exports,__webpack_require__){eval(“var I18n = __webpack_require__(/*! ./lib/I18n */ “./src/lib/I18n.js”);nn(function (win, doc) {n “use strict”;nn var defaultConfig = {n uiLang: ‘en-US’,n speechLang: ‘en-US’,n voiceButton: ‘#voice-btn’,n searchBox: {n form: ‘#sf’,n input: ‘#yschsp’,n params: {n fr: ”,n fr2: ”n }n },n enable_voice_trending: false,n trending: {n market: “en-us”n },n ui: {n speechOverlay: {n disableBlur: falsen }n },n browsers: {n edge: falsen }n };nn function VoiceSearch(config) {n var self = this;n self.config = Object.assign(defaultConfig, config || {});n self.i18n = new VoiceSearch.I18n({n lang: self.config.uiLangn });n self.renderPermissionGuide(self);n self.renderSpeechPanel(self);n self.speechResult = ”;n self.noSpeech = true;n self.isRecognitionStart = false;n self.recognition = null;n self.voiceButton = doc.querySelector(self.config.voiceButton);n self.searchBoxForm = doc.querySelector(self.config.searchBox.form);n self.searchBoxQuery = doc.querySelector(self.config.searchBox.input);n self.speechPanel = doc.querySelector(‘#spch’);n self.speechButtonContainer = doc.querySelector(‘#spchbc’);n self.speechButton = doc.querySelector(‘#spchbc-btn’);n self.speechText = doc.querySelector(‘#spcht’);n self.speechOverlay = doc.getElementById(‘spch-overlay’);n self.retryLink = doc.querySelector(‘#spcht-retry’);n self.trending = doc.getElementById(‘spch-trending’);n self.trendingTerms = doc.getElementById(‘trending-terms’);n self.termSpans = doc.getElementsByClassName(“trending-term”);n self.closeButton = doc.querySelector(‘#spchx’);n self.startAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-start-202105050733.wav’);n self.resultAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-result-202105050733.wav’);n self.errorAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-error-202105050733.wav’);n self.closeAudio = new Audio(‘https://s.yimg.com/pv/static/misc/voice-close-202105050733.wav’);n self.permissionGuide = doc.querySelector(‘#spchp’);n self.permissionGuideClose = doc.querySelector(‘#spchpx’);n self.permissionGuideTimer = null;nn self.onEscKeyDown = function (e) {n if (e.code !== ‘Escape’) {n return;n }nn self.recognition.stop();n self.sendBeacon(‘keybrd’, ‘voicesearch_cancel_esc’); // The clean up should put inside closePanel() instead of here,n // or func won’t be cleaned up if user close panel with btn or overlaynn self.closePanel(self);n };nn if (self.isBrowserSupported()) {n var SpeechRecognition = win.SpeechRecognition || win.webkitSpeechRecognition;n var SpeechGrammarList = win.SpeechGrammarList || win.webkitSpeechGrammarList;n var speechGrammar = ‘#JSGF V1.0;’;n self.recognition = new SpeechRecognition();n var speechRecognitionList = new SpeechGrammarList();nn if (speechRecognitionList.addFromString) {n speechRecognitionList.addFromString(speechGrammar, 1);n }nn self.recognition.grammars = speechRecognitionList;n self.recognition.continuous = false;n self.recognition.lang = self.config.speechLang;n self.recognition.interimResults = false;n self.recognition.maxAlternatives = 1;n /* Listeners */nn if (self.voiceButton) {n self.voiceButton.onclick = function () {n self.recognition.start();nn if (self.permissionGuideTimer) {n win.clearTimeout(self.permissionGuideTimer);n }nn self.permissionGuideTimer = win.setTimeout(function () {n if (!self.isRecognitionStart) {n self.showPermissionGuide(self);n }n }, 300); // Also close when pressing escnn doc.addEventListener(‘keydown’, self.onEscKeyDown);n self.sendBeacon(‘clk’, ‘voicesearch’);n };n }nn if (self.speechButton) {n self.speechButton.onclick = function () {n if (!self.isRecognitionStart) {n self.recognition.start();n self.sendBeacon(‘clk’, ‘voicesearch_panel_mic_restart’);n } else {n self.recognition.stop();n self.sendBeacon(‘clk’, ‘voicesearch_panel_mic_close’);n self.closePanel(self);n }n };n }nn if (self.retryLink) {n self.retryLink.onclick = function () {n if (!self.isRecognitionStart) {n self.recognition.start();n self.sendBeacon(‘clk’, ‘voicesearch_panel_retry’);n }n };n }nn if (self.speechOverlay) {n self.speechOverlay.onclick = function () {n self.recognition.stop();n self.sendBeacon(‘clk’, ‘voicesearch_cancel_outside’);n self.closePanel(self);n };n }nn if (self.closeButton) {n self.closeButton.onclick = functionn /*event*/n () {n self.recognition.stop();n self.sendBeacon(‘clk’, ‘voicesearch_cancel’);n self.closePanel(self);n };n }nn if (self.permissionGuideClose) {n self.permissionGuideClose.onclick = functionn /*event*/n () {n self.recognition.stop();n self.sendBeacon(‘clk’, ‘voicesearch_permission_close’);n self.closeAudio.play();n self.hidePermissionGuide(self);n };n }n /* Recognition Events */nnn self.recognition.onresult = function (event) {n // The SpeechRecognitionEvent results property returns a SpeechRecognitionResultList objectn // The SpeechRecognitionResultList object contains SpeechRecognitionResult objects.n // It has a getter so it can be accessed like an arrayn // The first [0] returns the SpeechRecognitionResult at the last position.n // Each SpeechRecognitionResult object contains SpeechRecognitionAlternative objects that contain individual results.n // These also have getters so they can be accessed like arrays.n // The second [0] returns the SpeechRecognitionAlternative at position 0.n // We then return the transcript property of the SpeechRecognitionAlternative objectn // console.log(‘Confidence: ‘ + event.results[0][0].confidence);n self.speechResult = event.results[0][0].transcript;n /* Punctuation Handling: Check last character and strip it if necessary */nn self.handlePunctuation(self);nn if (self.speechText) {n self.speechText.innerText = self.speechResult;n }nn if (self.searchBoxQuery) {n self.searchBoxQuery.value = self.speechResult;n }nn self.resultAudio.play();n win.setTimeout(function () {n if (self.speechPanel) {n self.speechPanel.classList.remove(“s2tb”);n self.speechPanel.classList.add(“s2tb-h”);n }nn self.hideRetryLink(self);nn if (self.searchBoxForm) {n var inputFr = self.searchBoxForm.querySelector(‘[name=fr]’);n var inputFr2 = self.searchBoxForm.querySelector(‘[name=fr2]’);nn if (inputFr && self.config.searchBox && self.config.searchBox.params && self.config.searchBox.params.fr) {n inputFr.value = config.searchBox.params.fr;n inputFr.disabled = false; // for homepage casen }nn if (inputFr2 && self.config.searchBox && self.config.searchBox.params && self.config.searchBox.params.fr2) {n inputFr2.value = config.searchBox.params.fr2;n inputFr2.disabled = false; // for homepage casen }nn self.searchBoxForm.submit();n }n }, 1000);n };nn self.recognition.onspeechstart = functionn /*event*/n () {// Fired when speech startsn };nn self.recognition.onspeechend = function () {n // Fired when speech endsn self.recognition.stop();n };nn self.recognition.onerror = functionn /*event*/n () {n // console.log(‘Error occurred in recognition: ‘ + event.error);n if (self.speechText) {n self.speechText.innerText = self.i18n.t(‘search.voice.recognition_error’);n }nn self.hideTrending(self);n self.showRetryLink(self);n self.errorAudio.play();n };nn self.recognition.onaudiostart = functionn /*event*/n () {n // Fired when the user agent has started to capture audio.n if (self.speechButtonContainer) {n self.speechButtonContainer.classList.add(“listening”);n }n };nn self.recognition.onaudioend = functionn /*event*/n () {n // Fired when the user agent has finished capturing audio.n if (self.speechButtonContainer) {n self.speechButtonContainer.classList.remove(“listening”);n }n };nn self.recognition.onsoundstart = functionn /*event*/n () {n // Fired when any sound — recognisable speech or not — has been detected.n self.hideTrending(self);n self.noSpeech = false;nn if (self.speechButtonContainer) {n self.speechButtonContainer.classList.remove(“listening”);n self.speechButtonContainer.classList.add(“speaking”);n }n };nn self.recognition.onsoundend = functionn /*event*/n () {n // Fired when no sound presentn if (self.speechButtonContainer) {n self.speechButtonContainer.classList.remove(“speaking”);n }n };nn self.recognition.onstart = functionn /*event*/n () {n // Fired when the speech recognition service has begun listeningn self.recognitionInit(self);n self.startRecognition(self);n };nn self.recognition.onend = functionn /*event*/n () {n // Fired when the speech recognition service has disconnected.n self.isRecognitionStart = false;nn if (self.noSpeech == false && self.speechResult == ”) {n // No match: Fired when the speech recognition can’t recognise speechn if (self.speechText) {n self.speechText.innerText = self.i18n.t(‘search.voice.recognition_nomatch’);n }nn self.hideTrending(self);n self.showRetryLink(self);n self.errorAudio.play();n }n }; // trigger onReady event when initializednnn if (document && document.dispatchEvent) {n document.dispatchEvent(new Event(‘VOICE_JS_READY’));n }n }n } // static membersnnn VoiceSearch.I18n = I18n; // instance membersnn VoiceSearch.prototype.renderPermissionGuide = function (self) {n var tmpl = “\n

    \n \n

    \n \n

    \n

    “.concat(self.i18n.t(‘search.voice.permission_title’), “

    \n

    “).concat(self.i18n.t(‘search.voice.permission_text’), “

    \n

    \n

    \n

    \n “);n var dom = new DOMParser().parseFromString(tmpl, ‘text/html’);n document.body.appendChild(dom.body.children[0]);n };nn VoiceSearch.prototype.renderSpeechPanel = function (self) {n var tmpl = “\n

    \n \n \n

    \n

    \n

    \n \n \n \n \n \n \n

    \n

    \n

    \n \n \n “.concat(self.i18n.t(‘search.voice.recognition_retry’), “\n

    \n

    \n

    \n

    \n

    \n

    \n “).concat(self.i18n.t(‘search.voice.trending_title’), “\n \n

    \n

    \n

    \n “);n var dom = new DOMParser().parseFromString(tmpl, ‘text/html’);nn if (self && self.config && self.config.ui && self.config.ui.speechOverlay && self.config.ui.speechOverlay.disableBlur) {n dom.body.children[0].classList.add(‘disable-blur-overlay’);n }nn document.body.appendChild(dom.body.children[0]);n };nn VoiceSearch.prototype.isBrowserSupported = function () {n var isSupported = false;n var self = this;n var isChromium = Boolean(window.chrome);n var isIOSChrome = /CriOS/.test(window.navigator.userAgent);n var isEdge = /Edg\//.test(window.navigator.userAgent);n var isLegacyEdge = /Edge\//.test(window.navigator.userAgent);n var isOpera = Boolean(window.opr);n var isBrave = Boolean(window.navigator.brave);n var browsers = [// chromen {n checkEnabled: function checkEnabled() {n return true;n },n checkBrowser: function checkBrowser() {n return isChromium && !isIOSChrome && !isEdge && !isOpera && !isBrave;n },n checkAPI: function checkAPI() {n return win && (‘SpeechRecognition’ in win || ‘webkitSpeechRecognition’ in win) && (‘SpeechGrammarList’ in win || ‘webkitSpeechGrammarList’ in win);n }n }, // edgen {n checkEnabled: function checkEnabled() {n return self && self.config && self.config.browsers && self.config.browsers.edge;n },n checkBrowser: function checkBrowser() {n return isChromium && isEdge && !isLegacyEdge;n },n checkAPI: function checkAPI() {n return win && (‘SpeechRecognition’ in win || ‘webkitSpeechRecognition’ in win) && (‘SpeechGrammarList’ in win || ‘webkitSpeechGrammarList’ in win);n }n }];nn for (var b = 0; b 0) {n var lastChar = self.speechResult.charAt(self.speechResult.length – 1);nn if (lastChar === ‘.’ || lastChar === ‘?’ || lastChar === ‘。’ || lastChar === ‘?’) {n self.speechResult = self.speechResult.slice(0, -1);n }n }n };nn VoiceSearch.prototype.sendBeacon = function (actn, slk) {n var ULT = win.YAHOO.ULT || {},n SB = win.YAHOO.SB || {};nn if (ULT.beacon_click) {n var trackParams = {n _S: SB.config.i13n.spaceid,n _I: SB.config.i13n.pvid,n actn: actn,n sec: ‘search’,n slk: slkn };n win.YAHOO.ULT.beacon_click(trackParams);n }n };nn VoiceSearch.prototype.ajaxReq = function (url, callback) {n var DONE_STATE = XMLHttpRequest.DONE || 4; // for IE-compatibilitynn var xhr = new XMLHttpRequest();n var responseRaw;n var response; // CORS request only for IE8/IE9nn if (doc.documentMode && doc.documentMode n // tags it will allow on a pagenn if (!options.singleton && typeof options.singleton !== ‘boolean’) {n options.singleton = isOldIE();n }nn list = list || [];n var lastIdentifiers = modulesToDom(list, options);n return function update(newList) {n newList = newList || [];nn if (Object.prototype.toString.call(newList) !== ‘[object Array]’) {n return;n }nn for (var i = 0; i &]/gim,(function(e){return””+e.charCodeAt(0)+”;”}))},ae:function(e,n,t,i){if(i=i||!1,e.addEventListener)e.addEventListener(n,t,i);else{if(!e.attachEvent)return!1;e.attachEvent(“on”+n,t)}},de:function(e,n,t){if(e.removeEventListener)e.removeEventListener(n,t);else{if(!e.detachEvent)return!1;e.detachEvent(“on”+n,t)}},ts:function(){return Math.round((new Date).getTime()/1e3)},bold:function(e,n,t,o){var s,r=(o.pattern||””)+”(&[^;\s]*)?(%needles)”;return(o=o.exact?[i(t)]:t.split(/[s|,]+/).filter((function(e){return””!==e})).sort((function(e,n){return n.length-e.length})).map(i)).length?(r=r.replace(“%needles”,o.join(“|”)),n.replace(new RegExp(r,”gi”),(s=e,function(e,n,t){return n&&!/s/.test(t)?e:s.replace(/{s}/g,t)}))):n},fireEvent:function(e,n,t){var i;”function”==typeof s.CustomEvent?(i=new s.CustomEvent(n,{detail:t}),e.dispatchEvent(i)):”function”==typeof r.createEvent?((i=r.createEvent(“CustomEvent”)).initCustomEvent(n,!1,!1,t),e.dispatchEvent(i)):(r.attachEvent,document.documentElement[n]=t)}},s.YAHOO=s.YAHOO||{},s.YAHOO.NBClass=o,s.YAHOO.NB=new o,Array.prototype.forEach||(Array.prototype.forEach=function(e,n){var t,i;if(null==this)throw new TypeError(” this is null or not defined”);var o,s=Object(this),r=s.length>>>0;if(“function”!=typeof e)throw new TypeError(e+” is not a function”);for(1>>0;if(“function”!=typeof e)throw new TypeError;for(var i,o=[],s=2>>0;if(“function”!=typeof e)throw new TypeError(e+” is not a function”);for(1this.length)&&-1!==this.indexOf(e,n)});var s,r,a,c,l,d,u,p,f,m,h=window,g=document,v=h.YAHOO,y=v.NB,b={},_=”before_get_assist”,w=”before_display_data”,C=”before_init_view”,E=”after_init_view”,S=”before_parse_data”,k=”before_update_assist”,x=”after_update_list”,T=”after_create_item”,L=”before_show_sa”,I=”after_reset_view”,A=”after_hide_view”,M=”after_init_controller”,R=”click_assist”,N=”before_query_assist”,O=”before_key_submit”,B=”before_button_submit”,P=”before_submit_query”,D=”after_item_highlight”,q=”after_item_reset_highlight”,j=”before_sb_focus”,U=”after_sb_focus”,F=”before_sb_blur”,$=”after_sb_blur”,H=”before_beacon”,V=”after_set_ylc”,Y=”after_reset_controller”;function G(e,n){n=(e=e||{}).tag||n||”div”;var t,i=g.createElement(n);for(t in e.css&&(i.className=e.css),e.text&&(i.textContent=e.text),e.attrs)y.set(i,t,e.attrs[t]);for(t in e.style)i.style[t]=e.style[t];return e.wrap?((n=G(e.wrap)).appendChild(i),n):i}function z(e){this.config=e||{},this.listeners={},this.cb={}}function W(){}function J(){}function Q(){}function K(){var e=this.app.view.elems,n=e.sbClear;n&&(0Manage history’},log:{sec:”search”,slk:”clear history”,rspns:”upd”,t2:”search”,t4:”clear history”}}}function xe(){function e(e){e.keyCode&&27!==e.keyCode&&13!=e.keyCode||(y.stopPropagation(e),s.value=””,y.setFocus(s),i.show(),t.control.beacon(“tapClr”,r,n.config.log))}var n=this,t=n.app,i=t.view,o=i.elems,s=o.sbInput,r=o.sbClear;r&&(y.ae(r,”click”,e),y.ae(r,”keydown”,e))}function Te(){this.config={log:{_r:2,actn:”clk”,pos:1,sec:”search”,slk:”clearsearch”,rspns:”upd”,t1:”hdr”,t2:”search”,t3:”clear”,t4:”clearsearch”}}}v.SA=(d=[],z.prototype={jsonp:function(e){var n=g.getElementsByTagName(“head”)[0],t=g.createElement(“script”);y.set(t,”type”,”text/javascript”),y.set(t,”src”,e),n.appendChild(t),y.ae(t,”load”,(function(){n.removeChild(t)}))},createElem:G,getElemStyleValue:function(e,n){return h.getComputedStyle?h.getComputedStyle(e).getPropertyValue(n):e.currentStyle?(n=n.replace(/-([a-z]){1}/g,(function(e,n){return n.toUpperCase()})),e.currentStyle[n]):””},format:function(e,n){if(e)return e.replace(/{(d+)}/g,(function(e,t){return n&&void 0!==n[t]?n[t]:””})).trim()},on:function(e,n,t){var i;e&&n&&((i=this.listeners)[e]||(i[e]=[]),i[e].push({thisArg:t||this,fn:n}))},notify:function(e,n){var t=this.listeners;if(!t[e])return!1;t[e].forEach((function(e){var t=e.thisArg;(e=e.fn)&&e.apply&&1!=t.config.disable&&e.apply(t,n||[])}))},init:function(e){var n,t,i,o,s=this,r=s.config,a=r.plugins={};for(o in s.view=n=new l.viewClass,s.model=t=new l.modelClass,s.control=i=new l.controlClass,b){var c=new b[o];a[o]=c.config=c.config||{},c.createElem=G,c.init(s)}”object”==typeof e&&y.merge(r,e),s.ready=n.init(s)&&t.init(s)&&i.init(s)}},u=z,l={ver:”assistjs-v1.0.155-ybar”,apps:d,plugs:b,add:function(e,n){b[e]=n},msg:{BEFORE_GET_ASSIST:_,BEFORE_DISPLAY_DATA:w,BEFORE_INIT_VIEW:C,AFTER_INIT_VIEW:E,BEFORE_PARSE_DATA:S,BEFORE_UPDATE_ASSIST:k,AFTER_UPDATE_LIST:x,AFTER_CREATE_ITEM:T,BEFORE_SHOW_SA:L,AFTER_RESET_VIEW:I,AFTER_HIDE_VIEW:A,AFTER_INIT_CONTROLLER:M,CLICK_ASSIST:R,BEFORE_QUERY_ASSIST:N,BEFORE_KEY_SUBMIT:O,BEFORE_BUTTON_SUBMIT:B,BEFORE_SUBMIT_QUERY:P,BEFORE_SB_FOCUS:j,AFTER_SB_FOCUS:U,BEFORE_SB_BLUR:F,AFTER_SB_BLUR:$,BEFORE_BEACON:H,AFTER_SET_YLC:V,AFTER_RESET_CONTROLLER:Y,AFTER_ITEM_HIGHLIGHT:D,AFTER_ITEM_RESET_HIGHLIGHT:q},markers:{GOSSIP_MARKER_SEARCH_HISTORY:13,GOSSIP_MARKER_TRENDING:9,GOSSIP_MARKER_PEOPLE_ALSO_SEARCH_FOR:42},init:function(e){var n,t=y.ieVer;return!(t&&t”+s+” “+t.config.saAria.shownText+””)},show:function(){var e=this,n=e.config,t=e.elems.sbInput.value,i=t.length;e.app.notify(L),e.shown&&e.sameQuery()||(e.lastInput=t,in.maxInput?e.hide():(e.model.fetch(),e.triggered=!0))},hide:function(){var e=this,n=(t=e.elems).saAria,t=t.sbForm,i=e.config;y.removeClass(g.body,i.typingClass),t&&t.parentElement&&y.removeClass(t.parentElement,i.typingClass),y.removeClass(t,i.noResultClass),e.clearAssist(),e.shown=!1,e.triggered=!1,n&&(y.set(n,”aria-expanded”,”false”),n.innerHTML=”

    “+e.config.saAria.closedText+”

    “),e.app.notify(A)},clearAssist:function(){this.elems.saTray.innerHTML=””,this.items.splice(0,this.items.length),this.assistItem=null},createItem:function(e){var n,t={idx:e.idx,data:e.origData},i=y.htmlEncode,o=this.config,s=(n=this.app.createElem)(o.saItem,”li”);return(n=(y.set(s,”pos”,e.idx),n(o.saTitle,”span”))).innerHTML=e.t||(o.boldTag&&e.k&&e.q?y.bold(o.boldTag,i(e.k),i(e.q),o.highlight||{}):i(e.k)),s.appendChild(n),t.li=s,t.title=n,this.app.notify(T,[t,e]),t},resetQuery:function(){this.elems.sbInput.value=this.origQuery},reset:function(){var e=this,n=e.config,t=e.elems.sbForm;n.resetQuery&&e.resetQuery(),e.hide(),t.action=e.origAction,e.app.notify(I)},sameQuery:function(){return this.elems.sbInput.value==this.lastInput}},Q),l.initConfig=function(){return{elems:{sbForm:”sb-form”,sbInput:”sb-input”,sbSubmit:”sb-search”,sbClear:”sb-clr”,sbCancel:”sb-cancel”,saTray:”sa-tray”},customEvent:{},sa:{css:”sa”,attrs:{type:”normal”}},saList:{css:”sa-list”,attrs:{role:”listbox”},style:{cursor:”pointer”}},saItem:{css:”sa-item”,attrs:{role:”option”}},saTitle:{css:”sa-item-title”},saAria:{shownText:”new suggestions shown”,closedText:”Suggestion box closed”,css:”sa-aria-live-region”,attrs:{“aria-live”:”polite”},style:{position:”absolute”,left:”-9999px”}},saBE:{host:””,base:”/sugg/gossip/gossip-us-ura/”,params:{l:1,bm:3,output:”sd1″,nresults:10}},shBE:{host:””,base:”/history”},minInput:0,maxInput:255,boldTag:”{s}“,ylc:{_r:2},ylcAssist:{use_case:””},hideOnOutsideClick:!0,noQueryClass:”sa-noQuery”,typingClass:”typing”,noResultClass:”sf-noResult”}},b.hideSbClr=(X.prototype={init:function(e){(this.app=e).on(L,K,this)}},X),b.saFr=(te.prototype={init:function(e){(this.app=e).on(E,Z,this),e.on(N,ee,this),e.on(I,ne,this)}},te),b.ipos=(se.prototype={init:function(e){(this.app=e).on(L,ie,this),e.on(_,oe,this)}},se),b.saTray=(ae.prototype={init:function(e){(this.app=e).on(C,re,this)}},ae),b.saFlvr=(le.prototype={init:function(e){e.on(T,ce,this)}},le),b.saEdit=(ue.prototype={init:function(e){e.on(T,de,this)}},ue),b.saAnnot=(fe.prototype={init:function(e){e.on(T,pe,this)}},fe),b.saImg=(he.prototype={init:function(e){e.on(T,me,this)}},he),b.saGroup=(ye.prototype={init:function(e){this.app=e,this.idxs={},e.on(T,ge,this),e.on(x,ve,this)}},ye),b.saPCActn=(Ee.prototype={init:function(e){var n=this;n.app=e,n.selectedIndex=-1,e.on(w,be,n),e.on(M,_e,n),e.on(U,we,n),e.on($,Ce,n)}},Ee),b.tapRmv=(ke.prototype={init:function(e){(this.app=e).on(R,Se,this)}},ke),b.tapClr=(Te.prototype={init:function(e){(this.app=e).on(M,xe,this)}},Te)}();var history=”_yb_17pof”,lowlight=”_yb_1pj0r”,sa=”_yb_1eulw”,trending=”_yb_17x6u”,Css$4={“bot-search-icon”:”_yb_jajhy”,”bot-search-icon-container”:”_yb_1l7x6″,”bot-search-item”:”_yb_4yglr”,”bot-search-item-col”:”_yb_10egq”,”bot-search-span”:”_yb_1nbv5″,history:history,”list-item-hover”:”_yb_1vble”,lowlight:lowlight,”no-wrap”:”_yb_15mhp”,”related-title”:”_yb_1sq68″,sa:sa,”sa-annot-rich”:”_yb_1yn5p”,”sa-annot-subtitle”:”_yb_1t0ty”,”sa-annot-title”:”_yb_nk8fc”,”sa-edit”:”_yb_ls37l”,”sa-edit-icon”:”_yb_tz94u”,”sa-edit-text”:”_yb_1ru8i”,”sa-fd-actn-cont”:”_yb_1z0aw”,”sa-grp-hdr”:”_yb_svfow”,”sa-grp-hdr-title”:”_yb_esv9d”,”sa-history”:”_yb_59zhs”,”sa-img”:”_yb_1dmlo”,”sa-img-ctn”:”_yb_lwd7m”,”sa-img-icon”:”_yb_prjus”,”sa-item”:”_yb_arin3″,”sa-item-title”:”_yb_3m0lf”,”sa-rich-thumb”:”_yb_19dw4″,”sa-sbx-container”:”_yb_1g0le”,”sa-sugg”:”_yb_7ed5r”,”sa-thumb-icon”:”_yb_vk2s1″,”sa-tray”:”_yb_10q3s”,”sa-tray-list-container”:”_yb_1mdri”,”sa-trending”:”_yb_19k87″,”sub-assist”:”_yb_4o266″,”suggestion-title”:”_yb_14e64″,trending:trending,”trending-title”:”_yb_11ozx”,”yui3-highlight”:”_yb_1aawl”},saConfV1={boldTag:’{s}‘,customEvent:{customBtn:”searchBtnClicked”,customKeyBoard:”enterKeyPressed”,customSelection:”assistSelectionClicked”},elems:{sbForm:”ybar-sf”,sbInput:”ybar-sbq”,sbSubmit:”ybar-search”,sbClear:”ybar-sbq-x”,sbCancel:”ybar-search-back-btn”},hightlight:{exact:!0,pattern:”^”},minInput:1,sa:{css:Css$4[“sa-tray”]},saBE:{base:””,host:””,params:{appid:”yfp-t”}},saItem:{css:””},saList:{css:Css$4[“sa-tray-list-container”]},saTitle:{css:””,style:{display:”block”}},plugins:{saFr:{disable:!0},saTray:{afterNode:”ybar-sbq”,ctn:{css:Css$4[“sa-sbx-container”]},tray:{css:Css$4.sa+” “+Css$4.lowlight}},saPCActn:{css:Css$4[“list-item-hover”]},ylcEncode:{disable:!0},saFlvr:{disable:!0},saEdit:{disable:!0},saAnnot:{disable:!0},saImg:{disable:!0},saPopup:{disable:!0}}},richSAConfV1={saBE:{base:””,host:””,params:{appid:”yfp-t”,”.crumb”:””,f:1}},shBE:{host:”https://search.yahoo.com”,base:”/history”,params:{_bcrumb:””}},minInput:0,plugins:{saFlvr:{m9:Css$4[“sa-trending”],m13:Css$4[“sa-history”],flvr:Css$4[“sa-sugg”]},saEdit:{ctn:{css:Css$4[“sa-edit”]},icon:{css:Css$4[“sa-edit-icon”]},text:{css:Css$4[“sa-edit-text”],text:”Remove”}},saAnnot:{title:{css:Css$4[“sa-annot-title”]},subtitle:{css:Css$4[“sa-annot-subtitle”]},richClass:Css$4[“sa-annot-rich”]},tapRmv:{placeholder:””},saImg:{placeholder:{css:Css$4[“sa-img-icon”]},thumbnail:{css:Css$4[“sa-img”]},ctn:{css:Css$4[“sa-img-ctn”]}},saGroup:{hdr:{css:Css$4[“sa-grp-hdr”]},title:{css:Css$4[“sa-grp-hdr-title”]},grps:{m9:{text:”Trending Now”,css:Css$4.trending},m13:{text:””,css:Css$4.history}}}}},richSAConfV1Smartphone={saBE:{base:””,host:””,params:{appid:”mi5″,”.crumb”:””,f:1}},shBE:{host:”https://search.yahoo.com”,base:”/history”,params:{_bcrumb:””}},saItem:{css:Css$4[“sa-item”]},saTitle:{css:Css$4[“sa-item-title”]},minInput:0,plugins:{saFlvr:{m9:Css$4[“sa-trending”],m13:Css$4[“sa-history”],flvr:Css$4[“sa-sugg”]},saEdit:{ctn:{css:Css$4[“sa-edit”]},icon:{css:Css$4[“sa-edit-icon”]},text:{css:Css$4[“sa-edit-text”]}},saAnnot:{title:{css:Css$4[“sa-annot-title”]},subtitle:{css:Css$4[“sa-annot-subtitle”]},richClass:Css$4[“sa-annot-rich”]},tapRmv:{placeholder:””},saImg:{placeholder:{css:Css$4[“sa-img-icon”],wrap:{css:Css$4[“sa-thumb-icon”]}},thumbnail:{css:Css$4[“sa-img”]},ctn:{css:Css$4[“sa-img-ctn”]},richClass:Css$4[“sa-rich-thumb”],showIconOnImgLoad:!0},saGroup:{hdr:{css:Css$4[“sa-grp-hdr”]},title:{css:Css$4[“sa-grp-hdr-title”]},grps:{m9:{text:”Trending Now”,css:Css$4.trending},m13:{text:””,css:Css$4.history}}}}},bottomSearch=function(e,n,t){var i=document.createElement(“div”);i.className=t[“bot-search-item”];var o=document.createElement(“div”),s=document.createElement(“div”);o.className=t[“bot-search-item-col”],s.className=t[“bot-search-item-col”];var r=document.createElement(“div”);r.className=t[“bot-search-icon-container”];var a=document.createElementNS(“http://www.w3.org/2000/svg”,”svg”),c=document.createElementNS(“http://www.w3.org/2000/svg”,”path”);a.setAttribute(“width”,”20″),a.setAttribute(“height”,”20″),a.setAttribute(“viewBox”,”0 0 24 24″),a.classList.add(t[“bot-search-icon”]),c.setAttribute(“d”,”M3.7634,15.837 L6.1814,15.837 C6.5214,17.45 7.0614,18.891 7.7584,20.045 C6.0094,19.118 4.6024,17.637 3.7634,15.837 L3.7634,15.837 Z M2.9144,12.008 C2.9144,11.351 2.9844,10.711 3.1164,10.094 L5.8884,10.094 C5.8264,10.717 5.7864,11.354 5.7864,12.008 C5.7864,12.663 5.8264,13.299 5.8884,13.922 L3.1164,13.922 C2.9844,13.305 2.9144,12.665 2.9144,12.008 L2.9144,12.008 Z M7.7584,3.971 C7.0614,5.125 6.5214,6.566 6.1814,8.179 L3.7634,8.179 C4.6024,6.379 6.0094,4.898 7.7584,3.971 L7.7584,3.971 Z M11.0504,3.142 L11.0504,8.179 L8.1054,8.179 C8.6604,5.664 9.7414,3.771 11.0504,3.142 L11.0504,3.142 Z M12.9654,3.142 C14.2754,3.771 15.3564,5.664 15.9114,8.179 L12.9654,8.179 L12.9654,3.142 Z M20.2524,8.179 L17.8344,8.179 C17.4954,6.566 16.9544,5.126 16.2574,3.971 C18.0064,4.898 19.4144,6.379 20.2524,8.179 L20.2524,8.179 Z M11.0504,20.875 C9.7414,20.245 8.6594,18.352 8.1054,15.837 L10.1354,15.837 C10.2104,15.161 10.3914,14.519 10.6584,13.922 L7.7984,13.922 C7.7354,13.305 7.7004,12.665 7.7004,12.008 C7.7004,11.351 7.7354,10.711 7.7984,10.094 L11.0504,10.094 L11.0504,13.184 C11.5394,12.388 12.1904,11.702 12.9654,11.183 L12.9654,10.094 L20.8994,10.094 C21.0284,10.697 21.0964,11.323 21.0994,11.964 L21.0994,11.964 L21.0994,12.661 C21.0994,13.19 21.5284,13.618 22.0574,13.618 L22.0584,13.618 C22.5874,13.618 23.0164,13.19 23.0164,12.661 L23.0164,11.965 L23.0144,11.965 C22.9904,5.662 17.6704,0.608 11.2724,1.024 C5.8994,1.373 1.4994,5.676 1.0414,11.04 C0.5134,17.228 5.1074,22.463 11.0504,22.975 C11.1664,22.985 11.3274,22.993 11.4844,22.999 C11.8104,23.012 12.1194,22.85 12.2904,22.572 L12.2924,22.569 C12.5734,22.113 12.3964,21.514 11.9124,21.284 L11.0504,20.875 Z M15.9434,18.874 C14.6054,18.874 13.5214,17.79 13.5214,16.452 C13.5214,15.115 14.6054,14.03 15.9434,14.03 C17.2804,14.03 18.3654,15.115 18.3654,16.452 C18.3654,17.79 17.2804,18.874 15.9434,18.874 M21.6354,20.908 L19.4524,18.725 C19.8774,18.07 20.1264,17.291 20.1264,16.452 C20.1264,14.145 18.2584,12.274 15.9514,12.269 L15.9354,12.269 C13.6284,12.274 11.7604,14.145 11.7604,16.452 C11.7604,18.763 13.6324,20.635 15.9434,20.635 C16.7814,20.635 17.5614,20.386 18.2154,19.961 L20.3984,22.144 C20.7404,22.486 21.2934,22.486 21.6354,22.144 C21.9774,21.803 21.9774,21.249 21.6354,20.908″),a.appendChild(c),r.appendChild(a),o.appendChild(r);var l=document.createElement(“span”),d=document.createElement(“span”);d.className=t[“bot-search-span”];var u=document.createElement(“span”),p=e.split(“{query}”);return l.textContent=p[0]||””,d.textContent=n,u.textContent=p[1]||””,s.appendChild(l),s.appendChild(d),s.appendChild(u),i.appendChild(o),i.appendChild(s),i},_getQueryStringByName=function(e){var n=new RegExp(“[?&]”+e+”=([^]*)”).exec(window.location.search);return n?n[1]:null},_getFrValueByMode=function(e,n,t){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=document.getElementById(“ybar”),o=null==i?void 0:i.querySelector(‘input[name=”fr”]’),s=o?o.value:”yfp-t”,r=_getQueryStringByName(“fr”),a=r||s,c=i&&i.className&&i.className.match(/ybar-variant-([a-z]+)/),l=c?c[1]:””;return-1===[“att”,”frontier”,”rogers”].indexOf(l)&&(e&&(a+=”-m”),n&&(a+=”-s”)),”tn”!==t&&”tg”!==t||(a=r?a+”-tn”:(null==o?void 0:o.dataset.tnvalue)||a),a},_getFr2ValueByMode=function(e,n,t,i,o){void 0===t&&(t=!1);var s=null,r=”smartphone”===n&&!!document.querySelector(“.Reader-open”)||”smartphone”!==n&&!!document.querySelector(“.modal-open”),a=e.querySelector(‘input[name=”fr2″]’);if(a){s=a.value;var c=a.dataset&&a.dataset.savalue,l=a.dataset&&a.dataset.modalsb,d=a.dataset&&a.dataset.modalsa;t?s=r&&d?d:c:r&&l&&(s=l),i&&o&&(s=””.concat(s,”,ct:”).concat(i,”,kt:”).concat(o))}return s},_getTsrcValueByMode=function(e,n){void 0===n&&(n=!1);var t=null,i=e.querySelector(‘input[name=”.tsrc”]’);if(i){t=i.value;var o=i.dataset&&i.dataset.savalue;n&&o&&(t=o)}return t},_setInputValues=function(e,n,t){var i=e.querySelectorAll(n);if(i)for(var o=0;o=0?(s=”srch-asst”,d=!0,l=c.idx+1):s=”kybrd”:s=”botSearchClicked”===e.type?”sitesrch”:”icon”,”homepage”!==i&&”my”!==i||!r&&!d)”smartphone”===o&&(setFr2(n,o,d),setTsrc(n,d));else{var u=f(c),p=u.category,m=u.keyword;setFr(n,r,d,p),setFr2(n,o,d,p,m),setTsrc(n,d)}”ngy”===i&&(r||d)&&setFr(n,r,d),y(getI13nObject(s,”0″,l.toString()))}},h=function(e){var t,s=!!document.querySelector(“.modal-open”),r=null===(t=e.detail)||void 0===t?void 0:t.data,a=!0,c=(r&&r.idx||0)+1;if(“homepage”===i||”my”===i){var l=f(r),d=l.category,u=l.keyword;setFr(n,s,a,d),setFr2(n,o,a,d,u),setTsrc(n,a)}else”smartphone”===o&&(setFr2(n,o,a),setTsrc(n,a));”ngy”===i&&setFr(n,s,a),y(getI13nObject(“srch-asst”,”0″,c.toString()))},g=function(e){if(“function”==typeof t.beaconClick&&9!==e.keyCode&&13!==e.keyCode&&1===u&&”smartphone”!==o){t.saveCurrentTimerValue(“search_input_keyboard_input”);var n=getI13nObject(“keystroke”,”1″);delete n.clickParams.tar,u++,t.beaconClick(n.sec,n.slk,n.pValue,n.clickParams)}},v=function(){t.saveCurrentTimerValue(“search_input_focus_click”),”smartphone”===o&&n.addEventListener(“click”,(function(){if(e){if(e.classList.contains(“ybar-searchbox-assist-fullscreen”))return;e.classList.add(“ybar-searchbox-assist-fullscreen”)}if(!document.documentElement.classList.contains(“ybar-overlay”)){document.documentElement.classList.toggle(“ybar-overlay”),document.body.classList.add(“ybar-overlay-noscroll”);”function”==typeof t.beaconClick&&t.beaconClick(“ybar”,”websrch”,””,{elm:”expand”,subsec:”searchbox”,itc:”1″})}}))},y=function(e){if(“function”==typeof t.beaconClick){t.saveCurrentTimerValue(“search_query_submit”);var i={pp:{A_utm:t.getPerformanceI13nObject()}};t.beaconClick(e.sec,e.slk,e.pValue,e.clickParams,void 0,(function(){setTimeout((function(){n&&n.submit()}),300)}),i)}else n&&n.submit()};function b(){this.config={botSearch:{action:c,text:d||””},suggestionTitle:{text:l||””}}}function _(e){var n=this.config,t=this.app.view,i=t.elems.sbForm,o=t.elems.sbInput.value,s=suggestionTitle(Css$4,n.suggestionTitle.text),r=bottomSearch(n.botSearch.text,o,Css$4);r&&(e&&s&&(e.prepend(s),e.appendChild(r)),r.addEventListener(“click”,(function(){n.botSearch.action&&(i.action=n.botSearch.action),t.hide(),m(new CustomEvent(“botSearchClicked”))})))}a&&(a&&(a.addEventListener(“enterKeyPressed”,m),a.addEventListener(“assistSelectionClicked”,h),a.addEventListener(“searchBtnClicked”,m),a.addEventListener(“keydown”,g),a.addEventListener(“click”,v)),”homepage”!==i&&”my”!==i&&”ngy”!==i||(setFr(n),”homepage”===i&&setTypeByQueryString(n)),t.saveCurrentTimerValue(“search_assist_ready”)),b.prototype={init:function(e){this.app=e,e.on(“after_update_list”,_,this)}},c&&(null===(r=window.YAHOO.SA)||void 0===r||r.add(“saBotSearch”,b))},saInitV1=function(e,n,t,i,o,s){var r=n.searchBox.getAttribute(“data-appid”);if(window.YAHOO&&window.YAHOO.SA){“attgoog”===r&&(t.saBE.params.appid=”attgoog”),t.saBE.host=n.searchBox.getAttribute(“data-sabase”);var a=n.searchBox.dataset.sacrumb,c=n.searchBox.dataset.sabcrumb,l=n.searchBox.dataset.mtestid;a&&(t.saBE.params[“.crumb”]=a),c&&t.shBE&&(t.shBE.params._bcrumb=c),l&&(t.saBE.params.mtestid=l),ApplyOverrides(n.ybar,n.searchBox,{beaconClick:beaconClick,saveCurrentTimerValue:saveCurrentTimerValue,getPerformanceI13nObject:getPerformanceI13nObject},i,o,s),window.YAHOO.SA.init(t)}else{var d=”Search lib not found. SearchAssist failed to initialise”;e.logError(d,new Error(d))}};initModule(“ybar-mod-assistjs”,(function(e){var n,t=document.getElementById(“ybar-sf”);if(t&&”true”===t.getAttribute(“data-saEnabled”)){var i={ybar:document.getElementById(“ybar”),searchBox:t,searchInput:document.getElementById(“ybar-sbq”),searchBoxBackButton:document.getElementById(“ybar-search-back-btn”)},o=e.getConfig(),s=saConfV1,r=!!o.bucketConfig.enable_search_ui;if(r){var a=”smartphone”===o.device?richSAConfV1Smartphone:richSAConfV1,c=t.getAttribute(“data-tn-title”);c&&(null===(n=null==a?void 0:a.plugins)||void 0===n?void 0:n.saGroup)&&Object.assign(a.plugins.saGroup,{grps:{m9:{text:c}}}),s=__assign(__assign(__assign({},saConfV1),a),{plugins:__assign(__assign({},saConfV1.plugins),a.plugins)})}saInitV1(e,i,s,o.property,o.device,r)}}));var homepage_show_saved_accounts=”_yb_1mndy”,mobile=”_yb_10tta”,show=”_yb_ui3ii”,smartphone=”_yb_1fvre”,Css$3={homepage_show_saved_accounts:homepage_show_saved_accounts,mobile:mobile,”prof-notif-badge”:”_yb_1pe4q”,show:show,”sign-in-menu”:”_yb_e9oqq”,”signed-in”:”_yb_zhy1n”,”signed-out”:”_yb_16s72″,”signedout-text”:”_yb_1vrf9″,smartphone:smartphone,”notification-container”:”_yb_zelff”,”pfs-container”:”_yb_9u2n4″,”pfs-iframe”:”_yb_gldcu”,”ybar-account-img-signed-out”:”_yb_poeq3″,”ybar-account-menu”:”_yb_1fp7r”,”ybar-account-menu-item-signed-out”:”_yb_atw8d”,”ybar-account-user-email”:”_yb_inff4″,”ybar-account-user-email-other”:”_yb_3gqq1″,”ybar-account-user-name”:”_yb_1acuk”,”ybar-account-user-signedout”:”_yb_z6knp”,”ybar-account-yahoo-plus-imp”:”_yb_uyjez”,”ybar-icon-arrow”:”_yb_24vcr”,”ybar-icon-arrow-down”:”_yb_rlf1m”,”ybar-icon-arrow-up”:”_yb_v2tui”,”ybar-icon-image-wrapper”:”_yb_gqda2″,”ybar-item-hidden”:”_yb_uh5q7″,”ybar-login-btn”:”_yb_6i04e”,”ybar-mod-account”:”_yb_4hx14″,”ybar-mod-mail”:”_yb_1iee5″,”ybar-see-info”:”_yb_19b1v”,”ybar-sign-out”:”_yb_xkgaz”,”ybar-sign-out-text”:”_yb_1h63n”,”ybar-user-accounts-list”:”_yb_q6rju”,”ybar-user-profile-img”:”_yb_1o1q7″},animation=”_yb_ejlyy”,noscroll=”_yb_7tvx9″,overlay=”_yb_1tnkb”,Css$2={animation:animation,”left-open”:”_yb_1c9by”,noscroll:noscroll,overlay:overlay,”right-open”:”_yb_tvm29″},addOverlay=function(e,n,t,i){var o,s,r=e||document.body,a=document.createElement(“div”);a.classList.add(Css$2.overlay),a.setAttribute(“data-hidden”,”true”),null===(s=null===(o=r.parentNode)||void 0===o?void 0:o.parentNode)||void 0===s||s.appendChild(a),r.classList.add(Css$2.animation);var c=document.documentElement,l=!0,d=0,u=function(){l=!l,a.setAttribute(“data-hidden”,””.concat(l)),null==c||c.classList.toggle(“ybar-overlay”),document.body.classList.toggle(Css$2.noscroll,!l),r.classList.toggle(Css$2[n+”-open”],!l),l?a.scrollTop=0:null==i||i.focus(),0===d&&(d=1,setTimeout((function(){refreshModule()}),300))};t.onDestroy((function(){var e,n;null===(n=null===(e=r.parentNode)||void 0===e?void 0:e.parentNode)||void 0===n||n.removeChild(a),r.classList.remove(Css$2.animation),l||u()})),t.addElementListener(r,”toggle-overlay”,(function(){u()})),t.addElementListener(a,”mousedown”,(function(){u()}))},complete=function(e,n){if(200!==e.status){var t=new Error(“Request failed with status: “+e.status);t._meta={status:e.status},e.ymreqid&&(t._meta={ymreqid:e.ymreqid}),n(t)}else{var i=null;try{i=JSON.parse(e.responseText)}catch(e){var o=new Error(“Error parsing responseText”);return o._meta={originalError:e},void n(o)}n(null,i)}},_ieFetch=function(e,n){return void 0===n&&(n={}),__awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){return[2,new Promise((function(t,i){var o=new XMLHttpRequest;if(o.open(“string”==typeof n.method?n.method:”GET”,”string”==typeof e?e:e.url,!0),”object”==typeof n.headers){var s=n.headers;for(var r in s)o.setRequestHeader(r,s[r])}o.withCredentials=”include”===n.credentials,o.onreadystatechange=function(){4===o.readyState&&t({ok:o.status>=200&&o.status40959)&&(o19903))return!1}return!0},normalizeAndEscapeUserRecord=function(e){var n={fn:e.fn||””,ln:e.ln||””,em:e.em||””,alias:e.alias||””,imageUrl:e.imageUrl,state:e.state,fullName:null,identifier:””};return n.fullName=isNameCJK(n.fn,n.ln)?[n.ln,n.fn].join(“”):[n.fn,n.ln].join(” “),n.identifier=n.em||n.alias,n},createAccountItemElement=function(e,n,t){var i=t.ybarAccMenuItemTemplate,o=t.crumb;if(i){var s=(n+1).toString(),r=i.getAttribute(“data-signedOutState”),a=i.getAttribute(“data-done”)||””,c=getTemplateContent(i),l=c.children&&c.children[0];if(!l&&c.childNodes)for(var d=0;d=0;–n){e[n]=normalizeAndEscapeUserRecord(e[n]);var t=e[n].state;0!==t&&”0″!==t||(window.YBAR&&window.YBAR.setUserEmail(e[n].em),e.splice(n,1)[0])}return e},addDoneUrlToEl=function(e,n,t){return 0===e.indexOf(“javascript:”)||~e.indexOf(“https://membernotifications.aol.com/notice/maillogout”)?e:(t&&(t=~e.indexOf(“&activity=ybar-“)?void 0:t.replace(“[[pspid]]”,getSpaceId())),~e.indexOf(“done=”)?(e=e.replace(/[[page]]/g,encodeURIComponent(window.location.href)),t&&(e+=”&”+t),e):~e.indexOf(“dest=[[done]]”)?e.replace(/[[done]]/g,encodeURIComponent(n)):(e=appendQorA(e),e+=”.done=”+encodeURIComponent(n),t&&(e+=”&”+t),e))},addDoneUrlToAllLink=function(e,n){var t,i=e.ybarAccMenuItemTemplate,o=e.ybarAccountContainer,s=document.querySelector(“.”.concat(Css$3[“ybar-mod-account”],” .”).concat(Css$3[“ybar-login-btn”])),r=document.querySelector(“.”.concat(Css$3[“ybar-mod-account”],” .”).concat(Css$3[“ybar-sign-out”])),a=o&&o.querySelectorAll(“a”),c=””,l=window.location.href;if(s){var d=s.href;n.onDestroy((function(){s.href=d})),s.href=addDoneUrlToEl(s.href,l,s.getAttribute(“data-redirect-params”)||void 0)}if(i?(l=i.getAttribute(“data-done”)||””,c=i.getAttribute(“data-sign-out-url”)||””):r&&(c=r.getAttribute(“data-sign-out-url”)||””),a){var u=function(){var e=t,i=a[e].href;n.onDestroy((function(){a[e].href=i}));var o=a[t].getAttribute(“data-redirect-params”);a[t].classList.contains(Css$3[“ybar-sign-out”])?a[t].href=addDoneUrlToEl(a[t].href,c,o||void 0):a[t].href=addDoneUrlToEl(a[t].href,l,o||void 0)};for(t=0;t0){var h=document.querySelector(“”.concat(s,” .”).concat(Css$3[“ybar-sign-out”])),g=h&&h.getAttribute(“data-soa”),v=document.querySelector(“”.concat(s,” .”).concat(Css$3[“ybar-sign-out-text”]));if(v&&g&&(v.innerText=g),c&&c.classList.add(Css$3.show),t){var y=document.querySelector(“”.concat(s,” “).concat(Css$3[“ybar-icon-arrow”])),b=Css$3[“ybar-icon-arrow-up”],_=Css$3[“ybar-icon-arrow-down”],w=Css$3[“ybar-item-hidden”],C=document.querySelectorAll(“.”.concat(Css$3[“ybar-item-hidden”]));y&&(y.classList.toggle(_),e.addElementListener(y,”click”,(function(){for(var e=0;ed){var E=document.querySelector(“”.concat(s,” .”).concat(Css$3[“ybar-see-info”]));E&&E.style&&(E.style.display=”block”)}addDoneUrlToAllLink(n,e)}else r&&(r.style.display=”block”)}))}},handleResetBadge=function(e){getNotifClient().resetBadge(),e.notifBadge&&(e.notifBadge.style.visibility=”hidden”),e.profNotifBadge&&(e.profNotifBadge.style.visibility=”hidden”)},getPath=function(e){if(“function”==typeof e.composedPath)return e.composedPath();if(e.path)return e.path;for(var n=e.target,t=[];null!==n.parentNode;)t.push(n),n=n.parentNode;return t.push(document,window),t},notify=function(e,n){var t=n.ybarAccountContainer,i=n.smartphoneNotifContainer,o=n.notificationMenu,s=n.notifBadge,r=n.dropdownContainer,a=n.ybarNotificationBody,c=n.profNotifBadge,l=n.backButton,d=function(e){(null==e?void 0:e.newCount)&&e.newCount>0&&s&&(s.style.visibility=”visible”,c&&(c.style.visibility=”visible”,c.innerText=s.innerText))},u=getNotifClient(),p=function(){u.refreshPanel().then(d).catch((function(){}))};if(i){p();var f=setInterval((function(){p()}),3e5);e.onDestroy((function(){clearInterval(f)})),e.addElementListener(o,”click”,(function(){p(),r&&(r.style.display=”block”),t&&(t.style.width=”100%”,t.scrollTop=0,t.style.overflow=”hidden”),handleResetBadge(n),beaconClick(“ybar”,”notification”,””,{slk:”notification”,elm:”btn”,elmt:”visible”===(null==s?void 0:s.style.visibility)?”new alert”:””,sec:”ybar”,subsec:”notification”,pkgt:”profile-pane”,itc:”1″})})),e.addElementListener(l,”click”,(function(){r&&(r.style.display=”none”),t&&(t.style.width=””,t.style.overflow=””),beaconClick(“ybar”,”back-notification”,””,{slk:”back-notification”,elm:”arrow”,pkgt:”profile-pane”,sec:”ybar”,subsec:”notification”,itc:”1″})})),a&&e.addElementListener(a,”click”,(function(e){getPath(e).find((function(e){var n=e;if(n.nodeName&&”a”===n.nodeName.toLowerCase()&&n.classList.contains(“yns-link”))return r&&(r.style.display=”none”),t&&(t.style.width=””,t.dispatchEvent(new CustomEvent(“toggle-overlay”))),!0}))}))}},pfs=function(e,n,t){var i=/https://(.+[.])?pfs.yahoo.com(:[0-9]+)?/,o=null,s=function(){var e;null===o&&((o=document.createElement(“iframe”)).src=”https://stage.pfs.yahoo.com/”,o.sandbox.add(“allow-forms”),o.sandbox.add(“allow-scripts”),o.sandbox.add(“allow-same-origin”),o.classList.add(t),null===(e=n.ybarAccountMenuBody)||void 0===e||e.appendChild(o))};n.ybarAccountMenu&&(e.addElementListener(n.ybarAccountMenu.parentNode,”mouseenter”,s,{once:!0}),e.addElementListener(n.ybarAccountMenu.parentNode,”focus”,s,{once:!0}),n.ybarAccountContainer&&(n.ybarAccountContainer.style.width=”377px”),window.addEventListener(“message”,(function(e){if(i.test(e.origin)){var n=function(e){var n={cmd:”noop”,params:{height:”0px”,url:””}};try{n=JSON.parse(e)}catch(e){return}return n}(e.data);if(null!==o&&(null==n?void 0:n.cmd)&&e.source&&!(e.source instanceof MessagePort)&&!(e.source instanceof ServiceWorker))switch(n.cmd){case”iframeready”:e.source.postMessage(JSON.stringify({cmd:”initialize”,params:{height:window.innerHeight-40}}),e.origin);break;case”hide”:case”hide-for-animation”:o.style.height=”0px”;break;case”show”:case”resize”:o.style.height=n.params.height;break;case”redirect”:window.location=n.params.url}}})))},canBuildAccSwitcherList=!0,accSettingDropdownOpen=!1,visibilityTracking=0,params,imageElementsConfig={ybarAccountImage:{selector:”ybar-account-img”,size:”64″},ybarCurrentUserProfileImage:{selector:”ybar-current-user-profile-img”,size:”128″},ybarUserProfileImage:{selector:”ybar-user-profile-img”,size:”128″}},pictureOnErrorForSize=function(e,n){var t=”https://s.yimg.com/wm/modern/images/default_user_profile_pic_”+e+”.png”;n.onerror=null,n.srcset=””,n.src=t},init$2=function(e,n){var t=n.ybarAccountContainer,i=n.ybarAccountMenu,o=n.ybarMobile,s=n.isSmartphone,r=n.ybarMenuManagePub,a=n.arrowWrapper,c=n.downArrow,l=n.upArrow,d=n.mailNode,u=n.notifyContainer,p=n.otherAccWrapper,f=n.signInAccountMenu,m=n.signInBtn,h=n.ybarModAccount,g=n.yahooPlusImpression;new A11yNavigation(e,{containerElm:n.ybarAccountContainer,isUserAccountNavigation:!0,loggedInUser:n.loggedInUser,loggedInUserElement:n.loggedInUserElement});var v=function(i){if(t)t.style.removeProperty(“display”),”false”===t.getAttribute(“data-enabled”)&&(t.style.display=”none”),addDoneUrlToAllLink(n,e);else{var o=new Error(“ybarAccountContainer not Found”);logError(“ERROR:”,o)}t&&canBuildAccSwitcherList&&(canBuildAccSwitcherList=!1,e.onDestroy((function(){canBuildAccSwitcherList=!0})),buildAccSwitcherList(e,n,i))},y=function(){var e,n;0===visibilityTracking&&(visibilityTracking=1,null===(e=null==i?void 0:i.parentNode)||void 0===e||e.removeEventListener(“mouseenter”,y),null===(n=null==i?void 0:i.parentNode)||void 0===n||n.removeEventListener(“focusin”,y),setTimeout((function(){refreshModule()}),500))},b=function(){null==t||t.classList.remove(“ybarMenuOpen”),null==i||i.setAttribute(“aria-expanded”,”false”)},_=function(){if(g&&!g.getAttribute(“src”)&&g.getAttribute(“data-src”)){var n=g.getAttribute(“data-src”)||””;addConsentToUrl(n).then((function(e){g.setAttribute(“src”,e)})),e.onDestroy((function(){g.setAttribute(“src”,””)}))}};if(m&&(addHoverEvent(e,m,”ybar”,”sign-in”,params={elm:”signin”,subsec:”settings”,itc:”2″}),addDoneUrlToAllLink(n,e)),i||o||f){if(o)v(!0);else{if(t&&”true”===t.getAttribute(“data-pfs”))return void pfs(e,n,Css$3[“pfs-iframe”]);if(v(!1),e.addEventListener(“close-all-menus”,(function(){f&&f.classList.contains(Css$3.show)&&f.parentNode&&!isHovered(f.parentNode)&&b()})),e.onDestroy((function(){b()})),i){if(i.onchange=function(){e.triggerEvent(“close-all-menus”)},params={itc:”2″,elm:”menu”,elmt:”user-info”,subsec:”accounts”},s){var w=document.querySelector(“#ybarAccountMenuOpener”);w&&w.setAttribute(“data-ylk”,”slk:Settings;elm:btn;sec:ybar;subsec:settings;pkgt:profile-pane;itc:0;tar:login.yahoo.com”),function(){t&&addOverlay(t,”right”,e);var n=document.querySelector(“.”.concat(Css$3[“ybar-icon-image-wrapper”]));e.addElementListener(n,”click”,(function(){null==t||t.dispatchEvent(new CustomEvent(“toggle-overlay”))}))}(),e.addElementListener(a,”click”,(function(){var e,n;accSettingDropdownOpen?(null==c||c.classList.remove(“hide”),null==l||l.classList.add(“hide”),p&&(p.style.height=”0″)):(null==c||c.classList.add(“hide”),null==l||l.classList.remove(“hide”),p&&(n=(e=p).scrollHeight,e.style.height=n+”px”));var t=”manage-account-open”,i={elm:”expand”,subsec:”settings”,pkgt:”profile-pane”,itc:”1″};(accSettingDropdownOpen=!accSettingDropdownOpen)||(t=”manage-account-close”,i.elm=”btn”),beaconClick(“ybar”,t,””,i)})),notify(e,n)}else{var C=document.querySelector(“#ybarAccountMenu + label”);C&&(addHoverEvent(e,C,”ybar”,”profile-expand”,params),e.addElementListener(C,”mouseenter”,_),e.addElementListener(h,”focus”,_)),i&&i.parentNode&&(e.addElementListener(i.parentNode,”mouseenter”,y),e.addElementListener(i.parentNode,”focusin”,y))}hideOutlineOnMouseDown(“#ybarAccountMenu”,”#ybarAccountMenu + label”,e)}e.addElementListener(h,”focusin”,(function(){null==t||t.classList.add(“ybarMenuOpen”),null==i||i.setAttribute(“aria-expanded”,”true”)})),e.addElementListener(h,”focusout”,b),e.addElementListener(r,”click”,b),u&&(e.addElementListener(u,”focusin”,b),e.addElementListener(u,”mouseenter”,b)),d&&(e.addElementListener(d,”focusin”,b),e.addElementListener(d,”mouseenter”,b))}Object.keys(imageElementsConfig).forEach((function(e){var n=imageElementsConfig[e],t=document.querySelector(“.”.concat(Css$3[n.selector]));t&&(t.onerror=function(){pictureOnErrorForSize(n.size,t)})}))}};initModule(“ybar-account-init”,(function(e){var n=document.getElementById(“ybarAccountContainer”),t={ybarAccountContainer:n,ybarAccountMenu:document.getElementById(“ybarAccountMenu”),loggedInUser:document.querySelectorAll(“#ybarAccountProfile”),loggedInUserElement:document.getElementById(“ybarAccountProfile”),ybarMobile:document.querySelector(“.”.concat(Css$3.mobile,” .”).concat(Css$3[“ybar-account-user-email”])),isSmartphone:document.querySelector(“.”.concat(Css$3.smartphone)),ybarMenuManagePub:document.getElementById(“ybarMenuManagePub”),arrowWrapper:document.getElementById(“smartphone-arrow”),downArrow:document.getElementById(“down-arrow”),upArrow:document.getElementById(“up-arrow”),otherAccWrapper:document.getElementById(“otherAccWrapper”),signInAccountMenu:document.querySelector(“.”.concat(Css$3[“ybar-mod-account”],” .”).concat(Css$3[“sign-in-menu”])),signInBtn:document.querySelector(“.”.concat(Css$3[“ybar-mod-account”],” .”).concat(Css$3[“ybar-login-btn”])),ybarModAccount:document.querySelector(“.”.concat(Css$3[“ybar-mod-account”])),yahooPlusImpression:n&&n.querySelector(“.”.concat(Css$3[“ybar-account-yahoo-plus-imp”])),crumb:document.querySelector(‘input[name=”crumb”]’),ybarAccMenuItemTemplate:document.getElementById(“ybarAccMenuItemTemplate”),generalSignin:document.getElementById(“generalSignin”),inSessionSignin:document.getElementById(“inSessionSignin”),notifyContainer:document.getElementById(“notification-container”),mailNode:document.getElementById(“ybarMailLink”),smartphoneNotifContainer:document.getElementById(“smartphoneNotifContainer”),notificationMenu:document.getElementById(“smartphoneNotifMenu”),notifBadge:document.getElementById(“notif-badge”),profNotifBadge:document.querySelector(“.”.concat(Css$3[“prof-notif-badge”])),dropdownContainer:document.getElementById(“notifDropdownContainer”),ybarNotificationBody:document.getElementById(“ybarNotificationBody”),backButton:document.getElementById(“backButton”),ybarAccountMenuBody:document.getElementById(“ybarAccountMenuBody”)};init$2(e,t)}));var Css$1={“popover-body”:”_yb_1fulm”,”ybar-mail-item-desc”:”_yb_1hjk5″,”ybar-mail-item-image”:”_yb_k1i4v”,”ybar-mail-item-link”:”_yb_1icf7″,”ybar-mail-item-name”:”_yb_11pow”,”ybar-mail-item-snippet”:”_yb_1iy0h”,”ybar-mail-item-time”:”_yb_1hdji”,”ybar-mail-item-unread”:”_yb_15e77″,”ybar-mail-link”:”_yb_9xxae”,”ybar-mail-list”:”_yb_14ak3″,”ybar-mail-preview”:”_yb_16q6t”,”ybar-mail-signin-link”:”_yb_1sqte”,”ybar-mod-mail”:”_yb_1n1q0″,”ybar-mod-mail-promo-imp”:”_yb_ierfm”},JwsRequestType,JwsRequestStatus;!function(e){e[e.COUNT=0]=”COUNT”,e[e.PREVIEW=1]=”PREVIEW”}(JwsRequestType||(JwsRequestType={})),function(e){e[e.PENDING=0]=”PENDING”,e[e.COMPLETE=1]=”COMPLETE”}(JwsRequestStatus||(JwsRequestStatus={}));var jwsCache=new Map,getCache=function(e){var n=jwsCache.get(e);if(n){if(n.status===JwsRequestStatus.PENDING)return n.promise;var t=Date.now()-12e4;return n.data&&n.lastRequested>t?Promise.resolve(n.data):void 0}},setCacheData=function(e,n){var t={lastRequested:Date.now(),status:JwsRequestStatus.COMPLETE,promise:Promise.resolve(n),data:n};jwsCache.set(e,t)},setCachePromise=function(e,n){var t={lastRequested:Date.now(),status:JwsRequestStatus.PENDING,promise:n};jwsCache.set(e,t)},Jws=function(){function e(){}return Object.defineProperty(e.prototype,”wssid”,{get:function(){var e,n,t=null===(e=window.YBAR)||void 0===e?void 0:e.wssid;return t||(t=(null===(n=document.querySelector(‘input[name=”mail_wssid”]’))||void 0===n?void 0:n.value)||””,this.wssid=t),t},set:function(e){window.YBAR=window.YBAR||{},window.YBAR.wssid=e||””},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,”appid”,{get:function(){var e,n,t=null===(e=window.YBAR)||void 0===e?void 0:e.appid;return t||(t=(null===(n=document.querySelector(‘input[name=”mail_appid”]’))||void 0===n?void 0:n.value)||””,this.appid=t),t},set:function(e){window.YBAR=window.YBAR||{},window.YBAR.appid=e||””},enumerable:!1,configurable:!0}),e.prototype.fetchPreview=function(e,n){var t=(void 0===e?{}:e).maxMessages,i=void 0===t?4:t;return __awaiter(this,void 0,void 0,(function(){var e,t,o,s=this;return __generator(this,(function(r){return e=getCache(JwsRequestType.PREVIEW),!n&&e?[2,e]:(1,t={data:{responseType:”json”,requests:[{id:”GetMailboxId”,uri:”/ws/v3/mailboxes/”,method:”GET”,filters:{select:{mailboxId:”$..mailboxes[?(@.isPrimary==true)].id”}},suppressResponse:!0,requests:[{id:”ListMessages”,uri:”/ws/v3/mailboxes/@.id==$(mailboxId)/messages/@.select==q?q=count%3A6+offset%3A0+folderType%3AINBOX+-sort%3Adate”,method:”GET”}]}]}},o=this._fetch(t,1,(function(e){var n=s._normalizePreviewResponse(e,{maxMessages:i});return setCacheData(JwsRequestType.PREVIEW,n),n})),setCachePromise(JwsRequestType.PREVIEW,o),[2,o])}))}))},e.prototype.fetchCount=function(e){return __awaiter(this,void 0,void 0,(function(){var n,t,i,o=this;return __generator(this,(function(s){return n=getCache(JwsRequestType.COUNT),!e&&n?[2,n]:(1,t={data:{responseType:”json”,requests:[{id:”GetMailboxId”,uri:”/ws/v3/mailboxes/”,method:”GET”,filters:{select:{mailboxId:”$..mailboxes[?(@.isPrimary==true)].id”}},suppressResponse:!0,requests:[{id:”ListDecos”,uri:”/ws/v3/mailboxes/@.id==$(mailboxId)/decos”,method:”GET”}]}]}},i=this._fetch(t,1,(function(e){var n=o._normalizerCountResponse(e);return setCacheData(JwsRequestType.COUNT,n),n})),setCachePromise(JwsRequestType.COUNT,i),[2,i])}))}))},e.prototype._fetch=function(e,n,t){var i,o;return __awaiter(this,void 0,void 0,(function(){var s,r,a,c,l,d,u,p,f,m,h,g,v,y,b,_;return __generator(this,(function(w){switch(w.label){case 0:if(s=e.data,r=void 0===s?{}:s,a=e.params,c=void 0===a?{}:a,l=”EC-4008″,d=”EC-4003″,u=this._getYmreqid(),!this.appid)throw new Error(“No appId, user is logged out”);p=__assign({appId:this.appid},c),this.wssid&&(p.wssid=this.wssid),e.params=p,f=[],Object.keys(p).forEach((function(e){var n=p[e];n&&f.push(“”.concat(encodeURIComponent(e),”=”).concat(encodeURIComponent(n)))})),m=f.length?”?”.concat(f.join(“&”)):””,h=”https://apis.mail.yahoo.com/ws/v3/batch”.concat(m),w.label=1;case 1:return w.trys.push([1,4,,5]),[4,ybarFetch(h,{method:”POST”,body:JSON.stringify(r),credentials:”include”,headers:{“Content-Type”:”application/json”,”X-Oath-YmReqId”:u}})];case 2:return[4,(g=w.sent()).json()];case 3:if(v=w.sent(),g.ok)return[2,t(null===(o=v.result)||void 0===o?void 0:o.responses)];if((y=null===(i=null==v?void 0:v.error)||void 0===i?void 0:i.code)===d)return[2,this._handleWssidApiError(v,e,n,t)];throw y===l?new Error(“Session has expired”):new Error(“Mail Api Responded with an Error”);case 4:throw b=w.sent(),logError(“JWS: “.concat((_=b).message),_),b;case 5:return[2]}}))}))},e.prototype._normalizePreviewResponse=function(e,n){var t,i,o,s=this,r=(void 0===n?{}:n).maxMessages,a=void 0===r?4:r;return e?((null===(o=null===(i=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.response)||void 0===i?void 0:i.result)||void 0===o?void 0:o.messages)||[]).map((function(e){return s._parseRawMessage(e)})).filter((function(e,n){return!!(e&&n0)return t-=1,this.wssid=r,this._fetch(n,t,i);throw new Error(“Max retries with invalid WSSID reached”)}throw new Error(“valid WSSID missing from API Response”)},e.prototype._parseRawMessage=function(e){var n,t,i,o,s,r,a=e.id,c=e.snippet,l=e.headers,d=e.flags;return(null==l?void 0:l.date)&&(null===(n=null==l?void 0:l.from)||void 0===n?void 0:n[0])?{from:(null===(i=null===(t=l.from)||void 0===t?void 0:t[0])||void 0===i?void 0:i.name)||””,email:(null===(s=null===(o=l.from)||void 0===o?void 0:o[0])||void 0===s?void 0:s.email)||””,subject:null==l?void 0:l.subject,read:null!==(r=null==d?void 0:d.read)&&void 0!==r&&r,mid:a,date:parseInt(l.date,10)||void 0,snippet:c||””}:null},e.prototype._getYmreqid=function(){var e=(new Date).getTime();return”xxxxxxxx-xxxx-xxxx-09xx-xxxxxxxxxx00″.replace(new RegExp(“x”,”g”),(function(){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),n.toString(16)}))},e}(),loadAssets=function(e,n,t){for(var i,o,s=[],r=[],a=0;a0&&function(e){var n=document.createElement(“script”);n.src=e,n.type=”text/javascript”,n.async=!0,document.getElementsByTagName(“head”)[0].appendChild(n)}(c))}),10)}},getNextGenMailPreview=function(e){postreq({url:”/fp_ngymtls_ms/_rcv/remote”,body:{m_id:”react-wafer-mailpreview”,m_mode:”json”,ctrl:”MailPreview”}},(function(n,t){n||e(t)}))},loaded=!1,init$1=function(e,n){var t=n.mailModule,i=n.mailLink,o=n.mailSigninLink,s=n.ybarMailMessages;if(t){var r=new Jws;if(e.addElementListener(t,”mouseenter”,(function(){e.triggerEvent(“close-all-menus”),triggerRapidBeacon()})),e.addEventListener(“close-all-menus”,(function(){isHovered(t)||hideMailPopover(n)})),e.onDestroy((function(){hideMailPopover(n)})),loaded=!1,loadUnreadCount(e,n,r),s)e.addElementListener(i,”mouseover”,(function(){loadMessages(e,n,r),fireYahooImpBeacon(e,n)})),e.addElementListener(i,”focus”,(function(){loadMessages(e,n,r),triggerRapidBeacon(),fireYahooImpBeacon(e,n)}));else{var a=i.getAttribute(“data-redirect-params”);if(a&&””!==a){var c=i.href;e.onDestroy((function(){i.href=c})),a=-1!==i.href.indexOf(“&activity=ybar-“)?””:a.replace(/[[pspid]]/,getSpaceId()),i.href=appendQorA(i.href)+a,(null==o?void 0:o.href)&&(o.href=appendQorA(o.href)+a)}}}},mailBeaconTimeout=!1,triggerRapidBeacon=function(){mailBeaconTimeout||(mailBeaconTimeout=!0,sendRapid({slk:”Mail”,elm:”expand”,sec:”ybar”,subsec:”mailprev”,itc:”2″}),setTimeout((function(){mailBeaconTimeout=!1}),1e3))},sendRapid=function(e){beaconClick(“ybar”,(null==e?void 0:e.slk)||”Mail”,””,e,null)},relativeDate=function(e){if(!e)return””;var n=Math.round((new Date).getTime()/1e3)-e;return n86400?Math.floor(n/86400)+”d”:””},createMailItemElement=function(e,n,t,i){var o,s=getTemplateContent(n.ybarMailItemTemplate),r=null===(o=s.children)||void 0===o?void 0:o[0];if(!r&&s.childNodes)for(var a=0;a0){if(i.style.visibility=”visible”,o){var t=n>999,r=s?”99+”:”999+”;o.textContent=t?r:n+””}e.onDestroy((function(){i.style.visibility=”hidden”,o&&(o.textContent=””)}))}})).catch((function(){}))},loadMessages=function(e,n,t){loaded||(loaded=!0,n.isNextGenYahoo?loadNGYMailPreview(e,n):loadMailPreview(e,n,t))},loadMailPreview=function(e,n,t){t.fetchPreview().then((function(t){var i;if(t&&0!==t.length){var o=document.createElement(“ul”);o.className=Css$1[“ybar-mail-list”];for(var s=0;s a”),i=document.querySelector(“#ybar-navigation-item-mail > a > span”);null!==n&&null!==t&&(new Jws).fetchCount().then((function(n){i&&n>0&&(i.textContent=”(“+(n>999?”999+”:n)+”)”,e.onDestroy((function(){i.textContent=””})))})).catch((function(){}))},nodeContains=function(e,n){var t=!1;if(!e||!n)return t;if(“function”==typeof e.contains)t=e.contains(n);else for(var i=n;i;){if(i===e){t=!0;break}i=i.parentElement}return t},MORE_MENU_WIDTH=61,MORE_MENU_LONG_LIST_COUNT=10,moreMenuIndex=-1,marginLeftOffset,initDropdowns=function(e,n){var t;__spreadArray([],null===(t=n.ybarNav)||void 0===t?void 0:t.querySelectorAll(“.”.concat(n.dropdownOpenClass)),!0).forEach((function(e){return e.classList.remove(n.dropdownOpenClass)}));var i=n.isTablet?”touchstart”:”mouseover”,o=delegate_1(“.”.concat(n.dropdownWrapperClass,”, .”).concat(n.navigationDropdownListClass),i,(function(t){if(window||document){var i=window.innerWidth||document.documentElement.clientWidth,o=t.delegateTarget;if(o&&-1!=o.className.indexOf(n.dropdownWrapperClass)&&(o=o.querySelector(“.”.concat(n.navigationDropdownListClass))),o){o.style.removeProperty(“left”),n.shiftMoreMenuEnabled&&o.style.removeProperty(“margin-left”),n.shiftMoreMenuEnabled&&marginLeftOffset&&(o.style.marginLeft=marginLeftOffset+”px”);var s=o.getBoundingClientRect().right;s>i&&(n.shiftMoreMenuEnabled?(marginLeftOffset||(marginLeftOffset=parseInt(window.getComputedStyle(o).marginLeft,10)),o.style.marginLeft=marginLeftOffset+i-s+”px”):o.style.left=i-s+”px”)}}else{var r=new Error(“Dropdown could not be initialized”);e.logError(“Error:”,r)}}));e.onDestroy((function(){o.destroy()}))},updateMoreMenu=function(e,n,t){var i,o,s,r=-1,a=0;if(e.ybarNav){var c=window.getComputedStyle(e.ybarNav),l=parseInt(c.width,10)-parseInt(c.paddingLeft,10)-parseInt(c.paddingRight,10),d=MORE_MENU_WIDTH,u=e.navigationPlacement();if(u)d+=u.getBoundingClientRect().width;for(var p=0;pm&&(p!==e.navItems.length-1||a+f>m||e.moreMenuDropdown&&e.moreMenuDropdown.hasChildNodes()&&moreMenuIndexmoreMenuIndex&&-1!==moreMenuIndex)for(var g=moreMenuIndex;g=r;){var y=e.navItems[v].cloneNode(!0),b=y.querySelector(“a”);b&&(b.setAttribute(“id”,””),b.classList.remove(Css.focused));var _=y.querySelector(“.”.concat(e.navigationDropdownListClass));if(_&&(_.style.display=”none”),y.classList.remove(e.dropdownWrapperClass),y.classList.remove(e.ybarNavigationItemClass),y.classList.add(e.navigationDropdownItemClass),e.moreMenuDropdown){e.moreMenuDropdown.insertBefore(y,e.moreMenuDropdown.firstChild);var w=y.getElementsByTagName(“a”)[0];t.unshiftMoreMenuItem(w)}null===(s=e.navItems[v].querySelector(“a”))||void 0===s||s.setAttribute(“tabindex”,”-1″),v–}moreMenuIndex=r}if(-1!==r&&e.navList){var C=parseInt(a.toString(),10)+”px”;e.navList.style.maxWidth=C,n.textContent=”.”.concat(Css[“ybar-nav-list-desktop”],”{ max-width: “).concat(C,”}”)}e.moreMenuNavItem&&e.moreMenuDropdown&&e.moreMenuDropdown.hasChildNodes()?(e.moreMenuNavItem.classList.add(e.dropdownWrapperClass),e.moreMenuNavItem.style.visibility=”visible”):null!==e.moreMenuNavItem&&(e.moreMenuNavItem.classList.remove(e.dropdownWrapperClass),e.moreMenuNavItem.style.visibility=”hidden”),e.moreMenuDropdown&&e.moreMenuDropdown.childElementCount>MORE_MENU_LONG_LIST_COUNT?e.moreMenuDropdown.classList.add(e.longListClass):null!==e.moreMenuDropdown&&e.moreMenuDropdown.classList.remove(e.longListClass)}},handleDropdownFocus=function(e,n){var t=delegate_1(“.”.concat(n.dropdownWrapperClass),”focusin”,(function(e){var t=e.delegateTarget;t&&t.classList.contains(n.dropdownWrapperClass)&&t.classList.add(n.dropdownOpenClass)})),i=delegate_1(“.”.concat(n.dropdownWrapperClass,”, .”).concat(n.navigationDropdownListClass),”focusout”,(function(e){var t=e.delegateTarget;if(null==t?void 0:t.classList.contains(n.navigationDropdownListClass)){var i=t.parentElement;i&&!i.contains(e.relatedTarget)&&i.classList.contains(n.dropdownWrapperClass)&&i.classList.remove(n.dropdownOpenClass)}else(null==t?void 0:t.classList.contains(n.dropdownOpenClass))&&t.classList.remove(n.dropdownOpenClass)}));e.onDestroy((function(){var e;t.destroy(),i.destroy(),__spreadArray([],null===(e=n.ybarNav)||void 0===e?void 0:e.querySelectorAll(“.”.concat(n.dropdownOpenClass)),!0).forEach((function(e){e.classList.remove(n.dropdownOpenClass);var t=document.activeElement;nodeContains(n.ybarNav,t)&&setTimeout((function(){null==t||t.blur()}),1)}))}))},setNavigationFocus=function(e,n,t,i){for(var o=n||window.location.pathname,s=t||window.location.hostname,r=(i||{}).setParentFocus,a=void 0!==r&&r,c=__spreadArray([],e.topLevelNavLinks,!0),l=null,d=null,u=0;u0),s=new A11yNavigation(e,{containerElm:n.ybarNav,navlistItemSelector:”.”.concat(Css[“ybar-parent-navigation”],” > li”),dropdownClass:n.dropdownWrapperClass,enableMoreMenu:o,moreMenuNavElm:n.moreMenuMainFocusItem,isUserAccountNavigation:!1});initDropdowns(e,n),showMailUnreadCount(e),e.addElementListener(document,”DOMContentLoaded”,(function(){showMailUnreadCount(e)})),handleDropdownFocus(e,n);var r=e.getConfig().bucketConfig,a=(void 0===r?{}:r).enableDynamicNavfocus;if(void 0!==a&&a&&setNavigationFocus(n),e.addEventListener(“nav:setFocus”,(function(e){var t=e.detail,i=void 0===t?{}:t,o=i.hostname,s=void 0===o?window.location.hostname:o,r=i.pathname,a=void 0===r?window.location.pathname:r,c=i.options;setNavigationFocus(n,a,s,void 0===c?{}:c)})),o){var c=document.createElement(“style”);c.title=”ybar_nav_interim”,document.head.appendChild(c);var l=delegate_1(“#ybar-nav-more-menu ul a”,”click”,(function(n){e.triggerEvent(“navigation”,{event:n})}));e.addEventListener(“nav:resize”,(function(){updateMoreMenu(n,c,s)})),updateMoreMenu(n,c,s),e.addElementListener(window,”load”,(function(){updateMoreMenu(n,c,s)})),e.addElementListener(window,”resize”,(function(){updateMoreMenu(n,c,s)})),e.onDestroy((function(){var e=c.parentNode;null==e||e.removeChild(c),l.destroy()}))}},SELECTOR_MORE_MENU=”#ybar-nav-more-menu”;initModule(“ybar-mod-navigation”,(function(e){var n,t={dropdownWrapperClass:Css[“dropdown-wrapper”],isFuji2:null!==document.querySelector(“.ybar-ytheme-fuji2”),isTablet:null!==document.querySelector(“.tablet”),longListClass:Css[“long-list”],moreMenuDropdown:document.querySelector(“”.concat(SELECTOR_MORE_MENU,” ul”)),moreMenuNavItem:document.querySelector(SELECTOR_MORE_MENU),moreMenuNavLinksSelector:””.concat(SELECTOR_MORE_MENU,” ul a”),moreMenuMainFocusItem:document.querySelector(“”.concat(SELECTOR_MORE_MENU,’ > span[tabindex=”0″]’)),navigationDropdownItemClass:Css[“navigation-dropdown-item”],navigationDropdownListClass:Css[“navigation-dropdown-list”],navItems:document.querySelectorAll(“li.”.concat(Css[“ybar-navigation-item”])),topLevelNavLinks:document.querySelectorAll(“li.”.concat(Css[“ybar-navigation-item”],” > a”)),navLinks:document.querySelectorAll(“.ybar-mod-navigation a”),navList:document.querySelector(“.ybar-mod-navigation ul”),shiftMoreMenuEnabled:document.querySelector(“.ybar-shift-more-menu”),ybarNav:document.getElementById(“ybar-navigation”),ybarNavigationItemClass:Css[“ybar-navigation-item”],dropdownOpenClass:Css[“dropdown-open”],navigationPlacement:function(){return n||(n=document.getElementById(“ybar-nav-placement”)),n}};init(e,t)}))})()}};
    Source

    作者: HK in UK