From fd17763ca3d5cadb9ec24084042a95f292174223 Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Sun, 22 Nov 2020 17:49:29 +0100 Subject: [PATCH] refactor: moved all track preview logic in its component --- public/js/bundle.js | 16 ++++++++-------- src/components/globals/PreviewControls.vue | 10 +++------- src/components/globals/TheTrackPreview.vue | 14 +++++++++++++- src/components/pages/Charts.vue | 6 ++---- src/components/pages/Favorites.vue | 6 ++---- src/components/pages/LinkAnalyzer.vue | 3 --- src/components/pages/Search.vue | 1 - src/components/pages/Tracklist.vue | 8 ++------ src/components/search/ResultsTracks.vue | 6 ++---- 9 files changed, 32 insertions(+), 38 deletions(-) diff --git a/public/js/bundle.js b/public/js/bundle.js index 74f2fe7..396169e 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -2463,7 +2463,7 @@ a { `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var BaseLoadingPlaceholder=__vue_normalize__({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,{},__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,__vue_create_injector__);function sendAddToQueue(e,n=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");socket.emit("addToQueue",{url:e,bitrate:n},()=>{})}function aggregateDownloadLinks(e){let n=[];return e.forEach(a=>{n.push(a.link)}),n.join(";")}var Downloads={sendAddToQueue};function generatePath(e){if(!e)throw new Error("No element passed to the generatePath function!");let n=[e];for(;(e=e.parentNode)&&e!==document;)n.push(e);return n}function isValidURL(e){let n=e.toLowerCase();if(n.startsWith("http")){if(n.indexOf("deezer.com")>=0||n.indexOf("deezer.page.link")>=0||n.indexOf("open.spotify.com")>=0||n.indexOf("link.tospotify.com")>=0)return!0}else if(n.startsWith("spotify:"))return!0;return!1}function convertDuration(e){let n,a;return n=Math.floor(e/60),a=e-n*60,a<10&&(a="0"+a),n+":"+a}function convertDurationSeparated(e){let n,a,r;return a=Math.floor(e/60),n=Math.floor(a/60),r=e-a*60,a-=n*60,[n,a,r]}function numberWithDots(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function debounce(e,n,a){var r;return function(){var i=this,s=arguments,l=function(){r=null,a||e.apply(i,s)},c=a&&!r;clearTimeout(r),r=setTimeout(l,n),c&&e.apply(i,s)}}function copyToClipboard(e){const n=document.createElement("input");document.body.appendChild(n),n.setAttribute("type","text"),n.setAttribute("value",e),n.select(),n.setSelectionRange(0,99999),document.execCommand("copy"),n.remove()}function getPropertyWithFallback(e,...n){for(const a of n){let r=/\./.test(a),i=r?a.split(".").reduce((s,l)=>{if(s)return s[l]},e):e[a];if(typeof i!="undefined")return i}return null}var Utils={isValidURL,convertDuration,convertDurationSeparated,numberWithDots,debounce};const downloadQualities=[{objName:"flac",label:"FLAC",value:9},{objName:"320kbps",label:"MP3 320kbps",value:3},{objName:"128kbps",label:"MP3 128kbps",value:1},{objName:"realityAudioHQ",label:"360 Reality Audio [HQ]",value:15},{objName:"realityAudioMQ",label:"360 Reality Audio [MQ]",value:14},{objName:"realityAudioLQ",label:"360 Reality Audio [LQ]",value:13}];var script={data(){return{menuOpen:!1,xPos:0,yPos:0,deezerHref:"",generalHref:"",imgSrc:""}},computed:{options(){const e={cut:{label:this.$t("globals.cut"),show:!1,position:1,action:()=>{document.execCommand("Cut")}},copy:{label:this.$t("globals.copy"),show:!1,position:2,action:()=>{document.execCommand("Copy")}},copyLink:{label:this.$t("globals.copyLink"),show:!1,position:3,action:()=>{copyToClipboard(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{copyToClipboard(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{copyToClipboard(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(a=>{document.execCommand("insertText",void 0,a)}):document.execCommand("paste")}}};let n=Object.values(e).length+1;return downloadQualities.forEach((a,r)=>{e[a.objName]={label:`${this.$t("globals.download",{thing:a.label})}`,show:!1,position:n+r,action:sendAddToQueue.bind(null,this.deezerHref,a.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,n)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,downloadQualities.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,n){this.xPos=`${e}px`,this.yPos=`${n}px`,this.$nextTick().then(()=>{const{innerHeight:a,innerWidth:r}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,s=n+this.$refs.contextMenu.getBoundingClientRect().height;if(i>r){const l=i-r+15;this.xPos=`${e-l}px`}if(s>a){const l=s-a+15;this.yPos=`${n-l}px`}})},showDeezerOptions(){this.options.copyDeezerLink.show=!0,downloadQualities.forEach(e=>{this.options[e.objName].show=!0})}}};const __vue_script__=script;var __vue_render__$1=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.menuOpen,expression:"menuOpen"}],ref:"contextMenu",staticClass:"context-menu",style:{top:e.yPos,left:e.xPos}},e._l(e.sortedOptions,function(r){return a("button",{directives:[{name:"show",rawName:"v-show",value:r.show,expression:"option.show"}],key:r.label,staticClass:"btn menu-option",on:{click:function(i){return i.preventDefault(),r.action(i)}}},[a("span",{staticClass:"menu-option__text"},[e._v(e._s(r.label))])])}),0)},__vue_staticRenderFns__$1=[];const __vue_inject_styles__$1=function(e){if(!e)return;e("data-v-69d14104_0",{source:".context-menu[data-v-69d14104]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--secondary-background);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-69d14104]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-69d14104]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-69d14104]{text-transform:capitalize}button[data-v-69d14104]{color:var(--primary-text);color:unset;background-color:var(--primary-color);background-color:unset;min-width:unset;position:unset;border:unset;border-radius:unset;font-family:unset;font-weight:unset;font-size:unset;padding:unset;margin-right:unset;height:unset;text-transform:unset;cursor:unset;transition:unset}button[data-v-69d14104]:focus{outline:0}button[data-v-69d14104]:active{background-color:unset;transform:unset}button[data-v-69d14104]:hover{background:unset;border:unset}",map:void 0,media:void 0})},__vue_scope_id__$1="data-v-69d14104",__vue_module_identifier__$1=void 0,__vue_is_functional_template__$1=!1;function __vue_normalize__$1(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};o.__file="TheContextMenu.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(n&&(u=function(d){n.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(m,h){return u.call(h),d(m,h)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$1(){const e=document.head||document.getElementsByTagName("head")[0],n=__vue_create_injector__$1.styles||(__vue_create_injector__$1.styles={}),a=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=a?s.media||"default":i,c=n[l]||(n[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),a&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),a&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(a&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheContextMenu=__vue_normalize__$1({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,__vue_create_injector__$1),EventBus=new Vue;async function adjustVolume(e,n,{duration:a=1e3,easing:r=swing,interval:i=13}={}){const s=e.volume,l=n-s;if(!l||!a||!r||!i)return e.volume=n,Promise.resolve();const c=Math.floor(a/i);let o=1;return new Promise(u=>{const d=setInterval(()=>{e.volume=s+r(o/c)*l,++o===c&&(clearInterval(d),u())},i)})}function swing(e){return .5-Math.cos(e*Math.PI)/2}var script$1={data:()=>({previewStopped:!1}),computed:{...mapGetters({previewVolume:"getPreviewVolume"})},mounted(){this.$refs.preview.volume=1,this.$router.beforeEach((e,n,a)=>{this.stopStackedTabsPreview(),a()}),EventBus.$on("trackPreview:playPausePreview",this.playPausePreview),EventBus.$on("trackPreview:previewMouseEnter",this.previewMouseEnter),EventBus.$on("trackPreview:previewMouseLeave",this.previewMouseLeave)},methods:{async onCanPlay(){await this.$refs.preview.play(),this.previewStopped=!1,await adjustVolume(this.$refs.preview,this.previewVolume/100,{duration:500})},async onTimeUpdate(){if(isNaN(this.$refs.preview.duration))return;let e=this.$refs.preview.duration;if(isFinite(e)||(e=30),e-this.$refs.preview.currentTime>=1)return;if(this.previewStopped)return;await adjustVolume(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,document.querySelectorAll("a[playing] > .preview_controls").forEach(n=>{n.style.opacity=0}),document.querySelectorAll("*").forEach(n=>{n.removeAttribute("playing")}),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(n=>{n.textContent="play_arrow"})},async playPausePreview(e){e.preventDefault(),e.stopPropagation();const{currentTarget:n}=e;var a=n.tagName=="I"?n:n.querySelector("i");n.hasAttribute("playing")?this.$refs.preview.paused?(this.$refs.preview.play(),this.previewStopped=!1,a.innerText="pause",await adjustVolume(this.$refs.preview,this.previewVolume/100,{duration:500})):(this.previewStopped=!0,a.innerText="play_arrow",await adjustVolume(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause()):(document.querySelectorAll("*").forEach(r=>{r.removeAttribute("playing")}),n.setAttribute("playing",!0),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(r=>{r.textContent="play_arrow"}),document.querySelectorAll(".preview_controls").forEach(r=>{r.style.opacity=0}),a.innerText="pause",a.style.opacity=1,this.previewStopped=!1,await adjustVolume(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),document.getElementById("preview-track_source").src=n.getAttribute("data-preview"),this.$refs.preview.load())},async stopStackedTabsPreview(){let e=Array.prototype.slice.call(document.querySelectorAll(".preview_playlist_controls[playing]"));if(e.length===0)return;await adjustVolume(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),this.previewStopped=!0,e.forEach(n=>{n.removeAttribute("playing"),n.innerText="play_arrow"})},previewMouseEnter(e){e.currentTarget.style.opacity=1},previewMouseLeave(e){const{currentTarget:n}=e,a=n.parentElement.hasAttribute("playing");(a&&this.previewStopped||!a)&&(n.style.opacity=0)}}};const __vue_script__$1=script$1;var __vue_render__$2=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("audio",{ref:"preview",attrs:{id:"preview-track"},on:{canplay:e.onCanPlay,timeupdate:e.onTimeUpdate}},[a("source",{attrs:{id:"preview-track_source",src:"",type:"audio/mpeg"}})])},__vue_staticRenderFns__$2=[];const __vue_inject_styles__$2=void 0,__vue_scope_id__$2=void 0,__vue_is_functional_template__$2=!1;function __vue_normalize__$2(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="TheTrackPreview.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var TheTrackPreview=__vue_normalize__$2({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$1,__vue_scope_id__$2,__vue_is_functional_template__$2),script$2={data:()=>({open:!1,url:""}),mounted(){this.$root.$on("QualityModal:open",this.openModal),this.$refs.modal.addEventListener("webkitAnimationEnd",this.handleAnimationEnd)},methods:{tryToDownloadTrack(e){const{target:n}=e;if(this.$refs.modal.classList.add("animated","fadeOut"),!n.matches(".quality-button"))return;Downloads.sendAddToQueue(this.url,n.dataset.qualityValue)},openModal(e){this.url=e,this.open=!0,this.$refs.modal.classList.add("animated","fadeIn")},handleAnimationEnd(e){const{animationName:n}=e;if(this.$refs.modal.classList.remove("animated",n),n==="fadeIn")return;this.open=!1}}};const __vue_script__$2=script$2;var __vue_render__$3=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],ref:"modal",staticClass:"smallmodal",attrs:{id:"modal_quality"},on:{click:function(r){return e.tryToDownloadTrack(r)}}},[a("div",{staticClass:"smallmodal-content"},[a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"9"}},[e._v(` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheContextMenu=__vue_normalize__$1({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__$1,__vue_create_injector__$1),EventBus=new Vue;async function adjustVolume(e,n,{duration:a=1e3,easing:r=swing,interval:i=13}={}){const s=e.volume,l=n-s;if(!l||!a||!r||!i)return e.volume=n,Promise.resolve();const c=Math.floor(a/i);let o=1;return new Promise(u=>{const d=setInterval(()=>{e.volume=s+r(o/c)*l,++o===c&&(clearInterval(d),u())},i)})}function swing(e){return .5-Math.cos(e*Math.PI)/2}function playPausePreview(e){EventBus.$emit("trackPreview:playPausePreview",e)}function previewMouseEnter(e){EventBus.$emit("trackPreview:previewMouseEnter",e)}function previewMouseLeave(e){EventBus.$emit("trackPreview:previewMouseLeave",e)}var script$1={data:()=>({previewStopped:!1}),computed:{...mapGetters({previewVolume:"getPreviewVolume"})},mounted(){this.$refs.preview.volume=1,this.$router.beforeEach((e,n,a)=>{this.stopStackedTabsPreview(),a()}),EventBus.$on("trackPreview:playPausePreview",this.playPausePreview),EventBus.$on("trackPreview:previewMouseEnter",this.previewMouseEnter),EventBus.$on("trackPreview:previewMouseLeave",this.previewMouseLeave)},methods:{async onCanPlay(){await this.$refs.preview.play(),this.previewStopped=!1,await adjustVolume(this.$refs.preview,this.previewVolume/100,{duration:500})},async onTimeUpdate(){if(isNaN(this.$refs.preview.duration))return;let e=this.$refs.preview.duration;if(isFinite(e)||(e=30),e-this.$refs.preview.currentTime>=1)return;if(this.previewStopped)return;await adjustVolume(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,document.querySelectorAll("a[playing] > .preview_controls").forEach(n=>{n.style.opacity=0}),document.querySelectorAll("*").forEach(n=>{n.removeAttribute("playing")}),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(n=>{n.textContent="play_arrow"})},async playPausePreview(e){e.preventDefault(),e.stopPropagation();const{currentTarget:n}=e;var a=n.tagName=="I"?n:n.querySelector("i");n.hasAttribute("playing")?this.$refs.preview.paused?(this.$refs.preview.play(),this.previewStopped=!1,a.innerText="pause",await adjustVolume(this.$refs.preview,this.previewVolume/100,{duration:500})):(this.previewStopped=!0,a.innerText="play_arrow",await adjustVolume(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause()):(document.querySelectorAll("*").forEach(r=>{r.removeAttribute("playing")}),n.setAttribute("playing",!0),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(r=>{r.textContent="play_arrow"}),document.querySelectorAll(".preview_controls").forEach(r=>{r.style.opacity=0}),a.innerText="pause",a.style.opacity=1,this.previewStopped=!1,await adjustVolume(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),document.getElementById("preview-track_source").src=n.getAttribute("data-preview"),this.$refs.preview.load())},async stopStackedTabsPreview(){let e=Array.prototype.slice.call(document.querySelectorAll(".preview_playlist_controls[playing]"));if(e.length===0)return;await adjustVolume(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),this.previewStopped=!0,e.forEach(n=>{n.removeAttribute("playing"),n.innerText="play_arrow"})},previewMouseEnter(e){e.currentTarget.style.opacity=1},previewMouseLeave(e){const{currentTarget:n}=e,a=n.parentElement.hasAttribute("playing");(a&&this.previewStopped||!a)&&(n.style.opacity=0)}}};const __vue_script__$1=script$1;var __vue_render__$2=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("audio",{ref:"preview",attrs:{id:"preview-track"},on:{canplay:e.onCanPlay,timeupdate:e.onTimeUpdate}},[a("source",{attrs:{id:"preview-track_source",src:"",type:"audio/mpeg"}})])},__vue_staticRenderFns__$2=[];const __vue_inject_styles__$2=void 0,__vue_scope_id__$2=void 0,__vue_is_functional_template__$2=!1;function __vue_normalize__$2(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="TheTrackPreview.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var TheTrackPreview=__vue_normalize__$2({render:__vue_render__$2,staticRenderFns:__vue_staticRenderFns__$2},__vue_inject_styles__$2,__vue_script__$1,__vue_scope_id__$2,__vue_is_functional_template__$2),script$2={data:()=>({open:!1,url:""}),mounted(){this.$root.$on("QualityModal:open",this.openModal),this.$refs.modal.addEventListener("webkitAnimationEnd",this.handleAnimationEnd)},methods:{tryToDownloadTrack(e){const{target:n}=e;if(this.$refs.modal.classList.add("animated","fadeOut"),!n.matches(".quality-button"))return;Downloads.sendAddToQueue(this.url,n.dataset.qualityValue)},openModal(e){this.url=e,this.open=!0,this.$refs.modal.classList.add("animated","fadeIn")},handleAnimationEnd(e){const{animationName:n}=e;if(this.$refs.modal.classList.remove("animated",n),n==="fadeIn")return;this.open=!1}}};const __vue_script__$2=script$2;var __vue_render__$3=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],ref:"modal",staticClass:"smallmodal",attrs:{id:"modal_quality"},on:{click:function(r){return e.tryToDownloadTrack(r)}}},[a("div",{staticClass:"smallmodal-content"},[a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"9"}},[e._v(` `+e._s(e.$t("globals.download",{thing:"FLAC"}))+` `)]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"3"}},[e._v(` `+e._s(e.$t("globals.download",{thing:"MP3 320kbps"}))+` @@ -2750,9 +2750,9 @@ PERFORMANCE OF THIS SOFTWARE. fiber_new `)]):e._e()]),e._v(" "),a("span",{directives:[{name:"show",rawName:"v-show",value:e.currentTab==="all",expression:"currentTab === 'all'"}],staticClass:"block text-xs opacity-50 uppercase-first-letter"},[e._v(` `+e._s(e.$tc("globals.listTabs."+r.releaseType))+` - `)])])]),e._v(" "),a("td",{staticClass:"w-32 text-center xl:w-40"},[e._v(e._s(r.releaseDate))]),e._v(" "),a("td",{staticClass:"w-20 text-center xl:w-32"},[e._v(e._s(r.releaseTracksNumber))]),e._v(" "),a("td",{staticClass:"w-8 cursor-pointer",attrs:{"data-cm-link":r.releaseLink},on:{click:function(i){return i.stopPropagation(),e.sendAddToQueue(r.releaseLink)}}},[a("i",{staticClass:"material-icons hover:text-primary",attrs:{title:e.$t("globals.download_hint")}},[e._v("file_download")])])],1)}),0)])],1)},__vue_staticRenderFns__$e=[];const __vue_inject_styles__$e=void 0,__vue_scope_id__$e=void 0,__vue_is_functional_template__$e=!1;function __vue_normalize__$e(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="Artist.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Artist=__vue_normalize__$e({render:__vue_render__$e,staticRenderFns:__vue_staticRenderFns__$e},__vue_inject_styles__$e,__vue_script__$c,__vue_scope_id__$e,__vue_is_functional_template__$e);let chartsData={},cached$1=!1;function getChartsData(){return cached$1?chartsData:(socket.emit("get_charts_data"),new Promise((e,n)=>{socket.on("init_charts",a=>{chartsData=a,cached$1=!0,socket.off("init_charts"),e(a)})}))}var script$d={methods:{previewMouseEnter(e){EventBus.$emit("trackPreview:previewMouseEnter",e)},previewMouseLeave(e){EventBus.$emit("trackPreview:previewMouseLeave",e)}}};const __vue_script__$d=script$d;var __vue_render__$f=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("i",{staticClass:"absolute top-0 right-0 flex items-center justify-center w-full h-full text-center text-white transition-opacity duration-200 ease-in-out bg-black bg-opacity-50 rounded opacity-0 material-icons preview_controls",attrs:{title:e.$t("globals.play_hint")},on:{mouseenter:e.previewMouseEnter,mouseleave:e.previewMouseLeave}},[e._v(` + `)])])]),e._v(" "),a("td",{staticClass:"w-32 text-center xl:w-40"},[e._v(e._s(r.releaseDate))]),e._v(" "),a("td",{staticClass:"w-20 text-center xl:w-32"},[e._v(e._s(r.releaseTracksNumber))]),e._v(" "),a("td",{staticClass:"w-8 cursor-pointer",attrs:{"data-cm-link":r.releaseLink},on:{click:function(i){return i.stopPropagation(),e.sendAddToQueue(r.releaseLink)}}},[a("i",{staticClass:"material-icons hover:text-primary",attrs:{title:e.$t("globals.download_hint")}},[e._v("file_download")])])],1)}),0)])],1)},__vue_staticRenderFns__$e=[];const __vue_inject_styles__$e=void 0,__vue_scope_id__$e=void 0,__vue_is_functional_template__$e=!1;function __vue_normalize__$e(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="Artist.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Artist=__vue_normalize__$e({render:__vue_render__$e,staticRenderFns:__vue_staticRenderFns__$e},__vue_inject_styles__$e,__vue_script__$c,__vue_scope_id__$e,__vue_is_functional_template__$e);let chartsData={},cached$1=!1;function getChartsData(){return cached$1?chartsData:(socket.emit("get_charts_data"),new Promise((e,n)=>{socket.on("init_charts",a=>{chartsData=a,cached$1=!0,socket.off("init_charts"),e(a)})}))}var script$d={methods:{previewMouseEnter,previewMouseLeave}};const __vue_script__$d=script$d;var __vue_render__$f=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("i",{staticClass:"absolute top-0 right-0 flex items-center justify-center w-full h-full text-center text-white transition-opacity duration-200 ease-in-out bg-black bg-opacity-50 rounded opacity-0 material-icons preview_controls",attrs:{title:e.$t("globals.play_hint")},on:{mouseenter:e.previewMouseEnter,mouseleave:e.previewMouseLeave}},[e._v(` play_arrow -`)])},__vue_staticRenderFns__$f=[];const __vue_inject_styles__$f=void 0,__vue_scope_id__$f=void 0,__vue_is_functional_template__$f=!1;function __vue_normalize__$f(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="PreviewControls.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var PreviewControls=__vue_normalize__$f({render:__vue_render__$f,staticRenderFns:__vue_staticRenderFns__$f},__vue_inject_styles__$f,__vue_script__$d,__vue_scope_id__$f,__vue_is_functional_template__$f),script$e={components:{PreviewControls},data(){return{country:"",id:0,countries:[],chart:[]}},computed:{worldwideRelease(){let e=this.countries.filter(n=>n.title==="Worldwide");return e[0]}},async created(){socket.on("setChartTracks",this.setTracklist),this.$on("hook:destroyed",()=>{socket.off("setChartTracks")});let e=await getChartsData(),n;e=e.filter(a=>(a.title==="Worldwide"&&(n=a),a.title!=="Worldwide")),e.unshift(n),this.initCharts(e)},methods:{convertDuration,playPausePreview(e){EventBus.$emit("trackPreview:playPausePreview",e)},addToQueue(e){e.stopPropagation(),sendAddToQueue(e.currentTarget.dataset.link)},getTrackList(e){document.getElementById("content").scrollTo(0,0);const{currentTarget:{dataset:{title:n}},currentTarget:{dataset:{id:a}}}=e;this.country=n,localStorage.setItem("chart",this.country),this.id=a,socket.emit("getChartTracks",this.id)},setTracklist(e){this.chart=e},onChangeCountry(){this.country="",this.id=0},initCharts(e){if(this.countries=e,this.country=localStorage.getItem("chart")||"",!this.country)return;let n=0;for(;nn.title==="Worldwide");return e[0]}},async created(){socket.on("setChartTracks",this.setTracklist),this.$on("hook:destroyed",()=>{socket.off("setChartTracks")});let e=await getChartsData(),n;e=e.filter(a=>(a.title==="Worldwide"&&(n=a),a.title!=="Worldwide")),e.unshift(n),this.initCharts(e)},methods:{convertDuration,playPausePreview,addToQueue(e){e.stopPropagation(),sendAddToQueue(e.currentTarget.dataset.link)},getTrackList(e){document.getElementById("content").scrollTo(0,0);const{currentTarget:{dataset:{title:n}},currentTarget:{dataset:{id:a}}}=e;this.country=n,localStorage.setItem("chart",this.country),this.id=a,socket.emit("getChartTracks",this.id)},setTracklist(e){this.chart=e},onChangeCountry(){this.country="",this.id=0},initCharts(e){if(this.countries=e,this.country=localStorage.getItem("chart")||"",!this.country)return;let n=0;for(;n{socket.on("init_favorites",a=>{favoritesData=a,cached$2=!0,socket.off("init_favorites"),e(a)})}))}var script$g={inheritAttrs:!1,props:{cover:{type:String,reqired:!0},isRounded:{type:Boolean,required:!1},isCircle:{type:Boolean,required:!1},link:{type:String,reqired:!0}}};const __vue_script__$g=script$g;var __vue_render__$i=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{staticClass:"relative cover-container group"},[a("img",{staticClass:"block w-full opacity-100 coverart",class:{rounded:e.isRounded,"rounded-full":e.isCircle},attrs:{"aria-hidden":"true",src:e.cover}}),e._v(" "),a("button",e._g({staticClass:"absolute p-0 text-center bg-black border-0 rounded-full opacity-0 download_overlay hover:bg-primary",attrs:{role:"button","aria-label":"download","data-link":e.link,tabindex:"0"}},e.$listeners),[a("i",{staticClass:"text-white cursor-pointer material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])])},__vue_staticRenderFns__$i=[];const __vue_inject_styles__$i=function(e){if(!e)return;e("data-v-3e6c40e4_0",{source:".cover-container[data-v-3e6c40e4]{width:156px;height:156px;margin-bottom:10px}.cover-container .coverart[data-v-3e6c40e4]{backface-visibility:hidden;transition:.5s ease;height:auto}.cover-container .download_overlay[data-v-3e6c40e4]{top:50%;left:50%;transform:translate(-50%,-50%);transition:.5s ease;opacity:0;min-width:2rem;height:2.75rem;text-align:center}.cover-container .download_overlay i[data-v-3e6c40e4]{padding:.625rem}.cover-container .download_overlay[data-v-3e6c40e4]:focus{opacity:1}.cover-container:hover .coverart[data-v-3e6c40e4]{opacity:.75}.cover-container:hover .download_overlay[data-v-3e6c40e4]{opacity:1;border:0}",map:void 0,media:void 0})},__vue_scope_id__$i="data-v-3e6c40e4",__vue_module_identifier__$b=void 0,__vue_is_functional_template__$i=!1;function __vue_normalize__$i(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};o.__file="CoverContainer.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(n&&(u=function(d){n.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(m,h){return u.call(h),d(m,h)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$b(){const e=document.head||document.getElementsByTagName("head")[0],n=__vue_create_injector__$b.styles||(__vue_create_injector__$b.styles={}),a=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=a?s.media||"default":i,c=n[l]||(n[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),a&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),a&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(a&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var CoverContainer=__vue_normalize__$i({render:__vue_render__$i,staticRenderFns:__vue_staticRenderFns__$i},__vue_inject_styles__$i,__vue_script__$g,__vue_scope_id__$i,__vue_is_functional_template__$i,__vue_module_identifier__$b,__vue_create_injector__$b),script$h={components:{PreviewControls,CoverContainer,BaseTabs,BaseTab},data(){return{tracks:[],albums:[],artists:[],playlists:[],spotifyPlaylists:[],activeTab:"playlist",tabs:["playlist","album","artist","track"]}},computed:{activeTabEmpty(){let e=this.getActiveRelease();return e.length===0}},async created(){const e=await getFavoritesData();if(Object.entries(e).length===0)return;this.setFavorites(e)},mounted(){socket.on("updated_userFavorites",this.updated_userFavorites),socket.on("updated_userSpotifyPlaylists",this.updated_userSpotifyPlaylists),socket.on("updated_userPlaylists",this.updated_userPlaylists),socket.on("updated_userAlbums",this.updated_userAlbums),socket.on("updated_userArtist",this.updated_userArtist),socket.on("updated_userTracks",this.updated_userTracks),this.$on("hook:destroyed",()=>{socket.off("updated_userFavorites"),socket.off("updated_userSpotifyPlaylists"),socket.off("updated_userPlaylists"),socket.off("updated_userAlbums"),socket.off("updated_userArtist"),socket.off("updated_userTracks")})},methods:{playPausePreview(e){EventBus.$emit("trackPreview:playPausePreview",e)},convertDuration,downloadAllOfType(){try{let e=this.getActiveRelease();if(this.activeTab==="track"){let n=this.getLovedTracksPlaylist();sendAddToQueue(n.link)}else sendAddToQueue(aggregateDownloadLinks(e))}catch(e){console.error(e.message)}},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},updated_userSpotifyPlaylists(e){this.spotifyPlaylists=e},updated_userPlaylists(e){this.playlists=e},updated_userAlbums(e){this.albums=e},updated_userArtist(e){this.artists=e},updated_userTracks(e){this.tracks=e},reloadTabs(){this.$refs.reloadButton.classList.add("spin"),socket.emit("update_userFavorites"),localStorage.getItem("spotifyUser")&&socket.emit("update_userSpotifyPlaylists",localStorage.getItem("spotifyUser"))},updated_userFavorites(e){this.setFavorites(e),this.$refs.reloadButton.addEventListener("animationiteration",()=>{this.$refs.reloadButton.classList.remove("spin"),toast(this.$t("toasts.refreshFavs"),"done",!0)},{once:!0})},setFavorites(e){const{tracks:n,albums:a,artists:r,playlists:i}=e;this.tracks=n,this.albums=a,this.artists=r,this.playlists=i},getActiveRelease(e=this.activeTab){let n;switch(e){case"playlist":n=this.playlists;break;case"album":n=this.albums;break;case"artist":n=this.artists;break;case"track":n=this.tracks;break}return n},getTabLenght(e=this.activeTab){let n=this[`${e}s`].length;return n},getLovedTracksPlaylist(){let e=this.playlists.filter(n=>n.is_loved_track);if(e.length!==0)return e[0];throw new Error("No loved tracks playlist!")}}};const __vue_script__$h=script$h;var __vue_render__$j=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",[a("h1",{staticClass:"mb-8 text-5xl"},[e._v(` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var CoverContainer=__vue_normalize__$i({render:__vue_render__$i,staticRenderFns:__vue_staticRenderFns__$i},__vue_inject_styles__$i,__vue_script__$g,__vue_scope_id__$i,__vue_is_functional_template__$i,__vue_module_identifier__$b,__vue_create_injector__$b),script$h={components:{PreviewControls,CoverContainer,BaseTabs,BaseTab},data(){return{tracks:[],albums:[],artists:[],playlists:[],spotifyPlaylists:[],activeTab:"playlist",tabs:["playlist","album","artist","track"]}},computed:{activeTabEmpty(){let e=this.getActiveRelease();return e.length===0}},async created(){const e=await getFavoritesData();if(Object.entries(e).length===0)return;this.setFavorites(e)},mounted(){socket.on("updated_userFavorites",this.updated_userFavorites),socket.on("updated_userSpotifyPlaylists",this.updated_userSpotifyPlaylists),socket.on("updated_userPlaylists",this.updated_userPlaylists),socket.on("updated_userAlbums",this.updated_userAlbums),socket.on("updated_userArtist",this.updated_userArtist),socket.on("updated_userTracks",this.updated_userTracks),this.$on("hook:destroyed",()=>{socket.off("updated_userFavorites"),socket.off("updated_userSpotifyPlaylists"),socket.off("updated_userPlaylists"),socket.off("updated_userAlbums"),socket.off("updated_userArtist"),socket.off("updated_userTracks")})},methods:{playPausePreview,convertDuration,downloadAllOfType(){try{let e=this.getActiveRelease();if(this.activeTab==="track"){let n=this.getLovedTracksPlaylist();sendAddToQueue(n.link)}else sendAddToQueue(aggregateDownloadLinks(e))}catch(e){console.error(e.message)}},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},updated_userSpotifyPlaylists(e){this.spotifyPlaylists=e},updated_userPlaylists(e){this.playlists=e},updated_userAlbums(e){this.albums=e},updated_userArtist(e){this.artists=e},updated_userTracks(e){this.tracks=e},reloadTabs(){this.$refs.reloadButton.classList.add("spin"),socket.emit("update_userFavorites"),localStorage.getItem("spotifyUser")&&socket.emit("update_userSpotifyPlaylists",localStorage.getItem("spotifyUser"))},updated_userFavorites(e){this.setFavorites(e),this.$refs.reloadButton.addEventListener("animationiteration",()=>{this.$refs.reloadButton.classList.remove("spin"),toast(this.$t("toasts.refreshFavs"),"done",!0)},{once:!0})},setFavorites(e){const{tracks:n,albums:a,artists:r,playlists:i}=e;this.tracks=n,this.albums=a,this.artists=r,this.playlists=i},getActiveRelease(e=this.activeTab){let n;switch(e){case"playlist":n=this.playlists;break;case"album":n=this.albums;break;case"artist":n=this.artists;break;case"track":n=this.tracks;break}return n},getTabLenght(e=this.activeTab){let n=this[`${e}s`].length;return n},getLovedTracksPlaylist(){let e=this.playlists.filter(n=>n.is_loved_track);if(e.length!==0)return e[0];throw new Error("No loved tracks playlist!")}}};const __vue_script__$h=script$h;var __vue_render__$j=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",[a("h1",{staticClass:"mb-8 text-5xl"},[e._v(` `+e._s(e.$t("favorites.title"))+` `),a("div",{ref:"reloadButton",staticClass:"inline-block clickable reload-button",attrs:{role:"button","aria-label":"reload"},on:{click:e.reloadTabs}},[a("i",{staticClass:"material-icons"},[e._v("sync")])])]),e._v(" "),a("BaseTabs",e._l(e.tabs,function(r){return a("BaseTab",{key:r,class:{active:e.activeTab===r},on:{click:function(i){e.activeTab=r}}},[e._v(` `+e._s(e.$tc("globals.listTabs."+r,2))+` @@ -2791,14 +2791,14 @@ PERFORMANCE OF THIS SOFTWARE. `+e._s(e.convertDuration(r.duration))+` `)]),e._v(" "),a("td",{staticClass:"cursor-pointer group",attrs:{"data-link":r.link,role:"button","aria-label":"download"},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}},[a("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[a("i",{staticClass:"transition-colors duration-150 ease-in-out material-icons group-hover:text-primary",attrs:{title:e.$t("globals.download_hint")}},[e._v(` get_app - `)])])])],1)}),0):e._e()])],1)},__vue_staticRenderFns__$j=[];const __vue_inject_styles__$j=function(e){if(!e)return;e("data-v-3a107fa2_0",{source:".favorites_tabcontent[data-v-3a107fa2]{display:none}.favorites_tabcontent--active[data-v-3a107fa2]{display:block}.reload-button.spin i[data-v-3a107fa2]{animation:spin .5s infinite ease-out reverse}",map:void 0,media:void 0})},__vue_scope_id__$j="data-v-3a107fa2",__vue_module_identifier__$c=void 0,__vue_is_functional_template__$j=!1;function __vue_normalize__$j(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};o.__file="Favorites.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(n&&(u=function(d){n.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(m,h){return u.call(h),d(m,h)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$c(){const e=document.head||document.getElementsByTagName("head")[0],n=__vue_create_injector__$c.styles||(__vue_create_injector__$c.styles={}),a=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=a?s.media||"default":i,c=n[l]||(n[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` + `)])])])],1)}),0):e._e()])],1)},__vue_staticRenderFns__$j=[];const __vue_inject_styles__$j=function(e){if(!e)return;e("data-v-7fb14313_0",{source:".favorites_tabcontent[data-v-7fb14313]{display:none}.favorites_tabcontent--active[data-v-7fb14313]{display:block}.reload-button.spin i[data-v-7fb14313]{animation:spin .5s infinite ease-out reverse}",map:void 0,media:void 0})},__vue_scope_id__$j="data-v-7fb14313",__vue_module_identifier__$c=void 0,__vue_is_functional_template__$j=!1;function __vue_normalize__$j(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};o.__file="Favorites.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(n&&(u=function(d){n.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(m,h){return u.call(h),d(m,h)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$c(){const e=document.head||document.getElementsByTagName("head")[0],n=__vue_create_injector__$c.styles||(__vue_create_injector__$c.styles={}),a=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=a?s.media||"default":i,c=n[l]||(n[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),a&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),a&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(a&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var Favorites=__vue_normalize__$j({render:__vue_render__$j,staticRenderFns:__vue_staticRenderFns__$j},__vue_inject_styles__$j,__vue_script__$h,__vue_scope_id__$j,__vue_is_functional_template__$j,__vue_module_identifier__$c,__vue_create_injector__$c);let homeData={},cached$3=!1;function getHomeData(){return cached$3?homeData:(socket.emit("get_home_data"),new Promise((e,n)=>{socket.on("init_home",a=>{homeData=a,cached$3=!0,socket.off("init_home"),e(a)})}))}var script$i={components:{CoverContainer},data(){return{playlists:[],albums:[]}},async created(){const e=await getHomeData();this.initHome(e)},computed:{...mapGetters(["isLoggedIn"])},methods:{addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},initHome(e){const{playlists:{data:n},albums:{data:a}}=e;this.playlists=n,this.albums=a}}};const __vue_script__$i=script$i;var __vue_render__$k=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{attrs:{id:"home_tab"}},[a("h1",{staticClass:"mb-8 text-5xl"},[e._v(e._s(e.$t("globals.welcome")))]),e._v(" "),e.isLoggedIn?e._e():a("section",{ref:"notLogged",staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[a("p",{staticClass:"mb-4",attrs:{id:"home_not_logged_text"}},[e._v(e._s(e.$t("home.needTologin")))]),e._v(" "),a("router-link",{staticClass:"btn btn-primary",attrs:{tag:"button",name:"button",to:{name:"Settings"}}},[e._v(` `+e._s(e.$t("home.openSettings"))+` `)])],1),e._v(" "),e.playlists.length?a("section",{staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[a("h2",{staticClass:"mb-6 text-3xl"},[e._v(e._s(e.$t("home.sections.popularPlaylists")))]),e._v(" "),a("div",{staticClass:"release-grid"},e._l(e.playlists,function(r){return a("router-link",{key:r.id,staticClass:"release clickable",attrs:{tag:"div",to:{name:"Playlist",params:{id:r.id}},tabindex:"0"},nativeOn:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.$router.push({name:"Playlist",params:{id:r.id}})}}},[a("CoverContainer",{attrs:{"is-rounded":"",cover:r.picture_medium,link:r.link},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),a("p",{staticClass:"primary-text"},[e._v(e._s(r.title))]),e._v(" "),a("p",{staticClass:"secondary-text"},[e._v(` `+e._s(e.$t("globals.by",{artist:r.user.name})+" - "+e.$tc("globals.listTabs.trackN",r.nb_tracks))+` - `)])],1)}),1)]):e._e(),e._v(" "),e.albums.length?a("section",{staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[a("h2",{staticClass:"mb-6 text-3xl"},[e._v(e._s(e.$t("home.sections.popularAlbums")))]),e._v(" "),a("div",{staticClass:"release-grid"},e._l(e.albums,function(r){return a("router-link",{key:r.id,staticClass:"release clickable",attrs:{tag:"div",to:{name:"Album",params:{id:r.id}},"data-id":r.id,tabindex:"0"},nativeOn:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.$router.push({name:"Album",params:{id:r.id}})}}},[a("CoverContainer",{attrs:{"is-rounded":"",cover:r.cover_medium,link:r.link},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),a("p",{staticClass:"primary-text"},[e._v(e._s(r.title))]),e._v(" "),a("p",{staticClass:"secondary-text"},[e._v(e._s(""+e.$t("globals.by",{artist:r.artist.name})))])],1)}),1)]):e._e()])},__vue_staticRenderFns__$k=[];const __vue_inject_styles__$k=void 0,__vue_scope_id__$k=void 0,__vue_is_functional_template__$k=!1;function __vue_normalize__$k(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="Home.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Home=__vue_normalize__$k({render:__vue_render__$k,staticRenderFns:__vue_staticRenderFns__$k},__vue_inject_styles__$k,__vue_script__$i,__vue_scope_id__$k,__vue_is_functional_template__$k);const COUNTRIES={AF:"Afghanistan",AX:"\xC5land Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"C\xF4te d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Cura\xE7ao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"R\xE9union",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barth\xE9lemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"};var script$j={data(){return{link:"",title:"",subtitle:"",image:"",data:{},type:"",id:"0",countries:[]}},methods:{convertDuration,reset(){this.title="Loading...",this.subtitle="",this.image="",this.data={},this.type="",this.link="",this.countries=[]},showTrack(e){this.reset();const{title:n,title_version:a,album:{cover_xl:r},link:i,available_countries:s,id:l}=e;this.title=n+(a&&n.indexOf(a)==-1?" "+a:""),this.image=r,this.type="track",this.link=i,this.id=l,s.forEach(c=>{let o=[],u=[...c].map(d=>d.charCodeAt()+127397);o.push(String.fromCodePoint(...u)),o.push(COUNTRIES[c]),this.countries.push(o)}),this.data=e},showAlbum(e){this.reset();const{title:n,cover_xl:a,link:r,id:i}=e;this.title=n,this.image=a,this.type="album",this.link=r,this.data=e,this.id=i},notSupported(){this.link="error"},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)}},mounted(){EventBus.$on("linkAnalyzerTab:reset",this.reset),socket.on("analyze_track",this.showTrack),socket.on("analyze_album",this.showAlbum),socket.on("analyze_notSupported",this.notSupported)}};const __vue_script__$j=script$j;var __vue_render__$l=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{staticClass:"image-header",attrs:{id:"analyzer_tab"}},[a("h1",{staticClass:"mb-8 text-5xl capitalize"},[e._v(e._s(e.$t("sidebar.linkAnalyzer")))]),e._v(" "),e.link===""?a("div",[a("p",[e._v(` + `)])],1)}),1)]):e._e(),e._v(" "),e.albums.length?a("section",{staticClass:"py-6 border-0 border-t border-solid border-grayscale-500"},[a("h2",{staticClass:"mb-6 text-3xl"},[e._v(e._s(e.$t("home.sections.popularAlbums")))]),e._v(" "),a("div",{staticClass:"release-grid"},e._l(e.albums,function(r){return a("router-link",{key:r.id,staticClass:"release clickable",attrs:{tag:"div",to:{name:"Album",params:{id:r.id}},"data-id":r.id,tabindex:"0"},nativeOn:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.$router.push({name:"Album",params:{id:r.id}})}}},[a("CoverContainer",{attrs:{"is-rounded":"",cover:r.cover_medium,link:r.link},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),a("p",{staticClass:"primary-text"},[e._v(e._s(r.title))]),e._v(" "),a("p",{staticClass:"secondary-text"},[e._v(e._s(""+e.$t("globals.by",{artist:r.artist.name})))])],1)}),1)]):e._e()])},__vue_staticRenderFns__$k=[];const __vue_inject_styles__$k=void 0,__vue_scope_id__$k=void 0,__vue_is_functional_template__$k=!1;function __vue_normalize__$k(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="Home.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Home=__vue_normalize__$k({render:__vue_render__$k,staticRenderFns:__vue_staticRenderFns__$k},__vue_inject_styles__$k,__vue_script__$i,__vue_scope_id__$k,__vue_is_functional_template__$k);const COUNTRIES={AF:"Afghanistan",AX:"\xC5land Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"C\xF4te d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Cura\xE7ao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"R\xE9union",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barth\xE9lemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"};var script$j={data(){return{link:"",title:"",subtitle:"",image:"",data:{},type:"",id:"0",countries:[]}},methods:{convertDuration,reset(){this.title="Loading...",this.subtitle="",this.image="",this.data={},this.type="",this.link="",this.countries=[]},showTrack(e){this.reset();const{title:n,title_version:a,album:{cover_xl:r},link:i,available_countries:s,id:l}=e;this.title=n+(a&&n.indexOf(a)==-1?" "+a:""),this.image=r,this.type="track",this.link=i,this.id=l,s.forEach(c=>{let o=[],u=[...c].map(d=>d.charCodeAt()+127397);o.push(String.fromCodePoint(...u)),o.push(COUNTRIES[c]),this.countries.push(o)}),this.data=e},showAlbum(e){this.reset();const{title:n,cover_xl:a,link:r,id:i}=e;this.title=n,this.image=a,this.type="album",this.link=r,this.data=e,this.id=i},notSupported(){this.link="error"},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)}},mounted(){socket.on("analyze_track",this.showTrack),socket.on("analyze_album",this.showAlbum),socket.on("analyze_notSupported",this.notSupported)}};const __vue_script__$j=script$j;var __vue_render__$l=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{staticClass:"image-header",attrs:{id:"analyzer_tab"}},[a("h1",{staticClass:"mb-8 text-5xl capitalize"},[e._v(e._s(e.$t("sidebar.linkAnalyzer")))]),e._v(" "),e.link===""?a("div",[a("p",[e._v(` `+e._s(e.$t("linkAnalyzer.info"))+` `)]),e._v(" "),a("p",[e._v(` `+e._s(e.$t("linkAnalyzer.useful"))+` @@ -2820,7 +2820,7 @@ PERFORMANCE OF THIS SOFTWARE. `+e._s(e.fansNumber)+` `)]),e._v(" "),a("span",{staticClass:"p-1 px-2 text-xs text-center capitalize bg-primary rounded-xl"},[e._v(` `+e._s(e.$tc("globals.listTabs."+e.$attrs.info.type,1))+` - `)])],1)},__vue_staticRenderFns__$m=[];const __vue_inject_styles__$m=void 0,__vue_scope_id__$m=void 0,__vue_is_functional_template__$m=!1;function __vue_normalize__$m(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="TopResult.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var TopResult=__vue_normalize__$m({render:__vue_render__$m,staticRenderFns:__vue_staticRenderFns__$m},__vue_inject_styles__$m,__vue_script__$k,__vue_scope_id__$m,__vue_is_functional_template__$m);function formatSingleTrack(e){let n=getPropertyWithFallback(e,"explicit_lyrics","EXPLICIT_LYRICS");return typeof n=="string"&&(n=n!=="0"),{trackTitle:getPropertyWithFallback(e,"title","SNG_TITLE"),trackTitleVersion:getPropertyWithFallback(e,"title_version","VERSION"),trackPreview:getPropertyWithFallback(e,"preview","MEDIA.0.HREF"),trackDuration:getPropertyWithFallback(e,"duration","DURATION"),trackLink:getPropertyWithFallback(e,"link")||`https://www.deezer.com/track/${e.SNG_ID}`,isTrackExplicit:n,artistID:getPropertyWithFallback(e,"artist.id","ART_ID"),artistName:getPropertyWithFallback(e,"artist.name","ART_NAME"),albumID:getPropertyWithFallback(e,"album.id","ALB_ID"),albumTitle:getPropertyWithFallback(e,"album.title","ALB_TITLE"),albumPicture:getPropertyWithFallback(e,"album.cover_small")||`https://e-cdns-images.dzcdn.net/images/cover/${e.ALB_PICTURE}/56x56-000000-80-0-0.jpg`}}function formatAlbums(e){let n=getPropertyWithFallback(e,"explicit_lyrics","EXPLICIT_ALBUM_CONTENT.EXPLICIT_LYRICS_STATUS");return typeof n=="number"&&(n=n===1),{albumID:getPropertyWithFallback(e,"id","ALB_ID"),albumTitle:getPropertyWithFallback(e,"title","ALB_TITLE"),albumCoverMedium:getPropertyWithFallback(e,"cover_medium")||`https://e-cdns-images.dzcdn.net/images/cover/${e.ALB_PICTURE}/156x156-000000-80-0-0.jpg`,albumLink:getPropertyWithFallback(e,"link")||`https://deezer.com/album/${e.ALB_ID}`,albumTracks:getPropertyWithFallback(e,"nb_tracks","NUMBER_TRACK"),isAlbumExplicit:n,artistName:getPropertyWithFallback(e,"artist.name","ART_NAME")}}function formatArtist(e){return{artistID:getPropertyWithFallback(e,"id","ART_ID"),artistName:getPropertyWithFallback(e,"name","ART_NAME"),artistPictureMedium:getPropertyWithFallback(e,"picture_medium")||`https://e-cdns-images.dzcdn.net/images/artist/${e.ART_PICTURE}/156x156-000000-80-0-0.jpg`,artistLink:getPropertyWithFallback(e,"link")||`https://deezer.com/artist/${e.ART_ID}`,artistAlbumsNumber:getPropertyWithFallback(e,"nb_album","NB_FAN")}}function formatPlaylist(e){return{playlistID:getPropertyWithFallback(e,"id","PLAYLIST_ID"),playlistTitle:getPropertyWithFallback(e,"title","TITLE"),playlistPictureMedium:getPropertyWithFallback(e,"picture_medium")||`https://e-cdns-images.dzcdn.net/images/${e.PICTURE_TYPE}/${e.PLAYLIST_PICTURE}/156x156-000000-80-0-0.jpg`,playlistLink:getPropertyWithFallback(e,"link")||`https://deezer.com/playlist/${e.PLAYLIST_ID}`,playlistTracksNumber:getPropertyWithFallback(e,"nb_tracks","NB_SONG"),artistName:getPropertyWithFallback(e,"user.name")}}function formatTitle(e){const n=e.trackTitleVersion&&e.trackTitle.indexOf(e.trackTitleVersion)===-1;return`${e.trackTitle}${n?` ${e.trackTitleVersion}`:""}`}var script$l={components:{BaseLoadingPlaceholder,PreviewControls},props:{viewInfo:{validator:function(e){let n=Object.is(e,null),a=Object.prototype.toString.call(e)==="[object Object]";return n||a},required:!0},itemsToShow:{type:Number,required:!1},wantHeaders:{type:Boolean,required:!1,default:!1}},computed:{isLoading(){return!this.viewInfo||!this.viewInfo.hasLoaded}},methods:{convertDuration,formatTitle,playPausePreview(e){EventBus.$emit("trackPreview:playPausePreview",e)}}};const __vue_script__$l=script$l;var __vue_render__$n=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("section",[e.isLoading?a("BaseLoadingPlaceholder"):[e.viewInfo.data.length===0?a("div",[a("h1",[e._v(e._s(e.$t("search.noResultsTrack")))])]):a("table",{staticClass:"table w-full table--tracks"},[e.wantHeaders?a("thead",[a("tr",{staticClass:"capitalize"},[a("th",{staticClass:"h-12 pb-3",attrs:{colspan:"2"}},[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),a("th",{staticClass:"h-12 pb-3"},[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),a("th",{staticClass:"h-12 pb-3"},[e._v(e._s(e.$tc("globals.listTabs.album",1)))]),e._v(" "),a("th",{staticClass:"h-12 pb-3"},[a("i",{staticClass:"material-icons"},[e._v("timer")])]),e._v(" "),a("th",{staticClass:"h-12 pb-3",staticStyle:{width:"3.5rem"}})])]):e._e(),e._v(" "),a("tbody",e._l(e.viewInfo.data.slice(0,e.itemsToShow),function(r){return a("tr",{key:r.trackLink},[a("td",{staticClass:"table__icon table__icon--big"},[a("span",{staticClass:"relative inline-block rounded cursor-pointer",attrs:{"data-preview":r.trackPreview},on:{click:function(i){return e.playPausePreview(i)}}},[r.trackPreview?a("PreviewControls"):e._e(),e._v(" "),a("img",{staticClass:"rounded coverart",attrs:{src:r.albumPicture}})],1)]),e._v(" "),a("td",{staticClass:"table__cell table__cell--large"},[a("div",{staticClass:"break-words table__cell-content table__cell-content--vertical-center"},[r.isTrackExplicit?a("i",{staticClass:"material-icons title-icon"},[e._v("explicit")]):e._e(),e._v(` + `)])],1)},__vue_staticRenderFns__$m=[];const __vue_inject_styles__$m=void 0,__vue_scope_id__$m=void 0,__vue_is_functional_template__$m=!1;function __vue_normalize__$m(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};return o.__file="TopResult.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var TopResult=__vue_normalize__$m({render:__vue_render__$m,staticRenderFns:__vue_staticRenderFns__$m},__vue_inject_styles__$m,__vue_script__$k,__vue_scope_id__$m,__vue_is_functional_template__$m);function formatSingleTrack(e){let n=getPropertyWithFallback(e,"explicit_lyrics","EXPLICIT_LYRICS");return typeof n=="string"&&(n=n!=="0"),{trackTitle:getPropertyWithFallback(e,"title","SNG_TITLE"),trackTitleVersion:getPropertyWithFallback(e,"title_version","VERSION"),trackPreview:getPropertyWithFallback(e,"preview","MEDIA.0.HREF"),trackDuration:getPropertyWithFallback(e,"duration","DURATION"),trackLink:getPropertyWithFallback(e,"link")||`https://www.deezer.com/track/${e.SNG_ID}`,isTrackExplicit:n,artistID:getPropertyWithFallback(e,"artist.id","ART_ID"),artistName:getPropertyWithFallback(e,"artist.name","ART_NAME"),albumID:getPropertyWithFallback(e,"album.id","ALB_ID"),albumTitle:getPropertyWithFallback(e,"album.title","ALB_TITLE"),albumPicture:getPropertyWithFallback(e,"album.cover_small")||`https://e-cdns-images.dzcdn.net/images/cover/${e.ALB_PICTURE}/56x56-000000-80-0-0.jpg`}}function formatAlbums(e){let n=getPropertyWithFallback(e,"explicit_lyrics","EXPLICIT_ALBUM_CONTENT.EXPLICIT_LYRICS_STATUS");return typeof n=="number"&&(n=n===1),{albumID:getPropertyWithFallback(e,"id","ALB_ID"),albumTitle:getPropertyWithFallback(e,"title","ALB_TITLE"),albumCoverMedium:getPropertyWithFallback(e,"cover_medium")||`https://e-cdns-images.dzcdn.net/images/cover/${e.ALB_PICTURE}/156x156-000000-80-0-0.jpg`,albumLink:getPropertyWithFallback(e,"link")||`https://deezer.com/album/${e.ALB_ID}`,albumTracks:getPropertyWithFallback(e,"nb_tracks","NUMBER_TRACK"),isAlbumExplicit:n,artistName:getPropertyWithFallback(e,"artist.name","ART_NAME")}}function formatArtist(e){return{artistID:getPropertyWithFallback(e,"id","ART_ID"),artistName:getPropertyWithFallback(e,"name","ART_NAME"),artistPictureMedium:getPropertyWithFallback(e,"picture_medium")||`https://e-cdns-images.dzcdn.net/images/artist/${e.ART_PICTURE}/156x156-000000-80-0-0.jpg`,artistLink:getPropertyWithFallback(e,"link")||`https://deezer.com/artist/${e.ART_ID}`,artistAlbumsNumber:getPropertyWithFallback(e,"nb_album","NB_FAN")}}function formatPlaylist(e){return{playlistID:getPropertyWithFallback(e,"id","PLAYLIST_ID"),playlistTitle:getPropertyWithFallback(e,"title","TITLE"),playlistPictureMedium:getPropertyWithFallback(e,"picture_medium")||`https://e-cdns-images.dzcdn.net/images/${e.PICTURE_TYPE}/${e.PLAYLIST_PICTURE}/156x156-000000-80-0-0.jpg`,playlistLink:getPropertyWithFallback(e,"link")||`https://deezer.com/playlist/${e.PLAYLIST_ID}`,playlistTracksNumber:getPropertyWithFallback(e,"nb_tracks","NB_SONG"),artistName:getPropertyWithFallback(e,"user.name")}}function formatTitle(e){const n=e.trackTitleVersion&&e.trackTitle.indexOf(e.trackTitleVersion)===-1;return`${e.trackTitle}${n?` ${e.trackTitleVersion}`:""}`}var script$l={components:{BaseLoadingPlaceholder,PreviewControls},props:{viewInfo:{validator:function(e){let n=Object.is(e,null),a=Object.prototype.toString.call(e)==="[object Object]";return n||a},required:!0},itemsToShow:{type:Number,required:!1},wantHeaders:{type:Boolean,required:!1,default:!1}},computed:{isLoading(){return!this.viewInfo||!this.viewInfo.hasLoaded}},methods:{convertDuration,formatTitle,playPausePreview}};const __vue_script__$l=script$l;var __vue_render__$n=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("section",[e.isLoading?a("BaseLoadingPlaceholder"):[e.viewInfo.data.length===0?a("div",[a("h1",[e._v(e._s(e.$t("search.noResultsTrack")))])]):a("table",{staticClass:"table w-full table--tracks"},[e.wantHeaders?a("thead",[a("tr",{staticClass:"capitalize"},[a("th",{staticClass:"h-12 pb-3",attrs:{colspan:"2"}},[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),a("th",{staticClass:"h-12 pb-3"},[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),a("th",{staticClass:"h-12 pb-3"},[e._v(e._s(e.$tc("globals.listTabs.album",1)))]),e._v(" "),a("th",{staticClass:"h-12 pb-3"},[a("i",{staticClass:"material-icons"},[e._v("timer")])]),e._v(" "),a("th",{staticClass:"h-12 pb-3",staticStyle:{width:"3.5rem"}})])]):e._e(),e._v(" "),a("tbody",e._l(e.viewInfo.data.slice(0,e.itemsToShow),function(r){return a("tr",{key:r.trackLink},[a("td",{staticClass:"table__icon table__icon--big"},[a("span",{staticClass:"relative inline-block rounded cursor-pointer",attrs:{"data-preview":r.trackPreview},on:{click:function(i){return e.playPausePreview(i)}}},[r.trackPreview?a("PreviewControls"):e._e(),e._v(" "),a("img",{staticClass:"rounded coverart",attrs:{src:r.albumPicture}})],1)]),e._v(" "),a("td",{staticClass:"table__cell table__cell--large"},[a("div",{staticClass:"break-words table__cell-content table__cell-content--vertical-center"},[r.isTrackExplicit?a("i",{staticClass:"material-icons title-icon"},[e._v("explicit")]):e._e(),e._v(` `+e._s(e.formatTitle(r))+` `)])]),e._v(" "),a("router-link",{staticClass:"break-words table__cell table__cell--medium table__cell--center",attrs:{tag:"td",to:{name:"Artist",params:{id:r.artistID}}}},[a("span",{staticClass:"cursor-pointer hover:underline"},[e._v(` `+e._s(r.artistName)+` @@ -4601,7 +4601,7 @@ PERFORMANCE OF THIS SOFTWARE. `)]),e._v(" "),a("div",{staticClass:"input-group"},[a("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.clientID")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyFeatures.clientId,expression:"spotifyFeatures.clientId"}],attrs:{type:"text"},domProps:{value:e.spotifyFeatures.clientId},on:{input:function(r){if(r.target.composing)return;e.$set(e.spotifyFeatures,"clientId",r.target.value)}}})]),e._v(" "),a("div",{staticClass:"input-group"},[a("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.clientSecret")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyFeatures.clientSecret,expression:"spotifyFeatures.clientSecret"}],attrs:{type:"password"},domProps:{value:e.spotifyFeatures.clientSecret},on:{input:function(r){if(r.target.composing)return;e.$set(e.spotifyFeatures,"clientSecret",r.target.value)}}})]),e._v(" "),a("div",{staticClass:"input-group"},[a("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.username")))]),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyUser,expression:"spotifyUser"}],attrs:{type:"text"},domProps:{value:e.spotifyUser},on:{input:function(r){if(r.target.composing)return;e.spotifyUser=r.target.value}}})])],1),e._v(" "),a("footer",{staticClass:"bg-background-main"},[a("button",{staticClass:"mr-2 btn btn-primary",on:{click:e.resetSettings}},[e._v(e._s(e.$t("settings.reset")))]),e._v(" "),a("button",{staticClass:"btn btn-primary",on:{click:e.saveSettings}},[e._v(e._s(e.$t("settings.save")))])])],1)},__vue_staticRenderFns__$u=[];const __vue_inject_styles__$u=function(e){if(!e)return;e("data-v-7743cf8e_0",{source:"#logged_in_info[data-v-7743cf8e]{height:250px;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center}.locale-flag[data-v-7743cf8e]{width:60px;justify-content:center;cursor:pointer}.locale-flag[data-v-7743cf8e]:not(:last-child){margin-right:10px}.locale-flag.locale-flag--current svg[data-v-7743cf8e]{filter:brightness(1)}.locale-flag[data-v-7743cf8e] svg{width:40px!important;height:40px!important;filter:brightness(.5)}.settings-group[data-v-7743cf8e]{border-top-width:1px;border-color:gray}.settings-group__header[data-v-7743cf8e]{display:inline-flex;align-items:center;padding-top:2rem;padding-bottom:2rem;font-size:1.5rem}.settings-group__header i.material-icons[data-v-7743cf8e]{margin-right:1rem}.settings-container[data-v-7743cf8e]{display:flex}.settings-container__half[data-v-7743cf8e]{width:50%}.settings-container__third[data-v-7743cf8e]{width:33%}.settings-container__third--only-checkbox[data-v-7743cf8e]{display:flex;flex-direction:column;align-items:start;justify-content:center}.settings-container__half>*[data-v-7743cf8e],.settings-container__third>*[data-v-7743cf8e]{margin-bottom:1rem}.with-checkbox[data-v-7743cf8e]{display:flex;align-items:center}.with-checkbox [type=checkbox][data-v-7743cf8e]{cursor:pointer}.with-checkbox .checkbox-text[data-v-7743cf8e]{margin-left:10px;cursor:pointer;user-select:none}.input-group .input-group-text[data-v-7743cf8e]{margin-bottom:.5rem}",map:void 0,media:void 0})},__vue_scope_id__$u="data-v-7743cf8e",__vue_module_identifier__$e=void 0,__vue_is_functional_template__$u=!1;function __vue_normalize__$u(e,n,a,r,i,s,l,c){const o=(typeof a=="function"?a.options:a)||{};o.__file="Settings.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(n&&(u=function(d){n.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(m,h){return u.call(h),d(m,h)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$e(){const e=document.head||document.getElementsByTagName("head")[0],n=__vue_create_injector__$e.styles||(__vue_create_injector__$e.styles={}),a=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=a?s.media||"default":i,c=n[l]||(n[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),a&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),a&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(a&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var Settings=__vue_normalize__$u({render:__vue_render__$u,staticRenderFns:__vue_staticRenderFns__$u},__vue_inject_styles__$u,__vue_script__$s,__vue_scope_id__$u,__vue_is_functional_template__$u,__vue_module_identifier__$e,__vue_create_injector__$e),script$t={data(){return{title:"",metadata:"",release_date:"",label:"",explicit:!1,image:"",type:"empty",link:"",body:[]}},mounted(){EventBus.$on("tracklistTab:selectRow",this.selectRow),socket.on("show_album",this.showAlbum),socket.on("show_playlist",this.showPlaylist),socket.on("show_spotifyplaylist",this.showSpotifyPlaylist)},methods:{playPausePreview(e){EventBus.$emit("trackPreview:playPausePreview",e)},reset(){this.title="Loading...",this.image="",this.metadata="",this.label="",this.release_date="",this.explicit=!1,this.type="empty",this.body=[]},addToQueue(e){Downloads.sendAddToQueue(e.currentTarget.dataset.link)},toggleAll(e){this.body.forEach(n=>{n.type=="track"&&(n.selected=e.currentTarget.checked)})},selectedLinks(){var e=[];return this.body&&this.body.forEach(n=>{n.type=="track"&&n.selected&&e.push(this.type=="spotifyPlaylist"?n.uri:n.link)}),e.join(";")},convertDuration:Utils.convertDuration,showAlbum(e){this.reset();const{id:n,title:a,explicit_lyrics:r,label:i,artist:{name:s},tracks:l,tracks:{length:c},release_date:o,cover_xl:u}=e;this.type="album",this.link=`https://www.deezer.com/album/${n}`,this.title=a,this.explicit=r,this.label=i,this.metadata=`${s} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,this.release_date=o.substring(0,10),this.image=u,isEmpty(l)?this.body=null:this.body=l},showPlaylist(e){this.reset();const{id:n,title:a,picture_xl:r,creation_date:i,creator:{name:s},tracks:l,tracks:{length:c}}=e;this.type="playlist",this.link=`https://www.deezer.com/playlist/${n}`,this.title=a,this.image=r,this.release_date=i.substring(0,10),this.metadata=`${this.$t("globals.by",{artist:s})} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,isEmpty(l)?this.body=null:this.body=l},showSpotifyPlaylist(e){this.reset();const{uri:n,name:a,images:r,images:{length:i},owner:{display_name:s},tracks:l,tracks:{length:c}}=e;this.type="spotifyPlaylist",this.link=n,this.title=a,this.image=i?r[0].url:"https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg",this.release_date="",this.metadata=`${this.$t("globals.by",{artist:s})} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,isEmpty(l)?this.body=null:this.body=l},selectRow(e,n){n.selected=!n.selected}}};const __vue_script__$t=script$t;var __vue_render__$v=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{ref:"root",staticClass:"relative fixed-footer bg-background-main image-header"},[a("header",{style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[a("h1",{staticClass:"flex items-center m-0 text-5xl"},[e._v(` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var Settings=__vue_normalize__$u({render:__vue_render__$u,staticRenderFns:__vue_staticRenderFns__$u},__vue_inject_styles__$u,__vue_script__$s,__vue_scope_id__$u,__vue_is_functional_template__$u,__vue_module_identifier__$e,__vue_create_injector__$e),script$t={data(){return{title:"",metadata:"",release_date:"",label:"",explicit:!1,image:"",type:"empty",link:"",body:[]}},mounted(){socket.on("show_album",this.showAlbum),socket.on("show_playlist",this.showPlaylist),socket.on("show_spotifyplaylist",this.showSpotifyPlaylist)},methods:{playPausePreview,reset(){this.title="Loading...",this.image="",this.metadata="",this.label="",this.release_date="",this.explicit=!1,this.type="empty",this.body=[]},addToQueue(e){Downloads.sendAddToQueue(e.currentTarget.dataset.link)},toggleAll(e){this.body.forEach(n=>{n.type=="track"&&(n.selected=e.currentTarget.checked)})},selectedLinks(){var e=[];return this.body&&this.body.forEach(n=>{n.type=="track"&&n.selected&&e.push(this.type=="spotifyPlaylist"?n.uri:n.link)}),e.join(";")},convertDuration:Utils.convertDuration,showAlbum(e){this.reset();const{id:n,title:a,explicit_lyrics:r,label:i,artist:{name:s},tracks:l,tracks:{length:c},release_date:o,cover_xl:u}=e;this.type="album",this.link=`https://www.deezer.com/album/${n}`,this.title=a,this.explicit=r,this.label=i,this.metadata=`${s} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,this.release_date=o.substring(0,10),this.image=u,isEmpty(l)?this.body=null:this.body=l},showPlaylist(e){this.reset();const{id:n,title:a,picture_xl:r,creation_date:i,creator:{name:s},tracks:l,tracks:{length:c}}=e;this.type="playlist",this.link=`https://www.deezer.com/playlist/${n}`,this.title=a,this.image=r,this.release_date=i.substring(0,10),this.metadata=`${this.$t("globals.by",{artist:s})} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,isEmpty(l)?this.body=null:this.body=l},showSpotifyPlaylist(e){this.reset();const{uri:n,name:a,images:r,images:{length:i},owner:{display_name:s},tracks:l,tracks:{length:c}}=e;this.type="spotifyPlaylist",this.link=n,this.title=a,this.image=i?r[0].url:"https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg",this.release_date="",this.metadata=`${this.$t("globals.by",{artist:s})} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,isEmpty(l)?this.body=null:this.body=l},selectRow(e,n){n.selected=!n.selected}}};const __vue_script__$t=script$t;var __vue_render__$v=function(){var e=this,n=e.$createElement,a=e._self._c||n;return a("div",{ref:"root",staticClass:"relative fixed-footer bg-background-main image-header"},[a("header",{style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[a("h1",{staticClass:"flex items-center m-0 text-5xl"},[e._v(` `+e._s(e.title)+" "),e.explicit?a("i",{staticClass:"material-icons title-icon title-icon--right"},[e._v("explicit")]):e._e()]),e._v(" "),a("h2",{staticClass:"m-0 mb-3 text-lg"},[e.metadata?a("p",[e._v(e._s(e.metadata))]):e._e(),e._v(" "),e.release_date?a("p",[e._v(e._s(e.release_date))]):e._e()])]),e._v(" "),a("table",{staticClass:"table table--tracklist"},[a("thead",[a("tr",[e._m(0),e._v(" "),a("th",[e._v("#")]),e._v(" "),a("th",[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),a("th",[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),e.type==="playlist"?a("th",[e._v(e._s(e.$tc("globals.listTabs.album",1)))]):e._e(),e._v(" "),e._m(1),e._v(" "),a("th",{staticClass:"table__icon table__cell--center clickable"},[a("input",{staticClass:"selectAll",attrs:{type:"checkbox"},on:{click:e.toggleAll}})])])]),e._v(" "),a("tbody",[e.type!=="spotifyPlaylist"?[e._l(e.body,function(r,i){return[r.type=="track"?a("tr",{on:{click:function(s){return e.selectRow(i,r)}}},[a("td",{staticClass:"table__cell--x-small table__cell--center"},[a("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[a("i",e._g({staticClass:"material-icons",class:{preview_playlist_controls:r.preview,"cursor-pointer":r.preview,disabled:!r.preview},attrs:{"data-preview":r.preview,title:e.$t("globals.play_hint")}},{click:r.preview?e.playPausePreview:!1}),[e._v(` play_arrow `)])])]),e._v(" "),a("td",{staticClass:"table__cell--small table__cell--center track_position"},[e._v(` diff --git a/src/components/globals/PreviewControls.vue b/src/components/globals/PreviewControls.vue index e0fa763..de6bfad 100644 --- a/src/components/globals/PreviewControls.vue +++ b/src/components/globals/PreviewControls.vue @@ -10,16 +10,12 @@ \ No newline at end of file diff --git a/src/components/globals/TheTrackPreview.vue b/src/components/globals/TheTrackPreview.vue index c795d15..5de621a 100644 --- a/src/components/globals/TheTrackPreview.vue +++ b/src/components/globals/TheTrackPreview.vue @@ -5,10 +5,22 @@ \ No newline at end of file