diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index d165f2a2..9a3642c4 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -26,7 +26,7 @@ * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Vs=typeof window<"u";function OT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const it=Object.assign;function qu(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,DT=/\/$/,PT=e=>e.replace(DT,"");function Wu(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=LT(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:s,hash:a}}function IT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Yp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function FT(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])&&qv(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 qv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!RT(e[n],t[n]))return!1;return!0}function RT(e,t){return Gn(e)?Jp(e,t):Gn(t)?Jp(t,e):e===t}function Jp(e,t){return Gn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function LT(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 NT(e){if(!e)if(Vs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PT(e)}const MT=/^[^#]+#/;function VT(e,t){return e.replace(MT,"#")+t}function HT(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 BT(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=HT(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 Xp(e,t){return(history.state?history.state.position-t:-1)+e}const Xc=new Map;function UT(e,t){Xc.set(e,t)}function jT(e){const t=Xc.get(e);return Xc.delete(e),t}let qT=()=>location.protocol+"//"+location.host;function Wv(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),Yp(l,"")}return Yp(n,e)+r+s}function WT(e,t,n,r){let s=[],o=[],a=null;const i=({state:f})=>{const p=Wv(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(it({},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 Qp(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 KT(e){const{history:t,location:n}=window,r={value:Wv(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:qT()+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=it({},t.state,Qp(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=it({},s.value,t.state,{forward:l,scroll:cu()});o(m.current,m,!0);const d=it({},Qp(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 GT(e){e=NT(e);const t=KT(e),n=WT(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=it({location:"",base:e,go:r,createHref:VT.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 ZT(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),GT(e)}function YT(e){return typeof e=="string"||e&&typeof e=="object"}function Kv(e){return typeof e=="string"||typeof e=="symbol"}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Gv=Symbol("");var eh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(eh||(eh={}));function co(e,t){return it(new Error,{type:e,[Gv]:!0},t)}function mr(e,t){return e instanceof Error&&Gv in e&&(t==null||!!(e.type&t))}const th="[^/]+?",JT={sensitive:!1,strict:!1,start:!0,end:!0},XT=/[.+*?^${}()[\]/\\]/g;function QT(e,t){const n=it({},JT,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 tO(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const nO={type:0,value:""},rO=/[a-zA-Z0-9_]/;function sO(e){if(!e)return[[]];if(e==="/")return[[nO]];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(Kv(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||!Zv(m,n[d]));)d++;n.splice(d,0,m),m.record.name&&!sh(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=it(rh(d.params,f.keys.filter(C=>!C.optional).map(C=>C.name)),m.params&&rh(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=it({},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:uO(b)}}return e.forEach(m=>o(m)),{addRoute:o,resolve:c,removeRoute:a,getRoutes:i,getRecordMatcher:s}}function rh(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function iO(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:lO(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 lO(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 sh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uO(e){return e.reduce((t,n)=>it(t,n.meta),{})}function oh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Zv(e,t){return t.children.some(n=>n===e||Zv(e,n))}const Yv=/#/g,cO=/&/g,dO=/\//g,mO=/=/g,fO=/\?/g,Jv=/\+/g,pO=/%5B/g,hO=/%5D/g,Xv=/%5E/g,_O=/%60/g,Qv=/%7B/g,gO=/%7C/g,e1=/%7D/g,yO=/%20/g;function Cm(e){return encodeURI(""+e).replace(gO,"|").replace(pO,"[").replace(hO,"]")}function vO(e){return Cm(e).replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function Qc(e){return Cm(e).replace(Jv,"%2B").replace(yO,"+").replace(Yv,"%23").replace(cO,"%26").replace(_O,"`").replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function bO(e){return Qc(e).replace(mO,"%3D")}function zO(e){return Cm(e).replace(Yv,"%23").replace(fO,"%3F")}function CO(e){return e==null?"":zO(e).replace(dO,"%2F")}function wl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function wO(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qc(o)):[r&&Qc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function kO(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 xO=Symbol(""),ih=Symbol(""),wm=Symbol(""),t1=Symbol(""),ed=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):YT(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 Ku(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(EO(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=OT(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 EO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function lh(e){const t=qn(wm),n=qn(t1),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=uh(l[c-2]);return c>1&&uh(m)===p&&d[d.length-1].path!==p?d.findIndex(uo.bind(null,l[c-2])):f}),o=Nt(()=>s.value>-1&&TO(n.params,r.value.params)),a=Nt(()=>s.value>-1&&s.value===n.matched.length-1&&qv(n.params,r.value.params));function i(l={}){return AO(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 SO=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:lh,setup(e,{slots:t}){const n=_o(lh(e)),{options:r}=qn(wm),s=Nt(()=>({[ch(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[ch(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)}}}),$O=SO;function AO(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 TO(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 uh(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ch=(e,t,n)=>e??t??n,OO=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(ed),s=Nt(()=>e.route||r.value),o=qn(ih,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(ih,Nt(()=>a.value+1)),Go(xO,i),Go(ed,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 dh(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,it({},h,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[m]=null)},ref:l}));return dh(n.default,{Component:b,route:c})||b}}});function dh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const DO=OO;function PO(e){const t=aO(e.routes,e),n=e.parseQuery||wO,r=e.stringifyQuery||ah,s=e.history,o=Oo(),a=Oo(),i=Oo(),l=k_(Pr);let c=Pr;Vs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=qu.bind(null,j=>""+j),d=qu.bind(null,CO),f=qu.bind(null,wl);function p(j,ue){let se,ve;return Kv(j)?(se=t.getRecordMatcher(j),ve=ue):ve=j,t.addRoute(ve,se)}function h(j){const ue=t.getRecordMatcher(j);ue&&t.removeRoute(ue)}function _(){return t.getRoutes().map(j=>j.record)}function b(j){return!!t.getRecordMatcher(j)}function w(j,ue){if(ue=it({},ue||l.value),typeof j=="string"){const I=Wu(n,j,ue.path),G=t.resolve({path:I.path},ue),Y=s.createHref(I.fullPath);return it(I,G,{params:f(G.params),hash:wl(I.hash),redirectedFrom:void 0,href:Y})}let se;if("path"in j)se=it({},j,{path:Wu(n,j.path,ue.path).path});else{const I=it({},j.params);for(const G in I)I[G]==null&&delete I[G];se=it({},j,{params:d(I)}),ue.params=d(ue.params)}const ve=t.resolve(se,ue),Be=j.hash||"";ve.params=m(f(ve.params));const T=IT(r,it({},j,{hash:vO(Be),path:ve.path})),O=s.createHref(T);return it({fullPath:T,hash:Be,query:r===ah?kO(j.query):j.query||{}},ve,{redirectedFrom:void 0,href:O})}function C(j){return typeof j=="string"?Wu(n,j,l.value.path):it({},j)}function z(j,ue){if(c!==j)return co(8,{from:ue,to:j})}function v(j){return D(j)}function S(j){return v(it(C(j),{replace:!0}))}function A(j){const ue=j.matched[j.matched.length-1];if(ue&&ue.redirect){const{redirect:se}=ue;let ve=typeof se=="function"?se(j):se;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=C(ve):{path:ve},ve.params={}),it({query:j.query,hash:j.hash,params:"path"in ve?{}:j.params},ve)}}function D(j,ue){const se=c=w(j),ve=l.value,Be=j.state,T=j.force,O=j.replace===!0,I=A(se);if(I)return D(it(C(I),{state:typeof I=="object"?it({},Be,I.state):Be,force:T,replace:O}),ue||se);const G=se;G.redirectedFrom=ue;let Y;return!T&&FT(r,ve,se)&&(Y=co(16,{to:G,from:ve}),Ge(ve,ve,!0,!1)),(Y?Promise.resolve(Y):V(G,ve)).catch(X=>mr(X)?mr(X,2)?X:at(X):oe(X,G,ve)).then(X=>{if(X){if(mr(X,2))return D(it({replace:O},C(X.to),{state:typeof X.to=="object"?it({},Be,X.to.state):Be,force:T}),ue||G)}else X=W(G,ve,!0,O,Be);return Z(G,ve,X),X})}function F(j,ue){const se=z(j,ue);return se?Promise.reject(se):Promise.resolve()}function P(j){const ue=ft.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(j):j()}function V(j,ue){let se;const[ve,Be,T]=IO(j,ue);se=Ku(ve.reverse(),"beforeRouteLeave",j,ue);for(const I of ve)I.leaveGuards.forEach(G=>{se.push(Mr(G,j,ue))});const O=F.bind(null,j,ue);return se.push(O),Ne(se).then(()=>{se=[];for(const I of o.list())se.push(Mr(I,j,ue));return se.push(O),Ne(se)}).then(()=>{se=Ku(Be,"beforeRouteUpdate",j,ue);for(const I of Be)I.updateGuards.forEach(G=>{se.push(Mr(G,j,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,j,ue));else se.push(Mr(I.beforeEnter,j,ue));return se.push(O),Ne(se)}).then(()=>(j.matched.forEach(I=>I.enterCallbacks={}),se=Ku(T,"beforeRouteEnter",j,ue),se.push(O),Ne(se))).then(()=>{se=[];for(const I of a.list())se.push(Mr(I,j,ue));return se.push(O),Ne(se)}).catch(I=>mr(I,8)?I:Promise.reject(I))}function Z(j,ue,se){i.list().forEach(ve=>P(()=>ve(j,ue,se)))}function W(j,ue,se,ve,Be){const T=z(j,ue);if(T)return T;const O=ue===Pr,I=Vs?history.state:{};se&&(ve||O?s.replace(j.fullPath,it({scroll:O&&I&&I.scroll},Be)):s.push(j.fullPath,Be)),l.value=j,Ge(j,ue,se,O),at()}let U;function Q(){U||(U=s.listen((j,ue,se)=>{if(!pt.listening)return;const ve=w(j),Be=A(ve);if(Be){D(it(Be,{replace:!0}),ve).catch(ta);return}c=ve;const T=l.value;Vs&&UT(Xp(T.fullPath,se.delta),cu()),V(ve,T).catch(O=>mr(O,12)?O:mr(O,2)?(D(O.to,ve).then(I=>{mr(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||W(ve,T,!1),O&&(se.delta&&!mr(O,8)?s.go(-se.delta,!1):se.type===Ca.pop&&mr(O,20)&&s.go(-1,!1)),Z(ve,T,O)}).catch(ta)}))}let me=Oo(),K=Oo(),re;function oe(j,ue,se){at(j);const ve=K.list();return ve.length?ve.forEach(Be=>Be(j,ue,se)):console.error(j),Promise.reject(j)}function Fe(){return re&&l.value!==Pr?Promise.resolve():new Promise((j,ue)=>{me.add([j,ue])})}function at(j){return re||(re=!j,Q(),me.list().forEach(([ue,se])=>j?se(j):ue()),me.reset()),j}function Ge(j,ue,se,ve){const{scrollBehavior:Be}=e;if(!Vs||!Be)return Promise.resolve();const T=!se&&jT(Xp(j.fullPath,0))||(ve||!se)&&history.state&&history.state.scroll||null;return Sa().then(()=>Be(j,ue,T)).then(O=>O&&BT(O)).catch(O=>oe(O,j,ue))}const je=j=>s.go(j);let ut;const ft=new Set,pt={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(j){const ue=this;j.component("RouterLink",$O),j.component("RouterView",DO),j.config.globalProperties.$router=ue,Object.defineProperty(j.config.globalProperties,"$route",{enumerable:!0,get:()=>vn(l)}),Vs&&!ut&&l.value===Pr&&(ut=!0,v(s.location).catch(Be=>{}));const se={};for(const Be in Pr)Object.defineProperty(se,Be,{get:()=>l.value[Be],enumerable:!0});j.provide(wm,ue),j.provide(t1,$d(se)),j.provide(ed,l);const ve=j.unmount;ft.add(j),j.unmount=function(){ft.delete(j),ft.size<1&&(c=Pr,U&&U(),U=null,l.value=Pr,ut=!1,re=!1),ve()}}};function Ne(j){return j.reduce((ue,se)=>ue.then(()=>P(se)),Promise.resolve())}return pt}function IO(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 FO={name:"PageAbout",computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{showUpdateDialog(){this.$store.commit(ka,!0)}}},RO={class:"section"},LO={class:"container"},NO={class:"columns is-centered"},MO={class:"column is-four-fifths has-text-centered-mobile"},VO=["textContent"],HO={class:"section"},BO={class:"container"},UO={class:"columns is-centered"},jO={class:"column is-four-fifths"},qO={class:"content"},WO={class:"level is-mobile"},KO={class:"level-left"},GO={class:"level-item"},ZO=["textContent"],YO={class:"level-right"},JO={key:0},XO=["textContent"],QO={key:1},e3=["textContent"],t3={class:"table"},n3=["textContent"],r3=["textContent"],s3=["textContent"],o3=["textContent"],a3=["textContent"],i3=["textContent"],l3=["textContent"],u3=["textContent"],c3=["textContent"],d3={class:"has-text-right"},m3=["textContent"],f3=["textContent"],p3=["textContent"],h3={class:"has-text-right"},_3=["textContent"],g3=["textContent"],y3={class:"section"},v3={class:"container"},b3={class:"columns is-centered"},z3={class:"column is-four-fifths"},C3={class:"content has-text-centered-mobile"},w3=["textContent"],k3=["textContent"],x3=u("a",{href:"https://bulma.io"},"Bulma",-1),E3=u("a",{href:"https://pictogrammers.com/library/mdi/"},"Material Design Icons",-1),S3=u("a",{href:"https://vuejs.org/"},"Vue.js",-1),$3=u("a",{href:"https://github.com/mzabriskie/axios"},"axios",-1),A3=["textContent"];function T3(e,t,n,r,s,o){const a=E("i18n-t");return k(),$("div",null,[u("section",RO,[u("div",LO,[u("div",NO,[u("div",MO,[u("h1",{class:"title is-4",textContent:g(o.config.library_name)},null,8,VO)])])])]),u("section",HO,[u("div",BO,[u("div",UO,[u("div",jO,[u("div",qO,[u("nav",WO,[u("div",KO,[u("div",GO,[u("h2",{class:"title is-5",textContent:g(e.$t("page.about.library"))},null,8,ZO)])]),u("div",YO,[o.library.updating?(k(),$("div",JO,[u("a",{class:"button is-small is-loading",textContent:g(e.$t("page.about.update"))},null,8,XO)])):(k(),$("div",QO,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=i=>o.showUpdateDialog()),textContent:g(e.$t("page.about.update"))},null,8,e3)]))])]),u("table",t3,[u("tbody",null,[u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.artists"))},null,8,n3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.artists))},null,8,r3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.albums"))},null,8,s3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.albums))},null,8,o3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.tracks"))},null,8,a3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.songs))},null,8,i3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.total-playtime"))},null,8,l3),u("td",{class:"has-text-right",textContent:g(e.$filters.durationInDays(o.library.db_playtime*1e3))},null,8,u3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.updated"))},null,8,c3),u("td",d3,[u("span",{textContent:g(e.$t("page.about.updated-on",{time:e.$filters.timeFromNow(o.library.updated_at)}))},null,8,m3),_t(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.updated_at))},null,8,f3),_t(") ")])]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.uptime"))},null,8,p3),u("td",h3,[u("span",{textContent:g(e.$filters.timeFromNow(o.library.started_at,!0))},null,8,_3),_t(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.started_at))},null,8,g3),_t(") ")])])])])])])])])]),u("section",y3,[u("div",v3,[u("div",b3,[u("div",z3,[u("div",C3,[u("p",{class:"is-size-7",textContent:g(e.$t("page.about.version",{version:o.config.version}))},null,8,w3),u("p",{class:"is-size-7",textContent:g(e.$t("page.about.compiled-with",{options:o.config.buildoptions.join(", ")}))},null,8,k3),y(a,{tag:"p",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:x(()=>[x3]),mdi:x(()=>[E3]),vuejs:x(()=>[S3]),axios:x(()=>[$3]),others:x(()=>[u("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:g(e.$t("page.about.more"))},null,8,A3)]),_:1})])])])])])])}const O3=te(FO,[["render",T3]]),D3={},P3={class:"hero is-light is-bold"},I3={class:"hero-body"},F3={class:"container"},R3={class:"columns is-centered"},L3={class:"column is-four-fifths"},N3={class:"columns is-flex-direction-row-reverse"},M3={class:"column fd-has-cover"},V3={class:"column m-auto is-three-fifths has-text-centered-mobile"},H3={class:"section pt-0"},B3={class:"container"},U3={class:"columns is-centered"},j3={class:"column is-four-fifths"};function q3(e,t){return k(),$(we,null,[u("section",P3,[u("div",I3,[u("div",F3,[u("div",R3,[u("div",L3,[u("div",N3,[u("div",M3,[st(e.$slots,"heading-right")]),u("div",V3,[st(e.$slots,"heading-left")])])])])])])]),u("section",H3,[u("div",B3,[u("div",U3,[u("div",j3,[st(e.$slots,"content"),st(e.$slots,"footer")])])])])],64)}const du=te(D3,[["render",q3]]);var n1={exports:{}},W3=[{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=W3,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}})(n1);var K3=n1.exports,G3=1/0,Z3="[object Symbol]",Y3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r1="\\ud800-\\udfff",J3="\\u0300-\\u036f\\ufe20-\\ufe23",X3="\\u20d0-\\u20f0",s1="\\u2700-\\u27bf",o1="a-z\\xdf-\\xf6\\xf8-\\xff",Q3="\\xac\\xb1\\xd7\\xf7",e6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",t6="\\u2000-\\u206f",n6=" \\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",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",r6="\\ufe0e\\ufe0f",i1=Q3+e6+t6+n6,l1="['’]",mh="["+i1+"]",s6="["+J3+X3+"]",u1="\\d+",o6="["+s1+"]",c1="["+o1+"]",d1="[^"+r1+i1+u1+s1+o1+a1+"]",a6="\\ud83c[\\udffb-\\udfff]",i6="(?:"+s6+"|"+a6+")",l6="[^"+r1+"]",m1="(?:\\ud83c[\\udde6-\\uddff]){2}",f1="[\\ud800-\\udbff][\\udc00-\\udfff]",Hs="["+a1+"]",u6="\\u200d",fh="(?:"+c1+"|"+d1+")",c6="(?:"+Hs+"|"+d1+")",ph="(?:"+l1+"(?:d|ll|m|re|s|t|ve))?",hh="(?:"+l1+"(?:D|LL|M|RE|S|T|VE))?",p1=i6+"?",h1="["+r6+"]?",d6="(?:"+u6+"(?:"+[l6,m1,f1].join("|")+")"+h1+p1+")*",m6=h1+p1+d6,f6="(?:"+[o6,m1,f1].join("|")+")"+m6,p6=RegExp([Hs+"?"+c1+"+"+ph+"(?="+[mh,Hs,"$"].join("|")+")",c6+"+"+hh+"(?="+[mh,Hs+fh,"$"].join("|")+")",Hs+"?"+fh+"+"+ph,Hs+"+"+hh,u1,f6].join("|"),"g"),h6=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,g6=typeof self=="object"&&self&&self.Object===Object&&self,y6=_6||g6||Function("return this")();function v6(e){return e.match(Y3)||[]}function b6(e){return h6.test(e)}function z6(e){return e.match(p6)||[]}var C6=Object.prototype,w6=C6.toString,_h=y6.Symbol,gh=_h?_h.prototype:void 0,yh=gh?gh.toString:void 0;function k6(e){if(typeof e=="string")return e;if(E6(e))return yh?yh.call(e):"";var t=e+"";return t=="0"&&1/e==-G3?"-0":t}function x6(e){return!!e&&typeof e=="object"}function E6(e){return typeof e=="symbol"||x6(e)&&w6.call(e)==Z3}function S6(e){return e==null?"":k6(e)}function $6(e,t,n){return e=S6(e),t=n?void 0:t,t===void 0?b6(e)?z6(e):v6(e):e.match(t)||[]}var A6=$6,T6=1/0,O6="[object Symbol]",D6=/^\s+/,km="\\ud800-\\udfff",_1="\\u0300-\\u036f\\ufe20-\\ufe23",g1="\\u20d0-\\u20f0",y1="\\ufe0e\\ufe0f",P6="["+km+"]",td="["+_1+g1+"]",nd="\\ud83c[\\udffb-\\udfff]",I6="(?:"+td+"|"+nd+")",v1="[^"+km+"]",b1="(?:\\ud83c[\\udde6-\\uddff]){2}",z1="[\\ud800-\\udbff][\\udc00-\\udfff]",C1="\\u200d",w1=I6+"?",k1="["+y1+"]?",F6="(?:"+C1+"(?:"+[v1,b1,z1].join("|")+")"+k1+w1+")*",R6=k1+w1+F6,L6="(?:"+[v1+td+"?",td,b1,z1,P6].join("|")+")",N6=RegExp(nd+"(?="+nd+")|"+L6+R6,"g"),M6=RegExp("["+C1+km+_1+g1+y1+"]"),V6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,H6=typeof self=="object"&&self&&self.Object===Object&&self,B6=V6||H6||Function("return this")();function U6(e){return e.split("")}function j6(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function G6(e){return M6.test(e)}function vh(e){return G6(e)?Z6(e):U6(e)}function Z6(e){return e.match(N6)||[]}var Y6=Object.prototype,J6=Y6.toString,bh=B6.Symbol,zh=bh?bh.prototype:void 0,Ch=zh?zh.toString:void 0;function X6(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:X6(e,t,n)}function e4(e){return!!e&&typeof e=="object"}function t4(e){return typeof e=="symbol"||e4(e)&&J6.call(e)==O6}function n4(e){return e==null?"":x1(e)}function r4(e,t,n){if(e=n4(e),e&&(n||t===void 0))return e.replace(D6,"");if(!e||!(t=x1(t)))return e;var r=vh(e),s=K6(r,vh(t));return Q6(r,s).join("")}var s4=r4,rd=1/0,o4=9007199254740991,a4=17976931348623157e292,wh=NaN,i4="[object Symbol]",l4=/^\s+|\s+$/g,u4=/^[-+]0x[0-9a-f]+$/i,c4=/^0b[01]+$/i,d4=/^0o[0-7]+$/i,xm="\\ud800-\\udfff",E1="\\u0300-\\u036f\\ufe20-\\ufe23",S1="\\u20d0-\\u20f0",$1="\\ufe0e\\ufe0f",m4="["+xm+"]",sd="["+E1+S1+"]",od="\\ud83c[\\udffb-\\udfff]",f4="(?:"+sd+"|"+od+")",A1="[^"+xm+"]",T1="(?:\\ud83c[\\udde6-\\uddff]){2}",O1="[\\ud800-\\udbff][\\udc00-\\udfff]",D1="\\u200d",P1=f4+"?",I1="["+$1+"]?",p4="(?:"+D1+"(?:"+[A1,T1,O1].join("|")+")"+I1+P1+")*",h4=I1+P1+p4,_4="(?:"+[A1+sd+"?",sd,T1,O1,m4].join("|")+")",ad=RegExp(od+"(?="+od+")|"+_4+h4,"g"),g4=RegExp("["+D1+xm+E1+S1+$1+"]"),y4=parseInt,v4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,b4=typeof self=="object"&&self&&self.Object===Object&&self,z4=v4||b4||Function("return this")(),C4=k4("length");function w4(e){return e.split("")}function k4(e){return function(t){return t==null?void 0:t[e]}}function Em(e){return g4.test(e)}function F1(e){return Em(e)?E4(e):C4(e)}function x4(e){return Em(e)?S4(e):w4(e)}function E4(e){for(var t=ad.lastIndex=0;ad.test(e);)t++;return t}function S4(e){return e.match(ad)||[]}var $4=Object.prototype,A4=$4.toString,kh=z4.Symbol,T4=Math.ceil,O4=Math.floor,xh=kh?kh.prototype:void 0,Eh=xh?xh.toString:void 0;function Sh(e,t){var n="";if(!e||t<1||t>o4)return n;do t%2&&(n+=e),t=O4(t/2),t&&(e+=e);while(t);return n}function D4(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:D4(e,t,n)}function I4(e,t){t=t===void 0?" ":R1(t);var n=t.length;if(n<2)return n?Sh(t,e):t;var r=Sh(t,T4(e/F1(t)));return Em(t)?P4(x4(r),0,e).join(""):r.slice(0,e)}function $h(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function F4(e){return!!e&&typeof e=="object"}function L1(e){return typeof e=="symbol"||F4(e)&&A4.call(e)==i4}function R4(e){if(!e)return e===0?e:0;if(e=N4(e),e===rd||e===-rd){var t=e<0?-1:1;return t*a4}return e===e?e:0}function L4(e){var t=R4(e),n=t%1;return t===t?n?t-n:t:0}function N4(e){if(typeof e=="number")return e;if(L1(e))return wh;if($h(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$h(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(l4,"");var n=c4.test(e);return n||d4.test(e)?y4(e.slice(2),n?2:8):u4.test(e)?wh:+e}function M4(e){return e==null?"":R1(e)}function V4(e,t,n){e=M4(e),t=L4(t);var r=t?F1(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",U4=`#?[${wa}]{3}[${wa}]?`,j4=`#?[${wa}]{6}([${wa}]{2})?`,q4=new RegExp(`[^#${wa}]`,"gi"),W4=new RegExp(`^${U4}$|^${j4}$`,"i");var K4=(e,t={})=>{if(typeof e!="string"||q4.test(e)||!W4.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}},G4=K3,Z4=A6,Y4=s4,J4=H4,X4=B4,N1=K4;const Gu=.75,Zu=.25,Yu=16777215,Q4=49979693;var e5=function(e){return"#"+r5(String(JSON.stringify(e)))};function t5(e){var t=Z4(e),n=[];return t.forEach(function(r){var s=G4(r);s&&n.push(N1(Y4(s,"#"),{format:"array"}))}),n}function n5(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 r5(e){var t,n=t5(e);n.length>0&&(t=n5(n));var r=1,s=0,o=1;if(e.length>0)for(var a=0;as&&(s=e[a].charCodeAt(0)),o=parseInt(Yu/s),r=(r+e[a].charCodeAt(0)*o*Q4)%Yu;var i=(r*e.length%Yu).toString(16);i=J4(i,6,i);var l=N1(i,{format:"array"});return t?X4(Zu*l[0]+Gu*t[0],Zu*l[1]+Gu*t[1],Zu*l[2]+Gu*t[2]):i}const s5=Ia(e5);function o5(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 a5(e){return o5(e)?"#000000":"#ffffff"}function i5(e){const t=` ${e.caption} `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(t)}`}function l5(e,t,n){const r=s5(t),s=a5(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 i5(o)}const u5={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 l5(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 c5(e,t,n,r,s,o){const a=Nd("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(u5,[["render",c5]]),{t:Ju,locale:Sm}=su.global,M1="GROUP_KEY_NONE";function $m(){return{compareFn:null,groupKeyFn:e=>M1}}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,Sm.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 Am(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 d5(e,t="asc",n=1){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o-a;return t==="asc"?i:i*-1},groupKeyFn:r=>r[e]||n}}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,Sm.value);return t==="asc"?i:i*-1},groupKeyFn:r=>(r[e]||n).substring(0,4)}}function m5(e,t="0000"){return{compareFn:(n,r)=>{const s=n[e]||t;return(r[e]||t).localeCompare(s,Sm.value)},groupKeyFn:n=>{const r=n[e];if(!r)return t;const s=new Date().getTime()-new Date(r).getTime();return s<864e5?Ju("group-by-list.today"):s<6048e5?Ju("group-by-list.last-week"):s<2592e6?Ju("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($m())}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]!==M1))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})(V1);var f5=V1.exports;const Yn=Ia(f5),p5={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:{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")})},open_album(){this.track.data_kind==="spotify"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):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.track.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_album_artist(){this.track.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.track.media_kind==="music"||this.track.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}}):this.track.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-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}})},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)}}},h5={key:0,class:"modal is-active"},_5={class:"modal-content fd-modal-card"},g5={class:"card"},y5={class:"card-content"},v5=["textContent"],b5=["textContent"],z5={key:0,class:"buttons"},C5=["textContent"],w5=["textContent"],k5={class:"content is-small"},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={key:5},H5=["textContent"],B5=["textContent"],U5={key:6},j5=["textContent"],q5=["textContent"],W5={key:7},K5=["textContent"],G5=["textContent"],Z5=["textContent"],Y5=["textContent"],J5=["textContent"],X5={class:"title is-6"},Q5=["textContent"],eD={key:8},tD=["textContent"],nD={class:"title is-6"},rD=["textContent"],sD=["textContent"],oD=["textContent"],aD=["textContent"],iD=["textContent"],lD=["textContent"],uD=["textContent"],cD=["textContent"],dD={key:9},mD=["textContent"],fD=["textContent"],pD={class:"card-footer"},hD=["textContent"],_D=["textContent"],gD=["textContent"];function yD(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",h5,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",_5,[u("div",g5,[u("div",y5,[u("p",{class:"title is-4",textContent:g(n.track.title)},null,8,v5),u("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,b5),n.track.media_kind==="podcast"?(k(),$("div",z5,[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,C5)):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,w5)):H("",!0)])):H("",!0),u("div",k5,[n.track.album?(k(),$("p",x5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,E5),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,S5)])):H("",!0),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),$("p",$5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,A5),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...i)=>o.open_album_artist&&o.open_album_artist(...i)),textContent:g(n.track.album_artist)},null,8,T5)])):H("",!0),n.track.composer?(k(),$("p",O5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,D5),u("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,P5)])):H("",!0),n.track.date_released?(k(),$("p",I5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,F5),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,R5)])):n.track.year?(k(),$("p",L5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,N5),u("span",{class:"title is-6",textContent:g(n.track.year)},null,8,M5)])):H("",!0),n.track.genre?(k(),$("p",V5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,H5),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,B5)])):H("",!0),n.track.disc_number?(k(),$("p",U5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,j5),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,q5)])):H("",!0),n.track.length_ms?(k(),$("p",W5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,K5),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,G5)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,Z5),u("span",{class:"title is-6",textContent:g(n.track.path)},null,8,Y5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,J5),u("span",X5,[u("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,Q5)])]),n.track.samplerate?(k(),$("p",eD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,tD),u("span",nD,[u("span",{textContent:g(n.track.type)},null,8,rD),n.track.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,sD)):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,oD)):H("",!0),n.track.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,aD)):H("",!0)])])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,iD),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,lD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,uD),u("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,cD)]),n.track.comment?(k(),$("p",dD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,mD),u("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,fD)])):H("",!0)])]),u("footer",pD,[u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...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,hD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...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,_D)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...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.track.play"))},null,8,gD)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const vD=te(p5,[["render",yD]]),bD={name:"ProgressBar",props:["max","value"]},zD=["value","max"];function CD(e,t,n,r,s,o){return n.value>0?(k(),$("progress",{key:0,class:"progress is-info",value:n.value,max:n.max},null,8,zD)):H("",!0)}const wD=te(bD,[["render",CD],["__scopeId","data-v-b2fd846d"]]),kD={name:"ListTracks",components:{ModalDialogTrack:vD,ProgressBar:wD},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}}},xD={key:0,class:"mt-6 mb-5 py-2"},ED=["id","textContent"],SD=["onClick"],$D={key:0,class:"media-left is-clickable"},AD={class:"media-content is-clickable is-clipped"},TD=["textContent"],OD=["textContent"],DD=["textContent"],PD={class:"media-right"},ID=["onClick"];function FD(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,lt(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",$D,[y(a,{class:"icon",name:"file-outline",size:"16"})])):H("",!0),u("div",AD,[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,TD),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(c.item.artist)},null,8,OD),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.album)},null,8,DD),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",PD,[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,ID)])],10,SD)):(k(),$("div",xD,[u("span",{id:"index_"+c.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(c.groupKey)},null,8,ED)]))],64))),128)),(k(),he(es,{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(kD,[["render",FD]]),RD={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}}},LD={key:0,class:"modal is-active"},ND={class:"modal-content fd-modal-card"},MD={class:"card"},VD={class:"card-content"},HD={class:"title is-4"},BD=["textContent"],UD={key:0,class:"buttons"},jD=["textContent"],qD=["textContent"],WD={class:"content is-small"},KD={key:0},GD=["textContent"],ZD=["textContent"],YD={key:1},JD=["textContent"],XD=["textContent"],QD={key:2},eP=["textContent"],tP=["textContent"],nP=["textContent"],rP=["textContent"],sP=["textContent"],oP=["textContent"],aP=["textContent"],iP=["textContent"],lP=["textContent"],uP=["textContent"],cP={class:"card-footer"},dP=["textContent"],mP=["textContent"],fP=["textContent"];function pP(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",LD,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",ND,[u("div",MD,[u("div",VD,[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",HD,[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,BD)]),o.media_kind_resolved==="podcast"?(k(),$("div",UD,[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,jD),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,qD)):H("",!0)])):H("",!0),u("div",WD,[n.album.artist?(k(),$("p",KD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,GD),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,ZD)])):H("",!0),n.album.date_released?(k(),$("p",YD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,JD),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,XD)])):n.album.year>0?(k(),$("p",QD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,eP),u("span",{class:"title is-6",textContent:g(n.album.year)},null,8,tP)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,nP),u("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,rP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,sP),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,oP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,aP),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,iP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,lP),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,uP)])])]),u("footer",cP,[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,dP)]),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,mP)]),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,fP)])])])]),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(RD,[["render",pP]]),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),e.tracks.group(d5("disc_number")),e.tracks.indexList<=1&&e.tracks.group($m())}},hP={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)}}},_P=["textContent"],gP={class:"subtitle is-6 has-text-link"},yP=["textContent"],vP={class:"buttons fd-is-centered-mobile mt-5"},bP=["textContent"],zP=["textContent"];function CP(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,_P),u("h2",gP,[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,yP)]),u("div",vP,[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,bP)]),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,zP),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 wP=te(hP,[["render",CP]]),kP={name:"ListItemTrackSpotify",props:["track","position","context_uri"],methods:{play(){this.track.is_playable&&M.player_play_uri(this.context_uri,!1,this.position)}}},xP={class:"media is-align-items-center"},EP=["textContent"],SP=["textContent"],$P={key:0,class:"subtitle is-7"},AP=["textContent"],TP=["textContent"],OP={class:"media-right"};function DP(e,t,n,r,s,o){return k(),$("div",xP,[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,EP),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,SP),n.track.is_playable?H("",!0):(k(),$("h2",$P,[_t(" ("),u("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,AP),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,TP)):H("",!0),_t(") ")]))],2),u("div",OP,[st(e.$slots,"actions")])])}const Tm=te(kP,[["render",DP]]),PP={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}}},IP={key:0,class:"modal is-active"},FP={class:"modal-content fd-modal-card"},RP={class:"card"},LP={class:"card-content"},NP={class:"title is-4"},MP=["textContent"],VP={class:"content is-small"},HP=["textContent"],BP=["textContent"],UP=["textContent"],jP=["textContent"],qP=["textContent"],WP=["textContent"],KP={class:"card-footer"},GP=["textContent"],ZP=["textContent"],YP=["textContent"];function JP(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",IP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",FP,[u("div",RP,[u("div",LP,[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",NP,[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,MP)]),u("div",VP,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,HP),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,BP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,UP),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,jP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,qP),u("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,WP)])])]),u("footer",KP,[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,GP)]),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,ZP)]),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,YP)])])])]),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(PP,[["render",JP]]),XP={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}})}}},QP={key:0,class:"modal is-active"},eI={class:"modal-content fd-modal-card"},tI={class:"card"},nI={class:"card-content"},rI=["textContent"],sI=["textContent"],oI={class:"content is-small"},aI=["textContent"],iI=["textContent"],lI=["textContent"],uI=["textContent"],cI=["textContent"],dI=["textContent"],mI=["textContent"],fI=["textContent"],pI=["textContent"],hI=["textContent"],_I=["textContent"],gI=["textContent"],yI={class:"card-footer"},vI=["textContent"],bI=["textContent"],zI=["textContent"];function CI(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",QP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",eI,[u("div",tI,[u("div",nI,[u("p",{class:"title is-4",textContent:g(n.track.name)},null,8,rI),u("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,sI),u("div",oI,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,aI),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,iI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,lI),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,uI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,cI),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,dI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,mI),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,fI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,pI),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,hI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,_I),u("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,gI)])])]),u("footer",yI,[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,vI)]),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,bI)]),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,zI)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Om=te(XP,[["render",CI]]),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}},wI={name:"PageAlbumSpotify",components:{ContentWithHero:du,CoverArtwork:Fn,ListItemTrackSpotify:Tm,ModalDialogAlbumSpotify:Ma,ModalDialogTrackSpotify:Om},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}}},kI=["textContent"],xI={class:"subtitle is-6 has-text-link"},EI=["textContent"],SI={class:"buttons fd-is-centered-mobile mt-5"},$I=["textContent"],AI=["textContent"],TI=["onClick"];function OI(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,kI),u("h2",xI,[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,EI)]),u("div",SI,[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,$I)]),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,AI),(k(!0),$(we,null,lt(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,TI)]),_: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 DI=te(wI,[["render",OI]]),PI={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}}},II={class:"section"},FI={class:"container"},RI={class:"columns is-centered"},LI={class:"column is-four-fifths"},NI={key:0},MI={ref:"options_ref",style:{height:"1px"}},VI={class:"buttons is-centered mt-4 mb-2"},HI={id:"top",class:"level is-clipped"},BI={class:"level-left is-flex-shrink-1"},UI={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},jI={class:"level-right has-text-centered-mobile"},qI={class:"mt-4"};function WI(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",II,[u("div",FI,[u("div",RI,[u("div",LI,[e.$slots.options?(k(),$("section",NI,[u("div",MI,null,512),st(e.$slots,"options"),u("nav",VI,[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",HI,[u("div",BI,[u("div",UI,[u("div",null,[st(e.$slots,"heading-left")])])]),u("div",jI,[st(e.$slots,"heading-right")])]),st(e.$slots,"content"),u("div",qI,[st(e.$slots,"footer")])],2)])])])])}const Qe=te(PI,[["render",WI]]),KI={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)}}},GI={class:"dropdown-trigger"},ZI=["textContent"],YI={id:"dropdown",class:"dropdown-menu",role:"menu"},JI={class:"dropdown-content"},XI=["onClick","textContent"];function QI(e,t,n,r,s,o){const a=E("mdicon"),i=Nd("click-away");return bt((k(),$("div",{class:Ee(["dropdown",{"is-active":s.is_active}])},[u("div",GI,[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,ZI),y(a,{class:"icon",name:"chevron-down",size:"16"})])]),u("div",YI,[u("div",JI,[(k(!0),$(we,null,lt(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,XI))),128))])])],2)),[[i,o.onClickOutside]])}const $s=te(KI,[["render",QI]]),eF={name:"IndexButtonList",props:["index"]},tF={class:"buttons is-centered mb-4 fd-is-square"};function nF(e,t,n,r,s,o){const a=E("router-link");return k(),$("section",null,[u("nav",tF,[(k(!0),$(we,null,lt(n.index,i=>(k(),he(a,{key:i,class:"button is-small",to:"#index_"+i},{default:x(()=>[_t(g(i),1)]),_:2},1032,["to"]))),128))])])}const Jn=te(eF,[["render",nF]]),rF={name:"ListAlbums",components:{CoverArtwork:Fn,ModalDialog:fm,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")})}}},sF={key:0,class:"mt-6 mb-5 py-2"},oF=["id","textContent"],aF=["onClick"],iF={key:0,class:"media-left"},lF={class:"media-content is-clickable is-clipped"},uF=["textContent"],cF=["textContent"],dF=["textContent"],mF={class:"media-right"},fF=["onClick"],pF=["textContent"],hF={class:"is-size-7"},_F=["textContent"],gF=["textContent"];function yF(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,lt(n.albums,m=>(k(),$(we,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),$("div",sF,[u("span",{id:"index_"+m.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.groupKey)},null,8,oF)])):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",iF,[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",lF,[u("div",null,[u("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,uF),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(m.item.artist)},null,8,cF),m.item.date_released&&m.item.media_kind==="music"?(k(),$("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:g(e.$filters.date(m.item.date_released))},null,8,dF)):H("",!0)])]),u("div",mF,[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,fF)])],8,aF)):H("",!0)],64))),128)),(k(),he(es,{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,pF),u("p",hF,[_t(" ("),u("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,_F),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,gF),_t(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const cr=te(rF,[["render",yF]]),vF={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},bF={class:"section fd-tabs-section"},zF={class:"container"},CF={class:"columns is-centered"},wF={class:"column is-four-fifths"},kF={class:"tabs is-centered is-small"},xF=["onClick","onKeypress"],EF=["textContent"],SF=["onClick","onKeypress"],$F=["textContent"],AF=["onClick","onKeypress"],TF=["textContent"],OF=["onClick","onKeypress"],DF=["textContent"],PF=["onClick","onKeypress"],IF=["textContent"],FF=["onClick","onKeypress"],RF=["textContent"];function LF(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",bF,[u("div",zF,[u("div",CF,[u("div",wF,[u("div",kF,[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,EF)],40,xF)],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,$F)],40,SF)],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,TF)],40,AF)],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,DF)],40,OF)],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,IF)],40,PF)],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,RF)],40,FF)],2)]),_:1})):H("",!0)])])])])])])}const dr=te(vF,[["render",LF]]),di={load(e){return M.library_albums("music")},set(e,t){e.albums_list=new ge(t.data)}},NF={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListAlbums:cr,TabsMusic:dr},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(s_,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(yd,e)}}}},MF={class:"fd-page-with-tabs"},VF={class:"columns"},HF={class:"column"},BF=["textContent"],UF={class:"field"},jF={class:"control"},qF=["textContent"],WF=["textContent"],KF={key:0,class:"field"},GF={class:"control"},ZF=["textContent"],YF=["textContent"],JF={class:"column"},XF=["textContent"],QF=["textContent"],eR=["textContent"];function tR(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",MF,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.albums.indexList},null,8,["index"]),u("div",VF,[u("div",HF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,BF),u("div",UF,[u("div",jF,[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,qF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,WF)]),o.spotify_enabled?(k(),$("div",KF,[u("div",GF,[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,ZF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,YF)])):H("",!0)]),u("div",JF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort-by.title"))},null,8,XF),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,QF),u("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:o.albums.count}))},null,8,eR)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{albums:o.albums},null,8,["albums"])]),_:1})])}const nR=te(NF,[["render",tR]]),rR={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}})}}},sR={key:0,class:"modal is-active"},oR={class:"modal-content fd-modal-card"},aR={class:"card"},iR={class:"card-content"},lR={class:"title is-4"},uR=["textContent"],cR={class:"content is-small"},dR=["textContent"],mR=["textContent"],fR=["textContent"],pR=["textContent"],hR=["textContent"],_R=["textContent"],gR=["textContent"],yR=["textContent"],vR={class:"card-footer"},bR=["textContent"],zR=["textContent"],CR=["textContent"];function wR(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",sR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",oR,[u("div",aR,[u("div",iR,[u("p",lR,[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,uR)]),u("div",cR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,dR),u("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,mR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,fR),u("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,pR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,hR),u("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,_R)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,gR),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,yR)])])]),u("footer",vR,[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,bR)]),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,zR)]),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,CR)])])])]),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(rR,[["render",wR]]),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)}},kR={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:$s,ListAlbums:cr,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(n_,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)}}},xR={class:"columns"},ER={class:"column"},SR=["textContent"],$R=["textContent"],AR={class:"buttons is-centered"},TR=["textContent"],OR={class:"heading has-text-centered-mobile"},DR=["textContent"],PR=u("span",null," | ",-1),IR=["textContent"];function FR(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",xR,[u("div",ER,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,SR),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,$R)]),"heading-right":x(()=>[u("div",AR,[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,TR)])])]),content:x(()=>[u("p",OR,[u("span",{textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,DR),PR,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,IR)]),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 RR=te(kR,[["render",FR]]),LR={name:"ListItemAlbumSpotify",props:["album"]},NR={class:"media is-align-items-center"},MR={key:0,class:"media-left is-clickable"},VR={class:"media-content is-clickable is-clipped"},HR=["textContent"],BR=["textContent"],UR=["textContent"],jR={class:"media-right"};function qR(e,t,n,r,s,o){return k(),$("div",NR,[e.$slots.artwork?(k(),$("div",MR,[st(e.$slots,"artwork")])):H("",!0),u("div",VR,[u("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,HR),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(n.album.artists[0].name)},null,8,BR),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,UR)]),u("div",jR,[st(e.$slots,"actions")])])}const pu=te(LR,[["render",qR]]),WR={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}})}}},KR={key:0,class:"modal is-active"},GR={class:"modal-content fd-modal-card"},ZR={class:"card"},YR={class:"card-content"},JR={class:"title is-4"},XR=["textContent"],QR={class:"content is-small"},eL=["textContent"],tL=["textContent"],nL=["textContent"],rL=["textContent"],sL={class:"card-footer"},oL=["textContent"],aL=["textContent"],iL=["textContent"];function lL(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",KR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",GR,[u("div",ZR,[u("div",YR,[u("p",JR,[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,XR)]),u("div",QR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,eL),u("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,tL)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,nL),u("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,rL)])])]),u("footer",sL,[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,oL)]),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,aL)]),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,iL)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const H1=te(WR,[["render",lL]]);function uL(e){return e.scrollHeight}function cL(e){return e.scrollWidth}function dL(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function mL(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const fL=u("div",{class:"loading"},"Loading...",-1),pL=u("div",{class:"no-more"},"No more.",-1),hL=u("div",{class:"no-results"},"No results.",-1),_L=u("div",{class:"error"},"Error.",-1),Dm=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"?dL((z=n.container)!=null?z:document.documentElement,a):n.position==="left"&&mL((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=uL((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(a=cL((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"&&R_(()=>{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"?st(z.$slots,"loading",Ro(Us({key:0},{isFirstLoad:vn(o)})),()=>[fL]):vn(s)==="no-more"?st(z.$slots,"no-more",Ro(Us({key:1},{retry:p})),()=>[pL]):vn(s)==="no-results"?st(z.$slots,"no-results",Ro(Us({key:2},{retry:p})),()=>[hL]):vn(s)==="error"?st(z.$slots,"error",Ro(Us({key:3},{retry:p})),()=>[_L]):H("",!0)],512))}}),id=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:id,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])}},gL={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,ModalDialogArtistSpotify:H1,VueEternalLoading:Dm},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:id,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,id)})},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:""}}},yL=["textContent"],vL={class:"buttons is-centered"},bL=["textContent"],zL=["textContent"],CL=["onClick"];function wL(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,yL)]),"heading-right":x(()=>[u("div",vL,[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,bL)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:s.total}))},null,8,zL),(k(!0),$(we,null,lt(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,CL)]),_: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[_t(" . ")]),_: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 kL=te(gL,[["render",wL]]),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)}},xL={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:$s,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:Am("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(r_,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)}}},EL={class:"columns"},SL={class:"column"},$L=["textContent"],AL=["textContent"],TL={class:"buttons is-centered"},OL=["textContent"],DL={class:"heading has-text-centered-mobile"},PL=["textContent"],IL=u("span",null," | ",-1),FL=["textContent"];function RL(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",EL,[u("div",SL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,$L),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,AL)]),"heading-right":x(()=>[u("div",TL,[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,OL)])])]),content:x(()=>[u("p",DL,[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,PL),IL,u("span",{textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,FL)]),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 LL=te(xL,[["render",RL]]),NL={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}}},ML={key:0,class:"mt-6 mb-5 py-2"},VL={class:"media-content is-clipped"},HL=["id","textContent"],BL=["onClick"],UL={class:"media-content is-clickable is-clipped"},jL=["textContent"],qL={class:"media-right"},WL=["onClick"];function KL(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-artist");return k(),$(we,null,[(k(!0),$(we,null,lt(n.artists,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",ML,[u("div",VL,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,HL)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_artist(l.item)},[u("div",UL,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,jL)]),u("div",qL,[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,WL)])],8,BL)):H("",!0)],64))),128)),(k(),he(es,{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 Pm=te(NL,[["render",KL]]),hi={load(e){return M.library_artists("music")},set(e,t){e.artists_list=new ge(t.data)}},GL={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListArtists:Pm,TabsMusic:dr},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(t_,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(yd,e)}}}},ZL={class:"fd-page-with-tabs"},YL={class:"columns"},JL={class:"column"},XL=["textContent"],QL={class:"field"},eN={class:"control"},tN=["textContent"],nN=["textContent"],rN={key:0,class:"field"},sN={class:"control"},oN=["textContent"],aN=["textContent"],iN={class:"column"},lN=["textContent"],uN=["textContent"],cN=["textContent"];function dN(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",ZL,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"]),u("div",YL,[u("div",JL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,XL),u("div",QL,[u("div",eN,[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,tN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,nN)]),o.spotify_enabled?(k(),$("div",rN,[u("div",sN,[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,oN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,aN)])):H("",!0)]),u("div",iN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort-by.title"))},null,8,lN),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,uN),u("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:o.artists.count}))},null,8,cN)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{artists:o.artists},null,8,["artists"])]),_:1})])}const mN=te(GL,[["render",dN]]),_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)}},fN={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)}}},pN=["textContent"],hN={class:"subtitle is-6 has-text-link"},_N=["textContent"],gN={class:"buttons fd-is-centered-mobile mt-5"},yN=["textContent"],vN=["textContent"];function bN(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,pN),u("h2",hN,[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,_N)]),u("div",gN,[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,yN)]),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,vN),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 zN=te(fN,[["render",bN]]),CN={name:"TabsAudiobooks"},wN={class:"section fd-tabs-section"},kN={class:"container"},xN={class:"columns is-centered"},EN={class:"column is-four-fifths"},SN={class:"tabs is-centered is-small"},$N=["onClick","onKeypress"],AN=["textContent"],TN=["onClick","onKeypress"],ON=["textContent"],DN=["onClick","onKeypress"],PN=["textContent"];function IN(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",wN,[u("div",kN,[u("div",xN,[u("div",EN,[u("div",SN,[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,AN)],40,$N)],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,ON)],40,TN)],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,PN)],40,DN)],2)]),_:1})])])])])])])}const Im=te(CN,[["render",IN]]),gi={load(e){return M.library_albums("audiobook")},set(e,t){e.albums=new ge(t.data),e.albums.group(Rn("name_sort",!0))}},FN={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:Im,ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr},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}}},RN={class:"fd-page-with-tabs"},LN=["textContent"],NN=["textContent"];function MN(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",RN,[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,LN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:s.albums.count}))},null,8,NN)]),content:x(()=>[y(l,{albums:s.albums},null,8,["albums"])]),_:1})])}const VN=te(FN,[["render",MN]]),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)}},HN={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:cr,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)}}},BN=["textContent"],UN={class:"buttons is-centered"},jN=["textContent"],qN=["textContent"];function WN(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,BN)]),"heading-right":x(()=>[u("div",UN,[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,jN)])])]),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,qN),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 KN=te(HN,[["render",WN]]),vi={load(e){return M.library_artists("audiobook")},set(e,t){e.artists_list=new ge(t.data)}},GN={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:Im,IndexButtonList:Jn,ListArtists:Pm},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):[]}}},ZN={class:"fd-page-with-tabs"},YN=["textContent"],JN=["textContent"];function XN(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",ZN,[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,YN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,JN)]),"heading-right":x(()=>[]),content:x(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const QN=te(GN,[["render",XN]]),eM={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}})}}},tM={key:0,class:"modal is-active"},nM={class:"modal-content fd-modal-card"},rM={class:"card"},sM={class:"card-content"},oM={class:"title is-4"},aM=["textContent"],iM={class:"content is-small"},lM=["textContent"],uM=["textContent"],cM=["textContent"],dM=["textContent"],mM=["textContent"],fM=["textContent"],pM={class:"card-footer"},hM=["textContent"],_M=["textContent"],gM=["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",tM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",nM,[u("div",rM,[u("div",sM,[u("p",oM,[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,aM)]),u("div",iM,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,lM),u("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,uM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,cM),u("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,dM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,mM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,fM)])])]),u("footer",pM,[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,hM)]),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,_M)]),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,gM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Fm=te(eM,[["render",yM]]),vM={name:"ListGenres",components:{ModalDialogGenre:Fm},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}}},bM={key:0,class:"mt-6 mb-5 py-2"},zM={class:"media-content is-clipped"},CM=["id","textContent"],wM=["onClick"],kM={class:"media-content is-clickable is-clipped"},xM=["textContent"],EM={class:"media-right"},SM=["onClick"];function $M(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-genre");return k(),$(we,null,[(k(!0),$(we,null,lt(n.genres,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",bM,[u("div",zM,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,CM)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_genre(l.item)},[u("div",kM,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,xM)]),u("div",EM,[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,SM)])],8,wM)):H("",!0)],64))),128)),(k(),he(es,{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 B1=te(vM,[["render",$M]]),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"))}},AM={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:B1,TabsAudiobooks:Im},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}}},TM={class:"fd-page-with-tabs"},OM=["textContent"],DM=["textContent"];function PM(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",TM,[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,OM),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,DM)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const IM=te(AM,[["render",PM]]),FM={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}})}}},RM={key:0,class:"modal is-active"},LM={class:"modal-content fd-modal-card"},NM={class:"card"},MM={class:"card-content"},VM={class:"title is-4"},HM=["textContent"],BM=["textContent"],UM=["textContent"],jM=["textContent"],qM=["textContent"],WM=["textContent"],KM=["textContent"],GM={class:"card-footer"},ZM=["textContent"],YM=["textContent"],JM=["textContent"];function XM(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",RM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",LM,[u("div",NM,[u("div",MM,[u("p",VM,[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,HM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,BM),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,UM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,jM),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,qM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,WM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,KM)])]),u("footer",GM,[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,ZM)]),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,YM)]),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,JM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Rm=te(FM,[["render",XM]]),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)}},QM={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:cr,ModalDialogComposer:Rm},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)}}},e7=["textContent"],t7={class:"buttons is-centered"},n7=["textContent"],r7={class:"heading has-text-centered-mobile"},s7=["textContent"],o7=u("span",null," | ",-1),a7=["textContent"];function i7(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,e7)]),"heading-right":x(()=>[u("div",t7,[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,n7)])])]),content:x(()=>[u("p",r7,[u("span",{textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,s7),o7,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,a7)]),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 l7=te(QM,[["render",i7]]),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)}},u7={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListTracks:Cn,ModalDialogComposer:Rm},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:Am("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(Qh,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)}}},c7={class:"columns"},d7={class:"column"},m7=["textContent"],f7=["textContent"],p7={class:"buttons is-centered"},h7=["textContent"],_7={class:"heading has-text-centered-mobile"},g7=["textContent"],y7=u("span",null," | ",-1),v7=["textContent"];function b7(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",c7,[u("div",d7,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,m7),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,f7)]),"heading-right":x(()=>[u("div",p7,[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,h7)])])]),content:x(()=>[u("p",_7,[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,g7),y7,u("span",{textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,v7)]),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 z7=te(u7,[["render",b7]]),C7={name:"ListComposers",components:{ModalDialogComposer:Rm},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}}},w7={key:0,class:"mt-6 mb-5 py-2"},k7={class:"media-content is-clipped"},x7=["id","textContent"],E7=["onClick"],S7={class:"media-content is-clickable is-clipped"},$7=["textContent"],A7={class:"media-right"},T7=["onClick"];function O7(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-composer");return k(),$(we,null,[(k(!0),$(we,null,lt(n.composers,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",w7,[u("div",k7,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,x7)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_composer(l.item)},[u("div",S7,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,$7)]),u("div",A7,[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,T7)])],8,E7)):H("",!0)],64))),128)),(k(),he(es,{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 U1=te(C7,[["render",O7]]),wi={load(e){return M.library_composers("music")},set(e,t){e.composers=new ge(t.data),e.composers.group(Rn("name_sort"))}},D7={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListComposers:U1,TabsMusic:dr},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}}},P7={class:"fd-page-with-tabs"},I7=["textContent"],F7=["textContent"];function R7(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",P7,[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,I7),u("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:s.composers.total}))},null,8,F7)]),content:x(()=>[y(l,{composers:s.composers},null,8,["composers"])]),_:1})])}const L7=te(D7,[["render",R7]]),N7={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`)}}},M7={key:0,class:"modal is-active"},V7={class:"modal-content fd-modal-card"},H7={class:"card"},B7={class:"card-content"},U7=["textContent"],j7={class:"card-footer"},q7=["textContent"],W7=["textContent"],K7=["textContent"];function G7(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",M7,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",V7,[u("div",H7,[u("div",B7,[u("p",{class:"title is-4",textContent:g(n.directory)},null,8,U7)]),u("footer",j7,[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,q7)]),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,W7)]),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,K7)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const j1=te(N7,[["render",G7]]),Z7={name:"ListDirectories",components:{ModalDialogDirectory:j1},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}}},Y7={class:"media-left is-clickable"},J7=u("div",{class:"media-content is-clickable is-clipped"},[u("h1",{class:"title is-6"},"..")],-1),X7={class:"media-right"},Q7=["onClick"],e9={class:"media-left is-clickable"},t9={class:"media-content is-clickable is-clipped"},n9=["textContent"],r9=["textContent"],s9={class:"media-right"},o9=["onClick"];function a9(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",Y7,[y(a,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),J7,u("div",X7,[st(e.$slots,"actions")])])):H("",!0),(k(!0),$(we,null,lt(n.directories,l=>(k(),$("div",{key:l.path,class:"media is-align-items-center",onClick:c=>o.open_directory(l)},[u("figure",e9,[y(a,{class:"icon",name:"folder",size:"16"})]),u("div",t9,[u("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,n9),u("h2",{class:"subtitle is-7 has-text-grey-light",textContent:g(l.path)},null,8,r9)]),u("div",s9,[u("a",{onClick:nt(c=>o.open_dialog(l),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,o9)])],8,Q7))),128)),(k(),he(es,{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 i9=te(Z7,[["render",a9]]),l9={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}})}}},u9={key:0,class:"modal is-active"},c9={class:"modal-content fd-modal-card"},d9={class:"card"},m9={class:"card-content"},f9={class:"title is-4"},p9=["textContent"],h9={class:"content is-small"},_9=["textContent"],g9=["textContent"],y9=["textContent"],v9=["textContent"],b9={key:0},z9=["textContent"],C9=["textContent"],w9={key:0,class:"card-footer"},k9=["textContent"],x9=["textContent"],E9=["textContent"];function S9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",u9,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",c9,[u("div",d9,[u("div",m9,[u("p",f9,[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,p9)]),u("div",h9,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,_9),u("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,g9)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,y9),u("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,v9)]),n.playlist.folder?H("",!0):(k(),$("p",b9,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,z9),u("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,C9)]))])]),n.playlist.folder?H("",!0):(k(),$("footer",w9,[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,k9)]),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,x9)]),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,E9)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const q1=te(l9,[["render",S9]]),$9={name:"ListPlaylists",components:{ModalDialogPlaylist:q1},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"}}},A9=["onClick"],T9={class:"media-left is-clickable"},O9={class:"media-content is-clickable is-clipped"},D9=["textContent"],P9={class:"media-right"},I9=["onClick"];function F9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-playlist");return k(),$(we,null,[(k(!0),$(we,null,lt(n.playlists,l=>(k(),$("div",{key:l.itemId,class:"media is-align-items-center",onClick:c=>o.open_playlist(l.item)},[u("figure",T9,[y(a,{class:"icon",name:o.icon_name(l.item),size:"16"},null,8,["name"])]),u("div",O9,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,D9)]),u("div",P9,[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,I9)])],8,A9))),128)),(k(),he(es,{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 Lm=te($9,[["render",F9]]),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)}},R9={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:i9,ListPlaylists:Lm,ListTracks:Cn,ModalDialogDirectory:j1},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)}}},L9=["textContent"],N9=["textContent"],M9={class:"buttons is-centered"},V9=["textContent"];function H9(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,L9),u("p",{class:"title is-7 has-text-grey",textContent:g(o.current_directory)},null,8,N9)]),"heading-right":x(()=>[u("div",M9,[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,V9)])])]),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 B9=te(R9,[["render",H9]]),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))}},U9={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr,ModalDialogGenre:Fm},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)}}},j9=["textContent"],q9={class:"buttons is-centered"},W9=["textContent"],K9={class:"heading has-text-centered-mobile"},G9=["textContent"],Z9=u("span",null," | ",-1),Y9=["textContent"];function J9(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,j9)]),"heading-right":x(()=>[u("div",q9,[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,W9)])])]),content:x(()=>[u("p",K9,[u("span",{textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,G9),Z9,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,Y9)]),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 X9=te(U9,[["render",J9]]),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)}},Q9={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListTracks:Cn,ModalDialogGenre:Fm},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:Am("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(e_,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)}}},eV={class:"columns"},tV={class:"column"},nV=["textContent"],rV=["textContent"],sV={class:"buttons is-centered"},oV=["textContent"],aV={class:"heading has-text-centered-mobile"},iV=["textContent"],lV=u("span",null," | ",-1),uV=["textContent"];function cV(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",eV,[u("div",tV,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort-by.title"))},null,8,nV),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,rV)]),"heading-right":x(()=>[u("div",sV,[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,oV)])])]),content:x(()=>[u("p",aV,[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,iV),lV,u("span",{textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,uV)]),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 dV=te(Q9,[["render",cV]]),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"))}},mV={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:B1,TabsMusic:dr},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}}},fV={class:"fd-page-with-tabs"},pV=["textContent"],hV=["textContent"];function _V(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",fV,[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,pV),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,hV)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const gV=te(mV,[["render",_V]]),$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)}},yV={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:cr,ListTracks:Cn,TabsMusic:dr},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:{}}}},vV={class:"fd-page-with-tabs"},bV=["textContent"],zV={class:"level"},CV={class:"level-item"},wV=["textContent"],kV={class:"level"},xV={class:"level-item"};function EV(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",vV,[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,bV)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),footer:x(()=>[u("nav",zV,[u("p",CV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:x(()=>[_t(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,wV)]),content:x(()=>[y(m,{tracks:s.recently_played},null,8,["tracks"])]),footer:x(()=>[u("nav",kV,[u("p",xV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:x(()=>[_t(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const SV=te(yV,[["render",EV]]),$V={name:"ListItemPlaylistSpotify",props:["playlist"],methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},AV={class:"media is-align-items-center"},TV=["textContent"],OV=["textContent"],DV={class:"media-right"};function PV(e,t,n,r,s,o){return k(),$("div",AV,[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,TV),u("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,OV)]),u("div",DV,[st(e.$slots,"actions")])])}const Nm=te($V,[["render",PV]]),IV={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}})}}},FV={key:0,class:"modal is-active"},RV={class:"modal-content fd-modal-card"},LV={class:"card"},NV={class:"card-content"},MV={class:"title is-4"},VV=["textContent"],HV={class:"content is-small"},BV=["textContent"],UV=["textContent"],jV=["textContent"],qV=["textContent"],WV=["textContent"],KV=["textContent"],GV={class:"card-footer"},ZV=["textContent"],YV=["textContent"],JV=["textContent"];function XV(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",FV,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",RV,[u("div",LV,[u("div",NV,[u("p",MV,[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,VV)]),u("div",HV,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,BV),u("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,UV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,jV),u("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,qV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,WV),u("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,KV)])])]),u("footer",GV,[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,ZV)]),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,YV)]),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,JV)])])])]),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(IV,[["render",XV]]),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(hd,t[0].albums.items),Ue.commit(_d,t[1].playlists.items))}},QV={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ListItemPlaylistSpotify:Nm,ModalDialogAlbumSpotify:Ma,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},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:""}}},eH={class:"fd-page-with-tabs"},tH=["textContent"],nH=["onClick"],rH={class:"level"},sH={class:"level-item"},oH=["textContent"],aH=["onClick"],iH={class:"level"},lH={class:"level-item"};function uH(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",eH,[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,tH)]),content:x(()=>[(k(!0),$(we,null,lt(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,nH)]),_: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",rH,[u("p",sH,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:x(()=>[_t(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,oH)]),content:x(()=>[(k(!0),$(we,null,lt(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,aH)]),_: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",iH,[u("p",lH,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:x(()=>[_t(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const cH=te(QV,[["render",uH]]),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(hd,t.albums.items)}},dH={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,TabsMusic:dr},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:""}}},mH={class:"fd-page-with-tabs"},fH=["textContent"],pH=["onClick"];function hH(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",mH,[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,fH)]),content:x(()=>[(k(!0),$(we,null,lt(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,pH)]),_: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 _H=te(dH,[["render",hH]]),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(_d,t.playlists.items)}},gH={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:Nm,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},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}}},yH={class:"fd-page-with-tabs"},vH=["textContent"],bH=["onClick"];function zH(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",yH,[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,vH)]),content:x(()=>[(k(!0),$(we,null,lt(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,bH)]),_: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 CH=te(gH,[["render",zH]]),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(m5("time_added",{direction:"desc"}))}},wH={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,TabsMusic:dr,ListAlbums:cr},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}}},kH={class:"fd-page-with-tabs"},xH=["textContent"];function EH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("content-with-heading");return k(),$("div",kH,[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,xH)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),_:1})])}const SH=te(wH,[["render",EH]]),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)}},$H={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,TabsMusic:dr,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:{}}}},AH={class:"fd-page-with-tabs"},TH=["textContent"];function OH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-tracks"),l=E("content-with-heading");return k(),$("div",AH,[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,TH)]),content:x(()=>[y(i,{tracks:s.recently_played},null,8,["tracks"])]),_:1})])}const DH=te($H,[["render",OH]]),PH={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{},Gn=Array.isArray,DT=/\/$/,PT=e=>e.replace(DT,"");function Wu(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=LT(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:s,hash:a}}function IT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Yp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function FT(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])&&qv(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 qv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!RT(e[n],t[n]))return!1;return!0}function RT(e,t){return Gn(e)?Jp(e,t):Gn(t)?Jp(t,e):e===t}function Jp(e,t){return Gn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function LT(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 NT(e){if(!e)if(Vs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PT(e)}const MT=/^[^#]+#/;function VT(e,t){return e.replace(MT,"#")+t}function HT(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 BT(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=HT(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 Xp(e,t){return(history.state?history.state.position-t:-1)+e}const Xc=new Map;function UT(e,t){Xc.set(e,t)}function jT(e){const t=Xc.get(e);return Xc.delete(e),t}let qT=()=>location.protocol+"//"+location.host;function Wv(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),Yp(l,"")}return Yp(n,e)+r+s}function WT(e,t,n,r){let s=[],o=[],a=null;const i=({state:f})=>{const p=Wv(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(it({},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 Qp(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 KT(e){const{history:t,location:n}=window,r={value:Wv(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:qT()+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=it({},t.state,Qp(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=it({},s.value,t.state,{forward:l,scroll:cu()});o(m.current,m,!0);const d=it({},Qp(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 GT(e){e=NT(e);const t=KT(e),n=WT(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=it({location:"",base:e,go:r,createHref:VT.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 ZT(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),GT(e)}function YT(e){return typeof e=="string"||e&&typeof e=="object"}function Kv(e){return typeof e=="string"||typeof e=="symbol"}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Gv=Symbol("");var eh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(eh||(eh={}));function co(e,t){return it(new Error,{type:e,[Gv]:!0},t)}function mr(e,t){return e instanceof Error&&Gv in e&&(t==null||!!(e.type&t))}const th="[^/]+?",JT={sensitive:!1,strict:!1,start:!0,end:!0},XT=/[.+*?^${}()[\]/\\]/g;function QT(e,t){const n=it({},JT,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 tO(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const nO={type:0,value:""},rO=/[a-zA-Z0-9_]/;function sO(e){if(!e)return[[]];if(e==="/")return[[nO]];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(Kv(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||!Zv(m,n[d]));)d++;n.splice(d,0,m),m.record.name&&!sh(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=it(rh(d.params,f.keys.filter(C=>!C.optional).map(C=>C.name)),m.params&&rh(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=it({},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:uO(b)}}return e.forEach(m=>o(m)),{addRoute:o,resolve:c,removeRoute:a,getRoutes:i,getRecordMatcher:s}}function rh(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function iO(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:lO(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 lO(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 sh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uO(e){return e.reduce((t,n)=>it(t,n.meta),{})}function oh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Zv(e,t){return t.children.some(n=>n===e||Zv(e,n))}const Yv=/#/g,cO=/&/g,dO=/\//g,mO=/=/g,fO=/\?/g,Jv=/\+/g,pO=/%5B/g,hO=/%5D/g,Xv=/%5E/g,_O=/%60/g,Qv=/%7B/g,gO=/%7C/g,e1=/%7D/g,yO=/%20/g;function Cm(e){return encodeURI(""+e).replace(gO,"|").replace(pO,"[").replace(hO,"]")}function vO(e){return Cm(e).replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function Qc(e){return Cm(e).replace(Jv,"%2B").replace(yO,"+").replace(Yv,"%23").replace(cO,"%26").replace(_O,"`").replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function bO(e){return Qc(e).replace(mO,"%3D")}function zO(e){return Cm(e).replace(Yv,"%23").replace(fO,"%3F")}function CO(e){return e==null?"":zO(e).replace(dO,"%2F")}function wl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function wO(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Qc(o)):[r&&Qc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function kO(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 xO=Symbol(""),ih=Symbol(""),wm=Symbol(""),t1=Symbol(""),ed=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):YT(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 Ku(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(EO(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=OT(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 EO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function lh(e){const t=qn(wm),n=qn(t1),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=uh(l[c-2]);return c>1&&uh(m)===p&&d[d.length-1].path!==p?d.findIndex(uo.bind(null,l[c-2])):f}),o=Nt(()=>s.value>-1&&TO(n.params,r.value.params)),a=Nt(()=>s.value>-1&&s.value===n.matched.length-1&&qv(n.params,r.value.params));function i(l={}){return AO(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 SO=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:lh,setup(e,{slots:t}){const n=_o(lh(e)),{options:r}=qn(wm),s=Nt(()=>({[ch(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[ch(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)}}}),$O=SO;function AO(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 TO(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 uh(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ch=(e,t,n)=>e??t??n,OO=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(ed),s=Nt(()=>e.route||r.value),o=qn(ih,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(ih,Nt(()=>a.value+1)),Go(xO,i),Go(ed,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 dh(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,it({},h,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[m]=null)},ref:l}));return dh(n.default,{Component:b,route:c})||b}}});function dh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const DO=OO;function PO(e){const t=aO(e.routes,e),n=e.parseQuery||wO,r=e.stringifyQuery||ah,s=e.history,o=Oo(),a=Oo(),i=Oo(),l=k_(Pr);let c=Pr;Vs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=qu.bind(null,j=>""+j),d=qu.bind(null,CO),f=qu.bind(null,wl);function p(j,ue){let se,ve;return Kv(j)?(se=t.getRecordMatcher(j),ve=ue):ve=j,t.addRoute(ve,se)}function h(j){const ue=t.getRecordMatcher(j);ue&&t.removeRoute(ue)}function _(){return t.getRoutes().map(j=>j.record)}function b(j){return!!t.getRecordMatcher(j)}function w(j,ue){if(ue=it({},ue||l.value),typeof j=="string"){const I=Wu(n,j,ue.path),G=t.resolve({path:I.path},ue),Y=s.createHref(I.fullPath);return it(I,G,{params:f(G.params),hash:wl(I.hash),redirectedFrom:void 0,href:Y})}let se;if("path"in j)se=it({},j,{path:Wu(n,j.path,ue.path).path});else{const I=it({},j.params);for(const G in I)I[G]==null&&delete I[G];se=it({},j,{params:d(I)}),ue.params=d(ue.params)}const ve=t.resolve(se,ue),Be=j.hash||"";ve.params=m(f(ve.params));const T=IT(r,it({},j,{hash:vO(Be),path:ve.path})),O=s.createHref(T);return it({fullPath:T,hash:Be,query:r===ah?kO(j.query):j.query||{}},ve,{redirectedFrom:void 0,href:O})}function C(j){return typeof j=="string"?Wu(n,j,l.value.path):it({},j)}function z(j,ue){if(c!==j)return co(8,{from:ue,to:j})}function v(j){return D(j)}function S(j){return v(it(C(j),{replace:!0}))}function A(j){const ue=j.matched[j.matched.length-1];if(ue&&ue.redirect){const{redirect:se}=ue;let ve=typeof se=="function"?se(j):se;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=C(ve):{path:ve},ve.params={}),it({query:j.query,hash:j.hash,params:"path"in ve?{}:j.params},ve)}}function D(j,ue){const se=c=w(j),ve=l.value,Be=j.state,T=j.force,O=j.replace===!0,I=A(se);if(I)return D(it(C(I),{state:typeof I=="object"?it({},Be,I.state):Be,force:T,replace:O}),ue||se);const G=se;G.redirectedFrom=ue;let Y;return!T&&FT(r,ve,se)&&(Y=co(16,{to:G,from:ve}),Ge(ve,ve,!0,!1)),(Y?Promise.resolve(Y):V(G,ve)).catch(X=>mr(X)?mr(X,2)?X:at(X):oe(X,G,ve)).then(X=>{if(X){if(mr(X,2))return D(it({replace:O},C(X.to),{state:typeof X.to=="object"?it({},Be,X.to.state):Be,force:T}),ue||G)}else X=W(G,ve,!0,O,Be);return Z(G,ve,X),X})}function F(j,ue){const se=z(j,ue);return se?Promise.reject(se):Promise.resolve()}function P(j){const ue=ft.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(j):j()}function V(j,ue){let se;const[ve,Be,T]=IO(j,ue);se=Ku(ve.reverse(),"beforeRouteLeave",j,ue);for(const I of ve)I.leaveGuards.forEach(G=>{se.push(Mr(G,j,ue))});const O=F.bind(null,j,ue);return se.push(O),Ne(se).then(()=>{se=[];for(const I of o.list())se.push(Mr(I,j,ue));return se.push(O),Ne(se)}).then(()=>{se=Ku(Be,"beforeRouteUpdate",j,ue);for(const I of Be)I.updateGuards.forEach(G=>{se.push(Mr(G,j,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,j,ue));else se.push(Mr(I.beforeEnter,j,ue));return se.push(O),Ne(se)}).then(()=>(j.matched.forEach(I=>I.enterCallbacks={}),se=Ku(T,"beforeRouteEnter",j,ue),se.push(O),Ne(se))).then(()=>{se=[];for(const I of a.list())se.push(Mr(I,j,ue));return se.push(O),Ne(se)}).catch(I=>mr(I,8)?I:Promise.reject(I))}function Z(j,ue,se){i.list().forEach(ve=>P(()=>ve(j,ue,se)))}function W(j,ue,se,ve,Be){const T=z(j,ue);if(T)return T;const O=ue===Pr,I=Vs?history.state:{};se&&(ve||O?s.replace(j.fullPath,it({scroll:O&&I&&I.scroll},Be)):s.push(j.fullPath,Be)),l.value=j,Ge(j,ue,se,O),at()}let U;function Q(){U||(U=s.listen((j,ue,se)=>{if(!pt.listening)return;const ve=w(j),Be=A(ve);if(Be){D(it(Be,{replace:!0}),ve).catch(ta);return}c=ve;const T=l.value;Vs&&UT(Xp(T.fullPath,se.delta),cu()),V(ve,T).catch(O=>mr(O,12)?O:mr(O,2)?(D(O.to,ve).then(I=>{mr(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||W(ve,T,!1),O&&(se.delta&&!mr(O,8)?s.go(-se.delta,!1):se.type===Ca.pop&&mr(O,20)&&s.go(-1,!1)),Z(ve,T,O)}).catch(ta)}))}let me=Oo(),K=Oo(),re;function oe(j,ue,se){at(j);const ve=K.list();return ve.length?ve.forEach(Be=>Be(j,ue,se)):console.error(j),Promise.reject(j)}function Fe(){return re&&l.value!==Pr?Promise.resolve():new Promise((j,ue)=>{me.add([j,ue])})}function at(j){return re||(re=!j,Q(),me.list().forEach(([ue,se])=>j?se(j):ue()),me.reset()),j}function Ge(j,ue,se,ve){const{scrollBehavior:Be}=e;if(!Vs||!Be)return Promise.resolve();const T=!se&&jT(Xp(j.fullPath,0))||(ve||!se)&&history.state&&history.state.scroll||null;return Sa().then(()=>Be(j,ue,T)).then(O=>O&&BT(O)).catch(O=>oe(O,j,ue))}const je=j=>s.go(j);let ut;const ft=new Set,pt={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(j){const ue=this;j.component("RouterLink",$O),j.component("RouterView",DO),j.config.globalProperties.$router=ue,Object.defineProperty(j.config.globalProperties,"$route",{enumerable:!0,get:()=>vn(l)}),Vs&&!ut&&l.value===Pr&&(ut=!0,v(s.location).catch(Be=>{}));const se={};for(const Be in Pr)Object.defineProperty(se,Be,{get:()=>l.value[Be],enumerable:!0});j.provide(wm,ue),j.provide(t1,$d(se)),j.provide(ed,l);const ve=j.unmount;ft.add(j),j.unmount=function(){ft.delete(j),ft.size<1&&(c=Pr,U&&U(),U=null,l.value=Pr,ut=!1,re=!1),ve()}}};function Ne(j){return j.reduce((ue,se)=>ue.then(()=>P(se)),Promise.resolve())}return pt}function IO(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 FO={name:"PageAbout",computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{showUpdateDialog(){this.$store.commit(ka,!0)}}},RO={class:"section"},LO={class:"container"},NO={class:"columns is-centered"},MO={class:"column is-four-fifths has-text-centered-mobile"},VO=["textContent"],HO={class:"section"},BO={class:"container"},UO={class:"columns is-centered"},jO={class:"column is-four-fifths"},qO={class:"content"},WO={class:"level is-mobile"},KO={class:"level-left"},GO={class:"level-item"},ZO=["textContent"],YO={class:"level-right"},JO={key:0},XO=["textContent"],QO={key:1},e3=["textContent"],t3={class:"table"},n3=["textContent"],r3=["textContent"],s3=["textContent"],o3=["textContent"],a3=["textContent"],i3=["textContent"],l3=["textContent"],u3=["textContent"],c3=["textContent"],d3={class:"has-text-right"},m3=["textContent"],f3=["textContent"],p3=["textContent"],h3={class:"has-text-right"},_3=["textContent"],g3=["textContent"],y3={class:"section"},v3={class:"container"},b3={class:"columns is-centered"},z3={class:"column is-four-fifths"},C3={class:"content has-text-centered-mobile"},w3=["textContent"],k3=["textContent"],x3=u("a",{href:"https://bulma.io"},"Bulma",-1),E3=u("a",{href:"https://pictogrammers.com/library/mdi/"},"Material Design Icons",-1),S3=u("a",{href:"https://vuejs.org/"},"Vue.js",-1),$3=u("a",{href:"https://github.com/mzabriskie/axios"},"axios",-1),A3=["textContent"];function T3(e,t,n,r,s,o){const a=E("i18n-t");return k(),$("div",null,[u("section",RO,[u("div",LO,[u("div",NO,[u("div",MO,[u("h1",{class:"title is-4",textContent:g(o.config.library_name)},null,8,VO)])])])]),u("section",HO,[u("div",BO,[u("div",UO,[u("div",jO,[u("div",qO,[u("nav",WO,[u("div",KO,[u("div",GO,[u("h2",{class:"title is-5",textContent:g(e.$t("page.about.library"))},null,8,ZO)])]),u("div",YO,[o.library.updating?(k(),$("div",JO,[u("a",{class:"button is-small is-loading",textContent:g(e.$t("page.about.update"))},null,8,XO)])):(k(),$("div",QO,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=i=>o.showUpdateDialog()),textContent:g(e.$t("page.about.update"))},null,8,e3)]))])]),u("table",t3,[u("tbody",null,[u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.artists"))},null,8,n3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.artists))},null,8,r3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.albums"))},null,8,s3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.albums))},null,8,o3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.tracks"))},null,8,a3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.songs))},null,8,i3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.total-playtime"))},null,8,l3),u("td",{class:"has-text-right",textContent:g(e.$filters.durationInDays(o.library.db_playtime*1e3))},null,8,u3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.updated"))},null,8,c3),u("td",d3,[u("span",{textContent:g(e.$t("page.about.updated-on",{time:e.$filters.timeFromNow(o.library.updated_at)}))},null,8,m3),_t(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.updated_at))},null,8,f3),_t(") ")])]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.uptime"))},null,8,p3),u("td",h3,[u("span",{textContent:g(e.$filters.timeFromNow(o.library.started_at,!0))},null,8,_3),_t(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.started_at))},null,8,g3),_t(") ")])])])])])])])])]),u("section",y3,[u("div",v3,[u("div",b3,[u("div",z3,[u("div",C3,[u("p",{class:"is-size-7",textContent:g(e.$t("page.about.version",{version:o.config.version}))},null,8,w3),u("p",{class:"is-size-7",textContent:g(e.$t("page.about.compiled-with",{options:o.config.buildoptions.join(", ")}))},null,8,k3),y(a,{tag:"p",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:x(()=>[x3]),mdi:x(()=>[E3]),vuejs:x(()=>[S3]),axios:x(()=>[$3]),others:x(()=>[u("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:g(e.$t("page.about.more"))},null,8,A3)]),_:1})])])])])])])}const O3=te(FO,[["render",T3]]),D3={},P3={class:"hero is-light is-bold"},I3={class:"hero-body"},F3={class:"container"},R3={class:"columns is-centered"},L3={class:"column is-four-fifths"},N3={class:"columns is-flex-direction-row-reverse"},M3={class:"column fd-has-cover"},V3={class:"column m-auto is-three-fifths has-text-centered-mobile"},H3={class:"section pt-0"},B3={class:"container"},U3={class:"columns is-centered"},j3={class:"column is-four-fifths"};function q3(e,t){return k(),$(we,null,[u("section",P3,[u("div",I3,[u("div",F3,[u("div",R3,[u("div",L3,[u("div",N3,[u("div",M3,[st(e.$slots,"heading-right")]),u("div",V3,[st(e.$slots,"heading-left")])])])])])])]),u("section",H3,[u("div",B3,[u("div",U3,[u("div",j3,[st(e.$slots,"content"),st(e.$slots,"footer")])])])])],64)}const du=te(D3,[["render",q3]]);var n1={exports:{}},W3=[{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=W3,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}})(n1);var K3=n1.exports,G3=1/0,Z3="[object Symbol]",Y3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r1="\\ud800-\\udfff",J3="\\u0300-\\u036f\\ufe20-\\ufe23",X3="\\u20d0-\\u20f0",s1="\\u2700-\\u27bf",o1="a-z\\xdf-\\xf6\\xf8-\\xff",Q3="\\xac\\xb1\\xd7\\xf7",e6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",t6="\\u2000-\\u206f",n6=" \\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",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",r6="\\ufe0e\\ufe0f",i1=Q3+e6+t6+n6,l1="['’]",mh="["+i1+"]",s6="["+J3+X3+"]",u1="\\d+",o6="["+s1+"]",c1="["+o1+"]",d1="[^"+r1+i1+u1+s1+o1+a1+"]",a6="\\ud83c[\\udffb-\\udfff]",i6="(?:"+s6+"|"+a6+")",l6="[^"+r1+"]",m1="(?:\\ud83c[\\udde6-\\uddff]){2}",f1="[\\ud800-\\udbff][\\udc00-\\udfff]",Hs="["+a1+"]",u6="\\u200d",fh="(?:"+c1+"|"+d1+")",c6="(?:"+Hs+"|"+d1+")",ph="(?:"+l1+"(?:d|ll|m|re|s|t|ve))?",hh="(?:"+l1+"(?:D|LL|M|RE|S|T|VE))?",p1=i6+"?",h1="["+r6+"]?",d6="(?:"+u6+"(?:"+[l6,m1,f1].join("|")+")"+h1+p1+")*",m6=h1+p1+d6,f6="(?:"+[o6,m1,f1].join("|")+")"+m6,p6=RegExp([Hs+"?"+c1+"+"+ph+"(?="+[mh,Hs,"$"].join("|")+")",c6+"+"+hh+"(?="+[mh,Hs+fh,"$"].join("|")+")",Hs+"?"+fh+"+"+ph,Hs+"+"+hh,u1,f6].join("|"),"g"),h6=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,g6=typeof self=="object"&&self&&self.Object===Object&&self,y6=_6||g6||Function("return this")();function v6(e){return e.match(Y3)||[]}function b6(e){return h6.test(e)}function z6(e){return e.match(p6)||[]}var C6=Object.prototype,w6=C6.toString,_h=y6.Symbol,gh=_h?_h.prototype:void 0,yh=gh?gh.toString:void 0;function k6(e){if(typeof e=="string")return e;if(E6(e))return yh?yh.call(e):"";var t=e+"";return t=="0"&&1/e==-G3?"-0":t}function x6(e){return!!e&&typeof e=="object"}function E6(e){return typeof e=="symbol"||x6(e)&&w6.call(e)==Z3}function S6(e){return e==null?"":k6(e)}function $6(e,t,n){return e=S6(e),t=n?void 0:t,t===void 0?b6(e)?z6(e):v6(e):e.match(t)||[]}var A6=$6,T6=1/0,O6="[object Symbol]",D6=/^\s+/,km="\\ud800-\\udfff",_1="\\u0300-\\u036f\\ufe20-\\ufe23",g1="\\u20d0-\\u20f0",y1="\\ufe0e\\ufe0f",P6="["+km+"]",td="["+_1+g1+"]",nd="\\ud83c[\\udffb-\\udfff]",I6="(?:"+td+"|"+nd+")",v1="[^"+km+"]",b1="(?:\\ud83c[\\udde6-\\uddff]){2}",z1="[\\ud800-\\udbff][\\udc00-\\udfff]",C1="\\u200d",w1=I6+"?",k1="["+y1+"]?",F6="(?:"+C1+"(?:"+[v1,b1,z1].join("|")+")"+k1+w1+")*",R6=k1+w1+F6,L6="(?:"+[v1+td+"?",td,b1,z1,P6].join("|")+")",N6=RegExp(nd+"(?="+nd+")|"+L6+R6,"g"),M6=RegExp("["+C1+km+_1+g1+y1+"]"),V6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,H6=typeof self=="object"&&self&&self.Object===Object&&self,B6=V6||H6||Function("return this")();function U6(e){return e.split("")}function j6(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function G6(e){return M6.test(e)}function vh(e){return G6(e)?Z6(e):U6(e)}function Z6(e){return e.match(N6)||[]}var Y6=Object.prototype,J6=Y6.toString,bh=B6.Symbol,zh=bh?bh.prototype:void 0,Ch=zh?zh.toString:void 0;function X6(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:X6(e,t,n)}function e4(e){return!!e&&typeof e=="object"}function t4(e){return typeof e=="symbol"||e4(e)&&J6.call(e)==O6}function n4(e){return e==null?"":x1(e)}function r4(e,t,n){if(e=n4(e),e&&(n||t===void 0))return e.replace(D6,"");if(!e||!(t=x1(t)))return e;var r=vh(e),s=K6(r,vh(t));return Q6(r,s).join("")}var s4=r4,rd=1/0,o4=9007199254740991,a4=17976931348623157e292,wh=NaN,i4="[object Symbol]",l4=/^\s+|\s+$/g,u4=/^[-+]0x[0-9a-f]+$/i,c4=/^0b[01]+$/i,d4=/^0o[0-7]+$/i,xm="\\ud800-\\udfff",E1="\\u0300-\\u036f\\ufe20-\\ufe23",S1="\\u20d0-\\u20f0",$1="\\ufe0e\\ufe0f",m4="["+xm+"]",sd="["+E1+S1+"]",od="\\ud83c[\\udffb-\\udfff]",f4="(?:"+sd+"|"+od+")",A1="[^"+xm+"]",T1="(?:\\ud83c[\\udde6-\\uddff]){2}",O1="[\\ud800-\\udbff][\\udc00-\\udfff]",D1="\\u200d",P1=f4+"?",I1="["+$1+"]?",p4="(?:"+D1+"(?:"+[A1,T1,O1].join("|")+")"+I1+P1+")*",h4=I1+P1+p4,_4="(?:"+[A1+sd+"?",sd,T1,O1,m4].join("|")+")",ad=RegExp(od+"(?="+od+")|"+_4+h4,"g"),g4=RegExp("["+D1+xm+E1+S1+$1+"]"),y4=parseInt,v4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,b4=typeof self=="object"&&self&&self.Object===Object&&self,z4=v4||b4||Function("return this")(),C4=k4("length");function w4(e){return e.split("")}function k4(e){return function(t){return t==null?void 0:t[e]}}function Em(e){return g4.test(e)}function F1(e){return Em(e)?E4(e):C4(e)}function x4(e){return Em(e)?S4(e):w4(e)}function E4(e){for(var t=ad.lastIndex=0;ad.test(e);)t++;return t}function S4(e){return e.match(ad)||[]}var $4=Object.prototype,A4=$4.toString,kh=z4.Symbol,T4=Math.ceil,O4=Math.floor,xh=kh?kh.prototype:void 0,Eh=xh?xh.toString:void 0;function Sh(e,t){var n="";if(!e||t<1||t>o4)return n;do t%2&&(n+=e),t=O4(t/2),t&&(e+=e);while(t);return n}function D4(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:D4(e,t,n)}function I4(e,t){t=t===void 0?" ":R1(t);var n=t.length;if(n<2)return n?Sh(t,e):t;var r=Sh(t,T4(e/F1(t)));return Em(t)?P4(x4(r),0,e).join(""):r.slice(0,e)}function $h(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function F4(e){return!!e&&typeof e=="object"}function L1(e){return typeof e=="symbol"||F4(e)&&A4.call(e)==i4}function R4(e){if(!e)return e===0?e:0;if(e=N4(e),e===rd||e===-rd){var t=e<0?-1:1;return t*a4}return e===e?e:0}function L4(e){var t=R4(e),n=t%1;return t===t?n?t-n:t:0}function N4(e){if(typeof e=="number")return e;if(L1(e))return wh;if($h(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$h(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(l4,"");var n=c4.test(e);return n||d4.test(e)?y4(e.slice(2),n?2:8):u4.test(e)?wh:+e}function M4(e){return e==null?"":R1(e)}function V4(e,t,n){e=M4(e),t=L4(t);var r=t?F1(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",U4=`#?[${wa}]{3}[${wa}]?`,j4=`#?[${wa}]{6}([${wa}]{2})?`,q4=new RegExp(`[^#${wa}]`,"gi"),W4=new RegExp(`^${U4}$|^${j4}$`,"i");var K4=(e,t={})=>{if(typeof e!="string"||q4.test(e)||!W4.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}},G4=K3,Z4=A6,Y4=s4,J4=H4,X4=B4,N1=K4;const Gu=.75,Zu=.25,Yu=16777215,Q4=49979693;var e5=function(e){return"#"+r5(String(JSON.stringify(e)))};function t5(e){var t=Z4(e),n=[];return t.forEach(function(r){var s=G4(r);s&&n.push(N1(Y4(s,"#"),{format:"array"}))}),n}function n5(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 r5(e){var t,n=t5(e);n.length>0&&(t=n5(n));var r=1,s=0,o=1;if(e.length>0)for(var a=0;as&&(s=e[a].charCodeAt(0)),o=parseInt(Yu/s),r=(r+e[a].charCodeAt(0)*o*Q4)%Yu;var i=(r*e.length%Yu).toString(16);i=J4(i,6,i);var l=N1(i,{format:"array"});return t?X4(Zu*l[0]+Gu*t[0],Zu*l[1]+Gu*t[1],Zu*l[2]+Gu*t[2]):i}const s5=Ia(e5);function o5(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 a5(e){return o5(e)?"#000000":"#ffffff"}function i5(e){const t=` ${e.caption} `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(t)}`}function l5(e,t,n){const r=s5(t),s=a5(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 i5(o)}const u5={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 l5(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 c5(e,t,n,r,s,o){const a=Nd("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(u5,[["render",c5]]),{t:Ju,locale:Sm}=su.global,M1="GROUP_KEY_NONE";function $m(){return{compareFn:null,groupKeyFn:e=>M1}}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,Sm.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 Am(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 d5(e,t="asc",n=1){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o-a;return t==="asc"?i:i*-1},groupKeyFn:r=>r[e]||n}}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,Sm.value);return t==="asc"?i:i*-1},groupKeyFn:r=>(r[e]||n).substring(0,4)}}function m5(e,t="0000"){return{compareFn:(n,r)=>{const s=n[e]||t;return(r[e]||t).localeCompare(s,Sm.value)},groupKeyFn:n=>{const r=n[e];if(!r)return t;const s=new Date().getTime()-new Date(r).getTime();return s<864e5?Ju("group-by-list.today"):s<6048e5?Ju("group-by-list.last-week"):s<2592e6?Ju("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($m())}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]!==M1))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})(V1);var f5=V1.exports;const Yn=Ia(f5),p5={name:"ModalDialogTrack",props:["show","track"],emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"&&this.track.media_kind!=="podcast"){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:{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")})},open_album(){this.track.data_kind==="spotify"&&this.track.media_kind!=="podcast"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):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.track.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_album_artist(){this.track.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.track.media_kind==="music"||this.track.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}}):this.track.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-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}})},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)}}},h5={key:0,class:"modal is-active"},_5={class:"modal-content fd-modal-card"},g5={class:"card"},y5={class:"card-content"},v5=["textContent"],b5=["textContent"],z5={key:0,class:"buttons"},C5=["textContent"],w5=["textContent"],k5={class:"content is-small"},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={key:5},H5=["textContent"],B5=["textContent"],U5={key:6},j5=["textContent"],q5=["textContent"],W5={key:7},K5=["textContent"],G5=["textContent"],Z5=["textContent"],Y5=["textContent"],J5=["textContent"],X5={class:"title is-6"},Q5=["textContent"],eD={key:8},tD=["textContent"],nD={class:"title is-6"},rD=["textContent"],sD=["textContent"],oD=["textContent"],aD=["textContent"],iD=["textContent"],lD=["textContent"],uD=["textContent"],cD=["textContent"],dD={key:9},mD=["textContent"],fD=["textContent"],pD={class:"card-footer"},hD=["textContent"],_D=["textContent"],gD=["textContent"];function yD(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",h5,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",_5,[u("div",g5,[u("div",y5,[u("p",{class:"title is-4",textContent:g(n.track.title)},null,8,v5),u("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,b5),n.track.media_kind==="podcast"?(k(),$("div",z5,[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,C5)):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,w5)):H("",!0)])):H("",!0),u("div",k5,[n.track.album?(k(),$("p",x5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,E5),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,S5)])):H("",!0),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),$("p",$5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,A5),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...i)=>o.open_album_artist&&o.open_album_artist(...i)),textContent:g(n.track.album_artist)},null,8,T5)])):H("",!0),n.track.composer?(k(),$("p",O5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,D5),u("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,P5)])):H("",!0),n.track.date_released?(k(),$("p",I5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,F5),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,R5)])):n.track.year?(k(),$("p",L5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,N5),u("span",{class:"title is-6",textContent:g(n.track.year)},null,8,M5)])):H("",!0),n.track.genre?(k(),$("p",V5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,H5),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,B5)])):H("",!0),n.track.disc_number?(k(),$("p",U5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,j5),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,q5)])):H("",!0),n.track.length_ms?(k(),$("p",W5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,K5),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,G5)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,Z5),u("span",{class:"title is-6",textContent:g(n.track.path)},null,8,Y5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,J5),u("span",X5,[u("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,Q5)])]),n.track.samplerate?(k(),$("p",eD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,tD),u("span",nD,[u("span",{textContent:g(n.track.type)},null,8,rD),n.track.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,sD)):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,oD)):H("",!0),n.track.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,aD)):H("",!0)])])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,iD),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,lD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,uD),u("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,cD)]),n.track.comment?(k(),$("p",dD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,mD),u("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,fD)])):H("",!0)])]),u("footer",pD,[u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...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,hD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...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,_D)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...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.track.play"))},null,8,gD)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const vD=te(p5,[["render",yD]]),bD={name:"ProgressBar",props:["max","value"]},zD=["value","max"];function CD(e,t,n,r,s,o){return n.value>0?(k(),$("progress",{key:0,class:"progress is-info",value:n.value,max:n.max},null,8,zD)):H("",!0)}const wD=te(bD,[["render",CD],["__scopeId","data-v-b2fd846d"]]),kD={name:"ListTracks",components:{ModalDialogTrack:vD,ProgressBar:wD},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}}},xD={key:0,class:"mt-6 mb-5 py-2"},ED=["id","textContent"],SD=["onClick"],$D={key:0,class:"media-left is-clickable"},AD={class:"media-content is-clickable is-clipped"},TD=["textContent"],OD=["textContent"],DD=["textContent"],PD={class:"media-right"},ID=["onClick"];function FD(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,lt(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",$D,[y(a,{class:"icon",name:"file-outline",size:"16"})])):H("",!0),u("div",AD,[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,TD),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(c.item.artist)},null,8,OD),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.album)},null,8,DD),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",PD,[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,ID)])],10,SD)):(k(),$("div",xD,[u("span",{id:"index_"+c.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(c.groupKey)},null,8,ED)]))],64))),128)),(k(),he(es,{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(kD,[["render",FD]]),RD={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}}},LD={key:0,class:"modal is-active"},ND={class:"modal-content fd-modal-card"},MD={class:"card"},VD={class:"card-content"},HD={class:"title is-4"},BD=["textContent"],UD={key:0,class:"buttons"},jD=["textContent"],qD=["textContent"],WD={class:"content is-small"},KD={key:0},GD=["textContent"],ZD=["textContent"],YD={key:1},JD=["textContent"],XD=["textContent"],QD={key:2},eP=["textContent"],tP=["textContent"],nP=["textContent"],rP=["textContent"],sP=["textContent"],oP=["textContent"],aP=["textContent"],iP=["textContent"],lP=["textContent"],uP=["textContent"],cP={class:"card-footer"},dP=["textContent"],mP=["textContent"],fP=["textContent"];function pP(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",LD,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",ND,[u("div",MD,[u("div",VD,[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",HD,[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,BD)]),o.media_kind_resolved==="podcast"?(k(),$("div",UD,[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,jD),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,qD)):H("",!0)])):H("",!0),u("div",WD,[n.album.artist?(k(),$("p",KD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,GD),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,ZD)])):H("",!0),n.album.date_released?(k(),$("p",YD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,JD),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,XD)])):n.album.year>0?(k(),$("p",QD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,eP),u("span",{class:"title is-6",textContent:g(n.album.year)},null,8,tP)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,nP),u("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,rP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,sP),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,oP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,aP),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,iP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,lP),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,uP)])])]),u("footer",cP,[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,dP)]),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,mP)]),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,fP)])])])]),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(RD,[["render",pP]]),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),e.tracks.group(d5("disc_number")),e.tracks.indexList<=1&&e.tracks.group($m())}},hP={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)}}},_P=["textContent"],gP={class:"subtitle is-6 has-text-link"},yP=["textContent"],vP={class:"buttons fd-is-centered-mobile mt-5"},bP=["textContent"],zP=["textContent"];function CP(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,_P),u("h2",gP,[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,yP)]),u("div",vP,[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,bP)]),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,zP),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 wP=te(hP,[["render",CP]]),kP={name:"ListItemTrackSpotify",props:["track","position","context_uri"],methods:{play(){this.track.is_playable&&M.player_play_uri(this.context_uri,!1,this.position)}}},xP={class:"media is-align-items-center"},EP=["textContent"],SP=["textContent"],$P={key:0,class:"subtitle is-7"},AP=["textContent"],TP=["textContent"],OP={class:"media-right"};function DP(e,t,n,r,s,o){return k(),$("div",xP,[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,EP),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,SP),n.track.is_playable?H("",!0):(k(),$("h2",$P,[_t(" ("),u("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,AP),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,TP)):H("",!0),_t(") ")]))],2),u("div",OP,[st(e.$slots,"actions")])])}const Tm=te(kP,[["render",DP]]),PP={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}}},IP={key:0,class:"modal is-active"},FP={class:"modal-content fd-modal-card"},RP={class:"card"},LP={class:"card-content"},NP={class:"title is-4"},MP=["textContent"],VP={class:"content is-small"},HP=["textContent"],BP=["textContent"],UP=["textContent"],jP=["textContent"],qP=["textContent"],WP=["textContent"],KP={class:"card-footer"},GP=["textContent"],ZP=["textContent"],YP=["textContent"];function JP(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",IP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",FP,[u("div",RP,[u("div",LP,[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",NP,[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,MP)]),u("div",VP,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,HP),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,BP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,UP),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,jP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,qP),u("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,WP)])])]),u("footer",KP,[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,GP)]),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,ZP)]),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,YP)])])])]),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(PP,[["render",JP]]),XP={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}})}}},QP={key:0,class:"modal is-active"},eI={class:"modal-content fd-modal-card"},tI={class:"card"},nI={class:"card-content"},rI=["textContent"],sI=["textContent"],oI={class:"content is-small"},aI=["textContent"],iI=["textContent"],lI=["textContent"],uI=["textContent"],cI=["textContent"],dI=["textContent"],mI=["textContent"],fI=["textContent"],pI=["textContent"],hI=["textContent"],_I=["textContent"],gI=["textContent"],yI={class:"card-footer"},vI=["textContent"],bI=["textContent"],zI=["textContent"];function CI(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",QP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",eI,[u("div",tI,[u("div",nI,[u("p",{class:"title is-4",textContent:g(n.track.name)},null,8,rI),u("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,sI),u("div",oI,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,aI),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,iI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,lI),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,uI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,cI),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,dI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,mI),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,fI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,pI),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,hI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,_I),u("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,gI)])])]),u("footer",yI,[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,vI)]),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,bI)]),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,zI)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Om=te(XP,[["render",CI]]),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}},wI={name:"PageAlbumSpotify",components:{ContentWithHero:du,CoverArtwork:Fn,ListItemTrackSpotify:Tm,ModalDialogAlbumSpotify:Ma,ModalDialogTrackSpotify:Om},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}}},kI=["textContent"],xI={class:"subtitle is-6 has-text-link"},EI=["textContent"],SI={class:"buttons fd-is-centered-mobile mt-5"},$I=["textContent"],AI=["textContent"],TI=["onClick"];function OI(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,kI),u("h2",xI,[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,EI)]),u("div",SI,[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,$I)]),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,AI),(k(!0),$(we,null,lt(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,TI)]),_: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 DI=te(wI,[["render",OI]]),PI={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}}},II={class:"section"},FI={class:"container"},RI={class:"columns is-centered"},LI={class:"column is-four-fifths"},NI={key:0},MI={ref:"options_ref",style:{height:"1px"}},VI={class:"buttons is-centered mt-4 mb-2"},HI={id:"top",class:"level is-clipped"},BI={class:"level-left is-flex-shrink-1"},UI={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},jI={class:"level-right has-text-centered-mobile"},qI={class:"mt-4"};function WI(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",II,[u("div",FI,[u("div",RI,[u("div",LI,[e.$slots.options?(k(),$("section",NI,[u("div",MI,null,512),st(e.$slots,"options"),u("nav",VI,[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",HI,[u("div",BI,[u("div",UI,[u("div",null,[st(e.$slots,"heading-left")])])]),u("div",jI,[st(e.$slots,"heading-right")])]),st(e.$slots,"content"),u("div",qI,[st(e.$slots,"footer")])],2)])])])])}const Qe=te(PI,[["render",WI]]),KI={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)}}},GI={class:"dropdown-trigger"},ZI=["textContent"],YI={id:"dropdown",class:"dropdown-menu",role:"menu"},JI={class:"dropdown-content"},XI=["onClick","textContent"];function QI(e,t,n,r,s,o){const a=E("mdicon"),i=Nd("click-away");return bt((k(),$("div",{class:Ee(["dropdown",{"is-active":s.is_active}])},[u("div",GI,[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,ZI),y(a,{class:"icon",name:"chevron-down",size:"16"})])]),u("div",YI,[u("div",JI,[(k(!0),$(we,null,lt(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,XI))),128))])])],2)),[[i,o.onClickOutside]])}const $s=te(KI,[["render",QI]]),eF={name:"IndexButtonList",props:["index"]},tF={class:"buttons is-centered mb-4 fd-is-square"};function nF(e,t,n,r,s,o){const a=E("router-link");return k(),$("section",null,[u("nav",tF,[(k(!0),$(we,null,lt(n.index,i=>(k(),he(a,{key:i,class:"button is-small",to:"#index_"+i},{default:x(()=>[_t(g(i),1)]),_:2},1032,["to"]))),128))])])}const Jn=te(eF,[["render",nF]]),rF={name:"ListAlbums",components:{CoverArtwork:Fn,ModalDialog:fm,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")})}}},sF={key:0,class:"mt-6 mb-5 py-2"},oF=["id","textContent"],aF=["onClick"],iF={key:0,class:"media-left"},lF={class:"media-content is-clickable is-clipped"},uF=["textContent"],cF=["textContent"],dF=["textContent"],mF={class:"media-right"},fF=["onClick"],pF=["textContent"],hF={class:"is-size-7"},_F=["textContent"],gF=["textContent"];function yF(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,lt(n.albums,m=>(k(),$(we,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),$("div",sF,[u("span",{id:"index_"+m.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.groupKey)},null,8,oF)])):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",iF,[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",lF,[u("div",null,[u("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,uF),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(m.item.artist)},null,8,cF),m.item.date_released&&m.item.media_kind==="music"?(k(),$("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:g(e.$filters.date(m.item.date_released))},null,8,dF)):H("",!0)])]),u("div",mF,[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,fF)])],8,aF)):H("",!0)],64))),128)),(k(),he(es,{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,pF),u("p",hF,[_t(" ("),u("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,_F),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,gF),_t(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const cr=te(rF,[["render",yF]]),vF={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},bF={class:"section fd-tabs-section"},zF={class:"container"},CF={class:"columns is-centered"},wF={class:"column is-four-fifths"},kF={class:"tabs is-centered is-small"},xF=["onClick","onKeypress"],EF=["textContent"],SF=["onClick","onKeypress"],$F=["textContent"],AF=["onClick","onKeypress"],TF=["textContent"],OF=["onClick","onKeypress"],DF=["textContent"],PF=["onClick","onKeypress"],IF=["textContent"],FF=["onClick","onKeypress"],RF=["textContent"];function LF(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",bF,[u("div",zF,[u("div",CF,[u("div",wF,[u("div",kF,[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,EF)],40,xF)],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,$F)],40,SF)],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,TF)],40,AF)],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,DF)],40,OF)],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,IF)],40,PF)],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,RF)],40,FF)],2)]),_:1})):H("",!0)])])])])])])}const dr=te(vF,[["render",LF]]),di={load(e){return M.library_albums("music")},set(e,t){e.albums_list=new ge(t.data)}},NF={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListAlbums:cr,TabsMusic:dr},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(s_,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(yd,e)}}}},MF={class:"fd-page-with-tabs"},VF={class:"columns"},HF={class:"column"},BF=["textContent"],UF={class:"field"},jF={class:"control"},qF=["textContent"],WF=["textContent"],KF={key:0,class:"field"},GF={class:"control"},ZF=["textContent"],YF=["textContent"],JF={class:"column"},XF=["textContent"],QF=["textContent"],eR=["textContent"];function tR(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",MF,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.albums.indexList},null,8,["index"]),u("div",VF,[u("div",HF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,BF),u("div",UF,[u("div",jF,[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,qF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,WF)]),o.spotify_enabled?(k(),$("div",KF,[u("div",GF,[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,ZF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,YF)])):H("",!0)]),u("div",JF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort-by.title"))},null,8,XF),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,QF),u("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:o.albums.count}))},null,8,eR)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{albums:o.albums},null,8,["albums"])]),_:1})])}const nR=te(NF,[["render",tR]]),rR={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}})}}},sR={key:0,class:"modal is-active"},oR={class:"modal-content fd-modal-card"},aR={class:"card"},iR={class:"card-content"},lR={class:"title is-4"},uR=["textContent"],cR={class:"content is-small"},dR=["textContent"],mR=["textContent"],fR=["textContent"],pR=["textContent"],hR=["textContent"],_R=["textContent"],gR=["textContent"],yR=["textContent"],vR={class:"card-footer"},bR=["textContent"],zR=["textContent"],CR=["textContent"];function wR(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",sR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",oR,[u("div",aR,[u("div",iR,[u("p",lR,[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,uR)]),u("div",cR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,dR),u("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,mR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,fR),u("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,pR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,hR),u("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,_R)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,gR),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,yR)])])]),u("footer",vR,[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,bR)]),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,zR)]),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,CR)])])])]),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(rR,[["render",wR]]),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)}},kR={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:$s,ListAlbums:cr,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(n_,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)}}},xR={class:"columns"},ER={class:"column"},SR=["textContent"],$R=["textContent"],AR={class:"buttons is-centered"},TR=["textContent"],OR={class:"heading has-text-centered-mobile"},DR=["textContent"],PR=u("span",null," | ",-1),IR=["textContent"];function FR(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",xR,[u("div",ER,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,SR),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,$R)]),"heading-right":x(()=>[u("div",AR,[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,TR)])])]),content:x(()=>[u("p",OR,[u("span",{textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,DR),PR,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,IR)]),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 RR=te(kR,[["render",FR]]),LR={name:"ListItemAlbumSpotify",props:["album"]},NR={class:"media is-align-items-center"},MR={key:0,class:"media-left is-clickable"},VR={class:"media-content is-clickable is-clipped"},HR=["textContent"],BR=["textContent"],UR=["textContent"],jR={class:"media-right"};function qR(e,t,n,r,s,o){return k(),$("div",NR,[e.$slots.artwork?(k(),$("div",MR,[st(e.$slots,"artwork")])):H("",!0),u("div",VR,[u("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,HR),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(n.album.artists[0].name)},null,8,BR),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,UR)]),u("div",jR,[st(e.$slots,"actions")])])}const pu=te(LR,[["render",qR]]),WR={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}})}}},KR={key:0,class:"modal is-active"},GR={class:"modal-content fd-modal-card"},ZR={class:"card"},YR={class:"card-content"},JR={class:"title is-4"},XR=["textContent"],QR={class:"content is-small"},eL=["textContent"],tL=["textContent"],nL=["textContent"],rL=["textContent"],sL={class:"card-footer"},oL=["textContent"],aL=["textContent"],iL=["textContent"];function lL(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",KR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",GR,[u("div",ZR,[u("div",YR,[u("p",JR,[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,XR)]),u("div",QR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,eL),u("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,tL)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,nL),u("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,rL)])])]),u("footer",sL,[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,oL)]),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,aL)]),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,iL)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const H1=te(WR,[["render",lL]]);function uL(e){return e.scrollHeight}function cL(e){return e.scrollWidth}function dL(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function mL(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const fL=u("div",{class:"loading"},"Loading...",-1),pL=u("div",{class:"no-more"},"No more.",-1),hL=u("div",{class:"no-results"},"No results.",-1),_L=u("div",{class:"error"},"Error.",-1),Dm=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"?dL((z=n.container)!=null?z:document.documentElement,a):n.position==="left"&&mL((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=uL((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(a=cL((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"&&R_(()=>{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"?st(z.$slots,"loading",Ro(Us({key:0},{isFirstLoad:vn(o)})),()=>[fL]):vn(s)==="no-more"?st(z.$slots,"no-more",Ro(Us({key:1},{retry:p})),()=>[pL]):vn(s)==="no-results"?st(z.$slots,"no-results",Ro(Us({key:2},{retry:p})),()=>[hL]):vn(s)==="error"?st(z.$slots,"error",Ro(Us({key:3},{retry:p})),()=>[_L]):H("",!0)],512))}}),id=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:id,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])}},gL={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,ModalDialogArtistSpotify:H1,VueEternalLoading:Dm},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:id,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,id)})},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:""}}},yL=["textContent"],vL={class:"buttons is-centered"},bL=["textContent"],zL=["textContent"],CL=["onClick"];function wL(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,yL)]),"heading-right":x(()=>[u("div",vL,[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,bL)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:s.total}))},null,8,zL),(k(!0),$(we,null,lt(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,CL)]),_: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[_t(" . ")]),_: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 kL=te(gL,[["render",wL]]),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)}},xL={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:$s,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:Am("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(r_,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)}}},EL={class:"columns"},SL={class:"column"},$L=["textContent"],AL=["textContent"],TL={class:"buttons is-centered"},OL=["textContent"],DL={class:"heading has-text-centered-mobile"},PL=["textContent"],IL=u("span",null," | ",-1),FL=["textContent"];function RL(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",EL,[u("div",SL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,$L),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,AL)]),"heading-right":x(()=>[u("div",TL,[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,OL)])])]),content:x(()=>[u("p",DL,[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,PL),IL,u("span",{textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,FL)]),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 LL=te(xL,[["render",RL]]),NL={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}}},ML={key:0,class:"mt-6 mb-5 py-2"},VL={class:"media-content is-clipped"},HL=["id","textContent"],BL=["onClick"],UL={class:"media-content is-clickable is-clipped"},jL=["textContent"],qL={class:"media-right"},WL=["onClick"];function KL(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-artist");return k(),$(we,null,[(k(!0),$(we,null,lt(n.artists,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",ML,[u("div",VL,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,HL)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_artist(l.item)},[u("div",UL,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,jL)]),u("div",qL,[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,WL)])],8,BL)):H("",!0)],64))),128)),(k(),he(es,{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 Pm=te(NL,[["render",KL]]),hi={load(e){return M.library_artists("music")},set(e,t){e.artists_list=new ge(t.data)}},GL={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListArtists:Pm,TabsMusic:dr},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(t_,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(yd,e)}}}},ZL={class:"fd-page-with-tabs"},YL={class:"columns"},JL={class:"column"},XL=["textContent"],QL={class:"field"},eN={class:"control"},tN=["textContent"],nN=["textContent"],rN={key:0,class:"field"},sN={class:"control"},oN=["textContent"],aN=["textContent"],iN={class:"column"},lN=["textContent"],uN=["textContent"],cN=["textContent"];function dN(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",ZL,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"]),u("div",YL,[u("div",JL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,XL),u("div",QL,[u("div",eN,[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,tN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,nN)]),o.spotify_enabled?(k(),$("div",rN,[u("div",sN,[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,oN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,aN)])):H("",!0)]),u("div",iN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort-by.title"))},null,8,lN),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,uN),u("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:o.artists.count}))},null,8,cN)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{artists:o.artists},null,8,["artists"])]),_:1})])}const mN=te(GL,[["render",dN]]),_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)}},fN={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)}}},pN=["textContent"],hN={class:"subtitle is-6 has-text-link"},_N=["textContent"],gN={class:"buttons fd-is-centered-mobile mt-5"},yN=["textContent"],vN=["textContent"];function bN(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,pN),u("h2",hN,[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,_N)]),u("div",gN,[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,yN)]),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,vN),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 zN=te(fN,[["render",bN]]),CN={name:"TabsAudiobooks"},wN={class:"section fd-tabs-section"},kN={class:"container"},xN={class:"columns is-centered"},EN={class:"column is-four-fifths"},SN={class:"tabs is-centered is-small"},$N=["onClick","onKeypress"],AN=["textContent"],TN=["onClick","onKeypress"],ON=["textContent"],DN=["onClick","onKeypress"],PN=["textContent"];function IN(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",wN,[u("div",kN,[u("div",xN,[u("div",EN,[u("div",SN,[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,AN)],40,$N)],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,ON)],40,TN)],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,PN)],40,DN)],2)]),_:1})])])])])])])}const Im=te(CN,[["render",IN]]),gi={load(e){return M.library_albums("audiobook")},set(e,t){e.albums=new ge(t.data),e.albums.group(Rn("name_sort",!0))}},FN={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:Im,ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr},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}}},RN={class:"fd-page-with-tabs"},LN=["textContent"],NN=["textContent"];function MN(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",RN,[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,LN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:s.albums.count}))},null,8,NN)]),content:x(()=>[y(l,{albums:s.albums},null,8,["albums"])]),_:1})])}const VN=te(FN,[["render",MN]]),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)}},HN={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:cr,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)}}},BN=["textContent"],UN={class:"buttons is-centered"},jN=["textContent"],qN=["textContent"];function WN(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,BN)]),"heading-right":x(()=>[u("div",UN,[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,jN)])])]),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,qN),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 KN=te(HN,[["render",WN]]),vi={load(e){return M.library_artists("audiobook")},set(e,t){e.artists_list=new ge(t.data)}},GN={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:Im,IndexButtonList:Jn,ListArtists:Pm},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):[]}}},ZN={class:"fd-page-with-tabs"},YN=["textContent"],JN=["textContent"];function XN(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",ZN,[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,YN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,JN)]),"heading-right":x(()=>[]),content:x(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const QN=te(GN,[["render",XN]]),eM={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}})}}},tM={key:0,class:"modal is-active"},nM={class:"modal-content fd-modal-card"},rM={class:"card"},sM={class:"card-content"},oM={class:"title is-4"},aM=["textContent"],iM={class:"content is-small"},lM=["textContent"],uM=["textContent"],cM=["textContent"],dM=["textContent"],mM=["textContent"],fM=["textContent"],pM={class:"card-footer"},hM=["textContent"],_M=["textContent"],gM=["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",tM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",nM,[u("div",rM,[u("div",sM,[u("p",oM,[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,aM)]),u("div",iM,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,lM),u("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,uM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,cM),u("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,dM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,mM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,fM)])])]),u("footer",pM,[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,hM)]),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,_M)]),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,gM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Fm=te(eM,[["render",yM]]),vM={name:"ListGenres",components:{ModalDialogGenre:Fm},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}}},bM={key:0,class:"mt-6 mb-5 py-2"},zM={class:"media-content is-clipped"},CM=["id","textContent"],wM=["onClick"],kM={class:"media-content is-clickable is-clipped"},xM=["textContent"],EM={class:"media-right"},SM=["onClick"];function $M(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-genre");return k(),$(we,null,[(k(!0),$(we,null,lt(n.genres,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",bM,[u("div",zM,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,CM)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_genre(l.item)},[u("div",kM,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,xM)]),u("div",EM,[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,SM)])],8,wM)):H("",!0)],64))),128)),(k(),he(es,{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 B1=te(vM,[["render",$M]]),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"))}},AM={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:B1,TabsAudiobooks:Im},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}}},TM={class:"fd-page-with-tabs"},OM=["textContent"],DM=["textContent"];function PM(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",TM,[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,OM),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,DM)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const IM=te(AM,[["render",PM]]),FM={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}})}}},RM={key:0,class:"modal is-active"},LM={class:"modal-content fd-modal-card"},NM={class:"card"},MM={class:"card-content"},VM={class:"title is-4"},HM=["textContent"],BM=["textContent"],UM=["textContent"],jM=["textContent"],qM=["textContent"],WM=["textContent"],KM=["textContent"],GM={class:"card-footer"},ZM=["textContent"],YM=["textContent"],JM=["textContent"];function XM(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",RM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",LM,[u("div",NM,[u("div",MM,[u("p",VM,[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,HM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,BM),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,UM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,jM),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,qM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,WM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,KM)])]),u("footer",GM,[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,ZM)]),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,YM)]),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,JM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Rm=te(FM,[["render",XM]]),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)}},QM={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:cr,ModalDialogComposer:Rm},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)}}},e7=["textContent"],t7={class:"buttons is-centered"},n7=["textContent"],r7={class:"heading has-text-centered-mobile"},s7=["textContent"],o7=u("span",null," | ",-1),a7=["textContent"];function i7(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,e7)]),"heading-right":x(()=>[u("div",t7,[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,n7)])])]),content:x(()=>[u("p",r7,[u("span",{textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,s7),o7,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,a7)]),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 l7=te(QM,[["render",i7]]),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)}},u7={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListTracks:Cn,ModalDialogComposer:Rm},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:Am("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(Qh,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)}}},c7={class:"columns"},d7={class:"column"},m7=["textContent"],f7=["textContent"],p7={class:"buttons is-centered"},h7=["textContent"],_7={class:"heading has-text-centered-mobile"},g7=["textContent"],y7=u("span",null," | ",-1),v7=["textContent"];function b7(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",c7,[u("div",d7,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,m7),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,f7)]),"heading-right":x(()=>[u("div",p7,[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,h7)])])]),content:x(()=>[u("p",_7,[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,g7),y7,u("span",{textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,v7)]),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 z7=te(u7,[["render",b7]]),C7={name:"ListComposers",components:{ModalDialogComposer:Rm},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}}},w7={key:0,class:"mt-6 mb-5 py-2"},k7={class:"media-content is-clipped"},x7=["id","textContent"],E7=["onClick"],S7={class:"media-content is-clickable is-clipped"},$7=["textContent"],A7={class:"media-right"},T7=["onClick"];function O7(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-composer");return k(),$(we,null,[(k(!0),$(we,null,lt(n.composers,l=>(k(),$(we,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",w7,[u("div",k7,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,x7)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_composer(l.item)},[u("div",S7,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,$7)]),u("div",A7,[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,T7)])],8,E7)):H("",!0)],64))),128)),(k(),he(es,{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 U1=te(C7,[["render",O7]]),wi={load(e){return M.library_composers("music")},set(e,t){e.composers=new ge(t.data),e.composers.group(Rn("name_sort"))}},D7={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListComposers:U1,TabsMusic:dr},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}}},P7={class:"fd-page-with-tabs"},I7=["textContent"],F7=["textContent"];function R7(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",P7,[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,I7),u("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:s.composers.total}))},null,8,F7)]),content:x(()=>[y(l,{composers:s.composers},null,8,["composers"])]),_:1})])}const L7=te(D7,[["render",R7]]),N7={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`)}}},M7={key:0,class:"modal is-active"},V7={class:"modal-content fd-modal-card"},H7={class:"card"},B7={class:"card-content"},U7=["textContent"],j7={class:"card-footer"},q7=["textContent"],W7=["textContent"],K7=["textContent"];function G7(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",M7,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",V7,[u("div",H7,[u("div",B7,[u("p",{class:"title is-4",textContent:g(n.directory)},null,8,U7)]),u("footer",j7,[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,q7)]),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,W7)]),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,K7)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const j1=te(N7,[["render",G7]]),Z7={name:"ListDirectories",components:{ModalDialogDirectory:j1},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}}},Y7={class:"media-left is-clickable"},J7=u("div",{class:"media-content is-clickable is-clipped"},[u("h1",{class:"title is-6"},"..")],-1),X7={class:"media-right"},Q7=["onClick"],e9={class:"media-left is-clickable"},t9={class:"media-content is-clickable is-clipped"},n9=["textContent"],r9=["textContent"],s9={class:"media-right"},o9=["onClick"];function a9(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",Y7,[y(a,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),J7,u("div",X7,[st(e.$slots,"actions")])])):H("",!0),(k(!0),$(we,null,lt(n.directories,l=>(k(),$("div",{key:l.path,class:"media is-align-items-center",onClick:c=>o.open_directory(l)},[u("figure",e9,[y(a,{class:"icon",name:"folder",size:"16"})]),u("div",t9,[u("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,n9),u("h2",{class:"subtitle is-7 has-text-grey-light",textContent:g(l.path)},null,8,r9)]),u("div",s9,[u("a",{onClick:nt(c=>o.open_dialog(l),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,o9)])],8,Q7))),128)),(k(),he(es,{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 i9=te(Z7,[["render",a9]]),l9={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}})}}},u9={key:0,class:"modal is-active"},c9={class:"modal-content fd-modal-card"},d9={class:"card"},m9={class:"card-content"},f9={class:"title is-4"},p9=["textContent"],h9={class:"content is-small"},_9=["textContent"],g9=["textContent"],y9=["textContent"],v9=["textContent"],b9={key:0},z9=["textContent"],C9=["textContent"],w9={key:0,class:"card-footer"},k9=["textContent"],x9=["textContent"],E9=["textContent"];function S9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",u9,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",c9,[u("div",d9,[u("div",m9,[u("p",f9,[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,p9)]),u("div",h9,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,_9),u("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,g9)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,y9),u("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,v9)]),n.playlist.folder?H("",!0):(k(),$("p",b9,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,z9),u("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,C9)]))])]),n.playlist.folder?H("",!0):(k(),$("footer",w9,[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,k9)]),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,x9)]),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,E9)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const q1=te(l9,[["render",S9]]),$9={name:"ListPlaylists",components:{ModalDialogPlaylist:q1},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"}}},A9=["onClick"],T9={class:"media-left is-clickable"},O9={class:"media-content is-clickable is-clipped"},D9=["textContent"],P9={class:"media-right"},I9=["onClick"];function F9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-playlist");return k(),$(we,null,[(k(!0),$(we,null,lt(n.playlists,l=>(k(),$("div",{key:l.itemId,class:"media is-align-items-center",onClick:c=>o.open_playlist(l.item)},[u("figure",T9,[y(a,{class:"icon",name:o.icon_name(l.item),size:"16"},null,8,["name"])]),u("div",O9,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,D9)]),u("div",P9,[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,I9)])],8,A9))),128)),(k(),he(es,{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 Lm=te($9,[["render",F9]]),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)}},R9={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:i9,ListPlaylists:Lm,ListTracks:Cn,ModalDialogDirectory:j1},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)}}},L9=["textContent"],N9=["textContent"],M9={class:"buttons is-centered"},V9=["textContent"];function H9(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,L9),u("p",{class:"title is-7 has-text-grey",textContent:g(o.current_directory)},null,8,N9)]),"heading-right":x(()=>[u("div",M9,[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,V9)])])]),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 B9=te(R9,[["render",H9]]),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))}},U9={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr,ModalDialogGenre:Fm},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)}}},j9=["textContent"],q9={class:"buttons is-centered"},W9=["textContent"],K9={class:"heading has-text-centered-mobile"},G9=["textContent"],Z9=u("span",null," | ",-1),Y9=["textContent"];function J9(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,j9)]),"heading-right":x(()=>[u("div",q9,[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,W9)])])]),content:x(()=>[u("p",K9,[u("span",{textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,G9),Z9,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,Y9)]),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 X9=te(U9,[["render",J9]]),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)}},Q9={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:$s,IndexButtonList:Jn,ListTracks:Cn,ModalDialogGenre:Fm},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:Am("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(e_,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)}}},eV={class:"columns"},tV={class:"column"},nV=["textContent"],rV=["textContent"],sV={class:"buttons is-centered"},oV=["textContent"],aV={class:"heading has-text-centered-mobile"},iV=["textContent"],lV=u("span",null," | ",-1),uV=["textContent"];function cV(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",eV,[u("div",tV,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort-by.title"))},null,8,nV),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,rV)]),"heading-right":x(()=>[u("div",sV,[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,oV)])])]),content:x(()=>[u("p",aV,[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,iV),lV,u("span",{textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,uV)]),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 dV=te(Q9,[["render",cV]]),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"))}},mV={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:B1,TabsMusic:dr},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}}},fV={class:"fd-page-with-tabs"},pV=["textContent"],hV=["textContent"];function _V(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",fV,[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,pV),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,hV)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const gV=te(mV,[["render",_V]]),$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)}},yV={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:cr,ListTracks:Cn,TabsMusic:dr},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:{}}}},vV={class:"fd-page-with-tabs"},bV=["textContent"],zV={class:"level"},CV={class:"level-item"},wV=["textContent"],kV={class:"level"},xV={class:"level-item"};function EV(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",vV,[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,bV)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),footer:x(()=>[u("nav",zV,[u("p",CV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:x(()=>[_t(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,wV)]),content:x(()=>[y(m,{tracks:s.recently_played},null,8,["tracks"])]),footer:x(()=>[u("nav",kV,[u("p",xV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:x(()=>[_t(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const SV=te(yV,[["render",EV]]),$V={name:"ListItemPlaylistSpotify",props:["playlist"],methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},AV={class:"media is-align-items-center"},TV=["textContent"],OV=["textContent"],DV={class:"media-right"};function PV(e,t,n,r,s,o){return k(),$("div",AV,[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,TV),u("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,OV)]),u("div",DV,[st(e.$slots,"actions")])])}const Nm=te($V,[["render",PV]]),IV={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}})}}},FV={key:0,class:"modal is-active"},RV={class:"modal-content fd-modal-card"},LV={class:"card"},NV={class:"card-content"},MV={class:"title is-4"},VV=["textContent"],HV={class:"content is-small"},BV=["textContent"],UV=["textContent"],jV=["textContent"],qV=["textContent"],WV=["textContent"],KV=["textContent"],GV={class:"card-footer"},ZV=["textContent"],YV=["textContent"],JV=["textContent"];function XV(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",FV,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",RV,[u("div",LV,[u("div",NV,[u("p",MV,[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,VV)]),u("div",HV,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,BV),u("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,UV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,jV),u("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,qV)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,WV),u("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,KV)])])]),u("footer",GV,[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,ZV)]),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,YV)]),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,JV)])])])]),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(IV,[["render",XV]]),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(hd,t[0].albums.items),Ue.commit(_d,t[1].playlists.items))}},QV={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ListItemPlaylistSpotify:Nm,ModalDialogAlbumSpotify:Ma,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},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:""}}},eH={class:"fd-page-with-tabs"},tH=["textContent"],nH=["onClick"],rH={class:"level"},sH={class:"level-item"},oH=["textContent"],aH=["onClick"],iH={class:"level"},lH={class:"level-item"};function uH(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",eH,[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,tH)]),content:x(()=>[(k(!0),$(we,null,lt(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,nH)]),_: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",rH,[u("p",sH,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:x(()=>[_t(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,oH)]),content:x(()=>[(k(!0),$(we,null,lt(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,aH)]),_: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",iH,[u("p",lH,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:x(()=>[_t(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const cH=te(QV,[["render",uH]]),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(hd,t.albums.items)}},dH={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Ma,TabsMusic:dr},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:""}}},mH={class:"fd-page-with-tabs"},fH=["textContent"],pH=["onClick"];function hH(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",mH,[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,fH)]),content:x(()=>[(k(!0),$(we,null,lt(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,pH)]),_: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 _H=te(dH,[["render",hH]]),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(_d,t.playlists.items)}},gH={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:Nm,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},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}}},yH={class:"fd-page-with-tabs"},vH=["textContent"],bH=["onClick"];function zH(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",yH,[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,vH)]),content:x(()=>[(k(!0),$(we,null,lt(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,bH)]),_: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 CH=te(gH,[["render",zH]]),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(m5("time_added",{direction:"desc"}))}},wH={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,TabsMusic:dr,ListAlbums:cr},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}}},kH={class:"fd-page-with-tabs"},xH=["textContent"];function EH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("content-with-heading");return k(),$("div",kH,[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,xH)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),_:1})])}const SH=te(wH,[["render",EH]]),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)}},$H={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,TabsMusic:dr,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:{}}}},AH={class:"fd-page-with-tabs"},TH=["textContent"];function OH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-tracks"),l=E("content-with-heading");return k(),$("div",AH,[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,TH)]),content:x(()=>[y(i,{tracks:s.recently_played},null,8,["tracks"])]),_:1})])}const DH=te($H,[["render",OH]]),PH={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"})}}},IH=["textContent"],FH={key:1};function RH(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,lt(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,lt(a.words,l=>(k(),$("span",{key:l,class:"has-text-weight-bold is-size-5"},[u("span",{style:Cr({"animation-duration":`${l.delay}s`}),textContent:g(l.text)},null,12,IH)]))),128))],2)):(k(),$("div",FH,g(a.text),1))],64))),128))],544)}const LH=te(PH,[["render",RH],["__scopeId","data-v-d4edaddb"]]),NH={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:{open_album(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):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.item.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.item.media_kind==="music"||this.item.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}}):this.item.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-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}})},play(){this.$emit("close"),M.player_play({item_id:this.item.id})},remove(){this.$emit("close"),M.queue_remove(this.item.id)}}},MH={key:0,class:"modal is-active"},VH={class:"modal-content fd-modal-card"},HH={class:"card"},BH={class:"card-content"},UH=["textContent"],jH=["textContent"],qH={class:"content is-small"},WH={key:0},KH=["textContent"],GH=["textContent"],ZH={key:1},YH=["textContent"],JH=["textContent"],XH={key:2},QH=["textContent"],eB=["textContent"],tB={key:3},nB=["textContent"],rB=["textContent"],sB={key:4},oB=["textContent"],aB=["textContent"],iB={key:5},lB=["textContent"],uB=["textContent"],cB={key:6},dB=["textContent"],mB=["textContent"],fB=["textContent"],pB=["textContent"],hB=["textContent"],_B={class:"title is-6"},gB=["textContent"],yB={key:7},vB=["textContent"],bB={class:"title is-6"},zB=["textContent"],CB=["textContent"],wB=["textContent"],kB=["textContent"],xB={class:"card-footer"},EB=["textContent"],SB=["textContent"];function $B(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",MH,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",VH,[u("div",HH,[u("div",BH,[u("p",{class:"title is-4",textContent:g(n.item.title)},null,8,UH),u("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,jH),u("div",qH,[n.item.album?(k(),$("p",WH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,KH),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.item.album)},null,8,GH)])):H("",!0),n.item.album_artist?(k(),$("p",ZH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,YH),u("a",{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,JH)])):H("",!0),n.item.composer?(k(),$("p",XH,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,QH),u("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,eB)])):H("",!0),n.item.year?(k(),$("p",tB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,nB),u("span",{class:"title is-6",textContent:g(n.item.year)},null,8,rB)])):H("",!0),n.item.genre?(k(),$("p",sB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,oB),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,aB)])):H("",!0),n.item.disc_number?(k(),$("p",iB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,lB),u("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,uB)])):H("",!0),n.item.length_ms?(k(),$("p",cB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,dB),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,mB)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,fB),u("span",{class:"title is-6",textContent:g(n.item.path)},null,8,pB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,hB),u("span",_B,[u("span",{textContent:g([e.$t("media.kind."+n.item.media_kind),e.$t("data.kind."+n.item.data_kind)].join(" - "))},null,8,gB)])]),n.item.samplerate?(k(),$("p",yB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,vB),u("span",bB,[u("span",{textContent:g(n.item.type)},null,8,zB),n.item.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,CB)):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,wB)):H("",!0),n.item.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,kB)):H("",!0)])])):H("",!0)])]),u("footer",xB,[u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...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,EB)]),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.queue-item.play"))},null,8,SB)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const W1=te(NH,[["render",$B]]),Ir=1e3,AB={name:"PageNowPlaying",components:{ControlSlider:Jd,CoverArtwork:Fn,LyricsPane:LH,ModalDialogQueueItem:W1},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(pd,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}}},TB={class:"hero is-full-height"},OB={key:0,class:"hero-body is-flex is-align-items-center"},DB={class:"container has-text-centered",style:{"max-width":"500px"}},PB={class:"is-flex is-justify-content-space-between"},IB=["textContent"],FB=["textContent"],RB=["textContent"],LB=["textContent"],NB=["textContent"],MB=["textContent"],VB=["textContent"],HB={key:1,class:"hero-body is-flex is-align-items-center"},BB={class:"container has-text-centered"},UB=["textContent"],jB=["textContent"];function qB(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",TB,[o.track.id>0?(k(),$("div",OB,[u("div",DB,[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",PB,[u("p",{class:"subtitle is-7",textContent:g(o.track_elapsed_time)},null,8,IB),u("p",{class:"subtitle is-7",textContent:g(o.track_total_time)},null,8,FB)]),u("p",{class:"title is-5",textContent:g(o.track.title)},null,8,RB),u("p",{class:"title is-6",textContent:g(o.track.artist)},null,8,LB),o.composer?(k(),$("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(o.composer)},null,8,NB)):H("",!0),o.track.album?(k(),$("p",{key:2,class:"subtitle is-6",textContent:g(o.track.album)},null,8,MB)):H("",!0),o.filepath?(k(),$("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(o.filepath)},null,8,VB)):H("",!0)])])):(k(),$("div",HB,[u("div",BB,[u("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,UB),u("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,jB)])])),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 WB=te(AB,[["render",qB]]),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)}},KB={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:Lm},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($m(),[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}}},GB=["textContent"],ZB=["textContent"];function YB(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,GB),u("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:o.playlists.count}))},null,8,ZB)]),content:x(()=>[o.has_playlists?(k(),he(a,{key:0,playlists:o.playlists},null,8,["playlists"])):H("",!0)]),_:1})])}const JB=te(KB,[["render",YB]]),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)}},XB={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:Cn,ModalDialogPlaylist:q1},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)}}},QB=["textContent"],eU={class:"buttons is-centered"},tU=["textContent"],nU=["textContent"];function rU(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,QB)]),"heading-right":x(()=>[u("div",eU,[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,tU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:s.tracks.count}))},null,8,nU),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 sU=te(XB,[["render",rU]]),ld=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:ld,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])}},oU={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListItemTrackSpotify:Tm,ModalDialogPlaylistSpotify:hu,ModalDialogTrackSpotify:Om,VueEternalLoading:Dm},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:ld,offset:this.offset,market:Ue.state.spotify.webapi_country}).then(n=>{this.append_tracks(n),e(n.items.length,ld)})},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}}},aU=["textContent"],iU={class:"buttons is-centered"},lU=["textContent"],uU=["textContent"],cU=["onClick"];function dU(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,aU)]),"heading-right":x(()=>[u("div",iU,[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,lU)])])]),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,uU),(k(!0),$(we,null,lt(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,cU)]),_:2},1032,["track","position","context_uri"]))),128)),s.offset[_t(" . ")]),_: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 mU=te(oU,[["render",dU]]),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)}},fU={name:"PagePodcast",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialog:fm,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"})})}}},pU=["textContent"],hU=u("h2",{class:"subtitle is-6"}," ",-1),_U={class:"buttons fd-is-centered-mobile mt-5"},gU=["textContent"],yU=["textContent"],vU=["textContent"],bU={class:"is-size-7"},zU=["textContent"],CU=["textContent"];function wU(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,pU),hU,u("div",_U,[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,gU)]),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,yU),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,vU),u("p",bU,[_t(" ("),u("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,zU),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,CU),_t(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const kU=te(fU,[["render",wU]]),xU={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})}}},EU={key:0,class:"modal is-active"},SU={class:"modal-content fd-modal-card"},$U={class:"card-content"},AU=["textContent"],TU={class:"field"},OU={class:"control is-expanded has-icons-left"},DU=["placeholder","disabled"],PU=["textContent"],IU={key:0,class:"card-footer"},FU={class:"card-footer-item has-text-dark"},RU=["textContent"],LU={key:1,class:"card-footer is-clipped"},NU=["textContent"],MU=["textContent"];function VU(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Rt,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",EU,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",SU,[u("form",{class:"card",onSubmit:t[4]||(t[4]=nt((...i)=>o.add_stream&&o.add_stream(...i),["prevent"]))},[u("div",$U,[u("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,AU),u("div",TU,[u("p",OU,[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,DU),[[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,PU)])]),s.loading?(k(),$("footer",IU,[u("a",FU,[y(a,{class:"icon",name:"web",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,RU)])])):(k(),$("footer",LU,[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,NU)]),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,MU)])]))],32)]),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(xU,[["render",VU]]),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)}},BU={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListTracks:Cn,ListAlbums:cr,ModalDialogAddRss:HU},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(vd,"rss"),this.$store.commit(ka,!0)}}},UU=["textContent"],jU={class:"buttons is-centered"},qU=["textContent"],WU=["textContent"],KU=["textContent"],GU={class:"buttons is-centered"},ZU=["textContent"],YU=["textContent"];function JU(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,UU)]),"heading-right":x(()=>[u("div",jU,[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,qU)])])]),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,WU),u("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:s.albums.total}))},null,8,KU)]),"heading-right":x(()=>[u("div",GU,[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,ZU)])):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,YU)])])]),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 XU=te(BU,[["render",JU]]);var K1={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa