From 4f73b3ecad623360f7a5bab0443c47b701a3665c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:40:39 +0000 Subject: [PATCH] [web] Rebuild web interface --- htdocs/assets/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index 82deaa9d..a1361031 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -26,8 +26,8 @@ * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Ms=typeof window<"u";function TT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const lt=Object.assign;function ju(e,t){const n={};for(const r in t){const s=t[r];n[r]=Gn(s)?s.map(e):e(s)}return n}const ta=()=>{},Gn=Array.isArray,OT=/\/$/,DT=e=>e.replace(OT,"");function qu(e,t,n="/"){let r,s={},o="",a="";const i=t.indexOf("#");let l=t.indexOf("?");return i=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,i>-1?i:t.length),s=e(o)),i>-1&&(r=r||t.slice(0,i),a=t.slice(i,t.length)),r=RT(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:s,hash:a}}function PT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Gp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function IT(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&uo(t.matched[r],n.matched[s])&&Uv(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function uo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Uv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!FT(e[n],t[n]))return!1;return!0}function FT(e,t){return Gn(e)?Zp(e,t):Gn(t)?Zp(t,e):e===t}function Zp(e,t){return Gn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function RT(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,a,i;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(a-(a===r.length?1:0)).join("/")}var Ca;(function(e){e.pop="pop",e.push="push"})(Ca||(Ca={}));var na;(function(e){e.back="back",e.forward="forward",e.unknown=""})(na||(na={}));function LT(e){if(!e)if(Ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),DT(e)}const NT=/^[^#]+#/;function MT(e,t){return e.replace(NT,"#")+t}function VT(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const cu=()=>({left:window.pageXOffset,top:window.pageYOffset});function HT(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=VT(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Yp(e,t){return(history.state?history.state.position-t:-1)+e}const Jc=new Map;function BT(e,t){Jc.set(e,t)}function UT(e){const t=Jc.get(e);return Jc.delete(e),t}let jT=()=>location.protocol+"//"+location.host;function jv(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(i);return l[0]!=="/"&&(l="/"+l),Gp(l,"")}return Gp(n,e)+r+s}function qT(e,t,n,r){let s=[],o=[],a=null;const i=({state:f})=>{const p=jv(e,location),h=n.value,_=t.value;let b=0;if(f){if(n.value=p,t.value=f,a&&a===h){a=null;return}b=_?f.position-_.position:0}else r(p);s.forEach(w=>{w(n.value,h,{delta:b,type:Ca.pop,direction:b?b>0?na.forward:na.back:na.unknown})})};function l(){a=n.value}function c(f){s.push(f);const p=()=>{const h=s.indexOf(f);h>-1&&s.splice(h,1)};return o.push(p),p}function m(){const{history:f}=window;f.state&&f.replaceState(lt({},f.state,{scroll:cu()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",m)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",m,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Jp(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?cu():null}}function WT(e){const{history:t,location:n}=window,r={value:jv(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,c,m){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:jT()+e+l;try{t[m?"replaceState":"pushState"](c,"",f),s.value=c}catch(p){console.error(p),n[m?"replace":"assign"](f)}}function a(l,c){const m=lt({},t.state,Jp(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,m,!0),r.value=l}function i(l,c){const m=lt({},s.value,t.state,{forward:l,scroll:cu()});o(m.current,m,!0);const d=lt({},Jp(r.value,l,null),{position:m.position+1},c);o(l,d,!1),r.value=l}return{location:r,state:s,push:i,replace:a}}function KT(e){e=LT(e);const t=WT(e),n=qT(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=lt({location:"",base:e,go:r,createHref:MT.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function GT(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),KT(e)}function ZT(e){return typeof e=="string"||e&&typeof e=="object"}function qv(e){return typeof e=="string"||typeof e=="symbol"}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Wv=Symbol("");var Xp;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Xp||(Xp={}));function co(e,t){return lt(new Error,{type:e,[Wv]:!0},t)}function fr(e,t){return e instanceof Error&&Wv in e&&(t==null||!!(e.type&t))}const Qp="[^/]+?",YT={sensitive:!1,strict:!1,start:!0,end:!0},JT=/[.+*?^${}()[\]/\\]/g;function XT(e,t){const n=lt({},YT,t),r=[];let s=n.start?"^":"";const o=[];for(const c of e){const m=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function eO(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const tO={type:0,value:""},nO=/[a-zA-Z0-9_]/;function rO(e){if(!e)return[[]];if(e==="/")return[[tO]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,r=n;const s=[];let o;function a(){o&&s.push(o),o=[]}let i=0,l,c="",m="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:m,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;i{a(C)}:ta}function a(m){if(qv(m)){const d=r.get(m);d&&(r.delete(m),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(m);d>-1&&(n.splice(d,1),m.record.name&&r.delete(m.record.name),m.children.forEach(a),m.alias.forEach(a))}}function i(){return n}function l(m){let d=0;for(;d=0&&(m.record.path!==n[d].record.path||!Kv(m,n[d]));)d++;n.splice(d,0,m),m.record.name&&!nh(m)&&r.set(m.record.name,m)}function c(m,d){let f,p={},h,_;if("name"in m&&m.name){if(f=r.get(m.name),!f)throw co(1,{location:m});_=f.record.name,p=lt(th(d.params,f.keys.filter(C=>!C.optional).map(C=>C.name)),m.params&&th(m.params,f.keys.map(C=>C.name))),h=f.stringify(p)}else if("path"in m)h=m.path,f=n.find(C=>C.re.test(h)),f&&(p=f.parse(h),_=f.record.name);else{if(f=d.name?r.get(d.name):n.find(C=>C.re.test(d.path)),!f)throw co(1,{location:m,currentLocation:d});_=f.record.name,p=lt({},d.params,m.params),h=f.stringify(p)}const b=[];let w=f;for(;w;)b.unshift(w.record),w=w.parent;return{name:_,path:h,params:p,matched:b,meta:lO(b)}}return e.forEach(m=>o(m)),{addRoute:o,resolve:c,removeRoute:a,getRoutes:i,getRecordMatcher:s}}function th(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function aO(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:iO(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function iO(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function nh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function lO(e){return e.reduce((t,n)=>lt(t,n.meta),{})}function rh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Kv(e,t){return t.children.some(n=>n===e||Kv(e,n))}const Gv=/#/g,uO=/&/g,cO=/\//g,dO=/=/g,mO=/\?/g,Zv=/\+/g,fO=/%5B/g,pO=/%5D/g,Yv=/%5E/g,hO=/%60/g,Jv=/%7B/g,_O=/%7C/g,Xv=/%7D/g,gO=/%20/g;function zm(e){return encodeURI(""+e).replace(_O,"|").replace(fO,"[").replace(pO,"]")}function yO(e){return zm(e).replace(Jv,"{").replace(Xv,"}").replace(Yv,"^")}function Xc(e){return zm(e).replace(Zv,"%2B").replace(gO,"+").replace(Gv,"%23").replace(uO,"%26").replace(hO,"`").replace(Jv,"{").replace(Xv,"}").replace(Yv,"^")}function vO(e){return Xc(e).replace(dO,"%3D")}function bO(e){return zm(e).replace(Gv,"%23").replace(mO,"%3F")}function zO(e){return e==null?"":bO(e).replace(cO,"%2F")}function wl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function CO(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Xc(o)):[r&&Xc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function wO(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Gn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const kO=Symbol(""),oh=Symbol(""),Cm=Symbol(""),Qv=Symbol(""),Qc=Symbol("");function Oo(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Mr(e,t,n,r,s){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,i)=>{const l=d=>{d===!1?i(co(4,{from:n,to:t})):d instanceof Error?i(d):ZT(d)?i(co(2,{from:t,to:d})):(o&&r.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},c=e.call(r&&r.instances[s],t,n,l);let m=Promise.resolve(c);e.length<3&&(m=m.then(l)),m.catch(d=>i(d))})}function Wu(e,t,n,r){const s=[];for(const o of e)for(const a in o.components){let i=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(xO(i)){const c=(i.__vccOpts||i)[t];c&&s.push(Mr(c,n,r,o,a))}else{let l=i();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const m=TT(c)?c.default:c;o.components[a]=m;const f=(m.__vccOpts||m)[t];return f&&Mr(f,n,r,o,a)()}))}}return s}function xO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ah(e){const t=qn(Cm),n=qn(Qv),r=Nt(()=>t.resolve(vn(e.to))),s=Nt(()=>{const{matched:l}=r.value,{length:c}=l,m=l[c-1],d=n.matched;if(!m||!d.length)return-1;const f=d.findIndex(uo.bind(null,m));if(f>-1)return f;const p=ih(l[c-2]);return c>1&&ih(m)===p&&d[d.length-1].path!==p?d.findIndex(uo.bind(null,l[c-2])):f}),o=Nt(()=>s.value>-1&&AO(n.params,r.value.params)),a=Nt(()=>s.value>-1&&s.value===n.matched.length-1&&Uv(n.params,r.value.params));function i(l={}){return $O(l)?t[vn(e.replace)?"replace":"push"](vn(e.to)).catch(ta):Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:o,isExactActive:a,navigate:i}}const EO=wr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ah,setup(e,{slots:t}){const n=_o(ah(e)),{options:r}=qn(Cm),s=Nt(()=>({[lh(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[lh(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:tr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),SO=EO;function $O(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function AO(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Gn(s)||s.length!==r.length||r.some((o,a)=>o!==s[a]))return!1}return!0}function ih(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const lh=(e,t,n)=>e??t??n,TO=wr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qn(Qc),s=Nt(()=>e.route||r.value),o=qn(oh,0),a=Nt(()=>{let c=vn(o);const{matched:m}=s.value;let d;for(;(d=m[c])&&!d.components;)c++;return c}),i=Nt(()=>s.value.matched[a.value]);Go(oh,Nt(()=>a.value+1)),Go(kO,i),Go(Qc,s);const l=Xt();return en(()=>[l.value,i.value,e.name],([c,m,d],[f,p,h])=>{m&&(m.instances[d]=c,p&&p!==m&&c&&c===f&&(m.leaveGuards.size||(m.leaveGuards=p.leaveGuards),m.updateGuards.size||(m.updateGuards=p.updateGuards))),c&&m&&(!p||!uo(m,p)||!f)&&(m.enterCallbacks[d]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,m=e.name,d=i.value,f=d&&d.components[m];if(!f)return uh(n.default,{Component:f,route:c});const p=d.props[m],h=p?p===!0?c.params:typeof p=="function"?p(c):p:null,b=tr(f,lt({},h,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[m]=null)},ref:l}));return uh(n.default,{Component:b,route:c})||b}}});function uh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const OO=TO;function DO(e){const t=oO(e.routes,e),n=e.parseQuery||CO,r=e.stringifyQuery||sh,s=e.history,o=Oo(),a=Oo(),i=Oo(),l=C_(Pr);let c=Pr;Ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=ju.bind(null,U=>""+U),d=ju.bind(null,zO),f=ju.bind(null,wl);function p(U,ue){let se,ve;return qv(U)?(se=t.getRecordMatcher(U),ve=ue):ve=U,t.addRoute(ve,se)}function h(U){const ue=t.getRecordMatcher(U);ue&&t.removeRoute(ue)}function _(){return t.getRoutes().map(U=>U.record)}function b(U){return!!t.getRecordMatcher(U)}function w(U,ue){if(ue=lt({},ue||l.value),typeof U=="string"){const I=qu(n,U,ue.path),G=t.resolve({path:I.path},ue),Y=s.createHref(I.fullPath);return lt(I,G,{params:f(G.params),hash:wl(I.hash),redirectedFrom:void 0,href:Y})}let se;if("path"in U)se=lt({},U,{path:qu(n,U.path,ue.path).path});else{const I=lt({},U.params);for(const G in I)I[G]==null&&delete I[G];se=lt({},U,{params:d(I)}),ue.params=d(ue.params)}const ve=t.resolve(se,ue),Be=U.hash||"";ve.params=m(f(ve.params));const T=PT(r,lt({},U,{hash:yO(Be),path:ve.path})),O=s.createHref(T);return lt({fullPath:T,hash:Be,query:r===sh?wO(U.query):U.query||{}},ve,{redirectedFrom:void 0,href:O})}function C(U){return typeof U=="string"?qu(n,U,l.value.path):lt({},U)}function z(U,ue){if(c!==U)return co(8,{from:ue,to:U})}function v(U){return D(U)}function S(U){return v(lt(C(U),{replace:!0}))}function A(U){const ue=U.matched[U.matched.length-1];if(ue&&ue.redirect){const{redirect:se}=ue;let ve=typeof se=="function"?se(U):se;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=C(ve):{path:ve},ve.params={}),lt({query:U.query,hash:U.hash,params:"path"in ve?{}:U.params},ve)}}function D(U,ue){const se=c=w(U),ve=l.value,Be=U.state,T=U.force,O=U.replace===!0,I=A(se);if(I)return D(lt(C(I),{state:typeof I=="object"?lt({},Be,I.state):Be,force:T,replace:O}),ue||se);const G=se;G.redirectedFrom=ue;let Y;return!T&&IT(r,ve,se)&&(Y=co(16,{to:G,from:ve}),Ge(ve,ve,!0,!1)),(Y?Promise.resolve(Y):V(G,ve)).catch(X=>fr(X)?fr(X,2)?X:it(X):oe(X,G,ve)).then(X=>{if(X){if(fr(X,2))return D(lt({replace:O},C(X.to),{state:typeof X.to=="object"?lt({},Be,X.to.state):Be,force:T}),ue||G)}else X=q(G,ve,!0,O,Be);return Z(G,ve,X),X})}function F(U,ue){const se=z(U,ue);return se?Promise.reject(se):Promise.resolve()}function P(U){const ue=pt.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(U):U()}function V(U,ue){let se;const[ve,Be,T]=PO(U,ue);se=Wu(ve.reverse(),"beforeRouteLeave",U,ue);for(const I of ve)I.leaveGuards.forEach(G=>{se.push(Mr(G,U,ue))});const O=F.bind(null,U,ue);return se.push(O),Ne(se).then(()=>{se=[];for(const I of o.list())se.push(Mr(I,U,ue));return se.push(O),Ne(se)}).then(()=>{se=Wu(Be,"beforeRouteUpdate",U,ue);for(const I of Be)I.updateGuards.forEach(G=>{se.push(Mr(G,U,ue))});return se.push(O),Ne(se)}).then(()=>{se=[];for(const I of T)if(I.beforeEnter)if(Gn(I.beforeEnter))for(const G of I.beforeEnter)se.push(Mr(G,U,ue));else se.push(Mr(I.beforeEnter,U,ue));return se.push(O),Ne(se)}).then(()=>(U.matched.forEach(I=>I.enterCallbacks={}),se=Wu(T,"beforeRouteEnter",U,ue),se.push(O),Ne(se))).then(()=>{se=[];for(const I of a.list())se.push(Mr(I,U,ue));return se.push(O),Ne(se)}).catch(I=>fr(I,8)?I:Promise.reject(I))}function Z(U,ue,se){i.list().forEach(ve=>P(()=>ve(U,ue,se)))}function q(U,ue,se,ve,Be){const T=z(U,ue);if(T)return T;const O=ue===Pr,I=Ms?history.state:{};se&&(ve||O?s.replace(U.fullPath,lt({scroll:O&&I&&I.scroll},Be)):s.push(U.fullPath,Be)),l.value=U,Ge(U,ue,se,O),it()}let W;function Q(){W||(W=s.listen((U,ue,se)=>{if(!ht.listening)return;const ve=w(U),Be=A(ve);if(Be){D(lt(Be,{replace:!0}),ve).catch(ta);return}c=ve;const T=l.value;Ms&&BT(Yp(T.fullPath,se.delta),cu()),V(ve,T).catch(O=>fr(O,12)?O:fr(O,2)?(D(O.to,ve).then(I=>{fr(I,20)&&!se.delta&&se.type===Ca.pop&&s.go(-1,!1)}).catch(ta),Promise.reject()):(se.delta&&s.go(-se.delta,!1),oe(O,ve,T))).then(O=>{O=O||q(ve,T,!1),O&&(se.delta&&!fr(O,8)?s.go(-se.delta,!1):se.type===Ca.pop&&fr(O,20)&&s.go(-1,!1)),Z(ve,T,O)}).catch(ta)}))}let me=Oo(),K=Oo(),re;function oe(U,ue,se){it(U);const ve=K.list();return ve.length?ve.forEach(Be=>Be(U,ue,se)):console.error(U),Promise.reject(U)}function Fe(){return re&&l.value!==Pr?Promise.resolve():new Promise((U,ue)=>{me.add([U,ue])})}function it(U){return re||(re=!U,Q(),me.list().forEach(([ue,se])=>U?se(U):ue()),me.reset()),U}function Ge(U,ue,se,ve){const{scrollBehavior:Be}=e;if(!Ms||!Be)return Promise.resolve();const T=!se&&UT(Yp(U.fullPath,0))||(ve||!se)&&history.state&&history.state.scroll||null;return Sa().then(()=>Be(U,ue,T)).then(O=>O&&HT(O)).catch(O=>oe(O,U,ue))}const je=U=>s.go(U);let ct;const pt=new Set,ht={currentRoute:l,listening:!0,addRoute:p,removeRoute:h,hasRoute:b,getRoutes:_,resolve:w,options:e,push:v,replace:S,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:o.add,beforeResolve:a.add,afterEach:i.add,onError:K.add,isReady:Fe,install(U){const ue=this;U.component("RouterLink",SO),U.component("RouterView",OO),U.config.globalProperties.$router=ue,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>vn(l)}),Ms&&!ct&&l.value===Pr&&(ct=!0,v(s.location).catch(Be=>{}));const se={};for(const Be in Pr)Object.defineProperty(se,Be,{get:()=>l.value[Be],enumerable:!0});U.provide(Cm,ue),U.provide(Qv,Sd(se)),U.provide(Qc,l);const ve=U.unmount;pt.add(U),U.unmount=function(){pt.delete(U),pt.size<1&&(c=Pr,W&&W(),W=null,l.value=Pr,ct=!1,re=!1),ve()}}};function Ne(U){return U.reduce((ue,se)=>ue.then(()=>P(se)),Promise.resolve())}return ht}function PO(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;auo(c,i))?r.push(i):n.push(i));const l=e.matched[a];l&&(t.matched.find(c=>uo(c,l))||s.push(l))}return[n,r,s]}const IO={name:"PageAbout",computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{showUpdateDialog(){this.$store.commit(ka,!0)}}},FO={class:"section"},RO={class:"container"},LO={class:"columns is-centered"},NO={class:"column is-four-fifths has-text-centered-mobile"},MO=["textContent"],VO={class:"section"},HO={class:"container"},BO={class:"columns is-centered"},UO={class:"column is-four-fifths"},jO={class:"content"},qO={class:"level is-mobile"},WO={class:"level-left"},KO={class:"level-item"},GO=["textContent"],ZO={class:"level-right"},YO={key:0},JO=["textContent"],XO={key:1},QO=["textContent"],e3={class:"table"},t3=["textContent"],n3=["textContent"],r3=["textContent"],s3=["textContent"],o3=["textContent"],a3=["textContent"],i3=["textContent"],l3=["textContent"],u3=["textContent"],c3={class:"has-text-right"},d3=["textContent"],m3=["textContent"],f3=["textContent"],p3={class:"has-text-right"},h3=["textContent"],_3=["textContent"],g3={class:"section"},y3={class:"container"},v3={class:"columns is-centered"},b3={class:"column is-four-fifths"},z3={class:"content has-text-centered-mobile"},C3=["textContent"],w3=["textContent"],k3=u("a",{href:"https://bulma.io"},"Bulma",-1),x3=u("a",{href:"https://pictogrammers.com/library/mdi/"},"Material Design Icons",-1),E3=u("a",{href:"https://vuejs.org/"},"Vue.js",-1),S3=u("a",{href:"https://github.com/mzabriskie/axios"},"axios",-1),$3=["textContent"];function A3(e,t,n,r,s,o){const a=E("i18n-t");return k(),$("div",null,[u("section",FO,[u("div",RO,[u("div",LO,[u("div",NO,[u("h1",{class:"title is-4",textContent:g(o.config.library_name)},null,8,MO)])])])]),u("section",VO,[u("div",HO,[u("div",BO,[u("div",UO,[u("div",jO,[u("nav",qO,[u("div",WO,[u("div",KO,[u("h2",{class:"title is-5",textContent:g(e.$t("page.about.library"))},null,8,GO)])]),u("div",ZO,[o.library.updating?(k(),$("div",YO,[u("a",{class:"button is-small is-loading",textContent:g(e.$t("page.about.update"))},null,8,JO)])):(k(),$("div",XO,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=i=>o.showUpdateDialog()),textContent:g(e.$t("page.about.update"))},null,8,QO)]))])]),u("table",e3,[u("tbody",null,[u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.artists"))},null,8,t3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.artists))},null,8,n3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.albums"))},null,8,r3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.albums))},null,8,s3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.tracks"))},null,8,o3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.songs))},null,8,a3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.total-playtime"))},null,8,i3),u("td",{class:"has-text-right",textContent:g(e.$filters.durationInDays(o.library.db_playtime*1e3))},null,8,l3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.updated"))},null,8,u3),u("td",c3,[u("span",{textContent:g(e.$t("page.about.updated-on",{time:e.$filters.timeFromNow(o.library.updated_at)}))},null,8,d3),rt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.updated_at))},null,8,m3),rt(") ")])]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.uptime"))},null,8,f3),u("td",p3,[u("span",{textContent:g(e.$filters.timeFromNow(o.library.started_at,!0))},null,8,h3),rt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.started_at))},null,8,_3),rt(") ")])])])])])])])])]),u("section",g3,[u("div",y3,[u("div",v3,[u("div",b3,[u("div",z3,[u("p",{class:"is-size-7",textContent:g(e.$t("page.about.version",{version:o.config.version}))},null,8,C3),u("p",{class:"is-size-7",textContent:g(e.$t("page.about.compiled-with",{options:o.config.buildoptions.join(", ")}))},null,8,w3),y(a,{tag:"p",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:x(()=>[k3]),mdi:x(()=>[x3]),vuejs:x(()=>[E3]),axios:x(()=>[S3]),others:x(()=>[u("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:g(e.$t("page.about.more"))},null,8,$3)]),_:1})])])])])])])}const T3=te(IO,[["render",A3]]),O3={},D3={class:"hero is-light is-bold"},P3={class:"hero-body"},I3={class:"container"},F3={class:"columns is-centered"},R3={class:"column is-four-fifths"},L3={class:"columns is-flex-direction-row-reverse"},N3={class:"column fd-has-cover"},M3={class:"column m-auto is-three-fifths has-text-centered-mobile"},V3={class:"section pt-0"},H3={class:"container"},B3={class:"columns is-centered"},U3={class:"column is-four-fifths"};function j3(e,t){return k(),$(we,null,[u("section",D3,[u("div",P3,[u("div",I3,[u("div",F3,[u("div",R3,[u("div",L3,[u("div",N3,[ot(e.$slots,"heading-right")]),u("div",M3,[ot(e.$slots,"heading-left")])])])])])])]),u("section",V3,[u("div",H3,[u("div",B3,[u("div",U3,[ot(e.$slots,"content"),ot(e.$slots,"footer")])])])])],64)}const du=te(O3,[["render",j3]]);var e1={exports:{}},q3=[{value:"#B0171F",name:"indian red"},{value:"#DC143C",css:!0,name:"crimson"},{value:"#FFB6C1",css:!0,name:"lightpink"},{value:"#FFAEB9",name:"lightpink 1"},{value:"#EEA2AD",name:"lightpink 2"},{value:"#CD8C95",name:"lightpink 3"},{value:"#8B5F65",name:"lightpink 4"},{value:"#FFC0CB",css:!0,name:"pink"},{value:"#FFB5C5",name:"pink 1"},{value:"#EEA9B8",name:"pink 2"},{value:"#CD919E",name:"pink 3"},{value:"#8B636C",name:"pink 4"},{value:"#DB7093",css:!0,name:"palevioletred"},{value:"#FF82AB",name:"palevioletred 1"},{value:"#EE799F",name:"palevioletred 2"},{value:"#CD6889",name:"palevioletred 3"},{value:"#8B475D",name:"palevioletred 4"},{value:"#FFF0F5",name:"lavenderblush 1"},{value:"#FFF0F5",css:!0,name:"lavenderblush"},{value:"#EEE0E5",name:"lavenderblush 2"},{value:"#CDC1C5",name:"lavenderblush 3"},{value:"#8B8386",name:"lavenderblush 4"},{value:"#FF3E96",name:"violetred 1"},{value:"#EE3A8C",name:"violetred 2"},{value:"#CD3278",name:"violetred 3"},{value:"#8B2252",name:"violetred 4"},{value:"#FF69B4",css:!0,name:"hotpink"},{value:"#FF6EB4",name:"hotpink 1"},{value:"#EE6AA7",name:"hotpink 2"},{value:"#CD6090",name:"hotpink 3"},{value:"#8B3A62",name:"hotpink 4"},{value:"#872657",name:"raspberry"},{value:"#FF1493",name:"deeppink 1"},{value:"#FF1493",css:!0,name:"deeppink"},{value:"#EE1289",name:"deeppink 2"},{value:"#CD1076",name:"deeppink 3"},{value:"#8B0A50",name:"deeppink 4"},{value:"#FF34B3",name:"maroon 1"},{value:"#EE30A7",name:"maroon 2"},{value:"#CD2990",name:"maroon 3"},{value:"#8B1C62",name:"maroon 4"},{value:"#C71585",css:!0,name:"mediumvioletred"},{value:"#D02090",name:"violetred"},{value:"#DA70D6",css:!0,name:"orchid"},{value:"#FF83FA",name:"orchid 1"},{value:"#EE7AE9",name:"orchid 2"},{value:"#CD69C9",name:"orchid 3"},{value:"#8B4789",name:"orchid 4"},{value:"#D8BFD8",css:!0,name:"thistle"},{value:"#FFE1FF",name:"thistle 1"},{value:"#EED2EE",name:"thistle 2"},{value:"#CDB5CD",name:"thistle 3"},{value:"#8B7B8B",name:"thistle 4"},{value:"#FFBBFF",name:"plum 1"},{value:"#EEAEEE",name:"plum 2"},{value:"#CD96CD",name:"plum 3"},{value:"#8B668B",name:"plum 4"},{value:"#DDA0DD",css:!0,name:"plum"},{value:"#EE82EE",css:!0,name:"violet"},{value:"#FF00FF",vga:!0,name:"magenta"},{value:"#FF00FF",vga:!0,css:!0,name:"fuchsia"},{value:"#EE00EE",name:"magenta 2"},{value:"#CD00CD",name:"magenta 3"},{value:"#8B008B",name:"magenta 4"},{value:"#8B008B",css:!0,name:"darkmagenta"},{value:"#800080",vga:!0,css:!0,name:"purple"},{value:"#BA55D3",css:!0,name:"mediumorchid"},{value:"#E066FF",name:"mediumorchid 1"},{value:"#D15FEE",name:"mediumorchid 2"},{value:"#B452CD",name:"mediumorchid 3"},{value:"#7A378B",name:"mediumorchid 4"},{value:"#9400D3",css:!0,name:"darkviolet"},{value:"#9932CC",css:!0,name:"darkorchid"},{value:"#BF3EFF",name:"darkorchid 1"},{value:"#B23AEE",name:"darkorchid 2"},{value:"#9A32CD",name:"darkorchid 3"},{value:"#68228B",name:"darkorchid 4"},{value:"#4B0082",css:!0,name:"indigo"},{value:"#8A2BE2",css:!0,name:"blueviolet"},{value:"#9B30FF",name:"purple 1"},{value:"#912CEE",name:"purple 2"},{value:"#7D26CD",name:"purple 3"},{value:"#551A8B",name:"purple 4"},{value:"#9370DB",css:!0,name:"mediumpurple"},{value:"#AB82FF",name:"mediumpurple 1"},{value:"#9F79EE",name:"mediumpurple 2"},{value:"#8968CD",name:"mediumpurple 3"},{value:"#5D478B",name:"mediumpurple 4"},{value:"#483D8B",css:!0,name:"darkslateblue"},{value:"#8470FF",name:"lightslateblue"},{value:"#7B68EE",css:!0,name:"mediumslateblue"},{value:"#6A5ACD",css:!0,name:"slateblue"},{value:"#836FFF",name:"slateblue 1"},{value:"#7A67EE",name:"slateblue 2"},{value:"#6959CD",name:"slateblue 3"},{value:"#473C8B",name:"slateblue 4"},{value:"#F8F8FF",css:!0,name:"ghostwhite"},{value:"#E6E6FA",css:!0,name:"lavender"},{value:"#0000FF",vga:!0,css:!0,name:"blue"},{value:"#0000EE",name:"blue 2"},{value:"#0000CD",name:"blue 3"},{value:"#0000CD",css:!0,name:"mediumblue"},{value:"#00008B",name:"blue 4"},{value:"#00008B",css:!0,name:"darkblue"},{value:"#000080",vga:!0,css:!0,name:"navy"},{value:"#191970",css:!0,name:"midnightblue"},{value:"#3D59AB",name:"cobalt"},{value:"#4169E1",css:!0,name:"royalblue"},{value:"#4876FF",name:"royalblue 1"},{value:"#436EEE",name:"royalblue 2"},{value:"#3A5FCD",name:"royalblue 3"},{value:"#27408B",name:"royalblue 4"},{value:"#6495ED",css:!0,name:"cornflowerblue"},{value:"#B0C4DE",css:!0,name:"lightsteelblue"},{value:"#CAE1FF",name:"lightsteelblue 1"},{value:"#BCD2EE",name:"lightsteelblue 2"},{value:"#A2B5CD",name:"lightsteelblue 3"},{value:"#6E7B8B",name:"lightsteelblue 4"},{value:"#778899",css:!0,name:"lightslategray"},{value:"#708090",css:!0,name:"slategray"},{value:"#C6E2FF",name:"slategray 1"},{value:"#B9D3EE",name:"slategray 2"},{value:"#9FB6CD",name:"slategray 3"},{value:"#6C7B8B",name:"slategray 4"},{value:"#1E90FF",name:"dodgerblue 1"},{value:"#1E90FF",css:!0,name:"dodgerblue"},{value:"#1C86EE",name:"dodgerblue 2"},{value:"#1874CD",name:"dodgerblue 3"},{value:"#104E8B",name:"dodgerblue 4"},{value:"#F0F8FF",css:!0,name:"aliceblue"},{value:"#4682B4",css:!0,name:"steelblue"},{value:"#63B8FF",name:"steelblue 1"},{value:"#5CACEE",name:"steelblue 2"},{value:"#4F94CD",name:"steelblue 3"},{value:"#36648B",name:"steelblue 4"},{value:"#87CEFA",css:!0,name:"lightskyblue"},{value:"#B0E2FF",name:"lightskyblue 1"},{value:"#A4D3EE",name:"lightskyblue 2"},{value:"#8DB6CD",name:"lightskyblue 3"},{value:"#607B8B",name:"lightskyblue 4"},{value:"#87CEFF",name:"skyblue 1"},{value:"#7EC0EE",name:"skyblue 2"},{value:"#6CA6CD",name:"skyblue 3"},{value:"#4A708B",name:"skyblue 4"},{value:"#87CEEB",css:!0,name:"skyblue"},{value:"#00BFFF",name:"deepskyblue 1"},{value:"#00BFFF",css:!0,name:"deepskyblue"},{value:"#00B2EE",name:"deepskyblue 2"},{value:"#009ACD",name:"deepskyblue 3"},{value:"#00688B",name:"deepskyblue 4"},{value:"#33A1C9",name:"peacock"},{value:"#ADD8E6",css:!0,name:"lightblue"},{value:"#BFEFFF",name:"lightblue 1"},{value:"#B2DFEE",name:"lightblue 2"},{value:"#9AC0CD",name:"lightblue 3"},{value:"#68838B",name:"lightblue 4"},{value:"#B0E0E6",css:!0,name:"powderblue"},{value:"#98F5FF",name:"cadetblue 1"},{value:"#8EE5EE",name:"cadetblue 2"},{value:"#7AC5CD",name:"cadetblue 3"},{value:"#53868B",name:"cadetblue 4"},{value:"#00F5FF",name:"turquoise 1"},{value:"#00E5EE",name:"turquoise 2"},{value:"#00C5CD",name:"turquoise 3"},{value:"#00868B",name:"turquoise 4"},{value:"#5F9EA0",css:!0,name:"cadetblue"},{value:"#00CED1",css:!0,name:"darkturquoise"},{value:"#F0FFFF",name:"azure 1"},{value:"#F0FFFF",css:!0,name:"azure"},{value:"#E0EEEE",name:"azure 2"},{value:"#C1CDCD",name:"azure 3"},{value:"#838B8B",name:"azure 4"},{value:"#E0FFFF",name:"lightcyan 1"},{value:"#E0FFFF",css:!0,name:"lightcyan"},{value:"#D1EEEE",name:"lightcyan 2"},{value:"#B4CDCD",name:"lightcyan 3"},{value:"#7A8B8B",name:"lightcyan 4"},{value:"#BBFFFF",name:"paleturquoise 1"},{value:"#AEEEEE",name:"paleturquoise 2"},{value:"#AEEEEE",css:!0,name:"paleturquoise"},{value:"#96CDCD",name:"paleturquoise 3"},{value:"#668B8B",name:"paleturquoise 4"},{value:"#2F4F4F",css:!0,name:"darkslategray"},{value:"#97FFFF",name:"darkslategray 1"},{value:"#8DEEEE",name:"darkslategray 2"},{value:"#79CDCD",name:"darkslategray 3"},{value:"#528B8B",name:"darkslategray 4"},{value:"#00FFFF",name:"cyan"},{value:"#00FFFF",css:!0,name:"aqua"},{value:"#00EEEE",name:"cyan 2"},{value:"#00CDCD",name:"cyan 3"},{value:"#008B8B",name:"cyan 4"},{value:"#008B8B",css:!0,name:"darkcyan"},{value:"#008080",vga:!0,css:!0,name:"teal"},{value:"#48D1CC",css:!0,name:"mediumturquoise"},{value:"#20B2AA",css:!0,name:"lightseagreen"},{value:"#03A89E",name:"manganeseblue"},{value:"#40E0D0",css:!0,name:"turquoise"},{value:"#808A87",name:"coldgrey"},{value:"#00C78C",name:"turquoiseblue"},{value:"#7FFFD4",name:"aquamarine 1"},{value:"#7FFFD4",css:!0,name:"aquamarine"},{value:"#76EEC6",name:"aquamarine 2"},{value:"#66CDAA",name:"aquamarine 3"},{value:"#66CDAA",css:!0,name:"mediumaquamarine"},{value:"#458B74",name:"aquamarine 4"},{value:"#00FA9A",css:!0,name:"mediumspringgreen"},{value:"#F5FFFA",css:!0,name:"mintcream"},{value:"#00FF7F",css:!0,name:"springgreen"},{value:"#00EE76",name:"springgreen 1"},{value:"#00CD66",name:"springgreen 2"},{value:"#008B45",name:"springgreen 3"},{value:"#3CB371",css:!0,name:"mediumseagreen"},{value:"#54FF9F",name:"seagreen 1"},{value:"#4EEE94",name:"seagreen 2"},{value:"#43CD80",name:"seagreen 3"},{value:"#2E8B57",name:"seagreen 4"},{value:"#2E8B57",css:!0,name:"seagreen"},{value:"#00C957",name:"emeraldgreen"},{value:"#BDFCC9",name:"mint"},{value:"#3D9140",name:"cobaltgreen"},{value:"#F0FFF0",name:"honeydew 1"},{value:"#F0FFF0",css:!0,name:"honeydew"},{value:"#E0EEE0",name:"honeydew 2"},{value:"#C1CDC1",name:"honeydew 3"},{value:"#838B83",name:"honeydew 4"},{value:"#8FBC8F",css:!0,name:"darkseagreen"},{value:"#C1FFC1",name:"darkseagreen 1"},{value:"#B4EEB4",name:"darkseagreen 2"},{value:"#9BCD9B",name:"darkseagreen 3"},{value:"#698B69",name:"darkseagreen 4"},{value:"#98FB98",css:!0,name:"palegreen"},{value:"#9AFF9A",name:"palegreen 1"},{value:"#90EE90",name:"palegreen 2"},{value:"#90EE90",css:!0,name:"lightgreen"},{value:"#7CCD7C",name:"palegreen 3"},{value:"#548B54",name:"palegreen 4"},{value:"#32CD32",css:!0,name:"limegreen"},{value:"#228B22",css:!0,name:"forestgreen"},{value:"#00FF00",vga:!0,name:"green 1"},{value:"#00FF00",vga:!0,css:!0,name:"lime"},{value:"#00EE00",name:"green 2"},{value:"#00CD00",name:"green 3"},{value:"#008B00",name:"green 4"},{value:"#008000",vga:!0,css:!0,name:"green"},{value:"#006400",css:!0,name:"darkgreen"},{value:"#308014",name:"sapgreen"},{value:"#7CFC00",css:!0,name:"lawngreen"},{value:"#7FFF00",name:"chartreuse 1"},{value:"#7FFF00",css:!0,name:"chartreuse"},{value:"#76EE00",name:"chartreuse 2"},{value:"#66CD00",name:"chartreuse 3"},{value:"#458B00",name:"chartreuse 4"},{value:"#ADFF2F",css:!0,name:"greenyellow"},{value:"#CAFF70",name:"darkolivegreen 1"},{value:"#BCEE68",name:"darkolivegreen 2"},{value:"#A2CD5A",name:"darkolivegreen 3"},{value:"#6E8B3D",name:"darkolivegreen 4"},{value:"#556B2F",css:!0,name:"darkolivegreen"},{value:"#6B8E23",css:!0,name:"olivedrab"},{value:"#C0FF3E",name:"olivedrab 1"},{value:"#B3EE3A",name:"olivedrab 2"},{value:"#9ACD32",name:"olivedrab 3"},{value:"#9ACD32",css:!0,name:"yellowgreen"},{value:"#698B22",name:"olivedrab 4"},{value:"#FFFFF0",name:"ivory 1"},{value:"#FFFFF0",css:!0,name:"ivory"},{value:"#EEEEE0",name:"ivory 2"},{value:"#CDCDC1",name:"ivory 3"},{value:"#8B8B83",name:"ivory 4"},{value:"#F5F5DC",css:!0,name:"beige"},{value:"#FFFFE0",name:"lightyellow 1"},{value:"#FFFFE0",css:!0,name:"lightyellow"},{value:"#EEEED1",name:"lightyellow 2"},{value:"#CDCDB4",name:"lightyellow 3"},{value:"#8B8B7A",name:"lightyellow 4"},{value:"#FAFAD2",css:!0,name:"lightgoldenrodyellow"},{value:"#FFFF00",vga:!0,name:"yellow 1"},{value:"#FFFF00",vga:!0,css:!0,name:"yellow"},{value:"#EEEE00",name:"yellow 2"},{value:"#CDCD00",name:"yellow 3"},{value:"#8B8B00",name:"yellow 4"},{value:"#808069",name:"warmgrey"},{value:"#808000",vga:!0,css:!0,name:"olive"},{value:"#BDB76B",css:!0,name:"darkkhaki"},{value:"#FFF68F",name:"khaki 1"},{value:"#EEE685",name:"khaki 2"},{value:"#CDC673",name:"khaki 3"},{value:"#8B864E",name:"khaki 4"},{value:"#F0E68C",css:!0,name:"khaki"},{value:"#EEE8AA",css:!0,name:"palegoldenrod"},{value:"#FFFACD",name:"lemonchiffon 1"},{value:"#FFFACD",css:!0,name:"lemonchiffon"},{value:"#EEE9BF",name:"lemonchiffon 2"},{value:"#CDC9A5",name:"lemonchiffon 3"},{value:"#8B8970",name:"lemonchiffon 4"},{value:"#FFEC8B",name:"lightgoldenrod 1"},{value:"#EEDC82",name:"lightgoldenrod 2"},{value:"#CDBE70",name:"lightgoldenrod 3"},{value:"#8B814C",name:"lightgoldenrod 4"},{value:"#E3CF57",name:"banana"},{value:"#FFD700",name:"gold 1"},{value:"#FFD700",css:!0,name:"gold"},{value:"#EEC900",name:"gold 2"},{value:"#CDAD00",name:"gold 3"},{value:"#8B7500",name:"gold 4"},{value:"#FFF8DC",name:"cornsilk 1"},{value:"#FFF8DC",css:!0,name:"cornsilk"},{value:"#EEE8CD",name:"cornsilk 2"},{value:"#CDC8B1",name:"cornsilk 3"},{value:"#8B8878",name:"cornsilk 4"},{value:"#DAA520",css:!0,name:"goldenrod"},{value:"#FFC125",name:"goldenrod 1"},{value:"#EEB422",name:"goldenrod 2"},{value:"#CD9B1D",name:"goldenrod 3"},{value:"#8B6914",name:"goldenrod 4"},{value:"#B8860B",css:!0,name:"darkgoldenrod"},{value:"#FFB90F",name:"darkgoldenrod 1"},{value:"#EEAD0E",name:"darkgoldenrod 2"},{value:"#CD950C",name:"darkgoldenrod 3"},{value:"#8B6508",name:"darkgoldenrod 4"},{value:"#FFA500",name:"orange 1"},{value:"#FF8000",css:!0,name:"orange"},{value:"#EE9A00",name:"orange 2"},{value:"#CD8500",name:"orange 3"},{value:"#8B5A00",name:"orange 4"},{value:"#FFFAF0",css:!0,name:"floralwhite"},{value:"#FDF5E6",css:!0,name:"oldlace"},{value:"#F5DEB3",css:!0,name:"wheat"},{value:"#FFE7BA",name:"wheat 1"},{value:"#EED8AE",name:"wheat 2"},{value:"#CDBA96",name:"wheat 3"},{value:"#8B7E66",name:"wheat 4"},{value:"#FFE4B5",css:!0,name:"moccasin"},{value:"#FFEFD5",css:!0,name:"papayawhip"},{value:"#FFEBCD",css:!0,name:"blanchedalmond"},{value:"#FFDEAD",name:"navajowhite 1"},{value:"#FFDEAD",css:!0,name:"navajowhite"},{value:"#EECFA1",name:"navajowhite 2"},{value:"#CDB38B",name:"navajowhite 3"},{value:"#8B795E",name:"navajowhite 4"},{value:"#FCE6C9",name:"eggshell"},{value:"#D2B48C",css:!0,name:"tan"},{value:"#9C661F",name:"brick"},{value:"#FF9912",name:"cadmiumyellow"},{value:"#FAEBD7",css:!0,name:"antiquewhite"},{value:"#FFEFDB",name:"antiquewhite 1"},{value:"#EEDFCC",name:"antiquewhite 2"},{value:"#CDC0B0",name:"antiquewhite 3"},{value:"#8B8378",name:"antiquewhite 4"},{value:"#DEB887",css:!0,name:"burlywood"},{value:"#FFD39B",name:"burlywood 1"},{value:"#EEC591",name:"burlywood 2"},{value:"#CDAA7D",name:"burlywood 3"},{value:"#8B7355",name:"burlywood 4"},{value:"#FFE4C4",name:"bisque 1"},{value:"#FFE4C4",css:!0,name:"bisque"},{value:"#EED5B7",name:"bisque 2"},{value:"#CDB79E",name:"bisque 3"},{value:"#8B7D6B",name:"bisque 4"},{value:"#E3A869",name:"melon"},{value:"#ED9121",name:"carrot"},{value:"#FF8C00",css:!0,name:"darkorange"},{value:"#FF7F00",name:"darkorange 1"},{value:"#EE7600",name:"darkorange 2"},{value:"#CD6600",name:"darkorange 3"},{value:"#8B4500",name:"darkorange 4"},{value:"#FFA54F",name:"tan 1"},{value:"#EE9A49",name:"tan 2"},{value:"#CD853F",name:"tan 3"},{value:"#CD853F",css:!0,name:"peru"},{value:"#8B5A2B",name:"tan 4"},{value:"#FAF0E6",css:!0,name:"linen"},{value:"#FFDAB9",name:"peachpuff 1"},{value:"#FFDAB9",css:!0,name:"peachpuff"},{value:"#EECBAD",name:"peachpuff 2"},{value:"#CDAF95",name:"peachpuff 3"},{value:"#8B7765",name:"peachpuff 4"},{value:"#FFF5EE",name:"seashell 1"},{value:"#FFF5EE",css:!0,name:"seashell"},{value:"#EEE5DE",name:"seashell 2"},{value:"#CDC5BF",name:"seashell 3"},{value:"#8B8682",name:"seashell 4"},{value:"#F4A460",css:!0,name:"sandybrown"},{value:"#C76114",name:"rawsienna"},{value:"#D2691E",css:!0,name:"chocolate"},{value:"#FF7F24",name:"chocolate 1"},{value:"#EE7621",name:"chocolate 2"},{value:"#CD661D",name:"chocolate 3"},{value:"#8B4513",name:"chocolate 4"},{value:"#8B4513",css:!0,name:"saddlebrown"},{value:"#292421",name:"ivoryblack"},{value:"#FF7D40",name:"flesh"},{value:"#FF6103",name:"cadmiumorange"},{value:"#8A360F",name:"burntsienna"},{value:"#A0522D",css:!0,name:"sienna"},{value:"#FF8247",name:"sienna 1"},{value:"#EE7942",name:"sienna 2"},{value:"#CD6839",name:"sienna 3"},{value:"#8B4726",name:"sienna 4"},{value:"#FFA07A",name:"lightsalmon 1"},{value:"#FFA07A",css:!0,name:"lightsalmon"},{value:"#EE9572",name:"lightsalmon 2"},{value:"#CD8162",name:"lightsalmon 3"},{value:"#8B5742",name:"lightsalmon 4"},{value:"#FF7F50",css:!0,name:"coral"},{value:"#FF4500",name:"orangered 1"},{value:"#FF4500",css:!0,name:"orangered"},{value:"#EE4000",name:"orangered 2"},{value:"#CD3700",name:"orangered 3"},{value:"#8B2500",name:"orangered 4"},{value:"#5E2612",name:"sepia"},{value:"#E9967A",css:!0,name:"darksalmon"},{value:"#FF8C69",name:"salmon 1"},{value:"#EE8262",name:"salmon 2"},{value:"#CD7054",name:"salmon 3"},{value:"#8B4C39",name:"salmon 4"},{value:"#FF7256",name:"coral 1"},{value:"#EE6A50",name:"coral 2"},{value:"#CD5B45",name:"coral 3"},{value:"#8B3E2F",name:"coral 4"},{value:"#8A3324",name:"burntumber"},{value:"#FF6347",name:"tomato 1"},{value:"#FF6347",css:!0,name:"tomato"},{value:"#EE5C42",name:"tomato 2"},{value:"#CD4F39",name:"tomato 3"},{value:"#8B3626",name:"tomato 4"},{value:"#FA8072",css:!0,name:"salmon"},{value:"#FFE4E1",name:"mistyrose 1"},{value:"#FFE4E1",css:!0,name:"mistyrose"},{value:"#EED5D2",name:"mistyrose 2"},{value:"#CDB7B5",name:"mistyrose 3"},{value:"#8B7D7B",name:"mistyrose 4"},{value:"#FFFAFA",name:"snow 1"},{value:"#FFFAFA",css:!0,name:"snow"},{value:"#EEE9E9",name:"snow 2"},{value:"#CDC9C9",name:"snow 3"},{value:"#8B8989",name:"snow 4"},{value:"#BC8F8F",css:!0,name:"rosybrown"},{value:"#FFC1C1",name:"rosybrown 1"},{value:"#EEB4B4",name:"rosybrown 2"},{value:"#CD9B9B",name:"rosybrown 3"},{value:"#8B6969",name:"rosybrown 4"},{value:"#F08080",css:!0,name:"lightcoral"},{value:"#CD5C5C",css:!0,name:"indianred"},{value:"#FF6A6A",name:"indianred 1"},{value:"#EE6363",name:"indianred 2"},{value:"#8B3A3A",name:"indianred 4"},{value:"#CD5555",name:"indianred 3"},{value:"#A52A2A",css:!0,name:"brown"},{value:"#FF4040",name:"brown 1"},{value:"#EE3B3B",name:"brown 2"},{value:"#CD3333",name:"brown 3"},{value:"#8B2323",name:"brown 4"},{value:"#B22222",css:!0,name:"firebrick"},{value:"#FF3030",name:"firebrick 1"},{value:"#EE2C2C",name:"firebrick 2"},{value:"#CD2626",name:"firebrick 3"},{value:"#8B1A1A",name:"firebrick 4"},{value:"#FF0000",vga:!0,name:"red 1"},{value:"#FF0000",vga:!0,css:!0,name:"red"},{value:"#EE0000",name:"red 2"},{value:"#CD0000",name:"red 3"},{value:"#8B0000",name:"red 4"},{value:"#8B0000",css:!0,name:"darkred"},{value:"#800000",vga:!0,css:!0,name:"maroon"},{value:"#8E388E",name:"sgi beet"},{value:"#7171C6",name:"sgi slateblue"},{value:"#7D9EC0",name:"sgi lightblue"},{value:"#388E8E",name:"sgi teal"},{value:"#71C671",name:"sgi chartreuse"},{value:"#8E8E38",name:"sgi olivedrab"},{value:"#C5C1AA",name:"sgi brightgray"},{value:"#C67171",name:"sgi salmon"},{value:"#555555",name:"sgi darkgray"},{value:"#1E1E1E",name:"sgi gray 12"},{value:"#282828",name:"sgi gray 16"},{value:"#515151",name:"sgi gray 32"},{value:"#5B5B5B",name:"sgi gray 36"},{value:"#848484",name:"sgi gray 52"},{value:"#8E8E8E",name:"sgi gray 56"},{value:"#AAAAAA",name:"sgi lightgray"},{value:"#B7B7B7",name:"sgi gray 72"},{value:"#C1C1C1",name:"sgi gray 76"},{value:"#EAEAEA",name:"sgi gray 92"},{value:"#F4F4F4",name:"sgi gray 96"},{value:"#FFFFFF",vga:!0,css:!0,name:"white"},{value:"#F5F5F5",name:"white smoke"},{value:"#F5F5F5",name:"gray 96"},{value:"#DCDCDC",css:!0,name:"gainsboro"},{value:"#D3D3D3",css:!0,name:"lightgrey"},{value:"#C0C0C0",vga:!0,css:!0,name:"silver"},{value:"#A9A9A9",css:!0,name:"darkgray"},{value:"#808080",vga:!0,css:!0,name:"gray"},{value:"#696969",css:!0,name:"dimgray"},{value:"#696969",name:"gray 42"},{value:"#000000",vga:!0,css:!0,name:"black"},{value:"#FCFCFC",name:"gray 99"},{value:"#FAFAFA",name:"gray 98"},{value:"#F7F7F7",name:"gray 97"},{value:"#F2F2F2",name:"gray 95"},{value:"#F0F0F0",name:"gray 94"},{value:"#EDEDED",name:"gray 93"},{value:"#EBEBEB",name:"gray 92"},{value:"#E8E8E8",name:"gray 91"},{value:"#E5E5E5",name:"gray 90"},{value:"#E3E3E3",name:"gray 89"},{value:"#E0E0E0",name:"gray 88"},{value:"#DEDEDE",name:"gray 87"},{value:"#DBDBDB",name:"gray 86"},{value:"#D9D9D9",name:"gray 85"},{value:"#D6D6D6",name:"gray 84"},{value:"#D4D4D4",name:"gray 83"},{value:"#D1D1D1",name:"gray 82"},{value:"#CFCFCF",name:"gray 81"},{value:"#CCCCCC",name:"gray 80"},{value:"#C9C9C9",name:"gray 79"},{value:"#C7C7C7",name:"gray 78"},{value:"#C4C4C4",name:"gray 77"},{value:"#C2C2C2",name:"gray 76"},{value:"#BFBFBF",name:"gray 75"},{value:"#BDBDBD",name:"gray 74"},{value:"#BABABA",name:"gray 73"},{value:"#B8B8B8",name:"gray 72"},{value:"#B5B5B5",name:"gray 71"},{value:"#B3B3B3",name:"gray 70"},{value:"#B0B0B0",name:"gray 69"},{value:"#ADADAD",name:"gray 68"},{value:"#ABABAB",name:"gray 67"},{value:"#A8A8A8",name:"gray 66"},{value:"#A6A6A6",name:"gray 65"},{value:"#A3A3A3",name:"gray 64"},{value:"#A1A1A1",name:"gray 63"},{value:"#9E9E9E",name:"gray 62"},{value:"#9C9C9C",name:"gray 61"},{value:"#999999",name:"gray 60"},{value:"#969696",name:"gray 59"},{value:"#949494",name:"gray 58"},{value:"#919191",name:"gray 57"},{value:"#8F8F8F",name:"gray 56"},{value:"#8C8C8C",name:"gray 55"},{value:"#8A8A8A",name:"gray 54"},{value:"#878787",name:"gray 53"},{value:"#858585",name:"gray 52"},{value:"#828282",name:"gray 51"},{value:"#7F7F7F",name:"gray 50"},{value:"#7D7D7D",name:"gray 49"},{value:"#7A7A7A",name:"gray 48"},{value:"#787878",name:"gray 47"},{value:"#757575",name:"gray 46"},{value:"#737373",name:"gray 45"},{value:"#707070",name:"gray 44"},{value:"#6E6E6E",name:"gray 43"},{value:"#666666",name:"gray 40"},{value:"#636363",name:"gray 39"},{value:"#616161",name:"gray 38"},{value:"#5E5E5E",name:"gray 37"},{value:"#5C5C5C",name:"gray 36"},{value:"#595959",name:"gray 35"},{value:"#575757",name:"gray 34"},{value:"#545454",name:"gray 33"},{value:"#525252",name:"gray 32"},{value:"#4F4F4F",name:"gray 31"},{value:"#4D4D4D",name:"gray 30"},{value:"#4A4A4A",name:"gray 29"},{value:"#474747",name:"gray 28"},{value:"#454545",name:"gray 27"},{value:"#424242",name:"gray 26"},{value:"#404040",name:"gray 25"},{value:"#3D3D3D",name:"gray 24"},{value:"#3B3B3B",name:"gray 23"},{value:"#383838",name:"gray 22"},{value:"#363636",name:"gray 21"},{value:"#333333",name:"gray 20"},{value:"#303030",name:"gray 19"},{value:"#2E2E2E",name:"gray 18"},{value:"#2B2B2B",name:"gray 17"},{value:"#292929",name:"gray 16"},{value:"#262626",name:"gray 15"},{value:"#242424",name:"gray 14"},{value:"#212121",name:"gray 13"},{value:"#1F1F1F",name:"gray 12"},{value:"#1C1C1C",name:"gray 11"},{value:"#1A1A1A",name:"gray 10"},{value:"#171717",name:"gray 9"},{value:"#141414",name:"gray 8"},{value:"#121212",name:"gray 7"},{value:"#0F0F0F",name:"gray 6"},{value:"#0D0D0D",name:"gray 5"},{value:"#0A0A0A",name:"gray 4"},{value:"#080808",name:"gray 3"},{value:"#050505",name:"gray 2"},{value:"#030303",name:"gray 1"},{value:"#F5F5F5",css:!0,name:"whitesmoke"}];(function(e){var t=q3,n=t.filter(function(s){return!!s.css}),r=t.filter(function(s){return!!s.vga});e.exports=function(s){var o=e.exports.get(s);return o&&o.value},e.exports.get=function(s){return s=s||"",s=s.trim().toLowerCase(),t.filter(function(o){return o.name.toLowerCase()===s}).pop()},e.exports.all=e.exports.get.all=function(){return t},e.exports.get.css=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),n.filter(function(o){return o.name.toLowerCase()===s}).pop()):n},e.exports.get.vga=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),r.filter(function(o){return o.name.toLowerCase()===s}).pop()):r}})(e1);var W3=e1.exports,K3=1/0,G3="[object Symbol]",Z3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,t1="\\ud800-\\udfff",Y3="\\u0300-\\u036f\\ufe20-\\ufe23",J3="\\u20d0-\\u20f0",n1="\\u2700-\\u27bf",r1="a-z\\xdf-\\xf6\\xf8-\\xff",X3="\\xac\\xb1\\xd7\\xf7",Q3="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",e4="\\u2000-\\u206f",t4=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",s1="A-Z\\xc0-\\xd6\\xd8-\\xde",n4="\\ufe0e\\ufe0f",o1=X3+Q3+e4+t4,a1="['’]",ch="["+o1+"]",r4="["+Y3+J3+"]",i1="\\d+",s4="["+n1+"]",l1="["+r1+"]",u1="[^"+t1+o1+i1+n1+r1+s1+"]",o4="\\ud83c[\\udffb-\\udfff]",a4="(?:"+r4+"|"+o4+")",i4="[^"+t1+"]",c1="(?:\\ud83c[\\udde6-\\uddff]){2}",d1="[\\ud800-\\udbff][\\udc00-\\udfff]",Vs="["+s1+"]",l4="\\u200d",dh="(?:"+l1+"|"+u1+")",u4="(?:"+Vs+"|"+u1+")",mh="(?:"+a1+"(?:d|ll|m|re|s|t|ve))?",fh="(?:"+a1+"(?:D|LL|M|RE|S|T|VE))?",m1=a4+"?",f1="["+n4+"]?",c4="(?:"+l4+"(?:"+[i4,c1,d1].join("|")+")"+f1+m1+")*",d4=f1+m1+c4,m4="(?:"+[s4,c1,d1].join("|")+")"+d4,f4=RegExp([Vs+"?"+l1+"+"+mh+"(?="+[ch,Vs,"$"].join("|")+")",u4+"+"+fh+"(?="+[ch,Vs+dh,"$"].join("|")+")",Vs+"?"+dh+"+"+mh,Vs+"+"+fh,i1,m4].join("|"),"g"),p4=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,h4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,_4=typeof self=="object"&&self&&self.Object===Object&&self,g4=h4||_4||Function("return this")();function y4(e){return e.match(Z3)||[]}function v4(e){return p4.test(e)}function b4(e){return e.match(f4)||[]}var z4=Object.prototype,C4=z4.toString,ph=g4.Symbol,hh=ph?ph.prototype:void 0,_h=hh?hh.toString:void 0;function w4(e){if(typeof e=="string")return e;if(x4(e))return _h?_h.call(e):"";var t=e+"";return t=="0"&&1/e==-K3?"-0":t}function k4(e){return!!e&&typeof e=="object"}function x4(e){return typeof e=="symbol"||k4(e)&&C4.call(e)==G3}function E4(e){return e==null?"":w4(e)}function S4(e,t,n){return e=E4(e),t=n?void 0:t,t===void 0?v4(e)?b4(e):y4(e):e.match(t)||[]}var $4=S4,A4=1/0,T4="[object Symbol]",O4=/^\s+/,wm="\\ud800-\\udfff",p1="\\u0300-\\u036f\\ufe20-\\ufe23",h1="\\u20d0-\\u20f0",_1="\\ufe0e\\ufe0f",D4="["+wm+"]",ed="["+p1+h1+"]",td="\\ud83c[\\udffb-\\udfff]",P4="(?:"+ed+"|"+td+")",g1="[^"+wm+"]",y1="(?:\\ud83c[\\udde6-\\uddff]){2}",v1="[\\ud800-\\udbff][\\udc00-\\udfff]",b1="\\u200d",z1=P4+"?",C1="["+_1+"]?",I4="(?:"+b1+"(?:"+[g1,y1,v1].join("|")+")"+C1+z1+")*",F4=C1+z1+I4,R4="(?:"+[g1+ed+"?",ed,y1,v1,D4].join("|")+")",L4=RegExp(td+"(?="+td+")|"+R4+F4,"g"),N4=RegExp("["+b1+wm+p1+h1+_1+"]"),M4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,V4=typeof self=="object"&&self&&self.Object===Object&&self,H4=M4||V4||Function("return this")();function B4(e){return e.split("")}function U4(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function K4(e){return N4.test(e)}function gh(e){return K4(e)?G4(e):B4(e)}function G4(e){return e.match(L4)||[]}var Z4=Object.prototype,Y4=Z4.toString,yh=H4.Symbol,vh=yh?yh.prototype:void 0,bh=vh?vh.toString:void 0;function J4(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:J4(e,t,n)}function Q4(e){return!!e&&typeof e=="object"}function e6(e){return typeof e=="symbol"||Q4(e)&&Y4.call(e)==T4}function t6(e){return e==null?"":w1(e)}function n6(e,t,n){if(e=t6(e),e&&(n||t===void 0))return e.replace(O4,"");if(!e||!(t=w1(t)))return e;var r=gh(e),s=W4(r,gh(t));return X4(r,s).join("")}var r6=n6,nd=1/0,s6=9007199254740991,o6=17976931348623157e292,zh=NaN,a6="[object Symbol]",i6=/^\s+|\s+$/g,l6=/^[-+]0x[0-9a-f]+$/i,u6=/^0b[01]+$/i,c6=/^0o[0-7]+$/i,km="\\ud800-\\udfff",k1="\\u0300-\\u036f\\ufe20-\\ufe23",x1="\\u20d0-\\u20f0",E1="\\ufe0e\\ufe0f",d6="["+km+"]",rd="["+k1+x1+"]",sd="\\ud83c[\\udffb-\\udfff]",m6="(?:"+rd+"|"+sd+")",S1="[^"+km+"]",$1="(?:\\ud83c[\\udde6-\\uddff]){2}",A1="[\\ud800-\\udbff][\\udc00-\\udfff]",T1="\\u200d",O1=m6+"?",D1="["+E1+"]?",f6="(?:"+T1+"(?:"+[S1,$1,A1].join("|")+")"+D1+O1+")*",p6=D1+O1+f6,h6="(?:"+[S1+rd+"?",rd,$1,A1,d6].join("|")+")",od=RegExp(sd+"(?="+sd+")|"+h6+p6,"g"),_6=RegExp("["+T1+km+k1+x1+E1+"]"),g6=parseInt,y6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,v6=typeof self=="object"&&self&&self.Object===Object&&self,b6=y6||v6||Function("return this")(),z6=w6("length");function C6(e){return e.split("")}function w6(e){return function(t){return t==null?void 0:t[e]}}function xm(e){return _6.test(e)}function P1(e){return xm(e)?x6(e):z6(e)}function k6(e){return xm(e)?E6(e):C6(e)}function x6(e){for(var t=od.lastIndex=0;od.test(e);)t++;return t}function E6(e){return e.match(od)||[]}var S6=Object.prototype,$6=S6.toString,Ch=b6.Symbol,A6=Math.ceil,T6=Math.floor,wh=Ch?Ch.prototype:void 0,kh=wh?wh.toString:void 0;function xh(e,t){var n="";if(!e||t<1||t>s6)return n;do t%2&&(n+=e),t=T6(t/2),t&&(e+=e);while(t);return n}function O6(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:O6(e,t,n)}function P6(e,t){t=t===void 0?" ":I1(t);var n=t.length;if(n<2)return n?xh(t,e):t;var r=xh(t,A6(e/P1(t)));return xm(t)?D6(k6(r),0,e).join(""):r.slice(0,e)}function Eh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function I6(e){return!!e&&typeof e=="object"}function F1(e){return typeof e=="symbol"||I6(e)&&$6.call(e)==a6}function F6(e){if(!e)return e===0?e:0;if(e=L6(e),e===nd||e===-nd){var t=e<0?-1:1;return t*o6}return e===e?e:0}function R6(e){var t=F6(e),n=t%1;return t===t?n?t-n:t:0}function L6(e){if(typeof e=="number")return e;if(F1(e))return zh;if(Eh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Eh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(i6,"");var n=u6.test(e);return n||c6.test(e)?g6(e.slice(2),n?2:8):l6.test(e)?zh:+e}function N6(e){return e==null?"":I1(e)}function M6(e,t,n){e=N6(e),t=R6(t);var r=t?P1(e):0;return t&&r{const s=(e+(r||"")).toString().includes("%");if(typeof e=="string"?[e,t,n,r]=e.match(/(0?\.?\d{1,3})%?\b/g).map(Number):r!==void 0&&(r=parseFloat(r)),typeof e!="number"||typeof t!="number"||typeof n!="number"||e>255||t>255||n>255)throw new TypeError("Expected three numbers below 256");if(typeof r=="number"){if(!s&&r>=0&&r<=1)r=Math.round(255*r);else if(s&&r>=0&&r<=100)r=Math.round(255*r/100);else throw new TypeError(`Expected alpha value (${r}) as a fraction or percentage`);r=(r|256).toString(16).slice(1)}else r="";return(n|t<<8|e<<16|1<<24).toString(16).slice(1)+r};const wa="a-f\\d",B6=`#?[${wa}]{3}[${wa}]?`,U6=`#?[${wa}]{6}([${wa}]{2})?`,j6=new RegExp(`[^#${wa}]`,"gi"),q6=new RegExp(`^${B6}$|^${U6}$`,"i");var W6=(e,t={})=>{if(typeof e!="string"||j6.test(e)||!q6.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=Number.parseInt(e,16),s=r>>16,o=r>>8&255,a=r&255,i=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[s,o,a,i];if(t.format==="css"){const l=i===1?"":` / ${Number((i*100).toFixed(2))}%`;return`rgb(${s} ${o} ${a}${l})`}return{red:s,green:o,blue:a,alpha:i}},K6=W3,G6=$4,Z6=r6,Y6=V6,J6=H6,R1=W6;const Ku=.75,Gu=.25,Zu=16777215,X6=49979693;var Q6=function(e){return"#"+n5(String(JSON.stringify(e)))};function e5(e){var t=G6(e),n=[];return t.forEach(function(r){var s=K6(r);s&&n.push(R1(Z6(s,"#"),{format:"array"}))}),n}function t5(e){var t=[0,0,0];return e.forEach(function(n){for(var r=0;r<3;r++)t[r]+=n[r]}),[t[0]/e.length,t[1]/e.length,t[2]/e.length]}function n5(e){var t,n=e5(e);n.length>0&&(t=t5(n));var r=1,s=0,o=1;if(e.length>0)for(var a=0;as&&(s=e[a].charCodeAt(0)),o=parseInt(Zu/s),r=(r+e[a].charCodeAt(0)*o*X6)%Zu;var i=(r*e.length%Zu).toString(16);i=Y6(i,6,i);var l=R1(i,{format:"array"});return t?J6(Gu*l[0]+Ku*t[0],Gu*l[1]+Ku*t[1],Gu*l[2]+Ku*t[2]):i}const r5=Ia(Q6);function s5(e){const t=e.replace(/#/,""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),s=parseInt(t.substr(4,2),16);return[.299*n,.587*r,.114*s].reduce((a,i)=>a+i)/255>.5}function o5(e){return s5(e)?"#000000":"#ffffff"}function a5(e){const t=` ${e.caption} `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(t)}`}function i5(e,t,n){const r=r5(t),s=o5(r),o={width:n.width,height:n.height,textColor:s,backgroundColor:r,caption:e,fontFamily:n.font_family,fontSize:n.font_size,fontWeight:n.font_weight};return a5(o)}const l5={name:"CoverArtwork",props:["artist","album","artwork_url","maxwidth","maxheight"],emits:["click"],data(){return{width:600,height:600,font_family:"sans-serif",font_size:200,font_weight:600,lazy_lifecycle:{error:e=>{e.src=this.dataURI()}}}},computed:{artwork_url_with_size(){return this.maxwidth>0&&this.maxheight>0?M.artwork_url_append_size_params(this.artwork_url,this.maxwidth,this.maxheight):M.artwork_url_append_size_params(this.artwork_url)},alt_text(){return`${this.artist} - ${this.album}`},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""}},methods:{dataURI(){return i5(this.caption,this.alt_text,{width:this.width,height:this.height,font_family:this.font_family,font_size:this.font_size,font_weight:this.font_weight})}}};function u5(e,t,n,r,s,o){const a=Ld("lazy");return k(),$("figure",null,[bt(u("img",{onClick:t[0]||(t[0]=i=>e.$emit("click"))},null,512),[[a,{src:o.artwork_url_with_size,lifecycle:s.lazy_lifecycle}]])])}const Fn=te(l5,[["render",u5]]),{t:Yu,locale:Em}=su.global,L1="GROUP_KEY_NONE";function N1(){return{compareFn:null,groupKeyFn:e=>L1}}function Rn(e,t=!1,n="_"){return{compareFn:t?null:(r,s)=>{const o=r[e]||n,a=s[e]||n;return o.localeCompare(a,Em.value)},groupKeyFn:r=>{const s=(r[e]||n).charAt(0);return s.match(new RegExp("\\p{Letter}","gu"))?s.toUpperCase():s.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"}}}function Sm(e,{direction:t="asc",defaultValue:n=0}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o-a;return t==="asc"?i:i*-1},groupKeyFn:r=>{const s=r[e]||n;return Math.floor(s/10)}}}function kl(e,{direction:t="asc",defaultValue:n="0000"}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o.localeCompare(a,Em.value);return t==="asc"?i:i*-1},groupKeyFn:r=>(r[e]||n).substring(0,4)}}function c5(e,t="0000"){return{compareFn:(n,r)=>{const s=n[e]||t;return(r[e]||t).localeCompare(s,Em.value)},groupKeyFn:n=>{const r=n[e];if(!r)return t;const s=new Date().getTime()-new Date(r).getTime();return s<864e5?Yu("group-by-list.today"):s<6048e5?Yu("group-by-list.last-week"):s<2592e6?Yu("group-by-list.last-month"):r.substring(0,4)}}}class ge{constructor({items:t=[],total:n=0,offset:r=0,limit:s=-1}={}){this.items=t,this.total=n,this.offset=r,this.limit=s,this.count=t.length,this.indexList=[],this.group(N1())}get(){return this.itemsByGroup}isEmpty(){return!this.items||this.items.length<=0}group(t,n=[]){const r=n?this.items.filter(o=>n.every(a=>a(o))):this.items;this.count=r.length;const s=t.compareFn?[...r].sort(t.compareFn):r;this.indexList=[...new Set(s.map(t.groupKeyFn))],this.itemsByGroup=s.reduce((o,a)=>{const i=t.groupKeyFn(a);return o[i]=[...o[i]||[],a],o},{})}[Symbol.iterator](){let t=-1,n=-1;return{next:()=>{if(this.isEmpty())return{done:!0};if(t>=this.indexList.length)return{done:!0};if(t<0&&(++t,n=0,this.indexList[t]!==L1))return{value:{groupKey:this.indexList[t],itemId:this.indexList[t],isItem:!1,item:{}},done:!1};let r=this.indexList[t],s=this.itemsByGroup[r];if(n0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},c=function(f,p){var h=new XMLHttpRequest,_=function(b,w){function C(A){b&&b(A),p&&p(null,A)}function z(){w&&w(h),p&&p(h,null)}var v=f.type||"GET";if(h.open(v,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var A=null;try{A=h.responseText?JSON.parse(h.responseText):""}catch(D){console.error(D)}h.status>=200&&h.status<300?C(A):z()}},v==="GET")h.send(null);else{var S=null;f.postData&&(f.contentType==="image/jpeg"?(S=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(S=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(S)}};return p?(_(),null):a(_,function(){h.abort()})},m=function(f,p,h,_){var b={},w=null;typeof p=="object"?(b=p,w=h):typeof p=="function"&&(w=p);var C=f.type||"GET";return C!=="GET"&&f.postData&&!_?f.postData=i(f.postData,b):f.params=i(f.params,b),c(f,w)},d=function(){};return d.prototype={constructor:t},d.prototype.getGeneric=function(f,p){var h={url:f};return m(h,p)},d.prototype.getMe=function(f,p){var h={url:n+"/me"};return m(h,f,p)},d.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return m(h,f,p)},d.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return m(h,f,p)},d.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return m(h,f,p)},d.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return m(h,f,p)},d.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return m(h,f,p)},d.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(_,p,h)},d.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return m(h,p)},d.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(_,h)},d.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return m(h,f,p)},d.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return m(_,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),m(_,p,h)},d.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return m(_,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return m(_,p,h)},d.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return m(h,p)},d.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(_,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(_,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(b,h,_,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(_,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var w={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(w,_,b)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(w){return typeof w=="string"?{uri:w}:w}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return m(b,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(C){return typeof C=="string"?{uri:C}:C}),w={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return m(w,{},_)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(b,{},_)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(_,{},h)},d.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return m(_,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return m(_,p,h)},d.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,m(_,p,h)},d.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return m(_,p,h)},d.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return m(_,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(b,h,_)},d.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return m(_,p,h)},d.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return m(h,f,p)},d.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return m(h,f,p)},d.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return m(h,f,p)},d.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return m(_,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return m(_,p,h)},d.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(b,h,_)},d.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},d.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},d.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},d.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},d.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},d.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},d.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,m(h,{},p)},d.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return m(h,{},p)},d.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,m(h,{},p)},d.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return m(h,f,p)},d.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return m(p,{},f)},d.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return m(p,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return m(h,f,p)},d.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return m(h,f,p)},d.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return m(b,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(C){C in f&&(_[C]=f[C])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},w=typeof f=="function"?f:{};return m(b,w,p)},d.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return m(b,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return m(_,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return m(_,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return m(_,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return m(b,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return m(b,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return m(b,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return m(b,p,h)},d.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,m(_,p,h)},d.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return m(h,f,p)},d.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return m(_,p,h)},d.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,m(_,p,h)},d.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getAccessToken=function(){return r},d.prototype.setAccessToken=function(f){r=f},d.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)s=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(M1);var d5=M1.exports;const Yn=Ia(d5),m5={name:"ModalDialogTrack",props:["show","track"],emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{play_track(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.track.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.track.album_id}}):this.track.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.track.album_id}}):this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.track.genre},query:{media_kind:this.track.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})},mark_new(){M.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){M.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})}}},f5={key:0,class:"modal is-active"},p5={class:"modal-content fd-modal-card"},h5={class:"card"},_5={class:"card-content"},g5=["textContent"],y5=["textContent"],v5={key:0,class:"buttons"},b5=["textContent"],z5=["textContent"],C5={class:"content is-small"},w5=["textContent"],k5=["textContent"],x5={key:0},E5=["textContent"],S5=["textContent"],$5={key:1},A5=["textContent"],T5=["textContent"],O5={key:2},D5=["textContent"],P5=["textContent"],I5={key:3},F5=["textContent"],R5=["textContent"],L5={key:4},N5=["textContent"],M5=["textContent"],V5=["textContent"],H5=["textContent"],B5=["textContent"],U5=["textContent"],j5=["textContent"],q5=["textContent"],W5=["textContent"],K5={class:"title is-6"},G5=["textContent"],Z5={key:0,class:"has-text-weight-normal"},Y5=["textContent"],J5=["textContent"],X5=["textContent"],Q5={class:"title is-6"},eD=["textContent"],tD=["textContent"],nD=["textContent"],rD=["textContent"],sD=["textContent"],oD=["textContent"],aD=["textContent"],iD=["textContent"],lD={key:5},uD=["textContent"],cD=["textContent"],dD={class:"card-footer"},mD=["textContent"],fD=["textContent"],pD=["textContent"];function hD(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",f5,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",p5,[u("div",h5,[u("div",_5,[u("p",{class:"title is-4",textContent:g(n.track.title)},null,8,g5),u("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,y5),n.track.media_kind==="podcast"?(k(),$("div",v5,[n.track.play_count>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...i)=>o.mark_new&&o.mark_new(...i)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,b5)):H("",!0),n.track.play_count===0?(k(),$("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...i)=>o.mark_played&&o.mark_played(...i)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,z5)):H("",!0)])):H("",!0),u("div",C5,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,w5),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.track.album)},null,8,k5)]),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),$("p",x5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,E5),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.track.album_artist)},null,8,S5)])):H("",!0),n.track.composer?(k(),$("p",$5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,A5),u("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,T5)])):H("",!0),n.track.date_released?(k(),$("p",O5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,D5),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,P5)])):n.track.year>0?(k(),$("p",I5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,F5),u("span",{class:"title is-6",textContent:g(n.track.year)},null,8,R5)])):H("",!0),n.track.genre?(k(),$("p",L5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,N5),u("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.track.genre)},null,8,M5)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,V5),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,H5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,B5),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,U5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,j5),u("span",{class:"title is-6",textContent:g(n.track.path)},null,8,q5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,W5),u("span",K5,[u("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,G5),n.track.data_kind==="spotify"?(k(),$("span",Z5,[rt(" ("),u("a",{onClick:t[6]||(t[6]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.track.spotify-artist"))},null,8,Y5),rt(", "),u("a",{onClick:t[7]||(t[7]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.track.spotify-album"))},null,8,J5),rt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,X5),u("span",Q5,[u("span",{textContent:g(n.track.type)},null,8,eD),n.track.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,tD)):H("",!0),n.track.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.track.channels)}))},null,8,nD)):H("",!0),n.track.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,rD)):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,sD),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,oD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,aD),u("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,iD)]),n.track.comment?(k(),$("p",lD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,uD),u("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,cD)])):H("",!0)])]),u("footer",dD,[u("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,mD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[9]||(t[9]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,fD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[10]||(t[10]=(...i)=>o.play_track&&o.play_track(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,pD)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[11]||(t[11]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const _D=te(m5,[["render",hD]]),gD={name:"ProgressBar",props:["max","value"],computed:{width(){return this.value>0&&this.max>0?parseInt(this.value*100/this.max):0},width_percent(){return`${this.width}%`}}};function yD(e,t,n,r,s,o){return o.width>0?(k(),$("div",{key:0,class:"progress-bar",style:ur({width:o.width_percent})},null,4)):H("",!0)}const vD=te(gD,[["render",yD]]),bD={name:"ListTracks",components:{ModalDialogTrack:_D,ProgressBar:vD},props:["tracks","uris","expression","show_progress","show_icon"],emits:["play-count-changed"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track(e){this.uris?M.player_play_uri(this.uris,!1,this.tracks.items.indexOf(e)):this.expression?M.player_play_expression(this.expression,!1,this.tracks.items.indexOf(e)):M.player_play_uri(e.uri,!1)},open_dialog(e){this.selected_track=e,this.show_details_modal=!0}}},zD={key:0,class:"mt-6 mb-5 py-2"},CD=["id","textContent"],wD=["onClick"],kD={key:0,class:"media-left is-clickable"},xD={class:"media-content is-clickable is-clipped"},ED=["textContent"],SD=["textContent"],$D=["textContent"],AD={class:"media-right"},TD=["onClick"];function OD(e,t,n,r,s,o){const a=E("mdicon"),i=E("progress-bar"),l=E("modal-dialog-track");return k(),$(we,null,[(k(!0),$(we,null,ut(n.tracks,c=>(k(),$(we,{key:c.itemId},[c.isItem?(k(),$("div",{key:1,class:Ee(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:m=>o.play_track(c.item)},[n.show_icon?(k(),$("figure",kD,[y(a,{class:"icon",name:"file-outline",size:"16"})])):H("",!0),u("div",xD,[u("h1",{class:Ee(["title is-6",{"has-text-grey":c.item.media_kind==="podcast"&&c.item.play_count>0}]),textContent:g(c.item.title)},null,10,ED),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.artist)},null,8,SD),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.album)},null,8,$D),n.show_progress?(k(),he(i,{key:0,max:c.item.length_ms,value:c.item.seek_ms},null,8,["max","value"])):H("",!0)]),u("div",AD,[u("a",{onClick:nt(m=>o.open_dialog(c.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,TD)])],10,wD)):(k(),$("div",zD,[u("span",{id:"index_"+c.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(c.groupKey)},null,8,CD)]))],64))),128)),(k(),he(Qr,{to:"#app"},[y(l,{show:s.show_details_modal,track:s.selected_track,onClose:t[0]||(t[0]=c=>s.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=c=>e.$emit("play-count-changed"))},null,8,["show","track"])]))],64)}const Cn=te(bD,[["render",OD]]),DD={name:"ModalDialogAlbum",components:{CoverArtwork:Fn},props:["show","album","media_kind","new_tracks"],emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return M.artwork_url_append_size_params(this.album.artwork_url)},media_kind_resolved(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.album.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.album.id}}):this.$router.push({name:"music-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},mark_played(){M.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:e})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},PD={key:0,class:"modal is-active"},ID={class:"modal-content fd-modal-card"},FD={class:"card"},RD={class:"card-content"},LD={class:"title is-4"},ND=["textContent"],MD={key:0,class:"buttons"},VD=["textContent"],HD=["textContent"],BD={class:"content is-small"},UD={key:0},jD=["textContent"],qD=["textContent"],WD={key:1},KD=["textContent"],GD=["textContent"],ZD={key:2},YD=["textContent"],JD=["textContent"],XD=["textContent"],QD=["textContent"],eP=["textContent"],tP=["textContent"],nP=["textContent"],rP=["textContent"],sP=["textContent"],oP=["textContent"],aP={class:"card-footer"},iP=["textContent"],lP=["textContent"],uP=["textContent"];function cP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",PD,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",ID,[u("div",FD,[u("div",RD,[y(a,{artwork_url:n.album.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),u("p",LD,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,ND)]),o.media_kind_resolved==="podcast"?(k(),$("div",MD,[u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>o.mark_played&&o.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,VD),n.album.data_kind==="url"?(k(),$("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,HD)):H("",!0)])):H("",!0),u("div",BD,[n.album.artist?(k(),$("p",UD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,jD),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artist)},null,8,qD)])):H("",!0),n.album.date_released?(k(),$("p",WD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,KD),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,GD)])):n.album.year>0?(k(),$("p",ZD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,YD),u("span",{class:"title is-6",textContent:g(n.album.year)},null,8,JD)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,XD),u("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,QD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,eP),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,tP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,nP),u("span",{class:"title is-6",textContent:g([e.$t("media.kind."+n.album.media_kind),e.$t("data.kind."+n.album.data_kind)].join(" - "))},null,8,rP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,sP),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,oP)])])]),u("footer",aP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,iP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,lP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,uP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const mu=te(DD,[["render",cP]]),ui={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},dP={name:"PageAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){ui.load(e).then(r=>{n(s=>ui.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ui.load(e).then(s=>{ui.set(r,s),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ge}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!0)}}},mP=["textContent"],fP={class:"subtitle is-6 has-text-link has-text-weight-normal"},pP=["textContent"],hP={class:"buttons fd-is-centered-mobile mt-5"},_P=["textContent"],gP=["textContent"];function yP(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",null,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,mP),u("h2",fP,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,pP)]),u("div",hP,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,_P)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:s.album.track_count}))},null,8,gP),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_details_modal,album:s.album,onClose:t[4]||(t[4]=d=>s.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const vP=te(dP,[["render",yP]]),bP={name:"ListItemTrackSpotify",props:["track","position","context_uri"],methods:{play(){this.track.is_playable&&M.player_play_uri(this.context_uri,!1,this.position)}}},zP={class:"media is-align-items-center"},CP=["textContent"],wP=["textContent"],kP={key:0,class:"subtitle is-7"},xP=["textContent"],EP=["textContent"],SP={class:"media-right"};function $P(e,t,n,r,s,o){return k(),$("div",zP,[u("div",{class:Ee(["media-content is-clipped",{"is-clickable":n.track.is_playable,"fd-is-not-allowed":!n.track.is_playable}]),onClick:t[0]||(t[0]=(...a)=>o.play&&o.play(...a))},[u("h1",{class:Ee(["title is-6",{"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.name)},null,10,CP),u("h2",{class:Ee(["subtitle is-7",{"has-text-grey":n.track.is_playable,"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.artists[0].name)},null,10,wP),n.track.is_playable?H("",!0):(k(),$("h2",kP,[rt(" ("),u("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,xP),n.track.restrictions&&n.track.restrictions.reason?(k(),$("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:n.track.restrictions.reason}))},null,8,EP)):H("",!0),rt(") ")]))],2),u("div",SP,[ot(e.$slots,"actions")])])}const $m=te(bP,[["render",$P]]),AP={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Fn},props:["show","album"],emits:["close"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},TP={key:0,class:"modal is-active"},OP={class:"modal-content fd-modal-card"},DP={class:"card"},PP={class:"card-content"},IP={class:"title is-4"},FP=["textContent"],RP={class:"content is-small"},LP=["textContent"],NP=["textContent"],MP=["textContent"],VP=["textContent"],HP=["textContent"],BP=["textContent"],UP={class:"card-footer"},jP=["textContent"],qP=["textContent"],WP=["textContent"];function KP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",TP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",OP,[u("div",DP,[u("div",PP,[y(a,{artwork_url:o.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:o.artwork_loaded,onError:o.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),u("p",IP,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,FP)]),u("div",RP,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,LP),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artists[0].name)},null,8,NP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,MP),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,VP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,HP),u("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,BP)])])]),u("footer",UP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,jP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,qP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,WP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Ma=te(AP,[["render",KP]]),GP={name:"ModalDialogTrackSpotify",props:["show","track","album"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})}}},ZP={key:0,class:"modal is-active"},YP={class:"modal-content fd-modal-card"},JP={class:"card"},XP={class:"card-content"},QP=["textContent"],eI=["textContent"],tI={class:"content is-small"},nI=["textContent"],rI=["textContent"],sI=["textContent"],oI=["textContent"],aI=["textContent"],iI=["textContent"],lI=["textContent"],uI=["textContent"],cI=["textContent"],dI=["textContent"],mI=["textContent"],fI=["textContent"],pI={class:"card-footer"},hI=["textContent"],_I=["textContent"],gI=["textContent"];function yI(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",ZP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",YP,[u("div",JP,[u("div",XP,[u("p",{class:"title is-4",textContent:g(n.track.name)},null,8,QP),u("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,eI),u("div",tI,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,nI),u("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.album.name)},null,8,rI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,sI),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.album.artists[0].name)},null,8,oI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,aI),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,iI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,lI),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,uI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,cI),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,dI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,mI),u("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,fI)])])]),u("footer",pI,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,hI)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,_I)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,gI)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Am=te(GP,[["render",yI]]),ci={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:Ue.state.spotify.webapi_country})},set(e,t){e.album=t}},vI={name:"PageAlbumSpotify",components:{ContentWithHero:du,CoverArtwork:Fn,ListItemTrackSpotify:$m,ModalDialogAlbumSpotify:Ma,ModalDialogTrackSpotify:Am},beforeRouteEnter(e,t,n){ci.load(e).then(r=>{n(s=>ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ci.load(e).then(s=>{ci.set(r,s),n()})},data(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,M.player_play_uri(this.album.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},bI=["textContent"],zI={class:"subtitle is-6 has-text-link has-text-weight-normal"},CI=["textContent"],wI={class:"buttons fd-is-centered-mobile mt-5"},kI=["textContent"],xI=["textContent"],EI=["onClick"];function SI(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-track-spotify"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-hero");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,bI),u("h2",zI,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(s.album.artists[0].name)},null,8,CI)]),u("div",wI,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,kI)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>s.show_album_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:o.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=f=>s.show_album_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:s.album.tracks.total}))},null,8,xI),(k(!0),$(we,null,ut(s.album.tracks.items,(f,p)=>(k(),he(l,{key:f.id,track:f,position:p,context_uri:s.album.uri},{actions:x(()=>[u("a",{onClick:nt(h=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,EI)]),_:2},1032,["track","position","context_uri"]))),128)),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.album,onClose:t[4]||(t[4]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_album_details_modal,album:s.album,onClose:t[5]||(t[5]=f=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const $I=te(vI,[["render",SI]]),AI={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app"}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},TI={class:"section"},OI={class:"container"},DI={class:"columns is-centered"},PI={class:"column is-four-fifths"},II={key:0},FI={ref:"options_ref",style:{height:"1px"}},RI={class:"buttons is-centered mt-4 mb-2"},LI={id:"top",class:"level is-clipped"},NI={class:"level-left is-flex-shrink-1"},MI={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},VI={class:"level-right has-text-centered-mobile"},HI={class:"mt-4"};function BI(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",TI,[u("div",OI,[u("div",DI,[u("div",PI,[e.$slots.options?(k(),$("section",II,[u("div",FI,null,512),ot(e.$slots,"options"),u("nav",RI,[y(i,{class:"button is-small is-white",to:o.position},{default:x(()=>[y(a,{class:"icon is-small",name:o.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):H("",!0),u("div",{class:Ee({"is-full-height":e.$slots.options})},[u("nav",LI,[u("div",NI,[u("div",MI,[u("div",null,[ot(e.$slots,"heading-left")])])]),u("div",VI,[ot(e.$slots,"heading-right")])]),ot(e.$slots,"content"),u("div",HI,[ot(e.$slots,"footer")])],2)])])])])}const Qe=te(AI,[["render",BI]]),UI={name:"ControlDropdown",props:["value","options"],emits:["update:value"],data(){return{is_active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{onClickOutside(e){this.is_active=!1},select(e){this.is_active=!1,this.$emit("update:value",e.id)}}},jI={class:"dropdown-trigger"},qI=["textContent"],WI={id:"dropdown",class:"dropdown-menu",role:"menu"},KI={class:"dropdown-content"},GI=["onClick","textContent"];function ZI(e,t,n,r,s,o){const a=E("mdicon"),i=Ld("click-away");return bt((k(),$("div",{class:Ee(["dropdown",{"is-active":s.is_active}])},[u("div",jI,[u("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>s.is_active=!s.is_active)},[u("span",{textContent:g(o.option.name)},null,8,qI),y(a,{class:"icon",name:"chevron-down",size:"16"})])]),u("div",WI,[u("div",KI,[(k(!0),$(we,null,ut(n.options,l=>(k(),$("a",{key:l.id,class:Ee(["dropdown-item",{"is-active":n.value===l.id}]),onClick:c=>o.select(l),textContent:g(l.name)},null,10,GI))),128))])])],2)),[[i,o.onClickOutside]])}const Ss=te(UI,[["render",ZI]]),YI={name:"IndexButtonList",props:["index"]},JI={class:"buttons is-centered mb-4 fd-is-square"};function XI(e,t,n,r,s,o){const a=E("router-link");return k(),$("section",null,[u("nav",JI,[(k(!0),$(we,null,ut(n.index,i=>(k(),he(a,{key:i,class:"button is-small",to:"#index_"+i},{default:x(()=>[rt(g(i),1)]),_:2},1032,["to"]))),128))])])}const Jn=te(YI,[["render",XI]]),QI={name:"ListAlbums",components:{CoverArtwork:Fn,ModalDialog:mm,ModalDialogAlbum:mu},props:["albums","media_kind","hide_group_title"],emits:["play-count-changed","podcast-deleted"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved(){return this.media_kind?this.media_kind:this.selected_album.media_kind}},methods:{open_album(e){this.selected_album=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},open_remove_podcast_dialog(){M.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{M.library_track_playlists(e.items[0].id).then(({data:t})=>{this.rss_playlist_to_remove=t.items.filter(n=>n.type==="rss")[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},eF={key:0,class:"mt-6 mb-5 py-2"},tF=["id","textContent"],nF=["onClick"],rF={key:0,class:"media-left"},sF={class:"media-content is-clickable is-clipped"},oF=["textContent"],aF={class:"subtitle is-7 has-text-grey"},iF=["textContent"],lF=["textContent"],uF={class:"media-right"},cF=["onClick"],dF=["textContent"],mF={class:"is-size-7"},fF=["textContent"],pF=["textContent"];function hF(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon"),l=E("modal-dialog-album"),c=E("modal-dialog");return k(),$(we,null,[(k(!0),$(we,null,ut(n.albums,m=>(k(),$(we,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),$("div",eF,[u("span",{id:"index_"+m.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.groupKey)},null,8,tF)])):m.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:d=>o.open_album(m.item)},[o.is_visible_artwork?(k(),$("div",rF,[y(a,{artwork_url:m.item.artwork_url,artist:m.item.artist,album:m.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):H("",!0),u("div",sF,[u("div",null,[u("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,oF),u("h2",aF,[u("b",{textContent:g(m.item.artist)},null,8,iF)]),m.item.date_released&&m.item.media_kind==="music"?(k(),$("h2",{key:0,class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g(e.$filters.date(m.item.date_released))},null,8,lF)):H("",!0)])]),u("div",uF,[u("a",{onClick:nt(d=>o.open_dialog(m.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,cF)])],8,nF)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(l,{show:s.show_details_modal,album:s.selected_album,media_kind:n.media_kind,onRemovePodcast:t[0]||(t[0]=m=>o.open_remove_podcast_dialog()),onPlayCountChanged:t[1]||(t[1]=m=>o.play_count_changed()),onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","album","media_kind"]),y(c,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[3]||(t[3]=m=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,dF),u("p",mF,[rt(" ("),u("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,fF),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,pF),rt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const dr=te(QI,[["render",hF]]),_F={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},gF={class:"section fd-tabs-section"},yF={class:"container"},vF={class:"columns is-centered"},bF={class:"column is-four-fifths"},zF={class:"tabs is-centered is-small"},CF=["onClick","onKeypress"],wF=["textContent"],kF=["onClick","onKeypress"],xF=["textContent"],EF=["onClick","onKeypress"],SF=["textContent"],$F=["onClick","onKeypress"],AF=["textContent"],TF=["onClick","onKeypress"],OF=["textContent"],DF=["onClick","onKeypress"],PF=["textContent"];function IF(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",gF,[u("div",yF,[u("div",vF,[u("div",bF,[u("div",zF,[u("ul",null,[y(i,{to:{name:"music-history"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"history",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.history"))},null,8,wF)],40,CF)],2)]),_:1}),y(i,{to:{name:"music-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.artists"))},null,8,xF)],40,kF)],2)]),_:1}),y(i,{to:{name:"music-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.albums"))},null,8,SF)],40,EF)],2)]),_:1}),y(i,{to:{name:"music-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.genres"))},null,8,AF)],40,$F)],2)]),_:1}),y(i,{to:{name:"music-composers"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.composers"))},null,8,OF)],40,TF)],2)]),_:1}),o.spotify_enabled?(k(),he(i,{key:0,to:{name:"music-spotify"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"spotify",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.spotify"))},null,8,PF)],40,DF)],2)]),_:1})):H("",!0)])])])])])])}const mr=te(_F,[["render",IF]]),di={load(e){return M.library_albums("music")},set(e,t){e.albums_list=new ge(t.data)}},FF={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListAlbums:dr,TabsMusic:mr},beforeRouteEnter(e,t,n){di.load(e).then(r=>{n(s=>di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;di.load(e).then(s=>{di.set(r,s),n()})},data(){return{albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.albums.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.albums.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})},{id:3,name:this.$t("page.albums.sort-by.recently-released"),options:kl("date_released",{direction:"desc"})}]}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options,[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(n_,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(gd,e)}}}},RF={class:"fd-page-with-tabs"},LF={class:"columns"},NF={class:"column"},MF=["textContent"],VF={class:"field"},HF={class:"control"},BF=["textContent"],UF=["textContent"],jF={key:0,class:"field"},qF={class:"control"},WF=["textContent"],KF=["textContent"],GF={class:"column"},ZF=["textContent"],YF=["textContent"],JF=["textContent"];function XF(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-albums"),m=E("content-with-heading");return k(),$("div",RF,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.albums.indexList},null,8,["index"]),u("div",LF,[u("div",NF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,MF),u("div",VF,[u("div",HF,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,BF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,UF)]),o.spotify_enabled?(k(),$("div",jF,[u("div",qF,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,WF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,KF)])):H("",!0)]),u("div",GF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort-by.title"))},null,8,ZF),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,YF),u("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:o.albums.count}))},null,8,JF)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{albums:o.albums},null,8,["albums"])]),_:1})])}const QF=te(FF,[["render",XF]]),eR={name:"ModalDialogArtist",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.artist.id}})}}},tR={key:0,class:"modal is-active"},nR={class:"modal-content fd-modal-card"},rR={class:"card"},sR={class:"card-content"},oR={class:"title is-4"},aR=["textContent"],iR={class:"content is-small"},lR=["textContent"],uR=["textContent"],cR=["textContent"],dR=["textContent"],mR=["textContent"],fR=["textContent"],pR=["textContent"],hR=["textContent"],_R={class:"card-footer"},gR=["textContent"],yR=["textContent"],vR=["textContent"];function bR(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",tR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",nR,[u("div",rR,[u("div",sR,[u("p",oR,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,aR)]),u("div",iR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,lR),u("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,uR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,cR),u("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,dR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,mR),u("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,fR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,pR),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,hR)])])]),u("footer",_R,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,gR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,yR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,vR)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const fu=te(eR,[["render",bR]]),mi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new ge(t[1].data)}},zR={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:Ss,ListAlbums:dr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){mi.load(e).then(r=>{n(s=>mi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;mi.load(e).then(s=>{mi.set(r,s),n()})},data(){return{artist:{},albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artist.sort-by.release-date"),options:kl("date_released",{direction:"asc"})}],show_artist_details_modal:!1}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(e_,e)}}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!0)}}},CR={class:"columns"},wR={class:"column"},kR=["textContent"],xR=["textContent"],ER={class:"buttons is-centered"},SR=["textContent"],$R={class:"heading has-text-centered-mobile"},AR=["textContent"],TR=u("span",null," | ",-1),OR=["textContent"];function DR(e,t,n,r,s,o){const a=E("control-dropdown"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-artist"),m=E("content-with-heading");return k(),$("div",null,[y(m,null,{options:x(()=>[u("div",CR,[u("div",wR,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,kR),y(a,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,xR)]),"heading-right":x(()=>[u("div",ER,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=d=>s.show_artist_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,SR)])])]),content:x(()=>[u("p",$R,[u("span",{textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,AR),TR,u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,OR)]),y(l,{albums:o.albums,hide_group_title:!0},null,8,["albums"]),y(c,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[4]||(t[4]=d=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const PR=te(zR,[["render",DR]]),IR={name:"ListItemAlbumSpotify",props:["album"]},FR={class:"media is-align-items-center"},RR={key:0,class:"media-left is-clickable"},LR={class:"media-content is-clickable is-clipped"},NR=["textContent"],MR={class:"subtitle is-7 has-text-grey"},VR=["textContent"],HR=["textContent"],BR={class:"media-right"};function UR(e,t,n,r,s,o){return k(),$("div",FR,[e.$slots.artwork?(k(),$("div",RR,[ot(e.$slots,"artwork")])):H("",!0),u("div",LR,[u("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,NR),u("h2",MR,[u("b",{textContent:g(n.album.artists[0].name)},null,8,VR)]),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,HR)]),u("div",BR,[ot(e.$slots,"actions")])])}const pu=te(IR,[["render",UR]]),jR={name:"ModalDialogArtistSpotify",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.artist.id}})}}},qR={key:0,class:"modal is-active"},WR={class:"modal-content fd-modal-card"},KR={class:"card"},GR={class:"card-content"},ZR={class:"title is-4"},YR=["textContent"],JR={class:"content is-small"},XR=["textContent"],QR=["textContent"],eL=["textContent"],tL=["textContent"],nL={class:"card-footer"},rL=["textContent"],sL=["textContent"],oL=["textContent"];function aL(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",qR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",WR,[u("div",KR,[u("div",GR,[u("p",ZR,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,YR)]),u("div",JR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,XR),u("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,QR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,eL),u("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,tL)])])]),u("footer",nL,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,rL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,sL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,oL)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const V1=te(jR,[["render",aL]]);function iL(e){return e.scrollHeight}function lL(e){return e.scrollWidth}function uL(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function cL(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const dL=u("div",{class:"loading"},"Loading...",-1),mL=u("div",{class:"no-more"},"No more.",-1),fL=u("div",{class:"no-results"},"No results.",-1),pL=u("div",{class:"error"},"Error.",-1),Tm=wr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=Xt();let s=Xt("loading"),o=Xt(n.isInitial),a=0;function i(){Sa(()=>{var z,v;n.position==="top"?uL((z=n.container)!=null?z:document.documentElement,a):n.position==="left"&&cL((v=n.container)!=null?v:document.documentElement,a)})}function l(z,v){return z===0?o.value?(m(),"no-results"):(c(),"no-more"):z!==void 0&&v!==void 0&&z{var v,S;z.isIntersecting&&(n.position==="top"?a=iL((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(a=lL((S=n.container)!=null?S:document.documentElement)),_(),n.load({loaded:l,noMore:c,noResults:m,error:d},{isFirstLoad:o.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let C;return typeof IntersectionObserver<"u"&&I_(()=>{C&&_(),C=w(),b()},{flush:"post"}),en(()=>n.isInitial,z=>{z&&f()}),en(o,z=>{z||t("update:isInitial",!1)}),(z,v)=>(k(),$("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[vn(s)==="loading"?ot(z.$slots,"loading",Ro(Bs({key:0},{isFirstLoad:vn(o)})),()=>[dL]):vn(s)==="no-more"?ot(z.$slots,"no-more",Ro(Bs({key:1},{retry:p})),()=>[mL]):vn(s)==="no-results"?ot(z.$slots,"no-results",Ro(Bs({key:2},{retry:p})),()=>[fL]):vn(s)==="error"?ot(z.$slots,"error",Ro(Bs({key:3},{retry:p})),()=>[pL]):H("",!0)],512))}}),ad=50,fi={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{limit:ad,offset:0,include_groups:"album,single",market:Ue.state.spotify.webapi_country})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},hL={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,ModalDialogArtistSpotify:V1,VueEternalLoading:Tm},beforeRouteEnter(e,t,n){fi.load(e).then(r=>{n(s=>fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;fi.load(e).then(s=>{fi.set(r,s),n()})},data(){return{artist:{},albums:[],total:0,offset:0,show_details_modal:!1,selected_album:{},show_artist_details_modal:!1}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{limit:ad,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,ad)})},append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.artist.uri,!0)},open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},_L=["textContent"],gL={class:"buttons is-centered"},yL=["textContent"],vL=["textContent"],bL=["onClick"];function zL(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-album-spotify"),c=E("VueEternalLoading"),m=E("modal-dialog-album-spotify"),d=E("modal-dialog-artist-spotify"),f=E("content-with-heading");return k(),$("div",null,[y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,_L)]),"heading-right":x(()=>[u("div",gL,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=p=>s.show_artist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...p)=>o.play&&o.play(...p))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,yL)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:s.total}))},null,8,vL),(k(!0),$(we,null,ut(s.albums,p=>(k(),he(l,{key:p.id,album:p,onClick:h=>o.open_album(p)},Oa({actions:x(()=>[u("a",{onClick:nt(h=>o.open_dialog(p),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,bL)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(p),artist:p.artist,album:p.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),s.offset[rt(" . ")]),_:1},8,["load"])):H("",!0),y(m,{show:s.show_details_modal,album:s.selected_album,onClose:t[2]||(t[2]=p=>s.show_details_modal=!1)},null,8,["show","album"]),y(d,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[3]||(t[3]=p=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const CL=te(hL,[["render",zL]]),pi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},wL={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListTracks:Cn,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){pi.load(e).then(r=>{n(s=>pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;pi.load(e).then(s=>{pi.set(r,s),n()})},data(){return{artist:{},groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.artist.sort-by.rating"),options:Sm("rating",{direction:"desc"})}],show_artist_details_modal:!1,tracks_list:new ge}},computed:{selected_groupby_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(t_,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list},track_uris(){return this.tracks_list.items.map(e=>e.uri).join(",")}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){M.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(","),!0)}}},kL={class:"columns"},xL={class:"column"},EL=["textContent"],SL=["textContent"],$L={class:"buttons is-centered"},AL=["textContent"],TL={class:"heading has-text-centered-mobile"},OL=["textContent"],DL=u("span",null," | ",-1),PL=["textContent"];function IL(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-artist"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",kL,[u("div",xL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,EL),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,SL)]),"heading-right":x(()=>[u("div",$L,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_artist_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,AL)])])]),content:x(()=>[u("p",TL,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,OL),DL,u("span",{textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,PL)]),y(c,{tracks:o.tracks,uris:o.track_uris},null,8,["tracks","uris"]),y(m,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[4]||(t[4]=f=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const FL=te(wL,[["render",IL]]),RL={name:"ListArtists",components:{ModalDialogArtist:fu},props:["artists","hide_group_title"],data(){return{show_details_modal:!1,selected_artist:{}}},methods:{open_artist(e){this.selected_artist=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_artist=e,this.show_details_modal=!0}}},LL={key:0,class:"mt-6 mb-5 py-2"},NL={class:"media-content is-clipped"},ML=["id","textContent"],VL=["onClick"],HL={class:"media-content is-clickable is-clipped"},BL=["textContent"],UL={class:"media-right"},jL=["onClick"];function qL(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-artist");return k(),$(we,null,[(k(!0),$(we,null,ut(n.artists,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",LL,[u("div",NL,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,ML)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_artist(l.item)},[u("div",HL,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,BL)]),u("div",UL,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,jL)])],8,VL)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(i,{artist:s.selected_artist,show:s.show_details_modal,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["artist","show"])]))],64)}const Om=te(RL,[["render",qL]]),hi={load(e){return M.library_artists("music")},set(e,t){e.artists_list=new ge(t.data)}},WL={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListArtists:Om,TabsMusic:mr},beforeRouteEnter(e,t,n){hi.load(e).then(r=>{n(s=>hi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;hi.load(e).then(s=>{hi.set(r,s),n()})},data(){return{artists_list:new ge,groupby_options:[{id:1,name:this.$t("page.artists.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artists.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.artists_list.group(e.options,[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.artists_list},selected_groupby_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(Qh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(gd,e)}}}},KL={class:"fd-page-with-tabs"},GL={class:"columns"},ZL={class:"column"},YL=["textContent"],JL={class:"field"},XL={class:"control"},QL=["textContent"],eN=["textContent"],tN={key:0,class:"field"},nN={class:"control"},rN=["textContent"],sN=["textContent"],oN={class:"column"},aN=["textContent"],iN=["textContent"],lN=["textContent"];function uN(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-artists"),m=E("content-with-heading");return k(),$("div",KL,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"]),u("div",GL,[u("div",ZL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,YL),u("div",JL,[u("div",XL,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,QL)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,eN)]),o.spotify_enabled?(k(),$("div",tN,[u("div",nN,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,rN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,sN)])):H("",!0)]),u("div",oN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort-by.title"))},null,8,aN),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,iN),u("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:o.artists.count}))},null,8,lN)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{artists:o.artists},null,8,["artists"])]),_:1})])}const cN=te(WL,[["render",uN]]),_i={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},dN={name:"PageAudiobooksAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){_i.load(e).then(r=>{n(s=>_i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;_i.load(e).then(s=>{_i.set(r,s),n()})},data(){return{album:{},tracks:new ge,show_album_details_modal:!1}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!1)}}},mN=["textContent"],fN={class:"subtitle is-6 has-text-link has-text-weight-normal"},pN=["textContent"],hN={class:"buttons fd-is-centered-mobile mt-5"},_N=["textContent"],gN=["textContent"];function yN(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",null,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,mN),u("h2",fN,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,pN)]),u("div",hN,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,_N)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_album_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_album_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:s.album.track_count}))},null,8,gN),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_album_details_modal,album:s.album,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const vN=te(dN,[["render",yN]]),bN={name:"TabsAudiobooks"},zN={class:"section fd-tabs-section"},CN={class:"container"},wN={class:"columns is-centered"},kN={class:"column is-four-fifths"},xN={class:"tabs is-centered is-small"},EN=["onClick","onKeypress"],SN=["textContent"],$N=["onClick","onKeypress"],AN=["textContent"],TN=["onClick","onKeypress"],ON=["textContent"];function DN(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",zN,[u("div",CN,[u("div",wN,[u("div",kN,[u("div",xN,[u("ul",null,[y(i,{to:{name:"audiobooks-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,SN)],40,EN)],2)]),_:1}),y(i,{to:{name:"audiobooks-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,AN)],40,$N)],2)]),_:1}),y(i,{to:{name:"audiobooks-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,ON)],40,TN)],2)]),_:1})])])])])])])}const Dm=te(bN,[["render",DN]]),gi={load(e){return M.library_albums("audiobook")},set(e,t){e.albums=new ge(t.data),e.albums.group(Rn("name_sort",!0))}},PN={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:Dm,ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:dr},beforeRouteEnter(e,t,n){gi.load(e).then(r=>{n(s=>gi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;gi.load(e).then(s=>{gi.set(r,s),n()})},data(){return{albums:new ge}}},IN={class:"fd-page-with-tabs"},FN=["textContent"],RN=["textContent"];function LN(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-albums"),c=E("content-with-heading");return k(),$("div",IN,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.albums.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,FN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:s.albums.count}))},null,8,RN)]),content:x(()=>[y(l,{albums:s.albums},null,8,["albums"])]),_:1})])}const NN=te(PN,[["render",LN]]),yi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new ge(t[1].data)}},MN={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:dr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){yi.load(e).then(r=>{n(s=>yi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;yi.load(e).then(s=>{yi.set(r,s),n()})},data(){return{artist:{},albums:new ge,show_artist_details_modal:!1}},methods:{play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!1)}}},VN=["textContent"],HN={class:"buttons is-centered"},BN=["textContent"],UN=["textContent"];function jN(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-artist"),c=E("content-with-heading");return k(),$("div",null,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,VN)]),"heading-right":x(()=>[u("div",HN,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_artist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,BN)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:s.artist.album_count}))},null,8,UN),y(i,{albums:s.albums},null,8,["albums"]),y(l,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[2]||(t[2]=m=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const qN=te(MN,[["render",jN]]),vi={load(e){return M.library_artists("audiobook")},set(e,t){e.artists_list=new ge(t.data)}},WN={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:Dm,IndexButtonList:Jn,ListArtists:Om},beforeRouteEnter(e,t,n){vi.load(e).then(r=>{n(s=>vi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;vi.load(e).then(s=>{vi.set(r,s),n()})},data(){return{artists_list:new ge}},computed:{artists(){return this.artists_list?(this.artists_list.group(Rn("name_sort",!0)),this.artists_list):[]}}},KN={class:"fd-page-with-tabs"},GN=["textContent"],ZN=["textContent"];function YN(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-artists"),c=E("content-with-heading");return k(),$("div",KN,[y(a),y(c,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,GN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,ZN)]),"heading-right":x(()=>[]),content:x(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const JN=te(WN,[["render",YN]]),XN={name:"ModalDialogGenre",props:["genre","media_kind","show"],emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),M.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},QN={key:0,class:"modal is-active"},eM={class:"modal-content fd-modal-card"},tM={class:"card"},nM={class:"card-content"},rM={class:"title is-4"},sM=["textContent"],oM={class:"content is-small"},aM=["textContent"],iM=["textContent"],lM=["textContent"],uM=["textContent"],cM=["textContent"],dM=["textContent"],mM={class:"card-footer"},fM=["textContent"],pM=["textContent"],hM=["textContent"];function _M(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",QN,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",eM,[u("div",tM,[u("div",nM,[u("p",rM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.genre.name)},null,8,sM)]),u("div",oM,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,aM),u("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,iM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,lM),u("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,uM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,cM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,dM)])])]),u("footer",mM,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,fM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,pM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,hM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Pm=te(XN,[["render",_M]]),gM={name:"ListGenres",components:{ModalDialogGenre:Pm},props:["genres","hide_group_title","media_kind"],data(){return{show_details_modal:!1,selected_genre:{}}},methods:{open_genre(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_genre=e,this.show_details_modal=!0}}},yM={key:0,class:"mt-6 mb-5 py-2"},vM={class:"media-content is-clipped"},bM=["id","textContent"],zM=["onClick"],CM={class:"media-content is-clickable is-clipped"},wM=["textContent"],kM={class:"media-right"},xM=["onClick"];function EM(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-genre");return k(),$(we,null,[(k(!0),$(we,null,ut(n.genres,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",yM,[u("div",vM,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,bM)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_genre(l.item)},[u("div",CM,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,wM)]),u("div",kM,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,xM)])],8,zM)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,genre:s.selected_genre,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","genre","media_kind"])]))],64)}const H1=te(gM,[["render",EM]]),bi={load(e){return M.library_genres("audiobook")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},SM={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:H1,TabsAudiobooks:Dm},beforeRouteEnter(e,t,n){bi.load(e).then(r=>{n(s=>bi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;bi.load(e).then(s=>{bi.set(r,s),n()})},data(){return{genres:new ge}}},$M={class:"fd-page-with-tabs"},AM=["textContent"],TM=["textContent"];function OM(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",$M,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,AM),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,TM)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const DM=te(SM,[["render",OM]]),PM={name:"ModalDialogComposer",props:["show","composer"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(`composer is "${this.composer.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(`composer is "${this.composer.name}" and media_kind is music`)},open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},open_tracks(){this.show_details_modal=!1,this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})}}},IM={key:0,class:"modal is-active"},FM={class:"modal-content fd-modal-card"},RM={class:"card"},LM={class:"card-content"},NM={class:"title is-4"},MM=["textContent"],VM=["textContent"],HM=["textContent"],BM=["textContent"],UM=["textContent"],jM=["textContent"],qM=["textContent"],WM={class:"card-footer"},KM=["textContent"],GM=["textContent"],ZM=["textContent"];function YM(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",IM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",FM,[u("div",RM,[u("div",LM,[u("p",NM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.name)},null,8,MM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,VM),u("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.album_count)},null,8,HM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,BM),u("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...i)=>o.open_tracks&&o.open_tracks(...i)),textContent:g(n.composer.track_count)},null,8,UM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,jM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,qM)])]),u("footer",WM,[u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,KM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,GM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,ZM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Im=te(PM,[["render",YM]]),zi={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums_list=new ge(t[1].data.albums)}},JM={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:dr,ModalDialogComposer:Im},beforeRouteEnter(e,t,n){zi.load(e).then(r=>{n(s=>zi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;zi.load(e).then(s=>{zi.set(r,s),n()})},data(){return{composer:{},albums_list:new ge,show_composer_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){M.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},XM=["textContent"],QM={class:"buttons is-centered"},e7=["textContent"],t7={class:"heading has-text-centered-mobile"},n7=["textContent"],r7=u("span",null," | ",-1),s7=["textContent"];function o7(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-composer"),c=E("content-with-heading");return k(),$("div",null,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,XM)]),"heading-right":x(()=>[u("div",QM,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_composer_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,e7)])])]),content:x(()=>[u("p",t7,[u("span",{textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,n7),r7,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>o.open_tracks&&o.open_tracks(...m)),textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,s7)]),y(i,{albums:s.albums_list,hide_group_title:!0},null,8,["albums"]),y(l,{show:s.show_composer_details_modal,composer:s.composer,onClose:t[3]||(t[3]=m=>s.show_composer_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const a7=te(JM,[["render",o7]]),Ci={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},i7={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListTracks:Cn,ModalDialogComposer:Im},beforeRouteEnter(e,t,n){Ci.load(e).then(r=>{n(s=>Ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ci.load(e).then(s=>{Ci.set(r,s),n()})},data(){return{groupby_options:[{id:1,name:this.$t("page.composer.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.composer.sort-by.rating"),options:Sm("rating",{direction:"desc"})}],composer:{},show_composer_details_modal:!1,tracks_list:new ge}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_groupby_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(Jh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){M.player_play_expression(this.expression,!0)}}},l7={class:"columns"},u7={class:"column"},c7=["textContent"],d7=["textContent"],m7={class:"buttons is-centered"},f7=["textContent"],p7={class:"heading has-text-centered-mobile"},h7=["textContent"],_7=u("span",null," | ",-1),g7=["textContent"];function y7(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-composer"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",l7,[u("div",u7,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,c7),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,d7)]),"heading-right":x(()=>[u("div",m7,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_composer_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,f7)])])]),content:x(()=>[u("p",p7,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_albums&&o.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,h7),_7,u("span",{textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,g7)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_composer_details_modal,composer:s.composer,onClose:t[4]||(t[4]=f=>s.show_composer_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const v7=te(i7,[["render",y7]]),b7={name:"ListComposers",components:{ModalDialogComposer:Im},props:["composers","media_kind","hide_group_title"],data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(e){this.selected_composer=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_composer=e,this.show_details_modal=!0}}},z7={key:0,class:"mt-6 mb-5 py-2"},C7={class:"media-content is-clipped"},w7=["id","textContent"],k7=["onClick"],x7={class:"media-content is-clickable is-clipped"},E7=["textContent"],S7={class:"media-right"},$7=["onClick"];function A7(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-composer");return k(),$(we,null,[(k(!0),$(we,null,ut(n.composers,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",z7,[u("div",C7,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,w7)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_composer(l.item)},[u("div",x7,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,E7)]),u("div",S7,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,$7)])],8,k7)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,composer:s.selected_composer,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const B1=te(b7,[["render",A7]]),wi={load(e){return M.library_composers("music")},set(e,t){e.composers=new ge(t.data),e.composers.group(Rn("name_sort"))}},T7={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListComposers:B1,TabsMusic:mr},beforeRouteEnter(e,t,n){wi.load(e).then(r=>{n(s=>wi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.composers.isEmpty()){n();return}const r=this;wi.load(e).then(s=>{wi.set(r,s),n()})},data(){return{composers:new ge}}},O7={class:"fd-page-with-tabs"},D7=["textContent"],P7=["textContent"];function I7(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-composers"),c=E("content-with-heading");return k(),$("div",O7,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.composers.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,D7),u("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:s.composers.total}))},null,8,P7)]),content:x(()=>[y(l,{composers:s.composers},null,8,["composers"])]),_:1})])}const F7=te(T7,[["render",I7]]),R7={name:"ModalDialogDirectory",props:["show","directory"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression(`path starts with "${this.directory}" order by path asc`,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(`path starts with "${this.directory}" order by path asc`)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(`path starts with "${this.directory}" order by path asc`)}}},L7={key:0,class:"modal is-active"},N7={class:"modal-content fd-modal-card"},M7={class:"card"},V7={class:"card-content"},H7=["textContent"],B7={class:"card-footer"},U7=["textContent"],j7=["textContent"],q7=["textContent"];function W7(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",L7,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",N7,[u("div",M7,[u("div",V7,[u("p",{class:"title is-4",textContent:g(n.directory)},null,8,H7)]),u("footer",B7,[u("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,U7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,j7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,q7)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const U1=te(R7,[["render",W7]]),K7={name:"ListDirectories",components:{ModalDialogDirectory:U1},props:["directories"],data(){return{show_details_modal:!1,selected_directory:""}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory(){this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_directory=e.path,this.show_details_modal=!0}}},G7={class:"media-left is-clickable"},Z7=u("div",{class:"media-content is-clickable is-clipped"},[u("h1",{class:"title is-6"},"..")],-1),Y7={class:"media-right"},J7=["onClick"],X7={class:"media-left is-clickable"},Q7={class:"media-content is-clickable is-clipped"},e9=["textContent"],t9=["textContent"],n9={class:"media-right"},r9=["onClick"];function s9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-directory");return k(),$(we,null,[e.$route.query.directory?(k(),$("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>o.open_parent_directory())},[u("figure",G7,[y(a,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),Z7,u("div",Y7,[ot(e.$slots,"actions")])])):H("",!0),(k(!0),$(we,null,ut(n.directories,l=>(k(),$("div",{key:l.path,class:"media is-align-items-center",onClick:c=>o.open_directory(l)},[u("figure",X7,[y(a,{class:"icon",name:"folder",size:"16"})]),u("div",Q7,[u("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,e9),u("h2",{class:"subtitle is-7 has-text-grey-light",textContent:g(l.path)},null,8,t9)]),u("div",n9,[u("a",{onClick:nt(c=>o.open_dialog(l),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,r9)])],8,J7))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,directory:s.selected_directory,onClose:t[1]||(t[1]=l=>s.show_details_modal=!1)},null,8,["show","directory"])]))],64)}const o9=te(K7,[["render",s9]]),a9={name:"ModalDialogPlaylist",props:["show","playlist","uris"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},i9={key:0,class:"modal is-active"},l9={class:"modal-content fd-modal-card"},u9={class:"card"},c9={class:"card-content"},d9={class:"title is-4"},m9=["textContent"],f9={class:"content is-small"},p9=["textContent"],h9=["textContent"],_9=["textContent"],g9=["textContent"],y9={key:0},v9=["textContent"],b9=["textContent"],z9={key:0,class:"card-footer"},C9=["textContent"],w9=["textContent"],k9=["textContent"];function x9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",i9,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",l9,[u("div",u9,[u("div",c9,[u("p",d9,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,m9)]),u("div",f9,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,p9),u("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,h9)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,_9),u("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,g9)]),n.playlist.folder?H("",!0):(k(),$("p",y9,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,v9),u("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,b9)]))])]),n.playlist.folder?H("",!0):(k(),$("footer",z9,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,C9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,w9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,k9)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const j1=te(a9,[["render",x9]]),E9={name:"ListPlaylists",components:{ModalDialogPlaylist:j1},props:["playlists"],data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_playlist=e,this.show_details_modal=!0},icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"}}},S9=["onClick"],$9={class:"media-left is-clickable"},A9={class:"media-content is-clickable is-clipped"},T9=["textContent"],O9={class:"media-right"},D9=["onClick"];function P9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-playlist");return k(),$(we,null,[(k(!0),$(we,null,ut(n.playlists,l=>(k(),$("div",{key:l.itemId,class:"media is-align-items-center",onClick:c=>o.open_playlist(l.item)},[u("figure",$9,[y(a,{class:"icon",name:o.icon_name(l.item),size:"16"},null,8,["name"])]),u("div",A9,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,T9)]),u("div",O9,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,D9)])],8,S9))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","playlist"])]))],64)}const Fm=te(E9,[["render",P9]]),ki={load(e){return e.query.directory?M.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new ge(t.data.playlists),e.tracks=new ge(t.data.tracks)):(e.dirs=e.$store.state.config.directories.map(n=>({path:n})),e.playlists=new ge,e.tracks=new ge)}},I9={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:o9,ListPlaylists:Fm,ListTracks:Cn,ModalDialogDirectory:U1},beforeRouteEnter(e,t,n){ki.load(e).then(r=>{n(s=>ki.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ki.load(e).then(s=>{ki.set(r,s),n()})},data(){return{dirs:[],playlists:new ge,tracks:new ge,show_details_modal:!1}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return`path starts with "${this.current_directory}" order by path asc`}},methods:{play(){M.player_play_expression(this.play_expression,!1)}}},F9=["textContent"],R9=["textContent"],L9={class:"buttons is-centered"},N9=["textContent"];function M9(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-directories"),l=E("list-playlists"),c=E("list-tracks"),m=E("modal-dialog-directory"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,F9),u("p",{class:"title is-7 has-text-grey",textContent:g(o.current_directory)},null,8,R9)]),"heading-right":x(()=>[u("div",L9,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.files.play"))},null,8,N9)])])]),content:x(()=>[y(i,{directories:s.dirs},null,8,["directories"]),y(l,{playlists:s.playlists},null,8,["playlists"]),y(c,{tracks:s.tracks,expression:o.play_expression,show_icon:!0},null,8,["tracks","expression"]),y(m,{show:s.show_details_modal,directory:o.current_directory,onClose:t[2]||(t[2]=f=>s.show_details_modal=!1)},null,8,["show","directory"])]),_:1})])}const V9=te(I9,[["render",M9]]),xi={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.albums_list=new ge(t[1].data.albums),e.albums_list.group(Rn("name_sort",!0))}},H9={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:dr,ModalDialogGenre:Pm},beforeRouteEnter(e,t,n){xi.load(e).then(r=>{n(s=>xi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;xi.load(e).then(s=>{xi.set(r,s),n()})},data(){return{genre:{},albums_list:new ge,media_kind:this.$route.query.media_kind,show_genre_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},B9=["textContent"],U9={class:"buttons is-centered"},j9=["textContent"],q9={class:"heading has-text-centered-mobile"},W9=["textContent"],K9=u("span",null," | ",-1),G9=["textContent"];function Z9(e,t,n,r,s,o){const a=E("index-button-list"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-genre"),m=E("content-with-heading");return k(),$("div",null,[y(m,null,{options:x(()=>[y(a,{index:s.albums_list.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,B9)]),"heading-right":x(()=>[u("div",U9,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>s.show_genre_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,j9)])])]),content:x(()=>[u("p",q9,[u("span",{textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,W9),K9,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,G9)]),y(l,{albums:s.albums_list},null,8,["albums"]),y(c,{genre:s.genre,media_kind:s.media_kind,show:s.show_genre_details_modal,onClose:t[3]||(t[3]=d=>s.show_genre_details_modal=!1)},null,8,["genre","media_kind","show"])]),_:1})])}const Y9=te(H9,[["render",Z9]]),Ei={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},J9={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListTracks:Cn,ModalDialogGenre:Pm},beforeRouteEnter(e,t,n){Ei.load(e).then(r=>{n(s=>Ei.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.tracks_list.isEmpty()){n();return}const r=this;Ei.load(e).then(s=>{Ei.set(r,s),n()})},data(){return{genre:{},groupby_options:[{id:1,name:this.$t("page.genre.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.genre.sort-by.rating"),options:Sm("rating",{direction:"desc"})}],media_kind:this.$route.query.media_kind,show_genre_details_modal:!1,tracks_list:new ge}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_groupby_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(Xh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(this.expression,!0)}}},X9={class:"columns"},Q9={class:"column"},eV=["textContent"],tV=["textContent"],nV={class:"buttons is-centered"},rV=["textContent"],sV={class:"heading has-text-centered-mobile"},oV=["textContent"],aV=u("span",null," | ",-1),iV=["textContent"];function lV(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-genre"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",X9,[u("div",Q9,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort-by.title"))},null,8,eV),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,tV)]),"heading-right":x(()=>[u("div",nV,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_genre_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,rV)])])]),content:x(()=>[u("p",sV,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_genre&&o.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,oV),aV,u("span",{textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,iV)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_genre_details_modal,genre:s.genre,media_kind:s.media_kind,onClose:t[4]||(t[4]=f=>s.show_genre_details_modal=!1)},null,8,["show","genre","media_kind"])]),_:1})])}const uV=te(J9,[["render",lV]]),Si={load(e){return M.library_genres("music")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},cV={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:H1,TabsMusic:mr},beforeRouteEnter(e,t,n){Si.load(e).then(r=>{n(s=>Si.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Si.load(e).then(s=>{Si.set(r,s),n()})},data(){return{genres:new ge}}},dV={class:"fd-page-with-tabs"},mV=["textContent"],fV=["textContent"];function pV(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",dV,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,mV),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,fV)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const hV=te(cV,[["render",pV]]),$i={load(e){return Promise.all([M.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3}),M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set(e,t){e.recently_added=new ge(t[0].data.albums),e.recently_played=new ge(t[1].data.tracks)}},_V={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:dr,ListTracks:Cn,TabsMusic:mr},beforeRouteEnter(e,t,n){$i.load(e).then(r=>{n(s=>$i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;$i.load(e).then(s=>{$i.set(r,s),n()})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{},show_track_details_modal:!1}}},gV={class:"fd-page-with-tabs"},yV=["textContent"],vV={class:"level"},bV={class:"level-item"},zV=["textContent"],CV={class:"level"},wV={class:"level-item"};function kV(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("router-link"),c=E("content-with-heading"),m=E("list-tracks");return k(),$("div",gV,[y(a),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,yV)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),footer:x(()=>[u("nav",vV,[u("p",bV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:x(()=>[rt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,zV)]),content:x(()=>[y(m,{tracks:s.recently_played},null,8,["tracks"])]),footer:x(()=>[u("nav",CV,[u("p",wV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:x(()=>[rt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const xV=te(_V,[["render",kV]]),EV={name:"ListItemPlaylistSpotify",props:["playlist"],methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},SV={class:"media is-align-items-center"},$V=["textContent"],AV=["textContent"],TV={class:"media-right"};function OV(e,t,n,r,s,o){return k(),$("div",SV,[u("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>o.open_playlist&&o.open_playlist(...a))},[u("h1",{class:"title is-6",textContent:g(n.playlist.name)},null,8,$V),u("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,AV)]),u("div",TV,[ot(e.$slots,"actions")])])}const Rm=te(EV,[["render",OV]]),DV={name:"ModalDialogPlaylistSpotify",props:["show","playlist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},PV={key:0,class:"modal is-active"},IV={class:"modal-content fd-modal-card"},FV={class:"card"},RV={class:"card-content"},LV={class:"title is-4"},NV=["textContent"],MV={class:"content is-small"},VV=["textContent"],HV=["textContent"],BV=["textContent"],UV=["textContent"],jV=["textContent"],qV=["textContent"],WV={class:"card-footer"},KV=["textContent"],GV=["textContent"],ZV=["textContent"];function YV(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",PV,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",IV,[u("div",FV,[u("div",RV,[u("p",LV,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,NV)]),u("div",MV,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,VV),u("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,HV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,BV),u("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,UV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,jV),u("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,qV)])])]),u("footer",WV,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,KV)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,GV)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,ZV)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const hu=te(DV,[["render",YV]]),Ai={load(e){if(Ue.state.spotify_new_releases.length>0&&Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50}),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})])},set(e,t){t&&(Ue.commit(pd,t[0].albums.items),Ue.commit(hd,t[1].playlists.items))}},JV={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ListItemPlaylistSpotify:Rm,ModalDialogAlbumSpotify:Ma,ModalDialogPlaylistSpotify:hu,TabsMusic:mr},beforeRouteEnter(e,t,n){Ai.load(e).then(r=>{n(s=>Ai.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ai.load(e).then(s=>{Ai.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},XV={class:"fd-page-with-tabs"},QV=["textContent"],eH=["onClick"],tH={class:"level"},nH={class:"level-item"},rH=["textContent"],sH=["onClick"],oH={class:"level"},aH={class:"level-item"};function iH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("router-link"),f=E("content-with-heading"),p=E("list-item-playlist-spotify"),h=E("modal-dialog-playlist-spotify");return k(),$("div",XV,[y(a),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,QV)]),content:x(()=>[(k(!0),$(we,null,ut(o.new_releases,_=>(k(),he(c,{key:_.id,album:_,onClick:b=>o.open_album(_)},Oa({actions:x(()=>[u("a",{onClick:nt(b=>o.open_album_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,eH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(_),artist:_.artist,album:_.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=_=>s.show_album_details_modal=!1)},null,8,["show","album"])]),footer:x(()=>[u("nav",tH,[u("p",nH,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:x(()=>[rt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,rH)]),content:x(()=>[(k(!0),$(we,null,ut(o.featured_playlists,_=>(k(),he(p,{key:_.id,playlist:_},{actions:x(()=>[u("a",{onClick:nt(b=>o.open_playlist_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,sH)]),_:2},1032,["playlist"]))),128)),y(h,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[1]||(t[1]=_=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),footer:x(()=>[u("nav",oH,[u("p",aH,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:x(()=>[rt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const lH=te(JV,[["render",iH]]),Ti={load(e){if(Ue.state.spotify_new_releases.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(pd,t.albums.items)}},uH={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,TabsMusic:mr},beforeRouteEnter(e,t,n){Ti.load(e).then(r=>{n(s=>Ti.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ti.load(e).then(s=>{Ti.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},cH={class:"fd-page-with-tabs"},dH=["textContent"],mH=["onClick"];function fH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-heading");return k(),$("div",cH,[y(a),y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,dH)]),content:x(()=>[(k(!0),$(we,null,ut(o.new_releases,f=>(k(),he(c,{key:f.id,album:f,onClick:p=>o.open_album(f)},Oa({actions:x(()=>[u("a",{onClick:nt(p=>o.open_album_dialog(f),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,mH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(f),artist:f.artist,album:f.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=f=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const pH=te(uH,[["render",fH]]),Oi={load(e){if(Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;t.setAccessToken(Ue.state.spotify.webapi_token),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(hd,t.playlists.items)}},hH={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:Rm,ModalDialogPlaylistSpotify:hu,TabsMusic:mr},beforeRouteEnter(e,t,n){Oi.load(e).then(r=>{n(s=>Oi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Oi.load(e).then(s=>{Oi.set(r,s),n()})},data(){return{show_playlist_details_modal:!1,selected_playlist:{}}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0}}},_H={class:"fd-page-with-tabs"},gH=["textContent"],yH=["onClick"];function vH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("mdicon"),l=E("list-item-playlist-spotify"),c=E("modal-dialog-playlist-spotify"),m=E("content-with-heading");return k(),$("div",_H,[y(a),y(m,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,gH)]),content:x(()=>[(k(!0),$(we,null,ut(o.featured_playlists,d=>(k(),he(l,{key:d.id,playlist:d},{actions:x(()=>[u("a",{onClick:nt(f=>o.open_playlist_dialog(d),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,yH)]),_:2},1032,["playlist"]))),128)),y(c,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=d=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const bH=te(hH,[["render",vH]]),Di={load(e){const t=Ue.getters.settings_option_recently_added_limit;return M.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new ge(t.data.albums),e.recently_added.group(c5("time_added",{direction:"desc"}))}},zH={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,TabsMusic:mr,ListAlbums:dr},beforeRouteEnter(e,t,n){Di.load(e).then(r=>{n(s=>Di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.recently_added.isEmpty()){n();return}const r=this;Di.load(e).then(s=>{Di.set(r,s),n()})},data(){return{recently_added:new ge}}},CH={class:"fd-page-with-tabs"},wH=["textContent"];function kH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("content-with-heading");return k(),$("div",CH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,wH)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),_:1})])}const xH=te(zH,[["render",kH]]),Pi={load(e){return M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(e,t){e.recently_played=new ge(t.data.tracks)}},EH={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,TabsMusic:mr,ListTracks:Cn},beforeRouteEnter(e,t,n){Pi.load(e).then(r=>{n(s=>Pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Pi.load(e).then(s=>{Pi.set(r,s),n()})},data(){return{recently_played:{}}}},SH={class:"fd-page-with-tabs"},$H=["textContent"];function AH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-tracks"),l=E("content-with-heading");return k(),$("div",SH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,$H)]),content:x(()=>[y(i,{tracks:s.recently_played},null,8,["tracks"])]),_:1})])}const TH=te(EH,[["render",AH]]),OH={name:"LyricsPane",data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.player.state==="play"},verse_index(){if(this.lyrics.length&&this.lyrics[0].time){const e=this.player.item_progress_ms/1e3,t=this.lyrics,n=this.player.item_id!==this.lastItemId,r=this.lastIndex>=0&&this.lastIndexe;if((n||r)&&this.reset_scrolling(),this.lastIndexe||this.lastIndex===t.length-1)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let s=0,o=t.length-1,a;for(;s<=o;){a=s+o>>1;const i=t[a],l=t[a+1];if(i.time<=e&&((l==null?void 0:l.time)>e||!l))return a;i.time{const o=n.exec(r);if(o&&o[4]){const a={text:o[4],time:o[2]*60+o[3]*1};t.push(a)}}),t.forEach((r,s,o)=>{const i=(s{const m=c.length*i;return l+=m,{duration:m,delay:l,text:c}})})}return t},player(){return this.$store.state.player}},watch:{verse_index(){this.autoScrolling&&this.scroll_to_verse(),this.lastIndex=this.verse_index}},methods:{reset_scrolling(){this.player.item_id!=this.lastItemId&&this.$refs.lyrics&&this.$refs.lyrics.scrollTo(0,0),this.lastItemId=this.player.item_id,this.lastIndex=-1},start_scrolling(e){(e.screenX||e.screenX!=0||e.screenY||e.screenY!=0)&&(this.autoScrolling=!1,this.scrollingTimer&&clearTimeout(this.scrollingTimer),this.scrollingTimer=setTimeout(this.autoScrolling=!0,2e3))},scroll_to_verse(){const e=this.$refs.lyrics;if(this.verse_index===-1){e.scrollTo(0,0);return}const t=e.children[this.verse_index];e.scrollBy({top:t.offsetTop-(e.offsetHeight>>1)+(t.offsetHeight>>1)-e.scrollTop,left:0,behavior:"smooth"})}}},DH=["textContent"],PH={key:1};function IH(e,t,n,r,s,o){return k(),$("div",{ref:"lyrics",class:"lyrics",onTouchstart:t[0]||(t[0]=a=>s.autoScrolling=!1),onTouchend:t[1]||(t[1]=a=>s.autoScrolling=!0),onScrollPassive:t[2]||(t[2]=(...a)=>o.start_scrolling&&o.start_scrolling(...a)),onWheelPassive:t[3]||(t[3]=(...a)=>o.start_scrolling&&o.start_scrolling(...a))},[(k(!0),$(we,null,ut(o.lyrics,(a,i)=>(k(),$(we,{key:i},[i===o.verse_index?(k(),$("div",{key:0,class:Ee({"is-highlighted":o.is_playing})},[(k(!0),$(we,null,ut(a.words,l=>(k(),$("span",{key:l,class:"has-text-weight-bold is-size-5"},[u("span",{style:ur({"animation-duration":`${l.delay}s`}),textContent:g(l.text)},null,12,DH)]))),128))],2)):(k(),$("div",PH,g(a.text),1))],64))),128))],544)}const FH=te(OH,[["render",IH],["__scopeId","data-v-4fcdc21f"]]),RH={name:"ModalDialogQueueItem",props:["show","item"],emits:["close"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{remove(){this.$emit("close"),M.queue_remove(this.item.id)},play(){this.$emit("close"),M.player_play({item_id:this.item.id})},open_album(){this.item.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.album_id}}):this.item.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.album_id}}):this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})}}},LH={key:0,class:"modal is-active"},NH={class:"modal-content fd-modal-card"},MH={class:"card"},VH={class:"card-content"},HH=["textContent"],BH=["textContent"],UH={class:"content is-small"},jH=["textContent"],qH=["textContent"],WH=["textContent"],KH={key:0},GH=["textContent"],ZH=["textContent"],YH=["textContent"],JH={key:1},XH=["textContent"],QH=["textContent"],eB={key:2},tB=["textContent"],nB=["textContent"],rB={key:3},sB=["textContent"],oB=["textContent"],aB=["textContent"],iB=["textContent"],lB=["textContent"],uB=["textContent"],cB=["textContent"],dB=["textContent"],mB=["textContent"],fB={class:"title is-6"},pB=["textContent"],hB={key:0,class:"has-text-weight-normal"},_B=["textContent"],gB=["textContent"],yB=["textContent"],vB={class:"title is-6"},bB=["textContent"],zB=["textContent"],CB=["textContent"],wB=["textContent"],kB={class:"card-footer"},xB=["textContent"],EB=["textContent"];function SB(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",LH,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",NH,[u("div",MH,[u("div",VH,[u("p",{class:"title is-4",textContent:g(n.item.title)},null,8,HH),u("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,BH),u("div",UH,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,jH),n.item.album_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.item.album)},null,8,qH)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album)},null,8,WH))]),n.item.album_artist?(k(),$("p",KH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,GH),n.item.album_artist_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_album_artist&&o.open_album_artist(...i)),textContent:g(n.item.album_artist)},null,8,ZH)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album_artist)},null,8,YH))])):H("",!0),n.item.composer?(k(),$("p",JH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,XH),u("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,QH)])):H("",!0),n.item.year>0?(k(),$("p",eB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,tB),u("span",{class:"title is-6",textContent:g(n.item.year)},null,8,nB)])):H("",!0),n.item.genre?(k(),$("p",rB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,sB),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.item.genre)},null,8,oB)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,aB),u("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,iB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,lB),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,uB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,cB),u("span",{class:"title is-6",textContent:g(n.item.path)},null,8,dB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,mB),u("span",fB,[u("span",{textContent:g([e.$t("media.kind."+n.item.media_kind),e.$t("data.kind."+n.item.data_kind)].join(" - "))},null,8,pB),n.item.data_kind==="spotify"?(k(),$("span",hB,[rt(" ("),u("a",{onClick:t[4]||(t[4]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.queue-item.spotify-artist"))},null,8,_B),rt(", "),u("a",{onClick:t[5]||(t[5]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.queue-item.spotify-album"))},null,8,gB),rt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,yB),u("span",vB,[u("span",{textContent:g(n.item.type)},null,8,bB),n.item.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,zB)):H("",!0),n.item.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,CB)):H("",!0),n.item.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,wB)):H("",!0)])])])]),u("footer",kB,[u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.remove&&o.remove(...i))},[y(a,{class:"icon",name:"delete",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.remove"))},null,8,xB)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.play"))},null,8,EB)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const q1=te(RH,[["render",SB]]),Ir=1e3,$B={name:"PageNowPlaying",components:{ControlSlider:Yd,CoverArtwork:Fn,LyricsPane:FH,ModalDialogQueueItem:q1},data(){return{cursor:Zl,INTERVAL:Ir,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{is_live(){return this.track.length_ms===0},lyrics_visible(){return this.$store.getters.lyrics_pane},player(){return this.$store.state.player},track(){return this.$store.getters.now_playing},track_progress:{get(){return Math.floor(this.player.item_progress_ms/Ir)},set(e){this.player.item_progress_ms=e*Ir}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Ir)},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Ir)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.track.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)?this.track.composer:null},settings_option_show_filepath_now_playing(){return this.$store.getters.settings_option_show_filepath_now_playing},filepath(){return this.settings_option_show_filepath_now_playing?this.track.path:null}},watch:{player(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Ir))}},created(){M.player_status().then(({data:e})=>{this.$store.commit(fd,e),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Ir))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{tick(){this.is_dragged||(this.track_progress+=1)},start_dragging(){this.is_dragged=!0},end_dragging(){this.is_dragged=!1},seek(){this.is_live||M.player_seek_to_pos(this.track_progress*Ir)},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},AB={class:"hero is-full-height"},TB={key:0,class:"hero-body is-flex is-align-items-center"},OB={class:"container has-text-centered",style:{"max-width":"500px"}},DB={class:"is-flex is-justify-content-space-between"},PB=["textContent"],IB=["textContent"],FB=["textContent"],RB=["textContent"],LB=["textContent"],NB=["textContent"],MB=["textContent"],VB={key:1,class:"hero-body is-flex is-align-items-center"},HB={class:"container has-text-centered"},BB=["textContent"],UB=["textContent"];function jB(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("lyrics-pane"),l=E("control-slider"),c=E("modal-dialog-queue-item");return k(),$("div",AB,[o.track.id>0?(k(),$("div",TB,[u("div",OB,[y(a,{artwork_url:o.track.artwork_url,artist:o.track.artist,album:o.track.album,class:Ee(["is-clickable fd-has-shadow fd-cover-big-image",{"is-masked":o.lyrics_visible}]),onClick:t[0]||(t[0]=m=>o.open_dialog(o.track))},null,8,["artwork_url","artist","album","class"]),o.lyrics_visible?(k(),he(i,{key:0})):H("",!0),y(l,{value:o.track_progress,"onUpdate:value":t[1]||(t[1]=m=>o.track_progress=m),class:"mt-5",disabled:o.is_live,max:o.track_progress_max,cursor:s.cursor,onChange:o.seek,onMousedown:o.start_dragging,onMouseup:o.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),u("div",DB,[u("p",{class:"subtitle is-7",textContent:g(o.track_elapsed_time)},null,8,PB),u("p",{class:"subtitle is-7",textContent:g(o.track_total_time)},null,8,IB)]),u("p",{class:"title is-5",textContent:g(o.track.title)},null,8,FB),u("p",{class:"title is-6",textContent:g(o.track.artist)},null,8,RB),o.composer?(k(),$("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(o.composer)},null,8,LB)):H("",!0),o.track.album?(k(),$("p",{key:2,class:"subtitle is-6",textContent:g(o.track.album)},null,8,NB)):H("",!0),o.filepath?(k(),$("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(o.filepath)},null,8,MB)):H("",!0)])])):(k(),$("div",VB,[u("div",HB,[u("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,BB),u("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,UB)])])),y(c,{show:s.show_details_modal,item:s.selected_item,onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","item"])])}const qB=te($B,[["render",jB]]),Ii={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new ge(t[1].data)}},WB={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:Fm},beforeRouteEnter(e,t,n){Ii.load(e).then(r=>{n(s=>Ii.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ii.load(e).then(s=>{Ii.set(r,s),n()})},data(){return{playlist:{},playlists_list:new ge}},computed:{has_playlists(){return Object.keys(this.playlists_list.itemsByGroup).length>0},playlists(){return this.playlists_list.group(N1(),[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]),this.playlists_list},radio_playlists(){return this.$store.state.config.radio_playlists}}},KB=["textContent"],GB=["textContent"];function ZB(e,t,n,r,s,o){const a=E("list-playlists"),i=E("content-with-heading");return k(),$("div",null,[y(i,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.playlist.id===0?e.$t("page.playlists.title"):s.playlist.name)},null,8,KB),u("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:o.playlists.count}))},null,8,GB)]),content:x(()=>[o.has_playlists?(k(),he(a,{key:0,playlists:o.playlists},null,8,["playlists"])):H("",!0)]),_:1})])}const YB=te(WB,[["render",ZB]]),Fi={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new ge(t[1].data)}},JB={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:Cn,ModalDialogPlaylist:j1},beforeRouteEnter(e,t,n){Fi.load(e).then(r=>{n(s=>Fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Fi.load(e).then(s=>{Fi.set(r,s),n()})},data(){return{playlist:{},tracks:new ge,show_playlist_details_modal:!1}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join(","):this.playlist.uri}},methods:{play(){M.player_play_uri(this.uris,!0)}}},XB=["textContent"],QB={class:"buttons is-centered"},eU=["textContent"],tU=["textContent"];function nU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("modal-dialog-playlist"),c=E("content-with-heading");return k(),$("div",null,[y(c,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,XB)]),"heading-right":x(()=>[u("div",QB,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.playlist.shuffle"))},null,8,eU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:s.tracks.count}))},null,8,tU),y(i,{tracks:s.tracks,uris:o.uris},null,8,["tracks","uris"]),y(l,{show:s.show_playlist_details_modal,playlist:s.playlist,uris:o.uris,onClose:t[2]||(t[2]=m=>s.show_playlist_details_modal=!1)},null,8,["show","playlist","uris"])]),_:1})])}const rU=te(JB,[["render",nU]]),id=50,Ri={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:id,offset:0,market:Ue.state.spotify.webapi_country})])},set(e,t){e.playlist=t[0],e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t[1])}},sU={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListItemTrackSpotify:$m,ModalDialogPlaylistSpotify:hu,ModalDialogTrackSpotify:Am,VueEternalLoading:Tm},beforeRouteEnter(e,t,n){Ri.load(e).then(r=>{n(s=>Ri.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ri.load(e).then(s=>{Ri.set(r,s),n()})},data(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:id,offset:this.offset,market:Ue.state.spotify.webapi_country}).then(n=>{this.append_tracks(n),e(n.items.length,id)})},append_tracks(e){let t=Math.max(-1,...this.tracks.map(n=>n.position).filter(n=>n));e.items.forEach(n=>{const{track:r}=n;r&&(r.is_playable&&(r.position=++t),this.tracks.push(r))}),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.playlist.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},oU=["textContent"],aU={class:"buttons is-centered"},iU=["textContent"],lU=["textContent"],uU=["onClick"];function cU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-item-track-spotify"),l=E("VueEternalLoading"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-playlist-spotify"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,oU)]),"heading-right":x(()=>[u("div",aU,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.playlist.shuffle"))},null,8,iU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.playlist.count",{count:s.playlist.tracks.total}))},null,8,lU),(k(!0),$(we,null,ut(s.tracks,f=>(k(),he(i,{key:f.id,track:f,position:f.position,context_uri:s.playlist.uri},{actions:x(()=>[u("a",{onClick:nt(p=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,uU)]),_:2},1032,["track","position","context_uri"]))),128)),s.offset[rt(" . ")]),_:1},8,["load"])):H("",!0),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.selected_track.album,onClose:t[2]||(t[2]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_playlist_details_modal,playlist:s.playlist,onClose:t[3]||(t[3]=f=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const dU=te(sU,[["render",cU]]),Li={load(e){return Promise.all([M.library_album(e.params.id),M.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data.tracks)}},mU={name:"PagePodcast",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialog:mm,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){Li.load(e).then(r=>{n(s=>Li.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Li.load(e).then(s=>{Li.set(r,s),n()})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new ge}},computed:{new_tracks(){return this.tracks.items.filter(e=>e.play_count===0).length}},methods:{open_remove_podcast_dialog(){M.library_track_playlists(this.tracks.items[0].id).then(({data:e})=>{[this.rss_playlist_to_remove]=e.items.filter(t=>t.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})},play(){M.player_play_uri(this.album.uri,!1)},reload_tracks(){M.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new ge(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},fU=["textContent"],pU=u("h2",{class:"subtitle is-6 has-text-weight-normal"}," ",-1),hU={class:"buttons fd-is-centered-mobile mt-5"},_U=["textContent"],gU=["textContent"],yU=["textContent"],vU={class:"is-size-7"},bU=["textContent"],zU=["textContent"];function CU(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("modal-dialog"),d=E("content-with-hero");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,fU),pU,u("div",hU,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.podcast.play"))},null,8,_U)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.podcast.track-count",{count:s.album.track_count}))},null,8,gU),y(l,{tracks:s.tracks,show_progress:!0,onPlayCountChanged:o.reload_tracks},null,8,["tracks","onPlayCountChanged"]),y(c,{show:s.show_details_modal,album:s.album,media_kind:"podcast",new_tracks:o.new_tracks,onClose:t[3]||(t[3]=f=>s.show_details_modal=!1),onPlayCountChanged:o.reload_tracks,onRemovePodcast:o.open_remove_podcast_dialog},null,8,["show","album","new_tracks","onPlayCountChanged","onRemovePodcast"]),y(m,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("page.podcast.remove-info-1"))},null,8,yU),u("p",vU,[rt(" ("),u("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,bU),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,zU),rt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const wU=te(mU,[["render",CU]]),kU={name:"ModalDialogAddRss",props:["show"],emits:["close","podcast-added"],data(){return{url:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,M.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})}}},xU={key:0,class:"modal is-active"},EU={class:"modal-content fd-modal-card"},SU={class:"card-content"},$U=["textContent"],AU={class:"field"},TU={class:"control is-expanded has-icons-left"},OU=["placeholder","disabled"],DU=["textContent"],PU={key:0,class:"card-footer"},IU={class:"card-footer-item has-text-dark"},FU=["textContent"],RU={key:1,class:"card-footer is-clipped"},LU=["textContent"],NU=["textContent"];function MU(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",xU,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",EU,[u("form",{class:"card",onSubmit:t[4]||(t[4]=nt((...i)=>o.add_stream&&o.add_stream(...i),["prevent"]))},[u("div",SU,[u("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,$U),u("div",AU,[u("p",TU,[bt(u("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=i=>s.url=i),class:"input is-shadowless",type:"url",pattern:"http[s]?://.*",required:"",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:s.loading},null,8,OU),[[fn,s.url]]),y(a,{class:"icon is-left",name:"rss",size:"16"})]),u("p",{class:"help",textContent:g(e.$t("dialog.add.rss.help"))},null,8,DU)])]),s.loading?(k(),$("footer",PU,[u("a",IU,[y(a,{class:"icon",name:"web",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,FU)])])):(k(),$("footer",RU,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=i=>e.$emit("close"))},[y(a,{class:"icon",name:"cancel",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.cancel"))},null,8,LU)]),u("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[3]||(t[3]=(...i)=>o.add_stream&&o.add_stream(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.add"))},null,8,NU)])]))],32)]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const VU=te(kU,[["render",MU]]),Ni={load(e){return Promise.all([M.library_albums("podcast"),M.library_podcasts_new_episodes()])},set(e,t){e.albums=new ge(t[0].data),e.new_episodes=new ge(t[1].data.tracks)}},HU={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListTracks:Cn,ListAlbums:dr,ModalDialogAddRss:VU},beforeRouteEnter(e,t,n){Ni.load(e).then(r=>{n(s=>Ni.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ni.load(e).then(s=>{Ni.set(r,s),n()})},data(){return{albums:[],new_episodes:{items:[]},show_url_modal:!1}},computed:{rss(){return this.$store.state.rss_count}},methods:{mark_all_played(){this.new_episodes.items.forEach(e=>{M.library_track_update(e.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog(e){this.show_url_modal=!0},reload_new_episodes(){M.library_podcasts_new_episodes().then(({data:e})=>{this.new_episodes=new ge(e.tracks)})},reload_podcasts(){M.library_albums("podcast").then(({data:e})=>{this.albums=new ge(e),this.reload_new_episodes()})},update_rss(){this.$store.commit(yd,"rss"),this.$store.commit(ka,!0)}}},BU=["textContent"],UU={class:"buttons is-centered"},jU=["textContent"],qU=["textContent"],WU=["textContent"],KU={class:"buttons is-centered"},GU=["textContent"],ZU=["textContent"];function YU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("content-with-heading"),c=E("list-albums"),m=E("modal-dialog-add-rss");return k(),$("div",null,[s.new_episodes.items.length>0?(k(),he(l,{key:0},{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.new-episodes"))},null,8,BU)]),"heading-right":x(()=>[u("div",UU,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>o.mark_all_played&&o.mark_all_played(...d))},[y(a,{class:"icon",name:"pencil",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.mark-all-played"))},null,8,jU)])])]),content:x(()=>[y(i,{tracks:s.new_episodes,show_progress:!0,onPlayCountChanged:o.reload_new_episodes},null,8,["tracks","onPlayCountChanged"])]),_:1})):H("",!0),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.title"))},null,8,qU),u("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:s.albums.total}))},null,8,WU)]),"heading-right":x(()=>[u("div",KU,[o.rss.tracks>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>o.update_rss&&o.update_rss(...d))},[y(a,{class:"icon",name:"refresh",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.update"))},null,8,GU)])):H("",!0),u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>o.open_add_podcast_dialog&&o.open_add_podcast_dialog(...d))},[y(a,{class:"icon",name:"rss",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.add"))},null,8,ZU)])])]),content:x(()=>[y(c,{albums:s.albums,onPlayCountChanged:t[3]||(t[3]=d=>o.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>o.reload_podcasts())},null,8,["albums"]),y(m,{show:s.show_url_modal,onClose:t[5]||(t[5]=d=>s.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>o.reload_podcasts())},null,8,["show"])]),_:1})])}const JU=te(HU,[["render",YU]]);var W1={exports:{}};/**! + */const Ms=typeof window<"u";function TT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const lt=Object.assign;function ju(e,t){const n={};for(const r in t){const s=t[r];n[r]=Gn(s)?s.map(e):e(s)}return n}const ta=()=>{},Gn=Array.isArray,OT=/\/$/,DT=e=>e.replace(OT,"");function qu(e,t,n="/"){let r,s={},o="",a="";const i=t.indexOf("#");let l=t.indexOf("?");return i=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,i>-1?i:t.length),s=e(o)),i>-1&&(r=r||t.slice(0,i),a=t.slice(i,t.length)),r=RT(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:s,hash:a}}function PT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Gp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function IT(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&uo(t.matched[r],n.matched[s])&&Uv(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function uo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Uv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!FT(e[n],t[n]))return!1;return!0}function FT(e,t){return Gn(e)?Zp(e,t):Gn(t)?Zp(t,e):e===t}function Zp(e,t){return Gn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function RT(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,a,i;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(a-(a===r.length?1:0)).join("/")}var Ca;(function(e){e.pop="pop",e.push="push"})(Ca||(Ca={}));var na;(function(e){e.back="back",e.forward="forward",e.unknown=""})(na||(na={}));function LT(e){if(!e)if(Ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),DT(e)}const NT=/^[^#]+#/;function MT(e,t){return e.replace(NT,"#")+t}function VT(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const cu=()=>({left:window.pageXOffset,top:window.pageYOffset});function HT(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=VT(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Yp(e,t){return(history.state?history.state.position-t:-1)+e}const Jc=new Map;function BT(e,t){Jc.set(e,t)}function UT(e){const t=Jc.get(e);return Jc.delete(e),t}let jT=()=>location.protocol+"//"+location.host;function jv(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(i);return l[0]!=="/"&&(l="/"+l),Gp(l,"")}return Gp(n,e)+r+s}function qT(e,t,n,r){let s=[],o=[],a=null;const i=({state:f})=>{const p=jv(e,location),h=n.value,_=t.value;let b=0;if(f){if(n.value=p,t.value=f,a&&a===h){a=null;return}b=_?f.position-_.position:0}else r(p);s.forEach(w=>{w(n.value,h,{delta:b,type:Ca.pop,direction:b?b>0?na.forward:na.back:na.unknown})})};function l(){a=n.value}function c(f){s.push(f);const p=()=>{const h=s.indexOf(f);h>-1&&s.splice(h,1)};return o.push(p),p}function m(){const{history:f}=window;f.state&&f.replaceState(lt({},f.state,{scroll:cu()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",m)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",m,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Jp(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?cu():null}}function WT(e){const{history:t,location:n}=window,r={value:jv(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,c,m){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:jT()+e+l;try{t[m?"replaceState":"pushState"](c,"",f),s.value=c}catch(p){console.error(p),n[m?"replace":"assign"](f)}}function a(l,c){const m=lt({},t.state,Jp(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,m,!0),r.value=l}function i(l,c){const m=lt({},s.value,t.state,{forward:l,scroll:cu()});o(m.current,m,!0);const d=lt({},Jp(r.value,l,null),{position:m.position+1},c);o(l,d,!1),r.value=l}return{location:r,state:s,push:i,replace:a}}function KT(e){e=LT(e);const t=WT(e),n=qT(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=lt({location:"",base:e,go:r,createHref:MT.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function GT(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),KT(e)}function ZT(e){return typeof e=="string"||e&&typeof e=="object"}function qv(e){return typeof e=="string"||typeof e=="symbol"}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Wv=Symbol("");var Xp;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Xp||(Xp={}));function co(e,t){return lt(new Error,{type:e,[Wv]:!0},t)}function fr(e,t){return e instanceof Error&&Wv in e&&(t==null||!!(e.type&t))}const Qp="[^/]+?",YT={sensitive:!1,strict:!1,start:!0,end:!0},JT=/[.+*?^${}()[\]/\\]/g;function XT(e,t){const n=lt({},YT,t),r=[];let s=n.start?"^":"";const o=[];for(const c of e){const m=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function eO(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const tO={type:0,value:""},nO=/[a-zA-Z0-9_]/;function rO(e){if(!e)return[[]];if(e==="/")return[[tO]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,r=n;const s=[];let o;function a(){o&&s.push(o),o=[]}let i=0,l,c="",m="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:m,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;i{a(C)}:ta}function a(m){if(qv(m)){const d=r.get(m);d&&(r.delete(m),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(m);d>-1&&(n.splice(d,1),m.record.name&&r.delete(m.record.name),m.children.forEach(a),m.alias.forEach(a))}}function i(){return n}function l(m){let d=0;for(;d=0&&(m.record.path!==n[d].record.path||!Kv(m,n[d]));)d++;n.splice(d,0,m),m.record.name&&!nh(m)&&r.set(m.record.name,m)}function c(m,d){let f,p={},h,_;if("name"in m&&m.name){if(f=r.get(m.name),!f)throw co(1,{location:m});_=f.record.name,p=lt(th(d.params,f.keys.filter(C=>!C.optional).map(C=>C.name)),m.params&&th(m.params,f.keys.map(C=>C.name))),h=f.stringify(p)}else if("path"in m)h=m.path,f=n.find(C=>C.re.test(h)),f&&(p=f.parse(h),_=f.record.name);else{if(f=d.name?r.get(d.name):n.find(C=>C.re.test(d.path)),!f)throw co(1,{location:m,currentLocation:d});_=f.record.name,p=lt({},d.params,m.params),h=f.stringify(p)}const b=[];let w=f;for(;w;)b.unshift(w.record),w=w.parent;return{name:_,path:h,params:p,matched:b,meta:lO(b)}}return e.forEach(m=>o(m)),{addRoute:o,resolve:c,removeRoute:a,getRoutes:i,getRecordMatcher:s}}function th(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function aO(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:iO(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function iO(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function nh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function lO(e){return e.reduce((t,n)=>lt(t,n.meta),{})}function rh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Kv(e,t){return t.children.some(n=>n===e||Kv(e,n))}const Gv=/#/g,uO=/&/g,cO=/\//g,dO=/=/g,mO=/\?/g,Zv=/\+/g,fO=/%5B/g,pO=/%5D/g,Yv=/%5E/g,hO=/%60/g,Jv=/%7B/g,_O=/%7C/g,Xv=/%7D/g,gO=/%20/g;function zm(e){return encodeURI(""+e).replace(_O,"|").replace(fO,"[").replace(pO,"]")}function yO(e){return zm(e).replace(Jv,"{").replace(Xv,"}").replace(Yv,"^")}function Xc(e){return zm(e).replace(Zv,"%2B").replace(gO,"+").replace(Gv,"%23").replace(uO,"%26").replace(hO,"`").replace(Jv,"{").replace(Xv,"}").replace(Yv,"^")}function vO(e){return Xc(e).replace(dO,"%3D")}function bO(e){return zm(e).replace(Gv,"%23").replace(mO,"%3F")}function zO(e){return e==null?"":bO(e).replace(cO,"%2F")}function wl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function CO(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Xc(o)):[r&&Xc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function wO(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Gn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const kO=Symbol(""),oh=Symbol(""),Cm=Symbol(""),Qv=Symbol(""),Qc=Symbol("");function Oo(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Mr(e,t,n,r,s){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,i)=>{const l=d=>{d===!1?i(co(4,{from:n,to:t})):d instanceof Error?i(d):ZT(d)?i(co(2,{from:t,to:d})):(o&&r.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},c=e.call(r&&r.instances[s],t,n,l);let m=Promise.resolve(c);e.length<3&&(m=m.then(l)),m.catch(d=>i(d))})}function Wu(e,t,n,r){const s=[];for(const o of e)for(const a in o.components){let i=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(xO(i)){const c=(i.__vccOpts||i)[t];c&&s.push(Mr(c,n,r,o,a))}else{let l=i();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const m=TT(c)?c.default:c;o.components[a]=m;const f=(m.__vccOpts||m)[t];return f&&Mr(f,n,r,o,a)()}))}}return s}function xO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ah(e){const t=qn(Cm),n=qn(Qv),r=Nt(()=>t.resolve(vn(e.to))),s=Nt(()=>{const{matched:l}=r.value,{length:c}=l,m=l[c-1],d=n.matched;if(!m||!d.length)return-1;const f=d.findIndex(uo.bind(null,m));if(f>-1)return f;const p=ih(l[c-2]);return c>1&&ih(m)===p&&d[d.length-1].path!==p?d.findIndex(uo.bind(null,l[c-2])):f}),o=Nt(()=>s.value>-1&&AO(n.params,r.value.params)),a=Nt(()=>s.value>-1&&s.value===n.matched.length-1&&Uv(n.params,r.value.params));function i(l={}){return $O(l)?t[vn(e.replace)?"replace":"push"](vn(e.to)).catch(ta):Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:o,isExactActive:a,navigate:i}}const EO=wr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ah,setup(e,{slots:t}){const n=_o(ah(e)),{options:r}=qn(Cm),s=Nt(()=>({[lh(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[lh(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:tr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),SO=EO;function $O(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function AO(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Gn(s)||s.length!==r.length||r.some((o,a)=>o!==s[a]))return!1}return!0}function ih(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const lh=(e,t,n)=>e??t??n,TO=wr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qn(Qc),s=Nt(()=>e.route||r.value),o=qn(oh,0),a=Nt(()=>{let c=vn(o);const{matched:m}=s.value;let d;for(;(d=m[c])&&!d.components;)c++;return c}),i=Nt(()=>s.value.matched[a.value]);Go(oh,Nt(()=>a.value+1)),Go(kO,i),Go(Qc,s);const l=Xt();return en(()=>[l.value,i.value,e.name],([c,m,d],[f,p,h])=>{m&&(m.instances[d]=c,p&&p!==m&&c&&c===f&&(m.leaveGuards.size||(m.leaveGuards=p.leaveGuards),m.updateGuards.size||(m.updateGuards=p.updateGuards))),c&&m&&(!p||!uo(m,p)||!f)&&(m.enterCallbacks[d]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,m=e.name,d=i.value,f=d&&d.components[m];if(!f)return uh(n.default,{Component:f,route:c});const p=d.props[m],h=p?p===!0?c.params:typeof p=="function"?p(c):p:null,b=tr(f,lt({},h,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[m]=null)},ref:l}));return uh(n.default,{Component:b,route:c})||b}}});function uh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const OO=TO;function DO(e){const t=oO(e.routes,e),n=e.parseQuery||CO,r=e.stringifyQuery||sh,s=e.history,o=Oo(),a=Oo(),i=Oo(),l=C_(Pr);let c=Pr;Ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=ju.bind(null,U=>""+U),d=ju.bind(null,zO),f=ju.bind(null,wl);function p(U,ue){let se,ve;return qv(U)?(se=t.getRecordMatcher(U),ve=ue):ve=U,t.addRoute(ve,se)}function h(U){const ue=t.getRecordMatcher(U);ue&&t.removeRoute(ue)}function _(){return t.getRoutes().map(U=>U.record)}function b(U){return!!t.getRecordMatcher(U)}function w(U,ue){if(ue=lt({},ue||l.value),typeof U=="string"){const I=qu(n,U,ue.path),G=t.resolve({path:I.path},ue),Y=s.createHref(I.fullPath);return lt(I,G,{params:f(G.params),hash:wl(I.hash),redirectedFrom:void 0,href:Y})}let se;if("path"in U)se=lt({},U,{path:qu(n,U.path,ue.path).path});else{const I=lt({},U.params);for(const G in I)I[G]==null&&delete I[G];se=lt({},U,{params:d(I)}),ue.params=d(ue.params)}const ve=t.resolve(se,ue),Be=U.hash||"";ve.params=m(f(ve.params));const T=PT(r,lt({},U,{hash:yO(Be),path:ve.path})),O=s.createHref(T);return lt({fullPath:T,hash:Be,query:r===sh?wO(U.query):U.query||{}},ve,{redirectedFrom:void 0,href:O})}function C(U){return typeof U=="string"?qu(n,U,l.value.path):lt({},U)}function z(U,ue){if(c!==U)return co(8,{from:ue,to:U})}function v(U){return D(U)}function S(U){return v(lt(C(U),{replace:!0}))}function A(U){const ue=U.matched[U.matched.length-1];if(ue&&ue.redirect){const{redirect:se}=ue;let ve=typeof se=="function"?se(U):se;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=C(ve):{path:ve},ve.params={}),lt({query:U.query,hash:U.hash,params:"path"in ve?{}:U.params},ve)}}function D(U,ue){const se=c=w(U),ve=l.value,Be=U.state,T=U.force,O=U.replace===!0,I=A(se);if(I)return D(lt(C(I),{state:typeof I=="object"?lt({},Be,I.state):Be,force:T,replace:O}),ue||se);const G=se;G.redirectedFrom=ue;let Y;return!T&&IT(r,ve,se)&&(Y=co(16,{to:G,from:ve}),Ge(ve,ve,!0,!1)),(Y?Promise.resolve(Y):V(G,ve)).catch(X=>fr(X)?fr(X,2)?X:it(X):oe(X,G,ve)).then(X=>{if(X){if(fr(X,2))return D(lt({replace:O},C(X.to),{state:typeof X.to=="object"?lt({},Be,X.to.state):Be,force:T}),ue||G)}else X=q(G,ve,!0,O,Be);return Z(G,ve,X),X})}function F(U,ue){const se=z(U,ue);return se?Promise.reject(se):Promise.resolve()}function P(U){const ue=pt.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(U):U()}function V(U,ue){let se;const[ve,Be,T]=PO(U,ue);se=Wu(ve.reverse(),"beforeRouteLeave",U,ue);for(const I of ve)I.leaveGuards.forEach(G=>{se.push(Mr(G,U,ue))});const O=F.bind(null,U,ue);return se.push(O),Ne(se).then(()=>{se=[];for(const I of o.list())se.push(Mr(I,U,ue));return se.push(O),Ne(se)}).then(()=>{se=Wu(Be,"beforeRouteUpdate",U,ue);for(const I of Be)I.updateGuards.forEach(G=>{se.push(Mr(G,U,ue))});return se.push(O),Ne(se)}).then(()=>{se=[];for(const I of T)if(I.beforeEnter)if(Gn(I.beforeEnter))for(const G of I.beforeEnter)se.push(Mr(G,U,ue));else se.push(Mr(I.beforeEnter,U,ue));return se.push(O),Ne(se)}).then(()=>(U.matched.forEach(I=>I.enterCallbacks={}),se=Wu(T,"beforeRouteEnter",U,ue),se.push(O),Ne(se))).then(()=>{se=[];for(const I of a.list())se.push(Mr(I,U,ue));return se.push(O),Ne(se)}).catch(I=>fr(I,8)?I:Promise.reject(I))}function Z(U,ue,se){i.list().forEach(ve=>P(()=>ve(U,ue,se)))}function q(U,ue,se,ve,Be){const T=z(U,ue);if(T)return T;const O=ue===Pr,I=Ms?history.state:{};se&&(ve||O?s.replace(U.fullPath,lt({scroll:O&&I&&I.scroll},Be)):s.push(U.fullPath,Be)),l.value=U,Ge(U,ue,se,O),it()}let W;function Q(){W||(W=s.listen((U,ue,se)=>{if(!ht.listening)return;const ve=w(U),Be=A(ve);if(Be){D(lt(Be,{replace:!0}),ve).catch(ta);return}c=ve;const T=l.value;Ms&&BT(Yp(T.fullPath,se.delta),cu()),V(ve,T).catch(O=>fr(O,12)?O:fr(O,2)?(D(O.to,ve).then(I=>{fr(I,20)&&!se.delta&&se.type===Ca.pop&&s.go(-1,!1)}).catch(ta),Promise.reject()):(se.delta&&s.go(-se.delta,!1),oe(O,ve,T))).then(O=>{O=O||q(ve,T,!1),O&&(se.delta&&!fr(O,8)?s.go(-se.delta,!1):se.type===Ca.pop&&fr(O,20)&&s.go(-1,!1)),Z(ve,T,O)}).catch(ta)}))}let me=Oo(),K=Oo(),re;function oe(U,ue,se){it(U);const ve=K.list();return ve.length?ve.forEach(Be=>Be(U,ue,se)):console.error(U),Promise.reject(U)}function Fe(){return re&&l.value!==Pr?Promise.resolve():new Promise((U,ue)=>{me.add([U,ue])})}function it(U){return re||(re=!U,Q(),me.list().forEach(([ue,se])=>U?se(U):ue()),me.reset()),U}function Ge(U,ue,se,ve){const{scrollBehavior:Be}=e;if(!Ms||!Be)return Promise.resolve();const T=!se&&UT(Yp(U.fullPath,0))||(ve||!se)&&history.state&&history.state.scroll||null;return Sa().then(()=>Be(U,ue,T)).then(O=>O&&HT(O)).catch(O=>oe(O,U,ue))}const je=U=>s.go(U);let ct;const pt=new Set,ht={currentRoute:l,listening:!0,addRoute:p,removeRoute:h,hasRoute:b,getRoutes:_,resolve:w,options:e,push:v,replace:S,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:o.add,beforeResolve:a.add,afterEach:i.add,onError:K.add,isReady:Fe,install(U){const ue=this;U.component("RouterLink",SO),U.component("RouterView",OO),U.config.globalProperties.$router=ue,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>vn(l)}),Ms&&!ct&&l.value===Pr&&(ct=!0,v(s.location).catch(Be=>{}));const se={};for(const Be in Pr)Object.defineProperty(se,Be,{get:()=>l.value[Be],enumerable:!0});U.provide(Cm,ue),U.provide(Qv,Sd(se)),U.provide(Qc,l);const ve=U.unmount;pt.add(U),U.unmount=function(){pt.delete(U),pt.size<1&&(c=Pr,W&&W(),W=null,l.value=Pr,ct=!1,re=!1),ve()}}};function Ne(U){return U.reduce((ue,se)=>ue.then(()=>P(se)),Promise.resolve())}return ht}function PO(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;auo(c,i))?r.push(i):n.push(i));const l=e.matched[a];l&&(t.matched.find(c=>uo(c,l))||s.push(l))}return[n,r,s]}const IO={name:"PageAbout",computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{showUpdateDialog(){this.$store.commit(ka,!0)}}},FO={class:"section"},RO={class:"container"},LO={class:"columns is-centered"},NO={class:"column is-four-fifths has-text-centered-mobile"},MO=["textContent"],VO={class:"section"},HO={class:"container"},BO={class:"columns is-centered"},UO={class:"column is-four-fifths"},jO={class:"content"},qO={class:"level is-mobile"},WO={class:"level-left"},KO={class:"level-item"},GO=["textContent"],ZO={class:"level-right"},YO={key:0},JO=["textContent"],XO={key:1},QO=["textContent"],e3={class:"table"},t3=["textContent"],n3=["textContent"],r3=["textContent"],s3=["textContent"],o3=["textContent"],a3=["textContent"],i3=["textContent"],l3=["textContent"],u3=["textContent"],c3={class:"has-text-right"},d3=["textContent"],m3=["textContent"],f3=["textContent"],p3={class:"has-text-right"},h3=["textContent"],_3=["textContent"],g3={class:"section"},y3={class:"container"},v3={class:"columns is-centered"},b3={class:"column is-four-fifths"},z3={class:"content has-text-centered-mobile"},C3=["textContent"],w3=["textContent"],k3=u("a",{href:"https://bulma.io"},"Bulma",-1),x3=u("a",{href:"https://pictogrammers.com/library/mdi/"},"Material Design Icons",-1),E3=u("a",{href:"https://vuejs.org/"},"Vue.js",-1),S3=u("a",{href:"https://github.com/mzabriskie/axios"},"axios",-1),$3=["textContent"];function A3(e,t,n,r,s,o){const a=E("i18n-t");return k(),$("div",null,[u("section",FO,[u("div",RO,[u("div",LO,[u("div",NO,[u("h1",{class:"title is-4",textContent:g(o.config.library_name)},null,8,MO)])])])]),u("section",VO,[u("div",HO,[u("div",BO,[u("div",UO,[u("div",jO,[u("nav",qO,[u("div",WO,[u("div",KO,[u("h2",{class:"title is-5",textContent:g(e.$t("page.about.library"))},null,8,GO)])]),u("div",ZO,[o.library.updating?(k(),$("div",YO,[u("a",{class:"button is-small is-loading",textContent:g(e.$t("page.about.update"))},null,8,JO)])):(k(),$("div",XO,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=i=>o.showUpdateDialog()),textContent:g(e.$t("page.about.update"))},null,8,QO)]))])]),u("table",e3,[u("tbody",null,[u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.artists"))},null,8,t3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.artists))},null,8,n3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.albums"))},null,8,r3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.albums))},null,8,s3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.tracks"))},null,8,o3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.songs))},null,8,a3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.total-playtime"))},null,8,i3),u("td",{class:"has-text-right",textContent:g(e.$filters.durationInDays(o.library.db_playtime*1e3))},null,8,l3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.updated"))},null,8,u3),u("td",c3,[u("span",{textContent:g(e.$t("page.about.updated-on",{time:e.$filters.timeFromNow(o.library.updated_at)}))},null,8,d3),rt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.updated_at))},null,8,m3),rt(") ")])]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.uptime"))},null,8,f3),u("td",p3,[u("span",{textContent:g(e.$filters.timeFromNow(o.library.started_at,!0))},null,8,h3),rt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.started_at))},null,8,_3),rt(") ")])])])])])])])])]),u("section",g3,[u("div",y3,[u("div",v3,[u("div",b3,[u("div",z3,[u("p",{class:"is-size-7",textContent:g(e.$t("page.about.version",{version:o.config.version}))},null,8,C3),u("p",{class:"is-size-7",textContent:g(e.$t("page.about.compiled-with",{options:o.config.buildoptions.join(", ")}))},null,8,w3),y(a,{tag:"p",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:x(()=>[k3]),mdi:x(()=>[x3]),vuejs:x(()=>[E3]),axios:x(()=>[S3]),others:x(()=>[u("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:g(e.$t("page.about.more"))},null,8,$3)]),_:1})])])])])])])}const T3=te(IO,[["render",A3]]),O3={},D3={class:"hero is-light is-bold"},P3={class:"hero-body"},I3={class:"container"},F3={class:"columns is-centered"},R3={class:"column is-four-fifths"},L3={class:"columns is-flex-direction-row-reverse"},N3={class:"column fd-has-cover"},M3={class:"column m-auto is-three-fifths has-text-centered-mobile"},V3={class:"section pt-0"},H3={class:"container"},B3={class:"columns is-centered"},U3={class:"column is-four-fifths"};function j3(e,t){return k(),$(we,null,[u("section",D3,[u("div",P3,[u("div",I3,[u("div",F3,[u("div",R3,[u("div",L3,[u("div",N3,[ot(e.$slots,"heading-right")]),u("div",M3,[ot(e.$slots,"heading-left")])])])])])])]),u("section",V3,[u("div",H3,[u("div",B3,[u("div",U3,[ot(e.$slots,"content"),ot(e.$slots,"footer")])])])])],64)}const du=te(O3,[["render",j3]]);var e1={exports:{}},q3=[{value:"#B0171F",name:"indian red"},{value:"#DC143C",css:!0,name:"crimson"},{value:"#FFB6C1",css:!0,name:"lightpink"},{value:"#FFAEB9",name:"lightpink 1"},{value:"#EEA2AD",name:"lightpink 2"},{value:"#CD8C95",name:"lightpink 3"},{value:"#8B5F65",name:"lightpink 4"},{value:"#FFC0CB",css:!0,name:"pink"},{value:"#FFB5C5",name:"pink 1"},{value:"#EEA9B8",name:"pink 2"},{value:"#CD919E",name:"pink 3"},{value:"#8B636C",name:"pink 4"},{value:"#DB7093",css:!0,name:"palevioletred"},{value:"#FF82AB",name:"palevioletred 1"},{value:"#EE799F",name:"palevioletred 2"},{value:"#CD6889",name:"palevioletred 3"},{value:"#8B475D",name:"palevioletred 4"},{value:"#FFF0F5",name:"lavenderblush 1"},{value:"#FFF0F5",css:!0,name:"lavenderblush"},{value:"#EEE0E5",name:"lavenderblush 2"},{value:"#CDC1C5",name:"lavenderblush 3"},{value:"#8B8386",name:"lavenderblush 4"},{value:"#FF3E96",name:"violetred 1"},{value:"#EE3A8C",name:"violetred 2"},{value:"#CD3278",name:"violetred 3"},{value:"#8B2252",name:"violetred 4"},{value:"#FF69B4",css:!0,name:"hotpink"},{value:"#FF6EB4",name:"hotpink 1"},{value:"#EE6AA7",name:"hotpink 2"},{value:"#CD6090",name:"hotpink 3"},{value:"#8B3A62",name:"hotpink 4"},{value:"#872657",name:"raspberry"},{value:"#FF1493",name:"deeppink 1"},{value:"#FF1493",css:!0,name:"deeppink"},{value:"#EE1289",name:"deeppink 2"},{value:"#CD1076",name:"deeppink 3"},{value:"#8B0A50",name:"deeppink 4"},{value:"#FF34B3",name:"maroon 1"},{value:"#EE30A7",name:"maroon 2"},{value:"#CD2990",name:"maroon 3"},{value:"#8B1C62",name:"maroon 4"},{value:"#C71585",css:!0,name:"mediumvioletred"},{value:"#D02090",name:"violetred"},{value:"#DA70D6",css:!0,name:"orchid"},{value:"#FF83FA",name:"orchid 1"},{value:"#EE7AE9",name:"orchid 2"},{value:"#CD69C9",name:"orchid 3"},{value:"#8B4789",name:"orchid 4"},{value:"#D8BFD8",css:!0,name:"thistle"},{value:"#FFE1FF",name:"thistle 1"},{value:"#EED2EE",name:"thistle 2"},{value:"#CDB5CD",name:"thistle 3"},{value:"#8B7B8B",name:"thistle 4"},{value:"#FFBBFF",name:"plum 1"},{value:"#EEAEEE",name:"plum 2"},{value:"#CD96CD",name:"plum 3"},{value:"#8B668B",name:"plum 4"},{value:"#DDA0DD",css:!0,name:"plum"},{value:"#EE82EE",css:!0,name:"violet"},{value:"#FF00FF",vga:!0,name:"magenta"},{value:"#FF00FF",vga:!0,css:!0,name:"fuchsia"},{value:"#EE00EE",name:"magenta 2"},{value:"#CD00CD",name:"magenta 3"},{value:"#8B008B",name:"magenta 4"},{value:"#8B008B",css:!0,name:"darkmagenta"},{value:"#800080",vga:!0,css:!0,name:"purple"},{value:"#BA55D3",css:!0,name:"mediumorchid"},{value:"#E066FF",name:"mediumorchid 1"},{value:"#D15FEE",name:"mediumorchid 2"},{value:"#B452CD",name:"mediumorchid 3"},{value:"#7A378B",name:"mediumorchid 4"},{value:"#9400D3",css:!0,name:"darkviolet"},{value:"#9932CC",css:!0,name:"darkorchid"},{value:"#BF3EFF",name:"darkorchid 1"},{value:"#B23AEE",name:"darkorchid 2"},{value:"#9A32CD",name:"darkorchid 3"},{value:"#68228B",name:"darkorchid 4"},{value:"#4B0082",css:!0,name:"indigo"},{value:"#8A2BE2",css:!0,name:"blueviolet"},{value:"#9B30FF",name:"purple 1"},{value:"#912CEE",name:"purple 2"},{value:"#7D26CD",name:"purple 3"},{value:"#551A8B",name:"purple 4"},{value:"#9370DB",css:!0,name:"mediumpurple"},{value:"#AB82FF",name:"mediumpurple 1"},{value:"#9F79EE",name:"mediumpurple 2"},{value:"#8968CD",name:"mediumpurple 3"},{value:"#5D478B",name:"mediumpurple 4"},{value:"#483D8B",css:!0,name:"darkslateblue"},{value:"#8470FF",name:"lightslateblue"},{value:"#7B68EE",css:!0,name:"mediumslateblue"},{value:"#6A5ACD",css:!0,name:"slateblue"},{value:"#836FFF",name:"slateblue 1"},{value:"#7A67EE",name:"slateblue 2"},{value:"#6959CD",name:"slateblue 3"},{value:"#473C8B",name:"slateblue 4"},{value:"#F8F8FF",css:!0,name:"ghostwhite"},{value:"#E6E6FA",css:!0,name:"lavender"},{value:"#0000FF",vga:!0,css:!0,name:"blue"},{value:"#0000EE",name:"blue 2"},{value:"#0000CD",name:"blue 3"},{value:"#0000CD",css:!0,name:"mediumblue"},{value:"#00008B",name:"blue 4"},{value:"#00008B",css:!0,name:"darkblue"},{value:"#000080",vga:!0,css:!0,name:"navy"},{value:"#191970",css:!0,name:"midnightblue"},{value:"#3D59AB",name:"cobalt"},{value:"#4169E1",css:!0,name:"royalblue"},{value:"#4876FF",name:"royalblue 1"},{value:"#436EEE",name:"royalblue 2"},{value:"#3A5FCD",name:"royalblue 3"},{value:"#27408B",name:"royalblue 4"},{value:"#6495ED",css:!0,name:"cornflowerblue"},{value:"#B0C4DE",css:!0,name:"lightsteelblue"},{value:"#CAE1FF",name:"lightsteelblue 1"},{value:"#BCD2EE",name:"lightsteelblue 2"},{value:"#A2B5CD",name:"lightsteelblue 3"},{value:"#6E7B8B",name:"lightsteelblue 4"},{value:"#778899",css:!0,name:"lightslategray"},{value:"#708090",css:!0,name:"slategray"},{value:"#C6E2FF",name:"slategray 1"},{value:"#B9D3EE",name:"slategray 2"},{value:"#9FB6CD",name:"slategray 3"},{value:"#6C7B8B",name:"slategray 4"},{value:"#1E90FF",name:"dodgerblue 1"},{value:"#1E90FF",css:!0,name:"dodgerblue"},{value:"#1C86EE",name:"dodgerblue 2"},{value:"#1874CD",name:"dodgerblue 3"},{value:"#104E8B",name:"dodgerblue 4"},{value:"#F0F8FF",css:!0,name:"aliceblue"},{value:"#4682B4",css:!0,name:"steelblue"},{value:"#63B8FF",name:"steelblue 1"},{value:"#5CACEE",name:"steelblue 2"},{value:"#4F94CD",name:"steelblue 3"},{value:"#36648B",name:"steelblue 4"},{value:"#87CEFA",css:!0,name:"lightskyblue"},{value:"#B0E2FF",name:"lightskyblue 1"},{value:"#A4D3EE",name:"lightskyblue 2"},{value:"#8DB6CD",name:"lightskyblue 3"},{value:"#607B8B",name:"lightskyblue 4"},{value:"#87CEFF",name:"skyblue 1"},{value:"#7EC0EE",name:"skyblue 2"},{value:"#6CA6CD",name:"skyblue 3"},{value:"#4A708B",name:"skyblue 4"},{value:"#87CEEB",css:!0,name:"skyblue"},{value:"#00BFFF",name:"deepskyblue 1"},{value:"#00BFFF",css:!0,name:"deepskyblue"},{value:"#00B2EE",name:"deepskyblue 2"},{value:"#009ACD",name:"deepskyblue 3"},{value:"#00688B",name:"deepskyblue 4"},{value:"#33A1C9",name:"peacock"},{value:"#ADD8E6",css:!0,name:"lightblue"},{value:"#BFEFFF",name:"lightblue 1"},{value:"#B2DFEE",name:"lightblue 2"},{value:"#9AC0CD",name:"lightblue 3"},{value:"#68838B",name:"lightblue 4"},{value:"#B0E0E6",css:!0,name:"powderblue"},{value:"#98F5FF",name:"cadetblue 1"},{value:"#8EE5EE",name:"cadetblue 2"},{value:"#7AC5CD",name:"cadetblue 3"},{value:"#53868B",name:"cadetblue 4"},{value:"#00F5FF",name:"turquoise 1"},{value:"#00E5EE",name:"turquoise 2"},{value:"#00C5CD",name:"turquoise 3"},{value:"#00868B",name:"turquoise 4"},{value:"#5F9EA0",css:!0,name:"cadetblue"},{value:"#00CED1",css:!0,name:"darkturquoise"},{value:"#F0FFFF",name:"azure 1"},{value:"#F0FFFF",css:!0,name:"azure"},{value:"#E0EEEE",name:"azure 2"},{value:"#C1CDCD",name:"azure 3"},{value:"#838B8B",name:"azure 4"},{value:"#E0FFFF",name:"lightcyan 1"},{value:"#E0FFFF",css:!0,name:"lightcyan"},{value:"#D1EEEE",name:"lightcyan 2"},{value:"#B4CDCD",name:"lightcyan 3"},{value:"#7A8B8B",name:"lightcyan 4"},{value:"#BBFFFF",name:"paleturquoise 1"},{value:"#AEEEEE",name:"paleturquoise 2"},{value:"#AEEEEE",css:!0,name:"paleturquoise"},{value:"#96CDCD",name:"paleturquoise 3"},{value:"#668B8B",name:"paleturquoise 4"},{value:"#2F4F4F",css:!0,name:"darkslategray"},{value:"#97FFFF",name:"darkslategray 1"},{value:"#8DEEEE",name:"darkslategray 2"},{value:"#79CDCD",name:"darkslategray 3"},{value:"#528B8B",name:"darkslategray 4"},{value:"#00FFFF",name:"cyan"},{value:"#00FFFF",css:!0,name:"aqua"},{value:"#00EEEE",name:"cyan 2"},{value:"#00CDCD",name:"cyan 3"},{value:"#008B8B",name:"cyan 4"},{value:"#008B8B",css:!0,name:"darkcyan"},{value:"#008080",vga:!0,css:!0,name:"teal"},{value:"#48D1CC",css:!0,name:"mediumturquoise"},{value:"#20B2AA",css:!0,name:"lightseagreen"},{value:"#03A89E",name:"manganeseblue"},{value:"#40E0D0",css:!0,name:"turquoise"},{value:"#808A87",name:"coldgrey"},{value:"#00C78C",name:"turquoiseblue"},{value:"#7FFFD4",name:"aquamarine 1"},{value:"#7FFFD4",css:!0,name:"aquamarine"},{value:"#76EEC6",name:"aquamarine 2"},{value:"#66CDAA",name:"aquamarine 3"},{value:"#66CDAA",css:!0,name:"mediumaquamarine"},{value:"#458B74",name:"aquamarine 4"},{value:"#00FA9A",css:!0,name:"mediumspringgreen"},{value:"#F5FFFA",css:!0,name:"mintcream"},{value:"#00FF7F",css:!0,name:"springgreen"},{value:"#00EE76",name:"springgreen 1"},{value:"#00CD66",name:"springgreen 2"},{value:"#008B45",name:"springgreen 3"},{value:"#3CB371",css:!0,name:"mediumseagreen"},{value:"#54FF9F",name:"seagreen 1"},{value:"#4EEE94",name:"seagreen 2"},{value:"#43CD80",name:"seagreen 3"},{value:"#2E8B57",name:"seagreen 4"},{value:"#2E8B57",css:!0,name:"seagreen"},{value:"#00C957",name:"emeraldgreen"},{value:"#BDFCC9",name:"mint"},{value:"#3D9140",name:"cobaltgreen"},{value:"#F0FFF0",name:"honeydew 1"},{value:"#F0FFF0",css:!0,name:"honeydew"},{value:"#E0EEE0",name:"honeydew 2"},{value:"#C1CDC1",name:"honeydew 3"},{value:"#838B83",name:"honeydew 4"},{value:"#8FBC8F",css:!0,name:"darkseagreen"},{value:"#C1FFC1",name:"darkseagreen 1"},{value:"#B4EEB4",name:"darkseagreen 2"},{value:"#9BCD9B",name:"darkseagreen 3"},{value:"#698B69",name:"darkseagreen 4"},{value:"#98FB98",css:!0,name:"palegreen"},{value:"#9AFF9A",name:"palegreen 1"},{value:"#90EE90",name:"palegreen 2"},{value:"#90EE90",css:!0,name:"lightgreen"},{value:"#7CCD7C",name:"palegreen 3"},{value:"#548B54",name:"palegreen 4"},{value:"#32CD32",css:!0,name:"limegreen"},{value:"#228B22",css:!0,name:"forestgreen"},{value:"#00FF00",vga:!0,name:"green 1"},{value:"#00FF00",vga:!0,css:!0,name:"lime"},{value:"#00EE00",name:"green 2"},{value:"#00CD00",name:"green 3"},{value:"#008B00",name:"green 4"},{value:"#008000",vga:!0,css:!0,name:"green"},{value:"#006400",css:!0,name:"darkgreen"},{value:"#308014",name:"sapgreen"},{value:"#7CFC00",css:!0,name:"lawngreen"},{value:"#7FFF00",name:"chartreuse 1"},{value:"#7FFF00",css:!0,name:"chartreuse"},{value:"#76EE00",name:"chartreuse 2"},{value:"#66CD00",name:"chartreuse 3"},{value:"#458B00",name:"chartreuse 4"},{value:"#ADFF2F",css:!0,name:"greenyellow"},{value:"#CAFF70",name:"darkolivegreen 1"},{value:"#BCEE68",name:"darkolivegreen 2"},{value:"#A2CD5A",name:"darkolivegreen 3"},{value:"#6E8B3D",name:"darkolivegreen 4"},{value:"#556B2F",css:!0,name:"darkolivegreen"},{value:"#6B8E23",css:!0,name:"olivedrab"},{value:"#C0FF3E",name:"olivedrab 1"},{value:"#B3EE3A",name:"olivedrab 2"},{value:"#9ACD32",name:"olivedrab 3"},{value:"#9ACD32",css:!0,name:"yellowgreen"},{value:"#698B22",name:"olivedrab 4"},{value:"#FFFFF0",name:"ivory 1"},{value:"#FFFFF0",css:!0,name:"ivory"},{value:"#EEEEE0",name:"ivory 2"},{value:"#CDCDC1",name:"ivory 3"},{value:"#8B8B83",name:"ivory 4"},{value:"#F5F5DC",css:!0,name:"beige"},{value:"#FFFFE0",name:"lightyellow 1"},{value:"#FFFFE0",css:!0,name:"lightyellow"},{value:"#EEEED1",name:"lightyellow 2"},{value:"#CDCDB4",name:"lightyellow 3"},{value:"#8B8B7A",name:"lightyellow 4"},{value:"#FAFAD2",css:!0,name:"lightgoldenrodyellow"},{value:"#FFFF00",vga:!0,name:"yellow 1"},{value:"#FFFF00",vga:!0,css:!0,name:"yellow"},{value:"#EEEE00",name:"yellow 2"},{value:"#CDCD00",name:"yellow 3"},{value:"#8B8B00",name:"yellow 4"},{value:"#808069",name:"warmgrey"},{value:"#808000",vga:!0,css:!0,name:"olive"},{value:"#BDB76B",css:!0,name:"darkkhaki"},{value:"#FFF68F",name:"khaki 1"},{value:"#EEE685",name:"khaki 2"},{value:"#CDC673",name:"khaki 3"},{value:"#8B864E",name:"khaki 4"},{value:"#F0E68C",css:!0,name:"khaki"},{value:"#EEE8AA",css:!0,name:"palegoldenrod"},{value:"#FFFACD",name:"lemonchiffon 1"},{value:"#FFFACD",css:!0,name:"lemonchiffon"},{value:"#EEE9BF",name:"lemonchiffon 2"},{value:"#CDC9A5",name:"lemonchiffon 3"},{value:"#8B8970",name:"lemonchiffon 4"},{value:"#FFEC8B",name:"lightgoldenrod 1"},{value:"#EEDC82",name:"lightgoldenrod 2"},{value:"#CDBE70",name:"lightgoldenrod 3"},{value:"#8B814C",name:"lightgoldenrod 4"},{value:"#E3CF57",name:"banana"},{value:"#FFD700",name:"gold 1"},{value:"#FFD700",css:!0,name:"gold"},{value:"#EEC900",name:"gold 2"},{value:"#CDAD00",name:"gold 3"},{value:"#8B7500",name:"gold 4"},{value:"#FFF8DC",name:"cornsilk 1"},{value:"#FFF8DC",css:!0,name:"cornsilk"},{value:"#EEE8CD",name:"cornsilk 2"},{value:"#CDC8B1",name:"cornsilk 3"},{value:"#8B8878",name:"cornsilk 4"},{value:"#DAA520",css:!0,name:"goldenrod"},{value:"#FFC125",name:"goldenrod 1"},{value:"#EEB422",name:"goldenrod 2"},{value:"#CD9B1D",name:"goldenrod 3"},{value:"#8B6914",name:"goldenrod 4"},{value:"#B8860B",css:!0,name:"darkgoldenrod"},{value:"#FFB90F",name:"darkgoldenrod 1"},{value:"#EEAD0E",name:"darkgoldenrod 2"},{value:"#CD950C",name:"darkgoldenrod 3"},{value:"#8B6508",name:"darkgoldenrod 4"},{value:"#FFA500",name:"orange 1"},{value:"#FF8000",css:!0,name:"orange"},{value:"#EE9A00",name:"orange 2"},{value:"#CD8500",name:"orange 3"},{value:"#8B5A00",name:"orange 4"},{value:"#FFFAF0",css:!0,name:"floralwhite"},{value:"#FDF5E6",css:!0,name:"oldlace"},{value:"#F5DEB3",css:!0,name:"wheat"},{value:"#FFE7BA",name:"wheat 1"},{value:"#EED8AE",name:"wheat 2"},{value:"#CDBA96",name:"wheat 3"},{value:"#8B7E66",name:"wheat 4"},{value:"#FFE4B5",css:!0,name:"moccasin"},{value:"#FFEFD5",css:!0,name:"papayawhip"},{value:"#FFEBCD",css:!0,name:"blanchedalmond"},{value:"#FFDEAD",name:"navajowhite 1"},{value:"#FFDEAD",css:!0,name:"navajowhite"},{value:"#EECFA1",name:"navajowhite 2"},{value:"#CDB38B",name:"navajowhite 3"},{value:"#8B795E",name:"navajowhite 4"},{value:"#FCE6C9",name:"eggshell"},{value:"#D2B48C",css:!0,name:"tan"},{value:"#9C661F",name:"brick"},{value:"#FF9912",name:"cadmiumyellow"},{value:"#FAEBD7",css:!0,name:"antiquewhite"},{value:"#FFEFDB",name:"antiquewhite 1"},{value:"#EEDFCC",name:"antiquewhite 2"},{value:"#CDC0B0",name:"antiquewhite 3"},{value:"#8B8378",name:"antiquewhite 4"},{value:"#DEB887",css:!0,name:"burlywood"},{value:"#FFD39B",name:"burlywood 1"},{value:"#EEC591",name:"burlywood 2"},{value:"#CDAA7D",name:"burlywood 3"},{value:"#8B7355",name:"burlywood 4"},{value:"#FFE4C4",name:"bisque 1"},{value:"#FFE4C4",css:!0,name:"bisque"},{value:"#EED5B7",name:"bisque 2"},{value:"#CDB79E",name:"bisque 3"},{value:"#8B7D6B",name:"bisque 4"},{value:"#E3A869",name:"melon"},{value:"#ED9121",name:"carrot"},{value:"#FF8C00",css:!0,name:"darkorange"},{value:"#FF7F00",name:"darkorange 1"},{value:"#EE7600",name:"darkorange 2"},{value:"#CD6600",name:"darkorange 3"},{value:"#8B4500",name:"darkorange 4"},{value:"#FFA54F",name:"tan 1"},{value:"#EE9A49",name:"tan 2"},{value:"#CD853F",name:"tan 3"},{value:"#CD853F",css:!0,name:"peru"},{value:"#8B5A2B",name:"tan 4"},{value:"#FAF0E6",css:!0,name:"linen"},{value:"#FFDAB9",name:"peachpuff 1"},{value:"#FFDAB9",css:!0,name:"peachpuff"},{value:"#EECBAD",name:"peachpuff 2"},{value:"#CDAF95",name:"peachpuff 3"},{value:"#8B7765",name:"peachpuff 4"},{value:"#FFF5EE",name:"seashell 1"},{value:"#FFF5EE",css:!0,name:"seashell"},{value:"#EEE5DE",name:"seashell 2"},{value:"#CDC5BF",name:"seashell 3"},{value:"#8B8682",name:"seashell 4"},{value:"#F4A460",css:!0,name:"sandybrown"},{value:"#C76114",name:"rawsienna"},{value:"#D2691E",css:!0,name:"chocolate"},{value:"#FF7F24",name:"chocolate 1"},{value:"#EE7621",name:"chocolate 2"},{value:"#CD661D",name:"chocolate 3"},{value:"#8B4513",name:"chocolate 4"},{value:"#8B4513",css:!0,name:"saddlebrown"},{value:"#292421",name:"ivoryblack"},{value:"#FF7D40",name:"flesh"},{value:"#FF6103",name:"cadmiumorange"},{value:"#8A360F",name:"burntsienna"},{value:"#A0522D",css:!0,name:"sienna"},{value:"#FF8247",name:"sienna 1"},{value:"#EE7942",name:"sienna 2"},{value:"#CD6839",name:"sienna 3"},{value:"#8B4726",name:"sienna 4"},{value:"#FFA07A",name:"lightsalmon 1"},{value:"#FFA07A",css:!0,name:"lightsalmon"},{value:"#EE9572",name:"lightsalmon 2"},{value:"#CD8162",name:"lightsalmon 3"},{value:"#8B5742",name:"lightsalmon 4"},{value:"#FF7F50",css:!0,name:"coral"},{value:"#FF4500",name:"orangered 1"},{value:"#FF4500",css:!0,name:"orangered"},{value:"#EE4000",name:"orangered 2"},{value:"#CD3700",name:"orangered 3"},{value:"#8B2500",name:"orangered 4"},{value:"#5E2612",name:"sepia"},{value:"#E9967A",css:!0,name:"darksalmon"},{value:"#FF8C69",name:"salmon 1"},{value:"#EE8262",name:"salmon 2"},{value:"#CD7054",name:"salmon 3"},{value:"#8B4C39",name:"salmon 4"},{value:"#FF7256",name:"coral 1"},{value:"#EE6A50",name:"coral 2"},{value:"#CD5B45",name:"coral 3"},{value:"#8B3E2F",name:"coral 4"},{value:"#8A3324",name:"burntumber"},{value:"#FF6347",name:"tomato 1"},{value:"#FF6347",css:!0,name:"tomato"},{value:"#EE5C42",name:"tomato 2"},{value:"#CD4F39",name:"tomato 3"},{value:"#8B3626",name:"tomato 4"},{value:"#FA8072",css:!0,name:"salmon"},{value:"#FFE4E1",name:"mistyrose 1"},{value:"#FFE4E1",css:!0,name:"mistyrose"},{value:"#EED5D2",name:"mistyrose 2"},{value:"#CDB7B5",name:"mistyrose 3"},{value:"#8B7D7B",name:"mistyrose 4"},{value:"#FFFAFA",name:"snow 1"},{value:"#FFFAFA",css:!0,name:"snow"},{value:"#EEE9E9",name:"snow 2"},{value:"#CDC9C9",name:"snow 3"},{value:"#8B8989",name:"snow 4"},{value:"#BC8F8F",css:!0,name:"rosybrown"},{value:"#FFC1C1",name:"rosybrown 1"},{value:"#EEB4B4",name:"rosybrown 2"},{value:"#CD9B9B",name:"rosybrown 3"},{value:"#8B6969",name:"rosybrown 4"},{value:"#F08080",css:!0,name:"lightcoral"},{value:"#CD5C5C",css:!0,name:"indianred"},{value:"#FF6A6A",name:"indianred 1"},{value:"#EE6363",name:"indianred 2"},{value:"#8B3A3A",name:"indianred 4"},{value:"#CD5555",name:"indianred 3"},{value:"#A52A2A",css:!0,name:"brown"},{value:"#FF4040",name:"brown 1"},{value:"#EE3B3B",name:"brown 2"},{value:"#CD3333",name:"brown 3"},{value:"#8B2323",name:"brown 4"},{value:"#B22222",css:!0,name:"firebrick"},{value:"#FF3030",name:"firebrick 1"},{value:"#EE2C2C",name:"firebrick 2"},{value:"#CD2626",name:"firebrick 3"},{value:"#8B1A1A",name:"firebrick 4"},{value:"#FF0000",vga:!0,name:"red 1"},{value:"#FF0000",vga:!0,css:!0,name:"red"},{value:"#EE0000",name:"red 2"},{value:"#CD0000",name:"red 3"},{value:"#8B0000",name:"red 4"},{value:"#8B0000",css:!0,name:"darkred"},{value:"#800000",vga:!0,css:!0,name:"maroon"},{value:"#8E388E",name:"sgi beet"},{value:"#7171C6",name:"sgi slateblue"},{value:"#7D9EC0",name:"sgi lightblue"},{value:"#388E8E",name:"sgi teal"},{value:"#71C671",name:"sgi chartreuse"},{value:"#8E8E38",name:"sgi olivedrab"},{value:"#C5C1AA",name:"sgi brightgray"},{value:"#C67171",name:"sgi salmon"},{value:"#555555",name:"sgi darkgray"},{value:"#1E1E1E",name:"sgi gray 12"},{value:"#282828",name:"sgi gray 16"},{value:"#515151",name:"sgi gray 32"},{value:"#5B5B5B",name:"sgi gray 36"},{value:"#848484",name:"sgi gray 52"},{value:"#8E8E8E",name:"sgi gray 56"},{value:"#AAAAAA",name:"sgi lightgray"},{value:"#B7B7B7",name:"sgi gray 72"},{value:"#C1C1C1",name:"sgi gray 76"},{value:"#EAEAEA",name:"sgi gray 92"},{value:"#F4F4F4",name:"sgi gray 96"},{value:"#FFFFFF",vga:!0,css:!0,name:"white"},{value:"#F5F5F5",name:"white smoke"},{value:"#F5F5F5",name:"gray 96"},{value:"#DCDCDC",css:!0,name:"gainsboro"},{value:"#D3D3D3",css:!0,name:"lightgrey"},{value:"#C0C0C0",vga:!0,css:!0,name:"silver"},{value:"#A9A9A9",css:!0,name:"darkgray"},{value:"#808080",vga:!0,css:!0,name:"gray"},{value:"#696969",css:!0,name:"dimgray"},{value:"#696969",name:"gray 42"},{value:"#000000",vga:!0,css:!0,name:"black"},{value:"#FCFCFC",name:"gray 99"},{value:"#FAFAFA",name:"gray 98"},{value:"#F7F7F7",name:"gray 97"},{value:"#F2F2F2",name:"gray 95"},{value:"#F0F0F0",name:"gray 94"},{value:"#EDEDED",name:"gray 93"},{value:"#EBEBEB",name:"gray 92"},{value:"#E8E8E8",name:"gray 91"},{value:"#E5E5E5",name:"gray 90"},{value:"#E3E3E3",name:"gray 89"},{value:"#E0E0E0",name:"gray 88"},{value:"#DEDEDE",name:"gray 87"},{value:"#DBDBDB",name:"gray 86"},{value:"#D9D9D9",name:"gray 85"},{value:"#D6D6D6",name:"gray 84"},{value:"#D4D4D4",name:"gray 83"},{value:"#D1D1D1",name:"gray 82"},{value:"#CFCFCF",name:"gray 81"},{value:"#CCCCCC",name:"gray 80"},{value:"#C9C9C9",name:"gray 79"},{value:"#C7C7C7",name:"gray 78"},{value:"#C4C4C4",name:"gray 77"},{value:"#C2C2C2",name:"gray 76"},{value:"#BFBFBF",name:"gray 75"},{value:"#BDBDBD",name:"gray 74"},{value:"#BABABA",name:"gray 73"},{value:"#B8B8B8",name:"gray 72"},{value:"#B5B5B5",name:"gray 71"},{value:"#B3B3B3",name:"gray 70"},{value:"#B0B0B0",name:"gray 69"},{value:"#ADADAD",name:"gray 68"},{value:"#ABABAB",name:"gray 67"},{value:"#A8A8A8",name:"gray 66"},{value:"#A6A6A6",name:"gray 65"},{value:"#A3A3A3",name:"gray 64"},{value:"#A1A1A1",name:"gray 63"},{value:"#9E9E9E",name:"gray 62"},{value:"#9C9C9C",name:"gray 61"},{value:"#999999",name:"gray 60"},{value:"#969696",name:"gray 59"},{value:"#949494",name:"gray 58"},{value:"#919191",name:"gray 57"},{value:"#8F8F8F",name:"gray 56"},{value:"#8C8C8C",name:"gray 55"},{value:"#8A8A8A",name:"gray 54"},{value:"#878787",name:"gray 53"},{value:"#858585",name:"gray 52"},{value:"#828282",name:"gray 51"},{value:"#7F7F7F",name:"gray 50"},{value:"#7D7D7D",name:"gray 49"},{value:"#7A7A7A",name:"gray 48"},{value:"#787878",name:"gray 47"},{value:"#757575",name:"gray 46"},{value:"#737373",name:"gray 45"},{value:"#707070",name:"gray 44"},{value:"#6E6E6E",name:"gray 43"},{value:"#666666",name:"gray 40"},{value:"#636363",name:"gray 39"},{value:"#616161",name:"gray 38"},{value:"#5E5E5E",name:"gray 37"},{value:"#5C5C5C",name:"gray 36"},{value:"#595959",name:"gray 35"},{value:"#575757",name:"gray 34"},{value:"#545454",name:"gray 33"},{value:"#525252",name:"gray 32"},{value:"#4F4F4F",name:"gray 31"},{value:"#4D4D4D",name:"gray 30"},{value:"#4A4A4A",name:"gray 29"},{value:"#474747",name:"gray 28"},{value:"#454545",name:"gray 27"},{value:"#424242",name:"gray 26"},{value:"#404040",name:"gray 25"},{value:"#3D3D3D",name:"gray 24"},{value:"#3B3B3B",name:"gray 23"},{value:"#383838",name:"gray 22"},{value:"#363636",name:"gray 21"},{value:"#333333",name:"gray 20"},{value:"#303030",name:"gray 19"},{value:"#2E2E2E",name:"gray 18"},{value:"#2B2B2B",name:"gray 17"},{value:"#292929",name:"gray 16"},{value:"#262626",name:"gray 15"},{value:"#242424",name:"gray 14"},{value:"#212121",name:"gray 13"},{value:"#1F1F1F",name:"gray 12"},{value:"#1C1C1C",name:"gray 11"},{value:"#1A1A1A",name:"gray 10"},{value:"#171717",name:"gray 9"},{value:"#141414",name:"gray 8"},{value:"#121212",name:"gray 7"},{value:"#0F0F0F",name:"gray 6"},{value:"#0D0D0D",name:"gray 5"},{value:"#0A0A0A",name:"gray 4"},{value:"#080808",name:"gray 3"},{value:"#050505",name:"gray 2"},{value:"#030303",name:"gray 1"},{value:"#F5F5F5",css:!0,name:"whitesmoke"}];(function(e){var t=q3,n=t.filter(function(s){return!!s.css}),r=t.filter(function(s){return!!s.vga});e.exports=function(s){var o=e.exports.get(s);return o&&o.value},e.exports.get=function(s){return s=s||"",s=s.trim().toLowerCase(),t.filter(function(o){return o.name.toLowerCase()===s}).pop()},e.exports.all=e.exports.get.all=function(){return t},e.exports.get.css=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),n.filter(function(o){return o.name.toLowerCase()===s}).pop()):n},e.exports.get.vga=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),r.filter(function(o){return o.name.toLowerCase()===s}).pop()):r}})(e1);var W3=e1.exports,K3=1/0,G3="[object Symbol]",Z3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,t1="\\ud800-\\udfff",Y3="\\u0300-\\u036f\\ufe20-\\ufe23",J3="\\u20d0-\\u20f0",n1="\\u2700-\\u27bf",r1="a-z\\xdf-\\xf6\\xf8-\\xff",X3="\\xac\\xb1\\xd7\\xf7",Q3="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",e4="\\u2000-\\u206f",t4=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",s1="A-Z\\xc0-\\xd6\\xd8-\\xde",n4="\\ufe0e\\ufe0f",o1=X3+Q3+e4+t4,a1="['’]",ch="["+o1+"]",r4="["+Y3+J3+"]",i1="\\d+",s4="["+n1+"]",l1="["+r1+"]",u1="[^"+t1+o1+i1+n1+r1+s1+"]",o4="\\ud83c[\\udffb-\\udfff]",a4="(?:"+r4+"|"+o4+")",i4="[^"+t1+"]",c1="(?:\\ud83c[\\udde6-\\uddff]){2}",d1="[\\ud800-\\udbff][\\udc00-\\udfff]",Vs="["+s1+"]",l4="\\u200d",dh="(?:"+l1+"|"+u1+")",u4="(?:"+Vs+"|"+u1+")",mh="(?:"+a1+"(?:d|ll|m|re|s|t|ve))?",fh="(?:"+a1+"(?:D|LL|M|RE|S|T|VE))?",m1=a4+"?",f1="["+n4+"]?",c4="(?:"+l4+"(?:"+[i4,c1,d1].join("|")+")"+f1+m1+")*",d4=f1+m1+c4,m4="(?:"+[s4,c1,d1].join("|")+")"+d4,f4=RegExp([Vs+"?"+l1+"+"+mh+"(?="+[ch,Vs,"$"].join("|")+")",u4+"+"+fh+"(?="+[ch,Vs+dh,"$"].join("|")+")",Vs+"?"+dh+"+"+mh,Vs+"+"+fh,i1,m4].join("|"),"g"),p4=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,h4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,_4=typeof self=="object"&&self&&self.Object===Object&&self,g4=h4||_4||Function("return this")();function y4(e){return e.match(Z3)||[]}function v4(e){return p4.test(e)}function b4(e){return e.match(f4)||[]}var z4=Object.prototype,C4=z4.toString,ph=g4.Symbol,hh=ph?ph.prototype:void 0,_h=hh?hh.toString:void 0;function w4(e){if(typeof e=="string")return e;if(x4(e))return _h?_h.call(e):"";var t=e+"";return t=="0"&&1/e==-K3?"-0":t}function k4(e){return!!e&&typeof e=="object"}function x4(e){return typeof e=="symbol"||k4(e)&&C4.call(e)==G3}function E4(e){return e==null?"":w4(e)}function S4(e,t,n){return e=E4(e),t=n?void 0:t,t===void 0?v4(e)?b4(e):y4(e):e.match(t)||[]}var $4=S4,A4=1/0,T4="[object Symbol]",O4=/^\s+/,wm="\\ud800-\\udfff",p1="\\u0300-\\u036f\\ufe20-\\ufe23",h1="\\u20d0-\\u20f0",_1="\\ufe0e\\ufe0f",D4="["+wm+"]",ed="["+p1+h1+"]",td="\\ud83c[\\udffb-\\udfff]",P4="(?:"+ed+"|"+td+")",g1="[^"+wm+"]",y1="(?:\\ud83c[\\udde6-\\uddff]){2}",v1="[\\ud800-\\udbff][\\udc00-\\udfff]",b1="\\u200d",z1=P4+"?",C1="["+_1+"]?",I4="(?:"+b1+"(?:"+[g1,y1,v1].join("|")+")"+C1+z1+")*",F4=C1+z1+I4,R4="(?:"+[g1+ed+"?",ed,y1,v1,D4].join("|")+")",L4=RegExp(td+"(?="+td+")|"+R4+F4,"g"),N4=RegExp("["+b1+wm+p1+h1+_1+"]"),M4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,V4=typeof self=="object"&&self&&self.Object===Object&&self,H4=M4||V4||Function("return this")();function B4(e){return e.split("")}function U4(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function K4(e){return N4.test(e)}function gh(e){return K4(e)?G4(e):B4(e)}function G4(e){return e.match(L4)||[]}var Z4=Object.prototype,Y4=Z4.toString,yh=H4.Symbol,vh=yh?yh.prototype:void 0,bh=vh?vh.toString:void 0;function J4(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:J4(e,t,n)}function Q4(e){return!!e&&typeof e=="object"}function e6(e){return typeof e=="symbol"||Q4(e)&&Y4.call(e)==T4}function t6(e){return e==null?"":w1(e)}function n6(e,t,n){if(e=t6(e),e&&(n||t===void 0))return e.replace(O4,"");if(!e||!(t=w1(t)))return e;var r=gh(e),s=W4(r,gh(t));return X4(r,s).join("")}var r6=n6,nd=1/0,s6=9007199254740991,o6=17976931348623157e292,zh=NaN,a6="[object Symbol]",i6=/^\s+|\s+$/g,l6=/^[-+]0x[0-9a-f]+$/i,u6=/^0b[01]+$/i,c6=/^0o[0-7]+$/i,km="\\ud800-\\udfff",k1="\\u0300-\\u036f\\ufe20-\\ufe23",x1="\\u20d0-\\u20f0",E1="\\ufe0e\\ufe0f",d6="["+km+"]",rd="["+k1+x1+"]",sd="\\ud83c[\\udffb-\\udfff]",m6="(?:"+rd+"|"+sd+")",S1="[^"+km+"]",$1="(?:\\ud83c[\\udde6-\\uddff]){2}",A1="[\\ud800-\\udbff][\\udc00-\\udfff]",T1="\\u200d",O1=m6+"?",D1="["+E1+"]?",f6="(?:"+T1+"(?:"+[S1,$1,A1].join("|")+")"+D1+O1+")*",p6=D1+O1+f6,h6="(?:"+[S1+rd+"?",rd,$1,A1,d6].join("|")+")",od=RegExp(sd+"(?="+sd+")|"+h6+p6,"g"),_6=RegExp("["+T1+km+k1+x1+E1+"]"),g6=parseInt,y6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,v6=typeof self=="object"&&self&&self.Object===Object&&self,b6=y6||v6||Function("return this")(),z6=w6("length");function C6(e){return e.split("")}function w6(e){return function(t){return t==null?void 0:t[e]}}function xm(e){return _6.test(e)}function P1(e){return xm(e)?x6(e):z6(e)}function k6(e){return xm(e)?E6(e):C6(e)}function x6(e){for(var t=od.lastIndex=0;od.test(e);)t++;return t}function E6(e){return e.match(od)||[]}var S6=Object.prototype,$6=S6.toString,Ch=b6.Symbol,A6=Math.ceil,T6=Math.floor,wh=Ch?Ch.prototype:void 0,kh=wh?wh.toString:void 0;function xh(e,t){var n="";if(!e||t<1||t>s6)return n;do t%2&&(n+=e),t=T6(t/2),t&&(e+=e);while(t);return n}function O6(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:O6(e,t,n)}function P6(e,t){t=t===void 0?" ":I1(t);var n=t.length;if(n<2)return n?xh(t,e):t;var r=xh(t,A6(e/P1(t)));return xm(t)?D6(k6(r),0,e).join(""):r.slice(0,e)}function Eh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function I6(e){return!!e&&typeof e=="object"}function F1(e){return typeof e=="symbol"||I6(e)&&$6.call(e)==a6}function F6(e){if(!e)return e===0?e:0;if(e=L6(e),e===nd||e===-nd){var t=e<0?-1:1;return t*o6}return e===e?e:0}function R6(e){var t=F6(e),n=t%1;return t===t?n?t-n:t:0}function L6(e){if(typeof e=="number")return e;if(F1(e))return zh;if(Eh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Eh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(i6,"");var n=u6.test(e);return n||c6.test(e)?g6(e.slice(2),n?2:8):l6.test(e)?zh:+e}function N6(e){return e==null?"":I1(e)}function M6(e,t,n){e=N6(e),t=R6(t);var r=t?P1(e):0;return t&&r{const s=(e+(r||"")).toString().includes("%");if(typeof e=="string"?[e,t,n,r]=e.match(/(0?\.?\d{1,3})%?\b/g).map(Number):r!==void 0&&(r=parseFloat(r)),typeof e!="number"||typeof t!="number"||typeof n!="number"||e>255||t>255||n>255)throw new TypeError("Expected three numbers below 256");if(typeof r=="number"){if(!s&&r>=0&&r<=1)r=Math.round(255*r);else if(s&&r>=0&&r<=100)r=Math.round(255*r/100);else throw new TypeError(`Expected alpha value (${r}) as a fraction or percentage`);r=(r|256).toString(16).slice(1)}else r="";return(n|t<<8|e<<16|1<<24).toString(16).slice(1)+r};const wa="a-f\\d",B6=`#?[${wa}]{3}[${wa}]?`,U6=`#?[${wa}]{6}([${wa}]{2})?`,j6=new RegExp(`[^#${wa}]`,"gi"),q6=new RegExp(`^${B6}$|^${U6}$`,"i");var W6=(e,t={})=>{if(typeof e!="string"||j6.test(e)||!q6.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=Number.parseInt(e,16),s=r>>16,o=r>>8&255,a=r&255,i=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[s,o,a,i];if(t.format==="css"){const l=i===1?"":` / ${Number((i*100).toFixed(2))}%`;return`rgb(${s} ${o} ${a}${l})`}return{red:s,green:o,blue:a,alpha:i}},K6=W3,G6=$4,Z6=r6,Y6=V6,J6=H6,R1=W6;const Ku=.75,Gu=.25,Zu=16777215,X6=49979693;var Q6=function(e){return"#"+n5(String(JSON.stringify(e)))};function e5(e){var t=G6(e),n=[];return t.forEach(function(r){var s=K6(r);s&&n.push(R1(Z6(s,"#"),{format:"array"}))}),n}function t5(e){var t=[0,0,0];return e.forEach(function(n){for(var r=0;r<3;r++)t[r]+=n[r]}),[t[0]/e.length,t[1]/e.length,t[2]/e.length]}function n5(e){var t,n=e5(e);n.length>0&&(t=t5(n));var r=1,s=0,o=1;if(e.length>0)for(var a=0;as&&(s=e[a].charCodeAt(0)),o=parseInt(Zu/s),r=(r+e[a].charCodeAt(0)*o*X6)%Zu;var i=(r*e.length%Zu).toString(16);i=Y6(i,6,i);var l=R1(i,{format:"array"});return t?J6(Gu*l[0]+Ku*t[0],Gu*l[1]+Ku*t[1],Gu*l[2]+Ku*t[2]):i}const r5=Ia(Q6);function s5(e){const t=e.replace(/#/,""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),s=parseInt(t.substr(4,2),16);return[.299*n,.587*r,.114*s].reduce((a,i)=>a+i)/255>.5}function o5(e){return s5(e)?"#000000":"#ffffff"}function a5(e){const t=` ${e.caption} `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(t)}`}function i5(e,t,n){const r=r5(t),s=o5(r),o={width:n.width,height:n.height,textColor:s,backgroundColor:r,caption:e,fontFamily:n.font_family,fontSize:n.font_size,fontWeight:n.font_weight};return a5(o)}const l5={name:"CoverArtwork",props:["artist","album","artwork_url","maxwidth","maxheight"],emits:["click"],data(){return{width:600,height:600,font_family:"sans-serif",font_size:200,font_weight:600,lazy_lifecycle:{error:e=>{e.src=this.dataURI()}}}},computed:{artwork_url_with_size(){return this.maxwidth>0&&this.maxheight>0?M.artwork_url_append_size_params(this.artwork_url,this.maxwidth,this.maxheight):M.artwork_url_append_size_params(this.artwork_url)},alt_text(){return`${this.artist} - ${this.album}`},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""}},methods:{dataURI(){return i5(this.caption,this.alt_text,{width:this.width,height:this.height,font_family:this.font_family,font_size:this.font_size,font_weight:this.font_weight})}}};function u5(e,t,n,r,s,o){const a=Ld("lazy");return k(),$("figure",null,[bt(u("img",{onClick:t[0]||(t[0]=i=>e.$emit("click"))},null,512),[[a,{src:o.artwork_url_with_size,lifecycle:s.lazy_lifecycle}]])])}const Fn=te(l5,[["render",u5]]),{t:Yu,locale:Em}=su.global,L1="GROUP_KEY_NONE";function N1(){return{compareFn:null,groupKeyFn:e=>L1}}function Rn(e,t=!1,n="_"){return{compareFn:t?null:(r,s)=>{const o=r[e]||n,a=s[e]||n;return o.localeCompare(a,Em.value)},groupKeyFn:r=>{const s=(r[e]||n).charAt(0);return s.match(new RegExp("\\p{Letter}","gu"))?s.toUpperCase():s.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"}}}function Sm(e,{direction:t="asc",defaultValue:n=0}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o-a;return t==="asc"?i:i*-1},groupKeyFn:r=>{const s=r[e]||n;return Math.floor(s/10)}}}function kl(e,{direction:t="asc",defaultValue:n="0000"}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o.localeCompare(a,Em.value);return t==="asc"?i:i*-1},groupKeyFn:r=>(r[e]||n).substring(0,4)}}function c5(e,t="0000"){return{compareFn:(n,r)=>{const s=n[e]||t;return(r[e]||t).localeCompare(s,Em.value)},groupKeyFn:n=>{const r=n[e];if(!r)return t;const s=new Date().getTime()-new Date(r).getTime();return s<864e5?Yu("group-by-list.today"):s<6048e5?Yu("group-by-list.last-week"):s<2592e6?Yu("group-by-list.last-month"):r.substring(0,4)}}}class ge{constructor({items:t=[],total:n=0,offset:r=0,limit:s=-1}={}){this.items=t,this.total=n,this.offset=r,this.limit=s,this.count=t.length,this.indexList=[],this.group(N1())}get(){return this.itemsByGroup}isEmpty(){return!this.items||this.items.length<=0}group(t,n=[]){const r=n?this.items.filter(o=>n.every(a=>a(o))):this.items;this.count=r.length;const s=t.compareFn?[...r].sort(t.compareFn):r;this.indexList=[...new Set(s.map(t.groupKeyFn))],this.itemsByGroup=s.reduce((o,a)=>{const i=t.groupKeyFn(a);return o[i]=[...o[i]||[],a],o},{})}[Symbol.iterator](){let t=-1,n=-1;return{next:()=>{if(this.isEmpty())return{done:!0};if(t>=this.indexList.length)return{done:!0};if(t<0&&(++t,n=0,this.indexList[t]!==L1))return{value:{groupKey:this.indexList[t],itemId:this.indexList[t],isItem:!1,item:{}},done:!1};let r=this.indexList[t],s=this.itemsByGroup[r];if(n0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},c=function(f,p){var h=new XMLHttpRequest,_=function(b,w){function C(A){b&&b(A),p&&p(null,A)}function z(){w&&w(h),p&&p(h,null)}var v=f.type||"GET";if(h.open(v,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var A=null;try{A=h.responseText?JSON.parse(h.responseText):""}catch(D){console.error(D)}h.status>=200&&h.status<300?C(A):z()}},v==="GET")h.send(null);else{var S=null;f.postData&&(f.contentType==="image/jpeg"?(S=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(S=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(S)}};return p?(_(),null):a(_,function(){h.abort()})},m=function(f,p,h,_){var b={},w=null;typeof p=="object"?(b=p,w=h):typeof p=="function"&&(w=p);var C=f.type||"GET";return C!=="GET"&&f.postData&&!_?f.postData=i(f.postData,b):f.params=i(f.params,b),c(f,w)},d=function(){};return d.prototype={constructor:t},d.prototype.getGeneric=function(f,p){var h={url:f};return m(h,p)},d.prototype.getMe=function(f,p){var h={url:n+"/me"};return m(h,f,p)},d.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return m(h,f,p)},d.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return m(h,f,p)},d.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return m(h,f,p)},d.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return m(h,f,p)},d.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return m(h,f,p)},d.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(_,p,h)},d.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return m(h,p)},d.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(_,h)},d.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return m(h,f,p)},d.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return m(_,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),m(_,p,h)},d.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return m(_,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return m(_,p,h)},d.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return m(h,p)},d.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(_,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(_,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(b,h,_,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(_,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var w={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(w,_,b)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(w){return typeof w=="string"?{uri:w}:w}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return m(b,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(C){return typeof C=="string"?{uri:C}:C}),w={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return m(w,{},_)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(b,{},_)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(_,{},h)},d.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return m(_,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return m(_,p,h)},d.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,m(_,p,h)},d.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return m(_,p,h)},d.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return m(_,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(b,h,_)},d.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return m(_,p,h)},d.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return m(h,f,p)},d.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return m(h,f,p)},d.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return m(h,f,p)},d.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return m(_,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return m(_,p,h)},d.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(b,h,_)},d.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},d.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},d.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},d.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},d.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},d.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},d.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,m(h,{},p)},d.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return m(h,{},p)},d.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,m(h,{},p)},d.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return m(h,f,p)},d.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return m(p,{},f)},d.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return m(p,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return m(h,f,p)},d.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return m(h,f,p)},d.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return m(b,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(C){C in f&&(_[C]=f[C])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},w=typeof f=="function"?f:{};return m(b,w,p)},d.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return m(b,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return m(_,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return m(_,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return m(_,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return m(b,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return m(b,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return m(b,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return m(b,p,h)},d.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,m(_,p,h)},d.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return m(h,f,p)},d.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return m(_,p,h)},d.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,m(_,p,h)},d.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getAccessToken=function(){return r},d.prototype.setAccessToken=function(f){r=f},d.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)s=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(M1);var d5=M1.exports;const Yn=Ia(d5),m5={name:"ModalDialogTrack",props:["show","track"],emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{play_track(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.track.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.track.album_id}}):this.track.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.track.album_id}}):this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.track.genre},query:{media_kind:this.track.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})},mark_new(){M.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){M.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})}}},f5={key:0,class:"modal is-active"},p5={class:"modal-content fd-modal-card"},h5={class:"card"},_5={class:"card-content"},g5=["textContent"],y5=["textContent"],v5={key:0,class:"buttons"},b5=["textContent"],z5=["textContent"],C5={class:"content is-small"},w5=["textContent"],k5=["textContent"],x5={key:0},E5=["textContent"],S5=["textContent"],$5={key:1},A5=["textContent"],T5=["textContent"],O5={key:2},D5=["textContent"],P5=["textContent"],I5={key:3},F5=["textContent"],R5=["textContent"],L5={key:4},N5=["textContent"],M5=["textContent"],V5=["textContent"],H5=["textContent"],B5=["textContent"],U5=["textContent"],j5=["textContent"],q5=["textContent"],W5=["textContent"],K5={class:"title is-6"},G5=["textContent"],Z5={key:0,class:"has-text-weight-normal"},Y5=["textContent"],J5=["textContent"],X5=["textContent"],Q5={class:"title is-6"},eD=["textContent"],tD=["textContent"],nD=["textContent"],rD=["textContent"],sD=["textContent"],oD=["textContent"],aD=["textContent"],iD=["textContent"],lD={key:5},uD=["textContent"],cD=["textContent"],dD={class:"card-footer"},mD=["textContent"],fD=["textContent"],pD=["textContent"];function hD(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",f5,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",p5,[u("div",h5,[u("div",_5,[u("p",{class:"title is-4",textContent:g(n.track.title)},null,8,g5),u("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,y5),n.track.media_kind==="podcast"?(k(),$("div",v5,[n.track.play_count>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...i)=>o.mark_new&&o.mark_new(...i)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,b5)):H("",!0),n.track.play_count===0?(k(),$("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...i)=>o.mark_played&&o.mark_played(...i)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,z5)):H("",!0)])):H("",!0),u("div",C5,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,w5),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.track.album)},null,8,k5)]),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),$("p",x5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,E5),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.track.album_artist)},null,8,S5)])):H("",!0),n.track.composer?(k(),$("p",$5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,A5),u("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,T5)])):H("",!0),n.track.date_released?(k(),$("p",O5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,D5),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,P5)])):n.track.year>0?(k(),$("p",I5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,F5),u("span",{class:"title is-6",textContent:g(n.track.year)},null,8,R5)])):H("",!0),n.track.genre?(k(),$("p",L5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,N5),u("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.track.genre)},null,8,M5)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,V5),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,H5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,B5),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,U5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,j5),u("span",{class:"title is-6",textContent:g(n.track.path)},null,8,q5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,W5),u("span",K5,[u("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,G5),n.track.data_kind==="spotify"?(k(),$("span",Z5,[rt(" ("),u("a",{onClick:t[6]||(t[6]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.track.spotify-artist"))},null,8,Y5),rt(", "),u("a",{onClick:t[7]||(t[7]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.track.spotify-album"))},null,8,J5),rt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,X5),u("span",Q5,[u("span",{textContent:g(n.track.type)},null,8,eD),n.track.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,tD)):H("",!0),n.track.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.track.channels)}))},null,8,nD)):H("",!0),n.track.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,rD)):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,sD),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,oD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,aD),u("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,iD)]),n.track.comment?(k(),$("p",lD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,uD),u("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,cD)])):H("",!0)])]),u("footer",dD,[u("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,mD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[9]||(t[9]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,fD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[10]||(t[10]=(...i)=>o.play_track&&o.play_track(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,pD)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[11]||(t[11]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const _D=te(m5,[["render",hD]]),gD={name:"ProgressBar",props:["max","value"],computed:{width(){return this.value>0&&this.max>0?parseInt(this.value*100/this.max):0},width_percent(){return`${this.width}%`}}};function yD(e,t,n,r,s,o){return o.width>0?(k(),$("div",{key:0,class:"progress-bar",style:ur({width:o.width_percent})},null,4)):H("",!0)}const vD=te(gD,[["render",yD]]),bD={name:"ListTracks",components:{ModalDialogTrack:_D,ProgressBar:vD},props:["tracks","uris","expression","show_progress","show_icon"],emits:["play-count-changed"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track(e){this.uris?M.player_play_uri(this.uris,!1,this.tracks.items.indexOf(e)):this.expression?M.player_play_expression(this.expression,!1,this.tracks.items.indexOf(e)):M.player_play_uri(e.uri,!1)},open_dialog(e){this.selected_track=e,this.show_details_modal=!0}}},zD={key:0,class:"mt-6 mb-5 py-2"},CD=["id","textContent"],wD=["onClick"],kD={key:0,class:"media-left is-clickable"},xD={class:"media-content is-clickable is-clipped"},ED=["textContent"],SD=["textContent"],$D=["textContent"],AD={class:"media-right"},TD=["onClick"];function OD(e,t,n,r,s,o){const a=E("mdicon"),i=E("progress-bar"),l=E("modal-dialog-track");return k(),$(we,null,[(k(!0),$(we,null,ut(n.tracks,c=>(k(),$(we,{key:c.itemId},[c.isItem?(k(),$("div",{key:1,class:Ee(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:m=>o.play_track(c.item)},[n.show_icon?(k(),$("figure",kD,[y(a,{class:"icon",name:"file-outline",size:"16"})])):H("",!0),u("div",xD,[u("h1",{class:Ee(["title is-6",{"has-text-grey":c.item.media_kind==="podcast"&&c.item.play_count>0}]),textContent:g(c.item.title)},null,10,ED),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.artist)},null,8,SD),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.album)},null,8,$D),n.show_progress?(k(),he(i,{key:0,max:c.item.length_ms,value:c.item.seek_ms},null,8,["max","value"])):H("",!0)]),u("div",AD,[u("a",{onClick:nt(m=>o.open_dialog(c.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,TD)])],10,wD)):(k(),$("div",zD,[u("span",{id:"index_"+c.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(c.groupKey)},null,8,CD)]))],64))),128)),(k(),he(Qr,{to:"#app"},[y(l,{show:s.show_details_modal,track:s.selected_track,onClose:t[0]||(t[0]=c=>s.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=c=>e.$emit("play-count-changed"))},null,8,["show","track"])]))],64)}const Cn=te(bD,[["render",OD]]),DD={name:"ModalDialogAlbum",components:{CoverArtwork:Fn},props:["show","album","media_kind","new_tracks"],emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return M.artwork_url_append_size_params(this.album.artwork_url)},media_kind_resolved(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.album.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.album.id}}):this.$router.push({name:"music-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},mark_played(){M.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:e})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},PD={key:0,class:"modal is-active"},ID={class:"modal-content fd-modal-card"},FD={class:"card"},RD={class:"card-content"},LD={class:"title is-4"},ND=["textContent"],MD={key:0,class:"buttons"},VD=["textContent"],HD=["textContent"],BD={class:"content is-small"},UD={key:0},jD=["textContent"],qD=["textContent"],WD={key:1},KD=["textContent"],GD=["textContent"],ZD={key:2},YD=["textContent"],JD=["textContent"],XD=["textContent"],QD=["textContent"],eP=["textContent"],tP=["textContent"],nP=["textContent"],rP=["textContent"],sP=["textContent"],oP=["textContent"],aP={class:"card-footer"},iP=["textContent"],lP=["textContent"],uP=["textContent"];function cP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",PD,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",ID,[u("div",FD,[u("div",RD,[y(a,{artwork_url:n.album.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),u("p",LD,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,ND)]),o.media_kind_resolved==="podcast"?(k(),$("div",MD,[u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>o.mark_played&&o.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,VD),n.album.data_kind==="url"?(k(),$("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,HD)):H("",!0)])):H("",!0),u("div",BD,[n.album.artist?(k(),$("p",UD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,jD),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artist)},null,8,qD)])):H("",!0),n.album.date_released?(k(),$("p",WD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,KD),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,GD)])):n.album.year>0?(k(),$("p",ZD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,YD),u("span",{class:"title is-6",textContent:g(n.album.year)},null,8,JD)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,XD),u("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,QD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,eP),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,tP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,nP),u("span",{class:"title is-6",textContent:g([e.$t("media.kind."+n.album.media_kind),e.$t("data.kind."+n.album.data_kind)].join(" - "))},null,8,rP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,sP),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,oP)])])]),u("footer",aP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,iP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,lP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,uP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const mu=te(DD,[["render",cP]]),ui={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},dP={name:"PageAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){ui.load(e).then(r=>{n(s=>ui.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ui.load(e).then(s=>{ui.set(r,s),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ge}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!0)}}},mP=["textContent"],fP={class:"subtitle is-6 has-text-link has-text-weight-normal"},pP=["textContent"],hP={class:"buttons fd-is-centered-mobile mt-5"},_P=["textContent"],gP=["textContent"];function yP(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",null,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,mP),u("h2",fP,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,pP)]),u("div",hP,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,_P)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:s.album.track_count}))},null,8,gP),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_details_modal,album:s.album,onClose:t[4]||(t[4]=d=>s.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const vP=te(dP,[["render",yP]]),bP={name:"ListItemTrackSpotify",props:["track","position","context_uri"],methods:{play(){this.track.is_playable&&M.player_play_uri(this.context_uri,!1,this.position)}}},zP={class:"media is-align-items-center"},CP=["textContent"],wP=["textContent"],kP={key:0,class:"subtitle is-7"},xP=["textContent"],EP=["textContent"],SP={class:"media-right"};function $P(e,t,n,r,s,o){return k(),$("div",zP,[u("div",{class:Ee(["media-content is-clipped",{"is-clickable":n.track.is_playable,"fd-is-not-allowed":!n.track.is_playable}]),onClick:t[0]||(t[0]=(...a)=>o.play&&o.play(...a))},[u("h1",{class:Ee(["title is-6",{"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.name)},null,10,CP),u("h2",{class:Ee(["subtitle is-7",{"has-text-grey":n.track.is_playable,"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.artists[0].name)},null,10,wP),n.track.is_playable?H("",!0):(k(),$("h2",kP,[rt(" ("),u("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,xP),n.track.restrictions&&n.track.restrictions.reason?(k(),$("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:n.track.restrictions.reason}))},null,8,EP)):H("",!0),rt(") ")]))],2),u("div",SP,[ot(e.$slots,"actions")])])}const $m=te(bP,[["render",$P]]),AP={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Fn},props:["show","album"],emits:["close"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},TP={key:0,class:"modal is-active"},OP={class:"modal-content fd-modal-card"},DP={class:"card"},PP={class:"card-content"},IP={class:"title is-4"},FP=["textContent"],RP={class:"content is-small"},LP=["textContent"],NP=["textContent"],MP=["textContent"],VP=["textContent"],HP=["textContent"],BP=["textContent"],UP={class:"card-footer"},jP=["textContent"],qP=["textContent"],WP=["textContent"];function KP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",TP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",OP,[u("div",DP,[u("div",PP,[y(a,{artwork_url:o.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:o.artwork_loaded,onError:o.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),u("p",IP,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,FP)]),u("div",RP,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,LP),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artists[0].name)},null,8,NP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,MP),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,VP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,HP),u("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,BP)])])]),u("footer",UP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,jP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,qP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,WP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Ma=te(AP,[["render",KP]]),GP={name:"ModalDialogTrackSpotify",props:["show","track","album"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})}}},ZP={key:0,class:"modal is-active"},YP={class:"modal-content fd-modal-card"},JP={class:"card"},XP={class:"card-content"},QP=["textContent"],eI=["textContent"],tI={class:"content is-small"},nI=["textContent"],rI=["textContent"],sI=["textContent"],oI=["textContent"],aI=["textContent"],iI=["textContent"],lI=["textContent"],uI=["textContent"],cI=["textContent"],dI=["textContent"],mI=["textContent"],fI=["textContent"],pI={class:"card-footer"},hI=["textContent"],_I=["textContent"],gI=["textContent"];function yI(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",ZP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",YP,[u("div",JP,[u("div",XP,[u("p",{class:"title is-4",textContent:g(n.track.name)},null,8,QP),u("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,eI),u("div",tI,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,nI),u("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.album.name)},null,8,rI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,sI),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.album.artists[0].name)},null,8,oI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,aI),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,iI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,lI),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,uI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,cI),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,dI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,mI),u("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,fI)])])]),u("footer",pI,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,hI)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,_I)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,gI)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Am=te(GP,[["render",yI]]),ci={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:Ue.state.spotify.webapi_country})},set(e,t){e.album=t}},vI={name:"PageAlbumSpotify",components:{ContentWithHero:du,CoverArtwork:Fn,ListItemTrackSpotify:$m,ModalDialogAlbumSpotify:Ma,ModalDialogTrackSpotify:Am},beforeRouteEnter(e,t,n){ci.load(e).then(r=>{n(s=>ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ci.load(e).then(s=>{ci.set(r,s),n()})},data(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_details_modal:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,M.player_play_uri(this.album.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},bI=["textContent"],zI={class:"subtitle is-6 has-text-link has-text-weight-normal"},CI=["textContent"],wI={class:"buttons fd-is-centered-mobile mt-5"},kI=["textContent"],xI=["textContent"],EI=["onClick"];function SI(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-track-spotify"),c=E("modal-dialog-album-spotify"),m=E("modal-dialog-track-spotify"),d=E("content-with-hero");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,bI),u("h2",zI,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(s.album.artists[0].name)},null,8,CI)]),u("div",wI,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,kI)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:o.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=f=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:s.album.tracks.total}))},null,8,xI),(k(!0),$(we,null,ut(s.album.tracks.items,(f,p)=>(k(),he(l,{key:f.id,track:f,position:p,context_uri:s.album.uri},{actions:x(()=>[u("a",{onClick:nt(h=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,EI)]),_:2},1032,["track","position","context_uri"]))),128)),y(c,{show:s.show_details_modal,album:s.album,onClose:t[4]||(t[4]=f=>s.show_details_modal=!1)},null,8,["show","album"]),y(m,{show:s.show_track_details_modal,track:s.selected_track,album:s.album,onClose:t[5]||(t[5]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"])]),_:1})])}const $I=te(vI,[["render",SI]]),AI={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app"}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},TI={class:"section"},OI={class:"container"},DI={class:"columns is-centered"},PI={class:"column is-four-fifths"},II={key:0},FI={ref:"options_ref",style:{height:"1px"}},RI={class:"buttons is-centered mt-4 mb-2"},LI={id:"top",class:"level is-clipped"},NI={class:"level-left is-flex-shrink-1"},MI={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},VI={class:"level-right has-text-centered-mobile"},HI={class:"mt-4"};function BI(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",TI,[u("div",OI,[u("div",DI,[u("div",PI,[e.$slots.options?(k(),$("section",II,[u("div",FI,null,512),ot(e.$slots,"options"),u("nav",RI,[y(i,{class:"button is-small is-white",to:o.position},{default:x(()=>[y(a,{class:"icon is-small",name:o.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):H("",!0),u("div",{class:Ee({"is-full-height":e.$slots.options})},[u("nav",LI,[u("div",NI,[u("div",MI,[u("div",null,[ot(e.$slots,"heading-left")])])]),u("div",VI,[ot(e.$slots,"heading-right")])]),ot(e.$slots,"content"),u("div",HI,[ot(e.$slots,"footer")])],2)])])])])}const Qe=te(AI,[["render",BI]]),UI={name:"ControlDropdown",props:["value","options"],emits:["update:value"],data(){return{is_active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{onClickOutside(e){this.is_active=!1},select(e){this.is_active=!1,this.$emit("update:value",e.id)}}},jI={class:"dropdown-trigger"},qI=["textContent"],WI={id:"dropdown",class:"dropdown-menu",role:"menu"},KI={class:"dropdown-content"},GI=["onClick","textContent"];function ZI(e,t,n,r,s,o){const a=E("mdicon"),i=Ld("click-away");return bt((k(),$("div",{class:Ee(["dropdown",{"is-active":s.is_active}])},[u("div",jI,[u("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>s.is_active=!s.is_active)},[u("span",{textContent:g(o.option.name)},null,8,qI),y(a,{class:"icon",name:"chevron-down",size:"16"})])]),u("div",WI,[u("div",KI,[(k(!0),$(we,null,ut(n.options,l=>(k(),$("a",{key:l.id,class:Ee(["dropdown-item",{"is-active":n.value===l.id}]),onClick:c=>o.select(l),textContent:g(l.name)},null,10,GI))),128))])])],2)),[[i,o.onClickOutside]])}const Ss=te(UI,[["render",ZI]]),YI={name:"IndexButtonList",props:["index"]},JI={class:"buttons is-centered mb-4 fd-is-square"};function XI(e,t,n,r,s,o){const a=E("router-link");return k(),$("section",null,[u("nav",JI,[(k(!0),$(we,null,ut(n.index,i=>(k(),he(a,{key:i,class:"button is-small",to:"#index_"+i},{default:x(()=>[rt(g(i),1)]),_:2},1032,["to"]))),128))])])}const Jn=te(YI,[["render",XI]]),QI={name:"ListAlbums",components:{CoverArtwork:Fn,ModalDialog:mm,ModalDialogAlbum:mu},props:["albums","media_kind","hide_group_title"],emits:["play-count-changed","podcast-deleted"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved(){return this.media_kind?this.media_kind:this.selected_album.media_kind}},methods:{open_album(e){this.selected_album=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},open_remove_podcast_dialog(){M.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{M.library_track_playlists(e.items[0].id).then(({data:t})=>{this.rss_playlist_to_remove=t.items.filter(n=>n.type==="rss")[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},eF={key:0,class:"mt-6 mb-5 py-2"},tF=["id","textContent"],nF=["onClick"],rF={key:0,class:"media-left"},sF={class:"media-content is-clickable is-clipped"},oF=["textContent"],aF={class:"subtitle is-7 has-text-grey"},iF=["textContent"],lF=["textContent"],uF={class:"media-right"},cF=["onClick"],dF=["textContent"],mF={class:"is-size-7"},fF=["textContent"],pF=["textContent"];function hF(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon"),l=E("modal-dialog-album"),c=E("modal-dialog");return k(),$(we,null,[(k(!0),$(we,null,ut(n.albums,m=>(k(),$(we,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),$("div",eF,[u("span",{id:"index_"+m.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.groupKey)},null,8,tF)])):m.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:d=>o.open_album(m.item)},[o.is_visible_artwork?(k(),$("div",rF,[y(a,{artwork_url:m.item.artwork_url,artist:m.item.artist,album:m.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):H("",!0),u("div",sF,[u("div",null,[u("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,oF),u("h2",aF,[u("b",{textContent:g(m.item.artist)},null,8,iF)]),m.item.date_released&&m.item.media_kind==="music"?(k(),$("h2",{key:0,class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g(e.$filters.date(m.item.date_released))},null,8,lF)):H("",!0)])]),u("div",uF,[u("a",{onClick:nt(d=>o.open_dialog(m.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,cF)])],8,nF)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(l,{show:s.show_details_modal,album:s.selected_album,media_kind:n.media_kind,onRemovePodcast:t[0]||(t[0]=m=>o.open_remove_podcast_dialog()),onPlayCountChanged:t[1]||(t[1]=m=>o.play_count_changed()),onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","album","media_kind"]),y(c,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[3]||(t[3]=m=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,dF),u("p",mF,[rt(" ("),u("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,fF),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,pF),rt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const dr=te(QI,[["render",hF]]),_F={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},gF={class:"section fd-tabs-section"},yF={class:"container"},vF={class:"columns is-centered"},bF={class:"column is-four-fifths"},zF={class:"tabs is-centered is-small"},CF=["onClick","onKeypress"],wF=["textContent"],kF=["onClick","onKeypress"],xF=["textContent"],EF=["onClick","onKeypress"],SF=["textContent"],$F=["onClick","onKeypress"],AF=["textContent"],TF=["onClick","onKeypress"],OF=["textContent"],DF=["onClick","onKeypress"],PF=["textContent"];function IF(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",gF,[u("div",yF,[u("div",vF,[u("div",bF,[u("div",zF,[u("ul",null,[y(i,{to:{name:"music-history"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"history",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.history"))},null,8,wF)],40,CF)],2)]),_:1}),y(i,{to:{name:"music-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.artists"))},null,8,xF)],40,kF)],2)]),_:1}),y(i,{to:{name:"music-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.albums"))},null,8,SF)],40,EF)],2)]),_:1}),y(i,{to:{name:"music-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.genres"))},null,8,AF)],40,$F)],2)]),_:1}),y(i,{to:{name:"music-composers"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.composers"))},null,8,OF)],40,TF)],2)]),_:1}),o.spotify_enabled?(k(),he(i,{key:0,to:{name:"music-spotify"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"spotify",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.spotify"))},null,8,PF)],40,DF)],2)]),_:1})):H("",!0)])])])])])])}const mr=te(_F,[["render",IF]]),di={load(e){return M.library_albums("music")},set(e,t){e.albums_list=new ge(t.data)}},FF={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListAlbums:dr,TabsMusic:mr},beforeRouteEnter(e,t,n){di.load(e).then(r=>{n(s=>di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;di.load(e).then(s=>{di.set(r,s),n()})},data(){return{albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.albums.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.albums.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})},{id:3,name:this.$t("page.albums.sort-by.recently-released"),options:kl("date_released",{direction:"desc"})}]}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options,[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(n_,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(gd,e)}}}},RF={class:"fd-page-with-tabs"},LF={class:"columns"},NF={class:"column"},MF=["textContent"],VF={class:"field"},HF={class:"control"},BF=["textContent"],UF=["textContent"],jF={key:0,class:"field"},qF={class:"control"},WF=["textContent"],KF=["textContent"],GF={class:"column"},ZF=["textContent"],YF=["textContent"],JF=["textContent"];function XF(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-albums"),m=E("content-with-heading");return k(),$("div",RF,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.albums.indexList},null,8,["index"]),u("div",LF,[u("div",NF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,MF),u("div",VF,[u("div",HF,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,BF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,UF)]),o.spotify_enabled?(k(),$("div",jF,[u("div",qF,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,WF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,KF)])):H("",!0)]),u("div",GF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort-by.title"))},null,8,ZF),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,YF),u("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:o.albums.count}))},null,8,JF)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{albums:o.albums},null,8,["albums"])]),_:1})])}const QF=te(FF,[["render",XF]]),eR={name:"ModalDialogArtist",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.artist.id}})}}},tR={key:0,class:"modal is-active"},nR={class:"modal-content fd-modal-card"},rR={class:"card"},sR={class:"card-content"},oR={class:"title is-4"},aR=["textContent"],iR={class:"content is-small"},lR=["textContent"],uR=["textContent"],cR=["textContent"],dR=["textContent"],mR=["textContent"],fR=["textContent"],pR=["textContent"],hR=["textContent"],_R={class:"card-footer"},gR=["textContent"],yR=["textContent"],vR=["textContent"];function bR(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",tR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",nR,[u("div",rR,[u("div",sR,[u("p",oR,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,aR)]),u("div",iR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,lR),u("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,uR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,cR),u("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,dR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,mR),u("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,fR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,pR),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,hR)])])]),u("footer",_R,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,gR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,yR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,vR)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const fu=te(eR,[["render",bR]]),mi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new ge(t[1].data)}},zR={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:Ss,ListAlbums:dr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){mi.load(e).then(r=>{n(s=>mi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;mi.load(e).then(s=>{mi.set(r,s),n()})},data(){return{artist:{},albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artist.sort-by.release-date"),options:kl("date_released",{direction:"asc"})}],show_details_modal:!1}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(e_,e)}}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!0)}}},CR={class:"columns"},wR={class:"column"},kR=["textContent"],xR=["textContent"],ER={class:"buttons is-centered"},SR=["textContent"],$R={class:"heading has-text-centered-mobile"},AR=["textContent"],TR=u("span",null," | ",-1),OR=["textContent"];function DR(e,t,n,r,s,o){const a=E("control-dropdown"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-artist"),m=E("content-with-heading");return k(),$("div",null,[y(m,null,{options:x(()=>[u("div",CR,[u("div",wR,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,kR),y(a,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,xR)]),"heading-right":x(()=>[u("div",ER,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=d=>s.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,SR)])])]),content:x(()=>[u("p",$R,[u("span",{textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,AR),TR,u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,OR)]),y(l,{albums:o.albums,hide_group_title:!0},null,8,["albums"]),y(c,{show:s.show_details_modal,artist:s.artist,onClose:t[4]||(t[4]=d=>s.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const PR=te(zR,[["render",DR]]),IR={name:"ListItemAlbumSpotify",props:["album"]},FR={class:"media is-align-items-center"},RR={key:0,class:"media-left is-clickable"},LR={class:"media-content is-clickable is-clipped"},NR=["textContent"],MR={class:"subtitle is-7 has-text-grey"},VR=["textContent"],HR=["textContent"],BR={class:"media-right"};function UR(e,t,n,r,s,o){return k(),$("div",FR,[e.$slots.artwork?(k(),$("div",RR,[ot(e.$slots,"artwork")])):H("",!0),u("div",LR,[u("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,NR),u("h2",MR,[u("b",{textContent:g(n.album.artists[0].name)},null,8,VR)]),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,HR)]),u("div",BR,[ot(e.$slots,"actions")])])}const pu=te(IR,[["render",UR]]),jR={name:"ModalDialogArtistSpotify",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.artist.id}})}}},qR={key:0,class:"modal is-active"},WR={class:"modal-content fd-modal-card"},KR={class:"card"},GR={class:"card-content"},ZR={class:"title is-4"},YR=["textContent"],JR={class:"content is-small"},XR=["textContent"],QR=["textContent"],eL=["textContent"],tL=["textContent"],nL={class:"card-footer"},rL=["textContent"],sL=["textContent"],oL=["textContent"];function aL(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",qR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",WR,[u("div",KR,[u("div",GR,[u("p",ZR,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,YR)]),u("div",JR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,XR),u("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,QR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,eL),u("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,tL)])])]),u("footer",nL,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,rL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,sL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,oL)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const V1=te(jR,[["render",aL]]);function iL(e){return e.scrollHeight}function lL(e){return e.scrollWidth}function uL(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function cL(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const dL=u("div",{class:"loading"},"Loading...",-1),mL=u("div",{class:"no-more"},"No more.",-1),fL=u("div",{class:"no-results"},"No results.",-1),pL=u("div",{class:"error"},"Error.",-1),Tm=wr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=Xt();let s=Xt("loading"),o=Xt(n.isInitial),a=0;function i(){Sa(()=>{var z,v;n.position==="top"?uL((z=n.container)!=null?z:document.documentElement,a):n.position==="left"&&cL((v=n.container)!=null?v:document.documentElement,a)})}function l(z,v){return z===0?o.value?(m(),"no-results"):(c(),"no-more"):z!==void 0&&v!==void 0&&z{var v,S;z.isIntersecting&&(n.position==="top"?a=iL((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(a=lL((S=n.container)!=null?S:document.documentElement)),_(),n.load({loaded:l,noMore:c,noResults:m,error:d},{isFirstLoad:o.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let C;return typeof IntersectionObserver<"u"&&I_(()=>{C&&_(),C=w(),b()},{flush:"post"}),en(()=>n.isInitial,z=>{z&&f()}),en(o,z=>{z||t("update:isInitial",!1)}),(z,v)=>(k(),$("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[vn(s)==="loading"?ot(z.$slots,"loading",Ro(Bs({key:0},{isFirstLoad:vn(o)})),()=>[dL]):vn(s)==="no-more"?ot(z.$slots,"no-more",Ro(Bs({key:1},{retry:p})),()=>[mL]):vn(s)==="no-results"?ot(z.$slots,"no-results",Ro(Bs({key:2},{retry:p})),()=>[fL]):vn(s)==="error"?ot(z.$slots,"error",Ro(Bs({key:3},{retry:p})),()=>[pL]):H("",!0)],512))}}),ad=50,fi={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{limit:ad,offset:0,include_groups:"album,single",market:Ue.state.spotify.webapi_country})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},hL={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,ModalDialogArtistSpotify:V1,VueEternalLoading:Tm},beforeRouteEnter(e,t,n){fi.load(e).then(r=>{n(s=>fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;fi.load(e).then(s=>{fi.set(r,s),n()})},data(){return{albums:[],artist:{},offset:0,selected_album:{},show_album_details_modal:!1,show_details_modal:!1,total:0}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{limit:ad,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,ad)})},append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},play(){this.show_album_details_modal=!1,M.player_play_uri(this.artist.uri,!0)},open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},_L=["textContent"],gL={class:"buttons is-centered"},yL=["textContent"],vL=["textContent"],bL=["onClick"];function zL(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-album-spotify"),c=E("VueEternalLoading"),m=E("modal-dialog-artist-spotify"),d=E("modal-dialog-album-spotify"),f=E("content-with-heading");return k(),$("div",null,[y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,_L)]),"heading-right":x(()=>[u("div",gL,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=p=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...p)=>o.play&&o.play(...p))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,yL)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:s.total}))},null,8,vL),(k(!0),$(we,null,ut(s.albums,p=>(k(),he(l,{key:p.id,album:p,onClick:h=>o.open_album(p)},Oa({actions:x(()=>[u("a",{onClick:nt(h=>o.open_dialog(p),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,bL)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(p),artist:p.artist,album:p.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),s.offset[rt(" . ")]),_:1},8,["load"])):H("",!0),y(m,{show:s.show_details_modal,artist:s.artist,onClose:t[2]||(t[2]=p=>s.show_details_modal=!1)},null,8,["show","artist"]),y(d,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[3]||(t[3]=p=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const CL=te(hL,[["render",zL]]),pi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},wL={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListTracks:Cn,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){pi.load(e).then(r=>{n(s=>pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;pi.load(e).then(s=>{pi.set(r,s),n()})},data(){return{artist:{},groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.artist.sort-by.rating"),options:Sm("rating",{direction:"desc"})}],show_details_modal:!1,tracks_list:new ge}},computed:{selected_groupby_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(t_,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list},track_uris(){return this.tracks_list.items.map(e=>e.uri).join(",")}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){M.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(","),!0)}}},kL={class:"columns"},xL={class:"column"},EL=["textContent"],SL=["textContent"],$L={class:"buttons is-centered"},AL=["textContent"],TL={class:"heading has-text-centered-mobile"},OL=["textContent"],DL=u("span",null," | ",-1),PL=["textContent"];function IL(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-artist"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",kL,[u("div",xL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,EL),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,SL)]),"heading-right":x(()=>[u("div",$L,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,AL)])])]),content:x(()=>[u("p",TL,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,OL),DL,u("span",{textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,PL)]),y(c,{tracks:o.tracks,uris:o.track_uris},null,8,["tracks","uris"]),y(m,{show:s.show_details_modal,artist:s.artist,onClose:t[4]||(t[4]=f=>s.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const FL=te(wL,[["render",IL]]),RL={name:"ListArtists",components:{ModalDialogArtist:fu},props:["artists","hide_group_title"],data(){return{show_details_modal:!1,selected_artist:{}}},methods:{open_artist(e){this.selected_artist=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_artist=e,this.show_details_modal=!0}}},LL={key:0,class:"mt-6 mb-5 py-2"},NL={class:"media-content is-clipped"},ML=["id","textContent"],VL=["onClick"],HL={class:"media-content is-clickable is-clipped"},BL=["textContent"],UL={class:"media-right"},jL=["onClick"];function qL(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-artist");return k(),$(we,null,[(k(!0),$(we,null,ut(n.artists,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",LL,[u("div",NL,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,ML)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_artist(l.item)},[u("div",HL,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,BL)]),u("div",UL,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,jL)])],8,VL)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(i,{artist:s.selected_artist,show:s.show_details_modal,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["artist","show"])]))],64)}const Om=te(RL,[["render",qL]]),hi={load(e){return M.library_artists("music")},set(e,t){e.artists_list=new ge(t.data)}},WL={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListArtists:Om,TabsMusic:mr},beforeRouteEnter(e,t,n){hi.load(e).then(r=>{n(s=>hi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;hi.load(e).then(s=>{hi.set(r,s),n()})},data(){return{artists_list:new ge,groupby_options:[{id:1,name:this.$t("page.artists.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artists.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.artists_list.group(e.options,[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.artists_list},selected_groupby_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(Qh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(gd,e)}}}},KL={class:"fd-page-with-tabs"},GL={class:"columns"},ZL={class:"column"},YL=["textContent"],JL={class:"field"},XL={class:"control"},QL=["textContent"],eN=["textContent"],tN={key:0,class:"field"},nN={class:"control"},rN=["textContent"],sN=["textContent"],oN={class:"column"},aN=["textContent"],iN=["textContent"],lN=["textContent"];function uN(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-artists"),m=E("content-with-heading");return k(),$("div",KL,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"]),u("div",GL,[u("div",ZL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,YL),u("div",JL,[u("div",XL,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,QL)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,eN)]),o.spotify_enabled?(k(),$("div",tN,[u("div",nN,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ir,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,rN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,sN)])):H("",!0)]),u("div",oN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort-by.title"))},null,8,aN),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,iN),u("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:o.artists.count}))},null,8,lN)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{artists:o.artists},null,8,["artists"])]),_:1})])}const cN=te(WL,[["render",uN]]),_i={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},dN={name:"PageAudiobooksAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){_i.load(e).then(r=>{n(s=>_i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;_i.load(e).then(s=>{_i.set(r,s),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ge}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!1)}}},mN=["textContent"],fN={class:"subtitle is-6 has-text-link has-text-weight-normal"},pN=["textContent"],hN={class:"buttons fd-is-centered-mobile mt-5"},_N=["textContent"],gN=["textContent"];function yN(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",null,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,mN),u("h2",fN,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,pN)]),u("div",hN,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,_N)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:s.album.track_count}))},null,8,gN),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_details_modal,album:s.album,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>s.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const vN=te(dN,[["render",yN]]),bN={name:"TabsAudiobooks"},zN={class:"section fd-tabs-section"},CN={class:"container"},wN={class:"columns is-centered"},kN={class:"column is-four-fifths"},xN={class:"tabs is-centered is-small"},EN=["onClick","onKeypress"],SN=["textContent"],$N=["onClick","onKeypress"],AN=["textContent"],TN=["onClick","onKeypress"],ON=["textContent"];function DN(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",zN,[u("div",CN,[u("div",wN,[u("div",kN,[u("div",xN,[u("ul",null,[y(i,{to:{name:"audiobooks-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,SN)],40,EN)],2)]),_:1}),y(i,{to:{name:"audiobooks-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,AN)],40,$N)],2)]),_:1}),y(i,{to:{name:"audiobooks-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,ON)],40,TN)],2)]),_:1})])])])])])])}const Dm=te(bN,[["render",DN]]),gi={load(e){return M.library_albums("audiobook")},set(e,t){e.albums=new ge(t.data),e.albums.group(Rn("name_sort",!0))}},PN={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:Dm,ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:dr},beforeRouteEnter(e,t,n){gi.load(e).then(r=>{n(s=>gi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;gi.load(e).then(s=>{gi.set(r,s),n()})},data(){return{albums:new ge}}},IN={class:"fd-page-with-tabs"},FN=["textContent"],RN=["textContent"];function LN(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-albums"),c=E("content-with-heading");return k(),$("div",IN,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.albums.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,FN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:s.albums.count}))},null,8,RN)]),content:x(()=>[y(l,{albums:s.albums},null,8,["albums"])]),_:1})])}const NN=te(PN,[["render",LN]]),yi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new ge(t[1].data)}},MN={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:dr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){yi.load(e).then(r=>{n(s=>yi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;yi.load(e).then(s=>{yi.set(r,s),n()})},data(){return{artist:{},albums:new ge,show_details_modal:!1}},methods:{play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!1)}}},VN=["textContent"],HN={class:"buttons is-centered"},BN=["textContent"],UN=["textContent"];function jN(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-artist"),c=E("content-with-heading");return k(),$("div",null,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,VN)]),"heading-right":x(()=>[u("div",HN,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,BN)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:s.artist.album_count}))},null,8,UN),y(i,{albums:s.albums},null,8,["albums"]),y(l,{show:s.show_details_modal,artist:s.artist,onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const qN=te(MN,[["render",jN]]),vi={load(e){return M.library_artists("audiobook")},set(e,t){e.artists_list=new ge(t.data)}},WN={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:Dm,IndexButtonList:Jn,ListArtists:Om},beforeRouteEnter(e,t,n){vi.load(e).then(r=>{n(s=>vi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;vi.load(e).then(s=>{vi.set(r,s),n()})},data(){return{artists_list:new ge}},computed:{artists(){return this.artists_list?(this.artists_list.group(Rn("name_sort",!0)),this.artists_list):[]}}},KN={class:"fd-page-with-tabs"},GN=["textContent"],ZN=["textContent"];function YN(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-artists"),c=E("content-with-heading");return k(),$("div",KN,[y(a),y(c,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,GN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,ZN)]),"heading-right":x(()=>[]),content:x(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const JN=te(WN,[["render",YN]]),XN={name:"ModalDialogGenre",props:["genre","media_kind","show"],emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),M.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},QN={key:0,class:"modal is-active"},eM={class:"modal-content fd-modal-card"},tM={class:"card"},nM={class:"card-content"},rM={class:"title is-4"},sM=["textContent"],oM={class:"content is-small"},aM=["textContent"],iM=["textContent"],lM=["textContent"],uM=["textContent"],cM=["textContent"],dM=["textContent"],mM={class:"card-footer"},fM=["textContent"],pM=["textContent"],hM=["textContent"];function _M(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",QN,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",eM,[u("div",tM,[u("div",nM,[u("p",rM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.genre.name)},null,8,sM)]),u("div",oM,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,aM),u("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,iM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,lM),u("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,uM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,cM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,dM)])])]),u("footer",mM,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,fM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,pM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,hM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Pm=te(XN,[["render",_M]]),gM={name:"ListGenres",components:{ModalDialogGenre:Pm},props:["genres","hide_group_title","media_kind"],data(){return{show_details_modal:!1,selected_genre:{}}},methods:{open_genre(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_genre=e,this.show_details_modal=!0}}},yM={key:0,class:"mt-6 mb-5 py-2"},vM={class:"media-content is-clipped"},bM=["id","textContent"],zM=["onClick"],CM={class:"media-content is-clickable is-clipped"},wM=["textContent"],kM={class:"media-right"},xM=["onClick"];function EM(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-genre");return k(),$(we,null,[(k(!0),$(we,null,ut(n.genres,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",yM,[u("div",vM,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,bM)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_genre(l.item)},[u("div",CM,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,wM)]),u("div",kM,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,xM)])],8,zM)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,genre:s.selected_genre,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","genre","media_kind"])]))],64)}const H1=te(gM,[["render",EM]]),bi={load(e){return M.library_genres("audiobook")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},SM={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:H1,TabsAudiobooks:Dm},beforeRouteEnter(e,t,n){bi.load(e).then(r=>{n(s=>bi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;bi.load(e).then(s=>{bi.set(r,s),n()})},data(){return{genres:new ge}}},$M={class:"fd-page-with-tabs"},AM=["textContent"],TM=["textContent"];function OM(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",$M,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,AM),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,TM)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const DM=te(SM,[["render",OM]]),PM={name:"ModalDialogComposer",props:["show","composer"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(`composer is "${this.composer.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(`composer is "${this.composer.name}" and media_kind is music`)},open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})}}},IM={key:0,class:"modal is-active"},FM={class:"modal-content fd-modal-card"},RM={class:"card"},LM={class:"card-content"},NM={class:"title is-4"},MM=["textContent"],VM=["textContent"],HM=["textContent"],BM=["textContent"],UM=["textContent"],jM=["textContent"],qM=["textContent"],WM={class:"card-footer"},KM=["textContent"],GM=["textContent"],ZM=["textContent"];function YM(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",IM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",FM,[u("div",RM,[u("div",LM,[u("p",NM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.name)},null,8,MM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,VM),u("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.album_count)},null,8,HM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,BM),u("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...i)=>o.open_tracks&&o.open_tracks(...i)),textContent:g(n.composer.track_count)},null,8,UM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,jM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,qM)])]),u("footer",WM,[u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,KM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,GM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,ZM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Im=te(PM,[["render",YM]]),zi={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums_list=new ge(t[1].data.albums)}},JM={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:dr,ModalDialogComposer:Im},beforeRouteEnter(e,t,n){zi.load(e).then(r=>{n(s=>zi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;zi.load(e).then(s=>{zi.set(r,s),n()})},data(){return{albums_list:new ge,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){M.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},XM=["textContent"],QM={class:"buttons is-centered"},e7=["textContent"],t7={class:"heading has-text-centered-mobile"},n7=["textContent"],r7=u("span",null," | ",-1),s7=["textContent"];function o7(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-composer"),c=E("content-with-heading");return k(),$("div",null,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,XM)]),"heading-right":x(()=>[u("div",QM,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,e7)])])]),content:x(()=>[u("p",t7,[u("span",{textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,n7),r7,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>o.open_tracks&&o.open_tracks(...m)),textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,s7)]),y(i,{albums:s.albums_list,hide_group_title:!0},null,8,["albums"]),y(l,{show:s.show_details_modal,composer:s.composer,onClose:t[3]||(t[3]=m=>s.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const a7=te(JM,[["render",o7]]),Ci={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},i7={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListTracks:Cn,ModalDialogComposer:Im},beforeRouteEnter(e,t,n){Ci.load(e).then(r=>{n(s=>Ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ci.load(e).then(s=>{Ci.set(r,s),n()})},data(){return{composer:{},groupby_options:[{id:1,name:this.$t("page.composer.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.composer.sort-by.rating"),options:Sm("rating",{direction:"desc"})}],show_details_modal:!1,tracks_list:new ge}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_groupby_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(Jh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){M.player_play_expression(this.expression,!0)}}},l7={class:"columns"},u7={class:"column"},c7=["textContent"],d7=["textContent"],m7={class:"buttons is-centered"},f7=["textContent"],p7={class:"heading has-text-centered-mobile"},h7=["textContent"],_7=u("span",null," | ",-1),g7=["textContent"];function y7(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-composer"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",l7,[u("div",u7,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,c7),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,d7)]),"heading-right":x(()=>[u("div",m7,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,f7)])])]),content:x(()=>[u("p",p7,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_albums&&o.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,h7),_7,u("span",{textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,g7)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_details_modal,composer:s.composer,onClose:t[4]||(t[4]=f=>s.show_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const v7=te(i7,[["render",y7]]),b7={name:"ListComposers",components:{ModalDialogComposer:Im},props:["composers","media_kind","hide_group_title"],data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(e){this.selected_composer=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_composer=e,this.show_details_modal=!0}}},z7={key:0,class:"mt-6 mb-5 py-2"},C7={class:"media-content is-clipped"},w7=["id","textContent"],k7=["onClick"],x7={class:"media-content is-clickable is-clipped"},E7=["textContent"],S7={class:"media-right"},$7=["onClick"];function A7(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-composer");return k(),$(we,null,[(k(!0),$(we,null,ut(n.composers,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",z7,[u("div",C7,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,w7)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_composer(l.item)},[u("div",x7,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,E7)]),u("div",S7,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,$7)])],8,k7)):H("",!0)],64))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,composer:s.selected_composer,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const B1=te(b7,[["render",A7]]),wi={load(e){return M.library_composers("music")},set(e,t){e.composers=new ge(t.data),e.composers.group(Rn("name_sort"))}},T7={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListComposers:B1,TabsMusic:mr},beforeRouteEnter(e,t,n){wi.load(e).then(r=>{n(s=>wi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.composers.isEmpty()){n();return}const r=this;wi.load(e).then(s=>{wi.set(r,s),n()})},data(){return{composers:new ge}}},O7={class:"fd-page-with-tabs"},D7=["textContent"],P7=["textContent"];function I7(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-composers"),c=E("content-with-heading");return k(),$("div",O7,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.composers.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,D7),u("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:s.composers.total}))},null,8,P7)]),content:x(()=>[y(l,{composers:s.composers},null,8,["composers"])]),_:1})])}const F7=te(T7,[["render",I7]]),R7={name:"ModalDialogDirectory",props:["show","directory"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression(`path starts with "${this.directory}" order by path asc`,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(`path starts with "${this.directory}" order by path asc`)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(`path starts with "${this.directory}" order by path asc`)}}},L7={key:0,class:"modal is-active"},N7={class:"modal-content fd-modal-card"},M7={class:"card"},V7={class:"card-content"},H7=["textContent"],B7={class:"card-footer"},U7=["textContent"],j7=["textContent"],q7=["textContent"];function W7(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",L7,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",N7,[u("div",M7,[u("div",V7,[u("p",{class:"title is-4",textContent:g(n.directory)},null,8,H7)]),u("footer",B7,[u("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,U7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,j7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,q7)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const U1=te(R7,[["render",W7]]),K7={name:"ListDirectories",components:{ModalDialogDirectory:U1},props:["directories"],data(){return{show_details_modal:!1,selected_directory:""}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory(){this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_directory=e.path,this.show_details_modal=!0}}},G7={class:"media-left is-clickable"},Z7=u("div",{class:"media-content is-clickable is-clipped"},[u("h1",{class:"title is-6"},"..")],-1),Y7={class:"media-right"},J7=["onClick"],X7={class:"media-left is-clickable"},Q7={class:"media-content is-clickable is-clipped"},e9=["textContent"],t9=["textContent"],n9={class:"media-right"},r9=["onClick"];function s9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-directory");return k(),$(we,null,[e.$route.query.directory?(k(),$("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>o.open_parent_directory())},[u("figure",G7,[y(a,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),Z7,u("div",Y7,[ot(e.$slots,"actions")])])):H("",!0),(k(!0),$(we,null,ut(n.directories,l=>(k(),$("div",{key:l.path,class:"media is-align-items-center",onClick:c=>o.open_directory(l)},[u("figure",X7,[y(a,{class:"icon",name:"folder",size:"16"})]),u("div",Q7,[u("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,e9),u("h2",{class:"subtitle is-7 has-text-grey-light",textContent:g(l.path)},null,8,t9)]),u("div",n9,[u("a",{onClick:nt(c=>o.open_dialog(l),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,r9)])],8,J7))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,directory:s.selected_directory,onClose:t[1]||(t[1]=l=>s.show_details_modal=!1)},null,8,["show","directory"])]))],64)}const o9=te(K7,[["render",s9]]),a9={name:"ModalDialogPlaylist",props:["show","playlist","uris"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},i9={key:0,class:"modal is-active"},l9={class:"modal-content fd-modal-card"},u9={class:"card"},c9={class:"card-content"},d9={class:"title is-4"},m9=["textContent"],f9={class:"content is-small"},p9=["textContent"],h9=["textContent"],_9=["textContent"],g9=["textContent"],y9={key:0},v9=["textContent"],b9=["textContent"],z9={key:0,class:"card-footer"},C9=["textContent"],w9=["textContent"],k9=["textContent"];function x9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",i9,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",l9,[u("div",u9,[u("div",c9,[u("p",d9,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,m9)]),u("div",f9,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,p9),u("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,h9)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,_9),u("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,g9)]),n.playlist.folder?H("",!0):(k(),$("p",y9,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,v9),u("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,b9)]))])]),n.playlist.folder?H("",!0):(k(),$("footer",z9,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,C9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,w9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,k9)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const j1=te(a9,[["render",x9]]),E9={name:"ListPlaylists",components:{ModalDialogPlaylist:j1},props:["playlists"],data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_playlist=e,this.show_details_modal=!0},icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"}}},S9=["onClick"],$9={class:"media-left is-clickable"},A9={class:"media-content is-clickable is-clipped"},T9=["textContent"],O9={class:"media-right"},D9=["onClick"];function P9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-playlist");return k(),$(we,null,[(k(!0),$(we,null,ut(n.playlists,l=>(k(),$("div",{key:l.itemId,class:"media is-align-items-center",onClick:c=>o.open_playlist(l.item)},[u("figure",$9,[y(a,{class:"icon",name:o.icon_name(l.item),size:"16"},null,8,["name"])]),u("div",A9,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,T9)]),u("div",O9,[u("a",{onClick:nt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,D9)])],8,S9))),128)),(k(),he(Qr,{to:"#app"},[y(i,{show:s.show_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","playlist"])]))],64)}const Fm=te(E9,[["render",P9]]),ki={load(e){return e.query.directory?M.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new ge(t.data.playlists),e.tracks=new ge(t.data.tracks)):(e.dirs=e.$store.state.config.directories.map(n=>({path:n})),e.playlists=new ge,e.tracks=new ge)}},I9={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:o9,ListPlaylists:Fm,ListTracks:Cn,ModalDialogDirectory:U1},beforeRouteEnter(e,t,n){ki.load(e).then(r=>{n(s=>ki.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ki.load(e).then(s=>{ki.set(r,s),n()})},data(){return{dirs:[],playlists:new ge,tracks:new ge,show_details_modal:!1}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return`path starts with "${this.current_directory}" order by path asc`}},methods:{play(){M.player_play_expression(this.play_expression,!1)}}},F9=["textContent"],R9=["textContent"],L9={class:"buttons is-centered"},N9=["textContent"];function M9(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-directories"),l=E("list-playlists"),c=E("list-tracks"),m=E("modal-dialog-directory"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,F9),u("p",{class:"title is-7 has-text-grey",textContent:g(o.current_directory)},null,8,R9)]),"heading-right":x(()=>[u("div",L9,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.files.play"))},null,8,N9)])])]),content:x(()=>[y(i,{directories:s.dirs},null,8,["directories"]),y(l,{playlists:s.playlists},null,8,["playlists"]),y(c,{tracks:s.tracks,expression:o.play_expression,show_icon:!0},null,8,["tracks","expression"]),y(m,{show:s.show_details_modal,directory:o.current_directory,onClose:t[2]||(t[2]=f=>s.show_details_modal=!1)},null,8,["show","directory"])]),_:1})])}const V9=te(I9,[["render",M9]]),xi={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.albums_list=new ge(t[1].data.albums),e.albums_list.group(Rn("name_sort",!0))}},H9={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:dr,ModalDialogGenre:Pm},beforeRouteEnter(e,t,n){xi.load(e).then(r=>{n(s=>xi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;xi.load(e).then(s=>{xi.set(r,s),n()})},data(){return{albums_list:new ge,genre:{},media_kind:this.$route.query.media_kind,show_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},B9=["textContent"],U9={class:"buttons is-centered"},j9=["textContent"],q9={class:"heading has-text-centered-mobile"},W9=["textContent"],K9=u("span",null," | ",-1),G9=["textContent"];function Z9(e,t,n,r,s,o){const a=E("index-button-list"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-genre"),m=E("content-with-heading");return k(),$("div",null,[y(m,null,{options:x(()=>[y(a,{index:s.albums_list.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,B9)]),"heading-right":x(()=>[u("div",U9,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>s.show_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,j9)])])]),content:x(()=>[u("p",q9,[u("span",{textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,W9),K9,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,G9)]),y(l,{albums:s.albums_list},null,8,["albums"]),y(c,{genre:s.genre,media_kind:s.media_kind,show:s.show_details_modal,onClose:t[3]||(t[3]=d=>s.show_details_modal=!1)},null,8,["genre","media_kind","show"])]),_:1})])}const Y9=te(H9,[["render",Z9]]),Ei={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},J9={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ss,IndexButtonList:Jn,ListTracks:Cn,ModalDialogGenre:Pm},beforeRouteEnter(e,t,n){Ei.load(e).then(r=>{n(s=>Ei.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.tracks_list.isEmpty()){n();return}const r=this;Ei.load(e).then(s=>{Ei.set(r,s),n()})},data(){return{genre:{},groupby_options:[{id:1,name:this.$t("page.genre.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.genre.sort-by.rating"),options:Sm("rating",{direction:"desc"})}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new ge}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_groupby_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(Xh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(this.expression,!0)}}},X9={class:"columns"},Q9={class:"column"},eV=["textContent"],tV=["textContent"],nV={class:"buttons is-centered"},rV=["textContent"],sV={class:"heading has-text-centered-mobile"},oV=["textContent"],aV=u("span",null," | ",-1),iV=["textContent"];function lV(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-genre"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",X9,[u("div",Q9,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort-by.title"))},null,8,eV),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,tV)]),"heading-right":x(()=>[u("div",nV,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,rV)])])]),content:x(()=>[u("p",sV,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_genre&&o.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,oV),aV,u("span",{textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,iV)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_details_modal,genre:s.genre,media_kind:s.media_kind,onClose:t[4]||(t[4]=f=>s.show_details_modal=!1)},null,8,["show","genre","media_kind"])]),_:1})])}const uV=te(J9,[["render",lV]]),Si={load(e){return M.library_genres("music")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},cV={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:H1,TabsMusic:mr},beforeRouteEnter(e,t,n){Si.load(e).then(r=>{n(s=>Si.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Si.load(e).then(s=>{Si.set(r,s),n()})},data(){return{genres:new ge}}},dV={class:"fd-page-with-tabs"},mV=["textContent"],fV=["textContent"];function pV(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",dV,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,mV),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,fV)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const hV=te(cV,[["render",pV]]),$i={load(e){return Promise.all([M.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3}),M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set(e,t){e.recently_added=new ge(t[0].data.albums),e.recently_played=new ge(t[1].data.tracks)}},_V={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:dr,ListTracks:Cn,TabsMusic:mr},beforeRouteEnter(e,t,n){$i.load(e).then(r=>{n(s=>$i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;$i.load(e).then(s=>{$i.set(r,s),n()})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{}}}},gV={class:"fd-page-with-tabs"},yV=["textContent"],vV={class:"level"},bV={class:"level-item"},zV=["textContent"],CV={class:"level"},wV={class:"level-item"};function kV(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("router-link"),c=E("content-with-heading"),m=E("list-tracks");return k(),$("div",gV,[y(a),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,yV)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),footer:x(()=>[u("nav",vV,[u("p",bV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:x(()=>[rt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,zV)]),content:x(()=>[y(m,{tracks:s.recently_played},null,8,["tracks"])]),footer:x(()=>[u("nav",CV,[u("p",wV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:x(()=>[rt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const xV=te(_V,[["render",kV]]),EV={name:"ListItemPlaylistSpotify",props:["playlist"],methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},SV={class:"media is-align-items-center"},$V=["textContent"],AV=["textContent"],TV={class:"media-right"};function OV(e,t,n,r,s,o){return k(),$("div",SV,[u("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>o.open_playlist&&o.open_playlist(...a))},[u("h1",{class:"title is-6",textContent:g(n.playlist.name)},null,8,$V),u("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,AV)]),u("div",TV,[ot(e.$slots,"actions")])])}const Rm=te(EV,[["render",OV]]),DV={name:"ModalDialogPlaylistSpotify",props:["show","playlist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},PV={key:0,class:"modal is-active"},IV={class:"modal-content fd-modal-card"},FV={class:"card"},RV={class:"card-content"},LV={class:"title is-4"},NV=["textContent"],MV={class:"content is-small"},VV=["textContent"],HV=["textContent"],BV=["textContent"],UV=["textContent"],jV=["textContent"],qV=["textContent"],WV={class:"card-footer"},KV=["textContent"],GV=["textContent"],ZV=["textContent"];function YV(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",PV,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",IV,[u("div",FV,[u("div",RV,[u("p",LV,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,NV)]),u("div",MV,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,VV),u("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,HV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,BV),u("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,UV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,jV),u("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,qV)])])]),u("footer",WV,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,KV)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,GV)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,ZV)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const hu=te(DV,[["render",YV]]),Ai={load(e){if(Ue.state.spotify_new_releases.length>0&&Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50}),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})])},set(e,t){t&&(Ue.commit(pd,t[0].albums.items),Ue.commit(hd,t[1].playlists.items))}},JV={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ListItemPlaylistSpotify:Rm,ModalDialogAlbumSpotify:Ma,ModalDialogPlaylistSpotify:hu,TabsMusic:mr},beforeRouteEnter(e,t,n){Ai.load(e).then(r=>{n(s=>Ai.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ai.load(e).then(s=>{Ai.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},XV={class:"fd-page-with-tabs"},QV=["textContent"],eH=["onClick"],tH={class:"level"},nH={class:"level-item"},rH=["textContent"],sH=["onClick"],oH={class:"level"},aH={class:"level-item"};function iH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("router-link"),f=E("content-with-heading"),p=E("list-item-playlist-spotify"),h=E("modal-dialog-playlist-spotify");return k(),$("div",XV,[y(a),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,QV)]),content:x(()=>[(k(!0),$(we,null,ut(o.new_releases,_=>(k(),he(c,{key:_.id,album:_,onClick:b=>o.open_album(_)},Oa({actions:x(()=>[u("a",{onClick:nt(b=>o.open_album_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,eH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(_),artist:_.artist,album:_.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=_=>s.show_album_details_modal=!1)},null,8,["show","album"])]),footer:x(()=>[u("nav",tH,[u("p",nH,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:x(()=>[rt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,rH)]),content:x(()=>[(k(!0),$(we,null,ut(o.featured_playlists,_=>(k(),he(p,{key:_.id,playlist:_},{actions:x(()=>[u("a",{onClick:nt(b=>o.open_playlist_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,sH)]),_:2},1032,["playlist"]))),128)),y(h,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[1]||(t[1]=_=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),footer:x(()=>[u("nav",oH,[u("p",aH,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:x(()=>[rt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const lH=te(JV,[["render",iH]]),Ti={load(e){if(Ue.state.spotify_new_releases.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(pd,t.albums.items)}},uH={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,TabsMusic:mr},beforeRouteEnter(e,t,n){Ti.load(e).then(r=>{n(s=>Ti.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ti.load(e).then(s=>{Ti.set(r,s),n()})},data(){return{show_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},cH={class:"fd-page-with-tabs"},dH=["textContent"],mH=["onClick"];function fH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-heading");return k(),$("div",cH,[y(a),y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,dH)]),content:x(()=>[(k(!0),$(we,null,ut(o.new_releases,f=>(k(),he(c,{key:f.id,album:f,onClick:p=>o.open_album(f)},Oa({actions:x(()=>[u("a",{onClick:nt(p=>o.open_album_dialog(f),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,mH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(f),artist:f.artist,album:f.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=f=>s.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const pH=te(uH,[["render",fH]]),Oi={load(e){if(Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;t.setAccessToken(Ue.state.spotify.webapi_token),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(hd,t.playlists.items)}},hH={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:Rm,ModalDialogPlaylistSpotify:hu,TabsMusic:mr},beforeRouteEnter(e,t,n){Oi.load(e).then(r=>{n(s=>Oi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Oi.load(e).then(s=>{Oi.set(r,s),n()})},data(){return{selected_playlist:{},show_details_modal:!1}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog(e){this.selected_playlist=e,this.show_details_modal=!0}}},_H={class:"fd-page-with-tabs"},gH=["textContent"],yH=["onClick"];function vH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("mdicon"),l=E("list-item-playlist-spotify"),c=E("modal-dialog-playlist-spotify"),m=E("content-with-heading");return k(),$("div",_H,[y(a),y(m,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,gH)]),content:x(()=>[(k(!0),$(we,null,ut(o.featured_playlists,d=>(k(),he(l,{key:d.id,playlist:d},{actions:x(()=>[u("a",{onClick:nt(f=>o.open_playlist_dialog(d),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,yH)]),_:2},1032,["playlist"]))),128)),y(c,{show:s.show_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=d=>s.show_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const bH=te(hH,[["render",vH]]),Di={load(e){const t=Ue.getters.settings_option_recently_added_limit;return M.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new ge(t.data.albums),e.recently_added.group(c5("time_added",{direction:"desc"}))}},zH={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,TabsMusic:mr,ListAlbums:dr},beforeRouteEnter(e,t,n){Di.load(e).then(r=>{n(s=>Di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.recently_added.isEmpty()){n();return}const r=this;Di.load(e).then(s=>{Di.set(r,s),n()})},data(){return{recently_added:new ge}}},CH={class:"fd-page-with-tabs"},wH=["textContent"];function kH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("content-with-heading");return k(),$("div",CH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,wH)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),_:1})])}const xH=te(zH,[["render",kH]]),Pi={load(e){return M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(e,t){e.recently_played=new ge(t.data.tracks)}},EH={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,TabsMusic:mr,ListTracks:Cn},beforeRouteEnter(e,t,n){Pi.load(e).then(r=>{n(s=>Pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Pi.load(e).then(s=>{Pi.set(r,s),n()})},data(){return{recently_played:{}}}},SH={class:"fd-page-with-tabs"},$H=["textContent"];function AH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-tracks"),l=E("content-with-heading");return k(),$("div",SH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,$H)]),content:x(()=>[y(i,{tracks:s.recently_played},null,8,["tracks"])]),_:1})])}const TH=te(EH,[["render",AH]]),OH={name:"LyricsPane",data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.player.state==="play"},verse_index(){if(this.lyrics.length&&this.lyrics[0].time){const e=this.player.item_progress_ms/1e3,t=this.lyrics,n=this.player.item_id!==this.lastItemId,r=this.lastIndex>=0&&this.lastIndexe;if((n||r)&&this.reset_scrolling(),this.lastIndexe||this.lastIndex===t.length-1)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let s=0,o=t.length-1,a;for(;s<=o;){a=s+o>>1;const i=t[a],l=t[a+1];if(i.time<=e&&((l==null?void 0:l.time)>e||!l))return a;i.time{const o=n.exec(r);if(o&&o[4]){const a={text:o[4],time:o[2]*60+o[3]*1};t.push(a)}}),t.forEach((r,s,o)=>{const i=(s{const m=c.length*i;return l+=m,{duration:m,delay:l,text:c}})})}return t},player(){return this.$store.state.player}},watch:{verse_index(){this.autoScrolling&&this.scroll_to_verse(),this.lastIndex=this.verse_index}},methods:{reset_scrolling(){this.player.item_id!=this.lastItemId&&this.$refs.lyrics&&this.$refs.lyrics.scrollTo(0,0),this.lastItemId=this.player.item_id,this.lastIndex=-1},start_scrolling(e){(e.screenX||e.screenX!=0||e.screenY||e.screenY!=0)&&(this.autoScrolling=!1,this.scrollingTimer&&clearTimeout(this.scrollingTimer),this.scrollingTimer=setTimeout(this.autoScrolling=!0,2e3))},scroll_to_verse(){const e=this.$refs.lyrics;if(this.verse_index===-1){e.scrollTo(0,0);return}const t=e.children[this.verse_index];e.scrollBy({top:t.offsetTop-(e.offsetHeight>>1)+(t.offsetHeight>>1)-e.scrollTop,left:0,behavior:"smooth"})}}},DH=["textContent"],PH={key:1};function IH(e,t,n,r,s,o){return k(),$("div",{ref:"lyrics",class:"lyrics",onTouchstart:t[0]||(t[0]=a=>s.autoScrolling=!1),onTouchend:t[1]||(t[1]=a=>s.autoScrolling=!0),onScrollPassive:t[2]||(t[2]=(...a)=>o.start_scrolling&&o.start_scrolling(...a)),onWheelPassive:t[3]||(t[3]=(...a)=>o.start_scrolling&&o.start_scrolling(...a))},[(k(!0),$(we,null,ut(o.lyrics,(a,i)=>(k(),$(we,{key:i},[i===o.verse_index?(k(),$("div",{key:0,class:Ee({"is-highlighted":o.is_playing})},[(k(!0),$(we,null,ut(a.words,l=>(k(),$("span",{key:l,class:"has-text-weight-bold is-size-5"},[u("span",{style:ur({"animation-duration":`${l.delay}s`}),textContent:g(l.text)},null,12,DH)]))),128))],2)):(k(),$("div",PH,g(a.text),1))],64))),128))],544)}const FH=te(OH,[["render",IH],["__scopeId","data-v-4fcdc21f"]]),RH={name:"ModalDialogQueueItem",props:["show","item"],emits:["close"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{remove(){this.$emit("close"),M.queue_remove(this.item.id)},play(){this.$emit("close"),M.player_play({item_id:this.item.id})},open_album(){this.item.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.album_id}}):this.item.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.album_id}}):this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})}}},LH={key:0,class:"modal is-active"},NH={class:"modal-content fd-modal-card"},MH={class:"card"},VH={class:"card-content"},HH=["textContent"],BH=["textContent"],UH={class:"content is-small"},jH=["textContent"],qH=["textContent"],WH=["textContent"],KH={key:0},GH=["textContent"],ZH=["textContent"],YH=["textContent"],JH={key:1},XH=["textContent"],QH=["textContent"],eB={key:2},tB=["textContent"],nB=["textContent"],rB={key:3},sB=["textContent"],oB=["textContent"],aB=["textContent"],iB=["textContent"],lB=["textContent"],uB=["textContent"],cB=["textContent"],dB=["textContent"],mB=["textContent"],fB={class:"title is-6"},pB=["textContent"],hB={key:0,class:"has-text-weight-normal"},_B=["textContent"],gB=["textContent"],yB=["textContent"],vB={class:"title is-6"},bB=["textContent"],zB=["textContent"],CB=["textContent"],wB=["textContent"],kB={class:"card-footer"},xB=["textContent"],EB=["textContent"];function SB(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",LH,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",NH,[u("div",MH,[u("div",VH,[u("p",{class:"title is-4",textContent:g(n.item.title)},null,8,HH),u("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,BH),u("div",UH,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,jH),n.item.album_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.item.album)},null,8,qH)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album)},null,8,WH))]),n.item.album_artist?(k(),$("p",KH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,GH),n.item.album_artist_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_album_artist&&o.open_album_artist(...i)),textContent:g(n.item.album_artist)},null,8,ZH)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album_artist)},null,8,YH))])):H("",!0),n.item.composer?(k(),$("p",JH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,XH),u("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,QH)])):H("",!0),n.item.year>0?(k(),$("p",eB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,tB),u("span",{class:"title is-6",textContent:g(n.item.year)},null,8,nB)])):H("",!0),n.item.genre?(k(),$("p",rB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,sB),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.item.genre)},null,8,oB)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,aB),u("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,iB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,lB),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,uB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,cB),u("span",{class:"title is-6",textContent:g(n.item.path)},null,8,dB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,mB),u("span",fB,[u("span",{textContent:g([e.$t("media.kind."+n.item.media_kind),e.$t("data.kind."+n.item.data_kind)].join(" - "))},null,8,pB),n.item.data_kind==="spotify"?(k(),$("span",hB,[rt(" ("),u("a",{onClick:t[4]||(t[4]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.queue-item.spotify-artist"))},null,8,_B),rt(", "),u("a",{onClick:t[5]||(t[5]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.queue-item.spotify-album"))},null,8,gB),rt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,yB),u("span",vB,[u("span",{textContent:g(n.item.type)},null,8,bB),n.item.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,zB)):H("",!0),n.item.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,CB)):H("",!0),n.item.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,wB)):H("",!0)])])])]),u("footer",kB,[u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.remove&&o.remove(...i))},[y(a,{class:"icon",name:"delete",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.remove"))},null,8,xB)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.play"))},null,8,EB)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const q1=te(RH,[["render",SB]]),Ir=1e3,$B={name:"PageNowPlaying",components:{ControlSlider:Yd,CoverArtwork:Fn,LyricsPane:FH,ModalDialogQueueItem:q1},data(){return{cursor:Zl,INTERVAL:Ir,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{is_live(){return this.track.length_ms===0},lyrics_visible(){return this.$store.getters.lyrics_pane},player(){return this.$store.state.player},track(){return this.$store.getters.now_playing},track_progress:{get(){return Math.floor(this.player.item_progress_ms/Ir)},set(e){this.player.item_progress_ms=e*Ir}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Ir)},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Ir)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.track.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)?this.track.composer:null},settings_option_show_filepath_now_playing(){return this.$store.getters.settings_option_show_filepath_now_playing},filepath(){return this.settings_option_show_filepath_now_playing?this.track.path:null}},watch:{player(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Ir))}},created(){M.player_status().then(({data:e})=>{this.$store.commit(fd,e),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Ir))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{tick(){this.is_dragged||(this.track_progress+=1)},start_dragging(){this.is_dragged=!0},end_dragging(){this.is_dragged=!1},seek(){this.is_live||M.player_seek_to_pos(this.track_progress*Ir)},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},AB={class:"hero is-full-height"},TB={key:0,class:"hero-body is-flex is-align-items-center"},OB={class:"container has-text-centered",style:{"max-width":"500px"}},DB={class:"is-flex is-justify-content-space-between"},PB=["textContent"],IB=["textContent"],FB=["textContent"],RB=["textContent"],LB=["textContent"],NB=["textContent"],MB=["textContent"],VB={key:1,class:"hero-body is-flex is-align-items-center"},HB={class:"container has-text-centered"},BB=["textContent"],UB=["textContent"];function jB(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("lyrics-pane"),l=E("control-slider"),c=E("modal-dialog-queue-item");return k(),$("div",AB,[o.track.id>0?(k(),$("div",TB,[u("div",OB,[y(a,{artwork_url:o.track.artwork_url,artist:o.track.artist,album:o.track.album,class:Ee(["is-clickable fd-has-shadow fd-cover-big-image",{"is-masked":o.lyrics_visible}]),onClick:t[0]||(t[0]=m=>o.open_dialog(o.track))},null,8,["artwork_url","artist","album","class"]),o.lyrics_visible?(k(),he(i,{key:0})):H("",!0),y(l,{value:o.track_progress,"onUpdate:value":t[1]||(t[1]=m=>o.track_progress=m),class:"mt-5",disabled:o.is_live,max:o.track_progress_max,cursor:s.cursor,onChange:o.seek,onMousedown:o.start_dragging,onMouseup:o.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),u("div",DB,[u("p",{class:"subtitle is-7",textContent:g(o.track_elapsed_time)},null,8,PB),u("p",{class:"subtitle is-7",textContent:g(o.track_total_time)},null,8,IB)]),u("p",{class:"title is-5",textContent:g(o.track.title)},null,8,FB),u("p",{class:"title is-6",textContent:g(o.track.artist)},null,8,RB),o.composer?(k(),$("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(o.composer)},null,8,LB)):H("",!0),o.track.album?(k(),$("p",{key:2,class:"subtitle is-6",textContent:g(o.track.album)},null,8,NB)):H("",!0),o.filepath?(k(),$("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(o.filepath)},null,8,MB)):H("",!0)])])):(k(),$("div",VB,[u("div",HB,[u("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,BB),u("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,UB)])])),y(c,{show:s.show_details_modal,item:s.selected_item,onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","item"])])}const qB=te($B,[["render",jB]]),Ii={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new ge(t[1].data)}},WB={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:Fm},beforeRouteEnter(e,t,n){Ii.load(e).then(r=>{n(s=>Ii.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ii.load(e).then(s=>{Ii.set(r,s),n()})},data(){return{playlist:{},playlists_list:new ge}},computed:{has_playlists(){return Object.keys(this.playlists_list.itemsByGroup).length>0},playlists(){return this.playlists_list.group(N1(),[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]),this.playlists_list},radio_playlists(){return this.$store.state.config.radio_playlists}}},KB=["textContent"],GB=["textContent"];function ZB(e,t,n,r,s,o){const a=E("list-playlists"),i=E("content-with-heading");return k(),$("div",null,[y(i,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.playlist.id===0?e.$t("page.playlists.title"):s.playlist.name)},null,8,KB),u("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:o.playlists.count}))},null,8,GB)]),content:x(()=>[o.has_playlists?(k(),he(a,{key:0,playlists:o.playlists},null,8,["playlists"])):H("",!0)]),_:1})])}const YB=te(WB,[["render",ZB]]),Fi={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new ge(t[1].data)}},JB={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:Cn,ModalDialogPlaylist:j1},beforeRouteEnter(e,t,n){Fi.load(e).then(r=>{n(s=>Fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Fi.load(e).then(s=>{Fi.set(r,s),n()})},data(){return{playlist:{},show_details_modal:!1,tracks:new ge}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join(","):this.playlist.uri}},methods:{play(){M.player_play_uri(this.uris,!0)}}},XB=["textContent"],QB={class:"buttons is-centered"},eU=["textContent"],tU=["textContent"];function nU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("modal-dialog-playlist"),c=E("content-with-heading");return k(),$("div",null,[y(c,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,XB)]),"heading-right":x(()=>[u("div",QB,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.playlist.shuffle"))},null,8,eU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:s.tracks.count}))},null,8,tU),y(i,{tracks:s.tracks,uris:o.uris},null,8,["tracks","uris"]),y(l,{show:s.show_details_modal,playlist:s.playlist,uris:o.uris,onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","playlist","uris"])]),_:1})])}const rU=te(JB,[["render",nU]]),id=50,Ri={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:id,offset:0,market:Ue.state.spotify.webapi_country})])},set(e,t){e.playlist=t[0],e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t[1])}},sU={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListItemTrackSpotify:$m,ModalDialogPlaylistSpotify:hu,ModalDialogTrackSpotify:Am,VueEternalLoading:Tm},beforeRouteEnter(e,t,n){Ri.load(e).then(r=>{n(s=>Ri.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ri.load(e).then(s=>{Ri.set(r,s),n()})},data(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:id,offset:this.offset,market:Ue.state.spotify.webapi_country}).then(n=>{this.append_tracks(n),e(n.items.length,id)})},append_tracks(e){let t=Math.max(-1,...this.tracks.map(n=>n.position).filter(n=>n));e.items.forEach(n=>{const{track:r}=n;r&&(r.is_playable&&(r.position=++t),this.tracks.push(r))}),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.playlist.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},oU=["textContent"],aU={class:"buttons is-centered"},iU=["textContent"],lU=["textContent"],uU=["onClick"];function cU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-item-track-spotify"),l=E("VueEternalLoading"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-playlist-spotify"),d=E("content-with-heading");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,oU)]),"heading-right":x(()=>[u("div",aU,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.playlist.shuffle"))},null,8,iU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.playlist.count",{count:s.playlist.tracks.total}))},null,8,lU),(k(!0),$(we,null,ut(s.tracks,f=>(k(),he(i,{key:f.id,track:f,position:f.position,context_uri:s.playlist.uri},{actions:x(()=>[u("a",{onClick:nt(p=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,uU)]),_:2},1032,["track","position","context_uri"]))),128)),s.offset[rt(" . ")]),_:1},8,["load"])):H("",!0),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.selected_track.album,onClose:t[2]||(t[2]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_playlist_details_modal,playlist:s.playlist,onClose:t[3]||(t[3]=f=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const dU=te(sU,[["render",cU]]),Li={load(e){return Promise.all([M.library_album(e.params.id),M.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data.tracks)}},mU={name:"PagePodcast",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialog:mm,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){Li.load(e).then(r=>{n(s=>Li.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Li.load(e).then(s=>{Li.set(r,s),n()})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new ge}},computed:{new_tracks(){return this.tracks.items.filter(e=>e.play_count===0).length}},methods:{open_remove_podcast_dialog(){M.library_track_playlists(this.tracks.items[0].id).then(({data:e})=>{[this.rss_playlist_to_remove]=e.items.filter(t=>t.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})},play(){M.player_play_uri(this.album.uri,!1)},reload_tracks(){M.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new ge(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},fU=["textContent"],pU=u("h2",{class:"subtitle is-6 has-text-weight-normal"}," ",-1),hU={class:"buttons fd-is-centered-mobile mt-5"},_U=["textContent"],gU=["textContent"],yU=["textContent"],vU={class:"is-size-7"},bU=["textContent"],zU=["textContent"];function CU(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("modal-dialog"),d=E("content-with-hero");return k(),$("div",null,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,fU),pU,u("div",hU,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.podcast.play"))},null,8,_U)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.podcast.track-count",{count:s.album.track_count}))},null,8,gU),y(l,{tracks:s.tracks,show_progress:!0,onPlayCountChanged:o.reload_tracks},null,8,["tracks","onPlayCountChanged"]),y(c,{show:s.show_details_modal,album:s.album,media_kind:"podcast",new_tracks:o.new_tracks,onClose:t[3]||(t[3]=f=>s.show_details_modal=!1),onPlayCountChanged:o.reload_tracks,onRemovePodcast:o.open_remove_podcast_dialog},null,8,["show","album","new_tracks","onPlayCountChanged","onRemovePodcast"]),y(m,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("page.podcast.remove-info-1"))},null,8,yU),u("p",vU,[rt(" ("),u("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,bU),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,zU),rt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const wU=te(mU,[["render",CU]]),kU={name:"ModalDialogAddRss",props:["show"],emits:["close","podcast-added"],data(){return{url:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,M.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})}}},xU={key:0,class:"modal is-active"},EU={class:"modal-content fd-modal-card"},SU={class:"card-content"},$U=["textContent"],AU={class:"field"},TU={class:"control is-expanded has-icons-left"},OU=["placeholder","disabled"],DU=["textContent"],PU={key:0,class:"card-footer"},IU={class:"card-footer-item has-text-dark"},FU=["textContent"],RU={key:1,class:"card-footer is-clipped"},LU=["textContent"],NU=["textContent"];function MU(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",xU,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",EU,[u("form",{class:"card",onSubmit:t[4]||(t[4]=nt((...i)=>o.add_stream&&o.add_stream(...i),["prevent"]))},[u("div",SU,[u("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,$U),u("div",AU,[u("p",TU,[bt(u("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=i=>s.url=i),class:"input is-shadowless",type:"url",pattern:"http[s]?://.*",required:"",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:s.loading},null,8,OU),[[fn,s.url]]),y(a,{class:"icon is-left",name:"rss",size:"16"})]),u("p",{class:"help",textContent:g(e.$t("dialog.add.rss.help"))},null,8,DU)])]),s.loading?(k(),$("footer",PU,[u("a",IU,[y(a,{class:"icon",name:"web",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,FU)])])):(k(),$("footer",RU,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=i=>e.$emit("close"))},[y(a,{class:"icon",name:"cancel",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.cancel"))},null,8,LU)]),u("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[3]||(t[3]=(...i)=>o.add_stream&&o.add_stream(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.add"))},null,8,NU)])]))],32)]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const VU=te(kU,[["render",MU]]),Ni={load(e){return Promise.all([M.library_albums("podcast"),M.library_podcasts_new_episodes()])},set(e,t){e.albums=new ge(t[0].data),e.new_episodes=new ge(t[1].data.tracks)}},HU={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListTracks:Cn,ListAlbums:dr,ModalDialogAddRss:VU},beforeRouteEnter(e,t,n){Ni.load(e).then(r=>{n(s=>Ni.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ni.load(e).then(s=>{Ni.set(r,s),n()})},data(){return{albums:[],new_episodes:{items:[]},show_url_modal:!1}},computed:{rss(){return this.$store.state.rss_count}},methods:{mark_all_played(){this.new_episodes.items.forEach(e=>{M.library_track_update(e.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog(e){this.show_url_modal=!0},reload_new_episodes(){M.library_podcasts_new_episodes().then(({data:e})=>{this.new_episodes=new ge(e.tracks)})},reload_podcasts(){M.library_albums("podcast").then(({data:e})=>{this.albums=new ge(e),this.reload_new_episodes()})},update_rss(){this.$store.commit(yd,"rss"),this.$store.commit(ka,!0)}}},BU=["textContent"],UU={class:"buttons is-centered"},jU=["textContent"],qU=["textContent"],WU=["textContent"],KU={class:"buttons is-centered"},GU=["textContent"],ZU=["textContent"];function YU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("content-with-heading"),c=E("list-albums"),m=E("modal-dialog-add-rss");return k(),$("div",null,[s.new_episodes.items.length>0?(k(),he(l,{key:0},{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.new-episodes"))},null,8,BU)]),"heading-right":x(()=>[u("div",UU,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>o.mark_all_played&&o.mark_all_played(...d))},[y(a,{class:"icon",name:"pencil",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.mark-all-played"))},null,8,jU)])])]),content:x(()=>[y(i,{tracks:s.new_episodes,show_progress:!0,onPlayCountChanged:o.reload_new_episodes},null,8,["tracks","onPlayCountChanged"])]),_:1})):H("",!0),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.title"))},null,8,qU),u("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:s.albums.total}))},null,8,WU)]),"heading-right":x(()=>[u("div",KU,[o.rss.tracks>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>o.update_rss&&o.update_rss(...d))},[y(a,{class:"icon",name:"refresh",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.update"))},null,8,GU)])):H("",!0),u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>o.open_add_podcast_dialog&&o.open_add_podcast_dialog(...d))},[y(a,{class:"icon",name:"rss",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.add"))},null,8,ZU)])])]),content:x(()=>[y(c,{albums:s.albums,onPlayCountChanged:t[3]||(t[3]=d=>o.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>o.reload_podcasts())},null,8,["albums"]),y(m,{show:s.show_url_modal,onClose:t[5]||(t[5]=d=>s.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>o.reload_podcasts())},null,8,["show"])]),_:1})])}const JU=te(HU,[["render",YU]]);var W1={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm