owntone-server/htdocs/player/js/app.js
2020-10-17 07:51:42 +02:00

2 lines
233 KiB
JavaScript

(function(t){function s(s){for(var e,o,n=s[0],r=s[1],c=s[2],u=0,p=[];u<n.length;u++)o=n[u],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&p.push(i[o][0]),i[o]=0;for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);d&&d(s);while(p.length)p.shift()();return l.push.apply(l,c||[]),a()}function a(){for(var t,s=0;s<l.length;s++){for(var a=l[s],e=!0,n=1;n<a.length;n++){var r=a[n];0!==i[r]&&(e=!1)}e&&(l.splice(s--,1),t=o(o.s=a[0]))}return t}var e={},i={app:0},l=[];function o(s){if(e[s])return e[s].exports;var a=e[s]={i:s,l:!1,exports:{}};return t[s].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=t,o.c=e,o.d=function(t,s,a){o.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:a})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,s){if(1&s&&(t=o(t)),8&s)return t;if(4&s&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(o.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&s&&"string"!=typeof t)for(var e in t)o.d(a,e,function(s){return t[s]}.bind(null,e));return a},o.n=function(t){var s=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(s,"a",s),s},o.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},o.p="";var n=window["webpackJsonp"]=window["webpackJsonp"]||[],r=n.push.bind(n);n.push=s,n=n.slice();for(var c=0;c<n.length;c++)s(n[c]);var d=r;l.push([0,"chunk-vendors"]),a()})({0:function(t,s,a){t.exports=a("56d7")},"2c75":function(t,s,a){"use strict";a.d(s,"a",(function(){return e})),a.d(s,"b",(function(){return i}));var e=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"hero is-light is-bold fd-content"},[a("div",{staticClass:"hero-body"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"columns",staticStyle:{"flex-direction":"row-reverse"}},[a("div",{staticClass:"column fd-has-cover"},[t._t("heading-right")],2),a("div",{staticClass:"column is-three-fifths has-text-centered-mobile",staticStyle:{margin:"auto 0"}},[t._t("heading-left")],2)])])])])])]),a("section",{staticClass:"section fd-content"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[t._t("content"),a("div",{staticStyle:{"margin-top":"16px"}},[t._t("footer")],2)],2)])])])])},i=[]},4178:function(t,s,a){"use strict";var e=a("e6a4"),i=a.n(e);s["default"]=i.a},4678:function(t,s,a){var e={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function i(t){var s=l(t);return a(s)}function l(t){if(!a.o(e,t)){var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}return e[t]}i.keys=function(){return Object.keys(e)},i.resolve=l,t.exports=i,i.id="4678"},"53c4":function(t,s,a){},"56d7":function(t,s,a){"use strict";a.r(s);a("e260"),a("e6cf"),a("cca6"),a("a79d");var e=a("a026"),i=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{attrs:{id:"app"}},[a("navbar-top"),a("vue-progress-bar",{staticClass:"fd-progress-bar"}),a("transition",{attrs:{name:"fade"}},[a("router-view",{directives:[{name:"show",rawName:"v-show",value:!0,expression:"true"}]})],1),a("modal-dialog-remote-pairing",{attrs:{show:t.pairing_active},on:{close:function(s){t.pairing_active=!1}}}),a("notifications",{directives:[{name:"show",rawName:"v-show",value:!t.show_burger_menu,expression:"!show_burger_menu"}]}),a("navbar-bottom"),a("div",{directives:[{name:"show",rawName:"v-show",value:t.show_burger_menu||t.show_player_menu,expression:"show_burger_menu || show_player_menu"}],staticClass:"fd-overlay-fullscreen",on:{click:function(s){t.show_burger_menu=t.show_player_menu=!1}}})],1)},l=[],o=(a("2532"),function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("nav",{staticClass:"fd-top-navbar navbar is-light is-fixed-top",style:t.zindex,attrs:{role:"navigation","aria-label":"main navigation"}},[a("div",{staticClass:"navbar-brand"},[t.is_visible_playlists?a("navbar-item-link",{attrs:{to:"/playlists"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-library-music"})])]):t._e(),t.is_visible_music?a("navbar-item-link",{attrs:{to:"/music"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-music"})])]):t._e(),t.is_visible_podcasts?a("navbar-item-link",{attrs:{to:"/podcasts"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-microphone"})])]):t._e(),t.is_visible_audiobooks?a("navbar-item-link",{attrs:{to:"/audiobooks"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-book-open-variant"})])]):t._e(),t.is_visible_radio?a("navbar-item-link",{attrs:{to:"/radio"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-radio"})])]):t._e(),t.is_visible_files?a("navbar-item-link",{attrs:{to:"/files"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-folder-open"})])]):t._e(),t.is_visible_search?a("navbar-item-link",{attrs:{to:"/search"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-magnify"})])]):t._e(),a("div",{staticClass:"navbar-burger",class:{"is-active":t.show_burger_menu},on:{click:function(s){t.show_burger_menu=!t.show_burger_menu}}},[a("span"),a("span"),a("span")])],1),a("div",{staticClass:"navbar-menu",class:{"is-active":t.show_burger_menu}},[a("div",{staticClass:"navbar-start"}),a("div",{staticClass:"navbar-end"},[a("div",{staticClass:"navbar-item has-dropdown is-hoverable",class:{"is-active":t.show_settings_menu},on:{click:t.on_click_outside_settings}},[t._m(0),a("div",{staticClass:"navbar-dropdown is-right"},[a("navbar-item-link",{attrs:{to:"/playlists"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-library-music"})]),t._v(" "),a("b",[t._v("Playlists")])]),a("navbar-item-link",{attrs:{to:"/music",exact:""}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-music"})]),t._v(" "),a("b",[t._v("Music")])]),a("navbar-item-link",{attrs:{to:"/music/artists"}},[a("span",{staticClass:"fd-navbar-item-level2"},[t._v("Artists")])]),a("navbar-item-link",{attrs:{to:"/music/albums"}},[a("span",{staticClass:"fd-navbar-item-level2"},[t._v("Albums")])]),a("navbar-item-link",{attrs:{to:"/music/genres"}},[a("span",{staticClass:"fd-navbar-item-level2"},[t._v("Genres")])]),t.spotify_enabled?a("navbar-item-link",{attrs:{to:"/music/spotify"}},[a("span",{staticClass:"fd-navbar-item-level2"},[t._v("Spotify")])]):t._e(),a("navbar-item-link",{attrs:{to:"/podcasts"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-microphone"})]),t._v(" "),a("b",[t._v("Podcasts")])]),a("navbar-item-link",{attrs:{to:"/audiobooks"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-book-open-variant"})]),t._v(" "),a("b",[t._v("Audiobooks")])]),a("navbar-item-link",{attrs:{to:"/radio"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-radio"})]),t._v(" "),a("b",[t._v("Radio")])]),a("navbar-item-link",{attrs:{to:"/files"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-folder-open"})]),t._v(" "),a("b",[t._v("Files")])]),a("navbar-item-link",{attrs:{to:"/search"}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-magnify"})]),t._v(" "),a("b",[t._v("Search")])]),a("hr",{staticClass:"fd-navbar-divider"}),a("navbar-item-link",{attrs:{to:"/settings/webinterface"}},[t._v("Settings")]),a("navbar-item-link",{attrs:{to:"/about"}},[t._v("Update Library")]),a("div",{staticClass:"navbar-item is-hidden-desktop",staticStyle:{"margin-bottom":"2.5rem"}})],1)])])]),a("div",{directives:[{name:"show",rawName:"v-show",value:t.show_settings_menu,expression:"show_settings_menu"}],staticClass:"is-overlay",staticStyle:{"z-index":"10",width:"100vw",height:"100vh"},on:{click:function(s){t.show_settings_menu=!1}}})])}),n=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{staticClass:"navbar-link is-arrowless"},[a("span",{staticClass:"icon is-hidden-touch"},[a("i",{staticClass:"mdi mdi-24px mdi-menu"})]),a("span",{staticClass:"is-hidden-desktop has-text-weight-bold"},[t._v("forked-daapd")])])}],r=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{staticClass:"navbar-item",class:{"is-active":t.is_active},attrs:{href:t.full_path()},on:{click:function(s){return s.stopPropagation(),s.preventDefault(),t.open_link()}}},[t._t("default")],2)},c=[];a("2ca0");const d="UPDATE_CONFIG",u="UPDATE_SETTINGS",p="UPDATE_SETTINGS_OPTION",_="UPDATE_LIBRARY_STATS",m="UPDATE_LIBRARY_AUDIOBOOKS_COUNT",h="UPDATE_LIBRARY_PODCASTS_COUNT",f="UPDATE_OUTPUTS",v="UPDATE_PLAYER_STATUS",y="UPDATE_QUEUE",b="UPDATE_LASTFM",g="UPDATE_SPOTIFY",k="UPDATE_PAIRING",C="SPOTIFY_NEW_RELEASES",w="SPOTIFY_FEATURED_PLAYLISTS",x="ADD_NOTIFICATION",$="DELETE_NOTIFICATION",q="ADD_RECENT_SEARCH",A="HIDE_SINGLES",S="HIDE_SPOTIFY",j="ARTISTS_SORT",P="ALBUMS_SORT",T="SHOW_ONLY_NEXT_ITEMS",L="SHOW_BURGER_MENU",O="SHOW_PLAYER_MENU";var E={name:"NavbarItemLink",props:{to:String,exact:Boolean},computed:{is_active(){return this.exact?this.$route.path===this.to:this.$route.path.startsWith(this.to)},show_player_menu:{get(){return this.$store.state.show_player_menu},set(t){this.$store.commit(O,t)}},show_burger_menu:{get(){return this.$store.state.show_burger_menu},set(t){this.$store.commit(L,t)}}},methods:{open_link:function(){this.show_burger_menu&&this.$store.commit(L,!1),this.show_player_menu&&this.$store.commit(O,!1),this.$router.push({path:this.to})},full_path:function(){const t=this.$router.resolve(this.to);return t.href}}},I=E,z=a("2877"),D=Object(z["a"])(I,r,c,!1,null,null,null),N=D.exports,R={name:"NavbarTop",components:{NavbarItemLink:N},data(){return{show_settings_menu:!1}},computed:{is_visible_playlists(){return this.$store.getters.settings_option("webinterface","show_menu_item_playlists").value},is_visible_music(){return this.$store.getters.settings_option("webinterface","show_menu_item_music").value},is_visible_podcasts(){return this.$store.getters.settings_option("webinterface","show_menu_item_podcasts").value},is_visible_audiobooks(){return this.$store.getters.settings_option("webinterface","show_menu_item_audiobooks").value},is_visible_radio(){return this.$store.getters.settings_option("webinterface","show_menu_item_radio").value},is_visible_files(){return this.$store.getters.settings_option("webinterface","show_menu_item_files").value},is_visible_search(){return this.$store.getters.settings_option("webinterface","show_menu_item_search").value},player(){return this.$store.state.player},config(){return this.$store.state.config},library(){return this.$store.state.library},audiobooks(){return this.$store.state.audiobooks_count},podcasts(){return this.$store.state.podcasts_count},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},show_burger_menu:{get(){return this.$store.state.show_burger_menu},set(t){this.$store.commit(L,t)}},show_player_menu(){return this.$store.state.show_player_menu},zindex(){return this.show_player_menu?"z-index: 20":""}},methods:{on_click_outside_settings(){this.show_settings_menu=!this.show_settings_menu}},watch:{$route(t,s){this.show_settings_menu=!1}}},M=R,U=Object(z["a"])(M,o,n,!1,null,null,null),H=U.exports,W=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("nav",{staticClass:"fd-bottom-navbar navbar is-white is-fixed-bottom",class:{"is-transparent":t.is_now_playing_page,"is-dark":!t.is_now_playing_page},style:t.zindex,attrs:{role:"navigation","aria-label":"player controls"}},[a("div",{staticClass:"navbar-brand fd-expanded"},[a("navbar-item-link",{attrs:{to:"/",exact:""}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-24px mdi-playlist-play"})])]),t.is_now_playing_page?t._e():a("router-link",{staticClass:"navbar-item is-expanded is-clipped",attrs:{to:"/now-playing","active-class":"is-active",exact:""}},[a("div",{staticClass:"is-clipped"},[a("p",{staticClass:"is-size-7 fd-is-text-clipped"},[a("strong",[t._v(t._s(t.now_playing.title))]),a("br"),t._v(" "+t._s(t.now_playing.artist)),"url"===t.now_playing.data_kind?a("span",[t._v(" - "+t._s(t.now_playing.album))]):t._e()])])]),t.is_now_playing_page?a("player-button-previous",{staticClass:"navbar-item fd-margin-left-auto",attrs:{icon_style:"mdi-24px"}}):t._e(),t.is_now_playing_page?a("player-button-seek-back",{staticClass:"navbar-item",attrs:{seek_ms:"10000",icon_style:"mdi-24px"}}):t._e(),a("player-button-play-pause",{staticClass:"navbar-item",attrs:{icon_style:"mdi-36px",show_disabled_message:""}}),t.is_now_playing_page?a("player-button-seek-forward",{staticClass:"navbar-item",attrs:{seek_ms:"30000",icon_style:"mdi-24px"}}):t._e(),t.is_now_playing_page?a("player-button-next",{staticClass:"navbar-item",attrs:{icon_style:"mdi-24px"}}):t._e(),a("a",{staticClass:"navbar-item fd-margin-left-auto is-hidden-desktop",on:{click:function(s){t.show_player_menu=!t.show_player_menu}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-18px",class:{"mdi-chevron-up":!t.show_player_menu,"mdi-chevron-down":t.show_player_menu}})])]),a("div",{staticClass:"navbar-item has-dropdown has-dropdown-up fd-margin-left-auto is-hidden-touch",class:{"is-active":t.show_player_menu}},[a("a",{staticClass:"navbar-link is-arrowless",on:{click:function(s){t.show_player_menu=!t.show_player_menu}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-18px",class:{"mdi-chevron-up":!t.show_player_menu,"mdi-chevron-down":t.show_player_menu}})])]),a("div",{staticClass:"navbar-dropdown is-right is-boxed",staticStyle:{"margin-right":"6px","margin-bottom":"6px","border-radius":"6px"}},[a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small",on:{click:t.toggle_mute_volume}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-18px",class:{"mdi-volume-off":t.player.volume<=0,"mdi-volume-high":t.player.volume>0}})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading"},[t._v("Volume")]),a("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",value:t.player.volume},on:{change:t.set_volume}})],1)])])])]),a("hr",{staticClass:"fd-navbar-divider"}),t._l(t.outputs,(function(t){return a("navbar-item-output",{key:t.id,attrs:{output:t}})})),a("hr",{staticClass:"fd-navbar-divider"}),a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small",class:{"is-loading":t.loading}},[a("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.playing&&!t.loading,"is-loading":t.loading},on:{click:t.togglePlay}},[a("i",{staticClass:"mdi mdi-18px mdi-radio-tower"})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading",class:{"has-text-grey-light":!t.playing}},[t._v("HTTP stream "),t._m(0)]),a("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",disabled:!t.playing,value:t.stream_volume},on:{change:t.set_stream_volume}})],1)])])])]),a("hr",{staticClass:"fd-navbar-divider"}),a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile fd-expanded"},[a("div",{staticClass:"level-item"},[a("div",{staticClass:"buttons has-addons"},[a("player-button-repeat",{staticClass:"button"}),a("player-button-shuffle",{staticClass:"button"}),a("player-button-consume",{staticClass:"button"})],1)])])])],2)])],1),a("div",{staticClass:"navbar-menu is-hidden-desktop",class:{"is-active":t.show_player_menu}},[a("div",{staticClass:"navbar-start"}),a("div",{staticClass:"navbar-end"},[a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"buttons is-centered"},[a("player-button-repeat",{staticClass:"button",attrs:{icon_style:"mdi-18px"}}),a("player-button-shuffle",{staticClass:"button",attrs:{icon_style:"mdi-18px"}}),a("player-button-consume",{staticClass:"button",attrs:{icon_style:"mdi-18px"}})],1)]),a("hr",{staticClass:"fd-navbar-divider"}),a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small",on:{click:t.toggle_mute_volume}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-18px",class:{"mdi-volume-off":t.player.volume<=0,"mdi-volume-high":t.player.volume>0}})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading"},[t._v("Volume")]),a("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",value:t.player.volume},on:{change:t.set_volume}})],1)])])])]),t._l(t.outputs,(function(t){return a("navbar-item-output",{key:t.id,attrs:{output:t}})})),a("hr",{staticClass:"fd-navbar-divider"}),a("div",{staticClass:"navbar-item fd-has-margin-bottom"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small",class:{"is-loading":t.loading}},[a("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.playing&&!t.loading,"is-loading":t.loading},on:{click:t.togglePlay}},[a("i",{staticClass:"mdi mdi-18px mdi-radio-tower"})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading",class:{"has-text-grey-light":!t.playing}},[t._v("HTTP stream "),t._m(1)]),a("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",disabled:!t.playing,value:t.stream_volume},on:{change:t.set_stream_volume}})],1)])])])])],2)])])},B=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{attrs:{href:"stream.mp3"}},[a("span",{staticClass:"is-lowercase"},[t._v("(stream.mp3)")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{attrs:{href:"stream.mp3"}},[a("span",{staticClass:"is-lowercase"},[t._v("(stream.mp3)")])])}],F=a("bc3a"),G=a.n(F),Y=(a("c975"),a("a434"),a("2f62"));e["a"].use(Y["a"]);var V=new Y["a"].Store({state:{config:{websocket_port:0,version:"",buildoptions:[]},settings:{categories:[]},library:{artists:0,albums:0,songs:0,db_playtime:0,updating:!1},audiobooks_count:{},podcasts_count:{},outputs:[],player:{state:"stop",repeat:"off",consume:!1,shuffle:!1,volume:0,item_id:0,item_length_ms:0,item_progress_ms:0},queue:{version:0,count:0,items:[]},lastfm:{},spotify:{},pairing:{},spotify_new_releases:[],spotify_featured_playlists:[],notifications:{next_id:1,list:[]},recent_searches:[],hide_singles:!1,hide_spotify:!1,artists_sort:"Name",albums_sort:"Name",show_only_next_items:!1,show_burger_menu:!1,show_player_menu:!1},getters:{now_playing:t=>{var s=t.queue.items.find((function(s){return s.id===t.player.item_id}));return void 0===s?{}:s},settings_webinterface:t=>t.settings?t.settings.categories.find(t=>"webinterface"===t.name):null,settings_option_show_composer_now_playing:(t,s)=>{if(s.settings_webinterface){const t=s.settings_webinterface.options.find(t=>"show_composer_now_playing"===t.name);if(t)return t.value}return!1},settings_option_show_composer_for_genre:(t,s)=>{if(s.settings_webinterface){const t=s.settings_webinterface.options.find(t=>"show_composer_for_genre"===t.name);if(t)return t.value}return null},settings_category:t=>s=>t.settings.categories.find(t=>t.name===s),settings_option:t=>(s,a)=>{const e=t.settings.categories.find(t=>t.name===s);return e?e.options.find(t=>t.name===a):{}}},mutations:{[d](t,s){t.config=s},[u](t,s){t.settings=s},[p](t,s){const a=t.settings.categories.find(t=>t.name===s.category),e=a.options.find(t=>t.name===s.name);e.value=s.value},[_](t,s){t.library=s},[m](t,s){t.audiobooks_count=s},[h](t,s){t.podcasts_count=s},[f](t,s){t.outputs=s},[v](t,s){t.player=s},[y](t,s){t.queue=s},[b](t,s){t.lastfm=s},[g](t,s){t.spotify=s},[k](t,s){t.pairing=s},[C](t,s){t.spotify_new_releases=s},[w](t,s){t.spotify_featured_playlists=s},[x](t,s){if(s.topic){var a=t.notifications.list.findIndex(t=>t.topic===s.topic);if(a>=0)return void t.notifications.list.splice(a,1,s)}t.notifications.list.push(s)},[$](t,s){const a=t.notifications.list.indexOf(s);-1!==a&&t.notifications.list.splice(a,1)},[q](t,s){var a=t.recent_searches.findIndex(t=>t===s);a>=0&&t.recent_searches.splice(a,1),t.recent_searches.splice(0,0,s),t.recent_searches.length>5&&t.recent_searches.pop()},[A](t,s){t.hide_singles=s},[S](t,s){t.hide_spotify=s},[j](t,s){t.artists_sort=s},[P](t,s){t.albums_sort=s},[T](t,s){t.show_only_next_items=s},[L](t,s){t.show_burger_menu=s},[O](t,s){t.show_player_menu=s}},actions:{add_notification({commit:t,state:s},a){const e={id:s.notifications.next_id++,type:a.type,text:a.text,topic:a.topic,timeout:a.timeout};t(x,e),a.timeout>0&&setTimeout(()=>{t($,e)},a.timeout)}}});G.a.interceptors.response.use((function(t){return t}),(function(t){return t.request.status&&t.request.responseURL&&V.dispatch("add_notification",{text:"Request failed (status: "+t.request.status+" "+t.request.statusText+", url: "+t.request.responseURL+")",type:"danger"}),Promise.reject(t)}));var Q={config(){return G.a.get("./api/config")},settings(){return G.a.get("./api/settings")},settings_update(t,s){return G.a.put("./api/settings/"+t+"/"+s.name,s)},library_stats(){return G.a.get("./api/library")},library_update(){return G.a.put("./api/update")},library_rescan(){return G.a.put("./api/rescan")},library_count(t){return G.a.get("./api/library/count?expression="+t)},queue(){return G.a.get("./api/queue")},queue_clear(){return G.a.put("./api/queue/clear")},queue_remove(t){return G.a.delete("./api/queue/items/"+t)},queue_move(t,s){return G.a.put("./api/queue/items/"+t+"?new_position="+s)},queue_add(t){return G.a.post("./api/queue/items/add?uris="+t).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_add_next(t){var s=0;return V.getters.now_playing&&V.getters.now_playing.id&&(s=V.getters.now_playing.position+1),G.a.post("./api/queue/items/add?uris="+t+"&position="+s).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_expression_add(t){var s={};return s.expression=t,G.a.post("./api/queue/items/add",void 0,{params:s}).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_expression_add_next(t){var s={};return s.expression=t,s.position=0,V.getters.now_playing&&V.getters.now_playing.id&&(s.position=V.getters.now_playing.position+1),G.a.post("./api/queue/items/add",void 0,{params:s}).then(t=>(V.dispatch("add_notification",{text:t.data.count+" tracks appended to queue",type:"info",timeout:2e3}),Promise.resolve(t)))},queue_save_playlist(t){return G.a.post("./api/queue/save",void 0,{params:{name:t}}).then(s=>(V.dispatch("add_notification",{text:'Queue saved to playlist "'+t+'"',type:"info",timeout:2e3}),Promise.resolve(s)))},player_status(){return G.a.get("./api/player")},player_play_uri(t,s,a){var e={};return e.uris=t,e.shuffle=s?"true":"false",e.clear="true",e.playback="start",e.playback_from_position=a,G.a.post("./api/queue/items/add",void 0,{params:e})},player_play_expression(t,s,a){var e={};return e.expression=t,e.shuffle=s?"true":"false",e.clear="true",e.playback="start",e.playback_from_position=a,G.a.post("./api/queue/items/add",void 0,{params:e})},player_play(t={}){return G.a.put("./api/player/play",void 0,{params:t})},player_playpos(t){return G.a.put("./api/player/play?position="+t)},player_playid(t){return G.a.put("./api/player/play?item_id="+t)},player_pause(){return G.a.put("./api/player/pause")},player_stop(){return G.a.put("./api/player/stop")},player_next(){return G.a.put("./api/player/next")},player_previous(){return G.a.put("./api/player/previous")},player_shuffle(t){var s=t?"true":"false";return G.a.put("./api/player/shuffle?state="+s)},player_consume(t){var s=t?"true":"false";return G.a.put("./api/player/consume?state="+s)},player_repeat(t){return G.a.put("./api/player/repeat?state="+t)},player_volume(t){return G.a.put("./api/player/volume?volume="+t)},player_output_volume(t,s){return G.a.put("./api/player/volume?volume="+s+"&output_id="+t)},player_seek_to_pos(t){return G.a.put("./api/player/seek?position_ms="+t)},player_seek(t){return G.a.put("./api/player/seek?seek_ms="+t)},outputs(){return G.a.get("./api/outputs")},output_update(t,s){return G.a.put("./api/outputs/"+t,s)},output_toggle(t){return G.a.put("./api/outputs/"+t+"/toggle")},library_artists(t){return G.a.get("./api/library/artists",{params:{media_kind:t}})},library_artist(t){return G.a.get("./api/library/artists/"+t)},library_artist_albums(t){return G.a.get("./api/library/artists/"+t+"/albums")},library_albums(t){return G.a.get("./api/library/albums",{params:{media_kind:t}})},library_album(t){return G.a.get("./api/library/albums/"+t)},library_album_tracks(t,s={limit:-1,offset:0}){return G.a.get("./api/library/albums/"+t+"/tracks",{params:s})},library_album_track_update(t,s){return G.a.put("./api/library/albums/"+t+"/tracks",void 0,{params:s})},library_genres(){return G.a.get("./api/library/genres")},library_genre(t){var s={type:"albums",media_kind:"music",expression:'genre is "'+t+'"'};return G.a.get("./api/search",{params:s})},library_genre_tracks(t){var s={type:"tracks",media_kind:"music",expression:'genre is "'+t+'"'};return G.a.get("./api/search",{params:s})},library_radio_streams(){var t={type:"tracks",media_kind:"music",expression:"data_kind is url and song_length = 0"};return G.a.get("./api/search",{params:t})},library_artist_tracks(t){if(t){var s={type:"tracks",expression:'songartistid is "'+t+'"'};return G.a.get("./api/search",{params:s})}},library_podcasts_new_episodes(){var t={type:"tracks",expression:"media_kind is podcast and play_count = 0 ORDER BY time_added DESC"};return G.a.get("./api/search",{params:t})},library_podcast_episodes(t){var s={type:"tracks",expression:'media_kind is podcast and songalbumid is "'+t+'" ORDER BY date_released DESC'};return G.a.get("./api/search",{params:s})},library_add(t){return G.a.post("./api/library/add",void 0,{params:{url:t}})},library_playlist_delete(t){return G.a.delete("./api/library/playlists/"+t,void 0)},library_playlists(){return G.a.get("./api/library/playlists")},library_playlist_folder(t=0){return G.a.get("./api/library/playlists/"+t+"/playlists")},library_playlist(t){return G.a.get("./api/library/playlists/"+t)},library_playlist_tracks(t){return G.a.get("./api/library/playlists/"+t+"/tracks")},library_track(t){return G.a.get("./api/library/tracks/"+t)},library_track_playlists(t){return G.a.get("./api/library/tracks/"+t+"/playlists")},library_track_update(t,s={}){return G.a.put("./api/library/tracks/"+t,void 0,{params:s})},library_files(t){var s={directory:t};return G.a.get("./api/library/files",{params:s})},search(t){return G.a.get("./api/search",{params:t})},spotify(){return G.a.get("./api/spotify")},spotify_login(t){return G.a.post("./api/spotify-login",t)},lastfm(){return G.a.get("./api/lastfm")},lastfm_login(t){return G.a.post("./api/lastfm-login",t)},lastfm_logout(t){return G.a.get("./api/lastfm-logout")},pairing(){return G.a.get("./api/pairing")},pairing_kickoff(t){return G.a.post("./api/pairing",t)},artwork_url_append_size_params(t,s=600,a=600){return t&&t.startsWith("/")?t.includes("?")?t+"&maxwidth="+s+"&maxheight="+a:t+"?maxwidth="+s+"&maxheight="+a:t}},J={_audio:new Audio,_context:null,_source:null,_gain:null,setupAudio(){var t=window.AudioContext||window.webkitAudioContext;return this._context=new t,this._source=this._context.createMediaElementSource(this._audio),this._gain=this._context.createGain(),this._source.connect(this._gain),this._gain.connect(this._context.destination),this._audio.addEventListener("canplaythrough",t=>{this._audio.play()}),this._audio.addEventListener("canplay",t=>{this._audio.play()}),this._audio},setVolume(t){this._gain&&(t=parseFloat(t)||0,t=t<0?0:t,t=t>1?1:t,this._gain.gain.value=t)},playSource(t){this.stopAudio(),this._context.resume().then(()=>{this._audio.src=String(t||"")+"?x="+Date.now(),this._audio.crossOrigin="anonymous",this._audio.load()})},stopAudio(){try{this._audio.pause()}catch(t){}try{this._audio.stop()}catch(t){}try{this._audio.close()}catch(t){}}},K=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"navbar-item"},[a("div",{staticClass:"level is-mobile"},[a("div",{staticClass:"level-left fd-expanded"},[a("div",{staticClass:"level-item",staticStyle:{"flex-grow":"0"}},[a("a",{staticClass:"button is-white is-small"},[a("span",{staticClass:"icon fd-has-action",class:{"has-text-grey-light":!t.output.selected},on:{click:t.set_enabled}},[a("i",{staticClass:"mdi mdi-18px",class:t.type_class})])])]),a("div",{staticClass:"level-item fd-expanded"},[a("div",{staticClass:"fd-expanded"},[a("p",{staticClass:"heading",class:{"has-text-grey-light":!t.output.selected}},[t._v(t._s(t.output.name))]),a("range-slider",{staticClass:"slider fd-has-action",attrs:{min:"0",max:"100",step:"1",disabled:!t.output.selected,value:t.volume},on:{change:t.set_volume}})],1)])])])])},X=[],Z=a("c7e3"),tt=a.n(Z),st={name:"NavbarItemOutput",components:{RangeSlider:tt.a},props:["output"],computed:{type_class(){return"AirPlay"===this.output.type?"mdi-airplay":"Chromecast"===this.output.type?"mdi-cast":"fifo"===this.output.type?"mdi-pipe":"mdi-server"},volume(){return this.output.selected?this.output.volume:0}},methods:{play_next:function(){Q.player_next()},set_volume:function(t){Q.player_output_volume(this.output.id,t)},set_enabled:function(){const t={selected:!this.output.selected};Q.output_update(this.output.id,t)}}},at=st,et=Object(z["a"])(at,K,X,!1,null,null,null),it=et.exports,lt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{attrs:{disabled:t.disabled},on:{click:t.toggle_play_pause}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:[t.icon_style,{"mdi-play":!t.is_playing,"mdi-pause":t.is_playing&&t.is_pause_allowed,"mdi-stop":t.is_playing&&!t.is_pause_allowed}]})])])},ot=[],nt={name:"PlayerButtonPlayPause",props:{icon_style:String,show_disabled_message:Boolean},computed:{is_playing(){return"play"===this.$store.state.player.state},is_pause_allowed(){return this.$store.getters.now_playing&&"pipe"!==this.$store.getters.now_playing.data_kind},disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0}},methods:{toggle_play_pause:function(){this.disabled?this.show_disabled_message&&this.$store.dispatch("add_notification",{text:"Queue is empty",type:"info",topic:"connection",timeout:2e3}):this.is_playing&&this.is_pause_allowed?Q.player_pause():this.is_playing&&!this.is_pause_allowed?Q.player_stop():Q.player_play()}}},rt=nt,ct=Object(z["a"])(rt,lt,ot,!1,null,null,null),dt=ct.exports,ut=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{attrs:{disabled:t.disabled},on:{click:t.play_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-skip-forward",class:t.icon_style})])])},pt=[],_t={name:"PlayerButtonNext",props:{icon_style:String},computed:{disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0}},methods:{play_next:function(){this.disabled||Q.player_next()}}},mt=_t,ht=Object(z["a"])(mt,ut,pt,!1,null,null,null),ft=ht.exports,vt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{attrs:{disabled:t.disabled},on:{click:t.play_previous}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-skip-backward",class:t.icon_style})])])},yt=[],bt={name:"PlayerButtonPrevious",props:{icon_style:String},computed:{disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0}},methods:{play_previous:function(){this.disabled||Q.player_previous()}}},gt=bt,kt=Object(z["a"])(gt,vt,yt,!1,null,null,null),Ct=kt.exports,wt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{class:{"is-warning":t.is_shuffle},on:{click:t.toggle_shuffle_mode}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:[t.icon_style,{"mdi-shuffle":t.is_shuffle,"mdi-shuffle-disabled":!t.is_shuffle}]})])])},xt=[],$t={name:"PlayerButtonShuffle",props:{icon_style:String},computed:{is_shuffle(){return this.$store.state.player.shuffle}},methods:{toggle_shuffle_mode:function(){Q.player_shuffle(!this.is_shuffle)}}},qt=$t,At=Object(z["a"])(qt,wt,xt,!1,null,null,null),St=At.exports,jt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{class:{"is-warning":t.is_consume},on:{click:t.toggle_consume_mode}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-fire",class:t.icon_style})])])},Pt=[],Tt={name:"PlayerButtonConsume",props:{icon_style:String},computed:{is_consume(){return this.$store.state.player.consume}},methods:{toggle_consume_mode:function(){Q.player_consume(!this.is_consume)}}},Lt=Tt,Ot=Object(z["a"])(Lt,jt,Pt,!1,null,null,null),Et=Ot.exports,It=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("a",{class:{"is-warning":!t.is_repeat_off},on:{click:t.toggle_repeat_mode}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:[t.icon_style,{"mdi-repeat":t.is_repeat_all,"mdi-repeat-once":t.is_repeat_single,"mdi-repeat-off":t.is_repeat_off}]})])])},zt=[],Dt={name:"PlayerButtonRepeat",props:{icon_style:String},computed:{is_repeat_all(){return"all"===this.$store.state.player.repeat},is_repeat_single(){return"single"===this.$store.state.player.repeat},is_repeat_off(){return!this.is_repeat_all&&!this.is_repeat_single}},methods:{toggle_repeat_mode:function(){this.is_repeat_all?Q.player_repeat("single"):this.is_repeat_single?Q.player_repeat("off"):Q.player_repeat("all")}}},Nt=Dt,Rt=Object(z["a"])(Nt,It,zt,!1,null,null,null),Mt=Rt.exports,Ut=function(){var t=this,s=t.$createElement,a=t._self._c||s;return t.visible?a("a",{attrs:{disabled:t.disabled},on:{click:t.seek}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-rewind",class:t.icon_style})])]):t._e()},Ht=[],Wt={name:"PlayerButtonSeekBack",props:["seek_ms","icon_style"],computed:{now_playing(){return this.$store.getters.now_playing},is_stopped(){return"stop"===this.$store.state.player.state},disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0||this.is_stopped||"pipe"===this.now_playing.data_kind},visible(){return["podcast","audiobook"].includes(this.now_playing.media_kind)}},methods:{seek:function(){this.disabled||Q.player_seek(-1*this.seek_ms)}}},Bt=Wt,Ft=Object(z["a"])(Bt,Ut,Ht,!1,null,null,null),Gt=Ft.exports,Yt=function(){var t=this,s=t.$createElement,a=t._self._c||s;return t.visible?a("a",{attrs:{disabled:t.disabled},on:{click:t.seek}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-fast-forward",class:t.icon_style})])]):t._e()},Vt=[],Qt={name:"PlayerButtonSeekForward",props:["seek_ms","icon_style"],computed:{now_playing(){return this.$store.getters.now_playing},is_stopped(){return"stop"===this.$store.state.player.state},disabled(){return!this.$store.state.queue||this.$store.state.queue.count<=0||this.is_stopped||"pipe"===this.now_playing.data_kind},visible(){return["podcast","audiobook"].includes(this.now_playing.media_kind)}},methods:{seek:function(){this.disabled||Q.player_seek(this.seek_ms)}}},Jt=Qt,Kt=Object(z["a"])(Jt,Yt,Vt,!1,null,null,null),Xt=Kt.exports,Zt={name:"NavbarBottom",components:{NavbarItemLink:N,NavbarItemOutput:it,RangeSlider:tt.a,PlayerButtonPlayPause:dt,PlayerButtonNext:ft,PlayerButtonPrevious:Ct,PlayerButtonShuffle:St,PlayerButtonConsume:Et,PlayerButtonRepeat:Mt,PlayerButtonSeekForward:Xt,PlayerButtonSeekBack:Gt},data(){return{old_volume:0,playing:!1,loading:!1,stream_volume:10,show_outputs_menu:!1,show_desktop_outputs_menu:!1}},computed:{show_player_menu:{get(){return this.$store.state.show_player_menu},set(t){this.$store.commit(O,t)}},show_burger_menu(){return this.$store.state.show_burger_menu},zindex(){return this.show_burger_menu?"z-index: 20":""},state(){return this.$store.state.player},now_playing(){return this.$store.getters.now_playing},is_now_playing_page(){return"/now-playing"===this.$route.path},outputs(){return this.$store.state.outputs},player(){return this.$store.state.player},config(){return this.$store.state.config}},methods:{on_click_outside_outputs(){this.show_outputs_menu=!1},set_volume:function(t){Q.player_volume(t)},toggle_mute_volume:function(){this.player.volume>0?this.set_volume(0):this.set_volume(this.old_volume)},setupAudio:function(){const t=J.setupAudio();t.addEventListener("waiting",t=>{this.playing=!1,this.loading=!0}),t.addEventListener("playing",t=>{this.playing=!0,this.loading=!1}),t.addEventListener("ended",t=>{this.playing=!1,this.loading=!1}),t.addEventListener("error",t=>{this.closeAudio(),this.$store.dispatch("add_notification",{text:"HTTP stream error: failed to load stream or stopped loading due to network problem",type:"danger"}),this.playing=!1,this.loading=!1})},closeAudio:function(){J.stopAudio(),this.playing=!1},playChannel:function(){if(this.playing)return;const t="/stream.mp3";this.loading=!0,J.playSource(t),J.setVolume(this.stream_volume/100)},togglePlay:function(){if(!this.loading)return this.playing?this.closeAudio():this.playChannel()},set_stream_volume:function(t){this.stream_volume=t,J.setVolume(this.stream_volume/100)}},watch:{"$store.state.player.volume"(){this.player.volume>0&&(this.old_volume=this.player.volume)}},mounted(){this.setupAudio()},destroyed(){this.closeAudio()}},ts=Zt,ss=Object(z["a"])(ts,W,B,!1,null,null,null),as=ss.exports,es=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"fd-notifications"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-half"},t._l(t.notifications,(function(s){return a("div",{key:s.id,staticClass:"notification has-shadow ",class:["notification",s.type?"is-"+s.type:""]},[a("button",{staticClass:"delete",on:{click:function(a){return t.remove(s)}}}),t._v(" "+t._s(s.text)+" ")])})),0)])])},is=[],ls={name:"Notifications",components:{},data(){return{showNav:!1}},computed:{notifications(){return this.$store.state.notifications.list}},methods:{remove:function(t){this.$store.commit($,t)}}},os=ls,ns=(a("cf45"),Object(z["a"])(os,es,is,!1,null,null,null)),rs=ns.exports,cs=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" Remote pairing request ")]),a("form",{on:{submit:function(s){return s.preventDefault(),t.kickoff_pairing(s)}}},[a("label",{staticClass:"label"},[t._v(" "+t._s(t.pairing.remote)+" ")]),a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.pairing_req.pin,expression:"pairing_req.pin"}],ref:"pin_field",staticClass:"input",attrs:{type:"text",placeholder:"Enter pairing code"},domProps:{value:t.pairing_req.pin},on:{input:function(s){s.target.composing||t.$set(t.pairing_req,"pin",s.target.value)}}})])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.kickoff_pairing}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cellphone-iphone"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Pair Remote")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},ds=[],us={name:"ModalDialogRemotePairing",props:["show"],data(){return{pairing_req:{pin:""}}},computed:{pairing(){return this.$store.state.pairing}},methods:{kickoff_pairing(){Q.pairing_kickoff(this.pairing_req).then(()=>{this.pairing_req.pin=""})}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.pin_field.focus()},10))}}},ps=us,_s=Object(z["a"])(ps,cs,ds,!1,null,null,null),ms=_s.exports,hs=a("d04d"),fs=a.n(hs),vs=a("c1df"),ys=a.n(vs),bs={name:"App",components:{NavbarTop:H,NavbarBottom:as,Notifications:rs,ModalDialogRemotePairing:ms},template:"<App/>",data(){return{token_timer_id:0,reconnect_attempts:0,pairing_active:!1}},computed:{show_burger_menu:{get(){return this.$store.state.show_burger_menu},set(t){this.$store.commit(L,t)}},show_player_menu:{get(){return this.$store.state.show_player_menu},set(t){this.$store.commit(O,t)}}},created:function(){ys.a.locale(navigator.language),this.connect(),this.$Progress.start(),this.$router.beforeEach((t,s,a)=>{if(t.meta.show_progress){if(void 0!==t.meta.progress){const s=t.meta.progress;this.$Progress.parseMeta(s)}this.$Progress.start()}a()}),this.$router.afterEach((t,s)=>{t.meta.show_progress&&this.$Progress.finish()})},methods:{connect:function(){this.$store.dispatch("add_notification",{text:"Connecting to forked-daapd",type:"info",topic:"connection",timeout:2e3}),Q.config().then(({data:t})=>{this.$store.commit(d,t),this.$store.commit(A,t.hide_singles),document.title=t.library_name,this.open_ws(),this.$Progress.finish()}).catch(()=>{this.$store.dispatch("add_notification",{text:"Failed to connect to forked-daapd",type:"danger",topic:"connection"})})},open_ws:function(){if(this.$store.state.config.websocket_port<=0)return void this.$store.dispatch("add_notification",{text:"Missing websocket port",type:"danger"});const t=this;var s="ws://";"https:"===window.location.protocol&&(s="wss://");var a=s+window.location.hostname+":"+t.$store.state.config.websocket_port;var e=new fs.a(a,"notify",{reconnectInterval:3e3});e.onopen=function(){t.$store.dispatch("add_notification",{text:"Connection to server established",type:"primary",topic:"connection",timeout:2e3}),t.reconnect_attempts=0,e.send(JSON.stringify({notify:["update","database","player","options","outputs","volume","spotify","lastfm","pairing"]})),t.update_outputs(),t.update_player_status(),t.update_library_stats(),t.update_settings(),t.update_queue(),t.update_spotify(),t.update_lastfm(),t.update_pairing()},e.onclose=function(){},e.onerror=function(){t.reconnect_attempts++,t.$store.dispatch("add_notification",{text:"Connection lost. Reconnecting ... ("+t.reconnect_attempts+")",type:"danger",topic:"connection"})},e.onmessage=function(s){var a=JSON.parse(s.data);(a.notify.includes("update")||a.notify.includes("database"))&&t.update_library_stats(),(a.notify.includes("player")||a.notify.includes("options")||a.notify.includes("volume"))&&t.update_player_status(),(a.notify.includes("outputs")||a.notify.includes("volume"))&&t.update_outputs(),a.notify.includes("queue")&&t.update_queue(),a.notify.includes("spotify")&&t.update_spotify(),a.notify.includes("lastfm")&&t.update_lastfm(),a.notify.includes("pairing")&&t.update_pairing()}},update_library_stats:function(){Q.library_stats().then(({data:t})=>{this.$store.commit(_,t)}),Q.library_count("media_kind is audiobook").then(({data:t})=>{this.$store.commit(m,t)}),Q.library_count("media_kind is podcast").then(({data:t})=>{this.$store.commit(h,t)})},update_outputs:function(){Q.outputs().then(({data:t})=>{this.$store.commit(f,t.outputs)})},update_player_status:function(){Q.player_status().then(({data:t})=>{this.$store.commit(v,t)})},update_queue:function(){Q.queue().then(({data:t})=>{this.$store.commit(y,t)})},update_settings:function(){Q.settings().then(({data:t})=>{this.$store.commit(u,t)})},update_lastfm:function(){Q.lastfm().then(({data:t})=>{this.$store.commit(b,t)})},update_spotify:function(){Q.spotify().then(({data:t})=>{this.$store.commit(g,t),this.token_timer_id>0&&(window.clearTimeout(this.token_timer_id),this.token_timer_id=0),t.webapi_token_expires_in>0&&t.webapi_token&&(this.token_timer_id=window.setTimeout(this.update_spotify,1e3*t.webapi_token_expires_in))})},update_pairing:function(){Q.pairing().then(({data:t})=>{this.$store.commit(k,t),this.pairing_active=t.active})},update_is_clipped:function(){this.show_burger_menu||this.show_player_menu?document.querySelector("html").classList.add("is-clipped"):document.querySelector("html").classList.remove("is-clipped")}},watch:{show_burger_menu(){this.update_is_clipped()},show_player_menu(){this.update_is_clipped()}}},gs=bs,ks=Object(z["a"])(gs,i,l,!1,null,null,null),Cs=ks.exports,ws=a("8c4f"),xs=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"heading"},[t._v(t._s(t.queue.count)+" tracks")]),a("p",{staticClass:"title is-4"},[t._v("Queue")])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small",class:{"is-info":t.show_only_next_items},on:{click:t.update_show_next_items}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-arrow-collapse-down"})]),a("span",[t._v("Hide previous")])]),a("a",{staticClass:"button is-small",on:{click:t.open_add_stream_dialog}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),a("span",[t._v("Add Stream")])]),a("a",{staticClass:"button is-small",class:{"is-info":t.edit_mode},on:{click:function(s){t.edit_mode=!t.edit_mode}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-pencil"})]),a("span",[t._v("Edit")])]),a("a",{staticClass:"button is-small",on:{click:t.queue_clear}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-delete-empty"})]),a("span",[t._v("Clear")])]),t.is_queue_save_allowed?a("a",{staticClass:"button is-small",attrs:{disabled:0===t.queue_items.length},on:{click:t.save_dialog}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-content-save"})]),a("span",[t._v("Save")])]):t._e()])]),a("template",{slot:"content"},[a("draggable",{attrs:{handle:".handle"},on:{end:t.move_item},model:{value:t.queue_items,callback:function(s){t.queue_items=s},expression:"queue_items"}},t._l(t.queue_items,(function(s,e){return a("list-item-queue-item",{key:s.id,attrs:{item:s,position:e,current_position:t.current_position,show_only_next_items:t.show_only_next_items,edit_mode:t.edit_mode}},[a("template",{slot:"actions"},[t.edit_mode?t._e():a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])]),s.id!==t.state.item_id&&t.edit_mode?a("a",{on:{click:function(a){return t.remove(s)}}},[a("span",{staticClass:"icon has-text-grey"},[a("i",{staticClass:"mdi mdi-delete mdi-18px"})])]):t._e()])],2)})),1),a("modal-dialog-queue-item",{attrs:{show:t.show_details_modal,item:t.selected_item},on:{close:function(s){t.show_details_modal=!1}}}),a("modal-dialog-add-url-stream",{attrs:{show:t.show_url_modal},on:{close:function(s){t.show_url_modal=!1}}}),t.is_queue_save_allowed?a("modal-dialog-playlist-save",{attrs:{show:t.show_pls_save_modal},on:{close:function(s){t.show_pls_save_modal=!1}}}):t._e()],1)],2)},$s=[],qs=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"section fd-content"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[t.$slots["options"]?a("section",[a("div",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:t.observer_options,expression:"observer_options"}]}),t._t("options"),a("nav",{staticClass:"buttons is-centered",staticStyle:{"margin-bottom":"6px","margin-top":"16px"}},[t.options_visible?a("a",{staticClass:"button is-small is-white",on:{click:t.scroll_to_content}},[t._m(1)]):a("a",{staticClass:"button is-small is-white",on:{click:t.scroll_to_top}},[t._m(0)])])],2):t._e(),a("div",{class:{"fd-content-with-option":t.$slots["options"]}},[a("nav",{staticClass:"level",attrs:{id:"top"}},[a("div",{staticClass:"level-left"},[a("div",{staticClass:"level-item has-text-centered-mobile"},[a("div",[t._t("heading-left")],2)])]),a("div",{staticClass:"level-right has-text-centered-mobile"},[t._t("heading-right")],2)]),t._t("content"),a("div",{staticStyle:{"margin-top":"16px"}},[t._t("footer")],2)],2)])])])])},As=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-chevron-up"})])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-chevron-down"})])}],Ss={name:"ContentWithHeading",data(){return{options_visible:!1,observer_options:{callback:this.visibilityChanged,intersection:{rootMargin:"-100px",threshold:.3}}}},methods:{scroll_to_top:function(){window.scrollTo({top:0,behavior:"smooth"})},scroll_to_content:function(){this.$route.meta.has_tabs?this.$scrollTo("#top",{offset:-140}):this.$scrollTo("#top",{offset:-100})},visibilityChanged:function(t){this.options_visible=t}}},js=Ss,Ps=Object(z["a"])(js,qs,As,!1,null,null,null),Ts=Ps.exports,Ls=function(){var t=this,s=t.$createElement,a=t._self._c||s;return t.is_next||!t.show_only_next_items?a("div",{staticClass:"media"},[t.edit_mode?a("div",{staticClass:"media-left"},[t._m(0)]):t._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.play}},[a("h1",{staticClass:"title is-6",class:{"has-text-primary":t.item.id===t.state.item_id,"has-text-grey-light":!t.is_next}},[t._v(t._s(t.item.title))]),a("h2",{staticClass:"subtitle is-7",class:{"has-text-primary":t.item.id===t.state.item_id,"has-text-grey-light":!t.is_next,"has-text-grey":t.is_next&&t.item.id!==t.state.item_id}},[a("b",[t._v(t._s(t.item.artist))])]),a("h2",{staticClass:"subtitle is-7",class:{"has-text-primary":t.item.id===t.state.item_id,"has-text-grey-light":!t.is_next,"has-text-grey":t.is_next&&t.item.id!==t.state.item_id}},[t._v(t._s(t.item.album))])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)]):t._e()},Os=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon has-text-grey fd-is-movable handle"},[a("i",{staticClass:"mdi mdi-drag-horizontal mdi-18px"})])}],Es={name:"ListItemQueueItem",props:["item","position","current_position","show_only_next_items","edit_mode"],computed:{state(){return this.$store.state.player},is_next(){return this.current_position<0||this.position>=this.current_position}},methods:{play:function(){Q.player_play({item_id:this.item.id})}}},Is=Es,zs=Object(z["a"])(Is,Ls,Os,!1,null,null,null),Ds=zs.exports,Ns=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.item.title)+" ")]),a("p",{staticClass:"subtitle"},[t._v(" "+t._s(t.item.artist)+" ")]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album")]),t.item.album_id?a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.item.album))]):a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.album))])]),t.item.album_artist?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),t.item.album_artist_id?a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album_artist}},[t._v(t._s(t.item.album_artist))]):a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.album_artist))])]):t._e(),t.item.composer?a("p",[a("span",{staticClass:"heading"},[t._v("Composer")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.composer))])]):t._e(),t.item.year>0?a("p",[a("span",{staticClass:"heading"},[t._v("Year")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.year))])]):t._e(),t.item.genre?a("p",[a("span",{staticClass:"heading"},[t._v("Genre")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.item.genre))])]):t._e(),a("p",[a("span",{staticClass:"heading"},[t._v("Track / Disc")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.track_number)+" / "+t._s(t.item.disc_number))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.item.length_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.path))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.item.media_kind)+" - "+t._s(t.item.data_kind)+" "),"spotify"===t.item.data_kind?a("span",{staticClass:"has-text-weight-normal"},[t._v("("),a("a",{on:{click:t.open_spotify_artist}},[t._v("artist")]),t._v(", "),a("a",{on:{click:t.open_spotify_album}},[t._v("album")]),t._v(")")]):t._e()])]),a("p",[a("span",{staticClass:"heading"},[t._v("Quality")]),a("span",{staticClass:"title is-6"},[t._v(" "+t._s(t.item.type)+" "),t.item.samplerate?a("span",[t._v(" | "+t._s(t.item.samplerate)+" Hz")]):t._e(),t.item.channels?a("span",[t._v(" | "+t._s(t._f("channels")(t.item.channels)))]):t._e(),t.item.bitrate?a("span",[t._v(" | "+t._s(t.item.bitrate)+" Kb/s")]):t._e()])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.remove}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-delete"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Remove")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Rs=[],Ms=(a("baa5"),a("fb6a"),a("be8d")),Us=a.n(Ms),Hs={name:"ModalDialogQueueItem",props:["show","item"],data(){return{spotify_track:{}}},methods:{remove:function(){this.$emit("close"),Q.queue_remove(this.item.id)},play:function(){this.$emit("close"),Q.player_play({item_id:this.item.id})},open_album:function(){"podcast"===this.media_kind?this.$router.push({path:"/podcasts/"+this.item.album_id}):"audiobook"===this.media_kind?this.$router.push({path:"/audiobooks/"+this.item.album_id}):this.$router.push({path:"/music/albums/"+this.item.album_id})},open_album_artist:function(){this.$router.push({path:"/music/artists/"+this.item.album_artist_id})},open_genre:function(){this.$router.push({name:"Genre",params:{genre:this.item.genre}})},open_spotify_artist:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/artists/"+this.spotify_track.artists[0].id})},open_spotify_album:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/albums/"+this.spotify_track.album.id})}},watch:{item(){if(this.item&&"spotify"===this.item.data_kind){const t=new Us.a;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}}},Ws=Hs,Bs=Object(z["a"])(Ws,Ns,Rs,!1,null,null,null),Fs=Bs.exports,Gs=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" Add stream URL ")]),a("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(s){return s.preventDefault(),t.play(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.url,expression:"url"}],ref:"url_field",staticClass:"input is-shadowless",attrs:{type:"text",placeholder:"http://url-to-stream",disabled:t.loading},domProps:{value:t.url},on:{input:function(s){s.target.composing||(t.url=s.target.value)}}}),a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-web"})])])])])]),t.loading?a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Loading ...")])])]):a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.add_stream}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Ys=[],Vs={name:"ModalDialogAddUrlStream",props:["show"],data(){return{url:"",loading:!1}},methods:{add_stream:function(){this.loading=!0,Q.queue_add(this.url).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})},play:function(){this.loading=!0,Q.player_play_uri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}}},Qs=Vs,Js=Object(z["a"])(Qs,Gs,Ys,!1,null,null,null),Ks=Js.exports,Xs=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" Save queue to playlist ")]),a("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(s){return s.preventDefault(),t.save(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.playlist_name,expression:"playlist_name"}],ref:"playlist_name_field",staticClass:"input is-shadowless",attrs:{type:"text",placeholder:"Playlist name",disabled:t.loading},domProps:{value:t.playlist_name},on:{input:function(s){s.target.composing||(t.playlist_name=s.target.value)}}}),a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-file-music"})])])])])]),t.loading?a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Saving ...")])])]):a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.save}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-content-save"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Save")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Zs=[],ta={name:"ModalDialogPlaylistSave",props:["show"],data(){return{playlist_name:"",loading:!1}},methods:{save:function(){this.playlist_name.length<1||(this.loading=!0,Q.queue_save_playlist(this.playlist_name).then(()=>{this.$emit("close"),this.playlist_name=""}).catch(()=>{this.loading=!1}))}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}}},sa=ta,aa=Object(z["a"])(sa,Xs,Zs,!1,null,null,null),ea=aa.exports,ia=a("310e"),la=a.n(ia),oa={name:"PageQueue",components:{ContentWithHeading:Ts,ListItemQueueItem:Ds,draggable:la.a,ModalDialogQueueItem:Fs,ModalDialogAddUrlStream:Ks,ModalDialogPlaylistSave:ea},data(){return{edit_mode:!1,show_details_modal:!1,show_url_modal:!1,show_pls_save_modal:!1,selected_item:{}}},computed:{state(){return this.$store.state.player},is_queue_save_allowed(){return this.$store.state.config.allow_modifying_stored_playlists&&this.$store.state.config.default_playlist_directory},queue(){return this.$store.state.queue},queue_items:{get(){return this.$store.state.queue.items},set(t){}},current_position(){const t=this.$store.getters.now_playing;return void 0===t||void 0===t.position?-1:this.$store.getters.now_playing.position},show_only_next_items(){return this.$store.state.show_only_next_items}},methods:{queue_clear:function(){Q.queue_clear()},update_show_next_items:function(t){this.$store.commit(T,!this.show_only_next_items)},remove:function(t){Q.queue_remove(t.id)},move_item:function(t){var s=this.show_only_next_items?t.oldIndex+this.current_position:t.oldIndex,a=this.queue_items[s],e=a.position+(t.newIndex-t.oldIndex);e!==s&&Q.queue_move(a.id,e)},open_dialog:function(t){this.selected_item=t,this.show_details_modal=!0},open_add_stream_dialog:function(t){this.show_url_modal=!0},save_dialog:function(t){this.queue_items.length>0&&(this.show_pls_save_modal=!0)}}},na=oa,ra=Object(z["a"])(na,xs,$s,!1,null,null,null),ca=ra.exports,da=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",[t.now_playing.id>0?a("div",{staticClass:"fd-is-fullheight"},[a("div",{staticClass:"fd-is-expanded"},[a("cover-artwork",{staticClass:"fd-cover-image fd-has-action",attrs:{artwork_url:t.now_playing.artwork_url,artist:t.now_playing.artist,album:t.now_playing.album},on:{click:function(s){return t.open_dialog(t.now_playing)}}})],1),a("div",{staticClass:"fd-has-padding-left-right"},[a("div",{staticClass:"container has-text-centered"},[a("p",{staticClass:"control has-text-centered fd-progress-now-playing"},[a("range-slider",{staticClass:"seek-slider fd-has-action",attrs:{min:"0",max:t.state.item_length_ms,value:t.item_progress_ms,disabled:"stop"===t.state.state,step:"1000"},on:{change:t.seek}})],1),a("p",{staticClass:"content"},[a("span",[t._v(t._s(t._f("duration")(t.item_progress_ms))+" / "+t._s(t._f("duration")(t.now_playing.length_ms)))])])])]),a("div",{staticClass:"fd-has-padding-left-right"},[a("div",{staticClass:"container has-text-centered fd-has-margin-top"},[a("h1",{staticClass:"title is-5"},[t._v(" "+t._s(t.now_playing.title)+" ")]),a("h2",{staticClass:"title is-6"},[t._v(" "+t._s(t.now_playing.artist)+" ")]),t.composer?a("h2",{staticClass:"subtitle is-6 has-text-grey has-text-weight-bold"},[t._v(" "+t._s(t.composer)+" ")]):t._e(),a("h3",{staticClass:"subtitle is-6"},[t._v(" "+t._s(t.now_playing.album)+" ")])])])]):a("div",{staticClass:"fd-is-fullheight"},[t._m(0)]),a("modal-dialog-queue-item",{attrs:{show:t.show_details_modal,item:t.selected_item},on:{close:function(s){t.show_details_modal=!1}}})],1)},ua=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"fd-is-expanded fd-has-padding-left-right",staticStyle:{"flex-direction":"column"}},[a("div",{staticClass:"content has-text-centered"},[a("h1",{staticClass:"title is-5"},[t._v(" Your play queue is empty ")]),a("p",[t._v(" Add some tracks by browsing your library ")])])])}],pa=(a("1276"),a("498a"),function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("figure",[a("img",{directives:[{name:"lazyload",rawName:"v-lazyload"}],attrs:{"data-src":t.artwork_url_with_size,"data-err":t.dataURI},on:{click:function(s){return t.$emit("click")}}})])}),_a=[];a("5319");class ma{render(t){const s='<svg width="'+t.width+'" height="'+t.height+'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+t.width+" "+t.height+'" preserveAspectRatio="none"><defs><style type="text/css"> #holder text { fill: '+t.textColor+"; font-family: "+t.fontFamily+"; font-size: "+t.fontSize+"px; font-weight: "+t.fontWeight+'; } </style></defs><g id="holder"> <rect width="100%" height="100%" fill="'+t.backgroundColor+'"></rect> <g> <text text-anchor="middle" x="50%" y="50%" dy=".3em">'+t.caption+"</text> </g></g></svg>";return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(s)}}var ha=ma,fa=a("5d8a"),va=a.n(fa),ya={name:"CoverArtwork",props:["artist","album","artwork_url","maxwidth","maxheight"],data(){return{svg:new ha,width:600,height:600,font_family:"sans-serif",font_size:200,font_weight:600}},computed:{artwork_url_with_size:function(){return this.maxwidth>0&&this.maxheight>0?Q.artwork_url_append_size_params(this.artwork_url,this.maxwidth,this.maxheight):Q.artwork_url_append_size_params(this.artwork_url)},alt_text(){return this.artist+" - "+this.album},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""},background_color(){return va()(this.alt_text)},is_background_light(){const t=this.background_color.replace(/#/,""),s=parseInt(t.substr(0,2),16),a=parseInt(t.substr(2,2),16),e=parseInt(t.substr(4,2),16),i=[.299*s,.587*a,.114*e].reduce((t,s)=>t+s)/255;return i>.5},text_color(){return this.is_background_light?"#000000":"#ffffff"},rendererParams(){return{width:this.width,height:this.height,textColor:this.text_color,backgroundColor:this.background_color,caption:this.caption,fontFamily:this.font_family,fontSize:this.font_size,fontWeight:this.font_weight}},dataURI(){return this.svg.render(this.rendererParams)}}},ba=ya,ga=Object(z["a"])(ba,pa,_a,!1,null,null,null),ka=ga.exports,Ca={name:"PageNowPlaying",components:{ModalDialogQueueItem:Fs,RangeSlider:tt.a,CoverArtwork:ka},data(){return{item_progress_ms:0,interval_id:0,show_details_modal:!1,selected_item:{}}},created(){this.item_progress_ms=this.state.item_progress_ms,Q.player_status().then(({data:t})=>{this.$store.commit(v,t),"play"===this.state.state&&(this.interval_id=window.setInterval(this.tick,1e3))})},destroyed(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},computed:{state(){return this.$store.state.player},now_playing(){return this.$store.getters.now_playing},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.now_playing.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(t=>this.now_playing.genre.toLowerCase().indexOf(t.trim())>=0)>=0)?this.now_playing.composer:null}},methods:{tick:function(){this.item_progress_ms+=1e3},seek:function(t){Q.player_seek_to_pos(t).catch(()=>{this.item_progress_ms=this.state.item_progress_ms})},open_dialog:function(t){this.selected_item=t,this.show_details_modal=!0}},watch:{state(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.item_progress_ms=this.state.item_progress_ms,"play"===this.state.state&&(this.interval_id=window.setInterval(this.tick,1e3))}}},wa=Ca,xa=Object(z["a"])(wa,da,ua,!1,null,null,null),$a=xa.exports,qa=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently added")]),a("p",{staticClass:"heading"},[t._v("albums")])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.recently_added.items}})],1),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:function(s){return t.open_browse("recently_added")}}},[t._v("Show more")])])])])],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently played")]),a("p",{staticClass:"heading"},[t._v("tracks")])]),a("template",{slot:"content"},[a("list-tracks",{attrs:{tracks:t.recently_played.items}})],1),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:function(s){return t.open_browse("recently_played")}}},[t._v("Show more")])])])])],2)],1)},Aa=[];a("841c"),a("ddb0");const Sa=function(t){return{beforeRouteEnter(s,a,e){t.load(s).then(s=>{e(a=>t.set(a,s))})},beforeRouteUpdate(s,a,e){const i=this;t.load(s).then(s=>{t.set(i,s),e()})}}};var ja=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"section fd-tabs-section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"tabs is-centered is-small"},[a("ul",[a("router-link",{attrs:{tag:"li",to:"/music/browse","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-web"})]),a("span",{},[t._v("Browse")])])]),a("router-link",{attrs:{tag:"li",to:"/music/artists","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-artist"})]),a("span",{},[t._v("Artists")])])]),a("router-link",{attrs:{tag:"li",to:"/music/albums","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-album"})]),a("span",{},[t._v("Albums")])])]),a("router-link",{attrs:{tag:"li",to:"/music/genres","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-speaker"})]),a("span",{},[t._v("Genres")])])]),t.spotify_enabled?a("router-link",{attrs:{tag:"li",to:"/music/spotify","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-spotify"})]),a("span",{},[t._v("Spotify")])])]):t._e()],1)])])])])])},Pa=[],Ta={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},La=Ta,Oa=Object(z["a"])(La,ja,Pa,!1,null,null,null),Ea=Oa.exports,Ia=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t.is_grouped?a("div",t._l(t.albums.indexList,(function(s){return a("div",{key:s,staticClass:"mb-6"},[a("span",{staticClass:"tag is-info is-light is-small has-text-weight-bold",attrs:{id:"index_"+s}},[t._v(t._s(s))]),t._l(t.albums.grouped[s],(function(s){return a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[t.is_visible_artwork?a("template",{slot:"artwork"},[a("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:s.artwork_url,artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}))],2)})),0):a("div",t._l(t.albums_list,(function(s){return a("list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[t.is_visible_artwork?a("template",{slot:"artwork"},[a("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:s.artwork_url,artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),1),a("modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album,media_kind:t.media_kind},on:{"remove-podcast":function(s){return t.open_remove_podcast_dialog()},close:function(s){t.show_details_modal=!1}}}),a("modal-dialog",{attrs:{show:t.show_remove_podcast_modal,title:"Remove podcast",delete_action:"Remove"},on:{close:function(s){t.show_remove_podcast_modal=!1},delete:t.remove_podcast}},[a("template",{slot:"modal-content"},[a("p",[t._v("Permanently remove this podcast from your library?")]),a("p",{staticClass:"is-size-7"},[t._v("(This will also remove the RSS playlist "),a("b",[t._v(t._s(t.rss_playlist_to_remove.name))]),t._v(".)")])])],2)],1)},za=[],Da=function(t,s){var a=s._c;return a("div",{staticClass:"media",attrs:{id:"index_"+s.props.album.name_sort.charAt(0).toUpperCase()}},[s.$slots["artwork"]?a("div",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("artwork")],2):s._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("div",{staticStyle:{"margin-top":"0.7rem"}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.album.name))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[s._v(s._s(s.props.album.artist))])])])]),a("div",{staticClass:"media-right",staticStyle:{"padding-top":"0.7rem"}},[s._t("actions")],2)])},Na=[],Ra={name:"ListItemAlbum",props:["album","media_kind"]},Ma=Ra,Ua=Object(z["a"])(Ma,Da,Na,!0,null,null,null),Ha=Ua.exports,Wa=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("cover-artwork",{staticClass:"image is-square fd-has-margin-bottom fd-has-shadow",attrs:{artwork_url:t.album.artwork_url,artist:t.album.artist,album:t.album.name}}),a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),"podcast"===t.media_kind_resolved?a("div",{staticClass:"buttons"},[a("a",{staticClass:"button is-small",on:{click:t.mark_played}},[t._v("Mark as played")]),a("a",{staticClass:"button is-small",on:{click:function(s){return t.$emit("remove-podcast")}}},[t._v("Remove podcast")])]):t._e(),a("div",{staticClass:"content is-small"},[t.album.artist?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]):t._e(),t.album.date_released?a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.date_released,"L")))])]):t.album.year>0?a("p",[a("span",{staticClass:"heading"},[t._v("Year")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.year))])]):t._e(),a("p",[a("span",{staticClass:"heading"},[t._v("Tracks")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.track_count))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.album.length_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.media_kind)+" - "+t._s(t.album.data_kind))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Added at")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.time_added,"L LT")))])])])],1),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Ba=[],Fa={name:"ModalDialogAlbum",components:{CoverArtwork:ka},props:["show","album","media_kind","new_tracks"],data(){return{artwork_visible:!1}},computed:{artwork_url:function(){return Q.artwork_url_append_size_params(this.album.artwork_url)},media_kind_resolved:function(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.album.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.album.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.album.uri)},open_album:function(){"podcast"===this.media_kind_resolved?this.$router.push({path:"/podcasts/"+this.album.id}):"audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/"+this.album.id}):this.$router.push({path:"/music/albums/"+this.album.id})},open_artist:function(){"podcast"===this.media_kind_resolved||("audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/artists/"+this.album.artist_id}):this.$router.push({path:"/music/artists/"+this.album.artist_id}))},mark_played:function(){Q.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:t})=>{this.$emit("play_count_changed"),this.$emit("close")})},artwork_loaded:function(){this.artwork_visible=!0},artwork_error:function(){this.artwork_visible=!1}}},Ga=Fa,Ya=Object(z["a"])(Ga,Wa,Ba,!1,null,null,null),Va=Ya.exports,Qa=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[t.title?a("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.title)+" ")]):t._e(),t._t("modal-content")],2),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),t.delete_action?a("a",{staticClass:"card-footer-item has-background-danger has-text-white has-text-weight-bold",on:{click:function(s){return t.$emit("delete")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-delete"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v(t._s(t.delete_action))])]):t._e(),t.ok_action?a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:function(s){return t.$emit("ok")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-check"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v(t._s(t.ok_action))])]):t._e()])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Ja=[],Ka={name:"ModalDialog",props:["show","title","ok_action","delete_action"]},Xa=Ka,Za=Object(z["a"])(Xa,Qa,Ja,!1,null,null,null),te=Za.exports;a("4e82");class se{constructor(t,s={hideSingles:!1,hideSpotify:!1,sort:"Name",group:!1}){this.items=t,this.options=s,this.grouped={},this.sortedAndFiltered=[],this.indexList=[],this.init()}init(){this.createSortedAndFilteredList(),this.createGroupedList(),this.createIndexList()}getAlbumIndex(t){return"Recently added"===this.options.sort?t.time_added.substring(0,4):"Recently released"===this.options.sort?t.date_released?t.date_released.substring(0,4):"0000":t.name_sort.charAt(0).toUpperCase()}isAlbumVisible(t){return!(this.options.hideSingles&&t.track_count<=2)&&(!this.options.hideSpotify||"spotify"!==t.data_kind)}createIndexList(){this.indexList=[...new Set(this.sortedAndFiltered.map(t=>this.getAlbumIndex(t)))]}createSortedAndFilteredList(){var t=this.items;(this.options.hideSingles||this.options.hideSpotify||this.options.hideOther)&&(t=t.filter(t=>this.isAlbumVisible(t))),"Recently added"===this.options.sort?t=[...t].sort((t,s)=>s.time_added.localeCompare(t.time_added)):"Recently released"===this.options.sort&&(t=[...t].sort((t,s)=>t.date_released?s.date_released?s.date_released.localeCompare(t.date_released):-1:1)),this.sortedAndFiltered=t}createGroupedList(){this.options.group||(this.grouped={}),this.grouped=this.sortedAndFiltered.reduce((t,s)=>{const a=this.getAlbumIndex(s);return t[a]=[...t[a]||[],s],t},{})}}var ae={name:"ListAlbums",components:{ListItemAlbum:Ha,ModalDialogAlbum:Va,ModalDialog:te,CoverArtwork:ka},props:["albums","media_kind"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved:function(){return this.media_kind?this.media_kind:this.selected_album.media_kind},albums_list:function(){return Array.isArray(this.albums)?this.albums:this.albums.sortedAndFiltered},is_grouped:function(){return this.albums instanceof se&&this.albums.options.group}},methods:{open_album:function(t){this.selected_album=t,"podcast"===this.media_kind_resolved?this.$router.push({path:"/podcasts/"+t.id}):"audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/"+t.id}):this.$router.push({path:"/music/albums/"+t.id})},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0},open_remove_podcast_dialog:function(){Q.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:t})=>{Q.library_track_playlists(t.items[0].id).then(({data:t})=>{const s=t.items.filter(t=>"rss"===t.type);1===s.length?(this.rss_playlist_to_remove=s[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1):this.$store.dispatch("add_notification",{text:"Podcast cannot be removed. Probably it was not added as an RSS playlist.",type:"danger"})})})},remove_podcast:function(){this.show_remove_podcast_modal=!1,Q.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},ee=ae,ie=Object(z["a"])(ee,Ia,za,!1,null,null,null),le=ie.exports,oe=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t._l(t.tracks,(function(s,e){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(e,s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1}}})],2)},ne=[],re=function(t,s){var a=s._c;return a("div",{staticClass:"media",class:{"with-progress":s.slots().progress},attrs:{id:"index_"+s.props.track.title_sort.charAt(0).toUpperCase()}},[s.slots().icon?a("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("icon")],2):s._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6",class:{"has-text-grey":"podcast"===s.props.track.media_kind&&s.props.track.play_count>0}},[s._v(s._s(s.props.track.title))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[s._v(s._s(s.props.track.artist))])]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[s._v(s._s(s.props.track.album))]),s._t("progress")],2),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},ce=[],de={name:"ListItemTrack",props:["track"]},ue=de,pe=Object(z["a"])(ue,re,ce,!0,null,null,null),_e=pe.exports,me=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.track.title)+" ")]),a("p",{staticClass:"subtitle"},[t._v(" "+t._s(t.track.artist)+" ")]),"podcast"===t.track.media_kind?a("div",{staticClass:"buttons"},[t.track.play_count>0?a("a",{staticClass:"button is-small",on:{click:t.mark_new}},[t._v("Mark as new")]):t._e(),0===t.track.play_count?a("a",{staticClass:"button is-small",on:{click:t.mark_played}},[t._v("Mark as played")]):t._e()]):t._e(),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.track.album))])]),t.track.album_artist&&"audiobook"!==t.track.media_kind?a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.track.album_artist))])]):t._e(),t.track.composer?a("p",[a("span",{staticClass:"heading"},[t._v("Composer")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.composer))])]):t._e(),t.track.date_released?a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.track.date_released,"L")))])]):t.track.year>0?a("p",[a("span",{staticClass:"heading"},[t._v("Year")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.year))])]):t._e(),t.track.genre?a("p",[a("span",{staticClass:"heading"},[t._v("Genre")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.track.genre))])]):t._e(),a("p",[a("span",{staticClass:"heading"},[t._v("Track / Disc")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.track_number)+" / "+t._s(t.track.disc_number))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.track.length_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.path))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.media_kind)+" - "+t._s(t.track.data_kind)+" "),"spotify"===t.track.data_kind?a("span",{staticClass:"has-text-weight-normal"},[t._v("("),a("a",{on:{click:t.open_spotify_artist}},[t._v("artist")]),t._v(", "),a("a",{on:{click:t.open_spotify_album}},[t._v("album")]),t._v(")")]):t._e()])]),a("p",[a("span",{staticClass:"heading"},[t._v("Quality")]),a("span",{staticClass:"title is-6"},[t._v(" "+t._s(t.track.type)+" "),t.track.samplerate?a("span",[t._v(" | "+t._s(t.track.samplerate)+" Hz")]):t._e(),t.track.channels?a("span",[t._v(" | "+t._s(t._f("channels")(t.track.channels)))]):t._e(),t.track.bitrate?a("span",[t._v(" | "+t._s(t.track.bitrate)+" Kb/s")]):t._e()])]),a("p",[a("span",{staticClass:"heading"},[t._v("Added at")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.track.time_added,"L LT")))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Rating")]),a("span",{staticClass:"title is-6"},[t._v(t._s(Math.floor(t.track.rating/10))+" / 10")])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play_track}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},he=[],fe={name:"ModalDialogTrack",props:["show","track"],data(){return{spotify_track:{}}},methods:{play_track:function(){this.$emit("close"),Q.player_play_uri(this.track.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.track.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.track.uri)},open_album:function(){this.$emit("close"),"podcast"===this.track.media_kind?this.$router.push({path:"/podcasts/"+this.track.album_id}):"audiobook"===this.track.media_kind?this.$router.push({path:"/audiobooks/"+this.track.album_id}):this.$router.push({path:"/music/albums/"+this.track.album_id})},open_artist:function(){this.$emit("close"),this.$router.push({path:"/music/artists/"+this.track.album_artist_id})},open_genre:function(){this.$router.push({name:"Genre",params:{genre:this.track.genre}})},open_spotify_artist:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/artists/"+this.spotify_track.artists[0].id})},open_spotify_album:function(){this.$emit("close"),this.$router.push({path:"/music/spotify/albums/"+this.spotify_track.album.id})},mark_new:function(){Q.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play_count_changed"),this.$emit("close")})},mark_played:function(){Q.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play_count_changed"),this.$emit("close")})}},watch:{track(){if(this.track&&"spotify"===this.track.data_kind){const t=new Us.a;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}}},ve=fe,ye=Object(z["a"])(ve,me,he,!1,null,null,null),be=ye.exports,ge={name:"ListTracks",components:{ListItemTrack:_e,ModalDialogTrack:be},props:["tracks","uris","expression"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track:function(t,s){this.uris?Q.player_play_uri(this.uris,!1,t):this.expression?Q.player_play_expression(this.expression,!1,t):Q.player_play_uri(s.uri,!1)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},ke=ge,Ce=Object(z["a"])(ke,oe,ne,!1,null,null,null),we=Ce.exports;const xe={load:function(t){return Promise.all([Q.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3}),Q.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set:function(t,s){t.recently_added=s[0].data.albums,t.recently_played=s[1].data.tracks}};var $e={name:"PageBrowse",mixins:[Sa(xe)],components:{ContentWithHeading:Ts,TabsMusic:Ea,ListAlbums:le,ListTracks:we},data(){return{recently_added:{},recently_played:{},show_track_details_modal:!1,selected_track:{}}},methods:{open_browse:function(t){this.$router.push({path:"/music/browse/"+t})}}},qe=$e,Ae=Object(z["a"])(qe,qa,Aa,!1,null,null,null),Se=Ae.exports,je=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently added")]),a("p",{staticClass:"heading"},[t._v("albums")])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.recently_added.items}})],1)],2)],1)},Pe=[];const Te={load:function(t){return Q.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:50})},set:function(t,s){t.recently_added=s.data.albums}};var Le={name:"PageBrowseType",mixins:[Sa(Te)],components:{ContentWithHeading:Ts,TabsMusic:Ea,ListAlbums:le},data(){return{recently_added:{}}}},Oe=Le,Ee=Object(z["a"])(Oe,je,Pe,!1,null,null,null),Ie=Ee.exports,ze=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Recently played")]),a("p",{staticClass:"heading"},[t._v("tracks")])]),a("template",{slot:"content"},[a("list-tracks",{attrs:{tracks:t.recently_played.items}})],1)],2)],1)},De=[];const Ne={load:function(t){return Q.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set:function(t,s){t.recently_played=s.data.tracks}};var Re={name:"PageBrowseType",mixins:[Sa(Ne)],components:{ContentWithHeading:Ts,TabsMusic:Ea,ListTracks:we},data(){return{recently_played:{}}}},Me=Re,Ue=Object(z["a"])(Me,ze,De,!1,null,null,null),He=Ue.exports,We=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.artists_list.indexList}}),a("div",{staticClass:"columns"},[a("div",{staticClass:"column"},[a("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Filter")]),a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_singles,expression:"hide_singles"}],staticClass:"switch",attrs:{id:"switchHideSingles",type:"checkbox",name:"switchHideSingles"},domProps:{checked:Array.isArray(t.hide_singles)?t._i(t.hide_singles,null)>-1:t.hide_singles},on:{change:function(s){var a=t.hide_singles,e=s.target,i=!!e.checked;if(Array.isArray(a)){var l=null,o=t._i(a,l);e.checked?o<0&&(t.hide_singles=a.concat([l])):o>-1&&(t.hide_singles=a.slice(0,o).concat(a.slice(o+1)))}else t.hide_singles=i}}}),a("label",{attrs:{for:"switchHideSingles"}},[t._v("Hide singles")])]),a("p",{staticClass:"help"},[t._v("If active, hides artists that only appear on singles or playlists.")])]),t.spotify_enabled?a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_spotify,expression:"hide_spotify"}],staticClass:"switch",attrs:{id:"switchHideSpotify",type:"checkbox",name:"switchHideSpotify"},domProps:{checked:Array.isArray(t.hide_spotify)?t._i(t.hide_spotify,null)>-1:t.hide_spotify},on:{change:function(s){var a=t.hide_spotify,e=s.target,i=!!e.checked;if(Array.isArray(a)){var l=null,o=t._i(a,l);e.checked?o<0&&(t.hide_spotify=a.concat([l])):o>-1&&(t.hide_spotify=a.slice(0,o).concat(a.slice(o+1)))}else t.hide_spotify=i}}}),a("label",{attrs:{for:"switchHideSpotify"}},[t._v("Hide artists from Spotify")])]),a("p",{staticClass:"help"},[t._v("If active, hides artists that only appear in your Spotify library.")])]):t._e()]),a("div",{staticClass:"column"},[a("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Sort by")]),a("dropdown-menu",{attrs:{options:t.sort_options},model:{value:t.sort,callback:function(s){t.sort=s},expression:"sort"}})],1)])],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Artists")]),a("p",{staticClass:"heading"},[t._v(t._s(t.artists_list.sortedAndFiltered.length)+" Artists")])]),a("template",{slot:"heading-right"}),a("template",{slot:"content"},[a("list-artists",{attrs:{artists:t.artists_list}})],1)],2)],1)},Be=[],Fe=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",[a("nav",{staticClass:"buttons is-centered fd-is-square",staticStyle:{"margin-bottom":"16px"}},t._l(t.filtered_index,(function(s){return a("a",{key:s,staticClass:"button is-small",on:{click:function(a){return t.nav(s)}}},[t._v(t._s(s))])})),0)])},Ge=[],Ye={name:"IndexButtonList",props:["index"],computed:{filtered_index(){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~";return this.index.filter(s=>!t.includes(s))}},methods:{nav:function(t){this.$router.push({path:this.$router.currentRoute.path+"#index_"+t})},scroll_to_top:function(){window.scrollTo({top:0,behavior:"smooth"})}}},Ve=Ye,Qe=Object(z["a"])(Ve,Fe,Ge,!1,null,null,null),Je=Qe.exports,Ke=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t.is_grouped?a("div",t._l(t.artists.indexList,(function(s){return a("div",{key:s,staticClass:"mb-6"},[a("span",{staticClass:"tag is-info is-light is-small has-text-weight-bold",attrs:{id:"index_"+s}},[t._v(t._s(s))]),t._l(t.artists.grouped[s],(function(s){return a("list-item-artist",{key:s.id,attrs:{artist:s},on:{click:function(a){return t.open_artist(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)}))],2)})),0):a("div",t._l(t.artists_list,(function(s){return a("list-item-artist",{key:s.id,attrs:{artist:s},on:{click:function(a){return t.open_artist(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),1),a("modal-dialog-artist",{attrs:{show:t.show_details_modal,artist:t.selected_artist,media_kind:t.media_kind},on:{close:function(s){t.show_details_modal=!1}}})],1)},Xe=[],Ze=function(t,s){var a=s._c;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.artist.name))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},ti=[],si={name:"ListItemArtist",props:["artist"]},ai=si,ei=Object(z["a"])(ai,Ze,ti,!0,null,null,null),ii=ei.exports,li=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Albums")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.album_count))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Tracks")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.track_count))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.data_kind))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Added at")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.artist.time_added,"L LT")))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},oi=[],ni={name:"ModalDialogArtist",props:["show","artist"],methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.artist.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.artist.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.artist.uri)},open_artist:function(){this.$emit("close"),this.$router.push({path:"/music/artists/"+this.artist.id})}}},ri=ni,ci=Object(z["a"])(ri,li,oi,!1,null,null,null),di=ci.exports;class ui{constructor(t,s={hideSingles:!1,hideSpotify:!1,sort:"Name",group:!1}){this.items=t,this.options=s,this.grouped={},this.sortedAndFiltered=[],this.indexList=[],this.init()}init(){this.createSortedAndFilteredList(),this.createGroupedList(),this.createIndexList()}getArtistIndex(t){return"Name"===this.options.sort?t.name_sort.charAt(0).toUpperCase():t.time_added.substring(0,4)}isArtistVisible(t){return!(this.options.hideSingles&&t.track_count<=2*t.album_count)&&(!this.options.hideSpotify||"spotify"!==t.data_kind)}createIndexList(){this.indexList=[...new Set(this.sortedAndFiltered.map(t=>this.getArtistIndex(t)))]}createSortedAndFilteredList(){var t=this.items;(this.options.hideSingles||this.options.hideSpotify||this.options.hideOther)&&(t=t.filter(t=>this.isArtistVisible(t))),"Recently added"===this.options.sort&&(t=[...t].sort((t,s)=>s.time_added.localeCompare(t.time_added))),this.sortedAndFiltered=t}createGroupedList(){this.options.group||(this.grouped={}),this.grouped=this.sortedAndFiltered.reduce((t,s)=>{const a=this.getArtistIndex(s);return t[a]=[...t[a]||[],s],t},{})}}var pi={name:"ListArtists",components:{ListItemArtist:ii,ModalDialogArtist:di},props:["artists","media_kind"],data(){return{show_details_modal:!1,selected_artist:{}}},computed:{media_kind_resolved:function(){return this.media_kind?this.media_kind:this.selected_artist.media_kind},artists_list:function(){return Array.isArray(this.artists)?this.artists:this.artists.sortedAndFiltered},is_grouped:function(){return this.artists instanceof ui&&this.artists.options.group}},methods:{open_artist:function(t){this.selected_artist=t,"podcast"===this.media_kind_resolved||("audiobook"===this.media_kind_resolved?this.$router.push({path:"/audiobooks/artists/"+t.id}):this.$router.push({path:"/music/artists/"+t.id}))},open_dialog:function(t){this.selected_artist=t,this.show_details_modal=!0}}},_i=pi,mi=Object(z["a"])(_i,Ke,Xe,!1,null,null,null),hi=mi.exports,fi=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onClickOutside,expression:"onClickOutside"}],staticClass:"dropdown",class:{"is-active":t.is_active}},[a("div",{staticClass:"dropdown-trigger"},[a("button",{staticClass:"button",attrs:{"aria-haspopup":"true","aria-controls":"dropdown-menu"},on:{click:function(s){t.is_active=!t.is_active}}},[a("span",[t._v(t._s(t.value))]),t._m(0)])]),a("div",{staticClass:"dropdown-menu",attrs:{id:"dropdown-menu",role:"menu"}},[a("div",{staticClass:"dropdown-content"},t._l(t.options,(function(s){return a("a",{key:s,staticClass:"dropdown-item",class:{"is-active":t.value===s},on:{click:function(a){return t.select(s)}}},[t._v(" "+t._s(s)+" ")])})),0)])])},vi=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-chevron-down",attrs:{"aria-hidden":"true"}})])}],yi={name:"DropdownMenu",props:["value","options"],data(){return{is_active:!1}},methods:{onClickOutside(t){this.is_active=!1},select(t){this.is_active=!1,this.$emit("input",t)}}},bi=yi,gi=Object(z["a"])(bi,fi,vi,!1,null,null,null),ki=gi.exports;const Ci={load:function(t){return Q.library_artists("music")},set:function(t,s){t.artists=s.data}};var wi={name:"PageArtists",mixins:[Sa(Ci)],components:{ContentWithHeading:Ts,TabsMusic:Ea,IndexButtonList:Je,ListArtists:hi,DropdownMenu:ki},data(){return{artists:{items:[]},sort_options:["Name","Recently added"]}},computed:{artists_list(){return new ui(this.artists.items,{hideSingles:this.hide_singles,hideSpotify:this.hide_spotify,sort:this.sort,group:!0})},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(t){this.$store.commit(A,t)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(t){this.$store.commit(S,t)}},sort:{get(){return this.$store.state.artists_sort},set(t){this.$store.commit(j,t)}}},methods:{scrollToTop:function(){window.scrollTo({top:0,behavior:"smooth"})}}},xi=wi,$i=Object(z["a"])(xi,We,Be,!1,null,null,null),qi=$i.exports,Ai=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.artist.album_count)+" albums | "),a("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v(t._s(t.artist.track_count)+" tracks")])]),a("list-albums",{attrs:{albums:t.albums.items}}),a("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],1)],2)},Si=[];const ji={load:function(t){return Promise.all([Q.library_artist(t.params.artist_id),Q.library_artist_albums(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.albums=s[1].data}};var Pi={name:"PageArtist",mixins:[Sa(ji)],components:{ContentWithHeading:Ts,ListAlbums:le,ModalDialogArtist:di},data(){return{artist:{},albums:{},show_artist_details_modal:!1}},methods:{open_tracks:function(){this.$router.push({path:"/music/artists/"+this.artist.id+"/tracks"})},play:function(){Q.player_play_uri(this.albums.items.map(t=>t.uri).join(","),!0)}}},Ti=Pi,Li=Object(z["a"])(Ti,Ai,Si,!1,null,null,null),Oi=Li.exports,Ei=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.albums_list.indexList}}),a("div",{staticClass:"columns"},[a("div",{staticClass:"column"},[a("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Filter")]),a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_singles,expression:"hide_singles"}],staticClass:"switch",attrs:{id:"switchHideSingles",type:"checkbox",name:"switchHideSingles"},domProps:{checked:Array.isArray(t.hide_singles)?t._i(t.hide_singles,null)>-1:t.hide_singles},on:{change:function(s){var a=t.hide_singles,e=s.target,i=!!e.checked;if(Array.isArray(a)){var l=null,o=t._i(a,l);e.checked?o<0&&(t.hide_singles=a.concat([l])):o>-1&&(t.hide_singles=a.slice(0,o).concat(a.slice(o+1)))}else t.hide_singles=i}}}),a("label",{attrs:{for:"switchHideSingles"}},[t._v("Hide singles")])]),a("p",{staticClass:"help"},[t._v("If active, hides singles and albums with tracks that only appear in playlists.")])]),t.spotify_enabled?a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hide_spotify,expression:"hide_spotify"}],staticClass:"switch",attrs:{id:"switchHideSpotify",type:"checkbox",name:"switchHideSpotify"},domProps:{checked:Array.isArray(t.hide_spotify)?t._i(t.hide_spotify,null)>-1:t.hide_spotify},on:{change:function(s){var a=t.hide_spotify,e=s.target,i=!!e.checked;if(Array.isArray(a)){var l=null,o=t._i(a,l);e.checked?o<0&&(t.hide_spotify=a.concat([l])):o>-1&&(t.hide_spotify=a.slice(0,o).concat(a.slice(o+1)))}else t.hide_spotify=i}}}),a("label",{attrs:{for:"switchHideSpotify"}},[t._v("Hide albums from Spotify")])]),a("p",{staticClass:"help"},[t._v("If active, hides albums that only appear in your Spotify library.")])]):t._e()]),a("div",{staticClass:"column"},[a("p",{staticClass:"heading",staticStyle:{"margin-bottom":"24px"}},[t._v("Sort by")]),a("dropdown-menu",{attrs:{options:t.sort_options},model:{value:t.sort,callback:function(s){t.sort=s},expression:"sort"}})],1)])],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Albums")]),a("p",{staticClass:"heading"},[t._v(t._s(t.albums_list.sortedAndFiltered.length)+" Albums")])]),a("template",{slot:"heading-right"}),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.albums_list}})],1)],2)],1)},Ii=[];const zi={load:function(t){return Q.library_albums("music")},set:function(t,s){t.albums=s.data,t.index_list=[...new Set(t.albums.items.filter(s=>!t.$store.state.hide_singles||s.track_count>2).map(t=>t.name_sort.charAt(0).toUpperCase()))]}};var Di={name:"PageAlbums",mixins:[Sa(zi)],components:{ContentWithHeading:Ts,TabsMusic:Ea,IndexButtonList:Je,ListAlbums:le,DropdownMenu:ki},data(){return{albums:{items:[]},sort_options:["Name","Recently added","Recently released"]}},computed:{albums_list(){return new se(this.albums.items,{hideSingles:this.hide_singles,hideSpotify:this.hide_spotify,sort:this.sort,group:!0})},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(t){this.$store.commit(A,t)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(t){this.$store.commit(S,t)}},sort:{get(){return this.$store.state.albums_sort},set(t){this.$store.commit(P,t)}}},methods:{scrollToTop:function(){window.scrollTo({top:0,behavior:"smooth"})}}},Ni=Di,Ri=Object(z["a"])(Ni,Ei,Ii,!1,null,null,null),Mi=Ri.exports,Ui=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-hero",[a("template",{slot:"heading-left"},[a("h1",{staticClass:"title is-5"},[t._v(t._s(t.album.name))]),a("h2",{staticClass:"subtitle is-6 has-text-link has-text-weight-normal"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]),a("div",{staticClass:"buttons fd-is-centered-mobile fd-has-margin-top"},[a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])]),a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])])])]),a("template",{slot:"heading-right"},[a("p",{staticClass:"image is-square fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.album.artwork_url,artist:t.album.artist,album:t.album.name},on:{click:function(s){t.show_album_details_modal=!0}}})],1)]),a("template",{slot:"content"},[a("p",{staticClass:"heading is-7 has-text-centered-mobile fd-has-margin-top"},[t._v(t._s(t.album.track_count)+" tracks")]),a("list-tracks",{attrs:{tracks:t.tracks,uris:t.album.uri}}),a("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album},on:{close:function(s){t.show_album_details_modal=!1}}})],1)],2)},Hi=[],Wi=a("fd4d");const Bi={load:function(t){return Promise.all([Q.library_album(t.params.album_id),Q.library_album_tracks(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.items}};var Fi={name:"PageAlbum",mixins:[Sa(Bi)],components:{ContentWithHero:Wi["default"],ListTracks:we,ModalDialogAlbum:Va,CoverArtwork:ka},data(){return{album:{},tracks:[],show_album_details_modal:!1}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/music/artists/"+this.album.artist_id})},play:function(){Q.player_play_uri(this.album.uri,!0)}}},Gi=Fi,Yi=Object(z["a"])(Gi,Ui,Hi,!1,null,null,null),Vi=Yi.exports,Qi=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Genres")]),a("p",{staticClass:"heading"},[t._v(t._s(t.genres.total)+" genres")])]),a("template",{slot:"content"},[t._l(t.genres.items,(function(s){return a("list-item-genre",{key:s.name,attrs:{genre:s},on:{click:function(a){return t.open_genre(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("modal-dialog-genre",{attrs:{show:t.show_details_modal,genre:t.selected_genre},on:{close:function(s){t.show_details_modal=!1}}})],2)],2)],1)},Ji=[],Ki=function(t,s){var a=s._c;return a("div",{staticClass:"media",attrs:{id:"index_"+s.props.genre.name.charAt(0).toUpperCase()}},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.genre.name))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},Xi=[],Zi={name:"ListItemGenre",props:["genre"]},tl=Zi,sl=Object(z["a"])(tl,Ki,Xi,!0,null,null,null),al=sl.exports,el=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_genre}},[t._v(t._s(t.genre.name))])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},il=[],ll={name:"ModalDialogGenre",props:["show","genre"],methods:{play:function(){this.$emit("close"),Q.player_play_expression('genre is "'+this.genre.name+'" and media_kind is music',!1)},queue_add:function(){this.$emit("close"),Q.queue_expression_add('genre is "'+this.genre.name+'" and media_kind is music')},queue_add_next:function(){this.$emit("close"),Q.queue_expression_add_next('genre is "'+this.genre.name+'" and media_kind is music')},open_genre:function(){this.$emit("close"),this.$router.push({name:"Genre",params:{genre:this.genre.name}})}}},ol=ll,nl=Object(z["a"])(ol,el,il,!1,null,null,null),rl=nl.exports;const cl={load:function(t){return Q.library_genres()},set:function(t,s){t.genres=s.data}};var dl={name:"PageGenres",mixins:[Sa(cl)],components:{ContentWithHeading:Ts,TabsMusic:Ea,IndexButtonList:Je,ListItemGenre:al,ModalDialogGenre:rl},data(){return{genres:{items:[]},show_details_modal:!1,selected_genre:{}}},computed:{index_list(){return[...new Set(this.genres.items.map(t=>t.name.charAt(0).toUpperCase()))]}},methods:{open_genre:function(t){this.$router.push({name:"Genre",params:{genre:t.name}})},open_dialog:function(t){this.selected_genre=t,this.show_details_modal=!0}}},ul=dl,pl=Object(z["a"])(ul,Qi,Ji,!1,null,null,null),_l=pl.exports,ml=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_genre_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.genre_albums.total)+" albums | "),a("a",{staticClass:"has-text-link",on:{click:t.open_tracks}},[t._v("tracks")])]),a("list-albums",{attrs:{albums:t.genre_albums.items}}),a("modal-dialog-genre",{attrs:{show:t.show_genre_details_modal,genre:{name:t.name}},on:{close:function(s){t.show_genre_details_modal=!1}}})],1)],2)],1)},hl=[];const fl={load:function(t){return Q.library_genre(t.params.genre)},set:function(t,s){t.name=t.$route.params.genre,t.genre_albums=s.data.albums}};var vl={name:"PageGenre",mixins:[Sa(fl)],components:{ContentWithHeading:Ts,IndexButtonList:Je,ListAlbums:le,ModalDialogGenre:rl},data(){return{name:"",genre_albums:{items:[]},show_genre_details_modal:!1}},computed:{index_list(){return[...new Set(this.genre_albums.items.map(t=>t.name.charAt(0).toUpperCase()))]}},methods:{open_tracks:function(){this.show_details_modal=!1,this.$router.push({name:"GenreTracks",params:{genre:this.name}})},play:function(){Q.player_play_expression('genre is "'+this.name+'" and media_kind is music',!0)},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0}}},yl=vl,bl=Object(z["a"])(yl,ml,hl,!1,null,null,null),gl=bl.exports,kl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.genre))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_genre_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[a("a",{staticClass:"has-text-link",on:{click:t.open_genre}},[t._v("albums")]),t._v(" | "+t._s(t.tracks.total)+" tracks")]),a("list-tracks",{attrs:{tracks:t.tracks.items,expression:t.expression}}),a("modal-dialog-genre",{attrs:{show:t.show_genre_details_modal,genre:{name:t.genre}},on:{close:function(s){t.show_genre_details_modal=!1}}})],1)],2)],1)},Cl=[];const wl={load:function(t){return Q.library_genre_tracks(t.params.genre)},set:function(t,s){t.genre=t.$route.params.genre,t.tracks=s.data.tracks}};var xl={name:"PageGenreTracks",mixins:[Sa(wl)],components:{ContentWithHeading:Ts,ListTracks:we,IndexButtonList:Je,ModalDialogGenre:rl},data(){return{tracks:{items:[]},genre:"",show_genre_details_modal:!1}},computed:{index_list(){return[...new Set(this.tracks.items.map(t=>t.title_sort.charAt(0).toUpperCase()))]},expression(){return'genre is "'+this.genre+'" and media_kind is music'}},methods:{open_genre:function(){this.show_details_modal=!1,this.$router.push({name:"Genre",params:{genre:this.genre}})},play:function(){Q.player_play_expression(this.expression,!0)}}},$l=xl,ql=Object(z["a"])($l,kl,Cl,!1,null,null,null),Al=ql.exports,Sl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.index_list}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.album_count)+" albums")]),t._v(" | "+t._s(t.artist.track_count)+" tracks")]),a("list-tracks",{attrs:{tracks:t.tracks.items,uris:t.track_uris}}),a("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],1)],2)],1)},jl=[];const Pl={load:function(t){return Promise.all([Q.library_artist(t.params.artist_id),Q.library_artist_tracks(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.tracks=s[1].data.tracks}};var Tl={name:"PageArtistTracks",mixins:[Sa(Pl)],components:{ContentWithHeading:Ts,ListTracks:we,IndexButtonList:Je,ModalDialogArtist:di},data(){return{artist:{},tracks:{items:[]},show_artist_details_modal:!1}},computed:{index_list(){return[...new Set(this.tracks.items.map(t=>t.title_sort.charAt(0).toUpperCase()))]},track_uris(){return this.tracks.items.map(t=>t.uri).join(",")}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/music/artists/"+this.artist.id})},play:function(){Q.player_play_uri(this.tracks.items.map(t=>t.uri).join(","),!0)}}},Ll=Tl,Ol=Object(z["a"])(Ll,Sl,jl,!1,null,null,null),El=Ol.exports,Il=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t.new_episodes.items.length>0?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("New episodes")])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small",on:{click:t.mark_all_played}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-pencil"})]),a("span",[t._v("Mark All Played")])])])]),a("template",{slot:"content"},[t._l(t.new_episodes.items,(function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"progress"},[a("range-slider",{staticClass:"track-progress",attrs:{min:"0",max:s.length_ms,step:"1",disabled:!0,value:s.seek_ms}})],1),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track},on:{close:function(s){t.show_track_details_modal=!1},play_count_changed:t.reload_new_episodes}})],2)],2):t._e(),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Podcasts")]),a("p",{staticClass:"heading"},[t._v(t._s(t.albums.total)+" podcasts")])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small",on:{click:t.open_add_podcast_dialog}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-rss"})]),a("span",[t._v("Add Podcast")])])])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.albums.items},on:{play_count_changed:function(s){return t.reload_new_episodes()},"podcast-deleted":function(s){return t.reload_podcasts()}}}),a("modal-dialog-add-rss",{attrs:{show:t.show_url_modal},on:{close:function(s){t.show_url_modal=!1},podcast_added:function(s){return t.reload_podcasts()}}})],1)],2)],1)},zl=[],Dl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v("Add Podcast RSS feed URL")]),a("form",{on:{submit:function(s){return s.preventDefault(),t.add_stream(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.url,expression:"url"}],ref:"url_field",staticClass:"input is-shadowless",attrs:{type:"text",placeholder:"http://url-to-rss",disabled:t.loading},domProps:{value:t.url},on:{input:function(s){s.target.composing||(t.url=s.target.value)}}}),a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-rss"})])]),a("p",{staticClass:"help"},[t._v("Adding a podcast includes creating an RSS playlist, that will allow forked-daapd to manage the podcast subscription. ")])])])]),t.loading?a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item button is-loading"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-web"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Processing ...")])])]):a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-danger",on:{click:function(s){return t.$emit("close")}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-cancel"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Cancel")])]),a("a",{staticClass:"card-footer-item has-background-info has-text-white has-text-weight-bold",on:{click:t.add_stream}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Nl=[],Rl={name:"ModalDialogAddRss",props:["show"],data(){return{url:"",loading:!1}},methods:{add_stream:function(){this.loading=!0,Q.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast_added"),this.url=""}).catch(()=>{this.loading=!1})}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}}},Ml=Rl,Ul=Object(z["a"])(Ml,Dl,Nl,!1,null,null,null),Hl=Ul.exports;const Wl={load:function(t){return Promise.all([Q.library_albums("podcast"),Q.library_podcasts_new_episodes()])},set:function(t,s){t.albums=s[0].data,t.new_episodes=s[1].data.tracks}};var Bl={name:"PagePodcasts",mixins:[Sa(Wl)],components:{ContentWithHeading:Ts,ListItemTrack:_e,ListAlbums:le,ModalDialogTrack:be,ModalDialogAddRss:Hl,RangeSlider:tt.a},data(){return{albums:{},new_episodes:{items:[]},show_url_modal:!1,show_track_details_modal:!1,selected_track:{}}},methods:{play_track:function(t){Q.player_play_uri(t.uri,!1)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},mark_all_played:function(){this.new_episodes.items.forEach(t=>{Q.library_track_update(t.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog:function(t){this.show_url_modal=!0},reload_new_episodes:function(){Q.library_podcasts_new_episodes().then(({data:t})=>{this.new_episodes=t.tracks})},reload_podcasts:function(){Q.library_albums("podcast").then(({data:t})=>{this.albums=t,this.reload_new_episodes()})}}},Fl=Bl,Gl=Object(z["a"])(Fl,Il,zl,!1,null,null,null),Yl=Gl.exports,Vl=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.album.name)+" ")])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),a("span",[t._v("Play")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.album.track_count)+" tracks")]),t._l(t.tracks,(function(s){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(a){return t.play_track(s)}}},[a("template",{slot:"progress"},[a("range-slider",{staticClass:"track-progress",attrs:{min:"0",max:s.length_ms,step:"1",disabled:!0,value:s.seek_ms}})],1),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("modal-dialog-track",{attrs:{show:t.show_details_modal,track:t.selected_track},on:{close:function(s){t.show_details_modal=!1},play_count_changed:t.reload_tracks}}),a("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album,media_kind:"podcast",new_tracks:t.new_tracks},on:{close:function(s){t.show_album_details_modal=!1},play_count_changed:t.reload_tracks,remove_podcast:t.open_remove_podcast_dialog}}),a("modal-dialog",{attrs:{show:t.show_remove_podcast_modal,title:"Remove podcast",delete_action:"Remove"},on:{close:function(s){t.show_remove_podcast_modal=!1},delete:t.remove_podcast}},[a("template",{slot:"modal-content"},[a("p",[t._v("Permanently remove this podcast from your library?")]),a("p",{staticClass:"is-size-7"},[t._v("(This will also remove the RSS playlist "),a("b",[t._v(t._s(t.rss_playlist_to_remove.name))]),t._v(".)")])])],2)],2)],2)},Ql=[];const Jl={load:function(t){return Promise.all([Q.library_album(t.params.album_id),Q.library_podcast_episodes(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.tracks.items}};var Kl={name:"PagePodcast",mixins:[Sa(Jl)],components:{ContentWithHeading:Ts,ListItemTrack:_e,ModalDialogTrack:be,RangeSlider:tt.a,ModalDialogAlbum:Va,ModalDialog:te},data(){return{album:{},tracks:[],show_details_modal:!1,selected_track:{},show_album_details_modal:!1,show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{new_tracks(){return this.tracks.filter(t=>0===t.play_count).length}},methods:{play:function(){Q.player_play_uri(this.album.uri,!1)},play_track:function(t){Q.player_play_uri(t.uri,!1)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0},open_remove_podcast_dialog:function(){this.show_album_details_modal=!1,Q.library_track_playlists(this.tracks[0].id).then(({data:t})=>{const s=t.items.filter(t=>"rss"===t.type);1===s.length?(this.rss_playlist_to_remove=s[0],this.show_remove_podcast_modal=!0):this.$store.dispatch("add_notification",{text:"Podcast cannot be removed. Probably it was not added as an RSS playlist.",type:"danger"})})},remove_podcast:function(){this.show_remove_podcast_modal=!1,Q.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({path:"/podcasts"})})},reload_tracks:function(){Q.library_podcast_episodes(this.album.id).then(({data:t})=>{this.tracks=t.tracks.items})}}},Xl=Kl,Zl=Object(z["a"])(Xl,Vl,Ql,!1,null,null,null),to=Zl.exports,so=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-audiobooks"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.albums_list.indexList}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Audiobooks")]),a("p",{staticClass:"heading"},[t._v(t._s(t.albums_list.sortedAndFiltered.length)+" Audiobooks")])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.albums_list}})],1)],2)],1)},ao=[],eo=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"section fd-tabs-section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"tabs is-centered is-small"},[a("ul",[a("router-link",{attrs:{tag:"li",to:"/audiobooks/artists","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-artist"})]),a("span",{},[t._v("Authors")])])]),a("router-link",{attrs:{tag:"li",to:"/audiobooks/albums","active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-album"})]),a("span",{},[t._v("Audiobooks")])])])],1)])])])])])},io=[],lo={name:"TabsAudiobooks"},oo=lo,no=Object(z["a"])(oo,eo,io,!1,null,null,null),ro=no.exports;const co={load:function(t){return Q.library_albums("audiobook")},set:function(t,s){t.albums=s.data}};var uo={name:"PageAudiobooksAlbums",mixins:[Sa(co)],components:{TabsAudiobooks:ro,ContentWithHeading:Ts,IndexButtonList:Je,ListAlbums:le},data(){return{albums:{items:[]}}},computed:{albums_list(){return new se(this.albums.items,{sort:"Name",group:!0})}},methods:{}},po=uo,_o=Object(z["a"])(po,so,ao,!1,null,null,null),mo=_o.exports,ho=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-audiobooks"),a("content-with-heading",[a("template",{slot:"options"},[a("index-button-list",{attrs:{index:t.artists_list.indexList}})],1),a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Authors")]),a("p",{staticClass:"heading"},[t._v(t._s(t.artists_list.sortedAndFiltered.length)+" Authors")])]),a("template",{slot:"heading-right"}),a("template",{slot:"content"},[a("list-artists",{attrs:{artists:t.artists_list}})],1)],2)],1)},fo=[];const vo={load:function(t){return Q.library_artists("audiobook")},set:function(t,s){t.artists=s.data}};var yo={name:"PageAudiobooksArtists",mixins:[Sa(vo)],components:{ContentWithHeading:Ts,TabsAudiobooks:ro,IndexButtonList:Je,ListArtists:hi},data(){return{artists:{items:[]}}},computed:{artists_list(){return new ui(this.artists.items,{sort:"Name",group:!0})}},methods:{}},bo=yo,go=Object(z["a"])(bo,ho,fo,!1,null,null,null),ko=go.exports,Co=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.artist.album_count)+" albums")]),a("list-albums",{attrs:{albums:t.albums.items}}),a("modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],1)],2)},wo=[];const xo={load:function(t){return Promise.all([Q.library_artist(t.params.artist_id),Q.library_artist_albums(t.params.artist_id)])},set:function(t,s){t.artist=s[0].data,t.albums=s[1].data}};var $o={name:"PageAudiobooksArtist",mixins:[Sa(xo)],components:{ContentWithHeading:Ts,ListAlbums:le,ModalDialogArtist:di},data(){return{artist:{},albums:{},show_artist_details_modal:!1}},methods:{play:function(){Q.player_play_uri(this.albums.items.map(t=>t.uri).join(","),!1)}}},qo=$o,Ao=Object(z["a"])(qo,Co,wo,!1,null,null,null),So=Ao.exports,jo=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-hero",[a("template",{slot:"heading-left"},[a("h1",{staticClass:"title is-5"},[t._v(t._s(t.album.name))]),a("h2",{staticClass:"subtitle is-6 has-text-link has-text-weight-normal"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artist))])]),a("div",{staticClass:"buttons fd-is-centered-mobile fd-has-margin-top"},[a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",[t._v("Play")])]),a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])])])]),a("template",{slot:"heading-right"},[a("p",{staticClass:"image is-square fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.album.artwork_url,artist:t.album.artist,album:t.album.name},on:{click:function(s){t.show_album_details_modal=!0}}})],1)]),a("template",{slot:"content"},[a("p",{staticClass:"heading is-7 has-text-centered-mobile fd-has-margin-top"},[t._v(t._s(t.album.track_count)+" tracks")]),a("list-tracks",{attrs:{tracks:t.tracks,uris:t.album.uri}}),a("modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album,media_kind:"audiobook"},on:{close:function(s){t.show_album_details_modal=!1}}})],1)],2)},Po=[];const To={load:function(t){return Promise.all([Q.library_album(t.params.album_id),Q.library_album_tracks(t.params.album_id)])},set:function(t,s){t.album=s[0].data,t.tracks=s[1].data.items}};var Lo={name:"PageAudiobooksAlbum",mixins:[Sa(To)],components:{ContentWithHero:Wi["default"],ListTracks:we,ModalDialogAlbum:Va,CoverArtwork:ka},data(){return{album:{},tracks:[],show_album_details_modal:!1}},methods:{open_artist:function(){this.show_details_modal=!1,this.$router.push({path:"/audiobooks/artists/"+this.album.artist_id})},play:function(){Q.player_play_uri(this.album.uri,!1)},play_track:function(t){Q.player_play_uri(this.album.uri,!1,t)},open_dialog:function(t){this.selected_track=t,this.show_details_modal=!0}}},Oo=Lo,Eo=Object(z["a"])(Oo,jo,Po,!1,null,null,null),Io=Eo.exports,zo=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))]),a("p",{staticClass:"heading"},[t._v(t._s(t.playlists.total)+" playlists")])]),a("template",{slot:"content"},[a("list-playlists",{attrs:{playlists:t.playlists.items}})],1)],2)},Do=[],No=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[t._l(t.playlists,(function(s){return a("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(a){return t.open_playlist(s)}}},[a("template",{slot:"icon"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:{"mdi-library-music":"folder"!==s.type,"mdi-rss":"rss"===s.type,"mdi-folder":"folder"===s.type}})])]),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("modal-dialog-playlist",{attrs:{show:t.show_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_details_modal=!1}}})],2)},Ro=[],Mo=function(t,s){var a=s._c;return a("div",{staticClass:"media"},[s.slots().icon?a("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("icon")],2):s._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.playlist.name))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},Uo=[],Ho={name:"ListItemPlaylist",props:["playlist"]},Wo=Ho,Bo=Object(z["a"])(Wo,Mo,Uo,!0,null,null,null),Fo=Bo.exports,Go=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_playlist}},[t._v(t._s(t.playlist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.path))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.type))])])])]),t.playlist.folder?t._e():a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Yo=[],Vo={name:"ModalDialogPlaylist",props:["show","playlist","tracks"],methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.playlist.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.playlist.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.playlist.uri)},open_playlist:function(){this.$emit("close"),this.$router.push({path:"/playlists/"+this.playlist.id+"/tracks"})}}},Qo=Vo,Jo=Object(z["a"])(Qo,Go,Yo,!1,null,null,null),Ko=Jo.exports,Xo={name:"ListPlaylists",components:{ListItemPlaylist:Fo,ModalDialogPlaylist:Ko},props:["playlists"],data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist:function(t){"folder"!==t.type?this.$router.push({path:"/playlists/"+t.id+"/tracks"}):this.$router.push({path:"/playlists/"+t.id})},open_dialog:function(t){this.selected_playlist=t,this.show_details_modal=!0}}},Zo=Xo,tn=Object(z["a"])(Zo,No,Ro,!1,null,null,null),sn=tn.exports;const an={load:function(t){return Promise.all([Q.library_playlist(t.params.playlist_id),Q.library_playlist_folder(t.params.playlist_id)])},set:function(t,s){t.playlist=s[0].data,t.playlists=s[1].data}};var en={name:"PagePlaylists",mixins:[Sa(an)],components:{ContentWithHeading:Ts,ListPlaylists:sn},data(){return{playlist:{},playlists:{}}}},ln=en,on=Object(z["a"])(ln,zo,Do,!1,null,null,null),nn=on.exports,rn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_playlist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.tracks.length)+" tracks")]),a("list-tracks",{attrs:{tracks:t.tracks,uris:t.uris}}),a("modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.playlist,tracks:t.playlist.random?t.tracks:void 0},on:{close:function(s){t.show_playlist_details_modal=!1}}})],1)],2)},cn=[];const dn={load:function(t){return Promise.all([Q.library_playlist(t.params.playlist_id),Q.library_playlist_tracks(t.params.playlist_id)])},set:function(t,s){t.playlist=s[0].data,t.tracks=s[1].data.items}};var un={name:"PagePlaylist",mixins:[Sa(dn)],components:{ContentWithHeading:Ts,ListTracks:we,ModalDialogPlaylist:Ko},data(){return{playlist:{},tracks:[],show_playlist_details_modal:!1}},computed:{uris(){return this.playlist.random?this.tracks.map(t=>t.uri).join(","):this.playlist.uri}},methods:{play:function(){Q.player_play_uri(this.uris,!0)}}},pn=un,_n=Object(z["a"])(pn,rn,cn,!1,null,null,null),mn=_n.exports,hn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Files")]),a("p",{staticClass:"title is-7 has-text-grey"},[t._v(t._s(t.current_directory))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){return t.open_directory_dialog({path:t.current_directory})}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",[t._v("Play")])])])]),a("template",{slot:"content"},[t.$route.query.directory?a("div",{staticClass:"media",on:{click:function(s){return t.open_parent_directory()}}},[a("figure",{staticClass:"media-left fd-has-action"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-subdirectory-arrow-left"})])]),a("div",{staticClass:"media-content fd-has-action is-clipped"},[a("h1",{staticClass:"title is-6"},[t._v("..")])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)]):t._e(),t._l(t.files.directories,(function(s){return a("list-item-directory",{key:s.path,attrs:{directory:s},on:{click:function(a){return t.open_directory(s)}}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_directory_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t._l(t.files.playlists.items,(function(s){return a("list-item-playlist",{key:s.id,attrs:{playlist:s},on:{click:function(a){return t.open_playlist(s)}}},[a("template",{slot:"icon"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-library-music"})])]),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t._l(t.files.tracks.items,(function(s,e){return a("list-item-track",{key:s.id,attrs:{track:s},on:{click:function(s){return t.play_track(e)}}},[a("template",{slot:"icon"},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-file-outline"})])]),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("modal-dialog-directory",{attrs:{show:t.show_directory_details_modal,directory:t.selected_directory},on:{close:function(s){t.show_directory_details_modal=!1}}}),a("modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}}),a("modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track},on:{close:function(s){t.show_track_details_modal=!1}}})],2)],2)],1)},fn=[],vn=function(t,s){var a=s._c;return a("div",{staticClass:"media"},[a("figure",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._m(0)]),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.directory.path.substring(s.props.directory.path.lastIndexOf("/")+1)))]),a("h2",{staticClass:"subtitle is-7 has-text-grey-light"},[s._v(s._s(s.props.directory.path))])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},yn=[function(t,s){var a=s._c;return a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-folder"})])}],bn={name:"ListItemDirectory",props:["directory"]},gn=bn,kn=Object(z["a"])(gn,vn,yn,!0,null,null,null),Cn=kn.exports,wn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.directory.path)+" ")])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},xn=[],$n={name:"ModalDialogDirectory",props:["show","directory"],methods:{play:function(){this.$emit("close"),Q.player_play_expression('path starts with "'+this.directory.path+'" order by path asc',!1)},queue_add:function(){this.$emit("close"),Q.queue_expression_add('path starts with "'+this.directory.path+'" order by path asc')},queue_add_next:function(){this.$emit("close"),Q.queue_expression_add_next('path starts with "'+this.directory.path+'" order by path asc')}}},qn=$n,An=Object(z["a"])(qn,wn,xn,!1,null,null,null),Sn=An.exports;const jn={load:function(t){return t.query.directory?Q.library_files(t.query.directory):Promise.resolve()},set:function(t,s){t.files=s?s.data:{directories:t.$store.state.config.directories.map(t=>({path:t})),tracks:{items:[]},playlists:{items:[]}}}};var Pn={name:"PageFiles",mixins:[Sa(jn)],components:{ContentWithHeading:Ts,ListItemDirectory:Cn,ListItemPlaylist:Fo,ListItemTrack:_e,ModalDialogDirectory:Sn,ModalDialogPlaylist:Ko,ModalDialogTrack:be},data(){return{files:{directories:[],tracks:{items:[]},playlists:{items:[]}},show_directory_details_modal:!1,selected_directory:{},show_playlist_details_modal:!1,selected_playlist:{},show_track_details_modal:!1,selected_track:{}}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory:function(){var t=this.current_directory.slice(0,this.current_directory.lastIndexOf("/"));""===t||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({path:"/files"}):this.$router.push({path:"/files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory:function(t){this.$router.push({path:"/files",query:{directory:t.path}})},open_directory_dialog:function(t){this.selected_directory=t,this.show_directory_details_modal=!0},play:function(){Q.player_play_expression('path starts with "'+this.current_directory+'" order by path asc',!1)},play_track:function(t){Q.player_play_uri(this.files.tracks.items.map(t=>t.uri).join(","),!1,t)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},open_playlist:function(t){this.$router.push({path:"/playlists/"+t.id+"/tracks"})},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}}},Tn=Pn,Ln=Object(z["a"])(Tn,hn,fn,!1,null,null,null),On=Ln.exports,En=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Radio")])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.tracks.total)+" tracks")]),a("list-tracks",{attrs:{tracks:t.tracks.items}})],1)],2)],1)},In=[];const zn={load:function(t){return Q.library_radio_streams()},set:function(t,s){t.tracks=s.data.tracks}};var Dn={name:"PageRadioStreams",mixins:[Sa(zn)],components:{ContentWithHeading:Ts,ListTracks:we},data(){return{tracks:{items:[]}}}},Nn=Dn,Rn=Object(z["a"])(Nn,En,In,!1,null,null,null),Mn=Rn.exports,Un=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"section fd-remove-padding-bottom"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("form",{on:{submit:function(s){return s.preventDefault(),t.new_search(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.search_query,expression:"search_query"}],ref:"search_field",staticClass:"input is-rounded is-shadowless",attrs:{type:"text",placeholder:"Search",autocomplete:"off"},domProps:{value:t.search_query},on:{input:function(s){s.target.composing||(t.search_query=s.target.value)}}}),t._m(0)]),t._m(1)])]),a("div",{staticClass:"tags",staticStyle:{"margin-top":"16px"}},t._l(t.recent_searches,(function(s){return a("a",{key:s,staticClass:"tag",on:{click:function(a){return t.open_recent_search(s)}}},[t._v(t._s(s))])})),0)])])])]),a("tabs-search"),t.show_tracks?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Tracks")])]),a("template",{slot:"content"},[a("list-tracks",{attrs:{tracks:t.tracks.items}})],1),a("template",{slot:"footer"},[t.show_all_tracks_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_tracks}},[t._v("Show all "+t._s(t.tracks.total.toLocaleString())+" tracks")])])]):t._e(),t.tracks.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_artists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Artists")])]),a("template",{slot:"content"},[a("list-artists",{attrs:{artists:t.artists.items}})],1),a("template",{slot:"footer"},[t.show_all_artists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_artists}},[t._v("Show all "+t._s(t.artists.total.toLocaleString())+" artists")])])]):t._e(),t.artists.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_albums?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Albums")])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.albums.items}})],1),a("template",{slot:"footer"},[t.show_all_albums_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_albums}},[t._v("Show all "+t._s(t.albums.total.toLocaleString())+" albums")])])]):t._e(),t.albums.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_playlists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Playlists")])]),a("template",{slot:"content"},[a("list-playlists",{attrs:{playlists:t.playlists.items}})],1),a("template",{slot:"footer"},[t.show_all_playlists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_playlists}},[t._v("Show all "+t._s(t.playlists.total.toLocaleString())+" playlists")])])]):t._e(),t.playlists.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_podcasts?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Podcasts")])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.podcasts.items}})],1),a("template",{slot:"footer"},[t.show_all_podcasts_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_podcasts}},[t._v("Show all "+t._s(t.podcasts.total.toLocaleString())+" podcasts")])])]):t._e(),t.podcasts.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_audiobooks?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Audiobooks")])]),a("template",{slot:"content"},[a("list-albums",{attrs:{albums:t.audiobooks.items}})],1),a("template",{slot:"footer"},[t.show_all_audiobooks_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_audiobooks}},[t._v("Show all "+t._s(t.audiobooks.total.toLocaleString())+" audiobooks")])])]):t._e(),t.audiobooks.total?t._e():a("p",[t._v("No results")])])],2):t._e()],1)},Hn=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-magnify"})])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",{staticClass:"help has-text-centered"},[t._v("Tip: you can search by a smart playlist query language "),a("a",{attrs:{href:"https://github.com/ejurgensen/forked-daapd/blob/master/README_SMARTPL.md",target:"_blank"}},[t._v("expression")]),t._v(" if you prefix it with "),a("code",[t._v("query:")]),t._v(". ")])}],Wn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return t.spotify_enabled?a("section",{staticClass:"section fd-remove-padding-bottom"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"tabs is-centered is-small is-toggle is-toggle-rounded"},[a("ul",[a("router-link",{attrs:{tag:"li",to:{path:"/search/library",query:t.$route.query},"active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-library-books"})]),a("span",{},[t._v("Library")])])]),a("router-link",{attrs:{tag:"li",to:{path:"/search/spotify",query:t.$route.query},"active-class":"is-active"}},[a("a",[a("span",{staticClass:"icon is-small"},[a("i",{staticClass:"mdi mdi-spotify"})]),a("span",{},[t._v("Spotify")])])])],1)])])])])]):t._e()},Bn=[],Fn={name:"TabsSearch",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},Gn=Fn,Yn=Object(z["a"])(Gn,Wn,Bn,!1,null,null,null),Vn=Yn.exports,Qn={name:"PageSearch",components:{ContentWithHeading:Ts,TabsSearch:Vn,ListTracks:we,ListArtists:hi,ListAlbums:le,ListPlaylists:sn},data(){return{search_query:"",tracks:{items:[],total:0},artists:{items:[],total:0},albums:{items:[],total:0},playlists:{items:[],total:0},audiobooks:{items:[],total:0},podcasts:{items:[],total:0}}},computed:{recent_searches(){return this.$store.state.recent_searches},show_tracks(){return this.$route.query.type&&this.$route.query.type.includes("track")},show_all_tracks_button(){return this.tracks.total>this.tracks.items.length},show_artists(){return this.$route.query.type&&this.$route.query.type.includes("artist")},show_all_artists_button(){return this.artists.total>this.artists.items.length},show_albums(){return this.$route.query.type&&this.$route.query.type.includes("album")},show_all_albums_button(){return this.albums.total>this.albums.items.length},show_playlists(){return this.$route.query.type&&this.$route.query.type.includes("playlist")},show_all_playlists_button(){return this.playlists.total>this.playlists.items.length},show_audiobooks(){return this.$route.query.type&&this.$route.query.type.includes("audiobook")},show_all_audiobooks_button(){return this.audiobooks.total>this.audiobooks.items.length},show_podcasts(){return this.$route.query.type&&this.$route.query.type.includes("podcast")},show_all_podcasts_button(){return this.podcasts.total>this.podcasts.items.length},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{search:function(t){if(!t.query.query||""===t.query.query)return this.search_query="",void this.$refs.search_field.focus();this.searchMusic(t.query),this.searchAudiobooks(t.query),this.searchPodcasts(t.query),this.$store.commit(q,t.query.query)},searchMusic:function(t){if(!(t.type.indexOf("track")<0&&t.type.indexOf("artist")<0&&t.type.indexOf("album")<0&&t.type.indexOf("playlist")<0)){var s={type:t.type,media_kind:"music"};t.query.startsWith("query:")?s.expression=t.query.replace(/^query:/,"").trim():s.query=t.query,t.limit&&(s.limit=t.limit,s.offset=t.offset),Q.search(s).then(({data:t})=>{this.tracks=t.tracks?t.tracks:{items:[],total:0},this.artists=t.artists?t.artists:{items:[],total:0},this.albums=t.albums?t.albums:{items:[],total:0},this.playlists=t.playlists?t.playlists:{items:[],total:0}})}},searchAudiobooks:function(t){if(!(t.type.indexOf("audiobook")<0)){var s={type:"album",media_kind:"audiobook"};t.query.startsWith("query:")?s.expression=t.query.replace(/^query:/,"").trim():s.expression='((album includes "'+t.query+'" or artist includes "'+t.query+'") and media_kind is audiobook)',t.limit&&(s.limit=t.limit,s.offset=t.offset),Q.search(s).then(({data:t})=>{this.audiobooks=t.albums?t.albums:{items:[],total:0}})}},searchPodcasts:function(t){if(!(t.type.indexOf("podcast")<0)){var s={type:"album",media_kind:"podcast"};t.query.startsWith("query:")?s.expression=t.query.replace(/^query:/,"").trim():s.expression='((album includes "'+t.query+'" or artist includes "'+t.query+'") and media_kind is podcast)',t.limit&&(s.limit=t.limit,s.offset=t.offset),Q.search(s).then(({data:t})=>{this.podcasts=t.albums?t.albums:{items:[],total:0}})}},new_search:function(){this.search_query&&(this.$router.push({path:"/search/library",query:{type:"track,artist,album,playlist,audiobook,podcast",query:this.search_query,limit:3,offset:0}}),this.$refs.search_field.blur())},open_search_tracks:function(){this.$router.push({path:"/search/library",query:{type:"track",query:this.$route.query.query}})},open_search_artists:function(){this.$router.push({path:"/search/library",query:{type:"artist",query:this.$route.query.query}})},open_search_albums:function(){this.$router.push({path:"/search/library",query:{type:"album",query:this.$route.query.query}})},open_search_playlists:function(){this.$router.push({path:"/search/library",query:{type:"playlist",query:this.$route.query.query}})},open_search_audiobooks:function(){this.$router.push({path:"/search/library",query:{type:"audiobook",query:this.$route.query.query}})},open_search_podcasts:function(){this.$router.push({path:"/search/library",query:{type:"podcast",query:this.$route.query.query}})},open_recent_search:function(t){this.search_query=t,this.new_search()}},mounted:function(){this.search(this.$route)},watch:{$route(t,s){this.search(t)}}},Jn=Qn,Kn=Object(z["a"])(Jn,Un,Hn,!1,null,null,null),Xn=Kn.exports,Zn=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths has-text-centered-mobile"},[a("p",{staticClass:"heading"},[a("b",[t._v("forked-daapd")]),t._v(" - version "+t._s(t.config.version))]),a("h1",{staticClass:"title is-4"},[t._v(t._s(t.config.library_name))])])])])]),a("section",{staticClass:"section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"content"},[a("nav",{staticClass:"level is-mobile"},[t._m(0),a("div",{staticClass:"level-right"},[t.library.updating?a("div",[a("a",{staticClass:"button is-small is-loading"},[t._v("Update")])]):a("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.onClickOutside,expression:"onClickOutside"}],staticClass:"dropdown is-right",class:{"is-active":t.show_update_dropdown}},[a("div",{staticClass:"dropdown-trigger"},[a("div",{staticClass:"buttons has-addons"},[a("a",{staticClass:"button is-small",on:{click:t.update}},[t._v("Update")]),a("a",{staticClass:"button is-small",on:{click:function(s){t.show_update_dropdown=!t.show_update_dropdown}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi",class:{"mdi-chevron-down":!t.show_update_dropdown,"mdi-chevron-up":t.show_update_dropdown}})])])])]),a("div",{staticClass:"dropdown-menu",attrs:{id:"dropdown-menu",role:"menu"}},[a("div",{staticClass:"dropdown-content"},[a("div",{staticClass:"dropdown-item"},[a("a",{staticClass:"has-text-dark",on:{click:t.update}},[a("strong",[t._v("Update")]),a("br"),a("span",{staticClass:"is-size-7"},[t._v("Adds new, removes deleted and updates modified files.")])])]),a("hr",{staticClass:"dropdown-divider"}),a("div",{staticClass:"dropdown-item"},[a("a",{staticClass:"has-text-dark",on:{click:t.update_meta}},[a("strong",[t._v("Rescan metadata")]),a("br"),a("span",{staticClass:"is-size-7"},[t._v("Same as update, but also rescans unmodified files.")])])])])])])])]),a("table",{staticClass:"table"},[a("tbody",[a("tr",[a("th",[t._v("Artists")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.artists)))])]),a("tr",[a("th",[t._v("Albums")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.albums)))])]),a("tr",[a("th",[t._v("Tracks")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("number")(t.library.songs)))])]),a("tr",[a("th",[t._v("Total playtime")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("duration")(1e3*t.library.db_playtime,"y [years], d [days], h [hours], m [minutes]")))])]),a("tr",[a("th",[t._v("Library updated")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("timeFromNow")(t.library.updated_at))+" "),a("span",{staticClass:"has-text-grey"},[t._v("("+t._s(t._f("time")(t.library.updated_at,"lll"))+")")])])]),a("tr",[a("th",[t._v("Uptime")]),a("td",{staticClass:"has-text-right"},[t._v(t._s(t._f("timeFromNow")(t.library.started_at,!0))+" "),a("span",{staticClass:"has-text-grey"},[t._v("("+t._s(t._f("time")(t.library.started_at,"ll"))+")")])])])])])])])])])]),a("section",{staticClass:"section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"content has-text-centered-mobile"},[a("p",{staticClass:"is-size-7"},[t._v("Compiled with support for "+t._s(t._f("join")(t.config.buildoptions))+".")]),t._m(1)])])])])])])},tr=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"level-left"},[a("div",{staticClass:"level-item"},[a("h2",{staticClass:"title is-5"},[t._v("Library")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("p",{staticClass:"is-size-7"},[t._v("Web interface built with "),a("a",{attrs:{href:"http://bulma.io"}},[t._v("Bulma")]),t._v(", "),a("a",{attrs:{href:"https://materialdesignicons.com/"}},[t._v("Material Design Icons")]),t._v(", "),a("a",{attrs:{href:"https://vuejs.org/"}},[t._v("Vue.js")]),t._v(", "),a("a",{attrs:{href:"https://github.com/mzabriskie/axios"}},[t._v("axios")]),t._v(" and "),a("a",{attrs:{href:"https://github.com/ejurgensen/forked-daapd/network/dependencies"}},[t._v("more")]),t._v(".")])}],sr={name:"PageAbout",data(){return{show_update_dropdown:!1}},computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{onClickOutside(t){this.show_update_dropdown=!1},update:function(){this.show_update_dropdown=!1,Q.library_update()},update_meta:function(){this.show_update_dropdown=!1,Q.library_rescan()}},filters:{join:function(t){return t.join(", ")}}},ar=sr,er=Object(z["a"])(ar,Zn,tr,!1,null,null,null),ir=er.exports,lr=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("New Releases")])]),a("template",{slot:"content"},[t._l(t.new_releases,(function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[t.is_visible_artwork?a("template",{slot:"artwork"},[a("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album},on:{close:function(s){t.show_album_details_modal=!1}}})],2),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("router-link",{staticClass:"button is-light is-small is-rounded",attrs:{to:"/music/spotify/new-releases"}},[t._v(" Show more ")])],1)])])],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Featured Playlists")])]),a("template",{slot:"content"},[t._l(t.featured_playlists,(function(s){return a("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2),a("template",{slot:"footer"},[a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("router-link",{staticClass:"button is-light is-small is-rounded",attrs:{to:"/music/spotify/featured-playlists"}},[t._v(" Show more ")])],1)])])],2)],1)},or=[],nr=function(t,s){var a=s._c;return a("div",{staticClass:"media"},[s.$slots["artwork"]?a("div",{staticClass:"media-left fd-has-action",on:{click:s.listeners.click}},[s._t("artwork")],2):s._e(),a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:s.listeners.click}},[a("h1",{staticClass:"title is-6"},[s._v(s._s(s.props.album.name))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[s._v(s._s(s.props.album.artists[0].name))])]),a("h2",{staticClass:"subtitle is-7 has-text-grey has-text-weight-normal"},[s._v("("+s._s(s.props.album.album_type)+", "+s._s(s._f("time")(s.props.album.release_date,"L"))+")")])]),a("div",{staticClass:"media-right"},[s._t("actions")],2)])},rr=[],cr={name:"SpotifyListItemAlbum",props:["album"]},dr=cr,ur=Object(z["a"])(dr,nr,rr,!0,null,null,null),pr=ur.exports,_r=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_playlist}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.playlist.name))]),a("h2",{staticClass:"subtitle is-7"},[t._v(t._s(t.playlist.owner.display_name))])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])},mr=[],hr={name:"SpotifyListItemPlaylist",props:["playlist"],methods:{open_playlist:function(){this.$router.push({path:"/music/spotify/playlists/"+this.playlist.id})}}},fr=hr,vr=Object(z["a"])(fr,_r,mr,!1,null,null,null),yr=vr.exports,br=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("figure",{directives:[{name:"show",rawName:"v-show",value:t.artwork_visible,expression:"artwork_visible"}],staticClass:"image is-square fd-has-margin-bottom"},[a("img",{staticClass:"fd-has-shadow",attrs:{src:t.artwork_url},on:{load:t.artwork_loaded,error:t.artwork_error}})]),a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.release_date,"L")))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Type")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.album.album_type))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},gr=[],kr={name:"SpotifyModalDialogAlbum",props:["show","album"],data(){return{artwork_visible:!1}},computed:{artwork_url:function(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.album.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.album.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.album.uri)},open_album:function(){this.$router.push({path:"/music/spotify/albums/"+this.album.id})},open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})},artwork_loaded:function(){this.artwork_visible=!0},artwork_error:function(){this.artwork_visible=!1}}},Cr=kr,wr=Object(z["a"])(Cr,br,gr,!1,null,null,null),xr=wr.exports,$r=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_playlist}},[t._v(t._s(t.playlist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Owner")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.owner.display_name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Tracks")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.tracks.total))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.playlist.uri))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},qr=[],Ar={name:"SpotifyModalDialogPlaylist",props:["show","playlist"],methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.playlist.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.playlist.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.playlist.uri)},open_playlist:function(){this.$router.push({path:"/music/spotify/playlists/"+this.playlist.id})}}},Sr=Ar,jr=Object(z["a"])(Sr,$r,qr,!1,null,null,null),Pr=jr.exports;const Tr={load:function(t){if(V.state.spotify_new_releases.length>0&&V.state.spotify_featured_playlists.length>0)return Promise.resolve();const s=new Us.a;return s.setAccessToken(V.state.spotify.webapi_token),Promise.all([s.getNewReleases({country:V.state.spotify.webapi_country,limit:50}),s.getFeaturedPlaylists({country:V.state.spotify.webapi_country,limit:50})])},set:function(t,s){s&&(V.commit(C,s[0].albums.items),V.commit(w,s[1].playlists.items))}};var Lr={name:"SpotifyPageBrowse",mixins:[Sa(Tr)],components:{ContentWithHeading:Ts,TabsMusic:Ea,SpotifyListItemAlbum:pr,SpotifyListItemPlaylist:yr,SpotifyModalDialogAlbum:xr,SpotifyModalDialogPlaylist:Pr,CoverArtwork:ka},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}}},Or=Lr,Er=Object(z["a"])(Or,lr,or,!1,null,null,null),Ir=Er.exports,zr=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("New Releases")])]),a("template",{slot:"content"},[t._l(t.new_releases,(function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[t.is_visible_artwork?a("template",{slot:"artwork"},[a("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album},on:{close:function(s){t.show_album_details_modal=!1}}})],2)],2)],1)},Dr=[];const Nr={load:function(t){if(V.state.spotify_new_releases.length>0)return Promise.resolve();const s=new Us.a;return s.setAccessToken(V.state.spotify.webapi_token),s.getNewReleases({country:V.state.spotify.webapi_country,limit:50})},set:function(t,s){s&&V.commit(C,s.albums.items)}};var Rr={name:"SpotifyPageBrowseNewReleases",mixins:[Sa(Nr)],components:{ContentWithHeading:Ts,TabsMusic:Ea,SpotifyListItemAlbum:pr,SpotifyModalDialogAlbum:xr,CoverArtwork:ka},data(){return{show_album_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}}},Mr=Rr,Ur=Object(z["a"])(Mr,zr,Dr,!1,null,null,null),Hr=Ur.exports,Wr=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-music"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Featured Playlists")])]),a("template",{slot:"content"},[t._l(t.featured_playlists,(function(s){return a("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2)],2)],1)},Br=[];const Fr={load:function(t){if(V.state.spotify_featured_playlists.length>0)return Promise.resolve();const s=new Us.a;s.setAccessToken(V.state.spotify.webapi_token),s.getFeaturedPlaylists({country:V.state.spotify.webapi_country,limit:50})},set:function(t,s){s&&V.commit(w,s.playlists.items)}};var Gr={name:"SpotifyPageBrowseFeaturedPlaylists",mixins:[Sa(Fr)],components:{ContentWithHeading:Ts,TabsMusic:Ea,SpotifyListItemPlaylist:yr,SpotifyModalDialogPlaylist:Pr},data(){return{show_playlist_details_modal:!1,selected_playlist:{}}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0}}},Yr=Gr,Vr=Object(z["a"])(Yr,Wr,Br,!1,null,null,null),Qr=Vr.exports,Jr=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v(t._s(t.artist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_artist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.total)+" albums")]),t._l(t.albums,(function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[t.is_visible_artwork?a("template",{slot:"artwork"},[a("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t.offset<t.total?a("infinite-loading",{on:{infinite:t.load_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-album",{attrs:{show:t.show_details_modal,album:t.selected_album},on:{close:function(s){t.show_details_modal=!1}}}),a("spotify-modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],2)],2)},Kr=[],Xr=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.artist.name))])]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Popularity / Followers")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.popularity)+" / "+t._s(t.artist.followers.total))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Genres")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.artist.genres.join(", ")))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},Zr=[],tc={name:"SpotifyModalDialogArtist",props:["show","artist"],methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.artist.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.artist.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.artist.uri)},open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.artist.id})}}},sc=tc,ac=Object(z["a"])(sc,Xr,Zr,!1,null,null,null),ec=ac.exports,ic=a("e166"),lc=a.n(ic);const oc={load:function(t){const s=new Us.a;return s.setAccessToken(V.state.spotify.webapi_token),Promise.all([s.getArtist(t.params.artist_id),s.getArtistAlbums(t.params.artist_id,{limit:50,offset:0,include_groups:"album,single"})])},set:function(t,s){t.artist=s[0],t.albums=[],t.total=0,t.offset=0,t.append_albums(s[1])}};var nc={name:"SpotifyPageArtist",mixins:[Sa(oc)],components:{ContentWithHeading:Ts,SpotifyListItemAlbum:pr,SpotifyModalDialogAlbum:xr,SpotifyModalDialogArtist:ec,InfiniteLoading:lc.a,CoverArtwork:ka},data(){return{artist:{},albums:[],total:0,offset:0,show_details_modal:!1,selected_album:{},show_artist_details_modal:!1}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next:function(t){const s=new Us.a;s.setAccessToken(this.$store.state.spotify.webapi_token),s.getArtistAlbums(this.artist.id,{limit:50,offset:this.offset,include_groups:"album,single"}).then(s=>{this.append_albums(s,t)})},append_albums:function(t,s){this.albums=this.albums.concat(t.items),this.total=t.total,this.offset+=t.limit,s&&(s.loaded(),this.offset>=this.total&&s.complete())},play:function(){this.show_details_modal=!1,Q.player_play_uri(this.artist.uri,!0)},open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},open_dialog:function(t){this.selected_album=t,this.show_details_modal=!0},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}}},rc=nc,cc=Object(z["a"])(rc,Jr,Kr,!1,null,null,null),dc=cc.exports,uc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-hero",[a("template",{slot:"heading-left"},[a("h1",{staticClass:"title is-5"},[t._v(t._s(t.album.name))]),a("h2",{staticClass:"subtitle is-6 has-text-link has-text-weight-normal"},[a("a",{staticClass:"has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),a("div",{staticClass:"buttons fd-is-centered-mobile fd-has-margin-top"},[a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])]),a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_album_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])])])]),a("template",{slot:"heading-right"},[a("p",{staticClass:"image is-square fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.artwork_url,artist:t.album.artist,album:t.album.name},on:{click:function(s){t.show_album_details_modal=!0}}})],1)]),a("template",{slot:"content"},[a("p",{staticClass:"heading is-7 has-text-centered-mobile fd-has-margin-top"},[t._v(t._s(t.album.tracks.total)+" tracks")]),t._l(t.album.tracks.items,(function(s,e){return a("spotify-list-item-track",{key:s.id,attrs:{track:s,position:e,album:t.album,context_uri:t.album.uri}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),a("spotify-modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track,album:t.album},on:{close:function(s){t.show_track_details_modal=!1}}}),a("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.album},on:{close:function(s){t.show_album_details_modal=!1}}})],2)],2)},pc=[],_c=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.play}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.track.name))]),a("h2",{staticClass:"subtitle is-7 has-text-grey"},[a("b",[t._v(t._s(t.track.artists[0].name))])])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])},mc=[],hc={name:"SpotifyListItemTrack",props:["track","position","album","context_uri"],methods:{play:function(){Q.player_play_uri(this.context_uri,!1,this.position)}}},fc=hc,vc=Object(z["a"])(fc,_c,mc,!1,null,null,null),yc=vc.exports,bc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("transition",{attrs:{name:"fade"}},[t.show?a("div",{staticClass:"modal is-active"},[a("div",{staticClass:"modal-background",on:{click:function(s){return t.$emit("close")}}}),a("div",{staticClass:"modal-content fd-modal-card"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-content"},[a("p",{staticClass:"title is-4"},[t._v(" "+t._s(t.track.name)+" ")]),a("p",{staticClass:"subtitle"},[t._v(" "+t._s(t.track.artists[0].name)+" ")]),a("div",{staticClass:"content is-small"},[a("p",[a("span",{staticClass:"heading"},[t._v("Album")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_album}},[t._v(t._s(t.album.name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Album artist")]),a("a",{staticClass:"title is-6 has-text-link",on:{click:t.open_artist}},[t._v(t._s(t.album.artists[0].name))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Release date")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("time")(t.album.release_date,"L")))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Track / Disc")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.track_number)+" / "+t._s(t.track.disc_number))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Length")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t._f("duration")(t.track.duration_ms)))])]),a("p",[a("span",{staticClass:"heading"},[t._v("Path")]),a("span",{staticClass:"title is-6"},[t._v(t._s(t.track.uri))])])])]),a("footer",{staticClass:"card-footer"},[a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-plus"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.queue_add_next}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-playlist-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Add Next")])]),a("a",{staticClass:"card-footer-item has-text-dark",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-play"})]),t._v(" "),a("span",{staticClass:"is-size-7"},[t._v("Play")])])])])]),a("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(s){return t.$emit("close")}}})]):t._e()])],1)},gc=[],kc={name:"SpotifyModalDialogTrack",props:["show","track","album"],methods:{play:function(){this.$emit("close"),Q.player_play_uri(this.track.uri,!1)},queue_add:function(){this.$emit("close"),Q.queue_add(this.track.uri)},queue_add_next:function(){this.$emit("close"),Q.queue_add_next(this.track.uri)},open_album:function(){this.$router.push({path:"/music/spotify/albums/"+this.album.id})},open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})}}},Cc=kc,wc=Object(z["a"])(Cc,bc,gc,!1,null,null,null),xc=wc.exports;const $c={load:function(t){const s=new Us.a;return s.setAccessToken(V.state.spotify.webapi_token),s.getAlbum(t.params.album_id)},set:function(t,s){t.album=s}};var qc={name:"PageAlbum",mixins:[Sa($c)],components:{ContentWithHero:Wi["default"],SpotifyListItemTrack:yc,SpotifyModalDialogTrack:xc,SpotifyModalDialogAlbum:xr,CoverArtwork:ka},data(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1}},computed:{artwork_url:function(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.album.artists[0].id})},play:function(){this.show_details_modal=!1,Q.player_play_uri(this.album.uri,!0)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0}}},Ac=qc,Sc=Object(z["a"])(Ac,uc,pc,!1,null,null,null),jc=Sc.exports,Pc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v(t._s(t.playlist.name))])]),a("template",{slot:"heading-right"},[a("div",{staticClass:"buttons is-centered"},[a("a",{staticClass:"button is-small is-light is-rounded",on:{click:function(s){t.show_playlist_details_modal=!0}}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-dots-horizontal mdi-18px"})])]),a("a",{staticClass:"button is-small is-dark is-rounded",on:{click:t.play}},[a("span",{staticClass:"icon"},[a("i",{staticClass:"mdi mdi-shuffle"})]),t._v(" "),a("span",[t._v("Shuffle")])])])]),a("template",{slot:"content"},[a("p",{staticClass:"heading has-text-centered-mobile"},[t._v(t._s(t.playlist.tracks.total)+" tracks")]),t._l(t.tracks,(function(s,e){return a("spotify-list-item-track",{key:s.track.id,attrs:{track:s.track,album:s.track.album,position:e,context_uri:t.playlist.uri}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s.track)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),t.offset<t.total?a("infinite-loading",{on:{infinite:t.load_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track,album:t.selected_track.album},on:{close:function(s){t.show_track_details_modal=!1}}}),a("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2)],2)},Tc=[];const Lc={load:function(t){const s=new Us.a;return s.setAccessToken(V.state.spotify.webapi_token),Promise.all([s.getPlaylist(t.params.playlist_id),s.getPlaylistTracks(t.params.playlist_id,{limit:50,offset:0})])},set:function(t,s){t.playlist=s[0],t.tracks=[],t.total=0,t.offset=0,t.append_tracks(s[1])}};var Oc={name:"SpotifyPagePlaylist",mixins:[Sa(Lc)],components:{ContentWithHeading:Ts,SpotifyListItemTrack:yc,SpotifyModalDialogTrack:xc,SpotifyModalDialogPlaylist:Pr,InfiniteLoading:lc.a},data(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next:function(t){const s=new Us.a;s.setAccessToken(this.$store.state.spotify.webapi_token),s.getPlaylistTracks(this.playlist.id,{limit:50,offset:this.offset}).then(s=>{this.append_tracks(s,t)})},append_tracks:function(t,s){this.tracks=this.tracks.concat(t.items),this.total=t.total,this.offset+=t.limit,s&&(s.loaded(),this.offset>=this.total&&s.complete())},play:function(){this.show_details_modal=!1,Q.player_play_uri(this.playlist.uri,!0)},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0}}},Ec=Oc,Ic=Object(z["a"])(Ec,Pc,Tc,!1,null,null,null),zc=Ic.exports,Dc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("section",{staticClass:"section fd-remove-padding-bottom"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("form",{on:{submit:function(s){return s.preventDefault(),t.new_search(s)}}},[a("div",{staticClass:"field"},[a("p",{staticClass:"control is-expanded has-icons-left"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.search_query,expression:"search_query"}],ref:"search_field",staticClass:"input is-rounded is-shadowless",attrs:{type:"text",placeholder:"Search",autocomplete:"off"},domProps:{value:t.search_query},on:{input:function(s){s.target.composing||(t.search_query=s.target.value)}}}),t._m(0)])])]),a("div",{staticClass:"tags",staticStyle:{"margin-top":"16px"}},t._l(t.recent_searches,(function(s){return a("a",{key:s,staticClass:"tag",on:{click:function(a){return t.open_recent_search(s)}}},[t._v(t._s(s))])})),0)])])])]),a("tabs-search"),t.show_tracks?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Tracks")])]),a("template",{slot:"content"},[t._l(t.tracks.items,(function(s){return a("spotify-list-item-track",{key:s.id,attrs:{track:s,album:s.album,position:0,context_uri:s.uri}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_track_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"track"===t.query.type?a("infinite-loading",{on:{infinite:t.search_tracks_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-track",{attrs:{show:t.show_track_details_modal,track:t.selected_track,album:t.selected_track.album},on:{close:function(s){t.show_track_details_modal=!1}}})],2),a("template",{slot:"footer"},[t.show_all_tracks_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_tracks}},[t._v("Show all "+t._s(t.tracks.total.toLocaleString())+" tracks")])])]):t._e(),t.tracks.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_artists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Artists")])]),a("template",{slot:"content"},[t._l(t.artists.items,(function(s){return a("spotify-list-item-artist",{key:s.id,attrs:{artist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_artist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"artist"===t.query.type?a("infinite-loading",{on:{infinite:t.search_artists_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-artist",{attrs:{show:t.show_artist_details_modal,artist:t.selected_artist},on:{close:function(s){t.show_artist_details_modal=!1}}})],2),a("template",{slot:"footer"},[t.show_all_artists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_artists}},[t._v("Show all "+t._s(t.artists.total.toLocaleString())+" artists")])])]):t._e(),t.artists.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_albums?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Albums")])]),a("template",{slot:"content"},[t._l(t.albums.items,(function(s){return a("spotify-list-item-album",{key:s.id,attrs:{album:s},on:{click:function(a){return t.open_album(s)}}},[t.is_visible_artwork?a("template",{slot:"artwork"},[a("p",{staticClass:"image is-64x64 fd-has-shadow fd-has-action"},[a("cover-artwork",{attrs:{artwork_url:t.artwork_url(s),artist:s.artist,album:s.name,maxwidth:64,maxheight:64}})],1)]):t._e(),a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_album_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"album"===t.query.type?a("infinite-loading",{on:{infinite:t.search_albums_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-album",{attrs:{show:t.show_album_details_modal,album:t.selected_album},on:{close:function(s){t.show_album_details_modal=!1}}})],2),a("template",{slot:"footer"},[t.show_all_albums_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_albums}},[t._v("Show all "+t._s(t.albums.total.toLocaleString())+" albums")])])]):t._e(),t.albums.total?t._e():a("p",[t._v("No results")])])],2):t._e(),t.show_playlists?a("content-with-heading",[a("template",{slot:"heading-left"},[a("p",{staticClass:"title is-4"},[t._v("Playlists")])]),a("template",{slot:"content"},[t._l(t.playlists.items,(function(s){return a("spotify-list-item-playlist",{key:s.id,attrs:{playlist:s}},[a("template",{slot:"actions"},[a("a",{on:{click:function(a){return t.open_playlist_dialog(s)}}},[a("span",{staticClass:"icon has-text-dark"},[a("i",{staticClass:"mdi mdi-dots-vertical mdi-18px"})])])])],2)})),"playlist"===t.query.type?a("infinite-loading",{on:{infinite:t.search_playlists_next}},[a("span",{attrs:{slot:"no-more"},slot:"no-more"},[t._v(".")])]):t._e(),a("spotify-modal-dialog-playlist",{attrs:{show:t.show_playlist_details_modal,playlist:t.selected_playlist},on:{close:function(s){t.show_playlist_details_modal=!1}}})],2),a("template",{slot:"footer"},[t.show_all_playlists_button?a("nav",{staticClass:"level"},[a("p",{staticClass:"level-item"},[a("a",{staticClass:"button is-light is-small is-rounded",on:{click:t.open_search_playlists}},[t._v("Show all "+t._s(t.playlists.total.toLocaleString())+" playlists")])])]):t._e(),t.playlists.total?t._e():a("p",[t._v("No results")])])],2):t._e()],1)},Nc=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("span",{staticClass:"icon is-left"},[a("i",{staticClass:"mdi mdi-magnify"})])}],Rc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"media"},[a("div",{staticClass:"media-content fd-has-action is-clipped",on:{click:t.open_artist}},[a("h1",{staticClass:"title is-6"},[t._v(t._s(t.artist.name))])]),a("div",{staticClass:"media-right"},[t._t("actions")],2)])},Mc=[],Uc={name:"SpotifyListItemArtist",props:["artist"],methods:{open_artist:function(){this.$router.push({path:"/music/spotify/artists/"+this.artist.id})}}},Hc=Uc,Wc=Object(z["a"])(Hc,Rc,Mc,!1,null,null,null),Bc=Wc.exports,Fc={name:"SpotifyPageSearch",components:{ContentWithHeading:Ts,TabsSearch:Vn,SpotifyListItemTrack:yc,SpotifyListItemArtist:Bc,SpotifyListItemAlbum:pr,SpotifyListItemPlaylist:yr,SpotifyModalDialogTrack:xc,SpotifyModalDialogArtist:ec,SpotifyModalDialogAlbum:xr,SpotifyModalDialogPlaylist:Pr,InfiniteLoading:lc.a,CoverArtwork:ka},data(){return{search_query:"",tracks:{items:[],total:0},artists:{items:[],total:0},albums:{items:[],total:0},playlists:{items:[],total:0},query:{},search_param:{},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1,selected_album:{},show_artist_details_modal:!1,selected_artist:{},show_playlist_details_modal:!1,selected_playlist:{},validSearchTypes:["track","artist","album","playlist"]}},computed:{recent_searches(){return this.$store.state.recent_searches.filter(t=>!t.startsWith("query:"))},show_tracks(){return this.$route.query.type&&this.$route.query.type.includes("track")},show_all_tracks_button(){return this.tracks.total>this.tracks.items.length},show_artists(){return this.$route.query.type&&this.$route.query.type.includes("artist")},show_all_artists_button(){return this.artists.total>this.artists.items.length},show_albums(){return this.$route.query.type&&this.$route.query.type.includes("album")},show_all_albums_button(){return this.albums.total>this.albums.items.length},show_playlists(){return this.$route.query.type&&this.$route.query.type.includes("playlist")},show_all_playlists_button(){return this.playlists.total>this.playlists.items.length},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{reset:function(){this.tracks={items:[],total:0},this.artists={items:[],total:0},this.albums={items:[],total:0},this.playlists={items:[],total:0}},search:function(){if(this.reset(),!this.query.query||""===this.query.query||this.query.query.startsWith("query:"))return this.search_query="",void this.$refs.search_field.focus();this.search_param.limit=this.query.limit?this.query.limit:50,this.search_param.offset=this.query.offset?this.query.offset:0,this.$store.commit(q,this.query.query),this.query.type.includes(",")&&this.search_all()},spotify_search:function(){return Q.spotify().then(({data:t})=>{this.search_param.market=t.webapi_country;var s=new Us.a;s.setAccessToken(t.webapi_token);var a=this.query.type.split(",").filter(t=>this.validSearchTypes.includes(t));return s.search(this.query.query,a,this.search_param)})},search_all:function(){this.spotify_search().then(t=>{this.tracks=t.tracks?t.tracks:{items:[],total:0},this.artists=t.artists?t.artists:{items:[],total:0},this.albums=t.albums?t.albums:{items:[],total:0},this.playlists=t.playlists?t.playlists:{items:[],total:0}})},search_tracks_next:function(t){this.spotify_search().then(s=>{this.tracks.items=this.tracks.items.concat(s.tracks.items),this.tracks.total=s.tracks.total,this.search_param.offset+=s.tracks.limit,t.loaded(),this.search_param.offset>=this.tracks.total&&t.complete()})},search_artists_next:function(t){this.spotify_search().then(s=>{this.artists.items=this.artists.items.concat(s.artists.items),this.artists.total=s.artists.total,this.search_param.offset+=s.artists.limit,t.loaded(),this.search_param.offset>=this.artists.total&&t.complete()})},search_albums_next:function(t){this.spotify_search().then(s=>{this.albums.items=this.albums.items.concat(s.albums.items),this.albums.total=s.albums.total,this.search_param.offset+=s.albums.limit,t.loaded(),this.search_param.offset>=this.albums.total&&t.complete()})},search_playlists_next:function(t){this.spotify_search().then(s=>{this.playlists.items=this.playlists.items.concat(s.playlists.items),this.playlists.total=s.playlists.total,this.search_param.offset+=s.playlists.limit,t.loaded(),this.search_param.offset>=this.playlists.total&&t.complete()})},new_search:function(){this.search_query&&(this.$router.push({path:"/search/spotify",query:{type:"track,artist,album,playlist,audiobook,podcast",query:this.search_query,limit:3,offset:0}}),this.$refs.search_field.blur())},open_search_tracks:function(){this.$router.push({path:"/search/spotify",query:{type:"track",query:this.$route.query.query}})},open_search_artists:function(){this.$router.push({path:"/search/spotify",query:{type:"artist",query:this.$route.query.query}})},open_search_albums:function(){this.$router.push({path:"/search/spotify",query:{type:"album",query:this.$route.query.query}})},open_search_playlists:function(){this.$router.push({path:"/search/spotify",query:{type:"playlist",query:this.$route.query.query}})},open_recent_search:function(t){this.search_query=t,this.new_search()},open_track_dialog:function(t){this.selected_track=t,this.show_track_details_modal=!0},open_album_dialog:function(t){this.selected_album=t,this.show_album_details_modal=!0},open_artist_dialog:function(t){this.selected_artist=t,this.show_artist_details_modal=!0},open_playlist_dialog:function(t){this.selected_playlist=t,this.show_playlist_details_modal=!0},open_album:function(t){this.$router.push({path:"/music/spotify/albums/"+t.id})},artwork_url:function(t){return t.images&&t.images.length>0?t.images[0].url:""}},mounted:function(){this.query=this.$route.query,this.search()},watch:{$route(t,s){this.query=t.query,this.search()}}},Gc=Fc,Yc=Object(z["a"])(Gc,Dc,Nc,!1,null,null,null),Vc=Yc.exports,Qc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-settings"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Navbar items")])]),a("template",{slot:"content"},[a("p",{staticClass:"content"},[t._v(" Select the top navigation bar menu items ")]),a("div",{staticClass:"notification is-size-7"},[t._v(" Be aware that if you select more items than can be shown on your screen will result in the burger menu item to disapear. ")]),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_playlists"}},[a("template",{slot:"label"},[t._v(" Playlists")])],2),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_music"}},[a("template",{slot:"label"},[t._v(" Music")])],2),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_podcasts"}},[a("template",{slot:"label"},[t._v(" Podcasts")])],2),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_audiobooks"}},[a("template",{slot:"label"},[t._v(" Audiobooks")])],2),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_radio"}},[a("template",{slot:"label"},[t._v(" Radio")])],2),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_files"}},[a("template",{slot:"label"},[t._v(" Files")])],2),a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_menu_item_search"}},[a("template",{slot:"label"},[t._v(" Search")])],2)],1)],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Album lists")])]),a("template",{slot:"content"},[a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_cover_artwork_in_album_lists"}},[a("template",{slot:"label"},[t._v(" Show cover artwork in album list")])],2)],1)],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Now playing page")])]),a("template",{slot:"content"},[a("settings-checkbox",{attrs:{category_name:"webinterface",option_name:"show_composer_now_playing"}},[a("template",{slot:"label"},[t._v(" Show composer")]),a("template",{slot:"info"},[t._v('If enabled the composer of the current playing track is shown on the "now playing page"')])],2),a("settings-textfield",{attrs:{category_name:"webinterface",option_name:"show_composer_for_genre",disabled:!t.settings_option_show_composer_now_playing,placeholder:"Genres"}},[a("template",{slot:"label"},[t._v("Show composer only for listed genres")]),a("template",{slot:"info"},[a("p",{staticClass:"help"},[t._v(' Comma separated list of genres the composer should be displayed on the "now playing page". ')]),a("p",{staticClass:"help"},[t._v(" Leave empty to always show the composer. ")]),a("p",{staticClass:"help"},[t._v(" The genre tag of the current track is matched by checking, if one of the defined genres are included. For example setting to "),a("code",[t._v("classical, soundtrack")]),t._v(' will show the composer for tracks with a genre tag of "Contemporary Classical".'),a("br")])])],2)],1)],2)],1)},Jc=[],Kc=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("section",{staticClass:"section fd-tabs-section"},[a("div",{staticClass:"container"},[a("div",{staticClass:"columns is-centered"},[a("div",{staticClass:"column is-four-fifths"},[a("div",{staticClass:"tabs is-centered is-small"},[a("ul",[a("router-link",{attrs:{tag:"li",to:"/settings/webinterface","active-class":"is-active"}},[a("a",[a("span",{},[t._v("Webinterface")])])]),a("router-link",{attrs:{tag:"li",to:"/settings/remotes-outputs","active-class":"is-active"}},[a("a",[a("span",{},[t._v("Remotes & Outputs")])])]),a("router-link",{attrs:{tag:"li",to:"/settings/artwork","active-class":"is-active"}},[a("a",[a("span",{},[t._v("Artwork")])])]),a("router-link",{attrs:{tag:"li",to:"/settings/online-services","active-class":"is-active"}},[a("a",[a("span",{},[t._v("Online Services")])])])],1)])])])])])},Xc=[],Zc={name:"TabsSettings",computed:{}},td=Zc,sd=Object(z["a"])(td,Kc,Xc,!1,null,null,null),ad=sd.exports,ed=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"field"},[a("label",{staticClass:"checkbox"},[a("input",{ref:"settings_checkbox",attrs:{type:"checkbox"},domProps:{checked:t.value},on:{change:t.set_update_timer}}),t._t("label"),a("i",{staticClass:"is-size-7",class:{"has-text-info":"success"===t.statusUpdate,"has-text-danger":"error"===t.statusUpdate}},[t._v(" "+t._s(t.info))])],2),t.$slots["info"]?a("p",{staticClass:"help"},[t._t("info")],2):t._e()])},id=[],ld={name:"SettingsCheckbox",props:["category_name","option_name"],data(){return{timerDelay:2e3,timerId:-1,statusUpdate:""}},computed:{category(){return this.$store.state.settings.categories.find(t=>t.name===this.category_name)},option(){return this.category?this.category.options.find(t=>t.name===this.option_name):{}},value(){return this.option.value},info(){return"success"===this.statusUpdate?"(setting saved)":"error"===this.statusUpdate?"(error saving setting)":""}},methods:{set_update_timer(){this.timerId>0&&(window.clearTimeout(this.timerId),this.timerId=-1),this.statusUpdate="";const t=this.$refs.settings_checkbox.checked;t!==this.value&&(this.timerId=window.setTimeout(this.update_setting,this.timerDelay))},update_setting(){this.timerId=-1;const t=this.$refs.settings_checkbox.checked;if(t===this.value)return void(this.statusUpdate="");const s={category:this.category.name,name:this.option_name,value:t};Q.settings_update(this.category.name,s).then(()=>{this.$store.commit(p,s),this.statusUpdate="success"}).catch(()=>{this.statusUpdate="error",this.$refs.settings_checkbox.checked=this.value}).finally(()=>{this.timerId=window.setTimeout(this.clear_status,this.timerDelay)})},clear_status:function(){this.statusUpdate=""}}},od=ld,nd=Object(z["a"])(od,ed,id,!1,null,null,null),rd=nd.exports,cd=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("fieldset",{attrs:{disabled:t.disabled}},[a("div",{staticClass:"field"},[a("label",{staticClass:"label has-text-weight-normal"},[t._t("label"),a("i",{staticClass:"is-size-7",class:{"has-text-info":"success"===t.statusUpdate,"has-text-danger":"error"===t.statusUpdate}},[t._v(" "+t._s(t.info))])],2),a("div",{staticClass:"control"},[a("input",{ref:"settings_text",staticClass:"input",attrs:{type:"text",placeholder:t.placeholder},domProps:{value:t.value},on:{input:t.set_update_timer}})]),t.$slots["info"]?a("p",{staticClass:"help"},[t._t("info")],2):t._e()])])},dd=[],ud={name:"SettingsTextfield",props:["category_name","option_name","placeholder","disabled"],data(){return{timerDelay:2e3,timerId:-1,statusUpdate:""}},computed:{category(){return this.$store.state.settings.categories.find(t=>t.name===this.category_name)},option(){return this.category?this.category.options.find(t=>t.name===this.option_name):{}},value(){return this.option.value},info(){return"success"===this.statusUpdate?"(setting saved)":"error"===this.statusUpdate?"(error saving setting)":""}},methods:{set_update_timer(){this.timerId>0&&(window.clearTimeout(this.timerId),this.timerId=-1),this.statusUpdate="";const t=this.$refs.settings_text.value;t!==this.value&&(this.timerId=window.setTimeout(this.update_setting,this.timerDelay))},update_setting(){this.timerId=-1;const t=this.$refs.settings_text.value;if(t===this.value)return void(this.statusUpdate="");const s={category:this.category.name,name:this.option_name,value:t};Q.settings_update(this.category.name,s).then(()=>{this.$store.commit(p,s),this.statusUpdate="success"}).catch(()=>{this.statusUpdate="error",this.$refs.settings_text.value=this.value}).finally(()=>{this.timerId=window.setTimeout(this.clear_status,this.timerDelay)})},clear_status:function(){this.statusUpdate=""}}},pd=ud,_d=Object(z["a"])(pd,cd,dd,!1,null,null,null),md=_d.exports,hd={name:"SettingsPageWebinterface",components:{ContentWithHeading:Ts,TabsSettings:ad,SettingsCheckbox:rd,SettingsTextfield:md},computed:{settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing}}},fd=hd,vd=Object(z["a"])(fd,Qc,Jc,!1,null,null,null),yd=vd.exports,bd=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-settings"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Artwork")])]),a("template",{slot:"content"},[a("div",{staticClass:"content"},[a("p",[t._v(" forked-daapd supports PNG and JPEG artwork which is either placed as separate image files in the library, embedded in the media files or made available online by radio stations. ")]),a("p",[t._v("In addition to that, you can enable fetching artwork from the following artwork providers:")])]),t.spotify.libspotify_logged_in?a("settings-checkbox",{attrs:{category_name:"artwork",option_name:"use_artwork_source_spotify"}},[a("template",{slot:"label"},[t._v(" Spotify")])],2):t._e(),a("settings-checkbox",{attrs:{category_name:"artwork",option_name:"use_artwork_source_discogs"}},[a("template",{slot:"label"},[t._v(" Discogs ("),a("a",{attrs:{href:"https://www.discogs.com/"}},[t._v("https://www.discogs.com/")]),t._v(")")])],2),a("settings-checkbox",{attrs:{category_name:"artwork",option_name:"use_artwork_source_coverartarchive"}},[a("template",{slot:"label"},[t._v(" Cover Art Archive ("),a("a",{attrs:{href:"https://coverartarchive.org/"}},[t._v("https://coverartarchive.org/")]),t._v(")")])],2)],1)],2)],1)},gd=[],kd={name:"SettingsPageArtwork",components:{ContentWithHeading:Ts,TabsSettings:ad,SettingsCheckbox:rd},computed:{spotify(){return this.$store.state.spotify}}},Cd=kd,wd=Object(z["a"])(Cd,bd,gd,!1,null,null,null),xd=wd.exports,$d=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-settings"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Spotify")])]),a("template",{slot:"content"},[t.spotify.libspotify_installed?t._e():a("div",{staticClass:"notification is-size-7"},[a("p",[t._v("forked-daapd was either built without support for Spotify or libspotify is not installed.")])]),t.spotify.libspotify_installed?a("div",[a("div",{staticClass:"notification is-size-7"},[a("b",[t._v("You must have a Spotify premium account")]),t._v(". If you normally log into Spotify with your Facebook account you must first go to Spotify's web site where you can get the Spotify username and password that matches your account. ")]),a("div",[a("p",{staticClass:"content"},[a("b",[t._v("libspotify")]),t._v(" - Login with your Spotify username and password ")]),t.spotify.libspotify_logged_in?a("p",{staticClass:"fd-has-margin-bottom"},[t._v(" Logged in as "),a("b",[a("code",[t._v(t._s(t.spotify.libspotify_user))])])]):t._e(),t.spotify.libspotify_installed&&!t.spotify.libspotify_logged_in?a("form",{on:{submit:function(s){return s.preventDefault(),t.login_libspotify(s)}}},[a("div",{staticClass:"field is-grouped"},[a("div",{staticClass:"control is-expanded"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.libspotify.user,expression:"libspotify.user"}],staticClass:"input",attrs:{type:"text",placeholder:"Username"},domProps:{value:t.libspotify.user},on:{input:function(s){s.target.composing||t.$set(t.libspotify,"user",s.target.value)}}}),a("p",{staticClass:"help is-danger"},[t._v(t._s(t.libspotify.errors.user))])]),a("div",{staticClass:"control is-expanded"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.libspotify.password,expression:"libspotify.password"}],staticClass:"input",attrs:{type:"password",placeholder:"Password"},domProps:{value:t.libspotify.password},on:{input:function(s){s.target.composing||t.$set(t.libspotify,"password",s.target.value)}}}),a("p",{staticClass:"help is-danger"},[t._v(t._s(t.libspotify.errors.password))])]),a("div",{staticClass:"control"},[a("button",{staticClass:"button is-info"},[t._v("Login")])])])]):t._e(),a("p",{staticClass:"help is-danger"},[t._v(t._s(t.libspotify.errors.error))]),a("p",{staticClass:"help"},[t._v(" libspotify enables forked-daapd to play Spotify tracks. ")]),a("p",{staticClass:"help"},[t._v(" forked-daapd will not store your password, but will still be able to log you in automatically afterwards, because libspotify saves a login token. ")])]),a("div",{staticClass:"fd-has-margin-top"},[a("p",{staticClass:"content"},[a("b",[t._v("Spotify Web API")]),t._v(" - Grant access to the Spotify Web API ")]),t.spotify.webapi_token_valid?a("p",[t._v(" Access granted for "),a("b",[a("code",[t._v(t._s(t.spotify.webapi_user))])])]):t._e(),t.spotify_missing_scope.length>0?a("p",{staticClass:"help is-danger"},[t._v(" Please reauthorize Web API access to grant forked-daapd the following additional access rights: "),a("b",[a("code",[t._v(t._s(t._f("join")(t.spotify_missing_scope)))])])]):t._e(),a("div",{staticClass:"field fd-has-margin-top "},[a("div",{staticClass:"control"},[a("a",{staticClass:"button",class:{"is-info":!t.spotify.webapi_token_valid||t.spotify_missing_scope.length>0},attrs:{href:t.spotify.oauth_uri}},[t._v("Authorize Web API access")])])]),a("p",{staticClass:"help"},[t._v(" Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are "),a("code",[t._v(t._s(t._f("join")(t.spotify_required_scope)))]),t._v(". ")])])]):t._e()])],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Last.fm")])]),a("template",{slot:"content"},[t.lastfm.enabled?t._e():a("div",{staticClass:"notification is-size-7"},[a("p",[t._v("forked-daapd was built without support for Last.fm.")])]),t.lastfm.enabled?a("div",[a("p",{staticClass:"content"},[a("b",[t._v("Last.fm")]),t._v(" - Login with your Last.fm username and password to enable scrobbling ")]),t.lastfm.scrobbling_enabled?a("div",[a("a",{staticClass:"button",on:{click:t.logoutLastfm}},[t._v("Stop scrobbling")])]):t._e(),t.lastfm.scrobbling_enabled?t._e():a("div",[a("form",{on:{submit:function(s){return s.preventDefault(),t.login_lastfm(s)}}},[a("div",{staticClass:"field is-grouped"},[a("div",{staticClass:"control is-expanded"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.lastfm_login.user,expression:"lastfm_login.user"}],staticClass:"input",attrs:{type:"text",placeholder:"Username"},domProps:{value:t.lastfm_login.user},on:{input:function(s){s.target.composing||t.$set(t.lastfm_login,"user",s.target.value)}}}),a("p",{staticClass:"help is-danger"},[t._v(t._s(t.lastfm_login.errors.user))])]),a("div",{staticClass:"control is-expanded"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.lastfm_login.password,expression:"lastfm_login.password"}],staticClass:"input",attrs:{type:"password",placeholder:"Password"},domProps:{value:t.lastfm_login.password},on:{input:function(s){s.target.composing||t.$set(t.lastfm_login,"password",s.target.value)}}}),a("p",{staticClass:"help is-danger"},[t._v(t._s(t.lastfm_login.errors.password))])]),a("div",{staticClass:"control"},[a("button",{staticClass:"button is-info",attrs:{type:"submit"}},[t._v("Login")])])]),a("p",{staticClass:"help is-danger"},[t._v(t._s(t.lastfm_login.errors.error))]),a("p",{staticClass:"help"},[t._v(" forked-daapd will not store your Last.fm username/password, only the session key. The session key does not expire. ")])])])]):t._e()])],2)],1)},qd=[],Ad={name:"SettingsPageOnlineServices",components:{ContentWithHeading:Ts,TabsSettings:ad},data(){return{libspotify:{user:"",password:"",errors:{user:"",password:"",error:""}},lastfm_login:{user:"",password:"",errors:{user:"",password:"",error:""}}}},computed:{lastfm(){return this.$store.state.lastfm},spotify(){return this.$store.state.spotify},spotify_required_scope(){return this.spotify.webapi_token_valid&&this.spotify.webapi_granted_scope&&this.spotify.webapi_required_scope?this.spotify.webapi_required_scope.split(" "):[]},spotify_missing_scope(){return this.spotify.webapi_token_valid&&this.spotify.webapi_granted_scope&&this.spotify.webapi_required_scope?this.spotify.webapi_required_scope.split(" ").filter(t=>this.spotify.webapi_granted_scope.indexOf(t)<0):[]}},methods:{login_libspotify(){Q.spotify_login(this.libspotify).then(t=>{this.libspotify.user="",this.libspotify.password="",this.libspotify.errors.user="",this.libspotify.errors.password="",this.libspotify.errors.error="",t.data.success||(this.libspotify.errors.user=t.data.errors.user,this.libspotify.errors.password=t.data.errors.password,this.libspotify.errors.error=t.data.errors.error)})},login_lastfm(){Q.lastfm_login(this.lastfm_login).then(t=>{this.lastfm_login.user="",this.lastfm_login.password="",this.lastfm_login.errors.user="",this.lastfm_login.errors.password="",this.lastfm_login.errors.error="",t.data.success||(this.lastfm_login.errors.user=t.data.errors.user,this.lastfm_login.errors.password=t.data.errors.password,this.lastfm_login.errors.error=t.data.errors.error)})},logoutLastfm(){Q.lastfm_logout()}},filters:{join(t){return t.join(", ")}}},Sd=Ad,jd=Object(z["a"])(Sd,$d,qd,!1,null,null,null),Pd=jd.exports,Td=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",[a("tabs-settings"),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Remote Pairing")])]),a("template",{slot:"content"},[t.pairing.active?a("div",{staticClass:"notification"},[a("form",{on:{submit:function(s){return s.preventDefault(),t.kickoff_pairing(s)}}},[a("label",{staticClass:"label has-text-weight-normal"},[t._v(" Remote pairing request from "),a("b",[t._v(t._s(t.pairing.remote))])]),a("div",{staticClass:"field is-grouped"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.pairing_req.pin,expression:"pairing_req.pin"}],staticClass:"input",attrs:{type:"text",placeholder:"Enter pairing code"},domProps:{value:t.pairing_req.pin},on:{input:function(s){s.target.composing||t.$set(t.pairing_req,"pin",s.target.value)}}})]),a("div",{staticClass:"control"},[a("button",{staticClass:"button is-info",attrs:{type:"submit"}},[t._v("Send")])])])])]):t._e(),t.pairing.active?t._e():a("div",{staticClass:"content"},[a("p",[t._v("No active pairing request.")])])])],2),a("content-with-heading",[a("template",{slot:"heading-left"},[a("div",{staticClass:"title is-4"},[t._v("Device Verification")])]),a("template",{slot:"content"},[a("p",{staticClass:"content"},[t._v(" If your Apple TV requires device verification then activate the device below and enter the PIN that the Apple TV displays. ")]),t._l(t.outputs,(function(s){return a("div",{key:s.id},[a("div",{staticClass:"field"},[a("div",{staticClass:"control"},[a("label",{staticClass:"checkbox"},[a("input",{directives:[{name:"model",rawName:"v-model",value:s.selected,expression:"output.selected"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(s.selected)?t._i(s.selected,null)>-1:s.selected},on:{change:[function(a){var e=s.selected,i=a.target,l=!!i.checked;if(Array.isArray(e)){var o=null,n=t._i(e,o);i.checked?n<0&&t.$set(s,"selected",e.concat([o])):n>-1&&t.$set(s,"selected",e.slice(0,n).concat(e.slice(n+1)))}else t.$set(s,"selected",l)},function(a){return t.output_toggle(s.id)}]}}),t._v(" "+t._s(s.name)+" ")])])]),s.needs_auth_key?a("form",{staticClass:"fd-has-margin-bottom",on:{submit:function(a){return a.preventDefault(),t.kickoff_verification(s.id)}}},[a("div",{staticClass:"field is-grouped"},[a("div",{staticClass:"control"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.verification_req.pin,expression:"verification_req.pin"}],staticClass:"input",attrs:{type:"text",placeholder:"Enter verification code"},domProps:{value:t.verification_req.pin},on:{input:function(s){s.target.composing||t.$set(t.verification_req,"pin",s.target.value)}}})]),a("div",{staticClass:"control"},[a("button",{staticClass:"button is-info",attrs:{type:"submit"}},[t._v("Verify")])])])]):t._e()])}))],2)],2)],1)},Ld=[],Od={name:"SettingsPageRemotesOutputs",components:{ContentWithHeading:Ts,TabsSettings:ad},data(){return{pairing_req:{pin:""},verification_req:{pin:""}}},computed:{pairing(){return this.$store.state.pairing},outputs(){return this.$store.state.outputs}},methods:{kickoff_pairing(){Q.pairing_kickoff(this.pairing_req)},output_toggle(t){Q.output_toggle(t)},kickoff_verification(t){Q.output_update(t,this.verification_req)}},filters:{}},Ed=Od,Id=Object(z["a"])(Ed,Td,Ld,!1,null,null,null),zd=Id.exports;e["a"].use(ws["a"]);const Dd=new ws["a"]({routes:[{path:"/",name:"PageQueue",component:ca},{path:"/about",name:"About",component:ir},{path:"/now-playing",name:"Now playing",component:$a},{path:"/music",redirect:"/music/browse"},{path:"/music/browse",name:"Browse",component:Se,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/browse/recently_added",name:"Browse Recently Added",component:Ie,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/browse/recently_played",name:"Browse Recently Played",component:He,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/artists",name:"Artists",component:qi,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/artists/:artist_id",name:"Artist",component:Oi,meta:{show_progress:!0}},{path:"/music/artists/:artist_id/tracks",name:"Tracks",component:El,meta:{show_progress:!0,has_index:!0}},{path:"/music/albums",name:"Albums",component:Mi,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/albums/:album_id",name:"Album",component:Vi,meta:{show_progress:!0}},{path:"/music/genres",name:"Genres",component:_l,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/music/genres/:genre",name:"Genre",component:gl,meta:{show_progress:!0,has_index:!0}},{path:"/music/genres/:genre/tracks",name:"GenreTracks",component:Al,meta:{show_progress:!0,has_index:!0}},{path:"/podcasts",name:"Podcasts",component:Yl,meta:{show_progress:!0}},{path:"/podcasts/:album_id",name:"Podcast",component:to,meta:{show_progress:!0}},{path:"/audiobooks",redirect:"/audiobooks/artists"},{path:"/audiobooks/artists",name:"AudiobooksArtists",component:ko,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/audiobooks/artists/:artist_id",name:"AudiobooksArtist",component:So,meta:{show_progress:!0}},{path:"/audiobooks/albums",name:"AudiobooksAlbums",component:mo,meta:{show_progress:!0,has_tabs:!0,has_index:!0}},{path:"/audiobooks/:album_id",name:"Audiobook",component:Io,meta:{show_progress:!0}},{path:"/radio",name:"Radio",component:Mn,meta:{show_progress:!0}},{path:"/files",name:"Files",component:On,meta:{show_progress:!0}},{path:"/playlists",redirect:"/playlists/0"},{path:"/playlists/:playlist_id",name:"Playlists",component:nn,meta:{show_progress:!0}},{path:"/playlists/:playlist_id/tracks",name:"Playlist",component:mn,meta:{show_progress:!0}},{path:"/search",redirect:"/search/library"},{path:"/search/library",name:"Search Library",component:Xn},{path:"/music/spotify",name:"Spotify",component:Ir,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/new-releases",name:"Spotify Browse New Releases",component:Hr,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/featured-playlists",name:"Spotify Browse Featured Playlists",component:Qr,meta:{show_progress:!0,has_tabs:!0}},{path:"/music/spotify/artists/:artist_id",name:"Spotify Artist",component:dc,meta:{show_progress:!0}},{path:"/music/spotify/albums/:album_id",name:"Spotify Album",component:jc,meta:{show_progress:!0}},{path:"/music/spotify/playlists/:playlist_id",name:"Spotify Playlist",component:zc,meta:{show_progress:!0}},{path:"/search/spotify",name:"Spotify Search",component:Vc},{path:"/settings/webinterface",name:"Settings Webinterface",component:yd},{path:"/settings/artwork",name:"Settings Artwork",component:xd},{path:"/settings/online-services",name:"Settings Online Services",component:Pd},{path:"/settings/remotes-outputs",name:"Settings Remotes Outputs",component:zd}],scrollBehavior(t,s,a){return a?new Promise((t,s)=>{setTimeout(()=>{t(a)},10)}):t.path===s.path&&t.hash?{selector:t.hash,offset:{x:0,y:120}}:t.hash?new Promise((s,a)=>{setTimeout(()=>{s({selector:t.hash,offset:{x:0,y:120}})},10)}):t.meta.has_index?new Promise((s,a)=>{setTimeout(()=>{t.meta.has_tabs?s({selector:"#top",offset:{x:0,y:140}}):s({selector:"#top",offset:{x:0,y:100}})},10)}):{x:0,y:0}}});Dd.beforeEach((t,s,a)=>V.state.show_burger_menu?(V.commit(L,!1),void a(!1)):V.state.show_player_menu?(V.commit(O,!1),void a(!1)):void a(!0));var Nd=a("4623"),Rd=a.n(Nd);Rd()(ys.a),e["a"].filter("duration",(function(t,s){return s?ys.a.duration(t).format(s):ys.a.duration(t).format("hh:*mm:ss")})),e["a"].filter("time",(function(t,s){return s?ys()(t).format(s):ys()(t).format()})),e["a"].filter("timeFromNow",(function(t,s){return ys()(t).fromNow(s)})),e["a"].filter("number",(function(t){return t.toLocaleString()})),e["a"].filter("channels",(function(t){return 1===t?"mono":2===t?"stereo":t?t+" channels":""}));var Md=a("26b9"),Ud=a.n(Md);e["a"].use(Ud.a,{color:"hsl(204, 86%, 53%)",failedColor:"red",height:"1px"});var Hd=a("c28b"),Wd=a.n(Hd),Bd=a("3659"),Fd=a.n(Bd),Gd=a("85fe"),Yd=a("f13c"),Vd=a.n(Yd);a("de2f"),a("2760"),a("a848");e["a"].config.productionTip=!1,e["a"].use(Wd.a),e["a"].use(Fd.a),e["a"].use(Gd["a"]),e["a"].use(Vd.a),new e["a"]({el:"#app",router:Dd,store:V,components:{App:Cs},template:"<App/>"})},a848:function(t,s,a){},cf45:function(t,s,a){"use strict";var e=a("53c4"),i=a.n(e);i.a},e6a4:function(t,s){},fd4d:function(t,s,a){"use strict";var e=a("2c75"),i=a("4178"),l=a("2877"),o=Object(l["a"])(i["default"],e["a"],e["b"],!1,null,null,null);s["default"]=o.exports}});
//# sourceMappingURL=app.js.map