function callback(n,t,i){document.forms[0].year.value=n;document.forms[0].month.value=getMonthName(t+1);document.forms[0].day.value=i}function createClickFunction(n){function t(t){for(var e="currentselected",i=WP.Events.getThis(t),r,f,u;i.nodeName.toUpperCase()!=="TD";)i=i.parentNode;if(r=i.id||i.getAttribute("name"),r==="calnext")return _dateChooser.drawNextMonth(),WP.Events.cancelEvent(t),WP.Events.preventDefault(t),!1;if(r==="calprev")return _dateChooser.drawPreviousMonth(),WP.Events.cancelEvent(t),WP.Events.preventDefault(t),!1;if(r==="calcancel"){_dateChooser.clearCalendar();return}return f=r.replace("cal",""),u=makeDate(_dateChooser.year,_dateChooser.month+1,f),u.getMonth()!=_dateChooser.month?(_dateChooser.year=u.getFullYear(),_dateChooser.month=u.getMonth(),_dateChooser.date=u.getDate()):_dateChooser.date=f,$afe.select(".currentselected").removeClass(e),$afe.jq(i).addClass(e),n.call(_dateChooser,_dateChooser.year,_dateChooser.month,_dateChooser.date,_dateChooser.input),_dateChooser.clearCalendar(),WP.Events.cancelEvent(t),WP.Events.preventDefault(t),!1}return t}function DateChooser(n,t,i,r,u){var f=this;f.trigger=n;f.callback=t;f.input=u;f.filter=i||function(){return!0};r&&typeof r.getYear=="function"?f.today=r:typeof r=="string"?(f.today=new Date(r),isNaN(f.today)&&(f.today=new Date)):f.today=new Date;f.month=f.today.getMonth();f.year=f.today.getFullYear();f.date=f.today.getDate();f.calendar=null;f.clickFunction=createClickFunction(t)}function isInCalendar(n){for(var t=n,i=0;t&&i<8;t=t.parentNode,i++)if(t&&t.id&&t.id.toLowerCase()==="calendar")return!0;return!1}function lo(n){for(var t=WP.Events.getThis(n);t.nodeName.toUpperCase()!=="TD";)t=t.parentNode;$afe.jq(t).removeClass("hi")}function hi(n,t){return function(i){var r=WP.Events.getThis(i);if(t)while(r.nodeName.toUpperCase()!=="DIV")r=r.parentNode;else while(r.nodeName.toUpperCase()!=="TD")r=r.parentNode;$afe.jq(r).addClass("hi");(!$afe.jq(r).hasClass("ctrl")||n)&&_dateChooser.focusOn&&_dateChooser.focusOn!==r.id&&(document.getElementById(_dateChooser.focusOn)&&lo({target:document.getElementById(_dateChooser.focusOn),srcElement:document.getElementById(_dateChooser.focusOn)}),_dateChooser.focusOn=r.id)}}function restoreHi(n){var i=WP.Events.getThis(n),t;i&&i.className!=="calendar"&&!isInCalendar(i)&&(t="cal"+_dateChooser.date,_dateChooser.focusOn&&t!==_dateChooser.focusOn&&(_dateChooser.month===_dateChooser.today.getMonth()&&_dateChooser.year===_dateChooser.today.getFullYear()&&document.getElementById(t).firstChild.tagName?document.getElementById(t).firstChild.focus():(t=document.getElementById(_dateChooser.focusOn),t.firstChild&&t.firstChild.blur(),lo({target:t,srcElement:t}))))}function _removeCalendar(){var n=$afe.select("#calendar");n.length>0&&(WP.Events.removeListener(document.body,"click",removeCalendar),WP.Events.removeListener(document.body,"mouseover",restoreHi),accessibilityRestorePage(),n.remove(),_dateChooser=null)}function removeCalendar(n){var t=WP.Events.getThis(n);t&&t.className!=="calendar"&&!isInCalendar(t)&&_removeCalendar()}function removeCalendarExternal(){_removeCalendar()}function keyOnPrevMonth(n){var t;if(n.keyCode===9)return n.shiftKey?(t=document.getElementById("calcancel").firstChild,t&&t.nodeName.toUpperCase()==="BUTTON"?t.focus():document.getElementById("cal"+_dateChooser.lastDate).firstChild.focus(),WP.Events.preventDefault(n)):void 0;n.keyCode===13&&(_dateChooser.wasEnter=!0)}function keyOnNextMonth(n){var t;if(n.keyCode===9)return n.shiftKey&&(t=document.getElementById("calprev").firstChild,!t||t.nodeName.toUpperCase()!=="BUTTON")?(t=document.getElementById("calcancel").firstChild,t&&t.nodeName.toUpperCase()==="BUTTON"?t.focus():document.getElementById("cal"+_dateChooser.lastDate).firstChild.focus(),WP.Events.preventDefault(n)):void 0;n.keyCode===13&&(_dateChooser.wasEnter=!0)}function tabOnCancel(n){var t;if(n.keyCode===9)return n.shiftKey?void 0:(t=document.getElementById("calprev").firstChild,t&&t.nodeName.toUpperCase()==="BUTTON"?t.focus():(t=document.getElementById("calnext").firstChild,t&&t.nodeName.toUpperCase()==="BUTTON"?t.focus():document.getElementById("cal"+_dateChooser.firstDate).firstChild.focus()),WP.Events.preventDefault(n))}function HandleKeyUp(n){n.keyCode==keyCode.ESC&&(n.stopPropagation(),n.preventDefault(),_dateChooser.clearCalendar())}function HandleKeyDown(n){for(var i=!0,t=!1,r=document.activeElement,f,u;r.nodeName.toUpperCase()!=="TD";)r=r.parentNode;if(f=r.id||r.getAttribute("name"),r.className.indexOf("ctrl")<0){u=f.replace("cal","");switch(n.keyCode){case keyCode.RIGHT:moveFocusByDay(u,1);t=i;break;case keyCode.LEFT:moveFocusByDay(u,-1);t=i;break;case keyCode.DOWN:moveFocusByDay(u,7);t=i;break;case keyCode.UP:moveFocusByDay(u,-7);t=i;break;case keyCode.PAGEDOWN:moveFocusByMonth(u,1);t=i;break;case keyCode.PAGEUP:moveFocusByMonth(u,-1);t=i;break;case keyCode.HOME:moveFocusToFirstDayOfWeek(u);t=i;break;case keyCode.END:moveFocusToLastDayOfWeek(u);t=i;break;case keyCode.ESC:t=i}r=document.activeElement;_dateChooser!==null&&r.tabIndex=="0"&&(_dateChooser.focusOn=r.parentElement.id);t&&(n.stopPropagation(),n.preventDefault())}}function moveFocusToFirstDayOfWeek(n){var r=_dateChooser.year,u=_dateChooser.month,f=new Date(r,u,n),t=f.getDay()-getFirstDayOfWeek(),i;t=t<0?t+7:t;i=n-t;document.getElementById("cal"+i).firstChild.focus()}function moveFocusToLastDayOfWeek(n){var r=_dateChooser.year,u=_dateChooser.month,f=new Date(r,u,n),t=f.getDay()-getFirstDayOfWeek(),i;t=t<0?-1-t:6-t;i=parseInt(n)+t;document.getElementById("cal"+i).firstChild.focus()}function moveFocusByDay(n,t){var e=_dateChooser.year,o=_dateChooser.month,i=parseInt(n)+t,r=new Date(e,o,i),u=r.getMonth(),f=r.getFullYear();t>0&&(u>o||f>e)?hasSelectableDay(u,f)?_dateChooser.drawNextMonth(r.getDate()):_dateChooser.isDateDisplayed(i)&&document.getElementById("cal"+i).firstChild.focus():t<0&&(u _dateChooser.lastDateOfMonth?(i=i>_dateChooser.lastDateOfMonth?_dateChooser.lastDateOfMonth:i,document.getElementById("cal"+i).firstChild.focus()):hasSelectableDay(u+t,r)?t==1?_dateChooser.drawNextMonth(i):t==-1&&_dateChooser.drawPreviousMonth(i):Math.abs(t)==1&&(i=t===1?i+new Date(r,u+1,0).getDate():i-new Date(r,u,0).getDate(),_dateChooser.isDateDisplayed(i)&&document.getElementById("cal"+i).firstChild.focus())}function dfltClndrCallbackFactory(n){return function(t,i,r){var u=document.getElementById(n);u&&(u.holdErrors=!1,u.openingCalendar=!1,t&&!isNaN(i)&&i>-1&&i<12&&r&&(u.value=formatDate(new Date(t,i,r)),_dateChooser.today=parseDate(u.value,!0),WP.Events.fireEvent(u,"change"),u.focus()))}}function textBoxDataChooser(n,t,i,r){var s="function",u,h,f,e,o;f=document.getElementById(t);typeof r=="string"&&r.length>0?u=window[r](t):typeof r===s&&(u=r);typeof u!==s&&(u=dfltClndrCallbackFactory(t));o=$afe.jq(f).safeAttr("data-focus-dte");f.value!==""?e=parseDate(f.value,!0):typeof o!="undefined"&&(e=WP.Utils.dte2date(o));h=new DateChooser(n,u,WP.Validators.Calendar[i],e,f);h.drawCalendar()}function writeCalendar(n,t,i,r,u,f,e,o){var a="holdErrors",v="openingCalendar",y="DatePickerDescription",h=!1,p="@MYCHART@AssociatedLabelText@",c="UI.Calendar",s,l;typeof n=="string"&&(n=$afe.select("//www.cnctarh.com/mychart/MyChart/bundles/#"+n));s=$afe.jq(createElement("button","calendar datechooserAnchor"));$$WPUtil.IsNullOrEmpty(o)||s.safeAttr("id",o);s.safeAttr("type","button");l=$afe.select('label[for="'+n.attr("id")+'"]').text();$$WPUtil.IsNullOrEmpty(l)&&(l=$$WP.Strings.get("DefaultFieldDescription",c));$$WP.Strings.addMnemonic(p,l,h,c,$$WP.Strings.EncodingTypes.HTML);s.safeAttr("aria-label",$$WP.Strings.get(y,c));s.safeAppend($$WP.SimpleTemplates.Img({src:i,"aria-hidden":"true",focusable:"false",alt:$$WP.Strings.get(y,c)}));$$WP.Strings.removeMnemonic(p,c);t==="range"&&($$WPUtil.IsNullOrEmpty(r)||(window.cachedStartDate=WP.Utils.dte2date(r)),$$WPUtil.IsNullOrEmpty(u)||(window.cachedEndDate=WP.Utils.dte2date(u)));s.click(function(){return n.prop(v,!0),n.prop(a,h),textBoxDataChooser(s[0],n.prop("id"),t,f),h}).on("mousedown",function(){n.prop(a,!0)}).on("mouseout",function(){n.prop(a,h);n.prop(v,h)});s.safeInsertAfter(n)}function clearCalendarDateRange(){window.cachedStartDate=null;window.cachedEndDate=null}function hasSelectableDay(n,t){var r=1,i=makeDate(t,n+1,r);for(n=i.getMonth();i.getMonth()===n;){if(_dateChooser.filter(i.getFullYear(),i.getMonth(),r))return!0;i.setDate(++r)}return!1}function pageLo(n){for(var t=WP.Events.getThis(n);t.nodeName.toUpperCase()!=="DIV";)t=t.parentNode;$afe.jq(t).removeClass("hover")}function pageHi(){return function(n){for(var t=WP.Events.getThis(n);t.nodeName.toUpperCase()!=="DIV";)t=t.parentNode;$afe.jq(t).addClass("hover");_dateChooser.focusOn&&_dateChooser.focusOn!==t.id&&pageLo({target:document.getElementById(_dateChooser.focusOn),srcElement:document.getElementById(_dateChooser.focusOn)});_dateChooser.focusOn=t.id}}function pageCalendarEffects(){var r,t,i,n;if(r=document.getElementById("pagecalendar"),r!==null&&(_dateChooser=function(){},t=r.getElementsByTagName("div"),t!==null))for(i=0;i 0&&t.push(n[0])),t}var $$WPContain,$$WPPop,_dateChooser,keyCode,debug_clickedModel;$$WPComp.VB6Component=function(n){var t=this;n=n||{};t._componentClick=n._componentClick||function(){};t.Url=makeLink("inside.asp?mode="+(n.Mode||t.Mode)+"&co=true");t.DontSetH2AsTitle=n.DontSetH2AsTitle||!1;t.Components$ViewComponent(n)};$$WPComp.VB6Component.prototype={Mode:"",Class:"VB6Component",DontSetH2AsTitle:!1,html:function(n){var t=this,u=[],r,i;u=t.getInfoButtonData(n);n=t.cleanResponse(n);r=dangerou$.parseHtml("
"+n+"<\/div>");i=r.find("h2");t.DontSetH2AsTitle||i.length===1&&(t.setTitle(i.text(),t._Title.Buttons,t._Title.Image,t.IsClosable),i.remove());t.Components$ViewComponent$html(r.html());t.setInfoButtonData(u)},dispose:function(n){if(!this._isDisposed){var t=this.$container.find("form");t.each(function(){WP.Validators&&delete WP.Validators.Forms[this.id]});this.Components$ViewComponent$dispose(n)}},cleanResponse:function(n){var t=dangerou$.parseHtml(n);return t.find("#main").html()},getInfoButtonData:function(n){var t=8,f=0,i=0,r=[],u,e,o,s;do t=n.indexOf('type="text/javascript">var info = WP.Controls.InfoButton',f),f=n.indexOf("<\/script>",t),t!==-1&&(u=n.indexOf("HTMLUnencode",t),e=n.substring(t+82,u-4),o=n.indexOf('"), "popupparentdiv',t),s=n.substring(u+14,o),r[i]={},r[i].id=e,r[i].info=s,i=i+1);while(t!==-1);return r},setInfoButtonData:function(n){var t=0;if(n!==null&&n.length!==null){for(t=0;t 0)for(n=0;n ")+28;return t>27&&(n=n.substring(t,n.indexOf(" ",t))),n},$$WPUtil.ComponentFactory.vb6Mode("","widgetName=staticNews",n)};$$WPUtil.ComponentFactory.HomePage.alerts=function(n){return n=n||{},n.Class=n.Class||"",n.Class+=" Alerts",n.SupportAnimations=n.SupportAnimations!==!1,n.copy=n.copy||function(n){return n.Html=n.Html||this.$content.get(0).innerHTML,$$WPUtil.ComponentFactory.HomePage.alerts(n)},n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.html=n.html||function(n){var t=this,i,r,u;t.Components$VB6Component$html(n);t.$content.find("#alertspanel-autowaitlist").length>0||t.$content.find("#alertspanel-expiredautowaitlist").length>0?$$WPUtil.ComponentFactory.HomePage.AutoWaitList(0,null):t.$content.find("a").length===0&&t.$container.addClass("noinfo");i=t.$content.find("[data-alertid='alertspanel-notificationreview']");i.length>0&&(r=JSON.parse($(i[0]).html()),$$WPUtil.guaranteeExistence($$WP,"Preferences.NotificationsReviewAlertComponent"),u=new $$WP.Preferences.NotificationsReviewAlertComponent(r),$$WPUtil.ComponentFactory.HomePage.ShowNotificationAlertAsPopup(u),t.$content.find("#alerts div").length===1&&t.hide())},$$WPUtil.ComponentFactory.vb6Mode("","widgetName=alerts",n)};$$WPUtil.ComponentFactory.HomePage.ShowNotificationAlertAsPopup=function(n){var t=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:n,IsClosable:!n.Data.emailRequired,TitleText:null,Size:$$WPContain.Popup.SizeEnum.MEDIUM,Class:"notificationreview",BackButtonText:$$WP.Strings.get("AskLaterExitPopup","notifications.notificationalert")});n.show();t.show(!0);$$WP.FormValidation.initializeDOMSubtree($afe.select("#updateform"));setupButtoncheck()};$$WPUtil.guaranteeExistence($$WPUtil,"ComponentFactory.Clinical");$$WPUtil.ComponentFactory.Clinical.goals=function(n){var t="",r,u,i;return n=n||{},n.DontSetH2AsTitle=!0,n.Class=n.Class||t,n.Class+=" goalsvb6",n.SupportAnimations=n.SupportAnimations!==!1,i=n.RegistryID||t,u="section=1&widgetMode=1®istryid="+i,r=i===t?"goalsreview":"mycondition",n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.html=n.html||function(i){var e="showing_clicked_goal_details",u="Clinical.Goals",r=this,o,s,h,c,l,a,v=0,f,y,p,w,b,k,d;r.Components$VB6Component$html(i);s=$$WP.Strings.getForTemplate("graphlabel",u);h=$$WP.Strings.getForTemplate("tablelabel",u);c=new $$WPComp.ComplexObjects.Button(s,t,"graphButton selected","graph");l=new $$WPComp.ComplexObjects.Button(h,t,"tableButton","table");a=[c,l];y=new $$WPComp.ComplexObjects.ButtonBar(t,t,"goaltitle",t,t);w=new $$WPComp.ComplexObjects.ButtonBar(t,t,"goalrecentvalue",t,t);k=new $$WPComp.ComplexObjects.ButtonBar(t,t,"goalbuttonlist",$$WPUtil.copyObject(a),$$WPComp.TITLEBARIDENTIFIER);p=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,y);b=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,w);d=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,k);r.$content.safePrepend(d);r.$content.safePrepend(b);r.$content.safePrepend(p);f=$$WP.SimpleTemplates.Anchor({href:"//www.cnctarh.com/mychart/MyChart/bundles/#","class":"focusanchor",name:"goalmaintop",title:$$WP.Strings.get(e,u)});$$WP.Strings.setDisplayText(f,e,u);r.$content.safePrepend(f);loadGraphs();v=n._selectedIndex||0;o=$afe.select(".goalslarge .goalslist").find("[data-index='"+v+"']").safeAttr("id");n._showSelectedGoalGraph(o)},n._componentClick=function(t){return n._switchTableGraph(t),!1},$$WPUtil.ComponentFactory.vb6Mode(r,u,n)};$$WPUtil.ComponentFactory.Clinical.TestResultDetails=function(n){n=n||{};n.DontSetH2AsTitle=!0;n.Class=n.Class||"";n.SupportAnimations=n.SupportAnimations!==!1;var t,i=n.RegistryID||"";return n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.Components$VB6Component$cleanResponse=$$WPComp.VB6Component.prototype.cleanResponse,n.cleanResponse=function(n){var u;n=this.Components$VB6Component$cleanResponse(n);var t=dangerou$.parseHtml(n),r=t.filter(".title"),f=t.filter(".cptLink"),i=t.filter(".tabcontainer");return i.removeClass("tabcontainer"),r.find("div#assistiveicons").remove(),i.find(".navparent").remove(),u=$afe.jq(document.createElement("div")).safeAppend(r).safeAppend(f).safeAppend(i),u.html()},$$WPUtil.ComponentFactory.vb6Mode("labdetail",t,n)};$$WPComp.TemplateComponent=function(n){this.Components$Component(n)};$$WPComp.TemplateComponent.prototype={Url:makeLink(""),Data:{},template:function(){console.error("Descendents of TemplateComponent must implement the template property (or pass it in the settings bag).")},setData:function(n){n=n||{};n.ComponentNumber=this.ComponentNumber;this.Data=n;this.refresh()},refresh:function(){var n=this,t=Array.isArray(n.Data)?{dataElement:n.Data}:n.Data;try{n.html(n.template(t).trim())}catch(i){throw"Failed to execute the template for component"+n.ComponentNumber;}},copy:function(n){return n=n||{},n.Data=this.Data,this.Components$Component$copy(n)},show:function(){var n=this;n._shownOnce||n._isDisposed||n.setData(n.Data);n.Components$Component$show()},load:function(n,t,i,r){return this.makeRequest({success:this.setData,dataType:"json",data:r,type:"POST",url:n||this.Url},i||"load",t)}};$$WPComp.TemplateComponent.extend("Components.Component");$$WPComp.InlineLoadingComponent=function(n){this.Components$TemplateComponent(n);this.addEventListener("resize",this._resize)};$$WPComp.InlineLoadingComponent.prototype={CommunicationsIndicator:!1,$PermanentParent:null,template:$$WP.Templates.Core.loading,Data:{PrimaryMessage:$$WP.Strings.getForTemplate("GenericLoadingMessage","Global"),ExtraMessage:""},IsClosable:!1,TitleText:null,ToolbarButtons:null,Class:"inlineloading",show:function(n){var t=this;n=t.$PermanentParent||n;t.$container.parent().length===0&&t.$container.safeInsertBefore(n.children(".content"));t.Components$TemplateComponent$show()},_resize:function(){return!1}};$$WPComp.InlineLoadingComponent.extend("Components.TemplateComponent");$$WPComp.InlineLoadingComponentWithSources=function(n){var t=this;t.Components$TemplateComponent(n);t.AreaName!==null&&(t.Url=makeLink("Loading/GetStatus?AreaName="+t.AreaName));t.addEventListener("resize",t._resize);$$WP.CommunityUtilities.hasCommunityLinks()||(t.Url="")};$$WPComp.InlineLoadingComponentWithSources.prototype={CommunicationsIndicator:!1,$PermanentParent:null,Url:makeLink("Loading/GetStatus"),template:$$WP.Templates.Core.loading,IsClosable:!1,TitleText:null,ToolbarButtons:null,Class:"inlineloading withsources",stopGetStatus:!1,AreaName:null,statusIsCount:!1,setData:function(n){n.DataFromMultipleSources=!0;this.Components$TemplateComponent$setData(n);this.success(n)},success:function(n){var s="@MYCHART@TOTALORGS@",h="@MYCHART@LOADEDORGS@",c="CommunityLoadingStatus",t=this,r,o,l,u,f,e,i;if($$WP.Strings.setDefaultNamespace("community.externaljump"),r=0,u="",$$WP.CommunityUtilities.hasCommunityLinks()){if(n&&n.Organizations&&n.Organizations.length>0&&!t.stopGetStatus){for(f=0;f 0){if(i=o.find("> .content"),$$WP.Utilities.isBrowserCapableOf("touchEvents")&&i.css(u)==="none"){n.closest(s).css(r,"");n.css(r,"100vh");return}f=$afe.select("body").hasClass("scrollDisabled")&&i.css(u)!=="none"?$$WPUtil.cssValueToPixels(i.css(u)):i.height();typeof f=="undefined"||isDataTile()||(t=f-h-5)}t<150&&(t=150);n.css(r,t+"px");n.closest(s).css(r,t+"px")}},showBrowserUnSupportedMessage:function(){var u="UnSupportedBtnText",f=".browsersupport",n="community.externaljump",t="UnSupportedMessage",i,r;i=$$WP.SimpleTemplates.Div({id:t},null);$$WP.Strings.setDisplayText(i,t,n);this.$content.find(f).safeAppend(i);r=$$WP.SimpleTemplates.Anchor({href:"//www.cnctarh.com/mychart/MyChart/bundles/#","data-id":"unsupportedbrowserlink","class":"button completeworkflow autowidth",title:$$WP.Strings.get(u,n),"aria-describedby":t});$$WP.Strings.setDisplayText(r,u,n);this.$content.find(f).safeAppend(r)},failure:function(){this.Data.ErrorMessage=$$WP.Strings.getForTemplate("WidgetErrorMessage");this.refresh()},updateData:function(n){var i="community.externaljump",t=this;n&&n.Organization&&(t.Data.OrganizationLogo=n.Organization.LogoUrl,t.Data.OrganizationName=n.Organization.OrganizationName,$$WP.Strings.setOrganization(n.Organization,i),t.Data.LoadingStatus=$$WP.Strings.getForTemplate("DeepLinkPopupLoadingMessage",i),t.Data.IframeTitle=$$WP.Strings.getForTemplate("IframeTitle",i),$$WP.Strings.clearOrganization(),t.Data.Address=n.Organization.Address,t.Data.Contact=n.Organization.ContactInformation,t.Data.Contact===null&&(t.Data.contactInfoClass="nocontact"))},msgListener:function(n){var t=this,i,r;if(n&&n.originalEvent&&n.originalEvent.data){if(i=JSON.parse(n.originalEvent.data),!i)return;if(i.message==="cookieFlag"&&!i.canSetCookies){t.hideLoadingIndicator();$afe.select("//www.cnctarh.com/mychart/MyChart/bundles/#"+t.ExternalJumpIframeId).remove();t.showBrowserUnSupportedMessage();return}i.externalGUID===$$WP.CommunityUtilities.getExternalJumpGUID()&&t&&(i.message==="closePopup"?(t.ContainerComponent&&t.ContainerComponent._oldDispose(),t&&t._disposeTimeout&&clearTimeout(t._disposeTimeout)):i.message==="isValidContext"?t.ExternalJumpIframe&&t.ExternalJumpIframe.contentWindow&&(r={},r.message="valid",t.ExternalJumpIframe.contentWindow.postMessage(JSON.stringify(r),"*")):i.message==="setActivity"&&$$WPUtil.setActivity())}},_clickEvent:function(n){var i="externalJumpWindow",r="scrollbars=1,resizable=1",t=this;return n?n.dataId==="unsupportedbrowserlink"&&t.ResponseObject!==null&&!$$WPUtil.IsNullOrEmpty(t.ResponseObject.RedirectURL)?(t.ResponseObject.IsSSOPost?(t.NewWindowReference=openWindow("","",r,i,!0),$$WPUtil.postForm(t.ResponseObject.RedirectURL,t.ResponseObject.SSOParams,t.NewWindowReference.name)):(t.ResponseObject.RedirectURL=t.ResponseObject.RedirectURL+"&co=true",t.NewWindowReference=openWindow(t.ResponseObject.RedirectURL,"",r,i,!0)),!1):void 0:!0},_popupDispose:function(){var n=this,t;n&&((n.ExternalJumpIframe&&n.ExternalJumpIframe.contentWindow||n.NewWindowReference!==null&&!n.NewWindowReference.closed)&&(t={},t.message="logout",n.NewWindowReference!==null?n.NewWindowReference.window.postMessage(JSON.stringify(t),"*"):n.ExternalJumpIframe.contentWindow.postMessage(JSON.stringify(t),"*")),n.ContainerComponent.hide(),n._disposeTimeout=setTimeout($.proxy(function(){var n=this;n.NewWindowReference===null||n.NewWindowReference.closed||closeAllWindows("externalJumpWindow");n.ContainerComponent&&n.ContainerComponent._oldDispose()},n),500))},dispose:function(){var n=this;$afe.jq(window).off("message."+n.ComponentNumber,n.windowMsgListener);$afe.jq(window).off("resize orientationchange","",$.proxy(n._resizeIframe,n));n.ResponseObject!==null&&n.RefreshCommunityTokenOnClose&&$$WP.CommunityUtilities.refreshCommunityLink(n.ResponseObject.Organization.OrganizationId);n.runCallback(n.callback);n.Components$Component$dispose()},runCallback:function(n){n&&this.context&&typeof n=="function"&&n.apply(this.context)}};$$WPComp.ExternalJumpPopupComponent.extend("Components.TemplateComponent");$$WPComp.ConfirmComponent=function(n){var t=this;$$WPComp.applySettings(n,t);typeof t.callback!="function"&&console.error("A callback function is required for Confirm");t.Components$Component({});t.CallbackContext=t.CallbackContext||t;t.addEventListener("click",t._clickToolbar)};$$WPComp.ConfirmComponent.prototype={AffirmButtonIndex:0,_clickToolbar:function(n){var t=this;if(n.dataId)return t.callback.apply(t.CallbackContext,[$$WPComp.TOOLBARIDENTIFIER+t.AffirmButtonIndex===n.dataId]),t.dispose(!0),!1}};$$WPComp.ConfirmComponent.extend("Components.Component");$$WPUtil.guaranteeExistence($$WP,"Containers");$$WPContain=$$WP.Containers;$$WPContain.ContainerComponent=function(n){var t=this;t._Components=[];t.Components$Component(n);t.Components&&(Array.isArray(t.Components)?t.addComponent(t.Components):t.setSingleComponent(t.Components),delete t.Components)};$$WPContain.ContainerComponent.prototype={Class:"container",Events:["dispose","resize"],_Components:[],IsClosable:!0,hasComponents:function(){return this._Components&&this._Components.length>0},show:function(n){var t=this,i;if(t._visible!==!0){if($$WP.Debug.UpdateTopMarginForBanners(),n&&t.hasComponents())for(i=0;i -1;r--)if(i._Components[r].ComponentNumber===u)break;n=i._Components[r];n&&n.ComponentNumber===u&&(t!==!0&&n.dispose(),n.$container.remove(),n.ContainerComponent=null,n.isVisible=n._isVisibleOld,delete n._isVisibleOld,i._Components=i._Components.slice(0,r-1).concat(i._Components.slice(r+1,i._Components.length-1)))},clearComponents:function(n){for(var t=this;t._Components.length;)t.removeComponent(t._Components[t._Components.length-1].ComponentNumber,n);t._Components=[]},setSingleComponent:function(n){if(!$$WPComp.isComponent(n)){console.error("setSingleComponent called with something that isn't a component");return}this.addComponent(n);this.setTitle(n.TitleText,n.TitleButtons,n.TitleImage,n.IsClosable);n.setTitle(null,null,null,!1)},dispose:function(n){var t=this;t._isDisposed||(t.clearComponents(),t.Components$Component$dispose(n),t._ContentGeneratedOnce=!1)},html:function(){console.error("You cannot directly set the HTML of a container.")},copy:function(n,t){var i,r;for(n=n||{},n.Components=n.Components||[],r=this._Components.length,i=0;i 0?o=(r.height()-i.outerHeight())/2-y:(this._IsWindowScrollDisabled=!1,$afe.select("body").removeClass("scrollDisabled"))):(f.y<0&&(f.y=0),o=c+(r.height()-i.outerHeight())/2-f.y);o==undefined&&(o=0);u=Math.max(c+35,o);h=window.frameElement;isDataTile()&&h!=null&&(i.hasClass("small")?(u=$$WPUtil.getDataTileScrollTop(h)+35,a=u+i.outerHeight()-h.scrollHeight,a>0&&(u=u-a)):u=0);s=l+(r.width()-i.outerWidth())/2-f.x;s<0&&(s=0);$afe.select("html").hasClass("mobile")&&r.scrollTop(0);i.css({top:u+"px",left:s+"px",right:s+"px"})},InsideNearTop:function(n,t){var u,s,e,i=n.data,f,o,r,h;typeof i=="number"&&(i=$$WPComp.Instances[i]);e=i.$container;u=$afe.jq(window);s=$$WPContain.Positions.getOffset.apply(i,[t]);f=$afe.select("#header").outerHeight()||null;$afe.select("body").hasClass("scrollDisabled")?(h=$$WPUtil.cssValueToPixels($afe.select("body").css("margin-top")),o=f-h+10+"px"):o=$afe.select("html").hasClass("mobile")?f+10+"px":f+$$WPUtil.getScrollTop()+10+"px";scrollLeft=$$WPUtil.getScrollLeft();window.visualViewport&&Math.round(window.visualViewport.width)!==u.innerWidth()&&(scrollLeft=0);r=scrollLeft+(u.width()-e.outerWidth())/2-s.x;r<0&&(r=0);$afe.select("html").hasClass("mobile")&&u.scrollTop(0);e.css({left:r,top:o,right:r})},getOffset:function(n){var t=this,i,r,u,f;return(!t.origOffset||n)&&(t.$container.css({position:"absolute",top:0,left:0,right:0}),i=t.$container.offset(),r=$afe.select("html").safeAttr("dir")==="rtl",r?(u=$afe.jq(window).width(),f=t.$container.outerWidth(),t.origOffset={x:u-(i.left+f),y:i.top}):t.origOffset={x:i.left,y:i.top}),t.origOffset}};$$WPUtil.guaranteeExistence($$WP,"Popups");$$WPUtil.guaranteeExistence($$WP,"Utilities.UI");$$WPPop=$$WP.Popups;$$WPContain.Popup=function(n){var t=this;$$WPComp.applySettings(n,t);switch(t.Size){case $$WPContain.Popup.SizeEnum.SMALL:t.Class+=" small";break;case $$WPContain.Popup.SizeEnum.MEDIUM:t.Class+=" medium";break;case $$WPContain.Popup.SizeEnum.LARGE:t.Class+=" large"}t.positioningFunction===null&&(t.positioningFunction=$$WPContain.Positions.InsideCentered);t.$parent=$afe.select("#classicPopupRoot");t.$parent=t.$parent&&t.$parent.length>0?t.$parent:$afe.jq(document.body);t._shouldOverrideMobileBack()&&(Array.isArray(t.Components)?t.Components.forEach(function(n){n.IsClosable=!1}):t.Components.IsClosable=!1);t.Containers$ContainerComponent({});t.addEventListener("resize",t._resizePopup);t.addEventListener("click",t._clickPopup);t.addEventListener("keydown",t._keydownPopup);t.addEventListener("fullscreenchange",t._adjustFullscreen);t.GetInvisibleLastFocusAnchor&&t.addEventListener("keyup",t._keyupPopup);$$WP.Utilities.UI.IsMobile&&t.addEventListener("focusout",t._onMobileFocusOut);t.HasBackButton!==!1&&(t.HasBackButton||isDataTile()&&t.IsClosable&&t.Size!=$$WPContain.Popup.SizeEnum.SMALL)&&(t.BackButtonText===""&&(t.BackButtonText=$$WP.Strings.get("PopupBackToPreviousPageButton",t.StringsNamespace)),t.ToolbarButtons===null&&(t.ToolbarButtons=[]),t.ToolbarButtons.push(new $$WPComp.ComplexObjects.Button(t.BackButtonText,null,"secondary neutral previouspage","close",t.BackButtonText)))};$$WPContain.Popup.SizeEnum={SMALL:1,MEDIUM:2,LARGE:3,AUTO:4};$$WPContain.Popup.__zIndex=0;$$WPContain.Popup.prototype={ToolbarButtons:null,HasOverlay:!0,IsClosable:!0,Class:"Popup",positioningFunction:$$WPContain.Positions.InsideCentered,Size:$$WPContain.Popup.SizeEnum.SMALL,_IsWindowScrollDisabled:!1,_ScrollBarPosition:0,_ScrollBarLeft:0,_IsScrollBarDisabledWhenOpened:!1,_InitialBodyMarginTop:0,_InitialBodyMarginLeft:0,$parent:$afe.select("body"),HasBackButton:null,BackButtonText:"",GetLastFocus:null,MonitorAriaLiveContent:!0,OnCloseCallback:null,_MinContentHeight:null,AriaLabelledByID:"",AriaDescribedByID:"",PierceShieldOfJustice:!1,CanResetFocusOnKeydown:!1,GetInvisibleLastFocusAnchor:null,_componentsHaveTitleText:function(){var t=!0,n=this;if(n.TitleText&&n.TitleText.string&&!$$WP.Utilities.IsNullOrEmpty(n.TitleText.string)||n._Title&&n._Title.Text&&!$$WP.Utilities.IsNullOrEmpty(n._Title.Text))return t;for(i=0;i 0&&(t.MonitorAriaLiveContent=!1),t.$container.safeAttr("role","dialog"),t.$container.safeAttr("aria-modal","true"),t._ScrollBarPosition=$$WPUtil.getScrollTop(),t._ScrollBarLeft=$$WPUtil.getScrollLeft(),t._IsScrollBarDisabledWhenOpened=$afe.select(u).hasClass("scrollDisabled"),t._IsScrollBarDisabledWhenOpened&&(t._InitialBodyMarginTop=$afe.select(u).css("margin-top"),t._InitialBodyMarginLeft=$afe.select(u).css("margin-left")),t.setAppropriateScrollBar(),$$WP.Debug.UpdateTopMarginForBanners(),t.HasOverlay)t._overlay.on(!t.IsClosable,t);if(t.Containers$ContainerComponent$show(n),f=$afe.select("#popupCloseAction"),f)f.on("click","",t.ComponentNumber,t._closePopup);t._supportsAriaDescription()&&(t.AriaDescribedByID.length>0?t.$container.safeAttr(h,t.AriaDescribedByID):(r=t.AriaDescriptionComponentNumber>-1?t.AriaDescriptionComponentNumber:t.ComponentNumber,t.AriaDescribedByID="popupdescription"+r,t.$container.safeAttr(h,t.AriaDescribedByID)),t.MonitorAriaLiveContent=!1);t._supportsAriaLabel()&&(t.AriaLabelledByID.length>0?t.$container.safeAttr(s,t.AriaLabelledByID):(r=t.AriaLabelComponentNumber>-1?t.AriaLabelComponentNumber:t.ComponentNumber,t.AriaLabelledByID="popuplabel"+r,t.$container.safeAttr(s,t.AriaLabelledByID)));t.MonitorAriaLiveContent&&(t.$container.safeAttr("aria-live","polite"),t.$container.safeAttr("aria-relevant","additions"));t.setFocus();t.focus();$afe.jq(window).on("resize orientationchange","",t.ComponentNumber,t.__windowResize);if(t._shouldOverrideMobileBack()){c=t._getMobileBackEvents();t.$container.data(o,[]);c.forEach(function(n){this.$container.data(o).push(n)},t);$afe.jq(window).off(e);$afe.jq(window).on(e,"",t.ComponentNumber,t.__mobileBack)}if(t.__otherPopupsExist()&&(t.__setAriaHiddenPreviousPopupContent(i),popupAlert=t._createPopupAlert(),t.$container.safePrepend(popupAlert),t.focus(),popupAlert.setAttribute("tabindex","-1")),t._MinContentHeight=$$WPUtil.cssValueToPixels(t.$content.css("min-height")),t.setAppropriateContentHeight(),isDataTile()&&t.Size!==$$WPContain.Popup.SizeEnum.SMALL)try{window.history.pushState(null,null,location.href);scrollTopOfTheIframe(0,i)}catch(l){$$WP.Debug.log("Cannot add Push state as the parent domain is not accessible")}}},setAppropriateScrollBar:function(){var f="scrollDisabled",t=this,n=$afe.select("body"),i=$afe.jq(window),r=$afe.select("#header"),e,o,c,s;if(e=i.width(),o=i.height(),c=$$WPUtil.cssValueToPixels(n.css("min-width")),s=t.$container.outerHeight()+t.$container.offset().top<=o&&t.$container.outerWidth()<=e,!isDataTile()&&s){var h=$$WPUtil.getScrollTop(),l=$$WPUtil.getScrollLeft(),u=r.hasClass("compact");t._IsWindowScrollDisabled=!0;h>75&&(u||r.hasClass("static")||(r.addClass("compact"),i.trigger("compactHeader"),u=!0));t._IsScrollBarDisabledWhenOpened||(n.css({"margin-top":"-"+h+"px"}),n.css({"margin-left":"-"+l+"px"}),n.addClass(f),$$WP.Utilities.UI.EnforceEpicLogoVisibility(!u))}else t._IsWindowScrollDisabled=!1,n.css({"margin-top":""}),n.css({"margin-left":""}),n.removeClass(f)},setAppropriateContentHeight:function(){var o="> .content",s="undefined",i=this,t,h=$afe.select("#header").outerHeight(),r,u,c,n,f,e;i._IsWindowScrollDisabled?(r=$afe.jq(window).innerHeight(),u=$afe.select(".Popup > .titlebar").outerHeight(),e=$afe.select(".Popup > .toolbar").outerHeight(),t=r-2*h-e-u,c=i.$content.contentHeight(),n=i._MinContentHeight,f=r-h-e-u-10,typeof n!==s&&n>f&&(n=f),typeof n!==s&&n>t&&(t=n),t<150&&(t=150),i.$container.find(o).css({"max-height":t+"px","overflow-y":"auto","min-height":n+"px"})):i.$container.find(o).css({"max-height":"","overflow-y":"visible"})},setFocus:function(){var n=this;try{n.firstFocus=WP.DOM.Search.getNextFocusable(n.$container.get(0))}catch(t){}try{n.lastFocus=n.GetLastFocus!==null?n.GetLastFocus(n.$container.get(0)):WP.DOM.Search.getLastFocusable(n.$container.get(0))}catch(i){}n.isFirstFocus=!1},__focus:function(){var t=this,n;try{n=Array.isArray(t._Components)?t.__findFirstFocusableContent(t._Components,0):WP.DOM.Search.getNextFocusable(t._Components.$content);n||(n=WP.DOM.Search.getNextFocusable(t.$container.get(0)),n.id==="skipToMain"&&(n=WP.DOM.Search.getNextFocusable(n)));t.PierceShieldOfJustice&&n.setAttribute("data-pierce-shield","true");n.focus()}catch(i){}},__windowResize:function(n){var t=$$WPComp.getInstance(n.data);t&&(t._IsWindowScrollDisabled=!1,t.setAppropriateScrollBar(),t.$container.trigger("resize"))},hide:function(n){var u="mobile_back",i=!1,t=this,f,r;if(t._visible!==i){t.__otherPopupsExist()?t.__setAriaHiddenPreviousPopupContent(i):t.__setAriaHidden(i);t.Containers$ContainerComponent$hide(n);t._visible=i;t._IsScrollBarDisabledWhenOpened?$afe.select("body").css({"margin-top":t._InitialBodyMarginTop,"margin-left":t._InitialBodyMarginLeft}):$afe.select("body").css({"margin-top":"","margin-left":""}).removeClass("scrollDisabled");t._IsWindowScrollDisabled=i;t.HasOverlay&&t._overlay.off(!t.IsClosable,t);try{f=isDataTile()&&window.frameElement!=null;t.FocusOnClose.focus({preventScroll:f})}catch(e){}t._ScrollBarPosition&&$$WPUtil.setScrollTop(t._ScrollBarPosition);t._ScrollBarLeft&&$$WPUtil.setScrollLeft(t._ScrollBarLeft);$afe.select(".Popup.component").length===1&&$afe.jq(window).off("resize orientationchange","",t.__windowResize);t._shouldOverrideMobileBack()&&(r=t.$container.data("_cachedWindowEvents"),r&&($afe.jq(window).off(u),r.forEach(function(n){$afe.jq(window).on(u,n.selector,n.data,n.handler)})));typeof t.OnCloseCallback=="function"&&t.OnCloseCallback()}},reposition:function(n){var i="opacity",t=this,r;if(t.$container.parent().length!==0){r=t.$container.css(i);t.$container.css(i,0);try{t.positioningFunction({data:t},n)}catch(u){throw"repositioning error";}t.$container.css(i,r)}},setTitle:function(n,t,i,r){var f="clearlabel",u=this,e;n||t&&t.length!==0||r?u.$container.removeClass("notitle"):(e=!0,t=[new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("JumpToContent","Core.Popup"),null,f,"jumptocontent")],u.$container.addClass("notitle"));u.Containers$ContainerComponent$setTitle(n,t,i,r);e&&u.$title.addClass(f)},_resizePopup:function(){var n=this;return n.isVisible()?(n.reposition(!0),n.setAppropriateContentHeight(),n.setFocus(),!1):!1},_clickPopup:function(n){return n.dataId===$$WPComp.TITLEBARIDENTIFIER+"jumptocontent"?(this.focus(!0),!1):n.dataId==="focusanchor"?!1:void 0},_adjustFullscreen:function(){$afe.select("body").css("margin-left","-"+this._ScrollBarLeft+"px");this.reposition(!0)},_onMobileFocusOut:function(n){n.relatedTarget||$afe.jq(window).scrollTop(0)},_keydownPopup:function(n){var i=!1,t=this,u,r;if(t.canResetFocusOnKeydown&&t.setFocus(),u=$afe.select(".infoBubbleWrapper.hover").length>0,n.keyCode===27&&t.IsClosable&&!u&&t.dispose(i),n.keyCode===9)return n.target!==t.firstFocus&&n.target!==t.lastFocus?t.isFirstFocus?(r=n.shiftKey?t.lastFocus:t.firstFocus,r&&r.focus(),delete t.isFirstFocus,i):void 0:n.shiftKey&&n.target===t.firstFocus?(t.lastFocus&&t.lastFocus.focus(),t.isFirstFocus&&delete t.isFirstFocus,i):!n.shiftKey&&n.target===t.lastFocus?(t.firstFocus&&t.firstFocus.focus(),t.isFirstFocus&&delete t.isFirstFocus,i):void 0},_keyupPopup:function(n){var t=this,i=t.GetInvisibleLastFocusAnchor(t.$container.get(0));if(i){if(!n.shiftKey&&n.target===i)return i===t.lastFocus?(t.firstFocus&&t.firstFocus.focus(),t.isFirstFocus&&delete t.isFirstFocus):WP.DOM.Search.getNextFocusable(i).focus(),!1;n.shiftKey&&n.target===i&&WP.DOM.Search.getPreviousFocusable(i).focus()}},__mobileBack:function(n){var t=$$WPComp.getInstance(n.data);t&&t.dispose()},_shouldOverrideMobileBack:function(){if(!$$WP.Utilities.UI.IsMobile||this.Size!==$$WPContain.Popup.SizeEnum.MEDIUM&&this.Size!==$$WPContain.Popup.SizeEnum.LARGE||isDataTile())return!1;var n=this._getMobileBackEvents();return n&&n.length>0},_getMobileBackEvents:function(){var n=$._data(window,"events");return n?n.mobile_back:null},_overlay:{on:function(n,t){var r,i;if(i=$afe.select("#classicPopupRoot"),i=i&&i.length>0?i:$afe.select("body"),i=i&&i.length>0?i:$afe.select("#datatile"),$$WPContain.Popup.__zIndex+=3,r=3e3+$$WPContain.Popup.__zIndex,t.$overlay=$afe.renderTemplate($$WP.Templates.Core.overlay,{}),i.safeAppend(t.$overlay),t.$overlay.show(),t.$overlay.css("z-index",r),t.$container.css("z-index",r+1),$$WP.Utilities.UI.PDF&&$$WP.Utilities.UI.PDF.needIframeShim()&&$$WP.Utilities.UI.PDF.pageHasEmbeddedPdf()&&$$WP.Utilities.UI.PDF.hidePdfs(),!n)t.$overlay.on("click","",t.ComponentNumber,t._overlay._overlayClick)},off:function(n,t){var i;n||t.$overlay.off("click","",t._overlay._overlayClick);t.$overlay.remove();i=$afe.select(".lb_overlay:visible").length;$$WP.Utilities.UI.PDF&&$$WP.Utilities.UI.PDF.needIframeShim()&&$$WP.Utilities.UI.PDF.pageHasEmbeddedPdf()&&i==0&&$$WP.Utilities.UI.PDF.showPdfs()},_overlayClick:function(n){var t=$$WPComp.getInstance(n.data);return t&&t.dispose(),$$WPUtil.preventEvent(n)}},__setAriaHidden:function(n){var t=this.__getPageElementsForAria();for(i=0;i 1},__getAllPopups:function(){var n=[],t=[],r=0;for(n=document.querySelectorAll("div[data-component-id]"),i=0;i =n.length?null:(r=n[t].$content,!r)?this.__findFirstFocusableContent(n,++t):(i=WP.DOM.Search.getNextFocusable(r.get(0)),i===null||i.id==="popupCloseAction"||i.tagName.toUpperCase()==="OBJECT"||!this.$container.get(0).contains(i)?this.__findFirstFocusableContent(n,++t):i)},focus:function(){try{this.FocusOnClose===null&&(this.FocusOnClose=WP.DOM.Search.getFocused(document.body))}catch(n){}try{this.__focus()}catch(t){}},_supportsAriaDescription:function(){var n=this;if(n.SupportsAriaDescription)return!0;for(i=0;i = 4.0.0"],main:function(r,f,e,o,s,h,c){var a,l;return'
'+((a=e[i].call(f!=n?f:r.nullContext||{},f!=n?f.IsPrevEnabled:f,{name:i,hash:{},fn:r.program(1,s,0,h,c),inverse:r.program(3,s,0,h,c),data:s}))!=n?a:"")+' "+((a=e.each.call(f!=n?f:r.nullContext||{},f!=n?f.Days:f,{name:"each",hash:{},fn:r.program(7,s,0,h,c),inverse:r.noop,data:s}))!=n?a:"")+"<\/tr><\/thead>"+r.escapeExpression((e.$$WP$Components$Calendar$getCalendarObject||f&&f.$$WP$Components$Calendar$getCalendarObject||e.helperMissing).call(f!=n?f:r.nullContext||{},f!=n?f.ComponentNumber:f,{name:"$$WP$Components$Calendar$getCalendarObject",hash:{},data:s}))+"<\/table><\/div> "},"1":function(i,r,s,h,c){var a="PrevTitle",v,l;return'
'+r.escapeExpression((l=(l=e.Title||(f!=n?f.Title:f))!=n?l:e.helperMissing,typeof l===t?l.call(f!=n?f:r.nullContext||{},{name:"Title",hash:{},data:s}):l))+"<\/th>"+((a=e[i].call(f!=n?f:r.nullContext||{},f!=n?f.IsNextEnabled:f,{name:i,hash:{},fn:r.program(5,s,0,h,c),inverse:r.program(3,s,0,h,c),data:s}))!=n?a:"")+"<\/tr>
<\/th>"},"5":function(i,r,s,h,c){var a="NextTitle",v,l;return' "+((h=t.lambda(r,r))!=n?h:"")+"<\/th>"},"8":function(){return' aria-hidden="true"'},useData:!0,useDepths:!0})}();$$WPUtil.guaranteeExistence($$WP,"Components");$$WP.Components.Calendar=function(n){var r=!0,h="PrevButton",c="NextButton",l="HoverTextDisabled",a="UI.Calendar",v="HoverText",u="Global.Calendar",y="undefined",t=this,e,o,s,p,f,i;for(typeof $$WP!==y&&typeof $$WP.Strings!==y&&($$WP.Strings.setDefaultNamespace(u),$$WP.Strings.add("CalendarMonthTitleFormat","Jan"),$$WP.Strings.add("CalendarAudibleDate","_STR_AudibleDate_"),$$WP.Strings.add(v,$$WP.Strings.get("SelectTooltip",a)),$$WP.Strings.add(l,$$WP.Strings.get("NotAvailableTooltip",a)),$$WP.Strings.add(c,""),$$WP.Strings.add(h,""),$$WP.Strings.clearDefaultNamespace()),t.onSelect=n.onSelect||function(){},t.TitleText=n.TitleText||"",t.Image=n.Image||"",t.filter=n.filter||function(){return r},t.FromDTE=n.FromDTE,t.ToDTE=n.ToDTE,t.callback=n.callback||function(){},t.SelectedDate=n.SelectedDate,t.HighlightDays=n.HighlightDays||[],t.HasSelectableDays=n.HasSelectableDays===r,t._calendarMouseover=n._calendarMouseover||t._calendarMouseover,t.IsClickEventEnabled=n.IsClickEventEnabled||r,t.IsNextEnabled=n.IsNextEnabled||!1,t.IsPrevEnabled=n.IsPrevEnabled||!1,t.IsAriaHidden=n.IsAriaHidden||!1,f=0;f 0&&(e=new Date(t.HighlightDays[f]),o=e.getMonth()+1,p=e.getDate(),s=e.getFullYear(),t.Dict[o+"/"+p+"/"+s]=r,t.SelectableMonths[o+"/"+s]=r);for(t.Today=$$WP.Utilities.IsNullOrEmpty(t.SelectedDate)?new Date:typeof t.SelectedDate.getYear=="function"?t.SelectedDate:typeof t.SelectedDate.getYear=="string"?new Date(t.SelectedDate):new Date,t.Month=t.Today.getMonth(),t.Year=t.Today.getFullYear(),t.PrevButton=$$WP.Strings.get(h,u),t.NextButton=$$WP.Strings.get(c,u),t.HoverText=$$WP.Strings.get(v,u),t.HoverTextDisabled=$$WP.Strings.get(l,u),i=0;i<7;i++)t.Days[i]=' '+getDayName((i+getFirstDayOfWeek())%7)+"<\/span>"+getDayLetter((i+getFirstDayOfWeek())%7);t.Components$TemplateComponent(n);t.addEventListener("click",t._calendarClick);t.addEventListener("focus",t._calendarFocus)};$$WP.Components.Calendar.prototype={Today:{},Title:"",Image:"",Summary:"",Class:"calendar",filter:"",FromDTE:"",ToDTE:"",Callback:"",SelectedDate:"",HoverText:"",HoverTextDisabled:"",Month:"",Year:"",Days:[],PrevButton:"",NextButton:"",HighlightDays:[],HasSelectableDays:"",Dict:{},SelectableMonths:{},data:{},IsClickEventEnabled:!0,IsNextEnabled:!1,IsPrevEnabled:!1,IsAriaHidden:!1,template:$$WP.Templates.Core.calendar,setData:function(){this.setTitles();this.Components$TemplateComponent$setData(this.Data)},setTitles:function(){var u="CalendarNextPrevMonthHelpText",t="@MYCHART@DATEWITHMONTH@",n=this,f,l,e,o,s,a,h,c,v,i=n.Month,r=n.Year;v=!n.hasSelectableDay(i,r);s=$$WP.I18N.monthTitleFormat(makeDate(r,i+1));$$WP.Strings.setDefaultNamespace("UI.Calendar");$$WP.Strings.addMnemonic(t,$$WP.I18N.monthTitleFormat(makeDate(r,i)));f=$$WP.Strings.get(u);$$WP.Strings.removeMnemonic(t);$$WP.Strings.addMnemonic(t,$$WP.I18N.monthTitleFormat(makeDate(r,i+2)));h=$$WP.Strings.get(u);$$WP.Strings.removeMnemonic(t);$$WP.Strings.clearDefaultNamespace();e=n.IsPrevEnabled;c=n.IsNextEnabled;o=n.IsAriaHidden;n.Data={PrevClass:l,PrevButton:n.PrevButton,IsPrevEnabled:e,Title:s,PrevTitle:f,NextTitle:h,NextClass:a,NextButton:n.NextButton,IsNextEnabled:c,IsAriaHidden:o,Days:n.Days,ComponentNumber:n.ComponentNumber}},reInit:function(n){var t,u,f,e,i,r;if(!!n.HighlightDays)for(r=0;r 0&&(t=new Date(i),u=t.getMonth()+1,e=t.getDate(),f=t.getFullYear(),this.Dict[u+"/"+e+"/"+f]=!0);this.setData();this.refresh()},html:function(n){this.Components$Component$html(n);this.$content.find(".hasevents").safeAttr("data-id","hasevents")},_calendarClick:function(n){this.IsClickEventEnabled&&(n.dataId==="calnext"&&(this.drawNextMonth(),WP.Events.cancelEvent(n),WP.Events.preventDefault(n)),n.dataId==="calprev"&&(this.drawPreviousMonth(),WP.Events.cancelEvent(n),WP.Events.preventDefault(n)))},_calendarFocus:function(n,t){this.$$WP$Components$Calendar$_mouseover(n,t)},_isInCalendar:function(n){for(var t=n,i=0;t&&i<6;t=t.parentNode,i++)if(!!t&&!!t.id&&t.id.toLowerCase()==="calendar")return!0;return!1},setClickFunction:function(n){for(var u=this,h=u.hoverText,c=u.hoverTextDisabled,l=u.clickFunction,s=n.getElementsByTagName("td"),t,i,f=new Date,a=document.all?"hand":"pointer",e=function(n,t){var i="mouseover";WP.Events.addListener(n,"click",l);n.className==="ctrl"?(WP.Events.addListener(n,i,hi()),WP.Events.addListener(n,"mouseout",lo),WP.Events.addListener(n.firstChild,"focus",hi(!0)),WP.Events.addListener(n.firstChild,"blur",lo)):(WP.Events.addListener(n,i,function(){n.firstChild.focus()}),WP.Events.addListener(n.firstChild,"focus",hi()));n.style.cursor=a;t!==!0&&(n.title=h)},r=function(n){n.style.cursor="default";n.title=c},o=0;o 0?r(t):i.indexOf("n")===0?r(t):i.indexOf("wkndn")===0?r(t):i==="ctrln"?r(t):i!=="today"?e(t):u.filter(f.getFullYear(),f.getMonth(),f.getDate())?e(t):r(t))},drawNextMonth:function(){var n=this;n.Month=(n.Month+1)%12;n.Month===0&&n.Year++;n.set()},drawPreviousMonth:function(){var n=this;n.Month=n.Month-1;n.Month<0&&(n.Month+=12);n.Month===11&&n.Year--;n.getCalendarObject();n.set()},hasSelectableDay:function(n,t){var r=1,i=makeDate(t,n+1,r);for(n=i.getMonth();i.getMonth()===n;){if(this.filter(i.getFullYear(),i.getMonth(),r))return!0;i.setDate(++r)}return!1},getCalendarObject:function(){var t=this,a=document.createElement("tbody"),h,f=t.Month,o=t.Year,n,e=new Date,p=e.getDate(),w=e.getMonth(),b=e.getFullYear(),k=WP.DOM.Create.tag,nt=!t.hasSelectableDay(f,o),d=t.IsAriaHidden,g=t,r,i,u,v,y,s,c,l;for(e.setHours(0,0,0,0),v=function(n,t,i){var r=n.getMonth(),u=n.getDate(),f=n.getFullYear(),e=n.getDay();return!$$WP.Utilities.IsNullOrEmpty(i)&&!t&&!!i[r+1+"/"+u+"/"+f]?!0:!1},y=function(n,t,i,r){var e=n.getMonth(),o=n.getDate(),s=n.getFullYear(),u="",c=n.getDay(),h;if($$WP.Utilities.IsNullOrEmpty(i)||t||!i[e+1+"/"+o+"/"+s]||(u=" hasevents"),n '+i+"<\/span>",t+'
Baidu
map