Loading
function(e,t,n){n.d(t,{O9:()=>eH,Vn:()=>ew,Wj:()=>eU,mL:()=>eo,Cv:()=>eJ,Yl:()=>eO,Nb:()=>e1,tZ:()=>eB,pT:()=>e0,UH:()=>e4,$P:()=>e5,YW:()=>eR,zW:()=>e$,NC:()=>eT,Hv:()=>ev,j$:()=>ek,fc:()=>eN,SD:()=>eS,aC:()=>eK,FA:()=>eY,LS:()=>eg,p5:()=>ez,Ns:()=>e3,Iq:()=>eI,Qh:()=>eh,t9:()=>e7,RR:()=>eD,XD:()=>e2,ZP:()=>e_,UX:()=>eG,mn:()=>em,C5:()=>eW,sb:()=>eZ,I3:()=>eM,Qo:()=>eF,In:()=>ex,H6:()=>eX,a5:()=>ej,F3:()=>eV,L1:()=>eA,do:()=>eP,oH:()=>eQ,S5:()=>eb,Du:()=>eq}),n(321073),n(801541);var i,r,s,o=n(582128),a=n(435558),l=n(181370),u=n.n(l),d=n(889137),c=n(323889),C=n(412703),f=n(114046);n(731355);var E=n(517846),m=n(462887),p=n(17928),T=n(736653),A=n(787389),h=n(157695),I=n(183636),S=n(429913);n(674658);var _=n(27620),g=n(773669),v=n(885386),O=n(734057),b=n(30370),P=n(287809),y=n(174459),L=n(927813),w=n(403362),N=n(975571),M=n(252424),Q=n(723702),R=n(158045);n(323874),n(14289),n(35956),n(636537),n(228366),n(181658),n(314329),n(107195),n(881615),n(390595),n(544180),n(265704);var k=n(710969),q=n(652215),U=n(178540),D=n(396813),G=n(859703),V=n(738822);n(192444);var x=n(945810);let H=(0,x.mj)({name:"2026-07-renewable-end-date-sort",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}}),B=221552==n.j?H:null;(0,x.mj)({name:"2026-05-bounties-stage-1",kind:"user",defaultConfig:{enabled:!1,verticalScrollEnabled:!1,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:50},variations:{1:{enabled:!0,verticalScrollEnabled:!1,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:50},2:{enabled:!0,verticalScrollEnabled:!1,loopingEnabled:!0,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:50},3:{enabled:!0,verticalScrollEnabled:!1,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:30},4:{enabled:!0,verticalScrollEnabled:!1,loopingEnabled:!1,ctaTimerMilliSeconds:0,rewardTimerSeconds:15,orbAmount:50},5:{enabled:!0,verticalScrollEnabled:!1,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:25,orbAmount:50},6:{enabled:!0,verticalScrollEnabled:!0,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:50},7:{enabled:!0,verticalScrollEnabled:!0,loopingEnabled:!0,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:50},8:{enabled:!0,verticalScrollEnabled:!0,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:15,orbAmount:30},9:{enabled:!0,verticalScrollEnabled:!0,loopingEnabled:!1,ctaTimerMilliSeconds:0,rewardTimerSeconds:15,orbAmount:50},10:{enabled:!0,verticalScrollEnabled:!0,loopingEnabled:!1,ctaTimerMilliSeconds:3e3,rewardTimerSeconds:25,orbAmount:50}}}),(0,x.mj)({name:"2026-07-bounties-vertical-scroll",kind:"user",defaultConfig:{enabled:!1,verticalScrollEnabled:!1,scrollAffordanceVariant:"none",autoScrollLeadMs:3e3,autoScrollEndCardMs:3e3,peekFraction:0,ctaTimerMilliSeconds:0},variations:{1:{enabled:!0,verticalScrollEnabled:!1,scrollAffordanceVariant:"none",autoScrollLeadMs:3e3,autoScrollEndCardMs:3e3,peekFraction:0,ctaTimerMilliSeconds:0},2:{enabled:!0,verticalScrollEnabled:!0,scrollAffordanceVariant:"none",autoScrollLeadMs:3e3,autoScrollEndCardMs:3e3,peekFraction:0,ctaTimerMilliSeconds:0},3:{enabled:!0,verticalScrollEnabled:!0,scrollAffordanceVariant:"indicator",autoScrollLeadMs:3e3,autoScrollEndCardMs:3e3,peekFraction:0,ctaTimerMilliSeconds:0},4:{enabled:!0,verticalScrollEnabled:!0,scrollAffordanceVariant:"auto",autoScrollLeadMs:3e3,autoScrollEndCardMs:3e3,peekFraction:0,ctaTimerMilliSeconds:0},5:{enabled:!0,verticalScrollEnabled:!0,scrollAffordanceVariant:"peek",autoScrollLeadMs:3e3,autoScrollEndCardMs:3e3,peekFraction:.12,ctaTimerMilliSeconds:0}}}),(0,x.mj)({name:"2026-03-quest-home-bounties",kind:"user",defaultConfig:{enabled:!1},variations:{1:{enabled:!0}}});var F=n(291749),K=n(971276),W=n(561844);n(590202);var X=n(971649),j=n(651892),Y=n(639214),$=n(576761),J=n(901406),z=n(801365),Z=n(792620),ee=n(814793),et=n(753386),en=n(190107),ei=n(202541),er=n(375708);let es=221552==n.j?-1:null;function eo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{fetchPolicy:"cache-only",callerSource:"unknown"},[t,n]=o.useState(!1),i=(0,p.yK)([G.A],()=>[...G.A.quests.values()]),r=(0,p.yK)([G.A],()=>[...G.A.excludedQuests.values()]),{isFetchingCurrentQuests:s,lastFetchedCurrentQuests:a}=(0,p.cf)([G.A],()=>({isFetchingCurrentQuests:G.A.isFetchingCurrentQuests,lastFetchedCurrentQuests:G.A.lastFetchedCurrentQuests})),l=(0,K.s)();return o.useEffect(()=>{let i;switch(e.fetchPolicy){case"cache-only":return;case"cache-or-network":i=0===a;break;case"cache-and-network":i=!0;break;default:e.fetchPolicy;return}if(i&&l&&!t&&!s&&(n(!0),(0,D.N1)(),(0,Q.isMac)()&&"focused"!==I.A.getState()))return},[e.fetchPolicy,l,t,s,a,e.callerSource]),{quests:i,excludedQuests:r,isFetchingCurrentQuests:s,hasFetched:t}}function ea(e,t,n,i){let r=e.id===en.aJ,s=t.id===en.aJ,o=r&&e.userStatus?.completedAt==null;if(o!==(s&&t.userStatus?.completedAt==null))return o?es:1;let a=!(0,k.Ic)(e),l=e.userStatus?.claimedAt!=null,u=t.userStatus?.claimedAt!=null,d=e.userStatus?.enrolledAt!=null,c=t.userStatus?.enrolledAt!=null,C=20*L.A.Millis.MINUTE,f=e6(e,C),E=e6(t,C);if(a){var m,p,T;let r,s,{questHomeHero:o,isQuestHomeHeroShelfEnabled:a}=n;if(null!=o&&!a){let n=(0,ee.I0)(o,e.id),i=(0,ee.I0)(o,t.id);if(n||i)return n?es:1}return f!==E&&(f||E)?f?1:es:l!==u?l?1:es:d!==c?d?es:1:(m=e,p=t,r=(T=i).get(m.id),s=T.get(p.id),null!=r&&null!=s?r!==s?r-s:m.id!==p.id?m.id<p.id?es:1:0:null!=r?es:null!=s?1:ep(m.config.expiresAt,p.config.expiresAt,1))}return l!==u?l?es:1:d!==c?d?es:1:ep(e.config.expiresAt,t.config.expiresAt,0)}function el(e,t,n){return ep(e.config.startsAt,t.config.startsAt,0)}function eu(e,t,n){let i=e.userStatus?.enrolledAt,r=t.userStatus?.enrolledAt;return null==i&&null==r?ep(e.config.expiresAt,t.config.expiresAt,0):null!=i&&null==r?es:null==i&&null!=r?1:ep(i,r,0)}function ed(e,t,n){return ep(e.config.expiresAt,t.config.expiresAt,1)}function ec(e,t){switch(t){case en.Pc.VIDEO:return(0,Z.vv)(e);case en.Pc.PLAY:return(0,Z.t)({quest:e})||(0,Z.fE)({quest:e})||(0,Z.vl)(e)||(0,Z.g5)(e)||(0,Z.Cr)(e);default:return!1}}function eC(e,t){switch(t){case en.BQ.VIRTUAL_CURRENCY:return(0,z.ks)(e.config);case en.BQ.COLLECTIBLE:return(0,z.tU)(e.config);case en.BQ.IN_GAME:return(0,z.HG)(e.config)||(0,z.r7)(e.config);default:return!1}}let ef=221552==n.j?{}:null,eE=221552==n.j?{questHomeHero:null,isQuestHomeHeroShelfEnabled:!1,currentUserId:null,isRenewableEndDateSortEnabled:!1}:null;function em(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:eE,{sortMethod:r,filters:s}=n,o=null==s||0===s.length?e:function(e,t){if(0===t.length)return e;let n=(0,a.groupBy)(t,"group");return e.filter(e=>Object.entries(n).every(t=>{let n,[i,r]=t;return n=function(e){switch(e){case"task":return ec;case"reward":return eC}}(i),0===r.length||r.some(t=>n(e,t.filter))}))}(e,s),l=function(e,t,n){let i=new Map;if(!n||null==t)return i;for(let n of e){var r;(0,ee.iM)(n,en.Li.RENEWABLE_END_DATE)&&i.set(n.id,(r=n.id,u().v3(`${t}:${r}`)>>>0))}return i}(o,i.currentUserId,i.isRenewableEndDateSortEnabled),d=(t=function(e){switch(e){case en.kL.MOST_RECENT:return el;case en.kL.RECENTLY_ENROLLED:return eu;case en.kL.EXPIRING_SOON:return ed;case en.kL.SUGGESTED:default:return ea}}(r),function(e,n){let r=!(0,k.Ic)(e);return!(0,k.Ic)(n)!==r?r?es:1:t(e,n,i,l)});return o.sort(d)}function ep(e,t,n){return e.localeCompare(t)*(0===n?es:1)}var eT=221552==n.j?((i={}).ALL="all",i.CLAIMED="claimed",i.PREVIEW_TOOL="preview_tool",i):null,eA=221552==n.j?((r={}).TAB="tab",r.QUEST_ID="quest_id",r.SORT="sort",r.FILTER="filter",r.AD_CREATIVE_IDS="ad_creative_ids",r):null;function eh(e){let t,n,i,r,s,a,l,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ef,{quests:c,excludedQuests:C,isFetchingCurrentQuests:f,hasFetched:E}=eo({fetchPolicy:"cache-and-network",callerSource:"use_filtered_quests"}),m=new Map(c.map(e=>[e.id,e])),T=(t=function(){let e=(0,p.bG)([h.A],()=>h.A.getQuestHomeHero()),{isShelfEnabled:t}=e7(e),n=(0,p.bG)([P.default],()=>P.default.getCurrentUser()?.id??null),{enabled:i}=B.useConfig({location:en.rE.QUEST_HOME_MOBILE});return o.useMemo(()=>({questHomeHero:e,isQuestHomeHeroShelfEnabled:t,currentUserId:n,isRenewableEndDateSortEnabled:!1}),[e,t,n,!1])}(),n=o.useRef([]),i=o.useRef(d.sortMethod),r=o.useRef(d.filters),s=o.useRef(0),a=o.useRef(t),o.useMemo(()=>{if(0===c.length)return[];if(n.current.length>0&&s.current===c.length&&i.current===d.sortMethod&&r.current===d.filters&&a.current===t)return n.current;let e=em(c,d,t).map(e=>e.id);return n.current=e,i.current=d.sortMethod,r.current=d.filters,s.current=c.length,a.current=t,e},[c,d,t])),A=(l=o.useMemo(()=>c.filter(e=>{let t=e.userStatus?.completedAt!=null,n=e.userStatus?.claimedAt!=null;return t&&n}),[c]),u=o.useRef([]),o.useMemo(()=>{if(0===l.length)return[];if(u.current.length>0&&u.current.length===l.length)return u.current;let e=l.sort((e,t)=>{let n=e.userStatus?.claimedAt==null;return n!==(t.userStatus?.claimedAt==null)?n?es:1:ep(e.config.rewardsConfig.rewardsExpireAt,t.config.rewardsConfig.rewardsExpireAt,0)}).map(e=>e.id);return u.current=e,e},[l])),I=[];for(let t of"all"===e?T:A){let n=m.get(t),i=null!=n&&"all"===e&&d.removeExpiredQuests&&(0,k.Ic)(n)&&!(0,k.GR)(n.userStatus);null==n||i||I.push(n)}return{quests:I,excludedQuests:C,isFetchingCurrentQuests:f,hasFetched:E}}function eI(){let e=o.useRef(!1),t=(0,p.yK)([G.A],()=>Array.from(G.A.claimedQuests.values())),n=(0,p.bG)([G.A],()=>G.A.isFetchingClaimedQuests);return o.useEffect(()=>{n||e.current||(e.current=!0,(0,D.HA)())},[n]),{claimedQuests:t,isFetchingClaimedQuests:n}}function eS(e,t){let n=eg(e),i=(0,z.ks)(e.config),r=(0,z.KK)(e.config),s=t!==$.MA.INELIGIBLE;return!n&&i&&r&&s}function e_(e){return(0,p.bG)([G.A],()=>{let t=G.A.getQuest(e);return null==t?null:(0,z.b)(t.config)},[e])}function eg(e){return(0,p.bG)([G.A],()=>null!=e&&G.A.isQuestExpired(e.id),[e])}function ev(){return(0,p.bG)([G.A],()=>G.A.isQuestAccessSuspended,[])}function eO(e,t,n){let i=(0,p.bG)([O.A],()=>O.A.getChannel(t?.channelId)??null),r=(0,p.bG)([G.A],()=>null!=G.A.questEnrollmentBlockedUntil,[]),s=(0,p.bG)([P.default],()=>P.default.getCurrentUser()?.id),o=(0,p.bG)([G.A],()=>null!=e&&G.A.isQuestExpired(e.id),[e]);if(null==e||r||o||s===n)return!1;let a=e.userStatus?.claimedAt!=null,l=(0,ee.Ll)(t,i);return!a||!!l}function eb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{dateStyle:"short"},n=(0,p.bG)([g.default],()=>g.default.locale);return o.useMemo(()=>null==e?"":new Date(e).toLocaleDateString(n,t),[e,t,n])}function eP(e){let{quest:t,content:n,ctaContent:i,sourceQuestContent:r}=e,s=(0,X.wW)();return o.useCallback(()=>{t.id===en.Fw?window.open(N.A.getArticleURL(q.MVz.VIRTUAL_CURRENCY_LEARN_MORE)):(0,J.pu)(t,{content:n,ctaContent:i,impressionId:s(),sourceQuestContent:r})},[t,n,i,s,r])}function ey(e){return(0,p.bG)([G.A],()=>G.A.isProgressingOnDesktop(e.id))}function eL(e){return o.useMemo(()=>(0,Z.YL)(e),[e])}function ew(e){let t,n=ey(e),i=eL(e),r=(t=(0,p.bG)([G.A],()=>G.A.getOptimisticProgress(e.id,C.n.WATCH_VIDEO)),o.useMemo(()=>(0,et.J$)(e),[e,t]));return n||i||r}let eN=e=>{let t=o.useCallback(()=>(0,Z.Yh)(e),[e]),[n,i]=o.useState(t()),r=o.useCallback(()=>i(t()),[t]),s=ew(e);return o.useEffect(()=>{if(e.userStatus?.enrolledAt==null||e.userStatus?.completedAt!=null||e.userStatus?.claimedAt!=null||!s)return void r();let t=window.setInterval(()=>{r()},+L.A.Millis.SECOND);return()=>{clearInterval(t),r()}},[e,s,r]),n};function eM(e){return o.useMemo(()=>(0,Z.JC)(e),[e])}function eQ(e){let t=o.useMemo(()=>{let t=new Set;for(let n of e){let e=(0,Z.F9)(n);null!=e&&t.add(e)}return Array.from(t)},[e]);return(0,S.A)(t)}function eR(e){let t=(0,p.bG)([G.A],()=>G.A.quests),n=eQ(Array.from(t.values())),i=o.useMemo(()=>{let n=(0,ee.$e)(t,en.zO);return(0,Y.BM)(n,e)},[e,t,n]);return eg(i)?null:i}function ek(e){return o.useMemo(()=>({handleComplete:()=>(0,D.Yb)(e),handleProgress:t=>(0,D.Yb)(e,t),handleResetStatusClick:()=>(0,D.UZ)(e),handleResetDismissibilityClick:()=>(0,D.Gt)(e),handleOverridePreviewClick:t=>(0,D.L4)(t,e),handleResetHasBeenSeenClick:()=>(0,D.qV)(c.p.QUEST,[e])}),[e])}function eq(){let{fetching:e,accounts:t}=(0,p.cf)([b.A],()=>({fetching:b.A.isFetching(),accounts:b.A.getAccounts()})),{xboxAccounts:n,playstationAccounts:i,xboxAndPlaystationAccounts:r}=o.useMemo(()=>{let e=t.filter(e=>!1===e.revoked),n=e.filter(e=>e.type===q.fg2.XBOX),i=e.filter(e=>e.type===q.fg2.PLAYSTATION),r=n.concat(i);return{xboxAccounts:n,playstationAccounts:i,xboxAndPlaystationAccounts:r}},[t]);return{fetching:e,xboxAccounts:n,playstationAccounts:i,xboxAndPlaystationAccounts:r}}function eU(e){let{questId:t,preview:n,beforeRequest:i,afterRequest:r}=e,[s,a]=o.useState(!1),l=(0,p.bG)([b.A],()=>b.A.getAccounts()),u=(0,U.O)(e=>e.clearErrorHintsByType),d=o.useCallback(e=>U.O.getState().setErrorHints(t,e),[t]);return o.useEffect(()=>{u(t,f._.EXPIRED_CREDENTIAL)},[l,u,t]),{startConsoleQuest:o.useCallback(async()=>{if(s)return;i?.(),a(!0);let e=null;try{e=await (0,D.vD)(t,n),d(e.errorHints)}finally{a(!1),r?.()}},[s,i,r,n,t,d]),startingConsoleQuest:s}}function eD(e){let{quest:t}=e,{xboxAndPlaystationAccounts:n}=eq(),i=ew(t),r=0===n.length;return(0,Z.g5)(t)&&r&&!i}function eG(){let{xboxAccounts:e,playstationAccounts:t}=eq(),n=e.length>0,i=t.length>0,r=N.A.getArticleURL(q.MVz.QUEST_HOW_TO_PLAYSTATION),s=N.A.getArticleURL(q.MVz.QUEST_HOW_TO_XBOX),o=er.intl.format(er.t.beN4DG,{psHelpdeskArticle:r,xboxHelpdeskArticle:s}),a=er.intl.format(er.t.HVS7nh,{helpdeskArticle:i?r:s});return{message:n&&!i||!n&&i?a:o,xboxURL:s,playstationURL:r}}var eV=((s={})[s.UNACCEPTED=0]="UNACCEPTED",s[s.ACCEPTED=1]="ACCEPTED",s[s.IN_PROGRESS=2]="IN_PROGRESS",s[s.COMPLETED=3]="COMPLETED",s[s.CLAIMED=4]="CLAIMED",s);function ex(e){let t=e.userStatus?.enrolledAt!=null,n=e.userStatus?.completedAt!=null,i=e.userStatus?.claimedAt!=null,r=eN(e).percentComplete>0;return i?4:n?3:r&&t?2:1*!!t}function eH(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=(0,p.bG)([g.default],()=>g.default.locale),{percentComplete:i}=eN(e),r=eM(e),s=null!=r?r.percentComplete:i,o=100*s,a=null==r||t?(0,M.l9)(n,s,{roundingMode:"floor"}):`${r?.progress}/${r?.target}`;return{completedRatio:s,percentComplete:o,completedRatioDisplay:a}}function eB(e){return[(0,p.bG)([G.A],()=>G.A.selectedTaskPlatform(e)),o.useCallback(t=>(0,D.lx)(e,t),[e])]}function eF(e,t){let[n,i]=eB(e.id),r=o.useMemo(()=>(0,J.UR)(e),[e]),s=r.includes(en.fO.DESKTOP),a=r.includes(en.fO.CONSOLE),l=ey(e),u=eL(e),c=o.useMemo(()=>(0,d.YW)(t).with({percentComplete:0},()=>null).with({taskType:C.n.PLAY_ON_DESKTOP},()=>en.fO.DESKTOP).with({taskType:C.n.PLAY_ACTIVITY},()=>en.fO.DESKTOP).with({taskType:C.n.WATCH_VIDEO},()=>en.fO.DESKTOP).with({taskType:C.n.WATCH_VIDEO_ON_MOBILE},()=>en.fO.DESKTOP).with({taskType:C.n.STREAM_ON_DESKTOP},()=>en.fO.DESKTOP).with({taskType:C.n.PLAY_ON_XBOX},()=>en.fO.CONSOLE).with({taskType:C.n.PLAY_ON_PLAYSTATION},()=>en.fO.CONSOLE).with({taskType:C.n.ACHIEVEMENT_IN_GAME},()=>en.fO.DESKTOP).with({taskType:C.n.ACHIEVEMENT_IN_ACTIVITY},()=>en.fO.DESKTOP).exhaustive(),[t]),f=l?en.fO.DESKTOP:u?en.fO.CONSOLE:null;return[o.useMemo(()=>(0,d.YW)({lastPlatformProgress:c,currentProgressingPlatform:f,selectedPlatform:n}).with({currentProgressingPlatform:en.fO.CONSOLE},()=>V.X0.CONSOLE).with({currentProgressingPlatform:en.fO.DESKTOP},()=>V.X0.DESKTOP).with({currentProgressingPlatform:null,lastPlatformProgress:en.fO.CONSOLE},()=>V.X0.CONSOLE).with({currentProgressingPlatform:null,lastPlatformProgress:en.fO.DESKTOP},()=>V.X0.DESKTOP).with({currentProgressingPlatform:null,lastPlatformProgress:null,selectedPlatform:en.fO.CONSOLE},()=>V.X0.CONSOLE).with({currentProgressingPlatform:null,lastPlatformProgress:null,selectedPlatform:en.fO.DESKTOP},()=>V.X0.DESKTOP).with({currentProgressingPlatform:null,lastPlatformProgress:null,selectedPlatform:null},()=>a&&s?V.X0.SELECT:a?V.X0.CONSOLE:V.X0.DESKTOP).exhaustive(),[a,s,c,f,n]),r,i]}function eK(e){let t=eM(e),n=eN(e),[i]=eF(e,n),r=eg(e),s=e.userStatus?.enrolledAt!=null,o=e.userStatus?.completedAt!=null,a=C.o.DESKTOP.has(n.taskType)&&n.percentComplete>0,l=0===n.percentComplete,u=s&&!o&&!r&&null==t&&(a||l&&i===V.X0.DESKTOP),d=(0,Q.isWeb)()&&u&&!(0,J.W1)(e),c=(0,Q.isMac)()&&n.taskType===C.n.STREAM_ON_DESKTOP&&u,f=[];return c&&f.push(er.intl.string(er.t.MFGxFM)),d&&f.push(er.intl.string(er.t.BV6xDm)),f}function eW(e){return(0,p.bG)([G.A],()=>G.A.quests).get(e)??null}function eX(e){let t,n,i,{mode:r,questContent:s,sourceQuestContent:a}=e;"questId"in e?t=e.questId:(n=e.adContentId,i=e.adCreativeType);let l=o.useCallback((e,r)=>{null!=t?(0,W.Zu)({mode:e,prevMode:r,questContent:s,questId:t,sourceQuestContent:a}):null!=n&&null!=i&&(0,W.Wc)({adContentId:n,adCreativeType:i,mode:e,prevMode:r,questContent:s,sourceQuestContent:a})},[s,a,t,n,i]),u=t??n,d=o.useRef(null);o.useEffect(()=>{null!=u&&d.current!==r&&(l(r,d.current),d.current=r)},[r,u,l]),o.useEffect(()=>{if(null!=u)return()=>{l(null,d.current)}},[u,l])}function ej(e,t){let n=(0,p.bG)([G.A],()=>G.A.getQuest(e),[e]),i=(0,T.Ay)();return o.useMemo(()=>{if(null==n)return null;let e=t??((0,m.M)(i)?q.NJ8.DARK:q.NJ8.LIGHT);return(0,F.tW)(n,F.fY.COSPONSOR_LOGO_TYPE,e)},[i,t,n])}function eY(e){let t=(0,p.bG)([P.default],()=>P.default.getCurrentUser()),n=(0,z.mq)(e,t),i=(0,z.k5)(e),r=(0,z.$5)(e),s=(0,z.Y7)(e),o=(0,z.JX)(e),a=(0,R.TW)(t,ei.PremiumTypes.TIER_2);if(null==i)return er.intl.formatToPlainString(er.t.l9uXL8,{decorationName:n});let l=er.intl.formatToPlainString(er.t.o97tNn,{rewardName:n}),u=er.intl.formatToPlainString(er.t.PkyRZo,{rewardName:n,expirationDate:r}),d=er.intl.formatToPlainString(er.t.ie4YK0,{rewardName:n,duration:i}),c=er.intl.formatToPlainString(er.t.yCpc0U,{duration:i,rewardName:n});return o?s?a?l:d:a?u:c:er.intl.formatToPlainString(er.t.tTlItm,{duration:i,decorationName:n})}function e$(e){let t=(0,Z.TP)(e);return{launchInGameActivity:(0,A.A)({applicationId:t})}}function eJ(){return(0,p.yK)([G.A],()=>[...G.A.quests.values()]).some(e=>e.preview)}function ez(){return eJ()}function eZ(e){let t=e?.userStatus!=null&&(0,k.gO)(e.userStatus,V.uF.ACTIVITY_PANEL),n=eg(e??null),i=e?.userStatus?.claimedAt!=null,r=(0,p.bG)([G.A],()=>null!=G.A.questEnrollmentBlockedUntil,[]);return!t&&!n&&!i&&!r}function e0(){let e=(0,p.yK)([G.A],()=>[...G.A.quests.values()]);return o.useMemo(()=>e.filter(e=>e.preview),[e])}function e1(){let e=en.pc;return o.useMemo(()=>e.map(e=>{let[t,n]=e;return{heading:(0,j.fx)(t),options:n}}),[e])}function e2(){return o.useMemo(()=>Object.keys(en.kL).map(e=>({label:(0,j.Js)(en.kL[e]),value:en.kL[e]})),[])}function e5(e){let{selectedSortMethod:t,selectedFilters:n,numQuestsVisible:i}=e,r=o.useRef(null),s=o.useRef(null);o.useEffect(()=>{y.default.track(q.HAw.QUEST_HOME_SORT_METHOD_CHANGED,{sort_method:t,previous_sort_method:r.current}),r.current=t},[t]),o.useEffect(()=>{let e=n.map(e=>e.filter);y.default.track(q.HAw.QUEST_HOME_FILTERS_CHANGED,{filters:e,previous_filters:s.current??[],num_quests_visible:i}),s.current=e},[n,i])}function e3(e){return o.useMemo(()=>P.default.getCurrentUser()?.isStaff()===!0,[])||e.preview}function e6(e,t){let n=e.userStatus?.completedAt!=null;return e.userStatus?.enrolledAt!=null&&!n&&Date.now()-new Date(e.userStatus?.enrolledAt).getTime()>t}function e7(e){let t=(0,p.bG)([G.A],()=>G.A.quests),n=e?.questIds;return o.useMemo(()=>{if(null==n)return{shelfQuests:[],isShelfEnabled:!1};let e=n.map(e=>t.get(e)).filter(w.Vq).filter(e=>!(0,k.Ic)(e));return e.length<=1?{shelfQuests:[],isShelfEnabled:!1}:{shelfQuests:e,isShelfEnabled:!0}},[t,n])}function e4(e){let t=v.H1.useSetting(),n=e.userStatus?.enrolledAt!=null;return o.useCallback(()=>{if(n)return;let i=t?E.w.AD_IMPRESSION_QUEST_BAR_OPT_OUT:E.w.AD_IMPRESSION_QUEST_BAR_OPT_IN;(0,_.hs)(i,{quest_id:e.id})},[t,n,e.id])}L.A.Millis.HOUR,L.A.Millis.MINUTE}