site Internet:MSN 香港 | 首頁teneur
MSNtry{window._peTimings=window._peTimings||{};window._peTimings["TTJSStart"]=Math.round(performance.now());}catch(e){console.error("ErrorinaddingTTJSStartmarker");}functiongetCookieConsentRequired(){returntrue;}window._ssrServiceEntryUrl="/bundles/v1/homePe/latest/SSR-service-entry.aeb0564d8abd8397e12d.js";window["_webWorkerBundle"]="/bundles/v1/homePe/latest/web-worker.16d8fb74a034c063d468.js";window["_authCookieName"]="ace";!function(){"usestrict";vare={},t={};functionn(o){vari=t[o];if(void0!==i)returni.exports;vars=t[o]={exports:{}};returne[o](s,s.exports,n),s.exports}leto,i;functions(){if(i)returni;conste=document.head.getAttribute("data-info");returni=((/f:\s*([^;]+)/i.exec(e)||{})[1]||"").toLowerCase(),i}n.g=function(){if("object"==typeofglobalThis)returnglobalThis;try{returnthis||newFunction("returnthis")()}catch(e){if("object"==typeofwindow)returnwindow}}(),function(){if(void0!==n){conste=n.e,t={};n.e=function(o){returne(o).catch((function(e){consti=t.hasOwnProperty(o)?t[o]:2;if(ir.delete(e),has:e=>r.has(e)});functionc(){return!("undefined"==typeofwindow||!window.document||!window.document.createElement||window.isRenderServiceEnv)}functiond(e){lett,n=!1;consto=function(){returnn||(n=!0,t=e()),t};returno.cache={clear:()=>{n=!1,t=void0}},o}constl={bingHomepeMobile:"binghomepemobile",outlookMobile:"OnOOutlookMobile",officeMobile:"OnOOfficeMobile",sapphire:"OnOStartApp",skype:"OnOSkype",freFullPe:"emmxFre",winWeatherApp:"weather-app-win",xiaomiApp:"xmweather-",launcher:"launcherntp",launcherInterests:"launcherInterests",swiftKey:"swiftKey",winMoneyApp:"finance-app-win"},u="superappdhp",p=["ios","android","ipados"],h="_ocidIsomorphicKey",g=()=>(a.get(h)||a.set(h,T("ocid").toLowerCase()),a.get(h)),w="_platformFlKey",m="_hostAppNameKey",f="_clientTypeKey",b=()=>(a.get(w)||a.set(w,T("chpltfm")),a.get(w)),v=()=>{if(!a.get(m)){conste=b();a.set(m,e.toLowerCase().split("-")[0])}returna.get(m)},y=()=>{if(!a.get(f)){conste=b();a.set(f,e.toLowerCase().split("-")[1])}returna.get(f)};functionk(){if(!c()||O())return!1;conste=window.sapphireWebViewBridge,t=window.webkit,n=e&&e.send,o=t&&t.messeHandlers&&t.messeHandlers.send&&t.messeHandlers.send.postMesse;return!(!n&&!o)}functionS(){conste=b()&&"outlook"===v()&&p.includes(y()),t=g()===l.outlookMobile.toLowerCase();returne||t}functionC(){conste=b()&&["office","union"].includes(v())&&p.includes(y()),t=g()===l.officeMobile.toLowerCase();returne||t}functionA(){conste=g()===l.skype.toLowerCase()||"skype"===v();returnc()&&(null===(t=window.skypeWebviewBridge)||void0===t?void0:t.isSkype)||e;vart}functionI(){return!(!c()||O())&&(k()||g()===l.sapphire.toLowerCase()||g()===u.toLowerCase())}function_(){conste=T("edge");return("emmx"===v()||"1"===e)&&I()||"mmx"===g()}functionE(){return"3rdp"===v()||g().startsWith(l.xiaomiApp)||O()}functionq(){return[l.launcher.toLowerCase(),l.launcherInterests.toLowerCase()].includes(g())&&I()}functionO(){returng().toLowerCase()===l.swiftKey.toLowerCase()||"swiftkey"==v().toLowerCase()}functionx(){return-1!==window.location.href.indexOf("huawei")||-1!==window.location.href.indexOf("airfind")||-1!==window.location.href.indexOf("aloha")||"vivo"===g()&&E()}constL=d((()=>k()||A()||C()||S()||I()||g()===l.winWeatherApp.toLowerCase()||g()===l.winMoneyApp.toLowerCase()||_()||E()||q()||O()||x()||-1!==window.location.href.indexOf("metaos=true")));functionT(e){try{returnnewURL(location.href).searchParams.get(e)||""}catch(e){return""}}letP,N;functionW(e){try{returndecodeURIComponent(e)}catch(e){}}functionM(e,t){if(!e)returnnull;if(t)returnR(e);if(!P){conste="undefined"!=typeofdocument&&document.cookie.split(";");P={};constt=e&&e.length;for(letn=0;n0&&void0!==arguments[0]?arguments[0]:20;this.maxLength=e,this.list=[]}push(e){this.list.push(e),this.list.length>this.maxLength&&this.list.shift()}getdata(){returnthis.list}};function$(e,t,n){leti=arguments.length>3&&void0!==arguments[3]?arguments[3]:F.Alert,r=arguments.length>4?arguments[4]:void0,a=arguments.length>5?arguments[5]:void0,d=arguments.length>6?arguments[6]:void0;try{constl=function(){if(!o){conste=document.head.getAttribute("data-client-settings");e&&(o=JSON.parse(e))}returno}(),u=s(),p=function(e){if(e){const{pcsInfo:t,peGenTime:n}=e,o=newDate(n).getTime(),i=!t||["prod","prod-ssr","prod-ssrntp"].includes(t.env);N=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?"0ded60c75eaa3484c42c1c43fe8-9fc57d3f-fdac-4bcf-b927-75eafee-7279":"f8857dedc6f54ca8962cfb713e01e7d7-e-fe0b-446f-95ae-f98c-7028","upload-time":o,w:"0",anoncknm:"app_anon"}}returnnull}(l);leth="";p&&p.apikey&&""!==p.apikey&&(h=function(e){if(e){constt=e.indexOf("-");if(t>0)returne.substring(0,t)}return""}(p.apikey));constg=function(e,t,n,o,i,s){letr=arguments.length>6&&void0!==arguments[6]?arguments[6]:F.Alert,a=arguments.length>7&&void0!==arguments[7]?arguments[7]:"";if(n){i=i||{};const{apptype:u,audienceMode:p,petype:h,peGenTime:g,bundleInfo:w,deviceFormFactor:m="",fd_muid:f,os:b}=n;i.peGenTime=g,i.build=w&&w.v,i.appType=u;constv=function(e,t,n){consto=n&&"phone"===n.toLowerCase(),i=t&&"enterprise"===t;lets="Edge";O()?s="swiftKey":q()?s="Launcher":function(){vare;if(!c())return!1;constt=document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName("peregrine-widget-settings")[0])||void0===e?void0:e.getAttribute("data-client-settings"));if(t){conste=JSON.parse(t);returne&&e.petype&&"bingHomepeMobile"===e.petype}return!1}()&&(s="bingHomepeMobile");return{bingHomepe:"binghomepe",mmx:"emmx",edge:"spartan",edgeChromium:i?"entnews":"anaheim",hybrid:"spartan",hub:o?"prime_mobile":"prime",microsoftNews:"msnews",office:"entnews",views:o?"prime_mobile":"prime",homePe:o?"prime_mobile":"prime",windowsShell:"windowsshell",edgeMobile:s}[e]}(u,p,m),y=v||u,k=document.getElementsByTName("html")[0].getAttribute("lang");letS,C="",A="muid";try{if("edgeChromium"===u&&"object"==typeofwindow&&window.location&&window.location.search){conste=newURLSearchParams(window.location.search);S=e.has("startpe")?"msedgdhp":"msedgntp","enterprise"===p?S="entnewsntp":"xbox"===b&&(S="xboxntp")}window&&window.getCookieConsentRequired&&"function"==typeofwindow.getCookieConsentRequired&&window.getCookieConsentRequired()||(C=(null===(l=window)||void0===l?void0:l.__muid)||M("muid"))}catch{}C||(C=n.aid,A="aid");constI={name:"MS.News.Web.AppError",time:g,ver:"4.0",iKey:`o:${o}`,data:{baseData:{},baseType:"MS.News.Web.Base",pe:{name:"default",product:y,type:H(h),content:j[u]??{category:"standaloneError"},ocid:S},browser:{clientId:C,clientIdType:A},flight:{id:s,tmpl:a},request:{activityId:n.aid,requestId:n.aid,afdMuid:f},locale:{mkt:k},extSchema:{id:e,severity:r,pb:i,messe:t}}};vard;if(C&&"muid"===A)I.ext={...null==I?void0:I.ext,user:{...null==I||null===(d=I.ext)||void0===d?void0:d.user,localId:`t:${C}`}};return"object"==typeofwindow&&(window.isSSREnabled&&(I.data.flight.tmpl+=";ssr-enabled:1"),window.isSSRCompleted&&(I.data.flight.tmpl+=";ssr-completed:1")),I?JSON.stringify(I):null}varl;returnnull}(t,e,l,h,n,u,i,d);if(a&&!function(e){if(null==e)return!1;returne.startsWith("1")||e.startsWith("2")||e.startsWith("3")||e.startsWith("4")}(null==l?void0:l.aid))returnconsole.error(g),voidconsole.error(`ThisApperrorId:${t}willnotbesentduetoapperrorsampling!`);if(p&&g){console.error(g),U.push(g);conste=""+N+"/OneCollector/1.0"+function(e){return"?"+Object.keys(e).map((function(t){returnt+"="+encodeURIComponent(e[t])})).join("&")}(p);if(r&&!performance.getEntriesByType("visibility-state").some((e=>"visible"===e.name))){constt=()=>{"visible"===document.visibilityState&&nigator.sendBeacon(e,g)};document.addEventListener("visibilitychange",t,{once:!0})}elsenigator.sendBeacon(e,g)}}catch{}}constj={homePe:{vertical:"homepe",category:"",id:"",domainId:"",title:"undefined"!=typeofdocument?:""}};functionH(e){lett=e;switch(e){case"windowsshellhp":t="dhp";break;case"video":t="watch";break;case"EdgeMobile":t=_()?"ntp":"dhp"}returnt}functionB(e){$("Errorwhenloadingbundle:"+e,,{...arguments.length>1&&void0!==arguments[1]?arguments[1]:{}})}functionJ(e,t,n,o,i){$("JSException",,{source:t,customMesse:e,line:n,column:o,stack:i&&i.stack})}functionG(e){$("JSException",,{customMesse:e&&e.reason&&e.reason.messe,stack:e&&e.reason&&e.reason.stack})}constV="experience",K=Object.create(null),X=2;functionz(e,t){if(!(t=t||Array.from(document.scripts).find((t=>t.src.indexOf(`/${e}.`)>-1))))return;constn=function(e,t){constn=document.createElement("script");returnn.type="text/jascript",n.crossOrigin="anonymous",n.src=e,n.onerror=()=>{lete=K[t]||0;K[t]=++e,e{deleteK[t];conste=window._peTimings.retriedBundles;window._peTimings.retriedBundles=e?`${e},${t}`:t,Y()},n}((o=t.src,K[e],o),e);varo;setTimeout((()=>t.replaceWith(n)),100)}functionQ(){const[e={}]=performance.getEntriesByType("nigation");returne.type}functionY(){if(!Object.values(K).every((e=>e===X)))return;lete="";Object.keys(K).forEach((t=>{e=e?`${e},${t}`:t,deleteK[t]})),e&&$(`Errorwhenloadingbundle(s):${e}`,,{timeElapsed:Math.round(performance.now()),nType:Q()})}functionZ(e){try{if(e)returnJSON.parse(e)}catch(e){}returnnull}"undefined"!=typeofwindow&&window.document&&window.document.createElement&&(window._peTimings=window._peTimings||{},window.requestIdleCallback=window.requestIdleCallback||window.setTimeout);constee="Authorization";varte,ne;!function(e){e.Presentation="presentation"}(te||(te={})),function(e){e.Unknown="Unknown",e.Portrait="Portrait",e.Landscape="Landscape"}(ne||(ne={}));varoe,ie;!function(e){e[e.Undefined=0]="Undefined",e[e.Basic=1]="Basic",e[e.Advanced=2]="Advanced",e[e.Premium=3]="Premium"}(oe||(oe={})),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"}(ie||(ie={}));newSet(["winp0dash","winp1taskbar","winp1taskbarent","winp1taskbardirect","winp1taskbardirectent","winp1taskbarent","winp2juntaskbar","winp2juntaskbarent","winp2","winp2ent","winp2fp","winp2fpent","winp2fptaskbar","winp2fptaskbarent","winp2fptaskbarhover","winp2fptaskbarhoverent","winp2widget","winp2widgetent"]);constse=newSet(["finance-app-win","weather-app-win","winpstoreapp"]),re=(newSet(["msedgdhp","msedgdhphdr","msedgntphdr","msedgntp","msedgdhp","entnewsntp"]),newSet(["hpmsn"]));newSet(["chromentpnews"]);functionae(){vare;returnc()?Z(document.head.dataset.clientSettings||(null===(e=document.getElementsByClassName("peregrine-widget-settings")[0])||void0===e?void0:e.getAttribute("data-client-settings"))):null}constce="feed/personalize/settings";functionde(e,t){constn=t.replace(/[[\]]/g,"\\$&"),o=newRegExp("[?&]"+n+"(=([^]*)|&|#|$)").exec(e);if(!o)returnnull;consti=o[2];returndecodeURIComponent(i.replace(/\+/g,""))||""}letle=newclass{constructor(){c()?(this.isDebugEnabled=(de(window.location.href,"debug")||"").toLowerCase()in{1:1,true:1}||"vp"===(de(window.location.href,"reqsrc")||"").toLowerCase(),this.isDebugEnabled&&!n.g.TEST_ENV&&(window.webpackRequire=n)):this.isDebugEnabled=!1}getLoggingService(){returnnull}isDebug(){returnthis.isDebugEnabled}setDebug(e){this.isDebugEnabled=e}setTs(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)}};classue{getsupported(){return!!this.store}constructor(e){this.store=e}getItem(e){if(this.supported)returnthis.store.getItem(e)}getObject(e,t){constn=this.getItem(e);if(null!=n){conste=Z(n);if(null!=e)returne}returnt}key(e){if(this.supported&&e>=0)returnthis.store.key(e)}keys(){returnthis.supported?Object.keys(this.store):[]}setObject(e,t){void0!==t?this.setItem(e,JSON.stringify(t)):this.removeItem(e)}removeObject(e){constt=this.removeItem(e);if(null!=t)returnZ(t)}setItem(e,t){letn=!(arguments.length>2&&void0!==arguments[2])||arguments[2];if(this.supported)try{if(!t)throw"Attemptedtostorenull/undefinedvalue:"+t;this.store.setItem(e,t)}catch(e){if(!n)throwe;le.logError(e)}elseif(!n)thrownewError("WebStorenotsupported")}getlength(){if(this.supported)returnthis.store.length}removeItem(e){if(this.supported){constt=this.getItem(e);returnthis.store.removeItem(e),t}}clear(){this.supported&&this.store.clear()}removeSubstringKeys(e){if(!this.supported||!e)return;constt=[];for(letn=0;n{conste=M(ye,!0),t=e&&Z(e),{login_hint:n}=t||{};returnn&&t})),Se=d((()=>!!M(ye)));constCe="__RequestDataInstance__";classAe{constructor(e,t){if(this.url=newURL(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.userent=e.userent,this.clientData=e.clientData,this.oneServiceHeaders=function(e){try{if(e)returnJSON.parse(e)}catch(e){}}(e.oneServiceHeaders)||{},this.isPssrMode=t,t){conste=Ie("OSATE",this.cookie),t=!!e&&"1"===e,n=Ie("OSAT",this.cookie);if(t&&n||!e&&!n)returnthis.msalAuthReady=!0,void(n&&(this.oneServiceHeaders.Authorization=`Bearer${n}`));this.msalAuthReady=!1,this.pssrRejectedReason=e&&!t?"interactiveLogin":e&&!n?"missOSAT":"missOSATE"}}staticgetInstance(){conste=a.get(Ce);returne||(n.g.TEST_ENV?_e({href:"httplocalhost:8080/",innerHeight:768,devicePixelRatio:1,canUseCssGrid:!1,requestId:"0",cookie:"",userent:"",referer:"",oneServiceHeaders:""}):_e({href:"httplocalhost:8080/",innerHeight:0,devicePixelRatio:0,canUseCssGrid:!1,requestId:"0",cookie:"",userent:"",referer:"",oneServiceHeaders:""}))}staticresetInstance(e){constt=newAe(e,arguments.length>1&&void0!==arguments[1]&&arguments[1]);returna.set(Ce,t),t}}functionIe(e,t){if(t&&e){constn=newRegExp("\\b"+e+"\\s*=\\s*([^;]*)","i").exec(t);returnn&&n.length>1?n[1]:null}returnnull}const_e=Ae.resetInstance,Ee=()=>Ae.getInstance();functionqe(){returnc()?window.location.search:Ee().url.search}functionOe(){try{returnlocalStore}catch(e){returnnull}}constxe="__PeExperimentInstance__";functionLe(e){a.set(xe,e)}functionTe(e){if(!a.has(xe)&&c()){vart;Le(Pe(document.head.dataset.info||(null===(t=window.document.getElementsByClassName("peregrine-widget-settings")[0])||void0===t||null===(t=t.dataset)||void0===t?void0:t.info)||""))}constn=a.get(xe);returnn&&n.has(e)}functionPe(e){constt=(e||"").replace(/(^f:|;.*$)/g,"").split(",");returnnewSet(t)}constNe="uxlogin",We="uxlogout",Me="uxedit",Re="useRedirect",De="uxswitch",Fe=d((()=>{conste=Oe();returne&&"1"===e.getItem(Ne)||c()&&location.search&&location.search.includes(`${Ne}=1`)}));constUe=d((()=>{conste=function(){try{returnsessionStore}catch(e){returnnull}}();returne&&!!e.getItem(We)}));const$e=d((()=>{conste=Oe();returne&&"1"===e.getItem(Me)}));constje=d((()=>{conste=Oe(),t=!Te("prg-noredirect")&&e&&"1"===e.getItem(Re)&&function(){conste=document.head.dataset.clientSettings||"",{browser:t}=Z(e)||{},{browserType:n=""}=t||{};return!!/safari/i.test(n)}();returnt}));constHe=d((()=>{conste=Oe();returne&&"1"===e.getItem(De)}));constBe=ae()||{},Je={newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,distribution:1,superApp:1,channeldesktop:1,channelmobile:1,edgeMobile:1},Ge={edgeChromium:1},Ve={winWidgets:1},Ke={edgeChromium:1,shopping:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,msn:1},Xe={edgeChromium:1,channeldesktop:1,channelmobile:1,cgHomePe:1,distribution:1,newsAndInterests:1,windowsNewsbar:1,windowsNewsPlus:1,winWidgets:1,windowsShell:1,windowsShellV2:1,superApp:1,edgeMobile:1},ze=d((()=>Be&&Be.apptype)),Qe=(d((()=>c()&&ze()inVe)),d((()=>c()&&!L()&&!(ze()inJe)&&!et()&&!tt()))),Ye=d((()=>Qe()&&!(ze()inGe)));d((()=>Qe()&&(!(ze()inGe)||!Se()))),d((()=>Qe()&&!it()&&!st()));constZe=d((()=>st()||it())),et=d((()=>!(ze()inKe)&&rt()&&function(){if("homePe"==ze()&&Te("prg-msn-id"))return!0;conste=newURLSearchParams(qe()).get("ocid")||(null==Be?void0:Be.ocid),t=null==e?void0:e.toLowerCase(),n=!re.has(t)&&"homePe"!==ze()&&!se.has(t);returnn}()&&!function(){conste="windows"==ze()&&"windowshp"==(Be&&Be.petype)&&(c()?window.location.href:Ee().url.href).includes(`${ce}`);returne}())),tt=()=>c()&&document&&document.body&&document.body.getElementsByClassName("peregrine-widgets").length>0;d((()=>ze()inXe||et()));functionnt(){conste=me;if(e)returnle.log("dual-auth:tryGet1SAuthTokenreturnedlivetokens"),e;constt=fe();if(t)returnle.log(`dual-auth:tryGet1SAuthTokenreturnedcachedtokensthatare${be()}`),t;le.log("dual-auth:tryGet1SAuthTokenreturnedemptytokens")}functionot(e){constt={};returne&&(t[ee]=`Bearer${e}`),t}functionit(){returnYe()&&Fe()||function(){conste=Ye()&&!at()&&!Fe()&&ke()&&("expired"==be()||$e());returne}()||Ue()||je()}functionst(){returnYe()&&!ke()&&He()}constrt=d((()=>{const{browser:e}=Be,{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)}));d((()=>Ye()&&!et()));constat=()=>{conste=ke();if(!e)return!1;lett;switch(e.account_type){case"MSA":t=Ye()?"ace":"aace";break;case"AAD":t=Ye()?"WID":"APP_WID";break;default:return!1}return!!M(t)};constct="__core_auth_authHeaderPromiseParts__",dt=()=>a.get(ct);varlt;!function(){lete;constt={promise:newPromise((t=>e=t)),resolver:e};a.set(ct,t)}(),function(e){e.GLOBAL="GLOBAL",e.GCC_MODERATE="GCC_MODERATE"}(lt||(lt={}));letut;functionpt(){returnut}constht=d((()=>Z(M("AL_STATE",!0))));constgt=()=>{conste=M("elt",!0),t=e&&Z(e),{access_token:n,account_type:o,login_hint:i,region_scope:s}=t||{};return(n||o||i||s)&&t};functionwt(e){if("undefined"==typeofwindow||!window.document||window.isRenderServiceEnv)return;constt=window.trustedTypes;if(!t||!t.createPolicy)return;constn=window.trustedTypePolicies||(window.trustedTypePolicies={});if(n[e])returnn[e];consto=t.createPolicy(e,{createScriptURL:e=>{constt=function(e){constt=["ntp.msn.com","ntp.msn.cn","assets.msn.cn","assets.msn.com","","assets2.msn.com","assets2.msn.cn","","int.msn.com","r.bing.com","business.bing.com","staticview.msn.com","staticview.msn.cn","edge.microsoft.com","edge-sting.microsoft.com",document.location.hostname];letn;try{n=newURL(e,location.origin)}catch(e){return"about:blank#error"}if(n.hostname&&!t.includes(n.hostname))return"about:blank#error";returne}(e);returnt}});returnn[e]=o,o}classmt{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||ae(),this.authCookieName=pt()||window._authCookieName||"",this.bundle=window._webWorkerBundle||"",t=t||{};constn=this.buildWebWorkerUrl(this.clientSettings,t),o=this.clientSettings.apptype;leti;if(o&&"edgeChromium"===o){if(i=this.tryGetWebWorkerUsingPolicy(n,"webWorkerUrlPolicy"),!i)returnvoidconsole.warn("Errorincreatingtrustedtypescompliantwebworker")}elsei=window.webWorker=newWorker(n,{name:"web-worker"});consts=window.webWorkerMesses=[];i.onmesse=e=>{s.push(e.data)};constr=window.webWorkerErrors=[];if(i.onerror=e=>{r.push(e)},window.chrome){conste=this.getAudienceMode(this.clientSettings),t=window.webWorker&&window.chrome&&window.chrome.ntpSettingsPrivate;t&&"function"==typeoft.getPref&&(t.getPref("ntp.news_feed_MSN 香港 | 首頁display",(e=>{e&&e.value&&i.postMesse({id:"FeedDisplaySetting",type:this.command,payload:e.value})})),t.getPref("ntp.layout_mode",(e=>{e&&e.value&&i.postMesse({id:"LayoutModeSetting",type:this.command,payload:e.value})})),t.getPref("new_device_fre.has_user_seen_new_fre",(e=>{e&&i.postMesse({id:"NewUserFre",type:this.command,payload:e.value})}))),t&&"function"==typeoft.getConfigData&&t.getConfigData((e=>{constt=(null==e?void0:e.enabledFeatures)||[];t.includes("msReducedNtpAdsForNewDevice_ste1")&&i.postMesse({id:"EdgeNoAds",type:this.command,payload:!0}),t.includes("msReducedNtpAdsForNewDevice_ste2")&&i.postMesse({id:"EdgeReduceAds",type:this.command,payload:!0})})),"enterprise"===e&&this.clientSettings.browser&&"edgeChromium"===this.clientSettings.browser.browserType&&parseInt(this.clientSettings.browser.version)>=87?this.getEnterpriseAccessToken().then((e=>{e&&i.postMesse({id:"AuthTokenEnterprise",type:this.command,payload:ot(e)})})):i.postMesse({id:"AuthTokenEnterprise",type:this.command,payload:{}}),"adult"!==e&&"enterprise"!==e||this.sendPeConfiguration()}Ze()&&dt().promise.then((e=>i.postMesse({id:"AuthHeaders",type:this.command,payload:e||{}})))}buildWebWorkerUrl(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void0;return(this.bundle||"")+"#"+this.qsFromDocument()+this.qsFromCookies()+this.qsFromDataAttribute(e||this.clientSettings)+this.qsMisc(t)+this.qsAuth(e||this.clientSettings)+this.qsFromUrl()+this.qsFromServiceWorker()+this.qsSelectedPivot()+this.qsXboxXToken()}qs(e,t,n){returne?t+"="+(n||e)+"&":""}qsFromDocument(){vare;returnthis.qs(document.getElementsByTName("html")[0].getAttribute("lang"),"lang")+this.qs(encodeURIComponent(window.location.href),"adsReferer")+this.qs(null===(e=c()?window.devicePixelRatio:Ee().devicePixelRatio)||void0===e?void0:e.toString(),"devicePixelRatio")}qsFromServiceWorker(){if(!nigator.serviceWorker||!nigator.serviceWorker.controller)return"";conste=nigator.serviceWorker.controller;if("activated"!==e.state||!e.scriptURL)return"";if(e.scriptURL){constt=newURL(e.scriptURL).searchParams.toString();returnt?"&"+t+"&":""}return""}qsFromCookies(){returnthis.qs(D(this.authCookieName),"aace","1")+this.qs(D("muid"),"muid")+this.qs(D(this.childCookieName),"child")+this.qs(D("cbypass"),"cbypass")+this.qs(this.cookieBannerConsentRequired().toString(),"ccRequired")+this.qs(D("ecasession"),"ecasession")+this.qs(D("TOptOut"),"browserOptOut")}qsFromDataAttributeHelper(e,t,n){returne&&e.featureFls&&e.featureFls.wpoEnabled&&t&&!t.includes("remwpofltww")&&(t=this.appendWpoFlightsToInfo(e,t)),this.qs(e.pcsInfo&&e.pcsInfo.env||e.env,"env")+this.qs(e.aid,"aid")+this.qs(e.apptype,"apptype")+this.qs(e.petype,"petype")+this.qs(e.audienceMode,"audienceMode")+this.qs(e.configIndexDocId,"configIndexDocId")+this.qs(e.deviceFormFactor,"deviceFormFactor")+this.qs(e.domain,"domain")+this.qs(e.configRootUrl,"configRootUrl")+this.qs(this.getHighestCbid(e.cbid,e.apptype),"cbid")+this.qs(e.ocid,"ocid")+this.qs(e.os,"os")+this.qs(JSON.stringify(e.locale),"locale")+this.qs(e.geo_lat,"lat")+this.qs(e.geo_long,"long")+this.qs(JSON.stringify(e.featureFls),"featureFls")+this.qs(JSON.stringify(e.browser),"browser")+this.qs(JSON.stringify(e.servicesEndpoints),"servicesEndpoints")+this.qs(e.bundleInfo&&e.bundleInfo.v||"","buildVersion")+this.qs(t,"dataInfo")+this.qs(n,"canvasInfo")}qsSelectedPivot(){conste="selectedPivot";lett;try{constn=Oe();n&&(t=n.getItem(e))}catch(e){console.warn("Errorgettingpivotidfromlocalstore."+e)}returnthis.qs(t,e)}qsXboxXToken(){conste="xboxXTokenId";lett;try{constn=Oe();n&&(t=n.getItem(e))}catch(e){console.warn("ErrorgettingxboxXTokenfromlocalstore."+e)}returnthis.qs(t,e)}appendWpoFlightsToInfo(e,t){constn=this.getWpoFlightsFromLocalStore(e);if(n&&n.length){conste=";",o=t.split(e);for(lete=0;ee.id))}}catch(e){console.warn(`Errorgettingwpoflightsfromlsfor${o}Error:${e}`)}returnnull}getHighestCbid(e,t){try{constn=Oe(),o=parseInt(e),i=parseInt(JSON.parse(n.getItem(`cbid_${t||""}`)));lets;if(o&&!isNaN(o)&&i&&!isNaN(i)&&(s=o>i?o:i),s=s||o||i,s)returnwindow._cbid=s.toString()}catch(e){console.warn("ErrorgettinghighestCBID"+e)}}getAudienceMode(e){Oe();constt=M(this.authCookieName),n=M(this.childCookieName),{child:o}=t&&JSON.parse(t)||{};returnt&&(1===o||n)?"kids":e.audienceMode||"adult"}sendPeConfiguration(){conste=this.clientSettings.petype;if(e){constt=M&&M("pglt-edgeChromium-"+e);if(t)returnvoidwindow.webWorker.postMesse({id:"PeConfiguration",type:this.command,payload:t})}window.webWorker.postMesse({id:"PeConfiguration",type:this.command,payload:!1})}qsFromDataAttribute(e){lett,n,o;consti=Oe();if(i){consto=JSON.parse(i.getItem("shd_"+e.petype)||null);o&&o.clientSettings&&o.info&&(t={...o.clientSettings,bundleInfo:e.bundleInfo},n=o.info)}return(!t||!n||e.peGenTime>=t.peGenTime)&&(t=e,n=this.domInfo,o=this.canvasInfo),t.audienceMode=this.getAudienceMode(t),this.qsFromDataAttributeHelper(t,n,o)}qsFromUrl(){conste=location.search;returne&&e.length?e.substring(1,e.length):""}getEnterpriseAccessToken(){returnnewPromise((e=>{window.chrome&&window.chrome.authPrivate?window.chrome.authPrivate.getPrimaryAccountInfo((t=>{t&&"GCC_MODERATE"!==t.region_scope||e("");constn={account_id:t.account_id,account_type:t.account_type,client_id:"d7b530a4-7680-4c23-a8bf-c52c121d2e87",scope_or_resource:"enterprisenews.microsoft.com"};window.chrome.authPrivate.acquireAccessTokenSilently(n,(t=>{t.is_success?e(t.access_token):e("")}))})):e("")}))}qsMisc(e){returnthis.qs(performance.timeOrigin&&performance.timeOrigin.toString(),"mainTimeOrigin")+this.qs(e.disableWWConfig&&"1","disableWWConfig")}qsAuth(e){lett=this.qs(Ye()&&"1","disableWWAuth");if(!Ze()){conste=Ye()&&nt()||{};t+=this.qs(encodeURIComponent(JSON.stringify(ot(e.accessToken))),"authHeaders")}returnt+=this.qs(function(e){constt=e||pt()||"al_app_anon",n=ht();return!(!n||!(["anon","al_anon"].includes(t)&&n.AL_ANON||["app_anon","al_app_anon"].includes(t)&&n.AL_APP_ANON))}()&&"1","isAccountLinked"),t+=this.qs(this.shouldFetchAppAnonCookie()&&"1","fetchAppAnonCookie"),t}cookieBannerConsentRequired(){conste=null!=document.getElementById("consent-banner-container")&&null===M("MSCC"),t=null!=document.getElementById("onetrust-sdk")&&null===M("eupubconsent-v2");returne||t}shouldFetchAppAnonCookie(){if(!rt())return!0;return"MSA"MSN 香港 | 首頁===(()=>{conste=gt();if(e){if("MSA"===e.account_type)return"MSA";if("AAD"===e.account_type)return"AAD"}})()||R("lt")?!R("aace"):void0}tryGetWebWorkerUsingPolicy(e,t){constn=wt(t);if(n){constt=n.createScriptURL(e),o=t&&t.toString();if(!o||"about:blank#error"===o)return;window.webWorker=newWorker(t,{name:"web-worker"})}elsewindow.webWorker=newWorker(e,{name:"web-worker"});returnwindow.webWorker}}functionft(e){returnnewPromise((t=>setTimeout(t,e)))}varbt,vt;!function(e){e.Anon="ANON",e.AppAnon="APP_ANON",e.Unknown=""}(bt||(bt={})),function(e){e.AnonCookieExists="ace",e.AppAnonCookieExists="aace"}(vt||(vt={}));constyt="child";functionkt(e,t){if(e){constn=newRegExp("\\b"+t+"\\s*=\\s*([^;]*)","i").exec(e);returnn&&n.length>1?n[1]:null}returnnull}constSt="prg-pr2-",Ct="prg-pr2-only",At="prg-pw-",It="prg-",_t="prg-1sw-";functionEt(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:It;constn=t.length,o=[];returne&&e.length&&(e.forEach((e=>{consti=e&&e.trim();i&&i.length>=n&&i.substring(0,n).toLowerCase()===t&&o.push(i.toLowerCase())})),o.sort()),o}constqt="allfltstocrs",Ot="canvasfltstocrs";functionxt(e){vart;returndocument.head.dataset[e]||(null===(t=Tt())||void0===t?void0:t.dataset[e])}letLt;functionTt(){returnvoid0===Lt&&(Lt=document.getElementsByClassName("peregrine-widget-settings")[0]||null),Lt}functionPt(e){vart;if(!e||!e.startsWith("f:"))return;constn=(e.match(/f:\s*([^;]+)/i)||[])[1];returnn?null===(t=n.toLowerCase().split(","))||void0===t?void0:t.sort():[]}!function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};constt={};try{varn,o,i;if(!c())returnt;consts=Z(xt("clientSettings"))||{};letr=null===(n=s.apptype)||void0===n?void0:n.toLocaleLowerCase();consta=e.crsOptions||{};"winwidgets"!==r&&"homepe"!==r&&"trel"!==r||(a.crsPrefetch=!0),null!==(o=s.widgetAttributes)&&void0!==o&&null!==(o=o.clientPerf)&&void0!==o&&o.earlyCRSCall&&(a.crsPrefetch=!0),"edgechromium"===r&&(r="edgechr");constd=!(null===(i=s.widgetAttributes)||void0===i||null===(i=i.clientPerf)||void0===i||!i.shouldUsePWOnlyFlights),{all:l,prg:u}=function(){lete=arguments.length>0&&void0!==arguments[0]&&arguments[0],t=arguments.length>1&&void0!==arguments[1]?arguments[1]:"";constn=Pt(xt("info"))||[];leto=Pt(xt("canvasInfo"));if(!o){consti=function(e){lett=arguments.length>2&&void0!==arguments[2]?arguments[2]:"",n=It;returnarguments.length>1&&void0!==arguments[1]&&arguments[1]?n=At:t.toLocaleLowerCase()==="windowsShell".toLocaleLowerCase()||t.toLocaleLowerCase()==="windowsShellV2".toLocaleLowerCase()?n=_t:e&&e.includes(Ct)&&t.toLocaleLowerCase()==="winWidgets".toLocaleLowerCase()&&(n=St),n}(n,e,t);o=Et(n,i)}return{all:n,prg:o}}(d,r),p=function(e){if(null!=e&&e.includes(qt))return`appFlight=${qt}`;if(null!=e&&e.includes(Ot))return`appFlight=${Ot}`}(l);(a.crsPrefetch||l.includes("inlinecrscall")||l.includes(`icrscall-${r}`))&&(!function(e,t,n,o){consti=function(e,t){letn;consto=decodeURIComponent(kt(e,"aace")),{child:i}=o&&Z(o)||{},s=kt(e,yt);returnn=o&&(1===i||s)?"kids":t.audienceMode||"adult",n}(document.cookie,e),{apptype:s,browser:r,domain:a,bundleInfo:{v:d}={},deviceFormFactor:l,locale:{content:u,display:p}={},ocid:h,os:g,petype:w,servicesEndpoints:{crs:m}={}}=e,f=(Tt()?c()?window.location.hostname:Ee().url.hostname:a)||"";if(!s||!d||!m)return;constb={audienceMode:i,browser:r,deviceFormFactor:l,domain:f,locale:{content:u,display:p},ocid:h,os:g,platform:"web",peType:w,peExperiments:t},v=newURLSearchParams([["expType","AppConfig"],["expInstance","default"],["apptype",s],["v",d]]),y=qe(),k=y.includes("?item=")||y.includes("&item=")?"&citem=dev:true&instance=Int1":"",S=o?`&${o}`:"",C=`${m.path}${m.v}/config/?${v}&targetScope=${JSON.stringify(b)}${k}${S}`,A=e=>{constt=newURL(`${e}${C}`),{timeout:o=5e3}=n;leti;if(window.crsRequestData={url:t.toString()},o>=0){conste=newAbortController;setTimeout((()=>e.abort()),o),i=e.signal}returnfetch(t,{signal:i})},I="msn."+(function(e,t){return!!(e.hostname.toLowerCase().endsWith(".cn")||t.isChinaCompliance||t.useCnDomain||e.search.match(/item=revip:cn/))}(location,e)?"cn":"com"),{domain:_}=m,E=_&&newURL(_).host;letq=A(E||`assets.${I}`);n.disableFallback||(q=q.catch((()=>{const{hostname:e}=location,t=e.match(/\.msn\.(com|cn)$/)?e:`${I}`;returnA(t)})));window.crsPromise=q}(s,u,a,p),t.inlineCRS=!0)}catch(e){console.error("InlineHeadCommon:"+e)}}();constNt=document.head.attributes["data-info"].value;letWt;if(Nt){conste=Nt.split(";").find((e=>e.startsWith("f:")));e&&(Wt=e.substring(2),Wt.indexOf("1sw-pcsreturnhp")>-1&&$("PCSreturned.ExecutinginlineJS.",8e4,{customMesse:location.href},F.Deprecated))}functionMt(e){vart;return((null===(t=document.head)||void0===t||null===(t=t.getAttribute("data-info"))||void0===t?void0:t.split(";").find((e=>e.startsWith("f:"))))||"").includes(e)}Mt("hp-noww")||(newmt).init(),window.onerror=J,void0!==window.onunhandledrejection&&(window.onunhandledrejection=G),window.onErrorHandler=B,function(){conste=["vendors","microsoft","common"];window.addEventListener("load",(()=>{window._peTimings.nType=Q(),window.requestIdleCallback((()=>{constt=function(e){constt=window.homePeWebpackChunks;if(!t)return[...e,V];if(t.length>e.length)return[];t.forEach((t=>e.splice(e.indexOf(t[0][0]),1))),t.push===Array.proMSN 香港 | 首頁totype.push&&e.push(V);returne}(e);t.length&&t.forEach((e=>z(e)))}))}),{once:!0})}(),(Mt("prg-sdkpreload")||Mt("prg-renderoptimize")||Mt("prg-use-waterfall"))&&asyncfunction(e){window.apnt=window.apnt||{anq:[]},window.apnt.anq=window.apnt.anq||[],awaitasyncfunction(e){if(!c())return;const{src:t,id:n,async:o=!0,container:i=document.head,retryNumber:s=0,retryDelayMs:r=0}=e;try{awaitasyncfunction(e){lett=arguments.length>1&&void0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void0!==arguments[2]?arguments[2]:100;if(t3&&void0!==arguments[3])||arguments[3];returnnewPromise(((i,s)=>{constr=function(){lete=arguments.length>0&&void0!==arguments[0]?arguments[0]:void0,t=arguments.length>1&&void0!==arguments[1]?arguments[1]:void0,n=!(arguments.length>2&&void0!==arguments[2])||arguments[2],o=arguments.length>3&&void0!==arguments[3]?arguments[3]:"anonymous",i=arguments.length>4?arguments[4]:void0,s=arguments.length>5?arguments[5]:void0;if(!c())thrownewError("createScriptTisunsupportedserverside.ThiscallshouldbewrappedincanUseDOM().");constr=document.createElement("script");returnt&&(r.id=t),i&&r.setAttribute("class",i),s&&(r.onload=s),r.type="text/jascript",e&&(window&&window.trustedTypesURLValidation?r.src=window.trustedTypesURLValidation(e,"scriptSrcUrlPolicy"):r.src=e,r.async=n,r.crossOrigin=o),window&&window.NONCE_ID&&(r.nonce=window.NONCE_ID),r}(e,t,o,void0,void0,(()=>i(!0)));r.crossOrigin=void0,r.onerror=s,n.prepend(r)}))}(t,n,i,o)),s,r)}catch(e){$("FailedtodownloadStaticJS",,{scriptId:n,scriptSrc:t},F.Alert)}}({id:"display-sdk",src:e?"adsdk.microsoft.com/ast/ast.js":"acdn.adnxs.com/ast/ast.js",container:document.head,retryDelayMs:200,retryNumber:5})}()}(); if(matchMedia("(prefers-color-scheme:dark)").matches){consts=document.createElement("style");document.head.appendChild(s);s.type="text/css";s.appendChild(document.createTextNode("body{background:#}"));}const_clientSettings=JSON.parse(document.head.dataset.clientSettings);functionpreloadConfigIDB(){consto=window.indexedDB;if(!o)return;conste="Configurations_12",n="IndexedDB-"+e+".",r=window._appTimings||(window._appTimings={});r[n+"open-Start"]=performance.now(),window._idbConfigLookup={};consti=window._idbConfigLookup;lett,s;window._idbConfigReadPromise=newPromise((o,e)=>{t=o,s=e}),window._idbConfigOpenPromise=(()=>{try{constd=o.open("wwConfigs",1);returnnewPromise((o,c)=>{d.onerror=(()=>{c(newError("ConfigIDBpreloadopenfailure:"+d.error))}),d.onsuccess=(()=>{r[n+"open-End"]=performance.now();constc=d.result;o(c),r[n+"getAllObjects-Start"]=performance.now();consta=c.transaction(e,"readonly").objectStore(e).openCursor();a.onsuccess=function(){consto=this.result;o?(i[o.key]=o.value,o.continue()):(r[n+"getAllObjects-End"]=performance.now(),t())},a.onerror=(()=>{s(newError("ConfigIDBpreloadreadfailure"))})}),d.onupgradeneeded=(()=>{d.result.createObjectStore(e)})})}catch(o){returnPromise.reject(newError("ConfigIDBpreloadopenfailure:"+o))}})()}preloadConfigIDB();functionappendProtocolQSP(url){returnurl;}functionappendScript(url,async,defer){lets=document.createElement("script");s.type="text/jascript";constakmurl=appendProtocolQSP(url);constw=window.trustedTypesURLValidation;s.src=w?w(akmurl,"bundleUrlPolicy"):akmurl;if(async){s.async=true;}if(defer){s.defer=true;}s.onerror=()=>onErrorHandler(s.src);s.nonce="";s.crossOrigin="anonymous";document.body.appendChild(s);}