2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
|
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[8228],{28127:(e,t,a)=>{a.d(t,{FeatureActivationShelf:()=>xe});var n=a(59496),i=a(89605),s=a(36844),l=a(5866),o=a(50346),r=a(3802),c=a(56162),d=a(63082),u=a(91546),h=a(66490),g=a(84875),f=a.n(g),m=a(66777),p=a(42006);const y="uDOC2Oah0jn_p7N7l2Id",C="hwhquP1FOxRcCnf84P2M",v="bijDFKtWL1TJBF7X9Gp3",S="NTywvDEuW1PlcoR__9XV",x="t1SDLPBbSPbfihznNZdi",b="CvyMWBz1l8dSOsf4r_Ha",j="R32cBJPV9ccjWJYS1TLI",k="fzmowfLpLz7UlIyJThU8",E="MIBwSRJ5XZaCw1WWXXBn",N="dEuzpK3s_BmlRiVNFude",I="MVRnUhNC4ZMglLR56YMn",w="xiaMaZPt8ykPGR8gkQ53",L="mwBKJFOe7ee6V2MdmJyB",F="LziKPm9lTkWR0I7zD_rC";var A=a(4637);const P=n.memo((function({image:e}){return(0,A.jsx)("div",{className:v,children:(0,A.jsx)("div",{className:S,children:(0,A.jsx)(p.E,{className:x,src:e,loading:"lazy"})})})}));var _=a(52052),B=a(28291);const R="mKkYwwDvRoTIEnqf9Mlt",D="ES02HhKmADP_AdcKPs1e",T="IYwEYGRUJ5RTtr0EyBV1",U="YYlv5PB5fGQthi9XzTQg",Q=n.memo((({isLoading:e})=>{const t=(0,B.h)("shimmer");return(0,A.jsx)("div",{ref:t,className:f()(S,{[U]:e})})})),z=n.memo((({cardImage:e,isLoading:t})=>(0,A.jsxs)("div",{className:f()(C,R),"aria-hidden":!0,children:[(0,A.jsx)("div",{className:v,children:e||(0,A.jsx)(Q,{isLoading:t})}),(0,A.jsx)("div",{className:b,children:(0,A.jsxs)("div",{className:j,children:[(0,A.jsx)(_.C,{as:"div",variant:"balladBold",className:D,charCount:10,isLoading:t}),(0,A.jsx)(_.C,{as:"div",variant:"mesto",className:T,charCount:15,isLoading:t})]})})]}))),V=n.memo((function({children:e,image:t,isLoading:a,onClick:n,id:i}){return a?(0,A.jsx)(z,{isLoading:!0}):(0,A.jsxs)("div",{className:f()(C),onClick:n,children:[(0,A.jsx)(P,{image:t}),(0,A.jsx)("div",{className:b,children:(0,A.jsx)("div",{className:j,children:(0,A.jsxs)("div",{className:k,children:[(0,A.jsx)(m.D,{color:getComputedStyle(document.body).getPropertyValue("--spice-text").trim(),height:"18",className:E}),e]})})}),(0,A.jsx)("div",{"data-testid":i,onClick:n,className:y})]})})),W="https://newsroom.spotify.com/2021-09-09/get-perfect-song-recommendations-in-the-playlists-you-create-with-enhance/",M=n.memo((function({isLoading:e=!1,spec:t,logger:a,setInteractionState:i,interactionState:s}){const{openURL:l}=(0,h.e)();(0,n.useEffect)((()=>{a.logImpression(t.shelfContainerFactory().enchanceCardFactory().impression())}),[t,a]);const o=(0,n.useCallback)((e=>{e.stopPropagation(),a.logInteraction(t.shelfContainerFactory().enchanceCardFactory().hitNavigateToExternalUri({destination:W})),i({...s,clickedEnhanceCard:!0}),l(W)}),[l,t,a,i,s]);return(0,A.jsxs)(V,{image:(0,u.g)("images/feature-activation-shelf-enhance-placeholder.png"),isLoading:e,onClick:o,children:[(0,A.jsx)(c.D,{as:"p",variant:"balladBold",className:N,children:r.ag.get("web-player.feature-activation-shelf.enhance-placeholder.title")}),(0,A.jsx)(c.D,{as:"p",variant:"mesto",className:I,children:r.ag.get("web-player.feature-activation-shelf.enhance.description")}),(0,A.jsx)(d.P,{className:w,buttonSize:"sm",onClick:o,children:r.ag.get("web-player.feature-activation-shelf.enhance-placeholder.cta")})]})}));var G=a(4898),H=a(68640),J=a(36747),q=a(54455);function O({items:e}){return e.filter(q.no).find((e=>e.isOwnedBySelf&&e.totalLength>0))??null}const K={offset:0,limit:50,flatten:!0,sort:{field:q.bD.RELEVANCE,order:q.As.DESC}};var Y=a(41836),X=a(96170),Z=a(23046),$=a(48271);const ee=n.memo((function({isLoading:e=!1,playlist:t,toggleEnhanceState:a,navigateToPlaylist:i,spec:s,logger:l,setInteractionState:o,interactionState:u}){const{isEnhanced:h}=(0,$.U)(t.metadata.uri);(0,n.useEffect)((()=>{l.logImpression(s.shelfContainerFactory().enchanceCardFactory().impression())}),[s,l]);const g=(0,n.useCallback)((()=>{l.logInteraction(s.shelfContainerFactory().enchanceCardFactory().hitEnhancePlaylist({playlist:t.metadata.uri})),i(t.metadata.uri),h||a(),o({...u,clickedEnhanceCard:!0})}),[a,h,t.metadata.uri,i,l,s,u,o]);return(0,A.jsxs)(V,{image:t.metadata.images[0].url,isLoading:e,onClick:g,children:[(0,A.jsx)(c.D,{as:"p",variant:"balladBold",
|
||
|
//# sourceMappingURL=xpui-feature-activation-shelf.js.map
|