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 n==0?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&&n.length>0?n:$$WP.I18N.DecimalSeparator}function getGroupSeparator(){var n;return n=$$WP.Strings.get("NumericGroupSeparatorOverride","I18N.Numbers"),n&&n.length>0?n:$$WP.I18N.GroupSeparator}function getRangeSeparator(){var n;return n=$$WP.Strings.get("NumericRangeSeparatorOverride","I18N.Numbers"),n&&n.length>0?n:$$WP.I18N.RangeSeparator}function IsNumericMinMax(n,t,i,r,u){var o=!0,a="Core.CommonUtils",h=!1,f,s,e,v,y,c,l,p,w;return n==null?h:((u===null||u==="")&&(u=h),e=n.value,v=getGroupSeparator(),y=getDecimalSeparator(),c=getErrorForScreenReader(),l=c+$$WP.Strings.get("NumericError",a),p=new RegExp(escapeRegExp(v),"g"),w=new RegExp(escapeRegExp(y),"g"),e=="")?o:e.indexOf(v)!=-1&&e.indexOf(y)<0?(WP.Validators.DisplayErrors(l),h):(e=e.replace(p,""),f=e.replace(w,"."),f=Number(f),isNaN(f)?(WP.Validators.DisplayErrors(l),s=o):r||f==Math.round(f)?t!=""&&f Number(i)&&(WP.Validators.DisplayErrors(c+$$WP.Strings.get("MaximumNumericError",a).replace("@MYCHART@MAXVALUE@",i)),s=o):(WP.Validators.DisplayErrors(l),s=o),s&&!u)?h:(n.value=e,o)}function IsNumericOrRangeMinMax(n,t,i,r,u){var l="@MYCHART@MAXVALUE@",a="@MYCHART@MINVALUE@",y="@MYCHART@RANGESEPARATOR@",s=!0,d="Core.CommonUtils",p=!1,f,e,h,o,w,g,nt,c,b,k,rt,v,tt,it;if(n===null||((u===null||u==="")&&(u=p),$(".Popup").length>0))return p;if(o=n.value,g=getDecimalSeparator(),nt=getGroupSeparator(),c=getRangeSeparator(),b=getErrorForScreenReader(),k=new RegExp(escapeRegExp(g),"g"),rt=new RegExp(escapeRegExp(nt),"g"),v=b+$$WP.Strings.get("NumericOrRangeError",d),tt=b+$$WP.Strings.get("MinimumNumericError",d),it=b+$$WP.Strings.get("MaximumNumericError",d),o==="")return s;if(o.indexOf(nt)!==-1&&o.indexOf(g)<0)return WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),u||(n.select(),n.focus()),p;if(o=o.replace(rt,""),w=o.indexOf(c),w!==-1){if(f=o.substring(0,w).replace(k,"."),f==="")return WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),u||(n.select(),n.focus()),p;e=o.substring(w+1).replace(k,".")}else f=o.replace(k,".");return(f=Number(f),isNaN(f)?(WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),h=s):(r||(f=Math.round(f)),t!==""&&f Number(i)&&(WP.Validators.DisplayErrors(it.replace(l,i)),h=s)),e&&!h&&(e=Number(e),isNaN(e)?(WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),h=s):(r||(e=Math.round(e)),t!==""&&e Number(i)?(WP.Validators.DisplayErrors(it.replace(l,i)),h=s):(f>e||f===e)&&(WP.Validators.DisplayErrors(v.replace(y,c).replace(a,t).replace(l,i)),h=s))),h)?(u||(n.select(),n.focus()),p):(r||(o=w!==-1?f+c+e:f),n.value=o,s)}function autoLogout(n){if($$WPUtil.setActivity.msSinceLastActivity() =checkActivity.sessionTimeout){document.write("");WP.Comm.logOut(null,u);return}window.clearTimeout(checkActivity.tRefreshID);checkActivity.tRefreshID=window.setTimeout(checkActivity,Math.floor((checkActivity.refreshTimeout-f)/1e3));window.clearTimeout(checkActivity.tSessionID);o=Math.floor((checkActivity.sessionTimeout-f)/1e3);checkActivity.tSessionID=window.setTimeout(autoLogout,o);f>checkActivity.refreshTimeout&&$$WPComp.TimeoutWarningComponent.hasVisibleInstance!==u&&$$WPUtil.quickPopup(new $$WPComp.TimeoutWarningComponent({SecondsLeft:o}),{DontMatchColumnHeights:u})}function logOut(n,t){var i=!0,r=null;return $afe.select("body").hasClass("passthru")?(self.location.href=makeLink("closeExternalJumpPopup.asp"),!1):(n!==""&&n!==r&&typeof n!="undefined"?self.location.href=n:typeof checkActivity.logoutPage=="string"&&checkActivity.logoutPage!==""?WP.Comm.logOut(r,i,checkActivity.logoutPage,!1):getFederatedLogoutMode()||isShareEverywhere()?WP.Comm.logOut(r,i):t===i?WP.Comm.logOut(r,i):WP.Comm.logOut(function(n){window.location=makeLink(n)},!1),i)}function CheckLength(n,t,i,r){var u,f;return(u=t,r!=""&&r!=null&&r=="1"&&(t=t-1),f=n.value.replace(/\r\n/g,""),f.length>t)?(i==""&&(i=getErrorForScreenReader()+$$WP.Strings.get("MaximumTextError","Core.CommonUtils").replace("@MYCHART@MAXMIMUMLENGTH@",u)),$$WP.Utilities.quickMessageBox(i,"",[],null,[],""),n.focus(),!1):!0}function insideBodyLoad(n,t,i,r,u){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),checkActivity(n,t,i,u),window.focus(),!0}function breakOut(){self!=top&&top.location.replace(makeLink("bye.asp"))}function getObjectValue(n){var i,r,t;if(n){if(i=0,i=n.length,t="",i>0)for(r=0;r 0)for0i 0)return t===!0&&alert(r[i]),!1}catch(u){}return!0}function confirmEmbedDelete(n,t,i){var r;return r=i===!0?$$WPUtil.quickMessageBoxByEnum.typeEnum.RestoreGoback:$$WPUtil.quickMessageBoxByEnum.typeEnum.RemoveGoback,$$WPUtil.confirmFormSubmission(n,t,r,function(n,t){if(t===$$WP.Components.TOOLBARIDENTIFIER+"continue"){var i,r;i=document.getElementById("confirmStep");i&&(i=i.parentNode,i&&(r=document.createElement("input"),r.type="hidden",r.className="hidden",r.name="clickSub",r.value="1",i.appendChild(r)))}})}function setCheckboxesByPrefix(n){for(var t=1,i=document.getElementById(n+t);i!==null;)$afe.jq(i).safeAttr("checked","true"),i.checked=!0,t=t+1,i=document.getElementById(n+t)}function unsetCheckboxesByPrefix(n){for(var t=1,i=document.getElementById(n+t);i!==null;)i.removeAttribute("checked"),i.checked=!1,t=t+1,i=document.getElementById(n+t)}function statusOfCheckboxesByPrefix(n){var t,i,r,u;for(r=!0,u=!1,t=1,i=document.getElementById(n+t);i!==null;)i.checked?u=!0:r=!1,t=t+1,i=document.getElementById(n+t);return r?3:u?2:1}function checkAll(n,t){if(typeof document=="object"&&n!=null&&t!=null&&document.getElementById&&typeof document.getElementById(n)=="object")for(var r=document.getElementById(n),i,u=0;i=r[u++];)i.type=="checkbox"&&(i.checked=!0)}function selectRadioButton(n){var t=!0,i;if(document.all||document.getElementById){for(i=0;i .content").css("max-height")==="none"&&!n.hasClass("hidden")?(isDataTile()?(a=n.outerHeight(),i=a>window.innerHeight?a+f:"80vh"):i="80vh",$afe.select(h).addClass(s)):(n.hasClass("large")||n.hasClass("medium"))&&!n.hasClass("hidden")?(n.css("height","auto"),r=n.outerHeight()+f,n.css("height",""),i=r,$afe.select(h).addClass(s)):i=n.outerHeight()+20+f;w=$afe.select("#lightbox:not(.hidden):not(:empty)");w.length>0&&($afe.select(h).addClass(s),r=$afe.select("#lightbox").outerHeight()+f);t.style.minHeight=i;t.style.height!=r&&(t.style.height=r,$afe.select(u).prop(v)!==e?(scrollTopOfTheIframe(0,e),$afe.select(u).prop(v,e)):$$WPUtil.setScrollTop(p))}}function DoRedirect(n,t){return t===!0?logOut(null,!0):$$WPUtil.SafeToRedirect(CreateLogOutPopup,n),!1}function CreateLogOutPopup(n){if(n){var t,i;t=new $$WPComp.LoggingOutComponent({positioningFunction:$$WPContain.Positions.InsideNearTop});i=new $$WPContain.Popup({positioningFunction:$$WPContain.Positions.InsideNearTop,Components:t,IsClosable:!1,TitleText:null,Size:$$WPContain.Popup.SizeEnum.SMALL,Class:"logout"});i.show(!0)}}function DoRedirectOE(){return this.document.write("



"+$$WP.Strings.get("LogoutRedirect","Core.CommonUtils")+"<\/center>"),window.location="./oebye.asp",!1}function captureBackEnterKey(){var i="textarea",t,n;if($$WPUtil.setActivity(),window.event&&(window.event.keyCode==8||window.event.keyCode==13)){if(t=window.event.srcElement,n=t.type,!t.readOnly){if((n=="text"||n==i||n=="password")&&window.event.keyCode==8)return;if((n==i||n=="submit")&&window.event.keyCode==13)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)),t!=null)?(t.style.display="block",!0):!1}function hideItem(n){var t;return(document.getElementById?t=document.getElementById(n):document.all&&(t=document.all.item(n)),t!=null)?(t.style.display="none",!0):!1}function showElement(n,t){if(n!==null||(t!==null&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"hidden");return}}function hideElement(n,t){if(n!==null||(t!==null&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"hidden");n.className=n.className+" hidden";return}}function activateField(n,t){if(n!==null||(typeof t=="string"&&t.length>0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"disabled,activefield");n.className=n.className+" activefield";return}}function activateFieldsByIds(n){var t,i;if(n!==null&&(i=n.split(",")),i!==null)for(t=0;t 0&&(n=document.getElementById(t)),n!==null)){removeClassNames(n,"disabled,activefield");n.className=n.className+" disabled";return}}function deactivateFieldsByIds(n){var t,i;if(n!==null&&(i=n.split(",")),i!==null)for(t=0;t 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 0&&(t=" "+t),n.className=n.className+t)}}function getElementPosition(n,t){if(n.offsetParent){for(var i=n,u=0,f=0,r;i;){if(r=i,i.tagName=="HTML")break;if(t&&i==t)break;if(u+=i.offsetLeft,f+=i.offsetTop,i.scrollLeft&&(u-=i.scrollLeft),i.id.toLowerCase()=="wrap"){u-=i.offsetLeft;f-=i.offsetTop;break}i=i.offsetParent}return navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"&&(u+=document.body.leftMargin,f+=document.body.topMargin),u+="px",f+="px",r.tagName=="HTML"&&(r=r.getElementsByTagName("body")[0],r.offsetLeft&&(u-=r.offsetLeft),r.offsetTop&&(f-=r.offsetTop)),{x:u,y:f,topElement:r}}}function changePasswdCheck(n){var i="Core.CommonUtils",t=!1,u,r,f,e;return n==null?t:(e=getErrorForScreenReader(),u=n.oldpasswd.value,u=="")?(alert($$WP.Strings.get("CurrentPasswordError",i)),n.oldpasswd.focus(),t):(r=n.newpasswd.value,containsSpace(r))?(alert($$WP.Strings.get("NewPasswordError",i)),n.newpasswd.focus(),t):(f=n.verifypasswd.value,r!=f)?(alert($$WP.Strings.get("ReTypeNewPasswordError",i)),n.verifypasswd.focus(),t):!0}function changeQuesAnsCheck(n){var t="Core.CommonUtils",i,r,u;return n==null?!1:(u=getErrorForScreenReader(),i=n.oldpasswd.value,i=="")?(alert($$WP.Strings.get("CurrentPasswordError",t)),n.oldpasswd.focus(),!1):(r=n.pwdans.value,r=="")?(alert($$WP.Strings.get("AnswerError",t)),n.pwdans.focus(),!1):!0}function CheckFilenameExtensions(){var n=!0,u=!1,h=document.getElementById("ALLOWED_EXTENSIONS"),f,c,o,t,e,l,y=0,i=u,r=n,s,a,v;if(!h)return n;for(f=h.value,c=new RegExp("^([a-zA-Z]:(\\\\|/)|file://|/|\\\\\\\\)[^\\\\/:].*\\..+");!i;){if(o=document.getElementById("upload"+ ++y),!o){i=n;break}if(t=o.value,t.length!=0){if(navigator.userAgent.indexOf("MSIE")!=-1&&!c.test(t)){r=u;i=n;break}if(e=t.split("."),e.length<2){r=u;i=n;break}if(l=e[e.length-1].toUpperCase(),f.indexOf("^"+l+"^")==-1){r=u;i=n;break}}}return r||(s=document.getElementById("progbar"),s&&(s.className+=" hidden"),a=f.substr(1,f.length-2).replace(/\^/g,", "),v=$$WP.Strings.get("BadFilenameExtension","Core.CommonUtils").replace("@MYCHART@FILENAME@",t).replace("@MYCHART@ALLOWEDEXTENSIONS@",a),alert(v)),r}function checkEnter(n,t){if(n!=null){var i=n.keyCode;if(i=="13")return t!=null&&t.click(),!1}return!0}function isBasicInlineValidationError(n,t,i,r,u,f,e,o,s,h,c){var l=!0,v=null,a=!1,y=a,p=a,w=a,b=a,k=a;return((i==""||i==v)&&(i=getErrorForScreenReader()+$$WP.Strings.get("RequiredFieldError","Global")),(o==""||o==v)&&(o=i),n==v)?a:((c==""||c==v)&&(c=-1),n.maxLength>1e4&&(r=a),r&&c<0&&(c=n.id=="dob"?n.maxLength-2:n.maxLength),n.value==""||n.value==v?(y=l,p=l):r&&n.value.length 0?(y=l,w=l):h&&isNaN(n.value)&&(y=l,b=l),y?u||(p?s?isHighlighted(n)&&changeErrorField(t,i):(turnOnHighlight(n),changeErrorField(t,i)):(w||b||k)&&(turnOnHighlight(n),changeErrorField(t,o))):(e||turnOffHighlight(n),f||changeErrorField(t,"",l)),y)}function changeErrorField(n,t,i){var r;if(n.length>0&&(r=document.getElementById(n))){if(i&&(r.innerHTML===" "||r.innerHTML===""))return;t===null||t.match(/^ *$/)!==null?r.removeAttribute("role"):r.setAttribute("role","alert");dangerou$.setHtml(r,t)}}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){var i;n!=null&&(i=n.value,i==""?t||turnOnHighlight(n):turnOffHighlight(n))}function isHighlighted(n){return n==null?!1: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 u=!0,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=u);WP.DOM.Browser.isAndroid&&(r=u);break;case EQUAL_TO_CODE:(n.keyCode==i||n.which==i)&&(r=u);break;case GREATER_THAN_CODE:(n.keyCode>i||n.which>i)&&(r=u);break;case LESS_THAN_CODE:(n.keyCode 0&&checkKeyPress(n,EQUAL_TO_CODE,"8")&&t.value==""&&(u=document.getElementById(i+f),u!=null&&(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 v=!0,p=null,a=!1,l,c,w=a,d=a,b=a,k=a,nt=a,y,g=0,tt=a;if(y=u,b=o==p,(u==""||u==p)&&(u=$$WP.Strings.get("RequiredFieldError","Global")),f==""&&(f=u),s)for(l=1;l<=t;l++)c=document.getElementById(n+l),c!=p&&(c.value!=""?(s="",y=f,l=t):isHighlighted(c)&&(s=""));if(b||(isHighlighted(o)&&(nt=v),w=isBasicInlineValidationError(o,r,y,i,e,1,"",y,s,h)),w)k=v;else for(t==p&&(t=1),l=1;l<=t;l++)c=t==1?document.getElementById(n):document.getElementById(n+l),c.maxLength>1e4&&(i=a),i&&(g=c.id=="dob"||c.id=="ssn"?c.maxLength-2:c.maxLength),c!=p&&(c.value==""?(w=v,e||d||tt||!b||(turnOnHighlight(c),changeErrorField(r,y))):i&&c.value.length 0?(w=v,d=v,!e&&b&&(turnOnHighlight(c),changeErrorField(r,y))):b&&turnOffHighlight(c),isHighlighted(c)&&(k=v));return w?(k||changeErrorField(r,""),v):(changeErrorField(r,""),a)}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){var u;n!=null&&(t?i?n.value.length==2&&n.value>0&&(r?isTabAllowed=!0:n.value="19"+n.value):n.value.length==1&&n.value>0&&(r?isTabAllowed=!0:n.value="0"+n.value):(u=n.length,u?(n[0].value<10&&n[0].value>0&&n[0].value.length<2&&(n[0].value="0"+n[0].value),n[1].value<10&&n[1].value>0&&n[1].value.length<2&&(n[1].value="0"+n[1].value),n[2].value<100&&n[2].value.length==2&&(n[2].value="19"+n[2].value)):n.value<100&&n.value>0&&(n.value="19"+n.value)))}function removeCharFromField(n,t,i,r){var u;(r==null||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 r=document.getElementById(t).selectedIndex,u;r!=null&&(u=n+r,r==0?dangerou$.setHtml(document.getElementById(i).innerHTML," "):dangerou$.setHtml(document.getElementById(i),document.getElementById(u).value),$afe.jq(window).trigger("matchColumnHeights"))}function clearRadioSelection(n){for(var i=document.getElementsByName(n),t=0;t 0&&!it&&y&&(y.checked=s,y.value==1?(showPickupFields([p]),hidePickupFields([a,l])):showPickupFields([a,l]))}UpdateAddressOptions();UpdatePaymentMethods("pharmacymethods","pharmacy","deliverymethod","paymentmethod","paymentmethodlabel",u);$afe.jq(window).trigger("matchColumnHeights")}}function getRadioValue(n){var t,i;if(t=document.getElementsByName(n),t.length==0)return"";for(i=0;i =0&&(d=l[e].substring(s+1));break}if(d.length>0){for(rt=v,b=d.split("|"),h=document.getElementById(ut),h&&(removeClassNames(h,c),h.disabled=v),o=document.getElementsByName(r),e=0;e 0&&!rt&&w&&(w.checked=y,w.value==2&&showAndHideButtons(g,nt))}}}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&&(i.disabled=!1,removeClassNames(i,"hidden"));r=document.getElementById(t);r&&(r.disabled=!0,applyClass(r,"hidden"))}function showPickupFields(n){var t,i;if(n)for(t=0;t 0&&(u=t.substring(r+1),t=t.substring(0,r)),i=n.replace(/@mychart@url@/gi,t),i=i.replace(/@mychart@wrappedurl@/gi,encodeURIComponent(t)),r>0&&(i=i+"#"+u),i)}function makeStaticLink(n){var t,i,r;return(n=n.replace(/\\/g,"/"),n.indexOf(".")===0&&(n=n.substring(1)),n.indexOf(".")===0&&(n=n.substring(1)),n.indexOf("/")===0&&(n=n.substring(1)),$$WP.ApplicationContext===78)?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/"+n):(t=getPrefix(!0),i=$$WP.AffiliateFilePath,r=new RegExp("svg$","i"),n=!$$WPUtil.IsNullOrEmpty(i)&&r.test(n)?$$WP.AffiliateFilePath+"/"+n:$$WP.I18N.getMyChartLocale()+"/"+n,applyPrefix(t,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){if(n.length===0){clearElement(i);return}var r,f,u;return r=createElement("span","alert"),t===!0&&(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}function getChild(n,t){for(var r="#comment",i=n.firstChild;t>0;){for(t--;i&&(i.nodeName===r||i.nodeName==="#text");)i=i.nextSibling;if(!i)return null;i=i.nextSibling}while(i&&(i.nodeName===r||i.nodeName==="#text"))i=i.nextSibling;return i}function getTrackedWindowString(n){return(n===""||n===null||typeof n=="undefined")&&(n="openWindows"),getCookie(n,!0)}function openWindow(n,t,i,r,u,f,e){var h="undefined",s=!0,c,o,l;return(f=f===s?s:!1,typeof i!==h&&i!==""||u||(i="status=0,menubar=0,scrollbars=1,resizable=1,toolbar=0"),e)?openWindowInternal(n,t,i,f):((r===null||typeof r===h)&&(r="openWindows"),o=getCookie(r,s),l=o===""?0:o.split("^").length,(typeof t===h||t===null||t==="")&&(t="mycWin"+makeLink("")+l),c=openWindowInternal(n,t,i,f),o=o+(o.length>0?"^":"")+t,setCookie(r,o,s),c)}function openWindowInternal(n,t,i,r){var u;return u=$$WP._windowOpenReal(n,t,i,r),u&&(u.opener=null),u}function openOAuthWindow(n){var f="GetAccessTokenProxy",r="onmessage",e=$$WPUtil.getDomain(window.location),o=n.callback||function(){window.location.reload()},u=openWindow(n.sUrl,n.sName,n.sFeature),i,t;u&&u.focus();i=function(n){if(n.origin==e&&n.data=="GotAccessToken"){try{u.close()}catch(t){}window.removeEventListener?window.removeEventListener("message",i,!1):window.detachEvent?window.detachEvent(r,i):document.detachEvent&&document.detachEvent(r,i);o()}};window.attachEvent?window.attachEvent(r,i):document.attachEvent?document.attachEvent(r,i):window.addEventListener&&window.addEventListener("message",i);t=document.getElementById(f);!t&&(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0)&&(t=document.createElement("iframe"),t.src=n.sProxy,t.width=0,t.height=0,t.frameBorder=0,t.style.visibility="hidden",t.id=f,document.body.appendChild(t))}function postMessageForOAuthPopup(n,t){if(navigator.userAgent.indexOf("MSIE")!==-1||navigator.appVersion.indexOf("Trident/")>0){var i=document.getElementById("GetAccessTokenProxy");try{i.contentWindow.postMessage(n,t)}catch(r){}}else window.postMessage(n,t)}function closeAllWindows(n){var r,u,f,t,e,i;if((n===""||n===null||typeof n=="undefined")&&(n="openWindows"),r=getCookie(n,!0),r){for(u=r.split("^"),e=u.length,t=0;t -1&&(e=unescape(f.substr(f.indexOf("=")+1)).replace(o,""),s=!0);return e}function deleteCookie(n,t){n&&setCookie(n,"",t,new Date(1))}function makeLink(n){if(n.match(/^(epic)?https?:\/\//i))return n;if($$WP.ApplicationContext===78)return Epic.PatientEngagement.Welcome.Core.Utilities.getUrl(n);var t;return t=getPrefix(!1),applyPrefix(t,n)}function makeErrorPageLink(){return $$WP.ApplicationContext===78?makeLink("Core/Home/Error"):makeLink("500.aspx")}function makeStaticImageLink(n){return $$WP.ApplicationContext===78?Epic.PatientEngagement.Welcome.Core.Utilities.getUrl("Content/images/"+n):makeStaticLink("images/"+n)}function addQueryStringToUrl(n,t,i){if(n&&t){var u=n.indexOf("?")!==-1,r="";r=u?"&":"?";i||(i="");n=n+r+t+"="+i}return n}function getCSRFTokenAsQS(n){var t=$afe.select("body");if(t.hasClass("isPrelogin")){n();return}$$WP=$$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 u,f,r,i;if(t&&(u=dangerou$.parseHtml(t),f=u.safeAttr("name")||"__RequestVerificationToken",r=u.val(),$$WP._CSRFTokenName=f,$$WP._CSRFToken=r,$$WP._CSRFTokenQs=f+"="+encodeURIComponent(r),$$WP._CSRFTokenQsToken=encodeURIComponent(r)),n($$WP._CSRFTokenQs),$$WP._CSRFCallBackQueue.length>0){for(i=0;i<$$WP._CSRFCallBackQueue.length;i++)typeof $$WP._CSRFCallBackQueue[i]=="function"&&setTimeout($$WP._CSRFCallBackQueue[i]($$WP._CSRFTokenQs),0);$$WP._CSRFCallBackQueue=[]}}))}function setFederatedLogoutMode(n){$$WP.FederatedLogoutMode=n}function getFederatedLogoutMode(){return $$WP.FederatedLogoutMode==!0}function disableEmptyFormInputs(n){var r,i,t;for(r=document.getElementById(n),i=r.getElementsByTagName("input"),t=0;t "+$$WP.Strings.get("ErrorLabelText","Global")+"<\/span>"}function vdtAdmissionLoad(){var n,r,t,u,f=!1,i=document.getElementById("appRoot");if(n=document.getElementById("loadingSpinner"),n&&(n.style.display="none"),n=document.getElementById("vdtFrame"),n.parentNode.style.height="auto",n.contentDocument||(f=!0),f||n.contentDocument.getElementById("vdtError")==null||(u=!0),u){n=document.getElementById("vdtErrorDiv");n.style.display="inherit";return}n.style.display="inherit";try{$afe.jq(window).on("popstate",handleBrowserBack);isDataTile()?(r=getGenericHeight,t=r(n),n.style.height!=t&&(n.style.height=t)):setAppropriateHeight();i=document.getElementById("appRoot");i&&setAppropriateHeightOnDOMMutations(i)}catch(e){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){typeof Android!="undefined"&&Android.setWebViewTitle?Android.setWebViewTitle(n):window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.setWebViewTitle&&window.webkit.messageHandlers.setWebViewTitle.postMessage(n)}var WP=WP||{},pre_checkActivity,HTMLEncodeDecodeDiv;typeof WP.FdiUtils=="undefined"&&(WP.FdiUtils={});WP.FdiUtils.handleFDILink=function(n){var f,r,u,t,e,o,s,i,h,c;i="";f=$afe.jq(n.target);n.preventDefault();r=f.closest("[data-fdi-context]");r.length>0&&(u=r.safeAttr("data-fdi-context"),u!==""&&(t=$.parseJSON(u),e=t.fdi,o=t.csn,s=t.ord,h=t.DocumentID,c=t.eptId,delete t.fdi,delete t.csn,delete t.ord,delete t.DocumentID,delete t.eptId,i=WP.FdiUtils.buildFDILinkParamString(e,o,s,t,h,c)));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;i=n.url;r=n.launchmode;f=n.IsFdiPost;r===4&&(i=makeLink(i));f&&(i=makeLink("Extensibility/Redirection/FdiRedirection"+t));switch(r){case 1:case 4:window.location.href=i;break;case 0:case 2:case 3:default:u=openWindow(i,"","",null,!0,!1,!0);u!=null&&u!==undefined||WP.DOM.Browser.isIE||WP.DOM.Browser.isEdge||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});t.addEventListener("click",$.proxy(this.LaunchClickHandler,this,n));$$WPUtil.quickPopup(t)};WP.FdiUtils.LaunchClickHandler=function(n,t){t&&t.dataId&&t.dataId==="toolbarLaunchLink"&&openWindow(n,"","",null,!0,!1,!0)};WP.FdiUtils.buildFDILinkParamString=function(n,t,i,r,u,f){var e;if(e="",n)e=$$WPUtil.addUrlParameter(e,"fdi",encodeURIComponent(n));else return"";return 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(){var n=null,t;if($$WP._ajaxReal){$$WP.Debug.logError("$.ajax has already been copied.Did this file get included twice?");return}var i=function(){return $$WP&&$$WP._CSRFTokenName&&$$WP._CSRFToken?{tokenName:$$WP._CSRFTokenName,tokenValue:$$WP._CSRFToken}:n},r=function(){var t={},i,n;return i=$afe.select("#__CSRFContainer"),i&&i.length>0&&(n=i.find("input").first(),n&&n.length>0&&(t={tokenName:n.safeAttr("name"),tokenValue:n.val()},$$WP._CSRFTokenName=t.tokenName,$$WP._CSRFToken=t.tokenValue)),t},u=function(){return i()||r()};$$WP._ajaxReal=$.ajax||jQuery.ajax;$.ajax=function(n,t){var r,i;return typeof n=="object"?(t=n,n=t.url):t=t||{},t.type=t.type||"GET",r=t.contentType||"",t.type.toUpperCase()!=="GET"&&(t.headers=t.headers||{},i=u(),t.headers[i.tokenName]=i.tokenValue),t.captchaResponse&&(t.headers["X-Captcha-Response"]=t.captchaResponse),n=$$WP.Utilities.addUrlParameter(n,"noCache",Math.random()),$$WP._ajaxReal(n,t)};$$WP.IsPendingAJAXRequests=!1;$$WP.PendingAJAXCallBack=n;$afe.jq(document).ajaxStart(function(){$$WP.IsPendingAJAXRequests=!0});$afe.jq(document).ajaxStop(function(){$$WP.IsPendingAJAXRequests=!1;$$WP.PendingAJAXCallBack!==n&&typeof $$WP.PendingAJAXCallBack=="function"&&($$WP.PendingAJAXCallBack(),$$WP.PendingAJAXCallBack=n)});t=function(n){n.crossDomain&&(n.contents.script=!1)};$.ajaxPrefilter(t)}(),function(n){var u="jqHidden",t=!0,i="matchColumnHeights",r;if($$WP._showReal&&$$WP._hideReal){$$WP.Debug.logError("$.show and $.hide have already been copied.Did this file get included twice?");return}$$WP._showReal=n.fn.show;$$WP._hideReal=n.fn.hide;r=function(n){var e="function",u,r,f,o=function(){u();$$WP.Utilities.UI.MatchColumnHeightsOnHideAndShow&&$afe.jq(window).trigger(i)},s=function(){$$WP.Utilities.UI.MatchColumnHeightsOnHideAndShow&&$afe.jq(window).trigger(i)};if(n.length!==0){for(r=0;r sshow调用隐藏元素仍然不显示-隐藏idden类非jqhidden类调用元素You should set this class rather than an inline display style.",t)),arguments.length>0?(r(arguments),f=$$WP._showReal.apply(n,arguments)):(f=$$WP._showReal.apply(n),n.hasClass("cardlist")&&n.trigger("cardLoad"),$$WP.Utilities.UI.MatchColumnHeightsOnHideAndShow&&$afe.jq(window).trigger(i)),f};n.fn.hide=function(){var n=this,f;return n.size()>0&&(n.hasClass("hidden")?$$WP.Debug.logError("$.hide() called on a hidden element.hide调用非jqhidden类元素You should set this class rather than an inline display style.",t)),arguments.length>0?(r(arguments),f=$$WP._hideReal.apply(n,arguments)):(f=$$WP._hideReal.apply(n),$$WP.Utilities.UI.MatchColumnHeightsOnHideAndShow&&$afe.jq(window).trigger(i)),f}}(jQuery);$afe.onDocumentReady(function(){var n=null,i="click",t="body",r,u;$$WP.IsEpicAjaxErrorHandlerDisabled!==!0&&$afe.jq(document).ajaxError($$WPUtil.defaultAjaxErrorHandler);r=function(n){var o="margin-right",f="margin-left",r,t,i,e,u,s;return(i=n.safeAttr("name"),!i)?($$WP.Debug.logError("Input elements require a name in order to associate them with a message display"),$afe.jq()):(r=$afe.jq(n.get(0).form),r.length===0)?($$WP.Debug.logError("Input elements need to be contained within a form in order to associate them with a message display"),$afe.jq()):(t=r.find('[data-message-for="'+i+'"]'),t.length===0&&(t=$$WP.SimpleTemplates.MessageDisplay(i),n.safeAfter(t)),t.get(0).hasAttribute("data-script-generated")&&n.css("display")!=="none"&&(e=n.position().left-t.position().left,typeof n.css(f)!="undefined"&&(e+=parseInt(n.css(f),10)),t.css(f,e),t.css(o,n.css(o)),u=n.width(),(n.get(0).type==="checkbox"||n.get(0).type==="radio")&&(s=r.find('label[for="'+i+'"]'),u+=s.width()),u!==0&&t.width(u)),t)};u=function(n,t,i){var r="alert",f="invisible",u;t?(i?(n.addClass(r),n.empty(),n.text(t),u=$$WP.SimpleTemplates.WarningIcon(),n.safePrepend(u),u.safeAfter($$WP.SimpleTemplates.ErrorLabel())):(n.removeClass(r),n.empty(),n.text(t)),n.removeClass(f)):(n.addClass(f),n.removeClass(r),dangerou$.setHtml(n," "))},function(){if(WP.FdiUtils){$afe.select(t).on(i,"a[data-fdi-option]",WP.FdiUtils.handleFDILink);$afe.select(t).on(i,'a[href="#Extensibility_ReportLink"]',WP.FdiUtils.handleFDILink)}}(),function(){var u,e,r,f,o;e=/<([A-Za-z\/])/gm;o=/&#/gm;u=function(n){var r="Global",u,t,i;n&&n.which&&(n.which===9||n.which===16||n.which===33||n.which===34||n.which===35||n.which===36||n.which===37||n.which===38||n.which===39||n.which===40)||(u=this.value,t=u.replace(e,"< $1"),t=t.replace(o,"& #"),i=$$WPUtil.RemoveUnsupportedChars(t),u.length!==i.length&&(this.value=i,i!==t&&$$WPUtil.quickPopup(new $$WPComp.ConfirmComponent({callback:function(){return},TitleText:$$WP.Strings.get("UnsupportedCharsPopupTitle",r),ToolbarButtons:[{Text:$$WP.Strings.get("UnsupportedCharsPopupConfirmButton",r)}],Html:$$WP.Strings.get("UnsupportedCharsPopupMessage",r),IsClosable:!0}),{Size:$$WP.Containers.Popup.SizeEnum.Small,positioningFunction:$$WPContain.Positions.InsideCentered})))};r=$afe.select(t);f='input:not([data-permissive="true"]):not([type]), input:not([data-permissive="true"])[type="text"], textarea:not([data-permissive="true"])';r.on("keyup change",f,u);r.on("paste",f,function(){setTimeout($.proxy(u,this),300)});r.on(i,"a",function(t){var f="target",i,r,e,o,u;if(i=$afe.jq(t.currentTarget).closest("a"),r=i.safeAttr("data-redirect")||i.safeAttr("href"),u=i.safeAttr(f),u||!i.safeAttr("data-jq-ignore")){if(i.hasClass("disabled")||r==="#"){t.preventDefault();return}i.get(0).hasAttribute("onclick")||typeof r!="string"||r.length===0||r[0]==="#"||i.get(0).hasAttribute(f)&&u!=="_blank"&&u!=="_self"||(e=i.safeAttr(f)==="_blank"||t.ctrlKey,o=i.safeAttr("data-organization"),$$WPUtil.TryRedirect(r,n,o,e),t.preventDefault())}});if(window.location!==window.parent.location)r.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(){$$WPUtil.canWriteCookies()||$$WPUtil.canWriteCookiesAsync().then(function(n){n?r.trigger("successfulStorageRequest"):r.trigger("failedStorageRequest")})})}(),function(){var r=function(){$afe.select(t).on(i,"[data-driving-directions]",u)},u=function(t){var i=$afe.jq(t.currentTarget).safeAttr("data-driving-directions");openWindow(makeLink("Education/DrivingDirections?destination="+encodeURIComponent(i)),n,"",n,!0);t.preventDefault()};r()}(),function(){$afe.select(t).on("input keyup keypress change scroll click dblclick select wheel cut paste touchstart touchend touchmove touchcancel",$$WP.Utilities.SetActivity)}(),function(){var t;$$WP._windowOpenReal=$.proxy(window.open,window);t=function(t,i,r,u){return openWindow(t,i,r,n,!1,u)};window.open=t}(),function(){var t=function(){var e,f,r,i,o,s,t=arguments[0]||{},u=1,c=arguments.length,h=!1;for(typeof t=="boolean"&&(h=t,t=arguments[u]||{},u++),typeof t=="object"||jQuery.isFunction(t)||(t={}),u===c&&(t=this,u--);u 0){$$WP.Strings.setOrganization(n.CommunityResponse.Organization,h);var i=[new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("Continue",h),a,"completeworkflow","continue"),new $$WPComp.ComplexObjects.Button($$WP.Strings.getForTemplate("cancelNew",h),a,"previousstep","cancel")];s._Components[0].setMessage($$WP.Strings.get("redirectMessage",h));s._Components[0].CallbackArgs=[n];s._Components[0].setToolbar(i);s.setFocus();s.$container.trigger("resize");$$WP.Strings.clearOrganization(h)}}else l.loadIframe(n),$$WP.CommunityUtilities.logDeepLinkAudit("3",t.OrganizationId,n.EptId);else rt()},ft=function(n,i){var u,f,e;i==="toolbarcontinue"&&(typeof n=="string"&&(n=$.parseJSON(n)),typeof n===b&&(r===$$WP.CommunityUtilities.openDeepLinkType.InNewTab?u="":r===$$WP.CommunityUtilities.openDeepLinkType.InNewWindow&&(u="scrollbars=1,resizable=1"),f=n.CommunityResponse.IsSSOPost?"":n.CommunityResponse.RedirectURL,n.CommunityResponse.IsSSOPost?(e=openWindow(f,"",u,w,v),$$WPUtil.postForm(n.CommunityResponse.RedirectURL,n.CommunityResponse.SSOParams,e.name)):openWindow(f,"",u,w,v),$$WP.CommunityUtilities.logDeepLinkAudit("4",t.OrganizationId,n.EptId),n.RedirectToSignup&&$$WP.CommunityUtilities.markCommunityLinkDirty(t.OrganizationId)))},rt=function(){var n,t,i;l&&(n=l.callback,l.callback=a,r||l.dispose());s.hide();t=new $$WPComp.MessageComponent({Message:$$WP.Strings.get("externalLinkErrorMessage",h),callback:function(){n&&l.runCallback(n)}});i=new $$WPUtil.quickPopup(t);t.show();i.show()};r!==0?(c.access=d?"3":"4",s=$$WPUtil.quickMessageBox($$WP.Templates.UI.AjaxSpinner({inline:1}),a,[],ft,a,"externalJumpRequestPopup Popup"),$$WPUtil.ShowAjaxSpinner(s.$content.find(".ajaxspinner"))):(c.access="3",p={},u&&f&&(p.callback=u,p.context=f),l=new $$WPComp.ExternalJumpPopupComponent(p),l.initialize(),s=new $$WPContain.Popup({Components:[l],positioningFunction:$$WPContain.Positions.InsideNearTop,Size:$$WPContain.Popup.SizeEnum.LARGE,Class:"externaljumppopup",CommunicationsIndicator:!1,BackButtonText:$$WP.Strings.get("ExitPopup",h)}),s.show(v),s.setAppropriateScrollBar());o&&(c.access="5");c=$$WPUtil.postify(c);getCSRFTokenAsQS(function(){$.ajax({url:makeLink("ExternalJump/GetExternalJumpUrl"),type:"POST",data:c,dataType:"json",error:rt,cache:!1,success:ut})})};$$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 n={},t;if(n.externalGUID=$$WP.CommunityUtilities.getParentJumpGUID(),n.message="closePopup",t=$$WP.CommunityUtilities.getParentDomain(),parent)try{parent.postMessage(JSON.stringify(n),t)}catch(i){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),t.message==="logout"?(WP.Comm.logOut(),$$WP.CommunityUtilities.clearJumpGUIDs()):t.message==="valid"&&($$WP._isExternalJumpParentValid=!0))};$$WP.CommunityUtilities.checkIfCommunityJumpIsValid=function(){var t=$afe.select("body"),n,i;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(r){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.ShowSignUpNotAllowedMessage=function(n){var t,i;$$WP.Strings.setDefaultNamespace("community.externallinking");$$WP.Strings.setOrganization(n);t=$$WP.Strings.get("SignupNotAllowedMessage");$$WP.Strings.clearOrganization();i=[new $$WPComp.ComplexObjects.Button($$WP.Strings.get("ok","cancelpopup"),null,"previousstep","cancel")];$$WPUtil.quickMessageBox(t,"",i,null,null,"SignupNotAllowed");$afe.select(".SignupNotAllowed.component.Popup").removeClass("textlessTitle");$$WP.Strings.clearDefaultNamespace()};$$WP.CommunityUtilities.hasCommunityLinks=function(){return $afe.select("body").hasClass("hasNoCommunityLinks")?!1:!0};$$WP.CommunityUtilities.communityChecksuccesscallback=function(n){var i,t;n!==null&&typeof n!="undefined"&&(t=n.isCommunityActive,i=t?"hasCommunityLinks":"hasNoCommunityLinks",$.ajax({url:makeLink("session.asp?mode=updateCommunityActiveCheckFlags&IsCommunityActive="+t)}),getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/UpdateCommunityActiveCheckFlags"),type:"POST"})}),$afe.select("body").removeClass("hasNoCommunityLinks hasCommunityLinks").addClass(i))};$$WP.CommunityUtilities.clearCommunityLinksSessionStatus=function(){$.ajax({url:makeLink("session.asp?mode=clearCommunityActiveCheckFlags")});getCSRFTokenAsQS(function(){$.ajax({url:makeLink("Community/External/ClearCommunityActiveCheckFlags"),type:"POST"})})};$$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&&typeof t._callback=="function"&&(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){$$WP.CommunityUtilities.getCommunityLinks(function(r){if(!r||r.length===0){i.push("1");n.apply(this,i);return}if(r.length===1){i.push(r[0]);n.apply(this,i);return}var o,s,e=[],u,f;for(f=r.length,f>3&&(f=3),u=0;u