Files
dotfiles/.config/spicetify/Extracted/Themed/xpui/9147.js
T
2024-05-05 19:02:45 +02:00

2 lines
14 KiB
JavaScript
Executable File

"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9147],{4576:(e,a,o)=>{o.d(a,{T:()=>m});var s=o(50959),t=o(82187),i=o.n(t),n=o(40763),l=o(85648),r=o(55842),d=o(74713);const c="pvGZ831aNzHTQMZ8CA_u";var u=o(11527);const m=(0,s.memo)((function({onClick:e=(()=>{}),size:a,className:o,uri:t,sharingInfo:m,interactionData:h,ariaLabel:x=l.ag.get("mwp.list.item.share"),condensedAll:g}){const{onCopyLink:p}=(0,d.y)({sharingInfo:m,uri:t,interactionData:h}),y=(0,s.useCallback)((()=>{p(),e()}),[e,p]);return(0,u.jsx)(r.E,{ariaLabel:x,size:a,onClick:y,className:i()(c,o),icon:n.M,condensedAll:g,condensed:!0})}))},18050:(e,a,o)=>{o.d(a,{X:()=>me});var s=o(50959),t=o(82187),i=o.n(t),n=o(36275),l=o(75802),r=o(36353),d=o(69736),c=o(43106),u=o(11317),m=o(85648),h=o(16473),x=o(61027),g=o(59582);var p=o(93421),y=o(11401),k=o(61058),j=o(82857),b=o(42882),f=o(78706),v=o(41657),C=o(38338),P=o(28185),D=o(97013),I=o(6056),N=o(4576),T=o(20580),U=o(64329),E=o(27106),M=o(5542),w=o(69053),S=o(3319),B=o(80626),L=o(74434),A=o(93109),Z=o(11527);const z={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},R=s.memo((function({episodeUri:e,showUri:a,sharingInfo:o,canDownload:t,requestId:n,onMarkAsPlayed:l,onMoreButtonClick:r,name:d,fullyPlayed:c,index:u}){const h=(0,S._)(e),{spec:x,logger:g}=(0,B.fU)(v.createDesktopEpisodeBlockEventFactory,{data:{uri:e,reason:n||"",position:u}}),p=(0,E.r)(e),y=(0,s.useMemo)((()=>(0,Z.jsx)(L.T,{size:"medium",uri:e})),[e]),k=(0,s.useMemo)((()=>(0,Z.jsx)(P.p,{uri:e,size:P.q.sm,className:i()({[A.Z.visibleAction]:(0,w.y)(h)}),onClick:(a,o)=>{o===M.mc.ADD?g.logInteraction(x.downloadButtonFactory().hitDownload({itemToDownload:e})):M.mc.REMOVE&&g.logInteraction(x.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:t})),[e,h,x,g,t]),j=(0,s.useMemo)((()=>(0,Z.jsx)(N.T,{uri:e,sharingInfo:o,interactionData:z,onClick:()=>{g.logInteraction(x.copyLinkFactory().hitShare({entityToBeShared:e,shareId:o?.shareId||""}))}})),[e,o,x,g]),b=(0,s.useMemo)((()=>(0,Z.jsx)(I.w,{uri:e,size:C.q.sm,className:A.Z.visibleAction,onClick:a=>{a?g.logInteraction(x.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):g.logInteraction(x.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))}})),[e,x,g]),f=(0,s.useMemo)((()=>(0,Z.jsx)(T.yj,{menu:(0,Z.jsx)(U.k,{uri:e,showUri:a,isPlayed:c,onMarkAsPlayed:l}),children:(0,Z.jsx)(D.z,{size:D.q.sm,label:m.ag.get("more.label.context",d),onClick:r})})),[e,c,d,l,r,a]);return(0,Z.jsxs)(Z.Fragment,{children:[j,k,p?y:b,f]})}));var F=o(96304),G=o(37350);const O="TT1tIewS2iI8Uz8kLuQB",_="Mn93NeoqnZzVnPIP83_9",V="show-episodeBlock-title",W="show-episodeBlock-titleLink",H="show-episodeBlock-actions",q="show-episodeBlock-titleContainer",Y="q80ZFqNlDZCC7OTfUPj8",Q="show-episodeBlock-metadata",J="YhOAZFuFU1oI_YQSof4z",$="DKIjGP8CcZyjr2O2HNST",K="A7qeQBIk3sqr7bYadWA8",X="_IJaGA3ZdVU0NiTxbGsI",ee="show-episodeBlock-imageContainer",ae="show-episodeBlock-showImage",oe="show-episodeBlock-description",se="hFCGY5gjCjN10WzV2VQ4",te="gk0rZwqBxJjSeiWV5lgV",ie="te8hrsPnSvx9SUkzV0ME",ne="show-episodeBlock-header",le="acjrpluRnLumVxPt2QG9",re="show-episodeBlock-descriptionContainer",de="DyuLxip2Kl8P7H8fW62u",ce="vak8N953oXaq9F7jZDsD",ue="WBxE9PQe96PpkE9RuTo5",me=s.memo(s.forwardRef((function({uri:e,name:a,showName:o,showUri:t,size:v,description:C,durationMs:P,images:D,badges:I,fullyPlayed:N,releaseDate:T,resumePositionMs:U,isCurrentlyPlaying:E,isPlaying:M,onContextMenu:w,onTouchStart:S,onTouchEnd:B,handlePlaybackClick:L,handleDragStart:A,handleClick:z,position:me,index:he,isPlayable:xe,isPaywalled:ge,isUserSubscribed:pe,episodeSharingInfo:ye,playButtonWrapper:ke=null,highlightText:je=(e=>e),onMarkAsPlayed:be,contentInformation:fe,requestId:ve,onMoreButtonClick:Ce,status:Pe,variant:De="default",mediaTypes:Ie},Ne){const Te=(0,l.s0)(),Ue=E&&M,Ee=(0,u.EC)(e).toURLPath(!0),Me=(0,u.EC)(t)?.toURLPath(!0),we=function({episodeUri:e}){const[a,o]=(0,s.useState)([]),t=(0,g.G)();return(0,s.useEffect)((()=>{let a=!0;return async function(){const s=await t.getArtists(e);a&&o(s)}(),()=>{a=!1}}),[e,t]),a}({episodeUri:e}),Se=(0,h.G3)(e,T,U,N),Be=Ie?.includes(b.$.Video)??!1,Le=(0,s.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Te(Ee),z&&z(e)}),[Te,Ee,z]),Ae=(0,s.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Me&&Te(Me)}),[Me,Te]),Ze=ge&&!pe,ze=(0,s.useCallback)((e=>{e.stopPropagation(),Ze||L(e)}),[L,Ze]),Re=Ze||xe,Fe=m.ag.get("tracklist.a11y.play",a,o),Ge=m.ag.get("tracklist.a11y.pause",a,o),Oe=(0,Z.jsx)(x.f,{size:"small",version:"next-best-episode"===De?x.u.primary:x.u.secondary,onClick:ze,isPlaying:Ue,disabled:!Re,locked:Ze,ariaPlayLabel:Fe,ariaPauseLabel:Ge}),_e=ke?ke(Oe):Oe;return(0,Z.jsxs)("div",{ref:Ne,className:i()(O,{[_]:E,[te]:v===k.Uo.MEDIUM,[ie]:v===k.Uo.LARGE,[X]:v===k.Uo.XSMALL,[ue]:"next-best-episode"===De}),"data-testid":`episode-${he}`,draggable:!!A,onDragStart:A,onClick:Le,onContextMenu:w,onTouchStart:S,onTouchEnd:B,children:[Pe&&(0,Z.jsx)(d.x,{className:le,paddingBottom:r.hM,children:Pe}),fe&&(0,Z.jsx)(F.m,{className:ce,cardHeaderText:fe.cardHeaderText,buttonText:fe.buttonText,buttonTarget:fe.buttonTarget}),"default"===De&&(0,Z.jsx)("div",{className:ee,children:(0,Z.jsx)(p.O,{className:ae,type:j.p.EPISODE,size:(e=>{switch(e){case k.Uo.LARGE:return y.m$.SIZE_112;case k.Uo.MEDIUM:return y.m$.SIZE_64;default:return y.m$.SIZE_48}})(v),title:a,shape:p.K.ROUNDED_CORNERS,images:D})}),(0,Z.jsxs)("div",{className:ne,children:[(0,Z.jsxs)("div",{className:q,children:[(0,Z.jsx)(n.rU,{className:W,to:Ee,onClick:Le,children:(0,Z.jsxs)(d.x,{as:"div",variant:"bodyMediumBold",className:V,"data-testid":"episodeTitle",children:[Se&&(0,Z.jsx)(h.Rd,{}),je(a)]})}),we.length>0&&(0,Z.jsxs)("div",{className:J,children:[(0,Z.jsx)(c.U,{size:"small",className:K}),(0,Z.jsx)(d.x,{as:"p",variant:"bodySmall",className:$,children:je(we.join(m.ag.getSeparator()))})]})]}),(0,Z.jsxs)("div",{className:Y,children:[Be&&(0,Z.jsx)(d.x,{variant:"bodySmall",semanticColor:"textSubdued",children:(0,Z.jsx)(G.t,{})}),o&&Me&&(0,Z.jsx)(n.rU,{className:W,to:Me,onClick:Ae,children:(0,Z.jsx)(d.x,{variant:"bodySmall",semanticColor:"textSubdued",children:je(o)})})]})]}),(0,Z.jsx)("div",{className:re,children:(0,Z.jsx)(d.x,{as:"p",variant:"bodySmall",className:oe,children:je(C??"")})}),(0,Z.jsxs)("div",{className:Q,children:[(0,Z.jsx)("div",{className:se,children:I}),(0,Z.jsx)(f.E,{isPlaying:Ue,fullyPlayed:N,durationMs:P,releaseDate:T,resumePositionMs:U,position:E?me:void 0})]}),(0,Z.jsx)("div",{onClick:e=>{e.stopPropagation()},className:H,children:(0,Z.jsx)(R,{episodeUri:e,showUri:t??"",sharingInfo:ye,canDownload:!ge||ge&&pe,requestId:ve,index:he,name:a,fullyPlayed:N,onMarkAsPlayed:be,onMoreButtonClick:Ce})}),(0,Z.jsx)("div",{className:de,children:_e})]})})))},96304:(e,a,o)=>{o.d(a,{m:()=>y});var s=o(50959),t=o(82187),i=o.n(t),n=o(21165),l=o(69736),r=o(3533),d=o(10226),c=o(11317),u=o(17676),m=o(33592);const h="rFwxt8s8DYY8p1O7tYZW",x="sA2HogGQNi8R_zpCWei5",g="H92pPTuqDR5DcoTtjcb3";var p=o(11527);const y=({cardHeaderText:e,buttonText:a,buttonTarget:o,className:t})=>{const y=(0,d.W6)(u.XdP),k=(0,s.useCallback)((e=>{e.stopPropagation()}),[]),j=(0,c.EC)(o).toURLPath(!0);return y?(0,p.jsxs)("div",{className:i()(h,t),onClick:k,children:[(0,p.jsxs)("div",{className:x,children:[(0,p.jsx)(n.W,{className:g,size:"small",semanticColor:"textBase"}),(0,p.jsx)(l.x,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:e})]}),(0,p.jsx)(r.D,{size:"small",colorSet:"invertedLight",component:m.Z,href:j,children:a})]}):null}},12553:(e,a,o)=>{o.d(a,{k:()=>_});var s=o(50959),t=o(82187),i=o.n(t),n=o(75802),l=o(69736),r=o(36353),d=o(97345),c=o(32394),u=o(77366),m=o(16601),h=o(11317),x=o(85648),g=o(16473),p=o(61027),y=o(93421),k=o(11401),j=o(61058),b=o(82857),f=o(42882),v=o(78706),C=o(96304),P=o(41657),D=o(28185),I=o(97013),N=o(6056),T=o(4576),U=o(20580),E=o(64329),M=o(27106),w=o(5542),S=o(69053),B=o(3319),L=o(80626),A=o(74434),Z=o(93109),z=o(11527);const R={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},F=s.memo((function({episodeUri:e,showUri:a,sharingInfo:o,size:t,canDownload:n,requestId:l,onMarkAsPlayed:r,onMoreButtonClick:d,name:c,fullyPlayed:u,index:m}){const h=(0,B._)(e),{spec:g,logger:p}=(0,L.fU)(P.createDesktopEpisodeBlockEventFactory,{data:{uri:e,reason:l||"",position:m}}),y=t===j.Uo.LARGE?"medium":"small",k=(0,s.useMemo)((()=>(0,z.jsx)(D.p,{uri:e,size:y,className:i()({[Z.Z.visibleAction]:(0,S.y)(h)}),onClick:(a,o)=>{o===w.mc.ADD?p.logInteraction(g.downloadButtonFactory().hitDownload({itemToDownload:e})):w.mc.REMOVE&&p.logInteraction(g.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:n})),[e,h,g,p,y,n]),b=(0,s.useMemo)((()=>(0,z.jsx)(T.T,{uri:e,sharingInfo:o,interactionData:R,size:y,onClick:()=>{p.logInteraction(g.copyLinkFactory().hitShare({entityToBeShared:e,shareId:o?.shareId||""}))}})),[e,o,g,p,y]),f=(0,s.useMemo)((()=>(0,z.jsx)(N.w,{uri:e,size:y,className:Z.Z.visibleAction,onClick:a=>{a?p.logInteraction(g.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):p.logInteraction(g.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))}})),[e,g,p,y]),v=(0,M.r)(e),C=(0,s.useMemo)((()=>(0,z.jsx)(A.T,{size:y,uri:e,className:Z.Z.visibleAction})),[e,y]),F=(0,s.useMemo)((()=>(0,z.jsx)(U.yj,{menu:(0,z.jsx)(E.k,{uri:e,showUri:a,isPlayed:u,onMarkAsPlayed:r}),children:(0,z.jsx)(I.z,{size:y,label:x.ag.get("more.label.context",c),onClick:d})})),[e,u,c,r,d,a,y]);return(0,z.jsxs)(z.Fragment,{children:[v?C:f,k,b,F]})}));var G=o(60046),O=o(37350);const _=s.memo(s.forwardRef((function({uri:e,name:a,showName:o,showUri:t,size:P,description:D,durationMs:I,images:N,badges:T,fullyPlayed:U,releaseDate:E,resumePositionMs:M,isCurrentlyPlaying:w,isPlaying:S,onContextMenu:B,onTouchStart:L,onTouchEnd:A,handlePlaybackClick:R,handleDragStart:_,handleClick:V,position:W,index:H,isPlayable:q,isPaywalled:Y,isUserSubscribed:Q,episodeSharingInfo:J,playButtonWrapper:$=null,highlightText:K=(e=>e),onMarkAsPlayed:X,contentInformation:ee,requestId:ae,mediaTypes:oe,onMoreButtonClick:se,status:te,variant:ie="default"},ne){const le=(0,n.s0)(),re=w&&S,de=P===j.Uo.LARGE,ce=(0,h.EC)(e).toURLPath(!0),ue=(0,h.EC)(t)?.toURLPath(!0),me=(0,g.G3)(e,E,M,U),he=Y&&!Q,xe=oe?.includes(f.$.Video)??!1,ge=T?.props.children.filter((e=>!1!==e))||[],pe=he||q,ye=x.ag.get("tracklist.a11y.play",a,o),ke=x.ag.get("tracklist.a11y.pause",a,o),je=(0,s.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),le(ce),V&&V(e)}),[le,ce,V]),be=(0,s.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),ue&&le(ue)}),[ue,le]),fe=(0,s.useCallback)((e=>{e.stopPropagation(),he||R(e)}),[R,he]),ve=(0,z.jsx)(p.f,{size:"small",version:"next-best-episode"===ie?p.u.primary:p.u.secondary,onClick:fe,isPlaying:re,disabled:!pe,locked:he,ariaPlayLabel:ye,ariaPauseLabel:ke}),Ce=$?$(ve):ve,Pe=(0,z.jsx)(z.Fragment,{children:te&&(0,z.jsx)(l.x,{variant:"bodySmall",semanticColor:"textSubdued",paddingBottom:r.hM,children:te})}),De=(0,z.jsxs)(d.g,{className:Z.Z.title,href:ce,onClick:je,lineClamp:2,children:[me&&(0,z.jsx)(g.Rd,{}),K(a)]}),Ie=(0,z.jsxs)(c.l,{lineClamp:2,paddingBottom:de?r.dl:void 0,children:[xe&&(0,z.jsx)(O.t,{}),o&&ue&&(0,z.jsx)(G.Link,{className:Z.Z.showLink,to:ue,onClick:be,children:(0,z.jsx)(l.x,{variant:"bodySmall",semanticColor:"textSubdued",children:K(o)})})]}),Ne=(0,z.jsxs)("div",{className:Z.Z.showDetailsWithProgress,children:[(0,z.jsx)(u.o,{lineClamp:2,paddingBottom:de?r.hM:void 0,children:K(D??"")}),(0,z.jsxs)("div",{className:Z.Z.metadata,children:[ge.length>0&&(0,z.jsx)("div",{className:Z.Z.badges,children:T}),(0,z.jsx)(v.E,{isPlaying:re,fullyPlayed:U,durationMs:I,releaseDate:E,resumePositionMs:M,position:w?W:void 0})]})]}),Te=(0,z.jsxs)("div",{className:Z.Z.footer,children:[(0,z.jsx)("div",{onClick:e=>{e.stopPropagation()},className:Z.Z.actions,children:(0,z.jsx)(F,{episodeUri:e,showUri:t??"",sharingInfo:J,size:P,canDownload:!Y||Y&&Q,requestId:ae,index:H,name:a,fullyPlayed:U,onMarkAsPlayed:X,onMoreButtonClick:se})}),(0,z.jsx)("div",{children:Ce})]}),Ue="default"===ie&&(0,z.jsx)("div",{className:Z.Z.imageContainer,children:(0,z.jsx)(y.O,{className:i()(Z.Z.showImage,{[Z.Z.largeImage]:de}),type:b.p.EPISODE,size:(e=>{switch(e){case j.Uo.LARGE:return k.m$.SIZE_112;case j.Uo.MEDIUM:return k.m$.SIZE_64;default:return k.m$.SIZE_48}})(P),title:a,shape:y.K.ROUNDED_CORNERS,images:N})});return(0,z.jsxs)("div",{className:i()(Z.Z.episodeBlock,{[Z.Z.isActive]:w,[Z.Z.nextBestEpisode]:"next-best-episode"===ie}),"data-testid":`episode-${H}`,draggable:!!_,onDragStart:_,onClick:je,onContextMenu:B,onTouchStart:L,onTouchEnd:A,children:[ee&&(0,z.jsx)(C.m,{className:Z.Z.contentInformationBanner,cardHeaderText:ee.cardHeaderText,buttonText:ee.buttonText,buttonTarget:ee.buttonTarget}),(0,z.jsx)(m.w,{size:"xxl",ref:ne,media:Ue,title:De,id:`episode-${H}`,subtitle:o&&ue?Ie:Ne,pretitle:Pe,body:o&&ue?Ne:void 0,variant:"naked",footer:Te,hoverBackgroundColor:"backgroundHighlight",layout:de?"wide":"regular",horizontalGap:de?r.g4:r.nu,verticalGap:r.dl,paddingBlockStart:r.o7,paddingBlockEnd:r.o7})]})})))},42882:(e,a,o)=>{o.d(a,{$:()=>s});let s=function(e){return e.Audio="AUDIO",e.Unknown="UNKNOWN",e.Video="VIDEO",e}({})},93109:(e,a,o)=>{o.d(a,{Z:()=>s});const s={episodeBlock:"T9iBYqbERZHdwDl0U2tC",isActive:"DS4BYgmEO7Wy5RutUt60",title:"N2Fkohxhgu1_QAWUDc4O",selected:"DaxWgzoBoBnOEj43bZAA",actions:"hGbRiYkIjjy4sJvor0A2",visibleAction:"OgaF7O4ER8AvZfFd6JdJ",metadata:"bdGDIiYj50H66Hx5uevz",imageContainer:"kiT5NMttSzIDbtqBKc1J",showImage:"TG1hsDPHeO5QUf4EQasO",largeImage:"_NdByrVnM0OS7aK_GfRn",showLink:"CHUTnjCBTLRfQb048zjZ",badges:"UpgTvLnGW6GFjAUfaPXH",footer:"kxVuYXZ4sVWn6XuJgFhX",showDetailsWithProgress:"UvdRnanMNuY384mjTf2l",contentInformationBanner:"fmu47VumZ84IoKgMK1yU",nextBestEpisode:"dUScIGoP9fWn5IVsztB7"}}}]);
//# sourceMappingURL=9147.js.map