var WSB;(function(n){function y(){return s}function o(t,i,r,u,f){if(!t)return r;if(typeof t!="string")try{return n.config.winRTIconWorkaround?{content:URL.createObjectURL(t).replace(/^data:image\/jpeg,image\/jpe,image\/jpg;base64,/,"data:image/jpeg;base64,"),type:0,bgColor:u}:{content:URL.createObjectURL(t),type:0,bgColor:u}}catch(e){return SharedLogHelper.LogError("convertToHtmlImage "+i,f,e),r}else return{content:t,type:0,bgColor:u}}const s="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAR4UlEQVR4nMVbe4wd5XX/nW/m7nr9XNtpMSqpAZOShLbQ8gpgIFHU/EOSmiJASaWqqqmCUpqakMoxCKEopXbVQoiEqigyJFFaEVInMcSkokqa3YQIh9CAIAZMvH6AIfiBd+193cfMd6pzvsfM3Hv3Za/Jt5qd973f+Z1zfucxc4mZcTrHRT95cwPA6xj2fMAuY7J9gHynLBagYk1kZTsjsmMEux/A/sRk33r28ksfPV1TnHcALh58ezXD3s2w1zHsqiAge6EZeUloiwiG3xYQyK/lmJF9skzIDyVJ9gSR/eLTf3rtgfma77wBcMng8Q2AvY1h17AKbMFRQL8vwuu3OkAoAFECQPaJisUBINfmMCaHoQzG2CFD+YM/vfDPHjjVeZ8yAJcOnhATv4fB/U7DNi6iaV0jrxwL11UFd0IShe1i3+jaIk1aCgApEBbGZJOGsi//7wV/vukdB+CywfHVAP9INO4ECkI5TTMhah5toBTHg/kHSwjaLtZyPjEOAGNaCoazhNwBYjLZHjEm/8KT5980Z4s4KQAuH5zYDPBGVjHZ+7fVvwCA0z6XTF9cojD5CgDeEqjMAwUpismrxhMBwAufmKazDiPbme4nJnu+ltTXbT/3lllzhJmr8B8YnNwD8OcBJopHOZKcDFIa84QXyY8BLm2XRrzbH3Zrt6Mc4IG1alYMZoLlJF5P3kWI8ouY8fIN+//95tnKM2sLuGKwIez+MsB9ZYFt1KjXNuV+P2tzi3AObVYQZ+K0HTnAk6CxjgBVyFzdwWk8U5dIKEO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.getEdgeFallbackIcon=y;n.toIcon=o;let p={"action://Help/Launch":"Help","ms-cortana://navigate/Notebook":"Notebook"},w={"ms-cortana://navigate/Settings":n.config.settingsUri};class t{static Init(s,h){t._currentQuery=null;t._queryParamsCache={};t._locStrings=[];t._enUsLocStrings=[];t._modifierKeyState={altKey:!1,ctrlKey:!1,shiftKey:!1};t._bootstrapDoneEventHandlers=[];t._appVisibleEventHandlers=[];t._shownEventHandlers=[];t._conversationStartEventHandlers=[];t._dismissedEventHandlers=[];t._appHiddenEventHandlers=[];t._webViewReloadEventHanlders=[];t._searchAppMemoryCommitMB=0;t._searchBoxGotFocusEventHandlers=[];t._searchBoxLostFocusEventHandlers=[];t._onSubmitHandlers=[];t._onFeedbackClosingHandlers=[];t._onSearchBoxGlyphIconClick=[];t._onSearchBoxClick=[];t._onButtonRightOfSearchBoxClick=[];t._queryChangedHandlers=[];t._rawQueryChangedHandlers=[];t._keyDownHandlers=[];t._keyUpHandlers=[];t._keyEscapeHandlers=[];t._accessTokenAvailableHandlers=[];t._scopeListRequiresUpdate=[];t._accountChangedHandlers=[];t._dynamicSearchBoxUpdateHandlers=[];t._dynamicPlaceholderContentRequestedHandlers=[];t._isReloadSuppressedBgTask=!1;t._pinnedApps={};t._state=0;t._paneCloseCount=0;t._qfDismissCount=0;t._defaultWindowsTheme=0;t._defaultAppTheme=0;t._currentPaneHeight=0;t._dsbBindDimissTime=0;t._dsbBindshownTime=0;t._defaultBrowser=0;t._accessTokenManager=s;t._fuzzyRankSuggestionCount=-1;t._coldRankSuggestionCount=-1;t._notColdRankSuggestionCount=-1;t._finalColdRankSuggestionCount=-1;t._mruFilesAndFoldersDefinedCount=-1;t._mruFilesAndFoldersUndefinedCount=-1;t._navigationHelper=h;t._edgeMuids=[];t._clearStorageRequestedHandlers={};t._isCodexUser=!0;t._isDSBEnabledByClient=null;t._thirdPartyAppsCache=null;n.config.optimizeGetQueryLogic&&(t._queryCache=null);i=SearchAppWrapper.CortanaApp;e=i.queryFormulationView;u=i.launcher;r=typeof SearchBoxController=="object"?SearchBoxController:i.searchBox;f=n.Service.QueryParams;t._currentCVID=n.cleanGuid(t.createGuid());t._randomPrivacyNumber=t.getNewPrivacyNumber();t.initCortanaEnabledAndRegion();t.initLanguage();ThresholdUtilities.setBodyLangAttributes(n.uiLanguageCache);n.refreshBingEnabledCache(i.isBingEnabled,t.getRegion(),t.getLanguage());t.initLocStrings();(n.config===null||n.config===void 0?void 0:n.config.enableAgeCheckCodex)&&t.initMSAUserCodexStatus();let y=n.safeExecute(()=>+e.perfMetrics.lookup(32),"perfMetricsFallbackLookup",c);t._hasFallbackHappened=(n.config===null||n.config===void 0?void 0:n.config.wsbWebView2)?y!=l:y!=c;let a=e.searchHistory;a&&a.addEventListener("cleardevicehistoryrequested",()=>{let i=t=>n.safeExecute(()=>a.signalClearDeviceHistoryCompleted(t),"signalClearDeviceHistoryCompleted");if(t._clearStorageRequestedHandlers)for(const r in t._clearStorageRequestedHandlers)n.safeExecute(()=>(t._clearStorageRequestedHandlers[r](i),!0),"clearDeviceHistoryRequested")||i(!1);else i(!1)});i.addEventListener("statechanged",async n=>{await t.updateState(t._state,n.newState,!1)});i.addEventListener("dynamicsearchboxcontentchanged",()=>{t.setIsReloadSuppressedBgTask(!0),t.chainHandlerPromises(t._dynamicSearchBoxUpdateHandlers).then(()=>n.safeSetTimeout(()=>{n.msbPerfLogger&&n.safeExecute(()=>n.msbPerfLogger===null||n.msbPerfLogger===void 0?void 0:n.msbPerfLogger.markHostDynamicSearchboxUpdateEnd(),"msbPerfLogger.markHostDynamicSearchboxUpdateEnd"),i.notifyDynamicSearchBoxUpdateCompleted(),t.setIsReloadSuppressedBgTask(!1)},v,"notifyDynamicSearchBoxUpdateCompleted"))});i.addEventListener("dynamicplaceholdercontentrequested",()=>{t.chainHandlerPromises(t._dynamicPlaceholderContentRequestedHandlers).then(()=>n.safeExecute(()=>i.notifyDynamicSearchBoxUpdateCompleted(),"notifyDynamicSearchBoxUpdateCompleted_content"))});r.addEventListener("querytextchanged",async i=>{if(!n.config.ignoreClearQuerySignalOnDismiss||this.searchBoxHasFocus()||i.queryText!=""){let r=i.queryText;(n.isRemoveIconSelected()&&r[r.length-1]===" "&&t.reformulate(""),t._qfDisabled)||(t._feedbackFormIsVisible&&t.closeFeedbackForm(),t._queryPropertiesOverrides&&t._queryPropertiesOverrides.query!=r&&(t._queryPropertiesOverrides=null),await t.updateState(t._state,2,!0),t._queryToIgnoreOnQueryTextChangedEvent!=i.queryText&&(t._queryToIgnoreOnQueryTextChangedEvent=null),t.callQueryChangedHandlers(i,!1,t._queryToIgnoreOnQueryTextChangedEvent!=null,i.impressionId))}});r.addEventListener("keydown",u=>{let f=u.keyCode;if(n.config.debugDismissEvents){if(f==121){t.updateState(t._state,1,!1);return}if(f==122){let n=t._state==0?2:0;n==2&&(t._currentCVID=null);t.updateState(t._state,n,!1);return}}if(t._qfDisabled){if(i.hostingEnvironment==3&&f==13){let n=r.getQueryText().queryText;i.fileExplorerSuggestionPage.onSuggestionSelection(n)}return}if((n.config.wsbWebView2||f!=9)&&!n.isFunctionalKey(f)){if(f==27){t.keyDownEscapeHandler();return}let e={shiftKey:u.isShiftKeyPressed,ctrlKey:u.isControlKeyPressed,altKey:!1},o=u.isHandled;n.InstrumentationHelper.instrumentKeyDown(n.getCurrentTime());t._keyDownHandlers.forEach(t=>n.safeExecute(()=>t(f,e,o),"keyDown"))}});sj_b.addEventListener("keydown",i=>{if(!t._qfDisabled){let r=i.keyCode;if(n.config.debugDismissEvents){if(r==121){t.updateState(t._state,1,!1);return}if(r==122){let n=t._state==0?2:0;n==2&&(t._currentCVID=null);t.updateState(t._state,n,!1);return}}if(!n.isFunctionalKey(r)){r!=9||t._feedbackFormIsVisible||i.preventDefault();let f=n.RuntimeConfig.AlwaysWide,u=i.target;if(u){if(r==27){if(t._feedbackFormIsVisible){t.closeFeedbackForm();return}t.keyDownEscapeHandler();return}if(this._feedbackFormIsVisible){let n=_ge("fbpgdg");if(n&&n.contains(u))return}if(!f&&n.RuntimeConfig.PreviewPaneAvailable&&n.StaticHtmlElements.qfPreviewPane&&n.StaticHtmlElements.qfPreviewPane.contains(u)&&(!n.DialogBox||n.DialogBox.isVisible()))if(r==37)sj_pd(i);else return}n.contains([38,40],r)&&sj_pd(i);t._keyDownHandlers.forEach(t=>n.safeExecute(()=>t(i.keyCode,i,!1),"body.keyDown"))}}});r.addEventListener("keyup",i=>{if(!t._qfDisabled){let r=i.keyCode;if(r!=9&&!n.isFunctionalKey(r)){let u={shiftKey:i.isShiftKeyPressed,ctrlKey:i.isControlKeyPressed,altKey:!1},f=i.isHandled;t._keyUpHandlers.forEach(t=>n.safeExecute(()=>t(r,u,f),"keyUp"))}}});sj_b.addEventListener("keyup",i=>{if(!t._qfDisabled){let r=i.keyCode;n.isFunctionalKey(r)||t._keyUpHandlers.forEach(t=>n.safeExecute(()=>t(r,i,!1),"keyUp"))}});r.addEventListener("gotfocus",()=>{t._qfDisabled||t._searchBoxGotFocusEventHandlers.forEach(t=>n.safeExecute(()=>t(),"gotfocus"))});r.addEventListener("lostfocus",()=>{t._qfDisabled||t._searchBoxLostFocusEventHandlers.forEach(t=>n.safeExecute(()=>t(),"lostfocus"))});r.addEventListener("submitbuttonclick",()=>{if(!t._qfDisabled){let r=n.getCurrentTime(),i=t.getFeatureString("SubmitButtonGlyph").featureValue;i&&i!=""?t._onButtonRightOfSearchBoxClick.forEach(t=>n.safeExecute(()=>t(i),"submitbuttonclick.custom")):t._onSubmitHandlers.forEach(t=>n.safeExecute(()=>t(r,!0,null),"submitbuttonclick"))}});r.addEventListener("searchboxglyphclick",()=>{t._qfDisabled||t._onSearchBoxGlyphIconClick.forEach(t=>n.safeExecute(()=>t(),"searchboxglyphclick"))});r.addEventListener("searchboxtapped",()=>{t._qfDisabled||t._onSearchBoxClick.forEach(t=>n.safeExecute(()=>t(),"searchboxtapped"))});r.addEventListener("searchboxclick",()=>{t._qfDisabled||t._onSearchBoxClick.forEach(t=>n.safeExecute(()=>t(),"searchboxclick"))});sj_evt.bind("ajax.feedback.initialized",sj_dm(this,t.registerFeedbackDebugCallback),!0);n.config.enableSearchSuspensionAPI&&t.bindBootstrapDone(()=>{Log2&&Log2.SetOnInstrumentDone&&Log2.SetOnInstrumentDone(this.callSearchSuspensionAPI)});t.bindAppVisible(async()=>{t.isAppHidden=!1,t.hasSuspend=!1,await t.appVisibleInit()});t.bindShown(i=>{var u;if(n.safeFireEvent("ajax.threshold.pageStart",i),t.shownInit(),!t._qfDisabled){let r=t.getNewConversationId();n.updateErrorHandlingCVID(r);t._currentCVID!=r&&(t._currentCVID=r,t._randomPrivacyNumber=t.getNewPrivacyNumber(),t._conversationStartEventHandlers.forEach(t=>n.safeExecute(()=>t(),"conversationStart")),n.config.testFlight!=undefined&&((u=this._accessTokenManager.getSelectedAccountInfo())===null||u===void 0?void 0:u.accountProviderAuthority)=="consumers"&&n.InstrumentationHelper.logFlightState("testFlight",n.config.testFlight==1));t._lastKeyWasEnter=!1}});n.config.dsbEnumAccount&&t.bindDynamicSearchBoxUpdate(()=>{const n=t._qfDismissCount;return t.ensureAuthority(n,(t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::Host.bindDynamicSearchBoxUpdate"]:undefined),Promise.resolve()});t.bindDismissed(()=>{t._qfDismissCount+=1,n.safeFireEvent("threshold.pageUnload"),t.dismissCleanup()});t.bindAppHidden(()=>{t.isAppHidden=!0,t._paneCloseCount+=1,t.appHiddenCleanup(),t.uploadClientErrorLog()});t.bindKeyDown((i,r)=>{t._modifierKeyState=r;let u=i==13;if(u&&!t._lastKeyWasEnter&&!(n.isMsbWorkShortcutsAvailable===null||n.isMsbWorkShortcutsAvailable===void 0?void 0:n.isMsbWorkShortcutsAvailable(i,r))){let i=n.getCurrentTime();t._onSubmitHandlers.forEach(t=>n.safeExecute(()=>t(i,!1,r),"onSubmit handlers"))}t._lastKeyWasEnter=u});t.bindKeyUp(n=>{t._lastKeyWasEnter=!1;switch(n){case 16:t._modifierKeyState.shiftKey=!1;break;case 17:t._modifierKeyState.ctrlKey=!1}});t.bindOnFeedbackClosing(n=>{n&&t.setFocusInSearchBox(null,"onFeedbackClosing")});(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.refreshWhenTokenArrives)&&t.bindAccessTokenAvailable(i=>{const u=i==1?n=>n.dataSource=="SSEE"||n.dataSource=="SSUE":n=>n.dataSource=="SSEC"||n.dataSource=="SSUC";t._currentQuery&&(t._currentQuery.queryToFetch.length>=n.config.minLengthFor3SonL1||n.isL2(t._currentQuery))&&t._currentQuery.originalQuery==r.getQueryText().queryText&&n.ScopeConfig[t._currentQuery.scope].enabledDataSources.some(u)&&t.refreshCurrentPane()});_G.PN="QF";t._edgeIconCache=n.Async.safeChainWithGlobalCaching("edgeIcon",t=>e.deviceSearch.findAppsAsync(n.EdgeAppIds).then(i=>{let r=n.EdgeAppIds.map(n=>i[n]).filter(n=>!!n)[0];return r.getImageAsync(n.getImageSizeValue(t)).then(n=>o(n,"edgeIcon",null,r.isImmersive?r.logoBackgroundColor:null))}),n=>n+"_edgeIcon");sj_evt.bind("onFeedbackStarting",([,n]=[undefined,undefined])=>{t._feedbackFormIsVisible=!0,t._feedbackFormIsOpenedByClient=n,t.adjustHeight()});sj_evt.bind("onFeedbackClosing",()=>{t._feedbackFormIsVisible=!1,t.adjustHeight(),t._onFeedbackClosingHandlers.forEach(i=>n.safeExecute(()=>i(t._feedbackFormIsOpenedByClient),"onFeedbackClosing handlers"))});t.initCloudSearch();t.initSettings();n.config.enableWindowsFlightsCache&&t.initWindowsFlights();t._accessTokenManager&&(t._accessTokenManager.bindAccessTokenAvailable((n,i,r)=>{t._accessTokenAvailableHandlers.forEach(t=>t(n)),r===3&&t.refreshCurrentPane()}),t._accessTokenManager.bindAccountTypesChanged(()=>t.updateScopeList()),t._isAuthInvestigation=(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.authLog)||n.config.enableAuthInvestigation,t.ensureAuthority(t._qfDismissCount,(t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::Init"]:undefined));(n.osSKUCache==undefined||n.osSKUCache==0)&&ThresholdUtilities.getOsSKU(t=>{switch(t){case"4":n.osSKUCache=4;break;case"48":n.osSKUCache=48;break;case"101":n.osSKUCache=101;break;case"27":n.osSKUCache=27;break;default:n.osSKUCache=0}})}static isSearchSuspensionAPIEnabled(){var t;return((t=n.config.enableSearchSuspensionAPI)!==null&&t!==void 0?t:!1)&&(n.VelocityKeys===null||n.VelocityKeys===void 0?void 0:n.VelocityKeys.isFeatureEnabled(45687739))}static callSearchSuspensionAPI(){if(t.isSearchSuspensionAPIEnabled()&&t.isAppHidden&&!t.hasSuspend)try{t.hasSuspend=!0;var n=SearchAppWrapper.CortanaApp.enableSearchSuspension()}catch(i){}}static refreshDefaultBrowserInfoAsync(){if(t._defaultBrowser=0,i.getDefaultBrowserInfo){let r=n.safeExecute(()=>i.getDefaultBrowserInfo(),"getDefaultBrowserInfo");r&&(t._defaultBrowser=t.calculateBrowserType(r.path),t._defaultBrowserIconCache=e.deviceSearch.getIconForDefaultBrowserAsync&&t.getUriLaunchPolicy()==0&&t._defaultBrowser!=3?n.Async.safeChainWithGlobalCaching("defaultBrowserIcon",t=>e.deviceSearch.getIconForDefaultBrowserAsync(n.getImageSizeValue(t),0).then(n=>n?o(n,"defaultBrowserIcon"):{type:0,content:s}),n=>n+"_"+r.progId):null)}i.setDefaultUriLaunchPolicy&&i.setDefaultUriLaunchPolicy(t.getUriLaunchPolicy())}static async chainHandlerPromises(n,t){for(const i of n)try{await i()}catch(r){SharedLogHelper.LogError("chainHandlerPromises",t,r)}}static getIsReloadSuppressedBgTask(){return t._isReloadSuppressedBgTask}static setIsReloadSuppressedBgTask(n){t._isReloadSuppressedBgTask=n}static getDefaultBrowser(){return t._defaultBrowser}static getSearchAppMemoryCommitMB(){return t._searchAppMemoryCommitMB}static setSearchAppMemoryCommitMB(n){t._searchAppMemoryCommitMB=n}static getFRSuggCount(){return t._fuzzyRankSuggestionCount}static setFRSuggCount(n=0){t._fuzzyRankSuggestionCount=n}static getCRCount(){return t._coldRankSuggestionCount}static setCRCount(n=0){t._coldRankSuggestionCount=n}static incrementCRCount(){t._coldRankSuggestionCount<0?t._coldRankSuggestionCount=1:t._coldRankSuggestionCount++}static getNCRCount(){return t._notColdRankSuggestionCount}static setNCRCount(n=0){t._notColdRankSuggestionCount=n}static incrementNCRCount(){t._notColdRankSuggestionCount<0?t._notColdRankSuggestionCount=1:t._notColdRankSuggestionCount++}static getFCRCount(){return t._finalColdRankSuggestionCount}static setFCRCount(n=0){t._finalColdRankSuggestionCount=n}static setBindDimissTime(n){t._dsbBindDimissTime=n}static getBindDimissTime(){return t._dsbBindDimissTime}static setBindShownTime(n){t._dsbBindshownTime=n}static getBindShownTime(){return t._dsbBindshownTime}static setIsCodexUser(n){t._isCodexUser=n}static getIsCodexUser(){return t._isCodexUser}static getThirdPartyAppsCache(){return t._thirdPartyAppsCache}static setThirdPartyAppsCache(n){t._thirdPartyAppsCache=n}static prefetchAllWebSearchExtensions(){var r,u;if(n.config.useCobaltCSS){let n=(r=i.webSearchExtensionManager)===null||r===void 0?void 0:r.findAll();return t.setThirdPartyAppsCache(n),Promise.resolve()}else{let n=(u=i.webSearchExtensionManager)===null||u===void 0?void 0:u.findAllAsync();return n.then(n=>{t.setThirdPartyAppsCache(n)})}}static isThirdPartySearchAppsEnabled(){if(!n.isThirdPartySearchAllowed())return!1;let i=t.getThirdPartySearchApps();return!!(i&&i.length)}static getThirdPartySearchApps(){let i=t.getThirdPartyAppsCache();if(!n.isThirdPartySearchAllowed()||!i)return[];let r=[];i.thirdPartyMRUExtension&&r.push(i.thirdPartyMRUExtension);let u=i.otherExtensions;return u&&u.length>0&&u.forEach(n=>r.push(n)),r}static getThirdPartySearchAppByName(n){let r=t.getThirdPartySearchApps();const i=n=>HitHighlightingParser.removeDiacritics(n.toLocaleLowerCase().trim());return r.find(t=>i(t.displayName)===i(n))}static getThirdPartyDataProviderById(i){let r=t.getThirdPartySearchApps();return new n.ThirdPartyDataProvider(r.find(n=>n.applicationUserModelId===i))}static getThirdPartyMRUSearhApp(){let i=t.getThirdPartyAppsCache();return n.isThirdPartyMRUEnabledByRegionalPolicy()?i===null||i===void 0?void 0:i.thirdPartyMRUExtension:undefined}static setMRUSearchApp(i){var u;if(n.isThirdPartySearchAllowed()){let r=t.getThirdPartyAppsCache();if(i)i.applicationUserModelId==((u=r===null||r===void 0?void 0:r.thirdPartyMRUExtension)===null||u===void 0?void 0:u.applicationUserModelId)||(SearchAppWrapper.CortanaApp.webSearchExtensionManager.mruExtensionApplicationUserModelId=i.applicationUserModelId);else{if(r.thirdPartyMRUExtension==null)return;SearchAppWrapper.CortanaApp.webSearchExtensionManager.mruExtensionApplicationUserModelId=null}}}static isFirstPartySearchDisabled(){let n=t.getThirdPartyAppsCache();return n&&!n.firstPartyExtension?!0:!1}static isAccountNotConsented(t){return!!(n.config.supportDMA&&(n.VelocityKeys===null||n.VelocityKeys===void 0?void 0:n.VelocityKeys.isFeatureEnabled(40979072))&&t.consentState&&t.consentState.isConsentRequired&&!t.consentState.hasUserConsented)}static canShowNotificationBanner(){let n=t.getThirdPartyAppsCache();return(n===null||n===void 0?void 0:n.notificationBehavior)==1}static setBannerInteraction(){let n=t.getThirdPartyAppsCache();n&&(n.notificationBehavior=2)}static getMRUFilesAndFoldersDefinedCount(){return t._mruFilesAndFoldersDefinedCount}static setMRUFilesAndFoldersDefinedCount(n=0){t._mruFilesAndFoldersDefinedCount=n}static getMRUFilesAndFoldersUndefinedCount(){return t._mruFilesAndFoldersUndefinedCount}static setMRUFilesAndFoldersUndefinedCount(n=0){t._mruFilesAndFoldersUndefinedCount=n}static initEdgeMuids(){if(n.config.enableEdgeMuidsTelemetry&&SearchAppWrapper.CortanaApp.edgeMuids){let i,t=[],r=Object.keys(SearchAppWrapper.CortanaApp.edgeMuids);for(let u in r){let e=r[u],f=SearchAppWrapper.CortanaApp.edgeMuids[e];e=="Default"?i||(i=f,n.config.enableEdgeMuidsTelemetryWrite?this.setEdgeMuidDefault(f):this.setEdgeMuidDefault("D")):t.indexOf(f)==-1&&t.push(f)}if(!n.config.enableEdgeMuidsTelemetryWrite)for(let n in t)t[n]="M";t.length>0&&this.setEdgeMuidsAdditional(t)}}static getEdgeMuidCount(){var n;let i=t._edgeMuidDefault?1:0,r=(n=t._edgeMuids)===null||n===void 0?void 0:n.length;return i+r}static getEdgeMuidsAdditional(n){let i=t._edgeMuids,r=t._edgeMuidDefault;return r&&(i=i.filter(n=>n!=r)),n&&n"#"+n.substr(3)),t._accentColorShades.light=t._accentColorShades.light.map(n=>"#"+n.substr(3)))}static calculateBrowserType(n){return n?n.endsWith("\\chrome.exe")?6:n.endsWith("LaunchWinApp.exe")?3:n.endsWith("firefox.exe")?5:n.endsWith("\\msedge.exe")?4:n.endsWith("Opera\\Launcher.exe")?7:n.endsWith("\\iexplore.exe")?2:n.endsWith("\\brave.exe")?8:0:0}static getUriLaunchPolicy(){return 2}static getConnectedAccountInfo(n){return t._accessTokenManager?t._accessTokenManager.getCachedAccountInfo(n):null}static isInternetConnectionMetered(){return n.safeExecute(()=>i.networkEnvironment&&i.networkEnvironment.isMeteredConnection,"isInternetConnectionMetered",!1)}static isInputPanelVisible(){return n.safeExecute(()=>r.isInputPaneVisible,"isInputPanelVisible")}static uploadClientErrorLog(){if(i.getFlightingLogsAndDelete){let t=n.safeExecute(()=>i.getFlightingLogsAndDelete(),"getFlightingLogsAndDelete","");for(let n of t.split("\r\n"))if(n!=""){let t=n.indexOf("|");if(t<0||t+1==n.length)SharedLogHelper.LogWarning("clientError",n,"Malformed clientError data");else{let i=n.substr(t+1);i.startsWith("Critical:")||i.startsWith("Error:")?SharedLogHelper.LogError("clientError",null,i):SharedLogHelper.LogWarning("clientError",null,i)}}}}static registerFeedbackDebugCallback(n){let i=n[1].debugCollector;i.registerCollectionCallback(sj_dm(this,t.collectDebugInfo))}static collectDebugInfo(){let r={},u=t._currentQuery&&t._currentQuery.originalQuery;u&&(r.query=u);r.conversationId=t._currentCVID;r.entryPoint=i.entryPoint;r.previousExperience=e.previousExperience;n.ConstraintIndex&&(r.ciVersion=n.ConstraintIndex.currentCIVersion);n.config.snrVersion&&(r.snrVersion=n.config.snrVersion);n.osSKUCache!==undefined&&(r.ossku=n.osSKUCache.toString());let f=i.width;f&&(r.width=f.toString());let o=i.height;return o&&(r.height=o.toString()),r}static clearInitialFetchTimer(){t._initialFetchTimer&&(sb_ct(t._initialFetchTimer),t._initialFetchTimer=null)}static callQueryChangedHandlers(r,u,f,e,o){if(t._qfDisabled)throw"Not supported";let s=t.getStructuredQuery(r,null,t._currentQuery);if(t._rawQueryChangedHandlers.forEach(t=>n.safeExecute(()=>t(s,u),"rawQueryTextChanged")),f||t.clearInitialFetchTimer(),!e){let n=i.impressionId;t.usedImpressionIds[n]||(e=n,t.usedImpressionIds[n]=!0)}let h=o&&!s.originalQuery;(h||!e||e==t._currentRawImpressionId?(t._currentRawImpressionId=t.createGuid(),t._currentRawImpressionIdCreatedByTheClient=!1):(t._currentRawImpressionId=e,t._currentRawImpressionIdCreatedByTheClient=!0),f)||(t._previousQuery=t._currentQuery,t._currentQuery=s,t._queryChangedHandlers.forEach(t=>n.safeExecute(()=>t(s,u),"queryTextChanged")))}static getStructuredQuery(r,u,f){var s;const e=r.queryText,h=r.cursorPosition;if(u&&u.originalQuery===e&&u.originalCursorPosition===h)return u;let c=t._queryPropertiesOverrides&&t._queryPropertiesOverrides.query==e,o=c&&n.isCortanaEnabledCache?(s=t._queryPropertiesOverrides)===null||s===void 0?void 0:s.taskFrame:null;if(!o&&n.isCortanaEnabledCache&&i.searchResultsView.getTaskFrame){let t=n.safeExecute(()=>i.searchResultsView.getTaskFrame(e),"getTaskFrame");t&&(o=n.parseTaskFrame(t))}return!o&&f&&f.taskFrame&&f.originalQuery==e&&(o=f.taskFrame),n.parseQuery(e,h,f,o,c&&t._queryPropertiesOverrides)}static async updateState(u,f,e){if(u!=f){if(t._state=f,u==0){let i=n.getCurrentTime();await t.chainHandlerPromises(t._appVisibleEventHandlers,"appVisible");n.InstrumentationHelper.instrumentAppVisibleFinish(i)}if(f==2){const u=n.getCurrentTime();if(t._shownEventHandlers.forEach(t=>n.safeExecute(()=>t(u),"shown")),n.InstrumentationHelper.instrumentAppShownFinish(u),!e&&!t._qfDisabled){const u=i.entryPoint=="WNSSTB";t._initialFetchTimer=n.safeSetTimeout(()=>t.callQueryChangedHandlers(r.getQueryText(),!1,!1,null,!0),u?n.config.initialFetchTimerDelayFromStartMenu||0:0,"initialFetch")}}if(u==2){t.clearInitialFetchTimer();const i=t._currentQuery;t._dismissedEventHandlers.forEach(t=>n.safeExecute(()=>t(i),"dismissed"))}f==0&&(t._appHiddenEventHandlers.forEach(t=>n.safeExecute(()=>t(),"appHidden")),t.setThirdPartyAppsCache(null))}}static searchBoxHasFocus(){return r.hasFocus}static async initializeEvents(){await t.updateState(t._state,i.currentState,!1)}static bindClearMRURequested(n,i){t._clearStorageRequestedHandlers[i]&&SharedLogHelper.LogError("bindClearMRURequested",null,new Error("Only one event handler supported"));t._clearStorageRequestedHandlers[i]=n}static shouldRequestEltoken(){return t._shouldRequestEltoken}static getElToken(){return t._elToken}static setElToken(n){t._elToken=n;t._shouldRequestEltoken=!1}static sendElToken(){t._sendElTokenInSuggstionRequest=!0}static canHaveSearchHistory(){return n.searchHistoryAllowed()}static getInstrumentationParameters(n){let r=i.createStringMap?i.createStringMap():{};return _G.nclid&&(r[f.HashedMuid]=_G.nclid),r[f.FormCode]=n||t.getFormCode(),r[f.ConversationId]=t.getConversationId(),r}static appHiddenCleanup(){n.Async.clearGlobalCache();t._locStrings=[];n.cleanScopePrefixes();t.cleanTaskBarPinnedItems();n.clearPathExpansionCache();n.config.perfInstV2&&n.InstrumentationHelper.instrumentConversationTimelineFinish();n.config&&n.config.appHiddenForceFlush&&Log2&&Log2.ForceFlush()}static initCloudSearch(){let t=i.isCloudSearchEnabled!==!1,r=i.isMultiAccountCloudSearchSupported!==!1;n.isCloudSearchEnabledMsaCache=n.RuntimeConfig.QfMode==5||(r?i.isCloudSearchEnabledForMSA:t);n.isCloudSearchEnabledAadCache=n.RuntimeConfig.QfMode==5||(r?i.isCloudSearchEnabledForAAD:t)}static initLanguage(){n.uiLanguageCache=(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.setLang)||i.systemLanguage||i.uiLanguage||"";t._queryParamsCache[f.SetLang]=n.uiLanguageCache}static initSettings(){n.hideFileExtensionsCache=i.hideFileExtensions}static initWindowsFlights(){ThresholdUtilities.getCortanaHeaders(n=>{n&&(t._windowsFlights=n["X-BM-WindowsFlights"])})}static initLocStrings(){let i=t._enUsLocStrings.length==0;n.config.smallerBundle&&i&&SharedLogHelper.LogWarning("BundleReduceTelemetry","",new Error("Smaller bundle used."));for(let r of n.config.locStrings){let u={uiCulture:"en-US",name:r,namespace:"WindowsSearchBox"};if(i&&t._enUsLocStrings.push(LocStringManager.getLocString(u)),n.uiLanguageCache.toLowerCase()!="en-us"){u.uiCulture=n.uiLanguageCache;let r=n.safeExecute(()=>LocStringManager.getLocString(u),"getLocString",null,u.uiCulture);if(r)t._locStrings.push(r);else if(n.config.smallerBundle&&!n.isBrowserOnline())setTimeout(()=>n.fallbackToPrepopulatedBundle(new Error("Language switched and force fallback.")),5e3);else if(n.config.smallerBundle&&i){SharedLogHelper.LogWarning("BundleReduceTelemetry","",new Error("Display language switched."));navigator.serviceWorker.ready.then(n=>{n.active.postMessage({message:"ls"})});return}}}}static async appVisibleInit(){t.initCortanaEnabledAndRegion();var r=n.uiLanguageCache;t.initLanguage();n.isThirdPartySearchAllowed()&&await t.prefetchAllWebSearchExtensions();n.config.noLocStringRefresh&&r!=n.uiLanguageCache?t.initLocStrings():n.config.noLocStringRefresh||t.initLocStrings();n.refreshBingEnabledCache(i.isBingEnabled,t.getRegion(),t.getLanguage());n.RuntimeConfig.OnAppVisible();t._isFileExplorerOrControlPanel=n.RuntimeConfig.QfMode==5||n.RuntimeConfig.QfMode==9;n.setZeroInputDataSourcesForL1();t.initCloudSearch();t.initSettings();t.checkIfBitmapInClipboardSupported();t.updateScopeList();n.StaticHtmlElements.suggestionsList.setAttribute("aria-label",t.getLocString("ResultsList"));t._elToken=null;i.theme&&(t._defaultWindowsTheme=t._isFileExplorerOrControlPanel&&i.fileExplorerSuggestionPage?i.fileExplorerSuggestionPage.useDarkTheme?2:1:i.theme.startsWith("000000")?2:1,t._accentColor="#"+i.theme.substr(7),i.appsUseLightTheme!==null&&(t._defaultAppTheme=i.appsUseLightTheme?1:2));t.refreshAccentColorShades();t.refreshDefaultBrowserInfoAsync();t.initEdgeMuids();ThresholdUtilities.getCortanaHeaders(i=>{t._ageAccountType=0,i&&(i["X-UserAgeClass"]==="Child"?t._ageAccountType=1:i["X-UserAgeClass"]==="Adult"&&(t._ageAccountType=2),n.config.enableWindowsFlightsCache&&!t._windowsFlights&&(t._windowsFlights=i["X-BM-WindowsFlights"]))})}static shownInit(){let u=t._qfDismissCount;if(t._queryPropertiesOverrides=null,n.RuntimeConfig.QfMode==999999||n.config.enableSnipSearchV2&&i.entryPoint=="WNSSBS"){t._qfDisabled=!0;return}if(n.RuntimeConfig.QfMode==5){let r=n.safeExecute(()=>i.fileExplorerSuggestionPage.currentLocation,"fileExplorerSuggestionPage.currentLocation");t._fileExplorerCurrentPath=r&&!r.startsWith("::")?r:null}t.initCortanaEnabledAndRegion();let e=i.isBingEnabled;e!=n.isBingEnabled()&&(n.refreshBingEnabledCache(e,t.getRegion(),t.getLanguage()),t.updateScopeList());let r=i.homeGeographicRegion;t._queryParamsCache[f.CountryCode]=n.regionCache;r&&r!=n.regionCache&&(t._queryParamsCache[f.HomeGeographicRegion]=r);t.ensureAuthority(u,(t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::shownInit"]:undefined);t.initHeadersOverrides(u,(t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::shownInit"]:undefined);t.keepWSBOpen(n.config.keepCortanaOpened||n.getTweakedSetting("keepCortanaOpenedTweak"))}static ensureAuthority(i,r){r=r&&[...r,"WSBHost::ensureAuthority"];n.logAuthRelatedInfo("ensureAuthority",`Triggered by ${r===null||r===void 0?void 0:r.join(" -> ")}.`);t._accessTokenManager&&t._accessTokenManager.enumerateMultiAccountAuthority(()=>t.initHeadersOverrides(i,r),r)}static initCortanaEnabledAndRegion(){n.isCortanaEnabledCache=i.isCortanaEnabled;n.regionCache=(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.cc)||(n.config.ignoreCortanaMarketOverride?i.homeGeographicRegion:i.region)||"";n.revIpRegionCache=typeof _G=="object"&&_G.RevIpCC&&_G.RevIpCC.toUpperCase()||""}static initMSAUserCodexStatus(){if(n.LightweightStorage){const i=t._accessTokenManager.getSelectedAccountId();if(i){const u=`CodexStatus${i}`,r=n.LightweightStorage.getItem(u);if(r){const n=JSON.parse(r);t.setIsCodexUser(!!n)}}}}static updateScopeList(n){n&&i.currentState!==2||t._scopeListRequiresUpdate.forEach(n=>n())}static dismissCleanup(){t.keepWSBOpen(!1);delete t._queryParamsCache[f.HomeGeographicRegion];t._queryToIgnoreOnQueryTextChangedEvent=null;t._currentQuery=null;t._queryPropertiesOverrides=null;t._fileExplorerCurrentPath=null;t._isDSBEnabledByClient=null;n.regionCache=null;t.closeFeedbackForm();t.removeFeedbackForm();t._qfDisabled=!1}static showFeedbackForm(){if(typeof WindowsFeedbackForm!="undefined"&&WindowsFeedbackForm.Show){const t=n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.hideFbig,i=n.AccessTokenManager.getWindowsAccountType()===1&&!(n.msbHost===null||n.msbHost===void 0?void 0:n.msbHost.isMsbInternalTenant())||(n.TestHookUrlParameters===null||n.TestHookUrlParameters===void 0?void 0:n.TestHookUrlParameters.noFbScr);WindowsFeedbackForm.Show("",undefined,t,i)}}static closeFeedbackForm(){n.safeFireEvent("WindowsFeedback.Form.Hide")}static removeFeedbackForm(){typeof WindowsFeedbackForm!="undefined"&&WindowsFeedbackForm.Remove&&WindowsFeedbackForm.Remove()}static checkIfBitmapInClipboardSupported(){if(i.getClipboardAvailableFormats)try{let n=i.getClipboardAvailableFormats();t._isBitmapInClipboardSupported=n!=null}catch(n){t._isBitmapInClipboardSupported=!1}else t._isBitmapInClipboardSupported=!1}static isBitmapInClipboardSupported(){return t._isBitmapInClipboardSupported}static async getBitmapURIFromClipboardAsync(){let t=n.safeExecute(()=>i.getClipboardAvailableFormats(),"getClipboardAvailableFormats",[]);if(!n.contains(t,"Bitmap"))return null;try{const t=await n.Async.safePromise("getClipboardBitmapAsync",()=>i.getClipboardBitmapAsync());return URL.createObjectURL(t)}catch(r){return null}}static setAuthHeadersFromWindowsTokens(i){if(i=i&&[...i,"WSBHost::setAuthHeadersFromWindowsTokens"],t._accessTokenManager){let u=t._headersCache;var r=n.AccessTokenManager.getWindowsAccountType();if(n.config.userProfileButtonEnabled){let n=t._accessTokenManager.getSelectedAccountInfo(i);if(n){let r=n.accountProviderAuthority=="consumers"?0:1;t._accessTokenManager.getAccountByUserName(!1,r,n.accountUserName,!1,!0,n=>{n&&n.Token&&(r==0?(u["X-Search-RPSToken"]=n.Token,delete u.Authorization):(u.Authorization="Bearer "+n.Token,delete u["X-Search-RPSToken"]))},i)}}else r==2||r==4?t._accessTokenManager.getAccount(0,n.getBingResourceOrScope(0),!1,!0,n=>{n&&n.Token&&(u["X-Search-RPSToken"]=n.Token)},undefined,i):r==1&&t._accessTokenManager.getAccount(1,n.getBingResourceOrScope(1),!1,!0,n=>{n&&n.Token&&(u.Authorization="Bearer "+n.Token)},undefined,i)}}static initHeadersOverrides(r,u){u=u&&[...u,"WSBHost::initHeadersOverrides"];let f=[];t._headersCache={};i.systemRAMInMB&&i.systemRAMInMB<=512&&f.push("LowMemoryDevice");f.push("FontV22");f.push("LightAnswers");n.RuntimeConfig.PreviewPaneAvailable&&f.push("PreviewPaneAvailable");f.length>0&&(t._headersCache["X-BM-ClientFeatures"]=f.join());t.setAuthHeadersFromWindowsTokens(u);ThresholdUtilities.getCortanaHeaders(i=>{if(i&&r==t._qfDismissCount){t._shouldRequestEltoken=!!i["X-Search-Location"];let r=i["X-BM-ClientFeatures"];r&&(Array.prototype.push.apply(f,r.split(",")),t._headersCache["X-BM-ClientFeatures"]=f.join());t._safeSearchSetting=i["X-Search-SafeSearch"];t._isEducationEnvironment=i["X-Device-EnableRegulatoryPsm"]=="1";t._isWindowsS=i["X-Device-EnableCPsm"]=="1";t._partnerSearchCode=i["X-Device-PSC"];n.substrateProvidersEnabled()||t.updateScopeList()}})}static createGuid(){return n.safeExecute(()=>i.createGuid(),"createGuid","")}static getLocString(i,...r){let u;for(let n of t._locStrings)if(u=n[i],u)break;return u||(u=t.getEnUsLocString(i)),u&&r.length>0&&(u=n.formatString(u,r)),u===null||u===void 0?void 0:u.replace("_"," ")}static getEnUsLocString(n){for(let i of t._enUsLocStrings){let t=i[n];if(t)return t}return undefined}static getRawImpressionGuid(){return t._currentRawImpressionId}static getConversationId(){return t._currentCVID}static getPrivacyNumber(){return t._randomPrivacyNumber}static getNewConversationId(){let i=n.cleanGuid(n.safeExecute(()=>e.perfMetrics.conversationId,"conversationId"));return i||(SharedLogHelper.LogWarning("getNewConversationId",null,new Error("Client returned null conversation ID")),i=n.cleanGuid(t.createGuid())),i}static getNewPrivacyNumber(){return Math.floor(Math.random()*Number.MAX_VALUE)}static keyDownEscapeHandler(){let i={handled:!1};t._keyEscapeHandlers.forEach(t=>n.safeExecute(()=>t(i),"escapeKey"));i.handled||n.safeExecute(()=>SearchAppWrapper.CortanaApp.dismissApp(),"dismissApp");return}static bindQueryChangedOrInitialized(n,i,r){r?i?t._rawQueryChangedHandlers.unshift(n):t._queryChangedHandlers.unshift(n):i?t._rawQueryChangedHandlers.push(n):t._queryChangedHandlers.push(n)}static bindOnSubmit(n){t._onSubmitHandlers.push(n)}static bindOnFeedbackClosing(n){t._onFeedbackClosingHandlers.push(n)}static bindSearchBoxGlyphIconClick(n){t._onSearchBoxGlyphIconClick.push(n)}static bindSearchBoxClick(n){t._onSearchBoxClick.push(n)}static bindButtonRightOfSearchBoxClick(n){t._onButtonRightOfSearchBoxClick.push(n)}static bindSearchBoxGotFocus(n){t._searchBoxGotFocusEventHandlers.push(n)}static bindSearchBoxLostFocus(n){t._searchBoxLostFocusEventHandlers.push(n)}static getModifierKeyState(){return t._modifierKeyState}static notifyBootstrapDone(){t._bootstrapDoneEventHandlers.forEach(n=>n())}static bindBootstrapDone(n){t._bootstrapDoneEventHandlers.push(n)}static bindAppVisible(n){t._appVisibleEventHandlers.push(n)}static bindShown(n){t._shownEventHandlers.push(n)}static unbindShown(n){const i=t._shownEventHandlers.indexOf(n);i>-1&&t._shownEventHandlers.splice(i,1)}static bindConversationStart(n){t._conversationStartEventHandlers.push(n)}static bindDismissed(n){t._dismissedEventHandlers.push(n)}static bindAppHidden(n){t._appHiddenEventHandlers.push(n)}static bindBeforeWebViewReload(n){t._webViewReloadEventHanlders.push(n)}static bindKeyEscape(n){t._keyEscapeHandlers.push(n)}static bindKeyDown(n){t._keyDownHandlers.push(n)}static bindKeyUp(n){t._keyUpHandlers.push(n)}static bindAccessTokenAvailable(n){t._accessTokenAvailableHandlers.push(n)}static bindScopeListRequiresUpdate(n){t._scopeListRequiresUpdate.push(n)}static bindAccountChanged(n){t._accountChangedHandlers.push(n)}static bindDynamicSearchBoxUpdate(n){t._dynamicSearchBoxUpdateHandlers.push(n)}static bindDynamicPlaceholderContentRequested(n){t._dynamicPlaceholderContentRequestedHandlers.push(n)}static getQuery(i){return n.config.optimizeGetQueryLogic?((i||!t._queryCache)&&(t._queryCache=t.getStructuredQuery(r.getQueryText(),t._currentQuery,t._previousQuery)),t._queryCache):t.getStructuredQuery(r.getQueryText(),t._currentQuery,t._previousQuery)}static refreshCurrentPane(n){if(!n||i.currentState===2){let r=t._currentQuery?t._currentQuery.originalQuery:"";t.setQuery(r,!1,!0)}}static clearWorkQuery(){let i=`${this.getLocString("Work")}:`.toLowerCase(),r=`${this.getLocString("School")}:`.toLowerCase(),n=t.getQuery().originalQuery.toLowerCase();n.includes(i)?n=n.replace(i,""):n.includes(r)&&(n=n.replace(r,""));t.setQuery(n,!1,!0)}static keepWSBOpen(n){let t=i.hostingEnvironment==3;!t&&i.changeExplicitDismissMode&&i.changeExplicitDismissMode(n)}static notifyAccountSelected(n){t.setAuthHeadersFromWindowsTokens((t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::notifyAccountSelected"]:undefined);t._accountChangedHandlers.forEach(t=>t(n))}static updateQueryWithoutRefetching(i){n.isNullOrUndefined(i)&&(i=t._currentQuery?t._currentQuery.originalQuery:"");t.setQuery(i,!1,!1)}static reformulate(n,i,r,u){let f={query:n,taskFrame:i,topHitRestriction:r,forceGroupOnTop:u};t.setQuery(n||"",!0,!1,f)}static reformulateOnSuggestionClick(n,i,r,u){let f={query:n,fromSearchHome:i,fromSuggestionType:r,inorganic:!0,serpURLParams:u};t.setQuery(n||"",!0,!1,f)}static reformulateNonForcedMiniSerp(n,i,r){let u={query:n,fromSearchHome:i,fromSuggestionType:r};t.setQuery(n||"",!0,!1,u)}static switchToScope(i,r){var u,f;const e=(f=(u=n.ScopeConfig===null||n.ScopeConfig===void 0?void 0:n.ScopeConfig[i])===null||u===void 0?void 0:u.prefixes)===null||f===void 0?void 0:f[0];if(e){const n=`${e}: ${r||""}`;t.reformulate(n)}}static switchToThirdPartyScope(n,i){if(n){const r=`${n.displayName}: ${i||""}`;let u={query:r};t.setQuery(r||"",!0,!0,u)}}static switchToSearchScope(n){let i={query:n||""};t.setQuery(n||"",!0,!0,i)}static setQuery(u,f,e,o){if(n.isNullOrUndefined(u))throw new Error("query parameter can't be null");if(!f&&o)throw new Error("Property overrides only allowed on query reformulations");let s=!f&&!e;t._queryPropertiesOverrides=o;s&&(t._queryToIgnoreOnQueryTextChangedEvent=u);const h=!!n.config.setQueryKeyboardNavParamAvailable&&s&&r.getQueryText().queryText!=u;n.safeExecute(()=>r.setQueryText(u,f,t._currentRawImpressionIdCreatedByTheClient?t._currentRawImpressionId:i.impressionId,h),"setQueryText");let c=f&&t.getQuery().originalQuery==u||e;if(c){const i=()=>t.callQueryChangedHandlers({queryText:u,cursorPosition:u.length},e,!1);n.safeExecute(i,"triggerQueryTextChangedEvent")}}static setAutoCompleteQueryText(i){n.safeExecute(()=>r.setAutoCompleteQueryText(i,t._currentRawImpressionId),"setAutoCompleteQueryText")}static manuallyDismissApp(){!n.config.manuallyDismissApp||n.config.keepCortanaOpened||n.getTweakedSetting("keepCortanaOpenedTweak")||SearchAppWrapper.CortanaApp.dismissApp()}static launchUriAsync(i,r){try{return n.Async.safePromise("launchUriAsync",()=>{let n=u.createUriLaunchOptions();return n.launchPolicy=t.getUriLaunchPolicy(),n.dismissAppBeforeLaunchingURI=r,u.launchUriAsync(i,n)})}catch(f){return Promise.resolve(!1)}}static async launchUrlWithEdgeProtocolAsync(i,r,u){if(i&&!/^(http|https):/.test(i)&&i.includes(":"))return await t.launchUriAsync(i,u);if(n.config.enableMoreEdgeProtocol&&!r.cid&&!r.oid){let i,u,n=this._accessTokenManager.getSelectedAccountInfo((t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::launchSearchAsync"]:undefined);(n===null||n===void 0?void 0:n.accountProviderAuthority)=="consumers"?(i=n===null||n===void 0?void 0:n.accountId,r.cid=i):(n===null||n===void 0?void 0:n.accountProviderAuthority)=="organizations"&&(u=n===null||n===void 0?void 0:n.accountId,r.oid=u)}if(n.config.enableAnaheimLaunchWithProtocol&&(i=i?`microsoft-edge:?url=${encodeURIComponent(i)}×tamp=${n.getCurrentTime()}`:`microsoft-edge:?timestamp=${n.getCurrentTime()}`,n.config.anaheimDataLaunchSource&&(i+=`&source=${encodeURIComponent(n.config.anaheimDataLaunchSource)}`),r.campaign&&(i+=`&campaign=${encodeURIComponent(r.campaign)}`),r.medium&&(i+=`&medium=${encodeURIComponent(r.medium)}`),r.cid&&(i+=`&cid=${encodeURIComponent(r.cid)}`),r.oid&&(i+=`&oid=${encodeURIComponent(r.oid)}`),r.edgeSettingsUrl&&(i+=`&ux=${encodeURIComponent(r.edgeSettingsUrl)}`),r.hubAppId&&(i+=`&hubappid=${encodeURIComponent(r.hubAppId)}`),n.config.enableLaunchWithProfile)){const t=this._accessTokenManager.getSelectedAccountInfo();t&&(i+=`&upn=${n.encodeURIComponentForWindowsProtocol(t.accountUserName)}`)}const f=await t.launchUriAsync(i,u);return n.InstrumentationHelper.logClientInstEvent("ClientInst","EdgeProtocolLaunchURL",n.SequenceNumberManager.getSequenceNumber(),{medium:r.medium}),f}static launchCodexUriAsync(t,i,r){return this._navigationHelper?(t=this._navigationHelper.enrichUrlWithCvid(t),t=this._navigationHelper.enrichUrlWithMuidInfo(t)):(t=n.setUrlParameter(t,"cvid",this._currentCVID),t=n.setUrlParameter(t,"nclid",_G.nclid)),n.Host.launchUrlWithEdgeProtocolAsync(t,i,r)}static launchThirdPartyUriWithProtocolAsync(i,r){return new Promise(f=>{if(n.config.supportDMA&&n.isThirdPartySearchAllowed()){if(!r){t.launchUrlWithEdgeProtocolAsync(i,{});return}n.Async.safeChain("launchUri",()=>{let n=u.createUriLaunchOptions();return n.launchPolicy=t.getUriLaunchPolicy(),n.dismissAppBeforeLaunchingURI=!0,u.launchWebUriWithProtocolAsync(i,r,n)},n=>f(n),()=>f(!1))}})}static DSBLaunchUriRefactorAsync(t,i,r,u,f){i.setProperty("clickThroughUrl",t);const o=n.SequenceNumberManager.getSequenceNumber();u&&n.InstrumentationHelper.createCodexClickItemProps(i,"DSBCodex");n.InstrumentationHelper.instrumentItemClick(n.getCurrentTime(),i,o,null,f||n.getInputType(r),null);let e=i===null||i===void 0?void 0:i.getProperties();if(e?e.ocid?(t=n.setUrlParameter(t,"ocid",e.ocid),t=n.setUrlParameter(t,"pc","DSBPC")):e.form?t=n.setUrlParameter(t,"form",e.form):n.InstrumentationHelper.logClientInstEvent("ClientInst","NoOcidOrForm",o):n.InstrumentationHelper.logClientInstEvent("ClientInst","NoInstrumentedItemProperties",o),this._navigationHelper?(t=this._navigationHelper.enrichUrlWithCvid(t),t=this._navigationHelper.enrichUrlWithMuidInfo(t)):(t=n.setUrlParameter(t,"cvid",this._currentCVID),t=n.setUrlParameter(t,"nclid",_G.nclid)),n.config.enableMoreEdgeProtocol){const i=n.createDSBEdgeLaunchProtocolParameters(e);return n.Host.launchUrlWithEdgeProtocolAsync(t,i)}return n.Host.launchUriAsync(t)}static async launchOutlookAsync(i){return new Promise(r=>{try{const f=n.Async.safePromise("launchOutlookAsync",()=>u.launchEmailInOutlookNativeAsync(i));r(f);f&&t.manuallyDismissApp()}catch(f){return r(!1)}})}static submitFileExplorerTextSuggestion(t){n.safeExecute(()=>i.fileExplorerSuggestionPage.onSuggestionSelection(t),"submitFileExplorerTextSuggestion")}static submitFileExplorerFolderSuggestion(t){n.safeExecute(()=>i.fileExplorerSuggestionPage.onFolderSelection(t),"submitFileExplorerFolderSuggestion")}static removeItemFromPinnedToTaskbar(n){t._pinnedApps[n]=!1}static addItemToPinnedToTaskbar(n){t._pinnedApps[n]=!0}static cleanTaskBarPinnedItems(){t._pinnedApps={}}static isPinnedToTaskbar(n){return t._pinnedApps[n]}static launchSearchInFileExplorer(t){n.safeExecute(()=>i.launcher.launchExplorerSearch("query="+n.encodeURIComponentForWindowsProtocol(t)+"&crumb=kind:docs"),"launchExplorerSearch")}static isRequestFocusAvailable(){return!!r.requestFocus}static setFocusInSearchBox(i,u){if(t.isRequestFocusAvailable()){const t=()=>r.requestFocus(),f="requestFocus";i==9?n.safeSetTimeout(t,0,f,u):n.safeExecute(t,f,null,u);let e=n.getCurrentActiveElement();e&&e.blur()}}static setFocusInWebView(t){i.focusWebView&&n.safeExecute(()=>i.focusWebView(),"focusWebView",null,t)}static getFeatureEnabled(t){let r={validFeature:!1,featureEnabled:!1};return i.getFeatureEnabled?n.safeExecute(()=>i.getFeatureEnabled(t),"getFeatureEnabled",r,t):r}static getFeatureDWORD(t){let r={validFeature:!1,featureValue:0};return i.getFeatureDWORD?n.safeExecute(()=>i.getFeatureDWORD(t),"getFeatureDWORD",r,t):r}static getFeatureString(t){let r={validFeature:!1,featureValue:""};return i.getFeatureString?n.safeExecute(()=>i.getFeatureString(t),"getFeatureString",r,t):r}static launchInApp(i,r,u){t.updateQueryWithoutRefetching(r);n.safeExecute(u,i)}static launchVoiceFlow(n){t.launchInApp("launchVoiceFlow",n,()=>u.launchRAFAsync(n,t.getFormCode(),t.getInstrumentationParameters()))}static async launchSearchAsync(i,r,u,f){if(u&&!n.config.disableRAF)t.launchVoiceFlow(i);else{if(n.config.anaheimPrototype&&this._accessTokenManager){let n=this._accessTokenManager.getSelectedAccountInfo((t===null||t===void 0?void 0:t.isAuthInvestigation())?["WSBHost::launchSearchAsync"]:undefined);r=n?`microsoft-edge:?upn=${n.accountUserName};url=${r}`:`microsoft-edge:?url=${r}`}if(n.config.enableMoreEdgeProtocol){let i;switch(f){case"WSHBSH":i="LocalBingSearchHistory";break;case"SSHTRD":i="SSHTrendingSearch";break;case"WSBQFC":i="QFToBingChat";break;case"MVALL":i="WorkAutoSuggest";break;default:i="AutoSuggest"}await t.launchUrlWithEdgeProtocolAsync(r,{campaign:n.config.moreEdgeProtocolOCID,medium:i})}else await t.launchUriAsync(r)}}static launchCat1Async(n,r,f){let e=p[r];if(e)t.launchInApp("launch"+e,n,()=>i.launchExperienceByName(e,null));else{let i=w[r];i?t.launchUriAsync(i):t.launchInApp("launchCat1",n,()=>u.launchCat1Async(n,f,t.getInstrumentationParameters()))}}static launchCat2or3aAsync(n,i){t.launchInApp("launchCat2",n,()=>u.launchCat2Async(n,t.getFormCode(),i,t.getInstrumentationParameters()))}static launchStoreSearchAsync(i){let r="ms-windows-store:search?query="+n.encodeQueryParameter(i)+"&ocid="+n.encodeQueryParameter(n.config.storeHandoffTag)+"&type=apps";return t.launchUriAsync(r)}static launchFolder(t){n.safeExecute(()=>u.startLaunchFolder(t),"launchFolder")}static launchWindowsCortanaSettingsAsync(){return t.launchUriAsync("ms-settings:cortana")}static launchCortanaSignInAsync(){return t.launchUriAsync("ms-cortana://CapabilitiesPrompt/?RequestedCapabilities=Personalization")}static launchWindowsAccountSettingsAsync(){return t.launchUriAsync("ms-settings:emailandaccounts")}static launchSearchSettingsAsync(){return t.launchUriAsync("ms-settings:cortana-windowssearch")}static launchSearchPermissions(){t.launchUriAsync("ms-settings:search-permissions")}static async launchDeviceItemAsync(r,f){if(!n.isRemoveIconSelected()){let e=r.id,o=f;if(n.localDataSourceMayContainPII(f)||(o+="\n"+e),e.startsWith("shell:"))n.safeExecute(()=>u.startLaunchFolder(e),"launchDeviceItem",null,o);else{const f=r.originalDeviceItem||r;try{if(await n.Async.safePromise("launchDeviceItem",()=>u.launchSearchItemAsync(f),null,o,2),t._isFileExplorerOrControlPanel)i.fileExplorerSuggestionPage.onFileSelection(r)}catch(e){}}}}static async launchAppItemAsync(t,i,r){if(!n.isRemoveIconSelected()){let f=t.id,e=i+"\n"+f;if(r&&e+"\n"+r,f.startsWith("shell:"))n.safeExecute(()=>u.startLaunchFolder(f),"launchAppItem",null,e);else{let i=t.originalDeviceItem||t;try{await n.Async.safePromise("launchAppItem",()=>{let n;return r&&(n=u.createAppLaunchOptions(),n.appContext=r),u.launchSearchItemAsync(i,n)},null,e,2)}catch(f){}}}}static launchWebContent(n,i,r){t.launchInApp("launchWebContent",i,()=>{let t=u.createWebContentLaunchOptions();t.uri=n;r&&t.setAuthorization("Bearer",r);u.launchWebContent(t)})}static launchPrivacyPortalAsync(){return t.launchUriAsync("https://go.microsoft.com/fwlink/?LinkId=780764")}static initUrlParameters(){return Object.assign({},t._queryParamsCache)}static getCustomUrlParameters(i){let r=t.initUrlParameters(),u=i.scope;return u==n.Scope.All?delete r[f.Scope]:r[f.Scope]=n.Scope[u].toLowerCase(),n.searchHistoryAllowed()||(r[n.Service.QueryParams.NoHistory]="1"),t._sendElTokenInSuggstionRequest&&(r[n.Service.QueryParams.ElTokenValue]=t._elToken),n.RuntimeConfig.QfMode&&(r[n.Service.QueryParams.QfMode]=n.RuntimeConfig.QfMode.toString()),r}static getCustomHeaders(i){let r=Object.assign({},t._headersCache);if(!i||i.scope!=n.Scope.Apps){let n=(r["X-BM-ClientFeatures"]||"").split(",");n.push("RevStore");r["X-BM-ClientFeatures"]=n.join()}return r}static reloadWebViewAsync(){return t._webViewReloadEventHanlders.forEach(t=>n.safeExecute(()=>t(),"beforeWebViewReload")),n.Async.safePromise("reloadWebViewAsync",()=>i.reloadWebViewAsync()).catch(()=>{})}static throwIfResourcesMissing(){let t=_ge("cssCanary"),i=_w.getComputedStyle(t).fontFamily,r=_w.getComputedStyle(t).getPropertyValue("list-style-type");if(n.config.useCobaltCSS||sa_config.undocked){let i=_w.getComputedStyle(t).fontSize;i!="1px"&&n.log("WSBCobalt.css missing. useCobaltCSS="+n.config.useCobaltCSS+" undocked="+sa_config.undocked)}if(i!="CANARY"&&i!='"CANARY"'||r!="none")throw new Error("Missing CSS Bundle.");}static getFormCode(){return SearchAppWrapper.CortanaApp.entryPoint!="WNSHVR"?n.mapOSFormCode("WNSGPH"):"WNSHVR"}static getRegion(){return n.regionCache||this.initCortanaEnabledAndRegion(),n.regionCache}static getLanguage(){return n.uiLanguageCache||this.initLanguage(),n.uiLanguageCache}static dataSourceDependencies(n){return n=="Web"?["OSTMA","QS"]:n=="SSUE"?["SREE"]:[]}static getPaneCloseCount(){return t._paneCloseCount}static hasFallbackHappened(){return t._hasFallbackHappened}static getSafeSearchSetting(){return t._safeSearchSetting}static isEducationEnvironment(){return t._isEducationEnvironment}static isWindowsS(){return t._isWindowsS}static getPartnerSearchCode(){return t._partnerSearchCode}static getAgeAccountType(){return t._ageAccountType}static getWindowsFlights(){return t._windowsFlights}static getMSNRefIg(){return null}static setSearchBoxGlyphIcon(t){if(r.setSearchBoxGlyphIcon)if(t){let i=t.content||"";if(i.startsWith("&#x")){let n=parseInt(i.substr(3),16);i=n?String.fromCharCode(n):""}let u=t.type==2?"/Assets/Fonts/CortMDL2.ttf#Cortana MDL2 Assets":"";n.safeExecute(()=>r.setSearchBoxGlyphIcon(i,u),"setSearchBoxGlyphIcon custom")}else n.safeExecute(()=>r.setSearchBoxGlyphIcon("",""),"setSearchBoxGlyphIcon default")}static adjustHeight(){if(n.RuntimeConfig.PanelCanResize&&i.setWebViewHeight){t._pendingAdjustHeightTimer&&(sb_ct(t._pendingAdjustHeightTimer),t._pendingAdjustHeightTimer=null);(n.MockUrlParameters===null||n.MockUrlParameters===void 0?void 0:n.MockUrlParameters.clientVersion)&&(h?n.StaticHtmlElements.rootContainer.style.height="auto":n.StaticHtmlElements.root.style.height="auto");let r=t._feedbackFormIsVisible?a:n.StaticHtmlElements.root.offsetHeight;h&&(r+=36);let u=()=>{r*=n.RuntimeConfiguration.TextScaleFactor||1,i.setWebViewHeight(r),t._currentPaneHeight=r,t._pendingAdjustHeightTimer=null};!n.config.paneResizeDelay||r>=t._currentPaneHeight?u():t._pendingAdjustHeightTimer=n.safeSetTimeout(u,n.config.paneResizeDelay,"adjustHeight")}}static isClientLocationAvailable(){return t._shouldRequestEltoken||!!t._elToken}static getFileExplorerCurrentPath(){if(n.RuntimeConfig.QfMode!=5)throw"Not supported";return t._fileExplorerCurrentPath}static isAuthInvestigation(){return t._accessTokenManager&&t._isAuthInvestigation}static isDSBEnabledByClient(){var r,n,i;return t._isDSBEnabledByClient==null&&(t._isDSBEnabledByClient=(i=(n=(r=SearchAppWrapper.CortanaApp).isDynamicSearchBoxEnabled)===null||n===void 0?void 0:n.call(r))!==null&&i!==void 0?i:!0),t._isDSBEnabledByClient}}t.isAppHidden=!1;t.hasSuspend=!1;t._queryParamsCache={};t._locStrings=[];t._enUsLocStrings=[];t._modifierKeyState={altKey:!1,ctrlKey:!1,shiftKey:!1};t._bootstrapDoneEventHandlers=[];t._appVisibleEventHandlers=[];t._shownEventHandlers=[];t._conversationStartEventHandlers=[];t._dismissedEventHandlers=[];t._appHiddenEventHandlers=[];t._webViewReloadEventHanlders=[];t._searchBoxGotFocusEventHandlers=[];t._searchBoxLostFocusEventHandlers=[];t._onSubmitHandlers=[];t._onFeedbackClosingHandlers=[];t._onSearchBoxGlyphIconClick=[];t._onSearchBoxClick=[];t._onButtonRightOfSearchBoxClick=[];t._queryChangedHandlers=[];t._rawQueryChangedHandlers=[];t._keyDownHandlers=[];t._keyUpHandlers=[];t._keyEscapeHandlers=[];t._accessTokenAvailableHandlers=[];t._scopeListRequiresUpdate=[];t._accountChangedHandlers=[];t._dynamicSearchBoxUpdateHandlers=[];t._dynamicPlaceholderContentRequestedHandlers=[];t._pinnedApps={};t._state=0;t._paneCloseCount=0;t._qfDismissCount=0;t._defaultWindowsTheme=0;t._defaultAppTheme=0;t._currentPaneHeight=0;t._defaultBrowser=0;t._fuzzyRankSuggestionCount=-1;t._coldRankSuggestionCount=-1;t._notColdRankSuggestionCount=-1;t._finalColdRankSuggestionCount=-1;t._mruFilesAndFoldersDefinedCount=-1;t._mruFilesAndFoldersUndefinedCount=-1;t.usedImpressionIds={};t.getEdgeIcon=(n,i)=>{let r=t._defaultBrowserIconCache&&t.getUriLaunchPolicy()==0?t._defaultBrowserIconCache:t._edgeIconCache;return r(n,i)};n.Host=t})(WSB||(WSB={}))