Module 27322

1,563 characters · in no known chunk
Dependencies
Required by (1)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>S});var r=n(627968),i=n(64700),s=n(353640),a=n(110259),o=n(554146),l=n(342494),u=n(397927),c=n(359549),d=n(793574),_=n(688810),f=n(139286),p=n(627363),h=n(826673),m=n(932001),E=n(49999),g=n(985018),A=n(529071);let I=(0,s.v)(e=>({activeEntryId:null,setActiveEntryId:t=>e({activeEntryId:t})})),T=e=>{let{entry:t,isFirstApplicationOccurrence:n,targetElementRef:s}=e,{data:T}=(0,p.YY)(t.extra.application_id),{analyticsLocations:S}=(0,_.Ay)(d.A.CLOUD_PLAY_POPOVER),y=(0,c.A)({application:T,analyticsLocations:S}),v=(0,h.JZ)(o.M.CLOUD_PLAY_NEW_BADGE),N=null!=y&&!v&&n,{activeEntryId:C,setActiveEntryId:R}=I(),O=C===t.id,b=N&&O?[o.M.CLOUD_PLAY_POPOVER]:[],[D,L]=(0,m.kn)(b),w=D===o.M.CLOUD_PLAY_POPOVER;i.useEffect(()=>{N&&null===C&&R(t.id)},[C,N,t.id,R]);let M=()=>{y?.()};i.useEffect(()=>()=>{w&&(L(E.i.USER_DISMISS),R(null))},[w,L,R]);let[P,x]=i.useState(!1);i.useEffect(()=>{w&&!P&&x(!0)},[w,P]),(0,f.A)({name:a.ImpressionNames.CLOUD_PLAY_CTA,type:a.ImpressionTypes.VIEW,properties:{location_stack:S}},{disableTrack:!P},[P]);let k=()=>{L(E.i.USER_DISMISS),R(null)};return(0,r.jsx)(l.AM,{title:g.intl.string(g.t["+WNDtV"]),body:g.intl.string(g.t["5QKxGI"]),targetElementRef:s,shouldShow:w,position:"left",caretConfig:{align:"center"},gradientColor:"pink",graphic:{type:"image",src:A.A},actions:[{icon:u.hpF,text:g.intl.string(g.t["jaYS/h"]),onClick:M}],onRequestClose:k})},S=e=>{let{entry:t,isFirstApplicationOccurrence:n,targetElementRef:i}=e;return(0,r.jsx)(T,{entry:t,targetElementRef:i,isFirstApplicationOccurrence:n})}}