%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/dss_service/node_modules/proactive/lib/
Upload File :
Create Path :
Current File : C:/Windows/SystemApps/Microsoft.Windows.Cortana_cw5n1h2txyewy/dss_service/node_modules/proactive/lib/request-helpers.js

function isValidMuid(n){return n&&n.length>muidCookiePrefix.length}function getSyncHeaders(){function n(n,i){var r;try{r=i()}catch(u){return console.warn("%s: Failed to generate header %s",tag,n,u)}if(r==null)return console.warn("%s: Not setting header %s, value is null or undefined",tag,n);t[n]=r;return}var t={};return t["X-Search-AppId"]=CORTANA_APP_ID,n("User-Agent",function(){return _module.cortanaPlat.config.userAgent}),n("Accept-Language",function(){return _module.cortanaPlat.config.appLanguage}),n("X-BM-CBT",function(){return(new Date).getTime().toString()}),n("X-BM-DateFormat",function(){return _module.cortanaPlat.device.dateTimeFormat}),n("X-BM-DTZ",function(){return _module.cortanaPlat.device.timeZone}),n("X-BM-UserDisplayName",function(){return _module.cortanaPlat.config.userName}),n("X-Device-Product",function(){return _module.cortanaPlat.device.product}),n("X-Device-Manufacturer",function(){return _module.cortanaPlat.device.manufacturer}),n("X-Device-SKU",function(){return _module.cortanaPlat.device.deviceSKU}),n("X-Device-OSSKU",function(){return util.format("%d",_module.cortanaPlat.device.operatingSystemSKU)}),n("X-Device-MachineId",function(){return _module.cortanaPlat.device.machineId}),n("X-DeviceID",function(){return _module.cortanaPlat.config.deviceId}),n("X-Device-IsOptIn",function(){return _module.cortanaPlat.config.hasCortanaExperience.toString()}),n("X-Device-Touch",function(){return _module.plat.device.isTouchCapable.toString()}),n("X-Device-NetworkType",function(){var n=_module.plat.network.networkConnectivity;if(n)return n.dataClassName!=="none"?util.format("%s-%s",n.ianaTypeName,n.dataClassName):util.format("%s",n.ianaTypeName)}),n("X-Device-AudioCapture",function(){return _module.cortanaPlat.device.defaultAudioCaptureName||"none"}),n("X-Search-SafeSearch",function(){return _module.cortanaPlat.config.safeSearchMode}),_module.cortanaPlat.config.isMintanaEnabled&&(n("X-Search-CortanaAvailableCapabilities",function(){return _module.cortanaPlat.config.capabilitiesString}),n("X-UserAgeClass",function(){return _module.cortanaPlat.config.userAgeClassString})),_module.cortanaPlat.config.isAmbientModeEnabled&&n("X-TipsUploadTelemetry",function(){return _module.cortanaPlat.config.tipsUploadTelemetryString}),n("X-VoiceActivationOn",function(){return _module.cortanaPlat.config.voiceActivationOnString}),_module.cortanaPlat.config.firstEnabledTime&&n("X-BM-FirstEnabledTime",function(){return _module.cortanaPlat.config.firstEnabledTime}),n("X-UserActivity-DeviceID",function(){return _module.cortanaPlat.config.userActivityDeviceId}),t}var util=require("util"),dss_utils=require("dss-utils"),_module={};dss_utils.definePropertiesForLazyLoad(_module,require,{async:"async",request:"request",plat:"platform",cortanaPlat:"cortana-platform"});var muidCookiePrefix="MUID=",tag="proactive/request-helpers",CORTANA_APP_ID="Microsoft.Windows.Cortana_cw5n1h2txyewy!CortanaUI",CORTANA_TEST_APPID="Microsoft.Cortana_8wekyb3d8bbwe!CortanaUI";exports.getHeaders=function(n,t){console.log("%s: Attempting to add request headers.",tag);var i=getSyncHeaders();_module.async.parallel({location:_module.cortanaPlat.location.getLocation,userAuthTokens:_module.cortanaPlat.auth.getUserAuthenticationTokens},function(n,r){if(n)return console.error("%s: Failed to add request headers. Error: %s",tag,n),t(n);if(!r.userAuthTokens)return t(new Error("Failed to get user auth tokens"));if(r.userAuthTokens.rpsToken&&typeof r.userAuthTokens.rpsToken=="string")r.userAuthTokens.authority==="organizations"?i.Authorization="Bearer "+r.userAuthTokens.rpsToken:i["X-Search-RPSToken"]=r.userAuthTokens.rpsToken;else return t(new Error("Failed to get RPS Token"));if(r.location!=null&&(i["X-Search-Location"]=r.location),isValidMuid(r.userAuthTokens.muid)){var u=i[_module.request.COOKIE_HEADER]||"";u&&(u+="; ");i[_module.request.COOKIE_HEADER]=u+r.userAuthTokens.muid}else return t(new Error("Failed to get MUID"));return t(null,i)})}

Zerion Mini Shell 1.0