dotfiles/.config/spicetify/Extracted/Themed/xpui/xpui-routes-cultural-moment...

2 lines
5.3 KiB
JavaScript
Raw Normal View History

2024-07-11 00:01:49 +05:30
"use strict";(("undefined"!=typeof self?self:global).webpackChunkopen=("undefined"!=typeof self?self:global).webpackChunkopen||[]).push([[8420],{52642:(e,t,n)=>{n.r(t),n.d(t,{CulturalMomentHub:()=>z,REDIRECT_BASE:()=>Y,default:()=>Z});var s=n(36844),i=n(41836),l=n(59496),r=n(84875),o=n.n(r),a=n(43977),c=n(3802),u=n(33971),d=n(85270),m=n(96170),p=n(94041),g=n(35725),h=n(41226),x=n(16743),f=n(73997),b=n(4637);const j=({image:e,color:t=p.k77,title:n})=>{const s=void 0===e?h.fR.SMALL:h.fR.DEFAULT,i=e?.uri?[{url:e.uri}]:[];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(h.gF,{backgroundImages:i,backgroundColor:t,size:s,children:[(0,b.jsx)(x.W,{children:n?(0,b.jsx)(f.i,{text:n}):null}),(0,b.jsx)(h.sP,{children:n?(0,b.jsx)(h.xd,{children:n}):null})]}),(0,b.jsx)(g.H,{color:t})]})};var y=n(50346),v=n(69527),D=n(78677),w=n(75523);const A=e=>"number"==typeof e?e:0,I=e=>{if("number"==typeof e){return new Date(1e3*e).toISOString()}return null};const R=(e,t,n)=>{if(void 0===e.id)return null;const s=t.map(((e,t)=>function(e,t){const n=e.component?.id,s=e.id;if(void 0===n||void 0===s)return null;const i=e.events?.click?.data?.uri,l=e.images?.main?.uri,r=l?[{url:l}]:[];switch(n){case"culturalmoments:mediumEpisodeCard":case"culturalmoments:episodeCardActionsMedium":return void 0===i?null:(0,b.jsx)(D.B,{uri:i,name:e.text?.title??"",images:r,showImages:r,description:e.text?.description??e.text?.subtitle??"",durationMilliseconds:A(e.custom?.duration),releaseDate:I(e.custom?.releaseDate),resume_point:null,isExplicit:!1,is19PlusOnly:!1,sharingInfo:null,index:t},i);case"culturalmoments:playlistCard":case"culturalmoments:playlistCardActionsMedium":return void 0===i?null:(0,b.jsx)(w.Z,{uri:i,name:e.text?.title??"",images:r,description:e.text?.description??"",authorName:e.text?.subtitle??"",index:t},i);default:return null}}(e,t))).flatMap((e=>e?[e]:[]));if(0===s.length)return null;const i=(0,y.EC)(e.events?.click?.data?.uri??"")?.toURLPath(!0);return(0,b.jsx)(v.q,{title:e.text?.title??"",total:s.length,seeAllUri:i,index:n,id:e.id,seeAllLabel:e.text?.accessory,children:s})},C=e=>{const t=(e=>{const t=Array();let n,s=Array();return e.forEach((e=>{"culturalmoments:sectionHeaderWithAction"===e.component?.id?(n&&0!==s.length&&t.push({heading:n,components:s}),n=e,s=Array()):n&&("culturalmoments:carousel"===e.component?.id||"glue2:carousel"===e.component?.id?e.children?.forEach((e=>{s.push(e)})):s.push(e))})),n&&0!==s.length&&t.push({heading:n,components:s}),t})(e);return(0,b.jsx)(b.Fragment,{children:t.map(((e,t)=>R(e.heading,e.components,t)))})};var k=n(37574),N=n(56162),O=n(58706),S=n(91546),F=n(63120),B=n(20710);const E="pgo3GiB844kDFl6Qbo05",M="RhOeeOpI4AOwx0QAVneD",U="XSE6HhcsNgvOjU0xmuTN";var W=function(e){return e.ANDROID="https://play.google.com/store/apps/details?id=com.spotify.music",e.IOS="https://apps.apple.com/app/spotify-music/id324684580",e}(W||{});const L=({spec:e})=>{const t=c.ag.getLocale(),n=(0,m.$P)(),s=(0,m.Wi)(e),i=t=>{if(t===W.ANDROID){const s=e.googleBadgeFactory().hitNavigateToWebviewUri({destination:t});n.logInteraction(s)}else{const s=e.appleBadgeFactory().hitNavigateToWebviewUri({destination:t});n.logInteraction(s)}};return(0,b.jsxs)(k.x,{variant:"tinted",style:{width:600},ref:s,children:[(0,b.jsx)(N.D,{as:"p",variant:"cello",style:{marginBottom:O.dly},children:c.ag.get("web-player.cultural-moments.unsupportedHeading")}),(0,b.jsx)(N.D,{as:"p",variant:"mesto",style:{marginBottom:O.o78},children:c.ag.get("web-player.cultural-moments.unsupportedDescription")}),(0,b.jsxs)("div",{className:o()(U),children:[(0,b.jsx)(F.default,{to:W.IOS,target:"_blank",onClick:()=>i(W.IOS),children:(0,b.jsx)("img",{src:(0,S.g)((0,B.b)(t)),alt:c.ag.get("web-player.cultural-moments.unsupported.appleAppStoreAlt"),className:E})}),(0,b.jsx)(F.default,{to:W.ANDROID,target:"_blank",onClick:()=>i(W.ANDROID),children:(0,b.jsx)("img",{src:(0,S.g)((0,B.V)(t)),alt:c.ag.get("web-player.cultural-moments.unsupported.googlePlayStoreAlt"),className:o()(E,M)})})]})]})};var P=n(22521),_=n(91703),H=n(23627),T=n(17652);const V="BnW4ga5mfG9DYWXeADCL",$="RL_W31RCuHFbS
//# sourceMappingURL=xpui-routes-cultural-moment-hub.js.map