function ResizeIFrame(){var n,t;"theme"in window&&theme!=="legacy"||(n=$("#ocSearchIFrame"),window.scrollTo(0,0),n.size()>0&&(document.body.style.maxWidth="none",document.body.style.overflow="hidden",t=$(window).height()-n.offset().top,t>0&&n.height(t)))}function PrintFrame(){$("#ocSearchIFrame")[0].contentWindow.focus();window.print()}function SetComScoreData(){var n=$("#ocSearchResults").attr("data-beaconurl"),t=occe.GetCookie("SocBeaconUrl");(t===null||typeof t=="undefined"||t!==n)&&isCookieConsentObtained()&&n!==null&&typeof n!="undefined"&&(document.cookie="SocBeaconUrl="+n,$("#ocSearchAssistance .ocBeaconUrl").attr("src",n))}function PageLoadPingUrl(){var n=$("#ocSearchResults").attr("data-pageloadpingurl");n!==null&&typeof n!="undefined"&&isCookieConsentObtained()&&$("#ocSearchAssistance .ocPageLoadPingUrl").attr("src",n)}(function(n){"use strict";n(function(){try{var t="autoSuggestApp";angular&&angular.module(t)&&(angular.bootstrap(n("[ng-controller='autoSuggestController as homepageSearch']"),[t]),n("#supHomeAndLandingPageSearchBoxForm").submit(function(){occe.AutoSuggestSearchEvent(this,null,"false")}))}catch(i){console.log("autosuggest is not available")}occe&&occe.Controls&&occe.Controls.HomePage&&!occe.Controls.Homepage.setupAwaLoggingOnModules()&&occe.Controls.Homepage.setupAwaLoggingOnModules()})})(jQuery);var SEARCHAUTOSUGGESTBEHAVIOR=60,SEARCHBEHAVIOR=61;occe.pageParam===""&&(occe.pageParam=1);isCookieConsentObtained=function(){return typeof siteConsent!="undefined"?window.siteConsent.getConsentFor(WcpConsent.consentCategories.Analytics):typeof mscc!="undefined"?window.mscc.hasConsent():!1};$(function(){var n={},a=function(t,i,r){var f={},u={},e;u["ms.searchtype"]="searchbox";u["ms.searchquery"]=i;u["ms.interactiontype"]=2;u.href=r;typeof n!="undefined"&&Object.keys(n).length>0&&(u=$.extend(u,n));f.func="ClientNavSearch";f.funcData=u;$("meta[name='ms.searchtype']").length&&occe.setMetaTag("ms.searchtype",u["ms.searchtype"]);e=t.contentWindow?t.contentWindow:t.contentDocument.defaultView;e.postMessage(f,OOGlobal.BaseDomain)},b=function(n,t){return t+"-"+n},k=function(n){var t=n.data("fixed");return t?";"+t:""},v,f,t,e,i,r,w,c,l;if(document.location.href.indexOf("/client/")>=0&&(v=$(".bodyContent"),v.css("padding","0")),window.self!==window.top&&(f=$("html").attr("dir"),t=".ocSearchNavOff",f==="rtl"?(t+=f,e="right"):e="left",$(t).is(t)&&$(t).css("margin-"+e,"0"),i=$(".main-content"),i.css({"min-height":"98%",height:"98%"}),r=occe.GetCookie("SocSearchTextSize"),r!==null&&typeof r!="undefined"?r==="Large"?i[0].style.fontSize="78%":r==="Regular"&&(i[0].style.fontSize="62.5%"):i[0].style.fontSize="62.5%"),$("meta[name='ms.pagetype']").attr("content").toLowerCase()==="serp"){if($("#ocSearchResults").children().length===0&&(occe.pageParam="NULL Results"),$(".supInstantAnswer").length){var y="ms.pagescope",p="instantanswer",u=occe.getMetaTagValue(y);u=u?u+","+p:p;occe.setMetaTag(y,u)}$("#supIASolutionVideo").length&&$("#ocWebLayout.supCont").css("min-width","675px");w=$("a.ocSearchResultTitle");w.each(function(n){var t=$(this),i=b(n+1,occe.pageParam)+k(t);t.attr("ms.serplinkpos",i);t.attr("data-bi-srchlinkpos",i)});$("a").attr("ms.searchpg",occe.pageParam).attr("ms.searchquery",occe.searchQuery);var o=$("meta[name='ms.bing.clientid']").attr("content"),s=$("meta[name='ms.bing.impguid']").attr("content"),h=$("meta[name='ms.bing.userstate']").attr("content");isCookieConsentObtained()&&(o!==null&&typeof o!="undefined"&&(document.cookie="SocClientId="+o),s!==null&&typeof s!="undefined"&&(document.cookie="SocImpGuid="+s),h!==null&&typeof h!="undefined"&&(document.cookie="SocUserState="+h))}$("#ocSearchNavTextSize").click(function(){var n=$("#ocSearchIFrame").contents().find(".main-content"),t;if(n[0]===null||typeof n[0]=="undefined")return null;t=n[0].style.fontSize;t==="62.5%"||t===""?(n[0].style.fontSize="80%",document.cookie="SocSearchTextSize=Large"):(n[0].style.fontSize="62.5%",document.cookie="SocSearchTextSize=Regular");return});$("#ocSearchNavBar a").focusout(function(n){$(n).css("background-color","#FFF")});$("div#h_bar.HeaderPopupShown").length===1&&$("div.ocSearchPane").css("margin-top","80px");$("a.popupClose").click(function(){$("div.ocSearchPane").css("margin-top","40px")});$(window).resize(function(){ResizeIFrame()});c=250;occe.Resources.getSetting("OdcSup_InAppSearchUX_LimitSearchBoxEnabled")==="False"&&(c=0);l=occe.debounce(function(t,i){var c="&IsIframe=true",l="&src=as",y=t.keyCode?t.keyCode:t.which,p=y===13?"KE":"CL",o=encodeURIComponent($("#ocSearchBox, #socNavSearchBox").val()),r=$("#ocSearchIFrame"),u=$("#ocSearchButton, #socNavSearchButton"),f,e,h,s,v;if(o&&r.length>0&&(occe.Resources.getSetting("OdcSup_InAppSearchUX_LimitSearchBoxEnabled")==="True"&&(u.length==0?document.addEventListener("DOMContentLoaded",function(){u.prop("disabled",!0)}):u.prop("disabled",!0)),f=r.attr("data-template-url")+o,i&&i.length==1&&(e=i.scope(),e&&e.main&&(n=e.main.getAutoSuggestTags(),n["ms.asgroup"]&&(l+="&asgroup="+n["ms.asgroup"]),e.main.showSuggestions=!1,e.main.selectedIndex=null)),f+=typeof n!="undefined"&&n["ms.searchtype"]!=="searchbox"?c+l:c,occe.Resources.getSetting("OdcSup_F1Next_UseHTMLDOMAPIForSearch")==="True"&&r&&r.length>0?(h=r[0].contentWindow&&r[0].contentWindow.document?r[0].contentWindow.document:r[0].contentDocument,s=h?h.querySelectorAll(".ocpArticleContent, #ocSearchAssistance"):null,s!==null&s.length&s.length>0?a(r[0],o,f):r.attr("src",f)):(v=r.first().contents(),v.find(".ocpArticleContent, #ocSearchAssistance").length>0?a(r[0],o,f):r.attr("src",f))),occe.Resources.getSetting("OdcSup_InAppSearchUX_LimitSearchBoxEnabled")==="True")if(u.length==0)document.addEventListener("DOMContentLoaded",function(){r.on("load",function(){u.prop("disabled",!1)})});else r.on("load",function(){u.prop("disabled",!1)});var w=$("#ocSearchButton")[0],b=n["ms.searchtype"]=="as"?SEARCHAUTOSUGGESTBEHAVIOR:SEARCHBEHAVIOR,k={behavior:b,actionType:p};window.analytics&&window.analytics.capturePageAction(w,k,null)},c);$("div#ocSearchForm #ocSearchBox, #socNavSearchForm #socNavSearchBox, #ocSearchButton, #socNavSearchButton").keypress(function(n){var i=n.keyCode?n.keyCode:n.which,t;i===13&&(n.preventDefault(),$("#ocSearchButton, #socNavSearchButton").trigger("keypress"),t=$(this).closest("[ng-controller^='autoSuggestController']"),l(n,t))});$("#ocSearchButton, #socNavSearchButton").click(function(n){var t=$(this).closest("[ng-controller^='autoSuggestController']");l(n,t)});$(".supIAFeedbackButton").click(function(){var n=occe.Resources.getLocalizedString("L_IA_Feedback_Recorded");$(".supIAFeedback").html(n)});$(".ocSearchResultResponsive a").bind("keyup mousedown",function(n){var t,i,r,u;(n.type==="keyup"&&n.which===13||n.type==="mousedown"&&n.which===1)&&(t=$(this).closest("#ocSearchResults").attr("data-urlbase"),i=$(this).attr("data-urlsuffix"),t!==null&&typeof t!="undefined"&&i!==null&&typeof i!="undefined"&&(r=t+i,u=$(this).find(".ocGPingImg"),u.attr("src",r)))});$("#supInstantAnswerList").change(function(){var n=this.value;$("#supInstantAnswersBody").children().each(function(t){$(this).toggleClass("ocHidden",t.toString()!==n)})});SetComScoreData();PageLoadPingUrl()});$(window).ready(function(){ResizeIFrame()})