1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9697],{29697:(e,a,t)=>{t.d(a,{A:()=>Q});var s=t(95155),l=t(12115),r=t(18372),i=t(75194),n=t(15239),c=t(20063),o=t(14781),d=t(45228),m=t(46576),u=t(48483),p=t(73326),x=t(80257),h=t(95847);function f(e){let{track:a}=e,{dictionary:t,locale:r}=(0,p.s)(),i=(0,c.useSearchParams)(),[n,o]=(0,l.useState)(""),{navigateToModal:m,navigateAway:u}=(0,h.PG)();(0,l.useEffect)(()=>{var e;o(null!=(e=null==i?void 0:i.toString())?e:"")},[i]);let f=(e,a)=>{u("/".concat(r,"/search/tracks?searchTerm=").concat(encodeURIComponent(a+":("+e.trim()+")")))};return(0,s.jsxs)("section",{className:"block sm:flex w-full py-8 gap-x-10",children:[(0,s.jsxs)("div",{className:"grid gap-y-3 gap-x-8 grid-cols-2 md:[grid-template-columns:auto_1fr] xl:[grid-template-columns:auto_1fr] w-full sm:w-[40%] ",children:[(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsx)("div",{className:"uppercase",children:t.track.factList.trackNumber}),(0,s.jsx)("div",{className:"",children:Number(a.TrackNumber)})]}),a.AlbumTitle&&a.AlbumID&&(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsx)("div",{className:"uppercase",children:t.track.factList.albumName}),(0,s.jsxs)("a",{onClick:e=>{let t;e.preventDefault(),m((t="/".concat(r,"/album/").concat((0,d.V)(a.AlbumTitle||""),"/").concat(a.AlbumID),n?"".concat(t,"?").concat(n):t))},className:"cursor-pointer hover:underline flex items-center gap-1",children:[(0,s.jsx)("span",{children:a.AlbumTitle}),(0,s.jsx)("span",{className:"icon icon-chevron-right text-xs","aria-hidden":"true"})]})]}),a.CDCode&&(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsx)("div",{className:"uppercase",children:t.track.factList.trackCode}),(0,s.jsx)("div",{className:"",children:a.CDCode})]})]}),(0,s.jsxs)("div",{className:"grid items-center gap-y-3 gap-x-8 grid-cols-2 md:[grid-template-columns:auto_1fr] xl:[grid-template-columns:auto_1fr] w-full sm:w-[60%] mt-4 sm:mt-0",children:[a.Composer&&(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsx)("div",{className:"uppercase",children:t.track.factList.composer}),(0,s.jsx)("div",{className:"flex gap-2 cursor-pointer flex-wrap",children:a.Composer.split(/[/,]/).map((e,a)=>(0,s.jsxs)("div",{onClick:()=>f(e,"composer"),className:"flex items-center gap-1 whitespace-nowrap",children:[(0,s.jsx)("span",{className:"hover:underline",children:e.trim()}),(0,s.jsx)("span",{className:"icon icon-chevron-right text-xs flex-shrink-0","aria-hidden":"true"})]},e+a))})]}),a.Artist?(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsx)("div",{className:"uppercase",children:t.track.factList.artist}),(0,s.jsx)("div",{className:"flex gap-2 cursor-pointer flex-wrap",children:a.Artist.split(/[/,]/).map((e,a)=>(0,s.jsxs)("div",{onClick:()=>f(e,"artist"),className:"flex items-center gap-1 whitespace-nowrap",children:[(0,s.jsx)("span",{className:"hover:underline",children:e.trim()}),(0,s.jsx)("span",{className:"icon icon-chevron-right text-xs flex-shrink-0","aria-hidden":"true"})]},e+a))})]}):(0,s.jsx)("div",{className:"col-span-2 min-h-[1lh]"}),a.LibraryName&&(0,s.jsxs)("div",{className:"contents",children:[(0,s.jsx)("div",{className:"uppercase inline-flex items-center",children:t.track.factList.label}),(0,s.jsx)(x.A,{href:"/".concat(r,"/home/label/").concat((0,d.V)(a.LibraryName),"/").concat(a.LibraryID),onClick:e=>{e.preventDefault(),u("/".concat(r,"/home/label/").concat((0,d.V)(a.LibraryName),"/").concat(a.LibraryID))},showIcon:!0,icon:"chevron-right",className:"hover:underline",iconClassName:"text-xs",children:a.LibraryName})]})]})]})}var v=t(25611),b=t(83984);function j(e){let{track:a,isModal:t,downloadSourceContext:r}=e,i=(0,c.useParams)(),p=(0,c.useSearchParams)(),[x,j]=(0,l.useState)(""),{navigateToModal:y}=(0,h.PG)(),g=(null==i?void 0:i.locale)||"en-us";(0,l.useEffect)(()=>{p?j(p.toString()):j("")},[p]);let{albumImageUrl:N}=(0,m.j)({albumId:a.AlbumID,width:o.Fd.trackArtFetchWidth.toString(),height:o.Fd.trackArtFetchHeight.toString()}),k="/".concat(g,"/album/").concat((0,d.V)(a.AlbumName),"/").concat(a.AlbumID);return x&&(k="".concat(k,"?").concat(x)),(0,s.jsxs)("div",{className:"relative min-h-[300px] px-10 pt-10 pb-8",children:[t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"absolute top-0 h-full w-full overflow-hidden z-0 -ml-10 opacity-95",children:(0,s.jsx)(n.default,{src:N||"/assets/images/fallback/album.svg",alt:"Album Cover for ".concat(a.Name),width:o.Fd.trackArtWidth,height:o.Fd.trackArtHeight,className:"w-full h-full object-cover image-cover-shadow"})}),(0,s.jsx)("div",{className:"bg-linear-dark absolute top-0 h-full w-full overflow-hidden z-0 -ml-10 opacity-90"})]}),(0,s.jsxs)("div",{className:"relative z-20",children:[(0,s.jsxs)("div",{className:"flex text-font-main-85 justify-between items-center mb-4",children:[(0,s.jsx)("div",{children:a.Version&&(0,s.jsx)("span",{className:"text-sm",children:a.Version.toUpperCase()})}),(0,s.jsx)("div",{className:"flex gap-4 items-center",children:(0,s.jsx)(b.A,{track:a,view:v.XP.TrackDetail
1s,className:"text-font-main-85",sourceContextOverride:r})})]}),(0,s.jsx)("h1",{className:"text-5xl font-bold uppercase mb-8",children:a.Name}),(0,s.jsxs)("div",{className:"block sm:flex items-start justify-start gap-4",children:[(0,s.jsx)("div",{onClick:()=>{y(k)},className:"w-[120px] h-[120px] flex-shrink-0 cursor-pointer",children:(0,s.jsx)(n.default,{src:N||"/assets/images/fallback/album.svg",alt:"Album Cover for ".concat(a.Name),width:120,height:120,className:"w-full h-full object-cover image-cover-shadow"})}),(0,s.jsx)("div",{className:"flex-1 h-[120px] flex items-center mt-5 sm:mt-0",children:(0,s.jsx)(u.A,{track:a})})]}),(0,s.jsx)(f,{track:a})]})]})}var y=t(59300),g=t(75416),N=t(2821);function k(e){var a,t,l,r,i,c,o,d,m;let{track:u,activeTab:x,onTabChange:h,similarTracks:f=[],similarLoading:v=!1,showSimilarTab:b=!0,className:j}=e,{dictionary:k}=(0,p.s)(),w=(null==u?void 0:u.AlternateCount)?parseInt(u.AlternateCount):0,C=u.AlternateTracks&&u.AlternateTracks.length>0,I=[{id:"keywords",label:null==(t=k.track)||null==(a=t.detailsTabs)?void 0:a.keywords,isDisabled:!1},...C?[{id:"versions",label:null==(r=k.track)||null==(l=r.detailsTabs)?void 0:l.versions,isDisabled:!1}]:[],...+u.StemCount>0?[{id:"stems",label:null==(i=k.track)?void 0:i.stems,isDisabled:!1}]:[],...u.Lyrics&&"n/a"!==u.Lyrics.toLowerCase()?[{id:"lyrics",label:null==(o=k.track)||null==(c=o.detailsTabs)?void 0:c.lyrics,isDisabled:!1}]:[],...b?[{id:"similar",label:null==(m=k.track)||null==(d=m.detailsTabs)?void 0:d.similarTracks,isDisabled:!1}]:[]],A=I.findIndex(e=>e.id===x);return(0,s.jsx)("div",{className:j,children:(0,s.jsx)(y.A,{value:A,onChange:(e,a)=>{I[a].isDisabled||h(I[a].id)},variant:"scrollable",scrollButtons:"auto","aria-label":"Track details tabs",slotProps:{indicator:{className:"hidden"}},children:I.map((e,a)=>{var t,l;let r=A===a,i="lyrics"===e.id&&u.IsExplicit,c="versions"===e.id&&w>0,o="similar"===e.id&&f.length>0&&!v,d="similar"===e.id&&v;return(0,s.jsx)(g.A,{disableRipple:!0,label:(0,s.jsxs)("span",{className:"flex items-start gap-2",children:[(0,s.jsx)("span",{className:(0,N.A)("border-b-[2px] md:border-b-[3px] pb-0.5",{"border-primary-light":r&&!e.isDisabled,"border-transparent":!r||e.isDisabled}),children:e.label}),c&&(0,s.jsx)("span",{className:(0,N.A)("px-1 py-0.5 text-sm leading-4 font-bold flex items-start border rounded",r?"border-font-main":"border-font-main-55 text-font-main-55"),children:w}),i&&(0,s.jsx)("span",{className:"explicit-icon",title:null==(l=k.track)||null==(t=l.tooltip)?void 0:t.explicit,children:(0,s.jsx)(n.default,{src:"/assets/icons/explicit.svg?v=1",alt:"Explicit",width:20,height:20})}),o&&(0,s.jsx)("span",{className:(0,N.A)("px-1 py-0.5 text-sm leading-4 font-bold flex items-start border rounded",r?"border-font-main":"border-font-main-55 text-font-main-55"),children:f.length}),d&&(0,s.jsx)("span",{className:"flex items-center justify-center px-1 py-0.5",children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"})})]}),sx:{color:"inherit"},className:(0,N.A)("font-family-main text-base md:text-xl min-w-auto min-h-auto p-0 font-inherit font-bold mr-8 md:mr-10",{"text-font-main":r&&!e.isDisabled,"text-font-main-55":!r&&!e.isDisabled,"text-font-main-25 opacity-15 cursor-default":e.isDisabled})},e.id)})})})}var w=t(74254);let C={composer:"C",author:"A","composer/author":"CA",arranger:"Ar","composer/lyricist":"C",lyricist:"L"};var I=t(84639);let A=()=>{let{showToaster:e}=(0,I._k)(),{dictionary:a}=(0,p.s)();return{copyToClipboard:async(t,s)=>{try{var r;await navigator.clipboard.writeText(t);let i=null==(r=a.toaster)?void 0:r.success;e({message:null==i?void 0:i[s],type:"info",icon:(0,l.createElement)("i",{className:"icon icon-clipboard text-base"}),anchorOrigin:{vertical:"bottom",horizontal:"center"}})}catch(e){throw console.error("Failed to copy:",e),Error("Failed to copy to clipboard")}}}};function S(e){let{title:a,children:t,onCopy:l}=e;return(0,s.jsxs)("div",{className:"mb-6 group",children:[(0,s.jsxs)("h1",{className:"mt-0 mb-2 text-base leading-[26px] tracking-[3px] font-light uppercase",children:[a,l&&(0,s.jsx)("i",{className:"icon icon-cl
1ipboard inline-block ml-3 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out",onClick:l})]}),t]})}function T(e){let{keywords:a,onKeywordClick:t,useRaw:l=!1}=e,r=[...a].sort((e,a)=>e.value.localeCompare(a.value));return(0,s.jsx)("div",{className:"flex flex-wrap",children:r.map((e,a)=>{let r=e.isMusiioKeyword?"bg-linear-musiio":"bg-linear-dark";return(0,s.jsx)("div",{className:"".concat(r," py-1.5 px-3 min-h-[28px] mr-2 mb-2 ").concat(l?"":"capitalize"," text-sm tracking-wider font-normal cursor-pointer"),onClick:()=>t(e.value),children:e.value.trim()},a)})})}function D(e){let{value:a,variant:t="gradient",capitalize:l=!0}=e,r="bordered"===t?"border-gradient-dark":"bg-linear-dark",i=l?"capitalize":"",n=Array.isArray(a)?a:[a];return(0,s.jsx)("div",{className:"flex flex-wrap",children:n.map((e,a)=>(0,s.jsx)("div",{className:"".concat(r," ").concat("py-1.5 px-3 min-h-[28px] mr-2 mb-2 text-sm leading-4 tracking-[0.5px] cursor-pointer"," ").concat(i),children:e},a))})}function M(e){var a,t,l,r,i,n,c,o,d,m;let{track:u,genre:x,keywords:f,instrumentation:v,codes:b}=e,{dictionary:j,locale:y}=(0,p.s)(),{copyToClipboard:g}=A(),{navigateAway:N}=(0,h.PG)(),k=e=>{let a=e.trim();if(!a)return;let t=a.startsWith("-"),s=t?a.slice(1):a,l=s.includes(" ")?'"'.concat(s,'"'):s,r=t?"-".concat(s):s,i=new URLSearchParams;i.set("searchTerm",t?"-".concat(l):l),i.append("keyword",r),N("".concat("".concat("/".concat(y,"/search"),"/tracks"),"?").concat(i.toString()))};return(0,s.jsxs)("div",{className:"pr-0 lg:pr-4 w-full lg:w-1/2",children:[u.Comment&&(0,s.jsx)(S,{title:null==(a=j.trackMetaInfo)?void 0:a.title,onCopy:()=>g(u.Comment,"trackDescInfoCopy"),children:(0,s.jsx)("div",{className:"text-sm",children:u.Comment})}),x&&x.length>0&&(0,s.jsx)(S,{title:null==(t=j.trackMetaInfo)?void 0:t.genre,children:(0,s.jsx)(T,{keywords:x,onKeywordClick:k})}),f&&f.length>0&&(0,s.jsx)(S,{title:null==(l=j.trackMetaInfo)?void 0:l.keywords,children:(0,s.jsx)(T,{keywords:f,onKeywordClick:k})}),v&&v.length>0&&(0,s.jsx)(S,{title:null==(r=j.trackMetaInfo)?void 0:r.instrumentation,children:(0,s.jsx)(T,{keywords:v,onKeywordClick:k})}),(0,s.jsxs)("div",{className:"flex",children:[b&&b.length>0&&(0,s.jsx)("div",{className:"w-[190px]",children:(0,s.jsx)(S,{title:null==(i=j.trackMetaInfo)?void 0:i.key,children:(0,s.jsx)(D,{value:b.map(e=>e.codeName),capitalize:!1})})}),u.Bpm&&(0,s.jsx)("div",{className:"w-[190px]",children:(0,s.jsx)(S,{title:null==(n=j.trackMetaInfo)?void 0:n.bpm,children:(0,s.jsx)(D,{value:u.Bpm})})}),u.Tempo&&(0,s.jsx)("div",{className:"w-[190px]",children:(0,s.jsx)(S,{title:null==(c=j.trackMetaInfo)?void 0:c.tempo,children:(0,s.jsx)(D,{value:u.Tempo})})}),u.TempoVariation&&(0,s.jsx)("div",{className:"w-[190px]",children:(0,s.jsx)(S,{title:null==(o=j.trackMetaInfo)?void 0:o.tempoVariation,children:(0,s.jsx)(D,{value:u.TempoVariation,variant:"bordered"})})})]}),u.VocalGender&&(0,s.jsx)(S,{title:null==(d=j.trackMetaInfo)?void 0:d.vocalGender,children:(0,s.jsx)(D,{value:u.VocalGender,variant:"bordered"})}),u.MusicalKey&&(0,s.jsx)(S,{title:null==(m=j.trackMetaInfo)?void 0:m.musicalKey,children:(0,s.jsx)(D,{value:u.MusicalKey,variant:"bordered"})})]})}var L=t(70163),P=t(46594);function E(e){var a,t,l,i,n,c;let{title:o,composers:d,showRole:m,onCopy:u,onCopyId:x}=e,{dictionary:h}=(0,p.s)(),{languageAndRegion:f}=(0,r.C)(),v=((null==f||null==(a=f.languageAndCountry)?void 0:a.country)||"").toUpperCase(),b=m&&(0,P.wv)(v),j=(0,P.wv)(v);return(0,s.jsxs)("div",{className:"mb-6 [&_span]:mr-1 group",children:[(0,s.jsxs)("h1",{className:"mt-0 mb-2 text-base leading-[26px] tracking-[3px] font-light uppercase",children:[o,(0,s.jsx)(L.V,{title:"Copy to clipboard",children:(0,s.jsx)("i",{className:"icon icon-clipboard inline-block ml-3 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity duration-300 ease-in-out",onClick:u})})]}),(0,s.jsxs)("div",{className:"flex mb-3 opacity-55",children:[(0,s.jsx)("span",{className:"flex-[2] text-sm font-normal cursor-pointer",children:null==(t=h.trackMetaInfo)?void 0:t.name}),(0,s.jsx)("span",{className:"flex-1 text-sm font-normal",children:null==(l=h.trackMetaInfo)?void 0:l.pro}),(0,s.jsx)("span",{className:"flex-1 text-sm font-normal",children:null==(i=h.trackMetaInfo)?void 0:i.ipi}),j&&(0,s.jsx)("span",{className:"flex-[1.2] text-sm font-normal",children:null==(n=h.trackMetaInfo)?void 0:n.share}),!j&&(0,s.jsx)("span",{className:"flex-[1.2]",children:"\xa0"}),b&&(0,s.jsx)("span",{className:"flex-1 text-sm font-normal",children:null==(c=h.trackMetaInfo)?void 0:c.role}),!b&&(0,s.jsx)("span",{className:"flex-1",children:"\xa0"})]}),d.map((e,a)=>(0,s.jsxs)("div",{className:"flex mb-2 opacity-85",children:[(0,s.jsx)("span",{className:"flex-[2] text-sm font-normal cursor-pointer",onClick:()=>x(e.id,"trackInfoCopy"),children:e.name}),(0,s.jsx)("span",{className:"flex-1 text-sm font-normal",children:e.pro}),(0,s.jsx)("span",{className:"flex-1 text-sm font-normal",children:e.ipi}),j&&(0,s.jsx)("span",{className:"flex-[1.2] text-sm font-normal",children:e.share}),!j&&(0,s.jsx)("span",{className:"flex-[1.2]",children:"\xa0"}),b&&(0,s.jsx)("span",{className:"flex-1 text-sm font-normal",children:e.capacity||""}),!b&&(0,s.jsx)("span",{className:"flex-1",children:"\xa0"})]},a))]})}function V(e){var a,t,l,r,i,n,c;let{track:o,composers:d,publishers:m,isrc:u,iswc:x,labelCode:h}=e,{dictionary:f}=(0,p.s)(),{copyToClipboard:v}=A(),b=o.FileName||o.Name;return(0,s.jsxs)("div",{className:"pl-0 lg:pl-4 w-full lg:w-1/2",children:[o.ReleaseDate&&(0,s.jsx)(S,{title:null==(a=f.trackMetaInfo)?void 0:a.releaseDate,onCopy:()=>v(o.ReleaseDate,"releaseDateInfoCopy"),children:(0,s.jsx)("div",{className:"text-sm font-normal",children:(e=>{if(!e)return"";let a=new Date(e),t=String(a.getDate()).padStart(2,"0"),s=String(a.getMonth()+1).padStart(2,"0"),l=a.getFullYear();return"".concat(l,"-").concat(s,"-").concat(t)})(o.ReleaseDate)})}),d&&d.length>0&&(0,s.jsx)(E,{title:null==(t=f.trackMetaInfo)?void 0:t.composers,composers:d,showRole:!0,onCopy:()=>v(d.map(e=>"".concat(e.name," (").concat(e.pro,") [").concat(e.ipi,"] ").concat(e.share)).join("\n"),"composerInfoCopy"),onCopyId:v}),m&&m.length>0&&(0,s.jsx)(E,{title:null==(l=f.trackMetaInfo)?void 0:l.publishers,composers:m,showRole:!1,onCopy:()=>v(m.map(e=>"".concat(e.name," (").concat(e.pro,") [").concat(e.ipi,"] ").concat(e.share)).join("\n"),"publisherInfoCopy"),onCopyId:v}),u&&(0,s.jsx)(S,{title:null==(r=f.trackMetaInfo)?void 0:r.isrc,onCopy:()=>v(u,"isrcInfoCopy"),children:(0,s.jsx)("div",{className:"text-sm font-normal",children:u})}),x&&(0,s.jsx)(S,{title:null==(i=f.trackMetaInfo)?void 0:i.iswc,onCopy:()=>v(x,"iswcInfoCopy"),children:(0,s.jsx)("div",{className:"text-sm font-normal",children:x})}),h&&(0,s.jsx)(S,{title:null==(n=f.trackMetaInfo)?void 0:n.labelCode,onCopy:()=>v(h,"labelCodeInfoCopy"),children:(0,s.jsx)("div",{className:"text-sm font-normal",children:h})}),b&&(0,s.jsx)(S,{title:null==(c=f.trackMetaInfo)?void 0:c.fileName,onCopy:()=>v(b,"fileNameInfoCopy"),children:(0,s.jsx)("div",{className:"text-sm font-normal break-all",children:b})})]})}function F(e){let{track:a}=e,{composers:t,publishers:r,isrc:i,iswc:n,labelCode:c,codes:o,genre:d,keywords:m,instrumentation:u}=(0,l.useMemo)(()=>{let e=[],t=[];a.RightHolders&&Array.isArray(a.RightHolders)&&a.RightHolders.forEac
1h(a=>{var s,l;let r=C[(null==(l=a.Capacity)?void 0:l.toLowerCase())||""]||"",i=a.OwnerPerformanceShare?"".concat(parseFloat(a.OwnerPerformanceShare).toFixed(2),"%"):"0.00%";r?e.push({name:[a.FirstName,a.MiddleName,a.LastName].filter(Boolean).join(" "),pro:a.CollectingSociety||"",ipi:a.IPI||"",share:i,capacity:r,id:a.ID||""}):(null==(s=a.Capacity)?void 0:s.toLowerCase())==="original publisher"&&t.push({name:a.Name||"",pro:a.CollectingSociety||"",ipi:a.IPI||"",share:a.CollectionPerformanceShare?"".concat(parseFloat(a.CollectionPerformanceShare).toFixed(2),"%"):i,id:a.ID||""})});let s="",l="",r="";a.Codes&&Array.isArray(a.Codes)&&a.Codes.forEach(e=>{var a;let t=null==(a=e.AttributeTypeName)?void 0:a.toLowerCase();"isrc"===t&&e.Value?s=e.Value:"iswc"===t&&e.Value?l=e.Value:"lc code"===t&&e.Value&&(r=e.Value)});let i=[];if(a.Categories&&Array.isArray(a.Categories)){let e=a.Categories.find(e=>{var a;return"118c4e3ecf7ffbf3"===e.ID||(null==(a=e.Type)?void 0:a.toLowerCase())==="key"});e&&e.Attributes&&e.Attributes.forEach(e=>{i.push({codeName:e.Name,id:e.ID})})}let n=(0,w.W)(a.Genre,"genre"),c=(0,w.W)(a.Keywords,"keywords"),o=(0,w.W)(a.Instrumentation,"instrumentation");return{composers:e,publishers:t,isrc:s,iswc:l,labelCode:r,codes:i,genre:n,keywords:c,instrumentation:o}},[a]);return(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row font-normal text-font-main",children:[(0,s.jsx)(M,{track:a,genre:d,keywords:m,instrumentation:u,codes:o}),(0,s.jsx)(V,{track:a,composers:t,publishers:r,isrc:i,iswc:n,labelCode:c})]})}var R=t(58055);let B=e=>e.replace(/^"|"$/g,"").trim();function O(e){var a,t,r,i;let{track:n}=e,{dictionary:o}=(0,p.s)(),{copyToClipboard:d}=A(),m=(0,c.useSearchParams)(),u=null!=(i=n.Lyrics)?i:"",x=(0,l.useMemo)(()=>{var e;let a=function(e){var a,t;let s=/lyrics:\(([^)]*)\)/i,l=null==(t=e.get("searchTerm"))||null==(a=t.match(s))?void 0:a[1];if(l)return l;for(let a of e.getAll("typed")){let e=a.match(s);if(null==e?void 0:e[1])return e[1]}return null}(m),t=null!=(e=m.get(R.uc))?e:"";return a||t.trim().length>0?B(null!=a?a:t):""},[m]),h=(0,l.useMemo)(()=>{let e=B(x);if(!e)return null;let a=RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"),t=Array.from(u.matchAll(a));if(0===t.length)return null;let l=[],r=0;for(let e of t){var i,n;let a=null!=(i=e.index)?i:0,t=null!=(n=e[0])?n:"";l.push(u.slice(r,a)),l.push((0,s.jsx)("span",{className:"highlight",children:t},"".concat(a,"-").concat(t,"-").concat(l.length))),r=a+t.length}return l.push(u.slice(r)),l},[x,u]);return n.Lyrics?(0,s.jsxs)("div",{className:"flex flex-col items-center w-full h-full min-h-[300px] text-font-main",children:[(0,s.jsx)("div",{className:"flex gap-2 mb-4 mt-2",children:(0,s.jsx)(L.V,{title:null==(t=o.track)||null==(a=t.tooltip)?void 0:a.copyLyrics,children:(0,s.jsx)("i",{className:"icon icon-clipboard cursor-pointer text-base transition-transform hover:scale-150 duration-300",onClick:()=>{n.Lyrics&&d(n.Lyrics,"lyricsInfoCopy")}})})}),n.IsExplicit&&(0,s.jsx)("span",{className:"mb-4 border border-font-main px-2 py-0.5 rounded-md font-bold uppercase text-xs italic",children:null==(r=o.track)?void 0:r.explicitLyrics}),h?(0,s.jsx)("p",{className:"whitespace-pre-wrap text-center w-full text-base",children:h}):(0,s.jsx)("p",{className:"whitespace-pre-wrap text-center w-full text-base",children:u})]}):null}var _=t(90916);function z(e){let{track:a,isModal:t=!1,downloadSourceContext:l}=e,r=a.AlternateTracks||[];return r.length?(0,s.jsx)("div",{className:"w-full h-full text-font-main",children:(0,s.jsx)(_.A,{tracks:r,loadingMore:!1,view:v.XP.TrackDetails,isDetailsTrack:!0,isVersionTrack:!0,allowSimilarSearch:!0,showTrackCount:!1,detailView:t?"modal":"page",downloadSourceContext:l})}):null}var U=t(87479),H=t(59094),W=t(57269),K=t(62717),G=t(52570),X=t(30466);let q=e=>{var a;let{track:t,isModal:l=!1,downloadSourceContext:i}=e,{locale:n,dictionary:o}=(0,p.s)(),d=(0,c.useRouter)(),{similarTracks:m,isLoading:u}=(0,W.n)(t.ID),x=(0,r.C)(e=>e.search.setSearchState),h=(0,r.C)(e=>e.detailsModal.closeDetailsModal),f=()=>{if("undefined"==typeof document)return;document.body.scrollTop=0,document.documentElement.scrollTop=0;let e=document.querySelector(".main-content-wrap");e instanceof HTMLElement&&(e.scrollTop=0)};return(0,s.jsx)("div",{className:"w-full h-full text-font-main",children:u?(0,s.jsx)(X.f,{count:3}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.A,{tracks:m,loadingMore:!1,view:v.XP.TrackDetail
1s,isVersionTrack:!1,isDetailsTrack:!0,isSimilarSearch:!0,showTrackCount:!1,detailView:l?"modal":"page",downloadSourceContext:(null==i||null==(a=i.sourceType)?void 0:a.length)?{...i,sourceId:t.ID}:void 0}),(0,s.jsxs)("div",{className:"flex gap-1.5 cursor-pointer justify-center mt-3 text-white",onClick:()=>{let e=(t.Name||t.DisplayTitle||t.Title||"").trim(),a=t.ID?String(t.ID):"";if(!e||!a)return;x("searchSimilar",{trackId:a,trackName:e,view:"track"}),h(),f();let s=new URLSearchParams;s.set("searchSimilarId",a),s.set("searchSimilarName",e),d.push("/".concat(n,"/search/tracks?").concat(s.toString()),{scroll:!0}),requestAnimationFrame(()=>{f()})},children:[(0,s.jsx)("span",{className:"hover:underline",children:o.track.similarTracksMore}),(0,s.jsx)("i",{className:"icon icon-dropdown -rotate-90 text-lg"})]})]})})};var $=t(40656),Y=t(45013);function J(){let e=sessionStorage.getItem("trackDetailsOpenTab");return sessionStorage.removeItem("trackDetailsOpenTab"),e||"keywords"}function Q(e){let{trackId:a,isModal:t=!1,onNotFound:n}=e,{dictionary:o,locale:d}=(0,p.s)(),m=(0,c.useRouter)(),u=(0,r.C)(e=>e.tracks.setSelectedTrack),x=(0,r.C)(e=>e.tracks.selectedTrack),h=(0,l.useRef)(x),{downloadStems:f}=(0,H.K)(x),[v,b]=(0,l.useState)(x),[y,g]=(0,l.useState)(!x),[N,w]=(0,l.useState)(!1),[C,I]=(0,l.useState)(!1),[A,S]=(0,l.useState)(J),[T,D]=(0,l.useState)(!0),[M,L]=(0,l.useState)("");(0,l.useEffect)(()=>{L(sessionStorage.getItem("detailsModalOriginalPage")||"")},[]);let P=(0,Y.gN)(a,M),E=t?{...P,sourceType:[...P.sourceType,$.eH.TRACK_DETAILS]}:P,{similarTracks:V,isLoading:R,toggleSimilar:B,clearSimilar:_}=(0,W.n)((null==v?void 0:v.ID)||"");(0,l.useEffect)(()=>()=>{t&&_()},[t,_]);let X=async e=>{S(e),"similar"===e&&await B()};return((0,l.useEffect)(()=>{"similar"!==A||R||0!==V.length||(S("keywords"),D(!1))},[V,R,A]),(0,l.useEffect)(()=>{(async()=>{let e=!!h.current;e||g(!0),w(!1),I(!1);try{var s;let l=null==(s=(await i.A.getTrackVersions(a,t)).Tracks)?void 0:s[0];l?(b(l),u(l)):e||I(!0)}catch(a){console.error(a),e||w(!0)}finally{g(!1)}})()},[a,u]),(0,l.useEffect)(()=>{C&&a&&(null==n||n(),m.replace("/".concat(d,"/not-found?type=track&id=").concat(encodeURIComponent(a))))},[C,a,d,m,n]),y||N||C||!v)?(0,s.jsx)(G.TL,{}):(0,s.jsx)(U.A,{isModal:t,header:(0,s.jsx)(j,{track:v,isModal:t,downloadSourceContext:E}),body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{track:v,activeTab:A,onTabChange:X,similarTracks:V,similarLoading:R,showSimilarTab:T,className:"pb-8"}),(0,s.jsxs)("div",{className:"flex-1",children:["keywords"===A&&(0,s.jsx)(F,{track:v}),"versions"===A&&(0,s.jsx)(z,{track:v,isModal:t,downloadSourceContext:E}),"stems"===A&&(0,s.jsxs)("div",{className:"min-h-[300px] flex flex-col items-center gap-10",children:[(0,s.jsx)("p",{className:"text-center text-font-main cursor-default",children:o.trackMetaInfo.stemComingSoonMessage}),(0,s.jsx)(K.A,{variant:"btn-secondary",label:o.trackMetaInfo.stemPackDownload,onClick:f,loading:!1})]}),"lyrics"===A&&(0,s.jsx)(O,{track:v}),"similar"===A&&(0,s.jsx)(q,{track:v,isModal:t,downloadSourceContext:E})]})]})})}},46594:(e,a,t)=>{t.d(a,{kO:()=>l,lH:()=>r,wv:()=>i});var s=t(14781);let l=e=>{if(e&&e.Name){let a=-1!==e.Name.lastIndexOf("-")?e.Name.lastIndexOf("-")+1:e.Name.length-3;return e.Name.substring(a).toUpperCase().trim()}return""};function r(e){let a="us";
1return e&&(a=s.cm.includes(e)||s.t.includes(e)||s.qU.includes(e)?"au":s.DO[e.toLowerCase()]||a),a}function i(e){let a=r(e).toUpperCase();return!s.ds.includes(a)}},48483:(e,a,t)=>{t.d(a,{A:()=>x});var s=t(95155),l=t(12115),r=t(51431),i=t(25611),n=t(2821),c=t(35394);function o(e){let a=Math.max(0,parseInt(String(null!=e?e:""),10));if(!Number.isFinite(a))return"00:00";let t=Math.floor(a/3600),s=String(Math.floor(a%3600/60)).padStart(2,"0"),l=String(a%60).padStart(2,"0");return t>0?"".concat(t,":").concat(s,":").concat(l):"".concat(s,":").concat(l)}let d=e=>{let{durationSec:a,leftSpacerPx:t=75}=e,r=(0,l.useRef)(null),[i,c]=(0,l.useState)(0);(0,l.useEffect)(()=>{let e=r.current;if(!e)return;let a=()=>c(e.getBoundingClientRect().width);a();let t=new ResizeObserver(a);return t.observe(e),window.addEventListener("resize",a),()=>{t.disconnect(),window.removeEventListener("resize",a)}},[]);let d=(0,l.useMemo)(()=>{let e=Math.max(0,Number.isFinite(a)?a:0);if(!e||!i)return[{timeSec:0,leftPx:0,type:"boundary"},{rightBoundary:!0,type:"boundary"}];let t=i/e,{interval:s,spike:l}=function(e){return e<80?{interval:10,spike:30}:e<240?{interval:30,spike:60}:e<600?{interval:60,spike:120}:{interval:180,spike:360}}(e),r=[];r.push({timeSec:0,leftPx:0,type:"boundary"});for(let a=s;a<e;a+=s){let s=a%l==0,i=s&&a+5<e;r.push({timeSec:i?a:void 0,leftPx:a*t,type:s?"large":"small"})}return r.push({rightBoundary:!0,type:"boundary"}),r},[a,i]),m=o(a);return(0,s.jsxs)("div",{className:(0,n.A)("relative mt-4 flex h-[30px]"),children:[(0,s.jsx)("div",{className:"relative h-[30px] border-b-2",style:{minWidth:t,width:Math.max(40,t-15)}}),(0,s.jsxs)("div",{ref:r,className:"relative h-[30px] flex-1 max-w-full border-b-2 border-font-main-85",children:[(0,s.jsx)("div",{className:"absolute -left-[40px] top-[28px] h-[2px] w-[40px] bg-primary"}),d.map((e,t)=>{var l;let r="boundary"===e.type?"h-4 w-[2px]":"large"===e.type?"h-4 w-[1px]":"h-2 w-[1px]",i=e.rightBoundary?{right:0}:{left:"".concat(null!=(l=e.leftPx)?l:0,"px")},n=!!e.rightBoundary,c="number"==typeof e.timeSec&&0===e.timeSec;return(0,s.jsxs)("div",{className:"".concat("absolute bottom-0 bg-font-main-85"," ").concat(r),style:i,children:[c&&(0,s.jsx)("span",{className:"absolute -top-[19px] -left-[14px] text-[12px] font-bold italic text-font-main-85",children:o(0)}),n&&a>0&&(0,s.jsx)("span",{className:"absolute -top-[19px] -left-[14px] text-[12px] font-bold italic text-font-main-85",children:m}),!c&&!n&&"number"==typeof e.timeSec&&(0,s.jsx)("span",{className:"absolute -top-[19px] -left-[14px] text-[12px] font-bold italic text-font-main-85",children:o(e.timeSec)})]},t)})]})]})};var m=t(85886),u=t(73326),p=t(18372);let x=e=>{let{track:a,className:t,isMusicMatcherTrack:l}=e,{dictionary:o}=(0,u.s)(),{playPauseTrack:x,isCurrentPlaying:h}=(0,c.o)(),f=(0,p.C)(e=>e.musicMatcher.isMusicMatcherOpen);return(0,s.jsxs)("div",{className:"w-full sm:ml-10",children:[(0,s.jsxs)("div",{className:(0,n.A)("flex w-full gap-4 items-center",t),children:[(0,s.jsx)("i",{className:(0,n.A)(h(a.ID)?"icon icon-pause":"icon icon-play","cursor-pointer border border-gray-55 rounded-full p-3 mr-5"),onClick:()=>{x(a)}}),(0,s.jsx)(r.A,{trackViewConfiguration:{largeView:!1,primaryComponent:i.Bs.Waveform,secondaryComponent:i.Bs.Waveform,labelName:!1,length:!0,bpm:!1},track:a,durationMs:1e3*a.LengthSeconds||void 0,trimmable:!0,isMusicMatcherTrack:l})]}),!f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d,{durationSec:+a.LengthSeconds}),(0,s.jsxs)("div",{className:"flex items-end",children:[(0,s.jsx)(m.A,{hoverTransitionClasses:"text-left mt-4",trackViewConfiguration:{largeView:!1,primaryComponent:i.Bs.Waveform,secondaryComponent:i.Bs.Waveform,labelName:!1,length:!0,bpm:!1},track:a}),(0,s.jsx)("span",{className:"ml-1",children:o.track.min})]})]})]})}},52570:(e,a,t)=>{t.d(a,{TL:()=>n});var s=t(95155),l=t(51617);let r=()=>(0,s.jsxs)("div",{className:"flex flex-col space-x-4 p-4 flex-1",children:[(0,s.jsxs)("div",{className:"flex mb-4 flex-wrap gap-4",children:[(0,s.jsx)(l.f,{className:"w-[180px] h-[15px]"}),(0,s.jsx)(l.f,{className:"w-[250px] h-[15px] sm:ml-auto"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,s.jsx)(l.f,{className:"w-[200px] h-[200px]"}),(0,s.jsxs)("div",{className:"flex flex-col space-y-2 flex-1",children:[(0,s.jsx)(l.f,{className:"w-[50px] h-[15px] mb-4"}),(0,s.jsx)(l.f,{className:"w-full sm:w-[500px] h-[30px] mb-4"}),(0,s.jsx)(l.f,{className:"w-full sm:w-[400px] h-[15px]"}),(0,s.jsx)(l.f,{className:"w-[250px] h-[15px] mb-4"}),(0,s.jsx)(l.f,{className:"w-[250px] h-[15px]"})]})]})]}),i=()=>(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(l.f,{className:"w-[200px] h-[20px] mb-10"}),(0,s.jsx)(l.f,{className:"w-full h-[400px]"})]}),n=()=>(0,s.jsxs)("div",{children:[(0,s.jsx)(r,{}),(0,s.jsx)(i,{})]})},83984:(e,a,t)=>{t.d(a,{A:()=>T});var s=t(95155),l=t(73326),r=t(78383),i=t(84405),n=t(70163),c=t(44300),o=t(25611),d=t(2821),m=t(2748),u=t(32302),p=t(62501),x=t(52619),h=t.n(x),f=t(20063),v=t(12115),b=t(78860),j=t(79797),y=t(84639),g=t(4644),N=t(42177),k=t(70900);let w=e=>{let{track:a,album:t,type:r}=e,{dictionary:i}=(0,l.s)(),{loading:c,getGeneratedCueSheet:o}=function(e){let{showToaster:a}=(0,y._k)(),{dictionary:t}=(0,l.s)(),[s,r]=(0,v.useState)(!1);function i(e){(0,N.u)(e),a({type:"error",message:t.toaster.error.copyCancel,anchorOrigin:{vertical:"bottom",horizontal:"center"}})}return{loading:s,getGeneratedCueSheet:async function(){var s;let l=(0,k.e)(e.type,e);if(!l)return void i(Error("Invalid cuesheet payload"));if(!(null==(s=navigator)?void 0:s.clipboard))return void i(Error("Clipboard API not available."));let n="album"===e.type?t.toaster.success.albumInfoCopy:t.toaster.success.trackInfoCopy;r(!0);let c=g.A.getGeneratedCuesheet(l.fileName,l.body).then(e=>{let{FullUrl:a}=e;return fetch(a)}).then(async e=>{if(!e.ok)throw Error("Failed to fetch the cuesheet content.");return new Blob([function(e){let a=e.split("\n").map(e=>e.split('","')),t=a.shift();return t?a.filter(e=>e.length===t.length).map(e=>t.map((a,t)=>(a.trim()+": "+e[t].trim()+"\n").replace(/"/g,"")).join("")).join("\n"):""}(await e.text())],{type:"text/plain"})});try{await navigator.clipboard.write([new ClipboardItem({"text/plain":c})]),a({type:"info",message:n,icon:(0,v.createElement)("span",{className:"icon icon-cl
1ipboard text-base"}),showCloseIcon:!1,anchorOrigin:{vertical:"bottom",horizontal:"center"}})}catch(e){i(e)}finally{r(!1)}}}}({type:r,track:a,album:t}),m="track"===r&&!a||"album"===r&&!t;return(0,s.jsx)(n.V,{title:i.track.tooltip.clipboard,children:(0,s.jsx)("button",{type:"button","aria-label":i.track.tooltip.clipboard,onClick:o,disabled:m||c,"aria-busy":c,className:(0,d.A)("relative flex h-6 w-6 items-center justify-center cursor-pointer disabled:cursor-not-allowed"),children:(0,s.jsx)("i",{className:(0,d.A)("icon icon-magnify cursor-pointer",{"icon-spinner":c,"icon-clipboard":!c,"opacity-40 cursor-not-allowed":m})})})})};var C=t(96967),I=t(18372),A=t(40656);let S=e=>(0,d.A)("opacity-100 cursor-pointer",e||"text-background-1"),T=e=>{let{track:a,view:t,className:d,album:x,sourceContextOverride:v}=e,{dictionary:y,locale:g}=(0,l.s)(),{addTrackToPlaylist:N,addAlbumToPlaylist:k}=(0,p.m)(),{setNewActivePlaylist:T}=(0,m.W)(),{shouldShowRemoveFromActive:D,shouldHideAddToPlaylist:M}=(0,u.s)({track:a?[a]:void 0,view:null!=t?t:o.XP.MusicPlayer}),{setSearchState:L}=(0,I.C)(e=>e.search),P=(0,f.useRouter)(),E=x||a,V=t===o.XP.MusicPlayer&&a?{sourceType:[A.eH.PLAYER]}:null!=v?v:{sourceType:[A.eH.CONTENTFUL_ALBUM_LIST,a?A.eH.TRACK_DETAILS:A.eH.ALBUM_DETAILS]};return(0,s.jsxs)("div",{className:"flex items-center gap-5 text-background-1 ".concat(d),children:[D&&a&&(0,s.jsx)(i.A,{track:[a],useActivePlaylist:!0,overrideClasses:S(d)}),!D&&!M&&(0,s.jsx)(r.A,{overrideClasses:S(d),onToggleActivePlaylist:(e,a)=>T(e.ID,a,e),onAddToPlaylist:e=>x?k([e.ID],x,e.Name):a?N([e.ID],[a],e.Name):void 0,track:a?[a]:void 0,album:x}),t!==o.XP.TrackDetails&&a&&(0,s.jsx)(n.V,{title:y.track.tooltip.similar,children:(0,s.jsx)("button",{type:"button",onClick:()=>{if(!a)return;let e=a.ID?String(a.ID):"",t=(a.Name||a.DisplayTitle||a.Title||"").trim();if(!e||!t)return;L("searchSimilar",{trackId:e,trackName:t,view:"track"});let s=new URLSearchParams;s.set("searchSimilarId",e),s.set("searchSimilarName",t),P.push("/".concat(g,"/search/tracks?").concat(s.toString()))},className:"icon icon-similar icon-magnify cursor-pointer","aria-label":y.track.tooltip.similar})}),(0,s.jsx)(b.A,{track:a?[a]:[],album:x,type:x?"album":"track",overrideIconClasses:"opacity-100",overridePopupClasses:"z-1301",sourceContext:V}),t!==o.XP.TrackDetails&&(0,s.jsxs)(s.Fragment,{children:[a&&(0,s.jsx)(C.x,{track:a}),(0,s.jsx)(c.A,{item:E,type:x?"Album":"Track",overrideClasses:"opacity-100"})]}),(0,s.jsx)(w,{type:x?"album":"track",track:a,album:x}),t===o.XP.TrackDetails&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.J,{type:x?"album":"track",track:a,album:x,className:"h-6 w-6"}),(0,s.jsx)(c.A,{item:E,type:x?"Album":"Track",overrideClasses:"opacity-100"})]}),(0,s.jsx)(n.V,{title:y.track.tooltip.license,children:(0,s.jsx)(h(),{href:"/".concat(g,"/licensing/licensing"),className:"icon icon-cart icon-magnify cursor-pointer"})})]})}},87479:(e,a,t)=>{t.d(a,{A:()=>n});var s=t(95155),l=t(2821);let r=e=>{let{children:a}=e;return(0,s.jsx)("div",{className:"px-4 sm:px-6 lg:px-10 py-6 sm:py-8 lg:py-10 bg-gradient-to-br from-secondary-3-very-dark to-secondary-4-very-dark",children:a})};function i(e){let{children:a}=e;return(0,s.jsxs)("div",{className:"relative min-h-[300px]",children:[(0,s.jsx)("div",{className:"bg-linear-dark absolute inset-0 overflow-hidden opacity-90"}),a]})}function n(e){let{header:a,body:t,isModal:n=!1}=e;return(0,s.jsxs)("div",{className:(0,l.A)("max-w-[1400px]",n?"w-full":"w-[85%]"),children:[(0,s.jsx)(i,{children:a}),(0,s.jsx)(r,{children:t})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.