text: !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=60)}([function(e,t,n){"use strict";n.r(t),n.d(t,"h",function(){return u}),n.d(t,"createElement",function(){return u}),n.d(t,"cloneElement",function(){return f}),n.d(t,"createRef",function(){return R}),n.d(t,"Component",function(){return B}),n.d(t,"render",function(){return D}),n.d(t,"rerender",function(){return _}),n.d(t,"options",function(){return r});var o=function(){},r={},i=[],a=[];function u(e,t){var n,u,s,l,c=a;for(l=arguments.length;l-- >2;)i.push(arguments[l]);for(t&&null!=t.children&&(i.length||i.push(t.children),delete t.children);i.length;)if((u=i.pop())&&void 0!==u.pop)for(l=u.length;l--;)i.push(u[l]);else"boolean"==typeof u&&(u=null),(s="function"!=typeof e)&&(null==u?u="":"number"==typeof u?u=String(u):"string"!=typeof u&&(s=!1)),s&&n?c[c.length-1]+=u:c===a?c=[u]:c.push(u),n=s;var f=new o;return f.nodeName=e,f.children=c,f.attributes=null==t?void 0:t,f.key=null==t?void 0:t.key,void 0!==r.vnode&&r.vnode(f),f}function s(e,t){for(var n in t)e[n]=t[n];return e}function l(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var c="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function f(e,t){return u(e.nodeName,s(s({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var d=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,p=[];function h(e){!e._dirty&&(e._dirty=!0)&&1==p.push(e)&&(r.debounceRendering||c)(_)}function _(){for(var e;e=p.pop();)e._dirty&&L(e)}function m(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&v(e,t.nodeName):n||e._componentConstructor===t.nodeName}function v(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function y(e){var t=s({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function b(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)l(n,null),l(o,e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(e.style[i]="");for(var i in o)e.style[i]="number"==typeof o[i]&&!1===d.test(i)?o[i]+"px":o[i]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,w,a):e.removeEventListener(t,w,a),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e){try{e[t]=null==o?"":o}catch(e){}null!=o&&!1!==o||"spellcheck"==t||e.removeAttribute(t)}else{var u=r&&t!==(t=t.replace(/^xlink:?/,""));null==o||!1===o?u?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(u?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function w(e){return this._listeners[e.type](r.event&&r.event(e)||e)}var A=[],x=0,S=!1,T=!1;function k(){for(var e;e=A.shift();)r.afterMount&&r.afterMount(e),e.componentDidMount&&e.componentDidMount()}function O(e,t,n,o,r,i){x++||(S=null!=r&&void 0!==r.ownerSVGElement,T=null!=e&&!("__preactattr_"in e));var a=function e(t,n,o,r,i){var a=t,u=S;if(null!=n&&"boolean"!=typeof n||(n=""),"string"==typeof n||"number"==typeof n)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||i)?t.nodeValue!=n&&(t.nodeValue=n):(a=document.createTextNode(n),t&&(t.parentNode&&t.parentNode.replaceChild(a,t),P(t,!0))),a.__preactattr_=!0,a;var s=n.nodeName;if("function"==typeof s)return function(e,t,n,o){for(var r=e&&e._component,i=r,a=e,u=r&&e._componentConstructor===t.nodeName,s=u,l=y(t);r&&!s&&(r=r._parentComponent);)s=r.constructor===t.nodeName;return r&&s&&(!o||r._component)?(E(r,l,3,n,o),e=r.base):(i&&!u&&(M(i),e=a=null),r=j(t.nodeName,l,n),e&&!r.nextBase&&(r.nextBase=e,a=null),E(r,l,1,n,o),e=r.base,a&&e!==a&&(a._component=null,P(a,!1))),e}(t,n,o,r);if(S="svg"===s||"foreignObject"!==s&&S,s=String(s),(!t||!v(t,s))&&(a=function(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}(s,S),t)){for(;t.firstChild;)a.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(a,t),P(t,!0)}var l=a.firstChild,c=a.__preactattr_,f=n.children;if(null==c){c=a.__preactattr_={};for(var d=a.attributes,p=d.length;p--;)c[d[p].name]=d[p].value}return!T&&f&&1===f.length&&"string"==typeof f[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=f[0]&&(l.nodeValue=f[0]):(f&&f.length||null!=l)&&function(t,n,o,r,i){var a,u,s,l,c,f=t.childNodes,d=[],p={},h=0,_=0,v=f.length,y=0,b=n?n.length:0;if(0!==v)for(var w=0;w<v;w++){var A=f[w],x=A.__preactattr_,S=b&&x?A._component?A._component.__key:x.key:null;null!=S?(h++,p[S]=A):(x||(void 0!==A.splitText?!i||A.nodeValue.trim():i))&&(d[y++]=A)}if(0!==b)for(var w=0;w<b;w++){l=n[w],c=null;var S=l.key;if(null!=S)h&&void 0!==p[S]&&(c=p[S],p[S]=void 0,h--);else if(_<y)for(a=_;a<y;a++)if(void 0!==d[a]&&m(u=d[a],l,i)){c=u,d[a]=void 0,a===y-1&&y--,a===_&&_++;break}c=e(c,l,o,r),s=f[w],c&&c!==t&&c!==s&&(null==s?t.appendChild(c):c===s.nextSibling?g(s):t.insertBefore(c,s))}if(h)for(var w in p)void 0!==p[w]&&P(p[w],!1);for(;_<=y;)void 0!==(c=d[y--])&&P(c,!1)}(a,f,o,r,T||null!=c.dangerouslySetInnerHTML),function(e,t,n){var o;for(o in n)t&&null!=t[o]||null==n[o]||b(e,o,n[o],n[o]=void 0,S);for(o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||b(e,o,n[o],n[o]=t[o],S)}(a,n.attributes,c),S=u,a}(e,t,n,o,i);return r&&a.parentNode!==r&&r.appendChild(a),--x||(T=!1,i||k()),a}function P(e,t){var n=e._component;n?M(n):(null!=e.__preactattr_&&l(e.__preactattr_.ref,null),!1!==t&&null!=e.__preactattr_||g(e),C(e))}function C(e){for(e=e.lastChild;e;){var t=e.previousSibling;P(e,!0),e=t}}var N=[];function j(e,t,n){var o,r=N.length;for(e.prototype&&e.prototype.render?(o=new e(t,n),B.call(o,t,n)):((o=new B(t,n)).constructor=e,o.render=I);r--;)if(N[r].constructor===e)return o.nextBase=N[r].nextBase,N.splice(r,1),o;return o}function I(e,t,n){return this.constructor(e,n)}function E(e,t,n,o,i){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,void 0===e.constructor.getDerivedStateFromProps&&(!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,o)),o&&o!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=o),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===r.syncComponentUpdates&&e.base?h(e):L(e,1,i)),l(e.__ref,e))}function L(e,t,n,o){if(!e._disable){var i,a,u,l=e.props,c=e.state,f=e.context,d=e.prevProps||l,p=e.prevState||c,h=e.prevContext||f,_=e.base,m=e.nextBase,v=_||m,g=e._component,b=!1,w=h;if(e.constructor.getDerivedStateFromProps&&(c=s(s({},c),e.constructor.getDerivedStateFromProps(l,c)),e.state=c),_&&(e.props=d,e.state=p,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(l,c,f)?b=!0:e.componentWillUpdate&&e.componentWillUpdate(l,c,f),e.props=l,e.state=c,e.context=f),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!b){i=e.render(l,c,f),e.getChildContext&&(f=s(s({},f),e.getChildContext())),_&&e.getSnapshotBeforeUpdate&&(w=e.getSnapshotBeforeUpdate(d,p));var S,T,C=i&&i.nodeName;if("function"==typeof C){var N=y(i);(a=g)&&a.constructor===C&&N.key==a.__key?E(a,N,1,f,!1):(S=a,e._component=a=j(C,N,f),a.nextBase=a.nextBase||m,a._parentComponent=e,E(a,N,0,f,!1),L(a,1,n,!0)),T=a.base}else u=v,(S=g)&&(u=e._component=null),(v||1===t)&&(u&&(u._component=null),T=O(u,i,f,n||!_,v&&v.parentNode,!0));if(v&&T!==v&&a!==g){var I=v.parentNode;I&&T!==I&&(I.replaceChild(T,v),S||(v._component=null,P(v,!1)))}if(S&&M(S),e.base=T,T&&!o){for(var B=e,D=e;D=D._parentComponent;)(B=D).base=T;T._component=B,T._componentConstructor=B.constructor}}for(!_||n?A.push(e):b||(e.componentDidUpdate&&e.componentDidUpdate(d,p,w),r.afterUpdate&&r.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);x||o||k()}}function M(e){r.beforeUnmount&&r.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?M(n):t&&(null!=t.__preactattr_&&l(t.__preactattr_.ref,null),e.nextBase=t,g(t),N.push(e),C(t)),l(e.__ref,null)}function B(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function D(e,t,n){return O(n,e,{},!1,t,!1)}function R(){return{}}s(B.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=s(s({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),h(this)},forceUpdate:function(e){e&&this._renderCallbacks.push(e),L(this,2)},render:function(){}});var F={h:u,createElement:u,cloneElement:f,createRef:R,Component:B,render:D,rerender:_,options:r};t.default=F},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.actions=t.store=void 0;var o=a(n(21)),r=(a(n(40)),n(6)),i=a(n(39));function a(e){return e&&e.__esModule?e:{default:e}}t.store=(0,i.default)({current_song:null,error:null,loading_count:0,now_playing:[],now_playing_removed:[],title:null,user:null}),t.actions=function(e){return{ajaxBegin:function(e){return{loading_count:e.loading_count+1}},ajaxEnd:function(e){return{loading_count:e.loading_count-1}},ajaxError:function(e,t){var n;return n=t.error.response.data&&t.error.response.data.non_field_errors?t.error.response.data.non_field_errors:t.error,alert(n),console.error("ERROR",n),{error:n,loading_count:e.loading_count-1}},append:function(e,t){return{now_playing:[].concat(e.now_playing,[t.song])}},appendAndPlay:function(e,t){var n=[].concat(e.now_playing,[t.song]);return{current_song:n.length-1,now_playing:n}},isLoading:function(e,t){return{loading_count:e.loading_count+(t.is_loading?1:-1)}},load:function(e,t){var n=t.data,i=void 0===n?null:n,a=t.headers,u=void 0===a?{}:a,s=t.method,l=t.onSuccess,c=void 0===l?null:l,f=t.scope,d={data:i,headers:u,method:s,url:t.url};f.ajaxBegin(),(0,o.default)(d).then(function(e){f.ajaxEnd(),c&&c({json:e.data})}).catch(function(e){401===e.response.status?(f.ajaxEnd(),f.viewLogin(),(0,r.route)("/auth/login")):f.ajaxError({error:e})})},loginSuccess:function(e,t){window.location.href="/"},next:function(e,t){for(var n=null,o=e.current_song+1;o<e.now_playing.length;o++)if(!e.now_playing_removed.includes(o)){n=o;break}return{current_song:n}},removeNowPlaying:function(e,t){return{now_playing_removed:[t.songIndex].concat(e.now_playing_removed)}},track:function(e,t){return{current_song:t.songIndex}},userLoadBegin:function(){return{user:null}},userLoadSuccess:function(e,t){return{user:t.json.results.user}},viewDashboard:function(){return{title:null}},viewLogin:function(){return{title:"Log In",user:null}}}}},function(e,t,n){var o=n(0);function r(e,t){for(var n in t)e[n]=t[n];return e}function i(e){this.getChildContext=function(){return{store:e.store}}}i.prototype.render=function(e){return e.children&&e.children[0]||e.children},t.connect=function(e,t){var n;return"function"!=typeof e&&("string"==typeof(n=e||{})&&(n=n.split(/\s*,\s*/)),e=function(e){for(var t={},o=0;o<n.length;o++)t[n[o]]=e[n[o]];return t}),function(n){function i(i,a){var u=this,s=a.store,l=e(s?s.getState():{},i),c=t?function(e,t){"function"==typeof e&&(e=e(t));var n={};for(var o in e)n[o]=t.action(e[o]);return n}(t,s):{store:s},f=function(){var t=e(s?s.getState():{},i);for(var n in t)if(t[n]!==l[n])return l=t,u.setState({});for(var o in l)if(!(o in t))return l=t,u.setState({})};this.componentWillReceiveProps=function(e){i=e,f()},this.componentDidMount=function(){s.subscribe(f)},this.componentWillUnmount=function(){s.unsubscribe(f)},this.render=function(e){return o.h(n,r(r(r({},c),e),l))}}return(i.prototype=new o.Component).constructor=i}},t.Provider=i},function(e,t,n){"use strict";var o=n(20),r=n(56),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function u(e){return null!==e&&"object"==typeof e}function s(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:r,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:s,isStream:function(e){return u(e)&&s(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function n(n,o){"object"==typeof t[o]&&"object"==typeof n?t[o]=e(t[o],n):t[o]=n}for(var o=0,r=arguments.length;o<r;o++)l(arguments[o],n);return t},deepMerge:function e(){var t={};function n(n,o){"object"==typeof t[o]&&"object"==typeof n?t[o]=e(t[o],n):t[o]="object"==typeof n?e({},n):n}for(var o=0,r=arguments.length;o<r;o++)l(arguments[o],n);return t},extend:function(e,t,n){return l(t,function(t,r){e[r]=n&&"function"==typeof t?o(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0);function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=o=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),o.onLogOut=function(e){e.preventDefault(),window.location.href="/auth/logout/"},i(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"render",value:function(e,t){return(0,r.h)("aside",{className:"Sidebar"},(0,r.h)("nav",{className:"Sidebar_nav"},(0,r.h)("a",{className:"Sidebar_nav-link "+("albums"===e.route?"-active":""),href:"/albums/",id:"SidbarNav_albums"},"Albums"),(0,r.h)("a",{className:"Sidebar_nav-link "+("artists"===e.route?"-active":""),href:"/artists/",id:"SidbarNav_artists"},"Artists"),(0,r.h)("a",{className:"Sidebar_nav-link "+("now-playing"===e.route?"-active":""),href:"/now-playing/",id:"SidbarNav_now-playing"},"Now Playing"),(0,r.h)("a",{className:"Sidebar_nav-link "+("songs"===e.route?"-active":""),href:"/",id:"SidbarNav_songs"},"Songs"),(0,r.h)("a",{className:"Sidebar_nav-link",href:"/auth/logout/",id:"SidbarNav_logout",onClick:this.onLogOut},"Logout")))}}]),t}();t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(e){return e&&e.__esModule?e:{default:e}}(n(21)),i=n(0),a=n(6),u=n(2),s=n(1);function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=o=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),o.state={data:null,is_loading:!1},l(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"componentDidMount",value:function(){this.fetch()}},{key:"componentDidUpdate",value:function(e){var t=this.props.url;t&&e.url!==t&&this.fetch()}},{key:"fetch",value:function(){var e=this,t={method:"GET",url:this.props.scope.url};this.setState({data:null,is_loading:!0}),(0,r.default)(t).then(function(t){t.data&&e.setState({data:t.data,is_loading:!1})}).catch(function(t){401===t.response.status?(e.props.scope.viewLogin(),(0,a.route)("/auth/login")):console.error(t)})}},{key:"render",value:function(e,t){var n=t.data,o=t.is_loading,r=e.scope,a={data:n,is_loading:o,url:r.url};return(0,i.h)("div",null,r.children.map(function(e){return(0,i.cloneElement)(e,a)}))}}]),t}(),f=(0,u.connect)([],s.actions)(function(e){return(0,i.h)(c,{scope:e})});t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"subscribers",function(){return d}),n.d(t,"getCurrentUrl",function(){return _}),n.d(t,"route",function(){return m}),n.d(t,"Router",function(){return x}),n.d(t,"Route",function(){return T}),n.d(t,"Link",function(){return S});var o=n(0),r={};function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return e.rank<t.rank?1:e.rank>t.rank?-1:e.index-t.index}function u(e,t){return e.index=t,e.rank=function(e){return e.attributes.default?0:function(e){return s(e).map(l).join("")}(e.attributes.path)}(e),e.attributes}function s(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function l(e){return":"==e.charAt(0)?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}var c=null,f=[],d=[],p={};function h(e){return null!=e.__preactattr_||"undefined"!=typeof Symbol&&null!=e[Symbol.for("preactattr")]}function _(){var e;return""+((e=c&&c.location?c.location:c&&c.getCurrentLocation?c.getCurrentLocation():"undefined"!=typeof location?location:p).pathname||"")+(e.search||"")}function m(e,t){return void 0===t&&(t=!1),"string"!=typeof e&&e.url&&(t=e.replace,e=e.url),function(e){for(var t=f.length;t--;)if(f[t].canRoute(e))return!0;return!1}(e)&&function(e,t){void 0===t&&(t="push"),c&&c[t]?c[t](e):"undefined"!=typeof history&&history[t+"State"]&&history[t+"State"](null,null,e)}(e,t?"replace":"push"),v(e)}function v(e){for(var t=!1,n=0;n<f.length;n++)!0===f[n].routeTo(e)&&(t=!0);for(var o=d.length;o--;)d[o](e);return t}function y(e){if(e&&e.getAttribute){var t=e.getAttribute("href"),n=e.getAttribute("target");if(t&&t.match(/^\//g)&&(!n||n.match(/^_?self$/i)))return m(t)}}function g(e){if(0==e.button)return y(e.currentTarget||e.target||this),b(e)}function b(e){return e&&(e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.stopPropagation&&e.stopPropagation(),e.preventDefault()),!1}function w(e){if(!(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||0!==e.button)){var t=e.target;do{if("A"===String(t.nodeName).toUpperCase()&&t.getAttribute("href")&&h(t)){if(t.hasAttribute("native"))return;if(y(t))return b(e)}}while(t=t.parentNode)}}var A=!1,x=function(e){function t(t){e.call(this,t),t.history&&(c=t.history),this.state={url:t.url||_()},A||("function"==typeof addEventListener&&(c||addEventListener("popstate",function(){v(_())}),addEventListener("click",w)),A=!0)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(e){return!0!==e.static||e.url!==this.props.url||e.onChange!==this.props.onChange},t.prototype.canRoute=function(e){return this.getMatchingChildren(this.props.children,e,!1).length>0},t.prototype.routeTo=function(e){return this._didRoute=!1,this.setState({url:e}),this.updating?this.canRoute(e):(this.forceUpdate(),this._didRoute)},t.prototype.componentWillMount=function(){f.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var e=this;c&&(this.unlisten=c.listen(function(t){e.routeTo(""+(t.pathname||"")+(t.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),f.splice(f.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(e,t,n){return e.filter(u).sort(a).map(function(e){var a=function(e,t,n){var o,i=/(?:\?([^#]*))?(#.*)?$/,a=e.match(i),u={};if(a&&a[1])for(var l=a[1].split("&"),c=0;c<l.length;c++){var f=l[c].split("=");u[decodeURIComponent(f[0])]=decodeURIComponent(f.slice(1).join("="))}e=s(e.replace(i,"")),t=s(t||"");for(var d=Math.max(e.length,t.length),p=0;p<d;p++)if(t[p]&&":"===t[p].charAt(0)){var h=t[p].replace(/(^\:|[+*?]+$)/g,""),_=(t[p].match(/[+*?]+$/)||r)[0]||"",m=~_.indexOf("+"),v=~_.indexOf("*"),y=e[p]||"";if(!y&&!v&&(_.indexOf("?")<0||m)){o=!1;break}if(u[h]=decodeURIComponent(y),m||v){u[h]=e.slice(p).map(decodeURIComponent).join("/");break}}else if(t[p]!==e[p]){o=!1;break}return(!0===n.default||!1!==o)&&u}(t,e.attributes.path,e.attributes);if(a){if(!1!==n){var u={url:t,matches:a};return i(u,a),delete u.ref,delete u.key,Object(o.cloneElement)(e,u)}return e}}).filter(Boolean)},t.prototype.render=function(e,t){var n=e.children,o=e.onChange,r=t.url,i=this.getMatchingChildren(n,r,!0),a=i[0]||null;this._didRoute=!!a;var u=this.previousUrl;return r!==u&&(this.previousUrl=r,"function"==typeof o&&o({router:this,url:r,previous:u,active:i,current:a})),a},t}(o.Component),S=function(e){return Object(o.h)("a",i({onClick:g},e))},T=function(e){return Object(o.h)(e.component,e)};x.subscribers=d,x.getCurrentUrl=_,x.route=m,x.Router=x,x.Route=T,x.Link=S,t.default=x},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=n(1),u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.scope;return 0!==n.loading_count||n.user||(n.userLoadBegin(),n.load({method:"get",onSuccess:n.userLoadSuccess,scope:n,url:"/api/auth/user/"})),t}}]),t}(),s=(0,i.connect)(["loading_count","user"],a.actions)(function(e){return(0,r.h)(u,{scope:e})});t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.default=function(e){return(0,o.h)("svg",{className:e.classes,width:"12px",height:"14px",viewBox:"0 0 12 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},(0,o.h)("g",{transform:"translate(-340.000000, -306.000000)",fill:"inherit"},(0,o.h)("g",{transform:"translate(317.000000, 18.000000)"},(0,o.h)("g",{transform:"translate(0.000000, 264.000000)"},(0,o.h)("g",{transform:"translate(23.000000, 24.000000)"},(0,o.h)("polygon",{transform:"translate(5.843750, 6.562500) scale(-1, 1) rotate(-90.000000) translate(-5.843750, -6.562500) ",points:"5.84375 1.09375 12.40625 12.03125 -0.71875 12.03125"})))))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=a(n(10)),i=a(n(8));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.isActive||!1,n=e.isPlaying||!1;return(0,o.h)("div",{className:"Song "+(n?"-playing":"")},!n&&(0,o.h)("a",{className:"Song_play",onClick:e.onPlay},(0,o.h)(i.default,null)),(0,o.h)("a",{className:"Song_add "+(t||n?"-active":""),onClick:e.onAdd},(0,o.h)(r.default,null)),(0,o.h)("div",{className:"Song_title"},e.name))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.default=function(e){return(0,o.h)("svg",{className:e.classes,width:"13px",height:"13px",viewBox:"0 0 13 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},(0,o.h)("g",{transform:"translate(-377.000000, -306.000000)",fill:"inherit"},(0,o.h)("g",{transform:"translate(317.000000, 18.000000)"},(0,o.h)("g",{transform:"translate(0.000000, 264.000000)"},(0,o.h)("g",{transform:"translate(51.000000, 15.000000)"},(0,o.h)("path",{d:"M17,17 L17,22 L14,22 L14,17 L9,17 L9,14 L14,14 L14,9 L17,9 L17,14 L22,14 L22,17 L17,17 Z"})))))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.artistsFromSongList=function(e){for(var t=[],n=0;n<e.length;n++)for(var o=0;o<e[n].artists.length;o++){var r=e[n].artists[o].name;t.includes(r)||(t[t.length]=r)}return t},t.currentSongFromIndex=function(e,t){return null!==e?t.find(function(t,n){return e===n}):null},t.nextSongFromIndex=function(e,t,n){for(var o=e+1;o<t.length;o++)if(!n.includes(o))return{index:o,song:t[o]};return null},t.previousSongFromIndex=function(e,t,n){for(var o=e-1;o>=0&&o<t.length;o--)if(!n.includes(o))return{index:o,song:t[o]};return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlbumListConnection=t.AlbumList=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=f(n(8)),u=f(n(5)),s=f(n(4)),l=f(n(7)),c=n(1);function f(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"onPlay",value:function(e,t){var n=this;e.preventDefault(),e.stopPropagation(),t.songs.map(function(e,o){e.album=t,0===o?n.props.scope.appendAndPlay({song:e}):n.props.scope.append({song:e})})}},{key:"render",value:function(e,t){var n=this;return(0,r.h)("div",{id:"albums"},e.data.results.albums.map(function(e){return(0,r.h)("a",{className:"Album",href:"/albums/"+e.id+"/",key:"album-list_"+e.id},(0,r.h)("div",{className:"Album_cover",style:{backgroundImage:"url("+e.cover+")"}}),(0,r.h)("div",{className:"Album_main"},(0,r.h)("div",{className:"Album_title"},e.name)),(0,r.h)("a",{className:"Album_play",onClick:function(t){return n.onPlay(t,e)}},(0,r.h)(a.default,null),(0,r.h)("span",null,"Play")))}))}}]),t}(),p=function(e){var t=e.data,n=e.is_loading,o=e.scope;return null===t||n?null:(0,r.h)("div",null,(0,r.h)("div",{className:"ButtonBar -top-bar"},(0,r.h)("a",{className:"Button -right",href:"/create/album/"},"Create")),(0,r.h)(d,{data:t,scope:o}))},h=(0,i.connect)(["loading_count","user"],c.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(s.default,{route:"albums"}),(0,r.h)(l.default,null),(0,r.h)("div",{className:"Container_main"},(0,r.h)(u.default,{url:"/api/albums/"},(0,r.h)(p,{scope:e}))))});t.AlbumList=d,t.AlbumListConnection=h},function(e,t,n){"use strict";function o(e){this.message=e}o.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},o.prototype.__CANCEL__=!0,e.exports=o},function(e,t,n){"use strict";var o=n(3);e.exports=function(e,t){t=t||{};var n={};return o.forEach(["url","method","params","data"],function(e){void 0!==t[e]&&(n[e]=t[e])}),o.forEach(["headers","auth","proxy"],function(r){o.isObject(t[r])?n[r]=o.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:o.isObject(e[r])?n[r]=o.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])}),o.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(o){void 0!==t[o]?n[o]=t[o]:void 0!==e[o]&&(n[o]=e[o])}),n}},function(e,t,n){"use strict";var o=n(48);e.exports=function(e,t,n,r,i){var a=new Error(e);return o(a,t,n,r,i)}},function(e,t,n){"use strict";var o=n(3),r=n(49),i=n(19),a=n(47),u=n(46),s=n(15);e.exports=function(e){return new Promise(function(t,l){var c=e.data,f=e.headers;o.isFormData(c)&&delete f["Content-Type"];var d=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",h=e.auth.password||"";f.Authorization="Basic "+btoa(p+":"+h)}if(d.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,o={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:n,config:e,request:d};r(t,l,o),d=null}},d.onabort=function(){d&&(l(s("Request aborted",e,"ECONNABORTED",d)),d=null)},d.onerror=function(){l(s("Network Error",e,null,d)),d=null},d.ontimeout=function(){l(s("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},o.isStandardBrowserEnv()){var _=n(45),m=(e.withCredentials||u(e.url))&&e.xsrfCookieName?_.read(e.xsrfCookieName):void 0;m&&(f[e.xsrfHeaderName]=m)}if("setRequestHeader"in d&&o.forEach(f,function(e,t){void 0===c&&"content-type"===t.toLowerCase()?delete f[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),l(e),d=null)}),void 0===c&&(c=null),d.send(c)})}},function(e,t,n){"use strict";(function(t){var o=n(3),r=n(50),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={adapter:function(){var e;return void 0!==t&&"[object process]"===Object.prototype.toString.call(t)?e=n(16):"undefined"!=typeof XMLHttpRequest&&(e=n(16)),e}(),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],function(e){u.headers[e]={}}),o.forEach(["post","put","patch"],function(e){u.headers[e]=o.merge(i)}),e.exports=u}).call(this,n(51))},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var o=n(3);function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var a=[];o.forEach(t,function(e,t){null!==e&&void 0!==e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),i=a.join("&")}if(i){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];return e.apply(t,n)}}},function(e,t,n){e.exports=n(57)},,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=d(n(5)),u=d(n(4)),s=d(n(9)),l=d(n(7)),c=n(1),f=n(11);function d(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"onAddNowPlaying",value:function(e,t){e.preventDefault(),this.props.scope.append({song:t})}},{key:"onPlay",value:function(e,t){e.preventDefault(),this.props.scope.appendAndPlay({song:t})}},{key:"onRemoveCurrentSong",value:function(e){e.preventDefault(),this.props.scope.removeNowPlaying({songIndex:this.props.scope.current_song}),this.props.scope.next()}},{key:"render",value:function(e,t){var n=this,o=e.data,i=e.is_loading,a=e.scope;if(null===o||i)return null;var u=(0,f.currentSongFromIndex)(a.current_song,a.now_playing);return(0,r.h)("div",{id:"songs"},o.results.songs.map(function(e,t){var o=!!u&&u.id===e.id,i=o?function(e){return n.onRemoveCurrentSong(e)}:function(t){return n.onAddNowPlaying(t,e)};return(0,r.h)(s.default,{isPlaying:o,key:"songs."+t,name:e.name,onAdd:i,onPlay:function(t){return n.onPlay(t,e)}})}))}}]),t}(),h=(0,i.connect)(["current_song","now_playing","user"],c.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(u.default,{route:"songs"}),(0,r.h)(l.default,null),(0,r.h)("div",{className:"Container_main"},(0,r.h)(a.default,{url:"/api/songs/"},(0,r.h)(p,{scope:e}))))});t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=c(n(4)),u=c(n(9)),s=c(n(7)),l=n(1);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"onRemoveNowPlaying",value:function(e,t){e.preventDefault(),this.props.scope.removeNowPlaying({songIndex:t}),this.props.scope.current_song===t&&this.props.scope.next()}},{key:"onTrack",value:function(e,t){e.preventDefault(),this.props.scope.track({songIndex:t})}},{key:"render",value:function(e,t){var n=this,o=e.scope;return(0,r.h)("div",{id:"now-playing"},o.now_playing.map(function(e,t){return o.now_playing_removed.includes(t)?null:(0,r.h)(u.default,{isActive:!0,isPlaying:o.current_song===t,key:"now-playing."+t,name:e.name,onAdd:function(e){return n.onRemoveNowPlaying(e,t)},onPlay:function(e){return n.onTrack(e,t)}})}))}}]),t}(),d=(0,i.connect)(["current_song","now_playing","now_playing_removed","user"],l.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(a.default,{route:"now-playing"}),(0,r.h)(s.default,null),(0,r.h)("div",{className:"Container_main"},(0,r.h)(f,{scope:e})))});t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=c(n(5)),u=c(n(4)),s=c(n(7)),l=n(1);function c(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"render",value:function(e,t){var n=e.data,o=e.is_loading;return e.scope,null===n||o?null:(0,r.h)("div",{id:"artists"},(0,r.h)("div",{className:"ButtonBar -top-bar"},(0,r.h)("a",{className:"Button -right",href:"/create/artist/"},"Create")),(0,r.h)("div",null,n.results.artists.map(function(e){return(0,r.h)("a",{className:"Album",href:"/artists/"+e.id+"/",key:"artist-list_"+e.id},(0,r.h)("div",{className:"Album_main"},(0,r.h)("div",{className:"Album_title"},e.name)))})))}}]),t}(),d=(0,i.connect)(["loading_count","user"],l.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(u.default,{route:"artists"}),(0,r.h)(s.default,null),(0,r.h)("div",{className:"Container_main"},(0,r.h)(a.default,{url:"/api/artists/"},(0,r.h)(f,{scope:e}))))});t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=n(12),u=f(n(5)),s=f(n(4)),l=f(n(7)),c=n(1);function f(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"render",value:function(e,t){var n=e.data,o=e.is_loading,i=e.scope;if(null===n||o)return null;var u=n.results.artist,s={results:{albums:u.albums}};return(0,r.h)("div",{id:"artists-detail"},(0,r.h)("div",{className:"Album"},(0,r.h)("div",{className:"Album_main"},(0,r.h)("div",{className:"Album_title"},u.name))),(0,r.h)(a.AlbumList,{data:s,is_loading:!1,scope:i}))}}]),t}(),p=(0,i.connect)(["loading_count","user"],c.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(s.default,{route:"artists"}),(0,r.h)(l.default,null),(0,r.h)("div",{className:"Container_main"},(0,r.h)(u.default,{url:"/api/artists/"+e.artistId+"/"},(0,r.h)(d,{scope:e}))))});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),a=n(2),u=function(e){return e&&e.__esModule?e:{default:e}}(n(4)),s=n(1);function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=o=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),o.state={errors:{name:!1},name:""},o.onSubmit=function(e){e.preventDefault();var t=o.props.scope,n=o.state.name;if(o.setState({errors:{name:!n}}),n){var r=new FormData;r.append("name",n),t.load({data:r,method:"post",onSuccess:function(e){var t=e.json.results.artist.id;(0,i.route)("/artists/"+t+"/")},scope:t,url:"/api/artists/create/"})}},l(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"componentDidMount",value:function(){this.setState({name:""})}},{key:"mutate",value:function(e,t){var n={};n[t]=e.target.value,this.setState(n)}},{key:"render",value:function(e,t){var n=this.state.errors,o=this.mutate.bind(this);return(0,r.h)("form",{className:"Form",onSubmit:this.onLogin},(0,r.h)("label",{class:"Input "+(n.name?"-error":"")},(0,r.h)("div",{class:"Input_label"},"Name"),(0,r.h)("input",{className:"Input_field",name:"name",onChange:function(e){return o(e,"name")},placeholder:"…",value:t.name})),(0,r.h)("button",{className:"Button -primary",disabled:!1,onClick:this.onSubmit},"Create"))}}]),t}(),f=(0,a.connect)([],s.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(u.default,{route:"create.artists"}),(0,r.h)("div",{className:"Container_main"},(0,r.h)(c,{scope:e})))});t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(2),a=p(n(8)),u=p(n(5)),s=p(n(4)),l=p(n(9)),c=p(n(7)),f=n(1),d=n(11);function p(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"onPlay",value:function(e,t){var n=this;e.preventDefault(),e.stopPropagation(),t.songs.map(function(e,o){e.album=t,0===o?n.props.scope.appendAndPlay({song:e}):n.props.scope.append({song:e})})}},{key:"onRemoveCurrentSong",value:function(e){e.preventDefault(),this.props.scope.removeNowPlaying({songIndex:this.props.scope.current_song}),this.props.scope.next()}},{key:"onSongAddNowPlaying",value:function(e,t){e.preventDefault(),t.album=this.props.data.results.album,this.props.scope.append({song:t})}},{key:"onSongPlay",value:function(e,t){e.preventDefault(),t.album=this.props.data.results.album,this.props.scope.appendAndPlay({song:t})}},{key:"render",value:function(e,t){var n=this,o=e.data,i=e.is_loading,u=e.scope;if(null===o||i)return null;var s=o.results.album,c=(0,d.artistsFromSongList)(s.songs),f=(0,d.currentSongFromIndex)(u.current_song,u.now_playing);return(0,r.h)("div",{id:"albums-detail"},(0,r.h)("div",{className:"Album -detail"},(0,r.h)("div",{className:"Album_cover",style:{backgroundImage:"url("+s.cover+")"}}),(0,r.h)("div",{className:"Album_main"},(0,r.h)("div",{className:"Album_title"},s.name),c.length>0&&(0,r.h)("div",{className:"Album_meta -artists"},c.join(", "))),(0,r.h)("a",{className:"Album_play",onClick:function(e){return n.onPlay(e,s)}},(0,r.h)(a.default,null),(0,r.h)("span",null,"Play")),(0,r.h)("a",{className:"Album_add Button",href:"/albums/"+s.id+"/add-songs/"},"Add Songs"),(0,r.h)("a",{className:"Album_delete Button",href:"/albums/"+s.id+"/delete/"},"Delete")),s.songs.map(function(e,t){var o=!!f&&f.id===e.id,i=o?function(e){return n.onRemoveCurrentSong(e)}:function(t){return n.onSongAddNowPlaying(t,e)};return(0,r.h)(l.default,{isPlaying:o,key:"songs."+t,name:e.name,onAdd:i,onPlay:function(t){return n.onSongPlay(t,e)}})}))}}]),t}(),_=(0,i.connect)(["current_song","now_playing","user"],f.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(s.default,{route:"albums.detail"}),(0,r.h)(c.default,null),(0,r.h)("div",{className:"Container_main"},(0,r.h)(u.default,{url:"/api/albums/"+e.albumId+"/"},(0,r.h)(h,{scope:e}))))});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),a=n(2),u=c(n(5)),s=c(n(4)),l=n(1);function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=o=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),o.onConfirm=function(e){e.preventDefault();var t=o.props.scope;t.load({method:"post",onSuccess:function(){(0,i.route)("/albums/")},scope:t,url:"/api/albums/"+t.albumId+"/delete/"})},f(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"render",value:function(e,t){var n=e.data,o=e.is_loading,i=e.scope;return null===n||o?null:(0,r.h)("form",{className:"Form",onSubmit:this.onLogin},(0,r.h)("p",{className:"Form_paragraph"},"Are you sure you want to delete ",n.results.album.name,"?"),(0,r.h)("div",{className:"ButtonBar"},(0,r.h)("a",{className:"Button",href:"/albums/"+i.albumId+"/"},"No, Do Not Delete"),(0,r.h)("button",{className:"Button -danger -right",disabled:!1,onClick:this.onConfirm},"Yes, Delete")))}}]),t}(),p=(0,a.connect)([],l.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(s.default,{route:"upload"}),(0,r.h)("div",{className:"Container_main"},(0,r.h)(u.default,{url:"/api/albums/"+e.albumId+"/"},(0,r.h)(d,{scope:e}))))});t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),a=n(2),u=d(n(10)),s=d(n(8)),l=d(n(5)),c=d(n(4)),f=n(1);function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=o=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),o.state={artist:null,errors:{artist:!1,cover:!1,name:!1},cover:null,name:""},o.onSubmit=function(e){e.preventDefault();var t=o.props.scope,n=o.state,r=n.artist,a=n.cover,u=n.name;if(o.setState({errors:{artist:!r,name:!u}}),r&&u){var s=new FormData;s.append("artist",r),s.append("name",u),a&&s.append("cover",a),t.load({data:s,headers:{"Content-Type":"multipart/form-data"},method:"post",onSuccess:function(e){var t=e.json.results.album.id;(0,i.route)("/albums/"+t+"/")},scope:t,url:"/api/albums/create/"})}},p(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"componentDidMount",value:function(){this.setState({artist:null,cover:null,name:""})}},{key:"mutate",value:function(e,t){var n={};n[t]="file"===e.target.getAttribute("type")?e.target.files.length>0?e.target.files[0]:null:e.target.value,this.setState(n)}},{key:"mutateNull",value:function(e,t){e.preventDefault();var n={};n[t]=null,this.setState(n)}},{key:"render",value:function(e,t){var n=e.data,o=e.is_loading;if(null===n||o)return null;var i=this.state.errors,a=this.mutate.bind(this),l=this.mutateNull.bind(this);return(0,r.h)("form",{className:"Form",onSubmit:this.onLogin},(0,r.h)("label",{class:"Input "+(i.name?"-error":"")},(0,r.h)("div",{class:"Input_label"},"Name"),(0,r.h)("input",{className:"Input_field",name:"name",onChange:function(e){return a(e,"name")},placeholder:"…",value:t.name})),(0,r.h)("label",{class:"Input "+(i.artist?"-error":"")},(0,r.h)("div",{class:"Input_label"},"Artist"),(0,r.h)("div",{class:"Input_select-container"},(0,r.h)("select",{className:"Input_field",name:"artist",onChange:function(e){return a(e,"artist")},placeholder:"…"},(0,r.h)("option",{value:""},"Select..."),n.results.artists.map(function(e){return(0,r.h)("option",{value:e.id,selected:t.artist==e.id},e.name)})),(0,r.h)(s.default,{classes:"Input_drop-arrow"}))),(0,r.h)("label",{class:"Input "+(i.cover?"-error":"")},(0,r.h)("div",{class:"Input_label"},"Cover Image"),(0,r.h)("div",{class:"Input_file"},t.cover&&(0,r.h)("div",null,(0,r.h)("span",null,t.cover.name),(0,r.h)("a",{href:"#",onClick:function(e){return l(e,"cover")}},(0,r.h)(u.default,null))),!t.cover&&(0,r.h)("div",null,"Select a file..."),(0,r.h)("input",{name:"cover",onChange:function(e){return a(e,"cover")},type:"file"}))),(0,r.h)("button",{className:"Button -primary",disabled:!1,onClick:this.onSubmit},"Create"))}}]),t}(),_=(0,a.connect)([],f.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(c.default,{route:"create.albums"}),(0,r.h)("div",{className:"Container_main"},(0,r.h)(l.default,{url:"/api/artists/"},(0,r.h)(h,{scope:e}))))});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),a=n(2),u=f(n(10)),s=(f(n(8)),f(n(5))),l=f(n(4)),c=n(1);function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,a=Array(r),u=0;u<r;u++)a[u]=arguments[u];return n=o=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),o.state={errors:{songs:!1},songs:[null]},o.onSubmit=function(e){e.preventDefault();for(var t=o.props.scope,n=o.state.songs,r=new FormData,a=0;a<n.length;a++)null!==n[a]&&r.append("songs",n[a]);t.load({data:r,headers:{"Content-Type":"multipart/form-data"},method:"post",onSuccess:function(){(0,i.route)("/albums/"+t.albumId+"/")},scope:t,url:"/api/albums/"+t.albumId+"/add-songs/"})},d(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"componentDidMount",value:function(){this.setState({songs:[null]})}},{key:"mutateSong",value:function(e,t){var n={songs:[].concat(this.state.songs)};n.songs[t]=e.target.files.length>0?e.target.files[0]:null,null!==n.songs[n.songs.length-1]&&(n.songs[n.songs.length]=null),this.setState(n)}},{key:"removeSong",value:function(e,t){e.preventDefault();var n={songs:[].concat(this.state.songs)};n.songs[t]=null,this.setState(n)}},{key:"render",value:function(e,t){var n=e.data,o=e.is_loading;if(null===n||o)return null;var i=this.state.errors,a=this.mutateSong.bind(this),s=this.removeSong.bind(this);return(0,r.h)("form",{className:"Form",onSubmit:this.onSubmit},t.songs.map(function(e,t){return(0,r.h)("label",{class:"Input "+(i.songs?"-error":""),key:"add-song_"+t},0===t&&(0,r.h)("div",{class:"Input_label"},"MP3"),(0,r.h)("div",{class:"Input_file"},e&&(0,r.h)("div",null,(0,r.h)("span",null,e.name),(0,r.h)("a",{href:"#",onClick:function(e){return s(e,t)}},(0,r.h)(u.default,null))),!e&&(0,r.h)("div",null,"Select a file..."),(0,r.h)("input",{name:"song",onChange:function(e){return a(e,t)},type:"file"})))}),(0,r.h)("button",{className:"Button -primary",onClick:this.onSubmit},"Upload"))}}]),t}(),h=(0,a.connect)([],c.actions)(function(e){return(0,r.h)("div",{className:"Container"},(0,r.h)(l.default,{route:"albums.detail"}),(0,r.h)("div",{className:"Container_main"},(0,r.h)(s.default,{url:"/api/albums/"+e.albumId+"/"},(0,r.h)(p,{scope:e}))))});t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.default=function(e){return(0,o.h)("svg",{className:e.classes,width:"14px",height:"13px",viewBox:"0 0 14 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},(0,o.h)("g",{transform:"translate(-260.000000, -861.000000)",fill:"inherit",id:"play-bar"},(0,o.h)("g",{transform:"translate(7.000000, 839.000000)"},(0,o.h)("g",{transform:"translate(245.000000, 13.000000)"},(0,o.h)("g",{transform:"translate(8.000000, 9.000000)"},(0,o.h)("rect",{x:"0",y:"0",width:"5",height:"13"}),(0,o.h)("rect",{x:"9",y:"0",width:"5",height:"13"})))))))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0);t.default=function(e){return(0,o.h)("svg",{className:e.classes,width:"25px",height:"14px",viewBox:"0 0 25 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("g",{stroke:"none","stroke-width":"1","fill-rule":"evenodd"},(0,o.h)("g",{transform:"translate(-1159.000000, -858.000000)",fill:"inherit"},(0,o.h)("g",{transform:"translate(7.000000, 839.000000)"},(0,o.h)("g",{transform:"translate(1169.000000, 26.000000) scale(-1, 1) translate(-1169.000000, -26.000000) translate(1152.000000, 6.000000)"},(0,o.h)("g",{transform:"translate(21.250000, 20.000000) scale(1, -1) translate(-21.250000, -20.000000) translate(9.000000, 13.000000)"},(0,o.h)("polygon",{transform:"translate(5.687500, 7.000000) rotate(-90.000000) translate(-5.687500, -7.000000) ",points:"5.6875 1.75 12.25 12.25 -0.875 12.25"}),(0,o.h)("polygon",{transform:"translate(18.812500, 7.000000) rotate(-90.000000) translate(-18.812500, -7.000000) ",points:"18.8125 1.75 25.375 12.25 12.25 12.25"})))))))}},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(n){var o;
  /*!
   *  howler.js v2.1.2
   *  howlerjs.com
   *
   *  (c) 2013-2019, James Simpson of GoldFire Studios
   *  goldfirestudios.com
   *
   *  MIT License
   */
  /*!
   *  howler.js v2.1.2
   *  howlerjs.com
   *
   *  (c) 2013-2019, James Simpson of GoldFire Studios
   *  goldfirestudios.com
   *
   *  MIT License
   */!function(){"use strict";var r=function(){this.init()};r.prototype={init:function(){var e=this||i;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||i;if(e=parseFloat(e),t.ctx||p(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,i.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),r=0;r<o.length;r++){var a=t._howls[n]._soundById(o[r]);a&&a._node&&(a._node.volume=a._volume*e)}return t}return t._volume},mute:function(e){var t=this||i;t.ctx||p(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,i.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),r=0;r<o.length;r++){var a=t._howls[n]._soundById(o[r]);a&&a._node&&(a._node.muted=!!e||a._muted)}return t},unload:function(){for(var e=this||i,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,p()),e},codecs:function(e){return(this||i)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||i;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{void 0===(new Audio).oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{(new Audio).muted&&(e.noAudio=!0)}catch(e){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||i,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(t){return e}if(!t||"function"!=typeof t.canPlayType)return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator&&e._navigator.userAgent.match(/OPR\/([0-6].)/g),r=o&&parseInt(o[0].split("/")[1],10)<33;return e._codecs={mp3:!(r||!n&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||i;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(var o=0;o<e.html5PoolSize;o++)try{var r=new Audio;r._unlocked=!0,e._releaseHtml5Audio(r)}catch(n){e.noAudio=!0}for(o=0;o<e._howls.length;o++)if(!e._howls[o]._webAudio)for(var i=e._howls[o]._getSoundIds(),a=0;a<i.length;a++){var u=e._howls[o]._soundById(i[a]);u&&u._node&&!u._node._unlocked&&(u._node._unlocked=!0,u._node.load())}e._autoResume();var s=e.ctx.createBufferSource();s.buffer=e._scratchBuffer,s.connect(e.ctx.destination),void 0===s.start?s.noteOn(0):s.start(0),"function"==typeof e.ctx.resume&&e.ctx.resume(),s.onended=function(){s.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",t,!0),document.removeEventListener("touchend",t,!0),document.removeEventListener("click",t,!0);for(var n=0;n<e._howls.length;n++)e._howls[n]._emit("unlock")}};return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),e}},_obtainHtml5Audio:function(){var e=this||i;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=(new Audio).play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(e){var t=this||i;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(e.autoSuspend&&e.ctx&&void 0!==e.ctx.suspend&&i.usingWebAudio){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio)for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e;return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){e.autoSuspend&&(e._suspendTimer=null,e.state="suspending",e.ctx.suspend().then(function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume())}))},3e4),e}},_autoResume:function(){var e=this;if(e.ctx&&void 0!==e.ctx.resume&&i.usingWebAudio)return"running"===e.state&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):"suspended"===e.state?(e.ctx.resume().then(function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume")}),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):"suspending"===e.state&&(e._resumeAfterSuspend=!0),e}};var i=new r,a=function(e){e.src&&0!==e.src.length?this.init(e):console.error("An array of source files must be passed with any new Howl.")};a.prototype={init:function(e){var t=this;return i.ctx||p(),t._autoplay=e.autoplay||!1,t._format="string"!=typeof e.format?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload="boolean"!=typeof e.preload||e.preload,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src="string"!=typeof e.src?e.src:[e.src],t._volume=void 0!==e.volume?e.volume:1,t._xhrWithCredentials=e.xhrWithCredentials||!1,t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=i.usingWebAudio&&!t._html5,void 0!==i.ctx&&i.ctx&&i.autoUnlock&&i._unlockAudio(),i._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&t.load(),t},load:function(){var e=null;if(i.noAudio)this._emit("loaderror",null,"No audio support.");else{"string"==typeof this._src&&(this._src=[this._src]);for(var t=0;t<this._src.length;t++){var n,o;if(this._format&&this._format[t])n=this._format[t];else{if("string"!=typeof(o=this._src[t])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(n=/^data:audio\/([^;,]+);/i.exec(o))||(n=/\.([^.]+)$/.exec(o.split("?",1)[0])),n&&(n=n[1].toLowerCase())}if(n||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),n&&i.codecs(n)){e=this._src[t];break}}if(e)return this._src=e,this._state="loading","https:"===window.location.protocol&&"http:"===e.slice(0,5)&&(this._html5=!0,this._webAudio=!1),new u(this),this._webAudio&&l(this),this;this._emit("loaderror",null,"No codec support for selected audio sources.")}},play:function(e,t){var n=this,o=null;if("number"==typeof e)o=e,e=null;else{if("string"==typeof e&&"loaded"===n._state&&!n._sprite[e])return null;if(void 0===e&&(e="__default",!n._playLock)){for(var r=0,a=0;a<n._sounds.length;a++)n._sounds[a]._paused&&!n._sounds[a]._ended&&(r++,o=n._sounds[a]._id);1===r?e=null:o=null}}var u=o?n._soundById(o):n._inactiveSound();if(!u)return null;if(o&&!e&&(e=u._sprite||"__default"),"loaded"!==n._state){u._sprite=e,u._ended=!1;var s=u._id;return n._queue.push({event:"play",action:function(){n.play(s)}}),s}if(o&&!u._paused)return t||n._loadQueue("play"),u._id;n._webAudio&&i._autoResume();var l=Math.max(0,u._seek>0?u._seek:n._sprite[e][0]/1e3),c=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-l),f=1e3*c/Math.abs(u._rate),d=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3,h=!(!u._loop&&!n._sprite[e][2]);u._sprite=e,u._ended=!1;var _=function(){u._paused=!1,u._seek=l,u._start=d,u._stop=p,u._loop=h};if(!(l>=p)){var m=u._node;if(n._webAudio){var v=function(){n._playLock=!1,_(),n._refreshBuffer(u);var e=u._muted||n._muted?0:u._volume;m.gain.setValueAtTime(e,i.ctx.currentTime),u._playStart=i.ctx.currentTime,void 0===m.bufferSource.start?u._loop?m.bufferSource.noteGrainOn(0,l,86400):m.bufferSource.noteGrainOn(0,l,c):u._loop?m.bufferSource.start(0,l,86400):m.bufferSource.start(0,l,c),f!==1/0&&(n._endTimers[u._id]=setTimeout(n._ended.bind(n,u),f)),t||setTimeout(function(){n._emit("play",u._id),n._loadQueue()},0)};"running"===i.state?v():(n._playLock=!0,n.once("resume",v),n._clearTimer(u._id))}else{var y=function(){m.currentTime=l,m.muted=u._muted||n._muted||i._muted||m.muted,m.volume=u._volume*i.volume(),m.playbackRate=u._rate;try{var o=m.play();if(o&&"undefined"!=typeof Promise&&(o instanceof Promise||"function"==typeof o.then)?(n._playLock=!0,_(),o.then(function(){n._playLock=!1,m._unlocked=!0,t||(n._emit("play",u._id),n._loadQueue())}).catch(function(){n._playLock=!1,n._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),u._ended=!0,u._paused=!0})):t||(n._playLock=!1,_(),n._emit("play",u._id),n._loadQueue()),m.playbackRate=u._rate,m.paused)return void n._emit("playerror",u._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||u._loop?n._endTimers[u._id]=setTimeout(n._ended.bind(n,u),f):(n._endTimers[u._id]=function(){n._ended(u),m.removeEventListener("ended",n._endTimers[u._id],!1)},m.addEventListener("ended",n._endTimers[u._id],!1))}catch(e){n._emit("playerror",u._id,e)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===m.src&&(m.src=n._src,m.load());var g=window&&window.ejecta||!m.readyState&&i._navigator.isCocoonJS;if(m.readyState>=3||g)y();else{n._playLock=!0;var b=function(){y(),m.removeEventListener(i._canPlayEvent,b,!1)};m.addEventListener(i._canPlayEvent,b,!1),n._clearTimer(u._id)}}return u._id}n._ended(u)},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var n=t._getSoundIds(e),o=0;o<n.length;o++){t._clearTimer(n[o]);var r=t._soundById(n[o]);if(r&&!r._paused&&(r._seek=t.seek(n[o]),r._rateSeek=0,r._paused=!0,t._stopFade(n[o]),r._node))if(t._webAudio){if(!r._node.bufferSource)continue;void 0===r._node.bufferSource.stop?r._node.bufferSource.noteOff(0):r._node.bufferSource.stop(0),t._cleanBuffer(r._node)}else isNaN(r._node.duration)&&r._node.duration!==1/0||r._node.pause();arguments[1]||t._emit("pause",r?r._id:null)}return t},stop:function(e,t){var n=this;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e)}}),n;for(var o=n._getSoundIds(e),r=0;r<o.length;r++){n._clearTimer(o[r]);var i=n._soundById(o[r]);i&&(i._seek=i._start||0,i._rateSeek=0,i._paused=!0,i._ended=!0,n._stopFade(o[r]),i._node&&(n._webAudio?i._node.bufferSource&&(void 0===i._node.bufferSource.stop?i._node.bufferSource.noteOff(0):i._node.bufferSource.stop(0),n._cleanBuffer(i._node)):isNaN(i._node.duration)&&i._node.duration!==1/0||(i._node.currentTime=i._start||0,i._node.pause(),i._node.duration===1/0&&n._clearSound(i._node))),t||n._emit("stop",i._id))}return n},mute:function(e,t){var n=this;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t)}}),n;if(void 0===t){if("boolean"!=typeof e)return n._muted;n._muted=e}for(var o=n._getSoundIds(t),r=0;r<o.length;r++){var a=n._soundById(o[r]);a&&(a._muted=e,a._interval&&n._stopFade(a._id),n._webAudio&&a._node?a._node.gain.setValueAtTime(e?0:a._volume,i.ctx.currentTime):a._node&&(a._node.muted=!!i._muted||e),n._emit("mute",a._id))}return n},volume:function(){var e,t,n,o=this,r=arguments;if(0===r.length)return o._volume;if(1===r.length||2===r.length&&void 0===r[1]?o._getSoundIds().indexOf(r[0])>=0?t=parseInt(r[0],10):e=parseFloat(r[0]):r.length>=2&&(e=parseFloat(r[0]),t=parseInt(r[1],10)),!(void 0!==e&&e>=0&&e<=1))return(n=t?o._soundById(t):o._sounds[0])?n._volume:0;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"volume",action:function(){o.volume.apply(o,r)}}),o;void 0===t&&(o._volume=e),t=o._getSoundIds(t);for(var a=0;a<t.length;a++)(n=o._soundById(t[a]))&&(n._volume=e,r[2]||o._stopFade(t[a]),o._webAudio&&n._node&&!n._muted?n._node.gain.setValueAtTime(e,i.ctx.currentTime):n._node&&!n._muted&&(n._node.volume=e*i.volume()),o._emit("volume",n._id));return o},fade:function(e,t,n,o){var r=this;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"fade",action:function(){r.fade(e,t,n,o)}}),r;e=parseFloat(e),t=parseFloat(t),n=parseFloat(n),r.volume(e,o);for(var a=r._getSoundIds(o),u=0;u<a.length;u++){var s=r._soundById(a[u]);if(s){if(o||r._stopFade(a[u]),r._webAudio&&!s._muted){var l=i.ctx.currentTime,c=l+n/1e3;s._volume=e,s._node.gain.setValueAtTime(e,l),s._node.gain.linearRampToValueAtTime(t,c)}r._startFadeInterval(s,e,t,n,a[u],void 0===o)}}return r},_startFadeInterval:function(e,t,n,o,r,i){var a=this,u=t,s=n-t,l=Math.abs(s/.01),c=Math.max(4,l>0?o/l:o),f=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var r=(Date.now()-f)/o;f=Date.now(),u+=s*r,u=Math.max(0,u),u=Math.min(1,u),u=Math.round(100*u)/100,a._webAudio?e._volume=u:a.volume(u,e._id,!0),i&&(a._volume=u),(n<t&&u<=n||n>t&&u>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(n,e._id),a._emit("fade",e._id))},c)},_stopFade:function(e){var t=this._soundById(e);return t&&t._interval&&(this._webAudio&&t._node.gain.cancelScheduledValues(i.ctx.currentTime),clearInterval(t._interval),t._interval=null,this.volume(t._fadeTo,e),t._fadeTo=null,this._emit("fade",e)),this},loop:function(){var e,t,n,o=arguments;if(0===o.length)return this._loop;if(1===o.length){if("boolean"!=typeof o[0])return!!(n=this._soundById(parseInt(o[0],10)))&&n._loop;e=o[0],this._loop=e}else 2===o.length&&(e=o[0],t=parseInt(o[1],10));for(var r=this._getSoundIds(t),i=0;i<r.length;i++)(n=this._soundById(r[i]))&&(n._loop=e,this._webAudio&&n._node&&n._node.bufferSource&&(n._node.bufferSource.loop=e,e&&(n._node.bufferSource.loopStart=n._start||0,n._node.bufferSource.loopEnd=n._stop)));return this},rate:function(){var e,t,n,o=this,r=arguments;if(0===r.length?t=o._sounds[0]._id:1===r.length?o._getSoundIds().indexOf(r[0])>=0?t=parseInt(r[0],10):e=parseFloat(r[0]):2===r.length&&(e=parseFloat(r[0]),t=parseInt(r[1],10)),"number"!=typeof e)return(n=o._soundById(t))?n._rate:o._rate;if("loaded"!==o._state||o._playLock)return o._queue.push({event:"rate",action:function(){o.rate.apply(o,r)}}),o;void 0===t&&(o._rate=e),t=o._getSoundIds(t);for(var a=0;a<t.length;a++)if(n=o._soundById(t[a])){o.playing(t[a])&&(n._rateSeek=o.seek(t[a]),n._playStart=o._webAudio?i.ctx.currentTime:n._playStart),n._rate=e,o._webAudio&&n._node&&n._node.bufferSource?n._node.bufferSource.playbackRate.setValueAtTime(e,i.ctx.currentTime):n._node&&(n._node.playbackRate=e);var u=o.seek(t[a]),s=1e3*((o._sprite[n._sprite][0]+o._sprite[n._sprite][1])/1e3-u)/Math.abs(n._rate);!o._endTimers[t[a]]&&n._paused||(o._clearTimer(t[a]),o._endTimers[t[a]]=setTimeout(o._ended.bind(o,n),s)),o._emit("rate",n._id)}return o},seek:function(){var e,t,n=this,o=arguments;if(0===o.length?t=n._sounds[0]._id:1===o.length?n._getSoundIds().indexOf(o[0])>=0?t=parseInt(o[0],10):n._sounds.length&&(t=n._sounds[0]._id,e=parseFloat(o[0])):2===o.length&&(e=parseFloat(o[0]),t=parseInt(o[1],10)),void 0===t)return n;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"seek",action:function(){n.seek.apply(n,o)}}),n;var r=n._soundById(t);if(r){if(!("number"==typeof e&&e>=0)){if(n._webAudio){var a=n.playing(t)?i.ctx.currentTime-r._playStart:0,u=r._rateSeek?r._rateSeek-r._seek:0;return r._seek+(u+a*Math.abs(r._rate))}return r._node.currentTime}var s=n.playing(t);s&&n.pause(t,!0),r._seek=e,r._ended=!1,n._clearTimer(t),n._webAudio||!r._node||isNaN(r._node.duration)||(r._node.currentTime=e);var l=function(){n._emit("seek",t),s&&n.play(t,!0)};if(s&&!n._webAudio){var c=function(){n._playLock?setTimeout(c,0):l()};setTimeout(c,0)}else l()}return n},playing:function(e){if("number"==typeof e){var t=this._soundById(e);return!!t&&!t._paused}for(var n=0;n<this._sounds.length;n++)if(!this._sounds[n]._paused)return!0;return!1},duration:function(e){var t=this._duration,n=this._soundById(e);return n&&(t=this._sprite[n._sprite][1]/1e3),t},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,!1),t[n]._node.removeEventListener(i._canPlayEvent,t[n]._loadFn,!1),i._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var o=i._howls.indexOf(e);o>=0&&i._howls.splice(o,1);var r=!0;for(n=0;n<i._howls.length;n++)if(i._howls[n]._src===e._src||e._src.indexOf(i._howls[n]._src)>=0){r=!1;break}return s&&r&&delete s[e._src],i.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var r=this["_on"+e];return"function"==typeof t&&r.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),this},off:function(e,t,n){var o=this["_on"+e],r=0;if("number"==typeof t&&(n=t,t=null),t||n)for(r=0;r<o.length;r++){var i=n===o[r].id;if(t===o[r].fn&&i||!t&&i){o.splice(r,1);break}}else if(e)this["_on"+e]=[];else{var a=Object.keys(this);for(r=0;r<a.length;r++)0===a[r].indexOf("_on")&&Array.isArray(this[a[r]])&&(this[a[r]]=[])}return this},once:function(e,t,n){return this.on(e,t,n,1),this},_emit:function(e,t,n){for(var o=this["_on"+e],r=o.length-1;r>=0;r--)o[r].id&&o[r].id!==t&&"load"!==e||(setTimeout(function(e){e.call(this,t,n)}.bind(this,o[r].fn),0),o[r].once&&this.off(e,o[r].fn,o[r].id));return this._loadQueue(e),this},_loadQueue:function(e){if(this._queue.length>0){var t=this._queue[0];t.event===e&&(this._queue.shift(),this._loadQueue()),e||t.action()}return this},_ended:function(e){var t=e._sprite;if(!this._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(this._ended.bind(this,e),100),this;var n=!(!e._loop&&!this._sprite[t][2]);if(this._emit("end",e._id),!this._webAudio&&n&&this.stop(e._id,!0).play(e._id),this._webAudio&&n){this._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=i.ctx.currentTime;var o=1e3*(e._stop-e._start)/Math.abs(e._rate);this._endTimers[e._id]=setTimeout(this._ended.bind(this,e),o)}return this._webAudio&&!n&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,this._clearTimer(e._id),this._cleanBuffer(e._node),i._autoSuspend()),this._webAudio||n||this.stop(e._id,!0),this},_clearTimer:function(e){if(this._endTimers[e]){if("function"!=typeof this._endTimers[e])clearTimeout(this._endTimers[e]);else{var t=this._soundById(e);t&&t._node&&t._node.removeEventListener("ended",this._endTimers[e],!1)}delete this._endTimers[e]}return this},_soundById:function(e){for(var t=0;t<this._sounds.length;t++)if(e===this._sounds[t]._id)return this._sounds[t];return null},_inactiveSound:function(){this._drain();for(var e=0;e<this._sounds.length;e++)if(this._sounds[e]._ended)return this._sounds[e].reset();return new u(this)},_drain:function(){var e=this._pool,t=0,n=0;if(!(this._sounds.length<e)){for(n=0;n<this._sounds.length;n++)this._sounds[n]._ended&&t++;for(n=this._sounds.length-1;n>=0;n--){if(t<=e)return;this._sounds[n]._ended&&(this._webAudio&&this._sounds[n]._node&&this._sounds[n]._node.disconnect(0),this._sounds.splice(n,1),t--)}}},_getSoundIds:function(e){if(void 0===e){for(var t=[],n=0;n<this._sounds.length;n++)t.push(this._sounds[n]._id);return t}return[e]},_refreshBuffer:function(e){return e._node.bufferSource=i.ctx.createBufferSource(),e._node.bufferSource.buffer=s[this._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,i.ctx.currentTime),this},_cleanBuffer:function(e){var t=i._navigator&&i._navigator.vendor.indexOf("Apple")>=0;if(i._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=i._scratchBuffer}catch(e){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(i._navigator&&i._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var u=function(e){this._parent=e,this.init()};u.prototype={init:function(){var e=this._parent;return this._muted=e._muted,this._loop=e._loop,this._volume=e._volume,this._rate=e._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++i._counter,e._sounds.push(this),this.create(),this},create:function(){var e=this._parent,t=i._muted||this._muted||this._parent._muted?0:this._volume;return e._webAudio?(this._node=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),this._node.gain.setValueAtTime(t,i.ctx.currentTime),this._node.paused=!0,this._node.connect(i.masterGain)):(this._node=i._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(i._canPlayEvent,this._loadFn,!1),this._node.src=e._src,this._node.preload="auto",this._node.volume=t*i.volume(),this._node.load()),this},reset:function(){var e=this._parent;return this._muted=e._muted,this._loop=e._loop,this._volume=e._volume,this._rate=e._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++i._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var e=this._parent;e._duration=Math.ceil(10*this._node.duration)/10,0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue()),this._node.removeEventListener(i._canPlayEvent,this._loadFn,!1)}};var s={},l=function(e){var t=e._src;if(s[t])return e._duration=s[t].duration,void d(e);if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),r=0;r<n.length;++r)o[r]=n.charCodeAt(r);f(o.buffer,e)}else{var i=new XMLHttpRequest;i.open("GET",t,!0),i.withCredentials=e._xhrWithCredentials,i.responseType="arraybuffer",i.onload=function(){var t=(i.status+"")[0];"0"===t||"2"===t||"3"===t?f(i.response,e):e._emit("loaderror",null,"Failed loading audio file with status: "+i.status+".")},i.onerror=function(){e._webAudio&&(e._html5=!0,e._webAudio=!1,e._sounds=[],delete s[t],e.load())},c(i)}},c=function(e){try{e.send()}catch(t){e.onerror()}},f=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.")},o=function(e){e&&t._sounds.length>0?(s[t._src]=e,d(t,e)):n()};"undefined"!=typeof Promise&&1===i.ctx.decodeAudioData.length?i.ctx.decodeAudioData(e).then(o).catch(n):i.ctx.decodeAudioData(e,o,n)},d=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},p=function(){if(i.usingWebAudio){try{"undefined"!=typeof AudioContext?i.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?i.ctx=new webkitAudioContext:i.usingWebAudio=!1}catch(e){i.usingWebAudio=!1}i.ctx||(i.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(i._navigator&&i._navigator.platform),t=i._navigator&&i._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var o=/safari/.test(i._navigator&&i._navigator.userAgent.toLowerCase());(i._navigator&&i._navigator.standalone&&!o||i._navigator&&!i._navigator.standalone&&!o)&&(i.usingWebAudio=!1)}i.usingWebAudio&&(i.masterGain=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),i.masterGain.gain.setValueAtTime(i._muted?0:1,i.ctx.currentTime),i.masterGain.connect(i.ctx.destination)),i._setup()}};void 0===(o=function(){return{Howler:i,Howl:a}}.apply(t,[]))||(e.exports=o),t.Howler=i,t.Howl=a,"undefined"!=typeof window?(window.HowlerGlobal=r,window.Howler=i,window.Howl=a,window.Sound=u):void 0!==n&&(n.HowlerGlobal=r,n.Howler=i,n.Howl=a,n.Sound=u)}(),
  /*!
   *  Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
   *  
   *  howler.js v2.1.2
   *  howlerjs.com
   *
   *  (c) 2013-2019, James Simpson of GoldFire Studios
   *  goldfirestudios.com
   *
   *  MIT License
   */
  function(){"use strict";HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){if(!this.ctx||!this.ctx.listener)return this;for(var t=this._howls.length-1;t>=0;t--)this._howls[t].stereo(e);return this},HowlerGlobal.prototype.pos=function(e,t,n){return this.ctx&&this.ctx.listener?(t="number"!=typeof t?this._pos[1]:t,n="number"!=typeof n?this._pos[2]:n,"number"!=typeof e?this._pos:(this._pos=[e,t,n],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this},HowlerGlobal.prototype.orientation=function(e,t,n,o,r,i){if(!this.ctx||!this.ctx.listener)return this;var a=this._orientation;return t="number"!=typeof t?a[1]:t,n="number"!=typeof n?a[2]:n,o="number"!=typeof o?a[3]:o,r="number"!=typeof r?a[4]:r,i="number"!=typeof i?a[5]:i,"number"!=typeof e?a:(this._orientation=[e,t,n,o,r,i],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(n,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(e,t,n,o,r,i),this)},Howl.prototype.init=function(e){return function(t){return this._orientation=t.orientation||[1,0,0],this._stereo=t.stereo||null,this._pos=t.pos||null,this._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},this._onstereo=t.onstereo?[{fn:t.onstereo}]:[],this._onpos=t.onpos?[{fn:t.onpos}]:[],this._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}}(Howl.prototype.init),Howl.prototype.stereo=function(t,n){var o=this;if(!o._webAudio)return o;if("loaded"!==o._state)return o._queue.push({event:"stereo",action:function(){o.stereo(t,n)}}),o;var r=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===n){if("number"!=typeof t)return o._stereo;o._stereo=t,o._pos=[t,0,0]}for(var i=o._getSoundIds(n),a=0;a<i.length;a++){var u=o._soundById(i[a]);if(u){if("number"!=typeof t)return u._stereo;u._stereo=t,u._pos=[t,0,0],u._node&&(u._pannerAttr.panningModel="equalpower",u._panner&&u._panner.pan||e(u,r),"spatial"===r?void 0!==u._panner.positionX?(u._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),u._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),u._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):u._panner.setPosition(t,0,0):u._panner.pan.setValueAtTime(t,Howler.ctx.currentTime)),o._emit("stereo",u._id)}}return o},Howl.prototype.pos=function(t,n,o,r){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"pos",action:function(){i.pos(t,n,o,r)}}),i;if(n="number"!=typeof n?0:n,o="number"!=typeof o?-.5:o,void 0===r){if("number"!=typeof t)return i._pos;i._pos=[t,n,o]}for(var a=i._getSoundIds(r),u=0;u<a.length;u++){var s=i._soundById(a[u]);if(s){if("number"!=typeof t)return s._pos;s._pos=[t,n,o],s._node&&(s._panner&&!s._panner.pan||e(s,"spatial"),void 0!==s._panner.positionX?(s._panner.positionX.setValueAtTime(t,Howler.ctx.currentTime),s._panner.positionY.setValueAtTime(n,Howler.ctx.currentTime),s._panner.positionZ.setValueAtTime(o,Howler.ctx.currentTime)):s._panner.setPosition(t,n,o)),i._emit("pos",s._id)}}return i},Howl.prototype.orientation=function(t,n,o,r){var i=this;if(!i._webAudio)return i;if("loaded"!==i._state)return i._queue.push({event:"orientation",action:function(){i.orientation(t,n,o,r)}}),i;if(n="number"!=typeof n?i._orientation[1]:n,o="number"!=typeof o?i._orientation[2]:o,void 0===r){if("number"!=typeof t)return i._orientation;i._orientation=[t,n,o]}for(var a=i._getSoundIds(r),u=0;u<a.length;u++){var s=i._soundById(a[u]);if(s){if("number"!=typeof t)return s._orientation;s._orientation=[t,n,o],s._node&&(s._panner||(s._pos||(s._pos=i._pos||[0,0,-.5]),e(s,"spatial")),void 0!==s._panner.orientationX?(s._panner.orientationX.setValueAtTime(t,Howler.ctx.currentTime),s._panner.orientationY.setValueAtTime(n,Howler.ctx.currentTime),s._panner.orientationZ.setValueAtTime(o,Howler.ctx.currentTime)):s._panner.setOrientation(t,n,o)),i._emit("orientation",s._id)}}return i},Howl.prototype.pannerAttr=function(){var t,n,o,r=arguments;if(!this._webAudio)return this;if(0===r.length)return this._pannerAttr;if(1===r.length){if("object"!=typeof r[0])return(o=this._soundById(parseInt(r[0],10)))?o._pannerAttr:this._pannerAttr;t=r[0],void 0===n&&(t.pannerAttr||(t.pannerAttr={coneInnerAngle:t.coneInnerAngle,coneOuterAngle:t.coneOuterAngle,coneOuterGain:t.coneOuterGain,distanceModel:t.distanceModel,maxDistance:t.maxDistance,refDistance:t.refDistance,rolloffFactor:t.rolloffFactor,panningModel:t.panningModel}),this._pannerAttr={coneInnerAngle:void 0!==t.pannerAttr.coneInnerAngle?t.pannerAttr.coneInnerAngle:this._coneInnerAngle,coneOuterAngle:void 0!==t.pannerAttr.coneOuterAngle?t.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==t.pannerAttr.coneOuterGain?t.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==t.pannerAttr.distanceModel?t.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==t.pannerAttr.maxDistance?t.pannerAttr.maxDistance:this._maxDistance,refDistance:void 0!==t.pannerAttr.refDistance?t.pannerAttr.refDistance:this._refDistance,rolloffFactor:void 0!==t.pannerAttr.rolloffFactor?t.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==t.pannerAttr.panningModel?t.pannerAttr.panningModel:this._panningModel})}else 2===r.length&&(t=r[0],n=parseInt(r[1],10));for(var i=this._getSoundIds(n),a=0;a<i.length;a++)if(o=this._soundById(i[a])){var u=o._pannerAttr;u={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:u.coneInnerAngle,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:u.coneOuterAngle,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:u.coneOuterGain,distanceModel:void 0!==t.distanceModel?t.distanceModel:u.distanceModel,maxDistance:void 0!==t.maxDistance?t.maxDistance:u.maxDistance,refDistance:void 0!==t.refDistance?t.refDistance:u.refDistance,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:u.rolloffFactor,panningModel:void 0!==t.panningModel?t.panningModel:u.panningModel};var s=o._panner;s?(s.coneInnerAngle=u.coneInnerAngle,s.coneOuterAngle=u.coneOuterAngle,s.coneOuterGain=u.coneOuterGain,s.distanceModel=u.distanceModel,s.maxDistance=u.maxDistance,s.refDistance=u.refDistance,s.rolloffFactor=u.rolloffFactor,s.panningModel=u.panningModel):(o._pos||(o._pos=this._pos||[0,0,-.5]),e(o,"spatial"))}return this},Sound.prototype.init=function(e){return function(){var t=this._parent;this._orientation=t._orientation,this._stereo=t._stereo,this._pos=t._pos,this._pannerAttr=t._pannerAttr,e.call(this),this._stereo?t.stereo(this._stereo):this._pos&&t.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init),Sound.prototype.reset=function(e){return function(){var t=this._parent;return this._orientation=t._orientation,this._stereo=t._stereo,this._pos=t._pos,this._pannerAttr=t._pannerAttr,this._stereo?t.stereo(this._stereo):this._pos?t.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,t._refreshBuffer(this)),e.call(this)}}(Sound.prototype.reset);var e=function(e,t){"spatial"===(t=t||"spatial")?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}()}).call(this,n(35))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(36),i=n(0),a=n(2),u=d(n(34)),s=d(n(33)),l=d(n(8)),c=n(1),f=n(11);function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var h=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=o=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),o.state={audio:null,current_song:null,percent:0,song:null},p(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"componentDidMount",value:function(){this.intervalId=setInterval(this.timer.bind(this),250)}},{key:"componentWillUnmount",value:function(){clearInterval(this.intervalId)}},{key:"onTrack",value:function(e,t){e.preventDefault(),this.props.scope.track({songIndex:t})}},{key:"onPause",value:function(e){e.preventDefault(),this.state.audio.pause()}},{key:"onPlay",value:function(e){e.preventDefault(),this.state.audio.play()}},{key:"onSeek",value:function(e){var t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left)/e.currentTarget.clientWidth,o=this.state.audio.duration()*n;this.state.audio.seek(o)}},{key:"render",value:function(e,t){var n=this,o=e.scope;if(!o.user)return null;if(!t.song)return(0,i.h)("div",{className:"Player"});var r=t.song.album?"url("+t.song.album.cover+")":null,a=0==t.audio.duration(),c=t.audio.playing(),d=(0,f.nextSongFromIndex)(o.current_song,o.now_playing,o.now_playing_removed),p=(0,f.previousSongFromIndex)(o.current_song,o.now_playing,o.now_playing_removed);return(0,i.h)("div",{className:"Player"},p&&(0,i.h)("a",{className:"Player_tracking -previous",onClick:function(e){return n.onTrack(e,p.index)}},(0,i.h)("div",{className:"Player_tracking-cover",style:{backgroundImage:p.song.album?"url("+p.song.album.cover+")":null}}),(0,i.h)(u.default,null)),(0,i.h)("div",{className:"Player_song"},(0,i.h)("div",{className:"Player_song-cover",style:{backgroundImage:r}}),(0,i.h)("div",{className:"Player_song-title"},t.song.name),t.song.album&&(0,i.h)("div",{className:"Player_song-album"},(0,i.h)("span",null,t.song.album.name),t.song.artists&&(0,i.h)("span",null," – ",t.song.artists.map(function(e){return e.name}).join(", ")))),a&&(0,i.h)("div",{className:"Player_pause -loading"},(0,i.h)(s.default,null)),!a&&c&&(0,i.h)("a",{className:"Player_pause",href:"#",onClick:function(e){return n.onPause(e)}},(0,i.h)(s.default,null)),!a&&!c&&(0,i.h)("a",{className:"Player_play",href:"#",onClick:function(e){return n.onPlay(e)}},(0,i.h)(l.default,null)),(0,i.h)("div",{className:"Player_progress",onClick:function(e){return n.onSeek(e)}},(0,i.h)("div",{className:"Player_progress-bar",style:{width:t.percent+"%"}})),d&&(0,i.h)("a",{className:"Player_tracking -next",onClick:function(e){return n.onTrack(e,d.index)}},(0,i.h)("div",{className:"Player_tracking-cover",style:{backgroundImage:d.song.album?"url("+d.song.album.cover+")":null}}),(0,i.h)(u.default,null)))}},{key:"timer",value:function(){if(this.state.audio&&this.state.audio.duration()){var e=this.state.audio.seek();this.state.audio.playing()||0!=e?this.setState({percent:e/this.state.audio.duration()*100}):(this.setState({audio:null,percent:100}),this.props.scope.next())}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.scope;return n.current_song!==t.current_song&&(t.audio&&t.audio.pause(),null!==n.current_song?(t.song=n.now_playing[n.current_song],t.audio=new r.Howl({src:[t.song.file]}),t.audio.play()):(t.audio=null,t.song=null),t.current_song=n.current_song,t.percent=0),t}}]),t}(),_=(0,a.connect)(["current_song","now_playing","now_playing_removed","user"],c.actions)(function(e){return(0,i.h)(h,{scope:e})});t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),r=n(2),i=n(1),a=(0,r.connect)(["loading_count"],i.actions)(function(e){return e.loading_count>0&&(0,o.h)("div",{className:"Loading"},"Loading...")});t.default=a},function(e,t,n){"use strict";function o(e,t){for(var n in t)e[n]=t[n];return e}n.r(t),t.default=function(e){var t=[];function n(e){for(var n=[],o=0;o<t.length;o++)t[o]===e?e=null:n.push(t[o]);t=n}function r(n,r,i){e=r?n:o(o({},e),n);for(var a=t,u=0;u<a.length;u++)a[u](e,i)}return e=e||{},{action:function(t){function n(e){r(e,!1,t)}return function(){for(var o=arguments,r=[e],i=0;i<arguments.length;i++)r.push(o[i]);var a=t.apply(this,r);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return t.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return e}}}},function(e,t,n){var o,r;
  /*!
   * JavaScript Cookie v2.2.0
   * https://github.com/js-cookie/js-cookie
   *
   * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
   * Released under the MIT license
   */!function(i){void 0===(r="function"==typeof(o=i)?o.call(t,n,t,e):o)||(e.exports=r),e.exports=i()}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var o in n)t[o]=n[o]}return t}return function t(n){function o(t,r,i){var a;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(i=e({path:"/"},o.defaults,i)).expires){var u=new Date;u.setMilliseconds(u.getMilliseconds()+864e5*i.expires),i.expires=u}i.expires=i.expires?i.expires.toUTCString():"";try{a=JSON.stringify(r),/^[\{\[]/.test(a)&&(r=a)}catch(e){}r=n.write?n.write(r,t):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var l in i)i[l]&&(s+="; "+l,!0!==i[l]&&(s+="="+i[l]));return document.cookie=t+"="+r+s}t||(a={});for(var c=document.cookie?document.cookie.split("; "):[],f=/(%[0-9A-Z]{2})+/g,d=0;d<c.length;d++){var p=c[d].split("="),h=p.slice(1).join("=");this.json||'"'!==h.charAt(0)||(h=h.slice(1,-1));try{var _=p[0].replace(f,decodeURIComponent);if(h=n.read?n.read(h,_):n(h,_)||h.replace(f,decodeURIComponent),this.json)try{h=JSON.parse(h)}catch(e){}if(t===_){a=h;break}t||(a[_]=h)}catch(e){}}return a}}return o.set=o,o.get=function(e){return o.call(o,e)},o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(t,n){o(t,"",e(n,{expires:-1}))},o.withConverter=t,o}(function(){})})},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";var o=n(13);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";var o=n(3);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,n,r,i,a){var u=[];u.push(e+"="+encodeURIComponent(t)),o.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),o.isString(r)&&u.push("path="+r),o.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var o=n(3);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var o=e;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=o.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var o=n(3),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(o.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=o.trim(e.substr(0,i)).toLowerCase(),n=o.trim(e.substr(i+1)),t){if(a[t]&&r.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";e.exports=function(e,t,n,o,r){return e.config=t,n&&(e.code=n),e.request=o,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var o=n(15);e.exports=function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(o("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var o=n(3);e.exports=function(e,t){o.forEach(e,function(n,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[o])})}},function(e,t){var n,o,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var s,l=[],c=!1,f=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):f=-1,l.length&&p())}function p(){if(!c){var e=u(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,c=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function _(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||u(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=_,r.addListener=_,r.once=_,r.off=_,r.removeListener=_,r.removeAllListeners=_,r.emit=_,r.prependListener=_,r.prependOnceListener=_,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(e,t,n){"use strict";var o=n(3);e.exports=function(e,t,n){return o.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";var o=n(3),r=n(52),i=n(18),a=n(17),u=n(44),s=n(43);function l(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return l(e),e.baseURL&&!u(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||a.adapter)(e).then(function(t){return l(e),t.data=r(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(l(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var o=n(3);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";var o=n(3),r=n(19),i=n(54),a=n(53),u=n(14);function s(e){this.defaults=e,this.interceptors={request:new i,response:new i}}s.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=u(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},s.prototype.getUri=function(e){return e=u(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(e){s.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){s.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=s},function(e,t){
  /*!
   * Determine if an object is a Buffer
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   */
  e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,n){"use strict";var o=n(3),r=n(20),i=n(55),a=n(14);function u(e){var t=new i(e),n=r(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var s=u(n(17));s.Axios=i,s.create=function(e){return u(a(s.defaults,e))},s.Cancel=n(13),s.CancelToken=n(42),s.isCancel=n(18),s.all=function(e){return Promise.all(e)},s.spread=n(41),e.exports=s,e.exports.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),i=n(6),a=n(2),u=n(1);function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=o=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),o.state={password:"",username:""},o.onLogin=function(e){e.preventDefault();var t=o.props.scope,n={username:o.state.username,password:o.state.password};t.load({data:n,method:"post",onSuccess:t.loginSuccess,scope:t,url:"/api/auth/login/"})},s(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),o(t,[{key:"componentDidMount",value:function(){this.setState({password:"",username:""}),this.props.scope.loading_count>0&&this.props.scope.isLoading(!1)}},{key:"mutate",value:function(e,t){var n={};n[t]=e.target.value,this.setState(n)}},{key:"render",value:function(e,t){var n=this.mutate.bind(this);return(0,r.h)("div",{className:"Login"},(0,r.h)("form",{className:"Form",onSubmit:this.onLogin},(0,r.h)("label",{class:"Input"},(0,r.h)("div",{class:"Input_label"},"Username"),(0,r.h)("input",{className:"Input_field",name:"username",onChange:function(e){return n(e,"username")},placeholder:"…",value:t.username})),(0,r.h)("label",{class:"Input"},(0,r.h)("div",{class:"Input_label"},"Password"),(0,r.h)("input",{className:"Input_field",name:"password",onChange:function(e){return n(e,"password")},placeholder:"…",type:"password",value:t.password})),(0,r.h)("button",{className:"Button -primary",disabled:!1,onClick:this.onLogin},"Sign In")))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scope.user&&(e.scope.viewDashboard(),(0,i.route)("/")),t}}]),t}(),c=(0,a.connect)(["loading_count","user"],u.actions)(function(e){return(0,r.h)(l,{scope:e})});t.default=c},function(e,t,n){"use strict";var o=n(0),r=b(n(6)),i=n(2),a=b(n(58)),u=b(n(38)),s=b(n(37)),l=n(1),c=b(n(32)),f=b(n(31)),d=b(n(30)),p=b(n(29)),h=n(12),_=b(n(28)),m=b(n(27)),v=b(n(26)),y=b(n(25)),g=b(n(24));function b(e){return e&&e.__esModule?e:{default:e}}(0,o.render)((0,o.h)(i.Provider,{store:l.store},(0,o.h)("div",null,(0,o.h)(r.default,null,(0,o.h)(c.default,{path:"/albums/:albumId/add-songs/"}),(0,o.h)(d.default,{path:"/albums/:albumId/delete/"}),(0,o.h)(p.default,{path:"/albums/:albumId/"}),(0,o.h)(h.AlbumListConnection,{path:"/albums/"}),(0,o.h)(m.default,{path:"/artists/:artistId/"}),(0,o.h)(v.default,{path:"/artists/"}),(0,o.h)(f.default,{path:"/create/album/"}),(0,o.h)(_.default,{path:"/create/artist/"}),(0,o.h)(y.default,{path:"/now-playing/"}),(0,o.h)(g.default,{path:"/"}),(0,o.h)(a.default,{path:"/auth/login"}),(0,o.h)(function(){return(0,o.h)("h2",null,"Page not found.")},{default:!0})),(0,o.h)(s.default,null),(0,o.h)(u.default,null))),document.getElementById("root"))},function(e,t,n){n(59),e.exports=n(23)}]);