")),(0,s.pW)("useMockValuesForTesting"))});var a=r(33940),d=r(37802),c=r(87697),l=r(9610),u=r(9683),h=r(65135),f=r(66925),p=r(85334),v=r(32804),g=r(39181),m=r(13988),y=r(16517),S=r(58958),T=r(38156),O=r(60483),b=r(12843),P=r.n(b);const w=new O.D({name:"ShuffleMyFeed",type:T.c9.FRE,behavior:T.wu.Click}).getMetadataTag(),E=new O.D({name:"LikeFeed",type:T.c9.FRE,behavior:T.wu.Click}).getMetadataTag(),$=g.d`
    <style>
        .fre-title {
            font-size: 20px;
            inset-inline-start: 24px;
            top: 18px;
            z-index: 1;
        }
    </style>
    ${(0,m.g)((e=>{var t;return 0===(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)}),g.d`
        ${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.title}}
    `)}
    ${(0,m.g)((e=>{var t;return(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)>0}),g.d`
        ${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.afterShuffleTitle}}
    `)}
`,I=g.d`
    <style>
        .fre-subtitle {
            color: ${v.Q5n};
            font-size: 14px;
            top: 54px;
            z-index: 1;
        }
    </style>
    ${(0,m.g)((e=>{var t;return 0===(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)}),g.d`
        ${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.subtitle}}
    `)}
    ${(0,m.g)((e=>{var t;return(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)>0}),g.d`
        ${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.afterShuffleSubtitle}}
    `)}
`,k=g.d`
    <style>
        .fre-image img {
            inset-inline-end: 22px;
            opacity: 0;
            position: absolute;
            top: 16px;
            transition: opacity 0.5s;
            width: 100px;
        }
        .fre-image img.show {
            opacity: 1;
        }
    </style>
    ${(0,m.g)((e=>{var t;return(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)>0}),g.d`
        <img class="${e=>{var t;return((null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)-1)%4==0?"show":""}}" src="https://assets.msn.${e=>y.jG.topDomain}/staticsb/statics/latest/shuffle-fre/shuffle-cards-blue.png" alt="">
        <img class="${e=>{var t;return((null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)-1)%4==1?"show":""}}" src="https://assets.msn.${e=>y.jG.topDomain}/staticsb/statics/latest/shuffle-fre/shuffle-cards-yellow.png" alt="">
        <img class="${e=>{var t;return((null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)-1)%4==2?"show":""}}" src="https://assets.msn.${e=>y.jG.topDomain}/staticsb/statics/latest/shuffle-fre/shuffle-cards-purple.png" alt="">
        <img class="${e=>{var t;return((null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)-1)%4==3?"show":""}}" src="https://assets.msn.${e=>y.jG.topDomain}/staticsb/statics/latest/shuffle-fre/shuffle-cards-lightblue.png" alt="">
    `)}
`,C=g.d`
    <style>
        .fre-button {
            bottom: 21px;
            inset-inline-start: 24px;
        }

        .fre-button fluent-button {
            border-radius: 20px;
            width: 153px;
        }
        .fre-button .shuffle-btn-icon {
            position: relative;
            top: 1px;
            left: -1px;
        }
        .fre-button .shuffle-btn-label {
            position: relative;
            top: -1px;
            left: 1px;
        }

        .fre-button .like-feed-btn {
            width: 142px;
        }
        .fre-button .like-feed-btn-icon {
            left: -2px;
            position: relative;
            top: 2px;
        }
        .fre-button .like-feed-btn-label {
            position: relative;
            left: 2px;
            top: -1px;
        }

        .fre-button .after-shuffle-btn {
            margin-inline-start: 15px;
            width: 142px;
        }
    </style>
    ${(0,m.g)((e=>{var t;return 0===(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)}),g.d`
        <fluent-button
            appearance="accent"
            ?disabled="${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.outOfShuffles}}"
            title="${e=>{var t,r;return(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.outOfShuffles)?null===(r=e.toastDataProps.freDataSource)||void 0===r?void 0:r.strings.outOfShuffles:""}}"
            @click="${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.shuffleFeed()}}"
            data-t="${e=>w}"
        >
            <span class="shuffle-btn-icon">${'<svg width="18" height="16" viewBox="0 0 18 16"><path d="M1 2.6a.5.5 0 0 0 0 1v-1Zm1.85.5v.5-.5ZM7 5.45l-.42.27.42-.27Zm3.34 5.1.42-.27-.42.27Zm4.16 2.35v.5-.5Zm2.49 0 .37.34a.5.5 0 0 0 0-.68l-.37.34ZM15.45.66a.5.5 0 1 0-.74.68l.74-.68ZM17 3.1l.37.34a.5.5 0 0 0 0-.68L17 3.1Zm-2.29 1.76a.5.5 0 0 0 .74.68l-.74-.68Zm.74 5.6a.5.5 0 0 0-.74.68l.74-.68Zm-.74 4.2a.5.5 0 0 0 .74.68l-.74-.68ZM9.83 5.32a.5.5 0 1 0 .84.54l-.84-.54Zm.52.13.42.27-.42-.27ZM14.5 3.1v.5-.5ZM1 12.4a.5.5 0 0 0 0 1v-1Zm1.85.5v-.5.5ZM7 10.55l-.42-.27.42.27Zm.52.13a.5.5 0 0 0-.84-.54l.84.54ZM1 3.6h1.85v-1H1v1Zm1.85 0c.72 0 1.44.19 2.1.56l.48-.88a5.27 5.27 0 0 0-2.58-.68v1Zm2.1.56c.64.36 1.21.9 1.64 1.56l.84-.55a5.78 5.78 0 0 0-2-1.89l-.49.88Zm1.64 1.56 3.34 5.1.84-.54-3.34-5.1-.84.54Zm3.34 5.1c.52.8 1.2 1.45 2 1.9l.49-.88a4.78 4.78 0 0 1-1.65-1.56l-.84.55Zm2 1.9c.8.44 1.68.68 2.58.68v-1c-.72 0-1.44-.19-2.1-.56l-.48.88Zm2.58.68H17v-1h-2.49v1Zm.2-12.06 1.92 2.1.74-.68-1.92-2.1-.74.68Zm1.92 1.42-1.92 2.1.74.68 1.92-2.1-.74-.68Zm-1.92 8.38 1.92 2.1.74-.68-1.92-2.1-.74.68Zm1.92 1.42-1.92 2.1.74.68 1.92-2.1-.74-.68Zm-5.96-6.7.1-.14-.84-.55-.1.15.84.54Zm.1-.14c.43-.66 1-1.2 1.65-1.56l-.5-.88c-.8.45-1.47 1.1-1.99 1.9l.84.54Zm1.65-1.56a4.27 4.27 0 0 1 2.1-.56v-1c-.9 0-1.8.24-2.6.68l.5.88Zm2.1-.56H17v-1h-2.49v1ZM1 13.4h1.85v-1H1v1Zm1.85 0c.9 0 1.79-.24 2.58-.68l-.49-.88c-.65.37-1.37.56-2.1.56v1Zm2.58-.68c.8-.45 1.48-1.1 2-1.9l-.84-.54c-.43.66-1 1.2-1.65 1.56l.5.88Zm2-1.9.1-.14-.84-.54-.1.14.84.55Z"/></svg>'}</span>
            <span class="shuffle-btn-label">${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.shuffleButtonLabel}}</span>
        </fluent-button>
    `)}
    ${(0,m.g)((e=>{var t;return(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)>0}),g.d`
        <fluent-button class="like-feed-btn" appearance="accent" @click="${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.likeThisFeed()}}"  data-t="${e=>E}">
            <span class="like-feed-btn-icon">${P()}</span>
            <span class="like-feed-btn-label">${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.afterShuffleLikeFeedButtonLabel}}</span>
        </fluent-button>
        <fluent-button
            class="after-shuffle-btn"
            appearance="stealth"
            ?disabled="${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.outOfShuffles}}"
            title="${e=>{var t,r;return(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.outOfShuffles)?null===(r=e.toastDataProps.freDataSource)||void 0===r?void 0:r.strings.outOfShuffles:""}}"
            @click="${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.shuffleFeed()}}"
            data-t="${e=>w}"
        >
            ${e=>{var t;return null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.strings.afterShuffleButtonLabel}}
        </fluent-button>
    `)}
`,D=g.d`
    <style>
        /* There is no 1-col design, so hide the dialog if it can't fit. */
        @media (max-width: 550px) {
            :host {
                display: none;
            }
        }
        ${(0,m.g)((e=>{var t;return!(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.feedInView)}),g.d`
            :host {
                display: none;
            }
        `)}
        .shuffle-bg {
            position: absolute;
            border-radius: 6px;
        }
        .fre-background {
            width: 500px;
            height: 146px;
        }
        fluent-button.fre-close-button {
            top: 15px;
            inset-inline-end: 20px;
        }
    </style>
    ${(0,m.g)((e=>{var t;return 0===(null===(t=e.toastDataProps.freDataSource)||void 0===t?void 0:t.nShuffles)}),g.d`
        <img class="shuffle-bg" src="https://assets.msn.${e=>y.jG.topDomain}/staticsb/statics/latest/shuffle-fre/shuffle-bg-${e=>(0,S.Y)()?"dark":"light"}.gif" alt="">
    `)}
`,G="shuffle-fre-toast",F=Array.from({length:10},((e,t)=>t));class A extends l.l{constructor(){super(...arguments),this.feedInView=!1,this.nShuffles=0,this.outOfShuffles=!1,this.feedInViewScrollHandler=(0,d.Z)((()=>{this.feedInView=window.scrollY>=(this.feedOffsetTop||0)}))}experienceConnected(){return(0,a.mG)(this,void 0,void 0,(function*(){if(!(this.config.control||this.config.showWhenColdUser||this.config.showAfterDelay||this.config.showWhenScroll))return;const e=yield(0,u._n)().getShuffleState();if(!e)return;this.freClientState=e;const t=new Date;t.setSeconds(t.getSeconds()-1);const r=new Date;r.setSeconds(r.getSeconds()-3);const i=new Date;i.setDate(i.getDate()-1);const s=new Date;s.setDate(s.getDate()-30);const n=e.dismissTimestamp&&e.dismissTimestamp>=(this.config.useMockValuesForTesting?r:s),o=e.impressionDates.some((e=>e>=(this.config.useMockValuesForTesting?t:i))),a=e.impressionDates.filter((e=>e>=(this.config.useMockValuesForTesting?r:s))).length>=3;if(n||o||a)return;Object.entries(this.getFreshSetNumbersSeenOn()).length>=F.length&&(this.outOfShuffles=!0),window.addEventListener("scroll",this.feedInViewScrollHandler);const c=h.M0.getPageMetadata(),l=c&&c.combinedContract.flight.tmpl,f=l&&/(^|;)IsUserFRETriggered:1($|;)/.test(l);(this.isColdStart||f)&&(this.config.showWhenColdUser?(this.renderToast(),h.M0.addOrUpdateTmplProperty("freshuffle-t1","1")):h.M0.addOrUpdateTmplProperty("freshuffle-t1","0")),setTimeout((()=>{this.config.showAfterDelay?(this.renderToast(),h.M0.addOrUpdateTmplProperty("freshuffle-t2","1")):h.M0.addOrUpdateTmplProperty("freshuffle-t2","0")}),this.config.useMockValuesForTesting?3e3:3e4);const p=(0,d.Z)((()=>{window.scrollY>(this.feedOffsetTop||0)+317&&(window.removeEventListener("scroll",p),this.config.showWhenScroll?(this.renderToast(),h.M0.addOrUpdateTmplProperty("freshuffle-t3","1")):h.M0.addOrUpdateTmplProperty("freshuffle-t3","0"))}));window.addEventListener("scroll",p)}))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.feedInViewScrollHandler)}getExperienceType(){return n.x.shuffleFre}renderToast(){return(0,a.mG)(this,void 0,void 0,(function*(){yield f.h.ready,f.h.renderToast({expirationInMs:5e8,freBackgroundStyles:D,freButton:C,freDataSource:this,freImage:k,freSubtitle:I,freTitle:$,hasCloseButton:!0,id:G,onFreCloseButtonClose:()=>this.onToastDismiss(),toastType:p.p.Fre}),this.freClientState.impressionCount++,this.freClientState.impressionDates=[new Date,...this.freClientState.impressionDates.slice(0,2)],(0,u._n)().setShuffleState(this.freClientState)}))}getFreshSetNumbersSeenOn(){const e=new Date;e.setMinutes(e.getMinutes()-10);return Object.fromEntries(O-----BEGIN CERTIFICATE-----
MIIEmzCCA4OgAwIB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