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){return function(t){for(var u,f,r,i=WP.Events.getThis(t);"TD"!==i.nodeName.toUpperCase();)i=i.parentNode;if("calnext"===(u=i.id||i.getAttribute("name")))return _dateChooser.drawNextMonth(),WP.Events.cancelEvent(t),WP.Events.preventDefault(t),!1;if("calprev"===u)return _dateChooser.drawPreviousMonth(),WP.Events.cancelEvent(t),WP.Events.preventDefault(t),!1;if("calcancel"!==u)return f=u.replace("cal",""),r=makeDate(_dateChooser.year,_dateChooser.month+1,f),r.getMonth()!=_dateChooser.month?(_dateChooser.year=r.getFullYear(),_dateChooser.month=r.getMonth(),_dateChooser.date=r.getDate()):_dateChooser.date=f,$afe.select(".currentselected").removeClass("currentselected"),$afe.jq(i).addClass("currentselected"),n.call(_dateChooser,_dateChooser.year,_dateChooser.month,_dateChooser.date,_dateChooser.input),_dateChooser.clearCalendar(),WP.Events.cancelEvent(t),WP.Events.preventDefault(t),!1;_dateChooser.clearCalendar()}}function DateChooser(n,t,i,r,u){this.trigger=n;this.callback=t;this.input=u;this.filter=i||function(){return!0};r&&"function"==typeof r.getYear?this.today=r:"string"==typeof r?(this.today=new Date(r),isNaN(this.today)&&(this.today=new Date)):this.today=new Date;this.month=this.today.getMonth();this.year=this.today.getFullYear();this.date=this.today.getDate();this.calendar=null;this.clickFunction=createClickFunction(t)}function isInCalendar(n){for(var t=n,i=0;t&&i<8;t=t.parentNode,i++)if(t&&t.id&&"calendar"===t.id.toLowerCase())return!0;return!1}function lo(n){for(var t=WP.Events.getThis(n);"TD"!==t.nodeName.toUpperCase();)t=t.parentNode;$afe.jq(t).removeClass("hi")}function hi(n,t){return function(i){var r=WP.Events.getThis(i);if(t)for(;"DIV"!==r.nodeName.toUpperCase();)r=r.parentNode;else for(;"TD"!==r.nodeName.toUpperCase();)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 ctrlMouseDown(){_dateChooser.mouseDown=!0}function ctrlFocus(n){_dateChooser.mouseDown?(_dateChooser.redrawn&&(_dateChooser.mouseDown=!1,_dateChooser.redrawn=!1),hi()(n)):(_dateChooser.redrawn=!1,hi(!0)(n))}function restoreHi(n){var t,i,r=WP.Events.getThis(n);r&&"calendar"!==r.className&&!isInCalendar(r)&&(i=$afe.select(".currentselected"),_dateChooser.focusOn&&(i.length>0?document.getElementById(i[0].id).firstChild.focus():((t=document.getElementById(_dateChooser.focusOn)).firstChild&&t.firstChild.blur(),lo({target:t,srcElement:t}))))}function _removeCalendar(){var n=$afe.select("#calendar"),t=$afe.select(".calendarshield");n.length>0&&(WP.Events.removeListener(document.body,"click",removeCalendar),WP.Events.removeListener(document.body,"mouseover",restoreHi),$afe.jq(window).off("orientationchange resize",handleOrientationChange),checkIfMobile()&&$$WP.Utilities.UI.ToggleBodyScrolling(!1),accessibilityRestorePage(),n.remove(),t.remove(),_dateChooser=null)}function removeCalendar(n){var t=WP.Events.getThis(n);t&&"calendar"!==t.className&&!isInCalendar(t)&&_removeCalendar()}function removeCalendarExternal(){_removeCalendar()}function keyOnPrevMonth(n){var t;if(9===n.keyCode)return n.shiftKey?((t=document.getElementById("calcancel").firstChild)&&"BUTTON"===t.nodeName.toUpperCase()?t.focus():document.getElementById("cal"+_dateChooser.lastDate).firstChild.focus(),WP.Events.preventDefault(n)):void 0;13===n.keyCode&&(_dateChooser.wasEnter=!0)}function keyOnNextMonth(n){var t;if(9===n.keyCode)return!n.shiftKey||(t=document.getElementById("calprev").firstChild)&&"BUTTON"===t.nodeName.toUpperCase()?void 0:((t=document.getElementById("calcancel").firstChild)&&"BUTTON"===t.nodeName.toUpperCase()?t.focus():document.getElementById("cal"+_dateChooser.lastDate).firstChild.focus(),WP.Events.preventDefault(n));13===n.keyCode&&(_dateChooser.wasEnter=!0)}function tabOnCancel(n){var t;if(9===n.keyCode)return n.shiftKey?void 0:((t=document.getElementById("calprev").firstChild)&&"BUTTON"===t.nodeName.toUpperCase()||(t=document.getElementById("calnext").firstChild)&&"BUTTON"===t.nodeName.toUpperCase()?t.focus():document.getElementById("cal"+_dateChooser.firstDate).firstChild.focus(),WP.Events.preventDefault(n))}function checkIfMobile(){return document.documentElement.className.indexOf("mobile")>=0||document.documentElement.className.indexOf("respquestionnaire")>=0}function checkIfPopup(){var n=document.getElementById("appPopupRoot"),t=!1;return null!=n&&(t=1==n.getElementsByClassName("_PopupContainer").length),t||1==document.getElementsByClassName("Popup").length}function handleOrientationChange(){var t=document.getElementById("calendar"),n;this.positionCalendar(this._dateChooser.trigger,t);n=checkIfMobile();"orientationchange"!==window.event.type||n||scrollCalendarIntoView()}function scrollCalendarIntoView(){var n=document.getElementById("calendar");setTimeout(function(){n.scrollIntoView({behavior:"smooth",block:"start"})},600)}function positionCalendar(n,t){var l=checkIfPopup(),o=checkIfMobile(),i,r,u;if(n.offsetParent||(n=document.getElementById(n.id)),n.offsetParent){if((t.style.position="absolute",pos=getElementPosition(n),topElement=pos.topElement,topElement.appendChild(t),$$WPContain.Popup.__zIndex+=3,t.style.zIndex=3e3+$$WPContain.Popup.__zIndex,t.style.left=pos.x,t.style.top=pos.y,datatileContainer=$afe.select("html.datatile")[0],popupContainer=$afe.jq(n).parents(".Popup")[0],defaultContainer=document.getElementById("main"),container=popupContainer||datatileContainer||defaultContainer,containerOffsetWidth=container.offsetWidth,containerOffsetHeight=container.offsetHeight,pos=getElementPosition(n,container),t.offsetWidth)&&(i=parseInt(t.style.left,10),overflow=parseInt(pos.x,10)+t.offsetWidth-containerOffsetWidth,overflow>0&&(t.style.left=overflow<i?i-overflow+"px":"0px")),t.offsetHeight&&(r=parseInt(t.style.top,10),overflow=parseInt(pos.y,10)+t.offsetHeight-containerOffsetHeight,overflow>0&&(t.style.top=overflow<r?r-overflow+"px":"0px"),u=document.body.clientHeight,u<landscapeCutoffHeight&&(t.style.top=u/3+"px")),l&&!o){t.style.position="fixed";var s=n.getBoundingClientRect(),f=s.top,e=s.left,h=window.innerHeight-f-t.offsetHeight,c=window.innerWidth-e-t.offsetWidth;t.style.top=h<0?f+h+"px":f+"px";t.style.left=c<0?e+c+"px":e+"px"}o&&(t.style.left="50%",t.style.position="fixed",t.style.top="50%")}else $afe.jq(n.parentNode).safeInsertBefore(t,this.trigger),$afe.jq(n).addClass("hidden")}function HandleKeyUp(n){n.keyCode==keyCode.ESC&&(n.stopPropagation(),n.preventDefault(),_dateChooser.clearCalendar())}function HandleKeyDown(n){for(var u,r,t=!1,i=document.activeElement;"TD"!==i.nodeName.toUpperCase();)i=i.parentNode;if(u=i.id||i.getAttribute("name"),i.className.indexOf("ctrl")<0){r=u.replace("cal","");switch(n.keyCode){case keyCode.RIGHT:moveFocusByDay(r,1);t=!0;break;case keyCode.LEFT:moveFocusByDay(r,-1);t=!0;break;case keyCode.DOWN:moveFocusByDay(r,7);t=!0;break;case keyCode.UP:moveFocusByDay(r,-7);t=!0;break;case keyCode.PAGEDOWN:moveFocusByMonth(r,1);t=!0;break;case keyCode.PAGEUP:moveFocusByMonth(r,-1);t=!0;break;case keyCode.HOME:moveFocusToFirstDayOfWeek(r);t=!0;break;case keyCode.END:moveFocusToLastDayOfWeek(r);t=!0;break;case keyCode.ESC:t=!0}i=document.activeElement;null!==_dateChooser&&"0"==i.tabIndex&&(_dateChooser.focusOn=i.parentElement.id);t&&(n.stopPropagation(),n.preventDefault())}}function moveFocusToFirstDayOfWeek(n){var i=_dateChooser.year,r=_dateChooser.month,t=new Date(i,r,n).getDay()-getFirstDayOfWeek(),u=n-(t=t<0?t+7:t);document.getElementById("cal"+u).firstChild.focus()}function moveFocusToLastDayOfWeek(n){var r=_dateChooser.year,u=_dateChooser.month,t=new Date(r,u,n).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<o||f<e)?hasSelectableDay(u,f)?_dateChooser.drawPreviousMonth(r.getDate()):_dateChooser.isDateDisplayed(i)&&document.getElementById("cal"+i).firstChild.focus():document.getElementById("cal"+i).firstChild.focus()}function moveFocusByMonth(n,t){n=parseInt(n);var r=_dateChooser.year,u=_dateChooser.month,i=new Date(r,u,n).getDate();1==t&&n<=0||-1==t&&n>_dateChooser.lastDateOfMonth?(i=i>_dateChooser.lastDateOfMonth?_dateChooser.lastDateOfMonth:i,document.getElementById("cal"+i).firstChild.focus()):hasSelectableDay(u+t,r)?1==t?_dateChooser.drawNextMonth(i):-1==t&&_dateChooser.drawPreviousMonth(i):1==Math.abs(t)&&(i=1===t?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 buildNavHeaderObject(n,t){var r=WP.DOM.Create.tag,h=$$WP.Strings.get("PrevButtonTooltip","UI.Calendar"),c=$$WP.Strings.get("NextButtonTooltip","UI.Calendar"),o=$$WP.Strings.get("PrevButtonOverride","UI.Calendar"),s=$$WP.Strings.get("NextButtonOverride","UI.Calendar");""===o&&(o="&laquo;");""===s&&(s="&raquo");var u,i,f=!hasSelectableDay(n,t),a=document.createElement("nav"),l=r("table","calendarheader",""),v=document.createElement("thead"),e=document.createElement("tr");return l.setAttribute("role","presentation"),hasSelectableDay(n-1,t)||f?(u=r("td","ctrl"+(hasSelectableDay(n-1,t)||f?"":"n"),"calprev",h),i=r("button","","","",o),u.appendChild(i),i.setAttribute("aria-label",h)):(u=r("td","ctrl"+(hasSelectableDay(n-1,t)||f?"":"n"),"calprev",$$WP.I18N.monthTitleFormat(makeDate(t,n)),""),(i=r("button","","","",o)).setAttribute("aria-disabled","true"),i.setAttribute("aria-label",h),i.style.cursor="default",u.appendChild(i)),e.appendChild(u),e.appendChild(r("th","hdr calmonth","monthlabel","",$$WP.I18N.monthTitleFormat(makeDate(t,n+1)))),e.lastChild.colSpan=5,hasSelectableDay(n+1,t)||f?(u=r("td","ctrl"+(hasSelectableDay(n+1,t)||f?"":"n"),"calnext",c),i=r("button","","","",s),u.appendChild(i),i.setAttribute("aria-label",c)):(u=r("td","ctrl"+(hasSelectableDay(n+1,t)||f?"":"n"),"calnext",$$WP.I18N.monthTitleFormat(makeDate(t,n+2)),""),(i=r("button","","","",s)).setAttribute("aria-label",c),i.setAttribute("aria-disabled","true"),i.style.cursor="default",u.appendChild(i)),a.appendChild(l),l.appendChild(v),v.appendChild(e),e.appendChild(u),a}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 u,f,e,o;f=document.getElementById(t);"string"==typeof r&&r.length>0?u=window[r](t):"function"==typeof r&&(u=r);"function"!=typeof u&&(u=dfltClndrCallbackFactory(t));o=$afe.jq(f).safeAttr("data-focus-dte");""!==f.value?e=parseDate(f.value,!0):void 0!==o&&(e=WP.Utils.dte2date(o));new DateChooser(n,u,WP.Validators.Calendar[i],e,f).drawCalendar()}function writeCalendar(n,t,i,r,u,f,e,o){var s,h;"string"==typeof n&&(n=$afe.select("#"+n));s=$afe.jq(createElement("button","calendar datechooserAnchor"));$$WPUtil.IsNullOrEmpty(o)||s.safeAttr("id",o);s.safeAttr("type","button");h=$afe.select('label[for="'+n.attr("id")+'"]').text();$$WPUtil.IsNullOrEmpty(h)&&(h=$$WP.Strings.get("DefaultFieldDescription","UI.Calendar"));$$WP.Strings.addMnemonic("@MYCHART@AssociatedLabelText@",h,!1,"UI.Calendar",$$WP.Strings.EncodingTypes.HTML);s.safeAttr("aria-label",HTMLUnencode($$WP.Strings.get("DatePickerDescription","UI.Calendar")));s.safeAppend($$WP.SimpleTemplates.Img({src:i,"aria-hidden":"true",focusable:"false",alt:HTMLUnencode($$WP.Strings.get("DatePickerDescription","UI.Calendar"))}));$$WP.Strings.removeMnemonic("@MYCHART@AssociatedLabelText@","UI.Calendar");"range"===t&&($$WPUtil.IsNullOrEmpty(r)||(window.cachedStartDate=WP.Utils.dte2date(r)),$$WPUtil.IsNullOrEmpty(u)||(window.cachedEndDate=WP.Utils.dte2date(u)));s.click(function(){return n.prop("openingCalendar",!0),n.prop("holdErrors",!1),textBoxDataChooser(s[0],n.prop("id"),t,f),!1}).on("mousedown",function(){n.prop("holdErrors",!0)}).on("mouseout",function(){n.prop("holdErrors",!1);n.prop("openingCalendar",!1)});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);"DIV"!==t.nodeName.toUpperCase();)t=t.parentNode;$afe.jq(t).removeClass("hover")}function pageHi(){return function(n){for(var t=WP.Events.getThis(n);"DIV"!==t.nodeName.toUpperCase();)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,i,t,n;if(null!==(r=document.getElementById("pagecalendar"))&&(_dateChooser=function(){},null!==(i=r.getElementsByTagName("div"))))for(t=0;t<i.length;t++)n=i[t],($afe.jq(n).hasClass("NoData")||$afe.jq(n).hasClass("EditData")||$afe.jq(n).hasClass("ctrl"))&&(WP.Events.addListener(n,"mouseover",function(){this.firstChild.focus()}),WP.Events.addListener(n,"mouseout",function(){this.firstChild.blur()}),WP.Events.addListener(n.firstChild,"focus",pageHi()),WP.Events.addListener(n.firstChild,"blur",pageLo))}function accessibilityHidePage(){var n=accessibilityGetElements();for(i=0;i<n.length;i++)n[i]&&n[i].setAttribute("aria-hidden","true")}function accessibilityRestorePage(){var n=accessibilityGetElements();for(i=0;i<n.length;i++)n[i]&&n[i].removeAttribute("aria-hidden")}function accessibilityGetElements(){var t=[document.getElementById("header"),document.getElementById("footer"),document.getElementById("content")],n;return(WP.DOM.Browser.isSafari||WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad||WP.DOM.Browser.isIPod)&&(n=$afe.jq(_dateChooser.trigger).parents(".Popup, ._Popup"),n.length>0&&t.push(n[0])),t}var $$WPContain,$$WPPop,debug_clickedModel;$$WPComp.VB6Component=function(n){n=n||{};this._componentClick=n._componentClick||function(){};this.Url=makeLink("inside.asp?mode="+(n.Mode||this.Mode)+"&co=true");this.DontSetH2AsTitle=n.DontSetH2AsTitle||!1;this.Components$ViewComponent(n)};$$WPComp.VB6Component.prototype={Mode:"",Class:"VB6Component",DontSetH2AsTitle:!1,html:function(n){var r=[],i,t;r=this.getInfoButtonData(n);n=this.cleanResponse(n);i=dangerou$.parseHtml("<div>"+n+"<\/div>");t=i.find("h2");this.DontSetH2AsTitle||1===t.length&&(this.setTitle(t.text(),this._Title.Buttons,this._Title.Image,this.IsClosable),t.remove());this.Components$ViewComponent$html(i.html());this.setInfoButtonData(r)},dispose:function(n){this._isDisposed||(this.$container.find("form").each(function(){WP.Validators&&delete WP.Validators.Forms[this.id]}),this.Components$ViewComponent$dispose(n))},cleanResponse:function(n){return dangerou$.parseHtml(n).find("#main").html()},getInfoButtonData:function(n){var u,f,e,o,t=8,s=0,i=0,r=[];do t=n.indexOf('type="text/javascript">var info = WP.Controls.InfoButton',s),s=n.indexOf("<\/script>",t),-1!==t&&(u=n.indexOf("HTMLUnencode",t),f=n.substring(t+82,u-4),e=n.indexOf('"), "popupparentdiv',t),o=n.substring(u+14,e),r[i]={},r[i].id=f,r[i].info=o,i+=1);while(-1!==t);return r},setInfoButtonData:function(n){var t=0;if(null!==n&&null!==n.length){for(t=0;t<n.length;t++)$afe.select("#"+n[t].id).safeAttr("data-info",n[t].info).safeAttr("data-id","infobutton");this.setInfoButtonBubbles()}},setInfoButtonBubbles:function(){var i,n,t=$afe.select("div[data-id='infobutton']");if(t.length>0)for(n=0;n<t.length;n++)0===$afe.select("#"+t[n].id+" .popupiconcontainer").length&&(i=$afe.select("#"+t[n].id),WP.Controls.InfoButton(document.getElementById(t[n].id),HTMLUnencode(i.safeAttr("data-info")),"popupparentdiv_"+t[n].id,null,"",null,null,null,null,null))}};$$WPComp.VB6Component.extend("Components.ViewComponent");$$WPUtil.guaranteeExistence($$WPUtil,"ComponentFactory.HomePage");$$WPUtil.ComponentFactory.vb6Mode=function(n,t,i){return(i=i||{}).Mode=n+"&"+t,i._mode=n,i._otherParameters=t,i.copy=i.copy||function(n){return n.Html=n.Html||this.$content.get(0).innerHTML,$$WPUtil.ComponentFactory.vb6Mode(this._mode,this._otherParameters)},new $$WPComp.VB6Component(i)};$$WPUtil.ComponentFactory.HomePage.quickLinks=function(n){return(n=n||{}).Class=n.Class||"",n.Class+=" quickLinks list hoverable",n.copy=n.copy||function(n){return n.Html=n.Html||this.$content.get(0).innerHTML,$$WPUtil.ComponentFactory.HomePage.quickLinks(n)},n.html=function(n){$$WP.Components.VB6Component.prototype.html.apply(this,[n]);this.$content.find("#links").children("a").length?this.$container.hasClass("vertical")||$$WP.Behaviors.matchRowHeights(this.$content,"#links a"):this.hide()},$$WPUtil.ComponentFactory.vb6Mode("","widgetName=quickLinks",n)};$$WPUtil.ComponentFactory.HomePage.news=function(n){return(n=n||{}).Class=n.Class||"",n.Class+=" news",n.copy=n.copy||function(n){return n.Html=n.Html||this.$content.get(0).innerHTML,$$WPUtil.ComponentFactory.HomePage.news(n)},n.Components$VB6Component$cleanResponse=$$WPComp.VB6Component.prototype.cleanResponse,n.cleanResponse=function(n){var t=(n=this.Components$VB6Component$cleanResponse(n).replace(/ id="[^"]+"/gim,"")).indexOf("<!-- Start Section Block -->")+28;return t>27&&(n=n.substring(t,n.indexOf("<!-- End Section Block -->",t))),n},$$WPUtil.ComponentFactory.vb6Mode("","widgetName=staticNews",n)};$$WPUtil.ComponentFactory.HomePage.alerts=function(n){return(n=n||{}).Class=n.Class||"",n.Class+=" Alerts",n.SupportAnimations=!1!==n.SupportAnimations,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,i,r;this.Components$VB6Component$html(n);this.$content.find("#alertspanel-autowaitlist").length>0||this.$content.find("#alertspanel-expiredautowaitlist").length>0?$$WPUtil.ComponentFactory.HomePage.AutoWaitList(0,null):0===this.$content.find("a").length&&this.$container.addClass("noinfo");t=this.$content.find("[data-alertid='alertspanel-notificationreview']");t.length>0&&(i=JSON.parse($(t[0]).html()),$$WPUtil.guaranteeExistence($$WP,"Preferences.NotificationsReviewAlertComponent"),r=new $$WP.Preferences.NotificationsReviewAlertComponent(i),$$WPUtil.ComponentFactory.HomePage.ShowNotificationAlertAsPopup(r),1===this.$content.find("#alerts div").length&&this.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){(n=n||{}).DontSetH2AsTitle=!0;n.Class=n.Class||"";n.Class+=" goalsvb6";n.SupportAnimations=!1!==n.SupportAnimations;var t,i,r=n.RegistryID||"";return i="section=1&widgetMode=1&registryid="+r,t=""===r?"goalsreview":"mycondition",n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.html=n.html||function(t){var r,u,f,e,o,i,s,h,c,l,a,v;this.Components$VB6Component$html(t);u=$$WP.Strings.getForTemplate("graphlabel","Clinical.Goals");f=$$WP.Strings.getForTemplate("tablelabel","Clinical.Goals");e=[new $$WPComp.ComplexObjects.Button(u,"","graphButton selected","graph"),new $$WPComp.ComplexObjects.Button(f,"","tableButton","table")];s=new $$WPComp.ComplexObjects.ButtonBar("","","goaltitle","","");c=new $$WPComp.ComplexObjects.ButtonBar("","","goalrecentvalue","","");a=new $$WPComp.ComplexObjects.ButtonBar("","","goalbuttonlist",$$WPUtil.copyObject(e),$$WPComp.TITLEBARIDENTIFIER);h=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,s);l=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,c);v=$afe.renderTemplate($$WP.Templates.Core.ButtonBar,a);this.$content.safePrepend(v);this.$content.safePrepend(l);this.$content.safePrepend(h);i=$$WP.SimpleTemplates.Anchor({href:"#","class":"focusanchor",name:"goalmaintop",title:$$WP.Strings.get("showing_clicked_goal_details","Clinical.Goals")});$$WP.Strings.setDisplayText(i,"showing_clicked_goal_details","Clinical.Goals");this.$content.safePrepend(i);loadGraphs();o=n._selectedIndex||0;r=$afe.select(".goalslarge .goalslist").find("[data-index='"+o+"']").safeAttr("id");n._showSelectedGoalGraph(r)},n._componentClick=function(t){return n._switchTableGraph(t),!1},$$WPUtil.ComponentFactory.vb6Mode(t,i,n)};$$WPUtil.ComponentFactory.Clinical.TestResultDetails=function(n){return(n=n||{}).DontSetH2AsTitle=!0,n.Class=n.Class||"",n.SupportAnimations=!1!==n.SupportAnimations,n.RegistryID,n.Components$VB6Component$html=$$WPComp.VB6Component.prototype.html,n.Components$VB6Component$cleanResponse=$$WPComp.VB6Component.prototype.cleanResponse,n.cleanResponse=function(n){n=this.Components$VB6Component$cleanResponse(n);var t=dangerou$.parseHtml(n),r=t.filter(".title"),u=t.filter(".cptLink"),i=t.filter(".tabcontainer");return i.removeClass("tabcontainer"),r.find("div#assistiveicons").remove(),i.find(".navparent").remove(),$afe.jq(document.createElement("div")).safeAppend(r).safeAppend(u).safeAppend(i).html()},$$WPUtil.ComponentFactory.vb6Mode("labdetail",undefined,n)};$$WPComp.TemplateComponent=function(n){this.Components$Component(n)};$$WPComp.TemplateComponent.prototype={Url:makeLink(""),Data:{},template:function(){$$WP.Debug.logError("Descendents of TemplateComponent must implement the template property (or pass it in the settings bag).")},setData:function(n){(n=n||{}).ComponentNumber=this.ComponentNumber;this.Data=n;this.refresh()},refresh:function(){var n=Array.isArray(this.Data)?{dataElement:this.Data}:this.Data;try{this.html(this.template(n).trim())}catch(n){throw"Failed to execute the template for component"+this.ComponentNumber;}},copy:function(n){return(n=n||{}).Data=this.Data,this.Components$Component$copy(n)},show:function(){this._shownOnce||this._isDisposed||this.setData(this.Data);this.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){n=this.$PermanentParent||n;0===this.$container.parent().length&&this.$container.safeInsertBefore(n.children(".content"));this.Components$TemplateComponent$show()},_resize:function(){return!1}};$$WPComp.InlineLoadingComponent.extend("Components.TemplateComponent");$$WPComp.InlineLoadingComponentWithSources=function(n){this.Components$TemplateComponent(n);null!==this.AreaName&&(this.Url=makeLink("Loading/GetStatus?AreaName="+this.AreaName));this.addEventListener("resize",this._resize);$$WP.CommunityUtilities.hasCommunityLinks()||(this.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 e,o,i,r,u,f,t;if($$WP.Strings.setDefaultNamespace("community.externaljump"),u=0,f="",$$WP.CommunityUtilities.hasCommunityLinks()){if(n&&n.Organizations&&n.Organizations.length>0&&!this.stopGetStatus){for(i=0;i<n.Organizations.length;i++)if(t=n.Organizations[i],1!==t.Status&&7!==t.Status){if(t.Organization&&null!==t.Organization.OrganizationName){r=t.Organization;break}}else u++;u===n.Organizations.length&&(e=$$WP.Strings.get("CommunityLoadingStatus"));r||(r=n.Organizations[0].Organization);$$WP.Strings.setOrganization(r);$$WP.Strings.addMnemonic("@MYCHART@LOADEDORGS@",u);$$WP.Strings.addMnemonic("@MYCHART@TOTALORGS@",n.Organizations.length);o=$$WP.Strings.get("CommunityLoadingStatusWithCounter");e=$$WP.Strings.get("CommunityLoadingStatus");$$WP.Strings.removeMnemonic("@MYCHART@LOADEDORGS@");$$WP.Strings.removeMnemonic("@MYCHART@TOTALORGS@");$$WP.Strings.clearOrganization();f=this.statusIsCount?e:o;this.statusIsCount=!this.statusIsCount;this._status=f;this.$content.find(".loadingStatus.loading").animate({opacity:0},350,function(){$afe.jq(this).empty().safeAppend(f)}).animate({opacity:1},350)}this.stopGetStatus||setTimeout($.proxy(function(){getCSRFTokenAsQS($.proxy(function(){this.makeRequest({success:this.success,dataType:"json",type:"POST",url:this.Url},"getStatus")},this))},this),300);$$WP.Strings.clearDefaultNamespace()}},show:function(n){n=this.$PermanentParent||n;0===this.$container.parent().length&&this.$container.safeInsertBefore(n.children(".content"));this.$container.removeClass("resized");this.Components$TemplateComponent$show()},hide:function(){var n;this.DataFromMultipleSources?(this.stopGetStatus=!0,this.$container.find(".loadingStatus").remove(),this.$container.find(".loadingExt").removeClass("loading").addClass("loaded"),n=$$WP.SimpleTemplates.Div({"class":"subtlecolor loadingStatus","aria-hidden":"true"}),$$WP.Strings.setDisplayText(n,"CommunityLoadedMessage","community.externaljump"),this.$content.safeAppend(n),this.$container.addClass("loaded").on("transitionend",function(n){if(n&&n.target&&!$afe.jq(this).hasClass("resized")&&$afe.jq(this).hasClass("loaded")){var t=$afe.jq(this).parent(".component:not(.inlineloading)").first();t&&($afe.jq(t).trigger("resize",{forceShrink:!0}),$afe.jq(this).addClass("resized"),$afe.jq(t).css("height",""))}})):this.Components$TemplateComponent$hide()},refresh:function(){this.$container.removeClass("loaded resized");this.Components$TemplateComponent$refresh()},_resize:function(){return!1}};$$WPComp.InlineLoadingComponentWithSources.extend("Components.TemplateComponent");$$WPComp.ExternalJumpPopupComponent=function(n){this.Components$TemplateComponent(n);this.Data=this.Data||{};this.addEventListener("click",this._clickEvent);this.Data.ExternalJumpIframeId="externaljumpiframe_comp"+this.ComponentNumber;this.ExternalJumpIframeId=this.Data.ExternalJumpIframeId;this.Data.LastFocusTrapId="lastFocusTrap"+this.ComponentNumber;this.LastFocusTrapId=this.Data.LastFocusTrapId};$$WPComp.ExternalJumpPopupComponent.prototype={Class:"externaljump",ToolbarButtons:null,template:$$WP.Templates.Core.externaljump,CommunicationsIndicator:!1,ExternalJumpIframe:null,IsLoadingIndicatorHidden:!1,ResponseObject:null,NewWindowReference:null,ExternalJumpIframeId:null,LastFocusTrapId:null,RefreshCommunityTokenOnClose:!1,callback:null,context:null,windowMsgListener:null,initialize:function(){this.clearModel();this.refresh()},clearModel:function(){this.Data&&(this.Data.OrganizationName=null,this.Data.OrganizationLogo=null,this.Data.Url=null)},loadIframe:function(n,t,i){"object"==typeof n&&(this.updateData(n.CommunityResponse,t,i),this.ResponseObject=n.CommunityResponse,this.RefreshCommunityTokenOnClose=n.RedirectToSignup,this.Data.IsSignupWorkFlow=n.RedirectToSignup,this.Data.Url=this.ResponseObject.RedirectURL,this.refresh(),$afe.select("#"+this.ExternalJumpIframeId).on("load",$.proxy(this.afterIframeLoaded,this)).on("error",this.failure),this.ExternalJumpIframe=document.getElementById(this.ExternalJumpIframeId));this.windowMsgListener=$.proxy(this.msgListener,this);$afe.jq(window).on("message."+this.ComponentNumber,this.windowMsgListener);$afe.jq(window).on("resize orientationchange","",this.ComponentNumber,$.proxy(this._resizeIframe,this));this.ContainerComponent._oldDispose=this.ContainerComponent.dispose;this.ContainerComponent.dispose=$.proxy(this._popupDispose,this)},afterIframeLoaded:function(){this.hideLoadingIndicator()},hideLoadingIndicator:function(){this.IsLoadingIndicatorHidden||(this.$content.find(".loadingExt").removeClass("loading").addClass("loaded"),this.$content.find(".loadingContainer").addClass("loaded").on("transitionend transitionEnd",$.proxy(this.showIframeContent,this)),9===WP.DOM.Browser._getIEVersion()&&setTimeout($.proxy(this.showIframeContent,this),500),this.IsLoadingIndicatorHidden=!0)},showIframeContent:function(){this.$content.find(".loadingContainer").remove();this.$content.find(".loadedcontent").removeClass("loadedcontent");$.proxy(this._resizeIframe(),this);this.ContainerComponent.firstFocus.focus()},getLastFocusTrap:function(n){return $afe.jq(n).find("#"+this.LastFocusTrapId).last()[0]},_resizeIframe:function(){var n,t,i,r,u,o,f,e;t=$afe.select(".externalheader");i=$afe.select(".titlebar");u=0===t.length?0:t.outerHeight();r=0===i.length?0:i.outerHeight();o=(n=$afe.select(".externaljumppopup")).length>0?n.outerHeight():0;f=window.innerWidth<=1300?window.innerHeight-u-r:o-u-r;0!==(e=$afe.select("#"+this.ExternalJumpIframeId)).length&&(n.css("max-height","none"),e.css("height",f+"px"),e.closest(".externalframewrapper").css("height",f+"px"))},showBrowserUnSupportedMessage:function(){var n,t;n=$$WP.SimpleTemplates.Div({id:"UnSupportedMessage"},null);$$WP.Strings.setDisplayText(n,"UnSupportedMessage","community.externaljump");this.$content.find(".browsersupport").safeAppend(n);t=$$WP.SimpleTemplates.Anchor({href:"#","data-id":"unsupportedbrowserlink","class":"button completeworkflow autowidth",title:$$WP.Strings.get("UnSupportedBtnText","community.externaljump"),"aria-describedby":"UnSupportedMessage"});$$WP.Strings.setDisplayText(t,"UnSupportedBtnText","community.externaljump");this.$content.find(".browsersupport").safeAppend(t)},failure:function(){this.Data.ErrorMessage=$$WP.Strings.getForTemplate("WidgetErrorMessage");this.refresh()},updateData:function(n,t,i){n&&n.Organization&&(this.Data.OrganizationLogo=t&&i?i:n.Organization.LogoUrl,this.Data.IsPayvider=t&&i,this.Data.OrganizationName=n.Organization.OrganizationName,$$WP.Strings.setOrganization(n.Organization,!t,"community.externaljump"),this.Data.LoadingStatus=$$WP.Strings.getForTemplate("DeepLinkPopupLoadingMessage","community.externaljump"),this.Data.IframeTitle=$$WP.Strings.getForTemplate("IframeTitle","community.externaljump"),$$WP.Strings.clearOrganization(),this.Data.Address=n.Organization.Address,this.Data.Contact=n.Organization.ContactInformation,null===this.Data.Contact&&(this.Data.contactInfoClass="nocontact"))},msgListener:function(n){var t,i;if(n&&n.originalEvent&&n.originalEvent.data){if(t=JSON.parse(n.originalEvent.data),!t)return;if("cookieFlag"===t.message&&!t.canSetCookies)return this.hideLoadingIndicator(),$afe.select("#"+this.ExternalJumpIframeId).remove(),void this.showBrowserUnSupportedMessage();t.externalGUID===$$WP.CommunityUtilities.getExternalJumpGUID()&&this&&("closePopup"===t.message?(this.ContainerComponent&&this.ContainerComponent._oldDispose(),this&&this._disposeTimeout&&clearTimeout(this._disposeTimeout)):"isValidContext"===t.message?this.ExternalJumpIframe&&this.ExternalJumpIframe.contentWindow&&(i={message:"valid"},this.ExternalJumpIframe.contentWindow.postMessage(JSON.stringify(i),"*")):"setActivity"===t.message&&$$WPUtil.setActivity())}},_clickEvent:function(n){return!n||("unsupportedbrowserlink"!==n.dataId||null===this.ResponseObject||$$WPUtil.IsNullOrEmpty(this.ResponseObject.RedirectURL)?void 0:(this.ResponseObject.IsSSOPost?(this.NewWindowReference=openWindow("","","scrollbars=1,resizable=1","externalJumpWindow",!0),$$WPUtil.postForm(this.ResponseObject.RedirectURL,this.ResponseObject.SSOParams,this.NewWindowReference.name)):(this.ResponseObject.RedirectURL=this.ResponseObject.RedirectURL+"&co=true",this.NewWindowReference=openWindow(this.ResponseObject.RedirectURL,"","scrollbars=1,resizable=1","externalJumpWindow",!0)),!1))},_popupDispose:function(){if(this){if(this.ExternalJumpIframe&&this.ExternalJumpIframe.contentWindow||null!==this.NewWindowReference&&!this.NewWindowReference.closed){var n={message:"logout"};null!==this.NewWindowReference?this.NewWindowReference.window.postMessage(JSON.stringify(n),"*"):this.ExternalJumpIframe.contentWindow.postMessage(JSON.stringify(n),"*")}this.ContainerComponent.hide();this._disposeTimeout=setTimeout($.proxy(function(){null===this.NewWindowReference||this.NewWindowReference.closed||closeAllWindows("externalJumpWindow");this.ContainerComponent&&this.ContainerComponent._oldDispose()},this),500)}},dispose:function(){$afe.jq(window).off("message."+this.ComponentNumber,this.windowMsgListener);$afe.jq(window).off("resize orientationchange","",$.proxy(this._resizeIframe,this));null!==this.ResponseObject&&this.RefreshCommunityTokenOnClose&&$$WP.CommunityUtilities.refreshCommunityLink(this.ResponseObject.Organization.OrganizationId);this.runCallback(this.callback);this.Components$Component$dispose()},runCallback:function(n){n&&this.context&&"function"==typeof n&&n.apply(this.context)}};$$WPComp.ExternalJumpPopupComponent.extend("Components.TemplateComponent");$$WPComp.ConfirmComponent=function(n){$$WPComp.applySettings(n,this);"function"!=typeof this.callback&&$$WP.Debug.logError("A callback function is required for Confirm");this.Components$Component({});this.CallbackContext=this.CallbackContext||this;this.addEventListener("click",this._clickToolbar)};$$WPComp.ConfirmComponent.prototype={AffirmButtonIndex:0,_clickToolbar:function(n){if(n.dataId)return this.callback.apply(this.CallbackContext,[$$WPComp.TOOLBARIDENTIFIER+this.AffirmButtonIndex===n.dataId]),this.dispose(!0),!1}};$$WPComp.ConfirmComponent.extend("Components.Component");$$WPUtil.guaranteeExistence($$WP,"Containers");$$WPContain=$$WP.Containers;$$WPContain.ContainerComponent=function(n){this._Components=[];this.Components$Component(n);this.Components&&(Array.isArray(this.Components)?this.addComponent(this.Components):this.setSingleComponent(this.Components),delete this.Components)};$$WPContain.ContainerComponent.prototype={Class:"container",Events:["dispose","resize"],_Components:[],IsClosable:!0,hasComponents:function(){return this._Components&&this._Components.length>0},show:function(n){if(!0!==this._visible){var t;if($$WP.Debug.UpdateTopMarginForBanners(),n&&this.hasComponents())for(t=0;t<this._Components.length;t+=1)this._Components[t].show(n);this.Components$Component$show()}},hide:function(n){var t;if(!1!==this._visible&&(this.Components$Component$hide(),n&&this.hasComponents()))for(t=0;t<this._Components.length;t+=1)this._Components[t].hide(n)},addComponent:function(n){var t;if(n)if(Array.isArray(n))for(t=0;t<n.length;t+=1)this.addComponent(n[t]);else{if(!$$WPComp.isComponent(n))throw"addComponent was called with something that isn't a component";n.ContainerComponent&&(n.ContainerComponent.removeComponent(n,!0),n.hide());this._Components.push(n);0===this.$content.find(n.$container).length&&this.$content.safeAppend(n.$container);n.ContainerComponent=this;n._isVisibleOld=n.isVisible;n.isVisible=this._isComponentVisible}},_isComponentVisible:function(){return this._isVisibleOld()&&this.ContainerComponent.isVisible()},removeComponent:function(n,t){for(var r=isNaN(n)?n.ComponentNumber:n,i=this._Components.length-1;i>-1&&this._Components[i].ComponentNumber!==r;i--);(n=this._Components[i])&&n.ComponentNumber===r&&(!0!==t&&n.dispose(),n.$container.remove(),n.ContainerComponent=null,n.isVisible=n._isVisibleOld,delete n._isVisibleOld,this._Components=this._Components.slice(0,i-1).concat(this._Components.slice(i+1,this._Components.length-1)))},clearComponents:function(n){for(;this._Components.length;)this.removeComponent(this._Components[this._Components.length-1].ComponentNumber,n);this._Components=[]},setSingleComponent:function(n){$$WPComp.isComponent(n)?(this.addComponent(n),this.setTitle(n.TitleText,n.TitleButtons,n.TitleImage,n.IsClosable),n.setTitle(null,null,null,!1)):$$WP.Debug.logError("setSingleComponent called with something that isn't a component")},dispose:function(n){this._isDisposed||(this.clearComponents(),this.Components$Component$dispose(n),this._ContentGeneratedOnce=!1)},html:function(){$$WP.Debug.logError("You cannot directly set the HTML of a container.")},copy:function(n,t){var i,r;for((n=n||{}).Components=n.Components||[],r=this._Components.length,i=0;i<r;i++)n.Components.push(this._Components[i].copy(t||{}));return this.Components$Component$copy(n)},load:function(){for(var n=0;n<this._Components.length;n++)if("function"==typeof this._Components[n].load)try{this._Components[n].load.apply(this._Components[n],arguments)}catch(n){$$WP.Debug.logError(n)}}};$$WPContain.ContainerComponent.extend("Components.Component");$$WPUtil.guaranteeExistence($$WP,"Containers");$$WPContain.Positions={None:function(){},InsideCentered:function(n,t){var r,u,i,a,s,f,c,l,h,v,e,y,o=n.data;isNaN(o)||(o=$$WPComp.getInstance(o));i=o.$container;r=$afe.jq(window);u=$$WPContain.Positions.getOffset.apply(o,[t]);a=r.height()-i.outerHeight();c=$$WPUtil.getScrollTop();l=$$WPUtil.getScrollLeft();window.visualViewport&&Math.round(window.visualViewport.width)!==r.innerWidth()&&(l=0);this._IsWindowScrollDisabled?(v=$$WPUtil.cssValueToPixels($afe.select("body").css("margin-top")),a>0?f=(r.height()-i.outerHeight())/2-v:(this._IsWindowScrollDisabled=!1,$afe.select("body").removeClass("scrollDisabled"))):(u.y<0&&(u.y=0),f=c+(r.height()-i.outerHeight())/2-u.y);null==f&&(f=0);e=Math.max(c+35,f);s=window.frameElement;isDataTile()&&null!=s&&(i.hasClass("small")?(y=(e=$$WPUtil.getDataTileScrollTop(s)+35)+i.outerHeight()-s.scrollHeight)>0&&(e-=y):e=0);(h=l+(r.width()-i.outerWidth())/2-u.x)<0&&(h=0);$afe.select("html").hasClass("mobile")&&r.scrollTop(0);i.css({top:e+"px",left:h+"px",right:h+"px"})},InsideNearTop:function(n,t){var r,o,e,u,s,f,i=n.data;"number"==typeof i&&(i=$$WPComp.Instances[i]);e=i.$container;r=$afe.jq(window);o=$$WPContain.Positions.getOffset.apply(i,[t]);u=$afe.select("#header").outerHeight()||null;s=$afe.select("body").hasClass("scrollDisabled")?u-$$WPUtil.cssValueToPixels($afe.select("body").css("margin-top"))+10+"px":$afe.select("html").hasClass("mobile")?u+10+"px":u+$$WPUtil.getScrollTop()+10+"px";scrollLeft=$$WPUtil.getScrollLeft();window.visualViewport&&Math.round(window.visualViewport.width)!==r.innerWidth()&&(scrollLeft=0);(f=scrollLeft+(r.width()-e.outerWidth())/2-o.x)<0&&(f=0);$afe.select("html").hasClass("mobile")&&r.scrollTop(0);e.css({left:f,top:s,right:f})},getOffset:function(n){var t,i,r;return this.origOffset&&!n||(this.$container.css({position:"absolute",top:0,left:0,right:0}),t=this.$container.offset(),"rtl"===$afe.select("html").safeAttr("dir")?(i=$afe.jq(window).width(),r=this.$container.outerWidth(),this.origOffset={x:i-(t.left+r),y:t.top}):this.origOffset={x:t.left,y:t.top}),this.origOffset}};$$WPUtil.guaranteeExistence($$WP,"Popups");$$WPUtil.guaranteeExistence($$WP,"Utilities.UI");$$WPPop=$$WP.Popups;$$WPContain.Popup=function(n){switch($$WPComp.applySettings(n,this),this.Size){case $$WPContain.Popup.SizeEnum.SMALL:this.Class+=" small";break;case $$WPContain.Popup.SizeEnum.MEDIUM:this.Class+=" medium";break;case $$WPContain.Popup.SizeEnum.LARGE:this.Class+=" large"}null===this.positioningFunction&&(this.positioningFunction=$$WPContain.Positions.InsideCentered);this.$parent=$afe.select("#classicPopupRoot");this.$parent=this.$parent&&this.$parent.length>0?this.$parent:$afe.jq(document.body);this._shouldOverrideMobileBack()&&(Array.isArray(this.Components)?this.Components.forEach(function(n){n.IsClosable=!1}):this.Components.IsClosable=!1);this.Containers$ContainerComponent({});this.addEventListener("resize",this._resizePopup);this.addEventListener("click",this._clickPopup);this.addEventListener("keydown",this._keydownPopup);this.addEventListener("fullscreenchange",this._adjustFullscreen);this.GetInvisibleLastFocusAnchor&&this.addEventListener("keyup",this._keyupPopup);$$WP.Utilities.UI.IsMobile&&this.addEventListener("focusout",this._onMobileFocusOut);!1!==this.HasBackButton&&(this.HasBackButton||isDataTile()&&this.IsClosable&&this.Size!=$$WPContain.Popup.SizeEnum.SMALL)&&(""===this.BackButtonText&&(this.BackButtonText=$$WP.Strings.get("PopupBackToPreviousPageButton",this.StringsNamespace)),null===this.ToolbarButtons&&(this.ToolbarButtons=[]),this.ToolbarButtons.push(new $$WPComp.ComplexObjects.Button(this.BackButtonText,null,"secondary neutral previouspage","close",this.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(){if(this.TitleText&&this.TitleText.string&&!$$WP.Utilities.IsNullOrEmpty(this.TitleText.string)||this._Title&&this._Title.Text&&!$$WP.Utilities.IsNullOrEmpty(this._Title.Text))return!0;for(i=0;i<this._Components.length;i++)if(this._Components[i].TitleText&&this._Components[i].TitleText.string&&!$$WP.Utilities.IsNullOrEmpty(this._Components[i].TitleText.string)||this._Components[i]._Title&&this._Components[i]._Title.Text&&!$$WP.Utilities.IsNullOrEmpty(this._Components[i]._Title.Text))return!0;return!1},show:function(n){var t,i,r;if((this._componentsHaveTitleText()||$$WP.Debug.logError("TitleText cannot be null or empty for popups."),!0!==this._visible)&&(this.__setAriaHidden(!0),this.$container.find(".alertLive").length>0&&(this.MonitorAriaLiveContent=!1),this.$container.safeAttr("role","dialog"),this.$container.safeAttr("aria-modal","true"),this._ScrollBarPosition=$$WPUtil.getScrollTop(),this._ScrollBarLeft=$$WPUtil.getScrollLeft(),this._IsScrollBarDisabledWhenOpened=$afe.select("body").hasClass("scrollDisabled"),this._IsScrollBarDisabledWhenOpened&&(this._InitialBodyMarginTop=$afe.select("body").css("margin-top"),this._InitialBodyMarginLeft=$afe.select("body").css("margin-left")),this.setAppropriateScrollBar(),$$WP.Debug.UpdateTopMarginForBanners(),this.HasOverlay&&this._overlay.on(!this.IsClosable,this),this.Containers$ContainerComponent$show(n),i=$afe.select("#popupCloseAction"),(i&&i.on("click","",this.ComponentNumber,this._closePopup),this._supportsAriaDescription()&&(this.AriaDescribedByID.length>0||(t=this.AriaDescriptionComponentNumber>-1?this.AriaDescriptionComponentNumber:this.ComponentNumber,this.AriaDescribedByID="popupdescription"+t),this.$container.safeAttr("aria-describedby",this.AriaDescribedByID),this.MonitorAriaLiveContent=!1),this._supportsAriaLabel()&&(this.AriaLabelledByID.length>0||(t=this.AriaLabelComponentNumber>-1?this.AriaLabelComponentNumber:this.ComponentNumber,this.AriaLabelledByID="popuplabel"+t),this.$container.safeAttr("aria-labelledby",this.AriaLabelledByID)),this.MonitorAriaLiveContent&&(this.$container.safeAttr("aria-live","polite"),this.$container.safeAttr("aria-relevant","additions")),this.setFocus(),this.focus(),$afe.jq(window).on("resize orientationchange","",this.ComponentNumber,this.__windowResize),this._shouldOverrideMobileBack())&&(r=this._getMobileBackEvents(),this.$container.data("_cachedWindowEvents",[]),r.forEach(function(n){this.$container.data("_cachedWindowEvents").push(n)},this),$afe.jq(window).off("mobile_back"),$afe.jq(window).on("mobile_back","",this.ComponentNumber,this.__mobileBack)),this.__otherPopupsExist()&&(this.__setAriaHiddenPreviousPopupContent(!0),popupAlert=this._createPopupAlert(),this.$container.safePrepend(popupAlert),this.focus(),popupAlert.setAttribute("tabindex","-1")),this._MinContentHeight=$$WPUtil.cssValueToPixels(this.$content.css("min-height")),this.setAppropriateContentHeight(),isDataTile()&&this.Size!==$$WPContain.Popup.SizeEnum.SMALL))try{window.history.pushState(null,null,location.href);scrollTopOfTheIframe(0,!0)}catch(n){$$WP.Debug.log("Cannot add Push state as the parent domain is not accessible")}},setAppropriateScrollBar:function(){var u,f,e,n=$afe.select("body"),t=$afe.jq(window),i=$afe.select("#header");if(u=t.width(),f=t.height(),$$WPUtil.cssValueToPixels(n.css("min-width")),e=this.$container.outerHeight()+this.$container.offset().top<=f&&this.$container.outerWidth()<=u,!isDataTile()&&e){var o=$$WPUtil.getScrollTop(),s=$$WPUtil.getScrollLeft(),r=i.hasClass("compact");this._IsWindowScrollDisabled=!0;o>75&&(r||i.hasClass("static")||(i.addClass("compact"),t.trigger("compactHeader"),r=!0));this._IsScrollBarDisabledWhenOpened||(n.css({"margin-top":"-"+o+"px"}),n.css({"margin-left":"-"+s+"px"}),n.addClass("scrollDisabled"),$$WP.Utilities.UI.EnforceEpicLogoVisibility(!r))}else this._IsWindowScrollDisabled=!1,n.css({"margin-top":""}),n.css({"margin-left":""}),n.removeClass("scrollDisabled")},setAppropriateContentHeight:function(){var t,i,r,n,u,f,e=$afe.select("#header").outerHeight();this._IsWindowScrollDisabled?(i=$afe.jq(window).innerHeight(),r=$afe.select(".Popup > .scrollable > .titlebar").outerHeight(),t=i-2*e-(f=$afe.select(".Popup > .scrollable > .toolbar").outerHeight())-r,this.$content.contentHeight(),u=i-e-f-r-10,void 0!==(n=this._MinContentHeight)&&n>u&&(n=u),void 0!==n&&n>t&&(t=n),t<150&&(t=150),this.$container.find("> .scrollable > .content").css({"max-height":t+"px","overflow-y":"auto","min-height":n+"px"})):this.$container.find("> .scrollable > .content").css({"max-height":"","overflow-y":"visible"})},setFocus:function(){try{this.firstFocus=WP.DOM.Search.getNextFocusable(this.$container.get(0))}catch(n){}try{this.lastFocus=null!==this.GetLastFocus?this.GetLastFocus(this.$container.get(0)):WP.DOM.Search.getLastFocusable(this.$container.get(0))}catch(n){}this.isFirstFocus=!1},__focus:function(){try{var n;(n=Array.isArray(this._Components)?this.__findFirstFocusableContent(this._Components,0):WP.DOM.Search.getNextFocusable(this._Components.$content))||"skipToMain"===(n=WP.DOM.Search.getNextFocusable(this.$container.get(0))).id&&(n=WP.DOM.Search.getNextFocusable(n));this.PierceShieldOfJustice&&n.setAttribute("data-pierce-shield","true");n.focus()}catch(n){}},__windowResize:function(n){var t=$$WPComp.getInstance(n.data);t&&(t._IsWindowScrollDisabled=!1,t.setAppropriateScrollBar(),t.$container.trigger("resize"))},hide:function(n){var i,t;if(!1!==this._visible){this.__otherPopupsExist()?this.__setAriaHiddenPreviousPopupContent(!1):this.__setAriaHidden(!1);this.Containers$ContainerComponent$hide(n);this._visible=!1;this._IsScrollBarDisabledWhenOpened?$afe.select("body").css({"margin-top":this._InitialBodyMarginTop,"margin-left":this._InitialBodyMarginLeft}):$afe.select("body").css({"margin-top":"","margin-left":""}).removeClass("scrollDisabled");this._IsWindowScrollDisabled=!1;this.HasOverlay&&this._overlay.off(!this.IsClosable,this);try{i=isDataTile()&&null!=window.frameElement;this.FocusOnClose.focus({preventScroll:i})}catch(n){}(this._ScrollBarPosition&&$$WPUtil.setScrollTop(this._ScrollBarPosition),this._ScrollBarLeft&&$$WPUtil.setScrollLeft(this._ScrollBarLeft),1===$afe.select(".Popup.component").length&&$afe.jq(window).off("resize orientationchange","",this.__windowResize),this._shouldOverrideMobileBack())&&(t=this.$container.data("_cachedWindowEvents"),t&&($afe.jq(window).off("mobile_back"),t.forEach(function(n){$afe.jq(window).on("mobile_back",n.selector,n.data,n.handler)})));"function"==typeof this.OnCloseCallback&&this.OnCloseCallback()}},reposition:function(n){if(0!==this.$container.parent().length){var t=this.$container.css("opacity");this.$container.css("opacity",0);try{this.positioningFunction({data:this},n)}catch(n){throw"repositioning error";}this.$container.css("opacity",t)}},setTitle:function(n,t,i,r){var u;n||t&&0!==t.length||r?this.$container.removeClass("notitle"):(u=!0,t=[new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("JumpToContent","Core.Popup"),null,"clearlabel","jumptocontent")],this.$container.addClass("notitle"));this.Containers$ContainerComponent$setTitle(n,t,i,r);u&&this.$title.addClass("clearlabel")},_resizePopup:function(){return!!this.isVisible()&&(this.reposition(!0),this.setAppropriateContentHeight(),this.setFocus(),!1)},_clickPopup:function(n){return n.dataId===$$WPComp.TITLEBARIDENTIFIER+"jumptocontent"?(this.focus(!0),!1):"focusanchor"!==n.dataId&&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,t;if(this.canResetFocusOnKeydown&&this.setFocus(),i=$afe.select(".infoBubbleWrapper.hover").length>0,27===n.keyCode&&this.IsClosable&&!i&&this.dispose(!1),9===n.keyCode){if(n.target===this.firstFocus||n.target===this.lastFocus)return n.shiftKey&&n.target===this.firstFocus?(this.lastFocus&&this.lastFocus.focus(),this.isFirstFocus&&delete this.isFirstFocus,!1):n.shiftKey||n.target!==this.lastFocus?void 0:(this.firstFocus&&this.firstFocus.focus(),this.isFirstFocus&&delete this.isFirstFocus,!1);if(this.isFirstFocus)return t=n.shiftKey?this.lastFocus:this.firstFocus,t&&t.focus(),delete this.isFirstFocus,!1}},_keyupPopup:function(n){var t=this.GetInvisibleLastFocusAnchor(this.$container.get(0));if(t)return n.shiftKey||n.target!==t?void(n.shiftKey&&n.target===t&&WP.DOM.Search.getPreviousFocusable(t).focus()):(t===this.lastFocus?(this.firstFocus&&this.firstFocus.focus(),this.isFirstFocus&&delete this.isFirstFocus):WP.DOM.Search.getNextFocusable(t).focus(),!1)},__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;i=(i=(i=$afe.select("#classicPopupRoot"))&&i.length>0?i:$afe.select("body"))&&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()&&0==i&&$$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<t.length;i++)t[i].setAttribute("aria-hidden",n)},__getPageElementsForAria:function(){return document.querySelectorAll("[data-hide-during-popup='true']")},__setAriaHiddenPreviousPopupContent:function(n){var t=[];for(t=this.__getAllPopups(),i=0;i<t.length;i++)t[i].getAttribute("data-component-id")!==this.$container.safeAttr("data-component-id")&&t[i].setAttribute("aria-hidden",n)},__otherPopupsExist:function(){return this.__getAllPopups().length>1},__getAllPopups:function(){var n=[],t=[],r=0;for(n=document.querySelectorAll("div[data-component-id]"),i=0;i<n.length;i++)n[i].classList.contains("Popup")&&(t[r++]=n[i]);return t},__findFirstFocusableContent:function(n,t){var r,i;return t>=n.length?null:(r=n[t].$content,!r)?this.__findFirstFocusableContent(n,++t):(i=WP.DOM.Search.getNextFocusable(r.get(0)),null!==i&&"popupCloseAction"!==i.id&&"OBJECT"!==i.tagName.toUpperCase()&&this.$container.get(0).contains(i)?i:this.__findFirstFocusableContent(n,++t))},focus:function(){try{null===this.FocusOnClose&&(this.FocusOnClose=WP.DOM.Search.getFocused(document.body))}catch(n){}try{this.__focus()}catch(n){}},_supportsAriaDescription:function(){if(this.SupportsAriaDescription)return!0;for(i=0;i<this._Components.length;i++)if(this._Components[i].SupportsAriaDescription)return this.AriaDescriptionComponentNumber=this._Components[i].ComponentNumber,!0;return!1},_supportsAriaLabel:function(){if(this.SupportsAriaLabel)return!0;for(i=0;i<this._Components.length;i++)if(this._Components[i].SupportsAriaLabel)return!0;return!1},_closePopup:function(n){var t=$$WPComp.getInstance(n.data);t&&t.dispose()},_createPopupAlert:function(){var n=document.createElement("span"),u;n.className="clearlabel";n.setAttribute("tabindex","0");n.setAttribute("role","alert");this.hasOwnProperty("PierceShieldOfJustice")&&n.setAttribute("data-pierce-shield","true");var i=this._Title.Text.toString(),t=$$WP.Strings.getNamespace("Core.Popup"),r=isDataTile()&&this.Size!==$$WPContain.Popup.SizeEnum.SMALL?"PopupWindowAlert":"PopupAlert";return r+=i?"WithTitle":"",t.addMnemonic("@MYCHART@PopupTitle@",i),u=t.getStringForTemplate(r),t.removeMnemonic("@MYCHART@PopupTitle@"),n.appendChild(document.createTextNode(u)),n}};$$WPContain.Popup.extend("Containers.ContainerComponent");$afe.jq(window).on("popupResize",function(){var n=$$WPComp.getInstance($afe.select(".Popup.component").safeAttr("data-component-id"));null!==n&&$$WPComp.isComponent(n)&&"function"==typeof n.setAppropriateContentHeight&&n.setAppropriateContentHeight()});$$WPContain.Panel=function(n){$$WPComp.applySettings(n,this);this.$parent=this.$parent||$afe.select("#main");this.Containers$ContainerComponent({})};$$WPContain.Panel.prototype={IsClosable:!1,Class:"Panel",$parent:$afe.select("#main")};$$WPContain.Panel.extend("Containers.ContainerComponent");$$WP.Containers.CommunityListManagerContainer=function(n){n.Components=[n.HeaderComponent||this.HeaderComponent,n.ListComponent||this.ListComponent,n.FooterComponent||this.FooterComponent];this.Containers$ContainerComponent(n)};$$WP.Containers.CommunityListManagerContainer.prototype={HeaderComponent:$$WPComp.Component.prototype,FooterComponent:$$WPComp.Component.prototype,ListComponent:$$WPComp.Component.prototype,show:function(n){!0!==n?(this.HeaderComponent.hide(),this.ListComponent.show(),this.FooterComponent.hide(),this.Components$Component$show()):this.Containers$ContainerComponent$show(!0)}};$$WP.Containers.CommunityListManagerContainer.extend("Containers.ContainerComponent");!function(){var t=Handlebars.template,n=$$WP.Templates=$$WP.Templates||{};(n=n.Core=n.Core||{}).calendar=t({compiler:[8,">= 4.3.0"],main:function(n,t,i,r,u,f,e){var c,o,h=null!=t?t:n.nullContext||{},l=n.hooks.helperMissing,v="function",a=n.escapeExpression,s=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'<div class="calendar '+a(typeof(o=null!=(o=s(i,"Class")||(null!=t?s(t,"Class"):t))?o:l)===v?o.call(h,{name:"Class",hash:{},data:u,loc:{start:{line:1,column:72},end:{line:1,column:81}}}):o)+'"><table><thead><tr>'+(null!=(c=s(i,"if").call(h,null!=t?s(t,"IsPrevEnabled"):t,{name:"if",hash:{},fn:n.program(1,u,0,f,e),inverse:n.program(3,u,0,f,e),data:u,loc:{start:{line:1,column:101},end:{line:1,column:336}}}))?c:"")+'<th id="calmonth'+a(typeof(o=null!=(o=s(i,"componentNumber")||(null!=t?s(t,"componentNumber"):t))?o:l)===v?o.call(h,{name:"componentNumber",hash:{},data:u,loc:{start:{line:1,column:352},end:{line:1,column:371}}}):o)+'" class="calmonth" colspan="5">'+a(typeof(o=null!=(o=s(i,"Title")||(null!=t?s(t,"Title"):t))?o:l)===v?o.call(h,{name:"Title",hash:{},data:u,loc:{start:{line:1,column:402},end:{line:1,column:411}}}):o)+"<\/th>"+(null!=(c=s(i,"if").call(h,null!=t?s(t,"IsNextEnabled"):t,{name:"if",hash:{},fn:n.program(5,u,0,f,e),inverse:n.program(3,u,0,f,e),data:u,loc:{start:{line:1,column:416},end:{line:1,column:652}}}))?c:"")+"<\/tr><tr>"+(null!=(c=s(i,"each").call(h,null!=t?s(t,"Days"):t,{name:"each",hash:{},fn:n.program(7,u,0,f,e),inverse:n.noop,data:u,loc:{start:{line:1,column:661},end:{line:1,column:776}}}))?c:"")+"<\/tr><\/thead>"+a((s(i,"$$WP$Components$Calendar$getCalendarObject")||t&&s(t,"$$WP$Components$Calendar$getCalendarObject")||l).call(h,null!=t?s(t,"ComponentNumber"):t,{name:"$$WP$Components$Calendar$getCalendarObject",hash:{},data:u,loc:{start:{line:1,column:789},end:{line:1,column:851}}}))+"<\/table><\/div> "},1:function(n,t,i,r,u){var l,f,o=null!=t?t:n.nullContext||{},s=n.hooks.helperMissing,h="function",c=n.escapeExpression,e=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'<th id="calprev'+c(typeof(f=null!=(f=e(i,"componentNumber")||(null!=t?e(t,"componentNumber"):t))?f:s)===h?f.call(o,{name:"componentNumber",hash:{},data:u,loc:{start:{line:1,column:137},end:{line:1,column:156}}}):f)+'" title="'+c(typeof(f=null!=(f=e(i,"PrevTitle")||(null!=t?e(t,"PrevTitle"):t))?f:s)===h?f.call(o,{name:"PrevTitle",hash:{},data:u,loc:{start:{line:1,column:165},end:{line:1,column:178}}}):f)+'" class="'+c(typeof(f=null!=(f=e(i,"PrevClass")||(null!=t?e(t,"PrevClass"):t))?f:s)===h?f.call(o,{name:"PrevClass",hash:{},data:u,loc:{start:{line:1,column:187},end:{line:1,column:200}}}):f)+' calprev calnavbtn"><button data-id="calprev" href="#" aria-label="'+c(typeof(f=null!=(f=e(i,"PrevTitle")||(null!=t?e(t,"PrevTitle"):t))?f:s)===h?f.call(o,{name:"PrevTitle",hash:{},data:u,loc:{start:{line:1,column:267},end:{line:1,column:280}}}):f)+'">'+(null!=(l=typeof(f=null!=(f=e(i,"PrevButton")||(null!=t?e(t,"PrevButton"):t))?f:s)===h?f.call(o,{name:"PrevButton",hash:{},data:u,loc:{start:{line:1,column:282},end:{line:1,column:298}}}):f)?l:"")+"<\/button><\/th>"},3:function(){return"<th><\/th>"},5:function(n,t,i,r,u){var l,f,o=null!=t?t:n.nullContext||{},s=n.hooks.helperMissing,h="function",c=n.escapeExpression,e=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'<th  id="calnext'+c(typeof(f=null!=(f=e(i,"componentNumber")||(null!=t?e(t,"componentNumber"):t))?f:s)===h?f.call(o,{name:"componentNumber",hash:{},data:u,loc:{start:{line:1,column:453},end:{line:1,column:472}}}):f)+'" title="'+c(typeof(f=null!=(f=e(i,"NextTitle")||(null!=t?e(t,"NextTitle"):t))?f:s)===h?f.call(o,{name:"NextTitle",hash:{},data:u,loc:{start:{line:1,column:481},end:{line:1,column:494}}}):f)+'" class="'+c(typeof(f=null!=(f=e(i,"NextClass")||(null!=t?e(t,"NextClass"):t))?f:s)===h?f.call(o,{name:"NextClass",hash:{},data:u,loc:{start:{line:1,column:503},end:{line:1,column:516}}}):f)+' calnext calnavbtn"><button data-id="calnext" href="#" aria-label="'+c(typeof(f=null!=(f=e(i,"NextTitle")||(null!=t?e(t,"NextTitle"):t))?f:s)===h?f.call(o,{name:"NextTitle",hash:{},data:u,loc:{start:{line:1,column:583},end:{line:1,column:596}}}):f)+'">'+(null!=(l=typeof(f=null!=(f=e(i,"NextButton")||(null!=t?e(t,"NextButton"):t))?f:s)===h?f.call(o,{name:"NextButton",hash:{},data:u,loc:{start:{line:1,column:598},end:{line:1,column:614}}}):f)?l:"")+"<\/button><\/th>"},7:function(n,t,i,r,u,f,e){var o,s=n.lookupProperty||function(n,t){if(Object.prototype.hasOwnProperty.call(n,t))return n[t]};return'<th class="hdr dayHeading" '+(null!=(o=s(i,"if").call(null!=t?t:n.nullContext||{},null!=e[1]?s(e[1],"IsAriaHidden"):e[1],{name:"if",hash:{},fn:n.program(8,u,0,f,e),inverse:n.noop,data:u,loc:{start:{line:1,column:702},end:{line:1,column:751}}}))?o:"")+">"+(null!=(o=n.lambda(t,t))?o:"")+"<\/th>"},8:function(){return' aria-hidden="true"'},useData:!0,useDepths:!0})}();$$WPUtil.guaranteeExistence($$WP,"Components");$$WP.Components.Calendar=function(n){var r,u,f,e,i,t;for("undefined"!=typeof $$WP&&void 0!==$$WP.Strings&&($$WP.Strings.setDefaultNamespace("Global.Calendar"),$$WP.Strings.add("CalendarMonthTitleFormat","Jan"),$$WP.Strings.add("CalendarAudibleDate","_STR_AudibleDate_"),$$WP.Strings.add("HoverText",$$WP.Strings.get("SelectTooltip","UI.Calendar")),$$WP.Strings.add("HoverTextDisabled",$$WP.Strings.get("NotAvailableTooltip","UI.Calendar")),$$WP.Strings.add("NextButton",""),$$WP.Strings.add("PrevButton",""),$$WP.Strings.clearDefaultNamespace()),this.onSelect=n.onSelect||function(){},this.TitleText=n.TitleText||"",this.Image=n.Image||"",this.filter=n.filter||function(){return!0},this.FromDTE=n.FromDTE,this.ToDTE=n.ToDTE,this.callback=n.callback||function(){},this.SelectedDate=n.SelectedDate,this.HighlightDays=n.HighlightDays||[],this.HasSelectableDays=!0===n.HasSelectableDays,this._calendarMouseover=n._calendarMouseover||this._calendarMouseover,this.IsClickEventEnabled=n.IsClickEventEnabled||!0,this.IsNextEnabled=n.IsNextEnabled||!1,this.IsPrevEnabled=n.IsPrevEnabled||!1,this.IsAriaHidden=n.IsAriaHidden||!1,i=0;i<this.HighlightDays.length;i++)this.HighlightDays[i].length>0&&(u=(r=new Date(this.HighlightDays[i])).getMonth()+1,e=r.getDate(),f=r.getFullYear(),this.Dict[u+"/"+e+"/"+f]=!0,this.SelectableMonths[u+"/"+f]=!0);for(this.Today=$$WP.Utilities.IsNullOrEmpty(this.SelectedDate)?new Date:"function"==typeof this.SelectedDate.getYear?this.SelectedDate:"string"==typeof this.SelectedDate.getYear?new Date(this.SelectedDate):new Date,this.Month=this.Today.getMonth(),this.Year=this.Today.getFullYear(),this.PrevButton=$$WP.Strings.get("PrevButton","Global.Calendar"),this.NextButton=$$WP.Strings.get("NextButton","Global.Calendar"),this.HoverText=$$WP.Strings.get("HoverText","Global.Calendar"),this.HoverTextDisabled=$$WP.Strings.get("HoverTextDisabled","Global.Calendar"),t=0;t<7;t++)this.Days[t]='<span class="clearlabel">'+getDayName((t+getFirstDayOfWeek())%7)+"<\/span>"+getDayLetter((t+getFirstDayOfWeek())%7);this.Components$TemplateComponent(n);this.addEventListener("click",this._calendarClick);this.addEventListener("focus",this._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 i,r,u,f,e,o,n=this.Month,t=this.Year;this.hasSelectableDay(n,t);f=$$WP.I18N.monthTitleFormat(makeDate(t,n+1));$$WP.Strings.setDefaultNamespace("UI.Calendar");$$WP.Strings.addMnemonic("@MYCHART@DATEWITHMONTH@",$$WP.I18N.monthTitleFormat(makeDate(t,n)));i=$$WP.Strings.get("CalendarNextPrevMonthHelpText");$$WP.Strings.removeMnemonic("@MYCHART@DATEWITHMONTH@");$$WP.Strings.addMnemonic("@MYCHART@DATEWITHMONTH@",$$WP.I18N.monthTitleFormat(makeDate(t,n+2)));e=$$WP.Strings.get("CalendarNextPrevMonthHelpText");$$WP.Strings.removeMnemonic("@MYCHART@DATEWITHMONTH@");$$WP.Strings.clearDefaultNamespace();r=this.IsPrevEnabled;o=this.IsNextEnabled;u=this.IsAriaHidden;this.Data={PrevClass:undefined,PrevButton:this.PrevButton,IsPrevEnabled:r,Title:f,PrevTitle:i,NextTitle:e,NextClass:undefined,NextButton:this.NextButton,IsNextEnabled:o,IsAriaHidden:u,Days:this.Days,ComponentNumber:this.ComponentNumber}},reInit:function(n){var i,u,f,e,r,t;if(n.HighlightDays)for(t=0;t<n.HighlightDays.length;t++)(r=n.HighlightDays[t])&&r.length>0&&(u=(i=new Date(r)).getMonth()+1,e=i.getDate(),f=i.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&&("calnext"===n.dataId&&(this.drawNextMonth(),WP.Events.cancelEvent(n),WP.Events.preventDefault(n)),"calprev"===n.dataId&&(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&&"calendar"===t.id.toLowerCase())return!0;return!1},setClickFunction:function(n){for(var i,t,s=this.hoverText,h=this.hoverTextDisabled,c=this.clickFunction,f=n.getElementsByTagName("td"),u=new Date,l=document.all?"hand":"pointer",e=function(n,t){WP.Events.addListener(n,"click",c);"ctrl"===n.className?(WP.Events.addListener(n,"mouseover",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,"mouseover",function(){n.firstChild.focus()}),WP.Events.addListener(n.firstChild,"focus",hi()));n.style.cursor=l;!0!==t&&(n.title=s)},o=function(n){n.style.cursor="default";n.title=h},r=0;r<f.length;++r)"null"!==(t=(i=f[r]).className)&&"hdr"!==t&&i.firstChild&&("ctrl"===t?e(i,!0):t.indexOf("othermonth")>0||0===t.indexOf("n")||0===t.indexOf("wkndn")||"ctrln"===t?o(i):"today"!==t||this.filter(u.getFullYear(),u.getMonth(),u.getDate())?e(i):o(i))},drawNextMonth:function(){this.Month=(this.Month+1)%12;0===this.Month&&this.Year++;this.set()},drawPreviousMonth:function(){this.Month=this.Month-1;this.Month<0&&(this.Month+=12);11===this.Month&&this.Year--;this.getCalendarObject();this.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 o,n,i,r,t,l=document.createElement("tbody"),u=this.Month,e=this.Year,f=new Date,y=f.getDate(),p=f.getMonth(),w=f.getFullYear(),b=WP.DOM.Create.tag,k=(this.hasSelectableDay(u,e),this.IsAriaHidden),d=this,s,h,a,v,c;for(f.setHours(0,0,0,0),a=function(n,t,i){var r=n.getMonth(),u=n.getDate(),f=n.getFullYear();return n.getDay(),!($$WP.Utilities.IsNullOrEmpty(i)||t||!i[r+1+"/"+u+"/"+f])},v=function(n,t,i,r){var o,e=n.getMonth(),s=n.getDate(),h=n.getFullYear(),f="",c=n.getDay();if($$WP.Utilities.IsNullOrEmpty(i)||t||i[e+1+"/"+s+"/"+h]&&(f=" hasevents"),n<r)f+=" past";else if(e===u&&e===p&&s===y&&h===w)return"today"+f;return f+=t?" othermonth":"",o=0===c||6===c,d.filter(h,e,s)&&!t?(o?"wknd":"d")+f:(o?"wkndn":"n")+f},(s=(n=makeDate(e,u+1,1)).getDay()-getFirstDayOfWeek())<0&&(s+=7),n.setDate(n.getDate()-s);n.getMonth()!==u+1&&n.getFullYear()<=e;){for(o=document.createElement("tr"),h=0;h<7;h++)t=n.getMonth()!==u,c=a(n,t,this.Dict),!t&&this.filter(e,u,n.getDate())?(c?(r=WP.DOM.Create.anchoredNode(this.drawCalendarDate(n),!0,"")).className="haseventfocus selectableevent":r=this.drawCalendarDate(n),this.firstDate&&""!==this.firstDate||(this.firstDate=n.getDate()),(!this.lastDate||this.lastDate<n.getDate())&&(this.lastDate=n.getDate())):r=document.createTextNode(t?"":n.getDate()),i=b("td",v(n,t,this.Dict,f),t?"":"cal_"+n.getFullYear()+"_"+n.getMonth()+"_"+n.getDate()),k&&!$afe.jq(i).hasClass("hasevents")&&i.setAttribute("aria-hidden","true"),c||$$WP.Utilities.IsNullOrEmpty(r)||t?i.appendChild(r):dangerou$.setHtml(i,r),o.appendChild(i),n.setDate(n.getDate()+1);l.appendChild(o)}return l.innerHTML},drawCalendarDate:function(n){return'<span class="clearlabel">'+$$WP.I18N.getCalendarDateAriaString(n)+'<\/span><span aria-hidden="true">'+n.getDate()+"<\/span>"}};Handlebars.registerHelper("$$WP$Components$Calendar$getCalendarObject",function(n){return new Handlebars.SafeString($$WP.Components.getInstance(n).getCalendarObject())});$$WP.Components.Calendar.extend("Components.TemplateComponent");$$WPUtil.guaranteeExistence($$WP,"Containers");$$WP.Containers.MultiMonthCalendar=function(n){var i,r,o,u,t,f,e,s;for(this.Containers$ContainerComponent(n),this.NumOfMonths=n.NumOfMonths||2,this.Class="multiMonthCalendar",this.Today=new Date,this.Month=this.Today.getMonth(),this.Year=this.Today.getFullYear(),this.IsAriaHidden=n.IsAriaHidden||!1,u="SingleCalendar ",u+=this.NumOfMonths<2?"full":this.NumOfMonths>2?"onethird":"half",i=this.Month,r=this.Year,o=this.IsAriaHidden,t=0;t<this.NumOfMonths;t++)f=!1,e=!1,0===t&&(e=!0),t===this.NumOfMonths-1&&(f=!0),s=new $$WP.Components.Calendar({Class:u,Month:i,Year:r,IsClickEventEnabled:!1,IsNextEnabled:f,IsPrevEnabled:e,IsAriaHidden:o}),0==(i=(i+1)%12)&&r++,this.CalendarComponents[t]=s,this.addComponent(this.CalendarComponents[t]),this.CalendarComponents[t].show();this.Containers$ContainerComponent(n);this.addEventListener("click",this._calendarClick)};$$WP.Containers.MultiMonthCalendar.prototype={Today:{},NumOfMonths:0,Month:"",Year:"",CalendarComponents:[],Class:"multiMonthCalendar",MonthsMap:{},HighlightDays:[],data:{},IsAriaHidden:!1,setData:function(n){for(var i,t=0;t<this.NumOfMonths;t++)this.CalendarComponents[t].Data=n,i=this.CalendarComponents[t].settings||{},i.HighlightDays=n.HighlightDays,this.CalendarComponents[t].reInit(i);this.MonthsMap=n.MonthsMap||{};this.MonthsMap&&this.setToolbarButtons()},setToolbarButtons:function(){var r,u,e,o,t,i,n,f=[];r=this.Month;u=this.Year;0==(r=(r+1)%12)&&u++;this.getFormattedMonthID(r,u);t=this.getPreviousEvent();i=this.getNextEvent();$$WP.Strings.setDefaultNamespace("clinical.todo");t&&(n=new Date(this.MonthsMap[t].EndEvent.EventDate),$$WP.Strings.addMnemonic("@MYCHART@APPTTITLE@",this.MonthsMap[t].EndEvent.EventName),$$WP.Strings.addMnemonic("@MYCHART@APPTMONTH@",getMonthAbbr(n.getMonth()+1)),$$WP.Strings.addMnemonic("@MYCHART@APPTDATE@",n.getDate()),$$WP.Strings.addMnemonic("@MYCHART@APPTYEAR@",n.getFullYear()),e=$$WP.Strings.getForTemplate("calendarnextandpreveventtitle"),$$WP.Strings.removeMnemonic("@MYCHART@APPTTITLE@"),$$WP.Strings.removeMnemonic("@MYCHART@APPTMONTH@"),$$WP.Strings.removeMnemonic("@MYCHART@APPTDATE@"),$$WP.Strings.removeMnemonic("@MYCHART@APPTYEAR@"),f.push(new $$WPComp.ComplexObjects.Button(e,"","calendarBackEventBtn calendarBtns tertiary neutral",t)));i&&(n=new Date(this.MonthsMap[i].StartEvent.EventDate),$$WP.Strings.addMnemonic("@MYCHART@APPTTITLE@",this.MonthsMap[i].StartEvent.EventName),$$WP.Strings.addMnemonic("@MYCHART@APPTMONTH@",getMonthAbbr(n.getMonth()+1)),$$WP.Strings.addMnemonic("@MYCHART@APPTDATE@",n.getDate()),$$WP.Strings.addMnemonic("@MYCHART@APPTYEAR@",n.getFullYear()),o=$$WP.Strings.getForTemplate("calendarnextandpreveventtitle"),$$WP.Strings.removeMnemonic("@MYCHART@APPTTITLE@"),$$WP.Strings.removeMnemonic("@MYCHART@APPTMONTH@"),$$WP.Strings.removeMnemonic("@MYCHART@APPTDATE@"),$$WP.Strings.removeMnemonic("@MYCHART@APPTYEAR@"),f.push(new $$WPComp.ComplexObjects.Button(o,"","calendarNextEventBtn calendarBtns tertiary neutral",i)));$$WP.Strings.clearDefaultNamespace();this.setToolbar(f)},getPreviousEvent:function(){var n,u,i,f,e,t,r;for(t in u=this.Month,i=this.Year,n="",this.getFormattedMonthID(u,i),this.MonthsMap)if(this.MonthsMap.hasOwnProperty(t)&&(r=t.split("_"),r.length>=0))if(f=parseInt(r[0],10),e=parseInt(r[1],10),i>f)n=t;else{if(i!==f)break;if(!(u>e))break;n=t}return""!==n?n:null},getNextEvent:function(){var n,i,t,f,o,e,r,u;for(t=this.Month,n=this.Year,i=!1,e=0;e<this.NumOfMonths;e++)0==(t=(t+1)%12)&&n++;for(r in this.getFormattedMonthID(t,n),this.MonthsMap)if(this.MonthsMap.hasOwnProperty(r)&&(u=r.split("_"),u.length>=0&&(f=parseInt(u[0],10),o=parseInt(u[1],10),n<=f&&(i=!0,n===f&&(i=t<=o)),i)))return r;return null},moveCalendarMonths:function(n,t){for(var i=0;i<this.NumOfMonths;i++)this.CalendarComponents[i].Month=n,this.CalendarComponents[i].Year=t,0==(n=(n+1)%12)&&t++,this.CalendarComponents[i].setTitles(),this.CalendarComponents[i].refresh();this.setToolbarButtons()},_calendarClick:function(n){var t,i,r,u=!1;if("calnext"===n.dataId?(this.Month=(this.Month+1)%12,0===this.Month&&this.Year++,t=this.Month,i=this.Year,this.moveCalendarMonths(t,i),n.preventDefault(),this.$container.find('[data-id="calnext"]').focus()):"calprev"===n.dataId?(this.Month=this.Month-1,this.Month<0&&(this.Month+=12),11===this.Month&&this.Year--,t=this.Month,i=this.Year,this.moveCalendarMonths(t,i),n.preventDefault(),u=!0):-1!==n.target.className.indexOf("calendarNextEventBtn")?(r="",n.dataId&&(r=n.dataId.substring(7)),r.length>5&&(i=r.substring(0,4),t=r.substring(5,r.length)),i&&t&&(i=parseInt(i,10),t=parseInt(t,10),(t-=this.NumOfMonths-1)<0&&(t+=12,i--),this.Month=t,this.Year=i,this.moveCalendarMonths(t,i)),n.preventDefault(),u=!0):-1!==n.target.className.indexOf("calendarBackEventBtn")&&(r="",n.dataId&&(r=n.dataId.substring(7)),r.length>5&&(i=r.substring(0,4),t=r.substring(5,r.length)),i&&t&&(i=parseInt(i,10),t=parseInt(t,10),this.Month=t,this.Year=i,this.moveCalendarMonths(t,i)),n.preventDefault(),u=!0),u)return this.$container.find("button").first().focus(),!1},getFormattedMonthID:function(n,t){return t+"_"+n}};$$WP.Containers.MultiMonthCalendar.extend("Containers.ContainerComponent");var _dateChooser,formatCalendarDate=buildFormat("dddd MMMM d yyyy"),keyCode={TAB:9,ESC:27,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},landscapeCutoffHeight=460;DateChooser.prototype.drawCalendar=function(n){var f,o,s,t,e,i,r,h,u;n=void 0===n?null:n;_removeCalendar(!0);_dateChooser=this;t=document.createElement("div");s=new Date;t.id="calendar";t.className="calendar";t.setAttribute("role","dialog");t.setAttribute("aria-modal","true");t.setAttribute("aria-labelledby","monthlabel");this.lastDayOfMonth=new Date(this.year,this.month+1,0);this.lastDateOfMonth=this.lastDayOfMonth.getDate();e=getFirstDayOfWeek();i=this.lastDayOfMonth.getDay()-e;(this.lastDisplayedDateId=i>=0?this.lastDateOfMonth-i+6:this.lastDateOfMonth-i+7,i=new Date(this.year,this.month,1).getDay()-e,this.firstDisplayedDateId=i>=0?1-i:-i-6,t.appendChild(this.getCalendarObject()),this.setClickFunction(t),positionCalendar(this.trigger,t),f=checkIfMobile(),o=checkIfPopup(),f)&&(r=document.createElement("div"),r.className="calendarshield",r.setAttribute("tabindex","-1"),h=$afe.select("._PopupContainer"),o&&h.length>0?document.getElementsByClassName("_PopupContainer")[0].appendChild(r):document.body.appendChild(r),$afe.select(".calendarshield").css({"z-index":t.style.zIndex-1}));u=$afe.select(".currentselected");u.removeClass("currentselect");this.calendar=t;WP.Events.addListener(document.body,"click",removeCalendar);WP.Events.addListener(document.body,"mouseover",restoreHi);$afe.jq(window).on("orientationchange resize",handleOrientationChange);null!=n?(n=n>this.lastDateOfMonth?this.lastDateOfMonth:n,document.getElementById("cal"+n).firstChild.focus()):0!==u.length?(document.getElementById(u[0].id).firstChild.focus(),this.focusOn=u[0].id):this.month===this.today.getMonth()&&this.year===this.today.getFullYear()&&document.getElementById("cal"+s.getDate())?(document.getElementById("cal"+this.date).firstChild.focus(),this.focusOn="cal"+this.date):document.getElementById("cal"+this.firstDate)&&(document.getElementById("cal"+this.firstDate).firstChild.focus(),this.focusOn="cal"+this.firstDate);WP.Events.addListener(document.getElementById("calprev"),"keydown",keyOnPrevMonth);WP.Events.addListener(document.getElementById("calnext"),"keydown",keyOnNextMonth);WP.Events.addListener(document.getElementById("calcancel"),"keydown",tabOnCancel);accessibilityHidePage();this.firstDate="";this.lastDate="";f&&$$WP.Utilities.UI.ToggleBodyScrolling(!0);$afe.jq(window).on("orientationchange resize",handleOrientationChange)};DateChooser.prototype.clearCalendar=function(){_removeCalendar();this.callback();this.trigger.className=this.trigger.className.replace(" hidden","");this.trigger.focus()};DateChooser.prototype.setClickFunction=function(n){for(var i,t,e=this.clickFunction,u=n.getElementsByTagName("td"),o=(new Date,document.all?"hand":"pointer"),f=function(n){WP.Events.addListener(n,"click",e);"ctrl"===n.className?(WP.Events.addListener(n,"mouseover",hi()),WP.Events.addListener(n,"mouseout",lo),WP.Events.addListener(n,"mousedown",ctrlMouseDown),WP.Events.addListener(n.firstChild,"focus",ctrlFocus),WP.Events.addListener(n.firstChild,"blur",lo)):(WP.Events.addListener(n,"mouseover",function(){n.firstChild.focus()}),WP.Events.addListener(n.firstChild,"focus",hi()));n.style.cursor=o},s=function(n){n.style.cursor="default"},r=0;r<u.length;++r)"null"!==(t=(i=u[r]).className)&&"hdr"!==t&&i.firstChild&&("ctrl"===t?f(i):t.indexOf("wkndn")>=0||0===t.indexOf("n")||t.indexOf("ctrln")>=0?s(i):f(i));WP.Events.addListener(n,"keydown",HandleKeyDown);WP.Events.addListener(n,"keyup",HandleKeyUp)};DateChooser.prototype.isDateDisplayed=function(n){return n>=this.firstDisplayedDateId&&n<=this.lastDisplayedDateId};DateChooser.prototype.drawNextMonth=function(n){if(n=void 0===n?null:n,this.clearCalendar(),this.month=(this.month+1)%12,0===this.month&&this.year++,this.drawCalendar(n),n)0!==(t=$afe.select(".currentselected")).length&&t[0].id!==_dateChooser.focusOn&&lo({target:document.getElementById(t[0].id),srcElement:document.getElementById(t[0].id)});else{var t,i=document.getElementById("calnext");null!==i&&(i=i.firstChild)&&"BUTTON"===i.nodeName.toUpperCase()&&(i.focus(),0!==(t=$afe.select(".currentselected")).length&&t[0].id===_dateChooser.focusOn||lo({target:document.getElementById(_dateChooser.focusOn),srcElement:document.getElementById(_dateChooser.focusOn)}));document.getElementsByClassName("calendarwrapper")[0].scroll({top:0,left:0})}};DateChooser.prototype.drawPreviousMonth=function(n){if(n=void 0===n?null:n,this.clearCalendar(),this.month=this.month-1,this.month<0&&(this.month+=12),11===this.month&&this.year--,this.drawCalendar(n),n)0!==(t=$afe.select(".currentselected")).length&&t[0].id!==_dateChooser.focusOn&&lo({target:document.getElementById(t[0].id),srcElement:document.getElementById(t[0].id)});else{var t,i=document.getElementById("calprev").firstChild;i&&"BUTTON"===i.nodeName.toUpperCase()&&(i.focus(),0!==(t=$afe.select(".currentselected")).length&&t[0].id===_dateChooser.focusOn||lo({target:document.getElementById(_dateChooser.focusOn),srcElement:document.getElementById(_dateChooser.focusOn)}));document.getElementsByClassName("calendarwrapper")[0].scroll({top:0,left:0})}};DateChooser.prototype.getCalendarObject=function(){var r,i,t,u,s,e=document.createElement("div"),o=document.createElement("tbody"),h=this.month,l=this.year,k=this.filter,a=new Date,d=a.getDate(),g=a.getMonth(),nt=a.getFullYear(),f=WP.DOM.Create.tag,tt=$$WP.Strings.get("CancelButton","UI.Calendar"),c,v,b,w;for(e.className="calendarflexbox",c=document.createElement("div"),c.className="calendarwrapper",b=buildNavHeaderObject(h,l),e.appendChild(b),r=document.createElement("table"),thead=document.createElement("thead"),i=document.createElement("tr"),s=0;s<7;s++)t=f("th","hdr","","",getDayLetter((s+getFirstDayOfWeek())%7)),$afe.jq(t).safeAttr("aria-hidden","true"),i.appendChild(t);thead.appendChild(i);r.appendChild(thead);for(var y,it=function(n,t){var i,r,u=n.getMonth(),f=n.getDate(),e=n.getFullYear(),o=n.getDay();return i=0===o||6===o,r=u===g&&f===d&&e===nt,(k(e,u,f)?i?"wknd":"d":i?"wkndn":"n")+(r?" today":"")+(t?" othermonth":"")},p=this.firstDisplayedDateId,n=new Date(l,h,p);n.getMonth()!==h+1&&n.getFullYear()<=l;){for(i=document.createElement("tr"),y=0;y<7;y++)v=n.getMonth()!==h,t=f("td",it(n,v),"cal"+p),(u=f("button","","","",n.getDate())).setAttribute("aria-label",$$WP.I18N.getCalendarDateAriaString(n)),this.filter(n.getFullYear(),n.getMonth(),n.getDate())?(u.setAttribute("tabindex","0"),v||(this.firstDate&&""!==this.firstDate||(this.firstDate=n.getDate()),(!this.lastDate||this.lastDate<n.getDate())&&(this.lastDate=n.getDate()))):(u.setAttribute("tabindex","-1"),u.setAttribute("aria-disabled","true"),u.style.cursor="default"),t.appendChild(u),n.getTime()===_dateChooser.today.getTime()&&(applyClass(t,"currentselected"),applyClass(t,"hi")),i.appendChild(t),n.setDate(n.getDate()+1),p++;o.appendChild(i)}return r.setAttribute("role","presentation"),r.appendChild(o),c.appendChild(r),e.appendChild(c),w=f("div"),r=f("table","calendarfooter",""),o=f("tbody"),i=document.createElement("tr"),t=f("td","ctrl","calcancel"),u=f("button","","","",tt),t.appendChild(u),i.appendChild(t),o.appendChild(i),r.appendChild(o),w.appendChild(r),e.appendChild(w),r.setAttribute("role","presentation"),i.firstChild.colSpan=7,e};$$WP.Utilities.UI.Calendars=function(n){"load"===n.type&&$afe.select("input.date.withCalendar").each(function(){var n=$afe.jq(this);n.next().is("button.datechooserAnchor")||writeCalendar(n,n.safeAttr("data-filter"),makeStaticLink("images/calendar.svg"),n.safeAttr("data-filter-from"),n.safeAttr("data-filter-to"),n.safeAttr("data-callback"),void 0,void 0,"Pears")})};$$WP.Utilities.UI.Map.Support.calendars=$$WP.Utilities.UI.Calendars;"undefined"==typeof WP&&(WP={});void 0===WP.Validators&&(WP.Validators={});WP.Validators.currentAlerts={};WP.Validators.alertsHolder=null;WP.Validators.DisplayErrors=function(n,t,i){var r,f,u,e;if(!0!==WP.suppressErrors&&" "!==n||(n=""),"function"==typeof n){try{r=n(t)}catch(n){r=""}if(""===r)return}else r="string"==typeof n?n:n.innerText||n.textContent;if(f=i||WP.Validators.alertsHolder)if(t)u=WP.Validators.currentAlerts,r?(u[t]||((e=document.createElement("p")).className="alert",u[t]=e,f.appendChild(e)),u[t].innerHTML!==r&&u[t]!==r&&("object"==typeof n?($afe.jq(u[t]).empty(),u[t].appendChild(n)):dangerou$.setHtml(u[t],r))):u[t]&&(f.removeChild(u[t]),delete u[t]);else if("&nbsp;"!==r&&" "!==r&&r!==HTMLUnencode("&nbsp;")||(r="","object"==typeof n&&$afe.jq(n).text()===HTMLUnencode("&nbsp;")&&(n="&nbsp;")),WP.Validators.currentAlerts={},"object"==typeof n)$afe.jq(f).empty(),f.appendChild(n);else{if(f.innerHTML===r)return;(dangerou$.setHtml(f,r),"&nbsp;"===r)&&0===(f.innerText||f.textContent||"").length&&$T(f,String.fromCharCode(6))}else r&&$$WP.Utilities.quickMessageBox(r,"",[],null,[],"")};void 0===WP.Validators.Text&&(WP.Validators.Text={});WP.Validators.Text.MaxLengthAndRequired=function(n,t,i,r,u,f){var s,o,h,e={};n&&("string"==typeof n&&(n=document.getElementById(n)),u=u||null,h=(t=t||"").length>0,i=i||200,e.hideHintTextFun=function(){var t=$afe.jq(n);t.parent().hasClass("ghostInput")||(t.removeClass("fadedtext").val(""),WP.Events.removeListener(n,"focus",e.hideHintTextFun))},e.showHintTextFun=function(){var t=$afe.jq(n);t.parent().hasClass("ghostInput")||(t.addClass("fadedtext").val("Ingrese el texto aquí"),WP.Events.addListener(n,"focus",e.hideHintTextFun))},u&&(void 0===(o=WP.Validators.Forms[u])&&(WP.Validators.Forms[u]=[],o=WP.Validators.Forms[u]),s=o.length),e.isEmpty=WP.Strings.isEmpty,e.scrollPreventer=function(){var t=n.scrollTop,i=n.scrollHeight,r=t+n.height===n.scrollHeight;e.valueChecker();n.scrollTop!==t&&(n.scrollTop=!0===r?i:t);"function"==typeof f&&f()},e.valueChecker=function(){var a,c,l,f;$input=$afe.jq(n);$$WP.Utilities.setActivity();a=n.value.length;(c={})["@MYCHART@MAXLEN@"]=i;a>i?(c["@MYCHART@OVERLIMIT@"]=a-i,f=decodeMnemonics("@MYCHART@OVERLIMIT@ caracteres de más",c),l=createAlert(f,!1)):(c["@MYCHART@REMAININGCHARACTERS@"]=Math.max(0,i-a)+"",l=(f=e.isEmpty(n.value)&&h?t:" ").trim().length>0?createAlert(f,!0):decodeMnemonics("@MYCHART@REMAININGCHARACTERS@ de @MYCHART@MAXLEN@ caracteres disponibles",c),removeClassNames(n,"alertborder"));0===l.length&&(l="&nbsp;");WP.Validators.DisplayErrors(l,"",r);u&&(o[s]=f,f.trim().length>0?($input.safeAttr("data-invalid","true"),applyClass(n,"invalid")):($input.removeAttr("data-invalid"),removeClassNames(n,"invalid")))},e.focusFun=function(){removeClassNames(n,"alertborder");WP.Events.removeListener(n,"focus",e.focusFun)},e.blurFun=function(){var c,l,a,v,y;e.isEmpty(n.value)?(0===n.value.length&&e.showHintTextFun(),h)&&(c=!0,v={},v["@MYCHART@MAXLEN@"]=i,l=decodeMnemonics(t,v),a=createAlert(l,!0),!0===WP.suppressErrors&&applyClass(a,"clearlabel"),WP.Validators.DisplayErrors(a,"",r),u&&(o[s]=l)):n.value.length<=i?(removeClassNames(n,"alertborder"),WP.Validators.DisplayErrors("&nbsp;","",r),u&&(o[s]=" "),"function"==typeof f&&f()):c=!0;c&&!0!==WP.suppressErrors&&(applyClass(n,"alertborder"),WP.Events.addListener(n,"focus",e.focusFun));e.valueChecker();y=$afe.select("form#"+u);y.length>0&&$$WP.FormValidation.checkIfFormIsValid(y,!0)},e.afterCutPaste=function(){window.setTimeout(e.scrollPreventer,1)},WP.Events.addListener(n,"blur",e.blurFun),WP.Events.addListener(n,"keyup",e.scrollPreventer),WP.Events.addListener(n,"paste",e.afterCutPaste),WP.Events.addListener(n,"cut",e.afterCutPaste),WP.Validators.undoRedo(n),WP.suppressErrors=!0,e.scrollPreventer(),e.blurFun(),WP.suppressErrors=!1,n.removeMaxLength=function(){WP.Events.removeListener(n,"blur",e.blurFun);WP.Events.removeListener(n,"keyup",e.scrollPreventer);WP.Events.removeListener(n,"cut",e.afterCutPaste);WP.Events.removeListener(n,"paste",e.afterCutPaste);e.hideHintTextFun();e.focusFun();delete e.blurFun;delete e.scrollPreventer;delete e.valueChecker;delete e.isEmpty;delete e.firstAction;delete e.showHintTextFun;delete e.hideHintTextFun;delete e.focusFun;o[s]="";"function"==typeof f&&f();"function"==typeof n.removeUndoRedo&&n.removeUndoRedo()})};void 0===WP.Validators.undoRedo&&(WP.Validators.undoRedo=function(n){if(-1!==navigator.userAgent.toLowerCase().indexOf("msie")){var t={undoStack:[n.value],redoStack:[],isDeleting:!1,isInserting:!1,pop:function(n){if(0!==n.length){var t=n[n.length-1];return n.length-=1,t}},addUndoFun:function(i){"Ingrese el texto aquí"!==n.value&&(0!==t.undoStack.length&&n.value===t.undoStack[t.undoStack.length-1]||(t.undoStack[t.undoStack.length]=n.value,t.undoStack.length>75&&t.undoStack.shift(),!0!==i&&(t.redoStack=[])))},onKeyUp:function(i){var r,u=i||window.event;if(!1!==u.ctrlKey){if(90===u.keyCode){if(0===t.undoStack.length)return;t.redoStack[t.redoStack.length]=n.value;(r=t.pop(t.undoStack))===n.value&&(r=t.pop(t.undoStack)||"");n.value=r}else if(89===u.keyCode){if(0===t.redoStack.length)return;r=t.pop(t.redoStack);t.addUndoFun(!0);n.value=r}}else t.clearNativeUndo()},onKeyDown:function(n){var i=n||window.event;8===i.keyCode||46===i.keyCode?(t.isDeleting=!0,!0===t.isInserting&&(t.isInserting=!1,t.addUndoFun())):(t.isInserting=!0,!0===t.isDeleting?(t.isDeleting=!1,t.addUndoFun()):32===i.keyCode?(!0!==t.isSpacing&&t.addUndoFun(),t.isSpacing=!0):(!0===t.isSpacing&&t.addUndoFun(),t.isSpacing=!1))},clearNativeUndo:function(){var n=document.createElement("div");document.body.appendChild(n);document.body.removeChild(n)}};WP.Events.addListener(n,"keyup",t.onKeyUp);WP.Events.addListener(n,"paste",t.addUndoFun);WP.Events.addListener(n,"cut",t.addUndoFun);WP.Events.addListener(n,"keydown",t.onKeyDown);n.removeUndoRedo=function(){WP.Events.removeListener(n,"keyup",t.onKeyUp);WP.Events.removeListener(n,"paste",t.addUndoFun);WP.Events.removeListener(n,"cut",t.addUndoFun);WP.Events.removeListener(n,"keydown",t.onKeyDown);try{delete t.addUndoFun;delete t.onKeyDown;delete t.undoStack;delete t.redoStack;delete t.isDeleting;delete t.isInserting;delete t.pop;delete t.clearNativeUndo}catch(n){}};t.addUndoFun()}});void 0===WP.Validators.Calendar&&(WP.Validators.Calendar={aftertwodays:function(n,t,i){return new Date(n,t,i)-new Date>86399e3},past:function(n,t,i){return new Date(n,t,i)<=new Date},future:function(n,t,i){return new Date(n,t,i+1)>=new Date},range:function(n,t,i){var r,u,f;return u=window.cachedStartDate,f=window.cachedEndDate,r=new Date(n,t,i),!(u&&r<u)&&!(f&&r>f)},any:function(){return!0}});void 0===WP.Validators.Forms&&(WP.Validators.Forms={});WP.Validators.Forms.SelectionRequired=function(n,t,i,r,u,f){var s,o,h,e={};n&&("string"==typeof n&&(n=document.getElementById(n)),u=u||null,h=(t=t||"").length>0,i=i||-1,u&&(void 0===(o=WP.Validators.Forms[u])&&(WP.Validators.Forms[u]=[],o=WP.Validators.Forms[u]),s=o.length),e.scrollPreventer=function(){var t=n.scrollTop,i=n.scrollHeight,r=t+n.height===n.scrollHeight;e.blurFun();n.scrollTop!==t&&(n.scrollTop=!0===r?i:t);"function"==typeof f&&f()},e.focusFun=function(){removeClassNames(n,"alertborder");WP.Events.removeListener(n,"focus",e.focusFun)},e.blurFun=function(){var a,c,l;n.value==i?h&&(a=!0,c=decodeMnemonics(t,{}),l=createAlert(c,!0),!0===WP.suppressErrors&&applyClass(l,"clearlabel"),WP.Validators.DisplayErrors(l,"",r),u&&(o[s]=c)):(removeClassNames(n,"alertborder"),WP.Validators.DisplayErrors("","",r),u&&(o[s]=" "),"function"==typeof f&&f());a&&!0!==WP.suppressErrors&&(applyClass(n,"alertborder"),WP.Events.addListener(n,"focus",e.focusFun))},WP.Events.addListener(n,"blur",e.blurFun),WP.Events.addListener(n,"change",e.blurFun),WP.Events.addListener(n,"keyup",e.scrollPreventer),WP.suppressErrors=!0,e.scrollPreventer(),e.blurFun(),WP.suppressErrors=!1)};$$WPContain.HTMLTemplateContainer=function(n){(n=n||{}).$parent&&n.$parent.length>0&&(n.Html=n.$parent.html(),n.$parent.empty());this.Containers$Panel(n)};$$WPContain.HTMLTemplateContainer.prototype={SupportedComponents:[],ComponentProperties:{SupportAnimations:!0},ContainerProperties:{SupportAnimations:!0},Class:"HPtemplate",html:function(n){var t,i;this.clearComponents();this.Components$Component$html(n);this.show(!1);(t=this).$content.find("[data-component]").each(function(){var r,u,e,n,c,o,s,h,f;if(u=(r=$afe.jq(this)).safeAttr("data-component"),o=r.safeAttr("data-component-settings"),$.inArray(u,t.SupportedComponents)>=0||0===t.SupportedComponents.length){if((n=$$WPUtil.copyObject(t.ComponentProperties)).$container=n.$container||r,"campaigns"===u)return void(i=function(){new $$WP.CampaignOutreach.CampaignsController(n.$container).render()}.bind(this));if(o)for(n.TemplateSettings={},s=o.split("&"),f=0;f<s.length;f++)(h=s[f].split("="))[0]&&(n.TemplateSettings[h[0]]=h[1]);c=$$WPUtil.copyObject(t.ContainerProperties);n.$parent=n.$parent||r.parent();(e=t._getNewComponent(u,n,c))&&(t.addComponent(e),e.show())}});getCSRFTokenAsQS(function(){$.each(t._Components,function(n,t){t.load()});i&&i()})},_getNewComponent:function(n,t){var i;switch(n){case"alerts":try{i=$$WPUtil.ComponentFactory.HomePage.alerts(t)}catch(n){$$WP.Debug.log("Unable to load alerts component. "+n)}break;case"news":try{i=$$WPUtil.ComponentFactory.HomePage.news(t)}catch(n){$$WP.Debug.log("Unable to load news component. "+n)}break;case"quicklinks":try{i=$$WPUtil.ComponentFactory.HomePage.quickLinks(t)}catch(n){$$WP.Debug.log("Unable to load quicklinks component. "+n)}break;case"careteam":try{i=new $$WP.Clinical.CareTeam.Components.CareTeam(t)}catch(n){$$WP.Debug.log("Unable to load care team widget. "+n)}break;case"todo":try{i=new $$WP.Clinical.ToDo.Containers.ToDoEventsContainer(t)}catch(n){$$WP.Debug.log("Unable to load todo widget. "+n)}break;case"medications":try{i=new $$WP.Clinical.Medications.Components.MedicationsWidgetComponent(t)}catch(n){$$WP.Debug.log("Unable to load medications widget. "+n)}break;case"goals":try{i=new $$WP.Clinical.Goals.Components.GoalsComponent(t)}catch(n){$$WP.Debug.log("Unable to load goals widget. "+n)}break;case"guarantor":try{i=new $$WP.GuarantorVerification.Components.GuarantorDetailsComponent(t)}catch(n){$$WP.Debug.log("Unable to load guarantor widget. "+n)}break;case"viewdocuments":try{i=new $$WP.ViewDocument.Components.ViewDocument(t)}catch(n){$$WP.Debug.log("Unable to load view document widget. "+n)}break;case"externalalerts":try{i=new $$WP.Alerts.Components.ExternalAlertsComponent(t)}catch(n){$$WP.Debug.log("Unable to load external alerts. "+n)}break;case"reviewmessages":try{t.Mailbox=t.$container.safeAttr("data-mailbox");t.SupportAnimations=!1;i=new $$WP.Messaging.ReviewMessagesContainer(t)}catch(n){$$WP.Debug.log("Unable to load message list widget. "+n)}break;case"allergies":try{i=new $$WP.Clinical.Allergies.Components.Allergies(t)}catch(n){$$WP.Debug.log("Unable to load allergies. "+n)}break;case"healthissues":try{i=new $$WP.Clinical.HealthIssues.Components.HealthIssues(t)}catch(n){$$WP.Debug.log("Unable to load health issues. "+n)}break;case"medicationsdetails":try{i=new $$WP.Clinical.Medications.Components.MedicationsDetailsComponent(t)}catch(n){$$WP.Debug.log("Unable to load medications widget. "+n)}break;case"externallinking":try{i=new $$WP.Community.Components.ExternalLinkingComponent(t)}catch(n){$$WP.Debug.log("Unable to load external linking. "+n)}break;case"visitslist":try{i=new $$WP.Visits.VisitsListContainer(t)}catch(n){$$WP.Debug.log("Unable to load visits widget. "+n)}break;case"testresultspoc":try{i=new $$WP.Clinical.TestResultsPOC.Components.TRPComponent(t)}catch(n){$$WP.Debug.log("Unable to load test results POC list widget. "+n)}break;case"testresults":try{t.SupportAnimations=!1;i=new $$WP.Clinical.TestResults.TestResultsContainer(t)}catch(n){$$WP.Debug.log("Unable to load test results list widget. "+n)}break;case"personalnotes":try{i=new $$WP.Clinical.PersonalNotes.Components.PersonalNotesComponent(t)}catch(n){$$WP.Debug.log("Unable to load patient notes. "+n)}}return i}};$$WPContain.HTMLTemplateContainer.extend("Containers.Panel");$$WPUtil.ComponentFactory.HomePage.Main=function(n){return(n=n||{}).SupportedComponents=n.SupportedComponents||[],n.$parent=$afe.select("#homepagemain"),n.$parent.addClass("widgets"),new $$WPContain.HTMLTemplateContainer(n)};$$WPUtil.ComponentFactory.GuarantorVerification=function(n,t){return(t=t||{}).ComponentProperties=t.ComponentProperties||{},t.ComponentProperties.encCSN=n,t.SupportedComponents=["guarantor"],t.$parent=$afe.select("#guarantorverificationtemplate"),new $$WPContain.HTMLTemplateContainer(t)};$$WPUtil.ComponentFactory.HomePage.Sidebar=function(n){return(n=n||{}).SupportedComponents=n.SupportedComponents||[],n.$parent=$afe.select("#homepagesidebar"),n.$parent.addClass("widgets"),new $$WPContain.HTMLTemplateContainer(n)};$$WPComp.SafeToRedirectComponent=function(n){if($$WPComp.applySettings(n,this),"function"!=typeof this.callback)throw"A callback function is required for SafetoRedirectPopup";if(this.CallbackContext=this.CallbackContext||this,this.Components$Component({}),!WP.Events.showBeforeUnloadMessage())return WP.Events.beforeUnloadHold=!0,this.callback.apply(this.CallbackContext,[!0]),this._alreadyExecutedCallback=!0,void this.dispose();this.addEventListener("click",this.clickSafeToRedirect)};$$WPComp.SafeToRedirectComponent.prototype={IsClosable:!0,ToolbarButtons:[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("StayButtonText","Core.SafeToRedirectPopup"),null,"","stay"),new $$WPComp.ComplexObjects.Button($$WP.Strings.get("LeaveButtonText","Core.SafeToRedirectPopup"),null,"inlinedelete","leave")],TitleText:$$WP.Strings.get("SafeToRedirectTitle","Core.SafeToRedirectPopup"),Html:$$WP.Strings.get("Message","Core.SafeToRedirectPopup"),clickSafeToRedirect:function(n){if(n.dataId)return WP.Events.beforeUnloadHold=n.dataId===$$WPComp.TOOLBARIDENTIFIER+"leave",this._alreadyExecutedCallback=!0,this.callback.apply(this.CallbackContext,[WP.Events.beforeUnloadHold]),this.dispose(!0),!1},show:function(){this._alreadyExecutedCallback?this.dispose(!0):(this.Components$Component$show(),WP.Events.SafeToUnloadWarningDisplayed=!0)},dispose:function(n){this._isDisposed||(this._alreadyExecutedCallback||(this._alreadyExecutedCallback=!0,this.callback.apply(this.CallbackContext,[!1])),this.Components$Component$dispose(n),WP.Events.SafeToUnloadWarningDisplayed=!1)}};$$WPComp.SafeToRedirectComponent.canceledRedirect=function(){delete WP.Events.beforeUnloadHold};$$WPComp.SafeToRedirectComponent.extend("Components.Component");$$WPComp.TimeoutWarningComponent=function(n){var t,i;$$WP.Strings.setDefaultNamespace("Core.TimeOutPopup");t=$$WP.HyperspaceSession?"FromHyperspace":WP.Events.showBeforeUnloadMessage()?"WithChanges":"TimeOut";this.PreHtml=n.Html||n.Text||$$WP.Strings.get(t+"Message");this.Html=this.PreHtml;$$WPComp.applySettings(n,this);this._SecondsAtStart=Math.floor(this.SecondsLeft)||60;$$WP.Strings.addMnemonic("@MYCHART@SecondsLeft@",this._SecondsAtStart.toString());i=$$WP.HyperspaceSession?[new $$WPComp.ComplexObjects.Button(this.StayString||$$WP.Strings.getForTemplate("FromHyperspaceStayButtonText"),null,"","stay")]:this.isPreLogin?[new $$WPComp.ComplexObjects.Button(this.StayString||$$WP.Strings.getForTemplate("PreLoginStayButtonText"),null,"","stay"),new $$WPComp.ComplexObjects.Button(this.LeaveString||$$WP.Strings.getForTemplate("PreLoginLogOutButtonText"),null,"inlinedelete","leave")]:[new $$WPComp.ComplexObjects.Button(this.StayString||$$WP.Strings.getForTemplate("StayButtonText"),null,"","stay"),new $$WPComp.ComplexObjects.Button(this.LeaveString||$$WP.Strings.getForTemplate("LogOutButtonText"),null,"inlinedelete","leave")];this._clickContext=this._clickContext||this;this.TitleText=this.TitleText||$$WP.Strings.getForTemplate(t+"Title");this.ToolbarButtons=i;this.Components$Component();$$WP.Strings.removeMnemonic("@MYCHART@SecondsLeft@");$$WP.Strings.clearDefaultNamespace();$.proxy(this._createScreenReaderAlert(),this);this._timer=$.proxy(this._timer,this);this._TimerId=window.setTimeout(this._timer,1e3);this.$content.safeAttr("aria-hidden",!0);this._D0=new Date;this.addEventListener("click",this.clickTimeoutWarning);$$WPComp.TimeoutWarningComponent.hasVisibleInstance=!0;removeCalendarExternal()};$$WPComp.TimeoutWarningComponent.prototype={ToolbarButtons:null,SecondsLeft:60,StayString:null,LeaveString:null,IsClosable:!0,isPreLogin:!1,preLoginRedirectURL:null,_SecondsAtStart:Number,_D0:new Date,_TimerId:Number,_isFirstTime:!0,Class:"timeoutwarning",clickTimeoutWarning:function(n){if(n.dataId)return n.dataId===$$WPComp.TOOLBARIDENTIFIER+"leave"&&$$WPComp.TimeoutWarningComponent.leaveClick(this.isPreLogin,!1,this.preLoginRedirectURL),this.dispose(!0),!1},_timer:function(){var i,n,t;!1!==this.isVisible()?($afe.select(".Popup").removeAttr("aria-live"),(t=$afe.select("#screenReaderAlertTimeout")).innerHTML=this.PreHtml,i=new Date,(n=Math.floor(this._SecondsAtStart-Math.round((i-this._D0)/1e3,0)))<=0)?($$WPComp.TimeoutWarningComponent.leaveClick(this.isPreLogin,!0,this.preLoginRedirectURL),this.dispose(!0)):(($$WP.Strings.setDefaultNamespace("Core.TimeOutPopup"),this._timerId=window.setTimeout(this._timer,1e3),n%10==0||this._isFirstTime)&&(this._isFirstTime=!1,(t=$afe.select("#screenReaderAlertTimeout")).innerHTML=this.PreHtml,$$WP.Strings.addMnemonic("@MYCHART@SecondsLeft@",n.toString()),$$WP.Strings.setDisplayText(t,"Message"),$$WP.Strings.removeMnemonic("@MYCHART@SecondsLeft@")),$$WP.Strings.addMnemonic("@MYCHART@SecondsLeft@",n.toString()),this.html(this.PreHtml),$$WP.Strings.removeMnemonic("@MYCHART@SecondsLeft@"),$$WP.Strings.clearDefaultNamespace()):this.dispose(!0)},dispose:function(n){this._isDisposed||(window.clearTimeout(this._timerId),this._timerId=null,this.Components$Component$dispose(n),$$WPUtil.setActivity(),checkActivity(),$$WP.Strings.getNamespace("Core.TimeOutPopup").removeMnemonic("@MYCHART@SecondsLeft@"),$$WPComp.TimeoutWarningComponent.hasVisibleInstance=!1)},_createScreenReaderAlert:function(){$$WP.Strings.setDefaultNamespace("Core.TimeOutPopup");var t=this.$content,n=t.clone();n.addClass("clearlabel");n.safeAttr("id","screenReaderAlertTimeout");this.$container.safeAppend(n);(t=$afe.select("#screenReaderAlertTimeout")).innerHTML=this.PreHtml;$$WP.Strings.addMnemonic("@MYCHART@SecondsLeft@",this._SecondsAtStart.toString());$$WP.Strings.setDisplayText(t,"TimeOutMessage");$$WP.Strings.removeMnemonic("@MYCHART@SecondsLeft@");n.safeAttr("aria-hidden",!1);n.safeAttr("aria-live","assertive");n.safeAttr("aria-relevant","additions");n.safeAttr("aria-atomic",!0);$$WP.Strings.clearDefaultNamespace()}};$$WPComp.TimeoutWarningComponent.leaveClick=function(n,t,i){var r;WP.Events.cancelBeforeUnload();n?window.location!==window.parent.location?document.location.href=document.location.href:$$WPUtil.IsNullOrEmpty(i)?window.location.reload(!1):window.location.href=i:(r=new $$WPComp.LoggingOutComponent("",t),new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideCentered,Components:r,Class:"logout"}).show(!0))};$$WPComp.TimeoutWarningComponent.extend("Components.Component");$$WPComp.LoggingOutComponent=function(n,t,i){this.Components$TemplateComponent(n);this._isTimeout=!0===t;this._callback=i};$$WPComp.LoggingOutComponent.prototype={Class:"logout",ToolbarButtons:null,_isTimeout:null,TitleText:$$WP.Strings.getForTemplate("LoggingOutTitle","Core.LoggingOutPopup"),template:$$WP.Templates.Core.loggingout,Data:{Message:$$WP.Strings.getForTemplate("Message","Core.LoggingOutPopup")},show:function(){this.Components$TemplateComponent$show();logOut("","",this._isTimeout,this._callback)}};$$WPComp.LoggingOutComponent.extend("Components.TemplateComponent");$$WPComp.InlineLoggingOutComponent=function(n,t,i){$$WPComp.LoggingOutComponent.call(this,n,i);this.afterLogoutCallback=t};$$WPComp.InlineLoggingOutComponent.prototype={show:function(){this.Components$TemplateComponent$show()},logout:function(){WP.Comm.logOut($.proxy(function(n){$.ajax({url:makeLink(n),method:"GET",success:$.proxy(function(){this.afterLogoutCallback&&this.afterLogoutCallback()},this)})},this))}};$$WPComp.InlineLoggingOutComponent.extend("Components.LoggingOutComponent");$$WPComp.MessageComponent=function(n){this.Components$Component(n);this.Message&&(this.setMessage(this.Message),this.SupportsAriaDescription=!0);this.addEventListener("click",this._messageClick)};$$WPComp.MessageComponent.prototype={Class:"messageComponent",Message:"",IsClosable:!0,setMessage:function(n){null!=n?(n instanceof Handlebars.SafeString&&($$WP.Debug.logError("A MessageComponent's text should be a String. It's currently a Handlebars.SafeString. Setting the content anyway..."),n=n.toString()),this.html("<p id='popupdescription"+this.ComponentNumber+"'>"+n+"<\/p>")):$$WP.Debug.logError("Trying to set non-existant html in a MessageComponent...")},_messageClick:function(n){if(n.dataId)return this.CallbackArgs=this.CallbackArgs||[],this.CallbackArgs.push(n.dataId),this._addedDataId=!0,this.dispose(!0),!1},dispose:function(n){this._isDisposed||(this.Components$Component$dispose(n),"function"==typeof this.callback&&(this.CallbackArgs=this.CallbackArgs||[],this._addedDataId||this.CallbackArgs.push("close"),this.callback.apply(this.CallbackContext||this,this.CallbackArgs||[])))}};$$WPComp.MessageComponent.extend("Components.Component");$$WP.Components.CommunityListManagerComponent=function(n){this.ListSelector=this.ListSelector||"ul";this.ListElementSelector=this.ListElementSelector||"li";this.Components$TemplateComponent(n);this._autoAddAfterWait=!0;this.SerializedIndex=this.SerializedIndex||"";this._compareFunction=$.proxy(this._compareFunction,this);var t=$afe.select("ul#proxies").find("li.selected"),i=new RegExp(makeLink("showfile.asp.key=").replace("/","/")+"[0-9]+","gi");this.UserPhoto=(i.exec(t.html())||[makeStaticLink("images/ProxySilhouette.png")])[0];this.PhotoColor=(t.safeAttr("class")||"").match(/\bcolor\d\b/i);this.PhotoColor=this.PhotoColor&&this.PhotoColor.length>0?this.PhotoColor[0]:"color1"};$$WP.Components.CommunityListManagerComponent.prototype={SearchString:"",CanSearch:!1,CanSort:!1,SortBy:"PrimaryDate",SortDescending:!0,Filter:"None",RenderedData:[],SerializedIndex:"",HasLoadedData:!1,NeverAutoFocus:!1,Class:"CommunityListManager",DataFromMultipleSources:!0,CurrentOrgHasAllHidden:!1,ContainerComponent:$$WP.Containers.CommunityListManagerContainer.prototype,_getNextPage:function(){var n,t,i=[];if(!1===this.HasMoreData||void 0===this.HasMoreData){for(t in this.UnusedRecords)this.UnusedRecords[t].length>0&&(i=i.concat(this.UnusedRecords[t]),this.OldestRenderedDate=new Date(Math.min(this.OldestRenderedDate,this.UnusedRecords[t][this.UnusedRecords[t].length-1].PrimaryDate)),this.UnusedRecords[t]=[]);return i}for(;;){for(t in n=null,this.UnusedRecords)n=n||t,this.UnusedRecords[t].length>0&&(0===this.UnusedRecords[n].length||this.UnusedRecords[t][0].PrimaryDate>this.UnusedRecords[n][0].PrimaryDate)&&(n=t);if(void 0===this.UnusedRecords[n]||0===this.UnusedRecords[n].length||(this.OldestRenderedDate=new Date(Math.min(this.OldestRenderedDate,this.UnusedRecords[n][0].PrimaryDate)),i.push(this.UnusedRecords[n].shift()),0===this.UnusedRecords[n].length&&!0===this.Organizations[n].HasMoreData))return i}},_updateHeaderFooter:function(n){var t,r=!1,u=0,i;if(this.Organizations)for(t in this.Organizations)if(this.Organizations[t].OrganizationId===t&&++u>1){r=!0;break}i=!1;for(organization in this.UnusedRecords)this.UnusedRecords[organization].length>0&&(i=!0);(n=$$WPUtil.mergeObjects(n,{OldestRenderedDate:this.OldestRenderedDate?formatDate(this.OldestRenderedDate):null,AllDataDisplayed:!this.HasMoreData&&!i,HasMoreData:this.HasMoreData,SearchString:this.SearchString,Filter:this.Filter,SortBy:this.SortBy,SortDescending:this.SortDescending,ListCount:this.RenderedData.length,HasLoadedData:this.HasLoadedData,HasMultipleOrganizations:r,CurrentOrgHasAllHidden:this.CurrentOrgHasAllHidden,SkippedSomeResults:this.Data.SkippedSomeResults},!1,!0)).ViewBagProperties=this.Data.ViewBagProperties;this.ContainerComponent.HeaderComponent.ListData=n;this.ContainerComponent.FooterComponent.ListData=n;this.ContainerComponent.HeaderComponent.refresh();this.ContainerComponent.FooterComponent.refresh()},addNextPage:function(n){var i,r;if(this._waiting)return this._autoAddAfterWait=!0,this._userInitiatedAutoAdd=!0,void this.ContainerComponent.FooterComponent.CommunicationsIndicator.show(this.ContainerComponent.FooterComponent.$container);this.ContainerComponent.FooterComponent.show();this.ContainerComponent.FooterComponent.CommunicationsIndicator.hide();var e,o,u=!0,t=this._getNextPage(),f=(!n||!0===this._userInitiatedAutoAdd)&&!0!==this.NeverAutoFocus;if(this._userInitiatedAutoAdd=!1,t.sort(this._compareFunction),0===t.length){if(this._updateHeaderFooter(),this.RenderedData.length>0)return;u=!1}else u=(u="PrimaryDate"===this.SortBy&&this.SortDescending&&!this.$container.hasClass("nodata")&&this.RenderedData.length>0)&&t[0].PrimaryDate<=this.RenderedData[this.RenderedData.length-1].PrimaryDate;if(0===this.RenderedData.length&&t.length>0&&this.show(),u)i=dangerou$.parseHtml(this._getListHtml(t)),this.SearchString&&this.SearchString.length>0&&$$WPUtil.highlightNodeText(i.get(0),this.SearchString),this.RenderedData=this.RenderedData.concat(t),"ul"!==i.get(0).tagName.toLowerCase()&&(i=i.find("ul").first()),i=i.children("li"),$$WPUtil.removePopupListener(this.$content),this.$content.find("ul").first().safeAppend(i),this.afterAppendNewPage(t),this.$content.trigger("resize"),$$WPUtil.addPopupListener(this.$content),this.applyFilters(),f&&(e=i.first().safeAttr("data-index"));else if(0===t.length?f=!1:o=t[0].Id,this.RenderedData=this.RenderedData.concat(t),this.refresh(),f)for(r=0;r<this.RenderedData.length;r++)if(this.RenderedData[r].Id===o){e=r;break}this._updateHeaderFooter();t.length>0&&this.load();f&&this.focusOn(e)},focusOn:function(n){var t=this.$container.find("ul").children("li").get(n);document.activeElement===t?(t.blur(),window.setTimeout(this._focusOnCallback,200,t)):(t.focus(),document.activeElement!==t&&window.setTimeout(this._focusOnCallback,200,t))},_focusOnCallback:function(n){n&&n.focus()},_getListHtml:function(n,t){if(!n&&0===this.RenderedData.length)return"";var i=0;return n&&(i=this.RenderedData.length),t=$$WPUtil.mergeObjects(t||{},{List:n||this.RenderedData,UserPhoto:this.UserPhoto,ListOffset:i,PhotoColor:this.PhotoColor,ComponentNumber:this.ComponentNumber},!1,!0),this.template(t).trim()},refresh:function(){this.RenderedData.sort(this._compareFunction);this.html(this._getListHtml());this.applyFilters()},_compareFunction:function(n,t,i,r){i=i||this.SortBy;r=r||this.SortDescending;var u,f,e,o=i.split(".");return e=function(n,t){for(var i=0;i<t.length;i++)n=n[t[i]];return n},!0===r?(u=e(t,o),f=e(n,o)):(u=e(n,o),f=e(t,o)),u===f||f-u==0?"PrimaryDate"!==i?this._compareFunction(n,t,"PrimaryDate",!0):0:"string"==typeof u?f.toLowerCase()<u.toLowerCase()?1:-1:u-f},load:function(n){var t,i,r=0===this.RenderedData.length;n=n||"";i={serializedIndex:""!==this.SerializedIndex&&!1===this.HasMoreData?"ALLITEMSDISPLAYED":encodeURIComponent(this.SerializedIndex)};!0===this._waiting&&this.cancelRequest("listload",this.__lastLoad);-1===this.Url.indexOf("?")?this.Url+="?":"&"!==this.Url[this.Url.length-1]&&(this.Url+="&");this._waiting=!0;encodeURIComponent(this.SerializedIndex);t=this.Url+"searchString="+encodeURIComponent(this.SearchString)+"&oldestRenderedDate=";t+=encodeURIComponent(this.OldestRenderedDate.toISOString())+"&"+n;this.__lastLoad=this.Components$TemplateComponent$load(t,r,"listload",i)},setData:function(n){var f,t,r,e,i,u;if("ALLITEMSDISPLAYED"!==n){if(this.Data=n,void 0!==this.Data.ViewBagProperties)for(f in this.Data.ViewBagProperties)this.Data[f]=this.Data.ViewBagProperties[f];if(this.SerializedIndex=n.SerializedIndex||"",this.CanSearch=n.CanSearch||!1,this.CanSort=n.CanSort||!1,this.ErrorState=this.ErrorState||{},n.List){if(this.HasLoadedData=!0,this.Organizations=this.Organizations||n.Organizations||[],!this.EverHadErrorState)for(t in this.UnusedRecords)this.ErrorState[t]=!this.Organizations[t]||this.Organizations[t].HasMoreData;for(t in n.List){for(this.ErrorState[t]=!1,this.Organizations[t]=n.Organizations[t],this.Organizations[t].HasMoreData=n.List[t].HasMoreData,r=(u=n.List[t].List).length-1;r>-1;r--)(i=u[r]).PrimaryDate=new Date(i.PrimaryDate),i.Organization=i.Organization||this.Organizations[t],i.Id=encodeURIComponent(i.Id),i.CommunityIdUrlEncoded=encodeURIComponent(i.CommunityId);e=e||n.List[t].HasMoreData;this.UnusedRecords[t]=this.UnusedRecords[t]?this.UnusedRecords[t].concat(u):u}if(this.HasMoreData=e,!this.EverHadErrorState)for(t in this.UnusedRecords)if(this.UnusedRecords[t].ErrorState){this.EverHadErrorState=!0;break}if(this._waiting=!1,this._autoAddAfterWait=this.Data.AutoRenderThisSet||this._autoAddAfterWait,this.Data.List=[],this._autoAddAfterWait)return this._autoAddAfterWait=!1,void this.addNextPage(!0)}else this.clearModel(),this.refresh()}else this._waiting=!1},setSort:function(n,t){this.SortBy=n;this.SortDescending=t;this.refresh()},setSearch:function(n){n!==this.SearchString&&(this.SearchString=n,this.reload())},setFilter:function(n){if(n!==this.Filter)switch(this.Filter=n,n.split("~")[0]){case"None":case"organization":return void this.applyFilters();default:return void this.reload()}},applyFilters:function(n){var f,i,s,r,e,t,u,o=0,h=0;for(f=this.$content.find("ul"),s=n?f.length:1,i=0;i<s;i++)for(e=$afe.jq(f[i]).children("li"),r=0;r<e.length;r++)t=$afe.jq(e[r]),u=parseInt(t.safeAttr("data-index"),10),isNaN(u)&&(u=h),this.shouldBeFiltered(this.RenderedData[u])?t.hasClass("hidden")||(o++,t.addClass("hidden")):t.hasClass("hidden")&&(o--,t.removeClass("hidden")),h++;this.CurrentOrgHasAllHidden=this.RenderedData&&this.RenderedData.length>0&&this.$content.find("li.hidden").length===this.RenderedData.length;this.$content.trigger("resize",{forceShrink:o>0})},shouldBeFiltered:function(n){this.Filter=this.Filter||"";var t=this.Filter.split("~");return"organization"===t[0]&&!this.hasSourceOrg(n,t[1])},hasSourceOrg:function(n,t){if(n.Organization.OrganizationId===t)return!0;if(n.OrganizationLinks)for(var i=0;i<n.OrganizationLinks.length;i++)if(n.OrganizationLinks[i].OrganizationId===t)return!0;return!1},reload:function(){this.clearModel();this.load();this._autoAddAfterWait=!0},resetUrl:function(n){this.Url!==n&&(this.Url=n,this.reload())},clearModel:function(){this.SerializedIndex="";this.UnusedRecords={};this.RenderedData=[];this.OldestRenderedDate=new Date;this.HasLoadedData=!1;this.HasMoreData=!1;this.hide();this.$content.trigger("resize",{forceShrink:!0});this._updateHeaderFooter()},html:function(n,t){this.Components$TemplateComponent$html(n,t);this.SearchString&&this.SearchString.length>0&&$$WPUtil.highlightNodeText(this.$content.get(0),this.SearchString)},afterAppendNewPage:function(){}};$$WP.Components.CommunityListManagerComponent.extend("Components.TemplateComponent");$$WP.$body=$$WP.$body||$afe.select("body"),function(){var t=$$WP.Common.Model,i=$$WP.Common.ModelCollection,n=function(n,t){var i;for(this.WP$Controllers$Controller(),n=n||[],t=t||[],this.proxify("_onDomEventWrapper","_onPropertyChangedWrapper"),this.ViewBinderId=r++,this._eventNames=n.join(" "),this._boundModels={},this._modelId2listenerId={},this._propertyNames={},i=0;i<t.length;i++)this._propertyNames[t[i]]=!0;null!==$$WP.$body&&0===$$WP.$body.length&&($$WP.$body=$afe.select("body"));this.setBindingRoot($$WP.$body)},r=0;n.prototype={ViewBinderId:null,_eventNames:null,_propertyNames:null,_$bindingRoot:null,_boundModels:null,_modelId2listenerId:null,bindModel:function(n){var t;this._boundModels[n.ModelId]||(this._boundModels[n.ModelId]=!0,t=n.addPropertyListener("",this._onPropertyChangedWrapper),this._modelId2listenerId[n.ModelId]=t)},bindAllModels:function(n){for(var t=0;t<n.length;t++)this.bindModel(n[t])},bind:function(n,t){this.bindModel(n);t.safeAttr("data-model-id",n.ModelId);t.safeAttr("data-view-binder-id",this.ViewBinderId)},unbindModel:function(n){this._boundModels[n.ModelId]&&(delete this._boundModels[n.ModelId],n.removePropertyListener(this._modelId2listenerId[n.ModelId]),this.unbindElement(this.getBoundElements(n,this._$bindingRoot)))},unbindElement:function(n){n.removeAttr("data-model-id");n.removeAttr("data-view-binder-id")},getBoundElements:function(n,t){var i;return t=t||this._$bindingRoot,i='[data-view-binder-id="'+this.ViewBinderId+'"]',void 0!==n&&(i+='[data-model-id="'+n.ModelId+'"]'),t.find(i)},getBoundModels:function(){var t,r,n;for(r={},t=this.getBoundElements(),n=0;n<t.length;n++)r[$afe.jq(t.get(n)).safeAttr("data-model-id")]=!0;return i.modelIdSet2Array(r)},setBindingRoot:function(n){var t;t='[data-view-binder-id="'+this.ViewBinderId+'"]';null!==this._$bindingRoot&&this._$bindingRoot.off(this._eventNames,t,this._onDomEventWrapper);this._$bindingRoot=n;this._$bindingRoot.on(this._eventNames,t,this._onDomEventWrapper)},syncModelsToDOM:function(){for(var t=this.getBoundModels(),n=0;n<t.length;n++)this._onSyncModelToDOM(t[n])},_onDomEventWrapper:function(n,i){var u,f,r;r=(u=$afe.jq(n.target).closest('[data-model-id][data-view-binder-id="'+this.ViewBinderId+'"]')).safeAttr("data-model-id");null===(f=t.getInstance(r))&&"-1"!==r||this._onDomEvent(f,u,n,i)},_onPropertyChangedWrapper:function(n){this._propertyNames[n.propertyName]&&this._onPropertyChanged(n.model,n)},_onPropertyChanged:function(){throw"[ViewBinder] Subclass did not implement the virtual method _onPropertyChanged";},_onSyncModelToDOM:function(){throw"[ViewBinder] Subclass did not implement the virtual method _onSyncModelToDOM";},_onDomEvent:function(){throw"[ViewBinder] Subclass did not implement the virtual method _onDomEvent";}};$$WP.Common=$$WP.Common||{};$$WP.Common.ViewBinder=n;n.extend($$WP.Controllers.Controller,"WP$Common$ViewBinder");$$WP.Debug.IsEnabled&&$$WP.$body.on("click","[data-model-id]",function(n){var r,i;n.ctrlKey&&$$WP.Debug.IsEnabled&&(r=$afe.jq(n.target).closest("[data-model-id]").safeAttr("data-model-id"),null!==(i=t.getInstance(r))&&(debug_clickedModel=i,$$WP.Debug.log("(Ctrl+Click on bound model) Global variable debug_clickedModel set to point at model #"+i.ModelId+" : "+i._constructor._className)))})}();$$WP.Debug.UnitTest=$$WP.Debug.UnitTest||{};$$WP.Debug.UnitTest.tests=$$WP.Debug.UnitTest.tests||[];$$WP.Debug.UnitTest.tests.push(function(){$$WP.Debug.UnitTest.assert})