From 97764b833587e56cafb2b4adbc2c085fc23ba0f9 Mon Sep 17 00:00:00 2001 From: Roberto Tonino Date: Tue, 13 Oct 2020 22:32:06 +0200 Subject: [PATCH] style: fixed pages without back button being cut; build: v1.1.2 --- package.json | 2 +- public/js/bundle.js | 2 +- src/components/TheContent.vue | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fc7e06d..291437f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deemix-webui", - "version": "1.1.1", + "version": "1.1.2", "homepage": "https://codeberg.org/RemixDev/deemix-webui/src/master/README.md", "repository": { "type": "git", diff --git a/public/js/bundle.js b/public/js/bundle.js index 54dfa25..86b22ef 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -17,7 +17,7 @@ function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:a});else * * Copyright (C) 2018 Varun A P */ -!function(t,a){e.exports?e.exports=a():t.Toastify=a()}(Oo,(function(e){var t=function(e){return new t.lib.init(e)};function a(e,t){return!(!e||"string"!=typeof t)&&!!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1)}return t.lib=t.prototype={toastify:"1.8.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||"Hi there!",this.options.node=e.node,this.options.duration=0===e.duration?0:e.duration||3e3,this.options.selector=e.selector,this.options.callback=e.callback||function(){},this.options.destination=e.destination,this.options.newWindow=e.newWindow||!1,this.options.close=e.close||!1,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=e.positionLeft||!1,this.options.position=e.position||"",this.options.backgroundColor=e.backgroundColor,this.options.avatar=e.avatar||"",this.options.className=e.className||"",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.onClick=e.onClick,this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");if(e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&(e.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(e.innerHTML=this.options.text,""!==this.options.avatar){var t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(t):e.insertAdjacentElement("beforeend",t)}if(!0===this.options.close){var a=document.createElement("span");a.innerHTML="✖",a.className="toast-close",a.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&n>360?e.insertAdjacentElement("afterbegin",a):e.appendChild(a)}if(this.options.stopOnFocus&&this.options.duration>0){const t=this;e.addEventListener("mouseover",(function(t){window.clearTimeout(e.timeOutValue)})),e.addEventListener("mouseleave",(function(){e.timeOutValue=window.setTimeout((function(){t.removeElement(e)}),t.options.duration)}))}return void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return e.insertBefore(this.toastElement,e.firstChild),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},n={top:15,bottom:15},i={top:15,bottom:15},r=document.getElementsByClassName("toastify"),s=0;s0?window.innerWidth:screen.width)<=360?(r[s].style[e]=i[e]+"px",i[e]+=o+15):!0===a(r[s],"toastify-left")?(r[s].style[e]=t[e]+"px",t[e]+=o+15):(r[s].style[e]=n[e]+"px",n[e]+=o+15)}return this},t.lib.init.prototype=t.lib,t}))}));let Bo={};const qo=function(e,t=null,a=!0,n=null){if(Bo[n]){let i=Bo[n],r=document.querySelectorAll(`div.toastify[toast_id=${n}]`);e&&r.forEach(t=>{t.querySelectorAll(".toast-message").forEach(t=>{t.innerHTML=e})}),t&&(t="loading"==t?'
':`${t}`,r.forEach(e=>{e.querySelectorAll(".toast-icon").forEach(e=>{e.innerHTML=t})})),null!==a&&a&&(r.forEach(e=>{e.classList.add("dismissable")}),setTimeout(()=>{i.hideToast(),delete Bo[n]},3e3))}else{let i=Uo({text:`${t=null==t?"":"loading"==t?'
':`${t}`}
${e}`,duration:a?3e3:0,gravity:"bottom",position:"left",className:a?"dismissable":"",onClick:function(){let e=!0;if(n){let t=document.querySelector(`div.toastify[toast_id=${n}]`).classList;t&&(e=-1!=Array.prototype.slice.call(t).indexOf("dismissable"))}i&&e&&(i.hideToast(),n&&delete Bo[n])}}).showToast();n&&(Bo[n]=i,i.toastElement.setAttribute("toast_id",n))}};Eo.on("toast",e=>{const{msg:t,icon:a,dismiss:n,id:i}=e;qo(t,a||null,void 0===n||n,i||null)});var Vo=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheDownloadBar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",staticClass:"tab_hidden",attrs:{id:"download_tab_container","data-label":e.$t("downloads"),"aria-label":"downloads"},on:{transitionend:function(t){e.$refs.container.style.transition=""}}},[a("div",{ref:"dragHandler",attrs:{id:"download_tab_drag_handler"},on:{mousedown:function(t){return t.preventDefault(),e.startDrag(t)}}}),e._v(" "),a("i",{ref:"toggler",staticClass:"material-icons download_bar_icon",attrs:{id:"toggle_download_tab",title:e.$t("globals.toggle_download_tab_hint")},on:{click:function(t){return t.preventDefault(),e.toggleDownloadTab(t)}}}),e._v(" "),a("div",{attrs:{id:"queue_buttons"}},[e.clientMode?a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.open_downloads_folder")},on:{click:e.openDownloadsFolder}},[e._v("\n\t\t\tfolder_open\n\t\t")]):e._e(),e._v(" "),a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.clean_queue_hint")},on:{click:e.cleanQueue}},[e._v("\n\t\t\tclear_all\n\t\t")]),e._v(" "),a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.cancel_queue_hint")},on:{click:e.cancelQueue}},[e._v("\n\t\t\tdelete_sweep\n\t\t")])]),e._v(" "),a("div",{ref:"list",attrs:{id:"download_list"}},e._l(e.queueList,(function(t){return a("QueueItem",{key:t.uuid,attrs:{"queue-item":t},on:{"show-errors":e.showErrorsTab,"remove-item":e.onRemoveItem}})})),1)])},staticRenderFns:[]},(function(e){e&&e("data-v-20b57f82_0",{source:"#download_tab_container[data-v-20b57f82]{height:100vh}",map:void 0,media:void 0})}),{components:{QueueItem:Lo},data:()=>({cachedTabWidth:parseInt(localStorage.getItem("downloadTabWidth"))||300,queue:[],queueList:{},queueComplete:[]}),computed:{...wo({clientMode:"getClientMode"})},created(){const e=e=>{e.ctrlKey&&"b"===e.key&&this.toggleDownloadTab()};document.addEventListener("keyup",e),this.$on("hook:destroyed",()=>{document.removeEventListener("keyup",e)})},mounted(){Eo.on("startDownload",this.startDownload),Eo.on("startConversion",this.startConversion),Eo.on("init_downloadQueue",this.initQueue),Eo.on("addedToQueue",this.addToQueue),Eo.on("updateQueue",this.updateQueue),Eo.on("removedFromQueue",this.removeFromQueue),Eo.on("finishDownload",this.finishDownload),Eo.on("removedAllDownloads",this.removeAllDownloads),Eo.on("removedFinishedDownloads",this.removedFinishedDownloads),"true"===localStorage.getItem("slimDownloads")&&this.$refs.list.classList.add("slim"),"true"===localStorage.getItem("downloadTabOpen")&&(this.$refs.container.classList.remove("tab_hidden"),this.setTabWidth(this.cachedTabWidth)),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",this.handleDrag)}),window.addEventListener("beforeunload",()=>{localStorage.setItem("downloadTabWidth",this.cachedTabWidth)})},methods:{...Ao(["setErrors"]),onRemoveItem(e){Eo.emit("removeFromQueue",e)},setTabWidth(e){void 0===e?(this.$refs.container.style.width="",this.$refs.list.style.width=""):(this.$refs.container.style.width=e+"px",this.$refs.list.style.width=e+"px")},initQueue(e){const{queue:t,queueComplete:a,currentItem:n,queueList:i,restored:r}=e;a.length&&a.forEach(e=>{i[e].silent=!0,this.addToQueue(i[e])}),n&&(i[n].silent=!0,this.addToQueue(i[n],!0)),t.forEach(e=>{i[e].silent=!0,this.addToQueue(i[e])}),r&&(qo(this.$t("toasts.queueRestored"),"done",!0,"restoring_queue"),Eo.emit("queueRestored"))},addToQueue(e,t=!1){if(Array.isArray(e)){if(e.length>1)return e.forEach((e,t)=>{e.silent=!0,this.addToQueue(e)}),void qo(this.$t("toasts.addedMoreToQueue",{n:e.length}),"playlist_add_check");e=e[0]}this.$set(e,"current",t),this.$set(this.queueList,e.uuid,e);if(e.downloaded+e.failed==e.size){const t=-1==this.queueComplete.indexOf(e.uuid);this.$set(this.queueList[e.uuid],"status","download finished"),t&&this.queueComplete.push(e.uuid)}else{-1==this.queue.indexOf(e.uuid)&&this.queue.push(e.uuid)}(e.progress>0&&e.progress<100||t)&&this.startDownload(e.uuid),e.silent||qo(this.$t("toasts.addedToQueue",{item:e.title}),"playlist_add_check")},updateQueue(e){const{uuid:t,downloaded:a,failed:n,progress:i,conversion:r,error:s,data:o,errid:l}=e;t&&this.queue.indexOf(t)>-1&&(a&&this.queueList[t].downloaded++,n&&(this.queueList[t].failed++,this.queueList[t].errors.push({message:s,data:o,errid:l})),i&&(this.queueList[t].progress=i),r&&(this.queueList[t].conversion=r))},removeFromQueue(e){let t=this.queue.indexOf(e);t>-1&&(this.$delete(this.queue,t),this.$delete(this.queueList,e))},removeAllDownloads(e){if(this.queueComplete=[],e){this.queue=[e];let t=this.queueList[e];this.queueList={},this.queueList[e]=t}else this.queue=[],this.queueList={}},removedFinishedDownloads(){this.queueComplete.forEach(e=>{this.$delete(this.queueList,e)}),this.queueComplete=[]},toggleDownloadTab(){this.setTabWidth(),this.$refs.container.style.transition="all 250ms ease-in-out";let e=this.$refs.container.classList.toggle("tab_hidden");e||this.setTabWidth(this.cachedTabWidth),localStorage.setItem("downloadTabOpen",!e)},cleanQueue(){Eo.emit("removeFinishedDownloads")},cancelQueue(){Eo.emit("cancelAllDownloads")},openDownloadsFolder(){Eo.emit("openDownloadsFolder")},handleDrag(e){let t=window.innerWidth-e.pageX+2;t<250?t=250:t>500&&(t=500),this.cachedTabWidth=t,this.setTabWidth(t)},startDrag(){document.addEventListener("mousemove",this.handleDrag)},startDownload(e){this.$set(this.queueList[e],"status","downloading")},finishDownload(e){if(!(this.queue.indexOf(e)>-1))return;this.$set(this.queueList[e],"status","download finished"),qo(this.$t("toasts.finishDownload",{item:this.queueList[e].title}),"done");let t=this.queue.indexOf(e);t>-1&&(this.queue.splice(t,1),this.queueComplete.push(e)),this.queue.length<=0&&qo(this.$t("toasts.allDownloaded"),"done_all")},startConversion(e){this.$set(this.queueList[e],"status","converting"),this.$set(this.queueList[e],"conversion",0)},async showErrorsTab(e){await this.setErrors(e),this.$router.push({name:"Errors"})}}},"data-v-20b57f82",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));var Go=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};return l.__file="BaseLoadingPlaceholder.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n,l}({render:function(e,t){var a=t._c;return a("div",{staticClass:"loading_placeholder",class:{"loading_placeholder--hidden":t.props.hidden},attrs:{id:t.props.id}},[a("span",{staticClass:"loading_placeholder__text"},[t._v(t._s(t.props.text))]),t._v(" "),t._m(0)])},staticRenderFns:[function(e,t){var a=t._c;return a("div",{staticClass:"lds-ring"},[a("div"),t._v(" "),a("div"),t._v(" "),a("div"),t._v(" "),a("div")])}]},0,{props:{text:{type:String,required:!1,default:"Loading..."},id:{type:String,required:!1},hidden:{type:Boolean,required:!1,default:!1}}},void 0,!0);function Ho(e,t=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");Eo.emit("addToQueue",{url:e,bitrate:t},()=>{})}var Wo={sendAddToQueue:Ho};function Ko(e){let t=e.toLowerCase();if(t.startsWith("http")){if(t.indexOf("deezer.com")>=0||t.indexOf("deezer.page.link")>=0||t.indexOf("open.spotify.com")>=0)return!0}else if(t.startsWith("spotify:"))return!0;return!1}function Qo(e){let t,a;return t=Math.floor(e/60),a=e-60*t,a<10&&(a="0"+a),t+":"+a}function Jo(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function Yo(e,t,a){var n;return function(){var i=this,r=arguments,s=function(){n=null,a||e.apply(i,r)},o=a&&!n;clearTimeout(n),n=setTimeout(s,t),o&&e.apply(i,r)}}function Zo(e){const t=document.createElement("input");document.body.appendChild(t),t.setAttribute("type","text"),t.setAttribute("value",e),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()}var Xo={isValidURL:Ko,convertDuration:Qo,convertDurationSeparated:function(e){let t,a,n;return a=Math.floor(e/60),t=Math.floor(a/60),n=e-60*a,a-=60*t,[t,a,n]},numberWithDots:Jo,debounce:Yo};const el=[{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 tl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheContextMenu.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;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(t){return a("button",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"option.show"}],key:t.label,staticClass:"btn menu-option",on:{click:function(e){return e.preventDefault(),t.action(e)}}},[a("span",{staticClass:"menu-option__text"},[e._v(e._s(t.label))])])})),0)},staticRenderFns:[]},(function(e){e&&e("data-v-56674a00_0",{source:".context-menu[data-v-56674a00]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--foreground-inverted);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-56674a00]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-56674a00]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-56674a00]{text-transform:capitalize}button[data-v-56674a00]{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-56674a00]:focus{outline:0}button[data-v-56674a00]:active{background-color:unset;transform:unset}button[data-v-56674a00]:hover{background:unset;border:unset}",map:void 0,media:void 0})}),{data:()=>({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:()=>{Zo(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{Zo(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{Zo(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(e=>{document.execCommand("insertText",void 0,e)}):document.execCommand("paste")}}};let t=Object.values(e).length+1;return el.forEach((a,n)=>{e[a.objName]={label:""+this.$t("globals.download",{thing:a.label}),show:!1,position:t+n,action:Ho.bind(null,this.deezerHref,a.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,t)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,el.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,t){this.xPos=e+"px",this.yPos=t+"px",this.$nextTick().then(()=>{const{innerHeight:a,innerWidth:n}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,r=t+this.$refs.contextMenu.getBoundingClientRect().height;if(i>n){const t=i-n+15;this.xPos=e-t+"px"}if(r>a){const e=r-a+15;this.yPos=t-e+"px"}})},showDeezerOptions(){this.options.copyDeezerLink.show=!0,el.forEach(e=>{this.options[e.objName].show=!0})}}},"data-v-56674a00",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),al=new ka;async function nl(e,t,{duration:a=1e3,easing:n=il,interval:i=13}={}){const r=e.volume,s=t-r;if(!(s&&a&&n&&i))return e.volume=t,Promise.resolve();const o=Math.floor(a/i);let l=1;return new Promise(t=>{const a=setInterval(()=>{e.volume=r+n(l/o)*s,++l===o&&(clearInterval(a),t())},i)})}function il(e){return.5-Math.cos(e*Math.PI)/2}var rl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};return l.__file="TheTrackPreview.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n,l}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("audio",{ref:"preview",attrs:{id:"preview-track"},on:{canplay:this.onCanPlay,timeupdate:this.onTimeUpdate}},[t("source",{attrs:{id:"preview-track_source",src:"",type:"audio/mpeg"}})])},staticRenderFns:[]},0,{data:()=>({previewStopped:!1}),mounted(){this.$refs.preview.volume=1,al.$on("trackPreview:playPausePreview",this.playPausePreview),al.$on("trackPreview:stopStackedTabsPreview",this.stopStackedTabsPreview),al.$on("trackPreview:previewMouseEnter",this.previewMouseEnter),al.$on("trackPreview:previewMouseLeave",this.previewMouseLeave)},methods:{async onCanPlay(){await this.$refs.preview.play(),this.previewStopped=!1,await nl(this.$refs.preview,window.vol.preview_max_volume/100,{duration:500})},async onTimeUpdate(){if(isNaN(this.$refs.preview.duration))return;let e=this.$refs.preview.duration;isFinite(e)||(e=30),e-this.$refs.preview.currentTime>=1||this.previewStopped||(await nl(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,document.querySelectorAll("a[playing] > .preview_controls").forEach(e=>{e.style.opacity=0}),document.querySelectorAll("*").forEach(e=>{e.removeAttribute("playing")}),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(e=>{e.textContent="play_arrow"}))},async playPausePreview(e){e.preventDefault(),e.stopPropagation();const{currentTarget:t}=event;var a="I"==t.tagName?t:t.querySelector("i");t.hasAttribute("playing")?this.$refs.preview.paused?(this.$refs.preview.play(),this.previewStopped=!1,a.innerText="pause",await nl(this.$refs.preview,window.vol.preview_max_volume/100,{duration:500})):(this.previewStopped=!0,a.innerText="play_arrow",await nl(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause()):(document.querySelectorAll("*").forEach(e=>{e.removeAttribute("playing")}),t.setAttribute("playing",!0),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(e=>{e.textContent="play_arrow"}),document.querySelectorAll(".preview_controls").forEach(e=>{e.style.opacity=0}),a.innerText="pause",a.style.opacity=1,this.previewStopped=!1,await nl(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),document.getElementById("preview-track_source").src=t.getAttribute("data-preview"),this.$refs.preview.load())},async stopStackedTabsPreview(){let e=Array.prototype.slice.call(document.querySelectorAll(".preview_playlist_controls[playing]"));0!==e.length&&(await nl(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,e.forEach(e=>{e.removeAttribute("playing"),e.innerText="play_arrow"}))},previewMouseEnter(e){e.currentTarget.style.opacity=1},previewMouseLeave(e){const{currentTarget:t}=e,a=t.parentElement.hasAttribute("playing");(a&&this.previewStopped||!a)&&(t.style.opacity=0)}}},void 0,!1);var sl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheQualityModal.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;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(t){return e.tryToDownloadTrack(t)}}},[a("div",{staticClass:"smallmodal-content"},[a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"9"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"FLAC"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"3"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"MP3 320kbps"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"1"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"MP3 128kbps"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"15"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [HQ]"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"14"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [MQ]"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"13"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [LQ]"}))+"\n\t\t")])])])},staticRenderFns:[]},(function(e){e&&e("data-v-04587fed_0",{source:".smallmodal{position:fixed;z-index:1250;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:hsla(0,0%,0%,.4);animation-duration:.3s}.smallmodal-content{background-color:transparent;margin:auto;width:var(--modal-content-width);position:relative;top:50%;transform:translateY(-50%)}.smallmodal-content button{width:100%;margin-bottom:8px}",map:void 0,media:void 0})}),{data:()=>({open:!1,url:""}),mounted(){this.$root.$on("QualityModal:open",this.openModal),this.$refs.modal.addEventListener("webkitAnimationEnd",this.handleAnimationEnd)},methods:{tryToDownloadTrack(e){const{target:t}=e;this.$refs.modal.classList.add("animated","fadeOut"),t.matches(".quality-button")&&Wo.sendAddToQueue(this.url,t.dataset.qualityValue)},openModal(e){this.url=e,this.open=!0,this.$refs.modal.classList.add("animated","fadeIn")},handleAnimationEnd(e){const{animationName:t}=e;this.$refs.modal.classList.remove("animated",t),"fadeIn"!==t&&(this.open=!1)}}},void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));var ol=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="ConfirmModal.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{ref:"wrapper",staticClass:"wrapper"},[t("div",{ref:"body",staticClass:"body animate__animated animate__bounce"},[t("h1",{staticStyle:{flex:"1"}},[this._v(this._s(this.titleText))]),this._v(" "),this._m(0)]),this._v(" "),t("div",{staticClass:"overlay"})])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"confirm-area"},[t("button",{staticClass:"no-hover"},[this._v("Text")]),this._v(" "),t("button",{staticClass:"no-hover bg-red-600"},[this._v("Text")])])}]},(function(e){e&&e("data-v-6b9098da_0",{source:".wrapper[data-v-6b9098da]{display:grid;place-items:center;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1000}.body[data-v-6b9098da]{position:relative;display:flex;flex-direction:column;width:50vw;height:30vh;border-radius:15px;padding:2rem;background:var(--secondary-background);z-index:2;box-shadow:9px 10px 39px 12px var(--main-background)}.confirm-area[data-v-6b9098da]{position:relative;flex:1;display:flex;justify-content:flex-end;align-items:flex-end}.overlay[data-v-6b9098da]{position:absolute;top:0;left:0;right:0;bottom:0;background:var(--secondary-background);opacity:.75;z-index:1}",map:void 0,media:void 0})}),{data:()=>({titleText:"Are you sure you want to reset settings to default?"}),mounted(){setTimeout(()=>{},2e3)}},"data-v-6b9098da",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));var ll=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="App.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("TheSidebar"),this._v(" "),t("div",{staticClass:"app-container"},[t("div",{staticClass:"content-container"},[t("TheSearchBar"),this._v(" "),t("TheContent")],1),this._v(" "),t("TheDownloadBar")],1),this._v(" "),t("BaseLoadingPlaceholder",{attrs:{id:"start_app_placeholder",text:"Connecting to the server..."}}),this._v(" "),t("TheTrackPreview"),this._v(" "),t("TheQualityModal"),this._v(" "),t("TheContextMenu")],1)},staticRenderFns:[]},(function(e){e&&e("data-v-1cb1ae21_0",{source:".app-container{display:flex}.content-container{width:100%;display:flex;flex-direction:column;margin-left:48px}",map:void 0,media:void 0})}),{components:{TheSidebar:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheSidebar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("aside",{attrs:{id:"sidebar",role:"navigation","aria-label":"sidebar"}},[e._l(e.links,(function(t){return a("router-link",{key:t.id,staticClass:"main_tablinks",class:{active:e.activeTablink===t.name},attrs:{tag:"a",id:t.id,"aria-label":t.ariaLabel,to:{name:t.routerName}},nativeOn:{click:function(a){e.activeTablink=t.name}}},[a("i",{staticClass:"material-icons side_icon"},[e._v(e._s(t.icon))]),e._v(" "),a("span",{staticClass:"main_tablinks_text"},[e._v(e._s(e.$t(t.label)))]),e._v(" "),"about"===t.name&&e.updateAvailable?a("span",{staticClass:"bg-red-600 w-3 h-3 rounded-full",attrs:{id:"update-notification"}}):e._e()])})),e._v(" "),a("span",{staticClass:"main_tablinks",attrs:{id:"theme_selector",role:"link","aria-label":"theme selector"}},[a("i",{staticClass:"material-icons side_icon side_icon--theme"},[e._v("palette")]),e._v(" "),a("div",{attrs:{id:"theme_togglers"}},e._l(e.themes,(function(t){return a("div",{key:t,staticClass:"theme_toggler",class:[{"theme_toggler--active":e.activeTheme===t},"theme_toggler--"+t],on:{click:function(a){return e.changeTheme(t)}}})})),0)]),e._v(" "),a("div",{class:{online:e.appOnline,offline:!e.appOnline},attrs:{id:"network-status"}},[e.appOnline?a("i",{staticClass:"material-icons"},[e._v("wifi")]):a("i",{staticClass:"material-icons"},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}}),e._v(" "),a("path",{attrs:{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0z"}})])])])],2)},staticRenderFns:[]},(function(e){e&&e("data-v-7966f1dc_0",{source:"#network-status[data-v-7966f1dc]{display:flex;justify-content:center;align-items:center;position:relative;margin-top:auto;bottom:0}#network-status.online i.material-icons[data-v-7966f1dc]{color:#009e51}#network-status.offline i.material-icons svg[data-v-7966f1dc]{fill:red;width:1em;height:1em}#update-notification[data-v-7966f1dc]{position:absolute;left:30px;top:12px}",map:void 0,media:void 0})}),{data:()=>({appOnline:null,activeTheme:"light",themes:["purple","dark","light"],activeTablink:"home",updateAvailable:!1,links:[{id:"main_home_tablink",name:"home",ariaLabel:"home",routerName:"Home",icon:"home",label:"sidebar.home"},{id:"main_search_tablink",name:"search",ariaLabel:"search",routerName:"Search",icon:"search",label:"sidebar.search"},{id:"main_charts_tablink",name:"charts",ariaLabel:"charts",routerName:"Charts",icon:"show_chart",label:"sidebar.charts"},{id:"main_favorites_tablink",name:"favorites",ariaLabel:"favorites",routerName:"Favorites",icon:"star",label:"sidebar.favorites"},{id:"main_analyzer_tablink",name:"analyzer",ariaLabel:"link analyzer",routerName:"Link Analyzer",icon:"link",label:"sidebar.linkAnalyzer"},{id:"main_settings_tablink",name:"settings",ariaLabel:"settings",routerName:"Settings",icon:"settings",label:"sidebar.settings"},{id:"main_about_tablink",name:"about",ariaLabel:"info",routerName:"About",icon:"info",label:"sidebar.about"}]}),mounted(){this.appOnline=navigator.onLine,window.addEventListener("online",()=>{this.appOnline=!0}),window.addEventListener("offline",()=>{this.appOnline=!1}),this.activeTheme=localStorage.getItem("selectedTheme")||"dark",this.$router.afterEach((e,t)=>{const a=this.links.find(t=>t.routerName===e.name);a&&(this.activeTablink=a.name)}),Eo.on("updateAvailable",()=>{this.updateAvailable=!0})},methods:{changeTheme(e){if(e===this.activeTheme)return;this.activeTheme=e,document.documentElement.setAttribute("data-theme",e),localStorage.setItem("selectedTheme",e);const t=document.querySelectorAll("*");t.forEach(e=>{e.classList.add("changing-theme")}),document.documentElement.addEventListener("transitionend",(function e(){t.forEach(e=>{e.classList.remove("changing-theme")}),document.documentElement.removeEventListener("transitionend",e)}))}}},"data-v-7966f1dc",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),TheSearchBar:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheSearchBar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("header",{attrs:{id:"search","aria-label":"searchbar"}},[e._m(0),e._v(" "),a("input",{ref:"searchbar",attrs:{id:"searchbar",autocomplete:"off",type:"search",name:"searchbar",value:"",placeholder:e.$t("searchbar"),autofocus:""},on:{keyup:function(t){return e.handleSearchBarKeyup(t)}}})])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"search__icon"},[t("i",{staticClass:"material-icons"},[this._v("search")])])}]},(function(e){e&&e("data-v-4c83d619_0",{source:"#search{background-color:var(--secondary-background);padding:0 1em;display:flex;align-items:center;border:1px solid transparent;transition:border .2s ease-in-out;border-radius:15px;margin:10px 10px 20px 10px}#search:focus-within{border:1px solid var(--foreground)}#search .search__icon{width:2rem;height:2rem}#search .search__icon i{font-size:2rem;color:var(--foreground)}#search #searchbar{height:45px;padding-left:.5em;border:0;border-radius:0;background-color:var(--secondary-background);color:var(--foreground);font-size:1.2rem;font-family:'Open Sans';font-weight:300;margin-bottom:0}#search #searchbar:focus{outline:0}#search #searchbar:-webkit-autofill,#search #searchbar:-webkit-autofill:active,#search #searchbar:-webkit-autofill:focus,#search #searchbar:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 45px var(--secondary-background) inset!important;box-shadow:0 0 0 45px var(--secondary-background) inset!important}",map:void 0,media:void 0})}),{data:()=>({lastTextSearch:""}),created(){const e=e=>{70===e.keyCode&&e.ctrlKey&&(e.preventDefault(),this.$refs.searchbar.focus())},t=e=>{"Backspace"==e.key&&e.ctrlKey&&e.shiftKey&&(this.$refs.searchbar.value="",this.$refs.searchbar.focus())};document.addEventListener("keydown",e),document.addEventListener("keyup",t),this.$on("hook:destroyed",()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)})},methods:{test(){console.log("test passato")},async handleSearchBarKeyup(e){if(!(13===e.keyCode))return;let t=this.$refs.searchbar.value;if(""===t)return;let a=Ko(t),n=e.ctrlKey,i="Link Analyzer"===this.$route.name,r="Search"===this.$route.name,s=t===this.lastTextSearch;if(a)n?this.$root.$emit("QualityModal:open",t):i?Eo.emit("analyzeLink",t):Ho(t);else{if(r&&s)return void this.$root.$emit("mainSearch:updateResults",t);r||await this.$router.push({name:"Search"}),s||(this.$root.$emit("updateSearchLoadingState",!0),this.lastTextSearch=t),this.$root.$emit("mainSearch:showNewResults",t)}}}},void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),TheDownloadBar:Vo,TheTrackPreview:rl,TheQualityModal:sl,BaseLoadingPlaceholder:Go,TheContextMenu:tl,TheContent:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheContent.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("main",{ref:"content",attrs:{id:"content","aria-label":"main content"},on:{scroll:function(t){"Search"===e.$route.name&&e.handleContentScroll(t)}}},[a("div",{attrs:{id:"container"}},[a("BaseLoadingPlaceholder",{attrs:{id:"search_placeholder",text:"Searching...",hidden:!e.loading}}),e._v(" "),e.showBackButton?a("BackButton",{staticClass:"sticky -ml-20",staticStyle:{top:"1rem"}}):e._e(),e._v(" "),a("keep-alive",[e.$route.meta.notKeepAlive?e._e():a("router-view",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"!loading"}],key:e.$route.fullPath,staticClass:"-mt-16",attrs:{"perform-scrolled-search":e.performScrolledSearch}})],1),e._v(" "),e.$route.meta.notKeepAlive?a("router-view",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"!loading"}],key:e.$route.fullPath,staticClass:"-mt-16",attrs:{"perform-scrolled-search":e.performScrolledSearch}}):e._e()],1)])},staticRenderFns:[]},(function(e){e&&e("data-v-39637c52_0",{source:"#container{margin:0 auto;max-width:1280px;width:var(--container-width);transform:scale(1)}main{background-color:var(--main-background);padding-right:5px;width:100%;height:calc(100vh - 93px);overflow-y:scroll;overflow-x:hidden}main::-webkit-scrollbar{width:10px}main::-webkit-scrollbar-track{background:var(--main-background)}main::-webkit-scrollbar-thumb{background:var(--main-scroll);border-radius:4px;width:6px;padding:0 2px}",map:void 0,media:void 0})}),{components:{BaseLoadingPlaceholder:Go,BackButton:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="BackButton.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("button",{staticClass:"btn-primary border-transparent border-solid flex items-center justify-center p-1 m-0 w-16 h-16 rounded-full z-10",on:{click:function(t){return e.$router.back()}}},[a("i",{staticClass:"material-icons mirrored text-4xl text-white"},[e._v("forward")])])},staticRenderFns:[]},(function(e){e&&e("data-v-74f206d4_0",{source:"button[data-v-74f206d4]{transition:background .2s ease-in-out}",map:void 0,media:void 0})}),{},"data-v-74f206d4",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}))},data:()=>({performScrolledSearch:!1,loading:!1}),computed:{showBackButton(){return-1!==["Tracklist","Artist","Album","Playlist","Spotify Playlist"].indexOf(this.$route.name)}},mounted(){this.$root.$on("updateSearchLoadingState",e=>{this.loading=e}),this.$router.beforeEach((e,t,a)=>{this.$refs.content.scrollTo(0,0),a()})},methods:{handleContentScroll:Yo((async function(){this.$refs.content.scrollTop+this.$refs.content.clientHeight-1)}return t.lib=t.prototype={toastify:"1.8.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||"Hi there!",this.options.node=e.node,this.options.duration=0===e.duration?0:e.duration||3e3,this.options.selector=e.selector,this.options.callback=e.callback||function(){},this.options.destination=e.destination,this.options.newWindow=e.newWindow||!1,this.options.close=e.close||!1,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=e.positionLeft||!1,this.options.position=e.position||"",this.options.backgroundColor=e.backgroundColor,this.options.avatar=e.avatar||"",this.options.className=e.className||"",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.onClick=e.onClick,this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");if(e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&(e.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(e.innerHTML=this.options.text,""!==this.options.avatar){var t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(t):e.insertAdjacentElement("beforeend",t)}if(!0===this.options.close){var a=document.createElement("span");a.innerHTML="✖",a.className="toast-close",a.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&n>360?e.insertAdjacentElement("afterbegin",a):e.appendChild(a)}if(this.options.stopOnFocus&&this.options.duration>0){const t=this;e.addEventListener("mouseover",(function(t){window.clearTimeout(e.timeOutValue)})),e.addEventListener("mouseleave",(function(){e.timeOutValue=window.setTimeout((function(){t.removeElement(e)}),t.options.duration)}))}return void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return e.insertBefore(this.toastElement,e.firstChild),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},n={top:15,bottom:15},i={top:15,bottom:15},r=document.getElementsByClassName("toastify"),s=0;s0?window.innerWidth:screen.width)<=360?(r[s].style[e]=i[e]+"px",i[e]+=o+15):!0===a(r[s],"toastify-left")?(r[s].style[e]=t[e]+"px",t[e]+=o+15):(r[s].style[e]=n[e]+"px",n[e]+=o+15)}return this},t.lib.init.prototype=t.lib,t}))}));let Bo={};const qo=function(e,t=null,a=!0,n=null){if(Bo[n]){let i=Bo[n],r=document.querySelectorAll(`div.toastify[toast_id=${n}]`);e&&r.forEach(t=>{t.querySelectorAll(".toast-message").forEach(t=>{t.innerHTML=e})}),t&&(t="loading"==t?'
':`${t}`,r.forEach(e=>{e.querySelectorAll(".toast-icon").forEach(e=>{e.innerHTML=t})})),null!==a&&a&&(r.forEach(e=>{e.classList.add("dismissable")}),setTimeout(()=>{i.hideToast(),delete Bo[n]},3e3))}else{let i=Uo({text:`${t=null==t?"":"loading"==t?'
':`${t}`}
${e}`,duration:a?3e3:0,gravity:"bottom",position:"left",className:a?"dismissable":"",onClick:function(){let e=!0;if(n){let t=document.querySelector(`div.toastify[toast_id=${n}]`).classList;t&&(e=-1!=Array.prototype.slice.call(t).indexOf("dismissable"))}i&&e&&(i.hideToast(),n&&delete Bo[n])}}).showToast();n&&(Bo[n]=i,i.toastElement.setAttribute("toast_id",n))}};Eo.on("toast",e=>{const{msg:t,icon:a,dismiss:n,id:i}=e;qo(t,a||null,void 0===n||n,i||null)});var Vo=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheDownloadBar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",staticClass:"tab_hidden",attrs:{id:"download_tab_container","data-label":e.$t("downloads"),"aria-label":"downloads"},on:{transitionend:function(t){e.$refs.container.style.transition=""}}},[a("div",{ref:"dragHandler",attrs:{id:"download_tab_drag_handler"},on:{mousedown:function(t){return t.preventDefault(),e.startDrag(t)}}}),e._v(" "),a("i",{ref:"toggler",staticClass:"material-icons download_bar_icon",attrs:{id:"toggle_download_tab",title:e.$t("globals.toggle_download_tab_hint")},on:{click:function(t){return t.preventDefault(),e.toggleDownloadTab(t)}}}),e._v(" "),a("div",{attrs:{id:"queue_buttons"}},[e.clientMode?a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.open_downloads_folder")},on:{click:e.openDownloadsFolder}},[e._v("\n\t\t\tfolder_open\n\t\t")]):e._e(),e._v(" "),a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.clean_queue_hint")},on:{click:e.cleanQueue}},[e._v("\n\t\t\tclear_all\n\t\t")]),e._v(" "),a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.cancel_queue_hint")},on:{click:e.cancelQueue}},[e._v("\n\t\t\tdelete_sweep\n\t\t")])]),e._v(" "),a("div",{ref:"list",attrs:{id:"download_list"}},e._l(e.queueList,(function(t){return a("QueueItem",{key:t.uuid,attrs:{"queue-item":t},on:{"show-errors":e.showErrorsTab,"remove-item":e.onRemoveItem}})})),1)])},staticRenderFns:[]},(function(e){e&&e("data-v-20b57f82_0",{source:"#download_tab_container[data-v-20b57f82]{height:100vh}",map:void 0,media:void 0})}),{components:{QueueItem:Lo},data:()=>({cachedTabWidth:parseInt(localStorage.getItem("downloadTabWidth"))||300,queue:[],queueList:{},queueComplete:[]}),computed:{...wo({clientMode:"getClientMode"})},created(){const e=e=>{e.ctrlKey&&"b"===e.key&&this.toggleDownloadTab()};document.addEventListener("keyup",e),this.$on("hook:destroyed",()=>{document.removeEventListener("keyup",e)})},mounted(){Eo.on("startDownload",this.startDownload),Eo.on("startConversion",this.startConversion),Eo.on("init_downloadQueue",this.initQueue),Eo.on("addedToQueue",this.addToQueue),Eo.on("updateQueue",this.updateQueue),Eo.on("removedFromQueue",this.removeFromQueue),Eo.on("finishDownload",this.finishDownload),Eo.on("removedAllDownloads",this.removeAllDownloads),Eo.on("removedFinishedDownloads",this.removedFinishedDownloads),"true"===localStorage.getItem("slimDownloads")&&this.$refs.list.classList.add("slim"),"true"===localStorage.getItem("downloadTabOpen")&&(this.$refs.container.classList.remove("tab_hidden"),this.setTabWidth(this.cachedTabWidth)),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",this.handleDrag)}),window.addEventListener("beforeunload",()=>{localStorage.setItem("downloadTabWidth",this.cachedTabWidth)})},methods:{...Ao(["setErrors"]),onRemoveItem(e){Eo.emit("removeFromQueue",e)},setTabWidth(e){void 0===e?(this.$refs.container.style.width="",this.$refs.list.style.width=""):(this.$refs.container.style.width=e+"px",this.$refs.list.style.width=e+"px")},initQueue(e){const{queue:t,queueComplete:a,currentItem:n,queueList:i,restored:r}=e;a.length&&a.forEach(e=>{i[e].silent=!0,this.addToQueue(i[e])}),n&&(i[n].silent=!0,this.addToQueue(i[n],!0)),t.forEach(e=>{i[e].silent=!0,this.addToQueue(i[e])}),r&&(qo(this.$t("toasts.queueRestored"),"done",!0,"restoring_queue"),Eo.emit("queueRestored"))},addToQueue(e,t=!1){if(Array.isArray(e)){if(e.length>1)return e.forEach((e,t)=>{e.silent=!0,this.addToQueue(e)}),void qo(this.$t("toasts.addedMoreToQueue",{n:e.length}),"playlist_add_check");e=e[0]}this.$set(e,"current",t),this.$set(this.queueList,e.uuid,e);if(e.downloaded+e.failed==e.size){const t=-1==this.queueComplete.indexOf(e.uuid);this.$set(this.queueList[e.uuid],"status","download finished"),t&&this.queueComplete.push(e.uuid)}else{-1==this.queue.indexOf(e.uuid)&&this.queue.push(e.uuid)}(e.progress>0&&e.progress<100||t)&&this.startDownload(e.uuid),e.silent||qo(this.$t("toasts.addedToQueue",{item:e.title}),"playlist_add_check")},updateQueue(e){const{uuid:t,downloaded:a,failed:n,progress:i,conversion:r,error:s,data:o,errid:l}=e;t&&this.queue.indexOf(t)>-1&&(a&&this.queueList[t].downloaded++,n&&(this.queueList[t].failed++,this.queueList[t].errors.push({message:s,data:o,errid:l})),i&&(this.queueList[t].progress=i),r&&(this.queueList[t].conversion=r))},removeFromQueue(e){let t=this.queue.indexOf(e);t>-1&&(this.$delete(this.queue,t),this.$delete(this.queueList,e))},removeAllDownloads(e){if(this.queueComplete=[],e){this.queue=[e];let t=this.queueList[e];this.queueList={},this.queueList[e]=t}else this.queue=[],this.queueList={}},removedFinishedDownloads(){this.queueComplete.forEach(e=>{this.$delete(this.queueList,e)}),this.queueComplete=[]},toggleDownloadTab(){this.setTabWidth(),this.$refs.container.style.transition="all 250ms ease-in-out";let e=this.$refs.container.classList.toggle("tab_hidden");e||this.setTabWidth(this.cachedTabWidth),localStorage.setItem("downloadTabOpen",!e)},cleanQueue(){Eo.emit("removeFinishedDownloads")},cancelQueue(){Eo.emit("cancelAllDownloads")},openDownloadsFolder(){Eo.emit("openDownloadsFolder")},handleDrag(e){let t=window.innerWidth-e.pageX+2;t<250?t=250:t>500&&(t=500),this.cachedTabWidth=t,this.setTabWidth(t)},startDrag(){document.addEventListener("mousemove",this.handleDrag)},startDownload(e){this.$set(this.queueList[e],"status","downloading")},finishDownload(e){if(!(this.queue.indexOf(e)>-1))return;this.$set(this.queueList[e],"status","download finished"),qo(this.$t("toasts.finishDownload",{item:this.queueList[e].title}),"done");let t=this.queue.indexOf(e);t>-1&&(this.queue.splice(t,1),this.queueComplete.push(e)),this.queue.length<=0&&qo(this.$t("toasts.allDownloaded"),"done_all")},startConversion(e){this.$set(this.queueList[e],"status","converting"),this.$set(this.queueList[e],"conversion",0)},async showErrorsTab(e){await this.setErrors(e),this.$router.push({name:"Errors"})}}},"data-v-20b57f82",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));var Go=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};return l.__file="BaseLoadingPlaceholder.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n,l}({render:function(e,t){var a=t._c;return a("div",{staticClass:"loading_placeholder",class:{"loading_placeholder--hidden":t.props.hidden},attrs:{id:t.props.id}},[a("span",{staticClass:"loading_placeholder__text"},[t._v(t._s(t.props.text))]),t._v(" "),t._m(0)])},staticRenderFns:[function(e,t){var a=t._c;return a("div",{staticClass:"lds-ring"},[a("div"),t._v(" "),a("div"),t._v(" "),a("div"),t._v(" "),a("div")])}]},0,{props:{text:{type:String,required:!1,default:"Loading..."},id:{type:String,required:!1},hidden:{type:Boolean,required:!1,default:!1}}},void 0,!0);function Ho(e,t=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");Eo.emit("addToQueue",{url:e,bitrate:t},()=>{})}var Wo={sendAddToQueue:Ho};function Ko(e){let t=e.toLowerCase();if(t.startsWith("http")){if(t.indexOf("deezer.com")>=0||t.indexOf("deezer.page.link")>=0||t.indexOf("open.spotify.com")>=0)return!0}else if(t.startsWith("spotify:"))return!0;return!1}function Qo(e){let t,a;return t=Math.floor(e/60),a=e-60*t,a<10&&(a="0"+a),t+":"+a}function Jo(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function Yo(e,t,a){var n;return function(){var i=this,r=arguments,s=function(){n=null,a||e.apply(i,r)},o=a&&!n;clearTimeout(n),n=setTimeout(s,t),o&&e.apply(i,r)}}function Zo(e){const t=document.createElement("input");document.body.appendChild(t),t.setAttribute("type","text"),t.setAttribute("value",e),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()}var Xo={isValidURL:Ko,convertDuration:Qo,convertDurationSeparated:function(e){let t,a,n;return a=Math.floor(e/60),t=Math.floor(a/60),n=e-60*a,a-=60*t,[t,a,n]},numberWithDots:Jo,debounce:Yo};const el=[{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 tl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheContextMenu.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;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(t){return a("button",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"option.show"}],key:t.label,staticClass:"btn menu-option",on:{click:function(e){return e.preventDefault(),t.action(e)}}},[a("span",{staticClass:"menu-option__text"},[e._v(e._s(t.label))])])})),0)},staticRenderFns:[]},(function(e){e&&e("data-v-56674a00_0",{source:".context-menu[data-v-56674a00]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--foreground-inverted);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-56674a00]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-56674a00]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-56674a00]{text-transform:capitalize}button[data-v-56674a00]{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-56674a00]:focus{outline:0}button[data-v-56674a00]:active{background-color:unset;transform:unset}button[data-v-56674a00]:hover{background:unset;border:unset}",map:void 0,media:void 0})}),{data:()=>({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:()=>{Zo(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{Zo(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{Zo(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(e=>{document.execCommand("insertText",void 0,e)}):document.execCommand("paste")}}};let t=Object.values(e).length+1;return el.forEach((a,n)=>{e[a.objName]={label:""+this.$t("globals.download",{thing:a.label}),show:!1,position:t+n,action:Ho.bind(null,this.deezerHref,a.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,t)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,el.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,t){this.xPos=e+"px",this.yPos=t+"px",this.$nextTick().then(()=>{const{innerHeight:a,innerWidth:n}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,r=t+this.$refs.contextMenu.getBoundingClientRect().height;if(i>n){const t=i-n+15;this.xPos=e-t+"px"}if(r>a){const e=r-a+15;this.yPos=t-e+"px"}})},showDeezerOptions(){this.options.copyDeezerLink.show=!0,el.forEach(e=>{this.options[e.objName].show=!0})}}},"data-v-56674a00",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),al=new ka;async function nl(e,t,{duration:a=1e3,easing:n=il,interval:i=13}={}){const r=e.volume,s=t-r;if(!(s&&a&&n&&i))return e.volume=t,Promise.resolve();const o=Math.floor(a/i);let l=1;return new Promise(t=>{const a=setInterval(()=>{e.volume=r+n(l/o)*s,++l===o&&(clearInterval(a),t())},i)})}function il(e){return.5-Math.cos(e*Math.PI)/2}var rl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};return l.__file="TheTrackPreview.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n,l}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("audio",{ref:"preview",attrs:{id:"preview-track"},on:{canplay:this.onCanPlay,timeupdate:this.onTimeUpdate}},[t("source",{attrs:{id:"preview-track_source",src:"",type:"audio/mpeg"}})])},staticRenderFns:[]},0,{data:()=>({previewStopped:!1}),mounted(){this.$refs.preview.volume=1,al.$on("trackPreview:playPausePreview",this.playPausePreview),al.$on("trackPreview:stopStackedTabsPreview",this.stopStackedTabsPreview),al.$on("trackPreview:previewMouseEnter",this.previewMouseEnter),al.$on("trackPreview:previewMouseLeave",this.previewMouseLeave)},methods:{async onCanPlay(){await this.$refs.preview.play(),this.previewStopped=!1,await nl(this.$refs.preview,window.vol.preview_max_volume/100,{duration:500})},async onTimeUpdate(){if(isNaN(this.$refs.preview.duration))return;let e=this.$refs.preview.duration;isFinite(e)||(e=30),e-this.$refs.preview.currentTime>=1||this.previewStopped||(await nl(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,document.querySelectorAll("a[playing] > .preview_controls").forEach(e=>{e.style.opacity=0}),document.querySelectorAll("*").forEach(e=>{e.removeAttribute("playing")}),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(e=>{e.textContent="play_arrow"}))},async playPausePreview(e){e.preventDefault(),e.stopPropagation();const{currentTarget:t}=event;var a="I"==t.tagName?t:t.querySelector("i");t.hasAttribute("playing")?this.$refs.preview.paused?(this.$refs.preview.play(),this.previewStopped=!1,a.innerText="pause",await nl(this.$refs.preview,window.vol.preview_max_volume/100,{duration:500})):(this.previewStopped=!0,a.innerText="play_arrow",await nl(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause()):(document.querySelectorAll("*").forEach(e=>{e.removeAttribute("playing")}),t.setAttribute("playing",!0),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(e=>{e.textContent="play_arrow"}),document.querySelectorAll(".preview_controls").forEach(e=>{e.style.opacity=0}),a.innerText="pause",a.style.opacity=1,this.previewStopped=!1,await nl(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),document.getElementById("preview-track_source").src=t.getAttribute("data-preview"),this.$refs.preview.load())},async stopStackedTabsPreview(){let e=Array.prototype.slice.call(document.querySelectorAll(".preview_playlist_controls[playing]"));0!==e.length&&(await nl(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,e.forEach(e=>{e.removeAttribute("playing"),e.innerText="play_arrow"}))},previewMouseEnter(e){e.currentTarget.style.opacity=1},previewMouseLeave(e){const{currentTarget:t}=e,a=t.parentElement.hasAttribute("playing");(a&&this.previewStopped||!a)&&(t.style.opacity=0)}}},void 0,!1);var sl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheQualityModal.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;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(t){return e.tryToDownloadTrack(t)}}},[a("div",{staticClass:"smallmodal-content"},[a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"9"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"FLAC"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"3"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"MP3 320kbps"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"1"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"MP3 128kbps"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"15"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [HQ]"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"14"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [MQ]"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"btn btn-primary quality-button",attrs:{"data-quality-value":"13"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [LQ]"}))+"\n\t\t")])])])},staticRenderFns:[]},(function(e){e&&e("data-v-04587fed_0",{source:".smallmodal{position:fixed;z-index:1250;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:hsla(0,0%,0%,.4);animation-duration:.3s}.smallmodal-content{background-color:transparent;margin:auto;width:var(--modal-content-width);position:relative;top:50%;transform:translateY(-50%)}.smallmodal-content button{width:100%;margin-bottom:8px}",map:void 0,media:void 0})}),{data:()=>({open:!1,url:""}),mounted(){this.$root.$on("QualityModal:open",this.openModal),this.$refs.modal.addEventListener("webkitAnimationEnd",this.handleAnimationEnd)},methods:{tryToDownloadTrack(e){const{target:t}=e;this.$refs.modal.classList.add("animated","fadeOut"),t.matches(".quality-button")&&Wo.sendAddToQueue(this.url,t.dataset.qualityValue)},openModal(e){this.url=e,this.open=!0,this.$refs.modal.classList.add("animated","fadeIn")},handleAnimationEnd(e){const{animationName:t}=e;this.$refs.modal.classList.remove("animated",t),"fadeIn"!==t&&(this.open=!1)}}},void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));var ol=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="ConfirmModal.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{ref:"wrapper",staticClass:"wrapper"},[t("div",{ref:"body",staticClass:"body animate__animated animate__bounce"},[t("h1",{staticStyle:{flex:"1"}},[this._v(this._s(this.titleText))]),this._v(" "),this._m(0)]),this._v(" "),t("div",{staticClass:"overlay"})])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"confirm-area"},[t("button",{staticClass:"no-hover"},[this._v("Text")]),this._v(" "),t("button",{staticClass:"no-hover bg-red-600"},[this._v("Text")])])}]},(function(e){e&&e("data-v-6b9098da_0",{source:".wrapper[data-v-6b9098da]{display:grid;place-items:center;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1000}.body[data-v-6b9098da]{position:relative;display:flex;flex-direction:column;width:50vw;height:30vh;border-radius:15px;padding:2rem;background:var(--secondary-background);z-index:2;box-shadow:9px 10px 39px 12px var(--main-background)}.confirm-area[data-v-6b9098da]{position:relative;flex:1;display:flex;justify-content:flex-end;align-items:flex-end}.overlay[data-v-6b9098da]{position:absolute;top:0;left:0;right:0;bottom:0;background:var(--secondary-background);opacity:.75;z-index:1}",map:void 0,media:void 0})}),{data:()=>({titleText:"Are you sure you want to reset settings to default?"}),mounted(){setTimeout(()=>{},2e3)}},"data-v-6b9098da",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));var ll=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="App.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("TheSidebar"),this._v(" "),t("div",{staticClass:"app-container"},[t("div",{staticClass:"content-container"},[t("TheSearchBar"),this._v(" "),t("TheContent")],1),this._v(" "),t("TheDownloadBar")],1),this._v(" "),t("BaseLoadingPlaceholder",{attrs:{id:"start_app_placeholder",text:"Connecting to the server..."}}),this._v(" "),t("TheTrackPreview"),this._v(" "),t("TheQualityModal"),this._v(" "),t("TheContextMenu")],1)},staticRenderFns:[]},(function(e){e&&e("data-v-1cb1ae21_0",{source:".app-container{display:flex}.content-container{width:100%;display:flex;flex-direction:column;margin-left:48px}",map:void 0,media:void 0})}),{components:{TheSidebar:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheSidebar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("aside",{attrs:{id:"sidebar",role:"navigation","aria-label":"sidebar"}},[e._l(e.links,(function(t){return a("router-link",{key:t.id,staticClass:"main_tablinks",class:{active:e.activeTablink===t.name},attrs:{tag:"a",id:t.id,"aria-label":t.ariaLabel,to:{name:t.routerName}},nativeOn:{click:function(a){e.activeTablink=t.name}}},[a("i",{staticClass:"material-icons side_icon"},[e._v(e._s(t.icon))]),e._v(" "),a("span",{staticClass:"main_tablinks_text"},[e._v(e._s(e.$t(t.label)))]),e._v(" "),"about"===t.name&&e.updateAvailable?a("span",{staticClass:"bg-red-600 w-3 h-3 rounded-full",attrs:{id:"update-notification"}}):e._e()])})),e._v(" "),a("span",{staticClass:"main_tablinks",attrs:{id:"theme_selector",role:"link","aria-label":"theme selector"}},[a("i",{staticClass:"material-icons side_icon side_icon--theme"},[e._v("palette")]),e._v(" "),a("div",{attrs:{id:"theme_togglers"}},e._l(e.themes,(function(t){return a("div",{key:t,staticClass:"theme_toggler",class:[{"theme_toggler--active":e.activeTheme===t},"theme_toggler--"+t],on:{click:function(a){return e.changeTheme(t)}}})})),0)]),e._v(" "),a("div",{class:{online:e.appOnline,offline:!e.appOnline},attrs:{id:"network-status"}},[e.appOnline?a("i",{staticClass:"material-icons"},[e._v("wifi")]):a("i",{staticClass:"material-icons"},[a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}}),e._v(" "),a("path",{attrs:{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0z"}})])])])],2)},staticRenderFns:[]},(function(e){e&&e("data-v-7966f1dc_0",{source:"#network-status[data-v-7966f1dc]{display:flex;justify-content:center;align-items:center;position:relative;margin-top:auto;bottom:0}#network-status.online i.material-icons[data-v-7966f1dc]{color:#009e51}#network-status.offline i.material-icons svg[data-v-7966f1dc]{fill:red;width:1em;height:1em}#update-notification[data-v-7966f1dc]{position:absolute;left:30px;top:12px}",map:void 0,media:void 0})}),{data:()=>({appOnline:null,activeTheme:"light",themes:["purple","dark","light"],activeTablink:"home",updateAvailable:!1,links:[{id:"main_home_tablink",name:"home",ariaLabel:"home",routerName:"Home",icon:"home",label:"sidebar.home"},{id:"main_search_tablink",name:"search",ariaLabel:"search",routerName:"Search",icon:"search",label:"sidebar.search"},{id:"main_charts_tablink",name:"charts",ariaLabel:"charts",routerName:"Charts",icon:"show_chart",label:"sidebar.charts"},{id:"main_favorites_tablink",name:"favorites",ariaLabel:"favorites",routerName:"Favorites",icon:"star",label:"sidebar.favorites"},{id:"main_analyzer_tablink",name:"analyzer",ariaLabel:"link analyzer",routerName:"Link Analyzer",icon:"link",label:"sidebar.linkAnalyzer"},{id:"main_settings_tablink",name:"settings",ariaLabel:"settings",routerName:"Settings",icon:"settings",label:"sidebar.settings"},{id:"main_about_tablink",name:"about",ariaLabel:"info",routerName:"About",icon:"info",label:"sidebar.about"}]}),mounted(){this.appOnline=navigator.onLine,window.addEventListener("online",()=>{this.appOnline=!0}),window.addEventListener("offline",()=>{this.appOnline=!1}),this.activeTheme=localStorage.getItem("selectedTheme")||"dark",this.$router.afterEach((e,t)=>{const a=this.links.find(t=>t.routerName===e.name);a&&(this.activeTablink=a.name)}),Eo.on("updateAvailable",()=>{this.updateAvailable=!0})},methods:{changeTheme(e){if(e===this.activeTheme)return;this.activeTheme=e,document.documentElement.setAttribute("data-theme",e),localStorage.setItem("selectedTheme",e);const t=document.querySelectorAll("*");t.forEach(e=>{e.classList.add("changing-theme")}),document.documentElement.addEventListener("transitionend",(function e(){t.forEach(e=>{e.classList.remove("changing-theme")}),document.documentElement.removeEventListener("transitionend",e)}))}}},"data-v-7966f1dc",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),TheSearchBar:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheSearchBar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("header",{attrs:{id:"search","aria-label":"searchbar"}},[e._m(0),e._v(" "),a("input",{ref:"searchbar",attrs:{id:"searchbar",autocomplete:"off",type:"search",name:"searchbar",value:"",placeholder:e.$t("searchbar"),autofocus:""},on:{keyup:function(t){return e.handleSearchBarKeyup(t)}}})])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"search__icon"},[t("i",{staticClass:"material-icons"},[this._v("search")])])}]},(function(e){e&&e("data-v-4c83d619_0",{source:"#search{background-color:var(--secondary-background);padding:0 1em;display:flex;align-items:center;border:1px solid transparent;transition:border .2s ease-in-out;border-radius:15px;margin:10px 10px 20px 10px}#search:focus-within{border:1px solid var(--foreground)}#search .search__icon{width:2rem;height:2rem}#search .search__icon i{font-size:2rem;color:var(--foreground)}#search #searchbar{height:45px;padding-left:.5em;border:0;border-radius:0;background-color:var(--secondary-background);color:var(--foreground);font-size:1.2rem;font-family:'Open Sans';font-weight:300;margin-bottom:0}#search #searchbar:focus{outline:0}#search #searchbar:-webkit-autofill,#search #searchbar:-webkit-autofill:active,#search #searchbar:-webkit-autofill:focus,#search #searchbar:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 45px var(--secondary-background) inset!important;box-shadow:0 0 0 45px var(--secondary-background) inset!important}",map:void 0,media:void 0})}),{data:()=>({lastTextSearch:""}),created(){const e=e=>{70===e.keyCode&&e.ctrlKey&&(e.preventDefault(),this.$refs.searchbar.focus())},t=e=>{"Backspace"==e.key&&e.ctrlKey&&e.shiftKey&&(this.$refs.searchbar.value="",this.$refs.searchbar.focus())};document.addEventListener("keydown",e),document.addEventListener("keyup",t),this.$on("hook:destroyed",()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)})},methods:{test(){console.log("test passato")},async handleSearchBarKeyup(e){if(!(13===e.keyCode))return;let t=this.$refs.searchbar.value;if(""===t)return;let a=Ko(t),n=e.ctrlKey,i="Link Analyzer"===this.$route.name,r="Search"===this.$route.name,s=t===this.lastTextSearch;if(a)n?this.$root.$emit("QualityModal:open",t):i?Eo.emit("analyzeLink",t):Ho(t);else{if(r&&s)return void this.$root.$emit("mainSearch:updateResults",t);r||await this.$router.push({name:"Search"}),s||(this.$root.$emit("updateSearchLoadingState",!0),this.lastTextSearch=t),this.$root.$emit("mainSearch:showNewResults",t)}}}},void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),TheDownloadBar:Vo,TheTrackPreview:rl,TheQualityModal:sl,BaseLoadingPlaceholder:Go,TheContextMenu:tl,TheContent:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="TheContent.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("main",{ref:"content",attrs:{id:"content","aria-label":"main content"},on:{scroll:function(t){"Search"===e.$route.name&&e.handleContentScroll(t)}}},[a("div",{attrs:{id:"container"}},[a("BaseLoadingPlaceholder",{attrs:{id:"search_placeholder",text:"Searching...",hidden:!e.loading}}),e._v(" "),e.showBackButton?a("BackButton",{staticClass:"sticky -ml-20",staticStyle:{top:"1rem"}}):e._e(),e._v(" "),a("keep-alive",[e.$route.meta.notKeepAlive?e._e():a("router-view",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"!loading"}],key:e.$route.fullPath,class:{"-mt-16":e.showBackButton},attrs:{"perform-scrolled-search":e.performScrolledSearch}})],1),e._v(" "),e.$route.meta.notKeepAlive?a("router-view",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"!loading"}],key:e.$route.fullPath,class:{"-mt-16":e.showBackButton},attrs:{"perform-scrolled-search":e.performScrolledSearch}}):e._e()],1)])},staticRenderFns:[]},(function(e){e&&e("data-v-5b5dacac_0",{source:"#container{margin:0 auto;max-width:1280px;width:var(--container-width);transform:scale(1)}main{background-color:var(--main-background);padding-right:5px;width:100%;height:calc(100vh - 93px);overflow-y:scroll;overflow-x:hidden}main::-webkit-scrollbar{width:10px}main::-webkit-scrollbar-track{background:var(--main-background)}main::-webkit-scrollbar-thumb{background:var(--main-scroll);border-radius:4px;width:6px;padding:0 2px}",map:void 0,media:void 0})}),{components:{BaseLoadingPlaceholder:Go,BackButton:function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="BackButton.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("button",{staticClass:"btn-primary border-transparent border-solid flex items-center justify-center p-1 m-0 w-16 h-16 rounded-full z-10",on:{click:function(t){return e.$router.back()}}},[a("i",{staticClass:"material-icons mirrored text-4xl text-white"},[e._v("forward")])])},staticRenderFns:[]},(function(e){e&&e("data-v-74f206d4_0",{source:"button[data-v-74f206d4]{transition:background .2s ease-in-out}",map:void 0,media:void 0})}),{},"data-v-74f206d4",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),i.map&&(a+="\n/*# sourceURL="+i.map.sources[0]+" */",a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i.map))))+" */"),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}))},data:()=>({performScrolledSearch:!1,loading:!1}),computed:{showBackButton(){return-1!==["Tracklist","Artist","Album","Playlist","Spotify Playlist"].indexOf(this.$route.name)}},mounted(){this.$root.$on("updateSearchLoadingState",e=>{this.loading=e}),this.$router.beforeEach((e,t,a)=>{this.$refs.content.scrollTo(0,0),a()})},methods:{handleContentScroll:Yo((async function(){this.$refs.content.scrollTop+this.$refs.content.clientHeight @@ -22,7 +22,7 @@