MSN s.delete(e),has:e=>s.has(e)});function a(){return!(“undefined”==typeof window||!window.document||!window.document.createElement||window.isRenderServiceEnv)}function u(e){let t,n=!1;const o=function(){return n||(n=!0,t=e()),t};return o.cache={clear:()=>{n=!1,t=void 0}},o}const d=”launcherInterests”,l=”cp_msn_cmc”,w=”_ocidIsomorphicKey”,h=()=>(c.get(w)||c.set(w,T(“ocid”).toLowerCase()),c.get(w)),f=”_platformFlagKey”,p=”_hostAppNameKey”,m=”_clientTypeKey”,g=()=>(c.get(f)||c.set(f,T(“chpltfm”)),c.get(f)),v=()=>{if(!c.get(p)){const e=g();c.set(p,e.toLowerCase().split(“-“)[0])}return c.get(p)};function b(){if(!a()||A())return!1;const e=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,o=t&&t.messageHandlers&&t.messageHandlers.send&&t.messageHandlers.send.postMessage;return!(!n&&!o)}function y(){return window&&!!window._isCopilotBridge||”copilot”===T(“MBApp”)}function S(){const e=g()&&”outlook”===v()&&[“ios”,”android”,”ipados”].includes((()=>{if(!c.get(m)){const e=g();c.set(m,e.toLowerCase().split(“-“)[1])}return c.get(m)})()),t=h()===”OnOOutlookMobile”.toLowerCase();return e||t}function x(){return!(!a()||A())&&(b()||h()===”OnOStartApp”.toLowerCase()||h()===”superappdhp”.toLowerCase())}function _(){const e=T(“edge”);return(“emmx”===v()||”1″===e)&&x()||”mmx”===h()}function O(){return”3rdp”===v()||h().startsWith(“xmweather-“)||A()}function k(){return[“launcherntp”.toLowerCase(),d.toLowerCase()].includes(h())&&x()}function A(){return h().toLowerCase()===”swiftKey”.toLowerCase()||”swiftkey”==v().toLowerCase()}const N=u(()=>b()||S()||x()||h()===”weather-app-win”.toLowerCase()||h()===”finance-app-win”.toLowerCase()||_()||O()||k()||A()||-1!==window.location.href.indexOf(“metaos=true”)||y()||!!a()&&h()===l&&”true”===T(“hasBridge”));function T(e){try{return new URL(location.href).searchParams.get(e)||””}catch(e){return””}}function I(e,t,n){const o=n&&”phone”===n.toLowerCase(),i=t&&”enterprise”===t;let r=”Edge”;A()?r=”swiftKey”:k()?r=”Launcher”:function(){var e;if(!a())return!1;if(“bingHomepageMobile”===(null===(e=window._clientSettings)||void 0===e?void 0:e.pagetype))return!0;{var t;const e=null===(t=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===t?void 0:t.getAttribute(“data-client-settings”);if(e){const t=JSON.parse(e);return t&&t.pagetype&&”bingHomepageMobile”===t.pagetype}return!1}}()&&(r=”bingHomepageMobile”);return{bingHomepage:”binghomepage”,mmx:”emmx”,edge:”spartan”,edgeChromium:i?”entnews”:”anaheim”,hybrid:”spartan”,hub:o?”prime_mobile”:”prime”,microsoftNews:”msnews”,office:”entnews”,views:o?”prime_mobile”:”prime”,homePage:o?”prime_mobile”:”prime”,windowsShell:”windowsshell”,edgeMobile:r,winWidgets:i?”entwindowsdash”:”windowsdash”}[e]}function C(){return window._pgNameOverride}const $={homePage:{vertical:”homepage”,category:””,id:””,domainId:”13041″,title:”undefined”!=typeof document?document.title:””}};function E(e){let t=e;switch(e){case”windowsshellhp”:t=”dhp”;break;case”video”:t=”watch”;break;case”EdgeMobile”:t=_()?”ntp”:”dhp”}return t}function W(){try{var e;const t={};return null===(e=Error.captureStackTrace)||void 0===e||e.call(Error,t,W),t.stack}catch(e){return(new Error).stack}}function R(e){try{return decodeURIComponent(e)}catch(e){}}let M;function P(e,t){if(!e)return null;if(t)return function(e){var t;const n=null===(t=document.cookie)||void 0===t?void 0:t.match(`\b${e}=([^;]*)`);return n?R(n[1]):null}(e);if(!M){const e=”undefined”!=typeof document&&document.cookie.split(“; “);M={};const t=e&&e.length;for(let n=0;n0&&void 0!==arguments[0]?arguments[0]:20;this.maxLength=e,this.list=[]}push(e){this.list.push(e),this.list.length>this.maxLength&&this.list.shift()}get data(){return this.list}};function q(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:D.Alert,s=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;try{const u=function(){if(!o){const e=document.head.getAttribute(“data-client-settings”);e&&(o=JSON.parse(e))}return o}();if(!function(e){if(!e)return!0;const t=j.get(e)||0;return t>=10?(console.error(`App Error ${e} throttled: Maximum 10 events exceeded (current: ${t})`),!1):(j.set(e,t+1),!0)}(t))return;const d=r(),l=function(e){if(e){const{pcsInfo:t,pageGenTime:n}=e,o=new Date(n).getTime(),i=!t||[“prod”,”prod-ssr”,”prod-ssrntp”].includes(t.env);F=i?”browser.events.data.msn.com”:”events-sandbox.data.msn.com”;return{cors:”true”,”content-type”:”application/x-json-stream”,”client-id”:”NO_AUTH”,”client-version”:”1DS-Web-JS-2.2.2″,apikey:i?”0ded60c75e44443aa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafe60192e-7279″:”f8857dedc6f54ca8962cfb713e01e7d7-e9250191-fe0b-446f-95ae-07516262f98c-7028″,”upload-time”:o,w:”0″,anoncknm:”app_anon”}}return null}(u);let w=””;l&&l.apikey&&””!==l.apikey&&(w=function(e){if(e){const t=e.indexOf(“-“);if(t>0)return e.substring(0,t)}return””}(l.apikey));const h=function(e,t,n,o,i,r){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:D.Alert,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:””;if(n){i=i||{};const{aid:l,apptype:w,audienceMode:h,pagetype:f,pageGenTime:p,bundleInfo:m,deviceFormFactor:g=””,fd_muid:v,os:b,static_page:y}=n;i.pageGenTime=p,i.build=m&&m.v,i.appType=w,i.pageVisible=document.visibilityState;const S=I(w,h,g),x=S||w,_=document.getElementsByTagName(“html”)[0].getAttribute(“lang”);let O,k=””,A=”muid”;try{if(“edgeChromium”===w&&”object”==typeof window&&window.location&&window.location.search){const e=new URLSearchParams(window.location.search);O=e.has(“startpage”)?”msedgdhp”:”msedgntp”,”enterprise”===h?O=”entnewsntp”:”xbox”===b&&(O=”xboxntp”)}window&&window.getCookieConsentRequired&&”function”==typeof window.getCookieConsentRequired&&window.getCookieConsentRequired()||(k=(null===(u=window)||void 0===u||null===(u=u.__SSRUserConfigEarlyLog)||void 0===u?void 0:u.consistentMuid)||(null===(d=window)||void 0===d?void 0:d.__muid)||P(“muid”))}catch{}k||(k=n.aid,A=”aid”);const N={name:”MS.News.Web.AppError”,time:p,ver:”4.0″,iKey:`o:${o}`,data:{baseData:{},baseType:”MS.News.Web.Base”,page:{appType:null==w?void 0:w.toLowerCase(),name:C()||”default”,product:x,type:E(f),content:$[w]??{category:”standaloneError”},ocid:O,url:location.href,isStatic:y},browser:{clientId:k,clientIdType:A},flight:{id:r,tmpl:c},request:{activityId:l,requestId:l,afdMuid:v},locale:{mkt:_},extSchema:{id:e,severity:s,pb:i,message:t}}};var a;if(k&&”muid”===A)N.ext={…null==N?void 0:N.ext,user:{…null==N||null===(a=N.ext)||void 0===a?void 0:a.user,localId:`t:${k}`}};return”object”==typeof window&&(window.isSSREnabled&&(N.data.flight.tmpl+=”;ssr-enabled:1″),window.isSSRCompleted&&(N.data.flight.tmpl+=”;ssr-completed:1″)),N?JSON.stringify(N):null}var u,d;return null}(t,e,u,w,n,d,i,a);if(c&&!function(e){if(null==e)return!1;return e.startsWith(“1”)||e.startsWith(“2”)||e.startsWith(“3”)||e.startsWith(“4″)}(null==u?void 0:u.aid))return console.error(h),void console.error(`This App error Id: ${t} will not be sent due to app error sampling!`);if(l&&h){console.error(h),L.push(h);const e=”https://”+F+”/OneCollector/1.0″+function(e){return”?”+Object.keys(e).map(function(t){return t+”=”+encodeURIComponent(e[t])}).join(“&”)}(l);if(s&&!performance.getEntriesByType(“visibility-state”).some(e=>”visible”===e.name)){const t=()=>{“visible”===document.visibilityState&&navigator.sendBeacon(e,h)};document.addEventListener(“visibilitychange”,t,{once:!0})}else navigator.sendBeacon(e,h)}}catch{}}function J(e){q(“Error when loading bundle: “+e,20202,{…arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}function H(e,t,n,o,i){const r=(i&&i.stack)??W(),s={source:t,customMessage:e??(null==i?void 0:i.message),line:n,column:o,stack:r};if(“Uncaught EvalError: Possible side-effect in debug-evaluate”===e&&”EvalError: Possible side-effect in debug-evaluate”===r)return;if(“ResizeObserver loop limit exceeded”===e)return;if(“ResizeObserver loop completed with undelivered notifications.”===e)return;if(e.includes(“No value set for token ‘direction'”))return;q(“JS Exception”+(s.customMessage?`- ${s.customMessage.substring(0,60)}`:””),20203,s)}function K(e){const t={customMessage:e&&e.reason&&e.reason.message,stack:(e&&e.reason&&e.reason.stack)??W()};q(“JS Exception on unhandled promise rejection”+(t.customMessage?`- ${t.customMessage.substring(0,60)}`:””),20203,t)}const B=”experience”,z=[“common-monthly”],V=Object.create(null);function G(e,t){if(t=t||Array.from(document.scripts).find(t=>t.src.indexOf(`/${e}.`)>-1),!t)return;const n=function(e,t){const n=document.createElement(“script”);return n.type=”text/javascript”,n.crossOrigin=”anonymous”,n.src=e,n.onerror=()=>{let e=V[t]||0;V[t]=++e,e[]{delete V[t];const e=window._pageTimings.retriedBundles;window._pageTimings.retriedBundles=e?`${e},${t}`:t,Y()},n}((o=t.src,V[e],o),e);var o;setTimeout(()=>t.replaceWith(n),100)}function X(){const[e={}]=performance.getEntriesByType(“navigation”);return e.type}function Y(){if(!Object.values(V).every(e=>2===e))return;let e=””;Object.keys(V).forEach(t=>{e=e?`${e},${t}`:t,delete V[t]}),e&&q(`Error when loading bundle(s): ${e}`,20202,{timeElapsed:Math.round(performance.now()),navType:X()})}function Q(e){try{if(e)return JSON.parse(e)}catch(e){}return null}”undefined”!=typeof window&&window.document&&window.document.createElement&&(window._pageTimings=window._pageTimings||{},window.requestIdleCallback=window.requestIdleCallback||window.setTimeout);const Z=”Authorization”;var ee,te;!function(e){e.Presentation=”presentation”}(ee||(ee={})),function(e){e.Unknown=”Unknown”,e.Portrait=”Portrait”,e.Landscape=”Landscape”}(te||(te={}));var ne,oe;!function(e){e[e.Undefined=0]=”Undefined”,e[e.Basic=1]=”Basic”,e[e.Advanced=2]=”Advanced”,e[e.Premium=3]=”Premium”}(ne||(ne={})),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”}(oe||(oe={}));const ie=new Set([“finance-app-win”,”weather-app-win”,”winpstoreapp”]),re=new Set([“hpmsn”]);new Set([“chromentpnews”]);function se(){var e;return a()?(window._clientSettings=window._clientSettings||Q(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName(“peregrine-widget-settings”)[0])||void 0===e?void 0:e.getAttribute(“data-client-settings”))),window._clientSettings):null}const ce=”feed/personalize/settings”;function ae(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 ue=new class{constructor(){a()?(this.isDebugEnabled=(ae(window.location.href,”debug”)||””).toLowerCase()in{1:1,true:1}||”vp”===(ae(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 de{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=Q(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 Q(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;ue.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!!P(ve));const Se=”__RequestDataInstance__”;class xe{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.vpCetoToken=e.vpCetoToken,this.oneServiceHeaders=Oe(e.oneServiceHeaders)||{},this.isPssrMode=t,t){const e=_e(“OSATE”,this.cookie),t=!!e&&”1″===e,n=_e(“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=c.get(Se);return e||(n.g.TEST_ENV?ke({href:”http://localhost:8080/”,innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””,vpCetoToken:””}):ke({href:”http://localhost:8080/”,innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:”0″,cookie:””,userAgent:””,referer:””,oneServiceHeaders:””,vpCetoToken:””}))}static resetInstance(e){const t=new xe(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1]);return c.set(Se,t),t}}function _e(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}function Oe(e){try{if(e)return JSON.parse(e)}catch(e){}}const ke=xe.resetInstance,Ae=()=>xe.getInstance();function Ne(){return a()?window.location.search:Ae().url.search}function Te(){try{return localStorage}catch(e){return null}}const Ie=”__PageExperimentInstance__”;function Ce(e){c.set(Ie,e)}function $e(e){if(!c.has(Ie)&&a()){var…
Continue reading