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AM,KAAKC,OAAOjN,EAAEgN,MAAM,KAAKs/B,WAAWrsC,EAAE0oD,UAAUpoD,EAAEqoD,gBAAgB,OAAOvI,UAAU,aAAa,IAAIrgD,EAAE6kC,MAAM1kC,EAAEH,EAAEglC,QAAQ,kBAAkBhlC,EAAE8kC,OAAzD,QAA2E+jB,cAAc7oD,EAAE+kC,QAAQ/kC,EAAEgN,OAAO,GAAG,MAAM,CAAC,KAAK7M,EAAEH,EAAE6kC,MAAM1kC,IAAKQ,EAAEH,EAAEH,IAAI,CAAC2sB,SAAS,WAAW7E,IAAI,IAAInoB,EAAEgN,MAAM,GAAG,KAAKqzC,UAAUrgD,EAAEslC,QAAQ,qBAAqB,GAAG1c,QAAQ5oB,EAAE4oB,QAAQkgC,UAAUvoD,GAAGH,EAAEJ,EAAE4oB,QAAQ5oB,EAAEolC,MAAMrzB,EAAE5R,EAAEH,EAAEilC,UAAUjlC,EAAE6kC,OAAO,IAAI,EAAE7kC,EAAEmlC,MAAM,sBAAyBnlC,EAAEqlC,QAAOnlC,EAAES,EAAEH,EAAEsW,EAAE,OAAO,gBAAmB,CAACqR,IAAI,SAAUjoB,EAAED,EAAEC,EAAES,EAAEmW,EAAE9W,EAAEklC,MAAM,4BAA4B,OAAOjlC,CAAC,EAAE2oB,QAAQ,SAAS3oB,EAAED,EAAEO,GAAMP,EAAEC,EAAEouB,WAAWvtB,SAAOb,EAAEouB,WAAWruB,GAAGkV,MAAM0T,QAAQroB,EAAC,IAAy+B,IAAIqhC,EAAEphC,EAAEH,EAAE,SAAS,CAAC0oD,SAAS,sBAA8E,OAApDh3C,EAAE6vB,EAAE,cAAcA,EAAEonB,IAAI9+B,IAAS3pB,EAAEwR,EAAE6vB,EAAE,aAAoB9rB,CAAC,CAAnxI9V","sources":["webpack://marmosetmusic/./vendor/assets/javascripts/mediaelement.js","webpack://marmosetmusic/./app/assets/javascripts/src/_shiv.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/base_player.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/mixtape.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/project_search.js","webpack://marmosetmusic/./app/assets/javascripts/src/collections/mixtape_collection.js","webpack://marmosetmusic/./app/assets/javascripts/src/collections/project_search_collection.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/async_image.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/collection.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/drawer_page.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/event_emitter.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/format.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/model.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/page.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/resizer.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/scroller.js","webpack://marmosetmusic/./app/assets/javascripts/src/core/spinner.js","webpack://marmosetmusic/./app/assets/javascripts/src/marmoset_music.js","webpack://marmosetmusic/./app/assets/javascripts/src/models/mixtape.js","webpack://marmosetmusic/./app/assets/javascripts/src/models/project_search.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/cart.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/cover_image.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/drawer_form.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/forms/profile_form.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/hover_connect.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/message.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/selectable.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/song.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/song_version.js","webpack://marmosetmusic/./app/assets/javascripts/src/objects/user.js","webpack://marmosetmusic/./app/assets/javascripts/src/socials.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/desktop_player.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/devise/register_confirmation.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/activate.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/cart.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/cartbench.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/customize.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/login.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/mixbench.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/nav.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/newsletter.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/project_searchbench.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/register.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/drawer_pages/share.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/message_center.js","webpack://marmosetmusic/./app/assets/javascripts/src/views/mobile_player.js","webpack://marmosetmusic/./vendor/assets/javascripts/js.cookie.js","webpack://marmosetmusic/./vendor/assets/javascripts/spin.min.js"],"sourcesContent":["/*!\n * MediaElement.js\n * http://www.mediaelementjs.com/\n *\n * Wrapper that mimics native HTML5 MediaElement (audio and video)\n * using a variety of technologies (pure JavaScript, Flash, iframe)\n *\n * Copyright 2010-2017, John Dyer (http://j.hn/)\n * License: MIT\n *\n */ ;(function() {\n function e(t, n, r) {\n function s(o, u) {\n if (!n[o]) {\n if (!t[o]) {\n var a = typeof require == \"function\" && require\n if (!u && a) return a(o, !0)\n if (i) return i(o, !0)\n var f = new Error(\"Cannot find module '\" + o + \"'\")\n throw ((f.code = \"MODULE_NOT_FOUND\"), f)\n }\n var l = (n[o] = { exports: {} })\n t[o][0].call(\n l.exports,\n function(e) {\n var n = t[o][1][e]\n return s(n ? n : e)\n },\n l,\n l.exports,\n e,\n t,\n n,\n r\n )\n }\n return n[o].exports\n }\n var i = typeof require == \"function\" && require\n for (var o = 0; o < r.length; o++) s(r[o])\n return s\n }\n return e\n})()(\n {\n 1: [function(_dereq_, module, exports) {}, {}],\n 2: [\n function(_dereq_, module, exports) {\n ;(function(global) {\n var topLevel =\n typeof global !== \"undefined\" ? global : typeof window !== \"undefined\" ? window : {}\n var minDoc = _dereq_(1)\n\n var doccy\n\n if (typeof document !== \"undefined\") {\n doccy = document\n } else {\n doccy = topLevel[\"__GLOBAL_DOCUMENT_CACHE@4\"]\n\n if (!doccy) {\n doccy = topLevel[\"__GLOBAL_DOCUMENT_CACHE@4\"] = minDoc\n }\n }\n\n module.exports = doccy\n }.call(\n this,\n typeof global !== \"undefined\"\n ? global\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : {}\n ))\n },\n { \"1\": 1 }\n ],\n 3: [\n function(_dereq_, module, exports) {\n ;(function(global) {\n var win\n\n if (typeof window !== \"undefined\") {\n win = window\n } else if (typeof global !== \"undefined\") {\n win = global\n } else if (typeof self !== \"undefined\") {\n win = self\n } else {\n win = {}\n }\n\n module.exports = win\n }.call(\n this,\n typeof global !== \"undefined\"\n ? global\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : {}\n ))\n },\n {}\n ],\n 4: [\n function(_dereq_, module, exports) {\n ;(function(root) {\n // Store setTimeout reference so promise-polyfill will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var setTimeoutFunc = setTimeout\n\n function noop() {}\n\n // Polyfill for Function.prototype.bind\n function bind(fn, thisArg) {\n return function() {\n fn.apply(thisArg, arguments)\n }\n }\n\n function Promise(fn) {\n if (typeof this !== \"object\")\n throw new TypeError(\"Promises must be constructed via new\")\n if (typeof fn !== \"function\") throw new TypeError(\"not a function\")\n this._state = 0\n this._handled = false\n this._value = undefined\n this._deferreds = []\n\n doResolve(fn, this)\n }\n\n function handle(self, deferred) {\n while (self._state === 3) {\n self = self._value\n }\n if (self._state === 0) {\n self._deferreds.push(deferred)\n return\n }\n self._handled = true\n Promise._immediateFn(function() {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected\n if (cb === null) {\n ;(self._state === 1 ? resolve : reject)(deferred.promise, self._value)\n return\n }\n var ret\n try {\n ret = cb(self._value)\n } catch (e) {\n reject(deferred.promise, e)\n return\n }\n resolve(deferred.promise, ret)\n })\n }\n\n function resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self)\n throw new TypeError(\"A promise cannot be resolved with itself.\")\n if (newValue && (typeof newValue === \"object\" || typeof newValue === \"function\")) {\n var then = newValue.then\n if (newValue instanceof Promise) {\n self._state = 3\n self._value = newValue\n finale(self)\n return\n } else if (typeof then === \"function\") {\n doResolve(bind(then, newValue), self)\n return\n }\n }\n self._state = 1\n self._value = newValue\n finale(self)\n } catch (e) {\n reject(self, e)\n }\n }\n\n function reject(self, newValue) {\n self._state = 2\n self._value = newValue\n finale(self)\n }\n\n function finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value)\n }\n })\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i])\n }\n self._deferreds = null\n }\n\n function Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === \"function\" ? onFulfilled : null\n this.onRejected = typeof onRejected === \"function\" ? onRejected : null\n this.promise = promise\n }\n\n /**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\n function doResolve(fn, self) {\n var done = false\n try {\n fn(\n function(value) {\n if (done) return\n done = true\n resolve(self, value)\n },\n function(reason) {\n if (done) return\n done = true\n reject(self, reason)\n }\n )\n } catch (ex) {\n if (done) return\n done = true\n reject(self, ex)\n }\n }\n\n Promise.prototype[\"catch\"] = function(onRejected) {\n return this.then(null, onRejected)\n }\n\n Promise.prototype.then = function(onFulfilled, onRejected) {\n var prom = new this.constructor(noop)\n\n handle(this, new Handler(onFulfilled, onRejected, prom))\n return prom\n }\n\n Promise.all = function(arr) {\n var args = Array.prototype.slice.call(arr)\n\n return new Promise(function(resolve, reject) {\n if (args.length === 0) return resolve([])\n var remaining = args.length\n\n function res(i, val) {\n try {\n if (val && (typeof val === \"object\" || typeof val === \"function\")) {\n var then = val.then\n if (typeof then === \"function\") {\n then.call(\n val,\n function(val) {\n res(i, val)\n },\n reject\n )\n return\n }\n }\n args[i] = val\n if (--remaining === 0) {\n resolve(args)\n }\n } catch (ex) {\n reject(ex)\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i])\n }\n })\n }\n\n Promise.resolve = function(value) {\n if (value && typeof value === \"object\" && value.constructor === Promise) {\n return value\n }\n\n return new Promise(function(resolve) {\n resolve(value)\n })\n }\n\n Promise.reject = function(value) {\n return new Promise(function(resolve, reject) {\n reject(value)\n })\n }\n\n Promise.race = function(values) {\n return new Promise(function(resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject)\n }\n })\n }\n\n // Use polyfill for setImmediate for performance gains\n Promise._immediateFn =\n (typeof setImmediate === \"function\" &&\n function(fn) {\n setImmediate(fn)\n }) ||\n function(fn) {\n setTimeoutFunc(fn, 0)\n }\n\n Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== \"undefined\" && console) {\n console.warn(\"Possible Unhandled Promise Rejection:\", err) // eslint-disable-line no-console\n }\n }\n\n /**\n * Set the immediate function to execute callbacks\n * @param fn {function} Function to execute\n * @deprecated\n */\n Promise._setImmediateFn = function _setImmediateFn(fn) {\n Promise._immediateFn = fn\n }\n\n /**\n * Change the function to execute on unhandled rejection\n * @param {function} fn Function to execute on unhandled rejection\n * @deprecated\n */\n Promise._setUnhandledRejectionFn = function _setUnhandledRejectionFn(fn) {\n Promise._unhandledRejectionFn = fn\n }\n\n if (typeof module !== \"undefined\" && module.exports) {\n module.exports = Promise\n } else if (!root.Promise) {\n root.Promise = Promise\n }\n })(this)\n },\n {}\n ],\n 5: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _en = _dereq_(9)\n\n var _general = _dereq_(18)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var i18n = { lang: \"en\", en: _en.EN }\n\n i18n.language = function() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key]\n }\n\n if (args !== null && args !== undefined && args.length) {\n if (typeof args[0] !== \"string\") {\n throw new TypeError(\"Language code must be a string value\")\n }\n\n if (!/^[a-z]{2,3}((\\-|_)[a-z]{2})?$/i.test(args[0])) {\n throw new TypeError(\n \"Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters\"\n )\n }\n\n i18n.lang = args[0]\n\n if (i18n[args[0]] === undefined) {\n args[1] =\n args[1] !== null && args[1] !== undefined && _typeof(args[1]) === \"object\"\n ? args[1]\n : {}\n i18n[args[0]] = !(0, _general.isObjectEmpty)(args[1]) ? args[1] : _en.EN\n } else if (args[1] !== null && args[1] !== undefined && _typeof(args[1]) === \"object\") {\n i18n[args[0]] = args[1]\n }\n }\n\n return i18n.lang\n }\n\n i18n.t = function(message) {\n var pluralParam = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null\n\n if (typeof message === \"string\" && message.length) {\n var str = void 0,\n pluralForm = void 0\n\n var language = i18n.language()\n\n var _plural = function _plural(input, number, form) {\n if (\n (typeof input === \"undefined\" ? \"undefined\" : _typeof(input)) !== \"object\" ||\n typeof number !== \"number\" ||\n typeof form !== \"number\"\n ) {\n return input\n }\n\n var _pluralForms = (function() {\n return [\n function() {\n return arguments.length <= 1 ? undefined : arguments[1]\n },\n function() {\n return (arguments.length <= 0 ? undefined : arguments[0]) === 1\n ? arguments.length <= 1\n ? undefined\n : arguments[1]\n : arguments.length <= 2\n ? undefined\n : arguments[2]\n },\n function() {\n return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ||\n (arguments.length <= 0 ? undefined : arguments[0]) === 1\n ? arguments.length <= 1\n ? undefined\n : arguments[1]\n : arguments.length <= 2\n ? undefined\n : arguments[2]\n },\n function() {\n if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11\n ) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n if (\n (arguments.length <= 0 ? undefined : arguments[0]) === 1 ||\n (arguments.length <= 0 ? undefined : arguments[0]) === 11\n ) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) === 2 ||\n (arguments.length <= 0 ? undefined : arguments[0]) === 12\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) > 2 &&\n (arguments.length <= 0 ? undefined : arguments[0]) < 20\n ) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else {\n return arguments.length <= 4 ? undefined : arguments[4]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) === 0 ||\n ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20)\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11\n ) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 &&\n ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 ||\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return [3]\n }\n },\n function() {\n if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11\n ) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 &&\n ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 ||\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) >= 2 &&\n (arguments.length <= 0 ? undefined : arguments[0]) <= 4\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 &&\n ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 ||\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 ||\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4\n ) {\n return arguments.length <= 4 ? undefined : arguments[4]\n } else {\n return arguments.length <= 1 ? undefined : arguments[1]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) > 2 &&\n (arguments.length <= 0 ? undefined : arguments[0]) < 7\n ) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) > 6 &&\n (arguments.length <= 0 ? undefined : arguments[0]) < 11\n ) {\n return arguments.length <= 4 ? undefined : arguments[4]\n } else {\n return arguments.length <= 5 ? undefined : arguments[5]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10\n ) {\n return arguments.length <= 4 ? undefined : arguments[4]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {\n return arguments.length <= 5 ? undefined : arguments[5]\n } else {\n return arguments.length <= 6 ? undefined : arguments[6]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) === 0 ||\n ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11)\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20\n ) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else {\n return arguments.length <= 4 ? undefined : arguments[4]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1\n ? arguments.length <= 1\n ? undefined\n : arguments[1]\n : arguments.length <= 2\n ? undefined\n : arguments[2]\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 &&\n (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 &&\n ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 ||\n (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)\n ) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if (\n (arguments.length <= 0 ? undefined : arguments[0]) !== 8 &&\n (arguments.length <= 0 ? undefined : arguments[0]) !== 11\n ) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else {\n return arguments.length <= 4 ? undefined : arguments[4]\n }\n },\n function() {\n return (arguments.length <= 0 ? undefined : arguments[0]) === 0\n ? arguments.length <= 1\n ? undefined\n : arguments[1]\n : arguments.length <= 2\n ? undefined\n : arguments[2]\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {\n return arguments.length <= 3 ? undefined : arguments[3]\n } else {\n return arguments.length <= 4 ? undefined : arguments[4]\n }\n },\n function() {\n if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {\n return arguments.length <= 1 ? undefined : arguments[1]\n } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {\n return arguments.length <= 2 ? undefined : arguments[2]\n } else {\n return arguments.length <= 3 ? undefined : arguments[3]\n }\n }\n ]\n })()\n\n return _pluralForms[form].apply(null, [number].concat(input))\n }\n\n if (i18n[language] !== undefined) {\n str = i18n[language][message]\n if (pluralParam !== null && typeof pluralParam === \"number\") {\n pluralForm = i18n[language][\"mejs.plural-form\"]\n str = _plural.apply(null, [str, pluralParam, pluralForm])\n }\n }\n\n if (!str && i18n.en) {\n str = i18n.en[message]\n if (pluralParam !== null && typeof pluralParam === \"number\") {\n pluralForm = i18n.en[\"mejs.plural-form\"]\n str = _plural.apply(null, [str, pluralParam, pluralForm])\n }\n }\n\n str = str || message\n\n if (pluralParam !== null && typeof pluralParam === \"number\") {\n str = str.replace(\"%1\", pluralParam)\n }\n\n return (0, _general.escapeHTML)(str)\n }\n\n return message\n }\n\n _mejs2.default.i18n = i18n\n\n if (typeof mejsL10n !== \"undefined\") {\n _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings)\n }\n\n exports.default = i18n\n },\n { \"18\": 18, \"7\": 7, \"9\": 9 }\n ],\n 6: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _general = _dereq_(18)\n\n var _media2 = _dereq_(19)\n\n var _renderer = _dereq_(8)\n\n var _constants = _dereq_(16)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\")\n }\n }\n\n var MediaElement = function MediaElement(idOrNode, options, sources) {\n var _this = this\n\n _classCallCheck(this, MediaElement)\n\n var t = this\n\n sources = Array.isArray(sources) ? sources : null\n\n t.defaults = {\n renderers: [],\n\n fakeNodeName: \"mediaelementwrapper\",\n\n pluginPath: \"build/\",\n\n shimScriptAccess: \"sameDomain\"\n }\n\n options = Object.assign(t.defaults, options)\n\n t.mediaElement = _document2.default.createElement(options.fakeNodeName)\n\n var id = idOrNode,\n error = false\n\n if (typeof idOrNode === \"string\") {\n t.mediaElement.originalNode = _document2.default.getElementById(idOrNode)\n } else {\n t.mediaElement.originalNode = idOrNode\n id = idOrNode.id\n }\n\n if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {\n return null\n }\n\n t.mediaElement.options = options\n id =\n id ||\n \"mejs_\" +\n Math.random()\n .toString()\n .slice(2)\n\n t.mediaElement.originalNode.setAttribute(\"id\", id + \"_from_mejs\")\n\n var tagName = t.mediaElement.originalNode.tagName.toLowerCase()\n if (\n [\"video\", \"audio\"].indexOf(tagName) > -1 &&\n !t.mediaElement.originalNode.getAttribute(\"preload\")\n ) {\n t.mediaElement.originalNode.setAttribute(\"preload\", \"none\")\n }\n\n t.mediaElement.originalNode.parentNode.insertBefore(\n t.mediaElement,\n t.mediaElement.originalNode\n )\n\n t.mediaElement.appendChild(t.mediaElement.originalNode)\n\n var processURL = function processURL(url, type) {\n if (\n _window2.default.location.protocol === \"https:\" &&\n url.indexOf(\"http:\") === 0 &&\n _constants.IS_IOS &&\n _mejs2.default.html5media.mediaTypes.indexOf(type) > -1\n ) {\n var xhr = new XMLHttpRequest()\n xhr.onreadystatechange = function() {\n if (this.readyState === 4 && this.status === 200) {\n var _url = _window2.default.URL || _window2.default.webkitURL,\n blobUrl = _url.createObjectURL(this.response)\n t.mediaElement.originalNode.setAttribute(\"src\", blobUrl)\n return blobUrl\n }\n return url\n }\n xhr.open(\"GET\", url)\n xhr.responseType = \"blob\"\n xhr.send()\n }\n\n return url\n }\n\n var mediaFiles = void 0\n\n if (sources !== null) {\n mediaFiles = sources\n } else if (t.mediaElement.originalNode !== null) {\n mediaFiles = []\n\n switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {\n case \"iframe\":\n mediaFiles.push({\n type: \"\",\n src: t.mediaElement.originalNode.getAttribute(\"src\")\n })\n break\n case \"audio\":\n case \"video\":\n var _sources = t.mediaElement.originalNode.children.length,\n nodeSource = t.mediaElement.originalNode.getAttribute(\"src\")\n\n if (nodeSource) {\n var node = t.mediaElement.originalNode,\n type = (0, _media2.formatType)(nodeSource, node.getAttribute(\"type\"))\n mediaFiles.push({\n type: type,\n src: processURL(nodeSource, type)\n })\n }\n\n for (var i = 0; i < _sources; i++) {\n var n = t.mediaElement.originalNode.children[i]\n if (n.tagName.toLowerCase() === \"source\") {\n var src = n.getAttribute(\"src\"),\n _type = (0, _media2.formatType)(src, n.getAttribute(\"type\"))\n mediaFiles.push({ type: _type, src: processURL(src, _type) })\n }\n }\n break\n }\n }\n\n t.mediaElement.id = id\n t.mediaElement.renderers = {}\n t.mediaElement.events = {}\n t.mediaElement.promises = []\n t.mediaElement.renderer = null\n t.mediaElement.rendererName = null\n\n t.mediaElement.changeRenderer = function(rendererName, mediaFiles) {\n var t = _this,\n media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src\n\n if (\n t.mediaElement.renderer !== undefined &&\n t.mediaElement.renderer !== null &&\n t.mediaElement.renderer.name === rendererName\n ) {\n t.mediaElement.renderer.pause()\n if (t.mediaElement.renderer.stop) {\n t.mediaElement.renderer.stop()\n }\n t.mediaElement.renderer.show()\n t.mediaElement.renderer.setSrc(media)\n return true\n }\n\n if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {\n t.mediaElement.renderer.pause()\n if (t.mediaElement.renderer.stop) {\n t.mediaElement.renderer.stop()\n }\n t.mediaElement.renderer.hide()\n }\n\n var newRenderer = t.mediaElement.renderers[rendererName],\n newRendererType = null\n\n if (newRenderer !== undefined && newRenderer !== null) {\n newRenderer.show()\n newRenderer.setSrc(media)\n t.mediaElement.renderer = newRenderer\n t.mediaElement.rendererName = rendererName\n return true\n }\n\n var rendererArray = t.mediaElement.options.renderers.length\n ? t.mediaElement.options.renderers\n : _renderer.renderer.order\n\n for (var _i = 0, total = rendererArray.length; _i < total; _i++) {\n var index = rendererArray[_i]\n\n if (index === rendererName) {\n var rendererList = _renderer.renderer.renderers\n newRendererType = rendererList[index]\n\n var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options)\n newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles)\n newRenderer.name = rendererName\n\n t.mediaElement.renderers[newRendererType.name] = newRenderer\n t.mediaElement.renderer = newRenderer\n t.mediaElement.rendererName = rendererName\n newRenderer.show()\n return true\n }\n }\n\n return false\n }\n\n t.mediaElement.setSize = function(width, height) {\n if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {\n t.mediaElement.renderer.setSize(width, height)\n }\n }\n\n t.mediaElement.generateError = function(message, urlList) {\n message = message || \"\"\n urlList = Array.isArray(urlList) ? urlList : []\n var event = (0, _general.createEvent)(\"error\", t.mediaElement)\n event.message = message\n event.urls = urlList\n t.mediaElement.dispatchEvent(event)\n error = true\n }\n\n var props = _mejs2.default.html5media.properties,\n methods = _mejs2.default.html5media.methods,\n addProperty = function addProperty(obj, name, onGet, onSet) {\n var oldValue = obj[name]\n var getFn = function getFn() {\n return onGet.apply(obj, [oldValue])\n },\n setFn = function setFn(newValue) {\n oldValue = onSet.apply(obj, [newValue])\n return oldValue\n }\n\n Object.defineProperty(obj, name, {\n get: getFn,\n set: setFn\n })\n },\n assignGettersSetters = function assignGettersSetters(propName) {\n if (propName !== \"src\") {\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1),\n getFn = function getFn() {\n return t.mediaElement.renderer !== undefined &&\n t.mediaElement.renderer !== null &&\n typeof t.mediaElement.renderer[\"get\" + capName] === \"function\"\n ? t.mediaElement.renderer[\"get\" + capName]()\n : null\n },\n setFn = function setFn(value) {\n // Fix for NaN value causing \"Uncaught TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement'\"\n if (!isFinite(value)) return\n if (\n t.mediaElement.renderer !== undefined &&\n t.mediaElement.renderer !== null &&\n typeof t.mediaElement.renderer[\"set\" + capName] === \"function\"\n ) {\n t.mediaElement.renderer[\"set\" + capName](value)\n }\n }\n\n addProperty(t.mediaElement, propName, getFn, setFn)\n t.mediaElement[\"get\" + capName] = getFn\n t.mediaElement[\"set\" + capName] = setFn\n }\n },\n getSrc = function getSrc() {\n return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null\n ? t.mediaElement.renderer.getSrc()\n : null\n },\n setSrc = function setSrc(value) {\n var mediaFiles = []\n\n if (typeof value === \"string\") {\n mediaFiles.push({\n src: value,\n type: value ? (0, _media2.getTypeFromFile)(value) : \"\"\n })\n } else if (\n (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) === \"object\" &&\n value.src !== undefined\n ) {\n var _src = (0, _media2.absolutizeUrl)(value.src),\n _type2 = value.type,\n media = Object.assign(value, {\n src: _src,\n type:\n (_type2 === \"\" || _type2 === null || _type2 === undefined) && _src\n ? (0, _media2.getTypeFromFile)(_src)\n : _type2\n })\n mediaFiles.push(media)\n } else if (Array.isArray(value)) {\n for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {\n var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),\n _type3 = value[_i2].type,\n _media = Object.assign(value[_i2], {\n src: _src2,\n type:\n (_type3 === \"\" || _type3 === null || _type3 === undefined) && _src2\n ? (0, _media2.getTypeFromFile)(_src2)\n : _type3\n })\n\n mediaFiles.push(_media)\n }\n }\n\n var renderInfo = _renderer.renderer.select(\n mediaFiles,\n t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []\n ),\n event = void 0\n\n if (\n !t.mediaElement.paused &&\n !(t.mediaElement.src == null || t.mediaElement.src === \"\")\n ) {\n t.mediaElement.pause()\n event = (0, _general.createEvent)(\"pause\", t.mediaElement)\n t.mediaElement.dispatchEvent(event)\n }\n t.mediaElement.originalNode.src = mediaFiles[0].src || \"\"\n\n if (renderInfo === null && mediaFiles[0].src) {\n t.mediaElement.generateError(\"No renderer found\", mediaFiles)\n return\n }\n\n var shouldChangeRenderer = !(mediaFiles[0].src == null || mediaFiles[0].src === \"\")\n return shouldChangeRenderer\n ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles)\n : null\n },\n triggerAction = function triggerAction(methodName, args) {\n try {\n if (\n methodName === \"play\" &&\n (t.mediaElement.rendererName === \"native_dash\" ||\n t.mediaElement.rendererName === \"native_hls\" ||\n t.mediaElement.rendererName === \"vimeo_iframe\")\n ) {\n var response = t.mediaElement.renderer[methodName](args)\n if (response && typeof response.then === \"function\") {\n response.catch(function() {\n if (t.mediaElement.paused) {\n setTimeout(function() {\n var tmpResponse = t.mediaElement.renderer.play()\n if (tmpResponse !== undefined) {\n tmpResponse.catch(function() {\n if (!t.mediaElement.renderer.paused) {\n t.mediaElement.renderer.pause()\n }\n })\n }\n }, 150)\n }\n })\n }\n } else {\n t.mediaElement.renderer[methodName](args)\n }\n } catch (e) {\n t.mediaElement.generateError(e, mediaFiles)\n }\n },\n assignMethods = function assignMethods(methodName) {\n t.mediaElement[methodName] = function() {\n for (\n var _len = arguments.length, args = Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n args[_key] = arguments[_key]\n }\n\n if (\n t.mediaElement.renderer !== undefined &&\n t.mediaElement.renderer !== null &&\n typeof t.mediaElement.renderer[methodName] === \"function\"\n ) {\n if (t.mediaElement.promises.length) {\n Promise.all(t.mediaElement.promises)\n .then(function() {\n triggerAction(methodName, args)\n })\n .catch(function(e) {\n t.mediaElement.generateError(e, mediaFiles)\n })\n } else {\n triggerAction(methodName, args)\n }\n }\n return null\n }\n }\n\n addProperty(t.mediaElement, \"src\", getSrc, setSrc)\n t.mediaElement.getSrc = getSrc\n t.mediaElement.setSrc = setSrc\n\n for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {\n assignGettersSetters(props[_i3])\n }\n\n for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {\n assignMethods(methods[_i4])\n }\n\n t.mediaElement.addEventListener = function(eventName, callback) {\n t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || []\n\n t.mediaElement.events[eventName].push(callback)\n }\n t.mediaElement.removeEventListener = function(eventName, callback) {\n if (!eventName) {\n t.mediaElement.events = {}\n return true\n }\n\n var callbacks = t.mediaElement.events[eventName]\n\n if (!callbacks) {\n return true\n }\n\n if (!callback) {\n t.mediaElement.events[eventName] = []\n return true\n }\n\n for (var _i5 = 0; _i5 < callbacks.length; _i5++) {\n if (callbacks[_i5] === callback) {\n t.mediaElement.events[eventName].splice(_i5, 1)\n return true\n }\n }\n return false\n }\n\n t.mediaElement.dispatchEvent = function(event) {\n var callbacks = t.mediaElement.events[event.type]\n if (callbacks) {\n for (var _i6 = 0; _i6 < callbacks.length; _i6++) {\n callbacks[_i6].apply(null, [event])\n }\n }\n }\n\n t.mediaElement.destroy = function() {\n var mediaElement = t.mediaElement.originalNode.cloneNode(true)\n var wrapper = t.mediaElement.parentElement\n mediaElement.removeAttribute(\"id\")\n mediaElement.remove()\n t.mediaElement.remove()\n wrapper.appendChild(mediaElement)\n }\n\n if (mediaFiles.length) {\n t.mediaElement.src = mediaFiles\n }\n\n if (t.mediaElement.promises.length) {\n Promise.all(t.mediaElement.promises)\n .then(function() {\n if (t.mediaElement.options.success) {\n t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode)\n }\n })\n .catch(function() {\n if (error && t.mediaElement.options.error) {\n t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode)\n }\n })\n } else {\n if (t.mediaElement.options.success) {\n t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode)\n }\n\n if (error && t.mediaElement.options.error) {\n t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode)\n }\n }\n\n return t.mediaElement\n }\n\n _window2.default.MediaElement = MediaElement\n _mejs2.default.MediaElement = MediaElement\n\n exports.default = MediaElement\n },\n { \"16\": 16, \"18\": 18, \"19\": 19, \"2\": 2, \"3\": 3, \"7\": 7, \"8\": 8 }\n ],\n 7: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var mejs = {}\n\n mejs.version = \"4.2.17\"\n\n mejs.html5media = {\n properties: [\n \"volume\",\n \"src\",\n \"currentTime\",\n \"muted\",\n \"duration\",\n \"paused\",\n \"ended\",\n \"buffered\",\n \"error\",\n \"networkState\",\n \"readyState\",\n \"seeking\",\n \"seekable\",\n \"currentSrc\",\n \"preload\",\n \"bufferedBytes\",\n \"bufferedTime\",\n \"initialTime\",\n \"startOffsetTime\",\n \"defaultPlaybackRate\",\n \"playbackRate\",\n \"played\",\n \"autoplay\",\n \"loop\",\n \"controls\"\n ],\n readOnlyProperties: [\n \"duration\",\n \"paused\",\n \"ended\",\n \"buffered\",\n \"error\",\n \"networkState\",\n \"readyState\",\n \"seeking\",\n \"seekable\"\n ],\n\n methods: [\"load\", \"play\", \"pause\", \"canPlayType\"],\n\n events: [\n \"loadstart\",\n \"durationchange\",\n \"loadedmetadata\",\n \"loadeddata\",\n \"progress\",\n \"canplay\",\n \"canplaythrough\",\n \"suspend\",\n \"abort\",\n \"error\",\n \"emptied\",\n \"stalled\",\n \"play\",\n \"playing\",\n \"pause\",\n \"waiting\",\n \"seeking\",\n \"seeked\",\n \"timeupdate\",\n \"ended\",\n \"ratechange\",\n \"volumechange\"\n ],\n\n mediaTypes: [\n \"audio/mp3\",\n \"audio/ogg\",\n \"audio/oga\",\n \"audio/wav\",\n \"audio/x-wav\",\n \"audio/wave\",\n \"audio/x-pn-wav\",\n \"audio/mpeg\",\n \"audio/mp4\",\n \"video/mp4\",\n \"video/webm\",\n \"video/ogg\",\n \"video/ogv\"\n ]\n }\n\n _window2.default.mejs = mejs\n\n exports.default = mejs\n },\n { \"3\": 3 }\n ],\n 8: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n exports.renderer = undefined\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _createClass = (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i]\n descriptor.enumerable = descriptor.enumerable || false\n descriptor.configurable = true\n if (\"value\" in descriptor) descriptor.writable = true\n Object.defineProperty(target, descriptor.key, descriptor)\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps)\n if (staticProps) defineProperties(Constructor, staticProps)\n return Constructor\n }\n })()\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\")\n }\n }\n\n var Renderer = (function() {\n function Renderer() {\n _classCallCheck(this, Renderer)\n\n this.renderers = {}\n this.order = []\n }\n\n _createClass(Renderer, [\n {\n key: \"add\",\n value: function add(renderer) {\n if (renderer.name === undefined) {\n throw new TypeError(\"renderer must contain at least `name` property\")\n }\n\n this.renderers[renderer.name] = renderer\n this.order.push(renderer.name)\n }\n },\n {\n key: \"select\",\n value: function select(mediaFiles) {\n var renderers =\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []\n\n var renderersLength = renderers.length\n\n renderers = renderers.length ? renderers : this.order\n\n if (!renderersLength) {\n var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],\n rendererRanking = function rendererRanking(renderer) {\n for (var i = 0, total = rendererIndicator.length; i < total; i++) {\n if (rendererIndicator[i].test(renderer)) {\n return i\n }\n }\n return rendererIndicator.length\n }\n\n renderers.sort(function(a, b) {\n return rendererRanking(a) - rendererRanking(b)\n })\n }\n\n for (var i = 0, total = renderers.length; i < total; i++) {\n var key = renderers[i],\n _renderer = this.renderers[key]\n\n if (_renderer !== null && _renderer !== undefined) {\n for (var j = 0, jl = mediaFiles.length; j < jl; j++) {\n if (\n typeof _renderer.canPlayType === \"function\" &&\n typeof mediaFiles[j].type === \"string\" &&\n _renderer.canPlayType(mediaFiles[j].type)\n ) {\n return {\n rendererName: _renderer.name,\n src: mediaFiles[j].src\n }\n }\n }\n }\n }\n\n return null\n }\n },\n {\n key: \"order\",\n set: function set(order) {\n if (!Array.isArray(order)) {\n throw new TypeError(\"order must be an array of strings.\")\n }\n\n this._order = order\n },\n get: function get() {\n return this._order\n }\n },\n {\n key: \"renderers\",\n set: function set(renderers) {\n if (\n renderers !== null &&\n (typeof renderers === \"undefined\" ? \"undefined\" : _typeof(renderers)) !== \"object\"\n ) {\n throw new TypeError(\"renderers must be an array of objects.\")\n }\n\n this._renderers = renderers\n },\n get: function get() {\n return this._renderers\n }\n }\n ])\n\n return Renderer\n })()\n\n var renderer = (exports.renderer = new Renderer())\n\n _mejs2.default.Renderers = renderer\n },\n { \"7\": 7 }\n ],\n 9: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n var EN = (exports.EN = {\n \"mejs.plural-form\": 1,\n\n \"mejs.download-file\": \"Download File\",\n\n \"mejs.install-flash\":\n \"You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/\",\n\n \"mejs.fullscreen\": \"Fullscreen\",\n\n \"mejs.play\": \"Play\",\n \"mejs.pause\": \"Pause\",\n\n \"mejs.time-slider\": \"Time Slider\",\n \"mejs.time-help-text\":\n \"Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.\",\n \"mejs.live-broadcast\": \"Live Broadcast\",\n\n \"mejs.volume-help-text\": \"Use Up/Down Arrow keys to increase or decrease volume.\",\n \"mejs.unmute\": \"Unmute\",\n \"mejs.mute\": \"Mute\",\n \"mejs.volume-slider\": \"Volume Slider\",\n\n \"mejs.video-player\": \"Video Player\",\n \"mejs.audio-player\": \"Audio Player\",\n\n \"mejs.captions-subtitles\": \"Captions/Subtitles\",\n \"mejs.captions-chapters\": \"Chapters\",\n \"mejs.none\": \"None\",\n \"mejs.afrikaans\": \"Afrikaans\",\n \"mejs.albanian\": \"Albanian\",\n \"mejs.arabic\": \"Arabic\",\n \"mejs.belarusian\": \"Belarusian\",\n \"mejs.bulgarian\": \"Bulgarian\",\n \"mejs.catalan\": \"Catalan\",\n \"mejs.chinese\": \"Chinese\",\n \"mejs.chinese-simplified\": \"Chinese (Simplified)\",\n \"mejs.chinese-traditional\": \"Chinese (Traditional)\",\n \"mejs.croatian\": \"Croatian\",\n \"mejs.czech\": \"Czech\",\n \"mejs.danish\": \"Danish\",\n \"mejs.dutch\": \"Dutch\",\n \"mejs.english\": \"English\",\n \"mejs.estonian\": \"Estonian\",\n \"mejs.filipino\": \"Filipino\",\n \"mejs.finnish\": \"Finnish\",\n \"mejs.french\": \"French\",\n \"mejs.galician\": \"Galician\",\n \"mejs.german\": \"German\",\n \"mejs.greek\": \"Greek\",\n \"mejs.haitian-creole\": \"Haitian Creole\",\n \"mejs.hebrew\": \"Hebrew\",\n \"mejs.hindi\": \"Hindi\",\n \"mejs.hungarian\": \"Hungarian\",\n \"mejs.icelandic\": \"Icelandic\",\n \"mejs.indonesian\": \"Indonesian\",\n \"mejs.irish\": \"Irish\",\n \"mejs.italian\": \"Italian\",\n \"mejs.japanese\": \"Japanese\",\n \"mejs.korean\": \"Korean\",\n \"mejs.latvian\": \"Latvian\",\n \"mejs.lithuanian\": \"Lithuanian\",\n \"mejs.macedonian\": \"Macedonian\",\n \"mejs.malay\": \"Malay\",\n \"mejs.maltese\": \"Maltese\",\n \"mejs.norwegian\": \"Norwegian\",\n \"mejs.persian\": \"Persian\",\n \"mejs.polish\": \"Polish\",\n \"mejs.portuguese\": \"Portuguese\",\n \"mejs.romanian\": \"Romanian\",\n \"mejs.russian\": \"Russian\",\n \"mejs.serbian\": \"Serbian\",\n \"mejs.slovak\": \"Slovak\",\n \"mejs.slovenian\": \"Slovenian\",\n \"mejs.spanish\": \"Spanish\",\n \"mejs.swahili\": \"Swahili\",\n \"mejs.swedish\": \"Swedish\",\n \"mejs.tagalog\": \"Tagalog\",\n \"mejs.thai\": \"Thai\",\n \"mejs.turkish\": \"Turkish\",\n \"mejs.ukrainian\": \"Ukrainian\",\n \"mejs.vietnamese\": \"Vietnamese\",\n \"mejs.welsh\": \"Welsh\",\n \"mejs.yiddish\": \"Yiddish\"\n })\n },\n {}\n ],\n 10: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _renderer = _dereq_(8)\n\n var _general = _dereq_(18)\n\n var _media = _dereq_(19)\n\n var _constants = _dereq_(16)\n\n var _dom = _dereq_(17)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var NativeDash = {\n promise: null,\n\n load: function load(settings) {\n if (typeof dashjs !== \"undefined\") {\n NativeDash.promise = new Promise(function(resolve) {\n resolve()\n }).then(function() {\n NativeDash._createPlayer(settings)\n })\n } else {\n settings.options.path =\n typeof settings.options.path === \"string\"\n ? settings.options.path\n : \"https://cdn.dashjs.org/latest/dash.all.min.js\"\n\n NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path)\n NativeDash.promise.then(function() {\n NativeDash._createPlayer(settings)\n })\n }\n\n return NativeDash.promise\n },\n\n _createPlayer: function _createPlayer(settings) {\n var player = dashjs.MediaPlayer().create()\n _window2.default[\"__ready__\" + settings.id](player)\n return player\n }\n }\n\n var DashNativeRenderer = {\n name: \"native_dash\",\n options: {\n prefix: \"native_dash\",\n dash: {\n path: \"https://cdn.dashjs.org/latest/dash.all.min.js\",\n debug: false,\n drm: {},\n\n robustnessLevel: \"\"\n }\n },\n\n canPlayType: function canPlayType(type) {\n return _constants.HAS_MSE && [\"application/dash+xml\"].indexOf(type.toLowerCase()) > -1\n },\n\n create: function create(mediaElement, options, mediaFiles) {\n var originalNode = mediaElement.originalNode,\n id = mediaElement.id + \"_\" + options.prefix,\n autoplay = originalNode.autoplay,\n children = originalNode.children\n\n var node = null,\n dashPlayer = null\n\n originalNode.removeAttribute(\"type\")\n for (var i = 0, total = children.length; i < total; i++) {\n children[i].removeAttribute(\"type\")\n }\n\n node = originalNode.cloneNode(true)\n options = Object.assign(options, mediaElement.options)\n\n var props = _mejs2.default.html5media.properties,\n events = _mejs2.default.html5media.events\n .concat([\"click\", \"mouseover\", \"mouseout\"])\n .filter(function(e) {\n return e !== \"error\"\n }),\n attachNativeEvents = function attachNativeEvents(e) {\n var event = (0, _general.createEvent)(e.type, mediaElement)\n mediaElement.dispatchEvent(event)\n },\n assignGettersSetters = function assignGettersSetters(propName) {\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n node[\"get\" + capName] = function() {\n return dashPlayer !== null ? node[propName] : null\n }\n\n node[\"set\" + capName] = function(value) {\n if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n if (propName === \"src\") {\n var source =\n (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) ===\n \"object\" && value.src\n ? value.src\n : value\n node[propName] = source\n if (dashPlayer !== null) {\n dashPlayer.reset()\n for (var _i = 0, _total = events.length; _i < _total; _i++) {\n node.removeEventListener(events[_i], attachNativeEvents)\n }\n dashPlayer = NativeDash._createPlayer({\n options: options.dash,\n id: id\n })\n\n if (\n value &&\n (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) ===\n \"object\" &&\n _typeof(value.drm) === \"object\"\n ) {\n dashPlayer.setProtectionData(value.drm)\n if (\n (0, _general.isString)(options.dash.robustnessLevel) &&\n options.dash.robustnessLevel\n ) {\n dashPlayer\n .getProtectionController()\n .setRobustnessLevel(options.dash.robustnessLevel)\n }\n }\n dashPlayer.attachSource(source)\n if (autoplay) {\n dashPlayer.play()\n }\n }\n } else {\n node[propName] = value\n }\n }\n }\n }\n\n for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {\n assignGettersSetters(props[_i2])\n }\n\n _window2.default[\"__ready__\" + id] = function(_dashPlayer) {\n mediaElement.dashPlayer = dashPlayer = _dashPlayer\n\n var dashEvents = dashjs.MediaPlayer.events,\n assignEvents = function assignEvents(eventName) {\n if (eventName === \"loadedmetadata\") {\n dashPlayer.initialize()\n dashPlayer.attachView(node)\n dashPlayer.setAutoPlay(false)\n\n if (\n _typeof(options.dash.drm) === \"object\" &&\n !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)\n ) {\n dashPlayer.setProtectionData(options.dash.drm)\n if (\n (0, _general.isString)(options.dash.robustnessLevel) &&\n options.dash.robustnessLevel\n ) {\n dashPlayer\n .getProtectionController()\n .setRobustnessLevel(options.dash.robustnessLevel)\n }\n }\n dashPlayer.attachSource(node.getSrc())\n }\n\n node.addEventListener(eventName, attachNativeEvents)\n }\n\n for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {\n assignEvents(events[_i3])\n }\n\n var assignMdashEvents = function assignMdashEvents(e) {\n if (e.type.toLowerCase() === \"error\") {\n mediaElement.generateError(e.message, node.src)\n console.error(e)\n } else {\n var _event = (0, _general.createEvent)(e.type, mediaElement)\n _event.data = e\n mediaElement.dispatchEvent(_event)\n }\n }\n\n for (var eventType in dashEvents) {\n if (dashEvents.hasOwnProperty(eventType)) {\n dashPlayer.on(dashEvents[eventType], function(e) {\n return assignMdashEvents(e)\n })\n }\n }\n }\n\n if (mediaFiles && mediaFiles.length > 0) {\n for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {\n if (\n _renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)\n ) {\n node.setAttribute(\"src\", mediaFiles[_i4].src)\n if (typeof mediaFiles[_i4].drm !== \"undefined\") {\n options.dash.drm = mediaFiles[_i4].drm\n }\n break\n }\n }\n }\n\n node.setAttribute(\"id\", id)\n\n originalNode.parentNode.insertBefore(node, originalNode)\n originalNode.autoplay = false\n originalNode.style.display = \"none\"\n\n node.setSize = function(width, height) {\n node.style.width = width + \"px\"\n node.style.height = height + \"px\"\n return node\n }\n\n node.hide = function() {\n node.pause()\n node.style.display = \"none\"\n return node\n }\n\n node.show = function() {\n node.style.display = \"\"\n return node\n }\n\n node.destroy = function() {\n if (dashPlayer !== null) {\n dashPlayer.reset()\n }\n }\n\n var event = (0, _general.createEvent)(\"rendererready\", node)\n mediaElement.dispatchEvent(event)\n\n mediaElement.promises.push(\n NativeDash.load({\n options: options.dash,\n id: id\n })\n )\n\n return node\n }\n }\n\n _media.typeChecks.push(function(url) {\n return ~url.toLowerCase().indexOf(\".mpd\") ? \"application/dash+xml\" : null\n })\n\n _renderer.renderer.add(DashNativeRenderer)\n },\n { \"16\": 16, \"17\": 17, \"18\": 18, \"19\": 19, \"3\": 3, \"7\": 7, \"8\": 8 }\n ],\n 11: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n exports.PluginDetector = undefined\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _i18n = _dereq_(5)\n\n var _i18n2 = _interopRequireDefault(_i18n)\n\n var _renderer = _dereq_(8)\n\n var _general = _dereq_(18)\n\n var _constants = _dereq_(16)\n\n var _media = _dereq_(19)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var PluginDetector = (exports.PluginDetector = {\n plugins: [],\n\n hasPluginVersion: function hasPluginVersion(plugin, v) {\n var pv = PluginDetector.plugins[plugin]\n v[1] = v[1] || 0\n v[2] = v[2] || 0\n return (\n pv[0] > v[0] ||\n (pv[0] === v[0] && pv[1] > v[1]) ||\n (pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2])\n )\n },\n\n addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {\n PluginDetector.plugins[p] = PluginDetector.detectPlugin(\n pluginName,\n mimeType,\n activeX,\n axDetect\n )\n },\n\n detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {\n var version = [0, 0, 0],\n description = void 0,\n ax = void 0\n\n if (\n _constants.NAV.plugins !== null &&\n _constants.NAV.plugins !== undefined &&\n _typeof(_constants.NAV.plugins[pluginName]) === \"object\"\n ) {\n description = _constants.NAV.plugins[pluginName].description\n if (\n description &&\n !(\n typeof _constants.NAV.mimeTypes !== \"undefined\" &&\n _constants.NAV.mimeTypes[mimeType] &&\n !_constants.NAV.mimeTypes[mimeType].enabledPlugin\n )\n ) {\n version = description\n .replace(pluginName, \"\")\n .replace(/^\\s+/, \"\")\n .replace(/\\sr/gi, \".\")\n .split(\".\")\n for (var i = 0, total = version.length; i < total; i++) {\n version[i] = parseInt(version[i].match(/\\d+/), 10)\n }\n }\n } else if (_window2.default.ActiveXObject !== undefined) {\n try {\n ax = new ActiveXObject(activeX)\n if (ax) {\n version = axDetect(ax)\n }\n } catch (e) {}\n }\n return version\n }\n })\n\n PluginDetector.addPlugin(\n \"flash\",\n \"Shockwave Flash\",\n \"application/x-shockwave-flash\",\n \"ShockwaveFlash.ShockwaveFlash\",\n function(ax) {\n var version = [],\n d = ax.GetVariable(\"$version\")\n\n if (d) {\n d = d.split(\" \")[1].split(\",\")\n version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]\n }\n return version\n }\n )\n\n var FlashMediaElementRenderer = {\n create: function create(mediaElement, options, mediaFiles) {\n var flash = {}\n var isActive = false\n\n flash.options = options\n flash.id = mediaElement.id + \"_\" + flash.options.prefix\n flash.mediaElement = mediaElement\n flash.flashState = {}\n flash.flashApi = null\n flash.flashApiStack = []\n\n var props = _mejs2.default.html5media.properties,\n assignGettersSetters = function assignGettersSetters(propName) {\n flash.flashState[propName] = null\n\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n flash[\"get\" + capName] = function() {\n if (flash.flashApi !== null) {\n if (typeof flash.flashApi[\"get_\" + propName] === \"function\") {\n var value = flash.flashApi[\"get_\" + propName]()\n\n if (propName === \"buffered\") {\n return {\n start: function start() {\n return 0\n },\n end: function end() {\n return value\n },\n length: 1\n }\n }\n return value\n } else {\n return null\n }\n } else {\n return null\n }\n }\n\n flash[\"set\" + capName] = function(value) {\n if (propName === \"src\") {\n value = (0, _media.absolutizeUrl)(value)\n }\n\n if (flash.flashApi !== null && flash.flashApi[\"set_\" + propName] !== undefined) {\n try {\n flash.flashApi[\"set_\" + propName](value)\n } catch (e) {}\n } else {\n flash.flashApiStack.push({\n type: \"set\",\n propName: propName,\n value: value\n })\n }\n }\n }\n\n for (var i = 0, total = props.length; i < total; i++) {\n assignGettersSetters(props[i])\n }\n\n var methods = _mejs2.default.html5media.methods,\n assignMethods = function assignMethods(methodName) {\n flash[methodName] = function() {\n if (isActive) {\n if (flash.flashApi !== null) {\n if (flash.flashApi[\"fire_\" + methodName]) {\n try {\n flash.flashApi[\"fire_\" + methodName]()\n } catch (e) {}\n } else {\n }\n } else {\n flash.flashApiStack.push({\n type: \"call\",\n methodName: methodName\n })\n }\n }\n }\n }\n methods.push(\"stop\")\n for (var _i = 0, _total = methods.length; _i < _total; _i++) {\n assignMethods(methods[_i])\n }\n\n var initEvents = [\"rendererready\"]\n\n for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {\n var event = (0, _general.createEvent)(initEvents[_i2], flash)\n mediaElement.dispatchEvent(event)\n }\n\n _window2.default[\"__ready__\" + flash.id] = function() {\n flash.flashReady = true\n flash.flashApi = _document2.default.getElementById(\"__\" + flash.id)\n\n if (flash.flashApiStack.length) {\n for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {\n var stackItem = flash.flashApiStack[_i3]\n\n if (stackItem.type === \"set\") {\n var propName = stackItem.propName,\n capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n flash[\"set\" + capName](stackItem.value)\n } else if (stackItem.type === \"call\") {\n flash[stackItem.methodName]()\n }\n }\n }\n }\n\n _window2.default[\"__event__\" + flash.id] = function(eventName, message) {\n var event = (0, _general.createEvent)(eventName, flash)\n if (message) {\n try {\n event.data = JSON.parse(message)\n event.details.data = JSON.parse(message)\n } catch (e) {\n event.message = message\n }\n }\n\n flash.mediaElement.dispatchEvent(event)\n }\n\n flash.flashWrapper = _document2.default.createElement(\"div\")\n\n if ([\"always\", \"sameDomain\"].indexOf(flash.options.shimScriptAccess) === -1) {\n flash.options.shimScriptAccess = \"sameDomain\"\n }\n\n var autoplay = mediaElement.originalNode.autoplay,\n flashVars = [\n \"uid=\" + flash.id,\n \"autoplay=\" + autoplay,\n \"allowScriptAccess=\" + flash.options.shimScriptAccess,\n \"preload=\" + (mediaElement.originalNode.getAttribute(\"preload\") || \"\")\n ],\n isVideo =\n mediaElement.originalNode !== null &&\n mediaElement.originalNode.tagName.toLowerCase() === \"video\",\n flashHeight = isVideo ? mediaElement.originalNode.height : 1,\n flashWidth = isVideo ? mediaElement.originalNode.width : 1\n\n if (mediaElement.originalNode.getAttribute(\"src\")) {\n flashVars.push(\"src=\" + mediaElement.originalNode.getAttribute(\"src\"))\n }\n\n if (flash.options.enablePseudoStreaming === true) {\n flashVars.push(\"pseudostreamstart=\" + flash.options.pseudoStreamingStartQueryParam)\n flashVars.push(\"pseudostreamtype=\" + flash.options.pseudoStreamingType)\n }\n\n if (flash.options.streamDelimiter) {\n flashVars.push(\"streamdelimiter=\" + encodeURIComponent(flash.options.streamDelimiter))\n }\n\n if (flash.options.proxyType) {\n flashVars.push(\"proxytype=\" + flash.options.proxyType)\n }\n\n mediaElement.appendChild(flash.flashWrapper)\n mediaElement.originalNode.style.display = \"none\"\n\n var settings = []\n\n if (_constants.IS_IE || _constants.IS_EDGE) {\n var specialIEContainer = _document2.default.createElement(\"div\")\n flash.flashWrapper.appendChild(specialIEContainer)\n\n if (_constants.IS_EDGE) {\n settings = [\n 'type=\"application/x-shockwave-flash\"',\n 'data=\"' + flash.options.pluginPath + flash.options.filename + '\"',\n 'id=\"__' + flash.id + '\"',\n 'width=\"' + flashWidth + '\"',\n 'height=\"' + flashHeight + \"'\\\"\"\n ]\n } else {\n settings = [\n 'classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"',\n 'codebase=\"//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\"',\n 'id=\"__' + flash.id + '\"',\n 'width=\"' + flashWidth + '\"',\n 'height=\"' + flashHeight + '\"'\n ]\n }\n\n if (!isVideo) {\n settings.push('style=\"clip: rect(0 0 0 0); position: absolute;\"')\n }\n\n specialIEContainer.outerHTML =\n \"\" +\n ('') +\n ('') +\n '' +\n '' +\n '' +\n ('') +\n '' +\n (\"
\" + _i18n2.default.t(\"mejs.install-flash\") + \"
\") +\n \"
\"\n } else {\n settings = [\n 'id=\"__' + flash.id + '\"',\n 'name=\"__' + flash.id + '\"',\n 'play=\"true\"',\n 'loop=\"false\"',\n 'quality=\"high\"',\n 'bgcolor=\"#000000\"',\n 'wmode=\"transparent\"',\n 'allowScriptAccess=\"' + flash.options.shimScriptAccess + '\"',\n 'allowFullScreen=\"true\"',\n 'type=\"application/x-shockwave-flash\"',\n 'pluginspage=\"//www.macromedia.com/go/getflashplayer\"',\n 'src=\"' + flash.options.pluginPath + flash.options.filename + '\"',\n 'flashvars=\"' + flashVars.join(\"&\") + '\"'\n ]\n\n if (isVideo) {\n settings.push('width=\"' + flashWidth + '\"')\n settings.push('height=\"' + flashHeight + '\"')\n } else {\n settings.push('style=\"position: fixed; left: -9999em; top: -9999em;\"')\n }\n\n flash.flashWrapper.innerHTML = \"\"\n }\n\n flash.flashNode = flash.flashWrapper.lastChild\n\n flash.hide = function() {\n isActive = false\n if (isVideo) {\n flash.flashNode.style.display = \"none\"\n }\n }\n flash.show = function() {\n isActive = true\n if (isVideo) {\n flash.flashNode.style.display = \"\"\n }\n }\n flash.setSize = function(width, height) {\n flash.flashNode.style.width = width + \"px\"\n flash.flashNode.style.height = height + \"px\"\n\n if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === \"function\") {\n flash.flashApi.fire_setSize(width, height)\n }\n }\n\n flash.destroy = function() {\n flash.flashNode.remove()\n }\n\n if (mediaFiles && mediaFiles.length > 0) {\n for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {\n if (\n _renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)\n ) {\n flash.setSrc(mediaFiles[_i4].src)\n break\n }\n }\n }\n\n return flash\n }\n }\n\n var hasFlash = PluginDetector.hasPluginVersion(\"flash\", [10, 0, 0])\n\n if (hasFlash) {\n _media.typeChecks.push(function(url) {\n url = url.toLowerCase()\n\n if (url.startsWith(\"rtmp\")) {\n if (~url.indexOf(\".mp3\")) {\n return \"audio/rtmp\"\n } else {\n return \"video/rtmp\"\n }\n } else if (/\\.og(a|g)/i.test(url)) {\n return \"audio/ogg\"\n } else if (~url.indexOf(\".m3u8\")) {\n return \"application/x-mpegURL\"\n } else if (~url.indexOf(\".mpd\")) {\n return \"application/dash+xml\"\n } else if (~url.indexOf(\".flv\")) {\n return \"video/flv\"\n } else {\n return null\n }\n })\n\n var FlashMediaElementVideoRenderer = {\n name: \"flash_video\",\n options: {\n prefix: \"flash_video\",\n filename: \"mediaelement-flash-video.swf\",\n enablePseudoStreaming: false,\n\n pseudoStreamingStartQueryParam: \"start\",\n\n pseudoStreamingType: \"byte\",\n\n proxyType: \"\",\n\n streamDelimiter: \"\"\n },\n\n canPlayType: function canPlayType(type) {\n return ~[\n \"video/mp4\",\n \"video/rtmp\",\n \"audio/rtmp\",\n \"rtmp/mp4\",\n \"audio/mp4\",\n \"video/flv\",\n \"video/x-flv\"\n ].indexOf(type.toLowerCase())\n },\n\n create: FlashMediaElementRenderer.create\n }\n _renderer.renderer.add(FlashMediaElementVideoRenderer)\n\n var FlashMediaElementHlsVideoRenderer = {\n name: \"flash_hls\",\n options: {\n prefix: \"flash_hls\",\n filename: \"mediaelement-flash-video-hls.swf\"\n },\n\n canPlayType: function canPlayType(type) {\n return ~[\n \"application/x-mpegurl\",\n \"application/vnd.apple.mpegurl\",\n \"audio/mpegurl\",\n \"audio/hls\",\n \"video/hls\"\n ].indexOf(type.toLowerCase())\n },\n\n create: FlashMediaElementRenderer.create\n }\n _renderer.renderer.add(FlashMediaElementHlsVideoRenderer)\n\n var FlashMediaElementMdashVideoRenderer = {\n name: \"flash_dash\",\n options: {\n prefix: \"flash_dash\",\n filename: \"mediaelement-flash-video-mdash.swf\"\n },\n\n canPlayType: function canPlayType(type) {\n return ~[\"application/dash+xml\"].indexOf(type.toLowerCase())\n },\n\n create: FlashMediaElementRenderer.create\n }\n _renderer.renderer.add(FlashMediaElementMdashVideoRenderer)\n\n var FlashMediaElementAudioRenderer = {\n name: \"flash_audio\",\n options: {\n prefix: \"flash_audio\",\n filename: \"mediaelement-flash-audio.swf\"\n },\n\n canPlayType: function canPlayType(type) {\n return ~[\"audio/mp3\"].indexOf(type.toLowerCase())\n },\n\n create: FlashMediaElementRenderer.create\n }\n _renderer.renderer.add(FlashMediaElementAudioRenderer)\n\n var FlashMediaElementAudioOggRenderer = {\n name: \"flash_audio_ogg\",\n options: {\n prefix: \"flash_audio_ogg\",\n filename: \"mediaelement-flash-audio-ogg.swf\"\n },\n\n canPlayType: function canPlayType(type) {\n return ~[\"audio/ogg\", \"audio/oga\", \"audio/ogv\"].indexOf(type.toLowerCase())\n },\n\n create: FlashMediaElementRenderer.create\n }\n _renderer.renderer.add(FlashMediaElementAudioOggRenderer)\n }\n },\n { \"16\": 16, \"18\": 18, \"19\": 19, \"2\": 2, \"3\": 3, \"5\": 5, \"7\": 7, \"8\": 8 }\n ],\n 12: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _renderer = _dereq_(8)\n\n var _general = _dereq_(18)\n\n var _constants = _dereq_(16)\n\n var _media = _dereq_(19)\n\n var _dom = _dereq_(17)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var NativeFlv = {\n promise: null,\n\n load: function load(settings) {\n if (typeof flvjs !== \"undefined\") {\n NativeFlv.promise = new Promise(function(resolve) {\n resolve()\n }).then(function() {\n NativeFlv._createPlayer(settings)\n })\n } else {\n settings.options.path =\n typeof settings.options.path === \"string\"\n ? settings.options.path\n : \"https://cdn.jsdelivr.net/npm/flv.js@latest\"\n\n NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path)\n NativeFlv.promise.then(function() {\n NativeFlv._createPlayer(settings)\n })\n }\n\n return NativeFlv.promise\n },\n\n _createPlayer: function _createPlayer(settings) {\n flvjs.LoggingControl.enableDebug = settings.options.debug\n flvjs.LoggingControl.enableVerbose = settings.options.debug\n var player = flvjs.createPlayer(settings.options, settings.configs)\n _window2.default[\"__ready__\" + settings.id](player)\n return player\n }\n }\n\n var FlvNativeRenderer = {\n name: \"native_flv\",\n options: {\n prefix: \"native_flv\",\n flv: {\n path: \"https://cdn.jsdelivr.net/npm/flv.js@latest\",\n\n cors: true,\n debug: false\n }\n },\n\n canPlayType: function canPlayType(type) {\n return (\n _constants.HAS_MSE && [\"video/x-flv\", \"video/flv\"].indexOf(type.toLowerCase()) > -1\n )\n },\n\n create: function create(mediaElement, options, mediaFiles) {\n var originalNode = mediaElement.originalNode,\n id = mediaElement.id + \"_\" + options.prefix\n\n var node = null,\n flvPlayer = null\n\n node = originalNode.cloneNode(true)\n options = Object.assign(options, mediaElement.options)\n\n var props = _mejs2.default.html5media.properties,\n events = _mejs2.default.html5media.events\n .concat([\"click\", \"mouseover\", \"mouseout\"])\n .filter(function(e) {\n return e !== \"error\"\n }),\n attachNativeEvents = function attachNativeEvents(e) {\n var event = (0, _general.createEvent)(e.type, mediaElement)\n mediaElement.dispatchEvent(event)\n },\n assignGettersSetters = function assignGettersSetters(propName) {\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n node[\"get\" + capName] = function() {\n return flvPlayer !== null ? node[propName] : null\n }\n\n node[\"set\" + capName] = function(value) {\n if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n if (propName === \"src\") {\n node[propName] =\n (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) ===\n \"object\" && value.src\n ? value.src\n : value\n if (flvPlayer !== null) {\n var _flvOptions = {}\n _flvOptions.type = \"flv\"\n _flvOptions.url = value\n _flvOptions.cors = options.flv.cors\n _flvOptions.debug = options.flv.debug\n _flvOptions.path = options.flv.path\n var _flvConfigs = options.flv.configs\n\n flvPlayer.destroy()\n for (var i = 0, total = events.length; i < total; i++) {\n node.removeEventListener(events[i], attachNativeEvents)\n }\n flvPlayer = NativeFlv._createPlayer({\n options: _flvOptions,\n configs: _flvConfigs,\n id: id\n })\n flvPlayer.attachMediaElement(node)\n flvPlayer.load()\n }\n } else {\n node[propName] = value\n }\n }\n }\n }\n\n for (var i = 0, total = props.length; i < total; i++) {\n assignGettersSetters(props[i])\n }\n\n _window2.default[\"__ready__\" + id] = function(_flvPlayer) {\n mediaElement.flvPlayer = flvPlayer = _flvPlayer\n\n var flvEvents = flvjs.Events,\n assignEvents = function assignEvents(eventName) {\n if (eventName === \"loadedmetadata\") {\n flvPlayer.unload()\n flvPlayer.detachMediaElement()\n flvPlayer.attachMediaElement(node)\n flvPlayer.load()\n }\n\n node.addEventListener(eventName, attachNativeEvents)\n }\n\n for (var _i = 0, _total = events.length; _i < _total; _i++) {\n assignEvents(events[_i])\n }\n\n var assignFlvEvents = function assignFlvEvents(name, data) {\n if (name === \"error\") {\n var message = data[0] + \": \" + data[1] + \" \" + data[2].msg\n mediaElement.generateError(message, node.src)\n } else {\n var _event = (0, _general.createEvent)(name, mediaElement)\n _event.data = data\n mediaElement.dispatchEvent(_event)\n }\n }\n\n var _loop = function _loop(eventType) {\n if (flvEvents.hasOwnProperty(eventType)) {\n flvPlayer.on(flvEvents[eventType], function() {\n for (\n var _len = arguments.length, args = Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n args[_key] = arguments[_key]\n }\n\n return assignFlvEvents(flvEvents[eventType], args)\n })\n }\n }\n\n for (var eventType in flvEvents) {\n _loop(eventType)\n }\n }\n\n if (mediaFiles && mediaFiles.length > 0) {\n for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {\n if (\n _renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)\n ) {\n node.setAttribute(\"src\", mediaFiles[_i2].src)\n break\n }\n }\n }\n\n node.setAttribute(\"id\", id)\n\n originalNode.parentNode.insertBefore(node, originalNode)\n originalNode.autoplay = false\n originalNode.style.display = \"none\"\n\n var flvOptions = {}\n flvOptions.type = \"flv\"\n flvOptions.url = node.src\n flvOptions.cors = options.flv.cors\n flvOptions.debug = options.flv.debug\n flvOptions.path = options.flv.path\n var flvConfigs = options.flv.configs\n\n node.setSize = function(width, height) {\n node.style.width = width + \"px\"\n node.style.height = height + \"px\"\n return node\n }\n\n node.hide = function() {\n if (flvPlayer !== null) {\n flvPlayer.pause()\n }\n node.style.display = \"none\"\n return node\n }\n\n node.show = function() {\n node.style.display = \"\"\n return node\n }\n\n node.destroy = function() {\n if (flvPlayer !== null) {\n flvPlayer.destroy()\n }\n }\n\n var event = (0, _general.createEvent)(\"rendererready\", node)\n mediaElement.dispatchEvent(event)\n\n mediaElement.promises.push(\n NativeFlv.load({\n options: flvOptions,\n configs: flvConfigs,\n id: id\n })\n )\n\n return node\n }\n }\n\n _media.typeChecks.push(function(url) {\n return ~url.toLowerCase().indexOf(\".flv\") ? \"video/flv\" : null\n })\n\n _renderer.renderer.add(FlvNativeRenderer)\n },\n { \"16\": 16, \"17\": 17, \"18\": 18, \"19\": 19, \"3\": 3, \"7\": 7, \"8\": 8 }\n ],\n 13: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n var _typeof =\n typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\"\n ? function(obj) {\n return typeof obj\n }\n : function(obj) {\n return obj &&\n typeof Symbol === \"function\" &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? \"symbol\"\n : typeof obj\n }\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _renderer = _dereq_(8)\n\n var _general = _dereq_(18)\n\n var _constants = _dereq_(16)\n\n var _media = _dereq_(19)\n\n var _dom = _dereq_(17)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var NativeHls = {\n promise: null,\n\n load: function load(settings) {\n if (typeof Hls !== \"undefined\") {\n NativeHls.promise = new Promise(function(resolve) {\n resolve()\n }).then(function() {\n NativeHls._createPlayer(settings)\n })\n } else {\n settings.options.path =\n typeof settings.options.path === \"string\"\n ? settings.options.path\n : \"https://cdn.jsdelivr.net/npm/hls.js@latest\"\n\n NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path)\n NativeHls.promise.then(function() {\n NativeHls._createPlayer(settings)\n })\n }\n\n return NativeHls.promise\n },\n\n _createPlayer: function _createPlayer(settings) {\n var player = new Hls(settings.options)\n _window2.default[\"__ready__\" + settings.id](player)\n return player\n }\n }\n\n var HlsNativeRenderer = {\n name: \"native_hls\",\n options: {\n prefix: \"native_hls\",\n hls: {\n path: \"https://cdn.jsdelivr.net/npm/hls.js@latest\",\n\n autoStartLoad: false,\n debug: false\n }\n },\n\n canPlayType: function canPlayType(type) {\n return (\n _constants.HAS_MSE &&\n [\n \"application/x-mpegurl\",\n \"application/vnd.apple.mpegurl\",\n \"audio/mpegurl\",\n \"audio/hls\",\n \"video/hls\"\n ].indexOf(type.toLowerCase()) > -1\n )\n },\n\n create: function create(mediaElement, options, mediaFiles) {\n var originalNode = mediaElement.originalNode,\n id = mediaElement.id + \"_\" + options.prefix,\n preload = originalNode.getAttribute(\"preload\"),\n autoplay = originalNode.autoplay\n\n var hlsPlayer = null,\n node = null,\n index = 0,\n total = mediaFiles.length\n\n node = originalNode.cloneNode(true)\n options = Object.assign(options, mediaElement.options)\n options.hls.autoStartLoad = (preload && preload !== \"none\") || autoplay\n\n var props = _mejs2.default.html5media.properties,\n events = _mejs2.default.html5media.events\n .concat([\"click\", \"mouseover\", \"mouseout\"])\n .filter(function(e) {\n return e !== \"error\"\n }),\n attachNativeEvents = function attachNativeEvents(e) {\n var event = (0, _general.createEvent)(e.type, mediaElement)\n mediaElement.dispatchEvent(event)\n },\n assignGettersSetters = function assignGettersSetters(propName) {\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n node[\"get\" + capName] = function() {\n return hlsPlayer !== null ? node[propName] : null\n }\n\n node[\"set\" + capName] = function(value) {\n if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n if (propName === \"src\") {\n node[propName] =\n (typeof value === \"undefined\" ? \"undefined\" : _typeof(value)) ===\n \"object\" && value.src\n ? value.src\n : value\n if (hlsPlayer !== null) {\n hlsPlayer.destroy()\n for (var i = 0, _total = events.length; i < _total; i++) {\n node.removeEventListener(events[i], attachNativeEvents)\n }\n hlsPlayer = NativeHls._createPlayer({\n options: options.hls,\n id: id\n })\n hlsPlayer.loadSource(value)\n hlsPlayer.attachMedia(node)\n }\n } else {\n node[propName] = value\n }\n }\n }\n }\n\n for (var i = 0, _total2 = props.length; i < _total2; i++) {\n assignGettersSetters(props[i])\n }\n\n _window2.default[\"__ready__\" + id] = function(_hlsPlayer) {\n mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer\n var hlsEvents = Hls.Events,\n assignEvents = function assignEvents(eventName) {\n if (eventName === \"loadedmetadata\") {\n var url = mediaElement.originalNode.src\n hlsPlayer.detachMedia()\n hlsPlayer.loadSource(url)\n hlsPlayer.attachMedia(node)\n }\n\n node.addEventListener(eventName, attachNativeEvents)\n }\n\n for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {\n assignEvents(events[_i])\n }\n\n var recoverDecodingErrorDate = void 0,\n recoverSwapAudioCodecDate = void 0\n var assignHlsEvents = function assignHlsEvents(name, data) {\n if (name === \"hlsError\") {\n console.warn(data)\n data = data[1]\n\n if (data.fatal) {\n switch (data.type) {\n case \"mediaError\":\n var now = new Date().getTime()\n if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {\n recoverDecodingErrorDate = new Date().getTime()\n hlsPlayer.recoverMediaError()\n } else if (\n !recoverSwapAudioCodecDate ||\n now - recoverSwapAudioCodecDate > 3000\n ) {\n recoverSwapAudioCodecDate = new Date().getTime()\n console.warn(\n \"Attempting to swap Audio Codec and recover from media error\"\n )\n hlsPlayer.swapAudioCodec()\n hlsPlayer.recoverMediaError()\n } else {\n var message = \"Cannot recover, last media error recovery failed\"\n mediaElement.generateError(message, node.src)\n console.error(message)\n }\n break\n case \"networkError\":\n if (data.details === \"manifestLoadError\") {\n if (index < total && mediaFiles[index + 1] !== undefined) {\n node.setSrc(mediaFiles[index++].src)\n node.load()\n node.play()\n } else {\n var _message = \"Network error\"\n mediaElement.generateError(_message, mediaFiles)\n console.error(_message)\n }\n } else {\n var _message2 = \"Network error\"\n mediaElement.generateError(_message2, mediaFiles)\n console.error(_message2)\n }\n break\n default:\n hlsPlayer.destroy()\n break\n }\n return\n }\n }\n var event = (0, _general.createEvent)(name, mediaElement)\n event.data = data\n mediaElement.dispatchEvent(event)\n }\n\n var _loop = function _loop(eventType) {\n if (hlsEvents.hasOwnProperty(eventType)) {\n hlsPlayer.on(hlsEvents[eventType], function() {\n for (\n var _len = arguments.length, args = Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n args[_key] = arguments[_key]\n }\n\n return assignHlsEvents(hlsEvents[eventType], args)\n })\n }\n }\n\n for (var eventType in hlsEvents) {\n _loop(eventType)\n }\n }\n\n if (total > 0) {\n for (; index < total; index++) {\n if (\n _renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)\n ) {\n node.setAttribute(\"src\", mediaFiles[index].src)\n break\n }\n }\n }\n\n if (preload !== \"auto\" && !autoplay) {\n node.addEventListener(\"play\", function() {\n if (hlsPlayer !== null) {\n hlsPlayer.startLoad()\n }\n })\n\n node.addEventListener(\"pause\", function() {\n if (hlsPlayer !== null) {\n hlsPlayer.stopLoad()\n }\n })\n }\n\n node.setAttribute(\"id\", id)\n\n originalNode.parentNode.insertBefore(node, originalNode)\n originalNode.autoplay = false\n originalNode.style.display = \"none\"\n\n node.setSize = function(width, height) {\n node.style.width = width + \"px\"\n node.style.height = height + \"px\"\n return node\n }\n\n node.hide = function() {\n node.pause()\n node.style.display = \"none\"\n return node\n }\n\n node.show = function() {\n node.style.display = \"\"\n return node\n }\n\n node.destroy = function() {\n if (hlsPlayer !== null) {\n hlsPlayer.stopLoad()\n hlsPlayer.destroy()\n }\n }\n\n var event = (0, _general.createEvent)(\"rendererready\", node)\n mediaElement.dispatchEvent(event)\n\n mediaElement.promises.push(\n NativeHls.load({\n options: options.hls,\n id: id\n })\n )\n\n return node\n }\n }\n\n _media.typeChecks.push(function(url) {\n return ~url.toLowerCase().indexOf(\".m3u8\") ? \"application/x-mpegURL\" : null\n })\n\n _renderer.renderer.add(HlsNativeRenderer)\n },\n { \"16\": 16, \"17\": 17, \"18\": 18, \"19\": 19, \"3\": 3, \"7\": 7, \"8\": 8 }\n ],\n 14: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _renderer = _dereq_(8)\n\n var _general = _dereq_(18)\n\n var _constants = _dereq_(16)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var HtmlMediaElement = {\n name: \"html5\",\n options: {\n prefix: \"html5\"\n },\n\n canPlayType: function canPlayType(type) {\n var mediaElement = _document2.default.createElement(\"video\")\n\n if (\n (_constants.IS_ANDROID && /\\/mp(3|4)$/i.test(type)) ||\n (~[\n \"application/x-mpegurl\",\n \"vnd.apple.mpegurl\",\n \"audio/mpegurl\",\n \"audio/hls\",\n \"video/hls\"\n ].indexOf(type.toLowerCase()) &&\n _constants.SUPPORTS_NATIVE_HLS)\n ) {\n return \"yes\"\n } else if (mediaElement.canPlayType) {\n return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, \"\")\n } else {\n return \"\"\n }\n },\n\n create: function create(mediaElement, options, mediaFiles) {\n var id = mediaElement.id + \"_\" + options.prefix\n var isActive = false\n\n var node = null\n\n if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {\n node = _document2.default.createElement(\"audio\")\n mediaElement.appendChild(node)\n } else {\n node = mediaElement.originalNode\n }\n\n node.setAttribute(\"id\", id)\n\n var props = _mejs2.default.html5media.properties,\n assignGettersSetters = function assignGettersSetters(propName) {\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n node[\"get\" + capName] = function() {\n return node[propName]\n }\n\n node[\"set\" + capName] = function(value) {\n if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {\n node[propName] = value\n }\n }\n }\n\n for (var i = 0, _total = props.length; i < _total; i++) {\n assignGettersSetters(props[i])\n }\n\n var events = _mejs2.default.html5media.events\n .concat([\"click\", \"mouseover\", \"mouseout\"])\n .filter(function(e) {\n return e !== \"error\"\n }),\n assignEvents = function assignEvents(eventName) {\n node.addEventListener(eventName, function(e) {\n if (isActive) {\n var _event = (0, _general.createEvent)(e.type, e.target)\n mediaElement.dispatchEvent(_event)\n }\n })\n }\n\n for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {\n assignEvents(events[_i])\n }\n\n node.setSize = function(width, height) {\n node.style.width = width + \"px\"\n node.style.height = height + \"px\"\n return node\n }\n\n node.hide = function() {\n isActive = false\n node.style.display = \"none\"\n\n return node\n }\n\n node.show = function() {\n isActive = true\n node.style.display = \"\"\n\n return node\n }\n\n var index = 0,\n total = mediaFiles.length\n if (total > 0) {\n for (; index < total; index++) {\n if (\n _renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)\n ) {\n node.setAttribute(\"src\", mediaFiles[index].src)\n break\n }\n }\n }\n\n node.addEventListener(\"error\", function(e) {\n if (e && e.target && e.target.error && e.target.error.code === 4 && isActive) {\n if (index < total && mediaFiles[index + 1] !== undefined) {\n node.src = mediaFiles[index++].src\n node.load()\n node.play()\n } else {\n mediaElement.generateError(\n \"Media error: Format(s) not supported or source(s) not found\",\n mediaFiles\n )\n }\n }\n })\n\n var event = (0, _general.createEvent)(\"rendererready\", node)\n mediaElement.dispatchEvent(event)\n\n return node\n }\n }\n\n _window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement\n\n _renderer.renderer.add(HtmlMediaElement)\n },\n { \"16\": 16, \"18\": 18, \"2\": 2, \"3\": 3, \"7\": 7, \"8\": 8 }\n ],\n 15: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _renderer = _dereq_(8)\n\n var _general = _dereq_(18)\n\n var _media = _dereq_(19)\n\n var _dom = _dereq_(17)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var YouTubeApi = {\n isIframeStarted: false,\n\n isIframeLoaded: false,\n\n iframeQueue: [],\n\n enqueueIframe: function enqueueIframe(settings) {\n YouTubeApi.isLoaded = typeof YT !== \"undefined\" && YT.loaded\n\n if (YouTubeApi.isLoaded) {\n YouTubeApi.createIframe(settings)\n } else {\n YouTubeApi.loadIframeApi()\n YouTubeApi.iframeQueue.push(settings)\n }\n },\n\n loadIframeApi: function loadIframeApi() {\n if (!YouTubeApi.isIframeStarted) {\n ;(0, _dom.loadScript)(\"https://www.youtube.com/player_api\")\n YouTubeApi.isIframeStarted = true\n }\n },\n\n iFrameReady: function iFrameReady() {\n YouTubeApi.isLoaded = true\n YouTubeApi.isIframeLoaded = true\n\n while (YouTubeApi.iframeQueue.length > 0) {\n var settings = YouTubeApi.iframeQueue.pop()\n YouTubeApi.createIframe(settings)\n }\n },\n\n createIframe: function createIframe(settings) {\n return new YT.Player(settings.containerId, settings)\n },\n\n getYouTubeId: function getYouTubeId(url) {\n var youTubeId = \"\"\n\n if (url.indexOf(\"?\") > 0) {\n youTubeId = YouTubeApi.getYouTubeIdFromParam(url)\n\n if (youTubeId === \"\") {\n youTubeId = YouTubeApi.getYouTubeIdFromUrl(url)\n }\n } else {\n youTubeId = YouTubeApi.getYouTubeIdFromUrl(url)\n }\n\n var id = youTubeId.substring(youTubeId.lastIndexOf(\"/\") + 1)\n youTubeId = id.split(\"?\")\n return youTubeId[0]\n },\n\n getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {\n if (url === undefined || url === null || !url.trim().length) {\n return null\n }\n\n var parts = url.split(\"?\"),\n parameters = parts[1].split(\"&\")\n\n var youTubeId = \"\"\n\n for (var i = 0, total = parameters.length; i < total; i++) {\n var paramParts = parameters[i].split(\"=\")\n if (paramParts[0] === \"v\") {\n youTubeId = paramParts[1]\n break\n }\n }\n\n return youTubeId\n },\n\n getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {\n if (url === undefined || url === null || !url.trim().length) {\n return null\n }\n\n var parts = url.split(\"?\")\n url = parts[0]\n return url.substring(url.lastIndexOf(\"/\") + 1)\n },\n\n getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {\n if (\n url === undefined ||\n url === null ||\n !url.trim().length ||\n url.indexOf(\"//www.youtube\") === -1\n ) {\n return url\n }\n\n var parts = url.split(\"/\")\n parts[2] = parts[2].replace(\".com\", \"-nocookie.com\")\n return parts.join(\"/\")\n }\n }\n\n var YouTubeIframeRenderer = {\n name: \"youtube_iframe\",\n\n options: {\n prefix: \"youtube_iframe\",\n\n youtube: {\n autoplay: 0,\n controls: 0,\n disablekb: 1,\n end: 0,\n loop: 0,\n modestbranding: 0,\n playsinline: 0,\n rel: 0,\n showinfo: 0,\n start: 0,\n iv_load_policy: 3,\n\n nocookie: false,\n\n imageQuality: null\n }\n },\n\n canPlayType: function canPlayType(type) {\n return ~[\"video/youtube\", \"video/x-youtube\"].indexOf(type.toLowerCase())\n },\n\n create: function create(mediaElement, options, mediaFiles) {\n var youtube = {},\n apiStack = [],\n readyState = 4\n\n var youTubeApi = null,\n paused = true,\n ended = false,\n youTubeIframe = null,\n volume = 1\n\n youtube.options = options\n youtube.id = mediaElement.id + \"_\" + options.prefix\n youtube.mediaElement = mediaElement\n\n var props = _mejs2.default.html5media.properties,\n assignGettersSetters = function assignGettersSetters(propName) {\n var capName = \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n youtube[\"get\" + capName] = function() {\n if (youTubeApi !== null) {\n var value = null\n\n switch (propName) {\n case \"currentTime\":\n return youTubeApi.getCurrentTime()\n case \"duration\":\n return youTubeApi.getDuration()\n case \"volume\":\n volume = youTubeApi.getVolume() / 100\n return volume\n case \"playbackRate\":\n return youTubeApi.getPlaybackRate()\n case \"paused\":\n return paused\n case \"ended\":\n return ended\n case \"muted\":\n return youTubeApi.isMuted()\n case \"buffered\":\n var percentLoaded = youTubeApi.getVideoLoadedFraction(),\n duration = youTubeApi.getDuration()\n return {\n start: function start() {\n return 0\n },\n end: function end() {\n return percentLoaded * duration\n },\n length: 1\n }\n case \"src\":\n return youTubeApi.getVideoUrl()\n case \"readyState\":\n return readyState\n }\n\n return value\n } else {\n return null\n }\n }\n\n youtube[\"set\" + capName] = function(value) {\n if (youTubeApi !== null) {\n switch (propName) {\n case \"src\":\n var url = typeof value === \"string\" ? value : value[0].src,\n _videoId = YouTubeApi.getYouTubeId(url)\n\n if (mediaElement.originalNode.autoplay) {\n youTubeApi.loadVideoById(_videoId)\n } else {\n youTubeApi.cueVideoById(_videoId)\n }\n break\n case \"currentTime\":\n youTubeApi.seekTo(value)\n break\n case \"muted\":\n if (value) {\n youTubeApi.mute()\n } else {\n youTubeApi.unMute()\n }\n setTimeout(function() {\n var event = (0, _general.createEvent)(\"volumechange\", youtube)\n mediaElement.dispatchEvent(event)\n }, 50)\n break\n case \"volume\":\n volume = value\n youTubeApi.setVolume(value * 100)\n setTimeout(function() {\n var event = (0, _general.createEvent)(\"volumechange\", youtube)\n mediaElement.dispatchEvent(event)\n }, 50)\n break\n case \"playbackRate\":\n youTubeApi.setPlaybackRate(value)\n setTimeout(function() {\n var event = (0, _general.createEvent)(\"ratechange\", youtube)\n mediaElement.dispatchEvent(event)\n }, 50)\n break\n case \"readyState\":\n var event = (0, _general.createEvent)(\"canplay\", youtube)\n mediaElement.dispatchEvent(event)\n break\n default:\n break\n }\n } else {\n apiStack.push({ type: \"set\", propName: propName, value: value })\n }\n }\n }\n\n for (var i = 0, total = props.length; i < total; i++) {\n assignGettersSetters(props[i])\n }\n\n var methods = _mejs2.default.html5media.methods,\n assignMethods = function assignMethods(methodName) {\n youtube[methodName] = function() {\n if (youTubeApi !== null) {\n switch (methodName) {\n case \"play\":\n paused = false\n return youTubeApi.playVideo()\n case \"pause\":\n paused = true\n return youTubeApi.pauseVideo()\n case \"load\":\n return null\n }\n } else {\n apiStack.push({ type: \"call\", methodName: methodName })\n }\n }\n }\n\n for (var _i = 0, _total = methods.length; _i < _total; _i++) {\n assignMethods(methods[_i])\n }\n\n var errorHandler = function errorHandler(error) {\n var message = \"\"\n switch (error.data) {\n case 2:\n message =\n \"The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.\"\n break\n case 5:\n message =\n \"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.\"\n break\n case 100:\n message =\n \"The video requested was not found. Either video has been removed or has been marked as private.\"\n break\n case 101:\n case 105:\n message =\n \"The owner of the requested video does not allow it to be played in embedded players.\"\n break\n default:\n message = \"Unknown error.\"\n break\n }\n mediaElement.generateError(\"Code \" + error.data + \": \" + message, mediaFiles)\n }\n\n var youtubeContainer = _document2.default.createElement(\"div\")\n youtubeContainer.id = youtube.id\n\n if (youtube.options.youtube.nocookie) {\n mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src)\n }\n\n mediaElement.originalNode.parentNode.insertBefore(\n youtubeContainer,\n mediaElement.originalNode\n )\n mediaElement.originalNode.style.display = \"none\"\n\n var isAudio = mediaElement.originalNode.tagName.toLowerCase() === \"audio\",\n height = isAudio ? \"1\" : mediaElement.originalNode.height,\n width = isAudio ? \"1\" : mediaElement.originalNode.width,\n videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),\n youtubeSettings = {\n id: youtube.id,\n containerId: youtubeContainer.id,\n videoId: videoId,\n height: height,\n width: width,\n host:\n youtube.options.youtube && youtube.options.youtube.nocookie\n ? \"https://www.youtube-nocookie.com\"\n : undefined,\n playerVars: Object.assign(\n {\n controls: 0,\n rel: 0,\n disablekb: 1,\n showinfo: 0,\n modestbranding: 0,\n html5: 1,\n iv_load_policy: 3\n },\n youtube.options.youtube\n ),\n origin: _window2.default.location.host,\n events: {\n onReady: function onReady(e) {\n mediaElement.youTubeApi = youTubeApi = e.target\n mediaElement.youTubeState = {\n paused: true,\n ended: false\n }\n\n if (apiStack.length) {\n for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {\n var stackItem = apiStack[_i2]\n\n if (stackItem.type === \"set\") {\n var propName = stackItem.propName,\n capName =\n \"\" + propName.substring(0, 1).toUpperCase() + propName.substring(1)\n\n youtube[\"set\" + capName](stackItem.value)\n } else if (stackItem.type === \"call\") {\n youtube[stackItem.methodName]()\n }\n }\n }\n\n youTubeIframe = youTubeApi.getIframe()\n\n if (mediaElement.originalNode.muted) {\n youTubeApi.mute()\n }\n\n var events = [\"mouseover\", \"mouseout\"],\n assignEvents = function assignEvents(e) {\n var newEvent = (0, _general.createEvent)(e.type, youtube)\n mediaElement.dispatchEvent(newEvent)\n }\n\n for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {\n youTubeIframe.addEventListener(events[_i3], assignEvents, false)\n }\n\n var initEvents = [\"rendererready\", \"loadedmetadata\", \"loadeddata\", \"canplay\"]\n\n for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {\n var event = (0, _general.createEvent)(initEvents[_i4], youtube)\n mediaElement.dispatchEvent(event)\n }\n },\n onStateChange: function onStateChange(e) {\n var events = []\n\n switch (e.data) {\n case -1:\n events = [\"loadedmetadata\"]\n paused = true\n ended = false\n break\n case 0:\n events = [\"ended\"]\n paused = false\n ended = !youtube.options.youtube.loop\n if (!youtube.options.youtube.loop) {\n youtube.stopInterval()\n }\n break\n case 1:\n events = [\"play\", \"playing\"]\n paused = false\n ended = false\n youtube.startInterval()\n break\n case 2:\n events = [\"pause\"]\n paused = true\n ended = false\n youtube.stopInterval()\n break\n case 3:\n events = [\"progress\"]\n ended = false\n break\n case 5:\n events = [\"loadeddata\", \"loadedmetadata\", \"canplay\"]\n paused = true\n ended = false\n break\n }\n\n for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {\n var event = (0, _general.createEvent)(events[_i5], youtube)\n mediaElement.dispatchEvent(event)\n }\n },\n onError: function onError(e) {\n return errorHandler(e)\n }\n }\n }\n\n if (isAudio || mediaElement.originalNode.hasAttribute(\"playsinline\")) {\n youtubeSettings.playerVars.playsinline = 1\n }\n\n if (mediaElement.originalNode.controls) {\n youtubeSettings.playerVars.controls = 1\n }\n if (mediaElement.originalNode.autoplay) {\n youtubeSettings.playerVars.autoplay = 1\n }\n if (mediaElement.originalNode.loop) {\n youtubeSettings.playerVars.loop = 1\n }\n\n if (\n ((youtubeSettings.playerVars.loop &&\n parseInt(youtubeSettings.playerVars.loop, 10) === 1) ||\n mediaElement.originalNode.src.indexOf(\"loop=\") > -1) &&\n !youtubeSettings.playerVars.playlist &&\n mediaElement.originalNode.src.indexOf(\"playlist=\") === -1\n ) {\n youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(\n mediaElement.originalNode.src\n )\n }\n\n YouTubeApi.enqueueIframe(youtubeSettings)\n\n youtube.onEvent = function(eventName, player, _youTubeState) {\n if (_youTubeState !== null && _youTubeState !== undefined) {\n mediaElement.youTubeState = _youTubeState\n }\n }\n\n youtube.setSize = function(width, height) {\n if (youTubeApi !== null) {\n youTubeApi.setSize(width, height)\n }\n }\n youtube.hide = function() {\n youtube.stopInterval()\n youtube.pause()\n if (youTubeIframe) {\n youTubeIframe.style.display = \"none\"\n }\n }\n youtube.show = function() {\n if (youTubeIframe) {\n youTubeIframe.style.display = \"\"\n }\n }\n youtube.destroy = function() {\n youTubeApi.destroy()\n }\n youtube.interval = null\n\n youtube.startInterval = function() {\n youtube.interval = setInterval(function() {\n var event = (0, _general.createEvent)(\"timeupdate\", youtube)\n mediaElement.dispatchEvent(event)\n }, 250)\n }\n youtube.stopInterval = function() {\n if (youtube.interval) {\n clearInterval(youtube.interval)\n }\n }\n youtube.getPosterUrl = function() {\n var quality = options.youtube.imageQuality,\n resolutions = [\"default\", \"hqdefault\", \"mqdefault\", \"sddefault\", \"maxresdefault\"],\n id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src)\n return quality && resolutions.indexOf(quality) > -1 && id\n ? \"https://img.youtube.com/vi/\" + id + \"/\" + quality + \".jpg\"\n : \"\"\n }\n\n return youtube\n }\n }\n\n _window2.default.onYouTubePlayerAPIReady = function() {\n YouTubeApi.iFrameReady()\n }\n\n _media.typeChecks.push(function(url) {\n return /\\/\\/(www\\.youtube|youtu\\.?be)/i.test(url) ? \"video/x-youtube\" : null\n })\n\n _renderer.renderer.add(YouTubeIframeRenderer)\n },\n { \"17\": 17, \"18\": 18, \"19\": 19, \"2\": 2, \"3\": 3, \"7\": 7, \"8\": 8 }\n ],\n 16: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var NAV = (exports.NAV = _window2.default.navigator)\n var UA = (exports.UA = NAV.userAgent.toLowerCase())\n var IS_IPAD = (exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream)\n var IS_IPHONE = (exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream)\n var IS_IPOD = (exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream)\n var IS_IOS = (exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream)\n var IS_ANDROID = (exports.IS_ANDROID = /android/i.test(UA))\n var IS_IE = (exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName))\n var IS_EDGE = (exports.IS_EDGE =\n \"msLaunchUri\" in NAV && !(\"documentMode\" in _document2.default))\n var IS_CHROME = (exports.IS_CHROME = /chrome/i.test(UA))\n var IS_FIREFOX = (exports.IS_FIREFOX = /firefox/i.test(UA))\n var IS_SAFARI = (exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME)\n var IS_STOCK_ANDROID = (exports.IS_STOCK_ANDROID = /^mozilla\\/\\d+\\.\\d+\\s\\(linux;\\su;/i.test(\n UA\n ))\n var HAS_MSE = (exports.HAS_MSE = \"MediaSource\" in _window2.default)\n var SUPPORT_POINTER_EVENTS = (exports.SUPPORT_POINTER_EVENTS = (function() {\n var element = _document2.default.createElement(\"x\"),\n documentElement = _document2.default.documentElement,\n getComputedStyle = _window2.default.getComputedStyle\n\n if (!(\"pointerEvents\" in element.style)) {\n return false\n }\n\n element.style.pointerEvents = \"auto\"\n element.style.pointerEvents = \"x\"\n documentElement.appendChild(element)\n var supports =\n getComputedStyle && (getComputedStyle(element, \"\") || {}).pointerEvents === \"auto\"\n element.remove()\n return !!supports\n })())\n\n var SUPPORT_PASSIVE_EVENT = (exports.SUPPORT_PASSIVE_EVENT = (function() {\n var supportsPassive = false\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get: function get() {\n supportsPassive = true\n }\n })\n _window2.default.addEventListener(\"test\", null, opts)\n } catch (e) {}\n\n return supportsPassive\n })())\n\n var html5Elements = [\"source\", \"track\", \"audio\", \"video\"]\n var video = void 0\n\n for (var i = 0, total = html5Elements.length; i < total; i++) {\n video = _document2.default.createElement(html5Elements[i])\n }\n\n var SUPPORTS_NATIVE_HLS = (exports.SUPPORTS_NATIVE_HLS =\n IS_SAFARI || (IS_IE && /edge/i.test(UA)))\n\n var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined\n\n var hasNativeFullscreen = video.requestFullscreen !== undefined\n\n if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {\n hasNativeFullscreen = false\n hasiOSFullScreen = false\n }\n\n var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined\n var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined\n var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined\n var hasTrueNativeFullScreen =\n hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen\n var nativeFullScreenEnabled = hasTrueNativeFullScreen\n var fullScreenEventName = \"\"\n var isFullScreen = void 0,\n requestFullScreen = void 0,\n cancelFullScreen = void 0\n\n if (hasMozNativeFullScreen) {\n nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled\n } else if (hasMsNativeFullScreen) {\n nativeFullScreenEnabled = _document2.default.msFullscreenEnabled\n }\n\n if (IS_CHROME) {\n hasiOSFullScreen = false\n }\n\n if (hasTrueNativeFullScreen) {\n if (hasWebkitNativeFullScreen) {\n fullScreenEventName = \"webkitfullscreenchange\"\n } else if (hasMozNativeFullScreen) {\n fullScreenEventName = \"fullscreenchange\"\n } else if (hasMsNativeFullScreen) {\n fullScreenEventName = \"MSFullscreenChange\"\n }\n\n exports.isFullScreen = isFullScreen = function isFullScreen() {\n if (hasMozNativeFullScreen) {\n return _document2.default.mozFullScreen\n } else if (hasWebkitNativeFullScreen) {\n return _document2.default.webkitIsFullScreen\n } else if (hasMsNativeFullScreen) {\n return _document2.default.msFullscreenElement !== null\n }\n }\n\n exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {\n if (hasWebkitNativeFullScreen) {\n el.webkitRequestFullScreen()\n } else if (hasMozNativeFullScreen) {\n el.mozRequestFullScreen()\n } else if (hasMsNativeFullScreen) {\n el.msRequestFullscreen()\n }\n }\n\n exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {\n if (hasWebkitNativeFullScreen) {\n _document2.default.webkitCancelFullScreen()\n } else if (hasMozNativeFullScreen) {\n _document2.default.mozCancelFullScreen()\n } else if (hasMsNativeFullScreen) {\n _document2.default.msExitFullscreen()\n }\n }\n }\n\n var HAS_NATIVE_FULLSCREEN = (exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen)\n var HAS_WEBKIT_NATIVE_FULLSCREEN = (exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen)\n var HAS_MOZ_NATIVE_FULLSCREEN = (exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen)\n var HAS_MS_NATIVE_FULLSCREEN = (exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen)\n var HAS_IOS_FULLSCREEN = (exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen)\n var HAS_TRUE_NATIVE_FULLSCREEN = (exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen)\n var HAS_NATIVE_FULLSCREEN_ENABLED = (exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled)\n var FULLSCREEN_EVENT_NAME = (exports.FULLSCREEN_EVENT_NAME = fullScreenEventName)\n exports.isFullScreen = isFullScreen\n exports.requestFullScreen = requestFullScreen\n exports.cancelFullScreen = cancelFullScreen\n\n _mejs2.default.Features = _mejs2.default.Features || {}\n _mejs2.default.Features.isiPad = IS_IPAD\n _mejs2.default.Features.isiPod = IS_IPOD\n _mejs2.default.Features.isiPhone = IS_IPHONE\n _mejs2.default.Features.isiOS =\n _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad\n _mejs2.default.Features.isAndroid = IS_ANDROID\n _mejs2.default.Features.isIE = IS_IE\n _mejs2.default.Features.isEdge = IS_EDGE\n _mejs2.default.Features.isChrome = IS_CHROME\n _mejs2.default.Features.isFirefox = IS_FIREFOX\n _mejs2.default.Features.isSafari = IS_SAFARI\n _mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID\n _mejs2.default.Features.hasMSE = HAS_MSE\n _mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS\n _mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS\n _mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT\n _mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN\n _mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN\n _mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN\n _mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN\n _mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN\n _mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN\n _mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED\n _mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME\n _mejs2.default.Features.isFullScreen = isFullScreen\n _mejs2.default.Features.requestFullScreen = requestFullScreen\n _mejs2.default.Features.cancelFullScreen = cancelFullScreen\n },\n { \"2\": 2, \"3\": 3, \"7\": 7 }\n ],\n 17: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n exports.removeClass = exports.addClass = exports.hasClass = undefined\n exports.loadScript = loadScript\n exports.offset = offset\n exports.toggleClass = toggleClass\n exports.fadeOut = fadeOut\n exports.fadeIn = fadeIn\n exports.siblings = siblings\n exports.visible = visible\n exports.ajax = ajax\n\n var _window = _dereq_(3)\n\n var _window2 = _interopRequireDefault(_window)\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n function loadScript(url) {\n return new Promise(function(resolve, reject) {\n var script = _document2.default.createElement(\"script\")\n script.src = url\n script.async = true\n script.onload = function() {\n script.remove()\n resolve()\n }\n script.onerror = function() {\n script.remove()\n reject()\n }\n _document2.default.head.appendChild(script)\n })\n }\n\n function offset(el) {\n var rect = el.getBoundingClientRect(),\n scrollLeft =\n _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,\n scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop\n return { top: rect.top + scrollTop, left: rect.left + scrollLeft }\n }\n\n var hasClassMethod = void 0,\n addClassMethod = void 0,\n removeClassMethod = void 0\n\n if (\"classList\" in _document2.default.documentElement) {\n hasClassMethod = function hasClassMethod(el, className) {\n return el.classList !== undefined && el.classList.contains(className)\n }\n addClassMethod = function addClassMethod(el, className) {\n return el.classList.add(className)\n }\n removeClassMethod = function removeClassMethod(el, className) {\n return el.classList.remove(className)\n }\n } else {\n hasClassMethod = function hasClassMethod(el, className) {\n return new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className)\n }\n addClassMethod = function addClassMethod(el, className) {\n if (!hasClass(el, className)) {\n el.className += \" \" + className\n }\n }\n removeClassMethod = function removeClassMethod(el, className) {\n el.className = el.className.replace(new RegExp(\"\\\\b\" + className + \"\\\\b\", \"g\"), \"\")\n }\n }\n\n var hasClass = (exports.hasClass = hasClassMethod)\n var addClass = (exports.addClass = addClassMethod)\n var removeClass = (exports.removeClass = removeClassMethod)\n\n function toggleClass(el, className) {\n hasClass(el, className) ? removeClass(el, className) : addClass(el, className)\n }\n\n function fadeOut(el) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400\n var callback = arguments[2]\n\n if (!el.style.opacity) {\n el.style.opacity = 1\n }\n\n var start = null\n _window2.default.requestAnimationFrame(function animate(timestamp) {\n start = start || timestamp\n var progress = timestamp - start\n var opacity = parseFloat(1 - progress / duration, 2)\n el.style.opacity = opacity < 0 ? 0 : opacity\n if (progress > duration) {\n if (callback && typeof callback === \"function\") {\n callback()\n }\n } else {\n _window2.default.requestAnimationFrame(animate)\n }\n })\n }\n\n function fadeIn(el) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400\n var callback = arguments[2]\n\n if (!el.style.opacity) {\n el.style.opacity = 0\n }\n\n var start = null\n _window2.default.requestAnimationFrame(function animate(timestamp) {\n start = start || timestamp\n var progress = timestamp - start\n var opacity = parseFloat(progress / duration, 2)\n el.style.opacity = opacity > 1 ? 1 : opacity\n if (progress > duration) {\n if (callback && typeof callback === \"function\") {\n callback()\n }\n } else {\n _window2.default.requestAnimationFrame(animate)\n }\n })\n }\n\n function siblings(el, filter) {\n var siblings = []\n el = el.parentNode.firstChild\n do {\n if (!filter || filter(el)) {\n siblings.push(el)\n }\n } while ((el = el.nextSibling))\n return siblings\n }\n\n function visible(elem) {\n if (elem.getClientRects !== undefined && elem.getClientRects === \"function\") {\n return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length)\n }\n return !!(elem.offsetWidth || elem.offsetHeight)\n }\n\n function ajax(url, dataType, success, error) {\n var xhr = _window2.default.XMLHttpRequest\n ? new XMLHttpRequest()\n : new ActiveXObject(\"Microsoft.XMLHTTP\")\n\n var type = \"application/x-www-form-urlencoded; charset=UTF-8\",\n completed = false,\n accept = \"*/\".concat(\"*\")\n\n switch (dataType) {\n case \"text\":\n type = \"text/plain\"\n break\n case \"json\":\n type = \"application/json, text/javascript\"\n break\n case \"html\":\n type = \"text/html\"\n break\n case \"xml\":\n type = \"application/xml, text/xml\"\n break\n }\n\n if (type !== \"application/x-www-form-urlencoded\") {\n accept = type + \", */*; q=0.01\"\n }\n\n if (xhr) {\n xhr.open(\"GET\", url, true)\n xhr.setRequestHeader(\"Accept\", accept)\n xhr.onreadystatechange = function() {\n if (completed) {\n return\n }\n\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n completed = true\n var data = void 0\n switch (dataType) {\n case \"json\":\n data = JSON.parse(xhr.responseText)\n break\n case \"xml\":\n data = xhr.responseXML\n break\n default:\n data = xhr.responseText\n break\n }\n success(data)\n } else if (typeof error === \"function\") {\n error(xhr.status)\n }\n }\n }\n\n xhr.send()\n }\n }\n\n _mejs2.default.Utils = _mejs2.default.Utils || {}\n _mejs2.default.Utils.offset = offset\n _mejs2.default.Utils.hasClass = hasClass\n _mejs2.default.Utils.addClass = addClass\n _mejs2.default.Utils.removeClass = removeClass\n _mejs2.default.Utils.toggleClass = toggleClass\n _mejs2.default.Utils.fadeIn = fadeIn\n _mejs2.default.Utils.fadeOut = fadeOut\n _mejs2.default.Utils.siblings = siblings\n _mejs2.default.Utils.visible = visible\n _mejs2.default.Utils.ajax = ajax\n _mejs2.default.Utils.loadScript = loadScript\n },\n { \"2\": 2, \"3\": 3, \"7\": 7 }\n ],\n 18: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n exports.escapeHTML = escapeHTML\n exports.debounce = debounce\n exports.isObjectEmpty = isObjectEmpty\n exports.splitEvents = splitEvents\n exports.createEvent = createEvent\n exports.isNodeAfter = isNodeAfter\n exports.isString = isString\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n function escapeHTML(input) {\n if (typeof input !== \"string\") {\n throw new Error(\"Argument passed must be a string\")\n }\n\n var map = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n '\"': \""\"\n }\n\n return input.replace(/[&<>\"]/g, function(c) {\n return map[c]\n })\n }\n\n function debounce(func, wait) {\n var _this = this,\n _arguments = arguments\n\n var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false\n\n if (typeof func !== \"function\") {\n throw new Error(\"First argument must be a function\")\n }\n\n if (typeof wait !== \"number\") {\n throw new Error(\"Second argument must be a numeric value\")\n }\n\n var timeout = void 0\n return function() {\n var context = _this,\n args = _arguments\n var later = function later() {\n timeout = null\n if (!immediate) {\n func.apply(context, args)\n }\n }\n var callNow = immediate && !timeout\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n\n if (callNow) {\n func.apply(context, args)\n }\n }\n }\n\n function isObjectEmpty(instance) {\n return Object.getOwnPropertyNames(instance).length <= 0\n }\n\n function splitEvents(events, id) {\n var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\\b/\n\n var ret = { d: [], w: [] }\n ;(events || \"\").split(\" \").forEach(function(v) {\n var eventName = \"\" + v + (id ? \".\" + id : \"\")\n\n if (eventName.startsWith(\".\")) {\n ret.d.push(eventName)\n ret.w.push(eventName)\n } else {\n ret[rwindow.test(v) ? \"w\" : \"d\"].push(eventName)\n }\n })\n\n ret.d = ret.d.join(\" \")\n ret.w = ret.w.join(\" \")\n return ret\n }\n\n function createEvent(eventName, target) {\n if (typeof eventName !== \"string\") {\n throw new Error(\"Event name must be a string\")\n }\n\n var eventFrags = eventName.match(/([a-z]+\\.([a-z]+))/i),\n detail = {\n target: target\n }\n\n if (eventFrags !== null) {\n eventName = eventFrags[1]\n detail.namespace = eventFrags[2]\n }\n\n return new window.CustomEvent(eventName, {\n detail: detail\n })\n }\n\n function isNodeAfter(sourceNode, targetNode) {\n return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2)\n }\n\n function isString(value) {\n return typeof value === \"string\"\n }\n\n _mejs2.default.Utils = _mejs2.default.Utils || {}\n _mejs2.default.Utils.escapeHTML = escapeHTML\n _mejs2.default.Utils.debounce = debounce\n _mejs2.default.Utils.isObjectEmpty = isObjectEmpty\n _mejs2.default.Utils.splitEvents = splitEvents\n _mejs2.default.Utils.createEvent = createEvent\n _mejs2.default.Utils.isNodeAfter = isNodeAfter\n _mejs2.default.Utils.isString = isString\n },\n { \"7\": 7 }\n ],\n 19: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n })\n exports.typeChecks = undefined\n exports.absolutizeUrl = absolutizeUrl\n exports.formatType = formatType\n exports.getMimeFromType = getMimeFromType\n exports.getTypeFromFile = getTypeFromFile\n exports.getExtension = getExtension\n exports.normalizeExtension = normalizeExtension\n\n var _mejs = _dereq_(7)\n\n var _mejs2 = _interopRequireDefault(_mejs)\n\n var _general = _dereq_(18)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n var typeChecks = (exports.typeChecks = [])\n\n function absolutizeUrl(url) {\n if (typeof url !== \"string\") {\n throw new Error(\"`url` argument must be a string\")\n }\n\n var el = document.createElement(\"div\")\n el.innerHTML = 'x'\n return el.firstChild.href\n }\n\n function formatType(url) {\n var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"\"\n\n return url && !type ? getTypeFromFile(url) : type\n }\n\n function getMimeFromType(type) {\n if (typeof type !== \"string\") {\n throw new Error(\"`type` argument must be a string\")\n }\n\n return type && type.indexOf(\";\") > -1 ? type.substr(0, type.indexOf(\";\")) : type\n }\n\n function getTypeFromFile(url) {\n if (typeof url !== \"string\") {\n throw new Error(\"`url` argument must be a string\")\n }\n\n for (var i = 0, total = typeChecks.length; i < total; i++) {\n var type = typeChecks[i](url)\n\n if (type) {\n return type\n }\n }\n\n var ext = getExtension(url),\n normalizedExt = normalizeExtension(ext)\n\n var mime = \"video/mp4\"\n\n if (normalizedExt) {\n if (~[\"mp4\", \"m4v\", \"ogg\", \"ogv\", \"webm\", \"flv\", \"mpeg\"].indexOf(normalizedExt)) {\n mime = \"video/\" + normalizedExt\n } else if (\"mov\" === normalizedExt) {\n mime = \"video/quicktime\"\n } else if (~[\"mp3\", \"oga\", \"wav\", \"mid\", \"midi\"].indexOf(normalizedExt)) {\n mime = \"audio/\" + normalizedExt\n }\n }\n\n return mime\n }\n\n function getExtension(url) {\n if (typeof url !== \"string\") {\n throw new Error(\"`url` argument must be a string\")\n }\n\n var baseUrl = url.split(\"?\")[0],\n baseName = baseUrl\n .split(\"\\\\\")\n .pop()\n .split(\"/\")\n .pop()\n return ~baseName.indexOf(\".\") ? baseName.substring(baseName.lastIndexOf(\".\") + 1) : \"\"\n }\n\n function normalizeExtension(extension) {\n if (typeof extension !== \"string\") {\n throw new Error(\"`extension` argument must be a string\")\n }\n\n switch (extension) {\n case \"mp4\":\n case \"m4v\":\n return \"mp4\"\n case \"webm\":\n case \"webma\":\n case \"webmv\":\n return \"webm\"\n case \"ogg\":\n case \"oga\":\n case \"ogv\":\n return \"ogg\"\n default:\n return extension\n }\n }\n\n _mejs2.default.Utils = _mejs2.default.Utils || {}\n _mejs2.default.Utils.typeChecks = typeChecks\n _mejs2.default.Utils.absolutizeUrl = absolutizeUrl\n _mejs2.default.Utils.formatType = formatType\n _mejs2.default.Utils.getMimeFromType = getMimeFromType\n _mejs2.default.Utils.getTypeFromFile = getTypeFromFile\n _mejs2.default.Utils.getExtension = getExtension\n _mejs2.default.Utils.normalizeExtension = normalizeExtension\n },\n { \"18\": 18, \"7\": 7 }\n ],\n 20: [\n function(_dereq_, module, exports) {\n \"use strict\"\n\n var _document = _dereq_(2)\n\n var _document2 = _interopRequireDefault(_document)\n\n var _promisePolyfill = _dereq_(4)\n\n var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill)\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj }\n }\n\n ;(function(arr) {\n arr.forEach(function(item) {\n if (item.hasOwnProperty(\"remove\")) {\n return\n }\n Object.defineProperty(item, \"remove\", {\n configurable: true,\n enumerable: true,\n writable: true,\n value: function remove() {\n this.parentNode.removeChild(this)\n }\n })\n })\n })([Element.prototype, CharacterData.prototype, DocumentType.prototype])\n ;(function() {\n if (typeof window.CustomEvent === \"function\") {\n return false\n }\n\n function CustomEvent(event, params) {\n params = params || { bubbles: false, cancelable: false, detail: undefined }\n var evt = _document2.default.createEvent(\"CustomEvent\")\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail)\n return evt\n }\n\n CustomEvent.prototype = window.Event.prototype\n window.CustomEvent = CustomEvent\n })()\n\n if (typeof Object.assign !== \"function\") {\n Object.assign = function(target) {\n if (target === null || target === undefined) {\n throw new TypeError(\"Cannot convert undefined or null to object\")\n }\n\n var to = Object(target)\n\n for (var index = 1, total = arguments.length; index < total; index++) {\n var nextSource = arguments[index]\n\n if (nextSource !== null) {\n for (var nextKey in nextSource) {\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey]\n }\n }\n }\n }\n return to\n }\n }\n\n if (!String.prototype.startsWith) {\n String.prototype.startsWith = function(searchString, position) {\n position = position || 0\n return this.substr(position, searchString.length) === searchString\n }\n }\n\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n Element.prototype.matchesSelector ||\n Element.prototype.mozMatchesSelector ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.oMatchesSelector ||\n Element.prototype.webkitMatchesSelector ||\n function(s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n i = matches.length - 1\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1\n }\n }\n\n if (window.Element && !Element.prototype.closest) {\n Element.prototype.closest = function(s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n i = void 0,\n el = this\n do {\n i = matches.length\n while (--i >= 0 && matches.item(i) !== el) {}\n } while (i < 0 && (el = el.parentElement))\n return el\n }\n }\n\n ;(function() {\n var lastTime = 0\n var vendors = [\"ms\", \"moz\", \"webkit\", \"o\"]\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x] + \"RequestAnimationFrame\"]\n window.cancelAnimationFrame =\n window[vendors[x] + \"CancelAnimationFrame\"] ||\n window[vendors[x] + \"CancelRequestAnimationFrame\"]\n }\n\n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function(callback) {\n var currTime = new Date().getTime()\n var timeToCall = Math.max(0, 16 - (currTime - lastTime))\n var id = window.setTimeout(function() {\n callback(currTime + timeToCall)\n }, timeToCall)\n lastTime = currTime + timeToCall\n return id\n }\n\n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function(id) {\n clearTimeout(id)\n }\n })()\n\n if (/firefox/i.test(navigator.userAgent)) {\n var getComputedStyle = window.getComputedStyle\n window.getComputedStyle = function(el, pseudoEl) {\n var t = getComputedStyle(el, pseudoEl)\n return t === null ? { getPropertyValue: function getPropertyValue() {} } : t\n }\n }\n\n if (!window.Promise) {\n window.Promise = _promisePolyfill2.default\n }\n\n ;(function(constructor) {\n if (constructor && constructor.prototype && constructor.prototype.children === null) {\n Object.defineProperty(constructor.prototype, \"children\", {\n get: function get() {\n var i = 0,\n node = void 0,\n nodes = this.childNodes,\n children = []\n while ((node = nodes[i++])) {\n if (node.nodeType === 1) {\n children.push(node)\n }\n }\n return children\n }\n })\n }\n })(window.Node || window.Element)\n },\n { \"2\": 2, \"4\": 4 }\n ]\n },\n {},\n [20, 6, 5, 9, 14, 11, 10, 12, 13, 15]\n)\n","import _ from \"underscore\"\nwindow._ = _\nimport \"jquery/src/jquery\"\n\n/**\n * Marmoset Music global namespace\n * @type {Object}\n */\n\nvar mm = (window.mm = {})\n\nmm.hasHistory = \"pushState\" in window.history ? true : false\n\nmm.facade = _.extend({}, Backbone.Events)\nmm.drawerProxy = _.extend({}, Backbone.Events)\nmm.drawerProxy.on(\"all\", function (evt, args) {\n var device = $(document.body).attr(\"data-device\")\n mm.drawer.trigger(evt, args)\n})\nmm.playerProxy = _.extend({}, Backbone.Events)\nmm.playerProxy.on(\"all\", function (evt, args) {\n var device = window.matchMedia(\"(pointer: coarse)\").matches || mm.isMobile ? \"mobile\" : \"desktop\"\n mm[device + \"Player\"].trigger(evt, args)\n})\n\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating\n// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\n// MIT license\n;(function () {\n var lastTime = 0\n var vendors = [\"ms\", \"moz\", \"webkit\", \"o\"]\n for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x] + \"RequestAnimationFrame\"]\n window.cancelAnimationFrame =\n window[vendors[x] + \"CancelAnimationFrame\"] ||\n window[vendors[x] + \"CancelRequestAnimationFrame\"]\n }\n\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = function (callback, element) {\n var currTime = new Date().getTime()\n var timeToCall = Math.max(0, 16 - (currTime - lastTime))\n var id = window.setTimeout(function () {\n callback(currTime + timeToCall)\n }, timeToCall)\n lastTime = currTime + timeToCall\n return id\n }\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = function (id) {\n clearTimeout(id)\n }\n }\n})()\n\n/**\n * Page visibility polyfill\n */\n;(function () {\n var _hiddenPrefix = \"hidden\"\n // Listen for document hidden event\n if (_hiddenPrefix in document) {\n document.addEventListener(\"visibilitychange\", onVisibility)\n } else if ((_hiddenPrefix = \"mozHidden\") in document) {\n document.addEventListener(\"mozvisibilitychange\", onVisibility)\n } else if ((_hiddenPrefix = \"webkitHidden\") in document) {\n document.addEventListener(\"webkitvisibilitychange\", onVisibility)\n } else if ((_hiddenPrefix = \"msHidden\") in document) {\n document.addEventListener(\"msvisibilitychange\", onVisibility)\n // IE 9 and lower:\n } else if (\"onfocusin\" in document) {\n document.onfocusin = document.onfocusout = onVisibility\n // All others:\n } else {\n window.onpageshow = window.onpagehide = window.onfocus = window.onblur = onVisibility\n }\n\n // Song versions page visibility\n // I.e. when a different tab is sactive\n function onVisibility(e) {\n e = e || window.event\n var stateMap = {\n focus: \"visible\",\n focusin: \"visible\",\n pageshow: \"visible\",\n blur: \"hidden\",\n focusout: \"hidden\",\n pagehide: \"hidden\",\n },\n state = stateMap[e.type]\n\n state = typeof state !== \"undefined\" ? state : this[_hiddenPrefix] ? \"hidden\" : \"visible\"\n if (state === \"hidden\") {\n mm.facade.trigger(\"page:hidden\")\n } else if (state === \"visible\") {\n mm.facade.trigger(\"page:visible\")\n }\n }\n})()\n\n// from http://stackoverflow.com/a/5047712\nString.prototype.width = function (font) {\n var f = font || \"12px arial\",\n o = $(\"
\" + this + \"
\")\n .css({\n position: \"absolute\",\n float: \"left\",\n \"white-space\": \"nowrap\",\n visibility: \"hidden\",\n font: f,\n })\n .appendTo($(\"body\")),\n w = o.width()\n\n o.remove()\n\n return w\n}\n\n/**\n * Touch classes\n */\n;(function ($) {\n if (mm.isMobile) {\n $(\"body\").addClass(\"touch\")\n $(\"[data-touch]\").addClass(\"touch\")\n }\n})(jQuery)\n\n/**\n * var email = \"test@email.com\";\n * email.validEmail();\n * @return {boolean} whether or not email provided is valid\n */\nString.prototype.validEmail = function () {\n var email = this.toString()\n var re =\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n return re.test(email)\n}\n\n/**\n * detects width of the os scrollbar\n * http://davidwalsh.name/detect-scrollbar-width\n * @return {[type]} [description]\n */\nwindow.scrollBarWidth = function () {\n // Create the measurement node\n var scrollDiv = document.createElement(\"div\")\n scrollDiv.className = \"scrollbar-measure\"\n document.body.appendChild(scrollDiv)\n\n // Get the scrollbar width\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n\n // Delete the DIV\n document.body.removeChild(scrollDiv)\n\n return scrollbarWidth\n}\n\n/**\n * scrollbar detect on div\n * http://stackoverflow.com/questions/4814398/how-can-i-check-if-a-scrollbar-is-visible\n * @param {[type]} $ [description]\n * @return {[type]} [description]\n */\n;(function ($) {\n $.fn.hasScrollBar = function () {\n return this.get(0).scrollHeight > this.height()\n }\n})(jQuery)\n\n/**\n * Auto-hide scrollbars on ios\n */\n;(function () {\n function hideBar(force) {\n var minHeight = window.innerHeight + 60\n // Only hide the address bar if forcing it to hide or if the height of the body is\n // less than the minimum height needed to hide the address bar.\n if (force === true || parseInt(document.body.style.height, 10) < minHeight) {\n document.body.style.height = minHeight + \"px\"\n }\n setTimeout(function () {\n window.scrollTo(0, 1)\n }, 0)\n }\n\n var isIOS = navigator.userAgent.match(/iPhone|iPod/i)\n if (isIOS) {\n // Hide the address bar on load\n hideBar(true)\n window.addEventListener(\"orientationchange\", hideBar)\n }\n})()\n\n/**\n * firefox detection\n */\nwindow.isFF = navigator.userAgent.toLowerCase().indexOf(\"firefox\") > -1\n","import WaveSurfer from \"wavesurfer.js\"\n\nmm.BasePlayer = function ($el) {\n \"use strict\"\n\n if (typeof $el === \"undefined\" || typeof Audio === \"undefined\") return\n\n var self = mm.EventEmitter(),\n $spinTarg = $(\".mm-player-controls\", $el),\n _deepest = 0,\n _replay = false,\n _segmentStart,\n _spinner = new mm.Spinner(),\n _station = null,\n _songVersion = null,\n playlistType = \"\",\n selectedStation = null\n\n /**\n * Initializer, should be overwritten/super in each instance of BasePlayer\n * @public\n */\n self.init = function () {\n self.createAudio(function () {\n self.bindEvents()\n self.setState(\"idle\")\n if (mm.user.isLoggedIn()) {\n permitActions(\"show\")\n } else {\n permitActions(\"hide\")\n }\n })\n\n self.$playerActionsMenu.off(\"click\")\n self.$playerActionsMenu.on(\"click\", function () {\n $(this).hasClass(\"expanded\") ? hideActionsMenu() : showActionsMenu()\n })\n\n self.$downloadOptionsButton.off(\"click\")\n self.$downloadOptionsButton.on(\"click\", function () {\n $(this).hasClass(\"expanded\") ? hideDownloadOptions() : showDownloadOptions()\n })\n }\n\n /**\n * searching for song version ID in users favorites\n *\n */\n // TODO refactor this so we're not using an AJAX\n // We can probably stick this in the serializer\n // to check if the user has favorited this song version\n function searchFavorite(songVersionID, callback) {\n if (_.isUndefined(songVersionID)) return false\n\n $.get(\"/favorites/search/song_version/\" + songVersionID).then(function (data) {\n var result = data.success\n\n if (typeof callback === \"function\") {\n callback(result, songVersionID)\n }\n })\n }\n\n /**\n * Callback for searchFavorite function:\n * checking song version for favorite status\n * then styling the favorite icon accordingly\n */\n function styleFavorite(result, songVersionID) {\n var $favoriteIcon = $(\".add-favorite .favorite-icon\", $el)\n var $favoriteText = $(\n '.add-favorite .label, .connect-label:contains(\"Favorites\")',\n \"[data-song-version-id=\" + songVersionID + \"]\"\n )\n var $favoriteConnectText = $(\n \".mm-connect-right .connected\",\n \"[data-song-version-id=\" + songVersionID + \"]\"\n )\n\n if (!result) {\n $favoriteIcon.removeClass(\"selected\")\n $favoriteText.text(\"Add To Favorites\")\n $favoriteConnectText.text(\"Add To Favorites\")\n } else {\n $favoriteIcon.addClass(\"selected\")\n $favoriteText.text(\"Remove Favorite\")\n $favoriteConnectText.text(\"Remove Favorite\")\n }\n }\n\n /**\n * Toggle permissable actions based on user status (mixtape, download, favorite)\n * @private\n * @param {String} visibility JQuery function, 'show' or 'hide'\n */\n function permitActions(visibility) {\n visibility = visibility || \"hide\"\n\n var mixtape = $(\".action.mixtape:not(.disabled)\", $el),\n download = $(\".action.download:not(.disabled)\", $el),\n favorite = $(\".action.favorite:not(.disabled)\", $el),\n projectSearch = $(\".action.project-search\", $el)\n\n var disabled_mixtape = $(\".action.mixtape.disabled\", $el),\n disabled_download = $(\".action.download.disabled\", $el),\n disabled_favorite = $(\".action.favorite.disabled\", $el)\n\n mixtape.add(download).removeClass(\"show hide\").addClass(visibility)\n\n disabled_mixtape.add(disabled_download).addClass(\"show hide\").removeClass(visibility)\n\n favorite.add(download).removeClass(\"show hide\").addClass(visibility)\n\n disabled_favorite.add(disabled_download).addClass(\"show hide\").removeClass(visibility)\n\n if (visibility === \"hide\" || mm.user.attributes.internal_user) {\n projectSearch.add(projectSearch).removeClass(\"show hide\").addClass(visibility)\n }\n\n if (\"resize\" in self) self.resize()\n }\n\n /**\n * Shifts a song version from the queue and initiates GET request for playback\n * @private\n */\n function playSongVersion() {\n var songVersion = self.queue[self.pointer]\n var type = \"mp3\"\n var src\n\n if (songVersion) {\n if (!audioEl.canPlayType(\"audio/mpeg\")) {\n console.error(\"Your browser does not accept our audio formats.\")\n }\n $spinTarg.addClass(\"spinning\")\n if (mm.isMobile) {\n mm.spin(true)\n } else {\n _spinner.spin($spinTarg[0])\n }\n\n src = \"/song_versions/play/\" + songVersion.id + \"?type=\" + type\n if (_replay) {\n src += \"&replay=true\"\n }\n if (mm.isMobile) {\n // This uses the basic HTML5 audio element instead of mediaElement.js\n audioEl.pause()\n audioEl.src = src\n audioEl.play()\n } else {\n // Using mediaElement.js on desktop so that the waveform and other fun stuff works\n self.audio.pause()\n self.audio.setSrc(src)\n self.audio.load()\n }\n\n self.injectPlaying(songVersion)\n addHighlight(songVersion.id)\n searchFavorite(songVersion.id, styleFavorite)\n\n self.buildWaveform(songVersion)\n }\n }\n\n function addHighlight(id) {\n var $songVersionItem = $(\"li.song-version-item[data-song-version-id=\" + id + \"]\")\n removeHighlight()\n if ($songVersionItem.length > 0) $songVersionItem.addClass(\"playing\")\n }\n\n function removeHighlight() {\n $(\"li.song-version-item.playing\").removeClass(\"playing\")\n }\n\n function hideActionsMenu() {\n $(window).off(\"click\")\n self.$playerExpandActionsMenu.removeClass(\"expanded\")\n self.$playerActionsMenu.removeClass(\"expanded\")\n }\n\n function showActionsMenu() {\n //Clean up other menu and click events\n $(window).off(\"click\")\n self.$downloadOptionsMenu.removeClass(\"expanded\")\n self.$downloadOptionsButton.removeClass(\"expanded\")\n // Set UI and behavior\n self.$playerExpandActionsMenu.addClass(\"expanded\")\n self.$playerActionsMenu.addClass(\"expanded\")\n $(window).on(\"click\", function (e) {\n if (\n !e.target.closest([\n \"div.player-actions-menu\",\n \".expand-player-actions-menu .horizontal-ellipsis\",\n ])\n ) {\n hideActionsMenu()\n }\n })\n }\n\n function showDownloadOptions() {\n //Clean up other menu and click events\n $(window).off(\"click\")\n self.$playerExpandActionsMenu.removeClass(\"expanded\")\n self.$playerActionsMenu.removeClass(\"expanded\")\n // Set UI and behavior\n self.$downloadOptionsButton.addClass(\"expanded\")\n self.$downloadOptionsMenu.addClass(\"expanded\")\n $(window).on(\"click\", function (e) {\n if (!e.target.closest([\"div.download-options-menu\", \".download\"])) {\n hideDownloadOptions()\n }\n })\n }\n\n function hideDownloadOptions() {\n $(window).off(\"click\")\n self.$downloadOptionsButton.removeClass(\"expanded\")\n self.$downloadOptionsMenu.removeClass(\"expanded\")\n }\n\n var audioEl = new Audio()\n $(\"body\").append(audioEl)\n\n self.$el = $el\n\n self.$playerExpandActionsMenu = $(\"div.player-actions-menu\", $el)\n self.$playerActionsMenu = $(\".expand-player-actions-menu .horizontal-ellipsis\", $el)\n self.$downloadOptionsMenu = $(\"div.download-options-menu\", $el)\n self.$songVersionDetails = $(\".song-version-details\", $el)\n self.$songVersionTime = $(\".song-version-time\", $el)\n self.$songVersionStream = $(\".song-version-stream\", $el)\n self.$songVersionWaveform = $(\".waveform\", $el)\n\n self.$close = $(\".close-history\", self.$el)\n self.$historyButton = $(\".mm-history\", self.$el)\n\n self.$deck = $(\".player-deck\", $el)\n self.$scrubber = $(\".mm-scrubber\", $el)\n self.$photo = $(\".artist-image img\", $el)\n self.$photoLink = $(\".song-version-link\", $el)\n self.$name = $(\".artist-name\", $el)\n self.$title = $(\".song-version-title\", $el)\n self.$actionWrap = $(\".mm-player-actions\", $el)\n self.$downloadOptionsButton = $(\".download\", self.$actionWrap)\n self.$actionLyrics = $(\".lyrics\", self.$actionWrap)\n self.$actionCustomize = $(\".customize\", self.$actionWrap)\n self.$favoriteIcon = $(\".icon.favorite-icon\", self.$actionWrap)\n self.$favoriteText = $('.add-favorite .label, .connect-label:contains(\"Favorite\")', $el)\n self.$elapsed = $(\".elapsed\", $el)\n self.$total = $(\".total\", $el)\n self.$nextButton = $(\".action.next\", $el)\n self.$playButton = $(\".action.play\", $el)\n self.$prevButton = $(\".action.prev\", $el)\n self.$volume = $(\".volume\", $el)\n self.$volumeSlider = $(\".volume-slider\", $el)\n self.$songVersionActions = $(\".song-version-actions\", $el)\n\n self.bufferEnd = 0\n //self.isRadio = false\n self.pointer = 0\n self.queue = []\n self.streamWidth = 0\n self.radioQueue = []\n self.favorited = undefined\n\n /**\n * Native canplay event handler, bind click event to allow seeking\n * @public\n * @param {Object} e canplay event object\n */\n self._onCanplay = function (e) {\n self.$songVersionWaveform.off(\"click\").on(\"click\", function (evt) {\n evt.preventDefault()\n if (evt.target.tagName === \"A\") {\n return false\n }\n var offX = evt.offsetX || evt.clientX - $(evt.target).offset().left,\n seekTime = ((offX / self.streamWidth) * self.audio.duration).toFixed(14)\n self.audio.setCurrentTime(seekTime)\n })\n if (mm.isMobile) {\n mm.spin(false)\n } else {\n _spinner.stop()\n }\n $spinTarg.removeClass(\"spinning\")\n if (self.audio.paused) self.audio.play()\n self.$volume.show()\n }\n\n /**\n * Native ended event handler, resets player states and attempts to play the\n * next song version in the queue\n * @public\n * @param {Object} e ended event object\n */\n self._onEnded = function (e) {\n self.$playButton.attr(\"data-action\", \"play\")\n $el.removeClass(\"playing\")\n removeHighlight()\n self.next()\n }\n\n /**\n * Native loadedmetadata event handler, pretty prints audio duration when\n * audio meta data has been recieved from request\n * @public\n * @param {Object} e loadedmetadata event object\n */\n self._onLoadedmetadata = function (e) {\n var pretty = new Date(null)\n pretty.setSeconds(self.audio.duration)\n pretty = pretty.toTimeString().substr(3, 5).replace(/^0+/, \"\")\n self.$elapsed.html(\"0:00\")\n self.$total.html(pretty)\n pretty = null\n }\n\n /**\n * Native pause event handler, sets the state of mm.player to 'paused'\n * @public\n * @param {Object} e pause event object\n */\n self._onPause = function (e) {\n self.setState(\"paused\")\n }\n\n /**\n * Native play event handler, sets the state of mm.player to 'playing'\n * @public\n * @param {Object} e play event object\n */\n self._onPlay = function (e) {\n self.setState(\"playing\")\n }\n\n /**\n * Native progress event handler, checks the buffered length\n * and resizes it\n * @public\n * @param {Object} e progress event object\n */\n self._onProgress = function (e) {\n if (self.audio.buffered.length) {\n self.bufferEnd = self.audio.buffered.end(0)\n }\n }\n\n /**\n * Native timeupdate event handler, pretty prints current audio position and\n * calls to resize the elapsed progress bars\n * @private\n * @param {Object} e timeupdate event object\n */\n self._onTimeupdate = function (e) {\n if (mm.isMobile) {\n mm.spin(false)\n }\n var pretty = new Date(null)\n pretty.setSeconds(self.audio.currentTime)\n // TODO some deprecated substr code here\n pretty = pretty.toTimeString().substr(3, 5).replace(/^0/, \"\")\n self.$elapsed.html(pretty)\n pretty = null\n self.sizeElapsed()\n }\n\n self.createAudio = function (callback) {\n self.audio = new MediaElement(audioEl, {\n pluginPath: \"/assets/\",\n enablePluginDebug: false,\n type: \"audio/mp3\",\n mode: \"auto\",\n success: function (audio) {\n self.audio = audio\n if (callback) callback()\n },\n error: function (e) {\n console.log(\"Error creating audio player.\", e)\n },\n })\n }\n\n /**\n * Bind audio and user generated event listeners\n * @public\n */\n self.bindEvents = function () {\n self.audio.preload = \"auto\" // required\n\n self.audio.addEventListener(\"canplay\", self._onCanplay, false)\n self.audio.addEventListener(\"ended\", self._onEnded, false)\n self.audio.addEventListener(\"loadedmetadata\", self._onLoadedmetadata, false)\n self.audio.addEventListener(\"pause\", self._onPause, false)\n self.audio.addEventListener(\"play\", self._onPlay, false)\n self.audio.addEventListener(\"progress\", self._onProgress, false)\n self.audio.addEventListener(\"timeupdate\", self._onTimeupdate, false)\n\n self.$nextButton.on(\"click\", function (e) {\n e.preventDefault()\n self.next()\n })\n self.$prevButton.on(\"click\", function (e) {\n e.preventDefault()\n self.prev()\n })\n self.$volumeSlider.on(\"input change\", function (e) {\n e.preventDefault()\n var amount = this.value / 100\n self.volume(amount)\n })\n }\n\n /**\n * Injects song version information into the player. Song Version name, Artist name, etc\n * Creates a mm.SongVersion instance from this data\n * @public\n * @param {Object} song version Song Version object attributes\n */\n self.injectPlaying = function (songVersion) {\n if (typeof songVersion === \"undefined\") return false\n if (_songVersion !== null) {\n _songVersion.destroy()\n _songVersion = null\n }\n var displayName = songVersion.display_name || songVersion.displayName\n var hasClickLicenses = songVersion.has_click_licenses || songVersion.hasClickLicenses\n var playerArt = songVersion.player_art || songVersion.playerArt\n var isExclusive = songVersion.exclusive\n var isVintage = songVersion.vintage\n\n self.$photo.attr(\"src\", playerArt)\n self.$photo.attr(\"width\", 46)\n self.$photoLink.attr(\"data-bypass\", true).attr(\"href\", \"/browse/\" + songVersion.id)\n self.$name\n .html(songVersion.artist.name)\n .attr(\"data-bypass\", true)\n .attr(\"href\", \"/artists/\" + songVersion.artist.slug)\n self.$title\n .html(displayName)\n .attr(\"data-bypass\", true)\n .attr(\"href\", \"/browse/\" + songVersion.id)\n self.$deck\n .attr(\"data-song-version-id\", songVersion.id)\n .attr(\"data-song-version\", JSON.stringify(songVersion))\n $el\n .attr(\"data-song-version-id\", songVersion.id)\n .attr(\"data-song-version\", JSON.stringify(songVersion))\n mm.facade.trigger(\"bypass\")\n\n var action = !songVersion.lyrics ? \"addClass\" : \"removeClass\"\n $(\".action.lyrics\", $el)[action](\"hide\")\n\n action = !songVersion.customizable ? \"addClass\" : \"removeClass\"\n $(\".action.customize\", $el)[action](\"hide\")\n\n action = !hasClickLicenses ? \"addClass\" : \"removeClass\"\n $(\".action.license\", $el)[action](\"custom-only\")\n\n if (hasClickLicenses) {\n $(\".action.license\", $el).off(\"mouseover.tooltip\")\n $(\".action.license\", $el).find(\"span.button-text\").html(\"Buy License\")\n } else {\n $(\".action.license\", $el).find(\"span.button-text\").html(\"Custom License\")\n }\n if (isExclusive && isVintage) {\n $(\".tooltip.partial-exclusivity-tooltip.desktop\", $el).addClass(\"double-tip\")\n $(\".tooltip.partial-exclusivity-tooltip.desktop p\", $el).off(\"mouseover.tooltip\")\n $(\".tooltip.partial-exclusivity-tooltip p\", $el).html(\n \"This song has some restrictions and vintage songs are priced at a higher rate, contact us for a custom license.\"\n )\n } else if (isExclusive) {\n $(\".tooltip.partial-exclusivity-tooltip.desktop p\", $el).html(\n \"This song has some restrictions, contact us for conditions and terms.\"\n )\n } else if (isVintage) {\n $(\".tooltip.vintage-tooltip.desktop p\", $el).html(\n \"Vintage songs are priced at a higher rate, contact us for a custom license.\"\n )\n }\n action = !songVersion.exclusive && !songVersion.vintage ? \"addClass\" : \"removeClass\"\n $(\".tooltip.partial-exclusivity-tooltip\", $el)[action](\"hide\")\n\n var lowRes = $(\".mm-low-res a\", self.$downloadOptionsMenu)\n lowRes.attr(\"href\", \"/song_versions/\" + songVersion.id + \"/download/low\")\n\n var highRes = $(\".mm-high-res a\", self.$downloadOptionsMenu)\n highRes.attr(\"href\", \"/song_versions/\" + songVersion.id + \"/download/high\")\n\n if (songVersion.has_stems || songVersion.hasStems) {\n var stemsDownload = $(\".mm-download-stems a\", self.$downloadOptionsMenu)\n var stemsOption = $(\".mm-download-stems\", self.$downloadOptionsMenu)\n stemsOption.removeClass(\"disabled\")\n stemsDownload.attr(\"href\", \"/song_versions/\" + songVersion.id + \"/download_stems\")\n } else {\n var stemsDownload = $(\".mm-download-stems a\", self.$downloadOptionsMenu)\n var stemsOption = $(\".mm-download-stems\", self.$downloadOptionsMenu)\n stemsOption.addClass(\"disabled\")\n stemsDownload.attr(\"href\", \"/#\")\n }\n\n var downloadLink = $(\".action.download a.mm-hover-connect\", $el)\n if (isExclusive) {\n if (!(mm.user.attributes.role == \"admin\" || mm.user.attributes.role == \"staff\")) {\n $(\".action.download\", $el).addClass(\"disabled\")\n downloadLink.removeAttr(\"href\")\n }\n }\n\n if (mm.isMobile) {\n _songVersion = mm.SongVersion($el)\n } else {\n _songVersion = mm.SongVersion(self.$deck)\n }\n\n self.$close.on(\"click\", function (e) {\n e.preventDefault()\n self.$el.removeClass(\"expanded\")\n })\n\n self.$historyButton.on(\"click\", function (e) {\n e.preventDefault()\n\n if (self.$el.hasClass(\"expanded\")) {\n self.$el.removeClass(\"expanded\")\n } else {\n self.$el.addClass(\"expanded\")\n mm.desktopPlayer.fetchHistory()\n }\n })\n\n mm.HoverConnect($(\"a\", self.$historyButton), self.$deck)\n }\n\n self.buildWaveform = function (songVersion) {\n var fileUrl = songVersion.songVersionFile\n var $waveEl = $(\"wave\", \".waveform\")\n var container, progressColor\n\n if (mm.isMobile || mm.isMobile) {\n container = \".waveform-mobile\"\n progressColor = \"#fff\"\n } else {\n container = \".waveform-desktop\"\n progressColor = \"#21928e\"\n }\n\n if ($waveEl.length === 0) {\n var wavesurfer = WaveSurfer.create({\n backend: \"WebAudio\",\n barGap: 1.5,\n barWidth: 1.5,\n container: container,\n cursorColor: \"transparent\",\n cursorWidth: 0,\n height: 50,\n pixelRatio: 2,\n progressColor: progressColor,\n waveColor: \"#ccc\",\n })\n\n // Get signed URL for Algolia-based playSerializer objects without a song_version_file\n if (!fileUrl) {\n $.get(\"/api/v1/song_versions/\" + songVersion.id + \"/get_signed_url\").then(function (data) {\n songVersion.songVersionFile = data.url\n $waveEl.remove()\n if (data.url) {\n self.buildWaveform(songVersion)\n } else {\n console.log(\"No audio file found\")\n _spinner.stop()\n $spinTarg.removeClass(\"spinning\")\n return\n }\n })\n } else {\n wavesurfer.load(fileUrl)\n }\n } else {\n $waveEl.remove()\n self.buildWaveform(songVersion)\n }\n self.$waveElapsed = $(\"wave>wave\", $el)\n self.$waveCanvases = $(\"canvas\", $el)\n }\n\n /**\n * Attempt to advance the player pointer further into the queue\n * @public\n */\n self.next = function () {\n var newPosition = self.pointer + 1,\n queueLength = self.queue.length\n\n // if (playlistType !== \"mixtape\") {\n // // if next button is hit and postion is 2 from end of queue and queue is divisible by 11, load in more song versions\n // if (self.pointer == queueLength - 3 && queueLength % 10 !== 0)\n // feedSelectedStation(selectedStation)\n // // if next button is hit and postion is 2 from end of queue, load more song versions into default station\n // if (self.pointer == queueLength - 2 && queueLength % 10 == 0) feedDefaultStation()\n // }\n\n // we're already at the end\n if (self.pointer >= queueLength - 1) {\n // check if we are in a playlist\n if (_segmentStart > 0 || playlistType === \"mixtape\") {\n self.pointer = _segmentStart\n _replay = false\n _deepest = self.pointer\n mm.playerProxy.trigger(\"next\")\n return playSongVersion()\n }\n\n // otherwise do nothing\n return false\n\n // we reached the end\n } else if (newPosition >= queueLength - 1) {\n // if we aren't in a playlist, disable the next button\n if (_segmentStart < 0) {\n self.$nextButton.addClass(\"disabled\")\n }\n\n // advance to end of queue\n self.pointer = queueLength - 1\n\n // new listen event for user\n if (self.pointer > _deepest) {\n _replay = false\n _deepest = self.pointer\n\n // we are currently replaying history\n } else {\n _replay = true\n }\n\n mm.playerProxy.trigger(\"next\")\n return playSongVersion()\n }\n\n // all good, advance\n self.pointer = newPosition\n\n // new listen event for user\n if (self.pointer > _deepest) {\n _replay = false\n _deepest = self.pointer\n\n // we are currently replaying history\n } else {\n _replay = true\n }\n\n mm.playerProxy.trigger(\"next\")\n return playSongVersion()\n }\n\n /**\n * Pauses audio playback at currentTime\n * @public\n */\n self.pause = function () {\n removeHighlight()\n self.audio.pause()\n }\n\n // if another statioin is clicked, update selectedStation var\n $(\"[data-uuid]\").on(\"click\", function () {\n selectedStation = $(this).data(\"uuid\")\n })\n\n /**\n * Public method to play a song version, only adds the song version(s) to the queue and\n * calls playSongVersion to handle what to play\n * @public\n * @param {Number|Array} data Song Version ID(s)\n */\n self.play = function (data, radio) {\n if (!data) {\n addHighlight(self.$el[0].dataset.songVersionId)\n return self.audio.play() // resume\n }\n //self.isRadio = typeof radio === \"undefined\" ? false : radio\n\n if (playlistType === \"mixtape\" && data.pointer) {\n // put the position pointer at the song that was clicked within the new array added\n var songVersion = data.songVersions.find(function (el) {\n return el.id === data.pointer.id\n })\n\n self.queue = data.songVersions\n self.pointer = self.queue.indexOf(songVersion)\n _segmentStart = self.queue.indexOf(data.songVersions[0])\n\n // we are somewhere within the queue, enable the next button\n self.$nextButton.removeClass(\"disabled\")\n } else if (playlistType === \"station\" || Array.isArray(data)) {\n // put the position pointer at the start of the new array added\n var songVersion = data[0],\n pointer\n\n self.queue = self.queue.concat(data)\n\n pointer = self.queue.indexOf(songVersion)\n self.pointer = _segmentStart = pointer\n\n // we are somewhere within the queue, enable the next button\n self.$nextButton.removeClass(\"disabled\")\n } else if (playlistType === \"search round\") {\n self.queue = [data]\n self.pointer = 0\n _segmentStart = -1\n\n self.$nextButton.addClass(\"disabled\")\n self.$prevButton.addClass(\"disabled\")\n } else {\n self.queue.push(data)\n self.pointer = self.queue.length - 1\n _segmentStart = -1\n\n // we're at the end of the queue, disable the next button\n self.$nextButton.addClass(\"disabled\")\n }\n _replay = false\n _deepest = self.pointer\n\n // showing song version actions before calling the playSongVersion function\n // so that the buffer bar size knows where to stop on init.\n if (self.$songVersionActions.not(\":visible\")) self.$songVersionActions.show()\n playSongVersion()\n }\n\n /**\n * Attempt to move the player pointer back in the history, unless the pointer\n * is already at the beginning of the queue, or the current song version has more\n * than 5 seconds elapsed\n * @public\n */\n self.prev = function () {\n if (self.audio.currentTime > 5 || (self.pointer === 0 && playlistType !== \"mixtape\")) {\n // return to the beginning of the song version\n return self.audio.setCurrentTime(0)\n }\n self.$nextButton.removeClass(\"disabled\")\n _replay = true\n // if the player is at the beginning of a mixtape, loop it back to the last song\n self.pointer =\n playlistType === \"mixtape\" && self.pointer === 0 ? self.queue.length - 1 : self.pointer - 1\n mm.playerProxy.trigger(\"back\")\n return playSongVersion()\n }\n\n self.volume = function (amount) {\n self.audio.setVolume(amount)\n }\n\n /**\n * Sizes the elapsed progress bar\n * @public\n */\n self.sizeElapsed = function () {\n var w = (self.audio.currentTime / self.audio.duration) * self.streamWidth,\n $waveElapsed = self.$waveElapsed || $(\"wave>wave\", $el)\n\n if (w >= self.streamWidth) {\n w = self.streamWidth\n }\n $waveElapsed.width(w)\n }\n\n /**\n * Sizes the progress and elapsed waveform canvases\n * @public\n */\n self.sizeWaveform = function () {\n var w = (self.bufferEnd / self.audio.duration) * self.streamWidth\n var $waveCanvases = self.$waveCanvases || $(\"canvas\", $el)\n\n if (self.$songVersionStream.width() < 427) {\n w = self.$songVersionStream.width() - self.$songVersionTime.outerWidth(true)\n }\n $waveCanvases.width(w)\n }\n\n self.states = {\n onIdle: function () {\n console.log(\"base_player.js | onIdle\")\n },\n offIdle: function () {\n console.log(\"base_player.js | offIdle\")\n },\n\n onPlaying: function () {\n $el.addClass(\"has-song-version playing\")\n self.$playButton.attr(\"data-action\", \"pause\")\n },\n onPaused: function () {\n $el.removeClass(\"playing\")\n self.$playButton.attr(\"data-action\", \"play\")\n },\n }\n\n self.on(\"history\", function (payload) {\n var data = payload.data.reverse()\n if (payload.wipe) {\n self.queue = data\n return (self.pointer = 0)\n }\n // grab the current song version\n var songVersion = self.queue[self.pointer]\n self.queue = data.concat(self.queue)\n\n // find the song versions position in the altered queue\n self.pointer = self.queue.indexOf(songVersion)\n })\n\n self.on(\"pause\", self.pause)\n self.on(\"play\", function (payload) {\n var data\n playlistType = (payload && payload.type) || \"\"\n if (_.isObject(payload) && _.has(payload, \"songVersions\") && !_.has(payload, \"pointer\")) {\n data = payload.songVersions\n } else if (playlistType === \"search round\") {\n data = payload.songVersion\n } else {\n data = payload\n }\n self.play(data, false)\n })\n\n self.on(\"favorite\", (payload) => {\n if (!_songVersion) {\n return\n }\n\n const { songVersionId, request } = payload\n var $favoriteText = $(\n '.add-favorite .label, .connect-label:contains(\"Favorites\")',\n \"[data-song-version-id=\" + songVersionId + \"]\"\n )\n var $favoriteConnectText = $(\n \".mm-connect-right .connected\",\n \"[data-song-version-id=\" + songVersionId + \"]\"\n )\n\n if (songVersionId != _songVersion.data.id) {\n return\n }\n\n if (request == \"add\") {\n self.$favoriteIcon.addClass(\"selected\")\n\n $favoriteConnectText.text(\"Remove Favorite\")\n $favoriteText.text(\"Remove Favorite\")\n } else if (request == \"remove\") {\n self.$favoriteIcon.removeClass(\"selected\")\n\n $favoriteConnectText.text(\"Add To Favorites\")\n $favoriteText.text(\"Add To Favorites\")\n }\n })\n\n mm.user.on(\"logged_in\", function () {\n permitActions(\"show\")\n })\n\n mm.user.on(\"logged_out\", function () {\n permitActions(\"hide\")\n })\n\n return self\n}\n","import $ from \"jquery\"\nwindow.jQuery = $\nwindow.$ = $\n\nimport \"jquery-ui/ui/widgets/sortable\"\n\nmm.DrawerMixtapesPage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #mixtapes\")),\n $form = $(\"form\", self.$el),\n $links,\n $list,\n $mixtapes,\n $name = $(\"input[type=text]\", $form),\n $description = $('textarea[name=\"description\"]', $form),\n $privacy = $(\"input#privacy\", $form),\n $submit = $(\"button\", $form),\n submitting = false,\n $spinTarg = $(\"button\", $form).parent(\"div\"),\n _spinner = new mm.Spinner()\n\n function build() {\n $mixtapes = $(\"li[data-mixtape-id]\", self.$el)\n $list = $(\".list ul\", self.$el)\n $links = $mixtapes.find(\"a.title\")\n\n $form = $(\"form\", self.$el)\n\n $links.on(\"click\", function (e) {\n e.preventDefault()\n mm.drawerProxy.trigger(\"close\")\n })\n\n $mixtapes.each(function () {\n var id = $(this).data(\"mixtape-id\")\n if (typeof mm.user.mixtapes.find_by(\"id\", id) === \"undefined\") {\n var mixtape = mm.Mixtape()\n mixtape.attributes.id = id\n mm.user.mixtapes.add(mixtape)\n }\n })\n\n $(\".no-mixtapes a\").click(function (e) {\n e.preventDefault()\n mm.drawer.trigger(\"close\")\n })\n\n if ($mixtapes.length > 1) {\n $list.sortable({\n handle: \"[data-action=drag]\",\n axis: \"y\",\n start: sortStart,\n stop: sortStop,\n update: sortUpdate,\n })\n } else {\n $mixtapes.addClass(\"no-sort\")\n }\n\n if ($form.length) {\n buildForm()\n }\n\n mm.facade.trigger(\"bypass\")\n return self\n }\n\n function buildForm() {\n $name = $(\"input[type=text]\", $form)\n $description = $('textarea[name=\"description\"]', $form)\n $privacy = $(\"input#privacy\", $form)\n $submit = $(\"button\", $form)\n $form.on(\"submit\", onSubmit)\n $submit.attr(\"disabled\", true)\n $privacy.removeAttr(\"checked\")\n $name.blur().val(\"\")\n\n $(\"label .icon.secret\", $form).addClass(\"hidden\")\n\n $privacy.off(\"change\").on(\"change\", function (e) {\n var choice = $(this).is(\":checked\") ? \"public\" : \"secret\"\n $(\"> label\", $form).removeClass(\"hidden\")\n $(\"> label.\" + choice, $form).addClass(\"hidden\")\n\n $(\"label .icon\", $form).removeClass(\"hidden\")\n $(\"label .icon.\" + choice, $form).addClass(\"hidden\")\n })\n\n $name.on(\"keyup keydown\", function (e) {\n if (this.value !== \"\") {\n $submit.removeAttr(\"disabled\")\n } else {\n $submit.attr(\"disabled\", true)\n }\n })\n }\n\n function onFailure(e) {\n console.error(e)\n }\n\n function onSubmit(e) {\n e.preventDefault()\n if (submitting) return\n submitting = true\n mm.drawer.spin(true)\n if ($name.val() === \"\") return false\n var mixtape,\n data = {\n name: $name.val(),\n description: $description.val(),\n secret: $privacy.is(\":checked\"),\n }\n\n $name.off(\"keyup keydown\")\n mixtape = mm.Mixtape(data)\n _spinner.spin($spinTarg[0])\n $(\"input\", $form).attr(\"disabled\", true)\n $form.addClass(\"processing\")\n mm.user.mixtapes.add(mixtape)\n mixtape.create().done(onSuccess).fail(onFailure)\n }\n\n function onSuccess(data) {\n submitting = false\n _spinner.stop()\n $(\"input\", $form).removeAttr(\"disabled\")\n $form.removeClass(\"processing\")\n rerender(\"full\")\n }\n\n function rerender(style) {\n style = style || \"list\"\n $.ajax({\n method: \"POST\",\n url: \"/mixtapes/user\",\n data: { style: style },\n success: function (data) {\n mm.drawer.spin(false)\n if (style === \"list\") {\n $(\".list\", self.$el).html(data)\n } else if (style === \"full\") {\n self.$el.find(\".root\").html(data)\n self.resize()\n }\n build()\n },\n })\n }\n\n function sortStart(e, ui) {\n ui.item.addClass(\"dragging\")\n }\n\n function sortStop(e, ui) {\n ui.item.removeClass(\"dragging\")\n }\n\n function sortUpdate(e, ui) {\n var index = ui.item.index() + 1,\n id = parseInt(ui.item.attr(\"data-mixtape-id\"), 10),\n mixtape = mm.user.mixtapes.find_by(\"id\", id)\n mixtape.update({ position: index }, true)\n ui.item.removeClass(\"dragging\")\n build()\n }\n\n var superShow = self.show\n self.show = function () {\n rerender(\"full\")\n superShow()\n }\n\n return build()\n}\n","import $ from \"jquery\"\nwindow.jQuery = $\nwindow.$ = $\n\nimport \"jquery-ui/ui/widgets/sortable\"\n\nmm.DrawerProjectSearchesPage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #project-searches\")),\n $form,\n $links,\n $list,\n $remove,\n $projectSearches,\n $searchSearchBar,\n $noResults,\n $name = $(\"input[type=text]\", $form),\n $description = $('textarea[name=\"description\"]', $form),\n $submit = $(\"button\", $form),\n $viewMoreSearches,\n submitting = false,\n $spinTarg = $(\"button\", $form).parent(\"div\"),\n _limit = 10,\n _spinner = new mm.Spinner()\n\n function build() {\n $projectSearches = $(\"li[data-project-search-id]\", self.$el)\n $links = $projectSearches.find(\"a.title\")\n $list = $(\".list ul\", self.$el)\n $remove = $(\".remove\", self.$el)\n $form = $(\"form#create-project-search\", self.$el)\n $viewMoreSearches = $(\"button.view-more-searches\", self.$el)\n\n $links.on(\"click\", function (e) {\n e.preventDefault()\n mm.drawerProxy.trigger(\"close\")\n })\n\n $projectSearches.each(function () {\n var id = $(this).data(\"project-search-id\")\n if (typeof mm.user.project_searches.find_by(\"id\", id) === \"undefined\") {\n var projectSearch = mm.ProjectSearch()\n projectSearch.attributes.id = id\n mm.user.project_searches.add(projectSearch)\n }\n })\n\n $(\".no-project-searches a\").click(function (e) {\n e.preventDefault()\n mm.drawer.trigger(\"close\")\n })\n\n $remove.on(\"click\", function (e) {\n e.preventDefault()\n e.stopPropagation()\n var searchItem = $(this).closest(\"li.button-box\")\n var id = searchItem.data(\"project-search-id\")\n searchItem.hide()\n removeProjectSearch(id)\n })\n\n if ($projectSearches.length > 1) {\n $list.sortable({\n handle: \"[data-action=drag]\",\n axis: \"y\",\n start: sortStart,\n stop: sortStop,\n update: sortUpdate,\n })\n } else {\n $projectSearches.addClass(\"no-sort\")\n }\n\n if ($form.length) {\n buildForm()\n buildSearchBar()\n }\n\n $viewMoreSearches.off(\"click\")\n $viewMoreSearches.click((e) => {\n e.preventDefault()\n _limit += 10\n rerender()\n })\n\n mm.facade.trigger(\"bypass\")\n return self\n }\n\n function buildForm() {\n $name = $(\"input[type=text]\", $form)\n $description = $('textarea[name=\"description\"]', $form)\n $submit = $(\"button\", $form)\n $form.on(\"submit\", onSubmit)\n $submit.attr(\"disabled\", true)\n $name.blur().val(\"\")\n $name.on(\"keyup keydown input propertychange\", function () {\n if (this.value !== \"\") {\n $submit.removeAttr(\"disabled\")\n } else {\n $submit.attr(\"disabled\", true)\n }\n })\n }\n\n function buildSearchBar() {\n $searchSearchBar = $(\"input.search-search-bar\", self.$el)\n $noResults = $(\"div.no-results\", self.$el)\n\n $searchSearchBar.on(\"keyup keydown\", function () {\n if (this.value === \"\") $noResults.removeClass(\"show\")\n })\n\n var autocomplete = function () {\n $searchSearchBar\n .autocomplete({\n minLength: 1,\n delay: 600,\n source: function (request, response) {\n return $.ajax({\n url: \"/api/v1/project_searches/autocomplete\",\n dataType: \"json\",\n data: {\n term: request.term,\n },\n success: function (data) {\n $noResults.width($searchSearchBar.width()).removeClass(\"show\")\n if (data.length > 0) {\n return response(data)\n } else {\n $noResults.addClass(\"show\")\n }\n },\n })\n },\n select: function (event, ui) {\n event.preventDefault()\n $(this).val(ui.item.label)\n addToDrawer(ui.item.value)\n },\n })\n .data(\"ui-autocomplete\")._renderItem = function (ul, item) {\n ul.addClass(\"project-search-select-options\")\n\n return $(\"
  • \")\n .data(\"item.autocomplete\", item)\n .append(\"\" + item.label + \"\")\n .attr(\"title\", item.label.length > 30 ? item.label : \"\")\n .appendTo(ul)\n }\n }\n\n autocomplete()\n }\n\n function onFailure(e) {\n console.error(e)\n }\n\n function addToDrawer(id) {\n $.ajax({\n url: \"/api/v1/project_searches/add_to_drawer\",\n type: \"POST\",\n data: { id: id },\n success: function () {\n $searchSearchBar.val(\"\")\n rerender()\n },\n })\n }\n\n function removeProjectSearch(id) {\n $.ajax({\n url: \"/api/v1/project_searches/remove_from_drawer\",\n type: \"POST\",\n data: { id: id },\n success: function (data) {\n return data\n },\n })\n }\n\n function onSubmit(e) {\n e.preventDefault()\n if (submitting) return\n submitting = true\n mm.drawer.spin(true)\n if ($name.val() === \"\") return false\n\n var data = {\n name: $name.val(),\n description: $description.val(),\n }\n\n $name.off(\"keyup keydown\")\n var projectSearch = mm.ProjectSearch(data)\n _spinner.spin($spinTarg[0])\n $(\"input\", $form).attr(\"disabled\", true)\n $form.addClass(\"processing\")\n mm.user.project_searches.add(projectSearch)\n projectSearch.create().done(onSuccess).fail(onFailure)\n }\n\n function onSuccess(response) {\n submitting = false\n _spinner.stop()\n $(\"input\", $form).removeAttr(\"disabled\")\n $form.removeClass(\"processing\")\n\n // a successful response is an HTML partial as a string\n if (typeof response === \"string\") {\n rerender(\"full\")\n } else {\n var errorsLength = response.errors.length\n for (var i = 0; i < errorsLength; i++) {\n $(\"
    \" + response.errors[i] + \"
    \")\n .appendTo($(\".search.errors\"))\n .delay(4000)\n .queue(function () {\n $(this).remove()\n })\n }\n mm.drawer.spin(false)\n }\n }\n\n function rerender(style) {\n if (!self.$el.hasClass(\"showing\")) _limit = 10\n style = style || \"list\"\n $.ajax({\n url: \"/api/v1/project_searches/user\",\n data: { style: style, limit: _limit },\n success: function (data) {\n mm.drawer.spin(false)\n var dataHTML = $(data)\n if (style === \"list\") {\n $(\".list\", self.$el).html(data)\n } else if (style === \"full\") {\n self.$el.find(\".root\").html(data)\n self.resize()\n }\n if ($(\"li\", dataHTML).length < _limit)\n $(\"button.view-more-searches\", self.$el).addClass(\"hide\")\n build()\n },\n })\n }\n\n function sortStart(e, ui) {\n ui.item.addClass(\"dragging\")\n }\n\n function sortStop(e, ui) {\n ui.item.removeClass(\"dragging\")\n }\n\n function sortUpdate(e, ui) {\n var index = ui.item.index() + 1,\n id = parseInt(ui.item.attr(\"data-project-search-id\"), 10),\n project_search = mm.user.project_searches.find_by(\"id\", id)\n project_search.update({ position: index }, true)\n ui.item.removeClass(\"dragging\")\n build()\n }\n\n var superShow = self.show\n self.show = function () {\n rerender(\"full\")\n superShow()\n }\n\n return build()\n}\n","/**\n * MixtapeCollection object\n * @public\n * @extends {mm.Collection}\n * @return {Object} Instance of mm.MixtapeCollection\n */\nmm.MixtapeCollection = function () {\n return mm.Collection({ url: \"/mixtapes\" })\n}\n","/**\n * ProjectSearchCollection object\n * @public\n * @extends {mm.Collection}\n * @return {Object} Instance of mm.ProjectSearchCollection\n */\nmm.ProjectSearchCollection = function () {\n return mm.Collection({ url: \"/project_searches\" })\n}\n","/**\n * Base asynchronous image\n * @public\n * @param {Object} spec Object containing initializing props\n * @return {Object} An instance of mm.AsyncImage\n */\nmm.AsyncImage = function (spec) {\n \"use strict\"\n\n // define public defaults\n var _defaults = {\n el: undefined,\n url: undefined,\n }\n\n // merge default with spec\n spec = _.extend(_defaults, spec || {})\n\n // copy properties to self\n var self = _.extend({}, spec, Backbone.Events),\n _img = new Image()\n\n /**\n * Initializer\n * @return {Object} self\n */\n function init() {\n _img.onload = function () {\n self.trigger(\"loaded\", _img)\n _img.onload = null\n _img = null\n }\n return self\n }\n\n /**\n * Simply sets the img src and begins callback sequence\n * @public\n * @return {Object} self\n */\n self.load = function () {\n self.on(\"loaded\", self.loaded)\n _img.src = self.url\n }\n\n /**\n * Called when the image is loaded, to be overwritten\n * @public\n * @param {Image} img The loaded image\n */\n self.loaded = function (img) {}\n\n return init()\n}\n","/**\n * Collection object\n * @public\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.Collection\n */\nmm.Collection = function (spec) {\n // copy properties to self\n var self = _.extend(\n {\n list: {},\n },\n mm.EventEmitter(),\n spec\n )\n\n /**\n * Add an object to the collection\n * @param {Object} object Object to be added\n * @return {mm.Collection} Self\n */\n self.add = function (object) {\n self.list[object.id] = object\n object.on(\"save change update\", self.touch)\n object.on(\"destroy\", function (payload) {\n self.remove(this, true)\n self.touch(payload)\n })\n return self\n }\n\n /**\n * Remove an object from the collection\n * @param {Object} object Object to be removed\n * @param {Boolean} skip_fetch Flag if the collection should poll the server for new data\n * @return {mm.Collection} Self\n */\n self.remove = function (object, skip_fetch) {\n self.list[object.id].off(\"save change\")\n delete self.list[object.id]\n if (!skip_fetch) self.fetch()\n return self\n }\n\n /**\n * Find a collection item by a key/value pair\n * @param {String} key Key to search on (name, id, etc)\n * @param {Object} value Value to search on\n * @return {mm.Model} Matching model\n */\n self.find_by = function (key, value) {\n for (var id in self.list) {\n var item = self.list[id]\n if (item.attributes[key] === value) return item\n }\n }\n\n /**\n * Find all collection items that match a key/value pair\n * @param {String} key Key to search on (name, id, etc)\n * @param {Object} value Value to search on\n * @return {Array} Array of matching models\n */\n self.find_all_by = function (key, value) {\n var ret = []\n for (var id in self.list) {\n var item = self.list[id]\n if (item.attributes[key] === value) ret.push(item)\n }\n return ret\n }\n\n /**\n * Remove all objects from the collection\n * @return {mm.Collection} Self\n */\n self.removeAll = function () {\n for (var id in self.list) {\n self.remove(self.list[id])\n }\n self.touch(\"\")\n return self\n }\n\n /**\n * Fetch the collection from the server\n * @return {$.Deffered} jQuery deferred object\n */\n self.fetch = function () {\n if (self.url) {\n return $.get(self.url).done(function (data) {\n self.touch(data)\n })\n }\n throw new Error(\"A URL must be set on the collection in order to fetch.\")\n }\n\n /**\n * Trigger change event\n * @return {mm.Collection} Self\n */\n self.touch = function (payload) {\n if (typeof payload === \"undefined\") {\n self.fetch()\n } else {\n self.trigger(\"change\", payload)\n }\n return self\n }\n\n return self\n}\n","/**\n * Base drawer page object that contains shared functionality for drawer views.\n * @public\n * @constructor Functional\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.DrawerPage\n */\nmm.DrawerPage = function ($el) {\n var self = mm.EventEmitter()\n\n /**\n * Hides the nested view, sets nested prop to false\n * @private\n * @param {Object} e Click event object\n */\n self.hideNested = function (e) {\n if (e) e.preventDefault()\n $el.removeClass(\"left\")\n self.$back.removeClass(\"available\")\n self.nested = false\n self.resize()\n resetForms($el)\n }\n\n /**\n * Called on transitionend, removes transitionend event binding\n * @private\n */\n function onShowEnd() {\n $el[0].removeEventListener(\"transitionend\", onShowEnd)\n self.resize()\n }\n\n /**\n * resets forms and submit button text, requires $el for scope\n * @param {[type]} $el [description]\n * @return {[type]} [description]\n */\n function resetForms($el) {\n var $forms = $el.find(\".nested form, .root form\")\n if ($forms.length > 0) {\n $forms.each(function () {\n var $form = $(this)\n $form.get(0).reset()\n $form.find(\".error, .errors\").hide()\n $form.find(\"[data-default-text]\").each(function () {\n var $button = $(this)\n $button.html($button.data(\"default-text\"))\n })\n })\n }\n }\n\n /**\n * This drawer page's context\n * @type {Element} Jquery Object\n */\n self.$el = $el\n\n /**\n * Drawer back button\n * @type {Element} Jquery Object\n */\n self.$back = $(\"#mm-drawer .back\")\n\n /**\n * Internal links that route to internal (nested) views\n * @type {Element} Jquery Object, collection\n */\n self.$nestLinks = $(\".nest\", $el)\n\n /**\n * The unique identifier of this drawer page\n * @type {String}\n */\n self.id = self.$el.attr(\"id\")\n\n /**\n * Flag to check if current Drawer Page is nested\n * @type {Boolean}\n */\n self.nested = false\n\n /**\n * Called on transitionend, removes some bindings/classes and checks to see\n * if we are to reset the nested view back to its original position.\n * @public\n * @return {Object} This instance of mm.DrawerPage\n */\n self.cleanup = function () {\n $el.removeClass(\"hiding\")\n self.$nestLinks.off(\"click\")\n if (self.nested) {\n self.hideNested()\n }\n $el[0].removeEventListener(\"transitionend\", self.cleanup)\n return self\n }\n\n /**\n * Hides the page and resets the nested views\n * @public\n * @return {Object} This instance of mm.DrawerPage\n */\n self.hide = function () {\n $el[0].addEventListener(\"transitionend\", self.cleanup)\n $el.addClass(\"hiding\").removeClass(\"showing share-mixtape\")\n return self\n }\n\n /**\n * Resizes the current drawer based on content\n */\n self.resize = function () {\n var h\n\n if ($el.hasClass(\"left\")) {\n h = $(\".nested\", $el).first().outerHeight()\n } else {\n h = $(\".root\", $el).first().outerHeight()\n }\n\n $el.height(h).siblings().height(\"\")\n }\n\n /**\n * Resets key variables and bindings, executed everytime self.show is called\n * @public\n * @return {Object} This instance of mm.DrawerPage\n */\n self.rebuild = function () {\n self.$back.on(\"click\", self.hideNested)\n self.$nestLinks = $(\".nest\", $el)\n self.$nestLinks.on(\"click\", function (e) {\n self.showNested(e, this)\n })\n self.resize()\n return self\n }\n\n /**\n * Show the page\n * @public\n * @return {Object} mm.DrawerPage\n */\n self.show = function () {\n self.rebuild()\n $el[0].addEventListener(\"transitionend\", onShowEnd)\n $el.addClass(\"showing\")\n self.resize()\n\n if (window.isFF) {\n $(\".nested\", $el).each(function () {\n inlineLeft(this)\n })\n }\n\n return self\n }\n\n /**\n * Shows a nested view (slides container over)\n * @public\n * @param {Event} e Click event object\n * @param {Object} that thisArg\n * @return {Object} This instance of mm.DrawerPage\n */\n self.showNested = function (e, that) {\n e.preventDefault()\n self.$back.addClass(\"available\")\n $el.addClass(\"left\")\n self.nested = true\n resetForms($el)\n self.resize()\n $(\".nested\", $el)[0].addEventListener(\"transitionend\", onShowEnd)\n return self\n }\n\n function inlineLeft(el) {\n var left = $(el).css(\"left\")\n $(el).css({\n left: 0,\n transition: \"none\",\n })\n _.defer(function () {\n $(el).css({ left: left })\n _.defer(function () {\n $(el).css({ left: \"\", transition: \"\" })\n })\n })\n }\n\n mm.drawer.on(\"resize:\" + self.id, self.resize)\n\n return self\n}\n","/**\n * A base object to extend which is evented and statable.\n * @public\n * @constructor Functional\n * @extends {Backbone.Events}\n * @return {Object} An instance of EventEmitter\n */\n\nmm.EventEmitter = function () {\n \"use strict\"\n\n var self = _.extend(\n {\n states: {},\n },\n Backbone.Events\n ),\n _currentState\n\n /**\n * Checks the current state of this instance\n * @param {String} state The state to check against\n * @return {Boolean} The result of comparing states\n */\n self.isState = function (state) {\n return state === _currentState ? true : false\n }\n\n /**\n * Sets the current state of the instance, and checks which callbacks to call\n * @public\n * @param {String} state The new state to apply to this instance\n */\n self.setState = function (state) {\n var offCallback,\n onCallback,\n newState = state,\n args = Array.prototype.slice.call(arguments, 1)\n\n if (newState !== _currentState) {\n onCallback =\n self.states[\n \"on\" +\n newState.replace(/^\\w/, function (s) {\n return s.toUpperCase()\n })\n ]\n if (typeof _currentState !== \"undefined\") {\n offCallback =\n self.states[\n \"off\" +\n _currentState.replace(/^\\w/, function (s) {\n return s.toUpperCase()\n })\n ]\n }\n _currentState = newState\n if (typeof onCallback !== \"undefined\") {\n onCallback.apply(self, args)\n }\n if (typeof offCallback !== \"undefined\") {\n offCallback.apply()\n }\n }\n }\n\n return self\n}\n","/**\n * String formatter\n * @public\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.format\n */\nmm.format = (function () {\n var self = mm.EventEmitter()\n\n /**\n * Converts a number to USD\n * @param {Number} number Number convert\n * @return {String} Number as currency\n */\n self.numberToCurrency = function (number) {\n var num = Number(number)\n return num.toLocaleString(\"en-US\", { style: \"currency\", currency: \"USD\" })\n }\n\n return self\n})()\n","/**\n * Base model object\n * @public\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.Model\n */\nmm.Model = function (spec, defaults) {\n // copy properties to self\n var self = _.extend(\n {\n attributes: spec || {},\n id: _.uniqueId(\"m\"),\n },\n mm.EventEmitter(),\n defaults\n )\n\n /**\n * Returns an attribute value\n * @param {string} key Name of the attribute (id, name, etc)\n * @return {object} Value of object\n */\n self.get = function (key) {\n return self.attributes[key]\n }\n\n /**\n * Sets an attribute value\n * @param {string} key Name of the attribute (id, name, etc)\n * @return {mm.Model} Self\n */\n self.set = function (key, value) {\n self.attributes[key] = value\n self.touch()\n return self\n }\n\n /**\n * Save the object to the server\n * @return {$.Deffered} jQuery deferred object\n */\n self.create = function (skip_render) {\n if (self.create_url) {\n var params = {}\n if (self.name) {\n params[self.name] = self.attributes\n } else {\n params = self.attributes\n }\n\n return $.post(self.create_url, params).done(function (data) {\n _.extend(self.attributes, data)\n if (!skip_render) {\n self.trigger(\"save\", data)\n }\n })\n }\n throw new Error(\"A URL must be set on the model in order to save.\")\n }\n\n /**\n * Save the object to the server\n * @return {$.Deffered} jQuery deferred object\n */\n self.update = function (updates, skip_render) {\n if (self.update_url) {\n var url = self.update_url + \"/\" + self.attributes.id.toString(),\n params = {}\n if (self.name) {\n params[self.name] = updates\n } else {\n params = updates\n }\n\n return $.ajax({\n url: url,\n data: params,\n type: \"PUT\",\n }).done(function (data) {\n _.extend(self.attributes, data)\n if (!skip_render) {\n self.trigger(\"update\", data)\n }\n })\n }\n throw new Error(\"A URL must be set on the model in order to save.\")\n }\n\n /**\n * Save the object to the server\n * @return {$.Deffered} jQuery deferred object\n */\n self.destroy = function (skip_render) {\n if (self.url) {\n var url = self.url + \"/\" + self.attributes.id.toString()\n return $.ajax({\n url: url,\n type: \"DELETE\",\n }).done(function (data) {\n if (!skip_render) {\n self.trigger(\"destroy\", data)\n }\n })\n }\n throw new Error(\"A URL must be set on the model in order to destroy.\")\n }\n\n /**\n * Trigger change event\n * @return {mm.Model} Self\n */\n self.touch = function (payload) {\n self.trigger(\"change\", payload)\n return self\n }\n\n return self\n}\n","/**\n * Base page object that contains shared functionality, such as offloading\n * data.\n * @public\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.Page\n */\nmm.Page = function () {\n var self = mm.EventEmitter()\n\n /**\n * This is a page specific (ps) namespace where properties/methods are\n * stored that require 'offloading' when its route is no longer current.\n * This is a general cleanup measure to make sure undefined methods and props\n * are not called upon.\n * @type {Object}\n */\n self.ps = {} // page specific namespace that require offloading\n\n /**\n * This method loops through the ps object and deletes all keys stored in it.\n * It is called on each routing event. See marmoset_music.js\n * @public\n */\n self.offLoad = function () {\n for (var key in self.ps) {\n delete self.ps[key]\n }\n }\n\n return self\n}\n",";(function () {\n /**\n * A throttled class for binding logic to the resize event of a given DOM\n * element\n * @constructor\n * @singleton\n * @param= {Element} el The DOM element to listen on\n */\n function Resizer(el) {\n if (typeof Resizer.instance === \"object\") {\n return Resizer.instance\n }\n\n var self = this\n this._el = el || window\n this._calls = []\n this.lastKnown = {\n w: this._el.innerWidth,\n h: this._el.innerHeight,\n }\n this._ticking = false\n\n this.resize = Resizer.prototype.resize.bind(this)\n this._update = Resizer.prototype._update.bind(this)\n\n this._el.addEventListener(\"resize\", this.resize, false)\n\n if (window.matchMedia(\"(pointer: coarse)\").matches) {\n var orientationInt\n this._el.addEventListener(\"orientationchange\", function () {\n clearTimeout(orientationInt)\n var count = 0\n orientationInt = setInterval(function () {\n self.resize()\n count += 1\n if (count === 6) {\n clearTimeout(orientationInt)\n }\n }, 500)\n self.resize()\n })\n }\n\n Resizer.instance = this\n }\n\n /**\n * Debouncer for resize event, uses requestAnimationFrame to access frame for\n * update\n * @private\n * @return {Boolean} Toggles this._ticking to true\n */\n Resizer.prototype._request_tick = function () {\n if (!this._ticking) {\n window.requestAnimationFrame(this._update)\n }\n return (this._ticking = true)\n }\n\n /**\n * Internal update method; loops through all attached functions and executes\n * them on the throttled resize event.\n * @this {Resizer}\n * @private\n */\n Resizer.prototype._update = function () {\n var i = 0,\n current = this._lastKnown,\n len = this._calls.length\n this._ticking = false\n for (i; i < len; i += 1) {\n this._calls[i](current)\n }\n }\n\n /**\n * Registers a function to be called on the throttled resize event to the\n * this._calls array\n * @public\n * @param {Function} func The function to be added\n * @return {Resizer}\n */\n Resizer.prototype.attach = function (func) {\n if (typeof func !== \"function\") {\n throw {\n name: \"Invalid Argument\",\n message: \"Resizer's attach method requires a function argument.\",\n }\n }\n if (this.exists(func)) {\n return false\n }\n this._calls.push(func)\n return this\n }\n\n /**\n * Removes an attached function from the this._calls array\n * @public\n * @param {Function} func The function to be removed\n * @return {Boolean} Successful/Failure to remove\n */\n Resizer.prototype.detach = function (func) {\n if (typeof func !== \"function\") {\n throw {\n name: \"Invalid Argument\",\n message: \"Resizer's detach method requires a function argument.\",\n }\n }\n var index = this._calls.indexOf(func)\n if (index < 0) {\n return false\n }\n this._calls.splice(index, 1)\n return true\n }\n\n /**\n * Checks to see if a function is attached to the resizer\n * @public\n * @param {Function} func The function to check for\n * @return {Boolean} If if was found or not\n */\n Resizer.prototype.exists = function (func) {\n if (typeof func !== \"function\") {\n throw {\n name: \"Invalid Argument\",\n message: \"Resizer's exists method requires a function argument.\",\n }\n }\n return this._calls.indexOf(func) >= 0\n }\n\n /**\n * The resize event handler\n * @public\n * @this {Resizer}\n */\n Resizer.prototype.resize = function () {\n var self = this\n this._lastKnown = {\n w: self._el.innerWidth,\n h: self._el.innerHeight,\n }\n this._request_tick()\n }\n\n mm.resizer = new Resizer()\n})()\n",";(function () {\n /**\n * A throttled class for binding logic to the scroll event on a given DOM\n * element\n * @constructor\n * @singleton\n * @param= {Element} el The DOM element to listen on\n */\n function Scroller(el) {\n if (typeof Scroller.instance === \"object\") {\n return Scroller.instance\n }\n\n this._el = el || window\n this._calls = []\n this._lastKnown = this._el.scrollTop\n this._ticking = false\n\n // Bind certain methods to Scroller\n this.scroll = Scroller.prototype.scroll.bind(this)\n this._update = Scroller.prototype._update.bind(this)\n\n this._el.addEventListener(\"scroll\", this.scroll, false)\n\n Scroller.instance = this\n }\n\n /**\n * Debouncer for scroll event, uses requestAnimationFrame to access frame for\n * update\n * @private\n * @return {Boolean} Toggles this._ticking to true\n */\n Scroller.prototype._request_tick = function () {\n if (!this._ticking) {\n window.requestAnimationFrame(this._update)\n }\n return (this._ticking = true)\n }\n\n /**\n * Internal update method; loops through all attached functions and executes\n * them on the throttled scroll event.\n * @this {Scroller}\n * @private\n */\n Scroller.prototype._update = function () {\n var i = 0,\n current = this._lastKnown,\n len = this._calls.length\n this._ticking = false\n for (i; i < len; i += 1) {\n this._calls[i](current)\n }\n }\n\n /**\n * Registers a function to be called on the throttled scroll event to the\n * this._calls array\n * @public\n * @param {Function} func The function to be added\n * @return {Scroller}\n */\n Scroller.prototype.attach = function (func) {\n if (typeof func !== \"function\") {\n throw {\n name: \"Invalid Argument\",\n message: \"Scroller's attach method requires a function argument.\",\n }\n }\n if (this.exists(func)) {\n return false\n }\n this._calls.push(func)\n return this\n }\n\n /**\n * Removes an attached function from the this._calls array\n * @public\n * @param {Function} func The function to be removed\n * @return {Boolean} Successful/Failure to remove\n */\n Scroller.prototype.detach = function (func) {\n if (typeof func !== \"function\") {\n throw {\n name: \"Invalid Argument\",\n message: \"Scroller's detach method requires a function argument.\",\n }\n }\n var index = this._calls.indexOf(func)\n if (index < 0) {\n return false\n }\n this._calls.splice(index, 1)\n return true\n }\n\n /**\n * Checks to see if a function is attached to the scroller\n * @public\n * @param {Function} func The function to check for\n * @return {Boolean} If it was found or not\n */\n Scroller.prototype.exists = function (func) {\n if (typeof func !== \"function\") {\n throw {\n name: \"Invalid Argument\",\n message: \"Scroller's exists method requires a function argument.\",\n }\n }\n return this._calls.indexOf(func) >= 0\n }\n\n /**\n * The scroll event handler\n * @public\n * @this {Scroller}\n */\n Scroller.prototype.scroll = function () {\n this._lastKnown = this._el.scrollTop\n this._request_tick()\n }\n\n // The public instance of Scroller\n mm.scroller = new Scroller(document.getElementById(\"container\"))\n})()\n","/**\n * Loading spinner.\n * @public\n * @return {Object} Instance of Spinner. See http://fgnass.github.io/spin.js\n */\nmm.Spinner = function (override_opts) {\n var opts = _.extend(\n {\n lines: 9, // The number of lines to draw\n length: 0, // The length of each line\n width: 4, // The line thickness\n radius: 7, // The radius of the inner circle\n corners: 1, // Corner roundness (0..1)\n rotate: 0, // The rotation offset\n direction: 1, // 1: clockwise, -1: counterclockwise\n color: \"#000\", // #rgb or #rrggbb\n speed: 1.6, // Rounds per second\n trail: 60, // Afterglow percentage\n shadow: false, // Whether to render a shadow\n hwaccel: false, // Whether to use hardware acceleration\n className: \"spinner\", // The CSS class to assign to the spinner\n zIndex: 2e9, // The z-index (defaults to 2000000000)\n top: \"auto\", // Top position relative to parent in px\n left: \"auto\", // Left position relative to parent in px\n },\n override_opts || {}\n )\n\n return new Spinner(opts)\n}\n",";(function (window, Backbone, mm) {\n \"use strict\"\n // all navigatable routes\n var _routes = {\n \"\": \"home\",\n \"account/history\": \"history\",\n \"account/history/:id\": \"historyDetail\",\n \"about/artists\": \"artists\",\n \"artists/:slug\": \"artist\",\n collaborations: \"collaborations\",\n \"collaborations/artist-collabs\": \"artistCollabs\",\n \"collaborations/artist-residency-house\": \"artistResidency\",\n \"collaborations/label-partnerships\": \"labelPartnerships\",\n \"collaborations/anthology\": \"anthology\",\n contact: \"contact\",\n \"about/careers\": \"careers\",\n \"draft/:id\": \"prismicDraft\",\n preview: \"prismicPreview\",\n prismic_test: \"prismicTest\",\n prismic_dev_test: \"prismicDevTest\",\n prismic_dev_test_home: \"prismicDevTestHome\",\n favorites: \"favorites\",\n fervorVinyl: \"fervorVinyl\",\n help: \"help\",\n legal: \"legal\",\n \"license-agreement\": \"licenseAgreement\",\n \"licensing/custom-request\": \"customRequest\",\n mixtapes: \"mixtapes\",\n \"mixtapes/:id\": \"mixtape\",\n \"mixtapes/user\": \"userMixtapes\",\n \"project_searches/:id\": \"projectSearch\",\n \"project_searches/user\": \"userProjectSearches\",\n \"click_order/:id/login\": \"orderLogin\",\n \"click_order/:id\": \"order\",\n \"order/:encrypted_id/receipt/:type\": \"receipt\",\n \"what-we-do\": \"whatWeDo\",\n \"about/team\": \"team\",\n \"about/purpose\": \"purpose\",\n \"about/giving-back\": \"givingBack\",\n \"music-licensing\": \"musicLicensing\",\n \"music-licensing/podcast-license\": \"podcastLicense\",\n \"music-licensing/reel-license\": \"reelLicense\",\n \"music-licensing/wedding-license\": \"weddingLicense\",\n browse: songVersionsOrSongVersionsBeta(),\n \"browse/:id\": \"songVersion\",\n \"browse?*path\": songVersionsOrSongVersionsBeta(),\n \"browse-beta\": \"songVersionsBeta\",\n \"browse-beta?*path\": \"songVersionsBeta\",\n \"versions/:id\": \"song\",\n \"promos/:promo\": \"promos\",\n studio: \"studio\",\n work: \"ourWork\",\n submissions: \"submissions\",\n \"users/:id\": \"userAccount\",\n \"*not_found\": \"not_found\",\n },\n _settings = {\n routes: _routes,\n home: function () {\n getPageData(\"home\", \"/\")\n },\n artists: function () {\n getPageData(\"artists\", \"/about/artists\")\n },\n history: function () {\n getPageData(\"history\", \"/account/history\")\n },\n historyDetail: function (id) {\n getPageData(\"historyDetail\", \"/account/history/\" + id)\n },\n artist: function (slug) {\n getPageData(\"artist\", \"/artists/\" + slug)\n },\n collaborations: function () {\n getPageData(\"collaborations\", \"/collaborations\")\n },\n artistCollabs: function () {\n getPageData(\"artistCollabs\", \"/collaborations/artist-collabs\")\n },\n artistResidency: function () {\n getPageData(\"artistResidency\", \"/collaborations/artist-residency-house\")\n },\n labelPartnerships: function () {\n getPageData(\"labelPartnerships\", \"/collaborations/label-partnerships\")\n },\n anthology: function () {\n getPageData(\"anthology\", \"/collaborations/anthology\")\n },\n contact: function () {\n getPageData(\"contact\", \"/contact\")\n },\n careers: function () {\n getPageData(\"careers\", \"/about/careers\")\n },\n prismicDraft: function (id) {\n getPageData(\"prismicDraft\", \"/draft/\" + id)\n },\n prismicPreview: function () {\n getPageData(\"prismicPreview\", \"/preview\")\n },\n prismicTest: function () {\n getPageData(\"prismicTest\", \"/prismic_test\")\n },\n prismicDevTest: function () {\n getPageData(\"prismicDevTest\", \"/prismic_dev_test\")\n },\n prismicDevTestHome: function () {\n getPageData(\"prismicDevTestHome\", \"/prismic_dev_test_home\")\n },\n favorites: function () {\n getPageData(\"favorites\", \"/favorites\")\n },\n fervorVinyl: function () {\n getPageData(\"fervorVinyl\", \"/fervormidcenturysounds\")\n },\n help: function () {\n getPageData(\"help\", \"/help\")\n },\n legal: function () {\n getPageData(\"legal\", \"/legal\")\n },\n licenseAgreement: function () {\n getPageData(\"licenseAgreement\", \"/license-agreement\")\n },\n customRequest: function () {\n getPageData(\"customRequest\", \"/licensing/custom-request\")\n mm.drawer.trigger(\"close\")\n },\n mixtapes: function () {\n getPageData(\"mixtapes\", \"/mixtapes\")\n },\n mixtape: function (id) {\n getPageData(\"mixtape\", \"/mixtapes/\" + id)\n },\n userMixtapes: function () {\n getPageData(\"userMixtapes\", \"/mixtapes/user\")\n },\n musicLicensing: function () {\n getPageData(\"musicLicensing\", \"/music-licensing\")\n },\n podcastLicense: function () {\n getPageData(\"podcastLicense\", \"/music-licensing/podcast-license\")\n },\n reelLicense: function () {\n getPageData(\"reelLicense\", \"/music-licensing/reel-license\")\n },\n weddingLicense: function () {\n getPageData(\"weddingLicense\", \"/music-licensing/wedding-license\")\n },\n projectSearch: function (id) {\n getPageData(\"projectSearch\", \"/project_searches/\" + id)\n },\n userProjectSearches: function () {\n getPageData(\"userProjectSearches\", \"/project_searches/user\")\n },\n order: function (id) {\n getPageData(\"order\", \"/click_order/\" + id)\n },\n orderLogin: function (id) {\n getPageData(\"order\", \"/click_order/\" + id + \"/login\")\n },\n ourWork: function () {\n getPageData(\"ourWork\", \"/work\")\n },\n receipt: function (encrypted_id, type) {\n getPageData(\"receipt\", \"/order/\" + encrypted_id + \"/receipt/\" + type)\n },\n whatWeDo: function () {\n getPageData(\"whatWeDo\", \"/what-we-do\")\n },\n purpose: function () {\n getPageData(\"purpose\", \"/about/purpose\")\n },\n givingBack: function () {\n getPageData(\"givingBack\", \"/about/giving-back\")\n },\n submissions: function () {\n getPageData(\"submissions\", \"/submissions\")\n },\n studio: function () {\n getPageData(\"studio\", \"/studio\")\n },\n team: function () {\n getPageData(\"team\", \"/about/team\")\n },\n song: function (id) {\n getPageData(\"song\", \"/versions/\" + id)\n },\n songVersions: function () {\n getPageData(\"songVersions\", \"/browse\" + location.search)\n },\n songVersionsBeta: function () {\n getPageData(\"songVersionsBeta\", \"/browse\" + location.search)\n },\n songVersion: function (id) {\n getPageData(\"songVersion\", \"/browse/\" + id)\n },\n promos: function (promo) {\n getPageData(\"promos\", \"/promos/\" + promo)\n },\n userAccount: function (id) {\n getPageData(\"userAccount\", \"/users/\" + id)\n },\n not_found: function () {\n getPageData(\"not_found\", \"/*not_found\")\n },\n },\n _currentRoute,\n _spinner = new mm.Spinner({ color: \"#FFF\" }),\n _silence = mm.hasHistory,\n _hash = location.hash,\n _path = location.pathname,\n $container,\n $content\n\n /**\n * App initializer, to be called last\n */\n mm.init = function () {\n $container = $(\"#container\")\n $content = $(\"#content\", $container)\n\n setCSRF()\n\n // Instantiate the application router\n var _router = Backbone.Router.extend(_settings)\n mm.router = new _router()\n\n // Bypass all internal routes\n bypassNavigation()\n\n /**\n * Start Backbone history with pushState enabled, the silent option\n * ensures it is not fired on initial page load, this is different for\n * browsers that do not utilize pushstate, as the hash needs to be read on\n * load for deep linking.\n */\n if (!_silence && !_hash.length && _path.length > 1) {\n _silence = true\n }\n\n Backbone.history.start({\n pushState: true,\n silent: _silence,\n })\n\n updateRoute()\n\n setCurrent()\n\n bindEvents()\n\n removeTextNodes()\n\n mm.resizer.attach(resize)\n mm.resizer.resize()\n handlePortalLink()\n adjustForAnnouncement()\n\n mm.facade.trigger(\"app:ready\")\n }\n\n function isInternalUser() {\n return [\"admin\", \"business_affairs\", \"staff\", \"marketing\", \"a_and_r\"].includes(\n mm.user.attributes.role\n )\n ? true\n : false\n }\n\n function songVersionsOrSongVersionsBeta() {\n return \"songVersionsBeta\"\n }\n\n function setCSRF() {\n mm.csrf = $('meta[name=\"csrf-token\"]').attr(\"content\")\n $.ajaxSetup({\n beforeSend: function (xhr) {\n xhr.setRequestHeader(\"X-CSRF-Token\", mm.csrf)\n },\n })\n }\n\n function removeTextNodes() {\n $(\"body\")\n .contents()\n .filter(function () {\n return this.nodeType == Node.TEXT_NODE\n })\n .remove()\n }\n\n function handlePortalLink() {\n var $link = $(\".dashboard-link\")\n if ($link.hasClass(\"available\")) {\n if (mm.user.attributes.role === \"vendor\") {\n $link.text(\"Artist Portal\")\n } else {\n $link.text(\"Portal\")\n }\n }\n }\n\n /**\n * Handles a backbone page refresh, useful for login/logout\n * @private\n */\n function backboneRefresh() {\n if (Backbone.history.fragment === _currentRoute.fragment) {\n Backbone.history.fragment = null\n mm.router.navigate(_currentRoute.fragment, {\n trigger: true,\n replace: true,\n })\n }\n }\n\n /**\n * A function to enclose all event binding\n * @private\n */\n function bindEvents() {\n /**\n * functionality to open newsletter in overlay\n */\n $(\"[data-prevent-default]\").on(\"hover click\", function (e) {\n e.preventDefault()\n })\n\n $(\"[data-marmoset-newsletter]\").on(\"click\", function (e) {\n e.preventDefault()\n if (mm.drawer.pushed) {\n mm.drawerProxy.trigger(\"close\")\n } else {\n mm.drawerProxy.trigger(\"subscribe\")\n }\n return false\n })\n\n /**\n * footer socials tracking, passthrough anchors\n * @param {[type]} e [description]\n * @return {[type]} [description]\n */\n $(\".social ol li a\", \"footer[role='main']\").on(\"click\", function (e) {\n var $anchor = $(this)\n var $item = $anchor.closest(\"li\")\n var social\n\n if ($item.hasClass(\"facebook\")) {\n social = \"Facebook\"\n } else if ($item.hasClass(\"vimeo\")) {\n social = \"Vimeo\"\n } else if ($item.hasClass(\"instagram\")) {\n social = \"Instagram\"\n } else if ($item.hasClass(\"twitter\")) {\n social = \"Twitter\"\n }\n })\n }\n\n function ajaxURL(url) {\n if (/\\?/.test(url)) {\n url += \"&_ajax=1\"\n } else {\n url += \"?_ajax=1\"\n }\n return url\n }\n\n /**\n * Handle all navigation links to use Backbone history router\n * in favor of default functionality\n * @private\n */\n function bypassNavigation() {\n $('a[data-bypass=\"true\"]').on(\"click\", function (e) {\n if (e.metaKey || e.ctrlKey) return\n let href = $(this).attr(\"href\")\n // checking for local links - resolve server-rendering issue\n if (href && href[0] === \"/\") {\n e.preventDefault()\n mm.router.navigate(href, { trigger: true })\n }\n })\n\n $(\"[data-prevent-default]\").on(\"hover click\", function (e) {\n e.preventDefault()\n })\n }\n\n function getPageData(router, url) {\n if (typeof router === \"undefined\" || typeof url === \"undefined\") {\n mm.router.navigate(\"not_found\", { trigger: true })\n }\n\n // Prevent reloading and reinitializing Browse Beta upon history changes within page, i.e. back navigation\n if (\n router === \"songVersionsBeta\" &&\n (_currentRoute.path === \"browse-beta\" || _currentRoute.path === \"browse\")\n ) {\n return\n }\n\n url = ajaxURL(url)\n\n showLoading()\n $.get(url)\n .done(function (data) {\n fbq(\"track\", \"ViewContent\")\n routeSuccess(router, data)\n })\n .fail(function (xhr, status, err) {\n routeFailure(router, xhr, status, err)\n })\n .always(function (data) {\n routeAlways(router, data)\n })\n }\n\n function routeAlways(router, data) {\n hideLoading()\n setCurrent()\n bypassNavigation()\n }\n\n function routeFailure(router, xhr, status, err) {\n console.error(\"Error retreiving page data: \" + err)\n }\n\n function routeSuccess(router, data) {\n var pageScript = router + \"Page\",\n currentScript = _routes[_currentRoute.path] + \"Page\"\n\n // offLoad not being fired for nested routes that do not match\n // a route defined in _routes so this is a map for those cases\n var segmented = _currentRoute.path.split(\"/\")\n if (segmented.length > 1) {\n var route = segmented[0].toLowerCase()\n var inflection\n\n // segmented route map, mapped to object name of page object\n switch (route) {\n case \"artists\":\n inflection = \"artist\"\n break\n case \"mixtapes\":\n inflection = \"mixtape\"\n break\n default:\n break\n }\n\n if (inflection) {\n currentScript = inflection + \"Page\"\n }\n }\n\n $content.html(data)\n\n // Handle page cleanup and page initialization\n if (mm[pageScript] && mm[pageScript].init) {\n if (mm[currentScript] && mm[currentScript].offLoad) {\n mm[currentScript].offLoad()\n }\n mm[pageScript].init()\n }\n\n // store the current route\n updateRoute()\n\n // scope the container for css\n $container.attr(\"data-section\", router)\n\n updatePageTitle($(data).data(\"title\") || $(data)[2]?.dataset?.[\"title\"] || \"\")\n\n mm.CoverImage.loadAll()\n\n $container.scrollTop(0)\n\n if (mm.isMobile) {\n $(\"body\").scrollTop(0)\n }\n\n // builds necessary css to transition sync with multiple elements\n mm.drawer._buildCSS()\n\n adjustForAnnouncement()\n }\n\n /**\n * Updates the page title\n * @param {String} page Title for page (Shown after prefix)\n */\n function updatePageTitle(page) {\n var title = \"Marmoset\"\n if (page != \"\") {\n title = `${page} | ${title}`\n }\n $(\"head > title\").html(title)\n }\n\n function resize(current) {\n if (current.w > 767) {\n $(document.body).attr(\"data-device\", \"desktop\")\n if (mm.isMobile) {\n mm.facade.trigger(\"desktop\")\n }\n mm.isMobile = false\n } else {\n $(document.body).attr(\"data-device\", \"mobile\")\n removeTextNodes()\n if (!mm.isMobile) {\n mm.facade.trigger(\"mobile\")\n }\n mm.isMobile = true\n }\n mm.drawer.trigger(\"calc\")\n mm.drawer._buildCSS()\n if (!mm.isMobile) mm.desktopPlayer.resize()\n }\n\n /**\n * Shows the loading spinner\n * @private\n */\n function showLoading() {\n var loading = $(\"#mm-drawer-nav li.loading\")\n if (!$(\"#mm-drawer-nav nav\").hasClass(\"new-drawer-nav\")) {\n var spinner = _spinner.spin()\n $(\"div\", loading).append(spinner.el)\n $(spinner.el).css({ left: 24, top: 24 })\n if (mm.isMobile) {\n mm.spin(true)\n }\n } else {\n $(\".m-spinner div\", loading).addClass(\"play\")\n }\n loading.removeClass(\"hidden\")\n }\n\n /**\n * Hides the loading spinner\n * @private\n */\n function hideLoading() {\n var loading = $(\"#mm-drawer-nav li.loading\")\n if (!$(\"#mm-drawer-nav nav\").hasClass(\"new-drawer-nav\")) {\n _spinner.stop()\n if (mm.isMobile) {\n mm.spin(false)\n }\n } else {\n $(\".m-spinner div\", loading).removeClass(\"play\")\n }\n loading.addClass(\"hidden\")\n }\n\n /**\n * Replaces current html content with the newly retrieved content from the\n * server response.\n * @private\n * @param {String} data The server responseText\n */\n function replaceContent(data) {\n $(\"#content\").html(data)\n // handle any bypass links that may have been added to DOM\n bypassNavigation()\n }\n\n /**\n * Makes the main navigation current based on route fragment\n */\n function setCurrent() {\n var nav = $('nav[role=\"main\"]')\n $(\"a\", nav).removeClass(\"current\")\n $('a[href=\"/' + _currentRoute.path + '\"]').addClass(\"current\")\n }\n\n function spin(spin) {\n var spinTarg = $(\".global-spin\")\n //var anchor = $('a.player', spinTarg);\n\n if (spin) {\n _spinner.spin(spinTarg[0])\n //anchor.css('opacity', 0.1);\n } else {\n _spinner.stop()\n //anchor.css('opacity', 1);\n }\n }\n\n /**\n * Recusively update TWEEN on rAF\n * @private\n */\n\n /**\n * Updates _currentRoute object\n * @private\n */\n function updateRoute() {\n _currentRoute = {\n fragment: Backbone.history.fragment,\n path: Backbone.history.location.pathname.replace(/^\\//, \"\"),\n }\n }\n\n /**\n * Adds or removes classes to adjust header position if Announcement Banner is present at top of page\n */\n function adjustForAnnouncement() {\n if ($(\"#mm-home-new\").length) {\n if ($(\"#mm-home-new\").children().first().hasClass(\"announcementBanner\")) {\n $(\"header.new-header\").addClass(\"announcement\")\n $(\"#mm-drawer-nav\").addClass(\"announcement\")\n }\n } else {\n if ($(\"header.new-header\").hasClass(\"announcement\")) {\n $(\"header.new-header\").removeClass(\"announcement\")\n $(\"#mm-drawer-nav\").removeClass(\"announcement\")\n }\n }\n }\n\n mm.facade.on(\"bypass\", bypassNavigation)\n mm.facade.on(\"refresh\", backboneRefresh)\n mm.facade.on(\"route:update\", updateRoute)\n\n mm.spin = spin\n\n // Last! initialize marmoset\n $(document).ready(mm.init)\n})(window, Backbone, mm)\n","/**\n * Mixtape object\n * @public\n * @extends {mm.Model}\n * @return {Object} Instance of mm.Mixtape\n */\nmm.Mixtape = function (spec) {\n return mm.Model(spec, {\n name: \"mixtape\",\n create_url: \"/mixtapes\",\n update_url: \"/mixtapes\",\n })\n}\n","/**\n * ProjectSearch object\n * @public\n * @extends {mm.Model}\n * @return {Object} Instance of mm.ProjectSearch\n */\nmm.ProjectSearch = function (spec) {\n return mm.Model(spec, {\n name: \"project_search\",\n create_url: \"/api/v1/project_searches/create\",\n update_url: \"/api/v1/project_searches/sort\",\n })\n}\n","/**\n * Cart, can also be accessed through mm.user.cart\n * @constructor Functional\n * @extends {mm.EventEmitter}\n * @public\n * @return {Object} mm.cart Singleton\n */\nmm.cart = (function () {\n var self = mm.EventEmitter()\n\n /**\n * The order object obtained from the server, populated by self.hydrate\n * @type {Object}\n */\n self.order = {}\n\n /**\n * Sets self.order with order JSON data from the server\n * @public\n * @param {Function} callback Optional callback\n * @return {Object} mm.cart\n */\n self.hydrate = function (callback) {\n $.get(\"/cart-status\")\n .done(function (data) {\n self.order = data\n mm.facade.on(\"app:ready\", function () {\n mm.user.trigger(\"update\")\n })\n if (typeof mm.user !== \"undefined\") {\n mm.user.trigger(\"update\")\n }\n if (typeof callback === \"function\") callback()\n if ($(\"#mm-drawer-nav nav\").hasClass(\"new-drawer-nav\")) {\n if (data.line_items < 1) {\n $(\"#mm-drawer-nav li.cart\").addClass(\"hidden\")\n } else {\n $(\"#mm-drawer-nav li.cart\").removeClass(\"hidden\")\n }\n }\n return self.order\n })\n .fail(function (data) {\n console.error(data)\n })\n return self\n }\n\n return self.hydrate()\n})()\n","/**\n * Image object that async loads images into nodes with proper data attributes\n * @public\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.CoverImage\n */\nmm.CoverImage = (function (spec) {\n \"use strict\"\n\n // merge default with spec\n spec = spec || {}\n\n // copy properties to self\n var self = _.extend({}, spec, Backbone.Events)\n\n /**\n * Initializer\n * @return {Object} self\n */\n function init() {\n return self.loadAll()\n return self\n }\n\n /**\n * Loads any cover-images inside the given elements\n * @param {Selector} els Elements to search through\n * @return {CoverImage} Self\n */\n self.load = function (els) {\n _.each(els, function (el, index, list) {\n var $el = $(el),\n loader = mm.AsyncImage({\n el: $el[0],\n url: $el.data(\"cover-image\"),\n })\n\n loader.loaded = function (img) {\n $el\n .css({\n background: \"url(\" + img.src + \") no-repeat center center\",\n backgroundSize: \"cover\",\n })\n .addClass(\"async-loaded\")\n\n $el.attr(\"data-cover-image-cached\", \"true\")\n }\n\n loader.load()\n })\n return self\n }\n\n /**\n * Loads all non-cached cover-images on a page\n * @return {CoverImage} Self\n */\n self.loadAll = function () {\n var loadees = $(\"[data-cover-image]\").not('[data-cover-image-cached=\"true\"]')\n self.load(loadees)\n return self\n }\n\n return init()\n})()\n","/**\n * Base object for all drawer forms that interact with a user that require\n * error/success handlers.\n * @constructor\n * @extends {mm.EventEmitter}\n * @public\n * @param {$.Element} $el The containing element\n * @param {Object} options Form initializer object\n * @return {Object} A new instance of mm.DrawerForm\n */\nmm.DrawerForm = function ($el, options) {\n \"use strict\"\n\n if (typeof $el === \"undefined\") return\n\n options =\n options ||\n _.extend(\n {},\n {\n url: null,\n type: \"GET\",\n empty: true,\n }\n )\n\n var self = mm.EventEmitter()\n\n /**\n * Initializer, binds the submit event to this form's self.submit method.\n * @private\n * @return {Object} This instance of mm.DrawerForm\n */\n function init() {\n self.$form.off(\"submit\").on(\"submit\", self.submit)\n return self\n }\n\n /**\n * The containing element that wraps successes, errors, form, inputs, submits\n * @type {$.Element}\n */\n self.$el = $el\n\n /**\n * The form element\n * @type {$.Element}\n */\n self.$form = $(\"form\", $el)\n\n /**\n * Elements to hide after success\n * @type {$.Element}\n */\n self.$hides = $(\".form-hide\", $el)\n\n /**\n * The inputs of this form\n * @type {$.Element}\n */\n self.$inputs = $(\"input\", self.$form).add($(\"textarea\", self.$form))\n\n /**\n * The submit element (button)\n * @type {$.Element}\n */\n self.$submit = $(\"[type=submit]\", $el)\n\n /**\n * The error message container\n * @type {$.Element}\n */\n self.$errors = $(\".errors\", $el)\n\n /**\n * The success message container\n * @type {$.Element}\n */\n self.$success = $(\".success\", $el)\n\n /**\n * The options for this form; url, type, payload etc\n * @type {Object}\n */\n self.options = options\n\n /**\n * The scope applied to our parameters, or more specifically, the model we are\n * posting against. (see self.buildPayload)\n * @type {String}\n */\n self.scope = self.$form.attr(\"data-scope\")\n\n /**\n * New instance of mm.Spinner\n * @type {mm.Spinner}\n */\n self.spinner = new mm.Spinner()\n\n /**\n * The target container for the spinner\n * @type {Element}\n */\n self.spinTarg = self.$submit.parent(\"div\")[0]\n\n /**\n * Targets the Custom request form inputs\n *\n */\n if (self.$form.length > 1) {\n if (self.$form.get(0).closest('div[data-license-targ=\"custom\"]')) {\n var $customInputs = $(\"input\", self.$form[0]).add($(\"textarea\", self.$form[0]))\n }\n }\n\n /**\n * Builds the payload object to be sent with the request from the form inputs\n * @public\n * @return {Object} The payload\n */\n self.buildPayload = function () {\n var params = {},\n payload = {}\n self.$inputs.each(function (i, input) {\n var name = input.getAttribute(\"name\")\n params[name] = input.value\n })\n if (self.scope === \"none\") {\n payload = params\n } else {\n payload[self.scope] = params\n }\n return payload\n }\n\n /**\n * This method is always called after a response is received from the server,\n * regardless of success. Maps to jQuery always promise.\n * @public\n * @param {Object} data The response\n * @return {Object} This instance of mm.DrawerForm\n */\n self.complete = function (data) {\n self.spin(false)\n return self\n }\n\n /**\n * This method parses the returned error(s) and displays them in the errors\n * message container\n * @public\n * @param {Array} errors The list of errors, always assumed to be Array\n * @return {Object} This instance of mm.DrawerForm\n */\n self.handleErrors = function (response, forceEmpty) {\n var lastError\n if (options.empty || forceEmpty) {\n self.$errors.empty()\n }\n\n self.$inputs.removeClass(\"invalid\")\n for (var key in response.errors) {\n var errs = response.errors[key]\n self.$inputs.filter('[name=\"' + key + '\"]').addClass(\"invalid\")\n _.each(errs, function (err) {\n var error\n key = key.replace(\"_\", \" \")\n key = key.charAt(0).toUpperCase() + key.slice(1)\n error = key + \" \" + err\n if (error !== lastError) {\n self.$errors.append($(\"
    \").text(error))\n }\n lastError = error\n })\n }\n if (self.$el.selector.includes(\"#subscribe\")) {\n self.$errors.empty()\n self.$errors.append($(\"
    \").text(response.message))\n }\n self.$errors.addClass(\"display\")\n mm.drawer.trigger(\"resize:\" + self.$el.closest(\"article\").attr(\"id\"))\n return self\n }\n\n /**\n * This methods handles a server error and should then punt this message to\n * self.handleErrors\n * @public\n * @param {Object} data Server response message\n * @return {Object} This instance of mm.DrawerForm\n */\n self.handleFail = function (response) {\n self.handleErrors({ all: [\"An error has occurred. Please try again later.\"] }, true)\n self.trigger(\"form:failure\")\n return self\n }\n\n /**\n * This method handles a successful response, errors could exist. There is no\n * need to display a message generated from a server, only to replace form\n * content with the success message. (should already exist in markup)\n * @public\n * @return {Object} This instance of mm.DrawerForm\n */\n self.handleSuccess = function (response) {\n if (!response.success) return self.handleErrors(response)\n if (options.empty) {\n self.$errors.empty()\n }\n self.$errors.removeClass(\"display\")\n self.$inputs.removeClass(\"invalid\")\n self.$success.addClass(\"display\")\n self.$hides.addClass(\"hide\")\n self.$form.addClass(\"success\")\n self.trigger(\"form:success\")\n return self\n }\n\n /**\n * This method is used to reset the form to its original state and should be\n * called on drawer close.\n * @public\n * @return {Object} This instance of mm.DrawerForm\n */\n self.reset = function () {\n if (options.empty) {\n self.$errors.empty()\n }\n self.$errors.removeClass(\"display\")\n if (mm.isMobile) {\n self.$inputs.removeClass(\"invalid\")\n } else {\n self.$inputs.removeClass(\"invalid\").first().focus()\n }\n self.$success.removeClass(\"display\")\n self.$hides.removeClass(\"hide\")\n self.$form.removeClass(\"success\")\n if (self.$form[0]) self.$form[0].reset()\n if (self.$el.closest(\"article\").is(\"#register\"))\n self.$form.find(\"button\").prop(\"disabled\", true)\n return self\n }\n\n /**\n * Method to show that the form is being processed.\n * @public\n * @param {Boolean} spin Show/Hide spinner\n */\n self.spin = function (spin) {\n if (spin) {\n self.$el.addClass(\"processing\")\n self.$inputs.attr(\"disabled\", true)\n self.$submit.attr(\"disabled\", true)\n self.spinner.spin(self.spinTarg)\n mm.drawer.spin(true)\n } else {\n self.$el.removeClass(\"processing\")\n self.$inputs.removeAttr(\"disabled\")\n self.$submit.removeAttr(\"disabled\")\n self.spinner.stop()\n mm.drawer.spin(false)\n }\n }\n\n /**\n * This method is the 'submit' event handler for this form\n * @public\n * @return {Object} This instance of mm.DrawerForm\n */\n self.submit = function (e) {\n e.preventDefault()\n\n if ($(this).attr(\"id\") === \"custom-submission\") {\n self.$inputs = $customInputs\n }\n\n var payload = self.buildPayload()\n\n self.spin(true)\n $.ajax({\n url: self.options.url,\n type: self.options.type,\n data: payload,\n })\n .done(self.handleSuccess)\n .fail(self.handleFail)\n .always(self.complete)\n return self\n }\n\n return init()\n}\n","mm.ProfileForm = function (context, catchSubmit) {\n \"use strict\"\n\n if (typeof context === \"undefined\") return\n\n if (typeof catchSubmit === \"undefined\") {\n catchSubmit = true\n }\n\n var form = context.find(\"form\")\n\n var self = {},\n $button = $(\"button[type=submit]\", form),\n $country = $(\"select#user_address_attributes_country\", form),\n $errors = $(\"#edit-errors\", context),\n $job = $(\"input#user_job\", form),\n $other = $(\"input#job_other\", form),\n $radios = $(\"ul li a\", form),\n $select = $(\"select\", form),\n $spinTarg = $button.parent(\"div\"),\n $success = $(\"#edit-success\", context),\n _countryVal = $country.find(\":selected\").text(),\n _opts = [],\n _selectable,\n _spinner = new mm.Spinner()\n\n function init() {\n $(\"option\", $select).each(function (i, option) {\n if ($(option).attr(\"disabled\")) return\n var opt = { text: option.value, data: option.value }\n _opts.push(opt)\n })\n\n _selectable = mm.Selectable($select, _opts)\n var superSelected = _selectable.selected\n _selectable.selected = function (opt) {\n superSelected(opt)\n form.find(\"select#user_address_attributes_country\").val(opt.value)\n }\n\n $radios.on(\"click\", function (e) {\n e.preventDefault()\n var radio = $(this),\n val = radio.attr(\"data-value\")\n $radios.removeClass(\"active\")\n radio.addClass(\"active\")\n if (val === \"Other\") {\n $job.attr(\"disabled\", true)\n $other.attr(\"disabled\", false)\n $other[0].focus()\n } else {\n $other.attr(\"disabled\", true).val(\"\")\n $job.attr(\"disabled\", false).val(val)\n }\n })\n\n if ($job.val()) {\n var radio = $radios.filter('[data-value=\"' + $job.val() + '\"]')\n if (radio.length) {\n radio.addClass(\"active\")\n } else {\n $radios.filter('[data-value=\"Other\"]').addClass(\"active\")\n $other.attr(\"disabled\", false).val($job.val())\n $job.attr(\"disabled\", true)\n }\n }\n\n if (_countryVal) {\n var opt = { html: _countryVal, value: _countryVal }\n _selectable.selected(opt)\n }\n\n if (catchSubmit) {\n form.on(\"submit\", onSubmit)\n }\n return self\n }\n\n function disable() {\n form.addClass(\"processing\")\n $button.prop(\"disabled\", true)\n _spinner.spin($spinTarg[0])\n }\n\n function enable() {\n form.removeClass(\"processing\")\n $button.prop(\"disabled\", false)\n _spinner.stop()\n }\n\n function onSubmit(e) {\n e.preventDefault()\n var _data = form.serialize()\n disable()\n $errors.add($success).html(\"\")\n $(\"input\", form).removeClass(\"invalid\")\n $.post(\"/account/update\", _data)\n .done(function (data) {\n if (data.success && data.message) {\n $success.append($(\"

    \").text(data.message))\n } else {\n handleErrors(data)\n }\n })\n .fail(handleErrors)\n .always(enable)\n return false\n }\n\n function handleErrors(response) {\n var lastError\n for (var key in response.errors) {\n var errs = response.errors[key]\n $('input[name=\"user[' + key + ']\"]', form).addClass(\"invalid\")\n _.each(errs, function (err) {\n var error\n key = key.replace(\"_\", \" \")\n key = key.charAt(0).toUpperCase() + key.slice(1)\n error = key + \" \" + err\n if (error !== lastError) {\n $errors.append($(\"

    \").text(error))\n }\n lastError = error\n })\n }\n }\n\n return init()\n}\n","mm.HoverConnect = function ($el, context) {\n \"use strict\"\n\n if ($el === undefined || context === undefined) return\n\n var self = {},\n _connect = $el.data(\"connect\"),\n _text = $el.data(\"connect-text\"),\n $targ = $(\".mm-connect-\" + _connect, context),\n $temp = $(\"

    \").addClass(\"connect-label\").html(_text),\n _log = false\n\n function init() {\n if (_log) console.log(\"Hover Connect | mm.HoverConnect | self.init()\")\n $targ.append($temp)\n return self\n }\n\n $el.on(\"mouseover\", function (e) {\n $temp.addClass(\"connected\")\n toggleHiddenRow(e, true)\n })\n\n $el.on(\"mouseleave\", function (e) {\n $temp.removeClass(\"connected\")\n toggleHiddenRow(e, false)\n })\n\n function toggleHiddenRow(e, active) {\n var buttonEl = $(e.target.firstElementChild)\n\n if (buttonEl && buttonEl.text() === \"Hide\") {\n var songRowLeft = buttonEl.parents(\".right\").prev()\n var actionButtons = buttonEl.closest(\".show-hide\").siblings(\".action\")\n\n if (active) {\n actionButtons.addClass(\"disabled\")\n songRowLeft.addClass(\"disabled\")\n } else {\n actionButtons.removeClass(\"disabled\")\n songRowLeft.removeClass(\"disabled\")\n }\n }\n }\n\n self.update = function () {\n _text = $el.attr(\"data-connect-text\")\n $temp.html(_text)\n }\n\n self.destroy = function () {\n $el.off(\"mouseover mouseleave\")\n _connect = null\n $targ = null\n }\n\n return init()\n}\n","/**\n * Represents a message to be display to the user via the mm.messageCenter modal\n * @constructor\n * @public\n * @param {String} content The text/html to be displayed within the modal\n * @return {Object} Instance of mm.Message\n */\nmm.Message = function (content) {\n \"use strict\"\n\n // if there is no content to display, exit.\n if (typeof content === \"undefined\") return\n\n var self = {}\n\n /**\n * Publicize the content argument as a jquery object\n * @type {$.Element}\n */\n self.content = $(content)\n\n /**\n * Method to be called after message has been displayed; to be overwritten.\n * @public\n */\n self.callback = function () {}\n\n /**\n * Sends this message to the mm.messageCenter queue, this method must be\n * explicitly called for your message to ever be displayed.\n * @public\n */\n self.send = function () {\n mm.messageCenter.read(self)\n }\n\n return self\n}\n","/**\n * Base custom select drop-down\n * @constructor Functional\n * @public\n * @param {$.Element} $el The select from which to build\n * @param {Array} options A collection of options to parse\n * @return {Object} An instance of mm.Selectable\n */\nmm.Selectable = function ($el, options) {\n \"use strict\"\n\n if (typeof $el === \"undefined\") return\n\n var self = mm.EventEmitter(),\n _options = options || {}\n\n /**\n * This is the pseudo select markup.\n * Contains the prepped string to become an underscore template, should be\n * treated as a private prop; however, it can be overwritten if necessary.\n * @public\n * @type {String}\n */\n self._template =\n '
    ' +\n '' +\n '
    ' +\n '
    ' +\n \"
    \" +\n '
      ' +\n \"<% _.each(options, function (option) { %>\" +\n '
    1. \">' +\n \"<%= option.text %>\" +\n \"<% if (option.alt && option.alt.length) { %>\" +\n \"<%= option.alt %>\" +\n \"<% } %>\" +\n \"
    2. \" +\n \"<% }); %>\" +\n \"
    \" +\n \"
    \"\n\n /**\n * The SELECT element to build from\n * @public\n * @type {$.Element}\n */\n self.$el = $el\n\n /**\n * The compiled template drop-down anchor, assigned in self.build\n * @public\n * @type {$.Element}\n */\n self.$link = undefined\n\n /**\n * The compiled template option elements, assigned in self.build\n * @public\n * @type {$.Element}\n */\n self.$options = undefined\n\n /**\n * The compiled template wrapper, assigned in self.build\n * @public\n * @type {$.Element}\n */\n self.$wrap = undefined\n\n /**\n * Is returned upon initialization, but can also be called to repopulate\n * select options.\n * @public\n * @param {Array} opts Format: [{ text: '', data: '', alt: ''}]\n * @return {Obect} This instance of mm.Selectable\n */\n self.build = function (opts) {\n if (typeof opts !== \"undefined\") {\n _options = opts\n }\n self.template = _.template(self._template, { options: _options })\n $el.after(self.template({ options: _options }))\n self.rebind()\n return self\n }\n\n /**\n * Resets/Rebinds variables with event handlers, called on self.build\n * @public\n */\n self.rebind = function () {\n self.$wrap = $el.next(\".sorter-wrap\")\n self.$link = $(\".sorter-link\", self.$wrap)\n self.$options = $(\".option\", self.$wrap)\n\n self.$link.off(\"click\").on(\"click\", function (e) {\n self.toggle(e, this)\n })\n\n self.$options.off(\"click\").on(\"click\", function (e) {\n self.select(e, this)\n })\n }\n\n /**\n * Event handler for when an option is clicked\n * @public\n * @param {Object} e Click event object\n * @param {Element} that thisArg from click event\n */\n self.select = function (e, that) {\n if (e) {\n e.preventDefault()\n }\n that = $(that)\n var option = {\n html: that.html(),\n value: that.attr(\"data-value\"),\n }\n self.selected(option)\n self.$wrap.removeClass(\"open\")\n }\n\n /**\n * Handle a selected option, sample useage:\n * var superSelected = self.selected;\n * self.selected = function (opt) {\n * superSelected(opt);\n * mm.facade.trigger('youreventname', opt.value);\n * };\n * @public\n * @param {Object} opt The selected objected from self.select\n */\n self.selected = function (opt) {\n self.$options.removeClass(\"selected\")\n $(\".selected-option\", self.$link).html(opt.html)\n self.$options.filter('[data-value=\"' + opt.value + '\"]').addClass(\"selected\")\n var $select = $(\"#order_billing_information_attributes_address_attributes_country\")\n if ($select) $select.prepend($select.children().filter('[value=\"' + opt.value + '\"]'))\n // trigger an event\n self.trigger(\"selected\", opt)\n }\n\n /**\n * Toggles the drop-down open and closed\n * @public\n * @param {Object} e Click event object\n * @param {Element} that thisArg from click event\n */\n self.toggle = function (e, that) {\n e.preventDefault()\n e.stopImmediatePropagation()\n self.$wrap.toggleClass(\"open\")\n if (self.$wrap.hasClass(\"open\")) {\n $(document.body)\n .not(self.$wrap)\n .off(\"click\")\n .on(\"click\", function (evt) {\n evt.stopImmediatePropagation()\n self.$wrap.removeClass(\"open\")\n })\n }\n }\n\n return self.build()\n}\n","mm.Song = function ($el) {\n \"use strict\"\n\n if ($el === undefined) return\n\n var self = mm.EventEmitter(),\n $pill,\n $catalogColor,\n $songVersionBadges,\n $internal = [\"admin\", \"business_affairs\", \"staff\", \"marketing\", \"a_and_r\"]\n\n function init() {\n $catalogColor = $el.data(\"catalog-color\")\n $songVersionBadges = $(\".song-version-badges\", $el)\n\n if (mm.user.attributes && mm.user.attributes.role) {\n var interal_or_ip =\n mm.user.attributes.role === \"international_partner\" ||\n $internal.indexOf(\"mm.user.attributes.role\")\n ? true\n : false\n\n if (interal_or_ip && $catalogColor) {\n applyCatalogColor()\n }\n }\n\n pillOverlap()\n toggleVersions()\n return self\n }\n\n function pillOverlap() {\n var $actionsRight = $(\".right .action\", $el)\n\n $actionsRight.hover(\n function () {\n var $right = $(this).closest($el).find(\".over .right\"),\n $connectRight = $(this).closest($el).find(\".mm-connect-right\"),\n $padding = $(\".connect-label.connected\", $el).width()\n\n $right.css(\"padding-left\", $padding + 45)\n $connectRight.css(\"z-index\", 0)\n },\n function () {\n var $right = $(this).closest($el).find(\".over .right\"),\n $connectRight = $(this).closest($el).find(\".mm-connect-right\")\n\n $right.css(\"padding-left\", 10)\n $connectRight.css(\"z-index\", -1)\n }\n )\n }\n\n function toggleVersions() {\n $pill = $(\".default .song-version-badges mark.versions\", $el)\n\n $pill.on(\"click\", function (e) {\n e.preventDefault()\n var $song = $(this).closest(\".song-item\"),\n $altVersions = $(\".alt-versions\", $song),\n $songVersionPlaying = $(\".playing\", $song),\n hideStyle = {\n visibility: \"hidden\",\n position: \"absolute\",\n zIndex: \"-99999\",\n },\n showStyle = {\n visibility: \"visible\",\n position: \"inherit\",\n zIndex: 1,\n }\n\n if ($song.hasClass(\"expanded\")) {\n $altVersions.css(hideStyle)\n $song.removeClass(\"expanded\")\n if ($songVersionPlaying.length !== 0) $song.addClass(\"playing\") // add styling for song when nested song version is playing\n } else {\n if ($songVersionPlaying.length !== 0) $song.removeClass(\"playing\") // remove styling for song when nested song version is playing\n $altVersions.css(showStyle)\n $song.addClass(\"expanded\")\n }\n })\n }\n\n function hexToOpaqueRgbA(hex) {\n var color\n color = \"0x\" + hex.replace(\"#\", \"\")\n return \"rgba(\" + [(color >> 16) & 255, (color >> 8) & 255, color & 255].join(\",\") + \",0)\"\n }\n\n function catalogSongVersionBadgeBG(hex) {\n var opaqueColor = hexToOpaqueRgbA(hex)\n return [\n \"background-image: -webkit-gradient(linear, 0% 50%, 20 50%, color-stop(0%, \" +\n opaqueColor +\n \"), color-stop(100%, \" +\n hex +\n \"))\",\n \"background-image: -webkit-linear-gradient(to left, \" + opaqueColor + \", \" + hex + \" 20px)\",\n \"background-image: -moz-linear-gradient(to left, \" + opaqueColor + \", \" + hex + \" 20px)\",\n \"background-image: -o-linear-gradient(to left, \" + opaqueColor + \", \" + hex + \" 20px)\",\n \"background-image: linear-gradient(to left, \" + opaqueColor + \", \" + hex + \" 20px)\",\n ].join(\";\")\n }\n\n function applyCatalogColor() {\n $el.css({ background: $catalogColor })\n $songVersionBadges.attr(\"style\", catalogSongVersionBadgeBG($catalogColor))\n }\n\n self.destroy = function () {\n $pill.off(\"click\")\n }\n\n return init()\n}\n","mm.SongVersion = function ($el) {\n \"use strict\"\n\n if ($el === undefined) return\n\n var self = mm.EventEmitter(),\n $actions,\n _hovers = [],\n _paused = false,\n timeoutID,\n $mixtapePage = $el.closest(\"section#mm-mixtape\"),\n $unhiddenBtn = $(\".unhide\", $el),\n $hiddenBtn = $(\".hide\", $el),\n $pastLicensesButton = $(\"div.past-licenses\", $el),\n $rankingInfoButton = $(\"div.ranking-info\", $el),\n $stemsIcon = $(\"div.stems\", $el),\n $actionsMenu = $(\"li.actions-menu\", $el),\n $expandActionsMenu = $(\".expand-actions-menu .vertical-ellipsis\", $el),\n $favoriteIcon = $(\".favorite-icon\", $el),\n $favoriteButton = $(\"li.favorite\", $el),\n $downloadButton = $(\"li.download\", $el),\n $mixtapeButton = $(\"li.mixtape\", $el),\n $projectSearchButton = $(\"li.project-search\", $el),\n $downloadPartialExTooltip = $(\n \"li.actions-menu li.tooltip[data-connect-action='download']\",\n $el\n ),\n $projectSearchPartialExTooltip = $(\n \"li.actions-menu li.tooltip[data-connect-action='project-search']\",\n $el\n ),\n $tooltips = $(\"li.tooltip\", $el),\n $song,\n $catalogColor,\n $removeArchived = $(\".remove-archived-message\", $el),\n $internal = [\"admin\", \"business_affairs\", \"staff\", \"marketing\", \"a_and_r\"]\n\n function init() {\n $catalogColor = $el.data(\"catalog-color\")\n var hovers = $(\".mm-hover-connect\", $el)\n $song = $el.closest(\".song-item\")\n $actions = $(\".action\", $el).not(\".next\").not(\".prev\").not(\".download\")\n\n // redirect to login for guest users\n if (!mm.user.attributes.hasOwnProperty(\"id\")) {\n hydrateGuest()\n hydrateNonInternal(\"guest\")\n } else {\n var loginLink = $(\"li.download a[itemprop='contentUrl']\", $el)\n loginLink.remove()\n\n // hydrate user data\n var interal_or_ip =\n mm.user.attributes.role === \"international_partner\" ||\n $internal.includes(mm.user.attributes.role)\n ? true\n : false\n\n if (interal_or_ip) {\n $pastLicensesButton.removeClass(\"hidden\")\n $rankingInfoButton.removeClass(\"hidden\")\n $stemsIcon.removeClass(\"hidden\")\n\n if ($catalogColor) {\n applyCatalogColor()\n }\n }\n\n hydrateNonInternal(mm.user.attributes.role)\n hydrateHidden(self.data.song_id)\n hydrateFavorite(self.data.id)\n }\n\n $actions.on(\"click\", function (e) {\n var action = $(this).attr(\"data-action\")\n if (action in self) self[action](this)\n })\n\n if ($tooltips.length) {\n $tooltips.each(function (ind, tooltip) {\n var tooltip = $(tooltip)\n var action = tooltip.data(\"connect-action\")\n var ttButton = tooltip.closest(\"ol\").find(\"li.action.\" + action)\n\n ttButton.on(\"mouseover.tooltip\", function () {\n clearTimeout(timeoutID)\n $tooltips.removeClass(\"show\")\n tooltip.addClass(\"show\")\n })\n ttButton.on(\"mouseleave\", function () {\n timeoutID = setTimeout(hideTooltip, 100)\n })\n })\n }\n // adjust position of Partial Exclusivity tooltip depending on where Download action is located in action menu\n if ($downloadPartialExTooltip.length > 0) {\n var $download = $(\"li.download\", $el),\n top = $download.offset().top - $download.parent().offset().top - 10\n\n $downloadPartialExTooltip.css(\"top\", top + \"px\")\n }\n // adjust position of Partial Exclusivity tooltip depending on where Project Search action is located in action menu\n if ($projectSearchPartialExTooltip.parent().length > 0) {\n var $projectSearch = $(\"li.project-search\", $el),\n top = $projectSearch.offset().top - $projectSearch.parent().offset().top - 10\n\n $projectSearchPartialExTooltip.css(\"top\", top + \"px\")\n }\n $expandActionsMenu.off(\"click\")\n $expandActionsMenu.on(\"click\", function () {\n $(this).hasClass(\"expanded\") ? hideActionsMenu() : showActionsMenu()\n })\n if (hovers.length) {\n hovers.each(function (i, hover) {\n _hovers.push(mm.HoverConnect($(hover), $el))\n })\n }\n showModal()\n closeModal()\n return self\n }\n\n function hideActionsMenu() {\n $expandActionsMenu.removeClass(\"expanded\")\n $actionsMenu.removeClass(\"expanded\")\n }\n\n function showActionsMenu() {\n $(\"li.actions-menu\", \"li.song-version-item\").removeClass(\"expanded\")\n $(\".expand-actions-menu .vertical-ellipsis\", \"li.song-version-item\").removeClass(\"expanded\")\n $expandActionsMenu.addClass(\"expanded\")\n $actionsMenu.addClass(\"expanded\")\n }\n\n function showModal() {\n $(\"li.action.add-to-blanket-deal\").on(\"click\", function () {\n $(this).next(\"#mm-select-blanket-order-modal\").removeClass(\"hidden\")\n })\n }\n\n function closeModal() {\n $(document).on(\"click\", \".blanket-order-cancel-button\", function () {\n if (!$(this).closest(\"#mm-select-blanket-order-modal\").hasClass(\"hidden\")) {\n $(this).closest(\"#mm-select-blanket-order-modal\").addClass(\"hidden\")\n }\n })\n }\n\n function hideTooltip() {\n $tooltips.removeClass(\"show\")\n }\n\n function fetchDataForMessagePopUp(route) {\n $.get(route + self.data.id).done(function (data) {\n var msg = mm.Message(data)\n if (msg) {\n msg.send()\n }\n })\n }\n\n function postFavorite(request, songVersionID) {\n if (_.isUndefined(songVersionID)) return false\n var url = \"/favorites/\" + request + \"/song_version/\" + songVersionID\n var songDataAttr = \"[data-song-version-id=\" + songVersionID + \"]\"\n\n $.post(url).done(function () {\n if (request === \"remove\") {\n toggleSongRowFavorite(request, songDataAttr)\n togglePlayerFavorite(request, songDataAttr)\n removeFavorite(songVersionID)\n } else {\n toggleSongRowFavorite(request, songDataAttr)\n togglePlayerFavorite(request, songDataAttr)\n addFavorite()\n }\n mm.user.fetchUserSongs()\n })\n }\n\n function toggleSongRowFavorite(request, songDataAttr) {\n var $songRowfavoriteText = $(\".favorite-text\", songDataAttr)\n var $songShowPageFavoriteText = $(\n '.add-favorite .label, .connect-label:contains(\"Favorite\")',\n songDataAttr\n )\n var $songShowPageFavoriteConnectText = $(\n \".mm-connect-song-version-actions .connected\",\n songDataAttr\n )\n var $songRowFavorited = $(\".default .actions-menu, .favorited\", songDataAttr)\n var $songRowUnfavorited = $(\".default .actions-menu, .unfavorited\", songDataAttr)\n var text = request === \"remove\" ? \"Add To Favorites\" : \"Remove Favorite\"\n\n $songRowfavoriteText.text(text)\n $songShowPageFavoriteText.text(text)\n $songShowPageFavoriteConnectText.text(text)\n $songRowFavorited.toggleClass(\"selected\")\n $songRowUnfavorited.toggleClass(\"hiding\")\n }\n\n function togglePlayerFavorite(request, songDataAttr) {\n var $playerFavoriteIcon = $(\".add-favorite .favorite-icon\", songDataAttr)\n var $playerFavoriteText = $(\n '.add-favorite .label, .connect-label:contains(\"Favorite\")',\n songDataAttr\n )\n var $playerFavoriteConnectText = $(\".mm-connect-right .connected\", songDataAttr)\n\n var text = request === \"remove\" ? \"Add To Favorites\" : \"Remove Favorite\"\n $playerFavoriteText.text(text)\n $playerFavoriteConnectText.text(text)\n $playerFavoriteIcon.toggleClass(\"selected\")\n }\n\n // addFavorites only increcments the number\n // on the heading of the Favorites page\n function addFavorite() {\n if ($(\"#mm-favorites\").length > 0) {\n var favInfo = $(\"li\", \"div.info\"),\n favNum = Number(favInfo.text().replace(/\\D/g, \"\")) + 1\n favNum === 1\n ? favInfo.text(\"You have \" + favNum + \" Favorited Song\")\n : favInfo.text(\"You have \" + favNum + \" Favorited Songs\")\n } else {\n return false\n }\n }\n\n function removeFavorite(songVersionID) {\n var $songVersion = $(\"li[data-song-version-id=\" + songVersionID + \"]\")\n\n if ($(\"#mm-favorites\").length > 0) {\n var favInfo = $(\"li\", \"div.info\"),\n favNum = Number(favInfo.text().replace(/\\D/g, \"\")) - 1\n favNum === 1\n ? favInfo.text(\"You have \" + favNum + \" Favorited Song\")\n : favInfo.text(\"You have \" + favNum + \" Favorited Songs\")\n\n $songVersion.slideUp({ duration: 500, easing: \"easeOutExpo\" })\n } else {\n return false\n }\n }\n\n function hideOrUnhide(request) {\n var hideBtn = $unhiddenBtn.length > 0 ? $unhiddenBtn : $hiddenBtn,\n hideBtnText = $(\"li.show-hide .option-text\", $el),\n hideIcon = $(\"li.show-hide span.hide-icon\", $el),\n unhideIcon = $(\"li.show-hide span.unhide-icon\", $el)\n\n if (request === \"hide\") {\n hideBtn.addClass(\"hide\").removeClass(\"unhide\")\n hideBtnText.text(\"Show\")\n $el.addClass(\"hidden\")\n unhideIcon.addClass(\"hidden\")\n hideIcon.removeClass(\"hidden\")\n } else {\n hideBtn.addClass(\"unhide\").removeClass(\"hide\")\n hideBtnText.text(\"Hide\")\n $el.removeClass(\"hidden\")\n hideIcon.addClass(\"hidden\")\n unhideIcon.removeClass(\"hidden\")\n }\n }\n\n function hydrateHidden(songID) {\n var hideBtn = $(\"li.show-hide\", $el)\n if (\n mm.user.hiddenSongs.hasOwnProperty(songID) &&\n mm.user.hiddenSongs[songID][\"hidden\"] === true\n ) {\n hideOrUnhide(\"hide\")\n }\n }\n\n function hydrateFavorite(id) {\n if (mm.user.favoriteSongVersions.hasOwnProperty(id)) {\n var songDataAttr = \"[data-song-version-id=\" + id + \"]\"\n toggleSongRowFavorite(\"add\", songDataAttr)\n togglePlayerFavorite(\"add\", songDataAttr)\n }\n }\n\n function hydrateNonInternal(role) {\n // if user is not internal, remove project search options and past licenses button\n if ($internal.indexOf(role) < 0) {\n var tooltipWrapper = $projectSearchPartialExTooltip.parent()\n tooltipWrapper.empty()\n tooltipWrapper.remove()\n $projectSearchButton.remove()\n if (self.data.exclusive) {\n var downloadLink = $(\"li.download a#downloadLink\", $el)\n downloadLink.removeAttr(\"href\")\n $downloadButton.addClass(\"disabled\")\n }\n }\n }\n\n function hydrateGuest() {\n $unhiddenBtn.attr(\"data-action\", \"login\")\n $unhiddenBtn.addClass(\"disabled\")\n\n $favoriteButton.attr(\"data-action\", \"login\")\n $favoriteButton.addClass(\"disabled\")\n\n $mixtapeButton.attr(\"data-action\", \"login\")\n $mixtapeButton.addClass(\"disabled\")\n\n $downloadButton.attr(\"data-action\", \"login\")\n $downloadButton.addClass(\"disabled\")\n\n var downloadLink = $(\"li.download a#downloadLink\", $el)\n downloadLink.remove()\n }\n\n function applyCatalogColor() {\n $el.css({ background: $catalogColor })\n }\n\n self.data = JSON.parse($el.attr(\"data-song-version\") || \"{}\")\n\n self.customize = function () {\n mm.drawer.trigger(\"customize\", self.data.id)\n }\n\n self.destroy = function () {\n $actions.off(\"click\")\n if (_hovers.length) {\n _hovers.forEach(function (hover) {\n hover.destroy()\n })\n }\n }\n\n self.license = function (el) {\n sessionStorage.setItem(\"customRequestData\", JSON.stringify(self.data))\n\n if ($(el).hasClass(\"custom-only\")) {\n mm.router.navigate(\"/licensing/custom-request\", { trigger: true })\n } else {\n mm.drawer.trigger(\"cart:add\", self.data)\n }\n }\n\n self.pastLicenses = function () {\n $pastLicensesButton.addClass(\"disabled\")\n fetchDataForMessagePopUp(\"/song_versions/past_licenses/\")\n }\n\n self.lyrics = function () {\n fetchDataForMessagePopUp(\"/song_versions/lyrics/\")\n }\n\n self.favorite = function (e) {\n var request = $favoriteIcon.hasClass(\"selected\") ? \"remove\" : \"add\"\n postFavorite(request, self.data.id)\n }\n\n self.mixtape = function () {\n mm.drawer.trigger(\"mixtape:add\", self.data.id)\n }\n\n self.projectSearch = function () {\n mm.drawer.trigger(\"projectSearch:add\", _.pick(self.data, \"id\", \"song_id\"))\n }\n\n self.hide = function () {\n var hideBtn = $unhiddenBtn.length > 0 ? $unhiddenBtn : $hiddenBtn,\n request = hideBtn.hasClass(\"hide\") ? \"unhide\" : \"hide\"\n\n hideOrUnhide(request)\n\n $.post(\"/song/\" + self.data.song_id + \"/\" + request).done(function (data) {\n if (data.status !== \"success\") {\n if (request === \"hide\") {\n hideBtn.addClass(\"unhide\").removeClass(\"hide\")\n hideBtnText.text(\"Hide\")\n $el.removeClass(\"hidden\")\n } else {\n hideBtn.addClass(\"hide\").removeClass(\"unhide\")\n hideBtnText.text(\"Show\")\n $el.addClass(\"hidden\")\n }\n }\n mm.user.fetchUserSongs()\n })\n }\n\n self.pause = function () {\n _paused = true\n mm.playerProxy.trigger(\"pause\")\n }\n\n self.play = function () {\n if (_paused) {\n mm.playerProxy.trigger(\"play\")\n _paused = false\n } else {\n // if song version is on a mixtape page, load mixtape into player\n if ($mixtapePage.length > 0) {\n var mixtapeData = JSON.parse($mixtapePage.find(\"[data-mixtape]\").attr(\"data-mixtape\"))\n\n mm.playerProxy.trigger(\"play\", {\n pointer: self.data,\n songVersions: mixtapeData.song_versions,\n type: \"mixtape\",\n })\n\n // else just play the song\n } else {\n mm.playerProxy.trigger(\"play\", self.data)\n }\n }\n if ($song.length === 0) {\n $(\".playing\", $el.parent()).removeClass(\"playing\")\n } else {\n $(\".playing\", $song.parent()).removeClass(\"playing\")\n }\n $el.addClass(\"playing\")\n }\n\n self.share = function () {\n $(\"#share\").addClass(\"share-song-version\")\n var data = {\n type: \"song version\",\n id: self.data.id,\n segment: \"browse\",\n api: \"song_versions\",\n songVersion: {\n id: self.data.id,\n name: self.data.display_name,\n artist: self.data.artist.name,\n },\n }\n mm.drawerProxy.trigger(\"share:songVersion\", data)\n }\n\n self.login = function () {\n mm.drawerLoginPage.notify(\n \"You must be logged in to perform this action. Sign in or register below.\"\n )\n mm.drawer.trigger(\"login\")\n }\n\n return init()\n}\n","/**\n * User object\n * @public\n * @extends {mm.EventEmitter}\n * @return {Object} Instance of mm.user (Singleton)\n */\n\nmm.user = (function () {\n \"use strict\"\n\n // copy properties to self\n var self = _.extend(\n {\n cart: mm.cart,\n mixtapes: new mm.MixtapeCollection(),\n project_searches: new mm.ProjectSearchCollection(),\n processes: [],\n attributes: {},\n hiddenSongs: {},\n favoriteSongVersions: {},\n userSongsLoaded: false,\n },\n mm.EventEmitter()\n ),\n _wipe = false\n\n /**\n * Initializer\n * @return {Object} self\n */\n function init() {\n var userdata = $('meta[name=\"marmoset:user\"]').attr(\"content\")\n if (userdata !== \"\") {\n userdata = JSON.parse(userdata)\n setUserData(userdata)\n }\n if (self.userSongsLoaded == false) {\n self.fetchUserSongs()\n }\n mm.facade.on(\"app:ready\", fetchHistory)\n return self\n }\n\n function setAccountNavLink(data) {\n $(\"li.account a\", \"#mm-drawer-nav\").attr(\"href\", `/users/${data.id}`)\n }\n\n function setUserData(data) {\n _.extend(self.attributes, data)\n if (self.attributes.mixtapes) {\n for (var i = 0; i < self.attributes.mixtapes.length; i++) {\n self.mixtapes.add(new mm.Mixtape(self.attributes.mixtapes[i]))\n }\n delete self.attributes.mixtapes\n }\n if (self.attributes.project_searches) {\n for (var i = 0; i < self.attributes.project_searches.length; i++) {\n self.project_searches.add(new mm.ProjectSearch(self.attributes.project_searches[i]))\n }\n delete self.attributes.project_searches\n }\n if (self.attributes.csrfToken) {\n mm.csrf = self.attributes.csrfToken\n }\n }\n\n self.fetchUserSongs = function () {\n var user_id = null\n if (self.attributes.id) {\n user_id = self.attributes.id\n $.ajax({\n async: false,\n url: \"/api/v1/song_versions/get_user_songs\",\n data: { id: user_id },\n success: function (data) {\n setUserSongs(data)\n },\n })\n }\n }\n\n function setUserSongs(data) {\n _.extend(self.attributes, data)\n self.hiddenSongs = data.hiddenSongs\n self.favoriteSongVersions = data.favoriteSongVersions\n self.userSongsLoaded = true\n }\n\n /**\n * Fetch this user's history from the server and trigger a call to the player\n * @private\n * @param {Boolean} wipe Flag to wipe the current player queue\n */\n function fetchHistory(wipe) {\n _wipe = typeof wipe === \"undefined\" ? false : wipe\n $.get(\"/song_versions/history\", { raw: true }).done(function (data) {\n if (Array.isArray(data)) {\n mm.playerProxy.trigger(\"history\", { wipe: _wipe, data: data })\n _wipe = false\n }\n })\n }\n\n function onOrderLoginPage() {\n return /click_order\\/[0-9]*\\/login/.test(Backbone.history.fragment)\n }\n\n /**\n * Determines if the user is logged in\n * @return {Boolean} is the user logged in\n */\n self.isLoggedIn = function () {\n return typeof self.attributes.id !== \"undefined\"\n }\n\n /**\n * Logs user in\n * @param {String} email User email\n * @param {String} password User password\n * @return {$.Deferred} jQuery promise\n */\n self.login = function (email, password, order_id) {\n if (self.isLoggedIn()) {\n var deferred = $.Deferred()\n deferred.resolve(self)\n return deferred.promise()\n }\n\n var data = {\n user: {\n remember_me: 1,\n password: password,\n email: email,\n order_id: order_id,\n },\n }\n\n return $.ajax({\n url: \"/login\",\n type: \"POST\",\n data: data,\n dataType: \"json\",\n success: function (data) {\n setUserData(data)\n setAccountNavLink(data)\n fetchHistory(true)\n self.fetchUserSongs()\n self.trigger(\"logged_in\")\n },\n error: function (xhr, status, err) {},\n })\n }\n\n /**\n * Log user out\n * @return {$.Deferred} jQuery promise\n */\n self.logout = function (callback) {\n if (self.isLoggedIn()) {\n return $.ajax({\n url: \"/logout\",\n type: \"GET\",\n success: function (data) {\n // clear personal data\n self.attributes = {}\n self.mixtapes.removeAll()\n self.project_searches.removeAll()\n self.hiddenSongs = {}\n self.favoriteSongVersions = {}\n fetchHistory(true)\n self.trigger(\"logged_out\")\n\n if (data && data.csrfToken) {\n mm.csrf = data.csrfToken\n }\n if (callback) callback()\n },\n error: function (xhr, status, err) {\n console.error(\"Error logging out user: \", err)\n },\n })\n }\n var deferred = $.Deferred()\n deferred.resolve(self)\n return deferred.promise()\n }\n\n self.on(\"logged_in logged_out\", function () {\n mm.cart.hydrate(function () {\n var lineCount = self.cart.order.line_items.length\n $(\"#mm-drawer-nav .cart .count\").text(lineCount)\n\n if (onOrderLoginPage()) {\n mm.router.navigate(\"/click_order/\" + self.cart.order.id, {\n trigger: true,\n replace: true,\n })\n }\n })\n })\n\n self.on(\"update\", function () {\n var lineCount = self.cart.order.line_items.length\n $(\"#mm-drawer-nav .cart .count\").text(lineCount)\n })\n\n mm.facade.on(\"process:success:mixtape\", function (data, id) {\n id = parseInt(id, 10)\n self.processes.splice(id, 1)\n })\n\n return init()\n})()\n","mm.share = {}\n\n/**\n * Facebook SDK initialize\n * @return {[type]} [description]\n */\nwindow.fbAsyncInit = function () {\n // init the FB JS SDK\n FB.init({\n appId: process.env.FACEBOOK_APP_ID, // App ID from the app dashboard\n //channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel file for x-domain comms\n status: true, // Check Facebook Login status\n xfbml: true, // Look for social plugins on the page\n version: \"v2.8\",\n })\n\n // Additional initialization code such as adding Event Listeners goes here\n}\n\n// Load the SDK asynchronously\n;(function (d, s, id) {\n var js,\n fjs = d.getElementsByTagName(s)[0]\n if (d.getElementById(id)) {\n return\n }\n js = d.createElement(s)\n js.id = id\n js.src = \"//connect.facebook.net/en_US/all.js\"\n fjs.parentNode.insertBefore(js, fjs)\n})(document, \"script\", \"facebook-jssdk\")\n\n/**\n * Twitter intent handling\n * @return {[type]} [description]\n */\nmm.share.twitter = (function () {\n if (window.__twitterIntentHandler) return\n var intentRegex = /twitter\\.com(\\:\\d{2,4})?\\/intent\\/(\\w+)/,\n windowOptions = \"scrollbars=yes,resizable=yes,toolbar=no,location=yes\",\n width = 550,\n height = 420,\n winHeight = screen.height,\n winWidth = screen.width\n\n function handleIntent(e) {\n e = e || window.event\n var target = e.target || e.srcElement,\n m,\n left,\n top\n\n while (target && target.nodeName.toLowerCase() !== \"a\") {\n target = target.parentNode\n }\n\n if (target && target.nodeName.toLowerCase() === \"a\" && target.href) {\n m = target.href.match(intentRegex)\n if (m) {\n left = Math.round(winWidth / 2 - width / 2)\n top = 0\n\n if (winHeight > height) {\n top = Math.round(winHeight / 2 - height / 2)\n }\n\n window.open(\n target.href,\n \"intent\",\n windowOptions + \",width=\" + width + \",height=\" + height + \",left=\" + left + \",top=\" + top\n )\n e.returnValue = false\n e.preventDefault && e.preventDefault()\n }\n }\n }\n\n if (document.addEventListener) {\n document.addEventListener(\"click\", handleIntent, false)\n } else if (document.attachEvent) {\n document.attachEvent(\"onclick\", handleIntent)\n }\n window.__twitterIntentHandler = true\n\n return handleIntent\n})()\n\n/**\n * simple mailto: handler for sharing\n * @return {[type]} [description]\n */\nmm.share.email = (function () {\n function handleEvent(e) {\n window.open(this.href, \"_blank\")\n e.returnValue = false\n e.preventDefault && e.preventDefault()\n }\n\n return handleEvent\n})()\n","mm.desktopPlayer = (function () {\n \"use strict\"\n\n var self = mm.BasePlayer($(\".player.desktop\")),\n $close = $(\".close-history\", self.$el),\n $closeStations = $(\".close-stations\", self.$el),\n $historyButton = $(\".mm-history\", self.$el),\n $historyTarg = $(\".mm-song-versions-table-list\", self.$el),\n $stationsButton = $(\".mm-stations\", self.$el),\n $stationsTarg = $(\".mm-player-stations-list\", self.$el)\n\n function createSongVersions() {\n var songVersions = $(\".song-version-item\", $historyTarg)\n songVersions.each(function (i, songVersion) {\n songVersion = mm.SongVersion($(songVersion))\n })\n }\n\n self.fetchHistory = function () {\n $historyTarg.html(\"\")\n $.get(\"/song_versions/history\", function (data) {\n $historyTarg.html(data)\n createSongVersions()\n })\n }\n\n var superInjectPlaying = self.injectPlaying\n self.injectPlaying = function (songVersion) {\n $(\".mm-connect-right\", self.$el).html(\"\")\n superInjectPlaying(songVersion)\n _.defer(self.resize)\n }\n\n self.resize = function () {\n // Remove oak usage here. Confirm this works.\n if (mm.isMobile) return\n var w = $(\"#container\").outerWidth()\n var offset = self.$scrubber.offset().left\n var actionWidth = self.$actionWrap.outerWidth(true)\n var songDetailsWidth = self.$songVersionDetails.outerWidth(true)\n var songTimeWidth = self.$songVersionTime.outerWidth(true)\n var calculatedWidth = w - offset - actionWidth - songDetailsWidth - 51\n\n self.$songVersionStream.width(calculatedWidth)\n self.streamWidth = calculatedWidth > 350 ? 350 : calculatedWidth - songTimeWidth\n self.$songVersionWaveform.width(self.streamWidth)\n self.sizeWaveform()\n self.sizeElapsed()\n }\n\n var superInit = self.init\n self.init = function () {\n superInit()\n }\n\n return self\n})()\n\nmm.facade.on(\"app:ready\", function () {\n // Removed oak usage here. verify this still works correctly.\n if (!mm.isMobile) mm.desktopPlayer.init()\n})\n","mm.registerConfirmation = (function () {\n var self = mm.Page()\n\n self.init = function () {\n self.ps.$el = $(\"#mm-session.register-confirmation\")\n self.ps.form = mm.ProfileForm($(\"#edit-profile\", self.ps.$el), false)\n }\n\n return self\n})()\n\nmm.facade.on(\"app:ready\", function () {\n if ($(\"#mm-session.register-confirmation\").length) {\n mm.registerConfirmation.init()\n }\n})\n","mm.drawer = (function () {\n ;(\"use strict\")\n\n var self = mm.EventEmitter()\n\n self._callbacks = []\n\n self.$container = $(\"#container\")\n\n /**\n * Main DOM context\n * @public\n * @type {$.Element}\n */\n self.$el = $(\"#mm-drawer\")\n\n /**\n * The global page header\n * @public\n * @type {$.Element}\n */\n self.$header = $(\"header[role=main]\")\n\n /**\n * The mobile anchor that opens the drawer; mobile only\n * @public\n * @type {$.Element}\n */\n self.$menuAnchor = $(\"nav[role=main] .menu\")\n self.$playerAnchor = $(\"nav[role=main].mobile .playing-menu\")\n\n /**\n * selector for the desktop nav, this is used to build out inline css\n * @type {String}\n */\n self.desktopNav = \"#mm-drawer-nav.desktop\"\n self.$desktopNav = $(self.desktopNav)\n\n /**\n * The nav container for internal drawer pages; desktop only\n * @public\n * @type {$.Element}\n */\n self.$nav = $(\"#mm-drawer-nav.desktop nav\")\n\n /**\n * The mobile specific nav for internal drawer pages; mobile only\n * @type {[type]}\n */\n self.$navMobile = $(\"nav[role=drawer]\", self.$el)\n\n /**\n * Drawer navigation links specific to an unregistered user; mobile only\n * @public\n * @type {$.Element}\n */\n self.$navMobileGuestLinks = $(\"li.guest\", self.$navMobile)\n\n /**\n * The individual links to which user events will be bound; mobile only\n * @public\n * @type {$.Element}\n */\n self.$navMobileLinks = $(\"a\", self.$navMobile)\n\n /**\n * Drawer navigation links specific to a registered user; mobile only\n * @public\n * @type {$.Element}\n */\n self.$navMobileUserLinks = $(\"li.user\", self.$navMobile)\n\n /**\n * Drawer navigation links specific to an unregistered user\n * @public\n * @type {$.Element}\n */\n self.$navGuestLinks = $(\"li.guest\", self.$nav)\n\n /**\n * The individual links to which user events will be bound.\n * @public\n * @type {$.Element}\n */\n self.$navLinks = $(\"a\", self.$nav)\n\n /**\n * Drawer navigation links specific to a registered user\n * @public\n * @type {$.Element}\n */\n self.$navUserLinks = $(\"li.user\", self.$nav)\n\n /**\n * Drawer navigation links specific to an internal user\n * @public\n * @type {$.Element}\n */\n self.$navInternalUserLinks = $(\"li.internal-user\", self.$nav)\n\n /**\n * Wraps everything within the drawer\n * @public\n * @type {$.Element}\n */\n self.$shelf = $(\".mm-drawer-shelf\", self.$el)\n\n /**\n * Nav bar at the top of the drawer shelf, the height of this\n * is used to subject from the height of the body to arrive at\n * the proper height for the visible drawer
    \n * @type {[type]}\n */\n self.$shelfDrawerNavInternal = $(\".mm-drawer-nav-internal\", self.$shelf).first()\n\n /**\n * The draw wrapper that we size height to create proper vertical\n * scroll\n * @type {[type]}\n */\n self.$shelfDrawerWrap = $(\".mm-drawer-wrap\", self.$shelf).first()\n\n /**\n * Close button located on shelf, closes the drawer\n * @public\n * @type {$.Element}\n */\n self.$shelfClose = $(\".close\", self.$shelf)\n\n /**\n * Anchor linking to the mobile nav; mobile only\n * @public\n * @type {[type]}\n */\n self.$shelfNavAnchor = $(\"a.nav\", self.$shelf)\n\n /**\n * Mobile internal drawer navigation links; mobile only\n * @public\n * @type {$.Element}\n */\n self.$shelfNavAnchorLinks = $(\"nav[role=main] > ol > li > a\", self.$el)\n\n self.spinner = new mm.Spinner()\n\n self.$target = $(\"#drawer-target\")\n\n /**\n * Flag, reflects if the drawer should delay hiding a drawerPage until after\n * the drawer has closed.\n * @type {Boolean}\n */\n self.delay = false\n\n /**\n * Flag, reflects if the desktop nav bar has been pushed open or is pulled closed\n * @public\n * @type {Boolean}\n */\n self.pushed = false\n\n /**\n * Flag, reflects if the desktop nav bar is curently pushing\n * @public\n * @type {Boolean}\n */\n self.pushing = false\n\n /**\n * Storage for the current user's status to set the appropriate state\n * @public\n * @type {String}\n */\n self.userOrGuest = mm.user.isLoggedIn() ? \"user\" : \"guest\"\n\n self._buildCSS = function () {\n self.$container = self.$container || $(\".container-selector\")\n self.$desktopNav = self.$desktopNav || $(\".desktop-nav-selector\")\n // Check for vertical or horizontal scroll bar presence\n if (\n self.$container.get(0).scrollHeight > self.$container.height() ||\n self.$container.get(0).scrollWidth > self.$container.width()\n ) {\n self.$desktopNav.addClass(\"scroll-bar\")\n } else {\n self.$desktopNav.removeClass(\"scroll-bar\")\n }\n }\n\n self.init = function () {\n self._callbacks = []\n self.$container = $(\"#container\")\n self.$el = $(\"#mm-drawer\")\n self.$header = $(\"header[role=main]\")\n self.$menuAnchor = $(\"nav[role=main] .menu\")\n self.$playerAnchor = $(\"nav[role=main].mobile .playing-menu\")\n self.desktopNav = \"#mm-drawer-nav.desktop\"\n self.$desktopNav = $(self.desktopNav)\n self.$nav = $(\"#mm-drawer-nav.desktop nav\")\n self.$navMobile = $(\"nav[role=drawer]\", self.$el)\n self.$navMobileGuestLinks = $(\"li.guest\", self.$navMobile)\n self.$navMobileLinks = $(\"a\", self.$navMobile)\n self.$navMobileUserLinks = $(\"li.user\", self.$navMobile)\n self.$navGuestLinks = $(\"li.guest\", self.$nav)\n self.$navLinks = $(\"a\", self.$nav)\n self.$navUserLinks = $(\"li.user\", self.$nav)\n self.$navInternalUserLinks = $(\"li.internal-user\", self.$nav)\n self.$shelf = $(\".mm-drawer-shelf\", self.$el)\n self.$shelfDrawerNavInternal = $(\".mm-drawer-nav-internal\", self.$shelf).first()\n self.$shelfDrawerWrap = $(\".mm-drawer-wrap\", self.$shelf).first()\n self.$shelfClose = $(\".close\", self.$shelf)\n self.$shelfNavAnchor = $(\"a.nav\", self.$shelf)\n self.$shelfNavAnchorLinks = $(\"nav[role=main] > ol > li > a\", self.$el)\n self.$target = $(\"#drawer-target\")\n self.delay = false\n self.pushed = false\n self.spinner = new mm.Spinner()\n self.userOrGuest = mm.user.isLoggedIn() ? \"user\" : \"guest\"\n\n var pageObjects = [\n \"CartPage\",\n \"CartbenchPage\",\n \"CustomizePage\",\n \"LoginPage\",\n \"MixbenchPage\",\n \"MixtapesPage\",\n \"NavPage\",\n \"ProjectSearchbenchPage\",\n \"ProjectSearchesPage\",\n \"RegisterPage\",\n \"SharePage\",\n \"NewsletterPage\",\n \"ActivationPage\",\n ]\n function initializePageObject(pageObjectName) {\n var drawerKey = `drawer${pageObjectName}`\n var globalKey = `Drawer${pageObjectName}`\n\n if (mm[globalKey]) {\n mm[drawerKey] = mm[globalKey]()\n } else {\n var onReadyKey = `on${globalKey}Ready`\n mm[onReadyKey] = function () {\n mm[drawerKey] = mm[globalKey]()\n }\n }\n }\n pageObjects.forEach(function (pageObjectName) {\n initializePageObject(pageObjectName)\n })\n\n self._buildCSS()\n self.trigger(\"calc\")\n self.bindEvents()\n self.close()\n }\n\n /**\n * calculates the height of the drawer
    for scrolling purposes\n * originally using css calc() but in conjuction with a transition it\n * crashes safari.\n * http://stackoverflow.com/questions/14055461/ios-safari-css-calc-css-transition-instant-crash\n */\n self.on(\"calc\", function () {\n //var h = window.innerHeight - self.$shelfDrawerNavInternal.height();\n //self.$shelfDrawerWrap.height(h);\n })\n\n /**\n * Bind any user interaction events here\n * @public\n */\n self.bindEvents = function () {\n self.$navLinks\n .add(self.$navMobileLinks)\n .off(\"click\")\n .on(\"click\", function (e) {\n e.preventDefault()\n var targ = $(this).attr(\"href\").replace(/^#/, \"\")\n if (targ.includes(\"/users/\")) {\n return mm.router.navigate(`/users/${mm.user.attributes.id}`, { trigger: true })\n }\n if (targ === \"favorites\") {\n return mm.router.navigate(\"/favorites\", { trigger: true })\n }\n // Hacky solution: once page is routed to /manage force a reload since\n // Backbone won't allow routing to active admin directly\n if (targ === \"manage\") {\n window.location.href = \"/manage\"\n return true\n }\n var state = targ === \"project-searches\" ? \"projectSearches\" : targ\n\n self._current(targ)\n self.setState(state)\n self.delay = false\n })\n\n self.$shelfClose.on(\"click\", function (e) {\n e.preventDefault()\n self.delay = true\n self.setState(self.userOrGuest)\n })\n\n self.$menuAnchor.off(\"click\").on(\"click\", function (e) {\n e.preventDefault()\n if (self.$desktopNav.hasClass(\"pushed\")) {\n self.close()\n } else {\n self.setState(\"nav\")\n }\n })\n\n self.$playerAnchor.on(\"click\", function (e) {\n e.preventDefault()\n self.setState(\"nav\")\n })\n\n self.$shelfNavAnchor.on(\"click\", function (e) {\n e.preventDefault()\n self.setState(\"nav\")\n })\n\n self.$shelfNavAnchorLinks.on(\"click\", function (e) {\n if ($(this).attr(\"data-external\")) {\n return true\n }\n e.preventDefault()\n self.close()\n })\n }\n\n /**\n * Exposes close functionality to drawerPages, checks guest status and sets\n * state accordingly.\n * @public\n * @param {Function} callback Usually a drawerPage.hide method\n */\n self.close = function (callback) {\n self.userOrGuest = mm.user.isLoggedIn() ? \"user\" : \"guest\"\n self.delay = true\n self.setState(self.userOrGuest)\n if (typeof callback === \"function\") {\n self._checkDelay(callback)\n }\n }\n\n /**\n * Checks to see if the drawer should delay hiding a drawerPage until after\n * the drawer has closed; to be used internally.\n * @public\n * @param {Function} callback Function to call, either delayed or not\n * @return {Boolean}\n */\n self._checkDelay = function (callback) {\n if (typeof callback !== \"function\") return false\n if (self.delay && typeof callback === \"function\") {\n self._callbacks.push(callback)\n // setTimeout(callback, 500);\n return true\n }\n callback()\n return false\n }\n\n /**\n * Applies a current state to the desktop drawer navigation; desktop only\n * @public\n * @param {String} targ The link to be made current\n */\n self._current = function (targ) {\n self.$navLinks\n .removeClass(\"over\")\n .filter('[href=\"#' + targ + '\"]')\n .addClass(\"over\")\n }\n\n /**\n * Removes classes to 'pull' the drawer closed; to be used internally\n * @public\n * @return {Boolean}\n */\n self._pull = function () {\n if (self.pushed) {\n self.$desktopNav.removeClass(\"pushed\")\n self.$el.removeClass(\"viewing\")\n self.$shelf.removeClass(\"onscreen\")\n self.$navLinks.removeClass(\"over\")\n self.pushed = false\n $(\"#container\").off(\"click\")\n self.$container[0].addEventListener(\"transitionend\", function tranEnd() {\n var call\n while ((call = self._callbacks.shift())) call()\n self.$container[0].removeEventListener(\"transitionend\", tranEnd)\n })\n return true\n }\n return false\n }\n\n /**\n * Adds classes to 'push' the drawer open; to be used internally.\n * @public\n * @return {Boolean}\n */\n self._push = function () {\n self.pushing = true\n\n var pushed = false\n\n if (mm.isMobile) {\n self.trigger(\"calc\")\n }\n\n if (!self.pushed) {\n self.$desktopNav.addClass(\"pushed\")\n self.$el.addClass(\"viewing\")\n self.$shelf.addClass(\"onscreen\")\n self.pushed = true\n\n // on page click, close drawer\n _.defer(function () {\n $(\"#container\").on(\"click\", function () {\n if (!self.pushing) {\n mm.drawer.trigger(\"close\")\n }\n })\n })\n\n pushed = true\n }\n\n _.defer(function () {\n self.pushing = false\n self.delay = false\n })\n\n return pushed\n }\n\n self._render = function () {\n $.get(\"/render_drawer\").done(function (data) {\n self.$target.html(data)\n self.init()\n })\n }\n\n self.spin = function (spin) {\n if (spin) {\n self.spinner.spin(self.$shelfClose[0])\n self.$shelfClose.addClass(\"spinning\")\n } else {\n self.spinner.stop()\n self.$shelfClose.removeClass(\"spinning\")\n }\n }\n\n self._onOrderLoginPage = function () {\n return /click_order\\/[0-9]*\\/login/.test(Backbone.history.fragment)\n }\n\n self._attachOrderToLoginForm = function () {\n const orderId = window.location.pathname.match(/\\d+/)[0]\n $(\"#orderId\").val(orderId)\n }\n\n /**\n * State Machine map, do not overwrite, only extend.\n * @public\n * @type {Object}\n */\n self.states = {\n onGuest: function () {\n self.$navGuestLinks.add(self.$navMobileGuestLinks).removeClass(\"hidden\")\n self.$navUserLinks.add(self.$navMobileUserLinks).addClass(\"hidden\")\n self.$navInternalUserLinks.addClass(\"hidden\")\n self._pull()\n },\n onUser: function () {\n self.$navGuestLinks.add(self.$navMobileGuestLinks).addClass(\"hidden\")\n self.$navUserLinks.add(self.$navMobileUserLinks).removeClass(\"hidden\")\n if (mm.user.attributes.internal_user) {\n self.$navInternalUserLinks.removeClass(\"hidden\")\n }\n self._pull()\n },\n\n onCart: function () {\n mm.drawerCartPage.show()\n self._push()\n },\n offCart: function () {\n self._checkDelay(mm.drawerCartPage.hide)\n },\n\n onCartbench: function (payload, remove) {\n mm.drawerCartbenchPage.show(payload, remove)\n self._push()\n },\n offCartbench: function () {\n self._checkDelay(mm.drawerCartbenchPage.hide)\n },\n\n onCustomize: function (payload) {\n mm.drawerCustomizePage.show(payload)\n self._push()\n },\n offCustomize: function () {\n self._checkDelay(mm.drawerCustomizePage.hide)\n },\n\n onLogin: function () {\n var $link = $(\".dashboard-link\")\n var $searchLink = $(\".project-searches\")\n mm.drawerLoginPage.show()\n self._push()\n if (self._onOrderLoginPage()) self._attachOrderToLoginForm()\n\n mm.user.once(\"logged_in\", function () {\n if (self._onOrderLoginPage()) {\n self.close(function () {})\n } else if (mm.isMobile) {\n self.close()\n window.location.reload()\n } else {\n self.close(function () {\n mm.facade.trigger(\"refresh\")\n })\n }\n\n const userType = mm.user.attributes.role\n const isInternalUser = mm.user.attributes.internal_user\n if (!$link.hasClass(\"available\")) {\n if (isInternalUser || userType === \"international_partner\") $link.text(\"Portal\")\n if (userType === \"vendor\") $link.text(\"Artist Portal\")\n $link.addClass(\"available\")\n $(\"nav[role=main].desktop ol li\").addClass(\"condensed\")\n }\n if (!isInternalUser) {\n $searchLink.addClass(\"hidden\")\n }\n })\n },\n offLogin: function () {\n self._checkDelay(mm.drawerLoginPage.hide)\n },\n\n onLogout: function () {\n var $link = $(\".dashboard-link\")\n mm.user.logout(self.close)\n mm.user.once(\"logged_out\", function () {\n if (/users\\/[0-9]*/.test(Backbone.history.fragment)) {\n mm.router.navigate(\"/\", { trigger: true, replace: true })\n } else if (/order\\/[0-9]*/.test(Backbone.history.fragment)) {\n mm.router.navigate(\"/\", { trigger: true, replace: true })\n } else {\n window.location.reload()\n }\n if ($link.hasClass(\"available\")) {\n $link.removeClass(\"available\")\n $(\"nav[role=main].desktop ol li\").removeClass(\"consdensed\")\n }\n })\n },\n\n onMixbench: function (payload) {\n mm.drawerMixbenchPage.show(payload)\n self._push()\n },\n offMixbench: function () {\n self._checkDelay(mm.drawerMixbenchPage.hide)\n },\n\n onMixtapes: function () {\n mm.drawerMixtapesPage.show()\n self._push()\n },\n offMixtapes: function () {\n self._checkDelay(mm.drawerMixtapesPage.hide)\n },\n\n onNav: function () {\n mm.drawerNavPage.show()\n self._push()\n },\n offNav: function () {\n self._checkDelay(mm.drawerNavPage.hide)\n },\n\n onProjectSearchbench: function (payload) {\n mm.drawerProjectSearchbenchPage.show(payload)\n self._push()\n },\n offProjectSearchbench: function () {\n self._checkDelay(mm.drawerProjectSearchbenchPage.hide)\n },\n\n onProjectSearches: function () {\n mm.drawerProjectSearchesPage.show()\n self._push()\n },\n offProjectSearches: function () {\n self._checkDelay(mm.drawerProjectSearchesPage.hide)\n },\n\n onRegister: function () {\n mm.drawerRegisterPage.show()\n self._push()\n },\n offRegister: function () {\n self._checkDelay(mm.drawerRegisterPage.hide)\n },\n\n onShare: function (payload) {\n mm.drawerSharePage.show(payload)\n self._push()\n },\n offShare: function () {\n self._checkDelay(mm.drawerSharePage.hide)\n },\n\n onActivation: function () {\n mm.drawerActivationPage.show()\n self._push()\n },\n\n offActivation: function () {\n self._checkDelay(mm.drawerActivationPage.hide)\n },\n\n onSubscribe: function () {\n mm.drawerNewsletterPage.show()\n self._push()\n },\n offSubscribe: function () {\n self._checkDelay(mm.drawerNewsletterPage.hide)\n },\n }\n\n mm.facade.on(\"refresh\", self._render)\n mm.facade.on(\"desktop mobile\", self.close)\n\n self.on(\"cart\", function () {\n self.setState(\"cart\")\n })\n\n self.on(\"cart:add\", function (payload, remove) {\n remove = typeof remove === \"undefined\" ? false : remove\n self.setState(\"cartbench\", payload, remove)\n })\n\n self.on(\"checkNav\", function (payload) {\n self._current(payload)\n })\n\n self.on(\"close\", function (callback) {\n callback = callback || undefined\n self.close(callback)\n })\n\n self.on(\"customize\", function (payload) {\n self.setState(\"customize\", payload)\n })\n\n self.on(\"mixtapes\", function () {\n self.setState(\"mixtapes\")\n })\n\n self.on(\"mixtape:add\", function (payload) {\n if (!mm.user.isLoggedIn()) return false\n self.setState(\"mixbench\", payload)\n })\n\n self.on(\"projectSearches\", function () {\n self.setState(\"projectSearches\")\n })\n\n self.on(\"projectSearch:add\", function (payload) {\n if (!mm.user.isLoggedIn()) return false\n self.setState(\"projectSearchbench\", payload)\n })\n\n self.on(\"register\", function () {\n self.setState(\"register\")\n })\n\n self.on(\"activation\", function () {\n self.setState(\"activation\")\n })\n\n self.on(\"login\", function () {\n self.setState(\"login\")\n })\n\n self.on(\"subscribe\", function () {\n self.setState(\"subscribe\")\n })\n\n self.on(\"share:mixtape\", function (payload) {\n self.setState(\"share\")\n mm.drawerSharePage.trigger(\"shareData\", payload)\n })\n\n self.on(\"share:songVersion\", function (payload) {\n self.setState(\"share\")\n mm.drawerSharePage.trigger(\"shareData\", payload)\n })\n\n return self\n})()\n\nmm.facade.on(\"app:ready\", mm.drawer.init)\n","mm.DrawerActivationPage = function () {\n var self = mm.DrawerPage($(\".mm-drawer-wrap #activation\")),\n form = mm.DrawerForm($(\".mm-drawer-form\", self.$el), {\n url: \"/account/activation\",\n type: \"GET\",\n empty: true,\n })\n\n var superHide = self.hide\n self.hide = function () {\n superHide()\n }\n\n var superShow = self.show\n self.show = function () {\n superShow()\n }\n\n return self\n}\n","/**\n * Scripts specific to the drawer cart page\n * @public\n * @return {Object} Instance of mm.DrawerCartPage\n */\nmm.DrawerCartPage = function () {\n var self = mm.DrawerPage($(\".mm-drawer-wrap #cart\")),\n $checkout = $(\"a.checkout\", self.$el),\n $explore = $(\"a.explore\", self.$el),\n $count = $(\".count\", self.$el),\n $subtotal = $(\".totals .subtotal\", self.$el),\n $targ = $(\".mm-cart-target\", self.$el),\n $total = $(\".totals .total\", self.$el),\n $removes,\n $replacements,\n _pendingRemovalID\n\n var _linetemplate =\n '<%= label %>' + '<%= value %>'\n\n var _template =\n \"<% _.each(items, function (item) { %>\" +\n \"
  • \" +\n \"<% if (item.song_version) { %>\" +\n '
    ' +\n '<%= item.song_version.title %>' +\n '<%= mm.format.numberToCurrency(item.price) %>' +\n \"
    \" +\n '
    ' +\n '<%= item.song_version.artist.name %>' +\n '<%= item.license_version.name %>' +\n \"
    \" +\n \"<% } else { %>\" +\n '
    ' +\n '<%= item.line_item_type %>' +\n '<%= mm.format.numberToCurrency(item.price) %>' +\n \"
    \" +\n \"<% } %>\" +\n '\">x' +\n \"
  • \" +\n \"<% }); %>\"\n\n function parseTemplate() {\n var template = _.template(_template)\n var line_items = { items: mm.cart.order.line_items }\n var lineTemplate = _.template(_linetemplate)\n var sub = {\n label: \"Subtotal\",\n value: mm.format.numberToCurrency(mm.cart.order.price),\n }\n var total = {\n label: \"Total\",\n value: mm.format.numberToCurrency(mm.cart.order.total),\n }\n\n if (mm.cart.order.line_items.length > 0) {\n $targ.html(template(line_items))\n $subtotal.html(lineTemplate(sub))\n $total.html(lineTemplate(total))\n $count.html(pluralize(mm.cart.order.line_items.length, \"Item\"))\n const loginPath = mm.user.isLoggedIn() ? \"\" : \"/login\"\n $checkout.attr(\"href\", \"/click_order/\" + mm.cart.order.id + loginPath)\n $checkout.show()\n $subtotal.show()\n $total.show()\n $count.show()\n } else {\n $targ.html(\"

    Your cart is empty!

    \")\n $subtotal.hide()\n $total.hide()\n $count.hide()\n $checkout.hide()\n }\n\n self.rebuild()\n mm.drawer.spin(false)\n }\n\n function pluralize(count, str) {\n if (count > 1 || count === 0) {\n return count + \" \" + str + \"s\"\n }\n return count + \" \" + str\n }\n\n jQuery.easing[\"easeOutQuad\"] = function (x, t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b\n }\n\n function removeLine(id, that) {\n var _data = {\n id: mm.cart.order.id,\n line_item: id,\n }\n mm.drawer.spin(true)\n $.post(\"/remove-line\", _data)\n .done(function (data) {\n $(that)\n .parent(\"li\")\n .animate(\n {\n opacity: 0,\n height: 0,\n paddingTop: 0,\n paddingBottom: 0,\n },\n {\n duration: 400,\n easing: \"easeOutQuad\",\n complete: function () {\n $(this).remove()\n mm.cart.hydrate(parseTemplate)\n },\n }\n )\n if (data.line_item_count < 1) {\n $(\"#mm-drawer-nav li.cart\").addClass(\"hidden\")\n }\n })\n .fail(function (data) {\n console.log(\"fail\")\n })\n }\n\n var superRebuild = self.rebuild\n self.rebuild = function () {\n superRebuild()\n $removes = $(\"[data-action=remove]\", self.$el)\n $replacements = $(\"[data-action=replace]\", self.$el)\n $songTitles = $(\"span.title\", self.$el)\n\n $removes.on(\"click\", function (e) {\n e.preventDefault()\n e.stopImmediatePropagation()\n var id = $(this).attr(\"data-id\")\n removeLine(id, this)\n })\n\n $replacements.on(\"click\", function (e) {\n e.preventDefault()\n e.stopImmediatePropagation()\n _pendingRemovalID = $(this).attr(\"data-id\")\n mm.drawer.trigger(\"cart:add\", $(this).attr(\"data-song-version-id\"), true)\n })\n\n var hasLongTitle = function (displayWidth) {\n return (mm.isMobile && displayWidth > 124) || displayWidth === 170\n }\n\n $songTitles.hover(\n function (e) {\n var title = $(e.target)\n var displayWidth = title.width()\n\n if (hasLongTitle(displayWidth)) {\n var actualWidth = title.prop(\"scrollWidth\")\n var transitionWidth = actualWidth - displayWidth\n\n title.css({\n transition: transitionWidth / 100 + \"s linear\",\n overflow: \"visible\",\n transform: \"translateX(-\" + transitionWidth + \"px)\",\n })\n }\n },\n function (e) {\n var title = $(e.target)\n var displayWidth = title.width()\n\n if (hasLongTitle(displayWidth)) {\n var actualWidth = title.prop(\"scrollWidth\")\n var transitionWidth = actualWidth - displayWidth\n var transitionDuration = transitionWidth > 200 ? 0.8 : transitionWidth / 100\n\n title.css({\n transition: transitionDuration + \"s linear\",\n overflow: \"hidden\",\n transform: \"none\",\n })\n }\n }\n )\n\n $checkout.on(\"click\", function () {\n fbq(\"track\", \"InitiateCheckout\")\n mm.drawerProxy.trigger(\"close\")\n })\n\n $explore.on(\"click\", function (e) {\n e.preventDefault()\n if (window.location.pathname === \"/browse\") {\n mm.drawerProxy.trigger(\"close\")\n } else {\n $explore.attr({ href: \"/browse\", \"data-bypass\": \"true\" })\n var href = $(this).attr(\"href\")\n mm.router.navigate(href, { trigger: true })\n }\n })\n }\n\n /**\n * Extends base self.show method, sets template compilation in motion.\n * @public\n * @return {Object} mm.drawerCartPage\n */\n var superShow = self.show\n self.show = function () {\n parseTemplate()\n superShow()\n return self\n }\n\n self.remove = function (id, callback) {\n $.post(\"/remove-line\", { id: mm.cart.order.id, line_item: id }).done(callback)\n }\n\n if (mm.drawer) {\n mm.drawer.on(\"cart:remove\", function (callback) {\n if (typeof callback !== \"function\") {\n callback = function () {}\n }\n self.remove(_pendingRemovalID, callback)\n })\n }\n\n return self\n}\n","/**\n * The drawer page containing any functionality related to adding a license to\n * the cart object. This differs from mm.DrawerCartPage.\n * @public\n * @extends {mm.DrawerPage}\n * @return {Object} mm.DrawerCartbenchPage\n */\nmm.DrawerCartbenchPage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #cartbench\")),\n form,\n $licenses,\n $cartbench = $(\".mm-drawer-wrap #cartbench\"),\n $license_versions,\n _licenseID,\n _licenseIndex,\n _pendingSongVersionID,\n _remove = false,\n songVersionExStatus,\n _pendingSongVersion\n\n /**\n * Fetch the parsed template from the server showing the proper grouping of\n * licenses and options.\n * @private\n */\n function fetchTemplate(callback) {\n mm.drawer.spin(true)\n $.get(\"/song_versions/licenses/\" + _pendingSongVersionID).done(function (data) {\n self.$el.html(data)\n self.rebuild()\n mm.drawer.spin(false)\n if (typeof callback === \"function\") callback()\n })\n }\n\n /**\n * With both the license_id and song_version_id set, submit a POST request to the\n * server and hydrate the mm.cart object with the response.\n * @private\n */\n function processLineItem() {\n var item = {\n line_item: {\n song_version_id: _pendingSongVersionID,\n license_version_id: _licenseID,\n },\n }\n mm.drawer.spin(true)\n if (_remove) {\n mm.drawer.trigger(\"cart:remove\", function () {\n process(item)\n })\n } else {\n process(item)\n }\n }\n\n function process(item) {\n $.post(\"/add-to-cart\", item)\n .done(function (data) {\n if (data.success) $(\"#mm-drawer-nav li.cart\").removeClass(\"hidden\")\n mm.user.cart.hydrate(function () {\n mm.drawer.spin(false)\n mm.drawer.delay = false\n mm.drawerProxy.trigger(\"cart\")\n })\n })\n .fail(function (data) {\n console.error(data)\n })\n }\n\n /**\n * Extends base self.hide method to reset our song version and license id's\n * @public\n * @return {Object} mm.drawerCartbenchPage\n */\n var superHide = self.hide\n self.hide = function () {\n _pendingSongVersion = null\n _pendingSongVersionID = null\n _licenseID = null\n _remove = false\n superHide()\n if (!_.isUndefined(form)) {\n form.reset()\n }\n return self\n }\n\n /**\n * Extends base self.rebuild method, sets and rebinds drawer specific\n * elements.\n * @public\n * @return {Object} mm.drawerCartbenchPage\n */\n var superRebuild = self.rebuild\n self.rebuild = function () {\n superRebuild()\n $licenses = $(\"[data-license-targ]\", self.$el)\n $license_versions = $(\".license\", $licenses)\n\n if (_pendingSongVersion) songVersionExStatus = _pendingSongVersion.exclusive\n\n var localNestLinks = $(\".local-nest\", self.$el)\n\n self.$nestLinks.on(\"click\", function (e) {\n e.preventDefault()\n var targ\n targ = $(this).attr(\"data-license\")\n var license = $('[data-license-targ=\"' + targ + '\"]', self.$el)\n $licenses.not(license).removeClass(\"active\")\n license.addClass(\"active\")\n })\n\n // hack to route custom license button without page reload\n // TODO: look into proper way to do later\n $(\"#custom-license-req\").on(\"click\", function (e) {\n e.preventDefault()\n var href = $(this).attr(\"href\")\n mm.router.navigate(href, { trigger: true })\n })\n\n localNestLinks.on(\"click\", function (e) {\n e.preventDefault()\n var targ = $(this).attr(\"href\").replace(/^#/, \"\")\n mm.drawer.delay = false\n mm.drawer.setState(targ)\n })\n\n $license_versions.on(\"click\", function (e) {\n e.preventDefault()\n var license_name = $(this).data(\"license-name\")\n fbq(\"track\", \"AddToCart\")\n _licenseID = $(this).attr(\"data-license-id\")\n _licenseIndex = $(this).attr(\"data-index\")\n $license_versions.off(\"click\")\n\n if (songVersionExStatus === true) {\n exLicenseTarg()\n } else if (license_name === \"Podcast License\") {\n renderPodcastOption()\n } else {\n processLineItem()\n }\n })\n\n return self\n }\n\n function renderPodcastOption() {\n var targ = \"podcast\"\n\n var license = $('[data-license-targ=\"' + targ + '\"]', self.$el)\n $licenses.not(license).removeClass(\"active\")\n license.addClass(\"active\")\n $(\"#podcast-opt-\" + _licenseIndex).fadeIn(\"fast\")\n\n // if back button used for selected podcast option\n $(\"#mm-drawer .back\").on(\"click\", function (e) {\n e.preventDefault()\n if ($('[data-license-targ=\"podcast\"]').hasClass(\"active\")) {\n $('[data-license-targ=\"podcast\"]').removeClass(\"active\")\n $(\"#podcast-opt-\" + _licenseIndex).hide()\n _licenseID = null\n self.rebuild()\n }\n })\n\n // add podcast license to cart\n var button = $(\".podcast-submit\")\n\n button.on(\"click\", function (e) {\n e.preventDefault()\n processLineItem()\n })\n }\n\n // checks to see if song version is exclusive and changes target to show exclusive deets\n // instead of rendering cart items\n function exLicenseTarg() {\n var targ = \"exclusive\"\n\n var license = $('[data-license-targ=\"' + targ + '\"]', self.$el)\n $licenses.not(license).removeClass(\"active\")\n license.addClass(\"active\")\n }\n\n // user agrees that song version is not exclusive by checking box\n $(\".mm-drawer-wrap\").on(\"change\", \"#excheck\", function (e) {\n exEnableContinue()\n })\n\n function exEnableContinue() {\n var button = $(\".ex-button\")\n\n if ($(\"#excheck\").prop(\"checked\") === true) {\n button.removeAttr(\"disabled\")\n button.addClass(\"available\")\n } else {\n button.removeClass(\"available\")\n button.attr(\"disabled\", true)\n }\n\n button.off(\"click.ex\").on(\"click.ex\", function (e) {\n e.preventDefault()\n processLineItem()\n })\n }\n\n /**\n * Extends base self.show method, checks for payload (song_version_id) and fetches\n * the template if it exists.\n * @public\n * @return {Object} mm.drawerCartbenchPage\n */\n var superShow = self.show\n self.show = function (payload, remove) {\n _remove = remove\n payload = typeof payload === \"string\" ? { id: parseInt(payload) } : payload\n\n if (payload && _.has(payload, \"id\")) {\n _pendingSongVersion = payload\n _pendingSongVersionID = payload.id\n fetchTemplate(function () {\n if (!payload.has_click_licenses) {\n $cartbench.addClass(\"left\")\n }\n })\n }\n superShow()\n return self\n }\n\n return self\n}\n","mm.DrawerCustomizePage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #customize\")),\n form = mm.DrawerForm($(\".mm-drawer-form\", self.$el), {\n type: \"POST\",\n empty: true,\n }),\n _songVersionID\n\n var superHide = self.hide\n self.hide = function () {\n superHide()\n form.reset()\n }\n\n var superShow = self.show\n self.show = function (songVersionID) {\n superShow()\n _songVersionID = songVersionID\n form.reset()\n form.options.url = \"/song_versions/\" + _songVersionID + \"/customize\"\n form.off(\"submit\").on(\"submit\", form.submit)\n self.resize()\n }\n\n return self\n}\n","/**\n * Scripts specific to the drawer login page\n * @public\n * @return {Object} Instance of mm.DrawerLoginPage\n */\nmm.DrawerLoginPage = function () {\n var self = mm.DrawerPage($(\".mm-drawer-wrap #login\")),\n forgotForm = mm.DrawerForm($(\".mm-drawer-form.forgot-form\", self.$el), {\n url: \"/account/reset_password\",\n type: \"POST\",\n empty: false,\n }),\n loginForm = mm.DrawerForm($(\".mm-drawer-form.login\", self.$el), {}),\n $register = $(\".register\", self.$el),\n $activation = $(\".activation\", self.$el)\n\n self.$message = $(\".message\", self.$el)\n\n $register.on(\"click\", function (e) {\n e.preventDefault()\n mm.drawerProxy.trigger(\"checkNav\", \"register\")\n mm.drawerProxy.trigger(\"register\")\n })\n\n $activation.on(\"click\", function (e) {\n e.preventDefault()\n mm.drawerProxy.trigger(\"checkNav\", \"activation\")\n mm.drawerProxy.trigger(\"activation\")\n })\n\n /*!\n * Begin form method overides\n */\n\n loginForm.handleErrors = function (response) {\n loginForm.$errors.addClass(\"display\")\n return loginForm\n }\n\n loginForm.handleSuccess = function (response) {\n loginForm.$errors.removeClass(\"display\")\n loginForm.$success.addClass(\"display\")\n loginForm.$hides.addClass(\"hide\")\n loginForm.$form.addClass(\"success\")\n setTimeout(function () {\n mm.drawerProxy.trigger(\"close\")\n }, 1000)\n\n return loginForm\n }\n\n loginForm.reset = function () {\n if (mm.isMobile) {\n loginForm.$inputs.removeClass(\"invalid\")\n } else {\n loginForm.$inputs.removeClass(\"invalid\").first().focus()\n }\n loginForm.$errors.removeClass(\"display\")\n loginForm.$success.removeClass(\"display\")\n loginForm.$hides.removeClass(\"hide\")\n loginForm.$form.removeClass(\"success\")\n loginForm.$form[0].reset()\n return loginForm\n }\n\n loginForm.submit = function (e) {\n e.preventDefault()\n loginForm.spin(true)\n var email = loginForm.$inputs.filter('[name=\"email\"]').val()\n var pass = loginForm.$inputs.filter('[name=\"password\"]').val()\n var order_id = loginForm.$inputs.filter('[name=\"order_id\"]').val()\n\n mm.user\n .login(email, pass, order_id)\n .done(loginForm.handleSuccess)\n .fail(loginForm.handleFail)\n .always(loginForm.complete)\n\n return loginForm\n }\n\n // bind submit _after_ redefining submit handler\n loginForm.$form.off(\"submit\").on(\"submit\", loginForm.submit)\n\n var superHide = self.hide\n self.hide = function () {\n superHide()\n loginForm.reset()\n forgotForm.reset()\n self.notifyReset()\n }\n\n var superShow = self.show\n self.show = function () {\n superShow()\n loginForm.reset()\n forgotForm.reset()\n }\n\n /**\n * display a message in the login form\n * @param {[type]} msg [description]\n * @return {[type]} [description]\n */\n self.notify = function (msg) {\n self.$message.html(msg || \"\").addClass(\"display\")\n }\n\n self.notifyReset = function () {\n self.$message.empty().removeClass(\"display\")\n }\n\n return self\n}\n","mm.DrawerMixbenchPage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #mixbench\")),\n $form = $(\"form\", self.$el),\n $mixtapes,\n $name = $(\"input[type=text]\", $form),\n $description = $('textarea[name=\"description\"]', $form),\n $inputs = $(\"input\", $form),\n $privacy = $(\"input#privacy\", $form),\n $submit = $(\"button[type=submit]\", $form),\n _spinTarg = $(\"button\", $form).parent(\"div\")[0],\n _spinner = new mm.Spinner(),\n _songVersionID\n\n $form.on(\"submit\", onSubmit)\n $submit.attr(\"disabled\", true)\n\n function alwaysRun() {\n $privacy.prop(\"checked\", false)\n $(\"label .icon.secret\", $form).addClass(\"hidden\")\n $name.blur().val(\"\")\n }\n\n function build() {\n $mixtapes = $(\"li[data-mixtape-id]\", self.$el)\n $privacy.prop(\"checked\", false)\n $(\"label .icon.secret\", $form).addClass(\"hidden\")\n\n $privacy.off(\"change\").on(\"change\", function (e) {\n var choice = $(this).is(\":checked\") ? \"public\" : \"secret\"\n $(\"> label\", $form).removeClass(\"hidden\")\n $(\"> label.\" + choice, $form).addClass(\"hidden\")\n\n $(\"label .icon\", $form).removeClass(\"hidden\")\n $(\"label .icon.\" + choice, $form).addClass(\"hidden\")\n })\n\n $mixtapes.on(\"click\", function (e) {\n e.preventDefault()\n var mixtapeID = $(this).attr(\"data-mixtape-id\")\n _spinner.spin(_spinTarg)\n $inputs.attr(\"disabled\", true)\n $form.addClass(\"processing\")\n $.ajax({\n url: \"/mixtapes/\" + mixtapeID + \"/add/\" + _songVersionID,\n success: onSuccess,\n })\n })\n\n $name.on(\"keyup keydown\", function (e) {\n if (this.value !== \"\") {\n $submit.removeAttr(\"disabled\")\n } else {\n $submit.attr(\"disabled\", true)\n }\n })\n\n return self\n }\n\n function onFailure(e) {\n console.error(e)\n }\n\n function onSubmit(e) {\n e.preventDefault()\n if ($name.val() === \"\") return false\n var mixtape,\n data = {\n name: $name.val(),\n description: $description.val(),\n secret: $privacy.is(\":checked\"),\n }\n if (_songVersionID) {\n data.song_version = _songVersionID\n }\n $name.off(\"keyup keydown\")\n mixtape = mm.Mixtape(data)\n\n _spinner.spin(_spinTarg)\n $inputs.attr(\"disabled\", true)\n $form.addClass(\"processing\")\n\n mm.user.mixtapes.add(mixtape)\n mixtape.create().done(onSuccess).fail(onFailure).always(alwaysRun)\n }\n\n function onSuccess(data) {\n _spinner.stop()\n $inputs.removeAttr(\"disabled\")\n $form.removeClass(\"processing\")\n _songVersionID = undefined\n $mixtapes.off(\"click\")\n mm.drawer.delay = false\n mm.drawerProxy.trigger(\"mixtapes\")\n }\n\n function rerender() {\n $.ajax({\n method: \"POST\",\n url: \"/mixtapes/user\",\n data: { style: \"benchlist\" },\n success: function (data) {\n $(\".list\", self.$el).html(data)\n build()\n },\n })\n }\n\n var superShow = self.show\n self.show = function (payload) {\n rerender()\n superShow()\n _songVersionID = payload\n }\n\n return build()\n}\n","mm.DrawerNavPage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #nav\"))\n\n self.showNested = function () {}\n\n return self\n}\n","mm.DrawerNewsletterPage = function () {\n var self, form\n\n self = mm.DrawerPage($(\".mm-drawer-wrap #subscribe\"))\n form = mm.DrawerForm($(\".mm-drawer-form\", self.$el), {\n url: \"/newsletter\",\n type: \"POST\",\n })\n\n return self\n}\n","mm.DrawerProjectSearchbenchPage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #project-searchbench\")),\n $form = $(\"form\", self.$el),\n $addToSearchOrDirection,\n $searchItemWithDirections,\n $name = $(\"input[type=text]\", $form),\n $description = $('textarea[name=\"description\"]', $form),\n $inputs = $(\"input\", $form),\n $submit = $(\"button[type=submit]\", $form),\n $viewMoreSearches,\n _limit = 10,\n _spinTarg = $(\"button\", $form).parent(\"div\")[0],\n _spinner = new mm.Spinner(),\n _songVersionId,\n _songId\n\n $form.on(\"submit\", onSubmit)\n $submit.attr(\"disabled\", true)\n\n function alwaysRun() {\n $name.blur().val(\"\")\n $description.blur().val(\"\")\n }\n\n function build() {\n $addToSearchOrDirection = $(\".add-to\", self.$el)\n $searchItemWithDirections = $(\".with-directions\", self.$el)\n $viewMoreSearches = $(\"button.view-more-searches\", self.$el)\n\n $addToSearchOrDirection.on(\"click\", function (e) {\n e.preventDefault()\n e.stopPropagation()\n var $projectSearchContainer = $(this).closest(\".project-search-item-container\")\n var $projectSearchItem = $projectSearchContainer.find(\"li.project-search-item\")\n var directionId = parseInt($(this).data(\"direction-id\"))\n var projectSearchId = parseInt($projectSearchContainer.data(\"project-search-id\"))\n var comparativeIds = $projectSearchContainer.data(\"project-search-comparative-ids\")\n\n if (isSongVersionPresent($projectSearchItem, comparativeIds)) return false\n _spinner.spin(_spinTarg)\n $inputs.attr(\"disabled\", true)\n $form.addClass(\"processing\")\n $.ajax({\n type: \"POST\",\n url: \"/api/v1/search_rounds/add/\" + _songVersionId,\n data: {\n search_round: {\n project_search_id: projectSearchId,\n direction_id: directionId,\n },\n },\n success: function (data) {\n data.success ? onSuccess(data) : onError($projectSearchItem, data.message)\n },\n })\n })\n\n $name.on(\"keyup keydown input propertychange\", function (e) {\n if (this.value !== \"\") {\n $submit.removeAttr(\"disabled\")\n } else {\n $submit.attr(\"disabled\", true)\n }\n })\n\n $searchItemWithDirections.on(\"click\", function (e) {\n e.preventDefault()\n\n if ($(this).hasClass(\"expanded\")) {\n $(this).removeClass(\"expanded\")\n } else {\n $searchItemWithDirections.removeClass(\"expanded\")\n $(this).addClass(\"expanded\")\n }\n })\n\n $viewMoreSearches.off(\"click\")\n $viewMoreSearches.click((e) => {\n e.preventDefault()\n _limit += 10\n rerender()\n })\n\n return self\n }\n\n function isSongVersionPresent(projectSearchItem, comparativeIds) {\n if (comparativeIds.current_round_sv_ids.includes(_songVersionId)) {\n checkIfSongVersionPresentInCurrentRound(projectSearchItem, comparativeIds)\n } else if (comparativeIds.previous_rounds_sv_ids.includes(_songVersionId)) {\n if (\n !confirm(\"This song version was added to previous rounds. Would you still like to add it?\")\n )\n return true\n } else if (comparativeIds.all_song_ids.includes(_songId)) {\n if (\n !confirm(\n \"Another version of this song was added to the search. Would you still like to add it?\"\n )\n )\n return true\n } else {\n return false\n }\n }\n\n function checkIfSongVersionPresentInCurrentRound(projectSearchItem, comparativeIds) {\n if (!comparativeIds.current_round_srsv_users[_songVersionId].includes(mm.user.attributes.id)) {\n if (!confirm(\"Another user added this song to this round. Would you still like to add it?\"))\n return true\n } else {\n onError(projectSearchItem, \"You have already selected this song for the round.\")\n return true\n }\n }\n\n function enableFrom() {\n _spinner.stop()\n $inputs.removeAttr(\"disabled\")\n $form.removeClass(\"processing\")\n }\n\n function handleCloseErrorMessage(el) {\n el.find(\".close-error-message\").one(\"click\", function (e) {\n e.preventDefault()\n $(this).closest(\".search-error-overlay\").removeClass(\"show\")\n })\n }\n\n function onError(projectSearchItem, message) {\n enableFrom()\n handleCloseErrorMessage(projectSearchItem)\n projectSearchItem.find(\".message-text\").text(message)\n projectSearchItem.find(\".search-error-overlay\").addClass(\"show\")\n }\n\n function onFailure(e) {\n console.error(e)\n }\n\n function onSubmit(e) {\n e.preventDefault()\n if ($name.val() === \"\") return false\n var data = {\n name: $name.val(),\n description: $description.val(),\n }\n\n if (_songVersionId) {\n data.song_version = _songVersionId\n }\n\n $name.off(\"keyup keydown\")\n var projectSearch = mm.ProjectSearch(data)\n\n _spinner.spin(_spinTarg)\n $inputs.attr(\"disabled\", true)\n $form.addClass(\"processing\")\n\n mm.user.project_searches.add(projectSearch)\n projectSearch.create().done(onSuccess).fail(onFailure).always(alwaysRun)\n }\n\n function onSuccess(response) {\n enableFrom()\n $addToSearchOrDirection.off(\"click\")\n\n // a successful response is an HTML partial as a string\n if (typeof response === \"string\" || response.success) {\n _songVersionId = undefined\n mm.drawer.delay = false\n mm.drawerProxy.trigger(\"projectSearches\")\n } else {\n var errorsLength = response.errors.length\n for (var i = 0; i < errorsLength; i++) {\n $(\"
    \" + response.errors[i] + \"
    \")\n .appendTo($(\".search.errors\"))\n .delay(4000)\n .queue(function () {\n $(this).remove()\n })\n }\n mm.drawer.spin(false)\n }\n }\n\n function rerender() {\n if (!self.$el.hasClass(\"showing\")) _limit = 10\n $.ajax({\n url: \"/api/v1/project_searches/user\",\n data: { style: \"benchlist\", limit: _limit },\n success: function (data) {\n var dataHTML = $(data)\n if ($(\"li\", dataHTML).length < _limit) $viewMoreSearches.addClass(\"hide\")\n $(\".list\", self.$el).html(data)\n build()\n },\n })\n }\n\n var superShow = self.show\n self.show = function (payload) {\n rerender()\n superShow()\n _songVersionId = payload.id\n _songId = payload.song_id\n }\n\n return build()\n}\n","/**\n * Scripts specific to the drawer register page\n * @public\n * @return {Object} Instance of mm.drawerRegisterPage (Singleton)\n */\n\nmm.DrawerRegisterPage = function () {\n var self = mm.DrawerPage($(\".mm-drawer-wrap #register\")),\n form = mm.DrawerForm($(\".mm-drawer-form\", self.$el), {\n url: \"/register\",\n type: \"POST\",\n empty: true,\n }),\n newsletterCheckbox = $(\"#newsletter\", self.$el),\n termsCheckbox = $(\"#agree_to_terms\", self.$el),\n registerButton = $(\"#create-account button\", self.$el)\n\n // Set newsletter opt-in to true if checked, false if not\n newsletterCheckbox.on(\"change\", function () {\n $(this).val(this.checked)\n $(this).attr(\"aria-checked\", this.checked)\n })\n\n termsCheckbox.on(\"change\", function () {\n registerButton.prop(\"disabled\", !this.checked)\n })\n\n var superHide = self.hide\n self.hide = function () {\n superHide()\n form.reset()\n }\n\n var superShow = self.show\n self.show = function () {\n superShow()\n form.reset()\n }\n\n return self\n}\n","/**\n * payload expects tp be { type: '{song version|mixtape}', id: id }\n */\n\nmm.DrawerSharePage = function () {\n \"use strict\"\n\n var self = mm.DrawerPage($(\".mm-drawer-wrap #share\")),\n $choices = $(\"[data-action]\", self.$el),\n _event = {},\n _data,\n _form,\n _url\n\n var actions = {\n /**\n * Fallback email option, opens native mail program\n * @private\n * @param {Object} e The click event\n */\n\n email: function (e) {\n _event.label = \"email\"\n var $a = $(\"\", {\n href: \"mailto:\" + recipient + \"?\" + $.param(params),\n }),\n params = {\n subject: \"Marmoset Music\",\n body: _url,\n }\n $a.one(\"click\", mm.share.email).trigger(\"click\")\n self.trigger(\"complete\")\n },\n\n facebook: function (e) {\n _event.label = \"facebook\"\n\n FB.ui(\n {\n method: \"feed\",\n link: _url,\n },\n function (response) {\n if (response && _.has(response, \"post_id\") && response.post_id) {\n mm.facade.trigger(\"success\", \"Facebook Share\")\n } else {\n return mm.facade.trigger(\"error\", \"Facebook Share\")\n }\n }\n )\n\n self.trigger(\"complete\")\n },\n\n twitter: function (e) {\n _event.label = \"twitter\"\n\n var params = {\n url: _url,\n }\n\n switch (_data.type) {\n case \"mixtape\":\n $.extend(params, {\n text: \"I made a mixtape for you.\",\n hashtags: \"musicwithheart\",\n via: \"marmosetmusic\",\n })\n break\n\n case \"song version\":\n $.extend(params, {\n text: \"This. Song. On Repeat.\",\n hashtags: \"musicwithheart\",\n via: \"marmosetmusic\",\n })\n break\n\n default:\n break\n }\n\n /**\n * build anchor for unobtrusive twitter lib\n */\n\n var $a = $(\"\", {\n href: \"https://twitter.com/intent/tweet?\" + $.param(params),\n })\n\n /**\n * made the twitter intent handler a public function, we only need to bind it\n * then to trigger it\n */\n\n $a.one(\"click\", mm.share.twitter).trigger(\"click\")\n\n self.trigger(\"complete\")\n },\n\n copy: function (e) {\n _event.label = \"copy\"\n var $button = $(\".copy\", self.$el)\n $button.one(\"click\", copyLinkToClipboard(e, _event)).trigger(\"click\")\n alertCopier()\n },\n }\n\n function fullUrl() {\n return \"http://\" + [window.document.location.host, _data.segment, _data.id].join(\"/\")\n }\n\n function copyLinkToClipboard(e, _event) {\n e.preventDefault()\n var category = _event.category\n\n var tempTextArea = document.createElement(\"textarea\")\n tempTextArea.style.position = \"fixed\"\n tempTextArea.style.opacity = 0\n tempTextArea.value = _url\n document.body.appendChild(tempTextArea)\n tempTextArea.select()\n document.execCommand(\"Copy\")\n document.body.removeChild(tempTextArea)\n }\n\n function alertCopier() {\n var $button = $(\".copy\", self.$el)\n $button.addClass(\"copied\")\n }\n\n function bindChoices() {\n $choices.off(\"click\").on(\"click\", function (e) {\n e.preventDefault()\n var action = $(this).attr(\"data-action\")\n actions[action] = _.bind(actions[action], this, e)\n actions[action]()\n return false\n })\n }\n\n /**\n * Builds the share email form for both mixtapes and song versions\n * @private\n */\n\n function buildForm() {\n _form = mm.DrawerForm($(\".mm-drawer-form\", self.$el), {\n url: [\"\", _data.api, _data.id, \"share\"].join(\"/\"),\n type: \"POST\",\n empty: true,\n })\n }\n\n self.on(\"complete\", function () {\n _data = null\n mm.drawerProxy.trigger(\"close\")\n })\n\n var superHide = self.hide\n self.hide = function () {\n superHide()\n if (_form) {\n _form.reset()\n }\n }\n\n var superShow = self.show\n self.show = function (payload) {\n bindChoices()\n superShow()\n if (_form) {\n _form.reset()\n }\n }\n\n self.on(\"shareData\", function (payload) {\n _data = payload\n\n self.hideNested()\n\n $(\".copy\", self.$el).removeClass(\"copied\")\n\n _event.action = \"share\"\n _event.value = _data.id\n\n switch (_data.type) {\n case \"mixtape\":\n _event.category = \"mixtape\"\n _event.value = _data.internalID\n self.$el.find(\".email.mixtape\").show().siblings(\".email\").hide()\n buildForm()\n break\n case \"song version\":\n _event.category = \"song version\"\n self.$el.find(\".email.song-version\").show().siblings(\".email\").hide()\n buildForm()\n break\n default:\n self.$el.find(\".email.default\").show().siblings(\".email\").hide()\n break\n }\n\n _url = fullUrl()\n })\n\n return self\n}\n","/**\n * The messageCenter is used as a central point of communication to handle the\n * displaying of messages within a modal - this object is necessary to ensure\n * messages do not become 'stacked' on top of eachother.\n * @constructor (singleton)\n * @extends {mm.EventEmitter}\n * @public\n * @return {Object} mm.messageCenter\n */\nmm.messageCenter = (function () {\n var self = mm.EventEmitter()\n\n /**\n * Initializer, creates props\n * @public\n * @return {Object} mm.messageCenter\n */\n self.init = function () {\n self.$el = $(\"#message-center\").attr(\"tabindex\", -1)\n // TODO: replace oak logic here\n // self.__el = oak.strap(self.$el[0])\n self.$close = $(\".close\", self.$el)\n self.$cover = $(\".cover\", self.$el)\n self.$target = $(\".target\", self.$el)\n\n self.$close.on(\"click\", function (e) {\n e.preventDefault()\n self.close()\n })\n\n self.$cover.on(\"click\", function (e) {\n e.preventDefault()\n self.close()\n })\n\n self.$el.on(\"keydown\", function (e) {\n if (e.keyCode === 27) {\n e.preventDefault()\n self.close()\n }\n })\n\n return self\n }\n\n /**\n * Checks the queue for an available message and calls to display it\n * @private\n */\n function checkQueue() {\n var message = self.queue.shift()\n if (message) {\n display(message)\n }\n }\n\n function display(message) {\n var message_id = message.content.attr(\"class\")\n\n if (message_id === \"playerWrapper\") {\n self.$el.addClass(\"videoPlayerContainer\")\n }\n\n self.$target.html(message.content)\n self.$el.addClass(\"showing\").removeClass(\"hiding\").attr(\"data-id\", message_id).focus()\n\n self.$target.find(\"#closeModal\").on(\"click\", function (e) {\n e.preventDefault()\n self.close()\n })\n\n if (message_id === \"playerWrapper\") {\n self.$target.find(\".iframeWrapper iframe\").on(\"load\", function () {\n self.$target.find(\".playerWrapper .loading\").addClass(\"hidden\")\n })\n }\n\n if (typeof message.callback === \"function\") {\n message.callback()\n }\n checkQueue()\n }\n\n /**\n * Queue of mm.Message instances to display\n * @type {Array}\n */\n self.queue = []\n\n self.close = function () {\n self.$el.addClass(\"hiding\").removeClass(\"showing\")\n self.$el[0].addEventListener(\n \"transitionend\",\n function onClose() {\n self.$el.removeClass(\"hiding\")\n self.$el[0].className = \"\"\n self.$close[0].className = \"close\"\n self.$target.html(\"\")\n self.$el[0].removeEventListener(\"transitionend\", onClose)\n },\n false\n )\n if ($(\"div.past-licenses.disabled\").length > 0) {\n $(\"div.past-licenses\").removeClass(\"disabled\")\n }\n }\n\n /**\n * Accepts a message and calls to check the queue\n * @public\n * @param {mm.Message} message An instance of mm.Message\n */\n self.read = function (message) {\n // if there is no message, exit.\n if (typeof message === \"undefined\") return\n self.queue.push(message)\n checkQueue()\n }\n\n return self\n})()\n\nmm.facade.on(\"app:ready\", mm.messageCenter.init)\n","mm.mobilePlayer = (function () {\n \"use strict\"\n\n var self = mm.BasePlayer($(\".player.mobile\"))\n\n var superInit = self.init\n self.init = function () {\n superInit()\n self.streamWidth = self.$songVersionStream.width()\n self.sizeElapsed()\n\n $(\"nav[role=main] .player-toggle\").off(\"click\").on(\"click\", togglePlay)\n }\n\n function togglePlay() {\n if (self.isState(\"playing\")) {\n self.pause()\n } else if (self.isState(\"paused\")) {\n self.play()\n }\n }\n\n self._onCanplay = function (e) {\n mm.spin(false)\n self.$playButton.removeClass(\"spinning\")\n self.audio.play()\n }\n\n var superOnPlaying = self.states.onPlaying\n self.states.onPlaying = function () {\n superOnPlaying()\n self.$el.add(self.$el.parents(\"li.player\")).addClass(\"expanded\")\n $(\"nav[role=main] .hamburger\").addClass(\"music-playing\")\n $(\"nav[role=main]\").removeClass(\"paused\")\n $(\"nav[role=main]\").addClass(\"playing\")\n }\n\n var superOnPaused = self.states.onPaused\n self.states.onPaused = function () {\n superOnPaused()\n $(\"nav[role=main] .hamburger\").removeClass(\"music-playing\")\n $(\"nav[role=main]\").removeClass(\"playing\")\n $(\"nav[role=main]\").addClass(\"paused\")\n }\n\n var superOnIdle = self.states.onIdle\n self.states.onIdle = function () {\n superOnIdle()\n $(\"nav[role=main]\").removeClass(\"playing paused\")\n }\n\n return self\n})()\n\nmm.facade.on(\"app:ready\", function () {\n if (mm.isMobile) mm.mobilePlayer.init()\n})\n","/*!\n * JavaScript Cookie v2.1.3\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n var registeredInModuleLoader = false;\n if (typeof define === 'function' && define.amd) {\n define(factory);\n registeredInModuleLoader = true;\n }\n if (typeof exports === 'object') {\n module.exports = factory();\n registeredInModuleLoader = true;\n }\n if (!registeredInModuleLoader) {\n var OldCookies = window.Cookies;\n var api = window.Cookies = factory();\n api.noConflict = function () {\n window.Cookies = OldCookies;\n return api;\n };\n }\n}(function () {\n function extend () {\n var i = 0;\n var result = {};\n for (; i < arguments.length; i++) {\n var attributes = arguments[ i ];\n for (var key in attributes) {\n result[key] = attributes[key];\n }\n }\n return result;\n }\n\n function init (converter) {\n function api (key, value, attributes) {\n var result;\n if (typeof document === 'undefined') {\n return;\n }\n\n // Write\n\n if (arguments.length > 1) {\n attributes = extend({\n path: '/'\n }, api.defaults, attributes);\n\n if (typeof attributes.expires === 'number') {\n var expires = new Date();\n expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n attributes.expires = expires;\n }\n\n try {\n result = JSON.stringify(value);\n if (/^[\\{\\[]/.test(result)) {\n value = result;\n }\n } catch (e) {}\n\n if (!converter.write) {\n value = encodeURIComponent(String(value))\n .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n } else {\n value = converter.write(value, key);\n }\n\n key = encodeURIComponent(String(key));\n key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n key = key.replace(/[\\(\\)]/g, escape);\n\n return (document.cookie = [\n key, '=', value,\n attributes.expires ? '; expires=' + attributes.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE\n attributes.path ? '; path=' + attributes.path : '',\n attributes.domain ? '; domain=' + attributes.domain : '',\n attributes.secure ? '; secure' : ''\n ].join(''));\n }\n\n // Read\n\n if (!key) {\n result = {};\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all. Also prevents odd result when\n // calling \"get()\"\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var rdecode = /(%[0-9A-Z]{2})+/g;\n var i = 0;\n\n for (; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var cookie = parts.slice(1).join('=');\n\n if (cookie.charAt(0) === '\"') {\n cookie = cookie.slice(1, -1);\n }\n\n try {\n var name = parts[0].replace(rdecode, decodeURIComponent);\n cookie = converter.read ?\n converter.read(cookie, name) : converter(cookie, name) ||\n cookie.replace(rdecode, decodeURIComponent);\n\n if (this.json) {\n try {\n cookie = JSON.parse(cookie);\n } catch (e) {}\n }\n\n if (key === name) {\n result = cookie;\n break;\n }\n\n if (!key) {\n result[name] = cookie;\n }\n } catch (e) {}\n }\n\n return result;\n }\n\n api.set = api;\n api.get = function (key) {\n return api.call(api, key);\n };\n api.getJSON = function () {\n return api.apply({\n json: true\n }, [].slice.call(arguments));\n };\n api.defaults = {};\n\n api.remove = function (key, attributes) {\n api(key, '', extend(attributes, {\n expires: -1\n }));\n };\n\n api.withConverter = init;\n\n return api;\n }\n\n return init(function () {});\n}));\n","(function(t,e){if(typeof exports==\"object\")module.exports=e();else if(typeof define==\"function\"&&define.amd)define(e);else t.Spinner=e()})(this,function(){\"use strict\";var t=[\"webkit\",\"Moz\",\"ms\",\"O\"],e={},i;function o(t,e){var i=document.createElement(t||\"div\"),o;for(o in e)i[o]=e[o];return i}function n(t){for(var e=1,i=arguments.length;e>1):parseInt(n.left,10)+s)+\"px\",top:(n.top==\"auto\"?l.y-a.y+(t.offsetHeight>>1):parseInt(n.top,10)+s)+\"px\"})}r.setAttribute(\"role\",\"progressbar\");e.lines(r,e.opts);if(!i){var u=0,p=(n.lines-1)*(1-n.direction)/2,c,h=n.fps,m=h/n.speed,y=(1-n.opacity)/(m*n.trail/100),g=m/n.lines;(function v(){u++;for(var t=0;t>1)+\"px\"})}for(;r',e)}r.addRule(\".spin-vml\",\"behavior:url(#default#VML)\");p.prototype.lines=function(e,i){var o=i.length+i.width,r=2*o;function s(){return f(t(\"group\",{coordsize:r+\" \"+r,coordorigin:-o+\" \"+-o}),{width:r,height:r})}var a=-(i.width+i.length)*2+\"px\",l=f(s(),{position:\"absolute\",top:a,left:a}),d;function u(e,r,a){n(l,n(f(s(),{rotation:360/i.lines*e+\"deg\",left:~~r}),n(f(t(\"roundrect\",{arcsize:i.corners}),{width:o,height:i.width,left:i.radius,top:-i.width>>1,filter:a}),t(\"fill\",{color:i.color,opacity:i.opacity}),t(\"stroke\",{opacity:0}))))}if(i.shadow)for(d=1;d<=i.lines;d++)u(d,-2,\"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)\");for(d=1;d<=i.lines;d++)u(d);return n(e,l)};p.prototype.opacity=function(t,e,i,o){var n=t.firstChild;o=o.shadow&&o.lines||0;if(n&&e+o