':"";if(a){var r=n.promos.showYahooLogo?"":"yns-no-logo";a=a.replace("{notifOnboardBtnLabel}",n.promos.notifOnboardBtnLabel).replace("{notifOnboardMsg}",n.promos.notifOnboardMsg).replace("{subscriptionTopic}",n.promos.subscriptionTopic).replace("{noLogoClass}",r).replace("{promoLogo}",n.promos.promoLogo)}var s=t.newCount>n.panel.maxCount?t.newCount:"",c=n.panel.notificationCenterPath,l=c?"":P,u=n.panel.headerMsg?"":" "+P,d=c?R:"",p=void 0;t.count?p=t.markup:p='
  • {emptyPanelMsg}
  • '.replace("{emptyPanelMsg}",n.panel.emptyPanelMsg);return e=e.replace("{notifMarkup}",p).replace("{promoMarkup}",a).replace("{hideClass}",l).replace("{notifCenterLink}",c).replace("{paddingClass}",d).replace("{headerMsg}",n.panel.headerMsg).replace("{hideHeaderClass}",u).replace(/{notificationCenterNavMsg}/g,n.panel.notificationCenterNavMsg).replace(/{newCount}/g,s)}},{key:"render",value:function(e,t){var n=this;if(n._panelNode){var o=void 0,i=n._panelNode,a=void 0,r=void 0;switch(e){case"expanded_panel":o='
    {headerMsg}
    ',r=n._store.getNotifications(),a=n._generatePanelMarkup(o,r),i.innerHTML=a;break;case"error_panel":a=(o='
    {errorMsg}
    ').replace("{errorMsg}",n._config.panel.errorMsg),i.innerHTML=a}t&&t()}else t&&t(new Error("No panel parent"))}},{key:"createPanelParentNode",value:function(e){e&&(e.innerHTML='
    ',this._panelNode=document.getElementById(D))}},{key:"updateBadgeNode",value:function(e){if(e){var t=this._store.getNotifications().newCount,n=this._config.badge.maxCount;if(t){var o=t>n?n+"+":t;e.innerHTML=o}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}(),U=function(){function e(t,n,o){L(this,e);var i=this;i._store=n,i._view=o,i._config=t;var a=i._config.panel;i._panelParentNode=document.querySelector(a.parentSelector),i._badgeNode=i._config.badge.selector&&document.querySelector(i._config.badge.selector),i._indicatorNode=a.indicatorSelector&&document.querySelector(a.indicatorSelector)}return E(e,[{key:"createPanelParentNode",value:function(){this._view.createPanelParentNode(this._panelParentNode),this._notifPanelNode=document.getElementById(D)}},{key:"refreshPanelNode",value:function(e,t){var n=this;A(n._notifPanelNode,B),n._store.fetchNotifications(e,(function(e,o){var i=window.wafer&&window.wafer.base;i&&i.destroy(n._notifPanelNode),e?n._notifPanelNode.innerHTML||(n._view.render("error_panel"),A(n._notifPanelNode,B)):(n._view.render("expanded_panel"),n._view.updateBadgeNode(n._badgeNode),n._showBadge(),n._showIndicator(),n._view.addStyles(o.css)),M(n._notifPanelNode,B),i&&i.sync(n._notifPanelNode.parentNode),t&&t(e,o)}))}},{key:"resetBadge",value:function(){var e=this;e._store.resetNewCount(),e._view.updateBadgeNode(e._badgeNode),A(e._badgeNode,e._config.badge.hideClass)}},{key:"_showIndicator",value:function(){this._indicatorNode&&(this._store.getNotifications().newCount?A(this._indicatorNode,this._config.panel.indicatorClass):M(this._indicatorNode,this._config.panel.indicatorClass))}},{key:"_showBadge",value:function(){var e=this;e._store.getNotifications().newCount?M(e._badgeNode,e._config.badge.hideClass):A(e._badgeNode,e._config.badge.hideClass)}}]),e}(),j={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: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:1,attemptDelay:2,url:null,resetUrl:null,isRMP:!1,responseType:"json",timeout:1500}},Y={NotificationClient:function(){function e(t){L(this,e);var n=this;n.config=n._parseConfig(t),n._validateRequiredConfigs()&&(n._request=new C(n.config),n._store=new O(n.config,n._request),n._view=new H(n.config,n._store),n._panelController=new U(n.config,n._store,n._view),n._panelController.createPanelParentNode(),n._assignHelperMethods())}return E(e,[{key:"_parseConfig",value:function(e){var t={};for(var n in N(t,j),t)if(t.hasOwnProperty(n)){var o=t[n],i=e[n];"object"===(void 0===o?"undefined":_(o))?N(o,i):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(){M(e._panelController._indicatorNode,e.config.panel.indicatorClass)}}}}]),e}()},F="lnct",z=function(){function e(){var e,t;this.personalized=!1,this.ybarElem=document.getElementById("ybar"),this.partnerClasses=null===(t=null===(e=this.ybarElem)||void 0===e?void 0:e.className)||void 0===t?void 0:t.match(/ybar-variant-([a-z]*)/),this.client=new Y.NotificationClient(this.getConfig())}return e.prototype.refreshPanel=function(){var e,t,n,o=this,i={lastUpdate:this.getTimeStamp()||this.setTimeStamp(),loadInHpViewer:!0,includePersonalized:this.personalized},a=(null===(e=window.YAHOO)||void 0===e?void 0:e.context)||(null===(t=window.Af)||void 0===t?void 0:t.context)||{};return a.region&&a.lang&&(i.lang=a.lang,i.region=a.region),(null===(n=this.partnerClasses)||void 0===n?void 0:n.length)&&(i.partner=this.partnerClasses[1]),new Promise((function(e,t){o.client.helpers.refreshPanelNode({matrixParams:i},(function(n,o){n&&(c("Notification refresh error:",n),t(n)),e(o)}))}))},e.prototype.resetBadge=function(){this.client.helpers.resetBadge(),this.setTimeStamp()},e.prototype.getConfig=function(){var e,t,n,o,i,a=document.getElementById("notification-container"),r=null===(e=null==a?void 0:a.dataset)||void 0===e?void 0:e.config;if(I&&!r)return I;var 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}},l={};if(r){"att"===(null===(t=this.partnerClasses)||void 0===t?void 0:t[1])&&(s.promos.showYahooLogo=!1);try{var u=JSON.parse(r);l=m({},u),this.personalized=1===u.personalize}catch(e){c("Notifications config parsing error",e)}a&&delete a.dataset.config}return I=this.mergeConfigs(s,l),(null===(n=this.partnerClasses)||void 0===n?void 0:n.length)&&"yahoo"!==(null===(o=this.partnerClasses)||void 0===o?void 0:o[1])&&(null===(i=I.promos)||void 0===i?void 0:i.subscriptionTopic)&&delete I.promos.subscriptionTopic,I},e.prototype.mergeConfigs=function(e,t){var n=m({},e);for(var o in e)n[o]=m(m({},e[o]),t[o]);return n},e.prototype.getTimeStamp=function(){var e;return null===(e=window.localStorage)||void 0===e?void 0:e.getItem(F)},e.prototype.setTimeStamp=function(){var e,t=""+Math.floor((new Date).getTime()/1e3);return null===(e=window.localStorage)||void 0===e||e.setItem(F,t),t},e}(),W=new z,G=function(){return W},J="",K=[],V=function(){},$=function(){window.removeEventListener("beforeunload",$),""!==J&&c("Rapid not found on page",new Error(J))},X=null,Z=function(){return null===X&&(X=document.getElementById("ybar")),X},Q=function(){var e=0,t=window.YAHOO;if(q)return q;if(t)if(t.i13n)if(t.i13n.__RAPID_INSTANCES__)if(t.i13n.__RAPID_INSTANCES__.length<1)J="YBAR: no instances of rapid found!";else{var n=function(e){var t=void 0;if(e&&e.length>0)for(var n=0;n0){if(q.addModules(i,!1,o),K.length>0)for(e=0;e40959)&&(i<13312||i>19903)&&(i<44032||i>55215))return!1}return!0},fe={navBeaconFired:!1},ve=["ready","navigation"],ye=function(){function e(e){var t=this;this.triggerEvent=r,this.addEventListener=s,this.logError=c,this.logPerformance=l,this.getConfig=u,this.getPerformanceMetrics=d,this.rapidRefresh=te,this.state=m({},fe),this.modules=e,this.userEmail="",window.YBAR&&(ve.forEach((function(e){var n="on".concat(e),o=window.YBAR[n];o&&(t[n]=o)})),window.YBAR.wssid&&(this.wssid=window.YBAR.wssid),window.YBAR.appid&&(this.appid=window.YBAR.appid)),ve.forEach((function(e){var n="on".concat(e);s(e,(function(){for(var o,i=[],a=0;a0,o=_.scrollTope.pageOffset,a=_.scrollTop>E+h,r=_.scrollTop90&&qe("performance",e)}catch(e){}}),1e3)})),ce(),s("error",(function(e){var t=e&&e.detail||{},n=t.error||{},o=t.message||n.message||n.toString();try{var i={code:n.name,file:n.fileName||"",line:n.lineNumber||"",message:o};qe("error",i)}catch(e){}}));var Oe="_yb_a80o30",Be="_yb_1348ffh",De="_yb_2wm7zv",Pe="_yb_daionv";if("undefined"!=typeof Element&&!Element.prototype.matches){var Re=Element.prototype;Re.matches=Re.matchesSelector||Re.mozMatchesSelector||Re.msMatchesSelector||Re.oMatchesSelector||Re.webkitMatchesSelector}var He=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function Ue(e,t,n,o,i){var a=je.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}function je(e,t,n,o){return function(n){n.delegateTarget=He(n.target,t),n.delegateTarget&&o.call(e,n)}}var Ye,Fe=function(e,t,n,o,i){return"function"==typeof e.addEventListener?Ue.apply(null,arguments):"function"==typeof n?Ue.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return Ue(e,t,n,o,i)})))},ze=function(e){this.data=e,this.next=null,this.prev=null},We=function(){function e(){this.head=null,this.tail=null}return e.prototype.push=function(e){var t=new ze(e);return this.head?this.tail?(t.prev=this.tail,this.tail.next=t,this.tail=t):(this.tail=t,this.tail.prev=this.head,this.head.next=this.tail):(this.head=t,t.next=this.tail),t},e.prototype.size=function(){for(var e=0,t=this.head;t;)e+=1,t=t.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 t=0,n=this.head;(null==n?void 0:n.next)&&t=200&&i.status<=299,status:i.status,text:function(){return Promise.resolve(i.responseText)},json:function(){return new Promise((function(e,t){try{e(JSON.parse(i.responseText))}catch(e){t(e)}}))}})},i.send(t.body)}))]}))}))},Tt=function(e,t){return void 0===t&&(t={}),("function"==typeof window.fetch?fetch:qt)(e,t)},Ot=function(e,t){var n=e.url,o=e.headers,i=void 0===o?{}:o;return i["X-Requested-With"]="XMLHttpRequest",Tt(n,{headers:i,credentials:"include"}).then((function(e){return e.text().then((function(n){It({status:e.status,responseText:n},t)}))}))};!function(e){e[e.COUNT=0]="COUNT"}(et||(et={})),function(e){e[e.PENDING=0]="PENDING",e[e.COMPLETE=1]="COMPLETE"}(tt||(tt={}));var Bt={0:0,1:1,9:9,99:99,150:150},Dt=new Map,Pt=function(){function e(){}return Object.defineProperty(e.prototype,"wssid",{get:function(){var e,t,n=null===(e=window.YBAR)||void 0===e?void 0:e.wssid;return n||(n=(null===(t=document.querySelector('input[name="mail_wssid"]'))||void 0===t?void 0:t.value)||"",this.wssid=n),n},set:function(e){window.YBAR=window.YBAR||{},window.YBAR.wssid=e||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appid",{get:function(){var e,t,n=null===(e=window.YBAR)||void 0===e?void 0:e.appid;return n||(n=(null===(t=document.querySelector('input[name="mail_appid"]'))||void 0===t?void 0:t.value)||"",this.appid=n),n},set:function(e){window.YBAR=window.YBAR||{},window.YBAR.appid=e||""},enumerable:!1,configurable:!0}),e.prototype.fetchCount=function(e){return f(this,void 0,void 0,(function(){var t,n,o,i,a=this;return v(this,(function(r){return t=function(e){var t=Dt.get(e);if(t){if(t.status===tt.PENDING)return t.promise;var n=Date.now()-12e4;return t.data&&t.lastRequested>n?Promise.resolve(t.data):void 0}}(et.COUNT),(n=this._checkForMockData())?[2,n]:!e&&t?[2,t]:(1,o={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(o,1,(function(e){var t=a._normalizerCountResponse(e);return function(e,t){var n={lastRequested:Date.now(),status:tt.COMPLETE,promise:Promise.resolve(t),data:t};Dt.set(e,n)}(et.COUNT,t),t})),s=et.COUNT,c=i,l={lastRequested:Date.now(),status:tt.PENDING,promise:c},Dt.set(s,l),[2,i]);var s,c,l}))}))},e.prototype._fetch=function(e,t,n){var o,i;return f(this,void 0,void 0,(function(){var a,r,s,l,u,d,p,f,y,h,b,g,w,_,L,E;return v(this,(function(v){switch(v.label){case 0:if(a=e.data,r=void 0===a?{}:a,s=e.params,l=void 0===s?{}:s,u="EC-4008",d="EC-4003",p=this._getYmreqid(),!this.appid)throw new Error("No appId, user is logged out");f=m({appId:this.appid},l),this.wssid&&"mail_wssid"!==this.wssid&&(f.wssid=this.wssid),e.params=f,y=[],Object.keys(f).forEach((function(e){var t=f[e];t&&y.push("".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t)))})),h=y.length?"?".concat(y.join("&")):"",b="https://apis.mail.yahoo.com/ws/v3/batch".concat(h),v.label=1;case 1:return v.trys.push([1,4,,5]),[4,Tt(b,{method:"POST",body:JSON.stringify(r),credentials:"include",headers:{"Content-Type":"application/json","X-Oath-YmReqId":p}})];case 2:return[4,(g=v.sent()).json()];case 3:if(w=v.sent(),g.ok)return[2,n(null===(i=w.result)||void 0===i?void 0:i.responses)];if((_=null===(o=null==w?void 0:w.error)||void 0===o?void 0:o.code)===d)return[2,this._handleWssidApiError(w,e,t,n)];throw _===u?new Error("Session has expired"):new Error("Mail Api Responded with an Error");case 4:throw L=v.sent(),c("JWS: ".concat((E=L).message),E),L;case 5:return[2]}}))}))},e.prototype._checkForMockData=function(){var e=document.getElementById("ybar");if(e&&e.hasAttribute("data-mc")){var t=e.getAttribute("data-mc");if(t&&Bt[t])return Bt[t]}},e.prototype._normalizerCountResponse=function(e){var t,n,o,i,a,r;if(!e)return 0;var s=((null===(o=null===(n=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.response)||void 0===n?void 0:n.result)||void 0===o?void 0:o.decos)||[]).find((function(e){return"FTI"===(null==e?void 0:e.id)}));return s&&null!==(r=null===(a=null===(i=null==s?void 0:s.counts)||void 0===i?void 0:i[0])||void 0===a?void 0:a.unseen)&&void 0!==r?r:0},e.prototype._handleWssidApiError=function(e,t,n,o){var i,a,r=null===(a=null===(i=null==e?void 0:e.error)||void 0===i?void 0:i.details)||void 0===a?void 0:a.wssid,s=t.params,c=(void 0===s?{}:s).wssid;if(r){if(c&&r===c)throw new Error("API provided same invalid WSSID");if(void 0!==n&&n>0)return n-=1,this.wssid=r,this._fetch(t,n,o);throw new Error("Max retries with invalid WSSID reached")}throw new Error("valid WSSID missing from API Response")},e.prototype._getYmreqid=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-xxxx-09xx-xxxxxxxxxx00".replace(new RegExp("x","g"),(function(){var t=(e+16*Math.random())%16|0;return e=Math.floor(e/16),t.toString(16)}))},e}(),Rt={add:[{itemId:"ybar-mail-banner",reactions:["SHOWN"]}]};be("ybar-mod-sidenav",(function(e){var t,n={sidenavBtn:document.getElementById("_yb_sidenav-btn"),sidenav:document.querySelector(".".concat(gt)),menu:document.querySelector(".".concat(_t)),sections:document.querySelectorAll(".".concat(vt)),closeBtn:document.querySelector(".".concat(ot)),panels:document.querySelectorAll(".".concat(ft)),backBtn:document.querySelector(".".concat(nt)),footer:document.querySelector(".".concat(lt)),copyright:document.querySelector(".".concat(at)),selectedSectionLinks:document.querySelectorAll(".".concat(ht," a")),focusedElement:document.querySelector(".".concat(ht," .").concat(ct)),editionsDropdown:document.querySelector(".".concat(rt)),mailUnread:document.querySelector(".".concat(Et)),mailTooltip:document.getElementById("_yb_mail-tooltip"),tooltipClose:document.getElementById("_yb_mail-tooltip-close")},o=window.location.href.split("?")[0]?window.location.href.split("?")[0].replace(/\/$/,""):window.location.href,i=h([],y(n.selectedSectionLinks),!1);if(!n.focusedElement)for(var a=0;a0){if(o&&i){var n=t>99;o.classList.add("".concat(St)),i.classList.add("count-loaded"),o.textContent=n?"99+":t+"",n?o.classList.add("".concat(kt)):t>=10&&o.classList.add("".concat(Ct))}e.onDestroy((function(){o&&(o.textContent="")}))}})).catch((function(){}))}(e,s)}));var Ht="_yb_1e46uhr",Ut=function(e,t){var n;t.logoImages&&(n=t.logoImages).length>0&&Array.prototype.forEach.call(n,(function(e){e.onerror=function(){e.onerror=null,e.style.display="none"}})),t.wrapper&&(function(e,t){e&&(Ae("#ybar-logo","#ybar-logo",t),t.onDestroy((function(){e.classList.remove("ybar-show-outline"),e.classList.remove("ybar-hide-outline")})))}(t.wrapper,e),function(e,t){t&&e.addElementListener(t,"click",(function(){e.triggerEvent("logo-click")}))}(e,t.wrapper))};be("ybar-mod-logo",(function(e){var t={wrapper:document.getElementById("ybar-logo"),logoImages:document.querySelectorAll(".".concat(Ht))};Ut(e,t)}));var jt={"dropdown-open":"_yb_1qr55t8","merchant-is-selected":"_yb_hpfgev",overlay:"_yb_1t4opbo","selected-merchant-clear-button":"_yb_sdzekv","shops-buttons":"_yb_1gmhi8h","styled-select":"_yb_1fed2vs",tooltip:"_yb_156j5sr","tooltip--show":"_yb_t94u7s",tooltip__text:"_yb_149d3c6",tooltip__voice:"_yb_rkldcd",tooltip__web:"_yb_1bze76z",dark:"_yb_of9a42",darker:"_yb_1br2rz9",light:"_yb_p0373k","search-border-gradient":"_yb_109k2ga","search-border-gradient-hover":"_yb_vljmzl",midnight60:"_yb_1o792pg","search-input-uh3-hover":"_yb_15ox84z","search-input-uh3-focus-visible":"_yb_1e6541m","sa-btn-bar":"_yb_1axm66t","searchbox-icon-uh3":"_yb_1uef33k",empty:"_yb_owcm9n"},Yt=function(e,t){var n=Math.max(e,t),o=Math.min(e,t),i=Math.abs(n-o);return h([],y(new Array(i+1)),!1).map((function(e,t){return o+t}))},Ft=function(e,t,n){var o=e.getConfig().bucketConfig,i=(void 0===o?{}:o).enable_search_ui,a=void 0!==i&&i;if(t.ybar){t.ybar.classList.add("ybar-searchbox-assist-fullscreen"),document.documentElement.classList.add("ybar-overlay"),document.body.classList.add("ybar-overlay-noscroll");ee("ybar","websrch","",{elm:"expand",subsec:"searchbox",itc:"1"}),setTimeout((function(){t.searchInput instanceof HTMLInputElement&&(n&&(t.searchInput.value=n),t.searchInput.focus(),a&&window.YAHOO&&window.YAHOO.SA&&window.YAHOO.SA.apps&&window.YAHOO.SA.apps[0]&&window.YAHOO.SA.apps[0].view&&!window.YAHOO.SA.apps[0].view.shown&&window.YAHOO.SA.apps[0].view.show())}))}},zt=function(e){var t;null===(t=e.ybar)||void 0===t||t.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())},Wt=function(e,t){var n=e.getConfig();"smartphone"===n.device&&("finance"===n.property&&"crunch"===n.ytheme&&e.addElementListener(t.searchInput,"click",(function(){var n,o;n="search_input_focus_click",null!==(o=ae())&&(ne[n]||(ne[n]=o)),e.addElementListener(t.searchForm,"click",(function(){if(t.ybar){if(t.ybar.classList.contains("ybar-searchbox-assist-fullscreen"))return;t.ybar.classList.add("ybar-searchbox-assist-fullscreen"),t.ybar.classList.add("ybar-searchbox-assist-fadein")}if(!document.documentElement.classList.contains("ybar-overlay")){document.documentElement.classList.toggle("ybar-overlay"),document.body.classList.add("ybar-overlay-noscroll");ee("ybar","websrch","",{elm:"expand",subsec:"searchbox",itc:"1"})}}))})),e.addElementListener(t.searchBoxPlaceholder,"click",(function(){Ft(e,t)})),e.addElementListener(t.searchBoxPlaceholder,"keydown",(function(n){var o=n,i=o.keyCode,a=o.key,r=Yt(65,90),s=h(h([],y(Yt(58,57)),!1),y(Yt(96,105)),!1),c=h(h([],y(r),!1),y(s),!1).includes(i);(32===i||13===i||c)&&(n.preventDefault(),n.stopPropagation(),Ft(e,t,c?a:""))})),t.searchBoxBackButton&&(e.addElementListener(t.searchBoxBackButton,"click",(function(e){e.stopPropagation(),window.YAHOO&&window.YAHOO.SA&&window.YAHOO.SA.apps&&window.YAHOO.SA.apps[0]&&(window.YAHOO.SA.apps[0].view.resetQuery(),window.YAHOO.SA.apps[0].view.hide()),zt(t);ee("ybar","back-close-srch","",{elm:"btn",subsec:"searchbox",itc:"1"})})),e.addElementListener(t.searchInput,"keyup",(function(e){e.stopPropagation();27===e.keyCode&&(e.stopPropagation(),zt(t))}))),e.addEventListener("viewerClosed",(function(){zt(t)})),e.onDestroy((function(){zt(t)})))},Gt=function(){function e(e,t,n){t&&(this.ybar=e,this.elem=t,this.options=n,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 t,n;null===(n=null===(t=e.tooltipMarkup)||void 0===t?void 0:t.parentNode)||void 0===n||n.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 t=document.createElement("p");return t.textContent=this.options.label,t.className=this.options.textClass||"",e.appendChild(t),e},e}(),Jt={containerClass:jt.tooltip,textClass:jt.tooltip__text,showClass:jt["tooltip--show"]};be("ybar-mod-searchbox",(function(e){var t,n=e.getConfig(),o={ybar:document.getElementById("ybar"),searchInput:document.getElementById("ybar-sbq"),buttonBar:document.querySelector(".".concat(jt["sa-btn-bar"])),searchForm:document.getElementById("ybar-sf"),searchBoxIcon:document.querySelector(".".concat(jt["searchbox-icon-uh3"])),searchBoxPlaceholder:document.getElementById("ybar-smartphone-searchbox-placeholder"),searchBoxBackButton:document.getElementById("ybar-search-back-btn"),shopsButtonsWrap:document.querySelector(".".concat(jt["shops-buttons"])),categorySelect:document.getElementById("shops-category-select"),selectedMerchantInput:document.getElementById("selected-merchant-input"),selectedMerchantClearButton:document.querySelector(".".concat(jt["selected-merchant-clear-button"])),submitSearchBtn:document.getElementById("ybar-search"),clearSearchBtn:document.getElementById("ybar-sbq-x"),searchGradientBorder:document.querySelector(".".concat(jt["search-border-gradient"]))};if(function(e,t){var n,o,i,a=e.getConfig();if(t.ybar&&"desktop"===a.device&&(null===(n=a.bucketConfig)||void 0===n?void 0:n.highlight_searchassist)&&(null===(o=a.bucketConfig)||void 0===o?void 0:o.overlay_class)){t.ybar.setAttribute("data-ovrly-bkt",a.bucketConfig.overlay_class),null===(i=t.searchForm)||void 0===i||i.classList.add(jt[a.bucketConfig.overlay_class]);var r=document.createElement("div");r.classList.add(jt.overlay,jt[a.bucketConfig.overlay_class]),document.body.appendChild(r),e.onDestroy((function(){document.body.removeChild(r)})),e.addElementListener(t.searchForm,"focusout",(function(e){if(t.searchForm&&t.searchInput){var n=e.relatedTarget;n&&!t.searchForm.contains(n)&&window.YAHOO.SA&&window.YAHOO.SA.apps&&window.YAHOO.SA.apps[0]&&window.YAHOO.SA.apps[0].view.shown&&window.YAHOO.SA.apps[0].view.hide()}}))}}(e,o),Wt(e,o),o.searchGradientBorder){var i=!1;o.searchInput.addEventListener("keydown",(function(e){var t=e.code,n=e.key,a=t.startsWith("Key"),r=t.startsWith("Digit"),s=/^[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]$/.test(n);(a||r||s)&&!i&&(o.searchGradientBorder.classList.add("".concat(jt["search-border-gradient-hover"])),i=!0)})),e.addElementListener(o.searchForm,"mouseover",(function(){i||o.searchGradientBorder.classList.add("".concat(jt["search-border-gradient-hover"]))})),e.addElementListener(o.searchForm,"mouseout",(function(){i||o.searchGradientBorder.classList.remove("".concat(jt["search-border-gradient-hover"]))})),e.addElementListener(o.searchInput,"click",(function(){i=!0})),e.addElementListener(o.searchInput,"blur",(function(){o.searchGradientBorder.classList.remove("".concat(jt["search-border-gradient-hover"]))}))}o.searchForm&&(e.addElementListener(o.searchBoxIcon,"mouseover",(function(){o.searchForm.classList.add("".concat(jt["search-input-uh3-hover"]))})),e.addElementListener(o.searchBoxIcon,"mouseout",(function(){o.searchForm.classList.remove("".concat(jt["search-input-uh3-hover"]))})),e.addElementListener(o.buttonBar,"mouseover",(function(){o.searchForm.classList.add("".concat(jt["search-input-uh3-hover"]))})),e.addElementListener(o.buttonBar,"mouseout",(function(){o.searchForm.classList.remove("".concat(jt["search-input-uh3-hover"]))})),e.addElementListener(o.searchInput,"keyup",(function(e){"Tab"===e.key&&o.searchForm.classList.add("".concat(jt["search-input-uh3-focus-visible"])),o.searchInput.classList.toggle("".concat(jt.empty),""===o.searchInput.value)})),e.addElementListener(o.searchInput,"keydown",(function(){o.searchForm.classList.remove("".concat(jt["search-input-uh3-focus-visible"]))})),e.addElementListener(o.searchInput,"focusout",(function(){o.searchForm.classList.remove("".concat(jt["search-input-uh3-focus-visible"]))})),e.addElementListener(o.submitSearchBtn,"click",(function(e){""===o.searchInput.value.trim()&&e.preventDefault()})),e.addElementListener(o.clearSearchBtn,"click",(function(){o.searchInput.classList.add("".concat(jt.empty))}))),o.submitSearchBtn&&"crunch"===n.ytheme&&new Gt(e,o.submitSearchBtn,m(m({},Jt),{label:null!==(t=n.i18n.root.SEARCH_TOOLTIP_WEB)&&void 0!==t?t:"Search the web",containerClass:"".concat(jt.tooltip," ").concat(jt.tooltip__web),tooltipParentElm:o.clearSearchBtn.parentElement}))}));var Kt="_yb_tdk4ba",Vt="_yb_hkd17a",$t="_yb_rtzclf",Xt="_yb_tdbhj6",Zt="_yb_de52ef",Qt="_yb_9hwrey",en="_yb_slc8ta",tn="_yb_bf0svp",nn="_yb_hjic9z";be("ybar-mod-adaptivenav",(function(e){var t=document.querySelector("#ybar-l1-more-menu ul"),n={moreDropDown:document.querySelector(".".concat(Kt)),moreBtn:document.querySelector(".".concat(Vt)),wrap:document.querySelector(".".concat(Xt)),moreSectionTitle:document.querySelectorAll(".".concat(Zt)),editionsCtaBtn:document.querySelector(".".concat(Qt)),editionsMenu:document.querySelector(".".concat(en)),closeBtn:document.querySelector(".".concat(tn)),moreMenuDropDownHeight:t?"".concat(t.offsetHeight+48,"px"):"0"};new Ge(e,{adaptiveNavBtn:n.moreBtn,containerElm:n.moreDropDown,innerContainerElm:n.editionsMenu,isAdaptiveNav:!0});var o=!1,i=function(t,n){var o=t.moreDropDown,i=t.moreBtn,a=t.wrap,r={sec:"ybar",slk:"More",elm:"expand",pkgt:"top",subsec:"navrail",itc:"1"};o&&i&&a&&o.classList.contains("".concat(Kt))&&(o.style.height=t.moreMenuDropDownHeight,o.classList.remove("".concat(Kt)),a.classList.add("".concat($t)),i.setAttribute("aria-expanded","true"),r.elm="expand",e.triggerEvent("adapnav:more:show",{event:n}),ee("ybar",r.slk,"",r))},a=function(e,t){void 0===t&&(t=!1);var n=e.moreDropDown,i=e.moreBtn,a=e.wrap,r={sec:"ybar",slk:"More",elm:"close",pkgt:"top",subsec:"navrail",itc:"1"};n&&i&&a&&(n.classList.contains("".concat(Kt))||(n.classList.add("".concat(Kt)),n.style.height="0",a.classList.remove("".concat($t)),i.setAttribute("aria-expanded","false"),o||t||ee("ybar",r.slk,"",r)))},r=function(e,t){void 0===t&&(t=!1);var n=e.editionsMenu,o={sec:"ybar",slk:"More",elm:"close",pkgt:"top",subsec:"navrail",itc:"1"};null==n||n.close(),null==n||n.classList.remove("".concat(nn)),t||ee("ybar",o.slk,"",o)},s=function(){var e;window.innerWidth<1024&&(null===(e=n.editionsMenu)||void 0===e||e.close())};n.moreBtn&&(e.addElementListener(n.moreBtn.parentNode,"keydown",(function(e){!function(e){var t,o=e.key;switch(o){case" ":case"ArrowDown":case"Enter":if(document.activeElement===n.moreBtn)i(n,e),setTimeout((function(){var e;null===(e=n.moreDropDown)||void 0===e||e.querySelectorAll("a")[0].focus()}),300);else if(document.activeElement===n.editionsCtaBtn){var r=null===(t=n.editionsMenu)||void 0===t?void 0:t.querySelectorAll("a, button")[0];setTimeout((function(){r.focus()}),100)}break;case"Tab":if(console.log(o),document.activeElement===n.moreBtn)return;a(n),setTimeout((function(){var e;null===(e=n.moreBtn)||void 0===e||e.focus()}),300);break;case"Escape":a(n),setTimeout((function(){var e;null===(e=n.moreBtn)||void 0===e||e.focus()}),300)}}(e)})),e.addElementListener(n.moreBtn,"mouseenter",(function(e){var t;window.YAHOO.SA&&window.YAHOO.SA.apps&&window.YAHOO.SA.apps[0]&&window.YAHOO.SA.apps[0].view.shown?window.YAHOO.SA.apps[0].view.hide():null===(t=n.moreBtn)||void 0===t||t.click(),i(n,e)})),e.addElementListener(n.moreBtn.parentNode,"mouseleave",(function(){a(n)})),e.addElementListener(n.moreBtn.parentNode,"click",(function(e){n.moreDropDown&&n.moreDropDown.classList.contains("".concat(Kt))&&i(n,e)})),e.addElementListener(n.moreBtn,"keydown",(function(e){var t;27===e.keyCode&&(null===(t=n.moreBtn)||void 0===t||t.blur())}))),n.moreSectionTitle&&Array.from(n.moreSectionTitle).forEach((function(t){e.addElementListener(t,"mouseover",(function(){o=!0})),e.addElementListener(t,"mouseout",(function(){o=!1}))})),n.editionsCtaBtn&&n.editionsMenu&&"function"==typeof HTMLDialogElement&&(n.editionsMenu.setAttribute("style",""),e.addElementListener(n.editionsCtaBtn,"click",(function(){var e,t;n.editionsMenu&&(e=n.editionsMenu,t={sec:"ybar",slk:"More",elm:"expand",pkgt:"top",subsec:"navrail",itc:"1"},e&&(e.showModal(),e.classList.add("".concat(nn)),ee("ybar",t.slk,"",t)))})),e.addElementListener(n.closeBtn,"click",(function(){r(n)})),n.editionsMenu.addEventListener("click",(function(e){var t,o=null===(t=n.editionsMenu)||void 0===t?void 0:t.getBoundingClientRect();(e.clientXo.right||e.clientYo.bottom)&&r(n)})),window.addEventListener("resize",s)),e.onDestroy((function(){a(n,!0),r(n,!0),window.removeEventListener("resize",s)}))}));var on,an,rn,sn={"account-status-container":"_yb_ymi0h2","accounts-container":"_yb_cbk7gs","accounts-list":"_yb_1xscf7t",chevron:"_yb_pa7kxr",current:"_yb_z3vl31",expanded:"_yb_1wdvidv",greetings:"_yb_hz3nxi","greetings-container":"_yb_1dvo2p8",hide:"_yb_1tqu5w",mobile:"_yb_303pw",multiple:"_yb_dx6pd0","loading-profile-wrapper":"_yb_5m8r7u","loading-profile-button":"_yb_qaqab3","notification-container":"_yb_1vpbvgz","pfs-container":"_yb_12irxp7","pfs-iframe":"_yb_1a475s8",show:"_yb_1tj3rr","sign-in-menu":"_yb_mpd5lf","signed-in":"_yb_1330230","signed-in-mark":"_yb_1puqf10","signed-out":"_yb_43r3tx","signedout-text":"_yb_1a59ed4","stacked-name":"_yb_ts4lap","stacked-name-given":"_yb_zb2ipb","stacked-name-family":"_yb_1v4uiyy","uh3-layout":"_yb_19rb0y5","ybar-account-img":"_yb_12iiv1a","ybar-account-img-signed-out":"_yb_cbs8y","ybar-account-img-hidden":"_yb_1owxd09","ybar-account-menu":"_yb_9u1jny","ybar-account-menu-item-signed-out":"_yb_1qla71m","ybar-account-user-email":"_yb_1on73m5","ybar-account-user-email-other":"_yb_u3fczo","ybar-account-user-name":"_yb_5pkkfa","ybar-account-user-signedout":"_yb_axu8rh","ybar-account-yahoo-plus-imp":"_yb_14bnbgj","ybar-icon-arrow":"_yb_1tu7gjy","ybar-icon-arrow-down":"_yb_ngz6b5","ybar-icon-arrow-up":"_yb_1nagqiu","ybar-icon-image-wrapper":"_yb_19gpxwu","ybar-item-hidden":"_yb_559mjn","ybar-login-btn":"_yb_11glrwn","ybar-mod-account":"_yb_lq748r","ybar-mod-mail":"_yb_1e163lf","ybar-profile-character":"_yb_10rialq","ybar-profile-character-hidden":"_yb_1e2i1rd","ybar-see-info":"_yb_uiw8wx","ybar-sign-out":"_yb_j1eqwx","ybar-sign-out-text":"_yb_dvnuy9","ybar-user-accounts-list":"_yb_15pu2gg","ybar-user-profile-img":"_yb_1mawsyw","account-switcher-item-container":"_yb_1kjh1ov","account-switcher-chevron":"_yb_ju6kvv","account-switcher-container":"_yb_62ip13","hide-universal-profile":"_yb_11o7p8y","hide-account-switcher-container":"_yb_dwibp6","settings-item-container":"_yb_94wwjn","universal-profile-switch-button":"_yb_1p1qbi3","universal-profile":"_yb_1y7wwv3","account-switcher-settings-container":"_yb_zw2im7","account-switcher-signout-link":"_yb_1an82qo","signout-link-wrapper":"_yb_gk0uu2","ybar-keyline":"_yb_1rsy4q0","hide-up-settings":"_yb_1wofy5w"};on="ybar",rn={createHTML:function(e){return e}},void 0!==(an=window.trustedTypes)&&void 0!==an.createPolicy&&window.trustedTypes.createPolicy(on,rn);var cn,ln=!1,un=function(e,t,n){var o,i=n.ybarAccMenuItemTemplate,a=n.crumb;if(i){var r=(t+1).toString(),s=i.getAttribute("data-signedOutState"),c=i.getAttribute("data-signedInState")||"",l=i.getAttribute("data-done")||"",u=function(e){if("content"in e)return e.content.cloneNode(!0);for(var t=document.createDocumentFragment(),n=0;n=0;--n){e[n]=(a=void 0,(a={fn:(i=e[n]).fn||"",ln:i.ln||"",em:i.em||"",alias:i.alias||"",imageUrl:i.imageUrl,state:i.state,fullName:null,identifier:""}).fullName=me(a.fn,a.ln)?[a.ln,a.fn].join(""):[a.fn,a.ln].join(" "),a.identifier=a.em||a.alias,a);var o=e[n].state;0!==o&&"0"!==o||(window.YBAR&&window.YBAR.setUserEmail(e[n].em),cn=e[n],t||e.splice(n,1)[0])}var i,a;return e}(a.users,t.isUH3Layout);if(t.isUH3Layout&&cn){if(t.ybarLoadingProfileWrapper){var l=document.querySelector(".".concat(sn["ybar-profile-character-hidden"])),u=cn.fn&&cn.fn[0].toUpperCase()||"",d=me(cn.fn,cn.ln),p=function(){t.ybarLoadingProfileWrapper.remove(),t.ybarAccountMenu.classList.remove(sn["loading-profile-button"])};if(l&&pe(cn.imageUrl)&&!d)l.innerHTML=u,l.ontransitionend=p,l.classList.remove(sn["ybar-profile-character-hidden"]);else{var m=new Image;m.classList.add(sn["ybar-account-img"],sn["ybar-account-img-hidden"]),m.src=cn.imageUrl,m.alt=t.ybarLoadingProfileWrapper.getAttribute("data-alt")||"",m.ontransitionend=p,m.onload=function(){m.classList.remove(sn["ybar-account-img-hidden"])},t.ybarLoadingProfileWrapper.parentElement.prepend(m),l&&l.remove()}}c.length>0&&(t.chevron&&t.chevron.classList.remove("hide"),t.greetingsContainer&&(t.greetingsContainer.classList.add(sn.multiple),t.greetingsContainer.setAttribute("aria-expanded","false")))}for(var f=document.querySelector(".".concat(sn["ybar-user-accounts-list"]))||document.querySelector(".".concat(sn["accounts-list"])),v=function(n){var o=un(c[n],n,t);o&&(null==f||f.appendChild(o)),e.onDestroy((function(){o&&(null==f||f.removeChild(o))}))},y=0;y0){var h=document.querySelector("".concat(r," .").concat(sn["ybar-sign-out"])),b=h&&h.getAttribute("data-soa"),g=document.querySelector("".concat(r," .").concat(sn["ybar-sign-out-text"]));if(g&&b&&(g.innerText=b),s&&s.classList.add(sn.show),n){var w=document.querySelector("".concat(r," ").concat(sn["ybar-icon-arrow"])),_=sn["ybar-icon-arrow-up"],L=sn["ybar-icon-arrow-down"],E=sn["ybar-item-hidden"],k=document.querySelectorAll(".".concat(sn["ybar-item-hidden"]));w&&(w.classList.toggle(L),e.addElementListener(w,"click",(function(){for(var e=0;e5){var C=document.querySelector("".concat(r," .").concat(sn["ybar-see-info"]));C&&C.style&&(C.style.display="block")}pn(t,e),o&&o(),ln=!1}))}},fn=function(e,t,n){var o,i,a,r,s,c={},l=e.getConfig(),u=new URLSearchParams({activity_p:"ybar"}),d=null,p="https://pfs.yahoo.com",m=function(e){for(var t=e.split(";"),n=new Map,o=0;o720?720:e},h=function(){document.body.removeEventListener("focusin",h,!1),document.body.removeEventListener("click",h,!1)},b=function(){d&&f("resize",{height:v()})},g=function(){var a;if(null===d){(d=document.createElement("iframe")).src="".concat(p,"/?").concat(u.toString()),d.scrolling="no",d.sandbox.add("allow-forms"),d.sandbox.add("allow-scripts"),d.sandbox.add("allow-same-origin"),d.sandbox.add("allow-popups"),d.classList.add(n),d.style.height="0px",d.style.opacity="0";var r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode("body { background: var(--UI-White, #FFF); }.skeleton-container { display: inline-flex; padding: 20px 20px 41px 20px; justify-content: center; align-items: center; background: var(--UI-White, #FFF); }.profile-skeleton { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }.userinfo-container { display: flex; align-items: center; gap: 12px; }.avatar { width: 72px; height: 72px; border-radius: 8px; background: var(--Greyscale-14-Grey-Hair, #F0F3F5); }.userinfo { display: flex; padding: 8px 0px; flex-direction: column; align-items: flex-start; gap: 10px; }.name { width: 117px; height: 16px; border-radius: 8px; background: var(--Greyscale-14-Grey-Hair, #F0F3F5); }.email { width: 74px; height: 12px; border-radius: 8px; background: var(--Greyscale-14-Grey-Hair, #F0F3F5); }.manage-account { width: 284px; height: 40px; border-radius: 40px; opacity: 0.5; background: var(--Greyscale-14-Grey-Hair, #F0F3F5); }.list-container { display: flex; padding-top: 12px; flex-direction: column; align-items: flex-start; gap: 36px; align-self: stretch; opacity: 0.25; }.list { border-radius: 8px; background: var(--Greyscale-14-Grey-Hair, #F0F3F5); } .list:nth-child(1) { width: 198px; height: 12px; }.list:nth-child(2) { width: 169.5px; height: 12px; }.list:nth-child(3) { width: 198px; height: 12px; }")),d.addEventListener("load",(function(){setTimeout((function(){var n;o&&i||(e.triggerEvent("ybar-pfs-init-failure"),null===(n=null==d?void 0:d.parentNode)||void 0===n||n.removeChild(d),t.ybarAccountContainer&&t.ybarAccountContainer.setAttribute("data-pfs","err"))}),500)})),t.loggedInUserElement&&(t.iframeContainer.appendChild(d),d.contentDocument&&(d.contentDocument.head.appendChild(r),d.contentDocument.body.innerHTML='\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',d.style.opacity="1",setTimeout((function(){d&&(d.style.height="300px")}),100)),t.ybarAccountMenu&&(e.addElementListener(t.ybarAccountMenu.parentNode,"mouseenter",b),e.addElementListener(t.ybarAccountMenu.parentNode,"focus",b),e.addElementListener(t.ybarAccountMenu.parentNode,"keyup",b),null===(a=t.accountSwitcherChevron)||void 0===a||a.addEventListener("click",b)))}};if(t.ybarAccountMenu){if(e.addElementListener(t.ybarAccountMenu.parentNode,"mouseenter",g,{once:!0}),e.addElementListener(t.ybarAccountMenu.parentNode,"focus",g,{once:!0}),e.addElementListener(t.ybarAccountMenu.parentNode,"keyup",g,{once:!0}),e.onDestroy((function(){h(),d=null})),t.ybarAccountContainer){var w=t.ybarAccountContainer.getAttribute("data-prod");"false"===w&&(p="https://stage.pfs.yahoo.com"),u.set("intl","us"),u.set("src",l.property),u.set("version","2"),u.set("lang",l.locale),u.set("theme",(a="light",r=document.documentElement,null!==(s=r.getAttribute("data-color-theme-enabled"))&&"false"!==s&&(a="dark"===r.getAttribute("data-color-scheme")?"dark":"auto"),a)),"false"===w&&u.set("bucket","mbr-up-pfs-five"),u.set("done",window.location.href),u.set("pspid",le())}window.addEventListener("message",(function(e){if(e.origin===p){var t=function(e){var t={cmd:"noop",params:{height:"0px",width:"",url:"","data-ylk":""}};try{t=JSON.parse(e)}catch(e){return}return t}(e.data);if(null!==d&&(null==t?void 0:t.cmd)&&e.source&&!(e.source instanceof MessagePort)&&!(e.source instanceof ServiceWorker))switch(t.cmd){case"iframeready":o=e.origin,i=e.source,f("initialize",{height:v(),maxAccounts:3,enableAnimations:!0,animationDuration:"500ms",animationTimingFunction:"ease-in-out"});break;case"hide":case"hide-for-animation":case"show":d.style.height=t.params.height,t.params.width&&(d.style.width=t.params.width);break;case"redirect":c=m(t.params["data-ylk"]),ee("ybar",c.slk||"account","",c),window.location=t.params.url;break;case"popup":c=m(t.params["data-ylk"]),ee("ybar",c.slk||"account","",c),window.open(t.params.url,"_blank")}}}))}},vn=null,yn=!0,hn=0,bn={ybarAccountImage:{selector:"ybar-account-img",size:"64"},ybarCurrentUserProfileImage:{selector:"ybar-current-user-profile-img",size:"128"},ybarUserProfileImage:{selector:"ybar-user-profile-img",size:"128"}},gn=function(e,t){var n=t.ybarAccountContainer,o=t.ybarAccountMenu,i=t.ybarMobile,a=t.ybarMenuManagePub,r=t.signInAccountMenu,s=t.signInBtn,l=t.ybarModAccount,u=t.yahooPlusImpression,d=t.ybarLabel,p=t.accountSwitcherButton,m=t.universalProfile,f=t.universalProfileSettings,v=t.accountSwitcherContainer,y=t.accountSwitcherChevron,h=t.accountSwitcherSettings,b=t.signoutLinkWrapper,g=t.universalProfileKeyLine,w=t.financeApprBtnEl,_=function(){new Ge(e,{containerElm:t.ybarAccountContainer,isUserAccountNavigation:!0,loggedInUser:t.loggedInUser,loggedInUserElement:t.loggedInUserElement,accountSwitcherButtonSelector:".".concat(sn["greetings-container"],".").concat(sn.multiple)})},L=function(o){if(n)n.style.removeProperty("display"),"false"===n.getAttribute("data-enabled")&&(n.style.display="none"),pn(t,e);else{var i=new Error("ybarAccountContainer not Found");c("ERROR:",i)}n&&yn&&(yn=!1,e.onDestroy((function(){yn=!0})),mn(e,t,o,_))},E=function(){var e,t;0===hn&&(hn=1,null===(e=null==o?void 0:o.parentNode)||void 0===e||e.removeEventListener("mouseenter",E),null===(t=null==o?void 0:o.parentNode)||void 0===t||t.removeEventListener("focusin",E),setTimeout((function(){te()}),500))},k=function(t){e.triggerEvent("ybar:show_theme_modal",{event:t})},C=function(i){(null==n?void 0:n.classList.contains("ybarMenuOpen"))||(null==o?void 0:o.classList.contains(sn["loading-profile-button"]))||(null==n||n.classList.add("ybarMenuOpen"),null==o||o.setAttribute("aria-expanded","true"),e.triggerEvent("close-all-menus"),e.triggerEvent("profile:show",{event:i}),document.activeElement===o&&setTimeout((function(){var e;null===(e=t.ybarAccountMenu)||void 0===e||e.blur(),(null==m?void 0:m.classList.contains("hide-universal-profile"))?null==y||y.focus():(null==f?void 0:f.children[0].children[0].children[0]).focus()}),300))},S=function(){null==n||n.classList.remove("ybarMenuOpen"),null==o||o.setAttribute("aria-expanded","false")},A=function(e){if(o&&n){if(o.classList.contains(sn["loading-profile-button"]))return;n.classList.contains("ybarMenuOpen")?S():C(e)}},x=function(){window.YAHOO.SA&&window.YAHOO.SA.apps&&window.YAHOO.SA.apps[0]&&window.YAHOO.SA.apps[0].view.shown&&window.YAHOO.SA.apps[0].view.hide()},M=function(){if(u&&!u.getAttribute("src")&&u.getAttribute("data-src")){var t=u.getAttribute("data-src")||"";Xe(t).then((function(e){null===vn&&((vn=document.createElement("iframe")).src="https://s.yimg.com/jk/gtm/gtm_ns.html?id=GTM-NVQTVCX&type=yahoo&cat=ybarimp1",vn.sandbox.add("allow-scripts"),vn.sandbox.add("allow-same-origin"),vn.height="0",vn.width="0",vn.referrerPolicy="origin",vn.style.display="none",vn.style.visibility="hidden",document.body.appendChild(vn)),u.setAttribute("src",e)})),e.onDestroy((function(){u.setAttribute("src",""),vn=null}))}};null==p||p.addEventListener("click",(function(){return function(e,t,n,o,i,a,r){null==e||e.classList.add("hide-universal-profile"),null==e||e.classList.add("hide"),null==t||t.classList.add("hide"),null==t||t.classList.add("".concat(sn["hide-up-settings"])),null==n||n.classList.add("".concat(sn["account-switcher-signout-link"])),null==o||o.classList.add("hide"),null==i||i.classList.remove("".concat(sn["hide-account-switcher-container"])),null==a||a.classList.remove("".concat(sn["account-switcher-settings-container"])),null==r||r.focus()}(m,f,b,g,v,h,y)})),null==y||y.addEventListener("click",(function(){return function(e,t,n,o,i,a){null==e||e.classList.remove("hide-universal-profile"),null==t||t.classList.remove("hide"),null==t||t.classList.remove("".concat(sn["hide-up-settings"])),null==n||n.classList.remove("".concat(sn["account-switcher-signout-link"])),null==o||o.classList.remove("hide"),null==i||i.classList.add("".concat(sn["hide-account-switcher-container"])),null==a||a.classList.add("".concat(sn["account-switcher-settings-container"])),(null==t?void 0:t.children[0].children[0].children[0]).focus()}(m,f,b,g,v,h)})),s&&(Se(e,s,"ybar","sign-in",{elm:"signin",subsec:"settings",itc:"2"}),pn(t,e));var N=function(){L(!1),e.addEventListener("close-all-menus",(function(){r&&r.classList.contains(sn.show)&&r.parentNode&&!ke(r.parentNode)&&S()}));e.onDestroy((function(){S()})),o&&(o.onchange=function(){e.triggerEvent("close-all-menus")},{itc:"2",elm:"menu",elmt:"user-info",subsec:"accounts"},l&&(e.addElementListener(l,"mouseenter",M),e.addElementListener(l,"focus",M)),o&&o.parentNode&&e.addElementListener(o.parentNode,"mouseenter",E),Ae("#ybarAccountMenu","#ybarAccountMenu + label",e)),e.addElementListener(l,"mouseenter",A),e.addElementListener(l,"mouseleave",S),e.addElementListener(o,"click",A),e.addElementListener(a,"click",S),e.addElementListener(l,"mouseenter",x),null==l||l.addEventListener("keydown",(function(e){!function(e){var o;switch(e.key){case"ArrowDown":C(e);break;case" ":case"Enter":document.activeElement===t.ybarAccountMenu&&e.preventDefault(),C(e);break;case"Escape":(null==n?void 0:n.classList.contains("ybarMenuOpen"))&&(null===(o=t.ybarAccountMenu)||void 0===o||o.focus())}}(e)})),null==b||b.addEventListener("keydown",(function(e){!function(e){"Tab"===e.key&&(null==n||n.classList.remove("ybarMenuOpen"),null==o||o.setAttribute("aria-expanded","false"))}(e)}))};(o||i||r)&&(i?L(!0):(n&&"true"===n.getAttribute("data-pfs")&&(fn(e,t,sn["pfs-iframe"]),e.addEventListener("ybar-pfs-init-failure",(function(){var e;null===(e=t.ybarAccountMenuBody)||void 0===e||e.classList.remove(sn["pfs-container"]),N();ee("ybar","pfs-load-failure","",{elm:"btn",subsec:"profile",itc:"1"})}))),N()),Object.keys(bn).forEach((function(e){var t=bn[e],n=document.querySelector(".".concat(sn[t.selector]));n&&(n.onerror=function(){var e,o,i;e=t.size,i="https://s.yimg.com/cv/apiv2/ybar/images/default_user_profile_pic_"+e+".svg",(o=n).onerror=null,o.srcset="",o.src=i})}))),window.addEventListener("keyup",(function(e){27===e.keyCode&&(S(),null==d||d.blur())})),null==w||w.addEventListener("click",(function(e){k(e)})),null==w||w.addEventListener("keydown",(function(e){(e instanceof KeyboardEvent&&"Tab"!==e.key&&e.preventDefault(),e instanceof KeyboardEvent&&"Enter"===e.key)&&("Enter"===e.key&&k(e))}))};be("ybar-account-init",(function(e){var t=document.getElementById("ybarAccountContainer"),n={ybarAccountContainer:t,ybarAccountMenu:document.getElementById("ybarAccountMenu"),loggedInUser:document.querySelectorAll("#ybarAccountProfile"),loggedInUserElement:document.getElementById("ybarAccountProfile"),iframeContainer:document.getElementById("iframe-container"),ybarMobile:document.querySelector(".".concat(sn.mobile," .").concat(sn["ybar-account-user-email"])),ybarMenuManagePub:document.getElementById("ybarMenuManagePub"),signInAccountMenu:document.querySelector(".".concat(sn["ybar-mod-account"]," .").concat(sn["sign-in-menu"])),signInBtn:document.querySelector(".".concat(sn["ybar-mod-account"]," .").concat(sn["ybar-login-btn"])),ybarModAccount:document.querySelector(".".concat(sn["ybar-mod-account"])),yahooPlusImpression:t&&t.querySelector(".".concat(sn["ybar-account-yahoo-plus-imp"])),crumb:document.querySelector('input[name="uh-crumb"]'),jsapicrumb:document.querySelector('input[name="jsapicrumb"]'),ybarAccMenuItemTemplate:document.getElementById("ybarAccMenuItemTemplate"),isUH3Layout:!!document.querySelector(".".concat(sn["uh3-layout"])),isAOLMail:!!document.querySelector("#ybar.ybar-variant-aolmail"),chevron:document.querySelector(".".concat(sn.chevron)),greetingsContainer:document.querySelector(".".concat(sn["greetings-container"])),ybarAccountMenuBody:document.getElementById("ybarAccountMenuBody"),stackedName:document.querySelector(".".concat(sn["stacked-name"])),stackedNameGiven:document.querySelector(".".concat(sn["stacked-name-given"])),stackedNameFamily:document.querySelector(".".concat(sn["stacked-name-family"])),ybarLabel:document.querySelector("#ybarAccountMenuOpener"),ybarLoadingProfileWrapper:document.querySelector(".".concat(sn["loading-profile-wrapper"])),universalProfile:document.getElementById("universalProfile"),universalProfileSettings:document.getElementById("universalProfileSettings"),accountSwitcherSettings:document.getElementById("accountSwitcherSettings"),accountSwitcherContainer:document.querySelector(".".concat(sn["account-switcher-container"])),universalProfileKeyLine:document.querySelector(".".concat(sn["ybar-keyline"])),accountSwitcherButton:document.querySelector(".".concat(sn["universal-profile-switch-button"])),accountSwitcherChevron:document.querySelector(".".concat(sn["account-switcher-chevron"])),signoutLinkWrapper:document.querySelector(".".concat(sn["signout-link-wrapper"])),financeApprBtnEl:document.getElementById("fin-appr-btn")};gn(e,n)}));var wn={"popover-body":"_yb_1cv16f4","ybar-mail-link":"_yb_1b0y3p9","ybar-mail-preview":"_yb_q2xbhz","ybar-mail-signin-link":"_yb_hnauxw","ybar-mod-mail":"_yb_10309ej","ybar-mod-mail-promo-imp":"_yb_6ci77k","ybar-large-unread":"_yb_9b6j40","ybar-mid-unread":"_yb_12gd9wd","ybar-mail-indicator":"_yb_tnmz0c","ybar-unread-active":"_yb_jdf7pt","count-loaded":"_yb_13nwx6d"},_n=function(e){var t,n;null===(t=e.mailPreview)||void 0===t||t.classList.add("ybarMenuOpen"),null===(n=e.mailLink)||void 0===n||n.setAttribute("aria-expanded","true")},Ln=function(e){var t,n;null===(t=e.mailPreview)||void 0===t||t.classList.remove("ybarMenuOpen"),null===(n=e.mailLink)||void 0===n||n.setAttribute("aria-expanded","false")},En=function(e,t,n){var o=t.mailLink,i=t.mailUnread,a=t.mailUnreadSpan,r=t.mailIndicator,s=t.mailModule,c="".concat(wn["ybar-unread-active"]);n.fetchCount().then((function(t){if(i&&t>0){var n=e.getConfig().i18n.root.MAIL_ARIA_LINK;if(o&&o.hasAttribute("aria-label")&&n&&o.setAttribute("aria-label",n.replace("{count}",t.toString())),i.classList.add(c),r&&(r.classList.add(c),null==s||s.classList.add(c)),a){var l=t>99;a.textContent=l?"99+":t+"",i.classList.add("".concat(wn["count-loaded"])),l?i.classList.add("".concat(wn["ybar-large-unread"])):t>=10&&i.classList.add("".concat(wn["ybar-mid-unread"]))}e.onDestroy((function(){i.classList.remove(c),r&&r.classList.remove(c),a&&(a.textContent="")}))}})).catch((function(){}))};be("ybar-mail-init",(function(e){var t=document.getElementById("ybarUnread");!function(e,t){var n=t.mailModule,o=t.mailLink,i=t.mailSigninLink,a=t.mailPreview;if(n){var r=new Pt;if(e.addElementListener(n,"mouseenter",(function(){e.triggerEvent("close-all-menus")})),e.addEventListener("close-all-menus",(function(){ke(n)||Ln(t)})),e.addElementListener(a,"focusin",(function(){_n(t)})),e.addElementListener(a,"focusout",(function(){Ln(t)})),e.onDestroy((function(){Ln(t)})),i){var s=o.getAttribute("data-redirect-params");if(s&&""!==s){var c=o.href;e.onDestroy((function(){o.href=c})),s=-1!==o.href.indexOf("&activity=ybar-")?"":s.replace(/\[\[pspid\]\]/,le()),o.href=de(o.href)+s,(null==i?void 0:i.href)&&(i.href=de(i.href)+s)}}else En(e,t,r)}}(e,{mailModule:document.querySelector(".".concat(wn["ybar-mod-mail"])),mailIndicator:document.querySelector(".".concat(wn["ybar-mail-indicator"])),mailLink:document.querySelector(".".concat(wn["ybar-mail-link"])),mailSigninLink:document.querySelector(".".concat(wn["ybar-mail-signin-link"])),mailUnread:t,mailUnreadSpan:null==t?void 0:t.querySelector("span"),mailPreview:document.getElementById("ybarMailPreview"),popoverBody:document.querySelector(".".concat(wn["popover-body"].split(" ").join("."))),mailPreviewPopover:document.querySelector(".".concat(wn["ybar-mail-preview"].split(" ").join(".")," .").concat(wn["popover-body"].split(" ").join(".")))})}));var kn,Cn,Sn="_yb_rbr9p9",An="_yb_ac74t6",xn="_yb_8737ki",Mn="_yb_1vnnmze",Nn="_yb_h1s1bv",In="_yb_bkrga4",qn="_yb_kwlkcz",Tn="_yb_1772h7s",On="_yb_15viflt",Bn="_yb_zzzvko",Dn=function(e){var t=document.querySelector("#ybar-navigation-item-mail"),n=document.querySelector("#ybar-navigation-item-mail > a"),o=document.querySelector("#ybar-navigation-item-mail > a > span");null!==t&&null!==n&&(new Pt).fetchCount().then((function(t){o&&t>0&&(o.textContent="("+(t>99?"99+":t)+")",e.onDestroy((function(){o.textContent=""})))})).catch((function(){}))},Pn=!1,Rn=-1,Hn=function(e,t,n){var o,i,a,r=-1,s=0;if(e.ybarNav&&e.navList){var c=window.getComputedStyle(e.ybarNav),l=parseInt(c.width,10)-parseInt(c.paddingLeft,10)-parseInt(c.paddingRight,10),u=61,d=e.navigationPlacement();if(d)u+=d.getBoundingClientRect().width;if(Cn)u+=Cn.getBoundingClientRect().width;for(var p=window.getComputedStyle(e.navList),m=parseInt(p.gap,10)||0,f=0;fg&&(f!==e.navItems.length-1||s+h>g||e.moreMenuDropdown&&e.moreMenuDropdown.hasChildNodes()&&Rn<0)){r=f;break}s+=h+(fRn&&-1!==Rn)for(var _=Rn;_=r;){var E=e.navItems[L].cloneNode(!0),k=E.querySelector("a");k&&(k.setAttribute("id",""),k.classList.remove(xn));var C=E.querySelector(".".concat(e.navigationDropdownListClass));if(C&&(C.style.display="none"),E.classList.remove(e.dropdownWrapperClass),E.classList.remove(e.ybarNavigationItemClass),E.classList.add(e.navigationDropdownItemClass),e.moreMenuDropdown){e.moreMenuDropdown.insertBefore(E,e.moreMenuDropdown.firstChild);var S=E.getElementsByTagName("a")[0];n.unshiftMoreMenuItem(S)}null===(a=e.navItems[L].querySelector("a"))||void 0===a||a.setAttribute("tabindex","-1"),L--}Rn=r}if(-1!==r&&e.navList){var A=parseInt(s.toString(),10)+"px";e.navList.style.maxWidth=A,t.textContent=".".concat(qn,"{ max-width: ").concat(A,"}")}Cn||(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>10?e.moreMenuDropdown.classList.add(e.longListClass):null!==e.moreMenuDropdown&&e.moreMenuDropdown.classList.remove(e.longListClass))}},Un=function(e,t){var n,o=function(e,n){var o;e.classList.contains(t.moreMenuNavItemClass)&&(null===(o=t.moreMenuMainFocusItem)||void 0===o||o.setAttribute("aria-expanded",n))},i=function(){t.isTablet&&(document.body.classList.remove("ybar-nav-open"),document.body.removeEventListener("touchend",u))},a=function(n){var i=n.delegateTarget;i&&i.classList.contains(t.dropdownWrapperClass)&&(i.classList.contains(t.dropdownOpenClass)||(e.triggerEvent("nav:dropdown:show",{event:n}),t.isTablet&&(document.body.classList.add("ybar-nav-open"),document.body.addEventListener("touchend",u)),i.classList.add(t.dropdownOpenClass),o(i,"true")))},r=function(e){var n=e.delegateTarget;if(null==n?void 0:n.classList.contains(t.navigationDropdownListClass)){var a=n.parentElement;a&&!a.contains(e.relatedTarget)&&a.classList.contains(t.dropdownWrapperClass)&&(i(),a.classList.remove(t.dropdownOpenClass),o(a,"false"))}else if(null==n?void 0:n.classList.contains(t.dropdownOpenClass)){if(t.isTablet&&e instanceof FocusEvent)return;var r=e.target;Cn&&(!Cn||Cn.contains(r)&&"focusout"!==e.type)||(i(),n.classList.remove(t.dropdownOpenClass),o(n,"false"))}},s=Fe(".".concat(t.dropdownWrapperClass),"focusin",a),c=Fe(".".concat(t.dropdownWrapperClass,", .").concat(t.navigationDropdownListClass),"focusout",r),l=document.getElementById("ybar-navigation"),u=function(e){var n=null==e?void 0:e.target;t.isTablet&&e&&e.target&&e.target instanceof HTMLElement&&(e.target.classList.contains(t.dropdownOpenClass)||e.target.closest(".".concat(t.dropdownOpenClass)))||document.body.classList.contains("ybar-nav-open")&&!["svg","path"].includes(n.tagName)&&(null==l||l.querySelectorAll(".".concat(t.dropdownOpenClass)).forEach((function(e){e.classList.remove(t.dropdownOpenClass)})),i())};e.addEventListener("nav:closeOverflowMenu",(function(){u()}));var d=Fe(".".concat(t.dropdownWrapperClass),"touchstart",(function(e){if(t.isTablet){var n=e.delegateTarget;n&&n.classList.contains(t.dropdownOpenClass)?r(e):(u(e),a(e))}})),p=null===(n=t.ybarNav)||void 0===n?void 0:n.querySelectorAll(".".concat(In));null==p||p.forEach((function(t){var n=t.parentNode;n&&null!==document.querySelector(".ybar-ytheme-crunch")&&e.addElementListener(n,"mouseenter",(function(t){e.triggerEvent("nav:dropdown:show",{event:t})}))})),e.onDestroy((function(){var e;d.destroy(),s.destroy(),c.destroy(),h([],y(null===(e=t.ybarNav)||void 0===e?void 0:e.querySelectorAll(".".concat(t.dropdownOpenClass))),!1).forEach((function(e){e.classList.remove(t.dropdownOpenClass);var n=document.activeElement;(function(e,t){var n=!1;if(!e||!t)return n;if("function"==typeof e.contains)n=e.contains(t);else for(var o=t;o;){if(o===e){n=!0;break}o=o.parentElement}return n})(t.ybarNav,n)&&setTimeout((function(){null==n||n.blur()}),1)}))}))},jn=function(e,t,n,o){for(var i=t||window.location.pathname,a=n||window.location.hostname,r=(o||{}).setParentFocus,s=void 0!==r&&r,c=h([],y(e.topLevelNavLinks),!1),l=null,u=null,d=0;d0),a=new Ge(e,{containerElm:t.ybarNav,navlistItemSelector:".".concat(On," > li"),dropdownClass:t.dropdownWrapperClass,enableMoreMenu:i,moreMenuNavElm:t.moreMenuMainFocusItem,isUserAccountNavigation:!1});!function(e,t){var n,o;h([],y(null===(n=t.ybarNav)||void 0===n?void 0:n.querySelectorAll(".".concat(t.dropdownOpenClass))),!1).forEach((function(e){return e.classList.remove(t.dropdownOpenClass)}));var i=e.getConfig();Cn=(null===(o=i.bucketConfig)||void 0===o?void 0:o.enable_mid_nav_placement)?document.getElementById("ybar-mid-nav-placement"):void 0,"news"===i.property?kn=-12:(kn="finance"!==i.property&&"sports"!==i.property&&t.shiftMoreMenuEnabled?-24:-16,"zh-Hant-HK"!==i.locale&&"zh-Hant-TW"!==i.locale||(kn=-20));var a=t.isTablet?"touchstart":"mouseover",r=Fe(".".concat(t.dropdownWrapperClass,", .").concat(t.navigationDropdownListClass),a,(function(n){if(window||document){var o=window.innerWidth||document.documentElement.clientWidth,a=n.delegateTarget;if(a&&-1!=a.className.indexOf(t.dropdownWrapperClass)&&(a=a.querySelector(".".concat(t.navigationDropdownListClass))),a){a.style.removeProperty("left");var r=a.getBoundingClientRect(),s=Math.trunc(r.right),c=parseInt(window.getComputedStyle(a).marginLeft,10)+o-s;if(s>o)return"sports"!==i.property?void(a.style.marginLeft=c+"px"):void(a.style.right="0px");if(parseInt(a.style.marginLeft)0?a.style.removeProperty("margin-left"):a.style.marginLeft=c+"px":(a.style.removeProperty("margin-left"),a.style.marginLeft=kn+"px"),t.isTablet){var l=a.previousElementSibling;if(Cn&&Cn.contains(a));else if(l){var u=l.getBoundingClientRect(),d=Math.trunc(u.left);a.style.left=d+"px"}}}}else{var p=new Error("Dropdown could not be initialized");e.logError("Error:",p)}}));e.onDestroy((function(){r.destroy()}))}(e,t),Dn(e),e.addElementListener(document,"DOMContentLoaded",(function(){Dn(e)})),Un(e,t);var r=e.getConfig().bucketConfig,s=void 0===r?{}:r,c=s.enableDynamicNavfocus,l=void 0!==c&&c,u=s.enableFuzzyMatching;if(l&&(Pn=void 0!==u&&u,jn(t)),e.addEventListener("nav:setFocus",(function(e){var n=e.detail,o=void 0===n?{}:n,i=o.hostname,a=void 0===i?window.location.hostname:i,r=o.pathname,s=void 0===r?window.location.pathname:r,c=o.options;jn(t,s,a,void 0===c?{}:c)})),i){var d=document.createElement("style");d.title="ybar_nav_interim",document.head.appendChild(d);var p=Fe("#ybar-nav-more-menu ul a","click",(function(t){e.triggerEvent("navigation",{event:t})}));e.addEventListener("nav:resize",(function(){Hn(t,d,a)})),Hn(t,d,a);var m=e.getConfig();if("complete"===document.readyState)Yn(e,t,d,a);else{var f="load";("news"===m.property&&("zh-Hant-TW"===m.locale||"zh-Hant-HK"===m.locale)||"finance"===m.property&&"zh-Hant-TW"===m.locale)&&(f="DOMContentLoaded"),e.addElementListener(window,f,(function(){Yn(e,t,d,a)}))}e.addElementListener(window,"resize",(function(){Hn(t,d,a)})),e.onDestroy((function(){var e=d.parentNode;null==e||e.removeChild(d),p.destroy()}))}Wn(e,t)},zn=function(e,t){var n=["zh-Hant-TW","zh-Hant-HK"].includes(e.getConfig().locale);return t.isFuji2&&n},Wn=function(e,t){if(t.isNavHidden){var n=!1;e.addElementListener(document,"DOMContentLoaded",(function(n){t.isNavHidden()&&e.triggerEvent("l2:hide",{event:n})})),e.addElementListener(window,"resize",(function(o){!n&&t.isNavHidden()&&e.triggerEvent("l2:hide",{event:o}),n=t.isNavHidden()}))}},Gn="#ybar-nav-more-menu";be("ybar-mod-navigation",(function(e){var t,n=e.getConfig(),o={dropdownWrapperClass:An,isFuji2:null!==document.querySelector(".ybar-ytheme-fuji2")||null!==document.querySelector(".ybar-ytheme-crunch"),isTablet:null!==document.querySelector(".tablet")||"tablet"===n.device||matchMedia("(hover: none)").matches,longListClass:Mn,moreMenuDropdown:document.querySelector("".concat(Gn," ul")),moreMenuNavItem:document.querySelector(Gn),moreMenuNavLinksSelector:"".concat(Gn," ul a"),moreMenuMainFocusItem:document.querySelector("".concat(Gn," > button")),moreMenuNavItemClass:Bn,navigationDropdownItemClass:Nn,navigationDropdownListClass:In,navItems:document.querySelectorAll("ul.".concat(On," li.").concat(Tn)),topLevelNavLinks:document.querySelectorAll("li.".concat(Tn," > 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:Tn,dropdownOpenClass:Sn,hasNavPlacement:document.getElementById("ybar-nav-placement"),marginOffset:function(e){var t=window.getComputedStyle(e),o=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10);return"sports"===n.property?parseInt(t.marginRight):"finance"===n.property&&"crunch"===n.ytheme?(o-=1.8)>5?o:5:"crunch"===n.ytheme?o:0},navigationPlacement:function(){return t||(t=document.getElementById("ybar-nav-placement")),t},isNavHidden:function(){var e=!1;return"finance"===n.property&&"crunch"===n.ytheme&&document.documentElement.clientWidth<=1049&&(e=!0),e}};o.ybarNav&&Fn(e,o)}));var Jn="_yb_1h2ih8x",Kn="_yb_f3bvkl",Vn="_yb_1f54rhj",$n="_yb_1mpo4mr",Xn="ytlv",Zn=864e5,Qn="_yb_8yut1v",eo="_yb_l5yf1n",to="_yb_1v39b7t",no="_yb_nlp72x",oo=function(){function e(e,t){var n=this;this.initialized=!1,this.ybar=e,this.container=t,this.a11yMenu=this.container.querySelector(".".concat(no)),this.historyEnabled=!!Number(this.container.dataset.history);var o=this.getLocalStorage();this.state={lastSeen:(null==o?void 0:o.lastSeen)||null,manuallyClosed:(null==o?void 0:o.manuallyClosed)||!1},this.init();var i=0,a=setInterval((function(){i>=5||n.initialized?clearInterval(a):(void 0!==n.isNotificationsSupported()&&n.init(),i++)}),100)}return e.prototype.show=function(e){var t;this.initialized&&(this.historyEnabled&&!e||(document.body.classList.add(Qn),null===(t=this.a11yMenu)||void 0===t||t.setAttribute("aria-expanded","true"),this.lastSeen=(new Date).getTime()))},e.prototype.hide=function(){var e;this.initialized&&(this.historyEnabled&&document.body.classList.remove(eo),document.body.classList.remove(Qn),null===(e=this.a11yMenu)||void 0===e||e.setAttribute("aria-expanded","false"))},Object.defineProperty(e.prototype,"lastSeen",{get:function(){return this.state.lastSeen},set:function(e){this.state.lastSeen=e,this.setLocalStorage()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"manuallyClosed",{get:function(){return this.state.manuallyClosed},set:function(e){this.state.manuallyClosed=!!e,this.setLocalStorage()},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.isNotificationsSupported()&&this.isNotificationPermissionDefault()&&(this.historyEnabled||document.body.classList.add(eo),this.addEventListeners(),this.initialized=!0,this.hasSeenTooltipIn(this.manuallyClosed?6048e5:Zn)||(document.body.classList.add(eo),this.show(!0)))},e.prototype.addEventListeners=function(){var e=this;this.ybar.addElementListener(this.container.getElementsByClassName(to)[0],"click",(function(){e.hide(),e.manuallyClosed=!0}))},e.prototype.isNotificationsSupported=function(){var e;return null===(e=null===window||void 0===window?void 0:window.subscriptionHelperInstance)||void 0===e?void 0:e.checkIsSupportedBrowser()},e.prototype.isNotificationPermissionDefault=function(){var e;return"default"===(null===(e=window.Notification)||void 0===e?void 0:e.permission)},e.prototype.hasSeenTooltipIn=function(e){if(!this.lastSeen)return!1;var t=new Date(this.lastSeen),n=new Date;return t.getTime()+e>n.getTime()},e.prototype.setLocalStorage=function(){var e;null===(e=window.localStorage)||void 0===e||e.setItem(Xn,JSON.stringify(this.state))},e.prototype.getLocalStorage=function(){var e,t,n=null===(e=window.localStorage)||void 0===e?void 0:e.getItem(Xn);if(null===n)return null;try{return JSON.parse(n)}catch(e){return null===(t=window.localStorage)||void 0===t||t.removeItem(Xn),null}},e}(),io=-1,ao={0:0,1:1,9:9,99:99,150:150},ro=function(e,t){var n,o=t.isUH3,i=t.notifMenu,a=t.notifMenuOpener,r=t.notifDropdown,s=t.notifBadge,c=t.notifContainer,l=t.notifLabel;t.tooltipContainer&&(n=new oo(e,t.tooltipContainer));var u=G(),d=function(){i&&(i.checked=!1),null==r||r.classList.remove("ybarMenuOpen")},p=function(){var t;e.triggerEvent("close-all-menus"),!!document.querySelector(".display-push-promos .".concat(Jn))||(u.resetBadge(),s&&(o?null===(t=s.parentElement)||void 0===t||t.classList.remove(Kn):s.style.display="none"))},m=function(e){var t,n;0===io&&(null===(t=null==e?void 0:e.css)||void 0===t?void 0:t.length)&&e.css.length>0&&(io++,function(e){for(var t=function(e){var t=document.createElement("link");t.rel="stylesheet",t.type="text/css",t.href=e,document.getElementsByTagName("head")[0].appendChild(t)},n=0;n0&&s)if(o){var a,r=(a=e.newCount)>99;s.textContent=r?"99+":a+"",null===(n=s.parentElement)||void 0===n||n.classList.add(Kn)}else s.style.display="block"},f=function(){u.refreshPanel().then(m).then(te).catch((function(){}))};if(e.addEventListener("close-all-menus",(function(){ke(c)||d()})),c){f();var v=setInterval((function(){f()}),3e5);e.onDestroy((function(){clearInterval(v)})),o?l&&l.addEventListener("mouseenter",(function(){p(),null==n||n.show()})):c.addEventListener("mouseenter",(function(){p(),null==n||n.show()})),c.addEventListener("mouseleave",(function(){d(),null==n||n.hide()}))}e.addElementListener(i,"click",(function(){ee("ybar","notification","",{elm:"btn",elmt:"block"===(null==s?void 0:s.style.display)?"newalert":"",subsec:"notification",itc:"1"})})),a&&Se(e,a,"ybar","notification",{elm:"expand",subsec:"notifications",itc:"2"}),e.addElementListener(r,"focusin",(function(){i&&(i.checked=!0),null==r||r.classList.add("ybarMenuOpen")})),e.addElementListener(r,"focusout",d),e.addElementListener(t.tooltipContainer,"focusin",(function(){null==n||n.show()})),e.addElementListener(t.tooltipContainer,"focusout",(function(){null==n||n.hide()}));var y=e.getConfig().device,h=document.getElementById("ybar");h&&h.classList.contains("ybar-ytheme-crunch")&&(io=0);var b=new RegExp("[?&]notifications=1(&|#|$)");"desktop"===y&&i&&b.test(window.location.search)&&(i.checked=!0)};be("ybar-mod-notification",(function(e){var t={isUH3:"crunch"===e.getConfig().ytheme,notifContainer:document.getElementById("notification-container"),notifBadge:document.getElementById("notif-badge"),notifMenu:document.getElementById("ybarNotificationMenu"),notifMenuOpener:document.querySelector("#ybarNotificationMenu + label"),notifDropdown:document.getElementById("notifDropdownContainer"),tooltipContainer:document.querySelector(".".concat(Vn)),notifLabel:document.querySelector(".".concat($n))};t.notifDropdown&&ro(e,t)}))}()}};

    Investment Ideas

    Build Your Wealth

    View More

    More News