gin-inline: auto 0;
    display: flex;
    column-gap: 10px;
}

fluent-flipper::before {
    border: unset;
    background: transparent;
    border-radius: 3px;
}

fluent-flipper {
    width: 20px;
    height: 26px;
    border-radius: 3px;
}

fluent-flipper:hover {
    background-color: ${V.QpD};
}

:host([card-size="_4x_2y"]) .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 812px;
}


:host([card-size="_3x_2y"]) .tabbed-feed-title fluent-horizontal-scroll  {
    max-width: 532px;
}

:host([card-size="_2x_2y"]) msn-location-picker[show-simple-add="true"]::part(btn-text),
:host([card-size="_1x_2y"]) msn-location-picker[show-simple-add="true"]::part(btn-text),
:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .action-container .heading {
    display: none;
}

:host([card-size="_2x_2y"]) msn-location-picker[show-simple-add="true"]::part(edit-btn),
:host([card-size="_1x_2y"]) msn-location-picker[show-simple-add="true"]::part(edit-btn) {
    min-width: 20px;
    margin-top: 7px;
    height: 20px;
    min-height: 20px;
    padding-inline: 0;
}

:host msn-location-picker[show-simple-add="true"]::part(edit-btn) {
    padding-inline: 10px;
    border-radius: 100px;
    border: 1px solid ${V.akT};
    min-height: 24px;
    height: 24px;
    margin-top: 4px;
}

:host([card-size="_2x_2y"]) .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 302px;
}

:host([card-size="_1x_2y"]) .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 97px;
}

:host .tabs-feed-card[background="none"] {
    background: transparent;
    box-shadow: none;
    padding-inline: 0px;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .tabbed-feed-title {
    column-gap: 7px;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .action-container {
    display: flex;
    column-gap: 4px;
}

:host .tabs-feed-card[background="none"] .heading-container {
    margin-top: auto;
    margin-bottom: auto;
    margin-inline: 2px 0px;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .heading-container a {
    font-size: 16px;
}

:host .tabs-feed-card[background="none"] .action-container a {
    font-size: ${V.cSu};
    line-height: ${V.RUt};
    padding-top: 8px;
    color: ${V.CHi};
    text-decoration: none;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .tabbed-feed-title {
    column-gap: 9px;
}

:host .tabs-feed-card[background="none"] .action-container a:hover, 
:host .tabs-feed-card[background="none"] .action-container a:focus-visible {
    text-decoration: underline;
}

:host .tabs-feed-card[background="none"] .load-error, 
:host .tabs-feed-card[background="none"] .loading {
    position: relative;
    max-width: 600px;
}

:host .tabs-feed-card[background="none"] .content {
    height: 251px;
}

:host .tabs-feed-card[background="none"] .heading-container a {
    font-weight: 600;
    font-size: ${V.mWK};
    line-height: ${V.I7_};
}

:host .tabs-feed-card[background="none"] fluent-button,
:host .tabbed-feed-title fluent-horizontal-scroll {
    border-radius: 20px;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button {
    background: transparent;
    color: ${V.Q5n};
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button span::after {
    display: flex;
    content: attr(title);
    font-weight: bold;
    color: transparent;
    height: 0px;
    margin-bottom: -1px;
    visibility: hidden;
    overflow: hidden;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="true"] {
    font-weight: 550;
    color: ${V.CHi};
    cursor: default;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button::part(content) {
    border-bottom: 2px solid transparent;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button::part(control) {
    box-shadow: none;
    border: none;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="false"]:hover::part(content),
:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="false"]:focus::part(content) {
    border-bottom-color: ${V.XiB};
}

:host .tabbed-feed-title fluent-horizontal-scroll:focus {
    border: calc(var(--stroke-width) * 1px) solid var(--focus-stroke-outer);
    box-shadow: 0 0 0 calc((var(--focus-stroke-width) - var(--stroke-width)) * 1px) var(--focus-stroke-outer);
}

:host .tabbed-feed-title fluent-horizontal-scroll::part(content-container) {
    padding-inline-end: 2px;
}

:host .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 1124px;
    margin-inline: 5px;
}
`.withBehaviors((0,W.Uu)(z.i`
            :host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="true"] {
                font-weight: 700;
            }

            :host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button {
                color: ${V.CHi};
            }
        `));z.i`
:host {
    --tap-on-rest: #767676;
}

:host([card-size="_1x_2y"]) fluent-tabs{
    display: block;
}

:host([card-size="_1x_2y"]) ::part(tablist){
    padding-top: 12px;
    padding-inline-end: 0px;
}

:host ::part(tablist){
    padding-inline-end: 36px;
    margin-inline: auto;
    column-gap: 16px;
}

:host fluent-tab[aria-selected="true"]{
    font-weight: 550;
    color: ${V.CHi};
    pointer-events: none;
}

:host fluent-tab[aria-selected="false"]:hover {
    border-bottom-color: var(--tap-on-rest);
}

:host ::part(activeIndicator) {
    display:none;
}

:host fluent-tab {
    height: auto;
    color: var(--tap-on-rest);
    font-weight: 550;
    font-size: ${V.sNp};
    line-height: ${V.vgC};
    padding-inline: unset;
}

:host fluent-tab-panel {
    height: 251px;
    padding: 0px;
}

:host .heading-container a {
    font-weight: 550;
    text-decoration: none;
    color: var(--foreground-on-accent-active); 
    font-size: ${V.cSu};
    line-height: ${V.RUt};
}

:host .tabs-feed-card{
    padding: 8px 16px 16px 16px;
    border-radius: 6px;
    --gradient-background: var(--background-gradient-angle), #FEFAD7 1.14%, #E6DBF8 85.67%;
    background: linear-gradient(var(--gradient-background));
}

.load-error, .loading {
    align-items: center;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

:host .heading-container a:hover, 
:host .heading-container a:focus-visible {
    text-decoration: underline;
}

:host ::part(msft-stripe) {
    margin: 0;
}

:host ::part(img) {
    border-radius: 0px;
}

:host ::part(heading) {
    font-size: ${V.PwC};
}

:host ::part(fluent-card) {
    background-color: var(--neutral-layer-card);
}
`.withBehaviors(new q.O(J,Z),(0,W.vF)(z.i`
                :host {
                    forced-color-adjust: auto;
                }
            `),(0,W.Uu)(z.i`
                :host .tabs-feed-card {
                    --background-gradient-angle-dark-mode: 134.62deg;
                    --gradient-background-dark-mode: var(--background-gradient-angle-dark-mode), #512C2C 1.14%, #252C4E 86.08%;
                    background: linear-gradient(var(--gradient-background-dark-mode));
                }

                :host .heading-container a {
                    color: var(--neutral-foreground-rest);
                }

                :host fluent-tab {
                    color: #BABABA;
                }
            `));var Y=i(65135),X=i(9610),K=i(52965),ee=i(10209);class te extends X.l{constructor(){super(...arguments),this.LocalNewsCardType="LocalNewsFeed",this.shadowDomPopulated=()=>(0,C.mG)(this,void 0,void 0,(function*(){if(this.config.enableMultiLocations){let e;this.locationPicker=this.shadowRoot.querySelector("msn-location-picker");try{this.tabsData.length>0&&this.tabsData[0].title&&this.locationPicker.setCurrentLocation(this.tabsData[0].title),e=yield this.locationPicker.getAllLocations(),this.mapLocationsTabbedFeedData(e)}catch(e){Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.WKi),{message:"Failed to fetch locations.",pb:Object.assign(Object.assign({},L.WKi.pb),{customMessage:e&&e.message})}))}this.activeId=this.tabsData[0].tabId,this.currentTabdata=this.tabsData[0],this.renderCoachMark()}})),this.mapLocationsTabbedFeedData=e=>{const t=e.map((({locality:e,region:t,country:i,displayName:n,isoCode:o,latitude:a,longitude:r})=>{const s={canonicalName:this.config.canonicalName,id:this.config.feedId,feedName:""};s.feedName=e,s.location={city:e,country:i,countryCode:o,state:t};return{latitude:a,longitude:r,feed:s,id:k.id,type:k.type,title:n}}));if(t&&t[0]&&(!t[0].feed||!t[0].feed.id)&&(!t[0].subCards||t[0].subCards.length<1)){const e=t[0].type;t.shift(),Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.Oat),{message:"There is no item to display on the first tab.",pb:Object.assign(Object.assign({},L.Oat.pb),{customMessage:"Tab:"+e})}))}this.syncTabsDataWithLocationtab(t)},this.syncTabsDataWithLocationtab=e=>{let t=0;if(this.tabsData=this.tabsData.filter(((i,n)=>n<this.fixedTabsLenght||(e[t]&&i.latitude==e[t].latitude&&i.longitude==e[t].longitude?(t++,!0):(this.activeTabIndex==n&&(this.loadTabData(this.tabsData[0]),this.horizontalScroll.scrollToPosition(0)),!1)))),t<e.length){const i=e.slice(t).map((({feed:e,id:t,type:i,subCards:n,latitude:o,longitude:a,title:r})=>{n&&(n=this.verifySubcards(n,i));let s=!0;const d=e.feedName&&e.feedName.toLowerCase().replace(" ","")+"-tab",l=e.feedName&&e.feedName.toLowerCase().replace(" ","")+"-panel";s=!!n;return{hasLoaded:s,feed:e,id:t,type:i,subCards:n,tabId:d,tabPanelId:l,latitude:o,longitude:a,title:r}}));this.tabsData.push(...R(i,this.parentTelemetry))}},this.mapTabbedFeedData=()=>{const e=this.tabbedFeedCardMetadata.subCards;if(e&&e[0]&&(!e[0].feed||!e[0].feed.id)&&(!e[0].subCards||e[0].subCards.length<1)){const t=e[0].type;e.shift(),Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.Oat),{message:"There is no item to display on the first tab.",pb:Object.assign(Object.assign({},L.Oat.pb),{customMessage:"Tab:"+t})}))}this.tabsData=e.map((({feed:e,id:t,type:i,subCards:n,latitude:o,longitude:a})=>{if(null==e||e&&!e.feedName){if(S.J[i]!=$.U.topStoriesCard)throw new Error("Card type is not supported: "+i);e={feedName:this.strings.topStoriesTabName}}n&&(n=this.verifySubcards(n,i));let r=!0;const s=e.feedName&&e.feedName.toLowerCase().replace(" ","")+"-tab",d=e.feedName&&e.feedName.toLowerCase().replace(" ","")+"-panel";return r=!!n,{hasLoaded:r,feed:e,id:t,type:i,subCards:n,tabId:s,tabPanelId:d,latitude:o,longitude:a,title:i==this.LocalNewsCardType&&e.location?`${e.location.city}, ${e.location.state}`:e.feedName}})),this.tabsData&&this.tabsData[0]&&!this.tabsData[0].subCards&&this.loadTabData(this.tabsData[0],!0),this.fixedTabsLenght=this.tabsData.length}}getExperienceType(){return b.x.tabbedFeedWC}experienceConnected(){return(0,C.mG)(this,void 0,void 0,(function*(){if(this.config.childExperienceReferencesWC&&this.config.childExperienceReferencesWC.selectCarousel&&(yield(0,ee.Fg)(this.config.childExperienceReferencesWC.selectCarousel)),this.feedCardProvider=new G,this.tabbedFeedCardMetadata.type==this.LocalNewsCardType){const e={subCards:[this.tabbedFeedCardMetadata]};this.tabbedFeedCardMetadata=e}if(!this.tabbedFeedCardMetadata||!this.tabbedFeedCardMetadata.subCards||this.tabbedFeedCardMetadata.subCards.length<1)Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.WJE),{message:"Full page API returned a blank card.",pb:Object.assign({},L.WJE.pb)}));else{try{this.mapTabbedFeedData(),this.activeId=this.tabsData[0].tabId}catch(e){Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.mBS),{message:"Unhandled exception mapping tab data.",pb:Object.assign(Object.assign({},L.mBS.pb),{customMessage:e&&e.message})}))}this.tabbedFeedSectionTelemetry=(e=>{if(!e)return;const t=e.contract,i=null==t?void 0:t.ext,n=e.addOrUpdateChild({name:O}),o=n.addOrUpdateChild({name:P,action:T.Aw.Click,behavior:T.wu.Navigate,content:{vertical:A,headline:I},ext:i}),a=n.addOrUpdateChild({name:F,action:T.Aw.Click,behavior:T.wu.Navigate,content:{vertical:A,headline:I},ext:i}),r=n.addOrUpdateChild({name:M,action:T.Aw.Click,behavior:T.wu.Navigate,content:{vertical:A,headline:I},ext:i}),s=n.addOrUpdateChild({name:E,action:T.Aw.Click,behavior:T.wu.Navigate,content:{vertical:A,headline:I},ext:i}),d=n.addOrUpdateChild({name:D,action:T.Aw.Click,behavior:T.wu.Navigate,content:{vertical:A,headline:I},ext:i}),l=n.addOrUpdateChild({name:H,action:T.Aw.Click,behavior:T.wu.Navigate,content:{vertical:A,headline:I},ext:i});return{componentRoot:e,tabbedFeedCard:n,headingClick:o,tabsFlipperNext:a,tabsFlipperPrevious:r,seeMoreClick:s,moreAction:d,addLocation:l}})(this.parentTelemetry),this.tabsData=R(this.tabsData,this.parentTelemetry)}this.headingText=this.strings.tabbedFeedHeadingTitle,this.config.headingLink&&(this.headingLink=(0,N.w_)((0,j.h_)(this.config.headingLink))),this.config.enableMultiLocations&&(this.locationEditorConfig={localizedStrings:{cancelBtn:this.config.localizedStrings.cancelBtn,closeBtnTooltip:this.config.localizedStrings.closeBtnTooltip,editLocationLbl:this.config.localizedStrings.editLocationLbl,saveBtn:this.config.localizedStrings.saveBtn,searchPlaceholder:this.config.localizedStrings.searchPlaceholder,unavailableSuggestions:this.config.localizedStrings.unavailableSuggestions,duplicatedMessage:this.config.localizedStrings.duplicatedMessage,addBtn:this.config.localizedStrings.addBtn,removeBtn:this.config.localizedStrings.removeBtn},dismissMenuCallback:e=>this.mapLocationsTabbedFeedData(e)},this.headingText=this.strings.tabbedLocalNewsHeadingTitle,this.tabsData&&this.tabsData.length>0&&(this.currentTabdata=this.tabsData[0],this.tabsData[0].isActive=!0,this.activeTabIndex=0),this.renderCoachMark(),this.$fastController.addStyles(Q))}))}scrollToPrevious(){this.horizontalScroll.scrollToPrevious()}scrollToNext(){this.horizontalScroll.scrollToNext()}verifySubcards(e,t){return e&&0!=e.length?(e.length>this.config.numberOfTermsToDisplay?(Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.STX),{message:"There are too many items to display on the tab.",pb:Object.assign(Object.assign({},L.STX.pb),{customMessage:"Tab:"+t+", length: "+e.length})})),e.splice(this.config.numberOfTermsToDisplay)):e.length<this.config.minimalTermsToDisplay&&Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.sFl),{message:"There are no enough items to display on the tab.",pb:Object.assign(Object.assign({},L.sFl.pb),{customMessage:"Tab:"+t+", length: "+e.length})})),e):(Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.qXI),{message:"There is no item to display on the tab.",pb:Object.assign(Object.assign({},L.qXI.pb),{customMessage:"Tab:"+t})})),e)}fetchTabbedFeedData(e){return(0,C.mG)(this,void 0,void 0,(function*(){if(!(e.feed&&e.feed.id&&this.feedCardProvider))throw new Error("The feed is not valid to fetch data.");{const{numberOfTermsToDisplay:t}=this.config,i=yield this.feedCardProvider.fetch(t,e.feed.id,e.latitude,e.longitude);e.subCards=this.verifySubcards(i)}}))}renderCoachMark(){const e=this.shadowRoot.querySelector("msn-location-picker");this.simpleLoationPicker?(x.W.getInstance().registerItemAnchorElement(w.gz.multiLocationsCarousel,this.simpleLoationPicker),x.W.getInstance().registerItemTriggerMessage(w.gz.multiLocationsCarousel,!0)):e&&(x.W.getInstance().registerItemAnchorElement(w.gz.multiLocationsCarousel,e),x.W.getInstance().registerItemTriggerMessage(w.gz.multiLocationsCarousel,!0))}loadTabData(e,t=!1){return(0,C.mG)(this,void 0,void 0,(function*(){let i,n;if(this.config.enableMultiLocations){if(e==this.currentTabdata)return;i=this.currentTabdata&&this.currentTabdata.id,n=this.activeTabIndex}const o=this.tabsData.indexOf(e);if(this.loading=!0,!(o>-1))return Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.qXI),{message:"The tab doesn not exist.",pb:Object.assign({},L.qXI.pb)})),void(this.loading=!1);if(this.currentTabdata=this.config.enableMultiLocations?this.tabsData[o]:void 0,e&&!e.subCards)try{yield this.fetchTabbedFeedData(e),e.hasLoaded=!1}catch(e){Y.M0.sendAppErrorEvent(Object.assign(Object.assign({},L.eQj),{message:e&&e.message,pb:Object.assign(Object.assign({},L.eQj.pb),{stack:e&&e.stack})}))}if(this.config.enableMultiLocations&&o>-1){const e=this.shadowRoot.querySelector("fluent-horizontal-scroll").querySelectorAll("fluent-button");this.tabsData[n]&&this.tabsData[n].id==i&&(e[n]&&e[n].setAttribute("aria-selected","false"),this.tabsData[n].isActive=!1),this.activeTabIndex=o,this.tabsData[o].isActive=!0,this.updateContentTab(this.tabsData,!t,!0,o),this.currentTabdata=this.tabsData[o]}else!1===e.hasLoaded&&this.updateContentTab(this.tabsData,!t,!0,o);this.loading=!1}))}refreshTabData(e){return(0,C.mG)(this,void 0,void 0,(function*(){e.hasLoaded=!1,this.loading=!0;const t=this.tabsData.indexOf(e),i=this.updateContentTab(this.tabsData,!0,!1,t);this.loadTabData(i)}))}removeTab(e){return(0,C.mG)(this,void 0,void 0,(function*(){e<this.fixedTabsLenght||(this.locationPicker&&this.locationPicker.removeLocationByIndex(e-this.fixedTabsLenght),this.tabsData.splice(e,1),this.loadTabData(this.tabsData[0]),this.horizontalScroll.scrollToPosition(0))}))}updateContentTab(e,t,i,n){if(n<0)return;const o=(0,K.Z)(e[n]);return i&&(o.hasLoaded=!0),n>-1&&e.splice(n,1,o),this.tabs&&(t&&this.tabs.adjust(0),window.requestAnimationFrame((()=>{const e=this.tabs.tabs[n];t&&e.focus(),this.tabs.$emit("change",e)}))),o}getTabName(e){return e.feed&&e.feed.location?e.feed.location.city:e.feed.feedName?e.feed.feedName:""}}(0,C.gn)([_.LO],te.prototype,"tabbedFeedSectionTelemetry",void 0),(0,C.gn)([_.LO],te.prototype,"tabsData",void 0),(0,C.gn)([_.LO],te.prototype,"currentTabdata",void 0),(0,C.gn)([_.LO],te.prototype,"locations",void 0),(0,C.gn)([_.LO],te.prototype,"loading",void 0),(0,C.gn)([(0,U.Lj)({attribute:"card-size"})],te.prototype,"cardSize",void 0);var ie=i(39181),ne=i(13988),oe=i(58952),ae=i(18864),re=i(44772),se=i(41069),de=i(81563),le=i(89346),ce=i(12968),ue=i(93637),he=i(29422),pe=i(89589),ge=i(97671),fe=i(68364),ve=i(60483);const me="primarylocationcustomization",be="save",ye="cancel",Ce="dismiss",xe="add",we="remove",Se={locationPickerBtn:{name:"primarylocation",type:T.c9.ActionButton,behavior:T.wu.Open,content:{headline:"Open"}},locationPicker:{name:me,type:T.c9.Module},saveBtn:{name:be,type:T.c9.ActionButton,behavior:T.wu.Save,content:{headline:"Save"}},cancelBtn:{name:ye,type:T.c9.ActionButton,behavior:T.wu.Cancel,content:{headline:"Cancel"}},closeBtn:{name:Ce,type:T.c9.ActionButton,behavior:T.wu.Close,content:{headline:"Close"}},addBtn:{name:xe,type:T.c9.ActionButton,behavior:T.wu.Click,content:{headline:"Add"}},removeBtn:{name:we,type:T.c9.ActionButton,behavior:T.wu.Click,content:{headline:"Remove"}}};function $e(){return function(e){const t={};return Object.keys(e).forEach((i=>{const n=Object.assign({},e[i]);t[i]=new ve.D(n).getMetadataTag()})),t}(Se)}var ke=i(83152);class Le extends le.H{constructor(){super(...arguments),this.menuTabbableElements=[],this.candidateSelectors="input,a[href],fluent-anchor[href],button,fluent-button,[tabindex]",this.locationPdpClient=new ue.L,this.showMenu=!1,this.disableSaveBtn=!0,this.locationSuggestions=[],this.userLocation="",this.userFullLocation="",this.locationBtnTooltip="",this.showAddLocation=!1,this.isDuplicatedCity=!1,this.showSimpleAddfunction=!1,this.currentLocation="",this.dismissMenu=()=>{var e;this.showMenu=!1,this.showAddLocation=!1,null===(e=this.triggerBtn)||void 0===e||e.focus(),this.resetSearchBox(),this.dismissMenuCallback&&this.dismissMenuCallback(Le.pickedLocations)},this.resetSearchBox=()=>{this.locationSuggestions=[],this.searchBox&&(this.searchBox.value="",this.searchBox.lastUserQuery="")},this.removeLocation=e=>{const t=Le.pickedLocations.indexOf(e);if(Le.pickedLocations.splice(t,1),this.locationPdpClient.removeFavoriteLocation(e),e.DuplicatedCities&&e.DuplicatedCities.length>0){e.DuplicatedCities.forEach((e=>{this.locationPdpClient.removeFavoriteLocation(e)}))}},this.removeLocationByIndex=e=>{if(e<0||e>=Le.pickedLocations.length)return;const t=Le.pickedLocations[e];Le.pickedLocations.splice(e,1),this.locationPdpClient.removeFavoriteLocation(t)},this.showAddLocationMenu=()=>(0,C.mG)(this,void 0,void 0,(function*(){this.showAddLocation=!0,this.disableSaveBtn=!0,this.setFocus()})),this.hideAddLocationMenu=()=>(0,C.mG)(this,void 0,void 0,(function*(){this.showAddLocation=!1,this.showSimpleAddfunction?this.dismissMenu():(this.resetSearchBox(),this.setFocus())})),this.setFocus=()=>(0,C.mG)(this,void 0,void 0,(function*(){ce.SO.queueUpdate((()=>{var e;const t=null===(e=this.menu)||void 0===e?void 0:e.querySelectorAll(this.candidateSelectors);t&&t.length&&(this.menuTabbableElements=Array.from(t),t[0].focus())}))})),this.saveLocation=()=>(0,C.mG)(this,void 0,void 0,(function*(){let e;if(!(this.searchBox.selectedIndex>-1))return;e=this.searchBox.options[this.searchBox.selectedIndex].locationOption;const t=this.getDisplayName(e.locality,e.region,e.isoCode);if(!this.isExist(t)){const i=yield Promise.all([this.locationPdpClient.addFavoriteLocation(e),this.locationPdpClient.setSpecifyLocationMode()]),n={country:e.country,isoCode:e.isoCode,displayName:t,language:e.language,latitude:e.latitude,longitude:e.longitude,locality:e.locality,region:e.region};Le.pickedLocations.push(n),i[0]&&i[1]||this.logLocationSaveError(i[0],i[1])}this.showAddLocation=!1,this.showSimpleAddfunction?this.dismissMenu():(this.resetSearchBox(),this.setFocus())})),this.onKeydown=e=>{if(this.showMenu)switch(e.key){case"Escape":this.dismissMenu(),e.preventDefault();break;case"Tab":this.handleTabKeyDown(e)&&e.preventDefault();break;default:return!0}},this.handleTabKeyDown=e=>{var t;const i=this.menuTabbableElements.length;if(0===i)return null===(t=this.menu)||void 0===t||t.focus(),!0;let n=e.target;for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return e.shiftKey&&n===this.menuTabbableElements[0]?(this.menuTabbableElements[i-1].focus(),!0):!e.shiftKey&&n===this.menuTabbableElements[i-1]&&(this.menuTabbableElements[0].focus(),!0)},this.onOutsideClick=e=>{var t,i,n;const o=e.composedPath&&e.composedPath()||[];!this.showMenu||e.target instanceof Le||(null===(t=this.triggerBtn)||void 0===t?void 0:t.contains(e.target))||(null===(i=this.triggerBtn)||void 0===i?void 0:i.contains(o[0]))||this.isSameNode(null===(n=null==o?void 0:o.filter((e=>"MSN-LOCATION-PICKER"===e.tagName)))||void 0===n?void 0:n[0])||this.dismissMenu()},this.onLocationBtnClick=()=>{this.showAddLocation=!1,this.showMenu=!this.showMenu,this.showMenu?this.setFocus():this.dismissMenuCallback(Le.pickedLocations)},this.handleLocationChange=e=>{const{location:t}=e||{};this.userFullLocation=he.getDisplayName(t),t&&(this.userLocation=t.locality)},this.isExist=e=>-1!=Le.pickedLocations.findIndex((t=>t.displayName===e)),this.getDisplayName=(e,t,i)=>{let n=`${e}, ${t}`;return t||(n=`${e}`),"US"!=i&&(n=`${n}, ${i}`),n}}configChanged(){var e;this.locationPickerTelemetry=$e(),this.autoSuggestClient=(0,pe.b)(null===(e=this.config)||void 0===e?void 0:e.autoSuggestConfig),this.locationPdpClient.getUserDefaultLocation(!0).then((e=>{var t,i,n,o,a,r;e?(this.userFullLocation=null!==(t=e.displayName)&&void 0!==t?t:"",this.userLocation=null!==(i=e.locality)&&void 0!==i?i:""):(this.userFullLocation=null!==(o=null===(n=this.config)||void 0===n?void 0:n.localizedStrings.editLocationLbl)&&void 0!==o?o:"",this.userLocation=null!==(r=null===(a=this.config)||void 0===a?void 0:a.localizedStrings.editLocationLbl)&&void 0!==r?r:"")})),"true"==this.showSimpleAddfunction?this.showSimpleAddfunction=!0:this.showSimpleAddfunction=!1}userLocationChanged(){this.locationBtnTooltip=this.userFullLocation}connectedCallback(){var e;super.connectedCallback(),this.dismissMenuCallback=null===(e=this.config)||void 0===e?void 0:e.dismissMenuCallback,Le.pickedLocations||(Le.pickedLocations=[]),this.locationStateSubscription=ge._n.subscribe(ge.rd.Location,this.handleLocationChange)}disconnectedCallback(){super.disconnectedCallback(),this.locationStateSubscription.unsubscribe()}showMenuChanged(){this.showMenu?(document.addEventListener("mousedown",this.onOutsideClick),document.addEventListener("keydown",this.onKeydown),(!Le.pickedLocations||Le.pickedLocations.length<1)&&(Le.pickedLocations=[],this.fetchAllLocation(),this.disableSaveBtn=!0)):(document.removeEventListener("mousedown",this.onOutsideClick),document.removeEventListener("keydown",this.onKeydown))}selectedIndexChange(){return(0,C.mG)(this,void 0,void 0,(function*(){if(this.searchBox.selectedIndex>-1){const e=this.searchBox.options[this.searchBox.selectedIndex].locationOption,t=he.getDisplayName(e);this.isDuplicatedCity=this.isExist(t)||t===this.currentLocation,this.disableSaveBtn=this.isDuplicatedCity}else this.isDuplicatedCity=!1,this.disableSaveBtn=!0}))}inputChange(){let e=this.searchBox.control.value.trim();e="USA, "+e,e?this.autoSuggestClient&&this.autoSuggestClient.getAutoSuggestResponse(e,!0).then((e=>{null!=e&&e.length?this.locationSuggestions=e.map((e=>Object.assign(Object.assign({},e),{displayName:he.getDisplayName(e),saveLocation:this.saveLocation,Added:this.isExist(he.getDisplayName(e)),disabled:!1}))):this.locationSuggestions=[{displayName:this.config?this.config.localizedStrings.unavailableSuggestions:"",disabled:!0}]})):this.locationSuggestions=[]}logLocationSaveError(e,t){const i=`Location save failed, see related app error ${L.G1Z.id}.`,n=`Location mode save failed, see related app error ${L.DyR.id}.`;(0,fe.H)(L.JGn,"Location or location mode save failed.",`${e?"":i}${t?"":n}`)}getAllLocations(){return(0,C.mG)(this,void 0,void 0,(function*(){return(!Le.pickedLocations||Le.pickedLocations.length<1)&&(yield this.fetchAllLocation()),Le.pickedLocations}))}fetchAllLocation(){return(0,C.mG)(this,void 0,void 0,(function*(){const e=yield this.locationPdpClient.instance.readPdpWithTargetType(ke.L.Location,!0,200,{},!1),t=[];for(const i of e.value)if(i.metadata&&"United States"==i.metadata.countryRegion){const e=i.metadata,n=t.findIndex((t=>t.displayName===this.getDisplayName(e.city,e.state,e.isoCode))),o=[],a={isoCode:e.isoCode,locality:e.city,region:e.state,country:e.countryRegion,latitude:e.geoCoordinates&&e.geoCoordinates.latitude,longitude:e.geoCoordinates&&e.geoCoordinates.longitude,language:e.language,displayName:this.getDisplayName(e.city,e.state,e.isoCode),DuplicatedCities:o};if(this.currentLocation!==a.displayName)if(n>-1){t[n].DuplicatedCities.push(a)}else t.push(a)}Le.pickedLocations=t}))}setCurrentLocation(e){this.currentLocation=e}}(0,C.gn)([_.LO],Le.prototype,"config",void 0),(0,C.gn)([_.LO],Le.prototype,"showMenu",void 0),(0,C.gn)([_.LO],Le.prototype,"disableSaveBtn",void 0),(0,C.gn)([_.LO],Le.prototype,"locationSuggestions",void 0),(0,C.gn)([_.LO],Le.prototype,"userLocation",void 0),(0,C.gn)([_.LO],Le.prototype,"userFullLocation",void 0),(0,C.gn)([_.LO],Le.prototype,"locationBtnTooltip",void 0),(0,C.gn)([_.LO],Le.prototype,"showAddLocation",void 0),(0,C.gn)([_.LO],Le.prototype,"isDuplicatedCity",void 0),(0,C.gn)([_.LO],Le.prototype,"dismissMenuCallback",void 0),(0,C.gn)([_.LO],Le.prototype,"removeTabCallback",void 0),(0,C.gn)([_.LO,(0,U.Lj)({attribute:"show-simple-add"})],Le.prototype,"showSimpleAddfunction",void 0),(0,C.gn)([_.LO],Le,"pickedLocations",void 0);var Te=i(40565),Oe=i(68402);const Ie=ie.d`
    <span class="header">
        ${(0,ne.g)((e=>e.locationOption.isCurrentLocation),ie.d`${'<svg width="10" height="10" viewBox="0 0 10 10"><path d="M10 0 0 5l4.66.34L5 10l5-10Z"/></svg>'}`)}
        ${e=>e.locationOption.header}
    </span>
`,Ae=ie.d`
    <template
        aria-selected="${e=>e.selected}"
        aria-label="${e=>e.locationOption.displayName}"
        title="${e=>e.locationOption.displayName}"
        value="${e=>e.locationOption.displayName}"
        class="${e=>e.selected?"selected":""} ${e=>e.disabled?"disabled":""}"
        role="option"
    >
        <div class="content${e=>e.locationOption.header?" info":""}">
            ${(0,ne.g)((e=>e.locationOption.header),Ie)}
            <span>${e=>e.locationOption.displayName}</span>
        </div>
    </template>
`;var Pe=i(31074),Fe=i(15933);const Me=z.i`
:host(:not([aria-selected="true"]):active) .content,
:host(:not([aria-selected="true"]):hover) .content,
:host([aria-selected="true"]) .content {
    background: none;
    border: 1px solid ${Fe.H.ButtonText};
    color: ${Fe.H.ButtonText};
}
`,Ee=z.i`
    ${(0,Pe.s)(void 0,void 0)}

    :host {
        --control-corner-radius: 0;
        position: relative;
        margin: 0;
        background: ${V.IfY};
        padding: 0;
        border: 0;
        width: 100%;
        height: unset;
    }
    :host(:not([aria-selected="true"]):active),
    :host(:not([aria-selected="true"]):hover),
    :host([aria-selected="true"]),
    :host(:active) {
        background: ${V.IfY};
        color: ${V.CHi};
    }
    :host(:not([aria-selected="true"]):active) .content,
    :host(:not([aria-selected="true"]):hover) .content,
    :host([aria-selected="true"]) .content {
        background: ${V.QpD};
        color: ${V.CHi};
    }
    svg {
        display: flex;
        height: calc(var(--design-unit) * 4px);
        width: calc(var(--design-unit) * 4px);
    }
    .content {
        overflow: hidden;
        padding: 0 11px;
        text-overflow: ellipsis;
        height: calc((var(--base-height-multiplier) + var(--density)) * var(--design-unit) * 1px);
        border: 1px solid transparent;
        justify-content: space-around;
        flex-direction: column;
        display: flex;
        width: 100%;
    }
    .content span {
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    .content.info {
        height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit) * 1px) * 2);
    }
    .header {
        display: flex;
        align-content: center;
        color: ${V.Q5n};
        font-size: ${V.sNp};
        line-height: ${V.vgC};
    }
    .header > svg {
        padding-inline-end: 5px;
        width: 10px;
    }
`.withBehaviors((0,W.vF)(Me));var De=i(67491);class He extends De.wt{locationOptionChanged(){this.locationOption&&(this.textContent=this.locationOption.displayName)}}(0,C.gn)([_.LO],He.prototype,"locationOption",void 0);let Re=class extends He{};Re=(0,C.gn)([(0,le.M)({name:"msn-location-search-option",template:Ae,styles:Ee,shadowOptions:{delegatesFocus:!0}})],Re);var Ne=i(545);const je=ie.d`
    <msn-location-search-option :locationOption=${e=>e} ?disabled=${e=>e.disabled} />
`,_e=ie.d`
<div class="locationItem">
    <span class="menu-title">${e=>e.displayName}</span>

    <fluent-button
        appearance="stealth"
        class="action-btn"
        @click=${(e,t)=>t.parent.removeLocation(e)}
        aria-label=${(e,t)=>{var i,n;return null===(n=null===(i=t.parent.config)||void 0===i?void 0:i.localizedStrings)||void 0===n?void 0:n.removeBtn}}
        role="button"
        title=${(e,t)=>{var i,n;return null===(n=null===(i=t.parent.config)||void 0===i?void 0:i.localizedStrings)||void 0===n?void 0:n.removeBtn}}
        data-t="${(e,t)=>{var i;return null===(i=t.parent.locationPickerTelemetry)||void 0===i?void 0:i.removeBtn}}"
    >
        ${(e,t)=>{var i,n;return null===(n=null===(i=t.parent.config)||void 0===i?void 0:i.localizedStrings)||void 0===n?void 0:n.removeBtn}}
    </fluent-button>
</div>
`,Ue=ie.d`
    <div class="header">
        <fluent-button
            appearance="stealth"
            @click=${e=>e.dismissMenu()}
            aria-label=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.closeBtnTooltip}
            role="button"
            title=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.closeBtnTooltip}
            data-t="${e=>{var t;return null===(t=e.locationPickerTelemetry)||void 0===t?void 0:t.closeBtn}}"
            position="below"
        >
            ${Ne.Z}
        </fluent-button>
    </div>
    ${(0,ae.rx)((e=>Le.pickedLocations),ie.d`
        ${_e}
    `)}
    ${(0,ne.g)((e=>Le.pickedLocations&&Le.pickedLocations.length>0),ie.d`
        <fluent-divider class="divider-margin" slot="divider"></fluent-divider>
    `)}
        <fluent-button
            appearance="Stealth"
            class="add-location-btn"
            @click=${e=>e.showAddLocationMenu()}
            aria-label=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.addBtn}
            role="button"
            title=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.addBtn}
            data-t="${e=>{var t;return null===(t=e.locationPickerTelemetry)||void 0===t?void 0:t.addBtn}}">
            ${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.addBtn}
            <span slot="start" class="add-icon">
                ${Oe.Z}
            </span>
        </fluent-button>
`,Be=ie.d`
    <msn-location-search
        ${(0,oe.i)("searchBox")}
        autocomplete="off"
        :userLocation="${e=>""}"
        placeholder=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.searchPlaceholder}
        @change=${(e,t)=>t.event.stopPropagation()}
        @input-change=${e=>e.inputChange()}
        @selected-index-change=${e=>e.selectedIndexChange()}
    >
        <span slot="indicator">
            ${'<svg width="14" height="14" viewBox="0 0 14 14"><path d="M8.5 0A5.42 5.42 0 0 1 14 5.5a5.5 5.5 0 0 1-9.02 4.23L.85 13.85c-.1.1-.2.15-.35.15a.46.46 0 0 1-.35-.15.52.52 0 0 1-.15-.35c0-.14.05-.25.15-.35l4.12-4.13a5.52 5.52 0 0 1-.54-6.28A5.48 5.48 0 0 1 8.5 0Zm0 10a4.4 4.4 0 0 0 3.9-2.24c.4-.7.6-1.45.6-2.26a4.45 4.45 0 0 0-2.25-3.9C10.06 1.2 9.31 1 8.5 1a4.5 4.5 0 1 0 0 9Z" fill-opacity=".8"/></svg>'}
        </span>
        ${(0,ae.rx)((e=>e.locationSuggestions),je)}
    </msn-location-search>
    ${(0,ne.g)((e=>e.isDuplicatedCity),ie.d`
            <div class="duplicated-label">
            <span>${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.duplicatedMessage}</span>
            <div>
            `)}
        
    <div class="actions">
        <fluent-button
            ?disabled=${e=>e.disableSaveBtn}
            appearance="accent"
            class="save-btn"
            @click=${e=>e.saveLocation()}
            aria-label=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.saveBtn}
            role="button"
            title=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.saveBtn}
            data-t="${e=>{var t;return null===(t=e.locationPickerTelemetry)||void 0===t?void 0:t.saveBtn}}"
        >
            ${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.saveBtn}
        </fluent-button>
        <fluent-button
            appearance="outline"
            class="cancel-btn"
            @click=${e=>e.hideAddLocationMenu()}
            aria-label=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.cancelBtn}
            role="button"
            title=${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.cancelBtn}
            data-t="${e=>{var t;return null===(t=e.locationPickerTelemetry)||void 0===t?void 0:t.saveBtn}}"
        >
            ${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.cancelBtn}
        </fluent-button>
`,Ge=ie.d`
    <span class="add-icon" slot="start">${Oe.Z}</span>
    <span class="text" part="btn-text">
        ${e=>e.config&&e.config.localizedStrings&&e.config.localizedStrings.addBtn}
    </span>
`,ze=ie.d`
<div ${(0,oe.i)("menu")}
        class="menu" tabindex="0" 
        data-t="${e=>{var t;return null===(t=e.locationPickerTelemetry)||void 0===t?void 0:t.locationPicker}}"
        >
            ${(0,ne.g)((e=>!e.showSimpleAddfunction&&!e.showAddLocation),Ue)}
            ${(0,ne.g)((e=>e.showSimpleAddfunction||e.showAddLocation),Be)}
        </div>
`,Ve=ie.d`
<template>
    ${(0,ne.g)((e=>e.userLocation),ie.d`
        <fluent-button
            ${(0,oe.i)("triggerBtn")}
            class="action-btn"
            part="edit-btn"
            appearance="stealth"
            @click=${e=>e.onLocationBtnClick()}
            title=${e=>e.locationBtnTooltip}
            aria-label=${e=>e.locationBtnTooltip}
            role="button"
            aria-expanded=${e=>e.showMenu}
            data-t="${e=>{var t;return null===(t=e.locationPickerTelemetry)||void 0===t?void 0:t.locationPickerBtn}}"
        >
        ${(0,ne.g)((e=>e.showSimpleAddfunction),Ge)}
        ${(0,ne.g)((e=>!e.showSimpleAddfunction),ie.d`${Te.Z}`)}
        </fluent-button>
        ${(0,ne.g)((e=>e.showMenu),ze)}
    `)}
</template>
`;var qe=i(62734),We=i(56201);const Je=z.i`
    :host { 
        --elevation: 4;
        position: relative;
    }

    .action-btn {
        border: 1px solid transparent;
        border-radius: 20px;
        padding: 0;
        margin: 0;
        font-size: ${V.cSu};
        line-height: ${V.RUt};
        cursor: pointer;
        color: ${V.CHi};
        fill: ${V.CHi};
    }

    .locationItem .action-btn {
        color: var(--accent-foreground-rest);
    }

    .action-btn::part(content){
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .action-btn svg {
        width: 14px;
        height: 14px;
        padding: 0;
    }

    .action-btn:focus,
    .action-btn:${We.b} {
        background: ${V.QpD};
    }
    .action-btn::part(control):${We.b} {
        border-color: transparent;
        box-shadow: none;
    }
    .action-btn::part(control) {
        padding-inline: 0px;
    }
    .action-btn .add-icon {
        padding-top:3px;
    }
    .menu {
        position: absolute;
        right: 0px;
        z-index: 10;
        padding: 16px;
        width: 268px;
        height: auto;
        display: flex;
        flex-direction: column;
        background: ${V.IfY};
        border-radius: calc(${V.rSr} * 1px);
        ${qe.XC}
    }

    .menu .heading {
        padding-bottom: 15px;
    }

    .menu .header fluent-button {
        margin-top: -10px;
        margin-inline-end: 1px;
        width: 32px;
    }
    
    .menu .header fluent-button svg {
        width: 12px;
        fill: currentColor;
    }

    .menu .header {
        display: flex;
        position: relative;
        width: 100%;
        padding-bottom: 4px;
        flex-direction: row-reverse;
    }

    .heading span {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .menu .actions fluent-button {
        border-radius: 4px;
        min-width: 35%;
        width: 130px;
    }

    .menu .actions fluent-button::part(content) {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .menu .actions {
        display: flex;
        justify-content: space-between;
        padding-top: 8px;
    }
    .menu .duplicated-label {
        color: var(--neutral-foreground-hint);
        font-size: 12px;
        padding-top: 8px;
    }

    .menu-title {
        font-size: ${V.cSu};
        line-height: ${V.RUt};
        background-color: transparent;
        font-weight: 400;
        -webkit-line-clamp: 1;
        cursor: auto;
    }

    .menu-subtitle {
        font-size: ${V.sNp};
        line-height: ${V.vgC};
        -webkit-line-clamp: 2;
    }

    .locationItem
    {
        display: grid;
        grid-template-columns: auto 73px;
        column-gap: 8px;
        align-items: center;
    }

    .locationItem .menu-title::part(control)
    {
        display: flex;
        justify-content: flex-start;
        padding-left: 0px;
    }
    
    @media (max-width: 955px) {

        .action-btn::part(start) {
            margin-inline-end: 0;
        }
    }

    @media (max-width: 625px) {
        .see-more-label {
            display: none;
        }
    }

    msn-location-search {
        margin-top: 10px;
    }

    .add-icon {
        height: 20px;
        width: 20px;
    }

    .add-location-btn::part(start) {
        margin-inline: -8px 8px;
        padding-top: 1px;
    }

    .add-location-btn {
        --neutral-fill-rest: --fill-color;
        --neutral-fill-hover: --fill-color;
        border-radius: 4px;
        margin-left: -8px;
        width: 120px;
    }

    .see-more-label {
        top: 5px;
        position: relative;
    }
`.withBehaviors((0,W.Uu)(z.i`
            .menu {
                border: 1px solid ${V.akT};
            }
    `));var Ze=i(32612);class Qe extends Ze.h{constructor(){super(...arguments),this.locationWipedOnClickOnce=!1,this.lastUserQuery="",this.focusHandler=()=>{this.locationWipedOnClickOnce&&this.control.value||(this.control.value="",this.value="",this.open=!0,this.locationWipedOnClickOnce=!0,this.$emit("zero-input"))}}connectedCallback(){super.connectedCallback(),this.control.value=this.userLocation,this.value=this.userLocation,this.locationWipedOnClickOnce=!1,this.control.addEventListener("focus",this.focusHandler)}clickHandler(e){super.clickHandler(e)}slottedOptionsChanged(e,t){this.$fastController.isConnected&&(this.options=t.reduce(((e,t)=>(e.push(t),e)),[]),this.options.forEach(((e,t)=>{e.id=e.id||`option-${t}`})),this.setSelectedOptions(),this.setDefaultSelectedOption())}inputHandler(e){this.open||(this.open=!0),this.value=e.target.value,this.lastUserQuery=this.control.value,this.$emit("input-change")}focusoutHandler(e){var t;if(this.$fastController.isConnected&&(this.value=(null===(t=this.firstSelectedOption)||void 0===t?void 0:t.text)||this.control.value),!this.open)return!0;const i=e.relatedTarget||e.target;this.options&&(this.options.includes(i)||"MSN-LOCATION-SEARCH-OPTION"===i.tagName)||(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":super.keydownHandler(e);break;case"Escape":super.keydownHandler(e),this.value="",this.control.value="",this.$emit("input-change");break;case"Tab":if(!this.open)return!0;e.preventDefault(),this.open=!1;break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}this.updateSelectedOption(e),this.control.value=this.firstSelectedOption&&this.firstSelectedOption.text||this.lastUserQuery;break;default:return!0}}updateSelectedOption(e){e.shiftKey||(e.preventDefault(),"ArrowDown"===e.key&&this.options&&this.options.every((e=>!e.disabled))?this.selectNextOption():"ArrowUp"===e.key&&!this.disabled&&this.selectedIndex>-1&&(this.selectedIndex=this.selectedIndex-1))}selectedIndexChanged(e,t){super.selectedIndexChanged(e,t),this.$emit("selected-index-change")}}(0,C.gn)([_.LO],Qe.prototype,"userLocation",void 0);var Ye=i(8417);var Xe=i(17993);const Ke=Qe.compose({baseName:"location-search",template:Xe.M,styles:(e,t)=>z.i`
    ${(0,Ye.XO)(e,t)}
    :host {
        --highlight-margin: 4px;
        --base-height-multiplier: 9;
        --elevation: 4;
        --max-height: 200;
        width: 100%;
        min-height: 32px;
        outline: none;
        border: 1px solid transparent;
        ${qe.XC};
    }

    input::placeholder {
        color: ${V.Q5n};
        opacity: 1;
    }
    .dark input::placeholder {
        color: rgba(255, 255, 255, 0.786);
    }

    .listbox {
        padding: 0;
        --elevation: 4;
        max-height: calc(200 - ((var(--base-height-multiplier) + var(--density)) * var(--design-unit) * 1px));
        ${qe.XC};
    }
    :host([open][position="below"]) .listbox {
        top: calc((var(--base-height-multiplier) + var(--density)) * var(--design-unit) * 1px - 3px);
    }
    :host([open][position="above"]) .listbox {
        border-bottom: 0px;
        bottom: calc((var(--base-height-multiplier) + var(--density)) * var(--design-unit) * 1px - 3px);
    }
    .control {
        min-height: unset;
        padding: 0;
    }
    .indicator {
        fill: currentcolor;
        padding-inline-start: 10px;
        height: 50%;
        margin: auto;
        position: absolute;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: center;
    }
    .selected-value {
        border: none;
        padding-inline-start: 32px;
        background-color: transparent;
        color: currentcolor;
        height: 100%;
        outline: none;
    }
    .indicator svg {
        display: flex;
        height: calc(var(--design-unit) * 4px);
        width: calc(var(--design-unit) * 4px);
    }
`,shadowOptions:{delegatesFocus:!0}});let et=class extends Le{};et=(0,C.gn)([(0,le.M)({name:"msn-location-picker",template:Ve,styles:Je})],et),(0,r.z)().withShadowRootMode("closed").withElementDisambiguation((()=>h.h.ignoreDuplicate)).withPrefix("msn").register(Ke());var tt=i(62923),it=i.n(tt),nt=i(33785),ot=i.n(nt);const at=ie.d`
<div>
    ${(e,t)=>(0,de.O)(t.parent.config.childExperienceReferencesWC.selectCarousel,{memoize:!1,includeTelemetryTag:!1,properties:{getContentIndicator:se.A$,cardMetadata:e,carouselType:re.PL.TabbedFeedCard,shouldFetchData:!1,cardActionTooltips:null,toggleCardActionMenu:null,handleContentCardClickOverride:e.handleContentCardClickOverride,parentTelemetry:e.telemetryContext&&e.telemetryContext.tabPanel}})}
</div>
`,rt=ie.d`
<div class="loading">
    <h2>${(e,t)=>t.parent.strings&&t.parent.strings.loadingMessage}</h2>
</div>
`,st=ie.d`
<div class="loading">
    <h2>${e=>e.strings&&e.strings.loadingMessage}</h2>
</div>
`,dt=ie.d`
<div class="load-error">
    <h2>${(e,t)=>t.parent.strings&&t.parent.strings.errorLoadMessage}</h2>
    <fluent-button
        appearance="stealth"
        @click="${(e,t)=>t.parent.refreshTabData(e)}"
        class="settings-link"
        aria-label="${(e,t)=>t.parent.strings&&t.parent.strings.errorLoadRefreshButtonText}"
        role="button"
        title="${(e,t)=>t.parent.strings&&t.parent.strings.errorLoadRefreshButtonText}"
    >
        ${(e,t)=>t.parent.strings&&t.parent.strings.errorLoadRefreshButtonText}
    </fluent-button>
</div>
`,lt=ie.d`
<div class="load-error">
    <h2>${e=>e.strings&&e.strings.errorLoadMessage}</h2>
    <fluent-button
        appearance="stealth"
        @click="${e=>e.refreshTabData(e.tabsData[e.activeTabIndex])}"
        class="settings-link"
        aria-label="${e=>e.strings&&e.strings.errorLoadRefreshButtonText}"
        role="button"
        title="${e=>e.strings&&e.strings.errorLoadRefreshButtonText}"
    >
        ${e=>e.strings&&e.strings.errorLoadRefreshButtonText}
    </fluent-button>
</div>
`,ct=ie.d`
<div class="load-error">
    <h2>${e=>e.strings&&e.strings.emptyLoadMessage}</h2>
    
    ${(0,ne.g)((e=>e.activeTabIndex>=e.fixedTabsLenght),ie.d`
        <fluent-button
            appearance="stealth"
            @click="${e=>e.removeTab(e.activeTabIndex)}"
            class="settings-link"
            aria-label="${e=>e.strings&&e.strings.removeLocationButtonText}"
            role="button"
            title="${e=>e.strings&&e.strings.removeLocationButtonText}"
        >
            ${e=>e.strings&&e.strings.removeLocationButtonText}
        </fluent-button>
    `)}
</div>
`,ut=ie.d` 
<div class="tabs-feed-card"
    card-size=${e=>e.cardSize}
    background=${e=>e.config.enableMultiLocations?"none":"gradient"}
    tabsDirection=${e=>e.config.enableMultiLocations?"left":"middle"}
    data-t="${e=>{var t,i;return null===(i=null===(t=e.tabbedFeedSectionTelemetry)||void 0===t?void 0:t.tabbedFeedCard)||void 0===i?void 0:i.getMetadataTag()}}"
>    
        <fluent-tabs id="tabbedFeed" 
            activeId=${e=>e.activeId} 
            orientation="horizontal" 
            ${(0,oe.i)("tabs")}
        >
            <div slot="start" class="heading-container">
                <a id="${e=>e.id}"
                    class="heading"
                    href="${e=>e.headingLink}"
                    title= "${e=>e.headingText}"
                    data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.headingClick&&e.tabbedFeedSectionTelemetry.headingClick.getMetadataTag()}"
                >
                    ${e=>e.headingText}
                </a>
            </div>
            ${(0,ae.rx)((e=>e.tabsData),ie.d`
                <fluent-tab
                    id= ${e=>e.tabId}
                    @focus="${(e,t)=>t.parent.loadTabData(e)}"
                    data-t="${e=>{var t;return null===(t=e.telemetryContext)||void 0===t?void 0:t.tab.getMetadataTag()}}"
                >
                    ${e=>e.feed.feedName}
                </fluent-tab>
            `)}
            ${(0,ae.rx)((e=>e.tabsData),ie.d`
                <fluent-tab-panel 
                    id="${e=>e.tabPanelId}" 
                    part="fluentpanel"
                    data-t="${e=>e.telemetryContext.tabPanel.getMetadataTag()}"
                >
                    ${(0,ne.g)((e=>e.hasLoaded&&!e.subCards),ie.d`${dt}`)}
                    ${(0,ne.g)((e=>e.hasLoaded),ie.d`${at}`)}
                    ${(0,ne.g)((e=>!e.hasLoaded),ie.d`${rt}`)}
                </fluent-tab-panel>
            `)}
        </fluent-tabs>
</div>
`,ht=ie.d`
 <fluent-button
     @click="${(e,t)=>t.parent.loadTabData(e)}"
     tabindex="0"
     aria-selected=${e=>e.isActive?"true":"false"}
     title="${e=>e.title}"
     id="${e=>e.id}"
     data-t="${e=>e.telemetryContext&&e.telemetryContext.tab.getMetadataTag()}"
 >
    <span title="${(e,t)=>t.parent.getTabName(e)}">
        ${(e,t)=>t.parent.getTabName(e)}
    </span>
 </fluent-button>`,pt=ie.d`
<fluent-horizontal-scroll aria-hidden="false" class="horizontal-scroll" speed="1500" easing="ease-in-out" ${(0,oe.i)("horizontalScroll")}>
    <fluent-flipper
        slot="previous-flipper"
        direction="previous"
        part="flipper-previous"
        class="previous"
        @click="${e=>e.scrollToPrevious()}"
        data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.tabsFlipperPrevious&&e.tabbedFeedSectionTelemetry.tabsFlipperPrevious.getMetadataTag()}"
        >
        ${(0,ne.g)((e=>"rtl"===document.dir),ie.d`
            <div slot="previous">${it()} </div>
        `)}
        <div slot="previous">${ot()} </div>
    </fluent-flipper>
    <fluent-flipper
        slot="next-flipper"
        direction="next"
        part="flipper-next"
        class="next"
        @click="${e=>e.scrollToNext()}"
        data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.tabsFlipperNext&&e.tabbedFeedSectionTelemetry.tabsFlipperNext.getMetadataTag()}"
        >
        ${(0,ne.g)((e=>"rtl"===document.dir),ie.d`
            <div slot="next">${ot()} </div>
        `)}
        <div slot="next">${it()} </div>
    </fluent-flipper>
    ${(0,ae.rx)((e=>e.tabsData),ht)}
</fluent-horizontal-scroll>`,gt=ie.d`
    ${e=>(0,de.O)(e.config.childExperienceReferencesWC.selectCarousel,{memoize:!1,includeTelemetryTag:!1,properties:{getContentIndicator:se.A$,cardMetadata:e.currentTabdata,carouselType:re.PL.TabbedFeedCard,shouldFetchData:!1,cardActionTooltips:null,toggleCardActionMenu:null,handleContentCardClickOverride:e.currentTabdata.handleContentCardClickOverride,parentTelemetry:e.currentTabdata.telemetryContext&&e.currentTabdata.telemetryContext.tabPanel}})}
`,ft=ie.d` 
<div class="tabs-feed-card"
    card-size=${e=>e.cardSize}
    background=${e=>e.config.enableMultiLocations?"none":"gradient"}
    tabsDirection=${e=>e.config.enableMultiLocations?"left":"middle"}
    data-t="${e=>{var t,i;return null===(i=null===(t=e.tabbedFeedSectionTelemetry)||void 0===t?void 0:t.tabbedFeedCard)||void 0===i?void 0:i.getMetadataTag()}}"
    >
    <div class="tabbed-feed-title">
        <div class="heading-container">
            <a id="${e=>e.id}"
                class="heading"
                href="${e=>e.headingLink}"
                title= "${e=>e.headingText}"
                data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.headingClick&&e.tabbedFeedSectionTelemetry.headingClick.getMetadataTag()}"
                >
                ${e=>e.headingText}
            </a>
        </div>
        ${(0,ne.g)((e=>e.tabsData),pt)}
        <msn-location-picker
            card-size=${e=>e.cardSize}
            show-simple-add="true"
            :config=${e=>e.locationEditorConfig}
            data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.addLocation&&e.tabbedFeedSectionTelemetry.addLocation.getMetadataTag()}"
            ${(0,oe.i)("simpleLoationPicker")}>
        </msn-location-picker>
        <div class="action-container">
                <a id="${e=>e.id}"
                class="heading"
                href="${e=>e.headingLink}"
                title= "${e=>e.strings.seeMore}"
                data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.seeMoreClick&&e.tabbedFeedSectionTelemetry.seeMoreClick.getMetadataTag()}"
                >
                    ${e=>e.strings.seeMore}
                </a>
            <msn-location-picker
                class="action"
                show-simple-add="false"
                :config=${e=>e.locationEditorConfig}
                data-t="${e=>e.tabbedFeedSectionTelemetry&&e.tabbedFeedSectionTelemetry.moreAction&&e.tabbedFeedSectionTelemetry.moreAction.getMetadataTag()}"
                >
            </msn-location-picker>
        </div>
    </div>
    <div class="content"
        data-t="${e=>e.currentTabdata.telemetryContext&&e.currentTabdata.telemetryContext.tabPanel.getMetadataTag()}"
        >
        ${(0,ne.g)((e=>e.loading&&!(e.currentTabdata&&e.currentTabdata.subCards)),ie.d`${st}`)}
        ${(0,ne.g)((e=>!(e.currentTabdata&&e.currentTabdata.subCards||e.loading)),ie.d`${lt}`)}
        ${(0,ne.g)((e=>e.currentTabdata&&e.currentTabdata.subCards&&e.currentTabdata.subCards.length>0&&!e.loading),ie.d`${gt}`)}
        ${(0,ne.g)((e=>e.currentTabdata&&e.currentTabdata.subCards&&0==e.currentTabdata.subCards.length&&!e.loading),ie.d`${ct}`)}
    </div>
</div>
`,vt=ie.d` 
    ${(0,ne.g)((e=>!e.config.enableMultiLocations),ie.d`${ut}`)}
    ${(0,ne.g)((e=>e.config.enableMultiLocations),ie.d`${ft}`)}
`,mt=z.i`
    :host {
        --background-gradient-angle: 134.62deg;
        --neutral-foreground-hint: #757575;
    }
`,bt=z.i`
    :host {
        --background-gradient-angle: -134.62deg;
    }
`,yt=z.i`

:host .tabbed-feed-title {
    display: flex;
    column-gap: 15px;
}

:host .tabbed-feed-title .action-container{
    margin-inline: auto 0;
    display: flex;
    column-gap: 10px;
}

fluent-flipper::before {
    border: unset;
    background: transparent;
    border-radius: 3px;
}

fluent-flipper {
    width: 20px;
    height: 26px;
    border-radius: 3px;
}

fluent-flipper:hover {
    background-color: ${V.QpD};
}

:host([card-size="_4x_2y"]) .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 812px;
}


:host([card-size="_3x_2y"]) .tabbed-feed-title fluent-horizontal-scroll  {
    max-width: 532px;
}

:host([card-size="_2x_2y"]) msn-location-picker[show-simple-add="true"]::part(btn-text),
:host([card-size="_1x_2y"]) msn-location-picker[show-simple-add="true"]::part(btn-text),
:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .action-container .heading {
    display: none;
}

:host([card-size="_2x_2y"]) msn-location-picker[show-simple-add="true"]::part(edit-btn),
:host([card-size="_1x_2y"]) msn-location-picker[show-simple-add="true"]::part(edit-btn) {
    min-width: 20px;
    margin-top: 7px;
    height: 20px;
    min-height: 20px;
    padding-inline: 0;
}

:host msn-location-picker[show-simple-add="true"]::part(edit-btn) {
    padding-inline: 10px;
    border-radius: 100px;
    border: 1px solid ${V.akT};
    min-height: 24px;
    height: 24px;
    margin-top: 4px;
}

:host([card-size="_2x_2y"]) .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 302px;
}

:host([card-size="_1x_2y"]) .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 97px;
}

:host .tabs-feed-card[background="none"] {
    background: transparent;
    box-shadow: none;
    padding-inline: 0px;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .tabbed-feed-title {
    column-gap: 7px;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .action-container {
    display: flex;
    column-gap: 4px;
}

:host .tabs-feed-card[background="none"] .heading-container {
    margin-top: auto;
    margin-bottom: auto;
    margin-inline: 2px 0px;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .heading-container a {
    font-size: 16px;
}

:host .tabs-feed-card[background="none"] .action-container a {
    font-size: ${V.cSu};
    line-height: ${V.RUt};
    padding-top: 8px;
    color: ${V.CHi};
    text-decoration: none;
}

:host([card-size="_1x_2y"]) .tabs-feed-card[background="none"] .tabbed-feed-title {
    column-gap: 9px;
}

:host .tabs-feed-card[background="none"] .action-container a:hover, 
:host .tabs-feed-card[background="none"] .action-container a:focus-visible {
    text-decoration: underline;
}

:host .tabs-feed-card[background="none"] .load-error, 
:host .tabs-feed-card[background="none"] .loading {
    position: relative;
    max-width: 600px;
}

:host .tabs-feed-card[background="none"] .content {
    height: 251px;
}

:host .tabs-feed-card[background="none"] .heading-container a {
    font-weight: 600;
    font-size: ${V.mWK};
    line-height: ${V.I7_};
}

:host .tabs-feed-card[background="none"] fluent-button,
:host .tabbed-feed-title fluent-horizontal-scroll {
    border-radius: 20px;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button {
    background: transparent;
    color: ${V.Q5n};
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button span::after {
    display: flex;
    content: attr(title);
    font-weight: bold;
    color: transparent;
    height: 0px;
    margin-bottom: -1px;
    visibility: hidden;
    overflow: hidden;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="true"] {
    font-weight: 550;
    color: ${V.CHi};
    cursor: default;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button::part(content) {
    border-bottom: 2px solid transparent;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button::part(control) {
    box-shadow: none;
    border: none;
}

:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="false"]:hover::part(content),
:host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="false"]:focus::part(content) {
    border-bottom-color: ${V.XiB};
}

:host .tabbed-feed-title fluent-horizontal-scroll:focus {
    border: calc(var(--stroke-width) * 1px) solid var(--focus-stroke-outer);
    box-shadow: 0 0 0 calc((var(--focus-stroke-width) - var(--stroke-width)) * 1px) var(--focus-stroke-outer);
}

:host .tabbed-feed-title fluent-horizontal-scroll::part(content-container) {
    padding-inline-end: 2px;
}

:host .tabbed-feed-title fluent-horizontal-scroll {
    max-width: 1124px;
    margin-inline: 5px;
}
`.withBehaviors((0,W.Uu)(z.i`
            :host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button[aria-selected="true"] {
                font-weight: 700;
            }

            :host .tabs-feed-card[background="none"] .tabbed-feed-title fluent-button {
                color: ${V.CHi};
            }
        `)),Ct=z.i`
:host {
    --tap-on-rest: #767676;
}

:host([card-size="_1x_2y"]) fluent-tabs{
    display: block;
}

:host([card-size="_1x_2y"]) ::part(tablist){
    padding-top: 12px;
    padding-inline-end: 0px;
}

:host ::part(tablist){
    padding-inline-end: 36px;
    margin-inline: auto;
    column-gap: 16px;
}

:host fluent-tab[aria-selected="true"]{
    font-weight: 550;
    color: ${V.CHi};
    pointer-events: none;
}

:host fluent-tab[aria-selected="false"]:hover {
    border-bottom-color: var(--tap-on-rest);
}

:host ::part(activeIndicator) {
    display:none;
}

:host fluent-tab {
    height: auto;
    color: var(--tap-on-rest);
    font-weight: 550;
    font-size: ${V.sNp};
    line-height: ${V.vgC};
    padding-inline: unset;
}

:host fluent-tab-panel {
    height: 251px;
    padding: 0px;
}

:host .heading-container a {
    font-weight: 550;
    text-decoration: none;
    color: var(--foreground-on-accent-active); 
    font-size: ${V.cSu};
    line-height: ${V.RUt};
}

:host .tabs-feed-card{
    padding: 8px 16px 16px 16px;
    border-radius: 6px;
    --gradient-background: var(--background-gradient-angle), #FEFAD7 1.14%, #E6DBF8 85.67%;
    background: linear-gradient(var(--gradient-background));
}

.load-error, .loading {
    align-items: center;
    display: flex;
    flex-direction: column;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

:host .heading-container a:hover, 
:host .heading-container a:focus-visible {
    text-decoration: underline;
}

:host ::part(msft-stripe) {
    margin: 0;
}

:host ::part(img) {
    border-radius: 0px;
}

:host ::part(heading) {
    font-size: ${V.PwC};
}

:host ::part(fluent-card) {
    background-color: var(--neutral-layer-card);
}
`.withBehaviors(new q.O(mt,bt),(0,W.vF)(z.i`
                :host {
                    forced-color-adjust: auto;
                }
            `),(0,W.Uu)(z.i`
                :host .tabs-feed-card {
                    --background-gradient-angle-dark-mode: 134.62deg;
                    --gradient-background-dark-mode: var(--background-gradient-angle-dark-mode), #512C2C 1.14%, #252C4E 86.08%;
                    background: linear-gradient(var(--gradient-background-dark-mode));
                }

                :host .heading-container a {
                    color: var(--neutral-foreground-rest);
                }

                :host fluent-tab {
                    color: #BABABA;
                }
            `)),xt={experienceConfigSchema:y};(0,r.z)().withShadowRootMode("closed").withElementDisambiguation((()=>h.h.ignoreDuplicate)).register((0,s.hb)(),(0,d.ay)(),(0,l.xg)(),(0,c.YS)(),(0,u.CZ)()),h.K.getOrCreate().withShadowRootMode("open").withElementDisambiguation((()=>h.h.ignoreDuplicate)).withPrefix("msft").register((0,n.iI)(),(0,o.B4)(),(0,a.tO)())},74045:function(e,t,i){"use strict";var n,o;i.d(t,{KE:function(){return r},O7:function(){return n},Qp:function(){return s},Us:function(){return o},XQ:function(){return a}}),function(e){e[e.none=0]="none",e[e.enabled=1]="enabled",e[e.saved=2]="saved",e[e.hide=4]="hide",e[e.showMore=8]="showMore",e[e.showFewer=16]="showFewer",e[e.mute=32]="mute",e[e.hidden=64]="hidden",e[e.report=128]="report",e[e.adFeedbackSubmitted=256]="adFeedbackSubmitted",e[e.hideTopic=512]="hideTopic",e[e.dismiss=1024]="dismiss",e[e.adPrivacy=2048]="adPrivacy"}(n||(n={})),function(e){e.Hide="Hide",e.Like="Like",e.Disabled="Disabled",e.Dislike="Dislike",e.Mute="Mute",e.Save="Save",e.Share="Share",e.ShowMore="ShowMore",e.ShowFewer="ShowFewer",e.Divider="Divider",e.Report="Report",e.ManageInterests="ManageInterests",e.ReportAd="ReportAd",e.AdPrivacy="AdPrivacy",e.HideTopic="HideTopic"}(o||(o={}));const a=e=>{const t=[],i={AdultImage:"AdultImage",RacyImage:"RacyImage",TextProfanity:"TextProfanity",SubstanceAbuse:"SubstanceAbuse",Violence:"Violence",Misinformation:"Misinformation",Other:"Other"};return e&&Object.keys(e).forEach((n=>{e[n]&&t.push(i[n])})),t},r="/service/feedback/api/reportanissue",s="https://assets.msn.cn/service/feedback/api/reportanissue"},41069:function(e,t,i){"use strict";i.d(t,{cI:function(){return j},Fo:function(){return N},Ze:function(){return D},A$:function(){return E},oo:function(){return M},ZO:function(){return k},Yj:function(){return $},FS:function(){return F},dq:function(){return P},gS:function(){return _},Q6:function(){return I},X5:function(){return A},EU:function(){return O},tD:function(){return T},Xr:function(){return R},AV:function(){return H},jr:function(){return L}});var n=i(51873),o=i(37429),a=i(39181),r=i(13988),s=i(46943),d=i(74045),l=i(76859),c=i(40565),u=i(20048),h=i(3708),p=i(80709),g=i(16517),f=i(83721),v=i(24261),m=i(62734),b=i(82128),y=i(81563),C=i(78408),x=i.n(C),w=i(83572),S=i.n(w);u.R;const $=a.d`
<button 
    slot="hide-story"
    class="dismiss"
    aria-label="${e=>e.cardActionsTooltips&&e.cardActionsTooltips.hide}"
    title="${e=>e.cardActionsTooltips&&e.cardActionsTooltips.hide}"
    @click=${(e,t)=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus^d.O7.hide,"Hide",!0,null,null,null,t.event)}
    @keypress=${e=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus^d.O7.hide,"Hide",!0)}
    data-t="${e=>e.telemetryContext&&e.telemetryContext.hide&&e.telemetryContext.hide.getMetadataTag()}"
>
    <svg
        width="16"
        height="16"
        viewBox="0 0 16 16"
        xmlns="http://www.w3.org/2000/svg"
    >
        <path
            d="M11.4587 4.39737L11.5355 4.46449C11.804 4.73297 11.8264 5.15437 11.6027 5.44835L11.5355 5.52515L9.06066 8.00002L11.5355 10.4749C11.804 10.7434 11.8264 11.1648 11.6027 11.4588L11.5355 11.5356C11.267 11.804 10.8456 11.8264 10.5517 11.6027L10.4749 11.5356L8 9.06068L5.52513 11.5356C5.25664 11.804 4.83524 11.8264 4.54127 11.6027L4.46447 11.5356C4.19598 11.2671 4.17361 10.8457 4.39734 10.5517L4.46447 10.4749L6.93934 8.00002L4.46447 5.52515C4.19598 5.25666 4.17361 4.83526 4.39734 4.54129L4.46447 4.46449C4.73295 4.196 5.15435 4.17363 5.44832 4.39737L5.52513 4.46449L8 6.93936L10.4749 4.46449C10.7434 4.196 11.1648 4.17363 11.4587 4.39737Z"
        />
    </svg>
</button>
`,k=a.d`
<fluent-button slot="hover-actions" appearance="stealth"
    style="min-width: 24px; width: 24px; height: 24px; border-radius: 16px; ${m.XC}; flex-direction: column; --neutral-fill-stealth-rest: #FFFFFF; --neutral-fill-stealth-hover: #F2F2F2; --neutral-fill-stealth-active: #F7F7F7; fill: #2B2B2B"
    aria-label="${e=>e.cardActionsTooltips&&e.cardActionsTooltips.hide}"
    title="${e=>e.cardActionsTooltips&&e.cardActionsTooltips.hide}"
    @click=${e=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus^d.O7.hide,"Hide",!0)}
    @keypress=${e=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus^d.O7.hide,"Hide",!0)}
    data-t="${e=>e.telemetryContext&&e.telemetryContext.hide&&e.telemetryContext.hide.getMetadataTag()}"
>
    <svg style="width: 8px; height: 24px; vertical-align: middle;" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
        <path d="M6.84961 6L12 11.1504L11.1504 12L6 6.84961L0.849609 12L0 11.1504L5.15039 6L0 0.849609L0.849609 0L6 5.15039L11.1504 0L12 0.849609L6.84961 6Z"/>
    </svg>
</fluent-button>
`,L=({theme:e="default"})=>a.d`
<div style="display: flex; gap: 4px;">
    ${(0,r.g)((e=>e.optedOutOfReactions),a.d`
        ${T}
        ${O}
    `)}
    <social-bar-wc
        config-instance-src=${e=>e.socialBarWCConfigInfo&&(0,b.g)(e.socialBarWCConfigInfo)}
        instance-id=${e=>e.socialBarWCConfigInfo&&e.socialBarWCConfigInfo.instanceId}
        config-shared-ns=${e=>{var t,i;return null===(i=null===(t=e.socialBarWCConfigInfo)||void 0===t?void 0:t.configRef)||void 0===i?void 0:i.sharedNs}}
        :additionalHeaders=${e=>e.additionalHeaders}
        :canShowOneLineComments=${e=>!(e.isInfopane||e.cardSize!==l.Nv._2x_2y||"flex-article-card"===e.card_template_type&&e.articleTopCommentConfigInfo&&e.articleTopCommentId)}
        :contentId=${e=>e.id}
        :destinationUrl=${e=>e.destinationUrl}
        :locale=${e=>g.jG.CurrentMarket||e.locale}
        :rootTelemetryObject=${e=>e.telemetryContext&&(e.telemetryContext.contentCardTelemetryObject||e.telemetryContext.contentCard)}
        :getReplacementCardsInlineCallback=${e=>e.getReplacementCardsInlineCallback}
        :socialMetadata=${e=>Object.assign(Object.assign({},e.metadata),{imageData:e.imageData,providerData:e.providerData,title:e.title})}
        :theme=${t=>e}
    />
</div>
`,T=a.d`
<msn-card-button
    class="card-button"
    data-icon=${d.O7.showMore}
    style="${e=>e.isInfopane||e.optedOutOfReactions||!e.enableFilledIconOnHover?"":"display: flex;"} ${e=>e.enableAnimatedShowMoreBtn||e.optedOutOfReactions||!e.enableFilledIconOnHover?"":"margin-inline-end: 8px;"}"
    select-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.showMore}
    unselect-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.undoShowMore}
    animation-text=${e=>e.showMoreAnimationTitle}
    select-icon=${e=>e.useArrowIcons&&!e.optedOutOfReactions?S():p.Z}
    unselect-icon=${e=>e.useArrowIcons&&!e.optedOutOfReactions?x():h.Z}
    filled-icon-path=${e=>e.useArrowIcons&&!e.optedOutOfReactions?s.Z4:s.Ol}
    fill-color-selected=${e=>!e.enableNeutralFilledShowMoreIcon&&f.m}
    layout=${e=>(0,n.Q8)(e)}
    selected=${e=>!!(e.cardActionStatus&d.O7.showMore)}
    @selected-state-changed=${(e,t)=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus&d.O7.showFewer?e.cardActionStatus^d.O7.showMore^d.O7.showFewer:e.cardActionStatus^d.O7.showMore,"ShowMore",!0,e.cardActionClickHandler,null,!e.enableAnimatedShowMoreBtn,t.event)}
    select-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.showMore&&e.telemetryContext.showMore.getMetadataTag()}
    unselect-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.undoShowMore&&e.telemetryContext.undoShowMore.getMetadataTag()}
>
</msn-card-button>
`,O=a.d`
<msn-card-button
    class="card-button"
    data-icon=${d.O7.showFewer}
    style="${e=>!e.enableAnimatedShowMoreBtn&&e.enableFilledIconOnHover?"margin-inline-start: 8px;":""}"
    select-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.showFewer}
    unselect-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.undoShowFewer}
    select-icon=${e=>'<svg width="16" height="18" viewBox="0 0 16 18"><path d="M10.48 17.3c-.8.83-2.09.38-2.43-.6-.28-.8-.64-1.77-1-2.48C6 12.1 5.37 10.9 3.67 9.37c-.23-.2-.52-.36-.84-.49C1.7 8.44.63 7.27.9 5.88l.36-1.77a2.5 2.5 0 0 1 1.8-1.92L8.66.66a4.5 4.5 0 0 1 5.6 3.54l.69 3.76A3 3 0 0 1 12 11.5h-.88l.01.05c.08.41.18.97.24 1.58.07.62.1 1.29.05 1.92a3.68 3.68 0 0 1-.5 1.73c-.11.16-.28.35-.44.52Z"/></svg>'}
    unselect-icon=${e=>'<svg width="16" height="18" viewBox="0 0 16 18"><path d="M8.05 16.7c.34.98 1.63 1.43 2.43.6.16-.17.33-.36.44-.52.32-.48.45-1.12.5-1.73.05-.63.02-1.3-.05-1.91-.06-.62-.16-1.18-.24-1.59v-.05H12a3 3 0 0 0 2.96-3.54l-.69-3.76A4.5 4.5 0 0 0 8.67.67l-5.6 1.52c-.92.25-1.62 1-1.8 1.92L.9 5.88c-.27 1.39.79 2.56 1.92 3 .32.13.61.3.84.5 1.7 1.5 2.32 2.72 3.38 4.84.36.71.72 1.68 1 2.49Zm1.96-5.58v.01l.01.03a8.94 8.94 0 0 1 .13.58c.08.4.17.92.23 1.5s.09 1.18.04 1.73c-.04.55-.16.98-.34 1.25-.05.1-.17.22-.32.39-.2.2-.63.16-.76-.23-.29-.82-.67-1.83-1.05-2.6-1.07-2.14-1.76-3.5-3.62-5.15-.34-.3-.74-.52-1.13-.68-.89-.34-1.45-1.14-1.3-1.87l.35-1.77c.1-.56.53-1 1.07-1.15l5.6-1.53a3.5 3.5 0 0 1 4.37 2.75l.68 3.76A2 2 0 0 1 12 10.5h-1.5a.5.5 0 0 0-.48.62Z"/></svg>'}
    filled-icon-path=${e=>s.Vy}
    fill-color-selected=${e=>!e.enableNeutralFilledShowMoreIcon&&f.m}
    layout=${e=>(0,n.Q8)(e)}
    selected=${e=>!!(e.cardActionStatus&d.O7.showFewer)}
    @selected-state-changed=${(e,t)=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus&d.O7.showMore?e.cardActionStatus^d.O7.showMore^d.O7.showFewer:e.cardActionStatus^d.O7.showFewer,"ShowFewer",!0,e.cardActionClickHandler,null,!e.contentType,t.event)}
    select-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.showMore&&e.telemetryContext.showFewer.getMetadataTag()}
    unselect-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.undoShowFewer&&e.telemetryContext.undoShowFewer.getMetadataTag()}
>
</msn-card-button>
`,I=a.d`
<msn-card-button
    class="card-button"
    select-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.save}
    unselect-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.undoSave}
    select-icon=${e=>e.enableFilledIconOnHover?'<svg width="20" height="20" viewBox="0 0 20 20"><path d="M4 4.5A2.5 2.5 0 0 1 6.5 2h7A2.5 2.5 0 0 1 16 4.5v13a.5.5 0 0 1-.8.4L10 14.12 4.8 17.9a.5.5 0 0 1-.8-.4v-13Z"/></svg>':'<svg width="16" height="16" viewBox="0 0 16 16"><path d="M3.78 13.92A.5.5 0 0 1 3 13.5V4.01c0-1.1.9-2 2-2h6A2 2 0 0 1 13 4v9.5a.5.5 0 0 1-.78.42L8 11.1l-4.22 2.82Z"/></svg>'}
    unselect-icon=${e=>e.enableFilledIconOnHover?'<svg width="20" height="20" viewBox="0 0 20 20"><path d="M4 4.5A2.5 2.5 0 0 1 6.5 2h7A2.5 2.5 0 0 1 16 4.5v13a.5.5 0 0 1-.8.4L10 14.12 4.8 17.9a.5.5 0 0 1-.8-.4v-13ZM6.5 3C5.67 3 5 3.67 5 4.5v12.02l4.7-3.42a.5.5 0 0 1 .6 0l4.7 3.42V4.5c0-.83-.67-1.5-1.5-1.5h-7Z"/></svg>':'<svg width="16" height="16" viewBox="0 0 16 16"><path d="M3.78 13.92A.5.5 0 0 1 3 13.5V4.01c0-1.1.9-2 2-2h6A2 2 0 0 1 13 4v9.5a.5.5 0 0 1-.78.42L8 11.1l-4.22 2.82ZM12 4v-.12A1 1 0 0 0 11 3l-6 .01a1 1 0 0 0-1 1v8.56l3.72-2.49a.5.5 0 0 1 .56 0L12 12.57V4Z"/></svg>'}
    filled-icon-path=${e=>s.pt}
    fill-color-selected=${e=>!e.enableNeutralFilledShowMoreIcon&&f.m}
    layout=${e=>(0,n.Q8)(e)}
    selected=${e=>!!(e.cardActionStatus&d.O7.saved)}
    @selected-state-changed=${e=>e.cardActionClickHandler&&e.cardActionClickHandler(e.id,e.cardActionStatus^d.O7.saved,"Save",!0)}
    select-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.save&&e.telemetryContext.save.getMetadataTag()}
    unselect-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.save&&e.telemetryContext.save.getMetadataTag()}
>
</msn-card-button>
`,A=a.d`
<msn-card-button
    class="card-button"
    style="${e=>e.isInfopane||e.enableFilledIconOnHover&&(!e.enableFilledIconOnHover||e.optedOutOfReactions)?"":"display: inline-flex;"}"
    select-title=${e=>e.cardActionsTooltips&&e.cardActionsTooltips.seeMore}
    unselect-icon=${e=>c.Z}
    filled-icon-path=${e=>s.Cp}
    layout=${e=>(0,n.Q8)(e)}
    @selected-state-changed=${(e,t)=>e.useMobile?(0,v.H_)(t.event,void 0,e,e.actionMenuLocalizedStrings):e.toggleCardActionMenu&&e.toggleCardActionMenu(e,t.event)}
    select-telemetry-tag=${e=>e.telemetryContext&&e.telemetryContext.seeMore&&e.telemetryContext.seeMore.getMetadataTag()}
>
</msn-card-button>
`,P=a.d`
${(0,r.g)((e=>e.isAnaheimDesign&&!e.useSmallFontSize),a.d`
    <h3 class="info-pane-slide-title" style="pointer-events: none;" part="info-pane-slide-title">
        ${e=>e.title}
    </h3>
`)}
${(0,r.g)((e=>e.isAnaheimDesign&&e.useSmallFontSize),a.d`
    ${e=>e.title}
`)}
${(0,r.g)((e=>!e.isAnaheimDesign),a.d`
    ${e=>e.title}
`)}
`,F=a.d`
<style>
    .title-ad-triple .info-pane-slide-title, .title-ad-double .info-pane-slide-title {
        font-weight: 400;
        margin-top: 6px;
        position: relative;
        cursor: pointer;
        z-index: 2;
        overflow: hidden;
        max-height: 90px;
        font-size: 20px;
        line-height: 28px;
    }

    .info-pane-slide-title {
        overflow: hidden;
        font-weight:600;
        font-size:28px;
        line-height:36px;
        margin-top:0;
        margin-bottom:0;
        transition:all .2s ease-in-out;
        box-sizing: content-box;
        max-height: 108px;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
    :host msft-content-card.native-ad-infopane-content-card .info-pane-slide-title {
        -webkit-line-clamp: 1;
    }
    :host msft-content-card.native-ad-infopane-content-card:hover .info-pane-slide-title{
        -webkit-line-clamp: 2;
    }
    :host .hasInlineDecoration .info-pane-slide-title {
        -webkit-line-clamp: 2;
    }
    :host msft-content-card.native-ad-infopane-horizontal .info-pane-slide-title{
        -webkit-line-clamp: 2;
    }
</style>
`,M=e=>a.d`
        ${(0,r.g)((e=>e.providerData),a.d`
            ${(0,r.g)((e=>e.isAnaheimDesign),a.d`
                <msft-attribution slot="${e}" style="color:#fff;pointer-events: none;--design-unit: 1.5;">
                    ${D()}
                    <div class="attribution_container_${e=>e.id}" id="attribution_container">
                        <div class="attribution_Content_${e=>e.id}" style="${e=>"rtl"===e.dir?"right":"left"}:0px;${e=>e.isProviderIconClickable?"padding: 0 10px;":""}">
                            ${(0,r.g)((e=>e.providerData&&e.providerData.name&&(!e.isProviderIconClickable||!e.providerData.profileId)),a.d`<span style="unicode-bidi: embed;">${e=>e.providerData.name}</span>`)}
                            ${(0,r.g)((e=>e.providerData&&e.providerData.name&&e.publishedDateTime),a.d` · `)}
                            ${(0,r.g)((e=>e.publishedDateTime),a.d`<span style="unicode-bidi: embed;">${e=>e.publishedDateTime}</span>`)}
                            ${(0,r.g)((e=>e.isWebContent&&e.crawledContentLabel),a.d` · `)}
                            ${(0,r.g)((e=>e.isWebContent&&e.crawledContentLabel),a.d`${e=>e.crawledContentLabel}`)}
                        </div>
                    </div>
                </msft-attribution>
            `)}
            ${(0,r.g)((e=>!e.isAnaheimDesign),a.d`
                <msft-attribution slot="attribution" style="--design-unit: 1.5;">
                    ${D()}
                    <div class="attribution_container_${e=>e.id}" id="attribution_container">
                        <div class="attribution_Content_${e=>e.id}" style="${e=>"rtl"===e.dir?"right":"left"}:0px;${e=>e.isProviderIconClickable?"padding: 0 10px;":""}">
                            ${(0,r.g)((e=>e.providerData&&e.providerData.name&&(!e.isProviderIconClickable||!e.providerData.profileId)),a.d`<span style="unicode-bidi: embed;">${e=>e.providerData.name}</span>`)}
                            ${(0,r.g)((e=>e.providerData&&e.providerData.name&&e.publishedDateTime),a.d` · `)}
                            ${(0,r.g)((e=>e.publishedDateTime),a.d`<span style="unicode-bidi: embed;">${e=>e.publishedDateTime}</span>`)}
                            ${(0,r.g)((e=>e.isWebContent&&e.crawledContentLabel),a.d` · `)}
                            ${(0,r.g)((e=>e.isWebContent&&e.crawledContentLabel),a.d`${e=>e.crawledContentLabel}`)}
                        </div>
                    </div>
                </msft-attribution>
            `)}
        `)}
    `,E=(e,t)=>a.d`
<msft-content-indicator slot="content-indicator" style="--control-corner-radius: 4">
    ${e}
    ${t||""}
</msft-content-indicator>
`,D=()=>a.d`
    ${(0,r.g)((e=>e.providerData.logoImage),a.d`
        ${(0,r.g)((e=>e.isProviderIconClickable&&e.providerData&&e.providerData.profileId),a.d`
            <a class="attribution-icon-clickable" href=${e=>(0,n.jz)(e.providerData.profileId)} target="_blank" title="${e=>e.providerData.name}" tabindex="-1"
                data-t="${e=>e.telemetryContext&&e.telemetryContext.clickableProviderIcon&&e.telemetryContext.clickableProviderIcon.getMetadataTag()}">
                <img slot="image" src="${e=>e.providerData.logoImage}" tabindex="0" alt="${e=>e.providerData.name}" @load=${e=>e.imageData&&e.imageData.visualReadinessCallback&&e.imageData.visualReadinessCallback(o.u.VP,o.w.provider)}/>
                <span class="attribution-provider-name" tabindex="0">${e=>e.providerData.name}</span>
            </a>
        `)}
        ${(0,r.g)((e=>!e.isProviderIconClickable||!e.providerData.profileId),a.d`
            <img slot="image" src="${e=>e.providerData&&e.providerData.logoImage}" alt="${e=>e.providerData&&e.providerData.name}" 
            @load=${e=>e.imageData&&e.imageData.visualReadinessCallback&&e.imageData.visualReadinessCallback(o.u.VP,o.w.provider)}/>
        `)}
    `)}
    ${(0,r.g)((e=>e.isProviderIconClickable&&e.providerData&&e.providerData.name&&e.providerData.profileId&&!e.providerData.logoImage),a.d`
        <a class="attribution-icon-clickable" href=${e=>(0,n.jz)(e.providerData.profileId)} target="_blank" title="${e=>e.providerData.name}" tabindex="-1"
            data-t="${e=>e.telemetryContext&&e.telemetryContext.clickableProviderIcon&&e.telemetryContext.clickableProviderIcon.getMetadataTag()}">
            <span style="unicode-bidi: embed;margin-inline-end: -5px;" tabindex="0">${e=>e.providerData.name}</span>
        </a>
    `)}
    ${(0,r.g)((e=>e.isProviderIconClickable&&e.providerData.profileId),a.d`
        <style>
            .attribution-icon-clickable {
                z-index: 4;
                color: unset;
                text-decoration: none;
                display: inline-flex;
            }
            .attribution-icon-clickable:hover {
                text-decoration: underline;
            }
            .attribution-provider-name {
                unicode-bidi: embed;
                margin-inline-start: 10px;
                margin-inline-end: -5px;
            }
        </style>
    `)}
`,H=a.d`
    <msft-attribution slot="attribution">
        ${D()}
        <div class="attribution_container_${e=>e.id}" id="attribution_container">
            <div class="attribution_Content_${e=>e.id}" style="${e=>"rtl"===e.dir?"right":"left"}:0px;${e=>e.isProviderIconClickable?"padding: 0 10px;":""}">
                ${(0,r.g)((e=>e.providerData&&e.providerData.name&&(!e.isProviderIconClickable||!e.providerData.profileId)),a.d`<span style="unicode-bidi: embed;">${e=>e.providerData.name}</span>`)}
                ${(0,r.g)((e=>e.providerData&&e.providerData.name&&e.publishedDateTime),a.d` · `)}
                ${(0,r.g)((e=>e.publishedDateTime),a.d`<span style="unicode-bidi: embed;">${e=>e.publishedDateTime}</span>`)}
                ${(0,r.g)((e=>e.isWebContent&&e.crawledContentLabel),a.d` · `)}
                ${(0,r.g)((e=>e.isWebContent&&e.crawledContentLabel),a.d`${e=>e.crawledContentLabel}`)}
            </div>
        </div>
    </msft-attribution>
`,R=a.d`
    <msft-attribution slot="attribution">
        ${D()}
        ${(0,r.g)((e=>e.providerData.name&&(!e.isProviderIconClickable||!e.providerData.profileId)),a.d`<span style="unicode-bidi:embed">${e=>e.providerData.name}</span>`)}
        ${(0,r.g)((e=>e.providerData.name&&e.publishedDateTime),a.d` · `)}
        ${(0,r.g)((e=>e.publishedDateTime),a.d`${e=>e.publishedDateTime}`)}
    </msft-attribution>
`,N=(e,t=!0,i=!0)=>a.d`
    <msn-content-badge
        slot="content-indicator"
        iconName=${e.type}
        showColored=${t}
        class=${e=>i&&e.contentIndicator&&(e.cardSize!==l.Nv._1x_1y||e.imageData)&&"video"!=e.contentType?"offset-engagement-badge":""}
    >
        ${e.localizedLabel||e.value}
    </msn-content-badge>
`,j=({fallbackFeed:e})=>a.d`
${(0,r.g)((()=>e),a.d` 
    <div class="heading-group-error"><h2>${()=>e.title}</h2>
    ${(0,r.g)((()=>e.subTitle),a.d`
        <div class="subheading-error">
            <span>${e.subTitle}</span>
        </div>
    `)}
    ${(0,r.g)((()=>e.refreshButton),a.d`
        <fluent-button 
            appearance="accent"
            class="refresh-button"
            data-t="${()=>e.refreshButton.telemetryObject&&e.refreshButton.telemetryObject.getMetadataTag()}"
            @click=${()=>e.refreshButton.onClick()}
            @keypress=${()=>e.refreshButton.onClick()}
            >
            ${()=>e.refreshButton.title}
        </fluent-button>
    `)}
</div>`)}`,_=a.d`
${(0,r.g)((e=>e.config.childExperienceReferencesWC&&e.config.childExperienceReferencesWC.pillWC),a.d`${e=>(0,y.O)(e.config.childExperienceReferencesWC.pillWC,{properties:{refreshCallback:()=>e.feedManager.callRefreshRegionsData({invalidateCache:!0,scrollToTop:!0}),getDesktopFeedRect:()=>e.getBoundingClientRect()}})}`)}
`},51873:function(e,t,i){"use strict";i.d(t,{$Y:function(){return o},Q8:function(){return s},jz:function(){return d},pj:function(){return r}});var n=i(16517);var o,a;function r(e){return e?[{isDarkMode:!0,hexColor:a.imgDark},{isDarkMode:!1,hexColor:a.imgLight}]:[{isDarkMode:!0,hexColor:a.noImgDark},{isDarkMode:!1,hexColor:a.noImgLight}]}function s(e){return e.enableAnimatedShowMoreBtn?"animated":e.enableFilledIconOnHover?"fillediconhover":e.noBackPlateOnRest?"nobackplate":"default"}function d(e){return`https://www.msn.com/${n.jG.CurrentMarket}/community/channel/${e}`}!function(e){e.default="default",e.condensed="condensed",e.infoPane="infoPane",e.infoPane1x3y="infoPane1x3y",e.infoPaneSplitVertical="infoPaneSplitVertical",e.infoPaneSplitHorizontal="infoPaneSplitHorizontal"}(o||(o={})),function(e){e.imgLight="#F5F5F5",e.imgDark="#2E2E2E",e.noImgLight="#DEDEDE",e.noImgDark="#222"}(a||(a={}))},37429:function(e,t,i){"use strict";var n,o;i.d(t,{u:function(){return n},w:function(){return o}}),function(e){e[e.ALL=3]="ALL",e[e.VP=1]="VP",e[e.TTVR=2]="TTVR"}(n||(n={})),function(e){e.image="image",e.provider="provider",e.socialBar="socialBar"}(o||(o={}))},76859:function(e,t,i){"use strict";i.d(t,{C7:function(){return r},Nv:function(){return n},OO:function(){return s},X9:function(){return d},sn:function(){return a}});var n,o=i(9791);!function(e){e._1x_1y="_1x_1y",e._1x_2y="_1x_2y",e._1x_3y="_1x_3y",e._1x_4y="_1x_4y",e._1x_5y="_1x_5y",e._2x_1y="_2x_1y",e._2x_2y="_2x_2y",e._2x_3y="_2x_3y",e._2x_4y="_2x_4y",e._2x_6y="_2x_6y",e._3x_1y="_3x_1y",e._3x_2y="_3x_2y",e._4x_1y="_4x_1y",e._4x_2y="_4x_2y",e._5x_1y="_5x_1y",e._5x_2y="_5x_2y"}(n||(n={}));const a=146,r=300,s=12,d=(0,o.Z)((e=>Array(e).fill(a)))},46943:function(e,t,i){"use strict";i.d(t,{Cp:function(){return o},Ol:function(){return r},Vy:function(){return a},Z4:function(){return s},pt:function(){return n}});const n="M4 4.5C4 3.11929 5.11929 2 6.5 2H13.5C14.8807 2 16 3.11929 16 4.5V17.5C16 17.6881 15.8945 17.8602 15.7269 17.9456C15.5593 18.0309 15.358 18.015 15.2059 17.9044L10 14.1183L4.79409 17.9044C4.64199 18.015 4.4407 18.0309 4.27311 17.9456C4.10553 17.8602 4 17.6881 4 17.5V4.5Z",o="M6.75 10C6.75 10.9665 5.9665 11.75 5 11.75C4.0335 11.75 3.25 10.9665 3.25 10C3.25 9.0335 4.0335 8.25 5 8.25C5.9665 8.25 6.75 9.0335 6.75 10ZM11.75 10C11.75 10.9665 10.9665 11.75 10 11.75C9.0335 11.75 8.25 10.9665 8.25 10C8.25 9.0335 9.0335 8.25 10 8.25C10.9665 8.25 11.75 9.0335 11.75 10ZM15 11.75C15.9665 11.75 16.75 10.9665 16.75 10C16.75 9.0335 15.9665 8.25 15 8.25C14.0335 8.25 13.25 9.0335 13.25 10C13.25 10.9665 14.0335 11.75 15 11.75Z",a="M10.4814 17.2959C9.6826 18.133 8.38983 17.6828 8.05052 16.7055C7.77059 15.8992 7.40693 14.9337 7.05259 14.2228C5.99295 12.0969 5.37437 10.8873 3.66827 9.37379C3.4419 9.17297 3.15017 9.01115 2.82758 8.88364C1.69845 8.43732 0.636624 7.26755 0.914347 5.87894L1.26738 4.11377C1.45309 3.18522 2.14748 2.4413 3.06104 2.19215L8.66078 0.664945C11.2063 -0.029292 13.8002 1.60545 14.2722 4.2014L14.9562 7.9631C15.291 9.80462 13.8763 11.4998 12.0046 11.4998H11.121L11.1314 11.552C11.2114 11.9602 11.3079 12.5223 11.3723 13.1349C11.4366 13.7452 11.4706 14.4193 11.4204 15.0474C11.3711 15.6638 11.2365 16.2966 10.9161 16.7771C10.8066 16.9413 10.644 17.1255 10.4814 17.2959Z",r="M10.4814 0.703737C9.6826 -0.133389 8.38983 0.316883 8.05052 1.29418C7.77059 2.10043 7.40693 3.06594 7.05259 3.77684C5.99295 5.90276 5.37437 7.11234 3.66827 8.62586C3.4419 8.82668 3.15017 8.9885 2.82758 9.11601C1.69845 9.56233 0.636624 10.7321 0.914347 12.1207L1.26738 13.8859C1.45309 14.8144 2.14748 15.5583 3.06104 15.8075L8.66078 17.3347C11.2063 18.0289 13.8002 16.3942 14.2722 13.7983L14.9562 10.0365C15.291 8.19503 13.8763 6.49989 12.0046 6.49989H11.121L11.1314 6.44766C11.2114 6.03948 11.3079 5.47735 11.3723 4.86473C11.4366 4.25446 11.4706 3.58034 11.4204 2.9522C11.3711 2.33584 11.2365 1.70305 10.9161 1.22254C10.8066 1.05832 10.644 0.874161 10.4814 0.703737Z",s="M11.14 2.53a1.5 1.5 0 00-2.28 0l-6.62 7.8A1 1 0 003 11.98h3V17a1 1 0 001 1h6a1 1 0 001-1v-5.02h3a1 1 0 00.76-1.65l-6.62-7.8z"},86294:function(e,t,i){"use strict";var n;i.d(t,{U:function(){return n}}),function(e){e.TopicFeedCard="topic-feed-card",e.articleFreCard="article-fre-card",e.autosCarouselCard="autos-carousel-card",e.autosMarketplaceCard="autos-marketplace-card",e.bingVideoCarousel="bing-video-carousel",e.casualGamesCard="casual-games-card",e.coldStartCard="cold-start-card",e.comicsCarouselCard="comics-carousel-card",e.commuteCard="commute-card",e.companyNewsCard="company-news-card",e.contentCard="content-card",e.contentCardPreview1x="content-card-preview-1x",e.contentGroupCard="content-group-card",e.dailyFixGamesCarouselCard="daily-fix-games-carousel-card",e.denseCard="dense-card",e.digestCard="digest-card",e.displayAdCard="display-ad-card",e.edgeShoppingCard="edge-shopping-card",e.editorsPickCarouselCard="editors-pick-carousel-card",e.electionsCard="elections-card",e.esportsCard="esports-card",e.esportsStreamsCard="esports-streams-card",e.flexArticleCard="flex-article-card",e.gamingCompeteCard="gaming-compete-card",e.gamingMatchCard="gaming-match-card",e.gamingMediaCarouselCard="gaming-media-carousel-card",e.gamingPersonalizationCard="gaming-personalization-card",e.gamingRecentlyPlayedCard="gaming-recentlyplayed-card",e.gamingRecommendedCard="gaming-recommended-card",e.gamingRedditCard="gaming-reddit-card",e.gamingRewardsCard="gaming-rewards-card",e.gamingStreamCard="gaming-stream-card",e.gamingTournamentCard="gaming-tournament-card",e.gamingUpcomingCard="gaming-upcoming-card",e.gamingVideoCard="gaming-video-card",e.groceryCouponSdCard="grocery-coupon-sd-card",e.healthCard="health-card",e.healthFitnessCard="health-fitness-card",e.healthTipCard="health-tip-card",e.hideStoryCard="hide-story-card",e.horoscopeAnswerCard="horoscope-card",e.industryNewsCard="industry-news-card",e.infopaneCard="infopane-card",e.infopaneSlideCard="infopane-slide-card",e.linkedInCard="linked-in-card",e.localNewsCarouselCard="local-news-carousel-card",e.lotteryCard="lottery-card",e.marketplaceCard="marketplace-card",e.microsoftFeedCard="microsoft-feed-card",e.moneyAddWatchlistCard="money-add-watchlist-card",e.moneyCard="money-card",e.moneyEdgeCard="money-edge-card",e.moneyInfoCardWC="money-info-card",e.moneyTopicStripeCarouselCard="money-topic-stripe-carousel-card",e.nativeAdCard="native-ad-card",e.newsGroupsCard="news-groups-card",e.newsSegmentCarousel="news-segment-carousel",e.onThisDayCard="on-this-day-card",e.partnerUpsellCard="partner-upsell",e.perspectiveCard="perspective-card",e.placeholderCard="placeholder-card",e.pollsCard="polls-card",e.preconsumptionArticleCard="preconsumption-article-card",e.prismCard="prism-card",e.prismCarouselCard="prism-carousel-card",e.profileCarouselCard="profile-carousel-card",e.publisherCarouselCard="publisher-carousel-card",e.qnaCard="qna-card",e.quizCard="quiz-card",e.recipesCard="recipes-card",e.recommendedCardFeed="recommended-card-feed",e.recommendedInterestsCard="recommended-interests-card",e.recommendedSearchCarousel="recommended-search-carousel",e.recommendedSearchesCard="recommended-searches-card",e.rewardsCard="rewards-card",e.rewardsDailySetCard="rewards-daily-set-card",e.sectionHeaderCard="section-header-card",e.selectCarouselCard="select-carousel-card",e.serendipityCard="serendipity-card",e.shoppingCard="shopping-card",e.shoppingCarouselCard="shopping-carousel-card",e.shoppingCarouselProngWC="shopping-carousel-prong-wc",e.shoppingEventsDealCard="shopping-events-deal-card",e.sportsCard="sports-card",e.sportsOlympicCard="sports-olympic-card",e.sportsWorldCupCard="sports-worldcup-card",e.spotlightCard="spotlight-card",e.superListCard="super-list-card",e.superappUpsellCard="superapp-upsell-card",e.tabbedFeedCard="tabbed-feed-card",e.topPicksCard="top-picks-card",e.topSitesCard="top-sites-card",e.topStoriesCard="top-stories-card",e.trafficCard="traffic-card",e.travelDestinationCard="travel-destination-card",e.travelDestinationCarouselCard="travel-destination-carousel-card",e.trendingNowCard="trending-now-card",e.trendingTopicsCard="trending-topics-card",e.videoCard="video-card",e.weatherCard="weather-card",e.webContentCard="web-content-card",e.widgetPlaceholderCard="widget-placeholder-card"}(n||(n={}))},9753:function(e,t,i){"use strict";i.d(t,{J:function(){return Ne}});var n=i(86294),o=i(44772);const{TopicFeedCard:a,articleFreCard:r,autosCarouselCard:s,autosMarketplaceCard:d,bingVideoCarousel:l,casualGamesCard:c,comicsCarouselCard:u,commuteCard:h,companyNewsCard:p,contentCard:g,contentGroupCard:f,dailyFixGamesCarouselCard:v,denseCard:m,digestCard:b,editorsPickCarouselCard:y,electionsCard:C,esportsCard:x,esportsStreamsCard:w,gamingCompeteCard:S,gamingMatchCard:$,gamingMediaCarouselCard:k,gamingPersonalizationCard:L,gamingRecentlyPlayedCard:T,gamingRecommendedCard:O,gamingRedditCard:I,gamingRewardsCard:A,gamingStreamCard:P,gamingTournamentCard:F,gamingUpcomingCard:M,gamingVideoCard:E,groceryCouponSdCard:D,healthCard:H,healthFitnessCard:R,healthTipCard:N,horoscopeAnswerCard:j,industryNewsCard:_,infopaneCard:U,localNewsCarouselCard:B,lotteryCard:G,marketplaceCard:z,microsoftFeedCard:V,moneyCard:q,moneyInfoCardWC:W,moneyTopicStripeCarouselCard:J,nativeAdCard:Z,newsGroupsCard:Q,newsSegmentCarousel:Y,onThisDayCard:X,partnerUpsellCard:K,placeholderCard:ee,pollsCard:te,prismCard:ie,prismCarouselCard:ne,profileCarouselCard:oe,publisherCarouselCard:ae,qnaCard:re,quizCard:se,recipesCard:de,recommendedCardFeed:le,recommendedInterestsCard:ce,recommendedSearchCarousel:ue,recommendedSearchesCard:he,rewardsCard:pe,rewardsDailySetCard:ge,sectionHeaderCard:fe,selectCarouselCard:ve,serendipityCard:me,shoppingCard:be,shoppingCarouselCard:ye,shoppingCarouselProngWC:Ce,shoppingEventsDealCard:xe,sportsCard:we,sportsOlympicCard:Se,sportsWorldCupCard:$e,spotlightCard:ke,superListCard:Le,tabbedFeedCard:Te,topPicksCard:Oe,topStoriesCard:Ie,trafficCard:Ae,travelDestinationCard:Pe,travelDestinationCarouselCard:Fe,trendingNowCard:Me,trendingTopicsCard:Ee,weatherCard:De,webContentCard:He,widgetPlaceholderCard:Re}=n.U,Ne={[o.PL.SuperListCard]:Le,[o.PL.PrismCarouselCard]:ne,[o.PL.CommuteCard]:h,[o.PL.DigestCard]:b,[o.PL.Article]:g,[o.PL.Slideshow]:g,[o.PL.Video]:g,[o.PL.Infopane]:U,[o.PL.PartnerUpsell]:K,[o.PL.GroupedContent]:f,[o.PL.UserInterestTopic]:f,[o.PL.ColdStartArticleFreCard]:r,[o.PL.HalfPane]:null,[o.PL.HeadToHead]:null,[o.PL.Mosaic]:null,[o.PL.Triptych]:null,[o.PL.DenseList]:null,[o.PL.WebContent]:He,[o.PL.ExternalLink]:null,[o.PL.TabbedInfopane]:null,[o.PL.TabbedInfopaneTab]:null,[o.PL.PlaceholderCard]:ee,[o.PL.BingHealthCovid19StatsCard]:H,[o.PL.BingHealthFitnessCard]:R,[o.PL.HealthTipCard]:N,[o.PL.AutosCarousel]:s,[o.PL.AutosEntityList]:d,[o.PL.BingVideoCarousel]:l,[o.PL.TabbedFeedCard]:Te,[o.PL.EsportsMatch]:x,[o.PL.EsportsCasualGames]:c,[o.PL.EsportsLiveStream]:w,[o.PL.GamingClip]:P,[o.PL.GamingClipsCarousel]:k,[o.PL.GamingHighlightClipsCarousel]:k,[o.PL.GamingCompete]:S,[o.PL.GamingHighlight]:P,[o.PL.GamingHighlightsCarousel]:k,[o.PL.GamingLiveStream]:P,[o.PL.GamingLiveStreamCarousel]:k,[o.PL.GamingMatch]:$,[o.PL.GamingPersonalize]:L,[o.PL.GamingRecentlyPlayed]:T,[o.PL.GamingRecommendedGames]:O,[o.PL.GamingReddit]:I,[o.PL.GamingRewards]:A,[o.PL.GamingTournament]:F,[o.PL.GamingUpcomingGames]:M,[o.PL.GamingVideoCarousel]:k,[o.PL.GamingVod]:P,[o.PL.GroceryCouponSdCard]:D,[o.PL.StockQuote]:q,[o.PL.MoneyInfo]:W,[o.PL.MoneyTopicStripe]:J,[o.PL.MoneyPreWL]:W,[o.PL.MoneyCrypto]:W,[o.PL.MoneyMarketBrief]:W,[o.PL.MoneyMoreForYouCard]:W,[o.PL.SportsMatch]:we,[o.PL.SportsOlympics]:Se,[o.PL.EventSDCardWorldCup]:$e,[o.PL.EventSDCardWorldCup2]:$e,[o.PL.MyBriefRiverCard]:Oe,[o.PL.TrafficDelays]:Ae,[o.PL.WeatherSummary]:De,[o.PL.ShoppingCard]:ye,[o.PL.EdgeShoppingCard]:ye,[o.PL.ShoppingCarousel]:ye,[o.PL.ShoppingRiver]:ye,[o.PL.EventSDCardShopping]:xe,[o.PL.ComicsCarousel]:u,[o.PL.SelectCarousel]:ve,[o.PL.EditorsPickCarousel]:y,[o.PL.DailyFixGamesCarousel]:v,[o.PL.TopicFeed]:a,[o.PL.NewsSegmentCarousel]:Y,[o.PL.ShoppingMerchantCategoryDeals]:be,[o.PL.ShoppingProngCardResponse]:Ce,[o.PL.SectionHeader]:fe,[o.PL.TopStories]:Ie,[o.PL.WorkHeadlines]:Ie,[o.PL.Trending]:me,[o.PL.Horoscope]:j,[o.PL.Elections]:C,[o.PL.RecommendedInterests]:ce,[o.PL.RecommendedSearchCarousel]:ue,[o.PL.RecommendedSearchesCard]:he,[o.PL.OnThisDay]:X,[o.PL.Lottery]:G,[o.PL.Dense]:m,[o.PL.TrendingInTenMinutes]:Me,[o.PL.TopicFeedTrendingNow]:Me,[o.PL.TrendingTopics]:Ee,[o.PL.Qna]:re,[o.PL.quizcard]:se,[o.PL.Recipes]:de,[o.PL.Inspiration]:ie,[o.PL.Rewards]:pe,[o.PL.SubscriptionCarousel]:ae,[o.PL.TravelDestinationCard]:Pe,[o.PL.TravelDestinationCarouselCard]:Fe,[o.PL.LocalNews]:Le,[o.PL.LocalNewsFeed]:B,[o.PL.BeaconProviderUpsell]:oe,[o.PL.Marketplace]:z,[o.PL.MarketplaceEvent]:z,[o.PL.PollsCard]:te,[o.PL.NewsGroups]:Q,[o.PL.NewsAnswerModule]:Q,[o.PL.TopicFeedWeekends]:b,[o.PL.TopicFeedMomentInTime1]:ke,[o.PL.TopicFeedShopping]:ke,[o.PL.TopicFeedWeather]:ke,[o.PL.NativeAd]:Z,[o.PL.CmsAd]:Z,[o.PL.AmplifyAd]:Z,[o.PL.EventSDCardAmplifyAds]:Z,[o.PL.IndustryNewsCard]:_,[o.PL.MicrosoftFeedCard]:V,[o.PL.RecommendedCardFeed]:le,[o.PL.CompanyNewsCard]:p,[o.PL.Calendar]:Re,[o.PL.Entertainment]:Re,[o.PL.Family]:Re,[o.PL.M365]:Re,[o.PL.Photos]:Re,[o.PL.ThirdPartyWidget]:Re,[o.PL.Tips]:Re,[o.PL.ToDo]:Re,[o.PL.XboxGamePass]:Re,[o.PL.RewardsDailySet]:ge}},89589:function(e,t,i){"use strict";i.d(t,{b:function(){return $}});var n=i(33379),o=i(33940),a=i(54804),r=i(58155),s=i(68364),d=i(26415),l=i(33954),c=i(4596),u=i(29422);class h{constructor(e,t,i=null){this.fetchImpl=e,this.config=t,this.xhrFetch=i,this.cfg=t||h.defaultConfig,this.cfg.appId=this.cfg.appId||h.defaultConfig.appId,this.cfg.num=this.cfg.num||h.defaultConfig.num}geocodeSuggestion(e){return Promise.resolve(null)}getAutoSuggestResponse(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){const i=[{key:"appid",value:this.cfg.appId},{key:"mr",value:""+this.cfg.num},{key:"q",value:e},{key:"setmkt",value:!this.cfg.redirectZhCnJaJpMarket||"ja-jp"!==a.Al.Locale&&"zh-cn"!==a.Al.Locale?a.Al.Locale:"en-us"},{key:"setlang",value:a.Al.Locale},{key:"ul",value:a.Al.ClientSettings?`${a.Al.ClientSettings.geo_lat},${a.Al.ClientSettings.geo_long},100`:""}];let n=[];if(!e||!e.trim||!e.trim().length)return n;const o=new URL(h.bingAutosuggestApi,h.bingAutoSuggestServiceHost);return o.search=r.c.keyValueArrayToQueryString(i),n=yield this.fetchImpl(o.href,{jsonpCallback:"cb"}).then((e=>e.json())).then((e=>this.getLocationFromResponse(e))).catch((e=>(t&&(0,s.H)(d.hTy,"Autosuggest request failed for client v1",JSON.stringify({urlWithoutQuery:this.getLoggableUrlString(o)})),l.k.log("failed: "+e),null))),n}))}getLocationFromResponse(e){const t=[];if(e&&e["@graph"]){const i=e["@graph"];for(let e=0;e<i.length;e++){const n=i[e];if(n){switch(n["b:stype"]){case"Island":case"PopulatedPlace":case"Postcode1":case"Other":{const e=n["s:address"]||{},i=n["s:geo"]||{},o=i["s:latitude"],r=i["s:longitude"];if("number"==typeof o&&"number"==typeof r){const i={locality:e["s:addressLocality"]||e["s:name"]||"",region:c.abbreviateUSState(e["s:addressRegion"]||"",a.Al.Locale,e["b:countryIso"]||""),subRegion:e["b:addressSubregion"]||"",country:e["s:addressCountry"]||"",latitude:Number(o).toString(),longitude:Number(r).toString(),isoCode:e["b:countryIso"]||"",language:a.Al.Locale};u.isValidLocationToSuggest(i)&&t.push(i)}}}}}}return t}getLoggableUrlString(e){return e?(e.searchParams&&e.searchParams.delete&&e.searchParams.delete("q"),e.href):""}getLocationSearchResponse(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=[{key:"appid",value:this.cfg.appId},{key:"locale",value:a.Al.Locale},{key:"query",value:e}],i=[];if(!e||!e.trim||!e.trim().length)return i;const n=new URL(h.msnLocationSearchApi,h.msnApiServiceHost);n.search=r.c.keyValueArrayToQueryString(t);(new Headers).append("contentType","application/json");const o=yield(this.xhrFetch?this.xhrFetch:fetch)(n.href,{method:"GET",headers:{"Content-Type":"application/json"}});return o.ok||500===o.status?this.getLocationFromSearchResponse(yield o.json()):null}))}isSameLocation(e,t){return e==t||null!=e&&null!=t&&(e.locationType==t.locationType&&(Math.abs(parseFloat(e.latitude)-parseFloat(t.latitude))<.001&&Math.abs(parseFloat(e.longitude)-parseFloat(t.longitude))<.001||(this.distance(e,t)<150||void 0)))}distance(e,t){const i=parseFloat(e.latitude)*Math.PI/180,n=parseFloat(e.longitude)*Math.PI/180,o=parseFloat(t.latitude)*Math.PI/180,a=o-i,r=parseFloat(t.longitude)*Math.PI/180-n,s=Math.sin(a/2)*Math.sin(a/2)+Math.sin(r/2)*Math.sin(r/2)*Math.cos(i)*Math.cos(o);return 6371*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}getLocationFromSearchResponse(e){if(!(e.value&&e.value[0]&&e.value[0].responses&&e.value[0].responses[0]))return[];const t=e.value[0].responses[0];if(t.error)return[];const i=t.locations.filter((e=>("admindivision1"!==e.entityType.toLowerCase()||"jp"===e.countryCode.toLowerCase())&&e.coordinates&&e.coordinates.lat&&e.coordinates.lon)).map((e=>({isoCode:e.countryCode,locality:e.locality,region:e.state||e.adminDistrict,country:e.countryRegion,latitude:e.coordinates.lat.toString(),longitude:e.coordinates.lon.toString(),displayName:e.displayName}))),n=[];return i.forEach((e=>{0==n.map((t=>this.isSameLocation(t,e))).filter((e=>e)).values.length&&n.push(e)})),n}populateSearchMoreResponse(){}}h.bingAutoSuggestServiceHost="https://platform.bing.com",h.bingAutosuggestApi="geo/AutoSuggest/v1",h.defaultConfig={num:4,appId:"C98EA5B0842DBB9405BBF071E1DA76512D21FE36"},h.msnLocationSearchApi="/v0/weather/locations/search",h.msnApiServiceHost="https://api.msn.com";var p=i(16517),g=i(63535),f=i(67267);class v{constructor(e,t,i,n,o,a,r,s){this.fetchImpl=e,this.host=t,this.api=i,this.appId=n,this.excludeSubTypes=o,this.flightId=a,this.useOneService=r,this.includeSubTypes=s,this.filterSuggestion=e=>-1===this.excludeSubTypes.indexOf(e.subType)&&(!this.includeSubTypes||!e.subType||-1!==this.includeSubTypes.indexOf(e.subType)),this._parseLocationFromAS=!0}addExtraASParams(e,t){return e}_getDefaultSuggestions(){return[]}getSuggestions(e,t){return(0,o.mG)(this,void 0,void 0,(function*(){if(e.disableThisRequest)return null;if((!e.searchText||""===e.searchText.trim())&&(e.disableFavorites||!this._useFavoriteSuggestions))return{suggestions:[]};const i=this._constructASRequestUrl(e);return this.fetchImpl(i.href).then((e=>e.json())).then((t=>{const i=this.useOneService?this._parseOneServiceSuggestions(t):this._parseSuggestionsV6(t),n=e.searchText&&""!==e.searchText.trim()?[]:this._getDefaultSuggestions();return i.suggestions=this._combineSuggestions(i.suggestions,n),this._updateSuggestionsRank(i.suggestions),i})).catch((i=>{if(t){const t=this._constructASRequestUrl(Object.assign(Object.assign({},e),{searchText:""}));(0,s.H)(d.hTy,"Autosuggest request failed for client v6",JSON.stringify({urlWithoutQuery:t&&t.href,error:i}))}return null}))}))}getHistorySuggestions(e){return[]}_constructASRequestUrl(e){let t,i;return this.useOneService?(t=this.getOneServiceQueryParams(e),i=(0,g.PH)(this.api,(0,g.qQ)())):(t=this.getBingQueryParams(e),i=new URL(this.api,this.host)),i.search=r.c.keyValueArrayToQueryString(t),i}getBingQueryParams(e){return[{key:"appid",value:this.appId},{key:"count",value:""+e.maxResults},{key:"q",value:e.searchText},{key:"localcircularview",value:e.userLocation&&`${e.userLocation},100`},{key:"setmkt",value:a.Al.Locale},{key:"setlang",value:a.Al.Locale},{key:"types",value:e.suggestionTypes||""},{key:"abbrtext",value:e.abbrSuggestions?"1":""},{key:"structuredaddress",value:"true"},{key:"strucaddrread",value:"1"},{key:"setflight",value:this.flightId}]}getOneServiceQueryParams(e){return[{key:"apikey",value:p.jG.OneServiceApiKey},{key:"type",value:e.suggestionTypes||""},{key:"$top",value:""+e.maxResults},{key:"q",value:e.searchText},{key:"location",value:e.userLocation&&`${e.userLocation}`},{key:"market",value:a.Al.Locale},{key:"setflight",value:this.flightId},{key:"qscope",value:"locations"},{key:"activityId",value:p.jG.ActivityId},{key:"ocid",value:f.$.getOneServiceOCID(p.jG.TrackInfo,"feeds")}]}_combineSuggestions(e,t){let i=[];if(t&&t.length){i=t;let n=!1;for(let o=0;o<e.length;o++){e[o].root;const a=e[o].address,r=a&&a.streetAddress,s=a&&a.addressLocality,d=e[o].name;for(let e=0;e<t.length;e++){const i=t[e];if(r&&i.formatedAddress&&i.formatedAddress.indexOf(r)>-1&&(s&&i.formatedAddress.indexOf(s)>-1||d&&i.title&&i.title.indexOf(d)>-1)){n=!0;break}}n?n=!1:i.push(e[o])}}else i=e;return i}_updateSuggestionsRank(e){for(let t=0;t<e.length;t++)e[t].suggestionRank=t}_parseSuggestionsV6(e){const t={},i=[];if(e){const n=e.instrumentation;t.formattingRules=this._createFormattingRulesV6(e.formattingRules);const o=this._getDefaultFormattingRuleV6(t.formattingRules),r=e.value;for(let e=0;e<r.length;e++){const s={},d=r[e];try{s.root=d,s.type=d._type,s.readLink=d.readLink,s.readLinkPingSuffix=d.readLinkPingSuffix,s.instrumentationInfo=n,s.suggestionRank=e,s.formattingRuleId=d.formattingRuleId,s.formattingRule=s.formattingRuleId&&t.formattingRules[s.formattingRuleId]||o,s.entityId=d.id,s.name=d.name,s.query=d.query;const r=d.categories;s.primaryCategoryPath=r&&r.length&&r[0],s.entityId&&0===s.entityId.indexOf("local_geoid")&&(s.geoId=s.entityId,s.entityId="");const l=d.entityPresentationInfo;l&&l.entitySubTypeHints&&l.entitySubTypeHints.length&&(s.subType=l.entitySubTypeHints[0]);const u=d.geo;if(u&&this._parseLocationFromAS){const e=u.latitude,t=u.longitude;e&&t&&(s.location={latitude:e,longitude:t})}d.address?(s.address=d.address,s.address.addressRegion=c.abbreviateUSState(s.address.addressRegion,a.Al.Locale,s.address.countryIso)):d.location&&d.location.length?s.address=d.location[0].address:"PostalAddress"===s.type&&(s.address=d),"Favorite"==s.type&&(s.alternateName=d.alternateName,s.subType=d.subType,this._processFavoriteItemId(d,s)),i.push(s)}catch(e){}}}return t.suggestions=i.filter(this.filterSuggestion),t}_parseOneServiceSuggestions(e){const t={},i=e.value[0].groups[0].suggestionItems;for(let e=0;e<i.length;e++){const t={},n=i[e];try{t.readLink=n.dataUrl,t.suggestionRank=e,t.name=n.name,t.entityId=n.id,t.formattingRuleId=n.metadata.formattingRuleId,t.formattingRule=n.metadata.formattingRules&&JSON.parse(n.metadata.formattingRules),t.address=n.metadata,t.address.addressRegion=c.abbreviateUSState(n.metadata.addressRegion,a.Al.Locale,n.metadata.countryIso);const o=n.metadata.latitude,r=n.metadata.longitude;o&&r&&(t.location={latitude:o,longitude:r}),t.subType=n.metadata.entitySubTypeHints,i[e]=t}catch(e){}}return t.suggestions=i.filter(this.filterSuggestion),t}_createFormattingRulesV6(e){const t={};if(e)for(let i=0;i<e.length;i++){const n=JSON.parse(e[i]);t[n.identifier]=n}return t}_getDefaultFormattingRuleV6(e){let t=e&&e.Default||null;for(const i in e){t||(t=e[i]);if(a.Al.Locale.indexOf(i.toLowerCase())>-1){t=e[i];break}}return t}_processFavoriteItemId(e,t){const i=e.bingId;!i||0!==i.indexOf("local_ypid:")&&0!==i.indexOf("sid")&&0!==i.indexOf("local_vdpid")||(t.entityId=i),t.bingId=i}}v.autosuggestCallerId="autosug";class m{constructor(e,t){this.key=e,this.fetchImpl=t,this.geocode=(e,t,i,n,s)=>(0,o.mG)(this,void 0,void 0,(function*(){const o={success:!1,statusCode:null,authenticationResultCode:null,statusDescription:null,name:e,results:null};if(!location)return null;const d=i&&i<=m._maxNumberOfResults?i:m._defaultResultCount,l=[{key:"key",value:this.key},{key:"maxResults",value:""+d},{key:"q",value:encodeURIComponent(e)},{key:"inclnb",value:n?"1":"0"},{key:"incl",value:s?"ciso2":""},{key:"userMapView",value:m._getBoundsString(t)},{key:"culture",value:a.Al.Locale}],c=new URL(m.geoApi,m.geoHost);return c.search=r.c.keyValueArrayToQueryString(l),this.fetchImpl(c.href).then((e=>e.json())).then((e=>{if(e&&e.authenticationResultCode===m._validAuthenticationCode&&e.statusCode===m._validStatusCode&&e.statusDescription===m._validStatusDescription&&e.resourceSets&&0!==e.resourceSets.length){let t;o.success=!0,o.statusCode=m._validStatusCode,o.authenticationResultCode=m._validAuthenticationCode,o.statusDescription=m._validStatusDescription;for(let i=0,n=e.resourceSets.length;i<n;i++)if(t=e.resourceSets[i].resources,t&&0!==t.length){o.results=t;break}o.traceId=e.traceId}else e?(o.statusCode=e.statusCode,o.authenticationResultCode=e.authenticationResultCode,o.statusDescription=e.statusDescription,o.errorMessage=e.errorDetails&&e.errorDetails.length>0&&e.errorDetails[0],o.traceId=e.traceId):(o.statusCode=400,o.authenticationResultCode="Unknown",o.statusDescription="Unknown");return o})).catch((e=>(o.authenticationResultCode="Unknown",o.statusCode=404,o.statusDescription="Http Error",o)))}))}static _getBoundsString(e){return e?e.south+","+e.west+","+e.north+","+e.east:""}}m._validAuthenticationCode="ValidCredentials",m._validStatusCode=200,m._validStatusDescription="OK",m._defaultResultCount=5,m._maxNumberOfResults=20,m.geoHost="https://dev.virtualearth.net",m.geoApi="/REST/v1/Locations";class b{constructor(e){this.suggestion=e,this._formatSuggestion(this.suggestion),this.setSimpleSearchText(),this._setDisplayName()}_setDisplayName(){const e=this._formattingRule&&this._formattingRule["b:groupSeparator"]||", ";this.suggestionTextLine2?this.suggestion.displayName=this.suggestionTextLine1+e+this.suggestionTextLine2:this.suggestion.displayName=this.suggestionTextLine1}setSimpleSearchText(){const e=this._formattingRule&&this._formattingRule["b:groupSeparator"]||", ";if("Favorite"===this.suggestion.type){const t=this.suggestion,i=t.name,n=t.address&&t.address.streetAddress;this._searchText=i!==n&&n?i+e+n:i}else this.suggestionTextLine2?this._searchText=this.suggestionTextLine2+e+this.suggestionTextLine1:this._searchText=this.suggestionTextLine1;this.suggestion&&(this.suggestion.searchText=this._searchText)}_removeCountry(e){let t=", ";this._formattingRule&&(t=this._formattingRule["b:groupSeparator"]||this._formattingRule.groupSeparator||", ");const i=this.suggestion.address||this.suggestion.root,n=i&&i.addressCountry;if(n&&e&&e.slice(e.length-n.length)===n){const i=e.slice(0,e.length-n.length);return i.slice(i.length-t.length)===t?i.slice(0,i.length-t.length):i}return e}_formatSuggestion(e){const t=this.suggestion.formattingRule,i=e;if("Favorite"===e.type)return i.alternateName?this.suggestionTextLine1=i.alternateName:this.suggestionTextLine1=i.name,this.suggestionTextLine2=i.address&&i.address.streetAddress,this.suggestion.formatedAddress=i.address&&i.address.streetAddress,void(this.suggestion.title=i.name);i.name&&(this.suggestionTextLine1=i.name,e.title=i.name),i.query&&(this.suggestionTextLine1=i.query),t?(this._formattingRule=t,this.suggestion.address?this._applyFormattingRule(this.suggestion.address):this._applyFormattingRule(e.root)):(this.suggestionTextLine1=e.title,this.suggestionTextLine2=e.formatedAddress),this.suggestion.formatedLine1=this.suggestionTextLine1,this.suggestion.formatedLine2=this.suggestionTextLine2,this.suggestion.formatedLine2WithoutCountry=this._removeCountry(this.suggestionTextLine2)}_applyFormattingRule(e){let t=0;const i=this._formattingRule["b:fieldGroups"]||this._formattingRule.fieldGroups;if(!this.suggestionTextLine1)for(;t<i.length;t++){const n=this._getFormattedGroupString(e,i[t]);if(n){this.suggestionTextLine1=n,this.suggestion.title=n,++t;break}}const n=[];for(;t<i.length;t++){const o=this._getFormattedGroupString(e,i[t]);o&&n.push(o)}const o=this._formattingRule["b:groupSeparator"]||this._formattingRule.groupSeparator||", ";this.suggestionTextLine2=n.join(o),this.suggestion.formatedAddress=this.suggestionTextLine2}_getFormattedGroupString(e,t){const i=[];let n;const o=t.fields;for(let t=0;t<o.length;t++)n=this._getPrimaryField(e,o[t]),n||(n=this._getAlternateField(e,o[t])),n&&i.push(n);const a=t.fieldSeparator||" ";return i.join(a)}_getPrimaryField(e,t){let i;return e&&t&&(i=e[t.name]),i}_getAlternateField(e,t){let i;if(e&&t){const n=t.alternateField;if(n){const t=n.split(",");for(let n=0;n<t.length&&(i=e[t[n]],!i);n++);}}return i}}b.HistorySuggestionType="history";var y=i(65135);class C{constructor(e,t,i=null,n=null){this.fetchImpl=e,this.userLocation=i,this.xhrFetch=n,this._translateSuggestion=e=>{var t,i;const n=e.suggestion.address||e.suggestion.root,o=null===(t=e.suggestion.location)||void 0===t?void 0:t.latitude,r=null===(i=e.suggestion.location)||void 0===i?void 0:i.longitude,s={language:a.Al.Locale,addressLine:e.suggestion.name||(null==n?void 0:n.streetAddress)||(null==n?void 0:n.postalCode),locality:null==n?void 0:n.addressLocality,region:(0,c.abbreviateUSState)(null==n?void 0:n.addressRegion,a.Al.Locale,null==n?void 0:n.countryIso),subRegion:null==n?void 0:n.addressSubregion,country:n&&(n.addressCountry||""),latitude:o&&Number(o).toString(),longitude:r&&Number(r).toString(),typeV6:e.suggestion.type,subType:e.suggestion.subType,searchText:e.suggestion.searchText,formattedAddress:e.suggestion.formatedAddress,readLink:e.suggestion.readLink,locationType:u.getHyperlocalType(e.suggestion.type,e.suggestion.subType),isoCode:n&&(n.countryIso||""),entityId:e.suggestion.entityId,geoId:e.suggestion.geoId};return!s.locality&&s.addressLine&&(s.locality=s.addressLine,s.addressLine=void 0),s.firstLine=u.getAutoSuggestLocationFirstLine(s),s.secondLine=u.getAutoSuggestLocationSecondLine(s),s},this.cfg=Object.assign(Object.assign({},C.defaultConfig),t||{}),"CN"==(null==i?void 0:i.isoCode)&&(this.cfg.endpoint="https://cn.bing.com"),this._extraResult=this.cfg.latinPercentageLimit>0?5:0,this._geocoder=new m(this.cfg.geocoderKey,e),this._autoSuggestModel=new v(e,this.cfg.endpoint,C[this.cfg.useOneServiceProxy?"oneServiceAutosuggestApi":"bingAutosuggestApi"],this.cfg.appId,this.cfg.excludeSubTypes,this.cfg.flightId,this.cfg.useOneServiceProxy,this.cfg.includeSubTypes)}getLocationSearchResponse(e){return Promise.resolve(null)}getAutoSuggestResponse(e,t){var i,n,r;return(0,o.mG)(this,void 0,void 0,(function*(){if(e){const o="zh-cn"===(null===(i=null===a.Al||void 0===a.Al?void 0:a.Al.Locale)||void 0===i?void 0:i.toLowerCase())&&"zh"!==(null===(r=null===(n=null===a.Al||void 0===a.Al?void 0:a.Al.ClientSettings)||void 0===n?void 0:n.geo_country)||void 0===r?void 0:r.toLowerCase())?"40,116":this.userLocation&&`${this.userLocation.latitude},${this.userLocation.longitude}`,s={searchText:e,maxResults:this.cfg.num+this._extraResult,userLocation:o,suggestionTypes:this.cfg.suggestionTypes,abbrSuggestions:!0,localMapView:null},d=yield this._autoSuggestModel.getSuggestions(s,t);return this._parseSuggestions(d)}}))}_latinPercentage(e){const t=e.locality+e.country+e.region+e.subRegion;if(!t)return 0;return t.match(C.latinParttern).join("").length/t.length}_parseSuggestions(e){const t=[],i=null==e?void 0:e.suggestions;if(i&&i.length>0)for(let e=0;e<i.length;e++)t.push(this._getSuggestionResult(i[e]));let n=t.map(this._translateSuggestion);return this.cfg.latinPercentageLimit>0&&(n=n.filter((e=>this._latinPercentage(e)>this.cfg.latinPercentageLimit)).slice(0,this.cfg.num)),n=n.filter((e=>u.isValidLocationToSuggest(e))),n}_getSuggestionResult(e){return new b(e)}_getLatLongFromReadLink(e){return(0,o.mG)(this,void 0,void 0,(function*(){if(!e.readLink)return null;const t=new URL(e.readLink);return t.searchParams.append("appid",this.cfg.appId),this.fetchImpl(t.href).then((e=>e.json())).then((t=>{var i,n;const o=t.geo||(null===(n=null===(i=t.value)||void 0===i?void 0:i[0])||void 0===n?void 0:n.geo);if(o&&o.latitude&&o.longitude)return Object.assign(Object.assign({},e),{latitude:o.latitude.toString(),longitude:o.longitude.toString()})})).catch((e=>null))}))}geocodeSuggestion(e){return(0,o.mG)(this,void 0,void 0,(function*(){try{const t=yield this._doGeoCodeSuggestion(e);if(null!==t)return Object.assign(Object.assign({},e),{longitude:t.longitude,latitude:t.latitude});y.M0.sendAppErrorEvent(Object.assign(Object.assign({},d.H4x),{message:"failed to fetch location latitude and longitude in auto suggestion v6",pb:Object.assign(Object.assign({},d.H4x.pb),{customMessage:e.searchText})}))}catch(e){(0,s.OO)(e,d.H4x,"error in library [location-service],Geocoder exception for autosuggestion v6")}return null}))}_doGeoCodeSuggestion(e){return(0,o.mG)(this,void 0,void 0,(function*(){const t=e;if(t.longitude&&t.latitude)return t;const i=yield this._getLatLongFromReadLink(e);if(i)return i;const n=this._getSuggestionAddress(t);return this._geocoder.geocode(n,null,1).then((e=>{if(e.success&&e.results&&e.results.length>0){const i=e.results[0];i.bbox;if(i.point){const e=i.point.coordinates;return t.latitude=e[0].toString(),t.longitude=e[1].toString(),t}}return null}))}))}_getSuggestionAddress(e){return e&&"LocalBusiness"===e.typeV6&&e.formattedAddress?e.formattedAddress:e&&e.searchText}}C.bingAutosuggestApi="/api/v6/Places/AutoSuggest",C.oneServiceAutosuggestApi="msn/suggestions",C.defaultConfig={num:5,appId:"D41D8CD98F00B204E9800998ECF8427E1FBE79C2",geocoderKey:"AnTcaqBi2ypp0xI-OZNi4W_ik2KhjgpqioTAtXLC8GzkMBQRMlyxvxyTnd5b73im ",suggestionTypes:"Place,Address,Business",endpoint:"https://www.bing.com",excludeSubTypes:["CountryRegion","AdminDivision1"],flightId:""},C.latinParttern=/[\u00C0-\u00ff\w\s\d.,/#!$%^&*;:{}=\-_`~()]+/gu;var x=i(17318),w=i(26740),S=i.n(w);function $(e){if(e&&e.useV6){const t=(0,n.N)()?window.fetch.bind(window):x.br;return new C(t,e,u.headLocation())}return new h(S(),e)}},9601:function(e,t,i){"use strict";i.d(t,{ye:function(){return o}});const n=[];function o(e){for(const t of n)t(e)}},93637:function(e,t,i){"use strict";i.d(t,{L:function(){return g}});var n=i(33940),o=i(791),a=i(68364),r=i(26415),s=i(54804),d=i(16517),l=i(46336),c=i(4596),u=i(29422),h=i(9601);var p;!function(e){e[e.AutoDetectLoc=1]="AutoDetectLoc",e[e.SpecifyLoc=2]="SpecifyLoc"}(p||(p={}));class g{constructor(){this.instance=o.N}getUserDefaultLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){let t,i;try{const i=yield this.instance.getUserDefaultLocation(e);if(null==i)throw"Location response returned null or undefined";t=yield i.json()}catch(i){(0,a.OO)(i,r.WiH,`User's default location fetch request failed. Autodetect forced: ${!0===e}`),t=null}return t&&t.length&&t[0]&&(i={latitude:`${t[0].latitude}`,longitude:`${t[0].longitude}`,isDetected:e,locality:t[0].city,region:c.abbreviateUSState(t[0].state,s.Al.Locale,t[0].countryCode),country:t[0].country,isoCode:t[0].countryCode,language:d.jG.CurrentMarket},i.displayName=u.getDisplayName(i)),i}))}getGeoLocation(){const e=u.headLocation();return u.isValid(e)?e:((0,a.H)(r.Hx8,"Failed to get valid user geo location from PCS head data"),null)}updateUserSettings(e,t,i={},o){return(0,n.mG)(this,void 0,void 0,(function*(){let n=!1;try{n=yield this.instance.updateWeatherSettings(e,t,i,o)}catch(e){(0,a.OO)(e,r.DyR,"error in library [location-service],Weather or location user settings update failed"),n=!1}return n}))}setHomeLocation(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){let n=!1;try{n=yield this.instance.updatePdpHomeLocation(g.buildMetaData(e),`${e.latitude},${e.longitude}`,t,i)}catch(e){(0,a.OO)(e,r.G1Z,"error in library [location-service],Home Location Update Failed"),n=!1}return n&&(0,h.ye)(e),n}))}setSpecifyLocationMode(){return(0,n.mG)(this,void 0,void 0,(function*(){let e=!1;try{e=yield this.instance.updateWeatherSettings(null,`${p.SpecifyLoc}`)}catch(t){(0,a.OO)(t,r.DyR,"error in library [location-service],Weather user settings update failed"),e=!1}return e}))}addFavoriteLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=`${e.latitude},${e.longitude}`;return yield this.instance.addToFavoriteLocation(g.buildMetaData(e),t)}))}removeFavoriteLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=e.definitionName||`${e.latitude},${e.longitude}`,i=yield this.instance.removeFavoriteLocation(t);return i&&(e.definitionName=null),i}))}removeLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=e.definitionName||`${e.latitude},${e.longitude}`,i=yield this.instance.removeLocation(t);return i&&(e.definitionName=null),i}))}static buildMetaData(e){const t=e.language||s.Al.Locale||"";return JSON.parse(JSON.stringify({geoCoordinates:{latitude:parseFloat(e.latitude),longitude:parseFloat(e.longitude)},addressLine:e.addressLine,subRegion:e.subRegion,readLink:e.readLink,city:e.locality,state:e.region,countryRegion:e.country,postalCode:e.postalCode,isoCode:e.isoCode,locationType:"number"==typeof e.locationType?e.locationType||1:(0,l.hh)(""+e.locationType,1),locationTypeId:[e.locality,e.region,e.country].filter((e=>!!e)).join(","),language:t||void 0}))}}},97671:function(e,t,i){"use strict";i.d(t,{QA:function(){return o},WM:function(){return r},_n:function(){return n},rd:function(){return a}});const n=new(i(59049).v)("LocationState");var o,a;function r(e,t,i,o=[]){o.some((e=>!1===e))||n.set(a.Location,{source:i,location:e,locationMode:t})}!function(e){e[e.LocationEditor=1]="LocationEditor",e[e.Feed=2]="Feed"}(o||(o={})),function(e){e[e.Location=1]="Location"}(a||(a={}))},24261:function(e,t,i){"use strict";i.d(t,{H_:function(){return be}});var n=i(33940),o=i(63535),a=i(67267),r=i(47903),s=i(16517),d=i(28687),l=i(59207),c=i(96345),u=i(82855),h=i(58155),p=i(17157),g=i(65135);let f=null,v=null,m=null,b=null;function y(){if(null!==f)return f;if((0,p.wq)()){const e=(0,l._4)();return f=!!e&&e.isDarkMode,f}const e=window.location.href,t=h.c.getQueryParameterByName("darkmode",e);return f=null!==t,f}function C(){if(null!==m)return m;const e=window.location.href,t=h.c.getQueryParameterByName("edge",e);if(m=null!==t,!m&&(0,p.wq)()){const e=(0,l._4)();m=!!e&&e.isEdge}return m}function x(){if(null!==v)return v;const e=window.location.href,t=h.c.getQueryParameterByName("launcher",e);return v=null!==t,v}function w(e,t,i){g.M0.sendAppErrorEvent(Object.assign(Object.assign({},e),{message:t,pb:Object.assign(Object.assign({},e.pb),{customMessage:i})}))}function S(){if(null!==b)return b;if(x()||C())return b=!1,b;if((0,p.wq)()){const e=(0,l._4)();return b=!(!e||!e.isChinaBuild)&&e.isChinaBuild,b}const e=window.location.href,t=h.c.getQueryParameterByName("isChinaBuild",e);return b=null!==t,b}const $="Dislike",k="Like",L="Mute",T="Save",O="service/Graph/Actions";function I(e){return(0,n.mG)(this,void 0,void 0,(function*(){return F(e,$)}))}function A(e){return(0,n.mG)(this,void 0,void 0,(function*(){return P(e,$)}))}function P(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i={method:"DELETE",headers:yield(0,d.wR)()},a=(0,o.fU)(O,E()),r=M();r.set("$filter",`actionType eq '${t}' and (targetId eq '${e}')`),a.search=r.toString(),function(e,t){(0,n.mG)(this,void 0,void 0,(function*(){const i={url:e,headers:t.headers,refresh:!0};yield(0,c.o9)(i)}))}(a.href,i)}))}function F(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){const a={method:"POST",body:JSON.stringify({actionType:t,targetId:e,targetType:i}),headers:yield(0,d.wR)()},r=(0,o.fU)(O,E()),s=M();return r.search=s.toString(),t===L&&(0,d.VQ)(`Hide publisher signal is sent. URL: ${r.href}, targetId: ${e}, targetType: ${i}`),yield function(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i={url:e,headers:t.headers,body:t.body,refresh:!0};return yield(0,c.Ef)(i)}))}(r.href,a)}))}function M(){const e=new r.h,t=a.$.getOneServiceNonDynamicParamsWithoutAuth("superapp-homepage-feeds",!1);for(let i=0;i<t.length;i++)e.set(t[i].key,t[i].value);const i=(0,l._4)();if(i){e.set("user",i.muid),e.set("market",i.market);const t=(0,u.rU)(i.features,s.jG.HasFlightsOverriden);t&&e.set("fdhead",t),e.set("activityId",i.activityId),i.latitude&&i.longitude&&e.set("location",`${i.latitude}|${i.longitude}`)}return e}function E(){return new URL("",S()?"https://assets.msn.cn/service":"https://assets.msn.com/service")}var D,H,R,N;!function(e){e.Small="small",e.Medium="medium"}(D||(D={})),function(e){e.default="feedback",e.hideStory="hideStory",e.hidePublisher="hidePublisher",e.mutePublisher="mutePublisher",e.reportIssue="reportIssue",e.undo="undo"}(H||(H={})),function(e){e.opacityFadeOut="opacityFadeOut",e.none=""}(R||(R={})),function(e){e.gradient="gradient",e.primary="primary",e.secondary="secondary"}(N||(N={}));var j,_,U;!function(e){e.DailyBrief="DailyBrief",e.GroceryCouponCarousel="GroceryCouponCarousel",e.NativeAd="nativeAd",e.RecentPriceDropProducts="RecentPriceDropProducts",e.RecommendedForYouProducts="RecommendedForYouProducts",e.TopicCarousel="TopicCarousel",e.TrendingCategoryDeals="TrendingCategoryDeals",e.TrendingDeals="TrendingDeals",e.OnlineOffers="OnlineOffers",e.NearbyOffers="NearbyOffers",e.OnlineCategories="OnlineCategories",e.OnlineCoupons="OnlineCoupons",e.TrendingNews="TrendingNews",e.TrendingProductDeals="TrendingProductDeals",e.WeatherList="WeatherList",e.VideoCarousel="TopicFeed",e.VideoCategory="VideoCategory",e.ArcadeGames="ArcadeGames",e.GameOfTheDay="GameOfTheDay",e.TopRatedGames="TopRatedGames",e.RewardsCard="RewardsCard",e.TopFeedAd="TopFeedAd",e.TrendingSearches="TrendingSearches",e.RecommendedSearches="RecommendedSearches",e.LocalNewsFeed="LocalNewsFeed",e.UkraineNewsFeed="UkraineNewsFeed"}(j||(j={})),function(e){e.ArticleContent="article",e.DailyBrief="infopane",e.GroceryCouponCarousel="GroceryCouponCarousel",e.NativeAd="nativeAd",e.ShoppingRecentPriceDropProducts="RecentPriceDropProducts",e.ShoppingRecommendedForYouProducts="RecommendedForYouProducts",e.ShoppingTrendingCategoryDeals="TrendingCategoryDeals",e.ShoppingTrendingDeals="TrendingDeals",e.ShoppingOnlineOffers="OnlineOffers",e.ShoppingNearbyOffers="NearbyOffers",e.ShoppingOnlineCategories="OnlineCategories",e.ShoppingOnlineCoupons="OnlineCoupons",e.ShoppingTrendingProductDeals="TrendingProductDeals",e.SlideshowContent="slideshow",e.TopicCarousel="XfeedUpsell",e.TrendingNews="trendingInTenMinutes",e.VideoCarousel="TopicFeed",e.VideoCategory="VideoCategory",e.VideoContent="video",e.WebContent="webcontent",e.LocalNewsFeed="LocalNewsFeed",e.UkraineNewsFeed="WarInUkraine"}(_||(_={})),function(e){e.Weather="Weather"}(U||(U={}));var B;!function(e){e.ActionButton="action button",e.ProviderLogo="provider logo",e.Reactions="reactions",e.Comments="comments"}(B||(B={}));const G="55a54008ad1ba589aa210d2629c1df41",z="ae69737a5aba41bba532ee1f5328b00e";var V;!function(e){e.FeedRefresh="feedRefresh",e.Append="append",e.SmartRefresh="smartRefresh"}(V||(V={}));var q=i(53909),W=i(44979),J=i(65337),Z=i(26415),Q=i(68364),Y=i(44772),X=i(38156);const K=new Map,ee="https://sapphire.azureedge.net/icons/news/2020092401/%0.png";var te;function ie(e,t,i){let n;if(!e||!e.length)return(0,d.VQ)(`Hide publisher response is invalid. actionType: ${i}, targetId: ${t}`),!1;try{n=JSON.parse(e)}catch(e){return(0,Q.OO)(e,Z.ZP4,`ActionMenu : Failed to parse JSON data ${e}`),!1}if((0,d.VQ)(`Hide publisher response is invalid. status: ${null==n?void 0:n.status}`),!n||(null==n?void 0:n.status)>=400){const e=`OneService returned error response. Status: ${null==n?void 0:n.status} for actionType: ${i} and targetId: ${t}`;return w(Z.nP3,"OneService returned error response in ActionMenuServiceClient",e),!1}return!0}function ne(){const e=y();return{toastMessageBgColor:e?"#404040":"#F8F8F8",toastMessageTextColor:e?"#F8F8F8":"#404040",toastMessageActionColor:e?"#83BEEC":"#3D6CDC"}}function oe(e,t,i){const n=re(e),o=[];n&&n.length>0&&n.map((e=>{e.key.toLowerCase()===t?o.push(i):o.push(e)})),o&&o.length>0&&K.set(e,o)}function ae(e){const t=e.sourceId?e.sourceId:e.id,i=e.actions?e.actions:e.metadata&&e.metadata.actions,n=i&&i.indexOf(te.Like)>=0,o=i&&i.indexOf(te.Save)>=0,a=i&&i.indexOf(te.Dislike)>=0;if(!(K&&K.get(t))){const e=[];e.push({key:te.Save,value:o}),e.push({key:te.Like,value:n}),e.push({key:te.Dislike,value:a}),K.set(t,e)}}function re(e){return K&&K.get(e)}!function(e){e.Dislike="dislike",e.Feedback="feedback",e.Hide="hide",e.Mute="mute",e.Share="share",e.Save="save",e.Like="like",e.HiddenSource="hiddenSource"}(te||(te={}));function se(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){const n=e.sourceId?e.sourceId:e.id,o=e.providerData&&e.providerData.name;let a,r,s,l,c,u,h,g,f;if(t&&(a=t.share,r=t.saveForLater,s=t.moreStories,l=t.fewerStories,c=t.hideThisStory,u=t.hidePublisher,h=t.feedbackText,g=t.remove,f=t.viewHiddenSources),(0,p.wq)()&&!x()&&!C()){const e=yield(0,d.Cw)(n),t={key:te.Save,value:e};oe(n,te.Save,t)}const v=re(n),m=v&&v.find((e=>e.key===te.Save)),b=v&&v.find((e=>e.key===te.Like)),y=v&&v.find((e=>e.key===te.Dislike)),w=[];return i.map((e=>{switch(e){case te.Dislike:w.push(((e,t)=>({key:te.Dislike,text:t,icon:ee.replace("%0",e?"Disliked":"Dislike")}))(y&&y.value,l));break;case te.Feedback:w.push((e=>({key:te.Feedback,text:e,icon:ee.replace("%0","Feedback")}))(h));break;case te.Hide:w.push((n=c,{key:te.Hide,text:n,icon:ee.replace("%0","HideStory")}));break;case te.Like:w.push(((e,t)=>({key:te.Like,text:t,icon:ee.replace("%0",e?"Liked":"Like")}))(b&&b.value,s));break;case te.Mute:w.push(((e,t)=>({key:te.Mute,text:t&&t.replace("{0}",e),icon:ee.replace("%0","HideSource")}))(o,u));break;case te.Share:w.push((e=>({key:te.Share,text:e,icon:ee.replace("%0","Share")}))(a));break;case te.Save:w.push((t=m&&m.value,i=m&&m.value?g:r,{key:te.Save,text:i,icon:ee.replace("%0",t?"Remove":"Save")}));break;case te.HiddenSource:w.push((e=>({key:te.HiddenSource,text:e,icon:ee.replace("%0","HiddenSources")}))(f))}var t,i,n})),w}))}function de(e,t){if(!e)return;return{pageType:"videofeed",pageArgs:{url:e.destinationUrl?e.destinationUrl:e.url,title:e.title,provider:e.provider&&e.provider.name,providerLogo:e.provider&&e.provider.logoUrl,publishedDateTime:e.publishedDateTime,imageUrl:e.images&&e.images.length>0&&e.images[0].url,newsId:e.id,type:"video",actions:t?t.actions:e.actions,externalVideoFiles:e.videoFiles?e.videoFiles:e.externalVideoFiles}}}let le,ce,ue,he=null;let pe,ge=!1,fe=!1,ve=!1;te.Share,te.Save,te.Hide,te.Mute,te.Like,te.Dislike,te.Feedback;const me=[te.Share,te.Save,te.Hide,te.Mute,te.Like,te.Dislike,te.HiddenSource,te.Feedback];function be(e,t,i,o,a,r=!1,s=!1,c=!1,u=!1){return(0,n.mG)(this,void 0,void 0,(function*(){g.M0.sendActionEvent(e.currentTarget,X.Aw.Click,X.wu.More),e.preventDefault(),e.stopPropagation(),ce=o,le=i,he=t,ge=r,fe=s,ve=c,ue=a,pe=(0,l._4)(),ue&&0!==ue.length||(ue=fe||u?me:[te.Share,te.Save,te.Mute,te.Like,te.Dislike,te.HiddenSource,te.Feedback]),ae(le);const n=yield se(le,ce,ue);(0,d.AG)(n,ye)}))}function ye(e){if(e&&e.length){let t;try{t=JSON.parse(e)}catch(e){w(Z.AM0,"ActionMenu : Failed to parse JSON data ${error}",e)}if(null!==t){const e=t.result,i=t.key;"click"===e&&function(e){switch(e){case te.Dislike:we(le);break;case te.Feedback:(0,d.cc)("sapphire://feedback");break;case te.Hide:!function(e,t,i){(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return;he=i||he;let n=null;const o=e.sourceId?e.sourceId:e.id;if(ie(yield I(o),o,te.Hide))if(ge&&fe);else{he&&(he.style.display="none");const{toastMessageBgColor:e,toastMessageTextColor:i,toastMessageActionColor:a}=ne();n=yield(0,d.oh)(t?t.storyHiddenToastText:ce.storyHiddenToastText,e,i,a,null==ce?void 0:ce.undo),n=n&&n.length&&JSON.parse(n),n&&"actionClick"===n.result&&(he&&(he.style.display="block"),A(o))}}))}(le);break;case te.Like:xe(le);break;case te.Mute:!function(e){(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return;const t=e.providerData&&e.providerData.id;if(ge&&fe){yield function(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=(0,o.fU)("service/Msn/Providers",E()),i=M();i.set("ids",e),t.search=i.toString();try{const e=yield fetch(t.href);if(e&&e.ok){const t=yield e.json();if(t&&t.value&&t.value[0]&&t.value[0].logos&&t.value[0].logos[0]&&t.value[0].logos[0].imageLink.href)return`${t.value[0].logos[0].imageLink.href}?w=64&h=64&q=60&m=6&f=jpg&u=t`}}catch(e){console.log(`Failed to load provider logo ${t.href}`,e)}return null}))}(t)}else{let i=null;try{i=yield function(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(e)return F(e,L,"SourceProvider")}))}(t)}catch(e){return void(0,Q.OO)(e,Z.ZP4,`ActionMenu : Failed to send onMute signal. ${e}`)}if(e.refreshFeedCallback(),ie(i,t,te.Mute)){const{toastMessageBgColor:e,toastMessageTextColor:t,toastMessageActionColor:i}=ne();yield(0,d.oh)(ce.storiesHiddenToastText,e,t,i)}}}))}(le);break;case te.Share:!function(e){var t;if(!e)return;const i=(null==e?void 0:e.destinationUrl)||(null==e?void 0:e.url),n=null==e?void 0:e.title,o=(null===(t=null==e?void 0:e.images)||void 0===t?void 0:t.length)?Ce(e.images[0]):"",a=null==e?void 0:e.abstract;null!==i&&(0,d.w8)(i,n,o,a)}(le);break;case te.Save:!function(e,t,i){var o;(0,n.mG)(this,void 0,void 0,(function*(){if(!t)return;var a;i&&(a=i,ce||(ce=a));const r=t.sourceId?t.sourceId:t.id,s=t.title&&t.title,l=(new Date).getTime(),c=t.destinationUrl||t.url,u=r,h=function(e){let t;switch(e){case Y.PL.Article:t="article";break;case Y.PL.Video:t="video";break;case Y.PL.Slideshow:t="gallery"}return t}(e);let p;e===Y.PL.Video&&(p=de(t,null));const g=100,f=100,v=(null===(o=null==t?void 0:t.images)||void 0===o?void 0:o.length)?Ce(t.images[0],f,g):"";let m,b;t.provider&&(m=t.provider.name,t.provider.logoUrl&&(b=`${t.provider.logoUrl}?w=20&h=20&q=60&m=6&f=jpg&u=t`)),re(r)||ae({cardContent:t});const y=function(e){const t=re(e),i=t&&t.find((e=>e.key===te.Save));return i&&i.value}(r);y?(0,d._o)(u).then((e=>(0,n.mG)(this,void 0,void 0,(function*(){const t=e&&e.length&&JSON.parse(e);if(t&&!0===t.success){yield function(e){return(0,n.mG)(this,void 0,void 0,(function*(){return P(e,T)}))}(r);const{toastMessageBgColor:e,toastMessageTextColor:t,toastMessageActionColor:i}=ne();(0,d.oh)(ce.storyRemovedToastText,e,t,i)}})))):(0,d.XF)(s,u,c,l,r,h,m,v,g,f,b,p).then((e=>(0,n.mG)(this,void 0,void 0,(function*(){const t=e&&e.length&&JSON.parse(e);let i=null;if(t&&!0===t.success){yield function(e){return(0,n.mG)(this,void 0,void 0,(function*(){return F(e,T)}))}(r);const{toastMessageBgColor:e,toastMessageTextColor:t,toastMessageActionColor:o}=ne();i=yield(0,d.oh)(ce.storySavedToastText,e,t,o,ce.openToastText),i=i&&i.length&&JSON.parse(i),i&&"actionClick"===i.result&&(0,d.AJ)(z,"news")}}))));const C={key:te.Save,value:!y};oe(r,te.Save,C)}))}(le.type,le);break;case te.HiddenSource:!function(){(0,n.mG)(this,void 0,void 0,(function*(){(0,d.AJ)(G,"newsHiddenPublishers")}))}()}}(i)}}}function Ce(e,t=150,i=150){if(null==e?void 0:e.url){const n=new W.fH,o={width:t,height:i,enableDpiScaling:!0,devicePixelRatio:(0,W.Nd)(n.data.devicePixelRatio,"devicePixelRatio"),mode:e.focalRegion?q.vc.FocalCrop:q.vc.FacialCrop,focalRegion:e.focalRegion};return(0,q.mL)(e.url,o)}return""}function xe(e,t=!1,i=null,o){if(!e)return;const a=e.sourceId?e.sourceId:e.id,r=re(a),s=r&&r.find((e=>e.key===te.Like)),l=s&&s.value;!t&&Se(e.id),l?function(e){(0,n.mG)(this,void 0,void 0,(function*(){return P(e,k)}))}(a):function(e){return(0,n.mG)(this,void 0,void 0,(function*(){return F(e,k)}))}(a).then((t=>{if(ie(t,a,te.Like)){const{toastMessageBgColor:e,toastMessageTextColor:t,toastMessageActionColor:i}=ne();(0,d.oh)(o?o.showMoreToastText:ce.showMoreToastText,e,t,i)}const n=r&&r.find((e=>e.key===te.Dislike));n&&n.value&&we(e,!1,i)}));const c={key:te.Like,value:!l};oe(a,te.Like,c),i&&i()}function we(e,t=!1,i=null,n){if(!e)return;const o=e.sourceId?e.sourceId:e.id,a=re(o),r=a&&a.find((e=>e.key===te.Dislike)),s=r&&r.value;!t&&Se(e.id),ge&&fe?s?A(o):I(o).then((e=>{ie(e,o,te.Dislike)})):s?A(o):I(o).then((t=>{if(ie(t,o,te.Dislike)){const{toastMessageBgColor:e,toastMessageTextColor:t,toastMessageActionColor:i}=ne();(0,d.oh)(n?n.showFewerToastText:ce.showFewerToastText,e,t,i)}const r=a&&a.find((e=>e.key===te.Like));r&&r.value&&xe(e,!1,i)}));const l={key:te.Dislike,value:!s};oe(o,te.Dislike,l),i&&i()}function Se(e){(0,J.$o)().getItem("swipableTipStorageKey")}},63725:function(e,t,i){"use strict";i.d(t,{d:function(){return L}});var n=i(33940),o=i(26415),a=i(33954);var r=i(2040),s=i(47903),d=i(16517),l=i(17318),c=i(94788),u=i(54804),h=i(62938),p=i(67267),g=i(63535),f=i(87298),v=i(65135),m=i(75559),b=i(51125),y=i(4875),C=i(51671);class x{constructor(){this.cachedMetadata={}}get(e){const t=w(e);if(t)return this.cachedMetadata[t]}set(e,t){const i=w(e);i&&(this.cachedMetadata[i]=t)}}function w(e){if(e)return JSON.stringify(e)}var S=i(33799),$=i(33379),k=i(12611);class L{constructor(e){this.config=e,this.responseCache=new x,this.requestPathWithoutFeedId="MSN/Feed/me",this.requestPathWithFeedId="MSN/Feed",this.requestPathForFeedLayout="MSN/FeedLayout",this.requestPathForArticleFRE="news/Feed",this.requestPathForNewsFeed="news/Feed"}fetch(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){let i=this.config.initialRequest;if(e&&(e.feedId||!i.feedId||e.nextPageUrl||(e.feedId=i.feedId),i=Object.assign(Object.assign({},i),e)),!i)return void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.pIg),{message:"default OneService fetch configuration was invalid"}));const c=(null==e?void 0:e.forceEnterpriseCompliance)||(0,y.VQ)(),u=yield p.$.getOneServiceFeedCallHeaders(c);if(c&&!(null==u?void 0:u[r.Yu.authorization])&&!(null==e?void 0:e.forceNoAuthorization))return;const m={credentials:"include",headers:u,method:"GET"},x=i.useNextPageUrl&&i.nextPageUrl,w=i.feedLayoutRequestType;let L;L=!x&&w?this.requestPathForFeedLayout:"feed"===i.query&&i.feedId?this.requestPathForNewsFeed:i.feedId||i.entityId?this.requestPathWithFeedId:"frefeedback"===i.query||"frefeedbackneg"===i.query||"UserFre"===i.query?this.requestPathForArticleFRE:this.requestPathWithoutFeedId;const T=this.responseCache.get(i);if(this.isRequestCacheable(L)&&T)return T;const O=(0,g.fU)(L,null==e?void 0:e.overwriteBaseApiURL),I=(0,b.Ee)();if(x)this.requestQueryParams=new s.h(new URL(x).search),I>0&&this.requestQueryParams.set(b.i$,I.toString()),d.jG.SendFeedCallActivityIdInHeader||this.requestQueryParams.set("activityId",d.jG.ActivityId);else{const{ocid:e,flightData:t,overwriteFlightData:n,muidFallback:o}=i,a=(yield(0,C.XJ)())===S.Hy.SignedIn?p.$.getOneServiceParamsWithAuth(d.jG.UserId,e,!1,t,n):p.$.getOneServiceParamsWithoutAuth(d.jG.UserId||o&&`m-${d.jG.ActivityId}`,e,!1,t,n,c);this.requestQueryParams=new s.h;for(let e=0;e<a.length;e++)this.requestQueryParams.set(a[e].key,a[e].value);if(w&&!i.start)this.requestQueryParams.set("t",w);else if(!i.disableQueryType){const e=i.queryType||"myfeed";this.requestQueryParams.set("queryType",e)}if(this.requestQueryParams.set("wrapodata","false").set("DisableTypeSerialization","true").set("timeOut",`${this.getRequestTimeout(i)}`).set("contentType",i.contentType).set("$select",i.select).set("responseSchema",i.disableFlatViewResponse?h.c.CardView:h.c.FlatView),i.apiKey&&this.requestQueryParams.set("apikey",i.apiKey),i.count&&this.requestQueryParams.set("$top",`${i.count}`),i.contentId&&this.requestQueryParams.set("contentId",i.contentId),this.tryAddQueryInterestParams(i)||this.requestQueryParams.set("ids",i.feedId).set("query",i.query).set("entityids",i.entityId),!w&&!i.disableLocation){const e=p.$.getLocationParams(i.latitude,i.longitude);e&&this.requestQueryParams.set(e.key,e.value)}i.start&&this.requestQueryParams.set("$skip",`${i.start}`),i.infopaneItemCount&&(this.requestQueryParams.set("infopaneCount",`${i.infopaneItemCount}`),!1===i.complexInfopaneEnabled&&this.requestQueryParams.set("cipenabled","false")),I>0&&this.requestQueryParams.set(b.i$,I.toString()),(i.useDelta||i.sessionId)&&(!1!==i.useDelta&&this.requestQueryParams.set("delta","true"),i.sessionId&&this.requestQueryParams.set("session",i.sessionId)),i.channel&&this.requestQueryParams.set("channel",i.channel)}let A,P,F,M;"UserFre"===i.query&&this.requestQueryParams.set("entityIds",i.userFreCandidatesSetId),d.jG.SendFeedCallActivityIdInHeader&&this.requestQueryParams.delete("activityId"),O.search=this.requestQueryParams.toString();try{const e=(0,$.N)()?1e4:800,t=yield(0,f.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){return this.config.useFetchPromise?yield(0,f.O)(decodeURIComponent(O.href),m,e):yield(0,l.Sm)(decodeURIComponent(O.href),e,m)}))),"OneServiceCardProvider.fetch");if(!t||!t.ok&&404!==t.status){F=t?t.status:null,M=t?t.statusText:null;const e=401===F?o.THd:o.p3y;return void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},e),{message:t?"OneService returned error response":"OneService response was null",pb:Object.assign(Object.assign({},e.pb),{fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href,statusCode:F,statusText:M}})}))}if(204===t.status||404===t.status)A={feedItems:[]},F=t.status,M=t.statusText,v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.n82),{message:204===t.status?"Empty non first-page response":"Empty first-page response",pb:Object.assign(Object.assign({},o.n82.pb),{fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href,statusCode:F,statusText:M}})}));else{if(i.rawView)return t.json();A=yield t.json()}if(t.headers){t.headers.get("X-Statics-Fallback")&&v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.ovB),{pb:Object.assign(Object.assign({},o.ovB.pb),{customMessage:`Request URL: ${decodeURIComponent(O.href)}`}),message:"Fell back to static content on the feeds call"}));const e=t.headers.get("ddd-tmpl");v.M0.addOrUpdateTmplString(e),P=t.headers.get("ddd-session-id");const i=t.headers.get(r.rD.traceId);this.addOrUpdateIdxId(i);const n=t.headers.get(r.rD.debugId);this.addOrUpdateDebugId(n,!1)}}catch(e){return void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.u45),{message:"Error while fetching OneService response",pb:Object.assign(Object.assign({},o.u45.pb),{customMessage:`Error: ${e}`,fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href}})}))}if(!A)return void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.XFR),{message:"Didn't get valid JSON from response.",pb:Object.assign(Object.assign({},o.XFR.pb),{fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href}})}));const E=(this.requestQueryParams.get("t")||"").toLowerCase(),D="tabriver"===E||"tabs"===E,H=this.requestQueryParams.get("responseSchema"),{nextPageUrl:R,feedItems:N}=H===h.c.CardView?(0,k.ni)(A,D):A;if(!N)return void v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.yWd),{message:"Didn't get valid feed items list from response.",pb:Object.assign(Object.assign({},o.yWd.pb),{fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href,responseJson:JSON.stringify(A)}})}));if(!N.length&&!i.start)if(i.isSearchRequest)this.trackEmptyResponseForInterestSearch(i.feedId,i.query,O.href);else if(i.feedId){const{emptyResponseFeedIds:e}=this.config.initialRequest;t||i.feedId.startsWith("Q_")||e&&e.length&&-1!==e.indexOf(i.feedId)||this.trackEmptyResponseForXFeed(i.feedId,O.href)}else i.query?this.trackEmptyResponseForQueryFeed(i.query,O.href):this.trackAppErrorHelper(o.BlE,"OneService returned an empty feed for a myfeed request.",O.href,null,null,"",F,M);if(D)if("tabriver"===E){const e=N.find((e=>"tabbedInfopane"===e.type));e&&e.subItems&&e.subItems.length||v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.$Ej),{pb:Object.assign(Object.assign({},o.$Ej.pb),{feedData:JSON.stringify(A),fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href,responseJson:JSON.stringify(A)}}),message:"TabRiver request returned empty content for tabbed infopane card."}))}else if("tabs"===E){let e=!1;e=!N.length||-1!==N.findIndex((e=>"tabbedInfopane"!==e.type||!e.subItems||!e.subItems.length)),e&&v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.a3w),{pb:Object.assign(Object.assign({},o.a3w.pb),{fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:O.href,responseJson:JSON.stringify(A)}}),message:"Tabs request returned empty content for one or more tabbed infopane cards."}))}let j;if(N.length>=0?j=Object.assign(Object.assign({},i),{nextPageUrl:R,start:(i.start||0)+i.count}):a.k.log(`River has reached end of content stream. requested: ${i.count}, received: ${N.length}`),i.postRequestGrouping){const{start:e,count:t,type:n}=i.postRequestGrouping,o={type:n,subItems:N.splice(e,t)};N.splice(e,0,o)}const _={cardMetadata:N,nextPageRequest:j,sessionId:P,feedContext:A.feed};return this.responseCache.set(i,_),_}))}fetchFromWebWorker(e,t=1e3,i){return(0,$.N)()?(0,c.ot)({id:e},t).then((e=>{const t=e.payload;if(!e.fetched||!t||!t.feedData)return null;t.responseSchema===h.c.CardView&&(t.feedData=(0,k.ni)(t.feedData,t.isTabbedInfopaneResponse));const{nextPageUrl:n,feedItems:o=[]}=t.feedData;let a,r=this.config.initialRequest;if(i&&(r=Object.assign(Object.assign({},r),i)),n&&o.length&&(a=Object.assign(Object.assign({},r),{start:(r.start||0)+r.count,nextPageUrl:n})),r.postRequestGrouping){const{start:e,count:t,type:i}=r.postRequestGrouping,n={type:i,subItems:o.splice(e,t)};o.splice(e,0,n)}const s=t.traceId;this.addOrUpdateIdxId(s);const d=t.debugId;return this.addOrUpdateDebugId(d,!1),{cardMetadata:o,nextPageRequest:a,sessionId:t.sessionId}})):Promise.resolve(null)}clearCache(){this.responseCache=new x}getRequestTimeout(e){const{timeoutMs:t,isSearchRequest:i,query:n,customFeedTimeoutMs:o}=e;return i&&n&&o?o:t}tryAddQueryInterestParams(e){if(!e.useVerticalAsInterest&&!e.useCategoryAsInterest)return!1;const t=(e.useVerticalAsInterest?u.Al.ClientSettings.verticalKey:u.Al.ClientSettings.categoryKey)||"",i=e.verticalCategoryKeyToInterestMapping[t.toLowerCase()],n=i||"news";return this.requestQueryParams.set("query",encodeURIComponent(n)).set("source",e.contentSource),i||e.useCategoryAsInterest&&!t||v.M0.sendAppErrorEvent(Object.assign(Object.assign({},o.US9),{message:"Failed to get content",pb:Object.assign(Object.assign({},o.US9.pb),{customMessage:`Failed to get content for VerticalKey:${d.jG.HostPage.verticalKey} | CategoryKey:${d.jG.HostPage.categoryKey}. Loading fallback views river with ${n} content.`})})),!0}trackAppErrorHelper(e,t,i,n,o,a,r,s){let l="";n&&(l+=`Feed id: ${n}. `),o&&(l+=`Feed query: ${o}. `),v.M0.sendAppErrorEvent(Object.assign(Object.assign({},e),{message:t,pb:Object.assign(Object.assign({},e.pb),{customMessage:l,fetchNetworkResponse:{activityId:d.jG.ActivityId,requestUrl:i,responseJson:a,statusCode:r,statusText:s}})}))}trackEmptyResponseForQueryFeed(e,t){this.trackAppErrorHelper(o.huq,"OneService returned an empty feed for a query-powered feed. See property bag for the query.",t,null,e)}trackEmptyResponseForXFeed(e,t){this.trackAppErrorHelper(o.MD5,"OneService returned an empty feed for an x-feed page.",t,e,null)}trackEmptyResponseForInterestSearch(e,t,i){e?this.trackAppErrorHelper(o.L90,"OneService returned an empty feed for a user searched xfeed.",i,e,null):this.trackAppErrorHelper(o.V3_,"OneService returned an empty feed for a user query.",i,null,t)}addOrUpdateIdxId(e){e&&v.M0.addOrUpdateIdxId(e,!1)}addOrUpdateDebugId(e,t){if(t)return delete v.M0.getPageMetadata().joinIdProps[m.ug],void v.M0.addOrUpdateJoinIdProperty(m.ug,e);if(!e)return;const i=v.M0.getPageMetadata().getJoinId(m.ug),n=i?`${i},${e}`:e;v.M0.addOrUpdateJoinIdProperty(m.ug,n)}isRequestCacheable(e){return!this.config.cacheDisabledRequestPaths||!this.config.cacheDisabledRequestPaths.includes(e)}}L.providerName="OneService"},62938:function(e,t,i){"use strict";var n,o;i.d(t,{c:function(){return n}}),function(e){e.CardView="cardview",e.FlatView="flatview"}(n||(n={})),function(e){e.t3="T3",e.t6="T6"}(o||(o={}))},30113:function(e,t,i){"use strict";var n;i.d(t,{m:function(){return n}}),function(e){e.small="OneByOne",e.medium="OneByTwo",e.large="OneByThree"}(n||(n={}))},11708:function(e,t,i){"use strict";var n;i.d(t,{f:function(){return n}}),function(e){e.AiCharacter="aicharacterCardEnabled",e.AutosMarketplaceCard="autosmarketplaceCardEnabled",e.HoroscopeCard="horoscopeCardEnabled",e.WeatherCard="weatherCardEnabled",e.SportsCard="sportsCardEnabled",e.MoneyCard="moneyCardEnabled",e.FinanceCard="financeCardEnabled",e.OnThisDayCard="onthisdayCardEnabled",e.ShoppingCard="shoppingCardEnabled",e.ShoppingEventCard="eventSDCardShoppingEnabled",e.TrafficCard="trafficCardEnabled",e.EsportsCard="esportsCardEnabled",e.EsportsStreamsCard="esportsStreamsCardEnabled",e.ElectionsCard="genericelectionCardEnabled",e.LotteryCard="lotteryCardEnabled",e.QnaCard="qnaCardEnabled",e.RecipesCard="recipeCardEnabled",e.InspirationCard="inspirationCardEnabled",e.TravelCard="travelCardEnabled",e.HealthCard="healthCardEnabled",e.TopStoriesCard="topstoriesCardEnabled",e.TrendingTopics="TrendingTopicsUpsellEnabled",e.LocalGuideCard="localGuideCardEnabled",e.GroceryCard="groceryCardEnabled",e.RewardsCard="rewardsCardEnabled",e.RecommendedSearchesCard="recommendedSearchesCardEnabled",e.PersonalizedOffersCard="personalizedoffersCardEnabled",e.PollsCard="pollsCardEnabled",e.MarketPlaceCard="marketplaceCardEnabled",e.QuizCard="quizCardEnabled",e.CasualGamesCard="esportsCardEnabled",e.CommuteCard="commuteCardEnabled",e.Crypto="CryptoCard",e.MarketBrief="MarketBriefCard"}(n||(n={}))},83152:function(e,t,i){"use strict";var n;i.d(t,{L:function(){return n}}),function(e){e.Location="Location",e.Weather="Weather",e.Finance="Finance",e.Team="Team",e.League="League",e.Player="Player",e.Traffic="Traffic",e.Widget="Widget",e.TopicFeed="TopicFeed"}(n||(n={}))},791:function(e,t,i){"use strict";i.d(t,{N:function(){return y}});var n=i(33940),o=i(33954),a=i(26415),r=i(68364),s=i(33799),d=i(16517),l=i(94788),c=i(67267),u=i(63535),h=i(87298),p=i(83152),g=i(11708),f=i(30113),v=i(65135),m=i(33379),b=i(51671);const y=new class extends class{constructor(e){this.fetchImpl=e,this.userUpdateEndpoint="msn/user",this.pdpServiceEndpoint="graph/actions",this.locationsServiceEndPoint="v1/news/users/me/locations",this.userActionServiceEndPoint="news/users/me/actions",this.ocid="Peregrine",this.ocidOverride=!1}getUserDefaultLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={method:"GET",headers:yield c.$.getOneServiceHeaders(),credentials:"include"},i=(0,u.PH)(this.locationsServiceEndPoint);let o;[...c.$.getCommonParams2(this.ocid,!this.ocidOverride),{key:"autodetect",value:e&&`${e}`}].forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{o=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(i.href,t);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: getUserDefaultLocation}`;throw new Error(t)}return e}))),"getUserDefaultLocation")}catch(e){return o}return o}))}addToFavoriteLocation(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i="Location",o="Follow",a={method:"POST",body:JSON.stringify({actionType:o,targetType:i,definitionName:t,degree:"FavoriteLocation",metaData:e}),headers:yield c.$.getOneServiceHeaders(),credentials:"include"},r=(0,u.PH)(this.pdpServiceEndpoint);let l;((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{l=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(r.href,a);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: Location`;throw new Error(t)}return e.json()}))),"addToFavoriteLocation")}catch(e){return!1}return!0}))}removeFavoriteLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(p.L.Location,"definitionName",[e])}))}removeLocation(e){return(0,n.mG)(this,void 0,void 0,(function*(){return yield this.deleteFromPdp(p.L.Location,"definitionName",[e])}))}updatePdpHomeLocation(e,t,i={},o){return(0,n.mG)(this,void 0,void 0,(function*(){const a=p.L.Location,r="Follow",l=yield this.getRequestInit({method:"POST"},i);l.body=JSON.stringify({actionType:r,targetType:a,definitionName:t,degree:"DefaultLocation",metaData:e});const g=(0,u.PH)(this.pdpServiceEndpoint);return((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=o?o:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=o?o:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)})),yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,l);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${a}`;throw new Error(t)}return e}))),"setPdpHomeLocation"),this.tryInvalidateBulkFetchedPdpTargetType(a),!0}))}updateTrafficMyRoutes(e,t,i,a,r,s){return(0,n.mG)(this,void 0,void 0,(function*(){const d=i.replace(/[^a-zA-Z0-9\-.,_]/g,""),l=p.L.Traffic,u="Follow",g={method:"POST",body:JSON.stringify({actionType:u,targetType:l,targetId:d,degree:e,definitionName:t,metadata:a,createdDateTime:s}),headers:yield c.$.getOneServiceHeaders(),credentials:"include"},f=yield this.getTrafficPdpUrl(null,null,r);try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(f.href,g);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${l}`;throw new Error(t)}return e.json()}))),"updateTrafficMyRoutes");this.tryInvalidateBulkFetchedPdpTargetType(l)}catch(e){return o.k.logError(e.message),!1}return!0}))}deleteTrafficMyRoutes(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){const o={method:"DELETE",headers:yield this.getOneserviceHeaders(),credentials:"include"},a=yield this.getTrafficPdpUrl(e,t,i);try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${p.L.Traffic}`;throw new Error(t)}return e}))),"deleteTrafficFromPdp"),this.tryInvalidateBulkFetchedPdpTargetType(p.L.Traffic)}catch(e){return!1}return!0}))}getTrafficMyRoutes(e,t){var i;return(0,n.mG)(this,void 0,void 0,(function*(){const o={method:"GET",headers:yield this.getOneserviceHeaders(),credentials:"include"},a=yield this.getTrafficPdpUrl(e,null,t);try{const e=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(a.href,o);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${p.L.Traffic}`;throw new Error(t)}return e}))),"getTrafficFromPdp");return null===(i=yield e.json())||void 0===i?void 0:i.value}catch(e){return null}}))}getTrafficPdpUrl(e,t,i){return(0,n.mG)(this,void 0,void 0,(function*(){const n=(0,u.PH)(this.pdpServiceEndpoint),o=(yield(0,b.XJ)())===s.Hy.SignedIn,a=(0,d.Yq)().UserId,r=o?c.$.getOneServiceParamsWithAuth(a,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(a,this.ocid,!this.ocidOverride);if(e||t){const i=`targetType eq '${p.L.Traffic}'`,o=e?`degree eq '${e}'`:"",a=t?`definitionName eq '${t}'`:"";n.searchParams.set("$filter",`actionType eq 'Follow' and (${i})${o?` and (${o})`:""}${a?` and (${a})`:""}`)}return[...r,...i||[]].forEach((e=>{e.value&&n.searchParams.set(e.key,e.value)})),n}))}addToWatchList(e,t=0,i={},o={}){return(0,n.mG)(this,void 0,void 0,(function*(){const a=p.L.Finance,r="Follow",l={method:"POST",body:JSON.stringify({actionType:r,targetType:a,targetId:e,metadata:Object.assign({securityType:t,tickerId:this.generateUUID()},o)}),headers:yield this.getOneserviceHeaders(i),credentials:"include"},g=(0,u.PH)(this.pdpServiceEndpoint),f="zh-cn"!==(0,d.Yq)().CurrentMarket;let v;((yield(0,b.XJ)())===s.Hy.SignedIn&&f?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&g.searchParams.set(e.key,e.value)}));try{v=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(g.href,l);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${a}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(a)}catch(e){return!1}return!0}))}addListToWatchList(e,t={},i={}){return(0,n.mG)(this,void 0,void 0,(function*(){const o=p.L.Finance,a="Follow",r={method:"POST",body:JSON.stringify(e.map((e=>({actionType:a,targetType:o,targetId:e.key,metadata:Object.assign({securityType:e.value,tickerId:this.generateUUID()},i)})))),headers:yield this.getOneserviceHeaders(t),credentials:"include"},l=(0,u.PH)(this.pdpServiceEndpoint),g="zh-cn"!==(0,d.Yq)().CurrentMarket;let f;((yield(0,b.XJ)())===s.Hy.SignedIn&&g?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&l.searchParams.set(e.key,e.value)}));try{f=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(l.href,r);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${o}`;throw new Error(t)}return e.json()}))),"addToWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(o)}catch(e){return!1}return!0}))}generateUUID(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}))}sortWatchList(e,t={}){var i;return(0,n.mG)(this,void 0,void 0,(function*(){const o=p.L.Finance,a="Follow",r=yield y.readPdpWithTargetType(p.L.Finance,!0,200,t),l=r&&(null===(i=r.value)||void 0===i?void 0:i.filter((e=>e.actionType===a&&e.targetId)));if(!l||l.length<e.length)return!1;const g={};let f=e.length;l.forEach((t=>{let i=e.findIndex((e=>e===t.targetId));i<0&&(i=f,f++),g[t.targetId]=JSON.stringify({actionType:a,targetId:t.targetId,targetType:o,rank:i,metadata:t.metadata})}));const v={method:"PUT",body:JSON.stringify(g),headers:yield this.getOneserviceHeaders(t),credentials:"include"},m=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&m.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(m.href,v);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for actionType: Follow, targetType: ${o}`;throw new Error(t)}return e.json()}))),"sortWatchList"),this.tryInvalidateBulkFetchedPdpTargetType(p.L.Finance)}catch(e){return!1}return!0}))}updateWeatherInterests(e,t,i,a={},r){return(0,n.mG)(this,void 0,void 0,(function*(){const t=p.L.Weather,n={method:"POST",body:JSON.stringify({actionType:"Follow",targetType:t,targetId:e,metadata:{UserAction:{0:{UpdateTime:new Date,Location:i}}}}),headers:yield this.getOneserviceHeaders(a),credentials:"include"},l=(0,u.PH)(this.pdpServiceEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=r?r:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=r?r:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&l.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(l.href,n);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update weather interests call`;throw new Error(t)}}catch(e){return o.k.logError(e.message),!1}return!0}))}updateWeatherSettings(e,t,i={},o){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!t)return!0;let n="";n=e&&!t?'{"weatherDisplayUnit":"'+e+'"}':!e&&t?'{"userSettings":{"weatherLocationSettingMode":"'+t+'"}}':'{"weatherDisplayUnit":"'+e+'","userSettings":{"weatherLocationSettingMode":"'+t+'"}}';const a=yield this.getRequestInit({method:"POST"},i);a.body=n;const r=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=o?o:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=o?o:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));const l=yield this.fetchImpl(r.href,a);if(l.status>=400){const e=`OneService returned error response. Status: ${l.status} for update weather setting call`;throw new Error(e)}return!0}))}updateFinanceInterests(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const t={financeInterests:e},i=JSON.stringify(t),n=yield this.getRequestInit({method:"POST"});n.body=i;const o=(0,u.PH)(this.userUpdateEndpoint),a="zh-cn"!==(0,d.Yq)().CurrentMarket;((yield(0,b.XJ)())===s.Hy.SignedIn&&a?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&o.searchParams.set(e.key,e.value)}));const r=yield this.fetchImpl(o.href,n);if(r.status>=400){const e=`OneService returned error response. Status: ${r.status} for update finance interests call`;throw new Error(e)}return!0}))}updateUserSettings(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!0;const n=[];let a;for(a in e)null!=e[a]&&n.push('"'+a+'": '+JSON.stringify(e[a]));const r='{"userSettings":{'+n.join(", ")+"}}",l=yield this.getRequestInit({method:"POST"},t);l.body=r;const h=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(null!=i?i:(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&h.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(h.href,l);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update weather setting call`;throw new Error(t)}}catch(e){return o.k.logError(e.message),!1}return!0}))}getPdpUserPreference(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){const a=yield this.getRequestInit({method:"GET"},t),r=(0,u.PH)(this.userUpdateEndpoint);[...(yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth(i||(0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth(i||(0,d.Yq)().UserId,this.ocid,!this.ocidOverride)].forEach((e=>{e.value&&r.searchParams.set(e.key,e.value)}));try{const e=yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(r.href,a);if(!e.ok){if(e.status>=400&&e.status<500&&408!=e.status)return e;throw Error(e.statusText)}return e}))),"readPDPData");if(!e.ok&&404!=e.status)throw Error(`code=${e.status}, ${e.statusText}`);return Object.assign(Object.assign({},yield e.json()),{is404:404==e.status})}catch(t){if(o.k.logError(t.message),e)throw Error(t.message);return null}}))}updatePdpLayoutPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t={method:"PUT",credentials:"include",body:JSON.stringify({dummyid:{userLayoutPreference:e}})},i=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{const e=yield this.fetchImpl(i.href,t);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for update layout preference setting call`;throw new Error(t)}}catch(e){return o.k.logError(e.message),!1}return!0}))}updateSegmentCardsEnableStatus(e,t=null){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const i=[];if(t){let e;for(e in t)null!=t[e]&&i.push('"'+e+'": '+JSON.stringify(t[e]))}const n=e.map((e=>e.cardType!=g.f.TopStoriesCard?`\\"${e.cardType}\\":${e.enabled?'\\"1\\"':'\\"0\\"'}`:"")).join(","),o=i.length>0?'{"segmentCardSettings":"{'+n+'}","userSettings":{'+i.join(", ")+"}}":'{"segmentCardSettings":"{'+n+'}"}';return this.updateUserPreference(o)}))}updateProductivityCardsEnableStatus(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t=`{userSettings:{enterpriseCardsEnabled:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}))}updateGamingCardsEnableStatus(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t=`{userSettings:{gamingCards:"{${e.map((e=>`\\"is${e.cardType}Enabled\\":${e.enabled?"true":"false"}`)).join(",")}}"}}`;return this.updateUserPreference(t)}))}updateCommunitySettingsOptOutStatus(e){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e&&!e.length)return!0;const t={};e.forEach((e=>{t[e.settingType]=e.optedOut?"1":"0"}));const i={communitySettings:t};return this.updateUserPreference(JSON.stringify(i))}))}updateWidgetSettings(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const n=e.map((e=>({actionType:"Follow",targetId:e.cardType,targetType:p.L.Widget,metadata:{prongsv2:{region:e.region,size:f.m[e.size],position:e.position}}})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:i})}))}muteWidget(e,t={},i){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e||!e.length)return!1;const n=e.map((e=>({actionType:"Mute",targetId:e,targetType:p.L.Widget})));return this.sendGenericActionRequest({additionalHeaders:t,endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(n),appError:i})}))}disableSpotlightCard(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){if(!e)return!1;const i={actionType:"Disabled",definitionName:e,targetType:p.L.TopicFeed};return this.sendGenericActionRequest({endpoint:this.pdpServiceEndpoint,method:"POST",payload:JSON.stringify(i),appError:t})}))}enableSpotlightCard(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return!!e&&(yield this.deleteFromPdp(p.L.TopicFeed,"definitionName",[e],{},void 0,"Disabled",t))}))}sendGenericActionRequest(e){return(0,n.mG)(this,void 0,void 0,(function*(){const{additionalHeaders:t,additionalParams:i,endpoint:o,method:a,payload:r,appError:l}=e;if(!o||!a)return this.logError(new Error("Missing arguments: 'endpoint' and 'method' should be provided and valid"),l),!1;const p=(0,u.PH)(o);let g;((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)})),i&&i.forEach((e=>{e.value&&p.searchParams.set(e.key,e.value)}));try{JSON.parse(r),g=r}catch(e){g=JSON.stringify(r)}const f={method:a,body:g,headers:yield this.getOneserviceHeaders(t),credentials:"include"},v="GET"==a;try{return yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const e=yield this.fetchImpl(p.href,f);if(e.status>=400){const t=`OneService returned error response. Status: ${e.status} for payload: ${r}`;throw new Error(t)}return!v||(yield e.json())}))),"sendActions")}catch(e){return this.logError(e,l),!1}}))}getUserActions(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=[{key:"actionType",value:e}],i=yield this.sendGenericActionRequest({additionalParams:t,endpoint:this.userActionServiceEndPoint,method:"GET"});return i&&i.value}))}setUserAction(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){return!!(yield this.sendGenericActionRequest({endpoint:this.userActionServiceEndPoint,method:"POST",payload:Object.assign({actionType:e},t)}))}))}deleteUserAction(e,t){return(0,n.mG)(this,void 0,void 0,(function*(){const i=[{key:"actionType",value:e},{key:"targetId",value:t.targetId},{key:"definitionName",value:t.definitionName}];return!!(yield this.sendGenericActionRequest({additionalParams:i,endpoint:this.userActionServiceEndPoint,method:"DELETE"}))}))}updateUserPreference(e){return(0,n.mG)(this,void 0,void 0,(function*(){const t=yield this.getRequestInit({method:"POST"});t.body=e;const i=(0,u.PH)(this.userUpdateEndpoint);((yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride)).forEach((e=>{e.value&&i.searchParams.set(e.key,e.value)}));try{const n=yield this.fetchImpl(i.href,t);if(n.status>=400){const t=`OneService returned error response while updating user preference. Status: ${n.status}, payload: ${e}`;throw new Error(t)}}catch(e){return!1}return!0}))}setPdpTargetTypesForBulkLoad(e){e&&e.length&&!this.bulkGraphActionTargetTypes&&(this.bulkGraphActionTargetTypes=e)}readPdpWithTargetType(e,t=!1,i,o={},r=!0,s=[]){return(0,n.mG)(this,void 0,void 0,(function*(){if(r){const t=yield this.getFromWebWorker(e);if(t)return t}if(this.bulkGraphActionTargetTypes&&this.bulkGraphActionTargetTypes.length)if(this.bulkGraphActionTargetTypes.indexOf(e)>=0){this.bulkGraphActionResultCache=this.bulkGraphActionResultCache||(yield this.bulkGraphActionPromise||(this.bulkGraphActionPromise=this.fetchPdpWithTargetTypes(this.bulkGraphActionTargetTypes,t,i,o,s)));const n=this.bulkGraphActionResultCache.get(e);if(n)return{value:n}}else v.M0.sendAppErrorEvent(Object.assign(Object.assign({},a.srQ),{message:`Received an unknown target type "${e}" that was not in the bulk graph action target types list "${this.bulkGraphActionTargetTypes}". Falling back to new network call. Please update the EntryPoint config's "graphActionsToBulkLoad" property to include this type.`}));const n=(yield this.fetchPdpWithTargetTypes([e],t,i,o,s)).get(e);if(n)return{value:n}}))}deleteFromPdp(e,t,i,o={},a,r="Follow",l,p=[]){return(0,n.mG)(this,void 0,void 0,(function*(){const g={method:"DELETE",headers:yield this.getOneserviceHeaders(o),credentials:"include"},f=(0,u.PH)(this.pdpServiceEndpoint),m=(yield(0,b.XJ)())===s.Hy.SignedIn?c.$.getOneServiceParamsWithAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride):c.$.getOneServiceParamsWithoutAuth((0,d.Yq)().UserId,this.ocid,!this.ocidOverride),y=`targetType eq '${e}'`,C=i.map((e=>`${t} eq '${e}'`)).join(" or ");let x=`actionType eq '${r}' and (${C}) and (${y})`;a&&(x+=` and (degree eq '${a}')`),f.searchParams.set("$filter",x),[...m,...p].forEach((e=>{e.value&&f.searchParams.set(e.key,e.value)}));try{yield(0,h.w)((()=>(0,n.mG)(this,void 0,void 0,(function*(){const t=yield this.fetchImpl(f.href,g);if(t.status>=400){const i=`OneService returned error response. Status: ${t.status} for actionType: ${r}, targetType: ${e}`