function padNumber(n,t){var i=getDecimalSeparator();return n>0?(n=n.toString().replace(/\./,i),Array(t-n.length+1).join("0")+n):(n=(-n).toString().replace(/\./,i),"-"+Array(t-n.length).join("0")+n)}function padNumber2(n,t){return 0==n?Array(t+1).join("0"):padNumber(n,t)}function escapeRegExp(n){return n.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function getDecimalSeparator(){var n;return(n=$$WP.Strings.get("NumericDecimalFormatterOverride","I18N.Numbers"))&&n.length>0?n:$$WP.I18N.DecimalSeparator}function getGroupSeparator(){var n;return(n=$$WP.Strings.get("NumericGroupSeparatorOverride","I18N.Numbers"))&&n.length>0?n:$$WP.I18N.GroupSeparator}function getRangeSeparator(){var n;return(n=$$WP.Strings.get("NumericRangeSeparatorOverride","I18N.Numbers"))&&n.length>0?n:$$WP.I18N.RangeSeparator}function IsNumericMinMax(n,t,i,r,u){return null!=n&&(null!==u&&""!==u||(u=!1),e=n.value,h=getGroupSeparator(),c=getDecimalSeparator(),s=(l=getErrorForScreenReader())+$$WP.Strings.get("NumericError","Core.CommonUtils"),a=new RegExp(escapeRegExp(h),"g"),v=new RegExp(escapeRegExp(c),"g"),""==e||(-1!=e.indexOf(h)&&e.indexOf(c)<0?(WP.Validators.DisplayErrors(s),!1):(f=(e=e.replace(a,"")).replace(v,"."),f=Number(f),isNaN(f)?(WP.Validators.DisplayErrors(s),o=!0):r||f==Math.round(f)?""!=t&&f<Number(t)?(WP.Validators.DisplayErrors(l+$$WP.Strings.get("MinimumNumericError","Core.CommonUtils").replace("@MYCHART@MINVALUE@",t)),o=!0):""!=i&&f>Number(i)&&(WP.Validators.DisplayErrors(l+$$WP.Strings.get("MaximumNumericError","Core.CommonUtils").replace("@MYCHART@MAXVALUE@",i)),o=!0):(WP.Validators.DisplayErrors(s),o=!0),!(o&&!u)&&(n.value=e,!0))));var f,o,e,h,c,l,s,a,v}function IsNumericOrRangeMinMax(n,t,i,r,u){if(null===n||(null!==u&&""!==u||(u=!1),$(".Popup").length>0))return!1;var f,e,s,o,l,y,p,h,a,v,k,c,w,b;if(o=n.value,y=getDecimalSeparator(),p=getGroupSeparator(),h=getRangeSeparator().replace(/\s+/g,""),a=getErrorForScreenReader(),v=new RegExp(escapeRegExp(y),"g"),k=new RegExp(escapeRegExp(p),"g"),c=a+$$WP.Strings.get("NumericOrRangeError","Core.CommonUtils"),w=a+$$WP.Strings.get("MinimumNumericError","Core.CommonUtils"),b=a+$$WP.Strings.get("MaximumNumericError","Core.CommonUtils"),""===o)return!0;if(-1!==o.indexOf(p)&&o.indexOf(y)<0)return WP.Validators.DisplayErrors(c.replace("@MYCHART@RANGESEPARATOR@",h).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",i)),u||(n.select(),n.focus()),!1;if(-1!==(l=(o=o.replace(k,"")).indexOf(h))){if(""===(f=o.substring(0,l).replace(v,".")))return WP.Validators.DisplayErrors(c.replace("@MYCHART@RANGESEPARATOR@",h).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",i)),u||(n.select(),n.focus()),!1;e=o.substring(l+1).replace(v,".")}else f=o.replace(v,".");return f=Number(f),isNaN(f)?(WP.Validators.DisplayErrors(c.replace("@MYCHART@RANGESEPARATOR@",h).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",i)),s=!0):(r||(f=Math.round(f)),""!==t&&f<Number(t)?(WP.Validators.DisplayErrors(w.replace("@MYCHART@MINVALUE@",t)),s=!0):""!==i&&f>Number(i)&&(WP.Validators.DisplayErrors(b.replace("@MYCHART@MAXVALUE@",i)),s=!0)),e&&!s&&(e=Number(e),isNaN(e)?(WP.Validators.DisplayErrors(c.replace("@MYCHART@RANGESEPARATOR@",h).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",i)),s=!0):(r||(e=Math.round(e)),""!==t&&e<Number(t)?(WP.Validators.DisplayErrors(w.replace("@MYCHART@MINVALUE@",t)),s=!0):""!==i&&e>Number(i)?(WP.Validators.DisplayErrors(b.replace("@MYCHART@MAXVALUE@",i)),s=!0):(f>e||f===e)&&(WP.Validators.DisplayErrors(c.replace("@MYCHART@RANGESEPARATOR@",h).replace("@MYCHART@MINVALUE@",t).replace("@MYCHART@MAXVALUE@",i)),s=!0))),s?(u||(n.select(),n.focus()),!1):(r||(o=-1!==l?f+h+e:f),n.value=o,!0)}function autoLogout(n){var t;$$WPUtil.setActivity.msSinceLastActivity()<checkActivity.sessionTimeout?pre_checkActivity():(pre_checkActivity.logoutPage=n||pre_checkActivity.logoutPage,t=new $$WPComp.LoggingOutComponent,new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideCentered,Components:t,TitleText:null,IsClosable:!1,Class:"logout"}).show(!0))}function IsPatientInActiveVVCallback(n){"True"===n&&($$WPUtil.setActivity(),WP.Comm.startKeepAlive())}function checkActivity(n,t,i,r){var u,f,e=$afe.jq(window);if(checkActivity.refreshTimeout=n||checkActivity.refreshTimeout,checkActivity.sessionTimeout=t||checkActivity.sessionTimeout,checkActivity.logoutPage=r||checkActivity.logoutPage,checkActivity.warningPopup=!1!==i&&!1!==checkActivity.warningPopup||!0===i,!0!==checkActivity.__ranOnce&&((e=$afe.jq(window)).add(document.body),isDataTile()&&!isShareEverywhere()&&parent.window!==window&&e.add(parent.window),e.focus($$WPUtil.checkActivity),checkActivity.__ranOnce=!0),(u=$$WPUtil.setActivity.msSinceLastActivity())>=checkActivity.sessionTimeout)return document.write(""),void WP.Comm.logOut(null,!0,null,!0,!0);window.clearTimeout(checkActivity.tRefreshID);checkActivity.tRefreshID=window.setTimeout(checkActivity,Math.floor((checkActivity.refreshTimeout-u)/1e3));window.clearTimeout(checkActivity.tSessionID);f=Math.floor((checkActivity.sessionTimeout-u)/1e3);checkActivity.tSessionID=window.setTimeout(autoLogout,f);u>checkActivity.refreshTimeout&&!0!==$$WPComp.TimeoutWarningComponent.hasVisibleInstance&&$$WPUtil.quickPopup(new $$WPComp.TimeoutWarningComponent({SecondsLeft:f}),{PierceShieldOfJustice:!0})}function logOut(n,t,i,r){return $afe.select("body").hasClass("passthru")?(self.location.href=makeLink("closeExternalJumpPopup.asp"),!1):(""!==n&&null!=n?self.location.href=n:"string"==typeof checkActivity.logoutPage&&""!==checkActivity.logoutPage?WP.Comm.logOut(null,!0,checkActivity.logoutPage,!1,i):getFederatedLogoutMode()||isShareEverywhere()||!0===t?WP.Comm.logOut(null,!0,null,!1,i):"function"==typeof r?WP.Comm.logOut(r,!1,null,!1,i):WP.Comm.logOut(function(n){$$WPUtil.IsNullOrEmpty(n)||(window.location=makeLink(n))},!1,null,!1,i),!0)}function CheckLength(n,t,i,r){var u;return u=t,""!=r&&null!=r&&"1"==r&&(t-=1),!(n.value.replace(/\r\n/g,"").length>t)||(""==i&&(i=getErrorForScreenReader()+$$WP.Strings.get("MaximumTextError","Core.CommonUtils").replace("@MYCHART@MAXMIMUMLENGTH@",u)),$$WP.Utilities.quickMessageBox(i,"",[],null,[],""),n.focus(),!1)}function insideBodyLoad(n,t,i,r){return WP&&WP.Comm&&WP.Comm.startKeepAlive&&WP.Comm.startKeepAlive(),$$WPUtil.setActivity(),WP.Events.addListener(document.body,"click",$$WPUtil.setActivity),WP.Events.addListener(document.body,"keypress",$$WPUtil.setActivity),WP.Events.addListener(document.body,"click",$$WPUtil.NotifyMobileOfActivity),WP.Events.addListener(document.body,"input",$$WPUtil.NotifyMobileOfActivity),checkActivity(n,t,i,r),window.focus(),!0}function assignInlineEventHandlers(){$afe.select('a#printerfriendlylink:not([href="#"])').on("click",function(){return window.open(this.href.replace(/\#(.*)/,""),"WWW","width=1024,height=720,resizable,status,scrollbars").focus(),!1});$afe.select('a#printerfriendlylink[href="#"]').on("click",function(){return $$WPUtil.PrintAndAuditNET(),!1});$afe.select("a#printWindowPrintLink").on("click",function(){window.print()});$afe.select("a#printWindowCloseLink").on("click",function(){window.close()});$afe.select("a#sortOrgLink").on("click",function(){return sortOrgList(this),!1});$afe.select("a#SelfSignupButton").on("click",function(){return $$WP.Utilities.TryRedirect(this.href),!1});$afe.select("a#cookieHelpLink").on("click",function(){return window.open("Help/Cookies"),!1});$afe.select("a#completedTaskPrinkLink").on("click",function(){return window.open(HTMLUnencode(this.href),"WWW","width=800,height=600,resizable,status,scrollbars").focus(),!1});$afe.select("form#retryform").on("submit",function(){disableButton1(this.refresh)})}function jumpToAnchor(n){var t=window.location.hash.substr(1),i;/^[a-zA-Z][\w-]*$/.test(t)&&(""!==t?(history.scrollRestoration="manual",doJumpToAnchorAction(t))||(n||(n=3e3),i=new MutationObserver(function(n,i){doJumpToAnchorAction(t)&&i.disconnect()}),i.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),setTimeout(function(){i.disconnect()},n)):history.scrollRestoration="auto")}function doJumpToAnchorAction(n){return n="#"+n,$afe.select(n).filter(":visible").length>0&&(location.replace(n),$afe.select(n).focus(),!0)}function getPostLoginStringsManagerContent(n){$afe.select("#vbPrintHeader").empty().safeAppend($afe.renderTemplate($$WP.Templates.Core.vbPrintheader));$afe.select("footer#footer #baselinks").empty().safeAppend($afe.renderTemplate($$WP.Templates.Core.vbBaselinks,n));$afe.select(".cssSwitcher").click(function(n){var t;n&&"A"===n.currentTarget.nodeName&&(t=n.currentTarget.getAttribute("data-csstitle"));0!==t.length&&($$WP.Utilities.UI.ActivateStylesheet(t),$$WP.Utilities.UI.FocusCssSwitcher(t))})}function getObjectValue(n){var r,t,i;if(n){if(i="",(r=n.length)>0)for(t=0;t<r;t++)i+=n[t].value;else i=n.value;return i}}function doMainKeyPress(n){try{return routeEvent(n)}catch(n){}}function submitForm(n){if("submit form"==n.form.submitcontrol.value)return n.form.submitform.click(),!1}function addFocus(n){return n.form.submitcontrol.value="nosubmit",!0}function taKeyDown(n){n.form.submitcontrol.value="nosubmit"}function recordKey(n){n.submitcontrol.value=13==window.event.keyCode&&"nosubmit"!=n.submitcontrol.value?"submit form":""}function containsSpace(n){for(var t=0;t<n.length;++t)if(" "==n.charAt(t))return!0;return!1}function containsPunctuation(n){for(var i,r=n.toUpperCase(),t=0;t<r.length;++t)if(i=r.charAt(t),"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@._-".indexOf(i)<0)return!0;return!1}function selectCheckBox(n){var t;if(null!=n&&(document.all||document.getElementById)){for(t=0;t<n.length;t++)if(1==n[t].checked)return!0;return 1==n.checked||(alert($$WP.Strings.get("CheckBoxSelectionError","Core.CommonUtils")),!1)}return!0}function disableButton(n){return 0==submitcount?(submitcount++,!0):(n.disabled=!0,!1)}function removeWhiteSpace(n){var t=""+n;return t.replace(/\W/g,"")}function enableIfReqFilled(n,t){var o,i,h,f,c,s,r,e,a,u,l;if(document.getElementById&&(o=document.getElementById(n))&&(u=t.split("^"))&&0!=u.length){for(c=[],f=[],e=0,l=enableIfReqFilled.arguments,i=2;i<l.length;i++)s=(h=l[i].split("^"))[0],h[1]||s,r=h[2]||s,(a=o[s])&&!c[r]&&(0==removeWhiteSpace(a.value).length?f[r]||(f[r]=!0,e++):(c[r]=!0,f[r]&&(f[r]=!1,e--)));if(!1===IsFormValid(n)&&e++,e>0)for(i=0;i<u.length;i++)disableBtn(o[u[i]]);else for(i=0;i<u.length;i++)enableBtn(o[u[i]])}}function IsFormValid(n,t){var i,r;try{if(WP&&WP.Validators&&WP.Validators.Forms&&(r=WP.Validators.Forms[n]))for(i=0;i<r.length;i++)if(removeWhiteSpace(r[i]).length>0)return!0===t&&alert(r[i]),!1}catch(n){}return!0}function confirmEmbedDelete(n,t,i){var r;return r=!0===i?$$WPUtil.quickMessageBoxByEnum.typeEnum.RestoreGoback:$$WPUtil.quickMessageBoxByEnum.typeEnum.RemoveGoback,$$WPUtil.confirmFormSubmission(n,t,r,function(n,t){var r,i;t===$$WP.Components.TOOLBARIDENTIFIER+"continue"&&(r=document.getElementById("confirmStep"))&&(r=r.parentNode)&&((i=document.createElement("input")).type="hidden",i.className="hidden",i.name="clickSub",i.value="1",r.appendChild(i))})}function setCheckboxesByPrefix(n){for(var i=1,t=document.getElementById(n+i);null!==t;)$afe.jq(t).safeAttr("checked","true"),t.checked=!0,i+=1,t=document.getElementById(n+i)}function unsetCheckboxesByPrefix(n){for(var i=1,t=document.getElementById(n+i);null!==t;)t.removeAttribute("checked"),t.checked=!1,i+=1,t=document.getElementById(n+i)}function statusOfCheckboxesByPrefix(n){var t,i,r,u;for(r=!0,u=!1,t=1,i=document.getElementById(n+t);null!==i;)i.checked?u=!0:r=!1,t+=1,i=document.getElementById(n+t);return r?3:u?2:1}function checkAll(n,t){if("object"==typeof document&&null!=n&&null!=t&&document.getElementById&&"object"==typeof document.getElementById(n))for(var i,r=document.getElementById(n),u=0;i=r[u++];)"checkbox"==i.type&&(i.checked=!0)}function selectRadioButton(n){var t;if(document.all||document.getElementById){for(t=0;t<n.length;t++)if(1==n[t].checked)return!0;return 1==n.checked||(alert($$WP.Strings.get("RadioButtonSelectionError","Core.CommonUtils")),!1)}return!0}function disableButton1(n){return"object"==typeof n&&(n.disabled=!0),!0}function getParentDocument(){if(!parent)return null;try{return parent.document}catch(n){return null}}function addDataTileUtils(){if(getParentDocument()){var n=window.frameElement;null!=n&&(n.tryRedirect=$$WPUtil.TryRedirect,n.safeToRedirect=$$WPUtil.SafeToRedirect,WP&&WP.Events&&(n.hasUnsavedChanges=WP.Events.showBeforeUnloadMessage))}}function scrollTopOfTheIframe(n,t){getParentDocument()&&window.setTimeout(function(){for(var n,u,i,f=window.parent.document.getElementsByTagName("iframe"),r=0,e=f.length;r<e;r++)if((u=f[r]).contentWindow==window){n=u.getBoundingClientRect();i=$$WPUtil.getScrollTop();!0===t?n.top<0&&$$WPUtil.setScrollTop(i+n.top):$$WPUtil.setScrollTop(i+n.top);break}},n)}function handleBrowserBack(n){null!==n&&null!==n.target&&null!==$$WP._currentURL&&0===document.getElementsByClassName("md_mychartquestionnaire_questionnaires").length&&$$WP._currentURL===n.target.location.href&&location.reload()}function dataTileLoad(){addDataTileUtils();self===top&&$afe.select("body").addClass("removeOverflow");$$WP._currentURL=window.location.href;try{$afe.select(".cardlist.column_3, .cardlist.column_4").trigger("cardLoad");$afe.jq(window).on("popstate",handleBrowserBack);setupIframeResizer()}catch(n){return}}function setupIframeResizer(){var t,i,r,n;isIframeResizeScheduled=!1;setAppropriateHeight();setAppropriateHeightOnResize();(i=document.getElementById("appPopupRoot"))&&setAppropriateHeightOnDOMMutations(i);(t=document.getElementById("classicPopupRoot"))&&setAppropriateHeightOnDOMMutations(t);(r=document.getElementById("wrap"))&&setAppropriateHeightOnDOMMutations(r);n=function(){isIframeResizeScheduled||(setTimeout(function(){setAppropriateHeight();isIframeResizeScheduled=!1},100),isIframeResizeScheduled=!0)};document.body.addEventListener("animationend",n);document.body.addEventListener("transitionend",n);document.body.addEventListener("load",n,!0)}function setAppropriateHeightOnResize(){var n=getFrameWidth();$afe.jq(window).resize(function(){n==getFrameWidth()||isIframeResizeScheduled||(setTimeout(function(){setAppropriateHeight();n=getFrameWidth();isIframeResizeScheduled=!1},100),isIframeResizeScheduled=!0)})}function setAppropriateHeightOnDOMMutations(n){if(n){var t={attributes:!0,childList:!0,subtree:!0};new MutationObserver(function(i,r){isIframeResizeScheduled||(setTimeout(function(){r.disconnect();setAppropriateHeight();r.observe(n,t);isIframeResizeScheduled=!1},100),isIframeResizeScheduled=!0)}).observe(n,t)}}function isShareEverywhere(){return $afe.select("html").hasClass("shareeverywhere")}function isDataTile(){return $afe.select("html").hasClass("datatile")}function isEmbedded(){return $afe.select("body").hasClass("embedded")}function isBedsideTV(){return $afe.select("html").hasClass("bedsidetv")}function setAppropriateHeight(){var b,t,f,i,n,e,o,k,v,y=document.getElementById("vdtFrame"),s,p,h,r,c,u,l,a,w,d;if((isDataTile()&&getParentDocument()||y||$$WP.WidgetMode)&&"iframeMEDADVICE_ATTACHMENTS"!==window.name&&"iframeMESSAGELIST_ATTACHMENTS"!==window.name&&"iframeCACHED_UPLOAD_DATA"!==window.name&&(b=$$WPUtil.getScrollTop(),$$WP.WidgetMode||(t=window.frameElement),!t&&y&&(t=y),$$WP.WidgetMode||t&&document&&document.body&&t.style)){for(v=getContainerPrevHeight(t),setContainerMinHeight(t,""),$afe.select("body").addClass("autoheight"),i=($afe.select("iframe:not(.hidden)").length>0?document.body.scrollHeight:document.body.offsetHeight)+"px",$afe.select("body").removeClass("autoheight"),f=getMinHeightForDatePicker(),o=$afe.select(".Popup.component"),s=0;s<o.length;s++)(n=$afe.jq(o[s])).hasClass("externaljumppopup")&&"none"===n.find("> .scrollable > .content").css("max-height")&&!n.hasClass("hidden")?(n.css("height","auto"),k=n.outerHeight(),n.css("height",""),f="80vh",i=k+"px"):!n.hasClass("large")&&!n.hasClass("medium")||n.hasClass("hidden")?f=n.outerHeight()+70+"px":(n.css("height","auto"),i=n.outerHeight()+70+"px",n.css("height",""),f=i);if((e=$afe.select("#lightbox:not(.hidden):not(:empty)")).length>0&&(i=e.hasClass("captchaPopup")?Math.max(e.outerHeight(),650)+"px":e.outerHeight()+"px"),p=$afe.select("._ShieldOfJustice"),p.length>0&&(h=p.siblings("[role=dialog]"),h.length>0)){for(r=0,c=0;c<h.length;c++)u=h[c],u.classList.contains("size-10")||u.classList.contains("size-20")?r=Math.max(r,parseInt(v),450):(u.classList.add("autoheight"),r=Math.max(r,u.scrollHeight),u.classList.remove("autoheight")),repositionReactDataTilesPopup(window.frameElement,u);r>0&&(i=r+"px")}(setContainerMinHeight(t,f),v!=i)&&((setContainerHeight(t,i),!0!==$afe.select("body").prop("pageLoadedBefore"))?(scrollTopOfTheIframe(0,!0),$afe.select("body").prop("pageLoadedBefore",!0)):($$WPUtil.setScrollTop(b),document.activeElement.className.includes("scrollPosTarget")&&document.activeElement.scrollIntoView({behavior:"smooth",block:"center"})));0===o.length&&0===e.length&&"invisible"===$afe.select("#__CAPTCHAVisibility").data("captcha-visibility")&&0!==$afe.select("#hCaptchaDisclaimer").length&&(l=$afe.select("iframe:visible").filter(function(){return"hidden"!==$afe.jq(this).css("visibility")}),l.length>0&&(a=l[0].getBoundingClientRect().height/2+l.offset().top+$afe.jq(window.frameElement).offset().top,w=parent.window.innerHeight,(a>w+$$WPUtil.getScrollTop()||a<$$WPUtil.getScrollTop())&&(d=a-w/2,$$WPUtil.setScrollTop(d))))}}function getMinHeightForDatePicker(){return $calendarButtons=$afe.select(".calendar.datechooserAnchor"),$calendarButtons.length>0?"350px":""}function repositionReactDataTilesPopup(n,t){var i;isDataTile()&&null!=n&&(t.classList.contains("size-10")||t.classList.contains("size-20")?(i=$$WPUtil.getDataTileScrollTop(n)+35,overhang=i+t.clientHeight-n.scrollHeight,overhang>0&&(i-=overhang),t.style.top=i+"px",t.style.opacity=1):(t.style.top="",t.style.opacity=""))}function getFrameWidth(){return $$WP.WidgetMode?$$WPUtil.GetIframeWidth().then(function(n){return n}):window.frameElement?window.frameElement.offsetWidth:null}function setContainerHeight(n,t){$$WP.WidgetMode?($$WPUtil.SetCrossDomainIframeHeight(t),$$WP.ContainerHeight=t):n.style.height=t}function setContainerMinHeight(n,t){$$WP.WidgetMode?$$WPUtil.SetCrossDomainIframeMinHeight(t):n.style.minHeight=t}function getContainerPrevHeight(n){return $$WP.WidgetMode?$$WP.ContainerHeight:n.style.height}function DoRedirect(n,t){return!0===t?logOut(null,!0):$$WPUtil.SafeToRedirect(CreateLogOutPopup,n),!1}function CreateLogOutPopup(n){var t;n&&(t=new $$WPComp.LoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop}),new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:t,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"}).show(!0))}function InlineEndSession(n,t){var i,r=new $$WPComp.InlineLoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop},function(){t&&t();n&&i.hide()},!1);n&&(i=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:r,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"})).show(!0);r.logout()}function DoRedirectOE(){return this.document.write("<br /><br /><br /><br /><center>"+$$WP.Strings.get("LogoutRedirect","Core.CommonUtils")+"<\/center>"),window.location="./oebye.asp",!1}function captureBackEnterKey(){if($$WPUtil.setActivity(),window.event&&(8==window.event.keyCode||13==window.event.keyCode)){var t=window.event.srcElement,n=t.type;if(!t.readOnly){if(("text"==n||"textarea"==n||"password"==n)&&8==window.event.keyCode)return;if(("textarea"==n||"submit"==n)&&13==window.event.keyCode)return}return window.event.cancelBubble=!0,window.event.returnValue=!1,!1}}function showItem(n){var t;return document.getElementById?t=document.getElementById(n):document.all&&(t=document.all.item(n)),null!=t&&(t.style.display="block",!0)}function hideItem(n){var t;return document.getElementById?t=document.getElementById(n):document.all&&(t=document.all.item(n)),null!=t&&(t.style.display="none",!0)}function showElement(n,t){null===n&&(null!==t&&t.length>0&&(n=document.getElementById(t)),null===n)||removeClassNames(n,"hidden")}function hideElement(n,t){null===n&&(null!==t&&t.length>0&&(n=document.getElementById(t)),null===n)||(removeClassNames(n,"hidden"),n.className=n.className+" hidden")}function activateField(n,t){null===n&&("string"==typeof t&&t.length>0&&(n=document.getElementById(t)),null===n)||(removeClassNames(n,"disabled,activefield"),n.className=n.className+" activefield")}function activateFieldsByIds(n){var t,i;if(null!==n&&(i=n.split(",")),null!==i)for(t=0;t<i.length;t+=1)activateField(document.getElementById(i[t]))}function deactivateField(n,t){null===n&&("string"==typeof t&&t.length>0&&(n=document.getElementById(t)),null===n)||(removeClassNames(n,"disabled,activefield"),n.className=n.className+" disabled")}function deactivateFieldsByIds(n){var t,i;if(null!==n&&(i=n.split(",")),null!==i)for(t=0;t<i.length;t+=1)deactivateField(document.getElementById(i[t]))}function applyClass(n,t){var r,i;if(n){for(r=t.split(","),i=0;i<r.length;i++)containsClassName(n,r[i])||(n.className+=(n.className.length>0?" ":"")+r[i]);return n}}function removeClassNames(n,t){var u,i,f,r;if(!(!n||!t||n.className.length<1||t.length<1)){for(u=t.split(","),r=n.className,i=0;i<u.length;i+=1)f=new RegExp("(^|\\s+)"+u[i]+"(\\s+|$)","g"),r=r.replace(f," ");n.className=r}}function replaceClassNames(n,t,i){removeClassNames(n,t);applyClass(n,i)}function containsClassName(n,t){var i;return!(!n||"string"!=typeof t||t.length<1)&&!("string"!=typeof n.className||n.className.length<1)&&!!(i=new RegExp("(^|\\s+)"+t+"(\\s+|$)","g"))&&null!=n.className.match(i)}function applyUniqueClassNameAmongSiblings(n,t){for(var r=n.parentNode,i=0;i<r.children.length;i++)removeClassNames(r.children[i],t);applyClass(n,t)}function selectAllFirstTime(n){return null===n||containsClassName(n,"clckd")||(n.select(),n.className=n.className+" clckd",n.onblur=function(){return removeClassNames(this,"clckd"),!1}),!1}function enableBtn(n){n&&n.removeAttribute&&(n.removeAttribute("disabled"),n.className=n.className.replace(/\ ?disabled/,""))}function disableBtn(n){var t="disabled";if(n){if("function"==typeof n)return;n.disabled=t;-1==n.className.indexOf(t)&&(n.className=n.className.replace(/\ *$/,""),n.className.length>0&&(t=" "+t),n.className=n.className+t)}}function getElementPosition(n,t){if(n.offsetParent){for(var r,i=n,u=0,f=0;i&&(r=i,"HTML"!=i.tagName)&&(!t||i!=t);){if(u+=i.offsetLeft,f+=i.offsetTop,i.scrollLeft&&(u-=i.scrollLeft),"wrap"==i.id.toLowerCase()){u-=i.offsetLeft;f-=i.offsetTop;break}(i=WP.DOM.Browser.isFirefox&&"fixed"===WP.DOM.Read.getStyle(i,"position")?null:i.offsetParent)&&i.classList.contains("fixedCalendarParent")&&(i=document.getElementById("classicPopupRoot"))}return-1!=navigator.userAgent.indexOf("Mac")&&void 0!==document.body.leftMargin&&(u+=document.body.leftMargin,f+=document.body.topMargin),u+="px",f+="px","HTML"==r.tagName&&((r=r.getElementsByTagName("body")[0]).offsetLeft&&(u-=r.offsetLeft),r.offsetTop&&(f-=r.offsetTop)),{x:u,y:f,topElement:r}}}function changePasswdCheck(n){return null!=n&&(getErrorForScreenReader(),""==n.oldpasswd.value?(alert($$WP.Strings.get("CurrentPasswordError","Core.CommonUtils")),n.oldpasswd.focus(),!1):n.newpasswd.value==n.verifypasswd.value||(alert($$WP.Strings.get("ReTypeNewPasswordError","Core.CommonUtils")),n.verifypasswd.focus(),!1))}function changeQuesAnsCheck(n){return null!=n&&(getErrorForScreenReader(),""==n.oldpasswd.value?(alert($$WP.Strings.get("CurrentPasswordError","Core.CommonUtils")),n.oldpasswd.focus(),!1):""!=n.pwdans.value||(alert($$WP.Strings.get("AnswerError","Core.CommonUtils")),n.pwdans.focus(),!1))}function CheckFilenameExtensions(){var i,f,e,r,u,o,s,h,c,l=document.getElementById("ALLOWED_EXTENSIONS"),a=0,n=!1,t=!0;if(!l)return!0;for(i=l.value,f=new RegExp("^([a-zA-Z]:(\\\\|/)|file://|/|\\\\\\\\)[^\\\\/:].*\\..+");!n;){if(!(e=document.getElementById("upload"+ ++a))){n=!0;break}if(0!=(r=e.value).length){if(-1!=navigator.userAgent.indexOf("MSIE")&&!f.test(r)){t=!1;n=!0;break}if((u=r.split(".")).length<2){t=!1;n=!0;break}if(o=u[u.length-1].toUpperCase(),-1==i.indexOf("^"+o+"^")){t=!1;n=!0;break}}}return t||((s=document.getElementById("progbar"))&&(s.className+=" hidden"),h=i.substr(1,i.length-2).replace(/\^/g,", "),c=$$WP.Strings.get("BadFilenameExtension","Core.CommonUtils").replace("@MYCHART@FILENAME@",r).replace("@MYCHART@ALLOWEDEXTENSIONS@",h),alert(c)),t}function checkEnter(n,t){return null!=n&&"13"==n.keyCode?(null!=t&&t.click(),!1):!0}function isBasicInlineValidationError(n,t,i,r,u,f,e,o,s,h,c){var l=!1,a=!1,v=!1,y=!1;return""!=i&&null!=i||(i=getErrorForScreenReader()+$$WP.Strings.get("RequiredFieldError","Global")),""!=o&&null!=o||(o=i),null!=n&&(""!=c&&null!=c||(c=-1),n.maxLength>1e4&&(r=!1),r&&c<0&&(c="dob"==n.id?n.maxLength-2:n.maxLength),""==n.value||null==n.value?(l=!0,a=!0):r&&n.value.length<c&&n.value.length>0?(l=!0,v=!0):h&&isNaN(n.value)&&(l=!0,y=!0),l?u||(a?s?isHighlighted(n)&&changeErrorField(t,i,!1,[n]):(turnOnHighlight(n),changeErrorField(t,i,!1,[n])):(v||y)&&(turnOnHighlight(n),changeErrorField(t,o,!1,[n]))):(e||turnOffHighlight(n),f||changeErrorField(t,"",!0,[n])),l)}function changeErrorField(n,t,i,r){var f,s,e,u,o;if(n.length>0&&(f=document.getElementById(n))){if(i&&("&nbsp;"===f.innerHTML||""===f.innerHTML))return;if(dangerou$.setHtml(f,t),r&&r.length>=1)for(s=""===t,e=0;e<r.length;e++)o=(u=$afe.jq(r[e])).safeAttr("aria-describedby"),s?(u.removeAttr("aria-invalid"),o===n&&u.removeAttr("aria-describedby")):(u.safeAttr("aria-invalid","true"),o||u.safeAttr("aria-describedby",n))}}function turnOnHighlight(n){n.className.search("inputHighlighted")<0&&(n.className=n.className+" inputHighlighted")}function turnOffHighlight(n){isHighlighted(n)&&(n.className=n.className.replace(" inputHighlighted",""))}function highlightIfEmpty(n,t){null!=n&&(""==n.value?t||turnOnHighlight(n):turnOffHighlight(n))}function isHighlighted(n){return null!=n&&n.className.search("inputHighlighted")>-1}function validateEmptinessOfTwoRelatedFields(n,t){n.value.length<1?t.value.length<1?isHighlighted(t)&&turnOnHighlight(n):turnOnHighlight(n):turnOffHighlight(n)}function checkKeyPress(n,t,i){var r=!1;switch(t){case ALPHANUMERIC:(n.keyCode>=48&&n.keyCode<=57||n.keyCode>=65&&n.keyCode<=90||n.keyCode>=96&&n.keyCode<=105||n.which>=48&&n.which<=57||n.which>=65&&n.which<=90||n.which>=96&&n.which<=105)&&(r=!0);WP.DOM.Browser.isAndroid&&(r=!0);break;case EQUAL_TO_CODE:n.keyCode!=i&&n.which!=i||(r=!0);break;case GREATER_THAN_CODE:(n.keyCode>i||n.which>i)&&(r=!0);break;case LESS_THAN_CODE:(n.keyCode<i||n.which<i)&&(r=!0);break;default:return r}return r}function checkIfFocusOnPrevField(n,t,i,r){var u,f;(f=r-1)>0&&checkKeyPress(n,EQUAL_TO_CODE,"8")&&""==t.value&&null!=(u=document.getElementById(i+f))&&(u.focus(),isTabAllowed=!0,u.value=u.value)}function autotab(n,t,i){checkKeyPress(n,ALPHANUMERIC)?t.getAttribute&&t.value.length==t.getAttribute("maxlength")&&(WP.DOM.Browser.isIPod||WP.DOM.Browser.isIPhone||WP.DOM.Browser.isIPad?(i.focus(),isTabAllowed=!1):(i.focus(),i.select(),isTabAllowed=!1)):checkKeyPress(n,EQUAL_TO_CODE,"16")&&(isTabAllowed=!0)}function isDiscreteFieldsError(n,t,i,r,u,f,e,o,s,h){var l,c,w,a,v,y=!1,p=!1,b=0;for(v=u,a=null==o,""!=u&&null!=u||(u=$$WP.Strings.get("RequiredFieldError","Global")),""==f&&(f=u),l=1;l<=t;l++)null!=(c=document.getElementById(n+l))&&(""!=c.value?(s&&(s=""),v=f,l=t):isHighlighted(c)&&s&&(s=""));if(a||(isHighlighted(o)&&!0,y=isBasicInlineValidationError(o,r,v,i,e,1,"",v,s,h)),y)p=!0;else for(null==t&&(t=1),l=1;l<=t;l++)(c=1==t?document.getElementById(n):document.getElementById(n+l)).maxLength>1e4&&(i=!1),i&&(b="dob"==c.id||"ssn"==c.id?c.maxLength-2:c.maxLength),null!=c&&(""==c.value?(y=!0,!e&&a&&(turnOnHighlight(c),changeErrorField(r,v,!1,[c]))):i&&c.value.length<b&&c.value.length>0?(y=!0,!0,!e&&a&&(turnOnHighlight(c),changeErrorField(r,v,!1,[c]))):(a&&turnOffHighlight(c),(o==c||a)&&((w=$afe.jq(c)).removeAttr("aria-invalid"),w.removeAttr("aria-describedby"))),isHighlighted(c)&&(p=!0));return y?(p||changeErrorField(r,""),!0):(changeErrorField(r,""),!1)}function checkIfTabAllowed(n,t){checkKeyPress(n,EQUAL_TO_CODE,"16")?isTabAllowed=!0:checkKeyPress(n,EQUAL_TO_CODE,"9")&&t.value.length<1&&!isTabAllowed&&(cancelEvent(n),isTabAllowed=!0)}function cancelEvent(n){n.cancelBubble=!0;n.returnValue=!1;n.stopPropagation&&(n.stopPropagation(),n.preventDefault())}function easyDOBEntry(n,t,i,r){null!=n&&(t?i?isValidTwoDigitYear(n.value)&&(r?isTabAllowed=!0:n.value=getFourDigitYearFromTwoDigitYear(n.value,BIRTH_YEAR_MIN_YEARS_BACK).toString()):1==n.value.length&&n.value>0&&(r?isTabAllowed=!0:n.value="0"+n.value):n.length?(isValidOneDigitDatePart(n[0].value)&&(n[0].value="0"+n[0].value),isValidOneDigitDatePart(n[1].value)&&(n[1].value="0"+n[1].value),isValidTwoDigitYear(n[2].value)&&(n[2].value=getFourDigitYearFromTwoDigitYear(n[2].value,BIRTH_YEAR_MIN_YEARS_BACK).toString())):n.value<100&&n.value>=0&&(n.value=getFourDigitYearFromTwoDigitYear(n.value,BIRTH_YEAR_MIN_YEARS_BACK).toString()))}function removeCharFromField(n,t,i,r){var u;null!=r&&""!=r||(r=REMOVE_IF_EQUAL_TO_REMOVE_CHAR);u=charKeyPressed(n);r==REMOVE_IF_EQUAL_TO_REMOVE_CHAR?!checkKeyPress(n,GREATER_THAN_CODE,"0")||checkKeyPress(n,EQUAL_TO_CODE,"9")||checkKeyPress(n,EQUAL_TO_CODE,"16")||u==i&&cancelEvent(n):r==REMOVE_NONNUMERIC&&(checkKeyPress(n,EQUAL_TO_CODE,"8")||checkKeyPress(n,EQUAL_TO_CODE,"9")||checkKeyPress(n,EQUAL_TO_CODE,"27")||checkKeyPress(n,EQUAL_TO_CODE,"46")||checkKeyPress(n,EQUAL_TO_CODE,"37")||checkKeyPress(n,EQUAL_TO_CODE,"39")||!isNaN(u)||cancelEvent(n))}function charKeyPressed(n){var t;return n||(n=window.event),n.keyCode?t=n.keyCode:n.which&&(t=n.which),t>0?String.fromCharCode(t):""}function ShowPharmacyHours(n,t,i){var u,r=document.getElementById(t).selectedIndex;null!=r&&(u=n+r,0==r?dangerou$.setHtml(document.getElementById(i).innerHTML,"&nbsp;"):dangerou$.setHtml(document.getElementById(i),document.getElementById(u).value))}function clearRadioSelection(n){for(var i=document.getElementsByName(n),t=0;t<i.length;t++)"radio"==i[t].type&&(i[t].checked=!1)}function UpdateAddressOptions(){var t,o,s,e,n,r,h,u,c,i,f;if(null!==(o=document.getElementById("pharmacy").selectedIndex)){for(s="pharmacyaddresses"+o,e=document.getElementById(s).value.split("*"),t=document.getElementsByName("address"),n=0;n<t.length;n++)if(!((h=t[n].id.indexOf("_"))<0)&&0!=(u=t[n].id.substring(h+1)).length&&99!=u&&(c="addresslabel_"+u,i=document.getElementById(c))){for(t[n].disabled=!0,applyClass(t[n],"hidden"),applyClass(i,"hidden"),i.disabled=!0,r=0;r<e.length;r++)if(e[r]==u){f||(f=t[n]);t[n].disabled=!1;removeClassNames(t[n],"hidden");removeClassNames(i,"hidden");i.disabled=!1;break}return""}f&&(f.checked=!0)}}function UpdateDeliveryMethods(n,t,i,r,u){var p,a,w,h,c,b,k,o,f,l,e,v,y,s;if(null!==(p=document.getElementById(t).selectedIndex)){if(a=n+p,null===document.getElementById(a))return(e=document.getElementById("deliveryoptions"))&&(applyClass(e,"hidden"),e.disabled=!0),showAndHideButtons("send","paynext"),(v=document.getElementById("paymentoptions"))&&(applyClass(v,"hidden"),v.disabled=!0),void hidePickupFields(["pickupoptions","addressoptions","comments"]);if(h=(w=document.getElementById(a).value).split("^"),hidePickupFields(["pickupoptions","addressoptions","comments"]),0===w.length)(e=document.getElementById("deliveryoptions"))&&(applyClass(e,"hidden"),e.disabled=!0);else{for(y=!1,(e=document.getElementById("deliveryoptions"))&&(removeClassNames(e,"hidden"),e.disabled=!1),o=1;o<4;o++)if(b=i+o,k=r+o,f=document.getElementById(b))for(f.checked&&1==u?(y=!0,1==f.value?showPickupFields(["pickupoptions"]):showPickupFields(["addressoptions","comments"])):f.checked=!1,f.disabled=!0,applyClass(f,"hidden"),applyClass(l=document.getElementById(k),"hidden"),l.disabled=!0,c=0;c<h.length;c++)h[c].split("|")[0]==o&&(f.disabled=!1,removeClassNames(f,"hidden"),removeClassNames(l,"hidden"),l.disabled=!1,s||(s=f));h.length>0&&!y&&s&&(s.checked=!0,1==s.value?(showPickupFields(["pickupoptions"]),hidePickupFields(["addressoptions","comments"])):showPickupFields(["addressoptions","comments"]))}UpdateAddressOptions();UpdatePaymentMethods("pharmacymethods","pharmacy","deliverymethod","paymentmethod","paymentmethodlabel",u)}}function getRadioValue(n){var i,t;if(0==(i=document.getElementsByName(n)).length)return"";for(t=0;t<i.length;t++)if(1==i[t].checked)return i[t].value;return""}function UpdatePaymentMethods(n,t,i,r,u,f){var b,g,s,e,l,nt,v,y,k,h,o,p,w,c,d,a;if(showAndHideButtons("send","paynext"),(c=document.getElementById("paymentoptions"))&&(applyClass(c,"hidden"),c.disabled=!0),b=document.getElementById(t).selectedIndex,k=getRadioValue(i),null!==b&&0!==k.length){for(g=n+b,s=document.getElementById(g).value.split("^"),w="",e=0;e<s.length;e++)if(k==(v=(h=s[e].indexOf("|"))<0?s[e]:s[e].substring(0,h))){h>=0&&(w=s[e].substring(h+1));break}if(w.length>0){for(d=!1,y=w.split("|"),(c=document.getElementById("paymentoptions"))&&(removeClassNames(c,"hidden"),c.disabled=!1),o=document.getElementsByName(r),e=0;e<o.length;e++)if(!((h=o[e].id.indexOf("_"))<0)&&0!=(v=o[e].id.substring(h+1)).length)for(nt=u+"_"+v,l=document.getElementById(nt),f&&o[e].checked?(d=!0,2==o[e].value&&showAndHideButtons("paynext","send")):o[e].checked=!1,a||(a=o[e]),o[e].disabled=!0,applyClass(o[e],"hidden"),applyClass(l,"hidden"),l.disabled=!0,p=0;p<y.length;p++)y[p]==v&&(o[e].disabled=!1,removeClassNames(o[e],"hidden"),removeClassNames(l,"hidden"),l.disabled=!1);y.length>0&&!d&&a&&(a.checked=!0,2==a.value&&showAndHideButtons("paynext","send"))}}}function HidePharmacyText(n,t,i,r){var f,u;n||(n=document.getElementById(t));n&&(f=document.getElementById(i),u=document.getElementById(r),f&&u&&(n.options[n.selectedIndex].value==f.value?(u.disabled=!1,removeClassNames(u,"hidden")):(u.disabled=!0,applyClass(u,"hidden"))))}function showAndHideButtons(n,t){var i,r;(i=document.getElementById(n))&&(i.disabled=!1,removeClassNames(i,"hidden"));(r=document.getElementById(t))&&(r.disabled=!0,applyClass(r,"hidden"))}function showPickupFields(n){var t,i;if(n)for(t=0;t<n.length;t++)(i=document.getElementById(n[t]))&&(removeClassNames(i,"hidden"),i.disabled=!1)}function hidePickupFields(n){var t,i;if(n)for(t=0;t<n.length;t++)(i=document.getElementById(n[t]))&&(applyClass(i,"hidden"),i.disabled=!0)}function enableIfRadioCheckedAndElementsFilled(n,t,i,r,u){var f,e;f=document.getElementById(t);(e=document.getElementById(i))&&!containsClassName(e,"hidden")&&f&&f.checked?enableIfReqFilled(n,r,u):enableIfReqFilled(n,r)}function isValidEmail(n){return new RegExp(/^\s*[A-Za-z0-9\xC0-\xFFƒŠŒŽšœžŸ._%+-]+@[A-Za-z0-9\xC0-\xFFƒŠŒŽšœžŸ.-]+\.[A-Za-z\xC0-\xFFƒŠŒŽšœžŸ]{2,18}\s*$/).test(n)}function $T(n,t){return n&&(void 0!==n.innerText&&(n.innerText=t),void 0!==n.textContent&&(n.textContent=t)),n}function clearElement(n){if(n)for(n.innerHTML="",n.value="",n.innerText="";n.hasChildNodes();)n.removeChild(n.lastChild)}function HTMLUnencode(n){return HTMLEncodeDecodeDiv.innerHTML=n||"",HTMLEncodeDecodeDiv.innerText||HTMLEncodeDecodeDiv.textContent}function HTMLEncode(n){return n.replace($$WP.Utilities.Global.HtmlChars,$$WP.Utilities.HtmlEncodeCallback)}function createElement(n,t,i){var r=document.createElement(n||"div");return t&&(r.className=t),i&&(r.id=i),r}function getPrefix(n){var t;return 0===(t=n?$$WP.Strings.get("DataTileStaticURLPrefix","Core.CommonUtils"):$$WP.Strings.get("DataTileURLPrefix","Core.CommonUtils")).length&&(t=WP.myPath+"@mychart@url@"),t}function applyPrefix(n,t){var u,r,i;return t=t||"",n?((r=t.indexOf("#"))>0&&(u=t.substring(r+1),t=t.substring(0,r)),i=(i=n.replace(/@mychart@url@/gi,t)).replace(/@mychart@wrappedurl@/gi,encodeURIComponent(t)),r>0&&(i=i+"#"+u),i):t}function makeStaticLink(n){var t,i,r;return 0===(n=n.replace(/\\/g,"/")).indexOf(".")&&(n=n.substring(1)),0===n.indexOf(".")&&(n=n.substring(1)),0===n.indexOf("/")&&(n=n.substring(1)),78===$$WP.ApplicationContext?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/"+n):(t=getPrefix(!0),i=$$WP.AffiliateFilePath,r=new RegExp("svg$","i"),applyPrefix(t,n=!$$WPUtil.IsNullOrEmpty(i)&&r.test(n)?$$WP.AffiliateFilePath+"/"+n:$$WP.I18N.getMyChartLocale()+"/"+n))}function createImage(n,t,i,r){var u=createElement("img",n,t);return u.src=makeStaticLink("/images/"+(i||"")),u.alt=r||"",u.title=r||"",u}function getOffset(n,t){var i=n[t];for(n=n.offsetParent;n;)i+=n[t],n=n.offsetParent;return i}function createAlert(n,t,i){var r,f,u;if(0!==n.length)return r=createElement("span","alert"),!0===t&&(f=createImage("yield","","warning.png",$$WP.Strings.get("YieldTitle","Core.CommonUtils")),r.appendChild(f)),u=createElement("span","errHolder"),dangerou$.setHtml(u,n),r.appendChild(u),i&&(i.appendChild(r),i.className=""),r;clearElement(i)}function getChild(n,t){for(var i=n.firstChild;t>0;){for(t--;i&&("#comment"===i.nodeName||"#text"===i.nodeName);)i=i.nextSibling;if(!i)return null;i=i.nextSibling}for(;i&&("#comment"===i.nodeName||"#text"===i.nodeName);)i=i.nextSibling;return i}function getTrackedWindowString(n){return""!==n&&null!=n||(n="openWindows"),getCookie(n,!0)}function openWindow(n,t,i,r,u,f,e){var s,o,h;return void 0!==i&&""!==i||u||(i="status=0,menubar=0,scrollbars=1,resizable=1,toolbar=0"),e?openWindowInternal(n,t,i):(null==r&&(r="openWindows"),h=""===(o=getCookie(r,!0))?0:o.split("^").length,null!=t&&""!==t||(t="mycWin"+makeLink("")+h),s=openWindowInternal(n,t,i),setCookie(r,o=o+(o.length>0?"^":"")+t,!0),s)}function openWindowInternal(n,t,i){var r;return(r=$$WP._windowOpenReal(n,t,i))&&(r.opener=null),r}function openOAuthWindow(n){var u=$$WPUtil.getDomain(window.location),f=n.callback||function(){window.location.reload()},r=openWindow(n.sUrl,n.sName,n.sFeature),i,t;r&&r.focus();i=function(n){if(n.origin==u&&"GotAccessToken"==n.data){try{r.close()}catch(n){}window.removeEventListener?window.removeEventListener("message",i,!1):window.detachEvent?window.detachEvent("onmessage",i):document.detachEvent&&document.detachEvent("onmessage",i);f()}};window.attachEvent?window.attachEvent("onmessage",i):document.attachEvent?document.attachEvent("onmessage",i):window.addEventListener&&window.addEventListener("message",i);t=document.getElementById("GetAccessTokenProxy");!t&&(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)&&((t=document.createElement("iframe")).src=n.sProxy,t.width=0,t.height=0,t.frameBorder=0,t.style.visibility="hidden",t.id="GetAccessTokenProxy",document.body.appendChild(t))}function postMessageForOAuthPopup(n,t){if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0){var i=document.getElementById("GetAccessTokenProxy");try{i.contentWindow.postMessage(n,t)}catch(n){}}else window.postMessage(n,t)}function closeAllWindows(n){var r,u,f,t,e,i;if(""!==n&&null!=n||(n="openWindows"),r=getCookie(n,!0)){for(e=(u=r.split("^")).length,t=0;t<e;t++)if(f=u[t])try{(i=$$WP._windowOpenReal("",f,""))&&i.close&&i.close()}catch(n){}deleteCookie(n,!0)}}function setCookie(n,t,i,r){var u;n&&(u=n+(i?"4"+makeLink("").replace(new RegExp("/","g"),"").toLowerCase():"")+"="+escape(t)+";path=/",u+=r?"; expires="+r.toGMTString():"",hasSameSiteBug()||$$WP.DisableSameSiteSecureCookie||(u+=";SameSite=None; Secure"),document.cookie=u)}function hasSameSiteBug(){var n=navigator.userAgent,t=RegExp("^.*CPU OS 1[0-2].*Version/1[0-2].*Safari.*$"),i=RegExp("^.*CPU iPhone OS 1[0-2].*Version/1[0-2].*Safari.*$"),r=RegExp("^.*Macintosh; Intel Mac OS X 10_1[0-4].*Version/1[0-3].*Safari.*$"),u=RegExp("^.*Chrom[^ /]+/(5[1-9]|6[0-6])[.d]*.*$"),f=RegExp("^.*CriOS[^ /]+/(5[1-9]|6[0-6])[.d]*.*$"),e=RegExp("^.*CPU OS 12.*like Mac OS X.*$"),o=RegExp("^.*CPU iPhone OS 12.*$");return!!(t.test(n)||i.test(n)||r.test(n)||u.test(n)||f.test(n)||e.test(n)||o.test(n))}function getCookie(n,t){var u,f,s,i,h,e,o,r;if(r="",!(u=document.cookie)||0===u.length)return r;if(f=u.split(";"))for(h=new RegExp(n+(t?"4"+makeLink("").replace(new RegExp("/","g"),"").toLowerCase():"")+"s?="),e=/^\s+|\s+$/g,i=0;i<f.length&&!s;i+=1)(o=f[i].replace(e,"")).search(h)>-1&&(r=unescape(o.substr(o.indexOf("=")+1)).replace(e,""),s=!0);return r}function deleteCookie(n,t){n&&setCookie(n,"",t,new Date(1))}function makeLink(n){return n.match(/^(epic)?https?:\/\//i)?n:78===$$WP.ApplicationContext?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl(n):applyPrefix(getPrefix(!1),n)}function makeErrorPageLink(){return 78===$$WP.ApplicationContext?makeLink("Core/Home/Error"):makeLink("500.aspx")}function makeStaticImageLink(n){return 78===$$WP.ApplicationContext?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/images/"+n):makeStaticLink("images/"+n)}function addQueryStringToUrl(n,t,i){if(n&&t){var r=-1!==n.indexOf("?");i||(i="");n=n+(r?"&":"?")+t+"="+i}return n}function getCSRFTokenAsQS(n){$afe.select("body").hasClass("isPrelogin")?n():$$WPUtil.IsNullOrEmpty($$WP.Settings.DotNetOnly)||!$$WP.Settings.DotNetOnly?(($$WP=$$WP||{})._CSRFCallBackQueue=$$WP._CSRFCallBackQueue||[],$$WP._CSRFTokenQs?n($$WP._CSRFTokenQs):$$WP._CSRFReqSent?$$WP._CSRFCallBackQueue.push(n):($$WP._CSRFReqSent=!0,$.get(makeLink("Home/CSRFToken"),function(t){var f,u,r,i;if(t&&(u=(f=dangerou$.parseHtml(t)).safeAttr("name")||"__RequestVerificationToken",r=f.val(),$$WP._CSRFTokenName=u,$$WP._CSRFToken=r,$$WP._CSRFTokenQs=u+"="+encodeURIComponent(r),$$WP._CSRFTokenQsToken=encodeURIComponent(r)),n($$WP._CSRFTokenQs),$$WP._CSRFCallBackQueue.length>0){for(i=0;i<$$WP._CSRFCallBackQueue.length;i++)"function"==typeof $$WP._CSRFCallBackQueue[i]&&setTimeout($$WP._CSRFCallBackQueue[i],0,$$WP._CSRFTokenQs);$$WP._CSRFCallBackQueue=[]}}))):n()}function setFederatedLogoutMode(n){$$WP.FederatedLogoutMode=n}function getFederatedLogoutMode(){return 1==$$WP.FederatedLogoutMode}function disableEmptyFormInputs(n){for(var i=document.getElementById(n).getElementsByTagName("input"),t=0;t<i.length;t++)i[t].value.length||$afe.jq(i[t]).safeAttr("disabled",!0)}function removeNonNumericInput(n){var t=n.value.replace(/[^\d]/g,"");n.value!=t&&(n.value=t)}function removeFadedtextHint(n){$afe.jq(n).hasClass("fadedtext")&&(n.value="")}function logAction(n,t,i){78===$$WP.ApplicationContext&&Epic.PatientEngagement.Welcome.Core.EventLogging.EventLoggingServices.logAction(n,t,i)}function SetActivity(){$$WPUtil.setActivity()}function SetBlurActivity(){$$WPUtil.setActivity()}function HandleKeyPress(){return $$WPUtil.setActivity(),!0}function HandleKeyPressAndMaxLen(n,t,i,r){var u;return u="Netscape"!=navigator.appName?window.event.keyCode:n.which,$$WPUtil.setActivity(),8===u||0===u||!(!n.ctrlKey||86===u||118===u)||CheckLength(t,i,r,1)}function HandleBlurAndMaxLen(n,t,i,r){return HandleKeyPressAndMaxLen(n,t,i,r)}function HandleOnChangeAndMaxLen(n,t,i){return $$WPUtil.setActivity(),CheckLength(n,t,i)}function enableIfChecked(n){if(document.getElementById){var r,i,f,t,e,o,s,u,h=[];if(f=document.getElementById(n)){for(e=enableIfChecked.arguments,t=1;t<e.length;t++)(i=f[e[t]])&&"object"==typeof i&&h.push(i);for(o=f.getElementsByTagName("input"),s=!1,u=0;u<o.length;u++)if(("checkbox"==(r=o[u]).type||"radio"==r.type)&&-1==r.className.toLowerCase().indexOf("hidden")&&r.checked){s=!0;break}for(t=0;t<h.length;t++)i=h[t],s?enableBtn(i):disableBtn(i)}}}function enableIfAllChecked(){for(var t,i=!0,n=0;n<arguments.length;n++)t="#"+arguments[n],0!==$afe.select(t).length&&($afe.select(t).prop("checked")||(i=!1));return i}function decodeMnemonics(n,t){var i,r;for(i in t=t||{})void 0!==t[i]&&(r=new RegExp(i,"g"),n=n.replace(r,t[i]));return n}function disableButtonAndShowSpinner(n){n.prop("disabled",!0);n.addClass("omitdisablestyling");var t=document.createElement("div");$afe.jq(t).addClass("spinningLoadWheel");n.safeAfter(t)}function moveFormSubmissionButtonAndShowSpinner(n){var t=document.createElement("input"),i;$afe.jq(t).addClass("button completeworkflow omitdisablestyling formbuttons");$afe.jq(t).prop("id","noActionButton");$afe.jq(t).prop("value","Submit");$afe.jq(t).prop("type","submit");$afe.jq(t).prop("disabled",!0);n.safeAfter(t);n.css("position","absolute");n.css("left","-999em");i=document.createElement("div");$afe.jq(i).addClass("spinningLoadWheel");$afe.jq(t).safeAfter(i);n.on("keydown",function(n){32!==n.keyCode&&13!==n.keyCode||n.preventDefault()})}function reportFormFactor(){$$WP.Analytics.UsageTrackingController.logFormFactor()}function getErrorForScreenReader(){return"<span class='clearlabel'>"+$$WP.Strings.get("ErrorLabelText","Global")+"<\/span>"}function vdtAdmissionLoad(){var n,t,i,r=!1,u=document.getElementById("appRoot");if((n=document.getElementById("loadingSpinner"))&&(n.style.display="none"),(n=document.getElementById("vdtFrame")).parentNode.style.height="auto",n.contentDocument||(r=!0),r||null==n.contentDocument.getElementById("vdtError")||(i=!0),i)(n=document.getElementById("vdtErrorDiv")).style.display="inherit";else{n.style.display="inherit";try{$afe.jq(window).on("popstate",handleBrowserBack);isDataTile()?(t=getGenericHeight(n),n.style.height!=t&&(n.style.height=t)):setAppropriateHeight();(u=document.getElementById("appRoot"))&&setAppropriateHeightOnDOMMutations(u)}catch(n){return}}}function getGenericHeight(n){return n.style.height="100px",Math.max(document.body.scrollHeight||200,document.body.offsetHeight||200)+16+"px"}function setClientTimeZone(){$$WP.I18N.setClientTimeZone()}function addMobileTitle(n){"undefined"!=typeof Android&&Android.setWebViewTitle?Android.setWebViewTitle(n):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.setWebViewTitle&&window.webkit.messageHandlers.setWebViewTitle.postMessage(n)}function isArbitraryDownloadSupported(){if($$WP.Utilities.UI.IsMobile){if("undefined"!=typeof Android)return Android.webViewDownloadEnabled&&Android.webViewDownloadEnabled();if(window.webkit&&window.webkit.messageHandlers)return window.webkit.messageHandlers.webViewDownloadEnabled&&window.webkit.messageHandlers.webViewDownloadEnabled()}return!0}function getFourDigitYearFromTwoDigitYear(n,t){var i,u,r=parseInt(n),f=(new Date).getFullYear();return isNaN(t)&&(t=BIRTH_YEAR_MIN_YEARS_BACK),i=f-t,isNaN(r)?i:(u=i%100)<r?100*(Math.floor(i/100)-1)+r:i-u+r}function isValidTwoDigitYear(n){return 2==n.length&&n>=0}function isValidOneDigitDatePart(n){return n<10&&n>0&&n.length<2}function getAppVirtualPath(){return makeLink("")}function getDeviceIdKey(){return"MYCHART-WEB-DEVICE-"+getAppVirtualPath()}function reconcileWebDevice(n){var i,t,r;void 0!==$$WP&&void 0!==$$WP.IsMidloginStep||isShareEverywhere()||isBedsideTV()||(n=!!n,t=getDeviceIdKey(),$$WPUtil.isLocalStorageAvailable()&&void 0!==window.localStorage&&(i=localStorage.getItem(t)),r={deviceId:i,skipSessionCheck:n},$.ajax({url:makeLink("Authentication/RememberDevices/ReconcileWebDevice"),type:"POST",data:r,dataType:"json",success:function(n){var i,r=$$WPUtil.isLocalStorageAvailable()&&void 0!==window.localStorage;r&&(i=localStorage.getItem(t));(n.forceUpdate||null===i)&&n.deviceId&&(i=n.deviceId,r&&localStorage.setItem(t,i))}}))}var WP=WP||{},HTMLEncodeDecodeDiv;void 0===WP.FdiUtils&&(WP.FdiUtils={});WP.FdiUtils.handleFDILink=function(n){var t,i,r;t=$afe.jq(n.target);n.preventDefault();(i=t.closest("[data-fdi-context]")).length>0&&(r=i.safeAttr("data-fdi-context"),WP.FdiUtils.ExecuteFDILink(r))};WP.FdiUtils.ExecuteFDILink=function(n){var t,r,u,f,i,e,o;i="";""!==n&&(r=(t=JSON.parse(n)).fdi,u=t.csn,f=t.ord,e=t.DocumentID,o=t.eptId,delete t.fdi,delete t.csn,delete t.ord,delete t.DocumentID,delete t.eptId,i=WP.FdiUtils.buildFDILinkParamString(r,u,f,t,e,o));getCSRFTokenAsQS(function(n){$.ajax({url:makeLink("Extensibility/Redirection/FdiData"+i),type:"POST",dataType:"json",data:n,success:function(n){WP.FdiUtils.fdiJSONSuccess(n,i)}})})};WP.FdiUtils.fdiJSONSuccess=function(n,t){var i,r,u,f;switch(i=n.url,r=n.launchmode,f=n.IsFdiPost,4===r&&(i=makeLink(i)),f&&(i=makeLink("Extensibility/Redirection/FdiRedirection"+t)),r){case 1:case 4:window.location.href=i;break;default:null!=(u=openWindow(i,"","",null,!0,!1,!0))&&void 0!==u||WP.DOM.Browser.isIE||WP.DOM.Browser.isLegacyEdge||WP.FdiUtils.PopupBlocked(i)}};WP.FdiUtils.PopupBlocked=function(n){var t;$$WP.Strings.setDefaultNamespace("Global");(t=new $$WPComp.MessageComponent({TitleText:$$WP.Strings.get("BlockedPopupTitle"),Message:$$WP.Strings.get("BlockedPopupMessageWithLink"),ToolbarButtons:[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("BlockedPopupLaunchBtnTitle"),null,"completeworkflow","LaunchLink"),new $$WPComp.ComplexObjects.Button($$WP.Strings.get("BlockedPopupCancelBtnTitle"),null,"cancelworkflow","")],IsCloseable:!0})).addEventListener("click",$.proxy(this.LaunchClickHandler,this,n));$$WPUtil.quickPopup(t)};WP.FdiUtils.LaunchClickHandler=function(n,t){t&&t.dataId&&"toolbarLaunchLink"===t.dataId&&openWindow(n,"","",null,!0,!1,!0)};WP.FdiUtils.buildFDILinkParamString=function(n,t,i,r,u,f){var e;return e="",n?(e=$$WPUtil.addUrlParameter(e,"fdi",encodeURIComponent(n)),t&&(e=$$WPUtil.addUrlParameter(e,"csn",encodeURIComponent(t))),i&&(e=$$WPUtil.addUrlParameter(e,"ord",encodeURIComponent(i))),$.isEmptyObject(r)||(e=$$WPUtil.addUrlParameter(e,"extra",encodeURIComponent(JSON.stringify(r)))),u&&(e=$$WPUtil.addUrlParameter(e,"DocumentID",encodeURIComponent(u))),f&&(e=$$WPUtil.addUrlParameter(e,"eptID",encodeURIComponent(f))),e):""};$$WP.PageStartup=$$WP.PageStartup||{},function(){if($$WP._ajaxReal)$$WP.Debug.logError("$.ajax has already been copied. Did this file get included twice?");else{var t=function(){return($$WP&&$$WP._CSRFTokenName&&$$WP._CSRFToken?{tokenName:$$WP._CSRFTokenName,tokenValue:$$WP._CSRFToken}:null)||(null!=(t=n("#__CSRFContainer")).tokenName&&null!=t.tokenValue&&($$WP._CSRFTokenName=t.tokenName,$$WP._CSRFToken=t.tokenValue),t);var t},i=function(){return($$WP&&$$WP._WidgetTokenName&&$$WP._WidgetToken?{tokenName:$$WP._WidgetTokenName,tokenValue:$$WP._WidgetToken}:null)||(null!=(t=n("#__WidgetTokenContainer")).tokenName&&null!=t.tokenValue&&($$WP._WidgetTokenName=t.tokenName,$$WP._WidgetToken=t.tokenValue),t);var t},n=function(n){var i,t,r={};return(i=$afe.select(n))&&i.length>0&&(t=i.find("input").first())&&t.length>0&&(r={tokenName:t.safeAttr("name"),tokenValue:t.val()}),r};$.ajaxPrefilter(function(n,t,i){n.crossDomain&&(n.contents.script=!1);i.originalOptions=t});$$WP._ajaxReal=$.ajax||jQuery.ajax;$.ajax=function(n,r){var u;return"object"==typeof n?n=(r=n).url:r=r||{},r.type=r.type||"GET","GET"!==r.type.toUpperCase()&&(r.headers=r.headers||{},u=t(),r.headers[u.tokenName]=u.tokenValue),$$WP.WidgetMode&&(r.headers=r.headers||{},r.headers.__WidgetHeader=i().tokenValue,r.headers["api-key"]=$$WP.WidgetApiKey,$$WP.WidgetLanguage&&(r.headers.lang=$$WP.WidgetLanguage)),r.captchaResponse&&(r.headers["X-Captcha-Response"]=r.captchaResponse),n=$$WP.Utilities.addUrlParameter(n,"noCache",Math.random()),r.url=n,function(n){var i,r,t;n.success&&(n.hasOwnSuccessHandler=!0,i=n.context?n.success.bind(n.context):n.success.bind(n));n.error&&(n.hasOwnErrorHandler=!0,r=n.context?n.error.bind(n.context):n.error.bind(n));t=!1;n.success=function(n,r,u){try{t||$$WP&&$$WP.Performance&&$$WP.Performance.Tracker&&"function"==typeof $$WP.Performance.Tracker._logHttpRequest&&($$WP.Performance.Tracker._logHttpRequestFromAjax(u),t=!0)}finally{i&&i(n,r,u)}};n.error=function(n,i,u){try{t||$$WP&&$$WP.Performance&&$$WP.Performance.Tracker&&"function"==typeof $$WP.Performance.Tracker._logHttpRequest&&($$WP.Performance.Tracker._logHttpRequestFromAjax(n),t=!0)}finally{r&&r(n,i,u)}}}(r),$$WP._ajaxReal(n,r)};$$WP.IsPendingAJAXRequests=!1;$$WP.PendingAJAXCallBack=null;$afe.jq(document).ajaxStart(function(){$$WP.IsPendingAJAXRequests=!0});$afe.jq(document).ajaxStop(function(){$$WP.IsPendingAJAXRequests=!1;null!==$$WP.PendingAJAXCallBack&&"function"==typeof $$WP.PendingAJAXCallBack&&($$WP.PendingAJAXCallBack(),$$WP.PendingAJAXCallBack=null)})}}(),function(n){var t;$$WP._showReal&&$$WP._hideReal?$$WP.Debug.logError("$.show and $.hide have already been copied. Did this file get included twice?"):($$WP._showReal=n.fn.show,$$WP._hideReal=n.fn.hide,t=function(n){var i,t,r,u=function(){i()},f=function(){};if(0!==n.length){for(t=0;t<n.length;t++)"object"==typeof(i=n[t])?(n[t].complete="function"==typeof i.complete?u:f,r=!0):"function"==typeof i&&(n[t]=u,r=!0);r||Array.prototype.push.call(n,f)}},n.fn.show=function(){var n;return setTimeout(function(){$$WP.Debug.UpdateTopMarginForBanners()},100),this.length>0&&(this.hasClass("hidden")?$$WP.Debug.logError("$.show() called on a hidden element. It still won't be shown - it's hidden. If you want it to ever appear, use the jqHidden class instead of hidden."):this.hasClass("jqHidden")||$$WP.Debug.log("$.show() called on an element without the jqHidden class. You should set this class rather than an inline display style.",!0)),arguments.length>0?(t(arguments),n=$$WP._showReal.apply(this,arguments)):(n=$$WP._showReal.apply(this),this.hasClass("cardlist")&&this.trigger("cardLoad")),n},n.fn.hide=function(){var n;return this.length>0&&(this.hasClass("hidden")?$$WP.Debug.logError("$.hide() called on a hidden element. This was a pointless function call."):this.hasClass("jqHidden")||$$WP.Debug.log("$.hide() called on an element without the jqHidden class. You should set this class rather than an inline display style.",!0)),arguments.length>0?(t(arguments),n=$$WP._hideReal.apply(this,arguments)):n=$$WP._hideReal.apply(this),n})}(jQuery);$afe.onDocumentReady(function(){$$WP.WidgetMode&&(setInterval($$WPUtil.RefreshHeader,9e5),setupIframeResizer());!0!==$$WP.IsEpicAjaxErrorHandlerDisabled&&$afe.jq(document).ajaxError($$WPUtil.defaultAjaxErrorHandler),function(){WP.FdiUtils&&($afe.select("body").on("click","a[data-fdi-option]",WP.FdiUtils.handleFDILink),$afe.select("body").on("click",'a[href="#Extensibility_ReportLink"]',WP.FdiUtils.handleFDILink))}(),function(){var t,i,r,u,o,n,f,e,s,h;o=/<([A-Za-z\/])/gm;s=/&#/gm;h=[9,16,17,18,20,27,33,34,35,36,37,38,39,40,44,112,113,114,115,116,117,118,119,120,121,122,123,144,145];u=function(n){return n.replace(o,"< $1").replace(s,"& #")};t=function(n){var t=!1;return h.forEach(function(i){n!==i||(t=!0)}),t};i=function(n){var r,f,i;n&&n.which&&t(n.which)||(r=this.value,f=u(r),i=$$WPUtil.RemoveUnsupportedChars(f),r.length!==i.length&&(this.value=i,i!==f&&($$WP.Utilities.UI.IsMobile||WP.DOM.Browser.isMobile?alert($$WP.Strings.get("UnsupportedCharsPopupMessage","Global")):$$WPUtil.quickPopup(new $$WPComp.MessageComponent({TitleText:$$WP.Strings.get("UnsupportedCharsPopupTitle","Global"),ToolbarButtons:[{Text:$$WP.Strings.get("UnsupportedCharsPopupConfirmButton","Global")}],Message:$$WP.Strings.get("UnsupportedCharsPopupMessage","Global"),IsClosable:!0}),{Size:$$WP.Containers.Popup.SizeEnum.Small,positioningFunction:$$WPContain.Positions.InsideCentered}))))};r=function(n){var i,r;n&&n.which&&t(n.which)||(i=this.value)!==(r=u(i))&&(this.value=r)};f='input:not([data-jq-ignore="true"]):not([data-permissive="true"]):not([type]):not([data-validation-settings]), input:not([data-jq-ignore="true"]):not([data-permissive="true"])[type="text"]:not([data-validation-settings]), textarea:not([data-jq-ignore="true"]):not([data-permissive="true"]):not([data-validation-settings])';e='input:not([data-jq-ignore="true"]):not([data-permissive="true"]):not([type])[data-validation-settings], input:not([data-jq-ignore="true"]):not([data-permissive="true"])[type="text"][data-validation-settings], textarea:not([data-jq-ignore="true"]):not([data-permissive="true"])[data-validation-settings]';(n=$afe.select("body")).on("keyup change",f,i);n.on("keyup change",e,r);n.on("paste",f,function(){setTimeout($.proxy(i,this),300)});n.on("paste",e,function(){setTimeout($.proxy(r,this),300)});n.on("click","a",function(n){var t,i,u,f,r,e;i=(t=$afe.jq(n.currentTarget).closest("a")).safeAttr("data-redirect")||t.safeAttr("href");((r=t.safeAttr("target"))||!t.safeAttr("data-jq-ignore"))&&(t.hasClass("disabled")||"#"===i?n.preventDefault():t.get(0).hasAttribute("onclick")||"string"!=typeof i||0===i.length||"#"===i[0]||t.get(0).hasAttribute("target")&&"_blank"!==r&&"_self"!==r||(u="_blank"===t.safeAttr("target")||n.ctrlKey,f=t.safeAttr("data-organization"),e="true"===t.safeAttr("data-external"),$$WPUtil.TryRedirect(i,null,f,u,e),n.preventDefault()))});window.location!==window.parent.location&&n.on("focus","a[href]:not([tabindex='-1']), area[href]:not([tabindex='-1']), input:not([tabindex='-1']), select:not([tabindex='-1']), textarea:not([tabindex='-1']), button:not([tabindex='-1']), [tabindex]:not([tabindex='-1'])",function(){var i=-1!==document.location.pathname.toLowerCase().indexOf("authentication/login/loginwidget"),t=!0;try{t=window.top.location.hostname.toLowerCase()!==window.location.hostname.toLowerCase()}catch(e){t=!0}i&&t&&"function"==typeof document.requestStorageAccess&&WP.DOM.Browser.isFirefox&&$$WPUtil.canWriteCookies()&&document.requestStorageAccess().then(function(){"1"!=getCookie("LoginWidget",!0)&&(setCookie("LoginWidget","1",!0),document.getElementById("loginForm")||window.location.reload())},function(){"1"!=getCookie("LoginWidget",!0)&&(setCookie("LoginWidget","0",!0),n.trigger("failedStorageRequest"))});$$WPUtil.canWriteCookies()||$$WPUtil.canWriteCookiesAsync().then(function(t){t?n.trigger("successfulStorageRequest"):n.trigger("failedStorageRequest")})})}(),function(){var n=function(n){var t=$afe.jq(n.currentTarget).safeAttr("data-driving-directions");openWindow(makeLink("Education/DrivingDirections?destination="+encodeURIComponent(t)),null,"",null,!0);n.preventDefault()};!function(){$afe.select("body").on("click","[data-driving-directions]",n)}()}(),function(){$afe.select("body").on("input keyup keypress change scroll click dblclick select wheel cut paste touchstart touchend touchmove touchcancel",$$WP.Utilities.SetActivity)}(),function(){var n;$$WP._windowOpenReal=$.proxy(window.open,window);n=function(n,t,i,r){return openWindow(n,t,i,null,!1,r)};window.open=n}(),function(){jQuery.extend=jQuery.fn.extend=function(){var f,u,t,i,e,o,n=arguments[0]||{},r=1,h=arguments.length,s=!1;for("boolean"==typeof n&&(s=n,n=arguments[r]||{},r++),"object"==typeof n||jQuery.isFunction(n)||(n={}),r===h&&(n=this,r--);r<h;r++)if(null!=(f=arguments[r]))for(u in f)t=n[u],n!==(i=f[u])&&"__proto__"!==u&&(s&&i&&(jQuery.isPlainObject(i)||(e=jQuery.isArray(i)))?(e?(e=!1,o=t&&jQuery.isArray(t)?t:[]):o=t&&jQuery.isPlainObject(t)?t:{},n[u]=jQuery.extend(s,o,i)):void 0!==i&&(n[u]=i));return n}}()});WP=WP||{};void 0===WP.TelehealthUtils&&(WP.TelehealthUtils={});WP.TelehealthUtils.flashPopup=function(n){var t;(t=window.open("","history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=800,height=600")).closed||!t.document.URL||0===t.document.URL.indexOf("about")?t.location=n:window.setTimeout(t.focus,1)};WP.TelehealthUtils.telemedPopup=function(n){var t;(t=window.open(n,"history","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width=1280,height=720")).opener=window;t.closed||!t.document.URL||0===t.document.URL.indexOf("about")?t.location=n:window.setTimeout(t.focus,1)};WP.TelehealthUtils.telemedExecuteFDI=function(n,t,i,r){var u,f="";null!=r&&(f="&webrtccontext="+r);i?window.open(makeLink("epichttp://fdiredirect?webid="+encodeURIComponent(n)+"&ecsn="+encodeURIComponent(t)+f)):(u=WP.FdiUtils.buildFDILinkParamString(n,t,"",""),$.ajax({url:makeLink("Extensibility/Redirection/FdiData"+u),type:"POST",success:function(n){WP.FdiUtils.fdiJSONSuccess(n,u)}}))};WP.TelehealthUtils.keepAliveMessageIfInActiveVisit=function(n){$.ajax({url:makeLink("TelemedicineHome/IsPatientInActiveVideoVisit"),type:"POST",success:n,async:!1})};WP.TelehealthUtils.webRtcContextEnum={HardwareTest:0,VideoVisit:1};$$WPUtil.guaranteeExistence($$WP,"CommunityUtilities");$$WP.CommunityUtilities.openDeepLink=function(n,t,i,r,u,f,e,o){var s,a,b,y,v=[],k,p,h,d,w,l,c;if(t&&"object"==typeof t){if(t.IncompleteH2GSetup)return $$WP.Strings.addMnemonic("@MYCHART@OrganizationName@",t.OrganizationName,"","community.externaljump"),b=new $$WPComp.MessageComponent({TitleText:$$WP.Strings.get("IncompleteH2GPopupTitle","community.externaljump"),Message:$$WP.Strings.get("IncompleteH2GPopupText","community.externaljump"),ToolbarButtons:[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("OkayButtonText","community.externaljump"),null,"cancel","")]}),$$WPUtil.quickPopup(b),void $$WP.Strings.removeMnemonic("@MYCHART@OrganizationName@","community.externaljump");if(($$WPUtil.IsNullOrEmpty(e)||isNaN(e))&&(e="-1"),r||(r=$$WP.CommunityUtilities.openDeepLinkType.InPopup),t.IsSSO&&(r||(y=!0),r=$$WP.CommunityUtilities.openDeepLinkType.InNewTab),k=!$$WP.Utilities.UI.IsMobile&&WP.DOM.Browser.isMobile&&$afe.jq(window).width()<768,(WP.DOM.Browser.isIE||WP.DOM.Browser.isSafari||k)&&r===$$WP.CommunityUtilities.openDeepLinkType.InPopup&&(r=$$WP.CommunityUtilities.openDeepLinkType.InNewTab,y=!0,v.push({Name:"isIEOrSafari",Value:1})),!$$WPUtil.IsNullOrEmpty(i)&&"object"==typeof i)for(p in i)v.push({Name:p,Value:i[p]});a=document.location.protocol+"//"+document.location.hostname;$$WPUtil.IsNullOrEmpty(document.location.port)||(a=a+":"+document.location.port);v.push({Name:"parentJumpGUID",Value:$$WP.CommunityUtilities.getExternalJumpGUID()},{Name:"parentDomain",Value:a},{Name:"lang",Value:$$WP.I18N.getMyChartLocale()},{Name:"launchInBrowser",Value:$$WP.Utilities.UI.IsMobile?1:0});h={};h.mode=n;h.orgID=t.OrganizationId;h.usePayerBrandedSite=i.isPayvider;h.parameters=v;h.patientIndex=e;$$WP.Utilities.UI.IsMobile||closeAllWindows("externalJumpWindow");d=function(n){var u,f,e;if(n&&"string"==typeof n&&(n=JSON.parse(n)),n&&n.RedirectToSignup&&null===n.CommunityResponse)return s.hide(),void $$WP.CommunityUtilities.ShowSignupFailedMessage(t);if(n&&n.CommunityResponse&&!$$WPUtil.IsNullOrEmpty(n.CommunityResponse.RedirectURL))(n.RedirectToSignup&&$$WP.CommunityUtilities.markCommunityLinkDirty(t.OrganizationId),r)?s&&s._Components&&s._Components.length>0&&(i&&t.PayerOrgDetails&&(i.isPayvider||t.PayerOrgDetails.IsPayerOnly)?$$WP.Strings.addMnemonic("@MYCHART@OrganizationName@",t.PayerOrgDetails.PayerCvgName,"","community.externaljump"):$$WP.Strings.addMnemonic("@MYCHART@OrganizationName@",n.CommunityResponse.Organization.OrganizationName,"","community.externaljump"),u=[new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("Continue","community.externaljump"),null,"continue","continue"),new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("cancel","community.externaljump"),null,"previousstep","cancel")],$$WP.Utilities.UI.IsMobile?(s._Components[0].setMessage($$WP.Strings.get("redirectMessageForMobile","community.externaljump")),n.CommunityResponse.RedirectURL=makeLink(n.CommunityResponse.RedirectURL+"&launchInBrowser=1")):s._Components[0].$content.html($$WP.Strings.get("redirectMessage","community.externaljump")),s._Components[0].CallbackArgs=[n],s._Components[0].setToolbar(u),s.setFocus(),s.$container.trigger("resize"),$$WP.Strings.clearOrganization("community.externaljump")):(f=i.isPayvider||t.PayerOrgDetails&&t.PayerOrgDetails.IsPayerOnly,e=t.PayerOrgDetails?t.PayerOrgDetails.PayerCvgLogoMagicId:"",c.loadIframe(n,f,e),$$WP.CommunityUtilities.logDeepLinkAudit("3",t.OrganizationId,n.EptId));else{var o="",h=!1,l=!1,a="";n&&n.CommunityResponse&&!$$WPUtil.IsNullOrEmpty(n.ErrorCode)&&("AlreadySignedUp"===(o=n.ErrorCode)?(l=!0,a=$$WP.Strings.get("externalLinkAlreadySignedUpTitle","community.externaljump")):h=!0);w(o,h,l,a)}};w=function(n,t,i,u){var f,e=null,o,h;c&&(f=c.callback,c.callback=null,r||c.dispose());s.hide();errorMessage=$$WPUtil.IsNullOrEmpty(n)?"externalLinkErrorMessage":"externalLink"+n+"ErrorMessage";o=!t;t?e=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("LogoutButtonText","community.externaljump"),null,"cancel","")]:i&&(e=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("RefreshButtonText","community.externaljump"),null,"completeworkflow","")]);h=new $$WPComp.MessageComponent({Message:$$WP.Strings.get(errorMessage,"community.externaljump"),IsClosable:o,ToolbarButtons:e,TitleText:u,callback:function(){f&&c.runCallback(f);t?CreateLogOutPopup(!0):i&&location.reload()}});new $$WPUtil.quickPopup(h).show()};0!==r?(h.access=y?"3":"4",t.PayerOrgDetails&&i&&(i.isPayvider||t.PayerOrgDetails.IsPayerOnly)?$$WP.Strings.addMnemonic("@MYCHART@OrganizationName@",t.PayerOrgDetails.PayerCvgName,"","community.externaljump"):$$WP.Strings.addMnemonic("@MYCHART@OrganizationName@",t.OrganizationName,"","community.externaljump"),l={TitleText:$$WP.Strings.getForTemplate("RedirectPopupTitle","community.externaljump"),Html:$$WP.Templates.UI.AjaxSpinner({inline:1}),callback:function(){var n,i,u;"toolbarcontinue"===this.CallbackArgs[1]&&(response=this.CallbackArgs[0],"string"==typeof response&&(response=JSON.parse(response)),"object"==typeof response)&&((r===$$WP.CommunityUtilities.openDeepLinkType.InNewTab?n="":r===$$WP.CommunityUtilities.openDeepLinkType.InNewWindow&&(n="scrollbars=1,resizable=1"),i=response.CommunityResponse.IsSSOPost?"":response.CommunityResponse.RedirectURL,response.CommunityResponse.IsSSOPost)?(u=openWindow(i,"",n,"externalJumpWindow",!0),$$WPUtil.postForm(response.CommunityResponse.RedirectURL,response.CommunityResponse.SSOParams,u.name)):openWindow(i,"",n,"externalJumpWindow",!0),$$WP.CommunityUtilities.logDeepLinkAudit("4",t.OrganizationId,response.EptId),response.RedirectToSignup&&$$WP.CommunityUtilities.markCommunityLinkDirty(t.OrganizationId))},IsClosable:!0,ToolbarButtons:[]},s=$$WPUtil.quickPopup(new $$WPComp.MessageComponent(l),{Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"sm-autosizedpopup externalJumpRequestPopup Popup"}),$$WPUtil.ShowAjaxSpinner(s.$content.find(".ajaxspinner")),$$WP.Strings.clearOrganization("community.externaljump")):(h.access="3",l={},u&&f&&(l.callback=u,l.context=f),(c=new $$WPComp.ExternalJumpPopupComponent(l)).initialize(),(s=new $$WPContain.Popup({Components:[c],positioningFunction:$$WPContain.Positions.InsideNearTop,Size:$$WPContain.Popup.SizeEnum.LARGE,Class:"externaljumppopup",CommunicationsIndicator:!1,BackButtonText:$$WP.Strings.get("ExitPopup","community.externaljump"),GetInvisibleLastFocusAnchor:function(n){return c.getLastFocusTrap(n)}})).show(!0),s.setAppropriateScrollBar(),s.firstFocus.focus());o&&(h.access="5");h=$$WPUtil.postify(h);getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/GetExternalJumpUrl2"),type:"POST",data:h,dataType:"json",error:function(){w(null,!1)},cache:!1,success:d})})}else $$WP.Debug.log("Organization passed in to the function is null or not an object.")};$$WP.CommunityUtilities.openDeepLinkType={InPopup:0,InNewTab:1,InNewWindow:2};$$WP.CommunityUtilities.logDeepLinkAudit=function(n,t,i){var r={};r.access=n;r.orgID=t;r.eptId=i;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/LogExternalJumpAudit"),type:"POST",data:r,cache:!1})})};$$WP.CommunityUtilities.markCommunityLinkDirty=function(n){var t={};t.organizationId=n;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/MarkCommunityLinkDirty"),type:"POST",data:t,cache:!1})})};$$WP.CommunityUtilities.refreshCommunityLink=function(n){var t={},i=function(){location.reload()};t.organizationId=n;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/RefreshCommunityLink"),type:"POST",data:t,cache:!1,error:i,success:i})})};$$WP.CommunityUtilities.getExternalJumpGUID=function(){return $$WPUtil.IsNullOrEmpty($$WP.CommunityUtilities._externalJumpGUID)&&($$WP.CommunityUtilities._externalJumpGUID=$$WPUtil.generateRandomGUID()),$$WP.CommunityUtilities._externalJumpGUID};$$WP.CommunityUtilities.getParentJumpGUID=function(){return $$WPUtil.IsNullOrEmpty($$WP.CommunityUtilities._parentJumpGUID)?"":$$WP.CommunityUtilities._parentJumpGUID};$$WP.CommunityUtilities.clearJumpGUIDs=function(){$$WP.CommunityUtilities._externalJumpGUID=null;$$WP.CommunityUtilities._parentJumpGUID=null};$$WP.CommunityUtilities.setJumpParameters=function(n,t){$$WPUtil.IsNullOrEmpty(n)||($$WP.CommunityUtilities._parentJumpGUID=n);$$WPUtil.IsNullOrEmpty(t)||($$WP.CommunityUtilities._parentDomain=t)};$$WP.CommunityUtilities.getParentDomain=function(){return $$WPUtil.IsNullOrEmpty($$WP.CommunityUtilities._parentDomain)?"":$$WP.CommunityUtilities._parentDomain};$$WP.CommunityUtilities.closeExternalParentPopup=function(){var t,n={};if(n.externalGUID=$$WP.CommunityUtilities.getParentJumpGUID(),n.message="closePopup",t=$$WP.CommunityUtilities.getParentDomain(),parent)try{parent.postMessage(JSON.stringify(n),t)}catch(t){console.error("Invalid Parent Domain")}WP.Comm.logOut();$$WP.CommunityUtilities.clearJumpGUIDs();$$WP.CommunityUtilities._parentDomain=null;self===top&&(self.location=makeLink("home/logout"))};$$WP.CommunityUtilities.externalJumpMessageListener=function(n){var i=$$WP.CommunityUtilities.getParentDomain(),t;n&&n.originalEvent&&n.originalEvent.origin===i&&n.originalEvent.data&&(t=JSON.parse(n.originalEvent.data),"logout"===t.message?(WP.Comm.logOut(),$$WP.CommunityUtilities.clearJumpGUIDs()):"valid"===t.message&&($$WP._isExternalJumpParentValid=!0))};$$WP.CommunityUtilities.checkIfCommunityJumpIsValid=function(){var t=$afe.select("body"),i,n;if(!t.hasClass("md_default")||t.hasClass("isPrelogin")||t.hasClass("PUpage")){if(self!==top){if(self.window.location.href.toLowerCase().indexOf("/err.asp?")>0)return;n={};n.message="isValidContext";n.externalGUID=$$WP.CommunityUtilities.getParentJumpGUID();i=$$WP.CommunityUtilities.getParentDomain();try{parent.postMessage(JSON.stringify(n),i)}catch(t){console.error("Parent Domain Validation failed")}setTimeout(function(){$$WP._isExternalJumpParentValid||top.location.replace(makeLink("home/logout"))},1e3)}}else self.location=makeLink("closeExternalJumpPopup.asp")};$$WP.CommunityUtilities.openDeepLinkUrl=function(n,t,i,r,u){var f=$$WPUtil.parseQueryString(n),e=f.mode;delete f.mode;$$WP.CommunityUtilities.openDeepLink(e,t,f,i,r,u)};$$WP.CommunityUtilities.ShowSignupFailedMessage=function(n){$$WP.CommunityUtilities.__showSignupFailureMessage(n,"SignupConnectionFailedMessage")};$$WP.CommunityUtilities.ShowSignUpNotAllowedMessage=function(n){$$WP.CommunityUtilities.__showSignupFailureMessage(n,"SignupNotAllowedMessage")};$$WP.CommunityUtilities.__showSignupFailureMessage=function(n,t){var i,r,u;$$WP.Strings.setDefaultNamespace("community.externallinking");$$WP.Strings.setOrganization(n);i=$$WP.Strings.get(t);r=$$WP.Strings.get("SignupErrorTitle");$$WP.Strings.clearOrganization();u=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("ok","cancelpopup"),null,"previousstep","cancel")];$$WPUtil.quickMessageBox(i,r,u,null,null,"SignupNotAllowed");$afe.select(".SignupNotAllowed.component.Popup").removeClass("textlessTitle");$$WP.Strings.clearDefaultNamespace()};$$WP.CommunityUtilities.hasCommunityLinks=function(){return!$afe.select("body").hasClass("hasNoCommunityLinks")};$$WP.CommunityUtilities.communityChecksuccesscallback=function(n){var t,i;null!=n&&(t=(i=n.isCommunityActive)?"hasCommunityLinks":"hasNoCommunityLinks",$$WP.CommunityUtilities.isNotDotNetMode()&&$.ajax({url:makeLink("session.asp?mode=updateCommunityActiveCheckFlags&IsCommunityActive="+i)}),getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/UpdateCommunityActiveCheckFlags"),type:"POST"})}),$afe.select("body").removeClass("hasNoCommunityLinks hasCommunityLinks").addClass(t))};$$WP.CommunityUtilities.clearCommunityLinksSessionStatus=function(){$$WP.CommunityUtilities.isNotDotNetMode()&&$.ajax({url:makeLink("session.asp?mode=clearCommunityActiveCheckFlags")});getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/ClearCommunityActiveCheckFlags"),type:"POST"})})};$$WP.CommunityUtilities.isNotDotNetMode=function(){return $$WPUtil.IsNullOrEmpty($$WP.Settings.DotNetOnly)||!$$WP.Settings.DotNetOnly};$$WP.CommunityUtilities.checkIfCommunityLinksAvailable=function(){var n=$afe.select("body");n.hasClass("isPrelogin")||n.hasClass("termsPage")||getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/IsCommunityActive"),dataType:"JSON",type:"POST",cache:!1,success:$$WP.CommunityUtilities.communityChecksuccesscallback,failure:function(){$$WP.Debug.log("Community Links available ajax called failed.")}})})};$$WP.CommunityUtilities.getCommunityLinks=function(n,t,i,r){t=t||"*";n=n||function(){};r=r||window;i=i||[];var u=$$WP.CommunityUtilities.getCommunityLinks;if(u._links[t])return i.push(u._links[t]),n.apply(r,i);u._callback=n;u._args=i;u._context=r;u._waitingFor=t;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/GetCommunityLinks?requireSecurityForMode="+t),dataType:"JSON",type:"POST",cache:!1,success:$$WP.CommunityUtilities.getCommunityLinks.callStack,failure:function(){$$WP.CommunityUtilities.getCommunityLinks.callStack({ForMode:t,Organizations:[]})}})})};$$WP.CommunityUtilities.getCommunityLinks.callStack=function(n){var t=$$WP.CommunityUtilities.getCommunityLinks;t._links[n.ForMode]=n.Organizations;n.ForMode===t._waitingFor&&"function"==typeof t._callback&&(t._args.push(n.Organizations),t._callback.apply(t._context,t._args));t._waitingFor=null;t._callback=null};$$WP.CommunityUtilities.getCommunityLinks._links={};$$WP.CommunityUtilities.pickOrganization=function(n,t,i,r,u){$$WP.CommunityUtilities.getCommunityLinks(function(r){if(!r||0===r.length)return i.push("1"),void n.apply(this,i);if(1===r.length)return i.push(r[0]),void n.apply(this,i);var s,f,e,o=[];for((e=r.length)>3&&(e=3),f=0;f<r.length;f++)o.push(new $$WPComp.ComplexObjects.Button(new Handlebars.SafeString("<span class='orglogo roundedimage' style='background-image:url("+r[f].LogoUrl+");'><\/span> <span class='orgname'>"+HTMLEncode(r[f].OrganizationName)+"<\/span>"),null,"tertiary neutral CommunityLink community_"+e,f));s=new $$WPComp.MessageComponent({Message:t,callback:function(){"close"!==arguments[arguments.length-1]&&(arguments[arguments.length-1]=arguments[arguments.length-1].substr($$WPComp.TOOLBARIDENTIFIER.length),arguments[arguments.length-1]=this.links[arguments[arguments.length-1]],this.fun.apply(this,arguments))},TitleText:u,CallbackArgs:i,CallbackContext:{links:r,fun:n},ToolbarButtons:o});$$WPUtil.quickPopup(s,{Size:o.length<3?$$WPContain.Popup.SizeEnum.SMALL:$$WPContain.Popup.SizeEnum.MEDIUM,Class:"PickOrganization"}).show()},r)};$$WP.CommunityUtilities.getOrganization=function(n,t,i,r){"function"==typeof t&&(r=r||window,i=i||[],$$WP.CommunityUtilities.getCommunityLinks(function(){for(var r=arguments[0],u=arguments[1],i=arguments[2],t=arguments[3],n=0;n<t.length;n++)if(t[n].OrganizationId===r){i.push(t[n]);break}u.apply(this,i)},null,[n,t,i],r))};$$WP.CommunityUtilities.getLoadingOrgNamesForHealthSummary=function(){var n=this;getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/Shared/GetLoadingAndErrorOrgNames"),type:"POST",cache:!1,data:{controllerType:9},dataType:"json",success:n.instantiateCommunityControllerForHealthSummary})})};$$WP.CommunityUtilities.UpdateBannerStringWithMnem=function(n,t,i,r){var u;return $$WP.Strings.getNamespace("Community.Shared").addMnemonic(t,n),u=/^\d+$/.test(n)?$$WP.Strings.get(r,"Community.Shared"):$$WP.Strings.get(i,"Community.Shared"),$$WP.Strings.removeMnemonic(t,"Community.Shared"),u};$$WP.CommunityUtilities.UpdateBannerText=function(n,t,i,r){var f,e,o,s,h,c,u;return $$WP.Strings.setDefaultNamespace("Community.Shared"),""!==n&&(f=$$WP.CommunityUtilities.UpdateBannerStringWithMnem(n,"@MYCHART@LoadingOrgs@","CurrentlyLoadingOneText","CurrentlyLoadingManyText"),e=!0),u=""!==i,""!==t?(o=$$WP.CommunityUtilities.UpdateBannerStringWithMnem(t,"@MYCHART@ErrorOrgs@","ErrorLoadingOneText","ErrorLoadingManyText"),s=u?r?$$WP.CommunityUtilities.UpdateBannerStringWithMnem(i,"@MYCHART@ManualOrgs@","ErrorLoadingAndOneManualSubtext","ErrorLoadingAndManyManualSubtext"):$$WP.CommunityUtilities.UpdateBannerStringWithMnem(i,"@MYCHART@ManualOrgs@","ErrorAndOneManualSubtextForSE","ErrorAndManyManualSubtextForSE"):r?$$WP.Strings.get("ErrorLoadingSubtext","Community.Shared"):"",h=!0):u&&(c=$$WP.CommunityUtilities.UpdateBannerStringWithMnem(i,"@MYCHART@ManualOrgs@","OneNonEpicUpdateDisclaimerText","ManyNonEpicUpdateDisclaimerText")),$$WP.Strings.clearDefaultNamespace(),{loadingOrgText:f,hasOrgsLoading:e,errorOrgText:o,errorOrgSubtext:s,hasOrgsWithErrors:h,nonEpicWarningText:c,hasOrgsManual:u}};$$WP.CommunityUtilities.instantiateCommunityControllerForHealthSummary=function(n){var t,i,r,u,f;t=!isShareEverywhere();i=n.loadingOrgNames;r=n.errorOrgNames;u=n.manualOrgNames;bannerText=$$WP.CommunityUtilities.UpdateBannerText(i,r,u,t);(f=$afe.select("#refresh-banner-container")).addClass("hidden");f.safeAppend($afe.renderTemplate($$WP.Templates.Community.NonEpicPretextBanner,{ShowDxrBannerAction:t,NonEpicWarningText:bannerText.nonEpicWarningText,HasOrgsLoading:bannerText.hasOrgsLoading,LoadingOrgText:bannerText.loadingOrgText,HasOrgsWithErrors:bannerText.hasOrgsWithErrors,ErrorLoadingText:bannerText.errorOrgText,ErrorLoadingSubtext:bannerText.errorOrgSubtext,HasOrgsManual:bannerText.hasOrgsManual}));$$WP.CommunityUtilities.instantiateCommunityController("HealthSummary",!0)};$$WP.CommunityUtilities.instantiateCommunityController=function(n,t){return t||0!==$afe.select("#refresh-banner-button").length?new $$WP.Community.CommunityController(n):null};$$WP.CommunityUtilities.createCommunityToast=function(n,t){n&&$$WP.UI.Toast.CreateSimpleToast(n,$$WP.UI.Toast.ToastTypeEnum.Warning,$$WP.CommunityUtilities.__saveDismissedFailedConnections.bind(null,t),null)};$$WP.CommunityUtilities.__saveDismissedFailedConnections=function(n){$.post({url:makeLink("Community/Shared/SaveDismissedFailedConnections"),contentType:"application/json",data:JSON.stringify(n),error:function(){}})};$$WP.CommunityUtilities.autoExpandToFullSite=function(){var r,o=function(n){if(n&&"string"==typeof n&&(n=$.parseJSON(n)),n&&n.Redirection&&!$$WPUtil.IsNullOrEmpty(n.Redirection.RedirectURL)){var t=new $$WPComp.MessageComponent({TitleText:n.Title,Message:'<div class="center">'+n.LoadingMessage+'<\/div><div class="loadingHeart"><\/div>',IsClosable:!1});$$WPUtil.quickPopup(t);n.Redirection.IsPost?$$WPUtil.postForm(n.Redirection.RedirectURL,n.Redirection.Params,"_self"):window.location.href=n.Redirection.RedirectURL}else u()},s=function(){$afe.select("#content").removeClass("hidden");$afe.select("#footer").removeClass("hidden")},u=function(){if(s(),n.Utilities.UI.StopPageLoad=!1,!0===n.Utilities.UI.PageLoaded)n.Utilities.UI.OnPageLoad({type:"load"})},t,n,f,e,i;try{r=window.self!==window.top}catch(t){r=!0}r?s():($afe.select("#content").addClass("hidden"),$afe.select("#footer").addClass("hidden"),t=t||{},t.PatientAccess=t.PatientAccess||{},n=n||t.PatientAccess,n.Utilities=n.Utilities||{},n.Utilities.UI=n.Utilities.UI||{},n.Utilities.UI.StopPageLoad=!0,f=window.self.location.href,e=f.toLowerCase().indexOf("/inside.asp"),e>0?(i={},i.relativeUrl=f.substring(e+1),i=$$WPUtil.postify(i),getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/GetMyChartFullAccessUrl"),type:"POST",data:i,dataType:"json",error:u,cache:!1,success:o})})):$.ajax({url:makeLink("ExternalJump/GetMyChartFullAccessUrl"),type:"POST",dataType:"json",error:u,cache:!1,success:o}))};!function(){var i,r,n,u,t;$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Div");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Span");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Img");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Label");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.ErrorLabel");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.WarningIcon");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.MessageDisplay");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.Anchor");$$WPUtil.guaranteeExistence($$WP,"SimpleTemplates.ValidationMessage");u=/(\w*="[^"]+")|(\w*='[^']+')/g;i=function(n){var r,t,o,f,e,s,i;if(n&&"string"!=typeof n)return $$WP.Debug.logError("attributesStr is not a string."),{};if(!(r=n.match(u))||r.length<1)return $$WP.Debug.logError("attributesStr does not contain any attributes."),{};for(e={},t=0;t<r.length;t++)(o=r[t])?(f=o.split("="))&&2===f.length?(s=f[0].trim(),i=(i=(i=f[1].trim()).substring(1,i.length-1)).trim(),e[s]=i):$$WP.Debug.logError("piece "+t+" is not a valid attribute."):$$WP.Debug.logError("piece"+t+" is not a valid attribute.");return e};r=function(n,t){var r,u;if(n&&0!==n.length){if(t?"string"==typeof t&&(t=i(t)):t={},$$WP.Debug.IsEnabled&&"name"in Function&&void 0===t["data-generated-by"])try{for(r=arguments.callee.caller;r&&0===r.name.indexOf("WP$ST");)r=r.caller;r&&(t["data-generated-by"]=r.name)}catch(i){}for(u in t)n.safeAttr(u,t[u])}else $$WP.Debug.logError("$newElement does not contain any elements!")};n=function(n,t,i){return r(n,t),i&&("string"==typeof i?n.text(i):n.safeAppend(i)),n};$$WP.SimpleTemplates.Div=function(t,i){var r;return r=$afe.jq(document.createElement("div")),n(r,t,i),r};$$WP.SimpleTemplates.Span=function(t,i){var r;return r=$afe.jq(document.createElement("span")),n(r,t,i),r};$$WP.SimpleTemplates.Img=function(t){var i;return i=$afe.jq(document.createElement("img")),n(i,t),i};$$WP.SimpleTemplates.Label=function(t,i){var r;return r=$afe.jq(document.createElement("label")),n(r,t,i),r};$$WP.SimpleTemplates.ErrorLabel=function(){return $$WP.SimpleTemplates.Span({"class":"clearlabel"},$$WP.Strings.get("ErrorLabelText"))};$$WP.SimpleTemplates.WarningIcon=function(n){var i,r;return i={src:makeStaticImageLink("error_circle.png"),"class":"yield",alt:""},"object"===$.type(n)?($$WPUtil.mergeObjects(n,i,!1,!0),r=$$WP.SimpleTemplates.Img(i)):(null===t&&(t=$$WP.SimpleTemplates.Img(i)),r=t.clone()),r};t=null;$$WP.SimpleTemplates.MessageDisplay=function(n,t){var i={"class":"messagedisplay invisible","data-message-for":n,"data-script-generated":null};return t&&"object"==typeof t&&$$WPUtil.mergeObjects(t,i,!1,!0),$$WP.SimpleTemplates.Div(i,"|")};$$WP.SimpleTemplates.Anchor=function(t,i){var r;return r=$afe.jq(document.createElement("a")),n(r,t,i),r};$$WP.SimpleTemplates.Option=function(t,i){var r;return r=$afe.jq(document.createElement("option")),n(r,t,i),r};$$WP.SimpleTemplates.ValidationMessage=function(t,i){var r;return(i=i||{}).class=i.class||"",i.class+=" alert validationmessage",r=$afe.jq(document.createElement("div")),n(r,i,t),r.safePrepend($$WP.SimpleTemplates.WarningIcon({alt:$$WP.Strings.get("ErrorLabelText")})),r}}();$$WP.Strings={_DefaultNamespace:[],_Namespaces:{},EncodingTypes:{None:0,HTML:1}};$$WP.Strings.ComplexObjects={Namespace:function(n,t,i){this._Parent=n||null;this._Mnemonics=t||{};i=(i||"").toLowerCase();this._Parent&&this._Parent!==$$WP.Strings._Namespaces?this.Name=this._Parent.Name+"."+i:(this.Name=i,this._Parent=$$WP.Strings._Namespaces.global)}};$$WP.Strings.ComplexObjects.Namespace.prototype={_Parent:null,_Mnemonics:null,Name:null,addString:function(n,t){this[n]={name:n,namespace:this.Name,value:t}},removeString:function(n){this[n]=null},getString:function(n){for(var t=this;t&&void 0===t[n];)t=t._Parent;return t?this.replaceMnemonics(t[n].value||""):""},getStringForTemplate:function(n){return new Handlebars.SafeString(this.getString(n))},getKeyedString:function(n,t){var i;return 0===(i=this.getString(n+"_"+t)).length&&(i=this.getString(n)),i},addMnemonic:function(n,t,i){null!=t&&("string"==typeof n?((t instanceof Handlebars.SafeString&&$$WP.Debug.log("value should be a string, not a SafeString.",!0),void 0===i&&(i=$$WP.Strings.EncodingTypes.HTML),"string"==typeof t)&&(t=t.replace("$","$$$$")),this._Mnemonics[n]={Value:t.toString(),EncodingType:i}):$$WP.Debug.logError("mnemonicName must be a string. ["+typeof n+"]"))},removeMnemonic:function(n){this._Mnemonics[n]=null},containsMnemonic:function(n){return!(!this._Mnemonics[n]||""===this._Mnemonics[n].Value)},replaceMnemonics:function(n){for(var i,u,r,f,t=this;t;){if(t._Mnemonics)for(i in t._Mnemonics)if(null!==t._Mnemonics[i]&&(r=t._Mnemonics[i].Value,f=t._Mnemonics[i].EncodingType,"string"==typeof r||"number"==typeof r))try{u=new RegExp(i,"gi");f!==$$WP.Strings.EncodingTypes.None&&(r=HTMLEncode(r));n=n.replace(u,r)}catch(n){$$WP.Debug.logError("addMnemonic was called for a mnemonic whose key does not work as a regular expression: "+i)}t=t._Parent}return n},addStrings:function(n){for(var t in n)n.hasOwnProperty(t)&&(this[t]={name:t,namespace:this.Name,value:n[t]})},addMnemonics:function(n){var t;for(t in n)this.addMnemonic(t,n[t].Value,n[t].EncodingType)},clearMnemonics:function(){var n;for(n in this._Mnemonics)this.removeMnemonic(n)},setOrganization:function(n,t){n?(this.addMnemonic("@MYCHART@OrganizationId@",n.OrganizationId),n.PayerOrgDetails&&n.PayerOrgDetails.IsPayer&&n.PayerOrgDetails.PayerCvgName&&(n.PayerOrgDetails.IsPayerOnly||!t)?this.addMnemonic("@MYCHART@OrganizationName@",n.PayerOrgDetails.PayerCvgName):this.addMnemonic("@MYCHART@OrganizationName@",n.OrganizationName)):$$WP.Debug.logError("Missing organization record",!0)},clearOrganization:function(){this.removeMnemonic("@MYCHART@OrganizationId@");this.removeMnemonic("@MYCHART@OrganizationName@")}};$$WP.Strings._Namespaces.global=new $$WP.Strings.ComplexObjects.Namespace(null);$$WP.Strings.get=function(n,t){return $$WP.Strings.getNamespace(t).getString(n)};$$WP.Strings.getForTemplate=function(n,t){var i;return i=$$WP.Strings.getNamespace(t).getString(n),new Handlebars.SafeString(i)};$$WP.Strings.setDisplayText=function(n,t,i){var r;return n?(r=$$WP.Strings.get(t,i),dangerou$.setHtml(n,r),r):null};$$WP.Strings.addMnemonic=function(n,t,i,r,u){!0===i&&(t=makeLink(t));$$WP.Strings.getNamespace(r).addMnemonic(n,t,u)};$$WP.Strings.removeMnemonic=function(n,t){$$WP.Strings.getNamespace(t).removeMnemonic(n)};$$WP.Strings.containsGlobalMnemonic=function(n){return $$WP.Strings.getNamespace("Global").containsMnemonic("@MYCHART@"+n+"@")};$$WP.Strings.add=function(n,t,i){$$WP.Strings.getNamespace(i).addString(n,t)};$$WP.Strings.setDefaultNamespace=function(n){n?$$WP.Strings._DefaultNamespace.push($$WP.Strings.getNamespace(n)):$$WP.Strings._DefaultNamespace.pop()};$$WP.Strings.clearDefaultNamespace=function(){$$WP.Strings.setDefaultNamespace(null)};$$WP.Strings.getNamespace=function(n){var u,i,r,t;if(n instanceof $$WP.Strings.ComplexObjects.Namespace)return n;if("string"==typeof n){for(u=(n=n.toLowerCase()).split("."),t=$$WP.Strings._Namespaces,r=0;r<u.length;r++)void 0===t[i=u[r]]&&(t[i]=new $$WP.Strings.ComplexObjects.Namespace(t,null,i)),t=t[i];return t}return $$WP.Strings._DefaultNamespace&&$$WP.Strings._DefaultNamespace.length?$$WP.Strings._DefaultNamespace[$$WP.Strings._DefaultNamespace.length-1]:($$WP.Debug.logError("Something removed the global namespace as the default namespace."),$$WP.Strings._Namespaces.global)};$$WP.Strings.setOrganization=function(n,t,i){$$WP.Strings.getNamespace(i).setOrganization(n,t)};$$WP.Strings.clearOrganization=function(n){$$WP.Strings.getNamespace(n).clearOrganization()};$$WP.Strings.appendNewWindowNotification=function(n,t){return"_blank"===t?n+" "+$$WP.Strings.get("NewWindowNotification"):n};$$WP.Strings.setDefaultNamespace("Global");StringResources=$$WP.Strings._Namespaces;var WP,$$WP,pre_checkActivity,oldElement,currentElement,submitcount=0,isTabAllowed=!0,ALPHANUMERIC="1",EQUAL_TO_CODE="2",GREATER_THAN_CODE="3",LESS_THAN_CODE="4",REMOVE_IF_EQUAL_TO_REMOVE_CHAR="1",REMOVE_NONNUMERIC="2",BIRTH_YEAR_MIN_YEARS_BACK=10;void 0===WP&&(WP={});void 0===WP.myPath&&(WP.myPath=self.location.pathname.substr(0,self.location.pathname.indexOf(".asp")),0===WP.myPath.length&&(WP.myPath=self.location.pathname.substr(0,self.location.pathname.indexOf(".htm"))),WP.myPath=0===WP.myPath.length?self.location.pathname:self.location.pathname.substr(0,WP.myPath.lastIndexOf("/")+1));$$WP=$$WP||{};pre_checkActivity=checkActivity;"Netscape"==navigator.appName&&(window.captureEvents(Event.KEYPRESS),window.onkeypress=doMainKeyPress);getParentDocument()||console.log("Warning: Application is being displayed in a frame hosted on a different domain.");HTMLEncodeDecodeDiv=document.createElement("div");$$WP.Utilities=$$WP.Utilities||{};$$WP.Utilities.Global=$$WP.Utilities.Global||{};$$WP.Utilities.Global.HtmlEntities={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"};$$WP.Utilities.Global.HtmlChars=/[&<>"'\/`]/g;$$WP.Utilities.HtmlEncodeCallback=function(n){return $$WP.Utilities.Global.HtmlEntities[n]||n};try{$$WP&&$$WP.Utilities&&!$$WP.Utilities.isValidBrowser()&&-1===window.location.href.indexOf("Home/Error?Code=4")&&(window.location=makeLink("Home/Error?Code=4"))}catch(e){}