r.bing.com
Open in
urlscan Pro
2a02:26f0:3500:1b::1724:a398
Public Scan
Submitted URL: http://r.bing.com/rp/4Z8eGLcJkgpNRfm3HRHk0Y0wjt0.br.js
Effective URL: https://r.bing.com/rp/4Z8eGLcJkgpNRfm3HRHk0Y0wjt0.br.js
Submission: On November 05 via manual from US — Scanned from DE
Effective URL: https://r.bing.com/rp/4Z8eGLcJkgpNRfm3HRHk0Y0wjt0.br.js
Submission: On November 05 via manual from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
var __assign,__spreadArray,BingAtWork;(function(n){var t,i,r;(function(n){n[n.Person=0]="Person";n[n.Task=1]="Task";n[n.File=2]="File";n[n.Group=3]="Group";n[n.Buildings=4]="Buildings";n[n.Email=5]="Email";n[n.PowerBi=7]="PowerBi";n[n.Bookmark=8]="Bookmark";n[n.RefQnaV2=9]="RefQnaV2";n[n.Explore=10]="Explore";n[n.Conversation=11]="Conversation";n[n.Site=12]="Site";n[n.BuildingsV2=13]="BuildingsV2"})(t=n.ScopeDomain||(n.ScopeDomain={})),function(n){n[n.None=0]="None";n[n.Suppress=1]="Suppress";n[n.BingAtWorkRequery=2]="BingAtWorkRequery";n[n.SerpRequery=3]="SerpRequery";n[n.Upsell=4]="Upsell"}(i=n.QueryBehavior||(n.QueryBehavior={})),function(n){n[n.None=0]="None";n[n.OrgChart=1]="OrgChart";n[n.Email=2]="Email";n[n.Office=3]="Office";n[n.Phone=4]="Phone";n[n.Title=5]="Title";n[n.Department=6]="Department";n[n.Group=7]="Group";n[n.GroupMembers=8]="GroupMembers";n[n.GroupFiles=9]="GroupFiles";n[n.GroupConversations=10]="GroupConversations";n[n.Building=11]="Building";n[n.PersonDocs=12]="PersonDocs";n[n.Alias=13]="Alias";n[n.AllResults=14]="AllResults";n[n.OrgRelation=15]="OrgRelation";n[n.Conversation=16]="Conversation";n[n.TechHelp=17]="TechHelp"}(r=n.QueryIntent||(n.QueryIntent={}))})(BingAtWork||(BingAtWork={})),function(n){var t;(function(n){function t(){return!!("sessionStorage"in _w&&_w.sessionStorage)}function i(n,i){if(t())try{sessionStorage.setItem(n,i)}catch(r){}}function r(n){if(t())try{var i=sessionStorage.getItem(n);return i===null?undefined:i}catch(r){}return undefined}function u(n){if(t())try{sessionStorage.removeItem(n)}catch(i){}}function f(){if(t())try{sessionStorage.clear()}catch(n){}}n.isSupported=t;n.setItem=i;n.getItem=r;n.removeItem=u;n.clear=f})(t=n.SessionStorage||(n.SessionStorage={}))}(BingAtWork||(BingAtWork={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},function(n){function rt(n,t){var i={},r=n.flights,u;r&&r.length>0&&(i.variants=r.join());for(u in t)i[u]=t[u];return i}function ut(n,t){var i,r;if(t)for(i in t)r=n.indexOf("?")>-1?"&":"?",n+="".concat(r).concat(encodeURIComponent(i),"=").concat(encodeURIComponent(t[i]));return n}function ft(n){var t=7;switch(n){case 500:t=6;break;case 404:t=9;break;case 401:t=4;break;case 504:t=5;break;case 400:t=8}return t}function et(n){for(var r,t,f,u=[],i=1;i<arguments.length;i++)u[i-1]=arguments[i];if(!n)return n;for(r=n,t=0;t<u.length;t++)f=new RegExp("\\{".concat(t,"\\}"),"gm"),r=r.replace(f,arguments[t+1]);return r}function ot(t,i){try{return JSON.parse(t)}catch(r){return null}}function st(n,t,i){var r,u;for(i===void 0&&(i=7),r=n,u=0;r&&u<i;u++){if(r===t)return!0;r=r.parentElement}return!1}function ht(n){n!=null&&n.parentNode!=null&&n.parentNode.removeChild(n)}function c(n,t,i,r,u){r===void 0&&(r=0);n()||(t>1?setTimeout(function(){return c(n,t-1,i,r,u)},i+r):u&&u())}function o(n){if(typeof bfbTel!="undefined"&&bfbTel){n();return}sj_evt.bind("bfbWebTelemetryExists",n,!0,undefined,!0)}function ct(t){if(typeof n.Strings!="undefined"&&n.Strings){t();return}sj_evt.bind("BingAtWork:LocStrings",t,!0,null,!0)}function r(){try{return!!("localStorage"in _w&&_w.localStorage)}catch(n){return!1}}function l(t){var i=a(t);if(i){var u=s(t),r=i.cacheExpiryNum,f=i.cacheValueStr;if(!r||window.isNaN(r)||r<(new Date).getTime())h(u);else try{return JSON.parse(f)}catch(e){h(u)}}return undefined}function a(n){var r=s(n),t=wt(r);if(t){var i=t.split(";",2),u=i[0],f=i[1],e=Number(u);return{cacheValueStr:f,cacheExpiryNum:e}}return undefined}function lt(t,i,u,f,e,o,s){var c,h,v,y;if(o===void 0&&(o=!1),s===void 0&&(s=!1),!r())return i({onSuccess:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];u.onSuccess.apply(u,t);f.onSuccess.apply(f,t)},onError:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];u.onError.apply(u,t);f.onError.apply(f,t)}});if(n._isEventBind||(n._isEventBind=!0,sj_evt.bind("ajax.unload",function(){n._localStorageAutoRefreshHandlersBacklog={};n._localStorageOneOffHandlersBacklog={}},!0,null,!0)),n._localStoragePendingAutoRefreshes=n._localStoragePendingAutoRefreshes||{},n._localStorageAutoRefreshHandlersBacklog=n._localStorageAutoRefreshHandlersBacklog||{},n._localStorageOneOffHandlersBacklog=n._localStorageOneOffHandlersBacklog||{},u){if(n._localStorageAutoRefreshHandlersBacklog[t]&&n._localStorageAutoRefreshHandlersBacklog[t].length>0){n._localStorageAutoRefreshHandlersBacklog[t].push(u);return}n._localStorageAutoRefreshHandlersBacklog[t]=[u]}if(f){if(n._localStorageOneOffHandlersBacklog[t]&&n._localStorageOneOffHandlersBacklog[t].length>0){n._localStorageOneOffHandlersBacklog[t].push(f);return}n._localStorageOneOffHandlersBacklog[t]=[f]}if(c=l(t),c!=null&&!s){h=a(t);v=new Date(h===null||h===void 0?void 0:h.cacheExpiryNum);w(t,c,v,!0,i,e,o,!0);return}s;y=p(t,i,e,o);i(y)}function p(t,r,u,f){var e=s(t);return{onSuccess:function(i){var o=u&&u(i);o&&(w(t,i,o,!1,r,u,f),setTimeout(function(){return k(e,"".concat(o.getTime(),";").concat(JSON.stringify(i)))},0))},onError:function(){for(var u=[],r=0;r<arguments.length;r++)u[r]=arguments[r];i(n._localStorageAutoRefreshHandlersBacklog[t],function(n){n.onError&&n.onError.apply(n,u)});i(n._localStorageOneOffHandlersBacklog[t],function(n){n.onError&&n.onError.apply(n,u)});f||(n._localStorageAutoRefreshHandlersBacklog[t]=[]);n._localStorageOneOffHandlersBacklog[t]=[]}}}function s(t){return"".concat(n.localStorageCacheKeyPrefix).concat(t)}function w(t,r,u,f,e,o,s,h){if(i(n._localStorageAutoRefreshHandlersBacklog[t],function(n){n.onSuccess(r,undefined,h)}),s||(n._localStorageAutoRefreshHandlersBacklog[t]=[]),i(n._localStorageOneOffHandlersBacklog[t],function(n){n.onSuccess(r,undefined,h)}),n._localStorageOneOffHandlersBacklog[t]=[],s&&!n._localStoragePendingAutoRefreshes[t]){var c=Math.max(u.getTime()-(new Date).getTime()+v,f?y:0);n._localStoragePendingAutoRefreshes[t]=!0;setTimeout(function(){var i=p(t,e,o,s);e(i);n._localStoragePendingAutoRefreshes[t]=!1},c)}}function at(t,i,r){var u,f;return(r===void 0&&(r=";"),!((f=(u=n.SessionStorage)===null||u===void 0?void 0:u.isSupported)===null||f===void 0?void 0:f.call(u)))?undefined:vt(n.SessionStorage.getItem(t),i,r)}function vt(n,t,i){if(i===void 0&&(i=";"),!n)return undefined;var u=n.split(i,2),f=u[0],e=u[1],r=Number(f);return!r||window.isNaN(r)||r<=(new Date).getTime()-t?undefined:e}function yt(t,i,r){var u,f;(r===void 0&&(r=";"),(f=(u=n.SessionStorage)===null||u===void 0?void 0:u.isSupported)===null||f===void 0?void 0:f.call(u))&&n.SessionStorage.setItem(t,"".concat((new Date).getTime()).concat(r).concat(i))}function pt(t){try{sessionStorage.removeItem(t)}catch(i){}}function i(n,t){if(n)for(var i=0;i<n.length;i++)t(n[i])}function t(n,t){if(!n)return!1;for(var i=0;i<n.length;i++)if(n[i]===t)return!0;return!1}function b(){var n=function(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)};return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}function k(n,t){if(r())try{localStorage.setItem(n,t)}catch(i){}}function wt(n){if(r())try{var t=localStorage.getItem(n);return t===null?undefined:t}catch(i){}return undefined}function h(t){if(r())try{localStorage.removeItem(t)}catch(i){}}function d(t){var c=t.condition,l=t.maxAttempts,u=t.baseIntervalInMillis,r=t.logName,e=t.callback,f=t.additionalIntervalPerAttemptInMillis,i=t.currentAttempt,s=t.timeOutCallback,h;f=f||0;i=i||0;c()?e!=null&&e():(i++,i<l?(h=__assign(__assign({},t),{baseIntervalInMillis:u+f,currentAttempt:i}),setTimeout(function(){return d(h)},u)):(o(function(){return bfbTel.logDiag("".concat(r,"_TimedOut"))}),s!=null&&s()))}function bt(t,i,r,u,f){for(var s,c,a,y,l=[],h=5;h<arguments.length;h++)l[h-5]=arguments[h];s=new Date;n._throttleRecords||(n._throttleRecords={});c=f.id;c||(c=f.id=b());try{a=JSON.stringify(r)}catch(p){return}var v=f.name||"(anonymous)",o="".concat(v,"_").concat(c,"_").concat(a),e=n._throttleRecords[o];if(e){if(e.totalCalls++,e.clusterCalls++,e.clusterCalls>t)if(y=s.getTime()-e.lastRunTime.getTime(),y>=i)e.clusterCalls=1,e.clusters++;else return e.throttledCalls++,e.lastThrottledCallStack=g("Call throttled"),u(),undefined}else n._throttleRecords[o]={totalCalls:1,clusterCalls:1,allowedCalls:0,throttledCalls:0,firstRunTime:s,lastRunTime:s,clusters:1,name:v};return n._throttleRecords[o].allowedCalls++,n._throttleRecords[o].lastRunTime=s,f.apply(void 0,l)}function g(n){return nt(new Error(n).stack)}function nt(n){return n&&n.replace(/\?.*/gi,"?<query string redacted>")}function kt(t){if(t===void 0&&(t=!0),!n._throttleRecords)return undefined;var r=[],u=Object.keys(n._throttleRecords);return i(u,function(i){var u=n._throttleRecords[i];(!t||u.throttledCalls>0)&&r.push(u)}),r}function dt(){n._throttleRecords={}}function gt(n,t){if(!n)return undefined;for(var i=0;i<n.length;i++)if(t(n[i]))return n[i];return undefined}function ni(n){return n&&n.length==0}function ti(t){try{return atob(t)}catch(i){}}function ii(t,i){typeof n.Localhost!="undefined"&&typeof n.Localhost.augmentMsbMtAjax=="function"&&n.Localhost.augmentMsbMtAjax(t,i)}function ri(n){if(!n.isOnWorkVertical)return undefined;var t=(window.location.hash||"").replace("#",""),i=t.indexOf("-");return t.substring(0,i>-1?i:t.length).toLocaleLowerCase()||"all"}function ei(t,i,r){var h=n.context.isErrBAbsorbEnabled,f,s;try{return i()}catch(e){if(f=e.name||e,s="Exception '".concat(f,"' caught at '").concat(t,"'")+(r?", called by '".concat(r,"'"):""),(_G.TEST_HOOKS_ENABLED||_G.TestEnv)&&alert(s),f&&(tt<fi&&(typeof u[f]=="undefined"||u[f]<ui)&&(o(function(){return bfbTel.logErr(n.EventScope.BingAtWork,s,e.message,"UncaughtError",e.stack)}),u[f]=typeof u[f]=="undefined"?1:u[f]+1,tt++),!h))throw e;}}function oi(t){if(!t)return{token:undefined,error:"Empty token string"};try{var i=t.split(".")[1],r=i.replace(/-/g,"+").replace(/_/g,"/"),u=decodeURIComponent(atob(r).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return{token:JSON.parse(u)}}catch(f){return{token:undefined,error:"Failed to parse token"}}}function si(){return/MSIE|Trident/.test(e())}function e(){return window.navigator.userAgent}function hi(){if(!window.performance)return!1;var n=window.performance.getEntriesByType("navigation");return n.length>0&&n[0].type==="back_forward"||window.performance.navigation.type===window.performance.navigation.TYPE_BACK_FORWARD}function ci(n){var t=function(){sb_st(n,100);sj_evt.unbind("aad:signedin",t)};sj_evt.bind("aad:signedin",t,!0,undefined,!0)}function it(){var n=e();return t(n,"OPR/")||t(n,"Opera")?"Opera":t(n,"PhantomJS")?"PhantomJS":t(n,"Edg")?"Edge":t(n,"Electron")?"Electron":t(n,"Chrome")?"Chrome":t(n,"Trident")?"MSIE":t(n,"Firefox")?"Firefox":t(n,"Safari")?"Safari":t(n,"SkypeShell")?"SkypeShell":"Unknown"}function li(){var r,n=e(),t=it(),i;return t==="MSIE"?r=ai(n):t==="Edge"?(i=f(n,t),r=i==="Unknown"?f(n,"Edg"):i):t==="Opera"?(i=f(n,t),r=i==="Unknown"?f(n,"OPR"):i):r=f(n,t),r}function ai(n){var i=n.match(new RegExp("MSIE ([\\d,.]+)")),t;return i?i[1]:(t=n.match(new RegExp("rv:([\\d,.]+)")),t?t[1]:"Unknown")}function f(n,t){t==="Safari"&&(t="Version");var i=n.match(new RegExp(t+"/([\\d,.]+)"));return i?i[1]:"Unknown"}var v,y;n.bawSourceName="BingAtWork";n.msPerDay=864e5;n.getRequestMetadata=rt;n.mergeArgsIntoUrl=ut;n.getError=ft;n.strFormat=et;n.tryParseJson=ot;n.hasAncestorElement=st;n.removeElement=ht;n.retryPoll=c;n.whenWebTelemetryExists=o;n.whenLocStringsAvailable=ct;n.isLocalStorageSupported=r;n.getCacheValueIfValid=l;n.localStorageCacheKeyPrefix="MSBLS_";v=18e4;y=3e4;n.withLocalStorageCache=lt;n.getSessionStorage=at;n.writeSessionStorage=yt;n.removeSessionStorageItem=pt;n.forEach=i;n.includes=t;n.generateGuid=b;n.setItemForLocalStorage=k;n.removeItem=h;n.poll=d;n.throttle=bt;n.getSanitizedCallStack=g;n.redactQueryStrings=nt;n.getThrottleRecords=kt;n.resetThrottleRecords=dt;n.find=gt;n.isEmpty=ni;n.decodeBase64=ti;n.augmentMsbMtAjax=ii;n.getStartedEventDetails=function(){return{startTime:new Date,startTimeStartDuration:performance.now()}};n.getSucceededEventDetails=function(n,t,i){return{endTime:new Date,endTimeStartDuration:performance.now(),response:n,headers:t,status:200,isFromCache:i}};n.getFailedEventDetails=function(n,t){return{endTime:new Date,endTimeStartDuration:performance.now(),error:n,status:t}};n.getLoweredWorkSerpVerticalDomain=ri;var u={},tt=0,ui=5,fi=30;n.withErrorBoundary=ei;n.parseJwt=oi;n.isHostIE=si;n.getUserAgent=e;n.isBackForwardNavigation=hi;n.bindForAad=ci;n.getBrowserName=it;n.getBrowserVersion=li}(BingAtWork||(BingAtWork={})),function(n){var t;(function(t){var i;(function(t){function e(){var t=n.context.query,e=!t?"":t.split(" ").join("_"),f=n.getSessionStorage("".concat(i).concat(e),u,r);return f&&JSON.parse(f)}function f(t,f){var e=Object.keys(sessionStorage).reduce(function(f,e){if(e.indexOf(t)===0){var o=n.getSessionStorage(e,u,r);return o?f+1:(n.removeSessionStorageItem(e),f)}return f},0);return e>=f}function o(t){var u=n.context.query,e=u.split(" ").join("_"),o=f(i,10);u&&!o&&t&&setTimeout(function(){return n.writeSessionStorage("".concat(i).concat(e),JSON.stringify(t),r)},0)}var i="substrateUnifiedSearchResponse_",r=";|;",u=18e4;t.getSubstrateUnifiedResponseInSession=e;t.hasExceededSessionStorageSaveLimit=f;t.saveSubstrateUnifiedResponseInSession=o})(i=t.Midgard||(t.Midgard={}))})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={})),function(n){function o(t,i,f){var e=function(){if(u){var i=[t.url,t.requestType],e=function(){t.onError&&t.onError(7,0,"throttled")};n.throttle(10,1e4,i,e,r,t,f)}else r(t,f)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("sendAjax",e,i):e()}function r(t,r){var y,a,d,g,h,nt;if(t!=null){var tt=t.timeout,p=t.onSuccess,c=t.onError,l=t.url,w=t.body,it=t.tries,ft=t.requestType,b=t.headers,et=t.convertPropertiesToPascalCase,k=t.accessToken,o=window===null||window===void 0?void 0:window.parent;f&&(a=(y=o===null||o===void 0?void 0:o.BingAtWork)===null||y===void 0?void 0:y.wsb,k=t.accessToken||(a===null||a===void 0?void 0:a.wsbAccessToken));var u=e?typeof(o===null||o===void 0?void 0:o.sj_gx)=="function"?o===null||o===void 0?void 0:o.sj_gx():new XMLHttpRequest:sj_gx(),rt=ft||"GET",ut=function(){return u.open(rt,l,!0)},v=n.redactQueryStrings(l);if(ut(),u.withCredentials=!t.disableWithCredentials,d=function(){return c&&c(5,504,null)},u.ontimeout=(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?function(){return n.withErrorBoundary("Ajax.ontimeout",d,"Ajax ".concat(v))}:d,u.timeout=tt==null?0:tt,g=it||1,h=function(t,i,r,u){n.whenWebTelemetryExists(function(){return bfbTel.logDiag(u,{url:l,reason:i})});c!=null&&c(i,t,r)},k!=null&&u.setRequestHeader("Authorization","Bearer ".concat(k)),s()&&rt==="POST"&&u.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),b)for(nt in b)u.setRequestHeader(nt,b[nt]);u.onreadystatechange=function(){var t,f,s,c,e,o;if(u.readyState===4)if(u.status===200){if(p!=null){if(t=null,f={},u.responseText!=null&&u.responseText!=="")try{t=r?u.responseText:JSON.parse(u.responseText)}catch(l){(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("Ajax.onAjaxError",function(){return h(-1,10,u.responseText,"Bad data")},"Ajax ".concat(v)):h(-1,10,u.responseText,"Bad data");return}if(u.HEADERS_RECEIVED)try{s=u.getAllResponseHeaders();c=s.trim().split(/[\r\n]+/);c.forEach(function(n){var t=n.split(": "),i=t.shift(),r=t.join(": ");f[i]=r})}catch(a){}t=et?i(t):t;(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("Ajax.onSuccess",function(){return p(t,f)},"Ajax ".concat(v)):p(t,f)}}else--g>0?(u.abort(),ut(),u.send(w)):(e=n.getError(u.status),o="Ajax call failed with status ".concat(u.status,". No retries available."),(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("Ajax.onAjaxError",function(){return h(u.status,e,u.responseText,o)},"Ajax ".concat(v)):h(u.status,e,u.responseText,o))};u.send(w)}}function i(n){return n===null?null:n===undefined?undefined:typeof n=="number"||typeof n=="string"||typeof n=="boolean"?n:Array.isArray(n)?n.map(i):Object.keys(n).reduce(function(t,r){var u="".concat(r[0].toUpperCase()).concat(r.slice(1));return t[u]=typeof n[r]=="object"?i(n[r]):n[r],t},{})}function s(){return typeof window=="undefined"||!window.navigator||!window.navigator.userAgent?!1:window.navigator.userAgent.indexOf("PhantomJS")>-1}var t=n.context&&n.context,u=t===null||t===void 0?void 0:t.isThrottlingEnabled,f=(t===null||t===void 0?void 0:t.wsb)||(t===null||t===void 0?void 0:t.miniSerp),e=t===null||t===void 0?void 0:t.miniSerp;n.sendAjax=o}(BingAtWork||(BingAtWork={}));BingAtWork.Wsb=BingAtWork.Wsb||{};BingAtWork.Wsb.sendAjax=function(n,t,i){return BingAtWork.sendAjax(n,i,t)},function(n){var t;(function(t){function i(t,i,r){var u=n.getRequestMetadata(t,r);return n.mergeArgsIntoUrl(i,u)}function r(t,i,r,u,f,e,o){var s={url:t,accessToken:e,requestType:"POST",body:JSON.stringify(i),timeout:u,headers:f,onSuccess:r.onSuccess,onError:r.onError};n.augmentMsbMtAjax(s,"caller: sendPostRequest, file: ServiceHelpers");n.sendAjax(s,"caller: sendPostRequest, file: ServiceHelpers",o)}t.addArgsToUrl=i;t.sendPostRequest=r})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},function(n){var t;(function(n){var t=function(){function t(n){this.config=n;this.tokenApiUrl="".concat(n.apiUriBase,"/v3/user/token")}return t.prototype.getToken=function(t,i,r){var o=n.addArgsToUrl(this.config,"".concat(this.tokenApiUrl,"/").concat(r),{}),u=i!==null&&i!==void 0?i:{},f=u.onSuccess,e=u.onError,s=__assign(__assign({},i),{onSuccess:function(n){n?f&&f(n):e&&e(10,-1)}});n.sendPostRequest(o,t,s)},t}();n.TokenClient=t})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={})),function(n){var t;(function(t){var i;(function(t){function c(n){var t=n&&n.AnswerEntityRequests&&n.AnswerEntityRequests[0];return t&&t.Query&&t.Query.QueryString}function l(n){return n&&n.AnswerEntitySets&&n.AnswerEntitySets[0]}function a(n){var r,u,e,t,i;return f(n)?(i=n,((e=i===null||i===void 0?void 0:i.Ranking)===null||e===void 0?void 0:e.Placement)||"Suppress"):(t=n,((u=(r=t===null||t===void 0?void 0:t.WholePageRankings)===null||r===void 0?void 0:r[0])===null||u===void 0?void 0:u.Placement)||"Suppress")}function v(n){var t,i,r=p(n);if((i=(t=r===null||r===void 0?void 0:r.EntityCards)===null||t===void 0?void 0:t[0])!==null&&i!==void 0)return i.CardType}function y(n){var t=n&&n.AnswerEntitySets;if(t)return t.some(function(n){return n.ResultSets&&n.ResultSets.some(function(n){return n.Results&&n.Results.some(function(n){return!!n.Source&&!!n.Source.powerApp})})})}function p(n){var i,t,r;return f(n)?(r=n,r.Ranking):(t=n,(i=t===null||t===void 0?void 0:t.WholePageRankings)===null||i===void 0?void 0:i[0])}function f(n){return!!n&&!("EntitySets"in n)}var i=n.context,e=i.isSubstratePeriodicWarmup,o=i.tenantId,r=i.uiCulture,s=i.isBingSpellerEnabled,u=i.isNew3sSdkEnabled,h=function(){function t(n,t){this.substrateSearchCfg=n;this.getSubstrateToken=t;this.isPrimed=!1}return t.prototype.search=function(n,t,i,r,u){var f=this;this.substrateSearchCfg.is3sPrimingEnabled&&this.primeConnection();this.getSubstrateToken(undefined,{onSuccess:function(e){return f.searchImpl(e.token,n,t,i,r,u)},onError:t.onError})},t.prototype.searchResolveEntitiesAsync=function(n,t,i,r,u){var f=this;this.getSubstrateToken(undefined,{onSuccess:function(e){return f.searchResolveEntitiesAsyncImpl(e.token,n,t,i,r,u)},onError:t.onError})},t.prototype.warmUp=function(t,i,r,u){var o=this,f;this.substrateSearchCfg.is3sPrimingEnabled&&this.primeConnection();f={onSuccess:function(n){return o.warmUpImpl(n.token,t,i,r,u)},onError:function(t,i,r){return sj_evt.fire("bfbSubstrateWarmupFailed",t,i,r,n.getFailedEventDetails(t,i))}};e?this.getSubstrateToken(f):this.getSubstrateToken(undefined,f)},t.prototype.searchImpl=function(t,i,r,u,f,e){var o,s,v=this.substrateSearchCfg.substrateApiUri,h=n.mergeArgsIntoUrl(v.concat("/v2/query"),e),c=this.getHeader(t,"POST",f),l,a;if(sj_evt.fire(u,n.getStartedEventDetails()),l=n.context.isCachingSubstrateResponseEnabled,a=(s=(o=n===null||n===void 0?void 0:n.Service)===null||o===void 0?void 0:o.Midgard)===null||s===void 0?void 0:s.getSubstrateUnifiedResponseInSession(),l&&a){r.onSuccess(a,undefined,{url:h,token:t,headers:c,request:i},!0);return}this.sendRequest(h,i,{onSuccess:function(u,f){var e,o;l&&((o=(e=n===null||n===void 0?void 0:n.Service)===null||e===void 0?void 0:e.Midgard)===null||o===void 0?void 0:o.saveSubstrateUnifiedResponseInSession(u));r.onSuccess(u,f,{url:h,token:t,headers:c,request:i},!1)},onError:r.onError},null,t,c)},t.prototype.searchResolveEntitiesAsyncImpl=function(t,i,r,u,f,e){var o=this.substrateSearchCfg.substrateApiUri,s=n.mergeArgsIntoUrl(o.concat("/v1/resolveEntitiesAsync"),e),h=this.getHeader(t,"POST",f);sj_evt.fire(u,n.getStartedEventDetails());this.sendRequest(s,i,r,null,t,h)},t.prototype.getHeader=function(t,i,f,e){var h,c,l;if(i===void 0&&(i="POST"),h={},!this.anchorMailboxHeaderValue){var a=n.parseJwt(t),v=a.token,y=a.error,p=v&&v.puid;p?this.anchorMailboxHeaderValue="PUID:".concat(p,"@").concat(o):(c="SubstrateSearchClient: cannot add x-anchormailbox header. PUID is not available.",y&&(c+=" Error: ".concat(String(y))),n.whenWebTelemetryExists(function(){return bfbTel.logDiag(c)}))}if(this.anchorMailboxHeaderValue&&(h["x-anchormailbox"]=this.anchorMailboxHeaderValue,(u||e)&&(h["X-RoutingParameter-SessionKey"]=this.anchorMailboxHeaderValue)),i==="POST"&&(h["Content-Type"]="application/json"),f)for(l in f)h[l]=f[l];return s&&r&&(h["Accept-Language"]=r),h},t.prototype.primeConnection=function(){var i=this.substrateSearchCfg.substrateApiUri,n,t;this.isPrimed||(this.isPrimed=!0,n=_d.createElement("link"),n.rel="preconnect",n.href=i,n.crossOrigin="anonymous",_d.head.appendChild(n),t=_d.createElement("link"),t.rel="dns-prefetch",t.href=i,_d.head.appendChild(t))},t.prototype.warmUpImpl=function(t,i,r,f,e){var k=this,o=this.substrateSearchCfg,d=o.defaultScenario,c=o.personAutosuggestScenario,l=o.substrateApiUri,a=f||_G.IG,s=u||e?l.concat("/v2/init?cvid=".concat(a,"&setflight=querymicroservice")):l.concat("/v2/init?cvid=".concat(a)),h=this.getHeader(t,"GET",undefined,e),v=i("bfbSubstrateWarmup","bfbSubstrateWarmupFailed"),y,p,w,b;r&&r.length>0?r.forEach(function(i){var r="".concat(s,"&scenario=").concat(i);sj_evt.fire("bfbSubstrateWarmupStarted",n.getStartedEventDetails());k.sendRequest(r,{},v,null,t,h,"GET")}):(y=d,p="".concat(s,"&scenario=").concat(y),sj_evt.fire("bfbSubstrateWarmupStarted",n.getStartedEventDetails()),this.sendRequest(p,{},v,null,t,h,"GET"),n.isSubstrateWarmupV2DefaultStarted=!0);c&&(w="".concat(s,"&scenario=").concat(c),b=i("bfbSubstrateWarmupV2PersonSuggest","bfbSubstrateWarmupV2PersonSuggestFailed"),sj_evt.fire("bfbSubstrateWarmupV2PersonSuggestStarted",n.getStartedEventDetails()),this.sendRequest(w,{},b,null,t,h,"GET"),n.isSubstrateWarmupV2PersonSuggestStarted=!0)},t.prototype.sendRequest=function(t,i,r,u,f,e,o){o===void 0&&(o="POST");var s={url:t,accessToken:f,requestType:o,body:JSON.stringify(i),setJsonContentType:!0,timeout:u,headers:e,onSuccess:r.onSuccess,onError:r.onError};n.sendAjax(s,"caller: sendRequest, file: SubstrateSearchClient")},t}();t.SubstrateSearchClient=h;t.getRequestQuery=c;t.getFirstAnswerEntitySet=l;t.getRankingPlacement=a;t.getRankingCardType=v;t.containsPowerApp=y})(i=t.Midgard||(t.Midgard={}))})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},function(n){var t;(function(t){t.tenantSettingsAjaxBound=n.Service.tenantSettingsAjaxBound;t.SeverSideCachedVerticalConfigExpirationInSeconds=864e5;var i=n.context||{isCacheTenantSettingsEnabled:!1,isForceRefreshTenantSettingsEnabled:!1,isErrorBoundaryEnabled:!1,tenantId:""},r=i.isCacheTenantSettingsEnabled,f=i.isForceRefreshTenantSettingsEnabled,e=i.isErrorBoundaryEnabled,u=i.tenantId,o=i.aadUserId,s=i.authorized,h=function(){function i(i,r,f){var o=this,s;this.config=i;this.onAjaxLoad=function(){u!==(o.cachedTenantSettings&&o.cachedTenantSettings.tenantObjectId)&&(n.isTenantSettingsPrefetchStarted=!1,o.getTenantSettings());o.broadcastImpl()};this.tenantSettingsApiUrl="".concat(i.apiUriBase).concat(i.tenantSettingsApiUri);this.requireM365DataBoundary=i.enableM365DataBoundary;s=function(){o.onResponse=r;t.tenantSettingsAjaxBound||(sj_evt.bind("ajax.load",o.onAjaxLoad,!0,null,!0),t.tenantSettingsAjaxBound=!0)};e&&n.withErrorBoundary?n.withErrorBoundary("TenantSettingsClientCtr",s,f):s()}return i.isValid=function(n){return!!(n&&n.tenantObjectId&&n.tenantDisplayName)},i.prototype.getTenantSettings=function(i,e){var h=this,c={onSuccess:function(t,f,e){var c,a,l,v,y;t.tenantSettings&&(r?(c=t.tenantSettings,h.requireM365DataBoundary&&(a=n.context,a.m365DataBoundary=c.m365DataBoundary==undefined||c.m365DataBoundary.length==0?["EUDB"]:c.m365DataBoundary),(c.verticalConfigs==undefined||c.verticalConfigs.length==0)&&(s&&o&&(l=c.verticalConfigs==undefined?"verticalConfigs is missing.":"verticalConfigs is empty.",n.whenWebTelemetryExists(function(){return bfbTel.logErr(n.EventScope.BingAtWork,"TenantSettingsClient: TenantSettings response missing valid verticalConfigs","".concat(l," - Will remove from localStorage"),"ClientError")})),v="bfbTenantSettings"+u,y="".concat(n.localStorageCacheKeyPrefix).concat(v),n.removeItem(y)),h.broadcast(t.tenantSettings,t.user,f,e)):h.broadcast(t.tenantSettings,t.user,f,!1),h.onResponse&&h.onResponse.onSuccess&&h.onResponse.onSuccess(t),i&&i.onSuccess&&i.onSuccess(t))},onError:function(t,r,u){if(h.requireM365DataBoundary){var f=n.context;f.m365DataBoundary=["EUDB"]}sj_evt.fire("bfbTenantSettingsFailed",t,r,u,n.getFailedEventDetails(t,r));h.onResponse&&h.onResponse.onError&&h.onResponse.onError(t,r);i&&i.onError&&i.onError(t,r);r===404&&(h.isTenantNotProvisioned=!0)}};if(r){if(n.isTenantSettingsPrefetchStarted)return;sj_evt.fire("bfbTenantSettingsStarted",n.getStartedEventDetails());n.isTenantSettingsPrefetchStarted=!0;n.withLocalStorageCache("bfbTenantSettings"+u,function(n){h.getTenantSettingsImpl(n,e)},undefined,c,function(){return new Date(Date.now()+t.SeverSideCachedVerticalConfigExpirationInSeconds)},!0,f)}else this.getTenantSettingsImpl(c,e)},i.prototype.convertToJson=function(n){if(!n)return"EmptyJSON";var t=__assign({},n);return delete t.adminEmail,delete t.exploreQueries,delete t.iconLarge,delete t.iconLargeChecksum,JSON.stringify(t)},i.prototype.getCachedTenantSettings=function(){return this.cachedTenantSettings},i.prototype.getIsTenantNotProvisioned=function(){return this.isTenantNotProvisioned},i.prototype.getTenantSettingsImpl=function(t,i){if(!r){if(n.isTenantSettingsPrefetchStarted)return;sj_evt.fire("bfbTenantSettingsStarted",n.getStartedEventDetails());n.isTenantSettingsPrefetchStarted=!0}var u=__assign(__assign({},n.getRequestMetadata(this.config)),{isLokiVerticalConfigRequired:!0}),e=__assign(__assign({},u),{IsDataBoundaryRequired:!0}),o=n.mergeArgsIntoUrl(i||this.tenantSettingsApiUrl,this.requireM365DataBoundary?e:u),f={url:o,requestType:"GET",timeout:this.config.tenantSettingsTimeout,onSuccess:t&&t.onSuccess,onError:t&&t.onError};n.augmentMsbMtAjax(f,"caller: getTenantSettings, file: TenantSettingsClient");n.sendAjax(f,"caller: getTenantSettings, file: TenantSettingsClient")},i.prototype.broadcast=function(t,r,u,f){i.isValid(t)&&(this.cachedTenantSettings=t,this.cachedUserInfo=r,this.cachedTenantConfig=this.convertToTenantConfig(t),this.broadcastImpl(f,u))},i.prototype.convertToTenantConfig=function(n){var t=n.tenantDisplayName,i=n.iconLarge,r=n.iconLargeChecksum,u=n.theme,f=n.adminEmail,e=n.themeColors;return{displayName:t,theme:u,iconLarge:i,iconLargeChecksum:r,adminEmail:f,themeColors:e}},i.prototype.broadcastImpl=function(t,i){var r=this;t===void 0&&(t=!0);this.cachedTenantSettings&&sj_evt.fire("bfbTenantSettings",this.cachedTenantSettings,this.cachedUserInfo,i,t,n.getSucceededEventDetails(this.cachedTenantSettings,i,t));this.cachedTenantConfig&&sj_evt.fire("bfbtcfg",this.cachedTenantConfig);this.cachedUserInfo&&this.cachedUserInfo.displayName&&this.cachedUserInfo.userPrincipalName?sj_evt.fire("bfbTenantSettingsUserInfo"):this.isUserInfoRetried||(this.isUserInfoRetried=!0,sj_evt.bind("aad:signedin",function(){n.isTenantSettingsPrefetchStarted=!1;r.getTenantSettings()},!0))},i}();t.TenantSettingsClient=h})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={})),function(n){var t;(function(t){var i;(function(i){i.userConfigsAjaxBound=n.Service.Midgard.userConfigsAjaxBound;var r=function(){function r(t,r,u){var f=this,e;this.onAjaxLoad=function(){var t=n.context,r=t.tenantId,u=t.aadUserId,i=function(){(r!==(f.cachedUserConfigs&&f.cachedUserConfigs.tenant&&f.cachedUserConfigs.tenant.id)||u!==(f.cachedUserConfigs&&f.cachedUserConfigs.user&&f.cachedUserConfigs.user.id))&&(n.isUserConfigsPrefetchStarted=!1,f.loadUserConfigs());f.broadcastImpl()};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("onAjaxLoad",i,"UserConfigsClient"):i()};this.config=t;this.userConfigsApiUrl="".concat(t.apiUriBase).concat(t.userConfigsApiUri);this.cachedRequest=r;this.cvid=typeof _G!="undefined"?_G.IG:undefined;e=function(){i.userConfigsAjaxBound||(sj_evt.bind("ajax.load",f.onAjaxLoad,!0,null,!0),i.userConfigsAjaxBound=!0)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("UserConfigsClientCtr",e,u):e()}return r.prototype.loadUserConfigs=function(t){var i=this,r={onSuccess:function(t,r){t&&i.broadcast(t,r)},onError:function(t,i,r){sj_evt.fire("bfbUserConfigsFailed",t,i,r,n.getFailedEventDetails(t,i))}};sj_evt.fire("bfbUserConfigsStarted",n.getStartedEventDetails());this.getUserConfigs(r,t);n.isUserConfigsPrefetchStarted=!0},r.prototype.getUserConfigs=function(n,i){var r={},u;this.cvid!==undefined&&(r.cvid=this.cvid);u=t.addArgsToUrl(this.config,i||this.userConfigsApiUrl,r);t.sendPostRequest(u,this.cachedRequest,n,this.config.userConfigsTimeout)},r.prototype.broadcast=function(t,i){var u=this,r;this.cachedUserConfigs=t;r=function(){return u.broadcastImpl(!1,i)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("broadcast",r,"UserConfigsClient"):r()},r.prototype.getCachedUserConfigs=function(){return this.cachedUserConfigs},r.prototype.broadcastImpl=function(t,i){var r=this;t===void 0&&(t=!0);this.cachedUserConfigs&&(sj_evt.fire("bfbUserConfigs",this.cachedUserConfigs,this.cachedRequest,i,t,n.getSucceededEventDetails(this.cachedUserConfigs,i,t)),this.cachedUserConfigs.userStatus&&n.whenWebTelemetryExists(function(){bfbTel.instUserStatus(r.cachedUserConfigs.userStatus)}))},r}();i.UserConfigsClient=r})(i=t.Midgard||(t.Midgard={}))})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={})),function(n){function f(f,e,h){if(s(f)&&!n.msbJsResources[f]){var c=u(f);(n.retryMidgardResources||[]).indexOf(f)>-1?c.addEventListener("error",function(n){return o(c,f,h,n)}):c.addEventListener("error",function(n){r(f,0,n);h&&h(f)});e?t.push(c):i(c);n.msbJsResources[f]=!0}}function e(){for(var n=0;n<t.length;n++)i(t[n]);t=[]}function i(n){document.body?document.body.appendChild(n):document.head?document.head.appendChild(n):document.appendChild(n)}function o(t,f,e,o){n.removeElement(t);var s=u(f);s.addEventListener("error",function(n){r(f,0,n);e&&e(f)});i(s);r(f,1,o)}function u(t){var i,r,e=document.createElement("script"),u,f;return((r=(i=n===null||n===void 0?void 0:n.context)===null||i===void 0?void 0:i.mtCfg)===null||r===void 0?void 0:r.isTrustedTypesEnabled)?(f=n.getBawTrustedTypesPolicy(),u=f?f.createScriptURL(t):t):u=t,e.src=u,e}function s(n){if(!n)return!1;var i=n.indexOf("?"),t=i>=0?n.substring(0,i):n;return t?t.substring(t.length-3,t.length).toLowerCase()===".js":!1}function r(t,i,r){n.whenWebTelemetryExists(function(){bfbTel.logDiag("Midgard resource load failed.",{url:t,triesLeft:i});bfbTel.logErr(n.EventScope.BingAtWork,"Midgard bundle loading failed for "+t,r?r.message:"Error message not logged","ClientError")})}n.msbJsResources=n.msbJsResources||{};var t=[];n.injectScript=f;n.loadScriptsOnDemand=e}(BingAtWork||(BingAtWork={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)},function(n){var t;(function(t){var i;(function(t){var i=function(){function t(n,t){this.mtCfg=n;this.getLokiToken=t}return t.prototype.getVerticalConfigs=function(n){var t=this;this.getLokiToken({onSuccess:function(i){return t.getVerticalConfigsImpl(i.token,n)},onError:n.onError})},t.prototype.getVerticalConfigsImpl=function(t,i){var h=new URLSearchParams(window.location.search),u=h.get("features"),f=this.mtCfg,c=f.lokiBaseApiUri,l=f.lokiVertCfgUri,e=n.generateGuid(),a={RootCorrelationId:e,CorrelationId:e,ClientCorrelationId:_G&&_G.IG||"",ConvertGetPost:"true"},v=n.mergeArgsIntoUrl(c+l,a),r={Accept:"text/plain, application/json, text/json","X-ClientFeature":"Search","X-ClientScenario":"","X-ClientType":"Bing","X-HostAppCapabilities":"{}","X-HostAppRing":"prod","X-HostAppVersion":"0.0.0.0","X-LPCVersion":"0.0.0.0",authorization:"Bearer ".concat(t)},o,s;!u||(o=u.split(","),o.indexOf("uncachedVerticals")>-1&&(r=__assign(__assign({},r),{"X-Cache-Mode":"uncached"})));s=JSON.stringify(r);n.sendAjax({url:v,requestType:"POST",body:s,onSuccess:i&&i.onSuccess,onError:i&&i.onError,convertPropertiesToPascalCase:!0},"caller: getVerticalConfigsImpl, file: LokiClient")},t}();t.LokiClient=i})(i=t.Midgard||(t.Midgard={}))})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)};__spreadArray=this&&this.__spreadArray||function(n,t,i){if(i||arguments.length===2)for(var r=0,f=t.length,u;r<f;r++)!u&&r in t||(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))},function(n){var t;(function(t){var i;(function(t){function r(t,i,r,u,f,e,o,s,h){var c=n.context,p=c.conversationId,k=c.logicalId,a=c.ssCfg,d=c.culture,g=c.uiCulture,nt=c.timeZone,tt=c.isSubstrateTimeZoneEnabled,it=c.isSubstrateUICultureEnabled,rt=c.isEduAssignmentESEnabled,ut=c.isSerpLiteEnabled,l=c.formCode,ft=c.muid,et=a.searchScenario,ot=a.defaultScenario,st=e||et||ot,v=typeof _G.IG!="undefined"&&_G.IG?_G.IG:undefined;return __assign(__assign(__assign(__assign({EntityRequests:ut?[]:w(t,i,r,u,o,s,h),Cvid:p,LogicalId:k,Scenario:{Dimensions:__spreadArray(__spreadArray(__spreadArray([{DimensionName:"QueryType",DimensionValue:y(t)},{DimensionName:"FormFactor",DimensionValue:"Web"}],l?[{DimensionName:"FormCode",DimensionValue:l}]:[],!0),l?[{DimensionName:"Muid",DimensionValue:ft}]:[],!0),v?[{DimensionName:"ImpressionGuid",DimensionValue:v}]:[],!0),Name:st},TextDecorations:"Off",TimeZone:tt?nt:"UTC"},rt&&{TimeZoneOffsetInMinutes:-1*(new Date).getTimezoneOffset()}),{Culture:d}),it&&{UICulture:g}),{QueryAlterationOptions:b(f)})}function u(t,i,r){var u=n.context,p=u.conversationId,w=u.logicalId,c=u.ssCfg,b=u.isSubstrateFileEntityEnabled,k=u.isOfferAnswerEnabled,d=u.isEduAnswerEnabled,g=u.isTopicAnswerEnabled,nt=u.culture,e=u.isSubstrateAsyncEnabled,tt=u.isAdaptiveSupportEnabled,it=u.isSubstrateTimeZoneEnabled,rt=u.isSubstrateUICultureEnabled,ut=u.isEduAssignmentESEnabled,ft=u.timeZone,et=u.uiCulture,ot=u.isLearningAnswerEnabled,st=u.isTuringAnswerEnabled,ht=u.is3sDisplayQueryStringEnabled,l=u.query,ct=u.isSharedSerpAllVerticalEnabled,o=u.formCode,s=u.muid,lt=c.defaultScenario,at=c.searchScenario,v=f(t),vt=i||at||lt,yt=a(t,k,g,b,e,d,ot,st,ct,r),y=e&&tt,h=typeof _G.IG!="undefined"&&_G.IG?_G.IG:undefined,pt=[{Query:{QueryString:v,DisplayQueryString:ht&&v!=l?l:undefined},EntityTypes:yt,From:0,Size:10,EnableAsyncResolution:e?e:undefined,SupportedResultSourceFormats:y?["AdaptiveCard","EntityData","AdaptiveCardTemplateBinding"]:undefined,PreferredResultSourceFormat:y?"AdaptiveCard":undefined}];return __assign(__assign(__assign({AnswerEntityRequests:pt,Cvid:p,LogicalId:w,Scenario:__assign({Name:vt},o||s||h?{Dimensions:__spreadArray(__spreadArray(__spreadArray([],o?[{DimensionName:"FormCode",DimensionValue:o}]:[],!0),s?[{DimensionName:"Muid",DimensionValue:s}]:[],!0),h?[{DimensionName:"ImpressionGuid",DimensionValue:h}]:[],!0)}:{}),TextDecorations:"Off",TimeZone:it?ft:"UTC"},ut&&{TimeZoneOffsetInMinutes:-1*(new Date).getTimezoneOffset()}),{Culture:nt}),rt&&{UICulture:et})}function h(t,i,f,e,o,s,h,c){var l=n.context.query,a=r(i,l,e,undefined,o,s,h,t,c),v=u(t,s,f);return __assign(__assign(__assign({},v),a),{WholePageRankingOptions:k()})}function c(n){return{AsyncEntityResolutionTokens:[n||""]}}function f(t){var i=n.context.query,r=t.entityId,f=t.intent,u=l(f);return!u?r||i||"*":"".concat(r||i," ").concat(u)}function l(n){switch(n){case"PersonCalendar":return"Events";case"PersonFiles":return"Files";case"PersonGroups":return"Groups";case"PersonOrgChart":return"Organization";case"PersonOffice":return"OfficeLocation";default:return undefined}}function a(t,r,u,f,e,o,s,h,c,l){var v=n.context,w=v.query,y=v.formCode,b=v.isVivaQnAAnswerEnabled,p=v.isGroupAnswerDisabled,a;if(!w)return["People"];switch(t&&t.intent){case"Acronym":return["Acronym"];case"Building":return["Building"];case"Qna":return["EditorialQnA"];case"Bookmark":return["Bookmark"];case"Person":case"PersonAlias":case"PersonCalendar":case"PersonDepartment":case"PersonEmail":case"PersonEduClasses":case"PersonFiles":case"PersonGroups":case"PersonOffice":case"PersonOrgChart":case"PersonOrgRelation":case"PersonPhone":case"PersonTitle":case"PersonCentricSearch":return["People"];case"Group":if(p)break;else return["Group"]}return a=__spreadArray(["Building","EditorialQnA","Bookmark","People","Acronym"],p?[]:["Group"],!0),r&&a.push("EmployeeOffer"),s&&a.push("EnterpriseLearning"),(o||l)&&a.push("EducationAssignment"),u&&a.push("Topic"),!f||y&&(y.toLowerCase()==="bfbbqf"||y.toLowerCase()==="bfbhas"||y.toLowerCase()==="annh01")||a.push("File"),(e||i(t&&t.intent))&&a.push("External"),h&&a.push("TuringQnA"),c&&a.push("PeopleAlsoAsk"),b&&a.push("QnA"),a}function i(n){return n==="External"}function v(n,t){return n&&t?"ItemId:".concat(n," OR label_title:").concat(t):t}function y(n){switch(n){case"File":case"Site":return n;case"FileAndSite":default:return"AllResults"}}function p(n,t){return t?"".concat(n," AND (").concat(t,")"):n}function e(t,i,r){return!t||r===undefined||r==null?i:r===n.ConnectorResultsExperience.INTERLEAVED}function w(t,r,u,f,h,c,l){var a=n.context,it=a.isAllEQTEnabled,rt=a.is3sDisplayQueryStringEnabled,ut=a.query,ft=a.isCustomRefinerPrefechEnabled,et=a.isConnectorInterleavingEnabled,ot=a.consumeAdminUXSettingForCRE,st=a.isSharePointResultsCustomizationEnabled,y=e(ot,et,l),w=rt?ut:r,b=f||10,k=[{EntityType:"File",From:0,Size:b,Query:{DisplayQueryString:w,QueryString:r,QueryTemplate:it?p(o(t),u):o(t)},Sort:[{Field:"PersonalScore",SortDirection:"Desc"}],Fields:g,IdFormat:0,ContentSources:t==="Site"?["SharePoint"]:["OneDriveBusiness","SharePoint"],ResultsMerge:{Type:"Interleaved"},EnableQueryUnderstanding:!1,EnableSpeller:!1,ExtendedQueries:[{SearchProvider:"SharePoint",Query:{Culture:d,EnableQueryRules:!1,TrimDuplicates:!1,BypassResultTypes:!0,ProcessBestBets:!1,ProcessPersonalFavorites:!1,EnableInterleaving:!1,EnableMultiGeo:!0,SourceId:"8413CD39-2156-4E00-B54D-11EFD9ABDB89"}}],HitHighlight:{HitHighlightedProperties:t==="Site"?["Title"]:["HitHighlightedSummary"],SummaryLength:200},Aggs:ft?s(h):undefined,PreferredResultSourceFormat:st?"AdaptiveCardTemplateBinding":undefined}],nt,tt;return t=="All"&&(nt=y?b:2,tt=__assign(__assign({},y&&{ResultsMerge:{Type:"Interleaved"}}),{BypassResultTypes:!1,EntityType:"External",From:0,Size:nt,PreferredResultSourceFormat:"AdaptiveCardTemplateBinding",Query:{DisplayQueryString:w,QueryString:i(c&&c.intent)?v(c===null||c===void 0?void 0:c.itemId,r):r},Sort:[{Field:"Score",SortDirection:"Desc"}],ContentSources:i(c&&c.intent)&&c.contentSource?[c.contentSource]:["Connectors"],HitHighlight:{HitHighlightedProperties:["HitHighlightedSummary"],SummaryLength:200}}),k.push(tt)),k}function b(t){var u=n.context,e=u.isNLFileSearchEnabled,i=u.isBingSpellerEnabled,f=u.isNLRecourseEnabled,o=u.isSharedSerpAllVerticalEnabled,r;return o?{EnableSuggestion:i,EnableAlteration:!0,SupportedRecourseDisplayTypes:["ServiceSideRecourseLink"]}:!e&&!i?undefined:(r=[],i&&(r.push("Suggestion"),r.push("NoResultModification")),f&&!t&&r.push("NoRequeryModification"),__assign({EnableSuggestion:i,EnableAlteration:!0},(i||f)&&{SupportedRecourseDisplayTypes:r}))}function k(){var t=n.context.isSharedSerpAllVerticalEnabled;return __assign(__assign(__assign({EnableEnrichedRanking:!0,SupportedSerpRegions:["MainLine","ContextRegion"]},t&&{EnableLayoutHints:t}),t&&{EntityResultTypeRankingOptions:[{ResultType:"Answer",MaxEntitySetCount:6},]}),t&&{SupportedRankingVersion:1})}function o(t){var r=n.context.culture,i;switch(t){case"File":i=nt;break;case"Site":i=tt;break;case"All":case"FileAndSite":default:i=it}return!r||(i=i.concat(n.strFormat(rt,r.toLowerCase()))),i}function s(t){if(!t)return undefined;var i={};return t.map(function(n){var t;((t=n.layout)===null||t===void 0?void 0:t.fieldName)&&(i["".concat(n.layout.fieldName)]={histogram:{field:n.layout.fieldName}})}),i}t.buildSubstrateQueryRequest=r;t.buildSubstrateSearchRequest=u;t.buildSubstrateUnifiedSearchRequest=h;t.buildSubstrateResolveEntitiesAsyncRequest=c;t.buildQueryWithIntent=f;t.isInterleavingEnabledFn=e;t.mapAllVerticalConfigRefiners=s;var d=1033,g=[".callerStack",".correlationId",".mediaBaseUrl",".spResourceUrl",".thumbnailUrl","AuthorOWSUSER","ContainerTypeId","ContentClass","ContentTypeId","Created","DefaultEncodingURL","DepartmentId","Description","DocId","EditorOWSUSER","FileExtension","FileType","Filename","GeoLocationSource","HitHighlightedSummary","IsContainer","IsHubSite","LastModifiedTime","LinkingUrl","ListID","MediaDuration","ModifiedBy","ParentLink","Path","PiSearchResultId","PictureThumbnailURL","ProgID","PromotedState","RelatedHubSites","SPWebUrl","SecondaryFileExtension","ServerRedirectedPreviewURL","ServerRedirectedUrl","SiteId","SiteLogo","SiteTemplateId","SiteTitle","Title","UniqueID","UniqueId","ViewCount","ViewsLifeTimeUniqueUsers","WebId","isDocument","isexternalcontent","ListTemplateTypeId","PrivacyIndicator"],nt="({searchterms}) (NOT (Title:OneNote_DeletedPages OR Title:OneNote_RecycleBin) AND NOT SecondaryFileExtension:onetoc2 AND NOT FileExtension:vtt AND NOT ContentClass:ExternalLink AND NOT (ContentClass:STS_List_DocumentLibrary AND SiteTemplateId:21) AND NOT ((filetype:aspx OR filetype:htm OR filetype:html OR filetype:mhtml)) AND isDocument:1 OR ((ContentTypeId:0x010100F3754F12A9B6490D9622A01FE9D8F012 OR ContentTypeId:0x0120D520A808*) OR (SecondaryFileExtension:wmv OR SecondaryFileExtension:avi OR SecondaryFileExtension:mpg OR SecondaryFileExtension:asf OR SecondaryFileExtension:mp4 OR SecondaryFileExtension:ogg OR SecondaryFileExtension:ogv OR SecondaryFileExtension:webm OR SecondaryFileExtension:mov)) OR (FileType:bmp OR FileType:gif OR FileType:ico OR FileType:jpeg OR FileType:jpg OR FileType:png OR FileType:svg OR FileType:tiff OR FileType:tif OR FileType:heic) OR (ContentTypeId:0x012000*)) AND NOT (ContentTypeId:0x0101009D1CB255DA76424F860D91F20E6C4118* AND PromotedState:2)",tt="({searchterms}) (ContentClass:STS_Site OR ContentClass:STS_Web) AND NOT (ContentClass:STS_Site AND SiteTemplateId:21) AND NOT (ContentClass:STS_Site AND SiteTemplateId:22) AND NOT WebTemplate:SPSPERS AND NOT (Title:OneNote_DeletedPages OR Title:OneNote_RecycleBin)",it='({searchterms}) (NOT ContentClass:ExternalLink AND NOT FileExtension:vtt AND NOT (Title:OneNote_DeletedPages OR Title:OneNote_RecycleBin) AND NOT SecondaryFileExtension:onetoc2 AND NOT (ContentClass:STS_List_544 OR ContentClass:STS_ListItem_544) AND NOT WebTemplate:SPSPERS AND NOT (ContentClass:STS_Site AND SiteTemplateId:21) AND NOT (ContentClass:STS_Site AND SiteTemplateId:22) AND NOT (ContentClass:STS_List_DocumentLibrary AND SiteTemplateId:21) AND NOT (ContentClass:STS_List_DocumentLibrary AND Author:"system account"))',rt=" AND (SPTranslationLanguage:{0} OR (NOT SPTranslatedLanguages:{0} AND NOT SPIsTranslation:true))"})(i=t.Midgard||(t.Midgard={}))})(t=n.Service||(n.Service={}))}(BingAtWork||(BingAtWork={}));__assign=this&&this.__assign||function(){return __assign=Object.assign||function(n){for(var t,r,i=1,u=arguments.length;i<u;i++){t=arguments[i];for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},__assign.apply(this,arguments)};__spreadArray=this&&this.__spreadArray||function(n,t,i){if(i||arguments.length===2)for(var r=0,f=t.length,u;r<f;r++)!u&&r in t||(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))},function(n){function ot(t){return n.includes(ri,t)||n.includes(ui,t)}function hi(){return ut&&ft?"WsbBingVertical":ut?"BingVertical":ft?"Wsb":"Bing"}function vi(n,t,i){return!n||i===undefined||i==null?t:i===c.INTERLEAVED}function d(){var t=n.context,u=t.prefetchTenantSettings,f=t.prefetchUserConfigs,e=t.prefetchVerticalConfigs,o=t.useSubstrateUnifiedSearch,s=t.isOnWorkVertical,h=t.isContextRegionRankingEnabled,c=t.prefetchTenantFeedbackToken,a=t.isPrefetchNotificationsEnabled,v=t.prefetchNotificationsDelayTimeMs,i;fi||(i=n.getSessionStorage("BingAtWorkConversationId",5e3),i&&(n.context.conversationId=i));u&&g();ei&&(tr(),l());f&&nt();n.isMainlineAnswerPreExpanded=!1;o||nr();e&&s&&gi();c&&wi();a&&sj_evt.bind("OnScriptLoad:BingAtWork:BfbMidgardAsyncBundle",function(){n.userDataVNextClient=n.Service.UserDataVNextClient?new n.Service.UserDataVNextClient(r):null;setTimeout(br,v)},!0,null,!0);h&&pr()}function o(t,i,r,u){var f=function(){var u="bfb".concat(t,"Token"),f="bfb".concat(t,"TokenFailed"),v="bfb".concat(t,"TokenStarted"),c=n.context,y=c.isMFARedirectEnabled,p=c.signInLinkFormat,e,o,l,a;if(n.tokenPrefetchesStarted[t]){i?(i.onSuccess&&sj_evt.bind(u,function(n){return n&&n[1]&&i.onSuccess(n[1])},!0,null,!0),i.onError&&sj_evt.bind(f,function(n){return n&&n[1]&&i.onError(n[1],n[2],n[3])},!0,null,!0)):r&&(r.onSuccess&&(e=function(i){i&&i[1]&&r.onSuccess(i[1]);sj_evt.unbind(u,e)},sj_evt.bind(u,e,!0,null,!0)),r.onError&&(o=function(i){i&&i[1]&&r.onError(i[1],i[2],i[3]);sj_evt.unbind(f,o)},sj_evt.bind(f,o,!0,null,!0)));return}n.tokenPrefetchesStarted[t]=!0;l=s(u,f,h,i);a={onSuccess:function(n){r&&r.onSuccess&&r.onSuccess(n)},onError:function(t,i,f){var o,e;try{e=f&&JSON.parse(f);y&&i===403&&e&&e.error&&e.error.message&&e.error.message.indexOf("MFA required")>-1&&(n.whenWebTelemetryExists(function(){return bfbTel.logDiag("Fetch token fail: ".concat(u," requires MFA Redirect"))}),sj_evt.bind("OnScriptLoad:BingAtWork:BfbMidgardAsyncBundle",function(){return n.redirectToMFASignIn(p)},!0,null,!0))}catch(s){o=s}n.whenWebTelemetryExists(function(){return bfbTel.logDiag("Fetch token fail: ".concat(u),{reason:i,error:o})});r&&r.onError&&r.onError(t,i,f)}};sj_evt.fire(v,n.getStartedEventDetails());n.withLocalStorageCache(u,function(i){n.tokenClient.getToken(h,i,t)},l,a,function(n){return new Date(n.tokenExpiry)},!0)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("fetchToken",f,u):f()}function yi(){o("PowerApp",undefined,undefined,"caller: fetchPowerAppToken, file: PreContentMidgard");n.isPowerAppTokenPrefetchStarted=!0}function pi(t){o("Loki",undefined,t,"caller: fetchLokiToken, file: PreContentMidgard");n.isLokiTokenPrefetchStarted=!0}function wi(){o("TenantFeedback",undefined,undefined,"caller: fetchTenantFeedbackToken, file: PreContentMidgard");n.isTenantFeedbackTokenPrefetchStarted=!0}function l(t,i){var r=n.context.isSendingTokenToSWEnabled,u=r?t&&{onSuccess:function(i){(t===null||t===void 0?void 0:t.onSuccess)&&t.onSuccess(i);ct(function(){n.ServiceWorkerClient.Messaging.sendMessage({type:"SUBSTRATE_TOKENS",token:i.token,tokenExpiry:i.tokenExpiry,provider:"onAutoRefreshResponse"})})},onError:t===null||t===void 0?void 0:t.onError}:t;o("Substrate",u,i,"caller: fetchSubstrateToken, file: PreContentMidgard");n.isSubstrateTokenPrefetchStarted=!0}function ct(n){var t=function(){n();sj_evt.unbind("OnScriptLoad:BingAtWork:BfbServiceWorkerClientBundle",t)};sj_evt.bind("OnScriptLoad:BingAtWork:BfbServiceWorkerClientBundle",t,!0,null,!0)}function bi(t){var r=t===null||t===void 0?void 0:t.verticalConfigs,u=n.find(r,function(n){return n.id.toLocaleLowerCase()==="all"}),i=u||{includedConnectorResults:!1,extendedQueryTemplate:undefined,refiners:undefined},f=i.includeConnectorResults,e=i.extendedQueryTemplate,o=i.refiners,s=i.CRE;lt(f,e,o,s)}function ki(n,t,i,r){return!i||r===undefined||r==null?n||t:r!==c.NONE}function lt(t,i,r,u){var f=n.context,l=f.isProactiveSearchEnabled,v=f.useSubstrateUnifiedSearch,y=f.query,p=f.isOnWorkVertical,w=f.isSubstrateSplittedBuilderEnabled,b=f.consumeAdminUXSettingForCRE,k=f.isConnectorInterleavingEnabled,s,h,e,o,c;n.getLoweredWorkSerpVerticalDomain(n.context)==="all"&&((s=p&&!y,s)||(h=ki(t,k,b,u),e=!n.isHostIE()&&h?"All":"FileAndSite",v?l||vt(e,i,undefined,undefined,r,u):(o=a(),c=w?n.Service.Substrate.buildQueryWithIntent(o):n.Service.Midgard.buildQueryWithIntent(o),bt(e,c,null,i,null,u))))}function g(t){var i=n.context.prefetchTenantSettings;i&&n.tenantSettingsClient.getTenantSettings(undefined,t)}function at(){var t=n.context.isFetchOnTenantSettingsReceived;return t?{onSuccess:function(n){return bi(n===null||n===void 0?void 0:n.tenantSettings)}}:undefined}function nt(t){var i=n.context.prefetchUserConfigs;i&&n.userConfigsClient.loadUserConfigs(t)}function di(){var t=n.context,f=t.setUserConfigPrefetchRequestValue,e=t.requestEduSettingsInUserConfig,o=t.isUserMailboxInfoEnabled,i=["ServiceSettings","ECS","LicenseSettings"],u;return o&&i.push("ExchangeAccountSettings"),e&&i.push("EduSettings"),u={clientContext:h.clientContext,requiredConfigs:i,optionalConfigs:r.userConfigsOpsDisabled?[]:["OfficePolicySettings"]},f&&(n.userConfigsPrefetchRequest=u),u}function gi(){var i=n.context,u=i.isThorProxyEnabled,f=i.isGetVerticalConfigFromTenantSettingsEnabled,r=u?n.thorProxyClient:n.lokiClient,t;r&&!f&&(t=function(){var t=s("bfbVerticalConfig","bfbVerticalConfigFailed",undefined,undefined);r.getVerticalConfigs(t);sj_evt.fire("bfbVerticalConfigStarted",n.getStartedEventDetails());n.isVerticalConfigPrefetchStarted=!0},(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("fetchVerticalConfig",t):t())}function nr(){function t(t,i){n.substrateSearchClient.search(t,{onSuccess:function(t,r,u){var f=n.removeDisabledAnswersFrom3sResponse?n.removeDisabledAnswersFrom3sResponse(t):t;n.removeDisabledAnswersFrom3sResponse||!n.context.isWebGroupAnswerDisabledClientSide||n.context.isOnWorkVertical||n.whenWebTelemetryExists(function(){return bfbTel.logErr(n.EventScope.BingAtWork,"PreContentMidgardWeb: failed to remove groups","Group answer disabled client side on web vertical but unable to remove because removeDisabledAnswersFrom3sResponse is not yet defined","ClientError")});i.onSuccess(f,r);sj_evt.bind("OnScriptLoad:BingAtWork:BfbMidgardAsyncBundle",function(){return n.stabilityShadow(u)},!0,null,!0)},onError:i.onError},"bfbSubstrateSearchStarted",y(!0),p(!0));n.substrateSearchPrefetchRequest=t}var i=n.context.isSubstrateSplittedBuilderEnabled;pt("bfbSubstrateSearch","bfbSubstrateSearchFailed",i?n.Service.Substrate.buildSubstrateAnswerRequest:n.Service.Midgard.buildSubstrateSearchRequest,t,function(t,i){var r=n.removeDisabledAnswersFrom3sResponse?n.removeDisabledAnswersFrom3sResponse(i):i;n.removeDisabledAnswersFrom3sResponse||!n.context.isWebGroupAnswerDisabledClientSide||n.context.isOnWorkVertical||n.whenWebTelemetryExists(function(){return bfbTel.logErr(n.EventScope.BingAtWork,"PreContentMidgardWeb: failed to remove groups","Group answer disabled client side on web vertical but unable to remove because removeDisabledAnswersFrom3sResponse is not yet defined","ClientError")});v(n.Service.Midgard.getRequestQuery(t),r,!1)})}function tr(){var t=n.context,i=t.onlyReturn3sInProactiveSearch,r=t.isFixingRankingProcess;sj_evt.bind("bfbProactiveSearch",function(t){var f,e;try{var o=n.context,c=o.authorized,l=o.aadUserId,a=t[1],y=t[2],p=t[3],w=(y||{}).Query,s=a||{},h=s.searchResponse,u=s.tenantSettingsResponse,b=n.removeDisabledAnswersFrom3sResponse?n.removeDisabledAnswersFrom3sResponse(h):h;if(n.removeDisabledAnswersFrom3sResponse||!n.context.isWebGroupAnswerDisabledClientSide||n.context.isOnWorkVertical||n.whenWebTelemetryExists(function(){return bfbTel.logErr(n.EventScope.BingAtWork,"PreContentMidgardWeb: failed to remove groups","Group answer disabled client side on web vertical but unable to remove because removeDisabledAnswersFrom3sResponse is not yet defined","ClientError")}),f=u===null||u===void 0?void 0:u.tenantSettings,r&&v(w,b,!1),!i){if(si&&u)if(f.verticalConfigs==undefined||f.verticalConfigs.length==0)c&&l&&(e=f.verticalConfigs==undefined?"verticalConfigs is missing.":"verticalConfigs is empty.",n.whenWebTelemetryExists(function(){return bfbTel.logErr(n.EventScope.BingAtWork,"PreContentMidgard: ProactiveSearchResponse - TenantSettings missing valid verticalConfigs","".concat(e," - Won't save to localStorage"),"ClientError")}));else{var k="bfbTenantSettings"+oi,d="".concat(n.localStorageCacheKeyPrefix).concat(k),g=new Date(Date.now()+n.Service.SeverSideCachedVerticalConfigExpirationInSeconds);setTimeout(function(){return n.setItemForLocalStorage(d,"".concat(g.getTime(),";").concat(JSON.stringify(u)))},0)}n.tenantSettingsClient.broadcast(u===null||u===void 0?void 0:u.tenantSettings,u===null||u===void 0?void 0:u.user,p,!0)}}catch(nt){n.whenWebTelemetryExists(function(){return bfbTel.logErr(n.EventScope.BingAtWork,"PreContentMidgard: handleProactiveSearchResponse - Failed to handle proactive search response","".concat(n.getSanitizedCallStack(JSON.stringify(nt))),"ClientError")})}},!0,undefined,!0)}function ir(t,i,r){r&&yt();n.substrateSearchClient.warmUp(s,t,i)}function vt(t,i,r,u,f,e,o){function s(i,u){n.substrateSearchClient.search(i,{onSuccess:function(t,i,r,f){u.onSuccess(t,i,undefined,f);sj_evt.bind("OnScriptLoad:BingAtWork:BfbMidgardAsyncBundle",function(){return n.stabilityShadow(r)},!0,null,!0)},onError:u.onError},"bfbSubstrateUnifiedSearchStarted",y(!1,t,e),p(!1,t,r));n.substrateUnifiedSearchPrefetchRequest=i}u==="wsb.ux.workserp"&&yt();var h=n.context.isSubstrateSplittedBuilderEnabled;pt("bfbSubstrateUnifiedSearch","bfbSubstrateUnifiedSearchFailed",h?n.Service.Substrate.buildSubstrateUnifiedSearchRequest:n.Service.Midgard.buildSubstrateUnifiedSearchRequest,s,function(t,i){return v(n.Service.Midgard.getRequestQuery(t),i,!1)},t,null,i,u,f,e,o)}function yt(){n.tokenPrefetchesStarted={};n._localStoragePendingAutoRefreshes={};n._localStorageAutoRefreshHandlersBacklog={};n._localStorageOneOffHandlersBacklog={}}function pt(t,i,r,u,f,e,o,h,c,l,v,y){var w=n.context.isNLRecourseEnabled,p=function(){var p=a(),k=p.isNLOptedOut=="true",o,b;p&&(o=r(p,e,y,h,w&&k,c,l,v),b=s(t,i,o,{onSuccess:function(n){return f(o,n)}}),u(o,b))};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("search",p,o):p()}function a(){var i=n.context.requeryParams,t={},r;try{i&&(t=JSON.parse(i))}catch(u){}return r=t.isNLOptedOut=="true",__assign(__assign({},t),{isNLOptedOut:r.toString()})}function s(t,i,r,u,f){var e=n.context.isProcessEmptyResponse;return{onSuccess:function(i,o,s,h){if(e||i){var c=f?f(i):i;if(sj_evt.fire(t,c,r,o,s,n.getSucceededEventDetails(c,o,s),{isCachedResponse:h}),u&&u.onSuccess)u.onSuccess(i)}},onError:function(r,f,e){if(sj_evt.fire(i,r,f,e,n.getFailedEventDetails(r,f)),u&&u.onError)u.onError(r,f,e)}}}function rr(t,i,r,u,f){return(t&&t.toUpperCase()===li||i&&i.toString()===n.QueryIntent[n.QueryIntent.TechHelp])&&r==="Carousel"&&u==="Bookmark"&&f==="Hero"}function ur(){var i=n.context,r=i.isMainlineRankingEnabled,u=i.disableMainlineRankingOnRequery,t=a();return r?u?t&&t.intent?!1:!0:!0:!1}function v(t,i,r){var s=n.context,g=s.isPowerAppsEnabled,nt=s.preExp,it=s.isRbnPlacementEnabled,rt=s.formCode,ut=s.isWebGroupAnswerDisabledClientSide;n.substrateSearchPrefetchEndTime=new Date;var h=n.Service.Midgard.getFirstAnswerEntitySet(i),u=n.Service.Midgard.getRankingPlacement(i),ft=n.Service.Midgard.getRankingCardType(i),c=h||{Rank:undefined,EntityType:undefined,AsyncEntityResolutionToken:undefined,ResultSets:undefined},a=c.Rank,f=c.EntityType,l=c.AsyncEntityResolutionToken,v=c.ResultSets,y=(v&&v[0]||{Results:undefined}).Results,e=(y&&y[0]||{Source:undefined}).Source,p=e&&e.rankingScore&&e.rankingScore.score,w=e&&e.entityType,b=a&&a.Confidence,et="handleSubstrateSearchResponse: AsyncEntityResolutionToken is not a valid JSON, AnswerEntitySets[0] is: ".concat(JSON.stringify(h)),ot=(l&&n.tryParseJson(l,et)||{processedQuery:undefined}).processedQuery,st=f==="Group"||f==="People"&&e.PeopleType==="Group",ht=ut&&st,o=fr(u,it,ht),ct=rr(rt,null,u,f,ft),k=ur(),lt=n.context.isLowConfGleamSnrMobileEnabled,at=n.context.isFirstPageOnWebSerp,d=u=="Suppress"&<&&at;if(r){tt(o);k?wt(o,u,p,!0,f,!!h,t,b,w):d&&n.Ribbon.dynamicShowLCG(u,!0);return}or(u,er(f),ot,t,l);g&&n.Service.Midgard.containsPowerApp(i)&&yi();nt&&(ct?n.Mainline.showAndPreExpand(u,"RightRail",o,f):k?wt(o,u,p,!1,f,!!h,t,b,w):d?n.Ribbon.dynamicShowLCG(u,!1):n.Mainline&&n.Mainline.showAndPreExpand(u,"Pole",o,f));tt(o)}function tt(t){var f=n.context.isShowScopeDotOnRankingEnabled,r,i,u;f&&t!="Low"&&(r=_d.getElementsByClassName("bw-ScopeItemIconDot"),r&&r.length>0&&(i=r[0],i.classList&&i.classList.length>0?i.classList.remove("bw-ScopeItemHide"):(u=i.getAttribute("class").split(" "),i.setAttribute("class",u.filter(function(n){return n!=="bw-ScopeItemHide"}).join(" "))),n.whenLocStringsAvailable(function(){var r=n.Strings?n.Strings.ScopeTabDotAriaLabel:undefined,u,t;r&&i&&i.id&&(u=_ge(i.id),t=u.parentElement,t&&(t.setAttribute("aria-label",r),t.setAttribute("role","contentinfo")))})))}function wt(t,i,r,u,f,e,o,s,h){var c=n.context,l=c.isMainlineRankingFallbackEnabled,p=c.webConfidenceResponseTimeoutInMs,a=c.mobile,v=null,y=function(){l&&sb_ct(v);var c=n.MainlineRanking.wprContext.xapWorkConfidence;a?n.Ribbon.dynamicShow(n.MainlineRanking.wprContext,t,r,u,f,e,o,s,h):n.Mainline.dynamicShowAndPreExpand(n.MainlineRanking.wprContext,t,i,r,u,f,e,o,s,h)};l&&(v=sb_st(function(){sj_evt.unbind("bfbMainlineRankingStarted",y);sj_evt.fire("bfbMainlineRankingFailed");a?n.Ribbon.show("Pole",t):n.Mainline.showAndPreExpand(i,"Pole",t,f)},p));tt(t);sj_evt.bind("bfbMainlineRankingStarted",y,!0,null,!0)}function fr(n,t,i){if(i)return"Low";switch(n){case"Carousel":return"High";case"Ribbon":return t?"Medium":"Low";case"RichRibbon":return"Medium";case"Suppress":default:return"Low"}}function er(t){var i=n.context,r=i.isAdaptiveSupportEnabled,u=i.isSubstrateAsyncEnabled;switch(t){case"Acronym":case"Bookmark":case"Building":case"Conversation":case"EmployeeOffer":case"File":case"Group":case"EnterpriseLearning":case"Site":return t;case"External":return r&&u?t:undefined;case"EditorialQnA":return"Qna";case"Event":return"Calendar";case"People":return"Person";default:return undefined}}function or(t,i,r,u,e){var o=function(){var c=n.context,a=c.isVerticalEnabled,v=c.isOnWorkVertical,y=t==="Carousel",h,o,s,l;if(a)v?sr(i,r,u,e):hr(t,i,r,e);else if(y)for(h=n.context.prefetchAsyncDomains||[],o=0;o<h.length;o++)s=h[o],l=i===s||s==="FileAndSite"&&(i==="File"||i==="Site"),f(s,l&&r||u,e)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("prefetchAsyncResults",o):o()}function sr(t,i,r,u){var e=n.context.isNLFileSearchEnabled;ot(t)&&(e?(t!=="File"&&f(t,i,u),t==="Site"&&f("File",r,u)):(f(t,i,u),(t==="File"||t==="Site")&&f(t==="File"?"Site":"File",r,u)))}function hr(n,t,i,r){n==="Carousel"&&ot(t)&&f(t,i,r)}function f(t,i,r,u){var f=n.context.substratePrefetchAsyncDomain;n.includes(f,t)&&bt(t,i,r,null,u)}function y(t,i,r){var f=n.context,a=f.isWebSWAcronymsEnabled,s=f.mtCfg,v=f.useSubstrateSearchFeaturesHeader,y=f.isSubstrateFileEntityEnabled,p=f.muid,w=f.isBingSpellerEnabled,b=f.isBingSpellerV2Enabled,e=f.formCode,k=f.isSharedSerpAllVerticalEnabled,d=f.isConnectorInterleavingEnabled,h=f.consumeAdminUXSettingForCRE,g=f.isVivaQnAAnswerEnabled,nt=f.isSharePointResultsCustomizationEnabled,o={},u,l;return t&&(!y||e&&(e.toLowerCase()==="bfbbqf"||e.toLowerCase()==="bfbhas"||e.toLowerCase()==="annh01")||s.flights.push("bfbfileansoff"),o["X-Client-UserId"]=p),u=v?__spreadArray([],s.flights,!0):[],t||(l=vi(h,d,r),w&&u.push("EnableBingSpeller"),b&&u.push("EnableNoResultForMsb"),i==="All"&&(u.push("ConnectorExternalSearchFlight"),u.push("ShouldEnableDefaultModernResultTypes")),a&&u.push("msbWebSWAcr"),k&&u.push("UseAdaptiveCardTemplates"),l&&(u.push("ConnectorInterleaving"),h&&r&&r===c.INTERLEAVED&&u.push("EnableConnectorsInterleavingGA")),g&&(u.push("MsbMopAnsNoPlRc"),u.push("msbMopBopEma")),nt&&u.push("EnableSPCustomizationInCustomVertical")),u.length>0&&(o["X-Client-Flights"]=u.toString()),o["X-Client-LocalTime"]=(new Date).toISOString(),o}function p(t,i,r){var f=n.context,o=f.useSubstrateUnifiedSearch,s=f.isEduAssignmentESEnabled,h=f.isExternalAnswersFlagsEnabled,c=f.isLearningAnswerEnabled,l=f.isMV9FileAnswerModelEnabled,a=f.isSharedSerpAllVerticalEnabled,v=f.isFederationSearchEnabled,y=f.isNew3sSdkEnabled,e={},u=[];return t||(i==="All"&&(u.push("EnableServerSideWholePageRelevance"),u.push("ResultClusterArbitration")),(o||r)&&(u.push("EnableWholePageRankingPlugin"),u.push("SingleCallRequest"))),a&&u.push(["lufilev2"]),h&&(u.push("EnableExternalAnswersFlight"),u.push("EnableConnectorAnswersQas")),v&&u.push("EnableAssistantSearch"),s&&u.push("EnableAssignmentES"),c&&u.push("msbemplrng"),l&&u.push("luqasfilestest"),y&&u.push("querymicroservice"),u.length>0&&(e.setflight=u.toString()),e}function bt(t,i,r,u,f,e){var o=n.context,c=o.isAdaptiveSupportEnabled,l=o.isSubstrateAsyncEnabled,v=o.isNLRecourseEnabled,h=o.isSubstrateSplittedBuilderEnabled,w=a(),b=w.isNLOptedOut=="true";sj_evt.bind("OnScriptLoad:BingAtWork:BfbMidgardAsyncBundle",function(){var o=function(){var w,nt=h?n.Service.Substrate.buildSubstrateResolveEntitiesAsyncRequest:n.Service.Midgard.buildSubstrateResolveEntitiesAsyncRequest,tt=h?n.Service.Substrate.buildSubstrateQueryRequest:n.Service.Midgard.buildSubstrateQueryRequest,d=c&&l&&t==="External",o=d?nt(r):tt(t,i,u,f,v&&b),a="bfbSubstrateAsync_".concat(t),g=s(a,a+"_Failed",o),k;k={onSuccess:function(n,t){return g.onSuccess(n,t)},onError:g.onError};d?n.substrateSearchClient.searchResolveEntitiesAsync(o,k,a+"_Started",y(!1,t,e),p(!1,t)):n.substrateSearchClient.search(o,k,a+"_Started",y(!1,t,e),p(!1,t));n.substrateAsyncDomainPrefetchRequest=__assign(__assign({},n.substrateAsyncDomainPrefetchRequest),(w={},w[t]=o,w))};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("substrateSearchAsyncDomain",o):o()},!0,null,!0)}function cr(){var t=n.context,i=t.authorized,r=t.dataFetchEnabled;r&&(i?d():n.bindForAad(d))}function lr(){var i,r,o;t=(i={},i.bfbSubstrateToken={},i.bfbPowerAppToken={},i.bfbLokiToken={},i.bfbTenantFeedbackToken={},i.bfbTenantSettings={},i.bfbUserConfigs={},i.bfbGetNotifications={},i.bfbSubstrateWarmup={},i.bfbSubstrateSearch={},i.bfbProactiveSearch={},i.bfbSubstrateUnifiedSearch={},i.bfbVerticalConfig={},i.bfbAsync_Conversation={},i.bfbSubstrateAsync_File={},i.bfbSubstrateAsync_Site={},i.bfbSubstrateAsync_FileAndSite={},i.bfbSubstrateAsync_All={},i.bfbSubstrateAsync_External={},i.bfbUpdateNotifications={},i.bfbLcgNotificationDomains={},i);var c=["bfbProactiveSearchStarted",],f="started",s="failed",h=function(n){var i;b?sj_evt.fire("bfbEventLogs",(i={},i[n]=t[n],i)):w[n]=t[n]};["bfbSubstrateTokenStarted","bfbSubstrateToken","bfbPowerAppToken","bfbPowerAppTokenStarted","bfbLokiToken","bfbLokiTokenStarted","bfbTenantFeedbackToken","bfbTenantFeedbackTokenStarted","bfbTenantSettingsStarted","bfbTenantSettings","bfbUserConfigsStarted","bfbUserConfigs","bfbGetNotifications_Started","bfbGetNotifications","bfbSubstrateWarmupStarted","bfbSubstrateWarmup","bfbStabilityShadowStarted","bfbStabilityShadow","bfbSubstrateSearchStarted","bfbSubstrateSearch","bfbProactiveSearchStarted","bfbProactiveSearch","bfbSubstrateUnifiedSearchStarted","bfbSubstrateUnifiedSearch","bfbVerticalConfig","bfbVerticalConfigStarted","bfbAsync_Conversation_Started","bfbAsync_Conversation","bfbSubstrateAsync_File_Started","bfbSubstrateAsync_File","bfbSubstrateAsync_Site_Started","bfbSubstrateAsync_Site","bfbSubstrateAsync_FileAndSite_Started","bfbSubstrateAsync_FileAndSite","bfbSubstrateAsync_All_Started","bfbSubstrateAsync_All","bfbSubstrateAsync_External_Started","bfbSubstrateAsync_External","bfbUpdateNotifications","bfbUpdateNotifications_Started","bfbLcgNotificationDomains","bfbLcgNotificationDomainsStarted",].forEach(function(i){var r=function(u){var v,s,l,o,a,y;if(e&&!e[i]){if(i==="bfbTenantSettings"&&(v=u[4],v))return;s=performance.now();l=new Date;e[i]=String(s);o=i;a=!1;i.toLowerCase().indexOf(f)>-1&&(o=i.slice(0,-(f.length+(i.toLowerCase().indexOf("_".concat(f))>-1?1:0))),a=!0);t[o]&&(o===i?(t[o].endTime=l,t[o].endTimeStartDuration=s,t[o].response=u[1]&&JSON.stringify(u[1]),t[o].headers=u[3]&&u[3],t[o].status=200,t[o].isFromCache=u[4]&&u[4],h(o)):a&&(n.includes(c,i)?(y=function(n){var i,r;t[o].startTime=(i=n[1])===null||i===void 0?void 0:i.startTime;t[o].startTimeStartDuration=(r=n[1])===null||r===void 0?void 0:r.startTimeStartDuration},sj_evt.bind(i,y,!0,null,!0)):(t[o].startTime=l,t[o].startTimeStartDuration=s)))}sj_evt.unbind(i,r)};sj_evt.bind(i,r,!0,undefined,!0)});["onPP","onHTML","onP1Lazy","onP1","bfbPreExpanded",].forEach(function(t){var i=function(){if(u&&!u[t]){var r=performance.now(),f=new Date;u[t]=String(r)}sj_evt.unbind(t,i)};sj_evt.bind(t,i,!0,undefined,!0)});["bfbSubstrateTokenFailed","bfbPowerAppTokenFailed","bfbLokiTokenFailed","bfbTenantFeedbackTokenFailed","bfbTenantSettingsFailed","bfbUserConfigsFailed","bfbGetNotifications_Failed","bfbSubstrateSearchFailed","bfbProactiveSearchFailed","bfbSubstrateUnifiedSearchFailed","bfbSubstrateWarmupFailed","bfbVerticalConfigFailed","bfbAsync_Conversation_Failed","bfbSubstrateAsync_File_Failed","bfbSubstrateAsync_Site_Failed","bfbSubstrateAsync_FileAndSite_Failed","bfbSubstrateAsync_All_Failed","bfbSubstrateAsync_External_Failed","bfbUpdateNotifications_Failed","bfbLcgNotificationDomainsFailed"].forEach(function(i){var r=function(u){var o,c,f;e&&!e[i]&&(o=performance.now(),c=new Date,e[i]=String(o),f=i.slice(0,-(s.length+(i.toLowerCase().indexOf("_".concat(s))>-1?1:0))),t&&t[f]&&(t[f].endTime=c,t[f].endTimeStartDuration=o,t[f].error=u[1]&&String(u[1]),t[f].status=u[2]&&u[2],h(f)));sj_evt.unbind(i,r)};sj_evt.bind(i,r,!0,undefined,!0)});r=function(){b||(b=!0,w&&sj_evt.fire("bfbEventLogs",w));_w.removeEventListener("beforeunload",r)};sb_st(function(){return r()},1e3);_w.addEventListener("beforeunload",r);o=function(n){u&&(u.S=n,u.ThrottleRecord=yr(),sj_evt.fire("bfbEventTimes",u),u=undefined)};sb_st(function(){return o("timeout")},8e3);_w.addEventListener("beforeunload",function(){return o("beforeunload")})}function kt(){sj_evt.bind("aad:signedin",function(){g();nt()},!0,null,!0)}function dt(){sj_evt.bind("autoSugLoaded",function(){var t=n.context.authorized;t&&l()},!0,null,!0)}function gt(t){var i=function(){for(var i=n.qfResources,t=0;t<i.length;++t)n.injectScript(i[t],!n.context.authorized)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("injectMsbQfScript",i,t):i()}function it(t){var i=function(){function c(n){sj_evt.fire("bfbVerticalCriticalMidgardResFailed",n)}function t(){var t,o;if(u){if(clearTimeout(f),e)return;e=!0}var i=n.midgardResources,s=n.qfResources,r=n.criticalMidgardResources;for(t=0;t<i.length;++t)n.context.isQfScriptEarlyLoadInWsb&&ht&&s.indexOf(i[t])>-1||(o=r&&r.indexOf(i[t])>-1?c:null,n.injectScript(i[t],!n.context.authorized,o));st=!0;n.bindForAad(n.loadScriptsOnDemand)}n.prefetchStartTime=new Date;lr();var s=n.context.query,r=n.context.isOnWorkVertical,h=r&&!s,u=n.context&&n.context.srchB4js&&(!r||n.getLoweredWorkSerpVerticalDomain(n.context)==="all"&&!h),f,e=!1;if(u){function i(t){n.forEach(["bfbSubstrateSearchStarted","bfbSubstrateUnifiedSearchStarted","bfbProactiveSearchStarted"],function(n){t?sj_evt.bind(n,o,!0,null,!0):sj_evt.unbind(n,o)})}function o(){n.context.srchB4jsAni?requestAnimationFrame(t):setTimeout(t,0);i(!1)}i(!0);f=sb_st(function(){i(!1);t()},ai)}else t();n.isHostIE()||ct(function(){n.ServiceWorkerClient.initialize({enableInstrumentation:n.context&&n.context.isSWLoggingEnabled})});cr();kt();dt();sj_evt.bind("ajax.unload",function(){n.substrateSearchPrefetchRequest=null;n.substrateUnifiedSearchPrefetchRequest=null;n.prefetchAsyncDomainRequests={};n.substrateAsyncDomainPrefetchRequest={};n.tokenPrefetchesStarted={}},!0,null,!0);sj_evt.bind("ajax.load",function(){kt();dt();var t=n.context.authorized;t&&l()},!0,null,!0)};(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("preContentMidgardEntry",i,t):i()}function ar(){if(!n.isLocalStorageSupported())return!1;var t=Number(localStorage.getItem(k));return!!t&&!window.isNaN(t)&&t+ci>(new Date).getTime()}function vr(t){n.isLocalStorageSupported()&&(t?localStorage.setItem(k,String(t.getTime())):localStorage.removeItem(k))}function yr(){var t=n.getThrottleRecords();return t&&JSON.stringify(t)}function pr(){var t=function(){var i=n.ContextRegionRanking.wprContext.xapEntityPaneAnswerPlaced;i&&(sj_evt.fire("bfbContextRegionRankingSucceeded"),n.Mainline.showOrHideContextRegionAnswer());sj_evt.unbind("bfbContextRegionRankingStarted",t)};sj_evt.bind("bfbContextRegionRankingStarted",t,!0,null,!0)}function wr(t){var i=function(n){return t.indexOf(n)!==-1};return n.find(n.midgardResources,i)||n.find(n.retryMidgardResources,i)}function br(){var o=r.isMobile,t=n.context,a=t.culture,i=t.formCode,s=t.query,v=t.miniSerp,u=h.clientContext.clientType,c,l,e;if(n.userDataVNextClient&&!v&&(u=="Bing"||u=="BingVertical"||u=="WsbBingVertical")){c=u=="Bing"?o?"MobileSerp":"Serp":o?"MobileVertical":"Vertical";var y=(i===null||i===void 0?void 0:i.toLowerCase())==="msbfre",p={browserName:n.getBrowserName(),browserVersion:n.getBrowserVersion()},f={placement:c,locale:a,forceFormNotifications:y,formCode:i,clientInfo:p};n.notificationsPrefetchRequest=f;s&&(f.query=s);l={onSuccess:function(t){n.userDataVNextClient===null||n.userDataVNextClient===void 0?void 0:n.userDataVNextClient.broadcast(t)},onError:function(t,i,r){sj_evt.fire("bfbGetNotifications_Failed",t,i,r,n.getFailedEventDetails(t,i))}};e=function(){n.userDataVNextClient||(n.userDataVNextClient=new n.Service.UserDataVNextClient(r));n.userDataVNextClient===null||n.userDataVNextClient===void 0?void 0:n.userDataVNextClient.getNotifications(f,l)};sj_evt.bind("OnScriptLoad:BingAtWork:BfbMidgardAsyncBundle",function(){(n.context===null||n.context===void 0?void 0:n.context.isErrorBoundaryEnabled)&&n.withErrorBoundary?n.withErrorBoundary("fetchNotifications",e):e()},!0,null,!0)}}function ti(){return rt||(rt=_ge(ni)),rt}var i=n.context,r=i.mtCfg,ii=i.ssCfg,ut=i.isOnWorkVertical,ri=i.prefetchAsyncDomains,ui=i.substratePrefetchAsyncDomain,ft=i.wsb,fi=i.isCvidFlightEnabled,ei=i.isProactiveSearchEnabled,oi=i.tenantId,si=i.isCacheTenantSettingsEnabled,et=i.isThorProxyEnabled,h={clientContext:{clientType:hi()}},ni,rt;n.substrateAsyncDomainPrefetchRequest={};n.prefetchAsyncDomainRequests={};n.tokenPrefetchesStarted={};n.tenantSettingsClient=n.tenantSettingsClient||new n.Service.TenantSettingsClient(r,at(),"file: PreContentMidgard");n.userConfigsClient=n.userConfigsClient||new n.Service.Midgard.UserConfigsClient(r,di(),"file: PreContentMidgard");n.lokiClient=n.Service.Midgard.LokiClient&&!et?new n.Service.Midgard.LokiClient(n.context.mtCfg,pi):undefined;n.thorProxyClient=n.Service.Midgard.ThorProxyClient&&et?new n.Service.Midgard.ThorProxyClient(r):undefined;n.tokenClient=n.Service.TokenClient?new n.Service.TokenClient(r):undefined;n.substrateSearchClient=n.Service.Midgard.SubstrateSearchClient?new n.Service.Midgard.SubstrateSearchClient(ii,l):undefined;n.isMainlineAnswerPreExpanded=!1;var u={},t={},w={},e={},b=!1,st=!1,ht=!1,k="MSB.LastEmbeddedSearchboxEntry",ci=36e5,li="B00032",ai=2500,c;(function(n){n[n.NONE=0]="NONE";n[n.RESULT_CLUSTERS=1]="RESULT_CLUSTERS";n[n.INTERLEAVED=2]="INTERLEAVED"})(c=n.ConnectorResultsExperience||(n.ConnectorResultsExperience={}));n.start=d;n.fetchToken=o;n.fetchTenantSettings=g;n.getTenantSettingsResponseHandlers=at;n.fetchUserConfigs=nt;n.substrateWarmup=ir;n.substrateUnifiedSearch=vt;n.handleSubstrateSearchResponse=v;n.searchAsyncDomain=f;n.injectMsbQfScripts=gt;n.preContentMidgardEntry=it;n.wasRecentlyFromEsb=ar;n.setLastEsbEntryDate=vr,function(){var t,i,r;window.addEventListener("error",function(t){t&&t.filename&&n.midgardResources&&wr(t.filename)&&bfbTel.logErr(n.EventScope.BingAtWork,"Midgard bundle "+t.filename+" is corrupted",t?t.message:"Error message not logged","ClientError")});n.context&&n.context.wsb&&!n.context.miniSerp?(t=function(i){if(i.origin===_w.location.origin&&i.data&&i.data.messageType&&i.data.messageType==="BingAtWork:WsbAadReady"){_w.removeEventListener("message",t);var r=i.data.userId,u=i.data.tenantId;r&&(n.context.aadUserId=r);u&&(n.context.tenantId=u);it()}},_w.addEventListener("message",t),n.context.isQfScriptEarlyLoadInWsb&&(i=function(n){n.origin===_w.location.origin&&n.data&&n.data.messageType&&n.data.messageType==="BingAtWork:WsbQfScriptLoad"&&(_w.removeEventListener("message",i),st||(gt(),ht=!0))},_w.addEventListener("message",i))):(n.context&&!n.context.wsb&&n.isBackForwardNavigation()&&(r=n.context.isProactiveSearchEnabled,n.context.logicalId=r?n.ProactiveSearch.context.request.RequestContext.LogicalId:n.generateGuid(),n.whenWebTelemetryExists(function(){return bfbTel.instSubsequentLogicalId(n.context.logicalId)})),it())}();ni="sb_form_q";n.searchBox={getQuery:function(){return ti().value},setQuery:function(t){n.whenLocStringsAvailable(function(){document.title=t?n.Strings.DocumentTitleSerp.replace("{0}",t):n.Strings.DocumentTitleZeroQuery});ti().value=t}}}(BingAtWork||(BingAtWork={}))