',this._panelNode=document.getElementById(je))}},{key:"updateBadgeNode",value:function(e){if(e){var t=this._store.getNotifications().newCount,n=this._config.badge.maxCount;if(t){var a=t>n?n+"+":t;e.innerHTML=a}else e.innerHTML=""}}},{key:"addStyles",value:function(e){if(e&&"undefined"!=typeof window){var t=document.getElementById(this._config.panel.styleTagId);t||((t=document.createElement("style")).type="text/css",t.id=this._config.panel.styleTagId,t.innerText=e,document.head.appendChild(t))}}}]),e}(),Ue=function(){function e(t,n,a){Se(this,e);var r=this;r._store=n,r._view=a,r._config=t;var o=r._config.panel;r._panelParentNode=document.querySelector(o.parentSelector),r._badgeNode=r._config.badge.selector&&document.querySelector(r._config.badge.selector),r._indicatorNode=o.indicatorSelector&&document.querySelector(o.indicatorSelector)}return Ie(e,[{key:"createPanelParentNode",value:function(){this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(je)}},{key:"refreshPanelNode",value:function(e,t){var n=this;Oe(n._notifPanelNode,Be),n._store.fetchNotifications(e,(function(e,a){e?n._notifPanelNode.innerHTML||(n._view.render("error_panel"),Oe(n._notifPanelNode,Be)):(n._view.render("expanded_panel"),n._view.updateBadgeNode(n._badgeNode),n._showBadge(),n._showIndicator(),n._view.addStyles(a.css)),qe(n._notifPanelNode,Be),t&&t(e,a)}))}},{key:"resetBadge",value:function(){var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),Oe(e._badgeNode,e._config.badge.hideClass)}},{key:"_showIndicator",value:function(){this._indicatorNode&&(this._store.getNotifications().newCount?Oe(this._indicatorNode,this._config.panel.indicatorClass):qe(this._indicatorNode,this._config.panel.indicatorClass))}},{key:"_showBadge",value:function(){var e=this;e._store.getNotifications().newCount?qe(e._badgeNode,e._config.badge.hideClass):Oe(e._badgeNode,e._config.badge.hideClass)}}]),e}(),Ye={promos:{eligibleBodyClass:"display-push-promos",enableNotifOnboard:!0,notifOnboardBtnLabel:"Notify Me",notifOnboardMsg:"Get alerts for breaking news and top stories",showYahooLogo:!0,subscriptionTopic:"gondor_homerun_news"},badge:{hideClass:"",maxCount:5,selector:""},panel:{emptyPanelMsg:"You have no new notifications.",errorMsg:"",headerMsg:"Notifications",imageTag:"img:40x40|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}},ze={NotificationClient:function(){function e(t){Se(this,e);var n=this;n.config=n._parseConfig(t),n._validateRequiredConfigs()&&(n._request=new Le(n.config),n._store=new Pe(n.config,n._request),n._view=new He(n.config,n._store),n._panelController=new Ue(n.config,n._store,n._view),n._panelController.createPanelParentNode(),n._assignHelperMethods())}return Ie(e,[{key:"_parseConfig",value:function(e){var t={};for(var n in Me(t,Ye),t)if(t.hasOwnProperty(n)){var a=t[n],r=e[n];"object"===(void 0===a?"undefined":Te(a))?Me(a,r):t[n]=e[n]}return t}},{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(){qe(e._panelController._indicatorNode,e.config.panel.indicatorClass)}}}}]),e}()},Fe="lnct",De=function(){return window.localStorage&&window.localStorage.getItem(Fe)},Qe=function(){var e=""+Math.floor((new Date).getTime()/1e3);return window.localStorage&&window.localStorage.setItem(Fe,e),e},We=p.logError,Ge=ze.NotificationClient,Je=Qe,Xe=De,$e=document.getElementById("notif-badge"),Ke=document.getElementById("notifBell"),Ze={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}},et=!1,tt=document.getElementById("notification-container"),nt=tt&&tt.dataset&&tt.dataset.config;if(nt){try{nt=JSON.parse(nt),Object.keys(Ze).forEach((function(e){if(e in nt)for(var t in nt[e])Ze[e][t]=nt[e][t]})),et=1===nt.personalize}catch(e){console.error("Config is not parsed correctly",e)}delete tt.dataset.config}var at=new Ge(Ze),rt={refreshPanel:function(e,t){if(e){var n,a=document.getElementById("ybar"),r=a&&a.className&&a.className.match(/ybar-variant-([a-z]*)/);r&&r.length&&(n=r[1]);var o={lastUpdate:Xe()||Je(),loadInHpViewer:!0,includePersonalized:et},i=window.YAHOO&&window.YAHOO.context||window.Af&&window.Af.context||{};i.region&&i.lang&&(o.lang=i.lang,o.region=i.region),n&&(o.partner=n),at.helpers.refreshPanelNode({matrixParams:o},(function(e,n){e?We("Error:",e):(n&&n.newCount>0&&$e&&($e.style.visibility="visible",Ke&&Ke.play()),t&&"function"==typeof t&&t(n))}))}},resetBadge:at.helpers.resetBadge},ot=a(ne).selectorStr,it=document.querySelector.bind(document),st=Qe,ct=f.beaconClick,lt=document.getElementById("ybarAccountContainer"),ut=document.getElementById("smartphoneNotifContainer"),dt=document.getElementById("smartphoneNotifMenu"),pt=document.getElementById("notif-badge"),ft=it(ot("prof-notif-badge")),yt=document.getElementById("notifDropdownContainer"),mt=document.getElementById("ybarNotificationBody"),ht=document.getElementById("backButton"),gt=function(e){ct("ybar",e&&e.slk||"Ybar","",e,null,(function(){}))},bt=function(){rt.refreshPanel(ut,(function(e){e&&e.newCount>0&&pt&&ft&&(pt.style.visibility="visible",ft.style.visibility="visible",ft.innerText=pt.innerText)}))},vt=function(){bt(),setInterval((function(){bt()}),3e5),ut&&(dt.addEventListener("click",(function(){yt.style.display="block",lt.style.width="100%",rt.resetBadge(),st(),pt.style.visibility="hidden",ft.style.visibility="hidden",gt({slk:"notification",elm:"btn",elmt:"visible"===pt.style.visibility?"new alert":"",sec:"ybar",subsec:"notification",pkgt:"profile-pane",itc:"1"})})),ht.addEventListener("click",(function(){yt.style.display="none",lt.style.width=null,gt({slk:"back-notification",elm:"arrow",pkgt:"profile-pane",sec:"ybar",subsec:"notification",itc:"1"})})),mt&&mt.addEventListener("click",(function(e){(function(e){if("function"==typeof e.composedPath)return e.composedPath();if(e.path)return e.path;for(var t=e.target,n=[];null!==t.parentNode;)n.push(t),t=t.parentNode;return n.push(document,window),n})(e).find((function(e){if(e.nodeName&&"a"===e.nodeName.toLowerCase()&&e.classList.contains("yns-link"))return yt.style.display="none",lt.style.width=null,lt.dispatchEvent(new CustomEvent("toggle-overlay")),!0}))})))},_t={overlay:"_yb_t6pqe",noscroll:"_yb_au2i5",animation:"_yb_1lsz5","left-open":"_yb_1nb79","right-open":"_yb_13fwl"},wt=f.refreshModule,Et=function(e,t){e=e||document.body;var n=document.createElement("div");n.classList.add(_t.overlay),n.setAttribute("data-hidden",!0),e.parentNode.parentNode.appendChild(n),e.classList.add(_t.animation);var a=document.documentElement,r=!0,o=0,i=function(){r=!r,n.setAttribute("data-hidden",r),a&&a.classList.toggle("ybar-overlay"),document.body.classList.toggle(_t.noscroll,!r),e.classList.toggle(_t[t+"-open"],!r),r&&(n.scrollTop=0),0===o&&(o=1,setTimeout((function(){wt()}),300))};e.addEventListener("toggle-overlay",(function(){i()})),n.addEventListener("mousedown",(function(){i()}))},Ct=f.beaconClick,xt=f.refreshModule,kt=Et,Tt=p.logError,St=a(ne).selectorStr,It=document.querySelector.bind(document),Lt=!0,Nt=document.getElementById("ybarAccountContainer"),Ot=document.getElementById("ybarAccountMenu"),At=It(St("mobile","ybar-account-user-email")),qt=It(St("smartphone")),Mt=document.getElementById("ybarMenuManagePub"),Pt=document.getElementById("smartphone-arrow"),Bt=document.getElementById("down-arrow"),jt=document.getElementById("up-arrow"),Rt=document.getElementById("otherAccWrapper"),Vt=!1,Ht=0,Ut={ybarAccountImage:{selector:"ybar-account-img",size:"64"},ybarCurrentUserProfileImage:{selector:"ybar-current-user-profile-img",size:"128"},ybarUserProfileImage:{selector:"ybar-user-profile-img",size:"128"}},Yt=function(e){if(Nt)Nt.style.removeProperty("display"),"false"===Nt.getAttribute("data-enabled")&&(Nt.style.display="none");else{var t=new Error("ybarAccountContainer not Found");Tt("ERROR:",t)}Nt&&Lt&&(Lt=!1,ke(e))},zt=function(){0===Ht&&(Ht=1,Ot.parentNode.removeEventListener("mouseenter",zt),Ot.parentNode.removeEventListener("focusin",zt),setTimeout((function(){xt()}),500))},Ft=function(){Nt.classList.remove("ybarMenuOpen")};if(Ot||At){if(At)Yt(!0);else{Yt(),p.addEventListener("close-all-menus",(function(){h(Ot)||(Ot.checked=!1)})),Ot.onchange=function(){p.triggerEvent("close-all-menus")};if(qt){var Dt=document.querySelector("#ybarAccountMenuOpener");Dt&&Dt.setAttribute("data-ylk","slk:Settings;elm:btn;sec:ybar;subsec:settings;pkgt:profile-pane;itc:0;tar:login.yahoo.com"),function(){kt(Nt,"right");var e=It(St("ybar-icon-image-wrapper"));e&&e.addEventListener("click",(function(){Nt.dispatchEvent(new CustomEvent("toggle-overlay"))}))}(),Pt&&Pt.addEventListener("click",(function(){if(Vt?(Bt.classList.remove("hide"),jt.classList.add("hide"),Rt.style.height=0):(Bt.classList.add("hide"),jt.classList.remove("hide"),a=(n=Rt).scrollHeight,n.style.height=a+"px"),Vt=!Vt,"function"==typeof Ct){var e="manage-account-open",t={elm:"expand",subsec:"settings",pkgt:"profile-pane",itc:"1"};Vt||(e="manage-account-close",t.elm="btn"),Ct("ybar",e,"",t)}var n,a})),vt()}else g(Ot.parentNode,"yb_accounts","_",{itc:"2",elm:"menu",elmt:"user-info"}),Ot.parentNode.addEventListener("mouseenter",zt),Ot.parentNode.addEventListener("focusin",zt);b("#ybarAccountMenu","#ybarAccountMenu + label"),Nt.addEventListener("focusin",(function(){Nt.classList.add("ybarMenuOpen")})),Nt.addEventListener("focusout",Ft),Mt&&Mt.addEventListener("click",Ft)}Object.keys(Ut).forEach((function(e){var t=Ut[e],n=It(St(t.selector));n&&(n.onerror=function(){var e,a,r;e=t.size,r="https://s.yimg.com/wm/modern/images/default_user_profile_pic_"+e+".png",(a=n).onerror=null,a.srcset="",a.src=r})}))}var Qt={"ybar-mod-mail":"_yb_1e06q","ybar-mail-preview":"_yb_1sts8 _yb_fnutb","ybar-mail-link":"_yb_lxwlj","property-homepage":"_yb_szkce",smartphone:"_yb_1gkb5","ybar-mail-icon":"_yb_1onhx","ybar-unread":"_yb_1s0aq","property-member-center":"_yb_1af8y","property-help":"_yb_125zl",mobile:"_yb_15buk",count:"_yb_11nvj","ybar-mail-icon-text":"_yb_1vk33","ybar-text-wrap":"_yb_1rrp6","ybar-text-bold":"_yb_1say4","ybar-mail-signin":"_yb_1qep0","ybar-mail-loading":"_yb_1ltnl","ybar-mail-signin-link":"_yb_soxbz","popover-body":"_yb_15vl3 _yb_1jgia","ybar-mail-list":"_yb_1jr5m","ybar-mail-item":"_yb_v6kf1","ybar-mail-item-link":"_yb_1c2ou","ybar-mail-item-name":"_yb_129pj","ybar-mail-item-desc":"_yb_ltv12","ybar-mail-item-image":"_yb_14l6c","ybar-mail-item-unread":"_yb_y2i9r","ybar-mail-bottom-wrapper":"_yb_ww6mk","ybar-mail-compose-link":"_yb_1xybr","ybar-icon-compose":"_yb_z7p40","ybar-compose-link-text":"_yb_uoomo","mail-animation":"_yb_shad4","ybar-mail-item-snippet":"_yb_6diej","ybar-mail-item-time":"_yb_1vxuf","ybar-mail-viewall":"_yb_9bxoi"},Wt=function(e,t,n,a){var r=new XMLHttpRequest,o=n?JSON.stringify(n):null;r.open("POST",e,!0),r.setRequestHeader("Content-type","application/json"),r.setRequestHeader("X-Oath-YmReqId",t),r.withCredentials=!0,r.onreadystatechange=function(){4===r.readyState&&function(e,t,n,a){if(200!==e){var r=new Error("Post request failed with status: "+e);r._meta={status:e,ymreqid:a},n(r)}else{var o=null;try{o=JSON.parse(t)}catch(e){var i=new Error("Error parsing responseText");return i._meta={originalError:e},void n(i)}n(null,o)}}(r.status,r.responseText,a,t)},r.send(o)},Gt=function(){var e=(new Date).getTime(),t=null;return"xxxxxxxx-xxxx-xxxx-09xx-xxxxxxxxxx00".replace(/x/g,(function(n){return t=(e+16*Math.random())%16|0,e=Math.floor(e/16),t.toString(16)}))},Jt=p.logError,Xt=document.querySelector('input[name="mail_wssid"]'),$t=document.querySelector('input[name="mail_appid"]'),Kt=function(e,t){var n=t.pop();return t.reduce((function(e,t){return e[t]||{}}),e||{})[n]},Zt=[],en=null,tn=!1,nn=function(e){Wt("https://apis.mail.yahoo.com/ws/v3/batch?appId="+$t.value+"&wssid="+Xt.value,Gt(),{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"}]}]},(function(t,n){if(t)return console.error(t),t._meta=t._meta||{},n&&n.error&&(t._meta.jedi=n.error),t._meta&&0!==t._meta.status&&Jt("Error loading mail messages",t,t._meta),e(t,null);var a=null;if(!n.error&&n.result&&n.result.responses&&n.result.responses.length&&(a=Kt(n.result.responses[0],["response","result","messages"])),!a){var r=new Error("Missing data for reverse cron");return console.error(r),e(r,null)}var o=a.map((function(e){return{from:e.headers.from.length?e.headers.from[0].name:"",email:e.headers.from.length?e.headers.from[0].email:"",subject:e.headers.subject,read:!!e.flags&&e.flags.read,mid:e.id,date:e.headers.date,snippet:e.snippet}}));e(null,o)}))},an=function(e,t){if(t&&null!==en)return e(null,en);if(!$t||!$t.value)return e(new Error("No appId, user is logged out"));if(!Xt||!Xt.value){var n=new Error("Missing wssid for getUnseen");return Jt("Wssid error",n),console.error(n),e(n)}Zt.push(e),tn||(tn=!0,Wt("https://apis.mail.yahoo.com/ws/v3/batch?appId="+$t.value+"&wssid="+Xt.value,Gt(),{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"}]}]},(function(e,t){if(e)return console.error(e),e._meta=e._meta||{},t&&t.error&&(e._meta.jedi=t.error),Jt("Error with mail count request",e,e._meta),Zt.forEach((function(t){t(e,null)})),void(tn=!1);var n=null;if(!t.error&&t.result&&t.result.responses&&t.result.responses.length)for(var a=Kt(t.result.responses[0],["response","result","decos"]),r=0;r0&&function(e){var t=document.createElement("script");t.src=e,t.type="text/javascript",t.async=!0,document.getElementsByTagName("head")[0].appendChild(t)}(r))}),10)}},ln=f.beaconClick,un=h,dn=a(Qt).selectorStr,pn=se.appendQorA,fn=se.getObjectValue,yn=ce.trustHTML,mn=ce.getTemplateContent,hn=p.logError,gn=!1,bn=!1,vn=function(){bn||(bn=!0,_n({slk:"Mail",elm:"expand",sec:"ybar",subsec:"mailprev",itc:"2"}),setTimeout((function(){bn=!1}),1e3))},_n=function(e){ln("ybar",e&&e.slk||"Mail","",e,null,(function(){}))},wn=function(e,t){var n,a,r=(n=e.date,(a=Math.round((new Date).getTime()/1e3)-n)<60?parseInt(a)+"s":a<3600?parseInt(a/60)+"m":a<=86400?parseInt(a/3600)+"h":a>86400?parseInt(a/86400)+"d":""),o=mn(document.getElementById("ybarMailItemTemplate")),i=o.children&&o.children[0];if(!i&&o.childNodes)for(var s=0;s999&&t?"99+":n>999?"999+":n)}}})),null!==document.getElementById("ybarMailMessages"))n.addEventListener("mouseover",(function(){xn()})),n.addEventListener("focus",(function(){xn(),vn()}));else{var i=n.getAttribute("data-redirect-params");i&&""!==i&&(i=-1!==n.href.indexOf("&activity=ybar-")?"":i.replace(/\[\[pspid\]\]/,o),n.href=pn(n.href)+i,a&&a.href&&(a.href=pn(a.href)+i))}},Sn=(0,_.measure)("ybar-mail-init");Tn(),Sn.stop();var In=p.logError,Ln=an,Nn=function(){var e=document.querySelector("#ybar-navigation-item-mail"),t=document.querySelector("#ybar-navigation-item-mail > a"),n=document.querySelector("#ybar-navigation-item-mail > a > span");if(null!==e&&null!==t)console.log("[ybar mailcount] nav calling unseen"),Ln((function(e,t){e||t<=0||(n.textContent="("+(t>999?"999+":t)+")")}),!0);else{var a=new Error("mail navigation item not found");In("Error:",a)}},On={"ybar-mod-navigation":"_yb_iyqlb","navigation-dropdown-list":"_yb_8apij","ybar-navigation-item":"_yb_17kt9","locale-zh-hant-tw":"_yb_1epuq","locale-zh-hant-hk":"_yb_gjxws","dropdown-wrapper":"_yb_lzsv9","normal-text":"_yb_t97no","locale-zh-hans-cn":"_yb_yn4dr","ybar-navigation-text-fuji2":"_yb_t4mo6","locale-es-us":"_yb_1b28y","variant-att":"_yb_1vln1","locale-en-us":"_yb_164yr","bold-text":"_yb_dwy89",focused:"_yb_1256x",fill:"_yb_m08bv","ybar-article-page":"_yb_19n5b","ybar-mail-icon":"_yb_1xtj3","dropdown-link":"_yb_qj849","navigation-dropdown-list-left":"_yb_179p6","navigation-dropdown-list-right":"_yb_1hbmd","long-list":"_yb_nm09v","navigation-dropdown-item":"_yb_b2zpo","ybar-navigation-item-badge":"_yb_vwd2f",tablet:"_yb_ccdo7"};if("undefined"!=typeof Element&&!Element.prototype.matches){var An=Element.prototype;An.matches=An.matchesSelector||An.mozMatchesSelector||An.msMatchesSelector||An.oMatchesSelector||An.webkitMatchesSelector}var qn=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function Mn(e,t,n,a,r){var o=Pn.apply(this,arguments);return e.addEventListener(n,o,r),{destroy:function(){e.removeEventListener(n,o,r)}}}function Pn(e,t,n,a){return function(n){n.delegateTarget=qn(n.target,t),n.delegateTarget&&a.call(e,n)}}var Bn,jn=function(e,t,n,a,r){return"function"==typeof e.addEventListener?Mn.apply(null,arguments):"function"==typeof n?Mn.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return Mn(e,t,n,a,r)})))},Rn=Nn,Vn=a(On).selectorStr,Hn=p.logError,Un=_.measure,Yn=-1,zn=document.querySelector("#ybar-navigation"),Fn=document.querySelector(Vn("ybar-mod-navigation")+" ul"),Dn=document.querySelectorAll("li."+On["ybar-navigation-item"]),Qn=document.querySelector("#ybar-nav-more-menu ul"),Wn=document.querySelector("#ybar-nav-more-menu"),Gn=document.querySelector(".ybar-shift-more-menu"),Jn=document.querySelector(Vn("tablet")),Xn=null!==document.querySelector(".ybar-ytheme-fuji2"),$n=function(){for(var e=-1,t=0,n=window.getComputedStyle(zn),a=parseInt(n.width,10)-parseInt(n.paddingLeft,10)-parseInt(n.paddingRight,10),r=0;ra-84&&(r!==Dn.length-1||t+o>a||Qn.hasChildNodes()&&Yn<0)){e=r;break}t+=o}if(-1===e&&-1!==Yn&&t<=a){for(var i=Yn;iYn&&-1!==Yn)for(var s=Yn;s=e;){var l=Dn[c].cloneNode(!0),u=l.querySelector(Vn("navigation-dropdown-list"));u&&(u.style.display="none"),l.classList.remove(On["dropdown-wrapper"]),l.classList.remove(On["ybar-navigation-item"]),l.classList.add(On["navigation-dropdown-item"]),Qn.insertBefore(l,Qn.firstChild),c--}Yn=e}-1!==e&&(Fn.style.maxWidth=parseInt(t,10)+"px"),Qn.hasChildNodes()?(Wn.classList.add(On["dropdown-wrapper"]),Wn.style.visibility="visible"):(Wn.classList.remove(On["dropdown-wrapper"]),Wn.style.visibility="hidden"),Qn.childElementCount>10?Qn.classList.add(On["long-list"]):Qn.classList.remove(On["long-list"])},Kn=Un("ybar-nav-init");!function(){for(var e,t=document.querySelectorAll(".ybar-mod-navigation a"),n=function(){!function(e){for(var t=0;tt&&(Gn?(Bn||(Bn=parseInt(window.getComputedStyle(n).marginLeft,10)),n.style.marginLeft=Bn+t-a+"px"):n.style.left=t-a+"px")}}else{var r=new Error("Dropdown could not be initialized");Hn("Error:",r)}})),Rn(),document.addEventListener("DOMContentLoaded",(function(){Rn()})),Gn&&Xn&&Fn&&Dn&&Dn.length>0&&($n(),window.addEventListener("load",$n),window.addEventListener("resize",$n))}(),Kn.stop();var Zn,ea=function(e,t,n){var a=new XMLHttpRequest,r=t?JSON.stringify(t):null;a.open("POST",e,!0),a.setRequestHeader("Content-type","application/json"),a.withCredentials=!0,a.onreadystatechange=function(){4===a.readyState&&function(e,t,n){if(200===e){var a=null;try{a=JSON.parse(t)}catch(e){return void n(new Error("Error parsing responseText"))}n(null,a)}else n(new Error("Something went wrong "+e))}(a.status,a.responseText,n)},a.send(r)},ta=se.getObjectValue,na=ce.trustHTML,aa=f.refreshModule,ra=document.getElementById("ybarConcierge");ra&&(Zn=window.location.hostname.match(/mail.yahoo.com/)?"https://www.yahoo.com":"",ea(Zn+"/rcv_fp/remote",{m_id:"react-wafer-shortcut",m_mode:"json",ctrl:"Shortcut",config:{shouldReadPreference:!0,shouldUseExperience:!0,slimRedesign:!0,serviceUpdateUrl:Zn+"/tdv2_fp/api/resource/PreferencesService",xhrPathPrefix:Zn+"/rcv_fp/remote",waferFetchPrefix:Zn+"/rcv_fp/remote?m_mode=json&site=fp"}},(function(e,t){var n,a,r,o,i,s,c,l,u=document.getElementById("ybarShortcutContainer"),d=parseInt(ra.getAttribute("data-timer"),10)||5e3,p=[],f=0,y=function(){n?(clearInterval(n),n=null):n=setInterval(m,d),r.classList.toggle("ybar-vis-h"),o.classList.toggle("ybar-vis-h")},m=function(e){var t=ta(e,"target.dataset.action")||"next";t&&(i[f].classList.toggle("ybar-visually-hidden"),"next"===t&&g(),"prev"===t&&h())},h=function(){0===f&&(f=s+1),i[--f].classList.toggle("ybar-visually-hidden")},g=function(){f===s&&(f=-1),i[++f].classList.toggle("ybar-visually-hidden")};if(u){for(document.getElementById("atomic")||document.documentElement.getAttribute("id")||(document.documentElement.id="atomic"),r=ra.firstElementChild,o=ra.lastElementChild,u.innerHTML=na(t.html),a=0;a-1&&(c="https://s.yimg.com"+t.assets.css[a].value,l=void 0,(l=document.createElement("link")).rel="stylesheet",l.href=c,document.getElementsByTagName("head")[0].appendChild(l));for(a=0;a0&&function(e){var t=document.createElement("script");t.src=e,t.type="text/javascript",t.async=!0,t.defer=!0,document.getElementsByTagName("head")[0].appendChild(t)}("https://s.yimg.com/zz/combo?"+p.join("&")),i=document.querySelectorAll("#shortcut-scroll-mananger > li"),s=i.length-1,r.addEventListener("click",m),o.addEventListener("click",m),ra.addEventListener("mouseenter",y),ra.addEventListener("mouseleave",y),ra.style.display="block",aa(),a=1;a<=s;++a)i[a].classList.toggle("ybar-visually-hidden");n=setInterval(m,d)}})))}()}};