You are on page 1of 43

var __extends,AutoSuggest;(function(n){var t;(function(n){var t,i,r,u,f,e;

(function(n){n.User="SRCHHPGUSR"})(t=n.CookieNames||(n.CookieNames={})),function(n)
{n.AutoSuggest="AS"}(i=n.CrumbNames||(n.CrumbNames={})),function(n)
{n.CursorPosition="cp";n.ConversationId="cvid";n.SuggestionCount="sc";n.PartialQuer
y="pq";n.SuggestionPosition="sp";n.SuggestionType="qs";n.PreviewPaneSuggestionType=
"qsc";n.SkipValue="sk";n.PreviewPaneSkipValue="skc";n.Ghosting="ghc";n.Css="css";n.
Count="count";n.DataSet="ds";n.SessionId="sid";n.TimeStamp="qt";n.Query="q";n.Impre
ssionGuid="ig";n.QFQuery="qry";n.BaseQuery="bq";n.FormCode="form";n.HashedMuid="ncl
id";n.RequestElToken="elvr";n.AppId="appid";n.History="history";n.NoHistory="nohs";
n.ApiTextDecoration="textdecorations";n.ClientId="clientid";n.Market="mkt";n.Scope=
"scope";n.CountryCode="cc";n.HomeGeographicRegion="hgr";n.SetLang="setlang"}
(r=n.QueryParams||(n.QueryParams={})),function(n){n.ImpressionGuid="X-MSEdge-IG"}
(u=n.Headers||(n.Headers={})),function(n)
{n.HitHighlighting="h";n.PopularNow="p";n.Local="l";n.Answers="a"}(f=n.Options||
(n.Options={})),function(n)
{n.Id="id";n.Query="query";n.Url="url";n.Navigation="nav";n.Type="stype";n.Autocomp
lete="hc";n.InstData="h";n.AriaLabel="aria-label"}(e=n.SuggestionAttributes||
(n.SuggestionAttributes={}))})(t=n.Service||(n.Service={}))})(AutoSuggest||
(AutoSuggest={})),function(n){function gt(t,i){if(i){var r=d.exec(t);return
r&&n.TopLevelDomains[r[1].toLowerCase()]==1}return d.test(t)}function ni(n){return
bt.test(n)}function ti(t){for(var i,u=t.substr(1).split("%").map(function(n){return
parseInt(n,16)}),r=0;r<u.length;++r)if((i=[u[r],u[r+1]||0,u[r+2]||0,u[r+3]||
0],i[0]>=240&&++r&&i[3]<128)||i[0]>=224&&++r&&i[2]<128||i[0]>=192&&++r&&i[1]<128||
i[0]<192&&i[0]>=128||i[0]<32||n.contains(nt,i[0]))return!1;return!0}function ii(n)
{return n.replace(/%25/g,"%2525").replace(/%([^0-9a-fA-F])/g,"%25$1").replace(/%
([^0-9a-fA-F])/g,"%25$1").replace(/%(.[^0-9a-fA-F])/g,"%25$1").replace(/%(.[^0-9a-
fA-F])/g,"%25$1").replace(/%(.)?$/g,"%25$1").match(/[^%]+|(?:
%..)*/g).map(function(n){return n.startsWith("%")&&!ti(n)?n.replace(/
%/g,"%25"):n}).join("")}function s(t){var i=t;return
t.includes("%")&&(t=n.safeExecute(function(){return
ii(t)},"sanitizeUrlEncodings",i,i)),n.safeExecute(function(){return
decodeURI(t)},"safeDecodeURI",i,i)}function u(n,t){var r,u,i;if(!n)return
null;if(n=n.trim(),n.includes("%")&&h(n))if(n.includes("?")){var e=/([^?]*)
(.*)/.exec(n),f=e[1],o=e[2];f=s(f);n=f+o}else n=s(n);return(r=yt.exec(n),!r)?null:
(u=r[0].length,t&&u<n.length)?null:
(i={length:u,type:0,protocol:r[1]||"",auth:r[2]||"",hostname:r[3]||"",port:r[4]||""
,path:r[5]||"",parameters:r[6]||"",unparsedSegment:n.substr(u)},i.auth&&!
i.auth.includes(":")&&!i.protocol&&!i.port&&!i.path&&!i.parameters)?
null:i.protocol||i.path&&i.path.endsWith("/")?i:pt.test(i.hostname)||
gt(i.hostname,t)||y.test(i.hostname)||w.test(i.hostname)?i:(i.type=i.path&&!
ni(i.path)?1:2,i)}function ri(n,t){var r=new RegExp("[?&]{1}"+t+"=([^&]+)([\\/\\\\]
[^?#]*)?([?#].*)?"),i=n.match(r);return i?i[1]:null}function oi(n){return
fi.some(function(t){return n.startsWith(t)})||ui.test(n)||
n.toLocaleLowerCase().includes(ei)}function si(n,t,i){var e=0,o=0,s=0,r;
(t.startsWith("read:")||t.startsWith("ftp:"))&&(t=t.replace(f,""));r=u(t,!
0);r&&r.type==0&&(e=hi(i,r),o=ci(i,t,r),s=li(i,r));n.protocolMatchLength=e;n.domain
MatchLength=o;n.pathMatchLength=s}function hi(n,t){var i=f.exec(n),r=i?
i[1]:n.trim();return t.protocol.startsWith(r)?r.length:0}function ci(t,i,r){var
u,f,o,e,s;return y.test(r.hostname)||w.test(r.hostname)?r.hostname.startsWith(t)||
i.startsWith(t)?t.length:0:(u=r.hostname.split("."),u.length==1?
f=HitHighlightingParser.addMarkers(u[0],t):
(u=u.length>2&&n.SecondLevelDomains[u[u.length-2]]?u.splice(0,u.length-
2):u.splice(0,u.length-
1),o=u.join("."),f=HitHighlightingParser.addMarkers(o,t)),e=f.indexOf(HitHighlighti
ngParser.startMarker),e==-1)?0:t.includes(".")?
(t.endsWith("/")&&(t=t.substr(0,t.length-1)),r.hostname.includes(t)?t.length:0):
(s=f.indexOf(HitHighlightingParser.endMarker),s-e-1)}function li(n,t){var
i,r,u;return t.path?
(i=HitHighlightingParser.addMarkers(t.path,n),r=i.indexOf(HitHighlightingParser.sta
rtMarker),r==-1)?0:(u=i.indexOf(HitHighlightingParser.endMarker),u-r-1):0}function
ai(n){return n=it(n,!1),wt.test(n)}function tt(n){return f.test(n)}function vi(n)
{return l.test(n)}function h(n){return at.test(n)}function yi(n){return tt(n)&&!
h(n)}function pi(n){var t;return t=typeof n=="string"?n:c(n,!
0),t=bi(t),t.trim().replace(/^ht+p(s)?[:;]+[\\\/]*|^\/*/ig,function(n,t){return
t?"https://":"http://"})}function it(n,t){return t?n.includes("/")||
(n=n.replace(/\\/g,"/")):n.startsWith("//")||n.includes("\\")||
(n=n.replace(/\//g,"\\")),n}function wi(n){return n=it(n,!0).replace(/\/+/g,"/"),
(n.startsWith("/")?"file:/":"file:///")+n}function bi(n){if(!n||!
n.includes("\\"))return n;var i=n.includes("?")?
n.indexOf("?"):n.length,r=n.includes("#")?
n.indexOf("#"):n.length,t=Math.min(i,r),u=n.substring(0,t),f=n.substr(t);return
u.replace(/\\/g,"/")+f}function c(n,t){var i=n.protocol?n.protocol:"";return i+=!
t&&n.auth?n.auth:"",i+=n.hostname,i+=n.port?n.port:"",i+=n.path?
n.path:"",i+=n.parameters?n.parameters:"",i+(n.unparsedSegment?
n.unparsedSegment:"")}function i(n,t){var i=n,r,f,e;return
t&1&&(r=rt.exec(i),r&&(i=r[1])),t&2&&(r=ut.exec(i),r&&(i=r[1])),t&4&&(r=ft.exec(i),
r&&(i=r[1])),t&8&&(r=l.exec(i),r&&(i=r[1])),t&16&&(r=ki.exec(i),r&&(i=r[1])),t&32&&
(f=u(i,!
1),f&&(f.protocol=f.protocol.toLocaleLowerCase(),f.hostname=f.hostname.toLocaleLowe
rCase(),e=c(f),i=i.replace(/^(\s*)(?:[^\s]*)(\s*)
$/g,"$1"+e+"$2"))),t&64&&(i=s(i)),i}function di(n){return l.test(n)}function e(n)
{return ut.test(n)?1:rt.test(n)?2:ft.test(n)?3:0}function gi(n,t,r){var
f,u,o,s,e;return t?t=="/"?n:(f=i(t,7),f!=t)?n:(u=i(n,r?7:6),!u)?n:
(o=t.toLowerCase(),"https".startsWith(o)&&!u.startsWith(t))?n:(s=i(f,8),s!=f)?u:
(e=i(u,8),!e)?u:"www".startsWith(o)&&!e.startsWith(t)?u:e:i(n,r?15:14)||n}function
nr(n,t){var i=e(t);switch(e(n)){case 1:return i!=2;case 2:return i!=1;case 3:case
0:return!0}}function tr(t,r,u){if(i(r,127)!=i(u,127))return!1;var
f=e(t.originalQuery);return n.contains([1,2],f)&&!nr(r,u)?!1:!0}function ot(n){var
t=u(n,!0),i;return t?(i=st(t),i?t.path.toLocaleLowerCase():null):null}function
st(n){var t=n.hostname.split(".");return n.hostname&&t.length>1?t[t.length-
1]=="com"&&et.some(function(n){return t[t.length-2]==n}):!0}function ir(t)
{if(t=="https://www.bing.com/?form=EDGSTP&pc=MESP"||t=="https://www.bing.com/?
form=EDGSTP&pc=MESPB")return!0;var i=ot(t);return!!
i&&n.contains(n.WebSearchPaths,i)}function rr(n){var
t=u(n.replace(/^ftp:/g,"http:"),!0);return(t?t.hostname:null)||""}function ur(t)
{var r=t.queryToFetch.toLocaleLowerCase(),f,u;return r?
(f=["/","ht","htt","http","https","ww","www"],u=i(r,15),!u||n.contains(f,r)||u!
=r&&"www".startsWith(i(r,7))):!1}function fr(n){var t,i;return lt.test(n)||
f.test(n)?!0:(t=n.replace(kt,"/"),dt.test(t)?
t=t.replace(g,"."):t.includes(".")&&(t=t.replace(g,"")),i=u(t,!0),i&&i.type==0)}var
r="\\-\\s\\[\\]\\/\\\\!@#$%^&*()+={}:;~`\"'|<,>.。?",ht="(?:[^"+r+"]-*)*[^"+r+"]
(?:-*[^"+r+"])*",a="(?:[^"+r+"]-*)*[^"+r+"0-9](?:-*[^"+r+"])*",ct="(?:
(?:"+ht+"[.。])*"+a+")[.。]?",v="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-
9])",o="(?:(?:"+v+"\\.){3}"+v+")",y=new RegExp("^"+o+"$"),t="(?:[0-9a-fA-F]
{1,4})",p="(?::(?:(?::"+t+"){1,7}|:)|(?:"+t+":){1,7}:|(?:"+t+":){7}"+t+"|(?:"+t+":)
{1,6}(?::"+t+"){1}|(?:"+t+":){1,5}(?::"+t+"){2}|(?:"+t+":){1,4}(?::"+t+"){3}|
(?:"+t+":){1,3}(?::"+t+"){4}|(?:"+t+":){1,2}(?::"+t+"){5}|(?:"+t+":){1,1}(?::"+t+")
{6}|fe80:(?::"+t+"){0,4}%[0-9]+|::ffff:"+o+"|)",w=new RegExp("^\\["+p+"\\]
$","i"),b="ht+ps?[:;]+[\\\\/]*",lt=new RegExp(b,"i"),k=b+"|/+",at=new
RegExp("^("+k+")","i"),vt=ct+"|"+o+"|\\["+p+"\\]",yt=new RegExp("^("+k+")?
([^/@#?]*@)?("+vt+")(:(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-
5][0-9]{1,4}|[1-9][0-9]{0,3}))?([\\/\\\\][^?#]*)?([?
#].*)?","i"),pt=/^localhost[.。]?$/,d=new RegExp("[.。]("+a+")[.。]?$","i"),wt=/
((^[\\]{2}).+)|(^[a-z]:\\.*)/i,f=/^([a-z0-9\-]+):/i,bt=/\s/,g=/\s+/g,kt=/\s+\/
(?!\/)/g,dt=/([^\/]|^)\/
(?!\/)/,nt,et;n.WebSearchPaths=["/search","/entityexplore"];nt=[33,39,40,41,42,91,9
3];n.tryParseUrl=u;n.getQueryStringParam=ri;var ui=/file:\/\/\/[^:\/]+:\/[^\/]+\/
[^\/]+\/AppData\//i,fi=["ms-appx:","ms-appx-web:","ms-browser-
extension:",],ei="microsoft.microsoftedge_8wekyb3d8bbwe";n.isJunkUrl=oi;n.computeUr
lMatchLengths=si;n.isUncOrLocalPath=ai;n.startsWithProtocol=tt;n.startsWithWww=vi;n
.isHttpProtocol=h;n.isNonHttpProtocol=yi;n.cleanAndFixUrlProtocol=pi;n.cleanAndFixU
ncOrLocalPath=wi;n.parsedUrlToString=c;var
rt=/^ht+ps:\/*(.*)/i,ut=/^ht+p:\/*(.*)/i,ft=/^\/{2,}(.*)/,l=/^www\.
(.*)/i,ki=/^(.*[^:\/])\/+
$/;n.normalizeUrl=i;n.hasWww=di;n.getProtocol=e;n.prettyPrintUrl=gi;n.isDuplicateUr
l=tr;et=["bing","staging-bing-int","working-bing-int","bing-int","bing-
exp"];n.tryGetBingPathLC=ot;n.isBingHost=st;n.isBingSearchUrl=ir;n.getDomain=rr;n.i
sEmptyUrlPrefix=ur;n.queryLooksLikeUrl=fr}(AutoSuggest||
(AutoSuggest={})),function(n){var t,i;(function(n){function t(t,i,r,u,f,e){var
o={T:n.QFPERFPING_EVENT_NAME,ST:r,CVID:u,OFFSETS:i,STATE:f,V:n.QFPERFPING_VERSION,R
FC:e};return{ImpressionGuid:t,EventType:n.CLIENTINST_EVENT_TYPE,Data:o}}n.CLIENTINS
T_EVENT_TYPE="ClientInst";n.QFPERFPING_EVENT_NAME="QFPerfPing";n.CLICK_EVENT_TYPE="
Click";n.QFPERFPING_VERSION="2";n.QFPERFPING_INVALID_MEASURE=-
2;n.INVALID_SEQUENCE_NUMBER=-
2;n.KVALUE_SUGGESTIONS_START=1e3;n.KVALUE_SUFFIX_START=1;n.KVALUE_NON_SUGGESTIONS_S
TART=100;n.DEFAULT_APP_NAMESPACE="SmartSearch";n.DEFAULT_SERVICE_NAME="AutoSuggest"
;n.createPerfPingEvent=t})(t=n.InstrumentationCommon||
(n.InstrumentationCommon={}));i=function(){function n(n,t)
{this._kValue=n;this._handOffType=t}return n.createInstrumentedItem=function(t)
{return new
n(n.generateKValue(t))},n.getNonSuggestionInstrumentedItem=function(t,i,r){return
new n(i[t],r)},n.prototype.getKValue=function(){return
this._kValue},n.prototype.getAppNS=function(){return
n.AppNS},n.prototype.getLayoutKValue=function(){return
this._kValue+"."+n.Suffix},n.prototype.getHValue=function()
{return"ID="+n.AppNS+","+this.getLayoutKValue()},n.prototype.getHandoffType=functio
n(){return this._handOffType},n.resetKValues=function(n){delete
this._keystrokesKValues[n]},n.generateKValue=function(n){var
r=n,i=this._keystrokesKValues[r];return i>0||
(i=t.KVALUE_SUGGESTIONS_START),this._keystrokesKValues[r]=+
+i,i},n.AppNS=t.DEFAULT_APP_NAMESPACE,n.Suffix=t.KVALUE_SUFFIX_START,n._keystrokesK
Values={},n}();n.InstrumentedItem=i}(AutoSuggest||(AutoSuggest={})),function(n)
{function lt(){return matchMedia("screen and (-ms-high-contrast)").matches}function
at(){return navigator.onLine}function vt(n){return!n.isAnswer&&(n.handoffType==0||
n.handoffType==11)}function c(n){return n?n.replace(ut,"$1").replace(ft,"$1
"):n}function yt(n){return n?n.replace(/[-{}]/g,"").toLowerCase():null}function
pt(n){return!n||Object.keys(n).length===0}function l(n,t,i,r){var
u,e;n&&(n=n.slice(0,t)+f+n.slice(t,n.length));u=i(n);u&&(e=u.indexOf(f),t=e!=-1?
e:t,u=u.replace(f,""));r(u,t)}function wt(n){if(!n)return
SharedLogHelper.LogError("getInputType",null,new Error("event object is
missing")),0;switch(n.pointerType){case"mouse":return 2;case"touch":return
3;case"pen":return 4;default:return 1}}function o(n){for(var
i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];i.forEach(function(t){return
delete n.enabledDataSources[t]})}function a(i){return
i&&n.config.bingEnabledRegionsList&&n.config.bingEnabledRegionsList.length>0&&!
t(n.config.bingEnabledRegionsList,i.toLowerCase())}function bt(t,i){var
r=t.queryToFetch&&t.queryToFetch.length<n.config.minQueryLengthForWebProvider||
a(i);return r&&(o(t,n.WebDataSource),o(t,n.WebRankingSignalDataSource)),r}function
v(t){if(t){t=n.normalizeUrl(t,15);for(var i=1;i<t.length-1;+
+i)if(ot.includes(t[i]))return!0}return!1}function kt(t,i,r){var u,f;return
l(t,i,function(n){return c(n)},function(n,t)
{u=n;f=t}),u&&(n.config&&n.config.doNotRemoveSpaceAfterIn&&u.toLocaleLowerCase().en
dsWith(" in ")||(u=u.trim()),f=Math.min(f,u.length)),
{originalQuery:t,originalCursorPosition:i,queryToFetch:u,cursorPosition:f,enabledDa
taSources:{},equals:function(n){return(u?u.toLowerCase():u)==(n.queryToFetch?
n.queryToFetch.toLowerCase():n.queryToFetch)&&r==n.topHitRestriction},isMultiWord:v
(u),getCacheKey:function(){return u},topHitRestriction:r}}function y(i,r){return
r&&!r.enabledDataSources[i]?!1:t(n.config.enabledDataSources,i)}function p(i,r,u,f)
{var e=f.enabledDataSources[i];return e?e.suggestionIsEnabled&&!
e.suggestionIsEnabled(r,u)?!1:t(n.config.enabledDataSources,i):!1}function t(n,t)
{return n.indexOf(t)!=-1}function dt(n,t){var i=n.indexOf(t);return i!=-1?
(n.splice(i,1),!0):!1}function gt(n,t){var i=n.findIndex(t);return i!=-1?
n.splice(i,1)[0]:null}function ni(n,t,i){if(t<100)for(var r=n.length-
1;n.length>t&&r>=0;--r)i(n[r])&&n.splice(r,1)}function ti(n,i){return
n.filter(function(n){return!t(i,n)})}function ii(n,t){if(n.length!=t.length)return!
1;for(var i=0;i<n.length;++i)if(n[i]!=t[i])return!1;return!0}function ri(n,t)
{if(n===t)return!0;if(!n||!t||Object.keys(n).length!=Object.keys(t).length)return!
1;for(var i in n)if(n[i]!=t[i])return!1;return!0}function w(){return
n.getCurrentDate().getTime()}function r(n){var
t=Math.abs(Math.floor(n));return(t<10?"0":"")+t}function ui(){var
t=n.getCurrentDate(),i=-t.getTimezoneOffset(),u=i>=0?"+":"-";return t.getFullYear()
+"-"+r(t.getMonth()+1)+"-"+r(t.getDate())+"T"+r(t.getHours())+":"+r(t.getMinutes())
+":"+r(t.getSeconds())+"."+r(t.getMilliseconds())+u+r(i/60)+":"+r(i%60)}function
fi(n,t){return n?n.replace(et,function(n,i){return t[i]}):n}function ei(n){var t=n?
n.number:null,i=n?n.name:null;return t==-2147023673||i=="Canceled"}function
u(n,t,i,r,u,f){try{return n()}catch(e){return f||
SharedLogHelper.LogError(t,r,e),u&&u(),i}}function oi(n){for(var
i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];u(function(){return
sj_evt.fire.apply(sj_evt,[n].concat(i))},n)}function s(n,t){var i=[],r=!
0,u=function(){for(var u=[],n=0;n<arguments.length;n++)u[n]=arguments[n];r?
i.push(u):t.apply(null,u)};n(u);r=!1;i.forEach(function(n){return
t.apply(null,n)})}function si(n,t){return e=n&&!a(t)}function hi(){return
e}function li(n){return t(d,n)}function ai(n){return t(b,n)}function vi(n){return
t(k,n)}function yi(n){return t(ci,n)}function pi(n,t,i){return i?
n==93:n==121&&t}function wi(n,t){return n==8||n==46||n==88&&t.ctrlKey}function bi()
{return _w.location.protocol}function ki(){return _w.location.host}function di()
{return _d.activeElement}function g(t){return t&&+t!=n.WindowsApiDefaultDate&&!
isNaN(t.getTime())&&t.getFullYear()!=1600}function nt(n){if(!g(n))return null;var
t=n.getTime(),i=w();return Math.abs(i-t)/ct}function gi(n){var t=nt(n);return t!
==null&&t>14}function nr(n){return n==="i"?13:n==="v"?14:0}function tr(n){return
encodeURIComponent(n).replace(/[!'()*]/g,escape).replace(/%20/g,"+")}var
f=String.fromCharCode(57346),ut=new RegExp("^\\s*("+f+")?\\s*"),ft=new
RegExp("\\s*("+f+")?\\s+","g"),et=/{([0-9]+)}/g,ot=" -_/\\",st=-2147215328,ht=-
2147023673,ct=864e5,i,e,h,tt,it,rt;n.DebugSourceName="AutoSuggest";SharedLogHelper.
RegisterErrorFilter(function(n){var t=n?n.number:null,i=n?n.name:null;return
t===ht||t===st||
i==="Canceled"});n.isHighContrastEnabled=lt;n.isBrowserOnline=at;n.isWebSuggestion=
vt;n.cleanQuery=c;n.cleanGuid=yt;n.isEmpty=pt;n.mantainCursorPositionIn=l;n.getInpu
tType=wt;n.disableDataSources=o;n.disableWebDataSourceIfNeeded=bt;n.isMultiWord=v;n
.parseQuery=kt;n.isDataSourceEnabled=y;n.isSuggestionTypeEnabled=p;n.contains=t;n.t
ryRemove=dt;n.removeFirstWhere=gt;n.trimList=ni;n.except=ti;n.sequenceEqual=ii;n.ob
jEquals=ri;n.log=function(){};n.getCurrentDate=function(){return new
Date};_w.ClientTestHooks&&(n.log=function(n,t){return ClientTestHooks.ClientLog("-
"+n,t)},i=ClientTestHooks.getUrlValue("currentdate",null),i&&(i.includes("-")||
i.length!=8||
(i=i.substr(0,4)+"-"+i.substr(4,2)+"-"+i.substr(6,2)),n.getCurrentDate=function()
{return new
Date(i)}));n.getCurrentTime=w;n.getDateWithTimezone=ui;n.fetchWrapper=function(n,t,
i){return
i()};n.formatString=fi;n.isCancellation=ei;n.safeExecute=u;n.safeFireEvent=oi;n.ens
ureCallbackIsAsync=s;n.WebDataSource="Web";n.WebRankingSignalDataSource="WRS";n.MRU
DataSource="MRU";e=!0;n.refreshBingEnabledCache=si;n.isBingEnabled=hi;var
b=[38,203,211,],k=[40,204,212,],d=b.concat(k),ci=d.concat(37,39,36,35);n.isUpOrDown
Key=li;n.isUpKey=ai;n.isDownKey=vi;n.isMovingCursorKey=yi;n.isContextMenuKey=pi;n.i
sDeletionKey=wi;n.getWindowProtocol=bi;n.getWindowHost=ki;n.getCurrentActiveElement
=di;n.WindowsApiDefaultDate=-
116444736e5;n.isValidDate=g;n.getTimeDiffInDays=nt;n.olderThan2Weeks=gi;n.verticalT
oHandoffType=nr;h=function(){function n()
{this._cancellations={};this._lastId=0}return n.prototype.register=function(n,t,i)
{var r=++this._lastId;return
this._cancellations[r]={action:n,skipOnDismissAndLaunch:t,where:i},r},n.prototype.u
nregister=function(n){delete
this._cancellations[n]},n.prototype.cancelAll=function(n){var t=function(t){var
r=i._cancellations[t];r.skipOnDismissAndLaunch&&n||u(function(){return
r.action()},r.where)},i=this;for(var r in
this._cancellations)t(r);this._cancellations={}},n}
();n.CancellationManager=h;tt=function(){function n(){}return
n.prototype.getItem=function(n){try{return _w.localStorage?
_w.localStorage.getItem(n):undefined}catch(t){return
SharedLogHelper.LogError("localStorage",t,new
Error("getItem")),undefined}},n.prototype.setItem=function(n,t)
{try{_w.localStorage&&_w.localStorage.setItem(n,t)}catch(i)
{SharedLogHelper.LogError("localStorage",i,new
Error("setItem"))}},n.prototype.removeItem=function(n){try{return
_w.localStorage.removeItem(n)}catch(t)
{SharedLogHelper.LogError("localStorage",t,new Error("removeItem"))}},n}
();n.LightweightStorage=tt;it=function(){function n(){this._sequenceNumber=0}return
n.prototype.getSequenceNumber=function(){return
this._sequenceNumber},n.prototype.incrementSequenceNumber=function()
{this._sequenceNumber++},n}();n.SequenceNumberManager=it;rt=function(){function
t(t,i,r,u,f,e,o,s){var
c=this;this._host=t;this._suggestionsParsers=i;this._rootViewModel=r;this._suggesti
onsRenderingManager=u;this._webProviders=f;this._otherProviders=e;this._instrumenta
tionHelper=o;this._sequenceNumberManager=s;n.config.cancellationEnabled&&(this._can
cellationManager=new h);t.bindShown(function()
{c._lastQuery=null;c._currentQuery=null;c._isPaneDismissed=!
1});t.bindDismissed(function(){c.clearFetchTimer();c.finishPreviousQuery(!
0);c.finalizeKeystroke(!0);c._isPaneDismissed=!
0});t.bindQueryChangedOrInitialized(function(t,i){return
c.onQueryChanged(t,n.config.d,i)});t.bindOnSubmit(function(n,t,i){return
c.onSubmit(n,t,i)});t.initializeEvents();sj_be(_d.body,"dragstart",function(n)
{return n.preventDefault(),n.stopPropagation(),!
1});sj_b.addEventListener("click",function(n){n.shiftKey&&sj_pd(n)})}return
t.prototype.clearFetchTimer=function()
{this._fetchTimer&&(sb_ct(this._fetchTimer),this._fetchTimer=null)},t.prototype.fin
ishPreviousQuery=function(n)
{this.cancelPreviousQuery(n);this._suggestionsRenderingManager.resetTimers()},t.pro
totype.finalizeKeystroke=function(n){var
t=this._sequenceNumberManager.getSequenceNumber();t>0&&this._instrumentationHelper.
finalizeKeystrokeLog(t);n||
this._sequenceNumberManager.incrementSequenceNumber()},t.prototype.onQueryChanged=f
unction(n,t,i){var
r=this,f;this.clearFetchTimer();this._currentQuery=n;this._lastQuery&&(!
this._lastQuery.equals(this._currentQuery)||i)&&this.cancelPreviousQuery(!1);t<=0?
this.fetchForQueryChange(0,!1,i):(f=Date.now(),this._fetchTimer=sb_st(function()
{r._fetchTimer=null;u(function(){return r.fetchForQueryChange(Date.now()-f,!
1,i)},"fetchTimer")},t))},t.prototype.onSubmit=function(n,t,i)
{this._fetchTimer&&(this._currentQuery||
(this._currentQuery=this._host.getQuery()),this.fetchForQueryChange(0,!0,!
1));this._rootViewModel.submit(n,t,this._sequenceNumberManager.getSequenceNumber(),
i,t
his._isPaneDismissed)},t.prototype.cancelPreviousQuery=function(n)
{this._cancellationManager&&this._cancellationManager.cancelAll(n)},t.prototype.fet
chForQueryChange=function(t,i,r){var
u=this,e,f,h;if(this.clearFetchTimer(),this._lastQuery&&this._lastQuery.equals(this
._currentQuery)&&!
r)this._rootViewModel.onQueryChanged(this._currentQuery,this._sequenceNumberManager
.getSequenceNumber());else if(e=this._host.getQuery(),e.equals(this._currentQuery))
{if(this.finishPreviousQuery(i),this.finalizeKeystroke(!
1),this._lastQuery=this._currentQuery,f=this._sequenceNumberManager.getSequenceNumb
er(),this._instrumentationHelper.instrumentBeginRequest(f,this._currentQuery,t),h=!
n.config.enabledDataSources.some(function(n){return
y(n,u._currentQuery)}),h)this._rootViewModel.onQueryChanged(this._currentQuery,f);i
f(this._suggestionsRenderingManager.initiateSequenceNumber(f,this._currentQuery),!
h){var o=function(){return!u._isPaneDismissed&&(n.config.d>0?
e.equals(u._currentQuery):f==u._sequenceNumberManager.getSequenceNumber())},c=funct
ion(n,t,i,r,s){return u.onResponseReceived(e,f,n,t,i,o,r,s)},l=function(t)
{n.fetchWrapper(e,o,function(){u._webProviders.forEach(function(n){return
u.fetchWeb(e,n,f,t,o)});u._otherProviders.forEach(function(n){return
u.fetch(e,n,f,t,o)})});u._rootViewModel.onQueryChanged(u._currentQuery,f)};s(l,c)}}
},t.prototype.fetchWeb=function(t,i,r,f,e){var
c=this,s=n.Service.QueryParams,o=this._host.getCustomUrlParameters(t),h;this._host.
shouldRequestEltoken()&&(o[s.RequestElToken]="1");o[s.CursorPosition]=t.cursorPosit
ion.toString();o[s.ConversationId]=this._host.getConversationId();o[s.ImpressionGui
d]=this._instrumentationHelper.getImpressionGuid(r);h=this._host.getCustomHeaders()
;u(function(){return i.fetch(t,f,r,c._cancellationManager,e,o,h)},"fetch
"+i.getName())},t.prototype.fetch=function(n,t,i,r,f){var e=this;u(function()
{return t.fetch(n,r,i,e._cancellationManager,f)},"fetch
"+t.getName())},t.prototype.onResponseReceived=function(n,t,i,r,u,f,e,o){var
h=this,c,l;f()&&(this._instrumentationHelper.instrumentResponseReceived(t,i,u,e,o),
c=function(i,r,e){if(f())h.onSuggestionsParsed(n,t,i,u,r,e)},l=function(u){var
e=h._suggestionsParsers[i];e?e.parse(n,t,i,r,f,u,h._cancellationManager):
(SharedLogHelper.LogError("onResponseReceived",null,new Error("No parser for data
source "+i)),u(i,
[],null))},s(l,c))},t.prototype.onSuggestionsParsed=function(n,t,i,r,u,f)
{u=u.filter(function(t){return
p(i,t.type,t.handoffType,n)});this._instrumentationHelper.instrumentDataSource(t,i,
u,f);this._rootViewModel.onSuggestionsParsed(n,t,i,r,u,f);this._suggestionsRenderin
gManager.queueSuggestions(t,i,u,f)},t}();n.Core=rt;n.encodeQueryParameter=tr}
(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){function ct(t)
{return n.contains(et,t)}function lt(t){return n.contains(ot,t)}function at(t)
{return n.contains(y,t)}function vt(t){return n.contains(st,t)}function yt(t)
{return n.contains(ht,t)}function r(n,i)
{return{dataSource:n,requirementLevel:function(){return
t.config.cortanaCapabilitiesAvailable&&!o()?3:1},conditionalRequirements:function()
{if(!t.isCloudSearchEnabledCache)return!1;var n=o()?
t.getAccountTypeForCloudContent():t.isCortanaPersonalized?
t.cortanaAccountType:t.windowsAccountType;return n==2},suggestionIsEnabled:i?
function(n){return n==i}:undefined}}function o(){return
t.config.wamSupported&&n.isDataSourceEnabled("SSUE",null)}function pt(){return
t.config.wamSupported&&n.isDataSourceEnabled("BAW",null)}function p(n){return n==1?
t.isSubstrateO365AccountConnected:t.isSubstrateOutlookAccountConnected}function
u(n,i,r,u){return u===void 0&&(u=!0),{dataSource:n,requirementLevel:function()
{return 0},conditionalRequirements:function(n){return
t.config.wamSupported&&t.isCloudSearchEnabledCache&&u&&(t.qfMode!=3||i==1)&&(r||
n&&n.queryToFetch&&n.queryToFetch.length>=t.config.minLengthFor3SonL1)&&t.getAccoun
tTypeForCloudContent()==i&&p(i)}}}function w(n)
{return{dataSource:"BAW",requirementLevel:function(){return
1},conditionalRequirements:function(i){return
t.config.wamSupported&&t.isCloudSearchEnabledCache&&(n||
i&&i.queryToFetch&&i.queryToFetch.length>=t.config.bawminqlen)&&t.getAccountTypeFor
CloudContent()==1}}}function s(n)
{return{dataSource:"B4B",requirementLevel:function(){return
1},conditionalRequirements:function(i){return t.config.wamSupported&&(n||
i&&i.queryToFetch&&i.queryToFetch.length>=t.config.bfbminqlen)&&t.getAccountTypeFor
CloudContent()==1}}}function h(n){if(n===void 0&&(n=!0),!n||!
t.isCloudSearchEnabledCache||!o())return!1;var
i=t.getAccountTypeForCloudContent();return i==3||i==0?!1:!p(i)}function b(){return
n.contains(t.config.enabledDataSources,"EBH")&&(t.qfMode==3||
t.config.enableEdgeBrowsingHistory)}function f()
{return{dataSource:"EBH",requiredCortanaCapabilities:function(){return t.qfMode==3?
[]:["BrowsingHistory"]},conditionalRequirements:function(t){return b()&&(!t||!
t.queryToFetch||n.normalizeUrl(t.queryToFetch,31).length>=3)}}}function k(){return
t.config.historySettingsPresent?t.cortanaAccountType==3?
t.windowsAccountType==2:t.cortanaAccountType!=2?!
1:t.config.windowsAuthForOMA&&nt()!=1?!1:!0:!1}function c()
{return{dataSource:n.WebDataSource,requirementLevel:function(){return
1},conditionalRequirements:function(){return k()}}}function wt(r)
{t.ScopeConfig[i.All].enabledDataSourcesForZeroInput=r?
[{dataSource:n.MRUDataSource},{dataSource:"MPP"},{dataSource:"MST"},
{dataSource:"MFF"},c(),f(),]:[]}function d()
{t.ScopeConfig={};t.ScopeConfig[i.All]={icon:
{content:"&#xE782",type:2,needsAccentColor:!
0},prefixesLocString:"ScopeAll",enabledDataSources:[{dataSource:"PP"},
{dataSource:"ST"},{dataSource:"FL"},{dataSource:"LM"},{dataSource:"IFF"},
{dataSource:"CG"},{dataSource:"PBI",requirementLevel:function(){return
2},conditionalRequirements:function(n){return
n&&n.queryToFetch&&n.queryToFetch.length>=6&&n.queryToFetch.trim().includes(" ")}},
{dataSource:n.MRUDataSource},{dataSource:"MPP"},{dataSource:"MST"},
{dataSource:"MFF"},{dataSource:n.WebDataSource,requirementLevel:function(){return
1}},{dataSource:"OSTMA",requirementLevel:function(){return 1}},
{dataSource:"QS",requirementLevel:function(){return 1}},f(),r("ODC"),u("SSUE",1,!
1),u("SSUC",2,!1),w(!1),{dataSource:"WRS",requirementLevel:function(){return
1}},s(!1),],enabledDataSourcesForZeroInput:[]};t.ScopeConfig[i.Apps]={icon:
{content:"&#xEB3B",type:2},prefixesLocString:"ScopeApps",enabledDataSources:
[{dataSource:n.WebDataSource,suggestionIsEnabled:function(){return!
1},requirementLevel:function(){return 1}},
{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MPP"},{dataSource:"PP",suggestionIsEnabled:function(n){return
n=="PP"}},{dataSource:"OSTMA",requirementLevel:function(){return 1}},
{dataSource:"IBA",conditionalRequirements:function(){return t.qfMode!
=3}},],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MPP"},n.contains(t.config.enabledDataSources,"LRA")?
{dataSource:"LRA"}:{dataSource:"PP",suggestionIsEnabled:function(n){return
n=="PP"}}]};t.ScopeConfig[i.Settings]={icon:
{content:"&#xE713",type:2},prefixesLocString:"ScopeSettings",enabledDataSources:
[{dataSource:n.WebDataSource,suggestionIsEnabled:function(){return!
1},requirementLevel:function(){return 1}},
{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MST"},{dataSource:"ST"},{dataSource:"QS",requirementLevel:function()
{return 1}}],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MST"},]};t.ScopeConfig[i.Photos]={icon:
{content:"&#xEB9F",type:2},prefixesLocString:"ScopePhotos",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="LI"}},
{dataSource:"MPHO",suggestionIsEnabled:function(n){return
n=="LI"}},r("ODC","LI"),r("MODC","LI"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="LI"}},]};t.ScopeConfig[i.Videos]={icon:
{content:"&#xE714",type:1},prefixesLocString:"ScopeVideos",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="LV"}},
{dataSource:"MVID",suggestionIsEnabled:function(n){return
n=="LV"}},r("ODC","LV"),r("MODC","LV"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="LV"}},]};t.ScopeConfig[i.Music]={icon:
{content:"&#xE8D6",type:2},prefixesLocString:"ScopeMusic",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="MU"}},
{dataSource:"MMUS",suggestionIsEnabled:function(n){return
n=="MU"}},r("ODC","MU"),r("MODC","MU"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="MU"}},]};t.ScopeConfig[i.Documents]={icon:
{content:"&#xE7C3",type:2},prefixesLocString:"ScopeDocuments",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="FL"}},
{dataSource:"MDOC",suggestionIsEnabled:function(n){return n=="FL"}},
{dataSource:"MPHO",suggestionIsEnabled:function(n){return
n=="FL"},conditionalRequirements:function(n){return!n||!n.taskFrame}},
{dataSource:"MVID",suggestionIsEnabled:function(n){return
n=="FL"},conditionalRequirements:function(n){return!n||!
n.taskFrame}},r("ODC","FL"),r("MODC","FL"),
{dataSource:"PP",suggestionIsEnabled:function(n){return n=="LDOC"}},u("SSUE",1,!
0),u("SSEE",1,!0,!t.config.useSRR),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="FL"}},u("SSEE",1,!0,!!
t.config.zeroInputCloudDocs),],showUpsellOnSuggestionsList:function(){return
h(t.getAccountTypeForCloudContent()==1)}};t.ScopeConfig[i.Folders]={icon:
{content:"&#xE838",type:2},prefixesLocString:"ScopeFolders",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return n=="FD"}},
{dataSource:"MFOL",suggestionIsEnabled:function(n){return
n=="FD"}},r("ODC","FD"),r("MODC","FD"),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(){return!1}},
{dataSource:"MFF",suggestionIsEnabled:function(n){return
n=="FD"}},]};t.ScopeConfig[i.Web]={icon:
{content:"&#xE774",type:1},prefixesLocString:"ScopeWeb",enabledDataSources:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(n,t){return t==1}},
{dataSource:n.WebDataSource,suggestionIsEnabled:function(t,i){return
n.contains([0,13,14,10,5,1],i)},requirementLevel:function(){return 1}},
{dataSource:"PP",suggestionIsEnabled:function(n,t){return t==1}},f(),w(!0),
{dataSource:"WRS",requirementLevel:function(){return 1}},s(!
0),],enabledDataSourcesForZeroInput:
[{dataSource:n.MRUDataSource,suggestionIsEnabled:function(n,t){return
t==1}},c(),f(),]};t.ScopeConfig[i.PathCompletion]={icon:
{content:"&#xE782",type:2,needsAccentColor:!
0},prefixesLocString:"",enabledDataSources:[{dataSource:"PT"},
{dataSource:"CG"},],enabledDataSourcesForZeroInput:
[]};t.ScopeConfig[i.Emails]={icon:
{content:"&#xE715",type:2},prefixesLocString:"ScopeEmails",enabledDataSources:
[u("SSEE",1,!0),u("SSEC",2,!0),],enabledDataSourcesForZeroInput:
[],showUpsellOnSuggestionsList:function(){return
h()}};t.ScopeConfig[i.People]={icon:
{content:"&#xE716",type:2},prefixesLocString:"ScopePeople",enabledDataSources:
[u("SSUE",1,!0),u("SSUC",2,!0),s(!0),],enabledDataSourcesForZeroInput:
[],showUpsellOnSuggestionsList:function(){return h()}};for(var e in
t.ScopeConfig)t.ScopeConfig[e].enabledDataSources=t.ScopeConfig[e].enabledDataSourc
es.filter(function(i){return
n.contains(t.config.enabledDataSources,i.dataSource)}),t.ScopeConfig[e].enabledData
SourcesForZeroInput=t.ScopeConfig[e].enabledDataSourcesForZeroInput.filter(function
(i){return n.contains(t.config.enabledDataSources,i.dataSource)})}function bt()
{e=null}function kt(n,r){var u,f;if(e={},t.scopesAvailable){u=function(u){var
f=parseInt(u),o=t.ScopeConfig[f];if(f!=i.All&&o.prefixesLocString&&l(f,o)){var
s=HitHighlightingParser.removeDiacritics(n(o.prefixesLocString).toLocaleLowerCase()
),h=HitHighlightingParser.removeDiacritics(r(o.prefixesLocString).toLocaleLowerCase
()),c=g(s,h);c.forEach(function(n){return e[n.trim()]=f})}};for(f in
t.ScopeConfig)u(f)}}function dt(n,t){if(!n.prefixesLocString)return"";var
i=g(t.getLocString(n.prefixesLocString));return i[0].trim()}function g(n,t){var
i=n;return t&&(i+=","+t),i.search(v)>-1&&(i=i.replace(v,",")),i.split(",")}function
l(r,u){var f,s,e,o,h;if(r==i.Web&&!n.isBingEnabled())return!
1;if(u.showUpsellOnSuggestionsList&&u.showUpsellOnSuggestionsList())return!
0;for(f=t.config.enabledDataSources.filter(function(t){return t!
=n.MRUDataSource}),n.isBingEnabled()&&r!=i.Web&&(f=f.filter(function(t){return t!
=n.WebDataSource})),s=function(n){rt(n,null)||(f=f.filter(function(t){return t!
=n.dataSource}))},e=0,o=u.enabledDataSources;e<o.length;e++)h=o[e],s(h);return
u.enabledDataSources.some(function(t){return n.contains(f,t.dataSource)})?!0:!
1}function nt(){if(t.windowsAccountType==0||t.cortanaAccountType==0)return
0;if(t.windowsAccountType!=t.cortanaAccountType)return 2;if(t.windowsAccountType!
=3)if(t.windowsIdentity&&t.cortanaIdentity){if(t.windowsIdentity!
=t.cortanaIdentity)return 2}else return 0;return 1}function gt(r,u,f,e,o,s){var
h=n.parseQuery(r,u,o),c,l,p,a,y,v;if(h.forceGroupOnTop=s,h.fullPartialQuery=h.query
ToFetch,h.scope=i.All,c=ii(h,e),c)h.isFormulatedQuery=!0;else
for(h.fullPartialQuery&&(ni(h),f&&h.scope!=f.scope&&(h.isFormulatedQuery=!0)),
(h.scope==i.All||h.scope==i.Web)&&(l=n.tryParseUrl(h.queryToFetch,!0),l&&l.type==0?
(h.isProtocol=!
0,h.fixedUrl=n.cleanAndFixUrlProtocol(l)):tt.test(h.queryToFetch)&&(h.isProtocol=!
0,h.fixedUrl=n.cleanAndFixUrlProtocol(h.queryToFetch))),c=t.ScopeConfig[h.scope],p=
h.queryToFetch?
c.enabledDataSources:c.enabledDataSourcesForZeroInput,a=0,y=p;a<y.length;a+
+)v=y[a],n.contains(t.config.enabledDataSources,v.dataSource)&&(h.enabledDataSource
s[v.dataSource]=v);return
ti(h),h.showProgressBar=t.isL2(h)&&t.config.dataSourcesWithProgressBar.some(functio
n(n){return!!h.enabledDataSources[n]}),h.equals=function(n){return(h.queryToFetch?
h.queryToFetch.toLowerCase():h.queryToFetch)==(n.queryToFetch?
n.queryToFetch.toLowerCase():n.queryToFetch)&&n.scope==h.scope&&(n.taskFrame?
n.taskFrame.raw:"")==(h.taskFrame?
h.taskFrame.raw:"")&&n.topHitRestriction==h.topHitRestriction},h.getCacheKey=functi
on(){return h.cursorPosition+h.queryToFetch.toLocaleLowerCase()
+h.scope+t.regionCache},h}function ni(t){var
f=n.isDataSourceEnabled("PT",null)&&it.test(t.fullPartialQuery),u,r;if(f)
{t.scope=i.PathCompletion;return}for(u in
e)if(HitHighlightingParser.removeDiacritics(t.fullPartialQuery.toLocaleLowerCase())
.replace(/\s+:/,":").startsWith(u+":"))
{r=t.originalQuery.indexOf(":");t.queryToFetch=t.originalQuery.substr(r+1);t.cursor
Position=Math.max(0,t.originalCursorPosition-r-
1);n.mantainCursorPositionIn(t.queryToFetch,t.cursorPosition,n.cleanQuery,function(
n,i)
{t.queryToFetch=n;t.cursorPosition=i});t.scope=e[u];t.scopePrefix=t.originalQuery.s
ubstr(0,r);t.isMultiWord=n.isMultiWord(t.queryToFetch);break}}function rt(i,r){var
u=i.requirementLevel?
i.requirementLevel():0;return(i.requiredCortanaCapabilities&&i.requiredCortanaCapab
ilities().length>0&&u<3&&(u=3),!t.isCortanaPersonalized&&u>=3)?!1:!
t.isCortanaEnabledCache&&u>=2?!1:!n.isBingEnabled()&&u>=1?!
1:i.requiredCortanaCapabilities&&!i.requiredCortanaCapabilities().every(function(i)
{return n.contains(t.availableCortanaCapabilities,i)})?!
1:i.conditionalRequirements&&!i.conditionalRequirements(r)?!1:!0}function ti(i){var
o,r,u,f,e;for(n.disableWebDataSourceIfNeeded(i,t.getMarketForBingAvailability()),o=
i.queryToFetch?
t.ScopeConfig[a(i)].enabledDataSources:t.ScopeConfig[a(i)].enabledDataSourcesForZer
oInput,r=0,u=o;r<u.length;r++)f=u[r],rt(f,i)||
n.disableDataSources(i,f.dataSource);i.queryToFetch||
(e=t.config.historySettingsPresent?
SearchAppWrapper.CortanaApp.queryFormulationView.searchHistory:undefined,e&&e.isDev
iceHistoryEnabled||n.disableDataSources(i,"PP","LRA","FL","LM","IFF"))}function
ii(i,r){var
u,h,o,f,s,e;if(r&&(u=r.scope,h=t.ScopeConfig[r.scope],l(u,t.ScopeConfig[u])&&(o=t.S
copeConfig[u].enabledDataSources.filter(function(n){return
ei(n.dataSource,r)}),o.length>0))){for(i.taskFrame=r,f=0,s=o;f<s.length;f+
+)e=s[f],n.contains(t.config.enabledDataSources,e.dataSource)&&(i.enabledDataSource
s[e.dataSource]=e);return h}return null}function ri(t){var
r=n.safeExecute(function(){return JSON.parse(t)},"parseTaskFrame"),u;return
r&&(u=ui(r),u!=i.All)?{raw:t,parsed:r,scope:u}:null}function ui(n){switch(n.Uri)
{case ut:var r=n,t=r.FileType;if(t&&t.Value){if(t.Value=="Picture")return
i.Photos;if(t.Value=="Video")return i.Videos}return i.Documents;case ft:return
i.Emails}return i.All}function a(n){return n.taskFrame?
n.taskFrame.scope:n.scope}function fi(n){var
e,t,o,s,h,u,c,r,f,l;if(n.taskFrame&&(e=n.taskFrame.parsed,e))if(n.taskFrame.scope==
i.Emails){if(t=e,o=t.Subject,o&&o.Value)return
o.Value;if(r=t.Body,r&&r.Value)return r.Value;if(s=t.From&&t.From.length>0?
t.From[0]:null,s&&s.Value)return s.Value;if(h=t.To&&t.To.length>0?
t.To[0]:null,h&&h.Value)return h.Value}else{if(u=e,c=u.Title,c&&c.Value)return
c.Value;if(r=u.Body,r&&r.Value)return
r.Value;if(f=u.People,f&&f[0]&&f[0].Value)return
f[0].Value;if(l=u.Place,l&&l.Value)return l.Value}return n.queryToFetch}function
ei(n,t){if(t.scope==i.Emails)return n=="SSEC"||n=="SSEE";var
u=t.parsed,r=u.FileSource?u.FileSource.Value:null;switch(n)
{case"MDOC":case"MPHO":case"MVID":return r!="onedrive"&&r!
="sharepoint";case"MODC":return r!="thispc"&&r!="sharepoint";case"SSEE":return r!
="thispc"&&r!="onedrive";default:return!1}}function oi(n){return
n&&n.originalQuery?t.flatListWithoutGroups:t.flatListWithoutGroupsZeroInput}var
i,e,tt,it,ut,ft;(function(n)
{n[n.All=0]="All";n[n.Apps=1]="Apps";n[n.Settings=2]="Settings";n[n.Photos=3]="Phot
os";n[n.Videos=4]="Videos";n[n.Music=5]="Music";n[n.Documents=6]="Documents";n[n.Fi
les=7]="Files";n[n.Folders=8]="Folders";n[n.Web=9]="Web";n[n.PathCompletion=10]="Pa
thCompletion";n[n.Emails=11]="Emails";n[n.People=13]="People"})(i=t.Scope||
(t.Scope={}));var
v=/،/g,et=["PP","QP","IBA"],ot=["ST","QS"],y=["LI","LV","MU"],st=["FL","LDOC","FD"]
.concat(y),ht=[i.Documents,i.Folders,i.Photos,i.Videos,i.Music];t.isApp=ct;t.isSett
ing=lt;t.isMedia=at;t.isFileOrFolder=vt;t.isFileOrFolderScope=yt;t.substrateProvide
rsEnabled=o;t.bingAtWorkProviderEnabled=pt;t.edgeBrowsingHistoryAvailable=b;t.edgeB
rowsingHistoryDS=f;t.searchHistoryAllowed=k;t.webZeroInput=c;t.setZeroInputDataSour
cesForL1=wt;t.populateScopeConfig=d;d();t.cleanScopePrefixes=bt;t.scopeListRequires
Update=!
1;t.initScopePrefixes=kt;t.getScopeDisplayName=dt;t.isScopeEnabled=l;t.qfMode=0;t.a
lwaysWide=!1;t.searchBoxOnTop=!1;t.flatListWithoutGroups=!
1;t.flatListWithoutGroupsZeroInput=!
1;t.maxSuggestionsWhenFlatList=0;t.previewPaneAvailable=!1;t.zeroInputAvailable=!
1;t.scopesAvailable=!1;t.isMobileCache=SearchAppWrapper.CortanaApp.isMobile||
navigator.userAgent.toLowerCase().includes("xbox one")||
navigator.userAgent.toLowerCase().includes("hololens");t.isAndromedaCache=(SearchAp
pWrapper.CortanaApp.deviceInfo||"").toLocaleUpperCase().includes("WCOS;
ANDR");t.windowsAccountType=0;t.cortanaAccountType=0;t.getWindowsAndCortanaAccountI
dentityDiff=nt;tt=/^ht+ps?[;:]+|^www[.。]|^\/+/;it=/^[a-z]:\\|^%[^%]+%\\|
^\\/i;t.parseQuery=gt;t.parseTaskFrame=ri;ut="action://FindMyStuff/FindDocument";ft
="action://FindMyStuff/FindMessage";t.getEffectiveScope=a;t.getEffectiveQuery=fi;t.
shouldRenderFlatListWithoutGroups=oi})(t=n.WSB||(n.WSB={}))}(AutoSugges
t||(AutoSuggest={})),function(n){var t;(function(t){function et(n,t){return
n.type==t.type&&n.source==t.source}function st(n){switch(n)
{case"PP":return"Apps";case"ST":return"Settings";case"FL":return"Files";case"LM":re
turn"Media";default:return null}}function ht(n){switch(n)
{case"FL":case"LM":case"IFF":case"MFF":case"PT":case"CG":case"MDOC":case"MFOL":case
"MPHO":case"MVID":case"MMUS":case"EBH":return!
0;case"OSTMA":case"QS":case"PP":case"LRA":case"ST":case"PBI":case"MPP":case"MST":ca
se"IBA":return!1}throw new Error("New local data source "+n+" needs to be explicity
classified as potentially containing PII or not");}function ct(n){var t=e(n);return
n.deviceItem&&n.handoffType==2?t+"\t"+n.deviceItem.id:t+"\t"+n.query}function l(n)
{switch(n)
{case"MFF":case"FL":case"LM":case"IFF":case"MDOC":case"MPHO":case"MVID":case"MMUS":
case"MFOL":return!0;default:return!1}}function lt(n,i){if(!
t.IndexerQueryGenerator)return!1;switch(n)
{case"IBA":case"MDOC":case"MPHO":case"MVID":case"MMUS":case"MFOL":return!
0;case"IFF":return t.qfMode!=3&&!t.isAndromedaCache&&(k(i)||!
t.config.minLengthForIBAonL1||
i.queryToFetch.length>=t.config.minLengthForIBAonL1);default:return!1}}function
at(n){return l(n)||n=="IBA"||n=="EBH"}function vt(n){return
n&&(n.tagName.toLowerCase()=="body"||n.tagName.toLowerCase()=="iframe"||
n.className&&n.classList.contains("suggestion"))}function yt(n){return
n.kind=="Modern Setting"}function a(n){return t.isApp(n.type)?
n.deviceItem:null}function pt(n){var i=a(n),t;return i?i.packageFamilyName:
(t=n,t.packageFamilyName)?t.packageFamilyName:null}function wt(n){return
t.isFileOrFolder(n.type)?n.deviceItem:null}function v(n){switch(n)
{case"PBI":case"EBH":return!1}return!0}function bt(n){return v(n.type)?
n.deviceItem:null}function kt(n){return n.type=="CG"?n.deviceItem:null}function
dt(n){return n.type=="PT"?n.deviceItem:null}function gt(n){return n.type=="PBI"?
n.deviceItem:null}function y(n){return n.type=="EBH"?n.deviceItem:null}function
ni(n){return n&&n.classList.contains("scopeTile")}function ti(n){return
n&&(n.id==="optInYesBtn"||n.id==="optInNoBtn")}function e(n)
{if(t.isApp(n.type))return i.Apps;if(s(n))return
n.groupType;if(t.isSetting(n.type))return i.Settings;switch(n.type){case"CG":return
i.Command;case"PT":return i.PathCompletion;case"LI":return i.Photos;case"LV":return
i.Videos;case"MU":return i.Music;case"PBI":return
i.PowerBi;case"FL":case"LDOC":case"SDFE":return i.Documents;case"FD":return
i.Folders;case"OLE":case"OWA":return i.Emails;case"PPL":return
i.People;case"EBH":return i.EdgeHistory;case"BKS":return
i.Bookmarks;case"ELA":return i.LocalPlaces;default:switch(n.handoffType){case
3:return i.Store;case 5:case 4:return i.Cortana;case 10:return n.htmlContent?
i.SearchSuggestions:i.Cortana;case 0:case 13:case 14:return
i.SearchSuggestions;case 1:return i.Websites}throw new Error("Unexpected handoff
type: "+n.handoffType);}}function ii(n){return n.click&&!n.instItem}function o(n)
{switch(n){case i.JumpListTasks:case i.JumpListPinned:case i.JumpListRecent:case
i.JumpListFrequent:case i.JumpListCustom:return!0;default:return!1}}function p(n)
{return n.notAResult&&n.type!="SW"&&n.type!="PWL"}function ri(n){return
t.config.recourseOnlyInGroups&&n.suggestions.every(function(n){return
p(n)})}function ui(n){var t=n.type;return o(t)||t==i.Related||t==i.Contact}function
fi(n){if(o(n))return i.Apps;if(n==i.Related)return
i.SearchSuggestions;if(n==i.Contact)return i.People;throw new Error("Not a top hit
child group: "+n);}function s(n){return!!n.parent}function ei(n){return
n.type=="JL"}function w(n){switch(n){case i.Apps:case i.Store:return
t.Scope.Apps;case i.Settings:return t.Scope.Settings;case i.Documents:return
t.Scope.Documents;case i.Folders:return t.Scope.Folders;case i.Photos:return
t.Scope.Photos;case i.Videos:return t.Scope.Videos;case i.Music:return
t.Scope.Music;case i.LocalPlaces:case i.SearchSuggestions:case i.Websites:case
i.EdgeHistory:case i.Bookmarks:return t.Scope.Web;case i.Emails:return
t.Scope.Emails;case i.People:return t.Scope.People}return t.Scope.All}function
oi(n){switch(n){case 0:return t.IconSize_TopResult;case 1:return
t.IconSize_Suggestion;case 2:return t.IconSize_GridLayout_Scaled;case 3:return
t.IconSize_StartMenu;case 4:return t.IconSize_Preview}throw new Error("Unsupported
image size: "+n);}function si(n,t,i){if(n&&n.type==0&&g(t)){var u=function(t)
{n.ratio=t.height==t.width?1:t.height>t.width?3:2;i()},r=new
Image;r.src=n.content;r.onload=function(){return
u({height:r.height,width:r.width})}}else i()}function hi(){var
n=t.uiLanguageCache.toLocaleLowerCase();return b[n]||n}function
ci(n,t,i,r,u,f,e,o,s,h,c)
{return{text:n,getIcon:t,icon:i,type:r,query:u,ciMatchedQuery:null,id:h,click:c,han
doffType:e,instItem:f,isAnswer:!1,htmlContent:null,classNames:[],selected:!
1,featureStore:undefined,sequenceNumber:o,getMruData:function(){return
null},template:0,mayContainPII:s,features:[]}}function li(n,t)
{if(n.htmlContent)return null;var i=y(n)?[n.primaryMetadata||n.text]:
[n.text],r=n.receivedDate;return r&&i.push(r),t?i.push(t):
(n.primaryMetadata&&i.push(n.primaryMetadata),n.template==1&&n.secondaryMetadata&&i
.push(n.secondaryMetadata)),HitHighlightingParser.removeMarkers(i.join(",
"))}function k(n){return n.scope!=t.Scope.All||!!n.taskFrame}function d(n){return
typeof n=="string"?n=="LI"||n=="LV":n==i.Photos||n==i.Videos}function g(n){return
d(n)||n=="PPL"}function ai(n){return!t.alwaysWide&&t.qfMode!=3&&d(n)}function
vi(n,i){var f,u,e,r;if(!n||!t.scopesAvailable)return null;if(i.scope==t.Scope.All)
{if(f=[],n.ISUPN&&n.ISUPG)if(u=n.ISUPN.split("\t"),e=n.ISUPG.split("\t"),u.length==
e.length)for(r=0;r<u.length;r++)f.push(e[r]+"\t"+u[r]);else
SharedLogHelper.LogError("parseWebSuppressionSignals",null,new
Error("parsedNames.length !=
parsedGroups.length"));return{fullySuppressedGroups:n.FSUP?
n.FSUP.split("\t"):null,partiallySuppressedGroups:n.PSUP?
n.PSUP.split("\t"):null,suppressedSuggestions:f}}return null}function yi(t){return
r||(r=_d.createElement("span")),n.safeExecute(function(){return
r.innerHTML=t,r.innerText},t,"decodeHtml")}function pi(n,t)
{return{matchType:n,matchedText:t}}function tt(n){return n.replace(nt,"\\
$&")}function wi(n,t){if(t){var
u=n.includes(HitHighlightingParser.startMarker),e=u?
n:HitHighlightingParser.addMarkers(n,t),f=HitHighlightingParser.split(e).find(funct
ion(n){return n.highlighted});if(f){var r=u?
HitHighlightingParser.removeMarkers(n):n,o=new RegExp("((?:\\\\[^\\\\]+)?\\\\
[^\\\\]+)?\\\\"+tt(f.text)
+".*","i"),i=o.exec(r);if(i&&i[0])return{matchType:h.Location,matchedText:r.startsW
ith(i[0])?r:String.fromCharCode(8230)+i[0]}}}return null}function bi(n,t){if(t){var
r=n.includes(HitHighlightingParser.startMarker),o=r?
n:HitHighlightingParser.addMarkers(n,t),u=HitHighlightingParser.split(o).find(funct
ion(n){return n.highlighted});if(u){var f=r?
HitHighlightingParser.removeMarkers(n):n,s=new RegExp("(?:\\S+\\s)
{0,3}\\b"+tt(u.text)+"\\S*(?:\\s\\S+){0,5}","i"),i=s.exec(f),e=void 0;return
i&&i[0]&&(e={matchType:h.Content,matchedText:i[0]}),
[f,e]}}return[null,null]}function ki(n,t){return
n&&t&&HitHighlightingParser.addMarkers(n,t).includes(HitHighlightingParser.startMar
ker)}function di(n){return n==t.Scope.Emails}function gi(n){return
n.isAnswer&&(n.handoffType==13||n.handoffType==14||n.handoffType==0&&(!!
n.additionalInfoText||!!n.secondaryIcon))}function nr(n){if(s(n))return!
1;switch(n.handoffType){case 0:case 13:case 14:case 5:case 10:case 4:return!0;case
3:return n.type=="STS";case 2:return n.type=="PBI"||n.type=="SDFE";case 8:case
12:return n.type=="OWA";default:return!1}}function c(r){if(!
t.previewPaneAvailable)return 0;switch(e(r)){case i.Store:return(t.alwaysWide||
t.config.enableLocalPreviewPaneInSingleColumn)&&r.type!="STS"?2:0;case i.Apps:case
i.PowerBi:case i.Cortana:case i.Command:case i.Documents:case i.Folders:case
i.Music:case i.PathCompletion:case i.Emails:case i.Photos:case i.Settings:case
i.Videos:return t.alwaysWide||t.config.enableLocalPreviewPaneInSingleColumn?
2:0;case i.People:return r.handoffType==0?1:t.alwaysWide||
t.config.enableLocalPreviewPaneInSingleColumn?2:0;case i.Websites:return
n.isBingEnabled()&&r.type!="LURL"?1:0;default:return
n.isBingEnabled()&&n.contains([0,13,14],r.handoffType)&&!r.htmlContent?
1:0}}function tr(){return t.qfMode==3||t.qfMode==2?null:t.regionCache}function
ir(n,t,i){var r=c(i);return r==0?!
1:t.query.toLocaleLowerCase()==i.query.toLocaleLowerCase()&&r==c(t)}function rr(n)
{return n==null}function ur(r,u){return
r==i.Documents&&t.isSubstrateO365AccountConnected||
t.isFileOrFolderScope(w(r))&&(n.isDataSourceEnabled("ODC",u)||
n.isDataSourceEnabled("MODC",u))}function fr(n,t){switch(n){case
2:return"OneDrive";case 3:return t.getLocString("OneDriveForBusiness");case
4:return"SharePoint";case 1:return t.getLocString("ThisPC")}return null}function
er(n){if(ThresholdUtilities.isRightToLeftLanguage(t.uiLanguageCache))switch(n){case
37:return 39;case 39:return 37}return n}function or()
{return{content:"&#xE721",type:2}}function sr(n){return
n.getLocString("SearchSuggestions")}function hr(n){return
n.getLocString("Websites")}function cr(n){return
n.getLocString("SeeWebResults")}function lr(n,t){var i="b_hide";n&&(t?
n.classList.remove(i):n.classList.add(i))}function ar(){u={}}function rt(t){var
i=u[t],r;return typeof
i=="undefined"&&(r=SearchAppWrapper.CortanaApp.queryFormulationView.deviceSearch,r.
getFolderPathFromKnownFolderIdGuid?(i=n.safeExecute(function(){return
r.getFolderPathFromKnownFolderIdGuid(t)},"getPathFromFolderID","",t),i=i.toLocaleLo
werCase()):i="",u[t]=i),i}function vr(){f={}}function yr(n){var t,i;return
n.startsWith("{")?(t=f[n],t||(i=n.match(ut),t=i?rt(i[1])
+i[2]:n,f[n]=t),t):n}function pr(n){return
n.startsWith("file:")&&(n=n.slice(5)),n.replace(/\//g,"\\")}function wr(n){return
t.config.enforceOriginalOrderForTypes[n.type]||
t.config.enforceOriginalOrderForTypes[n.type+"|"+n.handoffType]}function br(n)
{switch(n){case 2:return
0;case 1:return 1;default:throw new Error("Not a logged in account:
"+n);}}function kr(n){return n==1?
t.config.useSRR?"https://substrate.office.com":"https://outlook.office.com/autosugg
est":"https://substrate.office.com/SubstrateSearch-Internal.ReadWrite"}function
dr(n){return
n==1?"https://www.bing.com/cortana":"service::cortana.bing.com::mbi_ssl"}function
ft(){return t.config.useCortanaAccountFor3S&&t.cortanaAccountType!
=3?"Cortana":"Windows"}function gr(){return ft()=="Windows"?
t.windowsAccountType:t.cortanaAccountType}function nu(){return t.qfMode==3||
t.isAndromedaCache}var i,ot,b,r,h,nt,it,u,f,ut;(function(n)
{n[n.Apps=0]="Apps";n[n.Settings=1]="Settings";n[n.Cortana=2]="Cortana";n[n.Command
=3]="Command";n[n.Photos=4]="Photos";n[n.Videos=5]="Videos";n[n.Music=6]="Music";n[
n.Documents=7]="Documents";n[n.Folders=8]="Folders";n[n.Emails=9]="Emails";n[n.Stor
e=10]="Store";n[n.SearchSuggestions=11]="SearchSuggestions";n[n.PathCompletion=12]=
"PathCompletion";n[n.PowerBi=13]="PowerBi";n[n.JumpListTasks=14]="JumpListTasks";n[
n.JumpListPinned=15]="JumpListPinned";n[n.JumpListRecent=16]="JumpListRecent";n[n.J
umpListFrequent=17]="JumpListFrequent";n[n.JumpListCustom=18]="JumpListCustom";n[n.
People=20]="People";n[n.EdgeHistory=21]="EdgeHistory";n[n.LocalPlaces=22]="LocalPla
ces";n[n.Bookmarks=25]="Bookmarks";n[n.Related=26]="Related";n[n.Websites=27]="Webs
ites";n[n.Contact=28]="Contact";n[n.JumpListSynthetic=29]="JumpListSynthetic";n[n.J
umpListActions=30]="JumpListActions";n[n.GroupHeader=104]="GroupHeader"})
(i=t.GroupType||(t.GroupType={}));t.sameGroup=et,function(n){n.KValues=function()
{var n={};return
n.GPT=108,n.GT=109,n.GW=110,n.SW=114,n.PWL=115,n.STS=116,n.SBI=117,n.SBV=118,n.SDSC
=119,n.SDIO=120,n.IMIO=121,n.COFA=122,n.COOA=124,n.SDFE=126,n.OWA=128,n.OMCS=129,n.
OMIO=130,n.OMCN=131,n.OMCD=132,n.OMAC=133,n.OMSC=134,n.OMVA=135,n}
();n.HandoffsForNonSuggestions=function(){var n={};return
n.GPT=2,n.GT=3,n.GW=0,n.SDSC=2,n.SDIO=2,n.IMIO=2,n.COFA=2,n.COOA=2,n}
();n.GroupsForNonSuggestions=function(){var n={};return
n.GPT=i.GroupHeader,n.GT=i.GroupHeader,n.GW=i.GroupHeader,n.SDSC=i.Settings,n.SDIO=
i.Settings,n.IMIO=i.Settings,n.COFA=i.Settings,n.COOA=i.Settings,n}()}
(ot=t.SyntheticQSCodesMaps||
(t.SyntheticQSCodesMaps={}));t.GroupHeaderQSCodes=function(){var n={};return
n[i.PathCompletion]="GPT",n[i.Store]="GT",n[i.SearchSuggestions]="GW",n}
();t.providerFailureLogName=st;t.localDataSourceMayContainPII=ht;t.getSuggestionKey
=ct;t.MRUDatabaseName="mruWithIndex";t.isFileOrFolderLocalDataSource=l;t.supportsSh
ortcuts=lt;t.isIndexerBasedDataSource=at;t.isBodyOrSuggestion=vt;t.isModernSetting=
yt;t.getAppItem=a;t.getAppPfn=pt;t.getFileItem=wt;t.isItemWithFileMetadata=v;t.getI
temWithFileMetadata=bt;t.getCommandLineItem=kt;t.getPathCompletionItem=dt;t.getPowe
rBiItem=gt;t.getBrowsingHistoryItem=y;t.isScopeTile=ni;t.isOptInBtn=ti;t.getGroupTy
pe=e;t.canGoToL2=ii;t.isJumpListGroup=o;t.isRecourse=p;t.useMoreSearchOptionsHeader
=ri;t.isTopHitChildGroup=ui;t.getParentSuggestionGroupType=fi;t.isChildSuggestion=s
;t.isJumpListSuggestion=ei;t.getScope=w;t.IconSize_Suggestion=16;t.IconSize_StartMe
nu=24;t.IconSize_TopResult=32;t.IconSize_Preview=64;t.IconSize_GridLayout=92;t.Icon
Size_GridLayout_Medium=68;t.IconSize_GridLayout_Scaled=130;t.getImageSizeValue=oi;t
.populateImageRatio=si;b={"zh-hans-cn":"zh-cn","zh-hans-sg":"zh-cn","zh-hant-
hk":"zh-hk","zh-hant-tw":"zh-tw",ko:"ko-kr",ja:"ja-jp",nb:"nb-
no"};t.getCurrentLanguage=hi;t.createSuggestion=ci;t.getNarratorText=li;t.isL2=k;t.
iconIsThumbnail=g;t.displayedInGridLayout=ai;t.parseWebSuppressionSignals=vi;t.deco
deHtml=yi,function(n)
{n[n.Author=1]="Author";n[n.LastModifiedBy=2]="LastModifiedBy";n[n.Content=3]="Cont
ent";n[n.Tags=4]="Tags";n[n.Album=5]="Album";n[n.Artist=6]="Artist";n[n.Genre=7]="G
enre";n[n.Location=8]="Location"}(h=t.MatchType||
(t.MatchType={}));t.createMatch=pi;nt=/[-[\]{}()*+!<=:?.\/\\^$|
#\s,]/g;t.tryGetLocationMatch=wi;t.tryGetTextContentMatch=bi;t.matchesOnPropertyHH=
ki;t.uses3lineTemplate=di;t.isLightAnswer=gi;t.hasReverseHighlighting=nr;t.supports
Preview=c;t.getMarketForBingAvailability=tr;t.isEquivalentForPreviewPanePurposes=ir
;t.isNullOrUndefined=rr;it=function(){function n(n,t,i)
{this.verb=n.verb;this.displayName=n.displayName;this.executeSync=n.executeSync?
function(){return i(function(){return n.executeSync()})}:function(){return
i(function(){return
n.executeAsync()})};this.isDefault=n.isDefault;this.icon=t;this.getIcon=n.getIcon}r
eturn n}
();t.DeviceItemVerbWrapper=it;t.shouldSetThisPcGroupSource=ur;t.getGroupSourceDispl
ayName=fr;t.IndexingOptionsSettingId="Classic_{87d66a43-7b11-4a28-9811-
c86ee395acf7}";t.EdgeAppId="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!
MicrosoftEdge";t.getRtlAdjustedKey=er;t.getSearchSuggestionIcon=or;t.getWebSuggesti
onsGroupHeader=sr;t.getWebsitesGroupHeader=hr;t.getWebSuggestionAnnotation=cr;t.set
Visibility=lr;t.FOLDERID_Profile="{5E6C858F-0E22-4760-9AFE-
EA3317B67173}";t.FOLDERID_SkyDrive="{A52BBA46-E9E1-435f-B3D9-
28DAA648C0F6}";t.FOLDERID_System="{1AC14E77-02E7-4E5D-B744-
2EB1AE5198B7}";t.FOLDERID_SystemX86="{D65231B0-B2F1-4857-A4CE-
A8E7C6EA7D27}";u={};t.clearFolderCaches=ar;t.getKnownFolderPathLC=rt;f={};t.clearPa
thExpansionCache=vr;ut=/^\{([a-z0-9-]{36})\}
(.*)/i;t.resolveKnownFolderGUIDsInPath=yr;t.indexerFilePathToRegularPath=pr;t.enfor
ceOriginalOrder=wr;t.accountTypeToAuthType=br;t.getSubstrateResourceOrScope=kr;t.ge
tBingResourceOrScope=dr;t.getAuthAccountForCloudContent=ft;t.getAccountTypeForCloud
Content=gr;t.isSmallerAnswersUX=nu})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var t,i,r;(function(n)
{n.checking="checking";n.downloading="downloading";n.error="error";n.noUpdate="noup
date";n.obsolete="obsolete";n.updateReady="updateready"})(t||
(t={}));i=[t.checking,t.downloading,t.error,t.noUpdate,t.obsolete,t.updateReady];r=
function(){function r(n,t,i){i===void
0&&(i=Date.now);this._autoSuggestHost=n;this._instrumentationHelper=t;this.getNowTi
mestamp=i;this._appCacheEventIndex=1;this._superFreshEnabled=!
1;this._appCache=_w.applicationCache;this.subscribeForEvents()}return
r.prototype.instrumentSuperFreshUpdate=function(n){this._appCacheTimeline||
(this._appCacheTimeline=this.createAppCacheTimelineObject());this._appCacheTimeline
.SuperFreshUpdateData.T=this.getNowTimestamp();this._appCacheTimeline.SuperFreshUpd
ateData.S=n;this.sendAppCacheEvents()},r.prototype.registerSuperFresh=function()
{this._superFreshEnabled=!0},r.prototype.subscribeForEvents=function(){var
n=this;i.forEach(function(t,i){return sj_be(n._appCache,t,function(){return
n.handleAppCacheEvent(t,i)})})},r.prototype.handleAppCacheEvent=function(n,i){n!
=t.checking&&this._appCacheTimeline||
(this._appCacheTimeline=this.createAppCacheTimelineObject());this._appCacheTimeline
.AppCacheEvents[i]=this.getNowTimestamp();switch(n){case
t.obsolete:SharedLogHelper.LogError("handleAppCacheEvent",null,"AppCache marked as
obsolete and will be deleted");this.sendAppCacheEvents();break;case t.error:case
t.noUpdate:this.sendAppCacheEvents();break;case
t.updateReady:this._superFreshEnabled||
this.sendAppCacheEvents()}},r.prototype.sendAppCacheEvents=function(){var
f=_G.ServerIG,t,r,u,i;if(!f){SharedLogHelper.LogError("sendAppCacheEvents","Could
not instrument as server IG not known",new Error("Could not instrument app cache
event"));return}
(t=this._appCacheTimeline,t)&&(r=t.AppCacheEvents,u=[{I:t.EventIndex,E:r,S:t.SuperF
reshUpdateData,ABT:this._instrumentationHelper.getConversationStartTimestamp()}],r[
2]&&(u[0].OL=navigator.onLine),i=n.InstrumentationCommon.createPerfPingEvent(f,u,"A
ppCache",this._autoSuggestHost.getConversationId()),Log2.LogEvent(i.EventType,i.Dat
a,n.InstrumentationCommon.QFPERFPING_EVENT_NAME,null,null,i.ImpressionGuid,null,nul
l),this._appCacheTimeline=this.createAppCacheTimelineObject())},r.prototype.createA
ppCacheTimelineObject=function(){var
n={EventIndex:this._appCacheEventIndex,AppCacheEvents:{},SuperFreshUpdateData:
{T:undefined,S:undefined}};return this._appCacheEventIndex++,n},r}
();n.AppCacheInstrumentationHelper=r}(AutoSuggest||(AutoSuggest={})),function(n)
{var t;(function(t){var
u=["PP","ST","FL","LM"],i=SearchAppWrapper.CortanaApp,r=i.queryFormulationView,f=fu
nction(){function f(n){var i=this;this._host=n;this._startupPerfLogged=!
1;t.config.logTimeToFocus&&(n.bindConversationStart(function(){return
i._startupPerfLogged=!1}),n.bindQueryChangedOrInitialized(function(n){return
i.logClientPerfMetric(n)}))}return
f.prototype.logProfilerMarker=function(n,t,r,u,f){f||(f={});n==1?
i.logMeasure("Bing_QF_"+r,t,"QF",JSON.stringify(f),u):i.logVerboseTrace("Bing_QF_"+
r,t,"QF",JSON.stringify(f),u)},f.prototype.getEnrichedClientInfo=function(n){var
u={},f;return
u.entryPoint=i.entryPoint,u.previousExperience=r.previousExperience,u.qfMode=""+t.q
fMode,n&&n.scope!
=t.Scope.All&&(u.scope=t.Scope[n.scope]),f=r.searchHistory,u.deviceHistoryEnabled=f
&&f.isDeviceHistoryEnabled?1:0,t.windowsAccountType!
=0&&(u.windowsAccount=t.windowsAccountType.toString()),t.cortanaAccountType!
=0&&(u.cortanaAccount=t.cortanaAccountType.toString()),t.isSubstrateO365AccountConn
ected&&(u.o365Connected=1),t.isSubstrateOutlookAccountConnected&&(u.outlookConnecte
d=1),this._host.hasFallbackHappened()&&(u.fallback=1),this._host.isClientLocationAv
ailable()&&(u.clientLocationAvailable=1),i.searchBox.isInputPaneVisible&&(u.isInput
PaneVisible=1),(t.windowsAccountType==2||
t.windowsAccountType==1)&&(t.cortanaAccountType==2||
t.cortanaAccountType==1)&&t.getWindowsAndCortanaAccountIdentityDiff()==2&&(u.diffAc
cForWindowsCortana=1),t.isMobileCache||(i.appsUseLightTheme===!
1&&(u.darkMode=1),i.colorPrevalenceEnabled&&(u.colorPrevalence=1),i.isSearchBoxInTa
skbar&&(u.searchBoxInTaskbar=1),i.taskbarOrientation&&(u.taskbarOrientation=i.taskb
arOrientation)),t.qfMode==3&&(u.ntpPageType=i.newTabPage.pageInfo.pageType,u.edgeEx
periments=i.newTabPage.edgeExperiments,u.ntpMuid=i.newTabPage.ntpExperiments.ntpMui
d,u.ntpExperiments=i.newTabPage.ntpExperiments.ntpExperiments),u},f.prototype.getSu
ggestionsPageName=function(){return"Page.Sma
rtSearch.AS.Suggestions"},f.prototype.getApplicationName=function()
{return"SmartSearch"},f.prototype.getRankerModelId=function(){return
t.config.mainRankerId},f.prototype.createNonSuggestionDataSourceObject=function(n,i
)
{return{T:"D.Url",K:i.getKValue(),Val:n,Ho:t.SyntheticQSCodesMaps.HandoffsForNonSug
gestions[n],Gr:t.SyntheticQSCodesMaps.GroupsForNonSuggestions[n],NR:1}},f.prototype
.createDataSourceObject=function(i){var f=this,e=i.mayContainPII&&!
t.config.th,r={T:"D.Url",K:i.instItem.getKValue(),Q:e?
undefined:i.query,MQ:i.ciMatchedQuery?
i.ciMatchedQuery:undefined,Val:i.type,Ho:i.handoffType,Ans:i.isAnswer?
1:undefined,Gr:t.getGroupType(i),HC:i.hc?1:undefined,RAF:i.useRaf?
1:undefined,HS:i.fromHistory?1:undefined,F:i.features.length>0?
i.features.join(","):undefined,AC:i.autoCompleteType?
i.autoCompleteType:undefined,HCMS:i.highConfidenceMetaSuggestionScore,HCS:i.highCon
fidenceSuggestionScore,LM:i.suggestionLogMeta,Uri:i.actionUri,Src:i.source,Sg:i.seg
ments,NR:i.notAResult?1:undefined},u;return i.deviceItem?
r.DeviceSignals=n.safeExecute(function(){return
f.buildDeviceItemDataSource(e,i)},"buildDeviceItemDataSource"):t.isJumpListSuggesti
on(i)&&(r.DeviceSignals=n.safeExecute(function(){return
f.buildJumpListItemDataSource(i)},"buildJumpListItemDataSource")),t.config.th&&(u=i
,u.path&&(r.path=u.path),u.targetPathLC&&(r.targetPath=u.targetPathLC)),r.RankerSig
nals=this.buildRankerOutputDataSource(i),r},f.prototype.buildRankerOutputDataSource
=function(n){if(!n.rankingScore&&!n.featureStore)return
undefined;return{rankingScore:n.rankingScore,featureStore:n.featureStore,mruSuppres
sionScore:n.mruSuppressionScore,fbcScore:n.fbcScore,previewPaneScore:n.previewPaneS
core}},f.prototype.buildJumpListItemDataSource=function(i){var
u=i.jumpListItem,r={Rank:u.usagePoints||
undefined,LAD:n.isValidDate(u.lastAccessed)?
u.lastAccessed.toJSON():undefined};if(t.config.th)r.path=u.path,r.description=i.too
ltip;else if(!r.Rank&&!r.LAD)return undefined;return
r},f.prototype.buildDeviceItemDataSource=function(i,r){var
e=r.deviceItem,u={Rank:e.rankScore},f,s,h,o;if(e.propertyHits&&e.propertyHits.lengt
h>0&&(u.PHits=e.propertyHits.join(",")),i||(u.Id=e.id,u.DName!
=r.query&&(u.DName=e.displayName)),t.config.th&&(u.kind=e.kind),t.isSetting(r.type)
)return u.MDN=t.isModernSetting(e)?1:0,u;if(f=t.getAppItem(r),f)return
u.LAD=n.isValidDate(f.lastAccessed)?
f.lastAccessed.toJSON():undefined,u.AppLnch=f.totalLaunches,u.Args=f.launchArgument
s?1:0,u.MDN=f.isImmersive?
1:0,u.Ext=f.extension,t.config.th&&(u.CDT=n.isValidDate(f.createdDate)?
f.createdDate.toJSON():undefined,u.LMD=n.isValidDate(f.lastModifiedDate)?
f.lastModifiedDate.toJSON():undefined,u.launchArguments=f.launchArguments,u.filePat
h=f.filePath),u;if(s=t.getItemWithFileMetadata(r),s)
{if(u.Ext=s.extension,t.config.th&&(u.itemTypeDisplayName=s.itemTypeDisplayName),h=
t.getCommandLineItem(r),h)return
t.config.th&&(u.launchArguments=h.launchArguments,u.encodedPath=h.encodedPath),u;t.
getPathCompletionItem(r)||(o=r.deviceItem,u.CDT=n.isValidDate(o.createdDate)?
o.createdDate.toJSON():undefined,u.LMD=n.isValidDate(o.lastModifiedDate)?
o.lastModifiedDate.toJSON():undefined,u.Ext=o.extension?o.extension:"")}return
u},f.prototype.logMasterPageImpression=function(t){n.safeExecute(function(){return
ThresholdInst.LogPageImpression(t,null,t.enrichedClientInfo)},"logMasterImpressionF
orClient")},f.prototype.logDataSourceTimeout=function(i,f){var
s,e,o,h;if(r.logProviderFailure)for(s=function(u){n.isDataSourceEnabled(u,f)&&!
n.contains(i,u)&&n.safeExecute(function(){return
r.logProviderFailure(t.providerFailureLogName(u),"NoReturnForTopHit")},"logProvider
Failure")},e=0,o=u;e<o.length;e++)h=o[e],s(h)},f.prototype.onItemClick=function()
{r.resetConversationIdNextTimeQFIsShown&&r.resetConversationIdNextTimeQFIsShown()},
f.prototype.logClientPerfMetric=function(){if(!
this._startupPerfLogged&&i.isCenterScreen){this._startupPerfLogged=!0;var
f=n.cleanGuid(this._host.getRawImpressionGuid()),r=this.getClientPerfMetric(39),u=t
his.getClientPerfMetric(38),t=u-r;(t<=0||
r==n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE||
u==n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE)&&(t=n.InstrumentationCommon.
QFPERFPING_INVALID_MEASURE);Log2.LogEvent("ClientPerf",
{TTF:t.toString()},"SearchBoxFocused",null,null,f,null,null)}},f.prototype.getClien
tPerfMetric=function(t){var
r=n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE,u=i.proactiveView?
i.proactiveView.perfMetrics:null;if(u)try{r=u.lookup(t).getTime();r=r<=0?
n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE:r}catch(f){}return r},f}
();t.WSBInstrumentationProvider=f})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var
i="/QF_KEYSTROKE_VIRTUAL_URL?",r="autosuggest",t,u=function(){function u(i,r){var
u=this,f;this._host=i;this._clientInstrumentationProvider=r;this._conversationStart
Timestamp=n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE;this._keystrokesPerfPi
ngData={};this._keystrokesInstrumentationData={};ClientInstConfig.queueDumpInterval
=n.config.logQueueDumpInterval;_w.ClTrCo.SharedClickSuppressed=!
0;i.bindConversationStart(function(){return
u.onConversationStart()});n.config.th&&(ClientTestHooks.isTesthookParamSet("perfTra
ce")&&(t=!0),f=n.log,n.log=function(n,t){t||
u.instrumentDebugEvent(n);f(n,t)})}return u.prototype.getImpressionGuid=function(n)
{var t=this._keystrokesInstrumentationData[n];if(t&&t.ImpressionGuid)return
t.ImpressionGuid;throw"getImpressionGuid(): No IG for sequence
"+n;},u.prototype.instrumentItemClick=function(t,i,r,u,f,e,o,s,h)
{this.logCustomGPing(t,f,i.getHValue(),o,e,s,h);var
l=this._keystrokesInstrumentationData[r],c=this._keystrokesInstrumentationData[r];c
?(l.RenderingStarted||this.updatePageIG(r),_G.IG!
=c.ImpressionGuid&&SharedLogHelper.LogError("instrumentItemClick","IG
("+c.ImpressionGuid+") for sequenceNumber "+r+" does not match the page IG
("+_G.IG+")",new Error("IG for sequence number does not match the currently
rendered page's IG
(_G.IG)"))):SharedLogHelper.LogError("instrumentItemClick","sequenceNumber: "+r+"
ConversationID: "+this._host.getConversationId(),new Error("No instrumentation data
found for
sequenceNumber"));this.finalizeKeystrokeLog(r,1);u&&u();this._clientInstrumentation
Provider.onItemClick();n.config.forceLogFlush?
Log2.ForceFlush():Log2.FlushMainQueueDontForce();_w.clickFlushedTime=sb_gt()},u.pro
totype.logCustomGPing=function(t,i,r,u,f,e,o){var s={},h;u&&(s.cm=u);switch(i){case
1:s.i="k";s.mk=this.getModifierKeyCodes(f);break;case 3:s.i="t";break;case
4:s.i="p";break;case 5:s.i="n";break;case 6:s.i="b";break;case
0:s.i="x";s.mk=this.getModifierKeyCodes(f);break;default:s.mk=this.getModifierKeyCo
des(f)}e&&(s.pp=e,o&&(s.ppit=o));h=r;n.isEmpty(s)||
(h+="&PR="+JSON.stringify(s));n.safeExecute(function(){return
_w.si_T(h,null,null,0,t)},"logCustomGPing")},u.prototype.getModifierKeyCodes=functi
on(n){if(n){var
t=n.altKey?"A":"";if(t+=n.ctrlKey?"C":"",t+=n.shiftKey?"S":"",t)return t}return
undefined},u.prototype.logClientInstEvent=function(n,t,i,r){var
f=null,u;i&&(u=this._keystrokesInstrumentationData[i],u&&(f=u.ImpressionGuid));Log2
.LogEvent(n,r,t,null,null,f,null,null)},u.prototype.safeInstrument=function(n,t,i,r
){var u=this._keystrokesInstrumentationData[n];u?t(u):SharedLogHelper.LogError(i,
(r?r+" ":"")+" sequenceNumber: "+n,new Error("No instrumentation data found for
sequenceNumber"))},u.prototype.safeInstrumentPerf=function(n,t,i,r){var
u=this._keystrokesPerfPingData[n];u?t(u):SharedLogHelper.LogError(i,(r?r+" ":"")+"
sequenceNumber: "+n,new Error("No instrumentation data found for
sequenceNumber"))},u.prototype.instrumentRenderingStarted=function(n){var
t=this;this.safeInstrument(n,function(i){i.RenderingStarted=!
0;t.updatePageIG(n)},"instrumentRenderingStarted")},u.prototype.instrumentBeginRequ
est=function(t,i,r){var u;delete this._keystrokesInstrumentationData[t-
1];n.InstrumentedItem.resetKValues(t);u=this._keystrokesPerfPingData[t];u&&SharedLo
gHelper.LogError("instrumentBeginRequest","sequenceNumber: "+t,new Error("Duplicate
BeginRequest for sequenceNumber"));var
f=this._host.getConversationId(),e=this._host.getRawImpressionGuid(),o=n.cleanGuid(
e),s=n.getCurrentTime()-
r,h={ImpressionGuid:o,ConversationId:f,Query:i,PendingDataSources:{},DataSources:
{},RankerExtraInfo:{},DuplicateDS:{},Layout:[],MasterPageImpressionCreated:!
1,RenderingStarted:!1,PendingInstrumentedItems:{},PendingSyntheticSuggestions:
{},OriginalTimestamp:s},c={RawImpressionGuid:e,ImpressionGuid:o,ConversationId:f,Pr
efixLength:i.queryToFetch?
i.queryToFetch.length:0,RequestBegin:this.getOffsetedNow(s),ResponseReceived:
{},DataSourcesState:this._searchServiceStatus?
{Indexer:this._searchServiceStatus}:undefined,RenderFinished:
{},AllDataSourcesProcessed:!1,PendingIcons:0,TopResultRendered:[],IconsRetrieved:
{},ResponseFromCache:
{}};this._keystrokesInstrumentationData[t]=h;this._keystrokesPerfPingData[t]=c},u.p
rototype.setSearchServiceStatus=function(n)
{this._searchServiceStatus=n},u.prototype.instrumentResponseReceived=function(n,i,r
,u,f){var e=this;this.safeInstrumentPerf(n,function(n){if(!f){var
o=e.getOffsetedNow();n.ResponseReceived[i]=o;t&&e.logProfilerMarker(0,0,i,n)}r&&(n.
DataSourcesState=n.DataSourcesState||
{},n.DataSourcesState[i]=r);u&&(n.ResponseFromCache[i]=u)},"instrumentResponseRecei
ved",i)},u.prototype.instrumentTopResultRendered=function(t,i){var
r=this;this.safeInstrumentPerf(t,function(u){var
f=r.getOffsetedNow();r.logProfilerMarker(1,0,"topResultRendered",u);u.TopResultRend
ered.push({V:f,T:i.join(",")});r.tryInstrumentRenderStopped(t,u);n.config.th&&n.saf
eFireEvent("TopResultRendered")},"instrumentTopResultRendered")},u.prototype.instru
mentAggregatorCall=function(t,i){var r=this;this.safeInstrument(t,function(t){var
e={fastRankModelId:r._clientInstrumentationProvider.getRankerModelId()},f,u;for(f
in
t.RankerExtraInfo)e[f]=t.RankerExtraInfo[f];t.RankerExtraInfo={};u={T:"D.Aggregator
",Service:n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:"Aggregator",AppNS:
n.InstrumentationCommon.DEFAULT_APP_NAMESPACE,DS:[],rankerModelIds:e};
n.config.counterFactualLoggingOn&&(u.counterFactualDiff=u.counterFactualDiff||
i);t.DataSources.aggregator=u},"instrumentAggregatorCall")},u.prototype.addDuplicat
esDataSource=function(t){var i=Object.keys(t.DuplicateDS).map(function(n){return
t.DuplicateDS[n]});i.length>0&&(t.DataSources.duplicates={T:"D.Duplicates",Service:
n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:"Duplicates",AppNS:n.Instrume
ntationCommon.DEFAULT_APP_NAMESPACE,DS:i})},u.prototype.instrumentDuplicate=functio
n(t,i,r){this.safeInstrument(t,function(t){var
u=t.DuplicateDS[i.instItem.getHValue()],f;u||(u={T:"D.Duplicate",DS:
[{T:"D.DSRef",KRef:i.instItem.getKValue()}]},i.instItem.getAppNS()!
=n.InstrumentationCommon.DEFAULT_APP_NAMESPACE&&(u.DS[0].AppNS=i.instItem.getAppNS(
)),t.DuplicateDS[i.instItem.getHValue()]=u);f={T:"D.DSRef",KRef:r.instItem.getKValu
e()};r.instItem.getAppNS()!
=n.InstrumentationCommon.DEFAULT_APP_NAMESPACE&&(f.AppNS=r.instItem.getAppNS());u.D
S.push(f);i.duplicates=i.duplicates||
[];i.duplicates.push(r)},"instrumentDuplicate")},u.prototype.renderingStopped=funct
ion(n){return
n.PendingIcons==0&&n.AllDataSourcesProcessed},u.prototype.notifyAllDataSourcesProce
ssed=function(n){var t=this;this.safeInstrumentPerf(n,function(i)
{i.AllDataSourcesProcessed=!
0;t.tryInstrumentRenderStopped(n,i)},"notifyAllDataSourcesProcessed")},u.prototype.
notifyIconPending=function(t,i,r,u){var
f=this;this.safeInstrumentPerf(t,function(t){var e=r+
(i?"T":"S");t.IconsRetrieved[e]||
(t.IconsRetrieved[e]={B:f.getOffsetedNow(),E:n.InstrumentationCommon.QFPERFPING_INV
ALID_MEASURE,T:u},t.PendingIcons+
+)},"notifyIconPending",i?"TR":"SUG")},u.prototype.notifyIconReady=function(n,t,i)
{var r=this;this.safeInstrumentPerf(n,function(n){var u=i+
(t?"T":"S");n.IconsRetrieved[u]?
n.IconsRetrieved[u].E=r.getOffsetedNow():SharedLogHelper.LogError("notifyIconReady"
,null,new Error("Instrumenting unseen
icon"));n.PendingIcons--},"notifyIconReady",t?"TR":"SUG")},u.prototype.tryInstrumen
tRenderStopped=function(t,i)
{this.renderingStopped(i)&&(this.finalizeKeystrokeLog(t,2),n.config.th&&n.safeFireE
vent("RenderStopped"))},u.prototype.isLayoutLogged=function(n){return
this._keystrokesInstrumentationData[n].MasterPageImpressionCreated},u.prototype.fin
alizeKeystrokeLog=function(n,t){var i,r;t===void
0&&(t=0);i=this._keystrokesInstrumentationData[n];i&&this.logKeystrokeData(i,n);t!
=1&&(r=this._keystrokesPerfPingData[n],r&&(this.logPerfPingEvent(this.createKeystro
kePerfPingEvent(n,r)),delete
this._keystrokesPerfPingData[n]))},u.prototype.instrumentRenderFinished=function(i,
r){var u=this;this.safeInstrumentPerf(i,function(f){var
e=u.getOffsetedNow();r.forEach(function(n){return
f.RenderFinished[n]=e});t&&(u.logProfilerMarker(0,0,"groupsRendered",f),n.log(r.toS
tring()));u.tryInstrumentRenderStopped(i,f)},"instrumentRenderFinished",r.join(",")
)},u.prototype.instrumentSyntheticInstrumentedItem=function(n,t,i){var
r=this._keystrokesInstrumentationData[n];r?
r.PendingInstrumentedItems[t]=i:SharedLogHelper.LogError("instrumentSyntheticInstru
mentedItem",t,new Error("keystrokesInstrumentationData not
found"))},u.prototype.instrumentSyntheticSuggestion=function(n,t){var
i=this._keystrokesInstrumentationData[n];i?
i.PendingSyntheticSuggestions[t.type]=t:SharedLogHelper.LogError("instrumentSynthet
icSuggestion",t.type,new Error("Instrumentation synthetic suggestion after
flush"))},u.prototype.getInstrumentedSyntheticSuggestion=function(n,t){return
this._keystrokesInstrumentationData[n].PendingSyntheticSuggestions[t]},u.prototype.
instrumentDataSource=function(n,t,i,r){this.safeInstrument(n,function(n){var
u,f,e;if(r&&r.rankerExtraInfo)for(u in
r.rankerExtraInfo)n.RankerExtraInfo[u]=r.rankerExtraInfo[u];f=i||
[];e=n.PendingDataSources[t];n.PendingDataSources[t]=e?
e.concat(f):f},"instrumentDataSource",t)},u.prototype.processPendingDataSources=fun
ction(t){var i,f,r,u,e,o;for(i in
t.PendingDataSources)if(f=t.PendingDataSources[i],f.length>0)
{for(r=[],u=0,e=f;u<e.length;u+
+)o=e[u],r.push(this._clientInstrumentationProvider.createDataSourceObject(o));i=="
Web"&&(i="WebAS");r.length>0&&(t.DataSources[i]={T:"D."+i,AppNS:n.InstrumentationCo
mmon.DEFAULT_APP_NAMESPACE,Service:n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Sce
nario:i,SC:r.length,DS:r})}t.PendingDataSources={}},u.prototype.instrumentSnRProvid
erFetchUrl=function(n,t){this.safeInstrument(n,function(n)
{n.SnRProviderFetchUrl=t},"instrumentSnRProviderFetchUrl")},u.prototype.onConversat
ionStart=function()
{this._conversationStartTimestamp=n.getCurrentTime();this._searchServiceStatus=null
},u.prototype.getConversationStartTimestamp=function(){return
this._conversationStartTimestamp},u.prototype.logDataSourceTimeout=function(i,r)
{t&&n.log("timeout");this._clientInstrumentationProvider.logDataSourceTimeout(i,r)}
,u.prototype.logProfilerMarker=function(i,r,u,f,e){if(t&&r!=2){var
o=this.getOffsetedNow();n.log(u+" "+(o-
f.RequestBegin))}this._clientInstrumentationProvider.logProfilerMarker(i,r,u,f.RawI
mpressionGuid,e)},u.prototype.createKeystrokePerfPingEvent=function(t,i){var
u={I:t,PL:i.PrefixLength,K:i.RequestBegin,RRT:i.ResponseReceived,RFT:i.RenderFinish
ed,TRR:i.TopResultRendered,RS:undefined,IRT:i.IconsRetrieved},r,f,e,o,s;if(this.ren
deringStopped(i)){for(r=0,f=0,e=u.TRR;f<e.length;f++)o=e[f],r=Math.max(r,o.V);for(s
in u.RFT)r=Math.max(r,u.RFT[s]);r&&(u.RS=r)}return
n.InstrumentationCommon.createPerfPingEvent(i.ImpressionGuid,
[u],"Keystroke",i.ConversationId,i.DataSourcesState,i.ResponseFromCache)},u.prototy
pe.updatePageIG=function(n)
{_G.IG=this.getImpressionGuid(n)},u.prototype.createMasterPageImpression=function(t
,i,u,f,e){var c=this,h={dataSources:e||[],layoutNodes:[],pageName:t,rawQuery:f?
f.queryToFetch:"",isQuery:!
1,impressionUrl:this.createVirtualImpressionURL(i,u),appName:this._clientInstrument
ationProvider.getApplicationName(),enrichedClientInfo:
{FDPartnerEntry:r,nclid:_G.nclid,isOffline:n.isBrowserOnline()?0:1,webRequested:u?
1:0}},o=n.safeExecute(function(){return
c._clientInstrumentationProvider.getEnrichedClientInfo(f)},"getEnrichedClientInfo")
,s;if(o)for(s in o)h.enrichedClientInfo[s]=o[s];return
h},u.prototype.logKeystrokeData=function(t){var r,u,f;
(this.processPendingDataSources(t),n.config.th&&this.addDuplicatesDataSource(t),r=O
bject.keys(t.DataSources).map(function(n){return
t.DataSources[n]}).concat(this.createNonSuggestionsDataSource(t.PendingInstrumented
Items,t.PendingSyntheticSuggestions)),t.DataSources={},t.PendingSyntheticSuggestion
s={},t.PendingInstrumentedItems={},r.length==0&&t.MasterPageImpressionCreated)||
(t.RenderingStarted&&(u=DsLManager.CreateLayoutNode(_d.body,n.InstrumentationCommon
.DEFAULT_APP_NAMESPACE,!1,!
0,t.MasterPageImpressionCreated)),t.MasterPageImpressionCreated?
Log2.LogEvent("ClientInst",null,null,r,u,t.ImpressionGuid,null,null):
(f=this.createMasterPageImpression(this._clientInstrumentationProvider.getSuggestio
nsPageName(),i,t.SnRProviderFetchUrl?
t.SnRProviderFetchUrl.substring(t.SnRProviderFetchUrl.indexOf("?")
+1):"",t.Query,r),u&&(f.layoutNodes=u),f.clientTimestamp=t.OriginalTimestamp,this.l
ogMasterPageImpression(t.ImpressionGuid,f),t.MasterPageImpressionCreated=!
0))},u.prototype.logPerfPingEvent=function(t)
{Log2.LogEvent(t.EventType,t.Data,n.InstrumentationCommon.QFPERFPING_EVENT_NAME,nul
l,null,t.ImpressionGuid,null,null);n.config.th&&ClientTestHooks.ClientApiLogNoConso
le("perfPingEvent",[t])},u.prototype.logMasterPageImpression=function(t,i){if(i)
{if(!t){SharedLogHelper.LogError("logMasterPageImpression",null,new Error("Missing
impressionGuid"));return}i.impressionGuid=t;this._clientInstrumentationProvider.log
MasterPageImpression(i,this._host.getConversationId());n.config.th&&ClientTestHooks
.ClientApiLogNoConsole("masterPageImpression",i,t)}},u.prototype.instrumentInitiali
zationFinish=function(t){var u=_G.ServerIG,i,r;if(!u)
{SharedLogHelper.LogError("instrumentInitializationFinish","Could not instrument as
server IG not known",new Error("Could not instrument initilization
finish"));return}if(i=n.InstrumentationCommon.QFPERFPING_INVALID_MEASURE,r=_w.perfo
rmance,r&&r.timing&&(i=r.timing.navigationStart),!(i<=0)){var f=t.getTime()-
i,e=n.getCurrentTime()-
i,o=[{BLT:f,ILT:e}],s=n.InstrumentationCommon.createPerfPingEvent(u,o,"Load");this.
logPerfPingEvent(s)}},u.prototype.getOffsetedNow=function(t){return t===void
0&&(t=n.getCurrentTime()),t-
this._conversationStartTimestamp},u.prototype.createNonSuggestionsDataSource=functi
on(t,i){var r=[],u,f;for(u in
t)r.push(this._clientInstrumentationProvider.createNonSuggestionDataSourceObject(u,
t[u]));for(u in
i)r.push(this._clientInstrumentationProvider.createDataSourceObject(i[u]));return
r.length?
(f={T:"D.ContentGroup",AppNS:n.InstrumentationCommon.DEFAULT_APP_NAMESPACE,Service:
n.InstrumentationCommon.DEFAULT_SERVICE_NAME,Scenario:"NonSuggestions",SC:r.length,
DS:r},[f]):[]},u.prototype.createVirtualImpressionURL=function(t,i){var
r=n.getWindowProtocol()+"//"+n.getWindowHost()+t;return r+=i?
i:n.Service.QueryParams.ConversationId+"="+n.encodeQueryParameter(this._host.getCon
versationId()),_G.ServerIG&&(r+="&ASInitIG="+n.encodeQueryParameter(_G.ServerIG)),r
},u.prototype.instrumentDebugEvent=function(t){var
r=_G.ServerIG,i=n.InstrumentationCommon.createPerfPingEvent(r,undefined,"Debug");i.
Data.Message=t;this.logPerfPingEvent(i)},u}();n.InstrumentationHelper=u}
(AutoSuggest||(AutoSuggest={})),function(n){var
t="&nclid=",i="&ts=",r="&nclidts=",u="&tsms=",f="&elv=",e="&cc=",o="&setlang=",s="&
cvid=",h="&qs=",c="&ao=",l=function(){function l(t,i,r,u){if(r===void
0&&(r=Date.now),u===void 0&&(u=n.getWindowProtocol()
+"//"+n.getWindowHost()),this._host=t,this._searchPreCacheHandler=i,this.getNowTime
stamp=r,this._baseUrl=u,n.config.overrideHost){var
f=n.getWindowHost();f.startsWith("www.")&&(this._baseUrl=n.getWindowProtocol()
+"//"+n.config.overrideHost+f.substring(3))}}return
l.prototype.getSearchUrl=function(t,i,r,u,e,o,s,h,l){var
p=e===13?"images":e===14?"videos":"",a,v,y;return u||(u=(p?"/"+p:"")+"/search?
q="+n.encodeQueryParameter(i)),a=this._baseUrl+u,a+="&form="+n.encodeQueryParam
eter(o||
this._host.getFormCode()),l&&(a+=c+"1"),a=this.enrichUrlWithSuggestionType(a,h?"P":
r),a=this.enrichUrlWithCvid(a),n.config.suppressPqParameter||
(a+="&pq="+n.encodeQueryParameter(t)),v=this._host.getMSNRefIg(),v&&(a+="&refig="+v
),a=this.enrichUrlWithMarketInfo(a),a=this.enrichUrlWithDeviceInfo(a),s||
(a=this.enrichUrlWithMuidInfo(a),y=this._host.getElToken(),y&&this._baseUrl.startsW
ith("https:")&&(a+=f+n.encodeQueryParameter(y)),a=this.enrichUrlWithSafeSearchInfo(
a),this._searchPreCacheHandler&&(a=this._searchPreCacheHandler.attempPreCacheAndEnr
ichUrl(a))),a},l.prototype.enrichUrlWithDeviceInfo=function(n)
{this._host.isEducationEnvironment()&&(n+="&DAF0=1");this._host.isWindowsS()&&(n+="
&DAF1=1");var t=this._host.getPartnerSearchCode();return
t&&(n+="&PC="+t),n},l.prototype.enrichUrlWithMarketInfo=function(n){return
n+e+this._host.getRegion()
+o+this._host.getLanguage()},l.prototype.enrichUrlWithSafeSearchInfo=function(n)
{return this._host.getSafeSearchSetting()=="Strict"?
n+"&adlt=strict":n},l.prototype.enrichUrlWithMuidInfo=function(f){var e,o,s;return
_G.nclid&&(f+=t+n.encodeQueryParameter(_G.nclid),e=this.getNowTimestamp().toString(
),f+=i+n.encodeQueryParameter(e),o=e.substring(0,e.length-
3),f+=r+n.encodeQueryParameter(o),s=e.substring(e.length-
3),f+=u+n.encodeQueryParameter(s)),f},l.prototype.enrichUrlWithCvid=function(t)
{return t+
(s+n.encodeQueryParameter(this._host.getConversationId()))},l.prototype.enrichUrlWi
thSuggestionType=function(t,i){return t+(h+n.encodeQueryParameter(i))},l}
();n.NavigationHelper=l}(AutoSuggest||(AutoSuggest={})),function(n){var
t=function(){function t(t,i){var
r=this;this.host=t;this._selectableItemsContainer=i;t.bindKeyDown(function(t,u,f)
{n.isUpOrDownKey(t)&&r.selectNextItem(n.isUpKey(t));i.onAfterKeyDown(t,u,f)})}retur
n t.prototype.selectNextItem=function(t){var
r=this._selectableItemsContainer.getSelectableItems(),e;if(r.length!=0){var
u=this._selectableItemsContainer.getSelectedItem(),i=u?r.indexOf(u):-1,f=t?
i<=0:i==r.length-1;if(f&&n.config.allowKeyboardNavOffCanvas)
{this._selectableItemsContainer.select(null,!0);return}(!f||
n.config.allowKeyboardNavCycling)&&(i=t?i<=0?r.length-1:i-1:
(i+1)%r.length,e=r[i],this._selectableItemsContainer.select(e,!0))}},t}
();n.KeyboardEvtHandler=t}(AutoSuggest||(AutoSuggest={})),function(n){var
t=function(){function t(n,t,i,r)
{this._host=n;this._instrumentationHelper=t;this._aggregator=i;this._rootViewModel=
r;this._lastUsedId=-1;this._sequenceNumber=-1;this._suggestionsQueue={}}return
t.prototype.initiateSequenceNumber=function(t,i){var
o=this,u,f,r,s,e;if(this._sequenceNumber>=t)
{SharedLogHelper.LogError("initiateSequenceNumber",null,new Error("Unexpected
sequence
number"));return}for(this.resetStateForNewQuery(t,i),this._highPriorityDataSources=
[],this._normalPriorityDataSources=[],this._lowPriorityDataSources=[],u=0,f=n.confi
g.enabledDataSources;u<f.length;u+
+)r=f[u],s=i.enabledDataSources[r],s&&(n.config.lowPriorityDataSources[r]?
this._lowPriorityDataSources.push(r):n.config.highPriorityDataSources[r]?
this._highPriorityDataSources.push(r):this._normalPriorityDataSources.push(r));this
._highPriorityDataSources.length==0&&this._normalPriorityDataSources.length==0&&thi
s._lowPriorityDataSources.length==0?this.processSuggestions(!1):
(e=this.getLatencyTimeout(),e>0&&(this._bufferingTimer=sb_st(function(){return
n.safeExecute(function(){o._bufferingTimer=null;o.processSuggestions(!
0)},"processSuggestionsBuffering")},e)))},t.prototype.getLatencyTimeout=function()
{return this._partialQuery.queryToFetch?
n.config.latencyTimeout:n.config.latencyTimeoutForZeroInput},t.prototype.queueSugge
stions=function(t,i,r,u){if(t>this._sequenceNumber)
{SharedLogHelper.LogError("queueSuggestions",null,new Error("Unexpected sequence
number"));return}if(!(t<this._sequenceNumber)){if(this._suggestionsQueue[i])
{SharedLogHelper.LogError("queueSuggestions",i,new Error("Duplicate data source
response"));return}if(!n.contains(this._highPriorityDataSources,i)&&!
n.contains(this._normalPriorityDataSources,i)&&!
n.contains(this._lowPriorityDataSources,i))
{SharedLogHelper.LogError("queueSuggestions",i,new Error("Unexpected data
source"));return}this._suggestionsQueue[i]={suggestions:r,updated:!
1};u&&(this._extraSignalsMap[i]=u);this._arrivedDataSources.push(i);this._allDataSo
urcesArrived=this._arrivedDataSources.length==this._highPriorityDataSources.length+
this._normalPriorityDataSources.length+this._lowPriorityDataSources.length;this._pr
ocessingStopped||this._instrumentationHelper.isLayoutLogged(this._sequenceNumber)?
this._allDataSourcesArrived&&this._instrumentationHelper.notifyAllDataSourcesProces
sed(this._sequenceNumber):this.processSuggestions(!
1)}},t.prototype.resetTimers=function()
{this._bufferingTimer&&(sb_ct(this._bufferingTimer),this._bufferingTimer=null)},t.p
rototype.resetStateForNewQuery=function(t,i)
{this._arrivedDataSources=[];this._allProcessedDataSources=[];this._sequenceNumber=
t;this._partialQuery=i;this._suggestionsQueue={};this._extraSignalsMap={};this._ren
deredThisSequenceNumber=!1;this._waitingForMoreResults=!0;this._processingStopped=!
1;this._allDataSourcesArrived=n.isEmpty(i.enabledDataSources);this.resetTimers()},t
.prototype.getDependencies=function(t){var i=this;return
this._host.dataSourceDependencies(t).filter(function(t){return
n.isDataSourceEnabled(t,i._partialQuery)})},t.prototype.haveAllDataSources=function
(n){var t=this;return n.every(function(n){return!!
t._suggestionsQueue[n]})},t.prototype.processSuggestions=function(t){var
i=this,u=[],s=[],r,l=this.getLatencyTimeout()>0&&this._bufferingTimer==null,a=this.
haveAllDataSources(this._normalPriorityDataSources),e=this.haveAllDataSources(this.
_highPriorityDataSources),v=e||
l,h=e&&a,c;t&&this._instrumentationHelper.logDataSourceTimeout(Object.keys(this._su
ggestionsQueue),this._partialQuery);var f=t&&!
this._renderedThisSequenceNumber,y=function(t,e){var o;if(!
t.updated&&i.getDependencies(e).every(function(t){return
n.contains(i._arrivedDataSources,t)}))
{if(s.push(e),i._allProcessedDataSources.push(e),t.suggestions.length>0&&(o=i.canHa
veSuppressions(e)?t.suggestions.filter(function(n){return!
i.isSuppressed(e,n,t.suggestions)}):t.suggestions,o.length>0)){r||
(r=i._renderedThisSequenceNumber?i._rootViewModel.getSuggestions(!0):[]);var
h=i.removeDuplicatesAndAssignIds(o,r,u,e),c=h[0],l=h[1];u=u.concat(c);l&&(f=!
0)}t.updated=!0}},o=function(n){var u,t,r;for(u in
n)t=n[u],r=i._suggestionsQueue[t],r&&y(r,t)};v&&o(this._highPriorityDataSources);th
is._bufferingTimer&&h&&(sb_ct(this._bufferingTimer),this._bufferingTimer=null);c=th
is.getLatencyTimeout()>0?
this._bufferingTimer==null:e;c&&(o(this._normalPriorityDataSources),o(this._lowPrio
rityDataSources));this._waitingForMoreResults&&h&&(this._waitingForMoreResults=!1,
(!this._renderedThisSequenceNumber||this._rootViewModel.mayNeedFlush()||(r||
this._rootViewModel.getSuggestions(!0)).length==0)&&(f=!
0));this._partialQuery.showProgressBar&&this._allDataSourcesArrived&&(f=!0);
(u.length>0||f)&&(r||(r=this._renderedThisSequenceNumber?
this._rootViewModel.getSuggestions(!0):
[]),this.addSuggestions(r,u,s,f));this._allDataSourcesArrived&&this._instrumentatio
nHelper.notifyAllDataSourcesProcessed(this._sequenceNumber)},t.prototype.getAggrega
torResult=function(t,i,r){var
e=this.waitingForWebProvider(this._allProcessedDataSources),f=null,u,o;return
n.config.counterFactualLoggingOn&&(f=this._aggregator.rank(i,r,this._extraSignalsMa
p,this._partialQuery,t,this._sequenceNumber,e,!
0)),u=this._aggregator.rank(i,r,this._extraSignalsMap,this._partialQuery,t,this._se
quenceNumber,e,!1),o=n.config.counterFactualLoggingOn&&(!
this.isSuggestionOrderTheSame(u.topResults,f.topResults)||!
this.isSuggestionOrderTheSame(u.suggestionsToAdd,f.suggestionsToAdd)),
[u,o]},t.prototype.waitingForWebProvider=function(t){var i=this;return
n.isBrowserOnline()&&[n.WebDataSource].concat(this.getDependencies(n.WebDataSource)
).some(function(r){return n.isDataSourceEnabled(r,i._partialQuery)&&!
n.contains(t,r)})},t.prototype.isSuggestionOrderTheSame=function(n,t){var
r=function(n){return n.query+"\t"+n.type},i;if(n.length!=t.length)return!
1;for(i=0;i<n.length;i++)if(r(n[i])!=r(t[i]))return!1;return!
0},t.prototype.addSuggestions=function(t,i,r,u){var
e=this,o=this._renderedThisSequenceNumber?
this._rootViewModel.getCurrentTopResults():[],v=n.safeExecute(function(){return
e.getAggregatorResult(o,t,i)},"getAggregatorResults",[null,!
1]),f=v[0],p=v[1],s,h,l,c,a,y;for(f||
(f={topResults:o,suggestionsToAdd:i,suggestionsToRemove:[],groupOrder:
[]}),this._instrumentationHelper.instrumentAggregatorCall(this._sequenceNumber,p),i
=f.suggestionsToAdd,s=f.suggestionsToRemove,h=0,l=f.topResults;h<l.length;h+
+)c=l[h],n.contains(t,c)&&!n.contains(o,c)&&s.push(c);(u||i.length!=0||s.length!
=0||!n.sequenceEqual(o,f.topResults))&&(a=!
this._renderedThisSequenceNumber,a&&(this._renderedThisSequenceNumber=!
0,this._instrumentationHelper.instrumentRenderingStarted(this._sequenceNumber)),y=n
.safeExecute(function(){return
e._rootViewModel.update(a,f.topResults,e._waitingForMoreResults,e._sequenceNumber,i
,s,r,f.groupOrder,e._allDataSourcesArrived,e._extraSignalsMap)},"rootViewModel.upda
te",0,null,function(){return e._host.reloadWebView(!
0)}),y==0&&(this._processingStopped=!
0,this.resetTimers()))},t.prototype.removeDuplicatesAndAssignIds=function(n,t,i,r)
{var f=this,h=function(n){n.id||(n.id="id_"+ ++f._lastUsedId)},s=!
1,o;if(this._aggregator.canHaveDuplicates(r,this._partialQuery)){var
e=[],c=function(o){var l=n[o],a=t.findIndex(function(n){return
f._aggregator.isDuplicate(f._partialQuery,n,l)}),c;if(a>=0)return
c=t[a],c.needsRefreshAfterDeduping&&(s=!
0),u._aggregator.copyMruSignals(r,c,l),u._instrumentationHelper.instrumentDuplicate
(u._sequenceNumber,c,l),"continue";if(a=i.findIndex(function(n){return
f._aggregator.isDuplicate(f._partialQuery,n,l)}),a>=0)return
c=i[a],c.needsRefreshAfterDeduping&&(c.needsRefreshAfterDeduping=!
1),u._aggregator.copyMruSignals(r,c,l),u._instrumentationHelper.instrumentDuplicate
(u._sequenceNumber,c,l),"continue";
if(u._aggregator.canHaveDuplicatesWithinDataSource(r,u._partialQuery)&&(a=e.findInd
ex(function(n){return f._aggregator.isDuplicate(f._partialQuery,n,l)}),a>=0))return
c=e[a],c.needsRefreshAfterDeduping&&(c.needsRefreshAfterDeduping=!
1),u._aggregator.copyMruSignals(r,c,l),u._instrumentationHelper.instrumentDuplicate
(u._sequenceNumber,e[a],l),"continue";h(l);e.push(l)},u=this;for(o=0;o<n.length;+
+o)c(o);return[e,s]}return n.forEach(function(n){return h(n)}),
[n,s]},t.prototype.canHaveSuppressions=function(t){return
n.config.suppressDataSources[t]||
n.config.dataSourcesWithSuppressedTypes[t]},t.prototype.isSuppressed=function(t,i)
{return n.config.suppressDataSources[t]||n.config.suppressTypes[i.type]},t}
();n.SuggestionsRenderingManager=t}(AutoSuggest||(AutoSuggest={})),function(n)
{function a(n){return n.handoffType==1?
n.query:HitHighlightingParser.removeMarkers(n.text)}function f(n){var
t,i;if(n.length==0)return 0;for(t=0,i=0;i<n.length;i++)t=(t<<5)-t+n.charCodeAt(i)|
0;return t}function t(n,t){var u,i,r;if(!n)return t.length;if(!t)return
n.length;for(u=[],i=0;i<=t.length;i++)u[i]=[i];for(r=0;r<=n.length;r++)u[0]
[r]=r;for(i=1;i<=t.length;i++)for(r=1;r<=n.length;r++)u[i][r]=t.charAt(i-
1)==n.charAt(r-1)?u[i-1][r-1]:Math.min(u[i-1][r-1]+1,Math.min(u[i][r-1]+1,u[i-1][r]
+1));return u[t.length][n.length]}function v(n,i){return
n&&(n=n.toLocaleLowerCase()),i&&(i=i.toLocaleLowerCase()),t(n,i)}function o(n,t,i)
{var r=0,u;return(t>0||i>0)&&(t>0&&i>0?(i>t&&(u=t,t=i,i=u),r=n/(t-
n+i)):r=Number.MAX_VALUE),r}function y(n,t){return!n||!t?
0:n.length+1<=t.length&&t[n.length]==" "?1:n.length==t.length?1:0}function p(n){var
r=0,i=1,t;if(n&&n.length>1)for(t=1;t<n.length;t++)n.charAt(t)==n.charAt(t-1)?i+
+:i=1,i>r&&(r=i);else if(n)return 1;return r}function w(n){return n&&n.length>0?
n.trim().split(" ").length:0}function b(n){var t=new RegExp("^[0-9a-zA-Z ]+
$");return n&&t.test(n)?1:0}function k(n){return n&&n.length>0&&n.charAt(n.length-
1)==" "?1:0}function d(n){return n&&n.length>0&&(n.includes("http://")||
n.includes("https://")||n.includes("."))?1:0}function g(t,i,r,u){var
o,e,s,h;t.includes("?")&&(r[117]=1,ut(t)&&(r[127]=1));t.replace("///","").replace("
//","").includes("/")&&(r[118]=1);t.includes(".")&&(r[119]=1);o=u.cvid+u.privacyNum
ber+t;r[120]=f(o);e=t.toLocaleLowerCase();(e.startsWith("www.")||
e.startsWith("http://www.")||
e.startsWith("https://www."))&&(r[122]=1);e.startsWith("www.")||
e.startsWith("http://")?r[123]=1:e.startsWith("https://")?
r[124]=1:e.startsWith("ftp://")?
r[125]=1:r[126]=1;i&&(s=n.normalizeUrl(e,15),h=n.normalizeUrl(i,15).toLocaleLowerCa
se(),s.startsWith(h)&&(r[187]=1))}function nt(n,i,r,u,e){if(e)
{r[128]=t(e,i);r[129]=e.length;var o=u.cvid+u.privacyNumber+e;r[130]=f(o)}}function
tt(n,i,r){var e=n.toLocaleLowerCase(),s,u,f,h,c;if(r[140]=n.length,s=e.split("
"),r[144]=s.length,i)for(r[141]=t(n,i),r[142]=Math.min(100,o(r[141],i.length,n.leng
th)),u=i.toLocaleLowerCase(),e.includes(u)&&(r[143]=1),e.startsWith(u)&&(r[188]=1),
f=0,h=s;f<h.length;f++)if(c=h[f],c==u){r[145]=1;break}}function ut(n){var
t=rt.find(function(t){return n.startsWith(t)});return n=t?
n.substr(t.length):n,it.some(function(t){return n.startsWith(t)})}function ft(n)
{var i=0,r,t;if(n)for(r in
n)t=n[r],t&&t.prefixLaunchCount&&(i+=t.prefixLaunchCount);return i}function
et(t,i,r,u){if(r){var
f=r[t];f&&(i[47]=f.prefixLaunchCount,i[49]=f.lastLaunchTime,i[101]=u,u>0&&(i[100]=f
.prefixLaunchCount/u),f.previewPaneLaunchCount&&f.lastPreviewPaneLaunchTime&&(i[301
]=f.previewPaneLaunchCount,f.lastPreviewPaneLaunchTime==f.lastLaunchTime&&(i[302]=1
),i[303]=n.getCurrentTime()-f.lastPreviewPaneLaunchTime))}}function ot(n,t,i){if(i)
{var r=i[n];r&&(t[281]=r.probability,t[282]=r.weight)}}function st(n,t,r,u,f,e)
{if(t){var s=i(u,r),o=t[s];o&&(f?
(n[153]=o.ProbSugClickGivenPref,n[152]=o.ClicksOnSugGivenPref):e?
(n[161]=o.Loglikelihood,n[162]=o.ProbSugClickGivenBackground,n[163]=o.ClicksOnSugGi
venPref,n[164]=o.ProbSugClickGivenPref,n[165]=o.CCR,n[166]=o.EventCount,n[293]=o.Pr
obSugClickGivenPrefTime,n[168]=o.CCRTime,n[294]=o.ProbSugClickGivenBackgroundTime,n
[295]=o.LoglikelihoodTime):
(n[6]=o.Loglikelihood,n[3]=o.ProbSugClickGivenBackground,n[151]=o.ClicksOnSugGivenP
ref,n[0]=o.ProbSugClickGivenPref,n[94]=o.CCR,n[95]=o.EventCount,n[290]=o.ProbSugCli
ckGivenPrefTime,n[155]=o.CCRTime,n[291]=o.ProbSugClickGivenBackgroundTime,n[292]=o.
LoglikelihoodTime))}}function ht(n,t,i){if(t){var
r=t[i];r&&(n[256]=r.PSGPCR,n[257]=r.PSGCCR,n[258]=r.PSGSTR,n[286]=r.PSGSATCCR,n[287
]=r.PSGSATPCR)}}function i(n,t){return(n+"\t"+t).toLocaleLowerCase()}function
r(t,i,r){i==11..toString()&&i==0..toString();switch(n.config.athenaKeyType){case
0:return t||SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key
group is empty")),t;case 1:return i||
SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key handoff is
empty")),i;case 2:return r||SharedLogHelper.LogError("getAthenaGroupKey",null,new
Error("Athena key suggestion type is empty")),i||
SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key handoff is
empty")),r+"_"+i;default:return
SharedLogHelper.LogError("getAthenaGroupKey",null,new Error("Athena key group type
is not set")),""}}function u(t,i,r){switch(n.config.athenaKeyType){case 0:return
i==t;case 1:return r==t;case 2:return r==t;default:return!1}}function ct(t){var
i={};return t?(n.config.athenaKeyType==2?vt(t,i):(lt(t,i),at(t,i)),i):i}function
lt(t,f){var y=t.Suggestions?t.Suggestions.split("\t"):
[],p=t.ProbSugClickGivenPrefs?t.ProbSugClickGivenPrefs.split("\t"):
[],w=t.ClicksOnSugGivenPrefs?t.ClicksOnSugGivenPrefs.split("\t"):
[],b=t.ProbSugClickGivenBackground?t.ProbSugClickGivenBackground.split("\t"):
[],k=t.Loglikelihoods?t.Loglikelihoods.split("\t"):[],a=t.SuggestionGroups?
t.SuggestionGroups.split("\t"):[],d=t.ProbSugClickGivenPrefWeeks?
t.ProbSugClickGivenPrefWeeks.split("\t"):[],v=t.ProbSugClickGivenPrefWeekends?
t.ProbSugClickGivenPrefWeekends.split("\t"):
[],g=t.ProbSugClickGivenBackgroundWeeks?
t.ProbSugClickGivenBackgroundWeeks.split("\t"):
[],it=t.ProbSugClickGivenBackgroundWeekends?
t.ProbSugClickGivenBackgroundWeekends.split("\t"):[],nt=t.LoglikelihoodWeeks?
t.LoglikelihoodWeeks.split("\t"):[],tt=t.LoglikelihoodWeekends?
t.LoglikelihoodWeekends.split("\t"):[],c=n.config.athenaKeyType==0||!
t.SuggestionHandOffTypes?
[]:t.SuggestionHandOffTypes.split("\t"),s=y.length,l=e(),o;if(u(s,a.length,c.length
))for(o=0;o<s;o++){var rt=a&&a.length>o?a[o]:"",ut=c&&c.length>o?
c[o]:"",ft=r(rt,ut,""),h=i(y[o],ft);f[h]={SuggestionGroup:
+a[o]};b.length==s&&(f[h].ProbSugClickGivenBackground=Number(b[o]));p.length==s&&(f
[h].ProbSugClickGivenPref=Number(p[o]));w.length==s&&(f[h].ClicksOnSugGivenPref=Num
ber(w[o]));k.length==s&&(f[h].Loglikelihood=Number(k[o]));n.config.athenaKeyType!
=0&&c.length==s&&(f[h].SuggestionHandOffType=Number(c[o]));d.length!=s||l?
v.length==s&&l&&(f[h].ProbSugClickGivenPrefTime=Number(v[o])):f[h].ProbSugClickGive
nPrefTime=Number(d[o]);g.length!=s||l?
v.length==s&&l&&(f[h].ProbSugClickGivenBackgroundTime=Number(it[o])):f[h].ProbSugCl
ickGivenBackgroundTime=Number(g[o]);nt.length!=s||l?
tt.length==s&&l&&(f[h].LoglikelihoodTime=Number(tt[o])):f[h].LoglikelihoodTime=Numb
er(nt[o])}else SharedLogHelper.LogError("parseLLSignals",null,new Error("Length
doesn't match"))}function at(t,f){var a=t.CCRSuggestions?
t.CCRSuggestions.split("\t"):[],l=t.CCRSuggestionGroups?
t.CCRSuggestionGroups.split("\t"):[],v=t.CCRs?t.CCRs.split("\t"):
[],y=t.EventCounts?t.EventCounts.split("\t"):[],c=n.config.athenaKeyType==0||!
t.CCRSuggestionHandOffTypes?
[]:t.CCRSuggestionHandOffTypes.split("\t"),p=t.CCRsWeek?t.CCRsWeek.split("\t"):
[],w=t.CCRsWeekend?t.CCRsWeekend.split("\t"):
[],s=a.length,b=e(),o;if(u(s,l.length,c.length))for(o=0;o<s;o++){var
k=l&&l.length>o?l[o]:"",d=c&&c.length>o?c[o]:"",g=r(k,d,""),h=i(a[o],g);f[h]||
(f[h]={SuggestionGroup:Number(l[o])});v.length==s&&(f[h].CCR=Number(v[o]));y.length
==s&&(f[h].EventCount=Number(y[o]));n.config.athenaKeyType!
=0&&c.length==s&&(f[h].CCRSuggestionHandOffType=Number(c[o]));p.length!=s||b?
w.length==s&&b&&(f[h].CCRTime=Number(w[o])):f[h].CCRTime=Number(p[o])}else
SharedLogHelper.LogError("parseCCRSignals",null,new Error("Length doesn't
match"))}function vt(n,t){var o=n.SugTypes?n.SugTypes.split("\t"):
[],s=n.HandOffTypes?n.HandOffTypes.split("\t"):[],h=n.PSGPCRs?
n.PSGPCRs.split("\t"):[],c=n.PSGCCRs?n.PSGCCRs.split("\t"):[],l=n.PSGSTRs?
n.PSGSTRs.split("\t"):[],a=n.PSGSATCCRs?n.PSGSATCCRs.split("\t"):[],v=n.PSGSATPCRs?
n.PSGSATPCRs.split("\t"):[],f=o.length,i;if(u(f,0,s.length))for(i=0;i<f;i++){var
y=o[i],p=s[i],e=r("",p,y);t[e]={};h.length==f&&(t[e].PSGPCR=Number(h[i]));c.length=
=f&&(t[e].PSGCCR=Number(c[i]));l.length==f&&(t[e].PSGSTR=Number(l[i]));a.length==f&
&(t[e].PSGSATCCR=Number(a[i]));v.length==f&&(t[e].PSGSATPCR=Number(v[i]))}else
SharedLogHelper.LogError("parseGroupEngagementSignals",null,new Error("Length
doesn't match"))}function yt(n,t){var r={},f,l,o,i;if(t){var
a=0,v=0,u={};for(f=0,l=t;f<l.length;f++){var
y=l[f],e=y.key,p=y.value;u[e]={lexicalSimilarity:0,groupClickCounts:{},groupWeight:
{}};v+=s(u,e,n);o=c(p);u[e].groupClickCounts=o.groupLaunches;for(i in
u[e].groupClickCounts)r[i]||
(r[i]={probability:0,weight:0}),r[i].probability+=o.groupHits[i],a+=o.groupHits[i]}
h(r,u,v,a)}return r}function pt(n,t){var r={},f,o,i;if(t){var
l=0,a=0,u={};for(f=0,o=t;f<o.length;f++){var
v=o[f],c=v.key,e=v.value;u[c]={lexicalSimilarity:0,groupClickCounts:{},groupWeight:
{}};a+=s(u,c,n);for(i in e)e[i]&&e[i].prefixLaunchCount&&(r[i]||
(r[i]={probability:0,weight:0}),u[c].groupClickCounts[i]=e[i].prefixLaunchCount,r[i
].probability++,l++)}h(r,u,a,l)}return r}function s(n,t,i){var r=t.length-
i.length,u=r/t.length;return n[t].lexicalSimilarity=1-
u,n[t].lexicalSimilarity}function h(n,t,i,r){var o=0,s,e,f,u;for(e in t)
{f=t[e];f.lexicalSimilarity/=i;for(u in
f.groupClickCounts)s=f.groupClickCounts[u],f.groupWeight[u]=s*f.lexicalSimilarity,o
+=f.groupWeight[u]}for(u
in n)n[u].probability/=r;for(e in t){f=t[e];for(u in f.groupClickCounts)n[u]||
(n[u]={probability:0,weight:0}),f.groupWeight[u]/=o,n[u].weight+=f.groupWeight[u]}}
function c(n){var u=function(n,t,i){return n[t]=n[t]?n[t]+i:i},r={groupLaunches:
{},groupHits:{},otherGroupLaunches:0},f,t,i;for(f in n)
(t=n[f],t&&t.prefixLaunchCount)&&(i=t.groupType,i||i===0?
(u(r.groupLaunches,i,t.prefixLaunchCount),u(r.groupHits,i,1)):r.otherGroupLaunches+
=t.prefixLaunchCount);return r}function wt(n,t,i,r){if(r){var
f=i(t),u=r[f];u&&(n[266]=u.probability,n[267]=u.weight)}}function e(t){var i=t?
t.getDay():n.getCurrentDate().getDay(),r=i==6||i==0;return
n.config.invertIsWeekend?!r:r}function bt(n){for(var t in n)n[t]?
n[t]=l(Number(n[t])):delete n[t]}function l(n){return Number(n.toFixed(5))}function
kt(n,t){n.featureStore||
(n.featureStore={});n.featureStore[t]=1}n.getTextForLexicalFeatures=a;n.stringHashC
ode=f;n.getEditDistance=t;n.getEditDistanceIgnoreCase=v;n.computeEditDistanceRatio=
o;n.isWordBoundary=y;n.countMaxContiguousRepeatedChars=p;n.getNumberOfWords=w;n.con
tainsOnlyDigitsLettersOrSpaces=b;n.endsWithSpace=k;n.prefixIsLikeUrl=d;n.computeUrl
Features=g;n.computeDomainFeatures=nt;n.computeTitleFeatures=tt;var
it=["www.bing.","cn.bing.","www.google.","www.yandex.","www.baidu.","www.yahoo.",],
rt=["http://","https://",];n.getSumMruLaunches=ft;n.setMRUSignal=et;n.setMRUBackPro
pSignal=ot;n.setEngagementSignals=st;n.setSuggestionGroupEngagementSignals=ht;n.get
EngagementSignalKey=i;n.getAthenaGroupKey=r;n.checkAthenaGroupLength=u;n.parseWebEn
gagementSignals=ct;n.computeGroupBackpropagatedClicks=yt;n.computeSuggestionBackpro
pagatedClicks=pt;n.evaluateGroupLaunches=c;n.setMRUGroupBackpropClicks=wt;n.isWeeke
nd=e;n.removeUndefinedAndZeroAndTrimValues=bt;n.trimFeatureStoreValue=l;n.setFlagIn
FeatureStore=kt}(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var
i;(function(i){i.suggestionRankingModels={};var r=function(){function r(){}return
r.prototype.rank=function(n,i,r,u,f,e,o,s,h,c){var l,a,v,y;return
n.scope==t.Scope.PathCompletion?this.rankPathCompletion(i):(l=t.isL2(n)?null:
{mruGroupRatios:null,maxGroupCCR:null,maxGroupProbSugClickGivenPref:null,mruGroupBa
ckpropWeights:null,mruGroupBackpropRatios:null},a=i.slice(),this.orderSuggestions(n
,i,r,u,e,o,s,h,l,f),this.setGroupSuppressionSignals(l,i),v=this.getTopHitCandidates
(n,i,c.searchTheWeb,a),y=this.createMulticlassClassifierTopHitSuggestionList(v),
{topResults:y,mruSuppressions:l})},r.prototype.rankPathCompletion=function(n){var
t=n.find(function(n){return n.type=="CG"})||n[0];return{topResults:t?[t]:
[],mruSuppressions:null}},r.prototype.orderSuggestions=function(r,u,f,e,o,s,h,c,l,a
){var g=this,b=n.safeExecute(function(){return
g.createFeatureStore(r,u,f,e,o,s,h,l,a)},"createFeatureStore"),p,y,k,w,d,v;if(b=b||
u.map(function(){return{}}),y=c?
t.config.counterFactualRankerId:t.config.mainRankerId,y?(p=n.safeExecute(function()
{return i.suggestionRankingModels[y]},"getRanker"),p||
SharedLogHelper.LogError("getRanker",y,new Error("Model not
found"))):SharedLogHelper.LogError("getRanker",y,new
Error(c?"CounterFactualRankerId not defined ":"MainRankerId not
defined")),p)for(k=function(t){var i=b[t],r=n.safeExecute(function(){return
p(i)},"calculateRankingScore");u[t].rankingScore=n.trimFeatureStoreValue(r);u[t].fe
atureStore=i},v=0;v<u.length;v++)k(v);if(w=u.filter(function(n){return
n.type=="MB"}),u.sort(function(n,t){return t.rankingScore-
n.rankingScore}),w.length>1)for(d=u.map(function(n,t){return n.type=="MB"?
t:undefined}).filter(function(n){return typeof n=="number"}),v=0;v<w.length;+
+v)u[d[v]]=w[v]},r.prototype.getTopHitCandidates=function(n,t,i,r){var
f=this,u=t.filter(function(t){return f.allowInTopHit(n,t,r)});return
this.enableFallbackClassifier(n,u,i)?
this.getFallbackClassifierSuggestions(u):u},r.prototype.getFallbackClassifierScore=
function(r){var u=n.safeExecute(function(){return
i.suggestionRankingModels[t.config.fallbackClassifierId]},"getFallbackClassifier"),
f=u?n.safeExecute(function(){return
u(r.featureStore)},"calculateFallbackClassifierScore"):0;return
n.trimFeatureStoreValue(f)},r.prototype.getFallbackClassifierSuggestions=function(r
){var u,f;return(r=r.filter(function(n){return n.type!="SW"}),r.length>0)?
(u=r[0],u.fbcScore=this.getFallbackClassifierScore(u),f=n.isWebSuggestion(u)?
t.config.webFbcScoreThreshold:t.qfMode==3?
t.config.nonWebFbcScoreThresholdTabShell:t.config.nonWebFbcScoreThreshold,u.fbcScor
e>=f?r.slice(0,i.topHitIsMultiEntity(r)?2:1):[]):
[]},r.prototype.enableFallbackClassifier=function(n,i,r)
{if((t.config.enableFBMinQryLength==0||
n.queryToFetch.length>=t.config.enableFBMinQryLength)&&r&&t.config.fallbackClassifi
erId&&i.length>0){var u=i[0];return t.getGroupType(u)==t.GroupType.Cortana?!
1:u.isAnswer?
u.autoOpenPreviewPaneWhenOnTopHit&&t.config.applyFallbackClassifierToAutoOpenAnswer
s||u.type=="MB"&&t.config.applyFallbackClassifierToEntities:!0}return!
1},r.prototype.allowInTopHit=function(i,r,u){var h=!u||u.length==1,o,e,s,f;if(!
t.config.topHitAllowedForGridLayoutL2&&(i.scope==t.Scope.Photos||
i.scope==t.Scope.Videos)||i.topHitRestriction==1&&r.query.toLocaleLowerCase()!
=i.queryToFetch.toLocaleLowerCase()&&(n.contains(r.features,"ForcePrefixOnTop")||
r.features.push("ForcePrefixOnTop"),t.config.forceTypedQueryOnTop))return!
1;if(t.isRecourse(r))return t.config.recourseOnlyInGroups?!
1:h;if(t.isMobileCache)switch(r.handoffType){case 2:case 3:return!1;case 1:if(!
i.queryToFetch.includes("."))return!1}o=t.getGroupType(r);switch(o){case
t.GroupType.Store:return r.hc;case t.GroupType.PowerBi:return r.hc;case
t.GroupType.Command:return r.hc||h;case t.GroupType.LocalPlaces:return
t.config.topHitAllowedForLocal}if(t.getScope(o)==t.Scope.Emails&&!r.hc)return!
1;if(t.enforceOriginalOrder(r)&&u)for(e=0,s=u;e<s.length;e++)
{if(f=s[e],f==r)break;if(f.type==r.type&&f.handoffType==r.handoffType&&f.sourceForG
roup==r.sourceForGroup)return!1}return!
0},r.prototype.createMulticlassClassifierTopHitSuggestionList=function(n){for(var
u=0,r=0;r<Math.min(n.length,t.config.maxNumberOfTopResults);r++)n[r].rankingScore!
==undefined&&n[r].rankingScore>.5&&(u=r);return
u==0&&i.topHitIsMultiEntity(n)&&(u=1),n.slice(0,u+1)},r.prototype.createFeatureStor
e=function(i,r,u,f,e,o,s,h,c){var
rt=[],k=0,ut=0,d=0,lt=i.queryToFetch.toLocaleLowerCase(),at=function(n){return
t.getGroupType(n)},ft=n.getSumMruLaunches(f),et=0,ot={},g,nt,st,w,tt,v,y,b,it,a,l,p
,ht,ct;for(f&&(g=n.evaluateGroupLaunches(f),et=g.otherGroupLaunches,ot=g.groupLaunc
hes),nt=n.computeGroupBackpropagatedClicks(i.queryToFetch,c),st=n.computeSuggestion
BackpropagatedClicks(i.queryToFetch,c),w=0,tt=r;w<tt.length;w+
+)v=tt[w],v.handoffType==2&&(y=t.getAppItem(v),y&&(ut+=y.totalLaunches,y.totalLaunc
hes>k&&(k=y.totalLaunches)),v.deviceItem&&v.deviceItem.rankScore>d&&(d=v.deviceItem
.rankScore));for(b=0,it=r;b<it.length;b+
+)a=it[b],l=this.getSuggestionFeatureStore(lt,a,e,u,ut,s),l[13]=k,l[7]=d,l[60]=t.is
MobileCache?
1:0,u&&u.WebSignalsAvailable&&(l[93]=1),n.setMRUSignal(t.getSuggestionKey(a),l,f,ft
),this.setMRUGroupLaunchRatios(l,a,ft,ot,et,h),n.setMRUBackPropSignal(t.getSuggesti
onKey(a),l,st),nt&&n.setMRUGroupBackpropClicks(l,a,at,nt),p=n.getTextForLexicalFeat
ures(a),p&&(a.handoffType==1&&(n.computeUrlFeatures(p,i.queryToFetch,l,o),ht=n.getD
omain(p),n.computeDomainFeatures(a,i.queryToFetch,l,o,ht,e)),t.isFileOrFolder(a.typ
e)&&(ct=o.cvid+o.privacyNumber+p,l[131]=n.stringHashCode(ct))),n.removeUndefinedAnd
ZeroAndTrimValues(l),rt.push(l);return
rt},r.prototype.setGroupSuppressionSignals=function(n,i){var
f,e,u;if(n)for(n.maxGroupCCR={},n.maxGroupProbSugClickGivenPref={},n.mruGroupBackpr
opRatios={},n.mruGroupBackpropWeights={},f=0,e=i;f<e.length;f+
+)if(u=e[f],u.featureStore){var r=t.getGroupType(u),o=u.featureStore[94]||
0,s=u.featureStore[0]||0;n.maxGroupCCR[r]=n.maxGroupCCR[r]?
Math.max(n.maxGroupCCR[r],o):o;n.maxGroupProbSugClickGivenPref[r]=n.maxGroupProbSug
ClickGivenPref[r]?
Math.max(n.maxGroupProbSugClickGivenPref[r],s):s;n.mruGroupBackpropRatios[r]=u.feat
ureStore[266];n.mruGroupBackpropWeights[r]=u.featureStore[267];
(n.mruGroupBackpropWeights[r]||
n.mruGroupBackpropRatios[r])&&(n.backPropDataExists=!
0)}},r.prototype.setMRUGroupLaunchRatios=function(n,i,r,u,f,e){var s,o;if(r)
{e&&(e.mruGroupRatios={});n[186]=f/r;for(s in u)
{o=u[s]/r;t.getGroupType(i)==Number(s)&&(n[271]=o);e&&(e.mruGroupRatios[s]=o);switc
h(Number(s)){case t.GroupType.Apps:n[169]=o;break;case
t.GroupType.Settings:n[170]=o;break;case t.GroupType.Cortana:n[171]=o;break;case
t.GroupType.Command:n[172]=o;break;case t.GroupType.Photos:n[173]=o;break;case
t.GroupType.Videos:n[174]=o;break;case t.GroupType.Music:n[175]=o;break;case
t.GroupType.Documents:n[176]=o;break;case t.GroupType.Folders:n[177]=o;break;case
t.GroupType.Emails:n[178]=o;break;case t.GroupType.Store:n[179]=o;break;case
t.GroupType.SearchSuggestions:n[262]=o;n[180]=u[t.GroupType.Websites]?
(u[t.GroupType.Websites]+u[s])/r:o;break;case
t.GroupType.Websites:n[263]=o;n[180]=u[t.GroupType.SearchSuggestions]?
(u[t.GroupType.SearchSuggestions]+u[s])/r:o;break;case
t.GroupType.PathCompletion:n[181]=o;break;case
t.GroupType.PowerBi:n[182]=o;break;case t.GroupType.People:n[184]=o;break;case
t.GroupType.EdgeHistory:n[185]=o;break;case
t.GroupType.Bookmarks:n[260]=o;break;case
t.GroupType.LocalPlaces:n[261]=o}}}},r.prototype.getRank=function(n)
{if(n.type=="EBH")return undefined;if(n.deviceItem&&typeof n.deviceItem.rankScore!
="undefined")return n.deviceItem.rankScore;var i=t.isJumpListSuggestion(n)?
n.jumpListItem.usagePoints:undefined;return typeof i!="undefined"?
i:undefined},r.prototype.getSuggestionFeatureStore=function(i,r,u,f,e,o){var
s={},c,a,w,l,v,y,p,h,b,d,k;return this.setTypeSignal(r,s),c=t.getAppItem(r),c?
(s[2]=c.totalLaunches,s[92]=c.launchArguments?
1:0,e>0&&(s[103]=c.totalLaunches/e),this.addLastAccessDate(c.lastAccessed,s)):this.
addLastAccessDate(t.isJumpListSuggestion(r)?
r.jumpListItem.lastAccessed:null,s),a=t.getBrowsingHistoryItem(r),a&&(a.visitCount&
&(s[138]=a.visitCount),this.addLastAccessDate(a.dateVisited,s)),s
[96]=r.catalogScore,s[97]=r.avgRating,s[98]=r.ratingCount,s[99]=r.confidence,s[150]
=r.source,s[283]=r.pinnedToTaskbar?
1:undefined,r.hc&&(s[189]=1),s[17]=r.highConfidenceMetaSuggestionScore,w=this.getRa
nk(r),typeof w!="undefined"?
s[16]=w:s[4]=1,l=r,l.matchedOnlyOnContent&&(s[259]=1),l.matchedOnlyOnAuthor&&(s[273
]=1),l.lastModifiedDate&&(s[268]=n.getTimeDiffInDays(l.lastModifiedDate)),l.extensi
onLC==".lnk"&&(s[272]=1),s[23]=r.prefetchConfidenceScore,s[264]=f&&f.ProbNextKS!
==undefined?f.ProbNextKS:1,s[296]=f&&f.ProbNextKSV2!==undefined?
f.ProbNextKSV2:1,this.setThresholdRatios(s,f),this.setRatios(s,f),v=t.getGroupType(
r),y=r.query,r.type=="SW"&&(y="SearchTheWeb"),p=n.getAthenaGroupKey(String(v),Strin
g(r.handoffType),r.type),n.setEngagementSignals(s,u,p,y,!1,!
1),n.setEngagementSignals(s,o,p,y,!1,!0),o&&!u&&n.setEngagementSignals(s,o,p,y,!1,!
1),s[10]=i.length,(r.isAnswer||
v==t.GroupType.Cortana)&&(s[11]=1),h=n.getTextForLexicalFeatures(r),b=h?
h.toLocaleLowerCase():null,h||
(s[132]=1),b==i&&(s[133]=1),r.handoffType==2&&(r.type!
="PBI"&&(s[8]=1),t.isSetting(r.type)&&(s[64]=1),t.isApp(r.type)&&(s[83]=1)),v==t.Gr
oupType.SearchSuggestions&&(r.type!="SW"&&(s[82]=1),s[25]=1),d=s[132]==1,d?
s[137]=i.length:
(s[137]=h.length,s[134]=n.getEditDistance(i,b),s[135]=Math.min(100,n.computeEditDis
tanceRatio(s[134],i.length,h.length)),s[136]=n.isWordBoundary(i,h),s[284]=Math.abs(
h.length-i.length)),s[8]==1&&(s[27]=s[133]),(r.isAnswer||
v==t.GroupType.Cortana)&&(s[55]=s[133]),(r.type=="HS"||
r.fromHistory)&&(s[121]=1),s[41]=s[83]==1?s[40]:s[64]==1?s[39]:s[11]==1?
s[32]:s[89]==1?s[54]:s[85]==1?s[30]:s[86]==1?s[53]:s[87]==1?s[52]:s[61]==1?
s[31]:s[88]==1?s[51]:s[63]==1?s[35]:s[82]==1?s[29]:s[90]==1?s[50]:s[59]==1?
s[34]:s[37],(t.isSetting(r.type)||
t.isApp(r.type))&&(k=r.ciMetaData,this.computeConstraintIndexFeatures(r.deviceItem,
s,k),r.ciMatchedQuery=this.getConstraintIndexMatchedQuery(k)),r.signals&&(s[230]=r.
signals.DistanceToEntity,s[231]=r.signals.DistanceToEntityPrecision,s[232]=r.signal
s.RankingScore),s},r.prototype.addLastAccessDate=function(t,i){var
r=n.getTimeDiffInDays(t);r!=null?
i[9]=r:i[19]=1},r.prototype.setTypeSignal=function(n,t){switch(n.type)
{case"LDOC":case"FL":t[61]=1;break;case"LI":t[85]=1;break;case"LV":t[86]=1;break;ca
se"MU":t[87]=1;break;case"FD":t[88]=1;break;case"CG":t[89]=1;break;case"PT":t[90]=1
;break;case"PP":case"IBA":t[1]=1;break;case"ML":case"MD":t[21]=1;break;case"CS":t[6
3]=1;break;case"SW":t[59]=1}},r.prototype.setRatios=function(n,t){t&&t.AppsRatio!
==undefined&&(n[26]=t.AppsRatio,t.SettingsRatio&&(n[5]=t.SettingsRatio),t.StoreRati
o&&(n[57]=t.StoreRatio),t.PrefixProbability&&(n[12]=t.PrefixProbability),t.FilesRat
io&&(n[24]=t.FilesRatio),t.WebRatio&&(n[18]=t.WebRatio),t.PhotosVideosMusicRatio&&(
n[28]=t.PhotosVideosMusicRatio),t.ContactsRatio&&(n[56]=t.ContactsRatio),t.LocalPro
tocolRatio&&(n[91]=t.LocalProtocolRatio))},r.prototype.setThresholdRatios=function(
n,t){t&&t.ThApps!==undefined?
(n[40]=t.ThApps,t.ThStore&&(n[35]=t.ThStore),t.ThSetting&&(n[39]=t.ThSetting),t.ThC
ortAns&&(n[32]=t.ThCortAns),t.ThPrefixCount&&(n[38]=t.ThPrefixCount),t.ThWeb&&(n[29
]=t.ThWeb),t.ThSearchTheWeb&&(n[34]=t.ThSearchTheWeb),t.ThOther&&(n[37]=t.ThOther),
t.ThFile&&(n[31]=t.ThFile),t.ThFolder&&(n[51]=t.ThFolder),t.ThPath&&(n[50]=t.ThPath
),t.ThEmail&&(n[33]=t.ThEmail),t.ThCommAns&&(n[54]=t.ThCommAns),t.ThPhotoAns&&(n[30
]=t.ThPhotoAns),t.ThVideoAns&&(n[53]=t.ThVideoAns),t.ThMusicAns&&(n[52]=t.ThMusicAn
s),t.ThDNav&&(n[147]=t.ThDNav)):n[42]=1},r.prototype.computeConstraintIndexFeatures
=function(n,t,i){var u,o,f,e,s,r;if(n&&n.rawIndexResponse){if(!
i)return;if(t[157]=i.GrammarScore,t[158]=i.MatchScore,i.Parses&&i.Parses.length>0&&
i.Parses[0].Entities&&i.Parses[0].Entities.length>0)for(u=0,o=i.Parses[0].Entities;
u<o.length;u+
+)if(f=o[u],t[159]=f.EntityScore,f.Attributes)for(e=0,s=f.Attributes;e<s.length;e+
+)r=s[e],r.Name=="gscore"?
t[269]=Number(r.Value):r.Name=="lscore"&&(t[270]=Number(r.Value))}},r.prototype.get
ConstraintIndexMatchedQuery=function(n){return!n||n.MatchScore==0?null:n.Query},r}
();i.FastRankRanker=r})(i=t.Ranking||(t.Ranking={}))})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i=/[+.\\*?\[\]
()]/g,r={".":"\\.","+":"\\+","*":"\\*","\\":"\\\\","?":"\\?","[":"\\
[","]":"\\]","(":"\\(",")":"\\)"},u=/^(?:https?:\/\/)?(.*)/,f=/^(?:(?:https?:\/\/
(?:www\.)?)|(?:www\.))(.*)/,e=/^\s+/,o=function(){function o(t){var
i=this;this._host=t;t.bindKeyDown(function(t)
{n.isUpOrDownKey(t)&&i.reset()});t.bindQueryChangedOrInitialized(function(n)
{i._currentQuery=n;!i._fullAutoCompletedQuery||
i._fullAutoCompletedQuery.startsWith(n.originalQuery)||
n.originalQuery.startsWith(i._fullAutoCompletedQuery)||i.reset()})}return
o.prototype.apply=function(n){var r,o,i;if(n.query!=this._autoCompletedQuery)
{if(r=this._currentQuery.originalQuery,n.type!
="EBH"&&this._currentQuery.originalCursorPosition===r.length){var
s=this._currentQuery.scopePrefix?
this._currentQuery.scopePrefix.length+1:0,u=r.substr(s).replace(e,"").toLowerCase()
,f=n.query.toLowerCase();if(u!
==f&&(o=1,i=this.fullAutoCompleteOffset(f,u),i<0&&(t.config.allowInfixGhosting||
n.url)&&(i=this.infixAutoCompleteOffset(f,u),o=2),i<0&&(i=this.directNavAutoComplet
eOffset(f,u)),i>=0))
{this.setAutoCompletedQuery(r,n.query,i);n.autoCompleteType=o;return}}this._autoCom
pletedQuery&&(this.reset(),this._host.setAutoCompleteQueryText(r))}},o.prototype.re
set=function()
{this._autoCompletedQuery=null;this._fullAutoCompletedQuery=null},o.prototype.fullA
utoCompleteOffset=function(n,t){var i=n.startsWith(t);return i?t.length:-
1},o.prototype.infixAutoCompleteOffset=function(n,t){var f=n.search("[ .:,\\\\/
+_&-]"+t.replace(i,function(n){return r[n]})),e,o;return
f>0&&(e=n.substring(0,f+1).match(u)[1],o=e?e.match(/[ .:,\\/+_&-]
+/g).length+1:1,o<3)?f+1+t.length:-
1},o.prototype.directNavAutoCompleteOffset=function(n,t){var i=t.match(f),r;return
i&&(r=i[1],r.length>0&&n.startsWith(i[1]))?r.length:-
1},o.prototype.setAutoCompletedQuery=function(n,t,i){var
r=n+t.slice(i);this._host.setAutoCompleteQueryText(r);this._autoCompletedQuery=t;th
is._fullAutoCompletedQuery=r},o}();t.WSBAutoComplete=o})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t;(function(t){var i;(function(i)
{function e(n,i){var r,u;return i?(r=t.getKnownFolderPathLC(t.FOLDERID_SkyDrive),r?
r+="\\":r="\\onedrive\\",u=n.indexOf(r),u>=0&&(n=n.substr(u+r.length))):n.startsWit
h("onedrive:\\")&&(n=n.substr(10)),n}function o(n,i,r){var u,f,o,e;return i?
(u=t.getKnownFolderPathLC(t.FOLDERID_Profile)+"\\onedrive -
",f=n.indexOf(u),f>=0&&(o=n.indexOf("\\",f+u.length),n=n.substr(o+1))):t.windowsIde
ntity&&n.startsWith("onedrive for
business:\\")&&r&&(e=t.windowsIdentity.indexOf("@"),e!=-
1&&r.toLocaleLowerCase().indexOf("personal/"+t.windowsIdentity.substr(0,e))>0&&(n=n
.substr(23))),n}function l(n){return{fullySuppressedGroups:n.fullySuppressedGroups?
n.fullySuppressedGroups.slice(0):
[],partiallySuppressedGroups:n.partiallySuppressedGroups?
n.partiallySuppressedGroups.slice(0):
[],suppressedSuggestions:n.suppressedSuggestions?n.suppressedSuggestions.slice(0):
[]}}function s(n,i,r){var f="",e,o,u,s;return r?
(e=t.getKnownFolderPathLC(t.FOLDERID_Profile)
+"\\"+t.SubstrateTenantName.toLocaleLowerCase()
+"\\",o=i.indexOf(e),o>=0&&(u=o+e.length,s=i.indexOf(" - ",u),f=i.substr(u,s-
u).toLocaleLowerCase(),i=i.substr(s+3))):i.startsWith("sharepoint:\\")&&(i=i.substr
(12),f=n.siteTitle.toLocaleLowerCase()),[i,f]}function a(n){return n.type=="SW"||
n.type=="PWL"}function r(n,i){return!n.suppressed&&n.handoffType==0&&(!
n.htmlContent||
t.qfMode==3)&&n.query.toLocaleLowerCase()==i.queryToFetch.toLocaleLowerCase()}funct
ion h(n){return n.length>=2&&n[0].type=="MB"&&n[1].type=="MB"}var
u={"Microsoft.Windows.ControlPanel":"ControlPanel","Microsoft.AutoGenerated.
{923DD477-5846-686B-A659-0FCCD73851A8}":"Classic_{E9C71548-B580-43B2-ACDB-
1BA924002754}","{1AC14E77-02E7-4E5D-B744-
2EB1AE5198B7}\\dfrgui.exe":"Classic_{7D13A5DB-6081-48BD-8EA3-
A9D7FE67A335}","{6D809377-6AF0-444B-8957-A3773F02200E}\\Windows
Defender\\MSASCui.exe":"NameSpace_Classic_{D8559EB9-20C0-410E-BEDA-
7ED416AECC2A}","{1AC14E77-02E7-4E5D-B744-
2EB1AE5198B7}\\cleanmgr.exe":"Classic_{AACA901F-E74F-4894-B074-
F55059532853}","Microsoft.AutoGenerated.{BB044BFD-25B7-2FAA-22A8-
6371A93E0456}":"Classic_{45FDB5DF-1457-4A41-A824-
7AD9C75767BC}","Microsoft.Windows.PCSettings.DefaultApps":"AAA_SettingsPageAppsDefa
ults"},f={"NameSpace_Classic_{F942C606-0914-47AB-BE56-
1321B8035096}":"Classic_{232A1851-808C-4B44-A92A-
38E862989CE5",AAA_Proxy_Automatic_Config_Group:"AAA_SettingsPageNetworkProxy",AAA_S
ettings_DeveloperModeGroup:"AAA_SettingsPageRestoreDeveloperOptions",AAA_SystemSett
ings_Users_PicturePassword:"AAA_SettingsGroupPicturePassword"},c;i.isWebSuggestionF
orPrefix=r;i.topHitIsMultiEntity=h;c=function(){function i(n,t,i,r,u,f,e)
{this._host=n;this._instrumentationHelper=t;this._navigationHelper=i;this._previous
KeystrokeCache=r;this._ranker=u;this._renderedTopResults=f;this._previewPane=e}retu
rn i.prototype.launchWebSearch=function(n,t,i,r){var
u=n.queryToFetch;this._host.launchSearch(u,this._navigationHelper.getSearchUrl(n.fu
llPartialQuery,u,i,null,r),t)},i.prototype.getProtocol=function(i,r){var
s=this,f="PWL",u=this._instrumentationHelper.getInstrumentedSyntheticSuggestion(r,f
),e,o;return u?u:(e=t.qfMode!=3,u=t.createSuggestion(null,e?
this._host.getEdgeIcon:null,e?null:
{type:1,content:"&#xE774"},f,null,n.InstrumentedItem.getNonSuggestionInstrumentedIt
em(f,t.SyntheticQSCodesMaps.KValues),1,r,!1,"tp",function(){return
s._host.launchUrl(u.url)}),u.notAResult=!0,o=function(i){var
r=n.prettyPrintUrl(i.fixedUrl,i.queryToFetch,!
0);u.url=i.fixedUrl;u.tooltip=i.fixedUrl;u.query=r;u.text=HitHighlightingParser.add
Markers(r);u.narratorText=t.getNarratorText(u,s._host.getLocString("DirectNavSugges
tion"))},o(i),u.updateFromQuery=function(n){return n.isProtocol?(o(n),!0):!
1},this._instrumentationHelper.instrumentSyntheticSuggestion(r,u),u)},i.prototype.g
etSearchSuggestion=function(i,r,u,f,e,o,s,h){var
c=this._instrumentationHelper.getInstrumentedSyntheticSuggestion(r,u),a,l;return
c?c:
(a=i.scope,c=t.createSuggestion(null,null,f,u,null,n.InstrumentedItem.getNonSuggest
ionInstrumentedItem(u,t.SyntheticQSCodesMaps.KValues),e,r,!1,u),c.notAResult=!
0,c.primaryMetadata=o,s&&(c.additionalInfoText=" -
"+c.primaryMetadata),l=function(n)
{c.query=n.queryToFetch;c.text=HitHighlightingParser.addMarkers(n.queryToFetch);c.n
arratorText=t.getNarratorText(c);c.click=function(){return
h(c,n)}},l(i),c.updateFromQuery=function(n){return!
n.isProtocol&&n.scope==a&&n.queryToFetch?(l(n),!0):!
1},this._instrumentationHelper.instrumentSyntheticSuggestion(r,c),c)},i.prototype.g
etWebSearch=function(t,i,r,u,f,e){var o=this,s=n.contains([13,14],f);return
this.getSearchSuggestion(t,i,r,u,f,e,s,function(n,t){return
o.launchWebSearch(t,n.useRaf,r,f)})},i.prototype.getExplorerSearch=function(n,i)
{var u=this,r=this.getSearchSuggestion(n,i,"SDFE",
{content:"&#xEC50",type:1},2,this._host.getLocString("SearchInFileExplorer"),!
0,function(n,t){return u._host.launchSearchInFileExplorer(t.queryToFetch)});return
t.shouldSetThisPcGroupSource(t.GroupType.Documents,n)&&(r.sourceForGroup=1),r},i.pr
ototype.getOutlookWebAccessSearch=function(n,i){var
u=this,r=t.getAccountTypeForCloudContent()==1;return
this.getSearchSuggestion(n,i,"OWA",{content:"&#xE715",type:2},r?
8:12,this._host.getLocString("SearchInOutlookWeb"),!0,function(){return
u._host.launchUrl(r?"https://outlook.office.com/owa":"https://outlook.live.com/owa"
)})},i.prototype.getStoreSearch=function(n,t){var i=this;return
this.getSearchSuggestion(n,t,"STS",
{content:"&#xEA96",type:2},3,this._host.getLocString("SearchForAppsInTheStore"),!
0,function(n,t){return
i._host.launchStoreSearch(t.queryToFetch)})},i.prototype.getRecourse=function(i,r)
{if(!i.queryToFetch||i.taskFrame)return null;switch(t.getEffectiveScope(i)){case
t.Scope.Apps:return n.isBingEnabled()?this.getStoreSearch(i,r):null;case
t.Scope.Documents:return this.getExplorerSearch(i,r);case t.Scope.Emails:return
t.ScopeConfig[t.Scope.Emails].showUpsellOnSuggestionsList()?
null:this.getOutlookWebAccessSearch(i,r);case t.Scope.Photos:return
n.isBingEnabled()?this.getWebSearch(i,r,"SBI",
{content:"&#xEB9F",type:2},13,this._host.getLocString("SearchForWebImages")):null;c
ase t.Scope.Videos:return n.isBingEnabled()?this.getWebSearch(i,r,"SBV",
{content:"&#xE714",type:1},14,this._host.getLocString("SearchForWebVideos")):null;d
efault:return null}},i.prototype.getSyntheticSuggestions=function(i,r){var
f=i.queryToFetch&&n.isSuggestionTypeEnabled(n.WebDataSource,"SW",0,i)?
this.getWebSearch(i,r,"SW",t.getSearchSuggestionIcon(),0,t.getWebSuggestionAnnotati
on(this._host)):null,e=i.isProtocol?
this.getProtocol(i,r):null,u=this.getRecourse(i,r);return u&&(u.rankingScore=-
Number.MAX_VALUE),
{protocol:e,searchTheWeb:f,recourse:u}},i.prototype.canHaveDuplicates=function(i,r)
{switch(i){case n.WebDataSource:case
n.MRUDataSource:case"OSTMA":case"BAW":case"B4B":case"QS":case"PP":case"IBA":case"LR
A":case"ST":case"FL":case"LM":case"IFF":case"CG":case"PT":case"MPP":case"MST":case"
MFF":case"ODC":case"MODC":case"MDOC":case"MFOL":case"MPHO":case"MVID":case"MMUS":ca
se"EBH":case"SSUE":case"SSUC":return!0;case"PBI":return!1;case"SSEE":return
r.scope==t.Scope.Documents||r.scope==t.Scope.Emails;case"SSEC":return
r.scope==t.Scope.Emails}throw new Error("New data source "+i+" needs to be
explicity classified as needed deduping with other data sources or
not");},i.prototype.canHaveDuplicatesWithinDataSource=function(i,r){switch(i)
{case"MPP":case"MST":case n.MRUDataSource:return!0;case"SSEE":case"SSEC":return
r.scope==t.Scope.Emails}return
t.supportsShortcuts(i,r)},i.prototype.isDuplicate=function(i,r,h){var
a,v,c,l,g,nt,tt,it,d,y,p,rt,ut,b,k;if(n.contains([5,4],r.handoffType)&&n.contains([
5,4],h.handoffType)&&r.actionUri==h.actionUri&&r.query.toLocaleLowerCase()==h.query
.toLocaleLowerCase()||r.handoffType==10&&h.handoffType==10&&r.type==h.type&&!
r.htmlContent&&!
h.htmlContent&&r.query.toLocaleLowerCase()==h.query.toLocaleLowerCase()||r.type!
="PWL"&&r.handoffType==1&&h.handoffType==1&&n.isDuplicateUrl(i,r.url,h.url)||
(a=t.getAppItem(r),v=t.getAppItem(h),c=a?
a.filePath:r.path,c&&(c=c.toLocaleLowerCase()),l=v?
v.filePath:h.path,l&&(l=l.toLocaleLowerCase()),g=t.getAppPfn(r),nt=t.getAppPfn(h),g
&&nt&&g.toLocaleLowerCase()==nt.toLocaleLowerCase()))return!
0;if(tt=t.getCommandLineItem(r),it=t.getCommandLineItem(h),tt&&v||it&&a){var ft=c||
l,w=tt||it,et=w.encodedPath;return ft&&et&&ft==et.toLocaleLowerCase()?(d=a||v,!
w.launchArguments||
(d.launchArguments||"").toLocaleLowerCase()==w.launchArguments.toLocaleLowerCase()|
|!
d.launchArguments&&w.launchArguments&&d.displayName.toLocaleLowerCase().startsWith(
w.displayName.toLocaleLowerCase())):!1}if(r.deviceItem&&h.deviceItem)
{if(y=r.deviceItem.id||"",p=h.deviceItem.id||"",y.toLocaleLowerCase()==p.toLocaleLo
werCase())return c&&!a&&l&&!v&&t.enrichMetadataFromDuplicate(i,r,h,this._host),!
0;if(a){if(t.isSetting(h.type)&&u[y]==p)return!0}else
if(t.isSetting(r.type)&&(v&&u[p]==y||t.isSetting(h.type)&&(f[y]==p||
f[p]==y)))return!0}if(this.isIcoShortcutDuplicate(r,h)||
this.isIcoShortcutDuplicate(h,r))return!0;if(c&&l){if(c==l)return
t.enrichMetadataFromDuplicate(i,r,h,this._host),!0;if(!a&&!
v)if(r.handoffType==h.handoffType){if(r.handoffType==8&&r.url==h.url)return
t.enrichMetadataFromDuplicate(i,r,h,this._host),!0}else{if((c=e(c,r.handoffType!
=7),l=e(l,h.handoffType!=7),c==l)||(rt=r.handoffType!=8,ut=h.handoffType!
=8,c=o(c,rt,r.url),l=o(l,ut,h.url),c==l))return
t.enrichMetadataFromDuplicate(i,r,h,this._host),!0;if(t.SubstrateTenantName){var
ot=s(r,c,rt),st=ot[0],lt=ot[1],ht=s(h,l,ut),ct=ht[0],at=ht[1];if(lt==at&&(ct.endsWi
th(st)||st.endsWith(ct)))return t.enrichMetadataFromDuplicate(i,r,h,this._host),!
0}}if(b=r.targetPathLC,k=h.targetPathLC,a&&h.type=="IBA"&&(c=t.resolveKnownFolderGU
IDsInPath(c)),v&&r.type=="IBA"&&(l=t.resolveKnownFolderGUIDsInPath(l)),
(b&&k&&b==k||b&&b==l||k&&c==k||c==l)&&(!a||!v||
(a.launchArguments||"").toLocaleLowerCase()==(v.launchArguments||"").toLocaleLowerC
ase()))return!0}return this.isCortanaSettingDuplicate(r,h)||
this.isCortanaSettingDuplicate(h,r)?!
0:r.type==="PPL"&&h.type==="PPL"&&r.uniqueName&&h.uniqueName&&r.uniqueName.toLocale
LowerCase()===h.uniqueName.toLocaleLowerCase()?!
0:r.type==="OLE"&&h.type==="OLE"&&r.internetMessageId===h.internetMessageId?!
0:r.type==="BKS"&&h.type==="BKS"&&r.url&&h.url&&r.url===h.url?!0:!
1},i.prototype.isIcoShortcutDuplicate=function(n,i){return
n.targetPathLC&&t.isApp(n.type)&&t.isApp(i.type)&&n.targetPathLC.includes("\\instal
ler\\")&&n.targetPathLC.endsWith(".ico")&&n.text==i.text},i.prototype.isCortanaSett
ingDuplicate=function(n,t){return n.handoffType==5&&n.actionUri=="ms-
cortana://navigate/Settings"&&t.deviceItem&&t.deviceItem.id=="CortanaSettings"},i.p
rototype.copyMruSignals=function(i,r,u){t.qfMode==3&&(i==n.MRUDataSource||
i=="MPP"||i=="MST"||
i=="MFF")&&(r.hasMruData=u.hasMruData)},i.prototype.rank=function(i,u,f,e,o,s,h,c)
{var at,bt=this,y,nt,et,it,ht,ct,rt,b,ut,d,wt,lt,k;t.isL2(e)&&(h=!
1);y=null;n.isDataSourceEnabled("WRS",e)&&(y=f.WRS);y||(y=f[n.WebDataSource]);var
ft=y?y.rankingSignals:null,kt=y?
y.webTopResultRoutingType:1,g=f[n.MRUDataSource],vt=null,a=null,yt=null;ft&&(ft.Web
SignalsAvailable=!0,vt=y.engagementSignals,a=y.suppressedGroups,
(t.config.groupsToNeverFullySuppress||[]).length>0&&a&&(a.fullySuppressedGroups||
[]).length>0&&(nt=[],et=[],a.fullySuppressedGroups.forEach(function(i)
{n.contains(t.config.groupsToNeverFullySuppress,i)?
nt.push(i):et.push(i)}),nt.length>0&&(a=l(a),a.fullySuppressedGroups=et,
(at=a.partiallySuppressedGroups).push.apply(at,nt))));this._previousKeystrokeCache&
&(yt=this._previousKeystrokeCache.getPreviousEventWebSignalsData(e.queryToFetch));v
ar dt=g?g.SuggestionEngagementData:null,gt=g?
g.LookupCompletions:null,ni={cvid:this._host.getConversationId(),privacyNumber:this
._host.getPrivacyNumber()},p=this.getSyntheticSuggestions(e,s);u=u.slice();a&&(a.fu
llySuppressedGroups&&a.fullySuppressedGroups.length>0&&(u=u.filter(function(t)
{return!
n.contains(a.fullySuppressedGroups,String(bt.getGroupTypeForSuppressions(t)))})),a.
suppressedSuggestions&&a.suppressedSuggestions.length>0&&(u=u.filter(function(i)
{return!
n.contains(a.suppressedSuggestions,t.getSuggestionKey(i))})));i.length==0&&p.protoc
ol&&u.unshift(p.protocol);var
ot=o.length==1&&o[0].childSuggestions&&o[0].childSuggestions.some(function(n)
{return
n.displayed}),pt=this.getSuggestionsToRank(ot,i,u,p,s),tt=this._ranker.rank(e,pt,ft
,dt,gt,vt,ni,yt,c,p);this._previousKeystrokeCache&&!
h&&this._previousKeystrokeCache.updateSpellerTriggerData(e.queryToFetch,pt);i.lengt
h==0&&p.recourse&&u.push(p.recourse);var
v=this.determineTopResults(o,u,tt,p,e,s,ot),st=i.filter(function(t){return!
n.contains(o,t)}),w=this.determineSuggestionsToAddToGroups(st,u,o,v,p,e,ot,h);if(tt
.mruSuppressions&&tt.mruSuppressions.backPropDataExists&&!
t.shouldRenderFlatListWithoutGroups(e))this.applyMRUSuppressions(tt,o,v,w,e);else
if(a&&a.partiallySuppressedGroups&&this.canPartiallySuppressGroups(v,w))for(it=0,ht
=w;it<ht.length;it++)k=ht[it],r(k,e)||
(ct=this.getGroupTypeForSuppressions(k),this.canBePartiallySuppressed(k,ct)&&n.cont
ains(a.partiallySuppressedGroups,String(ct))&&(n.contains(o,k)||(k.suppressed=!
0)));if(rt=[],this.removeProtocolIfDuplicate(e,p,v,st,w,rt),this.setUseRafFlag(v,w,
e,kt),b=this.getGroupOrder(e,w,st),ut=e.forceGroupOnTop,ut!
=undefined&&(d=b.findIndex(function(n){return
t.sameGroup(n,ut)}),d>=0&&(b.splice(d,1),b.unshift(ut)),d=b.findIndex(function(n)
{return
t.isTopHitChildGroup(n)}),d>=0&&(wt=b[d],b.splice(d,1),b.unshift(wt))),t.shouldRend
erFlatListWithoutGroups(e)&&(v=v.concat(w.filter(function(n){return!
n.suppressed})),w=[],t.qfMode==3&&v.length>0&&v[0].handoffType!
=0&&v[0].handoffType!=1&&v[0].handoffType!=10&&!
v[0].hasMruData&&(lt=v.findIndex(function(n){return n.handoffType==0||
n.handoffType==1||
n.handoffType==10}),lt>0&&(k=v.splice(lt,1),v.unshift(k[0]))),n.trimList(v,t.maxSug
gestionsWhenFlatList,function(t){return!n.contains(
i,t)&&!t.notAResult}),rt.length!=0))throw new Error("Can't remove suggestions from
groups when there are no
groups");return{topResults:v,suggestionsToAdd:w,suggestionsToRemove:rt,groupOrder:b
}},i.prototype.applyMRUSuppressions=function(i,u,f,e,o){var
c,l,a,h,s;if(this.canPartiallySuppressGroups(f,e))for(c={},l=0,a=e;l<a.length;l+
+)if(h=a[l],!r(h,o)&&(s=t.getGroupType(h),this.canBePartiallySuppressed(h,s))){if(!
c[s]){var v=i.mruSuppressions.maxGroupCCR?i.mruSuppressions.maxGroupCCR[s]||
0:0,y=i.mruSuppressions.maxGroupProbSugClickGivenPref?
i.mruSuppressions.maxGroupProbSugClickGivenPref[s]||
0:0,p=i.mruSuppressions.mruGroupRatios?i.mruSuppressions.mruGroupRatios[s]||
0:0,w=i.mruSuppressions.mruGroupBackpropRatios?
i.mruSuppressions.mruGroupBackpropRatios[s]||
0:0,b=i.mruSuppressions.mruGroupBackpropWeights?
i.mruSuppressions.mruGroupBackpropWeights[s]||
0:0,k=t.config.wtMaxGroupCCR*v+t.config.wtMaxGroupProbSugClickGivenPref*y+t.config.
wtMruGroupRatio*p+t.config.wtMruGroupBackpropRatio*w+t.config.wtMruGroupBackpropWei
ght*b+t.config.wtLRBias,d=1/(1+Math.exp(-
k));c[s]=n.trimFeatureStoreValue(d)}h.mruSuppressionScore=c[s];h.mruSuppressionScor
e<t.config.lRModelCutOff&&(n.contains(u,h)||(h.suppressed=!
0))}},i.prototype.allowedInGroups=function(n){return n.isAnswer?n.allowedInGroups:!
0},i.prototype.getGroupTypeForSuppressions=function(n){var
i=t.getGroupType(n);return i==t.GroupType.LocalPlaces?
t.GroupType.SearchSuggestions:i},i.prototype.canBePartiallySuppressed=function(n,i)
{return t.getScope(i)!
=t.Scope.All},i.prototype.canPartiallySuppressGroups=function(n,i){return
t.scopesAvailable?n.every(function(n){return
t.getGroupType(n)==t.GroupType.SearchSuggestions})&&i.every(function(n){return
t.getGroupType(n)==t.GroupType.SearchSuggestions})?!1:!0:!
1},i.prototype.isProtocolDuplicate=function(t,i,r){return t==r?!1:t.type=="MD"?!
0:t.handoffType==1&&n.isDuplicateUrl(i,t.url,r.url)},i.prototype.removeProtocolIfDu
plicate=function(t,i,r,u,f,e){var h=this,o,s;i.protocol&&(o=function(n){return!
n.suppressed&&h.isProtocolDuplicate(n,t,i.protocol)},(r.some(o)||u.some(o)||
f.some(o))&&(n.tryRemove(r,i.protocol)?r.length||(s=n.removeFirstWhere(u,o)||
n.removeFirstWhere(f,o),r.push(s)):n.tryRemove(f,i.protocol)||
n.contains(u,i.protocol)&&e.push(i.protocol),i.protocol=null))},i.prototype.getSugg
estionsToRank=function(i,r,u,f){i&&(r=r.filter(function(n){return!
t.isChildSuggestion(n)}));f.recourse&&(r=r.filter(function(n){return n!
=f.recourse}));var e=r.concat(u);return f.searchTheWeb&&!
n.contains(r,f.searchTheWeb)&&e.push(f.searchTheWeb),e},i.prototype.determineTopRes
ults=function(i,u,f,e,o,s,c){var it=this,l,b,y,p,w,g,nt,k,v,tt,d;if(c||!
o.queryToFetch||t.config.stickyTopResultsV2&&i.length>1&&!t.isL2(o))return
i;for(l=t.config.forceVoiceFlowOnTopHit?[]:f.topResults,b=this._previewPane?
this._previewPane.getPreviewedSuggestionToForceTopHit():null,b&&this._ranker.allowI
nTopHit(o,b)&&(y=function(n){return
t.isEquivalentForPreviewPanePurposes(o,b,n)},p=l.findIndex(y),p!=0&&(w=void 0,p>0?
(w=l[p],l.splice(p,1)):w=i.find(y)||u.find(y)||(e.searchTheWeb?[e.searchTheWeb]:
[]).find(y),w&&l.unshift(w))),e.protocol&&e.searchTheWeb&&this._ranker.allowInTopHi
t(o,e.protocol)&&n.tryRemove(l,e.searchTheWeb),e.searchTheWeb&&(g=l.indexOf(e.searc
hTheWeb),g>=0&&l.some(function(n){return n!
=e.searchTheWeb&&r(n,o)})&&l.splice(g,1)),l.length==0&&(t.config.stickyTopResultsV2
&&i.length>0?
l.push.apply(l,i):e.protocol&&this._ranker.allowInTopHit(o,e.protocol)?
l.push(e.protocol):e.searchTheWeb&&this._ranker.allowInTopHit(o,e.searchTheWeb)?
l.push(e.searchTheWeb):e.recourse&&this._ranker.allowInTopHit(o,e.recourse)&&l.push
(e.recourse)),nt=t.getEffectiveScope(o)==t.Scope.Emails?
t.config.maxNumberOfEmailsInTopResult:Math.max(t.config.maxNumberOfTopResults,h(l)?
2:0,i.length),l.length>nt&&(l=l.slice(0,nt)),k=i.length-1;k>=0;--
k)v=i[k],n.contains(l,v)||(v.useRaf&&(v.useRaf=!1),v!
=e.searchTheWeb&&u.unshift(v));return l.length==1&&n.safeExecute(function(){return
it.applyAppOverride(l,u)},"applyDeviceInfoOverride"),l.forEach(function(n){return
n.suppressed=!1}),t.config.stickyTopResultsV2&&l.length==1&&i.length==1&&!
t.isL2(o)&&(tt=l[0],d=i[0],tt==d||a(d)||
l.unshift(d)),l},i.prototype.applyAppOverride=function(n,t){var
r=["Microsoft.Office.WINWORD.EXE","{6D809377-6AF0-444B-8957-A3773F02200E}\\Windows
NT\\Accessories\\wordpad.exe"],u=n[0].deviceItem?
n[0].deviceItem.id:null,i;u&&u.startsWith(r[1])&&(i=t.findIndex(function(n){return
n.deviceItem&&n.deviceItem.id&&n.deviceItem.id.startsWith(r[0])}),i>=0&&n.splice(0,
1,t[i]))},i.prototype.setUseRafFlag=function(n,i,r,u){var
e,s,o,h,f;if(t.isCortanaEnabledCache)if(u==2||
t.config.forceVoiceFlowOnTopHit)for(e=0,s=n;e<s.length;e++)f=s[e],f.handoffType!
=0||f.isAnswer||(f.useRaf=!0);else for(o=0,h=n;o<h.length;o+
+)f=h[o],f.handoffType==0&&!f.isAnswer&&this._host.matchesVcd(f.query)&&(f.useRaf=!
0)},i.prototype.determineSuggestionsToAddToGroups=function(i,u,f,e,o,s,h,c){var
k=this,l=u.filter(function(t){return!
n.contains(e,t)}),w=[],a,v,y,p,b;for(t.shouldRenderFlatListWithoutGroups(s)||
l.forEach(function(n,i){k.allowedInGroups(n)||
(t.getScope(t.getGroupType(n))==t.Scope.All?w.push(i):n.suppressed=!
0)}),a=w.length-1;a>=0;--a)l.splice(a,1);return
o.searchTheWeb&&(v=e.indexOf(o.searchTheWeb),v!=-
1&&(y=n.removeFirstWhere(l,function(n){return
r(n,s)}),y&&(e[v]=y))),p=l.filter(function(i){return
n.contains([t.GroupType.SearchSuggestions,t.GroupType.Websites,t.GroupType.LocalPla
ces],t.getGroupType(i))}),b=l.filter(t.enforceOriginalOrder),!
h&&this.canRenderChildSuggestions(e,c,s)&&this.addChildSuggestions(e[0],l),s.queryT
oFetch&&l.sort(function(n,t){return t.rankingScore-
n.rankingScore}),this.insertDefaultSearchTheWeb(s,o,e,i,l,p),l=this.insertSuggestio
nsToRightPlace(l,b),this.insertSuggestionsToRightPlace(l,p)},i.prototype.insertDefa
ultSearchTheWeb=function(n,i,u,f,e,o){var
s,h;i.searchTheWeb&&(n.scope==t.Scope.Web||
n.scope==t.Scope.All)&&(s=o.findIndex(function(t){return
r(t,n)}),f.some(function(t){return r(t,n)})||u.some(function(t){return r(t,n)})?s!
=-1&&(h=o[s],o.splice(s,1),e.splice(e.indexOf(h),1)):s==-
1&&(o.unshift(i.searchTheWeb),e.unshift(i.searchTheWeb)))},i.prototype.getGroupOrde
r=function(n,i,r){var f,c,e,o,l,s,v,h,a,u;switch(n.scope){case t.Scope.Web:if(!
n.queryToFetch)return[{type:t.GroupType.EdgeHistory},{type:t.GroupType.Websites},
{type:t.GroupType.SearchSuggestions}];break;case
t.Scope.Apps:return[{type:t.GroupType.Apps},{type:t.GroupType.Store}];case
t.Scope.Photos:return[{type:t.GroupType.Photos},
{type:t.GroupType.SearchSuggestions}];case
t.Scope.Videos:return[{type:t.GroupType.Videos},
{type:t.GroupType.SearchSuggestions}]}for(f=r.concat(i),f.sort(function(n,t){return
t.rankingScore-n.rankingScore}),c=[],e=[],o=0,l=f;o<l.length;o+
+)u=l[o],u.suppressed?e.push(u):c.push(u);for(e.length!
=0&&(f=c.concat(e)),s=[],v=function(n){var
r=t.getGroupType(n),i={type:r,source:n.sourceForGroup};s.some(function(n){return
t.sameGroup(n,i)})||s.push(i)},h=0,a=f;h<a.length;h++)u=a[h],v(u);return
s},i.prototype.addChildSuggestions=function(i,r)
{i.calculateChildSuggestions&&i.calculateChildSuggestions();i.childSuggestions&&i.c
hildSuggestions.length>0&&Object.keys(t.config.topHitChildGroups).forEach(function(
u,f){var e=parseInt(u),o=n.contains(t.config.suppressedTopHitChildGroups,e)?
0:t.config.topHitChildGroups[u],s;o>0&&(s=i.childSuggestions.filter(function(n)
{return n.groupType==e}).slice(0,o),s.forEach(function(n,t){n.rankingScore=1e4-
100*f-t;r.push(n)}))})},i.prototype.canRenderChildSuggestions=function(n,i,r){var
u,f;return t.shouldRenderFlatListWithoutGroups(r)?!1:n.length!=1?!1:
(u=n[0],t.alwaysWide&&t.supportsPreview(u)!=1)?!1:i?
this._renderedTopResults.topResults.length==1?
(f=this._renderedTopResults.topResults[0],f.hasChildSuggestionsDisplayed&&f.query==
u.query&&t.getGroupType(f)==t.getGroupType(u)):!1:!
0},i.prototype.insertSuggestionsToRightPlace=function(t,i){var
r,e,u,f;if(i.length==0)return t;for(r=[],e=i[0],u=0;u<t.length;u++)f=t[u],f==e?
r=r.concat(i):n.contains(i,f)||r.push(f);return r},i}();i.Aggregator=c})
(i=t.Ranking||(t.Ranking={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var t=function(){function t(n,t,i,r){var
u=this;this._instrumentationHelper=t;this._sequenceNumberReader=i;this._page=r;this
._itemLaunchEventHandlers=[];this.groups=[];this.topResults=[];this._lastUpdatedSeq
uenceNumber=-1;this._topResultsRenderingDisabled=!1;this._groupRenderingDisabled=!
1;n.bindDismissed(function()
{u.topResults=[];u.renderTopResults();u.groups=[];u.renderGroups();u._partialQuery=
null;u._lastUpdatedSequenceNumber=-1});n.bindShown(function()
{u._selectedItem=null})}return t.prototype.bindItemLaunch=function(n)
{this._itemLaunchEventHandlers.push(n)},t.prototype.onSuggestionLaunch=function(n,t
,i){this._itemLaunchEventHandlers.forEach(function(r){return
r(n,t,i)})},t.prototype.onQueryChanged=function(n)
{this._partialQuery=n},t.prototype.getCurrentTopResults=function(){return
this.topResults.slice(0)},t.prototype.getTopResultsWhichFitInCanvas=function(n)
{return n},t.prototype.resetAriaSelected=function(n)
{n&&this._page.render(function(){var t=_ge(n.id);t&&(t.setAttribute("aria-
selected","false"),t.setAttribute("aria-
selected","true"))})},t.prototype.updateTopResults=function(t,i,r,u,f,e){var
h=this,a,o,s,y;t!=(u!
=this._lastUpdatedSequenceNumber)&&SharedLogHelper.LogError("updateTopResult",t+" !
= (sequenceNumber "+u+" != lastUpdateSequenceNumber
"+this._lastUpdatedSequenceNumber+")",new Error("Precondition
failed"));this._lastUpdatedSequenceNumber=u;t&&(this.groups=[],this.onGroupsCleared
());a=this._selectedItem;o=this.topResults;i=this.getTopResultsWhichFitInCanvas(i);
s=!n.sequenceEqual(i,o)||o.some(function(n){return
n.needsRefreshAfterDeduping});s&&(this.topResults=i.slice(0));var c=!1,l=s?
i.length:0,v=function()
{c&&l==0&&(h._instrumentationHelper.instrumentTopResultRendered(u,i.map(function(n)
{return n.type})),c=!1)};return s?(this.renderTopResultsAfter(function(){for(var
i,t=0,s=h.topResults;t<s.length;t++)i=s[t],i.needsRefreshAfterDeduping=!
1,n.contains(o,i)?l-=1:h.setupIcon(u,i,!0,function(){l-
=1;v()});h.onBeforeRenderTopResults(o,f,r,e)}),c=!0):
(y=this.onBeforeRenderTopResults(o,f,r,e),y==0&&(this.renderTopResults(),c=!
0)),this._selectedItem&&(a!=this._selectedItem||
t)&&n.contains(this.topResults,this._selectedItem)&&this.resetAriaSelected(this._se
lectedItem),[s,v]},t.prototype.setupIcon=function(n,t,i,r)
{r()},t.prototype.renderGroups=function(){this._groupRenderingDisabled||
this._page.updateGroupsView({query:this._contentQuery,topResults:this.topResults,gr
oups:this.groups})},t.prototype.renderGroupsAfter=function(n){var
t=this._groupRenderingDisabled;this._groupRenderingDisabled=!
0;try{n()}finally{this._groupRenderingDisabled=t;this.renderGroups()}},t.prototype.
renderTopResults=function(){this._topResultsRenderingDisabled||
this._page.updateTopResultsView({query:this._contentQuery,topResults:this.topResult
s,groups:this.groups})},t.prototype.renderTopResultsAfter=function(n){var
u=this._topResultsRenderingDisabled,t,i,r;this._topResultsRenderingDisabled=!
0;try{n()}finally{for(this._topResultsRenderingDisabled=u,this.renderTopResults(),t
=0,i=this.topResults;t<i.length;t++)r=i[t],r.executeScript&&r.executeScript()}},t}
();n.BaseRootViewModel=t}(AutoSuggest||(AutoSuggest={})),function(n){var t="aria-
selected",i=function(){function i(i){var
r=this,u;this._host=i;this._renderingInProgress=!
1;this._narratorLaunchHandlers=[];this._viewData={};this._targetElemCache={};u=new
MutationObserver(function(n){var i,o,u,f,s,e;if(!r._renderingInProgress)
{for(i=[],u=0,f=n;u<f.length;u+
+)s=f[u],e=s.target,o=e.id,i.push(e.getAttribute(t)=="true"?1:0);
(i.length==1&&i[0]==0||
i.length==2&&i[0]^i[1])&&r._narratorLaunchHandlers.forEach(function(n){return
n(o)})}});u.observe(document,{subtree:!0,attributes:!0,attributeFilter:
[t]});n.View.getLocString=function(n){for(var r=[],t=1;t<arguments.length;t++)r[t-
1]=arguments[t];return i.getLocString.apply(i,
[n].concat(r))};this.addViewData("TestHooksEnabled",n.config.th)}return
i.prototype.adjustHeightAsync=function(){var n=this;sb_st(function(){return
n._host.adjustHeight()},0)},i.prototype.bindOnNarratorLaunch=function(n)
{this._narratorLaunchHandlers.push(n)},i.prototype.render=function(t){var
i=this;this._renderingTimer&&sb_ct(this._renderingTimer);this._renderingInProgress=
!
0;try{n.View.ViewData=this.getViewData();t()}finally{this._renderingTimer=sb_st(fun
ction(){i._renderingTimer=null;i._renderingInProgress=!
1},0)}},i.prototype.renderReactView=function(n,t,i){var
f=this,r=this._targetElemCache[n],u;r||
(this._targetElemCache[n]=r=_ge(n));u=i;u.adjustHeight||(u.adjustHeight=function()
{return f.adjustHeightAsync()});this.render(function(){return
_w.ReactDOM.render(React.createElement(t,i),r)},n)},i.prototype.addViewData=functio
n(n,t){this._viewData[n]=t},i.prototype.getViewData=function(){return
this._viewData},i}();n.BasePage=i}(AutoSuggest||
(AutoSuggest={}));__extends=this&&this.__extends||function(){var
n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t)
{n.__proto__=t}||function(n,t){for(var i in
t)t.hasOwnProperty(i)&&(n[i]=t[i])};return function(t,i){function r()
{this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):
(r.prototype=i.prototype,new r)}}(),function(n){var t;(function(t){var
u="slideInMessage",i,r;t.PreviewPaneWidth=440;t.DebugWindowWidth=800;r=function(r)
{function f(n){var u=r.call(this,n)||this,f;return
u.host=n,u._tabShellFooterShownType=0,u._tabShellFooterVerifyAccountShown=!
1,u._windowsTemporaryMessageShown=!1,u._windowsIndexingMessageShown=!
1,u._progressBarVisible=!1,u._previewPaneVisible=!1,u._debugWindowVisible=!
1,u._suggestionsContainerHeight=0,u._immersiveSearchHeightExpandedInThisConversatio
n=!
1,i=SearchAppWrapper.CortanaApp,u._tabShellFooterWrapper=_ge("tabShellFooterWrapper
"),u._windowsTemporaryMessageWrapper=_ge("temporaryMessageWrapper"),u._windowsIndex
ingMessageWrapper=_ge("indexingMessageWrapper"),u._qfContainer=_ge("qfContainer"),n
.bindAppVisible(function(){u._root||(u._root=_ge("root"));var
r=i.width,f=i.height;r&&f?
u.setDimensions(r,f):ThresholdUtilities.getCortanaHeaders(function(n){if(n){var
t=n["X-BM-
DeviceDimensionsLogical"].split("x"),i=t[0],r=t[1];u.setDimensions(parseInt(i),r)}}
);t.previewPaneAvailable&&(u.initPreviewPane(),t.setVisibility(u._previewPane,t.alw
aysWide),!
t.alwaysWide&&n.hasFallbackHappened()&&i.resetToDefaultSize());u.initDebugWindow();
u.setConditionalCss("searchBoxOnTop",t.searchBoxOnTop);u.setConditionalCss("immersi
veSearch",t.qfMode==2);u.setConditionalCss("noScopes",!
t.scopesAvailable);u.setConditionalCss("andr",t.isAndromedaCache);u.setConditionalC
ss("wideByDefault",t.qfMode==1);u.setQueryBasedCss(null)}),n.bindAppHidden(function
(){u._openPreviewPaneButtonCache=undefined;u.markWebViewExpandedState(!
1);t.setVisibility(u._previewPane,!1)}),f=function(){t.alwaysWide||
(u._previewPaneVisible=!1,t.setVisibility(u._previewPane,!
1));u._debugWindowVisible=!1;t.setVisibility(u._debugWindow,!
1)},n.bindQueryChangedOrInitialized(function(n)
{n.fullPartialQuery&&u.ensureWebViewExpanded()}),n.bindSearchBoxClick(function()
{return u.ensureWebViewExpanded()}),n.bindKeyDown(function(n)
{n==40&&u.ensureWebViewExpanded()}),n.bindDismissed(function()
{u.resetSuggestionsContainerHeight();f()}),i.addEventListener("resettingtodefaultsi
ze",function(){f()}),sj_be(sj_b,"contextmenu",function(n){for(var t=n.target;t;)
{if(t.classList.contains("allowcontextmenu"))break;t=t.parentElement}t||
sj_pd(n)}),u}return __extends(f,r),f.prototype.setConditionalCss=function(n,t){t?
this._root.classList.add(n):this._root.classList.remove(n)},f.prototype.setQueryBas
edCss=function(n)
{this.setConditionalCss("flatListWithoutGroups",t.shouldRenderFlatListWithoutGroups
(n));var i=n?
n.queryToFetch:"";this.setConditionalCss("darkBackground",t.isAndromedaCache&&!
i)},f.prototype.initPreviewPane=function(){var n=i.textScaleFactor||
1,r=t.PreviewPaneWidth/n;this._previewPane||
(this._previewPane=_ge("qfPreviewPane"));this._previewPane.style.minWidth=r+"px"},f
.prototype.initDebugWindow=function(){this._debugWindow||
(this._debugWindow=_ge("qfDebugPane"),this._debugWindow&&(this._debugWindow.style.f
lexBasis=t.DebugWindowWidth+"px"))},f.prototype.setDimensions=function(n,i)
{if(t.isMobileCache&&i&&(this._root||
(this._root=_ge("root")),this._root.style.height=i+"px"),!
this._previewPaneVisible&&!this._debugWindowVisible)
{this.onPaneWidthSet(n);this._originalPaneWidth=n}},f.prototype.ensureWebViewExpand
ed=function(){if(t.qfMode==2&&!
this._immersiveSearchHeightExpandedInThisConversation){var
n=i.height;i.setCenterScreenAcrylicBackgroundHeight(n+12);i.setWebViewHeight(n);thi
s.markWebViewExpandedState(!0)}},f.prototype.markWebViewExpandedState=function(n)
{n?(this._immersiveSearchHeightExpandedInThisConversation=!
0,this._root.classList.add("webViewExpanded")):
(this._immersiveSearchHeightExpandedInThisConversation=!
1,this._root.classList.remove("webViewExpanded"))},f.prototype.getScrollTop=functio
n(){return this._qfContainer.scrollTop},f.prototype.scrollToTop=function()
{this._qfContainer.scrollTop=0;_d.body.scrollTop=0},f.prototype.scrollTo=function(n
){var
r=_ge(n.id),i;this.scrollToElement(r,this._qfContainer,this._qfContainer.offsetHeig
ht);i=window.innerHeight;t.isMobileCache&&_d.body.scrollHeight>i&&this.scrollToElem
ent(r,_d.body,i)},f.prototype.scrollToElement=function(n,t,i){var
u=t.scrollTop,r=n.offsetTop-t.offsetTop,f=r+n.offsetHeight;f>u+i?t.scrollTop=f-
i:r<u&&(t.scrollTop=r)},f.prototype.getSuggestionsContainerHeight=function(){return
t.qfMode==2&&!this._immersiveSearchHeightExpandedInThisConversation?i.height:
(this._suggestionsContainerHeight||
this.calculateSuggestionsContainerHeight(),this._suggestionsContainerHeight)},f.pro
totype.resetSuggestionsContainerHeight=function()
{this._suggestionsContainerHeight=0},f.prototype.calculateSuggestionsContainerHeigh
t=function(){var
n=_ge("root").clientHeight,t;n<440&&(n=440);t=_ge("indexingMessage");n-
=t.offsetHeight;this._suggestionsContainerHeight=n},f.prototype.getPanelWidthFor=fu
nction(n){var i=this._originalPaneWidth;return i+=n&1?t.PreviewPaneWidth:0,i+(n&2?
t.DebugWindowWidth:0)},f.prototype.getPanelState=function(){switch(i.width-
this._originalPaneWidth){case 0:return 0;case t.PreviewPaneWidth:return 1;case
t.DebugWindowWidth:return 2;case t.PreviewPaneWidth+t.DebugWindowWidth:return
3;default:return 0}},f.prototype.openSidePanel=function(n){var
t=this.getPanelState(),u,r;if(t==0&&this.setDimensions(i.width,null),!(t&n)){u=t|
n;r=this.getPanelWidthFor(u);i.setPaneWidth(r);this.onPaneWidthSet(r)}},f.prototype
.closeSidePanel=function(n){var r=this.getPanelState(),u,t;if(r&n)
{u=r&~n;t=this.getPanelWidthFor(u);t==this._originalPaneWidth?
i.resetToDefaultSize():i.setPaneWidth(t);this.onPaneWidthSet(t)}},f.prototype.onPan
eWidthSet=function(t)
{n.safeFireEvent("CortanaPaneWidthSet",t)},f.prototype.getOpenPreviewPaneButton=fun
ction(){if(!t.previewPaneAvailable)return null;if(!
this._openPreviewPaneButtonCache){var
n=ThresholdUtilities.isRightToLeftLanguage(t.uiLanguageCache);this._openPreviewPane
ButtonCache={defaultIcon:{content:n?"&#xE76B":"&#xE76C",type:2},openedIcon:
{content:n?"&#xE72B":"&#xE72A",type:2},clickHandler:this._openPreviewPaneClickHandl
er}}return
this._openPreviewPaneButtonCache},f.prototype.setContextMenuHandler=function(n)
{this._contextMenuHandler=n},f.prototype.setSuggestionClickHandler=function(n)
{this._suggestionClickHandler=n},f.prototype.setOpenPreviewPaneClickHandler=functio
n(n)
{this._openPreviewPaneClickHandler=n},f.prototype.setExpanderClickInstrumentation=f
unction(n)
{this._expanderClickInstrumentation=n},f.prototype.updateGroupsView=function(i)
{if(t.config.th&&ClientTestHooks.isTesthookParamSet("forceRenderingCrashOnSecondCon
versation")&&this._host.getPaneCloseCount())throw new Error("Simulated
exception");this.setQueryBasedCss(i.query);var r=t.isAndromedaCache?null:" -
"+t.getWebSuggestionAnnotation(this._host);this.renderReactView("groups",n.View.Win
dowsGroups,{grou
ps:i.groups,contextMenuHandler:this._contextMenuHandler,clickHandler:this._suggesti
onClickHandler,openPreviewPaneButton:this.getOpenPreviewPaneButton(),webSuggestionA
nnotation:r})},f.prototype.updateTopResultsView=function(t)
{this.setQueryBasedCss(t.query);this.renderReactView("topResults",n.View.WindowsTop
Results,
{suggestions:t.topResults,contextMenuHandler:this._contextMenuHandler,clickHandler:
this._suggestionClickHandler,openPreviewPaneButton:this.getOpenPreviewPaneButton(),
query:t.query})},f.prototype.renderTabShellFooter=function(i,r,u)
{(this._tabShellFooterShownType!=i||this._tabShellFooterVerifyAccountShown!=!!
r)&&(this.renderReactView("tabShellFooter",n.View.TabShellFooter,
{uiLanguage:this._host.getLanguage(),type:i,verifyAccountCallback:r,verifyAccountDi
smiss:u}),t.setVisibility(this._tabShellFooterWrapper,i!
=0),this._tabShellFooterShownType=i,this._tabShellFooterVerifyAccountShown=!!
r)},f.prototype.showTemporaryMessage=function(i,r){var
f=this;this._windowsTemporaryMessageShown?
(this.hideTemporaryMessage(),sb_st(function(){return n.safeExecute(function()
{return f.showTemporaryMessage(i,r)},"showTemporaryMessage")},100)):
(this.renderReactView("temporaryMessage",n.View.WindowsMessage,{visible:!
0,icon:r,messageClassName:u,messageText:i,clickHandler:function()
{f.hideTemporaryMessage();f._host.setFocusInSearchBox("temporaryMessage")}}),this._
windowsTemporaryMessageShown=!
0,t.setVisibility(this._windowsTemporaryMessageWrapper,!
0))},f.prototype.hideTemporaryMessage=function()
{this._windowsTemporaryMessageShown&&(this.renderReactView("temporaryMessage",n.Vie
w.WindowsMessage,{visible:!1}),this._windowsTemporaryMessageShown=!
1,t.setVisibility(this._windowsTemporaryMessageWrapper,!
1))},f.prototype.showIndexingMessage=function(i,r)
{this._windowsIndexingMessageShown||
(this.renderReactView("indexingMessage",n.View.WindowsIndexingMessage,{visible:!
0,icon:
{content:"&#xE895",type:2},running:i,action:r}),this._windowsIndexingMessageShown=!
0,t.setVisibility(this._windowsIndexingMessageWrapper,!
0),this.resetSuggestionsContainerHeight())},f.prototype.hideIndexingMessage=functio
n()
{this._windowsIndexingMessageShown&&(this.renderReactView("indexingMessage",n.View.
WindowsIndexingMessage,{visible:!1}),this._windowsIndexingMessageShown=!
1,t.setVisibility(this._windowsIndexingMessageWrapper,!
1),this.resetSuggestionsContainerHeight())},f.prototype.updateDialogBox=function(t,
i,r){t?
SearchAppWrapper.CortanaApp.focusWebView&&SearchAppWrapper.CortanaApp.focusWebView(
):this._host.setFocusInSearchBox("updateDialogBox:
hidden");this.renderReactView("dialogBox",n.View.WindowsDialogBox,
{visible:t,messageText:i,buttons:r})},f.prototype.updateTopHitHeaderView=function(t
,i,r,u,f,e,o,s,h){this.renderReactView("topHitHeader",n.View.TopHitHeader,
{showModule:t,headerText:i,message:r,messageIcon:u,scopes:f,hiddenScopes:e,chevronD
ownIcon:
{content:"&#xE70D",type:2},moreClickHandler:o,showFeedback:s,advancedOptions:h})},f
.prototype.updateOptInAdvancedOptions=function(t)
{this.renderReactView("optInOutOptions",n.View.AdvancedOptions,
{advancedOptions:t,tabIndex:1})},f.prototype.updateSearchScopesL2View=function(t,i,
r,u){this.renderReactView("searchScopesL2",n.View.WindowsSearchScopesL2,
{scopes:t,cancelIcon:
{content:"&#xE70D",type:2},cancelHandler:i,advancedOptionsBottom:u,advancedOptionsT
op:r})},f.prototype.updatePreviewContainerView=function(t,i,r,u)
{this.renderReactView("previewContainer",n.View.WindowsPreviewContainer,
{suggestion:t,sections:i,suggestionClickHandler:r,itemClickHandler:u,expanderClickI
nstrumentation:this._expanderClickInstrumentation,chevronDownIcon:
{content:"&#xE70D",type:2}})},f.prototype.updateContextMenuView=function(t,i,r)
{this.renderReactView("contextMenuContainer",n.View.WindowsContextMenu,
{items:t,showIcons:i,clickHandler:r})},f.prototype.setProgressIndicatorVisibility=f
unction(n){this._progressBarVisible!=n&&(this._progressBar||
(this._progressBar=_ge("b_progress")),t.setVisibility(this._progressBar,n),this._pr
ogressBarVisible=n)},f.prototype.setPreviewPaneVisibility=function(n)
{this._previewPaneVisible!=n&&(n||
this.closeSidePanel(1),t.setVisibility(this._previewPane,n),n&&this.openSidePanel(1
),this._previewPaneVisible=n)},f.prototype.toggleDebugWindowVisibility=function()
{var n=!this._debugWindowVisible;return n||
this.closeSidePanel(2),t.setVisibility(this._debugWindow,n),n&&this.openSidePanel(2
),this._debugWindowVisible=n,n},f}(n.BasePage);t.Page=r})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t=54e5,i=function(){function i(i,r)
{var
u=this;this._host=i;this._appCacheInstrumentationHelper=r;this._isReloadSuppressed=
!1;this._pendingReload=!
1;r.registerSuperFresh();i.hasFallbackHappened()&&(this._isReloadSuppressed=!
0,this._lastReloadAfterFallback=n.getCurrentTime());i.bindAppHidden(function()
{(u._isReloadSuppressed=u._lastReloadAfterFallback&&n.getCurrentTime()-
u._lastReloadAfterFallback<t,u._isReloadSuppressed)||(!
u._pendingReload&&n.config.reloadAfterConversations&&i.getPaneCloseCount()>=n.confi
g.reloadAfterConversations&&(u._pendingReload=!
0),u._pendingReload&&(u.logReloadAttempt(),u.reload()))});sj_be(applicationCache,"u
pdateready",function(){return
u.onUpdateReady()});i.bindConversationStart(function(){u._isReloadSuppressed=!
0;u.shouldCheckForUpdate()&&n.contains([1,4,5],applicationCache.status)&&n.safeExec
ute(function(){return applicationCache.update()},"probe for manifest
update")})}return i.prototype.shouldCheckForUpdate=function(){if(!
n.isBingEnabled())return!1;return
n.config.th&&ClientTestHooks.isTesthookParamSet("disableAppCache")?!1:!
0},i.prototype.onUpdateReady=function()
{this.logReloadAttempt();this._isReloadSuppressed?this._pendingReload=!
0:this.reload()},i.prototype.reload=function(){this._host.reloadWebView(!
1)},i.prototype.logReloadAttempt=function()
{this._appCacheInstrumentationHelper.instrumentSuperFreshUpdate(this._isReloadSuppr
essed)},i}();n.SuperFreshAppCache=i}(AutoSuggest||(AutoSuggest={})),function(n){var
t;(function(t){var i,r;(function(t){function u(t,i,r,u,f,e,o,s){var c,l=function(n)
{c&&f.unregister(c);o&&o==n.number||SharedLogHelper.LogError(t,e,s||
n);u&&u(n)},h,a;try{h=i();h?(f&&h.cancel&&(c=f.register(function(){return
h.cancel()},!1,t+" cancellation")),a=function(i)
{c&&f.unregister(c);r&&n.safeExecute(function(){return r(i)},t+"
completion")},h.done?h.done(a,l):h.then(a,l)):l(new Error("No promise
returned"))}catch(v){l(v)}}function r(t,i,r,u){i.completed=!
0;i.result=r;i.pendingCallbacks.forEach(function(t){return n.safeExecute(function()
{return t(r)},u)});i.pendingCallbacks=null}function f(){i={}}function e(){var
n=[];for(var t in i)i[t].completed||n.push(t);n.forEach(function(n){return delete
i[n]})}function o(u,f,e,o,s,h,c,l){return function(a,v){var p=e(a),y=i[p],w;y||
(y={started:!1,completed:!1,result:null,pendingCallbacks:[]},i[p]=y);y.completed?
v(y.result):(y.pendingCallbacks.push(v),y.started||(y.started=!0,w=function()
{t.safeChain(u,function(){return f(a)},function(n){h&&!h(n)&&delete i[p];r(p,y,o?
o(n):n,u)},function(t){n.isCancellation(t)?r(p,y,null,u):l?(l-
=1,w()):r(p,y,s,u)},null,c)},w()))}}t.safeChain=u;var
i={};t.clearGlobalCache=f;t.clearPendingItemsFromCache=e;t.safeChainWithGlobalCachi
ng=o})(i=t.Promise||(t.Promise={})),function(n){function t(n,t,i){for(var
u,f,e={},r=0,o=n;r<o.length;r++)u=o[r],f=t[u],f&&(e[u]=i(f));return e}function i(n)
{for(var t in n)if(n[t])return!1;return!0}n.map=t;n.isEmpty=i}(r=t.Map||
(t.Map={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||(AutoSuggest={})),function(n){var
t;(function(t){var i="show",r=function(){function r(t,i,r){var
u=this;this._page=t;this._showIcons=i;this.adjustHeight=r;this._root=_ge("root");th
is._contextMenuContainer=_ge("contextMenuContainer");this._itemClickHandler=functio
n(t,i)
{i.button==0&&t.click(n.getCurrentTime(),n.getInputType(i),null)};sj_be(_d.body,"mo
useup",function(n){u._contextMenuContainer.contains(n.target)||
u.dismiss()});sj_be(_w,"blur",function(){return
u.dismiss()});sj_evt.bind("ajax.threshold.pageStart",function(){return
u.dismiss()})}return r.prototype.showContextMenu=function(r,u,f,e,o){var
s=this,l,h,c,a;if(this.dismiss(),this._onDismiss=o,this._contextMenuItems=this.getC
ontextMenuItems(r,e),this._contextMenuItems.length)
{for(t.setVisibility(this._contextMenuContainer,!
0),this._page.updateContextMenuView(this._contextMenuItems,this._showIcons,this._it
emClickHandler),l=function(n){n.getIcon&&n.getIcon(1,function(t)
{n.icon=t;s._page.updateContextMenuView(s._contextMenuItems,s._showIcons,s._itemCli
ckHandler)})},h=0,c=this._contextMenuItems;h<c.length;h+
+)a=c[h],l(a);sb_st(function(){return n.safeExecute(function()
{s.adjustPosition(u,f);s._contextMenuContainer.classList.add(i)},"renderContextMenu
")},0)}},r.prototype.getSelectableItems=function(){return this._contextMenuItems?
this._contextMenuItems.filter(function(n){return!n.isSeparator}):
[]},r.prototype.getSelectedItem=function(){return
this._selectedItem},r.prototype.select=function(n)
{this._selectedItem&&(this._selectedItem.selected=!
1);this._selectedItem=n;this._selectedItem&&(this._selectedItem.selected=!
0);this._page.updateContextMenuView(this._contextMenuItems,this._showIcons,this._it
emClickHandler)},r.prototype.onAfterKeyDown=function()
{},r.prototype.isContextMenuVisible=function(){return
this._contextMenuItems&&this._contextMenuItems.length>0},r.prototype.dismiss=functi
on()
{this._contextMenuItems&&(this._contextMenuItems=null,this._selectedItem=null,this.
_page.updateContextMenuView([],this._showIcons,this._itemClickHandler),this._contex
tMenuContainer.classList.remove(i),t.setVisibility(this._contextMenuContainer,!
1),this._root.style.minHeight="",this.adjustHeight());this._onDismiss&&(this._onDis
miss(),this._onDismiss=null)},r.prototype.getMargin=function(){return
this._margin==null&&(this._margin=parseInt(getComputedStyle(this._contextMenuContai
ner.firstElementChild).getPropertyValue("margin-left"))||
0),this._margin},r.prototype.adjustPosition=function(n,t)
{if(this._contextMenuItems){var

r=this._contextMenuContainer,i=r.parentElement,f=this.getMargin(),u=r.offsetWidth;u
>i.offsetWidth&&(u=i.offsetWidth,r.style.width=u+"px");var
e=r.offsetHeight,s=n+u>i.offsetWidth?Math.max(n-u+f,i.offsetLeft):n-
f,o=t+e>i.offsetHeight?Math.max(i.offsetHeight-e,i.offsetTop):t-
f;r.style.left=s+"px";r.style.top=o+"px";this._root.style.minHeight=o+e+"px";this.a
djustHeight()}},r.prototype.getContextMenuItems=function(i,r){var u=this;return
i.map(function(i){var
f={id:encodeURIComponent(i.verb),text:i.displayName,isSeparator:!i.verb,selected:!
1,isDefault:i.isDefault,icon:i.icon,getIcon:i.getIcon};return f.isSeparator||
(f.click=function(f,e,o){r(i.verb,f,e,o);i.executeSync?(n.safeExecute(function()
{return
i.executeSync()},"verb.executeSync",null,i.verb),u.dismiss()):t.Promise.safeChain("
verb.executeAsync",function(){return i.executeAsync()},function(){return
u.dismiss()},null,null,i.verb)}),f})},r}();t.ContextMenu=r})(t=n.WSB||(n.WSB={}))}
(AutoSuggest||(AutoSuggest={})),function(n){var t="ConnectedAccounts",i=function()
{function i(t)
{this._storage=t;this._accountsCache={};n.config.th&&ClientTestHooks.isTesthookPara
mSet("clearSSOCache")&&this.clear();this.init()}return
i.prototype.setToken=function(n,t)
{this.setTokenInfo(t,n);this.writeToLocalStorage()},i.prototype.findAccount=functio
n(n,t){var i=this._accountsCache[n];return i&&!
this.isExpired(i.LastUpdated,t,i.ExpireDateTime)?
i:null},i.prototype.clear=function()
{this._accountsCache={};this.writeToLocalStorage()},i.prototype.init=function()
{this._accountsCache={};var
i=this._storage.getItem(t);i&&(this._accountsCache=n.safeExecute(function(){return
JSON.parse(i)},"parseConnectedAccountString",
{}))},i.prototype.writeToLocalStorage=function()
{this._storage.setItem(t,JSON.stringify(this._accountsCache))},i.prototype.isExpire
d=function(t,i,r){var f,u,e,o;return i===undefined?!
1:n.config.th&&(f=ClientTestHooks.isTesthookParamSet("forceTokenRefresh"),f)?!0:
(u=n.getCurrentTime(),r&&u>r)?!0:(e=6e4,o=Math.floor((u-
t)/e),o>=i)},i.prototype.setTokenInfo=function(t,i){var
r=this._accountsCache[t],u=n.getCurrentTime();r={Token:i.Token,LastUpdated:u,Expire
DateTime:i.ExpireDateTime,TenantName:i.TenantName,RoutingHint:i.RoutingHint,UserNam
e:i.UserName};this._accountsCache[t]=r},i}();n.TokenStore=i}(AutoSuggest||
(AutoSuggest={})),function(n){var t;(function(t){var
i=SearchAppWrapper.CortanaApp,r=60,u=function(){function u(n){var
t=this;this._tokenStore=n;this._pendingCallbacks={};i.addEventListener("experiencel
aunched",function()
{i.experienceId=="NotebookOffline"&&t._tokenStore.clear()})}return
u.prototype.getAccount=function(n,i,r,u,f,e){var s=this,o,h;if(!
t.config.wamSupported)throw new Error("getAccount can be called only in RS3+");if(!
i)throw new Error("Resource or Scope has to be
set");if(o=i+r+u+e,this._pendingCallbacks[o])
{this._pendingCallbacks[o].push(f);return}this._pendingCallbacks[o]=[f];h=function(
n){var t=s._pendingCallbacks[o];s._pendingCallbacks[o]=null;t.forEach(function(t)
{return
t(n)})};this.authenticate(n,i,r,u,e,h)},u.prototype.authenticate=function(u,f,e,o,s
,h){var v=this,p=e?0:r,a=f+s,y=this._tokenStore.findAccount(a,p),c,l;o&&y?h(y):
(c=function(){return h(null)},n.isBrowserOnline()?
(l=i.authenticationManager.createAuthenticateRequest(),l.accountType=s,l.silentMode
=o,u==1?
l.resource=f:l.scope=f,t.Promise.safeChain("authenticateAsyncWAM",function(){return
i.authenticationManager.authenticateAsync(l)},function(i){var
l;if(t.config.th&&(f=="https://outlook.office.com/autosuggest"||
f=="https://substrate.office.com"||
f=="https://substrate.office.com/SubstrateSearch-Internal.ReadWrite"))if(o)
{if(ClientTestHooks.isTesthookParamSet("ssoAuthFail")){c();return}}else
if(ClientTestHooks.isTesthookParamSet("uxAuthFail")){c();return}if(!i){n.log("WAM
returned null");c();return}if(i.token){var r=void 0,e=i.properties,s=e.UPN||
i.userName;if(u==1?r=s:i.accountId&&(r=i.accountId+"@84df9e7f-e9f6-40af-b435-
aaaaaaaaaaaa"),!r||!s){n.log("WAM didn't return
UPN");c();return}l={Token:i.token,ExpireDateTime:e.exp?parseInt(e.exp)*1e3-
3e5:null,TenantName:e.tenant_display_name||"",RoutingHint:r,UserName:s};u==0&&(l.Ex
pireDateTime=n.getCurrentTime()
+36e5);v._tokenStore.setToken(l,a);h(v._tokenStore.findAccount(a))}else
i.errorCode||i.errorMessage?n.log("WAM error "+i.errorCode+":
"+i.errorMessage):n.log("WAM returned an empty token"),c()},c)):c())},u}
();t.AccessTokenManager=u})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={})),function(n){var t;(function(t){var i;(function(i){function y(t)
{t.bindAppHidden(function()
{SearchAppWrapper.CortanaApp.isBingEnabled&&n.isBrowserOnline()&&n.safeExecute(func
tion(){return ft("asgw",
["fp.msedge.net/conf/v1/asgw/fpconfig.min.json"],2e3)},"AFDFootprint.start",null,nu
ll)})}function ft(n,t,i){var o;if(n&&n.trim().length!==0&&Number(i)===i&&i%1==0&&!
(i<0)){var
r=c,h=ut,y=v(),p=e(),s="MonitorID="+n+"&rid="+p+"&w3c="+y+"&prot="+window.location.
protocol+"&v="+h+"&DATA=";if(u)a(r,s,i);else{for(o in
t)t[o]=r+t[o];f(t,0,l,r,s,i)}}}function a(n,t,i){var
o=et(u,n),s,f,r,e,h;if(o.length!==0){for(s=ot(o,n,b),f=[],r=0,e=u.r;r<e.length;r+
+)h=e[r],f.push(n+h+"?"+t);ct(s,d,i,f)}}function f(n,i,r,e,o,s){var l=r!==rt?
0:1,h=n[i],v=SearchAppWrapper.CortanaApp.createStringMap(),c=SearchAppWrapper.Corta
naApp.createStringMap();c["Content-
Type"]="application/json";t.Promise.safeChain("fetchAFDUrl",function(){return
SearchAppWrapper.CortanaApp.makeHttpRequestAsync(l,h,v,"",c)},function(c)
{c.statusCode===200&&e!=null&&o!=null&&s!
=null&&t.Promise.safeChain("readAFDResponse",function(){return
c.readAsStringAsync()},function(n){u=JSON.parse(n);a(e,o,s)},function(){+
+i<n.length&&f(n,i,r,e,o,s)},null,h)},function(){+
+i<n.length&&f(n,i,r,e,o,s)},null,h,null,"makeHttpRequestAsync failed")}function
et(n,t){var e=[],l,a,i,v,y,u,s,b;if(!n||!n.e)return e;var k=t.toLowerCase()===w?
h:o,d=n.e,f=[],c=0;for(l=0,a=d;l<a.length;l+
+)i=a[l],i.w>0&&(o<=i.m&&i.m<=p&&i.m&k||
i.m===r)&&(c+=i.w,f.push({endpoint:i.e,cumWeight:c,weight:i.w,measurementType:i.m})
);for(v=Math.min(n.n,f.length);e.length<v;)
{y=Math.floor(Math.random()*c);u=null;for(s in f)u==null?
y<f[s].cumWeight&&(u=f[s],delete f[s]):f[s].cumWeight-=u.weight;c-
=u.weight;b=u.measurementType&r?
nt:g;e.push({id:u.endpoint,testImage:b,measurementType:u.measurementType})}return
e.sort(function(n,t){return n.measurementType-t.measurementType}),e}function
ot(n,t,i){for(var f,p,d,a=[],v=0,w=n;v<w.length;v++){var
y=w[v],l=y.measurementType,b=y.testImage,u=y.id,s=t+u;u.indexOf(".")===-1?
s+=".clo.footprintdns.com":u.charAt(0)==="*"&&(f=u.substring(2),p=e(),s=t+p+"."+f,u
=f==="clo.footprintdns.com"||f==="nrb.footprintdns.com"||
f==="azr.footprintdns.com"?p:f);s+=k;var g=s+i+"?"+e(),nt=l===r?t===c?o:h:l,tt=l!
==r;a.push({url:g,requestID:u,object:i,conn:"cold",measurementType:nt,report:tt});d
=s+b+"?"+e();a.push({url:d,requestID:u,object:b,conn:"warm",measurementType:l,repor
t:!0})}return a}function st(n,t){for(var r=[],i=0;i<t.length;i++)if(t[i].report)
{var
f=n[i],u=t[i].measurementType,e=ht(f,u);r.push({RequestID:t[i].requestID,Object:t[i
].object,Conn:t[i].conn,Result:e,T:u})}return JSON.stringify(r)}function ht(n,t)
{if(n===s)return n;if(t===r&&n>0){var i=tt/(n/it);return Math.round(i)}return
Math.round(n)}function e(){function n(){return
Math.floor((1+Math.random())*65536).toString(16).substring(1)}return n()+n()+n()
+n()+n()+n()+n()+n()}function v(){return
window.performance&&window.performance.getEntriesByName?!0:!1}function ct(n,t,i,r)
{function c(i){var k,p,g,w,nt,d,b,tt;if(u!=null&&clearTimeout(u),o[i]=h!=null?(new
Date).getTime()-h:s,i=(a+y)%n.length,e=new Image,a++<n.length)h=(new
Date).getTime(),e.onload=function(){c(i)},k=function()
{e.onload=null;e.onerror=null;h=null;c(i)},u=setTimeout(function()
{k()},t),e.onerror=function(){u!
=null&&clearTimeout(u);u=null;k()},e.src=n[i].url;else if(r!=null&&r.length!==0)
{if(v())for(p=0;p<n.length;p+
+)g=n[p].url,w=window.performance.getEntriesByName(g),o[p]!
==s&&w&&w[0]&&(o[p]=w[0].duration);for(nt=st(o,n),d=[],b=0;b<r.length;b++)tt=r[b]
+nt,d.push(tt);f(d,0,l,null,null,null)}}var
h=null,u=null,o=[],a=0,e,y=0;setTimeout(function(){c(0)},i)}i.init=y;var
u,o=1,h=2,p=3,r=8,w="http://",c="https://",b="trans.gif",k="/apc/",d=5e3,g="trans.g
if",nt="100k.gif",tt=822.128,it=1e3,l="GET",rt="POST",s=-1,ut="20180228"})
(i=t.AFDFootprint||(t.AFDFootprint={}))})(t=n.WSB||(n.WSB={}))}(AutoSuggest||
(AutoSuggest={}));0