MSN i.delete(e),has:e=>i.has(e)});const r=”__RequestDataInstance__”;class c{constructor(e,t){if(this.url=new URL(e.href),this.innerHeight=e.innerHeight,this.devicePixelRatio=e.devicePixelRatio,this.canUseCssGrid=e.canUseCssGrid,this.requestId=e.requestId,this.cookie=e.cookie,this.referer=e.referer,this.userAgent=e.userAgent,this.clientData=e.clientData,this.oneServiceHeaders=function(e){try{if(e)return JSON.parse(e)}catch(e){}}(e.oneServiceHeaders)||{},this.isPssrMode=t,t){const e=a(“OSATE”,this.cookie),t=!!e&&”1″===e,n=a(“OSAT”,this.cookie);if(t&&n||!e&&!n)return this.msalAuthReady=!0,void(n&&(this.oneServiceHeaders.Authorization=`Bearer ${n}`));this.msalAuthReady=!1,this.pssrRejectedReason=e&&!t?”interactiveLogin”:e&&!n?”missOSAT”:”missOSATE”}}static getInstance(){const e=s.get(r);return e||(n.g.TEST_ENV?d({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}):d({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””}))}static resetInstance(e){const t=new c(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return s.set(r,t),t}}function a(e,t){if(t&&e){const n=new RegExp(“\b”+e+”\s*=\s*([^;]*)”,”i”).exec(t);return n&&n.length>1?n[1]:null}return null}const d=c.resetInstance,l=()=>c.getInstance();function u(){return o()?window.location.search:l().url.search}var p,h;!function(e){e.Anon=”ANON”,e.AppAnon=”APP_ANON”,e.Unknown=””}(p||(p={})),function(e){e.AnonCookieExists=”ace”,e.AppAnonCookieExists=”aace”}(h||(h={}));const g=”child”;function w(e,t){if(e){const n=new RegExp(“\b”+t+”\s*=\s*([^;]*)”,”i”).exec(e);return n&&n.length>1?n[1]:null}return null}function f(e){try{if(e)return JSON.parse(e)}catch(e){}return null}const m=”prg-pr2-“,v=”prg-pr2-only”,b=”prg-pw-“,y=”prg-“,k=”prg-1sw-“;function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y;const n=t.length,o=[];return e&&e.length&&(e.forEach((e=>{const i=e&&e.trim();i&&i.length>=n&&i.substring(0,n).toLowerCase()===t&&o.push(i.toLowerCase())})),o.sort()),o}const C=”allfltstocrs”,A=”canvasfltstocrs”;function I(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:””;const n=E(_(“info”))||[];let o=E(_(“canvasInfo”));if(!o){const i=function(e){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:””,n=y;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?n=b:t.toLocaleLowerCase()===”windowsShell”.toLocaleLowerCase()||t.toLocaleLowerCase()===”windowsShellV2″.toLocaleLowerCase()?n=k:e&&e.includes(v)&&t.toLocaleLowerCase()===”winWidgets”.toLocaleLowerCase()&&(n=m),n}(n,e,t);o=S(n,i)}return{all:n,prg:o}}function _(e){var t;return document.head.dataset[e]||(null===(t=O())||void 0===t?void 0:t.dataset[e])}let q;function O(){return void 0===q&&(q=document.getElementsByClassName(“peregrine-widget-settings”)[0]||null),q}function E(e){var t;if(!e||!e.startsWith(“f:”))return;const n=(e.match(/f:s*([^;]+)/i)||[])[1];return n?null===(t=n.toLowerCase().split(“,”))||void 0===t?void 0:t.sort():[]}const L=”Authorization”;var x,T;!function(e){e.Presentation=”presentation”}(x||(x={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(T||(T={}));var P,N;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(P||(P={})),function(e){e.Init=”init”,e.Config=”config”,e.Targeted=”targeted”,e.Sticky=”sticky”,e.NoSticky=”no_sticky”,e.Admin=”admin”,e.Forced=”forced”,e.Manual=”manual”}(N||(N={}));new Set([“winp0dash”,”winp1taskbar”,”winp1taskbarent”,”winp1taskbardirect”,”winp1taskbardirectent”,”winp1taskbarent”,”winp2juntaskbar”,”winp2juntaskbarent”,”winp2″,”winp2ent”,”winp2fp”,”winp2fpent”,”winp2fptaskbar”,”winp2fptaskbarent”,”winp2fptaskbarhover”,”winp2fptaskbarhoverent”,”winp2widget”,”winp2widgetent”]);const W=new Set([“finance-app-win”,”weather-app-win”,”winpstoreapp”]),R=(new Set([“msedgdhp”,”msedgdhphdr”,”msedgntphdr”,”msedgntp”,”msedgdhp”,”entnewsntp”]),new Set([“hpmsn”]));new Set([“chromentpnews”]);function M(){var e;return o()?f(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))):null}const D=”feed/personalize/settings”;function F(e,t){const n=t.replace(/[[]]/g,”\$&”),o=new RegExp(“[?&]”+n+”(=([^&#]*)|&|#|$)”).exec(e);if(!o)return null;const i=o[2];return decodeURIComponent(i.replace(/+/g,” “))||””}let U=new class{constructor(){o()?(this.isDebugEnabled=(F(window.location.href,”debug”)||””).toLowerCase()in{1:1,true:1}||”vp”===(F(window.location.href,”reqsrc”)||””).toLowerCase(),this.isDebugEnabled&&!n.g.TEST_ENV&&(window.webpackRequire=n)):this.isDebugEnabled=!1}getLoggingService(){return null}isDebug(){return this.isDebugEnabled}setDebug(e){this.isDebugEnabled=e}setTags(e){}log(e,t){this.isDebug()&&console.info(e)}logError(e){console.error(e)}logCallback(e){this.isDebug()&&console.info(e())}logObjects(){this.isDebug()&&console.log(…arguments)}logSingleObject(e,t){this.isDebug()&&console.log(e)}};class ${get supported(){return!!this.storage}constructor(e){this.storage=e}getItem(e){if(this.supported)return this.storage.getItem(e)}getObject(e,t){const n=this.getItem(e);if(null!=n){const e=f(n);if(null!=e)return e}return t}key(e){if(this.supported&&e>=0)return this.storage.key(e)}keys(){return this.supported?Object.keys(this.storage):[]}setObject(e,t){void 0!==t?this.setItem(e,JSON.stringify(t)):this.removeItem(e)}removeObject(e){const t=this.removeItem(e);if(null!=t)return f(t)}setItem(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.supported)try{if(!t)throw”Attempted to store null/undefined value: “+t;this.storage.setItem(e,t)}catch(e){if(!n)throw e;U.logError(e)}else if(!n)throw new Error(“WebStorage not supported”)}get length(){if(this.supported)return this.storage.length}removeItem(e){if(this.supported){const t=this.getItem(e);return this.storage.removeItem(e),t}}clear(){this.supported&&this.storage.clear()}removeSubstringKeys(e){if(!this.supported||!e)return;const t=[];for(let n=0;n[]{const e=Y(ne,!0),t=e&&f(e),{login_hint:n}=t||{};return n&&t})),ie=te((()=>!!Y(ne)));function se(){try{return localStorage}catch(e){return null}}const re=”__PageExperimentInstance__”;function ce(e){s.set(re,e)}function ae(e){if(!s.has(re)&&o()){var t;ce(de(document.head.dataset.info||(null===(t=window.document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===t||null===(t=t.dataset)||void 0===t?void 0:t.info)||””))}const n=s.get(re);return n&&n.has(e)}function de(e){const t=(e||””).replace(/(^f:|;.*$)/g,””).split(“,”);return new Set(t)}const le=”uxlogin”,ue=”uxlogout”,pe=”uxedit”,he=”useRedirect”,ge=”uxswitch”,we=te((()=>{const e=se();return e&&”1″===e.getItem(le)||o()&&location.search&&location.search.includes(`${le}=1`)}));const fe=te((()=>{const e=function(){try{return sessionStorage}catch(e){return null}}();return e&&!!e.getItem(ue)}));const me=te((()=>{const e=se();return e&&”1″===e.getItem(pe)}));const ve=te((()=>{const e=se(),t=!ae(“prg-noredirect”)&&e&&”1″===e.getItem(he)&&function(){const e=document.head.dataset.clientSettings||””,{browser:t}=f(e)||{},{browserType:n=””}=t||{};return!!/safari/i.test(n)}();return t}));const be=te((()=>{const e=se();return e&&”1″===e.getItem(ge)}));const ye={bingHomepageMobile:”binghomepagemobile”,outlookMobile:”OnOOutlookMobile”,officeMobile:”OnOOfficeMobile”,sapphire:”OnOStartApp”,skype:”OnOSkype”,freFullPage:”emmxFre”,winWeatherApp:”weather-app-win”,xiaomiApp:”xmweather-“,launcher:”launcherntp”,launcherInterests:”launcherInterests”,moto:”moto”,swiftKey:”swiftKey”,winMoneyApp:”finance-app-win”},ke=”superappdhp”,Se=[“ios”,”android”,”ipados”];let Ce=Fe(“ocid”).toLowerCase(),Ae=Fe(“chpltfm”),[Ie,_e]=Ae.toLowerCase().split(“-“);function qe(){if(!o()||Re())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,i=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!i)}function Oe(){const e=Ae&&”outlook”===Ie&&Se.includes(_e),t=Ce===ye.outlookMobile.toLowerCase();return e||t}function Ee(){const e=Ae&&[“office”,”union”].includes(Ie)&&Se.includes(_e),t=Ce===ye.officeMobile.toLowerCase();return e||t}function Le(){const e=Ce===ye.skype.toLowerCase()||”skype”===Ie;return o()&&(null===(t=window.skypeWebviewBridge)||void 0===t?void 0:t.isSkype)||e;var t}function xe(){return!(!o()||Re())&&(qe()||Ce===ye.sapphire.toLowerCase()||Ce===ke.toLowerCase())}function Te(){const e=Fe(“edge”);return(“emmx”===Ie||”1″===e)&&xe()||”mmx”===Ce}function Pe(){return”3rdp”===Ie||Ce.startsWith(ye.xiaomiApp)||Ne()||Re()}function Ne(){return Ce===ye.moto.toLowerCase()}function We(){return[ye.launcher.toLowerCase(),ye.launcherInterests.toLowerCase()].includes(Ce)&&xe()}function Re(){return Ce.toLowerCase()===ye.swiftKey.toLowerCase()||”swiftkey”==Ie.toLowerCase()}function Me(){return-1!==location.href.indexOf(“huawei”)||-1!==location.href.indexOf(“airfind”)||-1!==location.href.indexOf(“aloha”)||”vivo”===Ce&&Pe()}const De=te((()=>qe()||Le()||Ee()||Oe()||xe()||Ce===ye.winWeatherApp.toLowerCase()||Ce===ye.winMoneyApp.toLowerCase()||Te()||Pe()||We()||Re()||Me()||-1!==location.href.indexOf(“metaos=true”)));function Fe(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}const Ue=M()||{},$e={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channeldesktop:1,channelmobile:1,edgeMobile:1},Be={edgeChromium:1},He={winWidgets:1},je={edgeChromium:1,shopping:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1},Je={edgeChromium:1,channeldesktop:1,channelmobile:1,cgHomePage:1,distribution:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1,edgeMobile:1},Ge=te((()=>Ue&&Ue.apptype)),Ve=(te((()=>o()&&Ge()in He)),te((()=>o()&&!De()&&!(Ge()in $e)&&!Xe()&&!Qe()))),ze=te((()=>Ve()&&!(Ge()in Be)));te((()=>Ve()&&(!(Ge()in Be)||!ie()))),te((()=>Ve()&&!et()&&!tt()));const Ke=te((()=>tt()||et())),Xe=te((()=>{const e=!(Ge()in je)&&nt()&&function(){const e=new URLSearchParams(u()).get(“ocid”)||(null==Ue?void 0:Ue.ocid),t=null==e?void 0:e.toLowerCase(),n=!R.has(t)&&”homePage”!==Ge()&&!W.has(t);return n}()&&!function(){const e=”windows”==Ge()&&”windowshp”==(Ue&&Ue.pagetype)&&(o()?window.location.href:l().url.href).includes(`${D}`);return e}();return e})),Qe=()=>o()&&document&&document.body&&document.body.getElementsByClassName(“peregrine-widgets”).length>0;te((()=>Ge()in Je||Xe()));function Ye(){const e=G;if(e)return U.log(“dual-auth: tryGet1SAuthToken returned live tokens”),e;const t=z();if(t)return U.log(`dual-auth: tryGet1SAuthToken returned cached tokens that are ${K()}`),t;U.log(“dual-auth: tryGet1SAuthToken returned empty tokens”)}function Ze(e){const t={};return e&&(t[L]=`Bearer ${e}`),t}function et(){return ze()&&we()||function(){const e=ze()&&!ot()&&!we()&&oe()&&(“expired”==K()||me());return e}()||fe()||ve()}function tt(){return ze()&&!oe()&&be()}const nt=te((()=>{const{browser:e}=Ue,{browserType:t=””,detected:n={}}=e||{},{browserType:o=””}=n||{};return/edgeChromium/i.test(t)||/edgeAndroid/i.test(t)||/edgeiOS/i.test(t)||/edge/i.test(o)}));te((()=>ze()&&!Xe()));const ot=()=>{const e=oe();if(!e)return!1;let t;switch(e.account_type){case”MSA”:t=ze()?”ace”:”aace”;break;case”AAD”:t=ze()?”WID”:”APP_WID”;break;default:return!1}return!!Y(t)};const it=”__core_auth_authHeaderPromiseParts__”,st=()=>s.get(it);var rt;!function(){let e;const t={promise:new Promise((t=>e=t)),resolver:e};s.set(it,t)}(),function(e){e.GLOBAL=”GLOBAL”,e.GCC_MODERATE=”GCC_MODERATE”}(rt||(rt={}));let ct;function at(){return ct}const dt=te((()=>f(Y(“AL_STATE”,!0))));const lt=()=>{const e=Y(“elt”,!0),t=e&&f(e),{access_token:n,account_type:o,login_hint:i,region_scope:s}=t||{};return(n||o||i||s)&&t};function ut(e){if(“undefined”==typeof window||!window.document||window.isRenderServiceEnv)return;const t=window.trustedTypes;if(!t||!t.createPolicy)return;const n=window.trustedTypePolicies||(window.trustedTypePolicies={});if(n[e])return n[e];const o=t.createPolicy(e,{createScriptURL:e=>{const t=function(e){const t=[“ntp.msn.com”,”ntp.msn.cn”,”assets.msn.cn”,”assets.msn.com”,”www.bing.com”,”assets2.msn.com”,”assets2.msn.cn”,”www.clarity.ms”,”int.msn.com”,”r.bing.com”,”business.bing.com”,”staticview.msn.com”,”staticview.msn.cn”,document.location.hostname];let n;try{n=new URL(e,location.origin)}catch(e){return”about:blank#error”}if(n.hostname&&!t.includes(n.hostname))return”about:blank#error”;return e}(e);return t}});return n[e]=o,o}class pt{constructor(){this.childCookieName=”child”,this.domInfo=document.head.dataset.info,this.canvasInfo=document.head.dataset.canvasInfo||””,this.command=”command”}init(e,t){this.clientSettings=e||M(),this.authCookieName=at()||window._authCookieName||””,this.bundle=window._webWorkerBundle||””,t=t||{};const n=this.buildWebWorkerUrl(this.clientSettings,t),o=this.clientSettings.apptype;let i;if(o&&”edgeChromium”===o){if(i=this.tryGetWebWorkerUsingPolicy(n,”webWorkerUrlPolicy”),!i)return void console.warn(“Error in creating trusted types compliant web worker”)}else i=window.webWorker=new Worker(n,{name:”web-worker”});const s=window.webWorkerMessages=[];i.onmessage=e=>{s.push(e.data)};const…
Continue reading