diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index a1d073d6..8b0cdca0 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -58,14 +58,14 @@ font-size="${e.size/3}" fill="${xP(t)>.5?"#000000":"#FFFFFF"}"> ${e.caption} - `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},$P={name:"CoverArtwork",props:{album:{default:"",type:String},artist:{default:"",type:String},url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},lifecycle:{error:e=>{e.src=this.dataURI()}},size:600}},computed:{alt_text(){return`${this.artist} - ${this.album}`},caption(){return(this.album||this.artist||"").substring(0,2)}},methods:{dataURI(){return EP({alternate:this.alt_text,caption:this.caption,font:this.font,size:this.size})}}};function TP(e,t,n,r,o,s){const i=zd("lazy");return x(),I("figure",null,[pt(c("img",{onClick:t[0]||(t[0]=a=>e.$emit("click"))},null,512),[[i,{src:n.url,lifecycle:o.lifecycle}]])])}const Pr=ae($P,[["render",TP]]),{t:fa,locale:AP}=Ul.global,q1="NO_INDEX",OP=(e,t)=>e-t,PP=(e,t)=>e.localeCompare(t,AP.value),IP=(e,t)=>new Date(e)-new Date(t)||(e?t?0:1:-1),LP=e=>e.map(({field:t,type:n,order:r=1})=>{switch(n){case String:return(o,s)=>PP(o[t],s[t])*r;case Number:return(o,s)=>OP(o[t],s[t])*r;case Date:return(o,s)=>IP(o[t],s[t])*r;default:return()=>0}}),NP=(e="")=>{const t=e.charAt(0);return t.match(new RegExp("\\p{Letter}","gu"))?t.toUpperCase():t.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"},DP=e=>{},RP=[{difference:NaN,text:()=>fa("grouped-list.undefined")},{difference:864e5,text:()=>fa("grouped-list.today")},{difference:6048e5,text:()=>fa("grouped-list.last-week")},{difference:2592e6,text:()=>fa("grouped-list.last-month")},{difference:1/0,text:e=>e.getFullYear()}],MP=e=>{var r;const t=new Date(e),n=new Date-t;return(r=RP.find(o=>isNaN(n)||n{switch(t){case String:return n=>NP(n[e]);case Number:return n=>n[e];case Date:return n=>MP(n[e]);case"Digits":return n=>DP(n[e]);default:return()=>q1}};class Ee{constructor({items:t=[],total:n=0,offset:r=0,limit:o=-1}={},s={}){this.items=t,this.total=n,this.offset=r,this.limit=o,this.count=t.length,this.indices=[],this.group(s)}group({criteria:t=[],filters:n=[],index:r}={}){const o=this.items.filter(l=>n.every(u=>u(l)));this.count=o.length;const s=LP(t),i=o.sort((l,u)=>s.reduce((m,d)=>m||d(l,u),0)),a=FP(r);return this.itemsGrouped=i.reduce((l,u)=>{const m=a(u);return l.set(m,[...l.get(m)||[],u]),l},new Map),this.indices=Array.from(this.itemsGrouped.keys()),this}*generate(){for(const[t,n]of this.itemsGrouped.entries()){t!==q1&&(yield{index:t,isItem:!1,item:{},itemId:t});for(const r of n)yield{index:t,isItem:!0,item:r,itemId:r.id}}}[Symbol.iterator](){return this.generate()}}var G1={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,o=null,s=function(f,p){return f.abort=p,f},i=function(f,p){var h;if(o!==null){var g=o.defer();f(function(z){g.resolve(z)},function(z){g.reject(z)}),h=g.promise}else window.Promise&&(h=new window.Promise(f));return h?new s(h,p):null},a=function(){var f=Array.prototype.slice.call(arguments),p=f[0],h=f.slice(1);return p=p||{},h.forEach(function(g){for(var z in g)g.hasOwnProperty(z)&&(p[z]=g[z])}),p},l=function(f,p){var h="";for(var g in p)if(p.hasOwnProperty(g)){var z=p[g];h+=encodeURIComponent(g)+"="+encodeURIComponent(z)+"&"}return h.length>0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},u=function(f,p){var h=new XMLHttpRequest,g=function(z,k){function w(C){z&&z(C),p&&p(null,C)}function _(){k&&k(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 C=null;try{C=h.responseText?JSON.parse(h.responseText):""}catch(L){console.error(L)}h.status>=200&&h.status<300?w(C):_()}},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?(g(),null):i(g,function(){h.abort()})},m=function(f,p,h,g){var z={},k=null;typeof p=="object"?(z=p,k=h):typeof p=="function"&&(k=p);var w=f.type||"GET";return w!=="GET"&&f.postData&&!g?f.postData=a(f.postData,z):f.params=a(f.params,z),u(f,k)},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 g={url:n+"/me/tracks",type:"PUT",postData:f};return m(g,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var g={url:n+"/me/tracks",type:"DELETE",postData:f};return m(g,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var g={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(g,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 g={url:n+"/me/albums",type:"PUT",postData:f};return m(g,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var g={url:n+"/me/albums",type:"DELETE",postData:f};return m(g,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var g={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(g,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 g={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(g,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 g={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(g,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 g={url:n+"/users/"+encodeURIComponent(f)};return m(g,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var g;return typeof f=="string"?g={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(g={url:n+"/me/playlists"},h=p,p=f),m(g,p,h)},d.prototype.getPlaylist=function(f,p,h){var g={url:n+"/playlists/"+f};return m(g,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var g={url:n+"/playlists/"+f+"/tracks"};return m(g,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 g={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(g,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var g={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(g,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,g){var z={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(z,h,g,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var g={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(g,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,g,z){var k={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(k,g,z)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var g=p.map(function(k){return typeof k=="string"?{uri:k}:k}),z={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:g}};return m(z,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,g){var z=p.map(function(w){return typeof w=="string"?{uri:w}:w}),k={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:z,snapshot_id:h}};return m(k,{},g)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,g){var z={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(z,{},g)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var g={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(g,{},h)},d.prototype.getAlbum=function(f,p,h){var g={url:n+"/albums/"+f};return m(g,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var g={url:n+"/albums/"+f+"/tracks"};return m(g,p,h)},d.prototype.getAlbums=function(f,p,h){var g={url:n+"/albums/",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getTrack=function(f,p,h){var g={};return g.url=n+"/tracks/"+f,m(g,p,h)},d.prototype.getTracks=function(f,p,h){var g={url:n+"/tracks/",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getArtist=function(f,p,h){var g={url:n+"/artists/"+f};return m(g,p,h)},d.prototype.getArtists=function(f,p,h){var g={url:n+"/artists/",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var g={url:n+"/artists/"+f+"/albums"};return m(g,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,g){var z={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(z,h,g)},d.prototype.getArtistRelatedArtists=function(f,p,h){var g={url:n+"/artists/"+f+"/related-artists"};return m(g,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 g={url:n+"/browse/categories/"+f};return m(g,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var g={url:n+"/browse/categories/"+f+"/playlists"};return m(g,p,h)},d.prototype.search=function(f,p,h,g){var z={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(z,h,g)},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 g=p||{};g.device_ids=f;var z={type:"PUT",url:n+"/me/player",postData:g};return m(z,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={};["context_uri","uris","offset","position_ms"].forEach(function(w){w in f&&(g[w]=f[w])});var z={type:"PUT",url:n+"/me/player/play",params:h,postData:g},k=typeof f=="function"?f:{};return m(z,k,p)},d.prototype.queue=function(f,p,h){p=p||{};var g="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},z={type:"POST",url:n+"/me/player/queue",params:g};return m(z,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={type:"PUT",url:n+"/me/player/pause",params:h};return m(g,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={type:"POST",url:n+"/me/player/next",params:h};return m(g,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={type:"POST",url:n+"/me/player/previous",params:h};return m(g,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var g={position_ms:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/seek",params:g};return m(z,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var g={state:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/repeat",params:g};return m(z,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var g={volume_percent:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/volume",params:g};return m(z,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var g={state:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/shuffle",params:g};return m(z,p,h)},d.prototype.getShow=function(f,p,h){var g={};return g.url=n+"/shows/"+f,m(g,p,h)},d.prototype.getShows=function(f,p,h){var g={url:n+"/shows/",params:{ids:f.join(",")}};return m(g,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 g={url:n+"/me/shows",type:"PUT",postData:f};return m(g,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var g={url:n+"/me/shows",type:"DELETE",postData:f};return m(g,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var g={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var g={url:n+"/shows/"+f+"/episodes"};return m(g,p,h)},d.prototype.getEpisode=function(f,p,h){var g={};return g.url=n+"/episodes/"+f,m(g,p,h)},d.prototype.getEpisodes=function(f,p,h){var g={url:n+"/episodes/",params:{ids:f.join(",")}};return m(g,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(g){g()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(g){console.error(g)}if(p)o=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(G1);var VP=G1.exports;const or=ql(VP),HP={name:"ModalDialogTrack",props:{item:{required:!0,type:Object},show:Boolean},emits:["close","play-count-changed"],setup(){return{servicesStore:Ot()}},data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"){const e=new or;e.setAccessToken(this.servicesStore.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:{mark_new(){B.library_track_update(this.item.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){B.library_track_update(this.item.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open_album(){this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"?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"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},UP={key:0,class:"modal is-active"},jP={class:"modal-content"},BP={class:"card"},WP={class:"card-content"},qP=["textContent"],GP=["textContent"],KP={key:0,class:"buttons"},ZP=["textContent"],YP=["textContent"],XP={class:"content is-small"},JP={key:0},QP=["textContent"],eI=["textContent"],tI={key:1},nI=["textContent"],rI=["textContent"],oI={key:2},sI=["textContent"],iI=["textContent"],aI={key:3},lI=["textContent"],cI=["textContent"],uI={key:4},dI=["textContent"],mI=["textContent"],fI={key:5},pI=["textContent"],hI=["textContent"],_I={key:6},gI=["textContent"],yI=["textContent"],zI={key:7},vI=["textContent"],bI=["textContent"],CI=["textContent"],wI=["textContent"],kI=["textContent"],SI={class:"title is-6"},xI=["textContent"],EI={key:8},$I=["textContent"],TI={class:"title is-6"},AI=["textContent"],OI=["textContent"],PI=["textContent"],II=["textContent"],LI=["textContent"],NI=["textContent"],DI=["textContent"],RI=["textContent"],MI={key:9},FI=["textContent"],VI=["textContent"],HI={class:"card-footer"},UI=["textContent"],jI=["textContent"],BI=["textContent"];function WI(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",UP,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",jP,[c("div",BP,[c("div",WP,[c("p",{class:"title is-4",textContent:y(n.item.title)},null,8,qP),c("p",{class:"subtitle",textContent:y(n.item.artist)},null,8,GP),n.item.media_kind==="podcast"?(x(),I("div",KP,[n.item.play_count>0?(x(),I("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...a)=>s.mark_new&&s.mark_new(...a)),textContent:y(e.$t("dialog.track.mark-as-new"))},null,8,ZP)):ee("",!0),n.item.play_count===0?(x(),I("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...a)=>s.mark_played&&s.mark_played(...a)),textContent:y(e.$t("dialog.track.mark-as-played"))},null,8,YP)):ee("",!0)])):ee("",!0),c("div",XP,[n.item.album?(x(),I("p",JP,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.album"))},null,8,QP),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_album&&s.open_album(...a)),textContent:y(n.item.album)},null,8,eI)])):ee("",!0),n.item.album_artist&&n.item.media_kind!=="audiobook"?(x(),I("p",tI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.album-artist"))},null,8,nI),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:y(n.item.album_artist)},null,8,rI)])):ee("",!0),n.item.composer?(x(),I("p",oI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.composer"))},null,8,sI),c("span",{class:"title is-6",textContent:y(n.item.composer)},null,8,iI)])):ee("",!0),n.item.date_released?(x(),I("p",aI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.release-date"))},null,8,lI),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.date_released))},null,8,cI)])):n.item.year?(x(),I("p",uI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.year"))},null,8,dI),c("span",{class:"title is-6",textContent:y(n.item.year)},null,8,mI)])):ee("",!0),n.item.genre?(x(),I("p",fI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.genre"))},null,8,pI),c("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:y(n.item.genre)},null,8,hI)])):ee("",!0),n.item.disc_number?(x(),I("p",_I,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.position"))},null,8,gI),c("span",{class:"title is-6",textContent:y([n.item.disc_number,n.item.track_number].join(" / "))},null,8,yI)])):ee("",!0),n.item.length_ms?(x(),I("p",zI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.duration"))},null,8,vI),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,bI)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.path"))},null,8,CI),c("span",{class:"title is-6",textContent:y(n.item.path)},null,8,wI)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.type"))},null,8,kI),c("span",SI,[c("span",{textContent:y(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,xI)])]),n.item.samplerate?(x(),I("p",EI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.quality"))},null,8,$I),c("span",TI,[c("span",{textContent:y(n.item.type)},null,8,AI),n.item.samplerate?(x(),I("span",{key:0,textContent:y(e.$t("dialog.track.samplerate",{rate:n.item.samplerate}))},null,8,OI)):ee("",!0),n.item.channels?(x(),I("span",{key:1,textContent:y(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,PI)):ee("",!0),n.item.bitrate?(x(),I("span",{key:2,textContent:y(e.$t("dialog.track.bitrate",{rate:n.item.bitrate}))},null,8,II)):ee("",!0)])])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.added-on"))},null,8,LI),c("span",{class:"title is-6",textContent:y(e.$filters.datetime(n.item.time_added))},null,8,NI)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.rating"))},null,8,DI),c("span",{class:"title is-6",textContent:y(e.$t("dialog.track.rating-value",{rating:Math.floor(n.item.rating/10)}))},null,8,RI)]),n.item.comment?(x(),I("p",MI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.comment"))},null,8,FI),c("span",{class:"title is-6",textContent:y(n.item.comment)},null,8,VI)])):ee("",!0)])]),c("footer",HI,[c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.track.add"))},null,8,UI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.track.add-next"))},null,8,jI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.track.play"))},null,8,BI)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const qI=ae(HP,[["render",WI]]),GI={name:"ListTracks",components:{ModalDialogTrack:qI},props:{expression:{default:"",type:String},items:{required:!0,type:Object},show_icon:Boolean,show_progress:Boolean,uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){this.uris?B.player_play_uri(this.uris,!1,this.items.items.indexOf(e)):this.expression?B.player_play_expression(this.expression,!1,this.items.items.indexOf(e)):B.player_play_uri(e.uri,!1)}}},KI={key:0,class:"mt-6 mb-5 py-2"},ZI=["id","textContent"],YI=["onClick"],XI={key:0,class:"media-left is-clickable"},JI={class:"media-content is-clickable is-clipped"},QI=["textContent"],eL=["textContent"],tL=["textContent"],nL=["max","value"],rL={class:"media-right"},oL=["onClick"];function sL(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-track");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:ke(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:u=>s.play(l.item)},[n.show_icon?(x(),I("figure",XI,[b(i,{class:"icon",name:"file-outline",size:"16"})])):ee("",!0),c("div",JI,[c("h1",{class:ke(["title is-6",{"has-text-grey":l.item.media_kind==="podcast"&&l.item.play_count>0}]),textContent:y(l.item.title)},null,10,QI),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:y(l.item.artist)},null,8,eL),c("h2",{class:"subtitle is-7 has-text-grey",textContent:y(l.item.album)},null,8,tL),n.show_progress&&l.item.seek_ms>0?(x(),I("progress",{key:0,class:"progress is-info",max:l.item.length_ms,value:l.item.seek_ms},null,8,nL)):ee("",!0)]),c("div",rL,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,oL)])],10,YI)):(x(),I("div",KI,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,ZI)]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=l=>e.$emit("play-count-changed"))},null,8,["item","show"])]))],64)}const _n=ae(GI,[["render",sL],["__scopeId","data-v-84498238"]]),iL={name:"ModalDialogAlbum",components:{CoverArtwork:Pr},props:{item:{required:!0,type:Object},media_kind:{default:"",type:String},show:Boolean},emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{media_kind_resolved(){return this.media_kind||this.item.media_kind}},methods:{mark_played(){B.library_album_track_update(this.item.id,{play_count:"played"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.id}}):this.$router.push({name:"music-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.item.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.item.artist_id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},aL={key:0,class:"modal is-active"},lL={class:"modal-content"},cL={class:"card"},uL={class:"card-content"},dL={class:"title is-4"},mL=["textContent"],fL={key:0,class:"buttons"},pL=["textContent"],hL=["textContent"],_L={class:"content is-small"},gL={key:0},yL=["textContent"],zL=["textContent"],vL={key:1},bL=["textContent"],CL=["textContent"],wL={key:2},kL=["textContent"],SL=["textContent"],xL=["textContent"],EL=["textContent"],$L=["textContent"],TL=["textContent"],AL=["textContent"],OL=["textContent"],PL=["textContent"],IL=["textContent"],LL={class:"card-footer"},NL=["textContent"],DL=["textContent"],RL=["textContent"];function ML(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",aL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",lL,[c("div",cL,[c("div",uL,[b(i,{url:n.item.artwork_url,artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["url","artist","album"]),c("p",dL,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:y(n.item.name)},null,8,mL)]),s.media_kind_resolved==="podcast"?(x(),I("div",fL,[c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>s.mark_played&&s.mark_played(...l)),textContent:y(e.$t("dialog.album.mark-as-played"))},null,8,pL),n.item.data_kind==="url"?(x(),I("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:y(e.$t("dialog.album.remove-podcast"))},null,8,hL)):ee("",!0)])):ee("",!0),c("div",_L,[n.item.artist?(x(),I("p",gL,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.artist"))},null,8,yL),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:y(n.item.artist)},null,8,zL)])):ee("",!0),n.item.date_released?(x(),I("p",vL,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.release-date"))},null,8,bL),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.date_released))},null,8,CL)])):n.item.year?(x(),I("p",wL,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.year"))},null,8,kL),c("span",{class:"title is-6",textContent:y(n.item.year)},null,8,SL)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.tracks"))},null,8,xL),c("span",{class:"title is-6",textContent:y(n.item.track_count)},null,8,EL)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.duration"))},null,8,$L),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,TL)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.type"))},null,8,AL),c("span",{class:"title is-6",textContent:y(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,OL)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.added-on"))},null,8,PL),c("span",{class:"title is-6",textContent:y(e.$filters.datetime(n.item.time_added))},null,8,IL)])])]),c("footer",LL,[c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.queue_add&&s.queue_add(...l))},[b(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.album.add"))},null,8,NL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[b(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.album.add-next"))},null,8,DL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>s.play&&s.play(...l))},[b(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.album.play"))},null,8,RL)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const ec=ae(iL,[["render",ML]]),Vp={load(e){return Promise.all([B.library_album(e.params.id),B.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),e.tracks.indices.length<2&&e.tracks.group()}},FL={name:"PageAlbum",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracks:_n,ModalDialogAlbum:ec},beforeRouteEnter(e,t,n){Vp.load(e).then(r=>{n(o=>Vp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){B.player_play_uri(this.album.uri,!0)}}},VL=["textContent"],HL={class:"subtitle is-6 has-text-link"},UL=["textContent"],jL={class:"buttons fd-is-centered-mobile mt-5"},BL=["textContent"],WL=["textContent"];function qL(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks"),u=O("modal-dialog-album"),m=O("content-with-hero");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,VL),c("h2",HL,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:y(o.album.artist)},null,8,UL)]),c("div",jL,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.album.shuffle"))},null,8,BL)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.album.track-count",{count:o.album.track_count}))},null,8,WL),b(l,{items:o.tracks,uris:o.album.uri},null,8,["items","uris"]),b(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const GL=ae(FL,[["render",qL]]),KL={name:"ModalDialogTrackSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},ZL={key:0,class:"modal is-active"},YL={class:"modal-content"},XL={class:"card"},JL={class:"card-content"},QL=["textContent"],e4=["textContent"],t4={class:"content is-small"},n4=["textContent"],r4=["textContent"],o4=["textContent"],s4=["textContent"],i4=["textContent"],a4=["textContent"],l4=["textContent"],c4=["textContent"],u4=["textContent"],d4=["textContent"],m4=["textContent"],f4=["textContent"],p4={class:"card-footer"},h4=["textContent"],_4=["textContent"],g4=["textContent"];function y4(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",ZL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",YL,[c("div",XL,[c("div",JL,[c("p",{class:"title is-4",textContent:y(n.item.name)},null,8,QL),c("p",{class:"subtitle",textContent:y(n.item.artists[0].name)},null,8,e4),c("div",t4,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.album"))},null,8,n4),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:y(n.item.album.name)},null,8,r4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.album-artist"))},null,8,o4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:y(n.item.artists[0].name)},null,8,s4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.release-date"))},null,8,i4),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.album.release_date))},null,8,a4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.position"))},null,8,l4),c("span",{class:"title is-6",textContent:y([n.item.disc_number,n.item.track_number].join(" / "))},null,8,c4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.duration"))},null,8,u4),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.duration_ms))},null,8,d4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.path"))},null,8,m4),c("span",{class:"title is-6",textContent:y(n.item.uri)},null,8,f4)])])]),c("footer",p4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.track.add"))},null,8,h4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.track.add-next"))},null,8,_4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.track.play"))},null,8,g4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const z4=ae(KL,[["render",y4]]),v4={name:"ListTracksSpotify",components:{ModalDialogTrackSpotify:z4},props:{context_uri:{default:"",type:String},items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){e.is_playable&&B.player_play_uri(this.context_uri||e.uri,!1,e.position||0)}}},b4=["onClick"],C4=["textContent"],w4=["textContent"],k4=["textContent"],S4={key:0,class:"subtitle is-7"},x4=["textContent"],E4=["textContent"],$4={class:"media-right"},T4=["onClick"];function A4(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-track-spotify");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>{var u;return x(),I("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:ke(["media-content is-clipped",{"is-clickable":l.is_playable,"fd-is-not-allowed":!l.is_playable}]),onClick:m=>s.play(l)},[c("h1",{class:ke(["title is-6",{"has-text-grey-light":!l.is_playable}]),textContent:y(l.name)},null,10,C4),c("h2",{class:ke(["subtitle is-7 has-text-weight-bold",{"has-text-grey":l.is_playable,"has-text-grey-light":!l.is_playable}]),textContent:y(l.artists[0].name)},null,10,w4),c("h2",{class:"subtitle is-7 has-text-grey",textContent:y(l.album.name)},null,8,k4),l.is_playable?ee("",!0):(x(),I("h2",S4,[Lt(" ("),c("span",{textContent:y(e.$t("list.spotify.not-playable-track"))},null,8,x4),(u=l.restrictions)!=null&&u.reason?(x(),I("span",{key:0,textContent:y(e.$t("list.spotify.restriction-reason",{reason:l.restrictions.reason}))},null,8,E4)):ee("",!0),Lt(") ")]))],10,b4),c("div",$4,[c("a",{onClick:_t(m=>s.open_dialog(l),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,T4)])])}),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const al=ae(v4,[["render",A4]]),O4={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Pr},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{artwork_visible:!1}},methods:{artwork_error(){this.artwork_visible=!1},artwork_loaded(){this.artwork_visible=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},open(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},P4={key:0,class:"modal is-active"},I4={class:"modal-content"},L4={class:"card"},N4={class:"card-content"},D4={class:"title is-4"},R4=["textContent"],M4={class:"content is-small"},F4=["textContent"],V4=["textContent"],H4=["textContent"],U4=["textContent"],j4=["textContent"],B4=["textContent"],W4={class:"card-footer"},q4=["textContent"],G4=["textContent"],K4=["textContent"];function Z4(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",P4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",I4,[c("div",L4,[c("div",N4,[b(i,{url:s.artwork_url(n.item),artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:s.artwork_loaded,onError:s.artwork_error},null,8,["url","artist","album","onLoad","onError"]),c("p",D4,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:y(n.item.name)},null,8,R4)]),c("div",M4,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.album.album-artist"))},null,8,F4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:y(n.item.artists[0].name)},null,8,V4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.album.release-date"))},null,8,H4),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.release_date))},null,8,U4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.album.type"))},null,8,j4),c("span",{class:"title is-6",textContent:y(n.item.album_type)},null,8,B4)])])]),c("footer",W4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>s.queue_add&&s.queue_add(...l))},[b(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.album.add"))},null,8,q4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[b(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.album.add-next"))},null,8,G4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.play&&s.play(...l))},[b(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.album.play"))},null,8,K4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const K1=ae(O4,[["render",Z4]]),Hp={load(e){const t=new or;return t.setAccessToken(Ot().spotify.webapi_token),t.getAlbum(e.params.id,{market:Ot().spotify.webapi_country})},set(e,t){e.album=t}},Y4={name:"PageAlbumSpotify",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracksSpotify:al,ModalDialogAlbumSpotify:K1},beforeRouteEnter(e,t,n){Hp.load(e).then(r=>{n(o=>Hp.set(o,r))})},setup(){return{servicesStore:Ot()}},data(){return{album:{artists:[{}],tracks:{}},show_details_modal:!1}},computed:{tracks(){const{album:e}=this;return e.tracks.total?e.tracks.items.map(t=>({...t,album:e})):{}}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,B.player_play_uri(this.album.uri,!0)}}},X4=["textContent"],J4={class:"subtitle is-6 has-text-link"},Q4=["textContent"],e6={class:"buttons fd-is-centered-mobile mt-5"},t6=["textContent"],n6=["textContent"];function r6(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks-spotify"),u=O("modal-dialog-album-spotify"),m=O("content-with-hero");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,X4),c("h2",J4,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:y(o.album.artists[0].name)},null,8,Q4)]),c("div",e6,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.spotify.album.shuffle"))},null,8,t6)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:s.artwork_url(o.album),artist:o.album.artists[0].name,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.spotify.album.track-count",{count:o.album.tracks.total}))},null,8,n6),b(l,{items:s.tracks,context_uri:o.album.uri},null,8,["items","context_uri"]),b(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const o6=ae(Y4,[["render",r6]]),s6={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",query:this.$route.query}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options))},methods:{onElementObserved(e){e.forEach(({isIntersecting:t})=>{this.options_visible=t})},visibilityChanged(e){this.options_visible=e}}},i6={class:"section"},a6={class:"container"},l6={class:"columns is-centered"},c6={class:"column is-four-fifths"},u6={key:0},d6={ref:"options",style:{height:"1px"}},m6={class:"buttons is-centered mt-4 mb-2"},f6={id:"top",class:"level is-clipped"},p6={class:"level-left is-flex-shrink-1"},h6={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},_6={class:"level-right has-text-centered-mobile"},g6={class:"mt-4"};function y6(e,t,n,r,o,s){const i=O("mdicon"),a=O("router-link");return x(),I("section",i6,[c("div",a6,[c("div",l6,[c("div",c6,[e.$slots.options?(x(),I("section",u6,[c("div",d6,null,512),zt(e.$slots,"options"),c("nav",m6,[b(a,{class:"button is-small is-white",to:s.position},{default:N(()=>[b(i,{class:"icon is-small",name:s.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):ee("",!0),c("div",{class:ke({"is-full-height":e.$slots.options})},[c("nav",f6,[c("div",p6,[c("div",h6,[c("div",null,[zt(e.$slots,"heading-left")])])]),c("div",_6,[zt(e.$slots,"heading-right")])]),zt(e.$slots,"content"),c("div",g6,[zt(e.$slots,"footer")])],2)])])])])}const Qe=ae(s6,[["render",y6]]),z6={name:"ControlDropdown",props:{options:{required:!0,type:Array},value:{required:!0,type:[String,Number]}},emits:["update:value"],data(){return{active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{deactivate(){this.active=!1},select(e){this.active=!1,this.$emit("update:value",e.id)}}},v6={class:"dropdown-trigger"},b6=["textContent"],C6={id:"dropdown",class:"dropdown-menu",role:"menu"},w6={class:"dropdown-content"},k6=["onClick","textContent"];function S6(e,t,n,r,o,s){const i=O("mdicon"),a=zd("click-away");return pt((x(),I("div",{class:ke(["dropdown",{"is-active":o.active}])},[c("div",v6,[c("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>o.active=!o.active)},[c("span",{textContent:y(s.option.name)},null,8,b6),b(i,{class:"icon",name:"chevron-down",size:"16"})])]),c("div",C6,[c("div",w6,[(x(!0),I(ve,null,ht(n.options,l=>(x(),I("a",{key:l.id,class:ke(["dropdown-item",{"is-active":n.value===l.id}]),onClick:u=>s.select(l),textContent:y(l.name)},null,10,k6))),128))])])],2)),[[a,s.deactivate]])}const Ho=ae(z6,[["render",S6]]),x6={name:"IndexButtonList",props:{indices:{required:!0,type:Array}}},E6={class:"buttons is-centered mb-4 fd-is-square"};function $6(e,t,n,r,o,s){const i=O("router-link");return x(),I("section",null,[c("nav",E6,[(x(!0),I(ve,null,ht(n.indices,a=>(x(),we(i,{key:a,class:"button is-small",to:{hash:`#index_${a}`,query:e.$route.query}},{default:N(()=>[Lt(y(a),1)]),_:2},1032,["to"]))),128))])])}const sr=ae(x6,[["render",$6]]),T6={name:"ListAlbums",components:{CoverArtwork:Pr,ModalDialog:jd,ModalDialogAlbum:ec},props:{items:{required:!0,type:Object},media_kind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],setup(){return{settingsStore:rr()}},data(){return{rss_playlist_to_remove:{},selected_item:{},show_details_modal:!1,show_remove_podcast_modal:!1}},computed:{media_kind_resolved(){return this.media_kind||this.selected_item.media_kind}},methods:{open(e){this.selected_item=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_item=e,this.show_details_modal=!0},open_remove_podcast_dialog(){B.library_album_tracks(this.selected_item.id,{limit:1}).then(({data:e})=>{B.library_track_playlists(e.items[0].id).then(({data:t})=>{[this.rss_playlist_to_remove]=t.items.filter(n=>n.type==="rss"),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,B.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},A6={key:0,class:"mt-6 mb-5 py-2"},O6=["id","textContent"],P6=["onClick"],I6={key:0,class:"media-left"},L6={class:"media-content is-clickable is-clipped"},N6=["textContent"],D6=["textContent"],R6=["textContent"],M6={class:"media-right"},F6=["onClick"],V6=["textContent"],H6={class:"is-size-7"},U6=["textContent"],j6=["textContent"];function B6(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon"),l=O("modal-dialog-album"),u=O("modal-dialog");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,m=>(x(),I(ve,{key:m.itemId},[m.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:d=>s.open(m.item)},[r.settingsStore.show_cover_artwork_in_album_lists?(x(),I("div",I6,[b(i,{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,["url","artist","album"])])):ee("",!0),c("div",L6,[c("div",null,[c("h1",{class:"title is-6",textContent:y(m.item.name)},null,8,N6),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:y(m.item.artist)},null,8,D6),m.item.date_released&&m.item.media_kind==="music"?(x(),I("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:y(e.$filters.date(m.item.date_released))},null,8,R6)):ee("",!0)])]),c("div",M6,[c("a",{onClick:_t(d=>s.open_dialog(m.item),["prevent","stop"])},[b(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,F6)])],8,P6)):(x(),I("div",A6,[c("span",{id:`index_${m.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(m.index)},null,8,O6)]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(l,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=m=>o.show_details_modal=!1),onRemovePodcast:t[1]||(t[1]=m=>s.open_remove_podcast_dialog()),onPlayCountChanged:t[2]||(t[2]=m=>s.play_count_changed())},null,8,["item","media_kind","show"]),b(u,{close_action:e.$t("page.podcast.cancel"),delete_action:e.$t("page.podcast.remove"),show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),onClose:t[3]||(t[3]=m=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":N(()=>[c("p",{textContent:y(e.$t("list.albums.info-1"))},null,8,V6),c("p",H6,[Lt(" ("),c("span",{textContent:y(e.$t("list.albums.info-2"))},null,8,U6),c("b",{textContent:y(o.rss_playlist_to_remove.name)},null,8,j6),Lt(") ")])]),_:1},8,["close_action","delete_action","show","title","onDelete"])]))],64)}const Cn=ae(T6,[["render",B6]]),W6={name:"TabsMusic",setup(){return{servicesStore:Ot()}},computed:{spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid}}},q6={class:"section fd-tabs-section"},G6={class:"container"},K6={class:"columns is-centered"},Z6={class:"column is-four-fifths"},Y6={class:"tabs is-centered is-small"},X6=["onClick","onKeypress"],J6=["textContent"],Q6=["onClick","onKeypress"],e5=["textContent"],t5=["onClick","onKeypress"],n5=["textContent"],r5=["onClick","onKeypress"],o5=["textContent"],s5=["onClick","onKeypress"],i5=["textContent"],a5=["onClick","onKeypress"],l5=["textContent"];function c5(e,t,n,r,o,s){const i=O("mdicon"),a=O("router-link");return x(),I("section",q6,[c("div",G6,[c("div",K6,[c("div",Z6,[c("div",Y6,[c("ul",null,[b(a,{to:{name:"music-history"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"history",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.history"))},null,8,J6)],40,X6)],2)]),_:1}),b(a,{to:{name:"music-artists"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.artists"))},null,8,e5)],40,Q6)],2)]),_:1}),b(a,{to:{name:"music-albums"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.albums"))},null,8,n5)],40,t5)],2)]),_:1}),b(a,{to:{name:"music-genres"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.genres"))},null,8,o5)],40,r5)],2)]),_:1}),b(a,{to:{name:"music-composers"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.composers"))},null,8,i5)],40,s5)],2)]),_:1}),s.spotify_enabled?(x(),we(a,{key:0,to:{name:"music-spotify"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"spotify",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.spotify"))},null,8,l5)],40,a5)],2)]),_:1})):ee("",!0)])])])])])])}const _r=ae(W6,[["render",c5]]),Up={load(e){return B.library_albums("music")},set(e,t){e.albums_list=new Ee(t.data)}},u5={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListAlbums:Cn,TabsMusic:_r},beforeRouteEnter(e,t,n){Up.load(e).then(r=>{n(o=>Up.set(o,r))})},setup(){return{uiStore:gn(),servicesStore:Ot()}},data(){return{albums_list:new Ee,groupings:[{id:1,name:this.$t("page.albums.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.albums.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("page.albums.sort.recently-released"),options:{criteria:[{field:"date_released",order:-1,type:Date}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("page.albums.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("page.albums.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]}},computed:{albums(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e)},hide_singles:{get(){return this.uiStore.hide_singles},set(e){this.uiStore.hide_singles=e}},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.albums_sort},set(e){this.uiStore.albums_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid}}},d5={class:"fd-page-with-tabs"},m5={class:"columns"},f5={class:"column"},p5=["textContent"],h5={class:"field"},_5={class:"control"},g5=["textContent"],y5=["textContent"],z5={key:0,class:"field"},v5={class:"control"},b5=["textContent"],C5=["textContent"],w5={class:"column"},k5=["textContent"],S5=["textContent"],x5=["textContent"];function E5(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("control-dropdown"),u=O("list-albums"),m=O("content-with-heading");return x(),I("div",d5,[b(i),b(m,null,{options:N(()=>[b(a,{indices:s.albums.indices},null,8,["indices"]),c("div",m5,[c("div",f5,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.albums.filter"))},null,8,p5),c("div",h5,[c("div",_5,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:y(e.$t("page.albums.hide-singles"))},null,8,g5)]),c("p",{class:"help",textContent:y(e.$t("page.albums.hide-singles-help"))},null,8,y5)]),s.spotify_enabled?(x(),I("div",z5,[c("div",v5,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.albums.hide-spotify"))},null,8,b5)]),c("p",{class:"help",textContent:y(e.$t("page.albums.hide-spotify-help"))},null,8,C5)])):ee("",!0)]),c("div",w5,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.albums.sort.title"))},null,8,k5),b(l,{value:s.selected_grouping_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_id=d),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.albums.title"))},null,8,S5),c("p",{class:"heading",textContent:y(e.$t("page.albums.count",{count:s.albums.count}))},null,8,x5)]),"heading-right":N(()=>[]),content:N(()=>[b(u,{items:s.albums},null,8,["items"])]),_:1})])}const $5=ae(u5,[["render",E5]]),T5={name:"ModalDialogArtist",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},A5={key:0,class:"modal is-active"},O5={class:"modal-content"},P5={class:"card"},I5={class:"card-content"},L5={class:"title is-4"},N5=["textContent"],D5={class:"content is-small"},R5=["textContent"],M5=["textContent"],F5=["textContent"],V5=["textContent"],H5=["textContent"],U5=["textContent"],j5=["textContent"],B5=["textContent"],W5={class:"card-footer"},q5=["textContent"],G5=["textContent"],K5=["textContent"];function Z5(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",A5,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",O5,[c("div",P5,[c("div",I5,[c("p",L5,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,N5)]),c("div",D5,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.albums"))},null,8,R5),c("span",{class:"title is-6",textContent:y(n.item.album_count)},null,8,M5)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.tracks"))},null,8,F5),c("span",{class:"title is-6",textContent:y(n.item.track_count)},null,8,V5)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.type"))},null,8,H5),c("span",{class:"title is-6",textContent:y(e.$t(`data.kind.${n.item.data_kind}`))},null,8,U5)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.added-on"))},null,8,j5),c("span",{class:"title is-6",textContent:y(e.$filters.datetime(n.item.time_added))},null,8,B5)])])]),c("footer",W5,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.artist.add"))},null,8,q5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.artist.add-next"))},null,8,G5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.artist.play"))},null,8,K5)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const tc=ae(T5,[["render",Z5]]),jp={load(e){return Promise.all([B.library_artist(e.params.id),B.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new Ee(t[1].data)}},Y5={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:Ho,ListAlbums:Cn,ModalDialogArtist:tc},beforeRouteEnter(e,t,n){jp.load(e).then(r=>{n(o=>jp.set(o,r))})},setup(){return{servicesStore:Ot(),uiStore:gn()}},data(){return{albums_list:new Ee,artist:{},groupings:[{id:1,name:this.$t("page.artist.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("page.artist.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}],show_details_modal:!1}},computed:{albums(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e)},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.artist_albums_sort},set(e){this.uiStore.artist_albums_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid},track_count(){return[...this.albums].reduce((e,t)=>e+(t.isItem?t.item.track_count:0),0)}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){B.player_play_uri(this.albums.items.map(e=>e.uri).join(),!0)}}},X5={class:"columns"},J5={class:"column"},Q5=["textContent"],eN={key:0,class:"field"},tN={class:"control"},nN=["textContent"],rN=["textContent"],oN={class:"column"},sN=["textContent"],iN=["textContent"],aN={class:"buttons is-centered"},lN=["textContent"],cN={class:"heading has-text-centered-mobile"},uN=["textContent"],dN=c("span",null," | ",-1),mN=["textContent"];function fN(e,t,n,r,o,s){const i=O("control-dropdown"),a=O("mdicon"),l=O("list-albums"),u=O("modal-dialog-artist"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{options:N(()=>[c("div",X5,[c("div",J5,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.filter"))},null,8,Q5),s.spotify_enabled?(x(),I("div",eN,[c("div",tN,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.artist.hide-spotify"))},null,8,nN)]),c("p",{class:"help",textContent:y(e.$t("page.artist.hide-spotify-help"))},null,8,rN)])):ee("",!0)]),c("div",oN,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.sort.title"))},null,8,sN),b(i,{value:s.selected_grouping_id,"onUpdate:value":t[1]||(t[1]=d=>s.selected_grouping_id=d),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,iN)]),"heading-right":N(()=>[c("div",aN,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...d)=>s.play&&s.play(...d))},[b(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.artist.shuffle"))},null,8,lN)])])]),content:N(()=>[c("p",cN,[c("span",{textContent:y(e.$t("page.artist.album-count",{count:s.albums.count}))},null,8,uN),dN,c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:y(e.$t("page.artist.track-count",{count:s.track_count}))},null,8,mN)]),b(l,{items:s.albums},null,8,["items"]),b(u,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const pN=ae(Y5,[["render",fN]]),hN={name:"ListAlbumsSpotify",components:{CoverArtwork:Pr,ModalDialogAlbumSpotify:K1},props:{items:{required:!0,type:Object}},setup(){return{settingsStore:rr()}},data(){return{selected_item:{},show_details_modal:!1}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},_N=["onClick"],gN={key:0,class:"media-left is-clickable"},yN={class:"media-content is-clickable is-clipped"},zN=["textContent"],vN=["textContent"],bN=["textContent"],CN={class:"media-right"},wN=["onClick"];function kN(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon"),l=O("modal-dialog-album-spotify");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,u=>{var m;return x(),I("div",{key:u.id,class:"media is-align-items-center",onClick:d=>s.open(u)},[r.settingsStore.show_cover_artwork_in_album_lists?(x(),I("div",gN,[b(i,{url:s.artwork_url(u),artist:u.artist,album:u.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["url","artist","album"])])):ee("",!0),c("div",yN,[c("h1",{class:"title is-6",textContent:y(u.name)},null,8,zN),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:y((m=u.artists[0])==null?void 0:m.name)},null,8,vN),c("h2",{class:"subtitle is-7 has-text-grey",textContent:y([u.album_type,e.$filters.date(u.release_date)].join(", "))},null,8,bN)]),c("div",CN,[c("a",{onClick:_t(d=>s.open_dialog(u),["prevent","stop"])},[b(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,wN)])],8,_N)}),128)),(x(),we(Vn,{to:"#app"},[b(l,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=u=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Ti=ae(hN,[["render",kN]]),SN={name:"ModalDialogArtistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},xN={key:0,class:"modal is-active"},EN={class:"modal-content"},$N={class:"card"},TN={class:"card-content"},AN={class:"title is-4"},ON=["textContent"],PN={class:"content is-small"},IN=["textContent"],LN=["textContent"],NN=["textContent"],DN=["textContent"],RN={class:"card-footer"},MN=["textContent"],FN=["textContent"],VN=["textContent"];function HN(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",xN,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",EN,[c("div",$N,[c("div",TN,[c("p",AN,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,ON)]),c("div",PN,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.artist.popularity"))},null,8,IN),c("span",{class:"title is-6",textContent:y([n.item.popularity,n.item.followers.total].join(" / "))},null,8,LN)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.artist.genres"))},null,8,NN),c("span",{class:"title is-6",textContent:y(n.item.genres.join(", "))},null,8,DN)])])]),c("footer",RN,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.artist.add"))},null,8,MN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.artist.add-next"))},null,8,FN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.artist.play"))},null,8,VN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Z1=ae(SN,[["render",HN]]);function UN(e){return e.scrollHeight}function jN(e){return e.scrollWidth}function BN(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function WN(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const qN=c("div",{class:"loading"},"Loading...",-1),GN=c("div",{class:"no-more"},"No more.",-1),KN=c("div",{class:"no-results"},"No results.",-1),ZN=c("div",{class:"error"},"Error.",-1),rm=Ar({__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=In();let o=In("loading"),s=In(n.isInitial),i=0;function a(){Fo(()=>{var _,v;n.position==="top"?BN((_=n.container)!=null?_:document.documentElement,i):n.position==="left"&&WN((v=n.container)!=null?v:document.documentElement,i)})}function l(_,v){return _===0?s.value?(m(),"no-results"):(u(),"no-more"):_!==void 0&&v!==void 0&&_{var v,S;_.isIntersecting&&(n.position==="top"?i=UN((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(i=jN((S=n.container)!=null?S:document.documentElement)),g(),n.load({loaded:l,noMore:u,noResults:m,error:d},{isFirstLoad:s.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let w;return typeof IntersectionObserver<"u"&&H_(()=>{w&&g(),w=k(),z()},{flush:"post"}),Nn(()=>n.isInitial,_=>{_&&f()}),Nn(s,_=>{_||t("update:isInitial",!1)}),(_,v)=>(x(),I("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[bn(o)==="loading"?zt(_.$slots,"loading",Ws(rs({key:0},{isFirstLoad:bn(s)})),()=>[qN]):bn(o)==="no-more"?zt(_.$slots,"no-more",Ws(rs({key:1},{retry:p})),()=>[GN]):bn(o)==="no-results"?zt(_.$slots,"no-results",Ws(rs({key:2},{retry:p})),()=>[KN]):bn(o)==="error"?zt(_.$slots,"error",Ws(rs({key:3},{retry:p})),()=>[ZN]):ee("",!0)],512))}}),Bu=50,Bp={load(e){const t=new or;return t.setAccessToken(Ot().spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{include_groups:"album,single",limit:Bu,market:Ot().spotify.webapi_country,offset:0})])},set(e,t){e.artist=t.shift(),e.albums=[],e.total=0,e.offset=0,e.append_albums(t.shift())}},YN={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:Ti,ModalDialogArtistSpotify:Z1,VueEternalLoading:rm},beforeRouteEnter(e,t,n){Bp.load(e).then(r=>{n(o=>Bp.set(o,r))})},setup(){return{servicesStore:Ot()}},data(){return{albums:[],artist:{},offset:0,show_details_modal:!1,total:0}},methods:{append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},load_next({loaded:e}){const t=new or;t.setAccessToken(this.servicesStore.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{include_groups:"album,single",limit:Bu,offset:this.offset}).then(n=>{this.append_albums(n),e(n.items.length,Bu)})},play(){this.show_album_details_modal=!1,B.player_play_uri(this.artist.uri,!0)}}},XN=["textContent"],JN={class:"buttons is-centered"},QN=["textContent"],e3=["textContent"],t3={class:"columns is-centered"},n3={class:"column has-text-centered"},r3=c("br",null,null,-1);function o3(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-albums-spotify"),l=O("VueEternalLoading"),u=O("modal-dialog-artist-spotify"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,XN)]),"heading-right":N(()=>[c("div",JN,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.spotify.artist.shuffle"))},null,8,QN)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.spotify.artist.album-count",{count:o.total}))},null,8,e3),b(a,{items:o.albums},null,8,["items"]),o.offset[c("div",t3,[c("div",n3,[b(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":N(()=>[r3]),_:1},8,["load"])):ee("",!0),b(u,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const s3=ae(YN,[["render",o3]]),Wp={load(e){return Promise.all([B.library_artist(e.params.id),B.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},i3={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListTracks:_n,ModalDialogArtist:tc},beforeRouteEnter(e,t,n){Wp.load(e).then(r=>{n(o=>Wp.set(o,r))})},setup(){return{servicesStore:Ot(),uiStore:gn()}},data(){return{artist:{},groupings:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{album_count(){return new Set([...this.tracks].filter(e=>e.isItem).map(e=>e.item.album_id)).size},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.artist_tracks_sort},set(e){this.uiStore.artist_tracks_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid},track_uris(){return this.tracks_list.items.map(e=>e.uri).join()},tracks(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.tracks_list.group(e)}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){B.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(),!0)}}},a3={class:"columns"},l3={class:"column"},c3=["textContent"],u3={key:0,class:"field"},d3={class:"control"},m3=["textContent"],f3=["textContent"],p3={class:"column"},h3=["textContent"],_3=["textContent"],g3={class:"buttons is-centered"},y3=["textContent"],z3={class:"heading has-text-centered-mobile"},v3=["textContent"],b3=c("span",null," | ",-1),C3=["textContent"];function w3(e,t,n,r,o,s){const i=O("index-button-list"),a=O("control-dropdown"),l=O("mdicon"),u=O("list-tracks"),m=O("modal-dialog-artist"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{options:N(()=>[b(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",a3,[c("div",l3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.filter"))},null,8,c3),s.spotify_enabled?(x(),I("div",u3,[c("div",d3,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=f=>s.hide_spotify=f),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.artist.hide-spotify"))},null,8,m3)]),c("p",{class:"help",textContent:y(e.$t("page.artist.hide-spotify-help"))},null,8,f3)])):ee("",!0)]),c("div",p3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.sort.title"))},null,8,h3),b(a,{value:s.selected_grouping_id,"onUpdate:value":t[1]||(t[1]=f=>s.selected_grouping_id=f),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,_3)]),"heading-right":N(()=>[c("div",g3,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[b(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...f)=>s.play&&s.play(...f))},[b(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.artist.shuffle"))},null,8,y3)])])]),content:N(()=>[c("p",z3,[c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:y(e.$t("page.artist.album-count",{count:s.album_count}))},null,8,v3),b3,c("span",{textContent:y(e.$t("page.artist.track-count",{count:s.tracks.count}))},null,8,C3)]),b(u,{items:s.tracks,uris:s.track_uris},null,8,["items","uris"]),b(m,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const k3=ae(i3,[["render",w3]]),S3={name:"ListArtists",components:{ModalDialogArtist:tc},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=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_item=e,this.show_details_modal=!0}}},x3={key:0,class:"mt-6 mb-5 py-2"},E3={class:"media-content is-clipped"},$3=["id","textContent"],T3=["onClick"],A3={class:"media-content is-clickable is-clipped"},O3=["textContent"],P3={class:"media-right"},I3=["onClick"];function L3(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-artist");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",A3,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,O3)]),c("div",P3,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,I3)])],8,T3)):(x(),I("div",x3,[c("div",E3,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,$3)])]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const ll=ae(S3,[["render",L3]]),qp={load(e){return B.library_artists("music")},set(e,t){e.artists_list=new Ee(t.data)}},N3={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListArtists:ll,TabsMusic:_r},beforeRouteEnter(e,t,n){qp.load(e).then(r=>{n(o=>qp.set(o,r))})},setup(){return{servicesStore:Ot(),uiStore:gn()}},data(){return{artists_list:new Ee,groupings:[{id:1,name:this.$t("page.artists.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artists.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}}]}},computed:{artists(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.artists_list.group(e)},hide_singles:{get(){return this.uiStore.hide_singles},set(e){this.uiStore.hide_singles=e}},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.artists_sort},set(e){this.uiStore.artists_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid}}},D3={class:"fd-page-with-tabs"},R3={class:"columns"},M3={class:"column"},F3=["textContent"],V3={class:"field"},H3={class:"control"},U3=["textContent"],j3=["textContent"],B3={key:0,class:"field"},W3={class:"control"},q3=["textContent"],G3=["textContent"],K3={class:"column"},Z3=["textContent"],Y3=["textContent"],X3=["textContent"];function J3(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("control-dropdown"),u=O("list-artists"),m=O("content-with-heading");return x(),I("div",D3,[b(i),b(m,null,{options:N(()=>[b(a,{indices:s.artists.indices},null,8,["indices"]),c("div",R3,[c("div",M3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artists.filter"))},null,8,F3),c("div",V3,[c("div",H3,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:y(e.$t("page.artists.hide-singles"))},null,8,U3)]),c("p",{class:"help",textContent:y(e.$t("page.artists.hide-singles-help"))},null,8,j3)]),s.spotify_enabled?(x(),I("div",B3,[c("div",W3,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.artists.hide-spotify"))},null,8,q3)]),c("p",{class:"help",textContent:y(e.$t("page.artists.hide-spotify-help"))},null,8,G3)])):ee("",!0)]),c("div",K3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artists.sort.title"))},null,8,Z3),b(l,{value:s.selected_grouping_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_id=d),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.artists.title"))},null,8,Y3),c("p",{class:"heading",textContent:y(e.$t("page.artists.count",{count:s.artists.count}))},null,8,X3)]),"heading-right":N(()=>[]),content:N(()=>[b(u,{items:s.artists},null,8,["items"])]),_:1})])}const Q3=ae(N3,[["render",J3]]),Gp={load(e){return Promise.all([B.library_album(e.params.id),B.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data)}},eD={name:"PageAudiobooksAlbum",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracks:_n,ModalDialogAlbum:ec},beforeRouteEnter(e,t,n){Gp.load(e).then(r=>{n(o=>Gp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){B.player_play_uri(this.album.uri,!1)}}},tD=["textContent"],nD={class:"subtitle is-6 has-text-link"},rD=["textContent"],oD={class:"buttons fd-is-centered-mobile mt-5"},sD=["textContent"],iD=["textContent"];function aD(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks"),u=O("modal-dialog-album"),m=O("content-with-hero");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,tD),c("h2",nD,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:y(o.album.artist)},null,8,rD)]),c("div",oD,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.audiobooks.album.play"))},null,8,sD)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.audiobooks.album.track-count",{count:o.album.track_count}))},null,8,iD),b(l,{items:o.tracks,show_progress:!0,uris:o.album.uri},null,8,["items","uris"]),b(u,{item:o.album,show:o.show_details_modal,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const lD=ae(eD,[["render",aD]]),cD={name:"TabsAudiobooks"},uD={class:"section fd-tabs-section"},dD={class:"container"},mD={class:"columns is-centered"},fD={class:"column is-four-fifths"},pD={class:"tabs is-centered is-small"},hD=["onClick","onKeypress"],_D=["textContent"],gD=["onClick","onKeypress"],yD=["textContent"],zD=["onClick","onKeypress"],vD=["textContent"];function bD(e,t,n,r,o,s){const i=O("mdicon"),a=O("router-link");return x(),I("section",uD,[c("div",dD,[c("div",mD,[c("div",fD,[c("div",pD,[c("ul",null,[b(a,{to:{name:"audiobooks-artists"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.audiobooks.tabs.authors"))},null,8,_D)],40,hD)],2)]),_:1}),b(a,{to:{name:"audiobooks-albums"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,yD)],40,gD)],2)]),_:1}),b(a,{to:{name:"audiobooks-genres"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.audiobooks.tabs.genres"))},null,8,vD)],40,zD)],2)]),_:1})])])])])])])}const om=ae(cD,[["render",bD]]),Kp={load(e){return B.library_albums("audiobook")},set(e,t){e.albums=new Ee(t.data,{index:{field:"name_sort",type:String}})}},CD={name:"PageAudiobooksAlbums",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListAlbums:Cn,TabsAudiobooks:om},beforeRouteEnter(e,t,n){Kp.load(e).then(r=>{n(o=>Kp.set(o,r))})},data(){return{albums:new Ee}}},wD={class:"fd-page-with-tabs"},kD=["textContent"],SD=["textContent"];function xD(e,t,n,r,o,s){const i=O("tabs-audiobooks"),a=O("index-button-list"),l=O("list-albums"),u=O("content-with-heading");return x(),I("div",wD,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.audiobooks.albums.title"))},null,8,kD),c("p",{class:"heading",textContent:y(e.$t("page.audiobooks.albums.count",{count:o.albums.count}))},null,8,SD)]),content:N(()=>[b(l,{items:o.albums},null,8,["items"])]),_:1})])}const ED=ae(CD,[["render",xD]]),Zp={load(e){return Promise.all([B.library_artist(e.params.id),B.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new Ee(t[1].data)}},$D={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:Cn,ModalDialogArtist:tc},beforeRouteEnter(e,t,n){Zp.load(e).then(r=>{n(o=>Zp.set(o,r))})},data(){return{albums:new Ee,artist:{},show_details_modal:!1}},methods:{play(){B.player_play_uri(this.albums.items.map(e=>e.uri).join(),!1)}}},TD=["textContent"],AD={class:"buttons is-centered"},OD=["textContent"],PD=["textContent"];function ID(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-albums"),l=O("modal-dialog-artist"),u=O("content-with-heading");return x(),I("div",null,[b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,TD)]),"heading-right":N(()=>[c("div",AD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.audiobooks.artist.play"))},null,8,OD)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.audiobooks.artist.album-count",{count:o.artist.album_count}))},null,8,PD),b(a,{items:o.albums},null,8,["items"]),b(l,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const LD=ae($D,[["render",ID]]),Yp={load(e){return B.library_artists("audiobook")},set(e,t){e.artists=new Ee(t.data,{index:{field:"name_sort",type:String}})}},ND={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListArtists:ll,TabsAudiobooks:om},beforeRouteEnter(e,t,n){Yp.load(e).then(r=>{n(o=>Yp.set(o,r))})},data(){return{artists:new Ee}}},DD={class:"fd-page-with-tabs"},RD=["textContent"],MD=["textContent"];function FD(e,t,n,r,o,s){const i=O("tabs-audiobooks"),a=O("index-button-list"),l=O("list-artists"),u=O("content-with-heading");return x(),I("div",DD,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.artists.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.audiobooks.artists.title"))},null,8,RD),c("p",{class:"heading",textContent:y(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,MD)]),"heading-right":N(()=>[]),content:N(()=>[b(l,{items:o.artists},null,8,["items"])]),_:1})])}const VD=ae(ND,[["render",FD]]),HD={name:"ModalDialogGenre",props:{item:{required:!0,type:Object},media_kind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{expression(){return`genre is "${this.item.name}" and media_kind is ${this.media_kind}`}},methods:{open(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.name},query:{media_kind:this.media_kind}})},play(){this.$emit("close"),B.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),B.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),B.queue_expression_add_next(this.expression)}}},UD={key:0,class:"modal is-active"},jD={class:"modal-content"},BD={class:"card"},WD={class:"card-content"},qD={class:"title is-4"},GD=["textContent"],KD={class:"content is-small"},ZD=["textContent"],YD=["textContent"],XD=["textContent"],JD=["textContent"],QD=["textContent"],eR=["textContent"],tR={class:"card-footer"},nR=["textContent"],rR=["textContent"],oR=["textContent"];function sR(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",UD,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",jD,[c("div",BD,[c("div",WD,[c("p",qD,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,GD)]),c("div",KD,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.genre.albums"))},null,8,ZD),c("span",{class:"title is-6",textContent:y(n.item.album_count)},null,8,YD)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.genre.tracks"))},null,8,XD),c("span",{class:"title is-6",textContent:y(n.item.track_count)},null,8,JD)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.genre.duration"))},null,8,QD),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,eR)])])]),c("footer",tR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.genre.add"))},null,8,nR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.genre.add-next"))},null,8,rR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.genre.play"))},null,8,oR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const sm=ae(HD,[["render",sR]]),iR={name:"ListGenres",components:{ModalDialogGenre:sm},props:{items:{required:!0,type:Object},media_kind:{required:!0,type:String}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},aR={key:0,class:"mt-6 mb-5 py-2"},lR={class:"media-content is-clipped"},cR=["id","textContent"],uR=["onClick"],dR={class:"media-content is-clickable is-clipped"},mR=["textContent"],fR={class:"media-right"},pR=["onClick"];function hR(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-genre");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",dR,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,mR)]),c("div",fR,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pR)])],8,uR)):(x(),I("div",aR,[c("div",lR,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,cR)])]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]))],64)}const Y1=ae(iR,[["render",hR]]),Xp={load(e){return B.library_genres("audiobook")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},_R={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListGenres:Y1,TabsAudiobooks:om},beforeRouteEnter(e,t,n){Xp.load(e).then(r=>{n(o=>Xp.set(o,r))})},data(){return{genres:new Ee}}},gR={class:"fd-page-with-tabs"},yR=["textContent"],zR=["textContent"];function vR(e,t,n,r,o,s){const i=O("tabs-audiobooks"),a=O("index-button-list"),l=O("list-genres"),u=O("content-with-heading");return x(),I("div",gR,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.genres.title"))},null,8,yR),c("p",{class:"heading",textContent:y(e.$t("page.genres.count",{count:o.genres.total}))},null,8,zR)]),content:N(()=>[b(l,{items:o.genres,media_kind:"audiobook"},null,8,["items"])]),_:1})])}const bR=ae(_R,[["render",vR]]),CR={name:"ModalDialogComposer",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.item.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.item.name}})},play(){this.$emit("close"),B.player_play_expression(`composer is "${this.item.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),B.queue_expression_add(`composer is "${this.item.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),B.queue_expression_add_next(`composer is "${this.item.name}" and media_kind is music`)}}},wR={key:0,class:"modal is-active"},kR={class:"modal-content"},SR={class:"card"},xR={class:"card-content"},ER={class:"title is-4"},$R=["textContent"],TR=["textContent"],AR=["textContent"],OR=["textContent"],PR=["textContent"],IR=["textContent"],LR=["textContent"],NR={class:"card-footer"},DR=["textContent"],RR=["textContent"],MR=["textContent"];function FR(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",wR,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",kR,[c("div",SR,[c("div",xR,[c("p",ER,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:y(n.item.name)},null,8,$R)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.composer.albums"))},null,8,TR),c("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:y(n.item.album_count)},null,8,AR)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.composer.tracks"))},null,8,OR),c("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...a)=>s.open_tracks&&s.open_tracks(...a)),textContent:y(n.item.track_count)},null,8,PR)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.composer.duration"))},null,8,IR),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,LR)])]),c("footer",NR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.composer.add"))},null,8,DR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.composer.add-next"))},null,8,RR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.composer.play"))},null,8,MR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const im=ae(CR,[["render",FR]]),Jp={load(e){return Promise.all([B.library_composer(e.params.name),B.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums=new Ee(t[1].data.albums)}},VR={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:Cn,ModalDialogComposer:im},beforeRouteEnter(e,t,n){Jp.load(e).then(r=>{n(o=>Jp.set(o,r))})},data(){return{albums:new Ee,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){B.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},HR=["textContent"],UR={class:"buttons is-centered"},jR=["textContent"],BR={class:"heading has-text-centered-mobile"},WR=["textContent"],qR=c("span",null," | ",-1),GR=["textContent"];function KR(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-albums"),l=O("modal-dialog-composer"),u=O("content-with-heading");return x(),I("div",null,[b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.composer.name)},null,8,HR)]),"heading-right":N(()=>[c("div",UR,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.composer.shuffle"))},null,8,jR)])])]),content:N(()=>[c("p",BR,[c("span",{textContent:y(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,WR),qR,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:y(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,GR)]),b(a,{items:o.albums},null,8,["items"]),b(l,{item:o.composer,show:o.show_details_modal,onClose:t[3]||(t[3]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const ZR=ae(VR,[["render",KR]]),Qp={load(e){return Promise.all([B.library_composer(e.params.name),B.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},YR={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListTracks:_n,ModalDialogComposer:im},beforeRouteEnter(e,t,n){Qp.load(e).then(r=>{n(o=>Qp.set(o,r))})},setup(){return{uiStore:gn()}},data(){return{composer:{},groupings:[{id:1,name:this.$t("page.composer.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.composer.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_grouping_id:{get(){return this.uiStore.composer_tracks_sort},set(e){this.uiStore.composer_tracks_sort=e}},tracks(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return this.tracks_list.group(e)}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){B.player_play_expression(this.expression,!0)}}},XR={class:"columns"},JR={class:"column"},QR=["textContent"],eM=["textContent"],tM={class:"buttons is-centered"},nM=["textContent"],rM={class:"heading has-text-centered-mobile"},oM=["textContent"],sM=c("span",null," | ",-1),iM=["textContent"];function aM(e,t,n,r,o,s){const i=O("index-button-list"),a=O("control-dropdown"),l=O("mdicon"),u=O("list-tracks"),m=O("modal-dialog-composer"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{options:N(()=>[b(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",XR,[c("div",JR,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.sort.title"))},null,8,QR),b(a,{value:s.selected_grouping_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_id=f),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.composer.name)},null,8,eM)]),"heading-right":N(()=>[c("div",tM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[b(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[b(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.composer.shuffle"))},null,8,nM)])])]),content:N(()=>[c("p",rM,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_albums&&s.open_albums(...f)),textContent:y(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,oM),sM,c("span",{textContent:y(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,iM)]),b(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),b(m,{item:o.composer,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const lM=ae(YR,[["render",aM]]),cM={name:"ListComposers",components:{ModalDialogComposer:im},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},uM={key:0,class:"mt-6 mb-5 py-2"},dM={class:"media-content is-clipped"},mM=["id","textContent"],fM=["onClick"],pM={class:"media-content is-clickable is-clipped"},hM=["textContent"],_M={class:"media-right"},gM=["onClick"];function yM(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-composer");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",pM,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,hM)]),c("div",_M,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,gM)])],8,fM)):(x(),I("div",uM,[c("div",dM,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,mM)])]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Wu=ae(cM,[["render",yM]]),eh={load(e){return B.library_composers("music")},set(e,t){e.composers=new Ee(t.data,{index:{field:"name_sort",type:String}})}},zM={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListComposers:Wu,TabsMusic:_r},beforeRouteEnter(e,t,n){eh.load(e).then(r=>{n(o=>eh.set(o,r))})},data(){return{composers:new Ee}}},vM={class:"fd-page-with-tabs"},bM=["textContent"],CM=["textContent"];function wM(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("list-composers"),u=O("content-with-heading");return x(),I("div",vM,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.composers.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.composers.title"))},null,8,bM),c("p",{class:"heading",textContent:y(e.$t("page.composers.count",{count:o.composers.total}))},null,8,CM)]),content:N(()=>[b(l,{items:o.composers},null,8,["items"])]),_:1})])}const kM=ae(zM,[["render",wM]]),SM={name:"ModalDialogDirectory",props:{item:{required:!0,type:String},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),B.player_play_expression(`path starts with "${this.item}" order by path asc`,!1)},queue_add(){this.$emit("close"),B.queue_expression_add(`path starts with "${this.item}" order by path asc`)},queue_add_next(){this.$emit("close"),B.queue_expression_add_next(`path starts with "${this.item}" order by path asc`)}}},xM={key:0,class:"modal is-active"},EM={class:"modal-content"},$M={class:"card"},TM={class:"card-content"},AM=["textContent"],OM={class:"card-footer"},PM=["textContent"],IM=["textContent"],LM=["textContent"];function NM(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",xM,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",EM,[c("div",$M,[c("div",TM,[c("p",{class:"title is-4",textContent:y(n.item)},null,8,AM)]),c("footer",OM,[c("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.directory.add"))},null,8,PM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.directory.add-next"))},null,8,IM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.directory.play"))},null,8,LM)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const X1=ae(SM,[["render",NM]]),DM={name:"ListDirectories",components:{ModalDialogDirectory:X1},props:{items:{required:!0,type:Array}},data(){return{selected_item:"",show_details_modal:!1}},computed:{directories(){var n;const e=[];let t="";return(n=this.$route.query)==null||n.directory.split("/").slice(1,-1).forEach((r,o)=>{t=`${t}/${r}`,e.push({index:o,name:r,path:t})}),e}},methods:{open(e){const t={name:"files"};e.index!==0&&(t.query={directory:e.path}),this.$router.push(t)},open_dialog(e){this.selected_item=e.path,this.show_details_modal=!0},open_parent(){this.open(this.directories.slice(-1).pop())}}},RM={key:0,class:"media is-align-items-center"},MM={class:"media-content is-clipped"},FM={class:"breadcrumb"},VM=["onClick"],HM=["textContent"],UM={class:"media-right"},jM=["onClick"],BM={class:"media-left is-clickable"},WM={class:"media-content is-clickable is-clipped"},qM=["textContent"],GM={class:"media-right"},KM=["onClick"];function ZM(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-directory");return x(),I(ve,null,[e.$route.query.directory?(x(),I("div",RM,[c("figure",{class:"media-left is-clickable",onClick:t[0]||(t[0]=(...l)=>s.open_parent&&s.open_parent(...l))},[b(i,{class:"icon",name:"chevron-left",size:"16"})]),c("div",MM,[c("nav",FM,[c("ul",null,[(x(!0),I(ve,null,ht(s.directories,l=>(x(),I("li",{key:l.index},[c("a",{onClick:u=>s.open(l)},[c("span",{textContent:y(l.name)},null,8,HM)],8,VM)]))),128))])])]),c("div",UM,[zt(e.$slots,"actions")])])):ee("",!0),(x(!0),I(ve,null,ht(n.items,l=>(x(),I("div",{key:l.path,class:"media is-align-items-center",onClick:u=>s.open(l)},[c("figure",BM,[b(i,{class:"icon",name:"folder",size:"16"})]),c("div",WM,[c("h1",{class:"title is-6",textContent:y(l.name)},null,8,qM)]),c("div",GM,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,KM)])],8,jM))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[1]||(t[1]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const YM=ae(DM,[["render",ZM]]),XM={name:"ModalDialogPlaylist",props:{item:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.uris||this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.uris||this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.uris||this.item.uri)}}},JM={key:0,class:"modal is-active"},QM={class:"modal-content"},eF={class:"card"},tF={class:"card-content"},nF={class:"title is-4"},rF=["textContent"],oF={class:"content is-small"},sF=["textContent"],iF=["textContent"],aF=["textContent"],lF=["textContent"],cF={key:0},uF=["textContent"],dF=["textContent"],mF={key:0,class:"card-footer"},fF=["textContent"],pF=["textContent"],hF=["textContent"];function _F(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",JM,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",QM,[c("div",eF,[c("div",tF,[c("p",nF,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,rF)]),c("div",oF,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.playlist.path"))},null,8,sF),c("span",{class:"title is-6",textContent:y(n.item.path)},null,8,iF)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.playlist.type"))},null,8,aF),c("span",{class:"title is-6",textContent:y(e.$t(`playlist.type.${n.item.type}`))},null,8,lF)]),n.item.folder?ee("",!0):(x(),I("p",cF,[c("span",{class:"heading",textContent:y(e.$t("dialog.playlist.tracks"))},null,8,uF),c("span",{class:"title is-6",textContent:y(n.item.item_count)},null,8,dF)]))])]),n.item.folder?ee("",!0):(x(),I("footer",mF,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.add"))},null,8,fF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.add-next"))},null,8,pF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.play"))},null,8,hF)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const J1=ae(XM,[["render",_F]]),gF={name:"ListPlaylists",components:{ModalDialogPlaylist:J1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"},open(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_item=e,this.show_details_modal=!0}}},yF=["onClick"],zF={class:"media-left is-clickable"},vF={class:"media-content is-clickable is-clipped"},bF=["textContent"],CF={class:"media-right"},wF=["onClick"];function kF(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-playlist");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I("div",{key:l.itemId,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("figure",zF,[b(i,{class:"icon",name:s.icon_name(l.item),size:"16"},null,8,["name"])]),c("div",vF,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,bF)]),c("div",CF,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,wF)])],8,yF))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const cl=ae(gF,[["render",kF]]),pa={load(e){return e.query.directory?B.library_files(e.query.directory):Promise.resolve()},set(e,t){t?e.directories=t.data.directories.map(n=>e.transform(n.path)):Do().directories?e.directories=Do().directories.map(n=>e.transform(n)):B.config().then(n=>{e.directories=n.data.directories.map(r=>e.transform(r))}),e.playlists=new Ee(t==null?void 0:t.data.playlists),e.tracks=new Ee(t==null?void 0:t.data.tracks)}},SF={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:YM,ListPlaylists:cl,ListTracks:_n,ModalDialogDirectory:X1},beforeRouteEnter(e,t,n){pa.load(e).then(r=>{n(o=>pa.set(o,r))})},beforeRouteUpdate(e,t,n){pa.load(e).then(r=>{pa.set(this,r),n()})},setup(){return{configurationStore:Do()}},data(){return{directories:[],playlists:new Ee,show_details_modal:!1,tracks:new Ee}},computed:{current(){var e;return((e=this.$route.query)==null?void 0:e.directory)||"/"},name(){var e;return this.current!=="/"?(e=this.current)==null?void 0:e.slice(this.current.lastIndexOf("/")+1):this.$t("page.files.title")},play_expression(){return`path starts with "${this.current}" order by path asc`}},methods:{play(){B.player_play_expression(this.play_expression,!1)},transform(e){return{name:e.slice(e.lastIndexOf("/")+1),path:e}}}},xF=["textContent"],EF={class:"buttons is-centered"},$F=["textContent"];function TF(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-directories"),l=O("list-playlists"),u=O("list-tracks"),m=O("modal-dialog-directory"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(s.name)},null,8,xF)]),"heading-right":N(()=>[c("div",EF,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.files.play"))},null,8,$F)])])]),content:N(()=>[b(a,{items:o.directories},null,8,["items"]),b(l,{items:o.playlists},null,8,["items"]),b(u,{expression:s.play_expression,items:o.tracks,show_icon:!0},null,8,["expression","items"]),b(m,{item:s.current,show:o.show_details_modal,onClose:t[2]||(t[2]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const AF=ae(SF,[["render",TF]]),th={load(e){return Promise.all([B.library_genre(e.params.name,e.query.media_kind),B.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items.shift(),e.albums=new Ee(t[1].data.albums,{index:{field:"name_sort",type:String}})}},OF={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListAlbums:Cn,ModalDialogGenre:sm},beforeRouteEnter(e,t,n){th.load(e).then(r=>{n(o=>th.set(o,r))})},data(){return{albums:new Ee,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(){B.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},PF=["textContent"],IF={class:"buttons is-centered"},LF=["textContent"],NF={class:"heading has-text-centered-mobile"},DF=["textContent"],RF=c("span",null," | ",-1),MF=["textContent"];function FF(e,t,n,r,o,s){const i=O("index-button-list"),a=O("mdicon"),l=O("list-albums"),u=O("modal-dialog-genre"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{options:N(()=>[b(i,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.genre.name)},null,8,PF)]),"heading-right":N(()=>[c("div",IF,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[b(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.genre.shuffle"))},null,8,LF)])])]),content:N(()=>[c("p",NF,[c("span",{textContent:y(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,DF),RF,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:y(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,MF)]),b(l,{items:o.albums},null,8,["items"]),b(u,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[3]||(t[3]=d=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const VF=ae(OF,[["render",FF]]),nh={load(e){return Promise.all([B.library_genre(e.params.name,e.query.media_kind),B.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items.shift(),e.tracks_list=new Ee(t[1].data.tracks)}},HF={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListTracks:_n,ModalDialogGenre:sm},beforeRouteEnter(e,t,n){nh.load(e).then(r=>{n(o=>nh.set(o,r))})},setup(){return{uiStore:gn()}},data(){return{genre:{},groupings:[{id:1,name:this.$t("page.genre.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.genre.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_grouping_id:{get(){return this.uiStore.genre_tracks_sort},set(e){this.uiStore.genre_tracks_sort=e}},tracks(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return this.tracks_list.group(e)}},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(){B.player_play_expression(this.expression,!0)}}},UF={class:"columns"},jF={class:"column"},BF=["textContent"],WF=["textContent"],qF={class:"buttons is-centered"},GF=["textContent"],KF={class:"heading has-text-centered-mobile"},ZF=["textContent"],YF=c("span",null," | ",-1),XF=["textContent"];function JF(e,t,n,r,o,s){const i=O("index-button-list"),a=O("control-dropdown"),l=O("mdicon"),u=O("list-tracks"),m=O("modal-dialog-genre"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{options:N(()=>[b(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",UF,[c("div",jF,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.genre.sort.title"))},null,8,BF),b(a,{value:s.selected_grouping_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_id=f),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.genre.name)},null,8,WF)]),"heading-right":N(()=>[c("div",qF,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[b(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[b(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.genre.shuffle"))},null,8,GF)])])]),content:N(()=>[c("p",KF,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_genre&&s.open_genre(...f)),textContent:y(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,ZF),YF,c("span",{textContent:y(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,XF)]),b(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),b(m,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const QF=ae(HF,[["render",JF]]),rh={load(e){return B.library_genres("music")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},e7={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListGenres:Y1,TabsMusic:_r},beforeRouteEnter(e,t,n){rh.load(e).then(r=>{n(o=>rh.set(o,r))})},data(){return{genres:new Ee}}},t7={class:"fd-page-with-tabs"},n7=["textContent"],r7=["textContent"];function o7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("list-genres"),u=O("content-with-heading");return x(),I("div",t7,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.genres.title"))},null,8,n7),c("p",{class:"heading",textContent:y(e.$t("page.genres.count",{count:o.genres.total}))},null,8,r7)]),content:N(()=>[b(l,{items:o.genres,media_kind:"music"},null,8,["items"])]),_:1})])}const s7=ae(e7,[["render",o7]]),oh={load(e){return Promise.all([B.search({expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3,type:"album"}),B.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3,type:"track"})])},set(e,t){e.albums=new Ee(t[0].data.albums),e.tracks=new Ee(t[1].data.tracks)}},i7={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:Cn,ListTracks:_n,TabsMusic:_r},beforeRouteEnter(e,t,n){oh.load(e).then(r=>{n(o=>oh.set(o,r))})},data(){return{albums:[],tracks:{items:[]},selected_track:{}}}},a7={class:"fd-page-with-tabs"},l7=["textContent"],c7={class:"level"},u7={class:"level-item"},d7=["textContent"],m7={class:"level"},f7={class:"level-item"};function p7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums"),l=O("router-link"),u=O("content-with-heading"),m=O("list-tracks");return x(),I("div",a7,[b(i),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-added.title"))},null,8,l7)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),footer:N(()=>[c("nav",c7,[c("p",u7,[b(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:N(()=>[Lt(y(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-played.title"))},null,8,d7)]),content:N(()=>[b(m,{items:o.tracks},null,8,["items"])]),footer:N(()=>[c("nav",m7,[c("p",f7,[b(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:N(()=>[Lt(y(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const h7=ae(i7,[["render",p7]]),sh={load(e){const t=rr().recently_added_limit;return B.search({expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t,type:"album"})},set(e,t){e.albums=new Ee(t.data.albums,{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}})}},_7={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,ListAlbums:Cn,TabsMusic:_r},beforeRouteEnter(e,t,n){sh.load(e).then(r=>{n(o=>sh.set(o,r))})},setup(){return{settingsStore:rr()}},data(){return{albums:new Ee}}},g7={class:"fd-page-with-tabs"},y7=["textContent"];function z7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums"),l=O("content-with-heading");return x(),I("div",g7,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-added.title"))},null,8,y7)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),_:1})])}const v7=ae(_7,[["render",z7]]),ih={load(e){return B.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50,type:"track"})},set(e,t){e.tracks=new Ee(t.data.tracks)}},b7={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,ListTracks:_n,TabsMusic:_r},beforeRouteEnter(e,t,n){ih.load(e).then(r=>{n(o=>ih.set(o,r))})},data(){return{tracks:{}}}},C7={class:"fd-page-with-tabs"},w7=["textContent"];function k7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-tracks"),l=O("content-with-heading");return x(),I("div",C7,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-played.title"))},null,8,w7)]),content:N(()=>[b(a,{items:o.tracks},null,8,["items"])]),_:1})])}const S7=ae(b7,[["render",k7]]),x7={name:"ModalDialogPlaylistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},E7={key:0,class:"modal is-active"},$7={class:"modal-content"},T7={class:"card"},A7={class:"card-content"},O7={class:"title is-4"},P7=["textContent"],I7={class:"content is-small"},L7=["textContent"],N7=["textContent"],D7=["textContent"],R7=["textContent"],M7=["textContent"],F7=["textContent"],V7={class:"card-footer"},H7=["textContent"],U7=["textContent"],j7=["textContent"];function B7(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",E7,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",$7,[c("div",T7,[c("div",A7,[c("p",O7,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,P7)]),c("div",I7,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.playlist.owner"))},null,8,L7),c("span",{class:"title is-6",textContent:y(n.item.owner.display_name)},null,8,N7)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.playlist.tracks"))},null,8,D7),c("span",{class:"title is-6",textContent:y(n.item.tracks.total)},null,8,R7)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.playlist.path"))},null,8,M7),c("span",{class:"title is-6",textContent:y(n.item.uri)},null,8,F7)])])]),c("footer",V7,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.playlist.add"))},null,8,H7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.playlist.add-next"))},null,8,U7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.playlist.play"))},null,8,j7)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Q1=ae(x7,[["render",B7]]),W7={name:"ListPlaylistsSpotify",components:{ModalDialogPlaylistSpotify:Q1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"playlist-spotify",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},q7=["onClick"],G7=["textContent"],K7=["textContent"],Z7={class:"media-right"},Y7=["onClick"];function X7(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-playlist-spotify");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:"media-content is-clickable is-clipped",onClick:u=>s.open(l)},[c("h1",{class:"title is-6",textContent:y(l.name)},null,8,G7),c("h2",{class:"subtitle is-7",textContent:y(l.owner.display_name)},null,8,K7)],8,q7),c("div",Z7,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,Y7)])]))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const ul=ae(W7,[["render",X7]]),ah={load(e){return B.spotify().then(({data:t})=>{const n=new or;return n.setAccessToken(t.webapi_token),Promise.all([n.getNewReleases({country:t.webapi_country,limit:3}),n.getFeaturedPlaylists({country:t.webapi_country,limit:3})])})},set(e,t){e.albums=t[0].albums.items,e.playlists=t[1].playlists.items}},J7={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:Ti,ListPlaylistsSpotify:ul,TabsMusic:_r},beforeRouteEnter(e,t,n){ah.load(e).then(r=>{n(o=>ah.set(o,r))})},data(){return{playlists:[],albums:[]}}},Q7={class:"fd-page-with-tabs"},eV=["textContent"],tV={class:"level"},nV={class:"level-item"},rV=["textContent"],oV={class:"level"},sV={class:"level-item"};function iV(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums-spotify"),l=O("router-link"),u=O("content-with-heading"),m=O("list-playlists-spotify");return x(),I("div",Q7,[b(i),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.new-releases"))},null,8,eV)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),footer:N(()=>[c("nav",tV,[c("p",nV,[b(l,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:N(()=>[Lt(y(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.featured-playlists"))},null,8,rV)]),content:N(()=>[b(m,{items:o.playlists},null,8,["items"])]),footer:N(()=>[c("nav",oV,[c("p",sV,[b(l,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:N(()=>[Lt(y(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const aV=ae(J7,[["render",iV]]),lh={load(e){return B.spotify().then(({data:t})=>{const n=new or;return n.setAccessToken(t.webapi_token),n.getFeaturedPlaylists({country:t.webapi_country,limit:50})})},set(e,t){e.playlists=t.playlists.items}},lV={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListPlaylistsSpotify:ul,TabsMusic:_r},beforeRouteEnter(e,t,n){lh.load(e).then(r=>{n(o=>lh.set(o,r))})},data(){return{playlists:[]}}},cV={class:"fd-page-with-tabs"},uV=["textContent"];function dV(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-playlists-spotify"),l=O("content-with-heading");return x(),I("div",cV,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.featured-playlists"))},null,8,uV)]),content:N(()=>[b(a,{items:o.playlists},null,8,["items"])]),_:1})])}const mV=ae(lV,[["render",dV]]),ch={load(e){return B.spotify().then(({data:t})=>{const n=new or;return n.setAccessToken(t.webapi_token),n.getNewReleases({country:t.webapi_country,limit:50})})},set(e,t){e.albums=t.albums.items}},fV={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,ListAlbumsSpotify:Ti,TabsMusic:_r},beforeRouteEnter(e,t,n){ch.load(e).then(r=>{n(o=>ch.set(o,r))})},data(){return{albums:[]}}},pV={class:"fd-page-with-tabs"},hV=["textContent"];function _V(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums-spotify"),l=O("content-with-heading");return x(),I("div",pV,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.new-releases"))},null,8,hV)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),_:1})])}const gV=ae(fV,[["render",_V]]),yV={name:"LyricsPane",setup(){return{lyricsStore:Wl(),playerStore:xn()}},data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.playerStore.state==="play"},lyrics(){const e=this.lyricsStore.content,t=[];if(e.length>0){const n=/\[(?\d+):(?\d+)(?:\.(?\d+))?\] ?(?.*)/u;e.split(` -`).forEach(r=>{const{text:o,minutes:s,seconds:i,hundredths:a}=n.exec(r).groups;if(o){const l={text:o,time:s*60+Number(i)+ +`.${a||0}`};t.push(l)}}),t.forEach((r,o,s)=>{const i=(s[o+1].time-r.time||3)/r.text.length;let a=0;r.words=r.text.match(/\S+\s*/gu).map(l=>{const u=l.length*i;return a+=u,{duration:u,delay:a,text:l}})})}return t},verse_index(){var e;if(this.lyrics.length&&this.lyrics[0].time){const t=this.playerStore.item_progress_ms/1e3,n=this.lyrics,r=this.playerStore.item_id!==this.lastItemId,o=this.lastIndex>=0&&this.lastIndext;if((r||o)&&this.reset_scrolling(),this.lastIndext||this.lastIndex===n.length-1)return this.lastIndex;if(this.lastIndext)return this.lastIndex+1;let s=n.length-1,i=-1,a=0;for(;a<=s;){i=a+s>>1;const l=n[i].time,u=(e=n[i+1])==null?void 0:e.time;if(l<=t&&(u>t||!u))break;l>1)+(t.offsetHeight>>1)-e.scrollTop})},start_scrolling(e){(e.screenX??e.screenY)&&(this.autoScrolling=!1,clearTimeout(this.scrollingTimer),this.scrollingTimer=setTimeout(this.autoScrolling=!0,2e3))}}},zV=["textContent"],vV={key:1};function bV(e,t,n,r,o,s){return x(),I("div",{ref:"lyrics",class:"lyrics",onTouchstart:t[0]||(t[0]=i=>o.autoScrolling=!1),onTouchend:t[1]||(t[1]=i=>o.autoScrolling=!0),onScrollPassive:t[2]||(t[2]=(...i)=>s.start_scrolling&&s.start_scrolling(...i)),onWheelPassive:t[3]||(t[3]=(...i)=>s.start_scrolling&&s.start_scrolling(...i))},[(x(!0),I(ve,null,ht(s.lyrics,(i,a)=>(x(),I(ve,{key:a},[a===s.verse_index?(x(),I("div",{key:0,class:ke({"is-highlighted":s.is_playing})},[(x(!0),I(ve,null,ht(i.words,l=>(x(),I("span",{key:l,class:"has-text-weight-bold is-size-5"},[c("span",{style:ao({"animation-duration":`${l.delay}s`}),textContent:y(l.text)},null,12,zV)]))),128))],2)):(x(),I("div",vV,y(i.text),1))],64))),128))],544)}const CV=ae(yV,[["render",bV],["__scopeId","data-v-a97a7574"]]),wV={name:"ModalDialogQueueItem",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],setup(){return{servicesStore:Ot()}},data(){return{spotify_track:{}}},watch:{item(){var e;if(((e=this.item)==null?void 0:e.data_kind)==="spotify"){const t=new or;t.setAccessToken(this.servicesStore.spotify.webapi_token),t.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(n=>{this.spotify_track=n})}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"),B.player_play({item_id:this.item.id})},remove(){this.$emit("close"),B.queue_remove(this.item.id)}}},kV={key:0,class:"modal is-active"},SV={class:"modal-content"},xV={class:"card"},EV={class:"card-content"},$V=["textContent"],TV=["textContent"],AV={class:"content is-small"},OV={key:0},PV=["textContent"],IV=["textContent"],LV={key:1},NV=["textContent"],DV=["textContent"],RV={key:2},MV=["textContent"],FV=["textContent"],VV={key:3},HV=["textContent"],UV=["textContent"],jV={key:4},BV=["textContent"],WV=["textContent"],qV={key:5},GV=["textContent"],KV=["textContent"],ZV={key:6},YV=["textContent"],XV=["textContent"],JV=["textContent"],QV=["textContent"],e9=["textContent"],t9={class:"title is-6"},n9=["textContent"],r9={key:7},o9=["textContent"],s9={class:"title is-6"},i9=["textContent"],a9=["textContent"],l9=["textContent"],c9=["textContent"],u9={class:"card-footer"},d9=["textContent"],m9=["textContent"];function f9(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",kV,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",SV,[c("div",xV,[c("div",EV,[c("p",{class:"title is-4",textContent:y(n.item.title)},null,8,$V),c("p",{class:"subtitle",textContent:y(n.item.artist)},null,8,TV),c("div",AV,[n.item.album?(x(),I("p",OV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.album"))},null,8,PV),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:y(n.item.album)},null,8,IV)])):ee("",!0),n.item.album_artist?(x(),I("p",LV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.album-artist"))},null,8,NV),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:y(n.item.album_artist)},null,8,DV)])):ee("",!0),n.item.composer?(x(),I("p",RV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.composer"))},null,8,MV),c("span",{class:"title is-6",textContent:y(n.item.composer)},null,8,FV)])):ee("",!0),n.item.year?(x(),I("p",VV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.year"))},null,8,HV),c("span",{class:"title is-6",textContent:y(n.item.year)},null,8,UV)])):ee("",!0),n.item.genre?(x(),I("p",jV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.genre"))},null,8,BV),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:y(n.item.genre)},null,8,WV)])):ee("",!0),n.item.disc_number?(x(),I("p",qV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.position"))},null,8,GV),c("span",{class:"title is-6",textContent:y([n.item.disc_number,n.item.track_number].join(" / "))},null,8,KV)])):ee("",!0),n.item.length_ms?(x(),I("p",ZV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.duration"))},null,8,YV),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,XV)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.path"))},null,8,JV),c("span",{class:"title is-6",textContent:y(n.item.path)},null,8,QV)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.type"))},null,8,e9),c("span",t9,[c("span",{textContent:y(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,n9)])]),n.item.samplerate?(x(),I("p",r9,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.quality"))},null,8,o9),c("span",s9,[c("span",{textContent:y(n.item.type)},null,8,i9),n.item.samplerate?(x(),I("span",{key:0,textContent:y(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,a9)):ee("",!0),n.item.channels?(x(),I("span",{key:1,textContent:y(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,l9)):ee("",!0),n.item.bitrate?(x(),I("span",{key:2,textContent:y(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,c9)):ee("",!0)])])):ee("",!0)])]),c("footer",u9,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.remove&&s.remove(...a))},[b(i,{class:"icon",name:"delete",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.queue-item.remove"))},null,8,d9)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.queue-item.play"))},null,8,m9)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const ez=ae(wV,[["render",f9]]),Hr=1e3,p9={name:"PageNowPlaying",components:{ControlSlider:Bd,CoverArtwork:Pr,LyricsPane:CV,ModalDialogQueueItem:ez},setup(){return{lyricsStore:Wl(),playerStore:xn(),queueStore:Qn(),settingsStore:rr()}},data(){return{INTERVAL:Hr,cursor:Bl,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{composer(){if(this.settingsStore.show_composer_now_playing){const e=this.settingsStore.show_composer_for_genre;if(!e||this.track.genre&&e.toLowerCase().split(",").findIndex(t=>this.track.genre.toLowerCase().indexOf(t.trim())>=0)>=0)return this.track.composer}return null},is_live(){return this.track.length_ms===0},track(){return this.queueStore.current},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Hr)},track_progress:{get(){return Math.floor(this.playerStore.item_progress_ms/Hr)},set(e){this.playerStore.item_progress_ms=e*Hr}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Hr)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)}},watch:{playerStore(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.playerStore.state==="play"&&(this.interval_id=window.setInterval(this.tick,Hr))}},created(){B.player_status().then(({data:e})=>{this.playerStore.$state=e,this.playerStore.state==="play"&&(this.interval_id=window.setInterval(this.tick,Hr))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{end_dragging(){this.is_dragged=!1},open_dialog(e){this.selected_item=e,this.show_details_modal=!0},seek(){this.is_live||B.player_seek_to_pos(this.track_progress*Hr)},start_dragging(){this.is_dragged=!0},tick(){this.is_dragged||(this.track_progress+=1)}}},h9={class:"hero is-full-height"},_9={key:0,class:"hero-body is-flex is-align-items-center"},g9={class:"container has-text-centered",style:{"max-width":"500px"}},y9={class:"is-flex is-justify-content-space-between"},z9=["textContent"],v9=["textContent"],b9=["textContent"],C9=["textContent"],w9=["textContent"],k9=["textContent"],S9=["textContent"],x9={key:1,class:"hero-body is-flex is-align-items-center"},E9={class:"container has-text-centered"},$9=["textContent"],T9=["textContent"];function A9(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("lyrics-pane"),l=O("control-slider"),u=O("modal-dialog-queue-item");return x(),I("div",h9,[s.track.id>0?(x(),I("div",_9,[c("div",g9,[b(i,{url:s.track.artwork_url,artist:s.track.artist,album:s.track.album,class:ke(["is-clickable fd-has-shadow fd-cover-big-image",{"is-masked":r.lyricsStore.pane}]),onClick:t[0]||(t[0]=m=>s.open_dialog(s.track))},null,8,["url","artist","album","class"]),r.lyricsStore.pane?(x(),we(a,{key:0})):ee("",!0),b(l,{value:s.track_progress,"onUpdate:value":t[1]||(t[1]=m=>s.track_progress=m),class:"mt-5",disabled:s.is_live,max:s.track_progress_max,cursor:o.cursor,onChange:s.seek,onMousedown:s.start_dragging,onMouseup:s.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),c("div",y9,[c("p",{class:"subtitle is-7",textContent:y(s.track_elapsed_time)},null,8,z9),c("p",{class:"subtitle is-7",textContent:y(s.track_total_time)},null,8,v9)]),c("p",{class:"title is-5",textContent:y(s.track.title)},null,8,b9),c("p",{class:"title is-6",textContent:y(s.track.artist)},null,8,C9),s.composer?(x(),I("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:y(s.composer)},null,8,w9)):ee("",!0),s.track.album?(x(),I("p",{key:2,class:"subtitle is-6",textContent:y(s.track.album)},null,8,k9)):ee("",!0),r.settingsStore.show_filepath_now_playing?(x(),I("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:y(s.track.path)},null,8,S9)):ee("",!0)])])):(x(),I("div",x9,[c("div",E9,[c("p",{class:"title is-5",textContent:y(e.$t("page.now-playing.title"))},null,8,$9),c("p",{class:"subtitle",textContent:y(e.$t("page.now-playing.info"))},null,8,T9)])])),b(u,{show:o.show_details_modal,item:o.selected_item,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","item"])])}const O9=ae(p9,[["render",A9]]),ha={load(e){return Promise.all([B.library_playlist(e.params.id),B.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new Ee(t[1].data)}},P9={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:cl},beforeRouteEnter(e,t,n){ha.load(e).then(r=>{n(o=>ha.set(o,r))})},beforeRouteUpdate(e,t,n){ha.load(e).then(r=>{ha.set(this,r),n()})},setup(){return{configurationStore:Do()}},data(){return{playlist:{},playlists_list:new Ee}},computed:{playlists(){return this.playlists_list.group({filters:[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]})},radio_playlists(){return this.configurationStore.radio_playlists}}},I9=["textContent"],L9=["textContent"];function N9(e,t,n,r,o,s){const i=O("list-playlists"),a=O("content-with-heading");return x(),I("div",null,[b(a,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.playlist.id===0?e.$t("page.playlists.title"):o.playlist.name)},null,8,I9),c("p",{class:"heading",textContent:y(e.$t("page.playlists.count",{count:s.playlists.count}))},null,8,L9)]),content:N(()=>[b(i,{items:s.playlists},null,8,["items"])]),_:1})])}const D9=ae(P9,[["render",N9]]),uh={load(e){return Promise.all([B.library_playlist(e.params.id),B.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new Ee(t[1].data)}},R9={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:_n,ModalDialogPlaylist:J1},beforeRouteEnter(e,t,n){uh.load(e).then(r=>{n(o=>uh.set(o,r))})},data(){return{playlist:{},show_details_modal:!1,tracks:new Ee}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join():this.playlist.uri}},methods:{play(){B.player_play_uri(this.uris,!0)}}},M9=["textContent"],F9={class:"buttons is-centered"},V9=["textContent"],H9=["textContent"];function U9(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-tracks"),l=O("modal-dialog-playlist"),u=O("content-with-heading");return x(),I("div",null,[b(u,null,{"heading-left":N(()=>[c("div",{class:"title is-4",textContent:y(o.playlist.name)},null,8,M9)]),"heading-right":N(()=>[c("div",F9,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.playlist.shuffle"))},null,8,V9)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.playlist.track-count",{count:o.tracks.count}))},null,8,H9),b(a,{items:o.tracks,uris:s.uris},null,8,["items","uris"]),b(l,{item:o.playlist,show:o.show_details_modal,uris:s.uris,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["item","show","uris"])]),_:1})])}const j9=ae(R9,[["render",U9]]),qu=50,dh={load(e){const t=new or;return t.setAccessToken(Ot().spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:qu,market:Ot().state.spotify.webapi_country,offset:0})])},set(e,t){e.playlist=t.shift(),e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t.shift())}},B9={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListTracksSpotify:al,ModalDialogPlaylistSpotify:Q1,VueEternalLoading:rm},beforeRouteEnter(e,t,n){dh.load(e).then(r=>{n(o=>dh.set(o,r))})},setup(){return{servicesStore:Ot()}},data(){return{offset:0,playlist:{tracks:{}},show_playlist_details_modal:!1,total:0,tracks:[]}},methods:{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},load_next({loaded:e}){const t=new or;t.setAccessToken(this.servicesStore.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:qu,market:this.servicesStore.spotify.webapi_country,offset:this.offset}).then(n=>{this.append_tracks(n),e(n.items.length,qu)})},play(){this.show_details_modal=!1,B.player_play_uri(this.playlist.uri,!0)}}},W9=["textContent"],q9={class:"buttons is-centered"},G9=["textContent"],K9=["textContent"],Z9={class:"columns is-centered"},Y9={class:"column has-text-centered"},X9=c("br",null,null,-1);function J9(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-tracks-spotify"),l=O("VueEternalLoading"),u=O("modal-dialog-playlist-spotify"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("div",{class:"title is-4",textContent:y(o.playlist.name)},null,8,W9)]),"heading-right":N(()=>[c("div",q9,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_playlist_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.spotify.playlist.shuffle"))},null,8,G9)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.spotify.playlist.count",{count:o.playlist.tracks.total}))},null,8,K9),b(a,{items:o.tracks,context_uri:o.playlist.uri},null,8,["items","context_uri"]),o.offset[c("div",Z9,[c("div",Y9,[b(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":N(()=>[X9]),_:1},8,["load"])):ee("",!0),b(u,{item:o.playlist,show:o.show_playlist_details_modal,onClose:t[2]||(t[2]=d=>o.show_playlist_details_modal=!1)},null,8,["item","show"])]),_:1})])}const Q9=ae(B9,[["render",J9]]),mh={load(e){return Promise.all([B.library_album(e.params.id),B.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data.tracks)}},eH={name:"PagePodcast",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracks:_n,ModalDialog:jd,ModalDialogAlbum:ec},beforeRouteEnter(e,t,n){mh.load(e).then(r=>{n(o=>mh.set(o,r))})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new Ee}},methods:{open_remove_podcast_dialog(){B.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(){B.player_play_uri(this.album.uri,!1)},reload_tracks(){B.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new Ee(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,B.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},tH=["textContent"],nH=c("h2",{class:"subtitle is-6"},[c("br")],-1),rH={class:"buttons fd-is-centered-mobile mt-5"},oH=["textContent"],sH=["textContent"],iH=["textContent"],aH={class:"is-size-7"},lH=["textContent"],cH=["textContent"];function uH(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks"),u=O("modal-dialog-album"),m=O("modal-dialog"),d=O("content-with-hero");return x(),I("div",null,[b(d,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,tH),nH,c("div",rH,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>s.play&&s.play(...f))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.podcast.play"))},null,8,oH)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.podcast.track-count",{count:o.album.track_count}))},null,8,sH),b(l,{items:o.tracks,show_progress:!0,onPlayCountChanged:s.reload_tracks},null,8,["items","onPlayCountChanged"]),b(u,{item:o.album,show:o.show_details_modal,media_kind:"podcast",onClose:t[3]||(t[3]=f=>o.show_details_modal=!1),onPlayCountChanged:s.reload_tracks,onRemovePodcast:s.open_remove_podcast_dialog},null,8,["item","show","onPlayCountChanged","onRemovePodcast"]),b(m,{show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),close_action:e.$t("page.podcast.cancel"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":N(()=>[c("p",{textContent:y(e.$t("page.podcast.remove-info-1"))},null,8,iH),c("p",aH,[Lt(" ("),c("span",{textContent:y(e.$t("page.podcast.remove-info-2"))},null,8,lH),c("b",{textContent:y(o.rss_playlist_to_remove.name)},null,8,cH),Lt(") ")])]),_:1},8,["show","title","close_action","delete_action","onDelete"])]),_:1})])}const dH=ae(eH,[["render",uH]]),mH={name:"ModalDialogAddRss",props:{show:Boolean},emits:["close","podcast-added"],data(){return{disabled:!0,loading:!1,url:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,B.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})},check_url(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing}}},fH={key:0,class:"modal is-active"},pH={class:"modal-content"},hH={class:"card-content"},_H=["textContent"],gH={class:"field"},yH={class:"control has-icons-left"},zH=["placeholder","disabled"],vH=["textContent"],bH={key:0,class:"card-footer"},CH={class:"card-footer-item has-text-dark"},wH=["textContent"],kH={key:1,class:"card-footer is-clipped"},SH=["textContent"],xH=["textContent"];function EH(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",fH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",pH,[c("form",{class:"card",onSubmit:t[5]||(t[5]=_t((...a)=>s.add_stream&&s.add_stream(...a),["prevent"]))},[c("div",hH,[c("p",{class:"title is-4",textContent:y(e.$t("dialog.add.rss.title"))},null,8,_H),c("div",gH,[c("p",yH,[pt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.+",required:"",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_url&&s.check_url(...a))},null,40,zH),[[hn,o.url]]),b(i,{class:"icon is-left",name:"rss",size:"16"})]),c("p",{class:"help",textContent:y(e.$t("dialog.add.rss.help"))},null,8,vH)])]),o.loading?(x(),I("footer",bH,[c("a",CH,[b(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.rss.processing"))},null,8,wH)])])):(x(),I("footer",kH,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[b(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.rss.cancel"))},null,8,SH)]),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[4]||(t[4]=(...a)=>s.add_stream&&s.add_stream(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.rss.add"))},null,8,xH)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const $H=ae(mH,[["render",EH]]),fh={load(e){return Promise.all([B.library_albums("podcast"),B.library_podcasts_new_episodes()])},set(e,t){e.albums=new Ee(t[0].data),e.tracks=new Ee(t[1].data.tracks)}},TH={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListAlbums:Cn,ListTracks:_n,ModalDialogAddRss:$H},beforeRouteEnter(e,t,n){fh.load(e).then(r=>{n(o=>fh.set(o,r))})},setup(){return{libraryStore:jl(),uiStore:gn()}},data(){return{albums:[],tracks:{items:[]},show_url_modal:!1}},computed:{rss(){return this.libraryStore.rss}},methods:{mark_all_played(){this.tracks.items.forEach(e=>{B.library_track_update(e.id,{play_count:"increment"})}),this.tracks.items={}},open_add_podcast_dialog(){this.show_url_modal=!0},reload_new_episodes(){B.library_podcasts_new_episodes().then(({data:e})=>{this.tracks=new Ee(e.tracks)})},reload_podcasts(){B.library_albums("podcast").then(({data:e})=>{this.albums=new Ee(e),this.reload_new_episodes()})},update_rss(){this.libraryStore.update_dialog_scan_kind="rss",this.uiStore.show_update_dialog=!0}}},AH=["textContent"],OH={class:"buttons is-centered"},PH=["textContent"],IH=["textContent"],LH=["textContent"],NH={class:"buttons is-centered"},DH=["textContent"],RH=["textContent"];function MH(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-tracks"),l=O("content-with-heading"),u=O("list-albums"),m=O("modal-dialog-add-rss");return x(),I("div",null,[o.tracks.items.length>0?(x(),we(l,{key:0},{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.podcasts.new-episodes"))},null,8,AH)]),"heading-right":N(()=>[c("div",OH,[c("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>s.mark_all_played&&s.mark_all_played(...d))},[b(i,{class:"icon",name:"pencil",size:"16"}),c("span",{textContent:y(e.$t("page.podcasts.mark-all-played"))},null,8,PH)])])]),content:N(()=>[b(a,{items:o.tracks,show_progress:!0,onPlayCountChanged:s.reload_new_episodes},null,8,["items","onPlayCountChanged"])]),_:1})):ee("",!0),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.podcasts.title"))},null,8,IH),c("p",{class:"heading",textContent:y(e.$t("page.podcasts.count",{count:o.albums.total}))},null,8,LH)]),"heading-right":N(()=>[c("div",NH,[s.rss.tracks>0?(x(),I("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>s.update_rss&&s.update_rss(...d))},[b(i,{class:"icon",name:"refresh",size:"16"}),c("span",{textContent:y(e.$t("page.podcasts.update"))},null,8,DH)])):ee("",!0),c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>s.open_add_podcast_dialog&&s.open_add_podcast_dialog(...d))},[b(i,{class:"icon",name:"rss",size:"16"}),c("span",{textContent:y(e.$t("page.podcasts.add"))},null,8,RH)])])]),content:N(()=>[b(u,{items:o.albums,onPlayCountChanged:t[3]||(t[3]=d=>s.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>s.reload_podcasts())},null,8,["items"]),b(m,{show:o.show_url_modal,onClose:t[5]||(t[5]=d=>o.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>s.reload_podcasts())},null,8,["show"])]),_:1})])}const FH=ae(TH,[["render",MH]]),VH={name:"ListItemQueueItem",props:{current_position:{required:!0,type:Number},edit_mode:Boolean,item:{required:!0,type:Object},position:{required:!0,type:Number},show_only_next_items:Boolean},setup(){return{playerStore:xn()}},computed:{is_next(){return this.current_position<0||this.position>=this.current_position},player(){return this.playerStore}},methods:{play(){B.player_play({item_id:this.item.id})}}},HH={key:0,class:"media is-align-items-center"},UH={key:0,class:"media-left"},jH=["textContent"],BH=["textContent"],WH=["textContent"],qH={class:"media-right"};function GH(e,t,n,r,o,s){const i=O("mdicon");return s.is_next||!n.show_only_next_items?(x(),I("div",HH,[n.edit_mode?(x(),I("div",UH,[b(i,{class:"icon has-text-grey fd-is-movable handle",name:"drag-horizontal",size:"16"})])):ee("",!0),c("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>s.play&&s.play(...a))},[c("h1",{class:ke(["title is-6",{"has-text-primary":n.item.id===s.player.item_id,"has-text-grey-light":!s.is_next}]),textContent:y(n.item.title)},null,10,jH),c("h2",{class:ke(["subtitle is-7 has-text-weight-bold",{"has-text-primary":n.item.id===s.player.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.player.item_id}]),textContent:y(n.item.artist)},null,10,BH),c("h2",{class:ke(["subtitle is-7",{"has-text-primary":n.item.id===s.player.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.player.item_id}]),textContent:y(n.item.album)},null,10,WH)]),c("div",qH,[zt(e.$slots,"actions")])])):ee("",!0)}const KH=ae(VH,[["render",GH]]),ZH={name:"ModalDialogAddUrlStream",props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,url:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,B.queue_add(this.url).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})},check_url(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing},play(){this.loading=!0,B.player_play_uri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}}},YH={key:0,class:"modal is-active"},XH={class:"modal-content"},JH={class:"card-content"},QH=["textContent"],eU={class:"field"},tU={class:"control has-icons-left"},nU=["placeholder","disabled"],rU={key:0,class:"card-footer"},oU={class:"card-footer-item has-text-dark"},sU=["textContent"],iU={key:1,class:"card-footer is-clipped"},aU=["textContent"],lU=["textContent"],cU=["textContent"];function uU(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",YH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",XH,[c("form",{class:"card",onSubmit:t[6]||(t[6]=_t((...a)=>s.play&&s.play(...a),["prevent"]))},[c("div",JH,[c("p",{class:"title is-4",textContent:y(e.$t("dialog.add.stream.title"))},null,8,QH),c("div",eU,[c("p",tU,[pt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.+",required:"",placeholder:e.$t("dialog.add.stream.placeholder"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_url&&s.check_url(...a))},null,40,nU),[[hn,o.url]]),b(i,{class:"icon is-left",name:"web",size:"16"})])])]),o.loading?(x(),I("footer",rU,[c("a",oU,[b(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.loading"))},null,8,sU)])])):(x(),I("footer",iU,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[b(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.cancel"))},null,8,aU)]),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-text-dark"]),onClick:t[4]||(t[4]=(...a)=>s.add_stream&&s.add_stream(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.add"))},null,8,lU)],2),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.play"))},null,8,cU)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const dU=ae(ZH,[["render",uU]]),mU={name:"ModalDialogPlaylistSave",props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,playlist_name:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}},methods:{check_name(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing},save(){this.loading=!0,B.queue_save_playlist(this.playlist_name).then(()=>{this.$emit("close"),this.playlist_name=""}).catch(()=>{this.loading=!1})}}},fU={key:0,class:"modal is-active"},pU={class:"modal-content"},hU={class:"card-content"},_U=["textContent"],gU={class:"field"},yU={class:"control has-icons-left"},zU=["placeholder","disabled"],vU={key:0,class:"card-footer"},bU={class:"card-footer-item has-text-dark"},CU=["textContent"],wU={key:1,class:"card-footer is-clipped"},kU=["textContent"],SU=["textContent"];function xU(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",fU,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",pU,[c("form",{class:"card",onSubmit:t[5]||(t[5]=_t((...a)=>s.save&&s.save(...a),["prevent"]))},[c("div",hU,[c("p",{class:"title is-4",textContent:y(e.$t("dialog.playlist.save.title"))},null,8,_U),c("div",gU,[c("p",yU,[pt(c("input",{ref:"playlist_name_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.playlist_name=a),class:"input is-shadowless",type:"text",pattern:".+",required:"",placeholder:e.$t("dialog.playlist.save.playlist-name"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_name&&s.check_name(...a))},null,40,zU),[[hn,o.playlist_name]]),b(i,{class:"icon is-left",name:"file-music",size:"16"})])])]),o.loading?(x(),I("footer",vU,[c("a",bU,[b(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.save.saving"))},null,8,CU)])])):(x(),I("footer",wU,[c("a",{class:"card-footer-item has-text-danger",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[b(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.save.cancel"))},null,8,kU)]),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[4]||(t[4]=(...a)=>s.save&&s.save(...a))},[b(i,{class:"icon",name:"content-save",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.save.save"))},null,8,SU)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const EU=ae(mU,[["render",xU]]);var tz={exports:{}};/**! + `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},$P={name:"CoverArtwork",props:{album:{default:"",type:String},artist:{default:"",type:String},url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},lifecycle:{error:e=>{e.src=this.dataURI()}},size:600}},computed:{alt_text(){return`${this.artist} - ${this.album}`},caption(){return(this.album||this.artist||"").substring(0,2)}},methods:{dataURI(){return EP({alternate:this.alt_text,caption:this.caption,font:this.font,size:this.size})}}};function TP(e,t,n,r,o,s){const i=zd("lazy");return x(),I("figure",null,[pt(c("img",{onClick:t[0]||(t[0]=a=>e.$emit("click"))},null,512),[[i,{src:n.url,lifecycle:o.lifecycle}]])])}const Pr=ae($P,[["render",TP]]),{t:fa,locale:AP}=Ul.global,q1="NO_INDEX",OP=(e,t)=>e-t,PP=(e,t)=>e.localeCompare(t,AP.value),IP=(e,t)=>new Date(e)-new Date(t)||(e?t?0:1:-1),LP=e=>e.map(({field:t,type:n,order:r=1})=>{switch(n){case String:return(o,s)=>PP(o[t],s[t])*r;case Number:return(o,s)=>OP(o[t],s[t])*r;case Date:return(o,s)=>IP(o[t],s[t])*r;default:return()=>0}}),NP=(e="")=>{const t=e.charAt(0);return t.match(new RegExp("\\p{Letter}","gu"))?t.toUpperCase():t.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"},DP=e=>{},RP=[{difference:NaN,text:()=>fa("grouped-list.undefined")},{difference:864e5,text:()=>fa("grouped-list.today")},{difference:6048e5,text:()=>fa("grouped-list.last-week")},{difference:2592e6,text:()=>fa("grouped-list.last-month")},{difference:1/0,text:e=>e.getFullYear()}],MP=e=>{var r;const t=new Date(e),n=new Date-t;return(r=RP.find(o=>isNaN(n)||n{switch(t){case String:return n=>NP(n[e]);case Number:return n=>n[e];case Date:return n=>MP(n[e]);case"Digits":return n=>DP(n[e]);default:return()=>q1}};class Ee{constructor({items:t=[],total:n=0,offset:r=0,limit:o=-1}={},s={}){this.items=t,this.total=n,this.offset=r,this.limit=o,this.count=t.length,this.indices=[],this.group(s)}group({criteria:t=[],filters:n=[],index:r}={}){const o=this.items.filter(l=>n.every(u=>u(l)));this.count=o.length;const s=LP(t),i=o.sort((l,u)=>s.reduce((m,d)=>m||d(l,u),0)),a=FP(r);return this.itemsGrouped=i.reduce((l,u)=>{const m=a(u);return l.set(m,[...l.get(m)||[],u]),l},new Map),this.indices=Array.from(this.itemsGrouped.keys()),this}*generate(){for(const[t,n]of this.itemsGrouped.entries()){t!==q1&&(yield{index:t,isItem:!1,item:{},itemId:t});for(const r of n)yield{index:t,isItem:!0,item:r,itemId:r.id}}}[Symbol.iterator](){return this.generate()}}var G1={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,o=null,s=function(f,p){return f.abort=p,f},i=function(f,p){var h;if(o!==null){var g=o.defer();f(function(z){g.resolve(z)},function(z){g.reject(z)}),h=g.promise}else window.Promise&&(h=new window.Promise(f));return h?new s(h,p):null},a=function(){var f=Array.prototype.slice.call(arguments),p=f[0],h=f.slice(1);return p=p||{},h.forEach(function(g){for(var z in g)g.hasOwnProperty(z)&&(p[z]=g[z])}),p},l=function(f,p){var h="";for(var g in p)if(p.hasOwnProperty(g)){var z=p[g];h+=encodeURIComponent(g)+"="+encodeURIComponent(z)+"&"}return h.length>0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},u=function(f,p){var h=new XMLHttpRequest,g=function(z,k){function w(C){z&&z(C),p&&p(null,C)}function _(){k&&k(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 C=null;try{C=h.responseText?JSON.parse(h.responseText):""}catch(L){console.error(L)}h.status>=200&&h.status<300?w(C):_()}},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?(g(),null):i(g,function(){h.abort()})},m=function(f,p,h,g){var z={},k=null;typeof p=="object"?(z=p,k=h):typeof p=="function"&&(k=p);var w=f.type||"GET";return w!=="GET"&&f.postData&&!g?f.postData=a(f.postData,z):f.params=a(f.params,z),u(f,k)},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 g={url:n+"/me/tracks",type:"PUT",postData:f};return m(g,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var g={url:n+"/me/tracks",type:"DELETE",postData:f};return m(g,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var g={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(g,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 g={url:n+"/me/albums",type:"PUT",postData:f};return m(g,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var g={url:n+"/me/albums",type:"DELETE",postData:f};return m(g,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var g={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(g,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 g={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(g,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 g={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(g,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 g={url:n+"/users/"+encodeURIComponent(f)};return m(g,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var g;return typeof f=="string"?g={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(g={url:n+"/me/playlists"},h=p,p=f),m(g,p,h)},d.prototype.getPlaylist=function(f,p,h){var g={url:n+"/playlists/"+f};return m(g,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var g={url:n+"/playlists/"+f+"/tracks"};return m(g,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 g={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(g,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var g={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(g,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,g){var z={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(z,h,g,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var g={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(g,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,g,z){var k={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(k,g,z)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var g=p.map(function(k){return typeof k=="string"?{uri:k}:k}),z={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:g}};return m(z,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,g){var z=p.map(function(w){return typeof w=="string"?{uri:w}:w}),k={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:z,snapshot_id:h}};return m(k,{},g)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,g){var z={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(z,{},g)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var g={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(g,{},h)},d.prototype.getAlbum=function(f,p,h){var g={url:n+"/albums/"+f};return m(g,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var g={url:n+"/albums/"+f+"/tracks"};return m(g,p,h)},d.prototype.getAlbums=function(f,p,h){var g={url:n+"/albums/",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getTrack=function(f,p,h){var g={};return g.url=n+"/tracks/"+f,m(g,p,h)},d.prototype.getTracks=function(f,p,h){var g={url:n+"/tracks/",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getArtist=function(f,p,h){var g={url:n+"/artists/"+f};return m(g,p,h)},d.prototype.getArtists=function(f,p,h){var g={url:n+"/artists/",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var g={url:n+"/artists/"+f+"/albums"};return m(g,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,g){var z={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(z,h,g)},d.prototype.getArtistRelatedArtists=function(f,p,h){var g={url:n+"/artists/"+f+"/related-artists"};return m(g,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 g={url:n+"/browse/categories/"+f};return m(g,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var g={url:n+"/browse/categories/"+f+"/playlists"};return m(g,p,h)},d.prototype.search=function(f,p,h,g){var z={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(z,h,g)},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 g=p||{};g.device_ids=f;var z={type:"PUT",url:n+"/me/player",postData:g};return m(z,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={};["context_uri","uris","offset","position_ms"].forEach(function(w){w in f&&(g[w]=f[w])});var z={type:"PUT",url:n+"/me/player/play",params:h,postData:g},k=typeof f=="function"?f:{};return m(z,k,p)},d.prototype.queue=function(f,p,h){p=p||{};var g="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},z={type:"POST",url:n+"/me/player/queue",params:g};return m(z,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={type:"PUT",url:n+"/me/player/pause",params:h};return m(g,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={type:"POST",url:n+"/me/player/next",params:h};return m(g,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,g={type:"POST",url:n+"/me/player/previous",params:h};return m(g,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var g={position_ms:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/seek",params:g};return m(z,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var g={state:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/repeat",params:g};return m(z,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var g={volume_percent:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/volume",params:g};return m(z,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var g={state:f};"device_id"in p&&(g.device_id=p.device_id);var z={type:"PUT",url:n+"/me/player/shuffle",params:g};return m(z,p,h)},d.prototype.getShow=function(f,p,h){var g={};return g.url=n+"/shows/"+f,m(g,p,h)},d.prototype.getShows=function(f,p,h){var g={url:n+"/shows/",params:{ids:f.join(",")}};return m(g,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 g={url:n+"/me/shows",type:"PUT",postData:f};return m(g,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var g={url:n+"/me/shows",type:"DELETE",postData:f};return m(g,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var g={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(g,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var g={url:n+"/shows/"+f+"/episodes"};return m(g,p,h)},d.prototype.getEpisode=function(f,p,h){var g={};return g.url=n+"/episodes/"+f,m(g,p,h)},d.prototype.getEpisodes=function(f,p,h){var g={url:n+"/episodes/",params:{ids:f.join(",")}};return m(g,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(g){g()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(g){console.error(g)}if(p)o=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(G1);var VP=G1.exports;const or=ql(VP),HP={name:"ModalDialogTrack",props:{item:{required:!0,type:Object},show:Boolean},emits:["close","play-count-changed"],setup(){return{servicesStore:Ot()}},data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"){const e=new or;e.setAccessToken(this.servicesStore.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:{mark_new(){B.library_track_update(this.item.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){B.library_track_update(this.item.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open_album(){this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"?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"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},UP={key:0,class:"modal is-active"},jP={class:"modal-content"},BP={class:"card"},WP={class:"card-content"},qP=["textContent"],GP=["textContent"],KP={key:0,class:"buttons"},ZP=["textContent"],YP=["textContent"],XP={class:"content is-small"},JP={key:0},QP=["textContent"],eI=["textContent"],tI={key:1},nI=["textContent"],rI=["textContent"],oI={key:2},sI=["textContent"],iI=["textContent"],aI={key:3},lI=["textContent"],cI=["textContent"],uI={key:4},dI=["textContent"],mI=["textContent"],fI={key:5},pI=["textContent"],hI=["textContent"],_I={key:6},gI=["textContent"],yI=["textContent"],zI={key:7},vI=["textContent"],bI=["textContent"],CI=["textContent"],wI=["textContent"],kI=["textContent"],SI={class:"title is-6"},xI=["textContent"],EI={key:8},$I=["textContent"],TI={class:"title is-6"},AI=["textContent"],OI=["textContent"],PI=["textContent"],II=["textContent"],LI=["textContent"],NI=["textContent"],DI=["textContent"],RI=["textContent"],MI={key:9},FI=["textContent"],VI=["textContent"],HI={class:"card-footer"},UI=["textContent"],jI=["textContent"],BI=["textContent"];function WI(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",UP,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",jP,[c("div",BP,[c("div",WP,[c("p",{class:"title is-4",textContent:y(n.item.title)},null,8,qP),c("p",{class:"subtitle",textContent:y(n.item.artist)},null,8,GP),n.item.media_kind==="podcast"?(x(),I("div",KP,[n.item.play_count>0?(x(),I("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...a)=>s.mark_new&&s.mark_new(...a)),textContent:y(e.$t("dialog.track.mark-as-new"))},null,8,ZP)):ee("",!0),n.item.play_count===0?(x(),I("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...a)=>s.mark_played&&s.mark_played(...a)),textContent:y(e.$t("dialog.track.mark-as-played"))},null,8,YP)):ee("",!0)])):ee("",!0),c("div",XP,[n.item.album?(x(),I("p",JP,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.album"))},null,8,QP),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_album&&s.open_album(...a)),textContent:y(n.item.album)},null,8,eI)])):ee("",!0),n.item.album_artist&&n.item.media_kind!=="audiobook"?(x(),I("p",tI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.album-artist"))},null,8,nI),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:y(n.item.album_artist)},null,8,rI)])):ee("",!0),n.item.composer?(x(),I("p",oI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.composer"))},null,8,sI),c("span",{class:"title is-6",textContent:y(n.item.composer)},null,8,iI)])):ee("",!0),n.item.date_released?(x(),I("p",aI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.release-date"))},null,8,lI),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.date_released))},null,8,cI)])):n.item.year?(x(),I("p",uI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.year"))},null,8,dI),c("span",{class:"title is-6",textContent:y(n.item.year)},null,8,mI)])):ee("",!0),n.item.genre?(x(),I("p",fI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.genre"))},null,8,pI),c("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:y(n.item.genre)},null,8,hI)])):ee("",!0),n.item.disc_number?(x(),I("p",_I,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.position"))},null,8,gI),c("span",{class:"title is-6",textContent:y([n.item.disc_number,n.item.track_number].join(" / "))},null,8,yI)])):ee("",!0),n.item.length_ms?(x(),I("p",zI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.duration"))},null,8,vI),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,bI)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.path"))},null,8,CI),c("span",{class:"title is-6",textContent:y(n.item.path)},null,8,wI)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.type"))},null,8,kI),c("span",SI,[c("span",{textContent:y(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,xI)])]),n.item.samplerate?(x(),I("p",EI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.quality"))},null,8,$I),c("span",TI,[c("span",{textContent:y(n.item.type)},null,8,AI),n.item.samplerate?(x(),I("span",{key:0,textContent:y(e.$t("dialog.track.samplerate",{rate:n.item.samplerate}))},null,8,OI)):ee("",!0),n.item.channels?(x(),I("span",{key:1,textContent:y(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,PI)):ee("",!0),n.item.bitrate?(x(),I("span",{key:2,textContent:y(e.$t("dialog.track.bitrate",{rate:n.item.bitrate}))},null,8,II)):ee("",!0)])])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.added-on"))},null,8,LI),c("span",{class:"title is-6",textContent:y(e.$filters.datetime(n.item.time_added))},null,8,NI)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.rating"))},null,8,DI),c("span",{class:"title is-6",textContent:y(e.$t("dialog.track.rating-value",{rating:Math.floor(n.item.rating/10)}))},null,8,RI)]),n.item.comment?(x(),I("p",MI,[c("span",{class:"heading",textContent:y(e.$t("dialog.track.comment"))},null,8,FI),c("span",{class:"title is-6",textContent:y(n.item.comment)},null,8,VI)])):ee("",!0)])]),c("footer",HI,[c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.track.add"))},null,8,UI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.track.add-next"))},null,8,jI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.track.play"))},null,8,BI)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const qI=ae(HP,[["render",WI]]),GI={name:"ListTracks",components:{ModalDialogTrack:qI},props:{expression:{default:"",type:String},items:{required:!0,type:Object},show_icon:Boolean,show_progress:Boolean,uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){this.uris?B.player_play_uri(this.uris,!1,this.items.items.indexOf(e)):this.expression?B.player_play_expression(this.expression,!1,this.items.items.indexOf(e)):B.player_play_uri(e.uri,!1)}}},KI={key:0,class:"mt-6 mb-5 py-2"},ZI=["id","textContent"],YI=["onClick"],XI={key:0,class:"media-left is-clickable"},JI={class:"media-content is-clickable is-clipped"},QI=["textContent"],eL=["textContent"],tL=["textContent"],nL=["max","value"],rL={class:"media-right"},oL=["onClick"];function sL(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-track");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:ke(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:u=>s.play(l.item)},[n.show_icon?(x(),I("figure",XI,[b(i,{class:"icon",name:"file-outline",size:"16"})])):ee("",!0),c("div",JI,[c("h1",{class:ke(["title is-6",{"has-text-grey":l.item.media_kind==="podcast"&&l.item.play_count>0}]),textContent:y(l.item.title)},null,10,QI),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:y(l.item.artist)},null,8,eL),c("h2",{class:"subtitle is-7 has-text-grey",textContent:y(l.item.album)},null,8,tL),n.show_progress&&l.item.seek_ms>0?(x(),I("progress",{key:0,class:"progress is-info",max:l.item.length_ms,value:l.item.seek_ms},null,8,nL)):ee("",!0)]),c("div",rL,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,oL)])],10,YI)):(x(),I("div",KI,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,ZI)]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=l=>e.$emit("play-count-changed"))},null,8,["item","show"])]))],64)}const _n=ae(GI,[["render",sL],["__scopeId","data-v-84498238"]]),iL={name:"ModalDialogAlbum",components:{CoverArtwork:Pr},props:{item:{required:!0,type:Object},media_kind:{default:"",type:String},show:Boolean},emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{media_kind_resolved(){return this.media_kind||this.item.media_kind}},methods:{mark_played(){B.library_album_track_update(this.item.id,{play_count:"played"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.id}}):this.$router.push({name:"music-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.item.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.item.artist_id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},aL={key:0,class:"modal is-active"},lL={class:"modal-content"},cL={class:"card"},uL={class:"card-content"},dL={class:"title is-4"},mL=["textContent"],fL={key:0,class:"buttons"},pL=["textContent"],hL=["textContent"],_L={class:"content is-small"},gL={key:0},yL=["textContent"],zL=["textContent"],vL={key:1},bL=["textContent"],CL=["textContent"],wL={key:2},kL=["textContent"],SL=["textContent"],xL=["textContent"],EL=["textContent"],$L=["textContent"],TL=["textContent"],AL=["textContent"],OL=["textContent"],PL=["textContent"],IL=["textContent"],LL={class:"card-footer"},NL=["textContent"],DL=["textContent"],RL=["textContent"];function ML(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",aL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",lL,[c("div",cL,[c("div",uL,[b(i,{url:n.item.artwork_url,artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["url","artist","album"]),c("p",dL,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:y(n.item.name)},null,8,mL)]),s.media_kind_resolved==="podcast"?(x(),I("div",fL,[c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>s.mark_played&&s.mark_played(...l)),textContent:y(e.$t("dialog.album.mark-as-played"))},null,8,pL),n.item.data_kind==="url"?(x(),I("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:y(e.$t("dialog.album.remove-podcast"))},null,8,hL)):ee("",!0)])):ee("",!0),c("div",_L,[n.item.artist?(x(),I("p",gL,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.artist"))},null,8,yL),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:y(n.item.artist)},null,8,zL)])):ee("",!0),n.item.date_released?(x(),I("p",vL,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.release-date"))},null,8,bL),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.date_released))},null,8,CL)])):n.item.year?(x(),I("p",wL,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.year"))},null,8,kL),c("span",{class:"title is-6",textContent:y(n.item.year)},null,8,SL)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.tracks"))},null,8,xL),c("span",{class:"title is-6",textContent:y(n.item.track_count)},null,8,EL)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.duration"))},null,8,$L),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,TL)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.type"))},null,8,AL),c("span",{class:"title is-6",textContent:y(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,OL)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.album.added-on"))},null,8,PL),c("span",{class:"title is-6",textContent:y(e.$filters.datetime(n.item.time_added))},null,8,IL)])])]),c("footer",LL,[c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.queue_add&&s.queue_add(...l))},[b(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.album.add"))},null,8,NL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[b(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.album.add-next"))},null,8,DL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>s.play&&s.play(...l))},[b(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.album.play"))},null,8,RL)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const ec=ae(iL,[["render",ML]]),Vp={load(e){return Promise.all([B.library_album(e.params.id),B.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),e.tracks.indices.length<2&&e.tracks.group()}},FL={name:"PageAlbum",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracks:_n,ModalDialogAlbum:ec},beforeRouteEnter(e,t,n){Vp.load(e).then(r=>{n(o=>Vp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){B.player_play_uri(this.album.uri,!0)}}},VL=["textContent"],HL={class:"subtitle is-6 has-text-link"},UL=["textContent"],jL={class:"buttons fd-is-centered-mobile mt-5"},BL=["textContent"],WL=["textContent"];function qL(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks"),u=O("modal-dialog-album"),m=O("content-with-hero");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,VL),c("h2",HL,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:y(o.album.artist)},null,8,UL)]),c("div",jL,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.album.shuffle"))},null,8,BL)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.album.track-count",{count:o.album.track_count}))},null,8,WL),b(l,{items:o.tracks,uris:o.album.uri},null,8,["items","uris"]),b(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const GL=ae(FL,[["render",qL]]),KL={name:"ModalDialogTrackSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},ZL={key:0,class:"modal is-active"},YL={class:"modal-content"},XL={class:"card"},JL={class:"card-content"},QL=["textContent"],e4=["textContent"],t4={class:"content is-small"},n4=["textContent"],r4=["textContent"],o4=["textContent"],s4=["textContent"],i4=["textContent"],a4=["textContent"],l4=["textContent"],c4=["textContent"],u4=["textContent"],d4=["textContent"],m4=["textContent"],f4=["textContent"],p4={class:"card-footer"},h4=["textContent"],_4=["textContent"],g4=["textContent"];function y4(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",ZL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",YL,[c("div",XL,[c("div",JL,[c("p",{class:"title is-4",textContent:y(n.item.name)},null,8,QL),c("p",{class:"subtitle",textContent:y(n.item.artists[0].name)},null,8,e4),c("div",t4,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.album"))},null,8,n4),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:y(n.item.album.name)},null,8,r4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.album-artist"))},null,8,o4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:y(n.item.artists[0].name)},null,8,s4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.release-date"))},null,8,i4),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.album.release_date))},null,8,a4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.position"))},null,8,l4),c("span",{class:"title is-6",textContent:y([n.item.disc_number,n.item.track_number].join(" / "))},null,8,c4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.duration"))},null,8,u4),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.duration_ms))},null,8,d4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.track.path"))},null,8,m4),c("span",{class:"title is-6",textContent:y(n.item.uri)},null,8,f4)])])]),c("footer",p4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.track.add"))},null,8,h4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.track.add-next"))},null,8,_4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.track.play"))},null,8,g4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const z4=ae(KL,[["render",y4]]),v4={name:"ListTracksSpotify",components:{ModalDialogTrackSpotify:z4},props:{context_uri:{default:"",type:String},items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){e.is_playable&&B.player_play_uri(this.context_uri||e.uri,!1,e.position||0)}}},b4=["onClick"],C4=["textContent"],w4=["textContent"],k4=["textContent"],S4={key:0,class:"subtitle is-7"},x4=["textContent"],E4=["textContent"],$4={class:"media-right"},T4=["onClick"];function A4(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-track-spotify");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>{var u;return x(),I("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:ke(["media-content is-clipped",{"is-clickable":l.is_playable,"fd-is-not-allowed":!l.is_playable}]),onClick:m=>s.play(l)},[c("h1",{class:ke(["title is-6",{"has-text-grey-light":!l.is_playable}]),textContent:y(l.name)},null,10,C4),c("h2",{class:ke(["subtitle is-7 has-text-weight-bold",{"has-text-grey":l.is_playable,"has-text-grey-light":!l.is_playable}]),textContent:y(l.artists[0].name)},null,10,w4),c("h2",{class:"subtitle is-7 has-text-grey",textContent:y(l.album.name)},null,8,k4),l.is_playable?ee("",!0):(x(),I("h2",S4,[Lt(" ("),c("span",{textContent:y(e.$t("list.spotify.not-playable-track"))},null,8,x4),(u=l.restrictions)!=null&&u.reason?(x(),I("span",{key:0,textContent:y(e.$t("list.spotify.restriction-reason",{reason:l.restrictions.reason}))},null,8,E4)):ee("",!0),Lt(") ")]))],10,b4),c("div",$4,[c("a",{onClick:_t(m=>s.open_dialog(l),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,T4)])])}),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const al=ae(v4,[["render",A4]]),O4={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Pr},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{artwork_visible:!1}},methods:{artwork_error(){this.artwork_visible=!1},artwork_loaded(){this.artwork_visible=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},open(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},P4={key:0,class:"modal is-active"},I4={class:"modal-content"},L4={class:"card"},N4={class:"card-content"},D4={class:"title is-4"},R4=["textContent"],M4={class:"content is-small"},F4=["textContent"],V4=["textContent"],H4=["textContent"],U4=["textContent"],j4=["textContent"],B4=["textContent"],W4={class:"card-footer"},q4=["textContent"],G4=["textContent"],K4=["textContent"];function Z4(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",P4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",I4,[c("div",L4,[c("div",N4,[b(i,{url:s.artwork_url(n.item),artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:s.artwork_loaded,onError:s.artwork_error},null,8,["url","artist","album","onLoad","onError"]),c("p",D4,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:y(n.item.name)},null,8,R4)]),c("div",M4,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.album.album-artist"))},null,8,F4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:y(n.item.artists[0].name)},null,8,V4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.album.release-date"))},null,8,H4),c("span",{class:"title is-6",textContent:y(e.$filters.date(n.item.release_date))},null,8,U4)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.album.type"))},null,8,j4),c("span",{class:"title is-6",textContent:y(n.item.album_type)},null,8,B4)])])]),c("footer",W4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>s.queue_add&&s.queue_add(...l))},[b(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.album.add"))},null,8,q4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[b(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.album.add-next"))},null,8,G4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.play&&s.play(...l))},[b(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.album.play"))},null,8,K4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const K1=ae(O4,[["render",Z4]]),Hp={load(e){const t=new or;return t.setAccessToken(Ot().spotify.webapi_token),t.getAlbum(e.params.id,{market:Ot().spotify.webapi_country})},set(e,t){e.album=t}},Y4={name:"PageAlbumSpotify",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracksSpotify:al,ModalDialogAlbumSpotify:K1},beforeRouteEnter(e,t,n){Hp.load(e).then(r=>{n(o=>Hp.set(o,r))})},setup(){return{servicesStore:Ot()}},data(){return{album:{artists:[{}],tracks:{}},show_details_modal:!1}},computed:{tracks(){const{album:e}=this;return e.tracks.total?e.tracks.items.map(t=>({...t,album:e})):{}}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,B.player_play_uri(this.album.uri,!0)}}},X4=["textContent"],J4={class:"subtitle is-6 has-text-link"},Q4=["textContent"],e6={class:"buttons fd-is-centered-mobile mt-5"},t6=["textContent"],n6=["textContent"];function r6(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks-spotify"),u=O("modal-dialog-album-spotify"),m=O("content-with-hero");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,X4),c("h2",J4,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:y(o.album.artists[0].name)},null,8,Q4)]),c("div",e6,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.spotify.album.shuffle"))},null,8,t6)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:s.artwork_url(o.album),artist:o.album.artists[0].name,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.spotify.album.track-count",{count:o.album.tracks.total}))},null,8,n6),b(l,{items:s.tracks,context_uri:o.album.uri},null,8,["items","context_uri"]),b(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const o6=ae(Y4,[["render",r6]]),s6={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",query:this.$route.query}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options))},methods:{onElementObserved(e){e.forEach(({isIntersecting:t})=>{this.options_visible=t})},visibilityChanged(e){this.options_visible=e}}},i6={class:"section"},a6={class:"container"},l6={class:"columns is-centered"},c6={class:"column is-four-fifths"},u6={key:0},d6={ref:"options",style:{height:"1px"}},m6={class:"buttons is-centered mt-4 mb-2"},f6={id:"top",class:"level is-clipped"},p6={class:"level-left is-flex-shrink-1"},h6={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},_6={class:"level-right has-text-centered-mobile"},g6={class:"mt-4"};function y6(e,t,n,r,o,s){const i=O("mdicon"),a=O("router-link");return x(),I("section",i6,[c("div",a6,[c("div",l6,[c("div",c6,[e.$slots.options?(x(),I("section",u6,[c("div",d6,null,512),zt(e.$slots,"options"),c("nav",m6,[b(a,{class:"button is-small is-white",to:s.position},{default:N(()=>[b(i,{class:"icon is-small",name:s.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):ee("",!0),c("div",{class:ke({"is-full-height":e.$slots.options})},[c("nav",f6,[c("div",p6,[c("div",h6,[c("div",null,[zt(e.$slots,"heading-left")])])]),c("div",_6,[zt(e.$slots,"heading-right")])]),zt(e.$slots,"content"),c("div",g6,[zt(e.$slots,"footer")])],2)])])])])}const Qe=ae(s6,[["render",y6]]),z6={name:"ControlDropdown",props:{options:{required:!0,type:Array},value:{required:!0,type:[String,Number]}},emits:["update:value"],data(){return{active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{deactivate(){this.active=!1},select(e){this.active=!1,this.$emit("update:value",e.id)}}},v6={class:"dropdown-trigger"},b6=["textContent"],C6={id:"dropdown",class:"dropdown-menu",role:"menu"},w6={class:"dropdown-content"},k6=["onClick","textContent"];function S6(e,t,n,r,o,s){const i=O("mdicon"),a=zd("click-away");return pt((x(),I("div",{class:ke(["dropdown",{"is-active":o.active}])},[c("div",v6,[c("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>o.active=!o.active)},[c("span",{textContent:y(s.option.name)},null,8,b6),b(i,{class:"icon",name:"chevron-down",size:"16"})])]),c("div",C6,[c("div",w6,[(x(!0),I(ve,null,ht(n.options,l=>(x(),I("a",{key:l.id,class:ke(["dropdown-item",{"is-active":n.value===l.id}]),onClick:u=>s.select(l),textContent:y(l.name)},null,10,k6))),128))])])],2)),[[a,s.deactivate]])}const Ho=ae(z6,[["render",S6]]),x6={name:"IndexButtonList",props:{indices:{required:!0,type:Array}}},E6={class:"buttons is-centered mb-4 fd-is-square"};function $6(e,t,n,r,o,s){const i=O("router-link");return x(),I("section",null,[c("nav",E6,[(x(!0),I(ve,null,ht(n.indices,a=>(x(),we(i,{key:a,class:"button is-small",to:{hash:`#index_${a}`,query:e.$route.query}},{default:N(()=>[Lt(y(a),1)]),_:2},1032,["to"]))),128))])])}const sr=ae(x6,[["render",$6]]),T6={name:"ListAlbums",components:{CoverArtwork:Pr,ModalDialog:jd,ModalDialogAlbum:ec},props:{items:{required:!0,type:Object},media_kind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],setup(){return{settingsStore:rr()}},data(){return{rss_playlist_to_remove:{},selected_item:{},show_details_modal:!1,show_remove_podcast_modal:!1}},computed:{media_kind_resolved(){return this.media_kind||this.selected_item.media_kind}},methods:{open(e){this.selected_item=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_item=e,this.show_details_modal=!0},open_remove_podcast_dialog(){B.library_album_tracks(this.selected_item.id,{limit:1}).then(({data:e})=>{B.library_track_playlists(e.items[0].id).then(({data:t})=>{[this.rss_playlist_to_remove]=t.items.filter(n=>n.type==="rss"),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,B.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},A6={key:0,class:"mt-6 mb-5 py-2"},O6=["id","textContent"],P6=["onClick"],I6={key:0,class:"media-left"},L6={class:"media-content is-clickable is-clipped"},N6=["textContent"],D6=["textContent"],R6=["textContent"],M6={class:"media-right"},F6=["onClick"],V6=["textContent"],H6={class:"is-size-7"},U6=["textContent"],j6=["textContent"];function B6(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon"),l=O("modal-dialog-album"),u=O("modal-dialog");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,m=>(x(),I(ve,{key:m.itemId},[m.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:d=>s.open(m.item)},[r.settingsStore.show_cover_artwork_in_album_lists?(x(),I("div",I6,[b(i,{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,["url","artist","album"])])):ee("",!0),c("div",L6,[c("div",null,[c("h1",{class:"title is-6",textContent:y(m.item.name)},null,8,N6),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:y(m.item.artist)},null,8,D6),m.item.date_released&&m.item.media_kind==="music"?(x(),I("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:y(e.$filters.date(m.item.date_released))},null,8,R6)):ee("",!0)])]),c("div",M6,[c("a",{onClick:_t(d=>s.open_dialog(m.item),["prevent","stop"])},[b(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,F6)])],8,P6)):(x(),I("div",A6,[c("span",{id:`index_${m.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(m.index)},null,8,O6)]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(l,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=m=>o.show_details_modal=!1),onRemovePodcast:t[1]||(t[1]=m=>s.open_remove_podcast_dialog()),onPlayCountChanged:t[2]||(t[2]=m=>s.play_count_changed())},null,8,["item","media_kind","show"]),b(u,{close_action:e.$t("page.podcast.cancel"),delete_action:e.$t("page.podcast.remove"),show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),onClose:t[3]||(t[3]=m=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":N(()=>[c("p",{textContent:y(e.$t("list.albums.info-1"))},null,8,V6),c("p",H6,[Lt(" ("),c("span",{textContent:y(e.$t("list.albums.info-2"))},null,8,U6),c("b",{textContent:y(o.rss_playlist_to_remove.name)},null,8,j6),Lt(") ")])]),_:1},8,["close_action","delete_action","show","title","onDelete"])]))],64)}const Cn=ae(T6,[["render",B6]]),W6={name:"TabsMusic",setup(){return{servicesStore:Ot()}},computed:{spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid}}},q6={class:"section fd-tabs-section"},G6={class:"container"},K6={class:"columns is-centered"},Z6={class:"column is-four-fifths"},Y6={class:"tabs is-centered is-small"},X6=["onClick","onKeypress"],J6=["textContent"],Q6=["onClick","onKeypress"],e5=["textContent"],t5=["onClick","onKeypress"],n5=["textContent"],r5=["onClick","onKeypress"],o5=["textContent"],s5=["onClick","onKeypress"],i5=["textContent"],a5=["onClick","onKeypress"],l5=["textContent"];function c5(e,t,n,r,o,s){const i=O("mdicon"),a=O("router-link");return x(),I("section",q6,[c("div",G6,[c("div",K6,[c("div",Z6,[c("div",Y6,[c("ul",null,[b(a,{to:{name:"music-history"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"history",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.history"))},null,8,J6)],40,X6)],2)]),_:1}),b(a,{to:{name:"music-artists"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.artists"))},null,8,e5)],40,Q6)],2)]),_:1}),b(a,{to:{name:"music-albums"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.albums"))},null,8,n5)],40,t5)],2)]),_:1}),b(a,{to:{name:"music-genres"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.genres"))},null,8,o5)],40,r5)],2)]),_:1}),b(a,{to:{name:"music-composers"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.composers"))},null,8,i5)],40,s5)],2)]),_:1}),s.spotify_enabled?(x(),we(a,{key:0,to:{name:"music-spotify"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"spotify",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.music.tabs.spotify"))},null,8,l5)],40,a5)],2)]),_:1})):ee("",!0)])])])])])])}const _r=ae(W6,[["render",c5]]),Up={load(e){return B.library_albums("music")},set(e,t){e.albums_list=new Ee(t.data)}},u5={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListAlbums:Cn,TabsMusic:_r},beforeRouteEnter(e,t,n){Up.load(e).then(r=>{n(o=>Up.set(o,r))})},setup(){return{uiStore:gn(),servicesStore:Ot()}},data(){return{albums_list:new Ee,groupings:[{id:1,name:this.$t("page.albums.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.albums.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("page.albums.sort.recently-released"),options:{criteria:[{field:"date_released",order:-1,type:Date}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("page.albums.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("page.albums.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]}},computed:{albums(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e)},hide_singles:{get(){return this.uiStore.hide_singles},set(e){this.uiStore.hide_singles=e}},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.albums_sort},set(e){this.uiStore.albums_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid}}},d5={class:"fd-page-with-tabs"},m5={class:"columns"},f5={class:"column"},p5=["textContent"],h5={class:"field"},_5={class:"control"},g5=["textContent"],y5=["textContent"],z5={key:0,class:"field"},v5={class:"control"},b5=["textContent"],C5=["textContent"],w5={class:"column"},k5=["textContent"],S5=["textContent"],x5=["textContent"];function E5(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("control-dropdown"),u=O("list-albums"),m=O("content-with-heading");return x(),I("div",d5,[b(i),b(m,null,{options:N(()=>[b(a,{indices:s.albums.indices},null,8,["indices"]),c("div",m5,[c("div",f5,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.albums.filter"))},null,8,p5),c("div",h5,[c("div",_5,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:y(e.$t("page.albums.hide-singles"))},null,8,g5)]),c("p",{class:"help",textContent:y(e.$t("page.albums.hide-singles-help"))},null,8,y5)]),s.spotify_enabled?(x(),I("div",z5,[c("div",v5,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.albums.hide-spotify"))},null,8,b5)]),c("p",{class:"help",textContent:y(e.$t("page.albums.hide-spotify-help"))},null,8,C5)])):ee("",!0)]),c("div",w5,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.albums.sort.title"))},null,8,k5),b(l,{value:s.selected_grouping_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_id=d),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.albums.title"))},null,8,S5),c("p",{class:"heading",textContent:y(e.$t("page.albums.count",{count:s.albums.count}))},null,8,x5)]),"heading-right":N(()=>[]),content:N(()=>[b(u,{items:s.albums},null,8,["items"])]),_:1})])}const $5=ae(u5,[["render",E5]]),T5={name:"ModalDialogArtist",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},A5={key:0,class:"modal is-active"},O5={class:"modal-content"},P5={class:"card"},I5={class:"card-content"},L5={class:"title is-4"},N5=["textContent"],D5={class:"content is-small"},R5=["textContent"],M5=["textContent"],F5=["textContent"],V5=["textContent"],H5=["textContent"],U5=["textContent"],j5=["textContent"],B5=["textContent"],W5={class:"card-footer"},q5=["textContent"],G5=["textContent"],K5=["textContent"];function Z5(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",A5,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",O5,[c("div",P5,[c("div",I5,[c("p",L5,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,N5)]),c("div",D5,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.albums"))},null,8,R5),c("span",{class:"title is-6",textContent:y(n.item.album_count)},null,8,M5)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.tracks"))},null,8,F5),c("span",{class:"title is-6",textContent:y(n.item.track_count)},null,8,V5)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.type"))},null,8,H5),c("span",{class:"title is-6",textContent:y(e.$t(`data.kind.${n.item.data_kind}`))},null,8,U5)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.artist.added-on"))},null,8,j5),c("span",{class:"title is-6",textContent:y(e.$filters.datetime(n.item.time_added))},null,8,B5)])])]),c("footer",W5,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.artist.add"))},null,8,q5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.artist.add-next"))},null,8,G5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.artist.play"))},null,8,K5)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const tc=ae(T5,[["render",Z5]]),jp={load(e){return Promise.all([B.library_artist(e.params.id),B.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new Ee(t[1].data)}},Y5={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:Ho,ListAlbums:Cn,ModalDialogArtist:tc},beforeRouteEnter(e,t,n){jp.load(e).then(r=>{n(o=>jp.set(o,r))})},setup(){return{servicesStore:Ot(),uiStore:gn()}},data(){return{albums_list:new Ee,artist:{},groupings:[{id:1,name:this.$t("page.artist.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("page.artist.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}],show_details_modal:!1}},computed:{albums(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e)},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.artist_albums_sort},set(e){this.uiStore.artist_albums_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid},track_count(){return[...this.albums].reduce((e,t)=>e+(t.isItem?t.item.track_count:0),0)}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){B.player_play_uri(this.albums.items.map(e=>e.uri).join(),!0)}}},X5={class:"columns"},J5={class:"column"},Q5=["textContent"],eN={key:0,class:"field"},tN={class:"control"},nN=["textContent"],rN=["textContent"],oN={class:"column"},sN=["textContent"],iN=["textContent"],aN={class:"buttons is-centered"},lN=["textContent"],cN={class:"heading has-text-centered-mobile"},uN=["textContent"],dN=c("span",null," | ",-1),mN=["textContent"];function fN(e,t,n,r,o,s){const i=O("control-dropdown"),a=O("mdicon"),l=O("list-albums"),u=O("modal-dialog-artist"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{options:N(()=>[c("div",X5,[c("div",J5,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.filter"))},null,8,Q5),s.spotify_enabled?(x(),I("div",eN,[c("div",tN,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.artist.hide-spotify"))},null,8,nN)]),c("p",{class:"help",textContent:y(e.$t("page.artist.hide-spotify-help"))},null,8,rN)])):ee("",!0)]),c("div",oN,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.sort.title"))},null,8,sN),b(i,{value:s.selected_grouping_id,"onUpdate:value":t[1]||(t[1]=d=>s.selected_grouping_id=d),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,iN)]),"heading-right":N(()=>[c("div",aN,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...d)=>s.play&&s.play(...d))},[b(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.artist.shuffle"))},null,8,lN)])])]),content:N(()=>[c("p",cN,[c("span",{textContent:y(e.$t("page.artist.album-count",{count:s.albums.count}))},null,8,uN),dN,c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:y(e.$t("page.artist.track-count",{count:s.track_count}))},null,8,mN)]),b(l,{items:s.albums},null,8,["items"]),b(u,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const pN=ae(Y5,[["render",fN]]),hN={name:"ListAlbumsSpotify",components:{CoverArtwork:Pr,ModalDialogAlbumSpotify:K1},props:{items:{required:!0,type:Object}},setup(){return{settingsStore:rr()}},data(){return{selected_item:{},show_details_modal:!1}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},_N=["onClick"],gN={key:0,class:"media-left is-clickable"},yN={class:"media-content is-clickable is-clipped"},zN=["textContent"],vN=["textContent"],bN=["textContent"],CN={class:"media-right"},wN=["onClick"];function kN(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("mdicon"),l=O("modal-dialog-album-spotify");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,u=>{var m;return x(),I("div",{key:u.id,class:"media is-align-items-center",onClick:d=>s.open(u)},[r.settingsStore.show_cover_artwork_in_album_lists?(x(),I("div",gN,[b(i,{url:s.artwork_url(u),artist:u.artist,album:u.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["url","artist","album"])])):ee("",!0),c("div",yN,[c("h1",{class:"title is-6",textContent:y(u.name)},null,8,zN),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:y((m=u.artists[0])==null?void 0:m.name)},null,8,vN),c("h2",{class:"subtitle is-7 has-text-grey",textContent:y([u.album_type,e.$filters.date(u.release_date)].join(", "))},null,8,bN)]),c("div",CN,[c("a",{onClick:_t(d=>s.open_dialog(u),["prevent","stop"])},[b(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,wN)])],8,_N)}),128)),(x(),we(Vn,{to:"#app"},[b(l,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=u=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Ti=ae(hN,[["render",kN]]),SN={name:"ModalDialogArtistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},xN={key:0,class:"modal is-active"},EN={class:"modal-content"},$N={class:"card"},TN={class:"card-content"},AN={class:"title is-4"},ON=["textContent"],PN={class:"content is-small"},IN=["textContent"],LN=["textContent"],NN=["textContent"],DN=["textContent"],RN={class:"card-footer"},MN=["textContent"],FN=["textContent"],VN=["textContent"];function HN(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",xN,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",EN,[c("div",$N,[c("div",TN,[c("p",AN,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,ON)]),c("div",PN,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.artist.popularity"))},null,8,IN),c("span",{class:"title is-6",textContent:y([n.item.popularity,n.item.followers.total].join(" / "))},null,8,LN)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.artist.genres"))},null,8,NN),c("span",{class:"title is-6",textContent:y(n.item.genres.join(", "))},null,8,DN)])])]),c("footer",RN,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.artist.add"))},null,8,MN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.artist.add-next"))},null,8,FN)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.artist.play"))},null,8,VN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Z1=ae(SN,[["render",HN]]);function UN(e){return e.scrollHeight}function jN(e){return e.scrollWidth}function BN(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function WN(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const qN=c("div",{class:"loading"},"Loading...",-1),GN=c("div",{class:"no-more"},"No more.",-1),KN=c("div",{class:"no-results"},"No results.",-1),ZN=c("div",{class:"error"},"Error.",-1),rm=Ar({__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=In();let o=In("loading"),s=In(n.isInitial),i=0;function a(){Fo(()=>{var _,v;n.position==="top"?BN((_=n.container)!=null?_:document.documentElement,i):n.position==="left"&&WN((v=n.container)!=null?v:document.documentElement,i)})}function l(_,v){return _===0?s.value?(m(),"no-results"):(u(),"no-more"):_!==void 0&&v!==void 0&&_{var v,S;_.isIntersecting&&(n.position==="top"?i=UN((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(i=jN((S=n.container)!=null?S:document.documentElement)),g(),n.load({loaded:l,noMore:u,noResults:m,error:d},{isFirstLoad:s.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let w;return typeof IntersectionObserver<"u"&&H_(()=>{w&&g(),w=k(),z()},{flush:"post"}),Nn(()=>n.isInitial,_=>{_&&f()}),Nn(s,_=>{_||t("update:isInitial",!1)}),(_,v)=>(x(),I("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[bn(o)==="loading"?zt(_.$slots,"loading",Ws(rs({key:0},{isFirstLoad:bn(s)})),()=>[qN]):bn(o)==="no-more"?zt(_.$slots,"no-more",Ws(rs({key:1},{retry:p})),()=>[GN]):bn(o)==="no-results"?zt(_.$slots,"no-results",Ws(rs({key:2},{retry:p})),()=>[KN]):bn(o)==="error"?zt(_.$slots,"error",Ws(rs({key:3},{retry:p})),()=>[ZN]):ee("",!0)],512))}}),Bu=50,Bp={load(e){const t=new or;return t.setAccessToken(Ot().spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{include_groups:"album,single",limit:Bu,market:Ot().spotify.webapi_country,offset:0})])},set(e,t){e.artist=t.shift(),e.albums=[],e.total=0,e.offset=0,e.append_albums(t.shift())}},YN={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:Ti,ModalDialogArtistSpotify:Z1,VueEternalLoading:rm},beforeRouteEnter(e,t,n){Bp.load(e).then(r=>{n(o=>Bp.set(o,r))})},setup(){return{servicesStore:Ot()}},data(){return{albums:[],artist:{},offset:0,show_details_modal:!1,total:0}},methods:{append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},load_next({loaded:e}){const t=new or;t.setAccessToken(this.servicesStore.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{include_groups:"album,single",limit:Bu,offset:this.offset}).then(n=>{this.append_albums(n),e(n.items.length,Bu)})},play(){this.show_album_details_modal=!1,B.player_play_uri(this.artist.uri,!0)}}},XN=["textContent"],JN={class:"buttons is-centered"},QN=["textContent"],e3=["textContent"],t3={class:"columns is-centered"},n3={class:"column has-text-centered"},r3=c("br",null,null,-1),o3=c("br",null,null,-1);function s3(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-albums-spotify"),l=O("VueEternalLoading"),u=O("modal-dialog-artist-spotify"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,XN)]),"heading-right":N(()=>[c("div",JN,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.spotify.artist.shuffle"))},null,8,QN)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.spotify.artist.album-count",{count:o.total}))},null,8,e3),b(a,{items:o.albums},null,8,["items"]),o.offset[c("div",t3,[c("div",n3,[b(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":N(()=>[r3]),"no-results":N(()=>[o3]),_:1},8,["load"])):ee("",!0),b(u,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const i3=ae(YN,[["render",s3]]),Wp={load(e){return Promise.all([B.library_artist(e.params.id),B.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},a3={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListTracks:_n,ModalDialogArtist:tc},beforeRouteEnter(e,t,n){Wp.load(e).then(r=>{n(o=>Wp.set(o,r))})},setup(){return{servicesStore:Ot(),uiStore:gn()}},data(){return{artist:{},groupings:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{album_count(){return new Set([...this.tracks].filter(e=>e.isItem).map(e=>e.item.album_id)).size},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.artist_tracks_sort},set(e){this.uiStore.artist_tracks_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid},track_uris(){return this.tracks_list.items.map(e=>e.uri).join()},tracks(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.tracks_list.group(e)}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){B.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(),!0)}}},l3={class:"columns"},c3={class:"column"},u3=["textContent"],d3={key:0,class:"field"},m3={class:"control"},f3=["textContent"],p3=["textContent"],h3={class:"column"},_3=["textContent"],g3=["textContent"],y3={class:"buttons is-centered"},z3=["textContent"],v3={class:"heading has-text-centered-mobile"},b3=["textContent"],C3=c("span",null," | ",-1),w3=["textContent"];function k3(e,t,n,r,o,s){const i=O("index-button-list"),a=O("control-dropdown"),l=O("mdicon"),u=O("list-tracks"),m=O("modal-dialog-artist"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{options:N(()=>[b(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",l3,[c("div",c3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.filter"))},null,8,u3),s.spotify_enabled?(x(),I("div",d3,[c("div",m3,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=f=>s.hide_spotify=f),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.artist.hide-spotify"))},null,8,f3)]),c("p",{class:"help",textContent:y(e.$t("page.artist.hide-spotify-help"))},null,8,p3)])):ee("",!0)]),c("div",h3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.sort.title"))},null,8,_3),b(a,{value:s.selected_grouping_id,"onUpdate:value":t[1]||(t[1]=f=>s.selected_grouping_id=f),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,g3)]),"heading-right":N(()=>[c("div",y3,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[b(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...f)=>s.play&&s.play(...f))},[b(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.artist.shuffle"))},null,8,z3)])])]),content:N(()=>[c("p",v3,[c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:y(e.$t("page.artist.album-count",{count:s.album_count}))},null,8,b3),C3,c("span",{textContent:y(e.$t("page.artist.track-count",{count:s.tracks.count}))},null,8,w3)]),b(u,{items:s.tracks,uris:s.track_uris},null,8,["items","uris"]),b(m,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const S3=ae(a3,[["render",k3]]),x3={name:"ListArtists",components:{ModalDialogArtist:tc},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=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_item=e,this.show_details_modal=!0}}},E3={key:0,class:"mt-6 mb-5 py-2"},$3={class:"media-content is-clipped"},T3=["id","textContent"],A3=["onClick"],O3={class:"media-content is-clickable is-clipped"},P3=["textContent"],I3={class:"media-right"},L3=["onClick"];function N3(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-artist");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",O3,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,P3)]),c("div",I3,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,L3)])],8,A3)):(x(),I("div",E3,[c("div",$3,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,T3)])]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const ll=ae(x3,[["render",N3]]),qp={load(e){return B.library_artists("music")},set(e,t){e.artists_list=new Ee(t.data)}},D3={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListArtists:ll,TabsMusic:_r},beforeRouteEnter(e,t,n){qp.load(e).then(r=>{n(o=>qp.set(o,r))})},setup(){return{servicesStore:Ot(),uiStore:gn()}},data(){return{artists_list:new Ee,groupings:[{id:1,name:this.$t("page.artists.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artists.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}}]}},computed:{artists(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return e.filters=[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.artists_list.group(e)},hide_singles:{get(){return this.uiStore.hide_singles},set(e){this.uiStore.hide_singles=e}},hide_spotify:{get(){return this.uiStore.hide_spotify},set(e){this.uiStore.hide_spotify=e}},selected_grouping_id:{get(){return this.uiStore.artists_sort},set(e){this.uiStore.artists_sort=e}},spotify_enabled(){return this.servicesStore.spotify.webapi_token_valid}}},R3={class:"fd-page-with-tabs"},M3={class:"columns"},F3={class:"column"},V3=["textContent"],H3={class:"field"},U3={class:"control"},j3=["textContent"],B3=["textContent"],W3={key:0,class:"field"},q3={class:"control"},G3=["textContent"],K3=["textContent"],Z3={class:"column"},Y3=["textContent"],X3=["textContent"],J3=["textContent"];function Q3(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("control-dropdown"),u=O("list-artists"),m=O("content-with-heading");return x(),I("div",R3,[b(i),b(m,null,{options:N(()=>[b(a,{indices:s.artists.indices},null,8,["indices"]),c("div",M3,[c("div",F3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artists.filter"))},null,8,V3),c("div",H3,[c("div",U3,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>s.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:y(e.$t("page.artists.hide-singles"))},null,8,j3)]),c("p",{class:"help",textContent:y(e.$t("page.artists.hide-singles-help"))},null,8,B3)]),s.spotify_enabled?(x(),I("div",W3,[c("div",q3,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>s.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[Rn,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:y(e.$t("page.artists.hide-spotify"))},null,8,G3)]),c("p",{class:"help",textContent:y(e.$t("page.artists.hide-spotify-help"))},null,8,K3)])):ee("",!0)]),c("div",Z3,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artists.sort.title"))},null,8,Y3),b(l,{value:s.selected_grouping_id,"onUpdate:value":t[2]||(t[2]=d=>s.selected_grouping_id=d),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.artists.title"))},null,8,X3),c("p",{class:"heading",textContent:y(e.$t("page.artists.count",{count:s.artists.count}))},null,8,J3)]),"heading-right":N(()=>[]),content:N(()=>[b(u,{items:s.artists},null,8,["items"])]),_:1})])}const eD=ae(D3,[["render",Q3]]),Gp={load(e){return Promise.all([B.library_album(e.params.id),B.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data)}},tD={name:"PageAudiobooksAlbum",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracks:_n,ModalDialogAlbum:ec},beforeRouteEnter(e,t,n){Gp.load(e).then(r=>{n(o=>Gp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){B.player_play_uri(this.album.uri,!1)}}},nD=["textContent"],rD={class:"subtitle is-6 has-text-link"},oD=["textContent"],sD={class:"buttons fd-is-centered-mobile mt-5"},iD=["textContent"],aD=["textContent"];function lD(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks"),u=O("modal-dialog-album"),m=O("content-with-hero");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,nD),c("h2",rD,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>s.open_artist&&s.open_artist(...d)),textContent:y(o.album.artist)},null,8,oD)]),c("div",sD,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.audiobooks.album.play"))},null,8,iD)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.audiobooks.album.track-count",{count:o.album.track_count}))},null,8,aD),b(l,{items:o.tracks,show_progress:!0,uris:o.album.uri},null,8,["items","uris"]),b(u,{item:o.album,show:o.show_details_modal,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const cD=ae(tD,[["render",lD]]),uD={name:"TabsAudiobooks"},dD={class:"section fd-tabs-section"},mD={class:"container"},fD={class:"columns is-centered"},pD={class:"column is-four-fifths"},hD={class:"tabs is-centered is-small"},_D=["onClick","onKeypress"],gD=["textContent"],yD=["onClick","onKeypress"],zD=["textContent"],vD=["onClick","onKeypress"],bD=["textContent"];function CD(e,t,n,r,o,s){const i=O("mdicon"),a=O("router-link");return x(),I("section",dD,[c("div",mD,[c("div",fD,[c("div",pD,[c("div",hD,[c("ul",null,[b(a,{to:{name:"audiobooks-artists"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.audiobooks.tabs.authors"))},null,8,gD)],40,_D)],2)]),_:1}),b(a,{to:{name:"audiobooks-albums"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,zD)],40,yD)],2)]),_:1}),b(a,{to:{name:"audiobooks-genres"},custom:""},{default:N(({navigate:l,isActive:u})=>[c("li",{class:ke({"is-active":u})},[c("a",{onClick:l,onKeypress:un(l,["enter"])},[b(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:y(e.$t("page.audiobooks.tabs.genres"))},null,8,bD)],40,vD)],2)]),_:1})])])])])])])}const om=ae(uD,[["render",CD]]),Kp={load(e){return B.library_albums("audiobook")},set(e,t){e.albums=new Ee(t.data,{index:{field:"name_sort",type:String}})}},wD={name:"PageAudiobooksAlbums",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListAlbums:Cn,TabsAudiobooks:om},beforeRouteEnter(e,t,n){Kp.load(e).then(r=>{n(o=>Kp.set(o,r))})},data(){return{albums:new Ee}}},kD={class:"fd-page-with-tabs"},SD=["textContent"],xD=["textContent"];function ED(e,t,n,r,o,s){const i=O("tabs-audiobooks"),a=O("index-button-list"),l=O("list-albums"),u=O("content-with-heading");return x(),I("div",kD,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.audiobooks.albums.title"))},null,8,SD),c("p",{class:"heading",textContent:y(e.$t("page.audiobooks.albums.count",{count:o.albums.count}))},null,8,xD)]),content:N(()=>[b(l,{items:o.albums},null,8,["items"])]),_:1})])}const $D=ae(wD,[["render",ED]]),Zp={load(e){return Promise.all([B.library_artist(e.params.id),B.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new Ee(t[1].data)}},TD={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:Cn,ModalDialogArtist:tc},beforeRouteEnter(e,t,n){Zp.load(e).then(r=>{n(o=>Zp.set(o,r))})},data(){return{albums:new Ee,artist:{},show_details_modal:!1}},methods:{play(){B.player_play_uri(this.albums.items.map(e=>e.uri).join(),!1)}}},AD=["textContent"],OD={class:"buttons is-centered"},PD=["textContent"],ID=["textContent"];function LD(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-albums"),l=O("modal-dialog-artist"),u=O("content-with-heading");return x(),I("div",null,[b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.artist.name)},null,8,AD)]),"heading-right":N(()=>[c("div",OD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.audiobooks.artist.play"))},null,8,PD)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.audiobooks.artist.album-count",{count:o.artist.album_count}))},null,8,ID),b(a,{items:o.albums},null,8,["items"]),b(l,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const ND=ae(TD,[["render",LD]]),Yp={load(e){return B.library_artists("audiobook")},set(e,t){e.artists=new Ee(t.data,{index:{field:"name_sort",type:String}})}},DD={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListArtists:ll,TabsAudiobooks:om},beforeRouteEnter(e,t,n){Yp.load(e).then(r=>{n(o=>Yp.set(o,r))})},data(){return{artists:new Ee}}},RD={class:"fd-page-with-tabs"},MD=["textContent"],FD=["textContent"];function VD(e,t,n,r,o,s){const i=O("tabs-audiobooks"),a=O("index-button-list"),l=O("list-artists"),u=O("content-with-heading");return x(),I("div",RD,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.artists.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.audiobooks.artists.title"))},null,8,MD),c("p",{class:"heading",textContent:y(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,FD)]),"heading-right":N(()=>[]),content:N(()=>[b(l,{items:o.artists},null,8,["items"])]),_:1})])}const HD=ae(DD,[["render",VD]]),UD={name:"ModalDialogGenre",props:{item:{required:!0,type:Object},media_kind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{expression(){return`genre is "${this.item.name}" and media_kind is ${this.media_kind}`}},methods:{open(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.name},query:{media_kind:this.media_kind}})},play(){this.$emit("close"),B.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),B.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),B.queue_expression_add_next(this.expression)}}},jD={key:0,class:"modal is-active"},BD={class:"modal-content"},WD={class:"card"},qD={class:"card-content"},GD={class:"title is-4"},KD=["textContent"],ZD={class:"content is-small"},YD=["textContent"],XD=["textContent"],JD=["textContent"],QD=["textContent"],eR=["textContent"],tR=["textContent"],nR={class:"card-footer"},rR=["textContent"],oR=["textContent"],sR=["textContent"];function iR(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",jD,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",BD,[c("div",WD,[c("div",qD,[c("p",GD,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,KD)]),c("div",ZD,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.genre.albums"))},null,8,YD),c("span",{class:"title is-6",textContent:y(n.item.album_count)},null,8,XD)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.genre.tracks"))},null,8,JD),c("span",{class:"title is-6",textContent:y(n.item.track_count)},null,8,QD)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.genre.duration"))},null,8,eR),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,tR)])])]),c("footer",nR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.genre.add"))},null,8,rR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.genre.add-next"))},null,8,oR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.genre.play"))},null,8,sR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const sm=ae(UD,[["render",iR]]),aR={name:"ListGenres",components:{ModalDialogGenre:sm},props:{items:{required:!0,type:Object},media_kind:{required:!0,type:String}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},lR={key:0,class:"mt-6 mb-5 py-2"},cR={class:"media-content is-clipped"},uR=["id","textContent"],dR=["onClick"],mR={class:"media-content is-clickable is-clipped"},fR=["textContent"],pR={class:"media-right"},hR=["onClick"];function _R(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-genre");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",mR,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,fR)]),c("div",pR,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,hR)])],8,dR)):(x(),I("div",lR,[c("div",cR,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,uR)])]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]))],64)}const Y1=ae(aR,[["render",_R]]),Xp={load(e){return B.library_genres("audiobook")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},gR={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListGenres:Y1,TabsAudiobooks:om},beforeRouteEnter(e,t,n){Xp.load(e).then(r=>{n(o=>Xp.set(o,r))})},data(){return{genres:new Ee}}},yR={class:"fd-page-with-tabs"},zR=["textContent"],vR=["textContent"];function bR(e,t,n,r,o,s){const i=O("tabs-audiobooks"),a=O("index-button-list"),l=O("list-genres"),u=O("content-with-heading");return x(),I("div",yR,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.genres.title"))},null,8,zR),c("p",{class:"heading",textContent:y(e.$t("page.genres.count",{count:o.genres.total}))},null,8,vR)]),content:N(()=>[b(l,{items:o.genres,media_kind:"audiobook"},null,8,["items"])]),_:1})])}const CR=ae(gR,[["render",bR]]),wR={name:"ModalDialogComposer",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.item.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.item.name}})},play(){this.$emit("close"),B.player_play_expression(`composer is "${this.item.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),B.queue_expression_add(`composer is "${this.item.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),B.queue_expression_add_next(`composer is "${this.item.name}" and media_kind is music`)}}},kR={key:0,class:"modal is-active"},SR={class:"modal-content"},xR={class:"card"},ER={class:"card-content"},$R={class:"title is-4"},TR=["textContent"],AR=["textContent"],OR=["textContent"],PR=["textContent"],IR=["textContent"],LR=["textContent"],NR=["textContent"],DR={class:"card-footer"},RR=["textContent"],MR=["textContent"],FR=["textContent"];function VR(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",kR,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",SR,[c("div",xR,[c("div",ER,[c("p",$R,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:y(n.item.name)},null,8,TR)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.composer.albums"))},null,8,AR),c("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:y(n.item.album_count)},null,8,OR)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.composer.tracks"))},null,8,PR),c("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...a)=>s.open_tracks&&s.open_tracks(...a)),textContent:y(n.item.track_count)},null,8,IR)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.composer.duration"))},null,8,LR),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,NR)])]),c("footer",DR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.composer.add"))},null,8,RR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.composer.add-next"))},null,8,MR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.composer.play"))},null,8,FR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const im=ae(wR,[["render",VR]]),Jp={load(e){return Promise.all([B.library_composer(e.params.name),B.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums=new Ee(t[1].data.albums)}},HR={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:Cn,ModalDialogComposer:im},beforeRouteEnter(e,t,n){Jp.load(e).then(r=>{n(o=>Jp.set(o,r))})},data(){return{albums:new Ee,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){B.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},UR=["textContent"],jR={class:"buttons is-centered"},BR=["textContent"],WR={class:"heading has-text-centered-mobile"},qR=["textContent"],GR=c("span",null," | ",-1),KR=["textContent"];function ZR(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-albums"),l=O("modal-dialog-composer"),u=O("content-with-heading");return x(),I("div",null,[b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.composer.name)},null,8,UR)]),"heading-right":N(()=>[c("div",jR,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.composer.shuffle"))},null,8,BR)])])]),content:N(()=>[c("p",WR,[c("span",{textContent:y(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,qR),GR,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:y(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,KR)]),b(a,{items:o.albums},null,8,["items"]),b(l,{item:o.composer,show:o.show_details_modal,onClose:t[3]||(t[3]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const YR=ae(HR,[["render",ZR]]),Qp={load(e){return Promise.all([B.library_composer(e.params.name),B.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},XR={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListTracks:_n,ModalDialogComposer:im},beforeRouteEnter(e,t,n){Qp.load(e).then(r=>{n(o=>Qp.set(o,r))})},setup(){return{uiStore:gn()}},data(){return{composer:{},groupings:[{id:1,name:this.$t("page.composer.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.composer.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_grouping_id:{get(){return this.uiStore.composer_tracks_sort},set(e){this.uiStore.composer_tracks_sort=e}},tracks(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return this.tracks_list.group(e)}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){B.player_play_expression(this.expression,!0)}}},JR={class:"columns"},QR={class:"column"},eM=["textContent"],tM=["textContent"],nM={class:"buttons is-centered"},rM=["textContent"],oM={class:"heading has-text-centered-mobile"},sM=["textContent"],iM=c("span",null," | ",-1),aM=["textContent"];function lM(e,t,n,r,o,s){const i=O("index-button-list"),a=O("control-dropdown"),l=O("mdicon"),u=O("list-tracks"),m=O("modal-dialog-composer"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{options:N(()=>[b(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",JR,[c("div",QR,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.artist.sort.title"))},null,8,eM),b(a,{value:s.selected_grouping_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_id=f),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.composer.name)},null,8,tM)]),"heading-right":N(()=>[c("div",nM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[b(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[b(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.composer.shuffle"))},null,8,rM)])])]),content:N(()=>[c("p",oM,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_albums&&s.open_albums(...f)),textContent:y(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,sM),iM,c("span",{textContent:y(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,aM)]),b(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),b(m,{item:o.composer,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const cM=ae(XR,[["render",lM]]),uM={name:"ListComposers",components:{ModalDialogComposer:im},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},dM={key:0,class:"mt-6 mb-5 py-2"},mM={class:"media-content is-clipped"},fM=["id","textContent"],pM=["onClick"],hM={class:"media-content is-clickable is-clipped"},_M=["textContent"],gM={class:"media-right"},yM=["onClick"];function zM(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-composer");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I(ve,{key:l.itemId},[l.isItem?(x(),I("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",hM,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,_M)]),c("div",gM,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,yM)])],8,pM)):(x(),I("div",dM,[c("div",mM,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:y(l.index)},null,8,fM)])]))],64))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Wu=ae(uM,[["render",zM]]),eh={load(e){return B.library_composers("music")},set(e,t){e.composers=new Ee(t.data,{index:{field:"name_sort",type:String}})}},vM={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListComposers:Wu,TabsMusic:_r},beforeRouteEnter(e,t,n){eh.load(e).then(r=>{n(o=>eh.set(o,r))})},data(){return{composers:new Ee}}},bM={class:"fd-page-with-tabs"},CM=["textContent"],wM=["textContent"];function kM(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("list-composers"),u=O("content-with-heading");return x(),I("div",bM,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.composers.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.composers.title"))},null,8,CM),c("p",{class:"heading",textContent:y(e.$t("page.composers.count",{count:o.composers.total}))},null,8,wM)]),content:N(()=>[b(l,{items:o.composers},null,8,["items"])]),_:1})])}const SM=ae(vM,[["render",kM]]),xM={name:"ModalDialogDirectory",props:{item:{required:!0,type:String},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),B.player_play_expression(`path starts with "${this.item}" order by path asc`,!1)},queue_add(){this.$emit("close"),B.queue_expression_add(`path starts with "${this.item}" order by path asc`)},queue_add_next(){this.$emit("close"),B.queue_expression_add_next(`path starts with "${this.item}" order by path asc`)}}},EM={key:0,class:"modal is-active"},$M={class:"modal-content"},TM={class:"card"},AM={class:"card-content"},OM=["textContent"],PM={class:"card-footer"},IM=["textContent"],LM=["textContent"],NM=["textContent"];function DM(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",EM,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",$M,[c("div",TM,[c("div",AM,[c("p",{class:"title is-4",textContent:y(n.item)},null,8,OM)]),c("footer",PM,[c("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.directory.add"))},null,8,IM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.directory.add-next"))},null,8,LM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.directory.play"))},null,8,NM)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const X1=ae(xM,[["render",DM]]),RM={name:"ListDirectories",components:{ModalDialogDirectory:X1},props:{items:{required:!0,type:Array}},data(){return{selected_item:"",show_details_modal:!1}},computed:{directories(){var n;const e=[];let t="";return(n=this.$route.query)==null||n.directory.split("/").slice(1,-1).forEach((r,o)=>{t=`${t}/${r}`,e.push({index:o,name:r,path:t})}),e}},methods:{open(e){const t={name:"files"};e.index!==0&&(t.query={directory:e.path}),this.$router.push(t)},open_dialog(e){this.selected_item=e.path,this.show_details_modal=!0},open_parent(){this.open(this.directories.slice(-1).pop())}}},MM={key:0,class:"media is-align-items-center"},FM={class:"media-content is-clipped"},VM={class:"breadcrumb"},HM=["onClick"],UM=["textContent"],jM={class:"media-right"},BM=["onClick"],WM={class:"media-left is-clickable"},qM={class:"media-content is-clickable is-clipped"},GM=["textContent"],KM={class:"media-right"},ZM=["onClick"];function YM(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-directory");return x(),I(ve,null,[e.$route.query.directory?(x(),I("div",MM,[c("figure",{class:"media-left is-clickable",onClick:t[0]||(t[0]=(...l)=>s.open_parent&&s.open_parent(...l))},[b(i,{class:"icon",name:"chevron-left",size:"16"})]),c("div",FM,[c("nav",VM,[c("ul",null,[(x(!0),I(ve,null,ht(s.directories,l=>(x(),I("li",{key:l.index},[c("a",{onClick:u=>s.open(l)},[c("span",{textContent:y(l.name)},null,8,UM)],8,HM)]))),128))])])]),c("div",jM,[zt(e.$slots,"actions")])])):ee("",!0),(x(!0),I(ve,null,ht(n.items,l=>(x(),I("div",{key:l.path,class:"media is-align-items-center",onClick:u=>s.open(l)},[c("figure",WM,[b(i,{class:"icon",name:"folder",size:"16"})]),c("div",qM,[c("h1",{class:"title is-6",textContent:y(l.name)},null,8,GM)]),c("div",KM,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,ZM)])],8,BM))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[1]||(t[1]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const XM=ae(RM,[["render",YM]]),JM={name:"ModalDialogPlaylist",props:{item:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.uris||this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.uris||this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.uris||this.item.uri)}}},QM={key:0,class:"modal is-active"},eF={class:"modal-content"},tF={class:"card"},nF={class:"card-content"},rF={class:"title is-4"},oF=["textContent"],sF={class:"content is-small"},iF=["textContent"],aF=["textContent"],lF=["textContent"],cF=["textContent"],uF={key:0},dF=["textContent"],mF=["textContent"],fF={key:0,class:"card-footer"},pF=["textContent"],hF=["textContent"],_F=["textContent"];function gF(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",QM,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",eF,[c("div",tF,[c("div",nF,[c("p",rF,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,oF)]),c("div",sF,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.playlist.path"))},null,8,iF),c("span",{class:"title is-6",textContent:y(n.item.path)},null,8,aF)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.playlist.type"))},null,8,lF),c("span",{class:"title is-6",textContent:y(e.$t(`playlist.type.${n.item.type}`))},null,8,cF)]),n.item.folder?ee("",!0):(x(),I("p",uF,[c("span",{class:"heading",textContent:y(e.$t("dialog.playlist.tracks"))},null,8,dF),c("span",{class:"title is-6",textContent:y(n.item.item_count)},null,8,mF)]))])]),n.item.folder?ee("",!0):(x(),I("footer",fF,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.add"))},null,8,pF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.add-next"))},null,8,hF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.play"))},null,8,_F)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const J1=ae(JM,[["render",gF]]),yF={name:"ListPlaylists",components:{ModalDialogPlaylist:J1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"},open(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_item=e,this.show_details_modal=!0}}},zF=["onClick"],vF={class:"media-left is-clickable"},bF={class:"media-content is-clickable is-clipped"},CF=["textContent"],wF={class:"media-right"},kF=["onClick"];function SF(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-playlist");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I("div",{key:l.itemId,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("figure",vF,[b(i,{class:"icon",name:s.icon_name(l.item),size:"16"},null,8,["name"])]),c("div",bF,[c("h1",{class:"title is-6",textContent:y(l.item.name)},null,8,CF)]),c("div",wF,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,kF)])],8,zF))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const cl=ae(yF,[["render",SF]]),pa={load(e){return e.query.directory?B.library_files(e.query.directory):Promise.resolve()},set(e,t){t?e.directories=t.data.directories.map(n=>e.transform(n.path)):Do().directories?e.directories=Do().directories.map(n=>e.transform(n)):B.config().then(n=>{e.directories=n.data.directories.map(r=>e.transform(r))}),e.playlists=new Ee(t==null?void 0:t.data.playlists),e.tracks=new Ee(t==null?void 0:t.data.tracks)}},xF={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:XM,ListPlaylists:cl,ListTracks:_n,ModalDialogDirectory:X1},beforeRouteEnter(e,t,n){pa.load(e).then(r=>{n(o=>pa.set(o,r))})},beforeRouteUpdate(e,t,n){pa.load(e).then(r=>{pa.set(this,r),n()})},setup(){return{configurationStore:Do()}},data(){return{directories:[],playlists:new Ee,show_details_modal:!1,tracks:new Ee}},computed:{current(){var e;return((e=this.$route.query)==null?void 0:e.directory)||"/"},name(){var e;return this.current!=="/"?(e=this.current)==null?void 0:e.slice(this.current.lastIndexOf("/")+1):this.$t("page.files.title")},play_expression(){return`path starts with "${this.current}" order by path asc`}},methods:{play(){B.player_play_expression(this.play_expression,!1)},transform(e){return{name:e.slice(e.lastIndexOf("/")+1),path:e}}}},EF=["textContent"],$F={class:"buttons is-centered"},TF=["textContent"];function AF(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-directories"),l=O("list-playlists"),u=O("list-tracks"),m=O("modal-dialog-directory"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(s.name)},null,8,EF)]),"heading-right":N(()=>[c("div",$F,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.files.play"))},null,8,TF)])])]),content:N(()=>[b(a,{items:o.directories},null,8,["items"]),b(l,{items:o.playlists},null,8,["items"]),b(u,{expression:s.play_expression,items:o.tracks,show_icon:!0},null,8,["expression","items"]),b(m,{item:s.current,show:o.show_details_modal,onClose:t[2]||(t[2]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const OF=ae(xF,[["render",AF]]),th={load(e){return Promise.all([B.library_genre(e.params.name,e.query.media_kind),B.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items.shift(),e.albums=new Ee(t[1].data.albums,{index:{field:"name_sort",type:String}})}},PF={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListAlbums:Cn,ModalDialogGenre:sm},beforeRouteEnter(e,t,n){th.load(e).then(r=>{n(o=>th.set(o,r))})},data(){return{albums:new Ee,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(){B.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},IF=["textContent"],LF={class:"buttons is-centered"},NF=["textContent"],DF={class:"heading has-text-centered-mobile"},RF=["textContent"],MF=c("span",null," | ",-1),FF=["textContent"];function VF(e,t,n,r,o,s){const i=O("index-button-list"),a=O("mdicon"),l=O("list-albums"),u=O("modal-dialog-genre"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{options:N(()=>[b(i,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.genre.name)},null,8,IF)]),"heading-right":N(()=>[c("div",LF,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[b(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.genre.shuffle"))},null,8,NF)])])]),content:N(()=>[c("p",DF,[c("span",{textContent:y(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,RF),MF,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:y(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,FF)]),b(l,{items:o.albums},null,8,["items"]),b(u,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[3]||(t[3]=d=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const HF=ae(PF,[["render",VF]]),nh={load(e){return Promise.all([B.library_genre(e.params.name,e.query.media_kind),B.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items.shift(),e.tracks_list=new Ee(t[1].data.tracks)}},UF={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ho,IndexButtonList:sr,ListTracks:_n,ModalDialogGenre:sm},beforeRouteEnter(e,t,n){nh.load(e).then(r=>{n(o=>nh.set(o,r))})},setup(){return{uiStore:gn()}},data(){return{genre:{},groupings:[{id:1,name:this.$t("page.genre.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.genre.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_grouping_id:{get(){return this.uiStore.genre_tracks_sort},set(e){this.uiStore.genre_tracks_sort=e}},tracks(){const{options:e}=this.groupings.find(t=>t.id===this.selected_grouping_id);return this.tracks_list.group(e)}},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(){B.player_play_expression(this.expression,!0)}}},jF={class:"columns"},BF={class:"column"},WF=["textContent"],qF=["textContent"],GF={class:"buttons is-centered"},KF=["textContent"],ZF={class:"heading has-text-centered-mobile"},YF=["textContent"],XF=c("span",null," | ",-1),JF=["textContent"];function QF(e,t,n,r,o,s){const i=O("index-button-list"),a=O("control-dropdown"),l=O("mdicon"),u=O("list-tracks"),m=O("modal-dialog-genre"),d=O("content-with-heading");return x(),I("div",null,[b(d,null,{options:N(()=>[b(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",jF,[c("div",BF,[c("p",{class:"heading mb-5",textContent:y(e.$t("page.genre.sort.title"))},null,8,WF),b(a,{value:s.selected_grouping_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_id=f),options:o.groupings},null,8,["value","options"])])])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.genre.name)},null,8,qF)]),"heading-right":N(()=>[c("div",GF,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[b(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[b(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.genre.shuffle"))},null,8,KF)])])]),content:N(()=>[c("p",ZF,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_genre&&s.open_genre(...f)),textContent:y(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,YF),XF,c("span",{textContent:y(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,JF)]),b(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),b(m,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const e7=ae(UF,[["render",QF]]),rh={load(e){return B.library_genres("music")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},t7={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:sr,ListGenres:Y1,TabsMusic:_r},beforeRouteEnter(e,t,n){rh.load(e).then(r=>{n(o=>rh.set(o,r))})},data(){return{genres:new Ee}}},n7={class:"fd-page-with-tabs"},r7=["textContent"],o7=["textContent"];function s7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("index-button-list"),l=O("list-genres"),u=O("content-with-heading");return x(),I("div",n7,[b(i),b(u,null,{options:N(()=>[b(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.genres.title"))},null,8,r7),c("p",{class:"heading",textContent:y(e.$t("page.genres.count",{count:o.genres.total}))},null,8,o7)]),content:N(()=>[b(l,{items:o.genres,media_kind:"music"},null,8,["items"])]),_:1})])}const i7=ae(t7,[["render",s7]]),oh={load(e){return Promise.all([B.search({expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3,type:"album"}),B.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3,type:"track"})])},set(e,t){e.albums=new Ee(t[0].data.albums),e.tracks=new Ee(t[1].data.tracks)}},a7={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:Cn,ListTracks:_n,TabsMusic:_r},beforeRouteEnter(e,t,n){oh.load(e).then(r=>{n(o=>oh.set(o,r))})},data(){return{albums:[],tracks:{items:[]},selected_track:{}}}},l7={class:"fd-page-with-tabs"},c7=["textContent"],u7={class:"level"},d7={class:"level-item"},m7=["textContent"],f7={class:"level"},p7={class:"level-item"};function h7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums"),l=O("router-link"),u=O("content-with-heading"),m=O("list-tracks");return x(),I("div",l7,[b(i),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-added.title"))},null,8,c7)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),footer:N(()=>[c("nav",u7,[c("p",d7,[b(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:N(()=>[Lt(y(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-played.title"))},null,8,m7)]),content:N(()=>[b(m,{items:o.tracks},null,8,["items"])]),footer:N(()=>[c("nav",f7,[c("p",p7,[b(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:N(()=>[Lt(y(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const _7=ae(a7,[["render",h7]]),sh={load(e){const t=rr().recently_added_limit;return B.search({expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t,type:"album"})},set(e,t){e.albums=new Ee(t.data.albums,{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}})}},g7={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,ListAlbums:Cn,TabsMusic:_r},beforeRouteEnter(e,t,n){sh.load(e).then(r=>{n(o=>sh.set(o,r))})},setup(){return{settingsStore:rr()}},data(){return{albums:new Ee}}},y7={class:"fd-page-with-tabs"},z7=["textContent"];function v7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums"),l=O("content-with-heading");return x(),I("div",y7,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-added.title"))},null,8,z7)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),_:1})])}const b7=ae(g7,[["render",v7]]),ih={load(e){return B.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50,type:"track"})},set(e,t){e.tracks=new Ee(t.data.tracks)}},C7={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,ListTracks:_n,TabsMusic:_r},beforeRouteEnter(e,t,n){ih.load(e).then(r=>{n(o=>ih.set(o,r))})},data(){return{tracks:{}}}},w7={class:"fd-page-with-tabs"},k7=["textContent"];function S7(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-tracks"),l=O("content-with-heading");return x(),I("div",w7,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.music.recently-played.title"))},null,8,k7)]),content:N(()=>[b(a,{items:o.tracks},null,8,["items"])]),_:1})])}const x7=ae(C7,[["render",S7]]),E7={name:"ModalDialogPlaylistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.item.id}})},play(){this.$emit("close"),B.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),B.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),B.queue_add_next(this.item.uri)}}},$7={key:0,class:"modal is-active"},T7={class:"modal-content"},A7={class:"card"},O7={class:"card-content"},P7={class:"title is-4"},I7=["textContent"],L7={class:"content is-small"},N7=["textContent"],D7=["textContent"],R7=["textContent"],M7=["textContent"],F7=["textContent"],V7=["textContent"],H7={class:"card-footer"},U7=["textContent"],j7=["textContent"],B7=["textContent"];function W7(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",$7,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",T7,[c("div",A7,[c("div",O7,[c("p",P7,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:y(n.item.name)},null,8,I7)]),c("div",L7,[c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.playlist.owner"))},null,8,N7),c("span",{class:"title is-6",textContent:y(n.item.owner.display_name)},null,8,D7)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.playlist.tracks"))},null,8,R7),c("span",{class:"title is-6",textContent:y(n.item.tracks.total)},null,8,M7)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.spotify.playlist.path"))},null,8,F7),c("span",{class:"title is-6",textContent:y(n.item.uri)},null,8,V7)])])]),c("footer",H7,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.playlist.add"))},null,8,U7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[b(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.playlist.add-next"))},null,8,j7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.spotify.playlist.play"))},null,8,B7)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Q1=ae(E7,[["render",W7]]),q7={name:"ListPlaylistsSpotify",components:{ModalDialogPlaylistSpotify:Q1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"playlist-spotify",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},G7=["onClick"],K7=["textContent"],Z7=["textContent"],Y7={class:"media-right"},X7=["onClick"];function J7(e,t,n,r,o,s){const i=O("mdicon"),a=O("modal-dialog-playlist-spotify");return x(),I(ve,null,[(x(!0),I(ve,null,ht(n.items,l=>(x(),I("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:"media-content is-clickable is-clipped",onClick:u=>s.open(l)},[c("h1",{class:"title is-6",textContent:y(l.name)},null,8,K7),c("h2",{class:"subtitle is-7",textContent:y(l.owner.display_name)},null,8,Z7)],8,G7),c("div",Y7,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[b(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,X7)])]))),128)),(x(),we(Vn,{to:"#app"},[b(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const ul=ae(q7,[["render",J7]]),ah={load(e){return B.spotify().then(({data:t})=>{const n=new or;return n.setAccessToken(t.webapi_token),Promise.all([n.getNewReleases({country:t.webapi_country,limit:3}),n.getFeaturedPlaylists({country:t.webapi_country,limit:3})])})},set(e,t){e.albums=t[0].albums.items,e.playlists=t[1].playlists.items}},Q7={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:Ti,ListPlaylistsSpotify:ul,TabsMusic:_r},beforeRouteEnter(e,t,n){ah.load(e).then(r=>{n(o=>ah.set(o,r))})},data(){return{playlists:[],albums:[]}}},eV={class:"fd-page-with-tabs"},tV=["textContent"],nV={class:"level"},rV={class:"level-item"},oV=["textContent"],sV={class:"level"},iV={class:"level-item"};function aV(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums-spotify"),l=O("router-link"),u=O("content-with-heading"),m=O("list-playlists-spotify");return x(),I("div",eV,[b(i),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.new-releases"))},null,8,tV)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),footer:N(()=>[c("nav",nV,[c("p",rV,[b(l,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:N(()=>[Lt(y(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),b(u,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.featured-playlists"))},null,8,oV)]),content:N(()=>[b(m,{items:o.playlists},null,8,["items"])]),footer:N(()=>[c("nav",sV,[c("p",iV,[b(l,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:N(()=>[Lt(y(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const lV=ae(Q7,[["render",aV]]),lh={load(e){return B.spotify().then(({data:t})=>{const n=new or;return n.setAccessToken(t.webapi_token),n.getFeaturedPlaylists({country:t.webapi_country,limit:50})})},set(e,t){e.playlists=t.playlists.items}},cV={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListPlaylistsSpotify:ul,TabsMusic:_r},beforeRouteEnter(e,t,n){lh.load(e).then(r=>{n(o=>lh.set(o,r))})},data(){return{playlists:[]}}},uV={class:"fd-page-with-tabs"},dV=["textContent"];function mV(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-playlists-spotify"),l=O("content-with-heading");return x(),I("div",uV,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.featured-playlists"))},null,8,dV)]),content:N(()=>[b(a,{items:o.playlists},null,8,["items"])]),_:1})])}const fV=ae(cV,[["render",mV]]),ch={load(e){return B.spotify().then(({data:t})=>{const n=new or;return n.setAccessToken(t.webapi_token),n.getNewReleases({country:t.webapi_country,limit:50})})},set(e,t){e.albums=t.albums.items}},pV={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,ListAlbumsSpotify:Ti,TabsMusic:_r},beforeRouteEnter(e,t,n){ch.load(e).then(r=>{n(o=>ch.set(o,r))})},data(){return{albums:[]}}},hV={class:"fd-page-with-tabs"},_V=["textContent"];function gV(e,t,n,r,o,s){const i=O("tabs-music"),a=O("list-albums-spotify"),l=O("content-with-heading");return x(),I("div",hV,[b(i),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.spotify.music.new-releases"))},null,8,_V)]),content:N(()=>[b(a,{items:o.albums},null,8,["items"])]),_:1})])}const yV=ae(pV,[["render",gV]]),zV={name:"LyricsPane",setup(){return{lyricsStore:Wl(),playerStore:xn()}},data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.playerStore.state==="play"},lyrics(){const e=this.lyricsStore.content,t=[];if(e.length>0){const n=/\[(?\d+):(?\d+)(?:\.(?\d+))?\] ?(?.*)/u;e.split(` +`).forEach(r=>{const{text:o,minutes:s,seconds:i,hundredths:a}=n.exec(r).groups;if(o){const l={text:o,time:s*60+Number(i)+ +`.${a||0}`};t.push(l)}}),t.forEach((r,o,s)=>{const i=(s[o+1].time-r.time||3)/r.text.length;let a=0;r.words=r.text.match(/\S+\s*/gu).map(l=>{const u=l.length*i;return a+=u,{duration:u,delay:a,text:l}})})}return t},verse_index(){var e;if(this.lyrics.length&&this.lyrics[0].time){const t=this.playerStore.item_progress_ms/1e3,n=this.lyrics,r=this.playerStore.item_id!==this.lastItemId,o=this.lastIndex>=0&&this.lastIndext;if((r||o)&&this.reset_scrolling(),this.lastIndext||this.lastIndex===n.length-1)return this.lastIndex;if(this.lastIndext)return this.lastIndex+1;let s=n.length-1,i=-1,a=0;for(;a<=s;){i=a+s>>1;const l=n[i].time,u=(e=n[i+1])==null?void 0:e.time;if(l<=t&&(u>t||!u))break;l>1)+(t.offsetHeight>>1)-e.scrollTop})},start_scrolling(e){(e.screenX??e.screenY)&&(this.autoScrolling=!1,clearTimeout(this.scrollingTimer),this.scrollingTimer=setTimeout(this.autoScrolling=!0,2e3))}}},vV=["textContent"],bV={key:1};function CV(e,t,n,r,o,s){return x(),I("div",{ref:"lyrics",class:"lyrics",onTouchstart:t[0]||(t[0]=i=>o.autoScrolling=!1),onTouchend:t[1]||(t[1]=i=>o.autoScrolling=!0),onScrollPassive:t[2]||(t[2]=(...i)=>s.start_scrolling&&s.start_scrolling(...i)),onWheelPassive:t[3]||(t[3]=(...i)=>s.start_scrolling&&s.start_scrolling(...i))},[(x(!0),I(ve,null,ht(s.lyrics,(i,a)=>(x(),I(ve,{key:a},[a===s.verse_index?(x(),I("div",{key:0,class:ke({"is-highlighted":s.is_playing})},[(x(!0),I(ve,null,ht(i.words,l=>(x(),I("span",{key:l,class:"has-text-weight-bold is-size-5"},[c("span",{style:ao({"animation-duration":`${l.delay}s`}),textContent:y(l.text)},null,12,vV)]))),128))],2)):(x(),I("div",bV,y(i.text),1))],64))),128))],544)}const wV=ae(zV,[["render",CV],["__scopeId","data-v-a97a7574"]]),kV={name:"ModalDialogQueueItem",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],setup(){return{servicesStore:Ot()}},data(){return{spotify_track:{}}},watch:{item(){var e;if(((e=this.item)==null?void 0:e.data_kind)==="spotify"){const t=new or;t.setAccessToken(this.servicesStore.spotify.webapi_token),t.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(n=>{this.spotify_track=n})}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"),B.player_play({item_id:this.item.id})},remove(){this.$emit("close"),B.queue_remove(this.item.id)}}},SV={key:0,class:"modal is-active"},xV={class:"modal-content"},EV={class:"card"},$V={class:"card-content"},TV=["textContent"],AV=["textContent"],OV={class:"content is-small"},PV={key:0},IV=["textContent"],LV=["textContent"],NV={key:1},DV=["textContent"],RV=["textContent"],MV={key:2},FV=["textContent"],VV=["textContent"],HV={key:3},UV=["textContent"],jV=["textContent"],BV={key:4},WV=["textContent"],qV=["textContent"],GV={key:5},KV=["textContent"],ZV=["textContent"],YV={key:6},XV=["textContent"],JV=["textContent"],QV=["textContent"],e9=["textContent"],t9=["textContent"],n9={class:"title is-6"},r9=["textContent"],o9={key:7},s9=["textContent"],i9={class:"title is-6"},a9=["textContent"],l9=["textContent"],c9=["textContent"],u9=["textContent"],d9={class:"card-footer"},m9=["textContent"],f9=["textContent"];function p9(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",SV,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",xV,[c("div",EV,[c("div",$V,[c("p",{class:"title is-4",textContent:y(n.item.title)},null,8,TV),c("p",{class:"subtitle",textContent:y(n.item.artist)},null,8,AV),c("div",OV,[n.item.album?(x(),I("p",PV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.album"))},null,8,IV),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:y(n.item.album)},null,8,LV)])):ee("",!0),n.item.album_artist?(x(),I("p",NV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.album-artist"))},null,8,DV),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:y(n.item.album_artist)},null,8,RV)])):ee("",!0),n.item.composer?(x(),I("p",MV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.composer"))},null,8,FV),c("span",{class:"title is-6",textContent:y(n.item.composer)},null,8,VV)])):ee("",!0),n.item.year?(x(),I("p",HV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.year"))},null,8,UV),c("span",{class:"title is-6",textContent:y(n.item.year)},null,8,jV)])):ee("",!0),n.item.genre?(x(),I("p",BV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.genre"))},null,8,WV),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:y(n.item.genre)},null,8,qV)])):ee("",!0),n.item.disc_number?(x(),I("p",GV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.position"))},null,8,KV),c("span",{class:"title is-6",textContent:y([n.item.disc_number,n.item.track_number].join(" / "))},null,8,ZV)])):ee("",!0),n.item.length_ms?(x(),I("p",YV,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.duration"))},null,8,XV),c("span",{class:"title is-6",textContent:y(e.$filters.durationInHours(n.item.length_ms))},null,8,JV)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.path"))},null,8,QV),c("span",{class:"title is-6",textContent:y(n.item.path)},null,8,e9)]),c("p",null,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.type"))},null,8,t9),c("span",n9,[c("span",{textContent:y(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,r9)])]),n.item.samplerate?(x(),I("p",o9,[c("span",{class:"heading",textContent:y(e.$t("dialog.queue-item.quality"))},null,8,s9),c("span",i9,[c("span",{textContent:y(n.item.type)},null,8,a9),n.item.samplerate?(x(),I("span",{key:0,textContent:y(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,l9)):ee("",!0),n.item.channels?(x(),I("span",{key:1,textContent:y(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,c9)):ee("",!0),n.item.bitrate?(x(),I("span",{key:2,textContent:y(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,u9)):ee("",!0)])])):ee("",!0)])]),c("footer",d9,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.remove&&s.remove(...a))},[b(i,{class:"icon",name:"delete",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.queue-item.remove"))},null,8,m9)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.queue-item.play"))},null,8,f9)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const ez=ae(kV,[["render",p9]]),Hr=1e3,h9={name:"PageNowPlaying",components:{ControlSlider:Bd,CoverArtwork:Pr,LyricsPane:wV,ModalDialogQueueItem:ez},setup(){return{lyricsStore:Wl(),playerStore:xn(),queueStore:Qn(),settingsStore:rr()}},data(){return{INTERVAL:Hr,cursor:Bl,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{composer(){if(this.settingsStore.show_composer_now_playing){const e=this.settingsStore.show_composer_for_genre;if(!e||this.track.genre&&e.toLowerCase().split(",").findIndex(t=>this.track.genre.toLowerCase().indexOf(t.trim())>=0)>=0)return this.track.composer}return null},is_live(){return this.track.length_ms===0},track(){return this.queueStore.current},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Hr)},track_progress:{get(){return Math.floor(this.playerStore.item_progress_ms/Hr)},set(e){this.playerStore.item_progress_ms=e*Hr}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Hr)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)}},watch:{playerStore(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.playerStore.state==="play"&&(this.interval_id=window.setInterval(this.tick,Hr))}},created(){B.player_status().then(({data:e})=>{this.playerStore.$state=e,this.playerStore.state==="play"&&(this.interval_id=window.setInterval(this.tick,Hr))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{end_dragging(){this.is_dragged=!1},open_dialog(e){this.selected_item=e,this.show_details_modal=!0},seek(){this.is_live||B.player_seek_to_pos(this.track_progress*Hr)},start_dragging(){this.is_dragged=!0},tick(){this.is_dragged||(this.track_progress+=1)}}},_9={class:"hero is-full-height"},g9={key:0,class:"hero-body is-flex is-align-items-center"},y9={class:"container has-text-centered",style:{"max-width":"500px"}},z9={class:"is-flex is-justify-content-space-between"},v9=["textContent"],b9=["textContent"],C9=["textContent"],w9=["textContent"],k9=["textContent"],S9=["textContent"],x9=["textContent"],E9={key:1,class:"hero-body is-flex is-align-items-center"},$9={class:"container has-text-centered"},T9=["textContent"],A9=["textContent"];function O9(e,t,n,r,o,s){const i=O("cover-artwork"),a=O("lyrics-pane"),l=O("control-slider"),u=O("modal-dialog-queue-item");return x(),I("div",_9,[s.track.id>0?(x(),I("div",g9,[c("div",y9,[b(i,{url:s.track.artwork_url,artist:s.track.artist,album:s.track.album,class:ke(["is-clickable fd-has-shadow fd-cover-big-image",{"is-masked":r.lyricsStore.pane}]),onClick:t[0]||(t[0]=m=>s.open_dialog(s.track))},null,8,["url","artist","album","class"]),r.lyricsStore.pane?(x(),we(a,{key:0})):ee("",!0),b(l,{value:s.track_progress,"onUpdate:value":t[1]||(t[1]=m=>s.track_progress=m),class:"mt-5",disabled:s.is_live,max:s.track_progress_max,cursor:o.cursor,onChange:s.seek,onMousedown:s.start_dragging,onMouseup:s.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),c("div",z9,[c("p",{class:"subtitle is-7",textContent:y(s.track_elapsed_time)},null,8,v9),c("p",{class:"subtitle is-7",textContent:y(s.track_total_time)},null,8,b9)]),c("p",{class:"title is-5",textContent:y(s.track.title)},null,8,C9),c("p",{class:"title is-6",textContent:y(s.track.artist)},null,8,w9),s.composer?(x(),I("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:y(s.composer)},null,8,k9)):ee("",!0),s.track.album?(x(),I("p",{key:2,class:"subtitle is-6",textContent:y(s.track.album)},null,8,S9)):ee("",!0),r.settingsStore.show_filepath_now_playing?(x(),I("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:y(s.track.path)},null,8,x9)):ee("",!0)])])):(x(),I("div",E9,[c("div",$9,[c("p",{class:"title is-5",textContent:y(e.$t("page.now-playing.title"))},null,8,T9),c("p",{class:"subtitle",textContent:y(e.$t("page.now-playing.info"))},null,8,A9)])])),b(u,{show:o.show_details_modal,item:o.selected_item,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["show","item"])])}const P9=ae(h9,[["render",O9]]),ha={load(e){return Promise.all([B.library_playlist(e.params.id),B.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new Ee(t[1].data)}},I9={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:cl},beforeRouteEnter(e,t,n){ha.load(e).then(r=>{n(o=>ha.set(o,r))})},beforeRouteUpdate(e,t,n){ha.load(e).then(r=>{ha.set(this,r),n()})},setup(){return{configurationStore:Do()}},data(){return{playlist:{},playlists_list:new Ee}},computed:{playlists(){return this.playlists_list.group({filters:[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]})},radio_playlists(){return this.configurationStore.radio_playlists}}},L9=["textContent"],N9=["textContent"];function D9(e,t,n,r,o,s){const i=O("list-playlists"),a=O("content-with-heading");return x(),I("div",null,[b(a,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(o.playlist.id===0?e.$t("page.playlists.title"):o.playlist.name)},null,8,L9),c("p",{class:"heading",textContent:y(e.$t("page.playlists.count",{count:s.playlists.count}))},null,8,N9)]),content:N(()=>[b(i,{items:s.playlists},null,8,["items"])]),_:1})])}const R9=ae(I9,[["render",D9]]),uh={load(e){return Promise.all([B.library_playlist(e.params.id),B.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new Ee(t[1].data)}},M9={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:_n,ModalDialogPlaylist:J1},beforeRouteEnter(e,t,n){uh.load(e).then(r=>{n(o=>uh.set(o,r))})},data(){return{playlist:{},show_details_modal:!1,tracks:new Ee}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join():this.playlist.uri}},methods:{play(){B.player_play_uri(this.uris,!0)}}},F9=["textContent"],V9={class:"buttons is-centered"},H9=["textContent"],U9=["textContent"];function j9(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-tracks"),l=O("modal-dialog-playlist"),u=O("content-with-heading");return x(),I("div",null,[b(u,null,{"heading-left":N(()=>[c("div",{class:"title is-4",textContent:y(o.playlist.name)},null,8,F9)]),"heading-right":N(()=>[c("div",V9,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.playlist.shuffle"))},null,8,H9)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.playlist.track-count",{count:o.tracks.count}))},null,8,U9),b(a,{items:o.tracks,uris:s.uris},null,8,["items","uris"]),b(l,{item:o.playlist,show:o.show_details_modal,uris:s.uris,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["item","show","uris"])]),_:1})])}const B9=ae(M9,[["render",j9]]),qu=50,dh={load(e){const t=new or;return t.setAccessToken(Ot().spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:qu,market:Ot().$state.spotify.webapi_country,offset:0})])},set(e,t){e.playlist=t.shift(),e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t.shift())}},W9={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListTracksSpotify:al,ModalDialogPlaylistSpotify:Q1,VueEternalLoading:rm},beforeRouteEnter(e,t,n){dh.load(e).then(r=>{n(o=>dh.set(o,r))})},setup(){return{servicesStore:Ot()}},data(){return{offset:0,playlist:{tracks:{}},show_playlist_details_modal:!1,total:0,tracks:[]}},methods:{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},load_next({loaded:e}){const t=new or;t.setAccessToken(this.servicesStore.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:qu,market:this.servicesStore.spotify.webapi_country,offset:this.offset}).then(n=>{this.append_tracks(n),e(n.items.length,qu)})},play(){this.show_details_modal=!1,B.player_play_uri(this.playlist.uri,!0)}}},q9=["textContent"],G9={class:"buttons is-centered"},K9=["textContent"],Z9=["textContent"],Y9={class:"columns is-centered"},X9={class:"column has-text-centered"},J9=c("br",null,null,-1);function Q9(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-tracks-spotify"),l=O("VueEternalLoading"),u=O("modal-dialog-playlist-spotify"),m=O("content-with-heading");return x(),I("div",null,[b(m,null,{"heading-left":N(()=>[c("div",{class:"title is-4",textContent:y(o.playlist.name)},null,8,q9)]),"heading-right":N(()=>[c("div",G9,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_playlist_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[b(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:y(e.$t("page.spotify.playlist.shuffle"))},null,8,K9)])])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:y(e.$t("page.spotify.playlist.count",{count:o.playlist.tracks.total}))},null,8,Z9),b(a,{items:o.tracks,context_uri:o.playlist.uri},null,8,["items","context_uri"]),o.offset[c("div",Y9,[c("div",X9,[b(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":N(()=>[J9]),_:1},8,["load"])):ee("",!0),b(u,{item:o.playlist,show:o.show_playlist_details_modal,onClose:t[2]||(t[2]=d=>o.show_playlist_details_modal=!1)},null,8,["item","show"])]),_:1})])}const eH=ae(W9,[["render",Q9]]),mh={load(e){return Promise.all([B.library_album(e.params.id),B.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data.tracks)}},tH={name:"PagePodcast",components:{ContentWithHero:Ql,CoverArtwork:Pr,ListTracks:_n,ModalDialog:jd,ModalDialogAlbum:ec},beforeRouteEnter(e,t,n){mh.load(e).then(r=>{n(o=>mh.set(o,r))})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new Ee}},methods:{open_remove_podcast_dialog(){B.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(){B.player_play_uri(this.album.uri,!1)},reload_tracks(){B.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new Ee(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,B.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},nH=["textContent"],rH=c("h2",{class:"subtitle is-6"},[c("br")],-1),oH={class:"buttons fd-is-centered-mobile mt-5"},sH=["textContent"],iH=["textContent"],aH=["textContent"],lH={class:"is-size-7"},cH=["textContent"],uH=["textContent"];function dH(e,t,n,r,o,s){const i=O("mdicon"),a=O("cover-artwork"),l=O("list-tracks"),u=O("modal-dialog-album"),m=O("modal-dialog"),d=O("content-with-hero");return x(),I("div",null,[b(d,null,{"heading-left":N(()=>[c("h1",{class:"title is-5",textContent:y(o.album.name)},null,8,nH),rH,c("div",oH,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>s.play&&s.play(...f))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:y(e.$t("page.podcast.play"))},null,8,sH)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[b(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":N(()=>[b(a,{url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},null,8,["url","artist","album"])]),content:N(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:y(e.$t("page.podcast.track-count",{count:o.album.track_count}))},null,8,iH),b(l,{items:o.tracks,show_progress:!0,onPlayCountChanged:s.reload_tracks},null,8,["items","onPlayCountChanged"]),b(u,{item:o.album,show:o.show_details_modal,media_kind:"podcast",onClose:t[3]||(t[3]=f=>o.show_details_modal=!1),onPlayCountChanged:s.reload_tracks,onRemovePodcast:s.open_remove_podcast_dialog},null,8,["item","show","onPlayCountChanged","onRemovePodcast"]),b(m,{show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),close_action:e.$t("page.podcast.cancel"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":N(()=>[c("p",{textContent:y(e.$t("page.podcast.remove-info-1"))},null,8,aH),c("p",lH,[Lt(" ("),c("span",{textContent:y(e.$t("page.podcast.remove-info-2"))},null,8,cH),c("b",{textContent:y(o.rss_playlist_to_remove.name)},null,8,uH),Lt(") ")])]),_:1},8,["show","title","close_action","delete_action","onDelete"])]),_:1})])}const mH=ae(tH,[["render",dH]]),fH={name:"ModalDialogAddRss",props:{show:Boolean},emits:["close","podcast-added"],data(){return{disabled:!0,loading:!1,url:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,B.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})},check_url(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing}}},pH={key:0,class:"modal is-active"},hH={class:"modal-content"},_H={class:"card-content"},gH=["textContent"],yH={class:"field"},zH={class:"control has-icons-left"},vH=["placeholder","disabled"],bH=["textContent"],CH={key:0,class:"card-footer"},wH={class:"card-footer-item has-text-dark"},kH=["textContent"],SH={key:1,class:"card-footer is-clipped"},xH=["textContent"],EH=["textContent"];function $H(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",pH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",hH,[c("form",{class:"card",onSubmit:t[5]||(t[5]=_t((...a)=>s.add_stream&&s.add_stream(...a),["prevent"]))},[c("div",_H,[c("p",{class:"title is-4",textContent:y(e.$t("dialog.add.rss.title"))},null,8,gH),c("div",yH,[c("p",zH,[pt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.+",required:"",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_url&&s.check_url(...a))},null,40,vH),[[hn,o.url]]),b(i,{class:"icon is-left",name:"rss",size:"16"})]),c("p",{class:"help",textContent:y(e.$t("dialog.add.rss.help"))},null,8,bH)])]),o.loading?(x(),I("footer",CH,[c("a",wH,[b(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.rss.processing"))},null,8,kH)])])):(x(),I("footer",SH,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[b(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.rss.cancel"))},null,8,xH)]),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[4]||(t[4]=(...a)=>s.add_stream&&s.add_stream(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.rss.add"))},null,8,EH)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const TH=ae(fH,[["render",$H]]),fh={load(e){return Promise.all([B.library_albums("podcast"),B.library_podcasts_new_episodes()])},set(e,t){e.albums=new Ee(t[0].data),e.tracks=new Ee(t[1].data.tracks)}},AH={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListAlbums:Cn,ListTracks:_n,ModalDialogAddRss:TH},beforeRouteEnter(e,t,n){fh.load(e).then(r=>{n(o=>fh.set(o,r))})},setup(){return{libraryStore:jl(),uiStore:gn()}},data(){return{albums:[],tracks:{items:[]},show_url_modal:!1}},computed:{rss(){return this.libraryStore.rss}},methods:{mark_all_played(){this.tracks.items.forEach(e=>{B.library_track_update(e.id,{play_count:"increment"})}),this.tracks.items={}},open_add_podcast_dialog(){this.show_url_modal=!0},reload_new_episodes(){B.library_podcasts_new_episodes().then(({data:e})=>{this.tracks=new Ee(e.tracks)})},reload_podcasts(){B.library_albums("podcast").then(({data:e})=>{this.albums=new Ee(e),this.reload_new_episodes()})},update_rss(){this.libraryStore.update_dialog_scan_kind="rss",this.uiStore.show_update_dialog=!0}}},OH=["textContent"],PH={class:"buttons is-centered"},IH=["textContent"],LH=["textContent"],NH=["textContent"],DH={class:"buttons is-centered"},RH=["textContent"],MH=["textContent"];function FH(e,t,n,r,o,s){const i=O("mdicon"),a=O("list-tracks"),l=O("content-with-heading"),u=O("list-albums"),m=O("modal-dialog-add-rss");return x(),I("div",null,[o.tracks.items.length>0?(x(),we(l,{key:0},{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.podcasts.new-episodes"))},null,8,OH)]),"heading-right":N(()=>[c("div",PH,[c("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>s.mark_all_played&&s.mark_all_played(...d))},[b(i,{class:"icon",name:"pencil",size:"16"}),c("span",{textContent:y(e.$t("page.podcasts.mark-all-played"))},null,8,IH)])])]),content:N(()=>[b(a,{items:o.tracks,show_progress:!0,onPlayCountChanged:s.reload_new_episodes},null,8,["items","onPlayCountChanged"])]),_:1})):ee("",!0),b(l,null,{"heading-left":N(()=>[c("p",{class:"title is-4",textContent:y(e.$t("page.podcasts.title"))},null,8,LH),c("p",{class:"heading",textContent:y(e.$t("page.podcasts.count",{count:o.albums.total}))},null,8,NH)]),"heading-right":N(()=>[c("div",DH,[s.rss.tracks>0?(x(),I("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>s.update_rss&&s.update_rss(...d))},[b(i,{class:"icon",name:"refresh",size:"16"}),c("span",{textContent:y(e.$t("page.podcasts.update"))},null,8,RH)])):ee("",!0),c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>s.open_add_podcast_dialog&&s.open_add_podcast_dialog(...d))},[b(i,{class:"icon",name:"rss",size:"16"}),c("span",{textContent:y(e.$t("page.podcasts.add"))},null,8,MH)])])]),content:N(()=>[b(u,{items:o.albums,onPlayCountChanged:t[3]||(t[3]=d=>s.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>s.reload_podcasts())},null,8,["items"]),b(m,{show:o.show_url_modal,onClose:t[5]||(t[5]=d=>o.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>s.reload_podcasts())},null,8,["show"])]),_:1})])}const VH=ae(AH,[["render",FH]]),HH={name:"ListItemQueueItem",props:{current_position:{required:!0,type:Number},edit_mode:Boolean,item:{required:!0,type:Object},position:{required:!0,type:Number},show_only_next_items:Boolean},setup(){return{playerStore:xn()}},computed:{is_next(){return this.current_position<0||this.position>=this.current_position},player(){return this.playerStore}},methods:{play(){B.player_play({item_id:this.item.id})}}},UH={key:0,class:"media is-align-items-center"},jH={key:0,class:"media-left"},BH=["textContent"],WH=["textContent"],qH=["textContent"],GH={class:"media-right"};function KH(e,t,n,r,o,s){const i=O("mdicon");return s.is_next||!n.show_only_next_items?(x(),I("div",UH,[n.edit_mode?(x(),I("div",jH,[b(i,{class:"icon has-text-grey fd-is-movable handle",name:"drag-horizontal",size:"16"})])):ee("",!0),c("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>s.play&&s.play(...a))},[c("h1",{class:ke(["title is-6",{"has-text-primary":n.item.id===s.player.item_id,"has-text-grey-light":!s.is_next}]),textContent:y(n.item.title)},null,10,BH),c("h2",{class:ke(["subtitle is-7 has-text-weight-bold",{"has-text-primary":n.item.id===s.player.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.player.item_id}]),textContent:y(n.item.artist)},null,10,WH),c("h2",{class:ke(["subtitle is-7",{"has-text-primary":n.item.id===s.player.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.player.item_id}]),textContent:y(n.item.album)},null,10,qH)]),c("div",GH,[zt(e.$slots,"actions")])])):ee("",!0)}const ZH=ae(HH,[["render",KH]]),YH={name:"ModalDialogAddUrlStream",props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,url:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,B.queue_add(this.url).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})},check_url(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing},play(){this.loading=!0,B.player_play_uri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}}},XH={key:0,class:"modal is-active"},JH={class:"modal-content"},QH={class:"card-content"},eU=["textContent"],tU={class:"field"},nU={class:"control has-icons-left"},rU=["placeholder","disabled"],oU={key:0,class:"card-footer"},sU={class:"card-footer-item has-text-dark"},iU=["textContent"],aU={key:1,class:"card-footer is-clipped"},lU=["textContent"],cU=["textContent"],uU=["textContent"];function dU(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",XH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",JH,[c("form",{class:"card",onSubmit:t[6]||(t[6]=_t((...a)=>s.play&&s.play(...a),["prevent"]))},[c("div",QH,[c("p",{class:"title is-4",textContent:y(e.$t("dialog.add.stream.title"))},null,8,eU),c("div",tU,[c("p",nU,[pt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.+",required:"",placeholder:e.$t("dialog.add.stream.placeholder"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_url&&s.check_url(...a))},null,40,rU),[[hn,o.url]]),b(i,{class:"icon is-left",name:"web",size:"16"})])])]),o.loading?(x(),I("footer",oU,[c("a",sU,[b(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.loading"))},null,8,iU)])])):(x(),I("footer",aU,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[b(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.cancel"))},null,8,lU)]),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-text-dark"]),onClick:t[4]||(t[4]=(...a)=>s.add_stream&&s.add_stream(...a))},[b(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.add"))},null,8,cU)],2),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[b(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.add.stream.play"))},null,8,uU)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const mU=ae(YH,[["render",dU]]),fU={name:"ModalDialogPlaylistSave",props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,playlist_name:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}},methods:{check_name(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing},save(){this.loading=!0,B.queue_save_playlist(this.playlist_name).then(()=>{this.$emit("close"),this.playlist_name=""}).catch(()=>{this.loading=!1})}}},pU={key:0,class:"modal is-active"},hU={class:"modal-content"},_U={class:"card-content"},gU=["textContent"],yU={class:"field"},zU={class:"control has-icons-left"},vU=["placeholder","disabled"],bU={key:0,class:"card-footer"},CU={class:"card-footer-item has-text-dark"},wU=["textContent"],kU={key:1,class:"card-footer is-clipped"},SU=["textContent"],xU=["textContent"];function EU(e,t,n,r,o,s){const i=O("mdicon");return x(),we(Nt,{name:"fade"},{default:N(()=>[n.show?(x(),I("div",pU,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",hU,[c("form",{class:"card",onSubmit:t[5]||(t[5]=_t((...a)=>s.save&&s.save(...a),["prevent"]))},[c("div",_U,[c("p",{class:"title is-4",textContent:y(e.$t("dialog.playlist.save.title"))},null,8,gU),c("div",yU,[c("p",zU,[pt(c("input",{ref:"playlist_name_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.playlist_name=a),class:"input is-shadowless",type:"text",pattern:".+",required:"",placeholder:e.$t("dialog.playlist.save.playlist-name"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_name&&s.check_name(...a))},null,40,vU),[[hn,o.playlist_name]]),b(i,{class:"icon is-left",name:"file-music",size:"16"})])])]),o.loading?(x(),I("footer",bU,[c("a",CU,[b(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.save.saving"))},null,8,wU)])])):(x(),I("footer",kU,[c("a",{class:"card-footer-item has-text-danger",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[b(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.save.cancel"))},null,8,SU)]),c("a",{class:ke([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[4]||(t[4]=(...a)=>s.save&&s.save(...a))},[b(i,{class:"icon",name:"content-save",size:"16"}),c("span",{class:"is-size-7",textContent:y(e.$t("dialog.playlist.save.save"))},null,8,xU)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const $U=ae(fU,[["render",EU]]);var tz={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm * @license MIT - */function ph(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function AU(e,t){if(e==null)return{};var n=TU(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OU(e){return PU(e)||IU(e)||LU(e)||NU()}function PU(e){if(Array.isArray(e))return Gu(e)}function IU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LU(e,t){if(e){if(typeof e=="string")return Gu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gu(e,t)}}function Gu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function MU(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Kn(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&dl(e,t):dl(e,t))||r&&e===n)return e;if(e===n)break}while(e=MU(e))}return null}var _h=/\s+/g;function bt(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(_h," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(_h," ")}}function be(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function Oo(e,t){var n="";if(typeof e=="string")n=e;else do{var r=be(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function oz(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,s=r.length;if(n)for(;o=s,!i)return r;if(r===mr())break;r=Qr(r,!1)}return!1}function ks(e,t,n,r){for(var o=0,s=0,i=e.children;s2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,s=AU(r,WU);Bi.pluginEvent.bind(Ie)(t,n,hr({dragEl:he,parentEl:kt,ghostEl:je,rootEl:gt,nextEl:bo,lastDownEl:Ia,cloneEl:St,cloneHidden:Jr,dragStarted:Xs,putSortable:jt,activeSortable:Ie.active,originalEvent:o,oldIndex:ss,oldDraggableIndex:fi,newIndex:zn,newDraggableIndex:Zr,hideGhostForTarget:uz,unhideGhostForTarget:dz,cloneNowHidden:function(){Jr=!0},cloneNowShown:function(){Jr=!1},dispatchSortableEvent:function(a){Qt({sortable:n,name:a,originalEvent:o})}},s))};function Qt(e){Ys(hr({putSortable:jt,cloneEl:St,targetEl:he,rootEl:gt,oldIndex:ss,oldDraggableIndex:fi,newIndex:zn,newDraggableIndex:Zr},e))}var he,kt,je,gt,bo,Ia,St,Jr,ss,zn,fi,Zr,_a,jt,ns=!1,ml=!1,fl=[],zo,qn,Mc,Fc,vh,bh,Xs,Zo,pi,hi=!1,ga=!1,La,Bt,Vc=[],Ku=!1,pl=[],nc=typeof document<"u",ya=nz,Ch=ji||Ir?"cssFloat":"float",qU=nc&&!RU&&!nz&&"draggable"in document.createElement("div"),az=function(){if(nc){if(Ir)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),lz=function(t,n){var r=be(t),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=ks(t,0,n),i=ks(t,1,n),a=s&&be(s),l=i&&be(i),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+yt(s).width,m=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+yt(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&r[Ch]==="none"||i&&r[Ch]==="none"&&u+m>o)?"vertical":"horizontal"},GU=function(t,n,r){var o=r?t.left:t.top,s=r?t.right:t.bottom,i=r?t.width:t.height,a=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return o===a||s===l||o+i/2===a+u/2},KU=function(t,n){var r;return fl.some(function(o){var s=o[Kt].options.emptyInsertThreshold;if(!(!s||am(o))){var i=yt(o),a=t>=i.left-s&&t<=i.right+s,l=n>=i.top-s&&n<=i.bottom+s;if(a&&l)return r=o}}),r},cz=function(t){function n(s,i){return function(a,l,u,m){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(i||d))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return n(s(a,l,u,m),i)(a,l,u,m);var f=(i?a:l).options.group.name;return s===!0||typeof s=="string"&&s===f||s.join&&s.indexOf(f)>-1}}var r={},o=t.group;(!o||Pa(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=n(o.pull,!0),r.checkPut=n(o.put),r.revertClone=o.revertClone,t.group=r},uz=function(){!az&&je&&be(je,"display","none")},dz=function(){!az&&je&&be(je,"display","")};nc&&document.addEventListener("click",function(e){if(ml)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ml=!1,!1},!0);var vo=function(t){if(he){t=t.touches?t.touches[0]:t;var n=KU(t.clientX,t.clientY);if(n){var r={};for(var o in t)t.hasOwnProperty(o)&&(r[o]=t[o]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[Kt]._onDragOver(r)}}},ZU=function(t){he&&he.parentNode[Kt]._isOutsideThisEl(t.target)};function Ie(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Fn({},t),e[Kt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return lz(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,a){i.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ie.supportPointer!==!1&&"PointerEvent"in window&&!di,emptyInsertThreshold:5};Bi.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);cz(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:qU,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ze(e,"pointerdown",this._onTapStart):(Ze(e,"mousedown",this._onTapStart),Ze(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ze(e,"dragover",this),Ze(e,"dragenter",this)),fl.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Fn(this,UU())}Ie.prototype={constructor:Ie,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Zo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,he):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,o=this.options,s=o.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,m=o.filter;if(rj(r),!he&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&di&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Kn(l,o.draggable,r,!1),!(l&&l.animated)&&Ia!==l)){if(ss=$t(l),fi=$t(l,o.draggable),typeof m=="function"){if(m.call(this,t,l,this)){Qt({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),sn("filter",n,{evt:t}),s&&t.cancelable&&t.preventDefault();return}}else if(m&&(m=m.split(",").some(function(d){if(d=Kn(u,d.trim(),r,!1),d)return Qt({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:r,toEl:r}),sn("filter",n,{evt:t}),!0}),m)){s&&t.cancelable&&t.preventDefault();return}o.handle&&!Kn(u,o.handle,r,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,r){var o=this,s=o.el,i=o.options,a=s.ownerDocument,l;if(r&&!he&&r.parentNode===s){var u=yt(r);if(gt=s,he=r,kt=he.parentNode,bo=he.nextSibling,Ia=r,_a=i.group,Ie.dragged=he,zo={target:he,clientX:(n||t).clientX,clientY:(n||t).clientY},vh=zo.clientX-u.left,bh=zo.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,he.style["will-change"]="all",l=function(){if(sn("delayEnded",o,{evt:t}),Ie.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!hh&&o.nativeDraggable&&(he.draggable=!0),o._triggerDragStart(t,n),Qt({sortable:o,name:"choose",originalEvent:t}),bt(he,i.chosenClass,!0)},i.ignore.split(",").forEach(function(m){oz(he,m.trim(),Hc)}),Ze(a,"dragover",vo),Ze(a,"mousemove",vo),Ze(a,"touchmove",vo),Ze(a,"mouseup",o._onDrop),Ze(a,"touchend",o._onDrop),Ze(a,"touchcancel",o._onDrop),hh&&this.nativeDraggable&&(this.options.touchStartThreshold=4,he.draggable=!0),sn("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(ji||Ir))){if(Ie.eventCanceled){this._onDrop();return}Ze(a,"mouseup",o._disableDelayedDrag),Ze(a,"touchend",o._disableDelayedDrag),Ze(a,"touchcancel",o._disableDelayedDrag),Ze(a,"mousemove",o._delayedDragTouchMoveHandler),Ze(a,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&Ze(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){he&&Hc(he),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;qe(t,"mouseup",this._disableDelayedDrag),qe(t,"touchend",this._disableDelayedDrag),qe(t,"touchcancel",this._disableDelayedDrag),qe(t,"mousemove",this._delayedDragTouchMoveHandler),qe(t,"touchmove",this._delayedDragTouchMoveHandler),qe(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?Ze(document,"pointermove",this._onTouchMove):n?Ze(document,"touchmove",this._onTouchMove):Ze(document,"mousemove",this._onTouchMove):(Ze(he,"dragend",this),Ze(gt,"dragstart",this._onDragStart));try{document.selection?Na(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(ns=!1,gt&&he){sn("dragStarted",this,{evt:n}),this.nativeDraggable&&Ze(document,"dragover",ZU);var r=this.options;!t&&bt(he,r.dragClass,!1),bt(he,r.ghostClass,!0),Ie.active=this,t&&this._appendGhost(),Qt({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(qn){this._lastX=qn.clientX,this._lastY=qn.clientY,uz();for(var t=document.elementFromPoint(qn.clientX,qn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(qn.clientX,qn.clientY),t!==n);)n=t;if(he.parentNode[Kt]._isOutsideThisEl(t),n)do{if(n[Kt]){var r=void 0;if(r=n[Kt]._onDragOver({clientX:qn.clientX,clientY:qn.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);dz()}},_onTouchMove:function(t){if(zo){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,s=t.touches?t.touches[0]:t,i=je&&Oo(je,!0),a=je&&i&&i.a,l=je&&i&&i.d,u=ya&&Bt&&yh(Bt),m=(s.clientX-zo.clientX+o.x)/(a||1)+(u?u[0]-Vc[0]:0)/(a||1),d=(s.clientY-zo.clientY+o.y)/(l||1)+(u?u[1]-Vc[1]:0)/(l||1);if(!Ie.active&&!ns){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))=0&&(Qt({rootEl:kt,name:"add",toEl:kt,fromEl:gt,originalEvent:t}),Qt({sortable:this,name:"remove",toEl:kt,originalEvent:t}),Qt({rootEl:kt,name:"sort",toEl:kt,fromEl:gt,originalEvent:t}),Qt({sortable:this,name:"sort",toEl:kt,originalEvent:t})),jt&&jt.save()):zn!==ss&&zn>=0&&(Qt({sortable:this,name:"update",toEl:kt,originalEvent:t}),Qt({sortable:this,name:"sort",toEl:kt,originalEvent:t})),Ie.active&&((zn==null||zn===-1)&&(zn=ss,Zr=fi),Qt({sortable:this,name:"end",toEl:kt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){sn("nulling",this),gt=he=kt=je=bo=St=Ia=Jr=zo=qn=Xs=zn=Zr=ss=fi=Zo=pi=jt=_a=Ie.dragged=Ie.ghost=Ie.clone=Ie.active=null,pl.forEach(function(t){t.checked=!0}),pl.length=Mc=Fc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":he&&(this._onDragOver(t),YU(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,o=0,s=r.length,i=this.options;or.right+o||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+o}function ej(e,t,n,r,o,s,i,a){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,m=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!i){if(a&&Lam+u*s/2:ld-La)return-pi}else if(l>m+u*(1-o)/2&&ld-u*s/2)?l>m+u/2?1:-1:0}function tj(e){return $t(he)<$t(e)?1:-1}function nj(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function rj(e){pl.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&pl.push(r)}}function Na(e){return setTimeout(e,0)}function Zu(e){return clearTimeout(e)}nc&&Ze(document,"touchmove",function(e){(Ie.active||ns)&&e.cancelable&&e.preventDefault()});Ie.utils={on:Ze,off:qe,css:be,find:oz,is:function(t,n){return!!Kn(t,n,t,!1)},extend:VU,throttle:sz,closest:Kn,toggleClass:bt,clone:lm,index:$t,nextTick:Na,cancelNextTick:Zu,detectDirection:lz,getChild:ks};Ie.get=function(e){return e[Kt]};Ie.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&(Fe.forEach(function(a){s.addAnimationState({target:a,rect:an?yt(a):i}),Dc(a),a.fromRect=i,r.removeAnimationState(a)}),an=!1,lj(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(n){var r=n.sortable,o=n.isOwner,s=n.insertion,i=n.activeSortable,a=n.parentEl,l=n.putSortable,u=this.options;if(s){if(o&&i._hideClone(),js=!1,u.animation&&Fe.length>1&&(an||!o&&!i.options.sort&&!l)){var m=yt(ft,!1,!0,!0);Fe.forEach(function(f){f!==ft&&(zh(f,m),a.appendChild(f))}),an=!0}if(!o)if(an||ba(),Fe.length>1){var d=va;i._showClone(r),i.options.animation&&!va&&d&&yn.forEach(function(f){i.addAnimationState({target:f,rect:Bs}),f.fromRect=Bs,f.thisAnimationDuration=null})}else i._showClone(r)}},dragOverAnimationCapture:function(n){var r=n.dragRect,o=n.isOwner,s=n.activeSortable;if(Fe.forEach(function(a){a.thisAnimationDuration=null}),s.options.animation&&!o&&s.multiDrag.isMultiDrag){Bs=Fn({},r);var i=Oo(ft,!0);Bs.top-=i.f,Bs.left-=i.e}},dragOverAnimationComplete:function(){an&&(an=!1,ba())},drop:function(n){var r=n.originalEvent,o=n.rootEl,s=n.parentEl,i=n.sortable,a=n.dispatchSortableEvent,l=n.oldIndex,u=n.putSortable,m=u||this.sortable;if(r){var d=this.options,f=s.children;if(!Yo)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),bt(ft,d.selectedClass,!~Fe.indexOf(ft)),~Fe.indexOf(ft))Fe.splice(Fe.indexOf(ft),1),Us=null,Ys({sortable:i,rootEl:o,name:"deselect",targetEl:ft,originalEvt:r});else{if(Fe.push(ft),Ys({sortable:i,rootEl:o,name:"select",targetEl:ft,originalEvt:r}),r.shiftKey&&Us&&i.el.contains(Us)){var p=$t(Us),h=$t(ft);if(~p&&~h&&p!==h){var g,z;for(h>p?(z=p,g=h):(z=h,g=p+1);z1){var k=yt(ft),w=$t(ft,":not(."+this.options.selectedClass+")");if(!js&&d.animation&&(ft.thisAnimationDuration=null),m.captureAnimationState(),!js&&(d.animation&&(ft.fromRect=k,Fe.forEach(function(v){if(v.thisAnimationDuration=null,v!==ft){var S=an?yt(v):k;v.fromRect=S,m.addAnimationState({target:v,rect:S})}})),ba(),Fe.forEach(function(v){f[w]?s.insertBefore(v,f[w]):s.appendChild(v),w++}),l===$t(ft))){var _=!1;Fe.forEach(function(v){if(v.sortableIndex!==$t(v)){_=!0;return}}),_&&a("update")}Fe.forEach(function(v){Dc(v)}),m.animateAll()}Gn=m}(o===s||u&&u.lastPutMode!=="clone")&&yn.forEach(function(v){v.parentNode&&v.parentNode.removeChild(v)})}},nullingGlobal:function(){this.isMultiDrag=Yo=!1,yn.length=0},destroyGlobal:function(){this._deselectMultiDrag(),qe(document,"pointerup",this._deselectMultiDrag),qe(document,"mouseup",this._deselectMultiDrag),qe(document,"touchend",this._deselectMultiDrag),qe(document,"keydown",this._checkKeyDown),qe(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof Yo<"u"&&Yo)&&Gn===this.sortable&&!(n&&Kn(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;Fe.length;){var r=Fe[0];bt(r,this.options.selectedClass,!1),Fe.shift(),Ys({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Fn(e,{pluginName:"multiDrag",utils:{select:function(n){var r=n.parentNode[Kt];!r||!r.options.multiDrag||~Fe.indexOf(n)||(Gn&&Gn!==r&&(Gn.multiDrag._deselectMultiDrag(),Gn=r),bt(n,r.options.selectedClass,!0),Fe.push(n))},deselect:function(n){var r=n.parentNode[Kt],o=Fe.indexOf(n);!r||!r.options.multiDrag||!~o||(bt(n,r.options.selectedClass,!1),Fe.splice(o,1))}},eventProperties:function(){var n=this,r=[],o=[];return Fe.forEach(function(s){r.push({multiDragElement:s,index:s.sortableIndex});var i;an&&s!==ft?i=-1:an?i=$t(s,":not(."+n.options.selectedClass+")"):i=$t(s),o.push({multiDragElement:s,index:i})}),{items:OU(Fe),clones:[].concat(yn),oldIndicies:r,newIndicies:o}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function lj(e,t){Fe.forEach(function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)})}function kh(e,t){yn.forEach(function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)})}function ba(){Fe.forEach(function(e){e!==ft&&e.parentNode&&e.parentNode.removeChild(e)})}Ie.mount(new oj);Ie.mount(um,cm);const cj=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:aj,Sortable:Ie,Swap:sj,default:Ie},Symbol.toStringTag,{value:"Module"})),uj=xy(cj);(function(e,t){(function(r,o){e.exports=o(Iy,uj)})(typeof self<"u"?self:Sy,function(n,r){return function(o){var s={};function i(a){if(s[a])return s[a].exports;var l=s[a]={i:a,l:!1,exports:{}};return o[a].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=o,i.c=s,i.d=function(a,l,u){i.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:u})},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},i.t=function(a,l){if(l&1&&(a=i(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var u=Object.create(null);if(i.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var m in a)i.d(u,m,(function(d){return a[d]}).bind(null,m));return u},i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,"a",l),l},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.p="",i(i.s="fb15")}({"00ee":function(o,s,i){var a=i("b622"),l=a("toStringTag"),u={};u[l]="z",o.exports=String(u)==="[object z]"},"0366":function(o,s,i){var a=i("1c0b");o.exports=function(l,u,m){if(a(l),u===void 0)return l;switch(m){case 0:return function(){return l.call(u)};case 1:return function(d){return l.call(u,d)};case 2:return function(d,f){return l.call(u,d,f)};case 3:return function(d,f,p){return l.call(u,d,f,p)}}return function(){return l.apply(u,arguments)}}},"057f":function(o,s,i){var a=i("fc6a"),l=i("241c").f,u={}.toString,m=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(f){try{return l(f)}catch{return m.slice()}};o.exports.f=function(p){return m&&u.call(p)=="[object Window]"?d(p):l(a(p))}},"06cf":function(o,s,i){var a=i("83ab"),l=i("d1e7"),u=i("5c6c"),m=i("fc6a"),d=i("c04e"),f=i("5135"),p=i("0cfb"),h=Object.getOwnPropertyDescriptor;s.f=a?h:function(z,k){if(z=m(z),k=d(k,!0),p)try{return h(z,k)}catch{}if(f(z,k))return u(!l.f.call(z,k),z[k])}},"0cfb":function(o,s,i){var a=i("83ab"),l=i("d039"),u=i("cc12");o.exports=!a&&!l(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(o,s,i){var a=i("23e7"),l=i("d58f").left,u=i("a640"),m=i("ae40"),d=u("reduce"),f=m("reduce",{1:0});a({target:"Array",proto:!0,forced:!d||!f},{reduce:function(h){return l(this,h,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(o,s,i){var a=i("c6b6"),l=i("9263");o.exports=function(u,m){var d=u.exec;if(typeof d=="function"){var f=d.call(u,m);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(u,m)}},"159b":function(o,s,i){var a=i("da84"),l=i("fdbc"),u=i("17c2"),m=i("9112");for(var d in l){var f=a[d],p=f&&f.prototype;if(p&&p.forEach!==u)try{m(p,"forEach",u)}catch{p.forEach=u}}},"17c2":function(o,s,i){var a=i("b727").forEach,l=i("a640"),u=i("ae40"),m=l("forEach"),d=u("forEach");o.exports=!m||!d?function(p){return a(this,p,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(o,s,i){var a=i("d066");o.exports=a("document","documentElement")},"1c0b":function(o,s){o.exports=function(i){if(typeof i!="function")throw TypeError(String(i)+" is not a function");return i}},"1c7e":function(o,s,i){var a=i("b622"),l=a("iterator"),u=!1;try{var m=0,d={next:function(){return{done:!!m++}},return:function(){u=!0}};d[l]=function(){return this},Array.from(d,function(){throw 2})}catch{}o.exports=function(f,p){if(!p&&!u)return!1;var h=!1;try{var g={};g[l]=function(){return{next:function(){return{done:h=!0}}}},f(g)}catch{}return h}},"1d80":function(o,s){o.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},"1dde":function(o,s,i){var a=i("d039"),l=i("b622"),u=i("2d00"),m=l("species");o.exports=function(d){return u>=51||!a(function(){var f=[],p=f.constructor={};return p[m]=function(){return{foo:1}},f[d](Boolean).foo!==1})}},"23cb":function(o,s,i){var a=i("a691"),l=Math.max,u=Math.min;o.exports=function(m,d){var f=a(m);return f<0?l(f+d,0):u(f,d)}},"23e7":function(o,s,i){var a=i("da84"),l=i("06cf").f,u=i("9112"),m=i("6eeb"),d=i("ce4e"),f=i("e893"),p=i("94ca");o.exports=function(h,g){var z=h.target,k=h.global,w=h.stat,_,v,S,C,L,D;if(k?v=a:w?v=a[z]||d(z,{}):v=(a[z]||{}).prototype,v)for(S in g){if(L=g[S],h.noTargetGet?(D=l(v,S),C=D&&D.value):C=v[S],_=p(k?S:z+(w?".":"#")+S,h.forced),!_&&C!==void 0){if(typeof L==typeof C)continue;f(L,C)}(h.sham||C&&C.sham)&&u(L,"sham",!0),m(v,S,L,h)}}},"241c":function(o,s,i){var a=i("ca84"),l=i("7839"),u=l.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(d){return a(d,u)}},"25f0":function(o,s,i){var a=i("6eeb"),l=i("825a"),u=i("d039"),m=i("ad6d"),d="toString",f=RegExp.prototype,p=f[d],h=u(function(){return p.call({source:"a",flags:"b"})!="/a/b"}),g=p.name!=d;(h||g)&&a(RegExp.prototype,d,function(){var k=l(this),w=String(k.source),_=k.flags,v=String(_===void 0&&k instanceof RegExp&&!("flags"in f)?m.call(k):_);return"/"+w+"/"+v},{unsafe:!0})},"2ca0":function(o,s,i){var a=i("23e7"),l=i("06cf").f,u=i("50c4"),m=i("5a34"),d=i("1d80"),f=i("ab13"),p=i("c430"),h="".startsWith,g=Math.min,z=f("startsWith"),k=!p&&!z&&!!function(){var w=l(String.prototype,"startsWith");return w&&!w.writable}();a({target:"String",proto:!0,forced:!k&&!z},{startsWith:function(_){var v=String(d(this));m(_);var S=u(g(arguments.length>1?arguments[1]:void 0,v.length)),C=String(_);return h?h.call(v,C,S):v.slice(S,S+C.length)===C}})},"2d00":function(o,s,i){var a=i("da84"),l=i("342f"),u=a.process,m=u&&u.versions,d=m&&m.v8,f,p;d?(f=d.split("."),p=f[0]+f[1]):l&&(f=l.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=l.match(/Chrome\/(\d+)/),f&&(p=f[1]))),o.exports=p&&+p},"342f":function(o,s,i){var a=i("d066");o.exports=a("navigator","userAgent")||""},"35a1":function(o,s,i){var a=i("f5df"),l=i("3f8c"),u=i("b622"),m=u("iterator");o.exports=function(d){if(d!=null)return d[m]||d["@@iterator"]||l[a(d)]}},"37e8":function(o,s,i){var a=i("83ab"),l=i("9bf2"),u=i("825a"),m=i("df75");o.exports=a?Object.defineProperties:function(f,p){u(f);for(var h=m(p),g=h.length,z=0,k;g>z;)l.f(f,k=h[z++],p[k]);return f}},"3bbe":function(o,s,i){var a=i("861d");o.exports=function(l){if(!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(o,s,i){var a=i("6547").charAt,l=i("69f3"),u=i("7dd0"),m="String Iterator",d=l.set,f=l.getterFor(m);u(String,"String",function(p){d(this,{type:m,string:String(p),index:0})},function(){var h=f(this),g=h.string,z=h.index,k;return z>=g.length?{value:void 0,done:!0}:(k=a(g,z),h.index+=k.length,{value:k,done:!1})})},"3f8c":function(o,s){o.exports={}},4160:function(o,s,i){var a=i("23e7"),l=i("17c2");a({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(o,s,i){var a=i("da84");o.exports=a},"44ad":function(o,s,i){var a=i("d039"),l=i("c6b6"),u="".split;o.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(m){return l(m)=="String"?u.call(m,""):Object(m)}:Object},"44d2":function(o,s,i){var a=i("b622"),l=i("7c73"),u=i("9bf2"),m=a("unscopables"),d=Array.prototype;d[m]==null&&u.f(d,m,{configurable:!0,value:l(null)}),o.exports=function(f){d[m][f]=!0}},"44e7":function(o,s,i){var a=i("861d"),l=i("c6b6"),u=i("b622"),m=u("match");o.exports=function(d){var f;return a(d)&&((f=d[m])!==void 0?!!f:l(d)=="RegExp")}},4930:function(o,s,i){var a=i("d039");o.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})},"4d64":function(o,s,i){var a=i("fc6a"),l=i("50c4"),u=i("23cb"),m=function(d){return function(f,p,h){var g=a(f),z=l(g.length),k=u(h,z),w;if(d&&p!=p){for(;z>k;)if(w=g[k++],w!=w)return!0}else for(;z>k;k++)if((d||k in g)&&g[k]===p)return d||k||0;return!d&&-1}};o.exports={includes:m(!0),indexOf:m(!1)}},"4de4":function(o,s,i){var a=i("23e7"),l=i("b727").filter,u=i("1dde"),m=i("ae40"),d=u("filter"),f=m("filter");a({target:"Array",proto:!0,forced:!d||!f},{filter:function(h){return l(this,h,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(o,s,i){var a=i("0366"),l=i("7b0b"),u=i("9bdd"),m=i("e95a"),d=i("50c4"),f=i("8418"),p=i("35a1");o.exports=function(g){var z=l(g),k=typeof this=="function"?this:Array,w=arguments.length,_=w>1?arguments[1]:void 0,v=_!==void 0,S=p(z),C=0,L,D,$,F,q,U;if(v&&(_=a(_,w>2?arguments[2]:void 0,2)),S!=null&&!(k==Array&&m(S)))for(F=S.call(z),q=F.next,D=new k;!($=q.call(F)).done;C++)U=v?u(F,_,[$.value,C],!0):$.value,f(D,C,U);else for(L=d(z.length),D=new k(L);L>C;C++)U=v?_(z[C],C):z[C],f(D,C,U);return D.length=C,D}},"4fad":function(o,s,i){var a=i("23e7"),l=i("6f53").entries;a({target:"Object",stat:!0},{entries:function(m){return l(m)}})},"50c4":function(o,s,i){var a=i("a691"),l=Math.min;o.exports=function(u){return u>0?l(a(u),9007199254740991):0}},5135:function(o,s){var i={}.hasOwnProperty;o.exports=function(a,l){return i.call(a,l)}},5319:function(o,s,i){var a=i("d784"),l=i("825a"),u=i("7b0b"),m=i("50c4"),d=i("a691"),f=i("1d80"),p=i("8aa5"),h=i("14c3"),g=Math.max,z=Math.min,k=Math.floor,w=/\$([$&'`]|\d\d?|<[^>]*>)/g,_=/\$([$&'`]|\d\d?)/g,v=function(S){return S===void 0?S:String(S)};a("replace",2,function(S,C,L,D){var $=D.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,F=D.REPLACE_KEEPS_$0,q=$?"$":"$0";return[function(ne,me){var K=f(this),re=ne==null?void 0:ne[S];return re!==void 0?re.call(ne,K,me):C.call(String(K),ne,me)},function(W,ne){if(!$&&F||typeof ne=="string"&&ne.indexOf(q)===-1){var me=L(C,W,this,ne);if(me.done)return me.value}var K=l(W),re=String(this),ce=typeof ne=="function";ce||(ne=String(ne));var Ne=K.global;if(Ne){var st=K.unicode;K.lastIndex=0}for(var Ve=[];;){var He=h(K,re);if(He===null||(Ve.push(He),!Ne))break;var it=String(He[0]);it===""&&(K.lastIndex=p(re,m(K.lastIndex),st))}for(var at="",ut=0,We=0;We=ut&&(at+=re.slice(ut,fe)+A,ut=fe+Y.length)}return at+re.slice(ut)}];function U(W,ne,me,K,re,ce){var Ne=me+W.length,st=K.length,Ve=_;return re!==void 0&&(re=u(re),Ve=w),C.call(ce,Ve,function(He,it){var at;switch(it.charAt(0)){case"$":return"$";case"&":return W;case"`":return ne.slice(0,me);case"'":return ne.slice(Ne);case"<":at=re[it.slice(1,-1)];break;default:var ut=+it;if(ut===0)return He;if(ut>st){var We=k(ut/10);return We===0?He:We<=st?K[We-1]===void 0?it.charAt(1):K[We-1]+it.charAt(1):He}at=K[ut-1]}return at===void 0?"":at})}})},5692:function(o,s,i){var a=i("c430"),l=i("c6cd");(o.exports=function(u,m){return l[u]||(l[u]=m!==void 0?m:{})})("versions",[]).push({version:"3.6.5",mode:a?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(o,s,i){var a=i("d066"),l=i("241c"),u=i("7418"),m=i("825a");o.exports=a("Reflect","ownKeys")||function(f){var p=l.f(m(f)),h=u.f;return h?p.concat(h(f)):p}},"5a34":function(o,s,i){var a=i("44e7");o.exports=function(l){if(a(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(o,s){o.exports=function(i,a){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:a}}},"5db7":function(o,s,i){var a=i("23e7"),l=i("a2bf"),u=i("7b0b"),m=i("50c4"),d=i("1c0b"),f=i("65f0");a({target:"Array",proto:!0},{flatMap:function(h){var g=u(this),z=m(g.length),k;return d(h),k=f(g,0),k.length=l(k,g,g,z,0,1,h,arguments.length>1?arguments[1]:void 0),k}})},6547:function(o,s,i){var a=i("a691"),l=i("1d80"),u=function(m){return function(d,f){var p=String(l(d)),h=a(f),g=p.length,z,k;return h<0||h>=g?m?"":void 0:(z=p.charCodeAt(h),z<55296||z>56319||h+1===g||(k=p.charCodeAt(h+1))<56320||k>57343?m?p.charAt(h):z:m?p.slice(h,h+2):(z-55296<<10)+(k-56320)+65536)}};o.exports={codeAt:u(!1),charAt:u(!0)}},"65f0":function(o,s,i){var a=i("861d"),l=i("e8b5"),u=i("b622"),m=u("species");o.exports=function(d,f){var p;return l(d)&&(p=d.constructor,typeof p=="function"&&(p===Array||l(p.prototype))?p=void 0:a(p)&&(p=p[m],p===null&&(p=void 0))),new(p===void 0?Array:p)(f===0?0:f)}},"69f3":function(o,s,i){var a=i("7f9a"),l=i("da84"),u=i("861d"),m=i("9112"),d=i("5135"),f=i("f772"),p=i("d012"),h=l.WeakMap,g,z,k,w=function($){return k($)?z($):g($,{})},_=function($){return function(F){var q;if(!u(F)||(q=z(F)).type!==$)throw TypeError("Incompatible receiver, "+$+" required");return q}};if(a){var v=new h,S=v.get,C=v.has,L=v.set;g=function($,F){return L.call(v,$,F),F},z=function($){return S.call(v,$)||{}},k=function($){return C.call(v,$)}}else{var D=f("state");p[D]=!0,g=function($,F){return m($,D,F),F},z=function($){return d($,D)?$[D]:{}},k=function($){return d($,D)}}o.exports={set:g,get:z,has:k,enforce:w,getterFor:_}},"6eeb":function(o,s,i){var a=i("da84"),l=i("9112"),u=i("5135"),m=i("ce4e"),d=i("8925"),f=i("69f3"),p=f.get,h=f.enforce,g=String(String).split("String");(o.exports=function(z,k,w,_){var v=_?!!_.unsafe:!1,S=_?!!_.enumerable:!1,C=_?!!_.noTargetGet:!1;if(typeof w=="function"&&(typeof k=="string"&&!u(w,"name")&&l(w,"name",k),h(w).source=g.join(typeof k=="string"?k:"")),z===a){S?z[k]=w:m(k,w);return}else v?!C&&z[k]&&(S=!0):delete z[k];S?z[k]=w:l(z,k,w)})(Function.prototype,"toString",function(){return typeof this=="function"&&p(this).source||d(this)})},"6f53":function(o,s,i){var a=i("83ab"),l=i("df75"),u=i("fc6a"),m=i("d1e7").f,d=function(f){return function(p){for(var h=u(p),g=l(h),z=g.length,k=0,w=[],_;z>k;)_=g[k++],(!a||m.call(h,_))&&w.push(f?[_,h[_]]:h[_]);return w}};o.exports={entries:d(!0),values:d(!1)}},"73d9":function(o,s,i){var a=i("44d2");a("flatMap")},7418:function(o,s){s.f=Object.getOwnPropertySymbols},"746f":function(o,s,i){var a=i("428f"),l=i("5135"),u=i("e538"),m=i("9bf2").f;o.exports=function(d){var f=a.Symbol||(a.Symbol={});l(f,d)||m(f,d,{value:u.f(d)})}},7839:function(o,s){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(o,s,i){var a=i("1d80");o.exports=function(l){return Object(a(l))}},"7c73":function(o,s,i){var a=i("825a"),l=i("37e8"),u=i("7839"),m=i("d012"),d=i("1be4"),f=i("cc12"),p=i("f772"),h=">",g="<",z="prototype",k="script",w=p("IE_PROTO"),_=function(){},v=function($){return g+k+h+$+g+"/"+k+h},S=function($){$.write(v("")),$.close();var F=$.parentWindow.Object;return $=null,F},C=function(){var $=f("iframe"),F="java"+k+":",q;return $.style.display="none",d.appendChild($),$.src=String(F),q=$.contentWindow.document,q.open(),q.write(v("document.F=Object")),q.close(),q.F},L,D=function(){try{L=document.domain&&new ActiveXObject("htmlfile")}catch{}D=L?S(L):C();for(var $=u.length;$--;)delete D[z][u[$]];return D()};m[w]=!0,o.exports=Object.create||function(F,q){var U;return F!==null?(_[z]=a(F),U=new _,_[z]=null,U[w]=F):U=D(),q===void 0?U:l(U,q)}},"7dd0":function(o,s,i){var a=i("23e7"),l=i("9ed3"),u=i("e163"),m=i("d2bb"),d=i("d44e"),f=i("9112"),p=i("6eeb"),h=i("b622"),g=i("c430"),z=i("3f8c"),k=i("ae93"),w=k.IteratorPrototype,_=k.BUGGY_SAFARI_ITERATORS,v=h("iterator"),S="keys",C="values",L="entries",D=function(){return this};o.exports=function($,F,q,U,W,ne,me){l(q,F,U);var K=function(We){if(We===W&&Ve)return Ve;if(!_&&We in Ne)return Ne[We];switch(We){case S:return function(){return new q(this,We)};case C:return function(){return new q(this,We)};case L:return function(){return new q(this,We)}}return function(){return new q(this)}},re=F+" Iterator",ce=!1,Ne=$.prototype,st=Ne[v]||Ne["@@iterator"]||W&&Ne[W],Ve=!_&&st||K(W),He=F=="Array"&&Ne.entries||st,it,at,ut;if(He&&(it=u(He.call(new $)),w!==Object.prototype&&it.next&&(!g&&u(it)!==w&&(m?m(it,w):typeof it[v]!="function"&&f(it,v,D)),d(it,re,!0,!0),g&&(z[re]=D))),W==C&&st&&st.name!==C&&(ce=!0,Ve=function(){return st.call(this)}),(!g||me)&&Ne[v]!==Ve&&f(Ne,v,Ve),z[F]=Ve,W)if(at={values:K(C),keys:ne?Ve:K(S),entries:K(L)},me)for(ut in at)(_||ce||!(ut in Ne))&&p(Ne,ut,at[ut]);else a({target:F,proto:!0,forced:_||ce},at);return at}},"7f9a":function(o,s,i){var a=i("da84"),l=i("8925"),u=a.WeakMap;o.exports=typeof u=="function"&&/native code/.test(l(u))},"825a":function(o,s,i){var a=i("861d");o.exports=function(l){if(!a(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(o,s,i){var a=i("d039");o.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(o,s,i){var a=i("c04e"),l=i("9bf2"),u=i("5c6c");o.exports=function(m,d,f){var p=a(d);p in m?l.f(m,p,u(0,f)):m[p]=f}},"861d":function(o,s){o.exports=function(i){return typeof i=="object"?i!==null:typeof i=="function"}},8875:function(o,s,i){var a,l,u;(function(m,d){l=[],a=d,u=typeof a=="function"?a.apply(s,l):a,u!==void 0&&(o.exports=u)})(typeof self<"u"?self:this,function(){function m(){var d=Object.getOwnPropertyDescriptor(document,"currentScript");if(!d&&"currentScript"in document&&document.currentScript||d&&d.get!==m&&document.currentScript)return document.currentScript;try{throw new Error}catch(L){var f=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,p=/@([^@]*):(\d+):(\d+)\s*$/ig,h=f.exec(L.stack)||p.exec(L.stack),g=h&&h[1]||!1,z=h&&h[2]||!1,k=document.location.href.replace(document.location.hash,""),w,_,v,S=document.getElementsByTagName("script");g===k&&(w=document.documentElement.outerHTML,_=new RegExp("(?:[^\\n]+?\\n){0,"+(z-2)+"}[^<]*