Loading
function(e,t,n){n.d(t,{D:()=>E});var r=n(64700),l=n(323889),a=n(274670),i=n(144779),s=n(793574),u=n(564064),o=n(104886);let c=(0,n(945810).mj)({name:"2026-05-quest-home-reward-claim",kind:"user",defaultConfig:{enabled:!1},variations:{1:{enabled:!0}}});var d=n(18437),m=n(590202),f=n(971649),h=n(801365),p=n(371912),v=n(617986),g=n(758836);function E(e){let{quest:t,questContent:n,sourceQuestContent:E,questContentPosition:x,questContentRowIndex:b,experimentLocation:S,shouldShowShopIfAlreadyClaimed:C=!0,onBeforeClaim:A,onCloseModal:w}=e,y=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=c.useConfig({location:t&&null!=e?e:"quest home reward claim experiment: disabled"});return!!t&&null!=e&&n.enabled}(S,t.userStatus?.completedAt!=null&&t.userStatus?.claimedAt==null),N=(0,d.Ut)(),T=(0,f.go)(),R=(0,p.ix)({quest:t,questContent:n,questContentPosition:x,questContentRowIndex:b,sourceQuestContent:E});return r.useCallback(e=>{if(null!=e&&A?.(e),C&&(0,h.ks)(t.config)&&t.userStatus?.claimedAt!=null){w?.(),(0,u.Cz)({tab:g.G2.ORBS,analyticsLocations:[],analyticsSource:s.A.QUEST_HOME_PAGE});return}y&&(w?.(),(0,h.K9)(t.config)||((0,o.E5)(o.kI.STEP_2_CLICKED_INTERNAL,"completed_quest_claim_click")?(0,a.r)({type:i.F.CLICK_INTERNAL,adCreativeType:l.p.QUEST,adCreativeId:t.id,questContentCTA:m.Cy.OPEN_QUEST_HOME_TO_CLAIM,surfaceId:n,sourceQuestContent:E,impressionId:T,questContentPosition:x,questContentRowIndex:b}):N({questId:t.id,questContent:n,questContentCTA:m.Cy.OPEN_QUEST_HOME_TO_CLAIM,sourceQuestContent:E,questContentPosition:x,questContentRowIndex:b}),(0,v.navigateToQuestHome)({questId:t.id,fromContent:n}))),!y&&(0,h.K9)(t.config)&&w?.(),R()},[A,w,t.config,t.userStatus?.claimedAt,R,C,y,t.id,n,E,x,b,N,T])}}