diff --git a/public/js/bundle.js b/public/js/bundle.js index 6534401..a9f0296 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -13,7 +13,7 @@ var e=Object.freeze({});function t(e){return null==e}function n(e){return null!= * vuex v3.5.1 * (c) 2020 Evan You * @license MIT - */;var Ql=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function Kl(e,t){if(void 0===t&&(t=[]),null===e||"object"!=typeof e)return e;var n,a=(n=function(t){return t.original===e},t.filter(n)[0]);if(a)return a.copy;var i=Array.isArray(e)?[]:{};return t.push({original:e,copy:i}),Object.keys(e).forEach((function(n){i[n]=Kl(e[n],t)})),i}function Yl(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Jl(e){return null!==e&&"object"==typeof e}var Xl=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},Zl={namespaced:{configurable:!0}};Zl.namespaced.get=function(){return!!this._rawModule.namespaced},Xl.prototype.addChild=function(e,t){this._children[e]=t},Xl.prototype.removeChild=function(e){delete this._children[e]},Xl.prototype.getChild=function(e){return this._children[e]},Xl.prototype.hasChild=function(e){return e in this._children},Xl.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Xl.prototype.forEachChild=function(e){Yl(this._children,e)},Xl.prototype.forEachGetter=function(e){this._rawModule.getters&&Yl(this._rawModule.getters,e)},Xl.prototype.forEachAction=function(e){this._rawModule.actions&&Yl(this._rawModule.actions,e)},Xl.prototype.forEachMutation=function(e){this._rawModule.mutations&&Yl(this._rawModule.mutations,e)},Object.defineProperties(Xl.prototype,Zl);var ec,tc=function(e){this.register([],e,!1)};tc.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},tc.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},tc.prototype.update=function(e){!function e(t,n,a){if(n.update(a),a.modules)for(var i in a.modules){if(!n.getChild(i))return;e(t.concat(i),n.getChild(i),a.modules[i])}}([],this.root,e)},tc.prototype.register=function(e,t,n){var a=this;void 0===n&&(n=!0);var i=new Xl(t,n);0===e.length?this.root=i:this.get(e.slice(0,-1)).addChild(e[e.length-1],i);t.modules&&Yl(t.modules,(function(t,i){a.register(e.concat(i),t,n)}))},tc.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],a=t.getChild(n);a&&a.runtime&&t.removeChild(n)},tc.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return t.hasChild(n)};var nc=function(e){var t=this;void 0===e&&(e={}),!ec&&"undefined"!=typeof window&&window.Vue&&dc(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var a=e.strict;void 0===a&&(a=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new tc(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new ec,this._makeLocalGettersCache=Object.create(null);var i=this,r=this.dispatch,s=this.commit;this.dispatch=function(e,t){return r.call(i,e,t)},this.commit=function(e,t,n){return s.call(i,e,t,n)},this.strict=a;var o=this._modules.root.state;oc(this,o,[],this._modules.root),sc(this,o),n.forEach((function(e){return e(t)})),(void 0!==e.devtools?e.devtools:ec.config.devtools)&&function(e){Ql&&(e._devtoolHook=Ql,Ql.emit("vuex:init",e),Ql.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){Ql.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){Ql.emit("vuex:action",e,t)}),{prepend:!0}))}(this)},ac={state:{configurable:!0}};function ic(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function rc(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;oc(e,n,[],e._modules.root,!0),sc(e,n,t)}function sc(e,t,n){var a=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,r={};Yl(i,(function(t,n){r[n]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=ec.config.silent;ec.config.silent=!0,e._vm=new ec({data:{$$state:t},computed:r}),ec.config.silent=s,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(e),a&&(n&&e._withCommit((function(){a._data.$$state=null})),ec.nextTick((function(){return a.$destroy()})))}function oc(e,t,n,a,i){var r=!n.length,s=e._modules.getNamespace(n);if(a.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=a),!r&&!i){var o=lc(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){ec.set(o,l,a.state)}))}var c=a.context=function(e,t,n){var a=""===t,i={dispatch:a?e.dispatch:function(n,a,i){var r=cc(n,a,i),s=r.payload,o=r.options,l=r.type;return o&&o.root||(l=t+l),e.dispatch(l,s)},commit:a?e.commit:function(n,a,i){var r=cc(n,a,i),s=r.payload,o=r.options,l=r.type;o&&o.root||(l=t+l),e.commit(l,s,o)}};return Object.defineProperties(i,{getters:{get:a?function(){return e.getters}:function(){return function(e,t){if(!e._makeLocalGettersCache[t]){var n={},a=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,a)===t){var r=i.slice(a);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}(e,t)}},state:{get:function(){return lc(e.state,n)}}}),i}(e,s,n);a.forEachMutation((function(t,n){!function(e,t,n,a){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,a.state,t)}))}(e,s+n,t,c)})),a.forEachAction((function(t,n){var a=t.root?n:s+n,i=t.handler||t;!function(e,t,n,a){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i,r=n.call(e,{dispatch:a.dispatch,commit:a.commit,getters:a.getters,state:a.state,rootGetters:e.getters,rootState:e.state},t);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,a,i,c)})),a.forEachGetter((function(t,n){!function(e,t,n,a){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(a.state,a.getters,e.state,e.getters)}}(e,s+n,t,c)})),a.forEachChild((function(a,r){oc(e,t,n.concat(r),a,i)}))}function lc(e,t){return t.reduce((function(e,t){return e[t]}),e)}function cc(e,t,n){return Jl(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function dc(e){ec&&e===ec||function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:n});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[n].concat(e.init):n,t.call(this,e)}}function n(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(ec=e)}ac.state.get=function(){return this._vm._data.$$state},ac.state.set=function(e){},nc.prototype.commit=function(e,t,n){var a=this,i=cc(e,t,n),r=i.type,s=i.payload,o={type:r,payload:s},l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(o,a.state)})))},nc.prototype.dispatch=function(e,t){var n=this,a=cc(e,t),i=a.type,r=a.payload,s={type:i,payload:r},o=this._actions[i];if(o){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(e){}var l=o.length>1?Promise.all(o.map((function(e){return e(r)}))):o[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(e){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(e){}t(e)}))}))}},nc.prototype.subscribe=function(e,t){return ic(e,this._subscribers,t)},nc.prototype.subscribeAction=function(e,t){return ic("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},nc.prototype.watch=function(e,t,n){var a=this;return this._watcherVM.$watch((function(){return e(a.state,a.getters)}),t,n)},nc.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},nc.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),oc(this,this.state,e,this._modules.get(e),n.preserveState),sc(this,this.state)},nc.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=lc(t.state,e.slice(0,-1));ec.delete(n,e[e.length-1])})),rc(this)},nc.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},nc.prototype.hotUpdate=function(e){this._modules.update(e),rc(this,!0)},nc.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(nc.prototype,ac);var uc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;n[a]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var a=vc(this.$store,"mapState",e);if(!a)return;t=a.context.state,n=a.context.getters}return"function"==typeof i?i.call(this,t,n):t[i]},n[a].vuex=!0})),n})),pc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;n[a]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var a=this.$store.commit;if(e){var r=vc(this.$store,"mapMutations",e);if(!r)return;a=r.context.commit}return"function"==typeof i?i.apply(this,[a].concat(t)):a.apply(this.$store,[i].concat(t))}})),n})),hc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;i=e+i,n[a]=function(){if(!e||vc(this.$store,"mapGetters",e))return this.$store.getters[i]},n[a].vuex=!0})),n})),mc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;n[a]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var a=this.$store.dispatch;if(e){var r=vc(this.$store,"mapActions",e);if(!r)return;a=r.context.dispatch}return"function"==typeof i?i.apply(this,[a].concat(t)):a.apply(this.$store,[i].concat(t))}})),n}));function fc(e){return function(e){return Array.isArray(e)||Jl(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function gc(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function vc(e,t,n){return e._modulesNamespaceMap[n]}function bc(e,t,n){var a=n?e.groupCollapsed:e.group;try{a.call(e,t)}catch(n){e.log(t)}}function yc(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function _c(){var e=new Date;return" @ "+kc(e.getHours(),2)+":"+kc(e.getMinutes(),2)+":"+kc(e.getSeconds(),2)+"."+kc(e.getMilliseconds(),3)}function kc(e,t){return function(e,t){return new Array(t+1).join(e)}("0",t-e.toString().length)+e}var Ac={Store:nc,install:dc,version:"3.5.1",mapState:uc,mapMutations:pc,mapGetters:hc,mapActions:mc,createNamespacedHelpers:function(e){return{mapState:uc.bind(null,e),mapGetters:hc.bind(null,e),mapMutations:pc.bind(null,e),mapActions:mc.bind(null,e)}},createLogger:function(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var a=e.transformer;void 0===a&&(a=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var r=e.actionFilter;void 0===r&&(r=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var o=e.logMutations;void 0===o&&(o=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=Kl(e.state);void 0!==c&&(o&&e.subscribe((function(e,r){var s=Kl(r);if(n(e,d,s)){var o=_c(),l=i(e),u="mutation "+e.type+o;bc(c,u,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",a(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",a(s)),yc(c)}d=s})),l&&e.subscribeAction((function(e,n){if(r(e,n)){var a=_c(),i=s(e),o="action "+e.type+a;bc(c,o,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),yc(c)}})))}}};let wc=!1;var Cc={state:{albums:{data:[],total:0},artists:{data:[],total:0},playlists:{data:[],total:0},podcasts:{data:[],total:0},tracks:{data:[],total:0}},actions:{cacheHomeData({commit:e},t){wc||(e("SET_HOME_ALBUMS",t.albums),e("SET_HOME_ARTISTS",t.artists),e("SET_HOME_PLAYLISTS",t.playlists),e("SET_HOME_PODCASTS",t.podcasts),e("SET_HOME_TRACKS",t.tracks),wc=!0)}},getters:{getHomeData:e=>e,getHomeAlbums:e=>e.albums,getHomeArtists:e=>e.artists,getHomePlaylists:e=>e.playlists,getHomePodcasts:e=>e.podcasts,getHomeTracks:e=>e.tracks},mutations:{SET_HOME_ALBUMS:(e,t)=>{kn.set(e.albums,"data",t.data),e.albums.total=t.total},SET_HOME_ARTISTS:(e,t)=>{kn.set(e.artists,"data",t.data),e.artists.total=t.total},SET_HOME_PLAYLISTS:(e,t)=>{kn.set(e.playlists,"data",t.data),e.playlists.total=t.total},SET_HOME_PODCASTS:(e,t)=>{kn.set(e.podcasts,"data",t.data),e.podcasts.total=t.total},SET_HOME_TRACKS:(e,t)=>{kn.set(e.tracks,"data",t.data),e.tracks.total=t.total}}};var xc={state:{},actions:{setSettings({commit:e},t){for(const n in t){if(!t.hasOwnProperty(n))return;e("SET_UNKNOWN_SETTING",{settingName:n,settingValue:t[n]})}}},getters:{getSettings:e=>e},mutations:{SET_UNKNOWN_SETTING(e,t){kn.set(e,t.settingName,t.settingValue)}}};var Tc={state:{},actions:{setDefaultSettings({commit:e},t){for(const n in t){if(!t.hasOwnProperty(n))return;e("SET_UNKNOWN_DEFAULT_SETTING",{settingName:n,settingValue:t[n]})}}},getters:{getDefaultSettings:e=>e},mutations:{SET_UNKNOWN_DEFAULT_SETTING(e,t){kn.set(e,t.settingName,t.settingValue)}}};var Sc={state:{clientId:"",clientSecret:""},getters:{getCredentials:e=>e},actions:{setCredentials({commit:e},t){e("SET_CLIENT_ID",t.clientId),e("SET_CLIENT_SECRET",t.clientSecret)}},mutations:{SET_CLIENT_ID(e,t){e.clientId=t},SET_CLIENT_SECRET(e,t){e.clientSecret=t}}};let zc=!1;var Mc={state:{list:[]},getters:{getCharts:e=>e.list},actions:{cacheCharts({commit:e},t){zc||(t.forEach((t,n)=>{e("SET_UNKNOWN_CHART",{index:n,chartObj:t})}),zc=!0)}},mutations:{SET_UNKNOWN_CHART(e,t){kn.set(e.list,t.index,t.chartObj)}}};var Dc={state:{albums:[],artists:[],playlists:[],tracks:[]},actions:{setFavorites({commit:e,dispatch:t},n){n.playlists.forEach((t,n)=>{e("SET_FAVORITES_PLAYLISTS",{index:n,data:t})}),n.albums.forEach((t,n)=>{e("SET_FAVORITES_ALBUMS",{index:n,data:t})}),n.artists.forEach((t,n)=>{e("SET_FAVORITES_ARTISTS",{index:n,data:t})}),t("setFavoritesTracks",n.tracks)},setFavoritesTracks({commit:e},t){t.forEach((t,n)=>{e("SET_FAVORITES_TRACKS",{index:n,data:t})})}},getters:{getFavorites:e=>e,getFavoritesAlbums:e=>e.albums,getFavoritesArtists:e=>e.artists,getFavoritesPlaylists:e=>e.playlists,getFavoritesTracks:e=>e.tracks},mutations:{SET_FAVORITES_ALBUMS:(e,t)=>{kn.set(e.albums,t.index,t.data)},SET_FAVORITES_ARTISTS:(e,t)=>{kn.set(e.artists,t.index,t.data)},SET_FAVORITES_PLAYLISTS:(e,t)=>{kn.set(e.playlists,t.index,t.data)},SET_FAVORITES_TRACKS:(e,t)=>{kn.set(e.tracks,t.index,t.data)}}};var $c={state:{currentCommit:null,latestCommit:null,updateAvailable:!1,deemixVersion:null},getters:{getAboutInfo:e=>e},actions:{setAboutInfo({commit:e},t){e("SET_CURRENT_COMMIT",t.currentCommit),e("SET_LATEST_COMMIT",t.latestCommit),e("SET_UPDATE_AVAILABLE",t.updateAvailable),e("SET_DEEMIX_VERSION",t.deemixVersion)}},mutations:{SET_CURRENT_COMMIT:(e,t)=>{e.currentCommit=t},SET_LATEST_COMMIT:(e,t)=>{e.latestCommit=t},SET_UPDATE_AVAILABLE:(e,t)=>{e.updateAvailable=t},SET_DEEMIX_VERSION:(e,t)=>{e.deemixVersion=t}}};kn.use(Ac);var Nc=new Ac.Store({modules:{home:Cc,settings:xc,defaultSettings:Tc,spotifyCredentials:Sc,charts:Mc,favorites:Dc,about:$c},strict:!1});const Pc=io.connect(window.location.href);Pc.on("connect",()=>{document.getElementById("start_app_placeholder").classList.add("loading_placeholder--hidden")}),Pc.on("init_charts",e=>{}),Pc.on("init_favorites",e=>{}),Pc.on("init_settings",(e,t,n)=>{Nc.dispatch("setSettings",e),Nc.dispatch("setDefaultSettings",n),Nc.dispatch("setCredentials",t)}),Pc.on("init_home",e=>{Nc.dispatch("cacheHomeData",e)}),Pc.on("init_update",e=>{Nc.dispatch("setAboutInfo",e)});var Lc="object"==typeof global&&global&&global.Object===Object&&global,Rc="object"==typeof self&&self&&self.Object===Object&&self,Ec=Lc||Rc||Function("return this")(),Ic=Ec.Symbol,jc=Object.prototype,Fc=jc.hasOwnProperty,Oc=jc.toString,Bc=Ic?Ic.toStringTag:void 0;var qc=Object.prototype.toString;var Uc=Ic?Ic.toStringTag:void 0;function Vc(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Uc&&Uc in Object(e)?function(e){var t=Fc.call(e,Bc),n=e[Bc];try{e[Bc]=void 0;var a=!0}catch(e){}var i=Oc.call(e);return a&&(t?e[Bc]=n:delete e[Bc]),i}(e):function(e){return qc.call(e)}(e)}function Hc(e){return null!=e&&"object"==typeof e}function Gc(e){return"symbol"==typeof e||Hc(e)&&"[object Symbol]"==Vc(e)}function Wc(e,t){for(var n=-1,a=null==e?0:e.length,i=Array(a);++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function bd(e){return null!=e&&vd(e.length)&&!ed(e)}var yd=Object.prototype;function _d(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yd)}function kd(e){return Hc(e)&&"[object Arguments]"==Vc(e)}var Ad=Object.prototype,wd=Ad.hasOwnProperty,Cd=Ad.propertyIsEnumerable,xd=kd(function(){return arguments}())?kd:function(e){return Hc(e)&&wd.call(e,"callee")&&!Cd.call(e,"callee")};var Td="object"==typeof exports&&exports&&!exports.nodeType&&exports,Sd=Td&&"object"==typeof module&&module&&!module.nodeType&&module,zd=Sd&&Sd.exports===Td?Ec.Buffer:void 0,Md=(zd?zd.isBuffer:void 0)||function(){return!1},Dd={};function $d(e){return function(t){return e(t)}}Dd["[object Float32Array]"]=Dd["[object Float64Array]"]=Dd["[object Int8Array]"]=Dd["[object Int16Array]"]=Dd["[object Int32Array]"]=Dd["[object Uint8Array]"]=Dd["[object Uint8ClampedArray]"]=Dd["[object Uint16Array]"]=Dd["[object Uint32Array]"]=!0,Dd["[object Arguments]"]=Dd["[object Array]"]=Dd["[object ArrayBuffer]"]=Dd["[object Boolean]"]=Dd["[object DataView]"]=Dd["[object Date]"]=Dd["[object Error]"]=Dd["[object Function]"]=Dd["[object Map]"]=Dd["[object Number]"]=Dd["[object Object]"]=Dd["[object RegExp]"]=Dd["[object Set]"]=Dd["[object String]"]=Dd["[object WeakMap]"]=!1;var Nd="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pd=Nd&&"object"==typeof module&&module&&!module.nodeType&&module,Ld=Pd&&Pd.exports===Nd&&Lc.process,Rd=function(){try{var e=Pd&&Pd.require&&Pd.require("util").types;return e||Ld&&Ld.binding&&Ld.binding("util")}catch(e){}}(),Ed=Rd&&Rd.isTypedArray,Id=Ed?$d(Ed):function(e){return Hc(e)&&vd(e.length)&&!!Dd[Vc(e)]},jd=Object.prototype.hasOwnProperty;function Fd(e,t){var n=Qc(e),a=!n&&xd(e),i=!n&&!a&&Md(e),r=!n&&!a&&!i&&Id(e),s=n||a||i||r,o=s?function(e,t){for(var n=-1,a=Array(e);++n-1},tu.prototype.set=function(e,t){var n=this.__data__,a=Zd(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this};var nu=pd(Ec,"Map");function au(e,t){var n,a,i=e.__data__;return("string"==(a=typeof(n=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function iu(e){var t=-1,n=null==e?0:e.length;for(this.clear();++to))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var d=-1,u=!0,p=2&n?new zu:void 0;for(r.set(e,t),r.set(t,e);++dt||r&&s&&l&&!o&&!c||a&&s&&l||!n&&l||!i)return 1;if(!a&&!r&&!c&&e=o?l:l*("desc"==n[a]?-1:1)}return e.index-t.index}(e,t,n)}))}function ep(e,t,n,a){return null==e?[]:(Qc(t)||(t=null==t?[]:[t]),Qc(n=a?void 0:n)||(n=null==n?[]:[n]),Zu(e,t,n))}function tp(e,t=null){e&&Pc.emit("addToQueue",{url:e,bitrate:t},()=>{})}var np={sendAddToQueue:tp};const ap={name:"artist-tab",data:()=>({currentTab:"",sortKey:"release_date",sortOrder:"desc",title:"",image:"",type:"",link:"",head:null,body:null}),methods:{backTab:ph,albumView:uh.bind(null,"album"),reset(){this.title="Loading...",this.image="",this.type="",this.currentTab="",this.sortKey="release_date",this.sortOrder="desc",this.link="",this.head=[],this.body=null},addToQueue(e){e.stopPropagation(),np.sendAddToQueue(e.currentTarget.dataset.link)},sortBy(e){e==this.sortKey?this.sortOrder="asc"==this.sortOrder?"desc":"asc":(this.sortKey=e,this.sortOrder="asc")},changeTab(e){this.currentTab=e},getCurrentTab(){return this.currentTab},updateSelected(){window.currentStack.selected=this.currentTab},checkNewRelease(e){let t=new Date,n=new Date(e);return n.setDate(n.getDate()+3),t.setHours(0,0,0,0),t.getTime()<=n.getTime()},showArtist(e){this.reset();const{name:t,picture_xl:n,id:a,releases:i}=e;this.title=t,this.image=n,this.type="Artist",this.link="https://www.deezer.com/artist/"+a,""===this.currentTab&&(this.currentTab=Object.keys(i)[0]),this.sortKey="release_date",this.sortOrder="desc",this.head=[{title:this.$tc("globals.listTabs.title",1),sortKey:"title"},{title:this.$t("globals.listTabs.releaseDate"),sortKey:"release_date"},{title:this.$tc("globals.listTabs.track",2),sortKey:"nb_song"},{title:"",width:"32px"}],Ju(i)?this.body=null:this.body=i}},computed:{showTable(){return this.body?"nb_song"==this.sortKey?ep(this.body[this.currentTab],(function(e){return new Number(e.nb_song)}),this.sortOrder):ep(this.body[this.currentTab],this.sortKey,this.sortOrder):[]}},mounted(){console.log("artist mounted"),Pc.on("show_artist",this.showArtist),eo.$on("artistTab:updateSelected",this.updateSelected),eo.$on("artistTab:changeTab",this.changeTab)},beforeDestroy(){console.log("artist bef dest")}};var ip=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root",staticClass:"main_tabcontent fixed_footer image_header",attrs:{id:"artist_tab"}},[n("header",{staticClass:"inline-flex",style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[n("h1",[e._v(e._s(e.title))]),e._v(" "),n("div",{staticClass:"fab right",attrs:{role:"button","aria-label":"download","data-link":e.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])]),e._v(" "),n("div",{staticClass:"tab"},e._l(e.body,(function(t,a){return n("button",{key:a,staticClass:"selective",class:{active:a===e.currentTab},attrs:{href:"#artist_"+a},on:{click:function(t){return e.changeTab(a)}}},[e._v("\n\t\t\t"+e._s(e.$tc("globals.listTabs."+a,2))+"\n\t\t")])})),0),e._v(" "),n("table",{staticClass:"table"},[n("thead",[n("tr",e._l(e.head,(function(t){return n("th",{class:{"sort-asc":t.sortKey==e.sortKey&&"asc"==e.sortOrder,"sort-desc":t.sortKey==e.sortKey&&"desc"==e.sortOrder,sortable:t.sortKey,clickable:t.sortKey},style:{width:t.width?t.width:"auto"},on:{click:function(n){t.sortKey&&e.sortBy(t.sortKey)}}},[e._v("\n\t\t\t\t\t"+e._s(t.title)+"\n\t\t\t\t")])})),0)]),e._v(" "),n("tbody",e._l(e.showTable,(function(t){return n("tr",{key:t.id},[n("td",{staticClass:"inline-flex clickable",attrs:{"data-id":t.id},on:{click:e.albumView}},[n("img",{staticClass:"rounded coverart",staticStyle:{"margin-right":"16px",width:"56px",height:"56px"},attrs:{src:t.cover_small}}),e._v(" "),t.explicit_lyrics?n("i",{staticClass:"material-icons explicit_icon"},[e._v("\n\t\t\t\t\t\texplicit\n\t\t\t\t\t")]):e._e(),e._v("\n\t\t\t\t\t"+e._s(t.title)+"\n\t\t\t\t\t"),e.checkNewRelease(t.release_date)?n("i",{staticClass:"material-icons",staticStyle:{color:"#ff7300"}},[e._v("\n\t\t\t\t\t\tfiber_new\n\t\t\t\t\t")]):e._e()]),e._v(" "),n("td",[e._v(e._s(t.release_date))]),e._v(" "),n("td",[e._v(e._s(t.nb_song))]),e._v(" "),n("td",{staticClass:"clickable",attrs:{"data-link":t.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("\n\t\t\t\t\t\tfile_download\n\t\t\t\t\t")])])])})),0)]),e._v(" "),n("footer",[n("button",{staticClass:"back-button",on:{click:e.backTab}},[e._v(e._s(e.$t("globals.back")))])])])};ip._withStripped=!0;var rp=function(e,t,n,a,i,r,s,o){const l=("function"==typeof n?n.options:n)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\ArtistTab.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=a;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(n,a){return e.call(a),t(n,a)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:ip,staticRenderFns:[]},(function(e){e&&e("data-v-5fc46c94_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"ArtistTab.vue"},media:void 0})}),ap,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],n=e.styles||(e.styles={}),a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=a?i.media||"default":e,s=n[r]||(n[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let n=i.source,o=s.ids.length;if(s.ids.push(e),a&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),a&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(a&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(n),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(n),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));function sp(e){let t=e.toLowerCase();if(t.startsWith("http")){if(t.indexOf("deezer.com")>=0||t.indexOf("deezer.page.link")>=0||t.indexOf("open.spotify.com")>=0)return!0}else if(t.startsWith("spotify:"))return!0;return!1}function op(e){let t,n;return t=Math.floor(e/60),n=e-60*t,n<10&&(n="0"+n),t+":"+n}function lp(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function cp(e){const t=document.createElement("input");document.body.appendChild(t),t.setAttribute("type","text"),t.setAttribute("value",e),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()}var dp={isValidURL:sp,convertDuration:op,convertDurationSeparated:function(e){let t,n,a;return n=Math.floor(e/60),t=Math.floor(n/60),a=e-60*n,n-=60*t,[t,n,a]},numberWithDots:lp,debounce:function(e,t,n){var a;return function(){var i=this,r=arguments,s=function(){a=null,n||e.apply(i,r)},o=n&&!a;clearTimeout(a),a=setTimeout(s,t),o&&e.apply(i,r)}},COUNTRIES:{AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"}};const up={name:"tracklist-tab",data:()=>({title:"",metadata:"",release_date:"",label:"",explicit:!1,image:"",type:"empty",link:"",body:[]}),methods:{backTab:ph,artistView:uh.bind(null,"artist"),albumView:uh.bind(null,"album"),playPausePreview(e){eo.$emit("trackPreview:playPausePreview",e)},reset(){console.log("resetto"),this.title="Loading...",this.image="",this.metadata="",this.label="",this.release_date="",this.explicit=!1,this.type="empty",this.body=[]},addToQueue(e){np.sendAddToQueue(e.currentTarget.dataset.link)},toggleAll(e){this.body.forEach(t=>{"track"==t.type&&(t.selected=e.currentTarget.checked)})},selectedLinks(){var e=[];return this.body&&this.body.forEach(t=>{"track"==t.type&&t.selected&&e.push("spotifyPlaylist"==this.type?t.uri:t.link)}),e.join(";")},convertDuration:dp.convertDuration,showAlbum(e){this.reset();const{id:t,title:n,explicit_lyrics:a,label:i,artist:{name:r},tracks:s,tracks:{length:o},release_date:l,cover_xl:c}=e;this.type="album",this.link="https://www.deezer.com/album/"+t,this.title=n,this.explicit=a,this.label=i,this.metadata=`${r} • ${this.$tc("globals.listTabs.trackN",o)}`,this.release_date=l.substring(0,10),this.image=c,Ju(s)?this.body=null:this.body=s},showPlaylist(e){this.reset(),console.log(e),console.log("mandi");const{id:t,title:n,picture_xl:a,creation_date:i,creator:{name:r},tracks:s,tracks:{length:o}}=e;this.type="playlist",this.link="https://www.deezer.com/playlist/"+t,this.title=n,this.image=a,this.release_date=i.substring(0,10),this.metadata=`${this.$t("globals.by",{artist:r})} • ${this.$tc("globals.listTabs.trackN",o)}`,Ju(s)?this.body=null:this.body=s},showSpotifyPlaylist(e){this.reset();const{uri:t,name:n,images:a,images:{length:i},owner:{display_name:r},tracks:s,tracks:{length:o}}=e;this.type="spotifyPlaylist",this.link=t,this.title=n,this.image=i?a[0].url:"https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg",this.release_date="",this.metadata=`${this.$t("globals.by",{artist:r})} • ${this.$tc("globals.listTabs.trackN",o)}`,Ju(s)?this.body=null:this.body=s},selectRow(e,t){t.selected=!t.selected}},mounted(){console.log("tracklist mounted"),eo.$on("tracklistTab:selectRow",this.selectRow),Pc.on("show_album",this.showAlbum),Pc.on("show_playlist",this.showPlaylist),Pc.on("show_spotifyplaylist",this.showSpotifyPlaylist)},beforeDestroy(){console.log("tracklist bef dest")}};var pp=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root",staticClass:"main_tabcontent fixed_footer image_header",attrs:{id:"tracklist_tab"}},[n("header",{style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[n("h1",{staticClass:"inline-flex"},[e._v("\n\t\t\t"+e._s(e.title)+" "),e.explicit?n("i",{staticClass:"material-icons explicit_icon explicit_icon--right"},[e._v("explicit")]):e._e()]),e._v(" "),n("h2",{staticClass:"inline-flex"},[e.metadata?n("span",[e._v(e._s(e.metadata))]):e._e(),e._v(" "),e.release_date?n("span",{staticClass:"right"},[e._v(e._s(e.release_date))]):e._e()])]),e._v(" "),n("table",{staticClass:"table table--tracklist"},[n("thead",[n("tr",[e._m(0),e._v(" "),n("th",[e._v("#")]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),"playlist"===e.type?n("th",[e._v(e._s(e.$tc("globals.listTabs.album",1)))]):e._e(),e._v(" "),e._m(1),e._v(" "),n("th",{staticClass:"table__icon table__cell--center clickable"},[n("input",{staticClass:"selectAll",attrs:{type:"checkbox"},on:{click:e.toggleAll}})])])]),e._v(" "),n("tbody",["spotifyPlaylist"!==e.type?[e._l(e.body,(function(t,a){return["track"==t.type?n("tr",{on:{click:function(n){return e.selectRow(a,t)}}},[n("td",{staticClass:"table__cell--x-small table__cell--center"},[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[n("i",e._g({staticClass:"material-icons",class:{preview_playlist_controls:t.preview,disabled:!t.preview},attrs:{"data-preview":t.preview,title:e.$t("globals.play_hint")}},{click:!!t.preview&&e.playPausePreview}),[e._v("\n\t\t\t\t\t\t\t\t\tplay_arrow\n\t\t\t\t\t\t\t\t")])])]),e._v(" "),n("td",{staticClass:"table__cell--small table__cell--center track_position"},[e._v("\n\t\t\t\t\t\t\t"+e._s("album"===e.type?t.track_position:e.body.indexOf(t)+1)+"\n\t\t\t\t\t\t")]),e._v(" "),n("td",{staticClass:"table__cell--large table__cell--with-icon"},[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[t.explicit_lyrics?n("i",{staticClass:"material-icons explicit_icon"},[e._v("\n\t\t\t\t\t\t\t\t\texplicit\n\t\t\t\t\t\t\t\t")]):e._e(),e._v("\n\t\t\t\t\t\t\t\t"+e._s(t.title+(t.title_version&&-1==t.title.indexOf(t.title_version)?" "+t.title_version:""))+"\n\t\t\t\t\t\t\t")])]),e._v(" "),n("td",{staticClass:"table__cell--medium table__cell--center clickable",attrs:{"data-id":t.artist.id},on:{click:e.artistView}},[e._v("\n\t\t\t\t\t\t\t"+e._s(t.artist.name)+"\n\t\t\t\t\t\t")]),e._v(" "),"playlist"==e.type?n("td",{staticClass:"table__cell--medium table__cell--center clickable",attrs:{"data-id":t.album.id},on:{click:e.albumView}},[e._v("\n\t\t\t\t\t\t\t"+e._s(t.album.title)+"\n\t\t\t\t\t\t")]):e._e(),e._v(" "),n("td",{staticClass:"table__cell--center",class:{"table__cell--small":"album"===e.type,"table__cell--x-small":"playlist"===e.type}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.convertDuration(t.duration))+"\n\t\t\t\t\t\t")]),e._v(" "),n("td",{staticClass:"table__icon table__cell--center"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"track.selected"}],staticClass:"clickable",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.selected)?e._i(t.selected,null)>-1:t.selected},on:{change:function(n){var a=t.selected,i=n.target,r=!!i.checked;if(Array.isArray(a)){var s=e._i(a,null);i.checked?s<0&&e.$set(t,"selected",a.concat([null])):s>-1&&e.$set(t,"selected",a.slice(0,s).concat(a.slice(s+1)))}else e.$set(t,"selected",r)}}})])]):"disc_separator"==t.type?n("tr",{staticClass:"table__row-no-highlight",staticStyle:{opacity:"0.54"}},[e._m(2,!0),e._v(" "),n("td",{staticClass:"table__cell--center"},[e._v("\n\t\t\t\t\t\t\t"+e._s(t.number)+"\n\t\t\t\t\t\t")]),e._v(" "),n("td",{attrs:{colspan:"4"}})]):e._e()]}))]:e._l(e.body,(function(t,a){return n("tr",[n("td",[t.preview_url?n("i",{class:"material-icons"+(t.preview_url?" preview_playlist_controls":""),attrs:{"data-preview":t.preview_url,title:e.$t("globals.play_hint")},on:{click:e.playPausePreview}},[e._v("\n\t\t\t\t\t\t\tplay_arrow\n\t\t\t\t\t\t")]):n("i",{staticClass:"material-icons disabled"},[e._v("play_arrow")])]),e._v(" "),n("td",[e._v(e._s(a+1))]),e._v(" "),n("td",{staticClass:"inline-flex"},[t.explicit?n("i",{staticClass:"material-icons explicit_icon"},[e._v("explicit")]):e._e(),e._v("\n\t\t\t\t\t\t"+e._s(t.name)+"\n\t\t\t\t\t")]),e._v(" "),n("td",[e._v(e._s(t.artists[0].name))]),e._v(" "),n("td",[e._v(e._s(t.album.name))]),e._v(" "),n("td",[e._v(e._s(e.convertDuration(Math.floor(t.duration_ms/1e3))))]),e._v(" "),n("td",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"track.selected"}],staticClass:"clickable",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.selected)?e._i(t.selected,null)>-1:t.selected},on:{change:function(n){var a=t.selected,i=n.target,r=!!i.checked;if(Array.isArray(a)){var s=e._i(a,null);i.checked?s<0&&e.$set(t,"selected",a.concat([null])):s>-1&&e.$set(t,"selected",a.slice(0,s).concat(a.slice(s+1)))}else e.$set(t,"selected",r)}}})])])}))],2)]),e._v(" "),e.label?n("span",{staticStyle:{opacity:"0.4","margin-top":"8px",display:"inline-block","font-size":"13px"}},[e._v(e._s(e.label))]):e._e(),e._v(" "),n("footer",[n("button",{attrs:{"data-link":e.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[e._v("\n\t\t\t"+e._s(""+e.$t("globals.download",{thing:e.$tc("globals.listTabs."+e.type,1)}))+"\n\t\t")]),e._v(" "),n("button",{staticClass:"with_icon",attrs:{"data-link":e.selectedLinks()},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[e._v("\n\t\t\t"+e._s(e.$t("tracklist.downloadSelection"))),n("i",{staticClass:"material-icons"},[e._v("file_download")])]),e._v(" "),n("button",{staticClass:"back-button",on:{click:e.backTab}},[e._v(e._s(e.$t("globals.back")))])])])};pp._withStripped=!0;var hp=function(e,t,n,a,i,r,s,o){const l=("function"==typeof n?n.options:n)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\TracklistTab.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=a;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(n,a){return e.call(a),t(n,a)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:pp,staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("th",[t("i",{staticClass:"material-icons"},[this._v("music_note")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("th",[t("i",{staticClass:"material-icons"},[this._v("timer")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("td",[t("div",{staticClass:"table__cell-content table__cell-content--vertical-center",staticStyle:{opacity:"0.54"}},[t("i",{staticClass:"material-icons"},[this._v("album")])])])}]},(function(e){e&&e("data-v-0d65d32a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"TracklistTab.vue"},media:void 0})}),up,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],n=e.styles||(e.styles={}),a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=a?i.media||"default":e,s=n[r]||(n[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let n=i.source,o=s.ids.length;if(s.ids.push(e),a&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),a&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(a&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(n),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(n),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));const mp={name:"the-home-tab",data:()=>({playlists:[],albums:[]}),computed:{...hc(["getHomeData"]),needToWait(){return 0===this.getHomeData.albums.data.length&&0===this.getHomeData.playlists.data.length}},methods:{artistView:uh.bind(null,"artist"),albumView:uh.bind(null,"album"),playlistView:uh.bind(null,"playlist"),openSettings(){document.getElementById("main_settings_tablink").click()},addToQueue(e){np.sendAddToQueue(e.currentTarget.dataset.link)},initHome(e){console.log("init home");const{playlists:{data:t},albums:{data:n}}=e;this.playlists=t,this.albums=n},checkIfWaitData(e){if(this.needToWait){let e=this.$store.subscribeAction({after:(t,n)=>{"cacheHomeData"===t.type&&(this.initHome(this.getHomeData),e())}})}else this.initHome(this.getHomeData)}},mounted(){console.log("home mounted"),localStorage.getItem("arl")&&this.$refs.notLogged.classList.add("hide"),this.checkIfWaitData(this.getHomeData)},beforeDestroy(){console.log("home bef dest")}};var fp=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root",staticClass:"main_tabcontent",attrs:{id:"home_tab"}},[n("h2",{staticClass:"page_heading"},[e._v(e._s(e.$t("globals.welcome")))]),e._v(" "),n("section",{ref:"notLogged",staticClass:"home_section",attrs:{id:"home_not_logged_in"}},[n("p",{attrs:{id:"home_not_logged_text"}},[e._v(e._s(e.$t("home.needTologin")))]),e._v(" "),n("button",{attrs:{type:"button",name:"button"},on:{click:e.openSettings}},[e._v(e._s(e.$t("home.openSettings")))])]),e._v(" "),e.playlists.length?n("section",{staticClass:"home_section"},[n("h3",{staticClass:"section_heading"},[e._v(e._s(e.$t("home.sections.popularPlaylists")))]),e._v(" "),n("div",{staticClass:"release_grid"},e._l(e.playlists,(function(t){return n("div",{key:t.id,staticClass:"release clickable",attrs:{"data-id":t.id},on:{click:e.playlistView}},[n("div",{staticClass:"cover_container"},[n("img",{staticClass:"rounded coverart",attrs:{"aria-hidden":"true",src:t.picture_medium}}),e._v(" "),n("div",{staticClass:"download_overlay",attrs:{role:"button","aria-label":"download","data-link":t.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])]),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(t.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v("\n\t\t\t\t\t"+e._s(e.$t("globals.by",{artist:t.user.name})+" - "+e.$tc("globals.listTabs.trackN",t.nb_tracks))+"\n\t\t\t\t")])])})),0)]):e._e(),e._v(" "),e.albums.length?n("section",{staticClass:"home_section"},[n("h3",{staticClass:"section_heading"},[e._v(e._s(e.$t("home.sections.popularAlbums")))]),e._v(" "),n("div",{staticClass:"release_grid"},e._l(e.albums,(function(t){return n("div",{key:t.id,staticClass:"release clickable",attrs:{"data-id":t.id},on:{click:e.albumView}},[n("div",{staticClass:"cover_container"},[n("img",{staticClass:"rounded coverart",attrs:{"aria-hidden":"true",src:t.cover_medium}}),e._v(" "),n("div",{staticClass:"download_overlay",attrs:{role:"button","aria-label":"download","data-link":t.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])]),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(t.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(e._s(""+e.$t("globals.by",{artist:t.artist.name})))])])})),0)]):e._e()])};fp._withStripped=!0;var gp=function(e,t,n,a,i,r,s,o){const l=("function"==typeof n?n.options:n)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\TheHomeTab.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=a;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(n,a){return e.call(a),t(n,a)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:fp,staticRenderFns:[]},(function(e){e&&e("data-v-47775876_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"TheHomeTab.vue"},media:void 0})}),mp,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],n=e.styles||(e.styles={}),a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=a?i.media||"default":e,s=n[r]||(n[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let n=i.source,o=s.ids.length;if(s.ids.push(e),a&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),a&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(a&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(n),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(n),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));const vp={name:"the-charts-tab",data:()=>({country:"",id:0,countries:[],chart:[]}),computed:{...hc(["getCharts"]),needToWait(){return 0===this.getCharts.length}},mounted(){console.log("charts mounted"),this.waitCharts(),Pc.on("setChartTracks",this.setTracklist)},beforeDestroy(){console.log("charts bef dest")},methods:{artistView:uh.bind(null,"artist"),albumView:uh.bind(null,"album"),waitCharts(){if(this.needToWait){let e=this.$store.subscribeAction({after:(t,n)=>{"cacheCharts"===t.type&&(this.initCharts(),e())}})}else this.initCharts()},playPausePreview(e){eo.$emit("trackPreview:playPausePreview",e)},previewMouseEnter(e){eo.$emit("trackPreview:previewMouseEnter",e)},previewMouseLeave(e){eo.$emit("trackPreview:previewMouseLeave",e)},convertDuration:dp.convertDuration,addToQueue(e){e.stopPropagation(),np.sendAddToQueue(e.currentTarget.dataset.link)},getTrackList(e){document.getElementById("content").scrollTo(0,0);const{currentTarget:{dataset:{title:t}},currentTarget:{dataset:{id:n}}}=e;this.country=t,localStorage.setItem("chart",this.country),this.id=n,Pc.emit("getChartTracks",this.id)},setTracklist(e){console.log("settracklist"),this.chart=e},changeCountry(){this.country="",this.id=0},initCharts(){if(console.log("init charts"),this.countries=this.getCharts,this.country=localStorage.getItem("chart")||"",!this.country)return;let e=0;for(;e-1&&t.splice(n,1)}}function rc(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;oc(e,n,[],e._modules.root,!0),sc(e,n,t)}function sc(e,t,n){var a=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,r={};Yl(i,(function(t,n){r[n]=function(e,t){return function(){return e(t)}}(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=ec.config.silent;ec.config.silent=!0,e._vm=new ec({data:{$$state:t},computed:r}),ec.config.silent=s,e.strict&&function(e){e._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(e),a&&(n&&e._withCommit((function(){a._data.$$state=null})),ec.nextTick((function(){return a.$destroy()})))}function oc(e,t,n,a,i){var r=!n.length,s=e._modules.getNamespace(n);if(a.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=a),!r&&!i){var o=lc(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){ec.set(o,l,a.state)}))}var c=a.context=function(e,t,n){var a=""===t,i={dispatch:a?e.dispatch:function(n,a,i){var r=cc(n,a,i),s=r.payload,o=r.options,l=r.type;return o&&o.root||(l=t+l),e.dispatch(l,s)},commit:a?e.commit:function(n,a,i){var r=cc(n,a,i),s=r.payload,o=r.options,l=r.type;o&&o.root||(l=t+l),e.commit(l,s,o)}};return Object.defineProperties(i,{getters:{get:a?function(){return e.getters}:function(){return function(e,t){if(!e._makeLocalGettersCache[t]){var n={},a=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,a)===t){var r=i.slice(a);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}(e,t)}},state:{get:function(){return lc(e.state,n)}}}),i}(e,s,n);a.forEachMutation((function(t,n){!function(e,t,n,a){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,a.state,t)}))}(e,s+n,t,c)})),a.forEachAction((function(t,n){var a=t.root?n:s+n,i=t.handler||t;!function(e,t,n,a){(e._actions[t]||(e._actions[t]=[])).push((function(t){var i,r=n.call(e,{dispatch:a.dispatch,commit:a.commit,getters:a.getters,state:a.state,rootGetters:e.getters,rootState:e.state},t);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}(e,a,i,c)})),a.forEachGetter((function(t,n){!function(e,t,n,a){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(a.state,a.getters,e.state,e.getters)}}(e,s+n,t,c)})),a.forEachChild((function(a,r){oc(e,t,n.concat(r),a,i)}))}function lc(e,t){return t.reduce((function(e,t){return e[t]}),e)}function cc(e,t,n){return Jl(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function dc(e){ec&&e===ec||function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:n});else{var t=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[n].concat(e.init):n,t.call(this,e)}}function n(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}(ec=e)}ac.state.get=function(){return this._vm._data.$$state},ac.state.set=function(e){},nc.prototype.commit=function(e,t,n){var a=this,i=cc(e,t,n),r=i.type,s=i.payload,o={type:r,payload:s},l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(o,a.state)})))},nc.prototype.dispatch=function(e,t){var n=this,a=cc(e,t),i=a.type,r=a.payload,s={type:i,payload:r},o=this._actions[i];if(o){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(e){}var l=o.length>1?Promise.all(o.map((function(e){return e(r)}))):o[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(e){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(e){}t(e)}))}))}},nc.prototype.subscribe=function(e,t){return ic(e,this._subscribers,t)},nc.prototype.subscribeAction=function(e,t){return ic("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},nc.prototype.watch=function(e,t,n){var a=this;return this._watcherVM.$watch((function(){return e(a.state,a.getters)}),t,n)},nc.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},nc.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),oc(this,this.state,e,this._modules.get(e),n.preserveState),sc(this,this.state)},nc.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=lc(t.state,e.slice(0,-1));ec.delete(n,e[e.length-1])})),rc(this)},nc.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},nc.prototype.hotUpdate=function(e){this._modules.update(e),rc(this,!0)},nc.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(nc.prototype,ac);var uc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;n[a]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var a=vc(this.$store,"mapState",e);if(!a)return;t=a.context.state,n=a.context.getters}return"function"==typeof i?i.call(this,t,n):t[i]},n[a].vuex=!0})),n})),pc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;n[a]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var a=this.$store.commit;if(e){var r=vc(this.$store,"mapMutations",e);if(!r)return;a=r.context.commit}return"function"==typeof i?i.apply(this,[a].concat(t)):a.apply(this.$store,[i].concat(t))}})),n})),hc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;i=e+i,n[a]=function(){if(!e||vc(this.$store,"mapGetters",e))return this.$store.getters[i]},n[a].vuex=!0})),n})),mc=gc((function(e,t){var n={};return fc(t).forEach((function(t){var a=t.key,i=t.val;n[a]=function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];var a=this.$store.dispatch;if(e){var r=vc(this.$store,"mapActions",e);if(!r)return;a=r.context.dispatch}return"function"==typeof i?i.apply(this,[a].concat(t)):a.apply(this.$store,[i].concat(t))}})),n}));function fc(e){return function(e){return Array.isArray(e)||Jl(e)}(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function gc(e){return function(t,n){return"string"!=typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function vc(e,t,n){return e._modulesNamespaceMap[n]}function bc(e,t,n){var a=n?e.groupCollapsed:e.group;try{a.call(e,t)}catch(n){e.log(t)}}function yc(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function _c(){var e=new Date;return" @ "+kc(e.getHours(),2)+":"+kc(e.getMinutes(),2)+":"+kc(e.getSeconds(),2)+"."+kc(e.getMilliseconds(),3)}function kc(e,t){return function(e,t){return new Array(t+1).join(e)}("0",t-e.toString().length)+e}var Ac={Store:nc,install:dc,version:"3.5.1",mapState:uc,mapMutations:pc,mapGetters:hc,mapActions:mc,createNamespacedHelpers:function(e){return{mapState:uc.bind(null,e),mapGetters:hc.bind(null,e),mapMutations:pc.bind(null,e),mapActions:mc.bind(null,e)}},createLogger:function(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var a=e.transformer;void 0===a&&(a=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var r=e.actionFilter;void 0===r&&(r=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var o=e.logMutations;void 0===o&&(o=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=Kl(e.state);void 0!==c&&(o&&e.subscribe((function(e,r){var s=Kl(r);if(n(e,d,s)){var o=_c(),l=i(e),u="mutation "+e.type+o;bc(c,u,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",a(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",a(s)),yc(c)}d=s})),l&&e.subscribeAction((function(e,n){if(r(e,n)){var a=_c(),i=s(e),o="action "+e.type+a;bc(c,o,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),yc(c)}})))}}};let wc=!1;var Cc={state:{albums:{data:[],total:0},artists:{data:[],total:0},playlists:{data:[],total:0},podcasts:{data:[],total:0},tracks:{data:[],total:0}},actions:{cacheHomeData({commit:e},t){wc||(e("SET_HOME_ALBUMS",t.albums),e("SET_HOME_ARTISTS",t.artists),e("SET_HOME_PLAYLISTS",t.playlists),e("SET_HOME_PODCASTS",t.podcasts),e("SET_HOME_TRACKS",t.tracks),wc=!0)}},getters:{getHomeData:e=>e,getHomeAlbums:e=>e.albums,getHomeArtists:e=>e.artists,getHomePlaylists:e=>e.playlists,getHomePodcasts:e=>e.podcasts,getHomeTracks:e=>e.tracks},mutations:{SET_HOME_ALBUMS:(e,t)=>{kn.set(e.albums,"data",t.data),e.albums.total=t.total},SET_HOME_ARTISTS:(e,t)=>{kn.set(e.artists,"data",t.data),e.artists.total=t.total},SET_HOME_PLAYLISTS:(e,t)=>{kn.set(e.playlists,"data",t.data),e.playlists.total=t.total},SET_HOME_PODCASTS:(e,t)=>{kn.set(e.podcasts,"data",t.data),e.podcasts.total=t.total},SET_HOME_TRACKS:(e,t)=>{kn.set(e.tracks,"data",t.data),e.tracks.total=t.total}}};var xc={state:{},actions:{setSettings({commit:e},t){for(const n in t){if(!t.hasOwnProperty(n))return;e("SET_UNKNOWN_SETTING",{settingName:n,settingValue:t[n]})}}},getters:{getSettings:e=>e},mutations:{SET_UNKNOWN_SETTING(e,t){kn.set(e,t.settingName,t.settingValue)}}};var Tc={state:{},actions:{setDefaultSettings({commit:e},t){for(const n in t){if(!t.hasOwnProperty(n))return;e("SET_UNKNOWN_DEFAULT_SETTING",{settingName:n,settingValue:t[n]})}}},getters:{getDefaultSettings:e=>e},mutations:{SET_UNKNOWN_DEFAULT_SETTING(e,t){kn.set(e,t.settingName,t.settingValue)}}};var Sc={state:{clientId:"",clientSecret:""},getters:{getCredentials:e=>e},actions:{setCredentials({commit:e},t){e("SET_CLIENT_ID",t.clientId),e("SET_CLIENT_SECRET",t.clientSecret)}},mutations:{SET_CLIENT_ID(e,t){e.clientId=t},SET_CLIENT_SECRET(e,t){e.clientSecret=t}}};let zc=!1;var Mc={state:{list:[]},getters:{getCharts:e=>e.list},actions:{cacheCharts({commit:e},t){zc||(t.forEach((t,n)=>{e("SET_UNKNOWN_CHART",{index:n,chartObj:t})}),zc=!0)}},mutations:{SET_UNKNOWN_CHART(e,t){kn.set(e.list,t.index,t.chartObj)}}};var Dc={state:{albums:[],artists:[],playlists:[],tracks:[]},actions:{setFavorites({commit:e,dispatch:t},n){n.playlists.forEach((t,n)=>{e("SET_FAVORITES_PLAYLISTS",{index:n,data:t})}),n.albums.forEach((t,n)=>{e("SET_FAVORITES_ALBUMS",{index:n,data:t})}),n.artists.forEach((t,n)=>{e("SET_FAVORITES_ARTISTS",{index:n,data:t})}),t("setFavoritesTracks",n.tracks)},setFavoritesTracks({commit:e},t){t.forEach((t,n)=>{e("SET_FAVORITES_TRACKS",{index:n,data:t})})}},getters:{getFavorites:e=>e,getFavoritesAlbums:e=>e.albums,getFavoritesArtists:e=>e.artists,getFavoritesPlaylists:e=>e.playlists,getFavoritesTracks:e=>e.tracks},mutations:{SET_FAVORITES_ALBUMS:(e,t)=>{kn.set(e.albums,t.index,t.data)},SET_FAVORITES_ARTISTS:(e,t)=>{kn.set(e.artists,t.index,t.data)},SET_FAVORITES_PLAYLISTS:(e,t)=>{kn.set(e.playlists,t.index,t.data)},SET_FAVORITES_TRACKS:(e,t)=>{kn.set(e.tracks,t.index,t.data)}}};var $c={state:{currentCommit:null,latestCommit:null,updateAvailable:!1,deemixVersion:null},getters:{getAboutInfo:e=>e},actions:{setAboutInfo({commit:e},t){e("SET_CURRENT_COMMIT",t.currentCommit),e("SET_LATEST_COMMIT",t.latestCommit),e("SET_UPDATE_AVAILABLE",t.updateAvailable),e("SET_DEEMIX_VERSION",t.deemixVersion)}},mutations:{SET_CURRENT_COMMIT:(e,t)=>{e.currentCommit=t},SET_LATEST_COMMIT:(e,t)=>{e.latestCommit=t},SET_UPDATE_AVAILABLE:(e,t)=>{e.updateAvailable=t},SET_DEEMIX_VERSION:(e,t)=>{e.deemixVersion=t}}};kn.use(Ac);var Nc=new Ac.Store({modules:{home:Cc,settings:xc,defaultSettings:Tc,spotifyCredentials:Sc,charts:Mc,favorites:Dc,about:$c},strict:!1});const Pc=io.connect(window.location.href);Pc.on("connect",()=>{document.getElementById("start_app_placeholder").classList.add("loading_placeholder--hidden")}),Pc.on("init_charts",e=>{}),Pc.on("init_favorites",e=>{}),Pc.on("init_settings",(e,t,n)=>{Nc.dispatch("setSettings",e),Nc.dispatch("setDefaultSettings",n),Nc.dispatch("setCredentials",t)}),Pc.on("init_home",e=>{Nc.dispatch("cacheHomeData",e)}),Pc.on("init_update",e=>{Nc.dispatch("setAboutInfo",e)});var Lc="object"==typeof global&&global&&global.Object===Object&&global,Rc="object"==typeof self&&self&&self.Object===Object&&self,Ec=Lc||Rc||Function("return this")(),Ic=Ec.Symbol,jc=Object.prototype,Fc=jc.hasOwnProperty,Oc=jc.toString,Bc=Ic?Ic.toStringTag:void 0;var qc=Object.prototype.toString;var Uc=Ic?Ic.toStringTag:void 0;function Vc(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Uc&&Uc in Object(e)?function(e){var t=Fc.call(e,Bc),n=e[Bc];try{e[Bc]=void 0;var a=!0}catch(e){}var i=Oc.call(e);return a&&(t?e[Bc]=n:delete e[Bc]),i}(e):function(e){return qc.call(e)}(e)}function Hc(e){return null!=e&&"object"==typeof e}function Gc(e){return"symbol"==typeof e||Hc(e)&&"[object Symbol]"==Vc(e)}function Wc(e,t){for(var n=-1,a=null==e?0:e.length,i=Array(a);++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function bd(e){return null!=e&&vd(e.length)&&!ed(e)}var yd=Object.prototype;function _d(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yd)}function kd(e){return Hc(e)&&"[object Arguments]"==Vc(e)}var Ad=Object.prototype,wd=Ad.hasOwnProperty,Cd=Ad.propertyIsEnumerable,xd=kd(function(){return arguments}())?kd:function(e){return Hc(e)&&wd.call(e,"callee")&&!Cd.call(e,"callee")};var Td="object"==typeof exports&&exports&&!exports.nodeType&&exports,Sd=Td&&"object"==typeof module&&module&&!module.nodeType&&module,zd=Sd&&Sd.exports===Td?Ec.Buffer:void 0,Md=(zd?zd.isBuffer:void 0)||function(){return!1},Dd={};function $d(e){return function(t){return e(t)}}Dd["[object Float32Array]"]=Dd["[object Float64Array]"]=Dd["[object Int8Array]"]=Dd["[object Int16Array]"]=Dd["[object Int32Array]"]=Dd["[object Uint8Array]"]=Dd["[object Uint8ClampedArray]"]=Dd["[object Uint16Array]"]=Dd["[object Uint32Array]"]=!0,Dd["[object Arguments]"]=Dd["[object Array]"]=Dd["[object ArrayBuffer]"]=Dd["[object Boolean]"]=Dd["[object DataView]"]=Dd["[object Date]"]=Dd["[object Error]"]=Dd["[object Function]"]=Dd["[object Map]"]=Dd["[object Number]"]=Dd["[object Object]"]=Dd["[object RegExp]"]=Dd["[object Set]"]=Dd["[object String]"]=Dd["[object WeakMap]"]=!1;var Nd="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pd=Nd&&"object"==typeof module&&module&&!module.nodeType&&module,Ld=Pd&&Pd.exports===Nd&&Lc.process,Rd=function(){try{var e=Pd&&Pd.require&&Pd.require("util").types;return e||Ld&&Ld.binding&&Ld.binding("util")}catch(e){}}(),Ed=Rd&&Rd.isTypedArray,Id=Ed?$d(Ed):function(e){return Hc(e)&&vd(e.length)&&!!Dd[Vc(e)]},jd=Object.prototype.hasOwnProperty;function Fd(e,t){var n=Qc(e),a=!n&&xd(e),i=!n&&!a&&Md(e),r=!n&&!a&&!i&&Id(e),s=n||a||i||r,o=s?function(e,t){for(var n=-1,a=Array(e);++n-1},tu.prototype.set=function(e,t){var n=this.__data__,a=Zd(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this};var nu=pd(Ec,"Map");function au(e,t){var n,a,i=e.__data__;return("string"==(a=typeof(n=t))||"number"==a||"symbol"==a||"boolean"==a?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function iu(e){var t=-1,n=null==e?0:e.length;for(this.clear();++to))return!1;var c=r.get(e);if(c&&r.get(t))return c==t;var d=-1,u=!0,p=2&n?new zu:void 0;for(r.set(e,t),r.set(t,e);++dt||r&&s&&l&&!o&&!c||a&&s&&l||!n&&l||!i)return 1;if(!a&&!r&&!c&&e=o?l:l*("desc"==n[a]?-1:1)}return e.index-t.index}(e,t,n)}))}function ep(e,t,n,a){return null==e?[]:(Qc(t)||(t=null==t?[]:[t]),Qc(n=a?void 0:n)||(n=null==n?[]:[n]),Zu(e,t,n))}function tp(e,t=null){e&&Pc.emit("addToQueue",{url:e,bitrate:t},()=>{})}var np={sendAddToQueue:tp};const ap={name:"artist-tab",data:()=>({currentTab:"",sortKey:"release_date",sortOrder:"desc",title:"",image:"",type:"",link:"",head:null,body:null}),methods:{backTab:hh,albumView:ph.bind(null,"album"),reset(){this.title="Loading...",this.image="",this.type="",this.currentTab="",this.sortKey="release_date",this.sortOrder="desc",this.link="",this.head=[],this.body=null},addToQueue(e){e.stopPropagation(),np.sendAddToQueue(e.currentTarget.dataset.link)},sortBy(e){e==this.sortKey?this.sortOrder="asc"==this.sortOrder?"desc":"asc":(this.sortKey=e,this.sortOrder="asc")},changeTab(e){this.currentTab=e},getCurrentTab(){return this.currentTab},updateSelected(){window.currentStack.selected=this.currentTab},checkNewRelease(e){let t=new Date,n=new Date(e);return n.setDate(n.getDate()+3),t.setHours(0,0,0,0),t.getTime()<=n.getTime()},showArtist(e){this.reset();const{name:t,picture_xl:n,id:a,releases:i}=e;this.title=t,this.image=n,this.type="Artist",this.link="https://www.deezer.com/artist/"+a,""===this.currentTab&&(this.currentTab=Object.keys(i)[0]),this.sortKey="release_date",this.sortOrder="desc",this.head=[{title:this.$tc("globals.listTabs.title",1),sortKey:"title"},{title:this.$t("globals.listTabs.releaseDate"),sortKey:"release_date"},{title:this.$tc("globals.listTabs.track",2),sortKey:"nb_song"},{title:"",width:"32px"}],Ju(i)?this.body=null:this.body=i}},computed:{showTable(){return this.body?"nb_song"==this.sortKey?ep(this.body[this.currentTab],(function(e){return new Number(e.nb_song)}),this.sortOrder):ep(this.body[this.currentTab],this.sortKey,this.sortOrder):[]}},mounted(){console.log("artist mounted"),Pc.on("show_artist",this.showArtist),eo.$on("artistTab:updateSelected",this.updateSelected),eo.$on("artistTab:changeTab",this.changeTab)},beforeDestroy(){console.log("artist bef dest")}};var ip=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root",staticClass:"main_tabcontent fixed_footer image_header",attrs:{id:"artist_tab"}},[n("header",{staticClass:"inline-flex",style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[n("h1",[e._v(e._s(e.title))]),e._v(" "),n("div",{staticClass:"fab right",attrs:{role:"button","aria-label":"download","data-link":e.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])]),e._v(" "),n("div",{staticClass:"tab"},e._l(e.body,(function(t,a){return n("button",{key:a,staticClass:"selective",class:{active:a===e.currentTab},attrs:{href:"#artist_"+a},on:{click:function(t){return e.changeTab(a)}}},[e._v("\n\t\t\t"+e._s(e.$tc("globals.listTabs."+a,2))+"\n\t\t")])})),0),e._v(" "),n("table",{staticClass:"table"},[n("thead",[n("tr",e._l(e.head,(function(t){return n("th",{class:{"sort-asc":t.sortKey==e.sortKey&&"asc"==e.sortOrder,"sort-desc":t.sortKey==e.sortKey&&"desc"==e.sortOrder,sortable:t.sortKey,clickable:t.sortKey},style:{width:t.width?t.width:"auto"},on:{click:function(n){t.sortKey&&e.sortBy(t.sortKey)}}},[e._v("\n\t\t\t\t\t"+e._s(t.title)+"\n\t\t\t\t")])})),0)]),e._v(" "),n("tbody",e._l(e.showTable,(function(t){return n("tr",{key:t.id},[n("td",{staticClass:"inline-flex clickable",attrs:{"data-id":t.id},on:{click:e.albumView}},[n("img",{staticClass:"rounded coverart",staticStyle:{"margin-right":"16px",width:"56px",height:"56px"},attrs:{src:t.cover_small}}),e._v(" "),t.explicit_lyrics?n("i",{staticClass:"material-icons explicit_icon"},[e._v("\n\t\t\t\t\t\texplicit\n\t\t\t\t\t")]):e._e(),e._v("\n\t\t\t\t\t"+e._s(t.title)+"\n\t\t\t\t\t"),e.checkNewRelease(t.release_date)?n("i",{staticClass:"material-icons",staticStyle:{color:"#ff7300"}},[e._v("\n\t\t\t\t\t\tfiber_new\n\t\t\t\t\t")]):e._e()]),e._v(" "),n("td",[e._v(e._s(t.release_date))]),e._v(" "),n("td",[e._v(e._s(t.nb_song))]),e._v(" "),n("td",{staticClass:"clickable",attrs:{"data-link":t.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("\n\t\t\t\t\t\tfile_download\n\t\t\t\t\t")])])])})),0)]),e._v(" "),n("footer",[n("button",{staticClass:"back-button",on:{click:e.backTab}},[e._v(e._s(e.$t("globals.back")))])])])};ip._withStripped=!0;var rp=function(e,t,n,a,i,r,s,o){const l=("function"==typeof n?n.options:n)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\ArtistTab.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=a;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(n,a){return e.call(a),t(n,a)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:ip,staticRenderFns:[]},(function(e){e&&e("data-v-5fc46c94_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"ArtistTab.vue"},media:void 0})}),ap,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],n=e.styles||(e.styles={}),a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=a?i.media||"default":e,s=n[r]||(n[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let n=i.source,o=s.ids.length;if(s.ids.push(e),a&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),a&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(a&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(n),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(n),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));function sp(e){let t=e.toLowerCase();if(t.startsWith("http")){if(t.indexOf("deezer.com")>=0||t.indexOf("deezer.page.link")>=0||t.indexOf("open.spotify.com")>=0)return!0}else if(t.startsWith("spotify:"))return!0;return!1}function op(e){let t,n;return t=Math.floor(e/60),n=e-60*t,n<10&&(n="0"+n),t+":"+n}function lp(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function cp(e,t,n){var a;return function(){var i=this,r=arguments,s=function(){a=null,n||e.apply(i,r)},o=n&&!a;clearTimeout(a),a=setTimeout(s,t),o&&e.apply(i,r)}}function dp(e){const t=document.createElement("input");document.body.appendChild(t),t.setAttribute("type","text"),t.setAttribute("value",e),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()}var up={isValidURL:sp,convertDuration:op,convertDurationSeparated:function(e){let t,n,a;return n=Math.floor(e/60),t=Math.floor(n/60),a=e-60*n,n-=60*t,[t,n,a]},numberWithDots:lp,debounce:cp,COUNTRIES:{AF:"Afghanistan",AX:"Åland Islands",AL:"Albania",DZ:"Algeria",AS:"American Samoa",AD:"Andorra",AO:"Angola",AI:"Anguilla",AQ:"Antarctica",AG:"Antigua and Barbuda",AR:"Argentina",AM:"Armenia",AW:"Aruba",AU:"Australia",AT:"Austria",AZ:"Azerbaijan",BS:"Bahamas",BH:"Bahrain",BD:"Bangladesh",BB:"Barbados",BY:"Belarus",BE:"Belgium",BZ:"Belize",BJ:"Benin",BM:"Bermuda",BT:"Bhutan",BO:"Bolivia, Plurinational State of",BQ:"Bonaire, Sint Eustatius and Saba",BA:"Bosnia and Herzegovina",BW:"Botswana",BV:"Bouvet Island",BR:"Brazil",IO:"British Indian Ocean Territory",BN:"Brunei Darussalam",BG:"Bulgaria",BF:"Burkina Faso",BI:"Burundi",KH:"Cambodia",CM:"Cameroon",CA:"Canada",CV:"Cape Verde",KY:"Cayman Islands",CF:"Central African Republic",TD:"Chad",CL:"Chile",CN:"China",CX:"Christmas Island",CC:"Cocos (Keeling) Islands",CO:"Colombia",KM:"Comoros",CG:"Congo",CD:"Congo, the Democratic Republic of the",CK:"Cook Islands",CR:"Costa Rica",CI:"Côte d'Ivoire",HR:"Croatia",CU:"Cuba",CW:"Curaçao",CY:"Cyprus",CZ:"Czech Republic",DK:"Denmark",DJ:"Djibouti",DM:"Dominica",DO:"Dominican Republic",EC:"Ecuador",EG:"Egypt",SV:"El Salvador",GQ:"Equatorial Guinea",ER:"Eritrea",EE:"Estonia",ET:"Ethiopia",FK:"Falkland Islands (Malvinas)",FO:"Faroe Islands",FJ:"Fiji",FI:"Finland",FR:"France",GF:"French Guiana",PF:"French Polynesia",TF:"French Southern Territories",GA:"Gabon",GM:"Gambia",GE:"Georgia",DE:"Germany",GH:"Ghana",GI:"Gibraltar",GR:"Greece",GL:"Greenland",GD:"Grenada",GP:"Guadeloupe",GU:"Guam",GT:"Guatemala",GG:"Guernsey",GN:"Guinea",GW:"Guinea-Bissau",GY:"Guyana",HT:"Haiti",HM:"Heard Island and McDonald Islands",VA:"Holy See (Vatican City State)",HN:"Honduras",HK:"Hong Kong",HU:"Hungary",IS:"Iceland",IN:"India",ID:"Indonesia",IR:"Iran, Islamic Republic of",IQ:"Iraq",IE:"Ireland",IM:"Isle of Man",IL:"Israel",IT:"Italy",JM:"Jamaica",JP:"Japan",JE:"Jersey",JO:"Jordan",KZ:"Kazakhstan",KE:"Kenya",KI:"Kiribati",KP:"Korea, Democratic People's Republic of",KR:"Korea, Republic of",KW:"Kuwait",KG:"Kyrgyzstan",LA:"Lao People's Democratic Republic",LV:"Latvia",LB:"Lebanon",LS:"Lesotho",LR:"Liberia",LY:"Libya",LI:"Liechtenstein",LT:"Lithuania",LU:"Luxembourg",MO:"Macao",MK:"Macedonia, the Former Yugoslav Republic of",MG:"Madagascar",MW:"Malawi",MY:"Malaysia",MV:"Maldives",ML:"Mali",MT:"Malta",MH:"Marshall Islands",MQ:"Martinique",MR:"Mauritania",MU:"Mauritius",YT:"Mayotte",MX:"Mexico",FM:"Micronesia, Federated States of",MD:"Moldova, Republic of",MC:"Monaco",MN:"Mongolia",ME:"Montenegro",MS:"Montserrat",MA:"Morocco",MZ:"Mozambique",MM:"Myanmar",NA:"Namibia",NR:"Nauru",NP:"Nepal",NL:"Netherlands",NC:"New Caledonia",NZ:"New Zealand",NI:"Nicaragua",NE:"Niger",NG:"Nigeria",NU:"Niue",NF:"Norfolk Island",MP:"Northern Mariana Islands",NO:"Norway",OM:"Oman",PK:"Pakistan",PW:"Palau",PS:"Palestine, State of",PA:"Panama",PG:"Papua New Guinea",PY:"Paraguay",PE:"Peru",PH:"Philippines",PN:"Pitcairn",PL:"Poland",PT:"Portugal",PR:"Puerto Rico",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russian Federation",RW:"Rwanda",BL:"Saint Barthélemy",SH:"Saint Helena, Ascension and Tristan da Cunha",KN:"Saint Kitts and Nevis",LC:"Saint Lucia",MF:"Saint Martin (French part)",PM:"Saint Pierre and Miquelon",VC:"Saint Vincent and the Grenadines",WS:"Samoa",SM:"San Marino",ST:"Sao Tome and Principe",SA:"Saudi Arabia",SN:"Senegal",RS:"Serbia",SC:"Seychelles",SL:"Sierra Leone",SG:"Singapore",SX:"Sint Maarten (Dutch part)",SK:"Slovakia",SI:"Slovenia",SB:"Solomon Islands",SO:"Somalia",ZA:"South Africa",GS:"South Georgia and the South Sandwich Islands",SS:"South Sudan",ES:"Spain",LK:"Sri Lanka",SD:"Sudan",SR:"Suriname",SJ:"Svalbard and Jan Mayen",SZ:"Swaziland",SE:"Sweden",CH:"Switzerland",SY:"Syrian Arab Republic",TW:"Taiwan, Province of China",TJ:"Tajikistan",TZ:"Tanzania, United Republic of",TH:"Thailand",TL:"Timor-Leste",TG:"Togo",TK:"Tokelau",TO:"Tonga",TT:"Trinidad and Tobago",TN:"Tunisia",TR:"Turkey",TM:"Turkmenistan",TC:"Turks and Caicos Islands",TV:"Tuvalu",UG:"Uganda",UA:"Ukraine",AE:"United Arab Emirates",GB:"United Kingdom",US:"United States",UM:"United States Minor Outlying Islands",UY:"Uruguay",UZ:"Uzbekistan",VU:"Vanuatu",VE:"Venezuela, Bolivarian Republic of",VN:"Viet Nam",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",WF:"Wallis and Futuna",EH:"Western Sahara",YE:"Yemen",ZM:"Zambia",ZW:"Zimbabwe"}};const pp={name:"tracklist-tab",data:()=>({title:"",metadata:"",release_date:"",label:"",explicit:!1,image:"",type:"empty",link:"",body:[]}),methods:{backTab:hh,artistView:ph.bind(null,"artist"),albumView:ph.bind(null,"album"),playPausePreview(e){eo.$emit("trackPreview:playPausePreview",e)},reset(){console.log("resetto"),this.title="Loading...",this.image="",this.metadata="",this.label="",this.release_date="",this.explicit=!1,this.type="empty",this.body=[]},addToQueue(e){np.sendAddToQueue(e.currentTarget.dataset.link)},toggleAll(e){this.body.forEach(t=>{"track"==t.type&&(t.selected=e.currentTarget.checked)})},selectedLinks(){var e=[];return this.body&&this.body.forEach(t=>{"track"==t.type&&t.selected&&e.push("spotifyPlaylist"==this.type?t.uri:t.link)}),e.join(";")},convertDuration:up.convertDuration,showAlbum(e){this.reset();const{id:t,title:n,explicit_lyrics:a,label:i,artist:{name:r},tracks:s,tracks:{length:o},release_date:l,cover_xl:c}=e;this.type="album",this.link="https://www.deezer.com/album/"+t,this.title=n,this.explicit=a,this.label=i,this.metadata=`${r} • ${this.$tc("globals.listTabs.trackN",o)}`,this.release_date=l.substring(0,10),this.image=c,Ju(s)?this.body=null:this.body=s},showPlaylist(e){this.reset(),console.log(e),console.log("mandi");const{id:t,title:n,picture_xl:a,creation_date:i,creator:{name:r},tracks:s,tracks:{length:o}}=e;this.type="playlist",this.link="https://www.deezer.com/playlist/"+t,this.title=n,this.image=a,this.release_date=i.substring(0,10),this.metadata=`${this.$t("globals.by",{artist:r})} • ${this.$tc("globals.listTabs.trackN",o)}`,Ju(s)?this.body=null:this.body=s},showSpotifyPlaylist(e){this.reset();const{uri:t,name:n,images:a,images:{length:i},owner:{display_name:r},tracks:s,tracks:{length:o}}=e;this.type="spotifyPlaylist",this.link=t,this.title=n,this.image=i?a[0].url:"https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg",this.release_date="",this.metadata=`${this.$t("globals.by",{artist:r})} • ${this.$tc("globals.listTabs.trackN",o)}`,Ju(s)?this.body=null:this.body=s},selectRow(e,t){t.selected=!t.selected}},mounted(){console.log("tracklist mounted"),eo.$on("tracklistTab:selectRow",this.selectRow),Pc.on("show_album",this.showAlbum),Pc.on("show_playlist",this.showPlaylist),Pc.on("show_spotifyplaylist",this.showSpotifyPlaylist)},beforeDestroy(){console.log("tracklist bef dest")}};var hp=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root",staticClass:"main_tabcontent fixed_footer image_header",attrs:{id:"tracklist_tab"}},[n("header",{style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[n("h1",{staticClass:"inline-flex"},[e._v("\n\t\t\t"+e._s(e.title)+" "),e.explicit?n("i",{staticClass:"material-icons explicit_icon explicit_icon--right"},[e._v("explicit")]):e._e()]),e._v(" "),n("h2",{staticClass:"inline-flex"},[e.metadata?n("span",[e._v(e._s(e.metadata))]):e._e(),e._v(" "),e.release_date?n("span",{staticClass:"right"},[e._v(e._s(e.release_date))]):e._e()])]),e._v(" "),n("table",{staticClass:"table table--tracklist"},[n("thead",[n("tr",[e._m(0),e._v(" "),n("th",[e._v("#")]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),"playlist"===e.type?n("th",[e._v(e._s(e.$tc("globals.listTabs.album",1)))]):e._e(),e._v(" "),e._m(1),e._v(" "),n("th",{staticClass:"table__icon table__cell--center clickable"},[n("input",{staticClass:"selectAll",attrs:{type:"checkbox"},on:{click:e.toggleAll}})])])]),e._v(" "),n("tbody",["spotifyPlaylist"!==e.type?[e._l(e.body,(function(t,a){return["track"==t.type?n("tr",{on:{click:function(n){return e.selectRow(a,t)}}},[n("td",{staticClass:"table__cell--x-small table__cell--center"},[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[n("i",e._g({staticClass:"material-icons",class:{preview_playlist_controls:t.preview,disabled:!t.preview},attrs:{"data-preview":t.preview,title:e.$t("globals.play_hint")}},{click:!!t.preview&&e.playPausePreview}),[e._v("\n\t\t\t\t\t\t\t\t\tplay_arrow\n\t\t\t\t\t\t\t\t")])])]),e._v(" "),n("td",{staticClass:"table__cell--small table__cell--center track_position"},[e._v("\n\t\t\t\t\t\t\t"+e._s("album"===e.type?t.track_position:e.body.indexOf(t)+1)+"\n\t\t\t\t\t\t")]),e._v(" "),n("td",{staticClass:"table__cell--large table__cell--with-icon"},[n("div",{staticClass:"table__cell-content table__cell-content--vertical-center"},[t.explicit_lyrics?n("i",{staticClass:"material-icons explicit_icon"},[e._v("\n\t\t\t\t\t\t\t\t\texplicit\n\t\t\t\t\t\t\t\t")]):e._e(),e._v("\n\t\t\t\t\t\t\t\t"+e._s(t.title+(t.title_version&&-1==t.title.indexOf(t.title_version)?" "+t.title_version:""))+"\n\t\t\t\t\t\t\t")])]),e._v(" "),n("td",{staticClass:"table__cell--medium table__cell--center clickable",attrs:{"data-id":t.artist.id},on:{click:e.artistView}},[e._v("\n\t\t\t\t\t\t\t"+e._s(t.artist.name)+"\n\t\t\t\t\t\t")]),e._v(" "),"playlist"==e.type?n("td",{staticClass:"table__cell--medium table__cell--center clickable",attrs:{"data-id":t.album.id},on:{click:e.albumView}},[e._v("\n\t\t\t\t\t\t\t"+e._s(t.album.title)+"\n\t\t\t\t\t\t")]):e._e(),e._v(" "),n("td",{staticClass:"table__cell--center",class:{"table__cell--small":"album"===e.type,"table__cell--x-small":"playlist"===e.type}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.convertDuration(t.duration))+"\n\t\t\t\t\t\t")]),e._v(" "),n("td",{staticClass:"table__icon table__cell--center"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"track.selected"}],staticClass:"clickable",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.selected)?e._i(t.selected,null)>-1:t.selected},on:{change:function(n){var a=t.selected,i=n.target,r=!!i.checked;if(Array.isArray(a)){var s=e._i(a,null);i.checked?s<0&&e.$set(t,"selected",a.concat([null])):s>-1&&e.$set(t,"selected",a.slice(0,s).concat(a.slice(s+1)))}else e.$set(t,"selected",r)}}})])]):"disc_separator"==t.type?n("tr",{staticClass:"table__row-no-highlight",staticStyle:{opacity:"0.54"}},[e._m(2,!0),e._v(" "),n("td",{staticClass:"table__cell--center"},[e._v("\n\t\t\t\t\t\t\t"+e._s(t.number)+"\n\t\t\t\t\t\t")]),e._v(" "),n("td",{attrs:{colspan:"4"}})]):e._e()]}))]:e._l(e.body,(function(t,a){return n("tr",[n("td",[t.preview_url?n("i",{class:"material-icons"+(t.preview_url?" preview_playlist_controls":""),attrs:{"data-preview":t.preview_url,title:e.$t("globals.play_hint")},on:{click:e.playPausePreview}},[e._v("\n\t\t\t\t\t\t\tplay_arrow\n\t\t\t\t\t\t")]):n("i",{staticClass:"material-icons disabled"},[e._v("play_arrow")])]),e._v(" "),n("td",[e._v(e._s(a+1))]),e._v(" "),n("td",{staticClass:"inline-flex"},[t.explicit?n("i",{staticClass:"material-icons explicit_icon"},[e._v("explicit")]):e._e(),e._v("\n\t\t\t\t\t\t"+e._s(t.name)+"\n\t\t\t\t\t")]),e._v(" "),n("td",[e._v(e._s(t.artists[0].name))]),e._v(" "),n("td",[e._v(e._s(t.album.name))]),e._v(" "),n("td",[e._v(e._s(e.convertDuration(Math.floor(t.duration_ms/1e3))))]),e._v(" "),n("td",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.selected,expression:"track.selected"}],staticClass:"clickable",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.selected)?e._i(t.selected,null)>-1:t.selected},on:{change:function(n){var a=t.selected,i=n.target,r=!!i.checked;if(Array.isArray(a)){var s=e._i(a,null);i.checked?s<0&&e.$set(t,"selected",a.concat([null])):s>-1&&e.$set(t,"selected",a.slice(0,s).concat(a.slice(s+1)))}else e.$set(t,"selected",r)}}})])])}))],2)]),e._v(" "),e.label?n("span",{staticStyle:{opacity:"0.4","margin-top":"8px",display:"inline-block","font-size":"13px"}},[e._v(e._s(e.label))]):e._e(),e._v(" "),n("footer",[n("button",{attrs:{"data-link":e.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[e._v("\n\t\t\t"+e._s(""+e.$t("globals.download",{thing:e.$tc("globals.listTabs."+e.type,1)}))+"\n\t\t")]),e._v(" "),n("button",{staticClass:"with_icon",attrs:{"data-link":e.selectedLinks()},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[e._v("\n\t\t\t"+e._s(e.$t("tracklist.downloadSelection"))),n("i",{staticClass:"material-icons"},[e._v("file_download")])]),e._v(" "),n("button",{staticClass:"back-button",on:{click:e.backTab}},[e._v(e._s(e.$t("globals.back")))])])])};hp._withStripped=!0;var mp=function(e,t,n,a,i,r,s,o){const l=("function"==typeof n?n.options:n)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\TracklistTab.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=a;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(n,a){return e.call(a),t(n,a)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:hp,staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("th",[t("i",{staticClass:"material-icons"},[this._v("music_note")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("th",[t("i",{staticClass:"material-icons"},[this._v("timer")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("td",[t("div",{staticClass:"table__cell-content table__cell-content--vertical-center",staticStyle:{opacity:"0.54"}},[t("i",{staticClass:"material-icons"},[this._v("album")])])])}]},(function(e){e&&e("data-v-0d65d32a_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"TracklistTab.vue"},media:void 0})}),pp,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],n=e.styles||(e.styles={}),a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=a?i.media||"default":e,s=n[r]||(n[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let n=i.source,o=s.ids.length;if(s.ids.push(e),a&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),a&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(a&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(n),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(n),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));const fp={name:"the-home-tab",data:()=>({playlists:[],albums:[]}),computed:{...hc(["getHomeData"]),needToWait(){return 0===this.getHomeData.albums.data.length&&0===this.getHomeData.playlists.data.length}},methods:{artistView:ph.bind(null,"artist"),albumView:ph.bind(null,"album"),playlistView:ph.bind(null,"playlist"),openSettings(){document.getElementById("main_settings_tablink").click()},addToQueue(e){np.sendAddToQueue(e.currentTarget.dataset.link)},initHome(e){console.log("init home");const{playlists:{data:t},albums:{data:n}}=e;this.playlists=t,this.albums=n},checkIfWaitData(e){if(this.needToWait){let e=this.$store.subscribeAction({after:(t,n)=>{"cacheHomeData"===t.type&&(this.initHome(this.getHomeData),e())}})}else this.initHome(this.getHomeData)}},mounted(){console.log("home mounted"),localStorage.getItem("arl")&&this.$refs.notLogged.classList.add("hide"),this.checkIfWaitData(this.getHomeData)},beforeDestroy(){console.log("home bef dest")}};var gp=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{ref:"root",staticClass:"main_tabcontent",attrs:{id:"home_tab"}},[n("h2",{staticClass:"page_heading"},[e._v(e._s(e.$t("globals.welcome")))]),e._v(" "),n("section",{ref:"notLogged",staticClass:"home_section",attrs:{id:"home_not_logged_in"}},[n("p",{attrs:{id:"home_not_logged_text"}},[e._v(e._s(e.$t("home.needTologin")))]),e._v(" "),n("button",{attrs:{type:"button",name:"button"},on:{click:e.openSettings}},[e._v(e._s(e.$t("home.openSettings")))])]),e._v(" "),e.playlists.length?n("section",{staticClass:"home_section"},[n("h3",{staticClass:"section_heading"},[e._v(e._s(e.$t("home.sections.popularPlaylists")))]),e._v(" "),n("div",{staticClass:"release_grid"},e._l(e.playlists,(function(t){return n("div",{key:t.id,staticClass:"release clickable",attrs:{"data-id":t.id},on:{click:e.playlistView}},[n("div",{staticClass:"cover_container"},[n("img",{staticClass:"rounded coverart",attrs:{"aria-hidden":"true",src:t.picture_medium}}),e._v(" "),n("div",{staticClass:"download_overlay",attrs:{role:"button","aria-label":"download","data-link":t.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])]),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(t.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v("\n\t\t\t\t\t"+e._s(e.$t("globals.by",{artist:t.user.name})+" - "+e.$tc("globals.listTabs.trackN",t.nb_tracks))+"\n\t\t\t\t")])])})),0)]):e._e(),e._v(" "),e.albums.length?n("section",{staticClass:"home_section"},[n("h3",{staticClass:"section_heading"},[e._v(e._s(e.$t("home.sections.popularAlbums")))]),e._v(" "),n("div",{staticClass:"release_grid"},e._l(e.albums,(function(t){return n("div",{key:t.id,staticClass:"release clickable",attrs:{"data-id":t.id},on:{click:e.albumView}},[n("div",{staticClass:"cover_container"},[n("img",{staticClass:"rounded coverart",attrs:{"aria-hidden":"true",src:t.cover_medium}}),e._v(" "),n("div",{staticClass:"download_overlay",attrs:{role:"button","aria-label":"download","data-link":t.link},on:{click:function(t){return t.stopPropagation(),e.addToQueue(t)}}},[n("i",{staticClass:"material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])]),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(t.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(e._s(""+e.$t("globals.by",{artist:t.artist.name})))])])})),0)]):e._e()])};gp._withStripped=!0;var vp=function(e,t,n,a,i,r,s,o){const l=("function"==typeof n?n.options:n)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\TheHomeTab.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=a;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(n,a){return e.call(a),t(n,a)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:gp,staticRenderFns:[]},(function(e){e&&e("data-v-47775876_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"TheHomeTab.vue"},media:void 0})}),fp,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],n=e.styles||(e.styles={}),a="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=a?i.media||"default":e,s=n[r]||(n[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let n=i.source,o=s.ids.length;if(s.ids.push(e),a&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),a&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(a&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(n),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(n),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));const bp={name:"the-charts-tab",data:()=>({country:"",id:0,countries:[],chart:[]}),computed:{...hc(["getCharts"]),needToWait(){return 0===this.getCharts.length}},mounted(){console.log("charts mounted"),this.waitCharts(),Pc.on("setChartTracks",this.setTracklist)},beforeDestroy(){console.log("charts bef dest")},methods:{artistView:ph.bind(null,"artist"),albumView:ph.bind(null,"album"),waitCharts(){if(this.needToWait){let e=this.$store.subscribeAction({after:(t,n)=>{"cacheCharts"===t.type&&(this.initCharts(),e())}})}else this.initCharts()},playPausePreview(e){eo.$emit("trackPreview:playPausePreview",e)},previewMouseEnter(e){eo.$emit("trackPreview:previewMouseEnter",e)},previewMouseLeave(e){eo.$emit("trackPreview:previewMouseLeave",e)},convertDuration:up.convertDuration,addToQueue(e){e.stopPropagation(),np.sendAddToQueue(e.currentTarget.dataset.link)},getTrackList(e){document.getElementById("content").scrollTo(0,0);const{currentTarget:{dataset:{title:t}},currentTarget:{dataset:{id:n}}}=e;this.country=t,localStorage.setItem("chart",this.country),this.id=n,Pc.emit("getChartTracks",this.id)},setTracklist(e){console.log("settracklist"),this.chart=e},changeCountry(){this.country="",this.id=0},initCharts(){if(console.log("init charts"),this.countries=this.getCharts,this.country=localStorage.getItem("chart")||"",!this.country)return;let e=0;for(;e-1)}return t.lib=t.prototype={toastify:"1.8.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||"Hi there!",this.options.node=e.node,this.options.duration=0===e.duration?0:e.duration||3e3,this.options.selector=e.selector,this.options.callback=e.callback||function(){},this.options.destination=e.destination,this.options.newWindow=e.newWindow||!1,this.options.close=e.close||!1,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=e.positionLeft||!1,this.options.position=e.position||"",this.options.backgroundColor=e.backgroundColor,this.options.avatar=e.avatar||"",this.options.className=e.className||"",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.onClick=e.onClick,this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");if(e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&(e.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(e.innerHTML=this.options.text,""!==this.options.avatar){var t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(t):e.insertAdjacentElement("beforeend",t)}if(!0===this.options.close){var n=document.createElement("span");n.innerHTML="✖",n.className="toast-close",n.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var a=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&a>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0){const t=this;e.addEventListener("mouseover",(function(t){window.clearTimeout(e.timeOutValue)})),e.addEventListener("mouseleave",(function(){e.timeOutValue=window.setTimeout((function(){t.removeElement(e)}),t.options.duration)}))}return void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return e.insertBefore(this.toastElement,e.firstChild),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},a={top:15,bottom:15},i={top:15,bottom:15},r=document.getElementsByClassName("toastify"),s=0;s0?window.innerWidth:screen.width)<=360?(r[s].style[e]=i[e]+"px",i[e]+=o+15):!0===n(r[s],"toastify-left")?(r[s].style[e]=t[e]+"px",t[e]+=o+15):(r[s].style[e]=a[e]+"px",a[e]+=o+15)}return this},t.lib.init.prototype=t.lib,t}))})),wp=kp((function(e){ +!function(t,n){e.exports?e.exports=n():t.Toastify=n()}(kp,(function(e){var t=function(e){return new t.lib.init(e)};function n(e,t){return!(!e||"string"!=typeof t)&&!!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1)}return t.lib=t.prototype={toastify:"1.8.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||"Hi there!",this.options.node=e.node,this.options.duration=0===e.duration?0:e.duration||3e3,this.options.selector=e.selector,this.options.callback=e.callback||function(){},this.options.destination=e.destination,this.options.newWindow=e.newWindow||!1,this.options.close=e.close||!1,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=e.positionLeft||!1,this.options.position=e.position||"",this.options.backgroundColor=e.backgroundColor,this.options.avatar=e.avatar||"",this.options.className=e.className||"",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.onClick=e.onClick,this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");if(e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&(e.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(e.innerHTML=this.options.text,""!==this.options.avatar){var t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(t):e.insertAdjacentElement("beforeend",t)}if(!0===this.options.close){var n=document.createElement("span");n.innerHTML="✖",n.className="toast-close",n.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var a=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&a>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0){const t=this;e.addEventListener("mouseover",(function(t){window.clearTimeout(e.timeOutValue)})),e.addEventListener("mouseleave",(function(){e.timeOutValue=window.setTimeout((function(){t.removeElement(e)}),t.options.duration)}))}return void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return e.insertBefore(this.toastElement,e.firstChild),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},a={top:15,bottom:15},i={top:15,bottom:15},r=document.getElementsByClassName("toastify"),s=0;s0?window.innerWidth:screen.width)<=360?(r[s].style[e]=i[e]+"px",i[e]+=o+15):!0===n(r[s],"toastify-left")?(r[s].style[e]=t[e]+"px",t[e]+=o+15):(r[s].style[e]=a[e]+"px",a[e]+=o+15)}return this},t.lib.init.prototype=t.lib,t}))})),Cp=Ap((function(e){ /*! * jQuery JavaScript Library v3.5.1 * https://jquery.com/ @@ -35,7 +35,7 @@ var e=Object.freeze({});function t(e){return null==e}function n(e){return null!= * * Date: 2020-05-04T22:49Z */ -!function(t,n){e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}}("undefined"!=typeof window?window:_p,(function(e,t){var n=[],a=Object.getPrototypeOf,i=n.slice,r=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},s=n.push,o=n.indexOf,l={},c=l.toString,d=l.hasOwnProperty,u=d.toString,p=u.call(Object),h={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},f=function(e){return null!=e&&e===e.window},g=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var a,i,r=(n=n||g).createElement("script");if(r.text=e,t)for(a in v)(i=t[a]||t.getAttribute&&t.getAttribute(a))&&r.setAttribute(a,i);n.head.appendChild(r).parentNode.removeChild(r)}function y(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var _=function(e,t){return new _.fn.init(e,t)};function k(e){var t=!!e&&"length"in e&&e.length,n=y(e);return!m(e)&&!f(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}_.fn=_.prototype={jquery:"3.5.1",constructor:_,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(_.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}_.fn=_.prototype={jquery:"3.5.1",constructor:_,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(_.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(_.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+I+")"+I+"*"),H=new RegExp(I+"|>"),G=new RegExp(O),W=new RegExp("^"+j+"$"),Q={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+E+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ae=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},se=_e((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(D=L.call(k.childNodes),k.childNodes),D[k.childNodes.length].nodeType}catch(e){P={apply:D.length?function(e,t){N.apply(e,L.call(t))}:function(e,t){for(var n=e.length,a=0;e[n++]=t[a++];);e.length=n-1}}}function oe(e,t,a,i){var r,o,c,d,u,m,v,b=t&&t.ownerDocument,k=t?t.nodeType:9;if(a=a||[],"string"!=typeof e||!e||1!==k&&9!==k&&11!==k)return a;if(!i&&(p(t),t=t||h,f)){if(11!==k&&(u=Z.exec(e)))if(r=u[1]){if(9===k){if(!(c=t.getElementById(r)))return a;if(c.id===r)return a.push(c),a}else if(b&&(c=b.getElementById(r))&&y(t,c)&&c.id===r)return a.push(c),a}else{if(u[2])return P.apply(a,t.getElementsByTagName(e)),a;if((r=u[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(a,t.getElementsByClassName(r)),a}if(n.qsa&&!S[e+" "]&&(!g||!g.test(e))&&(1!==k||"object"!==t.nodeName.toLowerCase())){if(v=e,b=t,1===k&&(H.test(e)||V.test(e))){for((b=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((d=t.getAttribute("id"))?d=d.replace(ae,ie):t.setAttribute("id",d=_)),o=(m=s(e)).length;o--;)m[o]=(d?"#"+d:":scope")+" "+ye(m[o]);v=m.join(",")}try{return P.apply(a,b.querySelectorAll(v)),a}catch(t){S(e,!0)}finally{d===_&&t.removeAttribute("id")}}}return l(e.replace(q,"$1"),t,a,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>a.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[_]=!0,e}function de(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ue(e,t){for(var n=e.split("|"),i=n.length;i--;)a.attrHandle[n[i]]=t}function pe(e,t){var n=t&&e,a=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(a)return a;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function me(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function fe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ge(e){return ce((function(t){return t=+t,ce((function(n,a){for(var i,r=e([],n.length,t),s=r.length;s--;)n[i=r[s]]&&(n[i]=!(a[i]=n[i]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},r=oe.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},p=oe.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:k;return s!=h&&9===s.nodeType&&s.documentElement?(m=(h=s).documentElement,f=!r(h),k!=h&&(i=h.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.scope=de((function(e){return m.appendChild(e).appendChild(h.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=de((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=de((function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=X.test(h.getElementsByClassName),n.getById=de((function(e){return m.appendChild(e).id=_,!h.getElementsByName||!h.getElementsByName(_).length})),n.getById?(a.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}}):(a.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n,a,i,r=t.getElementById(e);if(r){if((n=r.getAttributeNode("id"))&&n.value===e)return[r];for(i=t.getElementsByName(e),a=0;r=i[a++];)if((n=r.getAttributeNode("id"))&&n.value===e)return[r]}return[]}}),a.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,a=[],i=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[i++];)1===n.nodeType&&a.push(n);return a}return r},a.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},v=[],g=[],(n.qsa=X.test(h.querySelectorAll))&&(de((function(e){var t;m.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||g.push("\\["+I+"*(?:value|"+E+")"),e.querySelectorAll("[id~="+_+"-]").length||g.push("~="),(t=h.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||g.push("\\["+I+"*name"+I+"*="+I+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||g.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||g.push(".#.+[+~]"),e.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),de((function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&g.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),m.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=X.test(b=m.matches||m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&de((function(e){n.disconnectedMatch=b.call(e,"*"),b.call(e,"[s!='']:x"),v.push("!=",O)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),t=X.test(m.compareDocumentPosition),y=t||X.test(m.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,a=t&&t.parentNode;return e===a||!(!a||1!==a.nodeType||!(n.contains?n.contains(a):e.compareDocumentPosition&&16&e.compareDocumentPosition(a)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},z=t?function(e,t){if(e===t)return u=!0,0;var a=!e.compareDocumentPosition-!t.compareDocumentPosition;return a||(1&(a=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===a?e==h||e.ownerDocument==k&&y(k,e)?-1:t==h||t.ownerDocument==k&&y(k,t)?1:d?R(d,e)-R(d,t):0:4&a?-1:1)}:function(e,t){if(e===t)return u=!0,0;var n,a=0,i=e.parentNode,r=t.parentNode,s=[e],o=[t];if(!i||!r)return e==h?-1:t==h?1:i?-1:r?1:d?R(d,e)-R(d,t):0;if(i===r)return pe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)o.unshift(n);for(;s[a]===o[a];)a++;return a?pe(s[a],o[a]):s[a]==k?-1:o[a]==k?1:0},h):h},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&f&&!S[t+" "]&&(!v||!v.test(t))&&(!g||!g.test(t)))try{var a=b.call(e,t);if(a||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return a}catch(e){S(t,!0)}return oe(t,h,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!=h&&p(e),y(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!=h&&p(e);var i=a.attrHandle[t.toLowerCase()],r=i&&M.call(a.attrHandle,t.toLowerCase())?i(e,t,!f):void 0;return void 0!==r?r:n.attributes||!f?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},oe.escape=function(e){return(e+"").replace(ae,ie)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,a=[],i=0,r=0;if(u=!n.detectDuplicates,d=!n.sortStable&&e.slice(0),e.sort(z),u){for(;t=e[r++];)t===e[r]&&(i=a.push(r));for(;i--;)e.splice(a[i],1)}return d=null,e},i=oe.getText=function(e){var t,n="",a=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[a++];)n+=i(t);return n},(a=oe.selectors={cacheLength:50,createPseudo:ce,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&G.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&C(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(a){var i=oe.attr(a,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,a,i){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),o="of-type"===t;return 1===a&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,d,u,p,h,m,f=r!==s?"nextSibling":"previousSibling",g=t.parentNode,v=o&&t.nodeName.toLowerCase(),b=!l&&!o,y=!1;if(g){if(r){for(;f;){for(p=t;p=p[f];)if(o?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;m=f="only"===e&&!m&&"nextSibling"}return!0}if(m=[s?g.firstChild:g.lastChild],s&&b){for(y=(h=(c=(d=(u=(p=g)[_]||(p[_]={}))[p.uniqueID]||(u[p.uniqueID]={}))[e]||[])[0]===A&&c[1])&&c[2],p=h&&g.childNodes[h];p=++h&&p&&p[f]||(y=h=0)||m.pop();)if(1===p.nodeType&&++y&&p===t){d[e]=[A,h,y];break}}else if(b&&(y=h=(c=(d=(u=(p=t)[_]||(p[_]={}))[p.uniqueID]||(u[p.uniqueID]={}))[e]||[])[0]===A&&c[1]),!1===y)for(;(p=++h&&p&&p[f]||(y=h=0)||m.pop())&&((o?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++y||(b&&((d=(u=p[_]||(p[_]={}))[p.uniqueID]||(u[p.uniqueID]={}))[e]=[A,y]),p!==t)););return(y-=i)===a||y%a==0&&y/a>=0}}},PSEUDO:function(e,t){var n,i=a.pseudos[e]||a.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],a.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var a,r=i(e,t),s=r.length;s--;)e[a=R(e,r[s])]=!(n[a]=r[s])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],a=o(e.replace(q,"$1"));return a[_]?ce((function(e,t,n,i){for(var r,s=a(e,null,i,[]),o=e.length;o--;)(r=s[o])&&(e[o]=!(t[o]=r))})):function(e,i,r){return t[0]=e,a(t,null,r,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return oe(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ce((function(e){return W.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===m},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:fe(!1),disabled:fe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!a.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ge((function(){return[0]})),last:ge((function(e,t){return[t-1]})),eq:ge((function(e,t,n){return[n<0?n+t:n]})),even:ge((function(e,t){for(var n=0;nt?t:n;--a>=0;)e.push(a);return e})),gt:ge((function(e,t,n){for(var a=n<0?n+t:n;++a1?function(t,n,a){for(var i=e.length;i--;)if(!e[i](t,n,a))return!1;return!0}:e[0]}function Ae(e,t,n,a,i){for(var r,s=[],o=0,l=e.length,c=null!=t;o-1&&(r[c]=!(s[c]=u))}}else v=Ae(v===s?v.splice(m,v.length):v),i?i(null,s,v,l):P.apply(s,v)}))}function Ce(e){for(var t,n,i,r=e.length,s=a.relative[e[0].type],o=s||a.relative[" "],l=s?1:0,d=_e((function(e){return e===t}),o,!0),u=_e((function(e){return R(t,e)>-1}),o,!0),p=[function(e,n,a){var i=!s&&(a||n!==c)||((t=n).nodeType?d(e,n,a):u(e,n,a));return t=null,i}];l1&&ke(p),l>1&&ye(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(q,"$1"),n,l0,i=e.length>0,r=function(r,s,o,l,d){var u,m,g,v=0,b="0",y=r&&[],_=[],k=c,w=r||i&&a.find.TAG("*",d),C=A+=null==k?1:Math.random()||.1,x=w.length;for(d&&(c=s==h||s||d);b!==x&&null!=(u=w[b]);b++){if(i&&u){for(m=0,s||u.ownerDocument==h||(p(u),o=!f);g=e[m++];)if(g(u,s||h,o)){l.push(u);break}d&&(A=C)}n&&((u=!g&&u)&&v--,r&&y.push(u))}if(v+=b,n&&b!==v){for(m=0;g=t[m++];)g(y,_,s,o);if(r){if(v>0)for(;b--;)y[b]||_[b]||(_[b]=$.call(l));_=Ae(_)}P.apply(l,_),d&&!r&&_.length>0&&v+t.length>1&&oe.uniqueSort(l)}return d&&(A=C,c=k),y};return n?ce(r):r}(r,i))).selector=e}return o},l=oe.select=function(e,t,n,i){var r,l,c,d,u,p="function"==typeof e&&e,h=!i&&s(e=p.selector||e);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===t.nodeType&&f&&a.relative[l[1].type]){if(!(t=(a.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(r=Q.needsContext.test(e)?0:l.length;r--&&(c=l[r],!a.relative[d=c.type]);)if((u=a.find[d])&&(i=u(c.matches[0].replace(te,ne),ee.test(l[0].type)&&ve(t.parentNode)||t))){if(l.splice(r,1),!(e=i.length&&ye(l)))return P.apply(n,i),n;break}}return(p||o(e,h))(i,t,!f,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},n.sortStable=_.split("").sort(z).join("")===_,n.detectDuplicates=!!u,p(),n.sortDetached=de((function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))})),de((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||ue("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&de((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ue("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),de((function(e){return null==e.getAttribute("disabled")}))||ue(E,(function(e,t,n){var a;if(!n)return!0===e[t]?t.toLowerCase():(a=e.getAttributeNode(t))&&a.specified?a.value:null})),oe}(e);_.find=A,_.expr=A.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=A.uniqueSort,_.text=A.getText,_.isXMLDoc=A.isXML,_.contains=A.contains,_.escapeSelector=A.escape;var w=function(e,t,n){for(var a=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&_(e).is(n))break;a.push(e)}return a},C=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},x=_.expr.match.needsContext;function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(e,t,n){return m(t)?_.grep(e,(function(e,a){return!!t.call(e,a,e)!==n})):t.nodeType?_.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?_.grep(e,(function(e){return o.call(t,e)>-1!==n})):_.filter(t,e,n)}_.filter=function(e,t,n){var a=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===a.nodeType?_.find.matchesSelector(a,e)?[a]:[]:_.find.matches(e,_.grep(t,(function(e){return 1===e.nodeType})))},_.fn.extend({find:function(e){var t,n,a=this.length,i=this;if("string"!=typeof e)return this.pushStack(_(e).filter((function(){for(t=0;t1?_.uniqueSort(n):n},filter:function(e){return this.pushStack(z(this,e||[],!1))},not:function(e){return this.pushStack(z(this,e||[],!0))},is:function(e){return!!z(this,"string"==typeof e&&x.test(e)?_(e):e||[],!1).length}});var M,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var a,i;if(!e)return this;if(n=n||M,"string"==typeof e){if(!(a="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:D.exec(e))||!a[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(a[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(a[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),S.test(a[1])&&_.isPlainObject(t))for(a in t)m(this[a])?this[a](t[a]):this.attr(a,t[a]);return this}return(i=g.getElementById(a[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,M=_(g);var $=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&_.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?_.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?o.call(_(e),this[0]):o.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return w(e,"parentNode")},parentsUntil:function(e,t,n){return w(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return w(e,"nextSibling")},prevAll:function(e){return w(e,"previousSibling")},nextUntil:function(e,t,n){return w(e,"nextSibling",n)},prevUntil:function(e,t,n){return w(e,"previousSibling",n)},siblings:function(e){return C((e.parentNode||{}).firstChild,e)},children:function(e){return C(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(T(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},(function(e,t){_.fn[e]=function(n,a){var i=_.map(this,t,n);return"Until"!==e.slice(-5)&&(a=n),a&&"string"==typeof a&&(i=_.filter(a,i)),this.length>1&&(N[e]||_.uniqueSort(i),$.test(e)&&i.reverse()),this.pushStack(i)}}));var L=/[^\x20\t\r\n\f]+/g;function R(e){return e}function E(e){throw e}function I(e,t,n,a){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(a))}catch(e){n.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(L)||[],(function(e,n){t[n]=!0})),t}(e):_.extend({},e);var t,n,a,i,r=[],s=[],o=-1,l=function(){for(i=i||e.once,a=t=!0;s.length;o=-1)for(n=s.shift();++o-1;)r.splice(n,1),n<=o&&o--})),this},has:function(e){return e?_.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return i=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return i=s=[],n||t||(r=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!a}};return c},_.extend({Deferred:function(t){var n=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],a="pending",i={state:function(){return a},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return _.Deferred((function(t){_.each(n,(function(n,a){var i=m(e[a[4]])&&e[a[4]];r[a[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[a[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(t,a,i){var r=0;function s(t,n,a,i){return function(){var o=this,l=arguments,c=function(){var e,c;if(!(t=r&&(a!==E&&(o=void 0,l=[e]),n.rejectWith(o,l))}};t?d():(_.Deferred.getStackHook&&(d.stackTrace=_.Deferred.getStackHook()),e.setTimeout(d))}}return _.Deferred((function(e){n[0][3].add(s(0,e,m(i)?i:R,e.notifyWith)),n[1][3].add(s(0,e,m(t)?t:R)),n[2][3].add(s(0,e,m(a)?a:E))})).promise()},promise:function(e){return null!=e?_.extend(e,i):i}},r={};return _.each(n,(function(e,t){var s=t[2],o=t[5];i[t[1]]=s.add,o&&s.add((function(){a=o}),n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),s.add(t[3].fire),r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this},r[t[0]+"With"]=s.fireWith})),i.promise(r),t&&t.call(r,r),r},when:function(e){var t=arguments.length,n=t,a=Array(n),r=i.call(arguments),s=_.Deferred(),o=function(e){return function(n){a[e]=this,r[e]=arguments.length>1?i.call(arguments):n,--t||s.resolveWith(a,r)}};if(t<=1&&(I(e,s.done(o(n)).resolve,s.reject,!t),"pending"===s.state()||m(r[n]&&r[n].then)))return s.then();for(;n--;)I(r[n],o(n),s.reject);return s.promise()}});var j=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&j.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},_.readyException=function(t){e.setTimeout((function(){throw t}))};var F=_.Deferred();function O(){g.removeEventListener("DOMContentLoaded",O),e.removeEventListener("load",O),_.ready()}_.fn.ready=function(e){return F.then(e).catch((function(e){_.readyException(e)})),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||F.resolveWith(g,[_]))}}),_.ready.then=F.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?e.setTimeout(_.ready):(g.addEventListener("DOMContentLoaded",O),e.addEventListener("load",O));var B=function(e,t,n,a,i,r,s){var o=0,l=e.length,c=null==n;if("object"===y(n))for(o in i=!0,n)B(e,t,o,n[o],!0,r,s);else if(void 0!==a&&(i=!0,m(a)||(s=!0),c&&(s?(t.call(e,a),t=null):(c=t,t=function(e,t,n){return c.call(_(e),n)})),t))for(;o1,null,!0)},removeData:function(e){return this.each((function(){K.remove(this,e)}))}}),_.extend({queue:function(e,t,n){var a;if(e)return t=(t||"fx")+"queue",a=Q.get(e,t),n&&(!a||Array.isArray(n)?a=Q.access(e,t,_.makeArray(n)):a.push(n)),a||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),a=n.length,i=n.shift(),r=_._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),a--),i&&("fx"===t&&n.unshift("inprogress"),delete r.stop,i.call(e,(function(){_.dequeue(e,t)}),r)),!a&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:_.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),_.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;!function(){var e=g.createDocumentFragment().appendChild(g.createElement("div")),t=g.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,e.innerHTML="",h.option=!!e.lastChild}();var he={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&T(e,t)?_.merge([e],n):n}function fe(e,t){for(var n=0,a=e.length;n",""]);var ge=/<|&#?\w+;/;function ve(e,t,n,a,i){for(var r,s,o,l,c,d,u=t.createDocumentFragment(),p=[],h=0,m=e.length;h-1)i&&i.push(r);else if(c=ae(r),s=me(u.appendChild(r),"script"),c&&fe(s),n)for(d=0;r=s[d++];)pe.test(r.type||"")&&n.push(r);return u}var be=/^key/,ye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_e=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Ae(){return!1}function we(e,t){return e===function(){try{return g.activeElement}catch(e){}}()==("focus"===t)}function Ce(e,t,n,a,i,r){var s,o;if("object"==typeof t){for(o in"string"!=typeof n&&(a=a||n,n=void 0),t)Ce(e,o,n,a,t[o],r);return e}if(null==a&&null==i?(i=n,a=n=void 0):null==i&&("string"==typeof n?(i=a,a=void 0):(i=a,a=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===r&&(s=i,(i=function(e){return _().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=_.guid++)),e.each((function(){_.event.add(this,t,i,a,n)}))}function xe(e,t,n){n?(Q.set(e,t,!1),_.event.add(e,t,{namespace:!1,handler:function(e){var a,r,s=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(s.length)(_.event.special[t]||{}).delegateType&&e.stopPropagation();else if(s=i.call(arguments),Q.set(this,t,s),a=n(this,t),this[t](),s!==(r=Q.get(this,t))||a?Q.set(this,t,!1):r={},s!==r)return e.stopImmediatePropagation(),e.preventDefault(),r.value}else s.length&&(Q.set(this,t,{value:_.event.trigger(_.extend(s[0],_.Event.prototype),s.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&_.event.add(e,t,ke)}_.event={global:{},add:function(e,t,n,a,i){var r,s,o,l,c,d,u,p,h,m,f,g=Q.get(e);if(G(e))for(n.handler&&(n=(r=n).handler,i=r.selector),i&&_.find.matchesSelector(ne,i),n.guid||(n.guid=_.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(L)||[""]).length;c--;)h=f=(o=_e.exec(t[c])||[])[1],m=(o[2]||"").split(".").sort(),h&&(u=_.event.special[h]||{},h=(i?u.delegateType:u.bindType)||h,u=_.event.special[h]||{},d=_.extend({type:h,origType:f,data:a,handler:n,guid:n.guid,selector:i,needsContext:i&&_.expr.match.needsContext.test(i),namespace:m.join(".")},r),(p=l[h])||((p=l[h]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(e,a,m,s)||e.addEventListener&&e.addEventListener(h,s)),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,d):p.push(d),_.event.global[h]=!0)},remove:function(e,t,n,a,i){var r,s,o,l,c,d,u,p,h,m,f,g=Q.hasData(e)&&Q.get(e);if(g&&(l=g.events)){for(c=(t=(t||"").match(L)||[""]).length;c--;)if(h=f=(o=_e.exec(t[c])||[])[1],m=(o[2]||"").split(".").sort(),h){for(u=_.event.special[h]||{},p=l[h=(a?u.delegateType:u.bindType)||h]||[],o=o[2]&&new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)d=p[r],!i&&f!==d.origType||n&&n.guid!==d.guid||o&&!o.test(d.namespace)||a&&a!==d.selector&&("**"!==a||!d.selector)||(p.splice(r,1),d.selector&&p.delegateCount--,u.remove&&u.remove.call(e,d));s&&!p.length&&(u.teardown&&!1!==u.teardown.call(e,m,g.handle)||_.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)_.event.remove(e,h+t[c],n,a,!0);_.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,a,i,r,s,o=new Array(arguments.length),l=_.event.fix(e),c=(Q.get(this,"events")||Object.create(null))[l.type]||[],d=_.event.special[l.type]||{};for(o[0]=l,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(r=[],s={},n=0;n-1:_.find(i,this,null,[c]).length),s[i]&&r.push(a);r.length&&o.push({elem:c,handlers:r})}return c=this,l\s*$/g;function Me(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function $e(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ne(e,t){var n,a,i,r,s,o;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.get(e).events))for(i in Q.remove(t,"handle events"),o)for(n=0,a=o[i].length;n1&&"string"==typeof g&&!h.checkClone&&Se.test(g))return e.each((function(i){var r=e.eq(i);v&&(t[0]=g.call(this,i,r.html())),Le(r,t,n,a)}));if(p&&(s=(i=ve(t,e[0].ownerDocument,!1,e,a)).firstChild,1===i.childNodes.length&&(i=s),s||a)){for(l=(o=_.map(me(i,"script"),De)).length;u0&&fe(s,!l&&me(e,"script")),o},cleanData:function(e){for(var t,n,a,i=_.event.special,r=0;void 0!==(n=e[r]);r++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(a in t.events)i[a]?_.event.remove(n,a):_.removeEvent(n,a,t.handle);n[Q.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),_.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return B(this,(function(e){return void 0===e?_.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Le(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Me(this,e).appendChild(e)}))},prepend:function(){return Le(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Me(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Le(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Le(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return _.clone(this,e,t)}))},html:function(e){return B(this,(function(e){var t=this[0]||{},n=0,a=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Te.test(e)&&!he[(ue.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n3,ne.removeChild(t)),o}}))}();var qe=["Webkit","Moz","ms"],Ue=g.createElement("div").style,Ve={};function He(e){var t=_.cssProps[e]||Ve[e];return t||(e in Ue?e:Ve[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=qe.length;n--;)if((e=qe[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,We=/^--/,Qe={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var a=ee.exec(t);return a?Math.max(0,a[2]-(n||0))+(a[3]||"px"):t}function Je(e,t,n,a,i,r){var s="width"===t?1:0,o=0,l=0;if(n===(a?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=_.css(e,n+te[s],!0,i)),a?("content"===n&&(l-=_.css(e,"padding"+te[s],!0,i)),"margin"!==n&&(l-=_.css(e,"border"+te[s]+"Width",!0,i))):(l+=_.css(e,"padding"+te[s],!0,i),"padding"!==n?l+=_.css(e,"border"+te[s]+"Width",!0,i):o+=_.css(e,"border"+te[s]+"Width",!0,i));return!a&&r>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-o-.5))||0),l}function Xe(e,t,n){var a=Ie(e),i=(!h.boxSizingReliable()||n)&&"border-box"===_.css(e,"boxSizing",!1,a),r=i,s=Oe(e,t,a),o="offset"+t[0].toUpperCase()+t.slice(1);if(Ee.test(s)){if(!n)return s;s="auto"}return(!h.boxSizingReliable()&&i||!h.reliableTrDimensions()&&T(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===_.css(e,"display",!1,a))&&e.getClientRects().length&&(i="border-box"===_.css(e,"boxSizing",!1,a),(r=o in e)&&(s=e[o])),(s=parseFloat(s)||0)+Je(e,t,n||(i?"border":"content"),r,a,s)+"px"}function Ze(e,t,n,a,i){return new Ze.prototype.init(e,t,n,a,i)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Oe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,a){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,r,s,o=H(t),l=We.test(t),c=e.style;if(l||(t=He(o)),s=_.cssHooks[t]||_.cssHooks[o],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,a))?i:c[t];"string"===(r=typeof n)&&(i=ee.exec(n))&&i[1]&&(n=se(e,t,i),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=i&&i[3]||(_.cssNumber[o]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,a))||(l?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,a){var i,r,s,o=H(t);return We.test(t)||(t=He(o)),(s=_.cssHooks[t]||_.cssHooks[o])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Oe(e,t,a)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(r=parseFloat(i),!0===n||isFinite(r)?r||0:i):i}}),_.each(["height","width"],(function(e,t){_.cssHooks[t]={get:function(e,n,a){if(n)return!Ge.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Xe(e,t,a):je(e,Qe,(function(){return Xe(e,t,a)}))},set:function(e,n,a){var i,r=Ie(e),s=!h.scrollboxSize()&&"absolute"===r.position,o=(s||a)&&"border-box"===_.css(e,"boxSizing",!1,r),l=a?Je(e,t,a,o,r):0;return o&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-Je(e,t,"border",!1,r)-.5)),l&&(i=ee.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=_.css(e,t)),Ye(0,n,l)}}})),_.cssHooks.marginLeft=Be(h.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Oe(e,"marginLeft"))||e.getBoundingClientRect().left-je(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),_.each({margin:"",padding:"",border:"Width"},(function(e,t){_.cssHooks[e+t]={expand:function(n){for(var a=0,i={},r="string"==typeof n?n.split(" "):[n];a<4;a++)i[e+te[a]+t]=r[a]||r[a-2]||r[0];return i}},"margin"!==e&&(_.cssHooks[e+t].set=Ye)})),_.fn.extend({css:function(e,t){return B(this,(function(e,t,n){var a,i,r={},s=0;if(Array.isArray(t)){for(a=Ie(e),i=t.length;s1)}}),_.Tween=Ze,Ze.prototype={constructor:Ze,init:function(e,t,n,a,i,r){this.elem=e,this.prop=n,this.easing=i||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=a,this.unit=r||(_.cssNumber[n]?"":"px")},cur:function(){var e=Ze.propHooks[this.prop];return e&&e.get?e.get(this):Ze.propHooks._default.get(this)},run:function(e){var t,n=Ze.propHooks[this.prop];return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ze.propHooks._default.set(this),this}},Ze.prototype.init.prototype=Ze.prototype,Ze.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||!_.cssHooks[e.prop]&&null==e.elem.style[He(e.prop)]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},Ze.propHooks.scrollTop=Ze.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=Ze.prototype.init,_.fx.step={};var et,tt,nt,at,it=/^(?:toggle|show|hide)$/,rt=/queueHooks$/;function st(){tt&&(!1===g.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(st):e.setTimeout(st,_.fx.interval),_.fx.tick())}function ot(){return e.setTimeout((function(){et=void 0})),et=Date.now()}function lt(e,t){var n,a=0,i={height:e};for(t=t?1:0;a<4;a+=2-t)i["margin"+(n=te[a])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var a,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),r=0,s=i.length;r1)},removeAttr:function(e){return this.each((function(){_.removeAttr(this,e)}))}}),_.extend({attr:function(e,t,n){var a,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?_.prop(e,t,n):(1===r&&_.isXMLDoc(e)||(i=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?ut:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):i&&"set"in i&&void 0!==(a=i.set(e,n,t))?a:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(a=i.get(e,t))?a:null==(a=_.find.attr(e,t))?void 0:a)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&T(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,a=0,i=t&&t.match(L);if(i&&1===e.nodeType)for(;n=i[a++];)e.removeAttribute(n)}}),ut={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=pt[t]||_.find.attr;pt[t]=function(e,t,a){var i,r,s=t.toLowerCase();return a||(r=pt[s],pt[s]=i,i=null!=n(e,t,a)?s:null,pt[s]=r),i}}));var ht=/^(?:input|select|textarea|button)$/i,mt=/^(?:a|area)$/i;function ft(e){return(e.match(L)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(L)||[]}_.fn.extend({prop:function(e,t){return B(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[_.propFix[e]||e]}))}}),_.extend({prop:function(e,t,n){var a,i,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&_.isXMLDoc(e)||(t=_.propFix[t]||t,i=_.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(a=i.set(e,n,t))?a:e[t]=n:i&&"get"in i&&null!==(a=i.get(e,t))?a:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),h.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){_.propFix[this.toLowerCase()]=this})),_.fn.extend({addClass:function(e){var t,n,a,i,r,s,o,l=0;if(m(e))return this.each((function(t){_(this).addClass(e.call(this,t,gt(this)))}));if((t=vt(e)).length)for(;n=this[l++];)if(i=gt(n),a=1===n.nodeType&&" "+ft(i)+" "){for(s=0;r=t[s++];)a.indexOf(" "+r+" ")<0&&(a+=r+" ");i!==(o=ft(a))&&n.setAttribute("class",o)}return this},removeClass:function(e){var t,n,a,i,r,s,o,l=0;if(m(e))return this.each((function(t){_(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=vt(e)).length)for(;n=this[l++];)if(i=gt(n),a=1===n.nodeType&&" "+ft(i)+" "){for(s=0;r=t[s++];)for(;a.indexOf(" "+r+" ")>-1;)a=a.replace(" "+r+" "," ");i!==(o=ft(a))&&n.setAttribute("class",o)}return this},toggleClass:function(e,t){var n=typeof e,a="string"===n||Array.isArray(e);return"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):m(e)?this.each((function(n){_(this).toggleClass(e.call(this,n,gt(this),t),t)})):this.each((function(){var t,i,r,s;if(a)for(i=0,r=_(this),s=vt(e);t=s[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,a=0;for(t=" "+e+" ";n=this[a++];)if(1===n.nodeType&&(" "+ft(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;_.fn.extend({val:function(e){var t,n,a,i=this[0];return arguments.length?(a=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=a?e.call(this,n,_(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=_.map(i,(function(e){return null==e?"":e+""}))),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=_.valHooks[i.type]||_.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:ft(_.text(e))}},select:{get:function(e){var t,n,a,i=e.options,r=e.selectedIndex,s="select-one"===e.type,o=s?null:[],l=s?r+1:i.length;for(a=r<0?l:s?r:0;a-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),_.each(["radio","checkbox"],(function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},h.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),h.focusin="onfocusin"in e;var yt=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(t,n,a,i){var r,s,o,l,c,u,p,h,v=[a||g],b=d.call(t,"type")?t.type:t,y=d.call(t,"namespace")?t.namespace.split("."):[];if(s=h=o=a=a||g,3!==a.nodeType&&8!==a.nodeType&&!yt.test(b+_.event.triggered)&&(b.indexOf(".")>-1&&(y=b.split("."),b=y.shift(),y.sort()),c=b.indexOf(":")<0&&"on"+b,(t=t[_.expando]?t:new _.Event(b,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=a),n=null==n?[t]:_.makeArray(n,[t]),p=_.event.special[b]||{},i||!p.trigger||!1!==p.trigger.apply(a,n))){if(!i&&!p.noBubble&&!f(a)){for(l=p.delegateType||b,yt.test(l+b)||(s=s.parentNode);s;s=s.parentNode)v.push(s),o=s;o===(a.ownerDocument||g)&&v.push(o.defaultView||o.parentWindow||e)}for(r=0;(s=v[r++])&&!t.isPropagationStopped();)h=s,t.type=r>1?l:p.bindType||b,(u=(Q.get(s,"events")||Object.create(null))[t.type]&&Q.get(s,"handle"))&&u.apply(s,n),(u=c&&s[c])&&u.apply&&G(s)&&(t.result=u.apply(s,n),!1===t.result&&t.preventDefault());return t.type=b,i||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!G(a)||c&&m(a[b])&&!f(a)&&((o=a[c])&&(a[c]=null),_.event.triggered=b,t.isPropagationStopped()&&h.addEventListener(b,_t),a[b](),t.isPropagationStopped()&&h.removeEventListener(b,_t),_.event.triggered=void 0,o&&(a[c]=o)),t.result}},simulate:function(e,t,n){var a=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(a,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each((function(){_.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),h.focusin||_.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var a=this.ownerDocument||this.document||this,i=Q.access(a,t);i||a.addEventListener(e,n,!0),Q.access(a,t,(i||0)+1)},teardown:function(){var a=this.ownerDocument||this.document||this,i=Q.access(a,t)-1;i?Q.access(a,t,i):(a.removeEventListener(e,n,!0),Q.remove(a,t))}}}));var kt=e.location,At={guid:Date.now()},wt=/\?/;_.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+t),n};var Ct=/\[\]$/,xt=/\r?\n/g,Tt=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function zt(e,t,n,a){var i;if(Array.isArray(t))_.each(t,(function(t,i){n||Ct.test(e)?a(e,i):zt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,a)}));else if(n||"object"!==y(t))a(e,t);else for(i in t)zt(e+"["+i+"]",t[i],n,a)}_.param=function(e,t){var n,a=[],i=function(e,t){var n=m(t)?t():t;a[a.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,(function(){i(this.name,this.value)}));else for(n in e)zt(n,e[n],t,i);return a.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&St.test(this.nodeName)&&!Tt.test(e)&&(this.checked||!de.test(e))})).map((function(e,t){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,(function(e){return{name:t.name,value:e.replace(xt,"\r\n")}})):{name:t.name,value:n.replace(xt,"\r\n")}})).get()}});var Mt=/%20/g,Dt=/#.*$/,$t=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:GET|HEAD)$/,Lt=/^\/\//,Rt={},Et={},It="*/".concat("*"),jt=g.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var a,i=0,r=t.toLowerCase().match(L)||[];if(m(n))for(;a=r[i++];)"+"===a[0]?(a=a.slice(1)||"*",(e[a]=e[a]||[]).unshift(n)):(e[a]=e[a]||[]).push(n)}}function Ot(e,t,n,a){var i={},r=e===Et;function s(o){var l;return i[o]=!0,_.each(e[o]||[],(function(e,o){var c=o(t,n,a);return"string"!=typeof c||r||i[c]?r?!(l=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function Bt(e,t){var n,a,i=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:a||(a={}))[n]=t[n]);return a&&_.extend(!0,e,a),e}jt.href=kt.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(kt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,_.ajaxSettings),t):Bt(_.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Et),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var a,i,r,s,o,l,c,d,u,p,h=_.ajaxSetup({},n),m=h.context||h,f=h.context&&(m.nodeType||m.jquery)?_(m):_.event,v=_.Deferred(),b=_.Callbacks("once memory"),y=h.statusCode||{},k={},A={},w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Nt.exec(r);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(e,t){return null==c&&(e=A[e.toLowerCase()]=A[e.toLowerCase()]||e,k[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||w;return a&&a.abort(t),x(0,t),this}};if(v.promise(C),h.url=((t||h.url||kt.href)+"").replace(Lt,kt.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(L)||[""],null==h.crossDomain){l=g.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=jt.protocol+"//"+jt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=_.param(h.data,h.traditional)),Ot(Rt,h,n,C),c)return C;for(u in(d=_.event&&h.global)&&0==_.active++&&_.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Pt.test(h.type),i=h.url.replace(Dt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Mt,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(wt.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace($t,"$1"),p=(wt.test(i)?"&":"?")+"_="+At.guid+++p),h.url=i+p),h.ifModified&&(_.lastModified[i]&&C.setRequestHeader("If-Modified-Since",_.lastModified[i]),_.etag[i]&&C.setRequestHeader("If-None-Match",_.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+It+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(u,h.headers[u]);if(h.beforeSend&&(!1===h.beforeSend.call(m,C,h)||c))return C.abort();if(w="abort",b.add(h.complete),C.done(h.success),C.fail(h.error),a=Ot(Et,h,n,C)){if(C.readyState=1,d&&f.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(o=e.setTimeout((function(){C.abort("timeout")}),h.timeout));try{c=!1,a.send(k,x)}catch(e){if(c)throw e;x(-1,e)}}else x(-1,"No Transport");function x(t,n,s,l){var u,p,g,k,A,w=n;c||(c=!0,o&&e.clearTimeout(o),a=void 0,r=l||"",C.readyState=t>0?4:0,u=t>=200&&t<300||304===t,s&&(k=function(e,t,n){for(var a,i,r,s,o=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===a&&(a=e.mimeType||t.getResponseHeader("Content-Type"));if(a)for(i in o)if(o[i]&&o[i].test(a)){l.unshift(i);break}if(l[0]in n)r=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){r=i;break}s||(s=i)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(h,C,s)),!u&&_.inArray("script",h.dataTypes)>-1&&(h.converters["text script"]=function(){}),k=function(e,t,n,a){var i,r,s,o,l,c={},d=e.dataTypes.slice();if(d[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(r=d.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!l&&a&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=d.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(i in c)if((o=i.split(" "))[1]===r&&(s=c[l+" "+o[0]]||c["* "+o[0]])){!0===s?s=c[i]:!0!==c[i]&&(r=o[0],d.unshift(o[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}(h,k,C,u),u?(h.ifModified&&((A=C.getResponseHeader("Last-Modified"))&&(_.lastModified[i]=A),(A=C.getResponseHeader("etag"))&&(_.etag[i]=A)),204===t||"HEAD"===h.type?w="nocontent":304===t?w="notmodified":(w=k.state,p=k.data,u=!(g=k.error))):(g=w,!t&&w||(w="error",t<0&&(t=0))),C.status=t,C.statusText=(n||w)+"",u?v.resolveWith(m,[p,w,C]):v.rejectWith(m,[C,w,g]),C.statusCode(y),y=void 0,d&&f.trigger(u?"ajaxSuccess":"ajaxError",[C,h,u?p:g]),b.fireWith(m,[C,w]),d&&(f.trigger("ajaxComplete",[C,h]),--_.active||_.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],(function(e,t){_[t]=function(e,n,a,i){return m(n)&&(i=i||a,a=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:i,data:n,success:a},_.isPlainObject(e)&&e))}})),_.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),_._evalUrl=function(e,t,n){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){_.globalEval(e,t,n)}})},_.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){_(this).wrapInner(e.call(this,t))})):this.each((function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(n){_(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){_(this).replaceWith(this.childNodes)})),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var qt={0:200,1223:204},Ut=_.ajaxSettings.xhr();h.cors=!!Ut&&"withCredentials"in Ut,h.ajax=Ut=!!Ut,_.ajaxTransport((function(t){var n,a;if(h.cors||Ut&&!t.crossDomain)return{send:function(i,r){var s,o=t.xhr();if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)o[s]=t.xhrFields[s];for(s in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)o.setRequestHeader(s,i[s]);n=function(e){return function(){n&&(n=a=o.onload=o.onerror=o.onabort=o.ontimeout=o.onreadystatechange=null,"abort"===e?o.abort():"error"===e?"number"!=typeof o.status?r(0,"error"):r(o.status,o.statusText):r(qt[o.status]||o.status,o.statusText,"text"!==(o.responseType||"text")||"string"!=typeof o.responseText?{binary:o.response}:{text:o.responseText},o.getAllResponseHeaders()))}},o.onload=n(),a=o.onerror=o.ontimeout=n("error"),void 0!==o.onabort?o.onabort=a:o.onreadystatechange=function(){4===o.readyState&&e.setTimeout((function(){n&&a()}))},n=n("abort");try{o.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}})),_.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),_.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(a,i){t=_(" diff --git a/src/components/TheMainSearch.vue b/src/components/TheMainSearch.vue index 558715a..bcfffb8 100644 --- a/src/components/TheMainSearch.vue +++ b/src/components/TheMainSearch.vue @@ -145,8 +145,8 @@ export default { } }, props: { - scrolledSearchType: { - type: String, + performScrolledSearch: { + type: Boolean, required: false } }, @@ -206,24 +206,22 @@ export default { numberWithDots, convertDuration, search(type) { - console.log('search') + console.log('search method called') + socket.emit('search', { term: this.results.query, - type: type, - start: this.results[type + 'Tab'].next, + type, + start: this.results[`${type}Tab`].next, nb: 30 }) }, - scrolledSearch(type) { - let currentTab = type + 'Tab' + scrolledSearch() { + if (this.currentTab.searchType === 'all') return + + let currentTab = `${this.currentTab.searchType}Tab` if (this.results[currentTab].next < this.results[currentTab].total) { - socket.emit('search', { - term: this.results.query, - type: type, - start: this.results[currentTab].next, - nb: 30 - }) + this.search(this.currentTab.searchType) } }, handleMainSearch(result) { @@ -269,10 +267,10 @@ export default { } }, watch: { - scrolledSearchType(newType) { - if (!newType) return + performScrolledSearch(needToSearch) { + if (!needToSearch) return - this.scrolledSearch(newType) + this.scrolledSearch(needToSearch) }, currentTab(newTab) { if (this.isTabLoaded(newTab)) return