site.js.map 490 KB

1
  1. {"version":3,"names":[],"mappings":"","sources":["site.js"],"sourcesContent":["/*!\n * Bootstrap v5.2.2 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){\"use strict\";const t=\"transitionend\",e=t=>{let e=t.getAttribute(\"data-bs-target\");if(!e||\"#\"===e){let i=t.getAttribute(\"href\");if(!i||!i.includes(\"#\")&&!i.startsWith(\".\"))return null;i.includes(\"#\")&&!i.startsWith(\"#\")&&(i=`#${i.split(\"#\")[1]}`),e=i&&\"#\"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},s=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||\"object\"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:\"string\"==typeof t&&t.length>0?document.querySelector(t):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e=\"visible\"===getComputedStyle(t).getPropertyValue(\"visibility\"),i=t.closest(\"details:not([open])\");if(!i)return e;if(i!==t){const e=t.closest(\"summary\");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains(\"disabled\")||(void 0!==t.disabled?t.disabled:t.hasAttribute(\"disabled\")&&\"false\"!==t.getAttribute(\"disabled\")),c=t=>{if(!document.documentElement.attachShadow)return null;if(\"function\"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute(\"data-bs-no-jquery\")?window.jQuery:null,f=[],p=()=>\"rtl\"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},\"loading\"===document.readyState?(f.length||document.addEventListener(\"DOMContentLoaded\",(()=>{for(const t of f)t()})),f.push(e)):e()},m=t=>{\"function\"==typeof t&&t()},_=(e,i,n=!0)=>{if(!n)return void m(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(\",\")[0],i=i.split(\",\")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let r=!1;const a=({target:n})=>{n===i&&(r=!0,i.removeEventListener(t,a),m(e))};i.addEventListener(t,a),setTimeout((()=>{r||s(i)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\\..*)\\.|.*/,y=/\\..*/,w=/::\\d+$/,A={};let E=1;const T={mouseenter:\"mouseover\",mouseleave:\"mouseout\"},C=new Set([\"click\",\"dblclick\",\"mouseup\",\"mousedown\",\"contextmenu\",\"mousewheel\",\"DOMMouseScroll\",\"mouseover\",\"mouseout\",\"mousemove\",\"selectstart\",\"selectend\",\"keydown\",\"keypress\",\"keyup\",\"orientationchange\",\"touchstart\",\"touchmove\",\"touchend\",\"touchcancel\",\"pointerdown\",\"pointermove\",\"pointerup\",\"pointerleave\",\"pointercancel\",\"gesturestart\",\"gesturechange\",\"gestureend\",\"focus\",\"blur\",\"change\",\"reset\",\"select\",\"submit\",\"focusin\",\"focusout\",\"load\",\"unload\",\"beforeunload\",\"resize\",\"move\",\"DOMContentLoaded\",\"readystatechange\",\"error\",\"abort\",\"scroll\"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n=\"string\"==typeof e,s=n?i:e||i;let o=N(t);return C.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if(\"string\"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,\"\")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function S(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];S(t,e,i,n.callable,n.delegationSelector)}}function N(t){return t=t.replace(y,\"\"),T[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if(\"string\"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(\".\");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(w,\"\");if(!a||e.includes(n)){const e=c[i];S(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;S(t,l,r,o,s?i:null)}},trigger(t,e,i){if(\"string\"!=typeof e||!t)return null;const n=u();let s=null,o=!0,r=!0,a=!1;e!==N(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=j(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function j(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const M=new Map,H={set(t,e,i){M.has(t)||M.set(t,new Map);const n=M.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>M.has(t)&&M.get(t).get(e)||null,remove(t,e){if(!M.has(t))return;const i=M.get(t);i.delete(e),0===i.size&&M.delete(t)}};function $(t){if(\"true\"===t)return!0;if(\"false\"===t)return!1;if(t===Number(t).toString())return Number(t);if(\"\"===t||\"null\"===t)return null;if(\"string\"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function W(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const B={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${W(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${W(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith(\"bs\")&&!t.startsWith(\"bsConfig\")));for(const n of i){let i=n.replace(/^bs/,\"\");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=$(t.dataset[n])}return e},getDataAttribute:(t,e)=>$(t.getAttribute(`data-bs-${W(e)}`))};class F{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method \"NAME\", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=o(e)?B.getDataAttribute(e,\"config\"):{};return{...this.constructor.Default,...\"object\"==typeof i?i:{},...o(e)?B.getDataAttributes(e):{},...\"object\"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],r=t[n],a=o(r)?\"element\":null==(i=r)?`${i}`:Object.prototype.toString.call(i).match(/\\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${n}\" provided type \"${a}\" but expected type \"${s}\".`)}var i}}class z extends F{constructor(t,e){super(),(t=r(t))&&(this._element=t,this._config=this._getConfig(e),H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),P.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){_(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return H.get(r(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,\"object\"==typeof e?e:null)}static get VERSION(){return\"5.2.2\"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const q=(t,e=\"hide\")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;P.on(document,i,`[data-bs-dismiss=\"${s}\"]`,(function(i){if([\"A\",\"AREA\"].includes(this.tagName)&&i.preventDefault(),l(this))return;const o=n(this)||this.closest(`.${s}`);t.getOrCreateInstance(o)[e]()}))};class R extends z{static get NAME(){return\"alert\"}close(){if(P.trigger(this._element,\"close.bs.alert\").defaultPrevented)return;this._element.classList.remove(\"show\");const t=this._element.classList.contains(\"fade\");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),P.trigger(this._element,\"closed.bs.alert\"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=R.getOrCreateInstance(this);if(\"string\"==typeof t){if(void 0===e[t]||t.startsWith(\"_\")||\"constructor\"===t)throw new TypeError(`No method named \"${t}\"`);e[t](this)}}))}}q(R,\"close\"),g(R);const V='[data-bs-toggle=\"button\"]';class K extends z{static get NAME(){return\"button\"}toggle(){this._element.setAttribute(\"aria-pressed\",this._element.classList.toggle(\"active\"))}static jQueryInterface(t){return this.each((function(){const e=K.getOrCreateInstance(this);\"toggle\"===t&&e[t]()}))}}P.on(document,\"click.bs.button.data-api\",V,(t=>{t.preventDefault();const e=t.target.closest(V);K.getOrCreateInstance(e).toggle()})),g(K);const Q={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=[\"a\",\"button\",\"input\",\"textarea\",\"select\",\"details\",\"[tabindex]\",'[contenteditable=\"true\"]'].map((t=>`${t}:not([tabindex^=\"-\"])`)).join(\",\");return this.find(e,t).filter((t=>!l(t)&&a(t)))}},X={endCallback:null,leftCallback:null,rightCallback:null},Y={endCallback:\"(function|null)\",leftCallback:\"(function|null)\",rightCallback:\"(function|null)\"};class U extends F{constructor(t,e){super(),this._element=t,t&&U.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return X}static get DefaultType(){return Y}static get NAME(){return\"swipe\"}dispose(){P.off(this._element,\".bs.swipe\")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),m(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&m(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(P.on(this._element,\"pointerdown.bs.swipe\",(t=>this._start(t))),P.on(this._element,\"pointerup.bs.swipe\",(t=>this._end(t))),this._element.classList.add(\"pointer-event\")):(P.on(this._element,\"touchstart.bs.swipe\",(t=>this._start(t))),P.on(this._element,\"touchmove.bs.swipe\",(t=>this._move(t))),P.on(this._element,\"touchend.bs.swipe\",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(\"pen\"===t.pointerType||\"touch\"===t.pointerType)}static isSupported(){return\"ontouchstart\"in document.documentElement||navigator.maxTouchPoints>0}}const G=\"next\",J=\"prev\",Z=\"left\",tt=\"right\",et=\"slid.bs.carousel\",it=\"carousel\",nt=\"active\",st={ArrowLeft:tt,ArrowRight:Z},ot={interval:5e3,keyboard:!0,pause:\"hover\",ride:!1,touch:!0,wrap:!0},rt={interval:\"(number|boolean)\",keyboard:\"boolean\",pause:\"(string|boolean)\",ride:\"(boolean|string)\",touch:\"boolean\",wrap:\"boolean\"};class at extends z{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Q.findOne(\".carousel-indicators\",this._element),this._addEventListeners(),this._config.ride===it&&this.cycle()}static get Default(){return ot}static get DefaultType(){return rt}static get NAME(){return\"carousel\"}next(){this._slide(G)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(J)}pause(){this._isSliding&&s(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?P.one(this._element,et,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void P.one(this._element,et,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?G:J;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&P.on(this._element,\"keydown.bs.carousel\",(t=>this._keydown(t))),\"hover\"===this._config.pause&&(P.on(this._element,\"mouseenter.bs.carousel\",(()=>this.pause())),P.on(this._element,\"mouseleave.bs.carousel\",(()=>this._maybeEnableCycle()))),this._config.touch&&U.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Q.find(\".carousel-item img\",this._element))P.on(t,\"dragstart.bs.carousel\",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Z)),rightCallback:()=>this._slide(this._directionToOrder(tt)),endCallback:()=>{\"hover\"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new U(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=st[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Q.findOne(\".active\",this._indicatorsElement);e.classList.remove(nt),e.removeAttribute(\"aria-current\");const i=Q.findOne(`[data-bs-slide-to=\"${t}\"]`,this._indicatorsElement);i&&(i.classList.add(nt),i.setAttribute(\"aria-current\",\"true\"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute(\"data-bs-interval\"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===G,s=e||b(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>P.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(\"slide.bs.carousel\").defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?\"carousel-item-start\":\"carousel-item-end\",c=n?\"carousel-item-next\":\"carousel-item-prev\";s.classList.add(c),d(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(nt),i.classList.remove(nt,c,l),this._isSliding=!1,r(et)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(\"slide\")}_getActive(){return Q.findOne(\".active.carousel-item\",this._element)}_getItems(){return Q.find(\".carousel-item\",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return p()?t===Z?J:G:t===Z?G:J}_orderToDirection(t){return p()?t===J?Z:tt:t===J?tt:Z}static jQueryInterface(t){return this.each((function(){const e=at.getOrCreateInstance(this,t);if(\"number\"!=typeof t){if(\"string\"==typeof t){if(void 0===e[t]||t.startsWith(\"_\")||\"constructor\"===t)throw new TypeError(`No method named \"${t}\"`);e[t]()}}else e.to(t)}))}}P.on(document,\"click.bs.carousel.data-api\",\"[data-bs-slide], [data-bs-slide-to]\",(function(t){const e=n(this);if(!e||!e.classList.contains(it))return;t.preventDefault();const i=at.getOrCreateInstance(e),s=this.getAttribute(\"data-bs-slide-to\");return s?(i.to(s),void i._maybeEnableCycle()):\"next\"===B.getDataAttribute(this,\"slide\")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),P.on(window,\"load.bs.carousel.data-api\",(()=>{const t=Q.find('[data-bs-ride=\"carousel\"]');for(const e of t)at.getOrCreateInstance(e)})),g(at);const lt=\"show\",ct=\"collapse\",ht=\"collapsing\",dt='[data-bs-toggle=\"collapse\"]',ut={parent:null,toggle:!0},ft={parent:\"(null|element)\",toggle:\"boolean\"};class pt extends z{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const n=Q.find(dt);for(const t of n){const e=i(t),n=Q.find(e).filter((t=>t===this._element));null!==e&&n.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ut}static get DefaultType(){return ft}static get NAME(){return\"collapse\"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(\".collapse.show, .collapse.collapsing\").filter((t=>t!==this._element)).map((t=>pt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(P.trigger(this._element,\"show.bs.collapse\").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(ct),this._element.classList.add(ht),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ht),this._element.classList.add(ct,lt),this._element.style[e]=\"\",P.trigger(this._element,\"shown.bs.collapse\")}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(P.trigger(this._element,\"hide.bs.collapse\").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,d(this._element),this._element.classList.add(ht),this._element.classList.remove(ct,lt);for(const t of this._triggerArray){const e=n(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]=\"\",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(ht),this._element.classList.add(ct),P.trigger(this._element,\"hidden.bs.collapse\")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(lt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=r(t.parent),t}_getDimension(){return this._element.classList.contains(\"collapse-horizontal\")?\"width\":\"height\"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(dt);for(const e of t){const t=n(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Q.find(\":scope .collapse .collapse\",this._config.parent);return Q.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(\"collapsed\",!e),i.setAttribute(\"aria-expanded\",e)}static jQueryInterface(t){const e={};return\"string\"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=pt.getOrCreateInstance(this,e);if(\"string\"==typeof t){if(void 0===i[t])throw new TypeError(`No method named \"${t}\"`);i[t]()}}))}}P.on(document,\"click.bs.collapse.data-api\",dt,(function(t){(\"A\"===t.target.tagName||t.delegateTarget&&\"A\"===t.delegateTarget.tagName)&&t.preventDefault();const e=i(this),n=Q.find(e);for(const t of n)pt.getOrCreateInstance(t,{toggle:!1}).toggle()})),g(pt);var gt=\"top\",mt=\"bottom\",_t=\"right\",bt=\"left\",vt=\"auto\",yt=[gt,mt,_t,bt],wt=\"start\",At=\"end\",Et=\"clippingParents\",Tt=\"viewport\",Ct=\"popper\",Ot=\"reference\",xt=yt.reduce((function(t,e){return t.concat([e+\"-\"+wt,e+\"-\"+At])}),[]),kt=[].concat(yt,[vt]).reduce((function(t,e){return t.concat([e,e+\"-\"+wt,e+\"-\"+At])}),[]),Lt=\"beforeRead\",Dt=\"read\",St=\"afterRead\",It=\"beforeMain\",Nt=\"main\",Pt=\"afterMain\",jt=\"beforeWrite\",Mt=\"write\",Ht=\"afterWrite\",$t=[Lt,Dt,St,It,Nt,Pt,jt,Mt,Ht];function Wt(t){return t?(t.nodeName||\"\").toLowerCase():null}function Bt(t){if(null==t)return window;if(\"[object Window]\"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ft(t){return t instanceof Bt(t).Element||t instanceof Element}function zt(t){return t instanceof Bt(t).HTMLElement||t instanceof HTMLElement}function qt(t){return\"undefined\"!=typeof ShadowRoot&&(t instanceof Bt(t).ShadowRoot||t instanceof ShadowRoot)}const Rt={name:\"applyStyles\",enabled:!0,phase:\"write\",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];zt(s)&&Wt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?\"\":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:\"0\",top:\"0\",margin:\"0\"},arrow:{position:\"absolute\"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]=\"\",t}),{});zt(n)&&Wt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:[\"computeStyles\"]};function Vt(t){return t.split(\"-\")[0]}var Kt=Math.max,Qt=Math.min,Xt=Math.round;function Yt(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+\"/\"+t.version})).join(\" \"):navigator.userAgent}function Ut(){return!/^((?!chrome|android).)*safari/i.test(Yt())}function Gt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&zt(t)&&(s=t.offsetWidth>0&&Xt(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Xt(n.height)/t.offsetHeight||1);var r=(Ft(t)?Bt(t):window).visualViewport,a=!Ut()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function Jt(t){var e=Gt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Zt(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&qt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function te(t){return Bt(t).getComputedStyle(t)}function ee(t){return[\"table\",\"td\",\"th\"].indexOf(Wt(t))>=0}function ie(t){return((Ft(t)?t.ownerDocument:t.document)||window.document).documentElement}function ne(t){return\"html\"===Wt(t)?t:t.assignedSlot||t.parentNode||(qt(t)?t.host:null)||ie(t)}function se(t){return zt(t)&&\"fixed\"!==te(t).position?t.offsetParent:null}function oe(t){for(var e=Bt(t),i=se(t);i&&ee(i)&&\"static\"===te(i).position;)i=se(i);return i&&(\"html\"===Wt(i)||\"body\"===Wt(i)&&\"static\"===te(i).position)?e:i||function(t){var e=/firefox/i.test(Yt());if(/Trident/i.test(Yt())&&zt(t)&&\"fixed\"===te(t).position)return null;var i=ne(t);for(qt(i)&&(i=i.host);zt(i)&&[\"html\",\"body\"].indexOf(Wt(i))<0;){var n=te(i);if(\"none\"!==n.transform||\"none\"!==n.perspective||\"paint\"===n.contain||-1!==[\"transform\",\"perspective\"].indexOf(n.willChange)||e&&\"filter\"===n.willChange||e&&n.filter&&\"none\"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function re(t){return[\"top\",\"bottom\"].indexOf(t)>=0?\"x\":\"y\"}function ae(t,e,i){return Kt(t,Qt(e,i))}function le(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ce(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const he={name:\"arrow\",enabled:!0,phase:\"main\",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=Vt(i.placement),l=re(a),c=[bt,_t].indexOf(a)>=0?\"height\":\"width\";if(o&&r){var h=function(t,e){return le(\"number\"!=typeof(t=\"function\"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ce(t,yt))}(s.padding,i),d=Jt(o),u=\"y\"===l?gt:bt,f=\"y\"===l?mt:_t,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=oe(o),_=m?\"y\"===l?m.clientHeight||0:m.clientWidth||0:0,b=p/2-g/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,A=ae(v,w,y),E=l;i.modifiersData[n]=((e={})[E]=A,e.centerOffset=A-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?\"[data-popper-arrow]\":i;null!=n&&(\"string\"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Zt(e.elements.popper,n)&&(e.elements.arrow=n)},requires:[\"popperOffsets\"],requiresIfExists:[\"preventOverflow\"]};function de(t){return t.split(\"-\")[1]}var ue={top:\"auto\",right:\"auto\",bottom:\"auto\",left:\"auto\"};function fe(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,g=void 0===p?0:p,m=\"function\"==typeof h?h({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var _=r.hasOwnProperty(\"x\"),b=r.hasOwnProperty(\"y\"),v=bt,y=gt,w=window;if(c){var A=oe(i),E=\"clientHeight\",T=\"clientWidth\";A===Bt(i)&&\"static\"!==te(A=ie(i)).position&&\"absolute\"===a&&(E=\"scrollHeight\",T=\"scrollWidth\"),(s===gt||(s===bt||s===_t)&&o===At)&&(y=mt,g-=(d&&A===w&&w.visualViewport?w.visualViewport.height:A[E])-n.height,g*=l?1:-1),s!==bt&&(s!==gt&&s!==mt||o!==At)||(v=_t,f-=(d&&A===w&&w.visualViewport?w.visualViewport.width:A[T])-n.width,f*=l?1:-1)}var C,O=Object.assign({position:a},c&&ue),x=!0===h?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:Xt(e*n)/n||0,y:Xt(i*n)/n||0}}({x:f,y:g}):{x:f,y:g};return f=x.x,g=x.y,l?Object.assign({},O,((C={})[y]=b?\"0\":\"\",C[v]=_?\"0\":\"\",C.transform=(w.devicePixelRatio||1)<=1?\"translate(\"+f+\"px, \"+g+\"px)\":\"translate3d(\"+f+\"px, \"+g+\"px, 0)\",C)):Object.assign({},O,((e={})[y]=b?g+\"px\":\"\",e[v]=_?f+\"px\":\"\",e.transform=\"\",e))}const pe={name:\"computeStyles\",enabled:!0,phase:\"beforeWrite\",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Vt(e.placement),variation:de(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:\"fixed\"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,fe(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,fe(Object.assign({},c,{offsets:e.modifiersData.arrow,position:\"absolute\",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{\"data-popper-placement\":e.placement})},data:{}};var ge={passive:!0};const me={name:\"eventListeners\",enabled:!0,phase:\"write\",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener(\"scroll\",i.update,ge)})),a&&l.addEventListener(\"resize\",i.update,ge),function(){o&&c.forEach((function(t){t.removeEventListener(\"scroll\",i.update,ge)})),a&&l.removeEventListener(\"resize\",i.update,ge)}},data:{}};var _e={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function be(t){return t.replace(/left|right|bottom|top/g,(function(t){return _e[t]}))}var ve={start:\"end\",end:\"start\"};function ye(t){return t.replace(/start|end/g,(function(t){return ve[t]}))}function we(t){var e=Bt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(t){return Gt(ie(t)).left+we(t).scrollLeft}function Ee(t){var e=te(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Te(t){return[\"html\",\"body\",\"#document\"].indexOf(Wt(t))>=0?t.ownerDocument.body:zt(t)&&Ee(t)?t:Te(ne(t))}function Ce(t,e){var i;void 0===e&&(e=[]);var n=Te(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Bt(n),r=s?[o].concat(o.visualViewport||[],Ee(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ce(ne(r)))}function Oe(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function xe(t,e,i){return e===Tt?Oe(function(t,e){var i=Bt(t),n=ie(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=Ut();(c||!c&&\"fixed\"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Ae(t),y:l}}(t,i)):Ft(e)?function(t,e){var i=Gt(t,!1,\"fixed\"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Oe(function(t){var e,i=ie(t),n=we(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Kt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Kt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Ae(t),l=-n.scrollTop;return\"rtl\"===te(s||i).direction&&(a+=Kt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(ie(t)))}function ke(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?Vt(s):null,r=s?de(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case gt:e={x:a,y:i.y-n.height};break;case mt:e={x:a,y:i.y+i.height};break;case _t:e={x:i.x+i.width,y:l};break;case bt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?re(o):null;if(null!=c){var h=\"y\"===c?\"height\":\"width\";switch(r){case wt:e[c]=e[c]-(i[h]/2-n[h]/2);break;case At:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}function Le(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Et:a,c=i.rootBoundary,h=void 0===c?Tt:c,d=i.elementContext,u=void 0===d?Ct:d,f=i.altBoundary,p=void 0!==f&&f,g=i.padding,m=void 0===g?0:g,_=le(\"number\"!=typeof m?m:ce(m,yt)),b=u===Ct?Ot:Ct,v=t.rects.popper,y=t.elements[p?b:u],w=function(t,e,i,n){var s=\"clippingParents\"===e?function(t){var e=Ce(ne(t)),i=[\"absolute\",\"fixed\"].indexOf(te(t).position)>=0&&zt(t)?oe(t):t;return Ft(i)?e.filter((function(t){return Ft(t)&&Zt(t,i)&&\"body\"!==Wt(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=xe(t,i,n);return e.top=Kt(s.top,e.top),e.right=Qt(s.right,e.right),e.bottom=Qt(s.bottom,e.bottom),e.left=Kt(s.left,e.left),e}),xe(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(Ft(y)?y:y.contextElement||ie(t.elements.popper),l,h,r),A=Gt(t.elements.reference),E=ke({reference:A,element:v,strategy:\"absolute\",placement:s}),T=Oe(Object.assign({},v,E)),C=u===Ct?T:A,O={top:w.top-C.top+_.top,bottom:C.bottom-w.bottom+_.bottom,left:w.left-C.left+_.left,right:C.right-w.right+_.right},x=t.modifiersData.offset;if(u===Ct&&x){var k=x[s];Object.keys(O).forEach((function(t){var e=[_t,mt].indexOf(t)>=0?1:-1,i=[gt,mt].indexOf(t)>=0?\"y\":\"x\";O[t]+=k[i]*e}))}return O}function De(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?kt:l,h=de(n),d=h?a?xt:xt.filter((function(t){return de(t)===h})):yt,u=d.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=d);var f=u.reduce((function(e,i){return e[i]=Le(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[Vt(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}const Se={name:\"flip\",enabled:!0,phase:\"main\",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,h=i.boundary,d=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,_=Vt(m),b=l||(_!==m&&p?function(t){if(Vt(t)===vt)return[];var e=be(t);return[ye(t),e,ye(e)]}(m):[be(m)]),v=[m].concat(b).reduce((function(t,i){return t.concat(Vt(i)===vt?De(e,{placement:i,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)}),[]),y=e.rects.reference,w=e.rects.popper,A=new Map,E=!0,T=v[0],C=0;C<v.length;C++){var O=v[C],x=Vt(O),k=de(O)===wt,L=[gt,mt].indexOf(x)>=0,D=L?\"width\":\"height\",S=Le(e,{placement:O,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),I=L?k?_t:bt:k?mt:gt;y[D]>w[D]&&(I=be(I));var N=be(I),P=[];if(o&&P.push(S[x]<=0),a&&P.push(S[I]<=0,S[N]<=0),P.every((function(t){return t}))){T=O,E=!1;break}A.set(O,P)}if(E)for(var j=function(t){var e=v.find((function(e){var i=A.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return T=e,\"break\"},M=p?3:1;M>0&&\"break\"!==j(M);M--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:[\"offset\"],data:{_skip:!1}};function Ie(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Ne(t){return[gt,_t,mt,bt].some((function(e){return t[e]>=0}))}const Pe={name:\"hide\",enabled:!0,phase:\"main\",requiresIfExists:[\"preventOverflow\"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Le(e,{elementContext:\"reference\"}),a=Le(e,{altBoundary:!0}),l=Ie(r,n),c=Ie(a,s,o),h=Ne(l),d=Ne(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{\"data-popper-reference-hidden\":h,\"data-popper-escaped\":d})}},je={name:\"offset\",enabled:!0,phase:\"main\",requires:[\"popperOffsets\"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=kt.reduce((function(t,i){return t[i]=function(t,e,i){var n=Vt(t),s=[bt,gt].indexOf(n)>=0?-1:1,o=\"function\"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[bt,_t].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},Me={name:\"popperOffsets\",enabled:!0,phase:\"read\",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=ke({reference:e.rects.reference,element:e.rects.popper,strategy:\"absolute\",placement:e.placement})},data:{}},He={name:\"preventOverflow\",enabled:!0,phase:\"main\",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,d=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,g=void 0===p?0:p,m=Le(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),_=Vt(e.placement),b=de(e.placement),v=!b,y=re(_),w=\"x\"===y?\"y\":\"x\",A=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,C=\"function\"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,O=\"number\"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(A){if(o){var L,D=\"y\"===y?gt:bt,S=\"y\"===y?mt:_t,I=\"y\"===y?\"height\":\"width\",N=A[y],P=N+m[D],j=N-m[S],M=f?-T[I]/2:0,H=b===wt?E[I]:T[I],$=b===wt?-T[I]:-E[I],W=e.elements.arrow,B=f&&W?Jt(W):{width:0,height:0},F=e.modifiersData[\"arrow#persistent\"]?e.modifiersData[\"arrow#persistent\"].padding:{top:0,right:0,bottom:0,left:0},z=F[D],q=F[S],R=ae(0,E[I],B[I]),V=v?E[I]/2-M-R-z-O.mainAxis:H-R-z-O.mainAxis,K=v?-E[I]/2+M+R+q+O.mainAxis:$+R+q+O.mainAxis,Q=e.elements.arrow&&oe(e.elements.arrow),X=Q?\"y\"===y?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(L=null==x?void 0:x[y])?L:0,U=N+K-Y,G=ae(f?Qt(P,N+V-Y-X):P,N,f?Kt(j,U):j);A[y]=G,k[y]=G-N}if(a){var J,Z=\"x\"===y?gt:bt,tt=\"x\"===y?mt:_t,et=A[w],it=\"y\"===w?\"height\":\"width\",nt=et+m[Z],st=et-m[tt],ot=-1!==[gt,bt].indexOf(_),rt=null!=(J=null==x?void 0:x[w])?J:0,at=ot?nt:et-E[it]-T[it]-rt+O.altAxis,lt=ot?et+E[it]+T[it]-rt-O.altAxis:st,ct=f&&ot?function(t,e,i){var n=ae(t,e,i);return n>i?i:n}(at,et,lt):ae(f?at:nt,et,f?lt:st);A[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}},requiresIfExists:[\"offset\"]};function $e(t,e,i){void 0===i&&(i=!1);var n,s,o=zt(e),r=zt(e)&&function(t){var e=t.getBoundingClientRect(),i=Xt(e.width)/t.offsetWidth||1,n=Xt(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=ie(e),l=Gt(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&((\"body\"!==Wt(e)||Ee(a))&&(c=(n=e)!==Bt(n)&&zt(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:we(n)),zt(e)?((h=Gt(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=Ae(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function We(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Be={placement:\"bottom\",modifiers:[],strategy:\"absolute\"};function Fe(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&\"function\"==typeof t.getBoundingClientRect)}))}function ze(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?Be:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:\"bottom\",orderedModifiers:[],options:Object.assign({},Be,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var s=\"function\"==typeof i?i(a.options):i;d(),a.options=Object.assign({},o,a.options,s),a.scrollParents={reference:Ft(t)?Ce(t):t.contextElement?Ce(t.contextElement):[],popper:Ce(e)};var r,c,u=function(t){var e=We(t);return $t.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((r=[].concat(n,a.options.modifiers),c=r.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=u.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if(\"function\"==typeof s){var o=s({state:a,name:e,instance:h,options:n});l.push(o||function(){})}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(Fe(e,i)){a.rects={reference:$e(e,oe(i),\"fixed\"===a.options.strategy),popper:Jt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,d=s.name;\"function\"==typeof o&&(a=o({state:a,options:l,name:d,instance:h})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(s())}))}))),r}),destroy:function(){d(),c=!0}};if(!Fe(t,e))return h;function d(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),h}}var qe=ze(),Re=ze({defaultModifiers:[me,Me,pe,Rt]}),Ve=ze({defaultModifiers:[me,Me,pe,Rt,je,Se,He,he,Pe]});const Ke=Object.freeze(Object.defineProperty({__proto__:null,popperGenerator:ze,detectOverflow:Le,createPopperBase:qe,createPopper:Ve,createPopperLite:Re,top:gt,bottom:mt,right:_t,left:bt,auto:vt,basePlacements:yt,start:wt,end:At,clippingParents:Et,viewport:Tt,popper:Ct,reference:Ot,variationPlacements:xt,placements:kt,beforeRead:Lt,read:Dt,afterRead:St,beforeMain:It,main:Nt,afterMain:Pt,beforeWrite:jt,write:Mt,afterWrite:Ht,modifierPhases:$t,applyStyles:Rt,arrow:he,computeStyles:pe,eventListeners:me,flip:Se,hide:Pe,offset:je,popperOffsets:Me,preventOverflow:He},Symbol.toStringTag,{value:\"Module\"})),Qe=\"dropdown\",Xe=\"ArrowUp\",Ye=\"ArrowDown\",Ue=\"click.bs.dropdown.data-api\",Ge=\"keydown.bs.dropdown.data-api\",Je=\"show\",Ze='[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)',ti=`${Ze}.show`,ei=\".dropdown-menu\",ii=p()?\"top-end\":\"top-start\",ni=p()?\"top-start\":\"top-end\",si=p()?\"bottom-end\":\"bottom-start\",oi=p()?\"bottom-start\":\"bottom-end\",ri=p()?\"left-start\":\"right-start\",ai=p()?\"right-start\":\"left-start\",li={autoClose:!0,boundary:\"clippingParents\",display:\"dynamic\",offset:[0,2],popperConfig:null,reference:\"toggle\"},ci={autoClose:\"(boolean|string)\",boundary:\"(string|element)\",display:\"string\",offset:\"(array|string|function)\",popperConfig:\"(null|object|function)\",reference:\"(string|element|object)\"};class hi extends z{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Q.next(this._element,ei)[0]||Q.prev(this._element,ei)[0]||Q.findOne(ei,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return li}static get DefaultType(){return ci}static get NAME(){return Qe}toggle(){return this._isShown()?this.hide():this.show()}show(){if(l(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!P.trigger(this._element,\"show.bs.dropdown\",t).defaultPrevented){if(this._createPopper(),\"ontouchstart\"in document.documentElement&&!this._parent.closest(\".navbar-nav\"))for(const t of[].concat(...document.body.children))P.on(t,\"mouseover\",h);this._element.focus(),this._element.setAttribute(\"aria-expanded\",!0),this._menu.classList.add(Je),this._element.classList.add(Je),P.trigger(this._element,\"shown.bs.dropdown\",t)}}hide(){if(l(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!P.trigger(this._element,\"hide.bs.dropdown\",t).defaultPrevented){if(\"ontouchstart\"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,\"mouseover\",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(Je),this._element.classList.remove(Je),this._element.setAttribute(\"aria-expanded\",\"false\"),B.removeDataAttribute(this._menu,\"popper\"),P.trigger(this._element,\"hidden.bs.dropdown\",t)}}_getConfig(t){if(\"object\"==typeof(t=super._getConfig(t)).reference&&!o(t.reference)&&\"function\"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Qe.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);return t}_createPopper(){if(void 0===Ke)throw new TypeError(\"Bootstrap's dropdowns require Popper (https://popper.js.org)\");let t=this._element;\"parent\"===this._config.reference?t=this._parent:o(this._config.reference)?t=r(this._config.reference):\"object\"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Ve(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Je)}_getPlacement(){const t=this._parent;if(t.classList.contains(\"dropend\"))return ri;if(t.classList.contains(\"dropstart\"))return ai;if(t.classList.contains(\"dropup-center\"))return\"top\";if(t.classList.contains(\"dropdown-center\"))return\"bottom\";const e=\"end\"===getComputedStyle(this._menu).getPropertyValue(\"--bs-position\").trim();return t.classList.contains(\"dropup\")?e?ni:ii:e?oi:si}_detectNavbar(){return null!==this._element.closest(\".navbar\")}_getOffset(){const{offset:t}=this._config;return\"string\"==typeof t?t.split(\",\").map((t=>Number.parseInt(t,10))):\"function\"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:\"preventOverflow\",options:{boundary:this._config.boundary}},{name:\"offset\",options:{offset:this._getOffset()}}]};return(this._inNavbar||\"static\"===this._config.display)&&(B.setDataAttribute(this._menu,\"popper\",\"static\"),t.modifiers=[{name:\"applyStyles\",enabled:!1}]),{...t,...\"function\"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=Q.find(\".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)\",this._menu).filter((t=>a(t)));i.length&&b(i,e,t===Ye,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=hi.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===e[t])throw new TypeError(`No method named \"${t}\"`);e[t]()}}))}static clearMenus(t){if(2===t.button||\"keyup\"===t.type&&\"Tab\"!==t.key)return;const e=Q.find(ti);for(const i of e){const e=hi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||\"inside\"===e._config.autoClose&&!s||\"outside\"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&(\"keyup\"===t.type&&\"Tab\"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};\"click\"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=\"Escape\"===t.key,n=[Xe,Ye].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Ze)?this:Q.prev(this,Ze)[0]||Q.next(this,Ze)[0]||Q.findOne(Ze,t.delegateTarget.parentNode),o=hi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}P.on(document,Ge,Ze,hi.dataApiKeydownHandler),P.on(document,Ge,ei,hi.dataApiKeydownHandler),P.on(document,Ue,hi.clearMenus),P.on(document,\"keyup.bs.dropdown.data-api\",hi.clearMenus),P.on(document,Ue,Ze,(function(t){t.preventDefault(),hi.getOrCreateInstance(this).toggle()})),g(hi);const di=\".fixed-top, .fixed-bottom, .is-fixed, .sticky-top\",ui=\".sticky-top\",fi=\"padding-right\",pi=\"margin-right\";class gi{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,fi,(e=>e+t)),this._setElementAttributes(di,fi,(e=>e+t)),this._setElementAttributes(ui,pi,(e=>e-t))}reset(){this._resetElementAttributes(this._element,\"overflow\"),this._resetElementAttributes(this._element,fi),this._resetElementAttributes(di,fi),this._resetElementAttributes(ui,pi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,\"overflow\"),this._element.style.overflow=\"hidden\"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&B.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=B.getDataAttribute(t,e);null!==i?(B.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(o(t))e(t);else for(const i of Q.find(t,this._element))e(i)}}const mi=\"show\",_i=\"mousedown.bs.backdrop\",bi={className:\"modal-backdrop\",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:\"body\"},vi={className:\"string\",clickCallback:\"(function|null)\",isAnimated:\"boolean\",isVisible:\"boolean\",rootElement:\"(element|string)\"};class yi extends F{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return bi}static get DefaultType(){return vi}static get NAME(){return\"backdrop\"}show(t){if(!this._config.isVisible)return void m(t);this._append();const e=this._getElement();this._config.isAnimated&&d(e),e.classList.add(mi),this._emulateAnimation((()=>{m(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(mi),this._emulateAnimation((()=>{this.dispose(),m(t)}))):m(t)}dispose(){this._isAppended&&(P.off(this._element,_i),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement(\"div\");t.className=this._config.className,this._config.isAnimated&&t.classList.add(\"fade\"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=r(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),P.on(t,_i,(()=>{m(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){_(t,this._getElement(),this._config.isAnimated)}}const wi=\".bs.focustrap\",Ai=\"backward\",Ei={autofocus:!0,trapElement:null},Ti={autofocus:\"boolean\",trapElement:\"element\"};class Ci extends F{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ei}static get DefaultType(){return Ti}static get NAME(){return\"focustrap\"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),P.off(document,wi),P.on(document,\"focusin.bs.focustrap\",(t=>this._handleFocusin(t))),P.on(document,\"keydown.tab.bs.focustrap\",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,P.off(document,wi))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=Q.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Ai?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){\"Tab\"===t.key&&(this._lastTabNavDirection=t.shiftKey?Ai:\"forward\")}}const Oi=\"hidden.bs.modal\",xi=\"show.bs.modal\",ki=\"modal-open\",Li=\"show\",Di=\"modal-static\",Si={backdrop:!0,focus:!0,keyboard:!0},Ii={backdrop:\"(boolean|string)\",focus:\"boolean\",keyboard:\"boolean\"};class Ni extends z{constructor(t,e){super(t,e),this._dialog=Q.findOne(\".modal-dialog\",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new gi,this._addEventListeners()}static get Default(){return Si}static get DefaultType(){return Ii}static get NAME(){return\"modal\"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||P.trigger(this._element,xi,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(ki),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(P.trigger(this._element,\"hide.bs.modal\").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Li),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])P.off(t,\".bs.modal\");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new yi({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ci({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display=\"block\",this._element.removeAttribute(\"aria-hidden\"),this._element.setAttribute(\"aria-modal\",!0),this._element.setAttribute(\"role\",\"dialog\"),this._element.scrollTop=0;const e=Q.findOne(\".modal-body\",this._dialog);e&&(e.scrollTop=0),d(this._element),this._element.classList.add(Li),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,P.trigger(this._element,\"shown.bs.modal\",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){P.on(this._element,\"keydown.dismiss.bs.modal\",(t=>{if(\"Escape\"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),P.on(window,\"resize.bs.modal\",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),P.on(this._element,\"mousedown.dismiss.bs.modal\",(t=>{P.one(this._element,\"click.dismiss.bs.modal\",(e=>{this._element===t.target&&this._element===e.target&&(\"static\"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display=\"none\",this._element.setAttribute(\"aria-hidden\",!0),this._element.removeAttribute(\"aria-modal\"),this._element.removeAttribute(\"role\"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ki),this._resetAdjustments(),this._scrollBar.reset(),P.trigger(this._element,Oi)}))}_isAnimated(){return this._element.classList.contains(\"fade\")}_triggerBackdropTransition(){if(P.trigger(this._element,\"hidePrevented.bs.modal\").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;\"hidden\"===e||this._element.classList.contains(Di)||(t||(this._element.style.overflowY=\"hidden\"),this._element.classList.add(Di),this._queueCallback((()=>{this._element.classList.remove(Di),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=p()?\"paddingLeft\":\"paddingRight\";this._element.style[t]=`${e}px`}if(!i&&t){const t=p()?\"paddingRight\":\"paddingLeft\";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft=\"\",this._element.style.paddingRight=\"\"}static jQueryInterface(t,e){return this.each((function(){const i=Ni.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===i[t])throw new TypeError(`No method named \"${t}\"`);i[t](e)}}))}}P.on(document,\"click.bs.modal.data-api\",'[data-bs-toggle=\"modal\"]',(function(t){const e=n(this);[\"A\",\"AREA\"].includes(this.tagName)&&t.preventDefault(),P.one(e,xi,(t=>{t.defaultPrevented||P.one(e,Oi,(()=>{a(this)&&this.focus()}))}));const i=Q.findOne(\".modal.show\");i&&Ni.getInstance(i).hide(),Ni.getOrCreateInstance(e).toggle(this)})),q(Ni),g(Ni);const Pi=\"show\",ji=\"showing\",Mi=\"hiding\",Hi=\".offcanvas.show\",$i=\"hidePrevented.bs.offcanvas\",Wi=\"hidden.bs.offcanvas\",Bi={backdrop:!0,keyboard:!0,scroll:!1},Fi={backdrop:\"(boolean|string)\",keyboard:\"boolean\",scroll:\"boolean\"};class zi extends z{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Bi}static get DefaultType(){return Fi}static get NAME(){return\"offcanvas\"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||P.trigger(this._element,\"show.bs.offcanvas\",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new gi).hide(),this._element.setAttribute(\"aria-modal\",!0),this._element.setAttribute(\"role\",\"dialog\"),this._element.classList.add(ji),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Pi),this._element.classList.remove(ji),P.trigger(this._element,\"shown.bs.offcanvas\",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(P.trigger(this._element,\"hide.bs.offcanvas\").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Mi),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Pi,Mi),this._element.removeAttribute(\"aria-modal\"),this._element.removeAttribute(\"role\"),this._config.scroll||(new gi).reset(),P.trigger(this._element,Wi)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new yi({className:\"offcanvas-backdrop\",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{\"static\"!==this._config.backdrop?this.hide():P.trigger(this._element,$i)}:null})}_initializeFocusTrap(){return new Ci({trapElement:this._element})}_addEventListeners(){P.on(this._element,\"keydown.dismiss.bs.offcanvas\",(t=>{\"Escape\"===t.key&&(this._config.keyboard?this.hide():P.trigger(this._element,$i))}))}static jQueryInterface(t){return this.each((function(){const e=zi.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===e[t]||t.startsWith(\"_\")||\"constructor\"===t)throw new TypeError(`No method named \"${t}\"`);e[t](this)}}))}}P.on(document,\"click.bs.offcanvas.data-api\",'[data-bs-toggle=\"offcanvas\"]',(function(t){const e=n(this);if([\"A\",\"AREA\"].includes(this.tagName)&&t.preventDefault(),l(this))return;P.one(e,Wi,(()=>{a(this)&&this.focus()}));const i=Q.findOne(Hi);i&&i!==e&&zi.getInstance(i).hide(),zi.getOrCreateInstance(e).toggle(this)})),P.on(window,\"load.bs.offcanvas.data-api\",(()=>{for(const t of Q.find(Hi))zi.getOrCreateInstance(t).show()})),P.on(window,\"resize.bs.offcanvas\",(()=>{for(const t of Q.find(\"[aria-modal][class*=show][class*=offcanvas-]\"))\"fixed\"!==getComputedStyle(t).position&&zi.getOrCreateInstance(t).hide()})),q(zi),g(zi);const qi=new Set([\"background\",\"cite\",\"href\",\"itemtype\",\"longdesc\",\"poster\",\"src\",\"xlink:href\"]),Ri=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Vi=/^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i,Ki=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!qi.has(i)||Boolean(Ri.test(t.nodeValue)||Vi.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Qi={\"*\":[\"class\",\"dir\",\"id\",\"lang\",\"role\",/^aria-[\\w-]*$/i],a:[\"target\",\"href\",\"title\",\"rel\"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:[\"src\",\"srcset\",\"alt\",\"title\",\"width\",\"height\"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Xi={allowList:Qi,content:{},extraClass:\"\",html:!1,sanitize:!0,sanitizeFn:null,template:\"<div></div>\"},Yi={allowList:\"object\",content:\"object\",extraClass:\"(string|function)\",html:\"boolean\",sanitize:\"boolean\",sanitizeFn:\"(null|function)\",template:\"string\"},Ui={entry:\"(string|element|function|null)\",selector:\"(string|element)\"};class Gi extends F{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Xi}static get DefaultType(){return Yi}static get NAME(){return\"TemplateFactory\"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement(\"div\");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(\" \")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Ui)}_setContent(t,e,i){const n=Q.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?o(e)?this._putElementInTemplate(r(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&\"function\"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,\"text/html\"),s=[].concat(...n.body.querySelectorAll(\"*\"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e[\"*\"]||[],e[i]||[]);for(const e of n)Ki(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return\"function\"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML=\"\",void e.append(t);e.textContent=t.textContent}}const Ji=new Set([\"sanitize\",\"allowList\",\"sanitizeFn\"]),Zi=\"fade\",tn=\"show\",en=\".modal\",nn=\"hide.bs.modal\",sn=\"hover\",on=\"focus\",rn={AUTO:\"auto\",TOP:\"top\",RIGHT:p()?\"left\":\"right\",BOTTOM:\"bottom\",LEFT:p()?\"right\":\"left\"},an={allowList:Qi,animation:!0,boundary:\"clippingParents\",container:!1,customClass:\"\",delay:0,fallbackPlacements:[\"top\",\"right\",\"bottom\",\"left\"],html:!1,offset:[0,0],placement:\"top\",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',title:\"\",trigger:\"hover focus\"},ln={allowList:\"object\",animation:\"boolean\",boundary:\"(string|element)\",container:\"(string|element|boolean)\",customClass:\"(string|function)\",delay:\"(number|object)\",fallbackPlacements:\"array\",html:\"boolean\",offset:\"(array|string|function)\",placement:\"(string|function)\",popperConfig:\"(null|object|function)\",sanitize:\"boolean\",sanitizeFn:\"(null|function)\",selector:\"(string|boolean)\",template:\"string\",title:\"(string|element|function)\",trigger:\"string\"};class cn extends z{constructor(t,e){if(void 0===Ke)throw new TypeError(\"Bootstrap's tooltips require Popper (https://popper.js.org)\");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return an}static get DefaultType(){return ln}static get NAME(){return\"tooltip\"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),P.off(this._element.closest(en),nn,this._hideModalHandler),this.tip&&this.tip.remove(),this._element.getAttribute(\"data-bs-original-title\")&&this._element.setAttribute(\"title\",this._element.getAttribute(\"data-bs-original-title\")),this._disposePopper(),super.dispose()}show(){if(\"none\"===this._element.style.display)throw new Error(\"Please use show on visible elements\");if(!this._isWithContent()||!this._isEnabled)return;const t=P.trigger(this._element,this.constructor.eventName(\"show\")),e=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const i=this._getTipElement();this._element.setAttribute(\"aria-describedby\",i.getAttribute(\"id\"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),P.trigger(this._element,this.constructor.eventName(\"inserted\"))),this._popper?this._popper.update():this._popper=this._createPopper(i),i.classList.add(tn),\"ontouchstart\"in document.documentElement)for(const t of[].concat(...document.body.children))P.on(t,\"mouseover\",h);this._queueCallback((()=>{P.trigger(this._element,this.constructor.eventName(\"shown\")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(P.trigger(this._element,this.constructor.eventName(\"hide\")).defaultPrevented)return;const t=this._getTipElement();if(t.classList.remove(tn),\"ontouchstart\"in document.documentElement)for(const t of[].concat(...document.body.children))P.off(t,\"mouseover\",h);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||t.remove(),this._element.removeAttribute(\"aria-describedby\"),P.trigger(this._element,this.constructor.eventName(\"hidden\")),this._disposePopper())}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Zi,tn),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute(\"id\",i),this._isAnimated()&&e.classList.add(Zi),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Gi({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{\".tooltip-inner\":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute(\"data-bs-original-title\")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Zi)}_isShown(){return this.tip&&this.tip.classList.contains(tn)}_createPopper(t){const e=\"function\"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=rn[e.toUpperCase()];return Ve(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return\"string\"==typeof t?t.split(\",\").map((t=>Number.parseInt(t,10))):\"function\"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return\"function\"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:\"flip\",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:\"offset\",options:{offset:this._getOffset()}},{name:\"preventOverflow\",options:{boundary:this._config.boundary}},{name:\"arrow\",options:{element:`.${this.constructor.NAME}-arrow`}},{name:\"preSetPlacement\",enabled:!0,phase:\"beforeMain\",fn:t=>{this._getTipElement().setAttribute(\"data-popper-placement\",t.state.placement)}}]};return{...e,...\"function\"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(\" \");for(const e of t)if(\"click\"===e)P.on(this._element,this.constructor.eventName(\"click\"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(\"manual\"!==e){const t=e===sn?this.constructor.eventName(\"mouseenter\"):this.constructor.eventName(\"focusin\"),i=e===sn?this.constructor.eventName(\"mouseleave\"):this.constructor.eventName(\"focusout\");P.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[\"focusin\"===t.type?on:sn]=!0,e._enter()})),P.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[\"focusout\"===t.type?on:sn]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},P.on(this._element.closest(en),nn,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute(\"title\");t&&(this._element.getAttribute(\"aria-label\")||this._element.textContent.trim()||this._element.setAttribute(\"aria-label\",t),this._element.setAttribute(\"data-bs-original-title\",t),this._element.removeAttribute(\"title\"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=B.getDataAttributes(this._element);for(const t of Object.keys(e))Ji.has(t)&&delete e[t];return t={...e,...\"object\"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:r(t.container),\"number\"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),\"number\"==typeof t.title&&(t.title=t.title.toString()),\"number\"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger=\"manual\",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=cn.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===e[t])throw new TypeError(`No method named \"${t}\"`);e[t]()}}))}}g(cn);const hn={...cn.Default,content:\"\",offset:[0,8],placement:\"right\",template:'<div class=\"popover\" role=\"tooltip\"><div class=\"popover-arrow\"></div><h3 class=\"popover-header\"></h3><div class=\"popover-body\"></div></div>',trigger:\"click\"},dn={...cn.DefaultType,content:\"(null|string|element|function)\"};class un extends cn{static get Default(){return hn}static get DefaultType(){return dn}static get NAME(){return\"popover\"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{\".popover-header\":this._getTitle(),\".popover-body\":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=un.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===e[t])throw new TypeError(`No method named \"${t}\"`);e[t]()}}))}}g(un);const fn=\"click.bs.scrollspy\",pn=\"active\",gn=\"[href]\",mn={offset:null,rootMargin:\"0px 0px -25%\",smoothScroll:!1,target:null,threshold:[.1,.5,1]},_n={offset:\"(number|null)\",rootMargin:\"string\",smoothScroll:\"boolean\",target:\"element\",threshold:\"array\"};class bn extends z{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=\"visible\"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return mn}static get DefaultType(){return _n}static get NAME(){return\"scrollspy\"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=r(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,\"string\"==typeof t.threshold&&(t.threshold=t.threshold.split(\",\").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(P.off(this._config.target,fn),P.on(this._config.target,fn,gn,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:\"smooth\"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Q.find(gn,this._config.target);for(const e of t){if(!e.hash||l(e))continue;const t=Q.findOne(e.hash,this._element);a(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(pn),this._activateParents(t),P.trigger(this._element,\"activate.bs.scrollspy\",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(\"dropdown-item\"))Q.findOne(\".dropdown-toggle\",t.closest(\".dropdown\")).classList.add(pn);else for(const e of Q.parents(t,\".nav, .list-group\"))for(const t of Q.prev(e,\".nav-link, .nav-item > .nav-link, .list-group-item\"))t.classList.add(pn)}_clearActiveClass(t){t.classList.remove(pn);const e=Q.find(\"[href].active\",t);for(const t of e)t.classList.remove(pn)}static jQueryInterface(t){return this.each((function(){const e=bn.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===e[t]||t.startsWith(\"_\")||\"constructor\"===t)throw new TypeError(`No method named \"${t}\"`);e[t]()}}))}}P.on(window,\"load.bs.scrollspy.data-api\",(()=>{for(const t of Q.find('[data-bs-spy=\"scroll\"]'))bn.getOrCreateInstance(t)})),g(bn);const vn=\"ArrowLeft\",yn=\"ArrowRight\",wn=\"ArrowUp\",An=\"ArrowDown\",En=\"active\",Tn=\"fade\",Cn=\"show\",On='[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]',xn=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role=\"tab\"]:not(.dropdown-toggle), ${On}`;class kn extends z{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role=\"tablist\"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),P.on(this._element,\"keydown.bs.tab\",(t=>this._keydown(t))))}static get NAME(){return\"tab\"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?P.trigger(e,\"hide.bs.tab\",{relatedTarget:t}):null;P.trigger(t,\"show.bs.tab\",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(En),this._activate(n(t)),this._queueCallback((()=>{\"tab\"===t.getAttribute(\"role\")?(t.removeAttribute(\"tabindex\"),t.setAttribute(\"aria-selected\",!0),this._toggleDropDown(t,!0),P.trigger(t,\"shown.bs.tab\",{relatedTarget:e})):t.classList.add(Cn)}),t,t.classList.contains(Tn)))}_deactivate(t,e){t&&(t.classList.remove(En),t.blur(),this._deactivate(n(t)),this._queueCallback((()=>{\"tab\"===t.getAttribute(\"role\")?(t.setAttribute(\"aria-selected\",!1),t.setAttribute(\"tabindex\",\"-1\"),this._toggleDropDown(t,!1),P.trigger(t,\"hidden.bs.tab\",{relatedTarget:e})):t.classList.remove(Cn)}),t,t.classList.contains(Tn)))}_keydown(t){if(![vn,yn,wn,An].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[yn,An].includes(t.key),i=b(this._getChildren().filter((t=>!l(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),kn.getOrCreateInstance(i).show())}_getChildren(){return Q.find(xn,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,\"role\",\"tablist\");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute(\"aria-selected\",e),i!==t&&this._setAttributeIfNotExists(i,\"role\",\"presentation\"),e||t.setAttribute(\"tabindex\",\"-1\"),this._setAttributeIfNotExists(t,\"role\",\"tab\"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=n(t);e&&(this._setAttributeIfNotExists(e,\"role\",\"tabpanel\"),t.id&&this._setAttributeIfNotExists(e,\"aria-labelledby\",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains(\"dropdown\"))return;const n=(t,n)=>{const s=Q.findOne(t,i);s&&s.classList.toggle(n,e)};n(\".dropdown-toggle\",En),n(\".dropdown-menu\",Cn),i.setAttribute(\"aria-expanded\",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(En)}_getInnerElement(t){return t.matches(xn)?t:Q.findOne(xn,t)}_getOuterElement(t){return t.closest(\".nav-item, .list-group-item\")||t}static jQueryInterface(t){return this.each((function(){const e=kn.getOrCreateInstance(this);if(\"string\"==typeof t){if(void 0===e[t]||t.startsWith(\"_\")||\"constructor\"===t)throw new TypeError(`No method named \"${t}\"`);e[t]()}}))}}P.on(document,\"click.bs.tab\",On,(function(t){[\"A\",\"AREA\"].includes(this.tagName)&&t.preventDefault(),l(this)||kn.getOrCreateInstance(this).show()})),P.on(window,\"load.bs.tab\",(()=>{for(const t of Q.find('.active[data-bs-toggle=\"tab\"], .active[data-bs-toggle=\"pill\"], .active[data-bs-toggle=\"list\"]'))kn.getOrCreateInstance(t)})),g(kn);const Ln=\"hide\",Dn=\"show\",Sn=\"showing\",In={animation:\"boolean\",autohide:\"boolean\",delay:\"number\"},Nn={animation:!0,autohide:!0,delay:5e3};class Pn extends z{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Nn}static get DefaultType(){return In}static get NAME(){return\"toast\"}show(){P.trigger(this._element,\"show.bs.toast\").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add(\"fade\"),this._element.classList.remove(Ln),d(this._element),this._element.classList.add(Dn,Sn),this._queueCallback((()=>{this._element.classList.remove(Sn),P.trigger(this._element,\"shown.bs.toast\"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(P.trigger(this._element,\"hide.bs.toast\").defaultPrevented||(this._element.classList.add(Sn),this._queueCallback((()=>{this._element.classList.add(Ln),this._element.classList.remove(Sn,Dn),P.trigger(this._element,\"hidden.bs.toast\")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Dn),super.dispose()}isShown(){return this._element.classList.contains(Dn)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case\"mouseover\":case\"mouseout\":this._hasMouseInteraction=e;break;case\"focusin\":case\"focusout\":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){P.on(this._element,\"mouseover.bs.toast\",(t=>this._onInteraction(t,!0))),P.on(this._element,\"mouseout.bs.toast\",(t=>this._onInteraction(t,!1))),P.on(this._element,\"focusin.bs.toast\",(t=>this._onInteraction(t,!0))),P.on(this._element,\"focusout.bs.toast\",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Pn.getOrCreateInstance(this,t);if(\"string\"==typeof t){if(void 0===e[t])throw new TypeError(`No method named \"${t}\"`);e[t](this)}}))}}return q(Pn),g(Pn),{Alert:R,Button:K,Carousel:at,Collapse:pt,Dropdown:hi,Modal:Ni,Offcanvas:zi,Popover:un,ScrollSpy:bn,Tab:kn,Toast:Pn,Tooltip:cn}}));\n//# sourceMappingURL=bootstrap.bundle.min.js.map\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Amplitude\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Amplitude\"] = factory();\n\telse\n\t\troot[\"Amplitude\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 47);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _package = __webpack_require__(59);\n\nmodule.exports = {\n version: _package.version,\n\n audio: new Audio(),\n\n active_metadata: {},\n\n active_album: \"\",\n\n active_index: 0,\n\n active_playlist: null,\n\n playback_speed: 1.0,\n\n callbacks: {},\n\n songs: [],\n\n playlists: {},\n\n start_song: \"\",\n\n starting_playlist: \"\",\n\n starting_playlist_song: \"\",\n\n repeat: false,\n\n repeat_song: false,\n\n shuffle_list: {},\n\n shuffle_on: false,\n\n default_album_art: \"\",\n\n default_playlist_art: \"\",\n\n debug: false,\n\n volume: 0.5,\n\n pre_mute_volume: 0.5,\n\n volume_increment: 5,\n\n volume_decrement: 5,\n\n soundcloud_client: \"\",\n\n soundcloud_use_art: false,\n\n soundcloud_song_count: 0,\n\n soundcloud_songs_ready: 0,\n\n is_touch_moving: false,\n\n buffered: 0,\n\n bindings: {},\n\n continue_next: true,\n\n delay: 0,\n\n player_state: \"stopped\",\n\n web_audio_api_available: false,\n\n context: null,\n\n source: null,\n\n analyser: null,\n\n visualizations: {\n available: [],\n\n active: [],\n\n backup: \"\"\n },\n\n waveforms: {\n sample_rate: 100,\n\n built: []\n }\n}; /**\n * These variables make Amplitude run. The config is the most important\n * containing active settings and parameters.\n *\n * The config JSON is the global settings for ALL of Amplitude functions.\n * This is global and contains all of the user preferences. The default\n * settings are set, and the user overwrites them when they initialize\n * Amplitude.\n *\n * @module config\n * @type {object}\n * @property {string} \tconfig.version \t\t\t\t- The current version of AmplitudeJS.\n * @property {object} \tconfig.audio \t\t \t\t\t\t\t\t\t\t-\tHandles all of the audio.\n * @property {object} \tconfig.active_metadata\t\t\t\t\t- Contains the active metadata for the song.\n * @property {string} \tconfig.active_album\t\t\t\t\t\t\t- Holds the active album name. Used to check and see if the album changed and run the album changed callback.\n * @property {number} \tconfig.active_index\t\t\t\t\t\t\t- Contains the index of the actively playing song.\n * @property {string} \tconfig.active_playlist\t\t\t\t\t- Contains the key to the active playlist index.\n * @property {number} \tconfig.playback_speed\t\t\t\t\t\t- Sets the initial playback speed of the song. The values for this can be 1.0, 1.5, 2.0\n * @property {object} \tconfig.callbacks\t\t\t\t\t\t\t\t- The user can pass a JSON object with a key => value store of callbacks to be run at certain events.\n * @property {array} \t\tconfig.songs\t\t\t\t\t\t\t\t\t\t- Contains all of the songs the user has passed to Amplitude to use.\n * @property {object} \tconfig.playlists\t\t\t\t\t\t\t\t- Contains all of the playlists the user created.\n * @property {object} \tconfig.start_song \t\t\t\t\t\t\t- The index of the song that AmplitudeJS should start with.\n * @property {string} \tconfig.starting_playlist \t\t\t\t- The starting playlist the player will intiialize to.\n * @property {string} \tconfig.starting_playlist_song \t- The index of the song in the playlist that should be started.\n * @property {boolean} \tconfig.repeat \t\t\t\t\t\t\t\t\t- When repeat is on, when the song ends the song will replay itself.\n * @property {object} \tconfig.shuffle_list\t\t\t\t\t\t\t- When shuffled, gets populated with the songs the user provided in a random order.\n * @property {boolean} \tconfig.shuffle_on\t\t\t\t\t\t\t\t- When on, gets set to true so when traversing through songs, AmplitudeJS knows whether or not to use the songs object or the shuffle_list\n * @property {string}\t\tconfig.default_album_art \t\t\t\t- The user can set default album art to be displayed if the song they set doesn't contain album art.\n * @property {string} \tconfig.default_playlist_art \t\t- The user can set default playlist art to be displayed if the playlist they are setting meta data for doesn't contain an art picture.\n * @property {boolean} \tconfig.debug\t\t\t\t\t\t\t\t\t\t- When set to true, AmplitudeJS will print to the console any errors providing helpful feedback to the user.\n * @property {number} \tconfig.volume \t\t\t\t\t\t\t\t\t- The user can set the initial volume to a number between 0 and 1 over-riding the default of .5\n * @property {number} \tconfig.pre_mute_volume \t\t\t\t\t- This is set on mute so that when a user un-mutes AmplitudeJS knows what to restore the volume to.\n * @property {number}\t\tconfig.volume_increment \t\t\t\t- The default values are an integer between 1 and 100 for how much the volume should increase when the user presses the volume up button.\n * @property {number}\t\tconfig.volume_decrement \t\t\t\t- The default values are an integer between 1 and 100 for how much the volume should decrease when the user presses the volume down button.\n * @property {string} \tconfig.soundcloud_client \t\t\t\t- When using SoundCloud, the user will have to provide their API Client ID\n * @property {boolean} \tconfig.soundcloud_use_art \t\t\t- The user can set this to true and AmplitudeJS will use the album art for the song returned from the Soundcloud API\n * @property {number} \tconfig.soundcloud_song_count \t\t- Used on config to count how many songs are from Soundcloud and compare it to how many are ready for when to move to the rest of the configuration\n * @property {number} \tconfig.soundcloud_songs_ready \t- Used on config to count how many songs are ready so when we get all of the data from the SoundCloud API that we need this should match the SoundCloud song count meaning we can move to the rest of the config.\n * @property {integer}\tconfig.is_touch_moving \t\t\t\t\t- Flag for if the user is moving the screen.\n * @property {boolean}\tconfig.buffered\t\t\t\t\t\t\t\t\t- How much of the song is buffered.\n * @property {object} \tconfig.bindings\t\t\t\t\t\t\t\t\t- Array of bindings to certain key events.\n * @property {boolean} \tconfig.continue_next \t\t\t\t\t\t- Determines when a song ends, we should continue to the next song.\n * @property {number} config.delay \t\t\t\t\t\t\t\t\t\t- Sets the delay between songs in MS.\n * @property {boolean} config.use_web_audio_api \t\t\t\t- Flag that determines if the user wants to use Web Audio API Components.\n * @property {boolean} config.web_audio_api_available - Flag that determines if the Web Audio API is available.\n * @property {object} \tconfig.context \t\t\t\t\t\t\t\t\t- Web Audio API Context\n * @property {object}\t\tconfig.source \t\t\t\t\t\t\t\t\t- Web Audio API Source\n * @property {object} \tconfig.analyser \t\t\t\t\t\t\t\t- Web Audio API Analyser\n * @property {string}\t\tconfig.player_state \t\t\t\t\t\t- The current state of the player.\n */\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nvar _metaDataElements = __webpack_require__(7);\n\nvar _metaDataElements2 = _interopRequireDefault(_metaDataElements);\n\nvar _callbacks = __webpack_require__(9);\n\nvar _callbacks2 = _interopRequireDefault(_callbacks);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nvar _visualizations = __webpack_require__(16);\n\nvar _visualizations2 = _interopRequireDefault(_visualizations);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Interacts directly with native functions of the Audio element. Logic\n * leading up to these methods are handled by click handlers which call\n * helpers and visual synchronizers. These are the core functions of AmplitudeJS.\n * Every other function that leads to these prepare the information to be\n * acted upon by these functions.\n *\n * @module core/Core\n */\n\n\n/**\n * Import the Visualizations from the FX module.\n * @module fx/visualizations\n */\n\n\n/**\n * Imports AmplitudeJS Callback Utility\n * @module utilities/callbacks\n */\n\n\n/**\n * Imports the Play/Pause Visual Elements module.\n * @module visual/playPauseElements\n */\n\n\n/**\n * Imports the Checks module.\n * @module utilities/checks\n */\nvar Core = function () {\n /**\n * Plays the active song. If the current song is live, it reconnects\n * the stream before playing.\n *\n * Public Accessor: Amplitude.play()\n *\n * @access public\n */\n function play() {\n _visualizations2.default.stop();\n _visualizations2.default.run();\n\n /*\n If the audio is live we re-conenct the stream.\n */\n if (_config2.default.active_metadata.live) {\n reconnectStream();\n }\n\n /*\n Mobile remote sources need to be reconnected on play. I think this is\n because mobile browsers are optimized not to load all resources\n for speed reasons. We only do this if mobile and the paused button\n is not clicked. If the pause button was clicked then we don't reconnect\n or the user will lose their place in the stream.\n */\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && !_config2.default.paused) {\n reconnectStream();\n }\n\n /*\n Play the song and set the playback rate to the playback\n speed.\n */\n var playPromise = _config2.default.audio.play();\n\n if (playPromise !== undefined) {\n playPromise.then(function (_) {}).catch(function (error) {});\n }\n _config2.default.audio.play();\n _config2.default.audio.playbackRate = _config2.default.playback_speed;\n\n /*\n Sets the state of the player.\n */\n _configState2.default.setPlayerState();\n }\n\n /**\n * Pauses the active song. If it's live, it disconnects the stream.\n *\n * Public Accessor: Amplitude.pause()\n *\n * @access public\n */\n function pause() {\n _visualizations2.default.stop();\n\n /*\n Pause the active song.\n */\n _config2.default.audio.pause();\n\n /*\n Flag that pause button was clicked.\n */\n _config2.default.paused = true;\n\n /*\n If the song is live, we disconnect the stream so we aren't\n saving it to memory.\n */\n if (_config2.default.active_metadata.live) {\n disconnectStream();\n }\n\n /*\n Sets the state of the player.\n */\n _configState2.default.setPlayerState();\n }\n\n /**\n * Stops the active song by setting the current song time to 0.\n * When the user resumes, it will be from the beginning.\n * If it's a live stream it disconnects.\n *\n * Public Accessor: Amplitude.stop()\n *\n * @access public\n */\n function stop() {\n _visualizations2.default.stop();\n\n /*\n Set the current time of the song to 0 which will reset the song.\n */\n if (_config2.default.audio.currentTime != 0) {\n _config2.default.audio.currentTime = 0;\n }\n\n /*\n Run pause so the song will stop\n */\n _config2.default.audio.pause();\n\n /*\n If the song is live, disconnect the stream.\n */\n if (_config2.default.active_metadata.live) {\n disconnectStream();\n }\n\n /*\n Sets the state of the player.\n */\n _configState2.default.setPlayerState();\n\n /*\n Run the stop callback\n */\n _callbacks2.default.run(\"stop\");\n }\n\n /**\n * Sets the song volume.\n *\n * Public Accessor: Amplitude.setVolume( volumeLevel )\n *\n * @access public\n * @param {number} volumeLevel - A number between 1 and 100 as a percentage of\n * min to max for a volume level.\n */\n function setVolume(volumeLevel) {\n /*\n If the volume is set to mute somewhere else, we sync the display.\n */\n if (volumeLevel == 0) {\n _config2.default.audio.muted = true;\n } else {\n _config2.default.audio.muted = false;\n }\n\n /*\n Sets the volume in the config so we can reference it later on.\n */\n _config2.default.volume = volumeLevel;\n\n /*\n Set the volume of the active song.\n */\n _config2.default.audio.volume = volumeLevel / 100;\n }\n\n /**\n * Sets the song percentage. If it's a live song, we ignore this because\n * we can't skip ahead. This is an issue if you have a playlist with\n * a live source.\n *\n * Public Accessor: Amplitude.setSongLocation( songPercentage )\n *\n * @access public\n * @param {number} songPercentage - A number between 1 and 100 as a percentage of song completion.\n */\n function setSongLocation(songPercentage) {\n /*\n As long as the song is not live, we can set the current time of the\n song to the percentage the user passed in.\n */\n if (!_config2.default.active_metadata.live) {\n _config2.default.audio.currentTime = _config2.default.audio.duration * (songPercentage / 100);\n }\n }\n\n /**\n * Skips to a location in a song\n *\n * Public Accessor: Amplitude.skipToLocation( seconds )\n *\n * @access public\n * @param {number} seconds - An integer containing the seconds to skip to\n */\n function skipToLocation(seconds) {\n /*\n When the active song can be played through, we can check to\n see if the seconds will work. We only bind the event handler\n once and remove it once it's fired.\n */\n _config2.default.audio.addEventListener(\"canplaythrough\", function () {\n /*\n If the active song duration is greater than or equal to the\n amount of seconds the user wants to skip to and the seconds\n is greater than 0, we skip to the seconds defined.\n */\n if (_config2.default.audio.duration >= seconds && seconds > 0) {\n _config2.default.audio.currentTime = seconds;\n } else {\n _debug2.default.writeMessage(\"Amplitude can't skip to a location greater than the duration of the audio or less than 0\");\n }\n }, { once: true });\n }\n\n /**\n * Disconnects the live stream\n *\n * Public Accessor: Amplitude.disconnectStream()\n *\n * @access public\n */\n function disconnectStream() {\n _config2.default.audio.src = \"\";\n _config2.default.audio.load();\n }\n\n /**\n * Reconnects the live stream\n *\n * Public Accessor: Amplitude.reconnectStream()\n *\n * @access public\\\n */\n function reconnectStream() {\n _config2.default.audio.src = _config2.default.active_metadata.url;\n _config2.default.audio.load();\n }\n\n /**\n * Sets the playback speed for the song.\n *\n * @param {number} playbackSpeed The speed we want the song to play back at.\n */\n function setPlaybackSpeed(playbackSpeed) {\n /*\n Set the config playback speed.\n */\n _config2.default.playback_speed = playbackSpeed;\n\n /*\n Set the active song playback rate.\n */\n _config2.default.audio.playbackRate = _config2.default.playback_speed;\n }\n\n /*\n Return publically facing functions\n */\n return {\n play: play,\n pause: pause,\n stop: stop,\n setVolume: setVolume,\n setSongLocation: setSongLocation,\n skipToLocation: skipToLocation,\n disconnectStream: disconnectStream,\n reconnectStream: reconnectStream,\n setPlaybackSpeed: setPlaybackSpeed\n };\n}();\n\n/**\n * Import the Config State module.\n * @module utilities/configState\n */\n\n\n/**\n * Imports AmplitudeJS Debug Utility\n * @module utilities/debug\n */\n\n\n/**\n * Imports the Meta Data Visual Elements module.\n * @module visual/metaDataElements\n */\n\n\n/**\n * Imports the Audio Navigation module.\n * @module utilities/audioNavigation\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = Core;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Defines the visual representation of AmplitudeJS play pause elements.\n * @module visual/PlayPauseElements\n */\nvar PlayPauseElements = function () {\n /**\n * Syncs all play pause elements.\n *\n * @access public\n */\n function sync() {\n syncGlobal();\n syncPlaylist();\n syncSong();\n syncSongInPlaylist();\n }\n\n /**\n * Syncs the global play pause buttons to the state of the active song.\n *\n * @access public\n */\n function syncGlobal() {\n /*\n Get the active song state.\n */\n var state = _config2.default.audio.paused ? \"paused\" : \"playing\";\n\n /*\n Get all play pause buttons.\n */\n var playPauseElements = document.querySelectorAll(\".amplitude-play-pause\");\n\n /*\n Iterate over all of the play pause elements syncing the\n display visually.\n */\n for (var i = 0; i < playPauseElements.length; i++) {\n /*\n Grab the playlist and song attributes from the element.\n */\n var playlist = playPauseElements[i].getAttribute(\"data-amplitude-playlist\");\n var song = playPauseElements[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n This method is responsible for only the global elements,\n so we make sure there are no playlist or songs defined on\n the element.\n */\n if (playlist == null && song == null) {\n /*\n Determines what classes we should add and remove\n from the elements.\n */\n switch (state) {\n case \"playing\":\n setElementPlay(playPauseElements[i]);\n break;\n case \"paused\":\n setElementPause(playPauseElements[i]);\n break;\n }\n }\n }\n }\n\n /**\n * Syncs the main playlist play pause buttons to the state of the active song.\n *\n * @access public\n */\n function syncPlaylist() {\n var state = _config2.default.audio.paused ? \"paused\" : \"playing\";\n\n /*\n Get all of the main playlist play pause elements\n */\n var playlistPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Iterate over the play pause elements, syncing the state accordingly.\n */\n for (var i = 0; i < playlistPlayPauseElements.length; i++) {\n /*\n Grab the song attributes from the element.\n */\n var song = playlistPlayPauseElements[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n We want only the play pause elements for the main on a\n playlist nothing else. We have another method for the\n song in playlist play pause method.\n */\n if (song == null) {\n /*\n Determines what classes we should add and remove\n from the elements.\n */\n switch (state) {\n case \"playing\":\n setElementPlay(playlistPlayPauseElements[i]);\n break;\n case \"paused\":\n setElementPause(playlistPlayPauseElements[i]);\n break;\n }\n }\n }\n }\n\n /**\n * Syncs the song play pause buttons to the state of the active song.\n *\n * @access public\n */\n function syncSong() {\n var state = _config2.default.audio.paused ? \"paused\" : \"playing\";\n\n /*\n Get all of the individual song play pause buttons. These have an\n amplitude-song-index that matches the active index attribute.\n */\n var songPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n /*\n Iterate over all of the song play pause elements\n */\n for (var i = 0; i < songPlayPauseElements.length; i++) {\n /*\n Grab the playlist attributes from the element.\n */\n var playlist = songPlayPauseElements[i].getAttribute(\"data-amplitude-playlist\");\n\n /*\n We want only the song play pause buttons, not ones scoped in a playlist.\n */\n if (playlist == null) {\n /*\n Determines what classes we should add and remove\n from the elements.\n */\n switch (state) {\n case \"playing\":\n setElementPlay(songPlayPauseElements[i]);\n break;\n case \"paused\":\n setElementPause(songPlayPauseElements[i]);\n break;\n }\n }\n }\n }\n\n /**\n * Syncs the song in playlist play pause buttons to the state of\n * the active song.\n *\n * @access public\n */\n function syncSongInPlaylist() {\n var state = _config2.default.audio.paused ? \"paused\" : \"playing\";\n\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n /*\n Get all of the individual song play pause buttons. These have an\n amplitude-song-index attribute. Some have amplitude-playlist which\n means they are individual songs within a playlist.\n */\n var songInPlaylistPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[data-amplitude-song-index=\"' + activePlaylistIndex + '\"][data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Iterate over all of the individual play pause elements for songs inspect\n a playlist.\n */\n for (var i = 0; i < songInPlaylistPlayPauseElements.length; i++) {\n /*\n Determines what classes we should add and remove\n from the elements.\n */\n switch (state) {\n case \"playing\":\n setElementPlay(songInPlaylistPlayPauseElements[i]);\n break;\n case \"paused\":\n setElementPause(songInPlaylistPlayPauseElements[i]);\n break;\n }\n }\n }\n\n /**\n * Sets all of the play pause buttons to paused.\n *\n * @access public\n */\n function syncToPause() {\n /*\n Gets all of the play pause elements\n */\n var playPauseElements = document.querySelectorAll(\".amplitude-play-pause\");\n\n /*\n Sets all of the elements to pause\n */\n for (var i = 0; i < playPauseElements.length; i++) {\n setElementPause(playPauseElements[i]);\n }\n }\n\n /**\n * Sets an element to be playing by removing the 'amplitude-paused' class\n * and adding the 'amplitude-playing' class\n *\n * @access public\n * @param {element} element \t- The element getting the playing class added.\n */\n function setElementPlay(element) {\n element.classList.add(\"amplitude-playing\");\n element.classList.remove(\"amplitude-paused\");\n }\n\n /**\n * Sets an element to be paused by adding the 'amplitude-paused' class\n * and removing the 'amplitude-playing' class\n *\n * @access public\n * @param {element} element \t- The element getting the paused class added.\n */\n function setElementPause(element) {\n element.classList.remove(\"amplitude-playing\");\n element.classList.add(\"amplitude-paused\");\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n sync: sync,\n syncGlobal: syncGlobal,\n syncPlaylist: syncPlaylist,\n syncSong: syncSong,\n syncSongInPlaylist: syncSongInPlaylist,\n syncToPause: syncToPause\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = PlayPauseElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _callbacks = __webpack_require__(9);\n\nvar _callbacks2 = _interopRequireDefault(_callbacks);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nvar _songSliderElements = __webpack_require__(14);\n\nvar _songSliderElements2 = _interopRequireDefault(_songSliderElements);\n\nvar _songPlayedProgressElements = __webpack_require__(20);\n\nvar _songPlayedProgressElements2 = _interopRequireDefault(_songPlayedProgressElements);\n\nvar _timeElements = __webpack_require__(15);\n\nvar _timeElements2 = _interopRequireDefault(_timeElements);\n\nvar _metaDataElements = __webpack_require__(7);\n\nvar _metaDataElements2 = _interopRequireDefault(_metaDataElements);\n\nvar _containerElements = __webpack_require__(49);\n\nvar _containerElements2 = _interopRequireDefault(_containerElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Audio Navigation Utility.\n *\n * @module utilities/AudioNavigation\n */\n\n\n/**\n * Meta Data Elements Module\n *\n * @module visual/MetaDataElements\n */\n\n\n/**\n * Imports the Song Played Progress Elements Module\n *\n * @module visual/SongPlayedProgressElements\n */\n\n\n/**\n * Imports the Play Pause Elements Module\n *\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the Callbacks Module\n *\n * @module utilities/Callbacks\n */\n/**\n * Imports the config module\n * @module config\n */\nvar AudioNavigation = function () {\n /**\n * Sets the next song\n *\n * @access public\n * @param {boolean} [songEnded=false] If the song ended, this is set to true\n * so we take into effect the repeat setting.\n */\n function setNext() {\n var songEnded = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n /*\n Initializes the next index variable. This will be the\n index of the song that is next.\n */\n var nextIndex = null;\n var nextSong = {};\n\n /*\n Ensure we don't loop in the playlist if config.repeat is not true\n */\n var endOfList = false;\n\n /*\n Determines if we are repeating the song or not. If we are repeating,\n the next song will be the same song index.\n */\n if (_config2.default.repeat_song) {\n /*\n If the playlist is shuffled, get the now playing index.\n */\n if (_config2.default.shuffle_on) {\n nextIndex = _config2.default.shuffle_list[_config2.default.active_index].index;\n nextSong = _config2.default.shuffle_list[nextIndex];\n } else {\n nextIndex = _config2.default.active_index;\n nextSong = _config2.default.songs[nextIndex];\n }\n } else {\n /*\n If the shuffle is on, we use the shuffled list of\n songs to determine our next song.\n */\n if (_config2.default.shuffle_on) {\n /*\n If the active shuffle index + 1 is less than the length, then\n we use the next shuffle otherwise we go to the beginning\n of the shuffle list.\n */\n if (parseInt(_config2.default.active_index) + 1 < _config2.default.shuffle_list.length) {\n /*\n Set the next index to be the index of the song in the shuffle list.\n */\n nextIndex = parseInt(_config2.default.active_index) + 1;\n } else {\n nextIndex = 0;\n endOfList = true;\n }\n\n nextSong = _config2.default.shuffle_list[nextIndex];\n } else {\n /*\n If the active index + 1 is less than the length of the songs, then\n we use the next song otherwise we go to the beginning of the\n song list.\n */\n if (parseInt(_config2.default.active_index) + 1 < _config2.default.songs.length) {\n nextIndex = parseInt(_config2.default.active_index) + 1;\n } else {\n nextIndex = 0;\n endOfList = true;\n }\n\n /*\n Sets the next index.\n */\n nextSong = _config2.default.songs[nextIndex];\n }\n }\n\n /*\n Change the song after the next button has been pressed.\n */\n changeSong(nextSong, nextIndex);\n\n /*\n \tIf it's the end of the list and repeat is not on, do nothing.\n */\n if (endOfList && !_config2.default.repeat) {} else {\n /*\n If the song has ended and repeat is on, play the song.\n */\n if (!(songEnded && !_config2.default.repeat && endOfList)) {\n _core2.default.play();\n }\n }\n\n /*\n Sync the play pause elements and run the\n after next callback.\n */\n _playPauseElements2.default.sync();\n _callbacks2.default.run(\"next\");\n\n /*\n If we repeated the song, run the repeat song callback.\n */\n if (_config2.default.repeat_song) {\n _callbacks2.default.run(\"song_repeated\");\n }\n }\n\n /**\n * Sets the next song in a playlist\n *\n * @param {string} playlist - The playlist being shuffled\n * @param {boolean} [songEnded=false] - If the song ended, this is set to true\n * so we take into effect the repeat setting.\n */\n function setNextPlaylist(playlist) {\n var songEnded = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n /*\n Initializes the next index\n */\n var nextIndex = null;\n var nextSong = {};\n\n /*\n Ensure we don't loop in the playlist if config.repeat is not true\n */\n var endOfList = false;\n\n /*\n If we are repeating the song, then we just start the song over.\n */\n if (_config2.default.repeat_song) {\n /*\n If the playlist is shuffled, get the now playing index.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n nextIndex = _config2.default.playlists[playlist].active_index;\n nextSong = _config2.default.playlists[playlist].shuffle_list[nextIndex];\n } else {\n nextIndex = _config2.default.playlists[playlist].active_index;\n nextSong = _config2.default.playlists[playlist].songs[nextIndex];\n }\n } else {\n /*\n If the playlist is shuffled we get the next index of the playlist.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n /*\n If the active shuffle index + 1 is less than the length of the shuffle list,\n then we use the next shuffle otherwise we go to the beginning of the shuffle list.\n */\n if (parseInt(_config2.default.playlists[playlist].active_index) + 1 < _config2.default.playlists[playlist].shuffle_list.length) {\n /*\n Set the next index to be the index of the song in the shuffle list.\n */\n nextIndex = _config2.default.playlists[playlist].active_index + 1;\n } else {\n nextIndex = 0;\n endOfList = true;\n }\n\n nextSong = _config2.default.playlists[playlist].shuffle_list[nextIndex];\n } else {\n /*\n If the active index +1 is less than the length of the songs in the playlist,\n then we use the next song otherwise we go to the beginning of the playlist.\n */\n if (parseInt(_config2.default.playlists[playlist].active_index) + 1 < _config2.default.playlists[playlist].songs.length) {\n nextIndex = parseInt(_config2.default.playlists[playlist].active_index) + 1;\n } else {\n nextIndex = 0;\n endOfList = true;\n }\n\n /*\n Sets the next song.\n */\n nextSong = _config2.default.playlists[playlist].songs[nextIndex];\n }\n }\n\n /*\n Sets the active playlist to the playlist we are on.\n */\n setActivePlaylist(playlist);\n\n /*\n Change the song within the playlist.\n */\n changeSongPlaylist(playlist, nextSong, nextIndex);\n\n /*\n If it's the end of the playlist and we aren't repeating, do nothing.\n */\n if (endOfList && !_config2.default.repeat) {} else {\n if (!(songEnded && !_config2.default.repeat && endOfList)) {\n _core2.default.play();\n }\n }\n\n /*\n Sync the play pause buttons.\n */\n _playPauseElements2.default.sync();\n _callbacks2.default.run(\"next\");\n\n /*\n Repeat the song.\n */\n if (_config2.default.repeat_song) {\n _callbacks2.default.run(\"song_repeated\");\n }\n }\n\n /**\n * Sets the previous song on the global songs array.\n *\n * @access private\n */\n function setPrevious() {\n /*\n Initializes the previous index\n */\n var previousIndex = null;\n var previousSong = {};\n\n /*\n If we are repeating the song, then we just start the song over.\n */\n if (_config2.default.repeat_song) {\n /*\n If the config is shuffled, get the now playing index.\n */\n if (_config2.default.shuffle_on) {\n previousIndex = _config2.default.active_index;\n previousSong = _config2.default.shuffle_list[previousIndex];\n } else {\n previousIndex = _config2.default.active_index;\n previousSong = _config2.default.songs[previousIndex];\n }\n } else {\n /*\n Get the previous index. If the previous index will be less than 0, get the\n last song of the array and continue.\n */\n if (parseInt(_config2.default.active_index) - 1 >= 0) {\n previousIndex = parseInt(_config2.default.active_index - 1);\n } else {\n previousIndex = parseInt(_config2.default.songs.length - 1);\n }\n\n /*\n If the config is shuffled, we grab the song from the shuffle list\n */\n if (_config2.default.shuffle_on) {\n /*\n Grab song from the shuffle list\n */\n previousSong = _config2.default.shuffle_list[previousIndex];\n } else {\n /*\n Grab song from the songs array\n */\n previousSong = _config2.default.songs[previousIndex];\n }\n }\n /*\n Change the song after the next button has been pressed.\n */\n changeSong(previousSong, previousIndex);\n\n /*\n Play the newest song.\n */\n _core2.default.play();\n\n /*\n Sync the play pause elements and run the\n after next callback.\n */\n _playPauseElements2.default.sync();\n _callbacks2.default.run(\"prev\");\n\n /*\n If we repeated the song, run the repeat song callback.\n */\n if (_config2.default.repeat_song) {\n _callbacks2.default.run(\"song_repeated\");\n }\n }\n\n /**\n * Sets the previous playlist song.\n *\n * @access private\n *\n * @prop {string} playlist - The playlist we are navigating in.\n */\n function setPreviousPlaylist(playlist) {\n /*\n Initializes the previous index\n */\n var previousIndex = null;\n var previousSong = {};\n\n /*\n If we are repeating the song, then we just start the song over.\n */\n if (_config2.default.repeat_song) {\n /*\n If the playlist is shuffled, get the now playing index.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n previousIndex = _config2.default.playlists[playlist].active_index;\n previousSong = _config2.default.playlists[playlist].shuffle_list[previousIndex];\n } else {\n previousIndex = _config2.default.playlists[playlist].active_index;\n previousSong = _config2.default.playlists[playlist].songs[previousIndex];\n }\n } else {\n /*\n Get the previous index. If the previous index will be less than 0, get the\n last song of the array and continue.\n */\n if (parseInt(_config2.default.playlists[playlist].active_index) - 1 >= 0) {\n previousIndex = parseInt(_config2.default.playlists[playlist].active_index - 1);\n } else {\n previousIndex = parseInt(_config2.default.playlists[playlist].songs.length - 1);\n }\n\n /*\n If the playlist is shuffled, we grab the song from the shuffle list\n */\n if (_config2.default.playlists[playlist].shuffle) {\n /*\n Grab song from the shuffle list\n */\n previousSong = _config2.default.playlists[playlist].shuffle_list[previousIndex];\n } else {\n /*\n Grab song from the songs array\n */\n previousSong = _config2.default.playlists[playlist].songs[previousIndex];\n }\n }\n\n /*\n Sets the active playlist to the playlist we are on.\n */\n setActivePlaylist(playlist);\n\n /*\n Change the song within the playlist.\n */\n changeSongPlaylist(playlist, previousSong, previousIndex);\n\n /*\n Plays the song\n */\n _core2.default.play();\n\n /*\n Sync the play pause buttons.\n */\n _playPauseElements2.default.sync();\n _callbacks2.default.run(\"prev\");\n\n /*\n Repeat the song.\n */\n if (_config2.default.repeat_song) {\n _callbacks2.default.run(\"song_repeated\");\n }\n }\n\n /**\n * Change song in the songs array.\n *\n * @access private\n * @prop {object} song - The song we are changing to.\n * @prop {number} index - The index we are changing to.\n * @prop {boolean} direct - Determines if it was a direct click on the song.\n * We then don't care if shuffle is on or not.\n */\n function changeSong(song, index) {\n var direct = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n /*\n Prepare the song change.\n */\n prepareSongChange(song);\n\n /*\n Change the song.\n */\n _config2.default.audio.src = song.url;\n _config2.default.active_metadata = song;\n _config2.default.active_album = song.album;\n\n _config2.default.active_index = parseInt(index);\n\n /*\n Set new information now that the song has changed.\n */\n afterSongChange(direct);\n }\n\n /**\n * Handles a song change in the playlist\n *\n * @access private\n * @prop {string} playlist - The playlist we are changing the song on.\n * @prop {object} song - The song we are changing to in the playlist.\n * @prop {number} index - The inded of the song we are changing to in the playlist.\n * @prop {boolean} direct - Determines if it was a direct click on the song. We\n * then don't care if shuffle is on or not\n */\n function changeSongPlaylist(playlist, song, index) {\n var direct = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n /*\n Prepare the song change.\n */\n prepareSongChange(song);\n\n /*\n Change the song.\n */\n _config2.default.audio.src = song.url;\n _config2.default.active_metadata = song;\n _config2.default.active_album = song.album;\n _config2.default.active_index = null;\n\n _config2.default.playlists[playlist].active_index = parseInt(index);\n\n /*\n Set new information now that the song has changed.\n */\n afterSongChange(direct);\n }\n\n /**\n * Prepares a song change\n *\n * @access private\n * @prop {object} song - The song we change to.\n */\n function prepareSongChange(song) {\n /*\n Stop the current song.\n */\n _core2.default.stop();\n\n /*\n Sync all of the elements to a stopped song.\n */\n _playPauseElements2.default.syncToPause();\n _songSliderElements2.default.resetElements();\n _songPlayedProgressElements2.default.resetElements();\n _timeElements2.default.resetCurrentTimes();\n\n /*\n If an album changes, fire an album change.\n */\n if (_checks2.default.newAlbum(song)) {\n _callbacks2.default.run(\"album_change\");\n }\n }\n\n /**\n * Updates data on the display after a song has changed.\n *\n * @prop {boolean} direct - Determines if it was a direct click on the song.\n * We then don't care if shuffle is on or not.\n *\n * @access private\n */\n function afterSongChange(direct) {\n _metaDataElements2.default.displayMetaData();\n _containerElements2.default.setActive(direct);\n _timeElements2.default.resetDurationTimes();\n\n /*\n Run the song change callback.\n */\n _callbacks2.default.run(\"song_change\");\n }\n\n /**\n * Sets the active playlist\n *\n * @access public\n * @param {string} playlist - The string of the playlist being set to active.\n */\n function setActivePlaylist(playlist) {\n /*\n If the active playlist is different than the playlist being set,\n we run the `playlist_changed` callback.\n */\n if (_config2.default.active_playlist != playlist) {\n _callbacks2.default.run(\"playlist_changed\");\n /*\n Set the active playlist to the playlist parameter. Only need to\n set if it's different.\n */\n _config2.default.active_playlist = playlist;\n\n if (playlist != null) {\n _config2.default.playlists[playlist].active_index = 0;\n }\n }\n }\n\n /*\n Return the publically facing methods\n */\n return {\n setNext: setNext,\n setNextPlaylist: setNextPlaylist,\n setPrevious: setPrevious,\n setPreviousPlaylist: setPreviousPlaylist,\n changeSong: changeSong,\n changeSongPlaylist: changeSongPlaylist,\n setActivePlaylist: setActivePlaylist\n };\n}();\n\n/**\n * Container Elements Module\n *\n * @module visual/ContainerElements\n */\n\n\n/**\n * Imports the Time Elements Module\n *\n * @module visual/TimeElements\n */\n\n\n/**\n * Imports the Song Slider Elements Module\n *\n * @module visual/SongSliderElements\n */\n\n\n/**\n * Imports the Checks Module\n *\n * @module utilities/Checks\n */\n\n\n/**\n * Imports the Core Module\n *\n * @module core/Core\n */\nexports.default = AudioNavigation;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the debugging of AmplitudeJS\n * @module utilities/Debug\n */\nvar Debug = function () {\n /**\n * Writes out debug message to the console if enabled.\n *\n * Public Accessor: Debug.writeMessage( message )\n *\n * @access public\n * @param {string} message - The string that gets printed to alert the user of a debugging error.\n */\n function writeMessage(message) {\n /*\n If the user has flagged AmplitudeJS to debug, we print out a message\n to the console.\n */\n if (_config2.default.debug) {\n console.log(message);\n }\n }\n\n /*\n Returns the public facing methods\n */\n return {\n writeMessage: writeMessage\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = Debug;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Checks Module. Checks for new songs, albums, and playlists\n *\n * @module utilities/Checks\n */\nvar Checks = function () {\n /**\n * Checks to see if the new song to be played is different than the song\n * that is currently playing. To be true, the user would have selected\n * play on a new song with a new index. To be false, the user would have\n * clicked play/pause on the song that was playing.\n *\n * Public Accessor: Checks.newSong( playlist, songIndex )\n * @access public\n * @param {string} playlist - The playlist we are checking the new song for. Could be null\n * @param {number} songIndex - The index of the new song to be played.\n * @returns {boolean} True if we are setting a new song, false if we are not setting a new song.\n */\n function newSong(playlist, songIndex) {\n /*\n If the playlists don't match, then it's definitely a new song.\n */\n if (_config2.default.active_playlist != playlist) {\n return true;\n } else {\n /*\n If we aren't in a playlist, we check the active index.\n */\n if (_config2.default.active_playlist == null && playlist == null) {\n /*\n If the active indexes don't match, then it's a new song.\n */\n if (_config2.default.active_index != songIndex) {\n return true;\n } else {\n return false;\n }\n } else {\n /*\n If we are in a playlist, then we check to see if the\n new song index matches the active index.\n */\n if (_config2.default.active_playlist == playlist && _config2.default.playlists[playlist].active_index != songIndex) {\n return true;\n } else {\n return false;\n }\n }\n }\n }\n\n /**\n * Checks to see if there is a new album\n *\n * Public Accessor: Checks.newAlbum( album )\n *\n * @access public\n * @param {string} album - Checks to see if the new song will have a new album.\n * @returns {boolean} True if there is a new album, false if there is not a new ablum.\n */\n function newAlbum(album) {\n if (_config2.default.active_album != album) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Checks to see if there is a new playlist\n *\n * Public Accessor: Checks.newPlaylist( playlist )\n *\n * @access public\n * @param {string} playlist - The playlist passed in to check against the active playlist.\n * @returns {boolean} True if there is a new playlist, false if there is not a new playlist.\n */\n function newPlaylist(playlist) {\n if (_config2.default.active_playlist != playlist) {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Determines if the string passed in is a URL or not\n *\n * Public Accessor: AmplitudeHelpers.isURL( url )\n *\n * @access public\n * @param {string} url - The string we are testing to see if it's a URL.\n * @returns {boolean} True if the string is a url, false if it is not.\n */\n function isURL(url) {\n /*\n Test the string against the URL pattern and return if it matches\n */\n var pattern = /(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/;\n\n return pattern.test(url);\n }\n\n /**\n * Determines if what is passed in is an integer or not.\n *\n * Public Accessor: AmplitudeHelpers.isInt( int )\n *\n * @access public\n * @param {string|number} int - The variable we are testing to see is an integer or not.\n * @returns {boolean} If the variable is an integer or not.\n */\n function isInt(int) {\n return !isNaN(int) && parseInt(Number(int)) == int && !isNaN(parseInt(int, 10));\n }\n\n /**\n * Returns public facing methods\n */\n return {\n newSong: newSong,\n newAlbum: newAlbum,\n newPlaylist: newPlaylist,\n isURL: isURL,\n isInt: isInt\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = Checks;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the state of the config object.\n *\n * @module utilities/ConfigState\n */\nvar ConfigState = function () {\n /**\n * Resets the config to the default state. This is called on initialize\n * to ensure the user's config is what matters.\n *\n * Public Accessor: AmplitudeHelpers.resetConfig()\n *\n * @access public\n */\n function resetConfig() {\n _config2.default.audio = new Audio();\n _config2.default.active_metadata = {};\n _config2.default.active_album = \"\";\n _config2.default.active_index = 0;\n _config2.default.active_playlist = null;\n _config2.default.playback_speed = 1.0;\n _config2.default.callbacks = {};\n _config2.default.songs = [];\n _config2.default.playlists = {};\n _config2.default.start_song = \"\";\n _config2.default.starting_playlist = \"\";\n _config2.default.starting_playlist_song = \"\";\n _config2.default.repeat = false;\n _config2.default.shuffle_list = {};\n _config2.default.shuffle_on = false;\n _config2.default.default_album_art = \"\";\n _config2.default.default_playlist_art = \"\";\n _config2.default.debug = false;\n _config2.default.volume = 0.5;\n _config2.default.pre_mute_volume = 0.5;\n _config2.default.volume_increment = 5;\n _config2.default.volume_decrement = 5;\n _config2.default.soundcloud_client = \"\";\n _config2.default.soundcloud_use_art = false;\n _config2.default.soundcloud_song_count = 0;\n _config2.default.soundcloud_songs_ready = 0;\n _config2.default.continue_next = true;\n }\n\n /**\n * Sets the state of the player.\n */\n function setPlayerState() {\n /*\n If paused and the current time is 0 the player is stopped.\n */\n if (_config2.default.audio.paused && _config2.default.audio.currentTime == 0) {\n _config2.default.player_state = \"stopped\";\n }\n\n /*\n If paused and the current time is greater than 0 the player is\n paused.\n */\n if (_config2.default.audio.paused && _config2.default.audio.currentTime > 0) {\n _config2.default.player_state = \"paused\";\n }\n\n /*\n If playing, the current state is playing.\n */\n if (!_config2.default.audio.paused) {\n _config2.default.player_state = \"playing\";\n }\n }\n\n /*\n Returns the public facing methods\n */\n return {\n resetConfig: resetConfig,\n setPlayerState: setPlayerState\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = ConfigState;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * These methods help display the audio's meta data\n *\n * @module visual/MetaDataElements\n */\nvar MetaDataElements = function () {\n /**\n * Displays the active song's metadata. This is called after a song has\n * been changed. This method takes the active song and displays the\n * metadata. So once the new active song is set, we update all of the\n * screen elements.\n *\n * @access public\n */\n function displayMetaData() {\n /*\n Define the image meta data keys. These are managed separately\n since we aren't actually changing the inner HTML of these elements.\n */\n var imageMetaDataKeys = [\"cover_art_url\", \"station_art_url\", \"podcast_episode_cover_art_url\"];\n\n /*\n Get all of the song info elements\n */\n var songInfoElements = document.querySelectorAll(\"[data-amplitude-song-info]\");\n\n /*\n Iterate over all of the song info elements. We will either\n set these to the new values, or clear them if the active song\n doesn't have the info set.\n */\n for (var i = 0; i < songInfoElements.length; i++) {\n /*\n Get the info so we can check if the active meta data has the\n key.\n */\n var info = songInfoElements[i].getAttribute(\"data-amplitude-song-info\");\n\n /*\n Grab the playlist and song index.\n */\n var playlist = songInfoElements[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = songInfoElements[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Ensure that we don't set any individual elements now. We set this with the\n sync meta data method. The reason we don't set them here is because\n all individual songs would get the now playing artwork. If the playlists\n match or the element is a main element meaning it doesn't\n belong to a playlist or a song, then we set the song info.\n */\n if (songIndex == null && (_config2.default.active_playlist == playlist || playlist == null && songIndex == null)) {\n /*\n If the active metadata has the key, then we set it,\n otherwise we clear it. If it's an image element then\n we default it to the default info if needed.\n */\n var val = _config2.default.active_metadata[info] != undefined ? _config2.default.active_metadata[info] : null;\n if (imageMetaDataKeys.indexOf(info) >= 0) {\n val = val || _config2.default.default_album_art;\n songInfoElements[i].setAttribute(\"src\", val);\n } else {\n val = val || \"\";\n songInfoElements[i].innerHTML = val;\n }\n }\n }\n }\n\n /**\n * Displays the playlist meta data.\n */\n function displayPlaylistMetaData() {\n /*\n Define the image meta data keys. These are managed separately\n since we aren't actually changing the inner HTML of these elements.\n */\n var imageMetaDataKeys = [\"image_url\"];\n\n /*\n Get all of the playlist info elements\n */\n var playlistInfoElements = document.querySelectorAll(\"[data-amplitude-playlist-info]\");\n\n /*\n Iterate over all of the playlist info elements. We will either\n set these to the new values, or clear them if the active song\n doesn't have the info set.\n */\n for (var i = 0; i < playlistInfoElements.length; i++) {\n /*\n Get the info so we can check if the active meta data has the\n key.\n */\n var info = playlistInfoElements[i].getAttribute(\"data-amplitude-playlist-info\");\n var playlist = playlistInfoElements[i].getAttribute(\"data-amplitude-playlist\");\n\n if (_config2.default.playlists[playlist][info] != undefined) {\n if (imageMetaDataKeys.indexOf(info) >= 0) {\n playlistInfoElements[i].setAttribute(\"src\", _config2.default.playlists[playlist][info]);\n } else {\n playlistInfoElements[i].innerHTML = _config2.default.playlists[playlist][info];\n }\n } else {\n /*\n We look for the default album art because\n the actual key didn't exist. If the default album\n art doesn't exist then we set the src attribute\n to null.\n */\n if (imageMetaDataKeys.indexOf(info) >= 0) {\n if (_config2.default.default_playlist_art != \"\") {\n playlistInfoElements[i].setAttribute(\"src\", _config2.default.default_playlist_art);\n } else {\n playlistInfoElements[i].setAttribute(\"src\", \"\");\n }\n } else {\n playlistInfoElements[i].innerHTML = \"\";\n }\n }\n }\n }\n\n /**\n * Sets the first song in the playlist. This is used to fill in the meta\n * data in the playlist\n *\n * @param {object} song \t\t\t- The song we are setting to be the first song in the playlist\n * @param {string} playlist \t- Key of the playlist we are setting the first song in\n */\n function setFirstSongInPlaylist(song, playlist) {\n /*\n Define the image meta data keys. These are managed separately\n since we aren't actually changing the inner HTML of these elements.\n */\n var imageMetaDataKeys = [\"cover_art_url\", \"station_art_url\", \"podcast_episode_cover_art_url\"];\n\n /*\n Get all of the song info elements\n */\n var songInfoElements = document.querySelectorAll('[data-amplitude-song-info][data-amplitude-playlist=\"' + playlist + '\"]');\n\n /*\n Iterate over all of the song info elements. We will either\n set these to the new values, or clear them if the active song\n doesn't have the info set.\n */\n for (var i = 0; i < songInfoElements.length; i++) {\n /*\n Get the info so we can check if the active meta data has the\n key.\n */\n var info = songInfoElements[i].getAttribute(\"data-amplitude-song-info\");\n\n /*\n Get the song info element playlist.\n */\n var elementPlaylist = songInfoElements[i].getAttribute(\"data-amplitude-playlist\");\n\n /*\n If the playlists match or the element is a main element, then\n we set the song info.\n */\n if (elementPlaylist == playlist) {\n /*\n If the active metadata has the key, then we set it,\n otherwise we clear it. If it's an image element then\n we default it to the default info if needed.\n */\n if (song[info] != undefined) {\n if (imageMetaDataKeys.indexOf(info) >= 0) {\n songInfoElements[i].setAttribute(\"src\", song[info]);\n } else {\n songInfoElements[i].innerHTML = song[info];\n }\n } else {\n /*\n We look for the default album art because\n the actual key didn't exist. If the default album\n art doesn't exist then we set the src attribute\n to null.\n */\n if (imageMetaDataKeys.indexOf(info) >= 0) {\n if (song.default_album_art != \"\") {\n songInfoElements[i].setAttribute(\"src\", song.default_album_art);\n } else {\n songInfoElements[i].setAttribute(\"src\", \"\");\n }\n } else {\n songInfoElements[i].innerHTML = \"\";\n }\n }\n }\n }\n }\n\n /**\n * Sets the meta data for songs loaded in the songs array\n */\n function syncMetaData() {\n /*\n Define the image meta data keys. These are managed separately\n since we aren't actually changing the inner HTML of these elements.\n */\n var imageMetaDataKeys = [\"cover_art_url\", \"station_art_url\", \"podcast_episode_cover_art_url\"];\n\n /*\n Get all of the song info elements\n */\n var songInfoElements = document.querySelectorAll(\"[data-amplitude-song-info]\");\n\n /*\n Iterate over all of the song info elements. We will either\n set these to the new values, or clear them if the active song\n doesn't have the info set.\n */\n for (var i = 0; i < songInfoElements.length; i++) {\n var songIndex = songInfoElements[i].getAttribute(\"data-amplitude-song-index\");\n var playlist = songInfoElements[i].getAttribute(\"data-amplitude-playlist\");\n\n if (songIndex != null && playlist == null) {\n var info = songInfoElements[i].getAttribute(\"data-amplitude-song-info\");\n\n /*\n Get the song info value referenced on the element. Depending on the type of\n element, we may need to fallback to another value when the direct value\n we want isn't found.\n i.e.\n data-amplitude-song-info=\"cover_art_url\" defaults to using the value\n of \"default_album_art\" when \"cover_art_url\" is missing on the song.\n */\n var val = _config2.default.songs[songIndex][info] != undefined ? _config2.default.songs[songIndex][info] : null;\n /*\n If it's an image meta data key, then we set the src attribute of\n the element. Otherwise we set the inner HTML of the element.\n */\n if (imageMetaDataKeys.indexOf(info) >= 0) {\n /*\n If this is an image meta data key and the individual song doesn't\n have the key, use the default_album_art\n */\n val = val || _config2.default.default_album_art;\n songInfoElements[i].setAttribute(\"src\", val);\n } else {\n songInfoElements[i].innerHTML = val;\n }\n }\n\n /*\n If the song index and playlist are not null, continue.\n */\n if (songIndex != null && playlist != null) {\n /*\n Get the info we are displaying.\n */\n var _info = songInfoElements[i].getAttribute(\"data-amplitude-song-info\");\n\n /*\n Set the meta data accordingly.\n */\n if (_config2.default.playlists[playlist].songs[songIndex][_info] != undefined) {\n if (imageMetaDataKeys.indexOf(_info) >= 0) {\n songInfoElements[i].setAttribute(\"src\", _config2.default.playlists[playlist].songs[songIndex][_info]);\n } else {\n songInfoElements[i].innerHTML = _config2.default.playlists[playlist].songs[songIndex][_info];\n }\n }\n }\n }\n\n /*\n Display the playlist meta data.\n */\n displayPlaylistMetaData();\n }\n\n /**\n * Returns publically facing methods\n */\n return {\n displayMetaData: displayMetaData,\n setFirstSongInPlaylist: setFirstSongInPlaylist,\n syncMetaData: syncMetaData,\n displayPlaylistMetaData: displayPlaylistMetaData\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = MetaDataElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the visual syncing to the state of the config for the repeat\n * elements.\n *\n * @module visual/RepeatElements\n */\nvar RepeatElements = function () {\n /**\n * Syncs repeat for all of the repeat buttons. Users\n * can apply styles to the 'amplitude-repeat-on' and\n * 'amplitude-repeat-off' classes. They represent the state\n * of the player.\n */\n function syncRepeat() {\n /*\n Gets all of the repeat classes\n */\n var repeatClasses = document.getElementsByClassName(\"amplitude-repeat\");\n\n /*\n Iterate over all of the repeat classes. If repeat is on,\n then add the 'amplitude-repeat-on' class and remove the\n 'amplitude-repeat-off' class. If it's off, then do the\n opposite.\n */\n for (var i = 0; i < repeatClasses.length; i++) {\n if (_config2.default.repeat) {\n repeatClasses[i].classList.add(\"amplitude-repeat-on\");\n repeatClasses[i].classList.remove(\"amplitude-repeat-off\");\n } else {\n repeatClasses[i].classList.remove(\"amplitude-repeat-on\");\n repeatClasses[i].classList.add(\"amplitude-repeat-off\");\n }\n }\n }\n\n /**\n * Syncs repeat for all of the playlist repeat buttons. Users\n * can apply styles to the `amplitude-repeat-on` and `amplitude-repeat-off`\n * classes. They repreent the state of the playlist in the player.\n */\n function syncRepeatPlaylist(playlist) {\n /*\n Gets all of the repeat buttons.\n */\n var repeatButtons = document.getElementsByClassName(\"amplitude-repeat\");\n\n /*\n Iterate over all of the repeat buttons\n */\n for (var i = 0; i < repeatButtons.length; i++) {\n /*\n Ensure that the repeat button belongs to matches the\n playlist we are syncing the state for.\n */\n if (repeatButtons[i].getAttribute(\"data-amplitude-playlist\") == playlist) {\n /*\n If the state of the playlist is shuffled on, true, then\n we add the 'amplitude-repeat-on' class and remove the\n 'amplitude-repeat-off' class. If the player is not shuffled\n then we do the opposite.\n */\n if (_config2.default.playlists[playlist].repeat) {\n repeatButtons[i].classList.add(\"amplitude-repeat-on\");\n repeatButtons[i].classList.remove(\"amplitude-repeat-off\");\n } else {\n repeatButtons[i].classList.add(\"amplitude-repeat-off\");\n repeatButtons[i].classList.remove(\"amplitude-repeat-on\");\n }\n }\n }\n }\n\n /**\n * Syncs repeat for all of the repeat song buttons. Users\n * can apply styles to the 'amplitude-repeat-song-on' and\n * 'amplitude-repeat-song-off' classes. They represent the state\n * of the player.\n */\n function syncRepeatSong() {\n /*\n Gets all of the repeat song classes\n */\n var repeatSongClasses = document.getElementsByClassName(\"amplitude-repeat-song\");\n\n /*\n Iterate over all of the repeat song classes. If repeat is on,\n then add the 'amplitude-repeat-song-on' class and remove the\n 'amplitude-repeat-song-off' class. If it's off, then do the\n opposite.\n */\n for (var i = 0; i < repeatSongClasses.length; i++) {\n if (_config2.default.repeat_song) {\n repeatSongClasses[i].classList.add(\"amplitude-repeat-song-on\");\n repeatSongClasses[i].classList.remove(\"amplitude-repeat-song-off\");\n } else {\n repeatSongClasses[i].classList.remove(\"amplitude-repeat-song-on\");\n repeatSongClasses[i].classList.add(\"amplitude-repeat-song-off\");\n }\n }\n }\n\n /*\n Returns the publically available methods.\n */\n return {\n syncRepeat: syncRepeat,\n syncRepeatPlaylist: syncRepeatPlaylist,\n syncRepeatSong: syncRepeatSong\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = RepeatElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Callback Utility\n *\n * @module utilities/callbacks\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Callbacks = function () {\n /**\n * Initializes the callbacks for the player.\n */\n function initialize() {\n /*\n Event: abort\n https://www.w3schools.com/tags/av_event_abort.asp\n */\n _config2.default.audio.addEventListener(\"abort\", function () {\n run(\"abort\");\n });\n\n /*\n Event: error\n https://www.w3schools.com/tags/av_event_error.asp\n */\n _config2.default.audio.addEventListener(\"error\", function () {\n run(\"error\");\n });\n\n /*\n Event: loadeddata\n https://www.w3schools.com/tags/av_event_loadeddata.asp\n */\n _config2.default.audio.addEventListener(\"loadeddata\", function () {\n run(\"loadeddata\");\n });\n\n /*\n Event: loadedmetadata\n https://www.w3schools.com/tags/av_event_loadedmetadata.asp\n */\n _config2.default.audio.addEventListener(\"loadedmetadata\", function () {\n run(\"loadedmetadata\");\n });\n\n /*\n Event: loadstart\n https://www.w3schools.com/tags/av_event_loadstart.asp\n */\n _config2.default.audio.addEventListener(\"loadstart\", function () {\n run(\"loadstart\");\n });\n\n /*\n Event: pause\n https://www.w3schools.com/tags/av_event_pause.asp\n */\n _config2.default.audio.addEventListener(\"pause\", function () {\n run(\"pause\");\n });\n\n /*\n Event: playing\n https://www.w3schools.com/tags/av_event_playing.asp\n */\n _config2.default.audio.addEventListener(\"playing\", function () {\n run(\"playing\");\n });\n\n /*\n Event: play\n https://www.w3schools.com/tags/av_event_play.asp\n */\n _config2.default.audio.addEventListener(\"play\", function () {\n run(\"play\");\n });\n\n /*\n Event: progress\n https://www.w3schools.com/tags/av_event_progress.asp\n */\n _config2.default.audio.addEventListener(\"progress\", function () {\n run(\"progress\");\n });\n\n /*\n Event: ratechange\n https://www.w3schools.com/tags/av_event_ratechange.asp\n */\n _config2.default.audio.addEventListener(\"ratechange\", function () {\n run(\"ratechange\");\n });\n\n /*\n Event: seeked\n https://www.w3schools.com/tags/av_event_seeked.asp\n */\n _config2.default.audio.addEventListener(\"seeked\", function () {\n run(\"seeked\");\n });\n\n /*\n Event: seeking\n https://www.w3schools.com/tags/av_event_seeking.asp\n */\n _config2.default.audio.addEventListener(\"seeking\", function () {\n run(\"seeking\");\n });\n\n /*\n Event: stalled\n https://www.w3schools.com/tags/av_event_stalled.asp\n */\n _config2.default.audio.addEventListener(\"stalled\", function () {\n run(\"stalled\");\n });\n\n /*\n Event: suspend\n https://www.w3schools.com/tags/av_event_suspend.asp\n */\n _config2.default.audio.addEventListener(\"suspend\", function () {\n run(\"suspend\");\n });\n\n /*\n Event: timeupdate\n https://www.w3schools.com/tags/av_event_timeupdate.asp\n */\n _config2.default.audio.addEventListener(\"timeupdate\", function () {\n run(\"timeupdate\");\n });\n\n /*\n Event: volumechange\n https://www.w3schools.com/tags/av_event_volumechange.asp\n */\n _config2.default.audio.addEventListener(\"volumechange\", function () {\n run(\"volumechange\");\n });\n\n /*\n Event: waiting\n https://www.w3schools.com/tags/av_event_waiting.asp\n */\n _config2.default.audio.addEventListener(\"waiting\", function () {\n run(\"waiting\");\n });\n\n /*\n Event: canplay\n https://www.w3schools.com/tags/av_event_canplay.asp\n */\n _config2.default.audio.addEventListener(\"canplay\", function () {\n run(\"canplay\");\n });\n\n /*\n Event: canplaythrough\n https://www.w3schools.com/tags/av_event_canplaythrough.asp\n */\n _config2.default.audio.addEventListener(\"canplaythrough\", function () {\n run(\"canplaythrough\");\n });\n\n /*\n Event: durationchange\n https://www.w3schools.com/tags/av_event_durationchange.asp\n */\n _config2.default.audio.addEventListener(\"durationchange\", function () {\n run(\"durationchange\");\n });\n\n /*\n Event: ended\n https://www.w3schools.com/tags/av_event_ended.asp\n */\n _config2.default.audio.addEventListener(\"ended\", function () {\n run(\"ended\");\n });\n }\n\n /**\n * Runs a user defined callback method\n *\n * Public Accessor: Callbacks.run( callbackName )\n *\n * @access public\n * @param {string} callbackName - The name of the callback we are going to run.\n */\n function run(callbackName) {\n /*\n Checks to see if a user defined a callback method for the\n callback we are running.\n */\n if (_config2.default.callbacks[callbackName]) {\n /*\n Build the callback function\n */\n var callbackFunction = _config2.default.callbacks[callbackName];\n\n /*\n Write a debug message stating the callback we are running\n */\n _debug2.default.writeMessage(\"Running Callback: \" + callbackName);\n\n /*\n Run the callback function and catch any errors\n */\n try {\n callbackFunction();\n } catch (error) {\n if (error.message == \"CANCEL EVENT\") {\n throw error;\n } else {\n _debug2.default.writeMessage(\"Callback error: \" + error.message);\n }\n }\n }\n }\n\n return {\n initialize: initialize,\n run: run\n };\n}();\n\n/**\n * Imports the debug module\n * @module utilities/debug\n */\nexports.default = Callbacks;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * Handles the visual state for all of the mute elements.\n *\n * @module visual/MuteElements\n */\nvar MuteElements = function () {\n /**\n * Syncs mute for all of the mute buttons. This represents the\n * state of the player if it's muted or not.\n *\n * @access public\n * @param {string} state \t- The muted state of the player.\n */\n function setMuted(state) {\n /*\n Get all of the mute buttons.\n */\n var muteClasses = document.getElementsByClassName(\"amplitude-mute\");\n\n /*\n Iterate over all of the mute classes. If the state of the player\n is not-muted then we add the amplitude-not-muted classe and remove\n the amplitude muted class otherwise we do the opposite.\n */\n for (var i = 0; i < muteClasses.length; i++) {\n if (!state) {\n muteClasses[i].classList.add(\"amplitude-not-muted\");\n muteClasses[i].classList.remove(\"amplitude-muted\");\n } else {\n muteClasses[i].classList.remove(\"amplitude-not-muted\");\n muteClasses[i].classList.add(\"amplitude-muted\");\n }\n }\n }\n\n return {\n setMuted: setMuted\n };\n}();\n\nexports.default = MuteElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Keeps the volume slider elements in sync.\n * @module visual/VolumeSliderElements\n */\nvar VolumeSliderElements = function () {\n /**\n * Visually syncs the volume sliders so they are all the same if there\n * are more than one.\n *\n * @access public\n */\n function sync() {\n var volumeSliders = document.getElementsByClassName(\"amplitude-volume-slider\");\n\n /*\n Iterates over all of the volume sliders for the song, setting the value\n to the config value.\n */\n for (var i = 0; i < volumeSliders.length; i++) {\n volumeSliders[i].value = _config2.default.audio.volume * 100;\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n sync: sync\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = VolumeSliderElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Repeater utility. Handles setting the repeat for all scenarios.\n *\n * @module utilities/Repeater\n */\nvar Repeater = function () {\n /**\n * Sets the state of the repeat for a song.\n *\n * @access public\n * @param {boolean} repeat - A boolean representing whether the repeat should be on or off\n */\n function setRepeat(repeat) {\n /*\n Set the global repeat to be toggled\n */\n _config2.default.repeat = repeat;\n }\n\n /**\n * Sets the state of the repeat for a playlist.\n *\n * @access public\n * @param {boolean} repeat - A boolean representing whether the repeat should be on or off\n * @param {string} playlist - The key of the playlist for repeating\n */\n function setRepeatPlaylist(repeat, playlist) {\n /*\n Set the playlist repeat to be toggled.\n */\n _config2.default.playlists[playlist].repeat = repeat;\n }\n\n /**\n * Sets the state of the repeat song\n *\n * @access public\n * @param {boolean} repeat - A boolean representing whether the repeat shoudl be on or off for the song.\n */\n function setRepeatSong(repeat) {\n _config2.default.repeat_song = repeat;\n }\n\n /*\n Returns the public facing methods\n */\n return {\n setRepeat: setRepeat,\n setRepeatPlaylist: setRepeatPlaylist,\n setRepeatSong: setRepeatSong\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = Repeater;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Shuffle Module. Handles all of the shuffling functionality for\n * AmplitudeJS\n *\n * @module utilities/Shuffler\n */\nvar Shuffler = function () {\n /**\n * Sets the shuffle state globally\n *\n * @access public\n * @param {boolean} shuffle - True when we are shuffling, false when we turn it off.\n */\n function setShuffle(shuffle) {\n _config2.default.shuffle_on = shuffle;\n\n if (shuffle) {\n shuffleSongs();\n } else {\n _config2.default.shuffle_list = [];\n }\n }\n\n /**\n * Toggles the shuffle status globally.\n *\n * @access public\n */\n function toggleShuffle() {\n /*\n If shuffle is on, we toggle it off. If shuffle is off, we\n toggle on.\n */\n if (_config2.default.shuffle_on) {\n _config2.default.shuffle_on = false;\n _config2.default.shuffle_list = [];\n } else {\n _config2.default.shuffle_on = true;\n shuffleSongs();\n }\n }\n\n /**\n * Sets the shuffle state for a playlist\n *\n * @access public\n * @param {string} playlist The key of the playlist we are shuffling.\n * @param {boolean} shuffle True when we are shuffling the playlist, false when we turn off shuffle.\n */\n function setShufflePlaylist(playlist, shuffle) {\n _config2.default.playlists[playlist].shuffle = shuffle;\n\n if (_config2.default.playlists[playlist].shuffle) {\n shufflePlaylistSongs(playlist);\n } else {\n _config2.default.playlists[playlist].shuffle_list = [];\n }\n }\n\n /**\n * Sets the shuffle state for a playlist\n *\n * @access public\n * @param {string} playlist The key of the playlist we are shuffling.\n */\n function toggleShufflePlaylist(playlist) {\n /*\n If the playlist shuffled is on, we toggle it off. If the\n playlist shuffled is off, we toggle it on.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n _config2.default.playlists[playlist].shuffle = false;\n _config2.default.playlists[playlist].shuffle_list = [];\n } else {\n _config2.default.playlists[playlist].shuffle = true;\n shufflePlaylistSongs(playlist);\n }\n }\n\n /**\n * Shuffles individual songs in the config\n * Based off of: http://www.codinghorror.com/blog/2007/12/the-danger-of-naivete.html\n *\n * Public Accessor: Shuffle.shuffleSongs()\n *\n * @access public\n */\n function shuffleSongs() {\n /*\n Builds a temporary array with the length of the config.\n */\n var shuffleTemp = new Array(_config2.default.songs.length);\n\n /*\n Set the temporary array equal to the songs array.\n */\n for (var i = 0; i < _config2.default.songs.length; i++) {\n shuffleTemp[i] = _config2.default.songs[i];\n }\n\n /*\n Iterate ove rthe songs and generate random numbers to\n swap the indexes of the shuffle array.\n */\n for (var _i = _config2.default.songs.length - 1; _i > 0; _i--) {\n var randNum = Math.floor(Math.random() * _config2.default.songs.length + 1);\n shuffleSwap(shuffleTemp, _i, randNum - 1);\n }\n\n /*\n Set the shuffle list to the shuffle temp.\n */\n _config2.default.shuffle_list = shuffleTemp;\n }\n\n /**\n * Shuffle songs in a playlist\n *\n * Public Accessor: Shuffle.shufflePlaylistSongs( playlist )\n *\n * @access public\n * @param {string} playlist - The playlist we are shuffling.\n */\n function shufflePlaylistSongs(playlist) {\n /*\n Builds a temporary array with the length of the playlist songs.\n */\n var shuffleTemp = new Array(_config2.default.playlists[playlist].songs.length);\n\n /*\n Set the temporary array equal to the playlist array.\n */\n for (var i = 0; i < _config2.default.playlists[playlist].songs.length; i++) {\n shuffleTemp[i] = _config2.default.playlists[playlist].songs[i];\n }\n\n /*\n Iterate ove rthe songs and generate random numbers to\n swap the indexes of the shuffle array.\n */\n for (var _i2 = _config2.default.playlists[playlist].songs.length - 1; _i2 > 0; _i2--) {\n var randNum = Math.floor(Math.random() * _config2.default.playlists[playlist].songs.length + 1);\n shuffleSwap(shuffleTemp, _i2, randNum - 1);\n }\n\n /*\n Set the shuffle list to the shuffle temp.\n */\n _config2.default.playlists[playlist].shuffle_list = shuffleTemp;\n }\n\n /**\n * Swaps and randomizes the song shuffle.\n *\n * @access private\n * @param {object} shuffleList \t- The list of songs that is going to be shuffled\n * @param {number} original \t\t- The original index of he song in the songs array\n * @param {number} random \t\t\t- The randomized index that will be the new index of the song in the shuffle array.\n */\n function shuffleSwap(shuffleList, original, random) {\n var temp = shuffleList[original];\n shuffleList[original] = shuffleList[random];\n shuffleList[random] = temp;\n }\n\n /**\n * Returns public facing methods\n */\n return {\n setShuffle: setShuffle,\n toggleShuffle: toggleShuffle,\n setShufflePlaylist: setShufflePlaylist,\n toggleShufflePlaylist: toggleShufflePlaylist,\n shuffleSongs: shuffleSongs,\n shufflePlaylistSongs: shufflePlaylistSongs\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = Shuffler;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Defines the visual representation of AmplitudeJS song slider elements.\n * @module visual/SongSliderElements\n */\nvar SongSliderElements = function () {\n /**\n * Syncs all of the song slider elements.\n *\n * @access public\n * @param {number} location \t- The location of the song as a percentage.\n * @param {string} playlist \t- The playlist we are setting the song slider for.\n * @param {number} songIndex \t- The index of the song we are adjusting the song slider for.\n */\n function sync(location, playlist, songIndex) {\n syncMain(location);\n syncPlaylist(location, playlist);\n syncSong(location, songIndex);\n syncSongInPlaylist(location, playlist);\n }\n\n /**\n * Syncs the main slider location\n *\n * @access public\n * @param {number} location \t- The location of the song as a percentage.\n */\n function syncMain(location) {\n /*\n Ensure we have a location that's a number\n */\n location = !isNaN(location) ? location : 0;\n\n /*\n Gets the main song sliders\n */\n var mainSongSliders = document.querySelectorAll(\".amplitude-song-slider\");\n\n /*\n Iterates over all of the main sliders and sets the value to the\n percentage of the song played.\n */\n for (var i = 0; i < mainSongSliders.length; i++) {\n /*\n Grab the playlist and song attributes from the element.\n */\n var playlist = mainSongSliders[i].getAttribute(\"data-amplitude-playlist\");\n var song = mainSongSliders[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n This method is responsible for only the global elements,\n so we make sure there are no playlist or songs defined on\n the element.\n */\n if (playlist == null && song == null) {\n mainSongSliders[i].value = location;\n }\n }\n }\n\n /**\n * Syncs playlist song slider locations\n *\n * @access public\n * @param {number} location \t- The location of the song as a percentage.\n * @param {string} playlist \t- The playlist we are setting the song slider for.\n */\n function syncPlaylist(location, playlist) {\n /*\n Ensure we have a location that's a number\n */\n location = !isNaN(location) ? location : 0;\n\n /*\n Gets the playlist song sliders\n */\n var playlistSongSliders = document.querySelectorAll('.amplitude-song-slider[data-amplitude-playlist=\"' + playlist + '\"]');\n\n /*\n Iterates over all of the playlist sliders and sets the value to the\n percentage of the song played.\n */\n for (var i = 0; i < playlistSongSliders.length; i++) {\n /*\n Grab the playlist and song attributes from the element.\n */\n var playlistAttribute = playlistSongSliders[i].getAttribute(\"data-amplitude-playlist\");\n var songAttribute = playlistSongSliders[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n This method is responsible for only the playlist elements,\n so we make sure the playlist attribute matches what is passed\n in.\n */\n if (playlistAttribute == playlist && songAttribute == null) {\n playlistSongSliders[i].value = location;\n }\n }\n }\n\n /**\n * Syncs individual song slider locations\n *\n * @access public\n * @param {number} location \t- The location of the song as a percentage.\n * @param {number} songIndex \t- The index of the song we are adjusting the song slider for.\n */\n function syncSong(location, songIndex) {\n /*\n We only want to sync song sliders if the playlist is null.\n */\n if (_config2.default.active_playlist == null) {\n /*\n Ensure we have a location that's a number\n */\n location = !isNaN(location) ? location : 0;\n\n /*\n Gets the individual song sliders\n */\n var songSliders = document.querySelectorAll('.amplitude-song-slider[data-amplitude-song-index=\"' + songIndex + '\"]');\n\n /*\n Iterates over all of the individual song sliders and sets the value\n to the percentage of the song played.\n */\n for (var i = 0; i < songSliders.length; i++) {\n /*\n Grab the playlist and song attributes from the element.\n */\n var playlistAttribute = songSliders[i].getAttribute(\"data-amplitude-playlist\");\n var songAttribute = songSliders[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n This method is responsible for only the playlist elements,\n so we make sure the playlist attribute matches what is passed\n in.\n */\n if (playlistAttribute == null && songAttribute == songIndex) {\n songSliders[i].value = location;\n }\n }\n }\n }\n\n /**\n * Syncs individual song slider locations\n *\n * @access public\n * @param {number} location \t- The location of the song as a percentage.\n * @param {string} playlist \t- The playlist we are setting the song slider for.\n */\n function syncSongInPlaylist(location, playlist) {\n /*\n Ensure we have a location that's a number\n */\n location = !isNaN(location) ? location : 0;\n\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n /*\n Gets the song in playlist sliders\n */\n var songInPlaylistSliders = document.querySelectorAll('.amplitude-song-slider[data-amplitude-playlist=\"' + playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n /*\n Iterates over all of the song in playlist sliders and sets the value\n to the percentage of the song played.\n */\n for (var i = 0; i < songInPlaylistSliders.length; i++) {\n songInPlaylistSliders[i].value = location;\n }\n }\n\n /**\n * Visually syncs the song sliders back to 0. This usually happens when\n * a song has changed, we ensure that all song sliders get reset.\n *\n * @access public\n */\n function resetElements() {\n var songSliders = document.getElementsByClassName(\"amplitude-song-slider\");\n\n /*\n Iterate over all of the song sliders and set them to\n 0 essentially resetting them.\n */\n for (var i = 0; i < songSliders.length; i++) {\n songSliders[i].value = 0;\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n sync: sync,\n syncMain: syncMain,\n syncPlaylist: syncPlaylist,\n syncSong: syncSong,\n syncSongInPlaylist: syncSongInPlaylist,\n resetElements: resetElements\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = SongSliderElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _currentTimeElements = __webpack_require__(53);\n\nvar _currentTimeElements2 = _interopRequireDefault(_currentTimeElements);\n\nvar _currentHourElements = __webpack_require__(50);\n\nvar _currentHourElements2 = _interopRequireDefault(_currentHourElements);\n\nvar _currentMinuteElements = __webpack_require__(51);\n\nvar _currentMinuteElements2 = _interopRequireDefault(_currentMinuteElements);\n\nvar _currentSecondElements = __webpack_require__(52);\n\nvar _currentSecondElements2 = _interopRequireDefault(_currentSecondElements);\n\nvar _durationCountDownTimeElements = __webpack_require__(54);\n\nvar _durationCountDownTimeElements2 = _interopRequireDefault(_durationCountDownTimeElements);\n\nvar _durationHourElements = __webpack_require__(55);\n\nvar _durationHourElements2 = _interopRequireDefault(_durationHourElements);\n\nvar _durationMinuteElements = __webpack_require__(56);\n\nvar _durationMinuteElements2 = _interopRequireDefault(_durationMinuteElements);\n\nvar _durationSecondElements = __webpack_require__(57);\n\nvar _durationSecondElements2 = _interopRequireDefault(_durationSecondElements);\n\nvar _durationTimeElements = __webpack_require__(58);\n\nvar _durationTimeElements2 = _interopRequireDefault(_durationTimeElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Time Elements Interface. This allows us to update all of the sub time elements\n * through one central point.\n * @module visual/TimeElements\n */\n\n\n/**\n * Imports the AmplitudeJS Duration Second Elements\n * @module visual/time/DurationSecondElements\n */\n\n\n/**\n * Imports the AmplitudeJS Duration Hour Elements\n * @module visual/time/DurationHourElements\n */\n\n\n/**\n * Imports the AmplitudeJS Current Second Elements\n * @module visual/time/CurrentTimeElements\n */\n\n\n/**\n * Imports the AmplitudeJS Current Hour Elements\n * @module visual/time/CurrentHourElements\n */\nvar TimeElements = function () {\n /**\n * Resets the current times.\n */\n function resetCurrentTimes() {\n _currentTimeElements2.default.resetTimes();\n _currentHourElements2.default.resetTimes();\n _currentMinuteElements2.default.resetTimes();\n _currentSecondElements2.default.resetTimes();\n }\n\n /**\n * Syncs the current time elements to the time provided.\n *\n * @param {Object} currentTime - An object representing the current time of the audio.\n */\n function syncCurrentTimes(currentTime) {\n _currentTimeElements2.default.sync(currentTime);\n _currentHourElements2.default.sync(currentTime.hours);\n _currentMinuteElements2.default.sync(currentTime.minutes);\n _currentSecondElements2.default.sync(currentTime.seconds);\n }\n\n /**\n * Resets the duration times.\n */\n function resetDurationTimes() {\n _durationCountDownTimeElements2.default.resetTimes();\n _durationHourElements2.default.resetTimes();\n _durationMinuteElements2.default.resetTimes();\n _durationSecondElements2.default.resetTimes();\n _durationTimeElements2.default.resetTimes();\n }\n\n /**\n * Syncs the duration times to the times provided.\n *\n * @param {Object} currentTime - An object representing the current time of the audio.\n * @param {Object} songDuration - An object representing the duration of the audio\n */\n function syncDurationTimes(currentTime, songDuration) {\n _durationCountDownTimeElements2.default.sync(currentTime, songDuration);\n _durationTimeElements2.default.sync(songDuration);\n _durationHourElements2.default.sync(songDuration.hours);\n _durationMinuteElements2.default.sync(songDuration.minutes);\n _durationSecondElements2.default.sync(songDuration.seconds);\n }\n\n /**\n * Returns the publically accessible methods.\n */\n return {\n resetCurrentTimes: resetCurrentTimes,\n syncCurrentTimes: syncCurrentTimes,\n resetDurationTimes: resetDurationTimes,\n syncDurationTimes: syncDurationTimes\n };\n}();\n\n/**\n * Imports the AmplitudeJS Duration Time Elements\n * @module visual/time/DurationTimeElements\n */\n\n\n/**\n * Imports the AmplitudeJS Duration Minute Elements\n * @module visual/time/DurationMinuteElements\n */\n\n\n/**\n * Imports the AmplitudeJS Duration Count Down Time Elements\n * @module visual/time/DurationCountDownTimeElements\n */\n\n\n/**\n * Imports the AmplitudeJS Current Minute Elements\n * @module visual/time/CurrentMinuteElements\n */\n/**\n * Imports the AmplitudeJS Current Time\n * @module visual/time/CurrentTimeElements\n */\nexports.default = TimeElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the visualizations elements.\n *\n * @module Visualizations\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Visualizations = function () {\n /**\n * Runs all of the visualizations on the screen.\n */\n function run() {\n /*\n Get all of the visualization elements on the page\n */\n var visualizationElements = document.querySelectorAll(\".amplitude-visualization\");\n\n /*\n If the web audio API is available, we display the visualizations.\n */\n if (_config2.default.web_audio_api_available) {\n /*\n If the visualization has not started, there are visualizations available,\n and we have at least one visualization element, then we continue.\n */\n if (Object.keys(_config2.default.visualizations.available).length > 0 && visualizationElements.length > 0) {\n /*\n Iterate over all of the visualizations on the page and activate the\n ones we need.\n */\n for (var i = 0; i < visualizationElements.length; i++) {\n /*\n Grab the playlist and song attributes from the visualization to\n determine which one we run.\n */\n var playlist = visualizationElements[i].getAttribute(\"data-amplitude-playlist\");\n var song = visualizationElements[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n If the playlist and song are null, it's a global visualization element.\n */\n if (playlist == null && song == null) {\n runGlobalVisualization(visualizationElements[i]);\n }\n\n /*\n if the playlist is not null and the song is null it's a playlist visualization\n element.\n */\n if (playlist != null && song == null) {\n runPlaylistVisualization(visualizationElements[i], playlist);\n }\n\n /*\n If the playlist is null and the song is not null it's a song visualization element.\n */\n if (playlist == null && song != null) {\n runSongVisualization(visualizationElements[i], song);\n }\n\n /*\n If the playlist and song are not null then it's a song in playlist visualization\n element.\n */\n if (playlist != null && song != null) {\n runSongInPlaylistVisualization(visualizationElements[i], playlist, song);\n }\n }\n }\n } else {\n displayBackups();\n }\n }\n\n /**\n * Runs a global visualization\n *\n * @param {Node} element The container element that handles the visualization.\n */\n function runGlobalVisualization(element) {\n /*\n Gets the global visualization index and the active song visualization indexes\n so we know which visualization to use. The song will override the global\n */\n var globalVisualizationIndex = _config2.default.visualization;\n var activeSongVisualizationIndex = _config2.default.active_index != null ? _config2.default.songs[_config2.default.active_index].visualization : _config2.default.playlists[_config2.default.active_playlist].songs[_config2.default.playlists[_config2.default.active_playlist].active_index].visualization;\n\n /*\n If the active song visualization is defined and the visualization exists,\n use that visualization.\n */\n if (activeSongVisualizationIndex != undefined && _config2.default.visualizations.available[activeSongVisualizationIndex] != undefined) {\n addToActiveVisualizations(activeSongVisualizationIndex, element);\n\n /*\n If the user defined a global visualization, use that one.\n */\n } else if (globalVisualizationIndex != undefined && _config2.default.visualizations.available[globalVisualizationIndex] != undefined) {\n addToActiveVisualizations(globalVisualizationIndex, element);\n\n /*\n If the user didn't define a global visualization, use the first visualization\n registered if there is one.\n */\n } else {\n /*\n Grab the first registered visualization. If it exists, use that one.\n */\n var firstVisualization = Object.keys(_config2.default.visualizations.available).length > 0 ? Object.keys(_config2.default.visualizations.available)[0] : null;\n\n if (firstVisualization != null) {\n addToActiveVisualizations(firstVisualization, element);\n }\n }\n }\n\n /**\n * Run a specific playlist visualization.\n *\n * @param {Node} element The container element that handles the visualization.\n * @param {string} playlist The key of the playlist we are running the visualization for.\n */\n function runPlaylistVisualization(element, playlist) {\n /*\n If the playlist is equal to the active playlist, then we continue.\n */\n if (playlist == _config2.default.active_playlist) {\n /*\n Checks if the song has a visualization and that visualization exists,\n run that visualization.\n */\n var activeSongVisualizationIndex = _config2.default.playlists[_config2.default.active_playlist].songs[_config2.default.playlists[_config2.default.active_playlist].active_index].visualization;\n var activePlaylistVisualizationIndex = _config2.default.playlists[_config2.default.active_playlist].visualization;\n var globalVisualizationIndex = _config2.default.visualization;\n\n /*\n If the actual song has a visualization, we run that.\n */\n if (activeSongVisualizationIndex != undefined && _config2.default.visualizations.available[activeSongVisualizationIndex] != undefined) {\n addToActiveVisualizations(activeSongVisualizationIndex, element);\n\n /*\n If the actual playlist has a visualization, run that.\n */\n } else if (activePlaylistVisualizationIndex != undefined && _config2.default.visualizations.available[activePlaylistVisualizationIndex] != undefined) {\n addToActiveVisualizations(activePlaylistVisualizationIndex, element);\n\n /*\n If a global visualization is defined, run that.\n */\n } else if (globalVisualizationIndex != undefined && _config2.default.visualizations.available[globalVisualizationIndex] != undefined) {\n addToActiveVisualizations(globalVisualizationIndex, element);\n } else {\n /*\n Grab the first registered visualization. If it exists, use that one.\n */\n var firstVisualization = Object.keys(_config2.default.visualizations.available).length > 0 ? Object.keys(_config2.default.visualizations.available)[0] : null;\n\n if (firstVisualization != null) {\n addToActiveVisualizations(firstVisualization, element);\n }\n }\n }\n }\n\n /**\n * Run a song specific visualization.\n *\n * @param {Node} element The container element that handles the visualization.\n * @param {string} song The song index that we are running the visualization for.\n */\n function runSongVisualization(element, song) {\n /*\n If the song is equal to the active song, then we continue.\n */\n if (song == _config2.default.active_index) {\n /*\n Get the indexes of the song\n */\n var activeSongVisualizationIndex = _config2.default.songs[_config2.default.active_index].visualization;\n var globalVisualizationIndex = _config2.default.visualization;\n\n /*\n If the song has a visualization, run that.\n */\n if (activeSongVisualizationIndex != undefined && _config2.default.visualizations.available[activeSongVisualizationIndex] != undefined) {\n addToActiveVisualizations(activeSongVisualizationIndex, element);\n\n /*\n If the global visualization is set, use that.\n */\n } else if (globalVisualizationIndex != undefined && _config2.default.visualizations.available[globalVisualizationIndex] != undefined) {\n addToActiveVisualizations(globalVisualizationIndex, element);\n } else {\n /*\n Grab the first registered visualization. If it exists, use that one.\n */\n var firstVisualization = Object.keys(_config2.default.visualizations.available).length > 0 ? Object.keys(_config2.default.visualizations.available)[0] : null;\n\n if (firstVisualization != null) {\n addToActiveVisualizations(firstVisualization, element);\n }\n }\n }\n }\n\n /**\n * Run a song in playlist visualization.\n *\n * @param {Node} element - The element containing the visualization.\n * @param {string} playlist - The string of the playlist key.\n * @param {index} song - The index of the song in the playlist.\n */\n function runSongInPlaylistVisualization(element, playlist, song) {\n /*\n If the playlist is the same as the active playlist and the active\n index of the song is the same as the song, then we continue.\n */\n if (playlist == _config2.default.active_playlist && _config2.default.playlists[playlist].active_index == song) {\n /*\n Checks if the song has a visualization and that visualization exists,\n run that visualization.\n */\n var activeSongVisualizationIndex = _config2.default.playlists[_config2.default.active_playlist].songs[_config2.default.playlists[_config2.default.active_playlist].active_index].visualization;\n var activePlaylistVisualizationIndex = _config2.default.playlists[_config2.default.active_playlist].visualization;\n var globalVisualizationIndex = _config2.default.visualization;\n\n /*\n If the active song has a visualization, we use that.\n */\n if (activeSongVisualizationIndex != undefined && _config2.default.visualizations.available[activeSongVisualizationIndex] != undefined) {\n addToActiveVisualizations(activeSongVisualizationIndex, element);\n\n /*\n If the active playlist has a visualization, we use that.\n */\n } else if (activePlaylistVisualizationIndex != undefined && _config2.default.visualizations.available[activePlaylistVisualizationIndex] != undefined) {\n addToActiveVisualizations(activePlaylistVisualizationIndex, element);\n\n /*\n If the global visualization has been set, we use that.\n */\n } else if (globalVisualizationIndex != undefined && _config2.default.visualizations.available[globalVisualizationIndex] != undefined) {\n addToActiveVisualizations(globalVisualizationIndex, element);\n } else {\n /*\n Grab the first registered visualization. If it exists, use that one.\n */\n var firstVisualization = Object.keys(_config2.default.visualizations.available).length > 0 ? Object.keys(_config2.default.visualizations.available)[0] : null;\n\n if (firstVisualization != null) {\n addToActiveVisualizations(firstVisualization, element);\n }\n }\n }\n }\n\n /**\n * Add a visualization to the array of active visualizations.\n *\n * @param {string} key - The key of the active visualization.\n * @param {Node} element - The element that the visualization will be applied to.\n */\n function addToActiveVisualizations(key, element) {\n var visualization = new _config2.default.visualizations.available[key][\"object\"]();\n visualization.setPreferences(_config2.default.visualizations.available[key][\"preferences\"]);\n visualization.startVisualization(element);\n _config2.default.visualizations.active.push(visualization);\n }\n\n /**\n * Stops all active visualizations.\n */\n function stop() {\n /*\n Iterates over all of the visualizations and stop the visualization.\n */\n for (var i = 0; i < _config2.default.visualizations.active.length; i++) {\n _config2.default.visualizations.active[i].stopVisualization();\n }\n\n /*\n Clear the active visualizations.\n */\n _config2.default.visualizations.active = [];\n }\n\n /**\n * Registers any visualization we can use.\n *\n * @param {object} visualization The visualization object itself\n * @param {object} preferences User preferences overrides.\n */\n function register(visualization, preferences) {\n /*\n Initialize the new visualization.\n */\n var newVisualization = new visualization();\n\n /*\n Adds the visualization to the global config so it knows\n it can be used when playing songs.\n getID is a public function for getting a visualization's id.\n It becomes the key to access the visualization.\n */\n _config2.default.visualizations.available[newVisualization.getID()] = new Array();\n _config2.default.visualizations.available[newVisualization.getID()][\"object\"] = visualization;\n _config2.default.visualizations.available[newVisualization.getID()][\"preferences\"] = preferences;\n }\n\n /**\n * Displays the backups for the visualizations.\n */\n function displayBackups() {\n /*\n Get all of the visualization elements on the page\n */\n var visualizationElements = document.querySelectorAll(\".amplitude-visualization\");\n\n if (visualizationElements.length > 0) {\n for (var x = 0; x < visualizationElements.length; x++) {\n /*\n Grab the playlist and song attributes from the visualization to\n determine which one we run.\n */\n var playlist = visualizationElements[x].getAttribute(\"data-amplitude-playlist\");\n var song = visualizationElements[x].getAttribute(\"data-amplitude-song-index\");\n\n /*\n If the playlist and song are null, it's a global visualization element.\n */\n if (playlist == null && song == null) {\n displayGlobalBackup(visualizationElements[x]);\n }\n\n /*\n if the playlist is not null and the song is null it's a playlist visualization\n element.\n */\n if (playlist != null && song == null) {\n displayPlaylistBackup(visualizationElements[x], playlist);\n }\n\n /*\n If the playlist is null and the song is not null it's a song visualization element.\n */\n if (playlist == null && song != null) {\n displaySongBackup(visualizationElements[x], song);\n }\n\n /*\n If the playlist and song are not null then it's a song in playlist visualization\n element.\n */\n if (playlist != null && song != null) {\n displaySongInPlaylistBackup(visualizationElements[x], playlist, song);\n }\n }\n }\n }\n\n /**\n * Displays the global backup which is the cover art of the image in the\n * visualization container.\n *\n * @param {node} element - The element we are adding the background image to.\n */\n function displayGlobalBackup(element) {\n element.style.backgroundImage = \"url(\" + _config2.default.active_metadata.cover_art_url + \")\";\n }\n\n /**\n * Displays the playlist backup which is the cover art of the image in the\n * visualization container.\n *\n * @param {node} element - The element we are adding the background image to.\n */\n function displayPlaylistBackup(element, playlist) {\n if (_config2.default.active_playlist == playlist) {\n element.style.backgroundImage = \"url(\" + _config2.default.active_metadata.cover_art_url + \")\";\n }\n }\n\n /**\n * Displays the song backup which is the cover art of the image in the\n * visualization container.\n *\n * @param {node} element - The element we are adding the background image to.\n */\n function displaySongBackup(element, song) {\n if (_config2.default.active_index == song) {\n element.style.backgroundImage = \"url(\" + _config2.default.active_metadata.cover_art_url + \")\";\n }\n }\n\n /**\n * Displays the song in playlist backup which is the cover art of the image in the\n * visualization container.\n *\n * @param {node} element - The element we are adding the background image to.\n */\n function displaySongInPlaylistBackup(element, playlist, song) {\n if (_config2.default.active_playlist == playlist && _config2.default.playlists[active_playlist].active_index == song) {\n element.style.backgroundImage = \"url(\" + _config2.default.active_metadata.cover_art_url + \")\";\n }\n }\n\n /*\n Returns the public facing methods\n */\n return {\n run: run,\n stop: stop,\n register: register\n };\n}();\n\n/**\n * Imports the debug module\n * @module utilities/Debug\n */\nexports.default = Visualizations;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _init = __webpack_require__(21);\n\nvar _init2 = _interopRequireDefault(_init);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * These helpers wrap around the basic methods of the Soundcloud API\n * and get the information we need from SoundCloud to make the songs\n * streamable through Amplitude\n *\n * @module soundcloud/SoundCloud\n */\n/**\n * Imports the config module\n * @module config\n */\nvar SoundCloud = function () {\n /**\n * Defines the temporary user config used while we configure soundcloud\n * @type {object}\n */\n var tempUserConfig = {};\n\n /**\n * Loads the soundcloud SDK for use with Amplitude so the user doesn't have\n * to load it themselves.\n * With help from: http://stackoverflow.com/questions/950087/include-a-javascript-file-in-another-javascript-file\n *\n * @access public\n * @param {object} userConfig \t- The config defined by the user for AmplitudeJS\n */\n function loadSoundCloud(userConfig) {\n /*\n Sets the temporary config to the config passed by the user so we can make changes\n and not break the actual config.\n */\n tempUserConfig = userConfig;\n\n /*\n Gets the head tag for the document and create a script element.\n */\n var head = document.getElementsByTagName(\"head\")[0];\n var script = document.createElement(\"script\");\n\n script.type = \"text/javascript\";\n\n /*\n URL to the remote soundcloud SDK\n */\n script.src = \"https://connect.soundcloud.com/sdk.js\";\n script.onreadystatechange = initSoundcloud;\n script.onload = initSoundcloud;\n\n /*\n Add the script to the head of the document.\n */\n head.appendChild(script);\n }\n\n /**\n * Initializes soundcloud with the key provided.\n *\n * @access private\n */\n function initSoundcloud() {\n /*\n Calls the SoundCloud initialize function\n from their API and sends it the client_id\n that the user passed in.\n */\n SC.initialize({\n client_id: _config2.default.soundcloud_client\n });\n\n /*\n Gets the streamable URLs to run through Amplitue. This is\n VERY important since Amplitude can't stream the copy and pasted\n link from the SoundCloud page, but can resolve the streaming\n URLs from the link.\n */\n getStreamableURLs();\n }\n\n /**\n * Gets the streamable URL from the URL provided for\n * all of the soundcloud links. This will loop through\n * and set all of the information for the soundcloud\n * urls.\n *\n * @access private\n */\n function getStreamableURLs() {\n /*\n Define the regex to find the soundcloud URLs\n */\n var soundcloud_regex = /^https?:\\/\\/(soundcloud.com|snd.sc)\\/(.*)$/;\n\n for (var i = 0; i < _config2.default.songs.length; i++) {\n /*\n If the URL matches soundcloud, we grab\n that url and get the streamable link\n if there is one.\n */\n if (_config2.default.songs[i].url.match(soundcloud_regex)) {\n _config2.default.soundcloud_song_count++;\n resolveStreamable(_config2.default.songs[i].url, i);\n }\n }\n }\n\n /**\n * Resolves an individual streamable URL.\n *\n * @param {string} url - The URL of the SoundCloud song to get the streamable URL from.\n * @param {string} playlist - The playlist we are getting the streamable URL for.\n * @param {Integer} index - The index of the song in the playlist or the songs array.\n * @param {boolean} addToShuffleList - Whether we add to the shuffle list for the songs or playlist.\n *\n */\n function resolveIndividualStreamableURL(url, playlist, index) {\n var addToShuffleList = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n SC.get(\"/resolve/?url=\" + url, function (sound) {\n /*\n If streamable we get the url and bind the client ID to the end\n so Amplitude can just stream the song normally. We then overwrite\n the url the user provided with the streamable URL.\n */\n if (sound.streamable) {\n if (playlist != null) {\n _config2.default.playlists[playlist].songs[index].url = sound.stream_url + \"?client_id=\" + _config2.default.soundcloud_client;\n\n if (addToShuffleList) {\n _config2.default.playlists[playlist].shuffle_list[index].url = sound.stream_url + \"?client_id=\" + _config2.default.soundcloud_client;\n }\n /*\n If the user want's to use soundcloud art, we overwrite the\n cover_art_url with the soundcloud artwork url.\n */\n if (_config2.default.soundcloud_use_art) {\n _config2.default.playlists[playlist].songs[index].cover_art_url = sound.artwork_url;\n\n if (addToShuffleList) {\n _config2.default.playlists[playlist].shuffle_list[index].cover_art_url = sound.artwork_url;\n }\n }\n\n /*\n Grab the extra metadata from soundcloud and bind it to the\n song. The user can get this through the public function:\n getActiveSongMetadata\n */\n _config2.default.playlists[playlist].songs[index].soundcloud_data = sound;\n\n if (addToShuffleList) {\n _config2.default.playlists[playlist].shuffle_list[index].soundcloud_data = sound;\n }\n } else {\n _config2.default.songs[index].url = sound.stream_url + \"?client_id=\" + _config2.default.soundcloud_client;\n\n if (addToShuffleList) {\n _config2.default.shuffle_list[index].stream_url + \"?client_id=\" + _config2.default.soundcloud_client;\n }\n\n /*\n If the user want's to use soundcloud art, we overwrite the\n cover_art_url with the soundcloud artwork url.\n */\n if (_config2.default.soundcloud_use_art) {\n _config2.default.songs[index].cover_art_url = sound.artwork_url;\n\n if (addToShuffleList) {\n _config2.default.shuffle_list[index].cover_art_url = sound.artwork_url;\n }\n }\n\n /*\n Grab the extra metadata from soundcloud and bind it to the\n song. The user can get this through the public function:\n getActiveSongMetadata\n */\n _config2.default.songs[index].soundcloud_data = sound;\n\n if (addToShuffleList) {\n _config2.default.shuffle_list[index].soundcloud_data = sound;\n }\n }\n } else {\n if (playlist != null) {\n AmplitudeHelpers.writeDebugMessage(_config2.default.playlists[playlist].songs[index].name + \" by \" + _config2.default.playlists[playlist].songs[index].artist + \" is not streamable by the Soundcloud API\");\n } else {\n /*\n If not streamable, then we print a message to the user stating\n that the song with name X and artist X is not streamable. This\n gets printed ONLY if they have debug turned on.\n */\n AmplitudeHelpers.writeDebugMessage(_config2.default.songs[index].name + \" by \" + _config2.default.songs[index].artist + \" is not streamable by the Soundcloud API\");\n }\n }\n });\n }\n\n /**\n * Due to Soundcloud SDK being asynchronous, we need to scope the\n * index of the song in another function. The privateGetSoundcloudStreamableURLs\n * function does the actual iteration and scoping.\n *\n * @access private\n * @param {string} url \t\t- URL of the soundcloud song\n * @param {number} index \t- The index of the soundcloud song in the songs array.\n */\n function resolveStreamable(url, index) {\n SC.get(\"/resolve/?url=\" + url, function (sound) {\n /*\n If streamable we get the url and bind the client ID to the end\n so Amplitude can just stream the song normally. We then overwrite\n the url the user provided with the streamable URL.\n */\n if (sound.streamable) {\n _config2.default.songs[index].url = sound.stream_url + \"?client_id=\" + _config2.default.soundcloud_client;\n\n /*\n If the user want's to use soundcloud art, we overwrite the\n cover_art_url with the soundcloud artwork url.\n */\n if (_config2.default.soundcloud_use_art) {\n _config2.default.songs[index].cover_art_url = sound.artwork_url;\n }\n\n /*\n Grab the extra metadata from soundcloud and bind it to the\n song. The user can get this through the public function:\n getActiveSongMetadata\n */\n _config2.default.songs[index].soundcloud_data = sound;\n } else {\n /*\n If not streamable, then we print a message to the user stating\n that the song with name X and artist X is not streamable. This\n gets printed ONLY if they have debug turned on.\n */\n AmplitudeHelpers.writeDebugMessage(_config2.default.songs[index].name + \" by \" + _config2.default.songs[index].artist + \" is not streamable by the Soundcloud API\");\n }\n /*\n Increments the song ready counter.\n */\n _config2.default.soundcloud_songs_ready++;\n\n /*\n When all songs are accounted for, then amplitude is ready\n to rock and we set the rest of the config.\n */\n if (_config2.default.soundcloud_songs_ready == _config2.default.soundcloud_song_count) {\n _init2.default.setConfig(tempUserConfig);\n }\n });\n }\n\n /**\n * Determines if a given URL is a SoundCloud URL.\n *\n * @param {string} url - The URL to test if it's a SoundCloud URL.\n */\n function isSoundCloudURL(url) {\n var soundcloud_regex = /^https?:\\/\\/(soundcloud.com|snd.sc)\\/(.*)$/;\n\n return url.match(soundcloud_regex);\n }\n\n /*\n Returns the publically accessible methods\n */\n return {\n loadSoundCloud: loadSoundCloud,\n resolveIndividualStreamableURL: resolveIndividualStreamableURL,\n isSoundCloudURL: isSoundCloudURL\n };\n}();\n\n/**\n * Imports the initializer\n * @module init/AmplitudeInitializer\n */\nexports.default = SoundCloud;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Defines the Playback Speed Visual Elements Handler\n * @module visual/PlaybackSpeedElements\n */\nvar PlaybackSpeedElements = function () {\n /**\n * Sets all of the visual playback speed buttons to have the right class\n * to display the background image that represents the current playback\n * speed.\n *\n * @access public\n */\n function sync() {\n /*\n Gets all of the playback speed classes.\n */\n var playbackSpeedClasses = document.getElementsByClassName(\"amplitude-playback-speed\");\n\n /*\n Iterates over all of the playback speed classes\n applying the right speed class for visual purposes.\n */\n for (var i = 0; i < playbackSpeedClasses.length; i++) {\n /*\n Removes all of the old playback speed classes.\n */\n playbackSpeedClasses[i].classList.remove(\"amplitude-playback-speed-10\");\n playbackSpeedClasses[i].classList.remove(\"amplitude-playback-speed-15\");\n playbackSpeedClasses[i].classList.remove(\"amplitude-playback-speed-20\");\n\n /*\n Switch the current playback speed and apply the appropriate\n speed class.\n */\n switch (_config2.default.playback_speed) {\n case 1:\n playbackSpeedClasses[i].classList.add(\"amplitude-playback-speed-10\");\n break;\n case 1.5:\n playbackSpeedClasses[i].classList.add(\"amplitude-playback-speed-15\");\n break;\n case 2:\n playbackSpeedClasses[i].classList.add(\"amplitude-playback-speed-20\");\n break;\n }\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n sync: sync\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = PlaybackSpeedElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the shuffle elements\n * @module visual/ShuffleElements\n */\nvar ShuffleElements = function () {\n /**\n * Syncs the global shuffle button visual state.\n *\n * @access public\n */\n function syncMain() {\n /*\n Gets the shuffle buttons.\n */\n var shuffleButtons = document.getElementsByClassName(\"amplitude-shuffle\");\n\n /*\n Iterate over all of the shuffle buttons.\n */\n for (var i = 0; i < shuffleButtons.length; i++) {\n /*\n Ensure the shuffle button doesn't belong to a playlist. We have\n a separate method for that.\n */\n if (shuffleButtons[i].getAttribute(\"data-amplitude-playlist\") == null) {\n /*\n If the state of the player is shuffled on, true, then\n we add the 'amplitude-shuffle-on' class and remove the\n 'amplitude-shuffle-off' class. If the player is not shuffled\n then we do the opposite.\n */\n if (_config2.default.shuffle_on) {\n shuffleButtons[i].classList.add(\"amplitude-shuffle-on\");\n shuffleButtons[i].classList.remove(\"amplitude-shuffle-off\");\n } else {\n shuffleButtons[i].classList.add(\"amplitude-shuffle-off\");\n shuffleButtons[i].classList.remove(\"amplitude-shuffle-on\");\n }\n }\n }\n }\n\n /**\n * Syncs the playlist shuffle button visual state.\n *\n * @access public\n * @param {string} playlist - The playlist string the shuffle button belongs to.\n */\n function syncPlaylist(playlist) {\n /*\n Gets all of the shuffle buttons.\n */\n var shuffleButtons = document.querySelectorAll('.amplitude-shuffle[data-amplitude-playlist=\"' + playlist + '\"]');\n\n /*\n Iterate over all of the shuffle buttons\n */\n for (var i = 0; i < shuffleButtons.length; i++) {\n /*\n If the state of the playlist is shuffled on, true, then\n we add the 'amplitude-shuffle-on' class and remove the\n 'amplitude-shuffle-off' class. If the player is not shuffled\n then we do the opposite.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n shuffleButtons[i].classList.add(\"amplitude-shuffle-on\");\n shuffleButtons[i].classList.remove(\"amplitude-shuffle-off\");\n } else {\n shuffleButtons[i].classList.add(\"amplitude-shuffle-off\");\n shuffleButtons[i].classList.remove(\"amplitude-shuffle-on\");\n }\n }\n }\n\n /**\n * Returns public facing methods\n */\n return {\n syncMain: syncMain,\n syncPlaylist: syncPlaylist\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = ShuffleElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the syncing of the song played progress elements.\n *\n * @module visual/SongPlayedProgressElements\n */\nvar SongPlayedProgressElements = function () {\n /**\n * Syncs the song played progress bars. These are HTML5 progress elements.\n *\n * @access private\n * @param {number} songPlayedPercentage \t- The percentage of the song that has been played.\n */\n function sync(songPlayedPercentage) {\n syncGlobal(songPlayedPercentage);\n syncPlaylist(songPlayedPercentage);\n syncSong(songPlayedPercentage);\n syncSongInPlaylist(songPlayedPercentage);\n }\n\n /**\n * Sync how much has been played with a progress bar. This is the global progress bar.\n *\n * @access private\n * @param {number} songPlayedPercentage \t- The percent of the song completed.\n */\n function syncGlobal(percentage) {\n /*\n Ensure that the song completion percentage is a number\n */\n if (!isNaN(percentage)) {\n /*\n Get all of the song progress bars\n */\n var songPlayedProgressBars = document.querySelectorAll(\".amplitude-song-played-progress\");\n\n for (var i = 0; i < songPlayedProgressBars.length; i++) {\n var playlist = songPlayedProgressBars[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = songPlayedProgressBars[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n var max = songPlayedProgressBars[i].max;\n\n songPlayedProgressBars[i].value = percentage / 100 * max;\n }\n }\n }\n }\n\n /**\n * Sync how much has been played with a progress bar. This is the playlist progress bar.\n *\n * @access public\n * @param {number} songPlayedPercentage \t- The percent of the song completed.\n */\n function syncPlaylist(percentage) {\n /*\n Ensure that the song completion percentage is a number\n */\n if (!isNaN(percentage)) {\n /*\n Get all of the song progress bars\n */\n var songPlayedProgressBars = document.querySelectorAll('.amplitude-song-played-progress[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var i = 0; i < songPlayedProgressBars.length; i++) {\n var song = songPlayedProgressBars[i].getAttribute(\"data-amplitude-song-index\");\n\n if (song == null) {\n var max = songPlayedProgressBars[i].max;\n\n songPlayedProgressBars[i].value = percentage / 100 * max;\n }\n }\n }\n }\n\n /**\n * Sync how much has been played with a progress bar. This is for an individual song.\n *\n * @access private\n * @param {number} songPlayedPercentage \t- The percent of the song completed.\n */\n function syncSong(percentage) {\n if (_config2.default.active_playlist == null) {\n /*\n Ensure that the song completion percentage is a number\n */\n if (!isNaN(percentage)) {\n /*\n Get all of the song progress bars\n */\n var songPlayedProgressBars = document.querySelectorAll('.amplitude-song-played-progress[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n for (var i = 0; i < songPlayedProgressBars.length; i++) {\n var playlist = songPlayedProgressBars[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null) {\n var max = songPlayedProgressBars[i].max;\n\n songPlayedProgressBars[i].value = percentage / 100 * max;\n }\n }\n }\n }\n }\n\n /**\n * Sync how much has been played with a progress bar. This is for an individual song in playlist.\n *\n * @access private\n * @param {number} songPlayedPercentage \t- The percent of the song completed.\n */\n function syncSongInPlaylist(percentage) {\n /*\n Ensure that the song completion percentage is a number\n */\n if (!isNaN(percentage)) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n /*\n Get all of the song progress bars\n */\n var songPlayedProgressBars = document.querySelectorAll('.amplitude-song-played-progress[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n /*\n Iterates over all of the song played progress elements\n and sets them accordingly.\n */\n for (var i = 0; i < songPlayedProgressBars.length; i++) {\n var playlist = songPlayedProgressBars[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = songPlayedProgressBars[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist != null && songIndex != null) {\n var max = songPlayedProgressBars[i].max;\n\n songPlayedProgressBars[i].value = percentage / 100 * max;\n }\n }\n }\n }\n\n /**\n * Sets all of the song played progress bars to 0\n *\n * @access public\n */\n function resetElements() {\n var songPlayedProgressBars = document.getElementsByClassName(\"amplitude-song-played-progress\");\n\n for (var i = 0; i < songPlayedProgressBars.length; i++) {\n songPlayedProgressBars[i].value = 0;\n }\n }\n\n return {\n sync: sync,\n resetElements: resetElements\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = SongPlayedProgressElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; /**\n * Imports the config module\n * @module config\n */\n\n\n/**\n * AmplitudeJS Core Module\n * @module core/Core\n */\n\n\n/**\n * AmplitudeJS SoundCloud Module\n * @module soundcloud/SoundCloud\n */\n\n\n/**\n * Imports the utilities used by the main module.\n */\n/**\n * AmplitudeJS Config State Module\n * @module utilities/ConfigState\n */\n\n\n/**\n * AmplitudeJS Debug Module\n * @module utilities/Debug\n */\n\n\n/**\n * AmplitudeJS Checks Module\n * @module utilities/Checks\n */\n\n\n/**\n * AmplitudeJS Shuffler Module\n * @module utilities/Shuffler\n */\n\n\n/**\n * AmplitudeJS Events Module\n * @module events/Events\n */\n\n\n/**\n * AmplitudeJS FX Module\n * @module fx/Fx\n */\n\n\n/**\n * AmplitudeJS Visualizations Module\n * @module fx/Visualizations\n */\n\n\n/**\n * AmplitudeJS WaveForm Module\n * @module fx/WaveForm\n */\n\n\n/**\n * AmplitudeJS Audio Navigation Module.\n * @module utilities/AudioNavigation\n */\n\n\n/**\n * AmplitudeJS Callbacks Module\n * @module utilities/Callbacks\n */\n\n\n/**\n * AmplitudeJS Playlists Initializer Module\n * @module init/Playlists\n */\n\n\n/**\n * Imports the AmplitudeJS Shuffle Elements\n * @module visual/ShuffleElements\n */\n\n\n/**\n * Imports the AmplitudeJS Mute Elements\n * @module visual/MuteElements\n */\n\n\n/**\n * Imports the AmplitudeJS Volume Slider\n * @module visual/VolumeSliderElements\n */\n\n\n/**\n * Imports the AmplitudeJS Time Elements\n * @module visual/TimeElements\n */\n\n\n/**\n * Imports the AmplitudeJS Play/Pause Elements Module.\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the AmplitudeJS MetaData Elements Module.\n * @module visual/MetaDataElements\n */\n\n\n/**\n * Imports the AmplitudeJS PlaybackSpeedElements Module.\n * @module visual/PlayBackSpeedElements\n */\n\n\n/**\n * Imports the AmplitudeJS Repeat Element\n * @module visual/RepeatElements\n */\n\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _soundcloud = __webpack_require__(17);\n\nvar _soundcloud2 = _interopRequireDefault(_soundcloud);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _shuffler = __webpack_require__(13);\n\nvar _shuffler2 = _interopRequireDefault(_shuffler);\n\nvar _events = __webpack_require__(26);\n\nvar _events2 = _interopRequireDefault(_events);\n\nvar _fx = __webpack_require__(46);\n\nvar _fx2 = _interopRequireDefault(_fx);\n\nvar _visualizations = __webpack_require__(16);\n\nvar _visualizations2 = _interopRequireDefault(_visualizations);\n\nvar _waveform = __webpack_require__(22);\n\nvar _waveform2 = _interopRequireDefault(_waveform);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _callbacks = __webpack_require__(9);\n\nvar _callbacks2 = _interopRequireDefault(_callbacks);\n\nvar _playlists = __webpack_require__(48);\n\nvar _playlists2 = _interopRequireDefault(_playlists);\n\nvar _shuffleElements = __webpack_require__(19);\n\nvar _shuffleElements2 = _interopRequireDefault(_shuffleElements);\n\nvar _muteElements = __webpack_require__(10);\n\nvar _muteElements2 = _interopRequireDefault(_muteElements);\n\nvar _volumeSliderElements = __webpack_require__(11);\n\nvar _volumeSliderElements2 = _interopRequireDefault(_volumeSliderElements);\n\nvar _timeElements = __webpack_require__(15);\n\nvar _timeElements2 = _interopRequireDefault(_timeElements);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nvar _metaDataElements = __webpack_require__(7);\n\nvar _metaDataElements2 = _interopRequireDefault(_metaDataElements);\n\nvar _playbackSpeedElements = __webpack_require__(18);\n\nvar _playbackSpeedElements2 = _interopRequireDefault(_playbackSpeedElements);\n\nvar _repeatElements = __webpack_require__(8);\n\nvar _repeatElements2 = _interopRequireDefault(_repeatElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Initializer Module. Helps with the handling of all of the\n * initialization for AmplitudeJS.\n *\n * @module init/Initializer\n */\nvar Initializer = function () {\n /**\n * The main init function. The user will call this through\n * Amplitude.init({}) and pass in their settings.\n *\n * Public Accessor: Amplitude.init( user_config_json )\n * @access public\n * @param {object} userConfig - A JSON object of user defined values that help configure and initialize AmplitudeJS.\n */\n function initialize(userConfig) {\n var ready = false;\n\n /*\n Reset the config on init so we have a clean slate. This is if the\n user has to re-init.\n */\n _configState2.default.resetConfig();\n\n /*\n Initialize event handlers on init. This will clear any old\n event handlers on the amplitude element and re-bind what is\n necessary.\n */\n _events2.default.initialize();\n\n /*\n Initialize the callbacks we listen to for the audio object.\n */\n _callbacks2.default.initialize();\n\n /*\n Initializes debugging right away so we can use it for the rest\n of the configuration.\n */\n _config2.default.debug = userConfig.debug != undefined ? userConfig.debug : false;\n\n /*\n Set default artwork, if specified.\n */\n setArt(userConfig);\n\n /*\n Checks to see if the user has songs defined.\n */\n if (userConfig.songs) {\n /*\n Checks to see if the user has some songs in the songs array.\n */\n if (userConfig.songs.length != 0) {\n /*\n Copies over the user defined songs. and prepares\n Amplitude for the rest of the configuration.\n */\n _config2.default.songs = userConfig.songs;\n /*\n Flag amplitude as ready.\n */\n ready = true;\n } else {\n _debug2.default.writeMessage(\"Please add some songs, to your songs object!\");\n }\n } else {\n _debug2.default.writeMessage(\"Please provide a songs object for AmplitudeJS to run!\");\n }\n\n /*\n Initializes the audio context. In this method it checks to see if the\n user wants to use visualizations or not before proceeding.\n */\n if (_fx2.default.webAudioAPIAvailable()) {\n if (_fx2.default.determineUsingAnyFX()) {\n /*\n Configure the Web Audio API If It's available.\n */\n _fx2.default.configureWebAudioAPI();\n\n /*\n Activates the audio context after an event for the user.\n */\n document.documentElement.addEventListener(\"mousedown\", function () {\n if (_config2.default.context.state !== \"running\") {\n _config2.default.context.resume();\n }\n });\n\n document.documentElement.addEventListener(\"keydown\", function () {\n if (_config2.default.context.state !== \"running\") {\n _config2.default.context.resume();\n }\n });\n\n document.documentElement.addEventListener(\"keyup\", function () {\n if (_config2.default.context.state !== \"running\") {\n _config2.default.context.resume();\n }\n });\n\n /*\n Set the user waveform settings if provided.\n */\n if (userConfig.waveforms != undefined && userConfig.waveforms.sample_rate != undefined) {\n _config2.default.waveforms.sample_rate = userConfig.waveforms.sample_rate;\n }\n\n /*\n Initialize the waveform.\n */\n _waveform2.default.init();\n\n /*\n If the user is registering visualizations on init,\n we set them right away.\n */\n if (userConfig.visualizations != undefined && userConfig.visualizations.length > 0) {\n /*\n Iterate over all of the visualizations and\n register them in our player.\n */\n for (var i = 0; i < userConfig.visualizations.length; i++) {\n _visualizations2.default.register(userConfig.visualizations[i].object, userConfig.visualizations[i].params);\n }\n }\n }\n } else {\n _debug2.default.writeMessage(\"The Web Audio API is not available on this platform. We are using your defined backups!\");\n }\n\n /*\n Initialize default live settings\n */\n initializeDefaultLiveSettings();\n\n /*\n Initialize default song indexes\n */\n initializeDefaultSongIndexes();\n\n /*\n When the preliminary config is ready, we are ready to proceed.\n */\n if (ready) {\n /*\n Copies over the soundcloud information to the global config\n which will determine where we go from there.\n */\n _config2.default.soundcloud_client = userConfig.soundcloud_client != undefined ? userConfig.soundcloud_client : \"\";\n\n /*\n Checks if we want to use the art loaded from soundcloud.\n */\n _config2.default.soundcloud_use_art = userConfig.soundcloud_use_art != undefined ? userConfig.soundcloud_use_art : \"\";\n\n /*\n If the user provides a soundcloud client then we assume that\n there are URLs in their songs that will reference SoundCloud.\n We then copy over the user config they provided to the\n temp_user_config so we don't mess up the global or their configs\n and load the soundcloud information.\n */\n var tempUserConfig = {};\n\n /*\n If there's a soundcloud_client key set, we load the SoundCloud data\n for all of the songs in the array.\n */\n if (_config2.default.soundcloud_client != \"\") {\n tempUserConfig = userConfig;\n\n /*\n Load up SoundCloud for use with AmplitudeJS.\n */\n _soundcloud2.default.loadSoundCloud(tempUserConfig);\n } else {\n /*\n The user is not using Soundcloud with Amplitude at this point\n so we just finish the configuration with the users's preferences.\n */\n setConfig(userConfig);\n }\n }\n\n /*\n Debug out what was initialized with AmplitudeJS.\n */\n _debug2.default.writeMessage(\"Initialized With: \");\n _debug2.default.writeMessage(_config2.default);\n }\n\n /**\n * Rebinds all of the elements in the display.\n *\n * Public Accessor: Amplitude.rebindDisplay()\n * @access public\n */\n function rebindDisplay() {\n _events2.default.initialize();\n _metaDataElements2.default.displayMetaData();\n }\n\n /**\n * Finishes the initalization of the config. Takes all of the user defined\n * parameters and makes sure they override the defaults. The important\n * config information is assigned in the publicInit() function.\n *\n * This function can be called from 2 different locations:\n * \t1. Right away on init after the important settings are defined.\n *\n * \t2. After all of the Soundcloud URLs are resolved properly and\n *\t \tsoundcloud is configured. We will need the proper URLs from Soundcloud\n * \t\tto stream through Amplitude so we get those right away before we\n * \t\tset the information and the active song\n *\n * @access public\n * @param {object} userConfig - A JSON object of user defined values that help configure and initialize AmplitudeJS.\n */\n function setConfig(userConfig) {\n /*\n Checks if the user has any playlists defined. If they do\n we have to initialize the functionality for the playlists.\n */\n if (userConfig.playlists && countPlaylists(userConfig.playlists) > 0) {\n _playlists2.default.initialize(userConfig.playlists);\n }\n\n /*\n Check to see if the user entered a start song\n */\n if (userConfig.start_song != undefined && !userConfig.starting_playlist) {\n /*\n Ensure what has been entered is an integer.\n */\n if (_checks2.default.isInt(userConfig.start_song)) {\n _audioNavigation2.default.changeSong(_config2.default.songs[userConfig.start_song], userConfig.start_song);\n } else {\n _debug2.default.writeMessage(\"You must enter an integer index for the start song.\");\n }\n } else {\n _audioNavigation2.default.changeSong(_config2.default.songs[0], 0);\n }\n\n /*\n If the shuffle is on by default, shuffle the songs and\n switch to the shuffled song.\n */\n if (userConfig.shuffle_on != undefined && userConfig.shuffle_on) {\n _config2.default.shuffle_on = true;\n _shuffler2.default.shuffleSongs();\n\n _audioNavigation2.default.changeSong(_config2.default.shuffle_list[0], 0);\n }\n\n /*\n Allows the user to set whether they want to continue to the next song\n when the current song finishes or not. In any scenario that's not a playlist,\n contining to the next song may not be desired.\n */\n _config2.default.continue_next = userConfig.continue_next != undefined ? userConfig.continue_next : true;\n\n /*\n If the user defined a playback speed, we copy over their\n preference here, otherwise we default to normal playback\n speed of 1.0.\n */\n _config2.default.playback_speed = userConfig.playback_speed != undefined ? userConfig.playback_speed : 1.0;\n\n /*\n Sets the audio playback speed.\n */\n _core2.default.setPlaybackSpeed(_config2.default.playback_speed);\n\n /*\n If the user wants the song to be pre-loaded for instant\n playback, they set it to true. By default it's set to just\n load the metadata.\n */\n _config2.default.audio.preload = userConfig.preload != undefined ? userConfig.preload : \"auto\";\n\n /*\n Initializes the user defined callbacks. This should be a JSON\n object that contains a key->value store of the callback name\n and the name of the function the user needs to call.\n */\n _config2.default.callbacks = userConfig.callbacks != undefined ? userConfig.callbacks : {};\n\n /*\n Initializes the user defined key bindings. This should be a JSON\n object that contains a key->value store of the key event number\n pressed and the method to be run.\n */\n _config2.default.bindings = userConfig.bindings != undefined ? userConfig.bindings : {};\n\n /*\n The user can define a starting volume in a range of 0-100 with\n 0 being muted and 100 being the loudest. After the config is set\n Amplitude sets the active song's volume to the volume defined\n by the user.\n */\n _config2.default.volume = userConfig.volume != undefined ? userConfig.volume : 50;\n\n /*\n Sets the delay between songs if the user has it set. This should be in MS.\n */\n _config2.default.delay = userConfig.delay != undefined ? userConfig.delay : 0;\n\n /*\n The user can set the volume increment and decrement values between 1 and 100\n for when the volume up or down button is pressed. The default is an increase\n or decrease of 5.\n */\n _config2.default.volume_increment = userConfig.volume_increment != undefined ? userConfig.volume_increment : 5;\n\n _config2.default.volume_decrement = userConfig.volume_decrement != undefined ? userConfig.volume_decrement : 5;\n\n /*\n Set the volume to what is defined in the config. The user can define this,\n so we should set it up that way.\n */\n _core2.default.setVolume(_config2.default.volume);\n\n /*\n Set default artwork, if specified\n */\n setArt(userConfig);\n\n /*\n Initialize the visual elements\n */\n initializeElements();\n\n /*\n If the user has selected a starting playlist, we need to set the starting playlist\n and sync the visuals\n */\n if (userConfig.starting_playlist != undefined && userConfig.starting_playlist != \"\") {\n /*\n Set the active playlist to the starting playlist by the user\n */\n _config2.default.active_playlist = userConfig.starting_playlist;\n\n /*\n Check if the user defined a song to start with in the playlist.\n */\n if (userConfig.starting_playlist_song != undefined && userConfig.starting_playlist_song != \"\") {\n /*\n Ensure the song is a valid index.\n */\n if (_typeof(userConfig.playlists[userConfig.starting_playlist].songs[parseInt(userConfig.starting_playlist_song)]) != undefined) {\n /*\n Set the player to the song defined by the user.\n */\n _audioNavigation2.default.changeSongPlaylist(_config2.default.active_playlist, userConfig.playlists[userConfig.starting_playlist].songs[parseInt(userConfig.starting_playlist_song)], parseInt(userConfig.starting_playlist_song));\n } else {\n /*\n Set the player to the first song in the playlist\n */\n _audioNavigation2.default.changeSongPlaylist(_config2.default.active_playlist, userConfig.playlists[userConfig.starting_playlist].songs[0], 0);\n /*\n Debug that the song index doesn't exist\n */\n _debug2.default.writeMessage(\"The index of \" + userConfig.starting_playlist_song + \" does not exist in the playlist \" + userConfig.starting_playlist);\n }\n } else {\n /*\n Set the player to the first song in the playlist\n */\n _audioNavigation2.default.changeSong(_config2.default.active_playlist, userConfig.playlists[userConfig.starting_playlist].songs[0], 0);\n }\n\n /*\n Sync the main and song play pause buttons.\n */\n _playPauseElements2.default.sync();\n }\n\n /*\n Run after init callback\n */\n _callbacks2.default.run(\"initialized\");\n }\n\n /**\n * Sets the default_album_art and default_playlist_art from the\n * user supplied configuration.\n *\n * @access public\n * @param {object} userConfig - A JSON object of user defined values that help configure and initialize AmplitudeJS.\n */\n function setArt(userConfig) {\n /*\n If the user defines default album art, this image will display if the active\n song doesn't have album art defined.\n */\n if (userConfig.default_album_art != undefined) {\n _config2.default.default_album_art = userConfig.default_album_art;\n } else {\n _config2.default.default_album_art = \"\";\n }\n\n /*\n If the user defines default playlist art, this image will display if the user\n tries to set up a playlist meta data image tag but doesn't have one defined.\n */\n if (userConfig.default_playlist_art != undefined) {\n _config2.default.default_playlist_art = userConfig.default_playlist_art;\n } else {\n _config2.default.default_playlist_art = \"\";\n }\n }\n\n /**\n * Initializes all of the elements on the page to the default starting point\n * to build from there.\n *\n * @access private\n */\n function initializeElements() {\n /*\n Visually sync the shuffle statuses\n */\n _shuffleElements2.default.syncMain();\n\n /*\n Sync Mute Elements.\n */\n _muteElements2.default.setMuted(_config2.default.volume == 0 ? true : false);\n\n /*\n Sync Volume Slider Elements\n */\n _volumeSliderElements2.default.sync();\n\n /*\n Syncs all of the playback speed elements.\n */\n _playbackSpeedElements2.default.sync();\n\n /*\n Syncs all of the visual time elements to 00.\n */\n _timeElements2.default.resetCurrentTimes();\n\n /*\n Sets all of the play pause buttons to pause.\n */\n _playPauseElements2.default.syncToPause();\n\n /*\n Sets the meta data for the songs automatically.\n */\n _metaDataElements2.default.syncMetaData();\n\n /*\n Sets the repeat buttons automatically.\n */\n _repeatElements2.default.syncRepeatSong();\n }\n\n /**\n * Counts the number of playlists the user has configured. This ensures\n * that the user has at least 1 playlist so we can validate the songs\n * defined in the playlist are correct and they didn't enter an invalid\n * ID.\n *\n * @access private\n * @param {object} playlists \t-\n */\n function countPlaylists(playlists) {\n /*\n Initialize the placeholders to iterate through the playlists\n and find out how many we have to account for.\n */\n var size = 0,\n key = void 0;\n\n /*\n Iterate over playlists and if the user has the playlist defined,\n increment the size of playlists.\n */\n for (key in playlists) {\n if (playlists.hasOwnProperty(key)) {\n size++;\n }\n }\n\n /*\n Debug how many playlists are in the config.\n */\n _debug2.default.writeMessage(\"You have \" + size + \" playlist(s) in your config\");\n\n /*\n Return the number of playlists in the config.\n */\n return size;\n }\n\n /**\n * Intializes the default live settings for all of the songs.\n *\n * @access private\n */\n function initializeDefaultLiveSettings() {\n for (var i = 0; i < _config2.default.songs.length; i++) {\n if (_config2.default.songs[i].live == undefined) {\n _config2.default.songs[i].live = false;\n }\n }\n }\n\n /**\n * Initializes the index of the song in the songs array so\n * we can reference it if needed\n *\n * @access private\n */\n function initializeDefaultSongIndexes() {\n for (var i = 0; i < _config2.default.songs.length; i++) {\n _config2.default.songs[i].index = i;\n }\n }\n\n /*\n Returns the publicly accessible methods\n */\n return {\n initialize: initialize,\n setConfig: setConfig,\n rebindDisplay: rebindDisplay\n };\n}();\n\nexports.default = Initializer;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Builds a waveform for the current audio.\n * Help from: https://robots.thoughtbot.com/javascript-audio-api\n * https://stackoverflow.com/questions/21347833/html-svg-not-drawing-works-in-other-pages\n */\nvar WaveForm = function () {\n /*\n Initialize the local variables used in the Waveform.\n */\n var buffer = \"\";\n var sampleRate = \"\";\n var peaks = \"\";\n\n function init() {\n sampleRate = _config2.default.waveforms.sample_rate;\n\n /*\n Grabs all of the waveform elements on the page.\n */\n var waveforms = document.querySelectorAll(\".amplitude-wave-form\");\n\n /*\n If there are waveforms, we iterate over them and set them up to display\n properly.\n */\n if (waveforms.length > 0) {\n /*\n Iterate over all of the waveforms and build the SVG parts.\n */\n for (var i = 0; i < waveforms.length; i++) {\n /*\n Clear the inner HTML of the element if we are replacing the waveform.\n */\n waveforms[i].innerHTML = \"\";\n\n /*\n Inserts an SVG into the element.\n */\n var svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n svg.setAttribute(\"viewBox\", \"0 -1 \" + sampleRate + \" 2\");\n svg.setAttribute(\"preserveAspectRatio\", \"none\");\n\n /*\n Add a g component to the SVG\n */\n var g = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svg.appendChild(g);\n\n /*\n Add a path component to the g\n */\n var path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n path.setAttribute(\"d\", \"\");\n path.setAttribute(\"id\", \"waveform\");\n\n g.appendChild(path);\n\n /*\n Append the SVG to the waveform.\n */\n waveforms[i].appendChild(svg);\n }\n }\n }\n\n /**\n * Builds each waveform for the page.\n */\n function build() {\n if (_config2.default.web_audio_api_available) {\n /*\n If we don't have the wave form built, we need to build the waveform by loading\n the src with an array buffer.\n */\n if (_config2.default.waveforms.built[Math.abs(_config2.default.audio.src.split(\"\").reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0);\n return a & a;\n }, 0))] == undefined) {\n /*\n Initializes a new XML Http Request.\n */\n var req = new XMLHttpRequest();\n\n /*\n Opens the src parameter for the audio file to read in.\n */\n req.open(\"GET\", _config2.default.audio.src, true);\n req.responseType = \"arraybuffer\";\n\n /*\n When the ready state changes, check to see if we can render the\n wave form.\n */\n req.onreadystatechange = function (e) {\n /*\n When the request is complete, then we begin decoding the\n audio to build the waveform.\n */\n if (req.readyState == 4) {\n /*\n If the status is 200 means the response is a success and\n we decode the audio data.\n */\n if (req.status == 200) {\n /*\n Decode the audio data and process the waveform.\n */\n _config2.default.context.decodeAudioData(req.response, function (bufferedAudio) {\n /*\n Set the buffer to the audio returned.\n */\n buffer = bufferedAudio;\n\n /*\n Get the peaks in the audio.\n */\n peaks = getPeaks(sampleRate, buffer);\n\n /*\n Build the SVG\n */\n process(sampleRate, buffer, peaks);\n });\n }\n }\n };\n req.send();\n } else {\n /*\n If we already have a waveform, we grab the waveform that\n was created for the song and display it. We do a simple hash\n of the song URL so it's already unique.\n */\n displayWaveForms(_config2.default.waveforms.built[Math.abs(_config2.default.audio.src.split(\"\").reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0);\n return a & a;\n }, 0))]);\n }\n }\n }\n\n /**\n * Processes the audio and generates the waveform.\n *\n * @param {sampleRate} sampleRate - The rate we should sample the audio.\n * @param {arraybuffer} buffer - The Web Audio API\n * @param {array} peaks - The peaks in the audio.\n */\n function process(sampleRate, buffer, peaks) {\n /*\n If we have a buffer, we find the peaks in the audio.\n */\n if (buffer) {\n /*\n Get the total peaks in the song.\n */\n var totalPeaks = peaks.length;\n\n /*\n Figure out the depth of the peak.\n */\n var d = \"\";\n for (var peakNumber = 0; peakNumber < totalPeaks; peakNumber++) {\n if (peakNumber % 2 === 0) {\n d += \" M\" + ~~(peakNumber / 2) + \", \" + peaks.shift();\n } else {\n d += \" L\" + ~~(peakNumber / 2) + \", \" + peaks.shift();\n }\n }\n\n /*\n Add the waveform to the built waveforms array.\n */\n _config2.default.waveforms.built[Math.abs(_config2.default.audio.src.split(\"\").reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0);\n return a & a;\n }, 0))] = d;\n\n /*\n Display the waveform.\n */\n displayWaveForms(_config2.default.waveforms.built[Math.abs(_config2.default.audio.src.split(\"\").reduce(function (a, b) {\n a = (a << 5) - a + b.charCodeAt(0);\n return a & a;\n }, 0))]);\n }\n }\n\n /**\n * Get the peaks of the audio for the waveform.\n *\n * @param {number} length - The sample size of the audio.\n * @param {array} buffer - The array buffer used to find the peaks in the audio.\n */\n function getPeaks(length, buffer) {\n /*\n Set the parameters needed to build the SVG.\n */\n var sampleSize = buffer.length / length;\n var sampleStep = ~~(sampleSize / 10) || 1;\n var numberOfChannels = buffer.numberOfChannels;\n var mergedPeaks = [];\n\n /*\n Iterate over the channels and find the peaks.\n */\n for (var channelNumber = 0; channelNumber < numberOfChannels; channelNumber++) {\n /*\n Initialize the peaks array and set the channel data to what\n the buffer has in its channel data.\n */\n var _peaks = [];\n var channelData = buffer.getChannelData(channelNumber);\n\n /*\n Iterate over peaks with respect to the sample size.\n */\n for (var peakNumber = 0; peakNumber < length; peakNumber++) {\n /*\n Gt the start and end peak.\n */\n var start = ~~(peakNumber * sampleSize);\n var end = ~~(start + sampleSize);\n\n /*\n Set min and max to the channel data first peak.\n */\n var min = channelData[0];\n var max = channelData[0];\n\n /*\n Iterate over the parts of the song starting to the\n ending to display the waveform.\n */\n for (var sampleIndex = start; sampleIndex < end; sampleIndex += sampleStep) {\n var value = channelData[sampleIndex];\n\n if (value > max) {\n max = value;\n }\n if (value < min) {\n min = value;\n }\n }\n\n /*\n Set the max and min for the peak.\n */\n _peaks[2 * peakNumber] = max;\n _peaks[2 * peakNumber + 1] = min;\n\n /*\n Merge the peaks\n */\n if (channelNumber === 0 || max > mergedPeaks[2 * peakNumber]) {\n mergedPeaks[2 * peakNumber] = max;\n }\n\n if (channelNumber === 0 || min < mergedPeaks[2 * peakNumber + 1]) {\n mergedPeaks[2 * peakNumber + 1] = min;\n }\n }\n }\n\n /*\n Returns the merged peaks.\n */\n return mergedPeaks;\n }\n\n /**\n * Displays all of the waveforms necessary.\n *\n * @param {path} svg - The drawing of the waveform.\n */\n function displayWaveForms(svg) {\n var waveformElements = document.querySelectorAll(\".amplitude-wave-form\");\n\n /*\n Iterate over all of the waveform elements and\n display the waveform.\n */\n for (var i = 0; i < waveformElements.length; i++) {\n /*\n Get the playlist attribute of the waveform element.\n */\n var playlist = waveformElements[i].getAttribute(\"data-amplitude-playlist\");\n\n /*\n Get the song index attribute of the waveform element.\n */\n var song = waveformElements[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n If the playlist is null and the song is null it's a global element.\n */\n if (playlist == null && song == null) {\n displayGlobalWaveform(waveformElements[i], svg);\n }\n\n /*\n If the playlist is defined but the song is null it's a playlist element.\n */\n if (playlist != null && song == null) {\n displayPlaylistWaveform(waveformElements[i], svg, playlist);\n }\n\n /*\n If the playlist is not defined and the song is not null it's a song\n element.\n */\n if (playlist == null && song != null) {\n displaySongWaveform(waveformElements[i], svg, song);\n }\n\n /*\n If the playlist and song are defined it's a song in the playlist element.\n */\n if (playlist != null && song != null) {\n displaySongInPlaylistWaveform(waveformElements[i], svg, playlist, song);\n }\n }\n }\n\n /**\n * Displays a global wave form.\n *\n * @param {Node} element - Element to display the waveform in.\n * @param {SVG} svg - The waveform path.\n */\n function displayGlobalWaveform(element, svg) {\n var waveformPath = element.querySelector(\"svg g path\");\n\n waveformPath.setAttribute(\"d\", svg);\n }\n\n /**\n * Displays a playlist wave form.\n *\n * @param {Node} element - Element to display the waveform in.\n * @param {SVG} svg - The waveform path.\n * @param {string} playlist - The playlist we are displaying the waveform for.\n */\n function displayPlaylistWaveform(element, svg, playlist) {\n /*\n Ensure the playlist is the active playlist.\n */\n if (_config2.default.active_playlist == playlist) {\n var waveformPath = element.querySelector(\"svg g path\");\n\n waveformPath.setAttribute(\"d\", svg);\n }\n }\n\n /**\n * Displays a song wave form.\n *\n * @param {Node} element - Element to display the waveform in.\n * @param {SVG} svg - The waveform path.\n * @param {Integer} song - The index of the song we are displaying the\n * waveform for.\n */\n function displaySongWaveform(element, svg, song) {\n /*\n Ensure it's the active song being displayed.\n */\n if (_config2.default.active_index == song) {\n var waveformPath = element.querySelector(\"svg g path\");\n\n waveformPath.setAttribute(\"d\", svg);\n }\n }\n\n /**\n * Displays a song in playlist waveform.\n *\n * @param {Node} element - Element to display the waveform in.\n * @param {SVG} svg - The waveform path.\n * @param {String} playlist - The playlist the waveform is in.\n * @param {Integer} song - The index of the song we are displaying the waveform for.\n */\n function displaySongInPlaylistWaveform(element, svg, playlist, song) {\n /*\n Ensure it's the active song in the active playlist.\n */\n if (_config2.default.active_playlist == playlist && _config2.default.playlists[_config2.default.active_playlist].active_index == song) {\n var waveformPath = element.querySelector(\"svg g path\");\n\n waveformPath.setAttribute(\"d\", svg);\n }\n }\n\n /**\n * Determines if the user is using waveforms\n */\n function determineIfUsingWaveforms() {\n var waveforms = document.querySelectorAll(\".amplitude-wave-form\");\n\n if (waveforms.length > 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /*\n Return the public methods.\n */\n return {\n init: init,\n build: build,\n determineIfUsingWaveforms: determineIfUsingWaveforms\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = WaveForm;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The utility to handle the computation of time in AmplitudeJS.\n * @module utilities/Time\n */\nvar Time = function () {\n /**\n * Computes the current song time. Breaks down where the song is into\n * hours, minutes, seconds and formats it to be displayed to the user.\n *\n * @access public\n */\n function computeCurrentTimes() {\n /*\n Initialize the current time object that will be returned.\n */\n var currentTime = {};\n\n /*\n Computes the current seconds for the song.\n */\n var currentSeconds = (Math.floor(_config2.default.audio.currentTime % 60) < 10 ? \"0\" : \"\") + Math.floor(_config2.default.audio.currentTime % 60);\n\n /*\n Computes the current minutes for the song.\n */\n var currentMinutes = Math.floor(_config2.default.audio.currentTime / 60);\n\n /*\n Initialize the current hours variable.\n */\n var currentHours = \"00\";\n\n /*\n If the current minutes is less than 10, we add a leading 0.\n */\n if (currentMinutes < 10) {\n currentMinutes = \"0\" + currentMinutes;\n }\n\n /*\n If the user is more than 60 minutes into the song, then\n we extract the hours.\n */\n if (currentMinutes >= 60) {\n currentHours = Math.floor(currentMinutes / 60);\n currentMinutes = currentMinutes % 60;\n\n /*\n If the user is less than 10 minutes in, we append the\n additional 0 to the minutes.\n */\n if (currentMinutes < 10) {\n currentMinutes = \"0\" + currentMinutes;\n }\n }\n\n /*\n Build a clean current time object and send back the appropriate information.\n */\n currentTime.seconds = currentSeconds;\n currentTime.minutes = currentMinutes;\n currentTime.hours = currentHours;\n\n return currentTime;\n }\n\n /**\n * Computes the current song duration. Breaks down where the song is into\n * hours, minutes, seconds and formats it to be displayed to the user.\n *\n * @access public\n */\n function computeSongDuration() {\n /*\n Initialize the song duration object that will be returned.\n */\n var songDuration = {};\n\n /*\n Computes the duration of the song's seconds.\n */\n var songDurationSeconds = (Math.floor(_config2.default.audio.duration % 60) < 10 ? \"0\" : \"\") + Math.floor(_config2.default.audio.duration % 60);\n\n /*\n Computes the duration of the song's minutes.\n */\n var songDurationMinutes = Math.floor(_config2.default.audio.duration / 60);\n\n /*\n Initialize the hours duration variable.\n */\n var songDurationHours = \"00\";\n\n /*\n If the song duration minutes is less than 10, we add a leading 0.\n */\n if (songDurationMinutes < 10) {\n songDurationMinutes = \"0\" + songDurationMinutes;\n }\n\n /*\n If there is more than 60 minutes in the song, then we\n extract the hours.\n */\n if (songDurationMinutes >= 60) {\n songDurationHours = Math.floor(songDurationMinutes / 60);\n songDurationMinutes = songDurationMinutes % 60;\n\n /*\n If the song duration minutes is less than 10 we append\n the additional 0.\n */\n if (songDurationMinutes < 10) {\n songDurationMinutes = \"0\" + songDurationMinutes;\n }\n }\n\n /*\n Build a clean song duration object and send back the appropriate information.\n */\n songDuration.seconds = isNaN(songDurationSeconds) ? \"00\" : songDurationSeconds;\n songDuration.minutes = isNaN(songDurationMinutes) ? \"00\" : songDurationMinutes;\n songDuration.hours = isNaN(songDurationHours) ? \"00\" : songDurationHours.toString();\n\n return songDuration;\n }\n\n /**\n * Computes the song completion percentage.\n *\n * @access public\n */\n function computeSongCompletionPercentage() {\n return _config2.default.audio.currentTime / _config2.default.audio.duration * 100;\n }\n\n /**\n * Sets the current time for the audio.\n *\n * @access public\n */\n function setCurrentTime(time) {\n /*\n If the song is not live, we can set the current time.\n */\n if (!_config2.default.active_metadata.live) {\n /*\n Makes sure the number is finite to set the time.\n */\n if (isFinite(time)) {\n _config2.default.audio.currentTime = time;\n }\n }\n }\n\n /**\n * Defines what is returned by the module\n */\n return {\n computeCurrentTimes: computeCurrentTimes,\n computeSongDuration: computeSongDuration,\n computeSongCompletionPercentage: computeSongCompletionPercentage,\n setCurrentTime: setCurrentTime\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = Time;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Visual Handler for Buffered Progress Elements\n *\n * @module visual/BufferedProgressElements\n */\nvar BufferedProgressElements = function () {\n /**\n * Syncs the buffered progress bars to the current percentage in the config\n *\n * @access public\n */\n function sync() {\n syncGlobal();\n syncPlaylist();\n syncSong();\n syncSongInPlaylist();\n }\n\n /**\n * Sync the global song buffered progress elements.\n */\n function syncGlobal() {\n /*\n Gets all of the song buffered progress bars.\n */\n var songBufferedProgressBars = document.getElementsByClassName(\"amplitude-buffered-progress\");\n\n /*\n Iterate over all of the song buffered progress bar and\n set them to 0 which is like re-setting them.\n */\n for (var i = 0; i < songBufferedProgressBars.length; i++) {\n var playlist = songBufferedProgressBars[i].getAttribute(\"data-amplitude-playlist\");\n var song = songBufferedProgressBars[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && song == null && !isNaN(_config2.default.buffered)) {\n songBufferedProgressBars[i].value = parseFloat(parseFloat(_config2.default.buffered) / 100);\n }\n }\n }\n\n /**\n * Sync the playlist song buffered progress elements.\n */\n function syncPlaylist() {\n /*\n Gets all of the song buffered progress bars.\n */\n var songBufferedProgressBarsPlaylist = document.querySelectorAll('.amplitude-buffered-progress[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Iterate over all of the song buffered progress bar and\n set them to 0 which is like re-setting them.\n */\n for (var i = 0; i < songBufferedProgressBarsPlaylist.length; i++) {\n var song = songBufferedProgressBarsPlaylist[i].getAttribute(\"data-amplitude-song-index\");\n\n if (song == null && !isNaN(_config2.default.buffered)) {\n songBufferedProgressBarsPlaylist[i].value = parseFloat(parseFloat(_config2.default.buffered) / 100);\n }\n }\n }\n\n /**\n * Sync the song song buffered progress elements.\n */\n function syncSong() {\n /*\n Gets all of the song buffered progress bars.\n */\n var songBufferedProgressBarsSongs = document.querySelectorAll('.amplitude-buffered-progress[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n /*\n Iterate over all of the song buffered progress bar and\n set them to 0 which is like re-setting them.\n */\n for (var i = 0; i < songBufferedProgressBarsSongs.length; i++) {\n var playlist = songBufferedProgressBarsSongs[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null && !isNaN(_config2.default.buffered)) {\n songBufferedProgressBarsSongs[i].value = parseFloat(parseFloat(_config2.default.buffered) / 100);\n }\n }\n }\n\n /**\n * Sync the song in playlist song buffered progress elements.\n */\n function syncSongInPlaylist() {\n var activePlaylistIndex = _config2.default.active_playlist != null && _config2.default.active_playlist != \"\" ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n /*\n Gets all of the song buffered progress bars.\n */\n var songBufferedProgressBarsSongsInPlaylist = document.querySelectorAll('.amplitude-buffered-progress[data-amplitude-song-index=\"' + activePlaylistIndex + '\"][data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Iterate over all of the song buffered progress bar and\n set them to 0 which is like re-setting them.\n */\n for (var i = 0; i < songBufferedProgressBarsSongsInPlaylist.length; i++) {\n if (!isNaN(_config2.default.buffered)) {\n songBufferedProgressBarsSongsInPlaylist[i].value = parseFloat(parseFloat(_config2.default.buffered) / 100);\n }\n }\n }\n\n /**\n * Sets all of the song buffered progress bars to 0\n *\n * @access public\n */\n function reset() {\n /*\n Gets all of the song buffered progress bars.\n */\n var songBufferedProgressBars = document.getElementsByClassName(\"amplitude-buffered-progress\");\n\n /*\n Iterate over all of the song buffered progress bar and\n set them to 0 which is like re-setting them.\n */\n for (var i = 0; i < songBufferedProgressBars.length; i++) {\n songBufferedProgressBars[i].value = 0;\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n sync: sync,\n reset: reset\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = BufferedProgressElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Ended Module. Handles the ended event on the audio.\n *\n * @module events/Ended\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/Core\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Ended = function () {\n /**\n * When the song has ended, handles what to do next\n *\n * HANDLER FOR: ended\n *\n * @access public\n */\n function handle() {\n /*\n Sets the time out for song ended. This determines if\n we should go to the next song or delay between songs.\n */\n setTimeout(function () {\n /*\n If we continue next, we should move to the next song in the playlist.\n */\n if (_config2.default.continue_next) {\n /*\n If the active playlist is not set, we set the\n next song that's in the songs array.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n _audioNavigation2.default.setNext(true);\n } else {\n _audioNavigation2.default.setNextPlaylist(_config2.default.active_playlist, true);\n }\n } else {\n if (!_config2.default.is_touch_moving) {\n /*\n Stops the active song.\n */\n _core2.default.stop();\n\n /*\n Sync the play pause elements.\n */\n _playPauseElements2.default.sync();\n }\n }\n }, _config2.default.delay);\n }\n\n /*\n Returns the public facing methods.\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Play Pause Elements\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\nexports.default = Ended;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _keydown = __webpack_require__(27);\n\nvar _keydown2 = _interopRequireDefault(_keydown);\n\nvar _timeUpdate = __webpack_require__(42);\n\nvar _timeUpdate2 = _interopRequireDefault(_timeUpdate);\n\nvar _ended = __webpack_require__(25);\n\nvar _ended2 = _interopRequireDefault(_ended);\n\nvar _progress = __webpack_require__(35);\n\nvar _progress2 = _interopRequireDefault(_progress);\n\nvar _play = __webpack_require__(31);\n\nvar _play2 = _interopRequireDefault(_play);\n\nvar _pause = __webpack_require__(30);\n\nvar _pause2 = _interopRequireDefault(_pause);\n\nvar _playPause = __webpack_require__(32);\n\nvar _playPause2 = _interopRequireDefault(_playPause);\n\nvar _stop = __webpack_require__(41);\n\nvar _stop2 = _interopRequireDefault(_stop);\n\nvar _mute = __webpack_require__(28);\n\nvar _mute2 = _interopRequireDefault(_mute);\n\nvar _volumeUp = __webpack_require__(45);\n\nvar _volumeUp2 = _interopRequireDefault(_volumeUp);\n\nvar _volumeDown = __webpack_require__(43);\n\nvar _volumeDown2 = _interopRequireDefault(_volumeDown);\n\nvar _songSlider = __webpack_require__(40);\n\nvar _songSlider2 = _interopRequireDefault(_songSlider);\n\nvar _volumeSlider = __webpack_require__(44);\n\nvar _volumeSlider2 = _interopRequireDefault(_volumeSlider);\n\nvar _next = __webpack_require__(29);\n\nvar _next2 = _interopRequireDefault(_next);\n\nvar _prev = __webpack_require__(34);\n\nvar _prev2 = _interopRequireDefault(_prev);\n\nvar _repeat = __webpack_require__(36);\n\nvar _repeat2 = _interopRequireDefault(_repeat);\n\nvar _repeatSong = __webpack_require__(37);\n\nvar _repeatSong2 = _interopRequireDefault(_repeatSong);\n\nvar _playbackSpeed = __webpack_require__(33);\n\nvar _playbackSpeed2 = _interopRequireDefault(_playbackSpeed);\n\nvar _shuffle = __webpack_require__(38);\n\nvar _shuffle2 = _interopRequireDefault(_shuffle);\n\nvar _skipTo = __webpack_require__(39);\n\nvar _skipTo2 = _interopRequireDefault(_skipTo);\n\nvar _waveform = __webpack_require__(22);\n\nvar _waveform2 = _interopRequireDefault(_waveform);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Events Module. Handles all of the events we listen to in\n * AmplitudeJS.\n *\n * @module events/Events\n */\n\n\n/**\n * Imports all of the handler objects used by the events.\n */\nvar Events = function () {\n /**\n * Initializes the handlers for the events listened to by Amplitude\n *\n * @access public\n */\n function initialize() {\n /*\n Write out debug message\n */\n _debug2.default.writeMessage(\"Beginning initialization of event handlers..\");\n\n /*\n Sets flag that the screen is moving and not a tap\n */\n document.addEventListener(\"touchmove\", function () {\n _config2.default.is_touch_moving = true;\n });\n\n /*\n On touch end if it was a touch move event, set moving to\n false\n */\n document.addEventListener(\"touchend\", function () {\n if (_config2.default.is_touch_moving) {\n _config2.default.is_touch_moving = false;\n }\n });\n\n /*\n On time update for the audio element, update visual displays that\n represent the time on either a visualized element or time display.\n */\n bindTimeUpdate();\n\n /*\n Binds key down event handlers for matching key codes to functions.\n */\n bindKeyDownEventHandlers();\n\n /*\n When the audio element has ended playing, we handle the song\n ending. In a single song or multiple modular song instance,\n this just synchronizes the visuals for time and song time\n visualization, but for a playlist it determines whether\n it should play the next song or not.\n */\n bindSongEnded();\n\n /*\n Binds progress event so we can see how much of the song is loaded.\n */\n bindProgress();\n\n /*\n Binds 'amplitude-play' event handlers\n */\n bindPlay();\n\n /*\n Binds 'amplitude-pause' event handlers.\n */\n bindPause();\n\n /*\n Binds 'amplitude-play-pause' event handlers.\n */\n bindPlayPause();\n\n /*\n Binds 'amplitude-stop' event handlers.\n */\n bindStop();\n\n /*\n Binds 'amplitude-mute' event handlers.\n */\n bindMute();\n\n /*\n Binds 'amplitude-volume-up' event handlers\n */\n bindVolumeUp();\n\n /*\n Binds 'amplitude-volume-down' event handlers\n */\n bindVolumeDown();\n\n /*\n Binds 'amplitude-song-slider' event handlers\n */\n bindSongSlider();\n\n /*\n Binds 'amplitude-volume-slider' event handlers.\n */\n bindVolumeSlider();\n\n /*\n Binds 'amplitude-next' event handlers.\n */\n bindNext();\n\n /*\n Binds 'amplitude-prev' event handlers.\n */\n bindPrev();\n\n /*\n Binds 'amplitude-shuffle' event handlers.\n */\n bindShuffle();\n\n /*\n Binds 'amplitude-repeat' event handlers.\n */\n bindRepeat();\n\n /*\n Binds 'amplitude-repeat-song' event handlers.\n */\n bindRepeatSong();\n\n /*\n Binds 'amplitude-playback-speed' event handlers.\n */\n bindPlaybackSpeed();\n\n /*\n Binds 'amplitude-skip-to' event handlers.\n */\n bindSkipTo();\n\n /*\n Binds `canplaythrough` event to build the waveform.\n */\n bindCanPlayThrough();\n }\n\n /**\n * On time update for the audio element, update visual displays that\n * represent the time on either a visualized element or time display.\n *\n * @access private\n */\n function bindTimeUpdate() {\n /*\n Bind for time update\n */\n _config2.default.audio.removeEventListener(\"timeupdate\", _timeUpdate2.default.handle);\n _config2.default.audio.addEventListener(\"timeupdate\", _timeUpdate2.default.handle);\n\n /*\n Bind for duration change\n */\n _config2.default.audio.removeEventListener(\"durationchange\", _timeUpdate2.default.handle);\n _config2.default.audio.addEventListener(\"durationchange\", _timeUpdate2.default.handle);\n }\n\n /**\n * On keydown, we listen to what key got pressed so we can map the key to\n * a function. This allows the user to map pause and play, next, etc. to key\n * presses.\n *\n * @access private\n */\n function bindKeyDownEventHandlers() {\n document.removeEventListener(\"keydown\", _keydown2.default.handle);\n document.addEventListener(\"keydown\", _keydown2.default.handle);\n }\n\n /**\n * When the audio element has ended playing, we handle the song\n * ending. In a single song or multiple modular song instance,\n * this just synchronizes the visuals for time and song time\n * visualization, but for a playlist it determines whether\n * it should play the next song or not.\n *\n * @access private\n */\n function bindSongEnded() {\n _config2.default.audio.removeEventListener(\"ended\", _ended2.default.handle);\n _config2.default.audio.addEventListener(\"ended\", _ended2.default.handle);\n }\n\n /**\n * As the audio is loaded, the progress event gets fired. We bind into this\n * to grab the buffered percentage of the song. We can then add more elements\n * to show the buffered amount.\n *\n * @access private\n */\n function bindProgress() {\n _config2.default.audio.removeEventListener(\"progress\", _progress2.default.handle);\n _config2.default.audio.addEventListener(\"progress\", _progress2.default.handle);\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS play buttons\n *\n * @access private\n */\n function bindPlay() {\n /*\n Gets all of the elements with the class amplitude-play\n */\n var play_classes = document.getElementsByClassName(\"amplitude-play\");\n\n /*\n Iterates over all of the play classes and binds the event interaction\n method to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < play_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n play_classes[i].removeEventListener(\"touchend\", _play2.default.handle);\n play_classes[i].addEventListener(\"touchend\", _play2.default.handle);\n } else {\n play_classes[i].removeEventListener(\"click\", _play2.default.handle);\n play_classes[i].addEventListener(\"click\", _play2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS pause buttons.\n *\n * @access private\n */\n function bindPause() {\n /*\n Gets all of the elements with the class amplitude-pause\n */\n var pause_classes = document.getElementsByClassName(\"amplitude-pause\");\n\n /*\n Iterates over all of the pause classes and binds the event interaction\n method to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < pause_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n pause_classes[i].removeEventListener(\"touchend\", _pause2.default.handle);\n pause_classes[i].addEventListener(\"touchend\", _pause2.default.handle);\n } else {\n pause_classes[i].removeEventListener(\"click\", _pause2.default.handle);\n pause_classes[i].addEventListener(\"click\", _pause2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS play pause buttons\n *\n * @access private\n */\n function bindPlayPause() {\n /*\n Gets all of the elements with the class amplitude-play-pause\n */\n var play_pause_classes = document.getElementsByClassName(\"amplitude-play-pause\");\n\n /*\n Iterates over all of the play/pause classes and binds the event interaction\n method to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < play_pause_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n play_pause_classes[i].removeEventListener(\"touchend\", _playPause2.default.handle);\n play_pause_classes[i].addEventListener(\"touchend\", _playPause2.default.handle);\n } else {\n play_pause_classes[i].removeEventListener(\"click\", _playPause2.default.handle);\n play_pause_classes[i].addEventListener(\"click\", _playPause2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS stop buttons\n *\n * @access private\n */\n function bindStop() {\n /*\n Gets all of the elements with the class amplitude-stop\n */\n var stop_classes = document.getElementsByClassName(\"amplitude-stop\");\n\n /*\n Iterates over all of the stop classes and binds the event interaction\n method to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < stop_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n stop_classes[i].removeEventListener(\"touchend\", _stop2.default.handle);\n stop_classes[i].addEventListener(\"touchend\", _stop2.default.handle);\n } else {\n stop_classes[i].removeEventListener(\"click\", _stop2.default.handle);\n stop_classes[i].addEventListener(\"click\", _stop2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS mute buttons\n *\n * @access private\n */\n function bindMute() {\n /*\n Gets all of the elements with the class amplitue-mute\n */\n var mute_classes = document.getElementsByClassName(\"amplitude-mute\");\n\n /*\n Iterates over all of the mute classes and binds the event interaction\n method to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < mute_classes.length; i++) {\n /*\n WARNING: If iOS, we don't do anything because iOS does not allow the\n volume to be adjusted through anything except the buttons on the side of\n the device.\n */\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n /*\n Checks for an iOS device and displays an error message if debugging\n is turned on.\n */\n if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {\n _debug2.default.writeMessage(\"iOS does NOT allow volume to be set through javascript: https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW4\");\n } else {\n mute_classes[i].removeEventListener(\"touchend\", _mute2.default.handle);\n mute_classes[i].addEventListener(\"touchend\", _mute2.default.handle);\n }\n } else {\n mute_classes[i].removeEventListener(\"click\", _mute2.default.handle);\n mute_classes[i].addEventListener(\"click\", _mute2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS Volume Up Buttons\n *\n * @access private\n */\n function bindVolumeUp() {\n /*\n Gets all of the elements with the class amplitude-volume-up\n */\n var volume_up_classes = document.getElementsByClassName(\"amplitude-volume-up\");\n\n /*\n Iterates over all of the volume up classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < volume_up_classes.length; i++) {\n /*\n WARNING: If iOS, we don't do anything because iOS does not allow the\n volume to be adjusted through anything except the buttons on the side of\n the device.\n */\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n /*\n Checks for an iOS device and displays an error message if debugging\n is turned on.\n */\n if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {\n _debug2.default.writeMessage(\"iOS does NOT allow volume to be set through javascript: https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW4\");\n } else {\n volume_up_classes[i].removeEventListener(\"touchend\", _volumeUp2.default.handle);\n volume_up_classes[i].addEventListener(\"touchend\", _volumeUp2.default.handle);\n }\n } else {\n volume_up_classes[i].removeEventListener(\"click\", _volumeUp2.default.handle);\n volume_up_classes[i].addEventListener(\"click\", _volumeUp2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS Volume Down Buttons\n *\n * @access private\n */\n function bindVolumeDown() {\n /*\n Gets all of the elements with the class amplitude-volume-down\n */\n var volume_down_classes = document.getElementsByClassName(\"amplitude-volume-down\");\n\n /*\n Iterates over all of the volume down classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < volume_down_classes.length; i++) {\n /*\n WARNING: If iOS, we don't do anything because iOS does not allow the\n volume to be adjusted through anything except the buttons on the side of\n the device.\n */\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n /*\n Checks for an iOS device and displays an error message if debugging\n is turned on.\n */\n if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {\n _debug2.default.writeMessage(\"iOS does NOT allow volume to be set through javascript: https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW4\");\n } else {\n volume_down_classes[i].removeEventListener(\"touchend\", _volumeDown2.default.handle);\n volume_down_classes[i].addEventListener(\"touchend\", _volumeDown2.default.handle);\n }\n } else {\n volume_down_classes[i].removeEventListener(\"click\", _volumeDown2.default.handle);\n volume_down_classes[i].addEventListener(\"click\", _volumeDown2.default.handle);\n }\n }\n }\n\n /**\n * Binds change and input events for AmplitudeJS Song Slider Inputs\n *\n * @access private\n */\n function bindSongSlider() {\n /*\n Gets browser so if we need to apply overrides, like we usually\n have to do for anything cool in IE, we can do that.\n */\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n\n /*\n Gets all of the elements with the class amplitude-song-slider\n */\n var song_sliders = document.getElementsByClassName(\"amplitude-song-slider\");\n\n /*\n Iterates over all of the song slider classes and binds the event interaction\n methods to the element. If the browser is IE we listen to the change event\n where if it is anything else, it's the input method.\n */\n for (var i = 0; i < song_sliders.length; i++) {\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\n song_sliders[i].removeEventListener(\"change\", _songSlider2.default.handle);\n song_sliders[i].addEventListener(\"change\", _songSlider2.default.handle);\n } else {\n song_sliders[i].removeEventListener(\"input\", _songSlider2.default.handle);\n song_sliders[i].addEventListener(\"input\", _songSlider2.default.handle);\n }\n }\n }\n\n /**\n * Binds change and input events fro AmplitudeJS Volume Slider inputs\n *\n * @access private\n */\n function bindVolumeSlider() {\n /*\n Gets browser so if we need to apply overrides, like we usually\n have to do for anything cool in IE, we can do that.\n */\n var ua = window.navigator.userAgent;\n var msie = ua.indexOf(\"MSIE \");\n\n /*\n Gets all of the elements with the class amplitude-volume-slider\n */\n var volume_sliders = document.getElementsByClassName(\"amplitude-volume-slider\");\n\n /*\n Iterates over all of the volume slider classes and binds the event interaction\n methods to the element. If the browser is IE we listen to the change event\n where if it is anything else, it's the input method.\n */\n for (var i = 0; i < volume_sliders.length; i++) {\n /*\n WARNING: If iOS, we don't do anything because iOS does not allow the\n volume to be adjusted through anything except the buttons on the side of\n the device.\n */\n if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {\n _debug2.default.writeMessage(\"iOS does NOT allow volume to be set through javascript: https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html#//apple_ref/doc/uid/TP40009523-CH5-SW4\");\n } else {\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./)) {\n volume_sliders[i].removeEventListener(\"change\", _volumeSlider2.default.handle);\n volume_sliders[i].addEventListener(\"change\", _volumeSlider2.default.handle);\n } else {\n volume_sliders[i].removeEventListener(\"input\", _volumeSlider2.default.handle);\n volume_sliders[i].addEventListener(\"input\", _volumeSlider2.default.handle);\n }\n }\n }\n }\n\n /**\n * Binds click and touchend events fro AmplitudeJS Next buttons\n *\n * @access private\n */\n function bindNext() {\n /*\n Gets all of the elements with the class amplitude-next\n */\n var next_classes = document.getElementsByClassName(\"amplitude-next\");\n\n /*\n Iterates over all of the next classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < next_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n next_classes[i].removeEventListener(\"touchend\", _next2.default.handle);\n next_classes[i].addEventListener(\"touchend\", _next2.default.handle);\n } else {\n next_classes[i].removeEventListener(\"click\", _next2.default.handle);\n next_classes[i].addEventListener(\"click\", _next2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS prev buttons.\n *\n * @access private\n */\n function bindPrev() {\n /*\n Gets all of the elements with the class amplitude-prev\n */\n var prev_classes = document.getElementsByClassName(\"amplitude-prev\");\n\n /*\n Iterates over all of the prev classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < prev_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n prev_classes[i].removeEventListener(\"touchend\", _prev2.default.handle);\n prev_classes[i].addEventListener(\"touchend\", _prev2.default.handle);\n } else {\n prev_classes[i].removeEventListener(\"click\", _prev2.default.handle);\n prev_classes[i].addEventListener(\"click\", _prev2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS shuffle buttons.\n *\n * @access private\n */\n function bindShuffle() {\n /*\n Gets all of the elements with the class amplitude-shuffle\n */\n var shuffle_classes = document.getElementsByClassName(\"amplitude-shuffle\");\n\n /*\n Iterates over all of the shuffle classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < shuffle_classes.length; i++) {\n /*\n Since we are re-binding everything we remove any classes that signify\n a state of the shuffle control.\n */\n shuffle_classes[i].classList.remove(\"amplitude-shuffle-on\");\n shuffle_classes[i].classList.add(\"amplitude-shuffle-off\");\n\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n shuffle_classes[i].removeEventListener(\"touchend\", _shuffle2.default.handle);\n shuffle_classes[i].addEventListener(\"touchend\", _shuffle2.default.handle);\n } else {\n shuffle_classes[i].removeEventListener(\"click\", _shuffle2.default.handle);\n shuffle_classes[i].addEventListener(\"click\", _shuffle2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS repeat buttons.\n *\n * @access private\n */\n function bindRepeat() {\n /*\n Gets all of the elements with the class amplitude-repeat\n */\n var repeat_classes = document.getElementsByClassName(\"amplitude-repeat\");\n\n /*\n Iterates over all of the repeat classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < repeat_classes.length; i++) {\n /*\n Since we are re-binding everything we remove any classes that signify\n a state of the repeat control.\n */\n repeat_classes[i].classList.remove(\"amplitude-repeat-on\");\n repeat_classes[i].classList.add(\"amplitude-repeat-off\");\n\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n repeat_classes[i].removeEventListener(\"touchend\", _repeat2.default.handle);\n repeat_classes[i].addEventListener(\"touchend\", _repeat2.default.handle);\n } else {\n repeat_classes[i].removeEventListener(\"click\", _repeat2.default.handle);\n repeat_classes[i].addEventListener(\"click\", _repeat2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS repeat song buttons.\n *\n * @access private\n */\n function bindRepeatSong() {\n /*\n Gets all of the elements with the class amplitude-repeat-song\n */\n var repeat_song_classes = document.getElementsByClassName(\"amplitude-repeat-song\");\n\n /*\n Iterates over all of the repeat song classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < repeat_song_classes.length; i++) {\n /*\n Since we are re-binding everything we remove any classes that signify\n a state of the repeat control.\n */\n repeat_song_classes[i].classList.remove(\"amplitude-repeat-on\");\n repeat_song_classes[i].classList.add(\"amplitude-repeat-off\");\n\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n repeat_song_classes[i].removeEventListener(\"touchend\", _repeatSong2.default.handle);\n repeat_song_classes[i].addEventListener(\"touchend\", _repeatSong2.default.handle);\n } else {\n repeat_song_classes[i].removeEventListener(\"click\", _repeatSong2.default.handle);\n repeat_song_classes[i].addEventListener(\"click\", _repeatSong2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS playback speed buttons\n *\n * @access private\n */\n function bindPlaybackSpeed() {\n /*\n Gets all of the elements with the class amplitude-playback-speed\n */\n var playback_speed_classes = document.getElementsByClassName(\"amplitude-playback-speed\");\n\n /*\n Iterates over all of the playback speed classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it is click.\n */\n for (var i = 0; i < playback_speed_classes.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n playback_speed_classes[i].removeEventListener(\"touchend\", _playbackSpeed2.default.handle);\n playback_speed_classes[i].addEventListener(\"touchend\", _playbackSpeed2.default.handle);\n } else {\n playback_speed_classes[i].removeEventListener(\"click\", _playbackSpeed2.default.handle);\n playback_speed_classes[i].addEventListener(\"click\", _playbackSpeed2.default.handle);\n }\n }\n }\n\n /**\n * Binds click and touchend events for AmplitudeJS skip to buttons.\n *\n * @access private\n */\n function bindSkipTo() {\n /*\n Gets all of the skip to elements with the class 'amplitude-skip-to'\n */\n var skipToClasses = document.getElementsByClassName(\"amplitude-skip-to\");\n\n /*\n Iterates over all of the skip to classes and binds the event interaction\n methods to the element. If the browser is mobile, then the event is touchend\n otherwise it's a click.\n */\n for (var i = 0; i < skipToClasses.length; i++) {\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n skipToClasses[i].removeEventListener(\"touchend\", _skipTo2.default.handle);\n skipToClasses[i].addEventListener(\"touchend\", _skipTo2.default.handle);\n } else {\n skipToClasses[i].removeEventListener(\"click\", _skipTo2.default.handle);\n skipToClasses[i].addEventListener(\"click\", _skipTo2.default.handle);\n }\n }\n }\n\n /**\n * Binds can play through to a song.\n *\n * @access private\n */\n function bindCanPlayThrough() {\n if (_waveform2.default.determineIfUsingWaveforms()) {\n _config2.default.audio.removeEventListener(\"canplaythrough\", _waveform2.default.build);\n _config2.default.audio.addEventListener(\"canplaythrough\", _waveform2.default.build);\n }\n }\n\n /*\n Returns the public facing functions.\n */\n return {\n initialize: initialize\n };\n}();\n\n/**\n * Imports the utility classes used by the evnets.\n */\n/*\n\tImport the necessary classes and config to use\n\twith the events.\n*/\nexports.default = Events;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _shuffler = __webpack_require__(13);\n\nvar _shuffler2 = _interopRequireDefault(_shuffler);\n\nvar _repeater = __webpack_require__(12);\n\nvar _repeater2 = _interopRequireDefault(_repeater);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _repeatElements = __webpack_require__(8);\n\nvar _repeatElements2 = _interopRequireDefault(_repeatElements);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Key Down event handler\n *\n * @module events/KeyDown\n */\n\n\n/**\n * Imports the Repeat Elements Visual Handler\n * @module visual/RepeatElements\n */\n\n\n/**\n * Imports the Repeater Utility\n * @module utilities/Repeater\n */\n\n\n/**\n * Imports the core of AmplitudeJS\n * @module core/Core\n */\nvar KeyDown = function () {\n /**\n * When the keydown event is fired, we determine which function should be run\n * based on what was passed in.\n *\n * HANDLER FOR: keydown\n *\n * @access public\n * @prop {object} event The event object being passed in.\n */\n function handle(event) {\n runKeyEvent(event.which);\n }\n\n /**\n * Runs an event on key down\n *\n * @access public\n * @param {number} key \t- The key code the event is bound to.\n */\n function runKeyEvent(key) {\n /*\n Checks to see if the user bound an event to the code pressed.\n */\n if (_config2.default.bindings[key] != undefined) {\n /*\n Determine which event should be run if bound.\n */\n switch (_config2.default.bindings[key]) {\n /*\n Fires a play pause event.\n */\n case \"play_pause\":\n runPlayPauseKeyDownEvent();\n break;\n\n /*\n Fires a next event.\n */\n case \"next\":\n runNextKeyDownEvent();\n break;\n\n /*\n Fires a previous event.\n */\n case \"prev\":\n runPrevKeyDownEvent();\n break;\n\n /*\n Fires a stop event.\n */\n case \"stop\":\n runStopKeyDownEvent();\n break;\n\n /*\n Fires a shuffle event.\n */\n case \"shuffle\":\n runShuffleKeyDownEvent();\n break;\n\n /*\n Fires a repeat event.\n */\n case \"repeat\":\n runRepeatKeyDownEvent();\n break;\n }\n }\n }\n\n /**\n * Runs the play pause method for key down.\n */\n function runPlayPauseKeyDownEvent() {\n /*\n If the song is paused, we play the song. If the song is playing,\n we pause the song.\n */\n if (_config2.default.audio.paused) {\n _core2.default.play();\n } else {\n _core2.default.pause();\n }\n\n /*\n Now we sync all the elements to match the state of the audio.\n We don't need to do any checks on new songs or changed playlists\n in the global since it's whatever song is playing.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Runs the next method for key down.\n */\n function runNextKeyDownEvent() {\n /*\n Check to see if the current state of the player\n is in playlist mode or not playlist mode.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n _audioNavigation2.default.setNext();\n } else {\n _audioNavigation2.default.setNextPlaylist(_config2.default.active_playlist);\n }\n }\n\n /**\n * Runs the previous method for key down.\n */\n function runPrevKeyDownEvent() {\n /*\n Check to see if the current playlist has been set\n or null and set the previous song.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n _audioNavigation2.default.setPrevious();\n } else {\n _audioNavigation2.default.setPreviousPlaylist(_config2.default.active_playlist);\n }\n }\n\n /**\n * Runs the stop method for key down.\n */\n function runStopKeyDownEvent() {\n /*\n Syncs all of the play pause elements to pause.\n */\n _playPauseElements2.default.syncToPause();\n\n /*\n Stops the active song.\n */\n _core2.default.stop();\n }\n\n /**\n * Runs the shuffle method for key down.\n */\n function runShuffleKeyDownEvent() {\n /*\n Check to see if the current playlist has been set\n or null and set the previous song.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n _shuffler2.default.toggleShuffle();\n } else {\n _shuffler2.default.toggleShufflePlaylist(_config2.default.active_playlist);\n }\n }\n\n /**\n * Run the repeat method for key down.\n */\n function runRepeatKeyDownEvent() {\n /*\n Toggles the repeat\n */\n _repeater2.default.setRepeat(!_config2.default.repeat);\n\n /*\n Visually sync repeat\n */\n _repeatElements2.default.syncRepeat();\n }\n\n /**\n * Returns the public methods for the handler.\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the Play Pause Elements Visual Handler\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\n\n\n/**\n * Imports the Shuffle Utility\n * @module utilities/Shuffle\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = KeyDown;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _muteElements = __webpack_require__(10);\n\nvar _muteElements2 = _interopRequireDefault(_muteElements);\n\nvar _volumeSliderElements = __webpack_require__(11);\n\nvar _volumeSliderElements2 = _interopRequireDefault(_volumeSliderElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all events for a mute event.\n * @module events/Mute\n */\n\n\n/**\n * Imports the AmplitudeJS Visual Mute Elements\n * @module visual/MuteElements\n */\n/**\n * Imports the config to use the values\n */\nvar Mute = function () {\n /**\n * Handles an event for a mute element\n *\n * HANDLER FOR: class=\"amplitude-mute\"\n *\n * @access public\n */\n function handle() {\n /*\n We don't fire this if the user is touching the screen and it's moving.\n This could lead to a mis-fire\n */\n if (!_config2.default.is_touch_moving) {\n /*\n If the current volume in the config is 0, we set the volume to the\n pre_mute level. This means that the audio is already muted and\n needs to be restored to the pre_mute level.\n Otherwise, we set pre_mute volume to the current volume\n and set the config volume to 0, muting the audio.\n */\n if (_config2.default.volume == 0) {\n _core2.default.setVolume(_config2.default.pre_mute_volume);\n } else {\n _config2.default.pre_mute_volume = _config2.default.volume;\n _core2.default.setVolume(0);\n }\n\n /*\n Sync Mute Elements.\n */\n _muteElements2.default.setMuted(_config2.default.volume == 0 ? true : false);\n\n /*\n Syncs the volume sliders so the visuals align up with the functionality.\n If the volume is at 0, then the sliders should represent that so the user\n has the right starting point.\n */\n _volumeSliderElements2.default.sync();\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Visual Volume Slider Elements\n * @module visual/VolumeSliderElements\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/core\n */\nexports.default = Mute;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nvar _callbacks = __webpack_require__(9);\n\nvar _callbacks2 = _interopRequireDefault(_callbacks);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Next Event Handler\n *\n * @module events/Next\n */\n\n\n/**\n * Imports the Amplitude Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\n\n\n/**\n * Imports the Play Pause Elements Module.\n * @module visual/PlayPauseElements\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Next = function () {\n /**\n * Handles an event on the next button\n *\n * HANDLER FOR: class=\"amplitude-next\"\n *\n * GLOBAL: class=\"amplitude-next\"\n * PLAYLIST: class=\"amplitude-next\" amplitude-playlist=\"playlist_key\"\n *\n * @access public\n */\n function handle() {\n /*\n We don't fire this if the user is touching the screen and it's moving.\n This could lead to a mis-fire\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Gets the playlist attribute from the element.\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n\n /*\n If the playlist is null, we handle the global next.\n */\n if (playlist == null) {\n handleGlobalNext();\n }\n\n /*\n If the playlist is set, we handle the playlist next.\n */\n if (playlist != null) {\n handlePlaylistNext(playlist);\n }\n }\n }\n\n /**\n * Handles an event on a global enxt button.\n *\n * @access private\n */\n function handleGlobalNext() {\n /*\n Check to see if the current state of the player\n is in playlist mode or not playlist mode. If we are in playlist mode,\n we set next on the playlist.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n _audioNavigation2.default.setNext();\n } else {\n _audioNavigation2.default.setNextPlaylist(_config2.default.active_playlist);\n }\n }\n\n /**\n * Handles an event on a next playlist button.\n *\n * @access private\n * @prop {string} playlist - The playlist we are handling the next for.\n */\n function handlePlaylistNext(playlist) {\n /*\n Ensure the playlist is the same as the active playlist. To get to change\n the scope to a new playlist, you need to play that playlist.\n */\n if (playlist == _config2.default.active_playlist) {\n _audioNavigation2.default.setNextPlaylist(playlist);\n } else {\n _debug2.default.writeMessage(\"You can not go to the next song on a playlist that is not being played!\");\n }\n }\n\n /*\n Returns the public facing methods.\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * AmplitudeJS Debug Module\n * @module utilities/Debug\n */\n\n\n/**\n * Imports the Callbacks Module\n * @module utilities/Callbacks\n */\n\n\n/**\n * Imports the AmplitudeJS Core module.\n * @module core/core\n */\nexports.default = Next;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the pause events\n * @module events/Pause\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/Core\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Pause = function () {\n /**\n * Handles an event on a pause button\n *\n * HANDLER FOR: class=\"amplitude-pause\"\n *\n * GLOBAL: class=\"amplitude-pause\"\n * PLAYLIST: class=\"amplitude-pause\" amplitude-playlist=\"playlist_key\"\n * SONG: class=\"amplitude-pause\" amplitude-song-index=\"song_index\"\n * SONG IN PLAYLIST: class=\"amplitude-pause\" amplitude-playlist=\"playlist-key\" amplitude-song-index=\"playlist_index\"\n *\n * @access public\n */\n function handle() {\n /*\n If the touch is moving, we do not want to accidentally touch the play\n pause element and fire an event.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Gets the attribute for song index so we can check if\n there is a need to change the song. In some scenarios\n there might be multiple pause classes on the page. In that\n case it is possible the user could click a different pause\n class.\n */\n var songIndexAttribute = this.getAttribute(\"data-amplitude-song-index\");\n var playlistAttribute = this.getAttribute(\"data-amplitude-playlist\");\n\n /*\n Handle a global pause button.\n */\n if (playlistAttribute == null && songIndexAttribute == null) {\n handleGlobalPause();\n }\n\n /*\n Handle a playlist pause button.\n */\n if (playlistAttribute != null && songIndexAttribute == null) {\n handlePlaylistPause(playlistAttribute);\n }\n\n /*\n Handle a song pause button.\n */\n if (playlistAttribute == null && songIndexAttribute != null) {\n handleSongPause(songIndexAttribute);\n }\n\n /*\n Handle a song in playlist pause button.\n */\n if (playlistAttribute != null && songIndexAttribute != null) {\n handleSongInPlaylistPause(playlistAttribute, songIndexAttribute);\n }\n }\n }\n\n /**\n * Handles global pause button which pauses whatever song is\n * active.\n *\n * @access private\n */\n function handleGlobalPause() {\n /*\n Pauses the song.\n */\n _core2.default.pause();\n\n /*\n Sync the play pause elements.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Handles the playlist pause.\n *\n * @access private\n * @param {string} playlist The playlist the pause button belongs to.\n */\n function handlePlaylistPause(playlist) {\n /*\n Checks to see if the active playlist is the same\n */\n if (_config2.default.active_playlist == playlist) {\n /*\n Pauses the song.\n */\n _core2.default.pause();\n\n /*\n Sync the play pause elements.\n */\n _playPauseElements2.default.sync();\n }\n }\n\n /**\n * Handles the song pause.\n *\n * @access private\n * @param {integer} song The song the pause button belongs to.\n */\n function handleSongPause(song) {\n /*\n Checks to see if the active playlist is null and the song matches\n the active index.\n */\n if ((_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) && _config2.default.active_index == song) {\n /*\n Pauses the song.\n */\n _core2.default.pause();\n\n /*\n Sync the play pause elements.\n */\n _playPauseElements2.default.sync();\n }\n }\n\n /**\n * Handles the song in playlist pause.\n *\n * @access private\n * @param {string} playlist The playlist the pause button belongs to.\n * @param {integer} song The song the pause button belongs to.\n */\n function handleSongInPlaylistPause(playlist, song) {\n /*\n Checks to see if the active song matches the song and the\n active playlist matches the playlist. This means the pause button is\n for the song in the playlist.\n */\n if (_config2.default.active_playlist == playlist && _config2.default.playlists[playlist].active_index == song) {\n /*\n Pauses the song.\n */\n _core2.default.pause();\n\n /*\n Sync the play pause elements.\n */\n _playPauseElements2.default.sync();\n }\n }\n\n /*\n Returns the public facing elements\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Play Pause Elements\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the ConfigState module.\n * @module utilities/ConfigState\n */\nexports.default = Pause;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the play events\n * @module events/Play\n */\n\n\n/**\n * Imports the AmplitudeJS Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/Core\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Play = function () {\n /**\n * Handles an event on a play button in Amplitude.\n *\n * HANDLER FOR: class=\"amplitude-play\"\n *\n * GLOBAL: class=\"amplitude-play\"\n * PLAYLIST: class=\"amplitude-play\" amplitude-playlist=\"playlist_key\"\n * SONG: class=\"amplitude-play\" amplitude-song-index=\"song_index\"\n * SONG IN PLAYLIST: class=\"amplitude-play\" amplitude-playlist=\"playlist-key\" amplitude-song-index=\"playlist_index\"\n *\n * @access public\n */\n function handle() {\n /*\n If the touch is moving, we do not want to accidentally touch the play\n pause element and fire an event.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Gets the attribute for song index so we can check if\n there is a need to change the song. In some scenarios\n there might be multiple play classes on the page. In that\n case it is possible the user could click a different play\n class and change the song.\n */\n var songIndexAttribute = this.getAttribute(\"data-amplitude-song-index\");\n var playlistAttribute = this.getAttribute(\"data-amplitude-playlist\");\n\n /*\n Handle a global play button.\n */\n if (playlistAttribute == null && songIndexAttribute == null) {\n handleGlobalPlay();\n }\n\n /*\n Handle a playlist play button.\n */\n if (playlistAttribute != null && songIndexAttribute == null) {\n handlePlaylistPlay(playlistAttribute);\n }\n\n /*\n Handle a song play button.\n */\n if (playlistAttribute == null && songIndexAttribute != null) {\n handleSongPlay(songIndexAttribute);\n }\n\n /*\n Handle a song in playlist play button.\n */\n if (playlistAttribute != null && songIndexAttribute != null) {\n handleSongInPlaylistPlay(playlistAttribute, songIndexAttribute);\n }\n }\n }\n\n /**\n * Handles global play button which plays whatever song is\n * active.\n *\n * @access private\n */\n function handleGlobalPlay() {\n /*\n Plays the song\n */\n _core2.default.play();\n\n /*\n Sync the play pause elements.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Handle the playlist play.\n *\n * @access private\n * @param {string} playlist The playlist the play button belongs to.\n */\n function handlePlaylistPlay(playlist) {\n /*\n Checks if we have a new playlist.\n */\n if (_checks2.default.newPlaylist(playlist)) {\n /*\n Sets the active playlist to what belongs to the playlist.\n */\n _audioNavigation2.default.setActivePlaylist(playlist);\n\n /*\n Play first song in the playlist since we just\n switched playlists, we start from the first song.\n If the user has shuffle on for the playlist, then\n we go from the first song in the shuffle playlist array.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].shuffle_list[0], 0);\n } else {\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[0], 0);\n }\n }\n\n /*\n Plays the song.\n */\n _core2.default.play();\n\n /*\n Syncs the play pause elements since they are dependent upon this state\n of the player.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Handles the song play button.\n *\n * @access private\n * @param {integer} song The index of the song we are playing.\n */\n function handleSongPlay(song) {\n /*\n There can be multiple playlists on the page and there can be\n multiple songs on the page AND there can be songs in multiple\n playlists, so we have some checking to do.\n */\n\n /*\n Check to see if the playlist has changed. Essentially, if we are moving\n out of a playlist context.\n */\n if (_checks2.default.newPlaylist(null)) {\n /*\n We've moved out of the playlist context, so we set the active playlist\n to null\n */\n _audioNavigation2.default.setActivePlaylist(null);\n\n /*\n We then change the song to the index selected.\n */\n _audioNavigation2.default.changeSong(_config2.default.songs[song], song);\n }\n\n /*\n Check to see if the song has changed. If it has,\n set the active song. If it was in a playlist, the\n song wouldn't change here, since we already set the\n song when we checked for a playlist.\n */\n if (_checks2.default.newSong(null, song)) {\n /*\n The song selected is different, so we change the\n song.\n */\n _audioNavigation2.default.changeSong(_config2.default.songs[song], song);\n }\n\n /*\n Plays the song\n */\n _core2.default.play();\n\n /*\n Syncs the play pause elements since they are dependent upon this state\n of the player.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Handles the song in playlist play.\n *\n * @access private\n * @param {string} playlist The playlist the play button belongs to.\n * @param {integer} song The song the play button belongs to.\n */\n function handleSongInPlaylistPlay(playlist, song) {\n /*\n There can be multiple playlists on the page and there can be\n multiple songs on the page AND there can be songs in multiple\n playlists, so we have some checking to do.\n */\n\n /*\n Check to see if the playlist has changed. Essentially, if we are moving\n out of a playlist context.\n */\n if (_checks2.default.newPlaylist(playlist)) {\n /*\n We've moved out of the playlist context, so we set the active playlist\n to null\n */\n _audioNavigation2.default.setActivePlaylist(playlist);\n\n /*\n We then change the song to the index selected.\n */\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[song], song);\n }\n\n /*\n Check to see if the song has changed. If it has,\n set the active song. If it was in a playlist, the\n song wouldn't change here, since we already set the\n song when we checked for a playlist.\n */\n if (_checks2.default.newSong(playlist, song)) {\n /*\n The song selected is different, so we change the\n song.\n */\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[song], song);\n }\n\n /*\n Plays the song\n */\n _core2.default.play();\n\n /*\n Now we sync all the elements to match the state of the audio.\n We don't need to do any checks on new songs or changed playlists\n in the global since it's whatever song is playing.\n */\n _playPauseElements2.default.sync();\n }\n\n /*\n Returns the public facing elements\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Play Pause Elements\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the AmplitudeJS Checks Utility\n * @module utilities/Checks\n */\n\n\n/**\n * Imports the config state utility.\n * @module utilities/ConfigState\n */\nexports.default = Play;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the play pause events\n * @module events/PlayPause\n */\n\n\n/**\n * Imports the AmplitudeJS Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/Core\n */\n/**\n * Imports the config module\n * @module config\n */\nvar PlayPause = function () {\n /**\n * Handles an event on a play/pause button\n *\n * HANDLER FOR: class=\"amplitude-play-pause\"\n *\n * GLOBAL: class=\"amplitude-play-pause\"\n * PLAYLIST: class=\"amplitude-play-pause\" amplitude-playlist=\"playlist_key\"\n * SONG: class=\"amplitude-play-pause\" amplitude-song-index=\"song_index\"\n * SONG IN PLAYLIST: class=\"amplitude-play-pause\" amplitude-playlist=\"playlist-key\" amplitude-song-index=\"playlist_index\"\n *\n * @access public\n */\n function handle() {\n /*\n If the touch is moving, we do not want to accidentally touch the play\n pause element and fire an event.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Get the playlist and song from the element. It's alright if these\n are null.\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n var song = this.getAttribute(\"data-amplitude-song-index\");\n\n /*\n Handle a global play pause button\n */\n if (playlist == null && song == null) {\n handleGlobalPlayPause();\n }\n\n /*\n Handle a playlist play pause button\n */\n if (playlist != null && song == null) {\n handlePlaylistPlayPause(playlist);\n }\n\n /*\n Handle a song play pause button\n */\n if (playlist == null && song != null) {\n handleSongPlayPause(song);\n }\n\n /*\n Handle a song in playlist play pause button\n */\n if (playlist != null && song != null) {\n handleSongInPlaylistPlayPause(playlist, song);\n }\n }\n }\n\n /**\n * Sets the main play pause buttons to the current state of the song.\n * @access private\n */\n function handleGlobalPlayPause() {\n /*\n If the song is paused, we play the song. If the song is playing,\n we pause the song.\n */\n if (_config2.default.audio.paused) {\n _core2.default.play();\n } else {\n _core2.default.pause();\n }\n\n /*\n Now we sync all the elements to match the state of the audio.\n We don't need to do any checks on new songs or changed playlists\n in the global since it's whatever song is playing.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Sets the playlist main play pause buttons to the current state of the song.\n * @access private\n * @param {string} playlist The playlist the main play pause button controls\n */\n function handlePlaylistPlayPause(playlist) {\n /*\n The only thing that can change when you click a playlist\n play pause is the playlist. Main play pauses have no change\n in song, song play pauses can change playlist and song.\n */\n if (_checks2.default.newPlaylist(playlist)) {\n /*\n If there's a new playlist, then we set the new playlist.\n */\n _audioNavigation2.default.setActivePlaylist(playlist);\n\n /*\n Play first song in the playlist since we just\n switched playlists, we start from the first song.\n If the user has shuffle on for the playlist, then\n we go from the first song in the shuffle playlist array.\n */\n if (_config2.default.playlists[playlist].shuffle) {\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].shuffle_list[0], 0, true);\n } else {\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[0], 0);\n }\n }\n\n /*\n If the song is paused, we play the song. If the song is playing,\n we pause the song.\n */\n if (_config2.default.audio.paused) {\n _core2.default.play();\n } else {\n _core2.default.pause();\n }\n\n /*\n Now we sync all the elements to match the state of the audio.\n We don't need to do any checks on new songs or changed playlists\n in the global since it's whatever song is playing.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Sets the playlist main play pause buttons to the current state of the song.\n * @access private\n * @param {string} song The index of the song being played/paused\n */\n function handleSongPlayPause(song) {\n /*\n There can be multiple playlists on the page and there can be\n multiple songs on the page AND there can be songs in multiple\n playlists, so we have some checking to do.\n */\n\n /*\n Check to see if the playlist has changed. Essentially, if we are moving\n out of a playlist context.\n */\n if (_checks2.default.newPlaylist(null)) {\n /*\n We've moved out of the playlist context, so we set the active playlist\n to null\n */\n _audioNavigation2.default.setActivePlaylist(null);\n\n /*\n We then change the song to the index selected.\n */\n _audioNavigation2.default.changeSong(_config2.default.songs[song], song, true);\n }\n\n /*\n Check to see if the song has changed. If it has,\n set the active song. If it was in a playlist, the\n song wouldn't change here, since we already set the\n song when we checked for a playlist.\n */\n if (_checks2.default.newSong(null, song)) {\n /*\n The song selected is different, so we change the\n song.\n */\n _audioNavigation2.default.changeSong(_config2.default.songs[song], song, true);\n }\n\n /*\n If the song is paused, we play the song. If the song is playing,\n we pause the song.\n */\n if (_config2.default.audio.paused) {\n _core2.default.play();\n } else {\n _core2.default.pause();\n }\n\n /*\n Now we sync all the elements to match the state of the audio.\n We don't need to do any checks on new songs or changed playlists\n in the global since it's whatever song is playing.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Sets the song in playlist play pause buttons to the current\n * state of the song.\n * @access private\n * @param {string} playlist The playlist the song is a part of\n * @param {number} song The index of the song being played/paused\n */\n function handleSongInPlaylistPlayPause(playlist, song) {\n /*\n There can be multiple playlists on the page and there can be\n multiple songs on the page AND there can be songs in multiple\n playlists, so we have some checking to do.\n */\n\n /*\n Check to see if the playlist has changed. Essentially, if we are moving\n out of a playlist context.\n */\n if (_checks2.default.newPlaylist(playlist)) {\n /*\n We've moved out of the playlist context, so we set the active playlist\n to null\n */\n _audioNavigation2.default.setActivePlaylist(playlist);\n\n /*\n We then change the song to the index selected.\n */\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[song], song, true);\n }\n\n /*\n Check to see if the song has changed. If it has,\n set the active song. If it was in a playlist, the\n song wouldn't change here, since we already set the\n song when we checked for a playlist.\n */\n if (_checks2.default.newSong(playlist, song)) {\n /*\n The song selected is different, so we change the\n song.\n */\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[song], song, true);\n }\n\n /*\n If the song is paused, we play the song. If the song is playing,\n we pause the song.\n */\n if (_config2.default.audio.paused) {\n _core2.default.play();\n } else {\n _core2.default.pause();\n }\n\n /*\n Now we sync all the elements to match the state of the audio.\n We don't need to do any checks on new songs or changed playlists\n in the global since it's whatever song is playing.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Play Pause Elements\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the AmplitudeJS Checks Utility\n * @module utilities/Checks\n */\n\n\n/**\n * Import the config state utility.\n * @module utilities/configState\n */\nexports.default = PlayPause;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _playbackSpeedElements = __webpack_require__(18);\n\nvar _playbackSpeedElements2 = _interopRequireDefault(_playbackSpeedElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Playback Speed Event Handler\n *\n * @module events/PlaybackSpeed\n */\n\n\n/**\n * Imports the Amplitude Core module\n * @module core/Core\n */\nvar PlaybackSpeed = function () {\n /**\n * Handles an event on the playback speed button\n *\n * HANDLER FOR: class=\"amplitude-playback-speed\"\n *\n * @access public\n */\n function handle() {\n if (!_config2.default.is_touch_moving) {\n /*\n We increment the speed by .5 everytime we click\n the button to change the playback speed. Once we are\n actively playing back at 2, we start back at 1 which\n is normal speed.\n */\n switch (_config2.default.playback_speed) {\n case 1:\n _core2.default.setPlaybackSpeed(1.5);\n break;\n case 1.5:\n _core2.default.setPlaybackSpeed(2);\n break;\n case 2:\n _core2.default.setPlaybackSpeed(1);\n break;\n }\n\n /*\n Visually sync the playback speed.\n */\n _playbackSpeedElements2.default.sync();\n }\n }\n\n /*\n Returns public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the Playback Speed Visual Elements\n * @module visual/PlaybackSpeedElements\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = PlaybackSpeed;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Prev Event Handler\n *\n * @module events/Prev\n */\n\n\n/**\n * Imports the Amplitude Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\nvar Prev = function () {\n /**\n * Handles an event on the previous button\n *\n * HANDLER FOR: class=\"amplitude-prev\"\n *\n * GLOBAL: class=\"amplitude-prev\"\n * PLAYLIST: class=\"amplitude-prev\" amplitude-playlist=\"playlist_key\"\n *\n * @access public\n */\n function handle() {\n /*\n We don't fire this if the user is touching the screen and it's moving.\n This could lead to a mis-fire\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Gets the playlist attribute from the element.\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n\n /*\n If the playlist is null, we handle the global prev.\n */\n if (playlist == null) {\n handleGlobalPrev();\n }\n\n /*\n If the playlist is set, we handle the playlist prev.\n */\n if (playlist != null) {\n handlePlaylistPrev(playlist);\n }\n }\n }\n\n /**\n * Handles an event on a global previous button.\n *\n * @access private\n */\n function handleGlobalPrev() {\n /*\n Check to see if the current state of the player\n is in playlist mode or not playlist mode. If we are in playlist mode,\n we set prev on the playlist.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n _audioNavigation2.default.setPrevious();\n } else {\n _audioNavigation2.default.setPreviousPlaylist(_config2.default.active_playlist);\n }\n }\n\n /**\n * Handles an event on a previous playlist button.\n *\n * @access private\n * @prop {string} playlist - The playlist we are handling the previous for.\n */\n function handlePlaylistPrev(playlist) {\n /*\n Ensure the playlist is the same as the active playlist. To get to change\n the scope to a new playlist, you need to play that playlist.\n */\n if (playlist == _config2.default.active_playlist) {\n _audioNavigation2.default.setPreviousPlaylist(_config2.default.active_playlist);\n } else {\n _debug2.default.writeMessage(\"You can not go to the previous song on a playlist that is not being played!\");\n }\n }\n\n /*\n Returns the public facing methods.\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * AmplitudeJS Debug Module\n * @module utilities/Debug\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = Prev;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _bufferedProgressElements = __webpack_require__(24);\n\nvar _bufferedProgressElements2 = _interopRequireDefault(_bufferedProgressElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Event Handler for progress\n *\n * @module events/Progress\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Progress = function () {\n /**\n * As the song is buffered, we can display the buffered percentage in\n * a progress bar.\n *\n * HANDLER FOR: progress\n *\n * @access public\n */\n function handle() {\n /*\n Help from: http://jsbin.com/badimipi/1/edit?html,js,output\n */\n if (_config2.default.audio.buffered.length - 1 >= 0) {\n var bufferedEnd = _config2.default.audio.buffered.end(_config2.default.audio.buffered.length - 1);\n var duration = _config2.default.audio.duration;\n\n /*\n Set the computed song buffered value to the config.\n */\n _config2.default.buffered = bufferedEnd / duration * 100;\n }\n\n /*\n Sync the buffered progress bars.\n */\n _bufferedProgressElements2.default.sync();\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the BufferedProgressElements visual handler\n * @module visual/bufferedProgressElements.js\n */\nexports.default = Progress;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _repeater = __webpack_require__(12);\n\nvar _repeater2 = _interopRequireDefault(_repeater);\n\nvar _repeatElements = __webpack_require__(8);\n\nvar _repeatElements2 = _interopRequireDefault(_repeatElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Repeat Event Handler\n *\n * @module events/Repeat\n */\n\n\n/**\n * Imports the repeater utility module.\n * @module utilities/Repeater\n */\nvar Repeat = function () {\n /**\n * Handles an event on the repeat button\n *\n * HANDLER FOR: class=\"amplitude-repeat\"\n *\n * GLOBAL: class=\"amplitude-repeat\"\n * PLAYLIST: class=\"amplitude-repeat\" amplitude-playlist=\"playlist_key\"\n *\n * @access public\n */\n function handle() {\n /*\n We don't fire this if the user is touching the screen and it's moving.\n This could lead to a mis-fire\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Gets the playlist attribute from the element.\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n\n /*\n If the playlist is null, we handle the global repeat.\n */\n if (playlist == null) {\n handleGlobalRepeat();\n }\n\n /*\n If the playlist is set, we handle the playlist repeat.\n */\n if (playlist != null) {\n handlePlaylistRepeat(playlist);\n }\n }\n }\n\n /**\n * Handles an event on a global repeat button.\n *\n * @access private\n */\n function handleGlobalRepeat() {\n /*\n Sets repeat to the opposite of what it was set to\n */\n _repeater2.default.setRepeat(!_config2.default.repeat);\n\n /*\n Visually sync repeat\n */\n _repeatElements2.default.syncRepeat();\n }\n\n /**\n * Handles an event on a playlist repeat button.\n *\n * @access private\n * @prop {string} playlist - The playlist we are handling the repeat store.\n */\n function handlePlaylistRepeat(playlist) {\n /*\n Sets repeat to the opposite of what it was set to for the playlist.\n */\n _repeater2.default.setRepeatPlaylist(!_config2.default.playlists[playlist].repeat, playlist);\n\n /*\n Visually sync playlist repeat\n */\n _repeatElements2.default.syncRepeatPlaylist(playlist);\n }\n\n /*\n Returns the public facing methods.\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the visual repeat elements module\n * @module visual/RepeatElements\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = Repeat;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _repeater = __webpack_require__(12);\n\nvar _repeater2 = _interopRequireDefault(_repeater);\n\nvar _repeatElements = __webpack_require__(8);\n\nvar _repeatElements2 = _interopRequireDefault(_repeatElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles an event on the Amplitude Repeat Song.\n *\n * @module events/RepeatSong\n */\n\n\n/**\n * Imports the repeat utility\n * @module utilities/Repeater\n */\nvar RepeatSong = function () {\n /**\n * Handles an event on the repeat song button\n *\n * HANDLER FOR: 'amplitude-repeat-song'\n *\n * @access public\n */\n function handle() {\n /*\n If the touch is moving, we do not want to accidentally touch the play\n pause element and fire an event.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Sets repeat song to the opposite of what it was set to\n */\n _repeater2.default.setRepeatSong(!_config2.default.repeat_song);\n\n /*\n Visually sync repeat song\n */\n _repeatElements2.default.syncRepeatSong();\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Repeat Element\n * @module visual/RepeatElements\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = RepeatSong;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _shuffler = __webpack_require__(13);\n\nvar _shuffler2 = _interopRequireDefault(_shuffler);\n\nvar _shuffleElements = __webpack_require__(19);\n\nvar _shuffleElements2 = _interopRequireDefault(_shuffleElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the shuffle events\n * @module events/Shuffle\n */\n\n\n/**\n * Imports the shuffler utility\n * @module utilities/Shuffler\n */\nvar Shuffle = function () {\n /**\n * Handles an event on the shuffle button\n *\n * HANDLER FOR: class=\"amplitude-shuffle\"\n *\n * GLOBAL: class=\"amplitude-shuffle\"\n * PLAYLIST: class=\"amplitude-shuffle\" amplitude-playlist=\"playlist_key\"\n *\n * @access public\n */\n function handle() {\n /*\n If the touch is moving, we do not want to accidentally touch the play\n pause element and fire an event.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Get the playlist attribute\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n\n /*\n Check to see if the shuffle button belongs to a playlist\n */\n if (playlist == null) {\n handleGlobalShuffle();\n } else {\n handlePlaylistShuffle(playlist);\n }\n }\n }\n\n /**\n * Handles the event on the global shuffle button.\n */\n function handleGlobalShuffle() {\n /*\n Either shuffles or removes shuffle on the global state.\n */\n _shuffler2.default.toggleShuffle();\n\n /*\n Visualize the shuffle state change.\n */\n _shuffleElements2.default.syncMain(_config2.default.shuffle_on);\n }\n\n /**\n * Handles the event on the playlist shuffle button.\n *\n * @param {string} playlist - The playlist string the shuffle button belongs to.\n */\n function handlePlaylistShuffle(playlist) {\n /*\n Either shuffles or removes shuffle on the playlist state.\n */\n _shuffler2.default.toggleShufflePlaylist(playlist);\n\n /*\n Visually sync the playlist shuffle statuses.\n */\n _shuffleElements2.default.syncPlaylist(playlist);\n }\n\n /**\n * Returns public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the visual shuffle elements\n * @module visual/ShuffleElements\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = Shuffle;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the skip to event.\n *\n * @module events/SkipTo\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/Core\n */\n\n\n/**\n * Imports the AmplitudeJS Audio Navigation Utility\n * @module utilities/AudioNavigation\n */\n/**\n * Imports the config module\n * @module config\n */\nvar SkipTo = function () {\n /**\n * Handles an event on a skip to button.\n *\n * HANDLER FOR: class=\"amplitude-skip-to\"\n *\n * GLOBAL: class=\"amplitude-skip-to\" amplitude-song-index=\"song_index\" amplitude-location=\"seconds\"\n * PLAYLIST: class=\"amplitude-skip-to\" amplitude-playlist=\"playlist_key\" amplitude-song-index=\"song_index\" amplitude-location=\"seconds\"\n *\n * @access public\n */\n function handle() {\n /*\n If the touch is moving, we do not want to accidentally touch the play\n pause element and fire an event.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Extracts the needed attributes from the element.\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n var songIndex = this.getAttribute(\"data-amplitude-song-index\");\n var location = this.getAttribute(\"data-amplitude-location\");\n\n /*\n If the location is null, write a message. We can't skip to a location\n that is null\n */\n if (location == null) {\n _debug2.default.writeMessage(\"You must add an 'data-amplitude-location' attribute in seconds to your 'amplitude-skip-to' element.\");\n }\n\n /*\n If the song index is null, write a debug message. We can't skip to a location\n of a null song.\n */\n if (songIndex == null) {\n _debug2.default.writeMessage(\"You must add an 'data-amplitude-song-index' attribute to your 'amplitude-skip-to' element.\");\n }\n\n /*\n If the location and song index are set, continue.\n */\n if (location != null && songIndex != null) {\n /*\n Determines if the skip to button is in the scope of a playlist.\n */\n if (playlist == null) {\n handleSkipToSong(parseInt(songIndex), parseInt(location));\n } else {\n handleSkipToPlaylist(playlist, parseInt(songIndex), parseInt(location));\n }\n }\n }\n }\n\n /**\n * Handles the skipping to a specific song\n *\n * @access private\n * @param {string} songIndex - The index of the song being skipped to\n * @param {number} location - The seconds location of the song in the playlist.\n */\n function handleSkipToSong(songIndex, location) {\n /*\n Changes the song to where it's being skipped and then\n play the song.\n */\n _audioNavigation2.default.changeSong(_config2.default.songs[songIndex], songIndex);\n _core2.default.play();\n\n /*\n Syncs all of the play pause buttons now that we've skipped.\n */\n _playPauseElements2.default.syncGlobal();\n _playPauseElements2.default.syncSong();\n\n /*\n Skip to the location in the song.\n */\n _core2.default.skipToLocation(location);\n }\n\n /**\n * Handles the skipping to a song that's in a playlist.\n *\n * @access private\n * @param {string} playlist - The playlist being skipped to\n * @param {string} songIndex - The index of the song in the playlist\n * @param {number} location - The seconds location of the song in the playlist.\n */\n function handleSkipToPlaylist(playlist, songIndex, location) {\n /*\n Checks if we are skipping to a new playlist\n */\n if (_checks2.default.newPlaylist(playlist)) {\n _audioNavigation2.default.setActivePlaylist(playlist);\n }\n\n /*\n Changes the song to where it's being skipped and then\n play the song.\n */\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[songIndex], songIndex);\n _core2.default.play();\n\n /*\n Sync all of the play pause elements.\n */\n _playPauseElements2.default.syncGlobal();\n _playPauseElements2.default.syncPlaylist();\n _playPauseElements2.default.syncSong();\n\n /*\n Skip to the location in the song.\n */\n _core2.default.skipToLocation(location);\n }\n\n /**\n * Return public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS play pause elements.\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Imports the AmplitudeJS Checks Utility\n * @module utilities/Checks\n */\n\n\n/**\n * Imports AmplitudeJS Debug Utility\n * @module utilities/debug\n */\nexports.default = SkipTo;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _time = __webpack_require__(23);\n\nvar _time2 = _interopRequireDefault(_time);\n\nvar _songSliderElements = __webpack_require__(14);\n\nvar _songSliderElements2 = _interopRequireDefault(_songSliderElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the song slider to event.\n *\n * @module events/SongSlider\n */\n\n\n/**\n * Imports the time utility\n * @module utilities/Time\n */\nvar SongSlider = function () {\n /**\n * Handles a song slider element.\n *\n * HANDLER FOR: class=\"amplitude-song-slider\"\n *\n * GLOBAL: class=\"amplitude-song-slider\"\n * PLAYLIST: class=\"amplitude-song-slider\" amplitude-playlist=\"playlist_key\"\n * SONG: class=\"amplitude-song-slider\" amplitude-song-index=\"song_index\"\n * SONG IN PLAYLIST: class=\"amplitude-song-slider\" amplitude-playlist=\"playlist_key\" amplitude-song-index=\"song_index\"\n *\n * @access public\n */\n function handle() {\n /*\n Gets the percentage of the song we will be setting the location for.\n */\n var locationPercentage = this.value;\n\n /*\n Computes the time in seconds for the current song.\n */\n var computedTime = _config2.default.audio.duration * (locationPercentage / 100);\n\n /*\n Gets the attributes for playlist and index for the element.\n */\n var playlist = this.getAttribute(\"data-amplitude-playlist\");\n var song = this.getAttribute(\"data-amplitude-song-index\");\n\n /*\n If no playlist or song is defined, then it's a global song slider.\n */\n if (playlist == null && song == null) {\n handleGlobalSongSlider(computedTime, locationPercentage);\n }\n\n /*\n If a playlist but no song is defined, then it's playlist slider.\n */\n if (playlist != null && song == null) {\n handlePlaylistSongSlider(computedTime, locationPercentage, playlist);\n }\n\n /*\n If no playlist but a song is defined, then it's a song slider.\n */\n if (playlist == null && song != null) {\n handleSongSongSlider(computedTime, locationPercentage, song);\n }\n\n /*\n If playlist and song are defined then it's a song in a playlist\n slider.\n */\n if (playlist != null && song != null) {\n handleSongInPlaylistSongSlider(computedTime, locationPercentage, playlist, song);\n }\n }\n\n /**\n * Handles a change on a global audio slider\n *\n * @access private\n * @param {integer} computedTime - The time we will set the audio to.\n * @param {float} locationPercentage - The percent through the song.\n */\n function handleGlobalSongSlider(computedTime, locationPercentage) {\n /*\n If the active song is not live, set the current time and adjust the slider.\n */\n if (!_config2.default.active_metadata.live) {\n _time2.default.setCurrentTime(computedTime);\n\n /*\n Sync song slider elements.\n */\n _songSliderElements2.default.sync(locationPercentage, _config2.default.active_playlist, _config2.default.active_index);\n }\n }\n\n /**\n * Handles a change on a playlist audio slider\n *\n * @access private\n * @param {integer} computedTime - The time we will set the audio to.\n * @param {float} locationPercentage - The percent through the song.\n * @param {string} playlist = The playlist the song slider belongs to.\n */\n function handlePlaylistSongSlider(computedTime, locationPercentage, playlist) {\n /*\n We don't want to song slide a playlist that's not the\n active placylist.\n */\n if (_config2.default.active_playlist == playlist) {\n /*\n If the active song is not live, set the current time\n */\n if (!_config2.default.active_metadata.live) {\n _time2.default.setCurrentTime(computedTime);\n\n /*\n Sync song slider elements.\n */\n _songSliderElements2.default.sync(locationPercentage, playlist, _config2.default.active_index);\n }\n }\n }\n\n /**\n * Handles a change on a song audio slider\n *\n * @access private\n * @param {integer} computedTime - The time we will set the audio to.\n * @param {float} locationPercentage - The percent through the song.\n * @param {integer} songIndex = The song being navigated.\n */\n function handleSongSongSlider(computedTime, locationPercentage, songIndex) {\n /*\n We only want to move the slider if the active song is the\n same as the song being selected.\n */\n if (_config2.default.active_index == songIndex && _config2.default.active_playlist == null) {\n /*\n If the active song is not live, set the current time\n */\n if (!_config2.default.active_metadata.live) {\n _time2.default.setCurrentTime(computedTime);\n\n /*\n Sync song slider elements.\n */\n _songSliderElements2.default.sync(locationPercentage, _config2.default.active_playlist, songIndex);\n }\n }\n }\n\n /**\n * Handles a change on a song audio slider\n *\n * @access private\n * @param {integer} computedTime - The time we will set the audio to.\n * @param {float} locationPercentage - The percent through the song.\n * @param {integer} playlist = The playlist the song belongs to.\n * @param {integer} songIndex = The song being navigated.\n */\n function handleSongInPlaylistSongSlider(computedTime, locationPercentage, playlist, songIndex) {\n /*\n We only want to move the slider if the active song is the\n same as the song being selected and the active playlist is the same\n as the playlist selected.\n */\n if (_config2.default.playlists[playlist].active_index == songIndex && _config2.default.active_playlist == playlist) {\n /*\n If the active song is not live, set the current time\n */\n if (!_config2.default.active_metadata.live) {\n _time2.default.setCurrentTime(computedTime);\n\n /*\n Sync song slider elements.\n */\n _songSliderElements2.default.sync(locationPercentage, playlist, songIndex);\n }\n }\n }\n\n /*\n Return public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the song slider elements.\n * @module visual/SongSliderElements\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = SongSlider;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the stop events\n * @module events/Stop\n */\n\n\n/**\n * Imports the AmplitudeJS Play Pause Elements\n * @module visual/PlayPauseElements\n */\n/**\n * Imports the config module\n * @module config\n */\nvar Stop = function () {\n /**\n * Handles an event on a stop element.\n *\n * HANDLER FOR: class=\"amplitude-stop\"\n *\n * @access public\n */\n function handle() {\n /*\n If touch is not moving, we run. We don't want to accidentally press\n stop if touch is moving.\n */\n if (!_config2.default.is_touch_moving) {\n /*\n Sets all of the play/pause buttons to pause\n */\n _playPauseElements2.default.syncToPause();\n\n /*\n Stops the active song.\n */\n _core2.default.stop();\n }\n }\n\n /**\n * Returns public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/Core\n */\n\n\n/**\n * Imports the config state module.\n * @module utilities/configState\n */\nexports.default = Stop;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _bufferedProgressElements = __webpack_require__(24);\n\nvar _bufferedProgressElements2 = _interopRequireDefault(_bufferedProgressElements);\n\nvar _timeElements = __webpack_require__(15);\n\nvar _timeElements2 = _interopRequireDefault(_timeElements);\n\nvar _songSliderElements = __webpack_require__(14);\n\nvar _songSliderElements2 = _interopRequireDefault(_songSliderElements);\n\nvar _songPlayedProgressElements = __webpack_require__(20);\n\nvar _songPlayedProgressElements2 = _interopRequireDefault(_songPlayedProgressElements);\n\nvar _time = __webpack_require__(23);\n\nvar _time2 = _interopRequireDefault(_time);\n\nvar _callbacks = __webpack_require__(9);\n\nvar _callbacks2 = _interopRequireDefault(_callbacks);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS Event Handler for Time Update\n *\n * @module events/TimeUpdate\n */\n\n\n/**\n * Imports the Time utility class\n * @module utilities/Time\n */\n\n\n/**\n * Imports the Song Slider Elements visual class.\n * @module visual/songSliderElements\n */\n\n\n/**\n * Imports the Buffered Progress Elements visual class\n * @module visual/bufferedProgressElements\n */\nvar TimeUpdate = function () {\n /**\n * When the time updates on the active song, we sync the current time displays\n *\n * HANDLER FOR: timeupdate\n *\n * @access public\n */\n function handle() {\n /*\n Computes the buffered time.\n */\n computeBufferedTime();\n\n /*\n Sync the buffered progress elements.\n */\n _bufferedProgressElements2.default.sync();\n\n /*\n Updates the current time information.\n */\n updateTimeInformation();\n\n /*\n Run time callbacks\n */\n runTimeCallbacks();\n }\n\n /**\n * Computes the buffered time\n */\n function computeBufferedTime() {\n /*\n Help from: http://jsbin.com/badimipi/1/edit?html,js,output\n */\n if (_config2.default.audio.buffered.length - 1 >= 0) {\n var bufferedEnd = _config2.default.audio.buffered.end(_config2.default.audio.buffered.length - 1);\n var duration = _config2.default.audio.duration;\n\n _config2.default.buffered = bufferedEnd / duration * 100;\n }\n }\n\n /**\n * Updates the current time information.\n * @access private\n */\n function updateTimeInformation() {\n /*\n If the current song is not live, then\n we can update the time information. Otherwise the\n current time updates wouldn't mean much since the time\n is infinite.\n */\n if (!_config2.default.active_metadata.live) {\n /*\n Compute the current time\n */\n var currentTime = _time2.default.computeCurrentTimes();\n\n /*\n Compute the song completion percentage\n */\n var songCompletionPercentage = _time2.default.computeSongCompletionPercentage();\n\n /*\n Computes the song duration\n */\n var songDuration = _time2.default.computeSongDuration();\n\n /*\n Sync the current time elements with the current\n location of the song and the song duration elements with\n the duration of the song.\n */\n _timeElements2.default.syncCurrentTimes(currentTime);\n\n /*\n Sync the song slider elements.\n */\n _songSliderElements2.default.sync(songCompletionPercentage, _config2.default.active_playlist, _config2.default.active_index);\n\n /*\n Sync the song played progress elements.\n */\n _songPlayedProgressElements2.default.sync(songCompletionPercentage);\n\n /*\n Sync the duration time elements.\n */\n _timeElements2.default.syncDurationTimes(currentTime, songDuration);\n }\n }\n\n /**\n * Runs a callback at a certain time in the song.\n */\n function runTimeCallbacks() {\n /*\n Gets the current seconds into the song.\n */\n var currentSeconds = Math.floor(_config2.default.audio.currentTime);\n\n /*\n Checks to see if there is a callback at the certain seconds into the song.\n */\n if (_config2.default.active_metadata.time_callbacks != undefined && _config2.default.active_metadata.time_callbacks[currentSeconds] != undefined) {\n /*\n Checks to see if the callback has been run. Since the time updates more than\n one second, we don't want the callback to run X times.\n */\n if (!_config2.default.active_metadata.time_callbacks[currentSeconds].run) {\n _config2.default.active_metadata.time_callbacks[currentSeconds].run = true;\n _config2.default.active_metadata.time_callbacks[currentSeconds]();\n }\n } else {\n /*\n Iterate over all of the callbacks for a song. If the song has one, we flag\n the run as false. This occurs because we have passed the active second for\n the callback, so we flag it as not run. It will either run again if the user\n seeks back or not run in the future.\n */\n for (var seconds in _config2.default.active_metadata.time_callbacks) {\n if (_config2.default.active_metadata.time_callbacks.hasOwnProperty(seconds)) {\n _config2.default.active_metadata.time_callbacks[seconds].run = false;\n }\n }\n }\n }\n /**\n * Returns public functions\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the Callback utility class\n * @module utilities/Callbacks\n */\n\n\n/**\n * Imports the Song Played Progress Elements visual class.\n * @module visual/songPlayedProgressElements\n */\n\n\n/**\n * Imports the Time Elements visual class.\n * @module visual/timeElements\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = TimeUpdate;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _muteElements = __webpack_require__(10);\n\nvar _muteElements2 = _interopRequireDefault(_muteElements);\n\nvar _volumeSliderElements = __webpack_require__(11);\n\nvar _volumeSliderElements2 = _interopRequireDefault(_volumeSliderElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all events for a volume down event.\n * @module events/VolumeDown\n */\n\n\n/**\n * Imports the AmplitudeJS Visual Mute Elements\n * @module visual/MuteElements\n */\n/**\n * Imports the config to use the values\n */\nvar VolumeDown = function () {\n /**\n * Handles a click on a volume down element.\n *\n * HANDLER FOR: class=\"amplitude-volume-down\"\n *\n * @access public\n */\n function handle() {\n /*\n We don't fire this if the user is touching the screen and it's moving.\n This could lead to a mis-fire\n */\n if (!_config2.default.is_touch_moving) {\n /*\n The volume range is from 0 to 1 for an audio element. We make this\n a base of 100 for ease of working with.\n If the new value is less than 100, we use the new calculated\n value which gets converted to the proper unit for the audio element.\n If the new value is greater than 100, we set the volume to 1 which\n is the max for the audio element.\n */\n var volume = null;\n\n if (_config2.default.volume - _config2.default.volume_increment > 0) {\n volume = _config2.default.volume - _config2.default.volume_increment;\n } else {\n volume = 0;\n }\n\n /*\n Calls the core function to set the volume to the computed value\n based on the user's intent.\n */\n _core2.default.setVolume(volume);\n\n /*\n Sync Mute Elements.\n */\n _muteElements2.default.setMuted(_config2.default.volume == 0 ? true : false);\n\n /*\n Sync Volume Slider Elements\n */\n _volumeSliderElements2.default.sync();\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Visual Volume Slider Elements\n * @module visual/VolumeSliderElements\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/core\n */\nexports.default = VolumeDown;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _muteElements = __webpack_require__(10);\n\nvar _muteElements2 = _interopRequireDefault(_muteElements);\n\nvar _volumeSliderElements = __webpack_require__(11);\n\nvar _volumeSliderElements2 = _interopRequireDefault(_volumeSliderElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all events for a volume up event.\n * @module events/VolumeSlider\n */\n\n\n/**\n * Imports the AmplitudeJS Visual Mute Elements\n * @module visual/MuteElements\n */\n/**\n * Imports the config to use the values\n */\nvar VolumeSlider = function () {\n /**\n * Handles a change on the volume slider\n *\n * HANDLER FOR: class=\"amplitude-volume-slider\"\n *\n * @access public\n */\n function handle() {\n /*\n Calls the core function to set the volume to the computed value\n based on the user's intent.\n */\n _core2.default.setVolume(this.value);\n\n /*\n Sync Mute Elements.\n */\n _muteElements2.default.setMuted(_config2.default.volume == 0 ? true : false);\n\n /*\n Sync the volume slider locations\n */\n _volumeSliderElements2.default.sync();\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Visual Volume Slider Elements\n * @module visual/VolumeSliderElements\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/core\n */\nexports.default = VolumeSlider;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _muteElements = __webpack_require__(10);\n\nvar _muteElements2 = _interopRequireDefault(_muteElements);\n\nvar _volumeSliderElements = __webpack_require__(11);\n\nvar _volumeSliderElements2 = _interopRequireDefault(_volumeSliderElements);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all events for a volume up event.\n * @module events/VolumeUp\n */\n\n\n/**\n * Imports the AmplitudeJS Visual Mute Elements\n * @module visual/MuteElements\n */\n/**\n * Imports the config to use the values\n */\nvar VolumeUp = function () {\n /**\n * Handles a click on a volume up element.\n *\n * HANDLER FOR: class=\"amplitude-volume-up\"\n *\n * @access public\n */\n function handle() {\n /*\n We don't fire this if the user is touching the screen and it's moving.\n This could lead to a mis-fire\n */\n if (!_config2.default.is_touch_moving) {\n /*\n The volume range is from 0 to 1 for an audio element. We make this\n a base of 100 for ease of working with.\n If the new value is less than 100, we use the new calculated\n value which gets converted to the proper unit for the audio element.\n If the new value is greater than 100, we set the volume to 1 which\n is the max for the audio element.\n */\n var volume = null;\n\n if (_config2.default.volume + _config2.default.volume_increment <= 100) {\n volume = _config2.default.volume + _config2.default.volume_increment;\n } else {\n volume = 100;\n }\n\n /*\n Calls the core function to set the volume to the computed value\n based on the user's intent.\n */\n _core2.default.setVolume(volume);\n\n /*\n Sync Mute Elements.\n */\n _muteElements2.default.setMuted(_config2.default.volume == 0 ? true : false);\n\n /*\n Sync Volume Slider Elements\n */\n _volumeSliderElements2.default.sync();\n }\n }\n\n /**\n * Returns the public facing methods\n */\n return {\n handle: handle\n };\n}();\n\n/**\n * Imports the AmplitudeJS Visual Volume Slider Elements\n * @module visual/VolumeSliderElements\n */\n\n\n/**\n * Imports the AmplitudeJS Core Methods\n * @module core/core\n */\nexports.default = VolumeUp;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * AmplitudeJS FX Module. Helps with configuring and setting up visualizations\n * and any other features of the Web Audio API that Amplitude takes advantage\n * of.\n *\n * @module fx/FX\n */\nvar Fx = function () {\n /**\n * Configures the Web Audio API to work with AmplitudeJS\n */\n function configureWebAudioAPI() {\n /*\n Gets the context for the browser. If this is null, the Web Audio\n API is unavailable.\n */\n var browserContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext;\n\n /*\n If we have a context, the Web Audio API is available and we can continue,\n otherwise, we alert the user if they have debug turned on.\n */\n if (browserContext) {\n /*\n Web Audio API is available, set the context in our config.\n */\n _config2.default.context = new browserContext();\n\n /*\n Create an analyzer that we will use in the context.\n */\n _config2.default.analyser = _config2.default.context.createAnalyser();\n\n /*\n Set cross origin to anonymous so we have a better chance of being able\n to use the power of the Web Audio API.\n */\n _config2.default.audio.crossOrigin = \"anonymous\";\n\n /*\n Bind the source to the Javascript Audio Element.\n */\n _config2.default.source = _config2.default.context.createMediaElementSource(_config2.default.audio);\n\n /*\n Connect the analyser to the source\n */\n _config2.default.source.connect(_config2.default.analyser);\n\n /*\n Connect the context destination to the analyser.\n */\n _config2.default.analyser.connect(_config2.default.context.destination);\n } else {\n AmplitudeHelpers.writeDebugMessage(\"Web Audio API is unavailable! We will set any of your visualizations with your back up definition!\");\n }\n }\n\n /**\n * Determines if the web audio API is available or not.\n */\n function webAudioAPIAvailable() {\n /*\n Gets the context for the browser. If this is null, the Web Audio\n API is unavailable.\n */\n var browserContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext;\n _config2.default.web_audio_api_available = false;\n\n /*\n Determines if the Web Audio API is available or not.\n */\n if (browserContext) {\n /*\n Set the flag in the config that the Web Audio API is available\n */\n _config2.default.web_audio_api_available = true;\n return true;\n } else {\n /*\n Set the flag in the config that the Web Audio API is not available\n */\n _config2.default.web_audio_api_available = false;\n return false;\n }\n }\n\n /**\n * Determines if the user is using any of the web audio API features.\n */\n function determineUsingAnyFX() {\n var waveforms = document.querySelectorAll(\".amplitude-wave-form\");\n var visualizationElements = document.querySelectorAll(\".amplitude-visualization\");\n\n if (waveforms.length > 0 || visualizationElements.length > 0) {\n return true;\n } else {\n return false;\n }\n }\n\n /*\n Returns the publicly accessible methods\n */\n return {\n configureWebAudioAPI: configureWebAudioAPI,\n webAudioAPIAvailable: webAudioAPIAvailable,\n determineUsingAnyFX: determineUsingAnyFX\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = Fx;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _init = __webpack_require__(21);\n\nvar _init2 = _interopRequireDefault(_init);\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _core = __webpack_require__(1);\n\nvar _core2 = _interopRequireDefault(_core);\n\nvar _shuffler = __webpack_require__(13);\n\nvar _shuffler2 = _interopRequireDefault(_shuffler);\n\nvar _configState = __webpack_require__(6);\n\nvar _configState2 = _interopRequireDefault(_configState);\n\nvar _audioNavigation = __webpack_require__(3);\n\nvar _audioNavigation2 = _interopRequireDefault(_audioNavigation);\n\nvar _repeater = __webpack_require__(12);\n\nvar _repeater2 = _interopRequireDefault(_repeater);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _visualizations = __webpack_require__(16);\n\nvar _visualizations2 = _interopRequireDefault(_visualizations);\n\nvar _shuffleElements = __webpack_require__(19);\n\nvar _shuffleElements2 = _interopRequireDefault(_shuffleElements);\n\nvar _repeatElements = __webpack_require__(8);\n\nvar _repeatElements2 = _interopRequireDefault(_repeatElements);\n\nvar _songSliderElements = __webpack_require__(14);\n\nvar _songSliderElements2 = _interopRequireDefault(_songSliderElements);\n\nvar _songPlayedProgressElements = __webpack_require__(20);\n\nvar _songPlayedProgressElements2 = _interopRequireDefault(_songPlayedProgressElements);\n\nvar _timeElements = __webpack_require__(15);\n\nvar _timeElements2 = _interopRequireDefault(_timeElements);\n\nvar _playPauseElements = __webpack_require__(2);\n\nvar _playPauseElements2 = _interopRequireDefault(_playPauseElements);\n\nvar _metaDataElements = __webpack_require__(7);\n\nvar _metaDataElements2 = _interopRequireDefault(_metaDataElements);\n\nvar _playbackSpeedElements = __webpack_require__(18);\n\nvar _playbackSpeedElements2 = _interopRequireDefault(_playbackSpeedElements);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nvar _soundcloud = __webpack_require__(17);\n\nvar _soundcloud2 = _interopRequireDefault(_soundcloud);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Amplitude should just be an interface to the public functions.\n * Everything else should be handled by other objects\n *\n * @module Amplitude\n */\n\n\n/**\n * Meta Data Elements\n * @module visual/MetaDataElements\n */\n\n\n/**\n * Time Elements\n * @module visual/TimeElements\n */\n\n\n/**\n * Song Slider Elements\n * @module visual/SongSliderElements\n */\n\n\n/****************************************************\n * Elements\n ****************************************************/\n/**\n * Visual Shuffle Elements\n * @module visual/ShuffleElements\n */\n\n\n/**\n * Imports the checks\n * @module utilities/Checks\n */\n\n\n/**\n * Imports the audio navigation\n * @module utilities/AudioNavigation\n */\n\n\n/****************************************************\n * Utilities\n ****************************************************/\n/**\n * Shuffler Module\n * @module utilities/Shuffler\n */\n\n\n/****************************************************\n * Config\n ****************************************************/\n/**\n * Imports the config module\n * @module config\n */\nvar Amplitude = function () {\n /**\n * The main init function. The user will call this through\n * Amplitude.init({}) and pass in their settings.\n *\n * Public Accessor: Amplitude.init( user_config_json );\n *\n * @access public\n * @param {object} userConfig \t- A JSON object of user defined values that helps configure and initialize AmplitudeJS.\n */\n function init(userConfig) {\n _init2.default.initialize(userConfig);\n }\n\n /**\n * Returns the current config for AmplitudeJS\n */\n function getConfig() {\n return _config2.default;\n }\n\n /**\n * Binds new elements that were added to the page.\n *\n * Public Accessor: Amplitude.bindNewElements()\n *\n * @access public\n */\n function bindNewElements() {\n _init2.default.rebindDisplay();\n }\n\n /**\n * Returns the active playlist.\n *\n * Public Accessor: Amplitude.getActivePlaylist()\n *\n * @access public\n */\n function getActivePlaylist() {\n return _config2.default.active_playlist;\n }\n\n /**\n * Returns the current playback speed.\n *\n * Public Accessor: Amplitude.getPlaybackSpeed()\n *\n * @access public\n */\n function getPlaybackSpeed() {\n return _config2.default.playback_speed;\n }\n\n /**\n * Sets the playback speed\n *\n * Public Accessor: Amplitude.setPlaybackSpeed( speed )\n *\n * @access public\n */\n function setPlaybackSpeed(speed) {\n /*\n Increments are set in .5 We only accept values\n 1, 1.5, 2\n 1 -> Regular Speed\n 1.5 -> 50% faster\n 2 -> Twice as fast\n */\n _core2.default.setPlaybackSpeed(speed);\n\n /*\n Visually sync the playback speed.\n */\n _playbackSpeedElements2.default.sync();\n }\n\n /**\n * Gets the repeat state of the player.\n *\n * Public Accessor: Amplitude.getRepeat()\n *\n * @access public\n */\n function getRepeat() {\n return _config2.default.repeat;\n }\n\n /**\n * Gets the repeat state for a playlist\n *\n * Public Accessor: Amplitude.getRepeatPlaylist()\n *\n * @access public\n */\n function getRepeatPlaylist(playlistKey) {\n return _config2.default.playlists[playlistKey].repeat;\n }\n\n /**\n * Returns the shuffle state of the player.\n *\n * Public Accessor: Amplitude.getShuffle()\n *\n * @access public\n */\n function getShuffle() {\n return _config2.default.shuffle_on;\n }\n\n /**\n * Returns the shuffle state of the playlist.\n *\n * Public Accessor: Amplitude.getShufflePlaylist( playlist )\n *\n * @access public\n * @param {string} playlist \t- The key representing the playlist ID to see if it's shuffled or not.\n */\n function getShufflePlaylist(playlist) {\n return _config2.default.playlists[playlist].shuffle;\n }\n\n /**\n * Sets the shuffle state for the player.\n *\n * Public Accessor: Amplitude.setShuffle()\n *\n * @param {boolean} shuffle \t- True when we are shuffling the songs, false when we turn off shuffle.\n *\n * @access public\n */\n function setShuffle(shuffle) {\n _shuffler2.default.setShuffle(shuffle);\n\n _shuffleElements2.default.syncMain();\n }\n\n /**\n * Sets the shuffle state for the playlist\n *\n * Public Accessor: Amplitude.setShufflePlaylist( playlist )\n *\n * @access public\n * @param {string} playlist \t- The key representing the playlist ID to to shuffle the playlist.\n * @param {boolean} shuffle \t- True when we are shuffling the playlist, false when we turn off shuffle.\n */\n function setShufflePlaylist(playlist, shuffle) {\n _shuffler2.default.setShufflePlaylist(playlist, shuffle);\n\n _shuffleElements2.default.syncMain();\n _shuffleElements2.default.syncPlaylist(playlist);\n }\n\n /**\n * Sets the repeat state for the player.\n *\n * Public Accessor: Amplitude.setRepeat()\n *\n * @access public\n * @param {boolean} repeatState \t- The state you want the repeat song to be in.\n */\n function setRepeat(repeatState) {\n _repeater2.default.setRepeat(repeatState);\n _repeatElements2.default.syncRepeat();\n }\n\n /**\n * Sets the repeat state for a playlist.\n *\n * Public Accessor: Amplitude.setRepeatPlaylist( playlistKey )\n *\n * @access public\n * @param {string} playlist \t- The key representing the playlist ID to to shuffle the playlist.\n * @param {boolean} repeatState - The state you want the repeat playlist to be in.\n */\n function setRepeatPlaylist(playlist, repeatState) {\n _repeater2.default.setRepeatPlaylist(repeatState, playlist);\n _repeatElements2.default.syncRepeatPlaylist(playlist);\n }\n\n /**\n * Sets the repeat state for the song.\n *\n * Public Accessor: Amplitude.setRepeatSong()\n *\n * @access public\n * @param {boolean} repeatState \t- The state you want the repeat song status to be in.\n */\n function setRepeatSong(repeatState) {\n if (!_config2.default.is_touch_moving) {\n /*\n Sets repeat to the opposite of what it was set to\n */\n _repeater2.default.setRepeatSong(!_config2.default.repeat_song);\n\n /*\n Visually sync repeat song\n */\n _repeatElements2.default.syncRepeatSong();\n }\n }\n\n /**\n * Gets the default album art for the player\n *\n * Public Accessor: Amplitude.getDefaultAlbumArt()\n *\n * @access public\n */\n function getDefaultAlbumArt() {\n return _config2.default.default_album_art;\n }\n\n /**\n * Gets the default playlist art for the playlists\n *\n * Public Accessor: Amplitude.getDefaultPlaylistArt()\n *\n * @access public\n */\n function getDefaultPlaylistArt() {\n return _config2.default.default_playlist_art;\n }\n\n /**\n * Sets the default album art for the player\n *\n * Public Accessor: Amplitude.setDefaultAlbumArt( url )\n *\n * @access public\n * @param {string} url \t- A string representing the URL of the new default album art.\n */\n function setDefaultAlbumArt(url) {\n _config2.default.default_album_art = url;\n }\n\n /**\n * Sets the default playlist art for the player\n *\n * Public Accessor: Amplitude.setDefaultPlaylistArt( url )\n *\n * @access public\n * @param {string} url - A string representing the URL of the new default playlist art.\n */\n function setDefaultPlaylistArt(url) {\n _config2.default.default_plalist_art = url;\n }\n\n /**\n * Allows the user to get the percentage of the song played.\n *\n * Public Accessor: Amplitude.getSongPlayedPercentage();\n *\n * @access public\n */\n function getSongPlayedPercentage() {\n /*\n Returns the percentage of the song played.\n */\n return _config2.default.audio.currentTime / _config2.default.audio.duration * 100;\n }\n\n /**\n * Allows the user to get the amount of seconds the song has played.\n *\n * Public Accessor: Amplitude.getSongPlayed();\n *\n * @access public\n */\n function getSongPlayedSeconds() {\n /*\n Returns the amount of seconds the song has played.\n */\n return _config2.default.audio.currentTime;\n }\n\n /**\n * Allows the user to get the duration of the current song\n *\n * Public Accessor: Amplitude.getSongPlayed();\n *\n * @access public\n */\n function getSongDuration() {\n /*\n Returns the duration of the current song\n */\n return _config2.default.audio.duration;\n }\n\n /**\n * Allows the user to set how far into the song they want to be. This is\n * helpful for implementing custom range sliders. Only works on the current song.\n *\n * Public Accessor: Amplitude.setSongPlayedPercentage( float );\n *\n * @access public\n * @param {number} percentage \t- The percentage of the song played\n */\n function setSongPlayedPercentage(percentage) {\n /*\n Ensures the percentage is a number and is between 0 and 100.\n */\n if (typeof percentage == \"number\" && percentage > 0 && percentage < 100) {\n /*\n Sets the current time of the song to the percentage.\n */\n _config2.default.audio.currentTime = _config2.default.audio.duration * (percentage / 100);\n }\n }\n\n /**\n * Allows the user to turn on debugging.\n *\n * Public Accessor: Amplitude.setDebug( bool );\n *\n * @access public\n * @param {boolean} state \t\t- Turns debugging on and off.\n */\n function setDebug(state) {\n /*\n Sets the global config debug on or off.\n */\n _config2.default.debug = state;\n }\n\n /**\n * Returns the active song meta data for the user to do what is\n * needed.\n *\n * Public Accessor: Amplitude.getActiveSongMetadata();\n *\n * @access public\n * @returns {object} JSON Object with the active song information\n */\n function getActiveSongMetadata() {\n return _config2.default.active_metadata;\n }\n\n /**\n * Returns the active playlist meta data for the for the user to use.\n *\n * Public Accessor: Amplitude.getActivePlaylistMetadata();\n *\n * @access public\n * @returns {object} JSON representation for the active playlist\n */\n function getActivePlaylistMetadata() {\n return _config2.default.playlists[_config2.default.active_playlist];\n }\n\n /**\n * Returns a song in the songs array at that index\n *\n * Public Accessor: Amplitude.getSongAtIndex( song_index )\n *\n * @access public\n * @param {number} index \t- The integer for the index of the song in the songs array.\n * @returns {object} JSON representation for the song at a specific index.\n */\n function getSongAtIndex(index) {\n return _config2.default.songs[index];\n }\n\n /**\n * Returns a song at a playlist index\n *\n * Public Accessor: Amplitude.getSongAtPlaylistIndex( playlist, index\n *\n * @access public\n * @param {number} index \t\t\t- The integer for the index of the song in the playlist.\n * @param {string} playlist\t\t- The key of the playlist we are getting the song at the index for\n * @returns {object} JSON representation for the song at a specific index.\n */\n function getSongAtPlaylistIndex(playlist, index) {\n var song = _config2.default.playlists[playlist].songs[index];\n\n return song;\n }\n\n /**\n * Adds a song to the end of the config array. This will allow Amplitude\n * to play the song in a playlist type setting.\n *\n * Public Accessor: Amplitude.addSong( song_json )\n *\n * @access public\n * @param {object} song \t- JSON representation of a song.\n * @returns {number} New index of the song.\n */\n function addSong(song) {\n /*\n Ensures we have a songs array to push to.\n */\n if (_config2.default.songs == undefined) {\n _config2.default.songs = [];\n }\n\n _config2.default.songs.push(song);\n\n if (_config2.default.shuffle_on) {\n _config2.default.shuffle_list.push(song);\n }\n\n if (_soundcloud2.default.isSoundCloudURL(song.url)) {\n _soundcloud2.default.resolveIndividualStreamableURL(song.url, null, _config2.default.songs.length - 1, _config2.default.shuffle_on);\n }\n\n return _config2.default.songs.length - 1;\n }\n\n /**\n * Adds a song to the beginning of the config array.\n * This will allow Amplitude to play the song in a\n * playlist type setting.\n *\n * Public Accessor: Amplitude.addSong( song_json )\n *\n * @access public\n * @param {object} song \t- JSON representation of a song.\n * @returns {number} New index of the song (0)\n */\n function prependSong(song) {\n /*\n Ensures we have a songs array to push to.\n */\n if (_config2.default.songs == undefined) {\n _config2.default.songs = [];\n }\n\n _config2.default.songs.unshift(song);\n\n if (_config2.default.shuffle_on) {\n _config2.default.shuffle_list.unshift(song);\n }\n\n if (_soundcloud2.default.isSoundCloudURL(song.url)) {\n _soundcloud2.default.resolveIndividualStreamableURL(song.url, null, _config2.default.songs.length - 1, _config2.default.shuffle_on);\n }\n\n return 0;\n }\n\n /**\n * Adds a song to a playlist. This will allow Amplitude to play the song in the\n * playlist\n *\n * Public Accessor: Amplitude.addSongToPlaylist( song_json, playlist_key )\n *\n * @access public\n * @param {object} song \t\t\t- JSON representation of a song.\n * @param {string} playlist\t\t- Playlist we are adding the song to.\n * @returns {mixed} New index of song in playlist or null if no playlist exists\n */\n function addSongToPlaylist(song, playlist) {\n if (_config2.default.playlists[playlist] != undefined) {\n _config2.default.playlists[playlist].songs.push(song);\n\n if (_config2.default.playlists[playlist].shuffle) {\n _config2.default.playlists[playlist].shuffle_list.push(song);\n }\n\n if (_soundcloud2.default.isSoundCloudURL(song.url)) {\n _soundcloud2.default.resolveIndividualStreamableURL(song.url, playlist, _config2.default.playlists[playlist].songs.length - 1, _config2.default.playlists[playlist].shuffle);\n }\n\n return _config2.default.playlists[playlist].songs.length - 1;\n } else {\n _debug2.default.writeMessage(\"Playlist doesn't exist!\");\n return null;\n }\n }\n\n /**\n * Adds a playlist to Amplitude.\n *\n * @param {string} key - The key of the playlist we are adding.\n * @param {object} data - The data relating to the playlist\n * @param {array} songs - The songs to add to the playlist\n */\n function addPlaylist(key, data, songs) {\n /*\n Ensures the playlist is not already defined.\n */\n if (_config2.default.playlists[key] == undefined) {\n /*\n Initialize the new playlist object.\n */\n _config2.default.playlists[key] = {};\n\n /*\n Define the ignored keys that we don't want to copy over.\n */\n var ignoredKeys = [\"repeat\", \"shuffle\", \"shuffle_list\", \"songs\", \"src\"];\n\n /*\n Iterate over all of the keys defined by the user and\n set them on the playlist.\n */\n for (var dataKey in data) {\n if (ignoredKeys.indexOf(dataKey) < 0) {\n _config2.default.playlists[key][dataKey] = data[dataKey];\n }\n }\n\n /*\n Initialize the default parameters for the playlist and set the songs.\n */\n _config2.default.playlists[key].songs = songs;\n _config2.default.playlists[key].active_index = null;\n _config2.default.playlists[key].repeat = false;\n _config2.default.playlists[key].shuffle = false;\n _config2.default.playlists[key].shuffle_list = [];\n\n return _config2.default.playlists[key];\n } else {\n _debug2.default.writeMessage(\"A playlist already exists with that key!\");\n return null;\n }\n }\n\n /**\n * Removes a song from the song array\n *\n * Public Accessor: Amplitude.removeSong( index )\n *\n * @access public\n * @param {integer} index - Index of the song being removed\n * @returns {boolean} True if removed false if not.\n */\n function removeSong(index) {\n _config2.default.songs.splice(index, 1);\n }\n\n /**\n * Removes a song from the playlist\n *\n * Public Accessor: Amplitude.removeSongFromPlaylist( index, playlist )\n *\n * @access public\n * @param {integer} index \t\t\t- Index of the song being removed from the playlist.\n * @param {string} playlist\t\t\t- Playlist we are removing the song from.\n * @returns {boolean} True if removed false if not.\n */\n function removeSongFromPlaylist(index, playlist) {\n if (_config2.default.playlists[playlist] != undefined) {\n _config2.default.playlists[playlist].songs.splice(index, 1);\n }\n }\n\n /**\n * When you pass a song object it plays that song right awawy. It sets\n * the active song in the config to the song you pass in and synchronizes\n * the visuals.\n *\n * Public Accessor: Amplitude.playNow( song )\n *\n * @access public\n * @param {object} song \t- JSON representation of a song.\n */\n function playNow(song) {\n /*\n Makes sure the song object has a URL associated with it\n or there will be nothing to play.\n */\n if (song.url) {\n _config2.default.audio.src = song.url;\n _config2.default.active_metadata = song;\n _config2.default.active_album = song.album;\n } else {\n /*\n Write error message since the song passed in doesn't\n have a URL.\n */\n _debug2.default.writeMessage(\"The song needs to have a URL!\");\n }\n\n /*\n Plays the song.\n */\n _core2.default.play();\n\n /*\n Sets the main song control status visual\n */\n _playPauseElements2.default.sync();\n\n /*\n Update the song meta data\n */\n _metaDataElements2.default.displayMetaData();\n\n /*\n Reset the song sliders, song progress bar info, and\n reset times. This ensures everything stays in sync.\n */\n _songSliderElements2.default.resetElements();\n\n /*\n Reset the song played progress elements.\n */\n _songPlayedProgressElements2.default.resetElements();\n\n /*\n Reset all of the current time elements.\n */\n _timeElements2.default.resetCurrentTimes();\n\n /*\n Reset all of the duration time elements.\n */\n _timeElements2.default.resetDurationTimes();\n }\n\n /**\n * Plays a song at the index passed in from the songs array.\n *\n * Public Accessor: Amplitude.playSongAtIndex( index )\n *\n * @access public\n * @param {number} index \t- The number representing the song in the songs array.\n */\n function playSongAtIndex(index) {\n /*\n Stop the current song.\n */\n _core2.default.stop();\n\n /*\n Determine if there is a new playlist, if so set the active playlist and change the song.\n */\n if (_checks2.default.newPlaylist(null)) {\n _audioNavigation2.default.setActivePlaylist(null);\n\n _audioNavigation2.default.changeSong(_config2.default.songs[index], index);\n }\n\n /*\n Check if the song is new. If so, change the song.\n */\n if (_checks2.default.newSong(null, index)) {\n _audioNavigation2.default.changeSong(_config2.default.songs[index], index);\n }\n\n /*\n Play the song\n */\n _core2.default.play();\n\n /*\n Sync all of the play pause buttons.\n */\n _playPauseElements2.default.sync();\n }\n\n /**\n * Plays a song at the index passed in for the playlist provided. The index passed\n * in should be the index of the song in the playlist and not the songs array.\n *\n * @access public\n * @param {number} index \t\t- The number representing the song in the playlist array.\n * @param {string} playlist - The key string representing the playlist we are playing the song from.\n *\n */\n function playPlaylistSongAtIndex(index, playlist) {\n _core2.default.stop();\n\n /*\n Determine if there is a new playlist, if so set the active playlist and change the song.\n */\n if (_checks2.default.newPlaylist(playlist)) {\n _audioNavigation2.default.setActivePlaylist(playlist);\n\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[index], index);\n }\n\n /*\n Check if the song is new. If so, change the song.\n */\n if (_checks2.default.newSong(playlist, index)) {\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[index], index);\n }\n\n /*\n Sync all of the play pause buttons.\n */\n _playPauseElements2.default.sync();\n\n /*\n Play the song\n */\n _core2.default.play();\n }\n\n /**\n * Allows the user to play whatever the active song is directly\n * through Javascript. Normally ALL of Amplitude functions that access\n * the core features are called through event handlers.\n *\n * Public Accessor: Amplitude.play();\n *\n * @access public\n */\n function play() {\n _core2.default.play();\n }\n\n /**\n * Allows the user to pause whatever the active song is directly\n * through Javascript. Normally ALL of Amplitude functions that access\n * the core features are called through event handlers.\n *\n * Public Accessor: Amplitude.pause();\n *\n * @access public\n */\n function pause() {\n _core2.default.pause();\n }\n\n /**\n * Allows the user to stop whatever the active song is directly\n * through Javascript.\n *\n * Public Accessor: Amplitude.stop();\n *\n * @access public\n */\n function stop() {\n _core2.default.stop();\n }\n\n /**\n * Returns the audio object used to play the audio\n *\n * Public Accessor: Amplitude.getAudio();\n *\n * @access public\n */\n function getAudio() {\n return _config2.default.audio;\n }\n\n /**\n * Returns the Web Audio API ANalyser used for visualizations.\n *\n * Public Accessor: Amplitude.getAnalyser()\n *\n * @access public\n */\n function getAnalyser() {\n return _config2.default.analyser;\n }\n\n /**\n * Plays the next song either in the playlist or globally.\n *\n * Public Accessor: Amplitude.next( playlist );\n *\n * @access public\n * @param {string} [playlist = null \t- The playlist key\n */\n function next() {\n var playlist = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var nextData = {};\n /*\n If the playlist is empty or null, then we check the active\n playlist\n */\n if (playlist == \"\" || playlist == null) {\n /*\n If the active playlist is null, then we set the next global\n song or we set the next in the playlist.\n */\n if (_config2.default.active_playlist == null || _config2.default.active_playlist == \"\") {\n _audioNavigation2.default.setNext();\n } else {\n _audioNavigation2.default.setNextPlaylist(_config2.default.active_playlist);\n }\n } else {\n _audioNavigation2.default.setNextPlaylist(playlist);\n }\n }\n\n /**\n * Plays the prev song either in the playlist or globally.\n *\n * Public Accessor: Amplitude.prev( playlist );\n *\n * @access public\n * @param {string} [playlist = null] \t- The playlist key\n */\n function prev() {\n var playlist = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\n var prevData = {};\n\n /*\n If the playlist is empty or null, then we check the active\n playlist\n */\n if (playlist == \"\" || playlist == null) {\n /*\n If the active playlist is null, then we set the prev global\n song or we set the prev in the playlist.\n */\n if (_config2.default.active_playlist == null || _config2.default.active_playlist == \"\") {\n _audioNavigation2.default.setPrevious();\n } else {\n _audioNavigation2.default.setPreviousPlaylist(_config2.default.active_playlist);\n }\n } else {\n _audioNavigation2.default.setPreviousPlaylist(playlist);\n }\n }\n\n /**\n * Gets all of the songs in the songs array\n *\n * Public Accessor: Amplitude.getSongs( );\n *\n * @access public\n */\n function getSongs() {\n return _config2.default.songs;\n }\n\n /**\n * Gets all of the songs in a playlist\n *\n * Public Accessor: Amplitude.getSongsInPlaylist( playlist );\n *\n * @access public\n * @param {string} playlist \t- The playlist key\n */\n function getSongsInPlaylist(playlist) {\n return _config2.default.playlists[playlist].songs;\n }\n\n /**\n * Get current state of songs. If shuffled, this will return the shuffled\n * songs.\n *\n * Public Accessor: Amplitude.getSongsState();\n *\n * @access public\n */\n function getSongsState() {\n if (_config2.default.shuffle_on) {\n return _config2.default.shuffle_list;\n } else {\n return _config2.default.songs;\n }\n }\n\n /**\n * Get current state of songs in playlist. If shuffled, this will return the\n * shuffled songs.\n *\n * Public Accessor: Amplitude.getSongsStatePlaylist( playlist );\n *\n * @access public\n * @param {string} playlist \t- The playlist key\n */\n function getSongsStatePlaylist(playlist) {\n if (_config2.default.playlists[playlist].shuffle) {\n return _config2.default.playlists[playlist].shuffle_list;\n } else {\n return _config2.default.playlists[playlist].songs;\n }\n }\n\n /**\n * Gets the active index of the player\n *\n * Public Accessor: Amplitude.getActiveIndex()\n *\n * @access public\n */\n function getActiveIndex() {\n return parseInt(_config2.default.active_index);\n }\n\n /**\n * Get the version of AmplitudeJS\n *\n * Public Accessor: Amplitude.getVersion()\n *\n * @access public\n */\n function getVersion() {\n return _config2.default.version;\n }\n\n /**\n * Get the buffered amount for the current song\n *\n * Public Accessor: Amplitude.getBuffered()\n *\n * @access public\n */\n function getBuffered() {\n return _config2.default.buffered;\n }\n\n /**\n * Skip to a certain location in a selected song.\n *\n * Public Accessor: Amplitude.getBuffered()\n *\n * @access public\n * @param {number} seconds \t\t\t\t\t\t- The amount of seconds we should skip to in the song.\n * @param {number} songIndex \t\t\t\t\t- The index of the song in the songs array.\n * @param {string} [playlist = null]\t- The playlist the song we are skipping to belogns to.\n */\n function skipTo(seconds, songIndex) {\n var playlist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n seconds = parseInt(seconds);\n\n if (playlist != null) {\n /*\n Checks if we are skipping to a new playlist\n */\n if (_checks2.default.newPlaylist(playlist)) {\n _audioNavigation2.default.setActivePlaylist(playlist);\n }\n\n /*\n Changes the song to where it's being skipped and then\n play the song.\n */\n _audioNavigation2.default.changeSongPlaylist(playlist, _config2.default.playlists[playlist].songs[songIndex], songIndex);\n _core2.default.play();\n\n /*\n Sync all of the play pause elements.\n */\n _playPauseElements2.default.syncGlobal();\n _playPauseElements2.default.syncPlaylist();\n _playPauseElements2.default.syncSong();\n\n /*\n Skip to the location in the song.\n */\n _core2.default.skipToLocation(seconds);\n } else {\n /*\n Changes the song to where it's being skipped and then\n play the song.\n */\n _audioNavigation2.default.changeSong(_config2.default.songs[songIndex], songIndex);\n _core2.default.play();\n\n /*\n Syncs all of the play pause buttons now that we've skipped.\n */\n _playPauseElements2.default.syncGlobal();\n _playPauseElements2.default.syncSong();\n\n /*\n Skip to the location in the song.\n */\n _core2.default.skipToLocation(seconds);\n }\n }\n\n /**\n * Sets the meta data for a song in the songs array. This will set any\n * meta data for a song besides the URL. The URL could cause issues if the\n * song was playing.\n *\n * Public Accessor: Amplitude.setSongMetaData()\n *\n * @access public\n * @param {number} index\t\t\t\t\t- The index of the song in the songs array.\n * @param {object} metaData \t\t\t- The object containing the meta data we are updating.\n * @param {string} playlist - The playlist we are updating the song meta data for.\n */\n function setSongMetaData(index, metaData) {\n var playlist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n /*\n Update the meta data for a song in a playlist.\n */\n if (playlist != \"\" && playlist != null && _config2.default.playlists[playlist] != undefined) {\n /*\n Set all of the defined meta data properties\n */\n for (var key in metaData) {\n if (metaData.hasOwnProperty(key)) {\n if (key != \"url\" && key != \"URL\" && key != \"live\" && key != \"LIVE\") {\n _config2.default.playlists[playlist].songs[index][key] = metaData[key];\n }\n }\n }\n } else {\n /*\n Update the meta data for a song.\n */\n for (var key in metaData) {\n if (metaData.hasOwnProperty(key)) {\n if (key != \"url\" && key != \"URL\" && key != \"live\" && key != \"LIVE\") {\n _config2.default.songs[index][key] = metaData[key];\n }\n }\n }\n }\n\n /*\n Display the updates on the screen.\n */\n _metaDataElements2.default.displayMetaData();\n _metaDataElements2.default.syncMetaData();\n }\n\n function setPlaylistMetaData(playlist, metaData) {\n if (_config2.default.playlists[playlist] != undefined) {\n /*\n These are the ignored keys that we won't be worrying about displaying.\n Every other key in the playlist object can be displayed.\n */\n var ignoredKeys = [\"repeat\", \"shuffle\", \"shuffle_list\", \"songs\", \"src\"];\n\n for (var key in metaData) {\n if (metaData.hasOwnProperty(key)) {\n if (ignoredKeys.indexOf(key) < 0) {\n _config2.default.playlists[playlist][key] = metaData[key];\n }\n }\n }\n\n _metaDataElements2.default.displayPlaylistMetaData();\n } else {\n _debug2.default.writeMessage(\"You must provide a valid playlist key!\");\n }\n }\n\n /**\n * Sets the delay between the songs when they are finished.\n *\n * Public Accessor: Amplitude.setDelay()\n *\n * @access public\n * @param {number} delay \t- The millisecond delay time between songs\n */\n function setDelay(time) {\n _config2.default.delay = time;\n }\n\n /**\n * Returns the current delay between songs.\n *\n * Public Accessor: Amplitude.getDelay()\n *\n * @access public\n */\n function getDelay() {\n return _config2.default.delay;\n }\n\n /**\n * Returns the state of the player.\n *\n * Public Accessor: Amplitude.getPlayerState();\n */\n function getPlayerState() {\n return _config2.default.player_state;\n }\n\n /**\n * Registers a visualization and sets that visualization's\n * preferences. When creating a visualization, you can set certain\n * preferences that the user can overwrite similar to Amplitude.\n * Public Accessor: Amplitude.registerVisualization( visualization, preferences )\n *\n * @param {object} visualzation A visualization object that gets registered\n * with Amplitude\n *\n * @param {object} preferences A JSON object of preferences relating to the\n * visualization\n */\n function registerVisualization(visualization, preferences) {\n _visualizations2.default.register(visualization, preferences);\n }\n\n /**\n * Set the visualization for the playlist\n *\n * @param {string} playlist - The playlist we are setting the visualization for.\n * @param {string} visualizationKey - The key of the visualization we are adding to the playlist.\n */\n function setPlaylistVisualization(playlist, visualizationKey) {\n if (_config2.default.playlists[playlist] != undefined) {\n if (_config2.default.visualizations.available[visualizationKey] != undefined) {\n _config2.default.playlists[playlist].visualization = visualizationKey;\n } else {\n _debug2.default.writeMessage(\"A visualization does not exist for the key provided.\");\n }\n } else {\n _debug2.default.writeMessage(\"The playlist for the key provided does not exist\");\n }\n }\n\n /**\n * Set a visualization for the song.\n *\n * @param {number} songIndex - The index of the song in the songs array we are setting the visualization for.\n * @param {string} visualizationKey - The key of the visualization we are adding to the playlist.\n */\n function setSongVisualization(songIndex, visualizationKey) {\n if (_config2.default.songs[songIndex]) {\n if (_config2.default.visualizations.available[visualizationKey] != undefined) {\n _config2.default.songs[songIndex].visualization = visualizationKey;\n } else {\n _debug2.default.writeMessage(\"A visualization does not exist for the key provided.\");\n }\n } else {\n _debug2.default.writeMessage(\"A song at that index is undefined\");\n }\n }\n\n /**\n * Set song in playlist visualization.\n *\n * @param {string} playlist - The playlist we are setting the song visualization for.\n * @param {number} songIndex - The index we are setting the visualization for.\n * @param {strong} visualizationKey - The key of the visualization we are adding to the song in the playlist.\n */\n function setSongInPlaylistVisualization(playlist, songIndex, visualizationKey) {\n if (_config2.default.playlists[playlist].songs[songIndex] != undefined) {\n if (_config2.default.visualizations.available[visualizationKey] != undefined) {\n _config2.default.playlists[playlist].songs[songIndex].visualization = visualizationKey;\n } else {\n _debug2.default.writeMessage(\"A visualization does not exist for the key provided.\");\n }\n } else {\n _debug2.default.writeMessage(\"The song in the playlist at that key is not defined\");\n }\n }\n\n /**\n * Sets the global visualization default.\n */\n function setGlobalVisualization(visualizationKey) {\n if (_config2.default.visualizations.available[visualizationKey] != undefined) {\n _config2.default.visualization = visualizationKey;\n } else {\n _debug2.default.writeMessage(\"A visualization does not exist for the key provided.\");\n }\n }\n\n /**\n * Sets the active volume.\n * @param {number} volumeLevel - A number between 1 and 100 as a percentage of\n * min to max for a volume level.\n */\n function setVolume(volumeLevel) {\n _core2.default.setVolume(volumeLevel);\n }\n\n /**\n * Gets the active volume.\n */\n function getVolume() {\n return _config2.default.volume;\n }\n\n /*\n Returns all of the publically accesible methods.\n */\n return {\n init: init,\n getConfig: getConfig,\n bindNewElements: bindNewElements,\n getActivePlaylist: getActivePlaylist,\n getPlaybackSpeed: getPlaybackSpeed,\n setPlaybackSpeed: setPlaybackSpeed,\n getRepeat: getRepeat,\n getRepeatPlaylist: getRepeatPlaylist,\n getShuffle: getShuffle,\n getShufflePlaylist: getShufflePlaylist,\n setShuffle: setShuffle,\n setShufflePlaylist: setShufflePlaylist,\n setRepeat: setRepeat,\n setRepeatSong: setRepeatSong,\n setRepeatPlaylist: setRepeatPlaylist,\n getDefaultAlbumArt: getDefaultAlbumArt,\n setDefaultAlbumArt: setDefaultAlbumArt,\n getDefaultPlaylistArt: getDefaultPlaylistArt,\n setDefaultPlaylistArt: setDefaultPlaylistArt,\n getSongPlayedPercentage: getSongPlayedPercentage,\n setSongPlayedPercentage: setSongPlayedPercentage,\n getSongPlayedSeconds: getSongPlayedSeconds,\n getSongDuration: getSongDuration,\n setDebug: setDebug,\n getActiveSongMetadata: getActiveSongMetadata,\n getActivePlaylistMetadata: getActivePlaylistMetadata,\n getSongAtIndex: getSongAtIndex,\n getSongAtPlaylistIndex: getSongAtPlaylistIndex,\n addSong: addSong,\n prependSong: prependSong,\n addSongToPlaylist: addSongToPlaylist,\n removeSong: removeSong,\n removeSongFromPlaylist: removeSongFromPlaylist,\n playNow: playNow,\n playSongAtIndex: playSongAtIndex,\n playPlaylistSongAtIndex: playPlaylistSongAtIndex,\n play: play,\n pause: pause,\n stop: stop,\n getAudio: getAudio,\n getAnalyser: getAnalyser,\n next: next,\n prev: prev,\n getSongs: getSongs,\n getSongsInPlaylist: getSongsInPlaylist,\n getSongsState: getSongsState,\n getSongsStatePlaylist: getSongsStatePlaylist,\n getActiveIndex: getActiveIndex,\n getVersion: getVersion,\n getBuffered: getBuffered,\n skipTo: skipTo,\n setSongMetaData: setSongMetaData,\n setPlaylistMetaData: setPlaylistMetaData,\n setDelay: setDelay,\n getDelay: getDelay,\n getPlayerState: getPlayerState,\n addPlaylist: addPlaylist,\n registerVisualization: registerVisualization,\n setPlaylistVisualization: setPlaylistVisualization,\n setSongVisualization: setSongVisualization,\n setSongInPlaylistVisualization: setSongInPlaylistVisualization,\n setGlobalVisualization: setGlobalVisualization,\n getVolume: getVolume,\n setVolume: setVolume\n };\n}();\n\n/**\n * Playback Speed Elements\n * @module visual/PlaybackSpeedElements\n */\n\n\n/**\n * Play Pause Elements\n * @module visual/PlayPauseElements\n */\n\n\n/**\n * Song Played Progress Elements\n * @module visual/SongPlayedProgressElements\n */\n\n\n/**\n * Visual Repeat Elements\n * @module visual/RepeatElements\n */\n\n\n/****************************************************\n * FX Modules\n ****************************************************/\n/**\n * Imports the visualizations module\n * @module fx/Visualizations\n */\n\n\n/**\n * Repeater Module\n *\n * @module utilities/Repeater\n */\n\n\n/**\n * Imports the config state module.\n * @module ConfigState\n */\n\n\n/****************************************************\n * Core\n ****************************************************/\n/**\n * AmplitudeJS Core Module\n *\n * @module core/Core\n */\n/**\n * @name \t\tAmplitudeJS\n * @author \tDan Pastori (Server Side Up) <hello@serversideup.net>\n */\n/**\n * AmplitudeJS Initializer Module\n *\n * @module init/AmplitudeInitializer\n */\nexports.default = Amplitude;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nvar _debug = __webpack_require__(4);\n\nvar _debug2 = _interopRequireDefault(_debug);\n\nvar _checks = __webpack_require__(5);\n\nvar _checks2 = _interopRequireDefault(_checks);\n\nvar _metaDataElements = __webpack_require__(7);\n\nvar _metaDataElements2 = _interopRequireDefault(_metaDataElements);\n\nvar _soundcloud = __webpack_require__(17);\n\nvar _soundcloud2 = _interopRequireDefault(_soundcloud);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles the initialization of the playlists.\n *\n * @module init/PlaylistsInitializer\n */\n\n\n/**\n * AmplitudeJS Visual Meta Data Elements Module\n * @module visual/MetaDataElements\n */\n\n\n/**\n * AmplitudeJS Debug Module\n * @module utilities/Debug\n */\nvar PlaylistsInitializer = function () {\n /**\n * Initializes the playlists for AmplitudeJS\n *\n * @param {Object} playlists - The playlists defined by the user.\n */\n function initialize(playlists) {\n /*\n Copy the playlists over to Amplitude\n */\n _config2.default.playlists = playlists;\n\n /*\n Copy songs over from songs array.\n */\n copySongsToPlaylists();\n\n /*\n Grab any SoundCloud Data for the playlist songs if needed.\n */\n grabSoundCloudData();\n\n /*\n Initialize a scoped active index for each playlist.\n */\n initializePlaylistActiveIndexes();\n\n /*\n Initialize the shuffle status of the playlists.\n */\n initializePlaylistShuffleStatuses();\n\n /*\n Initialize the repeat status for the playlits.\n */\n initializePlaylistsRepeatStatuses();\n\n /*\n Initialize temporary place holders for shuffle lists.\n */\n initializePlaylistShuffleLists();\n\n /*\n Initializes the first song in the playlist\n */\n initializeFirstSongInPlaylistMetaData();\n }\n\n /**\n * Initializes a scoped active index for each playlist.\n *\n * @access private\n */\n function initializePlaylistActiveIndexes() {\n /*\n Iterate over all of the playlists defined by the user\n and add an active index.\n */\n for (var key in _config2.default.playlists) {\n _config2.default.playlists[key].active_index = null;\n }\n }\n\n /**\n * Ensures the indexes in the playlists are valid indexes. The song has\n * to exist in the Amplitude config to be played correctly. If the index\n * is an integer, we ensure it exists and coy it to the array.\n *\n * @access private\n */\n function copySongsToPlaylists() {\n /*\n Iterate over all of the config's playlists\n */\n for (var key in _config2.default.playlists) {\n /*\n Checks if the playlist key is accurate.\n */\n if (_config2.default.playlists.hasOwnProperty(key)) {\n /*\n Checks if the playlist has songs.\n */\n if (_config2.default.playlists[key].songs) {\n /*\n Iterate over all of the songs in the playlist\n */\n for (var i = 0; i < _config2.default.playlists[key].songs.length; i++) {\n if (_checks2.default.isInt(_config2.default.playlists[key].songs[i])) {\n _config2.default.playlists[key].songs[i] = _config2.default.songs[_config2.default.playlists[key].songs[i]];\n\n _config2.default.playlists[key].songs[i].index = i;\n }\n /*\n Check to see if the index for the song in the playlist\n exists in the songs config.\n */\n if (_checks2.default.isInt(_config2.default.playlists[key].songs[i]) && !_config2.default.songs[_config2.default.playlists[key].songs[i]]) {\n _debug2.default.writeMessage(\"The song index: \" + _config2.default.playlists[key].songs[i] + \" in playlist with key: \" + key + \" is not defined in your songs array!\");\n }\n\n /*\n If not an int, then is a dedicated song, just set the index.\n */\n if (!_checks2.default.isInt(_config2.default.playlists[key].songs[i])) {\n _config2.default.playlists[key].songs[i].index = i;\n }\n }\n }\n }\n }\n }\n\n /**\n * Grabs the SoundCloud data for any song in the playlist that\n * the user needs to grab data for.\n *\n * @access private\n */\n function grabSoundCloudData() {\n /*\n Iterate over all of the config's playlists\n */\n for (var key in _config2.default.playlists) {\n /*\n Checks if the playlist key is accurate.\n */\n if (_config2.default.playlists.hasOwnProperty(key)) {\n /*\n Iterate over all of the songs in the playlist and see if\n they need to grab the SoundCloud data for the song.\n */\n for (var i = 0; i < _config2.default.playlists[key].songs.length; i++) {\n /*\n Only Grab the data if the URL is a SoundCloud URL.\n */\n if (_soundcloud2.default.isSoundCloudURL(_config2.default.playlists[key].songs[i].url)) {\n /*\n Only grab the data if the SoundCloud data has not already been\n grabbed for the audio. This could happen if the user defined the\n song in the songs array and was grabbed before.\n */\n if (_config2.default.playlists[key].songs[i].soundcloud_data == undefined) {\n _soundcloud2.default.resolveIndividualStreamableURL(_config2.default.playlists[key].songs[i].url, key, i);\n }\n }\n }\n }\n }\n }\n\n /**\n * Initializes the shuffle statuses for each of the playlists. These will\n * be referenced when we shuffle individual playlists.\n *\n * @access private\n */\n function initializePlaylistShuffleStatuses() {\n /*\n Iterate over all of the playlists the user defined adding\n the playlist key to the shuffled playlist array and creating\n and empty object to house the statuses.\n */\n for (var key in _config2.default.playlists) {\n _config2.default.playlists[key].shuffle = false;\n }\n }\n\n /**\n * Initializes the repeat statuses for each of the playlists. These will\n * be referenced when we repeat individual playlits.\n *\n * @access private\n */\n function initializePlaylistsRepeatStatuses() {\n /*\n Iterate over all of the playlists the user defined adding\n the playlist key to the repeated playlist array and creating\n and empty object to house the statuses.\n */\n for (var key in _config2.default.playlists) {\n _config2.default.playlists[key].repeat = false;\n }\n }\n\n /**\n * Initializes the shuffled playlist placeholders. These will be set for\n * playlists that are shuffled and contain the shuffled songs.\n *\n * @access private\n */\n function initializePlaylistShuffleLists() {\n /*\n Iterate over all of the playlists the user defined adding\n the playlist key to the shuffled playlists array and creating\n and empty object to house the shuffled playlists\n */\n for (var key in _config2.default.playlists) {\n _config2.default.playlists[key].shuffle_list = [];\n }\n }\n\n /**\n * Intializes the display for the first song in the playlist meta data.\n *\n * @access private\n */\n function initializeFirstSongInPlaylistMetaData() {\n /*\n Iterates over all of the playlists setting the meta data for the\n first song.\n */\n for (var key in _config2.default.playlists) {\n _metaDataElements2.default.setFirstSongInPlaylist(_config2.default.playlists[key].songs[0], key);\n }\n }\n\n /*\n Returns the public facing methods\n */\n return {\n initialize: initialize\n };\n}();\n\n/**\n * AmplitudeJS SoundCloud Meta module\n * @module soundcloud/Soundcloud\n */\n\n\n/**\n * AmplitudeJS Checks Utility.\n * @module utilities/Checks\n */\n/**\n * Imports the config module\n * @module config\n */\nexports.default = PlaylistsInitializer;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the container elements.\n *\n * @param visual/ContainerElements\n */\nvar ContainerElements = function () {\n /**\n * Applies the class 'amplitude-active-song-container' to the element\n * containing visual information regarding the active song.\n *\n * @prop {boolean} direct - Determines if it was a direct click on the song. We\n * then don't care if shuffle is on or not.\n *\n * @access public\n */\n function setActive(direct) {\n /*\n Gets all of the song container elements.\n */\n var songContainers = document.getElementsByClassName(\"amplitude-song-container\");\n\n /*\n Removes all of the active song containrs.\n */\n for (var i = 0; i < songContainers.length; i++) {\n songContainers[i].classList.remove(\"amplitude-active-song-container\");\n }\n\n /*\n Finds the active index and adds the active song container to the element\n that represents the song at the index.\n */\n if (_config2.default.active_playlist == \"\" || _config2.default.active_playlist == null) {\n var activeIndex = \"\";\n\n /*\n If we click directly on the song element, we ignore\n whether it's in shuffle or not.\n */\n if (direct) {\n activeIndex = _config2.default.active_index;\n } else {\n if (_config2.default.shuffle_on) {\n activeIndex = _config2.default.shuffle_list[_config2.default.active_index].index;\n } else {\n activeIndex = _config2.default.active_index;\n }\n }\n\n if (document.querySelectorAll('.amplitude-song-container[data-amplitude-song-index=\"' + activeIndex + '\"]')) {\n var _songContainers = document.querySelectorAll('.amplitude-song-container[data-amplitude-song-index=\"' + activeIndex + '\"]');\n\n for (var _i = 0; _i < _songContainers.length; _i++) {\n if (!_songContainers[_i].hasAttribute(\"data-amplitude-playlist\")) {\n _songContainers[_i].classList.add(\"amplitude-active-song-container\");\n }\n }\n }\n } else {\n /*\n If we have an active playlist or the action took place directly on the\n song element, we ignore the shuffle.\n */\n if (_config2.default.active_playlist != null && _config2.default.active_playlist != \"\" || direct) {\n var activePlaylistIndex = _config2.default.playlists[_config2.default.active_playlist].active_index;\n } else {\n var activePlaylistIndex = \"\";\n\n if (_config2.default.playlists[_config2.default.active_playlist].shuffle) {\n activePlaylistIndex = _config2.default.playlists[_config2.default.active_playlist].shuffle_list[_config2.default.playlists[_config2.default.active_playlist].active_index].index;\n } else {\n activePlaylistIndex = _config2.default.playlists[_config2.default.active_playlist].active_index;\n }\n }\n\n if (document.querySelectorAll('.amplitude-song-container[data-amplitude-song-index=\"' + activePlaylistIndex + '\"][data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]')) {\n var _songContainers2 = document.querySelectorAll('.amplitude-song-container[data-amplitude-song-index=\"' + activePlaylistIndex + '\"][data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var _i2 = 0; _i2 < _songContainers2.length; _i2++) {\n _songContainers2[_i2].classList.add(\"amplitude-active-song-container\");\n }\n }\n }\n }\n\n return {\n setActive: setActive\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = ContainerElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the current time hour elements.\n *\n * @module visual/time/CurrentHourElements\n */\nvar CurrentHourElements = function () {\n function sync(hours) {\n syncGlobal(hours);\n syncPlaylist(hours);\n syncSong(hours);\n syncSongInPlaylist(hours);\n }\n\n /**\n * Updates any elements that display the current hour for the song.\n *\n * @access public\n * @param {number} hours \t- An integer conaining how many hours into the song.\n */\n function syncGlobal(hours) {\n /*\n Get all of the hour selectors\n */\n var currentHourSelectors = document.querySelectorAll(\".amplitude-current-hours\");\n\n /*\n Set the current hour selector's inner html to hours passed in.\n */\n for (var i = 0; i < currentHourSelectors.length; i++) {\n var playlist = currentHourSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = currentHourSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Updates the current hour selector for a global display.\n */\n if (playlist == null && songIndex == null) {\n currentHourSelectors[i].innerHTML = hours;\n }\n }\n }\n\n /**\n * Syncs the playlist current hour elements.\n *\n * @param {Integer} hour - The current audio hour.\n */\n function syncPlaylist(hours) {\n /*\n Get all of the hour selectors\n */\n var currentHourPlaylistSelectors = document.querySelectorAll('.amplitude-current-hours[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Set the current hour selector's inner html to hours passed in.\n */\n for (var i = 0; i < currentHourPlaylistSelectors.length; i++) {\n var songIndex = currentHourPlaylistSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Updates the current hour selector for a global display.\n */\n if (songIndex == null) {\n currentHourPlaylistSelectors[i].innerHTML = hours;\n }\n }\n }\n\n /**\n * Syncs the song hour elements.\n *\n * @param {Integer} hour - The current audio hour.\n */\n function syncSong(hours) {\n if (_config2.default.active_playlist == null) {\n /*\n Get all of the hour selectors\n */\n var currentHourSongSelectors = document.querySelectorAll('.amplitude-current-hours[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n /*\n Set the current hour selector's inner html to hours passed in.\n */\n for (var i = 0; i < currentHourSongSelectors.length; i++) {\n var playlist = currentHourSongSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n /*\n Updates the current hour selector for a global display.\n */\n if (playlist == null) {\n currentHourSongSelectors[i].innerHTML = hours;\n }\n }\n }\n }\n\n /**\n * Syncs the song in playlist song hour elements.\n *\n * @param {Integer} hour - The current audio hour.\n */\n function syncSongInPlaylist(hours) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n /*\n Get all of the hour selectors\n */\n var currentHourPlaylistSongSelectors = document.querySelectorAll('.amplitude-current-hours[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n /*\n Set the current hour selector's inner html to hours passed in.\n */\n for (var i = 0; i < currentHourPlaylistSongSelectors.length; i++) {\n currentHourPlaylistSongSelectors[i].innerHTML = hours;\n }\n }\n\n /**\n * Reset the current hour elements.\n */\n function resetTimes() {\n /*\n Gets the hour display elements\n */\n var hourSelectors = document.querySelectorAll(\".amplitude-current-hours\");\n\n /*\n Iterates over all of the hour selectors and sets the inner HTML\n to 00.\n */\n for (var i = 0; i < hourSelectors.length; i++) {\n hourSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = CurrentHourElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the current time minutes elements.\n *\n * @module visual/time/CurrentMinuteElements\n */\nvar CurrentMinuteElements = function () {\n /**\n * Syncs the current minutes elements.\n *\n * @param {Integer} minutes - The current audio minutes.\n */\n function sync(minutes) {\n syncGlobal(minutes);\n syncPlaylist(minutes);\n syncSong(minutes);\n syncSongInPlaylist(minutes);\n }\n\n /**\n * Syncs the global current minutes elements.\n *\n * @param {Integer} minutes - The current audio minutes.\n */\n function syncGlobal(minutes) {\n /*\n Get all of the minute selectors\n */\n var currentMinuteSelectors = document.querySelectorAll(\".amplitude-current-minutes\");\n\n /*\n Set the current minute selector's inner html to minutes passed in.\n */\n for (var i = 0; i < currentMinuteSelectors.length; i++) {\n var playlist = currentMinuteSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = currentMinuteSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Updates the current minute selector for a global display.\n */\n if (playlist == null && songIndex == null) {\n currentMinuteSelectors[i].innerHTML = minutes;\n }\n }\n }\n\n /**\n * Syncs the playlist minutes elements.\n *\n * @param {Integer} minutes - The current audio minutes.\n */\n function syncPlaylist(minutes) {\n /*\n Get all of the minute selectors\n */\n var currentMinutePlaylistSelectors = document.querySelectorAll('.amplitude-current-minutes[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Set the current minute selector's inner html to minutes passed in.\n */\n for (var i = 0; i < currentMinutePlaylistSelectors.length; i++) {\n var songIndex = currentMinutePlaylistSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Updates the current minute selector for a global display.\n */\n if (songIndex == null) {\n currentMinutePlaylistSelectors[i].innerHTML = minutes;\n }\n }\n }\n\n /**\n * Syncs the current song minutes elements.\n *\n * @param {Integer} minutes - The current audio minutes.\n */\n function syncSong(minutes) {\n if (_config2.default.active_playlist == null) {\n /*\n Get all of the minute selectors\n */\n var currentMinuteSongSelectors = document.querySelectorAll('.amplitude-current-minutes[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n /*\n Set the current minute selector's inner html to minutes passed in.\n */\n for (var i = 0; i < currentMinuteSongSelectors.length; i++) {\n var playlist = currentMinuteSongSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n /*\n Updates the current minute selector for a global display.\n */\n if (playlist == null) {\n currentMinuteSongSelectors[i].innerHTML = minutes;\n }\n }\n }\n }\n\n /**\n * Syncs the current song in playlist minutes elements.\n *\n * @param {Integer} minutes - The current audio minutes.\n */\n function syncSongInPlaylist(minutes) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n /*\n Get all of the minute selectors\n */\n var currentMinutePlaylistSongSelectors = document.querySelectorAll('.amplitude-current-minutes[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n /*\n Set the current minute selector's inner html to minutes passed in.\n */\n for (var i = 0; i < currentMinutePlaylistSongSelectors.length; i++) {\n currentMinutePlaylistSongSelectors[i].innerHTML = minutes;\n }\n }\n\n /**\n * Reset the current times.\n */\n function resetTimes() {\n /*\n Gets the minute display elements\n */\n var minuteSelectors = document.querySelectorAll(\".amplitude-current-minutes\");\n\n /*\n Iterates over all of the minute selectors and sets the inner HTML\n to 00.\n */\n for (var i = 0; i < minuteSelectors.length; i++) {\n minuteSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = CurrentMinuteElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the current time seconds elements.\n *\n * @module visual/time/CurrentSecondElements\n */\nvar CurrentSecondElements = function () {\n /**\n * Syncs the current seconds elements.\n *\n * @param {Integer} seconds - The current audio seconds.\n */\n function sync(seconds) {\n syncGlobal(seconds);\n syncPlaylist(seconds);\n syncSong(seconds);\n syncSongInPlaylist(seconds);\n }\n\n /**\n * Syncs the global current seconds elements.\n *\n * @param {Integer} seconds - The current audio seconds.\n */\n function syncGlobal(seconds) {\n /*\n Get all of the second selectors\n */\n var currentSecondSelectors = document.querySelectorAll(\".amplitude-current-seconds\");\n\n /*\n Set the current second selector's inner html to seconds passed in.\n */\n for (var i = 0; i < currentSecondSelectors.length; i++) {\n var playlist = currentSecondSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = currentSecondSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Updates the current second selector for a global display.\n */\n if (playlist == null && songIndex == null) {\n currentSecondSelectors[i].innerHTML = seconds;\n }\n }\n }\n\n /**\n * Syncs the playlist seconds elements.\n *\n * @param {Integer} seconds - The current audio seconds.\n */\n function syncPlaylist(seconds) {\n /*\n Get all of the second selectors\n */\n var currentSecondPlaylistSelectors = document.querySelectorAll('.amplitude-current-seconds[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Set the current second selector's inner html to seconds passed in.\n */\n for (var i = 0; i < currentSecondPlaylistSelectors.length; i++) {\n var songIndex = currentSecondPlaylistSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n /*\n Updates the current second selector for a global display.\n */\n if (songIndex == null) {\n currentSecondPlaylistSelectors[i].innerHTML = seconds;\n }\n }\n }\n\n /**\n * Syncs the current song seconds elements.\n *\n * @param {Integer} seconds - The current audio seconds.\n */\n function syncSong(seconds) {\n if (_config2.default.active_playlist == null) {\n /*\n Get all of the second selectors\n */\n var currentSecondSongSelectors = document.querySelectorAll('.amplitude-current-seconds[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n /*\n Set the current second selector's inner html to seconds passed in.\n */\n for (var i = 0; i < currentSecondSongSelectors.length; i++) {\n var playlist = currentSecondSongSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n /*\n Updates the current second selector for a global display.\n */\n if (playlist == null) {\n currentSecondSongSelectors[i].innerHTML = seconds;\n }\n }\n }\n }\n\n /**\n * Syncs the current song in playlist seconds elements.\n *\n * @param {Integer} seconds - The current audio seconds.\n */\n function syncSongInPlaylist(seconds) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n /*\n Get all of the second selectors\n */\n var currentSecondPlaylistSongSelectors = document.querySelectorAll('.amplitude-current-seconds[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n /*\n Set the current second selector's inner html to seconds passed in.\n */\n for (var i = 0; i < currentSecondPlaylistSongSelectors.length; i++) {\n currentSecondPlaylistSongSelectors[i].innerHTML = seconds;\n }\n }\n\n /**\n * Reset the current seconds elements.\n */\n function resetTimes() {\n /*\n Gets the second display elements\n */\n var secondSelectors = document.querySelectorAll(\".amplitude-current-seconds\");\n\n /*\n Iterates over all of the second selectors and sets the inner HTML\n to 00.\n */\n for (var i = 0; i < secondSelectors.length; i++) {\n secondSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = CurrentSecondElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * These methods help sync visual time elements.\n *\n * @module visual/CurrentTimeElements\n */\nvar CurrentTimeElements = function () {\n /**\n * Visually displays the current time on the screen. This is called on\n * time update for the current song.\n *\n * @access public\n * @param {object} currentTime \t\t\t\t\t- An object containing the current time for the song in seconds, minutes, and hours.\n */\n function sync(currentTime) {\n /*\n Set current time display.\n */\n syncGlobal(currentTime);\n syncPlaylist(currentTime);\n syncSong(currentTime);\n syncSongInPlaylist(currentTime);\n }\n\n /**\n * Updates any elements that display the current time for the song. This\n * is a computed field that will be commonly used.\n *\n * @access public\n * @param {object} time \t- A json object conaining the parts for the current time for the song.\n */\n function syncGlobal(time) {\n /*\n Get all of the time selectors.\n */\n var currentTimeSelectors = document.querySelectorAll(\".amplitude-current-time\");\n\n /*\n Set the time selector's inner html to the current time for the song. The current\n time is computed by joining minutes and seconds.\n */\n var timeText = time.minutes + \":\" + time.seconds;\n\n if (time.hours > 0) {\n timeText = time.hours + \":\" + timeText;\n }\n\n for (var i = 0; i < currentTimeSelectors.length; i++) {\n var playlist = currentTimeSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = currentTimeSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n currentTimeSelectors[i].innerHTML = timeText;\n }\n }\n }\n\n /**\n * Updates any elements that display the current time for the song. This\n * is a computed field that will be commonly used.\n *\n * @access public\n * @param {object} time \t- A json object conaining the parts for the current time for the song.\n */\n function syncPlaylist(time) {\n /*\n Get all of the time selectors.\n */\n var currentTimeSelectors = document.querySelectorAll('.amplitude-current-time[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n /*\n Set the time selector's inner html to the current time for the song. The current\n time is computed by joining minutes and seconds.\n */\n var timeText = time.minutes + \":\" + time.seconds;\n\n if (time.hours > 0) {\n timeText = time.hours + \":\" + timeText;\n }\n\n for (var i = 0; i < currentTimeSelectors.length; i++) {\n var songIndex = currentTimeSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (songIndex == null) {\n currentTimeSelectors[i].innerHTML = timeText;\n }\n }\n }\n\n /**\n * Updates any elements that display the current time for the song. This\n * is a computed field that will be commonly used.\n *\n * @access public\n * @param {object} time \t- A json object conaining the parts for the current time for the song.\n */\n function syncSong(time) {\n if (_config2.default.active_playlist == null) {\n /*\n Get all of the time selectors.\n */\n var currentTimeSelectors = document.querySelectorAll('.amplitude-current-time[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n /*\n Set the time selector's inner html to the current time for the song. The current\n time is computed by joining minutes and seconds.\n */\n var timeText = time.minutes + \":\" + time.seconds;\n\n if (time.hours > 0) {\n timeText = time.hours + \":\" + timeText;\n }\n\n for (var i = 0; i < currentTimeSelectors.length; i++) {\n var playlist = currentTimeSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null) {\n currentTimeSelectors[i].innerHTML = timeText;\n }\n }\n }\n }\n\n /**\n * Updates any elements that display the current time for the song. This\n * is a computed field that will be commonly used.\n *\n * @access public\n * @param {object} time \t- A json object conaining the parts for the current time for the song.\n */\n function syncSongInPlaylist(time) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n /*\n Get all of the time selectors.\n */\n var currentTimeSelectors = document.querySelectorAll('.amplitude-current-time[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n /*\n Set the time selector's inner html to the current time for the song. The current\n time is computed by joining minutes and seconds.\n */\n var timeText = time.minutes + \":\" + time.seconds;\n\n if (time.hours > 0) {\n timeText = time.hours + \":\" + timeText;\n }\n\n for (var i = 0; i < currentTimeSelectors.length; i++) {\n currentTimeSelectors[i].innerHTML = timeText;\n }\n }\n\n /**\n * Resets the current time displays to 00:00\n *\n * @access public\n */\n function resetTimes() {\n /*\n Gets the time selector display elements\n */\n var timeSelectors = document.querySelectorAll(\".amplitude-current-time\");\n\n /*\n Iterates over all of the time selectors and sets the inner HTML\n to 00.\n */\n for (var i = 0; i < timeSelectors.length; i++) {\n timeSelectors[i].innerHTML = \"00:00\";\n }\n }\n\n /**\n * Returns the publically facing methods\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = CurrentTimeElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the duration countdown elements.\n *\n * @module visual/time/DurationCountDownTimeElements.\n */\nvar DurationCountDownTimeElements = function () {\n /**\n * Syncs all of the countdown time elements.\n *\n * @param {object} countDownTime - The current time of the audio.\n * @param {object} songDuration - The song duration of the audio.\n */\n function sync(countDownTime, songDuration) {\n var timeRemaining = computeTimeRemaining(countDownTime, songDuration);\n\n syncGlobal(timeRemaining);\n syncPlaylist(timeRemaining);\n syncSong(timeRemaining);\n syncSongInPlaylist(timeRemaining);\n }\n\n /**\n * Syncs the global count down time elements.\n *\n * @param {string} timeRemaining - The time remaining for the audio.\n */\n function syncGlobal(timeRemaining) {\n var durationTimeRemainingSelectors = document.querySelectorAll(\".amplitude-time-remaining\");\n\n for (var i = 0; i < durationTimeRemainingSelectors.length; i++) {\n var playlist = durationTimeRemainingSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = durationTimeRemainingSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n durationTimeRemainingSelectors[i].innerHTML = timeRemaining;\n }\n }\n }\n\n /**\n * Syncs the playlist count down time elements.\n *\n * @param {string} timeRemaining - The time remaining for the audio.\n */\n function syncPlaylist(timeRemaining) {\n var durationTimeRemainingSelectors = document.querySelectorAll('.amplitude-time-remaining[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var i = 0; i < durationTimeRemainingSelectors.length; i++) {\n var songIndex = durationTimeRemainingSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (songIndex == null) {\n durationTimeRemainingSelectors[i].innerHTML = timeRemaining;\n }\n }\n }\n\n /**\n * Syncs the song count down time elements.\n *\n * @param {string} timeRemaining - The time remaining for the audio.\n */\n function syncSong(timeRemaining) {\n if (_config2.default.active_playlist == null) {\n var durationTimeRemainingSelectors = document.querySelectorAll('.amplitude-time-remaining[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n for (var i = 0; i < durationTimeRemainingSelectors.length; i++) {\n var playlist = durationTimeRemainingSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null) {\n durationTimeRemainingSelectors[i].innerHTML = timeRemaining;\n }\n }\n }\n }\n\n /**\n * Syncs the song in playlist count down time elements.\n *\n * @param {string} timeRemaining - The time remaining for the audio.\n */\n function syncSongInPlaylist(timeRemaining) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n var durationTimeRemainingSelectors = document.querySelectorAll('.amplitude-time-remaining[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n for (var i = 0; i < durationTimeRemainingSelectors.length; i++) {\n durationTimeRemainingSelectors[i].innerHTML = timeRemaining;\n }\n }\n\n /**\n * Resets the count down times.\n */\n function resetTimes() {\n var durationTimeRemainingSelectors = document.querySelectorAll(\".amplitude-time-remaining\");\n\n for (var i = 0; i < durationTimeRemainingSelectors.length; i++) {\n durationTimeRemainingSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Computes the time remaining for the audio.\n *\n * @param {object} currentTime - The current time of the audio.\n * @param {object} songDuration - The duration of the audio.\n */\n function computeTimeRemaining(currentTime, songDuration) {\n var timeRemaining = \"00:00\";\n\n /*\n Initialize the total current seconds and total duration seconds\n */\n var totalCurrentSeconds = parseInt(currentTime.seconds) + parseInt(currentTime.minutes) * 60 + parseInt(currentTime.hours) * 60 * 60;\n var totalDurationSeconds = parseInt(songDuration.seconds) + parseInt(songDuration.minutes) * 60 + parseInt(songDuration.hours) * 60 * 60;\n\n /*\n If the two variables are numbers we continue the computing.\n */\n if (!isNaN(totalCurrentSeconds) && !isNaN(totalDurationSeconds)) {\n /*\n Find the total remaining seconds.\n */\n var timeRemainingTotalSeconds = totalDurationSeconds - totalCurrentSeconds;\n\n var remainingHours = Math.floor(timeRemainingTotalSeconds / 3600);\n var remainingMinutes = Math.floor((timeRemainingTotalSeconds - remainingHours * 3600) / 60);\n var remainingSeconds = timeRemainingTotalSeconds - remainingHours * 3600 - remainingMinutes * 60;\n\n timeRemaining = (remainingMinutes < 10 ? \"0\" + remainingMinutes : remainingMinutes) + \":\" + (remainingSeconds < 10 ? \"0\" + remainingSeconds : remainingSeconds);\n\n if (remainingHours > 0) {\n timeRemaining = remainingHours + \":\" + timeRemaining;\n }\n }\n\n return timeRemaining;\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = DurationCountDownTimeElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the duration hours elements.\n *\n * @module visual/time/DurationHourElements.\n */\nvar DurationHourElements = function () {\n /**\n * Sync the duration hours elements.\n *\n * @param {Integer} hours - The duration hours for the audio.\n */\n function sync(hours) {\n syncGlobal(hours);\n syncPlaylist(hours);\n syncSong(hours);\n syncSongInPlaylist(hours);\n }\n\n /**\n * Syncs the global duration hours elements.\n *\n * @param {Integer} hours - the duration hours for the audio.\n */\n function syncGlobal(hours) {\n var durationHourSelectors = document.querySelectorAll(\".amplitude-duration-hours\");\n\n for (var i = 0; i < durationHourSelectors.length; i++) {\n var playlist = durationHourSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = durationHourSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n durationHourSelectors[i].innerHTML = hours;\n }\n }\n }\n\n /**\n * Syncs the playlist duration hours for the audio.\n *\n * @param {Integer} hours - The duration hours for the audio.\n */\n function syncPlaylist(hours) {\n var durationHourSelectors = document.querySelectorAll('.amplitude-duration-hours[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var i = 0; i < durationHourSelectors.length; i++) {\n var songIndex = durationHourSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (songIndex == null) {\n durationHourSelectors[i].innerHTML = hours;\n }\n }\n }\n\n /**\n * Syncs the song duration hours.\n *\n * @param {Integer} hours - The duration hours for the audio.\n */\n function syncSong(hours) {\n if (_config2.default.active_playlist == null) {\n var durationHourSelectors = document.querySelectorAll('.amplitude-duration-hours[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n for (var i = 0; i < durationHourSelectors.length; i++) {\n var playlist = durationHourSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null) {\n durationHourSelectors[i].innerHTML = hours;\n }\n }\n }\n }\n\n /**\n * Syncs the song in playlist duration hours.\n *\n * @param {Integer} hours - The duration hours of the audio.\n */\n function syncSongInPlaylist(hours) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n var durationHourSelectors = document.querySelectorAll('.amplitude-duration-hours[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n for (var i = 0; i < durationHourSelectors.length; i++) {\n durationHourSelectors[i].innerHTML = hours;\n }\n }\n\n /**\n * Resets the duration shours elements to '00'\n */\n function resetTimes() {\n var durationHourSelectors = document.querySelectorAll(\".amplitude-duration-hours\");\n\n for (var i = 0; i < durationHourSelectors.length; i++) {\n durationHourSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = DurationHourElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the duration minutes elements.\n *\n * @module visual/time/DurationMinuteElements.\n */\nvar DurationMinuteElements = function () {\n /**\n * Sync the duration minutes elements.\n *\n * @param {Integer} minutes - The duration minutes for the audio.\n */\n function sync(minutes) {\n syncGlobal(minutes);\n syncPlaylist(minutes);\n syncSong(minutes);\n syncSongInPlaylist(minutes);\n }\n\n /**\n * Syncs the global duration minutes elements.\n *\n * @param {Integer} minutes - the duration minutes for the audio.\n */\n function syncGlobal(minutes) {\n var durationMinuteSelectors = document.querySelectorAll(\".amplitude-duration-minutes\");\n\n for (var i = 0; i < durationMinuteSelectors.length; i++) {\n var playlist = durationMinuteSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = durationMinuteSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n durationMinuteSelectors[i].innerHTML = minutes;\n }\n }\n }\n\n /**\n * Syncs the playlist duration minutes for the audio.\n *\n * @param {Integer} minutes - The duration minutes for the audio.\n */\n function syncPlaylist(minutes) {\n var durationMinuteSelectors = document.querySelectorAll('.amplitude-duration-minutes[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var i = 0; i < durationMinuteSelectors.length; i++) {\n var songIndex = durationMinuteSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (songIndex == null) {\n durationMinuteSelectors[i].innerHTML = minutes;\n }\n }\n }\n\n /**\n * Syncs the song duration minutes.\n *\n * @param {Integer} minutes - The duration minutes for the audio.\n */\n function syncSong(minutes) {\n if (_config2.default.active_playlist == null) {\n var durationMinuteSelectors = document.querySelectorAll('.amplitude-duration-minutes[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n for (var i = 0; i < durationMinuteSelectors.length; i++) {\n var playlist = durationMinuteSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null) {\n durationMinuteSelectors[i].innerHTML = minutes;\n }\n }\n }\n }\n\n /**\n * Syncs the song in playlist duration minutes.\n *\n * @param {Integer} minutes - The duration minutes of the audio.\n */\n function syncSongInPlaylist(minutes) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n var durationMinuteSelectors = document.querySelectorAll('.amplitude-duration-minutes[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n for (var i = 0; i < durationMinuteSelectors.length; i++) {\n durationMinuteSelectors[i].innerHTML = minutes;\n }\n }\n\n /**\n * Resets the duration minutes elements to '00'\n */\n function resetTimes() {\n var durationMinuteSelectors = document.querySelectorAll(\".amplitude-duration-minutes\");\n\n for (var i = 0; i < durationMinuteSelectors.length; i++) {\n durationMinuteSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = DurationMinuteElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the duration seconds elements.\n *\n * @module visual/time/DurationSecondElements.\n */\nvar DurationSecondElements = function () {\n /**\n * Sync the duration seconds elements.\n *\n * @param {Integer} seconds - The duration seconds for the audio.\n */\n function sync(seconds) {\n syncGlobal(seconds);\n syncPlaylist(seconds);\n syncSong(seconds);\n syncSongInPlaylist(seconds);\n }\n\n /**\n * Syncs the global duration seconds elements.\n *\n * @param {Integer} seconds - the duration seconds for the audio.\n */\n function syncGlobal(seconds) {\n var durationSecondSelectors = document.querySelectorAll(\".amplitude-duration-seconds\");\n\n for (var i = 0; i < durationSecondSelectors.length; i++) {\n var playlist = durationSecondSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = durationSecondSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n durationSecondSelectors[i].innerHTML = seconds;\n }\n }\n }\n\n /**\n * Syncs the playlist duration seconds for the audio.\n *\n * @param {Integer} seconds - The duration seconds for the audio.\n */\n function syncPlaylist(seconds) {\n var durationSecondSelectors = document.querySelectorAll('.amplitude-duration-seconds[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var i = 0; i < durationSecondSelectors.length; i++) {\n var songIndex = durationSecondSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (songIndex == null) {\n durationSecondSelectors[i].innerHTML = seconds;\n }\n }\n }\n\n /**\n * Syncs the song duration seconds.\n *\n * @param {Integer} seconds - The duration seconds for the audio.\n */\n function syncSong(seconds) {\n if (_config2.default.active_playlist == null) {\n var durationSecondSelectors = document.querySelectorAll('.amplitude-duration-seconds[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n for (var i = 0; i < durationSecondSelectors.length; i++) {\n var playlist = durationSecondSelectors[i].getAttribute(\"data--amplitude-playlist\");\n\n if (playlist == null) {\n durationSecondSelectors[i].innerHTML = seconds;\n }\n }\n }\n }\n\n /**\n * Syncs the song in playlist duration seconds.\n *\n * @param {Integer} seconds - The duration seconds of the audio.\n */\n function syncSongInPlaylist(seconds) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n var durationSecondSelectors = document.querySelectorAll('.amplitude-duration-seconds[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n for (var i = 0; i < durationSecondSelectors.length; i++) {\n durationSecondSelectors[i].innerHTML = seconds;\n }\n }\n\n /**\n * Resets the duration seconds elements to '00'\n */\n function resetTimes() {\n var durationSecondSelectors = document.querySelectorAll(\".amplitude-duration-seconds\");\n\n for (var i = 0; i < durationSecondSelectors.length; i++) {\n durationSecondSelectors[i].innerHTML = \"00\";\n }\n }\n\n /**\n * Returns the publically facing methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = DurationSecondElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _config = __webpack_require__(0);\n\nvar _config2 = _interopRequireDefault(_config);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handles all of the duration time elements.\n *\n * @module visual/time/DurationTimeElements.\n */\nvar DurationTimeElements = function () {\n /**\n * Syncs the duration time for all elements.\n *\n * @param {Object} durationTime - The object containing all of the song duration times.\n */\n function sync(durationTime) {\n var durationText = computeDurationText(durationTime);\n\n syncGlobal(durationText);\n syncPlaylist(durationText);\n syncSong(durationText);\n syncSongInPlaylist(durationText);\n }\n\n /**\n * Sync the global song duration elements.\n *\n * @param {Object} durationText - The text for the song duration.\n */\n function syncGlobal(durationText) {\n var durationTimeSelectors = document.querySelectorAll(\".amplitude-duration-time\");\n\n for (var i = 0; i < durationTimeSelectors.length; i++) {\n var playlist = durationTimeSelectors[i].getAttribute(\"data-amplitude-playlist\");\n var songIndex = durationTimeSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (playlist == null && songIndex == null) {\n durationTimeSelectors[i].innerHTML = durationText;\n }\n }\n }\n\n /**\n * Sync the playlist duration times.\n *\n * @param {Object} durationText - The text for the song duration.\n */\n function syncPlaylist(durationText) {\n var durationTimeSelectors = document.querySelectorAll('.amplitude-duration-time[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"]');\n\n for (var i = 0; i < durationTimeSelectors.length; i++) {\n var songIndex = durationTimeSelectors[i].getAttribute(\"data-amplitude-song-index\");\n\n if (songIndex == null) {\n durationTimeSelectors[i].innerHTML = durationText;\n }\n }\n }\n\n /**\n * Sync the song duration times.\n *\n * @param {Object} durationText - The text for the song duration.\n */\n function syncSong(durationText) {\n if (_config2.default.active_playlist == null) {\n var durationTimeSelectors = document.querySelectorAll('.amplitude-duration-time[data-amplitude-song-index=\"' + _config2.default.active_index + '\"]');\n\n for (var i = 0; i < durationTimeSelectors.length; i++) {\n var playlist = durationTimeSelectors[i].getAttribute(\"data-amplitude-playlist\");\n\n if (playlist == null) {\n durationTimeSelectors[i].innerHTML = durationText;\n }\n }\n }\n }\n\n /**\n * Sync the song in playlist duration times.\n *\n * @param {Object} durationText - An object containing the duration text.\n */\n function syncSongInPlaylist(durationText) {\n var activePlaylistIndex = _config2.default.active_playlist != \"\" && _config2.default.active_playlist != null ? _config2.default.playlists[_config2.default.active_playlist].active_index : null;\n\n var durationTimeSelectors = document.querySelectorAll('.amplitude-duration-time[data-amplitude-playlist=\"' + _config2.default.active_playlist + '\"][data-amplitude-song-index=\"' + activePlaylistIndex + '\"]');\n\n for (var i = 0; i < durationTimeSelectors.length; i++) {\n durationTimeSelectors[i].innerHTML = durationText;\n }\n }\n\n /**\n * Resets all of the duration times to empty.\n */\n function resetTimes() {\n var durationTimeSelectors = document.querySelectorAll(\".amplitude-duration-time\");\n\n for (var i = 0; i < durationTimeSelectors.length; i++) {\n durationTimeSelectors[i].innerHTML = \"00:00\";\n }\n }\n\n /**\n * Computes the duration text\n *\n * @param {Object} durationTime - An object containint the duration times.\n */\n function computeDurationText(durationTime) {\n var durationText = \"00:00\";\n\n if (!isNaN(durationTime.minutes) && !isNaN(durationTime.seconds)) {\n durationText = durationTime.minutes + \":\" + durationTime.seconds;\n if (!isNaN(durationTime.hours) && durationTime.hours > 0) {\n durationText = durationTime.hours + \":\" + durationText;\n }\n }\n\n return durationText;\n }\n\n /**\n * Return publically accessible methods.\n */\n return {\n sync: sync,\n resetTimes: resetTimes\n };\n}(); /**\n * Imports the config module\n * @module config\n */\nexports.default = DurationTimeElements;\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\"name\":\"amplitudejs\",\"version\":\"5.3.2\",\"description\":\"A JavaScript library that allows you to control the design of your media controls in your webpage -- not the browser. No dependencies (jQuery not required) https://521dimensions.com/open-source/amplitudejs\",\"main\":\"dist/amplitude.js\",\"devDependencies\":{\"babel-core\":\"^6.26.3\",\"babel-loader\":\"^7.1.5\",\"babel-plugin-add-module-exports\":\"0.2.1\",\"babel-polyfill\":\"^6.26.0\",\"babel-preset-es2015\":\"^6.18.0\",\"husky\":\"^1.3.1\",\"jest\":\"^23.6.0\",\"prettier\":\"1.15.1\",\"pretty-quick\":\"^1.11.1\",\"watch\":\"^1.0.2\",\"webpack\":\"^2.7.0\"},\"directories\":{\"doc\":\"docs\"},\"files\":[\"dist\"],\"funding\":{\"type\":\"opencollective\",\"url\":\"https://opencollective.com/amplitudejs\"},\"scripts\":{\"build\":\"node_modules/.bin/webpack\",\"prettier\":\"npx pretty-quick\",\"preversion\":\"npx pretty-quick && npm run test\",\"postversion\":\"git push && git push --tags\",\"test\":\"jest\",\"version\":\"npm run build && git add -A dist\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/521dimensions/amplitudejs.git\"},\"keywords\":[\"webaudio\",\"html5\",\"javascript\",\"audio-player\"],\"author\":\"521 Dimensions (https://521dimensions.com)\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/521dimensions/amplitudejs/issues\"},\"homepage\":\"https://github.com/521dimensions/amplitudejs#readme\"}\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=amplitude.js.map\nAmplitude.init({\n\t\"volume\": 100,\n\t\"songs\": [\n\t\t{\n\t\t\t\"name\": \"Scenes from Childhood, Op. 15 No. 1\",\n\t\t\t\"artist\": \"Robert Schumann\",\n\t\t\t\"album\": \"\",\n\t\t\t\"url\": \"/audio/piano/schumman.mp3\",\n\t\t\t\"cover_art_url\": \"/img/schumann.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Mazurka in A minor, Op. 17 No. 4\",\n\t\t\t\"artist\": \"Frédéric Chopin\",\n\t\t\t\"album\": \"\",\n\t\t\t\"url\": \"/audio/piano/mazurka_am.mp3\",\n\t\t\t\"cover_art_url\": \"/img/chopin.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Doctor Gradus as Parnuassum\",\n\t\t\t\"artist\": \"Claude Debussy\",\n\t\t\t\"album\": \"Children's Corner Suite, L 113\",\n\t\t\t\"url\": \"/audio/piano/dr_gradus.m4a\",\n\t\t\t\"cover_art_url\": \"/img/gradus.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Sonatina in C Major, Op. 55 No. 1\",\n\t\t\t\"artist\": \"Friedrich Kuhlau\",\n\t\t\t\"album\": \"\",\n\t\t\t\"url\": \"/audio/piano/Kuhlau.mp3\",\n\t\t\t\"cover_art_url\": \"/img/kuhlau.png\"\n\t\t},\n {\n\t\t\t\"name\": \"China\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/01_China.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Experiment in C Minor\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/02_Experiment_in_Cm.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"E Minor Diversion\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/03_EmDiversion.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Poem\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/06_Poem.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"The Other Room\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/07_The_Other_Room.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Smokin\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/08_smokin.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Poem #2\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/09_poem3.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Poem #4\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/06_poem4.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Prelude in G Minor\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/11_Prelude_in_Gm.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Farout\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/12_farout.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"China #2\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Icon\",\n\t\t\t\"url\": \"/audio/icon/15_china2.mp3\",\n\t\t\t\"cover_art_url\": \"/img/icons.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Clementi Sample\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/1_clementisample.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Clementi Sample #2\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/2_Clementisample2.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Nocture Sample\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/3_nocturnesample.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Diversion in D Sharp Minor\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/4_diversion_in_dsharpm.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Meditation in F Sharp\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/mediation_in_fsharp.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Poem #2\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/poemnumber2.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Prelude in C Minor\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/Prelude_in_Cm1.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Solfeggio\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/solfeggio.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Waltz in E Minor\",\n\t\t\t\"artist\": \"2010\",\n\t\t\t\"album\": \"Diversions\",\n\t\t\t\"url\": \"/audio/diversions/waltz_in_em.mp3\",\n\t\t\t\"cover_art_url\": \"/img/diversions.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Domenica\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/domenica.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Down\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/down.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Feeling Low\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/Feeling_Low.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"First Flight\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/first_flight.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Halftime\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/halftime.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Ice\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/Ice.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Impression\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/impression.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Never Before Heard\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/never_before_heard.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"New Years Day\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/new-years-day.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Night Sun\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/NightSun.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Piano with Flute & Strings\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/piano-with-flute-strings.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Piece\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/piece-of-dookie.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Prelude 7\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/Prelude7.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Sketch\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/scketch.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Soaring\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/Soaring.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Time Slips\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/timeslips.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Valentines\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/Valentines.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Winter\",\n\t\t\t\"artist\": \"Unknown\",\n\t\t\t\"album\": \"Unknown\",\n\t\t\t\"url\": \"/audio/piano_unknown/winter.mp3\",\n\t\t\t\"cover_art_url\": \"/img/unknown.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"1\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/1.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"2\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/2.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"3\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/3.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"4\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/4.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"5\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/5.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"6\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/6.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"7\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/7.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"8\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/8.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"9\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/9.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"10\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/11.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"11\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/11.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"12\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/12.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"13\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/13.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"14\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/14.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"15\",\n\t\t\t\"artist\": \"2017\",\n\t\t\t\"album\": \"Clips for Film\",\n\t\t\t\"url\": \"/audio/clips-for-film/15.mp3\",\n\t\t\t\"cover_art_url\": \"/img/clips.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Circle Clip\",\n\t\t\t\"artist\": \"2011\",\n\t\t\t\"album\": \"Delia\",\n\t\t\t\"url\": \"/audio/delia/CircleClip.mp3\",\n\t\t\t\"cover_art_url\": \"/img/delia.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"No Woman No Cry\",\n\t\t\t\"artist\": \"2011\",\n\t\t\t\"album\": \"Delia\",\n\t\t\t\"url\": \"/audio/delia/NoWomanNoCry.mp3\",\n\t\t\t\"cover_art_url\": \"/img/delia.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"One More Cup of Coffee\",\n\t\t\t\"artist\": \"2011\",\n\t\t\t\"album\": \"Delia\",\n\t\t\t\"url\": \"/audio/delia/OneMoreCupofCoffee.mp3\",\n\t\t\t\"cover_art_url\": \"/img/delia.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Rhapsody In O Flat Minor\",\n\t\t\t\"artist\": \"2011\",\n\t\t\t\"album\": \"Delia\",\n\t\t\t\"url\": \"/audio/delia/RhapsodyInOFlatMinor.mp3\",\n\t\t\t\"cover_art_url\": \"/img/delia.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"The River\",\n\t\t\t\"artist\": \"2011\",\n\t\t\t\"album\": \"Delia\",\n\t\t\t\"url\": \"/audio/delia/TheRiver.mp3\",\n\t\t\t\"cover_art_url\": \"/img/delia.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Protos\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/1-Protos.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Mercury\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/2-Mercury.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Mystic\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/3-Mystic.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Hermes\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/4-Hermes.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Agentum\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/5-Argentum.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Aurum\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/6-Aurum.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Ouroboros\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Mystic\",\n\t\t\t\"url\": \"/audio/mystic/7-Ouroboros.mp3\",\n\t\t\t\"cover_art_url\": \"/img/mystic.png\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Orbital Habitat\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/1-Orbital_Habitat.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Ogon\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/2-Ogon.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Onus\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/3-Onus.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Dom Suka\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/4-Dom_Suka.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Sedulous\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/5-Sedulous.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Strakh\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/6-Strakh.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Blank\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Suka\",\n\t\t\t\"url\": \"/audio/suka/7-Blank.mp3\",\n\t\t\t\"cover_art_url\": \"/img/suka.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Simple X\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Vox Dei\",\n\t\t\t\"url\": \"/audio/vox-dei/1-SimpleX.mp3\",\n\t\t\t\"cover_art_url\": \"/img/vox.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Vox Dei\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Vox Dei\",\n\t\t\t\"url\": \"/audio/vox-dei/2-Vox_Dei.mp3\",\n\t\t\t\"cover_art_url\": \"/img/vox.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Spiritus\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Vox Dei\",\n\t\t\t\"url\": \"/audio/vox-dei/3-Spiritus.mp3\",\n\t\t\t\"cover_art_url\": \"/img/vox.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Isabellae\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Vox Dei\",\n\t\t\t\"url\": \"/audio/vox-dei/4-Isabellae.mp3\",\n\t\t\t\"cover_art_url\": \"/img/vox.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Inlustris\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Vox Dei\",\n\t\t\t\"url\": \"/audio/vox-dei/5-Inlustris.mp3\",\n\t\t\t\"cover_art_url\": \"/img/vox.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Oceanus\",\n\t\t\t\"artist\": \"2015\",\n\t\t\t\"album\": \"Vox Dei\",\n\t\t\t\"url\": \"/audio/vox-dei/6-Oceanus.mp3\",\n\t\t\t\"cover_art_url\": \"/img/vox.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Easter\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_Easter_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"3/26\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_3_26_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"3/27\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_3_27_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"3/28\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_3_28_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"3/29\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_3_29_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"4/10\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_4_10_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"4/24\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live_4_24_2016.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"iWoody\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live-iwoody.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t\t{\n\t\t\t\"name\": \"iWoody(2)\",\n\t\t\t\"artist\": \"2016\",\n\t\t\t\"album\": \"Live\",\n\t\t\t\"url\": \"/audio/LivePiano/KW-Live-on-iWoody.mp3\",\n\t\t\t\"cover_art_url\": \"/img/live.jpg\"\n\t\t},\n\t],\n \"callbacks\": {\n 'play': function(){\n document.getElementById('album-art').style.visibility = 'hidden';\n document.getElementById('large-visualization').style.visibility = 'visible';\n },\n\n 'pause': function(){\n document.getElementById('album-art').style.visibility = 'visible';\n document.getElementById('large-visualization').style.visibility = 'hidden';\n }\n },\n\twaveforms: {\n sample_rate: 200\n }\n});\n\nlet songElements = document.getElementsByClassName('song');\n\nfor( var i = 0; i < songElements.length; i++ ){\n\t/*\n\t\tEnsure that on mouseover, CSS styles don't get messed up for active songs.\n\t*/\n\tsongElements[i].addEventListener('mouseover', function(){\n\t\tthis.style.backgroundColor = '#494949';\n\n\t\tthis.querySelectorAll('.song-meta-data .song-title')[0].style.color = '#FFFFFF';\n\t\tthis.querySelectorAll('.song-meta-data .song-artist')[0].style.color = '#FFFFFF';\n\n\t\tif( !this.classList.contains('amplitude-active-song-container') ){\n\t\t\tthis.querySelectorAll('.play-button-container')[0].style.display = 'block';\n\t\t}\n\t\tthis.querySelectorAll('.song-duration')[0].style.color = '#FFFFFF';\n\t});\n\n\t/*\n\t\tEnsure that on mouseout, CSS styles don't get messed up for active songs.\n\t*/\n\tsongElements[i].addEventListener('mouseout', function(){\n\t\tthis.style.backgroundColor = '#FFFFFF';\n\t\tthis.querySelectorAll('.song-meta-data .song-title')[0].style.color = '#272726';\n\t\tthis.querySelectorAll('.song-meta-data .song-artist')[0].style.color = '#607D8B';\n\t\tthis.querySelectorAll('.play-button-container')[0].style.display = 'none';\n\t\tthis.querySelectorAll('.song-duration')[0].style.color = '#607D8B';\n\t});\n\n\t/*\n\t\tShow and hide the play button container on the song when the song is clicked.\n\t*/\n\tsongElements[i].addEventListener('click', function(){\n\t\tthis.querySelectorAll('.play-button-container')[0].style.display = 'none';\n\t});\n}\n\n\nconst myModalEl = document.getElementById('Video');\nvar video = document.getElementById(\"redemption\");\nvar video2 = document.getElementById(\"hollow\");\nfunction stopVideo() {\n\tvideo.pause();\n\tvideo.currentTime = 0;\n\tvideo2.pause();\n\tvideo2.currentTime = 0;\n}\nmyModalEl.addEventListener('hidden.bs.modal', event => {\n stopVideo();\n})\n\n"],"file":"site.js"}