Build 545032stable
Module 678968
2,016 characters · in 95d8b2ac774452cf.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>D});var r=n(627968),l=n(64700),s=n(554830),a=n(613373),i=n(475815),u=n(507107),o=n(192444),c=n(859387),d=n(590202),E=n(971649),m=n(651892),f=n(73473),_=n(795068),S=n(503698),p=n.n(S),v=n(834926);function C(e){let{className:t,color:n}=e;return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2",height:"40",viewBox:"0 0 2 40",fill:"none",className:p()(v.SU,t),children:(0,r.jsx)("path",{d:"M1 0V40",stroke:n,strokeOpacity:"0.3",strokeWidth:"2"})})}var g=n(781121),A=n(190107),h=n(375708);function D(e){let{videoRef:t,onTrackQuestContentClick:n,orientation:S}=e,{onClose:p,sourceQuestContent:D,quest:x,isFullscreenEnabled:T}=l.useContext(_.a),I=(0,E.go)(),O=(0,g.H)({quest:x,onClose:p,sourceQuestContent:D,impressionId:I}),b=l.useCallback(e=>{if(T){let e=(0,i.qf)(t.current?.parentNode,t.current);null!=e&&(0,i.sP)(e)}n(e,d.Cy.LEARN_MORE),O(e,d.Cy.OPEN_GAME_LINK)},[T,t,O,n]),{title:R,subtitle:L}={title:(0,m.wr)(x),subtitle:x.config.ctaConfig.subtitle??h.intl.string(h.t.mxaHfx)},{enabled:k}=o.uK.useConfig({location:A.rE.VIDEO_MODAL}),N=l.useMemo(()=>(0,c.tW)(x,c.fY.VIDEO_PLAYER_THUMBNAIL,void 0,!1)?.url??null,[x]);return k?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.nY,{url:N}),(0,r.jsx)(a.KP,{}),(0,r.jsxs)(a.zj,{orientation:S,children:[null!=N&&(0,r.jsx)(f.R,{questOrQuests:x,questContent:u.uF.VIDEO_MODAL_END_CARD,sourceQuestContent:D,children:e=>(0,r.jsx)(a.Kb,{ref:t=>{e.current=t},url:N,orientation:S})}),(0,r.jsx)(a.lx,{title:R,subtitle:L,ctaBtnLabel:x.config.ctaConfig.buttonLabel,ctaIcon:s.K,onCTAClick:()=>b(u.uF.VIDEO_MODAL),orientation:S})]})]}):(0,r.jsxs)(r.Fragment,{children:[null!=N&&(0,r.jsx)(f.R,{questOrQuests:x,questContent:u.uF.VIDEO_MODAL_END_CARD,sourceQuestContent:D,children:e=>(0,r.jsx)(a.pK,{ref:t=>{e.current=t},url:N})}),(0,r.jsx)("div",{className:v.MT,"data-testid":"discord-web-video-player-end-screen"}),(0,r.jsx)(a.OH,{title:R,subtitle:L,icon:s.K,className:v.mT,onClick:()=>b(u.uF.VIDEO_MODAL),divider:(0,r.jsx)(C,{color:"#747783"})})]})}}